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: stages:
- build - build
- test - test
- audit
- deploy - deploy
build: build:
@@ -27,16 +28,16 @@ audit:
- schedules - schedules
script: script:
- npm audit - npm audit
stage: test stage: audit
scheduled-audit: scheduled-audit:
only: only:
- schedules - schedules
script: script:
- npm audit - npm audit
stage: test stage: audit
mocha: unit:
stage: test stage: test
script: script:
- npm test - 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'" "tslint": "tslint -p tsconfig.json -c tslint.json 'src/**/*.ts'"
}, },
"dependencies": { "dependencies": {
"@openstapps/api": "0.16.0", "@openstapps/api": "0.19.0",
"@openstapps/core": "0.29.0", "@openstapps/core": "0.33.0",
"@openstapps/logger": "0.4.0", "@openstapps/logger": "0.4.0",
"commander": "2.20.0" "commander": "4.1.1"
}, },
"devDependencies": { "devDependencies": {
"@openstapps/configuration": "0.21.1", "@openstapps/configuration": "0.24.0",
"@openstapps/core-tools": "0.9.0", "@openstapps/core-tools": "0.14.0",
"@types/chai": "4.2.3", "@types/chai": "4.2.10",
"@types/chai-as-promised": "7.1.2", "@types/chai-as-promised": "7.1.2",
"@types/mocha": "5.2.7", "@types/mocha": "5.2.7",
"@types/nock": "10.0.3", "@types/nock": "10.0.3",
"@types/node": "10.14.12", "@types/node": "10.17.17",
"chai": "4.2.0", "chai": "4.2.0",
"chai-as-promised": "7.1.1", "chai-as-promised": "7.1.1",
"conventional-changelog-cli": "2.0.25", "conventional-changelog-cli": "2.0.31",
"mocha": "6.2.1", "mocha": "6.2.1",
"mocha-typescript": "1.1.17", "mocha-typescript": "1.1.17",
"nock": "10.0.6", "nock": "10.0.6",
"nyc": "14.1.1", "nyc": "14.1.1",
"prepend-file-cli": "1.0.6", "prepend-file-cli": "1.0.6",
"rimraf": "2.6.3", "rimraf": "3.0.2",
"ts-node": "8.4.1", "ts-node": "8.6.2",
"tslint": "5.20.0", "tslint": "6.0.0",
"typedoc": "0.15.0", "typedoc": "0.16.11",
"typescript": "3.6.4" "typescript": "3.7.5"
}, },
"nyc": { "nyc": {
"all": true, "all": true,

View File

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