Compare commits
107 Commits
Author | SHA1 | Date | |
---|---|---|---|
8fcdc5ce44 | |||
878da9ff3a | |||
168136bebb | |||
16cecbefac | |||
24b890956e | |||
fe73e8edf7 | |||
5b2089044d | |||
9fa98c3804 | |||
f49c5af339 | |||
61a6cfd452 | |||
769a1a707e | |||
0408cff3fc | |||
533d71a6cd | |||
b3fd13506c | |||
4052337626 | |||
d823229bee | |||
5bdc6e1dc9 | |||
625f540978 | |||
459d2531b4 | |||
b5993560b1 | |||
b800957f19 | |||
d79e1180d8 | |||
ac99ecf743 | |||
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 | |||
fb9766e93b | |||
9cfd147fdc | |||
18ff99aef7 | |||
46b1151201 | |||
8e19586e47 | |||
9fc581b866 | |||
dcc85a56b8 | |||
4899d454eb | |||
9d02fccc01 | |||
a5b24a7c33 | |||
06fb0acd52 | |||
97bf5ff74b | |||
531f169c11 | |||
e25675cc49 | |||
32cdac5b38 | |||
7457093476 | |||
f560b6b7bb | |||
ed01ebeee8 | |||
7eed9dd6d3 | |||
d9852e18a5 | |||
0be281746d | |||
6ac60cb3a5 | |||
eb3c720d4e | |||
c29084f000 | |||
b53240a2ea | |||
2ba39cf2ac | |||
675934d049 | |||
dda4c1af07 | |||
214bae9931 | |||
fde809eb02 | |||
9f3a71f0b9 | |||
e9c9e95118 | |||
943a0c30c2 | |||
2dad3707ee | |||
cd35d110a9 | |||
257939462b | |||
8104188b90 | |||
02842f1d0f | |||
f753c2c491 | |||
4ecb817bac | |||
909fcd6e2a | |||
d1538f939d | |||
3fef2a4ab9 | |||
77603ee736 | |||
353058ed73 | |||
bf618512e2 | |||
b276c5639d | |||
779c62dcbb | |||
3e1101c5e1 | |||
395504127c | |||
6dee92a3df | |||
0ba3c1794e | |||
0a810a3ac1 | |||
fc23f221eb | |||
cfcd1f7aaf | |||
2cb8c5117a | |||
2c52dec8ea |
@ -1,37 +1,96 @@
|
|||||||
image: hosttoday/ht-docker-node:npmts
|
# gitzone standard
|
||||||
|
image: hosttoday/ht-docker-node:npmci
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .yarn/
|
||||||
|
key: "$CI_BUILD_STAGE"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- mirror
|
||||||
|
- security
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
|
- trigger
|
||||||
|
- pages
|
||||||
|
|
||||||
|
mirror:
|
||||||
|
stage: mirror
|
||||||
|
script:
|
||||||
|
- npmci git mirror
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
security:
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci command yarn global add snyk
|
||||||
|
- npmci command yarn install --ignore-scripts
|
||||||
|
- npmci command snyk test
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
testLEGACY:
|
testLEGACY:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test legacy
|
- npmci node install legacy
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test lts
|
- npmci node install lts
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
testSTABLE:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test stable
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
environment: npm_registry
|
|
||||||
script:
|
script:
|
||||||
- npmci publish
|
- npmci npm prepare
|
||||||
|
- npmci npm publish
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
stage: trigger
|
||||||
|
script:
|
||||||
|
- npmci trigger
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
pages:
|
||||||
|
image: hosttoday/ht-docker-node:npmci
|
||||||
|
stage: pages
|
||||||
|
script:
|
||||||
|
- npmci command yarn global add npmpage
|
||||||
|
- npmci command npmpage
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
artifacts:
|
||||||
- docker
|
expire_in: 1 week
|
||||||
|
paths:
|
||||||
|
- public
|
||||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2015 Push.Rocks
|
Copyright (c) 2015 Lossless GmbH
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
14
README.md
14
README.md
@ -2,10 +2,10 @@
|
|||||||
make files easily accessible for processing in javascript.
|
make files easily accessible for processing in javascript.
|
||||||
|
|
||||||
## Availabililty
|
## Availabililty
|
||||||
[](https://www.npmjs.com/package/smartfile)
|
[](https://www.npmjs.com/package/smartfile)
|
||||||
[](https://gitlab.com/pushrocks/smartfile)
|
[](https://gitlab.com/pushrocks/smartfile)
|
||||||
[](https://github.com/pushrocks/smartfile)
|
[](https://github.com/pushrocks/smartfile)
|
||||||
[](https://pushrocks.gitlab.io/smartfile/)
|
[](https://pushrocks.gitlab.io/smartfile/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
[](https://gitlab.com/pushrocks/smartfile/commits/master)
|
[](https://gitlab.com/pushrocks/smartfile/commits/master)
|
||||||
@ -31,6 +31,8 @@ remote | gets data from remote locations to somewhere
|
|||||||
interpreter | (object) handles yaml and json
|
interpreter | (object) handles yaml and json
|
||||||
smartfile | (class) a virtual representation of a file, alternative to vinyl file format
|
smartfile | (class) a virtual representation of a file, alternative to vinyl file format
|
||||||
|
|
||||||
For more information read the docs
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
[](https://push.rocks)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
|
||||||
|
[](https://push.rocks)
|
||||||
|
1
dist/index.d.ts
vendored
1
dist/index.d.ts
vendored
@ -1,4 +1,3 @@
|
|||||||
import 'typings-global';
|
|
||||||
import * as SmartfileFs from './smartfile.fs';
|
import * as SmartfileFs from './smartfile.fs';
|
||||||
import * as SmartfileInterpreter from './smartfile.interpreter';
|
import * as SmartfileInterpreter from './smartfile.interpreter';
|
||||||
import * as SmartfileMemory from './smartfile.memory';
|
import * as SmartfileMemory from './smartfile.memory';
|
||||||
|
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const SmartfileFs = require("./smartfile.fs");
|
const SmartfileFs = require("./smartfile.fs");
|
||||||
const SmartfileInterpreter = require("./smartfile.interpreter");
|
const SmartfileInterpreter = require("./smartfile.interpreter");
|
||||||
const SmartfileMemory = require("./smartfile.memory");
|
const SmartfileMemory = require("./smartfile.memory");
|
||||||
@ -11,4 +11,4 @@ exports.interpreter = SmartfileInterpreter;
|
|||||||
exports.memory = SmartfileMemory;
|
exports.memory = SmartfileMemory;
|
||||||
exports.remote = SmartfileRemote;
|
exports.remote = SmartfileRemote;
|
||||||
exports.requireReload = SmartfileFs.requireReload;
|
exports.requireReload = SmartfileFs.requireReload;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBR3ZCLDhDQUE2QztBQUM3QyxnRUFBK0Q7QUFDL0Qsc0RBQXFEO0FBQ3JELHNEQUFxRDtBQUVyRCw2RUFBdUQ7QUFBL0Msa0RBQUEsU0FBUyxDQUFBO0FBRU4sUUFBQSxFQUFFLEdBQUcsV0FBVyxDQUFBO0FBQ2hCLFFBQUEsV0FBVyxHQUFHLG9CQUFvQixDQUFBO0FBQ2xDLFFBQUEsTUFBTSxHQUFHLGVBQWUsQ0FBQTtBQUN4QixRQUFBLE1BQU0sR0FBRyxlQUFlLENBQUE7QUFDeEIsUUFBQSxhQUFhLEdBQUcsV0FBVyxDQUFDLGFBQWEsQ0FBQSJ9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBLDhDQUE2QztBQUM3QyxnRUFBK0Q7QUFDL0Qsc0RBQXFEO0FBQ3JELHNEQUFxRDtBQUVyRCw2RUFBdUQ7QUFBL0Msa0RBQUEsU0FBUyxDQUFBO0FBRU4sUUFBQSxFQUFFLEdBQUcsV0FBVyxDQUFBO0FBQ2hCLFFBQUEsV0FBVyxHQUFHLG9CQUFvQixDQUFBO0FBQ2xDLFFBQUEsTUFBTSxHQUFHLGVBQWUsQ0FBQTtBQUN4QixRQUFBLE1BQU0sR0FBRyxlQUFlLENBQUE7QUFDeEIsUUFBQSxhQUFhLEdBQUcsV0FBVyxDQUFDLGFBQWEsQ0FBQSJ9
|
80
dist/smartfile.classes.smartfile.d.ts
vendored
80
dist/smartfile.classes.smartfile.d.ts
vendored
@ -1,3 +1,79 @@
|
|||||||
export declare class Smartfile {
|
/// <reference types="node" />
|
||||||
constructor();
|
import * as plugins from './smartfile.plugins';
|
||||||
|
export interface ISmartfileConstructorOptions {
|
||||||
|
path?: string;
|
||||||
|
contentString?: string;
|
||||||
|
contentBuffer?: Buffer;
|
||||||
|
base?: string;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* class Smartfile
|
||||||
|
* -> is vinyl file compatible
|
||||||
|
*/
|
||||||
|
export declare class Smartfile {
|
||||||
|
/**
|
||||||
|
* the full path of the file on disk
|
||||||
|
*/
|
||||||
|
path: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
parsedPath: plugins.path.ParsedPath;
|
||||||
|
/**
|
||||||
|
* the content of the file as Buffer
|
||||||
|
*/
|
||||||
|
contentBuffer: Buffer;
|
||||||
|
/**
|
||||||
|
* The current working directory of the file
|
||||||
|
* Note:this is similar to gulp and different from native node path base
|
||||||
|
*/
|
||||||
|
base: string;
|
||||||
|
/**
|
||||||
|
* sync the file with disk
|
||||||
|
*/
|
||||||
|
sync: boolean;
|
||||||
|
/**
|
||||||
|
* the constructor of Smartfile
|
||||||
|
* @param optionsArg
|
||||||
|
*/
|
||||||
|
constructor(optionsArg: ISmartfileConstructorOptions);
|
||||||
|
/**
|
||||||
|
* set contents from string
|
||||||
|
* @param contentString
|
||||||
|
*/
|
||||||
|
setContentsFromString(contentString: string): void;
|
||||||
|
/**
|
||||||
|
* write file to disk
|
||||||
|
* Behaviours:
|
||||||
|
* - no argument write to exactly where the file was picked up
|
||||||
|
*/
|
||||||
|
write(pathArg?: string): Promise<void>;
|
||||||
|
/**
|
||||||
|
* read file from disk
|
||||||
|
*/
|
||||||
|
read(): Promise<void>;
|
||||||
|
/**
|
||||||
|
* vinyl-compatibility: alias of this.contentBuffer
|
||||||
|
*/
|
||||||
|
contents: Buffer;
|
||||||
|
/**
|
||||||
|
* vinyl-compatibility
|
||||||
|
*/
|
||||||
|
readonly cwd: string;
|
||||||
|
/**
|
||||||
|
* return relative path of file
|
||||||
|
*/
|
||||||
|
readonly relative: string;
|
||||||
|
/**
|
||||||
|
* return truw when the file has content
|
||||||
|
*/
|
||||||
|
isNull(): boolean;
|
||||||
|
/**
|
||||||
|
* return true if contents are Buffer
|
||||||
|
*/
|
||||||
|
isBuffer(): boolean;
|
||||||
|
isDirectory(): boolean;
|
||||||
|
isStream(): boolean;
|
||||||
|
isSymbolic(): boolean;
|
||||||
|
updateFileName(fileNameArg: string): void;
|
||||||
}
|
}
|
||||||
|
116
dist/smartfile.classes.smartfile.js
vendored
116
dist/smartfile.classes.smartfile.js
vendored
@ -1,7 +1,119 @@
|
|||||||
"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 });
|
||||||
|
const plugins = require("./smartfile.plugins");
|
||||||
|
const memory = require("./smartfile.memory");
|
||||||
|
/**
|
||||||
|
* class Smartfile
|
||||||
|
* -> is vinyl file compatible
|
||||||
|
*/
|
||||||
class Smartfile {
|
class Smartfile {
|
||||||
constructor() {
|
/**
|
||||||
|
* the constructor of Smartfile
|
||||||
|
* @param optionsArg
|
||||||
|
*/
|
||||||
|
constructor(optionsArg) {
|
||||||
|
if (optionsArg.contentBuffer) {
|
||||||
|
this.contentBuffer = optionsArg.contentBuffer;
|
||||||
|
}
|
||||||
|
else if (optionsArg.contentString) {
|
||||||
|
this.setContentsFromString(optionsArg.contentString);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log('created empty Smartfile?');
|
||||||
|
}
|
||||||
|
this.path = optionsArg.path;
|
||||||
|
this.parsedPath = plugins.path.parse(this.path);
|
||||||
|
this.base = optionsArg.base;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* set contents from string
|
||||||
|
* @param contentString
|
||||||
|
*/
|
||||||
|
setContentsFromString(contentString) {
|
||||||
|
this.contents = new Buffer(contentString);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* write file to disk
|
||||||
|
* Behaviours:
|
||||||
|
* - no argument write to exactly where the file was picked up
|
||||||
|
*/
|
||||||
|
write(pathArg) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const stringToWrite = this.contentBuffer.toString();
|
||||||
|
yield memory.toFs(stringToWrite, this.path);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* read file from disk
|
||||||
|
*/
|
||||||
|
read() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// -----------------------------------------------
|
||||||
|
// vinyl compatibility
|
||||||
|
// -----------------------------------------------
|
||||||
|
/**
|
||||||
|
* vinyl-compatibility: alias of this.contentBuffer
|
||||||
|
*/
|
||||||
|
get contents() {
|
||||||
|
return this.contentBuffer;
|
||||||
|
}
|
||||||
|
set contents(contentsArg) {
|
||||||
|
this.contentBuffer = contentsArg;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* vinyl-compatibility
|
||||||
|
*/
|
||||||
|
get cwd() {
|
||||||
|
return process.cwd();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* return relative path of file
|
||||||
|
*/
|
||||||
|
get relative() {
|
||||||
|
return plugins.path.relative(this.base, this.path);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* return truw when the file has content
|
||||||
|
*/
|
||||||
|
isNull() {
|
||||||
|
if (!this.contentBuffer) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* return true if contents are Buffer
|
||||||
|
*/
|
||||||
|
isBuffer() {
|
||||||
|
if (this.contents instanceof Buffer) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
isDirectory() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
isStream() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
isSymbolic() {
|
||||||
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtJQUNJO0lBRUEsQ0FBQztDQUNKO0FBSkQsOEJBSUMifQ==
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLmNsYXNzZXMuc21hcnRmaWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwrQ0FBOEM7QUFFOUMsNkNBQTRDO0FBUzVDOzs7R0FHRztBQUNIO0lBMkJFOzs7T0FHRztJQUdILFlBQWEsVUFBd0M7UUFDbkQsSUFBSSxVQUFVLENBQUMsYUFBYSxFQUFFO1lBQzVCLElBQUksQ0FBQyxhQUFhLEdBQUcsVUFBVSxDQUFDLGFBQWEsQ0FBQTtTQUM5QzthQUFNLElBQUksVUFBVSxDQUFDLGFBQWEsRUFBRTtZQUNuQyxJQUFJLENBQUMscUJBQXFCLENBQUMsVUFBVSxDQUFDLGFBQWEsQ0FBQyxDQUFBO1NBQ3JEO2FBQU07WUFDTCxPQUFPLENBQUMsR0FBRyxDQUFDLDBCQUEwQixDQUFDLENBQUE7U0FDeEM7UUFDRCxJQUFJLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQyxJQUFJLENBQUE7UUFDM0IsSUFBSSxDQUFDLFVBQVUsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUE7UUFDL0MsSUFBSSxDQUFDLElBQUksR0FBRyxVQUFVLENBQUMsSUFBSSxDQUFBO0lBQzdCLENBQUM7SUFHRDs7O09BR0c7SUFDSCxxQkFBcUIsQ0FBQyxhQUFxQjtRQUN6QyxJQUFJLENBQUMsUUFBUSxHQUFHLElBQUksTUFBTSxDQUFDLGFBQWEsQ0FBQyxDQUFBO0lBQzNDLENBQUM7SUFFRDs7OztPQUlHO0lBQ0csS0FBSyxDQUFFLE9BQWdCOztZQUMzQixNQUFNLGFBQWEsR0FBRyxJQUFJLENBQUMsYUFBYSxDQUFDLFFBQVEsRUFBRSxDQUFBO1lBQ25ELE1BQU0sTUFBTSxDQUFDLElBQUksQ0FBQyxhQUFhLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFBO1FBQzdDLENBQUM7S0FBQTtJQUVEOztPQUVHO0lBQ0csSUFBSTs7UUFDVixDQUFDO0tBQUE7SUFFRCxrREFBa0Q7SUFDbEQsc0JBQXNCO0lBQ3RCLGtEQUFrRDtJQUNsRDs7T0FFRztJQUNILElBQUksUUFBUTtRQUNWLE9BQU8sSUFBSSxDQUFDLGFBQWEsQ0FBQTtJQUMzQixDQUFDO0lBQ0QsSUFBSSxRQUFRLENBQUUsV0FBVztRQUN2QixJQUFJLENBQUMsYUFBYSxHQUFHLFdBQVcsQ0FBQTtJQUNsQyxDQUFDO0lBRUQ7O09BRUc7SUFDSCxJQUFJLEdBQUc7UUFDTCxPQUFPLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQTtJQUN0QixDQUFDO0lBRUQ7O09BRUc7SUFDSCxJQUFJLFFBQVE7UUFDVixPQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFBO0lBQ3BELENBQUM7SUFFRDs7T0FFRztJQUNILE1BQU07UUFDSixJQUFJLENBQUMsSUFBSSxDQUFDLGFBQWEsRUFBRTtZQUN2QixPQUFPLElBQUksQ0FBQTtTQUNaO1FBQ0QsT0FBTyxLQUFLLENBQUE7SUFDZCxDQUFDO0lBRUQ7O09BRUc7SUFDSCxRQUFRO1FBQ04sSUFBSSxJQUFJLENBQUMsUUFBUSxZQUFZLE1BQU0sRUFBRTtZQUNuQyxPQUFPLElBQUksQ0FBQTtTQUNaO1FBQ0QsT0FBTyxLQUFLLENBQUE7SUFDZCxDQUFDO0lBRUQsV0FBVztRQUNULE9BQU8sS0FBSyxDQUFBO0lBQ2QsQ0FBQztJQUVELFFBQVE7UUFDTixPQUFPLEtBQUssQ0FBQTtJQUNkLENBQUM7SUFFRCxVQUFVO1FBQ1IsT0FBTyxLQUFLLENBQUE7SUFDZCxDQUFDO0lBRUQsZ0JBQWdCO0lBQ2hCLGNBQWMsQ0FBRSxXQUFtQjtRQUNqQyxJQUFJLFdBQVcsR0FBRyxJQUFJLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQTtRQUN0QyxJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksTUFBTSxDQUFDLFdBQVcsR0FBRyxHQUFHLENBQUMsRUFBQyxXQUFXLENBQUMsQ0FBQTtJQUMxRSxDQUFDO0NBQ0Y7QUF2SUQsOEJBdUlDIn0=
|
47
dist/smartfile.fs.d.ts
vendored
47
dist/smartfile.fs.d.ts
vendored
@ -1,6 +1,4 @@
|
|||||||
/// <reference types="q" />
|
import { Smartfile } from './smartfile.classes.smartfile';
|
||||||
import 'typings-global';
|
|
||||||
import plugins = require('./smartfile.plugins');
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param filePath
|
* @param filePath
|
||||||
@ -12,7 +10,7 @@ export declare let fileExistsSync: (filePath: any) => boolean;
|
|||||||
* @param filePath
|
* @param filePath
|
||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
export declare let fileExists: (filePath: any) => plugins.q.Promise<{}>;
|
export declare let fileExists: (filePath: any) => Promise<{}>;
|
||||||
/**
|
/**
|
||||||
* Checks if given path points to an existing directory
|
* Checks if given path points to an existing directory
|
||||||
*/
|
*/
|
||||||
@ -24,7 +22,7 @@ export declare let isFile: (pathArg: any) => boolean;
|
|||||||
/**
|
/**
|
||||||
* copies a file from A to B on the local disk
|
* copies a file from A to B on the local disk
|
||||||
*/
|
*/
|
||||||
export declare let copy: (fromArg: string, toArg: string) => plugins.q.Promise<{}>;
|
export declare let copy: (fromArg: string, toArg: string) => Promise<{}>;
|
||||||
/**
|
/**
|
||||||
* copies a file SYNCHRONOUSLY from A to B on the local disk
|
* copies a file SYNCHRONOUSLY from A to B on the local disk
|
||||||
*/
|
*/
|
||||||
@ -32,11 +30,21 @@ export declare let copySync: (fromArg: string, toArg: string) => boolean;
|
|||||||
/**
|
/**
|
||||||
* ensures that a directory is in place
|
* ensures that a directory is in place
|
||||||
*/
|
*/
|
||||||
export declare let ensureDir: (dirPathArg: string) => plugins.q.Promise<{}>;
|
export declare let ensureDir: (dirPathArg: string) => Promise<{}>;
|
||||||
/**
|
/**
|
||||||
* ensures that a directory is in place
|
* ensures that a directory is in place
|
||||||
*/
|
*/
|
||||||
export declare let ensureDirSync: (dirPathArg: string) => void;
|
export declare let ensureDirSync: (dirPathArg: string) => void;
|
||||||
|
/**
|
||||||
|
* ensure an empty directory
|
||||||
|
* @executes ASYNC
|
||||||
|
*/
|
||||||
|
export declare let ensureEmptyDir: (dirPathArg: string) => Promise<{}>;
|
||||||
|
/**
|
||||||
|
* ensure an empty directory
|
||||||
|
* @executes SYNC
|
||||||
|
*/
|
||||||
|
export declare let ensureEmptyDirSync: (dirPathArg: string) => void;
|
||||||
/**
|
/**
|
||||||
* ensures that a file is on disk
|
* ensures that a file is on disk
|
||||||
* @param filePath the filePath to ensureDir
|
* @param filePath the filePath to ensureDir
|
||||||
@ -44,7 +52,7 @@ export declare let ensureDirSync: (dirPathArg: string) => void;
|
|||||||
* @returns Promise<void>
|
* @returns Promise<void>
|
||||||
* @exec ASYNC
|
* @exec ASYNC
|
||||||
*/
|
*/
|
||||||
export declare let ensureFile: (filePathArg: any, initFileStringArg: any) => plugins.q.Promise<void>;
|
export declare let ensureFile: (filePathArg: any, initFileStringArg: any) => Promise<void>;
|
||||||
/**
|
/**
|
||||||
* ensures that a file is on disk
|
* ensures that a file is on disk
|
||||||
* @param filePath the filePath to ensureDir
|
* @param filePath the filePath to ensureDir
|
||||||
@ -56,18 +64,19 @@ export declare let ensureFileSync: (filePathArg: string, initFileStringArg: stri
|
|||||||
/**
|
/**
|
||||||
* removes a file or folder from local disk
|
* removes a file or folder from local disk
|
||||||
*/
|
*/
|
||||||
export declare let remove: (pathArg: string) => plugins.q.Promise<{}>;
|
export declare let remove: (pathArg: string) => Promise<void>;
|
||||||
/**
|
/**
|
||||||
* removes a file SYNCHRONOUSLY from local disk
|
* removes a file SYNCHRONOUSLY from local disk
|
||||||
*/
|
*/
|
||||||
export declare let removeSync: (pathArg: string) => boolean;
|
export declare let removeSync: (pathArg: string) => boolean;
|
||||||
/**
|
/**
|
||||||
*
|
* removes an array of filePaths from disk
|
||||||
* @param filePathArg
|
|
||||||
* @returns {*}
|
|
||||||
*/
|
*/
|
||||||
export declare let toGulpStreamSync: (filePathArg: string) => any;
|
export declare let removeMany: (filePathArrayArg: string[]) => Promise<void[]>;
|
||||||
export declare let toGulpDestSync: (folderPathArg: string) => any;
|
/**
|
||||||
|
* like removeFilePathArray but SYNCHRONOUSLY
|
||||||
|
*/
|
||||||
|
export declare let removeManySync: (filePathArrayArg: string[]) => void;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param filePathArg
|
* @param filePathArg
|
||||||
@ -80,7 +89,8 @@ export declare let toObjectSync: (filePathArg: any, fileTypeArg?: any) => any;
|
|||||||
* @param filePath
|
* @param filePath
|
||||||
* @returns {string|Buffer|any}
|
* @returns {string|Buffer|any}
|
||||||
*/
|
*/
|
||||||
export declare let toStringSync: (filePath: any) => any;
|
export declare let toStringSync: (filePath: string) => string;
|
||||||
|
export declare let fileTreeToObject: (dirPathArg: string, miniMatchFilter: string) => Promise<Smartfile[]>;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param filePathArg
|
* @param filePathArg
|
||||||
@ -98,7 +108,7 @@ export declare let requireReload: (path: string) => any;
|
|||||||
* lists Folders in a directory on local disk
|
* lists Folders in a directory on local disk
|
||||||
* @returns Promise
|
* @returns Promise
|
||||||
*/
|
*/
|
||||||
export declare let listFolders: (pathArg: string, regexFilter?: RegExp) => plugins.q.Promise<{}>;
|
export declare let listFolders: (pathArg: string, regexFilter?: RegExp) => Promise<{}>;
|
||||||
/**
|
/**
|
||||||
* lists Folders SYNCHRONOUSLY in a directory on local disk
|
* lists Folders SYNCHRONOUSLY in a directory on local disk
|
||||||
* @returns an array with the folder names as strings
|
* @returns an array with the folder names as strings
|
||||||
@ -108,7 +118,7 @@ export declare let listFoldersSync: (pathArg: string, regexFilter?: RegExp) => s
|
|||||||
* lists Files in a directory on local disk
|
* lists Files in a directory on local disk
|
||||||
* @returns Promise
|
* @returns Promise
|
||||||
*/
|
*/
|
||||||
export declare let listFiles: (pathArg: string, regexFilter?: RegExp) => plugins.q.Promise<{}>;
|
export declare let listFiles: (pathArg: string, regexFilter?: RegExp) => Promise<{}>;
|
||||||
/**
|
/**
|
||||||
* lists Files SYNCHRONOUSLY in a directory on local disk
|
* lists Files SYNCHRONOUSLY in a directory on local disk
|
||||||
* @returns an array with the folder names as strings
|
* @returns an array with the folder names as strings
|
||||||
@ -118,7 +128,7 @@ export declare let listFilesSync: (pathArg: string, regexFilter?: RegExp) => str
|
|||||||
* lists all items (folders AND files) in a directory on local disk
|
* lists all items (folders AND files) in a directory on local disk
|
||||||
* @returns Promise<string[]>
|
* @returns Promise<string[]>
|
||||||
*/
|
*/
|
||||||
export declare let listAllItems: (pathArg: string, regexFilter?: RegExp) => plugins.q.Promise<string[]>;
|
export declare let listAllItems: (pathArg: string, regexFilter?: RegExp) => Promise<string[]>;
|
||||||
/**
|
/**
|
||||||
* lists all items (folders AND files) in a directory on local disk
|
* lists all items (folders AND files) in a directory on local disk
|
||||||
* @returns an array with the folder names as strings
|
* @returns an array with the folder names as strings
|
||||||
@ -127,6 +137,7 @@ export declare let listAllItems: (pathArg: string, regexFilter?: RegExp) => plug
|
|||||||
export declare let listAllItemsSync: (pathArg: string, regexFilter?: RegExp) => string[];
|
export declare let listAllItemsSync: (pathArg: string, regexFilter?: RegExp) => string[];
|
||||||
/**
|
/**
|
||||||
* lists a file tree using a miniMatch filter
|
* lists a file tree using a miniMatch filter
|
||||||
|
* note: if the miniMatch Filter is an absolute path, the cwdArg will be omitted
|
||||||
* @returns Promise<string[]> string array with the absolute paths of all matching files
|
* @returns Promise<string[]> string array with the absolute paths of all matching files
|
||||||
*/
|
*/
|
||||||
export declare let listFileTree: (dirPath: string, miniMatchFilter: string) => plugins.q.Promise<string[]>;
|
export declare let listFileTree: (dirPathArg: string, miniMatchFilter: string) => Promise<string[]>;
|
||||||
|
138
dist/smartfile.fs.js
vendored
138
dist/smartfile.fs.js
vendored
File diff suppressed because one or more lines are too long
1
dist/smartfile.interpreter.d.ts
vendored
1
dist/smartfile.interpreter.d.ts
vendored
@ -1,3 +1,2 @@
|
|||||||
import 'typings-global';
|
|
||||||
export declare let filetype: (pathArg: string) => string;
|
export declare let filetype: (pathArg: string) => string;
|
||||||
export declare let objectFile: (fileStringArg: string, fileTypeArg: any) => any;
|
export declare let objectFile: (fileStringArg: string, fileTypeArg: any) => any;
|
||||||
|
6
dist/smartfile.interpreter.js
vendored
6
dist/smartfile.interpreter.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const plugins = require("./smartfile.plugins");
|
const plugins = require("./smartfile.plugins");
|
||||||
exports.filetype = (pathArg) => {
|
exports.filetype = (pathArg) => {
|
||||||
let extName = plugins.path.extname(pathArg);
|
let extName = plugins.path.extname(pathArg);
|
||||||
@ -14,8 +14,8 @@ exports.objectFile = (fileStringArg, fileTypeArg) => {
|
|||||||
case 'json':
|
case 'json':
|
||||||
return JSON.parse(fileStringArg);
|
return JSON.parse(fileStringArg);
|
||||||
default:
|
default:
|
||||||
plugins.beautylog.error('file type ' + fileTypeArg.blue + ' not supported');
|
console.error('file type ' + fileTypeArg.blue + ' not supported');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmludGVycHJldGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLmludGVycHJldGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwwQkFBdUI7QUFFdkIsK0NBQStDO0FBRXBDLFFBQUEsUUFBUSxHQUFHLENBQUMsT0FBZTtJQUNsQyxJQUFJLE9BQU8sR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQTtJQUMzQyxJQUFJLFFBQVEsR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLFlBQVksRUFBQyxJQUFJLENBQUMsQ0FBQSxDQUFDLHlCQUF5QjtJQUMzRSxNQUFNLENBQUMsUUFBUSxDQUFBO0FBQ25CLENBQUMsQ0FBQTtBQUVVLFFBQUEsVUFBVSxHQUFHLENBQUMsYUFBcUIsRUFBRSxXQUFXO0lBQ3ZELE1BQU0sQ0FBQyxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUM7UUFDbEIsS0FBSyxLQUFLLENBQUU7UUFDWixLQUFLLE1BQU07WUFDUCxNQUFNLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsYUFBYSxDQUFDLENBQUE7UUFDL0MsS0FBSyxNQUFNO1lBQ1AsTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsYUFBYSxDQUFDLENBQUE7UUFDcEM7WUFDSSxPQUFPLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxZQUFZLEdBQUcsV0FBVyxDQUFDLElBQUksR0FBRyxnQkFBZ0IsQ0FBQyxDQUFBO1lBQzNFLEtBQUssQ0FBQTtJQUNiLENBQUM7QUFDTCxDQUFDLENBQUEifQ==
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLmludGVycHJldGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRmaWxlLmludGVycHJldGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsK0NBQStDO0FBRXBDLFFBQUEsUUFBUSxHQUFHLENBQUMsT0FBZSxFQUFVLEVBQUU7SUFDOUMsSUFBSSxPQUFPLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDM0MsSUFBSSxRQUFRLEdBQUcsT0FBTyxDQUFDLE9BQU8sQ0FBQyxZQUFZLEVBQUMsSUFBSSxDQUFDLENBQUEsQ0FBQyx5QkFBeUI7SUFDM0UsT0FBTyxRQUFRLENBQUE7QUFDbkIsQ0FBQyxDQUFBO0FBRVUsUUFBQSxVQUFVLEdBQUcsQ0FBQyxhQUFxQixFQUFFLFdBQVcsRUFBRSxFQUFFO0lBQzNELFFBQVEsV0FBVyxFQUFFO1FBQ2pCLEtBQUssS0FBSyxDQUFFO1FBQ1osS0FBSyxNQUFNO1lBQ1AsT0FBTyxPQUFPLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQUMsQ0FBQTtRQUMvQyxLQUFLLE1BQU07WUFDUCxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsYUFBYSxDQUFDLENBQUE7UUFDcEM7WUFDSSxPQUFPLENBQUMsS0FBSyxDQUFDLFlBQVksR0FBRyxXQUFXLENBQUMsSUFBSSxHQUFHLGdCQUFnQixDQUFDLENBQUE7WUFDakUsTUFBSztLQUNaO0FBQ0wsQ0FBQyxDQUFBIn0=
|
52
dist/smartfile.memory.d.ts
vendored
52
dist/smartfile.memory.d.ts
vendored
@ -1,15 +1,4 @@
|
|||||||
/// <reference types="vinyl" />
|
import { Smartfile } from './smartfile.classes.smartfile';
|
||||||
/// <reference types="q" />
|
|
||||||
import 'typings-global';
|
|
||||||
import plugins = require('./smartfile.plugins');
|
|
||||||
/**
|
|
||||||
* allows you to create a gulp stream
|
|
||||||
* from String, from an Array of Strings, from Vinyl File, from an Array of VinylFiles
|
|
||||||
* @param fileArg
|
|
||||||
* @returns stream.Readable
|
|
||||||
* @TODO: make it async;
|
|
||||||
*/
|
|
||||||
export declare let toGulpStream: (fileArg: string | string[] | plugins.vinyl | plugins.vinyl[], baseArg?: string) => any;
|
|
||||||
/**
|
/**
|
||||||
* converts file to Object
|
* converts file to Object
|
||||||
* @param fileStringArg
|
* @param fileStringArg
|
||||||
@ -17,35 +6,20 @@ export declare let toGulpStream: (fileArg: string | string[] | plugins.vinyl | p
|
|||||||
* @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;
|
|
||||||
}) => plugins.vinyl;
|
|
||||||
/**
|
|
||||||
* 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 toStringSync: (fileArg: plugins.vinyl) => any;
|
|
||||||
/**
|
|
||||||
* 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 | plugins.vinyl, filePathArg: any) => plugins.q.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>;
|
||||||
|
135
dist/smartfile.memory.js
vendored
135
dist/smartfile.memory.js
vendored
File diff suppressed because one or more lines are too long
14
dist/smartfile.plugins.d.ts
vendored
14
dist/smartfile.plugins.d.ts
vendored
@ -1,16 +1,10 @@
|
|||||||
import 'typings-global';
|
|
||||||
export import beautylog = require('beautylog');
|
|
||||||
export import fs = require('fs');
|
export import fs = require('fs');
|
||||||
export import fsExtra = require('fs-extra');
|
export import fsExtra = require('fs-extra');
|
||||||
export declare let gulp: any;
|
|
||||||
export declare let glob: any;
|
export declare let glob: any;
|
||||||
export declare let g: {
|
|
||||||
remoteSrc: any;
|
|
||||||
};
|
|
||||||
export import path = require('path');
|
export import path = require('path');
|
||||||
export import q = require('q');
|
export import smartpromise = require('@pushrocks/smartpromise');
|
||||||
export import vinyl = require('vinyl');
|
export import smartrequest = require('smartrequest');
|
||||||
|
export declare let requireReload: any;
|
||||||
|
export import smartpath = require('smartpath');
|
||||||
export declare let vinylFile: any;
|
export declare let vinylFile: any;
|
||||||
export declare let yaml: any;
|
export declare let yaml: any;
|
||||||
export declare let request: any;
|
|
||||||
export declare let requireReload: any;
|
|
||||||
|
17
dist/smartfile.plugins.js
vendored
17
dist/smartfile.plugins.js
vendored
@ -1,18 +1,13 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.beautylog = require("beautylog");
|
|
||||||
exports.fs = require("fs");
|
exports.fs = require("fs");
|
||||||
exports.fsExtra = require("fs-extra");
|
exports.fsExtra = require("fs-extra");
|
||||||
exports.gulp = require('gulp');
|
|
||||||
exports.glob = require('glob');
|
exports.glob = require('glob');
|
||||||
exports.g = {
|
|
||||||
remoteSrc: require('gulp-remote-src')
|
|
||||||
};
|
|
||||||
exports.path = require("path");
|
exports.path = require("path");
|
||||||
exports.q = require("q");
|
exports.smartpromise = require("@pushrocks/smartpromise");
|
||||||
exports.vinyl = require("vinyl");
|
exports.smartrequest = require("smartrequest");
|
||||||
|
exports.requireReload = require('require-reload');
|
||||||
|
exports.smartpath = require("smartpath");
|
||||||
exports.vinylFile = require('vinyl-file');
|
exports.vinylFile = require('vinyl-file');
|
||||||
exports.yaml = require('js-yaml');
|
exports.yaml = require('js-yaml');
|
||||||
exports.request = require('request');
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGZpbGUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJCQUFnQztBQUNoQyxzQ0FBMkM7QUFDaEMsUUFBQSxJQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFBO0FBQ2pDLCtCQUFvQztBQUNwQywwREFBK0Q7QUFDL0QsK0NBQW9EO0FBQ3pDLFFBQUEsYUFBYSxHQUFHLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3BELHlDQUE4QztBQUNuQyxRQUFBLFNBQVMsR0FBRyxPQUFPLENBQUMsWUFBWSxDQUFDLENBQUE7QUFDakMsUUFBQSxJQUFJLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFBIn0=
|
||||||
exports.requireReload = require('require-reload');
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGZpbGUucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLHlDQUE4QztBQUM5QywyQkFBZ0M7QUFDaEMsc0NBQTJDO0FBQ2hDLFFBQUEsSUFBSSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQTtBQUN0QixRQUFBLElBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUE7QUFDdEIsUUFBQSxDQUFDLEdBQUc7SUFDWCxTQUFTLEVBQUUsT0FBTyxDQUFDLGlCQUFpQixDQUFDO0NBQ3hDLENBQUE7QUFDRCwrQkFBb0M7QUFDcEMseUJBQThCO0FBQzlCLGlDQUFzQztBQUMzQixRQUFBLFNBQVMsR0FBRyxPQUFPLENBQUMsWUFBWSxDQUFDLENBQUE7QUFDakMsUUFBQSxJQUFJLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFBO0FBQ3pCLFFBQUEsT0FBTyxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQTtBQUM1QixRQUFBLGFBQWEsR0FBRyxPQUFPLENBQUMsZ0JBQWdCLENBQUMsQ0FBQSJ9
|
|
14
dist/smartfile.remote.d.ts
vendored
14
dist/smartfile.remote.d.ts
vendored
@ -1,22 +1,12 @@
|
|||||||
/// <reference types="q" />
|
|
||||||
import 'typings-global';
|
|
||||||
import plugins = require('./smartfile.plugins');
|
|
||||||
export declare let toFs: (from: string, toPath: string) => plugins.q.Promise<{}>;
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param filePathArg
|
|
||||||
* @returns {*}
|
|
||||||
*/
|
|
||||||
export declare let toGulpStreamSync: (filePathArg: string, baseArg: string) => any;
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param fromArg
|
* @param fromArg
|
||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
export declare let toObject: (fromArg: string) => plugins.q.Promise<{}>;
|
export declare let toObject: (fromArg: string) => Promise<{}>;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param fromArg
|
* @param fromArg
|
||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
export declare let toString: (fromArg: string) => plugins.q.Promise<{}>;
|
export declare let toString: (fromArg: string) => Promise<{}>;
|
||||||
|
59
dist/smartfile.remote.js
vendored
59
dist/smartfile.remote.js
vendored
@ -1,43 +1,30 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const plugins = require("./smartfile.plugins");
|
const plugins = require("./smartfile.plugins");
|
||||||
const SmartfileInterpreter = require("./smartfile.interpreter");
|
/* export let toFs = function (from: string, toPath: string) {
|
||||||
exports.toFs = function (from, toPath) {
|
let done = plugins.q.defer()
|
||||||
let done = plugins.q.defer();
|
let stream = plugins.smartrequest(from).pipe(plugins.fsExtra.createWriteStream(toPath))
|
||||||
let stream = plugins.request(from).pipe(plugins.fsExtra.createWriteStream(toPath));
|
stream.on('finish', function () {
|
||||||
stream.on('finish', function () {
|
done.resolve(toPath)
|
||||||
done.resolve(toPath);
|
})
|
||||||
});
|
return done.promise
|
||||||
return done.promise;
|
} */
|
||||||
};
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param filePathArg
|
|
||||||
* @returns {*}
|
|
||||||
*/
|
|
||||||
exports.toGulpStreamSync = function (filePathArg, baseArg) {
|
|
||||||
let stream = plugins.g.remoteSrc(filePathArg, {
|
|
||||||
base: baseArg
|
|
||||||
});
|
|
||||||
return stream;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param fromArg
|
* @param fromArg
|
||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
exports.toObject = function (fromArg) {
|
exports.toObject = function (fromArg) {
|
||||||
let done = plugins.q.defer();
|
let done = plugins.smartpromise.defer();
|
||||||
plugins.request.get(fromArg, function (error, response, bodyString) {
|
plugins.smartrequest.request(fromArg, {
|
||||||
let returnObject;
|
method: 'get'
|
||||||
if (!error && response.statusCode === 200) {
|
}).then((res) => {
|
||||||
returnObject = SmartfileInterpreter.objectFile(bodyString, SmartfileInterpreter.filetype(fromArg));
|
if (res.statusCode === 200) {
|
||||||
done.resolve(returnObject);
|
done.resolve(res.body);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log('could not get remote file from ' + fromArg);
|
console.log('could not get remote file from ' + fromArg);
|
||||||
returnObject = undefined;
|
done.reject(new Error('could not get remote file from ' + fromArg));
|
||||||
done.reject(returnObject);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return done.promise;
|
return done.promise;
|
||||||
@ -48,17 +35,15 @@ exports.toObject = function (fromArg) {
|
|||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
exports.toString = (fromArg) => {
|
exports.toString = (fromArg) => {
|
||||||
let done = plugins.q.defer();
|
let done = plugins.smartpromise.defer();
|
||||||
plugins.request.get(fromArg, function (error, response, bodyString) {
|
plugins.smartrequest.get(fromArg).then((res) => {
|
||||||
if (!error && response.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
done.resolve(bodyString);
|
done.resolve(res.body);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
plugins.beautylog.error('could not get remote file from ' + fromArg);
|
done.reject(new Error('could not get remote file from ' + fromArg));
|
||||||
bodyString = undefined;
|
|
||||||
done.reject(bodyString);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return done.promise;
|
return done.promise;
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLnJlbW90ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZmlsZS5yZW1vdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDBCQUF1QjtBQUN2QiwrQ0FBK0M7QUFDL0MsZ0VBQWdFO0FBRXJELFFBQUEsSUFBSSxHQUFHLFVBQVMsSUFBWSxFQUFDLE1BQWM7SUFDbEQsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtJQUM1QixJQUFJLE1BQU0sR0FBRyxPQUFPLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLGlCQUFpQixDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUE7SUFDbEYsTUFBTSxDQUFDLEVBQUUsQ0FBQyxRQUFRLEVBQUM7UUFDZixJQUFJLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFBO0lBQ3hCLENBQUMsQ0FBQyxDQUFBO0lBQ0YsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUE7QUFDdkIsQ0FBQyxDQUFBO0FBRUQ7Ozs7R0FJRztBQUNRLFFBQUEsZ0JBQWdCLEdBQUcsVUFBUyxXQUFtQixFQUFDLE9BQWU7SUFDdEUsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsV0FBVyxFQUFFO1FBQzFDLElBQUksRUFBRSxPQUFPO0tBQ2hCLENBQUMsQ0FBQTtJQUNGLE1BQU0sQ0FBQyxNQUFNLENBQUE7QUFDakIsQ0FBQyxDQUFBO0FBRUQ7Ozs7R0FJRztBQUNRLFFBQUEsUUFBUSxHQUFHLFVBQVMsT0FBZTtJQUMxQyxJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFBO0lBQzVCLE9BQU8sQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLE9BQU8sRUFBRSxVQUFVLEtBQUssRUFBRSxRQUFRLEVBQUUsVUFBVTtRQUM5RCxJQUFJLFlBQVksQ0FBQTtRQUNoQixFQUFFLENBQUMsQ0FBQyxDQUFDLEtBQUssSUFBSSxRQUFRLENBQUMsVUFBVSxLQUFLLEdBQUcsQ0FBQyxDQUFDLENBQUM7WUFDeEMsWUFBWSxHQUFHLG9CQUFvQixDQUFDLFVBQVUsQ0FBQyxVQUFVLEVBQUMsb0JBQW9CLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUE7WUFDakcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxZQUFZLENBQUMsQ0FBQTtRQUM5QixDQUFDO1FBQUMsSUFBSSxDQUFDLENBQUM7WUFDSixPQUFPLENBQUMsR0FBRyxDQUFDLGlDQUFpQyxHQUFHLE9BQU8sQ0FBQyxDQUFBO1lBQ3hELFlBQVksR0FBRyxTQUFTLENBQUE7WUFDeEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBQTtRQUM3QixDQUFDO0lBQ0wsQ0FBQyxDQUFDLENBQUE7SUFDRixNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtBQUN2QixDQUFDLENBQUE7QUFFRDs7OztHQUlHO0FBQ1EsUUFBQSxRQUFRLEdBQUcsQ0FBQyxPQUFlO0lBQ2xDLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUE7SUFDNUIsT0FBTyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsT0FBTyxFQUFFLFVBQVUsS0FBSyxFQUFFLFFBQVEsRUFBRSxVQUFVO1FBQzlELEVBQUUsQ0FBQyxDQUFDLENBQUMsS0FBSyxJQUFJLFFBQVEsQ0FBQyxVQUFVLEtBQUssR0FBRyxDQUFDLENBQUMsQ0FBQztZQUN4QyxJQUFJLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFBO1FBQzVCLENBQUM7UUFBQyxJQUFJLENBQUMsQ0FBQztZQUNKLE9BQU8sQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLGlDQUFpQyxHQUFHLE9BQU8sQ0FBQyxDQUFBO1lBQ3BFLFVBQVUsR0FBRyxTQUFTLENBQUE7WUFDdEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxVQUFVLENBQUMsQ0FBQTtRQUMzQixDQUFDO0lBQ0wsQ0FBQyxDQUFDLENBQUE7SUFDRixNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtBQUN2QixDQUFDLENBQUEifQ==
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRmaWxlLnJlbW90ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0ZmlsZS5yZW1vdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwrQ0FBK0M7QUFHL0M7Ozs7Ozs7SUFPSTtBQUVKOzs7O0dBSUc7QUFDUSxRQUFBLFFBQVEsR0FBRyxVQUFVLE9BQWU7SUFDN0MsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxLQUFLLEVBQUUsQ0FBQTtJQUN2QyxPQUFPLENBQUMsWUFBWSxDQUFDLE9BQU8sQ0FBQyxPQUFPLEVBQUU7UUFDcEMsTUFBTSxFQUFFLEtBQUs7S0FDZCxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsR0FBUSxFQUFFLEVBQUU7UUFDbkIsSUFBSSxHQUFHLENBQUMsVUFBVSxLQUFLLEdBQUcsRUFBRTtZQUMxQixJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQTtTQUN2QjthQUFNO1lBQ0wsT0FBTyxDQUFDLEdBQUcsQ0FBQyxpQ0FBaUMsR0FBRyxPQUFPLENBQUMsQ0FBQTtZQUN4RCxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLGlDQUFpQyxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUE7U0FDcEU7SUFDSCxDQUFDLENBQUMsQ0FBQTtJQUNGLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQTtBQUNyQixDQUFDLENBQUE7QUFFRDs7OztHQUlHO0FBQ1EsUUFBQSxRQUFRLEdBQUcsQ0FBQyxPQUFlLEVBQUUsRUFBRTtJQUN4QyxJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsWUFBWSxDQUFDLEtBQUssRUFBRSxDQUFBO0lBQ3ZDLE9BQU8sQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLEdBQVEsRUFBRSxFQUFFO1FBQ2xELElBQUksR0FBRyxDQUFDLFVBQVUsS0FBSyxHQUFHLEVBQUU7WUFDMUIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLENBQUE7U0FDdkI7YUFBTTtZQUNMLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsaUNBQWlDLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQTtTQUNwRTtJQUNILENBQUMsQ0FBQyxDQUFBO0lBQ0YsT0FBTyxJQUFJLENBQUMsT0FBTyxDQUFBO0FBQ3JCLENBQUMsQ0FBQSJ9
|
38
docs/index.md
Normal file
38
docs/index.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# smartfile
|
||||||
|
make files easily accessible for processing in javascript.
|
||||||
|
|
||||||
|
## Availabililty
|
||||||
|
[](https://www.npmjs.com/package/smartfile)
|
||||||
|
[](https://gitlab.com/pushrocks/smartfile)
|
||||||
|
[](https://github.com/pushrocks/smartfile)
|
||||||
|
[](https://pushrocks.gitlab.io/smartfile/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[](https://gitlab.com/pushrocks/smartfile/commits/master)
|
||||||
|
[](https://gitlab.com/pushrocks/smartfile/commits/master)
|
||||||
|
[](https://david-dm.org/pushrocks/smartfile)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/smartfile/master/dependencies/npm)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/smartfile)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](http://standardjs.com/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
smartfile is an approach of being one tool to handle files in diverse environments.
|
||||||
|
|
||||||
|
### Smartfile Sections
|
||||||
|
smartfile thinks in sections:
|
||||||
|
|
||||||
|
section | description
|
||||||
|
--- | ---
|
||||||
|
fs | (object) gets data from fs to somewhere
|
||||||
|
memory | gets data from memory to somewhere
|
||||||
|
remote | gets data from remote locations to somewhere
|
||||||
|
interpreter | (object) handles yaml and json
|
||||||
|
smartfile | (class) a virtual representation of a file, alternative to vinyl file format
|
||||||
|
|
||||||
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
|
||||||
|
[](https://push.rocks)
|
@ -5,5 +5,10 @@
|
|||||||
},
|
},
|
||||||
"npmdocker":{
|
"npmdocker":{
|
||||||
|
|
||||||
|
},
|
||||||
|
"npmci": {
|
||||||
|
"npmGlobalTools": [
|
||||||
|
"npmts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
766
package-lock.json
generated
Normal file
766
package-lock.json
generated
Normal file
@ -0,0 +1,766 @@
|
|||||||
|
{
|
||||||
|
"name": "@pushrocks/smartfile",
|
||||||
|
"version": "6.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@airbnb/node-memwatch": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@airbnb/node-memwatch/-/node-memwatch-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-2R+MEEMSTUdKwQ6NFWkyA/UNoSjL1tMldZqJbZpgXSwNMBzlNlkUWEXKu9RqTTMkDqJRfGJ2VDs8gPlPK2APDQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"bindings": "^1.3.0",
|
||||||
|
"nan": "^2.9.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@pushrocks/smartpromise": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartpromise/-/smartpromise-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-Rr4aLO2spAQ58TB9l3UwVs+keQu7gPXcYSO/5zLYNimEP7H237tFApX/qk80nwvHh2ATTBTgu0IcWKhHb5uVow==",
|
||||||
|
"requires": {
|
||||||
|
"util.promisify": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/chai": {
|
||||||
|
"version": "4.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.4.tgz",
|
||||||
|
"integrity": "sha512-h6+VEw2Vr3ORiFCyyJmcho2zALnUq9cvdB/IO8Xs9itrJVCenC7o26A6+m7D0ihTTr65eS259H5/Ghl/VjYs6g==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@types/chai-as-promised": {
|
||||||
|
"version": "7.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.0.tgz",
|
||||||
|
"integrity": "sha512-MFiW54UOSt+f2bRw8J7LgQeIvE/9b4oGvwU7XW30S9QGAiHGnU/fmiOprsyMkdmH2rl8xSPc0/yrQw8juXU6bQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/chai": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/chai-string": {
|
||||||
|
"version": "1.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/chai-string/-/chai-string-1.4.1.tgz",
|
||||||
|
"integrity": "sha512-aRNMs6TKgjgPlCHwDfq/YNy5VtRR2hJ4AUWByddrT0TRVVD8eX4MiHW6/iHvmQHRlVuuPZcwnTUE7b4yFt7bEA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/chai": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/fs-extra": {
|
||||||
|
"version": "5.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.3.tgz",
|
||||||
|
"integrity": "sha512-m2QKoRrJnei1s10e1ZfMIa7QcABBVLdQhVUv5+bMRaHhPzxO/IWMmREiags59AqFbI+piWPq/PupTahNS/0kyA==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": {
|
||||||
|
"version": "10.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.1.tgz",
|
||||||
|
"integrity": "sha512-AFLl1IALIuyt6oK4AYZsgWVJ/5rnyzQWud7IebaZWWV3YmgtPZkQmYio9R5Ze/2pdd7XfqF5bP+hWS11mAKoOQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/node": {
|
||||||
|
"version": "10.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.1.tgz",
|
||||||
|
"integrity": "sha512-AFLl1IALIuyt6oK4AYZsgWVJ/5rnyzQWud7IebaZWWV3YmgtPZkQmYio9R5Ze/2pdd7XfqF5bP+hWS11mAKoOQ=="
|
||||||
|
},
|
||||||
|
"@types/through2": {
|
||||||
|
"version": "2.0.33",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/through2/-/through2-2.0.33.tgz",
|
||||||
|
"integrity": "sha1-H/LoihAN+1sUDnu5h5HxGUQA0TE=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/vinyl": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-2iYpNuOl98SrLPBZfEN9Mh2JCJ2EI9HU35SfgBEb51DcmaHkhp8cKMblYeBqMQiwXMgAD3W60DbQ4i/UdLiXhw==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ansi-256-colors": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-kQ3lDvzHwJ49gvL4er1rcAwYgYo=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"argparse": {
|
||||||
|
"version": "1.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||||
|
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||||
|
"requires": {
|
||||||
|
"sprintf-js": "~1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"assertion-error": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"balanced-match": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||||
|
},
|
||||||
|
"beautycolor": {
|
||||||
|
"version": "1.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/beautycolor/-/beautycolor-1.0.11.tgz",
|
||||||
|
"integrity": "sha512-Uxl/39+2uqixPzsrV+0NOHf0sJlWmsKnRTV0oz8+bfwnHPA/E+SZuh3Upn3OXobv0W7LZg5BVoLj1nkMj7m5jA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-256-colors": "^1.1.0",
|
||||||
|
"typings-global": "^1.0.14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bindings": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"requires": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chai": {
|
||||||
|
"version": "4.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz",
|
||||||
|
"integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"assertion-error": "^1.0.1",
|
||||||
|
"check-error": "^1.0.1",
|
||||||
|
"deep-eql": "^3.0.0",
|
||||||
|
"get-func-name": "^2.0.0",
|
||||||
|
"pathval": "^1.0.0",
|
||||||
|
"type-detect": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chai-as-promised": {
|
||||||
|
"version": "7.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz",
|
||||||
|
"integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"check-error": "^1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chai-string": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chai-string/-/chai-string-1.4.0.tgz",
|
||||||
|
"integrity": "sha1-NZFAwFHTak5LGl/GuRAVL0OKjUk=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"check-error": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"clone": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs="
|
||||||
|
},
|
||||||
|
"clone-buffer": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg="
|
||||||
|
},
|
||||||
|
"clone-stats": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA="
|
||||||
|
},
|
||||||
|
"cloneable-readable": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==",
|
||||||
|
"requires": {
|
||||||
|
"inherits": "^2.0.1",
|
||||||
|
"process-nextick-args": "^2.0.0",
|
||||||
|
"readable-stream": "^2.3.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||||
|
},
|
||||||
|
"core-util-is": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||||
|
},
|
||||||
|
"deep-eql": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"type-detect": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"define-properties": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
|
||||||
|
"requires": {
|
||||||
|
"foreach": "^2.0.5",
|
||||||
|
"object-keys": "^1.0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"early": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/early/-/early-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-hB4jJU6l3FTYr67ugvWrZcAO4jw=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"beautycolor": "^1.0.7",
|
||||||
|
"smartq": "^1.1.1",
|
||||||
|
"typings-global": "^1.0.16"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"smartq": {
|
||||||
|
"version": "1.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.8.tgz",
|
||||||
|
"integrity": "sha512-FURlYW/C3bLeZjJcBVyw7bxCyQoCXiXbLCZcDUKznhXHaLu35c8m33/a2H8CA0rtb82lvzN8dRLnBZAcNMzNHQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"util.promisify": "^1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"es-abstract": {
|
||||||
|
"version": "1.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
|
||||||
|
"integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",
|
||||||
|
"requires": {
|
||||||
|
"es-to-primitive": "^1.1.1",
|
||||||
|
"function-bind": "^1.1.1",
|
||||||
|
"has": "^1.0.1",
|
||||||
|
"is-callable": "^1.1.3",
|
||||||
|
"is-regex": "^1.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"es-to-primitive": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=",
|
||||||
|
"requires": {
|
||||||
|
"is-callable": "^1.1.1",
|
||||||
|
"is-date-object": "^1.0.1",
|
||||||
|
"is-symbol": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"es6-error": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"esprima": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw=="
|
||||||
|
},
|
||||||
|
"first-chunk-stream": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=",
|
||||||
|
"requires": {
|
||||||
|
"readable-stream": "^2.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"foreach": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
|
||||||
|
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
|
||||||
|
},
|
||||||
|
"fs-extra": {
|
||||||
|
"version": "6.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz",
|
||||||
|
"integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==",
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.2",
|
||||||
|
"jsonfile": "^4.0.0",
|
||||||
|
"universalify": "^0.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fs.realpath": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||||
|
},
|
||||||
|
"function-bind": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||||
|
},
|
||||||
|
"get-func-name": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"glob": {
|
||||||
|
"version": "7.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||||
|
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
|
||||||
|
"requires": {
|
||||||
|
"fs.realpath": "^1.0.0",
|
||||||
|
"inflight": "^1.0.4",
|
||||||
|
"inherits": "2",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"path-is-absolute": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"graceful-fs": {
|
||||||
|
"version": "4.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||||
|
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
|
||||||
|
},
|
||||||
|
"gulp-function": {
|
||||||
|
"version": "2.2.14",
|
||||||
|
"resolved": "https://registry.npmjs.org/gulp-function/-/gulp-function-2.2.14.tgz",
|
||||||
|
"integrity": "sha512-tNNqKklcSia6AbOyPfvSUSXc3dOq7ZSuCN/o3YE0IcJVZdzftqgSFeeqTgyzvWMpPldo2lZ7D4jeW+kr52fUxw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/through2": "^2.0.32",
|
||||||
|
"smartq": "^1.1.6",
|
||||||
|
"through2": "^2.0.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"smartq": {
|
||||||
|
"version": "1.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.8.tgz",
|
||||||
|
"integrity": "sha512-FURlYW/C3bLeZjJcBVyw7bxCyQoCXiXbLCZcDUKznhXHaLu35c8m33/a2H8CA0rtb82lvzN8dRLnBZAcNMzNHQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"util.promisify": "^1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||||
|
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||||
|
"requires": {
|
||||||
|
"function-bind": "^1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/home/-/home-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-lqQjzrSbmDeP9e886uBZpVf53TU=",
|
||||||
|
"requires": {
|
||||||
|
"os-homedir": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inflight": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
|
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||||
|
"requires": {
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||||
|
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||||
|
},
|
||||||
|
"is-callable": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI="
|
||||||
|
},
|
||||||
|
"is-date-object": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY="
|
||||||
|
},
|
||||||
|
"is-regex": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
|
||||||
|
"integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
|
||||||
|
"requires": {
|
||||||
|
"has": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-symbol": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI="
|
||||||
|
},
|
||||||
|
"is-utf8": {
|
||||||
|
"version": "0.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
|
||||||
|
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
|
||||||
|
},
|
||||||
|
"isarray": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
||||||
|
},
|
||||||
|
"js-yaml": {
|
||||||
|
"version": "3.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
|
||||||
|
"integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
|
||||||
|
"requires": {
|
||||||
|
"argparse": "^1.0.7",
|
||||||
|
"esprima": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"jsonfile": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||||
|
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"leakage": {
|
||||||
|
"version": "0.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/leakage/-/leakage-0.4.0.tgz",
|
||||||
|
"integrity": "sha512-x7gYK5n5dPkHDZWJ2Kh8Ag1hZNzUh+HtXn8Bv1aDdN6o6ONPCJ8sOfFq+kxcULJFp3lXaCjXb3iXOLmQRbBLwA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@airbnb/node-memwatch": "^1.0.2",
|
||||||
|
"es6-error": "^4.0.2",
|
||||||
|
"left-pad": "^1.1.3",
|
||||||
|
"minimist": "^1.2.0",
|
||||||
|
"pretty-bytes": "^4.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"left-pad": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"minimatch": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||||
|
"requires": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimist": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||||
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"nan": {
|
||||||
|
"version": "2.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
|
||||||
|
"integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"object-keys": {
|
||||||
|
"version": "1.0.12",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
|
||||||
|
"integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag=="
|
||||||
|
},
|
||||||
|
"object.getownpropertydescriptors": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
|
||||||
|
"integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
|
||||||
|
"requires": {
|
||||||
|
"define-properties": "^1.1.2",
|
||||||
|
"es-abstract": "^1.5.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"once": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
|
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||||
|
"requires": {
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"os-homedir": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
|
||||||
|
},
|
||||||
|
"path-is-absolute": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||||
|
},
|
||||||
|
"pathval": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"pify": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||||
|
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
|
||||||
|
},
|
||||||
|
"pretty-bytes": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
|
||||||
|
"integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"process-nextick-args": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
|
||||||
|
},
|
||||||
|
"readable-stream": {
|
||||||
|
"version": "2.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||||
|
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||||
|
"requires": {
|
||||||
|
"core-util-is": "~1.0.0",
|
||||||
|
"inherits": "~2.0.3",
|
||||||
|
"isarray": "~1.0.0",
|
||||||
|
"process-nextick-args": "~2.0.0",
|
||||||
|
"safe-buffer": "~5.1.1",
|
||||||
|
"string_decoder": "~1.1.1",
|
||||||
|
"util-deprecate": "~1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"remove-trailing-separator": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
|
||||||
|
},
|
||||||
|
"replace-ext": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs="
|
||||||
|
},
|
||||||
|
"require-reload": {
|
||||||
|
"version": "0.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/require-reload/-/require-reload-0.2.2.tgz",
|
||||||
|
"integrity": "sha1-KadZGEbK+RtuijzamRaD+V+NfUI="
|
||||||
|
},
|
||||||
|
"safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
|
},
|
||||||
|
"smartchai": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartchai/-/smartchai-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-9M+R56OhAHXScxgr2vzQqxGx0XMS0QXriNZuP7hjlbVbo2FUT+l60iEzbwPt9Ga+5u2cEEjSSoZEQVqlROaddA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/chai": "^4.1.2",
|
||||||
|
"@types/chai-as-promised": "^7.1.0",
|
||||||
|
"@types/chai-string": "^1.4.0",
|
||||||
|
"chai": "^4.1.2",
|
||||||
|
"chai-as-promised": "^7.1.1",
|
||||||
|
"chai-string": "^1.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"smartdelay": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartdelay/-/smartdelay-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-ab+d8ADiMMPKwrQNhoJYjmOR20VIIIxjknoEF9/PfMryic7tmvTmFrDMdcnMRohGNw/pN+4/I5dSUBdsDya7uw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"smartq": "^1.1.1",
|
||||||
|
"typings-global": "^1.0.16"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"smartq": {
|
||||||
|
"version": "1.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.8.tgz",
|
||||||
|
"integrity": "sha512-FURlYW/C3bLeZjJcBVyw7bxCyQoCXiXbLCZcDUKznhXHaLu35c8m33/a2H8CA0rtb82lvzN8dRLnBZAcNMzNHQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"util.promisify": "^1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"smartpath": {
|
||||||
|
"version": "3.2.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartpath/-/smartpath-3.2.8.tgz",
|
||||||
|
"integrity": "sha1-SDS9OouuIpW6rK26I8h6UBlS+UA=",
|
||||||
|
"requires": {
|
||||||
|
"home": "^1.0.1",
|
||||||
|
"typings-global": "^1.0.14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"smartrequest": {
|
||||||
|
"version": "1.0.13",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartrequest/-/smartrequest-1.0.13.tgz",
|
||||||
|
"integrity": "sha512-OHrvzaxaA8Z8bJr33yxnyJF35nrWyaumsajqXm2Zkv0/2hfWO1NQAj02VVV51rLQfmtU0Hex7Nk19SoC8nOmYg==",
|
||||||
|
"requires": {
|
||||||
|
"smartq": "^1.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"smartq": {
|
||||||
|
"version": "1.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.8.tgz",
|
||||||
|
"integrity": "sha512-FURlYW/C3bLeZjJcBVyw7bxCyQoCXiXbLCZcDUKznhXHaLu35c8m33/a2H8CA0rtb82lvzN8dRLnBZAcNMzNHQ==",
|
||||||
|
"requires": {
|
||||||
|
"util.promisify": "^1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sprintf-js": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
|
||||||
|
},
|
||||||
|
"string_decoder": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||||
|
"requires": {
|
||||||
|
"safe-buffer": "~5.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-bom": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
|
||||||
|
"requires": {
|
||||||
|
"is-utf8": "^0.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-bom-buf": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=",
|
||||||
|
"requires": {
|
||||||
|
"is-utf8": "^0.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-bom-stream": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=",
|
||||||
|
"requires": {
|
||||||
|
"first-chunk-stream": "^2.0.0",
|
||||||
|
"strip-bom": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tapbundle": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/tapbundle/-/tapbundle-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-y3ulfK4GKoVkuqF2QsrwVMWLXHqXeoDEzsw/Q9ZTJumNINbx4bcWPAdg2IcTHYgJHeSdF03HiB9EbHoUTRjD9Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"early": "^2.1.1",
|
||||||
|
"leakage": "^0.4.0",
|
||||||
|
"smartchai": "^2.0.1",
|
||||||
|
"smartdelay": "^1.0.4",
|
||||||
|
"smartq": "^1.1.8"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"smartq": {
|
||||||
|
"version": "1.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.8.tgz",
|
||||||
|
"integrity": "sha512-FURlYW/C3bLeZjJcBVyw7bxCyQoCXiXbLCZcDUKznhXHaLu35c8m33/a2H8CA0rtb82lvzN8dRLnBZAcNMzNHQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"util.promisify": "^1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"through2": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
|
||||||
|
"integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"readable-stream": "^2.1.5",
|
||||||
|
"xtend": "~4.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type-detect": {
|
||||||
|
"version": "4.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
|
||||||
|
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"typings-global": {
|
||||||
|
"version": "1.0.28",
|
||||||
|
"resolved": "https://registry.npmjs.org/typings-global/-/typings-global-1.0.28.tgz",
|
||||||
|
"integrity": "sha512-6VOwJWEY2971HOMHu/7sURzUXiD4/LiMJPsMAOqkHHAtS3MVpLFE5gzTiHilsH9KY5VE1mBQirWIgWFsDuo90A=="
|
||||||
|
},
|
||||||
|
"universalify": {
|
||||||
|
"version": "0.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||||
|
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
|
||||||
|
},
|
||||||
|
"util-deprecate": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||||
|
},
|
||||||
|
"util.promisify": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==",
|
||||||
|
"requires": {
|
||||||
|
"define-properties": "^1.1.2",
|
||||||
|
"object.getownpropertydescriptors": "^2.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vinyl": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==",
|
||||||
|
"requires": {
|
||||||
|
"clone": "^2.1.1",
|
||||||
|
"clone-buffer": "^1.0.0",
|
||||||
|
"clone-stats": "^1.0.0",
|
||||||
|
"cloneable-readable": "^1.0.0",
|
||||||
|
"remove-trailing-separator": "^1.0.1",
|
||||||
|
"replace-ext": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vinyl-file": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U=",
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.2",
|
||||||
|
"pify": "^2.3.0",
|
||||||
|
"strip-bom-buf": "^1.0.0",
|
||||||
|
"strip-bom-stream": "^2.0.0",
|
||||||
|
"vinyl": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"wrappy": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||||
|
},
|
||||||
|
"xtend": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
||||||
|
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
35
package.json
35
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartfile",
|
"name": "@pushrocks/smartfile",
|
||||||
"version": "4.0.21",
|
"version": "6.0.0",
|
||||||
"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,27 +26,20 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/smartfile",
|
"homepage": "https://gitlab.com/pushrocks/smartfile",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/fs-extra": "0.x.x",
|
"@pushrocks/smartpromise": "^2.0.2",
|
||||||
"@types/q": "0.x.x",
|
"@types/fs-extra": "^5.0.3",
|
||||||
"@types/vinyl": "^1.1.29",
|
"@types/vinyl": "^2.0.2",
|
||||||
"beautylog": "^5.0.23",
|
"fs-extra": "^6.0.1",
|
||||||
"fs-extra": "^0.30.0",
|
"glob": "^7.1.2",
|
||||||
"glob": "^7.1.0",
|
"js-yaml": "^3.10.0",
|
||||||
"gulp": "^3.9.1",
|
|
||||||
"gulp-remote-src": "^0.4.1",
|
|
||||||
"js-yaml": "^3.6.1",
|
|
||||||
"q": "^1.4.1",
|
|
||||||
"request": "^2.75.0",
|
|
||||||
"require-reload": "0.2.2",
|
"require-reload": "0.2.2",
|
||||||
"typings-global": "^1.0.14",
|
"smartpath": "^3.2.8",
|
||||||
"vinyl": "^1.2.0",
|
"smartrequest": "^1.0.13",
|
||||||
"vinyl-file": "^2.0.0"
|
"vinyl-file": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/should": "^8.1.30",
|
"@types/node": "^10.5.1",
|
||||||
"gulp-function": "^1.3.6",
|
"gulp-function": "^2.2.14",
|
||||||
"npmts-g": "^5.2.8",
|
"tapbundle": "^2.0.2"
|
||||||
"should": "^11.1.0",
|
|
||||||
"typings-test": "^1.0.3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
test/test.d.ts
vendored
1
test/test.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
import 'typings-test';
|
|
206
test/test.js
206
test/test.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
407
test/test.ts
407
test/test.ts
@ -1,227 +1,190 @@
|
|||||||
import 'typings-test'
|
import * as smartfile from '../ts/index'
|
||||||
import * as smartfile from '../dist/index'
|
|
||||||
import beautylog = require('beautylog')
|
|
||||||
let gulp = require('gulp')
|
|
||||||
let gFunction = require('gulp-function')
|
|
||||||
import path = require('path')
|
import path = require('path')
|
||||||
import * as should from 'should'
|
|
||||||
let vinyl = require('vinyl')
|
|
||||||
|
|
||||||
describe('smartfile'.yellow, function () {
|
import { expect, tap } from 'tapbundle'
|
||||||
describe('.fs'.yellow, function () {
|
|
||||||
describe('.fileExistsSync'.yellow, function () {
|
|
||||||
it('should return an accurate boolean', function () {
|
|
||||||
should(smartfile.fs.fileExistsSync('./test/mytest.json')).be.true()
|
|
||||||
should(smartfile.fs.fileExistsSync('./test/notthere.json')).be.false()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.fileExists'.yellow, function () {
|
|
||||||
it('should return a working promise', function () {
|
|
||||||
should(smartfile.fs.fileExists('./test/mytest.json')).be.Promise()
|
|
||||||
should(smartfile.fs.fileExists('./test/mytest.json')).be.fulfilled()
|
|
||||||
should(smartfile.fs.fileExists('./test/notthere.json')).not.be.fulfilled()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.listFoldersSync()', function () {
|
|
||||||
it('should get the file type from a string', function () {
|
|
||||||
should(smartfile.fs.listFoldersSync('./test/')).containDeep(['testfolder'])
|
|
||||||
should(smartfile.fs.listFoldersSync('./test/')).not.containDeep(['notExistentFolder'])
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.listFolders()', function () {
|
|
||||||
it('should get the file type from a string', function (done) {
|
|
||||||
smartfile.fs.listFolders('./test/')
|
|
||||||
.then(function (folderArrayArg) {
|
|
||||||
should(folderArrayArg).containDeep(['testfolder'])
|
|
||||||
should(folderArrayArg).not.containDeep(['notExistentFolder'])
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.listFilesSync()', function () {
|
|
||||||
it('should get the file type from a string', function () {
|
|
||||||
should(smartfile.fs.listFilesSync('./test/')).containDeep(['mytest.json'])
|
|
||||||
should(smartfile.fs.listFilesSync('./test/')).not.containDeep(['notExistentFile'])
|
|
||||||
should(smartfile.fs.listFilesSync('./test/', /mytest\.json/)).containDeep(['mytest.json'])
|
|
||||||
should(smartfile.fs.listFilesSync('./test/', /mytests.json/)).not.containDeep(['mytest.json'])
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.listFiles()', function () {
|
|
||||||
it('should get the file type from a string', function (done) {
|
|
||||||
smartfile.fs.listFiles('./test/')
|
|
||||||
.then(function (folderArrayArg) {
|
|
||||||
should(folderArrayArg).containDeep(['mytest.json'])
|
|
||||||
should(folderArrayArg).not.containDeep(['notExistentFile'])
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.listFileTree()', function () {
|
|
||||||
it('should get a file tree', function (done) {
|
|
||||||
smartfile.fs.listFileTree(path.resolve('./test/'), '**/*.txt')
|
|
||||||
.then(function (folderArrayArg) {
|
|
||||||
should(folderArrayArg).containDeep(['testfolder/testfile1.txt'])
|
|
||||||
should(folderArrayArg).not.containDeep(['mytest.json'])
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.copy()'.yellow, function () {
|
|
||||||
it('should copy a directory', function () {
|
|
||||||
smartfile.fs.copy('./test/testfolder/', './test/temp/')
|
|
||||||
})
|
|
||||||
it('should copy a file', function () {
|
|
||||||
smartfile.fs.copy('./test/mytest.yaml', './test/temp/')
|
|
||||||
})
|
|
||||||
it('should copy a file and rename it', function () {
|
|
||||||
smartfile.fs.copy('./test/mytest.yaml', './test/temp/mytestRenamed.yaml')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.remove()', function () {
|
|
||||||
it('should remove an entire directory', function () {
|
|
||||||
|
|
||||||
})
|
// ---------------------------
|
||||||
it('should remove single files', function () {
|
// smartfile.fs
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
})
|
tap.test('.fs.fileExistsSync -> should return an accurate boolean', async () => {
|
||||||
})
|
expect(smartfile.fs.fileExistsSync('./test/mytest.json')).to.be.true
|
||||||
})
|
expect(smartfile.fs.fileExistsSync('./test/notthere.json')).be.false
|
||||||
|
|
||||||
describe('.interpreter', function () {
|
|
||||||
describe('.filetype()', function () {
|
|
||||||
it('should get the file type from a string', function () {
|
|
||||||
should(smartfile.interpreter.filetype('./somefolder/data.json')).equal('json')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('.fs'.yellow, function () {
|
|
||||||
describe('toGulpStreamSync() and toGulpDestSync', function () {
|
|
||||||
it('should produce a gulp stream', function (done) {
|
|
||||||
smartfile.fs.toGulpStreamSync('./test/my*')
|
|
||||||
.pipe(smartfile.fs.toGulpDestSync('./test/temp/'))
|
|
||||||
.pipe(gFunction(done, 'atEnd'))
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.toObjectSync()'.yellow, function () {
|
|
||||||
it('should read an ' + '.yaml'.blue + ' file to an object', function () {
|
|
||||||
let testData = smartfile.fs.toObjectSync('./test/mytest.yaml')
|
|
||||||
should(testData).have.property('key1', 'this works')
|
|
||||||
should(testData).have.property('key2', 'this works too')
|
|
||||||
|
|
||||||
})
|
|
||||||
it('should state unknown file type for unknown file types', function () {
|
|
||||||
let testData = smartfile.fs.toObjectSync('./test/mytest.txt')
|
|
||||||
})
|
|
||||||
it('should read an ' + '.json'.blue + ' file to an object', function () {
|
|
||||||
let testData = smartfile.fs.toObjectSync('./test/mytest.json')
|
|
||||||
should(testData).have.property('key1', 'this works')
|
|
||||||
should(testData).have.property('key2', 'this works too')
|
|
||||||
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.toStringSync()'.yellow, function () {
|
|
||||||
it('should read a file to a string', function () {
|
|
||||||
should.equal(
|
|
||||||
smartfile.fs.toStringSync('./test/mytest.txt'),
|
|
||||||
'Some TestString &&%$'
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.toVinylSync'.yellow, function () {
|
|
||||||
it('should read an ' + '.json OR .yaml'.blue + ' file to an ' + 'vinyl file object'.cyan, function () {
|
|
||||||
let testData = smartfile.fs.toVinylSync('./test/mytest.json')
|
|
||||||
should(vinyl.isVinyl(testData)).be.true()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('.memory', function () {
|
|
||||||
describe('.toGulpStream()', function () {
|
|
||||||
it('should produce a valid gulp stream', function () {
|
|
||||||
let localArray = ['test1', 'test2', 'test3']
|
|
||||||
smartfile.memory.toGulpStream(localArray)
|
|
||||||
.pipe(gulp.dest('./test/temp/'))
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('toVinylFileSync()', function () {
|
|
||||||
it('should produce a vinylFile', function () {
|
|
||||||
let localString = 'myString'
|
|
||||||
let localOptions = { filename: 'vinylfile2', base: '/someDir' }
|
|
||||||
should(smartfile.memory.toVinylFileSync(localString, localOptions) instanceof vinyl).be.true()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('toVinylArraySync()', function () {
|
|
||||||
it('should produce a an array of vinylfiles', function () {
|
|
||||||
let localStringArray = ['string1', 'string2', 'string3']
|
|
||||||
let localOptions = { filename: 'vinylfile2', base: '/someDir' }
|
|
||||||
let testResult = smartfile.memory.toVinylArraySync(localStringArray, localOptions)
|
|
||||||
should(testResult).be.Array()
|
|
||||||
should(testResult.length === 3).be.true()
|
|
||||||
for (let myKey in testResult) {
|
|
||||||
should(testResult[myKey] instanceof vinyl).be.true()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('toStringSync()', function () {
|
|
||||||
it('should produce a String from vinyl file', function () {
|
|
||||||
let localString = smartfile.memory.toStringSync(new vinyl({
|
|
||||||
base: '/',
|
|
||||||
path: '/test.txt',
|
|
||||||
contents: new Buffer('myString')
|
|
||||||
}))
|
|
||||||
should(localString).equal('myString')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('toFs()', function () {
|
|
||||||
it('should write a file to disk and return a promise', function (done) {
|
|
||||||
let localString = 'myString'
|
|
||||||
smartfile.memory.toFs(
|
|
||||||
localString,
|
|
||||||
path.join(process.cwd(), './test/temp/testMemToFs.txt')
|
|
||||||
).then(done)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('toFsSync()', function () {
|
|
||||||
it('should write a file to disk and return true if successfull', function () {
|
|
||||||
let localString = 'myString'
|
|
||||||
smartfile.memory.toFsSync(
|
|
||||||
localString,
|
|
||||||
path.join(process.cwd(), './test/temp/testMemToFsSync.txt')
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('.remote', function () {
|
|
||||||
describe('toGulpStreamSync()', function () {
|
|
||||||
it('should produce a gulp stream', function (done) {
|
|
||||||
this.timeout(5000)
|
|
||||||
smartfile.remote.toGulpStreamSync(
|
|
||||||
'mytest.txt', 'https://raw.githubusercontent.com/pushrocks/smartfile/master/test/'
|
|
||||||
).pipe(smartfile.fs.toGulpDestSync('./test/temp/'))
|
|
||||||
.pipe(gFunction(done, 'atEnd'))
|
|
||||||
})
|
|
||||||
})
|
|
||||||
describe('.toString()', function () {
|
|
||||||
it('should load a remote file to a variable', function (done) {
|
|
||||||
this.timeout(5000)
|
|
||||||
smartfile.remote.toString(
|
|
||||||
'https://raw.githubusercontent.com/pushrocks/smartfile/master/test/mytest.txt'
|
|
||||||
).then(function (responseString) {
|
|
||||||
should.equal(responseString, 'Some TestString &&%$')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
it('should reject a Promise when the link is false', function (done) {
|
|
||||||
this.timeout(10000)
|
|
||||||
smartfile.remote.toString('https://push.rocks/doesnotexist.txt')
|
|
||||||
.then(function () {
|
|
||||||
throw new Error('this test should not be resolved')
|
|
||||||
}, function () {
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.fileExists -> should resolve or reject a promise', async () => {
|
||||||
|
expect(smartfile.fs.fileExists('./test/mytest.json')).to.be.instanceof(Promise)
|
||||||
|
await smartfile.fs.fileExists('./test/mytest.json')
|
||||||
|
await smartfile.fs.fileExists('./test/notthere.json').catch(err => {
|
||||||
|
return expect(err.message).to.equal("ENOENT: no such file or directory, access './test/notthere.json'")
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.listFoldersSync() -> should get the file type from a string', async () => {
|
||||||
|
expect(smartfile.fs.listFoldersSync('./test/')).to.include('testfolder')
|
||||||
|
expect(smartfile.fs.listFoldersSync('./test/')).to.not.include('notExistentFolder')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.listFolders() -> should get the file type from a string', async () => {
|
||||||
|
let folderArrayArg = await smartfile.fs.listFolders('./test/')
|
||||||
|
expect(folderArrayArg).to.include('testfolder')
|
||||||
|
expect(folderArrayArg).to.not.include('notExistentFolder')
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
tap.test('.fs.listFilesSync() -> should get the file type from a string', async () => {
|
||||||
|
expect(smartfile.fs.listFilesSync('./test/')).to.include('mytest.json')
|
||||||
|
expect(smartfile.fs.listFilesSync('./test/')).to.not.include('notExistentFile')
|
||||||
|
expect(smartfile.fs.listFilesSync('./test/', /mytest\.json/)).to.include('mytest.json')
|
||||||
|
expect(smartfile.fs.listFilesSync('./test/', /mytests.json/)).to.not.include('mytest.json')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.listFiles() -> should get the file type from a string', async () => {
|
||||||
|
let folderArrayArg = await smartfile.fs.listFiles('./test/')
|
||||||
|
expect(folderArrayArg).to.include('mytest.json')
|
||||||
|
expect(folderArrayArg).to.not.include('notExistentFile')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.listFileTree() -> should get a file tree', async () => {
|
||||||
|
let folderArrayArg = await smartfile.fs.listFileTree(path.resolve('./test/'), '**/*.txt')
|
||||||
|
expect(folderArrayArg).to.include('testfolder/testfile1.txt')
|
||||||
|
expect(folderArrayArg).to.not.include('mytest.json')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.fileTreeToObject -> should read a file tree into an Object', async () => {
|
||||||
|
let fileArrayArg = await smartfile.fs.fileTreeToObject(path.resolve('./test/'), '**/*.txt')
|
||||||
|
expect(fileArrayArg[ 0 ]).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 () => {
|
||||||
|
smartfile.fs.copy('./test/testfolder/', './test/temp/')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.copy() -> should copy a file', async () => {
|
||||||
|
smartfile.fs.copy('./test/mytest.yaml', './test/temp/')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.copy() -> should copy a file and rename it', async () => {
|
||||||
|
smartfile.fs.copy('./test/mytest.yaml', './test/temp/mytestRenamed.yaml')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.remove() -> should remove an entire directory', async () => {
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.remove -> should remove single files', async () => {
|
||||||
|
await smartfile.fs.remove('./test/temp/mytestRenamed.yaml')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.removeSync -> should remove single files synchronouly', async () => {
|
||||||
|
smartfile.fs.removeSync('./test/temp/testfile1.txt')
|
||||||
|
expect(smartfile.fs.fileExistsSync('./test/temp/testfile1.txt')).to.be.false
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.removeMany -> should remove and array of files', async () => {
|
||||||
|
smartfile.fs.removeMany([ './test/temp/testfile1.txt', './test/temp/testfile2.txt' ]).then(() => {
|
||||||
|
expect(smartfile.fs.fileExistsSync('./test/temp/testfile1.txt')).to.be.false
|
||||||
|
expect(smartfile.fs.fileExistsSync('./test/temp/testfile2.txt')).to.be.false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.removeManySync -> should remove and array of single files synchronouly', async () => {
|
||||||
|
smartfile.fs.removeManySync([ './test/temp/testfile1.txt', './test/temp/testfile2.txt' ])
|
||||||
|
expect(smartfile.fs.fileExistsSync('./test/temp/testfile1.txt')).to.be.false
|
||||||
|
expect(smartfile.fs.fileExistsSync('./test/temp/testfile2.txt')).to.be.false
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.toObjectSync() -> should read an ' + '.yaml' + ' file to an object', async () => {
|
||||||
|
let testData = smartfile.fs.toObjectSync('./test/mytest.yaml')
|
||||||
|
expect(testData).to.include({'key1': 'this works'})
|
||||||
|
expect(testData).to.include({'key2': 'this works too'})
|
||||||
|
|
||||||
|
})
|
||||||
|
tap.test('.fs.toObjectSync() -> should state unknown file type for unknown file types', async () => {
|
||||||
|
let testData = smartfile.fs.toObjectSync('./test/mytest.txt')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.fs.toObjectSync() -> should read an ' + '.json' + ' file to an object', async () => {
|
||||||
|
let testData = smartfile.fs.toObjectSync('./test/mytest.json')
|
||||||
|
expect(testData).to.include({'key1': 'this works'})
|
||||||
|
expect(testData).to.include({'key2': 'this works too'})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
tap.test('.fs.toStringSync() -> should read a file to a string', async () => {
|
||||||
|
expect(smartfile.fs.toStringSync('./test/mytest.txt'))
|
||||||
|
.to.equal('Some TestString &&%$')
|
||||||
|
})
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
// smartfile.interpreter
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
tap.test('.interpreter.filetype() -> should get the file type from a string', async () => {
|
||||||
|
expect(smartfile.interpreter.filetype('./somefolder/data.json')).equal('json')
|
||||||
|
})
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
// smartfile.memory
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
tap.test('.memory.toFs() -> should write a file to disk and return a promise', async () => {
|
||||||
|
let localString = 'myString'
|
||||||
|
await smartfile.memory.toFs(
|
||||||
|
localString,
|
||||||
|
path.join(process.cwd(), './test/temp/testMemToFs.txt')
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.memory.toFsSync() -> should write a file to disk and return true if successfull', async () => {
|
||||||
|
let localString = 'myString'
|
||||||
|
smartfile.memory.toFsSync(
|
||||||
|
localString,
|
||||||
|
path.join(process.cwd(), './test/temp/testMemToFsSync.txt')
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.remote.toString() -> should load a remote file to a variable', async () => {
|
||||||
|
let responseString = await smartfile.remote.toString(
|
||||||
|
'https://raw.githubusercontent.com/pushrocks/smartfile/master/test/mytest.txt'
|
||||||
|
)
|
||||||
|
expect(responseString).to.equal('Some TestString &&%$')
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('.remote.toString() -> should reject a Promise when the link is false', async (tools) => {
|
||||||
|
tools.returnError
|
||||||
|
await smartfile.remote.toString('https://push.rocks/doesnotexist.txt').catch(err => {
|
||||||
|
return expect(err.message).to.equal('could not get remote file from https://push.rocks/doesnotexist.txt')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// ---------------------------
|
||||||
|
// smartfile.Smartfile
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
tap.test('.Smartfile -> should produce vinyl compatible files', async () => {
|
||||||
|
let smartfileArray = await smartfile.fs.fileTreeToObject(process.cwd(), './test/testfolder/**/*')
|
||||||
|
let localSmartfile = smartfileArray[ 0 ]
|
||||||
|
expect(localSmartfile).to.be.instanceof(smartfile.Smartfile)
|
||||||
|
expect(localSmartfile.contents).to.be.instanceof(Buffer)
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(localSmartfile.isBuffer()).to.be.true
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
expect(localSmartfile.isDirectory()).to.be.false
|
||||||
|
// tslint:disable-next-line:no-unused-expression
|
||||||
|
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()
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
okidoks
|
1
test/testfolder/subfolder/subtestfile.txt
Normal file
1
test/testfolder/subfolder/subtestfile.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
hi
|
@ -1,5 +1,3 @@
|
|||||||
import 'typings-global'
|
|
||||||
|
|
||||||
import * as plugins from './smartfile.plugins'
|
import * as plugins from './smartfile.plugins'
|
||||||
import * as SmartfileFs from './smartfile.fs'
|
import * as SmartfileFs from './smartfile.fs'
|
||||||
import * as SmartfileInterpreter from './smartfile.interpreter'
|
import * as SmartfileInterpreter from './smartfile.interpreter'
|
||||||
|
@ -1,5 +1,151 @@
|
|||||||
export class Smartfile {
|
import * as plugins from './smartfile.plugins'
|
||||||
constructor() {
|
import * as fs from './smartfile.fs'
|
||||||
|
import * as memory from './smartfile.memory'
|
||||||
|
|
||||||
}
|
export interface ISmartfileConstructorOptions {
|
||||||
|
path?: string
|
||||||
|
contentString?: string
|
||||||
|
contentBuffer?: Buffer
|
||||||
|
base?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* class Smartfile
|
||||||
|
* -> is vinyl file compatible
|
||||||
|
*/
|
||||||
|
export class Smartfile {
|
||||||
|
/**
|
||||||
|
* the full path of the file on disk
|
||||||
|
*/
|
||||||
|
path: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
parsedPath: plugins.path.ParsedPath
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the content of the file as Buffer
|
||||||
|
*/
|
||||||
|
contentBuffer: Buffer
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The current working directory of the file
|
||||||
|
* Note:this is similar to gulp and different from native node path base
|
||||||
|
*/
|
||||||
|
base: string
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sync the file with disk
|
||||||
|
*/
|
||||||
|
sync: boolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the constructor of Smartfile
|
||||||
|
* @param optionsArg
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
constructor (optionsArg: ISmartfileConstructorOptions) {
|
||||||
|
if (optionsArg.contentBuffer) {
|
||||||
|
this.contentBuffer = optionsArg.contentBuffer
|
||||||
|
} else if (optionsArg.contentString) {
|
||||||
|
this.setContentsFromString(optionsArg.contentString)
|
||||||
|
} else {
|
||||||
|
console.log('created empty Smartfile?')
|
||||||
|
}
|
||||||
|
this.path = optionsArg.path
|
||||||
|
this.parsedPath = plugins.path.parse(this.path)
|
||||||
|
this.base = optionsArg.base
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set contents from string
|
||||||
|
* @param contentString
|
||||||
|
*/
|
||||||
|
setContentsFromString(contentString: string) {
|
||||||
|
this.contents = new Buffer(contentString)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* write file to disk
|
||||||
|
* Behaviours:
|
||||||
|
* - no argument write to exactly where the file was picked up
|
||||||
|
*/
|
||||||
|
async write (pathArg?: string) {
|
||||||
|
const stringToWrite = this.contentBuffer.toString()
|
||||||
|
await memory.toFs(stringToWrite, this.path)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* read file from disk
|
||||||
|
*/
|
||||||
|
async read () {
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------
|
||||||
|
// vinyl compatibility
|
||||||
|
// -----------------------------------------------
|
||||||
|
/**
|
||||||
|
* vinyl-compatibility: alias of this.contentBuffer
|
||||||
|
*/
|
||||||
|
get contents (): Buffer {
|
||||||
|
return this.contentBuffer
|
||||||
|
}
|
||||||
|
set contents (contentsArg) {
|
||||||
|
this.contentBuffer = contentsArg
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vinyl-compatibility
|
||||||
|
*/
|
||||||
|
get cwd () {
|
||||||
|
return process.cwd()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return relative path of file
|
||||||
|
*/
|
||||||
|
get relative (): string {
|
||||||
|
return plugins.path.relative(this.base, this.path)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return truw when the file has content
|
||||||
|
*/
|
||||||
|
isNull (): boolean {
|
||||||
|
if (!this.contentBuffer) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return true if contents are Buffer
|
||||||
|
*/
|
||||||
|
isBuffer (): boolean {
|
||||||
|
if (this.contents instanceof Buffer) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
isDirectory () {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
isStream () {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
isSymbolic () {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// update things
|
||||||
|
updateFileName (fileNameArg: string) {
|
||||||
|
let oldFileName = this.parsedPath.base
|
||||||
|
this.path = this.path.replace(new RegExp(oldFileName + '$'),fileNameArg)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import 'typings-global'
|
|
||||||
|
|
||||||
import plugins = require('./smartfile.plugins')
|
import plugins = require('./smartfile.plugins')
|
||||||
import SmartfileInterpreter = require('./smartfile.interpreter')
|
import SmartfileInterpreter = require('./smartfile.interpreter')
|
||||||
|
|
||||||
|
import { Smartfile } from './smartfile.classes.smartfile'
|
||||||
|
|
||||||
import * as memory from './smartfile.memory'
|
import * as memory from './smartfile.memory'
|
||||||
/*===============================================================
|
/*===============================================================
|
||||||
============================ Checks =============================
|
============================ Checks =============================
|
||||||
@ -12,15 +13,15 @@ import * as memory from './smartfile.memory'
|
|||||||
* @param filePath
|
* @param filePath
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export let fileExistsSync = function(filePath): boolean {
|
export let fileExistsSync = function (filePath): boolean {
|
||||||
let fileExistsBool: boolean = false
|
let fileExistsBool: boolean = false
|
||||||
try {
|
try {
|
||||||
plugins.fsExtra.readFileSync(filePath)
|
plugins.fsExtra.readFileSync(filePath)
|
||||||
fileExistsBool = true
|
fileExistsBool = true
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
fileExistsBool = false
|
fileExistsBool = false
|
||||||
}
|
}
|
||||||
return fileExistsBool
|
return fileExistsBool
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,26 +29,30 @@ export let fileExistsSync = function(filePath): boolean {
|
|||||||
* @param filePath
|
* @param filePath
|
||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
export let fileExists = function(filePath){
|
export let fileExists = function (filePath) {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.smartpromise.defer()
|
||||||
plugins.fs.access(filePath, plugins.fs.R_OK, function (err) {
|
plugins.fs.access(filePath, 4, function (err) {
|
||||||
err ? done.reject(err) : done.resolve()
|
err ? done.reject(err) : done.resolve()
|
||||||
})
|
})
|
||||||
return done.promise
|
return done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 {
|
||||||
|
try {
|
||||||
return plugins.fsExtra.statSync(pathArg).isDirectory()
|
return plugins.fsExtra.statSync(pathArg).isDirectory()
|
||||||
|
} catch (err) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a given path points to an existing file
|
* Checks if a given path points to an existing file
|
||||||
*/
|
*/
|
||||||
export let isFile = function(pathArg): boolean{
|
export let isFile = function (pathArg): boolean {
|
||||||
return plugins.fsExtra.statSync(pathArg).isFile()
|
return plugins.fsExtra.statSync(pathArg).isFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===============================================================
|
/*===============================================================
|
||||||
@ -57,36 +62,57 @@ export let isFile = function(pathArg): boolean{
|
|||||||
/**
|
/**
|
||||||
* copies a file from A to B on the local disk
|
* copies a file from A to B on the local disk
|
||||||
*/
|
*/
|
||||||
export let copy = function(fromArg: string, toArg: string){
|
export let copy = function (fromArg: string, toArg: string) {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.smartpromise.defer()
|
||||||
plugins.fsExtra.copy(fromArg,toArg,{},function(){
|
plugins.fsExtra.copy(fromArg, toArg, {}, function () {
|
||||||
done.resolve()
|
done.resolve()
|
||||||
})
|
})
|
||||||
return done.promise
|
return done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* copies a file SYNCHRONOUSLY from A to B on the local disk
|
* copies a file SYNCHRONOUSLY from A to B on the local disk
|
||||||
*/
|
*/
|
||||||
export let copySync = function(fromArg: string,toArg: string): boolean{
|
export let copySync = function (fromArg: string, toArg: string): boolean {
|
||||||
plugins.fsExtra.copySync(fromArg,toArg)
|
plugins.fsExtra.copySync(fromArg, toArg)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ensures that a directory is in place
|
* ensures that a directory is in place
|
||||||
*/
|
*/
|
||||||
export let ensureDir = (dirPathArg: string) => {
|
export let ensureDir = (dirPathArg: string) => {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.smartpromise.defer()
|
||||||
plugins.fsExtra.ensureDir(dirPathArg,done.resolve)
|
plugins.fsExtra.ensureDir(dirPathArg, done.resolve)
|
||||||
return done.promise
|
return done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ensures that a directory is in place
|
* ensures that a directory is in place
|
||||||
*/
|
*/
|
||||||
export let ensureDirSync = (dirPathArg: string) => {
|
export let ensureDirSync = (dirPathArg: string) => {
|
||||||
plugins.fsExtra.ensureDirSync(dirPathArg)
|
plugins.fsExtra.ensureDirSync(dirPathArg)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ensure an empty directory
|
||||||
|
* @executes ASYNC
|
||||||
|
*/
|
||||||
|
export let ensureEmptyDir = (dirPathArg: string) => {
|
||||||
|
let done = plugins.smartpromise.defer()
|
||||||
|
plugins.fsExtra.ensureDir(dirPathArg, () => {
|
||||||
|
plugins.fsExtra.emptyDir(dirPathArg, done.resolve)
|
||||||
|
})
|
||||||
|
return done.promise
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ensure an empty directory
|
||||||
|
* @executes SYNC
|
||||||
|
*/
|
||||||
|
export let ensureEmptyDirSync = (dirPathArg: string) => {
|
||||||
|
plugins.fsExtra.ensureDirSync(dirPathArg)
|
||||||
|
plugins.fsExtra.emptyDirSync(dirPathArg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -96,11 +122,11 @@ export let ensureDirSync = (dirPathArg: string) => {
|
|||||||
* @returns Promise<void>
|
* @returns Promise<void>
|
||||||
* @exec ASYNC
|
* @exec ASYNC
|
||||||
*/
|
*/
|
||||||
export let ensureFile = (filePathArg, initFileStringArg): plugins.q.Promise<void> => {
|
export let ensureFile = (filePathArg, initFileStringArg): Promise<void> => {
|
||||||
let done = plugins.q.defer<void>()
|
let done = plugins.smartpromise.defer<void>()
|
||||||
ensureFileSync(filePathArg, initFileStringArg)
|
ensureFileSync(filePathArg, initFileStringArg)
|
||||||
done.resolve()
|
done.resolve()
|
||||||
return done.promise
|
return done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -111,61 +137,67 @@ export let ensureFile = (filePathArg, initFileStringArg): plugins.q.Promise<void
|
|||||||
* @exec SYNC
|
* @exec SYNC
|
||||||
*/
|
*/
|
||||||
export let ensureFileSync = (filePathArg: string, initFileStringArg: string): void => {
|
export let ensureFileSync = (filePathArg: string, initFileStringArg: string): void => {
|
||||||
if (fileExistsSync(filePathArg)) {
|
if (fileExistsSync(filePathArg)) {
|
||||||
return null
|
return null
|
||||||
} else {
|
} else {
|
||||||
memory.toFsSync(initFileStringArg, filePathArg)
|
memory.toFsSync(initFileStringArg, filePathArg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* removes a file or folder from local disk
|
* removes a file or folder from local disk
|
||||||
*/
|
*/
|
||||||
export let remove = function(pathArg: string){
|
export let remove = function (pathArg: string): Promise<void> {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.smartpromise.defer<void>()
|
||||||
plugins.fsExtra.remove(pathArg,function(){
|
plugins.fsExtra.remove(pathArg, function () {
|
||||||
done.resolve()
|
done.resolve()
|
||||||
})
|
})
|
||||||
return done.promise
|
return done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* removes a file SYNCHRONOUSLY from local disk
|
* removes a file SYNCHRONOUSLY from local disk
|
||||||
*/
|
*/
|
||||||
export let removeSync = function(pathArg: string): boolean{
|
export let removeSync = function (pathArg: string): boolean {
|
||||||
plugins.fsExtra.removeSync(pathArg)
|
plugins.fsExtra.removeSync(pathArg)
|
||||||
return true
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* removes an array of filePaths from disk
|
||||||
|
*/
|
||||||
|
export let removeMany = function (filePathArrayArg: string[]) {
|
||||||
|
let promiseArray: Promise<void>[] = []
|
||||||
|
for (let filePath of filePathArrayArg) {
|
||||||
|
promiseArray.push(remove(filePath))
|
||||||
|
}
|
||||||
|
return Promise.all(promiseArray)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* like removeFilePathArray but SYNCHRONOUSLY
|
||||||
|
*/
|
||||||
|
export let removeManySync = function (filePathArrayArg: string[]): void {
|
||||||
|
for (let filePath of filePathArrayArg) {
|
||||||
|
removeSync(filePath)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===============================================================
|
/*===============================================================
|
||||||
============================ Write/Read =========================
|
============================ Write/Read =========================
|
||||||
===============================================================*/
|
===============================================================*/
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param filePathArg
|
|
||||||
* @returns {*}
|
|
||||||
*/
|
|
||||||
export let toGulpStreamSync = function(filePathArg: string){
|
|
||||||
let stream = plugins.gulp.src(filePathArg)
|
|
||||||
return stream
|
|
||||||
}
|
|
||||||
|
|
||||||
export let toGulpDestSync = function(folderPathArg: string){
|
|
||||||
return plugins.gulp.dest(folderPathArg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param filePathArg
|
* @param filePathArg
|
||||||
* @param fileTypeArg
|
* @param fileTypeArg
|
||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
export let toObjectSync = function(filePathArg,fileTypeArg?) {
|
export let toObjectSync = function (filePathArg, fileTypeArg?) {
|
||||||
let fileString = plugins.fsExtra.readFileSync(filePathArg, 'utf8')
|
let fileString = plugins.fsExtra.readFileSync(filePathArg, 'utf8')
|
||||||
let fileType
|
let fileType
|
||||||
fileTypeArg ? fileType = fileTypeArg : fileType = SmartfileInterpreter.filetype(filePathArg)
|
fileTypeArg ? fileType = fileTypeArg : fileType = SmartfileInterpreter.filetype(filePathArg)
|
||||||
return SmartfileInterpreter.objectFile(fileString,fileType)
|
return SmartfileInterpreter.objectFile(fileString, fileType)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -173,10 +205,40 @@ export let toObjectSync = function(filePathArg,fileTypeArg?) {
|
|||||||
* @param filePath
|
* @param filePath
|
||||||
* @returns {string|Buffer|any}
|
* @returns {string|Buffer|any}
|
||||||
*/
|
*/
|
||||||
export let toStringSync = function(filePath) {
|
export let toStringSync = function (filePath: string): string {
|
||||||
let fileString
|
let fileString: any = plugins.fsExtra.readFileSync(filePath, 'utf8')
|
||||||
fileString = plugins.fsExtra.readFileSync(filePath, 'utf8')
|
return fileString
|
||||||
return fileString
|
}
|
||||||
|
|
||||||
|
export let fileTreeToObject = async (dirPathArg: string, miniMatchFilter: string) => {
|
||||||
|
// handle absolute miniMatchFilter
|
||||||
|
let dirPath: string
|
||||||
|
if (plugins.path.isAbsolute(miniMatchFilter)) {
|
||||||
|
dirPath = '/'
|
||||||
|
} else {
|
||||||
|
dirPath = dirPathArg
|
||||||
|
}
|
||||||
|
|
||||||
|
let fileTree = await listFileTree(dirPath, miniMatchFilter)
|
||||||
|
let smartfileArray: Smartfile[] = []
|
||||||
|
for (let filePath of fileTree) {
|
||||||
|
let readPath = ((): string => {
|
||||||
|
if (!plugins.path.isAbsolute(filePath)) {
|
||||||
|
return plugins.path.join(dirPath, filePath)
|
||||||
|
} else {
|
||||||
|
return filePath
|
||||||
|
}
|
||||||
|
})()
|
||||||
|
let fileContentString = toStringSync(readPath)
|
||||||
|
|
||||||
|
// push a read file as Smartfile
|
||||||
|
smartfileArray.push(new Smartfile({
|
||||||
|
contentBuffer: new Buffer(fileContentString),
|
||||||
|
base: dirPath,
|
||||||
|
path: filePath
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
return smartfileArray
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -185,8 +247,8 @@ export let toStringSync = function(filePath) {
|
|||||||
* @param options
|
* @param options
|
||||||
* @returns {number}
|
* @returns {number}
|
||||||
*/
|
*/
|
||||||
export let toVinylSync = function(filePathArg,options = {}) {
|
export let toVinylSync = function (filePathArg, options = {}) {
|
||||||
return plugins.vinylFile.readSync(filePathArg,options)
|
return plugins.vinylFile.readSync(filePathArg, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -194,92 +256,92 @@ export let toVinylSync = function(filePathArg,options = {}) {
|
|||||||
* @param path
|
* @param path
|
||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
export let requireReload = function(path: string){
|
export let requireReload = function (path: string) {
|
||||||
return plugins.requireReload(path)
|
return plugins.requireReload(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lists Folders in a directory on local disk
|
* lists Folders in a directory on local disk
|
||||||
* @returns Promise
|
* @returns Promise
|
||||||
*/
|
*/
|
||||||
export let listFolders = function(pathArg: string,regexFilter?: RegExp){
|
export let listFolders = function (pathArg: string, regexFilter?: RegExp) {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.smartpromise.defer()
|
||||||
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter(function(file) {
|
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
||||||
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isDirectory()
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isDirectory()
|
||||||
|
})
|
||||||
|
if (regexFilter) {
|
||||||
|
folderArray = folderArray.filter((fileItem) => {
|
||||||
|
return regexFilter.test(fileItem)
|
||||||
})
|
})
|
||||||
if (regexFilter) {
|
}
|
||||||
folderArray = folderArray.filter((fileItem) => {
|
done.resolve(folderArray)
|
||||||
return regexFilter.test(fileItem)
|
return done.promise
|
||||||
})
|
|
||||||
}
|
|
||||||
done.resolve(folderArray)
|
|
||||||
return done.promise
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lists Folders SYNCHRONOUSLY in a directory on local disk
|
* lists Folders SYNCHRONOUSLY in a directory on local disk
|
||||||
* @returns an array with the folder names as strings
|
* @returns an array with the folder names as strings
|
||||||
*/
|
*/
|
||||||
export let listFoldersSync = function(pathArg: string,regexFilter?: RegExp): string[]{
|
export let listFoldersSync = function (pathArg: string, regexFilter?: RegExp): string[] {
|
||||||
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter(function(file) {
|
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
||||||
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isDirectory()
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isDirectory()
|
||||||
|
})
|
||||||
|
if (regexFilter) {
|
||||||
|
folderArray = folderArray.filter((fileItem) => {
|
||||||
|
return regexFilter.test(fileItem)
|
||||||
})
|
})
|
||||||
if (regexFilter) {
|
}
|
||||||
folderArray = folderArray.filter((fileItem) => {
|
return folderArray
|
||||||
return regexFilter.test(fileItem)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return folderArray
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lists Files in a directory on local disk
|
* lists Files in a directory on local disk
|
||||||
* @returns Promise
|
* @returns Promise
|
||||||
*/
|
*/
|
||||||
export let listFiles = function(pathArg: string, regexFilter?: RegExp){
|
export let listFiles = function (pathArg: string, regexFilter?: RegExp) {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.smartpromise.defer()
|
||||||
let fileArray = plugins.fsExtra.readdirSync(pathArg).filter(function(file) {
|
let fileArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
||||||
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile()
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile()
|
||||||
|
})
|
||||||
|
if (regexFilter) {
|
||||||
|
fileArray = fileArray.filter((fileItem) => {
|
||||||
|
return regexFilter.test(fileItem)
|
||||||
})
|
})
|
||||||
if (regexFilter) {
|
}
|
||||||
fileArray = fileArray.filter((fileItem) => {
|
done.resolve(fileArray)
|
||||||
return regexFilter.test(fileItem)
|
return done.promise
|
||||||
})
|
|
||||||
}
|
|
||||||
done.resolve(fileArray)
|
|
||||||
return done.promise
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lists Files SYNCHRONOUSLY in a directory on local disk
|
* lists Files SYNCHRONOUSLY in a directory on local disk
|
||||||
* @returns an array with the folder names as strings
|
* @returns an array with the folder names as strings
|
||||||
*/
|
*/
|
||||||
export let listFilesSync = function(pathArg: string, regexFilter?: RegExp): string[]{
|
export let listFilesSync = function (pathArg: string, regexFilter?: RegExp): string[] {
|
||||||
let fileArray = plugins.fsExtra.readdirSync(pathArg).filter(function(file) {
|
let fileArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
||||||
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile()
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile()
|
||||||
|
})
|
||||||
|
if (regexFilter) {
|
||||||
|
fileArray = fileArray.filter((fileItem) => {
|
||||||
|
return regexFilter.test(fileItem)
|
||||||
})
|
})
|
||||||
if (regexFilter) {
|
}
|
||||||
fileArray = fileArray.filter((fileItem) => {
|
return fileArray
|
||||||
return regexFilter.test(fileItem)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return fileArray
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lists all items (folders AND files) in a directory on local disk
|
* lists all items (folders AND files) in a directory on local disk
|
||||||
* @returns Promise<string[]>
|
* @returns Promise<string[]>
|
||||||
*/
|
*/
|
||||||
export let listAllItems = function(pathArg: string, regexFilter?: RegExp): plugins.q.Promise<string[]> {
|
export let listAllItems = function (pathArg: string, regexFilter?: RegExp): Promise<string[]> {
|
||||||
let done = plugins.q.defer<string[]>()
|
let done = plugins.smartpromise.defer<string[]>()
|
||||||
let allItmesArray = plugins.fsExtra.readdirSync(pathArg)
|
let allItmesArray = plugins.fsExtra.readdirSync(pathArg)
|
||||||
if (regexFilter) {
|
if (regexFilter) {
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -287,33 +349,45 @@ export let listAllItems = function(pathArg: string, regexFilter?: RegExp): plugi
|
|||||||
* @returns an array with the folder names as strings
|
* @returns an array with the folder names as strings
|
||||||
* @executes SYNC
|
* @executes SYNC
|
||||||
*/
|
*/
|
||||||
export let listAllItemsSync = function(pathArg: string, regexFilter?: RegExp): string[]{
|
export let listAllItemsSync = function (pathArg: string, regexFilter?: RegExp): string[] {
|
||||||
let allItmesArray = plugins.fsExtra.readdirSync(pathArg).filter(function(file) {
|
let allItmesArray = plugins.fsExtra.readdirSync(pathArg).filter(function (file) {
|
||||||
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile()
|
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isFile()
|
||||||
|
})
|
||||||
|
if (regexFilter) {
|
||||||
|
allItmesArray = allItmesArray.filter((fileItem) => {
|
||||||
|
return regexFilter.test(fileItem)
|
||||||
})
|
})
|
||||||
if (regexFilter) {
|
}
|
||||||
allItmesArray = allItmesArray.filter((fileItem) => {
|
return allItmesArray
|
||||||
return regexFilter.test(fileItem)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return allItmesArray
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lists a file tree using a miniMatch filter
|
* lists a file tree using a miniMatch filter
|
||||||
|
* note: if the miniMatch Filter is an absolute path, the cwdArg will be omitted
|
||||||
* @returns Promise<string[]> string array with the absolute paths of all matching files
|
* @returns Promise<string[]> string array with the absolute paths of all matching files
|
||||||
*/
|
*/
|
||||||
export let listFileTree = (dirPath: string, miniMatchFilter: string): plugins.q.Promise<string[]> => {
|
export let listFileTree = (dirPathArg: string, miniMatchFilter: string): Promise<string[]> => {
|
||||||
let done = plugins.q.defer<string[]>()
|
let done = plugins.smartpromise.defer<string[]>()
|
||||||
let options = {
|
|
||||||
cwd: dirPath
|
// handle absolute miniMatchFilter
|
||||||
|
let dirPath: string
|
||||||
|
if (plugins.path.isAbsolute(miniMatchFilter)) {
|
||||||
|
dirPath = '/'
|
||||||
|
} else {
|
||||||
|
dirPath = dirPathArg
|
||||||
|
}
|
||||||
|
|
||||||
|
let options = {
|
||||||
|
cwd: dirPath,
|
||||||
|
nodir: true,
|
||||||
|
dot: true
|
||||||
|
}
|
||||||
|
plugins.glob(miniMatchFilter, options, (err, files: string[]) => {
|
||||||
|
if (err) {
|
||||||
|
console.log(err)
|
||||||
|
done.reject(err)
|
||||||
}
|
}
|
||||||
plugins.glob(miniMatchFilter,options,(err,files: string[]) => {
|
done.resolve(files)
|
||||||
if (err) {
|
})
|
||||||
console.log(err)
|
return done.promise
|
||||||
done.reject(err)
|
|
||||||
}
|
|
||||||
done.resolve(files)
|
|
||||||
})
|
|
||||||
return done.promise
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import 'typings-global'
|
|
||||||
|
|
||||||
import plugins = require('./smartfile.plugins')
|
import plugins = require('./smartfile.plugins')
|
||||||
|
|
||||||
export let filetype = (pathArg: string): string => {
|
export let filetype = (pathArg: string): string => {
|
||||||
@ -16,7 +14,7 @@ export let objectFile = (fileStringArg: string, fileTypeArg) => {
|
|||||||
case 'json':
|
case 'json':
|
||||||
return JSON.parse(fileStringArg)
|
return JSON.parse(fileStringArg)
|
||||||
default:
|
default:
|
||||||
plugins.beautylog.error('file type ' + fileTypeArg.blue + ' not supported')
|
console.error('file type ' + fileTypeArg.blue + ' not supported')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,46 +1,9 @@
|
|||||||
import 'typings-global'
|
|
||||||
|
|
||||||
import plugins = require('./smartfile.plugins')
|
import plugins = require('./smartfile.plugins')
|
||||||
|
import { Smartfile } from './smartfile.classes.smartfile'
|
||||||
|
import * as smartfileFs from './smartfile.fs'
|
||||||
|
|
||||||
|
|
||||||
import SmartfileInterpreter = require('./smartfile.interpreter')
|
import SmartfileInterpreter = require('./smartfile.interpreter')
|
||||||
import vinyl = require('vinyl')
|
|
||||||
let Readable = require('stream').Readable
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* allows you to create a gulp stream
|
|
||||||
* from String, from an Array of Strings, from Vinyl File, from an Array of VinylFiles
|
|
||||||
* @param fileArg
|
|
||||||
* @returns stream.Readable
|
|
||||||
* @TODO: make it async;
|
|
||||||
*/
|
|
||||||
export let toGulpStream = function(fileArg: string|string[]|plugins.vinyl|plugins.vinyl[],baseArg: string = '/'){
|
|
||||||
let fileArray = []
|
|
||||||
|
|
||||||
if (typeof fileArg === 'string' || fileArg instanceof plugins.vinyl) { // make sure we work with an array later on
|
|
||||||
fileArray.push(fileArg)
|
|
||||||
} else if (Array.isArray(fileArg)) {
|
|
||||||
fileArray = fileArg
|
|
||||||
} else {
|
|
||||||
throw new Error('fileArg has unknown format')
|
|
||||||
}
|
|
||||||
|
|
||||||
let vinylFileArray: plugins.vinyl[] = [] // we want to have an array of vinylFiles
|
|
||||||
|
|
||||||
for (let fileIndexArg in fileArray) { // convert fileArray in vinylArray
|
|
||||||
let file = fileArray[fileIndexArg]
|
|
||||||
file instanceof plugins.vinyl ?
|
|
||||||
vinylFileArray.push(file) :
|
|
||||||
vinylFileArray.push(toVinylFileSync(file,{filename: fileIndexArg,base: baseArg}))
|
|
||||||
};
|
|
||||||
|
|
||||||
let stream = new Readable({ objectMode: true })
|
|
||||||
for (let vinylFileIndexArg in vinylFileArray) {
|
|
||||||
let vinylFile = vinylFileArray[vinylFileIndexArg]
|
|
||||||
stream.push(vinylFile)
|
|
||||||
};
|
|
||||||
stream.push(null) // signal end of stream;
|
|
||||||
return stream
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* converts file to Object
|
* converts file to Object
|
||||||
@ -48,92 +11,78 @@ export let toGulpStream = function(fileArg: string|string[]|plugins.vinyl|plugin
|
|||||||
* @param fileTypeArg
|
* @param fileTypeArg
|
||||||
* @returns {any|any}
|
* @returns {any|any}
|
||||||
*/
|
*/
|
||||||
export let toObject = function(fileStringArg: string,fileTypeArg: string){
|
export let toObject = function (fileStringArg: string, fileTypeArg: string) {
|
||||||
return SmartfileInterpreter.objectFile(fileStringArg,fileTypeArg)
|
return SmartfileInterpreter.objectFile(fileStringArg, fileTypeArg)
|
||||||
|
}
|
||||||
|
|
||||||
|
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 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 plugins.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
|
|
||||||
*/
|
|
||||||
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 toStringSync = function(fileArg: plugins.vinyl){
|
|
||||||
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|vinyl,filePathArg){
|
export let toFs = async (fileContentArg: string | Smartfile, filePathArg, optionsArg: IToFsOptions = {} ) => {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.smartpromise.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: string
|
let fileString: string
|
||||||
let filePath: string = filePathArg;
|
let filePath: string = filePathArg
|
||||||
if (fileContentArg instanceof plugins.vinyl) {
|
|
||||||
fileString = toStringSync(fileContentArg)
|
// handle Smartfile
|
||||||
} else if (typeof fileContentArg === 'string') {
|
if (fileContentArg instanceof Smartfile) {
|
||||||
fileString = fileContentArg
|
let fileContentArg2: any = fileContentArg
|
||||||
|
fileString = fileContentArg.contentBuffer.toString()
|
||||||
|
// handle options
|
||||||
|
if (optionsArg.respectRelative) {
|
||||||
|
filePath = plugins.path.join(filePath, fileContentArg.path)
|
||||||
}
|
}
|
||||||
plugins.fsExtra.writeFile(filePath,fileString,'utf8',done.resolve)
|
} else if (typeof fileContentArg === 'string') {
|
||||||
return done.promise
|
fileString = fileContentArg
|
||||||
|
} else {
|
||||||
|
throw new Error('fileContent is neither string nor Smartfile')
|
||||||
|
}
|
||||||
|
await smartfileFs.ensureDir(plugins.path.parse(filePath).dir)
|
||||||
|
plugins.fsExtra.writeFile(filePath, fileString, {encoding: 'utf8'}, done.resolve)
|
||||||
|
return await done.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
export let toFsSync = function(fileArg,filePathArg: string){
|
/**
|
||||||
// function checks to abort if needed
|
* writes a string or a Smartfile to disk synchronously, only supports string
|
||||||
if (!fileArg || !filePathArg) {
|
* @param fileArg
|
||||||
throw new Error('expected a valid arguments')
|
* @param filePathArg
|
||||||
}
|
*/
|
||||||
|
export let toFsSync = function (fileArg: string, filePathArg: string) {
|
||||||
|
// function checks to abort if needed
|
||||||
|
if (!fileArg || !filePathArg) {
|
||||||
|
throw new Error('expected a valid arguments')
|
||||||
|
}
|
||||||
|
|
||||||
// prepare actual write action
|
// prepare actual write action
|
||||||
let fileString: string
|
let fileString: string
|
||||||
let filePath: string = filePathArg
|
let filePath: string = filePathArg
|
||||||
|
|
||||||
if (fileArg instanceof plugins.vinyl) {
|
if (typeof fileArg !== 'string') {
|
||||||
fileString = toStringSync(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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
import 'typings-global'
|
|
||||||
export import beautylog = require('beautylog')
|
|
||||||
export import fs = require('fs')
|
export import fs = require('fs')
|
||||||
export import fsExtra = require('fs-extra')
|
export import fsExtra = require('fs-extra')
|
||||||
export let gulp = require('gulp')
|
|
||||||
export let glob = require('glob')
|
export let glob = require('glob')
|
||||||
export let g = {
|
|
||||||
remoteSrc: require('gulp-remote-src')
|
|
||||||
}
|
|
||||||
export import path = require('path')
|
export import path = require('path')
|
||||||
export import q = require('q')
|
export import smartpromise = require('@pushrocks/smartpromise')
|
||||||
export import vinyl = require('vinyl')
|
export import smartrequest = require('smartrequest')
|
||||||
|
export let requireReload = require('require-reload')
|
||||||
|
export import smartpath = require('smartpath')
|
||||||
export let vinylFile = require('vinyl-file')
|
export let vinylFile = require('vinyl-file')
|
||||||
export let yaml = require('js-yaml')
|
export let yaml = require('js-yaml')
|
||||||
export let request = require('request')
|
|
||||||
export let requireReload = require('require-reload')
|
|
||||||
|
@ -1,47 +1,33 @@
|
|||||||
import 'typings-global'
|
|
||||||
import plugins = require('./smartfile.plugins')
|
import plugins = require('./smartfile.plugins')
|
||||||
import SmartfileInterpreter = require('./smartfile.interpreter')
|
import SmartfileInterpreter = require('./smartfile.interpreter')
|
||||||
|
|
||||||
export let toFs = function(from: string,toPath: string) {
|
/* export let toFs = function (from: string, toPath: string) {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.q.defer()
|
||||||
let stream = plugins.request(from).pipe(plugins.fsExtra.createWriteStream(toPath))
|
let stream = plugins.smartrequest(from).pipe(plugins.fsExtra.createWriteStream(toPath))
|
||||||
stream.on('finish',function(){
|
stream.on('finish', function () {
|
||||||
done.resolve(toPath)
|
done.resolve(toPath)
|
||||||
})
|
})
|
||||||
return done.promise
|
return done.promise
|
||||||
}
|
} */
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param filePathArg
|
|
||||||
* @returns {*}
|
|
||||||
*/
|
|
||||||
export let toGulpStreamSync = function(filePathArg: string,baseArg: string){
|
|
||||||
let stream = plugins.g.remoteSrc(filePathArg, {
|
|
||||||
base: baseArg
|
|
||||||
})
|
|
||||||
return stream
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param fromArg
|
* @param fromArg
|
||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
export let toObject = function(fromArg: string){
|
export let toObject = function (fromArg: string) {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.smartpromise.defer()
|
||||||
plugins.request.get(fromArg, function (error, response, bodyString) {
|
plugins.smartrequest.request(fromArg, {
|
||||||
let returnObject
|
method: 'get'
|
||||||
if (!error && response.statusCode === 200) {
|
}).then((res: any) => {
|
||||||
returnObject = SmartfileInterpreter.objectFile(bodyString,SmartfileInterpreter.filetype(fromArg))
|
if (res.statusCode === 200) {
|
||||||
done.resolve(returnObject)
|
done.resolve(res.body)
|
||||||
} else {
|
} else {
|
||||||
console.log('could not get remote file from ' + fromArg)
|
console.log('could not get remote file from ' + fromArg)
|
||||||
returnObject = undefined
|
done.reject(new Error('could not get remote file from ' + fromArg))
|
||||||
done.reject(returnObject)
|
}
|
||||||
}
|
})
|
||||||
})
|
return done.promise
|
||||||
return done.promise
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,15 +36,13 @@ export let toObject = function(fromArg: string){
|
|||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
export let toString = (fromArg: string) => {
|
export let toString = (fromArg: string) => {
|
||||||
let done = plugins.q.defer()
|
let done = plugins.smartpromise.defer()
|
||||||
plugins.request.get(fromArg, function (error, response, bodyString) {
|
plugins.smartrequest.get(fromArg).then((res: any) => {
|
||||||
if (!error && response.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
done.resolve(bodyString)
|
done.resolve(res.body)
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.error('could not get remote file from ' + fromArg)
|
done.reject(new Error('could not get remote file from ' + fromArg))
|
||||||
bodyString = undefined
|
}
|
||||||
done.reject(bodyString)
|
})
|
||||||
}
|
return done.promise
|
||||||
})
|
|
||||||
return done.promise
|
|
||||||
}
|
}
|
||||||
|
490
yarn.lock
Normal file
490
yarn.lock
Normal file
@ -0,0 +1,490 @@
|
|||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@types/code@^4.0.3":
|
||||||
|
version "4.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/code/-/code-4.0.4.tgz#527fbdbb487dabc4346b8a2ccca3496d8198bae7"
|
||||||
|
|
||||||
|
"@types/fs-extra@5.0.0":
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.0.tgz#d3e225b35eb5c6d3a5a782c28219df365c781413"
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/node@*", "@types/node@^9.4.6":
|
||||||
|
version "9.4.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.6.tgz#d8176d864ee48753d053783e4e463aec86b8d82e"
|
||||||
|
|
||||||
|
"@types/node@^8.0.33":
|
||||||
|
version "8.9.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.9.4.tgz#dfd327582a06c114eb6e0441fa3d6fab35edad48"
|
||||||
|
|
||||||
|
"@types/through2@^2.0.32":
|
||||||
|
version "2.0.33"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/through2/-/through2-2.0.33.tgz#1ff2e88a100dfb5b140e7bb98791f1194400d131"
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/vinyl@^2.0.2":
|
||||||
|
version "2.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.2.tgz#4f3b8dae8f5828d3800ef709b0cff488ee852de3"
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
argparse@^1.0.7:
|
||||||
|
version "1.0.10"
|
||||||
|
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
||||||
|
dependencies:
|
||||||
|
sprintf-js "~1.0.2"
|
||||||
|
|
||||||
|
balanced-match@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||||
|
|
||||||
|
beautycolor@^1.0.7:
|
||||||
|
version "1.0.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.11.tgz#71c5568d5a7ed5c144d3a54f753ad1b08862aea5"
|
||||||
|
dependencies:
|
||||||
|
ansi-256-colors "^1.1.0"
|
||||||
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
|
bindings@^1.2.1:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
|
||||||
|
|
||||||
|
brace-expansion@^1.1.7:
|
||||||
|
version "1.1.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||||
|
dependencies:
|
||||||
|
balanced-match "^1.0.0"
|
||||||
|
concat-map "0.0.1"
|
||||||
|
|
||||||
|
clone-buffer@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
|
||||||
|
|
||||||
|
clone-stats@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
|
||||||
|
|
||||||
|
clone@^2.1.1:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.1.tgz#d217d1e961118e3ac9a4b8bba3285553bf647cdb"
|
||||||
|
|
||||||
|
cloneable-readable@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117"
|
||||||
|
dependencies:
|
||||||
|
inherits "^2.0.1"
|
||||||
|
process-nextick-args "^1.0.6"
|
||||||
|
through2 "^2.0.1"
|
||||||
|
|
||||||
|
code@^5.1.0:
|
||||||
|
version "5.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/code/-/code-5.2.0.tgz#fb3a5e247afc17e3d65c49e7ce0f69ebe51a75b5"
|
||||||
|
dependencies:
|
||||||
|
hoek "5.x.x"
|
||||||
|
|
||||||
|
concat-map@0.0.1:
|
||||||
|
version "0.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||||
|
|
||||||
|
core-util-is@~1.0.0:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||||
|
|
||||||
|
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:
|
||||||
|
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"
|
||||||
|
|
||||||
|
es-abstract@^1.5.1:
|
||||||
|
version "1.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864"
|
||||||
|
dependencies:
|
||||||
|
es-to-primitive "^1.1.1"
|
||||||
|
function-bind "^1.1.1"
|
||||||
|
has "^1.0.1"
|
||||||
|
is-callable "^1.1.3"
|
||||||
|
is-regex "^1.0.4"
|
||||||
|
|
||||||
|
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.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
|
||||||
|
|
||||||
|
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:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz#1bdecdb8e083c0664b91945581577a43a9f31d70"
|
||||||
|
dependencies:
|
||||||
|
readable-stream "^2.0.2"
|
||||||
|
|
||||||
|
foreach@^2.0.5:
|
||||||
|
version "2.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
||||||
|
|
||||||
|
fs-extra@^5.0.0:
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd"
|
||||||
|
dependencies:
|
||||||
|
graceful-fs "^4.1.2"
|
||||||
|
jsonfile "^4.0.0"
|
||||||
|
universalify "^0.1.0"
|
||||||
|
|
||||||
|
fs.realpath@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
|
|
||||||
|
function-bind@^1.0.2, function-bind@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||||
|
|
||||||
|
glob@^7.1.2:
|
||||||
|
version "7.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||||
|
dependencies:
|
||||||
|
fs.realpath "^1.0.0"
|
||||||
|
inflight "^1.0.4"
|
||||||
|
inherits "2"
|
||||||
|
minimatch "^3.0.4"
|
||||||
|
once "^1.3.0"
|
||||||
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
graceful-fs@^4.1.2, graceful-fs@^4.1.6:
|
||||||
|
version "4.1.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
|
||||||
|
|
||||||
|
gulp-function@^2.2.14:
|
||||||
|
version "2.2.14"
|
||||||
|
resolved "https://registry.yarnpkg.com/gulp-function/-/gulp-function-2.2.14.tgz#e2fe65cfd2f7f614a2c66795e2ae4440467082df"
|
||||||
|
dependencies:
|
||||||
|
"@types/through2" "^2.0.32"
|
||||||
|
smartq "^1.1.6"
|
||||||
|
through2 "^2.0.3"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
hoek@5.x.x:
|
||||||
|
version "5.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/hoek/-/hoek-5.0.3.tgz#b71d40d943d0a95da01956b547f83c4a5b4a34ac"
|
||||||
|
|
||||||
|
home@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/home/-/home-1.0.1.tgz#96a423ceb49b98378ff5ef3ceae059a557f9dd35"
|
||||||
|
dependencies:
|
||||||
|
os-homedir "^1.0.1"
|
||||||
|
|
||||||
|
inflight@^1.0.4:
|
||||||
|
version "1.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||||
|
dependencies:
|
||||||
|
once "^1.3.0"
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
inherits@2, inherits@^2.0.1, inherits@~2.0.3:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
|
|
||||||
|
is-callable@^1.1.1, is-callable@^1.1.3:
|
||||||
|
version "1.1.3"
|
||||||
|
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.4:
|
||||||
|
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:
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
|
||||||
|
|
||||||
|
isarray@~1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
|
|
||||||
|
js-yaml@^3.10.0:
|
||||||
|
version "3.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
|
||||||
|
dependencies:
|
||||||
|
argparse "^1.0.7"
|
||||||
|
esprima "^4.0.0"
|
||||||
|
|
||||||
|
jsonfile@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
|
||||||
|
optionalDependencies:
|
||||||
|
graceful-fs "^4.1.6"
|
||||||
|
|
||||||
|
leakage@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
||||||
|
dependencies:
|
||||||
|
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.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
|
||||||
|
|
||||||
|
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.8.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a"
|
||||||
|
|
||||||
|
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:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
|
dependencies:
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
os-homedir@^1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
|
||||||
|
|
||||||
|
path-is-absolute@^1.0.0:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||||
|
|
||||||
|
pify@^2.3.0:
|
||||||
|
version "2.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
||||||
|
|
||||||
|
pretty-bytes@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
||||||
|
|
||||||
|
process-nextick-args@^1.0.6:
|
||||||
|
version "1.0.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
|
||||||
|
|
||||||
|
process-nextick-args@~2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
|
||||||
|
|
||||||
|
readable-stream@^2.0.2, readable-stream@^2.1.5:
|
||||||
|
version "2.3.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.4.tgz#c946c3f47fa7d8eabc0b6150f4a12f69a4574071"
|
||||||
|
dependencies:
|
||||||
|
core-util-is "~1.0.0"
|
||||||
|
inherits "~2.0.3"
|
||||||
|
isarray "~1.0.0"
|
||||||
|
process-nextick-args "~2.0.0"
|
||||||
|
safe-buffer "~5.1.1"
|
||||||
|
string_decoder "~1.0.3"
|
||||||
|
util-deprecate "~1.0.1"
|
||||||
|
|
||||||
|
remove-trailing-separator@^1.0.1:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
|
||||||
|
|
||||||
|
replace-ext@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
|
||||||
|
|
||||||
|
require-reload@0.2.2:
|
||||||
|
version "0.2.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/require-reload/-/require-reload-0.2.2.tgz#29a7591846caf91b6e8a3cda991683f95f8d7d42"
|
||||||
|
|
||||||
|
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
|
version "5.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||||
|
|
||||||
|
smartchai@^1.0.3:
|
||||||
|
version "1.0.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.8.tgz#a074836f4ddd4b98c50f1e7ae9e8e8ad9f6f1902"
|
||||||
|
dependencies:
|
||||||
|
"@types/code" "^4.0.3"
|
||||||
|
code "^5.1.0"
|
||||||
|
typings-global "^1.0.20"
|
||||||
|
|
||||||
|
smartdelay@^1.0.3:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.4.tgz#791c1a4ee6770494064c10b1d2d2b8e6f3105b82"
|
||||||
|
dependencies:
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
|
smartpath@^3.2.8:
|
||||||
|
version "3.2.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartpath/-/smartpath-3.2.8.tgz#4834bd3a8bae2295baacadba23c87a501952f940"
|
||||||
|
dependencies:
|
||||||
|
home "^1.0.1"
|
||||||
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
|
smartq@^1.1.1, smartq@^1.1.6:
|
||||||
|
version "1.1.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.6.tgz#0c1ff4336d95e95b4f1fdd8ccd7e2c5a323b8412"
|
||||||
|
dependencies:
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
util.promisify "^1.0.0"
|
||||||
|
|
||||||
|
smartrequest@^1.0.8:
|
||||||
|
version "1.0.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartrequest/-/smartrequest-1.0.8.tgz#9af18dde34efa7d43b4ecfc92ccb157a98eda3b1"
|
||||||
|
dependencies:
|
||||||
|
smartq "^1.1.1"
|
||||||
|
|
||||||
|
sprintf-js@~1.0.2:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||||
|
|
||||||
|
string_decoder@~1.0.3:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "~5.1.0"
|
||||||
|
|
||||||
|
strip-bom-buf@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz#1cb45aaf57530f4caf86c7f75179d2c9a51dd572"
|
||||||
|
dependencies:
|
||||||
|
is-utf8 "^0.2.1"
|
||||||
|
|
||||||
|
strip-bom-stream@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz#f87db5ef2613f6968aa545abfe1ec728b6a829ca"
|
||||||
|
dependencies:
|
||||||
|
first-chunk-stream "^2.0.0"
|
||||||
|
strip-bom "^2.0.0"
|
||||||
|
|
||||||
|
strip-bom@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
|
||||||
|
dependencies:
|
||||||
|
is-utf8 "^0.2.0"
|
||||||
|
|
||||||
|
tapbundle@^1.1.8:
|
||||||
|
version "1.1.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.1.8.tgz#e08aee0e100a830d8a26a583a85d37ce53312e02"
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "^8.0.33"
|
||||||
|
early "^2.1.1"
|
||||||
|
leakage "^0.3.0"
|
||||||
|
smartchai "^1.0.3"
|
||||||
|
smartdelay "^1.0.3"
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
|
||||||
|
through2@^2.0.1, through2@^2.0.3:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
|
||||||
|
dependencies:
|
||||||
|
readable-stream "^2.1.5"
|
||||||
|
xtend "~4.0.1"
|
||||||
|
|
||||||
|
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19, typings-global@^1.0.20:
|
||||||
|
version "1.0.28"
|
||||||
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.28.tgz#e28cc965476564cbc00e438739e0aa0735d323d4"
|
||||||
|
|
||||||
|
universalify@^0.1.0:
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
|
||||||
|
|
||||||
|
util-deprecate@~1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
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:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-3.0.0.tgz#b104d9e4409ffa325faadd520642d0a3b488b365"
|
||||||
|
dependencies:
|
||||||
|
graceful-fs "^4.1.2"
|
||||||
|
pify "^2.3.0"
|
||||||
|
strip-bom-buf "^1.0.0"
|
||||||
|
strip-bom-stream "^2.0.0"
|
||||||
|
vinyl "^2.0.1"
|
||||||
|
|
||||||
|
vinyl@^2.0.1:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c"
|
||||||
|
dependencies:
|
||||||
|
clone "^2.1.1"
|
||||||
|
clone-buffer "^1.0.0"
|
||||||
|
clone-stats "^1.0.0"
|
||||||
|
cloneable-readable "^1.0.0"
|
||||||
|
remove-trailing-separator "^1.0.1"
|
||||||
|
replace-ext "^1.0.0"
|
||||||
|
|
||||||
|
wrappy@1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
|
|
||||||
|
xtend@~4.0.1:
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
|
Reference in New Issue
Block a user