refactor: update dependencies

This commit is contained in:
Rainer Killinger
2020-03-04 14:17:06 +01:00
parent faf0276810
commit 9ab2510631
4 changed files with 1278 additions and 1403 deletions

View File

@@ -11,6 +11,7 @@ before_script:
stages:
- build
- test
- audit
- deploy
build:
@@ -27,16 +28,16 @@ audit:
- schedules
script:
- npm audit
stage: test
stage: audit
scheduled-audit:
only:
- schedules
script:
- npm audit
stage: test
stage: audit
mocha:
unit:
stage: test
script:
- npm test

2636
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -30,32 +30,32 @@
"tslint": "tslint -p tsconfig.json -c tslint.json 'src/**/*.ts'"
},
"dependencies": {
"@openstapps/api": "0.16.0",
"@openstapps/core": "0.29.0",
"@openstapps/api": "0.19.0",
"@openstapps/core": "0.33.0",
"@openstapps/logger": "0.4.0",
"commander": "2.20.0"
"commander": "4.1.1"
},
"devDependencies": {
"@openstapps/configuration": "0.21.1",
"@openstapps/core-tools": "0.9.0",
"@types/chai": "4.2.3",
"@openstapps/configuration": "0.24.0",
"@openstapps/core-tools": "0.14.0",
"@types/chai": "4.2.10",
"@types/chai-as-promised": "7.1.2",
"@types/mocha": "5.2.7",
"@types/nock": "10.0.3",
"@types/node": "10.14.12",
"@types/node": "10.17.17",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"conventional-changelog-cli": "2.0.25",
"conventional-changelog-cli": "2.0.31",
"mocha": "6.2.1",
"mocha-typescript": "1.1.17",
"nock": "10.0.6",
"nyc": "14.1.1",
"prepend-file-cli": "1.0.6",
"rimraf": "2.6.3",
"ts-node": "8.4.1",
"tslint": "5.20.0",
"typedoc": "0.15.0",
"typescript": "3.6.4"
"rimraf": "3.0.2",
"ts-node": "8.6.2",
"tslint": "6.0.0",
"typedoc": "0.16.11",
"typescript": "3.7.5"
},
"nyc": {
"all": true,

View File

@@ -13,20 +13,22 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Logger} from '@openstapps/logger';
import * as commander from 'commander';
import {Command} from 'commander';
import {readFileSync} from 'fs';
import {join} from 'path';
import {executeConnector, isValidSCNamespace} from './common';
import {MinimalConnector} from './minimal-connector';
process.on('unhandledRejection', (error) => {
throw error;
});
const connectorVersion = JSON.parse(
readFileSync(join(__dirname, '..', 'package.json'))
.toString(),
).version;
process.on('unhandledRejection', (error) => {
throw error;
});
const commander = new Command();
/**
* Uses arguments to paramtrize the connector execution
@@ -36,8 +38,8 @@ process.on('unhandledRejection', (error) => {
* licensePlate - The license plate of your school. Must be matched to a SCNamespace e.g. f-u
*/
commander
.version(connectorVersion)
.command('run <backendURL> <origin> <licensePlate>')
.version(connectorVersion)
.action(async (backendURL: string, origin: string, licensePlate: string) => {
if (backendURL.length === 0) {