diff --git a/typescript/hello-world/README.md b/typescript/hello-world/README.md deleted file mode 100644 index 6513749..0000000 --- a/typescript/hello-world/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Hello World - -The classical introductory exercise. Just say "Hello, World!". - -["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is -the traditional first program for beginning programming in a new language -or environment. - -The objectives are simple: - -- Write a function that returns the string "Hello, World!". -- Run the test suite and make sure that it succeeds. -- Submit your solution and check it at the website. - -If everything goes well, you will be ready to fetch your first real exercise. - -## Setup - -Go through the setup instructions for TypeScript to -install the necessary dependencies: - -http://exercism.io/languages/typescript - -## Requirements - -Install assignment dependencies: - -```bash -$ yarn install -``` - -## Making the test suite pass - -Execute the tests with: - -```bash -$ yarn test -``` - - - -## Source - -This is an exercise to introduce users to using Exercism [http://en.wikipedia.org/wiki/%22Hello,_world!%22_program](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) - -## Submitting Incomplete Solutions -It's possible to submit an incomplete solution so you can see how others have completed the exercise. diff --git a/typescript/hello-world/hello-world.test.ts b/typescript/hello-world/hello-world.test.ts deleted file mode 100644 index 4195881..0000000 --- a/typescript/hello-world/hello-world.test.ts +++ /dev/null @@ -1,17 +0,0 @@ - -import HelloWorld from "./hello-world" - -describe('Hello World', () => { - - it('says hello world with no name', () => { - expect(HelloWorld.hello()).toEqual('Hello, World!') - }) - - xit('says hello to bob', () => { - expect(HelloWorld.hello('Bob')).toEqual('Hello, Bob!') - }) - - xit('says hello to sally', () => { - expect(HelloWorld.hello('Sally')).toEqual('Hello, Sally!') - }) -}) diff --git a/typescript/hello-world/node_modules/.bin/acorn b/typescript/hello-world/node_modules/.bin/acorn deleted file mode 120000 index cf76760..0000000 --- a/typescript/hello-world/node_modules/.bin/acorn +++ /dev/null @@ -1 +0,0 @@ -../acorn/bin/acorn \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/babylon b/typescript/hello-world/node_modules/.bin/babylon deleted file mode 120000 index c2adc01..0000000 --- a/typescript/hello-world/node_modules/.bin/babylon +++ /dev/null @@ -1 +0,0 @@ -../babylon/bin/babylon.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/errno b/typescript/hello-world/node_modules/.bin/errno deleted file mode 120000 index 5a98e53..0000000 --- a/typescript/hello-world/node_modules/.bin/errno +++ /dev/null @@ -1 +0,0 @@ -../errno/cli.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/escodegen b/typescript/hello-world/node_modules/.bin/escodegen deleted file mode 120000 index 01a7c32..0000000 --- a/typescript/hello-world/node_modules/.bin/escodegen +++ /dev/null @@ -1 +0,0 @@ -../escodegen/bin/escodegen.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/esgenerate b/typescript/hello-world/node_modules/.bin/esgenerate deleted file mode 120000 index 7d0293e..0000000 --- a/typescript/hello-world/node_modules/.bin/esgenerate +++ /dev/null @@ -1 +0,0 @@ -../escodegen/bin/esgenerate.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/esparse b/typescript/hello-world/node_modules/.bin/esparse deleted file mode 120000 index 4ec5d1b..0000000 --- a/typescript/hello-world/node_modules/.bin/esparse +++ /dev/null @@ -1 +0,0 @@ -../escodegen/node_modules/esprima/bin/esparse.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/esvalidate b/typescript/hello-world/node_modules/.bin/esvalidate deleted file mode 120000 index a4ef518..0000000 --- a/typescript/hello-world/node_modules/.bin/esvalidate +++ /dev/null @@ -1 +0,0 @@ -../escodegen/node_modules/esprima/bin/esvalidate.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/handlebars b/typescript/hello-world/node_modules/.bin/handlebars deleted file mode 120000 index fb7d090..0000000 --- a/typescript/hello-world/node_modules/.bin/handlebars +++ /dev/null @@ -1 +0,0 @@ -../handlebars/bin/handlebars \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/jest b/typescript/hello-world/node_modules/.bin/jest deleted file mode 120000 index 3d9fe5c..0000000 --- a/typescript/hello-world/node_modules/.bin/jest +++ /dev/null @@ -1 +0,0 @@ -../jest-cli/bin/jest.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/jest-runtime b/typescript/hello-world/node_modules/.bin/jest-runtime deleted file mode 120000 index ec00171..0000000 --- a/typescript/hello-world/node_modules/.bin/jest-runtime +++ /dev/null @@ -1 +0,0 @@ -../jest-runtime/bin/jest-runtime.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/js-yaml b/typescript/hello-world/node_modules/.bin/js-yaml deleted file mode 120000 index 9dbd010..0000000 --- a/typescript/hello-world/node_modules/.bin/js-yaml +++ /dev/null @@ -1 +0,0 @@ -../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/jsesc b/typescript/hello-world/node_modules/.bin/jsesc deleted file mode 120000 index 7237604..0000000 --- a/typescript/hello-world/node_modules/.bin/jsesc +++ /dev/null @@ -1 +0,0 @@ -../jsesc/bin/jsesc \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/json5 b/typescript/hello-world/node_modules/.bin/json5 deleted file mode 120000 index 217f379..0000000 --- a/typescript/hello-world/node_modules/.bin/json5 +++ /dev/null @@ -1 +0,0 @@ -../json5/lib/cli.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/loose-envify b/typescript/hello-world/node_modules/.bin/loose-envify deleted file mode 120000 index ed9009c..0000000 --- a/typescript/hello-world/node_modules/.bin/loose-envify +++ /dev/null @@ -1 +0,0 @@ -../loose-envify/cli.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/mkdirp b/typescript/hello-world/node_modules/.bin/mkdirp deleted file mode 120000 index 017896c..0000000 --- a/typescript/hello-world/node_modules/.bin/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/rimraf b/typescript/hello-world/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a4..0000000 --- a/typescript/hello-world/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/sane b/typescript/hello-world/node_modules/.bin/sane deleted file mode 120000 index ab4163b..0000000 --- a/typescript/hello-world/node_modules/.bin/sane +++ /dev/null @@ -1 +0,0 @@ -../sane/src/cli.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/semver b/typescript/hello-world/node_modules/.bin/semver deleted file mode 120000 index 317eb29..0000000 --- a/typescript/hello-world/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/sshpk-conv b/typescript/hello-world/node_modules/.bin/sshpk-conv deleted file mode 120000 index a2a295c..0000000 --- a/typescript/hello-world/node_modules/.bin/sshpk-conv +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-conv \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/sshpk-sign b/typescript/hello-world/node_modules/.bin/sshpk-sign deleted file mode 120000 index 766b9b3..0000000 --- a/typescript/hello-world/node_modules/.bin/sshpk-sign +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-sign \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/sshpk-verify b/typescript/hello-world/node_modules/.bin/sshpk-verify deleted file mode 120000 index bfd7e3a..0000000 --- a/typescript/hello-world/node_modules/.bin/sshpk-verify +++ /dev/null @@ -1 +0,0 @@ -../sshpk/bin/sshpk-verify \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/tsc b/typescript/hello-world/node_modules/.bin/tsc deleted file mode 120000 index 0863208..0000000 --- a/typescript/hello-world/node_modules/.bin/tsc +++ /dev/null @@ -1 +0,0 @@ -../typescript/bin/tsc \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/tslint b/typescript/hello-world/node_modules/.bin/tslint deleted file mode 120000 index 7d8df74..0000000 --- a/typescript/hello-world/node_modules/.bin/tslint +++ /dev/null @@ -1 +0,0 @@ -../tslint/bin/tslint \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/tsserver b/typescript/hello-world/node_modules/.bin/tsserver deleted file mode 120000 index f8f8f1a..0000000 --- a/typescript/hello-world/node_modules/.bin/tsserver +++ /dev/null @@ -1 +0,0 @@ -../typescript/bin/tsserver \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/uglifyjs b/typescript/hello-world/node_modules/.bin/uglifyjs deleted file mode 120000 index fef3468..0000000 --- a/typescript/hello-world/node_modules/.bin/uglifyjs +++ /dev/null @@ -1 +0,0 @@ -../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/uuid b/typescript/hello-world/node_modules/.bin/uuid deleted file mode 120000 index b3e45bc..0000000 --- a/typescript/hello-world/node_modules/.bin/uuid +++ /dev/null @@ -1 +0,0 @@ -../uuid/bin/uuid \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.bin/which b/typescript/hello-world/node_modules/.bin/which deleted file mode 120000 index f62471c..0000000 --- a/typescript/hello-world/node_modules/.bin/which +++ /dev/null @@ -1 +0,0 @@ -../which/bin/which \ No newline at end of file diff --git a/typescript/hello-world/node_modules/.yarn-integrity b/typescript/hello-world/node_modules/.yarn-integrity deleted file mode 100644 index 8914052..0000000 --- a/typescript/hello-world/node_modules/.yarn-integrity +++ /dev/null @@ -1,443 +0,0 @@ -{ - "flags": [], - "linkedModules": [], - "topLevelPatterns": [ - "@types/jest@^20.0.0", - "@types/node@^7.0.5", - "jest@^20.0.4", - "ts-jest@^20.0.6", - "tslint@^5.4.3", - "typescript@^2.2.1" - ], - "lockfileEntries": { - "@types/babel-core@^6.7.14": "https://registry.yarnpkg.com/@types/babel-core/-/babel-core-6.7.14.tgz#a08c900a98e8987c1a98d2ea4fa0a1805a7d131f", - "@types/babel-template@*": "https://registry.yarnpkg.com/@types/babel-template/-/babel-template-6.7.14.tgz#8088a56f9d697d620d3d079c3ef66025b7a08d02", - "@types/babel-traverse@*": "https://registry.yarnpkg.com/@types/babel-traverse/-/babel-traverse-6.7.17.tgz#5212a4edced81f53a6c4fb1fd7a34aa4ff6cf36b", - "@types/babel-types@*": "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-6.7.16.tgz#e2602896636858a0067971f7ca4bb8678038293f", - "@types/babylon@*": "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.1.tgz#e4d10ab9e43a73703a17c6f41438bede28769340", - "@types/jest@^20.0.0": "https://registry.yarnpkg.com/@types/jest/-/jest-20.0.0.tgz#f7119f92891e150b33d67505cdd6d95585156133", - "@types/node@^7.0.5": "https://registry.yarnpkg.com/@types/node/-/node-7.0.31.tgz#80ea4d175599b2a00149c29a10a4eb2dff592e86", - "abab@^1.0.3": "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d", - "acorn-globals@^3.1.0": "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf", - "acorn@^4.0.4": "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787", - "ajv@^4.9.1": "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536", - "align-text@^0.1.1": "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117", - "align-text@^0.1.3": "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117", - "amdefine@>=0.0.4": "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5", - "ansi-escapes@^1.4.0": "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e", - "ansi-regex@^2.0.0": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df", - "ansi-regex@^2.1.1": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df", - "ansi-styles@^2.2.1": "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe", - "ansi-styles@^3.0.0": "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.1.0.tgz#09c202d5c917ec23188caa5c9cb9179cd9547750", - "anymatch@^1.3.0": "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507", - "append-transform@^0.4.0": "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991", - "argparse@^1.0.7": "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86", - "arr-diff@^2.0.0": "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf", - "arr-flatten@^1.0.1": "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1", - "array-equal@^1.0.0": "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93", - "array-unique@^0.2.1": "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53", - "arrify@^1.0.0": "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d", - "arrify@^1.0.1": "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d", - "asn1@~0.2.3": "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86", - "assert-plus@1.0.0": "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", - "assert-plus@^0.2.0": "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234", - "assert-plus@^1.0.0": "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", - "async@^1.4.0": "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a", - "async@^2.1.4": "https://registry.yarnpkg.com/async/-/async-2.4.1.tgz#62a56b279c98a11d0987096a01cc3eeb8eb7bbd7", - "asynckit@^0.4.0": "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79", - "aws-sign2@~0.6.0": "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f", - "aws4@^1.2.1": "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e", - "babel-code-frame@^6.22.0": "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4", - "babel-core@^6.0.0": "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729", - "babel-core@^6.24.1": "https://registry.yarnpkg.com/babel-core/-/babel-core-6.25.0.tgz#7dd42b0463c742e9d5296deb3ec67a9322dad729", - "babel-generator@^6.18.0": "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc", - "babel-generator@^6.25.0": "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.25.0.tgz#33a1af70d5f2890aeb465a4a7793c1df6a9ea9fc", - "babel-helpers@^6.24.1": "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2", - "babel-jest@^20.0.3": "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671", - "babel-messages@^6.23.0": "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e", - "babel-plugin-istanbul@^4.0.0": "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587", - "babel-plugin-istanbul@^4.1.4": "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587", - "babel-plugin-jest-hoist@^20.0.3": "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767", - "babel-plugin-transform-es2015-modules-commonjs@^6.24.1": "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe", - "babel-plugin-transform-strict-mode@^6.24.1": "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758", - "babel-preset-jest@^20.0.3": "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a", - "babel-register@^6.24.1": "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f", - "babel-runtime@^6.22.0": "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b", - "babel-template@^6.16.0": "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071", - "babel-template@^6.24.1": "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071", - "babel-template@^6.25.0": "https://registry.yarnpkg.com/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071", - "babel-traverse@^6.18.0": "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1", - "babel-traverse@^6.25.0": "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.25.0.tgz#2257497e2fcd19b89edc13c4c91381f9512496f1", - "babel-types@^6.18.0": "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e", - "babel-types@^6.24.1": "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e", - "babel-types@^6.25.0": "https://registry.yarnpkg.com/babel-types/-/babel-types-6.25.0.tgz#70afb248d5660e5d18f811d91c8303b54134a18e", - "babylon@^6.13.0": "https://registry.yarnpkg.com/babylon/-/babylon-6.17.3.tgz#1327d709950b558f204e5352587fd0290f8d8e48", - "babylon@^6.17.2": "https://registry.yarnpkg.com/babylon/-/babylon-6.17.3.tgz#1327d709950b558f204e5352587fd0290f8d8e48", - "balanced-match@^1.0.0": "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767", - "bcrypt-pbkdf@^1.0.0": "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d", - "boom@2.x.x": "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f", - "brace-expansion@^1.1.7": "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292", - "braces@^1.8.2": "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7", - "browser-resolve@^1.11.2": "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce", - "bser@1.0.2": "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169", - "bser@^2.0.0": "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719", - "builtin-modules@^1.0.0": "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f", - "callsites@^2.0.0": "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50", - "camelcase@^1.0.2": "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39", - "camelcase@^3.0.0": "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a", - "camelcase@^4.1.0": "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd", - "caseless@~0.12.0": "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc", - "center-align@^0.1.1": "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad", - "chalk@^1.1.0": "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98", - "chalk@^1.1.3": "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98", - "ci-info@^1.0.0": "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534", - "cliui@^2.1.0": "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1", - "cliui@^3.2.0": "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d", - "co@^4.6.0": "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184", - "code-point-at@^1.0.0": "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77", - "color-convert@^1.0.0": "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a", - "color-name@^1.1.1": "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d", - "colors@^1.1.2": "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63", - "combined-stream@^1.0.5": "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009", - "combined-stream@~1.0.5": "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009", - "commander@^2.9.0": "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4", - "concat-map@0.0.1": "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "content-type-parser@^1.0.1": "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94", - "convert-source-map@^1.1.0": "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5", - "convert-source-map@^1.4.0": "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5", - "core-js@^2.4.0": "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e", - "cross-spawn@^4.0.0": "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41", - "cryptiles@2.x.x": "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8", - "cssom@0.3.x": "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b", - "cssom@>= 0.3.2 < 0.4.0": "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b", - "cssstyle@>= 0.2.37 < 0.3.0": "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54", - "dashdash@^1.12.0": "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0", - "debug@^2.1.1": "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc", - "debug@^2.2.0": "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc", - "debug@^2.6.3": "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc", - "decamelize@^1.0.0": "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290", - "decamelize@^1.1.1": "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290", - "deep-is@~0.1.3": "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34", - "default-require-extensions@^1.0.0": "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8", - "delayed-stream@~1.0.0": "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619", - "detect-indent@^4.0.0": "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208", - "diff@^3.2.0": "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9", - "ecc-jsbn@~0.1.1": "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505", - "errno@>=0.1.1 <0.2.0-0": "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d", - "error-ex@^1.2.0": "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc", - "escape-string-regexp@^1.0.2": "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4", - "escodegen@^1.6.1": "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018", - "esprima@^2.7.1": "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581", - "esprima@^3.1.1": "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633", - "estraverse@^1.9.1": "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44", - "esutils@^2.0.2": "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b", - "exec-sh@^0.2.0": "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10", - "execa@^0.5.0": "https://registry.yarnpkg.com/execa/-/execa-0.5.1.tgz#de3fb85cb8d6e91c85bcbceb164581785cb57b36", - "expand-brackets@^0.1.4": "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b", - "expand-range@^1.8.1": "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337", - "extend@~3.0.0": "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444", - "extglob@^0.3.1": "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1", - "extsprintf@1.0.2": "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550", - "fast-levenshtein@~2.0.4": "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917", - "fb-watchman@^1.8.0": "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383", - "fb-watchman@^2.0.0": "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58", - "filename-regex@^2.0.0": "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26", - "fileset@^2.0.2": "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0", - "fill-range@^2.1.0": "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723", - "find-up@^1.0.0": "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f", - "find-up@^2.0.0": "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7", - "find-up@^2.1.0": "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7", - "for-in@^1.0.1": "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80", - "for-own@^0.1.4": "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce", - "forever-agent@~0.6.1": "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91", - "form-data@~2.1.1": "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1", - "fs-extra@^3.0.0": "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291", - "fs.realpath@^1.0.0": "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f", - "get-caller-file@^1.0.1": "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5", - "get-stream@^2.2.0": "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de", - "getpass@^0.1.1": "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa", - "glob-base@^0.3.0": "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4", - "glob-parent@^2.0.0": "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28", - "glob@^7.0.3": "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15", - "glob@^7.0.5": "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15", - "glob@^7.1.1": "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15", - "globals@^9.0.0": "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a", - "graceful-fs@^4.1.11": "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658", - "graceful-fs@^4.1.2": "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658", - "graceful-fs@^4.1.6": "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658", - "graceful-readlink@>= 1.0.0": "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725", - "growly@^1.3.0": "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081", - "handlebars@^4.0.3": "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f", - "har-schema@^1.0.5": "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e", - "har-validator@~4.2.1": "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a", - "has-ansi@^2.0.0": "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91", - "has-flag@^1.0.0": "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa", - "hawk@~3.1.3": "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4", - "hoek@2.x.x": "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed", - "home-or-tmp@^2.0.0": "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8", - "hosted-git-info@^2.1.4": "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67", - "html-encoding-sniffer@^1.0.1": "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da", - "http-signature@~1.1.0": "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf", - "iconv-lite@0.4.13": "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2", - "inflight@^1.0.4": "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9", - "inherits@2": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de", - "invariant@^2.2.0": "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360", - "invert-kv@^1.0.0": "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6", - "is-arrayish@^0.2.1": "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d", - "is-buffer@^1.1.5": "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc", - "is-builtin-module@^1.0.0": "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe", - "is-ci@^1.0.10": "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e", - "is-dotfile@^1.0.0": "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1", - "is-equal-shallow@^0.1.3": "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534", - "is-extendable@^0.1.1": "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89", - "is-extglob@^1.0.0": "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0", - "is-finite@^1.0.0": "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa", - "is-fullwidth-code-point@^1.0.0": "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb", - "is-fullwidth-code-point@^2.0.0": "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f", - "is-glob@^2.0.0": "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863", - "is-glob@^2.0.1": "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863", - "is-number@^2.1.0": "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f", - "is-number@^3.0.0": "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195", - "is-posix-bracket@^0.1.0": "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4", - "is-primitive@^2.0.0": "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575", - "is-stream@^1.1.0": "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44", - "is-typedarray@~1.0.0": "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a", - "is-utf8@^0.2.0": "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72", - "isarray@1.0.0": "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11", - "isexe@^2.0.0": "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10", - "isobject@^2.0.0": "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89", - "isstream@~0.1.2": "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a", - "istanbul-api@^1.1.1": "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.9.tgz#2827920d380d4286d857d57a2968a841db8a7ec8", - "istanbul-lib-coverage@^1.0.1": "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da", - "istanbul-lib-coverage@^1.1.1": "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da", - "istanbul-lib-hook@^1.0.7": "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc", - "istanbul-lib-instrument@^1.4.2": "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.2.tgz#6014b03d3470fb77638d5802508c255c06312e56", - "istanbul-lib-instrument@^1.7.2": "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.2.tgz#6014b03d3470fb77638d5802508c255c06312e56", - "istanbul-lib-report@^1.1.1": "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9", - "istanbul-lib-source-maps@^1.1.0": "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c", - "istanbul-lib-source-maps@^1.2.1": "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c", - "istanbul-reports@^1.1.1": "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e", - "jest-changed-files@^20.0.3": "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8", - "jest-cli@^20.0.4": "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93", - "jest-config@^20.0.0": "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea", - "jest-config@^20.0.4": "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea", - "jest-diff@^20.0.3": "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617", - "jest-docblock@^20.0.3": "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712", - "jest-environment-jsdom@^20.0.3": "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99", - "jest-environment-node@^20.0.3": "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403", - "jest-haste-map@^20.0.4": "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.4.tgz#653eb55c889ce3c021f7b94693f20a4159badf03", - "jest-jasmine2@^20.0.4": "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1", - "jest-matcher-utils@^20.0.3": "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612", - "jest-matchers@^20.0.3": "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60", - "jest-message-util@^20.0.3": "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c", - "jest-mock@^20.0.3": "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59", - "jest-regex-util@^20.0.3": "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762", - "jest-resolve-dependencies@^20.0.3": "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a", - "jest-resolve@^20.0.4": "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5", - "jest-runtime@^20.0.4": "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8", - "jest-snapshot@^20.0.3": "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566", - "jest-util@^20.0.0": "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad", - "jest-util@^20.0.3": "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad", - "jest-validate@^20.0.3": "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab", - "jest@^20.0.4": "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac", - "js-tokens@^3.0.0": "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7", - "js-yaml@^3.7.0": "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6", - "jsbn@~0.1.0": "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513", - "jsdom@^9.12.0": "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4", - "jsesc@^1.3.0": "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b", - "json-schema@0.2.3": "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13", - "json-stable-stringify@^1.0.1": "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af", - "json-stringify-safe@~5.0.1": "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", - "json5@^0.5.0": "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821", - "jsonfile@^3.0.0": "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.0.tgz#92e7c7444e5ffd5fa32e6a9ae8b85034df8347d0", - "jsonify@~0.0.0": "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73", - "jsprim@^1.2.2": "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918", - "kind-of@^3.0.2": "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64", - "kind-of@^4.0.0": "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57", - "lazy-cache@^1.0.3": "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e", - "lcid@^1.0.0": "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835", - "leven@^2.1.0": "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580", - "levn@~0.3.0": "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee", - "load-json-file@^1.0.0": "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0", - "load-json-file@^2.0.0": "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8", - "locate-path@^2.0.0": "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e", - "lodash@^4.14.0": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae", - "lodash@^4.2.0": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae", - "longest@^1.0.1": "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097", - "loose-envify@^1.0.0": "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848", - "lru-cache@^4.0.1": "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55", - "makeerror@1.0.x": "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c", - "mem@^1.1.0": "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76", - "merge@^1.1.3": "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da", - "micromatch@^2.1.5": "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565", - "micromatch@^2.3.11": "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565", - "mime-db@~1.27.0": "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1", - "mime-types@^2.1.12": "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed", - "mime-types@~2.1.7": "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed", - "mimic-fn@^1.0.0": "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18", - "minimatch@^3.0.2": "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083", - "minimatch@^3.0.3": "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083", - "minimatch@^3.0.4": "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083", - "minimist@0.0.8": "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d", - "minimist@^1.1.1": "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284", - "minimist@~0.0.1": "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d", - "mkdirp@^0.5.1": "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903", - "ms@2.0.0": "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8", - "natural-compare@^1.4.0": "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7", - "node-int64@^0.4.0": "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b", - "node-notifier@^5.0.2": "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff", - "normalize-package-data@^2.3.2": "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb", - "normalize-path@^2.0.1": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9", - "npm-run-path@^2.0.0": "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f", - "number-is-nan@^1.0.0": "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d", - "nwmatcher@>= 1.3.9 < 2.0.0": "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.0.tgz#b4389362170e7ef9798c3c7716d80ebc0106fccf", - "oauth-sign@~0.8.1": "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", - "object-assign@^4.0.1": "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863", - "object-assign@^4.1.0": "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863", - "object.omit@^2.0.0": "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa", - "once@^1.3.0": "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "once@^1.4.0": "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "optimist@^0.6.1": "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686", - "optionator@^0.8.1": "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64", - "os-homedir@^1.0.0": "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3", - "os-locale@^1.4.0": "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9", - "os-locale@^2.0.0": "https://registry.yarnpkg.com/os-locale/-/os-locale-2.0.0.tgz#15918ded510522b81ee7ae5a309d54f639fc39a4", - "os-tmpdir@^1.0.1": "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274", - "p-finally@^1.0.0": "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae", - "p-limit@^1.1.0": "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc", - "p-locate@^2.0.0": "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43", - "p-map@^1.1.1": "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a", - "parse-glob@^3.0.4": "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c", - "parse-json@^2.2.0": "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9", - "parse5@^1.5.1": "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94", - "path-exists@^2.0.0": "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b", - "path-exists@^3.0.0": "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515", - "path-is-absolute@^1.0.0": "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", - "path-key@^2.0.0": "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40", - "path-parse@^1.0.5": "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1", - "path-type@^1.0.0": "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441", - "path-type@^2.0.0": "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73", - "performance-now@^0.2.0": "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5", - "pify@^2.0.0": "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c", - "pify@^2.3.0": "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c", - "pinkie-promise@^2.0.0": "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa", - "pinkie@^2.0.0": "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870", - "pkg-dir@^2.0.0": "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b", - "prelude-ls@~1.1.2": "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54", - "preserve@^0.2.0": "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b", - "pretty-format@^20.0.3": "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14", - "private@^0.1.6": "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1", - "prr@~0.0.0": "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a", - "pseudomap@^1.0.2": "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3", - "punycode@^1.4.1": "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e", - "qs@~6.4.0": "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233", - "randomatic@^1.1.3": "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c", - "read-pkg-up@^1.0.1": "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02", - "read-pkg-up@^2.0.0": "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be", - "read-pkg@^1.0.0": "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28", - "read-pkg@^2.0.0": "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8", - "regenerator-runtime@^0.10.0": "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658", - "regex-cache@^0.4.2": "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145", - "remove-trailing-separator@^1.0.1": "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511", - "repeat-element@^1.1.2": "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a", - "repeat-string@^1.5.2": "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637", - "repeating@^2.0.0": "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda", - "request@^2.79.0": "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0", - "require-directory@^2.1.1": "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42", - "require-main-filename@^1.0.1": "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1", - "resolve@1.1.7": "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b", - "resolve@^1.3.2": "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5", - "right-align@^0.1.1": "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef", - "rimraf@^2.6.1": "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d", - "safe-buffer@^5.0.1": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.0.tgz#fe4c8460397f9eaaaa58e73be46273408a45e223", - "sane@~1.6.0": "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775", - "sax@^1.2.1": "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828", - "semver@2 || 3 || 4 || 5": "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f", - "semver@^5.3.0": "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f", - "set-blocking@^2.0.0": "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7", - "shellwords@^0.1.0": "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14", - "signal-exit@^3.0.0": "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d", - "slash@^1.0.0": "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55", - "sntp@1.x.x": "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198", - "source-map-support@^0.4.2": "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1", - "source-map-support@^0.4.4": "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1", - "source-map@^0.4.4": "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b", - "source-map@^0.5.0": "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412", - "source-map@^0.5.3": "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412", - "source-map@^0.5.6": "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412", - "source-map@~0.2.0": "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d", - "source-map@~0.5.1": "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412", - "spdx-correct@~1.0.0": "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40", - "spdx-expression-parse@~1.0.0": "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c", - "spdx-license-ids@^1.0.2": "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57", - "sprintf-js@~1.0.2": "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c", - "sshpk@^1.7.0": "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3", - "string-length@^1.0.1": "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac", - "string-width@^1.0.1": "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3", - "string-width@^1.0.2": "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3", - "string-width@^2.0.0": "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e", - "stringstream@~0.0.4": "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878", - "strip-ansi@^3.0.0": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", - "strip-ansi@^3.0.1": "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf", - "strip-bom@3.0.0": "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3", - "strip-bom@^2.0.0": "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e", - "strip-bom@^3.0.0": "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3", - "strip-eof@^1.0.0": "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf", - "strip-json-comments@^2.0.0": "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a", - "supports-color@^2.0.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7", - "supports-color@^3.1.2": "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6", - "symbol-tree@^3.2.1": "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6", - "test-exclude@^4.1.1": "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26", - "throat@^3.0.0": "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836", - "tmpl@1.0.x": "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1", - "to-fast-properties@^1.0.1": "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47", - "tough-cookie@^2.3.2": "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a", - "tough-cookie@~2.3.0": "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a", - "tr46@~0.0.3": "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a", - "trim-right@^1.0.1": "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003", - "ts-jest@^20.0.6": "https://registry.yarnpkg.com/ts-jest/-/ts-jest-20.0.6.tgz#39c2810c05d6f6908dac15929dae206b494b73f4", - "tsconfig@^6.0.0": "https://registry.yarnpkg.com/tsconfig/-/tsconfig-6.0.0.tgz#6b0e8376003d7af1864f8df8f89dd0059ffcd032", - "tslib@^1.7.1": "https://registry.yarnpkg.com/tslib/-/tslib-1.7.1.tgz#bc8004164691923a79fe8378bbeb3da2017538ec", - "tslint@^5.4.3": "https://registry.yarnpkg.com/tslint/-/tslint-5.4.3.tgz#761c8402b80e347b7733a04390a757b253580467", - "tsutils@^2.3.0": "https://registry.yarnpkg.com/tsutils/-/tsutils-2.4.0.tgz#ad4ce6dba0e5a3edbddf8626b7ca040782189fea", - "tunnel-agent@^0.6.0": "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd", - "tweetnacl@^0.14.3": "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64", - "tweetnacl@~0.14.0": "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64", - "type-check@~0.3.2": "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72", - "typescript@^2.2.1": "https://registry.yarnpkg.com/typescript/-/typescript-2.4.0.tgz#aef5a8d404beba36ad339abf079ddddfffba86dd", - "uglify-js@^2.6": "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd", - "uglify-to-browserify@~1.0.0": "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7", - "universalify@^0.1.0": "https://registry.yarnpkg.com/universalify/-/universalify-0.1.0.tgz#9eb1c4651debcc670cc94f1a75762332bb967778", - "uuid@^3.0.0": "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04", - "validate-npm-package-license@^3.0.1": "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc", - "verror@1.3.6": "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c", - "walker@~1.0.5": "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb", - "watch@~0.10.0": "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc", - "webidl-conversions@^3.0.0": "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871", - "webidl-conversions@^4.0.0": "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0", - "whatwg-encoding@^1.0.1": "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4", - "whatwg-url@^4.3.0": "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0", - "which-module@^1.0.0": "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f", - "which-module@^2.0.0": "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a", - "which@^1.2.12": "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5", - "which@^1.2.9": "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5", - "window-size@0.1.0": "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d", - "wordwrap@0.0.2": "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f", - "wordwrap@~0.0.2": "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107", - "wordwrap@~1.0.0": "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb", - "worker-farm@^1.3.1": "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff", - "wrap-ansi@^2.0.0": "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85", - "wrappy@1": "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "xml-name-validator@^2.0.1": "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635", - "xtend@>=4.0.0 <4.1.0-0": "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af", - "y18n@^3.2.1": "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41", - "yallist@^2.1.2": "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52", - "yargs-parser@^5.0.0": "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a", - "yargs-parser@^7.0.0": "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9", - "yargs@^7.0.2": "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8", - "yargs@^8.0.1": "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360", - "yargs@~3.10.0": "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - }, - "files": [], - "artifacts": {} -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/@types/babel-core/README.md b/typescript/hello-world/node_modules/@types/babel-core/README.md deleted file mode 100644 index 5da677b..0000000 --- a/typescript/hello-world/node_modules/@types/babel-core/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Installation -> `npm install --save @types/babel-core` - -# Summary -This package contains type definitions for babel-core v6.7 (https://github.com/babel/babel/tree/master/packages/babel-core). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/babel-core - -Additional Details - * Last updated: Mon, 19 Sep 2016 16:15:22 GMT - * File structure: UMD - * Library Dependencies: babel-template, babel-traverse, babel-types - * Module Dependencies: babel-template, babel-traverse, babel-types - * Global values: babel - -# Credits -These definitions were written by Troy Gerwien . diff --git a/typescript/hello-world/node_modules/@types/babel-core/index.d.ts b/typescript/hello-world/node_modules/@types/babel-core/index.d.ts deleted file mode 100644 index 9a42339..0000000 --- a/typescript/hello-world/node_modules/@types/babel-core/index.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -// Type definitions for babel-core v6.7 -// Project: https://github.com/babel/babel/tree/master/packages/babel-core -// Definitions by: Troy Gerwien -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// -/// - -import * as t from 'babel-types'; -export {t as types}; -type Node = t.Node; -export import template = require('babel-template'); -export var version: string; -import traverse, {Visitor} from "babel-traverse"; -export {traverse, Visitor}; - - -/** Transforms the passed in `code`. Returning an object with the generated code, source map, and AST. */ -export function transform(code: string, opts?: TransformOptions): BabelFileResult; - -/** Asynchronously transforms the entire contents of a file. */ -export function transformFile(filename: string, opts: TransformOptions, callback: (err: any, result: BabelFileResult) => void): void; - -/** Synchronous version of `babel.transformFile`. Returns the transformed contents of the `filename`. */ -export function transformFileSync(filename: string, opts?: TransformOptions): BabelFileResult; - -export function transformFromAst(ast: Node, code?: string, opts?: TransformOptions): BabelFileResult; - -export interface TransformOptions { - - /** Filename to use when reading from stdin - this will be used in source-maps, errors etc. Default: "unknown". */ - filename?: string; - - /** Filename relative to `sourceRoot`. */ - filenameRelative?: string; - - /** A source map object that the output source map will be based on. */ - inputSourceMap?: Object; - - /** - * This is an object of keys that represent different environments. For example, you may have: - * `{ env: { production: { / * specific options * / } } }` - * which will use those options when the enviroment variable `BABEL_ENV` is set to `"production"`. - * If `BABEL_ENV` isn't set then `NODE_ENV` will be used, if it's not set then it defaults to `"development"`. - */ - env?: Object; - - /** Retain line numbers - will result in really ugly code. Default: `false` */ - retainLines?: boolean; - - /** Enable/disable ANSI syntax highlighting of code frames. Default: `true`. */ - highlightCode?: boolean; - - /** List of presets (a set of plugins) to load and use. */ - presets?: any[]; - - /** List of plugins to load and use. */ - plugins?: any[]; - - /** list of glob paths to **not** compile. Opposite to the `only` option. */ - ignore?: string[]; - - /** - * A glob, regex, or mixed array of both, matching paths to only compile. Can also be an array of arrays containing - * paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim. - */ - only?: string | RegExp | Array; - - /** Enable code generation. Default: `true`. */ - code?: boolean; - - /** Include the AST in the returned object. Default: `true`. */ - ast?: boolean; - - /** A path to an .babelrc file to extend. */ - extends?: string; - - /** write comments to generated output. Default: `true`. */ - comments?: boolean; - - /** - * An optional callback that controls whether a comment should be output or not. Called as - * `shouldPrintComment(commentContents)`. **NOTE**: This overrides the `comments` option when used. - */ - shouldPrintComment?: (comment: string) => boolean; - - /** - * Do not include superfluous whitespace characters and line terminators. When set to `"auto"`, `compact` is set to - * `true` on input sizes of >100KB. - */ - compact?: boolean | "auto"; - - /** - * If truthy, adds a `map` property to returned output. If set to `"inline"`, a comment with a `sourceMappingURL` - * directive is added to the bottom of the returned code. If set to `"both"` then a map property is returned as well - * as a source map comment appended. - */ - sourceMaps?: boolean | "inline" | "both"; - - /** Set `file` on returned source map. */ - sourceMapTarget?: string; - - /** Set `sources[0]` on returned source map. */ - sourceFileName?: string; - - /** The root from which all sources are relative. */ - sourceRoot?: string; - - /** Specify whether or not to use `.babelrc` and `.babelignore` files. Default: `true`. */ - babelrc?: boolean; - - /** Attach a comment before all non-user injected code. */ - auxiliaryCommentBefore?: string; - - /** Attach a comment after all non-user injected code. */ - auxiliaryCommentAfter?: string; - - /** - * Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. - * If falsy value is returned then the generated module id is used. - */ - getModuleId?: (moduleName: string) => string; - - /** Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions. */ - moduleRoot?: string; - - /** - * If truthy, insert an explicit id for modules. By default, all modules are anonymous. - * (Not available for `common` modules). - */ - moduleIds?: boolean; - - /** Specify a custom name for module ids. */ - moduleId?: string; -} - -export interface BabelFileResult { - ast?: Node; - code?: string; - map?: Object; -} -export as namespace babel; - diff --git a/typescript/hello-world/node_modules/@types/babel-core/package.json b/typescript/hello-world/node_modules/@types/babel-core/package.json deleted file mode 100644 index 9ec551d..0000000 --- a/typescript/hello-world/node_modules/@types/babel-core/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@types/babel-core", - "version": "6.7.14", - "description": "TypeScript definitions for babel-core v6.7", - "license": "MIT", - "author": "Troy Gerwien ", - "main": "", - "repository": { - "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "dependencies": { - "@types/babel-template": "*", - "@types/babel-traverse": "*", - "@types/babel-types": "*" - }, - "typings": "index.d.ts", - "typesPublisherContentHash": "2d550befa083c32707f54767d78e1c72f420940facd52537e518d413e6de4b85" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/@types/babel-core/types-metadata.json b/typescript/hello-world/node_modules/@types/babel-core/types-metadata.json deleted file mode 100644 index 2ddda3b..0000000 --- a/typescript/hello-world/node_modules/@types/babel-core/types-metadata.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "authors": "Troy Gerwien ", - "definitionFilename": "index.d.ts", - "libraryDependencies": [ - "babel-template", - "babel-traverse", - "babel-types" - ], - "moduleDependencies": [ - "babel-template", - "babel-traverse", - "babel-types" - ], - "libraryMajorVersion": "6", - "libraryMinorVersion": "7", - "libraryName": "babel-core v6.7", - "typingsPackageName": "babel-core", - "projectName": "https://github.com/babel/babel/tree/master/packages/babel-core", - "sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", - "sourceBranch": "types-2.0", - "kind": "UMD", - "globals": [ - "babel" - ], - "declaredModules": [], - "files": [ - "index.d.ts" - ], - "hasPackageJson": false, - "contentHash": "2d550befa083c32707f54767d78e1c72f420940facd52537e518d413e6de4b85" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/@types/babel-template/README.md b/typescript/hello-world/node_modules/@types/babel-template/README.md deleted file mode 100644 index 88d2477..0000000 --- a/typescript/hello-world/node_modules/@types/babel-template/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Installation -> `npm install --save @types/babel-template` - -# Summary -This package contains type definitions for babel-template v6.7 (https://github.com/babel/babel/tree/master/packages/babel-template). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/babel-template - -Additional Details - * Last updated: Mon, 19 Sep 2016 16:15:22 GMT - * File structure: ProperModule - * Library Dependencies: babel-types, babylon - * Module Dependencies: babel-types, babylon - * Global values: template - -# Credits -These definitions were written by Troy Gerwien . diff --git a/typescript/hello-world/node_modules/@types/babel-template/index.d.ts b/typescript/hello-world/node_modules/@types/babel-template/index.d.ts deleted file mode 100644 index 2a63f38..0000000 --- a/typescript/hello-world/node_modules/@types/babel-template/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Type definitions for babel-template v6.7 -// Project: https://github.com/babel/babel/tree/master/packages/babel-template -// Definitions by: Troy Gerwien -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// - - -import {BabylonOptions} from 'babylon'; -import * as t from 'babel-types'; -type Node = t.Node; - -// NB: This export doesn't match the handbook example, where `template` is the default export. -// But it does match the runtime behaviour (at least at the time of this writing). For some reason, -// babel-template/lib/index.js has this line at the bottom: module.exports = exports["default"]; -export = template; -declare function template(code: string, opts?: BabylonOptions): UseTemplate; - -type UseTemplate = (nodes?: {[placeholder: string]: Node}) => Node; - diff --git a/typescript/hello-world/node_modules/@types/babel-template/package.json b/typescript/hello-world/node_modules/@types/babel-template/package.json deleted file mode 100644 index 0a625e5..0000000 --- a/typescript/hello-world/node_modules/@types/babel-template/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@types/babel-template", - "version": "6.7.14", - "description": "TypeScript definitions for babel-template v6.7", - "license": "MIT", - "author": "Troy Gerwien ", - "main": "", - "repository": { - "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "dependencies": { - "@types/babel-types": "*", - "@types/babylon": "*" - }, - "typings": "index.d.ts", - "typesPublisherContentHash": "b2edf0adc14292f2295019657f7528acb6cbf0623848309478dbda97d6a615d1" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/@types/babel-template/types-metadata.json b/typescript/hello-world/node_modules/@types/babel-template/types-metadata.json deleted file mode 100644 index 531b6b5..0000000 --- a/typescript/hello-world/node_modules/@types/babel-template/types-metadata.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "authors": "Troy Gerwien ", - "definitionFilename": "index.d.ts", - "libraryDependencies": [ - "babel-types", - "babylon" - ], - "moduleDependencies": [ - "babel-types", - "babylon" - ], - "libraryMajorVersion": "6", - "libraryMinorVersion": "7", - "libraryName": "babel-template v6.7", - "typingsPackageName": "babel-template", - "projectName": "https://github.com/babel/babel/tree/master/packages/babel-template", - "sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped", - "sourceBranch": "types-2.0", - "kind": "ProperModule", - "globals": [ - "template" - ], - "declaredModules": [ - "babel-template" - ], - "files": [ - "index.d.ts" - ], - "hasPackageJson": false, - "contentHash": "b2edf0adc14292f2295019657f7528acb6cbf0623848309478dbda97d6a615d1" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/@types/babel-traverse/LICENSE b/typescript/hello-world/node_modules/@types/babel-traverse/LICENSE deleted file mode 100644 index 4b1ad51..0000000 --- a/typescript/hello-world/node_modules/@types/babel-traverse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/typescript/hello-world/node_modules/@types/babel-traverse/README.md b/typescript/hello-world/node_modules/@types/babel-traverse/README.md deleted file mode 100644 index 2ab0a90..0000000 --- a/typescript/hello-world/node_modules/@types/babel-traverse/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/babel-traverse` - -# Summary -This package contains type definitions for babel-traverse (https://github.com/babel/babel/tree/master/packages/babel-traverse). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel-traverse - -Additional Details - * Last updated: Thu, 01 Jun 2017 03:25:51 GMT - * Dependencies: babel-types - * Global values: none - -# Credits -These definitions were written by Troy Gerwien . diff --git a/typescript/hello-world/node_modules/@types/babel-traverse/index.d.ts b/typescript/hello-world/node_modules/@types/babel-traverse/index.d.ts deleted file mode 100644 index ef2e6f0..0000000 --- a/typescript/hello-world/node_modules/@types/babel-traverse/index.d.ts +++ /dev/null @@ -1,966 +0,0 @@ -// Type definitions for babel-traverse v6.7 -// Project: https://github.com/babel/babel/tree/master/packages/babel-traverse -// Definitions by: Troy Gerwien -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - - -import * as t from 'babel-types'; -type Node = t.Node; - -export default function traverse(parent: Node | Node[], opts?: TraverseOptions, scope?: Scope, state?: any, parentPath?: NodePath): void; - -export interface TraverseOptions extends Visitor { - scope?: Scope; - noScope?: boolean; -} - -export class Scope { - constructor(path: NodePath, parentScope?: Scope); - path: NodePath; - block: Node; - parentBlock: Node; - parent: Scope; - hub: Hub; - bindings: { [name: string]: Binding; }; - - /** Traverse node with current scope and path. */ - traverse(node: Node | Node[], opts?: TraverseOptions, state?: any): void; - - /** Generate a unique identifier and add it to the current scope. */ - generateDeclaredUidIdentifier(name?: string): t.Identifier; - - /** Generate a unique identifier. */ - generateUidIdentifier(name?: string): t.Identifier; - - /** Generate a unique `_id1` binding. */ - generateUid(name?: string): string; - - /** Generate a unique identifier based on a node. */ - generateUidIdentifierBasedOnNode(parent: Node, defaultName?: string): t.Identifier; - - /** - * Determine whether evaluating the specific input `node` is a consequenceless reference. ie. - * evaluating it wont result in potentially arbitrary code from being ran. The following are - * whitelisted and determined not to cause side effects: - * - * - `this` expressions - * - `super` expressions - * - Bound identifiers - */ - isStatic(node: Node): boolean; - - /** Possibly generate a memoised identifier if it is not static and has consequences. */ - maybeGenerateMemoised(node: Node, dontPush?: boolean): t.Identifier; - - checkBlockScopedCollisions(local: Node, kind: string, name: string, id: Object): void; - - rename(oldName: string, newName?: string, block?: Node): void; - - dump(): void; - - toArray(node: Node, i?: number): Node; - - registerDeclaration(path: NodePath): void; - - buildUndefinedNode(): Node; - - registerConstantViolation(path: NodePath): void; - - registerBinding(kind: string, path: NodePath, bindingPath?: NodePath): void; - - addGlobal(node: Node): void; - - hasUid(name: string): boolean; - - hasGlobal(name: string): boolean; - - hasReference(name: string): boolean; - - isPure(node: Node, constantsOnly?: boolean): boolean; - - setData(key: string, val: any): any; - - getData(key: string): any; - - removeData(key: string): void; - - push(opts: any): void; - - getProgramParent(): Scope; - - getFunctionParent(): Scope; - - getBlockParent(): Scope; - - /** Walks the scope tree and gathers **all** bindings. */ - getAllBindings(...kinds: string[]): Object; - - bindingIdentifierEquals(name: string, node: Node): boolean; - - getBinding(name: string): Binding; - - getOwnBinding(name: string): Binding; - - getBindingIdentifier(name: string): t.Identifier; - - getOwnBindingIdentifier(name: string): t.Identifier; - - hasOwnBinding(name: string): boolean; - - hasBinding(name: string, noGlobals?: boolean): boolean; - - parentHasBinding(name: string, noGlobals?: boolean): boolean; - - /** Move a binding of `name` to another `scope`. */ - moveBindingTo(name: string, scope: Scope): void; - - removeOwnBinding(name: string): void; - - removeBinding(name: string): void; -} - -export class Binding { - constructor(opts: { existing: Binding; identifier: t.Identifier; scope: Scope; path: NodePath; kind: 'var' | 'let' | 'const'; }); - identifier: t.Identifier; - scope: Scope; - path: NodePath; - kind: 'var' | 'let' | 'const' | 'module'; - referenced: boolean; - references: number; - referencePaths: NodePath[]; - constant: boolean; - constantViolations: NodePath[]; -} - -export interface Visitor extends VisitNodeObject { - ArrayExpression?: VisitNode; - AssignmentExpression?: VisitNode; - LVal?: VisitNode; - Expression?: VisitNode; - BinaryExpression?: VisitNode; - Directive?: VisitNode; - DirectiveLiteral?: VisitNode; - BlockStatement?: VisitNode; - BreakStatement?: VisitNode; - Identifier?: VisitNode; - CallExpression?: VisitNode; - CatchClause?: VisitNode; - ConditionalExpression?: VisitNode; - ContinueStatement?: VisitNode; - DebuggerStatement?: VisitNode; - DoWhileStatement?: VisitNode; - Statement?: VisitNode; - EmptyStatement?: VisitNode; - ExpressionStatement?: VisitNode; - File?: VisitNode; - Program?: VisitNode; - ForInStatement?: VisitNode; - VariableDeclaration?: VisitNode; - ForStatement?: VisitNode; - FunctionDeclaration?: VisitNode; - FunctionExpression?: VisitNode; - IfStatement?: VisitNode; - LabeledStatement?: VisitNode; - StringLiteral?: VisitNode; - NumericLiteral?: VisitNode; - NullLiteral?: VisitNode; - BooleanLiteral?: VisitNode; - RegExpLiteral?: VisitNode; - LogicalExpression?: VisitNode; - MemberExpression?: VisitNode; - NewExpression?: VisitNode; - ObjectExpression?: VisitNode; - ObjectMethod?: VisitNode; - ObjectProperty?: VisitNode; - RestElement?: VisitNode; - ReturnStatement?: VisitNode; - SequenceExpression?: VisitNode; - SwitchCase?: VisitNode; - SwitchStatement?: VisitNode; - ThisExpression?: VisitNode; - ThrowStatement?: VisitNode; - TryStatement?: VisitNode; - UnaryExpression?: VisitNode; - UpdateExpression?: VisitNode; - VariableDeclarator?: VisitNode; - WhileStatement?: VisitNode; - WithStatement?: VisitNode; - AssignmentPattern?: VisitNode; - ArrayPattern?: VisitNode; - ArrowFunctionExpression?: VisitNode; - ClassBody?: VisitNode; - ClassDeclaration?: VisitNode; - ClassExpression?: VisitNode; - ExportAllDeclaration?: VisitNode; - ExportDefaultDeclaration?: VisitNode; - ExportNamedDeclaration?: VisitNode; - Declaration?: VisitNode; - ExportSpecifier?: VisitNode; - ForOfStatement?: VisitNode; - ImportDeclaration?: VisitNode; - ImportDefaultSpecifier?: VisitNode; - ImportNamespaceSpecifier?: VisitNode; - ImportSpecifier?: VisitNode; - MetaProperty?: VisitNode; - ClassMethod?: VisitNode; - ObjectPattern?: VisitNode; - SpreadElement?: VisitNode; - Super?: VisitNode; - TaggedTemplateExpression?: VisitNode; - TemplateLiteral?: VisitNode; - TemplateElement?: VisitNode; - YieldExpression?: VisitNode; - AnyTypeAnnotation?: VisitNode; - ArrayTypeAnnotation?: VisitNode; - BooleanTypeAnnotation?: VisitNode; - BooleanLiteralTypeAnnotation?: VisitNode; - NullLiteralTypeAnnotation?: VisitNode; - ClassImplements?: VisitNode; - ClassProperty?: VisitNode; - DeclareClass?: VisitNode; - DeclareFunction?: VisitNode; - DeclareInterface?: VisitNode; - DeclareModule?: VisitNode; - DeclareTypeAlias?: VisitNode; - DeclareVariable?: VisitNode; - ExistentialTypeParam?: VisitNode; - FunctionTypeAnnotation?: VisitNode; - FunctionTypeParam?: VisitNode; - GenericTypeAnnotation?: VisitNode; - InterfaceExtends?: VisitNode; - InterfaceDeclaration?: VisitNode; - IntersectionTypeAnnotation?: VisitNode; - MixedTypeAnnotation?: VisitNode; - NullableTypeAnnotation?: VisitNode; - NumericLiteralTypeAnnotation?: VisitNode; - NumberTypeAnnotation?: VisitNode; - StringLiteralTypeAnnotation?: VisitNode; - StringTypeAnnotation?: VisitNode; - ThisTypeAnnotation?: VisitNode; - TupleTypeAnnotation?: VisitNode; - TypeofTypeAnnotation?: VisitNode; - TypeAlias?: VisitNode; - TypeAnnotation?: VisitNode; - TypeCastExpression?: VisitNode; - TypeParameterDeclaration?: VisitNode; - TypeParameterInstantiation?: VisitNode; - ObjectTypeAnnotation?: VisitNode; - ObjectTypeCallProperty?: VisitNode; - ObjectTypeIndexer?: VisitNode; - ObjectTypeProperty?: VisitNode; - QualifiedTypeIdentifier?: VisitNode; - UnionTypeAnnotation?: VisitNode; - VoidTypeAnnotation?: VisitNode; - JSXAttribute?: VisitNode; - JSXIdentifier?: VisitNode; - JSXNamespacedName?: VisitNode; - JSXElement?: VisitNode; - JSXExpressionContainer?: VisitNode; - JSXClosingElement?: VisitNode; - JSXMemberExpression?: VisitNode; - JSXOpeningElement?: VisitNode; - JSXEmptyExpression?: VisitNode; - JSXSpreadAttribute?: VisitNode; - JSXText?: VisitNode; - Noop?: VisitNode; - ParenthesizedExpression?: VisitNode; - AwaitExpression?: VisitNode; - BindExpression?: VisitNode; - Decorator?: VisitNode; - DoExpression?: VisitNode; - ExportDefaultSpecifier?: VisitNode; - ExportNamespaceSpecifier?: VisitNode; - RestProperty?: VisitNode; - SpreadProperty?: VisitNode; - Binary?: VisitNode; - Scopable?: VisitNode; - BlockParent?: VisitNode; - Block?: VisitNode; - Terminatorless?: VisitNode; - CompletionStatement?: VisitNode; - Conditional?: VisitNode; - Loop?: VisitNode; - While?: VisitNode; - ExpressionWrapper?: VisitNode; - For?: VisitNode; - ForXStatement?: VisitNode; - Function?: VisitNode; - FunctionParent?: VisitNode; - Pureish?: VisitNode; - Literal?: VisitNode; - Immutable?: VisitNode; - UserWhitespacable?: VisitNode; - Method?: VisitNode; - ObjectMember?: VisitNode; - Property?: VisitNode; - UnaryLike?: VisitNode; - Pattern?: VisitNode; - Class?: VisitNode; - ModuleDeclaration?: VisitNode; - ExportDeclaration?: VisitNode; - ModuleSpecifier?: VisitNode; - Flow?: VisitNode; - FlowBaseAnnotation?: VisitNode; - FlowDeclaration?: VisitNode; - JSX?: VisitNode; - Scope?: VisitNode; -} - -export type VisitNode = VisitNodeFunction | VisitNodeObject; - -export type VisitNodeFunction = (path: NodePath, state: any) => void; - -export interface VisitNodeObject { - enter?(path: NodePath, state: any): void; - exit?(path: NodePath, state: any): void; -} - -export class NodePath { - constructor(hub: Hub, parent: Node); - parent: Node; - hub: Hub; - contexts: TraversalContext[]; - data: Object; - shouldSkip: boolean; - shouldStop: boolean; - removed: boolean; - state: any; - opts: Object; - skipKeys: Object; - parentPath: NodePath; - context: TraversalContext; - container: Object | Object[]; - listKey: string; - inList: boolean; - parentKey: string; - key: string; - node: T; - scope: Scope; - type: string; - typeAnnotation: Object; - - getScope(scope: Scope): Scope; - - setData(key: string, val: any): any; - - getData(key: string, def?: any): any; - - buildCodeFrameError(msg: string, Error?: new (msg: string) => TError): TError; - - traverse(visitor: Visitor, state?: any): void; - - set(key: string, node: Node): void; - - getPathLocation(): string; - - debug(buildMessage: Function): void; - - // ------------------------- ancestry ------------------------- - /** - * Call the provided `callback` with the `NodePath`s of all the parents. - * When the `callback` returns a truthy value, we return that node path. - */ - findParent(callback: (path: NodePath) => boolean): NodePath; - - find(callback: (path: NodePath) => boolean): NodePath; - - /** Get the parent function of the current path. */ - getFunctionParent(): NodePath; - - /** Walk up the tree until we hit a parent node path in a list. */ - getStatementParent(): NodePath; - - /** - * Get the deepest common ancestor and then from it, get the earliest relationship path - * to that ancestor. - * - * Earliest is defined as being "before" all the other nodes in terms of list container - * position and visiting key. - */ - getEarliestCommonAncestorFrom(paths: NodePath[]): NodePath; - - /** Get the earliest path in the tree where the provided `paths` intersect. */ - getDeepestCommonAncestorFrom(paths: NodePath[], filter?: Function): NodePath; - - /** - * Build an array of node paths containing the entire ancestry of the current node path. - * - * NOTE: The current node path is included in this. - */ - getAncestry(): NodePath[]; - - inType(...candidateTypes: string[]): boolean; - - // ------------------------- inference ------------------------- - /** Infer the type of the current `NodePath`. */ - getTypeAnnotation(): t.FlowTypeAnnotation; - - isBaseType(baseName: string, soft?: boolean): boolean; - - couldBeBaseType(name: string): boolean; - - baseTypeStrictlyMatches(right: NodePath): boolean; - - isGenericType(genericName: string): boolean; - - // ------------------------- replacement ------------------------- - /** - * Replace a node with an array of multiple. This method performs the following steps: - * - * - Inherit the comments of first provided node with that of the current node. - * - Insert the provided nodes after the current node. - * - Remove the current node. - */ - replaceWithMultiple(nodes: Node[]): void; - - /** - * Parse a string as an expression and replace the current node with the result. - * - * NOTE: This is typically not a good idea to use. Building source strings when - * transforming ASTs is an antipattern and SHOULD NOT be encouraged. Even if it's - * easier to use, your transforms will be extremely brittle. - */ - replaceWithSourceString(replacement: any): void; - - /** Replace the current node with another. */ - replaceWith(replacement: Node | NodePath): void; - - /** - * This method takes an array of statements nodes and then explodes it - * into expressions. This method retains completion records which is - * extremely important to retain original semantics. - */ - replaceExpressionWithStatements(nodes: Node[]): Node; - - replaceInline(nodes: Node | Node[]): void; - - // ------------------------- evaluation ------------------------- - /** - * Walk the input `node` and statically evaluate if it's truthy. - * - * Returning `true` when we're sure that the expression will evaluate to a - * truthy value, `false` if we're sure that it will evaluate to a falsy - * value and `undefined` if we aren't sure. Because of this please do not - * rely on coercion when using this method and check with === if it's false. - */ - evaluateTruthy(): boolean; - - /** - * Walk the input `node` and statically evaluate it. - * - * Returns an object in the form `{ confident, value }`. `confident` indicates - * whether or not we had to drop out of evaluating the expression because of - * hitting an unknown node that we couldn't confidently find the value of. - * - * Example: - * - * t.evaluate(parse("5 + 5")) // { confident: true, value: 10 } - * t.evaluate(parse("!true")) // { confident: true, value: false } - * t.evaluate(parse("foo + foo")) // { confident: false, value: undefined } - */ - evaluate(): { confident: boolean; value: any }; - - // ------------------------- introspection ------------------------- - /** - * Match the current node if it matches the provided `pattern`. - * - * For example, given the match `React.createClass` it would match the - * parsed nodes of `React.createClass` and `React["createClass"]`. - */ - matchesPattern(pattern: string, allowPartial?: boolean): boolean; - - /** - * Check whether we have the input `key`. If the `key` references an array then we check - * if the array has any items, otherwise we just check if it's falsy. - */ - has(key: string): boolean; - - isStatic(): boolean; - - /** Alias of `has`. */ - is(key: string): boolean; - - /** Opposite of `has`. */ - isnt(key: string): boolean; - - /** Check whether the path node `key` strict equals `value`. */ - equals(key: string, value: any): boolean; - - /** - * Check the type against our stored internal type of the node. This is handy when a node has - * been removed yet we still internally know the type and need it to calculate node replacement. - */ - isNodeType(type: string): boolean; - - /** - * This checks whether or not we're in one of the following positions: - * - * for (KEY in right); - * for (KEY;;); - * - * This is because these spots allow VariableDeclarations AND normal expressions so we need - * to tell the path replacement that it's ok to replace this with an expression. - */ - canHaveVariableDeclarationOrExpression(): boolean; - - /** - * This checks whether we are swapping an arrow function's body between an - * expression and a block statement (or vice versa). - * - * This is because arrow functions may implicitly return an expression, which - * is the same as containing a block statement. - */ - canSwapBetweenExpressionAndStatement(replacement: Node): boolean; - - /** Check whether the current path references a completion record */ - isCompletionRecord(allowInsideFunction?: boolean): boolean; - - /** - * Check whether or not the current `key` allows either a single statement or block statement - * so we can explode it if necessary. - */ - isStatementOrBlock(): boolean; - - /** Check if the currently assigned path references the `importName` of `moduleSource`. */ - referencesImport(moduleSource: string, importName: string): boolean; - - /** Get the source code associated with this node. */ - getSource(): string; - - // ------------------------- context ------------------------- - call(key: string): boolean; - - isBlacklisted(): boolean; - - visit(): boolean; - - skip(): void; - - skipKey(key: string): void; - - stop(): void; - - setScope(): void; - - setContext(context: TraversalContext): NodePath; - - popContext(): void; - - pushContext(context: TraversalContext): void; - - // ------------------------- removal ------------------------- - remove(): void; - - // ------------------------- modification ------------------------- - /** Insert the provided nodes before the current one. */ - insertBefore(nodes: Node | Node[]): any; - - /** - * Insert the provided nodes after the current one. When inserting nodes after an - * expression, ensure that the completion record is correct by pushing the current node. - */ - insertAfter(nodes: Node | Node[]): any; - - /** Update all sibling node paths after `fromIndex` by `incrementBy`. */ - updateSiblingKeys(fromIndex: number, incrementBy: number): void; - - /** Hoist the current node to the highest scope possible and return a UID referencing it. */ - hoist(scope: Scope): void; - - // ------------------------- family ------------------------- - getStatementParent(): NodePath; - - getOpposite(): NodePath; - - getCompletionRecords(): NodePath[]; - - getSibling(key: string): NodePath; - - get(key: string, context?: boolean | TraversalContext): NodePath; - - getBindingIdentifiers(duplicates?: boolean): Node[]; - - getOuterBindingIdentifiers(duplicates?: boolean): Node[]; - - // ------------------------- comments ------------------------- - /** Share comments amongst siblings. */ - shareCommentsWithSiblings(): void; - - addComment(type: string, content: string, line?: boolean): void; - - /** Give node `comments` of the specified `type`. */ - addComments(type: string, comments: any[]): void; - - // ------------------------- isXXX ------------------------- - isArrayExpression(opts?: Object): boolean; - isAssignmentExpression(opts?: Object): boolean; - isBinaryExpression(opts?: Object): boolean; - isDirective(opts?: Object): boolean; - isDirectiveLiteral(opts?: Object): boolean; - isBlockStatement(opts?: Object): boolean; - isBreakStatement(opts?: Object): boolean; - isCallExpression(opts?: Object): boolean; - isCatchClause(opts?: Object): boolean; - isConditionalExpression(opts?: Object): boolean; - isContinueStatement(opts?: Object): boolean; - isDebuggerStatement(opts?: Object): boolean; - isDoWhileStatement(opts?: Object): boolean; - isEmptyStatement(opts?: Object): boolean; - isExpressionStatement(opts?: Object): boolean; - isFile(opts?: Object): boolean; - isForInStatement(opts?: Object): boolean; - isForStatement(opts?: Object): boolean; - isFunctionDeclaration(opts?: Object): boolean; - isFunctionExpression(opts?: Object): boolean; - isIdentifier(opts?: Object): boolean; - isIfStatement(opts?: Object): boolean; - isLabeledStatement(opts?: Object): boolean; - isStringLiteral(opts?: Object): boolean; - isNumericLiteral(opts?: Object): boolean; - isNullLiteral(opts?: Object): boolean; - isBooleanLiteral(opts?: Object): boolean; - isRegExpLiteral(opts?: Object): boolean; - isLogicalExpression(opts?: Object): boolean; - isMemberExpression(opts?: Object): boolean; - isNewExpression(opts?: Object): boolean; - isProgram(opts?: Object): boolean; - isObjectExpression(opts?: Object): boolean; - isObjectMethod(opts?: Object): boolean; - isObjectProperty(opts?: Object): boolean; - isRestElement(opts?: Object): boolean; - isReturnStatement(opts?: Object): boolean; - isSequenceExpression(opts?: Object): boolean; - isSwitchCase(opts?: Object): boolean; - isSwitchStatement(opts?: Object): boolean; - isThisExpression(opts?: Object): boolean; - isThrowStatement(opts?: Object): boolean; - isTryStatement(opts?: Object): boolean; - isUnaryExpression(opts?: Object): boolean; - isUpdateExpression(opts?: Object): boolean; - isVariableDeclaration(opts?: Object): boolean; - isVariableDeclarator(opts?: Object): boolean; - isWhileStatement(opts?: Object): boolean; - isWithStatement(opts?: Object): boolean; - isAssignmentPattern(opts?: Object): boolean; - isArrayPattern(opts?: Object): boolean; - isArrowFunctionExpression(opts?: Object): boolean; - isClassBody(opts?: Object): boolean; - isClassDeclaration(opts?: Object): boolean; - isClassExpression(opts?: Object): boolean; - isExportAllDeclaration(opts?: Object): boolean; - isExportDefaultDeclaration(opts?: Object): boolean; - isExportNamedDeclaration(opts?: Object): boolean; - isExportSpecifier(opts?: Object): boolean; - isForOfStatement(opts?: Object): boolean; - isImportDeclaration(opts?: Object): boolean; - isImportDefaultSpecifier(opts?: Object): boolean; - isImportNamespaceSpecifier(opts?: Object): boolean; - isImportSpecifier(opts?: Object): boolean; - isMetaProperty(opts?: Object): boolean; - isClassMethod(opts?: Object): boolean; - isObjectPattern(opts?: Object): boolean; - isSpreadElement(opts?: Object): boolean; - isSuper(opts?: Object): boolean; - isTaggedTemplateExpression(opts?: Object): boolean; - isTemplateElement(opts?: Object): boolean; - isTemplateLiteral(opts?: Object): boolean; - isYieldExpression(opts?: Object): boolean; - isAnyTypeAnnotation(opts?: Object): boolean; - isArrayTypeAnnotation(opts?: Object): boolean; - isBooleanTypeAnnotation(opts?: Object): boolean; - isBooleanLiteralTypeAnnotation(opts?: Object): boolean; - isNullLiteralTypeAnnotation(opts?: Object): boolean; - isClassImplements(opts?: Object): boolean; - isClassProperty(opts?: Object): boolean; - isDeclareClass(opts?: Object): boolean; - isDeclareFunction(opts?: Object): boolean; - isDeclareInterface(opts?: Object): boolean; - isDeclareModule(opts?: Object): boolean; - isDeclareTypeAlias(opts?: Object): boolean; - isDeclareVariable(opts?: Object): boolean; - isExistentialTypeParam(opts?: Object): boolean; - isFunctionTypeAnnotation(opts?: Object): boolean; - isFunctionTypeParam(opts?: Object): boolean; - isGenericTypeAnnotation(opts?: Object): boolean; - isInterfaceExtends(opts?: Object): boolean; - isInterfaceDeclaration(opts?: Object): boolean; - isIntersectionTypeAnnotation(opts?: Object): boolean; - isMixedTypeAnnotation(opts?: Object): boolean; - isNullableTypeAnnotation(opts?: Object): boolean; - isNumericLiteralTypeAnnotation(opts?: Object): boolean; - isNumberTypeAnnotation(opts?: Object): boolean; - isStringLiteralTypeAnnotation(opts?: Object): boolean; - isStringTypeAnnotation(opts?: Object): boolean; - isThisTypeAnnotation(opts?: Object): boolean; - isTupleTypeAnnotation(opts?: Object): boolean; - isTypeofTypeAnnotation(opts?: Object): boolean; - isTypeAlias(opts?: Object): boolean; - isTypeAnnotation(opts?: Object): boolean; - isTypeCastExpression(opts?: Object): boolean; - isTypeParameterDeclaration(opts?: Object): boolean; - isTypeParameterInstantiation(opts?: Object): boolean; - isObjectTypeAnnotation(opts?: Object): boolean; - isObjectTypeCallProperty(opts?: Object): boolean; - isObjectTypeIndexer(opts?: Object): boolean; - isObjectTypeProperty(opts?: Object): boolean; - isQualifiedTypeIdentifier(opts?: Object): boolean; - isUnionTypeAnnotation(opts?: Object): boolean; - isVoidTypeAnnotation(opts?: Object): boolean; - isJSXAttribute(opts?: Object): boolean; - isJSXClosingElement(opts?: Object): boolean; - isJSXElement(opts?: Object): boolean; - isJSXEmptyExpression(opts?: Object): boolean; - isJSXExpressionContainer(opts?: Object): boolean; - isJSXIdentifier(opts?: Object): boolean; - isJSXMemberExpression(opts?: Object): boolean; - isJSXNamespacedName(opts?: Object): boolean; - isJSXOpeningElement(opts?: Object): boolean; - isJSXSpreadAttribute(opts?: Object): boolean; - isJSXText(opts?: Object): boolean; - isNoop(opts?: Object): boolean; - isParenthesizedExpression(opts?: Object): boolean; - isAwaitExpression(opts?: Object): boolean; - isBindExpression(opts?: Object): boolean; - isDecorator(opts?: Object): boolean; - isDoExpression(opts?: Object): boolean; - isExportDefaultSpecifier(opts?: Object): boolean; - isExportNamespaceSpecifier(opts?: Object): boolean; - isRestProperty(opts?: Object): boolean; - isSpreadProperty(opts?: Object): boolean; - isExpression(opts?: Object): boolean; - isBinary(opts?: Object): boolean; - isScopable(opts?: Object): boolean; - isBlockParent(opts?: Object): boolean; - isBlock(opts?: Object): boolean; - isStatement(opts?: Object): boolean; - isTerminatorless(opts?: Object): boolean; - isCompletionStatement(opts?: Object): boolean; - isConditional(opts?: Object): boolean; - isLoop(opts?: Object): boolean; - isWhile(opts?: Object): boolean; - isExpressionWrapper(opts?: Object): boolean; - isFor(opts?: Object): boolean; - isForXStatement(opts?: Object): boolean; - isFunction(opts?: Object): boolean; - isFunctionParent(opts?: Object): boolean; - isPureish(opts?: Object): boolean; - isDeclaration(opts?: Object): boolean; - isLVal(opts?: Object): boolean; - isLiteral(opts?: Object): boolean; - isImmutable(opts?: Object): boolean; - isUserWhitespacable(opts?: Object): boolean; - isMethod(opts?: Object): boolean; - isObjectMember(opts?: Object): boolean; - isProperty(opts?: Object): boolean; - isUnaryLike(opts?: Object): boolean; - isPattern(opts?: Object): boolean; - isClass(opts?: Object): boolean; - isModuleDeclaration(opts?: Object): boolean; - isExportDeclaration(opts?: Object): boolean; - isModuleSpecifier(opts?: Object): boolean; - isFlow(opts?: Object): boolean; - isFlowBaseAnnotation(opts?: Object): boolean; - isFlowDeclaration(opts?: Object): boolean; - isJSX(opts?: Object): boolean; - isNumberLiteral(opts?: Object): boolean; - isRegexLiteral(opts?: Object): boolean; - isReferencedIdentifier(opts?: Object): boolean; - isReferencedMemberExpression(opts?: Object): boolean; - isBindingIdentifier(opts?: Object): boolean; - isScope(opts?: Object): boolean; - isReferenced(opts?: Object): boolean; - isBlockScoped(opts?: Object): boolean; - isVar(opts?: Object): boolean; - isUser(opts?: Object): boolean; - isGenerated(opts?: Object): boolean; - isPure(opts?: Object): boolean; - - // ------------------------- assertXXX ------------------------- - assertArrayExpression(opts?: Object): void; - assertAssignmentExpression(opts?: Object): void; - assertBinaryExpression(opts?: Object): void; - assertDirective(opts?: Object): void; - assertDirectiveLiteral(opts?: Object): void; - assertBlockStatement(opts?: Object): void; - assertBreakStatement(opts?: Object): void; - assertCallExpression(opts?: Object): void; - assertCatchClause(opts?: Object): void; - assertConditionalExpression(opts?: Object): void; - assertContinueStatement(opts?: Object): void; - assertDebuggerStatement(opts?: Object): void; - assertDoWhileStatement(opts?: Object): void; - assertEmptyStatement(opts?: Object): void; - assertExpressionStatement(opts?: Object): void; - assertFile(opts?: Object): void; - assertForInStatement(opts?: Object): void; - assertForStatement(opts?: Object): void; - assertFunctionDeclaration(opts?: Object): void; - assertFunctionExpression(opts?: Object): void; - assertIdentifier(opts?: Object): void; - assertIfStatement(opts?: Object): void; - assertLabeledStatement(opts?: Object): void; - assertStringLiteral(opts?: Object): void; - assertNumericLiteral(opts?: Object): void; - assertNullLiteral(opts?: Object): void; - assertBooleanLiteral(opts?: Object): void; - assertRegExpLiteral(opts?: Object): void; - assertLogicalExpression(opts?: Object): void; - assertMemberExpression(opts?: Object): void; - assertNewExpression(opts?: Object): void; - assertProgram(opts?: Object): void; - assertObjectExpression(opts?: Object): void; - assertObjectMethod(opts?: Object): void; - assertObjectProperty(opts?: Object): void; - assertRestElement(opts?: Object): void; - assertReturnStatement(opts?: Object): void; - assertSequenceExpression(opts?: Object): void; - assertSwitchCase(opts?: Object): void; - assertSwitchStatement(opts?: Object): void; - assertThisExpression(opts?: Object): void; - assertThrowStatement(opts?: Object): void; - assertTryStatement(opts?: Object): void; - assertUnaryExpression(opts?: Object): void; - assertUpdateExpression(opts?: Object): void; - assertVariableDeclaration(opts?: Object): void; - assertVariableDeclarator(opts?: Object): void; - assertWhileStatement(opts?: Object): void; - assertWithStatement(opts?: Object): void; - assertAssignmentPattern(opts?: Object): void; - assertArrayPattern(opts?: Object): void; - assertArrowFunctionExpression(opts?: Object): void; - assertClassBody(opts?: Object): void; - assertClassDeclaration(opts?: Object): void; - assertClassExpression(opts?: Object): void; - assertExportAllDeclaration(opts?: Object): void; - assertExportDefaultDeclaration(opts?: Object): void; - assertExportNamedDeclaration(opts?: Object): void; - assertExportSpecifier(opts?: Object): void; - assertForOfStatement(opts?: Object): void; - assertImportDeclaration(opts?: Object): void; - assertImportDefaultSpecifier(opts?: Object): void; - assertImportNamespaceSpecifier(opts?: Object): void; - assertImportSpecifier(opts?: Object): void; - assertMetaProperty(opts?: Object): void; - assertClassMethod(opts?: Object): void; - assertObjectPattern(opts?: Object): void; - assertSpreadElement(opts?: Object): void; - assertSuper(opts?: Object): void; - assertTaggedTemplateExpression(opts?: Object): void; - assertTemplateElement(opts?: Object): void; - assertTemplateLiteral(opts?: Object): void; - assertYieldExpression(opts?: Object): void; - assertAnyTypeAnnotation(opts?: Object): void; - assertArrayTypeAnnotation(opts?: Object): void; - assertBooleanTypeAnnotation(opts?: Object): void; - assertBooleanLiteralTypeAnnotation(opts?: Object): void; - assertNullLiteralTypeAnnotation(opts?: Object): void; - assertClassImplements(opts?: Object): void; - assertClassProperty(opts?: Object): void; - assertDeclareClass(opts?: Object): void; - assertDeclareFunction(opts?: Object): void; - assertDeclareInterface(opts?: Object): void; - assertDeclareModule(opts?: Object): void; - assertDeclareTypeAlias(opts?: Object): void; - assertDeclareVariable(opts?: Object): void; - assertExistentialTypeParam(opts?: Object): void; - assertFunctionTypeAnnotation(opts?: Object): void; - assertFunctionTypeParam(opts?: Object): void; - assertGenericTypeAnnotation(opts?: Object): void; - assertInterfaceExtends(opts?: Object): void; - assertInterfaceDeclaration(opts?: Object): void; - assertIntersectionTypeAnnotation(opts?: Object): void; - assertMixedTypeAnnotation(opts?: Object): void; - assertNullableTypeAnnotation(opts?: Object): void; - assertNumericLiteralTypeAnnotation(opts?: Object): void; - assertNumberTypeAnnotation(opts?: Object): void; - assertStringLiteralTypeAnnotation(opts?: Object): void; - assertStringTypeAnnotation(opts?: Object): void; - assertThisTypeAnnotation(opts?: Object): void; - assertTupleTypeAnnotation(opts?: Object): void; - assertTypeofTypeAnnotation(opts?: Object): void; - assertTypeAlias(opts?: Object): void; - assertTypeAnnotation(opts?: Object): void; - assertTypeCastExpression(opts?: Object): void; - assertTypeParameterDeclaration(opts?: Object): void; - assertTypeParameterInstantiation(opts?: Object): void; - assertObjectTypeAnnotation(opts?: Object): void; - assertObjectTypeCallProperty(opts?: Object): void; - assertObjectTypeIndexer(opts?: Object): void; - assertObjectTypeProperty(opts?: Object): void; - assertQualifiedTypeIdentifier(opts?: Object): void; - assertUnionTypeAnnotation(opts?: Object): void; - assertVoidTypeAnnotation(opts?: Object): void; - assertJSXAttribute(opts?: Object): void; - assertJSXClosingElement(opts?: Object): void; - assertJSXElement(opts?: Object): void; - assertJSXEmptyExpression(opts?: Object): void; - assertJSXExpressionContainer(opts?: Object): void; - assertJSXIdentifier(opts?: Object): void; - assertJSXMemberExpression(opts?: Object): void; - assertJSXNamespacedName(opts?: Object): void; - assertJSXOpeningElement(opts?: Object): void; - assertJSXSpreadAttribute(opts?: Object): void; - assertJSXText(opts?: Object): void; - assertNoop(opts?: Object): void; - assertParenthesizedExpression(opts?: Object): void; - assertAwaitExpression(opts?: Object): void; - assertBindExpression(opts?: Object): void; - assertDecorator(opts?: Object): void; - assertDoExpression(opts?: Object): void; - assertExportDefaultSpecifier(opts?: Object): void; - assertExportNamespaceSpecifier(opts?: Object): void; - assertRestProperty(opts?: Object): void; - assertSpreadProperty(opts?: Object): void; - assertExpression(opts?: Object): void; - assertBinary(opts?: Object): void; - assertScopable(opts?: Object): void; - assertBlockParent(opts?: Object): void; - assertBlock(opts?: Object): void; - assertStatement(opts?: Object): void; - assertTerminatorless(opts?: Object): void; - assertCompletionStatement(opts?: Object): void; - assertConditional(opts?: Object): void; - assertLoop(opts?: Object): void; - assertWhile(opts?: Object): void; - assertExpressionWrapper(opts?: Object): void; - assertFor(opts?: Object): void; - assertForXStatement(opts?: Object): void; - assertFunction(opts?: Object): void; - assertFunctionParent(opts?: Object): void; - assertPureish(opts?: Object): void; - assertDeclaration(opts?: Object): void; - assertLVal(opts?: Object): void; - assertLiteral(opts?: Object): void; - assertImmutable(opts?: Object): void; - assertUserWhitespacable(opts?: Object): void; - assertMethod(opts?: Object): void; - assertObjectMember(opts?: Object): void; - assertProperty(opts?: Object): void; - assertUnaryLike(opts?: Object): void; - assertPattern(opts?: Object): void; - assertClass(opts?: Object): void; - assertModuleDeclaration(opts?: Object): void; - assertExportDeclaration(opts?: Object): void; - assertModuleSpecifier(opts?: Object): void; - assertFlow(opts?: Object): void; - assertFlowBaseAnnotation(opts?: Object): void; - assertFlowDeclaration(opts?: Object): void; - assertJSX(opts?: Object): void; - assertNumberLiteral(opts?: Object): void; - assertRegexLiteral(opts?: Object): void; -} - -export class Hub { - constructor(file: any, options: any); - file: any; - options: any; -} - -interface TraversalContext { - parentPath: NodePath; - scope: Scope; - state: any; - opts: any; -} diff --git a/typescript/hello-world/node_modules/@types/babel-traverse/package.json b/typescript/hello-world/node_modules/@types/babel-traverse/package.json deleted file mode 100644 index 2da8446..0000000 --- a/typescript/hello-world/node_modules/@types/babel-traverse/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@types/babel-traverse", - "version": "6.7.17", - "description": "TypeScript definitions for babel-traverse", - "license": "MIT", - "contributors": [ - { - "name": "Troy Gerwien", - "url": "https://github.com/yortus" - } - ], - "main": "", - "repository": { - "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "dependencies": { - "@types/babel-types": "*" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "8e50dc505a31639d76b209314a366d3a228edfdf7828e869f71a7ee13634cf38", - "typeScriptVersion": "2.0" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/@types/babel-types/LICENSE b/typescript/hello-world/node_modules/@types/babel-types/LICENSE deleted file mode 100644 index 4b1ad51..0000000 --- a/typescript/hello-world/node_modules/@types/babel-types/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/typescript/hello-world/node_modules/@types/babel-types/README.md b/typescript/hello-world/node_modules/@types/babel-types/README.md deleted file mode 100644 index 6806fbd..0000000 --- a/typescript/hello-world/node_modules/@types/babel-types/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/babel-types` - -# Summary -This package contains type definitions for babel-types (https://github.com/babel/babel/tree/master/packages/babel-types). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel-types - -Additional Details - * Last updated: Fri, 05 May 2017 01:18:21 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Troy Gerwien , Sam Baxter . diff --git a/typescript/hello-world/node_modules/@types/babel-types/index.d.ts b/typescript/hello-world/node_modules/@types/babel-types/index.d.ts deleted file mode 100644 index c1e8354..0000000 --- a/typescript/hello-world/node_modules/@types/babel-types/index.d.ts +++ /dev/null @@ -1,1401 +0,0 @@ -// Type definitions for babel-types v6.7 -// Project: https://github.com/babel/babel/tree/master/packages/babel-types -// Definitions by: Troy Gerwien , Sam Baxter -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export interface Comment { - value: string; - start: number; - end: number; - loc: SourceLocation; -} - -export interface CommentBlock extends Comment { - type: "CommentBlock"; -} - -export interface CommentLine extends Comment { - type: "CommentLine"; -} - -export interface SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -export interface Node { - type: string; - leadingComments?: Array; - innerComments?: Array; - trailingComments?: Array; - start: number; - end: number; - loc: SourceLocation; -} - -export interface ArrayExpression extends Node { - type: "ArrayExpression"; - elements: Array; -} - -export interface AssignmentExpression extends Node { - type: "AssignmentExpression"; - operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&="; - left: LVal; - right: Expression; -} - -export interface BinaryExpression extends Node { - type: "BinaryExpression"; - operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; - left: Expression; - right: Expression; -} - -export interface Directive extends Node { - type: "Directive"; - value: DirectiveLiteral; -} - -export interface DirectiveLiteral extends Node { - type: "DirectiveLiteral"; - value: string; -} - -export interface BlockStatement extends Node { - type: "BlockStatement"; - directives?: Directive[]; - body: Statement[]; -} - -export interface BreakStatement extends Node { - type: "BreakStatement"; - label: Identifier; -} - -export interface CallExpression extends Node { - type: "CallExpression"; - callee: Expression | Super; - arguments: Array; -} - -export interface CatchClause extends Node { - type: "CatchClause"; - param: Identifier; - body: BlockStatement; -} - -export interface ConditionalExpression extends Node { - type: "ConditionalExpression"; - test: Expression; - consequent: Expression; - alternate: Expression; -} - -export interface ContinueStatement extends Node { - type: "ContinueStatement"; - label: Identifier; -} - -export interface DebuggerStatement extends Node { - type: "DebuggerStatement"; -} - -export interface DoWhileStatement extends Node { - type: "DoWhileStatement"; - test: Expression; - body: Statement; -} - -export interface EmptyStatement extends Node { - type: "EmptyStatement"; -} - -export interface ExpressionStatement extends Node { - type: "ExpressionStatement"; - expression: Expression; -} - -export interface File extends Node { - type: "File"; - program: Program; - comments: Comment[]; - tokens: any[]; -} - -export interface ForInStatement extends Node { - type: "ForInStatement"; - left: VariableDeclaration | LVal; - right: Expression; - body: Statement; -} - -export interface ForStatement extends Node { - type: "ForStatement"; - init: VariableDeclaration | Expression; - test: Expression; - update: Expression; - body: Statement; -} - -export interface FunctionDeclaration extends Node { - type: "FunctionDeclaration"; - id: Identifier; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - returnType?: TypeAnnotation; - typeParameters?: TypeParameterDeclaration; -} - -export interface FunctionExpression extends Node { - type: "FunctionExpression"; - id: Identifier; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - returnType?: TypeAnnotation; - typeParameters?: TypeParameterDeclaration; -} - -export interface Identifier extends Node { - type: "Identifier"; - name: string; - typeAnnotation?: TypeAnnotation; -} - -export interface IfStatement extends Node { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate: Statement; -} - -export interface LabeledStatement extends Node { - type: "LabeledStatement"; - label: Identifier; - body: Statement; -} - -export interface StringLiteral extends Node { - type: "StringLiteral"; - value: string; -} - -export interface NumericLiteral extends Node { - type: "NumericLiteral"; - value: number; -} - -export interface NullLiteral extends Node { - type: "NullLiteral"; -} - -export interface BooleanLiteral extends Node { - type: "BooleanLiteral"; - value: boolean; -} - -export interface RegExpLiteral extends Node { - type: "RegExpLiteral"; - pattern: string; - flags?: string; -} - -export interface LogicalExpression extends Node { - type: "LogicalExpression"; - operator: "||" | "&&"; - left: Expression; - right: Expression; -} - -export interface MemberExpression extends Node { - type: "MemberExpression"; - object: Expression | Super; - property: Expression; - computed: boolean; -} - -export interface NewExpression extends Node { - type: "NewExpression"; - callee: Expression | Super; - arguments: Array; -} - -export interface Program extends Node { - type: "Program"; - sourceType: "script" | "module"; - directives?: Directive[]; - body: Array; -} - -export interface ObjectExpression extends Node { - type: "ObjectExpression"; - properties: Array; -} - -export interface ObjectMethod extends Node { - type: "ObjectMethod"; - key: Expression; - kind: "get" | "set" | "method"; - shorthand: boolean; - computed: boolean; - value: Expression; - decorators?: Decorator[]; - id: Identifier; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - returnType?: TypeAnnotation; - typeParameters?: TypeParameterDeclaration; -} - -export interface ObjectProperty extends Node { - type: "ObjectProperty"; - key: Expression; - computed: boolean; - value: Expression; - decorators?: Decorator[]; - shorthand: boolean; -} - -export interface RestElement extends Node { - type: "RestElement"; - argument: LVal; - typeAnnotation?: TypeAnnotation; -} - -export interface ReturnStatement extends Node { - type: "ReturnStatement"; - argument: Expression; -} - -export interface SequenceExpression extends Node { - type: "SequenceExpression"; - expressions: Expression[]; -} - -export interface SwitchCase extends Node { - type: "SwitchCase"; - test: Expression; - consequent: Statement[]; -} - -export interface SwitchStatement extends Node { - type: "SwitchStatement"; - discriminant: Expression; - cases: SwitchCase[]; -} - -export interface ThisExpression extends Node { - type: "ThisExpression"; -} - -export interface ThrowStatement extends Node { - type: "ThrowStatement"; - argument: Expression; -} - -export interface TryStatement extends Node { - type: "TryStatement"; - block: BlockStatement; - handler: CatchClause; - finalizer: BlockStatement; -} - -export interface UnaryExpression extends Node { - type: "UnaryExpression"; - operator: "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; - prefix: boolean; - argument: Expression; -} - -export interface UpdateExpression extends Node { - type: "UpdateExpression"; - operator: "++" | "--"; - prefix: boolean; - argument: Expression; -} - -export interface VariableDeclaration extends Node { - type: "VariableDeclaration"; - declarations: VariableDeclarator[]; - kind: "var" | "let" | "const"; -} - -export interface VariableDeclarator extends Node { - type: "VariableDeclarator"; - id: LVal; - init: Expression; -} - -export interface WhileStatement extends Node { - type: "WhileStatement"; - test: Expression; - body: Statement; -} - -export interface WithStatement extends Node { - type: "WithStatement"; - object: Expression; - body: BlockStatement | Statement; -} - -export interface AssignmentPattern extends Node { - type: "AssignmentPattern"; - left: Identifier; - right: Expression; -} - -export interface ArrayPattern extends Node { - type: "ArrayPattern"; - elements: Array; - typeAnnotation?: TypeAnnotation; -} - -export interface ArrowFunctionExpression extends Node { - type: "ArrowFunctionExpression"; - id: Identifier; - params: Array; - body: BlockStatement | Expression; - generator: boolean; - async: boolean; - expression: boolean; - returnType?: TypeAnnotation; - typeParameters?: TypeParameterDeclaration; -} - -export interface ClassBody extends Node { - type: "ClassBody"; - body: Array; -} - -export interface ClassDeclaration extends Node { - type: "ClassDeclaration"; - id: Identifier; - superClass: Expression; - body: ClassBody; - decorators?: Decorator[]; - implements?: ClassImplements[]; - mixins?: any[]; - typeParameters?: TypeParameterDeclaration; - superTypeParameters?: TypeParameterInstantiation; -} - -export interface ClassExpression extends Node { - type: "ClassExpression"; - id: Identifier; - superClass: Expression; - body: ClassBody; - decorators?: Decorator[]; - implements?: ClassImplements[]; - mixins?: any[]; - typeParameters?: TypeParameterDeclaration; - superTypeParameters?: TypeParameterInstantiation; -} - -export interface ExportAllDeclaration extends Node { - type: "ExportAllDeclaration"; - source: StringLiteral; -} - -export interface ExportDefaultDeclaration extends Node { - type: "ExportDefaultDeclaration"; - declaration: Declaration | Expression; -} - -export interface ExportNamedDeclaration extends Node { - type: "ExportNamedDeclaration"; - declaration: Declaration; - specifiers: ExportSpecifier[]; - source: StringLiteral; -} - -export interface ExportSpecifier extends Node { - type: "ExportSpecifier"; - local: Identifier; - imported: Identifier; - exported: Identifier; -} - -export interface ForOfStatement extends Node { - type: "ForOfStatement"; - left: VariableDeclaration | LVal; - right: Expression; - body: Statement; -} - -export interface ImportDeclaration extends Node { - type: "ImportDeclaration"; - specifiers: Array; - source: StringLiteral; -} - -export interface ImportDefaultSpecifier extends Node { - type: "ImportDefaultSpecifier"; - local: Identifier; -} - -export interface ImportNamespaceSpecifier extends Node { - type: "ImportNamespaceSpecifier"; - local: Identifier; -} - -export interface ImportSpecifier extends Node { - type: "ImportSpecifier"; - local: Identifier; - imported: Identifier; -} - -export interface MetaProperty extends Node { - type: "MetaProperty"; - meta: Identifier; - property: Identifier; -} - -export interface ClassMethod extends Node { - type: "ClassMethod"; - key: Expression; - value?: FunctionExpression; - kind: "constructor" | "method" | "get" | "set"; - computed: boolean; - static: boolean; - decorators?: Decorator[]; - id: Identifier; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - expression: boolean; - returnType?: TypeAnnotation; - typeParameters?: TypeParameterDeclaration; -} - -// See: https://github.com/babel/babel/blob/master/doc/ast/spec.md#objectpattern -export interface AssignmentProperty extends Node { - type: "ObjectProperty"; - key: Expression; - computed: boolean; - value: Pattern; - decorators?: Decorator[]; - shorthand: boolean; -} - -export interface ObjectPattern extends Node { - type: "ObjectPattern"; - properties: Array; - typeAnnotation?: TypeAnnotation; -} - -export interface SpreadElement extends Node { - type: "SpreadElement"; - argument: Expression; -} - -export interface Super extends Node { - type: "Super"; -} - -export interface TaggedTemplateExpression extends Node { - type: "TaggedTemplateExpression"; - tag: Expression; - quasi: TemplateLiteral; -} - -export interface TemplateElement extends Node { - type: "TemplateElement"; - tail: boolean; - value: { - cooked: string; - raw: string; - }; -} - -export interface TemplateLiteral extends Node { - type: "TemplateLiteral"; - quasis: TemplateElement[]; - expressions: Expression[]; -} - -export interface YieldExpression extends Node { - type: "YieldExpression"; - argument: Expression; - delegate: boolean; -} - -export interface AnyTypeAnnotation extends Node { - type: "AnyTypeAnnotation"; -} - -export interface ArrayTypeAnnotation extends Node { - type: "ArrayTypeAnnotation"; - elementType: FlowTypeAnnotation; -} - -export interface BooleanTypeAnnotation extends Node { - type: "BooleanTypeAnnotation"; -} - -export interface BooleanLiteralTypeAnnotation extends Node { - type: "BooleanLiteralTypeAnnotation"; -} - -export interface NullLiteralTypeAnnotation extends Node { - type: "NullLiteralTypeAnnotation"; -} - -export interface ClassImplements extends Node { - type: "ClassImplements"; - id: Identifier; - typeParameters: TypeParameterInstantiation; -} - -export interface ClassProperty extends Node { - type: "ClassProperty"; - key: Identifier; - value: Expression; - decorators?: Decorator[]; - typeAnnotation?: TypeAnnotation; -} - -export interface DeclareClass extends Node { - type: "DeclareClass"; - id: Identifier; - typeParameters: TypeParameterDeclaration; - extends: InterfaceExtends[]; - body: ObjectTypeAnnotation; -} - -export interface DeclareFunction extends Node { - type: "DeclareFunction"; - id: Identifier; -} - -export interface DeclareInterface extends Node { - type: "DeclareInterface"; - id: Identifier; - typeParameters: TypeParameterDeclaration; - extends: InterfaceExtends[]; - body: ObjectTypeAnnotation; -} - -export interface DeclareModule extends Node { - type: "DeclareModule"; - id: StringLiteral | Identifier; - body: BlockStatement; -} - -export interface DeclareTypeAlias extends Node { - type: "DeclareTypeAlias"; - id: Identifier; - typeParameters: TypeParameterDeclaration; - right: FlowTypeAnnotation; -} - -export interface DeclareVariable extends Node { - type: "DeclareVariable"; - id: Identifier; -} - -export interface ExistentialTypeParam extends Node { - type: "ExistentialTypeParam"; -} - -export interface FunctionTypeAnnotation extends Node { - type: "FunctionTypeAnnotation"; - typeParameters: TypeParameterDeclaration; - params: FunctionTypeParam[]; - rest: FunctionTypeParam; - returnType: FlowTypeAnnotation; -} - -export interface FunctionTypeParam extends Node { - type: "FunctionTypeParam"; - name: Identifier; - typeAnnotation: FlowTypeAnnotation; -} - -export interface GenericTypeAnnotation extends Node { - type: "GenericTypeAnnotation"; - id: Identifier; - typeParameters: TypeParameterInstantiation; -} - -export interface InterfaceExtends extends Node { - type: "InterfaceExtends"; - id: Identifier; - typeParameters: TypeParameterInstantiation; -} - -export interface InterfaceDeclaration extends Node { - type: "InterfaceDeclaration"; - id: Identifier; - typeParameters: TypeParameterDeclaration; - extends: InterfaceExtends[]; - mixins?: any[]; - body: ObjectTypeAnnotation; -} - -export interface IntersectionTypeAnnotation extends Node { - type: "IntersectionTypeAnnotation"; - types: FlowTypeAnnotation[]; -} - -export interface MixedTypeAnnotation extends Node { - type: "MixedTypeAnnotation"; -} - -export interface NullableTypeAnnotation extends Node { - type: "NullableTypeAnnotation"; - typeAnnotation: FlowTypeAnnotation; -} - -export interface NumericLiteralTypeAnnotation extends Node { - type: "NumericLiteralTypeAnnotation"; -} - -export interface NumberTypeAnnotation extends Node { - type: "NumberTypeAnnotation"; -} - -export interface StringLiteralTypeAnnotation extends Node { - type: "StringLiteralTypeAnnotation"; -} - -export interface StringTypeAnnotation extends Node { - type: "StringTypeAnnotation"; -} - -export interface ThisTypeAnnotation extends Node { - type: "ThisTypeAnnotation"; -} - -export interface TupleTypeAnnotation extends Node { - type: "TupleTypeAnnotation"; - types: FlowTypeAnnotation[]; -} - -export interface TypeofTypeAnnotation extends Node { - type: "TypeofTypeAnnotation"; - argument: FlowTypeAnnotation; -} - -export interface TypeAlias extends Node { - type: "TypeAlias"; - id: Identifier; - typeParameters: TypeParameterDeclaration; - right: FlowTypeAnnotation; -} - -export interface TypeAnnotation extends Node { - type: "TypeAnnotation"; - typeAnnotation: FlowTypeAnnotation; -} - -export interface TypeCastExpression extends Node { - type: "TypeCastExpression"; - expression: Expression; - typeAnnotation: FlowTypeAnnotation; -} - -export interface TypeParameterDeclaration extends Node { - type: "TypeParameterDeclaration"; - params: Identifier[]; -} - -export interface TypeParameterInstantiation extends Node { - type: "TypeParameterInstantiation"; - params: FlowTypeAnnotation[]; -} - -export interface ObjectTypeAnnotation extends Node { - type: "ObjectTypeAnnotation"; - properties: ObjectTypeProperty[]; - indexers: ObjectTypeIndexer[]; - callProperties: ObjectTypeCallProperty[]; -} - -export interface ObjectTypeCallProperty extends Node { - type: "ObjectTypeCallProperty"; - value: FlowTypeAnnotation; -} - -export interface ObjectTypeIndexer extends Node { - type: "ObjectTypeIndexer"; - id: Expression; - key: FlowTypeAnnotation; - value: FlowTypeAnnotation; -} - -export interface ObjectTypeProperty extends Node { - type: "ObjectTypeProperty"; - key: Expression; - value: FlowTypeAnnotation; -} - -export interface QualifiedTypeIdentifier extends Node { - type: "QualifiedTypeIdentifier"; - id: Identifier; - qualification: Identifier | QualifiedTypeIdentifier; -} - -export interface UnionTypeAnnotation extends Node { - type: "UnionTypeAnnotation"; - types: FlowTypeAnnotation[]; -} - -export interface VoidTypeAnnotation extends Node { - type: "VoidTypeAnnotation"; -} - -export interface JSXAttribute extends Node { - type: "JSXAttribute"; - name: JSXIdentifier | JSXNamespacedName; - value: JSXElement | StringLiteral | JSXExpressionContainer; -} - -export interface JSXClosingElement extends Node { - type: "JSXClosingElement"; - name: JSXIdentifier | JSXMemberExpression; -} - -export interface JSXElement extends Node { - type: "JSXElement"; - openingElement: JSXOpeningElement; - closingElement: JSXClosingElement; - children: Array; - selfClosing?: boolean; -} - -export interface JSXEmptyExpression extends Node { - type: "JSXEmptyExpression"; -} - -export interface JSXExpressionContainer extends Node { - type: "JSXExpressionContainer"; - expression: Expression; -} - -export interface JSXIdentifier extends Node { - type: "JSXIdentifier"; - name: string; -} - -export interface JSXMemberExpression extends Node { - type: "JSXMemberExpression"; - object: JSXMemberExpression | JSXIdentifier; - property: JSXIdentifier; -} - -export interface JSXNamespacedName extends Node { - type: "JSXNamespacedName"; - namespace: JSXIdentifier; - name: JSXIdentifier; -} - -export interface JSXOpeningElement extends Node { - type: "JSXOpeningElement"; - name: JSXIdentifier | JSXMemberExpression; - selfClosing: boolean; - attributes: JSXAttribute[]; -} - -export interface JSXSpreadAttribute extends Node { - type: "JSXSpreadAttribute"; - argument: Expression; -} - -export interface JSXText extends Node { - type: "JSXText"; - value: string; -} - -export interface Noop extends Node { - type: "Noop"; -} - -export interface ParenthesizedExpression extends Node { - type: "ParenthesizedExpression"; - expression: Expression; -} - -export interface AwaitExpression extends Node { - type: "AwaitExpression"; - argument: Expression; -} - -export interface BindExpression extends Node { - type: "BindExpression"; - object: Expression; - callee: Expression; -} - -export interface Decorator extends Node { - type: "Decorator"; - expression: Expression; -} - -export interface DoExpression extends Node { - type: "DoExpression"; - body: BlockStatement; -} - -export interface ExportDefaultSpecifier extends Node { - type: "ExportDefaultSpecifier"; - exported: Identifier; -} - -export interface ExportNamespaceSpecifier extends Node { - type: "ExportNamespaceSpecifier"; - exported: Identifier; -} - -export interface RestProperty extends Node { - type: "RestProperty"; - argument: LVal; -} - -export interface SpreadProperty extends Node { - type: "SpreadProperty"; - argument: Expression; -} - -export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | BooleanLiteral | NullLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | TypeCastExpression | JSXElement | JSXEmptyExpression | JSXIdentifier | JSXMemberExpression | ParenthesizedExpression | AwaitExpression | BindExpression | DoExpression; -export type Binary = BinaryExpression | LogicalExpression; -export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassDeclaration | ClassExpression | ForOfStatement | ClassMethod; -export type BlockParent = BlockStatement | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod; -export type Block = BlockStatement | Program; -export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareTypeAlias | DeclareVariable | InterfaceDeclaration | TypeAlias; -export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression; -export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement; -export type Conditional = ConditionalExpression | IfStatement; -export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement; -export type While = DoWhileStatement | WhileStatement; -export type ExpressionWrapper = ExpressionStatement | TypeCastExpression | ParenthesizedExpression; -export type For = ForInStatement | ForStatement | ForOfStatement; -export type ForXStatement = ForInStatement | ForOfStatement; -export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod; -export type FunctionParent = FunctionDeclaration | FunctionExpression | Program | ObjectMethod | ArrowFunctionExpression | ClassMethod; -export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | BooleanLiteral | NullLiteral | ArrowFunctionExpression | ClassDeclaration | ClassExpression; -export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareTypeAlias | DeclareVariable | InterfaceDeclaration | TypeAlias; -export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern; -export type Literal = StringLiteral | NumericLiteral | BooleanLiteral | NullLiteral | RegExpLiteral | TemplateLiteral; -export type Immutable = StringLiteral | NumericLiteral | BooleanLiteral | NullLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXOpeningElement; -export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty; -export type Method = ObjectMethod | ClassMethod; -export type ObjectMember = ObjectMethod | ObjectProperty; -export type Property = ObjectProperty | ClassProperty; -export type UnaryLike = UnaryExpression | SpreadElement | RestProperty | SpreadProperty; -export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern; -export type Class = ClassDeclaration | ClassExpression; -export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration; -export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; -export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier; -export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | ClassImplements | ClassProperty | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareTypeAlias | DeclareVariable | ExistentialTypeParam | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InterfaceExtends | InterfaceDeclaration | IntersectionTypeAnnotation | MixedTypeAnnotation | NullableTypeAnnotation | NumericLiteralTypeAnnotation | NumberTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameterDeclaration | TypeParameterInstantiation | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | QualifiedTypeIdentifier | UnionTypeAnnotation | VoidTypeAnnotation; -export type FlowTypeAnnotation = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | NullableTypeAnnotation | NumericLiteralTypeAnnotation | NumberTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAnnotation | ObjectTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation; -export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | MixedTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation; -export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareTypeAlias | DeclareVariable | InterfaceDeclaration | TypeAlias; -export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText; - -export function arrayExpression(elements?: Array): ArrayExpression; -export function assignmentExpression(operator?: string, left?: LVal, right?: Expression): AssignmentExpression; -export function binaryExpression(operator?: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left?: Expression, right?: Expression): BinaryExpression; -export function directive(value?: DirectiveLiteral): Directive; -export function directiveLiteral(value?: string): DirectiveLiteral; -export function blockStatement(body?: Statement[], directives?: Directive[]): BlockStatement; -export function breakStatement(label?: Identifier): BreakStatement; -export function callExpression(callee?: Expression, _arguments?: Array): CallExpression; -export function catchClause(param?: Identifier, body?: BlockStatement): CatchClause; -export function conditionalExpression(test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression; -export function continueStatement(label?: Identifier): ContinueStatement; -export function debuggerStatement(): DebuggerStatement; -export function doWhileStatement(test?: Expression, body?: Statement): DoWhileStatement; -export function emptyStatement(): EmptyStatement; -export function expressionStatement(expression?: Expression): ExpressionStatement; -export function file(program?: Program, comments?: Comment[], tokens?: any[]): File; -export function forInStatement(left?: VariableDeclaration | LVal, right?: Expression, body?: Statement): ForInStatement; -export function forStatement(init?: VariableDeclaration | Expression, test?: Expression, update?: Expression, body?: Statement): ForStatement; -export function functionDeclaration(id?: Identifier, params?: Array, body?: BlockStatement, generator?: boolean, async?: boolean): FunctionDeclaration; -export function functionExpression(id?: Identifier, params?: Array, body?: BlockStatement, generator?: boolean, async?: boolean): FunctionExpression; -export function identifier(name?: string): Identifier; -export function ifStatement(test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement; -export function labeledStatement(label?: Identifier, body?: Statement): LabeledStatement; -export function stringLiteral(value?: string): StringLiteral; -export function numericLiteral(value?: number): NumericLiteral; -export function nullLiteral(): NullLiteral; -export function booleanLiteral(value?: boolean): BooleanLiteral; -export function regExpLiteral(pattern?: string, flags?: string): RegExpLiteral; -export function logicalExpression(operator?: "||" | "&&", left?: Expression, right?: Expression): LogicalExpression; -export function memberExpression(object?: Expression | Super, property?: Expression, computed?: boolean): MemberExpression; -export function newExpression(callee?: Expression | Super, _arguments?: Array): NewExpression; -export function program(body?: Array, directives?: Directive[]): Program; -export function objectExpression(properties?: Array): ObjectExpression; -export function objectMethod(kind?: "get" | "set" | "method", key?: Expression, params?: Array, body?: BlockStatement, computed?: boolean): ObjectMethod; -export function objectProperty(key?: Expression, value?: Expression, computed?: boolean, shorthand?: boolean, decorators?: Decorator[]): ObjectProperty; -export function restElement(argument?: LVal, typeAnnotation?: TypeAnnotation): RestElement; -export function returnStatement(argument?: Expression): ReturnStatement; -export function sequenceExpression(expressions?: Expression[]): SequenceExpression; -export function switchCase(test?: Expression, consequent?: Statement[]): SwitchCase; -export function switchStatement(discriminant?: Expression, cases?: SwitchCase[]): SwitchStatement; -export function thisExpression(): ThisExpression; -export function throwStatement(argument?: Expression): ThrowStatement; -export function tryStatement(block?: BlockStatement, handler?: CatchClause, finalizer?: BlockStatement): TryStatement; -export function unaryExpression(operator?: "void" | "delete" | "!" | "+" | "-" | "++" | "--" | "~" | "typeof", argument?: Expression, prefix?: boolean): UnaryExpression; -export function updateExpression(operator?: "++" | "--", argument?: Expression, prefix?: boolean): UpdateExpression; -export function variableDeclaration(kind?: "var" | "let" | "const", declarations?: VariableDeclarator[]): VariableDeclaration; -export function variableDeclarator(id?: LVal, init?: Expression): VariableDeclarator; -export function whileStatement(test?: Expression, body?: BlockStatement | Statement): WhileStatement; -export function withStatement(object?: Expression, body?: BlockStatement | Statement): WithStatement; -export function assignmentPattern(left?: Identifier, right?: Expression): AssignmentPattern; -export function arrayPattern(elements?: Array, typeAnnotation?: TypeAnnotation): ArrayPattern; -export function arrowFunctionExpression(params?: Array, body?: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression; -export function classBody(body?: Array): ClassBody; -export function classDeclaration(id?: Identifier, superClass?: Expression, body?: ClassBody, decorators?: Decorator[]): ClassDeclaration; -export function classExpression(id?: Identifier, superClass?: Expression, body?: ClassBody, decorators?: Decorator[]): ClassExpression; -export function exportAllDeclaration(source?: StringLiteral): ExportAllDeclaration; -export function exportDefaultDeclaration(declaration?: FunctionDeclaration | ClassDeclaration | Expression): ExportDefaultDeclaration; -export function exportNamedDeclaration(declaration?: Declaration, specifiers?: ExportSpecifier[], source?: StringLiteral): ExportNamedDeclaration; -export function exportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier; -export function forOfStatement(left?: VariableDeclaration | LVal, right?: Expression, body?: Statement): ForOfStatement; -export function importDeclaration(specifiers?: Array, source?: StringLiteral): ImportDeclaration; -export function importDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier; -export function importNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier; -export function importSpecifier(local?: Identifier, imported?: Identifier): ImportSpecifier; -export function metaProperty(meta?: string, property?: string): MetaProperty; -export function classMethod(kind?: "constructor" | "method" | "get" | "set", key?: Expression, params?: Array, body?: BlockStatement, computed?: boolean, _static?: boolean): ClassMethod; -export function objectPattern(properties?: Array, typeAnnotation?: TypeAnnotation): ObjectPattern; -export function spreadElement(argument?: Expression): SpreadElement; -export function taggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral): TaggedTemplateExpression; -export function templateElement(value?: {cooked?: string; raw?: string;}, tail?: boolean): TemplateElement; -export function templateLiteral(quasis?: TemplateElement[], expressions?: Expression[]): TemplateLiteral; -export function yieldExpression(argument?: Expression, delegate?: boolean): YieldExpression; -export function anyTypeAnnotation(): AnyTypeAnnotation; -export function arrayTypeAnnotation(elementType?: FlowTypeAnnotation): ArrayTypeAnnotation; -export function booleanTypeAnnotation(): BooleanTypeAnnotation; -export function booleanLiteralTypeAnnotation(): BooleanLiteralTypeAnnotation; -export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation; -export function classImplements(id?: Identifier, typeParameters?: TypeParameterInstantiation): ClassImplements; -export function classProperty(key?: Identifier, value?: Expression, typeAnnotation?: TypeAnnotation, decorators?: Decorator[]): ClassProperty; -export function declareClass(id?: Identifier, typeParameters?: TypeParameterDeclaration, _extends?: InterfaceExtends[], body?: ObjectTypeAnnotation): DeclareClass; -export function declareFunction(id?: Identifier): DeclareFunction; -export function declareInterface(id?: Identifier, typeParameters?: TypeParameterDeclaration, _extends?: InterfaceExtends[], body?: ObjectTypeAnnotation): DeclareInterface; -export function declareModule(id?: StringLiteral | Identifier, body?: BlockStatement): DeclareModule; -export function declareTypeAlias(id?: Identifier, typeParameters?: TypeParameterDeclaration, right?: FlowTypeAnnotation): DeclareTypeAlias; -export function declareVariable(id?: Identifier): DeclareVariable; -export function existentialTypeParam(): ExistentialTypeParam; -export function functionTypeAnnotation(typeParameters?: TypeParameterDeclaration, params?: FunctionTypeParam[], rest?: FunctionTypeParam, returnType?: FlowTypeAnnotation): FunctionTypeAnnotation; -export function functionTypeParam(name?: Identifier, typeAnnotation?: FlowTypeAnnotation): FunctionTypeParam; -export function genericTypeAnnotation(id?: Identifier, typeParameters?: TypeParameterInstantiation): GenericTypeAnnotation; -export function interfaceExtends(id?: Identifier, typeParameters?: TypeParameterInstantiation): InterfaceExtends; -export function interfaceDeclaration(id?: Identifier, typeParameters?: TypeParameterDeclaration, _extends?: InterfaceExtends[], body?: ObjectTypeAnnotation): InterfaceDeclaration; -export function intersectionTypeAnnotation(types?: FlowTypeAnnotation[]): IntersectionTypeAnnotation; -export function mixedTypeAnnotation(): MixedTypeAnnotation; -export function nullableTypeAnnotation(typeAnnotation?: FlowTypeAnnotation): NullableTypeAnnotation; -export function numericLiteralTypeAnnotation(): NumericLiteralTypeAnnotation; -export function numberTypeAnnotation(): NumberTypeAnnotation; -export function stringLiteralTypeAnnotation(): StringLiteralTypeAnnotation; -export function stringTypeAnnotation(): StringTypeAnnotation; -export function thisTypeAnnotation(): ThisTypeAnnotation; -export function tupleTypeAnnotation(types?: FlowTypeAnnotation[]): TupleTypeAnnotation; -export function typeofTypeAnnotation(argument?: FlowTypeAnnotation): TypeofTypeAnnotation; -export function typeAlias(id?: Identifier, typeParameters?: TypeParameterDeclaration, right?: FlowTypeAnnotation): TypeAlias; -export function typeAnnotation(typeAnnotation?: FlowTypeAnnotation): TypeAnnotation; -export function typeCastExpression(expression?: Expression, typeAnnotation?: FlowTypeAnnotation): TypeCastExpression; -export function typeParameterDeclaration(params?: Identifier[]): TypeParameterDeclaration; -export function typeParameterInstantiation(params?: FlowTypeAnnotation[]): TypeParameterInstantiation; -export function objectTypeAnnotation(properties?: ObjectTypeProperty[], indexers?: ObjectTypeIndexer[], callProperties?: ObjectTypeCallProperty[]): ObjectTypeAnnotation; -export function objectTypeCallProperty(value?: FlowTypeAnnotation): ObjectTypeCallProperty; -export function objectTypeIndexer(id?: Expression, key?: FlowTypeAnnotation, value?: FlowTypeAnnotation): ObjectTypeIndexer; -export function objectTypeProperty(key?: Expression, value?: FlowTypeAnnotation): ObjectTypeProperty; -export function qualifiedTypeIdentifier(id?: Identifier, qualification?: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier; -export function unionTypeAnnotation(types?: FlowTypeAnnotation[]): UnionTypeAnnotation; -export function voidTypeAnnotation(): VoidTypeAnnotation; -export function jSXAttribute(name?: JSXIdentifier | JSXNamespacedName, value?: JSXElement | StringLiteral | JSXExpressionContainer): JSXAttribute; -export function jSXClosingElement(name?: JSXIdentifier | JSXMemberExpression): JSXClosingElement; -export function jSXElement(openingElement?: JSXOpeningElement, closingElement?: JSXClosingElement, children?: Array, selfClosing?: boolean): JSXElement; -export function jSXEmptyExpression(): JSXEmptyExpression; -export function jSXExpressionContainer(expression?: Expression): JSXExpressionContainer; -export function jSXIdentifier(name?: string): JSXIdentifier; -export function jSXMemberExpression(object?: JSXMemberExpression | JSXIdentifier, property?: JSXIdentifier): JSXMemberExpression; -export function jSXNamespacedName(namespace?: JSXIdentifier, name?: JSXIdentifier): JSXNamespacedName; -export function jSXOpeningElement(name?: JSXIdentifier | JSXMemberExpression, attributes?: JSXAttribute[], selfClosing?: boolean): JSXOpeningElement; -export function jSXSpreadAttribute(argument?: Expression): JSXSpreadAttribute; -export function jSXText(value?: string): JSXText; -export function noop(): Noop; -export function parenthesizedExpression(expression?: Expression): ParenthesizedExpression; -export function awaitExpression(argument?: Expression): AwaitExpression; -export function bindExpression(object?: Expression, callee?: Expression): BindExpression; -export function decorator(expression?: Expression): Decorator; -export function doExpression(body?: BlockStatement): DoExpression; -export function exportDefaultSpecifier(exported?: Identifier): ExportDefaultSpecifier; -export function exportNamespaceSpecifier(exported?: Identifier): ExportNamespaceSpecifier; -export function restProperty(argument?: LVal): RestProperty; -export function spreadProperty(argument?: Expression): SpreadProperty; - -export function isArrayExpression(node: Object, opts?: Object): node is ArrayExpression; -export function isAssignmentExpression(node: Object, opts?: Object): node is AssignmentExpression; -export function isBinaryExpression(node: Object, opts?: Object): node is BinaryExpression; -export function isDirective(node: Object, opts?: Object): node is Directive; -export function isDirectiveLiteral(node: Object, opts?: Object): node is DirectiveLiteral; -export function isBlockStatement(node: Object, opts?: Object): node is BlockStatement; -export function isBreakStatement(node: Object, opts?: Object): node is BreakStatement; -export function isCallExpression(node: Object, opts?: Object): node is CallExpression; -export function isCatchClause(node: Object, opts?: Object): node is CatchClause; -export function isConditionalExpression(node: Object, opts?: Object): node is ConditionalExpression; -export function isContinueStatement(node: Object, opts?: Object): node is ContinueStatement; -export function isDebuggerStatement(node: Object, opts?: Object): node is DebuggerStatement; -export function isDoWhileStatement(node: Object, opts?: Object): node is DoWhileStatement; -export function isEmptyStatement(node: Object, opts?: Object): node is EmptyStatement; -export function isExpressionStatement(node: Object, opts?: Object): node is ExpressionStatement; -export function isFile(node: Object, opts?: Object): node is File; -export function isForInStatement(node: Object, opts?: Object): node is ForInStatement; -export function isForStatement(node: Object, opts?: Object): node is ForStatement; -export function isFunctionDeclaration(node: Object, opts?: Object): node is FunctionDeclaration; -export function isFunctionExpression(node: Object, opts?: Object): node is FunctionExpression; -export function isIdentifier(node: Object, opts?: Object): node is Identifier; -export function isIfStatement(node: Object, opts?: Object): node is IfStatement; -export function isLabeledStatement(node: Object, opts?: Object): node is LabeledStatement; -export function isStringLiteral(node: Object, opts?: Object): node is StringLiteral; -export function isNumericLiteral(node: Object, opts?: Object): node is NumericLiteral; -export function isNullLiteral(node: Object, opts?: Object): node is NullLiteral; -export function isBooleanLiteral(node: Object, opts?: Object): node is BooleanLiteral; -export function isRegExpLiteral(node: Object, opts?: Object): node is RegExpLiteral; -export function isLogicalExpression(node: Object, opts?: Object): node is LogicalExpression; -export function isMemberExpression(node: Object, opts?: Object): node is MemberExpression; -export function isNewExpression(node: Object, opts?: Object): node is NewExpression; -export function isProgram(node: Object, opts?: Object): node is Program; -export function isObjectExpression(node: Object, opts?: Object): node is ObjectExpression; -export function isObjectMethod(node: Object, opts?: Object): node is ObjectMethod; -export function isObjectProperty(node: Object, opts?: Object): node is ObjectProperty; -export function isRestElement(node: Object, opts?: Object): node is RestElement; -export function isReturnStatement(node: Object, opts?: Object): node is ReturnStatement; -export function isSequenceExpression(node: Object, opts?: Object): node is SequenceExpression; -export function isSwitchCase(node: Object, opts?: Object): node is SwitchCase; -export function isSwitchStatement(node: Object, opts?: Object): node is SwitchStatement; -export function isThisExpression(node: Object, opts?: Object): node is ThisExpression; -export function isThrowStatement(node: Object, opts?: Object): node is ThrowStatement; -export function isTryStatement(node: Object, opts?: Object): node is TryStatement; -export function isUnaryExpression(node: Object, opts?: Object): node is UnaryExpression; -export function isUpdateExpression(node: Object, opts?: Object): node is UpdateExpression; -export function isVariableDeclaration(node: Object, opts?: Object): node is VariableDeclaration; -export function isVariableDeclarator(node: Object, opts?: Object): node is VariableDeclarator; -export function isWhileStatement(node: Object, opts?: Object): node is WhileStatement; -export function isWithStatement(node: Object, opts?: Object): node is WithStatement; -export function isAssignmentPattern(node: Object, opts?: Object): node is AssignmentPattern; -export function isArrayPattern(node: Object, opts?: Object): node is ArrayPattern; -export function isArrowFunctionExpression(node: Object, opts?: Object): node is ArrowFunctionExpression; -export function isClassBody(node: Object, opts?: Object): node is ClassBody; -export function isClassDeclaration(node: Object, opts?: Object): node is ClassDeclaration; -export function isClassExpression(node: Object, opts?: Object): node is ClassExpression; -export function isExportAllDeclaration(node: Object, opts?: Object): node is ExportAllDeclaration; -export function isExportDefaultDeclaration(node: Object, opts?: Object): node is ExportDefaultDeclaration; -export function isExportNamedDeclaration(node: Object, opts?: Object): node is ExportNamedDeclaration; -export function isExportSpecifier(node: Object, opts?: Object): node is ExportSpecifier; -export function isForOfStatement(node: Object, opts?: Object): node is ForOfStatement; -export function isImportDeclaration(node: Object, opts?: Object): node is ImportDeclaration; -export function isImportDefaultSpecifier(node: Object, opts?: Object): node is ImportDefaultSpecifier; -export function isImportNamespaceSpecifier(node: Object, opts?: Object): node is ImportNamespaceSpecifier; -export function isImportSpecifier(node: Object, opts?: Object): node is ImportSpecifier; -export function isMetaProperty(node: Object, opts?: Object): node is MetaProperty; -export function isClassMethod(node: Object, opts?: Object): node is ClassMethod; -export function isObjectPattern(node: Object, opts?: Object): node is ObjectPattern; -export function isSpreadElement(node: Object, opts?: Object): node is SpreadElement; -export function isSuper(node: Object, opts?: Object): node is Super; -export function isTaggedTemplateExpression(node: Object, opts?: Object): node is TaggedTemplateExpression; -export function isTemplateElement(node: Object, opts?: Object): node is TemplateElement; -export function isTemplateLiteral(node: Object, opts?: Object): node is TemplateLiteral; -export function isYieldExpression(node: Object, opts?: Object): node is YieldExpression; -export function isAnyTypeAnnotation(node: Object, opts?: Object): node is AnyTypeAnnotation; -export function isArrayTypeAnnotation(node: Object, opts?: Object): node is ArrayTypeAnnotation; -export function isBooleanTypeAnnotation(node: Object, opts?: Object): node is BooleanTypeAnnotation; -export function isBooleanLiteralTypeAnnotation(node: Object, opts?: Object): node is BooleanLiteralTypeAnnotation; -export function isNullLiteralTypeAnnotation(node: Object, opts?: Object): node is NullLiteralTypeAnnotation; -export function isClassImplements(node: Object, opts?: Object): node is ClassImplements; -export function isClassProperty(node: Object, opts?: Object): node is ClassProperty; -export function isDeclareClass(node: Object, opts?: Object): node is DeclareClass; -export function isDeclareFunction(node: Object, opts?: Object): node is DeclareFunction; -export function isDeclareInterface(node: Object, opts?: Object): node is DeclareInterface; -export function isDeclareModule(node: Object, opts?: Object): node is DeclareModule; -export function isDeclareTypeAlias(node: Object, opts?: Object): node is DeclareTypeAlias; -export function isDeclareVariable(node: Object, opts?: Object): node is DeclareVariable; -export function isExistentialTypeParam(node: Object, opts?: Object): node is ExistentialTypeParam; -export function isFunctionTypeAnnotation(node: Object, opts?: Object): node is FunctionTypeAnnotation; -export function isFunctionTypeParam(node: Object, opts?: Object): node is FunctionTypeParam; -export function isGenericTypeAnnotation(node: Object, opts?: Object): node is GenericTypeAnnotation; -export function isInterfaceExtends(node: Object, opts?: Object): node is InterfaceExtends; -export function isInterfaceDeclaration(node: Object, opts?: Object): node is InterfaceDeclaration; -export function isIntersectionTypeAnnotation(node: Object, opts?: Object): node is IntersectionTypeAnnotation; -export function isMixedTypeAnnotation(node: Object, opts?: Object): node is MixedTypeAnnotation; -export function isNullableTypeAnnotation(node: Object, opts?: Object): node is NullableTypeAnnotation; -export function isNumericLiteralTypeAnnotation(node: Object, opts?: Object): node is NumericLiteralTypeAnnotation; -export function isNumberTypeAnnotation(node: Object, opts?: Object): node is NumberTypeAnnotation; -export function isStringLiteralTypeAnnotation(node: Object, opts?: Object): node is StringLiteralTypeAnnotation; -export function isStringTypeAnnotation(node: Object, opts?: Object): node is StringTypeAnnotation; -export function isThisTypeAnnotation(node: Object, opts?: Object): node is ThisTypeAnnotation; -export function isTupleTypeAnnotation(node: Object, opts?: Object): node is TupleTypeAnnotation; -export function isTypeofTypeAnnotation(node: Object, opts?: Object): node is TypeofTypeAnnotation; -export function isTypeAlias(node: Object, opts?: Object): node is TypeAlias; -export function isTypeAnnotation(node: Object, opts?: Object): node is TypeAnnotation; -export function isTypeCastExpression(node: Object, opts?: Object): node is TypeCastExpression; -export function isTypeParameterDeclaration(node: Object, opts?: Object): node is TypeParameterDeclaration; -export function isTypeParameterInstantiation(node: Object, opts?: Object): node is TypeParameterInstantiation; -export function isObjectTypeAnnotation(node: Object, opts?: Object): node is ObjectTypeAnnotation; -export function isObjectTypeCallProperty(node: Object, opts?: Object): node is ObjectTypeCallProperty; -export function isObjectTypeIndexer(node: Object, opts?: Object): node is ObjectTypeIndexer; -export function isObjectTypeProperty(node: Object, opts?: Object): node is ObjectTypeProperty; -export function isQualifiedTypeIdentifier(node: Object, opts?: Object): node is QualifiedTypeIdentifier; -export function isUnionTypeAnnotation(node: Object, opts?: Object): node is UnionTypeAnnotation; -export function isVoidTypeAnnotation(node: Object, opts?: Object): node is VoidTypeAnnotation; -export function isJSXAttribute(node: Object, opts?: Object): node is JSXAttribute; -export function isJSXClosingElement(node: Object, opts?: Object): node is JSXClosingElement; -export function isJSXElement(node: Object, opts?: Object): node is JSXElement; -export function isJSXEmptyExpression(node: Object, opts?: Object): node is JSXEmptyExpression; -export function isJSXExpressionContainer(node: Object, opts?: Object): node is JSXExpressionContainer; -export function isJSXIdentifier(node: Object, opts?: Object): node is JSXIdentifier; -export function isJSXMemberExpression(node: Object, opts?: Object): node is JSXMemberExpression; -export function isJSXNamespacedName(node: Object, opts?: Object): node is JSXNamespacedName; -export function isJSXOpeningElement(node: Object, opts?: Object): node is JSXOpeningElement; -export function isJSXSpreadAttribute(node: Object, opts?: Object): node is JSXSpreadAttribute; -export function isJSXText(node: Object, opts?: Object): node is JSXText; -export function isNoop(node: Object, opts?: Object): node is Noop; -export function isParenthesizedExpression(node: Object, opts?: Object): node is ParenthesizedExpression; -export function isAwaitExpression(node: Object, opts?: Object): node is AwaitExpression; -export function isBindExpression(node: Object, opts?: Object): node is BindExpression; -export function isDecorator(node: Object, opts?: Object): node is Decorator; -export function isDoExpression(node: Object, opts?: Object): node is DoExpression; -export function isExportDefaultSpecifier(node: Object, opts?: Object): node is ExportDefaultSpecifier; -export function isExportNamespaceSpecifier(node: Object, opts?: Object): node is ExportNamespaceSpecifier; -export function isRestProperty(node: Object, opts?: Object): node is RestProperty; -export function isSpreadProperty(node: Object, opts?: Object): node is SpreadProperty; -export function isExpression(node: Object, opts?: Object): node is Expression; -export function isBinary(node: Object, opts?: Object): node is Binary; -export function isScopable(node: Object, opts?: Object): node is Scopable; -export function isBlockParent(node: Object, opts?: Object): node is BlockParent; -export function isBlock(node: Object, opts?: Object): node is Block; -export function isStatement(node: Object, opts?: Object): node is Statement; -export function isTerminatorless(node: Object, opts?: Object): node is Terminatorless; -export function isCompletionStatement(node: Object, opts?: Object): node is CompletionStatement; -export function isConditional(node: Object, opts?: Object): node is Conditional; -export function isLoop(node: Object, opts?: Object): node is Loop; -export function isWhile(node: Object, opts?: Object): node is While; -export function isExpressionWrapper(node: Object, opts?: Object): node is ExpressionWrapper; -export function isFor(node: Object, opts?: Object): node is For; -export function isForXStatement(node: Object, opts?: Object): node is ForXStatement; -export function isFunction(node: Object, opts?: Object): node is Function; -export function isFunctionParent(node: Object, opts?: Object): node is FunctionParent; -export function isPureish(node: Object, opts?: Object): node is Pureish; -export function isDeclaration(node: Object, opts?: Object): node is Declaration; -export function isLVal(node: Object, opts?: Object): node is LVal; -export function isLiteral(node: Object, opts?: Object): node is Literal; -export function isImmutable(node: Object, opts?: Object): node is Immutable; -export function isUserWhitespacable(node: Object, opts?: Object): node is UserWhitespacable; -export function isMethod(node: Object, opts?: Object): node is Method; -export function isObjectMember(node: Object, opts?: Object): node is ObjectMember; -export function isProperty(node: Object, opts?: Object): node is Property; -export function isUnaryLike(node: Object, opts?: Object): node is UnaryLike; -export function isPattern(node: Object, opts?: Object): node is Pattern; -export function isClass(node: Object, opts?: Object): node is Class; -export function isModuleDeclaration(node: Object, opts?: Object): node is ModuleDeclaration; -export function isExportDeclaration(node: Object, opts?: Object): node is ExportDeclaration; -export function isModuleSpecifier(node: Object, opts?: Object): node is ModuleSpecifier; -export function isFlow(node: Object, opts?: Object): node is Flow; -export function isFlowBaseAnnotation(node: Object, opts?: Object): node is FlowBaseAnnotation; -export function isFlowDeclaration(node: Object, opts?: Object): node is FlowDeclaration; -export function isJSX(node: Object, opts?: Object): node is JSX; -export function isNumberLiteral(node: Object, opts?: Object): node is NumericLiteral; -export function isRegexLiteral(node: Object, opts?: Object): node is RegExpLiteral; - -export function isReferencedIdentifier(node: Object, opts?: Object): boolean; -export function isReferencedMemberExpression(node: Object, opts?: Object): boolean; -export function isBindingIdentifier(node: Object, opts?: Object): boolean; -export function isScope(node: Object, opts?: Object): boolean; -export function isReferenced(node: Object, opts?: Object): boolean; -export function isBlockScoped(node: Object, opts?: Object): boolean; -export function isVar(node: Object, opts?: Object): boolean; -export function isUser(node: Object, opts?: Object): boolean; -export function isGenerated(node: Object, opts?: Object): boolean; -export function isPure(node: Object, opts?: Object): boolean; - -export function assertArrayExpression(node: Object, opts?: Object): void; -export function assertAssignmentExpression(node: Object, opts?: Object): void; -export function assertBinaryExpression(node: Object, opts?: Object): void; -export function assertDirective(node: Object, opts?: Object): void; -export function assertDirectiveLiteral(node: Object, opts?: Object): void; -export function assertBlockStatement(node: Object, opts?: Object): void; -export function assertBreakStatement(node: Object, opts?: Object): void; -export function assertCallExpression(node: Object, opts?: Object): void; -export function assertCatchClause(node: Object, opts?: Object): void; -export function assertConditionalExpression(node: Object, opts?: Object): void; -export function assertContinueStatement(node: Object, opts?: Object): void; -export function assertDebuggerStatement(node: Object, opts?: Object): void; -export function assertDoWhileStatement(node: Object, opts?: Object): void; -export function assertEmptyStatement(node: Object, opts?: Object): void; -export function assertExpressionStatement(node: Object, opts?: Object): void; -export function assertFile(node: Object, opts?: Object): void; -export function assertForInStatement(node: Object, opts?: Object): void; -export function assertForStatement(node: Object, opts?: Object): void; -export function assertFunctionDeclaration(node: Object, opts?: Object): void; -export function assertFunctionExpression(node: Object, opts?: Object): void; -export function assertIdentifier(node: Object, opts?: Object): void; -export function assertIfStatement(node: Object, opts?: Object): void; -export function assertLabeledStatement(node: Object, opts?: Object): void; -export function assertStringLiteral(node: Object, opts?: Object): void; -export function assertNumericLiteral(node: Object, opts?: Object): void; -export function assertNullLiteral(node: Object, opts?: Object): void; -export function assertBooleanLiteral(node: Object, opts?: Object): void; -export function assertRegExpLiteral(node: Object, opts?: Object): void; -export function assertLogicalExpression(node: Object, opts?: Object): void; -export function assertMemberExpression(node: Object, opts?: Object): void; -export function assertNewExpression(node: Object, opts?: Object): void; -export function assertProgram(node: Object, opts?: Object): void; -export function assertObjectExpression(node: Object, opts?: Object): void; -export function assertObjectMethod(node: Object, opts?: Object): void; -export function assertObjectProperty(node: Object, opts?: Object): void; -export function assertRestElement(node: Object, opts?: Object): void; -export function assertReturnStatement(node: Object, opts?: Object): void; -export function assertSequenceExpression(node: Object, opts?: Object): void; -export function assertSwitchCase(node: Object, opts?: Object): void; -export function assertSwitchStatement(node: Object, opts?: Object): void; -export function assertThisExpression(node: Object, opts?: Object): void; -export function assertThrowStatement(node: Object, opts?: Object): void; -export function assertTryStatement(node: Object, opts?: Object): void; -export function assertUnaryExpression(node: Object, opts?: Object): void; -export function assertUpdateExpression(node: Object, opts?: Object): void; -export function assertVariableDeclaration(node: Object, opts?: Object): void; -export function assertVariableDeclarator(node: Object, opts?: Object): void; -export function assertWhileStatement(node: Object, opts?: Object): void; -export function assertWithStatement(node: Object, opts?: Object): void; -export function assertAssignmentPattern(node: Object, opts?: Object): void; -export function assertArrayPattern(node: Object, opts?: Object): void; -export function assertArrowFunctionExpression(node: Object, opts?: Object): void; -export function assertClassBody(node: Object, opts?: Object): void; -export function assertClassDeclaration(node: Object, opts?: Object): void; -export function assertClassExpression(node: Object, opts?: Object): void; -export function assertExportAllDeclaration(node: Object, opts?: Object): void; -export function assertExportDefaultDeclaration(node: Object, opts?: Object): void; -export function assertExportNamedDeclaration(node: Object, opts?: Object): void; -export function assertExportSpecifier(node: Object, opts?: Object): void; -export function assertForOfStatement(node: Object, opts?: Object): void; -export function assertImportDeclaration(node: Object, opts?: Object): void; -export function assertImportDefaultSpecifier(node: Object, opts?: Object): void; -export function assertImportNamespaceSpecifier(node: Object, opts?: Object): void; -export function assertImportSpecifier(node: Object, opts?: Object): void; -export function assertMetaProperty(node: Object, opts?: Object): void; -export function assertClassMethod(node: Object, opts?: Object): void; -export function assertObjectPattern(node: Object, opts?: Object): void; -export function assertSpreadElement(node: Object, opts?: Object): void; -export function assertSuper(node: Object, opts?: Object): void; -export function assertTaggedTemplateExpression(node: Object, opts?: Object): void; -export function assertTemplateElement(node: Object, opts?: Object): void; -export function assertTemplateLiteral(node: Object, opts?: Object): void; -export function assertYieldExpression(node: Object, opts?: Object): void; -export function assertAnyTypeAnnotation(node: Object, opts?: Object): void; -export function assertArrayTypeAnnotation(node: Object, opts?: Object): void; -export function assertBooleanTypeAnnotation(node: Object, opts?: Object): void; -export function assertBooleanLiteralTypeAnnotation(node: Object, opts?: Object): void; -export function assertNullLiteralTypeAnnotation(node: Object, opts?: Object): void; -export function assertClassImplements(node: Object, opts?: Object): void; -export function assertClassProperty(node: Object, opts?: Object): void; -export function assertDeclareClass(node: Object, opts?: Object): void; -export function assertDeclareFunction(node: Object, opts?: Object): void; -export function assertDeclareInterface(node: Object, opts?: Object): void; -export function assertDeclareModule(node: Object, opts?: Object): void; -export function assertDeclareTypeAlias(node: Object, opts?: Object): void; -export function assertDeclareVariable(node: Object, opts?: Object): void; -export function assertExistentialTypeParam(node: Object, opts?: Object): void; -export function assertFunctionTypeAnnotation(node: Object, opts?: Object): void; -export function assertFunctionTypeParam(node: Object, opts?: Object): void; -export function assertGenericTypeAnnotation(node: Object, opts?: Object): void; -export function assertInterfaceExtends(node: Object, opts?: Object): void; -export function assertInterfaceDeclaration(node: Object, opts?: Object): void; -export function assertIntersectionTypeAnnotation(node: Object, opts?: Object): void; -export function assertMixedTypeAnnotation(node: Object, opts?: Object): void; -export function assertNullableTypeAnnotation(node: Object, opts?: Object): void; -export function assertNumericLiteralTypeAnnotation(node: Object, opts?: Object): void; -export function assertNumberTypeAnnotation(node: Object, opts?: Object): void; -export function assertStringLiteralTypeAnnotation(node: Object, opts?: Object): void; -export function assertStringTypeAnnotation(node: Object, opts?: Object): void; -export function assertThisTypeAnnotation(node: Object, opts?: Object): void; -export function assertTupleTypeAnnotation(node: Object, opts?: Object): void; -export function assertTypeofTypeAnnotation(node: Object, opts?: Object): void; -export function assertTypeAlias(node: Object, opts?: Object): void; -export function assertTypeAnnotation(node: Object, opts?: Object): void; -export function assertTypeCastExpression(node: Object, opts?: Object): void; -export function assertTypeParameterDeclaration(node: Object, opts?: Object): void; -export function assertTypeParameterInstantiation(node: Object, opts?: Object): void; -export function assertObjectTypeAnnotation(node: Object, opts?: Object): void; -export function assertObjectTypeCallProperty(node: Object, opts?: Object): void; -export function assertObjectTypeIndexer(node: Object, opts?: Object): void; -export function assertObjectTypeProperty(node: Object, opts?: Object): void; -export function assertQualifiedTypeIdentifier(node: Object, opts?: Object): void; -export function assertUnionTypeAnnotation(node: Object, opts?: Object): void; -export function assertVoidTypeAnnotation(node: Object, opts?: Object): void; -export function assertJSXAttribute(node: Object, opts?: Object): void; -export function assertJSXClosingElement(node: Object, opts?: Object): void; -export function assertJSXElement(node: Object, opts?: Object): void; -export function assertJSXEmptyExpression(node: Object, opts?: Object): void; -export function assertJSXExpressionContainer(node: Object, opts?: Object): void; -export function assertJSXIdentifier(node: Object, opts?: Object): void; -export function assertJSXMemberExpression(node: Object, opts?: Object): void; -export function assertJSXNamespacedName(node: Object, opts?: Object): void; -export function assertJSXOpeningElement(node: Object, opts?: Object): void; -export function assertJSXSpreadAttribute(node: Object, opts?: Object): void; -export function assertJSXText(node: Object, opts?: Object): void; -export function assertNoop(node: Object, opts?: Object): void; -export function assertParenthesizedExpression(node: Object, opts?: Object): void; -export function assertAwaitExpression(node: Object, opts?: Object): void; -export function assertBindExpression(node: Object, opts?: Object): void; -export function assertDecorator(node: Object, opts?: Object): void; -export function assertDoExpression(node: Object, opts?: Object): void; -export function assertExportDefaultSpecifier(node: Object, opts?: Object): void; -export function assertExportNamespaceSpecifier(node: Object, opts?: Object): void; -export function assertRestProperty(node: Object, opts?: Object): void; -export function assertSpreadProperty(node: Object, opts?: Object): void; -export function assertExpression(node: Object, opts?: Object): void; -export function assertBinary(node: Object, opts?: Object): void; -export function assertScopable(node: Object, opts?: Object): void; -export function assertBlockParent(node: Object, opts?: Object): void; -export function assertBlock(node: Object, opts?: Object): void; -export function assertStatement(node: Object, opts?: Object): void; -export function assertTerminatorless(node: Object, opts?: Object): void; -export function assertCompletionStatement(node: Object, opts?: Object): void; -export function assertConditional(node: Object, opts?: Object): void; -export function assertLoop(node: Object, opts?: Object): void; -export function assertWhile(node: Object, opts?: Object): void; -export function assertExpressionWrapper(node: Object, opts?: Object): void; -export function assertFor(node: Object, opts?: Object): void; -export function assertForXStatement(node: Object, opts?: Object): void; -export function assertFunction(node: Object, opts?: Object): void; -export function assertFunctionParent(node: Object, opts?: Object): void; -export function assertPureish(node: Object, opts?: Object): void; -export function assertDeclaration(node: Object, opts?: Object): void; -export function assertLVal(node: Object, opts?: Object): void; -export function assertLiteral(node: Object, opts?: Object): void; -export function assertImmutable(node: Object, opts?: Object): void; -export function assertUserWhitespacable(node: Object, opts?: Object): void; -export function assertMethod(node: Object, opts?: Object): void; -export function assertObjectMember(node: Object, opts?: Object): void; -export function assertProperty(node: Object, opts?: Object): void; -export function assertUnaryLike(node: Object, opts?: Object): void; -export function assertPattern(node: Object, opts?: Object): void; -export function assertClass(node: Object, opts?: Object): void; -export function assertModuleDeclaration(node: Object, opts?: Object): void; -export function assertExportDeclaration(node: Object, opts?: Object): void; -export function assertModuleSpecifier(node: Object, opts?: Object): void; -export function assertFlow(node: Object, opts?: Object): void; -export function assertFlowBaseAnnotation(node: Object, opts?: Object): void; -export function assertFlowDeclaration(node: Object, opts?: Object): void; -export function assertJSX(node: Object, opts?: Object): void; -export function assertNumberLiteral(node: Object, opts?: Object): void; -export function assertRegexLiteral(node: Object, opts?: Object): void; - diff --git a/typescript/hello-world/node_modules/@types/babel-types/package.json b/typescript/hello-world/node_modules/@types/babel-types/package.json deleted file mode 100644 index 4ae4dcb..0000000 --- a/typescript/hello-world/node_modules/@types/babel-types/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@types/babel-types", - "version": "6.7.16", - "description": "TypeScript definitions for babel-types", - "license": "MIT", - "contributors": [ - { - "name": "Troy Gerwien", - "url": "https://github.com/yortus" - }, - { - "name": "Sam Baxter", - "url": "https://github.com/baxtersa" - } - ], - "main": "", - "repository": { - "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typesPublisherContentHash": "882d982371195bfece2e446aa4b8d950d30382b15f19a20a9d55360c8e31a134", - "typeScriptVersion": "2.0" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/@types/babylon/LICENSE b/typescript/hello-world/node_modules/@types/babylon/LICENSE deleted file mode 100644 index 4b1ad51..0000000 --- a/typescript/hello-world/node_modules/@types/babylon/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/typescript/hello-world/node_modules/@types/babylon/README.md b/typescript/hello-world/node_modules/@types/babylon/README.md deleted file mode 100644 index 8e80874..0000000 --- a/typescript/hello-world/node_modules/@types/babylon/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/babylon` - -# Summary -This package contains type definitions for babylon (https://github.com/babel/babylon). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babylon - -Additional Details - * Last updated: Thu, 04 May 2017 17:04:37 GMT - * Dependencies: babel-types - * Global values: none - -# Credits -These definitions were written by Troy Gerwien . diff --git a/typescript/hello-world/node_modules/@types/babylon/index.d.ts b/typescript/hello-world/node_modules/@types/babylon/index.d.ts deleted file mode 100644 index 1b3054a..0000000 --- a/typescript/hello-world/node_modules/@types/babylon/index.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -// Type definitions for babylon v6.16.1 -// Project: https://github.com/babel/babylon -// Definitions by: Troy Gerwien -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -import { File, Expression } from 'babel-types'; - -export function parse(code: string, opts?: BabylonOptions): File; - -export function parseExpression(input: string, options?: BabylonOptions): Expression; - -export interface BabylonOptions { - /** - * By default, import and export declarations can only appear at a program's top level. - * Setting this option to true allows them anywhere where a statement is allowed. - */ - allowImportExportEverywhere?: boolean; - - /** - * By default, a return statement at the top level raises an error. Set this to true to accept such code. - */ - allowReturnOutsideFunction?: boolean; - - allowSuperOutsideMethod?: boolean; - - /** - * Indicate the mode the code should be parsed in. Can be either "script" or "module". - */ - sourceType?: 'script' | 'module'; - - /** - * Correlate output AST nodes with their source filename. Useful when - * generating code and source maps from the ASTs of multiple input files. - */ - sourceFilename?: string; - - /** - * Array containing the plugins that you want to enable. - */ - plugins?: PluginName[]; -} - -export type PluginName = - 'estree' | - 'jsx' | - 'flow' | - 'classConstructorCall' | - 'doExpressions' | - 'objectRestSpread' | - 'decorators' | - 'classProperties' | - 'exportExtensions' | - 'asyncGenerators' | - 'functionBind' | - 'functionSent' | - 'dynamicImport'; diff --git a/typescript/hello-world/node_modules/@types/babylon/package.json b/typescript/hello-world/node_modules/@types/babylon/package.json deleted file mode 100644 index c5740f2..0000000 --- a/typescript/hello-world/node_modules/@types/babylon/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@types/babylon", - "version": "6.16.1", - "description": "TypeScript definitions for babylon", - "license": "MIT", - "contributors": [ - { - "name": "Troy Gerwien", - "url": "https://github.com/yortus" - } - ], - "main": "", - "repository": { - "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "dependencies": { - "@types/babel-types": "*" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "c9eef54dabee1a5e4dff8b94821fbf12cfe6ebe2f23f83c9916443841e2eaa56", - "typeScriptVersion": "2.0" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/@types/jest/LICENSE b/typescript/hello-world/node_modules/@types/jest/LICENSE deleted file mode 100644 index 4b1ad51..0000000 --- a/typescript/hello-world/node_modules/@types/jest/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/typescript/hello-world/node_modules/@types/jest/README.md b/typescript/hello-world/node_modules/@types/jest/README.md deleted file mode 100644 index 6030cce..0000000 --- a/typescript/hello-world/node_modules/@types/jest/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/jest` - -# Summary -This package contains type definitions for Jest (http://facebook.github.io/jest/). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest - -Additional Details - * Last updated: Fri, 16 Jun 2017 16:37:51 GMT - * Dependencies: none - * Global values: afterAll, afterEach, beforeAll, beforeEach, describe, expect, fail, fdescribe, fit, it, jasmine, jest, pending, spyOn, test, xdescribe, xit, xtest - -# Credits -These definitions were written by Asana , Ivo Stratev , jwbay , Alexey Svetliakov , Alex Jover Morales . diff --git a/typescript/hello-world/node_modules/@types/jest/index.d.ts b/typescript/hello-world/node_modules/@types/jest/index.d.ts deleted file mode 100644 index 1cb197b..0000000 --- a/typescript/hello-world/node_modules/@types/jest/index.d.ts +++ /dev/null @@ -1,465 +0,0 @@ -// Type definitions for Jest 20.0.4 -// Project: http://facebook.github.io/jest/ -// Definitions by: Asana , Ivo Stratev , jwbay , Alexey Svetliakov , Alex Jover Morales -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -declare var beforeAll: jest.Lifecycle; -declare var beforeEach: jest.Lifecycle; -declare var afterAll: jest.Lifecycle; -declare var afterEach: jest.Lifecycle; -declare var describe: jest.Describe; -declare var fdescribe: jest.Describe; -declare var xdescribe: jest.Describe; -declare var it: jest.It; -declare var fit: jest.It; -declare var xit: jest.It; -declare var test: jest.It; -declare var xtest: jest.It; - -declare const expect: jest.Expect; - -interface NodeRequire { - /** Returns the actual module instead of a mock, bypassing all checks on whether the module should receive a mock implementation or not. */ - requireActual(moduleName: string): any; - /** Returns a mock module instead of the actual module, bypassing all checks on whether the module should be required normally or not. */ - requireMock(moduleName: string): any; -} - -declare namespace jest { - /** Provides a way to add Jasmine-compatible matchers into your Jest context. */ - function addMatchers(matchers: jasmine.CustomMatcherFactories): typeof jest; - /** Disables automatic mocking in the module loader. */ - function autoMockOff(): typeof jest; - /** Enables automatic mocking in the module loader. */ - function autoMockOn(): typeof jest; - /** - * @deprecated use resetAllMocks instead - */ - function clearAllMocks(): typeof jest; - /** Clears the mock.calls and mock.instances properties of all mocks. Equivalent to calling .mockClear() on every mocked function. */ - function resetAllMocks(): typeof jest; - /** Removes any pending timers from the timer system. If any timers have been scheduled, they will be cleared and will never have the opportunity to execute in the future. */ - function clearAllTimers(): typeof jest; - /** Indicates that the module system should never return a mocked version of the specified module, including all of the specificied module's dependencies. */ - function deepUnmock(moduleName: string): typeof jest; - /** Disables automatic mocking in the module loader. */ - function disableAutomock(): typeof jest; - /** Mocks a module with an auto-mocked version when it is being required. */ - function doMock(moduleName: string): typeof jest; - /** Indicates that the module system should never return a mocked version of the specified module from require() (e.g. that it should always return the real module). */ - function dontMock(moduleName: string): typeof jest; - /** Enables automatic mocking in the module loader. */ - function enableAutomock(): typeof jest; - /** Creates a mock function. Optionally takes a mock implementation. */ - function fn(implementation: (...args: any[]) => T): Mock; - function fn(implementation?: Function): Mock; - /** Use the automatic mocking system to generate a mocked version of the given module. */ - function genMockFromModule(moduleName: string): T; - /** Returns whether the given function is a mock function. */ - function isMockFunction(fn: any): fn is Mock; - /** Mocks a module with an auto-mocked version when it is being required. */ - function mock(moduleName: string, factory?: any, options?: MockOptions): typeof jest; - /** Resets the module registry - the cache of all required modules. This is useful to isolate modules where local state might conflict between tests. */ - function resetModuleRegistry(): typeof jest; - /** Resets the module registry - the cache of all required modules. This is useful to isolate modules where local state might conflict between tests. */ - function resetModules(): typeof jest; - /** Exhausts tasks queued by setImmediate(). */ - function runAllImmediates(): typeof jest; - /** Exhausts the micro-task queue (usually interfaced in node via process.nextTick). */ - function runAllTicks(): typeof jest; - /** Exhausts the macro-task queue (i.e., all tasks queued by setTimeout() and setInterval()). */ - function runAllTimers(): typeof jest; - /** Executes only the macro-tasks that are currently pending (i.e., only the tasks that have been queued by setTimeout() or setInterval() up to this point). - * If any of the currently pending macro-tasks schedule new macro-tasks, those new tasks will not be executed by this call. */ - function runOnlyPendingTimers(): typeof jest; - /** Executes only the macro task queue (i.e. all tasks queued by setTimeout() or setInterval() and setImmediate()). */ - function runTimersToTime(msToRun: number): typeof jest; - /** Explicitly supplies the mock object that the module system should return for the specified module. */ - function setMock(moduleName: string, moduleExports: T): typeof jest; - /** Creates a mock function similar to jest.fn but also tracks calls to object[methodName] */ - function spyOn(object: T, method: M): SpyInstance; - /** Indicates that the module system should never return a mocked version of the specified module from require() (e.g. that it should always return the real module). */ - function unmock(moduleName: string): typeof jest; - /** Instructs Jest to use fake versions of the standard timer functions. */ - function useFakeTimers(): typeof jest; - /** Instructs Jest to use the real versions of the standard timer functions. */ - function useRealTimers(): typeof jest; - - interface MockOptions { - virtual?: boolean; - } - - interface EmptyFunction { - (): void; - } - - interface DoneCallback { - (...args: any[]): any - fail(error?: string | { message: string }): any; - } - - interface ProvidesCallback { - (cb: DoneCallback): any; - } - - interface Lifecycle { - (fn: ProvidesCallback): any; - } - - /** Creates a test closure */ - interface It { - /** - * Creates a test closure. - * - * @param {string} name The name of your test - * @param {fn?} ProvidesCallback The function for your test - */ - (name: string, fn?: ProvidesCallback): void; - /** Only runs this test in the current file. */ - only: It; - skip: It; - concurrent: It; - } - - interface Describe { - (name: string, fn: EmptyFunction): void - only: Describe; - skip: Describe; - } - - interface MatcherUtils { - readonly isNot: boolean; - utils: { - readonly EXPECTED_COLOR: string; - readonly RECEIVED_COLOR: string; - ensureActualIsNumber(actual: any, matcherName?: string): void; - ensureExpectedIsNumber(actual: any, matcherName?: string): void; - ensureNoExpected(actual: any, matcherName?: string): void; - ensureNumbers(actual: any, expected: any, matcherName?: string): void; - /** get the type of a value with handling of edge cases like `typeof []` and `typeof null` */ - getType(value: any): string; - matcherHint(matcherName: string, received?: string, expected?: string, options?: { secondArgument?: string, isDirectExpectCall?: boolean }): string; - pluralize(word: string, count: number): string; - printExpected(value: any): string; - printReceived(value: any): string; - printWithType(name: string, received: any, print: (value: any) => string): string; - stringify(object: {}, maxDepth?: number): string; - } - } - - interface ExpectExtendMap { - [key: string]: (this: MatcherUtils, received: any, actual: any) => { message: () => string, pass: boolean }; - } - - interface SnapshotSerializerOptions { - callToJSON?: boolean; - edgeSpacing?: string; - spacing?: string; - escapeRegex?: boolean; - highlight?: boolean; - indent?: number; - maxDepth?: number; - min?: boolean; - plugins?: Array - printFunctionName?: boolean; - theme?: SnapshotSerializerOptionsTheme; - - // see https://github.com/facebook/jest/blob/e56103cf142d2e87542ddfb6bd892bcee262c0e6/types/PrettyFormat.js - } - interface SnapshotSerializerOptionsTheme { - comment?: string; - content?: string; - prop?: string; - tag?: string; - value?: string; - } - interface SnapshotSerializerColor { - close: string; - open: string; - } - interface SnapshotSerializerColors { - comment: SnapshotSerializerColor; - content: SnapshotSerializerColor; - prop: SnapshotSerializerColor; - tag: SnapshotSerializerColor; - value: SnapshotSerializerColor; - } - interface SnapshotSerializerPlugin { - print(val:any, serialize:((val:any) => string), indent:((str:string) => string), opts:SnapshotSerializerOptions, colors: SnapshotSerializerColors) : string; - test(val:any) : boolean; - } - - /** The `expect` function is used every time you want to test a value. You will rarely call `expect` by itself. */ - interface Expect { - /** - * The `expect` function is used every time you want to test a value. You will rarely call `expect` by itself. - * - * @param {any} actual The value to apply matchers against. - */ - (actual: any): Matchers; - anything(): any; - /** Matches anything that was created with the given constructor. You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value. */ - any(classType: any): any; - /** Matches any array made up entirely of elements in the provided array. You can use it inside `toEqual` or `toBeCalledWith` instead of a literal value. */ - arrayContaining(arr: any[]): any; - /** Verifies that a certain number of assertions are called during a test. This is often useful when testing asynchronous code, in order to make sure that assertions in a callback actually got called. */ - assertions(num: number): void; - /** Verifies that at least one assertion is called during a test. This is often useful when testing asynchronous code, in order to make sure that assertions in a callback actually got called. */ - hasAssertions(): void; - /** You can use `expect.extend` to add your own matchers to Jest. */ - extend(obj: ExpectExtendMap): void; - /** Adds a module to format application-specific data structures for serialization. */ - addSnapshotSerializer(serializer: SnapshotSerializerPlugin) : void; - /** Matches any object that recursively matches the provided keys. This is often handy in conjunction with other asymmetric matchers. */ - objectContaining(obj: {}): any; - /** Matches any string that contains the exact provided string */ - stringMatching(str: string | RegExp): any; - } - - interface Matchers { - /** If you know how to test something, `.not` lets you test its opposite. */ - not: Matchers; - /** Use resolves to unwrap the value of a fulfilled promise so any other matcher can be chained. If the promise is rejected the assertion fails. */ - resolves: Matchers>; - /** Unwraps the reason of a rejected promise so any other matcher can be chained. If the promise is fulfilled the assertion fails. */ - rejects: Matchers>; - lastCalledWith(...args: any[]): R; - /** Checks that a value is what you expect. It uses `===` to check strict equality. Don't use `toBe` with floating-point numbers. */ - toBe(expected: any): R; - /** Ensures that a mock function is called. */ - toBeCalled(): R; - /** Ensure that a mock function is called with specific arguments. */ - toBeCalledWith(...args: any[]): R; - /** Using exact equality with floating point numbers is a bad idea. Rounding means that intuitive things fail. */ - toBeCloseTo(expected: number, delta?: number): R; - /** Ensure that a variable is not undefined. */ - toBeDefined(): R; - /** When you don't care what a value is, you just want to ensure a value is false in a boolean context. */ - toBeFalsy(): R; - /** For comparing floating point numbers. */ - toBeGreaterThan(expected: number): R; - /** For comparing floating point numbers. */ - toBeGreaterThanOrEqual(expected: number): R; - /** Ensure that an object is an instance of a class. This matcher uses `instanceof` underneath. */ - toBeInstanceOf(expected: any): R - /** For comparing floating point numbers. */ - toBeLessThan(expected: number): R; - /** For comparing floating point numbers. */ - toBeLessThanOrEqual(expected: number): R; - /** This is the same as `.toBe(null)` but the error messages are a bit nicer. So use `.toBeNull()` when you want to check that something is null. */ - toBeNull(): R; - /** Use when you don't care what a value is, you just want to ensure a value is true in a boolean context. In JavaScript, there are six falsy values: `false`, `0`, `''`, `null`, `undefined`, and `NaN`. Everything else is truthy. */ - toBeTruthy(): R; - /** Used to check that a variable is undefined. */ - toBeUndefined(): R; - /** Used when you want to check that an item is in a list. For testing the items in the list, this uses `===`, a strict equality check. */ - toContain(expected: any): R; - /** Used when you want to check that an item is in a list. For testing the items in the list, this matcher recursively checks the equality of all fields, rather than checking for object identity. */ - toContainEqual(expected: any): R; - /** Used when you want to check that two objects have the same value. This matcher recursively checks the equality of all fields, rather than checking for object identity. */ - toEqual(expected: any): R; - /** Ensures that a mock function is called. */ - toHaveBeenCalled(): R; - /** Ensures that a mock function is called an exact number of times. */ - toHaveBeenCalledTimes(expected: number): R; - /** Ensure that a mock function is called with specific arguments. */ - toHaveBeenCalledWith(...params: any[]): R; - /** If you have a mock function, you can use `.toHaveBeenLastCalledWith` to test what arguments it was last called with. */ - toHaveBeenLastCalledWith(...params: any[]): R; - /** Used to check that an object has a `.length` property and it is set to a certain numeric value. */ - toHaveLength(expected: number): R; - toHaveProperty(propertyPath: string, value?: any): R; - /** Check that a string matches a regular expression. */ - toMatch(expected: string | RegExp): R; - /** Used to check that a JavaScript object matches a subset of the properties of an objec */ - toMatchObject(expected: {}): R; - /** This ensures that a value matches the most recent snapshot. Check out [the Snapshot Testing guide](http://facebook.github.io/jest/docs/snapshot-testing.html) for more information. */ - toMatchSnapshot(snapshotName?: string): R; - /** Used to test that a function throws when it is called. */ - toThrow(error?: string | Constructable | RegExp): R; - /** If you want to test that a specific error is thrown inside a function. */ - toThrowError(error?: string | Constructable | RegExp): R; - /** Used to test that a function throws a error matching the most recent snapshot when it is called. */ - toThrowErrorMatchingSnapshot(): R; - } - - interface Constructable { - new (...args: any[]): any - } - - interface Mock extends Function, MockInstance { - new (): T; - (...args: any[]): any; - } - - interface SpyInstance extends MockInstance { - mockRestore(): void; - } - - /** - * Wrap module with mock definitions - * @example - * jest.mock("../api"); - * import { Api } from "../api"; - * - * const myApi: jest.Mocked = new Api() as any; - * myApi.myApiMethod.mockImplementation(() => "test"); - */ - type Mocked = { - [P in keyof T]: T[P] & MockInstance; - } & T; - - interface MockInstance { - mock: MockContext; - mockClear(): void; - mockReset(): void; - mockImplementation(fn: Function): Mock; - mockImplementationOnce(fn: Function): Mock; - mockReturnThis(): Mock; - mockReturnValue(value: any): Mock; - mockReturnValueOnce(value: any): Mock; - } - - interface MockContext { - calls: any[][]; - instances: T[]; - } -} - -//Jest ships with a copy of Jasmine. They monkey-patch its APIs and divergence/deprecation are expected. -//Relevant parts of Jasmine's API are below so they can be changed and removed over time. -//This file can't reference jasmine.d.ts since the globals aren't compatible. - -declare function spyOn(object: any, method: string): jasmine.Spy; -/** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */ -declare function pending(reason?: string): void; -/** Fails a test when called within one. */ -declare function fail(error?: any): void; -declare namespace jasmine { - var DEFAULT_TIMEOUT_INTERVAL: number; - var clock: () => Clock; - function any(aclass: any): Any; - function anything(): Any; - function arrayContaining(sample: any[]): ArrayContaining; - function objectContaining(sample: any): ObjectContaining; - function createSpy(name: string, originalFn?: Function): Spy; - function createSpyObj(baseName: string, methodNames: any[]): any; - function createSpyObj(baseName: string, methodNames: any[]): T; - function pp(value: any): string; - function addCustomEqualityTester(equalityTester: CustomEqualityTester): void; - function addMatchers(matchers: CustomMatcherFactories): void; - function stringMatching(value: string | RegExp): Any; - - interface Clock { - install(): void; - uninstall(): void; - /** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */ - tick(ms: number): void; - mockDate(date?: Date): void; - } - - interface Any { - new (expectedClass: any): any; - jasmineMatches(other: any): boolean; - jasmineToString(): string; - } - - interface ArrayContaining { - new (sample: any[]): any; - asymmetricMatch(other: any): boolean; - jasmineToString(): string; - } - - interface ObjectContaining { - new (sample: any): any; - jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean; - jasmineToString(): string; - } - - interface Spy { - (...params: any[]): any; - identity: string; - and: SpyAnd; - calls: Calls; - mostRecentCall: { args: any[]; }; - argsForCall: any[]; - wasCalled: boolean; - } - - interface SpyAnd { - /** By chaining the spy with and.callThrough, the spy will still track all calls to it but in addition it will delegate to the actual implementation. */ - callThrough(): Spy; - /** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */ - returnValue(val: any): Spy; - /** By chaining the spy with and.returnValues, all calls to the function will return specific values in order until it reaches the end of the return values list. */ - returnValues(...values: any[]): Spy; - /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */ - callFake(fn: Function): Spy; - /** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */ - throwError(msg: string): Spy; - /** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */ - stub(): Spy; - } - - interface Calls { - /** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. */ - any(): boolean; - /** By chaining the spy with calls.count(), will return the number of times the spy was called */ - count(): number; - /** By chaining the spy with calls.argsFor(), will return the arguments passed to call number index */ - argsFor(index: number): any[]; - /** By chaining the spy with calls.allArgs(), will return the arguments to all calls */ - allArgs(): any[]; - /** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls */ - all(): CallInfo[]; - /** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call */ - mostRecent(): CallInfo; - /** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call */ - first(): CallInfo; - /** By chaining the spy with calls.reset(), will clears all tracking for a spy */ - reset(): void; - } - - interface CallInfo { - /** The context (the this) for the call */ - object: any; - /** All arguments passed to the call */ - args: any[]; - /** The return value of the call */ - returnValue: any; - } - - interface CustomMatcherFactories { - [index: string]: CustomMatcherFactory; - } - - interface CustomMatcherFactory { - (util: MatchersUtil, customEqualityTesters: Array): CustomMatcher; - } - - interface MatchersUtil { - equals(a: any, b: any, customTesters?: Array): boolean; - contains(haystack: ArrayLike | string, needle: any, customTesters?: Array): boolean; - buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: Array): string; - } - - interface CustomEqualityTester { - (first: any, second: any): boolean; - } - - interface CustomMatcher { - compare(actual: T, expected: T): CustomMatcherResult; - compare(actual: any, expected: any): CustomMatcherResult; - } - - interface CustomMatcherResult { - pass: boolean; - message: string | (() => string); - } - - interface ArrayLike { - length: number; - [n: number]: T; - } -} diff --git a/typescript/hello-world/node_modules/@types/jest/package.json b/typescript/hello-world/node_modules/@types/jest/package.json deleted file mode 100644 index 0ebde0c..0000000 --- a/typescript/hello-world/node_modules/@types/jest/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "@types/jest", - "version": "20.0.0", - "description": "TypeScript definitions for Jest", - "license": "MIT", - "contributors": [ - { - "name": "Asana", - "url": "https://asana.com" - }, - { - "name": "Ivo Stratev", - "url": "https://github.com/NoHomey" - }, - { - "name": "jwbay", - "url": "https://github.com/jwbay" - }, - { - "name": "Alexey Svetliakov", - "url": "https://github.com/asvetliakov" - }, - { - "name": "Alex Jover Morales", - "url": "https://github.com/alexjoverm" - } - ], - "main": "", - "repository": { - "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typesPublisherContentHash": "45747aefd247da23247f4ec4c71ff2c95df07f0eb19118649b26ffab9982b7fa", - "typeScriptVersion": "2.1" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/@types/node/LICENSE b/typescript/hello-world/node_modules/@types/node/LICENSE deleted file mode 100644 index 2107107..0000000 --- a/typescript/hello-world/node_modules/@types/node/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/typescript/hello-world/node_modules/@types/node/README.md b/typescript/hello-world/node_modules/@types/node/README.md deleted file mode 100644 index 4c6c0ad..0000000 --- a/typescript/hello-world/node_modules/@types/node/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/node` - -# Summary -This package contains type definitions for Node.js (http://nodejs.org/). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node - -Additional Details - * Last updated: Mon, 12 Jun 2017 23:39:16 GMT - * Dependencies: events, net, stream, child_process, tls, http, readline, crypto - * Global values: Buffer, NodeJS, SlowBuffer, Symbol, ___dirname, ___filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout - -# Credits -These definitions were written by Microsoft TypeScript , DefinitelyTyped , Parambir Singh , Roberto Desideri , Christian Vaagland Tellnes , Wilco Bakker . diff --git a/typescript/hello-world/node_modules/@types/node/index.d.ts b/typescript/hello-world/node_modules/@types/node/index.d.ts deleted file mode 100644 index 178a892..0000000 --- a/typescript/hello-world/node_modules/@types/node/index.d.ts +++ /dev/null @@ -1,4433 +0,0 @@ -// Type definitions for Node.js v7.x -// Project: http://nodejs.org/ -// Definitions by: Microsoft TypeScript -// DefinitelyTyped -// Parambir Singh -// Roberto Desideri -// Christian Vaagland Tellnes -// Wilco Bakker -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.2 - -/************************************************ -* * -* Node.js v7.x API * -* * -************************************************/ - -// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build -interface Console { - Console: NodeJS.ConsoleConstructor; - assert(value: any, message?: string, ...optionalParams: any[]): void; - dir(obj: any, options?: NodeJS.InspectOptions): void; - error(message?: any, ...optionalParams: any[]): void; - info(message?: any, ...optionalParams: any[]): void; - log(message?: any, ...optionalParams: any[]): void; - time(label: string): void; - timeEnd(label: string): void; - trace(message?: any, ...optionalParams: any[]): void; - warn(message?: any, ...optionalParams: any[]): void; -} - -interface Error { - stack?: string; -} - -interface ErrorConstructor { - captureStackTrace(targetObject: Object, constructorOpt?: Function): void; - stackTraceLimit: number; -} - -// compat for TypeScript 1.8 -// if you use with --target es3 or --target es5 and use below definitions, -// use the lib.es6.d.ts that is bundled with TypeScript 1.8. -interface MapConstructor { } -interface WeakMapConstructor { } -interface SetConstructor { } -interface WeakSetConstructor { } - -// Forward-declare needed types from lib.es2015.d.ts (in case users are using `--lib es5`) -interface Iterable {} -interface Iterator { - next(value?: any): IteratorResult; -} -interface IteratorResult {} -interface SymbolConstructor { - readonly iterator: symbol; -} -declare var Symbol: SymbolConstructor; - -/************************************************ -* * -* GLOBAL * -* * -************************************************/ -declare var process: NodeJS.Process; -declare var global: NodeJS.Global; -declare var console: Console; - -declare var __filename: string; -declare var __dirname: string; - -declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; -declare function clearTimeout(timeoutId: NodeJS.Timer): void; -declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; -declare function clearInterval(intervalId: NodeJS.Timer): void; -declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; -declare function clearImmediate(immediateId: any): void; - -interface NodeRequireFunction { - (id: string): any; -} - -interface NodeRequire extends NodeRequireFunction { - resolve(id: string): string; - cache: any; - extensions: any; - main: NodeModule | undefined; -} - -declare var require: NodeRequire; - -interface NodeModule { - exports: any; - require: NodeRequireFunction; - id: string; - filename: string; - loaded: boolean; - parent: NodeModule | null; - children: NodeModule[]; -} - -declare var module: NodeModule; - -// Same as module.exports -declare var exports: any; -declare var SlowBuffer: { - new (str: string, encoding?: string): Buffer; - new (size: number): Buffer; - new (size: Uint8Array): Buffer; - new (array: any[]): Buffer; - prototype: Buffer; - isBuffer(obj: any): boolean; - byteLength(string: string, encoding?: string): number; - concat(list: Buffer[], totalLength?: number): Buffer; -}; - - -// Buffer class -type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex"; -interface Buffer extends NodeBuffer { } - -/** - * Raw data is stored in instances of the Buffer class. - * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. - * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - */ -declare var Buffer: { - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - */ - new (str: string, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - */ - new (size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - new (array: Uint8Array): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}. - * - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - */ - new (arrayBuffer: ArrayBuffer): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - */ - new (array: any[]): Buffer; - /** - * Copies the passed {buffer} data onto a new {Buffer} instance. - * - * @param buffer The buffer to copy. - */ - new (buffer: Buffer): Buffer; - prototype: Buffer; - /** - * Allocates a new Buffer using an {array} of octets. - * - * @param array - */ - from(array: any[]): Buffer; - /** - * When passed a reference to the .buffer property of a TypedArray instance, - * the newly created Buffer will share the same allocated memory as the TypedArray. - * The optional {byteOffset} and {length} arguments specify a memory range - * within the {arrayBuffer} that will be shared by the Buffer. - * - * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() - * @param byteOffset - * @param length - */ - from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * Copies the passed {buffer} data onto a new Buffer instance. - * - * @param buffer - */ - from(buffer: Buffer): Buffer; - /** - * Creates a new Buffer containing the given JavaScript string {str}. - * If provided, the {encoding} parameter identifies the character encoding. - * If not provided, {encoding} defaults to 'utf8'. - * - * @param str - */ - from(str: string, encoding?: string): Buffer; - /** - * Returns true if {obj} is a Buffer - * - * @param obj object to test. - */ - isBuffer(obj: any): obj is Buffer; - /** - * Returns true if {encoding} is a valid encoding argument. - * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' - * - * @param encoding string to test. - */ - isEncoding(encoding: string): boolean; - /** - * Gives the actual byte length of a string. encoding defaults to 'utf8'. - * This is not the same as String.prototype.length since that returns the number of characters in a string. - * - * @param string string to test. - * @param encoding encoding used to evaluate (defaults to 'utf8') - */ - byteLength(string: string, encoding?: string): number; - /** - * Returns a buffer which is the result of concatenating all the buffers in the list together. - * - * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. - * If the list has exactly one item, then the first item of the list is returned. - * If the list has more than one item, then a new Buffer is created. - * - * @param list An array of Buffer objects to concatenate - * @param totalLength Total length of the buffers when concatenated. - * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. - */ - concat(list: Buffer[], totalLength?: number): Buffer; - /** - * The same as buf1.compare(buf2). - */ - compare(buf1: Buffer, buf2: Buffer): number; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @param fill if specified, buffer will be initialized by calling buf.fill(fill). - * If parameter is omitted, buffer will be filled with zeros. - * @param encoding encoding used for call to buf.fill while initalizing - */ - alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; - /** - * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents - * of the newly created Buffer are unknown and may contain sensitive data. - * - * @param size count of octets to allocate - */ - allocUnsafeSlow(size: number): Buffer; -}; - -/************************************************ -* * -* GLOBAL INTERFACES * -* * -************************************************/ -declare namespace NodeJS { - export interface InspectOptions { - showHidden?: boolean; - depth?: number | null; - colors?: boolean; - customInspect?: boolean; - showProxy?: boolean; - maxArrayLength?: number | null; - breakLength?: number; - } - - export interface ConsoleConstructor { - prototype: Console; - new(stdout: WritableStream, stderr?: WritableStream): Console; - } - - export interface ErrnoException extends Error { - errno?: number; - code?: string; - path?: string; - syscall?: string; - stack?: string; - } - - export class EventEmitter { - addListener(event: string | symbol, listener: Function): this; - on(event: string | symbol, listener: Function): this; - once(event: string | symbol, listener: Function): this; - removeListener(event: string | symbol, listener: Function): this; - removeAllListeners(event?: string | symbol): this; - setMaxListeners(n: number): this; - getMaxListeners(): number; - listeners(event: string | symbol): Function[]; - emit(event: string | symbol, ...args: any[]): boolean; - listenerCount(type: string | symbol): number; - // Added in Node 6... - prependListener(event: string | symbol, listener: Function): this; - prependOnceListener(event: string | symbol, listener: Function): this; - eventNames(): (string | symbol)[]; - } - - export interface ReadableStream extends EventEmitter { - readable: boolean; - read(size?: number): string | Buffer; - setEncoding(encoding: string | null): this; - pause(): this; - resume(): this; - isPaused(): boolean; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): this; - unshift(chunk: string): void; - unshift(chunk: Buffer): void; - wrap(oldStream: ReadableStream): ReadableStream; - } - - export interface WritableStream extends EventEmitter { - writable: boolean; - write(buffer: Buffer | string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - } - - export interface ReadWriteStream extends ReadableStream, WritableStream { } - - export interface Events extends EventEmitter { } - - export interface Domain extends Events { - run(fn: Function): void; - add(emitter: Events): void; - remove(emitter: Events): void; - bind(cb: (err: Error, data: any) => any): any; - intercept(cb: (data: any) => any): any; - dispose(): void; - - addListener(event: string, listener: Function): this; - on(event: string, listener: Function): this; - once(event: string, listener: Function): this; - removeListener(event: string, listener: Function): this; - removeAllListeners(event?: string): this; - } - - export interface MemoryUsage { - rss: number; - heapTotal: number; - heapUsed: number; - } - - export interface CpuUsage { - user: number; - system: number; - } - - export interface ProcessVersions { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - modules: string; - openssl: string; - } - - type Platform = 'aix' - | 'android' - | 'darwin' - | 'freebsd' - | 'linux' - | 'openbsd' - | 'sunos' - | 'win32'; - - type Signals = - "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" | - "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" | - "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" | - "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ"; - - export interface Socket extends ReadWriteStream { - isTTY?: true; - } - - export interface Process extends EventEmitter { - stdout: Socket; - stderr: Socket; - stdin: Socket; - openStdin(): Socket; - argv: string[]; - argv0: string; - execArgv: string[]; - execPath: string; - abort(): void; - chdir(directory: string): void; - cwd(): string; - emitWarning(warning: string | Error, name?: string, ctor?: Function): void; - env: any; - exit(code?: number): never; - exitCode: number; - getgid(): number; - setgid(id: number): void; - setgid(id: string): void; - getuid(): number; - setuid(id: number): void; - setuid(id: string): void; - version: string; - versions: ProcessVersions; - config: { - target_defaults: { - cflags: any[]; - default_configuration: string; - defines: string[]; - include_dirs: string[]; - libraries: string[]; - }; - variables: { - clang: number; - host_arch: string; - node_install_npm: boolean; - node_install_waf: boolean; - node_prefix: string; - node_shared_openssl: boolean; - node_shared_v8: boolean; - node_shared_zlib: boolean; - node_use_dtrace: boolean; - node_use_etw: boolean; - node_use_openssl: boolean; - target_arch: string; - v8_no_strict_aliasing: number; - v8_use_snapshot: boolean; - visibility: string; - }; - }; - kill(pid: number, signal?: string | number): void; - pid: number; - title: string; - arch: string; - platform: Platform; - mainModule?: NodeModule; - memoryUsage(): MemoryUsage; - cpuUsage(previousValue?: CpuUsage): CpuUsage; - nextTick(callback: Function, ...args: any[]): void; - umask(mask?: number): number; - uptime(): number; - hrtime(time?: [number, number]): [number, number]; - domain: Domain; - - // Worker - send?(message: any, sendHandle?: any): void; - disconnect(): void; - connected: boolean; - - /** - * EventEmitter - * 1. beforeExit - * 2. disconnect - * 3. exit - * 4. message - * 5. rejectionHandled - * 6. uncaughtException - * 7. unhandledRejection - * 8. warning - * 9. - */ - - addListener(event: "beforeExit", listener: (code: number) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "exit", listener: (code: number) => void): this; - addListener(event: "rejectionHandled", listener: (promise: Promise) => void): this; - addListener(event: "uncaughtException", listener: (error: Error) => void): this; - addListener(event: "unhandledRejection", listener: (reason: any, promise: Promise) => void): this; - addListener(event: "warning", listener: (warning: Error) => void): this; - addListener(event: Signals, listener: () => void): this; - - emit(event: "beforeExit", listener: (code: number) => void): boolean; - emit(event: "disconnect", listener: () => void): boolean; - emit(event: "exit", listener: (code: number) => void): boolean; - emit(event: "rejectionHandled", listener: (promise: Promise) => void): boolean; - emit(event: "uncaughtException", listener: (error: Error) => void): boolean; - emit(event: "unhandledRejection", listener: (reason: any, promise: Promise) => void): boolean; - emit(event: "warning", listener: (warning: Error) => void): boolean; - emit(event: Signals, listener: () => void): boolean; - - on(event: "beforeExit", listener: (code: number) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "exit", listener: (code: number) => void): this; - on(event: "rejectionHandled", listener: (promise: Promise) => void): this; - on(event: "uncaughtException", listener: (error: Error) => void): this; - on(event: "unhandledRejection", listener: (reason: any, promise: Promise) => void): this; - on(event: "warning", listener: (warning: Error) => void): this; - on(event: "message", listener: (message: any, sendHandle: any) => void): this; - on(event: Signals, listener: () => void): this; - - once(event: "beforeExit", listener: (code: number) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "exit", listener: (code: number) => void): this; - once(event: "rejectionHandled", listener: (promise: Promise) => void): this; - once(event: "uncaughtException", listener: (error: Error) => void): this; - once(event: "unhandledRejection", listener: (reason: any, promise: Promise) => void): this; - once(event: "warning", listener: (warning: Error) => void): this; - once(event: Signals, listener: () => void): this; - - prependListener(event: "beforeExit", listener: (code: number) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "exit", listener: (code: number) => void): this; - prependListener(event: "rejectionHandled", listener: (promise: Promise) => void): this; - prependListener(event: "uncaughtException", listener: (error: Error) => void): this; - prependListener(event: "unhandledRejection", listener: (reason: any, promise: Promise) => void): this; - prependListener(event: "warning", listener: (warning: Error) => void): this; - prependListener(event: Signals, listener: () => void): this; - - prependOnceListener(event: "beforeExit", listener: (code: number) => void): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "exit", listener: (code: number) => void): this; - prependOnceListener(event: "rejectionHandled", listener: (promise: Promise) => void): this; - prependOnceListener(event: "uncaughtException", listener: (error: Error) => void): this; - prependOnceListener(event: "unhandledRejection", listener: (reason: any, promise: Promise) => void): this; - prependOnceListener(event: "warning", listener: (warning: Error) => void): this; - prependOnceListener(event: Signals, listener: () => void): this; - } - - export interface Global { - Array: typeof Array; - ArrayBuffer: typeof ArrayBuffer; - Boolean: typeof Boolean; - Buffer: typeof Buffer; - DataView: typeof DataView; - Date: typeof Date; - Error: typeof Error; - EvalError: typeof EvalError; - Float32Array: typeof Float32Array; - Float64Array: typeof Float64Array; - Function: typeof Function; - GLOBAL: Global; - Infinity: typeof Infinity; - Int16Array: typeof Int16Array; - Int32Array: typeof Int32Array; - Int8Array: typeof Int8Array; - Intl: typeof Intl; - JSON: typeof JSON; - Map: MapConstructor; - Math: typeof Math; - NaN: typeof NaN; - Number: typeof Number; - Object: typeof Object; - Promise: Function; - RangeError: typeof RangeError; - ReferenceError: typeof ReferenceError; - RegExp: typeof RegExp; - Set: SetConstructor; - String: typeof String; - Symbol: Function; - SyntaxError: typeof SyntaxError; - TypeError: typeof TypeError; - URIError: typeof URIError; - Uint16Array: typeof Uint16Array; - Uint32Array: typeof Uint32Array; - Uint8Array: typeof Uint8Array; - Uint8ClampedArray: Function; - WeakMap: WeakMapConstructor; - WeakSet: WeakSetConstructor; - clearImmediate: (immediateId: any) => void; - clearInterval: (intervalId: NodeJS.Timer) => void; - clearTimeout: (timeoutId: NodeJS.Timer) => void; - console: typeof console; - decodeURI: typeof decodeURI; - decodeURIComponent: typeof decodeURIComponent; - encodeURI: typeof encodeURI; - encodeURIComponent: typeof encodeURIComponent; - escape: (str: string) => string; - eval: typeof eval; - global: Global; - isFinite: typeof isFinite; - isNaN: typeof isNaN; - parseFloat: typeof parseFloat; - parseInt: typeof parseInt; - process: Process; - root: Global; - setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => any; - setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; - setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer; - undefined: typeof undefined; - unescape: (str: string) => string; - gc: () => void; - v8debug?: any; - } - - export interface Timer { - ref(): void; - unref(): void; - } -} - -interface IterableIterator { } - -/** - * @deprecated - */ -interface NodeBuffer extends Uint8Array { - write(string: string, offset?: number, length?: number, encoding?: string): number; - toString(encoding?: string, start?: number, end?: number): string; - toJSON(): { type: 'Buffer', data: any[] }; - equals(otherBuffer: Buffer): boolean; - compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; - copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - slice(start?: number, end?: number): Buffer; - writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; - readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; - readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; - readUInt8(offset: number, noAssert?: boolean): number; - readUInt16LE(offset: number, noAssert?: boolean): number; - readUInt16BE(offset: number, noAssert?: boolean): number; - readUInt32LE(offset: number, noAssert?: boolean): number; - readUInt32BE(offset: number, noAssert?: boolean): number; - readInt8(offset: number, noAssert?: boolean): number; - readInt16LE(offset: number, noAssert?: boolean): number; - readInt16BE(offset: number, noAssert?: boolean): number; - readInt32LE(offset: number, noAssert?: boolean): number; - readInt32BE(offset: number, noAssert?: boolean): number; - readFloatLE(offset: number, noAssert?: boolean): number; - readFloatBE(offset: number, noAssert?: boolean): number; - readDoubleLE(offset: number, noAssert?: boolean): number; - readDoubleBE(offset: number, noAssert?: boolean): number; - swap16(): Buffer; - swap32(): Buffer; - swap64(): Buffer; - writeUInt8(value: number, offset: number, noAssert?: boolean): number; - writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeInt8(value: number, offset: number, noAssert?: boolean): number; - writeInt16LE(value: number, offset: number, noAssert?: boolean): number; - writeInt16BE(value: number, offset: number, noAssert?: boolean): number; - writeInt32LE(value: number, offset: number, noAssert?: boolean): number; - writeInt32BE(value: number, offset: number, noAssert?: boolean): number; - writeFloatLE(value: number, offset: number, noAssert?: boolean): number; - writeFloatBE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; - writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; - fill(value: any, offset?: number, end?: number): this; - indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; - entries(): IterableIterator<[number, number]>; - includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; - keys(): IterableIterator; - values(): IterableIterator; -} - -/************************************************ -* * -* MODULES * -* * -************************************************/ -declare module "buffer" { - export var INSPECT_MAX_BYTES: number; - var BuffType: typeof Buffer; - var SlowBuffType: typeof SlowBuffer; - export { BuffType as Buffer, SlowBuffType as SlowBuffer }; -} - -declare module "querystring" { - export interface StringifyOptions { - encodeURIComponent?: Function; - } - - export interface ParseOptions { - maxKeys?: number; - decodeURIComponent?: Function; - } - - export function stringify(obj: T, sep?: string, eq?: string, options?: StringifyOptions): string; - export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): any; - export function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): T; - export function escape(str: string): string; - export function unescape(str: string): string; -} - -declare module "events" { - class internal extends NodeJS.EventEmitter { } - - namespace internal { - export class EventEmitter extends internal { - static listenerCount(emitter: EventEmitter, event: string | symbol): number; // deprecated - static defaultMaxListeners: number; - - addListener(event: string | symbol, listener: Function): this; - on(event: string | symbol, listener: Function): this; - once(event: string | symbol, listener: Function): this; - prependListener(event: string | symbol, listener: Function): this; - prependOnceListener(event: string | symbol, listener: Function): this; - removeListener(event: string | symbol, listener: Function): this; - removeAllListeners(event?: string | symbol): this; - setMaxListeners(n: number): this; - getMaxListeners(): number; - listeners(event: string | symbol): Function[]; - emit(event: string | symbol, ...args: any[]): boolean; - eventNames(): (string | symbol)[]; - listenerCount(type: string | symbol): number; - } - } - - export = internal; -} - -declare module "http" { - import * as events from "events"; - import * as net from "net"; - import * as stream from "stream"; - - export interface RequestOptions { - protocol?: string; - host?: string; - hostname?: string; - family?: number; - port?: number; - localAddress?: string; - socketPath?: string; - method?: string; - path?: string; - headers?: { [key: string]: any }; - auth?: string; - agent?: Agent | boolean; - timeout?: number; - } - - export interface Server extends net.Server { - setTimeout(msecs: number, callback: Function): void; - maxHeadersCount: number; - timeout: number; - listening: boolean; - } - /** - * @deprecated Use IncomingMessage - */ - export interface ServerRequest extends IncomingMessage { - connection: net.Socket; - } - export interface ServerResponse extends stream.Writable { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - writeContinue(): void; - writeHead(statusCode: number, reasonPhrase?: string, headers?: any): void; - writeHead(statusCode: number, headers?: any): void; - statusCode: number; - statusMessage: string; - headersSent: boolean; - setHeader(name: string, value: string | string[]): void; - setTimeout(msecs: number, callback: Function): ServerResponse; - sendDate: boolean; - getHeader(name: string): string; - removeHeader(name: string): void; - write(chunk: any, encoding?: string): any; - addTrailers(headers: any): void; - finished: boolean; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - export interface ClientRequest extends stream.Writable { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - write(chunk: any, encoding?: string): void; - abort(): void; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - - setHeader(name: string, value: string | string[]): void; - getHeader(name: string): string; - removeHeader(name: string): void; - addTrailers(headers: any): void; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - } - export interface IncomingMessage extends stream.Readable { - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - connection: net.Socket; - headers: { [key: string]: string | string[] }; - rawHeaders: string[]; - trailers: { [key: string]: string }; - rawTrailers: string[]; - setTimeout(msecs: number, callback: Function): NodeJS.Timer; - /** - * Only valid for request obtained from http.Server. - */ - method?: string; - /** - * Only valid for request obtained from http.Server. - */ - url?: string; - /** - * Only valid for response obtained from http.ClientRequest. - */ - statusCode?: number; - /** - * Only valid for response obtained from http.ClientRequest. - */ - statusMessage?: string; - socket: net.Socket; - destroy(error?: Error): void; - } - /** - * @deprecated Use IncomingMessage - */ - export interface ClientResponse extends IncomingMessage { } - - export interface AgentOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number; - } - - export class Agent { - maxSockets: number; - sockets: any; - requests: any; - - constructor(opts?: AgentOptions); - - /** - * Destroy any sockets that are currently in use by the agent. - * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, - * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, - * sockets may hang open for quite a long time before the server terminates them. - */ - destroy(): void; - } - - export var METHODS: string[]; - - export var STATUS_CODES: { - [errorCode: number]: string; - [errorCode: string]: string; - }; - export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server; - export function createClient(port?: number, host?: string): any; - export function request(options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest; - export var globalAgent: Agent; -} - -declare module "cluster" { - import * as child from "child_process"; - import * as events from "events"; - import * as net from "net"; - - // interfaces - export interface ClusterSettings { - execArgv?: string[]; // default: process.execArgv - exec?: string; - args?: string[]; - silent?: boolean; - stdio?: any[]; - uid?: number; - gid?: number; - } - - export interface ClusterSetupMasterSettings { - exec?: string; // default: process.argv[1] - args?: string[]; // default: process.argv.slice(2) - silent?: boolean; // default: false - stdio?: any[]; - } - - export interface Address { - address: string; - port: number; - addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" - } - - export class Worker extends events.EventEmitter { - id: string; - process: child.ChildProcess; - suicide: boolean; - send(message: any, sendHandle?: any): boolean; - kill(signal?: string): void; - destroy(signal?: string): void; - disconnect(): void; - isConnected(): boolean; - isDead(): boolean; - exitedAfterDisconnect: boolean; - - /** - * events.EventEmitter - * 1. disconnect - * 2. error - * 3. exit - * 4. listening - * 5. message - * 6. online - */ - addListener(event: string, listener: Function): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (code: number, signal: string) => void): this; - addListener(event: "exit", listener: (code: number, signal: string) => void): this; - addListener(event: "listening", listener: (address: Address) => void): this; - addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: () => void): this; - - emit(event: string, listener: Function): boolean - emit(event: "disconnect", listener: () => void): boolean - emit(event: "error", listener: (code: number, signal: string) => void): boolean - emit(event: "exit", listener: (code: number, signal: string) => void): boolean - emit(event: "listening", listener: (address: Address) => void): boolean - emit(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): boolean - emit(event: "online", listener: () => void): boolean - - on(event: string, listener: Function): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (code: number, signal: string) => void): this; - on(event: "exit", listener: (code: number, signal: string) => void): this; - on(event: "listening", listener: (address: Address) => void): this; - on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (code: number, signal: string) => void): this; - once(event: "exit", listener: (code: number, signal: string) => void): this; - once(event: "listening", listener: (address: Address) => void): this; - once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (code: number, signal: string) => void): this; - prependListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependListener(event: "listening", listener: (address: Address) => void): this; - prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "listening", listener: (address: Address) => void): this; - prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: () => void): this; - } - - export interface Cluster extends events.EventEmitter { - Worker: Worker; - disconnect(callback?: Function): void; - fork(env?: any): Worker; - isMaster: boolean; - isWorker: boolean; - // TODO: cluster.schedulingPolicy - settings: ClusterSettings; - setupMaster(settings?: ClusterSetupMasterSettings): void; - worker?: Worker; - workers?: { - [index: string]: Worker - }; - - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - addListener(event: string, listener: Function): this; - addListener(event: "disconnect", listener: (worker: Worker) => void): this; - addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - addListener(event: "fork", listener: (worker: Worker) => void): this; - addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: (worker: Worker) => void): this; - addListener(event: "setup", listener: (settings: any) => void): this; - - emit(event: string, listener: Function): boolean; - emit(event: "disconnect", listener: (worker: Worker) => void): boolean; - emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; - emit(event: "fork", listener: (worker: Worker) => void): boolean; - emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; - emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; - emit(event: "online", listener: (worker: Worker) => void): boolean; - emit(event: "setup", listener: (settings: any) => void): boolean; - - on(event: string, listener: Function): this; - on(event: "disconnect", listener: (worker: Worker) => void): this; - on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - on(event: "fork", listener: (worker: Worker) => void): this; - on(event: "listening", listener: (worker: Worker, address: Address) => void): this; - on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: (worker: Worker) => void): this; - on(event: "setup", listener: (settings: any) => void): this; - - once(event: string, listener: Function): this; - once(event: "disconnect", listener: (worker: Worker) => void): this; - once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - once(event: "fork", listener: (worker: Worker) => void): this; - once(event: "listening", listener: (worker: Worker, address: Address) => void): this; - once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: (worker: Worker) => void): this; - once(event: "setup", listener: (settings: any) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependListener(event: "fork", listener: (worker: Worker) => void): this; - prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: (worker: Worker) => void): this; - prependListener(event: "setup", listener: (settings: any) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; - prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: (worker: Worker) => void): this; - prependOnceListener(event: "setup", listener: (settings: any) => void): this; - - } - - export function disconnect(callback?: Function): void; - export function fork(env?: any): Worker; - export var isMaster: boolean; - export var isWorker: boolean; - // TODO: cluster.schedulingPolicy - export var settings: ClusterSettings; - export function setupMaster(settings?: ClusterSetupMasterSettings): void; - export var worker: Worker; - export var workers: { - [index: string]: Worker - }; - - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - export function addListener(event: string, listener: Function): Cluster; - export function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function addListener(event: "fork", listener: (worker: Worker) => void): Cluster; - export function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function addListener(event: "online", listener: (worker: Worker) => void): Cluster; - export function addListener(event: "setup", listener: (settings: any) => void): Cluster; - - export function emit(event: string, listener: Function): boolean; - export function emit(event: "disconnect", listener: (worker: Worker) => void): boolean; - export function emit(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): boolean; - export function emit(event: "fork", listener: (worker: Worker) => void): boolean; - export function emit(event: "listening", listener: (worker: Worker, address: Address) => void): boolean; - export function emit(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): boolean; - export function emit(event: "online", listener: (worker: Worker) => void): boolean; - export function emit(event: "setup", listener: (settings: any) => void): boolean; - - export function on(event: string, listener: Function): Cluster; - export function on(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function on(event: "fork", listener: (worker: Worker) => void): Cluster; - export function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function on(event: "online", listener: (worker: Worker) => void): Cluster; - export function on(event: "setup", listener: (settings: any) => void): Cluster; - - export function once(event: string, listener: Function): Cluster; - export function once(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function once(event: "fork", listener: (worker: Worker) => void): Cluster; - export function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function once(event: "online", listener: (worker: Worker) => void): Cluster; - export function once(event: "setup", listener: (settings: any) => void): Cluster; - - export function removeListener(event: string, listener: Function): Cluster; - export function removeAllListeners(event?: string): Cluster; - export function setMaxListeners(n: number): Cluster; - export function getMaxListeners(): number; - export function listeners(event: string): Function[]; - export function listenerCount(type: string): number; - - export function prependListener(event: string, listener: Function): Cluster; - export function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster; - export function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function prependListener(event: "online", listener: (worker: Worker) => void): Cluster; - export function prependListener(event: "setup", listener: (settings: any) => void): Cluster; - - export function prependOnceListener(event: string, listener: Function): Cluster; - export function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster; - export function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster; - export function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster; - export function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster; - export function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined. - export function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster; - export function prependOnceListener(event: "setup", listener: (settings: any) => void): Cluster; - - export function eventNames(): string[]; -} - -declare module "zlib" { - import * as stream from "stream"; - - export interface ZlibOptions { - flush?: number; // default: zlib.constants.Z_NO_FLUSH - finishFlush?: number; // default: zlib.constants.Z_FINISH - chunkSize?: number; // default: 16*1024 - windowBits?: number; - level?: number; // compression only - memLevel?: number; // compression only - strategy?: number; // compression only - dictionary?: any; // deflate/inflate only, empty dictionary by default - } - - export interface Gzip extends stream.Transform { } - export interface Gunzip extends stream.Transform { } - export interface Deflate extends stream.Transform { } - export interface Inflate extends stream.Transform { } - export interface DeflateRaw extends stream.Transform { } - export interface InflateRaw extends stream.Transform { } - export interface Unzip extends stream.Transform { } - - export function createGzip(options?: ZlibOptions): Gzip; - export function createGunzip(options?: ZlibOptions): Gunzip; - export function createDeflate(options?: ZlibOptions): Deflate; - export function createInflate(options?: ZlibOptions): Inflate; - export function createDeflateRaw(options?: ZlibOptions): DeflateRaw; - export function createInflateRaw(options?: ZlibOptions): InflateRaw; - export function createUnzip(options?: ZlibOptions): Unzip; - - export function deflate(buf: Buffer | string, callback: (error: Error, result: Buffer) => void): void; - export function deflate(buf: Buffer | string, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void; - export function deflateSync(buf: Buffer | string, options?: ZlibOptions): Buffer; - export function deflateRaw(buf: Buffer | string, callback: (error: Error, result: Buffer) => void): void; - export function deflateRaw(buf: Buffer | string, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void; - export function deflateRawSync(buf: Buffer | string, options?: ZlibOptions): Buffer; - export function gzip(buf: Buffer, callback: (error: Error, result: Buffer) => void): void; - export function gzip(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void; - export function gzipSync(buf: Buffer, options?: ZlibOptions): Buffer; - export function gunzip(buf: Buffer, callback: (error: Error, result: Buffer) => void): void; - export function gunzip(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void; - export function gunzipSync(buf: Buffer, options?: ZlibOptions): Buffer; - export function inflate(buf: Buffer, callback: (error: Error, result: Buffer) => void): void; - export function inflate(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void; - export function inflateSync(buf: Buffer, options?: ZlibOptions): Buffer; - export function inflateRaw(buf: Buffer, callback: (error: Error, result: Buffer) => void): void; - export function inflateRaw(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void; - export function inflateRawSync(buf: Buffer, options?: ZlibOptions): Buffer; - export function unzip(buf: Buffer, callback: (error: Error, result: Buffer) => void): void; - export function unzip(buf: Buffer, options: ZlibOptions, callback: (error: Error, result: Buffer) => void): void; - export function unzipSync(buf: Buffer, options?: ZlibOptions): Buffer; - - export namespace constants { - // Allowed flush values. - - export const Z_NO_FLUSH: number; - export const Z_PARTIAL_FLUSH: number; - export const Z_SYNC_FLUSH: number; - export const Z_FULL_FLUSH: number; - export const Z_FINISH: number; - export const Z_BLOCK: number; - export const Z_TREES: number; - - // Return codes for the compression/decompression functions. Negative values are errors, positive values are used for special but normal events. - - export const Z_OK: number; - export const Z_STREAM_END: number; - export const Z_NEED_DICT: number; - export const Z_ERRNO: number; - export const Z_STREAM_ERROR: number; - export const Z_DATA_ERROR: number; - export const Z_MEM_ERROR: number; - export const Z_BUF_ERROR: number; - export const Z_VERSION_ERROR: number; - - // Compression levels. - - export const Z_NO_COMPRESSION: number; - export const Z_BEST_SPEED: number; - export const Z_BEST_COMPRESSION: number; - export const Z_DEFAULT_COMPRESSION: number; - - // Compression strategy. - - export const Z_FILTERED: number; - export const Z_HUFFMAN_ONLY: number; - export const Z_RLE: number; - export const Z_FIXED: number; - export const Z_DEFAULT_STRATEGY: number; - } - - // Constants - export var Z_NO_FLUSH: number; - export var Z_PARTIAL_FLUSH: number; - export var Z_SYNC_FLUSH: number; - export var Z_FULL_FLUSH: number; - export var Z_FINISH: number; - export var Z_BLOCK: number; - export var Z_TREES: number; - export var Z_OK: number; - export var Z_STREAM_END: number; - export var Z_NEED_DICT: number; - export var Z_ERRNO: number; - export var Z_STREAM_ERROR: number; - export var Z_DATA_ERROR: number; - export var Z_MEM_ERROR: number; - export var Z_BUF_ERROR: number; - export var Z_VERSION_ERROR: number; - export var Z_NO_COMPRESSION: number; - export var Z_BEST_SPEED: number; - export var Z_BEST_COMPRESSION: number; - export var Z_DEFAULT_COMPRESSION: number; - export var Z_FILTERED: number; - export var Z_HUFFMAN_ONLY: number; - export var Z_RLE: number; - export var Z_FIXED: number; - export var Z_DEFAULT_STRATEGY: number; - export var Z_BINARY: number; - export var Z_TEXT: number; - export var Z_ASCII: number; - export var Z_UNKNOWN: number; - export var Z_DEFLATED: number; -} - -declare module "os" { - export interface CpuInfo { - model: string; - speed: number; - times: { - user: number; - nice: number; - sys: number; - idle: number; - irq: number; - }; - } - - export interface NetworkInterfaceInfo { - address: string; - netmask: string; - family: string; - mac: string; - internal: boolean; - } - - export function hostname(): string; - export function loadavg(): number[]; - export function uptime(): number; - export function freemem(): number; - export function totalmem(): number; - export function cpus(): CpuInfo[]; - export function type(): string; - export function release(): string; - export function networkInterfaces(): { [index: string]: NetworkInterfaceInfo[] }; - export function homedir(): string; - export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string } - export var constants: { - UV_UDP_REUSEADDR: number, - signals: { - SIGHUP: number; - SIGINT: number; - SIGQUIT: number; - SIGILL: number; - SIGTRAP: number; - SIGABRT: number; - SIGIOT: number; - SIGBUS: number; - SIGFPE: number; - SIGKILL: number; - SIGUSR1: number; - SIGSEGV: number; - SIGUSR2: number; - SIGPIPE: number; - SIGALRM: number; - SIGTERM: number; - SIGCHLD: number; - SIGSTKFLT: number; - SIGCONT: number; - SIGSTOP: number; - SIGTSTP: number; - SIGTTIN: number; - SIGTTOU: number; - SIGURG: number; - SIGXCPU: number; - SIGXFSZ: number; - SIGVTALRM: number; - SIGPROF: number; - SIGWINCH: number; - SIGIO: number; - SIGPOLL: number; - SIGPWR: number; - SIGSYS: number; - SIGUNUSED: number; - }, - errno: { - E2BIG: number; - EACCES: number; - EADDRINUSE: number; - EADDRNOTAVAIL: number; - EAFNOSUPPORT: number; - EAGAIN: number; - EALREADY: number; - EBADF: number; - EBADMSG: number; - EBUSY: number; - ECANCELED: number; - ECHILD: number; - ECONNABORTED: number; - ECONNREFUSED: number; - ECONNRESET: number; - EDEADLK: number; - EDESTADDRREQ: number; - EDOM: number; - EDQUOT: number; - EEXIST: number; - EFAULT: number; - EFBIG: number; - EHOSTUNREACH: number; - EIDRM: number; - EILSEQ: number; - EINPROGRESS: number; - EINTR: number; - EINVAL: number; - EIO: number; - EISCONN: number; - EISDIR: number; - ELOOP: number; - EMFILE: number; - EMLINK: number; - EMSGSIZE: number; - EMULTIHOP: number; - ENAMETOOLONG: number; - ENETDOWN: number; - ENETRESET: number; - ENETUNREACH: number; - ENFILE: number; - ENOBUFS: number; - ENODATA: number; - ENODEV: number; - ENOENT: number; - ENOEXEC: number; - ENOLCK: number; - ENOLINK: number; - ENOMEM: number; - ENOMSG: number; - ENOPROTOOPT: number; - ENOSPC: number; - ENOSR: number; - ENOSTR: number; - ENOSYS: number; - ENOTCONN: number; - ENOTDIR: number; - ENOTEMPTY: number; - ENOTSOCK: number; - ENOTSUP: number; - ENOTTY: number; - ENXIO: number; - EOPNOTSUPP: number; - EOVERFLOW: number; - EPERM: number; - EPIPE: number; - EPROTO: number; - EPROTONOSUPPORT: number; - EPROTOTYPE: number; - ERANGE: number; - EROFS: number; - ESPIPE: number; - ESRCH: number; - ESTALE: number; - ETIME: number; - ETIMEDOUT: number; - ETXTBSY: number; - EWOULDBLOCK: number; - EXDEV: number; - }, - }; - export function arch(): string; - export function platform(): NodeJS.Platform; - export function tmpdir(): string; - export var EOL: string; - export function endianness(): "BE" | "LE"; -} - -declare module "https" { - import * as tls from "tls"; - import * as events from "events"; - import * as http from "http"; - - export interface ServerOptions { - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - crl?: any; - ciphers?: string; - honorCipherOrder?: boolean; - requestCert?: boolean; - rejectUnauthorized?: boolean; - NPNProtocols?: any; - SNICallback?: (servername: string, cb: (err: Error, ctx: tls.SecureContext) => any) => any; - } - - export interface RequestOptions extends http.RequestOptions { - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - ciphers?: string; - rejectUnauthorized?: boolean; - secureProtocol?: string; - } - - export interface ClientRequest extends http.ClientRequest {} - - export interface IncomingMessage extends http.IncomingMessage {} - - export interface ServerResponse extends http.ServerResponse { } - - export interface Agent extends http.Agent { } - - export interface AgentOptions extends http.AgentOptions { - pfx?: any; - key?: any; - passphrase?: string; - cert?: any; - ca?: any; - ciphers?: string; - rejectUnauthorized?: boolean; - secureProtocol?: string; - maxCachedSessions?: number; - } - - export var Agent: { - new (options?: AgentOptions): Agent; - }; - export interface Server extends tls.Server { } - export function createServer(options: ServerOptions, requestListener?: (req: IncomingMessage, res: ServerResponse) => void): Server; - export function request(options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - export function get(options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - export var globalAgent: Agent; -} - -declare module "punycode" { - export function decode(string: string): string; - export function encode(string: string): string; - export function toUnicode(domain: string): string; - export function toASCII(domain: string): string; - export var ucs2: ucs2; - interface ucs2 { - decode(string: string): number[]; - encode(codePoints: number[]): string; - } - export var version: any; -} - -declare module "repl" { - import * as stream from "stream"; - import * as readline from "readline"; - - export interface ReplOptions { - prompt?: string; - input?: NodeJS.ReadableStream; - output?: NodeJS.WritableStream; - terminal?: boolean; - eval?: Function; - useColors?: boolean; - useGlobal?: boolean; - ignoreUndefined?: boolean; - writer?: Function; - completer?: Function; - replMode?: any; - breakEvalOnSigint?: any; - } - - export interface REPLServer extends readline.ReadLine { - defineCommand(keyword: string, cmd: Function | { help: string, action: Function }): void; - displayPrompt(preserveCursor?: boolean): void; - - /** - * events.EventEmitter - * 1. exit - * 2. reset - **/ - - addListener(event: string, listener: Function): this; - addListener(event: "exit", listener: () => void): this; - addListener(event: "reset", listener: Function): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "exit"): boolean; - emit(event: "reset", context: any): boolean; - - on(event: string, listener: Function): this; - on(event: "exit", listener: () => void): this; - on(event: "reset", listener: Function): this; - - once(event: string, listener: Function): this; - once(event: "exit", listener: () => void): this; - once(event: "reset", listener: Function): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "exit", listener: () => void): this; - prependListener(event: "reset", listener: Function): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "exit", listener: () => void): this; - prependOnceListener(event: "reset", listener: Function): this; - } - - export function start(options: ReplOptions): REPLServer; -} - -declare module "readline" { - import * as events from "events"; - import * as stream from "stream"; - - export interface Key { - sequence?: string; - name?: string; - ctrl?: boolean; - meta?: boolean; - shift?: boolean; - } - - export interface ReadLine extends events.EventEmitter { - setPrompt(prompt: string): void; - prompt(preserveCursor?: boolean): void; - question(query: string, callback: (answer: string) => void): void; - pause(): ReadLine; - resume(): ReadLine; - close(): void; - write(data: string | Buffer, key?: Key): void; - - /** - * events.EventEmitter - * 1. close - * 2. line - * 3. pause - * 4. resume - * 5. SIGCONT - * 6. SIGINT - * 7. SIGTSTP - **/ - - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "line", listener: (input: any) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "SIGCONT", listener: () => void): this; - addListener(event: "SIGINT", listener: () => void): this; - addListener(event: "SIGTSTP", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "line", input: any): boolean; - emit(event: "pause"): boolean; - emit(event: "resume"): boolean; - emit(event: "SIGCONT"): boolean; - emit(event: "SIGINT"): boolean; - emit(event: "SIGTSTP"): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "line", listener: (input: any) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "SIGCONT", listener: () => void): this; - on(event: "SIGINT", listener: () => void): this; - on(event: "SIGTSTP", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "line", listener: (input: any) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "SIGCONT", listener: () => void): this; - once(event: "SIGINT", listener: () => void): this; - once(event: "SIGTSTP", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "line", listener: (input: any) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "SIGCONT", listener: () => void): this; - prependListener(event: "SIGINT", listener: () => void): this; - prependListener(event: "SIGTSTP", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "line", listener: (input: any) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "SIGCONT", listener: () => void): this; - prependOnceListener(event: "SIGINT", listener: () => void): this; - prependOnceListener(event: "SIGTSTP", listener: () => void): this; - } - - type Completer = (line: string) => CompleterResult; - type AsyncCompleter = (line: string, callback: (err: any, result: CompleterResult) => void) => any; - - export type CompleterResult = [string[], string]; - - export interface ReadLineOptions { - input: NodeJS.ReadableStream; - output?: NodeJS.WritableStream; - completer?: Completer | AsyncCompleter; - terminal?: boolean; - historySize?: number; - } - - export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): ReadLine; - export function createInterface(options: ReadLineOptions): ReadLine; - - export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void; - export function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void; - export function clearLine(stream: NodeJS.WritableStream, dir: number): void; - export function clearScreenDown(stream: NodeJS.WritableStream): void; -} - -declare module "vm" { - export interface Context { } - export interface ScriptOptions { - filename?: string; - lineOffset?: number; - columnOffset?: number; - displayErrors?: boolean; - timeout?: number; - cachedData?: Buffer; - produceCachedData?: boolean; - } - export interface RunningScriptOptions { - filename?: string; - lineOffset?: number; - columnOffset?: number; - displayErrors?: boolean; - timeout?: number; - } - export class Script { - constructor(code: string, options?: ScriptOptions); - runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; - runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; - runInThisContext(options?: RunningScriptOptions): any; - } - export function createContext(sandbox?: Context): Context; - export function isContext(sandbox: Context): boolean; - export function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions): any; - export function runInDebugContext(code: string): any; - export function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions): any; - export function runInThisContext(code: string, options?: RunningScriptOptions): any; -} - -declare module "child_process" { - import * as events from "events"; - import * as stream from "stream"; - import * as net from "net"; - - export interface ChildProcess extends events.EventEmitter { - stdin: stream.Writable; - stdout: stream.Readable; - stderr: stream.Readable; - stdio: [stream.Writable, stream.Readable, stream.Readable]; - pid: number; - kill(signal?: string): void; - send(message: any, sendHandle?: any): boolean; - connected: boolean; - disconnect(): void; - unref(): void; - ref(): void; - - /** - * events.EventEmitter - * 1. close - * 2. disconnect - * 3. error - * 4. exit - * 5. message - **/ - - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: (code: number, signal: string) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "exit", listener: (code: number, signal: string) => void): this; - addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close", code: number, signal: string): boolean; - emit(event: "disconnect"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "exit", code: number, signal: string): boolean; - emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: (code: number, signal: string) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "exit", listener: (code: number, signal: string) => void): this; - on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: (code: number, signal: string) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "exit", listener: (code: number, signal: string) => void): this; - once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: (code: number, signal: string) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this; - } - - export interface SpawnOptions { - cwd?: string; - env?: any; - stdio?: any; - detached?: boolean; - uid?: number; - gid?: number; - shell?: boolean | string; - } - export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess; - - export interface ExecOptions { - cwd?: string; - env?: any; - shell?: string; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - uid?: number; - gid?: number; - } - export interface ExecOptionsWithStringEncoding extends ExecOptions { - encoding: BufferEncoding; - } - export interface ExecOptionsWithBufferEncoding extends ExecOptions { - encoding: string; // specify `null`. - } - export function exec(command: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function exec(command: string, options: ExecOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - // usage. child_process.exec("tsc", {encoding: null as string}, (err, stdout, stderr) => {}); - export function exec(command: string, options: ExecOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function exec(command: string, options: ExecOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - - export interface ExecFileOptions { - cwd?: string; - env?: any; - timeout?: number; - maxBuffer?: number; - killSignal?: string; - uid?: number; - gid?: number; - } - export interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { - encoding: BufferEncoding; - } - export interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { - encoding: string; // specify `null`. - } - export function execFile(file: string, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function execFile(file: string, options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - // usage. child_process.execFile("file.sh", {encoding: null as string}, (err, stdout, stderr) => {}); - export function execFile(file: string, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function execFile(file: string, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function execFile(file: string, args?: string[], callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - // usage. child_process.execFile("file.sh", ["foo"], {encoding: null as string}, (err, stdout, stderr) => {}); - export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) => void): ChildProcess; - export function execFile(file: string, args?: string[], options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) => void): ChildProcess; - - export interface ForkOptions { - cwd?: string; - env?: any; - execPath?: string; - execArgv?: string[]; - silent?: boolean; - stdio?: any[]; - uid?: number; - gid?: number; - } - export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess; - - export interface SpawnSyncOptions { - cwd?: string; - input?: string | Buffer; - stdio?: any; - env?: any; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string; - maxBuffer?: number; - encoding?: string; - shell?: boolean | string; - } - export interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { - encoding: BufferEncoding; - } - export interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { - encoding: string; // specify `null`. - } - export interface SpawnSyncReturns { - pid: number; - output: string[]; - stdout: T; - stderr: T; - status: number; - signal: string; - error: Error; - } - export function spawnSync(command: string): SpawnSyncReturns; - export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; - export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns; - - export interface ExecSyncOptions { - cwd?: string; - input?: string | Buffer; - stdio?: any; - env?: any; - shell?: string; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string; - maxBuffer?: number; - encoding?: string; - } - export interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { - encoding: BufferEncoding; - } - export interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { - encoding: string; // specify `null`. - } - export function execSync(command: string): Buffer; - export function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string; - export function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer; - export function execSync(command: string, options?: ExecSyncOptions): Buffer; - - export interface ExecFileSyncOptions { - cwd?: string; - input?: string | Buffer; - stdio?: any; - env?: any; - uid?: number; - gid?: number; - timeout?: number; - killSignal?: string; - maxBuffer?: number; - encoding?: string; - } - export interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { - encoding: BufferEncoding; - } - export interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { - encoding: string; // specify `null`. - } - export function execFileSync(command: string): Buffer; - export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string; - export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer; - export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string; - export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer; - export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer; -} - -declare module "url" { - export interface Url { - href?: string; - protocol?: string; - auth?: string; - hostname?: string; - port?: string; - host?: string; - pathname?: string; - search?: string; - query?: string | any; - slashes?: boolean; - hash?: string; - path?: string; - } - - export interface UrlObject { - protocol?: string; - slashes?: boolean; - auth?: string; - host?: string; - hostname?: string; - port?: string | number; - pathname?: string; - search?: string; - query?: { [key: string]: any; }; - hash?: string; - } - - export function parse(urlStr: string, parseQueryString?: boolean, slashesDenoteHost?: boolean): Url; - export function format(URL: URL, options?: URLFormatOptions): string; - export function format(urlObject: UrlObject): string; - export function resolve(from: string, to: string): string; - - export interface URLFormatOptions { - auth?: boolean; - fragment?: boolean; - search?: boolean; - unicode?: boolean; - } - - export class URLSearchParams implements Iterable { - constructor(init?: URLSearchParams | string | { [key: string]: string | string[] } | Iterable ); - append(name: string, value: string): void; - delete(name: string): void; - entries(): Iterator; - forEach(callback: (value: string, name: string) => void): void; - get(name: string): string | null; - getAll(name: string): string[]; - has(name: string): boolean; - keys(): Iterator; - set(name: string, value: string): void; - sort(): void; - toString(): string; - values(): Iterator; - [Symbol.iterator](): Iterator; - } - - export class URL { - constructor(input: string, base?: string | URL); - hash: string; - host: string; - hostname: string; - href: string; - readonly origin: string; - password: string; - pathname: string; - port: string; - protocol: string; - search: string; - readonly searchParams: URLSearchParams; - username: string; - toString(): string; - toJSON(): string; - } -} - -declare module "dns" { - // Supported getaddrinfo flags. - export const ADDRCONFIG: number; - export const V4MAPPED: number; - - export interface LookupOptions { - family?: number; - hints?: number; - all?: boolean; - } - - export interface LookupOneOptions extends LookupOptions { - all?: false; - } - - export interface LookupAllOptions extends LookupOptions { - all: true; - } - - export interface LookupAddress { - address: string; - family: number; - } - - export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void; - export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void; - export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void; - export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void; - export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void; - - export interface ResolveOptions { - ttl: boolean; - } - - export interface ResolveWithTtlOptions extends ResolveOptions { - ttl: true; - } - - export interface RecordWithTtl { - address: string; - ttl: number; - } - - export interface MxRecord { - priority: number; - exchange: string; - } - - export interface NaptrRecord { - flags: string; - service: string; - regexp: string; - replacement: string; - order: number; - preference: number; - } - - export interface SoaRecord { - nsname: string; - hostmaster: string; - serial: number; - refresh: number; - retry: number; - expire: number; - minttl: number; - } - - export interface SrvRecord { - priority: number; - weight: number; - port: number; - name: string; - } - - export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void; - export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void; - export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void; - export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void; - export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void; - export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void; - - export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void; - export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void; - - export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void; - export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void; - - export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void; - export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void; - export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void; - export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void; - export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void; - export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void; - - export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void; - export function setServers(servers: string[]): void; - - //Error codes - export var NODATA: string; - export var FORMERR: string; - export var SERVFAIL: string; - export var NOTFOUND: string; - export var NOTIMP: string; - export var REFUSED: string; - export var BADQUERY: string; - export var BADNAME: string; - export var BADFAMILY: string; - export var BADRESP: string; - export var CONNREFUSED: string; - export var TIMEOUT: string; - export var EOF: string; - export var FILE: string; - export var NOMEM: string; - export var DESTRUCTION: string; - export var BADSTR: string; - export var BADFLAGS: string; - export var NONAME: string; - export var BADHINTS: string; - export var NOTINITIALIZED: string; - export var LOADIPHLPAPI: string; - export var ADDRGETNETWORKPARAMS: string; - export var CANCELLED: string; -} - -declare module "net" { - import * as stream from "stream"; - import * as events from "events"; - - export interface Socket extends stream.Duplex { - // Extended base methods - write(buffer: Buffer): boolean; - write(buffer: Buffer, cb?: Function): boolean; - write(str: string, cb?: Function): boolean; - write(str: string, encoding?: string, cb?: Function): boolean; - write(str: string, encoding?: string, fd?: string): boolean; - - connect(port: number, host?: string, connectionListener?: Function): void; - connect(path: string, connectionListener?: Function): void; - bufferSize: number; - setEncoding(encoding?: string): this; - write(data: any, encoding?: string, callback?: Function): void; - destroy(err?: any): void; - pause(): this; - resume(): this; - setTimeout(timeout: number, callback?: Function): void; - setNoDelay(noDelay?: boolean): void; - setKeepAlive(enable?: boolean, initialDelay?: number): void; - address(): { port: number; family: string; address: string; }; - unref(): void; - ref(): void; - - remoteAddress: string; - remoteFamily: string; - remotePort: number; - localAddress: string; - localPort: number; - bytesRead: number; - bytesWritten: number; - connecting: boolean; - destroyed: boolean; - - // Extended base methods - end(): void; - end(buffer: Buffer, cb?: Function): void; - end(str: string, cb?: Function): void; - end(str: string, encoding?: string, cb?: Function): void; - end(data?: any, encoding?: string): void; - - /** - * events.EventEmitter - * 1. close - * 2. connect - * 3. data - * 4. drain - * 5. end - * 6. error - * 7. lookup - * 8. timeout - */ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: (had_error: boolean) => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "data", listener: (data: Buffer) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - addListener(event: "timeout", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close", had_error: boolean): boolean; - emit(event: "connect"): boolean; - emit(event: "data", data: Buffer): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; - emit(event: "timeout"): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: (had_error: boolean) => void): this; - on(event: "connect", listener: () => void): this; - on(event: "data", listener: (data: Buffer) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - on(event: "timeout", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: (had_error: boolean) => void): this; - once(event: "connect", listener: () => void): this; - once(event: "data", listener: (data: Buffer) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - once(event: "timeout", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: (had_error: boolean) => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "data", listener: (data: Buffer) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependListener(event: "timeout", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: (had_error: boolean) => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener(event: "data", listener: (data: Buffer) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - } - - export var Socket: { - new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; - }; - - export interface ListenOptions { - port?: number; - host?: string; - backlog?: number; - path?: string; - exclusive?: boolean; - } - - export interface Server extends events.EventEmitter { - listen(port: number, hostname?: string, backlog?: number, listeningListener?: Function): Server; - listen(port: number, hostname?: string, listeningListener?: Function): Server; - listen(port: number, backlog?: number, listeningListener?: Function): Server; - listen(port: number, listeningListener?: Function): Server; - listen(path: string, backlog?: number, listeningListener?: Function): Server; - listen(path: string, listeningListener?: Function): Server; - listen(options: ListenOptions, listeningListener?: Function): Server; - listen(handle: any, backlog?: number, listeningListener?: Function): Server; - listen(handle: any, listeningListener?: Function): Server; - close(callback?: Function): Server; - address(): { port: number; family: string; address: string; }; - getConnections(cb: (error: Error, count: number) => void): void; - ref(): Server; - unref(): Server; - maxConnections: number; - connections: number; - listening: boolean; - - /** - * events.EventEmitter - * 1. close - * 2. connection - * 3. error - * 4. listening - */ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Socket) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Socket): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Socket) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Socket) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Socket) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - } - export function createServer(connectionListener?: (socket: Socket) => void): Server; - export function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server; - export function connect(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; - export function connect(port: number, host?: string, connectionListener?: Function): Socket; - export function connect(path: string, connectionListener?: Function): Socket; - export function createConnection(options: { port: number, host?: string, localAddress?: string, localPort?: string, family?: number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket; - export function createConnection(port: number, host?: string, connectionListener?: Function): Socket; - export function createConnection(path: string, connectionListener?: Function): Socket; - export function isIP(input: string): number; - export function isIPv4(input: string): boolean; - export function isIPv6(input: string): boolean; -} - -declare module "dgram" { - import * as events from "events"; - - interface RemoteInfo { - address: string; - family: string; - port: number; - } - - interface AddressInfo { - address: string; - family: string; - port: number; - } - - interface BindOptions { - port: number; - address?: string; - exclusive?: boolean; - } - - type SocketType = "udp4" | "udp6"; - - interface SocketOptions { - type: SocketType; - reuseAddr?: boolean; - } - - export function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - - export interface Socket extends events.EventEmitter { - send(msg: Buffer | String | any[], port: number, address: string, callback?: (error: Error, bytes: number) => void): void; - send(msg: Buffer | String | any[], offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void; - bind(port?: number, address?: string, callback?: () => void): void; - bind(options: BindOptions, callback?: Function): void; - close(callback?: () => void): void; - address(): AddressInfo; - setBroadcast(flag: boolean): void; - setTTL(ttl: number): void; - setMulticastTTL(ttl: number): void; - setMulticastLoopback(flag: boolean): void; - addMembership(multicastAddress: string, multicastInterface?: string): void; - dropMembership(multicastAddress: string, multicastInterface?: string): void; - ref(): this; - unref(): this; - - /** - * events.EventEmitter - * 1. close - * 2. error - * 3. listening - * 4. message - **/ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit(event: "message", msg: Buffer, rinfo: AddressInfo): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: AddressInfo) => void): this; - } -} - -declare module "fs" { - import * as stream from "stream"; - import * as events from "events"; - - interface Stats { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: number; - ino: number; - mode: number; - nlink: number; - uid: number; - gid: number; - rdev: number; - size: number; - blksize: number; - blocks: number; - atime: Date; - mtime: Date; - ctime: Date; - birthtime: Date; - } - - interface FSWatcher extends events.EventEmitter { - close(): void; - - /** - * events.EventEmitter - * 1. change - * 2. error - */ - addListener(event: string, listener: Function): this; - addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - addListener(event: "error", listener: (code: number, signal: string) => void): this; - - on(event: string, listener: Function): this; - on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - on(event: "error", listener: (code: number, signal: string) => void): this; - - once(event: string, listener: Function): this; - once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - once(event: "error", listener: (code: number, signal: string) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependListener(event: "error", listener: (code: number, signal: string) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this; - prependOnceListener(event: "error", listener: (code: number, signal: string) => void): this; - } - - export interface ReadStream extends stream.Readable { - close(): void; - destroy(): void; - bytesRead: number; - path: string | Buffer; - - /** - * events.EventEmitter - * 1. open - * 2. close - */ - addListener(event: string, listener: Function): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "close", listener: () => void): this; - - on(event: string, listener: Function): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "close", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "close", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "close", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - } - - export interface WriteStream extends stream.Writable { - close(): void; - bytesWritten: number; - path: string | Buffer; - - /** - * events.EventEmitter - * 1. open - * 2. close - */ - addListener(event: string, listener: Function): this; - addListener(event: "open", listener: (fd: number) => void): this; - addListener(event: "close", listener: () => void): this; - - on(event: string, listener: Function): this; - on(event: "open", listener: (fd: number) => void): this; - on(event: "close", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "open", listener: (fd: number) => void): this; - once(event: "close", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "open", listener: (fd: number) => void): this; - prependListener(event: "close", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "open", listener: (fd: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - } - - /** - * Asynchronous rename. - * @param oldPath - * @param newPath - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - /** - * Synchronous rename - * @param oldPath - * @param newPath - */ - export function renameSync(oldPath: string, newPath: string): void; - export function truncate(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncate(path: string | Buffer, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function truncateSync(path: string | Buffer, len?: number): void; - export function ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function ftruncateSync(fd: number, len?: number): void; - export function chown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chownSync(path: string | Buffer, uid: number, gid: number): void; - export function fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchownSync(fd: number, uid: number, gid: number): void; - export function lchown(path: string | Buffer, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchownSync(path: string | Buffer, uid: number, gid: number): void; - export function chmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function chmodSync(path: string | Buffer, mode: number): void; - export function chmodSync(path: string | Buffer, mode: string): void; - export function fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fchmodSync(fd: number, mode: number): void; - export function fchmodSync(fd: number, mode: string): void; - export function lchmod(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmod(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function lchmodSync(path: string | Buffer, mode: number): void; - export function lchmodSync(path: string | Buffer, mode: string): void; - export function stat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function lstat(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void; - export function statSync(path: string | Buffer): Stats; - export function lstatSync(path: string | Buffer): Stats; - export function fstatSync(fd: number): Stats; - export function link(srcpath: string | Buffer, dstpath: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function linkSync(srcpath: string | Buffer, dstpath: string | Buffer): void; - export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function symlinkSync(srcpath: string | Buffer, dstpath: string | Buffer, type?: string): void; - export function readlink(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void; - export function readlinkSync(path: string | Buffer): string; - export function realpath(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; - export function realpathSync(path: string | Buffer, cache?: { [path: string]: string }): string; - /** - * Asynchronous unlink - deletes the file specified in {path} - * - * @param path - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function unlink(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - /** - * Synchronous unlink - deletes the file specified in {path} - * - * @param path - */ - export function unlinkSync(path: string | Buffer): void; - /** - * Asynchronous rmdir - removes the directory specified in {path} - * - * @param path - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function rmdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - /** - * Synchronous rmdir - removes the directory specified in {path} - * - * @param path - */ - export function rmdirSync(path: string | Buffer): void; - /** - * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void; - /** - * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param mode - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdir(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - /** - * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param mode - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdir(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void; - /** - * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param mode - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdirSync(path: string | Buffer, mode?: number): void; - /** - * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. - * - * @param path - * @param mode - * @param callback No arguments other than a possible exception are given to the completion callback. - */ - export function mkdirSync(path: string | Buffer, mode?: string): void; - /** - * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * - * @param prefix - * @param callback The created folder path is passed as a string to the callback's second parameter. - */ - export function mkdtemp(prefix: string, callback?: (err: NodeJS.ErrnoException, folder: string) => void): void; - /** - * Synchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * - * @param prefix - * @returns Returns the created folder path. - */ - export function mkdtempSync(prefix: string): string; - export function readdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; - export function readdir(path: string | Buffer, options: string | {}, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; - export function readdirSync(path: string | Buffer, options?: string | {}): string[]; - export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function closeSync(fd: number): void; - export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; - export function open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; - export function openSync(path: string | Buffer, flags: string | number, mode?: number): number; - export function utimes(path: string | Buffer, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function utimesSync(path: string | Buffer, atime: number, mtime: number): void; - export function utimesSync(path: string | Buffer, atime: Date, mtime: Date): void; - export function futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function futimesSync(fd: number, atime: number, mtime: number): void; - export function futimesSync(fd: number, atime: Date, mtime: Date): void; - export function fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void; - export function fsyncSync(fd: number): void; - export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; - export function write(fd: number, buffer: Buffer, offset: number, length: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; - export function write(fd: number, data: any, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; - export function write(fd: number, data: any, offset: number, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; - export function write(fd: number, data: any, offset: number, encoding: string, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; - export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position?: number | null): number; - export function writeSync(fd: number, data: any, position?: number | null, enconding?: string): number; - export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void; - export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number | null): number; - /** - * Asynchronous readFile - Asynchronously reads the entire contents of a file. - * - * @param fileName - * @param encoding - * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. - */ - export function readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void; - /** - * Asynchronous readFile - Asynchronously reads the entire contents of a file. - * - * @param fileName - * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer. - * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. - */ - export function readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void; - /** - * Asynchronous readFile - Asynchronously reads the entire contents of a file. - * - * @param fileName - * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer. - * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. - */ - export function readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; - /** - * Asynchronous readFile - Asynchronously reads the entire contents of a file. - * - * @param fileName - * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file. - */ - export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; - /** - * Synchronous readFile - Synchronously reads the entire contents of a file. - * - * @param fileName - * @param encoding - */ - export function readFileSync(filename: string, encoding: string): string; - /** - * Synchronous readFile - Synchronously reads the entire contents of a file. - * - * @param fileName - * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer. - */ - export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string; - /** - * Synchronous readFile - Synchronously reads the entire contents of a file. - * - * @param fileName - * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer. - */ - export function readFileSync(filename: string, options?: { flag?: string; }): Buffer; - export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; - export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; - export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; - export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; - export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void; - export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void; - export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void; - export function unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void; - export function watch(filename: string, listener?: (event: string, filename: string) => any): FSWatcher; - export function watch(filename: string, encoding: string, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; - export function watch(filename: string, options: { persistent?: boolean; recursive?: boolean; encoding?: string }, listener?: (event: string, filename: string | Buffer) => any): FSWatcher; - export function exists(path: string | Buffer, callback?: (exists: boolean) => void): void; - export function existsSync(path: string | Buffer): boolean; - - export namespace constants { - // File Access Constants - - /** Constant for fs.access(). File is visible to the calling process. */ - export const F_OK: number; - - /** Constant for fs.access(). File can be read by the calling process. */ - export const R_OK: number; - - /** Constant for fs.access(). File can be written by the calling process. */ - export const W_OK: number; - - /** Constant for fs.access(). File can be executed by the calling process. */ - export const X_OK: number; - - // File Open Constants - - /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ - export const O_RDONLY: number; - - /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ - export const O_WRONLY: number; - - /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ - export const O_RDWR: number; - - /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ - export const O_CREAT: number; - - /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ - export const O_EXCL: number; - - /** Constant for fs.open(). Flag indicating that if path identifies a terminal device, opening the path shall not cause that terminal to become the controlling terminal for the process (if the process does not already have one). */ - export const O_NOCTTY: number; - - /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ - export const O_TRUNC: number; - - /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ - export const O_APPEND: number; - - /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ - export const O_DIRECTORY: number; - - /** Constant for fs.open(). Flag indicating reading accesses to the file system will no longer result in an update to the atime information associated with the file. This flag is available on Linux operating systems only. */ - export const O_NOATIME: number; - - /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ - export const O_NOFOLLOW: number; - - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ - export const O_SYNC: number; - - /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ - export const O_SYMLINK: number; - - /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ - export const O_DIRECT: number; - - /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ - export const O_NONBLOCK: number; - - // File Type Constants - - /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ - export const S_IFMT: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ - export const S_IFREG: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ - export const S_IFDIR: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ - export const S_IFCHR: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ - export const S_IFBLK: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ - export const S_IFIFO: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ - export const S_IFLNK: number; - - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ - export const S_IFSOCK: number; - - // File Mode Constants - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ - export const S_IRWXU: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ - export const S_IRUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ - export const S_IWUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ - export const S_IXUSR: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ - export const S_IRWXG: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ - export const S_IRGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ - export const S_IWGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ - export const S_IXGRP: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ - export const S_IRWXO: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ - export const S_IROTH: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ - export const S_IWOTH: number; - - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ - export const S_IXOTH: number; - } - - /** Tests a user's permissions for the file specified by path. */ - export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; - export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; - /** Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise. */ - export function accessSync(path: string | Buffer, mode?: number): void; - export function createReadStream(path: string | Buffer, options?: { - flags?: string; - encoding?: string; - fd?: number; - mode?: number; - autoClose?: boolean; - start?: number; - end?: number; - }): ReadStream; - export function createWriteStream(path: string | Buffer, options?: { - flags?: string; - encoding?: string; - fd?: number; - mode?: number; - autoClose?: boolean; - start?: number; - }): WriteStream; - export function fdatasync(fd: number, callback: Function): void; - export function fdatasyncSync(fd: number): void; -} - -declare module "path" { - - /** - * A parsed path object generated by path.parse() or consumed by path.format(). - */ - export interface ParsedPath { - /** - * The root of the path such as '/' or 'c:\' - */ - root: string; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir: string; - /** - * The file name including extension (if any) such as 'index.html' - */ - base: string; - /** - * The file extension (if any) such as '.html' - */ - ext: string; - /** - * The file name without extension (if any) such as 'index' - */ - name: string; - } - - /** - * Normalize a string path, reducing '..' and '.' parts. - * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. - * - * @param p string path to normalize. - */ - export function normalize(p: string): string; - /** - * Join all arguments together and normalize the resulting path. - * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown. - * - * @param paths paths to join. - */ - export function join(...paths: string[]): string; - /** - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. - * - * Starting from leftmost {from} paramter, resolves {to} to an absolute path. - * - * If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory. - * - * @param pathSegments string paths to join. Non-string arguments are ignored. - */ - export function resolve(...pathSegments: any[]): string; - /** - * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. - * - * @param path path to test. - */ - export function isAbsolute(path: string): boolean; - /** - * Solve the relative path from {from} to {to}. - * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. - * - * @param from - * @param to - */ - export function relative(from: string, to: string): string; - /** - * Return the directory name of a path. Similar to the Unix dirname command. - * - * @param p the path to evaluate. - */ - export function dirname(p: string): string; - /** - * Return the last portion of a path. Similar to the Unix basename command. - * Often used to extract the file name from a fully qualified path. - * - * @param p the path to evaluate. - * @param ext optionally, an extension to remove from the result. - */ - export function basename(p: string, ext?: string): string; - /** - * Return the extension of the path, from the last '.' to end of string in the last portion of the path. - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string - * - * @param p the path to evaluate. - */ - export function extname(p: string): string; - /** - * The platform-specific file separator. '\\' or '/'. - */ - export var sep: string; - /** - * The platform-specific file delimiter. ';' or ':'. - */ - export var delimiter: string; - /** - * Returns an object from a path string - the opposite of format(). - * - * @param pathString path to evaluate. - */ - export function parse(pathString: string): ParsedPath; - /** - * Returns a path string from an object - the opposite of parse(). - * - * @param pathString path to evaluate. - */ - export function format(pathObject: ParsedPath): string; - - export module posix { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; - } - - export module win32 { - export function normalize(p: string): string; - export function join(...paths: any[]): string; - export function resolve(...pathSegments: any[]): string; - export function isAbsolute(p: string): boolean; - export function relative(from: string, to: string): string; - export function dirname(p: string): string; - export function basename(p: string, ext?: string): string; - export function extname(p: string): string; - export var sep: string; - export var delimiter: string; - export function parse(p: string): ParsedPath; - export function format(pP: ParsedPath): string; - } -} - -declare module "string_decoder" { - export interface NodeStringDecoder { - write(buffer: Buffer): string; - end(buffer?: Buffer): string; - } - export var StringDecoder: { - new (encoding?: string): NodeStringDecoder; - }; -} - -declare module "tls" { - import * as crypto from "crypto"; - import * as net from "net"; - import * as stream from "stream"; - - var CLIENT_RENEG_LIMIT: number; - var CLIENT_RENEG_WINDOW: number; - - export interface Certificate { - /** - * Country code. - */ - C: string; - /** - * Street. - */ - ST: string; - /** - * Locality. - */ - L: string; - /** - * Organization. - */ - O: string; - /** - * Organizational unit. - */ - OU: string; - /** - * Common name. - */ - CN: string; - } - - export interface PeerCertificate { - subject: Certificate; - issuer: Certificate; - subjectaltname: string; - infoAccess: { [index: string]: string[] }; - modulus: string; - exponent: string; - valid_from: string; - valid_to: string; - fingerprint: string; - ext_key_usage: string[]; - serialNumber: string; - raw: Buffer; - } - - export interface DetailedPeerCertificate extends PeerCertificate { - issuerCertificate: DetailedPeerCertificate; - } - - export interface CipherNameAndProtocol { - /** - * The cipher name. - */ - name: string; - /** - * SSL/TLS protocol version. - */ - version: string; - } - - export class TLSSocket extends net.Socket { - /** - * Construct a new tls.TLSSocket object from an existing TCP socket. - */ - constructor(socket:net.Socket, options?: { - /** - * An optional TLS context object from tls.createSecureContext() - */ - secureContext?: SecureContext, - /** - * If true the TLS socket will be instantiated in server-mode. - * Defaults to false. - */ - isServer?: boolean, - /** - * An optional net.Server instance. - */ - server?: net.Server, - /** - * If true the server will request a certificate from clients that - * connect and attempt to verify that certificate. Defaults to - * false. - */ - requestCert?: boolean, - /** - * If true the server will reject any connection which is not - * authorized with the list of supplied CAs. This option only has an - * effect if requestCert is true. Defaults to false. - */ - rejectUnauthorized?: boolean, - /** - * An array of strings or a Buffer naming possible NPN protocols. - * (Protocols should be ordered by their priority.) - */ - NPNProtocols?: string[] | Buffer, - /** - * An array of strings or a Buffer naming possible ALPN protocols. - * (Protocols should be ordered by their priority.) When the server - * receives both NPN and ALPN extensions from the client, ALPN takes - * precedence over NPN and the server does not send an NPN extension - * to the client. - */ - ALPNProtocols?: string[] | Buffer, - /** - * SNICallback(servername, cb) A function that will be - * called if the client supports SNI TLS extension. Two arguments - * will be passed when called: servername and cb. SNICallback should - * invoke cb(null, ctx), where ctx is a SecureContext instance. - * (tls.createSecureContext(...) can be used to get a proper - * SecureContext.) If SNICallback wasn't provided the default callback - * with high-level API will be used (see below). - */ - SNICallback?: Function, - /** - * An optional Buffer instance containing a TLS session. - */ - session?: Buffer, - /** - * If true, specifies that the OCSP status request extension will be - * added to the client hello and an 'OCSPResponse' event will be - * emitted on the socket before establishing a secure communication - */ - requestOCSP?: boolean - }); - /** - * Returns the bound address, the address family name and port of the underlying socket as reported by - * the operating system. - * @returns {any} - An object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }. - */ - address(): { port: number; family: string; address: string }; - /** - * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false. - */ - authorized: boolean; - /** - * The reason why the peer's certificate has not been verified. - * This property becomes available only when tlsSocket.authorized === false. - */ - authorizationError: Error; - /** - * Static boolean value, always true. - * May be used to distinguish TLS sockets from regular ones. - */ - encrypted: boolean; - /** - * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection. - * @returns {CipherNameAndProtocol} - Returns an object representing the cipher name - * and the SSL/TLS protocol version of the current connection. - */ - getCipher(): CipherNameAndProtocol; - /** - * Returns an object representing the peer's certificate. - * The returned object has some properties corresponding to the field of the certificate. - * If detailed argument is true the full chain with issuer property will be returned, - * if false only the top certificate without issuer property. - * If the peer does not provide a certificate, it returns null or an empty object. - * @param {boolean} detailed - If true; the full chain with issuer property will be returned. - * @returns {PeerCertificate | DetailedPeerCertificate} - An object representing the peer's certificate. - */ - getPeerCertificate(detailed: true): DetailedPeerCertificate; - getPeerCertificate(detailed?: false): PeerCertificate; - getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; - /** - * Could be used to speed up handshake establishment when reconnecting to the server. - * @returns {any} - ASN.1 encoded TLS session or undefined if none was negotiated. - */ - getSession(): any; - /** - * NOTE: Works only with client TLS sockets. - * Useful only for debugging, for session reuse provide session option to tls.connect(). - * @returns {any} - TLS session ticket or undefined if none was negotiated. - */ - getTLSTicket(): any; - /** - * The string representation of the local IP address. - */ - localAddress: string; - /** - * The numeric representation of the local port. - */ - localPort: number; - /** - * The string representation of the remote IP address. - * For example, '74.125.127.100' or '2001:4860:a005::68'. - */ - remoteAddress: string; - /** - * The string representation of the remote IP family. 'IPv4' or 'IPv6'. - */ - remoteFamily: string; - /** - * The numeric representation of the remote port. For example, 443. - */ - remotePort: number; - /** - * Initiate TLS renegotiation process. - * - * NOTE: Can be used to request peer's certificate after the secure connection has been established. - * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout. - * @param {TlsOptions} options - The options may contain the following fields: rejectUnauthorized, - * requestCert (See tls.createServer() for details). - * @param {Function} callback - callback(err) will be executed with null as err, once the renegotiation - * is successfully completed. - */ - renegotiate(options: TlsOptions, callback: (err: Error) => any): any; - /** - * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by - * the TLS layer until the entire fragment is received and its integrity is verified; - * large fragments can span multiple roundtrips, and their processing can be delayed due to packet - * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, - * which may decrease overall server throughput. - * @param {number} size - TLS fragment size (default and maximum value is: 16384, minimum is: 512). - * @returns {boolean} - Returns true on success, false otherwise. - */ - setMaxSendFragment(size: number): boolean; - - /** - * events.EventEmitter - * 1. OCSPResponse - * 2. secureConnect - **/ - addListener(event: string, listener: Function): this; - addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - addListener(event: "secureConnect", listener: () => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "OCSPResponse", response: Buffer): boolean; - emit(event: "secureConnect"): boolean; - - on(event: string, listener: Function): this; - on(event: "OCSPResponse", listener: (response: Buffer) => void): this; - on(event: "secureConnect", listener: () => void): this; - - once(event: string, listener: Function): this; - once(event: "OCSPResponse", listener: (response: Buffer) => void): this; - once(event: "secureConnect", listener: () => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependListener(event: "secureConnect", listener: () => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this; - prependOnceListener(event: "secureConnect", listener: () => void): this; - } - - export interface TlsOptions { - host?: string; - port?: number; - pfx?: string | Buffer[]; - key?: string | string[] | Buffer | any[]; - passphrase?: string; - cert?: string | string[] | Buffer | Buffer[]; - ca?: string | string[] | Buffer | Buffer[]; - crl?: string | string[]; - ciphers?: string; - honorCipherOrder?: boolean; - requestCert?: boolean; - rejectUnauthorized?: boolean; - NPNProtocols?: string[] | Buffer; - SNICallback?: (servername: string, cb: (err: Error, ctx: SecureContext) => any) => any; - ecdhCurve?: string; - dhparam?: string | Buffer; - handshakeTimeout?: number; - ALPNProtocols?: string[] | Buffer; - sessionTimeout?: number; - ticketKeys?: any; - sessionIdContext?: string; - secureProtocol?: string; - } - - export interface ConnectionOptions { - host?: string; - port?: number; - socket?: net.Socket; - pfx?: string | Buffer - key?: string | string[] | Buffer | Buffer[]; - passphrase?: string; - cert?: string | string[] | Buffer | Buffer[]; - ca?: string | Buffer | (string | Buffer)[]; - rejectUnauthorized?: boolean; - NPNProtocols?: (string | Buffer)[]; - servername?: string; - path?: string; - ALPNProtocols?: (string | Buffer)[]; - checkServerIdentity?: (servername: string, cert: string | Buffer | (string | Buffer)[]) => any; - secureProtocol?: string; - secureContext?: Object; - session?: Buffer; - minDHSize?: number; - } - - export interface Server extends net.Server { - close(callback?: Function): Server; - address(): { port: number; family: string; address: string; }; - addContext(hostName: string, credentials: { - key: string; - cert: string; - ca: string; - }): void; - maxConnections: number; - connections: number; - - /** - * events.EventEmitter - * 1. tlsClientError - * 2. newSession - * 3. OCSPRequest - * 4. resumeSession - * 5. secureConnection - **/ - addListener(event: string, listener: Function): this; - addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - addListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - addListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; - emit(event: "newSession", sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void): boolean; - emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: Function): boolean; - emit(event: "resumeSession", sessionId: any, callback: (err: Error, sessionData: any) => void): boolean; - emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; - - on(event: string, listener: Function): this; - on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - on(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - on(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - once(event: string, listener: Function): this; - once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - once(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - once(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - prependListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: "newSession", listener: (sessionId: any, sessionData: any, callback: (err: Error, resp: Buffer) => void) => void): this; - prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: Function) => void): this; - prependOnceListener(event: "resumeSession", listener: (sessionId: any, callback: (err: Error, sessionData: any) => void) => void): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - } - - export interface ClearTextStream extends stream.Duplex { - authorized: boolean; - authorizationError: Error; - getPeerCertificate(): any; - getCipher: { - name: string; - version: string; - }; - address: { - port: number; - family: string; - address: string; - }; - remoteAddress: string; - remotePort: number; - } - - export interface SecurePair { - encrypted: any; - cleartext: any; - } - - export interface SecureContextOptions { - pfx?: string | Buffer; - key?: string | Buffer; - passphrase?: string; - cert?: string | Buffer; - ca?: string | Buffer; - crl?: string | string[] - ciphers?: string; - honorCipherOrder?: boolean; - } - - export interface SecureContext { - context: any; - } - - export function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; - export function connect(options: ConnectionOptions, secureConnectionListener?: () => void): TLSSocket; - export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; - export function createSecureContext(details: SecureContextOptions): SecureContext; -} - -declare module "crypto" { - export interface Certificate { - exportChallenge(spkac: string | Buffer): Buffer; - exportPublicKey(spkac: string | Buffer): Buffer; - verifySpkac(spkac: Buffer): boolean; - } - export var Certificate: { - new (): Certificate; - (): Certificate; - } - - export var fips: boolean; - - export interface CredentialDetails { - pfx: string; - key: string; - passphrase: string; - cert: string; - ca: string | string[]; - crl: string | string[]; - ciphers: string; - } - export interface Credentials { context?: any; } - export function createCredentials(details: CredentialDetails): Credentials; - export function createHash(algorithm: string): Hash; - export function createHmac(algorithm: string, key: string | Buffer): Hmac; - - type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1"; - type HexBase64Latin1Encoding = "latin1" | "hex" | "base64"; - type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary"; - type HexBase64BinaryEncoding = "binary" | "base64" | "hex"; - type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; - - export interface Hash extends NodeJS.ReadWriteStream { - update(data: string | Buffer): Hash; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hash; - digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; - } - export interface Hmac extends NodeJS.ReadWriteStream { - update(data: string | Buffer): Hmac; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Hmac; - digest(): Buffer; - digest(encoding: HexBase64Latin1Encoding): string; - } - export function createCipher(algorithm: string, password: any): Cipher; - export function createCipheriv(algorithm: string, key: any, iv: any): Cipher; - export interface Cipher extends NodeJS.ReadWriteStream { - update(data: Buffer): Buffer; - update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer; - update(data: Buffer, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string; - update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding?: boolean): void; - getAuthTag(): Buffer; - setAAD(buffer: Buffer): void; - } - export function createDecipher(algorithm: string, password: any): Decipher; - export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher; - export interface Decipher extends NodeJS.ReadWriteStream { - update(data: Buffer): Buffer; - update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer; - update(data: Buffer, input_encoding: any, output_encoding: Utf8AsciiBinaryEncoding): string; - update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string; - final(): Buffer; - final(output_encoding: string): string; - setAutoPadding(auto_padding?: boolean): void; - setAuthTag(tag: Buffer): void; - setAAD(buffer: Buffer): void; - } - export function createSign(algorithm: string): Signer; - export interface Signer extends NodeJS.WritableStream { - update(data: string | Buffer): Signer; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase: string }): Buffer; - sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; - } - export function createVerify(algorith: string): Verify; - export interface Verify extends NodeJS.WritableStream { - update(data: string | Buffer): Verify; - update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Verify; - verify(object: string, signature: Buffer): boolean; - verify(object: string, signature: string, signature_format: HexBase64Latin1Encoding): boolean; - } - export function createDiffieHellman(prime_length: number, generator?: number): DiffieHellman; - export function createDiffieHellman(prime: Buffer): DiffieHellman; - export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman; - export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Buffer): DiffieHellman; - export function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman; - export interface DiffieHellman { - generateKeys(): Buffer; - generateKeys(encoding: HexBase64Latin1Encoding): string; - computeSecret(other_public_key: Buffer): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; - getPrime(): Buffer; - getPrime(encoding: HexBase64Latin1Encoding): string; - getGenerator(): Buffer; - getGenerator(encoding: HexBase64Latin1Encoding): string; - getPublicKey(): Buffer; - getPublicKey(encoding: HexBase64Latin1Encoding): string; - getPrivateKey(): Buffer; - getPrivateKey(encoding: HexBase64Latin1Encoding): string; - setPublicKey(public_key: Buffer): void; - setPublicKey(public_key: string, encoding: string): void; - setPrivateKey(private_key: Buffer): void; - setPrivateKey(private_key: string, encoding: string): void; - verifyError: number; - } - export function getDiffieHellman(group_name: string): DiffieHellman; - export function pbkdf2(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void; - export function pbkdf2Sync(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string): Buffer; - export function randomBytes(size: number): Buffer; - export function randomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; - export function pseudoRandomBytes(size: number): Buffer; - export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) => void): void; - export function randomFillSync(buffer: Buffer | Uint8Array, offset?: number, size?: number): Buffer; - export function randomFill(buffer: Buffer, callback: (err: Error, buf: Buffer) => void): void; - export function randomFill(buffer: Uint8Array, callback: (err: Error, buf: Uint8Array) => void): void; - export function randomFill(buffer: Buffer, offset: number, callback: (err: Error, buf: Buffer) => void): void; - export function randomFill(buffer: Uint8Array, offset: number, callback: (err: Error, buf: Uint8Array) => void): void; - export function randomFill(buffer: Buffer, offset: number, size: number, callback: (err: Error, buf: Buffer) => void): void; - export function randomFill(buffer: Uint8Array, offset: number, size: number, callback: (err: Error, buf: Uint8Array) => void): void; - export interface RsaPublicKey { - key: string; - padding?: number; - } - export interface RsaPrivateKey { - key: string; - passphrase?: string, - padding?: number; - } - export function publicEncrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer - export function privateDecrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer - export function privateEncrypt(private_key: string | RsaPrivateKey, buffer: Buffer): Buffer - export function publicDecrypt(public_key: string | RsaPublicKey, buffer: Buffer): Buffer - export function getCiphers(): string[]; - export function getCurves(): string[]; - export function getHashes(): string[]; - export interface ECDH { - generateKeys(): Buffer; - generateKeys(encoding: HexBase64Latin1Encoding): string; - generateKeys(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; - computeSecret(other_public_key: Buffer): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer; - computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string; - getPrivateKey(): Buffer; - getPrivateKey(encoding: HexBase64Latin1Encoding): string; - getPublicKey(): Buffer; - getPublicKey(encoding: HexBase64Latin1Encoding): string; - getPublicKey(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string; - setPrivateKey(private_key: Buffer): void; - setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void; - } - export function createECDH(curve_name: string): ECDH; - export function timingSafeEqual(a: Buffer, b: Buffer): boolean; - export var DEFAULT_ENCODING: string; -} - -declare module "stream" { - import * as events from "events"; - - class internal extends events.EventEmitter { - pipe(destination: T, options?: { end?: boolean; }): T; - } - - namespace internal { - - export class Stream extends internal { } - - export interface ReadableOptions { - highWaterMark?: number; - encoding?: string; - objectMode?: boolean; - read?: (this: Readable, size?: number) => any; - } - - export class Readable extends Stream implements NodeJS.ReadableStream { - readable: boolean; - constructor(opts?: ReadableOptions); - _read(size: number): void; - read(size?: number): any; - setEncoding(encoding: string): this; - pause(): this; - resume(): this; - isPaused(): boolean; - pipe(destination: T, options?: { end?: boolean; }): T; - unpipe(destination?: T): this; - unshift(chunk: any): void; - wrap(oldStream: NodeJS.ReadableStream): Readable; - push(chunk: any, encoding?: string): boolean; - - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. data - * 3. end - * 4. readable - * 5. error - **/ - addListener(event: string, listener: Function): this; - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: Buffer | string) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: Buffer | string): boolean; - emit(event: "end"): boolean; - emit(event: "readable"): boolean; - emit(event: "error", err: Error): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: Buffer | string) => void): this; - on(event: "end", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: Buffer | string) => void): this; - once(event: "end", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - - removeListener(event: string, listener: Function): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: Buffer | string) => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - } - - export interface WritableOptions { - highWaterMark?: number; - decodeStrings?: boolean; - objectMode?: boolean; - write?: (chunk: string | Buffer, encoding: string, callback: Function) => any; - writev?: (chunks: { chunk: string | Buffer, encoding: string }[], callback: Function) => any; - } - - export class Writable extends Stream implements NodeJS.WritableStream { - writable: boolean; - constructor(opts?: WritableOptions); - _write(chunk: any, encoding: string, callback: Function): void; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; - setDefaultEncoding(encoding: string): this; - end(): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; - - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. drain - * 3. error - * 4. finish - * 5. pipe - * 6. unpipe - **/ - addListener(event: string, listener: Function): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: Readable) => void): this; - addListener(event: "unpipe", listener: (src: Readable) => void): this; - - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "drain", chunk: Buffer | string): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: Readable): boolean; - emit(event: "unpipe", src: Readable): boolean; - - on(event: string, listener: Function): this; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: Readable) => void): this; - on(event: "unpipe", listener: (src: Readable) => void): this; - - once(event: string, listener: Function): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: Readable) => void): this; - once(event: "unpipe", listener: (src: Readable) => void): this; - - prependListener(event: string, listener: Function): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: Readable) => void): this; - prependListener(event: "unpipe", listener: (src: Readable) => void): this; - - prependOnceListener(event: string, listener: Function): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; - - removeListener(event: string, listener: Function): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "pipe", listener: (src: Readable) => void): this; - removeListener(event: "unpipe", listener: (src: Readable) => void): this; - } - - export interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean; - readableObjectMode?: boolean; - writableObjectMode?: boolean; - } - - // Note: Duplex extends both Readable and Writable. - export class Duplex extends Readable implements Writable { - writable: boolean; - constructor(opts?: DuplexOptions); - _write(chunk: any, encoding: string, callback: Function): void; - write(chunk: any, cb?: Function): boolean; - write(chunk: any, encoding?: string, cb?: Function): boolean; - setDefaultEncoding(encoding: string): this; - end(): void; - end(chunk: any, cb?: Function): void; - end(chunk: any, encoding?: string, cb?: Function): void; - } - - export interface TransformOptions extends DuplexOptions { - transform?: (chunk: string | Buffer, encoding: string, callback: Function) => any; - flush?: (callback: Function) => any; - } - - export class Transform extends Duplex { - constructor(opts?: TransformOptions); - _transform(chunk: any, encoding: string, callback: Function): void; - } - - export class PassThrough extends Transform { } - } - - export = internal; -} - -declare module "util" { - export interface InspectOptions extends NodeJS.InspectOptions {} - export function format(format: any, ...param: any[]): string; - export function debug(string: string): void; - export function error(...param: any[]): void; - export function puts(...param: any[]): void; - export function print(...param: any[]): void; - export function log(string: string): void; - export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; - export function inspect(object: any, options: InspectOptions): string; - export function isArray(object: any): object is any[]; - export function isRegExp(object: any): object is RegExp; - export function isDate(object: any): object is Date; - export function isError(object: any): object is Error; - export function inherits(constructor: any, superConstructor: any): void; - export function debuglog(key: string): (msg: string, ...param: any[]) => void; - export function isBoolean(object: any): object is boolean; - export function isBuffer(object: any): object is Buffer; - export function isFunction(object: any): boolean; - export function isNull(object: any): object is null; - export function isNullOrUndefined(object: any): object is null | undefined; - export function isNumber(object: any): object is number; - export function isObject(object: any): boolean; - export function isPrimitive(object: any): boolean; - export function isString(object: any): object is string; - export function isSymbol(object: any): object is symbol; - export function isUndefined(object: any): object is undefined; - export function deprecate(fn: Function, message: string): Function; - export function promisify(fn: Function): Function; -} - -declare module "assert" { - function internal(value: any, message?: string): void; - namespace internal { - export class AssertionError implements Error { - name: string; - message: string; - actual: any; - expected: any; - operator: string; - generatedMessage: boolean; - - constructor(options?: { - message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function - }); - } - - export function fail(actual: any, expected: any, message: string, operator: string): void; - export function ok(value: any, message?: string): void; - export function equal(actual: any, expected: any, message?: string): void; - export function notEqual(actual: any, expected: any, message?: string): void; - export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; - export function strictEqual(actual: any, expected: any, message?: string): void; - export function notStrictEqual(actual: any, expected: any, message?: string): void; - export function deepStrictEqual(actual: any, expected: any, message?: string): void; - export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; - export var throws: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; - - export var doesNotThrow: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; - - export function ifError(value: any): void; - } - - export = internal; -} - -declare module "tty" { - import * as net from "net"; - - export function isatty(fd: number): boolean; - export interface ReadStream extends net.Socket { - isRaw: boolean; - setRawMode(mode: boolean): void; - isTTY: boolean; - } - export interface WriteStream extends net.Socket { - columns: number; - rows: number; - isTTY: boolean; - } -} - -declare module "domain" { - import * as events from "events"; - - export class Domain extends events.EventEmitter implements NodeJS.Domain { - run(fn: Function): void; - add(emitter: events.EventEmitter): void; - remove(emitter: events.EventEmitter): void; - bind(cb: (err: Error, data: any) => any): any; - intercept(cb: (data: any) => any): any; - dispose(): void; - members: any[]; - enter(): void; - exit(): void; - } - - export function create(): Domain; -} - -declare module "constants" { - export var E2BIG: number; - export var EACCES: number; - export var EADDRINUSE: number; - export var EADDRNOTAVAIL: number; - export var EAFNOSUPPORT: number; - export var EAGAIN: number; - export var EALREADY: number; - export var EBADF: number; - export var EBADMSG: number; - export var EBUSY: number; - export var ECANCELED: number; - export var ECHILD: number; - export var ECONNABORTED: number; - export var ECONNREFUSED: number; - export var ECONNRESET: number; - export var EDEADLK: number; - export var EDESTADDRREQ: number; - export var EDOM: number; - export var EEXIST: number; - export var EFAULT: number; - export var EFBIG: number; - export var EHOSTUNREACH: number; - export var EIDRM: number; - export var EILSEQ: number; - export var EINPROGRESS: number; - export var EINTR: number; - export var EINVAL: number; - export var EIO: number; - export var EISCONN: number; - export var EISDIR: number; - export var ELOOP: number; - export var EMFILE: number; - export var EMLINK: number; - export var EMSGSIZE: number; - export var ENAMETOOLONG: number; - export var ENETDOWN: number; - export var ENETRESET: number; - export var ENETUNREACH: number; - export var ENFILE: number; - export var ENOBUFS: number; - export var ENODATA: number; - export var ENODEV: number; - export var ENOENT: number; - export var ENOEXEC: number; - export var ENOLCK: number; - export var ENOLINK: number; - export var ENOMEM: number; - export var ENOMSG: number; - export var ENOPROTOOPT: number; - export var ENOSPC: number; - export var ENOSR: number; - export var ENOSTR: number; - export var ENOSYS: number; - export var ENOTCONN: number; - export var ENOTDIR: number; - export var ENOTEMPTY: number; - export var ENOTSOCK: number; - export var ENOTSUP: number; - export var ENOTTY: number; - export var ENXIO: number; - export var EOPNOTSUPP: number; - export var EOVERFLOW: number; - export var EPERM: number; - export var EPIPE: number; - export var EPROTO: number; - export var EPROTONOSUPPORT: number; - export var EPROTOTYPE: number; - export var ERANGE: number; - export var EROFS: number; - export var ESPIPE: number; - export var ESRCH: number; - export var ETIME: number; - export var ETIMEDOUT: number; - export var ETXTBSY: number; - export var EWOULDBLOCK: number; - export var EXDEV: number; - export var WSAEINTR: number; - export var WSAEBADF: number; - export var WSAEACCES: number; - export var WSAEFAULT: number; - export var WSAEINVAL: number; - export var WSAEMFILE: number; - export var WSAEWOULDBLOCK: number; - export var WSAEINPROGRESS: number; - export var WSAEALREADY: number; - export var WSAENOTSOCK: number; - export var WSAEDESTADDRREQ: number; - export var WSAEMSGSIZE: number; - export var WSAEPROTOTYPE: number; - export var WSAENOPROTOOPT: number; - export var WSAEPROTONOSUPPORT: number; - export var WSAESOCKTNOSUPPORT: number; - export var WSAEOPNOTSUPP: number; - export var WSAEPFNOSUPPORT: number; - export var WSAEAFNOSUPPORT: number; - export var WSAEADDRINUSE: number; - export var WSAEADDRNOTAVAIL: number; - export var WSAENETDOWN: number; - export var WSAENETUNREACH: number; - export var WSAENETRESET: number; - export var WSAECONNABORTED: number; - export var WSAECONNRESET: number; - export var WSAENOBUFS: number; - export var WSAEISCONN: number; - export var WSAENOTCONN: number; - export var WSAESHUTDOWN: number; - export var WSAETOOMANYREFS: number; - export var WSAETIMEDOUT: number; - export var WSAECONNREFUSED: number; - export var WSAELOOP: number; - export var WSAENAMETOOLONG: number; - export var WSAEHOSTDOWN: number; - export var WSAEHOSTUNREACH: number; - export var WSAENOTEMPTY: number; - export var WSAEPROCLIM: number; - export var WSAEUSERS: number; - export var WSAEDQUOT: number; - export var WSAESTALE: number; - export var WSAEREMOTE: number; - export var WSASYSNOTREADY: number; - export var WSAVERNOTSUPPORTED: number; - export var WSANOTINITIALISED: number; - export var WSAEDISCON: number; - export var WSAENOMORE: number; - export var WSAECANCELLED: number; - export var WSAEINVALIDPROCTABLE: number; - export var WSAEINVALIDPROVIDER: number; - export var WSAEPROVIDERFAILEDINIT: number; - export var WSASYSCALLFAILURE: number; - export var WSASERVICE_NOT_FOUND: number; - export var WSATYPE_NOT_FOUND: number; - export var WSA_E_NO_MORE: number; - export var WSA_E_CANCELLED: number; - export var WSAEREFUSED: number; - export var SIGHUP: number; - export var SIGINT: number; - export var SIGILL: number; - export var SIGABRT: number; - export var SIGFPE: number; - export var SIGKILL: number; - export var SIGSEGV: number; - export var SIGTERM: number; - export var SIGBREAK: number; - export var SIGWINCH: number; - export var SSL_OP_ALL: number; - export var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; - export var SSL_OP_CIPHER_SERVER_PREFERENCE: number; - export var SSL_OP_CISCO_ANYCONNECT: number; - export var SSL_OP_COOKIE_EXCHANGE: number; - export var SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; - export var SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; - export var SSL_OP_EPHEMERAL_RSA: number; - export var SSL_OP_LEGACY_SERVER_CONNECT: number; - export var SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number; - export var SSL_OP_MICROSOFT_SESS_ID_BUG: number; - export var SSL_OP_MSIE_SSLV2_RSA_PADDING: number; - export var SSL_OP_NETSCAPE_CA_DN_BUG: number; - export var SSL_OP_NETSCAPE_CHALLENGE_BUG: number; - export var SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number; - export var SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number; - export var SSL_OP_NO_COMPRESSION: number; - export var SSL_OP_NO_QUERY_MTU: number; - export var SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; - export var SSL_OP_NO_SSLv2: number; - export var SSL_OP_NO_SSLv3: number; - export var SSL_OP_NO_TICKET: number; - export var SSL_OP_NO_TLSv1: number; - export var SSL_OP_NO_TLSv1_1: number; - export var SSL_OP_NO_TLSv1_2: number; - export var SSL_OP_PKCS1_CHECK_1: number; - export var SSL_OP_PKCS1_CHECK_2: number; - export var SSL_OP_SINGLE_DH_USE: number; - export var SSL_OP_SINGLE_ECDH_USE: number; - export var SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number; - export var SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number; - export var SSL_OP_TLS_BLOCK_PADDING_BUG: number; - export var SSL_OP_TLS_D5_BUG: number; - export var SSL_OP_TLS_ROLLBACK_BUG: number; - export var ENGINE_METHOD_DSA: number; - export var ENGINE_METHOD_DH: number; - export var ENGINE_METHOD_RAND: number; - export var ENGINE_METHOD_ECDH: number; - export var ENGINE_METHOD_ECDSA: number; - export var ENGINE_METHOD_CIPHERS: number; - export var ENGINE_METHOD_DIGESTS: number; - export var ENGINE_METHOD_STORE: number; - export var ENGINE_METHOD_PKEY_METHS: number; - export var ENGINE_METHOD_PKEY_ASN1_METHS: number; - export var ENGINE_METHOD_ALL: number; - export var ENGINE_METHOD_NONE: number; - export var DH_CHECK_P_NOT_SAFE_PRIME: number; - export var DH_CHECK_P_NOT_PRIME: number; - export var DH_UNABLE_TO_CHECK_GENERATOR: number; - export var DH_NOT_SUITABLE_GENERATOR: number; - export var NPN_ENABLED: number; - export var RSA_PKCS1_PADDING: number; - export var RSA_SSLV23_PADDING: number; - export var RSA_NO_PADDING: number; - export var RSA_PKCS1_OAEP_PADDING: number; - export var RSA_X931_PADDING: number; - export var RSA_PKCS1_PSS_PADDING: number; - export var POINT_CONVERSION_COMPRESSED: number; - export var POINT_CONVERSION_UNCOMPRESSED: number; - export var POINT_CONVERSION_HYBRID: number; - export var O_RDONLY: number; - export var O_WRONLY: number; - export var O_RDWR: number; - export var S_IFMT: number; - export var S_IFREG: number; - export var S_IFDIR: number; - export var S_IFCHR: number; - export var S_IFBLK: number; - export var S_IFIFO: number; - export var S_IFSOCK: number; - export var S_IRWXU: number; - export var S_IRUSR: number; - export var S_IWUSR: number; - export var S_IXUSR: number; - export var S_IRWXG: number; - export var S_IRGRP: number; - export var S_IWGRP: number; - export var S_IXGRP: number; - export var S_IRWXO: number; - export var S_IROTH: number; - export var S_IWOTH: number; - export var S_IXOTH: number; - export var S_IFLNK: number; - export var O_CREAT: number; - export var O_EXCL: number; - export var O_NOCTTY: number; - export var O_DIRECTORY: number; - export var O_NOATIME: number; - export var O_NOFOLLOW: number; - export var O_SYNC: number; - export var O_SYMLINK: number; - export var O_DIRECT: number; - export var O_NONBLOCK: number; - export var O_TRUNC: number; - export var O_APPEND: number; - export var F_OK: number; - export var R_OK: number; - export var W_OK: number; - export var X_OK: number; - export var UV_UDP_REUSEADDR: number; - export var SIGQUIT: number; - export var SIGTRAP: number; - export var SIGIOT: number; - export var SIGBUS: number; - export var SIGUSR1: number; - export var SIGUSR2: number; - export var SIGPIPE: number; - export var SIGALRM: number; - export var SIGCHLD: number; - export var SIGSTKFLT: number; - export var SIGCONT: number; - export var SIGSTOP: number; - export var SIGTSTP: number; - export var SIGTTIN: number; - export var SIGTTOU: number; - export var SIGURG: number; - export var SIGXCPU: number; - export var SIGXFSZ: number; - export var SIGVTALRM: number; - export var SIGPROF: number; - export var SIGIO: number; - export var SIGPOLL: number; - export var SIGPWR: number; - export var SIGSYS: number; - export var SIGUNUSED: number; - export var defaultCoreCipherList: string; - export var defaultCipherList: string; - export var ENGINE_METHOD_RSA: number; - export var ALPN_ENABLED: number; -} - -declare module "process" { - export = process; -} - -declare module "v8" { - interface HeapSpaceInfo { - space_name: string; - space_size: number; - space_used_size: number; - space_available_size: number; - physical_space_size: number; - } - - //** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ - type DoesZapCodeSpaceFlag = 0 | 1; - - interface HeapInfo { - total_heap_size: number; - total_heap_size_executable: number; - total_physical_size: number; - total_available_size: number; - used_heap_size: number; - heap_size_limit: number; - malloced_memory: number; - peak_malloced_memory: number; - does_zap_garbage: DoesZapCodeSpaceFlag; - } - - export function getHeapStatistics(): HeapInfo; - export function getHeapSpaceStatistics(): HeapSpaceInfo[]; - export function setFlagsFromString(flags: string): void; -} - -declare module "timers" { - export function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; - export function clearTimeout(timeoutId: NodeJS.Timer): void; - export function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; - export function clearInterval(intervalId: NodeJS.Timer): void; - export function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; - export function clearImmediate(immediateId: any): void; -} - -declare module "console" { - export = console; -} - -/** - * _debugger module is not documented. - * Source code is at https://github.com/nodejs/node/blob/master/lib/_debugger.js - */ -declare module "_debugger" { - export interface Packet { - raw: string; - headers: string[]; - body: Message; - } - - export interface Message { - seq: number; - type: string; - } - - export interface RequestInfo { - command: string; - arguments: any; - } - - export interface Request extends Message, RequestInfo { - } - - export interface Event extends Message { - event: string; - body?: any; - } - - export interface Response extends Message { - request_seq: number; - success: boolean; - /** Contains error message if success === false. */ - message?: string; - /** Contains message body if success === true. */ - body?: any; - } - - export interface BreakpointMessageBody { - type: string; - target: number; - line: number; - } - - export class Protocol { - res: Packet; - state: string; - execute(data: string): void; - serialize(rq: Request): string; - onResponse: (pkt: Packet) => void; - } - - export var NO_FRAME: number; - export var port: number; - - export interface ScriptDesc { - name: string; - id: number; - isNative?: boolean; - handle?: number; - type: string; - lineOffset?: number; - columnOffset?: number; - lineCount?: number; - } - - export interface Breakpoint { - id: number; - scriptId: number; - script: ScriptDesc; - line: number; - condition?: string; - scriptReq?: string; - } - - export interface RequestHandler { - (err: boolean, body: Message, res: Packet): void; - request_seq?: number; - } - - export interface ResponseBodyHandler { - (err: boolean, body?: any): void; - request_seq?: number; - } - - export interface ExceptionInfo { - text: string; - } - - export interface BreakResponse { - script?: ScriptDesc; - exception?: ExceptionInfo; - sourceLine: number; - sourceLineText: string; - sourceColumn: number; - } - - export function SourceInfo(body: BreakResponse): string; - - export interface ClientInstance extends NodeJS.EventEmitter { - protocol: Protocol; - scripts: ScriptDesc[]; - handles: ScriptDesc[]; - breakpoints: Breakpoint[]; - currentSourceLine: number; - currentSourceColumn: number; - currentSourceLineText: string; - currentFrame: number; - currentScript: string; - - connect(port: number, host: string): void; - req(req: any, cb: RequestHandler): void; - reqFrameEval(code: string, frame: number, cb: RequestHandler): void; - mirrorObject(obj: any, depth: number, cb: ResponseBodyHandler): void; - setBreakpoint(rq: BreakpointMessageBody, cb: RequestHandler): void; - clearBreakpoint(rq: Request, cb: RequestHandler): void; - listbreakpoints(cb: RequestHandler): void; - reqSource(from: number, to: number, cb: RequestHandler): void; - reqScripts(cb: any): void; - reqContinue(cb: RequestHandler): void; - } - - export var Client : { - new (): ClientInstance - } -} diff --git a/typescript/hello-world/node_modules/@types/node/package.json b/typescript/hello-world/node_modules/@types/node/package.json deleted file mode 100644 index 254b60e..0000000 --- a/typescript/hello-world/node_modules/@types/node/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@types/node", - "version": "7.0.31", - "description": "TypeScript definitions for Node.js", - "license": "MIT", - "contributors": [ - { - "name": "Microsoft TypeScript", - "url": "http://typescriptlang.org" - }, - { - "name": "DefinitelyTyped", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped" - }, - { - "name": "Parambir Singh", - "url": "https://github.com/parambirs" - }, - { - "name": "Roberto Desideri", - "url": "https://github.com/RobDesideri" - }, - { - "name": "Christian Vaagland Tellnes", - "url": "https://github.com/tellnes" - }, - { - "name": "Wilco Bakker", - "url": "https://github.com/WilcoBakker" - } - ], - "main": "", - "repository": { - "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typesPublisherContentHash": "4d70ea38d4da20cc1c392e5f553831164404a78cb03e3457f64fa617fbec3aeb", - "typeScriptVersion": "2.2" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/abab/CHANGELOG.md b/typescript/hello-world/node_modules/abab/CHANGELOG.md deleted file mode 100644 index 3b16719..0000000 --- a/typescript/hello-world/node_modules/abab/CHANGELOG.md +++ /dev/null @@ -1,11 +0,0 @@ -## 1.0.3 - -- Replaced `let` with `var` in `lib/btoa.js` - - Follow up from `1.0.2` - - Resolves https://github.com/jsdom/abab/issues/18 - -## 1.0.2 - -- Replaced `const` with `var` in `index.js` - - Allows use of `abab` in the browser without a transpilation step - - Resolves https://github.com/jsdom/abab/issues/15 diff --git a/typescript/hello-world/node_modules/abab/README.md b/typescript/hello-world/node_modules/abab/README.md deleted file mode 100644 index 2d9c1b5..0000000 --- a/typescript/hello-world/node_modules/abab/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# abab - -[![npm version](https://badge.fury.io/js/abab.svg)](https://www.npmjs.com/package/abab) [![Build Status](https://travis-ci.org/jsdom/abab.svg?branch=master)](https://travis-ci.org/jsdom/abab) - -A module that implements `window.atob` and `window.btoa` according to the [WHATWG spec](https://html.spec.whatwg.org/multipage/webappapis.html#atob). The code is originally from [w3c/web-platform-tests](https://github.com/w3c/web-platform-tests/blob/master/html/webappapis/atob/base64.html). - -Compatibility: Node.js version 3+ and all major browsers (using browserify or webpack) - -Install with `npm`: - -```sh -npm install abab -``` - -## API - -### `btoa` (base64 encode) - -```js -const btoa = require('abab').btoa; -btoa('Hello, world!'); // 'SGVsbG8sIHdvcmxkIQ==' -``` - -### `atob` (base64 decode) - -```js -const atob = require('abab').atob; -atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!' -``` - -#### Valid characters - -[Per the spec](https://html.spec.whatwg.org/multipage/webappapis.html#atob:dom-windowbase64-btoa-3), `btoa` will accept strings "containing only characters in the range `U+0000` to `U+00FF`." If passed a string with characters above `U+00FF`, `btoa` will return `null`. If `atob` is passed a string that is not base64-valid, it will also return `null`. In both cases when `null` is returned, the spec calls for throwing a `DOMException` of type `InvalidCharacterError`. - -## Browsers - -If you want to include just one of the methods to save bytes in your client-side code, you can `require` the desired module directly. - -```js -var atob = require('abab/lib/atob'); -var btoa = require('abab/lib/btoa'); -``` - ------ - -### Checklists - -If you're **submitting a PR** or **deploying to npm**, please use the [checklists in CONTRIBUTING.md](https://github.com/jsdom/abab/blob/master/CONTRIBUTING.md#checklists) - -### Remembering `atob` vs. `btoa` - -Here's a mnemonic that might be useful: if you have a plain string and want to base64 encode it, then decode it, `btoa` is what you run before (**b**efore - **b**toa), and `atob` is what you run after (**a**fter - **a**tob). diff --git a/typescript/hello-world/node_modules/abab/index.js b/typescript/hello-world/node_modules/abab/index.js deleted file mode 100644 index 16342c4..0000000 --- a/typescript/hello-world/node_modules/abab/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var atob = require('./lib/atob'); -var btoa = require('./lib/btoa'); - -module.exports = { - atob: atob, - btoa: btoa -}; diff --git a/typescript/hello-world/node_modules/abab/package.json b/typescript/hello-world/node_modules/abab/package.json deleted file mode 100644 index b85ae3f..0000000 --- a/typescript/hello-world/node_modules/abab/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "abab", - "version": "1.0.3", - "description": "WHATWG spec-compliant implementations of window.atob and window.btoa.", - "main": "index.js", - "files": [ - "index.js", - "lib/" - ], - "scripts": { - "mocha": "mocha test/node", - "karma": "karma start", - "test": "npm run lint && npm run mocha && npm run karma", - "lint": "jscs . && eslint ." - }, - "repository": { - "type": "git", - "url": "git+https://github.com/jsdom/abab.git" - }, - "keywords": [ - "atob", - "btoa", - "browser" - ], - "author": "Jeff Carpenter ", - "license": "ISC", - "bugs": { - "url": "https://github.com/jsdom/abab/issues" - }, - "homepage": "https://github.com/jsdom/abab#readme", - "devDependencies": { - "babel-core": "^6.1.4", - "babel-loader": "^6.1.0", - "babel-preset-es2015": "^6.1.4", - "eslint": "^1.3.1", - "jscs": "^2.1.1", - "karma": "^0.13.10", - "karma-cli": "^0.1.1", - "karma-firefox-launcher": "^0.1.6", - "karma-mocha": "^0.2.0", - "karma-sauce-launcher": "^0.2.14", - "karma-webpack": "^1.7.0", - "mocha": "^2.2.5", - "webpack": "^1.12.2" - } -} diff --git a/typescript/hello-world/node_modules/acorn-globals/LICENSE b/typescript/hello-world/node_modules/acorn-globals/LICENSE deleted file mode 100644 index 27cc9f3..0000000 --- a/typescript/hello-world/node_modules/acorn-globals/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Forbes Lindesay - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/typescript/hello-world/node_modules/acorn-globals/README.md b/typescript/hello-world/node_modules/acorn-globals/README.md deleted file mode 100644 index d8cd372..0000000 --- a/typescript/hello-world/node_modules/acorn-globals/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# acorn-globals - -Detect global variables in JavaScript using acorn - -[![Build Status](https://img.shields.io/travis/ForbesLindesay/acorn-globals/master.svg)](https://travis-ci.org/ForbesLindesay/acorn-globals) -[![Dependency Status](https://img.shields.io/david/ForbesLindesay/acorn-globals.svg)](https://david-dm.org/ForbesLindesay/acorn-globals) -[![NPM version](https://img.shields.io/npm/v/acorn-globals.svg)](https://www.npmjs.org/package/acorn-globals) - -## Installation - - npm install acorn-globals - -## Usage - -detect.js - -```js -var fs = require('fs'); -var detect = require('acorn-globals'); - -var src = fs.readFileSync(__dirname + '/input.js', 'utf8'); - -var scope = detect(src); -console.dir(scope); -``` - -input.js - -```js -var x = 5; -var y = 3, z = 2; - -w.foo(); -w = 2; - -RAWR=444; -RAWR.foo(); - -BLARG=3; - -foo(function () { - var BAR = 3; - process.nextTick(function (ZZZZZZZZZZZZ) { - console.log('beep boop'); - var xyz = 4; - x += 10; - x.zzzzzz; - ZZZ=6; - }); - function doom () { - } - ZZZ.foo(); - -}); - -console.log(xyz); -``` - -output: - -``` -$ node example/detect.js -[ { name: 'BLARG', nodes: [ [Object] ] }, - { name: 'RAWR', nodes: [ [Object], [Object] ] }, - { name: 'ZZZ', nodes: [ [Object], [Object] ] }, - { name: 'console', nodes: [ [Object], [Object] ] }, - { name: 'foo', nodes: [ [Object] ] }, - { name: 'process', nodes: [ [Object] ] }, - { name: 'w', nodes: [ [Object], [Object] ] }, - { name: 'xyz', nodes: [ [Object] ] } ] -``` - - -## License - - MIT diff --git a/typescript/hello-world/node_modules/acorn-globals/index.js b/typescript/hello-world/node_modules/acorn-globals/index.js deleted file mode 100644 index fc95182..0000000 --- a/typescript/hello-world/node_modules/acorn-globals/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -var acorn = require('acorn'); -var walk = require('acorn/dist/walk'); - -function isScope(node) { - return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration' || node.type === 'ArrowFunctionExpression' || node.type === 'Program'; -} -function isBlockScope(node) { - return node.type === 'BlockStatement' || isScope(node); -} - -function declaresArguments(node) { - return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; -} - -function declaresThis(node) { - return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration'; -} - -function reallyParse(source) { - return acorn.parse(source, { - allowReturnOutsideFunction: true, - allowImportExportEverywhere: true, - allowHashBang: true - }); -} -module.exports = findGlobals; -module.exports.parse = reallyParse; -function findGlobals(source) { - var globals = []; - var ast; - // istanbul ignore else - if (typeof source === 'string') { - ast = reallyParse(source); - } else { - ast = source; - } - // istanbul ignore if - if (!(ast && typeof ast === 'object' && ast.type === 'Program')) { - throw new TypeError('Source must be either a string of JavaScript or an acorn AST'); - } - var declareFunction = function (node) { - var fn = node; - fn.locals = fn.locals || {}; - node.params.forEach(function (node) { - declarePattern(node, fn); - }); - if (node.id) { - fn.locals[node.id.name] = true; - } - } - var declarePattern = function (node, parent) { - switch (node.type) { - case 'Identifier': - parent.locals[node.name] = true; - break; - case 'ObjectPattern': - node.properties.forEach(function (node) { - declarePattern(node.value, parent); - }); - break; - case 'ArrayPattern': - node.elements.forEach(function (node) { - if (node) declarePattern(node, parent); - }); - break; - case 'RestElement': - declarePattern(node.argument, parent); - break; - case 'AssignmentPattern': - declarePattern(node.left, parent); - break; - // istanbul ignore next - default: - throw new Error('Unrecognized pattern type: ' + node.type); - } - } - var declareModuleSpecifier = function (node, parents) { - ast.locals = ast.locals || {}; - ast.locals[node.local.name] = true; - } - walk.ancestor(ast, { - 'VariableDeclaration': function (node, parents) { - var parent = null; - for (var i = parents.length - 1; i >= 0 && parent === null; i--) { - if (node.kind === 'var' ? isScope(parents[i]) : isBlockScope(parents[i])) { - parent = parents[i]; - } - } - parent.locals = parent.locals || {}; - node.declarations.forEach(function (declaration) { - declarePattern(declaration.id, parent); - }); - }, - 'FunctionDeclaration': function (node, parents) { - var parent = null; - for (var i = parents.length - 2; i >= 0 && parent === null; i--) { - if (isScope(parents[i])) { - parent = parents[i]; - } - } - parent.locals = parent.locals || {}; - parent.locals[node.id.name] = true; - declareFunction(node); - }, - 'Function': declareFunction, - 'ClassDeclaration': function (node, parents) { - var parent = null; - for (var i = parents.length - 2; i >= 0 && parent === null; i--) { - if (isScope(parents[i])) { - parent = parents[i]; - } - } - parent.locals = parent.locals || {}; - parent.locals[node.id.name] = true; - }, - 'TryStatement': function (node) { - if (node.handler === null) return; - node.handler.locals = node.handler.locals || {}; - node.handler.locals[node.handler.param.name] = true; - }, - 'ImportDefaultSpecifier': declareModuleSpecifier, - 'ImportSpecifier': declareModuleSpecifier, - 'ImportNamespaceSpecifier': declareModuleSpecifier - }); - function identifier(node, parents) { - var name = node.name; - if (name === 'undefined') return; - for (var i = 0; i < parents.length; i++) { - if (name === 'arguments' && declaresArguments(parents[i])) { - return; - } - if (parents[i].locals && name in parents[i].locals) { - return; - } - } - node.parents = parents; - globals.push(node); - } - walk.ancestor(ast, { - 'VariablePattern': identifier, - 'Identifier': identifier, - 'ThisExpression': function (node, parents) { - for (var i = 0; i < parents.length; i++) { - if (declaresThis(parents[i])) { - return; - } - } - node.parents = parents; - globals.push(node); - } - }); - var groupedGlobals = {}; - globals.forEach(function (node) { - var name = node.type === 'ThisExpression' ? 'this' : node.name; - groupedGlobals[name] = (groupedGlobals[name] || []); - groupedGlobals[name].push(node); - }); - return Object.keys(groupedGlobals).sort().map(function (name) { - return {name: name, nodes: groupedGlobals[name]}; - }); -} diff --git a/typescript/hello-world/node_modules/acorn-globals/node_modules/.bin/acorn b/typescript/hello-world/node_modules/acorn-globals/node_modules/.bin/acorn deleted file mode 120000 index fa65fee..0000000 --- a/typescript/hello-world/node_modules/acorn-globals/node_modules/.bin/acorn +++ /dev/null @@ -1 +0,0 @@ -../../../acorn/bin/acorn \ No newline at end of file diff --git a/typescript/hello-world/node_modules/acorn-globals/package.json b/typescript/hello-world/node_modules/acorn-globals/package.json deleted file mode 100644 index 78994cf..0000000 --- a/typescript/hello-world/node_modules/acorn-globals/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "acorn-globals", - "version": "3.1.0", - "description": "Detect global variables in JavaScript using acorn", - "keywords": [ - "ast", - "variable", - "name", - "lexical", - "scope", - "local", - "global", - "implicit" - ], - "files": [ - "index.js", - "LICENSE" - ], - "dependencies": { - "acorn": "^4.0.4" - }, - "devDependencies": { - "testit": "^2.0.2" - }, - "scripts": { - "test": "node test" - }, - "repository": { - "type": "git", - "url": "https://github.com/ForbesLindesay/acorn-globals.git" - }, - "author": "ForbesLindesay", - "license": "MIT" -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/acorn/.npmignore b/typescript/hello-world/node_modules/acorn/.npmignore deleted file mode 100644 index eb3644b..0000000 --- a/typescript/hello-world/node_modules/acorn/.npmignore +++ /dev/null @@ -1,10 +0,0 @@ -/.tern-port -/test -/local -/rollup -/bin/generate-identifier-regex.js -/bin/update_authors.sh -.editorconfig -.gitattributes -.tern-project -.travis.yml diff --git a/typescript/hello-world/node_modules/acorn/AUTHORS b/typescript/hello-world/node_modules/acorn/AUTHORS deleted file mode 100644 index ab64891..0000000 --- a/typescript/hello-world/node_modules/acorn/AUTHORS +++ /dev/null @@ -1,62 +0,0 @@ -List of Acorn contributors. Updated before every release. - -Adrian Rakovsky -Alistair Braidwood -Amila Welihinda -Andres Suarez -Angelo -Aparajita Fishman -Arian Stolwijk -Artem Govorov -Brandon Mills -Charles Hughes -Conrad Irwin -Daniel Tschinder -David Bonnet -Domenico Matteo -Forbes Lindesay -Gilad Peleg -impinball -Ingvar Stepanyan -Jackson Ray Hamilton -Jesse McCarthy -Jiaxing Wang -Joel Kemp -Johannes Herr -Jordan Klassen -Jürg Lehni -Kai Cataldo -keeyipchan -Keheliya Gallaba -Kevin Irish -Kevin Kwok -krator -Marijn Haverbeke -Martin Carlberg -Mat Garcia -Mathias Bynens -Mathieu 'p01' Henri -Matthew Bastien -Max Schaefer -Max Zerzouri -Mihai Bazon -Mike Rennie -naoh -Nicholas C. Zakas -Nick Fitzgerald -Olivier Thomann -Oskar Schöldström -Paul Harper -Peter Rust -PlNG -Prayag Verma -ReadmeCritic -r-e-d -Richard Gibson -Rich Harris -Sebastian McKenzie -Simen Bekkhus -Timothy Gu -Toru Nagashima -Wexpo Lyu -zsjforcn diff --git a/typescript/hello-world/node_modules/acorn/CHANGELOG.md b/typescript/hello-world/node_modules/acorn/CHANGELOG.md deleted file mode 100644 index f6d1fa8..0000000 --- a/typescript/hello-world/node_modules/acorn/CHANGELOG.md +++ /dev/null @@ -1,286 +0,0 @@ -## 4.0.11 (2017-02-07) - -### Bug fixes - -Allow all forms of member expressions to be parenthesized as lvalue. - -## 4.0.10 (2017-02-07) - -### Bug fixes - -Don't expect semicolons after default-exported functions or classes, -even when they are expressions. - -Check for use of `'use strict'` directives in non-simple parameter -functions, even when already in strict mode. - -## 4.0.9 (2017-02-06) - -### Bug fixes - -Fix incorrect error raised for parenthesized simple assignment -targets, so that `(x) = 1` parses again. - -## 4.0.8 (2017-02-03) - -### Bug fixes - -Solve spurious parenthesized pattern errors by temporarily erring on -the side of accepting programs that our delayed errors don't handle -correctly yet. - -## 4.0.7 (2017-02-02) - -### Bug fixes - -Accept invalidly rejected code like `(x).y = 2` again. - -Don't raise an error when a function _inside_ strict code has a -non-simple parameter list. - -## 4.0.6 (2017-02-02) - -### Bug fixes - -Fix exponential behavior (manifesting itself as a complete hang for -even relatively small source files) introduced by the new 'use strict' -check. - -## 4.0.5 (2017-02-02) - -### Bug fixes - -Disallow parenthesized pattern expressions. - -Allow keywords as export names. - -Don't allow the `async` keyword to be parenthesized. - -Properly raise an error when a keyword contains a character escape. - -Allow `"use strict"` to appear after other string literal expressions. - -Disallow labeled declarations. - -## 4.0.4 (2016-12-19) - -### Bug fixes - -Fix issue with loading acorn_loose.js with an AMD loader. - -Fix crash when `export` was followed by a keyword that can't be -exported. - -## 4.0.3 (2016-08-16) - -### Bug fixes - -Allow regular function declarations inside single-statement `if` -branches in loose mode. Forbid them entirely in strict mode. - -Properly parse properties named `async` in ES2017 mode. - -Fix bug where reserved words were broken in ES2017 mode. - -## 4.0.2 (2016-08-11) - -### Bug fixes - -Don't ignore period or 'e' characters after octal numbers. - -Fix broken parsing for call expressions in default parameter values -of arrow functions. - -## 4.0.1 (2016-08-08) - -### Bug fixes - -Fix false positives in duplicated export name errors. - -## 4.0.0 (2016-08-07) - -### Breaking changes - -The default `ecmaVersion` option value is now 7. - -A number of internal method signatures changed, so plugins might need -to be updated. - -### Bug fixes - -The parser now raises errors on duplicated export names. - -`arguments` and `eval` can now be used in shorthand properties. - -Duplicate parameter names in non-simple argument lists now always -produce an error. - -### New features - -The `ecmaVersion` option now also accepts year-style version numbers -(2015, etc). - -Support for `async`/`await` syntax when `ecmaVersion` is >= 8. - -Support for trailing commas in call expressions when `ecmaVersion` -is >= 8. - -## 3.3.0 (2016-07-25) - -### Bug fixes - -Fix bug in tokenizing of regexp operator after a function declaration. - -Fix parser crash when parsing an array pattern with a hole. - -### New features - -Implement check against complex argument lists in functions that -enable strict mode in ES7. - -## 3.2.0 (2016-06-07) - -### Bug fixes - -Improve handling of lack of unicode regexp support in host -environment. - -Properly reject shorthand properties whose name is a keyword. - -Don't crash when the loose parser is called without options object. - -### New features - -Visitors created with `visit.make` now have their base as _prototype_, -rather than copying properties into a fresh object. - -Make it possible to use `visit.ancestor` with a walk state. - -## 3.1.0 (2016-04-18) - -### Bug fixes - -Fix issue where the loose parser created invalid TemplateElement nodes -for unclosed template literals. - -Properly tokenize the division operator directly after a function -expression. - -Allow trailing comma in destructuring arrays. - -### New features - -The walker now allows defining handlers for `CatchClause` nodes. - -## 3.0.4 (2016-02-25) - -### Fixes - -Allow update expressions as left-hand-side of the ES7 exponential -operator. - -## 3.0.2 (2016-02-10) - -### Fixes - -Fix bug that accidentally made `undefined` a reserved word when -parsing ES7. - -## 3.0.0 (2016-02-10) - -### Breaking changes - -The default value of the `ecmaVersion` option is now 6 (used to be 5). - -Support for comprehension syntax (which was dropped from the draft -spec) has been removed. - -### Fixes - -`let` and `yield` are now “contextual keywords”, meaning you can -mostly use them as identifiers in ES5 non-strict code. - -A parenthesized class or function expression after `export default` is -now parsed correctly. - -### New features - -When `ecmaVersion` is set to 7, Acorn will parse the exponentiation -operator (`**`). - -The identifier character ranges are now based on Unicode 8.0.0. - -Plugins can now override the `raiseRecoverable` method to override the -way non-critical errors are handled. - -## 2.7.0 (2016-01-04) - -### Fixes - -Stop allowing rest parameters in setters. - -Make sure the loose parser always attaches a `local` property to -`ImportNamespaceSpecifier` nodes. - -Disallow `y` rexexp flag in ES5. - -Disallow `\00` and `\000` escapes in strict mode. - -Raise an error when an import name is a reserved word. - -## 2.6.4 (2015-11-12) - -### Fixes - -Fix crash in loose parser when parsing invalid object pattern. - -### New features - -Support plugins in the loose parser. - -## 2.6.2 (2015-11-10) - -### Fixes - -Don't crash when no options object is passed. - -## 2.6.0 (2015-11-09) - -### Fixes - -Add `await` as a reserved word in module sources. - -Disallow `yield` in a parameter default value for a generator. - -Forbid using a comma after a rest pattern in an array destructuring. - -### New features - -Support parsing stdin in command-line tool. - -## 2.5.2 (2015-10-27) - -### Fixes - -Fix bug where the walker walked an exported `let` statement as an -expression. - -## 2.5.0 (2015-10-27) - -### Fixes - -Fix tokenizer support in the command-line tool. - -In the loose parser, don't allow non-string-literals as import -sources. - -Stop allowing `new.target` outside of functions. - -Remove legacy `guard` and `guardedHandler` properties from try nodes. - -Stop allowing multiple `__proto__` properties on an object literal in -strict mode. - -Don't allow rest parameters to be non-identifier patterns. - -Check for duplicate paramter names in arrow functions. diff --git a/typescript/hello-world/node_modules/acorn/LICENSE b/typescript/hello-world/node_modules/acorn/LICENSE deleted file mode 100644 index a35ebf4..0000000 --- a/typescript/hello-world/node_modules/acorn/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2016 by various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/typescript/hello-world/node_modules/acorn/README.md b/typescript/hello-world/node_modules/acorn/README.md deleted file mode 100644 index b7efe23..0000000 --- a/typescript/hello-world/node_modules/acorn/README.md +++ /dev/null @@ -1,409 +0,0 @@ -# Acorn - -[![Build Status](https://travis-ci.org/ternjs/acorn.svg?branch=master)](https://travis-ci.org/ternjs/acorn) -[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/package/acorn) -[![CDNJS](https://img.shields.io/cdnjs/v/acorn.svg)](https://cdnjs.com/libraries/acorn) -[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) - -A tiny, fast JavaScript parser, written completely in JavaScript. - -## Community - -Acorn is open source software released under an -[MIT license](https://github.com/ternjs/acorn/blob/master/LICENSE). - -You are welcome to -[report bugs](https://github.com/ternjs/acorn/issues) or create pull -requests on [github](https://github.com/ternjs/acorn). For questions -and discussion, please use the -[Tern discussion forum](https://discuss.ternjs.net). - -## Installation - -The easiest way to install acorn is with [`npm`][npm]. - -[npm]: https://www.npmjs.com/ - -```sh -npm install acorn -``` - -Alternately, download the source. - -```sh -git clone https://github.com/ternjs/acorn.git -``` - -## Components - -When run in a CommonJS (node.js) or AMD environment, exported values -appear in the interfaces exposed by the individual files, as usual. -When loaded in the browser (Acorn works in any JS-enabled browser more -recent than IE5) without any kind of module management, a single -global object `acorn` will be defined, and all the exported properties -will be added to that. - -### Main parser - -This is implemented in `dist/acorn.js`, and is what you get when you -`require("acorn")` in node.js. - -**parse**`(input, options)` is used to parse a JavaScript program. -The `input` parameter is a string, `options` can be undefined or an -object setting some of the options listed below. The return value will -be an abstract syntax tree object as specified by the -[ESTree spec][estree]. - -When encountering a syntax error, the parser will raise a -`SyntaxError` object with a meaningful message. The error object will -have a `pos` property that indicates the character offset at which the -error occurred, and a `loc` object that contains a `{line, column}` -object referring to that same position. - -[estree]: https://github.com/estree/estree - -- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be - either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support for strict - mode, the set of reserved words, and support for new syntax features. - Default is 7. - - **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being - implemented by Acorn. - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. This influences global strict mode - and parsing of `import` and `export` declarations. - -- **onInsertedSemicolon**: If given a callback, that callback will be - called whenever a missing semicolon is inserted by the parser. The - callback will be given the character offset of the point where the - semicolon is inserted as argument, and if `locations` is on, also a - `{line, column}` object representing this position. - -- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing - commas. - -- **allowReserved**: If `false`, using a reserved word will generate - an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher - versions. When given the value `"never"`, reserved words and - keywords can also not be used as property names (as in Internet - Explorer's old parser). - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowHashBang**: When this is enabled (off by default), if the - code starts with the characters `#!` (as in a shellscript), the - first line will be treated as a comment. - -- **locations**: When `true`, each node has a `loc` object attached - with `start` and `end` subobjects, each of which contains the - one-based line and zero-based column numbers in `{line, column}` - form. Default is `false`. - -- **onToken**: If a function is passed for this option, each found - token will be passed in same format as tokens returned from - `tokenizer().getToken()`. - - If array is passed, each found token is pushed to it. - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **onComment**: If a function is passed for this option, whenever a - comment is encountered the function will be called with the - following parameters: - - - `block`: `true` if the comment is a block comment, false if it - is a line comment. - - `text`: The content of the comment. - - `start`: Character offset of the start of the comment. - - `end`: Character offset of the end of the comment. - - When the `locations` options is on, the `{line, column}` locations - of the comment’s start and end are passed as two additional - parameters. - - If array is passed for this option, each found comment is pushed - to it as object in Esprima format: - - ```javascript - { - "type": "Line" | "Block", - "value": "comment text", - "start": Number, - "end": Number, - // If `locations` option is on: - "loc": { - "start": {line: Number, column: Number} - "end": {line: Number, column: Number} - }, - // If `ranges` option is on: - "range": [Number, Number] - } - ``` - - Note that you are not allowed to call the parser from the - callback—that will corrupt its internal state. - -- **ranges**: Nodes have their start and end characters offsets - recorded in `start` and `end` properties (directly on the node, - rather than the `loc` object, which holds line/column data. To also - add a [semi-standardized][range] `range` property holding a - `[start, end]` array with the same numbers, set the `ranges` option - to `true`. - -- **program**: It is possible to parse multiple files into a single - AST by passing the tree produced by parsing the first file as the - `program` option in subsequent parses. This will add the toplevel - forms of the parsed file to the "Program" (top) node of an existing - parse tree. - -- **sourceFile**: When the `locations` option is `true`, you can pass - this option to add a `source` attribute in every node’s `loc` - object. Note that the contents of this option are not examined or - processed in any way; you are free to use whatever format you - choose. - -- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property - will be added (regardless of the `location` option) directly to the - nodes, rather than the `loc` object. - -- **preserveParens**: If this option is `true`, parenthesized expressions - are represented by (non-standard) `ParenthesizedExpression` nodes - that have a single `expression` property containing the expression - inside parentheses. - -[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - -**parseExpressionAt**`(input, offset, options)` will parse a single -expression in a string, and return its AST. It will not complain if -there is more of the string left after the expression. - -**getLineInfo**`(input, offset)` can be used to get a `{line, -column}` object for a given program string and character offset. - -**tokenizer**`(input, options)` returns an object with a `getToken` -method that can be called repeatedly to get the next token, a `{start, -end, type, value}` object (with added `loc` property when the -`locations` option is enabled and `range` property when the `ranges` -option is enabled). When the token's type is `tokTypes.eof`, you -should stop calling the method, since it will keep returning that same -token forever. - -In ES6 environment, returned result can be used as any other -protocol-compliant iterable: - -```javascript -for (let token of acorn.tokenizer(str)) { - // iterate over the tokens -} - -// transform code to array of tokens: -var tokens = [...acorn.tokenizer(str)]; -``` - -**tokTypes** holds an object mapping names to the token type objects -that end up in the `type` properties of tokens. - -#### Note on using with [Escodegen][escodegen] - -Escodegen supports generating comments from AST, attached in -Esprima-specific format. In order to simulate same format in -Acorn, consider following example: - -```javascript -var comments = [], tokens = []; - -var ast = acorn.parse('var x = 42; // answer', { - // collect ranges for each node - ranges: true, - // collect comments in Esprima's format - onComment: comments, - // collect token ranges - onToken: tokens -}); - -// attach comments using collected information -escodegen.attachComments(ast, comments, tokens); - -// generate code -console.log(escodegen.generate(ast, {comment: true})); -// > 'var x = 42; // answer' -``` - -[escodegen]: https://github.com/estools/escodegen - -### dist/acorn_loose.js ### - -This file implements an error-tolerant parser. It exposes a single -function. The loose parser is accessible in node.js via `require("acorn/dist/acorn_loose")`. - -**parse_dammit**`(input, options)` takes the same arguments and -returns the same syntax tree as the `parse` function in `acorn.js`, -but never raises an error, and will do its best to parse syntactically -invalid code in as meaningful a way as it can. It'll insert identifier -nodes with name `"✖"` as placeholders in places where it can't make -sense of the input. Depends on `acorn.js`, because it uses the same -tokenizer. - -### dist/walk.js ### - -Implements an abstract syntax tree walker. Will store its interface in -`acorn.walk` when loaded without a module system. - -**simple**`(node, visitors, base, state)` does a 'simple' walk over -a tree. `node` should be the AST node to walk, and `visitors` an -object with properties whose names correspond to node types in the -[ESTree spec][estree]. The properties should contain functions -that will be called with the node object and, if applicable the state -at that point. The last two arguments are optional. `base` is a walker -algorithm, and `state` is a start state. The default walker will -simply visit all statements and expressions and not produce a -meaningful state. (An example of a use of state is to track scope at -each point in the tree.) - -**ancestor**`(node, visitors, base, state)` does a 'simple' walk over -a tree, building up an array of ancestor nodes (including the current node) -and passing the array to the callbacks as a third parameter. - -**recursive**`(node, state, functions, base)` does a 'recursive' -walk, where the walker functions are responsible for continuing the -walk on the child nodes of their target node. `state` is the start -state, and `functions` should contain an object that maps node types -to walker functions. Such functions are called with `(node, state, c)` -arguments, and can cause the walk to continue on a sub-node by calling -the `c` argument on it with `(node, state)` arguments. The optional -`base` argument provides the fallback walker functions for node types -that aren't handled in the `functions` object. If not given, the -default walkers will be used. - -**make**`(functions, base)` builds a new walker object by using the -walker functions in `functions` and filling in the missing ones by -taking defaults from `base`. - -**findNodeAt**`(node, start, end, test, base, state)` tries to -locate a node in a tree at the given start and/or end offsets, which -satisfies the predicate `test`. `start` and `end` can be either `null` -(as wildcard) or a number. `test` may be a string (indicating a node -type) or a function that takes `(nodeType, node)` arguments and -returns a boolean indicating whether this node is interesting. `base` -and `state` are optional, and can be used to specify a custom walker. -Nodes are tested from inner to outer, so if two nodes match the -boundaries, the inner one will be preferred. - -**findNodeAround**`(node, pos, test, base, state)` is a lot like -`findNodeAt`, but will match any node that exists 'around' (spanning) -the given position. - -**findNodeAfter**`(node, pos, test, base, state)` is similar to -`findNodeAround`, but will match all nodes *after* the given position -(testing outer nodes before inner nodes). - -## Command line interface - -The `bin/acorn` utility can be used to parse a file from the command -line. It accepts as arguments its input file and the following -options: - -- `--ecma3|--ecma5|--ecma6|--ecma7`: Sets the ECMAScript version to parse. Default is - version 5. - -- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. - -- `--locations`: Attaches a "loc" object to each node with "start" and - "end" subobjects, each of which contains the one-based line and - zero-based column numbers in `{line, column}` form. - -- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. - -- `--compact`: No whitespace is used in the AST output. - -- `--silent`: Do not output the AST, just return the exit status. - -- `--help`: Print the usage information and quit. - -The utility spits out the syntax tree as JSON data. - -## Build system - -Acorn is written in ECMAScript 6, as a set of small modules, in the -project's `src` directory, and compiled down to bigger ECMAScript 3 -files in `dist` using [Browserify](http://browserify.org) and -[Babel](http://babeljs.io/). If you are already using Babel, you can -consider including the modules directly. - -The command-line test runner (`npm test`) uses the ES6 modules. The -browser-based test page (`test/index.html`) uses the compiled modules. -The `bin/build-acorn.js` script builds the latter from the former. - -If you are working on Acorn, you'll probably want to try the code out -directly, without an intermediate build step. In your scripts, you can -register the Babel require shim like this: - - require("babel-core/register") - -That will allow you to directly `require` the ES6 modules. - -## Plugins - -Acorn is designed support allow plugins which, within reasonable -bounds, redefine the way the parser works. Plugins can add new token -types and new tokenizer contexts (if necessary), and extend methods in -the parser object. This is not a clean, elegant API—using it requires -an understanding of Acorn's internals, and plugins are likely to break -whenever those internals are significantly changed. But still, it is -_possible_, in this way, to create parsers for JavaScript dialects -without forking all of Acorn. And in principle it is even possible to -combine such plugins, so that if you have, for example, a plugin for -parsing types and a plugin for parsing JSX-style XML literals, you -could load them both and parse code with both JSX tags and types. - -A plugin should register itself by adding a property to -`acorn.plugins`, which holds a function. Calling `acorn.parse`, a -`plugins` option can be passed, holding an object mapping plugin names -to configuration values (or just `true` for plugins that don't take -options). After the parser object has been created, the initialization -functions for the chosen plugins are called with `(parser, -configValue)` arguments. They are expected to use the `parser.extend` -method to extend parser methods. For example, the `readToken` method -could be extended like this: - -```javascript -parser.extend("readToken", function(nextMethod) { - return function(code) { - console.log("Reading a token!") - return nextMethod.call(this, code) - } -}) -``` - -The `nextMethod` argument passed to `extend`'s second argument is the -previous value of this method, and should usually be called through to -whenever the extended method does not handle the call itself. - -Similarly, the loose parser allows plugins to register themselves via -`acorn.pluginsLoose`. The extension mechanism is the same as for the -normal parser: - -```javascript -looseParser.extend("readToken", function(nextMethod) { - return function() { - console.log("Reading a token in the loose parser!") - return nextMethod.call(this) - } -}) -``` - -### Existing plugins - - - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) - - [`acorn-es7-plugin`](https://github.com/MatAtBread/acorn-es7-plugin/): Parse [async/await syntax proposal](https://github.com/tc39/ecmascript-asyncawait) - - [`acorn-object-spread`](https://github.com/UXtemple/acorn-object-spread): Parse [object spread syntax proposal](https://github.com/sebmarkbage/ecmascript-rest-spread) - - [`acorn-es7`](https://www.npmjs.com/package/acorn-es7): Parse [decorator syntax proposal](https://github.com/wycats/javascript-decorators) - - [`acorn-objj`](https://www.npmjs.com/package/acorn-objj): [Objective-J](http://www.cappuccino-project.org/learn/objective-j.html) language parser built as Acorn plugin diff --git a/typescript/hello-world/node_modules/acorn/bin/acorn b/typescript/hello-world/node_modules/acorn/bin/acorn deleted file mode 100755 index 78ebd4f..0000000 --- a/typescript/hello-world/node_modules/acorn/bin/acorn +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -var path = require('path'); -var fs = require('fs'); -var acorn = require('../dist/acorn.js'); - -var infile; -var forceFile; -var silent = false; -var compact = false; -var tokenize = false; -var options = {} - -function help(status) { - var print = (status == 0) ? console.log : console.error - print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|...|--ecma2015|--ecma2016|...]") - print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]") - process.exit(status) -} - -for (var i = 2; i < process.argv.length; ++i) { - var arg = process.argv[i] - if ((arg == "-" || arg[0] != "-") && !infile) infile = arg - else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i] - else if (arg == "--locations") options.locations = true - else if (arg == "--allow-hash-bang") options.allowHashBang = true - else if (arg == "--silent") silent = true - else if (arg == "--compact") compact = true - else if (arg == "--help") help(0) - else if (arg == "--tokenize") tokenize = true - else if (arg == "--module") options.sourceType = 'module' - else { - var match = arg.match(/^--ecma(\d+)$/) - if (match) - options.ecmaVersion = +match[1] - else - help(1) - } -} - -function run(code) { - var result - if (!tokenize) { - try { result = acorn.parse(code, options) } - catch(e) { console.error(e.message); process.exit(1) } - } else { - result = [] - var tokenizer = acorn.tokenizer(code, options), token - while (true) { - try { token = tokenizer.getToken() } - catch(e) { console.error(e.message); process.exit(1) } - result.push(token) - if (token.type == acorn.tokTypes.eof) break - } - } - if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)) -} - -if (forceFile || infile && infile != "-") { - run(fs.readFileSync(infile, "utf8")) -} else { - var code = "" - process.stdin.resume() - process.stdin.on("data", function (chunk) { return code += chunk; }) - process.stdin.on("end", function () { return run(code); }) -} \ No newline at end of file diff --git a/typescript/hello-world/node_modules/acorn/package.json b/typescript/hello-world/node_modules/acorn/package.json deleted file mode 100644 index 1cc57ba..0000000 --- a/typescript/hello-world/node_modules/acorn/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "acorn", - "description": "ECMAScript parser", - "homepage": "https://github.com/ternjs/acorn", - "main": "dist/acorn.js", - "jsnext:main": "dist/acorn.es.js", - "version": "4.0.13", - "engines": { - "node": ">=0.4.0" - }, - "maintainers": [ - { - "name": "Marijn Haverbeke", - "email": "marijnh@gmail.com", - "web": "http://marijnhaverbeke.nl" - }, - { - "name": "Ingvar Stepanyan", - "email": "me@rreverser.com", - "web": "http://rreverser.com/" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/ternjs/acorn.git" - }, - "license": "MIT", - "scripts": { - "prepublish": "npm test", - "test": "node test/run.js", - "pretest": "npm run build", - "build": "npm run build:main && npm run build:walk && npm run build:loose && npm run build:bin", - "build:main": "rollup -c rollup/config.main.js", - "build:walk": "rollup -c rollup/config.walk.js", - "build:loose": "rollup -c rollup/config.loose.js", - "build:bin": "rollup -c rollup/config.bin.js" - }, - "bin": { - "acorn": "./bin/acorn" - }, - "devDependencies": { - "rollup": "^0.34.1", - "rollup-plugin-buble": "^0.11.0", - "unicode-9.0.0": "^0.7.0" - } -} diff --git a/typescript/hello-world/node_modules/acorn/src/bin/acorn.js b/typescript/hello-world/node_modules/acorn/src/bin/acorn.js deleted file mode 100644 index 62e0dad..0000000 --- a/typescript/hello-world/node_modules/acorn/src/bin/acorn.js +++ /dev/null @@ -1,60 +0,0 @@ -import {basename} from "path" -import {readFileSync as readFile} from "fs" -import * as acorn from "acorn" - -let infile, forceFile, silent = false, compact = false, tokenize = false -const options = {} - -function help(status) { - const print = (status == 0) ? console.log : console.error - print("usage: " + basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|...|--ecma2015|--ecma2016|...]") - print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]") - process.exit(status) -} - -for (let i = 2; i < process.argv.length; ++i) { - const arg = process.argv[i] - if ((arg == "-" || arg[0] != "-") && !infile) infile = arg - else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i] - else if (arg == "--locations") options.locations = true - else if (arg == "--allow-hash-bang") options.allowHashBang = true - else if (arg == "--silent") silent = true - else if (arg == "--compact") compact = true - else if (arg == "--help") help(0) - else if (arg == "--tokenize") tokenize = true - else if (arg == "--module") options.sourceType = 'module' - else { - let match = arg.match(/^--ecma(\d+)$/) - if (match) - options.ecmaVersion = +match[1] - else - help(1) - } -} - -function run(code) { - let result - if (!tokenize) { - try { result = acorn.parse(code, options) } - catch(e) { console.error(e.message); process.exit(1) } - } else { - result = [] - let tokenizer = acorn.tokenizer(code, options), token - while (true) { - try { token = tokenizer.getToken() } - catch(e) { console.error(e.message); process.exit(1) } - result.push(token) - if (token.type == acorn.tokTypes.eof) break - } - } - if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)) -} - -if (forceFile || infile && infile != "-") { - run(readFile(infile, "utf8")) -} else { - let code = "" - process.stdin.resume() - process.stdin.on("data", chunk => code += chunk) - process.stdin.on("end", () => run(code)) -} diff --git a/typescript/hello-world/node_modules/acorn/src/expression.js b/typescript/hello-world/node_modules/acorn/src/expression.js deleted file mode 100644 index bbcd9da..0000000 --- a/typescript/hello-world/node_modules/acorn/src/expression.js +++ /dev/null @@ -1,819 +0,0 @@ -// A recursive descent parser operates by defining functions for all -// syntactic elements, and recursively calling those, each function -// advancing the input stream and returning an AST node. Precedence -// of constructs (for example, the fact that `!x[1]` means `!(x[1])` -// instead of `(!x)[1]` is handled by the fact that the parser -// function that parses unary prefix operators is called first, and -// in turn calls the function that parses `[]` subscripts — that -// way, it'll receive the node for `x[1]` already parsed, and wraps -// *that* in the unary operator node. -// -// Acorn uses an [operator precedence parser][opp] to handle binary -// operator precedence, because it is much more compact than using -// the technique outlined above, which uses different, nesting -// functions to specify precedence, for all of the ten binary -// precedence levels that JavaScript defines. -// -// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser - -import {types as tt} from "./tokentype" -import {Parser} from "./state" -import {DestructuringErrors} from "./parseutil" - -const pp = Parser.prototype - -// Check if property name clashes with already added. -// Object/class getters and setters are not allowed to clash — -// either with each other or with an init property — and in -// strict mode, init properties are also not allowed to be repeated. - -pp.checkPropClash = function(prop, propHash) { - if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) - return - let {key} = prop, name - switch (key.type) { - case "Identifier": name = key.name; break - case "Literal": name = String(key.value); break - default: return - } - let {kind} = prop - if (this.options.ecmaVersion >= 6) { - if (name === "__proto__" && kind === "init") { - if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property") - propHash.proto = true - } - return - } - name = "$" + name - let other = propHash[name] - if (other) { - let isGetSet = kind !== "init" - if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) - this.raiseRecoverable(key.start, "Redefinition of property") - } else { - other = propHash[name] = { - init: false, - get: false, - set: false - } - } - other[kind] = true -} - -// ### Expression parsing - -// These nest, from the most general expression type at the top to -// 'atomic', nondivisible expression types at the bottom. Most of -// the functions will simply let the function(s) below them parse, -// and, *if* the syntactic construct they handle is present, wrap -// the AST node that the inner parser gave them in another node. - -// Parse a full expression. The optional arguments are used to -// forbid the `in` operator (in for loops initalization expressions) -// and provide reference for storing '=' operator inside shorthand -// property assignment in contexts where both object expression -// and object pattern might appear (so it's possible to raise -// delayed syntax error at correct position). - -pp.parseExpression = function(noIn, refDestructuringErrors) { - let startPos = this.start, startLoc = this.startLoc - let expr = this.parseMaybeAssign(noIn, refDestructuringErrors) - if (this.type === tt.comma) { - let node = this.startNodeAt(startPos, startLoc) - node.expressions = [expr] - while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refDestructuringErrors)) - return this.finishNode(node, "SequenceExpression") - } - return expr -} - -// Parse an assignment expression. This includes applications of -// operators like `+=`. - -pp.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { - if (this.inGenerator && this.isContextual("yield")) return this.parseYield() - - let ownDestructuringErrors = false, oldParenAssign = -1 - if (refDestructuringErrors) { - oldParenAssign = refDestructuringErrors.parenthesizedAssign - refDestructuringErrors.parenthesizedAssign = -1 - } else { - refDestructuringErrors = new DestructuringErrors - ownDestructuringErrors = true - } - - let startPos = this.start, startLoc = this.startLoc - if (this.type == tt.parenL || this.type == tt.name) - this.potentialArrowAt = this.start - let left = this.parseMaybeConditional(noIn, refDestructuringErrors) - if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc) - if (this.type.isAssign) { - this.checkPatternErrors(refDestructuringErrors, true) - if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors) - let node = this.startNodeAt(startPos, startLoc) - node.operator = this.value - node.left = this.type === tt.eq ? this.toAssignable(left) : left - refDestructuringErrors.shorthandAssign = -1 // reset because shorthand default was used correctly - this.checkLVal(left) - this.next() - node.right = this.parseMaybeAssign(noIn) - return this.finishNode(node, "AssignmentExpression") - } else { - if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true) - } - if (oldParenAssign > -1) refDestructuringErrors.parenthesizedAssign = oldParenAssign - return left -} - -// Parse a ternary conditional (`?:`) operator. - -pp.parseMaybeConditional = function(noIn, refDestructuringErrors) { - let startPos = this.start, startLoc = this.startLoc - let expr = this.parseExprOps(noIn, refDestructuringErrors) - if (this.checkExpressionErrors(refDestructuringErrors)) return expr - if (this.eat(tt.question)) { - let node = this.startNodeAt(startPos, startLoc) - node.test = expr - node.consequent = this.parseMaybeAssign() - this.expect(tt.colon) - node.alternate = this.parseMaybeAssign(noIn) - return this.finishNode(node, "ConditionalExpression") - } - return expr -} - -// Start the precedence parser. - -pp.parseExprOps = function(noIn, refDestructuringErrors) { - let startPos = this.start, startLoc = this.startLoc - let expr = this.parseMaybeUnary(refDestructuringErrors, false) - if (this.checkExpressionErrors(refDestructuringErrors)) return expr - return this.parseExprOp(expr, startPos, startLoc, -1, noIn) -} - -// Parse binary operators with the operator precedence parsing -// algorithm. `left` is the left-hand side of the operator. -// `minPrec` provides context that allows the function to stop and -// defer further parser to one of its callers when it encounters an -// operator that has a lower precedence than the set it is parsing. - -pp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { - let prec = this.type.binop - if (prec != null && (!noIn || this.type !== tt._in)) { - if (prec > minPrec) { - let logical = this.type === tt.logicalOR || this.type === tt.logicalAND - let op = this.value - this.next() - let startPos = this.start, startLoc = this.startLoc - let right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn) - let node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical) - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) - } - } - return left -} - -pp.buildBinary = function(startPos, startLoc, left, right, op, logical) { - let node = this.startNodeAt(startPos, startLoc) - node.left = left - node.operator = op - node.right = right - return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") -} - -// Parse unary operators, both prefix and postfix. - -pp.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { - let startPos = this.start, startLoc = this.startLoc, expr - if (this.inAsync && this.isContextual("await")) { - expr = this.parseAwait(refDestructuringErrors) - sawUnary = true - } else if (this.type.prefix) { - let node = this.startNode(), update = this.type === tt.incDec - node.operator = this.value - node.prefix = true - this.next() - node.argument = this.parseMaybeUnary(null, true) - this.checkExpressionErrors(refDestructuringErrors, true) - if (update) this.checkLVal(node.argument) - else if (this.strict && node.operator === "delete" && - node.argument.type === "Identifier") - this.raiseRecoverable(node.start, "Deleting local variable in strict mode") - else sawUnary = true - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression") - } else { - expr = this.parseExprSubscripts(refDestructuringErrors) - if (this.checkExpressionErrors(refDestructuringErrors)) return expr - while (this.type.postfix && !this.canInsertSemicolon()) { - let node = this.startNodeAt(startPos, startLoc) - node.operator = this.value - node.prefix = false - node.argument = expr - this.checkLVal(expr) - this.next() - expr = this.finishNode(node, "UpdateExpression") - } - } - - if (!sawUnary && this.eat(tt.starstar)) - return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) - else - return expr -} - -// Parse call, dot, and `[]`-subscript expressions. - -pp.parseExprSubscripts = function(refDestructuringErrors) { - let startPos = this.start, startLoc = this.startLoc - let expr = this.parseExprAtom(refDestructuringErrors) - let skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")" - if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr - let result = this.parseSubscripts(expr, startPos, startLoc) - if (refDestructuringErrors && result.type === "MemberExpression") { - if (refDestructuringErrors.parenthesizedAssign >= result.start) refDestructuringErrors.parenthesizedAssign = -1 - if (refDestructuringErrors.parenthesizedBind >= result.start) refDestructuringErrors.parenthesizedBind = -1 - } - return result -} - -pp.parseSubscripts = function(base, startPos, startLoc, noCalls) { - let maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && - this.lastTokEnd == base.end && !this.canInsertSemicolon() - for (let computed;;) { - if ((computed = this.eat(tt.bracketL)) || this.eat(tt.dot)) { - let node = this.startNodeAt(startPos, startLoc) - node.object = base - node.property = computed ? this.parseExpression() : this.parseIdent(true) - node.computed = !!computed - if (computed) this.expect(tt.bracketR) - base = this.finishNode(node, "MemberExpression") - } else if (!noCalls && this.eat(tt.parenL)) { - let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos - this.yieldPos = 0 - this.awaitPos = 0 - let exprList = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors) - if (maybeAsyncArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false) - this.checkYieldAwaitInDefaultParams() - this.yieldPos = oldYieldPos - this.awaitPos = oldAwaitPos - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true) - } - this.checkExpressionErrors(refDestructuringErrors, true) - this.yieldPos = oldYieldPos || this.yieldPos - this.awaitPos = oldAwaitPos || this.awaitPos - let node = this.startNodeAt(startPos, startLoc) - node.callee = base - node.arguments = exprList - base = this.finishNode(node, "CallExpression") - } else if (this.type === tt.backQuote) { - let node = this.startNodeAt(startPos, startLoc) - node.tag = base - node.quasi = this.parseTemplate() - base = this.finishNode(node, "TaggedTemplateExpression") - } else { - return base - } - } -} - -// Parse an atomic expression — either a single token that is an -// expression, an expression started by a keyword like `function` or -// `new`, or an expression wrapped in punctuation like `()`, `[]`, -// or `{}`. - -pp.parseExprAtom = function(refDestructuringErrors) { - let node, canBeArrow = this.potentialArrowAt == this.start - switch (this.type) { - case tt._super: - if (!this.inFunction) - this.raise(this.start, "'super' outside of function or class") - - case tt._this: - let type = this.type === tt._this ? "ThisExpression" : "Super" - node = this.startNode() - this.next() - return this.finishNode(node, type) - - case tt.name: - let startPos = this.start, startLoc = this.startLoc - let id = this.parseIdent(this.type !== tt.name) - if (this.options.ecmaVersion >= 8 && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function)) - return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true) - if (canBeArrow && !this.canInsertSemicolon()) { - if (this.eat(tt.arrow)) - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) - if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name) { - id = this.parseIdent() - if (this.canInsertSemicolon() || !this.eat(tt.arrow)) - this.unexpected() - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) - } - } - return id - - case tt.regexp: - let value = this.value - node = this.parseLiteral(value.value) - node.regex = {pattern: value.pattern, flags: value.flags} - return node - - case tt.num: case tt.string: - return this.parseLiteral(this.value) - - case tt._null: case tt._true: case tt._false: - node = this.startNode() - node.value = this.type === tt._null ? null : this.type === tt._true - node.raw = this.type.keyword - this.next() - return this.finishNode(node, "Literal") - - case tt.parenL: - let start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow) - if (refDestructuringErrors) { - if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) - refDestructuringErrors.parenthesizedAssign = start - if (refDestructuringErrors.parenthesizedBind < 0) - refDestructuringErrors.parenthesizedBind = start - } - return expr - - case tt.bracketL: - node = this.startNode() - this.next() - node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors) - return this.finishNode(node, "ArrayExpression") - - case tt.braceL: - return this.parseObj(false, refDestructuringErrors) - - case tt._function: - node = this.startNode() - this.next() - return this.parseFunction(node, false) - - case tt._class: - return this.parseClass(this.startNode(), false) - - case tt._new: - return this.parseNew() - - case tt.backQuote: - return this.parseTemplate() - - default: - this.unexpected() - } -} - -pp.parseLiteral = function(value) { - let node = this.startNode() - node.value = value - node.raw = this.input.slice(this.start, this.end) - this.next() - return this.finishNode(node, "Literal") -} - -pp.parseParenExpression = function() { - this.expect(tt.parenL) - let val = this.parseExpression() - this.expect(tt.parenR) - return val -} - -pp.parseParenAndDistinguishExpression = function(canBeArrow) { - let startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8 - if (this.options.ecmaVersion >= 6) { - this.next() - - let innerStartPos = this.start, innerStartLoc = this.startLoc - let exprList = [], first = true, lastIsComma = false - let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart, innerParenStart - this.yieldPos = 0 - this.awaitPos = 0 - while (this.type !== tt.parenR) { - first ? first = false : this.expect(tt.comma) - if (allowTrailingComma && this.afterTrailingComma(tt.parenR, true)) { - lastIsComma = true - break - } else if (this.type === tt.ellipsis) { - spreadStart = this.start - exprList.push(this.parseParenItem(this.parseRest())) - if (this.type === tt.comma) this.raise(this.start, "Comma is not permitted after the rest element") - break - } else { - if (this.type === tt.parenL && !innerParenStart) { - innerParenStart = this.start - } - exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)) - } - } - let innerEndPos = this.start, innerEndLoc = this.startLoc - this.expect(tt.parenR) - - if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { - this.checkPatternErrors(refDestructuringErrors, false) - this.checkYieldAwaitInDefaultParams() - if (innerParenStart) this.unexpected(innerParenStart) - this.yieldPos = oldYieldPos - this.awaitPos = oldAwaitPos - return this.parseParenArrowList(startPos, startLoc, exprList) - } - - if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart) - if (spreadStart) this.unexpected(spreadStart) - this.checkExpressionErrors(refDestructuringErrors, true) - this.yieldPos = oldYieldPos || this.yieldPos - this.awaitPos = oldAwaitPos || this.awaitPos - - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc) - val.expressions = exprList - this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc) - } else { - val = exprList[0] - } - } else { - val = this.parseParenExpression() - } - - if (this.options.preserveParens) { - let par = this.startNodeAt(startPos, startLoc) - par.expression = val - return this.finishNode(par, "ParenthesizedExpression") - } else { - return val - } -} - -pp.parseParenItem = function(item) { - return item -} - -pp.parseParenArrowList = function(startPos, startLoc, exprList) { - return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) -} - -// New's precedence is slightly tricky. It must allow its argument to -// be a `[]` or dot subscript expression, but not a call — at least, -// not without wrapping it in parentheses. Thus, it uses the noCalls -// argument to parseSubscripts to prevent it from consuming the -// argument list. - -const empty = [] - -pp.parseNew = function() { - let node = this.startNode() - let meta = this.parseIdent(true) - if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { - node.meta = meta - node.property = this.parseIdent(true) - if (node.property.name !== "target") - this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target") - if (!this.inFunction) - this.raiseRecoverable(node.start, "new.target can only be used in functions") - return this.finishNode(node, "MetaProperty") - } - let startPos = this.start, startLoc = this.startLoc - node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true) - if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false) - else node.arguments = empty - return this.finishNode(node, "NewExpression") -} - -// Parse template expression. - -pp.parseTemplateElement = function() { - let elem = this.startNode() - elem.value = { - raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), - cooked: this.value - } - this.next() - elem.tail = this.type === tt.backQuote - return this.finishNode(elem, "TemplateElement") -} - -pp.parseTemplate = function() { - let node = this.startNode() - this.next() - node.expressions = [] - let curElt = this.parseTemplateElement() - node.quasis = [curElt] - while (!curElt.tail) { - this.expect(tt.dollarBraceL) - node.expressions.push(this.parseExpression()) - this.expect(tt.braceR) - node.quasis.push(curElt = this.parseTemplateElement()) - } - this.next() - return this.finishNode(node, "TemplateLiteral") -} - -// Parse an object literal or binding pattern. - -pp.parseObj = function(isPattern, refDestructuringErrors) { - let node = this.startNode(), first = true, propHash = {} - node.properties = [] - this.next() - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma) - if (this.afterTrailingComma(tt.braceR)) break - } else first = false - - let prop = this.startNode(), isGenerator, isAsync, startPos, startLoc - if (this.options.ecmaVersion >= 6) { - prop.method = false - prop.shorthand = false - if (isPattern || refDestructuringErrors) { - startPos = this.start - startLoc = this.startLoc - } - if (!isPattern) - isGenerator = this.eat(tt.star) - } - this.parsePropertyName(prop) - if (!isPattern && this.options.ecmaVersion >= 8 && !isGenerator && !prop.computed && - prop.key.type === "Identifier" && prop.key.name === "async" && this.type !== tt.parenL && - this.type !== tt.colon && !this.canInsertSemicolon()) { - isAsync = true - this.parsePropertyName(prop, refDestructuringErrors) - } else { - isAsync = false - } - this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) - this.checkPropClash(prop, propHash) - node.properties.push(this.finishNode(prop, "Property")) - } - return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") -} - -pp.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) { - if ((isGenerator || isAsync) && this.type === tt.colon) - this.unexpected() - - if (this.eat(tt.colon)) { - prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors) - prop.kind = "init" - } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { - if (isPattern) this.unexpected() - prop.kind = "init" - prop.method = true - prop.value = this.parseMethod(isGenerator, isAsync) - } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && - (prop.key.name === "get" || prop.key.name === "set") && - (this.type != tt.comma && this.type != tt.braceR)) { - if (isGenerator || isAsync || isPattern) this.unexpected() - prop.kind = prop.key.name - this.parsePropertyName(prop) - prop.value = this.parseMethod(false) - let paramCount = prop.kind === "get" ? 0 : 1 - if (prop.value.params.length !== paramCount) { - let start = prop.value.start - if (prop.kind === "get") - this.raiseRecoverable(start, "getter should have no params") - else - this.raiseRecoverable(start, "setter should have exactly one param") - } else { - if (prop.kind === "set" && prop.value.params[0].type === "RestElement") - this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params") - } - } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { - if (this.keywords.test(prop.key.name) || - (this.strict ? this.reservedWordsStrict : this.reservedWords).test(prop.key.name) || - (this.inGenerator && prop.key.name == "yield") || - (this.inAsync && prop.key.name == "await")) - this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property") - prop.kind = "init" - if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) - } else if (this.type === tt.eq && refDestructuringErrors) { - if (refDestructuringErrors.shorthandAssign < 0) - refDestructuringErrors.shorthandAssign = this.start - prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) - } else { - prop.value = prop.key - } - prop.shorthand = true - } else this.unexpected() -} - -pp.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(tt.bracketL)) { - prop.computed = true - prop.key = this.parseMaybeAssign() - this.expect(tt.bracketR) - return prop.key - } else { - prop.computed = false - } - } - return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true) -} - -// Initialize empty function node. - -pp.initFunction = function(node) { - node.id = null - if (this.options.ecmaVersion >= 6) { - node.generator = false - node.expression = false - } - if (this.options.ecmaVersion >= 8) - node.async = false -} - -// Parse object or class method. - -pp.parseMethod = function(isGenerator, isAsync) { - let node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync, - oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction - - this.initFunction(node) - if (this.options.ecmaVersion >= 6) - node.generator = isGenerator - if (this.options.ecmaVersion >= 8) - node.async = !!isAsync - - this.inGenerator = node.generator - this.inAsync = node.async - this.yieldPos = 0 - this.awaitPos = 0 - this.inFunction = true - - this.expect(tt.parenL) - node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8) - this.checkYieldAwaitInDefaultParams() - this.parseFunctionBody(node, false) - - this.inGenerator = oldInGen - this.inAsync = oldInAsync - this.yieldPos = oldYieldPos - this.awaitPos = oldAwaitPos - this.inFunction = oldInFunc - return this.finishNode(node, "FunctionExpression") -} - -// Parse arrow function expression with given parameters. - -pp.parseArrowExpression = function(node, params, isAsync) { - let oldInGen = this.inGenerator, oldInAsync = this.inAsync, - oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction - - this.initFunction(node) - if (this.options.ecmaVersion >= 8) - node.async = !!isAsync - - this.inGenerator = false - this.inAsync = node.async - this.yieldPos = 0 - this.awaitPos = 0 - this.inFunction = true - - node.params = this.toAssignableList(params, true) - this.parseFunctionBody(node, true) - - this.inGenerator = oldInGen - this.inAsync = oldInAsync - this.yieldPos = oldYieldPos - this.awaitPos = oldAwaitPos - this.inFunction = oldInFunc - return this.finishNode(node, "ArrowFunctionExpression") -} - -// Parse function body and check parameters. - -pp.parseFunctionBody = function(node, isArrowFunction) { - let isExpression = isArrowFunction && this.type !== tt.braceL - let oldStrict = this.strict, useStrict = false - - if (isExpression) { - node.body = this.parseMaybeAssign() - node.expression = true - } else { - let nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params) - if (!oldStrict || nonSimple) { - useStrict = this.strictDirective(this.end) - // If this is a strict mode function, verify that argument names - // are not repeated, and it does not try to bind the words `eval` - // or `arguments`. - if (useStrict && nonSimple) - this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list") - } - // Start a new scope with regard to labels and the `inFunction` - // flag (restore them to their old value afterwards). - let oldLabels = this.labels - this.labels = [] - if (useStrict) this.strict = true - node.body = this.parseBlock(true) - node.expression = false - this.labels = oldLabels - } - - if (oldStrict || useStrict) { - this.strict = true - if (node.id) - this.checkLVal(node.id, true) - this.checkParams(node) - this.strict = oldStrict - } else if (isArrowFunction || !this.isSimpleParamList(node.params)) { - this.checkParams(node) - } -} - -pp.isSimpleParamList = function(params) { - for (let i = 0; i < params.length; i++) - if (params[i].type !== "Identifier") return false - return true -} - -// Checks function params for various disallowed patterns such as using "eval" -// or "arguments" and duplicate parameters. - -pp.checkParams = function(node) { - let nameHash = {} - for (let i = 0; i < node.params.length; i++) this.checkLVal(node.params[i], true, nameHash) -} - -// Parses a comma-separated list of expressions, and returns them as -// an array. `close` is the token type that ends the list, and -// `allowEmpty` can be turned on to allow subsequent commas with -// nothing in between them to be parsed as `null` (which is needed -// for array literals). - -pp.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { - let elts = [], first = true - while (!this.eat(close)) { - if (!first) { - this.expect(tt.comma) - if (allowTrailingComma && this.afterTrailingComma(close)) break - } else first = false - - let elt - if (allowEmpty && this.type === tt.comma) - elt = null - else if (this.type === tt.ellipsis) { - elt = this.parseSpread(refDestructuringErrors) - if (refDestructuringErrors && this.type === tt.comma && refDestructuringErrors.trailingComma < 0) - refDestructuringErrors.trailingComma = this.start - } else { - elt = this.parseMaybeAssign(false, refDestructuringErrors) - } - elts.push(elt) - } - return elts -} - -// Parse the next token as an identifier. If `liberal` is true (used -// when parsing properties), it will also convert keywords into -// identifiers. - -pp.parseIdent = function(liberal) { - let node = this.startNode() - if (liberal && this.options.allowReserved == "never") liberal = false - if (this.type === tt.name) { - if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && - (this.options.ecmaVersion >= 6 || - this.input.slice(this.start, this.end).indexOf("\\") == -1)) - this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved") - if (this.inGenerator && this.value === "yield") - this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator") - if (this.inAsync && this.value === "await") - this.raiseRecoverable(this.start, "Can not use 'await' as identifier inside an async function") - node.name = this.value - } else if (liberal && this.type.keyword) { - node.name = this.type.keyword - } else { - this.unexpected() - } - this.next() - return this.finishNode(node, "Identifier") -} - -// Parses yield expression inside generator. - -pp.parseYield = function() { - if (!this.yieldPos) this.yieldPos = this.start - - let node = this.startNode() - this.next() - if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) { - node.delegate = false - node.argument = null - } else { - node.delegate = this.eat(tt.star) - node.argument = this.parseMaybeAssign() - } - return this.finishNode(node, "YieldExpression") -} - -pp.parseAwait = function() { - if (!this.awaitPos) this.awaitPos = this.start - - let node = this.startNode() - this.next() - node.argument = this.parseMaybeUnary(null, true) - return this.finishNode(node, "AwaitExpression") -} diff --git a/typescript/hello-world/node_modules/acorn/src/identifier.js b/typescript/hello-world/node_modules/acorn/src/identifier.js deleted file mode 100644 index c65a24c..0000000 --- a/typescript/hello-world/node_modules/acorn/src/identifier.js +++ /dev/null @@ -1,81 +0,0 @@ -// Reserved word lists for various dialects of the language - -export const reservedWords = { - 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", - 5: "class enum extends super const export import", - 6: "enum", - strict: "implements interface let package private protected public static yield", - strictBind: "eval arguments" -} - -// And the keywords - -var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this" - -export const keywords = { - 5: ecma5AndLessKeywords, - 6: ecma5AndLessKeywords + " const class extends export import super" -} - -// ## Character categories - -// Big ugly regular expressions that match characters in the -// whitespace, identifier, and identifier-start categories. These -// are only applied when a character is found to actually have a -// code point above 128. -// Generated by `bin/generate-identifier-regex.js`. - -let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc" -let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f" - -const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]") -const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]") - -nonASCIIidentifierStartChars = nonASCIIidentifierChars = null - -// These are a run-length and offset encoded representation of the -// >0xffff code points that are a valid part of identifiers. The -// offset starts at 0x10000, and each pair of numbers represents an -// offset to the next range, and then a size of the range. They were -// generated by bin/generate-identifier-regex.js -const astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541] -const astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239] - -// This has a complexity linear to the value of the code. The -// assumption is that looking up astral identifier characters is -// rare. -function isInAstralSet(code, set) { - let pos = 0x10000 - for (let i = 0; i < set.length; i += 2) { - pos += set[i] - if (pos > code) return false - pos += set[i + 1] - if (pos >= code) return true - } -} - -// Test whether a given character code starts an identifier. - -export function isIdentifierStart(code, astral) { - if (code < 65) return code === 36 - if (code < 91) return true - if (code < 97) return code === 95 - if (code < 123) return true - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) - if (astral === false) return false - return isInAstralSet(code, astralIdentifierStartCodes) -} - -// Test whether a given character is part of an identifier. - -export function isIdentifierChar(code, astral) { - if (code < 48) return code === 36 - if (code < 58) return true - if (code < 65) return false - if (code < 91) return true - if (code < 97) return code === 95 - if (code < 123) return true - if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) - if (astral === false) return false - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) -} diff --git a/typescript/hello-world/node_modules/acorn/src/index.js b/typescript/hello-world/node_modules/acorn/src/index.js deleted file mode 100644 index 3f93d1e..0000000 --- a/typescript/hello-world/node_modules/acorn/src/index.js +++ /dev/null @@ -1,77 +0,0 @@ -// Acorn is a tiny, fast JavaScript parser written in JavaScript. -// -// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and -// various contributors and released under an MIT license. -// -// Git repositories for Acorn are available at -// -// http://marijnhaverbeke.nl/git/acorn -// https://github.com/ternjs/acorn.git -// -// Please use the [github bug tracker][ghbt] to report issues. -// -// [ghbt]: https://github.com/ternjs/acorn/issues -// -// This file defines the main parser interface. The library also comes -// with a [error-tolerant parser][dammit] and an -// [abstract syntax tree walker][walk], defined in other files. -// -// [dammit]: acorn_loose.js -// [walk]: util/walk.js - -import {Parser} from "./state" -import "./parseutil" -import "./statement" -import "./lval" -import "./expression" -import "./location" - -export {Parser, plugins} from "./state" -export {defaultOptions} from "./options" -export {Position, SourceLocation, getLineInfo} from "./locutil" -export {Node} from "./node" -export {TokenType, types as tokTypes, keywords as keywordTypes} from "./tokentype" -export {TokContext, types as tokContexts} from "./tokencontext" -export {isIdentifierChar, isIdentifierStart} from "./identifier" -export {Token} from "./tokenize" -export {isNewLine, lineBreak, lineBreakG} from "./whitespace" - -export const version = "4.0.11" - -// The main exported interface (under `self.acorn` when in the -// browser) is a `parse` function that takes a code string and -// returns an abstract syntax tree as specified by [Mozilla parser -// API][api]. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - -export function parse(input, options) { - return new Parser(options, input).parse() -} - -// This function tries to parse a single expression at a given -// offset in a string. Useful for parsing mixed-language formats -// that embed JavaScript expressions. - -export function parseExpressionAt(input, pos, options) { - let p = new Parser(options, input, pos) - p.nextToken() - return p.parseExpression() -} - -// Acorn is organized as a tokenizer and a recursive-descent parser. -// The `tokenizer` export provides an interface to the tokenizer. - -export function tokenizer(input, options) { - return new Parser(options, input) -} - -// This is a terrible kludge to support the existing, pre-ES6 -// interface where the loose parser module retroactively adds exports -// to this module. -export let parse_dammit, LooseParser, pluginsLoose -export function addLooseExports(parse, Parser, plugins) { - parse_dammit = parse - LooseParser = Parser - pluginsLoose = plugins -} diff --git a/typescript/hello-world/node_modules/acorn/src/location.js b/typescript/hello-world/node_modules/acorn/src/location.js deleted file mode 100644 index 99e7123..0000000 --- a/typescript/hello-world/node_modules/acorn/src/location.js +++ /dev/null @@ -1,26 +0,0 @@ -import {Parser} from "./state" -import {Position, getLineInfo} from "./locutil" - -const pp = Parser.prototype - -// This function is used to raise exceptions on parse errors. It -// takes an offset integer (into the current `input`) to indicate -// the location of the error, attaches the position to the end -// of the error message, and then raises a `SyntaxError` with that -// message. - -pp.raise = function(pos, message) { - let loc = getLineInfo(this.input, pos) - message += " (" + loc.line + ":" + loc.column + ")" - let err = new SyntaxError(message) - err.pos = pos; err.loc = loc; err.raisedAt = this.pos - throw err -} - -pp.raiseRecoverable = pp.raise - -pp.curPosition = function() { - if (this.options.locations) { - return new Position(this.curLine, this.pos - this.lineStart) - } -} diff --git a/typescript/hello-world/node_modules/acorn/src/locutil.js b/typescript/hello-world/node_modules/acorn/src/locutil.js deleted file mode 100644 index 5a9465e..0000000 --- a/typescript/hello-world/node_modules/acorn/src/locutil.js +++ /dev/null @@ -1,42 +0,0 @@ -import {lineBreakG} from "./whitespace" - -// These are used when `options.locations` is on, for the -// `startLoc` and `endLoc` properties. - -export class Position { - constructor(line, col) { - this.line = line - this.column = col - } - - offset(n) { - return new Position(this.line, this.column + n) - } -} - -export class SourceLocation { - constructor(p, start, end) { - this.start = start - this.end = end - if (p.sourceFile !== null) this.source = p.sourceFile - } -} - -// The `getLineInfo` function is mostly useful when the -// `locations` option is off (for performance reasons) and you -// want to find the line/column position for a given character -// offset. `input` should be the code string that the offset refers -// into. - -export function getLineInfo(input, offset) { - for (let line = 1, cur = 0;;) { - lineBreakG.lastIndex = cur - let match = lineBreakG.exec(input) - if (match && match.index < offset) { - ++line - cur = match.index + match[0].length - } else { - return new Position(line, offset - cur) - } - } -} diff --git a/typescript/hello-world/node_modules/acorn/src/loose/expression.js b/typescript/hello-world/node_modules/acorn/src/loose/expression.js deleted file mode 100644 index 321ca66..0000000 --- a/typescript/hello-world/node_modules/acorn/src/loose/expression.js +++ /dev/null @@ -1,562 +0,0 @@ -import {LooseParser} from "./state" -import {isDummy} from "./parseutil" -import {tokTypes as tt} from "../index" - -const lp = LooseParser.prototype - -lp.checkLVal = function(expr) { - if (!expr) return expr - switch (expr.type) { - case "Identifier": - case "MemberExpression": - return expr - - case "ParenthesizedExpression": - expr.expression = this.checkLVal(expr.expression) - return expr - - default: - return this.dummyIdent() - } -} - -lp.parseExpression = function(noIn) { - let start = this.storeCurrentPos() - let expr = this.parseMaybeAssign(noIn) - if (this.tok.type === tt.comma) { - let node = this.startNodeAt(start) - node.expressions = [expr] - while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn)) - return this.finishNode(node, "SequenceExpression") - } - return expr -} - -lp.parseParenExpression = function() { - this.pushCx() - this.expect(tt.parenL) - let val = this.parseExpression() - this.popCx() - this.expect(tt.parenR) - return val -} - -lp.parseMaybeAssign = function(noIn) { - if (this.toks.isContextual("yield")) { - let node = this.startNode() - this.next() - if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != tt.star && !this.tok.type.startsExpr)) { - node.delegate = false - node.argument = null - } else { - node.delegate = this.eat(tt.star) - node.argument = this.parseMaybeAssign() - } - return this.finishNode(node, "YieldExpression") - } - - let start = this.storeCurrentPos() - let left = this.parseMaybeConditional(noIn) - if (this.tok.type.isAssign) { - let node = this.startNodeAt(start) - node.operator = this.tok.value - node.left = this.tok.type === tt.eq ? this.toAssignable(left) : this.checkLVal(left) - this.next() - node.right = this.parseMaybeAssign(noIn) - return this.finishNode(node, "AssignmentExpression") - } - return left -} - -lp.parseMaybeConditional = function(noIn) { - let start = this.storeCurrentPos() - let expr = this.parseExprOps(noIn) - if (this.eat(tt.question)) { - let node = this.startNodeAt(start) - node.test = expr - node.consequent = this.parseMaybeAssign() - node.alternate = this.expect(tt.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent() - return this.finishNode(node, "ConditionalExpression") - } - return expr -} - -lp.parseExprOps = function(noIn) { - let start = this.storeCurrentPos() - let indent = this.curIndent, line = this.curLineStart - return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line) -} - -lp.parseExprOp = function(left, start, minPrec, noIn, indent, line) { - if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left - let prec = this.tok.type.binop - if (prec != null && (!noIn || this.tok.type !== tt._in)) { - if (prec > minPrec) { - let node = this.startNodeAt(start) - node.left = left - node.operator = this.tok.value - this.next() - if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) { - node.right = this.dummyIdent() - } else { - let rightStart = this.storeCurrentPos() - node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line) - } - this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression") - return this.parseExprOp(node, start, minPrec, noIn, indent, line) - } - } - return left -} - -lp.parseMaybeUnary = function(sawUnary) { - let start = this.storeCurrentPos(), expr - if (this.options.ecmaVersion >= 8 && this.inAsync && this.toks.isContextual("await")) { - expr = this.parseAwait() - sawUnary = true - } else if (this.tok.type.prefix) { - let node = this.startNode(), update = this.tok.type === tt.incDec - if (!update) sawUnary = true - node.operator = this.tok.value - node.prefix = true - this.next() - node.argument = this.parseMaybeUnary(true) - if (update) node.argument = this.checkLVal(node.argument) - expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression") - } else if (this.tok.type === tt.ellipsis) { - let node = this.startNode() - this.next() - node.argument = this.parseMaybeUnary(sawUnary) - expr = this.finishNode(node, "SpreadElement") - } else { - expr = this.parseExprSubscripts() - while (this.tok.type.postfix && !this.canInsertSemicolon()) { - let node = this.startNodeAt(start) - node.operator = this.tok.value - node.prefix = false - node.argument = this.checkLVal(expr) - this.next() - expr = this.finishNode(node, "UpdateExpression") - } - } - - if (!sawUnary && this.eat(tt.starstar)) { - let node = this.startNodeAt(start) - node.operator = "**" - node.left = expr - node.right = this.parseMaybeUnary(false) - return this.finishNode(node, "BinaryExpression") - } - - return expr -} - -lp.parseExprSubscripts = function() { - let start = this.storeCurrentPos() - return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart) -} - -lp.parseSubscripts = function(base, start, noCalls, startIndent, line) { - for (;;) { - if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) { - if (this.tok.type == tt.dot && this.curIndent == startIndent) - --startIndent - else - return base - } - - let maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon() - - if (this.eat(tt.dot)) { - let node = this.startNodeAt(start) - node.object = base - if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) - node.property = this.dummyIdent() - else - node.property = this.parsePropertyAccessor() || this.dummyIdent() - node.computed = false - base = this.finishNode(node, "MemberExpression") - } else if (this.tok.type == tt.bracketL) { - this.pushCx() - this.next() - let node = this.startNodeAt(start) - node.object = base - node.property = this.parseExpression() - node.computed = true - this.popCx() - this.expect(tt.bracketR) - base = this.finishNode(node, "MemberExpression") - } else if (!noCalls && this.tok.type == tt.parenL) { - let exprList = this.parseExprList(tt.parenR) - if (maybeAsyncArrow && this.eat(tt.arrow)) - return this.parseArrowExpression(this.startNodeAt(start), exprList, true) - let node = this.startNodeAt(start) - node.callee = base - node.arguments = exprList - base = this.finishNode(node, "CallExpression") - } else if (this.tok.type == tt.backQuote) { - let node = this.startNodeAt(start) - node.tag = base - node.quasi = this.parseTemplate() - base = this.finishNode(node, "TaggedTemplateExpression") - } else { - return base - } - } -} - -lp.parseExprAtom = function() { - let node - switch (this.tok.type) { - case tt._this: - case tt._super: - let type = this.tok.type === tt._this ? "ThisExpression" : "Super" - node = this.startNode() - this.next() - return this.finishNode(node, type) - - case tt.name: - let start = this.storeCurrentPos() - let id = this.parseIdent() - let isAsync = false - if (id.name === "async" && !this.canInsertSemicolon()) { - if (this.eat(tt._function)) - return this.parseFunction(this.startNodeAt(start), false, true) - if (this.tok.type === tt.name) { - id = this.parseIdent() - isAsync = true - } - } - return this.eat(tt.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id - - case tt.regexp: - node = this.startNode() - let val = this.tok.value - node.regex = {pattern: val.pattern, flags: val.flags} - node.value = val.value - node.raw = this.input.slice(this.tok.start, this.tok.end) - this.next() - return this.finishNode(node, "Literal") - - case tt.num: case tt.string: - node = this.startNode() - node.value = this.tok.value - node.raw = this.input.slice(this.tok.start, this.tok.end) - this.next() - return this.finishNode(node, "Literal") - - case tt._null: case tt._true: case tt._false: - node = this.startNode() - node.value = this.tok.type === tt._null ? null : this.tok.type === tt._true - node.raw = this.tok.type.keyword - this.next() - return this.finishNode(node, "Literal") - - case tt.parenL: - let parenStart = this.storeCurrentPos() - this.next() - let inner = this.parseExpression() - this.expect(tt.parenR) - if (this.eat(tt.arrow)) { - // (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy. - let params = inner.expressions || [inner] - if (params.length && isDummy(params[params.length - 1])) - params.pop() - return this.parseArrowExpression(this.startNodeAt(parenStart), params) - } - if (this.options.preserveParens) { - let par = this.startNodeAt(parenStart) - par.expression = inner - inner = this.finishNode(par, "ParenthesizedExpression") - } - return inner - - case tt.bracketL: - node = this.startNode() - node.elements = this.parseExprList(tt.bracketR, true) - return this.finishNode(node, "ArrayExpression") - - case tt.braceL: - return this.parseObj() - - case tt._class: - return this.parseClass(false) - - case tt._function: - node = this.startNode() - this.next() - return this.parseFunction(node, false) - - case tt._new: - return this.parseNew() - - case tt.backQuote: - return this.parseTemplate() - - default: - return this.dummyIdent() - } -} - -lp.parseNew = function() { - let node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart - let meta = this.parseIdent(true) - if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { - node.meta = meta - node.property = this.parseIdent(true) - return this.finishNode(node, "MetaProperty") - } - let start = this.storeCurrentPos() - node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line) - if (this.tok.type == tt.parenL) { - node.arguments = this.parseExprList(tt.parenR) - } else { - node.arguments = [] - } - return this.finishNode(node, "NewExpression") -} - -lp.parseTemplateElement = function() { - let elem = this.startNode() - elem.value = { - raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, '\n'), - cooked: this.tok.value - } - this.next() - elem.tail = this.tok.type === tt.backQuote - return this.finishNode(elem, "TemplateElement") -} - -lp.parseTemplate = function() { - let node = this.startNode() - this.next() - node.expressions = [] - let curElt = this.parseTemplateElement() - node.quasis = [curElt] - while (!curElt.tail) { - this.next() - node.expressions.push(this.parseExpression()) - if (this.expect(tt.braceR)) { - curElt = this.parseTemplateElement() - } else { - curElt = this.startNode() - curElt.value = {cooked: '', raw: ''} - curElt.tail = true - this.finishNode(curElt, "TemplateElement") - } - node.quasis.push(curElt) - } - this.expect(tt.backQuote) - return this.finishNode(node, "TemplateLiteral") -} - -lp.parseObj = function() { - let node = this.startNode() - node.properties = [] - this.pushCx() - let indent = this.curIndent + 1, line = this.curLineStart - this.eat(tt.braceL) - if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart } - while (!this.closes(tt.braceR, indent, line)) { - let prop = this.startNode(), isGenerator, isAsync, start - if (this.options.ecmaVersion >= 6) { - start = this.storeCurrentPos() - prop.method = false - prop.shorthand = false - isGenerator = this.eat(tt.star) - } - this.parsePropertyName(prop) - if (!prop.computed && - prop.key.type === "Identifier" && prop.key.name === "async" && this.tok.type !== tt.parenL && - this.tok.type !== tt.colon && !this.canInsertSemicolon()) { - this.parsePropertyName(prop) - isAsync = true - } else { - isAsync = false - } - if (isDummy(prop.key)) { if (isDummy(this.parseMaybeAssign())) this.next(); this.eat(tt.comma); continue } - if (this.eat(tt.colon)) { - prop.kind = "init" - prop.value = this.parseMaybeAssign() - } else if (this.options.ecmaVersion >= 6 && (this.tok.type === tt.parenL || this.tok.type === tt.braceL)) { - prop.kind = "init" - prop.method = true - prop.value = this.parseMethod(isGenerator, isAsync) - } else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" && - !prop.computed && (prop.key.name === "get" || prop.key.name === "set") && - (this.tok.type != tt.comma && this.tok.type != tt.braceR)) { - prop.kind = prop.key.name - this.parsePropertyName(prop) - prop.value = this.parseMethod(false) - } else { - prop.kind = "init" - if (this.options.ecmaVersion >= 6) { - if (this.eat(tt.eq)) { - let assign = this.startNodeAt(start) - assign.operator = "=" - assign.left = prop.key - assign.right = this.parseMaybeAssign() - prop.value = this.finishNode(assign, "AssignmentExpression") - } else { - prop.value = prop.key - } - } else { - prop.value = this.dummyIdent() - } - prop.shorthand = true - } - node.properties.push(this.finishNode(prop, "Property")) - this.eat(tt.comma) - } - this.popCx() - if (!this.eat(tt.braceR)) { - // If there is no closing brace, make the node span to the start - // of the next token (this is useful for Tern) - this.last.end = this.tok.start - if (this.options.locations) this.last.loc.end = this.tok.loc.start - } - return this.finishNode(node, "ObjectExpression") -} - -lp.parsePropertyName = function(prop) { - if (this.options.ecmaVersion >= 6) { - if (this.eat(tt.bracketL)) { - prop.computed = true - prop.key = this.parseExpression() - this.expect(tt.bracketR) - return - } else { - prop.computed = false - } - } - let key = (this.tok.type === tt.num || this.tok.type === tt.string) ? this.parseExprAtom() : this.parseIdent() - prop.key = key || this.dummyIdent() -} - -lp.parsePropertyAccessor = function() { - if (this.tok.type === tt.name || this.tok.type.keyword) return this.parseIdent() -} - -lp.parseIdent = function() { - let name = this.tok.type === tt.name ? this.tok.value : this.tok.type.keyword - if (!name) return this.dummyIdent() - let node = this.startNode() - this.next() - node.name = name - return this.finishNode(node, "Identifier") -} - -lp.initFunction = function(node) { - node.id = null - node.params = [] - if (this.options.ecmaVersion >= 6) { - node.generator = false - node.expression = false - } - if (this.options.ecmaVersion >= 8) - node.async = false -} - -// Convert existing expression atom to assignable pattern -// if possible. - -lp.toAssignable = function(node, binding) { - if (!node || node.type == "Identifier" || (node.type == "MemberExpression" && !binding)) { - // Okay - } else if (node.type == "ParenthesizedExpression") { - node.expression = this.toAssignable(node.expression, binding) - } else if (this.options.ecmaVersion < 6) { - return this.dummyIdent() - } else if (node.type == "ObjectExpression") { - node.type = "ObjectPattern" - let props = node.properties - for (let i = 0; i < props.length; i++) - props[i].value = this.toAssignable(props[i].value, binding) - } else if (node.type == "ArrayExpression") { - node.type = "ArrayPattern" - this.toAssignableList(node.elements, binding) - } else if (node.type == "SpreadElement") { - node.type = "RestElement" - node.argument = this.toAssignable(node.argument, binding) - } else if (node.type == "AssignmentExpression") { - node.type = "AssignmentPattern" - delete node.operator - } else { - return this.dummyIdent() - } - return node -} - -lp.toAssignableList = function(exprList, binding) { - for (let i = 0; i < exprList.length; i++) - exprList[i] = this.toAssignable(exprList[i], binding) - return exprList -} - -lp.parseFunctionParams = function(params) { - params = this.parseExprList(tt.parenR) - return this.toAssignableList(params, true) -} - -lp.parseMethod = function(isGenerator, isAsync) { - let node = this.startNode(), oldInAsync = this.inAsync - this.initFunction(node) - if (this.options.ecmaVersion >= 6) - node.generator = !!isGenerator - if (this.options.ecmaVersion >= 8) - node.async = !!isAsync - this.inAsync = node.async - node.params = this.parseFunctionParams() - node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tt.braceL - node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock() - this.inAsync = oldInAsync - return this.finishNode(node, "FunctionExpression") -} - -lp.parseArrowExpression = function(node, params, isAsync) { - let oldInAsync = this.inAsync - this.initFunction(node) - if (this.options.ecmaVersion >= 8) - node.async = !!isAsync - this.inAsync = node.async - node.params = this.toAssignableList(params, true) - node.expression = this.tok.type !== tt.braceL - node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock() - this.inAsync = oldInAsync - return this.finishNode(node, "ArrowFunctionExpression") -} - -lp.parseExprList = function(close, allowEmpty) { - this.pushCx() - let indent = this.curIndent, line = this.curLineStart, elts = [] - this.next() // Opening bracket - while (!this.closes(close, indent + 1, line)) { - if (this.eat(tt.comma)) { - elts.push(allowEmpty ? null : this.dummyIdent()) - continue - } - let elt = this.parseMaybeAssign() - if (isDummy(elt)) { - if (this.closes(close, indent, line)) break - this.next() - } else { - elts.push(elt) - } - this.eat(tt.comma) - } - this.popCx() - if (!this.eat(close)) { - // If there is no closing brace, make the node span to the start - // of the next token (this is useful for Tern) - this.last.end = this.tok.start - if (this.options.locations) this.last.loc.end = this.tok.loc.start - } - return elts -} - -lp.parseAwait = function() { - let node = this.startNode() - this.next() - node.argument = this.parseMaybeUnary() - return this.finishNode(node, "AwaitExpression") -} diff --git a/typescript/hello-world/node_modules/acorn/src/loose/index.js b/typescript/hello-world/node_modules/acorn/src/loose/index.js deleted file mode 100644 index 98bbf4b..0000000 --- a/typescript/hello-world/node_modules/acorn/src/loose/index.js +++ /dev/null @@ -1,48 +0,0 @@ -// Acorn: Loose parser -// -// This module provides an alternative parser (`parse_dammit`) that -// exposes that same interface as `parse`, but will try to parse -// anything as JavaScript, repairing syntax error the best it can. -// There are circumstances in which it will raise an error and give -// up, but they are very rare. The resulting AST will be a mostly -// valid JavaScript AST (as per the [Mozilla parser API][api], except -// that: -// -// - Return outside functions is allowed -// -// - Label consistency (no conflicts, break only to existing labels) -// is not enforced. -// -// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever -// the parser got too confused to return anything meaningful. -// -// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API -// -// The expected use for this is to *first* try `acorn.parse`, and only -// if that fails switch to `parse_dammit`. The loose parser might -// parse badly indented code incorrectly, so **don't** use it as -// your default parser. -// -// Quite a lot of acorn.js is duplicated here. The alternative was to -// add a *lot* of extra cruft to that file, making it less readable -// and slower. Copying and editing the code allowed me to make -// invasive changes and simplifications without creating a complicated -// tangle. - -import {addLooseExports, defaultOptions} from "../index" -import {LooseParser, pluginsLoose} from "./state" -import "./tokenize" -import "./statement" -import "./expression" - -export {LooseParser, pluginsLoose} from "./state" - -defaultOptions.tabSize = 4 - -export function parse_dammit(input, options) { - let p = new LooseParser(input, options) - p.next() - return p.parseTopLevel() -} - -addLooseExports(parse_dammit, LooseParser, pluginsLoose) diff --git a/typescript/hello-world/node_modules/acorn/src/loose/parseutil.js b/typescript/hello-world/node_modules/acorn/src/loose/parseutil.js deleted file mode 100644 index c5ee096..0000000 --- a/typescript/hello-world/node_modules/acorn/src/loose/parseutil.js +++ /dev/null @@ -1 +0,0 @@ -export function isDummy(node) { return node.name == "✖" } \ No newline at end of file diff --git a/typescript/hello-world/node_modules/acorn/src/loose/state.js b/typescript/hello-world/node_modules/acorn/src/loose/state.js deleted file mode 100644 index 18987aa..0000000 --- a/typescript/hello-world/node_modules/acorn/src/loose/state.js +++ /dev/null @@ -1,161 +0,0 @@ -import {tokenizer, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from "../index" - -// Registered plugins -export const pluginsLoose = {} - -export class LooseParser { - constructor(input, options = {}) { - this.toks = tokenizer(input, options) - this.options = this.toks.options - this.input = this.toks.input - this.tok = this.last = {type: tt.eof, start: 0, end: 0} - if (this.options.locations) { - let here = this.toks.curPosition() - this.tok.loc = new SourceLocation(this.toks, here, here) - } - this.ahead = [] // Tokens ahead - this.context = [] // Indentation contexted - this.curIndent = 0 - this.curLineStart = 0 - this.nextLineStart = this.lineEnd(this.curLineStart) + 1 - this.inAsync = false - // Load plugins - this.options.pluginsLoose = options.pluginsLoose || {} - this.loadPlugins(this.options.pluginsLoose) - } - - startNode() { - return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null) - } - - storeCurrentPos() { - return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start - } - - startNodeAt(pos) { - if (this.options.locations) { - return new Node(this.toks, pos[0], pos[1]) - } else { - return new Node(this.toks, pos) - } - } - - finishNode(node, type) { - node.type = type - node.end = this.last.end - if (this.options.locations) - node.loc.end = this.last.loc.end - if (this.options.ranges) - node.range[1] = this.last.end - return node - } - - dummyNode(type) { - let dummy = this.startNode() - dummy.type = type - dummy.end = dummy.start - if (this.options.locations) - dummy.loc.end = dummy.loc.start - if (this.options.ranges) - dummy.range[1] = dummy.start - this.last = {type: tt.name, start: dummy.start, end: dummy.start, loc: dummy.loc} - return dummy - } - - dummyIdent() { - let dummy = this.dummyNode("Identifier") - dummy.name = "✖" - return dummy - } - - dummyString() { - let dummy = this.dummyNode("Literal") - dummy.value = dummy.raw = "✖" - return dummy - } - - eat(type) { - if (this.tok.type === type) { - this.next() - return true - } else { - return false - } - } - - isContextual(name) { - return this.tok.type === tt.name && this.tok.value === name - } - - eatContextual(name) { - return this.tok.value === name && this.eat(tt.name) - } - - canInsertSemicolon() { - return this.tok.type === tt.eof || this.tok.type === tt.braceR || - lineBreak.test(this.input.slice(this.last.end, this.tok.start)) - } - - semicolon() { - return this.eat(tt.semi) - } - - expect(type) { - if (this.eat(type)) return true - for (let i = 1; i <= 2; i++) { - if (this.lookAhead(i).type == type) { - for (let j = 0; j < i; j++) this.next() - return true - } - } - } - - pushCx() { - this.context.push(this.curIndent) - } - - popCx() { - this.curIndent = this.context.pop() - } - - lineEnd(pos) { - while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos - return pos - } - - indentationAfter(pos) { - for (let count = 0;; ++pos) { - let ch = this.input.charCodeAt(pos) - if (ch === 32) ++count - else if (ch === 9) count += this.options.tabSize - else return count - } - } - - closes(closeTok, indent, line, blockHeuristic) { - if (this.tok.type === closeTok || this.tok.type === tt.eof) return true - return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() && - (!blockHeuristic || this.nextLineStart >= this.input.length || - this.indentationAfter(this.nextLineStart) < indent) - } - - tokenStartsLine() { - for (let p = this.tok.start - 1; p >= this.curLineStart; --p) { - let ch = this.input.charCodeAt(p) - if (ch !== 9 && ch !== 32) return false - } - return true - } - - extend(name, f) { - this[name] = f(this[name]) - } - - loadPlugins(pluginConfigs) { - for (let name in pluginConfigs) { - let plugin = pluginsLoose[name] - if (!plugin) throw new Error("Plugin '" + name + "' not found") - plugin(this, pluginConfigs[name]) - } - } -} diff --git a/typescript/hello-world/node_modules/acorn/src/loose/statement.js b/typescript/hello-world/node_modules/acorn/src/loose/statement.js deleted file mode 100644 index f4a3b1f..0000000 --- a/typescript/hello-world/node_modules/acorn/src/loose/statement.js +++ /dev/null @@ -1,450 +0,0 @@ -import {LooseParser} from "./state" -import {isDummy} from "./parseutil" -import {getLineInfo, tokTypes as tt} from "../index" - -const lp = LooseParser.prototype - -lp.parseTopLevel = function() { - let node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0) - node.body = [] - while (this.tok.type !== tt.eof) node.body.push(this.parseStatement()) - this.last = this.tok - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType - } - return this.finishNode(node, "Program") -} - -lp.parseStatement = function() { - let starttype = this.tok.type, node = this.startNode(), kind - - if (this.toks.isLet()) { - starttype = tt._var - kind = "let" - } - - switch (starttype) { - case tt._break: case tt._continue: - this.next() - let isBreak = starttype === tt._break - if (this.semicolon() || this.canInsertSemicolon()) { - node.label = null - } else { - node.label = this.tok.type === tt.name ? this.parseIdent() : null - this.semicolon() - } - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") - - case tt._debugger: - this.next() - this.semicolon() - return this.finishNode(node, "DebuggerStatement") - - case tt._do: - this.next() - node.body = this.parseStatement() - node.test = this.eat(tt._while) ? this.parseParenExpression() : this.dummyIdent() - this.semicolon() - return this.finishNode(node, "DoWhileStatement") - - case tt._for: - this.next() - this.pushCx() - this.expect(tt.parenL) - if (this.tok.type === tt.semi) return this.parseFor(node, null) - let isLet = this.toks.isLet() - if (isLet || this.tok.type === tt._var || this.tok.type === tt._const) { - let init = this.parseVar(true, isLet ? "let" : this.tok.value) - if (init.declarations.length === 1 && (this.tok.type === tt._in || this.isContextual("of"))) { - return this.parseForIn(node, init) - } - return this.parseFor(node, init) - } - let init = this.parseExpression(true) - if (this.tok.type === tt._in || this.isContextual("of")) - return this.parseForIn(node, this.toAssignable(init)) - return this.parseFor(node, init) - - case tt._function: - this.next() - return this.parseFunction(node, true) - - case tt._if: - this.next() - node.test = this.parseParenExpression() - node.consequent = this.parseStatement() - node.alternate = this.eat(tt._else) ? this.parseStatement() : null - return this.finishNode(node, "IfStatement") - - case tt._return: - this.next() - if (this.eat(tt.semi) || this.canInsertSemicolon()) node.argument = null - else { node.argument = this.parseExpression(); this.semicolon() } - return this.finishNode(node, "ReturnStatement") - - case tt._switch: - let blockIndent = this.curIndent, line = this.curLineStart - this.next() - node.discriminant = this.parseParenExpression() - node.cases = [] - this.pushCx() - this.expect(tt.braceL) - - let cur - while (!this.closes(tt.braceR, blockIndent, line, true)) { - if (this.tok.type === tt._case || this.tok.type === tt._default) { - let isCase = this.tok.type === tt._case - if (cur) this.finishNode(cur, "SwitchCase") - node.cases.push(cur = this.startNode()) - cur.consequent = [] - this.next() - if (isCase) cur.test = this.parseExpression() - else cur.test = null - this.expect(tt.colon) - } else { - if (!cur) { - node.cases.push(cur = this.startNode()) - cur.consequent = [] - cur.test = null - } - cur.consequent.push(this.parseStatement()) - } - } - if (cur) this.finishNode(cur, "SwitchCase") - this.popCx() - this.eat(tt.braceR) - return this.finishNode(node, "SwitchStatement") - - case tt._throw: - this.next() - node.argument = this.parseExpression() - this.semicolon() - return this.finishNode(node, "ThrowStatement") - - case tt._try: - this.next() - node.block = this.parseBlock() - node.handler = null - if (this.tok.type === tt._catch) { - let clause = this.startNode() - this.next() - this.expect(tt.parenL) - clause.param = this.toAssignable(this.parseExprAtom(), true) - this.expect(tt.parenR) - clause.body = this.parseBlock() - node.handler = this.finishNode(clause, "CatchClause") - } - node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null - if (!node.handler && !node.finalizer) return node.block - return this.finishNode(node, "TryStatement") - - case tt._var: - case tt._const: - return this.parseVar(false, kind || this.tok.value) - - case tt._while: - this.next() - node.test = this.parseParenExpression() - node.body = this.parseStatement() - return this.finishNode(node, "WhileStatement") - - case tt._with: - this.next() - node.object = this.parseParenExpression() - node.body = this.parseStatement() - return this.finishNode(node, "WithStatement") - - case tt.braceL: - return this.parseBlock() - - case tt.semi: - this.next() - return this.finishNode(node, "EmptyStatement") - - case tt._class: - return this.parseClass(true) - - case tt._import: - return this.parseImport() - - case tt._export: - return this.parseExport() - - default: - if (this.toks.isAsyncFunction()) { - this.next() - this.next() - return this.parseFunction(node, true, true) - } - let expr = this.parseExpression() - if (isDummy(expr)) { - this.next() - if (this.tok.type === tt.eof) return this.finishNode(node, "EmptyStatement") - return this.parseStatement() - } else if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) { - node.body = this.parseStatement() - node.label = expr - return this.finishNode(node, "LabeledStatement") - } else { - node.expression = expr - this.semicolon() - return this.finishNode(node, "ExpressionStatement") - } - } -} - -lp.parseBlock = function() { - let node = this.startNode() - this.pushCx() - this.expect(tt.braceL) - let blockIndent = this.curIndent, line = this.curLineStart - node.body = [] - while (!this.closes(tt.braceR, blockIndent, line, true)) - node.body.push(this.parseStatement()) - this.popCx() - this.eat(tt.braceR) - return this.finishNode(node, "BlockStatement") -} - -lp.parseFor = function(node, init) { - node.init = init - node.test = node.update = null - if (this.eat(tt.semi) && this.tok.type !== tt.semi) node.test = this.parseExpression() - if (this.eat(tt.semi) && this.tok.type !== tt.parenR) node.update = this.parseExpression() - this.popCx() - this.expect(tt.parenR) - node.body = this.parseStatement() - return this.finishNode(node, "ForStatement") -} - -lp.parseForIn = function(node, init) { - let type = this.tok.type === tt._in ? "ForInStatement" : "ForOfStatement" - this.next() - node.left = init - node.right = this.parseExpression() - this.popCx() - this.expect(tt.parenR) - node.body = this.parseStatement() - return this.finishNode(node, type) -} - -lp.parseVar = function(noIn, kind) { - let node = this.startNode() - node.kind = kind - this.next() - node.declarations = [] - do { - let decl = this.startNode() - decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent() - decl.init = this.eat(tt.eq) ? this.parseMaybeAssign(noIn) : null - node.declarations.push(this.finishNode(decl, "VariableDeclarator")) - } while (this.eat(tt.comma)) - if (!node.declarations.length) { - let decl = this.startNode() - decl.id = this.dummyIdent() - node.declarations.push(this.finishNode(decl, "VariableDeclarator")) - } - if (!noIn) this.semicolon() - return this.finishNode(node, "VariableDeclaration") -} - -lp.parseClass = function(isStatement) { - let node = this.startNode() - this.next() - if (isStatement == null) isStatement = this.tok.type === tt.name - if (this.tok.type === tt.name) node.id = this.parseIdent() - else if (isStatement) node.id = this.dummyIdent() - else node.id = null - node.superClass = this.eat(tt._extends) ? this.parseExpression() : null - node.body = this.startNode() - node.body.body = [] - this.pushCx() - let indent = this.curIndent + 1, line = this.curLineStart - this.eat(tt.braceL) - if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart } - while (!this.closes(tt.braceR, indent, line)) { - if (this.semicolon()) continue - let method = this.startNode(), isGenerator, isAsync - if (this.options.ecmaVersion >= 6) { - method.static = false - isGenerator = this.eat(tt.star) - } - this.parsePropertyName(method) - if (isDummy(method.key)) { if (isDummy(this.parseMaybeAssign())) this.next(); this.eat(tt.comma); continue } - if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" && - (this.tok.type != tt.parenL && this.tok.type != tt.braceL)) { - method.static = true - isGenerator = this.eat(tt.star) - this.parsePropertyName(method) - } else { - method.static = false - } - if (!method.computed && - method.key.type === "Identifier" && method.key.name === "async" && this.tok.type !== tt.parenL && - !this.canInsertSemicolon()) { - this.parsePropertyName(method) - isAsync = true - } else { - isAsync = false - } - if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" && - !method.computed && (method.key.name === "get" || method.key.name === "set") && - this.tok.type !== tt.parenL && this.tok.type !== tt.braceL) { - method.kind = method.key.name - this.parsePropertyName(method) - method.value = this.parseMethod(false) - } else { - if (!method.computed && !method.static && !isGenerator && !isAsync && ( - method.key.type === "Identifier" && method.key.name === "constructor" || - method.key.type === "Literal" && method.key.value === "constructor")) { - method.kind = "constructor" - } else { - method.kind = "method" - } - method.value = this.parseMethod(isGenerator, isAsync) - } - node.body.body.push(this.finishNode(method, "MethodDefinition")) - } - this.popCx() - if (!this.eat(tt.braceR)) { - // If there is no closing brace, make the node span to the start - // of the next token (this is useful for Tern) - this.last.end = this.tok.start - if (this.options.locations) this.last.loc.end = this.tok.loc.start - } - this.semicolon() - this.finishNode(node.body, "ClassBody") - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") -} - -lp.parseFunction = function(node, isStatement, isAsync) { - let oldInAsync = this.inAsync - this.initFunction(node) - if (this.options.ecmaVersion >= 6) { - node.generator = this.eat(tt.star) - } - if (this.options.ecmaVersion >= 8) { - node.async = !!isAsync - } - if (isStatement == null) isStatement = this.tok.type === tt.name - if (this.tok.type === tt.name) node.id = this.parseIdent() - else if (isStatement) node.id = this.dummyIdent() - this.inAsync = node.async - node.params = this.parseFunctionParams() - node.body = this.parseBlock() - this.inAsync = oldInAsync - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") -} - -lp.parseExport = function() { - let node = this.startNode() - this.next() - if (this.eat(tt.star)) { - node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString() - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(tt._default)) { - // export default (function foo() {}) // This is FunctionExpression. - let isAsync - if (this.tok.type === tt._function || (isAsync = this.toks.isAsyncFunction())) { - let fNode = this.startNode() - this.next() - if (isAsync) this.next() - node.declaration = this.parseFunction(fNode, null, isAsync) - } else if (this.tok.type === tt._class) { - node.declaration = this.parseClass(null) - } else { - node.declaration = this.parseMaybeAssign() - this.semicolon() - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) { - node.declaration = this.parseStatement() - node.specifiers = [] - node.source = null - } else { - node.declaration = null - node.specifiers = this.parseExportSpecifierList() - node.source = this.eatContextual("from") ? this.parseExprAtom() : null - this.semicolon() - } - return this.finishNode(node, "ExportNamedDeclaration") -} - -lp.parseImport = function() { - let node = this.startNode() - this.next() - if (this.tok.type === tt.string) { - node.specifiers = [] - node.source = this.parseExprAtom() - node.kind = '' - } else { - let elt - if (this.tok.type === tt.name && this.tok.value !== "from") { - elt = this.startNode() - elt.local = this.parseIdent() - this.finishNode(elt, "ImportDefaultSpecifier") - this.eat(tt.comma) - } - node.specifiers = this.parseImportSpecifierList() - node.source = this.eatContextual("from") && this.tok.type == tt.string ? this.parseExprAtom() : this.dummyString() - if (elt) node.specifiers.unshift(elt) - } - this.semicolon() - return this.finishNode(node, "ImportDeclaration") -} - -lp.parseImportSpecifierList = function() { - let elts = [] - if (this.tok.type === tt.star) { - let elt = this.startNode() - this.next() - elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent() - elts.push(this.finishNode(elt, "ImportNamespaceSpecifier")) - } else { - let indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart - this.pushCx() - this.eat(tt.braceL) - if (this.curLineStart > continuedLine) continuedLine = this.curLineStart - while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { - let elt = this.startNode() - if (this.eat(tt.star)) { - elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent() - this.finishNode(elt, "ImportNamespaceSpecifier") - } else { - if (this.isContextual("from")) break - elt.imported = this.parseIdent() - if (isDummy(elt.imported)) break - elt.local = this.eatContextual("as") ? this.parseIdent() : elt.imported - this.finishNode(elt, "ImportSpecifier") - } - elts.push(elt) - this.eat(tt.comma) - } - this.eat(tt.braceR) - this.popCx() - } - return elts -} - -lp.parseExportSpecifierList = function() { - let elts = [] - let indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart - this.pushCx() - this.eat(tt.braceL) - if (this.curLineStart > continuedLine) continuedLine = this.curLineStart - while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) { - if (this.isContextual("from")) break - let elt = this.startNode() - elt.local = this.parseIdent() - if (isDummy(elt.local)) break - elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local - this.finishNode(elt, "ExportSpecifier") - elts.push(elt) - this.eat(tt.comma) - } - this.eat(tt.braceR) - this.popCx() - return elts -} diff --git a/typescript/hello-world/node_modules/acorn/src/loose/tokenize.js b/typescript/hello-world/node_modules/acorn/src/loose/tokenize.js deleted file mode 100644 index c08be97..0000000 --- a/typescript/hello-world/node_modules/acorn/src/loose/tokenize.js +++ /dev/null @@ -1,108 +0,0 @@ -import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from "../index" -import {LooseParser} from "./state" - -const lp = LooseParser.prototype - -function isSpace(ch) { - return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch) -} - -lp.next = function() { - this.last = this.tok - if (this.ahead.length) - this.tok = this.ahead.shift() - else - this.tok = this.readToken() - - if (this.tok.start >= this.nextLineStart) { - while (this.tok.start >= this.nextLineStart) { - this.curLineStart = this.nextLineStart - this.nextLineStart = this.lineEnd(this.curLineStart) + 1 - } - this.curIndent = this.indentationAfter(this.curLineStart) - } -} - -lp.readToken = function() { - for (;;) { - try { - this.toks.next() - if (this.toks.type === tt.dot && - this.input.substr(this.toks.end, 1) === "." && - this.options.ecmaVersion >= 6) { - this.toks.end++ - this.toks.type = tt.ellipsis - } - return new Token(this.toks) - } catch(e) { - if (!(e instanceof SyntaxError)) throw e - - // Try to skip some text, based on the error message, and then continue - let msg = e.message, pos = e.raisedAt, replace = true - if (/unterminated/i.test(msg)) { - pos = this.lineEnd(e.pos + 1) - if (/string/.test(msg)) { - replace = {start: e.pos, end: pos, type: tt.string, value: this.input.slice(e.pos + 1, pos)} - } else if (/regular expr/i.test(msg)) { - let re = this.input.slice(e.pos, pos) - try { re = new RegExp(re) } catch(e) {} - replace = {start: e.pos, end: pos, type: tt.regexp, value: re} - } else if (/template/.test(msg)) { - replace = {start: e.pos, end: pos, - type: tt.template, - value: this.input.slice(e.pos, pos)} - } else { - replace = false - } - } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) { - while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos - } else if (/character escape|expected hexadecimal/i.test(msg)) { - while (pos < this.input.length) { - let ch = this.input.charCodeAt(pos++) - if (ch === 34 || ch === 39 || isNewLine(ch)) break - } - } else if (/unexpected character/i.test(msg)) { - pos++ - replace = false - } else if (/regular expression/i.test(msg)) { - replace = true - } else { - throw e - } - this.resetTo(pos) - if (replace === true) replace = {start: pos, end: pos, type: tt.name, value: "✖"} - if (replace) { - if (this.options.locations) - replace.loc = new SourceLocation( - this.toks, - getLineInfo(this.input, replace.start), - getLineInfo(this.input, replace.end)) - return replace - } - } - } -} - -lp.resetTo = function(pos) { - this.toks.pos = pos - let ch = this.input.charAt(pos - 1) - this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) || - /[enwfd]/.test(ch) && - /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos)) - - if (this.options.locations) { - this.toks.curLine = 1 - this.toks.lineStart = lineBreakG.lastIndex = 0 - let match - while ((match = lineBreakG.exec(this.input)) && match.index < pos) { - ++this.toks.curLine - this.toks.lineStart = match.index + match[0].length - } - } -} - -lp.lookAhead = function(n) { - while (n > this.ahead.length) - this.ahead.push(this.readToken()) - return this.ahead[n - 1] -} diff --git a/typescript/hello-world/node_modules/acorn/src/lval.js b/typescript/hello-world/node_modules/acorn/src/lval.js deleted file mode 100644 index c88d719..0000000 --- a/typescript/hello-world/node_modules/acorn/src/lval.js +++ /dev/null @@ -1,219 +0,0 @@ -import {types as tt} from "./tokentype" -import {Parser} from "./state" -import {has} from "./util" - -const pp = Parser.prototype - -// Convert existing expression atom to assignable pattern -// if possible. - -pp.toAssignable = function(node, isBinding) { - if (this.options.ecmaVersion >= 6 && node) { - switch (node.type) { - case "Identifier": - if (this.inAsync && node.name === "await") - this.raise(node.start, "Can not use 'await' as identifier inside an async function") - break - - case "ObjectPattern": - case "ArrayPattern": - break - - case "ObjectExpression": - node.type = "ObjectPattern" - for (let i = 0; i < node.properties.length; i++) { - let prop = node.properties[i] - if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter") - this.toAssignable(prop.value, isBinding) - } - break - - case "ArrayExpression": - node.type = "ArrayPattern" - this.toAssignableList(node.elements, isBinding) - break - - case "AssignmentExpression": - if (node.operator === "=") { - node.type = "AssignmentPattern" - delete node.operator - this.toAssignable(node.left, isBinding) - // falls through to AssignmentPattern - } else { - this.raise(node.left.end, "Only '=' operator can be used for specifying default value.") - break - } - - case "AssignmentPattern": - break - - case "ParenthesizedExpression": - node.expression = this.toAssignable(node.expression, isBinding) - break - - case "MemberExpression": - if (!isBinding) break - - default: - this.raise(node.start, "Assigning to rvalue") - } - } - return node -} - -// Convert list of expression atoms to binding list. - -pp.toAssignableList = function(exprList, isBinding) { - let end = exprList.length - if (end) { - let last = exprList[end - 1] - if (last && last.type == "RestElement") { - --end - } else if (last && last.type == "SpreadElement") { - last.type = "RestElement" - let arg = last.argument - this.toAssignable(arg, isBinding) - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") - this.unexpected(arg.start) - --end - } - - if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") - this.unexpected(last.argument.start) - } - for (let i = 0; i < end; i++) { - let elt = exprList[i] - if (elt) this.toAssignable(elt, isBinding) - } - return exprList -} - -// Parses spread element. - -pp.parseSpread = function(refDestructuringErrors) { - let node = this.startNode() - this.next() - node.argument = this.parseMaybeAssign(false, refDestructuringErrors) - return this.finishNode(node, "SpreadElement") -} - -pp.parseRest = function(allowNonIdent) { - let node = this.startNode() - this.next() - - // RestElement inside of a function parameter must be an identifier - if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected() - else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected() - - return this.finishNode(node, "RestElement") -} - -// Parses lvalue (assignable) atom. - -pp.parseBindingAtom = function() { - if (this.options.ecmaVersion < 6) return this.parseIdent() - switch (this.type) { - case tt.name: - return this.parseIdent() - - case tt.bracketL: - let node = this.startNode() - this.next() - node.elements = this.parseBindingList(tt.bracketR, true, true) - return this.finishNode(node, "ArrayPattern") - - case tt.braceL: - return this.parseObj(true) - - default: - this.unexpected() - } -} - -pp.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) { - let elts = [], first = true - while (!this.eat(close)) { - if (first) first = false - else this.expect(tt.comma) - if (allowEmpty && this.type === tt.comma) { - elts.push(null) - } else if (allowTrailingComma && this.afterTrailingComma(close)) { - break - } else if (this.type === tt.ellipsis) { - let rest = this.parseRest(allowNonIdent) - this.parseBindingListItem(rest) - elts.push(rest) - if (this.type === tt.comma) this.raise(this.start, "Comma is not permitted after the rest element") - this.expect(close) - break - } else { - let elem = this.parseMaybeDefault(this.start, this.startLoc) - this.parseBindingListItem(elem) - elts.push(elem) - } - } - return elts -} - -pp.parseBindingListItem = function(param) { - return param -} - -// Parses assignment pattern around given atom if possible. - -pp.parseMaybeDefault = function(startPos, startLoc, left) { - left = left || this.parseBindingAtom() - if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left - let node = this.startNodeAt(startPos, startLoc) - node.left = left - node.right = this.parseMaybeAssign() - return this.finishNode(node, "AssignmentPattern") -} - -// Verify that a node is an lval — something that can be assigned -// to. - -pp.checkLVal = function(expr, isBinding, checkClashes) { - switch (expr.type) { - case "Identifier": - if (this.strict && this.reservedWordsStrictBind.test(expr.name)) - this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode") - if (checkClashes) { - if (has(checkClashes, expr.name)) - this.raiseRecoverable(expr.start, "Argument name clash") - checkClashes[expr.name] = true - } - break - - case "MemberExpression": - if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression") - break - - case "ObjectPattern": - for (let i = 0; i < expr.properties.length; i++) - this.checkLVal(expr.properties[i].value, isBinding, checkClashes) - break - - case "ArrayPattern": - for (let i = 0; i < expr.elements.length; i++) { - let elem = expr.elements[i] - if (elem) this.checkLVal(elem, isBinding, checkClashes) - } - break - - case "AssignmentPattern": - this.checkLVal(expr.left, isBinding, checkClashes) - break - - case "RestElement": - this.checkLVal(expr.argument, isBinding, checkClashes) - break - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, isBinding, checkClashes) - break - - default: - this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue") - } -} diff --git a/typescript/hello-world/node_modules/acorn/src/node.js b/typescript/hello-world/node_modules/acorn/src/node.js deleted file mode 100644 index 76b5b09..0000000 --- a/typescript/hello-world/node_modules/acorn/src/node.js +++ /dev/null @@ -1,50 +0,0 @@ -import {Parser} from "./state" -import {SourceLocation} from "./locutil" - -export class Node { - constructor(parser, pos, loc) { - this.type = "" - this.start = pos - this.end = 0 - if (parser.options.locations) - this.loc = new SourceLocation(parser, loc) - if (parser.options.directSourceFile) - this.sourceFile = parser.options.directSourceFile - if (parser.options.ranges) - this.range = [pos, 0] - } -} - -// Start an AST node, attaching a start offset. - -const pp = Parser.prototype - -pp.startNode = function() { - return new Node(this, this.start, this.startLoc) -} - -pp.startNodeAt = function(pos, loc) { - return new Node(this, pos, loc) -} - -// Finish an AST node, adding `type` and `end` properties. - -function finishNodeAt(node, type, pos, loc) { - node.type = type - node.end = pos - if (this.options.locations) - node.loc.end = loc - if (this.options.ranges) - node.range[1] = pos - return node -} - -pp.finishNode = function(node, type) { - return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) -} - -// Finish node at given position - -pp.finishNodeAt = function(node, type, pos, loc) { - return finishNodeAt.call(this, node, type, pos, loc) -} diff --git a/typescript/hello-world/node_modules/acorn/src/options.js b/typescript/hello-world/node_modules/acorn/src/options.js deleted file mode 100644 index e7b217e..0000000 --- a/typescript/hello-world/node_modules/acorn/src/options.js +++ /dev/null @@ -1,128 +0,0 @@ -import {has, isArray} from "./util" -import {SourceLocation} from "./locutil" - -// A second optional argument can be given to further configure -// the parser process. These options are recognized: - -export const defaultOptions = { - // `ecmaVersion` indicates the ECMAScript version to parse. Must - // be either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support - // for strict mode, the set of reserved words, and support for - // new syntax features. The default is 7. - ecmaVersion: 7, - // `sourceType` indicates the mode the code should be parsed in. - // Can be either `"script"` or `"module"`. This influences global - // strict mode and parsing of `import` and `export` declarations. - sourceType: "script", - // `onInsertedSemicolon` can be a callback that will be called - // when a semicolon is automatically inserted. It will be passed - // th position of the comma as an offset, and if `locations` is - // enabled, it is given the location as a `{line, column}` object - // as second argument. - onInsertedSemicolon: null, - // `onTrailingComma` is similar to `onInsertedSemicolon`, but for - // trailing commas. - onTrailingComma: null, - // By default, reserved words are only enforced if ecmaVersion >= 5. - // Set `allowReserved` to a boolean value to explicitly turn this on - // an off. When this option has the value "never", reserved words - // and keywords can also not be used as property names. - allowReserved: null, - // When enabled, a return at the top level is not considered an - // error. - allowReturnOutsideFunction: false, - // When enabled, import/export statements are not constrained to - // appearing at the top of the program. - allowImportExportEverywhere: false, - // When enabled, hashbang directive in the beginning of file - // is allowed and treated as a line comment. - allowHashBang: false, - // When `locations` is on, `loc` properties holding objects with - // `start` and `end` properties in `{line, column}` form (with - // line being 1-based and column 0-based) will be attached to the - // nodes. - locations: false, - // A function can be passed as `onToken` option, which will - // cause Acorn to call that function with object in the same - // format as tokens returned from `tokenizer().getToken()`. Note - // that you are not allowed to call the parser from the - // callback—that will corrupt its internal state. - onToken: null, - // A function can be passed as `onComment` option, which will - // cause Acorn to call that function with `(block, text, start, - // end)` parameters whenever a comment is skipped. `block` is a - // boolean indicating whether this is a block (`/* */`) comment, - // `text` is the content of the comment, and `start` and `end` are - // character offsets that denote the start and end of the comment. - // When the `locations` option is on, two more parameters are - // passed, the full `{line, column}` locations of the start and - // end of the comments. Note that you are not allowed to call the - // parser from the callback—that will corrupt its internal state. - onComment: null, - // Nodes have their start and end characters offsets recorded in - // `start` and `end` properties (directly on the node, rather than - // the `loc` object, which holds line/column data. To also add a - // [semi-standardized][range] `range` property holding a `[start, - // end]` array with the same numbers, set the `ranges` option to - // `true`. - // - // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 - ranges: false, - // It is possible to parse multiple files into a single AST by - // passing the tree produced by parsing the first file as - // `program` option in subsequent parses. This will add the - // toplevel forms of the parsed file to the `Program` (top) node - // of an existing parse tree. - program: null, - // When `locations` is on, you can pass this to record the source - // file in every node's `loc` object. - sourceFile: null, - // This value, if given, is stored in every node, whether - // `locations` is on or off. - directSourceFile: null, - // When enabled, parenthesized expressions are represented by - // (non-standard) ParenthesizedExpression nodes - preserveParens: false, - plugins: {} -} - -// Interpret and default an options object - -export function getOptions(opts) { - let options = {} - - for (let opt in defaultOptions) - options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt] - - if (options.ecmaVersion >= 2015) - options.ecmaVersion -= 2009 - - if (options.allowReserved == null) - options.allowReserved = options.ecmaVersion < 5 - - if (isArray(options.onToken)) { - let tokens = options.onToken - options.onToken = (token) => tokens.push(token) - } - if (isArray(options.onComment)) - options.onComment = pushComment(options, options.onComment) - - return options -} - -function pushComment(options, array) { - return function (block, text, start, end, startLoc, endLoc) { - let comment = { - type: block ? 'Block' : 'Line', - value: text, - start: start, - end: end - } - if (options.locations) - comment.loc = new SourceLocation(this, startLoc, endLoc) - if (options.ranges) - comment.range = [start, end] - array.push(comment) - } -} - diff --git a/typescript/hello-world/node_modules/acorn/src/parseutil.js b/typescript/hello-world/node_modules/acorn/src/parseutil.js deleted file mode 100644 index 46e4521..0000000 --- a/typescript/hello-world/node_modules/acorn/src/parseutil.js +++ /dev/null @@ -1,128 +0,0 @@ -import {types as tt} from "./tokentype" -import {Parser} from "./state" -import {lineBreak, skipWhiteSpace} from "./whitespace" - -const pp = Parser.prototype - -// ## Parser utilities - -const literal = /^(?:'((?:[^\']|\.)*)'|"((?:[^\"]|\.)*)"|;)/ -pp.strictDirective = function(start) { - for (;;) { - skipWhiteSpace.lastIndex = start - start += skipWhiteSpace.exec(this.input)[0].length - let match = literal.exec(this.input.slice(start)) - if (!match) return false - if ((match[1] || match[2]) == "use strict") return true - start += match[0].length - } -} - -// Predicate that tests whether the next token is of the given -// type, and if yes, consumes it as a side effect. - -pp.eat = function(type) { - if (this.type === type) { - this.next() - return true - } else { - return false - } -} - -// Tests whether parsed token is a contextual keyword. - -pp.isContextual = function(name) { - return this.type === tt.name && this.value === name -} - -// Consumes contextual keyword if possible. - -pp.eatContextual = function(name) { - return this.value === name && this.eat(tt.name) -} - -// Asserts that following token is given contextual keyword. - -pp.expectContextual = function(name) { - if (!this.eatContextual(name)) this.unexpected() -} - -// Test whether a semicolon can be inserted at the current position. - -pp.canInsertSemicolon = function() { - return this.type === tt.eof || - this.type === tt.braceR || - lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) -} - -pp.insertSemicolon = function() { - if (this.canInsertSemicolon()) { - if (this.options.onInsertedSemicolon) - this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc) - return true - } -} - -// Consume a semicolon, or, failing that, see if we are allowed to -// pretend that there is a semicolon at this position. - -pp.semicolon = function() { - if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected() -} - -pp.afterTrailingComma = function(tokType, notNext) { - if (this.type == tokType) { - if (this.options.onTrailingComma) - this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc) - if (!notNext) - this.next() - return true - } -} - -// Expect a token of a given type. If found, consume it, otherwise, -// raise an unexpected token error. - -pp.expect = function(type) { - this.eat(type) || this.unexpected() -} - -// Raise an unexpected token error. - -pp.unexpected = function(pos) { - this.raise(pos != null ? pos : this.start, "Unexpected token") -} - -export class DestructuringErrors { - constructor() { - this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = -1 - } -} - -pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { - if (!refDestructuringErrors) return - if (refDestructuringErrors.trailingComma > -1) - this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element") - let parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind - if (parens > -1) this.raiseRecoverable(parens, "Parenthesized pattern") -} - -pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { - let pos = refDestructuringErrors ? refDestructuringErrors.shorthandAssign : -1 - if (!andThrow) return pos >= 0 - if (pos > -1) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns") -} - -pp.checkYieldAwaitInDefaultParams = function() { - if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) - this.raise(this.yieldPos, "Yield expression cannot be a default value") - if (this.awaitPos) - this.raise(this.awaitPos, "Await expression cannot be a default value") -} - -pp.isSimpleAssignTarget = function(expr) { - if (expr.type === "ParenthesizedExpression") - return this.isSimpleAssignTarget(expr.expression) - return expr.type === "Identifier" || expr.type === "MemberExpression" -} diff --git a/typescript/hello-world/node_modules/acorn/src/state.js b/typescript/hello-world/node_modules/acorn/src/state.js deleted file mode 100644 index 4c244e4..0000000 --- a/typescript/hello-world/node_modules/acorn/src/state.js +++ /dev/null @@ -1,111 +0,0 @@ -import {reservedWords, keywords} from "./identifier" -import {types as tt} from "./tokentype" -import {lineBreak} from "./whitespace" -import {getOptions} from "./options" - -// Registered plugins -export const plugins = {} - -function keywordRegexp(words) { - return new RegExp("^(" + words.replace(/ /g, "|") + ")$") -} - -export class Parser { - constructor(options, input, startPos) { - this.options = options = getOptions(options) - this.sourceFile = options.sourceFile - this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]) - let reserved = "" - if (!options.allowReserved) { - for (let v = options.ecmaVersion;; v--) - if (reserved = reservedWords[v]) break - if (options.sourceType == "module") reserved += " await" - } - this.reservedWords = keywordRegexp(reserved) - let reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict - this.reservedWordsStrict = keywordRegexp(reservedStrict) - this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind) - this.input = String(input) - - // Used to signal to callers of `readWord1` whether the word - // contained any escape sequences. This is needed because words with - // escape sequences must not be interpreted as keywords. - this.containsEsc = false - - // Load plugins - this.loadPlugins(options.plugins) - - // Set up token state - - // The current position of the tokenizer in the input. - if (startPos) { - this.pos = startPos - this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1 - this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length - } else { - this.pos = this.lineStart = 0 - this.curLine = 1 - } - - // Properties of the current token: - // Its type - this.type = tt.eof - // For tokens that include more information than their type, the value - this.value = null - // Its start and end offset - this.start = this.end = this.pos - // And, if locations are used, the {line, column} object - // corresponding to those offsets - this.startLoc = this.endLoc = this.curPosition() - - // Position information for the previous token - this.lastTokEndLoc = this.lastTokStartLoc = null - this.lastTokStart = this.lastTokEnd = this.pos - - // The context stack is used to superficially track syntactic - // context to predict whether a regular expression is allowed in a - // given position. - this.context = this.initialContext() - this.exprAllowed = true - - // Figure out if it's a module code. - this.inModule = options.sourceType === "module" - this.strict = this.inModule || this.strictDirective(this.pos) - - // Used to signify the start of a potential arrow function - this.potentialArrowAt = -1 - - // Flags to track whether we are in a function, a generator, an async function. - this.inFunction = this.inGenerator = this.inAsync = false - // Positions to delayed-check that yield/await does not exist in default parameters. - this.yieldPos = this.awaitPos = 0 - // Labels in scope. - this.labels = [] - - // If enabled, skip leading hashbang line. - if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') - this.skipLineComment(2) - } - - // DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them - isKeyword(word) { return this.keywords.test(word) } - isReservedWord(word) { return this.reservedWords.test(word) } - - extend(name, f) { - this[name] = f(this[name]) - } - - loadPlugins(pluginConfigs) { - for (let name in pluginConfigs) { - let plugin = plugins[name] - if (!plugin) throw new Error("Plugin '" + name + "' not found") - plugin(this, pluginConfigs[name]) - } - } - - parse() { - let node = this.options.program || this.startNode() - this.nextToken() - return this.parseTopLevel(node) - } -} diff --git a/typescript/hello-world/node_modules/acorn/src/statement.js b/typescript/hello-world/node_modules/acorn/src/statement.js deleted file mode 100644 index ee09613..0000000 --- a/typescript/hello-world/node_modules/acorn/src/statement.js +++ /dev/null @@ -1,744 +0,0 @@ -import {types as tt} from "./tokentype" -import {Parser} from "./state" -import {lineBreak, skipWhiteSpace} from "./whitespace" -import {isIdentifierStart, isIdentifierChar} from "./identifier" -import {DestructuringErrors} from "./parseutil" - -const pp = Parser.prototype - -// ### Statement parsing - -// Parse a program. Initializes the parser, reads any number of -// statements, and wraps them in a Program node. Optionally takes a -// `program` argument. If present, the statements will be appended -// to its body instead of creating a new node. - -pp.parseTopLevel = function(node) { - let exports = {} - if (!node.body) node.body = [] - while (this.type !== tt.eof) { - let stmt = this.parseStatement(true, true, exports) - node.body.push(stmt) - } - this.next() - if (this.options.ecmaVersion >= 6) { - node.sourceType = this.options.sourceType - } - return this.finishNode(node, "Program") -} - -const loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"} - -pp.isLet = function() { - if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false - skipWhiteSpace.lastIndex = this.pos - let skip = skipWhiteSpace.exec(this.input) - let next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next) - if (nextCh === 91 || nextCh == 123) return true // '{' and '[' - if (isIdentifierStart(nextCh, true)) { - for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {} - let ident = this.input.slice(next, pos) - if (!this.isKeyword(ident)) return true - } - return false -} - -// check 'async [no LineTerminator here] function' -// - 'async /*foo*/ function' is OK. -// - 'async /*\n*/ function' is invalid. -pp.isAsyncFunction = function() { - if (this.type !== tt.name || this.options.ecmaVersion < 8 || this.value != "async") - return false - - skipWhiteSpace.lastIndex = this.pos - let skip = skipWhiteSpace.exec(this.input) - let next = this.pos + skip[0].length - return !lineBreak.test(this.input.slice(this.pos, next)) && - this.input.slice(next, next + 8) === "function" && - (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) -} - -// Parse a single statement. -// -// If expecting a statement and finding a slash operator, parse a -// regular expression literal. This is to handle cases like -// `if (foo) /blah/.exec(foo)`, where looking at the previous token -// does not help. - -pp.parseStatement = function(declaration, topLevel, exports) { - let starttype = this.type, node = this.startNode(), kind - - if (this.isLet()) { - starttype = tt._var - kind = "let" - } - - // Most types of statements are recognized by the keyword they - // start with. Many are trivial to parse, some require a bit of - // complexity. - - switch (starttype) { - case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword) - case tt._debugger: return this.parseDebuggerStatement(node) - case tt._do: return this.parseDoStatement(node) - case tt._for: return this.parseForStatement(node) - case tt._function: - if (!declaration && this.options.ecmaVersion >= 6) this.unexpected() - return this.parseFunctionStatement(node, false) - case tt._class: - if (!declaration) this.unexpected() - return this.parseClass(node, true) - case tt._if: return this.parseIfStatement(node) - case tt._return: return this.parseReturnStatement(node) - case tt._switch: return this.parseSwitchStatement(node) - case tt._throw: return this.parseThrowStatement(node) - case tt._try: return this.parseTryStatement(node) - case tt._const: case tt._var: - kind = kind || this.value - if (!declaration && kind != "var") this.unexpected() - return this.parseVarStatement(node, kind) - case tt._while: return this.parseWhileStatement(node) - case tt._with: return this.parseWithStatement(node) - case tt.braceL: return this.parseBlock() - case tt.semi: return this.parseEmptyStatement(node) - case tt._export: - case tt._import: - if (!this.options.allowImportExportEverywhere) { - if (!topLevel) - this.raise(this.start, "'import' and 'export' may only appear at the top level") - if (!this.inModule) - this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'") - } - return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports) - - // If the statement does not start with a statement keyword or a - // brace, it's an ExpressionStatement or LabeledStatement. We - // simply start parsing an expression, and afterwards, if the - // next token is a colon and the expression was a simple - // Identifier node, we switch to interpreting it as a label. - default: - if (this.isAsyncFunction() && declaration) { - this.next() - return this.parseFunctionStatement(node, true) - } - - let maybeName = this.value, expr = this.parseExpression() - if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) - return this.parseLabeledStatement(node, maybeName, expr) - else return this.parseExpressionStatement(node, expr) - } -} - -pp.parseBreakContinueStatement = function(node, keyword) { - let isBreak = keyword == "break" - this.next() - if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null - else if (this.type !== tt.name) this.unexpected() - else { - node.label = this.parseIdent() - this.semicolon() - } - - // Verify that there is an actual destination to break or - // continue to. - for (var i = 0; i < this.labels.length; ++i) { - let lab = this.labels[i] - if (node.label == null || lab.name === node.label.name) { - if (lab.kind != null && (isBreak || lab.kind === "loop")) break - if (node.label && isBreak) break - } - } - if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword) - return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") -} - -pp.parseDebuggerStatement = function(node) { - this.next() - this.semicolon() - return this.finishNode(node, "DebuggerStatement") -} - -pp.parseDoStatement = function(node) { - this.next() - this.labels.push(loopLabel) - node.body = this.parseStatement(false) - this.labels.pop() - this.expect(tt._while) - node.test = this.parseParenExpression() - if (this.options.ecmaVersion >= 6) - this.eat(tt.semi) - else - this.semicolon() - return this.finishNode(node, "DoWhileStatement") -} - -// Disambiguating between a `for` and a `for`/`in` or `for`/`of` -// loop is non-trivial. Basically, we have to parse the init `var` -// statement or expression, disallowing the `in` operator (see -// the second parameter to `parseExpression`), and then check -// whether the next token is `in` or `of`. When there is no init -// part (semicolon immediately after the opening parenthesis), it -// is a regular `for` loop. - -pp.parseForStatement = function(node) { - this.next() - this.labels.push(loopLabel) - this.expect(tt.parenL) - if (this.type === tt.semi) return this.parseFor(node, null) - let isLet = this.isLet() - if (this.type === tt._var || this.type === tt._const || isLet) { - let init = this.startNode(), kind = isLet ? "let" : this.value - this.next() - this.parseVar(init, true, kind) - this.finishNode(init, "VariableDeclaration") - if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init.declarations.length === 1 && - !(kind !== "var" && init.declarations[0].init)) - return this.parseForIn(node, init) - return this.parseFor(node, init) - } - let refDestructuringErrors = new DestructuringErrors - let init = this.parseExpression(true, refDestructuringErrors) - if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { - this.toAssignable(init) - this.checkLVal(init) - this.checkPatternErrors(refDestructuringErrors, true) - return this.parseForIn(node, init) - } else { - this.checkExpressionErrors(refDestructuringErrors, true) - } - return this.parseFor(node, init) -} - -pp.parseFunctionStatement = function(node, isAsync) { - this.next() - return this.parseFunction(node, true, false, isAsync) -} - -pp.isFunction = function() { - return this.type === tt._function || this.isAsyncFunction() -} - -pp.parseIfStatement = function(node) { - this.next() - node.test = this.parseParenExpression() - // allow function declarations in branches, but only in non-strict mode - node.consequent = this.parseStatement(!this.strict && this.isFunction()) - node.alternate = this.eat(tt._else) ? this.parseStatement(!this.strict && this.isFunction()) : null - return this.finishNode(node, "IfStatement") -} - -pp.parseReturnStatement = function(node) { - if (!this.inFunction && !this.options.allowReturnOutsideFunction) - this.raise(this.start, "'return' outside of function") - this.next() - - // In `return` (and `break`/`continue`), the keywords with - // optional arguments, we eagerly look for a semicolon or the - // possibility to insert one. - - if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null - else { node.argument = this.parseExpression(); this.semicolon() } - return this.finishNode(node, "ReturnStatement") -} - -pp.parseSwitchStatement = function(node) { - this.next() - node.discriminant = this.parseParenExpression() - node.cases = [] - this.expect(tt.braceL) - this.labels.push(switchLabel) - - // Statements under must be grouped (by label) in SwitchCase - // nodes. `cur` is used to keep the node that we are currently - // adding statements to. - - for (var cur, sawDefault = false; this.type != tt.braceR;) { - if (this.type === tt._case || this.type === tt._default) { - let isCase = this.type === tt._case - if (cur) this.finishNode(cur, "SwitchCase") - node.cases.push(cur = this.startNode()) - cur.consequent = [] - this.next() - if (isCase) { - cur.test = this.parseExpression() - } else { - if (sawDefault) this.raiseRecoverable(this.lastTokStart, "Multiple default clauses") - sawDefault = true - cur.test = null - } - this.expect(tt.colon) - } else { - if (!cur) this.unexpected() - cur.consequent.push(this.parseStatement(true)) - } - } - if (cur) this.finishNode(cur, "SwitchCase") - this.next() // Closing brace - this.labels.pop() - return this.finishNode(node, "SwitchStatement") -} - -pp.parseThrowStatement = function(node) { - this.next() - if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) - this.raise(this.lastTokEnd, "Illegal newline after throw") - node.argument = this.parseExpression() - this.semicolon() - return this.finishNode(node, "ThrowStatement") -} - -// Reused empty array added for node fields that are always empty. - -const empty = [] - -pp.parseTryStatement = function(node) { - this.next() - node.block = this.parseBlock() - node.handler = null - if (this.type === tt._catch) { - let clause = this.startNode() - this.next() - this.expect(tt.parenL) - clause.param = this.parseBindingAtom() - this.checkLVal(clause.param, true) - this.expect(tt.parenR) - clause.body = this.parseBlock() - node.handler = this.finishNode(clause, "CatchClause") - } - node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null - if (!node.handler && !node.finalizer) - this.raise(node.start, "Missing catch or finally clause") - return this.finishNode(node, "TryStatement") -} - -pp.parseVarStatement = function(node, kind) { - this.next() - this.parseVar(node, false, kind) - this.semicolon() - return this.finishNode(node, "VariableDeclaration") -} - -pp.parseWhileStatement = function(node) { - this.next() - node.test = this.parseParenExpression() - this.labels.push(loopLabel) - node.body = this.parseStatement(false) - this.labels.pop() - return this.finishNode(node, "WhileStatement") -} - -pp.parseWithStatement = function(node) { - if (this.strict) this.raise(this.start, "'with' in strict mode") - this.next() - node.object = this.parseParenExpression() - node.body = this.parseStatement(false) - return this.finishNode(node, "WithStatement") -} - -pp.parseEmptyStatement = function(node) { - this.next() - return this.finishNode(node, "EmptyStatement") -} - -pp.parseLabeledStatement = function(node, maybeName, expr) { - for (let i = 0; i < this.labels.length; ++i) - if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared") - let kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null - for (let i = this.labels.length - 1; i >= 0; i--) { - let label = this.labels[i] - if (label.statementStart == node.start) { - label.statementStart = this.start - label.kind = kind - } else break - } - this.labels.push({name: maybeName, kind: kind, statementStart: this.start}) - node.body = this.parseStatement(true) - if (node.body.type == "ClassDeclaration" || - node.body.type == "VariableDeclaration" && (this.strict || node.body.kind != "var") || - node.body.type == "FunctionDeclaration" && (this.strict || node.body.generator)) - this.raiseRecoverable(node.body.start, "Invalid labeled declaration") - this.labels.pop() - node.label = expr - return this.finishNode(node, "LabeledStatement") -} - -pp.parseExpressionStatement = function(node, expr) { - node.expression = expr - this.semicolon() - return this.finishNode(node, "ExpressionStatement") -} - -// Parse a semicolon-enclosed block of statements, handling `"use -// strict"` declarations when `allowStrict` is true (used for -// function bodies). - -pp.parseBlock = function() { - let node = this.startNode() - node.body = [] - this.expect(tt.braceL) - while (!this.eat(tt.braceR)) { - let stmt = this.parseStatement(true) - node.body.push(stmt) - } - return this.finishNode(node, "BlockStatement") -} - -// Parse a regular `for` loop. The disambiguation code in -// `parseStatement` will already have parsed the init statement or -// expression. - -pp.parseFor = function(node, init) { - node.init = init - this.expect(tt.semi) - node.test = this.type === tt.semi ? null : this.parseExpression() - this.expect(tt.semi) - node.update = this.type === tt.parenR ? null : this.parseExpression() - this.expect(tt.parenR) - node.body = this.parseStatement(false) - this.labels.pop() - return this.finishNode(node, "ForStatement") -} - -// Parse a `for`/`in` and `for`/`of` loop, which are almost -// same from parser's perspective. - -pp.parseForIn = function(node, init) { - let type = this.type === tt._in ? "ForInStatement" : "ForOfStatement" - this.next() - node.left = init - node.right = this.parseExpression() - this.expect(tt.parenR) - node.body = this.parseStatement(false) - this.labels.pop() - return this.finishNode(node, type) -} - -// Parse a list of variable declarations. - -pp.parseVar = function(node, isFor, kind) { - node.declarations = [] - node.kind = kind - for (;;) { - let decl = this.startNode() - this.parseVarId(decl) - if (this.eat(tt.eq)) { - decl.init = this.parseMaybeAssign(isFor) - } else if (kind === "const" && !(this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { - this.unexpected() - } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) { - this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") - } else { - decl.init = null - } - node.declarations.push(this.finishNode(decl, "VariableDeclarator")) - if (!this.eat(tt.comma)) break - } - return node -} - -pp.parseVarId = function(decl) { - decl.id = this.parseBindingAtom() - this.checkLVal(decl.id, true) -} - -// Parse a function declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) { - this.initFunction(node) - if (this.options.ecmaVersion >= 6 && !isAsync) - node.generator = this.eat(tt.star) - if (this.options.ecmaVersion >= 8) - node.async = !!isAsync - - if (isStatement == null) - isStatement = this.type == tt.name - if (isStatement) - node.id = this.parseIdent() - - let oldInGen = this.inGenerator, oldInAsync = this.inAsync, - oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction - this.inGenerator = node.generator - this.inAsync = node.async - this.yieldPos = 0 - this.awaitPos = 0 - this.inFunction = true - - if (!isStatement && this.type === tt.name) - node.id = this.parseIdent() - this.parseFunctionParams(node) - this.parseFunctionBody(node, allowExpressionBody) - - this.inGenerator = oldInGen - this.inAsync = oldInAsync - this.yieldPos = oldYieldPos - this.awaitPos = oldAwaitPos - this.inFunction = oldInFunc - return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") -} - -pp.parseFunctionParams = function(node) { - this.expect(tt.parenL) - node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8, true) - this.checkYieldAwaitInDefaultParams() -} - -// Parse a class declaration or literal (depending on the -// `isStatement` parameter). - -pp.parseClass = function(node, isStatement) { - this.next() - if (isStatement == null) isStatement = this.type === tt.name - this.parseClassId(node, isStatement) - this.parseClassSuper(node) - let classBody = this.startNode() - let hadConstructor = false - classBody.body = [] - this.expect(tt.braceL) - while (!this.eat(tt.braceR)) { - if (this.eat(tt.semi)) continue - let method = this.startNode() - let isGenerator = this.eat(tt.star) - let isAsync = false - let isMaybeStatic = this.type === tt.name && this.value === "static" - this.parsePropertyName(method) - method.static = isMaybeStatic && this.type !== tt.parenL - if (method.static) { - if (isGenerator) this.unexpected() - isGenerator = this.eat(tt.star) - this.parsePropertyName(method) - } - if (this.options.ecmaVersion >= 8 && !isGenerator && !method.computed && - method.key.type === "Identifier" && method.key.name === "async" && this.type !== tt.parenL && - !this.canInsertSemicolon()) { - isAsync = true - this.parsePropertyName(method) - } - method.kind = "method" - let isGetSet = false - if (!method.computed) { - let {key} = method - if (!isGenerator && !isAsync && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) { - isGetSet = true - method.kind = key.name - key = this.parsePropertyName(method) - } - if (!method.static && (key.type === "Identifier" && key.name === "constructor" || - key.type === "Literal" && key.value === "constructor")) { - if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class") - if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier") - if (isGenerator) this.raise(key.start, "Constructor can't be a generator") - if (isAsync) this.raise(key.start, "Constructor can't be an async method") - method.kind = "constructor" - hadConstructor = true - } - } - this.parseClassMethod(classBody, method, isGenerator, isAsync) - if (isGetSet) { - let paramCount = method.kind === "get" ? 0 : 1 - if (method.value.params.length !== paramCount) { - let start = method.value.start - if (method.kind === "get") - this.raiseRecoverable(start, "getter should have no params") - else - this.raiseRecoverable(start, "setter should have exactly one param") - } else { - if (method.kind === "set" && method.value.params[0].type === "RestElement") - this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params") - } - } - } - node.body = this.finishNode(classBody, "ClassBody") - return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") -} - -pp.parseClassMethod = function(classBody, method, isGenerator, isAsync) { - method.value = this.parseMethod(isGenerator, isAsync) - classBody.body.push(this.finishNode(method, "MethodDefinition")) -} - -pp.parseClassId = function(node, isStatement) { - node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null -} - -pp.parseClassSuper = function(node) { - node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null -} - -// Parses module export declaration. - -pp.parseExport = function(node, exports) { - this.next() - // export * from '...' - if (this.eat(tt.star)) { - this.expectContextual("from") - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() - this.semicolon() - return this.finishNode(node, "ExportAllDeclaration") - } - if (this.eat(tt._default)) { // export default ... - this.checkExport(exports, "default", this.lastTokStart) - let isAsync - if (this.type === tt._function || (isAsync = this.isAsyncFunction())) { - let fNode = this.startNode() - this.next() - if (isAsync) this.next() - node.declaration = this.parseFunction(fNode, null, false, isAsync) - } else if (this.type === tt._class) { - let cNode = this.startNode() - node.declaration = this.parseClass(cNode, null) - } else { - node.declaration = this.parseMaybeAssign() - this.semicolon() - } - return this.finishNode(node, "ExportDefaultDeclaration") - } - // export var|const|let|function|class ... - if (this.shouldParseExportStatement()) { - node.declaration = this.parseStatement(true) - if (node.declaration.type === "VariableDeclaration") - this.checkVariableExport(exports, node.declaration.declarations) - else - this.checkExport(exports, node.declaration.id.name, node.declaration.id.start) - node.specifiers = [] - node.source = null - } else { // export { x, y as z } [from '...'] - node.declaration = null - node.specifiers = this.parseExportSpecifiers(exports) - if (this.eatContextual("from")) { - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() - } else { - // check for keywords used as local names - for (let i = 0; i < node.specifiers.length; i++) { - if (this.keywords.test(node.specifiers[i].local.name) || this.reservedWords.test(node.specifiers[i].local.name)) { - this.unexpected(node.specifiers[i].local.start) - } - } - - node.source = null - } - this.semicolon() - } - return this.finishNode(node, "ExportNamedDeclaration") -} - -pp.checkExport = function(exports, name, pos) { - if (!exports) return - if (Object.prototype.hasOwnProperty.call(exports, name)) - this.raiseRecoverable(pos, "Duplicate export '" + name + "'") - exports[name] = true -} - -pp.checkPatternExport = function(exports, pat) { - let type = pat.type - if (type == "Identifier") - this.checkExport(exports, pat.name, pat.start) - else if (type == "ObjectPattern") - for (let i = 0; i < pat.properties.length; ++i) - this.checkPatternExport(exports, pat.properties[i].value) - else if (type == "ArrayPattern") - for (let i = 0; i < pat.elements.length; ++i) { - let elt = pat.elements[i] - if (elt) this.checkPatternExport(exports, elt) - } - else if (type == "AssignmentPattern") - this.checkPatternExport(exports, pat.left) - else if (type == "ParenthesizedExpression") - this.checkPatternExport(exports, pat.expression) -} - -pp.checkVariableExport = function(exports, decls) { - if (!exports) return - for (let i = 0; i < decls.length; i++) - this.checkPatternExport(exports, decls[i].id) -} - -pp.shouldParseExportStatement = function() { - return this.type.keyword === "var" - || this.type.keyword === "const" - || this.type.keyword === "class" - || this.type.keyword === "function" - || this.isLet() - || this.isAsyncFunction() -} - -// Parses a comma-separated list of module exports. - -pp.parseExportSpecifiers = function(exports) { - let nodes = [], first = true - // export { x, y as z } [from '...'] - this.expect(tt.braceL) - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma) - if (this.afterTrailingComma(tt.braceR)) break - } else first = false - - let node = this.startNode() - node.local = this.parseIdent(true) - node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local - this.checkExport(exports, node.exported.name, node.exported.start) - nodes.push(this.finishNode(node, "ExportSpecifier")) - } - return nodes -} - -// Parses import declaration. - -pp.parseImport = function(node) { - this.next() - // import '...' - if (this.type === tt.string) { - node.specifiers = empty - node.source = this.parseExprAtom() - } else { - node.specifiers = this.parseImportSpecifiers() - this.expectContextual("from") - node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() - } - this.semicolon() - return this.finishNode(node, "ImportDeclaration") -} - -// Parses a comma-separated list of module imports. - -pp.parseImportSpecifiers = function() { - let nodes = [], first = true - if (this.type === tt.name) { - // import defaultObj, { x, y as z } from '...' - let node = this.startNode() - node.local = this.parseIdent() - this.checkLVal(node.local, true) - nodes.push(this.finishNode(node, "ImportDefaultSpecifier")) - if (!this.eat(tt.comma)) return nodes - } - if (this.type === tt.star) { - let node = this.startNode() - this.next() - this.expectContextual("as") - node.local = this.parseIdent() - this.checkLVal(node.local, true) - nodes.push(this.finishNode(node, "ImportNamespaceSpecifier")) - return nodes - } - this.expect(tt.braceL) - while (!this.eat(tt.braceR)) { - if (!first) { - this.expect(tt.comma) - if (this.afterTrailingComma(tt.braceR)) break - } else first = false - - let node = this.startNode() - node.imported = this.parseIdent(true) - if (this.eatContextual("as")) { - node.local = this.parseIdent() - } else { - node.local = node.imported - if (this.isKeyword(node.local.name)) this.unexpected(node.local.start) - if (this.reservedWordsStrict.test(node.local.name)) this.raiseRecoverable(node.local.start, "The keyword '" + node.local.name + "' is reserved") - } - this.checkLVal(node.local, true) - nodes.push(this.finishNode(node, "ImportSpecifier")) - } - return nodes -} diff --git a/typescript/hello-world/node_modules/acorn/src/tokencontext.js b/typescript/hello-world/node_modules/acorn/src/tokencontext.js deleted file mode 100644 index 911a515..0000000 --- a/typescript/hello-world/node_modules/acorn/src/tokencontext.js +++ /dev/null @@ -1,110 +0,0 @@ -// The algorithm used to determine whether a regexp can appear at a -// given point in the program is loosely based on sweet.js' approach. -// See https://github.com/mozilla/sweet.js/wiki/design - -import {Parser} from "./state" -import {types as tt} from "./tokentype" -import {lineBreak} from "./whitespace" - -export class TokContext { - constructor(token, isExpr, preserveSpace, override) { - this.token = token - this.isExpr = !!isExpr - this.preserveSpace = !!preserveSpace - this.override = override - } -} - -export const types = { - b_stat: new TokContext("{", false), - b_expr: new TokContext("{", true), - b_tmpl: new TokContext("${", true), - p_stat: new TokContext("(", false), - p_expr: new TokContext("(", true), - q_tmpl: new TokContext("`", true, true, p => p.readTmplToken()), - f_expr: new TokContext("function", true) -} - -const pp = Parser.prototype - -pp.initialContext = function() { - return [types.b_stat] -} - -pp.braceIsBlock = function(prevType) { - if (prevType === tt.colon) { - let parent = this.curContext() - if (parent === types.b_stat || parent === types.b_expr) - return !parent.isExpr - } - if (prevType === tt._return) - return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) - if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR) - return true - if (prevType == tt.braceL) - return this.curContext() === types.b_stat - return !this.exprAllowed -} - -pp.updateContext = function(prevType) { - let update, type = this.type - if (type.keyword && prevType == tt.dot) - this.exprAllowed = false - else if (update = type.updateContext) - update.call(this, prevType) - else - this.exprAllowed = type.beforeExpr -} - -// Token-specific context update code - -tt.parenR.updateContext = tt.braceR.updateContext = function() { - if (this.context.length == 1) { - this.exprAllowed = true - return - } - let out = this.context.pop() - if (out === types.b_stat && this.curContext() === types.f_expr) { - this.context.pop() - this.exprAllowed = false - } else if (out === types.b_tmpl) { - this.exprAllowed = true - } else { - this.exprAllowed = !out.isExpr - } -} - -tt.braceL.updateContext = function(prevType) { - this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr) - this.exprAllowed = true -} - -tt.dollarBraceL.updateContext = function() { - this.context.push(types.b_tmpl) - this.exprAllowed = true -} - -tt.parenL.updateContext = function(prevType) { - let statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while - this.context.push(statementParens ? types.p_stat : types.p_expr) - this.exprAllowed = true -} - -tt.incDec.updateContext = function() { - // tokExprAllowed stays unchanged -} - -tt._function.updateContext = function(prevType) { - if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else && - !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat)) - this.context.push(types.f_expr) - this.exprAllowed = false -} - -tt.backQuote.updateContext = function() { - if (this.curContext() === types.q_tmpl) - this.context.pop() - else - this.context.push(types.q_tmpl) - this.exprAllowed = false -} diff --git a/typescript/hello-world/node_modules/acorn/src/tokenize.js b/typescript/hello-world/node_modules/acorn/src/tokenize.js deleted file mode 100644 index 9a34ba7..0000000 --- a/typescript/hello-world/node_modules/acorn/src/tokenize.js +++ /dev/null @@ -1,686 +0,0 @@ -import {isIdentifierStart, isIdentifierChar} from "./identifier" -import {types as tt, keywords as keywordTypes} from "./tokentype" -import {Parser} from "./state" -import {SourceLocation} from "./locutil" -import {lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace} from "./whitespace" - -// Object type used to represent tokens. Note that normally, tokens -// simply exist as properties on the parser object. This is only -// used for the onToken callback and the external tokenizer. - -export class Token { - constructor(p) { - this.type = p.type - this.value = p.value - this.start = p.start - this.end = p.end - if (p.options.locations) - this.loc = new SourceLocation(p, p.startLoc, p.endLoc) - if (p.options.ranges) - this.range = [p.start, p.end] - } -} - -// ## Tokenizer - -const pp = Parser.prototype - -// Are we running under Rhino? -const isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]" - -// Move to the next token - -pp.next = function() { - if (this.options.onToken) - this.options.onToken(new Token(this)) - - this.lastTokEnd = this.end - this.lastTokStart = this.start - this.lastTokEndLoc = this.endLoc - this.lastTokStartLoc = this.startLoc - this.nextToken() -} - -pp.getToken = function() { - this.next() - return new Token(this) -} - -// If we're in an ES6 environment, make parsers iterable -if (typeof Symbol !== "undefined") - pp[Symbol.iterator] = function () { - let self = this - return {next: function () { - let token = self.getToken() - return { - done: token.type === tt.eof, - value: token - } - }} - } - -// Toggle strict mode. Re-reads the next number or string to please -// pedantic tests (`"use strict"; 010;` should fail). - -pp.curContext = function() { - return this.context[this.context.length - 1] -} - -// Read a single token, updating the parser object's token-related -// properties. - -pp.nextToken = function() { - let curContext = this.curContext() - if (!curContext || !curContext.preserveSpace) this.skipSpace() - - this.start = this.pos - if (this.options.locations) this.startLoc = this.curPosition() - if (this.pos >= this.input.length) return this.finishToken(tt.eof) - - if (curContext.override) return curContext.override(this) - else this.readToken(this.fullCharCodeAtPos()) -} - -pp.readToken = function(code) { - // Identifier or keyword. '\uXXXX' sequences are allowed in - // identifiers, so '\' also dispatches to that. - if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) - return this.readWord() - - return this.getTokenFromCode(code) -} - -pp.fullCharCodeAtPos = function() { - let code = this.input.charCodeAt(this.pos) - if (code <= 0xd7ff || code >= 0xe000) return code - let next = this.input.charCodeAt(this.pos + 1) - return (code << 10) + next - 0x35fdc00 -} - -pp.skipBlockComment = function() { - let startLoc = this.options.onComment && this.curPosition() - let start = this.pos, end = this.input.indexOf("*/", this.pos += 2) - if (end === -1) this.raise(this.pos - 2, "Unterminated comment") - this.pos = end + 2 - if (this.options.locations) { - lineBreakG.lastIndex = start - let match - while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { - ++this.curLine - this.lineStart = match.index + match[0].length - } - } - if (this.options.onComment) - this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, - startLoc, this.curPosition()) -} - -pp.skipLineComment = function(startSkip) { - let start = this.pos - let startLoc = this.options.onComment && this.curPosition() - let ch = this.input.charCodeAt(this.pos+=startSkip) - while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { - ++this.pos - ch = this.input.charCodeAt(this.pos) - } - if (this.options.onComment) - this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, - startLoc, this.curPosition()) -} - -// Called at the start of the parse and after every token. Skips -// whitespace and comments, and. - -pp.skipSpace = function() { - loop: while (this.pos < this.input.length) { - let ch = this.input.charCodeAt(this.pos) - switch (ch) { - case 32: case 160: // ' ' - ++this.pos - break - case 13: - if (this.input.charCodeAt(this.pos + 1) === 10) { - ++this.pos - } - case 10: case 8232: case 8233: - ++this.pos - if (this.options.locations) { - ++this.curLine - this.lineStart = this.pos - } - break - case 47: // '/' - switch (this.input.charCodeAt(this.pos + 1)) { - case 42: // '*' - this.skipBlockComment() - break - case 47: - this.skipLineComment(2) - break - default: - break loop - } - break - default: - if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { - ++this.pos - } else { - break loop - } - } - } -} - -// Called at the end of every token. Sets `end`, `val`, and -// maintains `context` and `exprAllowed`, and skips the space after -// the token, so that the next one's `start` will point at the -// right position. - -pp.finishToken = function(type, val) { - this.end = this.pos - if (this.options.locations) this.endLoc = this.curPosition() - let prevType = this.type - this.type = type - this.value = val - - this.updateContext(prevType) -} - -// ### Token reading - -// This is the function that is called to fetch the next token. It -// is somewhat obscure, because it works in character codes rather -// than characters, and because operator parsing has been inlined -// into it. -// -// All in the name of speed. -// -pp.readToken_dot = function() { - let next = this.input.charCodeAt(this.pos + 1) - if (next >= 48 && next <= 57) return this.readNumber(true) - let next2 = this.input.charCodeAt(this.pos + 2) - if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' - this.pos += 3 - return this.finishToken(tt.ellipsis) - } else { - ++this.pos - return this.finishToken(tt.dot) - } -} - -pp.readToken_slash = function() { // '/' - let next = this.input.charCodeAt(this.pos + 1) - if (this.exprAllowed) {++this.pos; return this.readRegexp()} - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.slash, 1) -} - -pp.readToken_mult_modulo_exp = function(code) { // '%*' - let next = this.input.charCodeAt(this.pos + 1) - let size = 1 - let tokentype = code === 42 ? tt.star : tt.modulo - - // exponentiation operator ** and **= - if (this.options.ecmaVersion >= 7 && next === 42) { - ++size - tokentype = tt.starstar - next = this.input.charCodeAt(this.pos + 2) - } - - if (next === 61) return this.finishOp(tt.assign, size + 1) - return this.finishOp(tokentype, size) -} - -pp.readToken_pipe_amp = function(code) { // '|&' - let next = this.input.charCodeAt(this.pos + 1) - if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2) - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1) -} - -pp.readToken_caret = function() { // '^' - let next = this.input.charCodeAt(this.pos + 1) - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.bitwiseXOR, 1) -} - -pp.readToken_plus_min = function(code) { // '+-' - let next = this.input.charCodeAt(this.pos + 1) - if (next === code) { - if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && - lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { - // A `-->` line comment - this.skipLineComment(3) - this.skipSpace() - return this.nextToken() - } - return this.finishOp(tt.incDec, 2) - } - if (next === 61) return this.finishOp(tt.assign, 2) - return this.finishOp(tt.plusMin, 1) -} - -pp.readToken_lt_gt = function(code) { // '<>' - let next = this.input.charCodeAt(this.pos + 1) - let size = 1 - if (next === code) { - size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 - if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) - return this.finishOp(tt.bitShift, size) - } - if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && - this.input.charCodeAt(this.pos + 3) == 45) { - if (this.inModule) this.unexpected() - // ` - -AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. -Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. - -It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. - -| compression | size | -| :----------------- | -------: | -| asynckit.js | 12.34 kB | -| asynckit.min.js | 4.11 kB | -| asynckit.min.js.gz | 1.47 kB | - - -## Install - -```sh -$ npm install --save asynckit -``` - -## Examples - -### Parallel Jobs - -Runs iterator over provided array in parallel. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will terminate rest of the active jobs (if abort function is provided) -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var parallel = require('asynckit').parallel - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , target = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// async job accepts one element from the array -// and a callback function -function asyncJob(item, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var parallel = require('asynckit/parallel') - , assert = require('assert') - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] - , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] - , target = [] - , keys = [] - ; - -parallel(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); - assert.deepEqual(keys, expectedKeys); -}); - -// supports full value, key, callback (shortcut) interface -function asyncJob(item, key, cb) -{ - // different delays (in ms) per item - var delay = item * 25; - - // pretend different jobs take different time to finish - // and not in consequential order - var timeoutId = setTimeout(function() { - keys.push(key); - target.push(item); - cb(null, item * 2); - }, delay); - - // allow to cancel "leftover" jobs upon error - // return function, invoking of which will abort this job - return clearTimeout.bind(null, timeoutId); -} -``` - -More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). - -### Serial Jobs - -Runs iterator over provided array sequentially. Stores output in the `result` array, -on the matching positions. In unlikely event of an error from one of the jobs, -will not proceed to the rest of the items in the list -and return error along with salvaged data to the main callback function. - -#### Input Array - -```javascript -var serial = require('asynckit/serial') - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// extended interface (item, key, callback) -// also supported for arrays -function asyncJob(item, key, cb) -{ - target.push(key); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). - -#### Input Object - -Also it supports named jobs, listed via object. - -```javascript -var serial = require('asynckit').serial - , assert = require('assert') - ; - -var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] - , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] - , target = [] - ; - -var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } - , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } - , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] - , target = [] - ; - - -serial(source, asyncJob, function(err, result) -{ - assert.deepEqual(result, expectedResult); - assert.deepEqual(target, expectedTarget); -}); - -// shortcut interface (item, callback) -// works for object as well as for the arrays -function asyncJob(item, cb) -{ - target.push(item); - - // it will be automatically made async - // even it iterator "returns" in the same event loop - cb(null, item * 2); -} -``` - -More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). - -_Note: Since _object_ is an _unordered_ collection of properties, -it may produce unexpected results with sequential iterations. -Whenever order of the jobs' execution is important please use `serialOrdered` method._ - -### Ordered Serial Iterations - -TBD - -For example [compare-property](compare-property) package. - -### Streaming interface - -TBD - -## Want to Know More? - -More examples can be found in [test folder](test/). - -Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. - -## License - -AsyncKit is licensed under the MIT license. diff --git a/typescript/hello-world/node_modules/asynckit/bench.js b/typescript/hello-world/node_modules/asynckit/bench.js deleted file mode 100644 index c612f1a..0000000 --- a/typescript/hello-world/node_modules/asynckit/bench.js +++ /dev/null @@ -1,76 +0,0 @@ -/* eslint no-console: "off" */ - -var asynckit = require('./') - , async = require('async') - , assert = require('assert') - , expected = 0 - ; - -var Benchmark = require('benchmark'); -var suite = new Benchmark.Suite; - -var source = []; -for (var z = 1; z < 100; z++) -{ - source.push(z); - expected += z; -} - -suite -// add tests - -.add('async.map', function(deferred) -{ - var total = 0; - - async.map(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -.add('asynckit.parallel', function(deferred) -{ - var total = 0; - - asynckit.parallel(source, - function(i, cb) - { - setImmediate(function() - { - total += i; - cb(null, total); - }); - }, - function(err, result) - { - assert.ifError(err); - assert.equal(result[result.length - 1], expected); - deferred.resolve(); - }); -}, {'defer': true}) - - -// add listeners -.on('cycle', function(ev) -{ - console.log(String(ev.target)); -}) -.on('complete', function() -{ - console.log('Fastest is ' + this.filter('fastest').map('name')); -}) -// run async -.run({ 'async': true }); diff --git a/typescript/hello-world/node_modules/asynckit/index.js b/typescript/hello-world/node_modules/asynckit/index.js deleted file mode 100644 index 455f945..0000000 --- a/typescript/hello-world/node_modules/asynckit/index.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = -{ - parallel : require('./parallel.js'), - serial : require('./serial.js'), - serialOrdered : require('./serialOrdered.js') -}; diff --git a/typescript/hello-world/node_modules/asynckit/package.json b/typescript/hello-world/node_modules/asynckit/package.json deleted file mode 100644 index 51147d6..0000000 --- a/typescript/hello-world/node_modules/asynckit/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "asynckit", - "version": "0.4.0", - "description": "Minimal async jobs utility library, with streams support", - "main": "index.js", - "scripts": { - "clean": "rimraf coverage", - "lint": "eslint *.js lib/*.js test/*.js", - "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", - "win-test": "tape test/test-*.js", - "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", - "report": "istanbul report", - "size": "browserify index.js | size-table asynckit", - "debug": "tape test/test-*.js" - }, - "pre-commit": [ - "clean", - "lint", - "test", - "browser", - "report", - "size" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/alexindigo/asynckit.git" - }, - "keywords": [ - "async", - "jobs", - "parallel", - "serial", - "iterator", - "array", - "object", - "stream", - "destroy", - "terminate", - "abort" - ], - "author": "Alex Indigo ", - "license": "MIT", - "bugs": { - "url": "https://github.com/alexindigo/asynckit/issues" - }, - "homepage": "https://github.com/alexindigo/asynckit#readme", - "devDependencies": { - "browserify": "^13.0.0", - "browserify-istanbul": "^2.0.0", - "coveralls": "^2.11.9", - "eslint": "^2.9.0", - "istanbul": "^0.4.3", - "obake": "^0.1.2", - "phantomjs-prebuilt": "^2.1.7", - "pre-commit": "^1.1.3", - "reamde": "^1.1.0", - "rimraf": "^2.5.2", - "size-table": "^0.2.0", - "tap-spec": "^4.1.1", - "tape": "^4.5.1" - }, - "dependencies": {} -} diff --git a/typescript/hello-world/node_modules/asynckit/parallel.js b/typescript/hello-world/node_modules/asynckit/parallel.js deleted file mode 100644 index 3c50344..0000000 --- a/typescript/hello-world/node_modules/asynckit/parallel.js +++ /dev/null @@ -1,43 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = parallel; - -/** - * Runs iterator over provided array elements in parallel - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function parallel(list, iterator, callback) -{ - var state = initState(list); - - while (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, function(error, result) - { - if (error) - { - callback(error, result); - return; - } - - // looks like it's the last one - if (Object.keys(state.jobs).length === 0) - { - callback(null, state.results); - return; - } - }); - - state.index++; - } - - return terminator.bind(state, callback); -} diff --git a/typescript/hello-world/node_modules/asynckit/serial.js b/typescript/hello-world/node_modules/asynckit/serial.js deleted file mode 100644 index 6cd949a..0000000 --- a/typescript/hello-world/node_modules/asynckit/serial.js +++ /dev/null @@ -1,17 +0,0 @@ -var serialOrdered = require('./serialOrdered.js'); - -// Public API -module.exports = serial; - -/** - * Runs iterator over provided array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serial(list, iterator, callback) -{ - return serialOrdered(list, iterator, null, callback); -} diff --git a/typescript/hello-world/node_modules/asynckit/serialOrdered.js b/typescript/hello-world/node_modules/asynckit/serialOrdered.js deleted file mode 100644 index 607eafe..0000000 --- a/typescript/hello-world/node_modules/asynckit/serialOrdered.js +++ /dev/null @@ -1,75 +0,0 @@ -var iterate = require('./lib/iterate.js') - , initState = require('./lib/state.js') - , terminator = require('./lib/terminator.js') - ; - -// Public API -module.exports = serialOrdered; -// sorting helpers -module.exports.ascending = ascending; -module.exports.descending = descending; - -/** - * Runs iterator over provided sorted array elements in series - * - * @param {array|object} list - array or object (named list) to iterate over - * @param {function} iterator - iterator to run - * @param {function} sortMethod - custom sort function - * @param {function} callback - invoked when all elements processed - * @returns {function} - jobs terminator - */ -function serialOrdered(list, iterator, sortMethod, callback) -{ - var state = initState(list, sortMethod); - - iterate(list, iterator, state, function iteratorHandler(error, result) - { - if (error) - { - callback(error, result); - return; - } - - state.index++; - - // are we there yet? - if (state.index < (state['keyedList'] || list).length) - { - iterate(list, iterator, state, iteratorHandler); - return; - } - - // done here - callback(null, state.results); - }); - - return terminator.bind(state, callback); -} - -/* - * -- Sort methods - */ - -/** - * sort helper to sort array elements in ascending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function ascending(a, b) -{ - return a < b ? -1 : a > b ? 1 : 0; -} - -/** - * sort helper to sort array elements in descending order - * - * @param {mixed} a - an item to compare - * @param {mixed} b - an item to compare - * @returns {number} - comparison result - */ -function descending(a, b) -{ - return -1 * ascending(a, b); -} diff --git a/typescript/hello-world/node_modules/asynckit/stream.js b/typescript/hello-world/node_modules/asynckit/stream.js deleted file mode 100644 index d43465f..0000000 --- a/typescript/hello-world/node_modules/asynckit/stream.js +++ /dev/null @@ -1,21 +0,0 @@ -var inherits = require('util').inherits - , Readable = require('stream').Readable - , ReadableAsyncKit = require('./lib/readable_asynckit.js') - , ReadableParallel = require('./lib/readable_parallel.js') - , ReadableSerial = require('./lib/readable_serial.js') - , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') - ; - -// API -module.exports = -{ - parallel : ReadableParallel, - serial : ReadableSerial, - serialOrdered : ReadableSerialOrdered, -}; - -inherits(ReadableAsyncKit, Readable); - -inherits(ReadableParallel, ReadableAsyncKit); -inherits(ReadableSerial, ReadableAsyncKit); -inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/typescript/hello-world/node_modules/aws-sign2/LICENSE b/typescript/hello-world/node_modules/aws-sign2/LICENSE deleted file mode 100644 index a4a9aee..0000000 --- a/typescript/hello-world/node_modules/aws-sign2/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/typescript/hello-world/node_modules/aws-sign2/README.md b/typescript/hello-world/node_modules/aws-sign2/README.md deleted file mode 100644 index 763564e..0000000 --- a/typescript/hello-world/node_modules/aws-sign2/README.md +++ /dev/null @@ -1,4 +0,0 @@ -aws-sign -======== - -AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/typescript/hello-world/node_modules/aws-sign2/index.js b/typescript/hello-world/node_modules/aws-sign2/index.js deleted file mode 100644 index ac72093..0000000 --- a/typescript/hello-world/node_modules/aws-sign2/index.js +++ /dev/null @@ -1,212 +0,0 @@ - -/*! - * Copyright 2010 LearnBoost - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , parse = require('url').parse - ; - -/** - * Valid keys. - */ - -var keys = - [ 'acl' - , 'location' - , 'logging' - , 'notification' - , 'partNumber' - , 'policy' - , 'requestPayment' - , 'torrent' - , 'uploadId' - , 'uploads' - , 'versionId' - , 'versioning' - , 'versions' - , 'website' - ] - -/** - * Return an "Authorization" header value with the given `options` - * in the form of "AWS :" - * - * @param {Object} options - * @return {String} - * @api private - */ - -function authorization (options) { - return 'AWS ' + options.key + ':' + sign(options) -} - -module.exports = authorization -module.exports.authorization = authorization - -/** - * Simple HMAC-SHA1 Wrapper - * - * @param {Object} options - * @return {String} - * @api private - */ - -function hmacSha1 (options) { - return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') -} - -module.exports.hmacSha1 = hmacSha1 - -/** - * Create a base64 sha1 HMAC for `options`. - * - * @param {Object} options - * @return {String} - * @api private - */ - -function sign (options) { - options.message = stringToSign(options) - return hmacSha1(options) -} -module.exports.sign = sign - -/** - * Create a base64 sha1 HMAC for `options`. - * - * Specifically to be used with S3 presigned URLs - * - * @param {Object} options - * @return {String} - * @api private - */ - -function signQuery (options) { - options.message = queryStringToSign(options) - return hmacSha1(options) -} -module.exports.signQuery= signQuery - -/** - * Return a string for sign() with the given `options`. - * - * Spec: - * - * \n - * \n - * \n - * \n - * [headers\n] - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function stringToSign (options) { - var headers = options.amazonHeaders || '' - if (headers) headers += '\n' - var r = - [ options.verb - , options.md5 - , options.contentType - , options.date ? options.date.toUTCString() : '' - , headers + options.resource - ] - return r.join('\n') -} -module.exports.queryStringToSign = stringToSign - -/** - * Return a string for sign() with the given `options`, but is meant exclusively - * for S3 presigned URLs - * - * Spec: - * - * \n - * - * - * @param {Object} options - * @return {String} - * @api private - */ - -function queryStringToSign (options){ - return 'GET\n\n\n' + options.date + '\n' + options.resource -} -module.exports.queryStringToSign = queryStringToSign - -/** - * Perform the following: - * - * - ignore non-amazon headers - * - lowercase fields - * - sort lexicographically - * - trim whitespace between ":" - * - join with newline - * - * @param {Object} headers - * @return {String} - * @api private - */ - -function canonicalizeHeaders (headers) { - var buf = [] - , fields = Object.keys(headers) - ; - for (var i = 0, len = fields.length; i < len; ++i) { - var field = fields[i] - , val = headers[field] - , field = field.toLowerCase() - ; - if (0 !== field.indexOf('x-amz')) continue - buf.push(field + ':' + val) - } - return buf.sort().join('\n') -} -module.exports.canonicalizeHeaders = canonicalizeHeaders - -/** - * Perform the following: - * - * - ignore non sub-resources - * - sort lexicographically - * - * @param {String} resource - * @return {String} - * @api private - */ - -function canonicalizeResource (resource) { - var url = parse(resource, true) - , path = url.pathname - , buf = [] - ; - - Object.keys(url.query).forEach(function(key){ - if (!~keys.indexOf(key)) return - var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) - buf.push(key + val) - }) - - return path + (buf.length ? '?' + buf.sort().join('&') : '') -} -module.exports.canonicalizeResource = canonicalizeResource diff --git a/typescript/hello-world/node_modules/aws-sign2/package.json b/typescript/hello-world/node_modules/aws-sign2/package.json deleted file mode 100644 index cc97fca..0000000 --- a/typescript/hello-world/node_modules/aws-sign2/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "author": "Mikeal Rogers (http://www.futurealoof.com)", - "name": "aws-sign2", - "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", - "version": "0.6.0", - "repository": { - "url": "https://github.com/mikeal/aws-sign" - }, - "license": "Apache-2.0", - "main": "index.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - } -} diff --git a/typescript/hello-world/node_modules/aws4/.npmignore b/typescript/hello-world/node_modules/aws4/.npmignore deleted file mode 100644 index 6c6ade6..0000000 --- a/typescript/hello-world/node_modules/aws4/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -test -examples -example.js -browser diff --git a/typescript/hello-world/node_modules/aws4/.tern-port b/typescript/hello-world/node_modules/aws4/.tern-port deleted file mode 100644 index 7fd1b52..0000000 --- a/typescript/hello-world/node_modules/aws4/.tern-port +++ /dev/null @@ -1 +0,0 @@ -62638 \ No newline at end of file diff --git a/typescript/hello-world/node_modules/aws4/.travis.yml b/typescript/hello-world/node_modules/aws4/.travis.yml deleted file mode 100644 index 61d0634..0000000 --- a/typescript/hello-world/node_modules/aws4/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.12" - - "4.2" diff --git a/typescript/hello-world/node_modules/aws4/LICENSE b/typescript/hello-world/node_modules/aws4/LICENSE deleted file mode 100644 index 4f321e5..0000000 --- a/typescript/hello-world/node_modules/aws4/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2013 Michael Hart (michael.hart.au@gmail.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/typescript/hello-world/node_modules/aws4/README.md b/typescript/hello-world/node_modules/aws4/README.md deleted file mode 100644 index 6b002d0..0000000 --- a/typescript/hello-world/node_modules/aws4/README.md +++ /dev/null @@ -1,523 +0,0 @@ -aws4 ----- - -[![Build Status](https://secure.travis-ci.org/mhart/aws4.png?branch=master)](http://travis-ci.org/mhart/aws4) - -A small utility to sign vanilla node.js http(s) request options using Amazon's -[AWS Signature Version 4](http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html). - -Can also be used [in the browser](./browser). - -This signature is supported by nearly all Amazon services, including -[S3](http://docs.aws.amazon.com/AmazonS3/latest/API/), -[EC2](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/), -[DynamoDB](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/API.html), -[Kinesis](http://docs.aws.amazon.com/kinesis/latest/APIReference/), -[Lambda](http://docs.aws.amazon.com/lambda/latest/dg/API_Reference.html), -[SQS](http://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/), -[SNS](http://docs.aws.amazon.com/sns/latest/api/), -[IAM](http://docs.aws.amazon.com/IAM/latest/APIReference/), -[STS](http://docs.aws.amazon.com/STS/latest/APIReference/), -[RDS](http://docs.aws.amazon.com/AmazonRDS/latest/APIReference/), -[CloudWatch](http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/), -[CloudWatch Logs](http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/), -[CodeDeploy](http://docs.aws.amazon.com/codedeploy/latest/APIReference/), -[CloudFront](http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/), -[CloudTrail](http://docs.aws.amazon.com/awscloudtrail/latest/APIReference/), -[ElastiCache](http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/), -[EMR](http://docs.aws.amazon.com/ElasticMapReduce/latest/API/), -[Glacier](http://docs.aws.amazon.com/amazonglacier/latest/dev/amazon-glacier-api.html), -[CloudSearch](http://docs.aws.amazon.com/cloudsearch/latest/developerguide/APIReq.html), -[Elastic Load Balancing](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/), -[Elastic Transcoder](http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/api-reference.html), -[CloudFormation](http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/), -[Elastic Beanstalk](http://docs.aws.amazon.com/elasticbeanstalk/latest/api/), -[Storage Gateway](http://docs.aws.amazon.com/storagegateway/latest/userguide/AWSStorageGatewayAPI.html), -[Data Pipeline](http://docs.aws.amazon.com/datapipeline/latest/APIReference/), -[Direct Connect](http://docs.aws.amazon.com/directconnect/latest/APIReference/), -[Redshift](http://docs.aws.amazon.com/redshift/latest/APIReference/), -[OpsWorks](http://docs.aws.amazon.com/opsworks/latest/APIReference/), -[SES](http://docs.aws.amazon.com/ses/latest/APIReference/), -[SWF](http://docs.aws.amazon.com/amazonswf/latest/apireference/), -[AutoScaling](http://docs.aws.amazon.com/AutoScaling/latest/APIReference/), -[Mobile Analytics](http://docs.aws.amazon.com/mobileanalytics/latest/ug/server-reference.html), -[Cognito Identity](http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/), -[Cognito Sync](http://docs.aws.amazon.com/cognitosync/latest/APIReference/), -[Container Service](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/), -[AppStream](http://docs.aws.amazon.com/appstream/latest/developerguide/appstream-api-rest.html), -[Key Management Service](http://docs.aws.amazon.com/kms/latest/APIReference/), -[Config](http://docs.aws.amazon.com/config/latest/APIReference/), -[CloudHSM](http://docs.aws.amazon.com/cloudhsm/latest/dg/api-ref.html), -[Route53](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rest.html) and -[Route53 Domains](http://docs.aws.amazon.com/Route53/latest/APIReference/requests-rpc.html). - -Indeed, the only AWS services that *don't* support v4 as of 2014-12-30 are -[Import/Export](http://docs.aws.amazon.com/AWSImportExport/latest/DG/api-reference.html) and -[SimpleDB](http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html) -(they only support [AWS Signature Version 2](https://github.com/mhart/aws2)). - -It also provides defaults for a number of core AWS headers and -request parameters, making it very easy to query AWS services, or -build out a fully-featured AWS library. - -Example -------- - -```javascript -var http = require('http'), - https = require('https'), - aws4 = require('aws4') - -// given an options object you could pass to http.request -var opts = {host: 'sqs.us-east-1.amazonaws.com', path: '/?Action=ListQueues'} - -// alternatively (as aws4 can infer the host): -opts = {service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues'} - -// alternatively (as us-east-1 is default): -opts = {service: 'sqs', path: '/?Action=ListQueues'} - -aws4.sign(opts) // assumes AWS credentials are available in process.env - -console.log(opts) -/* -{ - host: 'sqs.us-east-1.amazonaws.com', - path: '/?Action=ListQueues', - headers: { - Host: 'sqs.us-east-1.amazonaws.com', - 'X-Amz-Date': '20121226T061030Z', - Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' - } -} -*/ - -// we can now use this to query AWS using the standard node.js http API -http.request(opts, function(res) { res.pipe(process.stdout) }).end() -/* - - -... -*/ -``` - -More options ------------- - -```javascript -// you can also pass AWS credentials in explicitly (otherwise taken from process.env) -aws4.sign(opts, {accessKeyId: '', secretAccessKey: ''}) - -// can also add the signature to query strings -aws4.sign({service: 's3', path: '/my-bucket?X-Amz-Expires=12345', signQuery: true}) - -// create a utility function to pipe to stdout (with https this time) -function request(o) { https.request(o, function(res) { res.pipe(process.stdout) }).end(o.body || '') } - -// aws4 can infer the HTTP method if a body is passed in -// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' -request(aws4.sign({service: 'iam', body: 'Action=ListGroups&Version=2010-05-08'})) -/* - -... -*/ - -// can specify any custom option or header as per usual -request(aws4.sign({ - service: 'dynamodb', - region: 'ap-southeast-2', - method: 'POST', - path: '/', - headers: { - 'Content-Type': 'application/x-amz-json-1.0', - 'X-Amz-Target': 'DynamoDB_20120810.ListTables' - }, - body: '{}' -})) -/* -{"TableNames":[]} -... -*/ - -// works with all other services that support Signature Version 4 - -request(aws4.sign({service: 's3', path: '/', signQuery: true})) -/* - -... -*/ - -request(aws4.sign({service: 'ec2', path: '/?Action=DescribeRegions&Version=2014-06-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'sns', path: '/?Action=ListTopics&Version=2010-03-31'})) -/* - -... -*/ - -request(aws4.sign({service: 'sts', path: '/?Action=GetSessionToken&Version=2011-06-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudsearch', path: '/?Action=ListDomainNames&Version=2013-01-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'ses', path: '/?Action=ListIdentities&Version=2010-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'autoscaling', path: '/?Action=DescribeAutoScalingInstances&Version=2011-01-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticloadbalancing', path: '/?Action=DescribeLoadBalancers&Version=2012-06-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudformation', path: '/?Action=ListStacks&Version=2010-05-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticbeanstalk', path: '/?Action=ListAvailableSolutionStacks&Version=2010-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'rds', path: '/?Action=DescribeDBInstances&Version=2012-09-17'})) -/* - -... -*/ - -request(aws4.sign({service: 'monitoring', path: '/?Action=ListMetrics&Version=2010-08-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'redshift', path: '/?Action=DescribeClusters&Version=2012-12-01'})) -/* - -... -*/ - -request(aws4.sign({service: 'cloudfront', path: '/2014-05-31/distribution'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticache', path: '/?Action=DescribeCacheClusters&Version=2014-07-15'})) -/* - -... -*/ - -request(aws4.sign({service: 'elasticmapreduce', path: '/?Action=DescribeJobFlows&Version=2009-03-31'})) -/* - -... -*/ - -request(aws4.sign({service: 'route53', path: '/2013-04-01/hostedzone'})) -/* - -... -*/ - -request(aws4.sign({service: 'appstream', path: '/applications'})) -/* -{"_links":{"curie":[{"href":"http://docs.aws.amazon.com/appstream/latest/... -... -*/ - -request(aws4.sign({service: 'cognito-sync', path: '/identitypools'})) -/* -{"Count":0,"IdentityPoolUsages":[],"MaxResults":16,"NextToken":null} -... -*/ - -request(aws4.sign({service: 'elastictranscoder', path: '/2012-09-25/pipelines'})) -/* -{"NextPageToken":null,"Pipelines":[]} -... -*/ - -request(aws4.sign({service: 'lambda', path: '/2014-11-13/functions/'})) -/* -{"Functions":[],"NextMarker":null} -... -*/ - -request(aws4.sign({service: 'ecs', path: '/?Action=ListClusters&Version=2014-11-13'})) -/* - -... -*/ - -request(aws4.sign({service: 'glacier', path: '/-/vaults', headers: {'X-Amz-Glacier-Version': '2012-06-01'}})) -/* -{"Marker":null,"VaultList":[]} -... -*/ - -request(aws4.sign({service: 'storagegateway', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'StorageGateway_20120630.ListGateways' -}})) -/* -{"Gateways":[]} -... -*/ - -request(aws4.sign({service: 'datapipeline', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'DataPipeline.ListPipelines' -}})) -/* -{"hasMoreResults":false,"pipelineIdList":[]} -... -*/ - -request(aws4.sign({service: 'opsworks', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'OpsWorks_20130218.DescribeStacks' -}})) -/* -{"Stacks":[]} -... -*/ - -request(aws4.sign({service: 'route53domains', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Route53Domains_v20140515.ListDomains' -}})) -/* -{"Domains":[]} -... -*/ - -request(aws4.sign({service: 'kinesis', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Kinesis_20131202.ListStreams' -}})) -/* -{"HasMoreStreams":false,"StreamNames":[]} -... -*/ - -request(aws4.sign({service: 'cloudtrail', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CloudTrail_20131101.DescribeTrails' -}})) -/* -{"trailList":[]} -... -*/ - -request(aws4.sign({service: 'logs', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'Logs_20140328.DescribeLogGroups' -}})) -/* -{"logGroups":[]} -... -*/ - -request(aws4.sign({service: 'codedeploy', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CodeDeploy_20141006.ListApplications' -}})) -/* -{"applications":[]} -... -*/ - -request(aws4.sign({service: 'directconnect', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'OvertureService.DescribeConnections' -}})) -/* -{"connections":[]} -... -*/ - -request(aws4.sign({service: 'kms', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'TrentService.ListKeys' -}})) -/* -{"Keys":[],"Truncated":false} -... -*/ - -request(aws4.sign({service: 'config', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'StarlingDoveService.DescribeDeliveryChannels' -}})) -/* -{"DeliveryChannels":[]} -... -*/ - -request(aws4.sign({service: 'cloudhsm', body: '{}', headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'CloudHsmFrontendService.ListAvailableZones' -}})) -/* -{"AZList":["us-east-1a","us-east-1b","us-east-1c"]} -... -*/ - -request(aws4.sign({ - service: 'swf', - body: '{"registrationStatus":"REGISTERED"}', - headers: { - 'Content-Type': 'application/x-amz-json-1.0', - 'X-Amz-Target': 'SimpleWorkflowService.ListDomains' - } -})) -/* -{"domainInfos":[]} -... -*/ - -request(aws4.sign({ - service: 'cognito-identity', - body: '{"MaxResults": 1}', - headers: { - 'Content-Type': 'application/x-amz-json-1.1', - 'X-Amz-Target': 'AWSCognitoIdentityService.ListIdentityPools' - } -})) -/* -{"IdentityPools":[]} -... -*/ - -request(aws4.sign({ - service: 'mobileanalytics', - path: '/2014-06-05/events', - body: JSON.stringify({events:[{ - eventType: 'a', - timestamp: new Date().toISOString(), - session: {}, - }]}), - headers: { - 'Content-Type': 'application/json', - 'X-Amz-Client-Context': JSON.stringify({ - client: {client_id: 'a', app_title: 'a'}, - custom: {}, - env: {platform: 'a'}, - services: {}, - }), - } -})) -/* -(HTTP 202, empty response) -*/ - -// Generate CodeCommit Git access password -var signer = new aws4.RequestSigner({ - service: 'codecommit', - host: 'git-codecommit.us-east-1.amazonaws.com', - method: 'GIT', - path: '/v1/repos/MyAwesomeRepo', -}) -var password = signer.getDateTime() + 'Z' + signer.signature() -``` - -API ---- - -### aws4.sign(requestOptions, [credentials]) - -This calculates and populates the `Authorization` header of -`requestOptions`, and any other necessary AWS headers and/or request -options. Returns `requestOptions` as a convenience for chaining. - -`requestOptions` is an object holding the same options that the node.js -[http.request](http://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback) -function takes. - -The following properties of `requestOptions` are used in the signing or -populated if they don't already exist: - -- `hostname` or `host` (will be determined from `service` and `region` if not given) -- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`) -- `path` (will use `'/'` if not given) -- `body` (will use `''` if not given) -- `service` (will be calculated from `hostname` or `host` if not given) -- `region` (will be calculated from `hostname` or `host` or use `'us-east-1'` if not given) -- `headers['Host']` (will use `hostname` or `host` or be calculated if not given) -- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'` - if not given and there is a `body`) -- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used) - -Your AWS credentials (which can be found in your -[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) -can be specified in one of two ways: - -- As the second argument, like this: - -```javascript -aws4.sign(requestOptions, { - secretAccessKey: "", - accessKeyId: "", - sessionToken: "" -}) -``` - -- From `process.env`, such as this: - -``` -export AWS_SECRET_ACCESS_KEY="" -export AWS_ACCESS_KEY_ID="" -export AWS_SESSION_TOKEN="" -``` - -(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available) - -The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing -with [IAM STS temporary credentials](http://docs.aws.amazon.com/STS/latest/UsingSTS/using-temp-creds.html). - -Installation ------------- - -With [npm](http://npmjs.org/) do: - -``` -npm install aws4 -``` - -Can also be used [in the browser](./browser). - -Thanks ------- - -Thanks to [@jed](https://github.com/jed) for his -[dynamo-client](https://github.com/jed/dynamo-client) lib where I first -committed and subsequently extracted this code. - -Also thanks to the -[official node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving -me a start on implementing the v4 signature. - diff --git a/typescript/hello-world/node_modules/aws4/aws4.js b/typescript/hello-world/node_modules/aws4/aws4.js deleted file mode 100644 index 0cff0f0..0000000 --- a/typescript/hello-world/node_modules/aws4/aws4.js +++ /dev/null @@ -1,332 +0,0 @@ -var aws4 = exports, - url = require('url'), - querystring = require('querystring'), - crypto = require('crypto'), - lru = require('./lru'), - credentialsCache = lru(1000) - -// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html - -function hmac(key, string, encoding) { - return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) -} - -function hash(string, encoding) { - return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) -} - -// This function assumes the string has already been percent encoded -function encodeRfc3986(urlEncodedString) { - return urlEncodedString.replace(/[!'()*]/g, function(c) { - return '%' + c.charCodeAt(0).toString(16).toUpperCase() - }) -} - -// request: { path | body, [host], [method], [headers], [service], [region] } -// credentials: { accessKeyId, secretAccessKey, [sessionToken] } -function RequestSigner(request, credentials) { - - if (typeof request === 'string') request = url.parse(request) - - var headers = request.headers = (request.headers || {}), - hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host) - - this.request = request - this.credentials = credentials || this.defaultCredentials() - - this.service = request.service || hostParts[0] || '' - this.region = request.region || hostParts[1] || 'us-east-1' - - // SES uses a different domain from the service name - if (this.service === 'email') this.service = 'ses' - - if (!request.method && request.body) - request.method = 'POST' - - if (!headers.Host && !headers.host) { - headers.Host = request.hostname || request.host || this.createHost() - - // If a port is specified explicitly, use it as is - if (request.port) - headers.Host += ':' + request.port - } - if (!request.hostname && !request.host) - request.hostname = headers.Host || headers.host - - this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' -} - -RequestSigner.prototype.matchHost = function(host) { - var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/) - var hostParts = (match || []).slice(1, 3) - - // ES's hostParts are sometimes the other way round, if the value that is expected - // to be region equals ‘es’ switch them back - // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com - if (hostParts[1] === 'es') - hostParts = hostParts.reverse() - - return hostParts -} - -// http://docs.aws.amazon.com/general/latest/gr/rande.html -RequestSigner.prototype.isSingleRegion = function() { - // Special case for S3 and SimpleDB in us-east-1 - if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true - - return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] - .indexOf(this.service) >= 0 -} - -RequestSigner.prototype.createHost = function() { - var region = this.isSingleRegion() ? '' : - (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region, - service = this.service === 'ses' ? 'email' : this.service - return service + region + '.amazonaws.com' -} - -RequestSigner.prototype.prepareRequest = function() { - this.parsePath() - - var request = this.request, headers = request.headers, query - - if (request.signQuery) { - - this.parsedPath.query = query = this.parsedPath.query || {} - - if (this.credentials.sessionToken) - query['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !query['X-Amz-Expires']) - query['X-Amz-Expires'] = 86400 - - if (query['X-Amz-Date']) - this.datetime = query['X-Amz-Date'] - else - query['X-Amz-Date'] = this.getDateTime() - - query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' - query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() - query['X-Amz-SignedHeaders'] = this.signedHeaders() - - } else { - - if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { - if (request.body && !headers['Content-Type'] && !headers['content-type']) - headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' - - if (request.body && !headers['Content-Length'] && !headers['content-length']) - headers['Content-Length'] = Buffer.byteLength(request.body) - - if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) - headers['X-Amz-Security-Token'] = this.credentials.sessionToken - - if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) - headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') - - if (headers['X-Amz-Date'] || headers['x-amz-date']) - this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] - else - headers['X-Amz-Date'] = this.getDateTime() - } - - delete headers.Authorization - delete headers.authorization - } -} - -RequestSigner.prototype.sign = function() { - if (!this.parsedPath) this.prepareRequest() - - if (this.request.signQuery) { - this.parsedPath.query['X-Amz-Signature'] = this.signature() - } else { - this.request.headers.Authorization = this.authHeader() - } - - this.request.path = this.formatPath() - - return this.request -} - -RequestSigner.prototype.getDateTime = function() { - if (!this.datetime) { - var headers = this.request.headers, - date = new Date(headers.Date || headers.date || new Date) - - this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') - - // Remove the trailing 'Z' on the timestamp string for CodeCommit git access - if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) - } - return this.datetime -} - -RequestSigner.prototype.getDate = function() { - return this.getDateTime().substr(0, 8) -} - -RequestSigner.prototype.authHeader = function() { - return [ - 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), - 'SignedHeaders=' + this.signedHeaders(), - 'Signature=' + this.signature(), - ].join(', ') -} - -RequestSigner.prototype.signature = function() { - var date = this.getDate(), - cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), - kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) - if (!kCredentials) { - kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) - kRegion = hmac(kDate, this.region) - kService = hmac(kRegion, this.service) - kCredentials = hmac(kService, 'aws4_request') - credentialsCache.set(cacheKey, kCredentials) - } - return hmac(kCredentials, this.stringToSign(), 'hex') -} - -RequestSigner.prototype.stringToSign = function() { - return [ - 'AWS4-HMAC-SHA256', - this.getDateTime(), - this.credentialString(), - hash(this.canonicalString(), 'hex'), - ].join('\n') -} - -RequestSigner.prototype.canonicalString = function() { - if (!this.parsedPath) this.prepareRequest() - - var pathStr = this.parsedPath.path, - query = this.parsedPath.query, - headers = this.request.headers, - queryStr = '', - normalizePath = this.service !== 's3', - decodePath = this.service === 's3' || this.request.doNotEncodePath, - decodeSlashesInPath = this.service === 's3', - firstValOnly = this.service === 's3', - bodyHash - - if (this.service === 's3' && this.request.signQuery) { - bodyHash = 'UNSIGNED-PAYLOAD' - } else if (this.isCodeCommitGit) { - bodyHash = '' - } else { - bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || - hash(this.request.body || '', 'hex') - } - - if (query) { - queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) { - if (!key) return obj - obj[key] = !Array.isArray(query[key]) ? query[key] : - (firstValOnly ? query[key][0] : query[key].slice().sort()) - return obj - }, {}))) - } - if (pathStr !== '/') { - if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') - pathStr = pathStr.split('/').reduce(function(path, piece) { - if (normalizePath && piece === '..') { - path.pop() - } else if (!normalizePath || piece !== '.') { - if (decodePath) piece = querystring.unescape(piece) - path.push(encodeRfc3986(querystring.escape(piece))) - } - return path - }, []).join('/') - if (pathStr[0] !== '/') pathStr = '/' + pathStr - if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') - } - - return [ - this.request.method || 'GET', - pathStr, - queryStr, - this.canonicalHeaders() + '\n', - this.signedHeaders(), - bodyHash, - ].join('\n') -} - -RequestSigner.prototype.canonicalHeaders = function() { - var headers = this.request.headers - function trimAll(header) { - return header.toString().trim().replace(/\s+/g, ' ') - } - return Object.keys(headers) - .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) - .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) - .join('\n') -} - -RequestSigner.prototype.signedHeaders = function() { - return Object.keys(this.request.headers) - .map(function(key) { return key.toLowerCase() }) - .sort() - .join(';') -} - -RequestSigner.prototype.credentialString = function() { - return [ - this.getDate(), - this.region, - this.service, - 'aws4_request', - ].join('/') -} - -RequestSigner.prototype.defaultCredentials = function() { - var env = process.env - return { - accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, - secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, - sessionToken: env.AWS_SESSION_TOKEN, - } -} - -RequestSigner.prototype.parsePath = function() { - var path = this.request.path || '/', - queryIx = path.indexOf('?'), - query = null - - if (queryIx >= 0) { - query = querystring.parse(path.slice(queryIx + 1)) - path = path.slice(0, queryIx) - } - - // S3 doesn't always encode characters > 127 correctly and - // all services don't encode characters > 255 correctly - // So if there are non-reserved chars (and it's not already all % encoded), just encode them all - if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { - path = path.split('/').map(function(piece) { - return querystring.escape(querystring.unescape(piece)) - }).join('/') - } - - this.parsedPath = { - path: path, - query: query, - } -} - -RequestSigner.prototype.formatPath = function() { - var path = this.parsedPath.path, - query = this.parsedPath.query - - if (!query) return path - - // Services don't support empty query string keys - if (query[''] != null) delete query[''] - - return path + '?' + encodeRfc3986(querystring.stringify(query)) -} - -aws4.RequestSigner = RequestSigner - -aws4.sign = function(request, credentials) { - return new RequestSigner(request, credentials).sign() -} diff --git a/typescript/hello-world/node_modules/aws4/lru.js b/typescript/hello-world/node_modules/aws4/lru.js deleted file mode 100644 index 333f66a..0000000 --- a/typescript/hello-world/node_modules/aws4/lru.js +++ /dev/null @@ -1,96 +0,0 @@ -module.exports = function(size) { - return new LruCache(size) -} - -function LruCache(size) { - this.capacity = size | 0 - this.map = Object.create(null) - this.list = new DoublyLinkedList() -} - -LruCache.prototype.get = function(key) { - var node = this.map[key] - if (node == null) return undefined - this.used(node) - return node.val -} - -LruCache.prototype.set = function(key, val) { - var node = this.map[key] - if (node != null) { - node.val = val - } else { - if (!this.capacity) this.prune() - if (!this.capacity) return false - node = new DoublyLinkedNode(key, val) - this.map[key] = node - this.capacity-- - } - this.used(node) - return true -} - -LruCache.prototype.used = function(node) { - this.list.moveToFront(node) -} - -LruCache.prototype.prune = function() { - var node = this.list.pop() - if (node != null) { - delete this.map[node.key] - this.capacity++ - } -} - - -function DoublyLinkedList() { - this.firstNode = null - this.lastNode = null -} - -DoublyLinkedList.prototype.moveToFront = function(node) { - if (this.firstNode == node) return - - this.remove(node) - - if (this.firstNode == null) { - this.firstNode = node - this.lastNode = node - node.prev = null - node.next = null - } else { - node.prev = null - node.next = this.firstNode - node.next.prev = node - this.firstNode = node - } -} - -DoublyLinkedList.prototype.pop = function() { - var lastNode = this.lastNode - if (lastNode != null) { - this.remove(lastNode) - } - return lastNode -} - -DoublyLinkedList.prototype.remove = function(node) { - if (this.firstNode == node) { - this.firstNode = node.next - } else if (node.prev != null) { - node.prev.next = node.next - } - if (this.lastNode == node) { - this.lastNode = node.prev - } else if (node.next != null) { - node.next.prev = node.prev - } -} - - -function DoublyLinkedNode(key, val) { - this.key = key - this.val = val - this.prev = null - this.next = null -} diff --git a/typescript/hello-world/node_modules/aws4/package.json b/typescript/hello-world/node_modules/aws4/package.json deleted file mode 100644 index 33b9bb0..0000000 --- a/typescript/hello-world/node_modules/aws4/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "aws4", - "version": "1.6.0", - "description": "Signs and prepares requests using AWS Signature Version 4", - "author": "Michael Hart (http://github.com/mhart)", - "main": "aws4.js", - "keywords": [ - "amazon", - "aws", - "signature", - "s3", - "ec2", - "autoscaling", - "cloudformation", - "elasticloadbalancing", - "elb", - "elasticbeanstalk", - "cloudsearch", - "dynamodb", - "kinesis", - "lambda", - "glacier", - "sqs", - "sns", - "iam", - "sts", - "ses", - "swf", - "storagegateway", - "datapipeline", - "directconnect", - "redshift", - "opsworks", - "rds", - "monitoring", - "cloudtrail", - "cloudfront", - "codedeploy", - "elasticache", - "elasticmapreduce", - "elastictranscoder", - "emr", - "cloudwatch", - "mobileanalytics", - "cognitoidentity", - "cognitosync", - "cognito", - "containerservice", - "ecs", - "appstream", - "keymanagementservice", - "kms", - "config", - "cloudhsm", - "route53", - "route53domains", - "logs" - ], - "repository": { - "type": "git", - "url": "https://github.com/mhart/aws4.git" - }, - "license": "MIT", - "devDependencies": { - "mocha": "^2.4.5", - "should": "^8.2.2" - }, - "scripts": { - "test": "mocha ./test/fast.js ./test/slow.js -b -t 100s -R list" - } -} diff --git a/typescript/hello-world/node_modules/babel-code-frame/.npmignore b/typescript/hello-world/node_modules/babel-code-frame/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/typescript/hello-world/node_modules/babel-code-frame/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/typescript/hello-world/node_modules/babel-code-frame/README.md b/typescript/hello-world/node_modules/babel-code-frame/README.md deleted file mode 100644 index 0257a2d..0000000 --- a/typescript/hello-world/node_modules/babel-code-frame/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# babel-code-frame - -> Generate errors that contain a code frame that point to source locations. - -## Install - -```sh -npm install --save-dev babel-code-frame -``` - -## Usage - -```js -import codeFrame from 'babel-code-frame'; - -const rawLines = `class Foo { - constructor() -}`; -const lineNumber = 2; -const colNumber = 16; - -const result = codeFrame(rawLines, lineNumber, colNumber, { /* options */ }); - -console.log(result); -``` - -```sh - 1 | class Foo { -> 2 | constructor() - | ^ - 3 | } -``` - -If the column number is not known, you may pass `null` instead. - -## Options - -name | type | default | description ------------------------|----------|-----------------|------------------------------------------------------ -highlightCode | boolean | `false` | Syntax highlight the code as JavaScript for terminals -linesAbove | number | 2 | The number of lines to show above the error -linesBelow | number | 3 | The number of lines to show below the error -forceColor | boolean | `false` | Forcibly syntax highlight the code as JavaScript (for non-terminals); overrides highlightCode diff --git a/typescript/hello-world/node_modules/babel-code-frame/package.json b/typescript/hello-world/node_modules/babel-code-frame/package.json deleted file mode 100644 index 6921871..0000000 --- a/typescript/hello-world/node_modules/babel-code-frame/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "babel-code-frame", - "version": "6.22.0", - "description": "Generate errors that contain a code frame that point to source locations.", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-code-frame", - "main": "lib/index.js", - "dependencies": { - "chalk": "^1.1.0", - "esutils": "^2.0.2", - "js-tokens": "^3.0.0" - } -} diff --git a/typescript/hello-world/node_modules/babel-core/README.md b/typescript/hello-world/node_modules/babel-core/README.md deleted file mode 100644 index ebff1f1..0000000 --- a/typescript/hello-world/node_modules/babel-core/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# babel-core - -> Babel compiler core. - - -```javascript -var babel = require("babel-core"); -import { transform } from 'babel-core'; -import * as babel from 'babel-core'; -``` - -All transformations will use your local configuration files (.babelrc or in package.json). See [options](#options) to disable it. - -## babel.transform(code: string, [options?](#options): Object) - -Transforms the passed in `code`. Returning an object with the generated code, -source map, and AST. - -```js -babel.transform(code, options) // => { code, map, ast } -``` - -**Example** - -```js -var result = babel.transform("code();", options); -result.code; -result.map; -result.ast; -``` - -## babel.transformFile(filename: string, [options?](#options): Object, callback: Function) - -Asynchronously transforms the entire contents of a file. - -```js -babel.transformFile(filename, options, callback) -``` - -**Example** - -```js -babel.transformFile("filename.js", options, function (err, result) { - result; // => { code, map, ast } -}); -``` - -## babel.transformFileSync(filename: string, [options?](#options): Object) - -Synchronous version of `babel.transformFile`. Returns the transformed contents of -the `filename`. - -```js -babel.transformFileSync(filename, options) // => { code, map, ast } -``` - -**Example** - -```js -babel.transformFileSync("filename.js", options).code; -``` - -## babel.transformFromAst(ast: Object, code?: string, [options?](#options): Object) - -Given, an [AST](https://astexplorer.net/), transform it. - -```js -const code = "if (true) return;"; -const ast = babylon.parse(code, { allowReturnOutsideFunction: true }); -const { code, map, ast } = babel.transformFromAst(ast, code, options); -``` - -## Options - -
-

Babel CLI

-

- You can pass these options from the Babel CLI like so: -

-

- babel --name=value -

-
- -Following is a table of the options you can use: - -| Option | Default | Description | -| ------------------------ | -------------------- | ------------------------------- | -| `ast` | `true` | Include the AST in the returned object | -| `auxiliaryCommentAfter` | `null` | Attach a comment after all non-user injected code. | -| `auxiliaryCommentBefore` | `null` | Attach a comment before all non-user injected code. | -| `babelrc` | `true` | Specify whether or not to use .babelrc and .babelignore files. Not available when using the CLI, [use `--no-babelrc` instead](https://babeljs.io/docs/usage/cli/#babel-ignoring-babelrc). | -| `code` | `true` | Enable code generation | -| `comments` | `true` | Output comments in generated output. | -| `compact` | `"auto"` | Do not include superfluous whitespace characters and line terminators. When set to `"auto"` compact is set to `true` on input sizes of >500KB. | -| `env` | `{}` | This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { /* specific options */ } } }` which will use those options when the environment variable `BABEL_ENV` is set to `"production"`. If `BABEL_ENV` isn't set then `NODE_ENV` will be used, if it's not set then it defaults to `"development"` | -| `extends` | `null` | A path to an `.babelrc` file to extend | -| `filename` | `"unknown"` | Filename for use in errors etc. | -| `filenameRelative` | `(filename)` | Filename relative to `sourceRoot`. | -| `generatorOpts` | `{}` | An object containing the options to be passed down to the babel code generator, babel-generator | -| `getModuleId` | `null` | Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. If falsy value is returned then the generated module id is used. | -| `highlightCode` | `true` | ANSI highlight syntax error code frames | -| `ignore` | `null` | Opposite to the `only` option. `ignore` is disregarded if `only` is specified. | -| `inputSourceMap` | `null` | A source map object that the output source map will be based on. | -| `minified` | `false` | Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping `()` from `new` when safe) | -| `moduleId` | `null` | Specify a custom name for module ids. | -| `moduleIds` | `false` | If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for `common` modules) | -| `moduleRoot` | `(sourceRoot)` | Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions. | -| `only` | `null` | A [glob](https://github.com/isaacs/minimatch), regex, or mixed array of both, matching paths to **only** compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim. | -| `parserOpts` | `{}` | An object containing the options to be passed down to the babel parser, babylon | -| `plugins` | `[]` | List of [plugins](https://babeljs.io/docs/plugins/) to load and use. | -| `presets` | `[]` | List of [presets](https://babeljs.io/docs/plugins/#presets) (a set of plugins) to load and use. | -| `retainLines` | `false` | Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE:** This will not retain the columns) | -| `resolveModuleSource` | `null` | Resolve a module source ie. `import "SOURCE";` to a custom value. Called as `resolveModuleSource(source, filename)`. | -| `shouldPrintComment` | `null` | An optional callback that controls whether a comment should be output or not. Called as `shouldPrintComment(commentContents)`. **NOTE:** This overrides the `comment` option when used. | -| `sourceFileName` | `(filenameRelative)` | Set `sources[0]` on returned source map. | -| `sourceMaps` | `false` | If truthy, adds a `map` property to returned output. If set to `"inline"`, a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to `"both"` then a `map` property is returned as well as a source map comment appended. **This does not emit sourcemap files by itself!** To have sourcemaps emitted using the CLI, you must pass it the `--source-maps` option. | -| `sourceMapTarget` | `(filenameRelative)` | Set `file` on returned source map. | -| `sourceRoot` | `(moduleRoot)` | The root from which all sources are relative. | -| `sourceType` | `"module"` | Indicate the mode the code should be parsed in. Can be either "script" or "module". | -| `wrapPluginVisitorMethod`| `null` | An optional callback that can be used to wrap visitor methods. **NOTE:** This is useful for things like introspection, and not really needed for implementing anything. Called as `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`. diff --git a/typescript/hello-world/node_modules/babel-core/index.js b/typescript/hello-world/node_modules/babel-core/index.js deleted file mode 100644 index e8f0477..0000000 --- a/typescript/hello-world/node_modules/babel-core/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/api/node.js"); diff --git a/typescript/hello-world/node_modules/babel-core/node_modules/.bin/babylon b/typescript/hello-world/node_modules/babel-core/node_modules/.bin/babylon deleted file mode 120000 index 7ceac01..0000000 --- a/typescript/hello-world/node_modules/babel-core/node_modules/.bin/babylon +++ /dev/null @@ -1 +0,0 @@ -../../../babylon/bin/babylon.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-core/node_modules/.bin/json5 b/typescript/hello-world/node_modules/babel-core/node_modules/.bin/json5 deleted file mode 120000 index 519e49e..0000000 --- a/typescript/hello-world/node_modules/babel-core/node_modules/.bin/json5 +++ /dev/null @@ -1 +0,0 @@ -../../../json5/lib/cli.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-core/package.json b/typescript/hello-world/node_modules/babel-core/package.json deleted file mode 100644 index ba942c6..0000000 --- a/typescript/hello-world/node_modules/babel-core/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "babel-core", - "version": "6.25.0", - "description": "Babel compiler core.", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-core", - "keywords": [ - "6to5", - "babel", - "classes", - "const", - "es6", - "harmony", - "let", - "modules", - "transpile", - "transpiler", - "var", - "babel-core", - "compiler" - ], - "scripts": { - "bench": "make bench", - "test": "make test" - }, - "dependencies": { - "babel-code-frame": "^6.22.0", - "babel-generator": "^6.25.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-template": "^6.25.0", - "babel-runtime": "^6.22.0", - "babel-register": "^6.24.1", - "babel-traverse": "^6.25.0", - "babel-types": "^6.25.0", - "babylon": "^6.17.2", - "convert-source-map": "^1.1.0", - "debug": "^2.1.1", - "json5": "^0.5.0", - "lodash": "^4.2.0", - "minimatch": "^3.0.2", - "path-is-absolute": "^1.0.0", - "private": "^0.1.6", - "slash": "^1.0.0", - "source-map": "^0.5.0" - }, - "devDependencies": { - "babel-helper-fixtures": "^6.22.0", - "babel-helper-transform-fixture-test-runner": "^6.24.1", - "babel-polyfill": "^6.23.0" - } -} diff --git a/typescript/hello-world/node_modules/babel-core/register.js b/typescript/hello-world/node_modules/babel-core/register.js deleted file mode 100644 index 97d35f2..0000000 --- a/typescript/hello-world/node_modules/babel-core/register.js +++ /dev/null @@ -1,3 +0,0 @@ -/* eslint max-len: 0 */ -// TODO: eventually deprecate this console.trace("use the `babel-register` package instead of `babel-core/register`"); -module.exports = require("babel-register"); diff --git a/typescript/hello-world/node_modules/babel-generator/README.md b/typescript/hello-world/node_modules/babel-generator/README.md deleted file mode 100644 index a337191..0000000 --- a/typescript/hello-world/node_modules/babel-generator/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# babel-generator - -> Turns an AST into code. - -## Install - -```sh -npm install --save-dev babel-generator -``` - -## Usage - -```js -import {parse} from 'babylon'; -import generate from 'babel-generator'; - -const code = 'class Example {}'; -const ast = parse(code); - -const output = generate(ast, { /* options */ }, code); -``` - -## Options - -Options for formatting output: - -name | type | default | description ------------------------|----------|-----------------|-------------------------------------------------------------------------- -auxiliaryCommentBefore | string | | Optional string to add as a block comment at the start of the output file -auxiliaryCommentAfter | string | | Optional string to add as a block comment at the end of the output file -shouldPrintComment | function | `opts.comments` | Function that takes a comment (as a string) and returns `true` if the comment should be included in the output. By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment contains `@preserve` or `@license` -retainLines | boolean | `false` | Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces) -retainFunctionParens | boolean | `false` | Retain parens around function expressions (could be used to change engine parsing behavior) -comments | boolean | `true` | Should comments be included in output -compact | boolean or `'auto'` | `opts.minified` | Set to `true` to avoid adding whitespace for formatting -minified | boolean | `false` | Should the output be minified -concise | boolean | `false` | Set to `true` to reduce whitespace (but not as much as `opts.compact`) -quotes | `'single'` or `'double'` | autodetect based on `ast.tokens` | The type of quote to use in the output -filename | string | | Used in warning messages -flowCommaSeparator | boolean | `false` | Set to `true` to use commas instead of semicolons as Flow property separators -jsonCompatibleStrings | boolean | `false` | Set to true to run `jsesc` with "json": true to print "\u00A9" vs. "©"; - -Options for source maps: - -name | type | default | description ------------------------|----------|-----------------|-------------------------------------------------------------------------- -sourceMaps | boolean | `false` | Enable generating source maps -sourceMapTarget | string | | The filename of the generated code that the source map will be associated with -sourceRoot | string | | A root for all relative URLs in the source map -sourceFileName | string | | The filename for the source code (i.e. the code in the `code` argument). This will only be used if `code` is a string. - -## AST from Multiple Sources - -In most cases, Babel does a 1:1 transformation of input-file to output-file. However, -you may be dealing with AST constructed from multiple sources - JS files, templates, etc. -If this is the case, and you want the sourcemaps to reflect the correct sources, you'll need -to make some changes to your code. - -First, each node with a `loc` property (which indicates that node's original placement in the -source document) must also include a `loc.filename` property, set to the source filename. - -Second, you should pass an object to `generate` as the `code` parameter. Keys -should be the source filenames, and values should be the source content. - -Here's an example of what that might look like: - -```js -import {parse} from 'babylon'; -import generate from 'babel-generator'; - -const a = 'var a = 1;'; -const b = 'var b = 2;'; -const astA = parse(a, { filename: 'a.js' }); -const astB = parse(b, { filename: 'b.js' }); -const ast = { - type: 'Program', - body: [].concat(astA.body, ast2.body) -}; - -const { code, map } = generate(ast, { /* options */ }, { - 'a.js': a, - 'b.js': b -}); - -// Sourcemap will point to both a.js and b.js where appropriate. -``` diff --git a/typescript/hello-world/node_modules/babel-generator/node_modules/.bin/jsesc b/typescript/hello-world/node_modules/babel-generator/node_modules/.bin/jsesc deleted file mode 120000 index e973436..0000000 --- a/typescript/hello-world/node_modules/babel-generator/node_modules/.bin/jsesc +++ /dev/null @@ -1 +0,0 @@ -../../../jsesc/bin/jsesc \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-generator/package.json b/typescript/hello-world/node_modules/babel-generator/package.json deleted file mode 100644 index f679461..0000000 --- a/typescript/hello-world/node_modules/babel-generator/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "babel-generator", - "version": "6.25.0", - "description": "Turns an AST into code.", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-generator", - "main": "lib/index.js", - "files": [ - "lib" - ], - "dependencies": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-types": "^6.25.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.2.0", - "source-map": "^0.5.0", - "trim-right": "^1.0.1" - }, - "devDependencies": { - "babel-helper-fixtures": "^6.22.0", - "babylon": "^6.17.2" - } -} diff --git a/typescript/hello-world/node_modules/babel-helpers/.npmignore b/typescript/hello-world/node_modules/babel-helpers/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/typescript/hello-world/node_modules/babel-helpers/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/typescript/hello-world/node_modules/babel-helpers/README.md b/typescript/hello-world/node_modules/babel-helpers/README.md deleted file mode 100644 index 2614f11..0000000 --- a/typescript/hello-world/node_modules/babel-helpers/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# babel-helpers - -> Collection of helper functions used by Babel transforms. - -## Install - -```sh -npm install --save-dev babel-helpers -``` - -## Usage - -```js -import * as helpers from 'babel-helpers'; -import * as t from 'babel-types'; - -const typeofHelper = helpers.get('typeof'); - -t.isExpressionStatement(typeofHelper); -// true -``` diff --git a/typescript/hello-world/node_modules/babel-helpers/package.json b/typescript/hello-world/node_modules/babel-helpers/package.json deleted file mode 100644 index f2f8dc2..0000000 --- a/typescript/hello-world/node_modules/babel-helpers/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "babel-helpers", - "version": "6.24.1", - "description": "Collection of helper functions used by Babel transforms.", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-helpers", - "main": "lib/index.js", - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } -} diff --git a/typescript/hello-world/node_modules/babel-jest/.npmignore b/typescript/hello-world/node_modules/babel-jest/.npmignore deleted file mode 100644 index c8ab4c8..0000000 --- a/typescript/hello-world/node_modules/babel-jest/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -**/__mocks__/** -**/__tests__/** -src -yarn.lock diff --git a/typescript/hello-world/node_modules/babel-jest/README.md b/typescript/hello-world/node_modules/babel-jest/README.md deleted file mode 100644 index 55855a4..0000000 --- a/typescript/hello-world/node_modules/babel-jest/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# babel-jest - -[Babel](https://github.com/babel/babel) [jest](https://github.com/facebook/jest) plugin - -## Usage - -If you are already using `jest-cli`, just add `babel-jest` and it will automatically compile JavaScript code using babel. - -``` -npm install --save-dev babel-jest -``` - -If you would like to write your own preprocessor, uninstall and delete babel-jest and set the [config.transform](http://facebook.github.io/jest/docs/configuration.html#transform-object-string-string) option to your preprocessor. - -## Setup - -*Note: this step is only required if you are using `babel-jest` with additional code preprocessors.* - -To explicitly define `babel-jest` as a transformer for your JavaScript code, map *.js* files to the `babel-jest` module. - -```json -"transform": { - "^.+\\.jsx?$": "babel-jest" -}, -``` diff --git a/typescript/hello-world/node_modules/babel-jest/package.json b/typescript/hello-world/node_modules/babel-jest/package.json deleted file mode 100644 index be26691..0000000 --- a/typescript/hello-world/node_modules/babel-jest/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "babel-jest", - "description": "Jest plugin to use babel for transformation.", - "version": "20.0.3", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git" - }, - "license": "BSD-3-Clause", - "main": "build/index.js", - "dependencies": { - "babel-core": "^6.0.0", - "babel-plugin-istanbul": "^4.0.0", - "babel-preset-jest": "^20.0.3" - } -} diff --git a/typescript/hello-world/node_modules/babel-messages/.npmignore b/typescript/hello-world/node_modules/babel-messages/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/typescript/hello-world/node_modules/babel-messages/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/typescript/hello-world/node_modules/babel-messages/README.md b/typescript/hello-world/node_modules/babel-messages/README.md deleted file mode 100644 index 98ecf8b..0000000 --- a/typescript/hello-world/node_modules/babel-messages/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# babel-messages - -> Collection of debug messages used by Babel. - -## Install - -```sh -npm install --save-dev babel-messages -``` - -## Usage - -```js -import * as messages from 'babel-messages'; - -messages.get('tailCallReassignmentDeopt'); -// > "Function reference has been..." -``` diff --git a/typescript/hello-world/node_modules/babel-messages/package.json b/typescript/hello-world/node_modules/babel-messages/package.json deleted file mode 100644 index 348dc5e..0000000 --- a/typescript/hello-world/node_modules/babel-messages/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "babel-messages", - "version": "6.23.0", - "description": "Collection of debug messages used by Babel.", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-messages", - "main": "lib/index.js", - "dependencies": { - "babel-runtime": "^6.22.0" - } -} diff --git a/typescript/hello-world/node_modules/babel-plugin-istanbul/CHANGELOG.md b/typescript/hello-world/node_modules/babel-plugin-istanbul/CHANGELOG.md deleted file mode 100644 index 8509d27..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-istanbul/CHANGELOG.md +++ /dev/null @@ -1,202 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [4.1.4](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.3...v4.1.4) (2017-05-27) - - - - -## [4.1.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.1...v4.1.3) (2017-04-29) - - - - -## [4.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.1...v4.1.2) (2017-03-27) - - - - -## [4.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.0...v4.1.1) (2017-03-22) - - -### Bug Fixes - -* explicit upgrade to patched version of istanbul-lib-instrument ([db8ecbe](https://github.com/istanbuljs/babel-plugin-istanbul/commit/db8ecbe)) - - - - -# [4.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.0.0...v4.1.0) (2017-03-21) - - -### Features - -* add includeUntested option to expose coverage of all instrumented files ([#80](https://github.com/istanbuljs/babel-plugin-istanbul/issues/80)) ([b078bbd](https://github.com/istanbuljs/babel-plugin-istanbul/commit/b078bbd)) - - - - -# [4.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.2...v4.0.0) (2017-02-07) - - -### Bug Fixes - -* load configuration from process.env.NYC_CONFIG if present ([#93](https://github.com/istanbuljs/babel-plugin-istanbul/issues/93)) ([e902924](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e902924)) - - -### Features - -* drop Node 0.10 and 0.12 support, upgrade dependencies to reflect this ([#88](https://github.com/istanbuljs/babel-plugin-istanbul/issues/88)) ([594c03a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/594c03a)) -* we can now use the language feature Object.assign ([#92](https://github.com/istanbuljs/babel-plugin-istanbul/issues/92)) ([f77db2a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/f77db2a)) - - -### BREAKING CHANGES - -* I've updated dependencies and dropped Node 0.10 and Node 0.12 support. - - - - -## [3.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.1...v3.1.2) (2017-01-04) - - -### Bug Fixes - -* address regression related to export const foo = () => {} ([#79](https://github.com/istanbuljs/babel-plugin-istanbul/issues/79)) ([f870a8f](https://github.com/istanbuljs/babel-plugin-istanbul/commit/f870a8f)) - - - - -## [3.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.0...v3.1.1) (2017-01-02) - - - - -# [3.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.0.0...v3.1.0) (2016-12-27) - - -### Bug Fixes - -* upgrade a bunch of core dependencies ([#77](https://github.com/istanbuljs/babel-plugin-istanbul/issues/77)) ([e764330](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e764330)) - - -### Features - -* accept source map input for the visitor ([#75](https://github.com/istanbuljs/babel-plugin-istanbul/issues/75)) ([437e90b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/437e90b)) - - - - -# [3.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.3...v3.0.0) (2016-11-14) - - -### Chores - -* **package:** update test-exclude to version 3.0.0 ([#68](https://github.com/istanbuljs/babel-plugin-istanbul/issues/68)) ([0396385](https://github.com/istanbuljs/babel-plugin-istanbul/commit/0396385)) - - -### BREAKING CHANGES - -* package: test-exclude now adds `**/node_modules/**` as exclude rule by default. - - - - -## [2.0.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.2...v2.0.3) (2016-10-17) - - -### Bug Fixes - -* force istanbul-lib-instrument with variable hoisting fix ([#64](https://github.com/istanbuljs/babel-plugin-istanbul/issues/64)) ([209a0cf](https://github.com/istanbuljs/babel-plugin-istanbul/commit/209a0cf)) -* switch deprecated lodash.assign for object-assign ([#58](https://github.com/istanbuljs/babel-plugin-istanbul/issues/58)) ([6e051fc](https://github.com/istanbuljs/babel-plugin-istanbul/commit/6e051fc)) - - - - -## [2.0.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.1...v2.0.2) (2016-09-08) - - -### Bug Fixes - -* take realpath of cwd, whether or not set in env ([#37](https://github.com/istanbuljs/babel-plugin-istanbul/issues/37)) ([6274d83](https://github.com/istanbuljs/babel-plugin-istanbul/commit/6274d83)) - - - - -## [2.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.0...v2.0.1) (2016-09-02) - - -### Bug Fixes - -* update istanbul-lib-instrument ([573e0d4](https://github.com/istanbuljs/babel-plugin-istanbul/commit/573e0d4)) - - - - -# [2.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.1.0...v2.0.0) (2016-08-14) - - -### Chores - -* upgrade to version of test-exclude with new exclude rules ([#35](https://github.com/istanbuljs/babel-plugin-istanbul/issues/35)) ([220ce2b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/220ce2b)) - - -### BREAKING CHANGES - -* see https://github.com/istanbuljs/test-exclude/blob/master/CHANGELOG.md#breaking-changes - - - - -# [1.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.3...v1.1.0) (2016-07-21) - - -### Bug Fixes - -* upgrade to istanbul-lib-instrument with faster babel-generator ([#18](https://github.com/istanbuljs/babel-plugin-istanbul/issues/18)) ([d33263c](https://github.com/istanbuljs/babel-plugin-istanbul/commit/d33263c)) - - -### Features - -* allow exclude/include options to be passed as Babel plugin config ([#16](https://github.com/istanbuljs/babel-plugin-istanbul/issues/16)) ([cf68421](https://github.com/istanbuljs/babel-plugin-istanbul/commit/cf68421)) - - - - -## [1.0.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.2...v1.0.3) (2016-07-09) - - -### Bug Fixes - -* keep using NYC_CWD if available ([#10](https://github.com/istanbuljs/babel-plugin-istanbul/issues/10)) ([db0352b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/db0352b)) - - - - -## [1.0.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.1...v1.0.2) (2016-07-03) - - -### Bug Fixes - -* take realpath of process.cwd(), fixes [#7](https://github.com/istanbuljs/babel-plugin-istanbul/issues/7) ([#8](https://github.com/istanbuljs/babel-plugin-istanbul/issues/8)) ([e8d3785](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e8d3785)), closes [#7](https://github.com/istanbuljs/babel-plugin-istanbul/issues/7) [#8](https://github.com/istanbuljs/babel-plugin-istanbul/issues/8) - - - - -## [1.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.0...v1.0.1) (2016-06-30) - - -### Bug Fixes - -* upgrade to version of istanbul-lib-instrument that fixes some out of bounds issues ([#6](https://github.com/istanbuljs/babel-plugin-istanbul/issues/6)) ([a949065](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a949065)), closes [#6](https://github.com/istanbuljs/babel-plugin-istanbul/issues/6) - - - -# 1.0.0 (2016-06-26) - - -### Features - -* port functionality from __coverage__, get ready for first release ([#2](https://github.com/istanbuljs/babel-plugin-istanbul/issues/2)) ([2a8ee44](https://github.com/istanbuljs/babel-plugin-istanbul/commit/2a8ee44)) diff --git a/typescript/hello-world/node_modules/babel-plugin-istanbul/LICENSE b/typescript/hello-world/node_modules/babel-plugin-istanbul/LICENSE deleted file mode 100644 index 22f21ab..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-istanbul/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2016, Istanbul Code Coverage -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of babel-plugin-istanbul nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/typescript/hello-world/node_modules/babel-plugin-istanbul/README.md b/typescript/hello-world/node_modules/babel-plugin-istanbul/README.md deleted file mode 100644 index ee9cd92..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-istanbul/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# babel-plugin-istanbul - -[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/babel-plugin-istanbul.svg)](https://greenkeeper.io/) -[![Build Status](https://travis-ci.org/istanbuljs/babel-plugin-istanbul.svg?branch=master)](https://travis-ci.org/istanbuljs/babel-plugin-istanbul) -[![Coverage Status](https://coveralls.io/repos/github/istanbuljs/babel-plugin-istanbul/badge.svg?branch=master)](https://coveralls.io/github/istanbuljs/babel-plugin-istanbul?branch=master) -[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) - -A Babel plugin that instruments your code with Istanbul coverage. -It can instantly be used with [karma-coverage](https://github.com/karma-runner/karma-coverage) and mocha on Node.js (through [nyc](https://github.com/bcoe/nyc)). - -__Note:__ This plugin does not generate any report or save any data to any file; -it only adds instrumenting code to your JavaScript source code. -To integrate with testing tools, please see the [Integrations](#integrations) section. - -## Usage - -Install it: - -``` -npm install --save-dev babel-plugin-istanbul -``` - -Add it to `.babelrc` in test mode: - -```js -{ - "env": { - "test": { - "plugins": [ "istanbul" ] - } - } -} -``` - -Optionally, use [cross-env](https://www.npmjs.com/package/cross-env) to set -`NODE_ENV=test`: - -```json -{ - "scripts": { - "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.js" - } -} -``` - -## Integrations - -### karma - -It _just works_ with Karma. First, make sure that the code is already transpiled by Babel (either using `karma-babel-preprocessor`, `karma-webpack`, or `karma-browserify`). Then, simply set up [karma-coverage](https://github.com/karma-runner/karma-coverage) according to the docs, but __don’t add the `coverage` preprocessor.__ This plugin has already instrumented your code, and Karma should pick it up automatically. - -It has been tested with [bemusic/bemuse](https://codecov.io/github/bemusic/bemuse) project, which contains ~2400 statements. - -### mocha on node.js (through nyc) - -Configure Mocha to transpile JavaScript code using Babel, then you can run your tests with [`nyc`](https://github.com/bcoe/nyc), which will collect all the coverage report. - -babel-plugin-istanbul respects the `include`/`exclude` configuration options from nyc, -but you also need to __configure NYC not to instrument your code__ by adding these settings in your `package.json`: - -```js - "nyc": { - "sourceMap": false, - "instrument": false - }, -``` - -## Ignoring files - -You don't want to cover your test files as this will skew your coverage results. You can configure this by providing plugin options matching nyc's [`exclude`/`include` rules](https://github.com/bcoe/nyc#excluding-files): - -```json -{ - "env": { - "test": { - "plugins": [ - ["istanbul", { - "exclude": [ - "**/*.spec.js" - ] - }] - ] - } - } -} -``` - -If you don't provide options in your Babel config, the plugin will look for `exclude`/`include` config under an `"nyc"` key in `package.json`. - -You can also use [istanbul's ignore hints](https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes) to specify specific lines of code to skip instrumenting. - -## Source Maps - -By default, this plugin will pick up inline source maps and attach them to the instrumented code such that code coverage can be remapped back to the original source, even for multi-step build processes. This can be memory intensive. Set `useInlineSourceMaps` to prevent this behavior. - -```json -{ - "env": { - "test": { - "plugins": [ - ["istanbul", { - "useInlineSourceMaps": false - }] - ] - } - } -} -``` - -If you're instrumenting code programatically, you can pass a source map explicitly. -```js -import babelPluginIstanbul from 'babel-plugin-istanbul'; - -function instrument(sourceCode, sourceMap, fileName) { - return babel.transform(sourceCode, { - filename, - plugins: [ - [babelPluginIstanbul, { - inputSourceMap: sourceMap - }] - ] - }) -} -``` - -## Credit where credit is due - -The approach used in `babel-plugin-istanbul` was inspired by [Thai Pangsakulyanont](https://github.com/dtinth)'s original library [`babel-plugin-__coverage__`](https://github.com/dtinth/babel-plugin-__coverage__). diff --git a/typescript/hello-world/node_modules/babel-plugin-istanbul/package.json b/typescript/hello-world/node_modules/babel-plugin-istanbul/package.json deleted file mode 100644 index 313440a..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-istanbul/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "babel-plugin-istanbul", - "version": "4.1.4", - "author": "Thai Pangsakulyanont @dtinth", - "license": "BSD-3-Clause", - "description": "A babel plugin that adds istanbul instrumentation to ES6 code", - "main": "lib/index.js", - "files": [ - "lib" - ], - "dependencies": { - "find-up": "^2.1.0", - "istanbul-lib-instrument": "^1.7.2", - "test-exclude": "^4.1.1" - }, - "devDependencies": { - "babel-cli": "^6.18.0", - "babel-core": "^6.24.0", - "babel-preset-es2015": "^6.18.0", - "babel-register": "^6.24.0", - "chai": "^3.5.0", - "coveralls": "^2.11.16", - "cross-env": "^3.1.4", - "mocha": "^3.2.0", - "nyc": "^10.0.0", - "pmock": "^0.2.3", - "standard": "^9.0.2", - "standard-version": "^4.0.0" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "release": "babel src --out-dir lib", - "pretest": "standard && npm run release", - "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.js", - "prepublish": "npm test && npm run release", - "version": "standard-version" - }, - "standard": { - "ignore": [ - "fixtures/has-inline-source-map.js" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/istanbuljs/babel-plugin-istanbul.git" - }, - "keywords": [ - "istanbul", - "babel", - "plugin", - "instrumentation" - ], - "nyc": { - "include": [ - "src/*.js", - "fixtures/should-cover.js" - ], - "require": [ - "babel-register" - ], - "sourceMap": false, - "instrument": false - }, - "bugs": { - "url": "https://github.com/istanbuljs/babel-plugin-istanbul/issues" - }, - "homepage": "https://github.com/istanbuljs/babel-plugin-istanbul#readme", - "greenkeeper": { - "ignore": [ - "find-up", - "cross-env" - ] - } -} diff --git a/typescript/hello-world/node_modules/babel-plugin-jest-hoist/.npmignore b/typescript/hello-world/node_modules/babel-plugin-jest-hoist/.npmignore deleted file mode 100644 index c8ab4c8..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-jest-hoist/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -**/__mocks__/** -**/__tests__/** -src -yarn.lock diff --git a/typescript/hello-world/node_modules/babel-plugin-jest-hoist/README.md b/typescript/hello-world/node_modules/babel-plugin-jest-hoist/README.md deleted file mode 100644 index 42b1833..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-jest-hoist/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel-plugin-jest-hoist - -Babel plugin to hoist `jest.disableAutomock`, `jest.enableAutomock`, `jest.unmock`, `jest.mock`, calls above `import` statements. This plugin is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest). - -## Installation - -```sh -$ npm install babel-plugin-jest-hoist -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "plugins": ["jest-hoist"] -} -``` - -### Via CLI - -```sh -$ babel --plugins jest-hoist script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["jest-hoist"] -}); -``` diff --git a/typescript/hello-world/node_modules/babel-plugin-jest-hoist/package.json b/typescript/hello-world/node_modules/babel-plugin-jest-hoist/package.json deleted file mode 100644 index ab8090d..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-jest-hoist/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "babel-plugin-jest-hoist", - "version": "20.0.3", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git" - }, - "license": "BSD-3-Clause", - "main": "build/index.js" -} diff --git a/typescript/hello-world/node_modules/babel-plugin-transform-es2015-modules-commonjs/.npmignore b/typescript/hello-world/node_modules/babel-plugin-transform-es2015-modules-commonjs/.npmignore deleted file mode 100644 index 3185290..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-transform-es2015-modules-commonjs/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -*.log -src -test diff --git a/typescript/hello-world/node_modules/babel-plugin-transform-es2015-modules-commonjs/README.md b/typescript/hello-world/node_modules/babel-plugin-transform-es2015-modules-commonjs/README.md deleted file mode 100644 index 33088cc..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-transform-es2015-modules-commonjs/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# babel-plugin-transform-es2015-modules-commonjs - -> This plugin transforms ES2015 modules to [CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1). - -## Example - -**In** - -```javascript -export default 42; -``` - -**Out** - -```javascript -Object.defineProperty(exports, "__esModule", { - value: true -}); - -exports.default = 42; -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-es2015-modules-commonjs -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```js -// without options -{ - "plugins": ["transform-es2015-modules-commonjs"] -} - -// with options -{ - "plugins": [ - ["transform-es2015-modules-commonjs", { - "allowTopLevelThis": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-es2015-modules-commonjs script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-es2015-modules-commonjs"] -}); -``` - -## Options - -### `loose` - -`boolean`, defaults to `false`. - -As per the spec, `import` and `export` are only allowed to be used at the top -level. When in loose mode these are allowed to be used anywhere. - -And by default, when using exports with babel a non-enumerable `__esModule` property -is exported. - -```javascript -var foo = exports.foo = 5; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -``` - -In environments that don't support this you can enable loose mode on `babel-plugin-transform-es20150-modules-commonjs` -and instead of using `Object.defineProperty` an assignment will be used instead. - -```javascript -var foo = exports.foo = 5; -exports.__esModule = true; -``` - -### `strict` - -`boolean`, defaults to `false` - -By default, when using exports with babel a non-enumerable `__esModule` property -is exported. In some cases this property is used to determine if the import _is_ the -default export or if it _contains_ the default export. - -```javascript -var foo = exports.foo = 5; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -``` - -In order to prevent the `__esModule` property from being exported, you can set -the `strict` option to `true`. - -### `noInterop` - -`boolean`, defaults to `false` - -By default, when using exports with babel a non-enumerable `__esModule` property -is exported. This property is then used to determine if the import _is_ the default -export or if it _contains_ the default export. - -```javascript -"use strict"; - -var _foo = require("foo"); - -var _foo2 = _interopRequireDefault(_foo); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} -``` - -In cases where the auto-unwrapping of `default` is not needed, you can set the -`noInterop` option to `true` to avoid the usage of the `interopRequireDefault` -helper (shown in inline form above). diff --git a/typescript/hello-world/node_modules/babel-plugin-transform-es2015-modules-commonjs/package.json b/typescript/hello-world/node_modules/babel-plugin-transform-es2015-modules-commonjs/package.json deleted file mode 100644 index 6692af6..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-transform-es2015-modules-commonjs/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "babel-plugin-transform-es2015-modules-commonjs", - "version": "6.24.1", - "description": "This plugin transforms ES2015 modules to CommonJS", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-modules-commonjs", - "license": "MIT", - "main": "lib/index.js", - "dependencies": { - "babel-types": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-plugin-transform-strict-mode": "^6.24.1" - }, - "keywords": [ - "babel-plugin" - ], - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - } -} diff --git a/typescript/hello-world/node_modules/babel-plugin-transform-strict-mode/.npmignore b/typescript/hello-world/node_modules/babel-plugin-transform-strict-mode/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-transform-strict-mode/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/typescript/hello-world/node_modules/babel-plugin-transform-strict-mode/README.md b/typescript/hello-world/node_modules/babel-plugin-transform-strict-mode/README.md deleted file mode 100644 index 08c5afe..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-transform-strict-mode/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# babel-plugin-transform-strict-mode - -> This plugin places a `"use strict";` directive at the top of all files to enable [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). - -This plugin may be enabled via `babel-plugin-transform-es2015-modules-commonjs`. -If you wish to disable it you can either turn `strict` off or pass -`strictMode: false` as an option to the commonjs transform. - -## Example - -**In** - -```javascript -foo(); -``` - -**Out** - -```javascript -"use strict"; - -foo(); -``` - -## Installation - -```sh -npm install --save-dev babel-plugin-transform-strict-mode -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -Without options: - -```json -{ - "plugins": ["transform-strict-mode"] -} -``` - -With options: - -```json -{ - "plugins": [ - ["transform-strict-mode", { - "strict": true - }] - ] -} -``` - -### Via CLI - -```sh -babel --plugins transform-strict-mode script.js -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - plugins: ["transform-strict-mode"] -}); -``` diff --git a/typescript/hello-world/node_modules/babel-plugin-transform-strict-mode/package.json b/typescript/hello-world/node_modules/babel-plugin-transform-strict-mode/package.json deleted file mode 100644 index da1f871..0000000 --- a/typescript/hello-world/node_modules/babel-plugin-transform-strict-mode/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "babel-plugin-transform-strict-mode", - "version": "6.24.1", - "description": "This plugin places a 'use strict'; directive at the top of all files to enable strict mode", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-strict-mode", - "license": "MIT", - "main": "lib/index.js", - "keywords": [ - "babel-plugin" - ], - "dependencies": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - }, - "devDependencies": { - "babel-helper-plugin-test-runner": "^6.24.1" - } -} diff --git a/typescript/hello-world/node_modules/babel-preset-jest/.npmignore b/typescript/hello-world/node_modules/babel-preset-jest/.npmignore deleted file mode 100644 index c8ab4c8..0000000 --- a/typescript/hello-world/node_modules/babel-preset-jest/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -**/__mocks__/** -**/__tests__/** -src -yarn.lock diff --git a/typescript/hello-world/node_modules/babel-preset-jest/README.md b/typescript/hello-world/node_modules/babel-preset-jest/README.md deleted file mode 100644 index e43ae30..0000000 --- a/typescript/hello-world/node_modules/babel-preset-jest/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# babel-preset-jest - -> Babel preset for all Jest plugins. This preset is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest). - -## Install - -```sh -$ npm install --save-dev babel-preset-jest -``` - -## Usage - -### Via `.babelrc` (Recommended) - -**.babelrc** - -```json -{ - "presets": ["jest"] -} -``` - -### Via CLI - -```sh -$ babel script.js --presets jest -``` - -### Via Node API - -```javascript -require("babel-core").transform("code", { - presets: ["jest"] -}); -``` diff --git a/typescript/hello-world/node_modules/babel-preset-jest/index.js b/typescript/hello-world/node_modules/babel-preset-jest/index.js deleted file mode 100644 index b86522f..0000000 --- a/typescript/hello-world/node_modules/babel-preset-jest/index.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -module.exports = { - plugins: [ - require('babel-plugin-jest-hoist'), - ], -}; diff --git a/typescript/hello-world/node_modules/babel-preset-jest/package.json b/typescript/hello-world/node_modules/babel-preset-jest/package.json deleted file mode 100644 index dab1207..0000000 --- a/typescript/hello-world/node_modules/babel-preset-jest/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "babel-preset-jest", - "version": "20.0.3", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git" - }, - "license": "BSD-3-Clause", - "main": "index.js", - "dependencies": { - "babel-plugin-jest-hoist": "^20.0.3" - } -} diff --git a/typescript/hello-world/node_modules/babel-register/.npmignore b/typescript/hello-world/node_modules/babel-register/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/typescript/hello-world/node_modules/babel-register/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/typescript/hello-world/node_modules/babel-register/README.md b/typescript/hello-world/node_modules/babel-register/README.md deleted file mode 100644 index 6a4682b..0000000 --- a/typescript/hello-world/node_modules/babel-register/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# babel-register - -> The require hook will bind itself to node's require and automatically compile files on the fly. - -One of the ways you can use Babel is through the require hook. The require hook -will bind itself to node's `require` and automatically compile files on the -fly. This is equivalent to CoffeeScript's -[coffee-script/register](http://coffeescript.org/documentation/docs/register.html). - -## Install - -```sh -npm install babel-register --save-dev -``` - -## Usage - -```js -require("babel-register"); -``` - -All subsequent files required by node with the extensions `.es6`, `.es`, `.jsx` -and `.js` will be transformed by Babel. - -
-

Polyfill not included

-

- You must include the polyfill separately - when using features that require it, like generators. -

-
- -### Ignores `node_modules` by default - -**NOTE:** By default all requires to `node_modules` will be ignored. You can -override this by passing an ignore regex via: - -```js -require("babel-register")({ - // This will override `node_modules` ignoring - you can alternatively pass - // an array of strings to be explicitly matched or a regex / glob - ignore: false -}); -``` - -## Specifying options - -```javascript -require("babel-register")({ - // Optional ignore regex - if any filenames **do** match this regex then they - // aren't compiled. - ignore: /regex/, - - // Ignore can also be specified as a function. - ignore: function(filename) { - if (filename === "/path/to/es6-file.js") { - return false; - } else { - return true; - } - }, - - // Optional only regex - if any filenames **don't** match this regex then they - // aren't compiled - only: /my_es6_folder/, - - // Setting this will remove the currently hooked extensions of .es6, `.es`, `.jsx` - // and .js so you'll have to add them back if you want them to be used again. - extensions: [".es6", ".es", ".jsx", ".js"] -}); -``` - -You can pass in all other [options](https://babeljs.io/docs/usage/api/#options) as well, -including `plugins` and `presets`. But note that the closest [`.babelrc`](https://babeljs.io/docs/usage/babelrc/) -to each file still applies, and takes precedence over any options you pass in here. - -## Environment variables - -By default `babel-node` and `babel-register` will save to a json cache in your -temporary directory. - -This will heavily improve with the startup and compilation of your files. There -are however scenarios where you want to change this behaviour and there are -environment variables exposed to allow you to do this. - -### BABEL_CACHE_PATH - -Specify a different cache location. - -```sh -BABEL_CACHE_PATH=/foo/my-cache.json babel-node script.js -``` - -### BABEL_DISABLE_CACHE - -Disable the cache. - -```sh -BABEL_DISABLE_CACHE=1 babel-node script.js -``` diff --git a/typescript/hello-world/node_modules/babel-register/node_modules/.bin/mkdirp b/typescript/hello-world/node_modules/babel-register/node_modules/.bin/mkdirp deleted file mode 120000 index 91a5f62..0000000 --- a/typescript/hello-world/node_modules/babel-register/node_modules/.bin/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../../../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-register/package.json b/typescript/hello-world/node_modules/babel-register/package.json deleted file mode 100644 index 13db56e..0000000 --- a/typescript/hello-world/node_modules/babel-register/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "babel-register", - "version": "6.24.1", - "description": "babel require hook", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-register", - "author": "Sebastian McKenzie ", - "main": "lib/node.js", - "browser": "lib/browser.js", - "dependencies": { - "babel-core": "^6.24.1", - "babel-runtime": "^6.22.0", - "core-js": "^2.4.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.2.0", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.2" - }, - "devDependencies": { - "decache": "^4.1.0" - } -} diff --git a/typescript/hello-world/node_modules/babel-runtime/.npmignore b/typescript/hello-world/node_modules/babel-runtime/.npmignore deleted file mode 100644 index 3efd5b9..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -scripts -node_modules diff --git a/typescript/hello-world/node_modules/babel-runtime/README.md b/typescript/hello-world/node_modules/babel-runtime/README.md deleted file mode 100644 index 8aa8593..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# babel-runtime - diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js.js b/typescript/hello-world/node_modules/babel-runtime/core-js.js deleted file mode 100644 index 7d56643..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - "default": require("core-js/library"), - __esModule: true -}; diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/concat.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/concat.js deleted file mode 100644 index f0a5ec7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/concat.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/concat"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/copy-within.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/copy-within.js deleted file mode 100644 index e9352ed..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/copy-within.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/copy-within"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/entries.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/entries.js deleted file mode 100644 index ee8b9e9..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/entries.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/entries"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/every.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/every.js deleted file mode 100644 index adc9319..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/every.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/every"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/fill.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/fill.js deleted file mode 100644 index 3cc2fe1..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/fill.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/fill"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/filter.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/filter.js deleted file mode 100644 index f73a5db..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/filter.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/filter"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/find-index.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/find-index.js deleted file mode 100644 index 560caa8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/find-index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/find-index"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/find.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/find.js deleted file mode 100644 index 7763993..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/find.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/find"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/for-each.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/for-each.js deleted file mode 100644 index 4808c96..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/for-each.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/for-each"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/from.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/from.js deleted file mode 100644 index 8c92e81..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/from.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/from"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/includes.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/includes.js deleted file mode 100644 index 602d0d8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/includes.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/includes"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/index-of.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/index-of.js deleted file mode 100644 index eb4a6ac..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/index-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/index-of"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/join.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/join.js deleted file mode 100644 index 7dc300b..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/join.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/join"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/keys.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/keys.js deleted file mode 100644 index 5008ccb..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/keys"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/last-index-of.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/last-index-of.js deleted file mode 100644 index ed92a55..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/last-index-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/last-index-of"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/map.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/map.js deleted file mode 100644 index 0f58810..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/map.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/map"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/of.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/of.js deleted file mode 100644 index d03ab62..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/of"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/pop.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/pop.js deleted file mode 100644 index 9114d2f..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/pop.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/pop"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/push.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/push.js deleted file mode 100644 index 0cd42be..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/push.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/push"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/reduce-right.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/reduce-right.js deleted file mode 100644 index f56176c..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/reduce-right.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/reduce-right"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/reduce.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/reduce.js deleted file mode 100644 index c0a2006..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/reduce.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/reduce"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/reverse.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/reverse.js deleted file mode 100644 index 8892c26..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/reverse.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/reverse"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/shift.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/shift.js deleted file mode 100644 index 49e66cd..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/shift.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/shift"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/slice.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/slice.js deleted file mode 100644 index 5f5fe16..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/slice.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/slice"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/some.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/some.js deleted file mode 100644 index 72ca911..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/some.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/some"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/sort.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/sort.js deleted file mode 100644 index 32dece8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/sort.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/sort"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/splice.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/splice.js deleted file mode 100644 index 6fdebb0..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/splice.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/splice"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/unshift.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/unshift.js deleted file mode 100644 index 3c237a4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/unshift.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/unshift"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/array/values.js b/typescript/hello-world/node_modules/babel-runtime/core-js/array/values.js deleted file mode 100644 index 6cc67aa..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/array/values.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/array/values"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/asap.js b/typescript/hello-world/node_modules/babel-runtime/core-js/asap.js deleted file mode 100644 index a59e4d0..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/asap.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/asap"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/clear-immediate.js b/typescript/hello-world/node_modules/babel-runtime/core-js/clear-immediate.js deleted file mode 100644 index f2090b7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/clear-immediate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/clear-immediate"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/error/is-error.js b/typescript/hello-world/node_modules/babel-runtime/core-js/error/is-error.js deleted file mode 100644 index 2637546..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/error/is-error.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/error/is-error"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/get-iterator.js b/typescript/hello-world/node_modules/babel-runtime/core-js/get-iterator.js deleted file mode 100644 index 8f9943a..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/get-iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/get-iterator"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/is-iterable.js b/typescript/hello-world/node_modules/babel-runtime/core-js/is-iterable.js deleted file mode 100644 index d690ac8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/is-iterable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/is-iterable"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/json/stringify.js b/typescript/hello-world/node_modules/babel-runtime/core-js/json/stringify.js deleted file mode 100644 index f09e2f9..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/json/stringify.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/json/stringify"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/map.js b/typescript/hello-world/node_modules/babel-runtime/core-js/map.js deleted file mode 100644 index ed02186..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/map.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/map"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/acosh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/acosh.js deleted file mode 100644 index 37e2202..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/acosh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/acosh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/asinh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/asinh.js deleted file mode 100644 index b5147b3..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/asinh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/asinh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/atanh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/atanh.js deleted file mode 100644 index ad09bb7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/atanh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/atanh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/cbrt.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/cbrt.js deleted file mode 100644 index 24a6974..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/cbrt.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/cbrt"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/clz32.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/clz32.js deleted file mode 100644 index d2218b4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/clz32.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/clz32"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/cosh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/cosh.js deleted file mode 100644 index fa9d079..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/cosh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/cosh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/expm1.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/expm1.js deleted file mode 100644 index 860921e..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/expm1.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/expm1"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/fround.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/fround.js deleted file mode 100644 index b62e43a..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/fround.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/fround"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/hypot.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/hypot.js deleted file mode 100644 index b07335b..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/hypot.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/hypot"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/iaddh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/iaddh.js deleted file mode 100644 index 016eb07..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/iaddh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/iaddh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/imul.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/imul.js deleted file mode 100644 index 3bf89e8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/imul.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/imul"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/imulh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/imulh.js deleted file mode 100644 index 3fc7d74..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/imulh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/imulh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/isubh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/isubh.js deleted file mode 100644 index 6b6ea4f..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/isubh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/isubh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/log10.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/log10.js deleted file mode 100644 index f384512..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/log10.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/log10"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/log1p.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/log1p.js deleted file mode 100644 index 358fc45..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/log1p.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/log1p"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/log2.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/log2.js deleted file mode 100644 index 1cbca00..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/log2.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/log2"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/sign.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/sign.js deleted file mode 100644 index 8d0cfa3..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/sign.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/sign"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/sinh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/sinh.js deleted file mode 100644 index 81afadd..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/sinh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/sinh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/tanh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/tanh.js deleted file mode 100644 index 76fad88..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/tanh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/tanh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/trunc.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/trunc.js deleted file mode 100644 index 443a958..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/trunc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/trunc"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/math/umulh.js b/typescript/hello-world/node_modules/babel-runtime/core-js/math/umulh.js deleted file mode 100644 index 357f389..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/math/umulh.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/math/umulh"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/number/epsilon.js b/typescript/hello-world/node_modules/babel-runtime/core-js/number/epsilon.js deleted file mode 100644 index b5c7862..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/number/epsilon.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/epsilon"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-finite.js b/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-finite.js deleted file mode 100644 index 7366242..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-finite.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/is-finite"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-integer.js b/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-integer.js deleted file mode 100644 index 69b9bb7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-integer.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/is-integer"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-nan.js b/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-nan.js deleted file mode 100644 index 5402a71..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-nan.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/is-nan"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-safe-integer.js b/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-safe-integer.js deleted file mode 100644 index 2d72dd4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/number/is-safe-integer.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/is-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/number/max-safe-integer.js b/typescript/hello-world/node_modules/babel-runtime/core-js/number/max-safe-integer.js deleted file mode 100644 index 9b55c84..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/number/max-safe-integer.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/max-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/number/min-safe-integer.js b/typescript/hello-world/node_modules/babel-runtime/core-js/number/min-safe-integer.js deleted file mode 100644 index b5e9785..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/number/min-safe-integer.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/min-safe-integer"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/number/parse-float.js b/typescript/hello-world/node_modules/babel-runtime/core-js/number/parse-float.js deleted file mode 100644 index 0e0f0bc..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/number/parse-float.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/parse-float"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/number/parse-int.js b/typescript/hello-world/node_modules/babel-runtime/core-js/number/parse-int.js deleted file mode 100644 index 6d454ea..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/number/parse-int.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/number/parse-int"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/assign.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/assign.js deleted file mode 100644 index ca48f0c..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/assign.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/assign"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/create.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/create.js deleted file mode 100644 index 130165c..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/create.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/create"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/define-properties.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/define-properties.js deleted file mode 100644 index d39e153..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/define-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/define-properties"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/define-property.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/define-property.js deleted file mode 100644 index f41735b..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/define-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/define-property"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/entries.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/entries.js deleted file mode 100644 index 32ed7a5..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/entries.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/entries"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/freeze.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/freeze.js deleted file mode 100644 index 8cc278b..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/freeze.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/freeze"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js deleted file mode 100644 index 8e9296e..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-own-property-descriptor"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js deleted file mode 100644 index 23200d2..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-descriptors.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-own-property-descriptors"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-names.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-names.js deleted file mode 100644 index 7b95445..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-names.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-own-property-names"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js deleted file mode 100644 index c2fc78f..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-own-property-symbols.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-own-property-symbols"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-prototype-of.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-prototype-of.js deleted file mode 100644 index 47d3f72..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/get-prototype-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/get-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/is-extensible.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/is-extensible.js deleted file mode 100644 index 51175ad..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/is-extensible.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/is-extensible"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/is-frozen.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/is-frozen.js deleted file mode 100644 index e8ab5f1..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/is-frozen.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/is-frozen"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/is-sealed.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/is-sealed.js deleted file mode 100644 index 77beda4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/is-sealed.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/is-sealed"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/is.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/is.js deleted file mode 100644 index 6524704..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/is.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/is"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/keys.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/keys.js deleted file mode 100644 index 04a3f01..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/keys"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/prevent-extensions.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/prevent-extensions.js deleted file mode 100644 index 3d4305f..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/prevent-extensions.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/prevent-extensions"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/seal.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/seal.js deleted file mode 100644 index c969cab..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/seal.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/seal"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/set-prototype-of.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/set-prototype-of.js deleted file mode 100644 index 63b1435..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/set-prototype-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/set-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/object/values.js b/typescript/hello-world/node_modules/babel-runtime/core-js/object/values.js deleted file mode 100644 index c587097..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/object/values.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/object/values"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/observable.js b/typescript/hello-world/node_modules/babel-runtime/core-js/observable.js deleted file mode 100644 index 04ca51e..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/observable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/observable"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/promise.js b/typescript/hello-world/node_modules/babel-runtime/core-js/promise.js deleted file mode 100644 index 0cb9a23..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/promise.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/promise"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/apply.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/apply.js deleted file mode 100644 index cc578d4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/apply.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/apply"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/construct.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/construct.js deleted file mode 100644 index a2d991a..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/construct.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/construct"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/define-metadata.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/define-metadata.js deleted file mode 100644 index 1ba7d4a..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/define-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/define-metadata"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/define-property.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/define-property.js deleted file mode 100644 index aee1c3a..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/define-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/define-property"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/delete-metadata.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/delete-metadata.js deleted file mode 100644 index 3396c42..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/delete-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/delete-metadata"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/delete-property.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/delete-property.js deleted file mode 100644 index efa76ab..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/delete-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/delete-property"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/enumerate.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/enumerate.js deleted file mode 100644 index 041484b..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/enumerate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/enumerate"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js deleted file mode 100644 index 722e099..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-metadata-keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-metadata-keys"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-metadata.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-metadata.js deleted file mode 100644 index d725525..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-metadata"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js deleted file mode 100644 index feff3a6..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-own-metadata-keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-own-metadata-keys"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js deleted file mode 100644 index 1f8bd56..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-own-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-own-metadata"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js deleted file mode 100644 index 67a50f5..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-own-property-descriptor.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-own-property-descriptor"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js deleted file mode 100644 index d3c8d4e..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get-prototype-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get.js deleted file mode 100644 index a42e4fb..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/get.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/get"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/has-metadata.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/has-metadata.js deleted file mode 100644 index c1051a3..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/has-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/has-metadata"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js deleted file mode 100644 index 1cefbf7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/has-own-metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/has-own-metadata"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/has.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/has.js deleted file mode 100644 index e2a9665..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/has.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/has"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/is-extensible.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/is-extensible.js deleted file mode 100644 index b0de7bf..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/is-extensible.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/is-extensible"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/metadata.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/metadata.js deleted file mode 100644 index cb85fde..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/metadata.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/metadata"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/own-keys.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/own-keys.js deleted file mode 100644 index d98fed2..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/own-keys.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/own-keys"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js deleted file mode 100644 index 5408d89..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/prevent-extensions.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/prevent-extensions"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js deleted file mode 100644 index 5433e2e..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/set-prototype-of.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/set-prototype-of"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/set.js b/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/set.js deleted file mode 100644 index 657bddc..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/reflect/set.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/reflect/set"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/regexp/escape.js b/typescript/hello-world/node_modules/babel-runtime/core-js/regexp/escape.js deleted file mode 100644 index 12a25c3..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/regexp/escape.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/regexp/escape"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/set-immediate.js b/typescript/hello-world/node_modules/babel-runtime/core-js/set-immediate.js deleted file mode 100644 index fc42eb4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/set-immediate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/set-immediate"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/set.js b/typescript/hello-world/node_modules/babel-runtime/core-js/set.js deleted file mode 100644 index 22c14d4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/set.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/set"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/at.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/at.js deleted file mode 100644 index 1c4b595..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/at.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/at"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/code-point-at.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/code-point-at.js deleted file mode 100644 index 4332bdb..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/code-point-at.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/code-point-at"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/ends-with.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/ends-with.js deleted file mode 100644 index ad3b55a..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/ends-with.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/ends-with"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/from-code-point.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/from-code-point.js deleted file mode 100644 index 8c10782..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/from-code-point.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/from-code-point"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/includes.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/includes.js deleted file mode 100644 index f7de270..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/includes.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/includes"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/match-all.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/match-all.js deleted file mode 100644 index 813855c..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/match-all.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/match-all"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-end.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-end.js deleted file mode 100644 index 5ff9814..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-end.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/pad-end"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-left.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-left.js deleted file mode 100644 index ee67e70..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-left.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/pad-start"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-right.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-right.js deleted file mode 100644 index 5ff9814..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-right.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/pad-end"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-start.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-start.js deleted file mode 100644 index ee67e70..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/pad-start.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/pad-start"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/raw.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/raw.js deleted file mode 100644 index 05c92dc..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/raw.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/raw"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/repeat.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/repeat.js deleted file mode 100644 index 816ef2e..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/repeat.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/repeat"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/starts-with.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/starts-with.js deleted file mode 100644 index 5d74716..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/starts-with.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/starts-with"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-end.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-end.js deleted file mode 100644 index 7c426f5..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-end.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim-end"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-left.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-left.js deleted file mode 100644 index b8a7e1e..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-left.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim-left"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-right.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-right.js deleted file mode 100644 index ba3ca74..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-right.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim-right"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-start.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-start.js deleted file mode 100644 index f1f035a..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim-start.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim-start"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim.js b/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim.js deleted file mode 100644 index 7d51cf0..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/string/trim.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/string/trim"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol.js deleted file mode 100644 index 9aa95a0..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/async-iterator.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/async-iterator.js deleted file mode 100644 index 9dd3a57..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/async-iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/async-iterator"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/for.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/for.js deleted file mode 100644 index de7424f..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/for.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/for"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/has-instance.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/has-instance.js deleted file mode 100644 index f771180..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/has-instance.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/has-instance"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js deleted file mode 100644 index 0bc7f03..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/is-concat-spreadable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/is-concat-spreadable"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/iterator.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/iterator.js deleted file mode 100644 index 3f9a0fb..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/iterator"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/key-for.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/key-for.js deleted file mode 100644 index 15a6cfb..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/key-for.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/key-for"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/match.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/match.js deleted file mode 100644 index ed64810..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/match.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/match"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/observable.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/observable.js deleted file mode 100644 index 876f9c0..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/observable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/observable"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/replace.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/replace.js deleted file mode 100644 index 35f900b..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/replace.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/replace"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/search.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/search.js deleted file mode 100644 index 4b81d31..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/search.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/search"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/species.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/species.js deleted file mode 100644 index 4481321..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/species.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/species"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/split.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/split.js deleted file mode 100644 index 1f5795c..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/split.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/split"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/to-primitive.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/to-primitive.js deleted file mode 100644 index b7f9e04..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/to-primitive.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/to-primitive"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/to-string-tag.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/to-string-tag.js deleted file mode 100644 index d9e4e4d..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/to-string-tag.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/to-string-tag"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/unscopables.js b/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/unscopables.js deleted file mode 100644 index cd3dac0..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/symbol/unscopables.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/symbol/unscopables"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/system/global.js b/typescript/hello-world/node_modules/babel-runtime/core-js/system/global.js deleted file mode 100644 index c442f17..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/system/global.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/system/global"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/weak-map.js b/typescript/hello-world/node_modules/babel-runtime/core-js/weak-map.js deleted file mode 100644 index de130d4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/weak-map.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/weak-map"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/core-js/weak-set.js b/typescript/hello-world/node_modules/babel-runtime/core-js/weak-set.js deleted file mode 100644 index b96cb97..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/core-js/weak-set.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = { "default": require("core-js/library/fn/weak-set"), __esModule: true }; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_async-generator-delegate.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_async-generator-delegate.js deleted file mode 100644 index c1debb4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_async-generator-delegate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncGeneratorDelegate.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_async-generator.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_async-generator.js deleted file mode 100644 index ee87351..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_async-generator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncGenerator.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_async-iterator.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_async-iterator.js deleted file mode 100644 index c014bbb..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_async-iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncIterator.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_async-to-generator.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_async-to-generator.js deleted file mode 100644 index 5f81e90..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_async-to-generator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncToGenerator.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_class-call-check.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_class-call-check.js deleted file mode 100644 index d4514f0..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_class-call-check.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./classCallCheck.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_create-class.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_create-class.js deleted file mode 100644 index 2699d23..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_create-class.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./createClass.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_defaults.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_defaults.js deleted file mode 100644 index a4274f5..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_defaults.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defaults.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_define-enumerable-properties.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_define-enumerable-properties.js deleted file mode 100644 index c60bbfc..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_define-enumerable-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defineEnumerableProperties.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_define-property.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_define-property.js deleted file mode 100644 index a265eab..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_define-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defineProperty.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_extends.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_extends.js deleted file mode 100644 index 2ecdb0e..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_extends.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./extends.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_get.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_get.js deleted file mode 100644 index 39aa387..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_get.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./get.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_inherits.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_inherits.js deleted file mode 100644 index 29deff3..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_inherits.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./inherits.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_instanceof.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_instanceof.js deleted file mode 100644 index 4c61213..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_instanceof.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./instanceof.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_interop-require-default.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_interop-require-default.js deleted file mode 100644 index 10edad2..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_interop-require-default.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./interopRequireDefault.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_interop-require-wildcard.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_interop-require-wildcard.js deleted file mode 100644 index ae19e01..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_interop-require-wildcard.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./interopRequireWildcard.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_jsx.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_jsx.js deleted file mode 100644 index f21ab91..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_jsx.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./jsx.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_new-arrow-check.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_new-arrow-check.js deleted file mode 100644 index 6325419..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_new-arrow-check.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./newArrowCheck.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_object-destructuring-empty.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_object-destructuring-empty.js deleted file mode 100644 index 9c6ffef..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_object-destructuring-empty.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./objectDestructuringEmpty.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_object-without-properties.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_object-without-properties.js deleted file mode 100644 index 052b207..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_object-without-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./objectWithoutProperties.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_possible-constructor-return.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_possible-constructor-return.js deleted file mode 100644 index 09018d7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_possible-constructor-return.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./possibleConstructorReturn.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_self-global.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_self-global.js deleted file mode 100644 index c3d45f3..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_self-global.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./selfGlobal.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_set.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_set.js deleted file mode 100644 index e4dd5ea..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_set.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./set.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js deleted file mode 100644 index 8bb56d3..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_sliced-to-array-loose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./slicedToArrayLoose.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_sliced-to-array.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_sliced-to-array.js deleted file mode 100644 index 28d7fd8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_sliced-to-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./slicedToArray.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js deleted file mode 100644 index 8ffa3f7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_tagged-template-literal-loose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./taggedTemplateLiteralLoose.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_tagged-template-literal.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_tagged-template-literal.js deleted file mode 100644 index 160a917..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_tagged-template-literal.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./taggedTemplateLiteral.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_temporal-ref.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_temporal-ref.js deleted file mode 100644 index cf2e4e4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_temporal-ref.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./temporalRef.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_temporal-undefined.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_temporal-undefined.js deleted file mode 100644 index 234fc33..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_temporal-undefined.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./temporalUndefined.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_to-array.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_to-array.js deleted file mode 100644 index d89ee39..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_to-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./toArray.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_to-consumable-array.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_to-consumable-array.js deleted file mode 100644 index 0aad718..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_to-consumable-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./toConsumableArray.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/_typeof.js b/typescript/hello-world/node_modules/babel-runtime/helpers/_typeof.js deleted file mode 100644 index 14fd11c..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/_typeof.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./typeof.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/async-generator-delegate.js b/typescript/hello-world/node_modules/babel-runtime/helpers/async-generator-delegate.js deleted file mode 100644 index c1debb4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/async-generator-delegate.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncGeneratorDelegate.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/async-generator.js b/typescript/hello-world/node_modules/babel-runtime/helpers/async-generator.js deleted file mode 100644 index ee87351..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/async-generator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncGenerator.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/async-iterator.js b/typescript/hello-world/node_modules/babel-runtime/helpers/async-iterator.js deleted file mode 100644 index c014bbb..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/async-iterator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncIterator.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/async-to-generator.js b/typescript/hello-world/node_modules/babel-runtime/helpers/async-to-generator.js deleted file mode 100644 index 5f81e90..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/async-to-generator.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./asyncToGenerator.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/asyncGenerator.js b/typescript/hello-world/node_modules/babel-runtime/helpers/asyncGenerator.js deleted file mode 100644 index ebbea09..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/asyncGenerator.js +++ /dev/null @@ -1,126 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _promise = require("../core-js/promise"); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function () { - function AwaitValue(value) { - this.value = value; - } - - function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new _promise2.default(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - - if (value instanceof AwaitValue) { - _promise2.default.resolve(value.value).then(function (arg) { - resume("next", arg); - }, function (arg) { - resume("throw", arg); - }); - } else { - settle(result.done ? "return" : "normal", result.value); - } - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof _symbol2.default === "function" && _symbol2.default.asyncIterator) { - AsyncGenerator.prototype[_symbol2.default.asyncIterator] = function () { - return this; - }; - } - - AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); - }; - - AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); - }; - - AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); - }; - - return { - wrap: function wrap(fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - }, - await: function await(value) { - return new AwaitValue(value); - } - }; -}(); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js b/typescript/hello-world/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js deleted file mode 100644 index 5fcc123..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/asyncGeneratorDelegate.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _iterator = require("../core-js/symbol/iterator"); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _promise = require("../core-js/promise"); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (inner, awaitWrap) { - var iter = {}, - waiting = false; - - function pump(key, value) { - waiting = true; - value = new _promise2.default(function (resolve) { - resolve(inner[key](value)); - }); - return { - done: false, - value: awaitWrap(value) - }; - } - - ; - - if (typeof _symbol2.default === "function" && _iterator2.default) { - iter[_iterator2.default] = function () { - return this; - }; - } - - iter.next = function (value) { - if (waiting) { - waiting = false; - return value; - } - - return pump("next", value); - }; - - if (typeof inner.throw === "function") { - iter.throw = function (value) { - if (waiting) { - waiting = false; - throw value; - } - - return pump("throw", value); - }; - } - - if (typeof inner.return === "function") { - iter.return = function (value) { - return pump("return", value); - }; - } - - return iter; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/asyncIterator.js b/typescript/hello-world/node_modules/babel-runtime/helpers/asyncIterator.js deleted file mode 100644 index b542b6c..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/asyncIterator.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("../core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _iterator = require("../core-js/symbol/iterator"); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (iterable) { - if (typeof _symbol2.default === "function") { - if (_symbol2.default.asyncIterator) { - var method = iterable[_symbol2.default.asyncIterator]; - if (method != null) return method.call(iterable); - } - - if (_iterator2.default) { - return (0, _getIterator3.default)(iterable); - } - } - - throw new TypeError("Object is not async iterable"); -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/asyncToGenerator.js b/typescript/hello-world/node_modules/babel-runtime/helpers/asyncToGenerator.js deleted file mode 100644 index 50be669..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/asyncToGenerator.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _promise = require("../core-js/promise"); - -var _promise2 = _interopRequireDefault(_promise); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (fn) { - return function () { - var gen = fn.apply(this, arguments); - return new _promise2.default(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return _promise2.default.resolve(value).then(function (value) { - step("next", value); - }, function (err) { - step("throw", err); - }); - } - } - - return step("next"); - }); - }; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/class-call-check.js b/typescript/hello-world/node_modules/babel-runtime/helpers/class-call-check.js deleted file mode 100644 index d4514f0..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/class-call-check.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./classCallCheck.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/classCallCheck.js b/typescript/hello-world/node_modules/babel-runtime/helpers/classCallCheck.js deleted file mode 100644 index 63d6d8f..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/classCallCheck.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/create-class.js b/typescript/hello-world/node_modules/babel-runtime/helpers/create-class.js deleted file mode 100644 index 2699d23..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/create-class.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./createClass.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/createClass.js b/typescript/hello-world/node_modules/babel-runtime/helpers/createClass.js deleted file mode 100644 index bee484d..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/createClass.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperty = require("../core-js/object/define-property"); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - (0, _defineProperty2.default)(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; -}(); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/defaults.js b/typescript/hello-world/node_modules/babel-runtime/helpers/defaults.js deleted file mode 100644 index 9a721ce..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/defaults.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperty = require("../core-js/object/define-property"); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); - -var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); - -var _getOwnPropertyNames = require("../core-js/object/get-own-property-names"); - -var _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (obj, defaults) { - var keys = (0, _getOwnPropertyNames2.default)(defaults); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = (0, _getOwnPropertyDescriptor2.default)(defaults, key); - - if (value && value.configurable && obj[key] === undefined) { - (0, _defineProperty2.default)(obj, key, value); - } - } - - return obj; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/define-enumerable-properties.js b/typescript/hello-world/node_modules/babel-runtime/helpers/define-enumerable-properties.js deleted file mode 100644 index c60bbfc..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/define-enumerable-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defineEnumerableProperties.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/define-property.js b/typescript/hello-world/node_modules/babel-runtime/helpers/define-property.js deleted file mode 100644 index a265eab..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/define-property.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./defineProperty.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/defineEnumerableProperties.js b/typescript/hello-world/node_modules/babel-runtime/helpers/defineEnumerableProperties.js deleted file mode 100644 index 503a1ab..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/defineEnumerableProperties.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperty = require("../core-js/object/define-property"); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (obj, descs) { - for (var key in descs) { - var desc = descs[key]; - desc.configurable = desc.enumerable = true; - if ("value" in desc) desc.writable = true; - (0, _defineProperty2.default)(obj, key, desc); - } - - return obj; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/defineProperty.js b/typescript/hello-world/node_modules/babel-runtime/helpers/defineProperty.js deleted file mode 100644 index b0f46d8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/defineProperty.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperty = require("../core-js/object/define-property"); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (obj, key, value) { - if (key in obj) { - (0, _defineProperty2.default)(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/extends.js b/typescript/hello-world/node_modules/babel-runtime/helpers/extends.js deleted file mode 100644 index 976aef1..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/extends.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _assign = require("../core-js/object/assign"); - -var _assign2 = _interopRequireDefault(_assign); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = _assign2.default || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/get.js b/typescript/hello-world/node_modules/babel-runtime/helpers/get.js deleted file mode 100644 index 38b79b7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/get.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getPrototypeOf = require("../core-js/object/get-prototype-of"); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); - -var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function get(object, property, receiver) { - if (object === null) object = Function.prototype; - var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); - - if (desc === undefined) { - var parent = (0, _getPrototypeOf2.default)(object); - - if (parent === null) { - return undefined; - } else { - return get(parent, property, receiver); - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - - if (getter === undefined) { - return undefined; - } - - return getter.call(receiver); - } -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/inherits.js b/typescript/hello-world/node_modules/babel-runtime/helpers/inherits.js deleted file mode 100644 index ae8a92d..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/inherits.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _setPrototypeOf = require("../core-js/object/set-prototype-of"); - -var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); - -var _create = require("../core-js/object/create"); - -var _create2 = _interopRequireDefault(_create); - -var _typeof2 = require("../helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); - } - - subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/instanceof.js b/typescript/hello-world/node_modules/babel-runtime/helpers/instanceof.js deleted file mode 100644 index f2d90ec..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/instanceof.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _hasInstance = require("../core-js/symbol/has-instance"); - -var _hasInstance2 = _interopRequireDefault(_hasInstance); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (left, right) { - if (right != null && typeof _symbol2.default !== "undefined" && right[_hasInstance2.default]) { - return right[_hasInstance2.default](left); - } else { - return left instanceof right; - } -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/interop-require-default.js b/typescript/hello-world/node_modules/babel-runtime/helpers/interop-require-default.js deleted file mode 100644 index 10edad2..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/interop-require-default.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./interopRequireDefault.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/interop-require-wildcard.js b/typescript/hello-world/node_modules/babel-runtime/helpers/interop-require-wildcard.js deleted file mode 100644 index ae19e01..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/interop-require-wildcard.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./interopRequireWildcard.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/interopRequireDefault.js b/typescript/hello-world/node_modules/babel-runtime/helpers/interopRequireDefault.js deleted file mode 100644 index df808f6..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/interopRequireDefault.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/interopRequireWildcard.js b/typescript/hello-world/node_modules/babel-runtime/helpers/interopRequireWildcard.js deleted file mode 100644 index d95b6ac..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/interopRequireWildcard.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; - } - } - - newObj.default = obj; - return newObj; - } -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/jsx.js b/typescript/hello-world/node_modules/babel-runtime/helpers/jsx.js deleted file mode 100644 index b2164d0..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/jsx.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _for = require("../core-js/symbol/for"); - -var _for2 = _interopRequireDefault(_for); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function () { - var REACT_ELEMENT_TYPE = typeof _symbol2.default === "function" && _for2.default && (0, _for2.default)("react.element") || 0xeac7; - return function createRawReactElement(type, props, key, children) { - var defaultProps = type && type.defaultProps; - var childrenLength = arguments.length - 3; - - if (!props && childrenLength !== 0) { - props = {}; - } - - if (props && defaultProps) { - for (var propName in defaultProps) { - if (props[propName] === void 0) { - props[propName] = defaultProps[propName]; - } - } - } else if (!props) { - props = defaultProps || {}; - } - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 3]; - } - - props.children = childArray; - } - - return { - $$typeof: REACT_ELEMENT_TYPE, - type: type, - key: key === undefined ? null : '' + key, - ref: null, - props: props, - _owner: null - }; - }; -}(); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/new-arrow-check.js b/typescript/hello-world/node_modules/babel-runtime/helpers/new-arrow-check.js deleted file mode 100644 index 6325419..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/new-arrow-check.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./newArrowCheck.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/newArrowCheck.js b/typescript/hello-world/node_modules/babel-runtime/helpers/newArrowCheck.js deleted file mode 100644 index c15ee5c..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/newArrowCheck.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (innerThis, boundThis) { - if (innerThis !== boundThis) { - throw new TypeError("Cannot instantiate an arrow function"); - } -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/object-destructuring-empty.js b/typescript/hello-world/node_modules/babel-runtime/helpers/object-destructuring-empty.js deleted file mode 100644 index 9c6ffef..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/object-destructuring-empty.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./objectDestructuringEmpty.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/object-without-properties.js b/typescript/hello-world/node_modules/babel-runtime/helpers/object-without-properties.js deleted file mode 100644 index 052b207..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/object-without-properties.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./objectWithoutProperties.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js b/typescript/hello-world/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js deleted file mode 100644 index e2651c1..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/objectDestructuringEmpty.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (obj) { - if (obj == null) throw new TypeError("Cannot destructure undefined"); -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/objectWithoutProperties.js b/typescript/hello-world/node_modules/babel-runtime/helpers/objectWithoutProperties.js deleted file mode 100644 index e9f07e6..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/objectWithoutProperties.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (obj, keys) { - var target = {}; - - for (var i in obj) { - if (keys.indexOf(i) >= 0) continue; - if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; - target[i] = obj[i]; - } - - return target; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/possible-constructor-return.js b/typescript/hello-world/node_modules/babel-runtime/helpers/possible-constructor-return.js deleted file mode 100644 index 09018d7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/possible-constructor-return.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./possibleConstructorReturn.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/possibleConstructorReturn.js b/typescript/hello-world/node_modules/babel-runtime/helpers/possibleConstructorReturn.js deleted file mode 100644 index 957f425..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/possibleConstructorReturn.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _typeof2 = require("../helpers/typeof"); - -var _typeof3 = _interopRequireDefault(_typeof2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/self-global.js b/typescript/hello-world/node_modules/babel-runtime/helpers/self-global.js deleted file mode 100644 index c3d45f3..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/self-global.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./selfGlobal.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/selfGlobal.js b/typescript/hello-world/node_modules/babel-runtime/helpers/selfGlobal.js deleted file mode 100644 index 378beb8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/selfGlobal.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = typeof global === "undefined" ? self : global; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/set.js b/typescript/hello-world/node_modules/babel-runtime/helpers/set.js deleted file mode 100644 index 8780efb..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/set.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getPrototypeOf = require("../core-js/object/get-prototype-of"); - -var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); - -var _getOwnPropertyDescriptor = require("../core-js/object/get-own-property-descriptor"); - -var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function set(object, property, value, receiver) { - var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); - - if (desc === undefined) { - var parent = (0, _getPrototypeOf2.default)(object); - - if (parent !== null) { - set(parent, property, value, receiver); - } - } else if ("value" in desc && desc.writable) { - desc.value = value; - } else { - var setter = desc.set; - - if (setter !== undefined) { - setter.call(receiver, value); - } - } - - return value; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/sliced-to-array-loose.js b/typescript/hello-world/node_modules/babel-runtime/helpers/sliced-to-array-loose.js deleted file mode 100644 index 8bb56d3..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/sliced-to-array-loose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./slicedToArrayLoose.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/sliced-to-array.js b/typescript/hello-world/node_modules/babel-runtime/helpers/sliced-to-array.js deleted file mode 100644 index 28d7fd8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/sliced-to-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./slicedToArray.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/slicedToArray.js b/typescript/hello-world/node_modules/babel-runtime/helpers/slicedToArray.js deleted file mode 100644 index de11512..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/slicedToArray.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _isIterable2 = require("../core-js/is-iterable"); - -var _isIterable3 = _interopRequireDefault(_isIterable2); - -var _getIterator2 = require("../core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if ((0, _isIterable3.default)(Object(arr))) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/slicedToArrayLoose.js b/typescript/hello-world/node_modules/babel-runtime/helpers/slicedToArrayLoose.js deleted file mode 100644 index 012bbd8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/slicedToArrayLoose.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _getIterator2 = require("../core-js/get-iterator"); - -var _getIterator3 = _interopRequireDefault(_getIterator2); - -var _isIterable2 = require("../core-js/is-iterable"); - -var _isIterable3 = _interopRequireDefault(_isIterable2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if ((0, _isIterable3.default)(Object(arr))) { - var _arr = []; - - for (var _iterator = (0, _getIterator3.default)(arr), _step; !(_step = _iterator.next()).done;) { - _arr.push(_step.value); - - if (i && _arr.length === i) break; - } - - return _arr; - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js b/typescript/hello-world/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js deleted file mode 100644 index 8ffa3f7..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/tagged-template-literal-loose.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./taggedTemplateLiteralLoose.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/tagged-template-literal.js b/typescript/hello-world/node_modules/babel-runtime/helpers/tagged-template-literal.js deleted file mode 100644 index 160a917..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/tagged-template-literal.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./taggedTemplateLiteral.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js b/typescript/hello-world/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js deleted file mode 100644 index 060dcf9..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/taggedTemplateLiteral.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _defineProperties = require("../core-js/object/define-properties"); - -var _defineProperties2 = _interopRequireDefault(_defineProperties); - -var _freeze = require("../core-js/object/freeze"); - -var _freeze2 = _interopRequireDefault(_freeze); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (strings, raw) { - return (0, _freeze2.default)((0, _defineProperties2.default)(strings, { - raw: { - value: (0, _freeze2.default)(raw) - } - })); -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js b/typescript/hello-world/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js deleted file mode 100644 index 76c4930..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/taggedTemplateLiteralLoose.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (strings, raw) { - strings.raw = raw; - return strings; -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/temporal-ref.js b/typescript/hello-world/node_modules/babel-runtime/helpers/temporal-ref.js deleted file mode 100644 index cf2e4e4..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/temporal-ref.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./temporalRef.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/temporal-undefined.js b/typescript/hello-world/node_modules/babel-runtime/helpers/temporal-undefined.js deleted file mode 100644 index 234fc33..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/temporal-undefined.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./temporalUndefined.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/temporalRef.js b/typescript/hello-world/node_modules/babel-runtime/helpers/temporalRef.js deleted file mode 100644 index 49b8b24..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/temporalRef.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -exports.default = function (val, name, undef) { - if (val === undef) { - throw new ReferenceError(name + " is not defined - temporal dead zone"); - } else { - return val; - } -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/temporalUndefined.js b/typescript/hello-world/node_modules/babel-runtime/helpers/temporalUndefined.js deleted file mode 100644 index 4066de1..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/temporalUndefined.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; - -exports.__esModule = true; -exports.default = {}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/to-array.js b/typescript/hello-world/node_modules/babel-runtime/helpers/to-array.js deleted file mode 100644 index d89ee39..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/to-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./toArray.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/to-consumable-array.js b/typescript/hello-world/node_modules/babel-runtime/helpers/to-consumable-array.js deleted file mode 100644 index 0aad718..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/to-consumable-array.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./toConsumableArray.js"); \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/toArray.js b/typescript/hello-world/node_modules/babel-runtime/helpers/toArray.js deleted file mode 100644 index 8601a44..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/toArray.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _from = require("../core-js/array/from"); - -var _from2 = _interopRequireDefault(_from); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (arr) { - return Array.isArray(arr) ? arr : (0, _from2.default)(arr); -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/toConsumableArray.js b/typescript/hello-world/node_modules/babel-runtime/helpers/toConsumableArray.js deleted file mode 100644 index c4e34f5..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/toConsumableArray.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _from = require("../core-js/array/from"); - -var _from2 = _interopRequireDefault(_from); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } - - return arr2; - } else { - return (0, _from2.default)(arr); - } -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/helpers/typeof.js b/typescript/hello-world/node_modules/babel-runtime/helpers/typeof.js deleted file mode 100644 index d22add8..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/helpers/typeof.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -exports.__esModule = true; - -var _iterator = require("../core-js/symbol/iterator"); - -var _iterator2 = _interopRequireDefault(_iterator); - -var _symbol = require("../core-js/symbol"); - -var _symbol2 = _interopRequireDefault(_symbol); - -var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { - return typeof obj === "undefined" ? "undefined" : _typeof(obj); -} : function (obj) { - return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); -}; \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-runtime/package.json b/typescript/hello-world/node_modules/babel-runtime/package.json deleted file mode 100644 index aa64ead..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "babel-runtime", - "version": "6.23.0", - "description": "babel selfContained runtime", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-runtime", - "author": "Sebastian McKenzie ", - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.10.0" - }, - "devDependencies": { - "babel-helpers": "^6.22.0", - "babel-plugin-transform-runtime": "^6.23.0" - } -} diff --git a/typescript/hello-world/node_modules/babel-runtime/regenerator/index.js b/typescript/hello-world/node_modules/babel-runtime/regenerator/index.js deleted file mode 100644 index 9fd4158..0000000 --- a/typescript/hello-world/node_modules/babel-runtime/regenerator/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("regenerator-runtime"); diff --git a/typescript/hello-world/node_modules/babel-template/.npmignore b/typescript/hello-world/node_modules/babel-template/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/typescript/hello-world/node_modules/babel-template/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/typescript/hello-world/node_modules/babel-template/README.md b/typescript/hello-world/node_modules/babel-template/README.md deleted file mode 100644 index c73507a..0000000 --- a/typescript/hello-world/node_modules/babel-template/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# babel-template - -> Generate an AST from a string template. - -In computer science, this is known as an implementation of quasiquotes. - -## Install - -```sh -npm install --save-dev babel-template -``` - -## Usage - -```js -import template from "babel-template"; -import generate from "babel-generator"; -import * as t from "babel-types"; - -const buildRequire = template(` - var IMPORT_NAME = require(SOURCE); -`); - -const ast = buildRequire({ - IMPORT_NAME: t.identifier("myModule"), - SOURCE: t.stringLiteral("my-module") -}); - -console.log(generate(ast).code); -``` - -```js -const myModule = require("my-module"); -``` - -## API - -### `template(code, [opts])` - -#### code - -Type: `string` - -#### options - -`babel-template` accepts all of the options from [babylon], and specifies -some defaults of its own: - -* `allowReturnOutsideFunction` is set to `true` by default. -* `allowSuperOutsideMethod` is set to `true` by default. - -##### preserveComments - -Type: `boolean` -Default: `false` - -Set this to `true` to preserve any comments from the `code` parameter. - -#### Return value - -`babel-template` returns a `function` which is invoked with an optional object -of replacements. See the usage section for an example. - -[babylon]: https://github.com/babel/babylon#options diff --git a/typescript/hello-world/node_modules/babel-template/node_modules/.bin/babylon b/typescript/hello-world/node_modules/babel-template/node_modules/.bin/babylon deleted file mode 120000 index 7ceac01..0000000 --- a/typescript/hello-world/node_modules/babel-template/node_modules/.bin/babylon +++ /dev/null @@ -1 +0,0 @@ -../../../babylon/bin/babylon.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-template/package.json b/typescript/hello-world/node_modules/babel-template/package.json deleted file mode 100644 index f6ad357..0000000 --- a/typescript/hello-world/node_modules/babel-template/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "babel-template", - "version": "6.25.0", - "description": "Generate an AST from a string template.", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-template", - "main": "lib/index.js", - "dependencies": { - "babylon": "^6.17.2", - "babel-traverse": "^6.25.0", - "babel-types": "^6.25.0", - "babel-runtime": "^6.22.0", - "lodash": "^4.2.0" - } -} diff --git a/typescript/hello-world/node_modules/babel-traverse/.npmignore b/typescript/hello-world/node_modules/babel-traverse/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/typescript/hello-world/node_modules/babel-traverse/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/typescript/hello-world/node_modules/babel-traverse/README.md b/typescript/hello-world/node_modules/babel-traverse/README.md deleted file mode 100644 index 6addc10..0000000 --- a/typescript/hello-world/node_modules/babel-traverse/README.md +++ /dev/null @@ -1 +0,0 @@ -# babel-traverse diff --git a/typescript/hello-world/node_modules/babel-traverse/node_modules/.bin/babylon b/typescript/hello-world/node_modules/babel-traverse/node_modules/.bin/babylon deleted file mode 120000 index 7ceac01..0000000 --- a/typescript/hello-world/node_modules/babel-traverse/node_modules/.bin/babylon +++ /dev/null @@ -1 +0,0 @@ -../../../babylon/bin/babylon.js \ No newline at end of file diff --git a/typescript/hello-world/node_modules/babel-traverse/package.json b/typescript/hello-world/node_modules/babel-traverse/package.json deleted file mode 100644 index d683fb0..0000000 --- a/typescript/hello-world/node_modules/babel-traverse/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "babel-traverse", - "version": "6.25.0", - "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-traverse", - "main": "lib/index.js", - "dependencies": { - "babel-code-frame": "^6.22.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-types": "^6.25.0", - "babylon": "^6.17.2", - "debug": "^2.2.0", - "globals": "^9.0.0", - "invariant": "^2.2.0", - "lodash": "^4.2.0" - }, - "devDependencies": { - "babel-generator": "^6.25.0" - } -} diff --git a/typescript/hello-world/node_modules/babel-types/.npmignore b/typescript/hello-world/node_modules/babel-types/.npmignore deleted file mode 100644 index 47cdd2c..0000000 --- a/typescript/hello-world/node_modules/babel-types/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -src -test -node_modules diff --git a/typescript/hello-world/node_modules/babel-types/README.md b/typescript/hello-world/node_modules/babel-types/README.md deleted file mode 100644 index 1a2c74d..0000000 --- a/typescript/hello-world/node_modules/babel-types/README.md +++ /dev/null @@ -1,1983 +0,0 @@ -# babel-types - -> This module contains methods for building ASTs manually and for checking the types of AST nodes. - -## Install - -```sh -npm install --save-dev babel-types -``` - -## API - - - -### anyTypeAnnotation -```javascript -t.anyTypeAnnotation() -``` - -See also `t.isAnyTypeAnnotation(node, opts)` and `t.assertAnyTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### arrayExpression -```javascript -t.arrayExpression(elements) -``` - -See also `t.isArrayExpression(node, opts)` and `t.assertArrayExpression(node, opts)`. - -Aliases: `Expression` - - - `elements`: `Array` (default: `[]`) - ---- - -### arrayPattern -```javascript -t.arrayPattern(elements, typeAnnotation) -``` - -See also `t.isArrayPattern(node, opts)` and `t.assertArrayPattern(node, opts)`. - -Aliases: `Pattern`, `LVal` - - - `elements`: `Array` (required) - - `typeAnnotation` (required) - - `decorators`: `Array` (default: `null`) - ---- - -### arrayTypeAnnotation -```javascript -t.arrayTypeAnnotation(elementType) -``` - -See also `t.isArrayTypeAnnotation(node, opts)` and `t.assertArrayTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `elementType` (required) - ---- - -### arrowFunctionExpression -```javascript -t.arrowFunctionExpression(params, body, async) -``` - -See also `t.isArrowFunctionExpression(node, opts)` and `t.assertArrowFunctionExpression(node, opts)`. - -Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish` - - - `params`: `Array` (required) - - `body`: `BlockStatement | Expression` (required) - - `async`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### assignmentExpression -```javascript -t.assignmentExpression(operator, left, right) -``` - -See also `t.isAssignmentExpression(node, opts)` and `t.assertAssignmentExpression(node, opts)`. - -Aliases: `Expression` - - - `operator`: `string` (required) - - `left`: `LVal` (required) - - `right`: `Expression` (required) - ---- - -### assignmentPattern -```javascript -t.assignmentPattern(left, right) -``` - -See also `t.isAssignmentPattern(node, opts)` and `t.assertAssignmentPattern(node, opts)`. - -Aliases: `Pattern`, `LVal` - - - `left`: `Identifier` (required) - - `right`: `Expression` (required) - - `decorators`: `Array` (default: `null`) - ---- - -### awaitExpression -```javascript -t.awaitExpression(argument) -``` - -See also `t.isAwaitExpression(node, opts)` and `t.assertAwaitExpression(node, opts)`. - -Aliases: `Expression`, `Terminatorless` - - - `argument`: `Expression` (required) - ---- - -### binaryExpression -```javascript -t.binaryExpression(operator, left, right) -``` - -See also `t.isBinaryExpression(node, opts)` and `t.assertBinaryExpression(node, opts)`. - -Aliases: `Binary`, `Expression` - - - `operator`: `'+' | '-' | '/' | '%' | '*' | '**' | '&' | '|' | '>>' | '>>>' | '<<' | '^' | '==' | '===' | '!=' | '!==' | 'in' | 'instanceof' | '>' | '<' | '>=' | '<='` (required) - - `left`: `Expression` (required) - - `right`: `Expression` (required) - ---- - -### bindExpression -```javascript -t.bindExpression(object, callee) -``` - -See also `t.isBindExpression(node, opts)` and `t.assertBindExpression(node, opts)`. - -Aliases: `Expression` - - - `object` (required) - - `callee` (required) - ---- - -### blockStatement -```javascript -t.blockStatement(body, directives) -``` - -See also `t.isBlockStatement(node, opts)` and `t.assertBlockStatement(node, opts)`. - -Aliases: `Scopable`, `BlockParent`, `Block`, `Statement` - - - `body`: `Array` (required) - - `directives`: `Array` (default: `[]`) - ---- - -### booleanLiteral -```javascript -t.booleanLiteral(value) -``` - -See also `t.isBooleanLiteral(node, opts)` and `t.assertBooleanLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - - `value`: `boolean` (required) - ---- - -### booleanLiteralTypeAnnotation -```javascript -t.booleanLiteralTypeAnnotation() -``` - -See also `t.isBooleanLiteralTypeAnnotation(node, opts)` and `t.assertBooleanLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - ---- - -### booleanTypeAnnotation -```javascript -t.booleanTypeAnnotation() -``` - -See also `t.isBooleanTypeAnnotation(node, opts)` and `t.assertBooleanTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### breakStatement -```javascript -t.breakStatement(label) -``` - -See also `t.isBreakStatement(node, opts)` and `t.assertBreakStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `label`: `Identifier` (default: `null`) - ---- - -### callExpression -```javascript -t.callExpression(callee, arguments) -``` - -See also `t.isCallExpression(node, opts)` and `t.assertCallExpression(node, opts)`. - -Aliases: `Expression` - - - `callee`: `Expression` (required) - - `arguments`: `Array` (required) - ---- - -### catchClause -```javascript -t.catchClause(param, body) -``` - -See also `t.isCatchClause(node, opts)` and `t.assertCatchClause(node, opts)`. - -Aliases: `Scopable` - - - `param`: `Identifier` (required) - - `body`: `BlockStatement` (required) - ---- - -### classBody -```javascript -t.classBody(body) -``` - -See also `t.isClassBody(node, opts)` and `t.assertClassBody(node, opts)`. - - - `body`: `Array` (required) - ---- - -### classDeclaration -```javascript -t.classDeclaration(id, superClass, body, decorators) -``` - -See also `t.isClassDeclaration(node, opts)` and `t.assertClassDeclaration(node, opts)`. - -Aliases: `Scopable`, `Class`, `Statement`, `Declaration`, `Pureish` - - - `id`: `Identifier` (required) - - `superClass`: `Expression` (default: `null`) - - `body`: `ClassBody` (required) - - `decorators`: `Array` (required) - - `implements` (default: `null`) - - `mixins` (default: `null`) - - `superTypeParameters` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### classExpression -```javascript -t.classExpression(id, superClass, body, decorators) -``` - -See also `t.isClassExpression(node, opts)` and `t.assertClassExpression(node, opts)`. - -Aliases: `Scopable`, `Class`, `Expression`, `Pureish` - - - `id`: `Identifier` (default: `null`) - - `superClass`: `Expression` (default: `null`) - - `body`: `ClassBody` (required) - - `decorators`: `Array` (required) - - `implements` (default: `null`) - - `mixins` (default: `null`) - - `superTypeParameters` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### classImplements -```javascript -t.classImplements(id, typeParameters) -``` - -See also `t.isClassImplements(node, opts)` and `t.assertClassImplements(node, opts)`. - -Aliases: `Flow` - - - `id` (required) - - `typeParameters` (required) - ---- - -### classMethod -```javascript -t.classMethod(kind, key, params, body, computed, static) -``` - -See also `t.isClassMethod(node, opts)` and `t.assertClassMethod(node, opts)`. - -Aliases: `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method` - - - `kind`: `"get" | "set" | "method" | "constructor"` (default: `'method'`) - - `key`if computed then `Expression` else `Identifier | Literal` (required) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `computed`: `boolean` (default: `false`) - - `static`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `decorators` (default: `null`) - - `generator`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### classProperty -```javascript -t.classProperty(key, value, typeAnnotation, decorators, computed) -``` - -See also `t.isClassProperty(node, opts)` and `t.assertClassProperty(node, opts)`. - -Aliases: `Property` - - - `key` (required) - - `value` (required) - - `typeAnnotation` (required) - - `decorators` (required) - - `computed`: `boolean` (default: `false`) - ---- - -### conditionalExpression -```javascript -t.conditionalExpression(test, consequent, alternate) -``` - -See also `t.isConditionalExpression(node, opts)` and `t.assertConditionalExpression(node, opts)`. - -Aliases: `Expression`, `Conditional` - - - `test`: `Expression` (required) - - `consequent`: `Expression` (required) - - `alternate`: `Expression` (required) - ---- - -### continueStatement -```javascript -t.continueStatement(label) -``` - -See also `t.isContinueStatement(node, opts)` and `t.assertContinueStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `label`: `Identifier` (default: `null`) - ---- - -### debuggerStatement -```javascript -t.debuggerStatement() -``` - -See also `t.isDebuggerStatement(node, opts)` and `t.assertDebuggerStatement(node, opts)`. - -Aliases: `Statement` - - ---- - -### declareClass -```javascript -t.declareClass(id, typeParameters, extends, body) -``` - -See also `t.isDeclareClass(node, opts)` and `t.assertDeclareClass(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `extends` (required) - - `body` (required) - ---- - -### declareFunction -```javascript -t.declareFunction(id) -``` - -See also `t.isDeclareFunction(node, opts)` and `t.assertDeclareFunction(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - ---- - -### declareInterface -```javascript -t.declareInterface(id, typeParameters, extends, body) -``` - -See also `t.isDeclareInterface(node, opts)` and `t.assertDeclareInterface(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `extends` (required) - - `body` (required) - ---- - -### declareModule -```javascript -t.declareModule(id, body) -``` - -See also `t.isDeclareModule(node, opts)` and `t.assertDeclareModule(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `body` (required) - ---- - -### declareModuleExports -```javascript -t.declareModuleExports(typeAnnotation) -``` - -See also `t.isDeclareModuleExports(node, opts)` and `t.assertDeclareModuleExports(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `typeAnnotation` (required) - ---- - -### declareTypeAlias -```javascript -t.declareTypeAlias(id, typeParameters, right) -``` - -See also `t.isDeclareTypeAlias(node, opts)` and `t.assertDeclareTypeAlias(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `right` (required) - ---- - -### declareVariable -```javascript -t.declareVariable(id) -``` - -See also `t.isDeclareVariable(node, opts)` and `t.assertDeclareVariable(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - ---- - -### decorator -```javascript -t.decorator(expression) -``` - -See also `t.isDecorator(node, opts)` and `t.assertDecorator(node, opts)`. - - - `expression`: `Expression` (required) - ---- - -### directive -```javascript -t.directive(value) -``` - -See also `t.isDirective(node, opts)` and `t.assertDirective(node, opts)`. - - - `value`: `DirectiveLiteral` (required) - ---- - -### directiveLiteral -```javascript -t.directiveLiteral(value) -``` - -See also `t.isDirectiveLiteral(node, opts)` and `t.assertDirectiveLiteral(node, opts)`. - - - `value`: `string` (required) - ---- - -### doExpression -```javascript -t.doExpression(body) -``` - -See also `t.isDoExpression(node, opts)` and `t.assertDoExpression(node, opts)`. - -Aliases: `Expression` - - - `body`: `BlockStatement` (required) - ---- - -### doWhileStatement -```javascript -t.doWhileStatement(test, body) -``` - -See also `t.isDoWhileStatement(node, opts)` and `t.assertDoWhileStatement(node, opts)`. - -Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable` - - - `test`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### emptyStatement -```javascript -t.emptyStatement() -``` - -See also `t.isEmptyStatement(node, opts)` and `t.assertEmptyStatement(node, opts)`. - -Aliases: `Statement` - - ---- - -### emptyTypeAnnotation -```javascript -t.emptyTypeAnnotation() -``` - -See also `t.isEmptyTypeAnnotation(node, opts)` and `t.assertEmptyTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### existentialTypeParam -```javascript -t.existentialTypeParam() -``` - -See also `t.isExistentialTypeParam(node, opts)` and `t.assertExistentialTypeParam(node, opts)`. - -Aliases: `Flow` - - ---- - -### exportAllDeclaration -```javascript -t.exportAllDeclaration(source) -``` - -See also `t.isExportAllDeclaration(node, opts)` and `t.assertExportAllDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` - - - `source`: `StringLiteral` (required) - ---- - -### exportDefaultDeclaration -```javascript -t.exportDefaultDeclaration(declaration) -``` - -See also `t.isExportDefaultDeclaration(node, opts)` and `t.assertExportDefaultDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` - - - `declaration`: `FunctionDeclaration | ClassDeclaration | Expression` (required) - ---- - -### exportDefaultSpecifier -```javascript -t.exportDefaultSpecifier(exported) -``` - -See also `t.isExportDefaultSpecifier(node, opts)` and `t.assertExportDefaultSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `exported`: `Identifier` (required) - ---- - -### exportNamedDeclaration -```javascript -t.exportNamedDeclaration(declaration, specifiers, source) -``` - -See also `t.isExportNamedDeclaration(node, opts)` and `t.assertExportNamedDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration`, `ExportDeclaration` - - - `declaration`: `Declaration` (default: `null`) - - `specifiers`: `Array` (required) - - `source`: `StringLiteral` (default: `null`) - ---- - -### exportNamespaceSpecifier -```javascript -t.exportNamespaceSpecifier(exported) -``` - -See also `t.isExportNamespaceSpecifier(node, opts)` and `t.assertExportNamespaceSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `exported`: `Identifier` (required) - ---- - -### exportSpecifier -```javascript -t.exportSpecifier(local, exported) -``` - -See also `t.isExportSpecifier(node, opts)` and `t.assertExportSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - - `exported`: `Identifier` (required) - ---- - -### expressionStatement -```javascript -t.expressionStatement(expression) -``` - -See also `t.isExpressionStatement(node, opts)` and `t.assertExpressionStatement(node, opts)`. - -Aliases: `Statement`, `ExpressionWrapper` - - - `expression`: `Expression` (required) - ---- - -### file -```javascript -t.file(program, comments, tokens) -``` - -See also `t.isFile(node, opts)` and `t.assertFile(node, opts)`. - - - `program`: `Program` (required) - - `comments` (required) - - `tokens` (required) - ---- - -### forAwaitStatement -```javascript -t.forAwaitStatement(left, right, body) -``` - -See also `t.isForAwaitStatement(node, opts)` and `t.assertForAwaitStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` - - - `left`: `VariableDeclaration | LVal` (required) - - `right`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### forInStatement -```javascript -t.forInStatement(left, right, body) -``` - -See also `t.isForInStatement(node, opts)` and `t.assertForInStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` - - - `left`: `VariableDeclaration | LVal` (required) - - `right`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### forOfStatement -```javascript -t.forOfStatement(left, right, body) -``` - -See also `t.isForOfStatement(node, opts)` and `t.assertForOfStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop`, `ForXStatement` - - - `left`: `VariableDeclaration | LVal` (required) - - `right`: `Expression` (required) - - `body`: `Statement` (required) - ---- - -### forStatement -```javascript -t.forStatement(init, test, update, body) -``` - -See also `t.isForStatement(node, opts)` and `t.assertForStatement(node, opts)`. - -Aliases: `Scopable`, `Statement`, `For`, `BlockParent`, `Loop` - - - `init`: `VariableDeclaration | Expression` (default: `null`) - - `test`: `Expression` (default: `null`) - - `update`: `Expression` (default: `null`) - - `body`: `Statement` (required) - ---- - -### functionDeclaration -```javascript -t.functionDeclaration(id, params, body, generator, async) -``` - -See also `t.isFunctionDeclaration(node, opts)` and `t.assertFunctionDeclaration(node, opts)`. - -Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Statement`, `Pureish`, `Declaration` - - - `id`: `Identifier` (required) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `generator`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### functionExpression -```javascript -t.functionExpression(id, params, body, generator, async) -``` - -See also `t.isFunctionExpression(node, opts)` and `t.assertFunctionExpression(node, opts)`. - -Aliases: `Scopable`, `Function`, `BlockParent`, `FunctionParent`, `Expression`, `Pureish` - - - `id`: `Identifier` (default: `null`) - - `params`: `Array` (required) - - `body`: `BlockStatement` (required) - - `generator`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### functionTypeAnnotation -```javascript -t.functionTypeAnnotation(typeParameters, params, rest, returnType) -``` - -See also `t.isFunctionTypeAnnotation(node, opts)` and `t.assertFunctionTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `typeParameters` (required) - - `params` (required) - - `rest` (required) - - `returnType` (required) - ---- - -### functionTypeParam -```javascript -t.functionTypeParam(name, typeAnnotation) -``` - -See also `t.isFunctionTypeParam(node, opts)` and `t.assertFunctionTypeParam(node, opts)`. - -Aliases: `Flow` - - - `name` (required) - - `typeAnnotation` (required) - ---- - -### genericTypeAnnotation -```javascript -t.genericTypeAnnotation(id, typeParameters) -``` - -See also `t.isGenericTypeAnnotation(node, opts)` and `t.assertGenericTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `id` (required) - - `typeParameters` (required) - ---- - -### identifier -```javascript -t.identifier(name) -``` - -See also `t.isIdentifier(node, opts)` and `t.assertIdentifier(node, opts)`. - -Aliases: `Expression`, `LVal` - - - `name``string` (required) - - `decorators`: `Array` (default: `null`) - - `typeAnnotation` (default: `null`) - ---- - -### ifStatement -```javascript -t.ifStatement(test, consequent, alternate) -``` - -See also `t.isIfStatement(node, opts)` and `t.assertIfStatement(node, opts)`. - -Aliases: `Statement`, `Conditional` - - - `test`: `Expression` (required) - - `consequent`: `Statement` (required) - - `alternate`: `Statement` (default: `null`) - ---- - -### import -```javascript -t.import() -``` - -See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`. - -Aliases: `Expression` - - ---- - -### importDeclaration -```javascript -t.importDeclaration(specifiers, source) -``` - -See also `t.isImportDeclaration(node, opts)` and `t.assertImportDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration`, `ModuleDeclaration` - - - `specifiers`: `Array` (required) - - `source`: `StringLiteral` (required) - ---- - -### importDefaultSpecifier -```javascript -t.importDefaultSpecifier(local) -``` - -See also `t.isImportDefaultSpecifier(node, opts)` and `t.assertImportDefaultSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - ---- - -### importNamespaceSpecifier -```javascript -t.importNamespaceSpecifier(local) -``` - -See also `t.isImportNamespaceSpecifier(node, opts)` and `t.assertImportNamespaceSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - ---- - -### importSpecifier -```javascript -t.importSpecifier(local, imported) -``` - -See also `t.isImportSpecifier(node, opts)` and `t.assertImportSpecifier(node, opts)`. - -Aliases: `ModuleSpecifier` - - - `local`: `Identifier` (required) - - `imported`: `Identifier` (required) - - `importKind`: `null | 'type' | 'typeof'` (default: `null`) - ---- - -### interfaceDeclaration -```javascript -t.interfaceDeclaration(id, typeParameters, extends, body) -``` - -See also `t.isInterfaceDeclaration(node, opts)` and `t.assertInterfaceDeclaration(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `extends` (required) - - `body` (required) - ---- - -### interfaceExtends -```javascript -t.interfaceExtends(id, typeParameters) -``` - -See also `t.isInterfaceExtends(node, opts)` and `t.assertInterfaceExtends(node, opts)`. - -Aliases: `Flow` - - - `id` (required) - - `typeParameters` (required) - ---- - -### intersectionTypeAnnotation -```javascript -t.intersectionTypeAnnotation(types) -``` - -See also `t.isIntersectionTypeAnnotation(node, opts)` and `t.assertIntersectionTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `types` (required) - ---- - -### jSXAttribute -```javascript -t.jSXAttribute(name, value) -``` - -See also `t.isJSXAttribute(node, opts)` and `t.assertJSXAttribute(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `name`: `JSXIdentifier | JSXNamespacedName` (required) - - `value`: `JSXElement | StringLiteral | JSXExpressionContainer` (default: `null`) - ---- - -### jSXClosingElement -```javascript -t.jSXClosingElement(name) -``` - -See also `t.isJSXClosingElement(node, opts)` and `t.assertJSXClosingElement(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `name`: `JSXIdentifier | JSXMemberExpression` (required) - ---- - -### jSXElement -```javascript -t.jSXElement(openingElement, closingElement, children, selfClosing) -``` - -See also `t.isJSXElement(node, opts)` and `t.assertJSXElement(node, opts)`. - -Aliases: `JSX`, `Immutable`, `Expression` - - - `openingElement`: `JSXOpeningElement` (required) - - `closingElement`: `JSXClosingElement` (default: `null`) - - `children`: `Array` (required) - - `selfClosing` (required) - ---- - -### jSXEmptyExpression -```javascript -t.jSXEmptyExpression() -``` - -See also `t.isJSXEmptyExpression(node, opts)` and `t.assertJSXEmptyExpression(node, opts)`. - -Aliases: `JSX`, `Expression` - - ---- - -### jSXExpressionContainer -```javascript -t.jSXExpressionContainer(expression) -``` - -See also `t.isJSXExpressionContainer(node, opts)` and `t.assertJSXExpressionContainer(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `expression`: `Expression` (required) - ---- - -### jSXIdentifier -```javascript -t.jSXIdentifier(name) -``` - -See also `t.isJSXIdentifier(node, opts)` and `t.assertJSXIdentifier(node, opts)`. - -Aliases: `JSX`, `Expression` - - - `name`: `string` (required) - ---- - -### jSXMemberExpression -```javascript -t.jSXMemberExpression(object, property) -``` - -See also `t.isJSXMemberExpression(node, opts)` and `t.assertJSXMemberExpression(node, opts)`. - -Aliases: `JSX`, `Expression` - - - `object`: `JSXMemberExpression | JSXIdentifier` (required) - - `property`: `JSXIdentifier` (required) - ---- - -### jSXNamespacedName -```javascript -t.jSXNamespacedName(namespace, name) -``` - -See also `t.isJSXNamespacedName(node, opts)` and `t.assertJSXNamespacedName(node, opts)`. - -Aliases: `JSX` - - - `namespace`: `JSXIdentifier` (required) - - `name`: `JSXIdentifier` (required) - ---- - -### jSXOpeningElement -```javascript -t.jSXOpeningElement(name, attributes, selfClosing) -``` - -See also `t.isJSXOpeningElement(node, opts)` and `t.assertJSXOpeningElement(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `name`: `JSXIdentifier | JSXMemberExpression` (required) - - `attributes`: `Array` (required) - - `selfClosing`: `boolean` (default: `false`) - ---- - -### jSXSpreadAttribute -```javascript -t.jSXSpreadAttribute(argument) -``` - -See also `t.isJSXSpreadAttribute(node, opts)` and `t.assertJSXSpreadAttribute(node, opts)`. - -Aliases: `JSX` - - - `argument`: `Expression` (required) - ---- - -### jSXSpreadChild -```javascript -t.jSXSpreadChild(expression) -``` - -See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `expression`: `Expression` (required) - ---- - -### jSXText -```javascript -t.jSXText(value) -``` - -See also `t.isJSXText(node, opts)` and `t.assertJSXText(node, opts)`. - -Aliases: `JSX`, `Immutable` - - - `value`: `string` (required) - ---- - -### labeledStatement -```javascript -t.labeledStatement(label, body) -``` - -See also `t.isLabeledStatement(node, opts)` and `t.assertLabeledStatement(node, opts)`. - -Aliases: `Statement` - - - `label`: `Identifier` (required) - - `body`: `Statement` (required) - ---- - -### logicalExpression -```javascript -t.logicalExpression(operator, left, right) -``` - -See also `t.isLogicalExpression(node, opts)` and `t.assertLogicalExpression(node, opts)`. - -Aliases: `Binary`, `Expression` - - - `operator`: `'||' | '&&'` (required) - - `left`: `Expression` (required) - - `right`: `Expression` (required) - ---- - -### memberExpression -```javascript -t.memberExpression(object, property, computed) -``` - -See also `t.isMemberExpression(node, opts)` and `t.assertMemberExpression(node, opts)`. - -Aliases: `Expression`, `LVal` - - - `object`: `Expression` (required) - - `property`if computed then `Expression` else `Identifier` (required) - - `computed`: `boolean` (default: `false`) - ---- - -### metaProperty -```javascript -t.metaProperty(meta, property) -``` - -See also `t.isMetaProperty(node, opts)` and `t.assertMetaProperty(node, opts)`. - -Aliases: `Expression` - - - `meta`: `string` (required) - - `property`: `string` (required) - ---- - -### mixedTypeAnnotation -```javascript -t.mixedTypeAnnotation() -``` - -See also `t.isMixedTypeAnnotation(node, opts)` and `t.assertMixedTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### newExpression -```javascript -t.newExpression(callee, arguments) -``` - -See also `t.isNewExpression(node, opts)` and `t.assertNewExpression(node, opts)`. - -Aliases: `Expression` - - - `callee`: `Expression` (required) - - `arguments`: `Array` (required) - ---- - -### noop -```javascript -t.noop() -``` - -See also `t.isNoop(node, opts)` and `t.assertNoop(node, opts)`. - - ---- - -### nullLiteral -```javascript -t.nullLiteral() -``` - -See also `t.isNullLiteral(node, opts)` and `t.assertNullLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - ---- - -### nullLiteralTypeAnnotation -```javascript -t.nullLiteralTypeAnnotation() -``` - -See also `t.isNullLiteralTypeAnnotation(node, opts)` and `t.assertNullLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### nullableTypeAnnotation -```javascript -t.nullableTypeAnnotation(typeAnnotation) -``` - -See also `t.isNullableTypeAnnotation(node, opts)` and `t.assertNullableTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `typeAnnotation` (required) - ---- - -### numberTypeAnnotation -```javascript -t.numberTypeAnnotation() -``` - -See also `t.isNumberTypeAnnotation(node, opts)` and `t.assertNumberTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### numericLiteral -```javascript -t.numericLiteral(value) -``` - -See also `t.isNumericLiteral(node, opts)` and `t.assertNumericLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - - `value`: `number` (required) - ---- - -### numericLiteralTypeAnnotation -```javascript -t.numericLiteralTypeAnnotation() -``` - -See also `t.isNumericLiteralTypeAnnotation(node, opts)` and `t.assertNumericLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - ---- - -### objectExpression -```javascript -t.objectExpression(properties) -``` - -See also `t.isObjectExpression(node, opts)` and `t.assertObjectExpression(node, opts)`. - -Aliases: `Expression` - - - `properties`: `Array` (required) - ---- - -### objectMethod -```javascript -t.objectMethod(kind, key, params, body, computed) -``` - -See also `t.isObjectMethod(node, opts)` and `t.assertObjectMethod(node, opts)`. - -Aliases: `UserWhitespacable`, `Function`, `Scopable`, `BlockParent`, `FunctionParent`, `Method`, `ObjectMember` - - - `kind`: `"method" | "get" | "set"` (default: `'method'`) - - `key`if computed then `Expression` else `Identifier | Literal` (required) - - `params` (required) - - `body`: `BlockStatement` (required) - - `computed`: `boolean` (default: `false`) - - `async`: `boolean` (default: `false`) - - `decorators`: `Array` (default: `null`) - - `generator`: `boolean` (default: `false`) - - `returnType` (default: `null`) - - `typeParameters` (default: `null`) - ---- - -### objectPattern -```javascript -t.objectPattern(properties, typeAnnotation) -``` - -See also `t.isObjectPattern(node, opts)` and `t.assertObjectPattern(node, opts)`. - -Aliases: `Pattern`, `LVal` - - - `properties`: `Array` (required) - - `typeAnnotation` (required) - - `decorators`: `Array` (default: `null`) - ---- - -### objectProperty -```javascript -t.objectProperty(key, value, computed, shorthand, decorators) -``` - -See also `t.isObjectProperty(node, opts)` and `t.assertObjectProperty(node, opts)`. - -Aliases: `UserWhitespacable`, `Property`, `ObjectMember` - - - `key`if computed then `Expression` else `Identifier | Literal` (required) - - `value`: `Expression | Pattern | RestElement` (required) - - `computed`: `boolean` (default: `false`) - - `shorthand`: `boolean` (default: `false`) - - `decorators`: `Array` (default: `null`) - ---- - -### objectTypeAnnotation -```javascript -t.objectTypeAnnotation(properties, indexers, callProperties) -``` - -See also `t.isObjectTypeAnnotation(node, opts)` and `t.assertObjectTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `properties` (required) - - `indexers` (required) - - `callProperties` (required) - ---- - -### objectTypeCallProperty -```javascript -t.objectTypeCallProperty(value) -``` - -See also `t.isObjectTypeCallProperty(node, opts)` and `t.assertObjectTypeCallProperty(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `value` (required) - ---- - -### objectTypeIndexer -```javascript -t.objectTypeIndexer(id, key, value) -``` - -See also `t.isObjectTypeIndexer(node, opts)` and `t.assertObjectTypeIndexer(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `id` (required) - - `key` (required) - - `value` (required) - ---- - -### objectTypeProperty -```javascript -t.objectTypeProperty(key, value) -``` - -See also `t.isObjectTypeProperty(node, opts)` and `t.assertObjectTypeProperty(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `key` (required) - - `value` (required) - ---- - -### objectTypeSpreadProperty -```javascript -t.objectTypeSpreadProperty(argument) -``` - -See also `t.isObjectTypeSpreadProperty(node, opts)` and `t.assertObjectTypeSpreadProperty(node, opts)`. - -Aliases: `Flow`, `UserWhitespacable` - - - `argument` (required) - ---- - -### parenthesizedExpression -```javascript -t.parenthesizedExpression(expression) -``` - -See also `t.isParenthesizedExpression(node, opts)` and `t.assertParenthesizedExpression(node, opts)`. - -Aliases: `Expression`, `ExpressionWrapper` - - - `expression`: `Expression` (required) - ---- - -### program -```javascript -t.program(body, directives) -``` - -See also `t.isProgram(node, opts)` and `t.assertProgram(node, opts)`. - -Aliases: `Scopable`, `BlockParent`, `Block`, `FunctionParent` - - - `body`: `Array` (required) - - `directives`: `Array` (default: `[]`) - ---- - -### qualifiedTypeIdentifier -```javascript -t.qualifiedTypeIdentifier(id, qualification) -``` - -See also `t.isQualifiedTypeIdentifier(node, opts)` and `t.assertQualifiedTypeIdentifier(node, opts)`. - -Aliases: `Flow` - - - `id` (required) - - `qualification` (required) - ---- - -### regExpLiteral -```javascript -t.regExpLiteral(pattern, flags) -``` - -See also `t.isRegExpLiteral(node, opts)` and `t.assertRegExpLiteral(node, opts)`. - -Aliases: `Expression`, `Literal` - - - `pattern`: `string` (required) - - `flags`: `string` (default: `''`) - ---- - -### restElement -```javascript -t.restElement(argument, typeAnnotation) -``` - -See also `t.isRestElement(node, opts)` and `t.assertRestElement(node, opts)`. - -Aliases: `LVal` - - - `argument`: `LVal` (required) - - `typeAnnotation` (required) - - `decorators`: `Array` (default: `null`) - ---- - -### restProperty -```javascript -t.restProperty(argument) -``` - -See also `t.isRestProperty(node, opts)` and `t.assertRestProperty(node, opts)`. - -Aliases: `UnaryLike` - - - `argument`: `LVal` (required) - ---- - -### returnStatement -```javascript -t.returnStatement(argument) -``` - -See also `t.isReturnStatement(node, opts)` and `t.assertReturnStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `argument`: `Expression` (default: `null`) - ---- - -### sequenceExpression -```javascript -t.sequenceExpression(expressions) -``` - -See also `t.isSequenceExpression(node, opts)` and `t.assertSequenceExpression(node, opts)`. - -Aliases: `Expression` - - - `expressions`: `Array` (required) - ---- - -### spreadElement -```javascript -t.spreadElement(argument) -``` - -See also `t.isSpreadElement(node, opts)` and `t.assertSpreadElement(node, opts)`. - -Aliases: `UnaryLike` - - - `argument`: `Expression` (required) - ---- - -### spreadProperty -```javascript -t.spreadProperty(argument) -``` - -See also `t.isSpreadProperty(node, opts)` and `t.assertSpreadProperty(node, opts)`. - -Aliases: `UnaryLike` - - - `argument`: `Expression` (required) - ---- - -### stringLiteral -```javascript -t.stringLiteral(value) -``` - -See also `t.isStringLiteral(node, opts)` and `t.assertStringLiteral(node, opts)`. - -Aliases: `Expression`, `Pureish`, `Literal`, `Immutable` - - - `value`: `string` (required) - ---- - -### stringLiteralTypeAnnotation -```javascript -t.stringLiteralTypeAnnotation() -``` - -See also `t.isStringLiteralTypeAnnotation(node, opts)` and `t.assertStringLiteralTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - ---- - -### stringTypeAnnotation -```javascript -t.stringTypeAnnotation() -``` - -See also `t.isStringTypeAnnotation(node, opts)` and `t.assertStringTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### super -```javascript -t.super() -``` - -See also `t.isSuper(node, opts)` and `t.assertSuper(node, opts)`. - -Aliases: `Expression` - - ---- - -### switchCase -```javascript -t.switchCase(test, consequent) -``` - -See also `t.isSwitchCase(node, opts)` and `t.assertSwitchCase(node, opts)`. - - - `test`: `Expression` (default: `null`) - - `consequent`: `Array` (required) - ---- - -### switchStatement -```javascript -t.switchStatement(discriminant, cases) -``` - -See also `t.isSwitchStatement(node, opts)` and `t.assertSwitchStatement(node, opts)`. - -Aliases: `Statement`, `BlockParent`, `Scopable` - - - `discriminant`: `Expression` (required) - - `cases`: `Array` (required) - ---- - -### taggedTemplateExpression -```javascript -t.taggedTemplateExpression(tag, quasi) -``` - -See also `t.isTaggedTemplateExpression(node, opts)` and `t.assertTaggedTemplateExpression(node, opts)`. - -Aliases: `Expression` - - - `tag`: `Expression` (required) - - `quasi`: `TemplateLiteral` (required) - ---- - -### templateElement -```javascript -t.templateElement(value, tail) -``` - -See also `t.isTemplateElement(node, opts)` and `t.assertTemplateElement(node, opts)`. - - - `value` (required) - - `tail`: `boolean` (default: `false`) - ---- - -### templateLiteral -```javascript -t.templateLiteral(quasis, expressions) -``` - -See also `t.isTemplateLiteral(node, opts)` and `t.assertTemplateLiteral(node, opts)`. - -Aliases: `Expression`, `Literal` - - - `quasis`: `Array` (required) - - `expressions`: `Array` (required) - ---- - -### thisExpression -```javascript -t.thisExpression() -``` - -See also `t.isThisExpression(node, opts)` and `t.assertThisExpression(node, opts)`. - -Aliases: `Expression` - - ---- - -### thisTypeAnnotation -```javascript -t.thisTypeAnnotation() -``` - -See also `t.isThisTypeAnnotation(node, opts)` and `t.assertThisTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### throwStatement -```javascript -t.throwStatement(argument) -``` - -See also `t.isThrowStatement(node, opts)` and `t.assertThrowStatement(node, opts)`. - -Aliases: `Statement`, `Terminatorless`, `CompletionStatement` - - - `argument`: `Expression` (required) - ---- - -### tryStatement -```javascript -t.tryStatement(block, handler, finalizer) -``` - -See also `t.isTryStatement(node, opts)` and `t.assertTryStatement(node, opts)`. - -Aliases: `Statement` - - - `block` (required) - - `handler` (default: `null`) - - `finalizer`: `BlockStatement` (default: `null`) - - `body`: `BlockStatement` (default: `null`) - ---- - -### tupleTypeAnnotation -```javascript -t.tupleTypeAnnotation(types) -``` - -See also `t.isTupleTypeAnnotation(node, opts)` and `t.assertTupleTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `types` (required) - ---- - -### typeAlias -```javascript -t.typeAlias(id, typeParameters, right) -``` - -See also `t.isTypeAlias(node, opts)` and `t.assertTypeAlias(node, opts)`. - -Aliases: `Flow`, `FlowDeclaration`, `Statement`, `Declaration` - - - `id` (required) - - `typeParameters` (required) - - `right` (required) - ---- - -### typeAnnotation -```javascript -t.typeAnnotation(typeAnnotation) -``` - -See also `t.isTypeAnnotation(node, opts)` and `t.assertTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `typeAnnotation` (required) - ---- - -### typeCastExpression -```javascript -t.typeCastExpression(expression, typeAnnotation) -``` - -See also `t.isTypeCastExpression(node, opts)` and `t.assertTypeCastExpression(node, opts)`. - -Aliases: `Flow`, `ExpressionWrapper`, `Expression` - - - `expression` (required) - - `typeAnnotation` (required) - ---- - -### typeParameter -```javascript -t.typeParameter(bound) -``` - -See also `t.isTypeParameter(node, opts)` and `t.assertTypeParameter(node, opts)`. - -Aliases: `Flow` - - - `bound` (required) - ---- - -### typeParameterDeclaration -```javascript -t.typeParameterDeclaration(params) -``` - -See also `t.isTypeParameterDeclaration(node, opts)` and `t.assertTypeParameterDeclaration(node, opts)`. - -Aliases: `Flow` - - - `params` (required) - ---- - -### typeParameterInstantiation -```javascript -t.typeParameterInstantiation(params) -``` - -See also `t.isTypeParameterInstantiation(node, opts)` and `t.assertTypeParameterInstantiation(node, opts)`. - -Aliases: `Flow` - - - `params` (required) - ---- - -### typeofTypeAnnotation -```javascript -t.typeofTypeAnnotation(argument) -``` - -See also `t.isTypeofTypeAnnotation(node, opts)` and `t.assertTypeofTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `argument` (required) - ---- - -### unaryExpression -```javascript -t.unaryExpression(operator, argument, prefix) -``` - -See also `t.isUnaryExpression(node, opts)` and `t.assertUnaryExpression(node, opts)`. - -Aliases: `UnaryLike`, `Expression` - - - `operator`: `'void' | 'delete' | '!' | '+' | '-' | '++' | '--' | '~' | 'typeof'` (required) - - `argument`: `Expression` (required) - - `prefix`: `boolean` (default: `true`) - ---- - -### unionTypeAnnotation -```javascript -t.unionTypeAnnotation(types) -``` - -See also `t.isUnionTypeAnnotation(node, opts)` and `t.assertUnionTypeAnnotation(node, opts)`. - -Aliases: `Flow` - - - `types` (required) - ---- - -### updateExpression -```javascript -t.updateExpression(operator, argument, prefix) -``` - -See also `t.isUpdateExpression(node, opts)` and `t.assertUpdateExpression(node, opts)`. - -Aliases: `Expression` - - - `operator`: `'++' | '--'` (required) - - `argument`: `Expression` (required) - - `prefix`: `boolean` (default: `false`) - ---- - -### variableDeclaration -```javascript -t.variableDeclaration(kind, declarations) -``` - -See also `t.isVariableDeclaration(node, opts)` and `t.assertVariableDeclaration(node, opts)`. - -Aliases: `Statement`, `Declaration` - - - `kind`: `"var" | "let" | "const"` (required) - - `declarations`: `Array` (required) - ---- - -### variableDeclarator -```javascript -t.variableDeclarator(id, init) -``` - -See also `t.isVariableDeclarator(node, opts)` and `t.assertVariableDeclarator(node, opts)`. - - - `id`: `LVal` (required) - - `init`: `Expression` (default: `null`) - ---- - -### voidTypeAnnotation -```javascript -t.voidTypeAnnotation() -``` - -See also `t.isVoidTypeAnnotation(node, opts)` and `t.assertVoidTypeAnnotation(node, opts)`. - -Aliases: `Flow`, `FlowBaseAnnotation` - - ---- - -### whileStatement -```javascript -t.whileStatement(test, body) -``` - -See also `t.isWhileStatement(node, opts)` and `t.assertWhileStatement(node, opts)`. - -Aliases: `Statement`, `BlockParent`, `Loop`, `While`, `Scopable` - - - `test`: `Expression` (required) - - `body`: `BlockStatement | Statement` (required) - ---- - -### withStatement -```javascript -t.withStatement(object, body) -``` - -See also `t.isWithStatement(node, opts)` and `t.assertWithStatement(node, opts)`. - -Aliases: `Statement` - - - `object` (required) - - `body`: `BlockStatement | Statement` (required) - ---- - -### yieldExpression -```javascript -t.yieldExpression(argument, delegate) -``` - -See also `t.isYieldExpression(node, opts)` and `t.assertYieldExpression(node, opts)`. - -Aliases: `Expression`, `Terminatorless` - - - `argument`: `Expression` (default: `null`) - - `delegate`: `boolean` (default: `false`) - ---- - - - - diff --git a/typescript/hello-world/node_modules/babel-types/package.json b/typescript/hello-world/node_modules/babel-types/package.json deleted file mode 100644 index 614b6e3..0000000 --- a/typescript/hello-world/node_modules/babel-types/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "babel-types", - "version": "6.25.0", - "description": "Babel Types is a Lodash-esque utility library for AST nodes", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "repository": "https://github.com/babel/babel/tree/master/packages/babel-types", - "main": "lib/index.js", - "dependencies": { - "babel-runtime": "^6.22.0", - "esutils": "^2.0.2", - "lodash": "^4.2.0", - "to-fast-properties": "^1.0.1" - }, - "devDependencies": { - "babylon": "^6.17.2" - } -} diff --git a/typescript/hello-world/node_modules/babylon/CHANGELOG.md b/typescript/hello-world/node_modules/babylon/CHANGELOG.md deleted file mode 100644 index af5b2bc..0000000 --- a/typescript/hello-world/node_modules/babylon/CHANGELOG.md +++ /dev/null @@ -1,974 +0,0 @@ -# Changelog - -> **Tags:** -> - :boom: [Breaking Change] -> - :eyeglasses: [Spec Compliancy] -> - :rocket: [New Feature] -> - :bug: [Bug Fix] -> - :memo: [Documentation] -> - :house: [Internal] -> - :nail_care: [Polish] - -> Semver Policy: https://github.com/babel/babylon#semver - -_Note: Gaps between patch versions are faulty, broken or test releases._ - -See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog. - -## 6.17.3 (2017-06-09) - - * Fix location info on FunctionTypeParam nodes (#565) (#571) (Michal Srb) - * Fix stmt value being the raw value (#557) (#558) (Daniel Tschinder) - -## 6.17.2 (2017-05-31) - - * Fixed disappearing comments following a trailing comma on the last property of an object literal or the last argument of a call expression (#478) (aardito2) - * Fix #437: only prohibit 'export type from "module" ' when flow is enabled (#438) (Kevin Gibbons) - * Fix handling of anonymous parameters in `flowParseObjectTypeMethodish`. (#526) (Max Schaefer) - * Convert argument of SpreadElement correctly to assignable (#518) (Daniel Tschinder) - -## 6.17.1 (2017-05-10) - - * Fix typo in flow spread operator error (Brian Ng) - * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko) - * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko) - * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng) - * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng) - * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng) - * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng) - -## 6.17.0 (2017-04-20) - - * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie) - * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons) - * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng) - * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons) - * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng) - * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng) - -## 6.16.0 (2017-02-23) - -### :rocket: New Feature - -***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder) - -We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/) - -We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc. - -To enable `estree` mode simply add the plugin in the config: -```json -{ - "plugins": [ "estree" ] -} -``` - -If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned. - -Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew) - -Babylon exports a new function to parse a single expression - -```js -import { parseExpression } from 'babylon'; - -const ast = parseExpression('x || y && z', options); -``` - -The returned AST will only consist of the expression. The options are the same as for `parse()` - -Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu) - -A new option was added to babylon allowing to change the intial linenumber for the first line which is usually `1`. -Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ... - -Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris) - -Added support for function predicates which flow introduced in version 0.33.0 - -```js -declare function is_number(x: mixed): boolean %checks(typeof x === "number"); -``` - -Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder) - -Added support for imports within module declarations which flow introduced in version 0.37.0 - -```js -declare module "C" { - import type { DT } from "D"; - declare export type CT = { D: DT }; -} -``` - -### :eyeglasses: Spec Compliancy - -Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons) - -This example now correctly throws an error when there is a semicolon after the decorator: - -```js -class A { -@a; -foo(){} -} -``` - -Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder) - -Using keywords in imports is not allowed anymore: - -```js -import { default } from "foo"; -import { a as debugger } from "foo"; -``` - -Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder) - -In flow it is now forbidden to overwrite the primitve types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration. - -Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder) - -The following code now correctly throws an error - -```js -import type { type a } from "foo"; -``` - -Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine) - -Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour. - -If you enable the flow plugin you can only define the type of the class properties, but not initialize them. - -Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder) - -Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`. - -```js -export default async function bar() {}; -``` - -### :nail_care: Polish - -Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng) - -### :bug: Bug Fix - -Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder) - -Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng) - -ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder) - -Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder) - -Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder) - -Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder) - -Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng) - -Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper) - - -### :house: Internal - -Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray) - -Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray) - -Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder) - -chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot]) - -Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder) - -Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot]) - -Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot]) - -devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo) - -Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder) - -Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder) - -### :memo: Documentation - -Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng) - -Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu) - -Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro) - -AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens) - -## 6.15.0 (2017-01-10) - -### :eyeglasses: Spec Compliancy - -Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison) - -This change implements flows new shorthand import syntax -and where previously you had to write this code: - -```js -import {someValue} from "blah"; -import type {someType} from "blah"; -import typeof {someOtherValue} from "blah"; -``` - -you can now write it like this: - -```js -import { - someValue, - type someType, - typeof someOtherValue, -} from "blah"; -``` - -For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request. - -flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin) - -This change now allows a leading pipe everywhere types can be used: -```js -var f = (x): | 1 | 2 => 1; -``` - -Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo) - -Previously babylon parsed the following exports, although they are not valid: -```js -export typeof foo; -export new Foo(); -export function() {}; -export for (;;); -export while(foo); -``` - -### :bug: Bug Fix - -Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin) - -This fixes parsing of this case: - -```js -const map = { - [age <= 17] : 'Too young' -}; -``` - -Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long) - -The following case produced an invalid AST -```js -
{/* foo */}
-``` - -Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy) - -When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST. - -Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant) - -Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray) - -### :house: Internal - -User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder) - -Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo) - -Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine) - -Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder) - -Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine) - -Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU) - -Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot]) - -chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot]) - -chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot]) - -## 6.14.1 (2016-11-17) - -### :bug: Bug Fix - -Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder) - -```js -{ - "plugins": ["*"] -} -``` - -Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer. - -## 6.14.0 (2016-11-16) - -### :eyeglasses: Spec Compliancy - -Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo) - -[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words) - -Babylon will throw for more reserved words such as `enum` or `await` (in strict mode). - -``` -class enum {} // throws -class await {} // throws in strict mode (module) -``` - -Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi) - -So where you used to have to write - -```js -type A = (x: string, y: boolean) => number; -type B = (z: string) => number; -type C = { [key: string]: number }; -``` - -you can now write (with flow 0.34.0) - -```js -type A = (string, boolean) => number; -type B = string => number; -type C = { [string]: number }; -``` - -Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner) - -Supports these form now of specifying array types: - -```js -var a: number[][][][]; -var b: string[][]; -``` - -### :bug: Bug Fix - -Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder) - -``` -declare module "foo" { declare module.exports: number } -declare module "foo" { declare module.exports: number; } // also allowed now -``` - -### :house: Internal - - * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman) - * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger) - * Add node 7 (Daniel Tschinder) - * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper) - -## v6.13.1 (2016-10-26) - -### :nail_care: Polish - -- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML)) - -```js -const babylon = require('babylon'); -const ast = babylon.parse('var foo = "lol";'); -``` - -With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph. - -**Without bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png) - -**With bundling** -![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png) - -- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu) -- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu) - -## v6.13.0 (2016-10-21) - -### :eyeglasses: Spec Compliancy - -Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman) - -> See https://flowtype.org/docs/variance.html for more information - -```js -type T = { +p: T }; -interface T { -p: T }; -declare class T { +[k:K]: V }; -class T { -[k:K]: V }; -class C2 { +p: T = e }; -``` - -Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman) - -```js -({ __proto__: 1, __proto__: 2 }) // Throws an error now -``` - -### :bug: Bug Fix - -Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman) - -```js -declare class A { - static: T; -} -``` - -Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine) - -```js -var foo = { async, bar }; -``` - -### :nail_care: Polish - -Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder) - -> This improves the performance slightly (because of hidden classes) - -### :house: Internal - -Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman) - -Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman) - -Readd missin .eslinignore for IDEs (Daniel Tschinder) - -Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman) - -Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman) - -Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman) - -## v6.12.0 (2016-10-14) - -### :eyeglasses: Spec Compliancy - -Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler) - -#### Dynamic Import - -- Proposal Repo: https://github.com/domenic/proposal-dynamic-import -- Championed by [@domenic](https://github.com/domenic) -- stage-2 -- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import) - -> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript - -```js -import(`./section-modules/${link.dataset.entryModule}.js`) -.then(module => { - module.loadPageInto(main); -}) -``` - -Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman) - -#### EmptyTypeAnnotation - -Just wasn't covered before. - -```js -type T = empty; -``` - -### :bug: Bug Fix - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing due to sparse array -export const { foo: [ ,, qux7 ] } = bar; -``` - -Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper) - -```js -declare class X { - foobar(): void; - static foobar(): void; -} -``` - -Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper) - -```js -class Foo { - delete(item: T): T { - return item; - } -} -``` - -Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder) - -```js -function *foo() { - const x = (yield 5: any); -} -``` - -### :nail_care: Polish - -Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman) - -```js -// Unexpected token, expected ; (1:6) -{ set 1 } -``` - -### :house: Internal - -Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder) - -Also run flow, linting, babel tests on seperate instances (add back node 0.10) - -## v6.11.6 (2016-10-12) - -### :bug: Bug Fix/Regression - -Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels) - -```js -// was failing with `Cannot read property 'type' of null` because of null identifiers -export const { foo: [ ,, qux7 ] } = bar; -``` - -## v6.11.5 (2016-10-12) - -### :eyeglasses: Spec Compliancy - -Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:20) -export function foo() {}; -export const { a: [{foo}] } = bar; -``` - -Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo) - -```js -// `foo` has already been exported. Exported identifiers must be unique. (2:22) -export const foo = 1; -export const [bar, ...foo] = baz; -``` - -### :bug: Bug Fix - -Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo) - -```js -// this is ok now -const test = ({async = true}) => {}; -``` - -### :nail_care: Polish - -Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder) - -```bash -# So in the case of a missing ending curly (`}`) -Module build failed: SyntaxError: Unexpected token, expected } (30:0) - 28 | } - 29 | -> 30 | - | ^ -``` - -## v6.11.4 (2016-10-03) - -Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu) - -## v6.11.3 (2016-10-01) - -### :eyeglasses: Spec Compliancy - -Add static errors for object rest (#149) ([@danez](https://github.com/danez)) - -> https://github.com/sebmarkbage/ecmascript-rest-spread - -Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right. - -```js -let { x, y, ...z } = { x: 1, y: 2, z: 3 }; -// x = 1 -// y = 2 -// z = { z: 3 } -``` - -#### New Syntax Errors: - -**SyntaxError**: The rest element has to be the last element when destructuring (1:10) -```bash -> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = { x: 1, y: 2, z: 3 } -# y = 2 -# z = 3 -``` - -Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think. - -**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13) - -```bash -> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3}; - | ^ -# Previous behavior: -# x = 1 -# y = { y: 2, z: 3 } -# z = { y: 2, z: 3 } -``` - -Before y and z would just be the same value anyway so there is no reason to need to have both. - -**SyntaxError**: A trailing comma is not permitted after the rest element (1:16) - -```js -let { x, y, ...z, } = obj; -``` - -The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense. - ---- - -get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell)) - -```js -// valid -function something({ set = null, get = null }) {} -``` - -## v6.11.2 (2016-09-23) - -### Bug Fix - -- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo - -```js -// regression with duplicate export check -SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13) - 20 | - 21 | export const { rhythm } = typography; -> 22 | export const { TypographyStyle } = typography -``` - -Bail out for now, and make a change to account for destructuring in the next release. - -## 6.11.1 (2016-09-22) - -### Bug Fix -- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez - -```javascript -export toString from './toString'; -``` - -```bash -`toString` has already been exported. Exported identifiers must be unique. (1:7) -> 1 | export toString from './toString'; - | ^ - 2 | -``` - -## 6.11.0 (2016-09-22) - -### Spec Compliancy (will break CI) - -- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo - -```js -// Only one default export allowed per module. (2:9) -export default function() {}; -export { foo as default }; - -// Only one default export allowed per module. (2:0) -export default {}; -export default function() {}; - -// `Foo` has already been exported. Exported identifiers must be unique. (2:0) -export { Foo }; -export class Foo {}; -``` - -### New Feature (Syntax) - -- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88 - -```js -// AST -interface ClassProperty <: Node { - type: "ClassProperty"; - key: Identifier; - value: Expression; - computed: boolean; // added -} -``` - -```js -// with "plugins": ["classProperties"] -class Foo { - [x] - ['y'] -} - -class Bar { - [p] - [m] () {} -} - ``` - -### Bug Fix - -- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper - -```js -declare class X { - a: number; - static b: number; // static - c: number; // this was being marked as static in the AST as well -} -``` - -### Polish - -- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88 - -```js -// Used to error with: -// SyntaxError: Assigning to rvalue (1:0) - -// Now: -// Invalid left-hand side in assignment expression (1:0) -3 = 4 - -// Invalid left-hand side in for-in statement (1:5) -for (+i in {}); -``` - -### Internal - -- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez -- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo - -## 6.10.0 (2016-09-19) - -> We plan to include some spec compliancy bugs in patch versions. An example was the multiple default exports issue. - -### Spec Compliancy - -* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) - -> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors - -More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) - -For example: - -```js -// this errors because it uses destructuring and default parameters -// in a function with a "use strict" directive -function a([ option1, option2 ] = []) { - "use strict"; -} - ``` - -The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. - -### New Feature - -* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer) - -Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8 - -Looks like: - -```js -var a : {| x: number, y: string |} = { x: 0, y: 'foo' }; -``` - -### Bug Fixes - -* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder) -* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper) -* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper) - -### Misc - -* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder) -* Fix Contributing guidelines [skip ci] (Daniel Tschinder) - -## 6.9.2 (2016-09-09) - -The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller. - -## 6.9.1 (2016-08-23) - -This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops. - -### Bug Fixes - -- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez -- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez -- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper -- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez -- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez - -## 6.9.0 (2016-08-16) - -### New syntax support - -- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer - -(Be aware that React is not going to support this syntax) - -```js -
- {...todos.map(todo => )} -
-``` - -- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez - -```js -declare module "foo" { - declare module.exports: {} -} -``` - -### New Features - -- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain -- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens - -### Bug Fixes - -- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez -- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez -- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi -- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez -- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi -- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez -- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez - -### Internal - -- Add codecoverage to tests @danez -- Fix tests to not save expected output if we expect the test to fail @danez -- Make a shallow clone of babel for testing @danez -- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot -- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot -- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot -- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot - -## 6.8.4 (2016-07-06) - -### Bug Fixes - -- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez - -## 6.8.3 (2016-07-02) - -### Bug Fixes - -- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez - -## 6.8.2 (2016-06-24) - -### Bug Fixes - -- Fix parse error with yielding jsx elements in generators `function* it() { yield ; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal -- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez -- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez -- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez -- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez -- Support negative numeric type literals @kittens -- Remove line terminator restriction after await keyword @kittens -- Remove grouped type arrow restriction as it seems flow no longer has it @kittens -- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin -- Fix parse error with arrow functions that have flow type parameter declarations `(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi - -### Documentation - -- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene -- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo - -### Internal - -- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez -- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez -- Upgrade test runner ava @kittens -- Add missing generate-identifier-regex script @kittens -- Rename parser context types @kittens -- Add node v6 to travis testing @hzoo -- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens - -## 6.8.1 (2016-06-06) - -### New Feature - -- Parse type parameter declarations with defaults like `type Foo = T` - -### Bug Fixes -- Type parameter declarations need 1 or more type parameters. -- The existential type `*` is not a valid type parameter. -- The existential type `*` is a primary type - -### Spec Compliancy -- The param list for type parameter declarations now consists of `TypeParameter` nodes -- New `TypeParameter` AST Node (replaces using the `Identifier` node before) - -``` -interface TypeParameter <: Node { - bound: TypeAnnotation; - default: TypeAnnotation; - name: string; - variance: "plus" | "minus"; -} -``` - -## 6.8.0 (2016-05-02) - -#### New Feature - -##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12)) - -> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md). - -Examples: - -```js -class Foo { - constructor(@foo() x, @bar({ a: 123 }) @baz() y) {} -} - -export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {} - -var obj = { - method(@foo() x, @bar({ a: 123 }) @baz() y) {} -}; -``` - -##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17)) - -There is also a new node type, `ForAwaitStatement`. - -> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals). - -Example: - -```js -async function f() { - for await (let x of y); -} -``` diff --git a/typescript/hello-world/node_modules/babylon/LICENSE b/typescript/hello-world/node_modules/babylon/LICENSE deleted file mode 100644 index d4c7fc5..0000000 --- a/typescript/hello-world/node_modules/babylon/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012-2014 by various contributors (see AUTHORS) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/typescript/hello-world/node_modules/babylon/README.md b/typescript/hello-world/node_modules/babylon/README.md deleted file mode 100644 index ad2a8fd..0000000 --- a/typescript/hello-world/node_modules/babylon/README.md +++ /dev/null @@ -1,134 +0,0 @@ -

- babylon -

- -

- Babylon is a JavaScript parser used in Babel. -

- -

- Travis Status - Codecov Status -

- - - The latest ECMAScript version enabled by default (ES2017). - - Comment attachment. - - Support for JSX and Flow. - - Support for experimental language proposals (accepting PRs for anything at least [stage-0](https://github.com/tc39/proposals/blob/master/stage-0-proposals.md)). - -## Credits - -Heavily based on [acorn](https://github.com/marijnh/acorn) and [acorn-jsx](https://github.com/RReverser/acorn-jsx), -thanks to the awesome work of [@RReverser](https://github.com/RReverser) and [@marijnh](https://github.com/marijnh). - -Significant diversions are expected to occur in the future such as streaming, EBNF definitions, sweet.js integration, interspatial parsing and more. - -## API - -### `babylon.parse(code, [options])` - -### `babylon.parseExpression(code, [options])` - -`parse()` parses the provided `code` as an entire ECMAScript program, while -`parseExpression()` tries to parse a single Expression with performance in -mind. When in doubt, use `.parse()`. - -### Options - -- **allowImportExportEverywhere**: By default, `import` and `export` - declarations can only appear at a program's top level. Setting this - option to `true` allows them anywhere where a statement is allowed. - -- **allowReturnOutsideFunction**: By default, a return statement at - the top level raises an error. Set this to `true` to accept such - code. - -- **allowSuperOutsideMethod**: TODO - -- **sourceType**: Indicate the mode the code should be parsed in. Can be - either `"script"` or `"module"`. - -- **sourceFilename**: Correlate output AST nodes with their source filename. Useful when generating code and source maps from the ASTs of multiple input files. - -- **startLine**: By default, the first line of code parsed is treated as line 1. You can provide a line number to alternatively start with. Useful for integration with other source tools. - -- **plugins**: Array containing the plugins that you want to enable. - -- **strictMode**: TODO - -### Output - -Babylon generates AST according to [Babel AST format][]. -It is based on [ESTree spec][] with the following deviations: - -> There is now an `estree` plugin which reverts these deviations - -- [Literal][] token is replaced with [StringLiteral][], [NumericLiteral][], [BooleanLiteral][], [NullLiteral][], [RegExpLiteral][] -- [Property][] token is replaced with [ObjectProperty][] and [ObjectMethod][] -- [MethodDefinition][] is replaced with [ClassMethod][] -- [Program][] and [BlockStatement][] contain additional `directives` field with [Directive][] and [DirectiveLiteral][] -- [ClassMethod][], [ObjectProperty][], and [ObjectMethod][] value property's properties in [FunctionExpression][] is coerced/brought into the main method node. - -AST for JSX code is based on [Facebook JSX AST][] with the addition of one node type: - -- `JSXText` - -[Babel AST format]: https://github.com/babel/babylon/blob/master/ast/spec.md -[ESTree spec]: https://github.com/estree/estree - -[Literal]: https://github.com/estree/estree/blob/master/es5.md#literal -[Property]: https://github.com/estree/estree/blob/master/es5.md#property -[MethodDefinition]: https://github.com/estree/estree/blob/master/es2015.md#methoddefinition - -[StringLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#stringliteral -[NumericLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#numericliteral -[BooleanLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#booleanliteral -[NullLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#nullliteral -[RegExpLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#regexpliteral -[ObjectProperty]: https://github.com/babel/babylon/blob/master/ast/spec.md#objectproperty -[ObjectMethod]: https://github.com/babel/babylon/blob/master/ast/spec.md#objectmethod -[ClassMethod]: https://github.com/babel/babylon/blob/master/ast/spec.md#classmethod -[Program]: https://github.com/babel/babylon/blob/master/ast/spec.md#programs -[BlockStatement]: https://github.com/babel/babylon/blob/master/ast/spec.md#blockstatement -[Directive]: https://github.com/babel/babylon/blob/master/ast/spec.md#directive -[DirectiveLiteral]: https://github.com/babel/babylon/blob/master/ast/spec.md#directiveliteral -[FunctionExpression]: https://github.com/babel/babylon/blob/master/ast/spec.md#functionexpression - -[Facebook JSX AST]: https://github.com/facebook/jsx/blob/master/AST.md - -### Semver - -Babylon follows semver in most situations. The only thing to note is that some spec-compliancy bug fixes may be released under patch versions. - -For example: We push a fix to early error on something like [#107](https://github.com/babel/babylon/pull/107) - multiple default exports per file. That would be considered a bug fix even though it would cause a build to fail. - -### Example - -```javascript -require("babylon").parse("code", { - // parse in strict mode and allow module declarations - sourceType: "module", - - plugins: [ - // enable jsx and flow syntax - "jsx", - "flow" - ] -}); -``` - -### Plugins - - - `estree` - - `jsx` - - `flow` - - `doExpressions` - - `objectRestSpread` - - `decorators` (Based on an outdated version of the Decorators proposal. Will be removed in a future version of `Babylon`) - - `classProperties` - - `exportExtensions` - - `asyncGenerators` - - `functionBind` - - `functionSent` - - `dynamicImport` - - `templateInvalidEscapes` diff --git a/typescript/hello-world/node_modules/babylon/bin/babylon.js b/typescript/hello-world/node_modules/babylon/bin/babylon.js deleted file mode 100755 index 449ddfe..0000000 --- a/typescript/hello-world/node_modules/babylon/bin/babylon.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node -/* eslint no-var: 0 */ - -var babylon = require(".."); -var fs = require("fs"); - -var filename = process.argv[2]; -if (!filename) { - console.error("no filename specified"); - process.exit(0); -} - -var file = fs.readFileSync(filename, "utf8"); -var ast = babylon.parse(file); - -console.log(JSON.stringify(ast, null, " ")); diff --git a/typescript/hello-world/node_modules/babylon/bin/generate-identifier-regex.js b/typescript/hello-world/node_modules/babylon/bin/generate-identifier-regex.js deleted file mode 100644 index 9b0ae7d..0000000 --- a/typescript/hello-world/node_modules/babylon/bin/generate-identifier-regex.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; - -// Which Unicode version should be used? -const version = "9.0.0"; - -const start = require("unicode-" + version + "/Binary_Property/ID_Start/code-points.js") - .filter(function(ch) { return ch > 0x7f; }); -let last = -1; -const cont = [0x200c, 0x200d].concat( - require("unicode-" + version + "/Binary_Property/ID_Continue/code-points.js") - .filter(function(ch) { - return ch > 0x7f && search(start, ch, last + 1) == -1; - }) - ); - -function search(arr, ch, starting) { - for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) - if (arr[i] === ch) - return i; - return -1; -} - -function pad(str, width) { - while (str.length < width) str = "0" + str; - return str; -} - -function esc(code) { - const hex = code.toString(16); - if (hex.length <= 2) return "\\x" + pad(hex, 2); - else return "\\u" + pad(hex, 4); -} - -function generate(chars) { - const astral = []; - let re = ""; - for (let i = 0, at = 0x10000; i < chars.length; i++) { - const from = chars[i]; - let to = from; - while (i < chars.length - 1 && chars[i + 1] == to + 1) { - i++; - to++; - } - if (to <= 0xffff) { - if (from == to) re += esc(from); - else if (from + 1 == to) re += esc(from) + esc(to); - else re += esc(from) + "-" + esc(to); - } else { - astral.push(from - at, to - from); - at = to; - } - } - return { nonASCII: re, astral: astral }; -} - -const startData = generate(start); -const contData = generate(cont); - -console.log("let nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";"); -console.log("let nonASCIIidentifierChars = \"" + contData.nonASCII + "\";"); -console.log("const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"); -console.log("const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"); diff --git a/typescript/hello-world/node_modules/babylon/package.json b/typescript/hello-world/node_modules/babylon/package.json deleted file mode 100644 index b5c5d68..0000000 --- a/typescript/hello-world/node_modules/babylon/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "babylon", - "version": "6.17.3", - "description": "A JavaScript parser", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "keywords": [ - "babel", - "javascript", - "parser", - "babylon" - ], - "repository": "https://github.com/babel/babylon", - "main": "lib/index.js", - "files": [ - "bin", - "lib" - ], - "devDependencies": { - "ava": "^0.17.0", - "babel-cli": "^6.14.0", - "babel-eslint": "^7.0.0", - "babel-helper-fixtures": "^6.9.0", - "babel-plugin-external-helpers": "^6.18.0", - "babel-plugin-istanbul": "^3.0.0", - "babel-plugin-transform-flow-strip-types": "^6.14.0", - "babel-preset-es2015": "^6.14.0", - "babel-preset-stage-0": "^6.5.0", - "chalk": "^1.1.3", - "codecov": "^1.0.1", - "cross-env": "^2.0.0", - "eslint": "^3.7.1", - "eslint-config-babel": "^6.0.0", - "eslint-plugin-flowtype": "^2.20.0", - "flow-bin": "^0.42.0", - "nyc": "^10.0.0", - "rimraf": "^2.5.4", - "rollup": "^0.41.0", - "rollup-plugin-babel": "^2.6.1", - "rollup-plugin-node-resolve": "^2.0.0", - "rollup-watch": "^3.2.2", - "unicode-9.0.0": "~0.7.0" - }, - "bin": { - "babylon": "./bin/babylon.js" - }, - "scripts": { - "build": "npm run clean && rollup -c", - "coverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json", - "lint": "eslint src bin", - "clean": "rimraf lib", - "flow": "flow", - "prepublish": "cross-env BABEL_ENV=production npm run build", - "preversion": "npm run test && npm run changelog", - "test": "npm run lint && npm run flow && npm run build -- -m && npm run test-only", - "test-only": "ava", - "test-ci": "nyc npm run test-only", - "changelog": "git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request'", - "watch": "npm run clean && rollup -c --watch" - }, - "nyc": { - "include": [ - "src/**/*.js", - "bin/**/*.js" - ], - "sourceMap": false, - "instrument": false - }, - "ava": { - "files": [ - "test/*.js" - ], - "source": [ - "src/**/*.js", - "bin/**/*.js" - ] - }, - "greenkeeper": { - "ignore": [ - "cross-env" - ] - } -} diff --git a/typescript/hello-world/node_modules/balanced-match/.npmignore b/typescript/hello-world/node_modules/balanced-match/.npmignore deleted file mode 100644 index ae5d8c3..0000000 --- a/typescript/hello-world/node_modules/balanced-match/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -test -.gitignore -.travis.yml -Makefile -example.js diff --git a/typescript/hello-world/node_modules/balanced-match/LICENSE.md b/typescript/hello-world/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e4..0000000 --- a/typescript/hello-world/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/typescript/hello-world/node_modules/balanced-match/README.md b/typescript/hello-world/node_modules/balanced-match/README.md deleted file mode 100644 index 08e918c..0000000 --- a/typescript/hello-world/node_modules/balanced-match/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/typescript/hello-world/node_modules/balanced-match/index.js b/typescript/hello-world/node_modules/balanced-match/index.js deleted file mode 100644 index 1685a76..0000000 --- a/typescript/hello-world/node_modules/balanced-match/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/typescript/hello-world/node_modules/balanced-match/package.json b/typescript/hello-world/node_modules/balanced-match/package.json deleted file mode 100644 index 61349c6..0000000 --- a/typescript/hello-world/node_modules/balanced-match/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "balanced-match", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "1.0.0", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", - "scripts": { - "test": "make test", - "bench": "make bench" - }, - "dependencies": {}, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/typescript/hello-world/node_modules/bcrypt-pbkdf/README.md b/typescript/hello-world/node_modules/bcrypt-pbkdf/README.md deleted file mode 100644 index 1201809..0000000 --- a/typescript/hello-world/node_modules/bcrypt-pbkdf/README.md +++ /dev/null @@ -1,39 +0,0 @@ -Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified -version of [Devi Mandiri's port] -(https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), -with some minor performance improvements. The code is copied verbatim (and -un-styled) from Devi's work. - -This product includes software developed by Niels Provos. - -## API - -### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` - -Derive a cryptographic key of arbitrary length from a given password and salt, -using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and -SHA-512. - -See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for -further information. - -Parameters: - - * `pass`, a Uint8Array of length `passlen` - * `passlen`, an integer Number - * `salt`, a Uint8Array of length `saltlen` - * `saltlen`, an integer Number - * `key`, a Uint8Array of length `keylen`, will be filled with output - * `keylen`, an integer Number - * `rounds`, an integer Number, number of rounds of the PBKDF to run - -### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` - -Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as -part of the inner round function in the PBKDF. - -Parameters: - - * `sha2pass`, a Uint8Array of length 64 - * `sha2salt`, a Uint8Array of length 64 - * `out`, a Uint8Array of length 32, will be filled with output diff --git a/typescript/hello-world/node_modules/bcrypt-pbkdf/index.js b/typescript/hello-world/node_modules/bcrypt-pbkdf/index.js deleted file mode 100644 index b1b5ad4..0000000 --- a/typescript/hello-world/node_modules/bcrypt-pbkdf/index.js +++ /dev/null @@ -1,556 +0,0 @@ -'use strict'; - -var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; - -/* - * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a - * result, it retains the original copyright and license. The two files are - * under slightly different (but compatible) licenses, and are here combined in - * one file. - * - * Credit for the actual porting work goes to: - * Devi Mandiri - */ - -/* - * The Blowfish portions are under the following license: - * - * Blowfish block cipher for OpenBSD - * Copyright 1997 Niels Provos - * All rights reserved. - * - * Implementation advice by David Mazieres . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * The bcrypt_pbkdf portions are under the following license: - * - * Copyright (c) 2013 Ted Unangst - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Performance improvements (Javascript-specific): - * - * Copyright 2016, Joyent Inc - * Author: Alex Wilson - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -// Ported from OpenBSD bcrypt_pbkdf.c v1.9 - -var BLF_J = 0; - -var Blowfish = function() { - this.S = [ - new Uint32Array([ - 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, - 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, - 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, - 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, - 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, - 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, - 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, - 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, - 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, - 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, - 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, - 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, - 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, - 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, - 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, - 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, - 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, - 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, - 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, - 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, - 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, - 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, - 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, - 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, - 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, - 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, - 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, - 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, - 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, - 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, - 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, - 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, - 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, - 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, - 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, - 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, - 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, - 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, - 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, - 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, - 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, - 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, - 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, - 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, - 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, - 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, - 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, - 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, - 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, - 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, - 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, - 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, - 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, - 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, - 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, - 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, - 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, - 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, - 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, - 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, - 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, - 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, - 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, - 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), - new Uint32Array([ - 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, - 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, - 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, - 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, - 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, - 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, - 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, - 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, - 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, - 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, - 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, - 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, - 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, - 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, - 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, - 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, - 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, - 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, - 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, - 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, - 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, - 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, - 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, - 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, - 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, - 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, - 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, - 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, - 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, - 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, - 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, - 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, - 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, - 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, - 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, - 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, - 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, - 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, - 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, - 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, - 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, - 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, - 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, - 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, - 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, - 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, - 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, - 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, - 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, - 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, - 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, - 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, - 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, - 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, - 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, - 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, - 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, - 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, - 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, - 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, - 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, - 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, - 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, - 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), - new Uint32Array([ - 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, - 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, - 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, - 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, - 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, - 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, - 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, - 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, - 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, - 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, - 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, - 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, - 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, - 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, - 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, - 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, - 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, - 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, - 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, - 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, - 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, - 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, - 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, - 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, - 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, - 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, - 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, - 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, - 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, - 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, - 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, - 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, - 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, - 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, - 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, - 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, - 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, - 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, - 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, - 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, - 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, - 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, - 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, - 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, - 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, - 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, - 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, - 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, - 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, - 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, - 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, - 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, - 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, - 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, - 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, - 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, - 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, - 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, - 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, - 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, - 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, - 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, - 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, - 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), - new Uint32Array([ - 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, - 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, - 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, - 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, - 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, - 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, - 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, - 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, - 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, - 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, - 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, - 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, - 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, - 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, - 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, - 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, - 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, - 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, - 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, - 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, - 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, - 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, - 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, - 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, - 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, - 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, - 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, - 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, - 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, - 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, - 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, - 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, - 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, - 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, - 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, - 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, - 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, - 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, - 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, - 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, - 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, - 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, - 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, - 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, - 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, - 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, - 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, - 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, - 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, - 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, - 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, - 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, - 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, - 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, - 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, - 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, - 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, - 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, - 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, - 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, - 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, - 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, - 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, - 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) - ]; - this.P = new Uint32Array([ - 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, - 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, - 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, - 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, - 0x9216d5d9, 0x8979fb1b]); -}; - -function F(S, x8, i) { - return (((S[0][x8[i+3]] + - S[1][x8[i+2]]) ^ - S[2][x8[i+1]]) + - S[3][x8[i]]); -}; - -Blowfish.prototype.encipher = function(x, x8) { - if (x8 === undefined) { - x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - } - x[0] ^= this.P[0]; - for (var i = 1; i < 16; i += 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[17]; - x[1] = t; -}; - -Blowfish.prototype.decipher = function(x) { - var x8 = new Uint8Array(x.buffer); - if (x.byteOffset !== 0) - x8 = x8.subarray(x.byteOffset); - x[0] ^= this.P[17]; - for (var i = 16; i > 0; i -= 2) { - x[1] ^= F(this.S, x8, 0) ^ this.P[i]; - x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; - } - var t = x[0]; - x[0] = x[1] ^ this.P[0]; - x[1] = t; -}; - -function stream2word(data, databytes){ - var i, temp = 0; - for (i = 0; i < 4; i++, BLF_J++) { - if (BLF_J >= databytes) BLF_J = 0; - temp = (temp << 8) | data[BLF_J]; - } - return temp; -}; - -Blowfish.prototype.expand0state = function(key, keybytes) { - var d = new Uint32Array(2), i, k; - var d8 = new Uint8Array(d.buffer); - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - BLF_J = 0; - - for (i = 0; i < 18; i += 2) { - this.encipher(d, d8); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - this.encipher(d, d8); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } -}; - -Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { - var d = new Uint32Array(2), i, k; - - for (i = 0, BLF_J = 0; i < 18; i++) { - this.P[i] ^= stream2word(key, keybytes); - } - - for (i = 0, BLF_J = 0; i < 18; i += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.P[i] = d[0]; - this.P[i+1] = d[1]; - } - - for (i = 0; i < 4; i++) { - for (k = 0; k < 256; k += 2) { - d[0] ^= stream2word(data, databytes); - d[1] ^= stream2word(data, databytes); - this.encipher(d); - this.S[i][k] = d[0]; - this.S[i][k+1] = d[1]; - } - } - BLF_J = 0; -}; - -Blowfish.prototype.enc = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.encipher(data.subarray(i*2)); - } -}; - -Blowfish.prototype.dec = function(data, blocks) { - for (var i = 0; i < blocks; i++) { - this.decipher(data.subarray(i*2)); - } -}; - -var BCRYPT_BLOCKS = 8, - BCRYPT_HASHSIZE = 32; - -function bcrypt_hash(sha2pass, sha2salt, out) { - var state = new Blowfish(), - cdata = new Uint32Array(BCRYPT_BLOCKS), i, - ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, - 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, - 105,116,101]); //"OxychromaticBlowfishSwatDynamite" - - state.expandstate(sha2salt, 64, sha2pass, 64); - for (i = 0; i < 64; i++) { - state.expand0state(sha2salt, 64); - state.expand0state(sha2pass, 64); - } - - for (i = 0; i < BCRYPT_BLOCKS; i++) - cdata[i] = stream2word(ciphertext, ciphertext.byteLength); - for (i = 0; i < 64; i++) - state.enc(cdata, cdata.byteLength / 8); - - for (i = 0; i < BCRYPT_BLOCKS; i++) { - out[4*i+3] = cdata[i] >>> 24; - out[4*i+2] = cdata[i] >>> 16; - out[4*i+1] = cdata[i] >>> 8; - out[4*i+0] = cdata[i]; - } -}; - -function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { - var sha2pass = new Uint8Array(64), - sha2salt = new Uint8Array(64), - out = new Uint8Array(BCRYPT_HASHSIZE), - tmpout = new Uint8Array(BCRYPT_HASHSIZE), - countsalt = new Uint8Array(saltlen+4), - i, j, amt, stride, dest, count, - origkeylen = keylen; - - if (rounds < 1) - return -1; - if (passlen === 0 || saltlen === 0 || keylen === 0 || - keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) - return -1; - - stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); - amt = Math.floor((keylen + stride - 1) / stride); - - for (i = 0; i < saltlen; i++) - countsalt[i] = salt[i]; - - crypto_hash_sha512(sha2pass, pass, passlen); - - for (count = 1; keylen > 0; count++) { - countsalt[saltlen+0] = count >>> 24; - countsalt[saltlen+1] = count >>> 16; - countsalt[saltlen+2] = count >>> 8; - countsalt[saltlen+3] = count; - - crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (i = out.byteLength; i--;) - out[i] = tmpout[i]; - - for (i = 1; i < rounds; i++) { - crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); - bcrypt_hash(sha2pass, sha2salt, tmpout); - for (j = 0; j < out.byteLength; j++) - out[j] ^= tmpout[j]; - } - - amt = Math.min(amt, keylen); - for (i = 0; i < amt; i++) { - dest = i * stride + (count - 1); - if (dest >= origkeylen) - break; - key[dest] = out[i]; - } - keylen -= i; - } - - return 0; -}; - -module.exports = { - BLOCKS: BCRYPT_BLOCKS, - HASHSIZE: BCRYPT_HASHSIZE, - hash: bcrypt_hash, - pbkdf: bcrypt_pbkdf -}; diff --git a/typescript/hello-world/node_modules/bcrypt-pbkdf/package.json b/typescript/hello-world/node_modules/bcrypt-pbkdf/package.json deleted file mode 100644 index 51e8141..0000000 --- a/typescript/hello-world/node_modules/bcrypt-pbkdf/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "bcrypt-pbkdf", - "version": "1.0.1", - "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", - "main": "index.js", - "dependencies": { - "tweetnacl": "^0.14.3" - }, - "devDependencies": {}, - "license": "BSD-3-Clause" -} diff --git a/typescript/hello-world/node_modules/boom/.npmignore b/typescript/hello-world/node_modules/boom/.npmignore deleted file mode 100644 index 77ba16c..0000000 --- a/typescript/hello-world/node_modules/boom/.npmignore +++ /dev/null @@ -1,18 +0,0 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - diff --git a/typescript/hello-world/node_modules/boom/.travis.yml b/typescript/hello-world/node_modules/boom/.travis.yml deleted file mode 100755 index dd1b24f..0000000 --- a/typescript/hello-world/node_modules/boom/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js - -node_js: - - 0.10 - - 4.0 - -sudo: false - diff --git a/typescript/hello-world/node_modules/boom/CONTRIBUTING.md b/typescript/hello-world/node_modules/boom/CONTRIBUTING.md deleted file mode 100644 index 8928361..0000000 --- a/typescript/hello-world/node_modules/boom/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md). diff --git a/typescript/hello-world/node_modules/boom/LICENSE b/typescript/hello-world/node_modules/boom/LICENSE deleted file mode 100755 index 3946889..0000000 --- a/typescript/hello-world/node_modules/boom/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012-2014, Walmart and other contributors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - * * * - -The complete list of contributors can be found at: https://github.com/hapijs/boom/graphs/contributors \ No newline at end of file diff --git a/typescript/hello-world/node_modules/boom/README.md b/typescript/hello-world/node_modules/boom/README.md deleted file mode 100755 index cbd91c9..0000000 --- a/typescript/hello-world/node_modules/boom/README.md +++ /dev/null @@ -1,652 +0,0 @@ -![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png) - -HTTP-friendly error objects - -[![Build Status](https://secure.travis-ci.org/hapijs/boom.png)](http://travis-ci.org/hapijs/boom) -[![Current Version](https://img.shields.io/npm/v/boom.svg)](https://www.npmjs.com/package/boom) - -Lead Maintainer: [Adam Bretz](https://github.com/arb) - -**boom** provides a set of utilities for returning HTTP errors. Each utility returns a `Boom` error response -object (instance of `Error`) which includes the following properties: -- `isBoom` - if `true`, indicates this is a `Boom` object instance. -- `isServer` - convenience bool indicating status code >= 500. -- `message` - the error message. -- `output` - the formatted response. Can be directly manipulated after object construction to return a custom - error response. Allowed root keys: - - `statusCode` - the HTTP status code (typically 4xx or 5xx). - - `headers` - an object containing any HTTP headers where each key is a header name and value is the header content. - - `payload` - the formatted object used as the response payload (stringified). Can be directly manipulated but any - changes will be lost - if `reformat()` is called. Any content allowed and by default includes the following content: - - `statusCode` - the HTTP status code, derived from `error.output.statusCode`. - - `error` - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from `statusCode`. - - `message` - the error message derived from `error.message`. -- inherited `Error` properties. - -The `Boom` object also supports the following method: -- `reformat()` - rebuilds `error.output` using the other object properties. - -## Overview - -- Helper methods - - [`wrap(error, [statusCode], [message])`](#wraperror-statuscode-message) - - [`create(statusCode, [message], [data])`](#createstatuscode-message-data) -- HTTP 4xx Errors - - 400: [`Boom.badRequest([message], [data])`](#boombadrequestmessage-data) - - 401: [`Boom.unauthorized([message], [scheme], [attributes])`](#boomunauthorizedmessage-scheme-attributes) - - 403: [`Boom.forbidden([message], [data])`](#boomforbiddenmessage-data) - - 404: [`Boom.notFound([message], [data])`](#boomnotfoundmessage-data) - - 405: [`Boom.methodNotAllowed([message], [data])`](#boommethodnotallowedmessage-data) - - 406: [`Boom.notAcceptable([message], [data])`](#boomnotacceptablemessage-data) - - 407: [`Boom.proxyAuthRequired([message], [data])`](#boomproxyauthrequiredmessage-data) - - 408: [`Boom.clientTimeout([message], [data])`](#boomclienttimeoutmessage-data) - - 409: [`Boom.conflict([message], [data])`](#boomconflictmessage-data) - - 410: [`Boom.resourceGone([message], [data])`](#boomresourcegonemessage-data) - - 411: [`Boom.lengthRequired([message], [data])`](#boomlengthrequiredmessage-data) - - 412: [`Boom.preconditionFailed([message], [data])`](#boompreconditionfailedmessage-data) - - 413: [`Boom.entityTooLarge([message], [data])`](#boomentitytoolargemessage-data) - - 414: [`Boom.uriTooLong([message], [data])`](#boomuritoolongmessage-data) - - 415: [`Boom.unsupportedMediaType([message], [data])`](#boomunsupportedmediatypemessage-data) - - 416: [`Boom.rangeNotSatisfiable([message], [data])`](#boomrangenotsatisfiablemessage-data) - - 417: [`Boom.expectationFailed([message], [data])`](#boomexpectationfailedmessage-data) - - 422: [`Boom.badData([message], [data])`](#boombaddatamessage-data) - - 428: [`Boom.preconditionRequired([message], [data])`](#boompreconditionrequiredmessage-data) - - 429: [`Boom.tooManyRequests([message], [data])`](#boomtoomanyrequestsmessage-data) -- HTTP 5xx Errors - - 500: [`Boom.badImplementation([message], [data])`](#boombadimplementationmessage-data) - - 501: [`Boom.notImplemented([message], [data])`](#boomnotimplementedmessage-data) - - 502: [`Boom.badGateway([message], [data])`](#boombadgatewaymessage-data) - - 503: [`Boom.serverTimeout([message], [data])`](#boomservertimeoutmessage-data) - - 504: [`Boom.gatewayTimeout([message], [data])`](#boomgatewaytimeoutmessage-data) -- [FAQ](#faq) - - -## Helper Methods - -### `wrap(error, [statusCode], [message])` - -Decorates an error with the **boom** properties where: -- `error` - the error object to wrap. If `error` is already a **boom** object, returns back the same object. -- `statusCode` - optional HTTP status code. Defaults to `500`. -- `message` - optional message string. If the error already has a message, it adds the message as a prefix. - Defaults to no message. - -```js -var error = new Error('Unexpected input'); -Boom.wrap(error, 400); -``` - -### `create(statusCode, [message], [data])` - -Generates an `Error` object with the **boom** decorations where: -- `statusCode` - an HTTP error code number. Must be greater or equal 400. -- `message` - optional message string. -- `data` - additional error data set to `error.data` property. - -```js -var error = Boom.create(400, 'Bad request', { timestamp: Date.now() }); -``` - -## HTTP 4xx Errors - -### `Boom.badRequest([message], [data])` - -Returns a 400 Bad Request error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badRequest('invalid query'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 400, - "error": "Bad Request", - "message": "invalid query" -} -``` - -### `Boom.unauthorized([message], [scheme], [attributes])` - -Returns a 401 Unauthorized error where: -- `message` - optional message. -- `scheme` can be one of the following: - - an authentication scheme name - - an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header. -- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used - when `schema` is a string, otherwise it is ignored. Every key/value pair will be included in the - 'WWW-Authenticate' in the format of 'key="value"' as well as in the response payload under the `attributes` key. - `null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as - the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header - will not be present and `isMissing` will be true on the error object. - -If either `scheme` or `attributes` are set, the resultant `Boom` object will have the 'WWW-Authenticate' header set for the response. - -```js -Boom.unauthorized('invalid password'); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password" -}, -"headers" {} -``` - -```js -Boom.unauthorized('invalid password', 'sample'); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password", - "attributes": { - "error": "invalid password" - } -}, -"headers" { - "WWW-Authenticate": "sample error=\"invalid password\"" -} -``` - -```js -Boom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' }); -``` - -Generates the following response: - -```json -"payload": { - "statusCode": 401, - "error": "Unauthorized", - "message": "invalid password", - "attributes": { - "error": "invalid password", - "ttl": 0, - "cache": "", - "foo": "bar" - } -}, -"headers" { - "WWW-Authenticate": "sample ttl=\"0\", cache=\"\", foo=\"bar\", error=\"invalid password\"" -} -``` - -### `Boom.forbidden([message], [data])` - -Returns a 403 Forbidden error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.forbidden('try again some time'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 403, - "error": "Forbidden", - "message": "try again some time" -} -``` - -### `Boom.notFound([message], [data])` - -Returns a 404 Not Found error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notFound('missing'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 404, - "error": "Not Found", - "message": "missing" -} -``` - -### `Boom.methodNotAllowed([message], [data])` - -Returns a 405 Method Not Allowed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.methodNotAllowed('that method is not allowed'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 405, - "error": "Method Not Allowed", - "message": "that method is not allowed" -} -``` - -### `Boom.notAcceptable([message], [data])` - -Returns a 406 Not Acceptable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notAcceptable('unacceptable'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 406, - "error": "Not Acceptable", - "message": "unacceptable" -} -``` - -### `Boom.proxyAuthRequired([message], [data])` - -Returns a 407 Proxy Authentication Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.proxyAuthRequired('auth missing'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 407, - "error": "Proxy Authentication Required", - "message": "auth missing" -} -``` - -### `Boom.clientTimeout([message], [data])` - -Returns a 408 Request Time-out error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.clientTimeout('timed out'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 408, - "error": "Request Time-out", - "message": "timed out" -} -``` - -### `Boom.conflict([message], [data])` - -Returns a 409 Conflict error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.conflict('there was a conflict'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 409, - "error": "Conflict", - "message": "there was a conflict" -} -``` - -### `Boom.resourceGone([message], [data])` - -Returns a 410 Gone error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.resourceGone('it is gone'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 410, - "error": "Gone", - "message": "it is gone" -} -``` - -### `Boom.lengthRequired([message], [data])` - -Returns a 411 Length Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.lengthRequired('length needed'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 411, - "error": "Length Required", - "message": "length needed" -} -``` - -### `Boom.preconditionFailed([message], [data])` - -Returns a 412 Precondition Failed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.preconditionFailed(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 412, - "error": "Precondition Failed" -} -``` - -### `Boom.entityTooLarge([message], [data])` - -Returns a 413 Request Entity Too Large error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.entityTooLarge('too big'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 413, - "error": "Request Entity Too Large", - "message": "too big" -} -``` - -### `Boom.uriTooLong([message], [data])` - -Returns a 414 Request-URI Too Large error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.uriTooLong('uri is too long'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 414, - "error": "Request-URI Too Large", - "message": "uri is too long" -} -``` - -### `Boom.unsupportedMediaType([message], [data])` - -Returns a 415 Unsupported Media Type error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.unsupportedMediaType('that media is not supported'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 415, - "error": "Unsupported Media Type", - "message": "that media is not supported" -} -``` - -### `Boom.rangeNotSatisfiable([message], [data])` - -Returns a 416 Requested Range Not Satisfiable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.rangeNotSatisfiable(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 416, - "error": "Requested Range Not Satisfiable" -} -``` - -### `Boom.expectationFailed([message], [data])` - -Returns a 417 Expectation Failed error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.expectationFailed('expected this to work'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 417, - "error": "Expectation Failed", - "message": "expected this to work" -} -``` - -### `Boom.badData([message], [data])` - -Returns a 422 Unprocessable Entity error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badData('your data is bad and you should feel bad'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 422, - "error": "Unprocessable Entity", - "message": "your data is bad and you should feel bad" -} -``` - -### `Boom.preconditionRequired([message], [data])` - -Returns a 428 Precondition Required error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.preconditionRequired('you must supply an If-Match header'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 428, - "error": "Precondition Required", - "message": "you must supply an If-Match header" -} -``` - -### `Boom.tooManyRequests([message], [data])` - -Returns a 429 Too Many Requests error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.tooManyRequests('you have exceeded your request limit'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 429, - "error": "Too Many Requests", - "message": "you have exceeded your request limit" -} -``` - -## HTTP 5xx Errors - -All 500 errors hide your message from the end user. Your message is recorded in the server log. - -### `Boom.badImplementation([message], [data])` - -Returns a 500 Internal Server Error error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badImplementation('terrible implementation'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 500, - "error": "Internal Server Error", - "message": "An internal server error occurred" -} -``` - -### `Boom.notImplemented([message], [data])` - -Returns a 501 Not Implemented error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.notImplemented('method not implemented'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 501, - "error": "Not Implemented", - "message": "method not implemented" -} -``` - -### `Boom.badGateway([message], [data])` - -Returns a 502 Bad Gateway error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.badGateway('that is a bad gateway'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 502, - "error": "Bad Gateway", - "message": "that is a bad gateway" -} -``` - -### `Boom.serverTimeout([message], [data])` - -Returns a 503 Service Unavailable error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.serverTimeout('unavailable'); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 503, - "error": "Service Unavailable", - "message": "unavailable" -} -``` - -### `Boom.gatewayTimeout([message], [data])` - -Returns a 504 Gateway Time-out error where: -- `message` - optional message. -- `data` - optional additional error data. - -```js -Boom.gatewayTimeout(); -``` - -Generates the following response payload: - -```json -{ - "statusCode": 504, - "error": "Gateway Time-out" -} -``` - -## F.A.Q. - -###### How do I include extra information in my responses? `output.payload` is missing `data`, what gives? - -There is a reason the values passed back in the response payloads are pretty locked down. It's mostly for security and to not leak any important information back to the client. This means you will need to put in a little more effort to include extra information about your custom error. Check out the ["Error transformation"](https://github.com/hapijs/hapi/blob/master/API.md#error-transformation) section in the hapi documentation. diff --git a/typescript/hello-world/node_modules/boom/images/boom.png b/typescript/hello-world/node_modules/boom/images/boom.png deleted file mode 100755 index 373bc13..0000000 Binary files a/typescript/hello-world/node_modules/boom/images/boom.png and /dev/null differ diff --git a/typescript/hello-world/node_modules/boom/package.json b/typescript/hello-world/node_modules/boom/package.json deleted file mode 100644 index f5eea12..0000000 --- a/typescript/hello-world/node_modules/boom/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "boom", - "description": "HTTP-friendly error objects", - "version": "2.10.1", - "repository": "git://github.com/hapijs/boom", - "main": "lib/index.js", - "keywords": [ - "error", - "http" - ], - "engines": { - "node": ">=0.10.40" - }, - "dependencies": { - "hoek": "2.x.x" - }, - "devDependencies": { - "code": "1.x.x", - "lab": "7.x.x" - }, - "scripts": { - "test": "lab -a code -t 100 -L", - "test-cov-html": "lab -a code -r html -o coverage.html -L" - }, - "license": "BSD-3-Clause" -} diff --git a/typescript/hello-world/node_modules/boom/test/index.js b/typescript/hello-world/node_modules/boom/test/index.js deleted file mode 100755 index 79a59e9..0000000 --- a/typescript/hello-world/node_modules/boom/test/index.js +++ /dev/null @@ -1,654 +0,0 @@ -// Load modules - -var Code = require('code'); -var Boom = require('../lib'); -var Lab = require('lab'); - - -// Declare internals - -var internals = {}; - - -// Test shortcuts - -var lab = exports.lab = Lab.script(); -var describe = lab.describe; -var it = lab.it; -var expect = Code.expect; - - -it('returns the same object when already boom', function (done) { - - var error = Boom.badRequest(); - var wrapped = Boom.wrap(error); - expect(error).to.equal(wrapped); - done(); -}); - -it('returns an error with info when constructed using another error', function (done) { - - var error = new Error('ka-boom'); - error.xyz = 123; - var err = Boom.wrap(error); - expect(err.xyz).to.equal(123); - expect(err.message).to.equal('ka-boom'); - expect(err.output).to.deep.equal({ - statusCode: 500, - payload: { - statusCode: 500, - error: 'Internal Server Error', - message: 'An internal server error occurred' - }, - headers: {} - }); - expect(err.data).to.equal(null); - done(); -}); - -it('does not override data when constructed using another error', function (done) { - - var error = new Error('ka-boom'); - error.data = { useful: 'data' }; - var err = Boom.wrap(error); - expect(err.data).to.equal(error.data); - done(); -}); - -it('sets new message when none exists', function (done) { - - var error = new Error(); - var wrapped = Boom.wrap(error, 400, 'something bad'); - expect(wrapped.message).to.equal('something bad'); - done(); -}); - -it('throws when statusCode is not a number', function (done) { - - expect(function () { - - Boom.create('x'); - }).to.throw('First argument must be a number (400+): x'); - done(); -}); - -it('will cast a number-string to an integer', function (done) { - - var codes = [ - { input: '404', result: 404 }, - { input: '404.1', result: 404 }, - { input: 400, result: 400 }, - { input: 400.123, result: 400 }]; - for (var i = 0, il = codes.length; i < il; ++i) { - var code = codes[i]; - var err = Boom.create(code.input); - expect(err.output.statusCode).to.equal(code.result); - } - - done(); -}); - -it('throws when statusCode is not finite', function (done) { - - expect(function () { - - Boom.create(1 / 0); - }).to.throw('First argument must be a number (400+): null'); - done(); -}); - -it('sets error code to unknown', function (done) { - - var err = Boom.create(999); - expect(err.output.payload.error).to.equal('Unknown'); - done(); -}); - -describe('create()', function () { - - it('does not sets null message', function (done) { - - var error = Boom.unauthorized(null); - expect(error.output.payload.message).to.not.exist(); - expect(error.isServer).to.be.false(); - done(); - }); - - it('sets message and data', function (done) { - - var error = Boom.badRequest('Missing data', { type: 'user' }); - expect(error.data.type).to.equal('user'); - expect(error.output.payload.message).to.equal('Missing data'); - done(); - }); -}); - -describe('isBoom()', function () { - - it('returns true for Boom object', function (done) { - - expect(Boom.badRequest().isBoom).to.equal(true); - done(); - }); - - it('returns false for Error object', function (done) { - - expect((new Error()).isBoom).to.not.exist(); - done(); - }); -}); - -describe('badRequest()', function () { - - it('returns a 400 error statusCode', function (done) { - - var error = Boom.badRequest(); - - expect(error.output.statusCode).to.equal(400); - expect(error.isServer).to.be.false(); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.badRequest('my message').message).to.equal('my message'); - done(); - }); - - it('sets the message to HTTP status if none provided', function (done) { - - expect(Boom.badRequest().message).to.equal('Bad Request'); - done(); - }); -}); - -describe('unauthorized()', function () { - - it('returns a 401 error statusCode', function (done) { - - var err = Boom.unauthorized(); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers).to.deep.equal({}); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.unauthorized('my message').message).to.equal('my message'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme', function (done) { - - var err = Boom.unauthorized('boom', 'Test'); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers['WWW-Authenticate']).to.equal('Test error="boom"'); - done(); - }); - - it('returns a WWW-Authenticate header set to the schema array value', function (done) { - - var err = Boom.unauthorized(null, ['Test','one','two']); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers['WWW-Authenticate']).to.equal('Test, one, two'); - done(); - }); - - it('returns a WWW-Authenticate header when passed a scheme and attributes', function (done) { - - var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: null, d: 0 }); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0", error="boom"'); - expect(err.output.payload.attributes).to.deep.equal({ a: 1, b: 'something', c: '', d: 0, error: 'boom' }); - done(); - }); - - it('returns a WWW-Authenticate header when passed attributes, missing error', function (done) { - - var err = Boom.unauthorized(null, 'Test', { a: 1, b: 'something', c: null, d: 0 }); - expect(err.output.statusCode).to.equal(401); - expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0"'); - expect(err.isMissing).to.equal(true); - done(); - }); - - it('sets the isMissing flag when error message is empty', function (done) { - - var err = Boom.unauthorized('', 'Basic'); - expect(err.isMissing).to.equal(true); - done(); - }); - - it('does not set the isMissing flag when error message is not empty', function (done) { - - var err = Boom.unauthorized('message', 'Basic'); - expect(err.isMissing).to.equal(undefined); - done(); - }); - - it('sets a WWW-Authenticate when passed as an array', function (done) { - - var err = Boom.unauthorized('message', ['Basic', 'Example e="1"', 'Another x="3", y="4"']); - expect(err.output.headers['WWW-Authenticate']).to.equal('Basic, Example e="1", Another x="3", y="4"'); - done(); - }); -}); - - -describe('methodNotAllowed()', function () { - - it('returns a 405 error statusCode', function (done) { - - expect(Boom.methodNotAllowed().output.statusCode).to.equal(405); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.methodNotAllowed('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('notAcceptable()', function () { - - it('returns a 406 error statusCode', function (done) { - - expect(Boom.notAcceptable().output.statusCode).to.equal(406); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.notAcceptable('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('proxyAuthRequired()', function () { - - it('returns a 407 error statusCode', function (done) { - - expect(Boom.proxyAuthRequired().output.statusCode).to.equal(407); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.proxyAuthRequired('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('clientTimeout()', function () { - - it('returns a 408 error statusCode', function (done) { - - expect(Boom.clientTimeout().output.statusCode).to.equal(408); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.clientTimeout('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('conflict()', function () { - - it('returns a 409 error statusCode', function (done) { - - expect(Boom.conflict().output.statusCode).to.equal(409); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.conflict('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('resourceGone()', function () { - - it('returns a 410 error statusCode', function (done) { - - expect(Boom.resourceGone().output.statusCode).to.equal(410); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.resourceGone('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('lengthRequired()', function () { - - it('returns a 411 error statusCode', function (done) { - - expect(Boom.lengthRequired().output.statusCode).to.equal(411); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.lengthRequired('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('preconditionFailed()', function () { - - it('returns a 412 error statusCode', function (done) { - - expect(Boom.preconditionFailed().output.statusCode).to.equal(412); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.preconditionFailed('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('entityTooLarge()', function () { - - it('returns a 413 error statusCode', function (done) { - - expect(Boom.entityTooLarge().output.statusCode).to.equal(413); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.entityTooLarge('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('uriTooLong()', function () { - - it('returns a 414 error statusCode', function (done) { - - expect(Boom.uriTooLong().output.statusCode).to.equal(414); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.uriTooLong('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('unsupportedMediaType()', function () { - - it('returns a 415 error statusCode', function (done) { - - expect(Boom.unsupportedMediaType().output.statusCode).to.equal(415); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.unsupportedMediaType('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('rangeNotSatisfiable()', function () { - - it('returns a 416 error statusCode', function (done) { - - expect(Boom.rangeNotSatisfiable().output.statusCode).to.equal(416); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.rangeNotSatisfiable('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('expectationFailed()', function () { - - it('returns a 417 error statusCode', function (done) { - - expect(Boom.expectationFailed().output.statusCode).to.equal(417); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.expectationFailed('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('badData()', function () { - - it('returns a 422 error statusCode', function (done) { - - expect(Boom.badData().output.statusCode).to.equal(422); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.badData('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('preconditionRequired()', function () { - - it('returns a 428 error statusCode', function (done) { - - expect(Boom.preconditionRequired().output.statusCode).to.equal(428); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.preconditionRequired('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('tooManyRequests()', function () { - - it('returns a 429 error statusCode', function (done) { - - expect(Boom.tooManyRequests().output.statusCode).to.equal(429); - done(); - }); - - it('sets the message with the passed-in message', function (done) { - - expect(Boom.tooManyRequests('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('serverTimeout()', function () { - - it('returns a 503 error statusCode', function (done) { - - expect(Boom.serverTimeout().output.statusCode).to.equal(503); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.serverTimeout('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('forbidden()', function () { - - it('returns a 403 error statusCode', function (done) { - - expect(Boom.forbidden().output.statusCode).to.equal(403); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.forbidden('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('notFound()', function () { - - it('returns a 404 error statusCode', function (done) { - - expect(Boom.notFound().output.statusCode).to.equal(404); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.notFound('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('internal()', function () { - - it('returns a 500 error statusCode', function (done) { - - expect(Boom.internal().output.statusCode).to.equal(500); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - var err = Boom.internal('my message'); - expect(err.message).to.equal('my message'); - expect(err.isServer).to.true(); - expect(err.output.payload.message).to.equal('An internal server error occurred'); - done(); - }); - - it('passes data on the callback if its passed in', function (done) { - - expect(Boom.internal('my message', { my: 'data' }).data.my).to.equal('data'); - done(); - }); - - it('returns an error with composite message', function (done) { - - try { - JSON.parse('{'); - } - catch (err) { - var boom = Boom.internal('Someting bad', err); - expect(boom.message).to.equal('Someting bad: Unexpected end of input'); - expect(boom.isServer).to.be.true(); - done(); - } - }); -}); - -describe('notImplemented()', function () { - - it('returns a 501 error statusCode', function (done) { - - expect(Boom.notImplemented().output.statusCode).to.equal(501); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.notImplemented('my message').message).to.equal('my message'); - done(); - }); -}); - - -describe('badGateway()', function () { - - it('returns a 502 error statusCode', function (done) { - - expect(Boom.badGateway().output.statusCode).to.equal(502); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.badGateway('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('gatewayTimeout()', function () { - - it('returns a 504 error statusCode', function (done) { - - expect(Boom.gatewayTimeout().output.statusCode).to.equal(504); - done(); - }); - - it('sets the message with the passed in message', function (done) { - - expect(Boom.gatewayTimeout('my message').message).to.equal('my message'); - done(); - }); -}); - -describe('badImplementation()', function () { - - it('returns a 500 error statusCode', function (done) { - - var err = Boom.badImplementation(); - expect(err.output.statusCode).to.equal(500); - expect(err.isDeveloperError).to.equal(true); - expect(err.isServer).to.be.true(); - done(); - }); -}); - -describe('stack trace', function () { - - it('should omit lib', function (done) { - - ['badRequest', 'unauthorized', 'forbidden', 'notFound', 'methodNotAllowed', - 'notAcceptable', 'proxyAuthRequired', 'clientTimeout', 'conflict', - 'resourceGone', 'lengthRequired', 'preconditionFailed', 'entityTooLarge', - 'uriTooLong', 'unsupportedMediaType', 'rangeNotSatisfiable', 'expectationFailed', - 'badData', 'preconditionRequired', 'tooManyRequests', - - // 500s - 'internal', 'notImplemented', 'badGateway', 'serverTimeout', 'gatewayTimeout', - 'badImplementation' - ].forEach(function (name) { - - var err = Boom[name](); - expect(err.stack).to.not.match(/\/lib\/index\.js/); - }); - - done(); - }); -}); diff --git a/typescript/hello-world/node_modules/brace-expansion/README.md b/typescript/hello-world/node_modules/brace-expansion/README.md deleted file mode 100644 index ed2ec1f..0000000 --- a/typescript/hello-world/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/typescript/hello-world/node_modules/brace-expansion/index.js b/typescript/hello-world/node_modules/brace-expansion/index.js deleted file mode 100644 index 0478be8..0000000 --- a/typescript/hello-world/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/typescript/hello-world/node_modules/brace-expansion/package.json b/typescript/hello-world/node_modules/brace-expansion/package.json deleted file mode 100644 index 66f952a..0000000 --- a/typescript/hello-world/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "1.1.8", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", - "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh", - "bench": "matcha test/perf/bench.js" - }, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/typescript/hello-world/node_modules/braces/LICENSE b/typescript/hello-world/node_modules/braces/LICENSE deleted file mode 100644 index 39245ac..0000000 --- a/typescript/hello-world/node_modules/braces/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/typescript/hello-world/node_modules/braces/README.md b/typescript/hello-world/node_modules/braces/README.md deleted file mode 100644 index 52fa756..0000000 --- a/typescript/hello-world/node_modules/braces/README.md +++ /dev/null @@ -1,248 +0,0 @@ -# braces [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Build Status](https://img.shields.io/travis/jonschlinkert/braces.svg?style=flat)](https://travis-ci.org/jonschlinkert/braces) - -Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install braces --save -``` - -## Features - -* Complete support for the braces part of the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/). Braces passes [all of the relevant unit tests](#bash-4-3-support) from the spec. -* Expands comma-separated values: `a/{b,c}/d` => `['a/b/d', 'a/c/d']` -* Expands alphabetical or numerical ranges: `{1..3}` => `['1', '2', '3']` -* [Very fast](#benchmarks) -* [Special characters](./patterns.md) can be used to generate interesting patterns. - -## Example usage - -```js -var braces = require('braces'); - -braces('a/{x,y}/c{d}e') -//=> ['a/x/cde', 'a/y/cde'] - -braces('a/b/c/{x,y}') -//=> ['a/b/c/x', 'a/b/c/y'] - -braces('a/{x,{1..5},y}/c{d}e') -//=> ['a/x/cde', 'a/1/cde', 'a/y/cde', 'a/2/cde', 'a/3/cde', 'a/4/cde', 'a/5/cde'] -``` - -### Use case: fixtures - -> Use braces to generate test fixtures! - -**Example** - -```js -var braces = require('./'); -var path = require('path'); -var fs = require('fs'); - -braces('blah/{a..z}.js').forEach(function(fp) { - if (!fs.existsSync(path.dirname(fp))) { - fs.mkdirSync(path.dirname(fp)); - } - fs.writeFileSync(fp, ''); -}); -``` - -See the [tests](./test/test.js) for more examples and use cases (also see the [bash spec tests](./test/bash-mm-adjusted.js)); - -### Range expansion - -Uses [expand-range](https://github.com/jonschlinkert/expand-range) for range expansion. - -```js -braces('a{1..3}b') -//=> ['a1b', 'a2b', 'a3b'] - -braces('a{5..8}b') -//=> ['a5b', 'a6b', 'a7b', 'a8b'] - -braces('a{00..05}b') -//=> ['a00b', 'a01b', 'a02b', 'a03b', 'a04b', 'a05b'] - -braces('a{01..03}b') -//=> ['a01b', 'a02b', 'a03b'] - -braces('a{000..005}b') -//=> ['a000b', 'a001b', 'a002b', 'a003b', 'a004b', 'a005b'] - -braces('a{a..e}b') -//=> ['aab', 'abb', 'acb', 'adb', 'aeb'] - -braces('a{A..E}b') -//=> ['aAb', 'aBb', 'aCb', 'aDb', 'aEb'] -``` - -Pass a function as the last argument to customize range expansions: - -```js -var range = braces('x{a..e}y', function (str, i) { - return String.fromCharCode(str) + i; -}); - -console.log(range); -//=> ['xa0y', 'xb1y', 'xc2y', 'xd3y', 'xe4y'] -``` - -See [expand-range](https://github.com/jonschlinkert/expand-range) for benchmarks, tests and the full list of range expansion features. - -## Options - -### options.makeRe - -Type: `Boolean` - -Deafault: `false` - -Return a regex-optimal string. If you're using braces to generate regex, this will result in dramatically faster performance. - -**Examples** - -With the default settings (`{makeRe: false}`): - -```js -braces('{1..5}'); -//=> ['1', '2', '3', '4', '5'] -``` - -With `{makeRe: true}`: - -```js -braces('{1..5}', {makeRe: true}); -//=> ['[1-5]'] - -braces('{3..9..3}', {makeRe: true}); -//=> ['(3|6|9)'] -``` - -### options.bash - -Type: `Boolean` - -Default: `false` - -Enables complete support for the Bash specification. The downside is a 20-25% speed decrease. - -**Example** - -Using the default setting (`{bash: false}`): - -```js -braces('a{b}c'); -//=> ['abc'] -``` - -In bash (and minimatch), braces with one item are not expanded. To get the same result with braces, set `{bash: true}`: - -```js -braces('a{b}c', {bash: true}); -//=> ['a{b}c'] -``` - -### options.nodupes - -Type: `Boolean` - -Deafault: `true` - -Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options - -## Bash 4.3 Support - -> Better support for Bash 4.3 than minimatch - -This project has comprehensive unit tests, including tests coverted from [Bash 4.3](www.gnu.org/software/bash/). Currently only 8 of 102 unit tests fail, and - -## Run benchmarks - -Install dev dependencies: - -```bash -npm i -d && npm benchmark -``` - -### Latest results - -```bash -#1: escape.js - brace-expansion.js x 114,934 ops/sec ±1.24% (93 runs sampled) - braces.js x 342,254 ops/sec ±0.84% (90 runs sampled) - -#2: exponent.js - brace-expansion.js x 12,359 ops/sec ±0.86% (96 runs sampled) - braces.js x 20,389 ops/sec ±0.71% (97 runs sampled) - -#3: multiple.js - brace-expansion.js x 114,469 ops/sec ±1.44% (94 runs sampled) - braces.js x 401,621 ops/sec ±0.87% (91 runs sampled) - -#4: nested.js - brace-expansion.js x 102,769 ops/sec ±1.55% (92 runs sampled) - braces.js x 314,088 ops/sec ±0.71% (98 runs sampled) - -#5: normal.js - brace-expansion.js x 157,577 ops/sec ±1.65% (91 runs sampled) - braces.js x 1,115,950 ops/sec ±0.74% (94 runs sampled) - -#6: range.js - brace-expansion.js x 138,822 ops/sec ±1.71% (91 runs sampled) - braces.js x 1,108,353 ops/sec ±0.85% (94 runs sampled) -``` - -## Related projects - -You might also be interested in these projects: - -* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… [more](https://www.npmjs.com/package/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range) -* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or multiplier to… [more](https://www.npmjs.com/package/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range) -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch) - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/braces/issues/new). - -## Building docs - -Generate readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install verb && npm run docs -``` - -Or, if [verb](https://github.com/verbose/verb) is installed globally: - -```sh -$ verb -``` - -## Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -## Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/braces/blob/master/LICENSE). - -*** - -_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on May 21, 2016._ \ No newline at end of file diff --git a/typescript/hello-world/node_modules/braces/index.js b/typescript/hello-world/node_modules/braces/index.js deleted file mode 100644 index 3b4c58d..0000000 --- a/typescript/hello-world/node_modules/braces/index.js +++ /dev/null @@ -1,399 +0,0 @@ -/*! - * braces - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT license. - */ - -'use strict'; - -/** - * Module dependencies - */ - -var expand = require('expand-range'); -var repeat = require('repeat-element'); -var tokens = require('preserve'); - -/** - * Expose `braces` - */ - -module.exports = function(str, options) { - if (typeof str !== 'string') { - throw new Error('braces expects a string'); - } - return braces(str, options); -}; - -/** - * Expand `{foo,bar}` or `{1..5}` braces in the - * given `string`. - * - * @param {String} `str` - * @param {Array} `arr` - * @param {Object} `options` - * @return {Array} - */ - -function braces(str, arr, options) { - if (str === '') { - return []; - } - - if (!Array.isArray(arr)) { - options = arr; - arr = []; - } - - var opts = options || {}; - arr = arr || []; - - if (typeof opts.nodupes === 'undefined') { - opts.nodupes = true; - } - - var fn = opts.fn; - var es6; - - if (typeof opts === 'function') { - fn = opts; - opts = {}; - } - - if (!(patternRe instanceof RegExp)) { - patternRe = patternRegex(); - } - - var matches = str.match(patternRe) || []; - var m = matches[0]; - - switch(m) { - case '\\,': - return escapeCommas(str, arr, opts); - case '\\.': - return escapeDots(str, arr, opts); - case '\/.': - return escapePaths(str, arr, opts); - case ' ': - return splitWhitespace(str); - case '{,}': - return exponential(str, opts, braces); - case '{}': - return emptyBraces(str, arr, opts); - case '\\{': - case '\\}': - return escapeBraces(str, arr, opts); - case '${': - if (!/\{[^{]+\{/.test(str)) { - return arr.concat(str); - } else { - es6 = true; - str = tokens.before(str, es6Regex()); - } - } - - if (!(braceRe instanceof RegExp)) { - braceRe = braceRegex(); - } - - var match = braceRe.exec(str); - if (match == null) { - return [str]; - } - - var outter = match[1]; - var inner = match[2]; - if (inner === '') { return [str]; } - - var segs, segsLength; - - if (inner.indexOf('..') !== -1) { - segs = expand(inner, opts, fn) || inner.split(','); - segsLength = segs.length; - - } else if (inner[0] === '"' || inner[0] === '\'') { - return arr.concat(str.split(/['"]/).join('')); - - } else { - segs = inner.split(','); - if (opts.makeRe) { - return braces(str.replace(outter, wrap(segs, '|')), opts); - } - - segsLength = segs.length; - if (segsLength === 1 && opts.bash) { - segs[0] = wrap(segs[0], '\\'); - } - } - - var len = segs.length; - var i = 0, val; - - while (len--) { - var path = segs[i++]; - - if (/(\.[^.\/])/.test(path)) { - if (segsLength > 1) { - return segs; - } else { - return [str]; - } - } - - val = splice(str, outter, path); - - if (/\{[^{}]+?\}/.test(val)) { - arr = braces(val, arr, opts); - } else if (val !== '') { - if (opts.nodupes && arr.indexOf(val) !== -1) { continue; } - arr.push(es6 ? tokens.after(val) : val); - } - } - - if (opts.strict) { return filter(arr, filterEmpty); } - return arr; -} - -/** - * Expand exponential ranges - * - * `a{,}{,}` => ['a', 'a', 'a', 'a'] - */ - -function exponential(str, options, fn) { - if (typeof options === 'function') { - fn = options; - options = null; - } - - var opts = options || {}; - var esc = '__ESC_EXP__'; - var exp = 0; - var res; - - var parts = str.split('{,}'); - if (opts.nodupes) { - return fn(parts.join(''), opts); - } - - exp = parts.length - 1; - res = fn(parts.join(esc), opts); - var len = res.length; - var arr = []; - var i = 0; - - while (len--) { - var ele = res[i++]; - var idx = ele.indexOf(esc); - - if (idx === -1) { - arr.push(ele); - - } else { - ele = ele.split('__ESC_EXP__').join(''); - if (!!ele && opts.nodupes !== false) { - arr.push(ele); - - } else { - var num = Math.pow(2, exp); - arr.push.apply(arr, repeat(ele, num)); - } - } - } - return arr; -} - -/** - * Wrap a value with parens, brackets or braces, - * based on the given character/separator. - * - * @param {String|Array} `val` - * @param {String} `ch` - * @return {String} - */ - -function wrap(val, ch) { - if (ch === '|') { - return '(' + val.join(ch) + ')'; - } - if (ch === ',') { - return '{' + val.join(ch) + '}'; - } - if (ch === '-') { - return '[' + val.join(ch) + ']'; - } - if (ch === '\\') { - return '\\{' + val + '\\}'; - } -} - -/** - * Handle empty braces: `{}` - */ - -function emptyBraces(str, arr, opts) { - return braces(str.split('{}').join('\\{\\}'), arr, opts); -} - -/** - * Filter out empty-ish values - */ - -function filterEmpty(ele) { - return !!ele && ele !== '\\'; -} - -/** - * Handle patterns with whitespace - */ - -function splitWhitespace(str) { - var segs = str.split(' '); - var len = segs.length; - var res = []; - var i = 0; - - while (len--) { - res.push.apply(res, braces(segs[i++])); - } - return res; -} - -/** - * Handle escaped braces: `\\{foo,bar}` - */ - -function escapeBraces(str, arr, opts) { - if (!/\{[^{]+\{/.test(str)) { - return arr.concat(str.split('\\').join('')); - } else { - str = str.split('\\{').join('__LT_BRACE__'); - str = str.split('\\}').join('__RT_BRACE__'); - return map(braces(str, arr, opts), function(ele) { - ele = ele.split('__LT_BRACE__').join('{'); - return ele.split('__RT_BRACE__').join('}'); - }); - } -} - -/** - * Handle escaped dots: `{1\\.2}` - */ - -function escapeDots(str, arr, opts) { - if (!/[^\\]\..+\\\./.test(str)) { - return arr.concat(str.split('\\').join('')); - } else { - str = str.split('\\.').join('__ESC_DOT__'); - return map(braces(str, arr, opts), function(ele) { - return ele.split('__ESC_DOT__').join('.'); - }); - } -} - -/** - * Handle escaped dots: `{1\\.2}` - */ - -function escapePaths(str, arr, opts) { - str = str.split('\/.').join('__ESC_PATH__'); - return map(braces(str, arr, opts), function(ele) { - return ele.split('__ESC_PATH__').join('\/.'); - }); -} - -/** - * Handle escaped commas: `{a\\,b}` - */ - -function escapeCommas(str, arr, opts) { - if (!/\w,/.test(str)) { - return arr.concat(str.split('\\').join('')); - } else { - str = str.split('\\,').join('__ESC_COMMA__'); - return map(braces(str, arr, opts), function(ele) { - return ele.split('__ESC_COMMA__').join(','); - }); - } -} - -/** - * Regex for common patterns - */ - -function patternRegex() { - return /\${|( (?=[{,}])|(?=[{,}]) )|{}|{,}|\\,(?=.*[{}])|\/\.(?=.*[{}])|\\\.(?={)|\\{|\\}/; -} - -/** - * Braces regex. - */ - -function braceRegex() { - return /.*(\\?\{([^}]+)\})/; -} - -/** - * es6 delimiter regex. - */ - -function es6Regex() { - return /\$\{([^}]+)\}/; -} - -var braceRe; -var patternRe; - -/** - * Faster alternative to `String.replace()` when the - * index of the token to be replaces can't be supplied - */ - -function splice(str, token, replacement) { - var i = str.indexOf(token); - return str.substr(0, i) + replacement - + str.substr(i + token.length); -} - -/** - * Fast array map - */ - -function map(arr, fn) { - if (arr == null) { - return []; - } - - var len = arr.length; - var res = new Array(len); - var i = -1; - - while (++i < len) { - res[i] = fn(arr[i], i, arr); - } - - return res; -} - -/** - * Fast array filter - */ - -function filter(arr, cb) { - if (arr == null) return []; - if (typeof cb !== 'function') { - throw new TypeError('braces: filter expects a callback function.'); - } - - var len = arr.length; - var res = arr.slice(); - var i = 0; - - while (len--) { - if (!cb(arr[len], i++)) { - res.splice(len, 1); - } - } - return res; -} diff --git a/typescript/hello-world/node_modules/braces/package.json b/typescript/hello-world/node_modules/braces/package.json deleted file mode 100644 index ab6bcdc..0000000 --- a/typescript/hello-world/node_modules/braces/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "braces", - "description": "Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification.", - "version": "1.8.5", - "homepage": "https://github.com/jonschlinkert/braces", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "repository": "jonschlinkert/braces", - "bugs": { - "url": "https://github.com/jonschlinkert/braces/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "dependencies": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - }, - "devDependencies": { - "benchmarked": "^0.1.5", - "brace-expansion": "^1.1.3", - "chalk": "^1.1.3", - "gulp-format-md": "^0.1.8", - "minimatch": "^3.0.0", - "minimist": "^1.2.0", - "mocha": "^2.4.5", - "should": "^8.3.1" - }, - "keywords": [ - "alpha", - "alphabetical", - "bash", - "brace", - "expand", - "expansion", - "filepath", - "fill", - "fs", - "glob", - "globbing", - "letter", - "match", - "matches", - "matching", - "number", - "numerical", - "path", - "range", - "ranges", - "sh" - ], - "verb": { - "plugins": [ - "gulp-format-md" - ], - "reflinks": [ - "verb" - ], - "toc": false, - "layout": "default", - "lint": { - "reflinks": true - }, - "tasks": [ - "readme" - ], - "related": { - "list": [ - "micromatch", - "expand-range", - "fill-range" - ] - } - } -} diff --git a/typescript/hello-world/node_modules/browser-resolve/LICENSE b/typescript/hello-world/node_modules/browser-resolve/LICENSE deleted file mode 100644 index 1a0e837..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2015 Roman Shtylman - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/typescript/hello-world/node_modules/browser-resolve/empty.js b/typescript/hello-world/node_modules/browser-resolve/empty.js deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/index.js b/typescript/hello-world/node_modules/browser-resolve/index.js deleted file mode 100644 index 97d8935..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/index.js +++ /dev/null @@ -1,343 +0,0 @@ -// builtin -var fs = require('fs'); -var path = require('path'); - -// vendor -var resv = require('resolve'); - -// given a path, create an array of node_module paths for it -// borrowed from substack/resolve -function nodeModulesPaths (start, cb) { - var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; - var parts = start.split(splitRe); - - var dirs = []; - for (var i = parts.length - 1; i >= 0; i--) { - if (parts[i] === 'node_modules') continue; - var dir = path.join.apply( - path, parts.slice(0, i + 1).concat(['node_modules']) - ); - if (!parts[0].match(/([A-Za-z]:)/)) { - dir = '/' + dir; - } - dirs.push(dir); - } - return dirs; -} - -function find_shims_in_package(pkgJson, cur_path, shims, browser) { - try { - var info = JSON.parse(pkgJson); - } - catch (err) { - err.message = pkgJson + ' : ' + err.message - throw err; - } - - var replacements = getReplacements(info, browser); - - // no replacements, skip shims - if (!replacements) { - return; - } - - // if browser mapping is a string - // then it just replaces the main entry point - if (typeof replacements === 'string') { - var key = path.resolve(cur_path, info.main || 'index.js'); - shims[key] = path.resolve(cur_path, replacements); - return; - } - - // http://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders - Object.keys(replacements).forEach(function(key) { - var val; - if (replacements[key] === false) { - val = __dirname + '/empty.js'; - } - else { - val = replacements[key]; - // if target is a relative path, then resolve - // otherwise we assume target is a module - if (val[0] === '.') { - val = path.resolve(cur_path, val); - } - } - - if (key[0] === '/' || key[0] === '.') { - // if begins with / ../ or ./ then we must resolve to a full path - key = path.resolve(cur_path, key); - } - shims[key] = val; - }); - - [ '.js', '.json' ].forEach(function (ext) { - Object.keys(shims).forEach(function (key) { - if (!shims[key + ext]) { - shims[key + ext] = shims[key]; - } - }); - }); -} - -// paths is mutated -// load shims from first package.json file found -function load_shims(paths, browser, cb) { - // identify if our file should be replaced per the browser field - // original filename|id -> replacement - var shims = Object.create(null); - - (function next() { - var cur_path = paths.shift(); - if (!cur_path) { - return cb(null, shims); - } - - var pkg_path = path.join(cur_path, 'package.json'); - - fs.readFile(pkg_path, 'utf8', function(err, data) { - if (err) { - // ignore paths we can't open - // avoids an exists check - if (err.code === 'ENOENT') { - return next(); - } - - return cb(err); - } - try { - find_shims_in_package(data, cur_path, shims, browser); - return cb(null, shims); - } - catch (err) { - return cb(err); - } - }); - })(); -}; - -// paths is mutated -// synchronously load shims from first package.json file found -function load_shims_sync(paths, browser) { - // identify if our file should be replaced per the browser field - // original filename|id -> replacement - var shims = Object.create(null); - var cur_path; - - while (cur_path = paths.shift()) { - var pkg_path = path.join(cur_path, 'package.json'); - - try { - var data = fs.readFileSync(pkg_path, 'utf8'); - find_shims_in_package(data, cur_path, shims, browser); - return shims; - } - catch (err) { - // ignore paths we can't open - // avoids an exists check - if (err.code === 'ENOENT') { - continue; - } - - throw err; - } - } - return shims; -} - -function build_resolve_opts(opts, base) { - var packageFilter = opts.packageFilter; - var browser = normalizeBrowserFieldName(opts.browser) - - opts.basedir = base; - opts.packageFilter = function (info, pkgdir) { - if (packageFilter) info = packageFilter(info, pkgdir); - - var replacements = getReplacements(info, browser); - - // no browser field, keep info unchanged - if (!replacements) { - return info; - } - - info[browser] = replacements; - - // replace main - if (typeof replacements === 'string') { - info.main = replacements; - return info; - } - - var replace_main = replacements[info.main || './index.js'] || - replacements['./' + info.main || './index.js']; - - info.main = replace_main || info.main; - return info; - }; - - var pathFilter = opts.pathFilter; - opts.pathFilter = function(info, resvPath, relativePath) { - if (relativePath[0] != '.') { - relativePath = './' + relativePath; - } - var mappedPath; - if (pathFilter) { - mappedPath = pathFilter.apply(this, arguments); - } - if (mappedPath) { - return mappedPath; - } - - var replacements = info[browser]; - if (!replacements) { - return; - } - - mappedPath = replacements[relativePath]; - if (!mappedPath && path.extname(relativePath) === '') { - mappedPath = replacements[relativePath + '.js']; - if (!mappedPath) { - mappedPath = replacements[relativePath + '.json']; - } - } - return mappedPath; - }; - - return opts; -} - -function resolve(id, opts, cb) { - - // opts.filename - // opts.paths - // opts.modules - // opts.packageFilter - - opts = opts || {}; - opts.filename = opts.filename || ''; - - var base = path.dirname(opts.filename); - - if (opts.basedir) { - base = opts.basedir; - } - - var paths = nodeModulesPaths(base); - - if (opts.paths) { - paths.push.apply(paths, opts.paths); - } - - paths = paths.map(function(p) { - return path.dirname(p); - }); - - // we must always load shims because the browser field could shim out a module - load_shims(paths, opts.browser, function(err, shims) { - if (err) { - return cb(err); - } - - var resid = path.resolve(opts.basedir || path.dirname(opts.filename), id); - if (shims[id] || shims[resid]) { - var xid = shims[id] ? id : resid; - // if the shim was is an absolute path, it was fully resolved - if (shims[xid][0] === '/') { - return resv(shims[xid], build_resolve_opts(opts, base), function(err, full, pkg) { - cb(null, full, pkg); - }); - } - - // module -> alt-module shims - id = shims[xid]; - } - - var modules = opts.modules || Object.create(null); - var shim_path = modules[id]; - if (shim_path) { - return cb(null, shim_path); - } - - // our browser field resolver - // if browser field is an object tho? - var full = resv(id, build_resolve_opts(opts, base), function(err, full, pkg) { - if (err) { - return cb(err); - } - - var resolved = (shims) ? shims[full] || full : full; - cb(null, resolved, pkg); - }); - }); -}; - -resolve.sync = function (id, opts) { - - // opts.filename - // opts.paths - // opts.modules - // opts.packageFilter - - opts = opts || {}; - opts.filename = opts.filename || ''; - - var base = path.dirname(opts.filename); - - if (opts.basedir) { - base = opts.basedir; - } - - var paths = nodeModulesPaths(base); - - if (opts.paths) { - paths.push.apply(paths, opts.paths); - } - - paths = paths.map(function(p) { - return path.dirname(p); - }); - - // we must always load shims because the browser field could shim out a module - var shims = load_shims_sync(paths, opts.browser); - - if (shims[id]) { - // if the shim was is an absolute path, it was fully resolved - if (shims[id][0] === '/') { - return shims[id]; - } - - // module -> alt-module shims - id = shims[id]; - } - - var modules = opts.modules || Object.create(null); - var shim_path = modules[id]; - if (shim_path) { - return shim_path; - } - - // our browser field resolver - // if browser field is an object tho? - var full = resv.sync(id, build_resolve_opts(opts, base)); - - return (shims) ? shims[full] || full : full; -}; - -function normalizeBrowserFieldName(browser) { - return browser || 'browser'; -} - -function getReplacements(info, browser) { - browser = normalizeBrowserFieldName(browser); - var replacements = info[browser] || info.browser; - - // support legacy browserify field for easier migration from legacy - // many packages used this field historically - if (typeof info.browserify === 'string' && !replacements) { - replacements = info.browserify; - } - - return replacements; -} - -module.exports = resolve; diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/.travis.yml b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/.travis.yml deleted file mode 100644 index 895dbd3..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/LICENSE b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/example/async.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/example/async.js deleted file mode 100644 index 6624ff7..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/example/async.js +++ /dev/null @@ -1,5 +0,0 @@ -var resolve = require('../'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err) - else console.log(res) -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/example/sync.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/example/sync.js deleted file mode 100644 index 54b2cc1..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/example/sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var resolve = require('../'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/index.js deleted file mode 100644 index 51f194b..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/index.js +++ /dev/null @@ -1,5 +0,0 @@ -var core = require('./lib/core'); -exports = module.exports = require('./lib/async'); -exports.core = core; -exports.isCore = function (x) { return core[x] }; -exports.sync = require('./lib/sync'); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/package.json b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/package.json deleted file mode 100644 index 507fe8b..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "resolve", - "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", - "version": "1.1.7", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-resolve.git" - }, - "main": "index.js", - "keywords": [ - "resolve", - "require", - "node", - "module" - ], - "scripts": { - "test": "tape test/*.js" - }, - "devDependencies": { - "tape": "^3.5.0", - "tap": "0.4.13" - }, - "license": "MIT", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - } -} diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/readme.markdown b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/readme.markdown deleted file mode 100644 index 4fab9b0..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/readme.markdown +++ /dev/null @@ -1,148 +0,0 @@ -# resolve - -implements the [node `require.resolve()` -algorithm](http://nodejs.org/docs/v0.4.8/api/all.html#all_Together...) -such that you can `require.resolve()` on behalf of a file asynchronously and -synchronously - -[![build status](https://secure.travis-ci.org/substack/node-resolve.png)](http://travis-ci.org/substack/node-resolve) - -# example - -asynchronously resolve: - -``` js -var resolve = require('resolve'); -resolve('tap', { basedir: __dirname }, function (err, res) { - if (err) console.error(err) - else console.log(res) -}); -``` - -``` -$ node example/async.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -synchronously resolve: - -``` js -var resolve = require('resolve'); -var res = resolve.sync('tap', { basedir: __dirname }); -console.log(res); -``` - -``` -$ node example/sync.js -/home/substack/projects/node-resolve/node_modules/tap/lib/main.js -``` - -# methods - -``` js -var resolve = require('resolve') -``` - -## resolve(id, opts={}, cb) - -Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.package - `package.json` data applicable to the module being loaded - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files asynchronously - -* opts.isFile - function to asynchronously test whether a file exists - -* opts.packageFilter - transform the parsed package.json contents before looking -at the "main" field - -* opts.pathFilter(pkg, path, relativePath) - transform a path within a package - * pkg - package data - * path - the path being resolved - * relativePath - the path relative from the package.json location - * returns - a relative path that will be joined from the package.json location - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFile: fs.readFile, - isFile: function (file, cb) { - fs.stat(file, function (err, stat) { - if (err && err.code === 'ENOENT') cb(null, false) - else if (err) cb(err) - else cb(null, stat.isFile()) - }); - }, - moduleDirectory: 'node_modules' -} -``` - -## resolve.sync(id, opts) - -Synchronously resolve the module path string `id`, returning the result and -throwing an error when `id` can't be resolved. - -options are: - -* opts.basedir - directory to begin resolving from - -* opts.extensions - array of file extensions to search in order - -* opts.readFile - how to read files synchronously - -* opts.isFile - function to synchronously test whether a file exists - -* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json -* contents before looking at the "main" field - -* opts.paths - require.paths array to use if nothing is found on the normal -node_modules recursive walk (probably don't use this) - -* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` - -default `opts` values: - -``` javascript -{ - paths: [], - basedir: __dirname, - extensions: [ '.js' ], - readFileSync: fs.readFileSync, - isFile: function (file) { - try { return fs.statSync(file).isFile() } - catch (e) { return false } - }, - moduleDirectory: 'node_modules' -} -```` - -## resolve.isCore(pkg) - -Return whether a package is in core. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install resolve -``` - -# license - -MIT diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/core.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/core.js deleted file mode 100644 index 4a56682..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/core.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('core modules', function (t) { - t.ok(resolve.isCore('fs')); - t.ok(resolve.isCore('net')); - t.ok(resolve.isCore('http')); - - t.ok(!resolve.isCore('seq')); - t.ok(!resolve.isCore('../')); - t.end(); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/dotdot.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/dotdot.js deleted file mode 100644 index b876772..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/dotdot.js +++ /dev/null @@ -1,29 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('dotdot', function (t) { - t.plan(4); - var dir = __dirname + '/dotdot/abc'; - - resolve('..', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, __dirname + '/dotdot/index.js'); - }); - - resolve('.', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/index.js'); - }); -}); - -test('dotdot sync', function (t) { - t.plan(2); - var dir = __dirname + '/dotdot/abc'; - - var a = resolve.sync('..', { basedir : dir }); - t.equal(a, __dirname + '/dotdot/index.js'); - - var b = resolve.sync('.', { basedir : dir }); - t.equal(b, dir + '/index.js'); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js deleted file mode 100644 index 67f2534..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/dotdot/abc/index.js +++ /dev/null @@ -1,2 +0,0 @@ -var x = require('..'); -console.log(x); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js deleted file mode 100644 index afec736..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/dotdot/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'whatever' diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js deleted file mode 100644 index 2440818..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/faulty_basedir.js +++ /dev/null @@ -1,17 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -// not sure what's up with this test anymore -if (process.platform !== 'win32') return; - -test('faulty basedir must produce error in windows', function (t) { - t.plan(1); - - var resolverDir = 'C:\\a\\b\\c\\d'; - - resolve('tape/lib/test.js', { basedir : resolverDir }, function (err, res, pkg) { - t.equal(true, !!err); - }); - -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/filter.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/filter.js deleted file mode 100644 index 07c38f3..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/filter.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - t.plan(2); - var dir = __dirname + '/resolver'; - resolve('./baz', { - basedir : dir, - packageFilter : function (pkg) { - pkg.main = 'doom'; - return pkg; - } - }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/doom.js'); - t.equal(pkg.main, 'doom'); - }); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js deleted file mode 100644 index 3f89b79..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/filter_sync.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('filter', function (t) { - var dir = __dirname + '/resolver'; - var res = resolve.sync('./baz', { - basedir : dir, - packageFilter : function (pkg) { - pkg.main = 'doom' - return pkg; - } - }); - t.equal(res, dir + '/baz/doom.js'); - t.end(); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/mock.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/mock.js deleted file mode 100644 index 1cf3b12..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/mock.js +++ /dev/null @@ -1,142 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(6); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg, undefined); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg, undefined); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); - }); -}); - -test('mock from package', function (t) { - t.plan(6); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - package : { main: 'bar' }, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg.main, 'bar'); - }); - - resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/bar/baz.js'); - t.equal(pkg.main, 'bar'); - }); - - resolve('baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); - }); - - resolve('../baz', opts('/foo/bar'), function (err, res) { - t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); - }); -}); - -test('mock package', function (t) { - t.plan(2); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/node_modules/bar/baz.js'); - t.equal(pkg.main, './baz.js'); - }); -}); - -test('mock package from package', function (t) { - t.plan(2); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - package : { main: 'bar' }, - isFile : function (file, cb) { - cb(null, files.hasOwnProperty(file)); - }, - readFile : function (file, cb) { - cb(null, files[file]); - } - } - } - - resolve('bar', opts('/foo'), function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, '/foo/node_modules/bar/baz.js'); - t.equal(pkg.main, './baz.js'); - }); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js deleted file mode 100644 index abfd289..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/mock_sync.js +++ /dev/null @@ -1,68 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('mock', function (t) { - t.plan(4); - - var files = { - '/foo/bar/baz.js' : 'beep' - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file) { - return files.hasOwnProperty(file) - }, - readFileSync : function (file) { - return files[file] - } - } - } - - t.equal( - resolve.sync('./baz', opts('/foo/bar')), - '/foo/bar/baz.js' - ); - - t.equal( - resolve.sync('./baz.js', opts('/foo/bar')), - '/foo/bar/baz.js' - ); - - t.throws(function () { - resolve.sync('baz', opts('/foo/bar')); - }); - - t.throws(function () { - resolve.sync('../baz', opts('/foo/bar')); - }); -}); - -test('mock package', function (t) { - t.plan(1); - - var files = { - '/foo/node_modules/bar/baz.js' : 'beep', - '/foo/node_modules/bar/package.json' : JSON.stringify({ - main : './baz.js' - }) - }; - - function opts (basedir) { - return { - basedir : basedir, - isFile : function (file) { - return files.hasOwnProperty(file) - }, - readFileSync : function (file) { - return files[file] - } - } - } - - t.equal( - resolve.sync('bar', opts('/foo')), - '/foo/node_modules/bar/baz.js' - ); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir.js deleted file mode 100644 index 06395d8..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir.js +++ /dev/null @@ -1,56 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('moduleDirectory strings', function (t) { - t.plan(4); - var dir = __dirname + '/module_dir'; - var xopts = { - basedir : dir, - moduleDirectory: 'xmodules' - }; - resolve('aaa', xopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/xmodules/aaa/index.js'); - }); - - var yopts = { - basedir : dir, - moduleDirectory: 'ymodules' - }; - resolve('aaa', yopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/ymodules/aaa/index.js'); - }); -}); - -test('moduleDirectory array', function (t) { - t.plan(6); - var dir = __dirname + '/module_dir'; - var aopts = { - basedir : dir, - moduleDirectory: [ 'xmodules', 'ymodules', 'zmodules' ] - }; - resolve('aaa', aopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/xmodules/aaa/index.js'); - }); - - var bopts = { - basedir : dir, - moduleDirectory: [ 'zmodules', 'ymodules', 'xmodules' ] - }; - resolve('aaa', bopts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/ymodules/aaa/index.js'); - }); - - var copts = { - basedir : dir, - moduleDirectory: [ 'xmodules', 'ymodules', 'zmodules' ] - }; - resolve('bbb', copts, function (err, res, pkg) { - t.ifError(err); - t.equal(res, dir + '/zmodules/bbb/main.js'); - }); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js deleted file mode 100644 index 55cd18c..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x * 100 } diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js deleted file mode 100644 index 651aca8..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (x) { return x + 100 } diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js deleted file mode 100644 index 4325a0b..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = function (n) { return n * 111 } diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json deleted file mode 100644 index c13b8cf..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main": "main.js" -} diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path.js deleted file mode 100644 index 2407189..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path.js +++ /dev/null @@ -1,48 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('$NODE_PATH', function (t) { - t.plan(4); - - resolve('aaa', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/x/aaa/index.js'); - }); - - resolve('bbb', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/y/bbb/index.js'); - }); - - resolve('ccc', { - paths: [ - __dirname + '/node_path/x', - __dirname + '/node_path/y' - ], - basedir: __dirname, - }, function (err, res) { - t.equal(res, __dirname + '/node_path/x/ccc/index.js'); - }); - - // ensure that relative paths still resolve against the - // regular `node_modules` correctly - resolve('tap', { - paths: [ - 'node_path', - ], - basedir: 'node_path/x', - }, function (err, res) { - t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap/lib/main.js')); - }); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js deleted file mode 100644 index 1ea5913..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'A' diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js deleted file mode 100644 index f186fa7..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/x/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'C' diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js deleted file mode 100644 index e22dd83..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/bbb/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'B' diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js deleted file mode 100644 index d0043d1..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/node_path/y/ccc/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'CY' diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/nonstring.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/nonstring.js deleted file mode 100644 index ef63c40..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/nonstring.js +++ /dev/null @@ -1,9 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('nonstring', function (t) { - t.plan(1); - resolve(555, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js deleted file mode 100644 index 142f94d..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('#62: deep module references and the pathFilter', function(t){ - t.plan(9); - - var resolverDir = __dirname + '/pathfilter/deep_ref'; - var pathFilter = function(pkg, x, remainder){ - t.equal(pkg.version, "1.2.3"); - t.equal(x, resolverDir + '/node_modules/deep/ref'); - t.equal(remainder, "ref"); - return "alt"; - }; - - resolve('deep/ref', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - - t.equal(pkg.version, "1.2.3"); - t.equal(res, resolverDir + '/node_modules/deep/ref.js'); - }); - - resolve('deep/deeper/ref', { basedir: resolverDir }, - function(err, res, pkg) { - if(err) t.fail(err); - t.notEqual(pkg, undefined); - t.equal(pkg.version, "1.2.3"); - t.equal(res, resolverDir + '/node_modules/deep/deeper/ref.js'); - }); - - resolve('deep/ref', { basedir : resolverDir, pathFilter : pathFilter }, - function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/node_modules/deep/alt.js'); - }); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/main.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/main.js deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json deleted file mode 100644 index fe4b408..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "deep", - "version": "1.2.3" -} diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence.js deleted file mode 100644 index c716f0e..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence.js +++ /dev/null @@ -1,23 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('precedence', function (t) { - t.plan(3); - var dir = path.join(__dirname, 'precedence/aaa'); - - resolve('./', { basedir : dir }, function (err, res, pkg) { - t.ifError(err); - t.equal(res, path.join(dir, 'index.js')); - t.equal(pkg.name, 'resolve'); - }); -}); - -test('./ should not load ${dir}.js', function (t) { - t.plan(1); - var dir = path.join(__dirname, 'precedence/bbb'); - - resolve('./', { basedir : dir }, function (err, res, pkg) { - t.ok(err); - }); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js deleted file mode 100644 index a182397..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'wtf' diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js deleted file mode 100644 index 993b03c..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'okok' diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js deleted file mode 100644 index db38959..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/aaa/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')) diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js deleted file mode 100644 index c8a9996..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb.js +++ /dev/null @@ -1 +0,0 @@ -module.exports '>_<' diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js deleted file mode 100644 index 716b81d..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/precedence/bbb/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log(require('./')); // should throw diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver.js deleted file mode 100644 index 5bbb05f..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver.js +++ /dev/null @@ -1,281 +0,0 @@ -var path = require('path'); -var test = require('tape'); -var resolve = require('../'); - -test('async foo', function (t) { - t.plan(9); - var dir = __dirname + '/resolver'; - - resolve('./foo', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.name, 'resolve'); - }); - - resolve('./foo.js', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.name, 'resolve'); - }); - - resolve('./foo', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.main, 'resolver'); - }); - - resolve('./foo.js', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo.js'); - t.equal(pkg.main, 'resolver'); - }); - - resolve('foo', { basedir : dir }, function (err) { - t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); - }); -}); - -test('bar', function (t) { - t.plan(6); - var dir = __dirname + '/resolver'; - - resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); - - resolve('foo', { basedir : dir + '/bar', package: { main: 'bar' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/bar/node_modules/foo/index.js'); - t.equal(pkg, undefined); - }); -}); - -test('baz', function (t) { - t.plan(4); - var dir = __dirname + '/resolver'; - - resolve('./baz', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/quux.js'); - t.equal(pkg.main, 'quux.js'); - }); - - resolve('./baz', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/baz/quux.js'); - t.equal(pkg.main, 'quux.js'); - }); -}); - -test('biz', function (t) { - t.plan(24); - var dir = __dirname + '/resolver/biz/node_modules'; - - resolve('./grux', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('./grux', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg.main, 'biz'); - }); - - resolve('./garply', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('./garply', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('tiv', { basedir : dir + '/grux' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/grux', package: { main: 'grux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/garply' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('tiv', { basedir : dir + '/garply', package: { main: './lib' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/tiv/index.js'); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir : dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('grux', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/grux/index.js'); - t.equal(pkg, undefined); - }); - - resolve('garply', { basedir : dir + '/tiv' }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); - - resolve('garply', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/garply/lib/index.js'); - t.equal(pkg.main, './lib'); - }); -}); - -test('quux', function (t) { - t.plan(2); - var dir = __dirname + '/resolver/quux'; - - resolve('./foo', { basedir : dir, package: { main: 'quux' } }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/foo/index.js'); - t.equal(pkg.main, 'quux'); - }); -}); - -test('normalize', function (t) { - t.plan(2); - var dir = __dirname + '/resolver/biz/node_modules/grux'; - - resolve('../grux', { basedir : dir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/index.js'); - t.equal(pkg, undefined); - }); -}); - -test('cup', function (t) { - t.plan(3); - var dir = __dirname + '/resolver'; - - resolve('./cup', { basedir : dir, extensions : [ '.js', '.coffee' ] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/cup.coffee'); - }); - - resolve('./cup.coffee', { basedir : dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/cup.coffee'); - }); - - resolve('./cup', { basedir : dir, extensions : [ '.js' ] }, - function (err, res) { - t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); - }); -}); - -test('mug', function (t) { - t.plan(3); - var dir = __dirname + '/resolver'; - - resolve('./mug', { basedir : dir }, function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/mug.js'); - }); - - resolve('./mug', { basedir : dir, extensions : [ '.coffee', '.js' ] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, dir + '/mug.coffee'); - }); - - resolve('./mug', { basedir : dir, extensions : [ '.js', '.coffee' ] }, - function (err, res) { - t.equal(res, dir + '/mug.js'); - }); -}); - -test('other path', function (t) { - t.plan(4); - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/bar'; - var otherDir = resolverDir + '/other_path'; - - resolve('root', { basedir : dir, paths: [otherDir] }, function (err, res) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/other_path/root.js'); - }); - - resolve('lib/other-lib', { basedir : dir, paths: [otherDir] }, - function (err, res) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/other_path/lib/other-lib.js'); - }); - - resolve('root', { basedir : dir, }, function (err, res) { - t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); - }); - - resolve('zzz', { basedir : dir, paths: [otherDir] }, function (err, res) { - t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); - }); -}); - -test('incorrect main', function (t) { - t.plan(1) - - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/incorrect_main'; - - resolve('./incorrect_main', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, dir + '/index.js'); - }); -}); - -test('without basedir', function (t) { - t.plan(1); - - var dir = __dirname + '/resolver/without_basedir'; - var tester = require(dir + '/main.js'); - - tester(t, function (err, res, pkg){ - if (err) { - t.fail(err); - } else { - t.equal(res, dir + '/node_modules/mymodule.js'); - } - }); -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - t.plan(1); - - var resolverDir = __dirname + '/resolver/punycode'; - - resolve('punycode', { basedir : resolverDir }, function (err, res, pkg) { - if (err) t.fail(err); - t.equal(res, resolverDir + '/node_modules/punycode/index.js'); - }); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js deleted file mode 100644 index bd816ea..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/doom.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/doom.js deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json deleted file mode 100644 index 6b81dcd..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "quux.js" -} diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js deleted file mode 100644 index bd816ea..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/baz/quux.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json deleted file mode 100644 index babaac5..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "./lib" -} diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js deleted file mode 100644 index 4996055..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('tiv') * 100; diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js deleted file mode 100644 index 690aad3..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 3; diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee deleted file mode 100644 index 8b13789..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/cup.coffee +++ /dev/null @@ -1 +0,0 @@ - diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js deleted file mode 100644 index bd816ea..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/foo.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js deleted file mode 100644 index bc1fb0a..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate -module.exports = 1; diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json deleted file mode 100644 index 1592ed3..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/incorrect_main/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "main" : "wrong.js" -} diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.coffee b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.coffee deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/mug.js deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/root.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/other_path/root.js deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js deleted file mode 100644 index bd816ea..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/quux/foo/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 1; diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js deleted file mode 100644 index 5f211e9..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/main.js +++ /dev/null @@ -1,6 +0,0 @@ -resolve = require('../../../'); - -module.exports = function(t, cb) { - resolve('mymodule', null, cb); -} - diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js deleted file mode 100644 index 2b58aa4..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities.- E. Dijkstra" diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js deleted file mode 100644 index 5982531..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/resolver_sync.js +++ /dev/null @@ -1,180 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); - -test('foo', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('./foo', { basedir : dir }), - dir + '/foo.js' - ); - - t.equal( - resolve.sync('./foo.js', { basedir : dir }), - dir + '/foo.js' - ); - - t.throws(function () { - resolve.sync('foo', { basedir : dir }); - }); - - t.end(); -}); - -test('bar', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('foo', { basedir : dir + '/bar' }), - dir + '/bar/node_modules/foo/index.js' - ); - t.end(); -}); - -test('baz', function (t) { - var dir = __dirname + '/resolver'; - - t.equal( - resolve.sync('./baz', { basedir : dir }), - dir + '/baz/quux.js' - ); - t.end(); -}); - -test('biz', function (t) { - var dir = __dirname + '/resolver/biz/node_modules'; - t.equal( - resolve.sync('./grux', { basedir : dir }), - dir + '/grux/index.js' - ); - - t.equal( - resolve.sync('tiv', { basedir : dir + '/grux' }), - dir + '/tiv/index.js' - ); - - t.equal( - resolve.sync('grux', { basedir : dir + '/tiv' }), - dir + '/grux/index.js' - ); - t.end(); -}); - -test('normalize', function (t) { - var dir = __dirname + '/resolver/biz/node_modules/grux'; - t.equal( - resolve.sync('../grux', { basedir : dir }), - dir + '/index.js' - ); - t.end(); -}); - -test('cup', function (t) { - var dir = __dirname + '/resolver'; - t.equal( - resolve.sync('./cup', { - basedir : dir, - extensions : [ '.js', '.coffee' ] - }), - dir + '/cup.coffee' - ); - - t.equal( - resolve.sync('./cup.coffee', { - basedir : dir - }), - dir + '/cup.coffee' - ); - - t.throws(function () { - resolve.sync('./cup', { - basedir : dir, - extensions : [ '.js' ] - }) - }); - - t.end(); -}); - -test('mug', function (t) { - var dir = __dirname + '/resolver'; - t.equal( - resolve.sync('./mug', { basedir : dir }), - dir + '/mug.js' - ); - - t.equal( - resolve.sync('./mug', { - basedir : dir, - extensions : [ '.coffee', '.js' ] - }), - dir + '/mug.coffee' - ); - - t.equal( - resolve.sync('./mug', { - basedir : dir, - extensions : [ '.js', '.coffee' ] - }), - dir + '/mug.js' - ); - - t.end(); -}); - -test('other path', function (t) { - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/bar'; - var otherDir = resolverDir + '/other_path'; - - var path = require('path'); - - t.equal( - resolve.sync('root', { - basedir : dir, - paths: [otherDir] }), - resolverDir + '/other_path/root.js' - ); - - t.equal( - resolve.sync('lib/other-lib', { - basedir : dir, - paths: [otherDir] }), - resolverDir + '/other_path/lib/other-lib.js' - ); - - t.throws(function () { - resolve.sync('root', { basedir : dir, }); - }); - - t.throws(function () { - resolve.sync('zzz', { - basedir : dir, - paths: [otherDir] }); - }); - - t.end(); -}); - -test('incorrect main', function (t) { - var resolverDir = __dirname + '/resolver'; - var dir = resolverDir + '/incorrect_main'; - - t.equal( - resolve.sync('./incorrect_main', { basedir : resolverDir }), - dir + '/index.js' - ) - - t.end() -}); - -test('#25: node modules with the same name as node stdlib modules', function (t) { - var resolverDir = __dirname + '/resolver/punycode'; - - t.equal( - resolve.sync('punycode', { basedir : resolverDir }), - resolverDir + '/node_modules/punycode/index.js' - ) - - t.end() -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/subdirs.js b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/subdirs.js deleted file mode 100644 index 957abfe..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/subdirs.js +++ /dev/null @@ -1,13 +0,0 @@ -var test = require('tape'); -var resolve = require('../'); -var path = require('path'); - -test('subdirs', function (t) { - t.plan(2); - - var dir = path.join(__dirname, '/subdirs'); - resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { - t.ifError(err); - t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); - }); -}); diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json deleted file mode 100644 index 3cc0ecb..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json +++ /dev/null @@ -1 +0,0 @@ -[1,2,3] diff --git a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json b/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json deleted file mode 100644 index 0967ef4..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/node_modules/resolve/test/subdirs/node_modules/a/package.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/typescript/hello-world/node_modules/browser-resolve/package.json b/typescript/hello-world/node_modules/browser-resolve/package.json deleted file mode 100644 index 6da2c9e..0000000 --- a/typescript/hello-world/node_modules/browser-resolve/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "browser-resolve", - "version": "1.11.2", - "description": "resolve which handles browser field support in package.json", - "main": "index.js", - "files": [ - "index.js", - "empty.js" - ], - "scripts": { - "test": "mocha --reporter list test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-browser-resolve.git" - }, - "keywords": [ - "resolve", - "browser" - ], - "author": "Roman Shtylman ", - "license": "MIT", - "dependencies": { - "resolve": "1.1.7" - }, - "devDependencies": { - "mocha": "1.14.0" - } -} diff --git a/typescript/hello-world/node_modules/bser/README.md b/typescript/hello-world/node_modules/bser/README.md deleted file mode 100755 index eab0658..0000000 --- a/typescript/hello-world/node_modules/bser/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# BSER Binary Serialization - -BSER is a binary serialization scheme that can be used as an alternative to JSON. -BSER uses a framed encoding that makes it simpler to use to stream a sequence of -encoded values. - -It is intended to be used for local-IPC only and strings are represented as binary -with no specific encoding; this matches the convention employed by most operating -system filename storage. - -For more details about the serialization scheme see -[Watchman's docs](https://facebook.github.io/watchman/docs/bser.html). - -## API - -```js -var bser = require('bser'); -``` - -### bser.loadFromBuffer - -The is the synchronous decoder; given an input string or buffer, -decodes a single value and returns it. Throws an error if the -input is invalid. - -```js -var obj = bser.loadFromBuffer(buf); -``` - -### bser.dumpToBuffer - -Synchronously encodes a value as BSER. - -```js -var encoded = bser.dumpToBuffer(['hello']); -console.log(bser.loadFromBuffer(encoded)); // ['hello'] -``` - -### BunserBuf - -The asynchronous decoder API is implemented in the BunserBuf object. -You may incrementally append data to this object and it will emit the -decoded values via its `value` event. - -```js -var bunser = new bser.BunserBuf(); - -bunser.on('value', function(obj) { - console.log(obj); -}); -``` - -Then in your socket `data` event: - -```js -bunser.append(buf); -``` - -## Example - -Read BSER from socket: - -```js -var bunser = new bser.BunserBuf(); - -bunser.on('value', function(obj) { - console.log('data from socket', obj); -}); - -var socket = net.connect('/socket'); - -socket.on('data', function(buf) { - bunser.append(buf); -}); -``` - -Write BSER to socket: - -```js -socket.write(bser.dumpToBuffer(obj)); -``` diff --git a/typescript/hello-world/node_modules/bser/index.js b/typescript/hello-world/node_modules/bser/index.js deleted file mode 100755 index 1e03402..0000000 --- a/typescript/hello-world/node_modules/bser/index.js +++ /dev/null @@ -1,586 +0,0 @@ -/* Copyright 2015-present Facebook, Inc. - * Licensed under the Apache License, Version 2.0 */ - -var EE = require('events').EventEmitter; -var util = require('util'); -var os = require('os'); -var assert = require('assert'); -var Int64 = require('node-int64'); - -// BSER uses the local endianness to reduce byte swapping overheads -// (the protocol is expressly local IPC only). We need to tell node -// to use the native endianness when reading various native values. -var isBigEndian = os.endianness() == 'BE'; - -// Find the next power-of-2 >= size -function nextPow2(size) { - return Math.pow(2, Math.ceil(Math.log(size) / Math.LN2)); -} - -// Expandable buffer that we can provide a size hint for -function Accumulator(initsize) { - this.buf = new Buffer(nextPow2(initsize || 8192)); - this.readOffset = 0; - this.writeOffset = 0; -} -// For testing -exports.Accumulator = Accumulator - -// How much we can write into this buffer without allocating -Accumulator.prototype.writeAvail = function() { - return this.buf.length - this.writeOffset; -} - -// How much we can read -Accumulator.prototype.readAvail = function() { - return this.writeOffset - this.readOffset; -} - -// Ensure that we have enough space for size bytes -Accumulator.prototype.reserve = function(size) { - if (size < this.writeAvail()) { - return; - } - - // If we can make room by shunting down, do so - if (this.readOffset > 0) { - this.buf.copy(this.buf, 0, this.readOffset, this.writeOffset); - this.writeOffset -= this.readOffset; - this.readOffset = 0; - } - - // If we made enough room, no need to allocate more - if (size < this.writeAvail()) { - return; - } - - // Allocate a replacement and copy it in - var buf = new Buffer(nextPow2(this.buf.length + size - this.writeAvail())); - this.buf.copy(buf); - this.buf = buf; -} - -// Append buffer or string. Will resize as needed -Accumulator.prototype.append = function(buf) { - if (Buffer.isBuffer(buf)) { - this.reserve(buf.length); - buf.copy(this.buf, this.writeOffset, 0, buf.length); - this.writeOffset += buf.length; - } else { - var size = Buffer.byteLength(buf); - this.reserve(size); - this.buf.write(buf, this.writeOffset); - this.writeOffset += size; - } -} - -Accumulator.prototype.assertReadableSize = function(size) { - if (this.readAvail() < size) { - throw new Error("wanted to read " + size + - " bytes but only have " + this.readAvail()); - } -} - -Accumulator.prototype.peekString = function(size) { - this.assertReadableSize(size); - return this.buf.toString('utf-8', this.readOffset, this.readOffset + size); -} - -Accumulator.prototype.readString = function(size) { - var str = this.peekString(size); - this.readOffset += size; - return str; -} - -Accumulator.prototype.peekInt = function(size) { - this.assertReadableSize(size); - switch (size) { - case 1: - return this.buf.readInt8(this.readOffset, size); - case 2: - return isBigEndian ? - this.buf.readInt16BE(this.readOffset, size) : - this.buf.readInt16LE(this.readOffset, size); - case 4: - return isBigEndian ? - this.buf.readInt32BE(this.readOffset, size) : - this.buf.readInt32LE(this.readOffset, size); - case 8: - var big = this.buf.slice(this.readOffset, this.readOffset + 8); - if (isBigEndian) { - // On a big endian system we can simply pass the buffer directly - return new Int64(big); - } - // Otherwise we need to byteswap - return new Int64(byteswap64(big)); - default: - throw new Error("invalid integer size " + size); - } -} - -Accumulator.prototype.readInt = function(bytes) { - var ival = this.peekInt(bytes); - if (ival instanceof Int64 && isFinite(ival.valueOf())) { - ival = ival.valueOf(); - } - this.readOffset += bytes; - return ival; -} - -Accumulator.prototype.peekDouble = function() { - this.assertReadableSize(8); - return isBigEndian ? - this.buf.readDoubleBE(this.readOffset) : - this.buf.readDoubleLE(this.readOffset); -} - -Accumulator.prototype.readDouble = function() { - var dval = this.peekDouble(); - this.readOffset += 8; - return dval; -} - -Accumulator.prototype.readAdvance = function(size) { - if (size > 0) { - this.assertReadableSize(size); - } else if (size < 0 && this.readOffset + size < 0) { - throw new Error("advance with negative offset " + size + - " would seek off the start of the buffer"); - } - this.readOffset += size; -} - -Accumulator.prototype.writeByte = function(value) { - this.reserve(1); - this.buf.writeInt8(value, this.writeOffset); - ++this.writeOffset; -} - -Accumulator.prototype.writeInt = function(value, size) { - this.reserve(size); - switch (size) { - case 1: - this.buf.writeInt8(value, this.writeOffset); - break; - case 2: - if (isBigEndian) { - this.buf.writeInt16BE(value, this.writeOffset); - } else { - this.buf.writeInt16LE(value, this.writeOffset); - } - break; - case 4: - if (isBigEndian) { - this.buf.writeInt32BE(value, this.writeOffset); - } else { - this.buf.writeInt32LE(value, this.writeOffset); - } - break; - default: - throw new Error("unsupported integer size " + size); - } - this.writeOffset += size; -} - -Accumulator.prototype.writeDouble = function(value) { - this.reserve(8); - if (isBigEndian) { - this.buf.writeDoubleBE(value, this.writeOffset); - } else { - this.buf.writeDoubleLE(value, this.writeOffset); - } - this.writeOffset += 8; -} - -var BSER_ARRAY = 0x00; -var BSER_OBJECT = 0x01; -var BSER_STRING = 0x02; -var BSER_INT8 = 0x03; -var BSER_INT16 = 0x04; -var BSER_INT32 = 0x05; -var BSER_INT64 = 0x06; -var BSER_REAL = 0x07; -var BSER_TRUE = 0x08; -var BSER_FALSE = 0x09; -var BSER_NULL = 0x0a; -var BSER_TEMPLATE = 0x0b; -var BSER_SKIP = 0x0c; - -var ST_NEED_PDU = 0; // Need to read and decode PDU length -var ST_FILL_PDU = 1; // Know the length, need to read whole content - -var MAX_INT8 = 127; -var MAX_INT16 = 32767; -var MAX_INT32 = 2147483647; - -function BunserBuf() { - EE.call(this); - this.buf = new Accumulator(); - this.state = ST_NEED_PDU; -} -util.inherits(BunserBuf, EE); -exports.BunserBuf = BunserBuf; - -BunserBuf.prototype.append = function(buf, synchronous) { - if (synchronous) { - this.buf.append(buf); - return this.process(synchronous); - } - - try { - this.buf.append(buf); - } catch (err) { - this.emit('error', err); - return; - } - // Arrange to decode later. This allows the consuming - // application to make progress with other work in the - // case that we have a lot of subscription updates coming - // in from a large tree. - this.processLater(); -} - -BunserBuf.prototype.processLater = function() { - var self = this; - process.nextTick(function() { - try { - self.process(false); - } catch (err) { - self.emit('error', err); - } - }); -} - -// Do something with the buffer to advance our state. -// If we're running synchronously we'll return either -// the value we've decoded or undefined if we don't -// yet have enought data. -// If we're running asynchronously, we'll emit the value -// when it becomes ready and schedule another invocation -// of process on the next tick if we still have data we -// can process. -BunserBuf.prototype.process = function(synchronous) { - if (this.state == ST_NEED_PDU) { - if (this.buf.readAvail() < 2) { - return; - } - // Validate BSER header - this.expectCode(0); - this.expectCode(1); - this.pduLen = this.decodeInt(true /* relaxed */); - if (this.pduLen === false) { - // Need more data, walk backwards - this.buf.readAdvance(-2); - return; - } - // Ensure that we have a big enough buffer to read the rest of the PDU - this.buf.reserve(this.pduLen); - this.state = ST_FILL_PDU; - } - - if (this.state == ST_FILL_PDU) { - if (this.buf.readAvail() < this.pduLen) { - // Need more data - return; - } - - // We have enough to decode it - var val = this.decodeAny(); - if (synchronous) { - return val; - } - this.emit('value', val); - this.state = ST_NEED_PDU; - } - - if (!synchronous && this.buf.readAvail() > 0) { - this.processLater(); - } -} - -BunserBuf.prototype.raise = function(reason) { - throw new Error(reason + ", in Buffer of length " + - this.buf.buf.length + " (" + this.buf.readAvail() + - " readable) at offset " + this.buf.readOffset + " buffer: " + - JSON.stringify(this.buf.buf.slice( - this.buf.readOffset, this.buf.readOffset + 32).toJSON())); -} - -BunserBuf.prototype.expectCode = function(expected) { - var code = this.buf.readInt(1); - if (code != expected) { - this.raise("expected bser opcode " + expected + " but got " + code); - } -} - -BunserBuf.prototype.decodeAny = function() { - var code = this.buf.peekInt(1); - switch (code) { - case BSER_INT8: - case BSER_INT16: - case BSER_INT32: - case BSER_INT64: - return this.decodeInt(); - case BSER_REAL: - this.buf.readAdvance(1); - return this.buf.readDouble(); - case BSER_TRUE: - this.buf.readAdvance(1); - return true; - case BSER_FALSE: - this.buf.readAdvance(1); - return false; - case BSER_NULL: - this.buf.readAdvance(1); - return null; - case BSER_STRING: - return this.decodeString(); - case BSER_ARRAY: - return this.decodeArray(); - case BSER_OBJECT: - return this.decodeObject(); - case BSER_TEMPLATE: - return this.decodeTemplate(); - default: - this.raise("unhandled bser opcode " + code); - } -} - -BunserBuf.prototype.decodeArray = function() { - this.expectCode(BSER_ARRAY); - var nitems = this.decodeInt(); - var arr = []; - for (var i = 0; i < nitems; ++i) { - arr.push(this.decodeAny()); - } - return arr; -} - -BunserBuf.prototype.decodeObject = function() { - this.expectCode(BSER_OBJECT); - var nitems = this.decodeInt(); - var res = {}; - for (var i = 0; i < nitems; ++i) { - var key = this.decodeString(); - var val = this.decodeAny(); - res[key] = val; - } - return res; -} - -BunserBuf.prototype.decodeTemplate = function() { - this.expectCode(BSER_TEMPLATE); - var keys = this.decodeArray(); - var nitems = this.decodeInt(); - var arr = []; - for (var i = 0; i < nitems; ++i) { - var obj = {}; - for (var keyidx = 0; keyidx < keys.length; ++keyidx) { - if (this.buf.peekInt(1) == BSER_SKIP) { - this.buf.readAdvance(1); - continue; - } - var val = this.decodeAny(); - obj[keys[keyidx]] = val; - } - arr.push(obj); - } - return arr; -} - -BunserBuf.prototype.decodeString = function() { - this.expectCode(BSER_STRING); - var len = this.decodeInt(); - return this.buf.readString(len); -} - -// This is unusual compared to the other decode functions in that -// we may not have enough data available to satisfy the read, and -// we don't want to throw. This is only true when we're reading -// the PDU length from the PDU header; we'll set relaxSizeAsserts -// in that case. -BunserBuf.prototype.decodeInt = function(relaxSizeAsserts) { - if (relaxSizeAsserts && !this.buf.readAvail(1)) { - return false; - } else { - this.buf.assertReadableSize(1); - } - var code = this.buf.peekInt(1); - var size = 0; - switch (code) { - case BSER_INT8: - size = 1; - break; - case BSER_INT16: - size = 2; - break; - case BSER_INT32: - size = 4; - break; - case BSER_INT64: - size = 8; - break; - default: - this.raise("invalid bser int encoding " + code); - } - - if (relaxSizeAsserts && !this.buf.readAvail(1 + size)) { - return false; - } - this.buf.readAdvance(1); - return this.buf.readInt(size); -} - -// synchronously BSER decode a string and return the value -function loadFromBuffer(input) { - var buf = new BunserBuf(); - var result = buf.append(input, true); - if (buf.buf.readAvail()) { - throw Error( - 'excess data found after input buffer, use BunserBuf instead'); - } - if (typeof result === 'undefined') { - throw Error( - 'no bser found in string and no error raised!?'); - } - return result; -} -exports.loadFromBuffer = loadFromBuffer - -// Byteswap an arbitrary buffer, flipping from one endian -// to the other, returning a new buffer with the resultant data -function byteswap64(buf) { - var swap = new Buffer(buf.length); - for (var i = 0; i < buf.length; i++) { - swap[i] = buf[buf.length -1 - i]; - } - return swap; -} - -function dump_int64(buf, val) { - // Get the raw bytes. The Int64 buffer is big endian - var be = val.toBuffer(); - - if (isBigEndian) { - // We're a big endian system, so the buffer is exactly how we - // want it to be - buf.writeByte(BSER_INT64); - buf.append(be); - return; - } - // We need to byte swap to get the correct representation - var le = byteswap64(be); - buf.writeByte(BSER_INT64); - buf.append(le); -} - -function dump_int(buf, val) { - var abs = Math.abs(val); - if (abs <= MAX_INT8) { - buf.writeByte(BSER_INT8); - buf.writeInt(val, 1); - } else if (abs <= MAX_INT16) { - buf.writeByte(BSER_INT16); - buf.writeInt(val, 2); - } else if (abs <= MAX_INT32) { - buf.writeByte(BSER_INT32); - buf.writeInt(val, 4); - } else { - dump_int64(buf, new Int64(val)); - } -} - -function dump_any(buf, val) { - switch (typeof(val)) { - case 'number': - // check if it is an integer or a float - if (isFinite(val) && Math.floor(val) === val) { - dump_int(buf, val); - } else { - buf.writeByte(BSER_REAL); - buf.writeDouble(val); - } - return; - case 'string': - buf.writeByte(BSER_STRING); - dump_int(buf, Buffer.byteLength(val)); - buf.append(val); - return; - case 'boolean': - buf.writeByte(val ? BSER_TRUE : BSER_FALSE); - return; - case 'object': - if (val === null) { - buf.writeByte(BSER_NULL); - return; - } - if (val instanceof Int64) { - dump_int64(buf, val); - return; - } - if (Array.isArray(val)) { - buf.writeByte(BSER_ARRAY); - dump_int(buf, val.length); - for (var i = 0; i < val.length; ++i) { - dump_any(buf, val[i]); - } - return; - } - buf.writeByte(BSER_OBJECT); - var keys = Object.keys(val); - - // First pass to compute number of defined keys - var num_keys = keys.length; - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var v = val[key]; - if (typeof(v) == 'undefined') { - num_keys--; - } - } - dump_int(buf, num_keys); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var v = val[key]; - if (typeof(v) == 'undefined') { - // Don't include it - continue; - } - dump_any(buf, key); - try { - dump_any(buf, v); - } catch (e) { - throw new Error( - e.message + ' (while serializing object property with name `' + - key + "')"); - } - } - return; - - default: - throw new Error('cannot serialize type ' + typeof(val) + ' to BSER'); - } -} - -// BSER encode value and return a buffer of the contents -function dumpToBuffer(val) { - var buf = new Accumulator(); - // Build out the header - buf.writeByte(0); - buf.writeByte(1); - // Reserve room for an int32 to hold our PDU length - buf.writeByte(BSER_INT32); - buf.writeInt(0, 4); // We'll come back and fill this in at the end - - dump_any(buf, val); - - // Compute PDU length - var off = buf.writeOffset; - var len = off - 7 /* the header length */; - buf.writeOffset = 3; // The length value to fill in - buf.writeInt(len, 4); // write the length in the space we reserved - buf.writeOffset = off; - - return buf.buf.slice(0, off); -} -exports.dumpToBuffer = dumpToBuffer \ No newline at end of file diff --git a/typescript/hello-world/node_modules/bser/package.json b/typescript/hello-world/node_modules/bser/package.json deleted file mode 100644 index 0affeeb..0000000 --- a/typescript/hello-world/node_modules/bser/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "bser", - "version": "2.0.0", - "description": "JavaScript implementation of the BSER Binary Serialization", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "node test/bser.js" - }, - "files": [ - "index.js" - ], - "repository": { - "type": "git", - "url": "https://github.com/facebook/watchman" - }, - "keywords": [ - "bser", - "binary", - "protocol" - ], - "author": "Wez Furlong (http://wezfurlong.org)", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/facebook/watchman/issues" - }, - "homepage": "https://facebook.github.io/watchman/docs/bser.html", - "dependencies": { - "node-int64": "^0.4.0" - } -} diff --git a/typescript/hello-world/node_modules/builtin-modules/builtin-modules.json b/typescript/hello-world/node_modules/builtin-modules/builtin-modules.json deleted file mode 100644 index 72670f6..0000000 --- a/typescript/hello-world/node_modules/builtin-modules/builtin-modules.json +++ /dev/null @@ -1,35 +0,0 @@ -[ - "assert", - "buffer", - "child_process", - "cluster", - "console", - "constants", - "crypto", - "dgram", - "dns", - "domain", - "events", - "fs", - "http", - "https", - "module", - "net", - "os", - "path", - "process", - "punycode", - "querystring", - "readline", - "repl", - "stream", - "string_decoder", - "timers", - "tls", - "tty", - "url", - "util", - "v8", - "vm", - "zlib" -] diff --git a/typescript/hello-world/node_modules/builtin-modules/index.js b/typescript/hello-world/node_modules/builtin-modules/index.js deleted file mode 100644 index 9ef35ab..0000000 --- a/typescript/hello-world/node_modules/builtin-modules/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var blacklist = [ - 'freelist', - 'sys' -]; - -module.exports = Object.keys(process.binding('natives')).filter(function (el) { - return !/^_|^internal|\//.test(el) && blacklist.indexOf(el) === -1; -}).sort(); diff --git a/typescript/hello-world/node_modules/builtin-modules/license b/typescript/hello-world/node_modules/builtin-modules/license deleted file mode 100644 index 654d0bf..0000000 --- a/typescript/hello-world/node_modules/builtin-modules/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/typescript/hello-world/node_modules/builtin-modules/package.json b/typescript/hello-world/node_modules/builtin-modules/package.json deleted file mode 100644 index 430749a..0000000 --- a/typescript/hello-world/node_modules/builtin-modules/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "builtin-modules", - "version": "1.1.1", - "description": "List of the Node.js builtin modules", - "license": "MIT", - "repository": "sindresorhus/builtin-modules", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava", - "make": "node make.js" - }, - "files": [ - "index.js", - "static.js", - "builtin-modules.json" - ], - "keywords": [ - "builtin", - "built-in", - "builtins", - "node", - "modules", - "core", - "bundled", - "list", - "array", - "names" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/typescript/hello-world/node_modules/builtin-modules/readme.md b/typescript/hello-world/node_modules/builtin-modules/readme.md deleted file mode 100644 index f1894b1..0000000 --- a/typescript/hello-world/node_modules/builtin-modules/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -# builtin-modules [![Build Status](https://travis-ci.org/sindresorhus/builtin-modules.svg?branch=master)](https://travis-ci.org/sindresorhus/builtin-modules) - -> List of the Node.js builtin modules - -The list is just a [JSON file](builtin-modules.json) and can be used wherever. - - -## Install - -``` -$ npm install --save builtin-modules -``` - - -## Usage - -```js -var builtinModules = require('builtin-modules'); - -console.log(builinModules); -//=> ['assert', 'buffer', ...] -``` - - -## API - -Returns an array of builtin modules fetched from the running Node.js version. - -### Static list - -This module also comes bundled with a static array of builtin modules generated from the latest Node.js version. You can get it with `require('builtin-modules/static');` - - -## Related - -- [is-builtin-module](https://github.com/sindresorhus/is-builtin-module) - Check if a string matches the name of a Node.js builtin module - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/typescript/hello-world/node_modules/builtin-modules/static.js b/typescript/hello-world/node_modules/builtin-modules/static.js deleted file mode 100644 index 9508f8f..0000000 --- a/typescript/hello-world/node_modules/builtin-modules/static.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict'; -module.exports = require('./builtin-modules.json'); diff --git a/typescript/hello-world/node_modules/callsites/index.js b/typescript/hello-world/node_modules/callsites/index.js deleted file mode 100644 index f484083..0000000 --- a/typescript/hello-world/node_modules/callsites/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -module.exports = () => { - const _ = Error.prepareStackTrace; - Error.prepareStackTrace = (_, stack) => stack; - const stack = new Error().stack.slice(1); - Error.prepareStackTrace = _; - return stack; -}; diff --git a/typescript/hello-world/node_modules/callsites/license b/typescript/hello-world/node_modules/callsites/license deleted file mode 100644 index 654d0bf..0000000 --- a/typescript/hello-world/node_modules/callsites/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/typescript/hello-world/node_modules/callsites/package.json b/typescript/hello-world/node_modules/callsites/package.json deleted file mode 100644 index 9f97854..0000000 --- a/typescript/hello-world/node_modules/callsites/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "callsites", - "version": "2.0.0", - "description": "Get callsites from the V8 stack trace API", - "license": "MIT", - "repository": "sindresorhus/callsites", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "stacktrace", - "v8", - "callsite", - "callsites", - "stack", - "trace", - "function", - "file", - "line", - "debug" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - }, - "xo": { - "esnext": true - } -} diff --git a/typescript/hello-world/node_modules/callsites/readme.md b/typescript/hello-world/node_modules/callsites/readme.md deleted file mode 100644 index 7a5fccd..0000000 --- a/typescript/hello-world/node_modules/callsites/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# callsites [![Build Status](https://travis-ci.org/sindresorhus/callsites.svg?branch=master)](https://travis-ci.org/sindresorhus/callsites) - -> Get callsites from the [V8 stack trace API](https://github.com/v8/v8/wiki/Stack-Trace-API) - - -## Install - -``` -$ npm install --save callsites -``` - - -## Usage - -```js -const callsites = require('callsites'); - -function unicorn() { - console.log(callsites()[0].getFileName()); - //=> '/Users/sindresorhus/dev/callsites/test.js' -} - -unicorn(); -``` - - -## API - -Returns an array of callsite objects with the following methods: - -- `getTypeName`: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property. -- `getFunctionName`: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context. -- `getMethodName`: returns the name of the property of this or one of its prototypes that holds the current function -- `getFileName`: if this function was defined in a script returns the name of the script -- `getLineNumber`: if this function was defined in a script returns the current line number -- `getColumnNumber`: if this function was defined in a script returns the current column number -- `getEvalOrigin`: if this function was created using a call to eval returns a CallSite object representing the location where eval was called -- `isToplevel`: is this a top-level invocation, that is, is this the global object? -- `isEval`: does this call take place in code defined by a call to eval? -- `isNative`: is this call in native V8 code? -- `isConstructor`: is this a constructor call? - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/typescript/hello-world/node_modules/camelcase/index.js b/typescript/hello-world/node_modules/camelcase/index.js deleted file mode 100644 index 5670f73..0000000 --- a/typescript/hello-world/node_modules/camelcase/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -function preserveCamelCase(str) { - var isLastCharLower = false; - - for (var i = 0; i < str.length; i++) { - var c = str.charAt(i); - - if (isLastCharLower && (/[a-zA-Z]/).test(c) && c.toUpperCase() === c) { - str = str.substr(0, i) + '-' + str.substr(i); - isLastCharLower = false; - i++; - } else { - isLastCharLower = (c.toLowerCase() === c); - } - } - - return str; -} - -module.exports = function () { - var str = [].map.call(arguments, function (str) { - return str.trim(); - }).filter(function (str) { - return str.length; - }).join('-'); - - if (!str.length) { - return ''; - } - - if (str.length === 1) { - return str.toLowerCase(); - } - - if (!(/[_.\- ]+/).test(str)) { - if (str === str.toUpperCase()) { - return str.toLowerCase(); - } - - if (str[0] !== str[0].toLowerCase()) { - return str[0].toLowerCase() + str.slice(1); - } - - return str; - } - - str = preserveCamelCase(str); - - return str - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, function (m, p1) { - return p1.toUpperCase(); - }); -}; diff --git a/typescript/hello-world/node_modules/camelcase/license b/typescript/hello-world/node_modules/camelcase/license deleted file mode 100644 index 654d0bf..0000000 --- a/typescript/hello-world/node_modules/camelcase/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/typescript/hello-world/node_modules/camelcase/package.json b/typescript/hello-world/node_modules/camelcase/package.json deleted file mode 100644 index a404754..0000000 --- a/typescript/hello-world/node_modules/camelcase/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "camelcase", - "version": "3.0.0", - "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", - "license": "MIT", - "repository": "sindresorhus/camelcase", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "http://sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/typescript/hello-world/node_modules/camelcase/readme.md b/typescript/hello-world/node_modules/camelcase/readme.md deleted file mode 100644 index 080b2a1..0000000 --- a/typescript/hello-world/node_modules/camelcase/readme.md +++ /dev/null @@ -1,57 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` - - -## Install - -``` -$ npm install --save camelcase -``` - - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('--foo.bar'); -//=> 'fooBar' - -camelCase('__foo__bar__'); -//=> 'fooBar' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase('foo', 'bar'); -//=> 'fooBar' - -camelCase('__foo__', '--bar'); -//=> 'fooBar' -``` - - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/typescript/hello-world/node_modules/caseless/LICENSE b/typescript/hello-world/node_modules/caseless/LICENSE deleted file mode 100644 index 61789f4..0000000 --- a/typescript/hello-world/node_modules/caseless/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/typescript/hello-world/node_modules/caseless/README.md b/typescript/hello-world/node_modules/caseless/README.md deleted file mode 100644 index e5077a2..0000000 --- a/typescript/hello-world/node_modules/caseless/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing. - -This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set. - -## Usage - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'asdf') -c.get('a-header') === 'asdf' -``` - -## has(key) - -Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with. - -```javascript -c.has('a-header') === 'a-Header' -``` - -## set(key, value[, clobber=true]) - -Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header. - -```javascript -c.set('a-Header', 'fdas') -c.set('a-HEADER', 'more', false) -c.get('a-header') === 'fdsa,more' -``` - -## swap(key) - -Swaps the casing of a header with the new one that is passed in. - -```javascript -var headers = {} - , c = caseless(headers) - ; -c.set('a-Header', 'fdas') -c.swap('a-HEADER') -c.has('a-header') === 'a-HEADER' -headers === {'a-HEADER': 'fdas'} -``` diff --git a/typescript/hello-world/node_modules/caseless/index.js b/typescript/hello-world/node_modules/caseless/index.js deleted file mode 100644 index b194734..0000000 --- a/typescript/hello-world/node_modules/caseless/index.js +++ /dev/null @@ -1,67 +0,0 @@ -function Caseless (dict) { - this.dict = dict || {} -} -Caseless.prototype.set = function (name, value, clobber) { - if (typeof name === 'object') { - for (var i in name) { - this.set(i, name[i], value) - } - } else { - if (typeof clobber === 'undefined') clobber = true - var has = this.has(name) - - if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value - else this.dict[has || name] = value - return has - } -} -Caseless.prototype.has = function (name) { - var keys = Object.keys(this.dict) - , name = name.toLowerCase() - ; - for (var i=0;i", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/mikeal/caseless/issues" - }, - "devDependencies": { - "tape": "^2.10.2" - } -} diff --git a/typescript/hello-world/node_modules/caseless/test.js b/typescript/hello-world/node_modules/caseless/test.js deleted file mode 100644 index f55196c..0000000 --- a/typescript/hello-world/node_modules/caseless/test.js +++ /dev/null @@ -1,67 +0,0 @@ -var tape = require('tape') - , caseless = require('./') - ; - -tape('set get has', function (t) { - var headers = {} - , c = caseless(headers) - ; - t.plan(17) - c.set('a-Header', 'asdf') - t.equal(c.get('a-header'), 'asdf') - t.equal(c.has('a-header'), 'a-Header') - t.ok(!c.has('nothing')) - // old bug where we used the wrong regex - t.ok(!c.has('a-hea')) - c.set('a-header', 'fdsa') - t.equal(c.get('a-header'), 'fdsa') - t.equal(c.get('a-Header'), 'fdsa') - c.set('a-HEADER', 'more', false) - t.equal(c.get('a-header'), 'fdsa,more') - - t.deepEqual(headers, {'a-Header': 'fdsa,more'}) - c.swap('a-HEADER') - t.deepEqual(headers, {'a-HEADER': 'fdsa,more'}) - - c.set('deleteme', 'foobar') - t.ok(c.has('deleteme')) - t.ok(c.del('deleteme')) - t.notOk(c.has('deleteme')) - t.notOk(c.has('idonotexist')) - t.ok(c.del('idonotexist')) - - c.set('tva', 'test1') - c.set('tva-header', 'test2') - t.equal(c.has('tva'), 'tva') - t.notOk(c.has('header')) - - t.equal(c.get('tva'), 'test1') - -}) - -tape('swap', function (t) { - var headers = {} - , c = caseless(headers) - ; - t.plan(4) - // No Header to Swap. - t.throws(function () { - c.swap('content-type') - }) - // Set Header. - c.set('content-type', 'application/json') - // Swap Header With Itself. - c.swap('content-type') - // Does Not Delete Itself. - t.ok(c.has('content-type')) - // Swap Header With a Different Header. - c.swap('Content-Type') - // Still Has Header. - t.ok(c.has('Content-Type')) - // Delete Header. - c.del('Content-Type') - // No Header to Swap. - t.throws(function () { - c.swap('content-type') - }) -}) diff --git a/typescript/hello-world/node_modules/center-align/LICENSE b/typescript/hello-world/node_modules/center-align/LICENSE deleted file mode 100644 index 65f90ac..0000000 --- a/typescript/hello-world/node_modules/center-align/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/typescript/hello-world/node_modules/center-align/README.md b/typescript/hello-world/node_modules/center-align/README.md deleted file mode 100644 index cbcf3be..0000000 --- a/typescript/hello-world/node_modules/center-align/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# center-align [![NPM version](https://badge.fury.io/js/center-align.svg)](http://badge.fury.io/js/center-align) - -> Center-align the text in a string. - -Install with [npm](https://www.npmjs.com/) - -```sh -$ npm i center-align --save -``` - -## Usage - -```js -var centerAlign = require('center-align'); -``` - -**Example** - -If used on the following: - -``` -Lorem ipsum dolor sit amet, -consectetur adipiscing -elit, sed do eiusmod tempor incididunt -ut labore et dolore -magna aliqua. Ut enim ad minim -veniam, quis -``` - -The result would be: - -``` - Lorem ipsum dolor sit amet, - consectetur adipiscing -elit, sed do eiusmod tempor incididunt - ut labore et dolore - magna aliqua. Ut enim ad minim - veniam, quis -``` - -## Related projects - -* [align-text](https://www.npmjs.com/package/align-text): Align the text in a string. | [homepage](https://github.com/jonschlinkert/align-text) -* [justified](https://www.npmjs.com/package/justified): Wrap words to a specified length and justified the text. | [homepage](https://github.com/jonschlinkert/justified) -* [right-align](https://www.npmjs.com/package/right-align): Right-align the text in a string. | [homepage](https://github.com/jonschlinkert/right-align) -* [word-wrap](https://www.npmjs.com/package/word-wrap): Wrap words to a specified length. | [homepage](https://github.com/jonschlinkert/word-wrap) - -## Running tests - -Install dev dependencies: - -```sh -$ npm i -d && npm test -``` - -## Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/center-align/issues/new). - -## Author - -**Jon Schlinkert** - -+ [github/jonschlinkert](https://github.com/jonschlinkert) -+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -## License - -Copyright © 2015 Jon Schlinkert -Released under the MIT license. - -*** - -_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 27, 2015._ \ No newline at end of file diff --git a/typescript/hello-world/node_modules/center-align/index.js b/typescript/hello-world/node_modules/center-align/index.js deleted file mode 100644 index c6ed54a..0000000 --- a/typescript/hello-world/node_modules/center-align/index.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * center-align - * - * Copycenter (c) 2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -var utils = require('./utils'); - -module.exports = function centerAlign(val) { - return utils.align(val, function (len, longest) { - return Math.floor((longest - len) / 2); - }); -}; diff --git a/typescript/hello-world/node_modules/center-align/package.json b/typescript/hello-world/node_modules/center-align/package.json deleted file mode 100644 index eee07ee..0000000 --- a/typescript/hello-world/node_modules/center-align/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "center-align", - "description": "Center-align the text in a string.", - "version": "0.1.3", - "homepage": "https://github.com/jonschlinkert/center-align", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "repository": "jonschlinkert/center-align", - "bugs": { - "url": "https://github.com/jonschlinkert/center-align/issues" - }, - "license": "MIT", - "files": [ - "index.js", - "utils.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "dependencies": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - }, - "devDependencies": { - "mocha": "^2.2.0" - }, - "keywords": [ - "align", - "align-center", - "center", - "center-align", - "right", - "right-align", - "text", - "typography" - ], - "verb": { - "related": { - "description": "", - "list": [ - "align-text", - "right-align", - "justified", - "word-wrap" - ] - } - } -} diff --git a/typescript/hello-world/node_modules/center-align/utils.js b/typescript/hello-world/node_modules/center-align/utils.js deleted file mode 100644 index aead6d2..0000000 --- a/typescript/hello-world/node_modules/center-align/utils.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -/** - * Lazily-required module dependencies (makes the application - * faster) - */ - -var utils = require('lazy-cache')(require); - -/** - * Temporarily re-assign `require` to trick browserify and - * webpack into reconizing lazy dependencies. - * - * This tiny bit of ugliness has the huge dual advantage of - * only loading modules that are actually called at some - * point in the lifecycle of the application, whilst also - * allowing browserify and webpack to find modules that - * are depended on but never actually called. - */ - -var fn = require; -require = utils; - -/** - * Lazily required module dependencies - */ - -require('align-text', 'align'); - -/** - * Restore `require` - */ - -require = fn; - -/** - * Expose `utils` modules - */ - -module.exports = utils; diff --git a/typescript/hello-world/node_modules/chalk/index.js b/typescript/hello-world/node_modules/chalk/index.js deleted file mode 100644 index 2d85a91..0000000 --- a/typescript/hello-world/node_modules/chalk/index.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; -var escapeStringRegexp = require('escape-string-regexp'); -var ansiStyles = require('ansi-styles'); -var stripAnsi = require('strip-ansi'); -var hasAnsi = require('has-ansi'); -var supportsColor = require('supports-color'); -var defineProps = Object.defineProperties; -var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); - -function Chalk(options) { - // detect mode if not set manually - this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; -} - -// use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001b[94m'; -} - -var styles = (function () { - var ret = {}; - - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - ret[key] = { - get: function () { - return build.call(this, this._styles.concat(key)); - } - }; - }); - - return ret; -})(); - -var proto = defineProps(function chalk() {}, styles); - -function build(_styles) { - var builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder.enabled = this.enabled; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - /* eslint-disable no-proto */ - builder.__proto__ = proto; - - return builder; -} - -function applyStyle() { - // support varags, but simply cast to string in case there's only one arg - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); - - if (argsLen > 1) { - // don't slice `arguments`, it prevents v8 optimizations - for (var a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || !str) { - return str; - } - - var nestedStyles = this._styles; - var i = nestedStyles.length; - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - var originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { - ansiStyles.dim.open = ''; - } - - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - } - - // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. - ansiStyles.dim.open = originalDim; - - return str; -} - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - return build.call(this, [name]); - } - }; - }); - - return ret; -} - -defineProps(Chalk.prototype, init()); - -module.exports = new Chalk(); -module.exports.styles = ansiStyles; -module.exports.hasColor = hasAnsi; -module.exports.stripColor = stripAnsi; -module.exports.supportsColor = supportsColor; diff --git a/typescript/hello-world/node_modules/chalk/license b/typescript/hello-world/node_modules/chalk/license deleted file mode 100644 index 654d0bf..0000000 --- a/typescript/hello-world/node_modules/chalk/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/typescript/hello-world/node_modules/chalk/package.json b/typescript/hello-world/node_modules/chalk/package.json deleted file mode 100644 index 2b5881e..0000000 --- a/typescript/hello-world/node_modules/chalk/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "chalk", - "version": "1.1.3", - "description": "Terminal string styling done right. Much color.", - "license": "MIT", - "repository": "chalk/chalk", - "maintainers": [ - "Sindre Sorhus (sindresorhus.com)", - "Joshua Appelman (jbnicolai.com)", - "JD Ballard (github.com/qix-)" - ], - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && mocha", - "bench": "matcha benchmark.js", - "coverage": "nyc npm test && nyc report", - "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" - }, - "files": [ - "index.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "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" - }, - "devDependencies": { - "coveralls": "^2.11.2", - "matcha": "^0.6.0", - "mocha": "*", - "nyc": "^3.0.0", - "require-uncached": "^1.0.2", - "resolve-from": "^1.0.0", - "semver": "^4.3.3", - "xo": "*" - }, - "xo": { - "envs": [ - "node", - "mocha" - ] - } -} diff --git a/typescript/hello-world/node_modules/chalk/readme.md b/typescript/hello-world/node_modules/chalk/readme.md deleted file mode 100644 index 5cf111e..0000000 --- a/typescript/hello-world/node_modules/chalk/readme.md +++ /dev/null @@ -1,213 +0,0 @@ -

-
-
- chalk -
-
-
-

- -> Terminal string styling done right - -[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) -[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) -[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) - - -[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. - -**Chalk is a clean and focused alternative.** - -![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) - - -## Why - -- Highly performant -- Doesn't extend `String.prototype` -- Expressive API -- Ability to nest styles -- Clean and focused -- Auto-detects color support -- Actively maintained -- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 - - -## Install - -``` -$ npm install --save chalk -``` - - -## Usage - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -var chalk = require('chalk'); - -// style a string -chalk.blue('Hello world!'); - -// combine styled and normal strings -chalk.blue('Hello') + 'World' + chalk.red('!'); - -// compose multiple styles using the chainable API -chalk.blue.bgRed.bold('Hello world!'); - -// pass in multiple arguments -chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); - -// nest styles -chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); - -// nest styles of the same type even (color, underline, background) -chalk.green( - 'I am a green line ' + - chalk.blue.underline.bold('with a blue substring') + - ' that becomes green again!' -); -``` - -Easily define your own themes. - -```js -var chalk = require('chalk'); -var error = chalk.bold.red; -console.log(error('Error!')); -``` - -Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). - -```js -var name = 'Sindre'; -console.log(chalk.green('Hello %s'), name); -//=> Hello Sindre -``` - - -## API - -### chalk.`