fix(core): update

This commit is contained in:
Philipp Kunz 2019-02-24 23:14:47 +01:00
parent 4e6738daad
commit cd1c41b513
10 changed files with 336 additions and 105 deletions

View File

@ -26,6 +26,7 @@ mirror:
snyk: snyk:
stage: security stage: security
script: script:
- npmci npm prepare
- npmci command npm install -g snyk - npmci command npm install -g snyk
- npmci command npm install --ignore-scripts - npmci command npm install --ignore-scripts
- npmci command snyk test - npmci command snyk test
@ -33,24 +34,39 @@ snyk:
- docker - docker
- notpriv - notpriv
sast:
stage: security
image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- npmci npm prepare
- npmci npm install
- npmci command npm run build
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}"
--volume "$PWD:/code"
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code
artifacts:
reports:
sast: gl-sast-report.json
tags:
- docker
- priv
# ==================== # ====================
# test stage # test stage
# ==================== # ====================
testLEGACY:
stage: test
script:
- npmci node install legacy
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
allow_failure: true
testLTS: testLTS:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install lts - npmci node install lts
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -62,6 +78,7 @@ testLTS:
testSTABLE: testSTABLE:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
@ -117,8 +134,10 @@ pages:
image: hosttoday/ht-docker-node:npmci image: hosttoday/ht-docker-node:npmci
stage: metadata stage: metadata
script: script:
- npmci command npm install -g npmpage - npmci command npm install -g typedoc typescript
- npmci command npmpage - npmci npm prepare
- npmci npm install
- npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/
tags: tags:
- docker - docker
- notpriv - notpriv
@ -129,13 +148,3 @@ pages:
paths: paths:
- public - public
allow_failure: true allow_failure: true
windowsCompatibility:
image: stefanscherer/node-windows:10-build-tools
stage: metadata
script:
- npm install & npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- windows
allow_failure: true

View File

@ -1,33 +1,28 @@
# smartinject # @pushrocks/smartinject
inject modules into node inject modules into node
## Availabililty ## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartinject)
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartinject) * [gitlab.com (source)](https://gitlab.com/pushrocks/smartinject)
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartinject) * [github.com (source mirror)](https://github.com/pushrocks/smartinject)
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartinject) * [docs (typedoc)](https://pushrocks.gitlab.io/smartinject/)
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartinject/)
## Status for master ## Status for master
[![build status](https://gitlab.com/pushrocks/smartinject/badges/master/build.svg)](https://gitlab.com/pushrocks/smartinject/commits/master)
[![build status](https://GitLab.com/pushrocks/smartinject/badges/master/build.svg)](https://GitLab.com/pushrocks/smartinject/commits/master) [![coverage report](https://gitlab.com/pushrocks/smartinject/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartinject/commits/master)
[![coverage report](https://GitLab.com/pushrocks/smartinject/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartinject/commits/master) [![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartinject.svg)](https://www.npmjs.com/package/@pushrocks/smartinject)
[![npm downloads per month](https://img.shields.io/npm/dm/smartinject.svg)](https://www.npmjs.com/package/smartinject) [![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartinject/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartinject)
[![Dependency Status](https://david-dm.org/pushrocks/smartinject.svg)](https://david-dm.org/pushrocks/smartinject) [![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/smartinject/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/smartinject/master/dependencies/npm) [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![bitHound Code](https://www.bithound.io/github/pushrocks/smartinject/badges/code.svg)](https://www.bithound.io/github/pushrocks/smartinject) [![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![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.
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)
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks) [![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)

View File

@ -3,5 +3,15 @@
"globalNpmTools": [ "globalNpmTools": [
"npmts" "npmts"
] ]
},
"gitzone": {
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "smartinject",
"shortDescription": "inject modules into node",
"npmPackagename": "@pushrocks/smartinject",
"license": "MIT"
}
} }
} }

265
package-lock.json generated
View File

@ -286,7 +286,7 @@
}, },
"@types/vinyl": { "@types/vinyl": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://verdaccio.lossless.one/@types%2fvinyl/-/vinyl-2.0.2.tgz", "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.2.tgz",
"integrity": "sha512-2iYpNuOl98SrLPBZfEN9Mh2JCJ2EI9HU35SfgBEb51DcmaHkhp8cKMblYeBqMQiwXMgAD3W60DbQ4i/UdLiXhw==", "integrity": "sha512-2iYpNuOl98SrLPBZfEN9Mh2JCJ2EI9HU35SfgBEb51DcmaHkhp8cKMblYeBqMQiwXMgAD3W60DbQ4i/UdLiXhw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -311,9 +311,15 @@
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://verdaccio.lossless.one/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
"dev": true
},
"argparse": { "argparse": {
"version": "1.0.10", "version": "1.0.10",
"resolved": "https://verdaccio.lossless.one/argparse/-/argparse-1.0.10.tgz", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -322,7 +328,7 @@
}, },
"arrify": { "arrify": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/arrify/-/arrify-1.0.1.tgz", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true "dev": true
}, },
@ -338,9 +344,50 @@
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true "dev": true
}, },
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://verdaccio.lossless.one/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"dev": true,
"requires": {
"chalk": "^1.1.3",
"esutils": "^2.0.2",
"js-tokens": "^3.0.2"
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://verdaccio.lossless.one/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
},
"chalk": {
"version": "1.1.3",
"resolved": "https://verdaccio.lossless.one/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://verdaccio.lossless.one/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
}
}
},
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/balanced-match/-/balanced-match-1.0.0.tgz", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true "dev": true
}, },
@ -355,7 +402,7 @@
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://verdaccio.lossless.one/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -368,6 +415,12 @@
"resolved": "https://verdaccio.lossless.one/buffer-from/-/buffer-from-1.1.1.tgz", "resolved": "https://verdaccio.lossless.one/buffer-from/-/buffer-from-1.1.1.tgz",
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
}, },
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://verdaccio.lossless.one/builtin-modules/-/builtin-modules-1.1.1.tgz",
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
"dev": true
},
"camelcase": { "camelcase": {
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://verdaccio.lossless.one/camelcase/-/camelcase-5.0.0.tgz", "resolved": "https://verdaccio.lossless.one/camelcase/-/camelcase-5.0.0.tgz",
@ -403,6 +456,37 @@
"integrity": "sha512-sydDC3S3pNAQMYwJrs6dQX0oBQ6KfIPuOZ78n7rocW0eJJlsHPh2t3kwW7xfwYA/1Bf6/arGtSUo16rxR2JFlw==", "integrity": "sha512-sydDC3S3pNAQMYwJrs6dQX0oBQ6KfIPuOZ78n7rocW0eJJlsHPh2t3kwW7xfwYA/1Bf6/arGtSUo16rxR2JFlw==",
"dev": true "dev": true
}, },
"chalk": {
"version": "2.4.2",
"resolved": "https://verdaccio.lossless.one/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://verdaccio.lossless.one/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://verdaccio.lossless.one/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"check-error": { "check-error": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://verdaccio.lossless.one/check-error/-/check-error-1.0.2.tgz", "resolved": "https://verdaccio.lossless.one/check-error/-/check-error-1.0.2.tgz",
@ -428,19 +512,19 @@
}, },
"clone-buffer": { "clone-buffer": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/clone-buffer/-/clone-buffer-1.0.0.tgz", "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
"integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=",
"dev": true "dev": true
}, },
"clone-stats": { "clone-stats": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/clone-stats/-/clone-stats-1.0.0.tgz", "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
"integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=",
"dev": true "dev": true
}, },
"cloneable-readable": { "cloneable-readable": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://verdaccio.lossless.one/cloneable-readable/-/cloneable-readable-1.1.2.tgz", "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz",
"integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -455,6 +539,21 @@
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true "dev": true
}, },
"color-convert": {
"version": "1.9.3",
"resolved": "https://verdaccio.lossless.one/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://verdaccio.lossless.one/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"combined-stream": { "combined-stream": {
"version": "1.0.7", "version": "1.0.7",
"resolved": "https://verdaccio.lossless.one/combined-stream/-/combined-stream-1.0.7.tgz", "resolved": "https://verdaccio.lossless.one/combined-stream/-/combined-stream-1.0.7.tgz",
@ -464,9 +563,15 @@
"delayed-stream": "~1.0.0" "delayed-stream": "~1.0.0"
} }
}, },
"commander": {
"version": "2.19.0",
"resolved": "https://verdaccio.lossless.one/commander/-/commander-2.19.0.tgz",
"integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
"dev": true
},
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://verdaccio.lossless.one/concat-map/-/concat-map-0.0.1.tgz", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true "dev": true
}, },
@ -530,12 +635,24 @@
"integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==",
"dev": true "dev": true
}, },
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"esprima": { "esprima": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://verdaccio.lossless.one/esprima/-/esprima-4.0.1.tgz", "resolved": "https://verdaccio.lossless.one/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true "dev": true
}, },
"esutils": {
"version": "2.0.2",
"resolved": "https://verdaccio.lossless.one/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"dev": true
},
"execa": { "execa": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/execa/-/execa-1.0.0.tgz", "resolved": "https://verdaccio.lossless.one/execa/-/execa-1.0.0.tgz",
@ -568,7 +685,7 @@
}, },
"first-chunk-stream": { "first-chunk-stream": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz",
"integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -599,7 +716,7 @@
}, },
"fs.realpath": { "fs.realpath": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/fs.realpath/-/fs.realpath-1.0.0.tgz", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true "dev": true
}, },
@ -644,9 +761,32 @@
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
"dev": true "dev": true
}, },
"has-ansi": {
"version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://verdaccio.lossless.one/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
}
}
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://verdaccio.lossless.one/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"inflight": { "inflight": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://verdaccio.lossless.one/inflight/-/inflight-1.0.6.tgz", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -685,7 +825,7 @@
}, },
"is-utf8": { "is-utf8": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://verdaccio.lossless.one/is-utf8/-/is-utf8-0.2.1.tgz", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true "dev": true
}, },
@ -700,6 +840,12 @@
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
"dev": true "dev": true
}, },
"js-tokens": {
"version": "3.0.2",
"resolved": "https://verdaccio.lossless.one/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
"dev": true
},
"js-yaml": { "js-yaml": {
"version": "3.12.1", "version": "3.12.1",
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.12.1.tgz", "resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.12.1.tgz",
@ -712,7 +858,7 @@
}, },
"jsonfile": { "jsonfile": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://verdaccio.lossless.one/jsonfile/-/jsonfile-4.0.0.tgz", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -812,7 +958,7 @@
}, },
"minimatch": { "minimatch": {
"version": "3.0.4", "version": "3.0.4",
"resolved": "https://verdaccio.lossless.one/minimatch/-/minimatch-3.0.4.tgz", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -827,7 +973,7 @@
}, },
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.1",
"resolved": "https://verdaccio.lossless.one/mkdirp/-/mkdirp-0.5.1.tgz", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -836,7 +982,7 @@
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"resolved": "https://verdaccio.lossless.one/minimist/-/minimist-0.0.8.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true "dev": true
} }
@ -871,7 +1017,7 @@
}, },
"once": { "once": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://verdaccio.lossless.one/once/-/once-1.4.0.tgz", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -939,7 +1085,7 @@
}, },
"path-is-absolute": { "path-is-absolute": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://verdaccio.lossless.one/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true "dev": true
}, },
@ -949,6 +1095,12 @@
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
"dev": true "dev": true
}, },
"path-parse": {
"version": "1.0.6",
"resolved": "https://verdaccio.lossless.one/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
"pathval": { "pathval": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://verdaccio.lossless.one/pathval/-/pathval-1.1.0.tgz", "resolved": "https://verdaccio.lossless.one/pathval/-/pathval-1.1.0.tgz",
@ -957,7 +1109,7 @@
}, },
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://verdaccio.lossless.one/pify/-/pify-2.3.0.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true "dev": true
}, },
@ -998,13 +1150,13 @@
}, },
"remove-trailing-separator": { "remove-trailing-separator": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://verdaccio.lossless.one/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
"dev": true "dev": true
}, },
"replace-ext": { "replace-ext": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/replace-ext/-/replace-ext-1.0.0.tgz", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
"integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=",
"dev": true "dev": true
}, },
@ -1020,6 +1172,15 @@
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
"dev": true "dev": true
}, },
"resolve": {
"version": "1.10.0",
"resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.10.0.tgz",
"integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
}
},
"rxjs": { "rxjs": {
"version": "6.4.0", "version": "6.4.0",
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.4.0.tgz", "resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.4.0.tgz",
@ -1097,7 +1258,7 @@
}, },
"sprintf-js": { "sprintf-js": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://verdaccio.lossless.one/sprintf-js/-/sprintf-js-1.0.3.tgz", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true "dev": true
}, },
@ -1130,7 +1291,7 @@
}, },
"strip-bom": { "strip-bom": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/strip-bom/-/strip-bom-2.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1139,7 +1300,7 @@
}, },
"strip-bom-buf": { "strip-bom-buf": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://verdaccio.lossless.one/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz",
"integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1148,7 +1309,7 @@
}, },
"strip-bom-stream": { "strip-bom-stream": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz",
"integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1162,6 +1323,12 @@
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
"dev": true "dev": true
}, },
"supports-color": {
"version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
"dev": true
},
"symbol-tree": { "symbol-tree": {
"version": "3.2.2", "version": "3.2.2",
"resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.2.tgz", "resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.2.tgz",
@ -1199,6 +1366,42 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
"dev": true "dev": true
}, },
"tslint": {
"version": "5.13.0",
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.13.0.tgz",
"integrity": "sha512-ECOOQRxXCYnUUePG5h/+Z1Zouobk3KFpIHA9aKBB/nnMxs97S1JJPDGt5J4cGm1y9U9VmVlfboOxA8n1kSNzGw==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
"builtin-modules": "^1.1.1",
"chalk": "^2.3.0",
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
"semver": "^5.3.0",
"tslib": "^1.8.0",
"tsutils": "^2.27.2"
}
},
"tslint-config-prettier": {
"version": "1.18.0",
"resolved": "https://verdaccio.lossless.one/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz",
"integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
"dev": true
},
"tsutils": {
"version": "2.29.0",
"resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz",
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
"dev": true,
"requires": {
"tslib": "^1.8.1"
}
},
"type-detect": { "type-detect": {
"version": "4.0.8", "version": "4.0.8",
"resolved": "https://verdaccio.lossless.one/type-detect/-/type-detect-4.0.8.tgz", "resolved": "https://verdaccio.lossless.one/type-detect/-/type-detect-4.0.8.tgz",
@ -1213,7 +1416,7 @@
}, },
"universalify": { "universalify": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://verdaccio.lossless.one/universalify/-/universalify-0.1.2.tgz", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
"dev": true "dev": true
}, },
@ -1224,7 +1427,7 @@
}, },
"vinyl": { "vinyl": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://verdaccio.lossless.one/vinyl/-/vinyl-2.2.0.tgz", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz",
"integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1238,7 +1441,7 @@
}, },
"vinyl-file": { "vinyl-file": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://verdaccio.lossless.one/vinyl-file/-/vinyl-file-3.0.0.tgz", "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-3.0.0.tgz",
"integrity": "sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U=", "integrity": "sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1313,7 +1516,7 @@
}, },
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://verdaccio.lossless.one/wrappy/-/wrappy-1.0.2.tgz", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true "dev": true
}, },
@ -1360,7 +1563,7 @@
}, },
"yn": { "yn": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/yn/-/yn-2.0.0.tgz", "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz",
"integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=",
"dev": true "dev": true
} }

View File

@ -35,6 +35,8 @@
"devDependencies": { "devDependencies": {
"@gitzone/tsrun": "^1.1.17", "@gitzone/tsrun": "^1.1.17",
"@pushrocks/tapbundle": "^3.0.7", "@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^11.9.5" "@types/node": "^11.9.5",
"tslint": "^5.13.0",
"tslint-config-prettier": "^1.18.0"
} }
} }

View File

@ -27,12 +27,10 @@ tap.test('should get a string for a filePath from a .js file', async () => {
console.log(fileString); console.log(fileString);
}); });
tap.test('should accept a typescript registration', async () => { tap.test('should accept a typescript registration', async () => {});
})
tap.test('should get a string for a file path from a .ts file', async () => { tap.test('should get a string for a file path from a .ts file', async () => {
let fileString = smartinject.getFileString(path.join(__dirname, 'typescript.example.ts')); let fileString = smartinject.getFileString(path.join(__dirname, 'typescript.example.ts'));
}) });
tap.start(); tap.start();

View File

@ -1,21 +1,21 @@
import * as through2 from 'through2'; import * as through2 from 'through2';
import { cache } from './injection'; import { cache } from './injection';
import { Transform } from 'stream'; // needed for types import { Transform } from 'stream'; // needed for types
export let gulpPipe = function() { export const gulpPipe = () => {
return through2.obj(function(file, enc, cb) { return through2.obj((file, enc, cb) => {
cache[file.path] = file; cache[file.path] = file;
return cb(null, file); return cb(null, file);
}); });
}; };
export interface fileObject { export interface IFileObject {
path: string; path: string;
contents: Buffer; contents: Buffer;
} }
export let injectFileArray = async (fileArray: fileObject[]) => { export const injectFileArray = async (fileArray: IFileObject[]) => {
for (let fileObject of fileArray) { for (const fileObject of fileArray) {
/* if (/[yourTestFilenameHere.js]/.test(request)) { /* if (/[yourTestFilenameHere.js]/.test(request)) {
// console.log('injected:' + fileObject.path) // console.log('injected:' + fileObject.path)
} */ } */
@ -24,8 +24,8 @@ export let injectFileArray = async (fileArray: fileObject[]) => {
return fileArray; return fileArray;
}; };
export let getFileString = (filePathArg: string) => { export const getFileString = (filePathArg: string) => {
if (cache[filePathArg]) { if (cache[filePathArg]) {
return cache[filePathArg].contents.toString(); return cache[filePathArg].contents.toString();
} }
}; };

View File

@ -1,18 +1,18 @@
let Module = require('module'); const Module = require('module');
import path = require('path'); import path = require('path');
import sourceMap = require('source-map-support'); import sourceMap = require('source-map-support');
import vm = require('vm'); import vm = require('vm');
export const cache = {}; export const cache = {};
export const extensionMap: {[key: string]: () => string} = {} export const extensionMap: { [key: string]: () => string } = {};
let originalLoader = Module._extensions['.js']; const originalLoader = Module._extensions['.js'];
/** /**
* ensure sourcemap support works with the cache * ensure sourcemap support works with the cache
*/ */
sourceMap.install({ sourceMap.install({
retrieveFile: function(path) { retrieveFile: (path) => {
if (cache[path]) { if (cache[path]) {
return cache[path].contents.toString(); return cache[path].contents.toString();
} else if (cache[path + '.js']) { } else if (cache[path + '.js']) {
@ -22,8 +22,8 @@ sourceMap.install({
}); });
Module._extensions['.js'] = function(module, filename) { Module._extensions['.js'] = function(module, filename) {
let file = cache[filename]; const file = cache[filename];
let file2 = cache[filename + '.js']; const file2 = cache[filename + '.js'];
if (file) { if (file) {
module._compile(file.contents.toString(), filename); module._compile(file.contents.toString(), filename);
} else if (file2) { } else if (file2) {
@ -33,11 +33,11 @@ Module._extensions['.js'] = function(module, filename) {
} }
}; };
for (let extension in extensionMap) { for (const extension in extensionMap) {
if(extensionMap[extension]) { if (extensionMap[extension]) {
Module._extensions[extension] = function(module, filename) { Module._extensions[extension] = function(module, filename) {
let file = cache[filename]; const file = cache[filename];
let file2 = cache[filename + '.ts']; const file2 = cache[filename + '.ts'];
if (file) { if (file) {
module._compile(file.contents.toString(), filename); module._compile(file.contents.toString(), filename);
} else if (file2) { } else if (file2) {
@ -49,12 +49,12 @@ for (let extension in extensionMap) {
} }
} }
let originalModuleResolve = Module._resolveFilename; const originalModuleResolve = Module._resolveFilename;
Module._resolveFilename = function(request, parent, isMain) { Module._resolveFilename = function(request, parent, isMain) {
let resolvedRequest: string; let resolvedRequest: string;
if (parent && /^\./.test(request)) { if (parent && /^\./.test(request)) {
let resolvedDir = path.parse(parent.filename).dir; const resolvedDir = path.parse(parent.filename).dir;
resolvedRequest = path.join('/', resolvedDir, request); resolvedRequest = path.join('/', resolvedDir, request);
} else { } else {
resolvedRequest = request; resolvedRequest = request;
@ -66,8 +66,8 @@ Module._resolveFilename = function(request, parent, isMain) {
console.log(parent) console.log(parent)
} */ } */
let file = cache[resolvedRequest]; const file = cache[resolvedRequest];
let file2 = cache[resolvedRequest + '.js']; const file2 = cache[resolvedRequest + '.js'];
if (file || file2) { if (file || file2) {
return resolvedRequest; return resolvedRequest;
} else { } else {

View File

@ -1,5 +1,5 @@
import {extensionMap} from './injection'; import { extensionMap } from './injection';
export const registerExtension = (extensionName: string, compilerFunction) => { export const registerExtension = (extensionName: string, compilerFunction) => {
extensionMap[extensionName] = compilerFunction; extensionMap[extensionName] = compilerFunction;
} };

View File

@ -1,3 +1,17 @@
{ {
"extends": "tslint-config-standard" "extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
} }