From 6a047d633385e6899eaabd7b5a3664aaadfdab72 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 26 Nov 2018 17:55:15 +0100 Subject: [PATCH] fix(core): update --- .gitlab-ci.yml | 25 ++++--------------------- package.json | 2 +- ts/smartshell.classes.shellenv.ts | 16 ++++++---------- ts/smartshell.classes.smartshell.ts | 2 +- tslint.json | 9 ++++++++- 5 files changed, 20 insertions(+), 34 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1d614e..8321aed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,7 @@ mirror: snyk: stage: security script: + - npmci npm prepare - npmci command npm install -g snyk - npmci command npm install --ignore-scripts - npmci command snyk test @@ -36,21 +37,11 @@ snyk: # ==================== # test stage # ==================== -testLEGACY: - stage: test - script: - - npmci node install legacy - - npmci npm install - - npmci npm test - coverage: /\d+.?\d+?\%\s*coverage/ - tags: - - docker - - notpriv - allow_failure: true testLTS: stage: test script: + - npmci npm prepare - npmci node install lts - npmci npm install - npmci npm test @@ -62,6 +53,7 @@ testLTS: testSTABLE: stage: test script: + - npmci npm prepare - npmci node install stable - npmci npm install - npmci npm test @@ -118,6 +110,7 @@ pages: stage: metadata script: - npmci command npm install -g typedoc typescript + - npmci npm prepare - npmci npm install - npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/ tags: @@ -130,13 +123,3 @@ pages: paths: - public allow_failure: true - -windowsCompatibility: - image: stefanscherer/node-windows:10-build-tools - stage: metadata - script: - - npm install & npm test - coverage: /\d+.?\d+?\%\s*coverage/ - tags: - - windows - allow_failure: true diff --git a/package.json b/package.json index 556761d..40225f0 100644 --- a/package.json +++ b/package.json @@ -37,4 +37,4 @@ "@types/which": "^1.3.1", "which": "^1.3.1" } -} +} \ No newline at end of file diff --git a/ts/smartshell.classes.shellenv.ts b/ts/smartshell.classes.shellenv.ts index 7a34387..1198034 100644 --- a/ts/smartshell.classes.shellenv.ts +++ b/ts/smartshell.classes.shellenv.ts @@ -1,4 +1,4 @@ -export type TExecutor = "sh" | "bash"; +export type TExecutor = 'sh' | 'bash'; export interface IShellEnvContructorOptions { executor: TExecutor; @@ -19,9 +19,7 @@ export class ShellEnv { // add sourcefiles if (optionsArg.sourceFilePaths) { - this.sourceFileArray = this.sourceFileArray.concat( - optionsArg.sourceFilePaths - ); + this.sourceFileArray = this.sourceFileArray.concat(optionsArg.sourceFilePaths); } // add pathDirectories @@ -39,9 +37,7 @@ export class ShellEnv { if (process.env.SMARTSHELL_PATH) { commandPath = `${commandPath}:${process.env.SMARTSHELL_PATH}`; } - commandResult = `PATH=${ - commandPath - } && ${commandStringArg}`; + commandResult = `PATH=${commandPath} && ${commandStringArg}`; return commandResult; } @@ -63,9 +59,9 @@ export class ShellEnv { } createEnvExecString(commandArg): string { - let commandResult = '' - if (this.executor === "bash") { - let sourceString = ""; + let commandResult = ''; + if (this.executor === 'bash') { + let sourceString = ''; for (let sourceFilePath of this.sourceFileArray) { sourceString = sourceString + `source ${sourceFilePath} && `; } diff --git a/ts/smartshell.classes.smartshell.ts b/ts/smartshell.classes.smartshell.ts index b8703c7..95fcb9c 100644 --- a/ts/smartshell.classes.smartshell.ts +++ b/ts/smartshell.classes.smartshell.ts @@ -30,7 +30,7 @@ export class Smartshell { constructor(optionsArg: IShellEnvContructorOptions) { this.shellEnv = new ShellEnv(optionsArg); - }; + } /** * executes a given command async diff --git a/tslint.json b/tslint.json index 4424397..d4ea2e9 100644 --- a/tslint.json +++ b/tslint.json @@ -4,7 +4,14 @@ "semicolon": [true, "always"], "no-console": false, "ordered-imports": false, - "object-literal-sort-keys": false + "object-literal-sort-keys": false, + "member-ordering": { + "options":{ + "order": [ + "static-method" + ] + } + } }, "defaultSeverity": "warning" }