Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
a1139c5da4 | |||
a401fd2e8f | |||
8157371a1d | |||
719a9b32d7 | |||
a732d2a403 | |||
11fe4618ba | |||
f4290ca8fa | |||
04518f28cf | |||
0d6ea31bd2 |
14
dist/index.d.ts
vendored
14
dist/index.d.ts
vendored
@ -1,25 +1,17 @@
|
|||||||
/// <reference types="q" />
|
|
||||||
import 'typings-global';
|
import 'typings-global';
|
||||||
import * as q from 'q';
|
|
||||||
/**
|
/**
|
||||||
* defines a LazyModule
|
* defines a LazyModule
|
||||||
*/
|
*/
|
||||||
export declare type TLoader = 'npm' | 'systemjs';
|
export declare type TLoader = 'npm' | 'systemjs';
|
||||||
export declare class LazyModule<T> {
|
export declare class LazyModule<T> {
|
||||||
name: string;
|
name: string;
|
||||||
nameIsPath: boolean;
|
|
||||||
cwd: string;
|
cwd: string;
|
||||||
whenLoaded: q.Promise<T>;
|
whenLoaded: Promise<T>;
|
||||||
loader: TLoader;
|
private nameIsPath;
|
||||||
private whenLoadedDeferred;
|
private whenLoadedDeferred;
|
||||||
constructor(nameArg: string, cwdArg: string);
|
constructor(nameArg: string, cwdArg: string);
|
||||||
setLoader(loaderArg: TLoader): void;
|
|
||||||
/**
|
/**
|
||||||
* loads the module
|
* loads the module
|
||||||
*/
|
*/
|
||||||
load(): q.Promise<T>;
|
load(): Promise<T>;
|
||||||
/**
|
|
||||||
* loads additional lazy modules specified as arguments and returns them in the promise for easy use
|
|
||||||
*/
|
|
||||||
loadAlso(...args: LazyModule<any>[]): void;
|
|
||||||
}
|
}
|
||||||
|
44
dist/index.js
vendored
44
dist/index.js
vendored
@ -1,8 +1,16 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const q = require("q");
|
const smartq = require("smartq");
|
||||||
const lik_1 = require("lik");
|
const lik_1 = require("lik");
|
||||||
class Smartsystem {
|
class Smartsystem {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -19,7 +27,6 @@ class Smartsystem {
|
|||||||
let smartsystem = new Smartsystem();
|
let smartsystem = new Smartsystem();
|
||||||
class LazyModule {
|
class LazyModule {
|
||||||
constructor(nameArg, cwdArg) {
|
constructor(nameArg, cwdArg) {
|
||||||
this.loader = 'npm';
|
|
||||||
if (!cwdArg) {
|
if (!cwdArg) {
|
||||||
throw new Error('You must specify a directory to resolve from!');
|
throw new Error('You must specify a directory to resolve from!');
|
||||||
}
|
}
|
||||||
@ -30,40 +37,19 @@ class LazyModule {
|
|||||||
if (this.nameIsPath) {
|
if (this.nameIsPath) {
|
||||||
this.name = path.join(this.cwd, this.name);
|
this.name = path.join(this.cwd, this.name);
|
||||||
}
|
}
|
||||||
this.whenLoadedDeferred = q.defer();
|
this.whenLoadedDeferred = smartq.defer();
|
||||||
this.whenLoaded = this.whenLoadedDeferred.promise;
|
this.whenLoaded = this.whenLoadedDeferred.promise;
|
||||||
}
|
}
|
||||||
setLoader(loaderArg) {
|
|
||||||
this.loader = loaderArg;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* loads the module
|
* loads the module
|
||||||
*/
|
*/
|
||||||
load() {
|
load() {
|
||||||
let done = q.defer();
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let loadedModule;
|
let loadedModule = require(this.name);
|
||||||
if (this.loader === 'npm') {
|
|
||||||
loadedModule = require(this.name);
|
|
||||||
done.resolve(loadedModule);
|
|
||||||
}
|
|
||||||
else if (this.loader === 'systemjs') {
|
|
||||||
let systemjs = require('systemjs');
|
|
||||||
systemjs.import(this.name).then((m) => {
|
|
||||||
loadedModule = m;
|
|
||||||
this.whenLoadedDeferred.resolve(loadedModule);
|
this.whenLoadedDeferred.resolve(loadedModule);
|
||||||
done.resolve(loadedModule);
|
return loadedModule;
|
||||||
}).catch(err => { console.log(err); });
|
});
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw Error('loader not supported');
|
|
||||||
}
|
|
||||||
return done.promise;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* loads additional lazy modules specified as arguments and returns them in the promise for easy use
|
|
||||||
*/
|
|
||||||
loadAlso(...args) {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.LazyModule = LazyModule;
|
exports.LazyModule = LazyModule;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUV2Qiw2QkFBNEI7QUFDNUIsdUJBQXNCO0FBQ3RCLDZCQUErQjtBQUUvQjtJQUFBO1FBQ0ksZ0JBQVcsR0FBRyxJQUFJLGVBQVMsRUFBbUIsQ0FBQTtJQVFsRCxDQUFDO0lBTkc7O09BRUc7SUFDSCxhQUFhLENBQUMsYUFBOEI7UUFDeEMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLENBQUE7SUFDdkMsQ0FBQztDQUNKO0FBRUQsa0NBQWtDO0FBQ2xDLElBQUksV0FBVyxHQUFHLElBQUksV0FBVyxFQUFFLENBQUE7QUFRbkM7SUFPSSxZQUFZLE9BQWUsRUF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DLElBQUksQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFBO1FBQzVDLENBQUM7UUFDRCxJQUFJLENBQUMsa0JBQWtCLEdBQUcsTUFBTSxDQUFDLEtBQUssRUFBSyxDQUFBO1FBQzNDLElBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSxDQUFDLGtCQUFrQixDQUFDLE9BQU8sQ0FBQTtJQUNuRCxDQUFDO0lBRUQ7O09BRUc7SUFDRyxJQUFJOztZQUNSLElBQUksWUFBWSxHQUFNLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUE7WUFDeEMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLE9BQU8sQ0FBQyxZQUFZLENBQUMsQ0FBQTtZQUM3QyxNQUFNLENBQUMsWUFBWSxDQUFBO1FBQ3JCLENBQUM7S0FBQTtDQUNGO0FBN0JELGdDQTZCQyJ9
|
@ -1,3 +1,7 @@
|
|||||||
|
---
|
||||||
|
name: smartsystem
|
||||||
|
description: simplifies lazy loading with TypeScript
|
||||||
|
---
|
||||||
# smartsystem
|
# smartsystem
|
||||||
simplifies lazy loading with TypeScript
|
simplifies lazy loading with TypeScript
|
||||||
|
|
||||||
@ -32,15 +36,11 @@ import * as _myPlugin from 'myPlugin'
|
|||||||
// define the lazy module
|
// define the lazy module
|
||||||
let myLazyModule = new LazyModule<typeof _myPlugin>('myPlugin', __dirname)
|
let myLazyModule = new LazyModule<typeof _myPlugin>('myPlugin', __dirname)
|
||||||
|
|
||||||
// set the loader, defaults to npm anyway, can be systemjs alternatively
|
|
||||||
myLazyModule.setLoader('npm')
|
|
||||||
|
|
||||||
// another plugin
|
// another plugin
|
||||||
import * as _anotherPlugin from 'anotherPlugin' // plugin does not get loaded here at runtime
|
import * as _anotherPlugin from 'anotherPlugin' // plugin does not get loaded here at runtime
|
||||||
|
|
||||||
// define lazy module
|
// define lazy module
|
||||||
let anotherLazyModule = new LazyModule<typeof _anotherPlugin>('anotherPlugin', __dirname)
|
let anotherLazyModule = new LazyModule<typeof _anotherPlugin>('anotherPlugin', __dirname)
|
||||||
anotherPluginLazy.setLoader('systemjs') // sets the loader to systemjs
|
|
||||||
|
|
||||||
myLazyModule.whenLoaded.then(myPlugin => {
|
myLazyModule.whenLoaded.then(myPlugin => {
|
||||||
/* do something with myPlugin.
|
/* do something with myPlugin.
|
||||||
|
13
package.json
13
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartsystem",
|
"name": "smartsystem",
|
||||||
"version": "1.0.17",
|
"version": "2.0.2",
|
||||||
"description": "simplifies lazy loading with TypeScript",
|
"description": "simplifies lazy loading with TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
@ -23,13 +23,12 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/pushrocks/smartsystem#README",
|
"homepage": "https://gitlab.com/pushrocks/smartsystem#README",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/q": "1.0.0",
|
"lik": "^1.0.38",
|
||||||
"lik": "^1.0.30",
|
"smartq": "^1.1.6",
|
||||||
"q": "^1.5.0",
|
"systemjs": "^0.20.17",
|
||||||
"systemjs": "^0.20.12",
|
"typings-global": "^1.0.20"
|
||||||
"typings-global": "^1.0.16"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tapbundle": "^1.0.12"
|
"tapbundle": "^1.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,41 +21,6 @@ simplifies lazy loading with TypeScript
|
|||||||
## Usage
|
## Usage
|
||||||
We recommend the use of TypeScript for best Intellisense
|
We recommend the use of TypeScript for best Intellisense
|
||||||
|
|
||||||
smartsystem supports both npm and SystemJs as module loader.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
import { LazyModule } from 'smartsystem'
|
|
||||||
|
|
||||||
// plugin does not get loaded here at runtime
|
|
||||||
import * as _myPlugin from 'myPlugin'
|
|
||||||
|
|
||||||
// define the lazy module
|
|
||||||
let myLazyModule = new LazyModule<typeof _myPlugin>('myPlugin', __dirname)
|
|
||||||
|
|
||||||
// set the loader, defaults to npm anyway, can be systemjs alternatively
|
|
||||||
myLazyModule.setLoader('npm')
|
|
||||||
|
|
||||||
// another plugin
|
|
||||||
import * as _anotherPlugin from 'anotherPlugin' // plugin does not get loaded here at runtime
|
|
||||||
|
|
||||||
// define lazy module
|
|
||||||
let anotherLazyModule = new LazyModule<typeof _anotherPlugin>('anotherPlugin', __dirname)
|
|
||||||
anotherPluginLazy.setLoader('systemjs') // sets the loader to systemjs
|
|
||||||
|
|
||||||
myLazyModule.whenLoaded.then(myPlugin => {
|
|
||||||
/* do something with myPlugin.
|
|
||||||
myPlugin receives the typings flow from LazyModule class
|
|
||||||
This does NOT load the module during runtime
|
|
||||||
The promise whenLoaded will be resolved whenever load() is called for the first time */
|
|
||||||
})
|
|
||||||
|
|
||||||
myLazyModule.load().then(myPlugin => {
|
|
||||||
/* do something with myPlugin.
|
|
||||||
myPlugin receives the typings flow from LazyModule class
|
|
||||||
This DOES LOAD the module */
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
For further information read the linked docs at the top of this README.
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
11
test/test.ts
11
test/test.ts
@ -1,10 +1,15 @@
|
|||||||
import { tap, expect } from 'tapbundle'
|
import { tap, expect } from 'tapbundle'
|
||||||
import * as smartsystem from '../dist/index'
|
import * as smartsystem from '../ts/index'
|
||||||
import * as _moduleExample from './assets/moduleExample'
|
import * as _moduleExample from './assets/moduleExample'
|
||||||
|
|
||||||
tap.test('should load a module lazily', async (tools) => {
|
let lazyModuleExample: smartsystem.LazyModule<typeof _moduleExample>
|
||||||
let lazyModuleExample = new smartsystem.LazyModule<typeof _moduleExample>('./assets/moduleExample.js', __dirname)
|
|
||||||
|
|
||||||
|
tap.test('should create a lazy module instance', async (tools) => {
|
||||||
|
lazyModuleExample = new smartsystem.LazyModule<typeof _moduleExample>('./assets/moduleExample.js', __dirname)
|
||||||
|
expect(lazyModuleExample).to.be.instanceof(smartsystem.LazyModule)
|
||||||
|
})
|
||||||
|
|
||||||
|
tap.test('should load the module', async () => {
|
||||||
await lazyModuleExample.load().then(async m => {
|
await lazyModuleExample.load().then(async m => {
|
||||||
console.log(m.exportedTestBoolean)
|
console.log(m.exportedTestBoolean)
|
||||||
})
|
})
|
||||||
|
45
ts/index.ts
45
ts/index.ts
@ -1,7 +1,7 @@
|
|||||||
import 'typings-global'
|
import 'typings-global'
|
||||||
|
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import * as q from 'q'
|
import * as smartq from 'smartq'
|
||||||
import { Objectmap } from 'lik'
|
import { Objectmap } from 'lik'
|
||||||
|
|
||||||
class Smartsystem {
|
class Smartsystem {
|
||||||
@ -10,7 +10,7 @@ class Smartsystem {
|
|||||||
/**
|
/**
|
||||||
* add lazyModule to Smartsystem
|
* add lazyModule to Smartsystem
|
||||||
*/
|
*/
|
||||||
addLazyModule(lazyModuleArg: LazyModule<any>) {
|
addLazyModule (lazyModuleArg: LazyModule<any>) {
|
||||||
this.lazyModules.add(lazyModuleArg)
|
this.lazyModules.add(lazyModuleArg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -26,12 +26,11 @@ export type TLoader = 'npm' | 'systemjs'
|
|||||||
|
|
||||||
export class LazyModule<T> {
|
export class LazyModule<T> {
|
||||||
name: string
|
name: string
|
||||||
nameIsPath: boolean
|
|
||||||
cwd: string
|
cwd: string
|
||||||
whenLoaded: q.Promise<T>
|
whenLoaded: Promise<T>
|
||||||
loader: TLoader = 'npm'
|
private nameIsPath: boolean
|
||||||
private whenLoadedDeferred: q.Deferred<T>
|
private whenLoadedDeferred: smartq.Deferred<T>
|
||||||
constructor(nameArg: string, cwdArg: string) {
|
constructor (nameArg: string, cwdArg: string) {
|
||||||
if (!cwdArg) {
|
if (!cwdArg) {
|
||||||
throw new Error('You must specify a directory to resolve from!')
|
throw new Error('You must specify a directory to resolve from!')
|
||||||
}
|
}
|
||||||
@ -42,40 +41,16 @@ export class LazyModule<T> {
|
|||||||
if (this.nameIsPath) {
|
if (this.nameIsPath) {
|
||||||
this.name = path.join(this.cwd, this.name)
|
this.name = path.join(this.cwd, this.name)
|
||||||
}
|
}
|
||||||
this.whenLoadedDeferred = q.defer<T>()
|
this.whenLoadedDeferred = smartq.defer<T>()
|
||||||
this.whenLoaded = this.whenLoadedDeferred.promise
|
this.whenLoaded = this.whenLoadedDeferred.promise
|
||||||
}
|
}
|
||||||
|
|
||||||
setLoader(loaderArg: TLoader) {
|
|
||||||
this.loader = loaderArg
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* loads the module
|
* loads the module
|
||||||
*/
|
*/
|
||||||
load(): q.Promise<T> {
|
async load (): Promise<T> {
|
||||||
let done = q.defer<T>()
|
let loadedModule: T = require(this.name)
|
||||||
let loadedModule: T
|
|
||||||
if (this.loader === 'npm') {
|
|
||||||
loadedModule = require(this.name)
|
|
||||||
done.resolve(loadedModule)
|
|
||||||
} else if (this.loader === 'systemjs') {
|
|
||||||
let systemjs = require('systemjs')
|
|
||||||
systemjs.import(this.name).then((m) => {
|
|
||||||
loadedModule = m
|
|
||||||
this.whenLoadedDeferred.resolve(loadedModule)
|
this.whenLoadedDeferred.resolve(loadedModule)
|
||||||
done.resolve(loadedModule)
|
return loadedModule
|
||||||
}).catch(err => { console.log(err) })
|
|
||||||
} else {
|
|
||||||
throw Error('loader not supported')
|
|
||||||
}
|
|
||||||
return done.promise
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* loads additional lazy modules specified as arguments and returns them in the promise for easy use
|
|
||||||
*/
|
|
||||||
loadAlso(...args: LazyModule<any>[]) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
250
yarn.lock
250
yarn.lock
@ -15,25 +15,43 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/chai" "*"
|
"@types/chai" "*"
|
||||||
|
|
||||||
"@types/chai@*", "@types/chai@^3.4.35":
|
"@types/chai@*":
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.1.tgz#37fea779617cfec3fd2b19a0247e8bbdd5133bf6"
|
||||||
|
|
||||||
|
"@types/chai@^3.4.35":
|
||||||
version "3.5.2"
|
version "3.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
||||||
|
|
||||||
"@types/lodash@^4.14.62":
|
"@types/lodash@^4.14.67":
|
||||||
version "4.14.64"
|
version "4.14.71"
|
||||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.64.tgz#979cf3a3d4a368670840bf9b3e448dc33ffe84ee"
|
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.71.tgz#0dc383f78981216ac76e2f2c3afd998e0450e4c1"
|
||||||
|
|
||||||
"@types/minimatch@2.x.x":
|
"@types/minimatch@2.x.x":
|
||||||
version "2.0.29"
|
version "2.0.29"
|
||||||
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
|
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
|
||||||
|
|
||||||
|
"@types/node@*":
|
||||||
|
version "8.0.17"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.17.tgz#677bc8c118cfb76013febb62ede1f31d2c7222a1"
|
||||||
|
|
||||||
"@types/promises-a-plus@*":
|
"@types/promises-a-plus@*":
|
||||||
version "0.0.27"
|
version "0.0.27"
|
||||||
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
||||||
|
|
||||||
"@types/q@1.0.0", "@types/q@1.x.x":
|
"@types/q@1.x.x":
|
||||||
version "1.0.0"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.0.tgz#57e5465d665b370d4217e69b344b20faa6b724f5"
|
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.3.tgz#08e99d20f7abfc0fe202b6d5a0921bfafcdea8d0"
|
||||||
|
|
||||||
|
"@types/shelljs@^0.7.2":
|
||||||
|
version "0.7.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.2.tgz#c2bdb3fe80cd7a3da08750ca898ae44c589671f3"
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/which@^1.0.28":
|
||||||
|
version "1.0.28"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
|
||||||
|
|
||||||
ansi-256-colors@^1.1.0:
|
ansi-256-colors@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
@ -43,9 +61,9 @@ assertion-error@^1.0.1:
|
|||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
||||||
|
|
||||||
balanced-match@^0.4.1:
|
balanced-match@^1.0.0:
|
||||||
version "0.4.2"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||||
|
|
||||||
beautycolor@^1.0.7:
|
beautycolor@^1.0.7:
|
||||||
version "1.0.7"
|
version "1.0.7"
|
||||||
@ -55,14 +73,14 @@ beautycolor@^1.0.7:
|
|||||||
typings-global "^1.0.14"
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
bindings@^1.2.1:
|
bindings@^1.2.1:
|
||||||
version "1.2.1"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
|
||||||
|
|
||||||
brace-expansion@^1.1.7:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.7"
|
version "1.1.8"
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
||||||
dependencies:
|
dependencies:
|
||||||
balanced-match "^0.4.1"
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
chai-as-promised@^6.0.0:
|
chai-as-promised@^6.0.0:
|
||||||
@ -72,8 +90,8 @@ chai-as-promised@^6.0.0:
|
|||||||
check-error "^1.0.2"
|
check-error "^1.0.2"
|
||||||
|
|
||||||
chai-string@^1.3.0:
|
chai-string@^1.3.0:
|
||||||
version "1.3.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7"
|
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
|
||||||
|
|
||||||
chai@^3.5.0:
|
chai@^3.5.0:
|
||||||
version "3.5.0"
|
version "3.5.0"
|
||||||
@ -97,6 +115,13 @@ deep-eql@^0.1.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
type-detect "0.1.1"
|
type-detect "0.1.1"
|
||||||
|
|
||||||
|
define-properties@^1.1.2:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
|
||||||
|
dependencies:
|
||||||
|
foreach "^2.0.5"
|
||||||
|
object-keys "^1.0.8"
|
||||||
|
|
||||||
early@^2.1.1:
|
early@^2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
||||||
@ -105,21 +130,56 @@ early@^2.1.1:
|
|||||||
smartq "^1.1.1"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.16"
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
|
es-abstract@^1.5.1:
|
||||||
|
version "1.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c"
|
||||||
|
dependencies:
|
||||||
|
es-to-primitive "^1.1.1"
|
||||||
|
function-bind "^1.1.0"
|
||||||
|
is-callable "^1.1.3"
|
||||||
|
is-regex "^1.0.3"
|
||||||
|
|
||||||
|
es-to-primitive@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
|
||||||
|
dependencies:
|
||||||
|
is-callable "^1.1.1"
|
||||||
|
is-date-object "^1.0.1"
|
||||||
|
is-symbol "^1.0.1"
|
||||||
|
|
||||||
|
es6-error@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
|
||||||
|
|
||||||
|
foreach@^2.0.5:
|
||||||
|
version "2.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
||||||
|
|
||||||
fs.realpath@^1.0.0:
|
fs.realpath@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
|
|
||||||
|
function-bind@^1.0.2, function-bind@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"
|
||||||
|
|
||||||
glob@^7.0.0:
|
glob@^7.0.0:
|
||||||
version "7.1.1"
|
version "7.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||||
dependencies:
|
dependencies:
|
||||||
fs.realpath "^1.0.0"
|
fs.realpath "^1.0.0"
|
||||||
inflight "^1.0.4"
|
inflight "^1.0.4"
|
||||||
inherits "2"
|
inherits "2"
|
||||||
minimatch "^3.0.2"
|
minimatch "^3.0.4"
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
inflight@^1.0.4:
|
inflight@^1.0.4:
|
||||||
version "1.0.6"
|
version "1.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||||
@ -135,10 +195,33 @@ interpret@^1.0.0:
|
|||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
|
||||||
|
|
||||||
leakage@^0.2.0:
|
is-callable@^1.1.1, is-callable@^1.1.3:
|
||||||
version "0.2.0"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.2.0.tgz#9e7a8cc1d241d8c8427e348769e192e172fd8733"
|
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
|
||||||
|
|
||||||
|
is-date-object@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
|
||||||
|
|
||||||
|
is-regex@^1.0.3:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
|
||||||
dependencies:
|
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"
|
||||||
|
|
||||||
|
isexe@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
|
|
||||||
|
leakage@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
||||||
|
dependencies:
|
||||||
|
es6-error "^4.0.2"
|
||||||
left-pad "^1.1.3"
|
left-pad "^1.1.3"
|
||||||
memwatch-next "^0.3.0"
|
memwatch-next "^0.3.0"
|
||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
@ -148,18 +231,19 @@ left-pad@^1.1.3:
|
|||||||
version "1.1.3"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
|
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
|
||||||
|
|
||||||
lik@^1.0.30:
|
lik@^1.0.38:
|
||||||
version "1.0.30"
|
version "1.0.38"
|
||||||
resolved "https://registry.yarnpkg.com/lik/-/lik-1.0.30.tgz#488485088fc0dca9d08ba9744796d1dbf6b1eca4"
|
resolved "https://registry.yarnpkg.com/lik/-/lik-1.0.38.tgz#ccff0abd3d9236a5e4b7d80d514c5c210f18469b"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/lodash" "^4.14.62"
|
"@types/lodash" "^4.14.67"
|
||||||
"@types/minimatch" "2.x.x"
|
"@types/minimatch" "2.x.x"
|
||||||
"@types/q" "1.x.x"
|
"@types/q" "1.x.x"
|
||||||
lodash "^4.17.4"
|
lodash "^4.17.4"
|
||||||
minimatch "^3.0.3"
|
minimatch "^3.0.4"
|
||||||
q "^1.5.0"
|
q "^1.5.0"
|
||||||
rxjs "^5.3.0"
|
rxjs "^5.4.1"
|
||||||
typings-global "^1.0.14"
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
|
||||||
lodash@^4.17.4:
|
lodash@^4.17.4:
|
||||||
version "4.17.4"
|
version "4.17.4"
|
||||||
@ -172,7 +256,7 @@ memwatch-next@^0.3.0:
|
|||||||
bindings "^1.2.1"
|
bindings "^1.2.1"
|
||||||
nan "^2.3.2"
|
nan "^2.3.2"
|
||||||
|
|
||||||
minimatch@^3.0.2, minimatch@^3.0.3:
|
minimatch@^3.0.4:
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -186,6 +270,17 @@ nan@^2.3.2:
|
|||||||
version "2.6.2"
|
version "2.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
||||||
|
|
||||||
|
object-keys@^1.0.8:
|
||||||
|
version "1.0.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
||||||
|
|
||||||
|
object.getownpropertydescriptors@^2.0.3:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.2"
|
||||||
|
es-abstract "^1.5.1"
|
||||||
|
|
||||||
once@^1.3.0:
|
once@^1.3.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
@ -215,24 +310,24 @@ rechoir@^0.6.2:
|
|||||||
resolve "^1.1.6"
|
resolve "^1.1.6"
|
||||||
|
|
||||||
resolve@^1.1.6:
|
resolve@^1.1.6:
|
||||||
version "1.3.3"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
|
||||||
dependencies:
|
dependencies:
|
||||||
path-parse "^1.0.5"
|
path-parse "^1.0.5"
|
||||||
|
|
||||||
rxjs@^5.3.0:
|
rxjs@^5.4.1:
|
||||||
version "5.4.0"
|
version "5.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.0.tgz#a7db14ab157f9d7aac6a56e655e7a3860d39bf26"
|
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.2.tgz#2a3236fcbf03df57bae06fd6972fd99e5c08fcf7"
|
||||||
dependencies:
|
dependencies:
|
||||||
symbol-observable "^1.0.1"
|
symbol-observable "^1.0.1"
|
||||||
|
|
||||||
semver@^5.3.0:
|
semver@^5.3.0:
|
||||||
version "5.3.0"
|
version "5.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
||||||
|
|
||||||
shelljs@^0.7.7:
|
shelljs@^0.7.8:
|
||||||
version "0.7.7"
|
version "0.7.8"
|
||||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1"
|
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.0.0"
|
glob "^7.0.0"
|
||||||
interpret "^1.0.0"
|
interpret "^1.0.0"
|
||||||
@ -249,37 +344,49 @@ smartchai@^1.0.3:
|
|||||||
chai-as-promised "^6.0.0"
|
chai-as-promised "^6.0.0"
|
||||||
chai-string "^1.3.0"
|
chai-string "^1.3.0"
|
||||||
|
|
||||||
smartdelay@^1.0.1:
|
smartdelay@^1.0.3:
|
||||||
version "1.0.1"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.1.tgz#687f8bcc09d7c62c9c5a8a1771c1aba3aff54156"
|
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
|
||||||
dependencies:
|
dependencies:
|
||||||
typings-global "^1.0.14"
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
smartq@^1.1.1:
|
smartq@^1.1.1, smartq@^1.1.6:
|
||||||
version "1.1.1"
|
version "1.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.6.tgz#0c1ff4336d95e95b4f1fdd8ccd7e2c5a323b8412"
|
||||||
dependencies:
|
dependencies:
|
||||||
typed-promisify "^0.3.0"
|
typings-global "^1.0.19"
|
||||||
typings-global "^1.0.14"
|
util.promisify "^1.0.0"
|
||||||
|
|
||||||
|
smartshell@^1.0.6:
|
||||||
|
version "1.0.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.13.tgz#277b34e6624df70003e0e3a6c900cd5ebab7eb92"
|
||||||
|
dependencies:
|
||||||
|
"@types/shelljs" "^0.7.2"
|
||||||
|
"@types/which" "^1.0.28"
|
||||||
|
shelljs "^0.7.8"
|
||||||
|
smartq "^1.1.6"
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
which "^1.2.14"
|
||||||
|
|
||||||
symbol-observable@^1.0.1:
|
symbol-observable@^1.0.1:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
|
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
|
||||||
|
|
||||||
systemjs@^0.20.12:
|
systemjs@^0.20.17:
|
||||||
version "0.20.12"
|
version "0.20.17"
|
||||||
resolved "https://registry.yarnpkg.com/systemjs/-/systemjs-0.20.12.tgz#135cc471280448453347829ebb9639a09a67f101"
|
resolved "https://registry.yarnpkg.com/systemjs/-/systemjs-0.20.17.tgz#b3143bb7e02d2f41b9a640351a06024b7b63ae59"
|
||||||
|
|
||||||
tapbundle@^1.0.12:
|
tapbundle@^1.1.1:
|
||||||
version "1.0.12"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.0.12.tgz#71d29273aad280f5c4e15b2700430b2456a5d364"
|
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.1.1.tgz#ec4172c0e82a77b1f6133fef2606311ede28a62d"
|
||||||
dependencies:
|
dependencies:
|
||||||
early "^2.1.1"
|
early "^2.1.1"
|
||||||
leakage "^0.2.0"
|
leakage "^0.3.0"
|
||||||
smartchai "^1.0.3"
|
smartchai "^1.0.3"
|
||||||
smartdelay "^1.0.1"
|
smartdelay "^1.0.3"
|
||||||
smartq "^1.1.1"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.16"
|
typings-global "^1.0.19"
|
||||||
|
|
||||||
type-detect@0.1.1:
|
type-detect@0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
@ -289,16 +396,25 @@ type-detect@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
||||||
|
|
||||||
typed-promisify@^0.3.0:
|
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19, typings-global@^1.0.20:
|
||||||
version "0.3.0"
|
version "1.0.20"
|
||||||
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.20.tgz#3da769c54db538247c5d877d1d9e97eb2ec981ff"
|
||||||
|
|
||||||
typings-global@^1.0.14, typings-global@^1.0.16:
|
|
||||||
version "1.0.16"
|
|
||||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.16.tgz#489b71781af24268750c2899316400a5e482961f"
|
|
||||||
dependencies:
|
dependencies:
|
||||||
semver "^5.3.0"
|
semver "^5.3.0"
|
||||||
shelljs "^0.7.7"
|
smartshell "^1.0.6"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
which@^1.2.14:
|
||||||
|
version "1.2.14"
|
||||||
|
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
|
||||||
|
dependencies:
|
||||||
|
isexe "^2.0.0"
|
||||||
|
|
||||||
wrappy@1:
|
wrappy@1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
Reference in New Issue
Block a user