Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
897a46e12d | |||
64219f8f09 | |||
42c6c1eec5 | |||
ef3ca28a66 | |||
3beff3320c | |||
0343287775 | |||
e4180022b1 | |||
7909bd1a38 | |||
495c3afdc3 | |||
73ad2d6193 | |||
f5ffb7fc67 | |||
36364bb490 | |||
52f8fd2469 | |||
65dda3bcf1 | |||
d29dcc5a1c | |||
d22e0cde8f | |||
c8a21e8228 | |||
72bb3f33ac | |||
7694cc9c08 | |||
679c870229 | |||
30bc489822 | |||
5493d3cd5d | |||
bd50c122eb | |||
51f9d76a64 | |||
c2f809f9cf | |||
9f311984ac | |||
7515ecf9ce |
7
dist/smartfile.classes.smartfile.d.ts
vendored
7
dist/smartfile.classes.smartfile.d.ts
vendored
@ -1,4 +1,5 @@
|
|||||||
/// <reference types="node" />
|
/// <reference types="node" />
|
||||||
|
import * as plugins from './smartfile.plugins';
|
||||||
export interface ISmartfileConstructorOptions {
|
export interface ISmartfileConstructorOptions {
|
||||||
path?: string;
|
path?: string;
|
||||||
contentString?: string;
|
contentString?: string;
|
||||||
@ -14,12 +15,17 @@ export declare class Smartfile {
|
|||||||
* the full path of the file on disk
|
* the full path of the file on disk
|
||||||
*/
|
*/
|
||||||
path: string;
|
path: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
parsedPath: plugins.path.ParsedPath;
|
||||||
/**
|
/**
|
||||||
* the content of the file as Buffer
|
* the content of the file as Buffer
|
||||||
*/
|
*/
|
||||||
contentBuffer: Buffer;
|
contentBuffer: Buffer;
|
||||||
/**
|
/**
|
||||||
* The current working directory of the file
|
* The current working directory of the file
|
||||||
|
* Note:this is similar to gulp and different from native node path base
|
||||||
*/
|
*/
|
||||||
base: string;
|
base: string;
|
||||||
/**
|
/**
|
||||||
@ -67,4 +73,5 @@ export declare class Smartfile {
|
|||||||
isDirectory(): boolean;
|
isDirectory(): boolean;
|
||||||
isStream(): boolean;
|
isStream(): boolean;
|
||||||
isSymbolic(): boolean;
|
isSymbolic(): boolean;
|
||||||
|
updateFileName(fileNameArg: string): void;
|
||||||
}
|
}
|
||||||
|
8
dist/smartfile.classes.smartfile.js
vendored
8
dist/smartfile.classes.smartfile.js
vendored
@ -29,6 +29,7 @@ class Smartfile {
|
|||||||
console.log('created empty Smartfile?');
|
console.log('created empty Smartfile?');
|
||||||
}
|
}
|
||||||
this.path = optionsArg.path;
|
this.path = optionsArg.path;
|
||||||
|
this.parsedPath = plugins.path.parse(this.path);
|
||||||
this.base = optionsArg.base;
|
this.base = optionsArg.base;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -103,6 +104,11 @@ class Smartfile {
|
|||||||
isSymbolic() {
|
isSymbolic() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// update things
|
||||||
|
updateFileName(fileNameArg) {
|
||||||
|
let oldFileName = this.parsedPath.base;
|
||||||
|
this.path = this.path.replace(new RegExp(oldFileName + '$'), fileNameArg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
exports.Smartfile = Smartfile;
|
exports.Smartfile = Smartfile;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwrQ0FBOEM7QUFTOUM7OztHQUdHO0FBQ0g7SUFxQkU7OztPQUdHO0lBQ0gsWUFBYSxVQUF3QztRQUNuRCxFQUFFLENBQUMsQ0FBQyxVQUFVLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztZQUM3QixJQUFJLENBQUMsYUFBYSxHQUFHLFVBQVUsQ0FBQyxhQUFhLENBQUE7UUFDL0MsQ0FBQztRQUFDLElBQUksQ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8sQ0FBQyxJQUFJLE1BQU0sQ0FBQyxXQUFXLEdBQUcsR0FBRyxDQUFDLEVBQUMsV0FBVyxDQUFDLENBQUE7SUFDMUUsQ0FBQztDQUNGO0FBcElELDhCQW9JQyJ9
|
26
dist/smartfile.fs.js
vendored
26
dist/smartfile.fs.js
vendored
File diff suppressed because one or more lines are too long
46
dist/smartfile.memory.d.ts
vendored
46
dist/smartfile.memory.d.ts
vendored
@ -1,10 +1,5 @@
|
|||||||
/// <reference types="node" />
|
|
||||||
import 'typings-global';
|
import 'typings-global';
|
||||||
export interface IVinylFile {
|
import { Smartfile } from './smartfile.classes.smartfile';
|
||||||
contents: Buffer;
|
|
||||||
base: string;
|
|
||||||
path: string;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* converts file to Object
|
* converts file to Object
|
||||||
* @param fileStringArg
|
* @param fileStringArg
|
||||||
@ -12,35 +7,20 @@ export interface IVinylFile {
|
|||||||
* @returns {any|any}
|
* @returns {any|any}
|
||||||
*/
|
*/
|
||||||
export declare let toObject: (fileStringArg: string, fileTypeArg: string) => any;
|
export declare let toObject: (fileStringArg: string, fileTypeArg: string) => any;
|
||||||
|
export interface IToFsOptions {
|
||||||
|
respectRelative?: boolean;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* takes a string and converts it to vinyl file
|
* writes string or Smartfile to disk.
|
||||||
* @param fileArg
|
|
||||||
* @param optionsArg
|
|
||||||
*/
|
|
||||||
export declare let toVinylFileSync: (fileArg: string, optionsArg?: {
|
|
||||||
filename?: string;
|
|
||||||
base?: string;
|
|
||||||
relPath?: string;
|
|
||||||
}) => any;
|
|
||||||
/**
|
|
||||||
* takes a string array and some options and returns a vinylfile array
|
|
||||||
* @param arrayArg
|
|
||||||
* @param optionsArg
|
|
||||||
*/
|
|
||||||
export declare let toVinylArraySync: (arrayArg: string[], optionsArg?: {
|
|
||||||
filename?: string;
|
|
||||||
base?: string;
|
|
||||||
relPath?: string;
|
|
||||||
}) => any[];
|
|
||||||
/**
|
|
||||||
* takes a vinylFile object and converts it to String
|
|
||||||
*/
|
|
||||||
export declare let vinylToStringSync: (fileArg: IVinylFile) => string;
|
|
||||||
/**
|
|
||||||
* writes string or vinyl file to disk.
|
|
||||||
* @param fileArg
|
* @param fileArg
|
||||||
* @param fileNameArg
|
* @param fileNameArg
|
||||||
* @param fileBaseArg
|
* @param fileBaseArg
|
||||||
*/
|
*/
|
||||||
export declare let toFs: (fileContentArg: string | IVinylFile, filePathArg: any) => Promise<{}>;
|
export declare let toFs: (fileContentArg: string | Smartfile, filePathArg: any, optionsArg?: IToFsOptions) => Promise<{}>;
|
||||||
export declare let toFsSync: (fileArg: any, filePathArg: string) => void;
|
/**
|
||||||
|
* writes a string or a Smartfile to disk synchronously, only supports string
|
||||||
|
* @param fileArg
|
||||||
|
* @param filePathArg
|
||||||
|
*/
|
||||||
|
export declare let toFsSync: (fileArg: string, filePathArg: string) => void;
|
||||||
|
export declare let smartfileArrayToFs: (smartfileArrayArg: Smartfile[], dirArg: string) => Promise<void>;
|
||||||
|
91
dist/smartfile.memory.js
vendored
91
dist/smartfile.memory.js
vendored
@ -1,9 +1,18 @@
|
|||||||
"use strict";
|
"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 });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
const plugins = require("./smartfile.plugins");
|
const plugins = require("./smartfile.plugins");
|
||||||
|
const smartfile_classes_smartfile_1 = require("./smartfile.classes.smartfile");
|
||||||
|
const smartfileFs = require("./smartfile.fs");
|
||||||
const SmartfileInterpreter = require("./smartfile.interpreter");
|
const SmartfileInterpreter = require("./smartfile.interpreter");
|
||||||
let vinyl = require('vinyl');
|
|
||||||
/**
|
/**
|
||||||
* converts file to Object
|
* converts file to Object
|
||||||
* @param fileStringArg
|
* @param fileStringArg
|
||||||
@ -14,66 +23,44 @@ exports.toObject = function (fileStringArg, fileTypeArg) {
|
|||||||
return SmartfileInterpreter.objectFile(fileStringArg, fileTypeArg);
|
return SmartfileInterpreter.objectFile(fileStringArg, fileTypeArg);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* takes a string and converts it to vinyl file
|
* writes string or Smartfile to disk.
|
||||||
* @param fileArg
|
|
||||||
* @param optionsArg
|
|
||||||
*/
|
|
||||||
exports.toVinylFileSync = function (fileArg, optionsArg) {
|
|
||||||
optionsArg ? void (0) : optionsArg = { filename: 'vinylfile', base: '/' };
|
|
||||||
optionsArg.filename ? void (0) : optionsArg.filename = 'vinylfile';
|
|
||||||
optionsArg.base ? void (0) : optionsArg.base = '/';
|
|
||||||
optionsArg.relPath ? void ('0') : optionsArg.relPath = '';
|
|
||||||
let vinylFile = new vinyl({
|
|
||||||
base: optionsArg.base,
|
|
||||||
path: plugins.path.join(optionsArg.base, optionsArg.relPath, optionsArg.filename),
|
|
||||||
contents: new Buffer(fileArg)
|
|
||||||
});
|
|
||||||
return vinylFile;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* takes a string array and some options and returns a vinylfile array
|
|
||||||
* @param arrayArg
|
|
||||||
* @param optionsArg
|
|
||||||
*/
|
|
||||||
exports.toVinylArraySync = function (arrayArg, optionsArg) {
|
|
||||||
let vinylArray = [];
|
|
||||||
for (let stringIndexArg in arrayArg) {
|
|
||||||
let myString = arrayArg[stringIndexArg];
|
|
||||||
vinylArray.push(exports.toVinylFileSync(myString, optionsArg));
|
|
||||||
}
|
|
||||||
return vinylArray;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* takes a vinylFile object and converts it to String
|
|
||||||
*/
|
|
||||||
exports.vinylToStringSync = function (fileArg) {
|
|
||||||
return fileArg.contents.toString('utf8');
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* writes string or vinyl file to disk.
|
|
||||||
* @param fileArg
|
* @param fileArg
|
||||||
* @param fileNameArg
|
* @param fileNameArg
|
||||||
* @param fileBaseArg
|
* @param fileBaseArg
|
||||||
*/
|
*/
|
||||||
exports.toFs = function (fileContentArg, filePathArg) {
|
exports.toFs = (fileContentArg, filePathArg, optionsArg = {}) => __awaiter(this, void 0, void 0, function* () {
|
||||||
let done = plugins.q.defer();
|
let done = plugins.q.defer();
|
||||||
// function checks to abort if needed
|
// check args
|
||||||
if (!fileContentArg || !filePathArg) {
|
if (!fileContentArg || !filePathArg) {
|
||||||
throw new Error('expected valid arguments');
|
throw new Error('expected valid arguments');
|
||||||
}
|
}
|
||||||
// prepare actual write action
|
// prepare actual write action
|
||||||
let fileString;
|
let fileString;
|
||||||
let filePath = filePathArg;
|
let filePath = filePathArg;
|
||||||
if (vinyl.isVinyl(fileContentArg)) {
|
// handle Smartfile
|
||||||
|
if (fileContentArg instanceof smartfile_classes_smartfile_1.Smartfile) {
|
||||||
let fileContentArg2 = fileContentArg;
|
let fileContentArg2 = fileContentArg;
|
||||||
fileString = exports.vinylToStringSync(fileContentArg2);
|
fileString = fileContentArg.contentBuffer.toString();
|
||||||
|
// handle options
|
||||||
|
if (optionsArg.respectRelative) {
|
||||||
|
filePath = plugins.path.join(filePath, fileContentArg.path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (typeof fileContentArg === 'string') {
|
else if (typeof fileContentArg === 'string') {
|
||||||
fileString = fileContentArg;
|
fileString = fileContentArg;
|
||||||
}
|
}
|
||||||
plugins.fsExtra.writeFile(filePath, fileString, 'utf8', done.resolve);
|
else {
|
||||||
return done.promise;
|
throw new Error('fileContent is neither string nor Smartfile');
|
||||||
};
|
}
|
||||||
|
yield smartfileFs.ensureDir(plugins.path.parse(filePath).dir);
|
||||||
|
plugins.fsExtra.writeFile(filePath, fileString, { encoding: 'utf8' }, done.resolve);
|
||||||
|
return yield done.promise;
|
||||||
|
});
|
||||||
|
/**
|
||||||
|
* writes a string or a Smartfile to disk synchronously, only supports string
|
||||||
|
* @param fileArg
|
||||||
|
* @param filePathArg
|
||||||
|
*/
|
||||||
exports.toFsSync = function (fileArg, filePathArg) {
|
exports.toFsSync = function (fileArg, filePathArg) {
|
||||||
// function checks to abort if needed
|
// function checks to abort if needed
|
||||||
if (!fileArg || !filePathArg) {
|
if (!fileArg || !filePathArg) {
|
||||||
@ -83,11 +70,19 @@ exports.toFsSync = function (fileArg, filePathArg) {
|
|||||||
let fileString;
|
let fileString;
|
||||||
let filePath = filePathArg;
|
let filePath = filePathArg;
|
||||||
if (typeof fileArg !== 'string') {
|
if (typeof fileArg !== 'string') {
|
||||||
fileString = exports.vinylToStringSync(fileArg);
|
throw new Error('fileArg is not of type String.');
|
||||||
}
|
}
|
||||||
else if (typeof fileArg === 'string') {
|
else if (typeof fileArg === 'string') {
|
||||||
fileString = fileArg;
|
fileString = fileArg;
|
||||||
}
|
}
|
||||||
plugins.fsExtra.writeFileSync(filePath, fileString, 'utf8');
|
plugins.fsExtra.writeFileSync(filePath, fileString, { encoding: 'utf8' });
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLm1lbW9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZmlsZS5tZW1vcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwQkFBdUI7QUFFdkIsK0NBQStDO0FBQy9DLGdFQUFnRTtBQUNoRSxJQUFJLEtBQUssR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLENBQ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T0FBTyxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUM7UUFDdkMsVUFBVSxHQUFHLE9BQU8sQ0FBQTtJQUN0QixDQUFDO0lBQ0QsT0FBTyxDQUFDLE9BQU8sQ0FBQyxhQUFhLENBQUMsUUFBUSxFQUFFLFVBQVUsRUFBRSxNQUFNLENBQUMsQ0FBQTtBQUM3RCxDQUFDLENBQUEifQ==
|
exports.smartfileArrayToFs = (smartfileArrayArg, dirArg) => __awaiter(this, void 0, void 0, function* () {
|
||||||
|
yield smartfileFs.ensureDir(dirArg);
|
||||||
|
for (let smartfile of smartfileArrayArg) {
|
||||||
|
yield exports.toFs(smartfile, dirArg, {
|
||||||
|
respectRelative: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLm1lbW9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZmlsZS5tZW1vcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDBCQUF1QjtBQUV2QiwrQ0FBK0M7QUFDL0MsK0VBQXlEO0FBQ3pELDhDQUE2QztBQUc3QyxnRUFBZ0U7QUFFaEU7Ozs7O0dBS0c7QUFDUSxRQUFBLFFBQVEsR0FBRyxVQUFVLGFBQXFCLEVBQUUsV0FBbUI7SUFDeEUsTUFBTSxDQUFDLG9CQUFvQixDQUFDLFVBQVUsQ0FBQyxhQUFhLEVBQUUsV0FBVyxDQUFDLENBQUE7QUFDcEUsQ0FBQyxDQUFBO0FBTUQ7Ozs7O0dBS0c7QUFDUSxRQUFBLElBQUksR0FBRyxDQUFPLGNBQWtDLEVBQUUsV0FBVyxFQUFFLGFBQTJCLEVBQUU7SUFDckcsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQU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EIsRUFBRSxNQUFjO0lBQ25GLE1BQU0sV0FBVyxDQUFDLFNBQVMsQ0FBQyxNQUFNLENBQUMsQ0FBQTtJQUNuQyxHQUFHLENBQUMsQ0FBQyxJQUFJLFNBQVMsSUFBSSxpQkFBaUIsQ0FBQyxDQUFDLENBQUM7UUFDeEMsTUFBTSxZQUFJLENBQUMsU0FBUyxFQUFFLE1BQU0sRUFBRTtZQUM1QixlQUFlLEVBQUUsSUFBSTtTQUN0QixDQUFDLENBQUE7SUFDSixDQUFDO0FBQ0gsQ0FBQyxDQUFBLENBQUEifQ==
|
@ -11,4 +11,4 @@
|
|||||||
"npmts"
|
"npmts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19
package.json
19
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartfile",
|
"name": "smartfile",
|
||||||
"version": "4.2.7",
|
"version": "4.2.20",
|
||||||
"description": "offers smart ways to work with files in nodejs",
|
"description": "offers smart ways to work with files in nodejs",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
@ -26,21 +26,20 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/smartfile",
|
"homepage": "https://gitlab.com/pushrocks/smartfile",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/fs-extra": "2.x.x",
|
"@types/fs-extra": "4.x.x",
|
||||||
"@types/vinyl": "^2.0.0",
|
"@types/vinyl": "^2.0.0",
|
||||||
"fs-extra": "^3.0.0",
|
"fs-extra": "^4.0.0",
|
||||||
"glob": "^7.1.1",
|
"glob": "^7.1.2",
|
||||||
"js-yaml": "^3.8.3",
|
"js-yaml": "^3.9.1",
|
||||||
"require-reload": "0.2.2",
|
"require-reload": "0.2.2",
|
||||||
"smartpath": "^3.2.8",
|
"smartpath": "^3.2.8",
|
||||||
"smartq": "^1.1.1",
|
"smartq": "^1.1.6",
|
||||||
"smartrequest": "^1.0.4",
|
"smartrequest": "^1.0.6",
|
||||||
"typings-global": "^1.0.16",
|
"typings-global": "^1.0.20",
|
||||||
"vinyl": "^2.0.2",
|
|
||||||
"vinyl-file": "^3.0.0"
|
"vinyl-file": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"gulp-function": "^2.2.9",
|
"gulp-function": "^2.2.9",
|
||||||
"tapbundle": "^1.0.10"
|
"tapbundle": "^1.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
55
test/test.ts
55
test/test.ts
@ -1,10 +1,8 @@
|
|||||||
import * as smartfile from '../dist/index'
|
import * as smartfile from '../ts/index'
|
||||||
import path = require('path')
|
import path = require('path')
|
||||||
|
|
||||||
import { expect, tap } from 'tapbundle'
|
import { expect, tap } from 'tapbundle'
|
||||||
|
|
||||||
import * as vinyl from 'vinyl'
|
|
||||||
|
|
||||||
// ---------------------------
|
// ---------------------------
|
||||||
// smartfile.fs
|
// smartfile.fs
|
||||||
// ---------------------------
|
// ---------------------------
|
||||||
@ -53,8 +51,8 @@ tap.test('.fs.listFileTree() -> should get a file tree', async () => {
|
|||||||
|
|
||||||
tap.test('.fs.fileTreeToObject -> should read a file tree into an Object', async () => {
|
tap.test('.fs.fileTreeToObject -> should read a file tree into an Object', async () => {
|
||||||
let fileArrayArg = await smartfile.fs.fileTreeToObject(path.resolve('./test/'), '**/*.txt')
|
let fileArrayArg = await smartfile.fs.fileTreeToObject(path.resolve('./test/'), '**/*.txt')
|
||||||
expect(fileArrayArg[0].contents.toString()).to.not.be.null
|
expect(fileArrayArg[ 0 ]).to.be.instanceof(smartfile.Smartfile)
|
||||||
// expect(fileArrayArg[1]).to.be.instanceof(smartfile.Smartfile)
|
expect(fileArrayArg[ 0 ].contents.toString()).to.equal(fileArrayArg[ 0 ].contentBuffer.toString())
|
||||||
})
|
})
|
||||||
|
|
||||||
tap.test('.fs.copy() -> should copy a directory', async () => {
|
tap.test('.fs.copy() -> should copy a directory', async () => {
|
||||||
@ -117,11 +115,6 @@ tap.test('.fs.toStringSync() -> should read a file to a string', async () => {
|
|||||||
.to.equal('Some TestString &&%$')
|
.to.equal('Some TestString &&%$')
|
||||||
})
|
})
|
||||||
|
|
||||||
tap.test('.fs.toVinylSync -> should read an ' + '.json OR .yaml' + ' file to an ' + 'vinyl file object', async () => {
|
|
||||||
let testData = smartfile.fs.toVinylSync('./test/mytest.json')
|
|
||||||
expect(vinyl.isVinyl(testData)).to.be.true
|
|
||||||
})
|
|
||||||
|
|
||||||
// ---------------------------
|
// ---------------------------
|
||||||
// smartfile.interpreter
|
// smartfile.interpreter
|
||||||
// ---------------------------
|
// ---------------------------
|
||||||
@ -134,32 +127,6 @@ tap.test('.interpreter.filetype() -> should get the file type from a string', as
|
|||||||
// smartfile.memory
|
// smartfile.memory
|
||||||
// ---------------------------
|
// ---------------------------
|
||||||
|
|
||||||
tap.test('.memory.toVinylFileSync() -> should produce a vinylFile', async () => {
|
|
||||||
let localString = 'myString'
|
|
||||||
let localOptions = { filename: 'vinylfile2', base: '/someDir' }
|
|
||||||
expect(smartfile.memory.toVinylFileSync(localString, localOptions) instanceof vinyl).to.be.true
|
|
||||||
})
|
|
||||||
|
|
||||||
tap.test('.memory.toVinylArraySync() -> should produce a an array of vinylfiles', async () => {
|
|
||||||
let localStringArray = [ 'string1', 'string2', 'string3' ]
|
|
||||||
let localOptions = { filename: 'vinylfile2', base: '/someDir' }
|
|
||||||
let testResult = smartfile.memory.toVinylArraySync(localStringArray, localOptions)
|
|
||||||
expect(testResult).to.be.a('array')
|
|
||||||
expect(testResult.length === 3).to.be.true
|
|
||||||
for (let myKey in testResult) {
|
|
||||||
expect(testResult[ myKey ] instanceof vinyl).to.be.true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
tap.test('.memory.vinylToStringSync() -> should produce a String from vinyl file', async () => {
|
|
||||||
let localString = smartfile.memory.vinylToStringSync(new vinyl({
|
|
||||||
base: '/',
|
|
||||||
path: '/test.txt',
|
|
||||||
contents: new Buffer('myString')
|
|
||||||
}))
|
|
||||||
expect(localString).equal('myString')
|
|
||||||
})
|
|
||||||
|
|
||||||
tap.test('.memory.toFs() -> should write a file to disk and return a promise', async () => {
|
tap.test('.memory.toFs() -> should write a file to disk and return a promise', async () => {
|
||||||
let localString = 'myString'
|
let localString = 'myString'
|
||||||
await smartfile.memory.toFs(
|
await smartfile.memory.toFs(
|
||||||
@ -194,12 +161,26 @@ tap.test('.remote.toString() -> should reject a Promise when the link is false',
|
|||||||
|
|
||||||
tap.test('.Smartfile -> should produce vinyl compatible files', async () => {
|
tap.test('.Smartfile -> should produce vinyl compatible files', async () => {
|
||||||
let smartfileArray = await smartfile.fs.fileTreeToObject(process.cwd(), './test/testfolder/**/*')
|
let smartfileArray = await smartfile.fs.fileTreeToObject(process.cwd(), './test/testfolder/**/*')
|
||||||
let localSmartfile = smartfileArray[0]
|
let localSmartfile = smartfileArray[ 0 ]
|
||||||
expect(localSmartfile).to.be.instanceof(smartfile.Smartfile)
|
expect(localSmartfile).to.be.instanceof(smartfile.Smartfile)
|
||||||
expect(localSmartfile.contents).to.be.instanceof(Buffer)
|
expect(localSmartfile.contents).to.be.instanceof(Buffer)
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
expect(localSmartfile.isBuffer()).to.be.true
|
expect(localSmartfile.isBuffer()).to.be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
expect(localSmartfile.isDirectory()).to.be.false
|
expect(localSmartfile.isDirectory()).to.be.false
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
expect(localSmartfile.isNull()).to.be.false
|
expect(localSmartfile.isNull()).to.be.false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
tap.test('should output a smartfile array to disk', async () => {
|
||||||
|
let smartfileArray = await smartfile.fs.fileTreeToObject('./test/testfolder/', '*')
|
||||||
|
for (let smartfile of smartfileArray) {
|
||||||
|
console.log(smartfile.relative)
|
||||||
|
console.log(smartfile.path)
|
||||||
|
console.log(smartfile.base)
|
||||||
|
console.log(smartfile.parsedPath)
|
||||||
|
}
|
||||||
|
await smartfile.memory.smartfileArrayToFs(smartfileArray, path.resolve('./test/temp/testoutput/'))
|
||||||
|
})
|
||||||
|
|
||||||
tap.start()
|
tap.start()
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
okidoks
|
1
test/testfolder/subfolder/subtestfile.txt
Normal file
1
test/testfolder/subfolder/subtestfile.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
hi
|
@ -17,6 +17,11 @@ export class Smartfile {
|
|||||||
*/
|
*/
|
||||||
path: string
|
path: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
parsedPath: plugins.path.ParsedPath
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the content of the file as Buffer
|
* the content of the file as Buffer
|
||||||
*/
|
*/
|
||||||
@ -24,6 +29,7 @@ export class Smartfile {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The current working directory of the file
|
* The current working directory of the file
|
||||||
|
* Note:this is similar to gulp and different from native node path base
|
||||||
*/
|
*/
|
||||||
base: string
|
base: string
|
||||||
|
|
||||||
@ -36,6 +42,8 @@ export class Smartfile {
|
|||||||
* the constructor of Smartfile
|
* the constructor of Smartfile
|
||||||
* @param optionsArg
|
* @param optionsArg
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
constructor (optionsArg: ISmartfileConstructorOptions) {
|
constructor (optionsArg: ISmartfileConstructorOptions) {
|
||||||
if (optionsArg.contentBuffer) {
|
if (optionsArg.contentBuffer) {
|
||||||
this.contentBuffer = optionsArg.contentBuffer
|
this.contentBuffer = optionsArg.contentBuffer
|
||||||
@ -45,6 +53,7 @@ export class Smartfile {
|
|||||||
console.log('created empty Smartfile?')
|
console.log('created empty Smartfile?')
|
||||||
}
|
}
|
||||||
this.path = optionsArg.path
|
this.path = optionsArg.path
|
||||||
|
this.parsedPath = plugins.path.parse(this.path)
|
||||||
this.base = optionsArg.base
|
this.base = optionsArg.base
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,4 +137,10 @@ export class Smartfile {
|
|||||||
isSymbolic () {
|
isSymbolic () {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update things
|
||||||
|
updateFileName (fileNameArg: string) {
|
||||||
|
let oldFileName = this.parsedPath.base
|
||||||
|
this.path = this.path.replace(new RegExp(oldFileName + '$'),fileNameArg)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,11 @@ export let fileExists = function (filePath) {
|
|||||||
* Checks if given path points to an existing directory
|
* Checks if given path points to an existing directory
|
||||||
*/
|
*/
|
||||||
export let isDirectory = function (pathArg): boolean {
|
export let isDirectory = function (pathArg): boolean {
|
||||||
return plugins.fsExtra.statSync(pathArg).isDirectory()
|
try {
|
||||||
|
return plugins.fsExtra.statSync(pathArg).isDirectory()
|
||||||
|
} catch (err) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -203,8 +207,8 @@ export let toObjectSync = function (filePathArg, fileTypeArg?) {
|
|||||||
* @param filePath
|
* @param filePath
|
||||||
* @returns {string|Buffer|any}
|
* @returns {string|Buffer|any}
|
||||||
*/
|
*/
|
||||||
export let toStringSync = function (filePath: string) {
|
export let toStringSync = function (filePath: string): string {
|
||||||
let fileString = plugins.fsExtra.readFileSync(filePath, 'utf8')
|
let fileString: any = plugins.fsExtra.readFileSync(filePath, 'utf8')
|
||||||
return fileString
|
return fileString
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,11 +224,16 @@ export let fileTreeToObject = async (dirPathArg: string, miniMatchFilter: string
|
|||||||
let fileTree = await listFileTree(dirPath, miniMatchFilter)
|
let fileTree = await listFileTree(dirPath, miniMatchFilter)
|
||||||
let smartfileArray: Smartfile[] = []
|
let smartfileArray: Smartfile[] = []
|
||||||
for (let filePath of fileTree) {
|
for (let filePath of fileTree) {
|
||||||
let fileContentString = toStringSync(
|
let readPath = ((): string => {
|
||||||
plugins.path.join(dirPath, filePath)
|
if (!plugins.path.isAbsolute(filePath)) {
|
||||||
)
|
return plugins.path.join(dirPath, filePath)
|
||||||
|
} else {
|
||||||
|
return filePath
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
let fileContentString = toStringSync(readPath)
|
||||||
|
|
||||||
// push a read file as Smartfile
|
// push a read file as Smartfile
|
||||||
smartfileArray.push(new Smartfile({
|
smartfileArray.push(new Smartfile({
|
||||||
contentBuffer: new Buffer(fileContentString),
|
contentBuffer: new Buffer(fileContentString),
|
||||||
base: dirPath,
|
base: dirPath,
|
||||||
@ -332,7 +341,7 @@ export let listAllItems = function (pathArg: string, regexFilter?: RegExp): Prom
|
|||||||
allItmesArray = allItmesArray.filter((fileItem) => {
|
allItmesArray = allItmesArray.filter((fileItem) => {
|
||||||
return regexFilter.test(fileItem)
|
return regexFilter.test(fileItem)
|
||||||
})
|
})
|
||||||
};
|
}
|
||||||
done.resolve(allItmesArray)
|
done.resolve(allItmesArray)
|
||||||
return done.promise
|
return done.promise
|
||||||
}
|
}
|
||||||
@ -371,7 +380,9 @@ export let listFileTree = (dirPathArg: string, miniMatchFilter: string): Promise
|
|||||||
}
|
}
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
cwd: dirPath
|
cwd: dirPath,
|
||||||
|
nodir: true,
|
||||||
|
dot: true
|
||||||
}
|
}
|
||||||
plugins.glob(miniMatchFilter, options, (err, files: string[]) => {
|
plugins.glob(miniMatchFilter, options, (err, files: string[]) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
import 'typings-global'
|
import 'typings-global'
|
||||||
|
|
||||||
import plugins = require('./smartfile.plugins')
|
import plugins = require('./smartfile.plugins')
|
||||||
import SmartfileInterpreter = require('./smartfile.interpreter')
|
import { Smartfile } from './smartfile.classes.smartfile'
|
||||||
let vinyl = require('vinyl')
|
import * as smartfileFs from './smartfile.fs'
|
||||||
|
|
||||||
export interface IVinylFile {
|
|
||||||
contents: Buffer
|
import SmartfileInterpreter = require('./smartfile.interpreter')
|
||||||
base: string
|
|
||||||
path: string,
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* converts file to Object
|
* converts file to Object
|
||||||
@ -20,62 +17,20 @@ export let toObject = function (fileStringArg: string, fileTypeArg: string) {
|
|||||||
return SmartfileInterpreter.objectFile(fileStringArg, fileTypeArg)
|
return SmartfileInterpreter.objectFile(fileStringArg, fileTypeArg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
export interface IToFsOptions {
|
||||||
* takes a string and converts it to vinyl file
|
respectRelative?: boolean
|
||||||
* @param fileArg
|
|
||||||
* @param optionsArg
|
|
||||||
*/
|
|
||||||
export let toVinylFileSync = function (fileArg: string, optionsArg?: { filename?: string, base?: string, relPath?: string }) {
|
|
||||||
optionsArg ? void (0) : optionsArg = { filename: 'vinylfile', base: '/' }
|
|
||||||
optionsArg.filename ? void (0) : optionsArg.filename = 'vinylfile'
|
|
||||||
optionsArg.base ? void (0) : optionsArg.base = '/'
|
|
||||||
optionsArg.relPath ? void ('0') : optionsArg.relPath = ''
|
|
||||||
let vinylFile = new vinyl({
|
|
||||||
base: optionsArg.base,
|
|
||||||
path: plugins.path.join(optionsArg.base, optionsArg.relPath, optionsArg.filename),
|
|
||||||
contents: new Buffer(fileArg)
|
|
||||||
})
|
|
||||||
return vinylFile
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* takes a string array and some options and returns a vinylfile array
|
* writes string or Smartfile to disk.
|
||||||
* @param arrayArg
|
|
||||||
* @param optionsArg
|
|
||||||
*/
|
|
||||||
export let toVinylArraySync = function (
|
|
||||||
arrayArg: string[],
|
|
||||||
optionsArg?: {
|
|
||||||
filename?: string,
|
|
||||||
base?: string,
|
|
||||||
relPath?: string
|
|
||||||
}
|
|
||||||
) {
|
|
||||||
let vinylArray = []
|
|
||||||
for (let stringIndexArg in arrayArg) {
|
|
||||||
let myString = arrayArg[ stringIndexArg ]
|
|
||||||
vinylArray.push(toVinylFileSync(myString, optionsArg))
|
|
||||||
}
|
|
||||||
return vinylArray
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* takes a vinylFile object and converts it to String
|
|
||||||
*/
|
|
||||||
export let vinylToStringSync = function (fileArg: IVinylFile): string {
|
|
||||||
return fileArg.contents.toString('utf8')
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* writes string or vinyl file to disk.
|
|
||||||
* @param fileArg
|
* @param fileArg
|
||||||
* @param fileNameArg
|
* @param fileNameArg
|
||||||
* @param fileBaseArg
|
* @param fileBaseArg
|
||||||
*/
|
*/
|
||||||
export let toFs = function (fileContentArg: string | IVinylFile, filePathArg) {
|
export let toFs = async (fileContentArg: string | Smartfile, filePathArg, optionsArg: IToFsOptions = {} ) => {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.q.defer()
|
||||||
|
|
||||||
// function checks to abort if needed
|
// check args
|
||||||
if (!fileContentArg || !filePathArg) {
|
if (!fileContentArg || !filePathArg) {
|
||||||
throw new Error('expected valid arguments')
|
throw new Error('expected valid arguments')
|
||||||
}
|
}
|
||||||
@ -83,17 +38,31 @@ export let toFs = function (fileContentArg: string | IVinylFile, filePathArg) {
|
|||||||
// prepare actual write action
|
// prepare actual write action
|
||||||
let fileString: string
|
let fileString: string
|
||||||
let filePath: string = filePathArg
|
let filePath: string = filePathArg
|
||||||
if (vinyl.isVinyl(fileContentArg)) {
|
|
||||||
|
// handle Smartfile
|
||||||
|
if (fileContentArg instanceof Smartfile) {
|
||||||
let fileContentArg2: any = fileContentArg
|
let fileContentArg2: any = fileContentArg
|
||||||
fileString = vinylToStringSync(fileContentArg2)
|
fileString = fileContentArg.contentBuffer.toString()
|
||||||
|
// handle options
|
||||||
|
if (optionsArg.respectRelative) {
|
||||||
|
filePath = plugins.path.join(filePath, fileContentArg.path)
|
||||||
|
}
|
||||||
} else if (typeof fileContentArg === 'string') {
|
} else if (typeof fileContentArg === 'string') {
|
||||||
fileString = fileContentArg
|
fileString = fileContentArg
|
||||||
|
} else {
|
||||||
|
throw new Error('fileContent is neither string nor Smartfile')
|
||||||
}
|
}
|
||||||
plugins.fsExtra.writeFile(filePath, fileString, 'utf8', done.resolve)
|
await smartfileFs.ensureDir(plugins.path.parse(filePath).dir)
|
||||||
return done.promise
|
plugins.fsExtra.writeFile(filePath, fileString, {encoding: 'utf8'}, done.resolve)
|
||||||
|
return await done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
export let toFsSync = function (fileArg, filePathArg: string) {
|
/**
|
||||||
|
* writes a string or a Smartfile to disk synchronously, only supports string
|
||||||
|
* @param fileArg
|
||||||
|
* @param filePathArg
|
||||||
|
*/
|
||||||
|
export let toFsSync = function (fileArg: string, filePathArg: string) {
|
||||||
// function checks to abort if needed
|
// function checks to abort if needed
|
||||||
if (!fileArg || !filePathArg) {
|
if (!fileArg || !filePathArg) {
|
||||||
throw new Error('expected a valid arguments')
|
throw new Error('expected a valid arguments')
|
||||||
@ -104,9 +73,18 @@ export let toFsSync = function (fileArg, filePathArg: string) {
|
|||||||
let filePath: string = filePathArg
|
let filePath: string = filePathArg
|
||||||
|
|
||||||
if (typeof fileArg !== 'string') {
|
if (typeof fileArg !== 'string') {
|
||||||
fileString = vinylToStringSync(fileArg)
|
throw new Error('fileArg is not of type String.')
|
||||||
} else if (typeof fileArg === 'string') {
|
} else if (typeof fileArg === 'string') {
|
||||||
fileString = fileArg
|
fileString = fileArg
|
||||||
}
|
}
|
||||||
plugins.fsExtra.writeFileSync(filePath, fileString, 'utf8')
|
plugins.fsExtra.writeFileSync(filePath, fileString, {encoding: 'utf8'})
|
||||||
|
}
|
||||||
|
|
||||||
|
export let smartfileArrayToFs = async (smartfileArrayArg: Smartfile[], dirArg: string) => {
|
||||||
|
await smartfileFs.ensureDir(dirArg)
|
||||||
|
for (let smartfile of smartfileArrayArg) {
|
||||||
|
await toFs(smartfile, dirArg, {
|
||||||
|
respectRelative: true
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
320
yarn.lock
320
yarn.lock
@ -15,27 +15,37 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/chai" "*"
|
"@types/chai" "*"
|
||||||
|
|
||||||
"@types/chai@*", "@types/chai@^3.4.35":
|
"@types/chai@*":
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.1.tgz#37fea779617cfec3fd2b19a0247e8bbdd5133bf6"
|
||||||
|
|
||||||
|
"@types/chai@^3.4.35":
|
||||||
version "3.5.2"
|
version "3.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
||||||
|
|
||||||
"@types/fs-extra@2.x.x":
|
"@types/fs-extra@4.x.x":
|
||||||
version "2.1.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-2.1.0.tgz#8b350239c0455d92b8d3c626edac193860ff395f"
|
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-4.0.0.tgz#1dd742ad5c9bce308f7a52d02ebc01421bc9102f"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "7.0.14"
|
version "8.0.17"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.14.tgz#1470fa002a113316ac9d9ad163fc738c7a0de2a4"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.17.tgz#677bc8c118cfb76013febb62ede1f31d2c7222a1"
|
||||||
|
|
||||||
"@types/promises-a-plus@*":
|
"@types/promises-a-plus@*":
|
||||||
version "0.0.27"
|
version "0.0.27"
|
||||||
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
||||||
|
|
||||||
|
"@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/through2@^2.0.32":
|
"@types/through2@^2.0.32":
|
||||||
version "2.0.32"
|
version "2.0.33"
|
||||||
resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.32.tgz#470024450f1ab7640f19f9ebf42d3da574c26129"
|
resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.33.tgz#1ff2e88a100dfb5b140e7bb98791f1194400d131"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
@ -45,6 +55,10 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@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:
|
ansi-256-colors@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
|
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
|
||||||
@ -59,9 +73,9 @@ 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"
|
||||||
|
|
||||||
beautycolor@^1.0.7:
|
beautycolor@^1.0.7:
|
||||||
version "1.0.7"
|
version "1.0.7"
|
||||||
@ -71,20 +85,16 @@ beautycolor@^1.0.7:
|
|||||||
typings-global "^1.0.14"
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
bindings@^1.2.1:
|
bindings@^1.2.1:
|
||||||
version "1.2.1"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
|
||||||
|
|
||||||
brace-expansion@^1.0.0:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.7"
|
version "1.1.8"
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
||||||
dependencies:
|
dependencies:
|
||||||
balanced-match "^0.4.1"
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
buffer-shims@~1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51"
|
|
||||||
|
|
||||||
chai-as-promised@^6.0.0:
|
chai-as-promised@^6.0.0:
|
||||||
version "6.0.0"
|
version "6.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
|
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
|
||||||
@ -92,8 +102,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"
|
||||||
@ -115,9 +125,9 @@ clone-stats@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
|
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
|
||||||
|
|
||||||
clone@^1.0.0:
|
clone@^2.1.1:
|
||||||
version "1.0.2"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149"
|
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb"
|
||||||
|
|
||||||
cloneable-readable@^1.0.0:
|
cloneable-readable@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
@ -141,6 +151,13 @@ deep-eql@^0.1.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
type-detect "0.1.1"
|
type-detect "0.1.1"
|
||||||
|
|
||||||
|
define-properties@^1.1.2:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
|
||||||
|
dependencies:
|
||||||
|
foreach "^2.0.5"
|
||||||
|
object-keys "^1.0.8"
|
||||||
|
|
||||||
early@^2.1.1:
|
early@^2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
||||||
@ -149,9 +166,30 @@ early@^2.1.1:
|
|||||||
smartq "^1.1.1"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.16"
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
esprima@^3.1.1:
|
es-abstract@^1.5.1:
|
||||||
version "3.1.3"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
|
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c"
|
||||||
|
dependencies:
|
||||||
|
es-to-primitive "^1.1.1"
|
||||||
|
function-bind "^1.1.0"
|
||||||
|
is-callable "^1.1.3"
|
||||||
|
is-regex "^1.0.3"
|
||||||
|
|
||||||
|
es-to-primitive@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
|
||||||
|
dependencies:
|
||||||
|
is-callable "^1.1.1"
|
||||||
|
is-date-object "^1.0.1"
|
||||||
|
is-symbol "^1.0.1"
|
||||||
|
|
||||||
|
es6-error@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
|
||||||
|
|
||||||
|
esprima@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
|
||||||
|
|
||||||
first-chunk-stream@^2.0.0:
|
first-chunk-stream@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
@ -159,9 +197,13 @@ first-chunk-stream@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
readable-stream "^2.0.2"
|
readable-stream "^2.0.2"
|
||||||
|
|
||||||
fs-extra@^3.0.0:
|
foreach@^2.0.5:
|
||||||
version "3.0.0"
|
version "2.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.0.tgz#244e0c4b0b8818f54040ec049d8a2bddc1202861"
|
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
||||||
|
|
||||||
|
fs-extra@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.0.tgz#414fb4ca2d2170ba0014159d3a8aec3303418d9e"
|
||||||
dependencies:
|
dependencies:
|
||||||
graceful-fs "^4.1.2"
|
graceful-fs "^4.1.2"
|
||||||
jsonfile "^3.0.0"
|
jsonfile "^3.0.0"
|
||||||
@ -171,14 +213,18 @@ 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.1.1:
|
function-bind@^1.0.2, function-bind@^1.1.0:
|
||||||
version "7.1.1"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"
|
||||||
|
|
||||||
|
glob@^7.0.0, glob@^7.1.2:
|
||||||
|
version "7.1.2"
|
||||||
|
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"
|
||||||
|
|
||||||
@ -195,6 +241,12 @@ gulp-function@^2.2.9:
|
|||||||
through2 "^2.0.3"
|
through2 "^2.0.3"
|
||||||
typings-global "^1.0.16"
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
|
has@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
|
||||||
|
dependencies:
|
||||||
|
function-bind "^1.0.2"
|
||||||
|
|
||||||
home@^1.0.1:
|
home@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/home/-/home-1.0.1.tgz#96a423ceb49b98378ff5ef3ceae059a557f9dd35"
|
resolved "https://registry.yarnpkg.com/home/-/home-1.0.1.tgz#96a423ceb49b98378ff5ef3ceae059a557f9dd35"
|
||||||
@ -208,7 +260,7 @@ inflight@^1.0.4:
|
|||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
wrappy "1"
|
wrappy "1"
|
||||||
|
|
||||||
inherits@2, inherits@^2.0.1, inherits@~2.0.1:
|
inherits@2, inherits@^2.0.1, inherits@~2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
|
|
||||||
@ -216,9 +268,23 @@ interpret@^1.0.0:
|
|||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
|
||||||
|
|
||||||
is-stream@^1.1.0:
|
is-callable@^1.1.1, is-callable@^1.1.3:
|
||||||
version "1.1.0"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
|
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
|
||||||
|
|
||||||
|
is-date-object@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
|
||||||
|
|
||||||
|
is-regex@^1.0.3:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
|
||||||
|
dependencies:
|
||||||
|
has "^1.0.1"
|
||||||
|
|
||||||
|
is-symbol@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
|
||||||
|
|
||||||
is-utf8@^0.2.0, is-utf8@^0.2.1:
|
is-utf8@^0.2.0, is-utf8@^0.2.1:
|
||||||
version "0.2.1"
|
version "0.2.1"
|
||||||
@ -228,23 +294,28 @@ isarray@~1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
|
|
||||||
js-yaml@^3.8.3:
|
isexe@^2.0.0:
|
||||||
version "3.8.3"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.3.tgz#33a05ec481c850c8875929166fe1beb61c728766"
|
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
|
|
||||||
|
js-yaml@^3.9.1:
|
||||||
|
version "3.9.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0"
|
||||||
dependencies:
|
dependencies:
|
||||||
argparse "^1.0.7"
|
argparse "^1.0.7"
|
||||||
esprima "^3.1.1"
|
esprima "^4.0.0"
|
||||||
|
|
||||||
jsonfile@^3.0.0:
|
jsonfile@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.0.tgz#92e7c7444e5ffd5fa32e6a9ae8b85034df8347d0"
|
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66"
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
graceful-fs "^4.1.6"
|
graceful-fs "^4.1.6"
|
||||||
|
|
||||||
leakage@^0.2.0:
|
leakage@^0.3.0:
|
||||||
version "0.2.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.2.0.tgz#9e7a8cc1d241d8c8427e348769e192e172fd8733"
|
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
es6-error "^4.0.2"
|
||||||
left-pad "^1.1.3"
|
left-pad "^1.1.3"
|
||||||
memwatch-next "^0.3.0"
|
memwatch-next "^0.3.0"
|
||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
@ -261,11 +332,11 @@ memwatch-next@^0.3.0:
|
|||||||
bindings "^1.2.1"
|
bindings "^1.2.1"
|
||||||
nan "^2.3.2"
|
nan "^2.3.2"
|
||||||
|
|
||||||
minimatch@^3.0.2:
|
minimatch@^3.0.4:
|
||||||
version "3.0.3"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.0.0"
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
minimist@^1.2.0:
|
minimist@^1.2.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
@ -275,6 +346,17 @@ nan@^2.3.2:
|
|||||||
version "2.6.2"
|
version "2.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
||||||
|
|
||||||
|
object-keys@^1.0.8:
|
||||||
|
version "1.0.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
||||||
|
|
||||||
|
object.getownpropertydescriptors@^2.0.3:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.2"
|
||||||
|
es-abstract "^1.5.1"
|
||||||
|
|
||||||
once@^1.3.0:
|
once@^1.3.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
@ -306,15 +388,15 @@ process-nextick-args@^1.0.6, process-nextick-args@~1.0.6:
|
|||||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
|
||||||
|
|
||||||
readable-stream@^2.0.2, readable-stream@^2.1.5:
|
readable-stream@^2.0.2, readable-stream@^2.1.5:
|
||||||
version "2.2.9"
|
version "2.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8"
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c"
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer-shims "~1.0.0"
|
|
||||||
core-util-is "~1.0.0"
|
core-util-is "~1.0.0"
|
||||||
inherits "~2.0.1"
|
inherits "~2.0.3"
|
||||||
isarray "~1.0.0"
|
isarray "~1.0.0"
|
||||||
process-nextick-args "~1.0.6"
|
process-nextick-args "~1.0.6"
|
||||||
string_decoder "~1.0.0"
|
safe-buffer "~5.1.1"
|
||||||
|
string_decoder "~1.0.3"
|
||||||
util-deprecate "~1.0.1"
|
util-deprecate "~1.0.1"
|
||||||
|
|
||||||
rechoir@^0.6.2:
|
rechoir@^0.6.2:
|
||||||
@ -324,8 +406,8 @@ rechoir@^0.6.2:
|
|||||||
resolve "^1.1.6"
|
resolve "^1.1.6"
|
||||||
|
|
||||||
remove-trailing-separator@^1.0.1:
|
remove-trailing-separator@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4"
|
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511"
|
||||||
|
|
||||||
replace-ext@^1.0.0:
|
replace-ext@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
@ -336,18 +418,22 @@ require-reload@0.2.2:
|
|||||||
resolved "https://registry.yarnpkg.com/require-reload/-/require-reload-0.2.2.tgz#29a7591846caf91b6e8a3cda991683f95f8d7d42"
|
resolved "https://registry.yarnpkg.com/require-reload/-/require-reload-0.2.2.tgz#29a7591846caf91b6e8a3cda991683f95f8d7d42"
|
||||||
|
|
||||||
resolve@^1.1.6:
|
resolve@^1.1.6:
|
||||||
version "1.3.3"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
|
||||||
dependencies:
|
dependencies:
|
||||||
path-parse "^1.0.5"
|
path-parse "^1.0.5"
|
||||||
|
|
||||||
semver@^5.3.0:
|
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
version "5.3.0"
|
version "5.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||||
|
|
||||||
shelljs@^0.7.7:
|
semver@^5.3.0:
|
||||||
version "0.7.7"
|
version "5.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
||||||
|
|
||||||
|
shelljs@^0.7.8:
|
||||||
|
version "0.7.8"
|
||||||
|
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"
|
||||||
@ -364,11 +450,12 @@ smartchai@^1.0.3:
|
|||||||
chai-as-promised "^6.0.0"
|
chai-as-promised "^6.0.0"
|
||||||
chai-string "^1.3.0"
|
chai-string "^1.3.0"
|
||||||
|
|
||||||
smartdelay@^1.0.1:
|
smartdelay@^1.0.3:
|
||||||
version "1.0.1"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.1.tgz#687f8bcc09d7c62c9c5a8a1771c1aba3aff54156"
|
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
|
||||||
dependencies:
|
dependencies:
|
||||||
typings-global "^1.0.14"
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
smartpath@^3.2.8:
|
smartpath@^3.2.8:
|
||||||
version "3.2.8"
|
version "3.2.8"
|
||||||
@ -377,29 +464,40 @@ smartpath@^3.2.8:
|
|||||||
home "^1.0.1"
|
home "^1.0.1"
|
||||||
typings-global "^1.0.14"
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
smartq@^1.1.0, smartq@^1.1.1:
|
smartq@^1.1.1, smartq@^1.1.6:
|
||||||
version "1.1.1"
|
version "1.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.6.tgz#0c1ff4336d95e95b4f1fdd8ccd7e2c5a323b8412"
|
||||||
dependencies:
|
dependencies:
|
||||||
typed-promisify "^0.3.0"
|
typings-global "^1.0.19"
|
||||||
typings-global "^1.0.14"
|
util.promisify "^1.0.0"
|
||||||
|
|
||||||
smartrequest@^1.0.4:
|
smartrequest@^1.0.6:
|
||||||
version "1.0.4"
|
version "1.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/smartrequest/-/smartrequest-1.0.4.tgz#86af2163ae28f1031b01c2d8ad8c429733920611"
|
resolved "https://registry.yarnpkg.com/smartrequest/-/smartrequest-1.0.6.tgz#a006454332453b0a70d38a003a29963d039a7783"
|
||||||
dependencies:
|
dependencies:
|
||||||
smartq "^1.1.0"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.14"
|
typings-global "^1.0.17"
|
||||||
|
|
||||||
|
smartshell@^1.0.6:
|
||||||
|
version "1.0.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.13.tgz#277b34e6624df70003e0e3a6c900cd5ebab7eb92"
|
||||||
|
dependencies:
|
||||||
|
"@types/shelljs" "^0.7.2"
|
||||||
|
"@types/which" "^1.0.28"
|
||||||
|
shelljs "^0.7.8"
|
||||||
|
smartq "^1.1.6"
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
which "^1.2.14"
|
||||||
|
|
||||||
sprintf-js@~1.0.2:
|
sprintf-js@~1.0.2:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||||
|
|
||||||
string_decoder@~1.0.0:
|
string_decoder@~1.0.3:
|
||||||
version "1.0.0"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667"
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer-shims "~1.0.0"
|
safe-buffer "~5.1.0"
|
||||||
|
|
||||||
strip-bom-buf@^1.0.0:
|
strip-bom-buf@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
@ -420,16 +518,16 @@ strip-bom@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
is-utf8 "^0.2.0"
|
is-utf8 "^0.2.0"
|
||||||
|
|
||||||
tapbundle@^1.0.10:
|
tapbundle@^1.1.1:
|
||||||
version "1.0.10"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.0.10.tgz#36fd40036f6b5b738cbb9b5fc400df4c4031bc26"
|
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.1.1.tgz#ec4172c0e82a77b1f6133fef2606311ede28a62d"
|
||||||
dependencies:
|
dependencies:
|
||||||
early "^2.1.1"
|
early "^2.1.1"
|
||||||
leakage "^0.2.0"
|
leakage "^0.3.0"
|
||||||
smartchai "^1.0.3"
|
smartchai "^1.0.3"
|
||||||
smartdelay "^1.0.1"
|
smartdelay "^1.0.3"
|
||||||
smartq "^1.1.1"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.16"
|
typings-global "^1.0.19"
|
||||||
|
|
||||||
through2@^2.0.1, through2@^2.0.3:
|
through2@^2.0.1, through2@^2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
@ -446,25 +544,28 @@ type-detect@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
||||||
|
|
||||||
typed-promisify@^0.3.0:
|
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.17, typings-global@^1.0.19, typings-global@^1.0.20:
|
||||||
version "0.3.0"
|
version "1.0.20"
|
||||||
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.20.tgz#3da769c54db538247c5d877d1d9e97eb2ec981ff"
|
||||||
|
|
||||||
typings-global@^1.0.14, typings-global@^1.0.16:
|
|
||||||
version "1.0.16"
|
|
||||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.16.tgz#489b71781af24268750c2899316400a5e482961f"
|
|
||||||
dependencies:
|
dependencies:
|
||||||
semver "^5.3.0"
|
semver "^5.3.0"
|
||||||
shelljs "^0.7.7"
|
smartshell "^1.0.6"
|
||||||
|
|
||||||
universalify@^0.1.0:
|
universalify@^0.1.0:
|
||||||
version "0.1.0"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.0.tgz#9eb1c4651debcc670cc94f1a75762332bb967778"
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
|
||||||
|
|
||||||
util-deprecate@~1.0.1:
|
util-deprecate@~1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
|
|
||||||
|
util.promisify@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.2"
|
||||||
|
object.getownpropertydescriptors "^2.0.3"
|
||||||
|
|
||||||
vinyl-file@^3.0.0:
|
vinyl-file@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-3.0.0.tgz#b104d9e4409ffa325faadd520642d0a3b488b365"
|
resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-3.0.0.tgz#b104d9e4409ffa325faadd520642d0a3b488b365"
|
||||||
@ -475,18 +576,23 @@ vinyl-file@^3.0.0:
|
|||||||
strip-bom-stream "^2.0.0"
|
strip-bom-stream "^2.0.0"
|
||||||
vinyl "^2.0.1"
|
vinyl "^2.0.1"
|
||||||
|
|
||||||
vinyl@^2.0.1, vinyl@^2.0.2:
|
vinyl@^2.0.1:
|
||||||
version "2.0.2"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.0.2.tgz#0a3713d8d4e9221c58f10ca16c0116c9e25eda7c"
|
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c"
|
||||||
dependencies:
|
dependencies:
|
||||||
clone "^1.0.0"
|
clone "^2.1.1"
|
||||||
clone-buffer "^1.0.0"
|
clone-buffer "^1.0.0"
|
||||||
clone-stats "^1.0.0"
|
clone-stats "^1.0.0"
|
||||||
cloneable-readable "^1.0.0"
|
cloneable-readable "^1.0.0"
|
||||||
is-stream "^1.1.0"
|
|
||||||
remove-trailing-separator "^1.0.1"
|
remove-trailing-separator "^1.0.1"
|
||||||
replace-ext "^1.0.0"
|
replace-ext "^1.0.0"
|
||||||
|
|
||||||
|
which@^1.2.14:
|
||||||
|
version "1.2.14"
|
||||||
|
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
|
||||||
|
dependencies:
|
||||||
|
isexe "^2.0.0"
|
||||||
|
|
||||||
wrappy@1:
|
wrappy@1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
|
Reference in New Issue
Block a user