fix(core): update

This commit is contained in:
Philipp Kunz 2021-04-07 20:25:17 +00:00
parent b036e609ce
commit 1d1264c2b3
6 changed files with 10678 additions and 495 deletions

View File

@ -19,23 +19,35 @@ mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
audit:
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high
- npmci command npm audit --audit-level=high --only=dev
tags:
- lossless
- docker
- notpriv
allow_failure: true
# ====================
# test stage
@ -50,9 +62,7 @@ testStable:
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- lossless
- docker
- priv
testBuild:
stage: test
@ -63,9 +73,7 @@ testBuild:
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- lossless
- docker
- notpriv
release:
stage: release
@ -85,6 +93,8 @@ release:
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci npm prepare

View File

@ -15,7 +15,7 @@
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm"]
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}

11098
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -26,21 +26,21 @@
},
"homepage": "https://gitlab.com/pushrocks/smartcli",
"dependencies": {
"@pushrocks/lik": "^4.0.13",
"@pushrocks/smartlog": "^2.0.21",
"@pushrocks/lik": "^4.0.20",
"@pushrocks/smartlog": "^2.0.39",
"@pushrocks/smartparam": "^1.1.6",
"@pushrocks/smartpromise": "^3.0.6",
"@types/yargs": "^15.0.5",
"rxjs": "^6.5.5",
"yargs": "^15.3.1"
"@pushrocks/smartpromise": "^3.1.3",
"@types/yargs": "^16.0.1",
"rxjs": "^6.6.7",
"yargs": "^16.2.0"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.24",
"@gitzone/tsrun": "^1.2.8",
"@gitzone/tstest": "^1.0.28",
"@pushrocks/tapbundle": "^3.2.1",
"@types/node": "^14.0.5",
"tslint": "^6.1.2",
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsrun": "^1.2.12",
"@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.2.14",
"@types/node": "^14.14.37",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
},
"files": [
@ -54,5 +54,8 @@
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
]
}
}

View File

@ -19,7 +19,7 @@ TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartcli)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartcli)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartcli)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartcli)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
@ -46,11 +46,11 @@ except when of the options is -v, --version or --help.
```javascript
import { Smartcli } from 'smartcli';
mySmartcli = new Smartcli();
mySmartcli.standardTask().then(argvArg => {
mySmartcli.standardTask().then((argvArg) => {
// do something if program is called without an command
});
mySmartcli.addCommand({ commandname: 'install' }).then(argvArg => {
mySmartcli.addCommand({ commandname: 'install' }).then((argvArg) => {
// do something if program is called with command "install"
});
@ -58,7 +58,7 @@ mySmartcli.addVersion('1.0.0'); // -v and --version options will display the spe
mySmartCli.addHelp({
// is triggered by help command and --help option
helpText: 'some help text to print' // the helpText to display
helpText: 'some help text to print', // the helpText to display
});
mySmartcli.startParse(); // starts the evaluation and fullfills or rejects promises.

View File

@ -17,6 +17,8 @@ export interface ITriggerObservableObject {
subject: Subject<any>;
}
const logger = new plugins.smartlog.ConsoleLog();
/**
* class to create a new instance of Smartcli. Handles parsing of command line arguments.
*/
@ -80,7 +82,7 @@ export class Smartcli {
if (!this.getTriggerSubject(triggerNameArg)) {
this.allTriggerObservablesMap.add({
triggerName: triggerNameArg,
subject: triggerSubject
subject: triggerSubject,
});
} else {
throw new Error(`you can't add a trigger twice`);
@ -100,7 +102,7 @@ export class Smartcli {
getTriggerSubject(triggerName: string) {
const triggerObservableObject = this.allTriggerObservablesMap.find(
triggerObservableObjectArg => {
(triggerObservableObjectArg) => {
return triggerObservableObjectArg.triggerName === triggerName;
}
);
@ -115,8 +117,8 @@ export class Smartcli {
* allows to specify help text to be printed above the rest of the help text
*/
addHelp(optionsArg: { helpText: string }) {
this.addCommand('help').subscribe(argvArg => {
plugins.smartlog.defaultLogger.log('info', optionsArg.helpText);
this.addCommand('help').subscribe((argvArg) => {
logger.log('info', optionsArg.helpText);
});
}