fix(core): update to latest standards

This commit is contained in:
Philipp Kunz 2018-06-13 22:34:49 +02:00
parent 8c941fe1b7
commit 97bbb8b38b
15 changed files with 552 additions and 439 deletions

View File

@ -3,23 +3,39 @@ image: hosttoday/ht-docker-node:npmci
cache: cache:
paths: paths:
- .yarn/ - .npmci_cache/
key: "$CI_BUILD_STAGE" key: "$CI_BUILD_STAGE"
stages: stages:
- mirror - security
- test - test
- release - release
- trigger - metadata
- pages
# ====================
# security stage
# ====================
mirror: mirror:
stage: mirror stage: security
script: script:
- npmci git mirror - npmci git mirror
tags: tags:
- docker - docker
- notpriv
snyk:
stage: security
script:
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
tags:
- docker
- notpriv
# ====================
# test stage
# ====================
testLEGACY: testLEGACY:
stage: test stage: test
script: script:
@ -29,6 +45,7 @@ testLEGACY:
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
allow_failure: true allow_failure: true
testLTS: testLTS:
@ -40,6 +57,7 @@ testLTS:
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
testSTABLE: testSTABLE:
stage: test stage: test
@ -50,34 +68,60 @@ testSTABLE:
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- docker - docker
- notpriv
release: release:
stage: release stage: release
script: script:
- npmci npm prepare - npmci node install stable
- npmci npm publish - npmci npm publish
only: only:
- tags - tags
tags: tags:
- docker - docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
image: docker:stable
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths: [codeclimate.json]
tags:
- docker
- priv
trigger: trigger:
stage: trigger stage: metadata
script: script:
- npmci trigger - npmci trigger
only: only:
- tags - tags
tags: tags:
- docker - docker
- notpriv
pages: pages:
image: hosttoday/ht-docker-node:npmci image: hosttoday/ht-docker-node:npmci
stage: pages stage: metadata
script: script:
- npmci command yarn global add npmpage - npmci command npm install -g npmpage
- npmci command npmpage - npmci command npmpage
tags: tags:
- docker - docker
- notpriv
only: only:
- tags - tags
artifacts: artifacts:

View File

@ -1,13 +1,16 @@
# smartrequest # smartrequest
dropin replacement for request dropin replacement for request
## Availabililty ## Availabililty
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartrequest) [![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartrequest)
[![git](https://push.rocks/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartrequest) [![git](https://push.rocks/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartrequest)
[![git](https://push.rocks/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartrequest) [![git](https://push.rocks/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartrequest)
[![docs](https://push.rocks/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartrequest/) [![docs](https://push.rocks/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartrequest/)
## Status for master ## Status for master
[![build status](https://GitLab.com/pushrocks/smartrequest/badges/master/build.svg)](https://GitLab.com/pushrocks/smartrequest/commits/master) [![build status](https://GitLab.com/pushrocks/smartrequest/badges/master/build.svg)](https://GitLab.com/pushrocks/smartrequest/commits/master)
[![coverage report](https://GitLab.com/pushrocks/smartrequest/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartrequest/commits/master) [![coverage report](https://GitLab.com/pushrocks/smartrequest/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartrequest/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/smartrequest.svg)](https://www.npmjs.com/package/smartrequest) [![npm downloads per month](https://img.shields.io/npm/dm/smartrequest.svg)](https://www.npmjs.com/package/smartrequest)
@ -19,6 +22,7 @@ dropin replacement for request
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) [![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
## Usage ## Usage
Use TypeScript for best in class instellisense. Use TypeScript for best in class instellisense.
> note: smartrequest uses the **native** node request module under the hood (not the one from npm) > note: smartrequest uses the **native** node request module under the hood (not the one from npm)
@ -60,7 +64,6 @@ smartrequest.get('https://example.com/bigfile.mp4', optionsArg, true).then(res =
// do something when things have ended // do something when things have ended
}) })
}) })
``` ```
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks) [![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)

6
dist/index.js vendored
View File

@ -18,8 +18,8 @@ exports.get = (domainArg, optionsArg = {}) => __awaiter(this, void 0, void 0, fu
}); });
exports.post = (domainArg, optionsArg = {}) => __awaiter(this, void 0, void 0, function* () { exports.post = (domainArg, optionsArg = {}) => __awaiter(this, void 0, void 0, function* () {
optionsArg.method = 'POST'; optionsArg.method = 'POST';
if (typeof optionsArg.requestBody === 'object' if (typeof optionsArg.requestBody === 'object' &&
&& (!optionsArg.headers || (!optionsArg.headers['Content-Type']))) { (!optionsArg.headers || !optionsArg.headers['Content-Type'])) {
// make sure headers exist // make sure headers exist
if (!optionsArg.headers) { if (!optionsArg.headers) {
optionsArg.headers = {}; optionsArg.headers = {};
@ -42,4 +42,4 @@ exports.del = (domainArg, optionsArg = {}) => __awaiter(this, void 0, void 0, fu
let response = yield smartrequest_request_1.request(domainArg, optionsArg); let response = yield smartrequest_request_1.request(domainArg, optionsArg);
return response; return response;
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb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0FBQztJQUNwRCxPQUFPLFFBQVEsQ0FBQztBQUNsQixDQUFDLENBQUEsQ0FBQztBQUVTLFFBQUEsR0FBRyxHQUFHLENBQU8sU0FBaUIsRUFBRSxhQUE4QyxFQUFFLEVBQUUsRUFBRTtJQUM3RixVQUFVLENBQUMsTUFBTSxHQUFHLFFBQVEsQ0FBQztJQUM3QixJQUFJLFFBQVEsR0FBRyxNQUFNLDhCQUFPLENBQUMsU0FBUyxFQUFFLFVBQVUsQ0FBQyxDQUFDO0lBQ3BELE9BQU8sUUFBUSxDQUFDO0FBQ2xCLENBQUMsQ0FBQSxDQUFDIn0=

View File

@ -1,3 +1,4 @@
/// <reference types="node" />
import * as https from 'https'; import * as https from 'https';
export interface ISmartRequestOptions extends https.RequestOptions { export interface ISmartRequestOptions extends https.RequestOptions {
requestBody?: any; requestBody?: any;

View File

@ -8,4 +8,4 @@ const https = require("https");
exports.https = https; exports.https = https;
const q = require("smartq"); const q = require("smartq");
exports.q = q; exports.q = q;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRyZXF1ZXN0LnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHJlcXVlc3QucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJCQUEwQjtBQU94QixrQkFBRztBQU5MLDZCQUE0QjtBQU8xQixvQkFBSTtBQU5OLCtCQUE4QjtBQU81QixzQkFBSztBQUxQLDRCQUEyQjtBQU16QixjQUFDIn0= //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRyZXF1ZXN0LnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHJlcXVlc3QucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJCQUEyQjtBQU1sQixrQkFBRztBQUxaLDZCQUE2QjtBQUtmLG9CQUFJO0FBSmxCLCtCQUErQjtBQUlYLHNCQUFLO0FBRnpCLDRCQUE0QjtBQUVELGNBQUMifQ==

View File

@ -1,2 +1,7 @@
/// <reference types="node" />
import * as interfaces from './smartrequest.interfaces'; import * as interfaces from './smartrequest.interfaces';
import { IncomingMessage } from 'http';
export interface extendedIncomingMessage extends IncomingMessage {
body: any;
}
export declare let request: (domainArg: string, optionsArg?: interfaces.ISmartRequestOptions, streamArg?: boolean) => Promise<Response>; export declare let request: (domainArg: string, optionsArg?: interfaces.ISmartRequestOptions, streamArg?: boolean) => Promise<Response>;

View File

@ -9,21 +9,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./smartrequest.plugins"); const plugins = require("./smartrequest.plugins");
let buildResponse = (responseArg) => { ;
let buildResponse = (incomingMessageArg) => {
let done = plugins.q.defer(); let done = plugins.q.defer();
// Continuously update stream with data // Continuously update stream with data
let body = ''; let body = '';
responseArg.on('data', function (chunkArg) { incomingMessageArg.on('data', function (chunkArg) {
body += chunkArg; body += chunkArg;
}); });
responseArg.on('end', function () { incomingMessageArg.on('end', function () {
try { try {
responseArg.body = JSON.parse(body); incomingMessageArg.body = JSON.parse(body);
} }
catch (err) { catch (err) {
responseArg.body = body; incomingMessageArg.body = body;
} }
done.resolve(responseArg); done.resolve(incomingMessageArg);
}); });
return done.promise; return done.promise;
}; };
@ -53,7 +54,7 @@ exports.request = (domainArg, optionsArg = {}, streamArg = false) => __awaiter(t
} }
request.write(optionsArg.requestBody); request.write(optionsArg.requestBody);
} }
request.on('error', (e) => { request.on('error', e => {
console.error(e); console.error(e);
}); });
request.end(); request.end();
@ -73,7 +74,7 @@ exports.request = (domainArg, optionsArg = {}, streamArg = false) => __awaiter(t
} }
request.write(optionsArg.requestBody); request.write(optionsArg.requestBody);
} }
request.on('error', (e) => { request.on('error', e => {
console.error(e); console.error(e);
}); });
request.end(); request.end();
@ -83,4 +84,4 @@ exports.request = (domainArg, optionsArg = {}, streamArg = false) => __awaiter(t
} }
return done.promise; return done.promise;
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRyZXF1ZXN0LnJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHJlcXVlc3QucmVxdWVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQ0Esa0RBQWlEO0FBR2pELElBQUksYUFBYSxHQUFHLENBQUMsV0FBVyxFQUFnQixFQUFFO0lBQ2hELElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUE7SUFDNUIsdUNBQXVDO0lBQ3ZDLElBQUksSUFBSSxHQUFHLEVBQUUsQ0FBQTtJQUNiLFdBQVcsQ0FBQyxFQUFFLENBQUMsTUFBTSxFQUFFLFVBQVUsUUFBUTtRQUN2QyxJQUFJLElBQUksUUFBUSxDQUFBO0lBQ2xCLENBQUMsQ0FBQyxDQUFBO0lBQ0YsV0FBVyxDQUFDLEVBQUUsQ0FBQyxLQUFLLEVBQUU7UUFDcEIsSUFBSSxDQUFDO1lBQ0gsV0FBVyxDQUFDLElBQUksR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFBO1FBQ3JDLENBQUM7UUFBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO1lBQ2IsV0FBVyxDQUFDLElBQUksR0FBRyxJQUFJLENBQUE7UUFDekIsQ0FBQztRQUNELElBQUksQ0FBQyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUE7SUFDM0IsQ0FBQyxDQUFDLENBQUE7SUFDRixNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0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0FDaEU7SUFDRCxPQUFPLElBQUksQ0FBQyxPQUFPLENBQUM7QUFDdEIsQ0FBQyxDQUFBLENBQUMifQ==

354
package-lock.json generated Normal file
View File

@ -0,0 +1,354 @@
{
"name": "smartrequest",
"version": "1.0.8",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@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/mocha": {
"version": "2.2.48",
"resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-2.2.48.tgz",
"integrity": "sha512-nlK/iyETgafGli8Zh9zJVCTicvU3iajSkRwOh3Hhiva598CMqNJ4NcVCGMTGKpGpTYj/9R8RLzS9NAykSSCqGw==",
"dev": true
},
"@types/node": {
"version": "10.3.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.3.tgz",
"integrity": "sha512-/gwCgiI2e9RzzZTKbl+am3vgNqOt7a9fJ/uxv4SqYKxenoEDNVU3KZEadlpusWhQI0A0dOrZ0T68JYKVjzmgdQ==",
"dev": true
},
"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
},
"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
},
"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
},
"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
},
"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"
}
},
"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
},
"foreach": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
},
"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
},
"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"
}
},
"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="
},
"leakage": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/leakage/-/leakage-0.3.0.tgz",
"integrity": "sha1-FdaYq9x2u8ZDlgH08wIOd+LVDDk=",
"dev": true,
"requires": {
"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": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
"integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==",
"dev": true
},
"memwatch-next": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/memwatch-next/-/memwatch-next-0.3.0.tgz",
"integrity": "sha1-IREFD5qQbgqi1ypOwPAInHhyb48=",
"dev": true,
"requires": {
"bindings": "^1.2.1",
"nan": "^2.3.2"
}
},
"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.11",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz",
"integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0="
},
"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"
}
},
"pathval": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
"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
},
"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"
}
},
"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"
}
},
"tapbundle": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/tapbundle/-/tapbundle-2.0.0.tgz",
"integrity": "sha512-NU4OG3pcPOgJAtACIPNRb68jJg5eSumRRhH9RyOuYBRU8fnhqIGNnv8YZngAIxpdUUunKKz6ABJCVhL0Z2ONHA==",
"dev": true,
"requires": {
"early": "^2.1.1",
"leakage": "^0.3.0",
"smartchai": "^2.0.0",
"smartdelay": "^1.0.3",
"smartq": "^1.1.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==",
"dev": true
},
"typings-test": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/typings-test/-/typings-test-1.0.3.tgz",
"integrity": "sha1-+6uJXrPwxEhC5z2wWfZZRrlx42k=",
"dev": true,
"requires": {
"@types/mocha": "^2.2.31",
"typings-global": "*"
}
},
"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"
}
}
}
}

View File

@ -5,7 +5,8 @@
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
"scripts": { "scripts": {
"test": "(npmts)" "test": "(npmts)",
"build": "echo \"Not needed for now\""
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -24,7 +25,9 @@
"smartq": "^1.1.1" "smartq": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"tapbundle": "^1.0.14", "@types/node": "^10.3.3",
"tapbundle": "^2.0.0",
"typings-test": "^1.0.3" "typings-test": "^1.0.3"
} },
"private": true
} }

View File

@ -1,25 +1,27 @@
import 'typings-test' import 'typings-test';
import { tap, expect } from 'tapbundle' import { tap, expect } from 'tapbundle';
import * as smartrequest from '../ts/index' import * as smartrequest from '../ts/index';
tap.test('should request a html document over https', async () => { tap.test('should request a html document over https', async () => {
await expect( await expect(smartrequest.get('https://encrypted.google.com/'))
smartrequest.get('https://encrypted.google.com/') .to.eventually.property('body')
).to.eventually.property('body').be.a('string') .be.a('string');
}) });
tap.test('should request a JSON document over https', async () => { tap.test('should request a JSON document over https', async () => {
await expect( await expect(smartrequest.get('https://jsonplaceholder.typicode.com/posts/1'))
smartrequest.get('https://jsonplaceholder.typicode.com/posts/1') .to.eventually.property('body')
).to.eventually.property('body').property('id').equal(1) .property('id')
}) .equal(1);
});
tap.test('should post a JSON document over http', async () => { tap.test('should post a JSON document over http', async () => {
await expect( await expect(smartrequest.post('http://md5.jsontest.com/?text=example_text'))
smartrequest.post('http://md5.jsontest.com/?text=example_text') .to.eventually.property('body')
).to.eventually.property('body').property('md5').equal('fa4c6baa0812e5b5c80ed8885e55a8a6') .property('md5')
}) .equal('fa4c6baa0812e5b5c80ed8885e55a8a6');
});
tap.start() tap.start();

View File

@ -1,45 +1,47 @@
import * as https from 'https' import * as https from 'https';
import * as plugins from './smartrequest.plugins' import * as plugins from './smartrequest.plugins';
import * as interfaces from './smartrequest.interfaces' import * as interfaces from './smartrequest.interfaces';
import { request } from './smartrequest.request' import { request } from './smartrequest.request';
export { request } from './smartrequest.request' export { request } from './smartrequest.request';
export { ISmartRequestOptions } from './smartrequest.interfaces' export { ISmartRequestOptions } from './smartrequest.interfaces';
export let get = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => { export let get = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => {
optionsArg.method = 'GET' optionsArg.method = 'GET';
let response = await request(domainArg, optionsArg) let response = await request(domainArg, optionsArg);
return response return response;
} };
export let post = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => { export let post = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => {
optionsArg.method = 'POST' optionsArg.method = 'POST';
if ( if (
typeof optionsArg.requestBody === 'object' typeof optionsArg.requestBody === 'object' &&
&& (!optionsArg.headers || (!optionsArg.headers['Content-Type'])) (!optionsArg.headers || !optionsArg.headers['Content-Type'])
){ ) {
// make sure headers exist // make sure headers exist
if(!optionsArg.headers) { optionsArg.headers = {} } if (!optionsArg.headers) {
optionsArg.headers = {};
}
// assign the right Content-Type, leaving all other headers in place // assign the right Content-Type, leaving all other headers in place
Object.assign(optionsArg.headers, { Object.assign(optionsArg.headers, {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}) });
} }
let response = await request(domainArg, optionsArg) let response = await request(domainArg, optionsArg);
return response return response;
} };
export let put = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => { export let put = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => {
optionsArg.method = 'PUT' optionsArg.method = 'PUT';
let response = await request(domainArg, optionsArg) let response = await request(domainArg, optionsArg);
return response return response;
} };
export let del = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => { export let del = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => {
optionsArg.method = 'DELETE' optionsArg.method = 'DELETE';
let response = await request(domainArg, optionsArg) let response = await request(domainArg, optionsArg);
return response return response;
} };

View File

@ -1,6 +1,6 @@
import * as plugins from './smartrequest.plugins' import * as plugins from './smartrequest.plugins';
import * as https from 'https' import * as https from 'https';
export interface ISmartRequestOptions extends https.RequestOptions { export interface ISmartRequestOptions extends https.RequestOptions {
requestBody?: any requestBody?: any;
} }

View File

@ -1,12 +1,7 @@
import * as url from 'url' import * as url from 'url';
import * as http from 'http' import * as http from 'http';
import * as https from 'https' import * as https from 'https';
import * as q from 'smartq' import * as q from 'smartq';
export { export { url, http, https, q };
url,
http,
https,
q
}

View File

@ -1,72 +1,85 @@
import * as https from 'https' import * as https from 'https';
import * as plugins from './smartrequest.plugins' import * as plugins from './smartrequest.plugins';
import * as interfaces from './smartrequest.interfaces' import * as interfaces from './smartrequest.interfaces';
let buildResponse = (responseArg): Promise<any> => { import { IncomingMessage } from 'http';
let done = plugins.q.defer()
export interface extendedIncomingMessage extends IncomingMessage {
body: any
};
let buildResponse = (incomingMessageArg: IncomingMessage): Promise<extendedIncomingMessage> => {
let done = plugins.q.defer<extendedIncomingMessage>();
// Continuously update stream with data // Continuously update stream with data
let body = '' let body = '';
responseArg.on('data', function (chunkArg) { incomingMessageArg.on('data', function(chunkArg) {
body += chunkArg body += chunkArg;
}) });
responseArg.on('end', function () {
try {
responseArg.body = JSON.parse(body)
} catch (err) {
responseArg.body = body
}
done.resolve(responseArg)
})
return done.promise
}
export let request = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}, streamArg: boolean = false): Promise<Response> => { incomingMessageArg.on('end', function() {
let done = plugins.q.defer<any>() try {
let parsedUrl: plugins.url.Url (incomingMessageArg as extendedIncomingMessage).body = JSON.parse(body);
} catch (err) {
(incomingMessageArg as extendedIncomingMessage).body = body;
}
done.resolve(incomingMessageArg as extendedIncomingMessage);
});
return done.promise;
};
export let request = async (
domainArg: string,
optionsArg: interfaces.ISmartRequestOptions = {},
streamArg: boolean = false
): Promise<Response> => {
let done = plugins.q.defer<any>();
let parsedUrl: plugins.url.Url;
if (domainArg) { if (domainArg) {
parsedUrl = plugins.url.parse(domainArg) parsedUrl = plugins.url.parse(domainArg);
optionsArg.hostname = parsedUrl.hostname optionsArg.hostname = parsedUrl.hostname;
if (parsedUrl.port) { optionsArg.port = parseInt(parsedUrl.port) } if (parsedUrl.port) {
optionsArg.path = parsedUrl.path optionsArg.port = parseInt(parsedUrl.port);
}
optionsArg.path = parsedUrl.path;
} }
if (!parsedUrl || parsedUrl.protocol === 'https:') { if (!parsedUrl || parsedUrl.protocol === 'https:') {
let request = plugins.https.request(optionsArg, response => { let request = plugins.https.request(optionsArg, response => {
if (streamArg) { if (streamArg) {
done.resolve(response) done.resolve(response);
} else { } else {
buildResponse(response).then(done.resolve) buildResponse(response).then(done.resolve);
} }
}) });
if (optionsArg.requestBody) { if (optionsArg.requestBody) {
if (typeof optionsArg.requestBody !== 'string') { if (typeof optionsArg.requestBody !== 'string') {
optionsArg.requestBody = JSON.stringify(optionsArg.requestBody) optionsArg.requestBody = JSON.stringify(optionsArg.requestBody);
} }
request.write(optionsArg.requestBody) request.write(optionsArg.requestBody);
} }
request.on('error', (e) => { request.on('error', e => {
console.error(e) console.error(e);
}) });
request.end() request.end();
} else if (parsedUrl.protocol === 'http:') { } else if (parsedUrl.protocol === 'http:') {
let request = plugins.http.request(optionsArg, response => { let request = plugins.http.request(optionsArg, response => {
if (streamArg) { if (streamArg) {
done.resolve(response) done.resolve(response);
} else { } else {
buildResponse(response).then(done.resolve) buildResponse(response).then(done.resolve);
} }
}) });
if (optionsArg.requestBody) { if (optionsArg.requestBody) {
if (typeof optionsArg.requestBody !== 'string') { if (typeof optionsArg.requestBody !== 'string') {
optionsArg.requestBody = JSON.stringify(optionsArg.requestBody) optionsArg.requestBody = JSON.stringify(optionsArg.requestBody);
} }
request.write(optionsArg.requestBody) request.write(optionsArg.requestBody);
} }
request.on('error', (e) => { request.on('error', e => {
console.error(e) console.error(e);
}) });
request.end() request.end();
} else { } else {
throw new Error(`unsupported protocol: ${parsedUrl.protocol}`) throw new Error(`unsupported protocol: ${parsedUrl.protocol}`);
} }
return done.promise return done.promise;
} };

310
yarn.lock
View File

@ -1,310 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/chai-as-promised@0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz#43d52892aa998e185a3de3e2477edb8573be1d77"
dependencies:
"@types/chai" "*"
"@types/promises-a-plus" "*"
"@types/chai-string@^1.1.30":
version "1.1.30"
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.30.tgz#4d8744b31a5a2295fc01c981ed1e2d4c8a070f0a"
dependencies:
"@types/chai" "*"
"@types/chai@*", "@types/chai@^3.4.35":
version "3.5.2"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
"@types/mocha@^2.2.31":
version "2.2.41"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.41.tgz#e27cf0817153eb9f2713b2d3f6c68f1e1c3ca608"
"@types/node@*", "@types/node@^7.0.29":
version "7.0.29"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.29.tgz#ccfcec5b7135c7caf6c4ffb8c7f33102340d99df"
"@types/promises-a-plus@*":
version "0.0.27"
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
"@types/shelljs@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.6.0.tgz#090b705c102ce7fc5c0c5ea9b524418ff15840df"
dependencies:
"@types/node" "*"
"@types/which@^1.0.28":
version "1.0.28"
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
ansi-256-colors@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
assertion-error@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
balanced-match@^0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
beautycolor@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.7.tgz#a4715738ac4c8221371e9cbeb5a6cc6d11ecbf7c"
dependencies:
ansi-256-colors "^1.1.0"
typings-global "^1.0.14"
bindings@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.2.1.tgz#14ad6113812d2d37d72e67b4cacb4bb726505f11"
brace-expansion@^1.1.7:
version "1.1.7"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
dependencies:
balanced-match "^0.4.1"
concat-map "0.0.1"
chai-as-promised@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
dependencies:
check-error "^1.0.2"
chai-string@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7"
chai@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
dependencies:
assertion-error "^1.0.1"
deep-eql "^0.1.3"
type-detect "^1.0.0"
check-error@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
deep-eql@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
dependencies:
type-detect "0.1.1"
early@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
dependencies:
beautycolor "^1.0.7"
smartq "^1.1.1"
typings-global "^1.0.16"
es6-error@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
glob@^7.0.0:
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"
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:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
interpret@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
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"
memwatch-next "^0.3.0"
minimist "^1.2.0"
pretty-bytes "^4.0.2"
left-pad@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
memwatch-next@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
dependencies:
bindings "^1.2.1"
nan "^2.3.2"
minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
brace-expansion "^1.1.7"
minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
nan@^2.3.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"
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"
path-parse@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
pretty-bytes@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
dependencies:
resolve "^1.1.6"
resolve@^1.1.6:
version "1.3.3"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
dependencies:
path-parse "^1.0.5"
semver@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
shelljs@^0.7.6:
version "0.7.8"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"
smartchai@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
dependencies:
"@types/chai" "^3.4.35"
"@types/chai-as-promised" "0.0.29"
"@types/chai-string" "^1.1.30"
chai "^3.5.0"
chai-as-promised "^6.0.0"
chai-string "^1.3.0"
smartdelay@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
dependencies:
smartq "^1.1.1"
typings-global "^1.0.16"
smartq@^1.1.0, smartq@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
dependencies:
typed-promisify "^0.3.0"
typings-global "^1.0.14"
smartshell@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.6.tgz#27b1c79029784abe72ac7e91fe698b7ebecc6629"
dependencies:
"@types/shelljs" "^0.6.0"
"@types/which" "^1.0.28"
shelljs "^0.7.6"
smartq "^1.1.0"
which "^1.2.12"
tapbundle@^1.0.14:
version "1.0.14"
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.0.14.tgz#75827e335fcb02216f0267a26a26d702ddc02e3c"
dependencies:
early "^2.1.1"
leakage "^0.3.0"
smartchai "^1.0.3"
smartdelay "^1.0.3"
smartq "^1.1.1"
typings-global "^1.0.16"
type-detect@0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
type-detect@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
typed-promisify@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
typings-global@*, typings-global@^1.0.14, typings-global@^1.0.16:
version "1.0.17"
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.17.tgz#41edc331ccec3168289adc8849e1e255efbe7152"
dependencies:
"@types/node" "^7.0.29"
semver "^5.3.0"
smartshell "^1.0.6"
typings-test@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/typings-test/-/typings-test-1.0.3.tgz#fbab895eb3f0c44842e73db059f65946b971e369"
dependencies:
"@types/mocha" "^2.2.31"
typings-global "*"
which@^1.2.12:
version "1.2.14"
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
dependencies:
isexe "^2.0.0"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"