Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
d5d347721a | |||
6a047d6333 | |||
6e7b4dd18e | |||
debc5f1524 | |||
8d03561762 | |||
f516a6e753 |
@ -26,6 +26,7 @@ mirror:
|
|||||||
snyk:
|
snyk:
|
||||||
stage: security
|
stage: security
|
||||||
script:
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
- npmci command npm install -g snyk
|
- npmci command npm install -g snyk
|
||||||
- npmci command npm install --ignore-scripts
|
- npmci command npm install --ignore-scripts
|
||||||
- npmci command snyk test
|
- npmci command snyk test
|
||||||
@ -36,21 +37,11 @@ snyk:
|
|||||||
# ====================
|
# ====================
|
||||||
# test stage
|
# 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:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
- npmci node install lts
|
- npmci node install lts
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
@ -62,6 +53,7 @@ testLTS:
|
|||||||
testSTABLE:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
- npmci npm prepare
|
||||||
- npmci node install stable
|
- npmci node install stable
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci npm test
|
- npmci npm test
|
||||||
@ -118,6 +110,7 @@ pages:
|
|||||||
stage: metadata
|
stage: metadata
|
||||||
script:
|
script:
|
||||||
- npmci command npm install -g typedoc typescript
|
- npmci command npm install -g typedoc typescript
|
||||||
|
- npmci npm prepare
|
||||||
- npmci npm install
|
- npmci npm install
|
||||||
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
|
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
|
||||||
tags:
|
tags:
|
||||||
@ -130,13 +123,3 @@ pages:
|
|||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
allow_failure: true
|
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
|
|
||||||
|
14
package-lock.json
generated
14
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartshell",
|
"name": "@pushrocks/smartshell",
|
||||||
"version": "2.0.8",
|
"version": "2.0.11",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -210,9 +210,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "10.12.0",
|
"version": "10.12.10",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.10.tgz",
|
||||||
"integrity": "sha512-3TUHC3jsBAB7qVRGxT6lWyYo2v96BMmD2PTcl47H25Lu7UXtFH/2qqmKiVrnel6Ne//0TFYf6uvNX+HW2FRkLQ==",
|
"integrity": "sha512-8xZEYckCbUVgK8Eg7lf5Iy4COKJ5uXlnIOnePN0WUwSQggy9tolM+tDJf7wMOnT/JT/W9xDYIaYggt3mRV2O5w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/vinyl": {
|
"@types/vinyl": {
|
||||||
@ -963,9 +963,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslint-config-prettier": {
|
"tslint-config-prettier": {
|
||||||
"version": "1.15.0",
|
"version": "1.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.16.0.tgz",
|
||||||
"integrity": "sha512-06CgrHJxJmNYVgsmeMoa1KXzQRoOdvfkqnJth6XUkNeOz707qxN0WfxfhYwhL5kXHHbYJRby2bqAPKwThlZPhw==",
|
"integrity": "sha512-zu6RAcpBtqdvhT6KpBh9kRPYATjOf9BnRi718kNqVKFjEgSE4rFrPprFju1YJrkOa3RbtbWI1ZSuLd2NBX1MDw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tsutils": {
|
"tsutils": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartshell",
|
"name": "@pushrocks/smartshell",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "2.0.8",
|
"version": "2.0.11",
|
||||||
"description": "shell actions designed as promises",
|
"description": "shell actions designed as promises",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
@ -28,9 +28,9 @@
|
|||||||
"@gitzone/tsrun": "^1.1.13",
|
"@gitzone/tsrun": "^1.1.13",
|
||||||
"@gitzone/tstest": "^1.0.15",
|
"@gitzone/tstest": "^1.0.15",
|
||||||
"@pushrocks/tapbundle": "^3.0.7",
|
"@pushrocks/tapbundle": "^3.0.7",
|
||||||
"@types/node": "^10.12.0",
|
"@types/node": "^10.12.10",
|
||||||
"tslint": "^5.11.0",
|
"tslint": "^5.11.0",
|
||||||
"tslint-config-prettier": "^1.15.0"
|
"tslint-config-prettier": "^1.16.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export type TExecutor = "sh" | "bash";
|
export type TExecutor = 'sh' | 'bash';
|
||||||
|
|
||||||
export interface IShellEnvContructorOptions {
|
export interface IShellEnvContructorOptions {
|
||||||
executor: TExecutor;
|
executor: TExecutor;
|
||||||
@ -19,9 +19,7 @@ export class ShellEnv {
|
|||||||
|
|
||||||
// add sourcefiles
|
// add sourcefiles
|
||||||
if (optionsArg.sourceFilePaths) {
|
if (optionsArg.sourceFilePaths) {
|
||||||
this.sourceFileArray = this.sourceFileArray.concat(
|
this.sourceFileArray = this.sourceFileArray.concat(optionsArg.sourceFilePaths);
|
||||||
optionsArg.sourceFilePaths
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add pathDirectories
|
// add pathDirectories
|
||||||
@ -39,9 +37,7 @@ export class ShellEnv {
|
|||||||
if (process.env.SMARTSHELL_PATH) {
|
if (process.env.SMARTSHELL_PATH) {
|
||||||
commandPath = `${commandPath}:${process.env.SMARTSHELL_PATH}`;
|
commandPath = `${commandPath}:${process.env.SMARTSHELL_PATH}`;
|
||||||
}
|
}
|
||||||
commandResult = `PATH=${
|
commandResult = `PATH=${commandPath} && ${commandStringArg}`;
|
||||||
commandPath
|
|
||||||
} && ${commandStringArg}`;
|
|
||||||
return commandResult;
|
return commandResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,9 +59,9 @@ export class ShellEnv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
createEnvExecString(commandArg): string {
|
createEnvExecString(commandArg): string {
|
||||||
let commandResult = ''
|
let commandResult = '';
|
||||||
if (this.executor === "bash") {
|
if (this.executor === 'bash') {
|
||||||
let sourceString = "";
|
let sourceString = '';
|
||||||
for (let sourceFilePath of this.sourceFileArray) {
|
for (let sourceFilePath of this.sourceFileArray) {
|
||||||
sourceString = sourceString + `source ${sourceFilePath} && `;
|
sourceString = sourceString + `source ${sourceFilePath} && `;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ export class ShellLog {
|
|||||||
}
|
}
|
||||||
return dataArg;
|
return dataArg;
|
||||||
})();
|
})();
|
||||||
console.log(dataString);
|
process.stdout.write(dataString);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,7 +30,7 @@ export class Smartshell {
|
|||||||
|
|
||||||
constructor(optionsArg: IShellEnvContructorOptions) {
|
constructor(optionsArg: IShellEnvContructorOptions) {
|
||||||
this.shellEnv = new ShellEnv(optionsArg);
|
this.shellEnv = new ShellEnv(optionsArg);
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* executes a given command async
|
* executes a given command async
|
||||||
|
@ -4,7 +4,14 @@
|
|||||||
"semicolon": [true, "always"],
|
"semicolon": [true, "always"],
|
||||||
"no-console": false,
|
"no-console": false,
|
||||||
"ordered-imports": false,
|
"ordered-imports": false,
|
||||||
"object-literal-sort-keys": false
|
"object-literal-sort-keys": false,
|
||||||
|
"member-ordering": {
|
||||||
|
"options":{
|
||||||
|
"order": [
|
||||||
|
"static-method"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"defaultSeverity": "warning"
|
"defaultSeverity": "warning"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user