Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
eb5096482f | |||
6d56a09dd7 | |||
92d26a574c | |||
c73e48450a | |||
0e95e58215 | |||
f6aa978526 | |||
0a02d753ce | |||
0dfbd2c751 | |||
6ec8ce3545 | |||
e96f981573 | |||
3a16245545 | |||
349d79d58f | |||
a59897ae6d | |||
4779c7107f | |||
d849c17817 | |||
4130ab55e2 | |||
2d3a4b0a0e | |||
a91938e463 |
@ -1,5 +1,10 @@
|
|||||||
# gitzone standard
|
# gitzone standard
|
||||||
image: hosttoday/ht-docker-node:npmts
|
image: hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .yarn/
|
||||||
|
key: "$CI_BUILD_STAGE"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
10
dist/index.d.ts
vendored
10
dist/index.d.ts
vendored
@ -1,8 +1,2 @@
|
|||||||
export interface IExecResult {
|
export * from './smartshell.wrap';
|
||||||
exitCode: number;
|
export * from './smartshell.classes.smartshell';
|
||||||
stdout: string;
|
|
||||||
}
|
|
||||||
export declare let exec: (commandStringArg: string) => Promise<IExecResult>;
|
|
||||||
export declare let execSilent: (commandStringArg: string) => Promise<IExecResult>;
|
|
||||||
export declare let execSync: () => void;
|
|
||||||
export declare let execSyncSilent: () => void;
|
|
||||||
|
28
dist/index.js
vendored
28
dist/index.js
vendored
@ -1,24 +1,8 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
function __export(m) {
|
||||||
|
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||||
|
}
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const plugins = require("./smartshell.plugins");
|
__export(require("./smartshell.wrap"));
|
||||||
exports.exec = (commandStringArg) => {
|
__export(require("./smartshell.classes.smartshell"));
|
||||||
let done = plugins.smartq.defer();
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHVDQUFpQztBQUNqQyxxREFBK0MifQ==
|
||||||
plugins.shelljs.exec(commandStringArg, { async: true }, (code, stdout, stderr) => {
|
|
||||||
done.resolve({
|
|
||||||
exitCode: code,
|
|
||||||
stdout: stdout
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return done.promise;
|
|
||||||
};
|
|
||||||
exports.execSilent = (commandStringArg) => {
|
|
||||||
let done = plugins.smartq.defer();
|
|
||||||
plugins.shelljs.exec(commandStringArg, {}, () => {
|
|
||||||
});
|
|
||||||
return done.promise;
|
|
||||||
};
|
|
||||||
exports.execSync = () => {
|
|
||||||
};
|
|
||||||
exports.execSyncSilent = () => {
|
|
||||||
};
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLGdEQUErQztBQVNwQyxRQUFBLElBQUksR0FBRyxDQUFDLGdCQUF3QjtJQUN6QyxJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBZSxDQUFBO0lBQzlDLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLGdCQUFnQixFQUFDLEVBQUMsS0FBSyxFQUFFLElBQUksRUFBQyxFQUFFLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBRSxNQUFNO1FBQ3hFLElBQUksQ0FBQyxPQUFPLENBQUM7WUFDWCxRQUFRLEVBQUUsSUFBSTtZQUNkLE1BQU0sRUFBRSxNQUFNO1NBQ2YsQ0FBQyxDQUFBO0lBQ0osQ0FBQyxDQUFDLENBQUE7SUFDRixNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtBQUNyQixDQUFDLENBQUE7QUFFVSxRQUFBLFVBQVUsR0FBRyxDQUFDLGdCQUF3QjtJQUMvQyxJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBZSxDQUFBO0lBQzlDLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLGdCQUFnQixFQUFDLEVBQUUsRUFBRTtJQUUxQyxDQUFDLENBQUMsQ0FBQTtJQUNGLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFBO0FBQ3JCLENBQUMsQ0FBQTtBQUVVLFFBQUEsUUFBUSxHQUFHO0FBRXRCLENBQUMsQ0FBQTtBQUVVLFFBQUEsY0FBYyxHQUFHO0FBRTVCLENBQUMsQ0FBQSJ9
|
|
28
dist/smartshell.classes.smartshell.d.ts
vendored
Normal file
28
dist/smartshell.classes.smartshell.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import * as smartshellWrap from './smartshell.wrap';
|
||||||
|
export declare type TExecutor = 'sh' | 'bash';
|
||||||
|
export interface ISmartshellContructorOptions {
|
||||||
|
executor: TExecutor;
|
||||||
|
sourceFilePaths: string[];
|
||||||
|
}
|
||||||
|
export declare class Smartshell {
|
||||||
|
executor: TExecutor;
|
||||||
|
sourceFileArray: string[];
|
||||||
|
constructor(optionsArg: ISmartshellContructorOptions);
|
||||||
|
addSourceFiles(sourceFilePathsArray: string[]): void;
|
||||||
|
cleanSourceFiles(): void;
|
||||||
|
/**
|
||||||
|
* executes silently and returns IExecResult
|
||||||
|
* @param commandArg
|
||||||
|
*/
|
||||||
|
execSilent(commandArg: string): Promise<smartshellWrap.IExecResult>;
|
||||||
|
/**
|
||||||
|
* executes and returns IExecResult
|
||||||
|
* @param commandArg
|
||||||
|
*/
|
||||||
|
exec(commandArg: string): Promise<smartshellWrap.IExecResult>;
|
||||||
|
/**
|
||||||
|
* creates the final sourcing string
|
||||||
|
* @param commandArg
|
||||||
|
*/
|
||||||
|
private createExecString(commandArg);
|
||||||
|
}
|
66
dist/smartshell.classes.smartshell.js
vendored
Normal file
66
dist/smartshell.classes.smartshell.js
vendored
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const smartshellWrap = require("./smartshell.wrap");
|
||||||
|
class Smartshell {
|
||||||
|
constructor(optionsArg) {
|
||||||
|
this.sourceFileArray = [];
|
||||||
|
this.executor = optionsArg.executor;
|
||||||
|
for (let sourceFilePath of optionsArg.sourceFilePaths) {
|
||||||
|
this.sourceFileArray.push(sourceFilePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
addSourceFiles(sourceFilePathsArray) {
|
||||||
|
for (let sourceFilePath of sourceFilePathsArray) {
|
||||||
|
this.sourceFileArray.push(sourceFilePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cleanSourceFiles() {
|
||||||
|
this.sourceFileArray = [];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* executes silently and returns IExecResult
|
||||||
|
* @param commandArg
|
||||||
|
*/
|
||||||
|
execSilent(commandArg) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let execCommand = this.createExecString(commandArg);
|
||||||
|
return yield smartshellWrap.execSilent(execCommand);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* executes and returns IExecResult
|
||||||
|
* @param commandArg
|
||||||
|
*/
|
||||||
|
exec(commandArg) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let execCommand = this.createExecString(commandArg);
|
||||||
|
return yield smartshellWrap.exec(execCommand);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* creates the final sourcing string
|
||||||
|
* @param commandArg
|
||||||
|
*/
|
||||||
|
createExecString(commandArg) {
|
||||||
|
if (this.executor === 'bash') {
|
||||||
|
let sourceString = '';
|
||||||
|
for (let sourceFilePath of this.sourceFileArray) {
|
||||||
|
sourceString = sourceString + `source ${sourceFilePath} && `;
|
||||||
|
}
|
||||||
|
return `bash -c '${sourceString} ${commandArg}'`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return commandArg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Smartshell = Smartshell;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzaGVsbC5jbGFzc2VzLnNtYXJ0c2hlbGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHNoZWxsLmNsYXNzZXMuc21hcnRzaGVsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQ0Esb0RBQW1EO0FBVW5EO0lBR0UsWUFBYSxVQUF3QztRQURyRCxvQkFBZSxHQUFhLEVBQUUsQ0FBQTtRQUU1QixJQUFJLENBQUMsUUFBUSxHQUFHLFVBQVUsQ0FBQyxRQUFRLENBQUE7UUFDbkMsR0FBRyxDQUFDLENBQUMsSUFBSSxjQUFjLElBQUksVUFBVSxDQUFDLGVBQWUsQ0FBQyxDQUFDLENBQUM7WUFDdEQsSUFBSSxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsY0FBYyxDQUFD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HLFVBQVUsY0FBYyxNQUFNLENBQUE7WUFDOUQsQ0FBQztZQUNELE1BQU0sQ0FBQyxZQUFZLFlBQVksSUFBSSxVQUFVLEdBQUcsQ0FBQTtRQUNsRCxDQUFDO1FBQUMsSUFBSSxDQUFDLENBQUM7WUFDTixNQUFNLENBQUMsVUFBVSxDQUFBO1FBQ25CLENBQUM7SUFDSCxDQUFDO0NBQ0Y7QUFyREQsZ0NBcURDIn0=
|
3
dist/smartshell.plugins.d.ts
vendored
3
dist/smartshell.plugins.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
import * as shelljs from 'shelljs';
|
import * as shelljs from 'shelljs';
|
||||||
import * as smartq from 'smartq';
|
import * as smartq from 'smartq';
|
||||||
export { shelljs, smartq };
|
import * as which from 'which';
|
||||||
|
export { shelljs, smartq, which };
|
||||||
|
4
dist/smartshell.plugins.js
vendored
4
dist/smartshell.plugins.js
vendored
@ -4,4 +4,6 @@ const shelljs = require("shelljs");
|
|||||||
exports.shelljs = shelljs;
|
exports.shelljs = shelljs;
|
||||||
const smartq = require("smartq");
|
const smartq = require("smartq");
|
||||||
exports.smartq = smartq;
|
exports.smartq = smartq;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzaGVsbC5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzaGVsbC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsbUNBQWtDO0FBSWhDLDBCQUFPO0FBSFQsaUNBQWdDO0FBSTlCLHdCQUFNIn0=
|
const which = require("which");
|
||||||
|
exports.which = which;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzaGVsbC5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzaGVsbC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsbUNBQWtDO0FBS2hDLDBCQUFPO0FBSlQsaUNBQWdDO0FBSzlCLHdCQUFNO0FBSlIsK0JBQThCO0FBSzVCLHNCQUFLIn0=
|
43
dist/smartshell.wrap.d.ts
vendored
Normal file
43
dist/smartshell.wrap.d.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/// <reference types="node" />
|
||||||
|
import { ChildProcess } from 'child_process';
|
||||||
|
/**
|
||||||
|
* interface for ExecResult
|
||||||
|
*/
|
||||||
|
export interface IExecResult {
|
||||||
|
exitCode: number;
|
||||||
|
stdout: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* interface for streaming ExecResult
|
||||||
|
*/
|
||||||
|
export interface IExecResultStreaming {
|
||||||
|
childProcess: ChildProcess;
|
||||||
|
finalPromise: Promise<IExecResult>;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* executes a given command async
|
||||||
|
* @param commandStringArg
|
||||||
|
*/
|
||||||
|
export declare let exec: (commandStringArg: string) => Promise<IExecResult>;
|
||||||
|
/**
|
||||||
|
* executes a given command async and silent
|
||||||
|
* @param commandStringArg
|
||||||
|
*/
|
||||||
|
export declare let execSilent: (commandStringArg: string) => Promise<IExecResult>;
|
||||||
|
/**
|
||||||
|
* executes a command and allws you to stream output
|
||||||
|
*/
|
||||||
|
export declare let execStreaming: (commandStringArg: string) => {
|
||||||
|
childProcess: ChildProcess;
|
||||||
|
finalPromise: Promise<IExecResult>;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* executes a command and returns promise that will be fullfilled once an putput line matches RegexArg
|
||||||
|
* @param commandStringArg
|
||||||
|
* @param regexArg
|
||||||
|
*/
|
||||||
|
export declare let execAndWaitForLine: (commandStringArg: string, regexArg: RegExp) => Promise<{}>;
|
||||||
|
/**
|
||||||
|
* get a path
|
||||||
|
*/
|
||||||
|
export declare let which: (cmd: string) => Promise<string>;
|
76
dist/smartshell.wrap.js
vendored
Normal file
76
dist/smartshell.wrap.js
vendored
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const plugins = require("./smartshell.plugins");
|
||||||
|
/**
|
||||||
|
* executes a given command async
|
||||||
|
* @param commandStringArg
|
||||||
|
*/
|
||||||
|
exports.exec = (commandStringArg) => {
|
||||||
|
let done = plugins.smartq.defer();
|
||||||
|
plugins.shelljs.exec(commandStringArg, { async: true }, (code, stdout, stderr) => {
|
||||||
|
done.resolve({
|
||||||
|
exitCode: code,
|
||||||
|
stdout: stdout
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* executes a given command async and silent
|
||||||
|
* @param commandStringArg
|
||||||
|
*/
|
||||||
|
exports.execSilent = (commandStringArg) => {
|
||||||
|
let done = plugins.smartq.defer();
|
||||||
|
plugins.shelljs.exec(commandStringArg, { async: true, silent: true }, (code, stdout, stderr) => {
|
||||||
|
done.resolve({
|
||||||
|
exitCode: code,
|
||||||
|
stdout: stdout
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* executes a command and allws you to stream output
|
||||||
|
*/
|
||||||
|
exports.execStreaming = (commandStringArg) => {
|
||||||
|
let childProcessEnded = plugins.smartq.defer();
|
||||||
|
let execChildProcess = plugins.shelljs.exec(commandStringArg, { async: true, silent: true }, (code, stdout, stderr) => {
|
||||||
|
childProcessEnded.resolve({
|
||||||
|
exitCode: code,
|
||||||
|
stdout: stdout
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
childProcess: execChildProcess,
|
||||||
|
finalPromise: childProcessEnded.promise
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* executes a command and returns promise that will be fullfilled once an putput line matches RegexArg
|
||||||
|
* @param commandStringArg
|
||||||
|
* @param regexArg
|
||||||
|
*/
|
||||||
|
exports.execAndWaitForLine = (commandStringArg, regexArg) => {
|
||||||
|
let done = plugins.smartq.defer();
|
||||||
|
let execStreamingResult = exports.execStreaming(commandStringArg);
|
||||||
|
execStreamingResult.childProcess.stdout.on('data', (stdOutChunk) => {
|
||||||
|
if (regexArg.test(stdOutChunk)) {
|
||||||
|
done.resolve();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* get a path
|
||||||
|
*/
|
||||||
|
exports.which = (cmd) => {
|
||||||
|
let done = plugins.smartq.defer();
|
||||||
|
plugins.which(cmd, (err, path) => {
|
||||||
|
if (err) {
|
||||||
|
done.reject(err);
|
||||||
|
}
|
||||||
|
done.resolve(path);
|
||||||
|
});
|
||||||
|
return done.promise;
|
||||||
|
};
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzaGVsbC53cmFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzaGVsbC53cmFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsZ0RBQStDO0FBc0IvQzs7O0dBR0c7QUFDUSxRQUFBLElBQUksR0FBRyxDQUFDLGdCQUF3QjtJQUN6QyxJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBZSxDQUFBO0lBQzlDLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLGdCQUFnQixFQUFFLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBRSxFQUFFLENBQUMsSUFBSSxFQUFFLE1BQU0sRUFBRSxNQUFNO1FBQzNFLElBQUksQ0FBQyxPQUFPLENBQUM7WUFDWCxRQUFRLEVBQUUsSUFBSTtZQUNkLE1BQU0sRUFBRSxNQUFNO1NBQ2YsQ0FBQyxDQUFBO0lBQ0osQ0FBQ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PLENBQUMsSUFBSSxDQUFDLENBQUE7SUFDcEIsQ0FBQyxDQUFDLENBQUE7SUFDRixNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtBQUNyQixDQUFDLENBQUEifQ==
|
@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"globalNpmTools": [
|
"globalNpmTools": [
|
||||||
"npmts"
|
"npmts",
|
||||||
|
"ts-node"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
16
package.json
16
package.json
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "smartshell",
|
"name": "smartshell",
|
||||||
"version": "1.0.1",
|
"version": "1.0.7",
|
||||||
"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",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(npmts)"
|
"test": "(npmts --notest && ts-node --compilerOptions '{\"target\":\"es6\"}' test/test.ts)"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -22,12 +22,14 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/smartshell#README",
|
"homepage": "https://gitlab.com/pushrocks/smartshell#README",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"smartchai": "^1.0.1",
|
"tapbundle": "^1.0.14"
|
||||||
"typings-test": "^1.0.3"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/shelljs": "^0.6.0",
|
"@types/shelljs": "^0.7.2",
|
||||||
"shelljs": "^0.7.6",
|
"@types/which": "^1.0.28",
|
||||||
"smartq": "^1.1.0"
|
"shelljs": "^0.7.8",
|
||||||
|
"smartq": "^1.1.1",
|
||||||
|
"typings-global": "^1.0.19",
|
||||||
|
"which": "^1.2.14"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
test/test.d.ts
vendored
1
test/test.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
import 'typings-test';
|
|
13
test/test.js
13
test/test.js
@ -1,13 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
require("typings-test");
|
|
||||||
const smartshell = require("../dist/index");
|
|
||||||
describe('smartshell', function () {
|
|
||||||
it('it should run async', function () {
|
|
||||||
this.timeout(1000000);
|
|
||||||
return smartshell.exec('npmdocker speedtest').then((execResult) => {
|
|
||||||
console.log(execResult.stdout);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx3QkFBcUI7QUFHckIsNENBQTJDO0FBRTNDLFFBQVEsQ0FBQyxZQUFZLEVBQUU7SUFDbkIsRUFBRSxDQUFDLHFCQUFxQixFQUFFO1FBQ3RCLElBQUksQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLENBQUE7UUFDckIsTUFBTSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMscUJBQXFCLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxVQUFVO1lBQzFELE9BQU8sQ0FBQyxHQUFHLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxDQUFBO1FBQ2xDLENBQUMsQ0FBQyxDQUFBO0lBQ04sQ0FBQyxDQUFDLENBQUE7QUFDTixDQUFDLENBQUMsQ0FBQSJ9
|
|
56
test/test.ts
56
test/test.ts
@ -1,13 +1,49 @@
|
|||||||
import 'typings-test'
|
import { expect, tap } from 'tapbundle'
|
||||||
import { expect } from 'smartchai'
|
|
||||||
|
|
||||||
import * as smartshell from '../dist/index'
|
import * as smartshell from '../dist/index'
|
||||||
|
import * as smartq from 'smartq'
|
||||||
|
|
||||||
describe('smartshell', function() {
|
let testSmartshell: smartshell.Smartshell
|
||||||
it('it should run async', function() {
|
|
||||||
this.timeout(1000000)
|
tap.test('smartshell should run async', async () => {
|
||||||
return smartshell.exec('npmdocker speedtest').then((execResult) => {
|
let execResult = await smartshell.exec('npm -v')
|
||||||
console.log(execResult.stdout)
|
expect(execResult.stdout).to.match(/[0-9\.]*/)
|
||||||
})
|
})
|
||||||
})
|
|
||||||
})
|
tap.test('smartshell should run async and silent', async () => {
|
||||||
|
let execResult = await smartshell.execSilent('npm -v')
|
||||||
|
expect(execResult.stdout).to.match(/[0-9\.]*/)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('smartshell should stream a shell execution', async () => {
|
||||||
|
let done = smartq.defer()
|
||||||
|
let execStreamingResponse = smartshell.execStreaming('npm -v')
|
||||||
|
execStreamingResponse.childProcess.stdout.on('data', data => {
|
||||||
|
done.resolve(data)
|
||||||
|
})
|
||||||
|
let data = await done.promise
|
||||||
|
expect(data).to.equal('5.0.3\n')
|
||||||
|
await execStreamingResponse.finalPromise
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('it should execute and wait for a line in the output', async () => {
|
||||||
|
await smartshell.execAndWaitForLine('npm -v', /5.0.3/)
|
||||||
|
})
|
||||||
|
|
||||||
|
// Smartshell class
|
||||||
|
|
||||||
|
tap.test('smartshell should create a Smartshell instance', async () => {
|
||||||
|
testSmartshell = new smartshell.Smartshell({
|
||||||
|
executor: 'bash',
|
||||||
|
sourceFilePaths: []
|
||||||
|
})
|
||||||
|
expect(testSmartshell).to.be.instanceof(smartshell.Smartshell)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('smartshell should run async', async () => {
|
||||||
|
return testSmartshell.execSilent('sleep 1 && npm -v').then(async (execResult) => {
|
||||||
|
console.log(execResult.stdout)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.start()
|
||||||
|
@ -1 +1,2 @@
|
|||||||
export * from './smartshell.wrap'
|
export * from './smartshell.wrap'
|
||||||
|
export * from './smartshell.classes.smartshell'
|
||||||
|
@ -4,13 +4,62 @@ import * as smartshellWrap from './smartshell.wrap'
|
|||||||
export type TExecutor = 'sh' | 'bash'
|
export type TExecutor = 'sh' | 'bash'
|
||||||
|
|
||||||
export interface ISmartshellContructorOptions {
|
export interface ISmartshellContructorOptions {
|
||||||
executor: TExecutor
|
executor: TExecutor
|
||||||
sourceFiles: string[]
|
sourceFilePaths: string[]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Smartshell {
|
export class Smartshell {
|
||||||
constructor() {
|
executor: TExecutor
|
||||||
|
sourceFileArray: string[] = []
|
||||||
|
constructor (optionsArg: ISmartshellContructorOptions) {
|
||||||
|
this.executor = optionsArg.executor
|
||||||
|
for (let sourceFilePath of optionsArg.sourceFilePaths) {
|
||||||
|
this.sourceFileArray.push(sourceFilePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addSourceFiles (sourceFilePathsArray: string[]) {
|
||||||
|
for (let sourceFilePath of sourceFilePathsArray) {
|
||||||
|
this.sourceFileArray.push(sourceFilePath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanSourceFiles () {
|
||||||
|
this.sourceFileArray = []
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* executes silently and returns IExecResult
|
||||||
|
* @param commandArg
|
||||||
|
*/
|
||||||
|
async execSilent (commandArg: string) {
|
||||||
|
let execCommand = this.createExecString(commandArg)
|
||||||
|
return await smartshellWrap.execSilent(execCommand)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* executes and returns IExecResult
|
||||||
|
* @param commandArg
|
||||||
|
*/
|
||||||
|
async exec (commandArg: string) {
|
||||||
|
let execCommand = this.createExecString(commandArg)
|
||||||
|
return await smartshellWrap.exec(execCommand)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* creates the final sourcing string
|
||||||
|
* @param commandArg
|
||||||
|
*/
|
||||||
|
private createExecString (commandArg): string {
|
||||||
|
if (this.executor === 'bash') {
|
||||||
|
let sourceString = ''
|
||||||
|
for (let sourceFilePath of this.sourceFileArray) {
|
||||||
|
sourceString = sourceString + `source ${sourceFilePath} && `
|
||||||
|
}
|
||||||
|
return `bash -c '${sourceString} ${commandArg}'`
|
||||||
|
} else {
|
||||||
|
return commandArg
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
import * as shelljs from 'shelljs'
|
import * as shelljs from 'shelljs'
|
||||||
import * as smartq from 'smartq'
|
import * as smartq from 'smartq'
|
||||||
|
import * as which from 'which'
|
||||||
|
|
||||||
export {
|
export {
|
||||||
shelljs,
|
shelljs,
|
||||||
smartq
|
smartq,
|
||||||
}
|
which
|
||||||
|
}
|
||||||
|
@ -1,13 +1,32 @@
|
|||||||
import * as plugins from './smartshell.plugins'
|
import * as plugins from './smartshell.plugins'
|
||||||
|
|
||||||
|
// interfaces
|
||||||
|
import { ChildProcess } from 'child_process'
|
||||||
|
import { Deferred } from 'smartq'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* interface for ExecResult
|
||||||
|
*/
|
||||||
export interface IExecResult {
|
export interface IExecResult {
|
||||||
exitCode: number,
|
exitCode: number,
|
||||||
stdout: string
|
stdout: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* interface for streaming ExecResult
|
||||||
|
*/
|
||||||
|
export interface IExecResultStreaming {
|
||||||
|
childProcess: ChildProcess,
|
||||||
|
finalPromise: Promise<IExecResult>
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* executes a given command async
|
||||||
|
* @param commandStringArg
|
||||||
|
*/
|
||||||
export let exec = (commandStringArg: string): Promise<IExecResult> => {
|
export let exec = (commandStringArg: string): Promise<IExecResult> => {
|
||||||
let done = plugins.smartq.defer<IExecResult>()
|
let done = plugins.smartq.defer<IExecResult>()
|
||||||
plugins.shelljs.exec(commandStringArg,{async: true}, (code, stdout, stderr) => {
|
plugins.shelljs.exec(commandStringArg, { async: true }, (code, stdout, stderr) => {
|
||||||
done.resolve({
|
done.resolve({
|
||||||
exitCode: code,
|
exitCode: code,
|
||||||
stdout: stdout
|
stdout: stdout
|
||||||
@ -16,9 +35,13 @@ export let exec = (commandStringArg: string): Promise<IExecResult> => {
|
|||||||
return done.promise
|
return done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* executes a given command async and silent
|
||||||
|
* @param commandStringArg
|
||||||
|
*/
|
||||||
export let execSilent = (commandStringArg: string) => {
|
export let execSilent = (commandStringArg: string) => {
|
||||||
let done = plugins.smartq.defer<IExecResult>()
|
let done = plugins.smartq.defer<IExecResult>()
|
||||||
plugins.shelljs.exec(commandStringArg,{async: true, silent: true}, (code, stdout, stderr) => {
|
plugins.shelljs.exec(commandStringArg, { async: true, silent: true }, (code, stdout, stderr) => {
|
||||||
done.resolve({
|
done.resolve({
|
||||||
exitCode: code,
|
exitCode: code,
|
||||||
stdout: stdout
|
stdout: stdout
|
||||||
@ -26,3 +49,50 @@ export let execSilent = (commandStringArg: string) => {
|
|||||||
})
|
})
|
||||||
return done.promise
|
return done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* executes a command and allws you to stream output
|
||||||
|
*/
|
||||||
|
export let execStreaming = (commandStringArg: string) => {
|
||||||
|
let childProcessEnded = plugins.smartq.defer<IExecResult>()
|
||||||
|
let execChildProcess = plugins.shelljs.exec(commandStringArg, {async: true, silent: true}, (code, stdout, stderr) => {
|
||||||
|
childProcessEnded.resolve({
|
||||||
|
exitCode: code,
|
||||||
|
stdout: stdout
|
||||||
|
})
|
||||||
|
})
|
||||||
|
return {
|
||||||
|
childProcess: execChildProcess,
|
||||||
|
finalPromise: childProcessEnded.promise
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* executes a command and returns promise that will be fullfilled once an putput line matches RegexArg
|
||||||
|
* @param commandStringArg
|
||||||
|
* @param regexArg
|
||||||
|
*/
|
||||||
|
export let execAndWaitForLine = (commandStringArg: string, regexArg: RegExp) => {
|
||||||
|
let done = plugins.smartq.defer()
|
||||||
|
let execStreamingResult = execStreaming(commandStringArg)
|
||||||
|
execStreamingResult.childProcess.stdout.on('data', (stdOutChunk: string) => {
|
||||||
|
if (regexArg.test(stdOutChunk)) {
|
||||||
|
done.resolve()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return done.promise
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get a path
|
||||||
|
*/
|
||||||
|
export let which = (cmd: string): Promise<string> => {
|
||||||
|
let done = plugins.smartq.defer()
|
||||||
|
plugins.which(cmd, (err, path: string) => {
|
||||||
|
if (err) {
|
||||||
|
done.reject(err)
|
||||||
|
}
|
||||||
|
done.resolve(path)
|
||||||
|
})
|
||||||
|
return done.promise
|
||||||
|
}
|
||||||
|
3
tslint.json
Normal file
3
tslint.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"extends": "tslint-config-standard"
|
||||||
|
}
|
181
yarn.lock
181
yarn.lock
@ -16,16 +16,12 @@
|
|||||||
"@types/chai" "*"
|
"@types/chai" "*"
|
||||||
|
|
||||||
"@types/chai@*", "@types/chai@^3.4.35":
|
"@types/chai@*", "@types/chai@^3.4.35":
|
||||||
version "3.4.35"
|
version "3.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.4.35.tgz#e8d65f83492d2944f816fc620741821c28a8c900"
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
||||||
|
|
||||||
"@types/mocha@^2.2.31":
|
|
||||||
version "2.2.39"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.39.tgz#f68d63db8b69c38e9558b4073525cf96c4f7a829"
|
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "7.0.5"
|
version "8.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.5.tgz#96a0f0a618b7b606f1ec547403c00650210bfbb7"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.1.tgz#89c271e0c3b9ebb6a3756dd601336970b6228b77"
|
||||||
|
|
||||||
"@types/promises-a-plus@*":
|
"@types/promises-a-plus@*":
|
||||||
version "0.0.27"
|
version "0.0.27"
|
||||||
@ -37,19 +33,44 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/shelljs@^0.7.2":
|
||||||
|
version "0.7.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.2.tgz#c2bdb3fe80cd7a3da08750ca898ae44c589671f3"
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/which@^1.0.28":
|
||||||
|
version "1.0.28"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
|
||||||
|
|
||||||
|
ansi-256-colors@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
|
||||||
|
|
||||||
assertion-error@^1.0.1:
|
assertion-error@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
||||||
|
|
||||||
balanced-match@^0.4.1:
|
balanced-match@^1.0.0:
|
||||||
version "0.4.2"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||||
|
|
||||||
brace-expansion@^1.0.0:
|
beautycolor@^1.0.7:
|
||||||
version "1.1.6"
|
version "1.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
|
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.7.tgz#a4715738ac4c8221371e9cbeb5a6cc6d11ecbf7c"
|
||||||
dependencies:
|
dependencies:
|
||||||
balanced-match "^0.4.1"
|
ansi-256-colors "^1.1.0"
|
||||||
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
|
bindings@^1.2.1:
|
||||||
|
version "1.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
||||||
|
|
||||||
|
brace-expansion@^1.1.7:
|
||||||
|
version "1.1.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
||||||
|
dependencies:
|
||||||
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
chai-as-promised@^6.0.0:
|
chai-as-promised@^6.0.0:
|
||||||
@ -59,8 +80,8 @@ chai-as-promised@^6.0.0:
|
|||||||
check-error "^1.0.2"
|
check-error "^1.0.2"
|
||||||
|
|
||||||
chai-string@^1.3.0:
|
chai-string@^1.3.0:
|
||||||
version "1.3.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7"
|
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
|
||||||
|
|
||||||
chai@^3.5.0:
|
chai@^3.5.0:
|
||||||
version "3.5.0"
|
version "3.5.0"
|
||||||
@ -84,18 +105,30 @@ deep-eql@^0.1.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
type-detect "0.1.1"
|
type-detect "0.1.1"
|
||||||
|
|
||||||
|
early@^2.1.1:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
||||||
|
dependencies:
|
||||||
|
beautycolor "^1.0.7"
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
|
es6-error@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
|
||||||
|
|
||||||
fs.realpath@^1.0.0:
|
fs.realpath@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
|
|
||||||
glob@^7.0.0:
|
glob@^7.0.0:
|
||||||
version "7.1.1"
|
version "7.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||||
dependencies:
|
dependencies:
|
||||||
fs.realpath "^1.0.0"
|
fs.realpath "^1.0.0"
|
||||||
inflight "^1.0.4"
|
inflight "^1.0.4"
|
||||||
inherits "2"
|
inherits "2"
|
||||||
minimatch "^3.0.2"
|
minimatch "^3.0.4"
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
@ -111,14 +144,47 @@ inherits@2:
|
|||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
|
|
||||||
interpret@^1.0.0:
|
interpret@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
|
||||||
|
|
||||||
minimatch@^3.0.2:
|
isexe@^2.0.0:
|
||||||
version "3.0.3"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
|
|
||||||
|
leakage@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.0.0"
|
es6-error "^4.0.2"
|
||||||
|
left-pad "^1.1.3"
|
||||||
|
memwatch-next "^0.3.0"
|
||||||
|
minimist "^1.2.0"
|
||||||
|
pretty-bytes "^4.0.2"
|
||||||
|
|
||||||
|
left-pad@^1.1.3:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
|
||||||
|
|
||||||
|
memwatch-next@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
|
||||||
|
dependencies:
|
||||||
|
bindings "^1.2.1"
|
||||||
|
nan "^2.3.2"
|
||||||
|
|
||||||
|
minimatch@^3.0.4:
|
||||||
|
version "3.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
|
dependencies:
|
||||||
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
|
minimist@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||||
|
|
||||||
|
nan@^2.3.2:
|
||||||
|
version "2.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
||||||
|
|
||||||
once@^1.3.0:
|
once@^1.3.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
@ -134,6 +200,10 @@ path-parse@^1.0.5:
|
|||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
|
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
|
||||||
|
|
||||||
|
pretty-bytes@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
||||||
|
|
||||||
rechoir@^0.6.2:
|
rechoir@^0.6.2:
|
||||||
version "0.6.2"
|
version "0.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||||
@ -141,8 +211,8 @@ rechoir@^0.6.2:
|
|||||||
resolve "^1.1.6"
|
resolve "^1.1.6"
|
||||||
|
|
||||||
resolve@^1.1.6:
|
resolve@^1.1.6:
|
||||||
version "1.3.2"
|
version "1.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
|
||||||
dependencies:
|
dependencies:
|
||||||
path-parse "^1.0.5"
|
path-parse "^1.0.5"
|
||||||
|
|
||||||
@ -150,15 +220,15 @@ semver@^5.3.0:
|
|||||||
version "5.3.0"
|
version "5.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
||||||
|
|
||||||
shelljs@^0.7.4, shelljs@^0.7.6:
|
shelljs@^0.7.6, shelljs@^0.7.8:
|
||||||
version "0.7.6"
|
version "0.7.8"
|
||||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
|
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.0.0"
|
glob "^7.0.0"
|
||||||
interpret "^1.0.0"
|
interpret "^1.0.0"
|
||||||
rechoir "^0.6.2"
|
rechoir "^0.6.2"
|
||||||
|
|
||||||
smartchai@^1.0.1:
|
smartchai@^1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
|
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -169,13 +239,41 @@ smartchai@^1.0.1:
|
|||||||
chai-as-promised "^6.0.0"
|
chai-as-promised "^6.0.0"
|
||||||
chai-string "^1.3.0"
|
chai-string "^1.3.0"
|
||||||
|
|
||||||
smartq@^1.1.0:
|
smartdelay@^1.0.3:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
|
||||||
|
dependencies:
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
|
smartq@^1.1.0, smartq@^1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
||||||
dependencies:
|
dependencies:
|
||||||
typed-promisify "^0.3.0"
|
typed-promisify "^0.3.0"
|
||||||
typings-global "^1.0.14"
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
|
smartshell@^1.0.6:
|
||||||
|
version "1.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.6.tgz#27b1c79029784abe72ac7e91fe698b7ebecc6629"
|
||||||
|
dependencies:
|
||||||
|
"@types/shelljs" "^0.6.0"
|
||||||
|
"@types/which" "^1.0.28"
|
||||||
|
shelljs "^0.7.6"
|
||||||
|
smartq "^1.1.0"
|
||||||
|
which "^1.2.12"
|
||||||
|
|
||||||
|
tapbundle@^1.0.14:
|
||||||
|
version "1.0.14"
|
||||||
|
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.0.14.tgz#75827e335fcb02216f0267a26a26d702ddc02e3c"
|
||||||
|
dependencies:
|
||||||
|
early "^2.1.1"
|
||||||
|
leakage "^0.3.0"
|
||||||
|
smartchai "^1.0.3"
|
||||||
|
smartdelay "^1.0.3"
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
type-detect@0.1.1:
|
type-detect@0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
|
||||||
@ -188,19 +286,18 @@ typed-promisify@^0.3.0:
|
|||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
|
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
|
||||||
|
|
||||||
typings-global@*, typings-global@^1.0.14:
|
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19:
|
||||||
version "1.0.14"
|
version "1.0.19"
|
||||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.14.tgz#ab682720a03d6b9278869fb5c30c30d7dc61d12c"
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.19.tgz#3376a72d4de1e5541bf5702248ff64c3e6ea316c"
|
||||||
dependencies:
|
dependencies:
|
||||||
semver "^5.3.0"
|
semver "^5.3.0"
|
||||||
shelljs "^0.7.4"
|
smartshell "^1.0.6"
|
||||||
|
|
||||||
typings-test@^1.0.3:
|
which@^1.2.12, which@^1.2.14:
|
||||||
version "1.0.3"
|
version "1.2.14"
|
||||||
resolved "https://registry.yarnpkg.com/typings-test/-/typings-test-1.0.3.tgz#fbab895eb3f0c44842e73db059f65946b971e369"
|
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/mocha" "^2.2.31"
|
isexe "^2.0.0"
|
||||||
typings-global "*"
|
|
||||||
|
|
||||||
wrappy@1:
|
wrappy@1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
Reference in New Issue
Block a user