@corellium/corellium-cli 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +12 -16
- package/.gitlab-ci.yml +13 -13
- package/.nvmrc +1 -1
- package/.nycrc +14 -14
- package/.prettierrc.js +8 -7
- package/README.md +13 -6
- package/docs/OVERVIEW.md +57 -27
- package/index.js +8 -8
- package/lint-staged.config.js +3 -6
- package/node_modules/@babel/cli/README.md +1 -1
- package/node_modules/@babel/cli/bin/babel-external-helpers.mjs +3 -0
- package/node_modules/@babel/cli/bin/babel.mjs +3 -0
- package/node_modules/@babel/cli/lib/babel/dir.js +23 -73
- package/node_modules/@babel/cli/lib/babel/dir.js.map +1 -0
- package/node_modules/@babel/cli/lib/babel/file.js +27 -72
- package/node_modules/@babel/cli/lib/babel/file.js.map +1 -0
- package/node_modules/@babel/cli/lib/babel/index.js +6 -8
- package/node_modules/@babel/cli/lib/babel/index.js.map +1 -0
- package/node_modules/@babel/cli/lib/babel/options.js +70 -143
- package/node_modules/@babel/cli/lib/babel/options.js.map +1 -0
- package/node_modules/@babel/cli/lib/babel/util.js +39 -59
- package/node_modules/@babel/cli/lib/babel/util.js.map +1 -0
- package/node_modules/@babel/cli/lib/babel/watcher.js +19 -52
- package/node_modules/@babel/cli/lib/babel/watcher.js.map +1 -0
- package/node_modules/@babel/cli/lib/babel-external-helpers.js +14 -21
- package/node_modules/@babel/cli/lib/babel-external-helpers.js.map +1 -0
- package/node_modules/@babel/cli/package.json +11 -9
- package/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +19 -29
- package/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +1 -1
- package/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +19 -29
- package/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +1 -1
- package/node_modules/@jridgewell/resolve-uri/package.json +2 -2
- package/node_modules/@jridgewell/sourcemap-codec/README.md +147 -83
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +351 -91
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -1
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +354 -90
- package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +1 -1
- package/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts +49 -0
- package/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts +2 -0
- package/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts +15 -0
- package/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts +6 -0
- package/node_modules/@jridgewell/sourcemap-codec/package.json +7 -7
- package/node_modules/@jridgewell/trace-mapping/README.md +5 -0
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +202 -174
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +1 -1
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +216 -182
- package/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +1 -1
- package/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +1 -1
- package/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +1 -1
- package/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +1 -1
- package/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +8 -8
- package/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +33 -28
- package/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +23 -16
- package/node_modules/@jridgewell/trace-mapping/package.json +20 -18
- package/node_modules/anymatch/index.d.ts +1 -0
- package/node_modules/anymatch/index.js +1 -1
- package/node_modules/anymatch/package.json +1 -1
- package/node_modules/{form-data/README.md.bak → axios/node_modules/form-data/Readme.md} +4 -4
- package/node_modules/{superagent → axios}/node_modules/form-data/lib/form_data.js +31 -26
- package/node_modules/{superagent → axios}/node_modules/form-data/package.json +25 -19
- package/node_modules/binary-extensions/binary-extensions.json +3 -0
- package/node_modules/binary-extensions/license +2 -1
- package/node_modules/binary-extensions/package.json +4 -2
- package/node_modules/binary-extensions/readme.md +2 -18
- package/node_modules/braces/LICENSE +1 -1
- package/node_modules/braces/README.md +91 -98
- package/node_modules/braces/index.js +3 -3
- package/node_modules/braces/lib/compile.js +14 -11
- package/node_modules/braces/lib/constants.js +1 -1
- package/node_modules/braces/lib/expand.js +9 -9
- package/node_modules/braces/lib/parse.js +14 -16
- package/node_modules/braces/lib/stringify.js +4 -4
- package/node_modules/braces/lib/utils.js +13 -3
- package/node_modules/braces/package.json +2 -2
- package/node_modules/{call-bind → call-bind-apply-helpers}/.eslintrc +1 -1
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/{call-bind → call-bind-apply-helpers}/LICENSE +1 -1
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +34 -0
- package/node_modules/call-bound/LICENSE +21 -0
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +13 -0
- package/node_modules/call-bound/index.js +18 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/{call-bind/test/callBound.js → call-bound/test/index.js} +1 -2
- package/node_modules/call-bound/tsconfig.json +9 -0
- package/node_modules/chokidar/README.md +1 -1
- package/node_modules/chokidar/index.js +1 -1
- package/node_modules/chokidar/lib/constants.js +1 -0
- package/node_modules/chokidar/lib/fsevents-handler.js +2 -0
- package/node_modules/chokidar/package.json +5 -20
- package/node_modules/chokidar/types/index.d.ts +4 -0
- package/node_modules/cliui/CHANGELOG.md +18 -0
- package/node_modules/cliui/build/index.d.cts +43 -0
- package/node_modules/cliui/package.json +6 -6
- package/node_modules/commander/CHANGELOG.md +361 -0
- package/node_modules/{@babel/cli/node_modules/commander → commander}/Readme.md +243 -165
- package/node_modules/commander/index.js +1881 -0
- package/node_modules/{@babel/cli/node_modules/commander → commander}/package.json +19 -9
- package/node_modules/commander/typings/index.d.ts +410 -0
- package/node_modules/component-emitter/LICENSE +24 -24
- package/node_modules/component-emitter/Readme.md +74 -74
- package/node_modules/component-emitter/index.js +175 -175
- package/node_modules/component-emitter/package.json +3 -2
- package/node_modules/convert-source-map/README.md +97 -11
- package/node_modules/convert-source-map/index.js +127 -30
- package/node_modules/convert-source-map/package.json +3 -9
- package/node_modules/cookiejar/cookiejar.js +5 -0
- package/node_modules/cookiejar/package.json +1 -1
- package/node_modules/debug/README.md +1 -1
- package/node_modules/debug/package.json +10 -4
- package/node_modules/debug/src/browser.js +4 -1
- package/node_modules/debug/src/common.js +57 -39
- package/node_modules/debug/src/node.js +2 -2
- package/node_modules/dotenv/CHANGELOG.md +133 -1
- package/node_modules/dotenv/README-es.md +448 -0
- package/node_modules/dotenv/README.md +309 -66
- package/node_modules/dotenv/lib/cli-options.js +1 -1
- package/node_modules/dotenv/lib/env-options.js +4 -0
- package/node_modules/dotenv/lib/main.d.ts +85 -5
- package/node_modules/dotenv/lib/main.js +287 -35
- package/node_modules/dotenv/package.json +19 -14
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/escalade/index.d.mts +11 -0
- package/node_modules/escalade/index.d.ts +14 -2
- package/node_modules/escalade/package.json +18 -5
- package/node_modules/escalade/readme.md +1 -1
- package/node_modules/escalade/sync/index.d.mts +9 -0
- package/node_modules/escalade/sync/index.d.ts +13 -2
- package/node_modules/fill-range/index.js +4 -5
- package/node_modules/fill-range/package.json +8 -3
- package/node_modules/follow-redirects/index.js +186 -98
- package/node_modules/follow-redirects/package.json +3 -4
- package/node_modules/form-data/Readme.md +5 -7
- package/node_modules/form-data/lib/form_data.js +27 -28
- package/node_modules/form-data/package.json +24 -20
- package/node_modules/function-bind/.eslintrc +11 -5
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/README.md +25 -27
- package/node_modules/function-bind/implementation.js +44 -12
- package/node_modules/function-bind/package.json +38 -14
- package/node_modules/get-intrinsic/.eslintrc +1 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +87 -0
- package/node_modules/get-intrinsic/index.js +75 -32
- package/node_modules/get-intrinsic/package.json +31 -22
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +3 -3
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/{call-bind → get-proto}/.github/FUNDING.yml +1 -1
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +16 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +1 -0
- package/node_modules/has-symbols/package.json +19 -9
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +5 -2
- package/node_modules/has-symbols/test/shams/core-js.js +1 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +1 -0
- package/node_modules/has-symbols/test/tests.js +4 -2
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +40 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/make-dir/node_modules/semver/package.json +38 -0
- package/node_modules/{@babel/cli → make-dir}/node_modules/semver/semver.js +68 -26
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/ms/index.js +1 -1
- package/node_modules/ms/license.md +1 -1
- package/node_modules/ms/package.json +5 -4
- package/node_modules/ms/readme.md +1 -2
- package/node_modules/object-inspect/CHANGELOG.md +64 -0
- package/node_modules/object-inspect/index.js +48 -16
- package/node_modules/object-inspect/package.json +25 -14
- package/node_modules/object-inspect/readme.markdown +9 -11
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/object-inspect/test/quoteStyle.js +9 -0
- package/node_modules/object-inspect/test/values.js +50 -0
- package/node_modules/qs/.editorconfig +3 -0
- package/node_modules/qs/.eslintrc +3 -2
- package/node_modules/qs/CHANGELOG.md +81 -5
- package/node_modules/qs/README.md +158 -50
- package/node_modules/qs/dist/qs.js +90 -2003
- package/node_modules/qs/lib/parse.js +89 -24
- package/node_modules/qs/lib/stringify.js +61 -31
- package/node_modules/qs/lib/utils.js +54 -38
- package/node_modules/qs/package.json +29 -13
- package/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/node_modules/qs/test/parse.js +468 -47
- package/node_modules/qs/test/stringify.js +454 -57
- package/node_modules/qs/test/utils.js +126 -0
- package/node_modules/side-channel/.editorconfig +9 -0
- package/node_modules/side-channel/.eslintrc +2 -1
- package/node_modules/side-channel/CHANGELOG.md +45 -0
- package/node_modules/side-channel/README.md +60 -1
- package/node_modules/side-channel/index.d.ts +14 -0
- package/node_modules/side-channel/index.js +21 -102
- package/node_modules/side-channel/package.json +40 -22
- package/node_modules/side-channel/test/index.js +78 -52
- package/node_modules/side-channel/tsconfig.json +9 -0
- package/node_modules/{function-bind → side-channel-list}/.editorconfig +3 -14
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +113 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +104 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/superagent/node_modules/readable-stream/README.md +1 -1
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_duplex.js +12 -25
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_passthrough.js +2 -4
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_readable.js +176 -273
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_transform.js +26 -37
- package/node_modules/superagent/node_modules/readable-stream/lib/_stream_writable.js +118 -174
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/async_iterator.js +10 -37
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/buffer_list.js +20 -47
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/destroy.js +8 -17
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +1 -19
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/from.js +12 -24
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/pipeline.js +5 -16
- package/node_modules/superagent/node_modules/readable-stream/lib/internal/streams/state.js +2 -7
- package/node_modules/superagent/node_modules/readable-stream/package.json +1 -1
- package/node_modules/{semver → superagent/node_modules/semver}/README.md +132 -36
- package/node_modules/{semver → superagent/node_modules/semver}/bin/semver.js +22 -16
- package/node_modules/{semver → superagent/node_modules/semver}/classes/comparator.js +39 -34
- package/node_modules/{semver → superagent/node_modules/semver}/classes/range.js +72 -37
- package/node_modules/{semver → superagent/node_modules/semver}/classes/semver.js +50 -19
- package/node_modules/{semver → superagent/node_modules/semver}/functions/coerce.js +14 -6
- package/node_modules/superagent/node_modules/semver/functions/diff.js +58 -0
- package/node_modules/{semver → superagent/node_modules/semver}/functions/inc.js +3 -2
- package/node_modules/superagent/node_modules/semver/functions/parse.js +16 -0
- package/node_modules/superagent/node_modules/semver/index.js +89 -0
- package/node_modules/{semver → superagent/node_modules/semver}/internal/constants.js +20 -2
- package/node_modules/superagent/node_modules/semver/internal/lrucache.js +40 -0
- package/node_modules/superagent/node_modules/semver/internal/parse-options.js +15 -0
- package/node_modules/{semver → superagent/node_modules/semver}/internal/re.js +43 -6
- package/node_modules/{semver → superagent/node_modules/semver}/package.json +29 -26
- package/node_modules/{semver → superagent/node_modules/semver}/ranges/intersects.js +1 -1
- package/node_modules/{semver → superagent/node_modules/semver}/ranges/subset.js +6 -3
- package/node_modules/yargs/browser.d.ts +5 -0
- package/node_modules/yargs/build/index.cjs +1 -1
- package/node_modules/yargs/build/lib/command.js +2 -0
- package/node_modules/yargs/build/lib/completion.js +19 -12
- package/node_modules/yargs/build/lib/usage.js +9 -4
- package/node_modules/yargs/build/lib/yargs-factory.js +18 -3
- package/node_modules/yargs/locales/cs.json +51 -0
- package/node_modules/yargs/locales/en.json +4 -0
- package/node_modules/yargs/locales/fi.json +1 -1
- package/node_modules/yargs/package.json +4 -4
- package/node_modules/yargs-parser/CHANGELOG.md +21 -0
- package/node_modules/yargs-parser/build/index.cjs +6 -4
- package/node_modules/yargs-parser/build/lib/index.js +4 -2
- package/node_modules/yargs-parser/build/lib/yargs-parser.js +2 -2
- package/node_modules/yargs-parser/package.json +10 -6
- package/package.json +1 -1
- package/renovate.json +11 -58
- package/src/clients/Agent.js +40 -37
- package/src/clients/Client.js +42 -40
- package/src/clients/Instance.js +24 -24
- package/src/clients/Webplayer.js +23 -24
- package/src/commands/extensions/delete.js +26 -26
- package/src/commands/extensions/index.js +6 -11
- package/src/commands/extensions/list.js +25 -25
- package/src/commands/extensions/load.js +51 -50
- package/src/commands/extensions/validate.js +33 -38
- package/src/commands/firmware/index.js +6 -9
- package/src/commands/firmware/list.js +49 -38
- package/src/commands/firmware/load.js +45 -42
- package/src/commands/images/create.js +30 -29
- package/src/commands/images/delete.js +21 -21
- package/src/commands/images/index.js +6 -10
- package/src/commands/images/list.js +21 -20
- package/src/commands/index.js +2 -2
- package/src/commands/instances/apps/index.js +26 -23
- package/src/commands/instances/apps/install.js +14 -14
- package/src/commands/instances/apps/open.js +17 -17
- package/src/commands/instances/create.js +35 -38
- package/src/commands/instances/delete.js +24 -25
- package/src/commands/instances/file.js +36 -32
- package/src/commands/instances/get.js +23 -16
- package/src/commands/instances/index.js +8 -8
- package/src/commands/instances/input.js +16 -17
- package/src/commands/instances/list.js +38 -28
- package/src/commands/instances/netmon/disable.js +17 -15
- package/src/commands/instances/netmon/download.js +18 -16
- package/src/commands/instances/netmon/enable.js +30 -23
- package/src/commands/instances/netmon/index.js +6 -11
- package/src/commands/instances/netmon/stream.js +18 -16
- package/src/commands/instances/ready.js +30 -27
- package/src/commands/instances/restoreBackup.js +39 -36
- package/src/commands/instances/rotate.js +20 -21
- package/src/commands/instances/start.js +23 -24
- package/src/commands/instances/stop.js +20 -21
- package/src/commands/instances/unlock.js +17 -19
- package/src/commands/instances/upgrade.js +38 -34
- package/src/commands/login.js +67 -67
- package/src/commands/logout.js +10 -12
- package/src/commands/mast/constants.js +2 -2
- package/src/commands/mast/create-assessment.js +16 -16
- package/src/commands/mast/delete-assessment.js +15 -15
- package/src/commands/mast/download-report.js +18 -15
- package/src/commands/mast/get-assessment.js +14 -14
- package/src/commands/mast/get-assessments.js +13 -13
- package/src/commands/mast/index.js +7 -7
- package/src/commands/mast/start-monitor.js +15 -15
- package/src/commands/mast/stop-monitor.js +15 -15
- package/src/commands/mast/test.js +19 -16
- package/src/commands/projects/create.js +33 -32
- package/src/commands/projects/delete.js +26 -26
- package/src/commands/projects/index.js +6 -11
- package/src/commands/projects/list.js +21 -19
- package/src/commands/projects/vpnConfig.js +29 -26
- package/src/commands/webplayer/create.js +57 -50
- package/src/commands/webplayer/destroy.js +31 -28
- package/src/commands/webplayer/index.js +6 -11
- package/src/commands/webplayer/list.js +41 -42
- package/src/commands/webplayer/login.js +31 -28
- package/src/corellium-api.js +11 -11
- package/src/error.js +20 -18
- package/src/logging.js +15 -15
- package/src/profile.js +22 -22
- package/src/progress.js +6 -6
- package/src/resumable.js +606 -664
- package/src/table.js +20 -22
- package/src/upload.js +38 -38
- package/src/utils.js +63 -64
- package/test/test.js +47 -48
- package/coverage/cobertura-coverage.xml +0 -9
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -101
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -0
- package/node_modules/@babel/cli/node_modules/commander/CHANGELOG.md +0 -436
- package/node_modules/@babel/cli/node_modules/commander/index.js +0 -1649
- package/node_modules/@babel/cli/node_modules/commander/typings/index.d.ts +0 -311
- package/node_modules/@babel/cli/node_modules/semver/CHANGELOG.md +0 -39
- package/node_modules/@babel/cli/node_modules/semver/package.json +0 -28
- package/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +0 -198
- package/node_modules/braces/CHANGELOG.md +0 -184
- package/node_modules/call-bind/.eslintignore +0 -1
- package/node_modules/call-bind/CHANGELOG.md +0 -42
- package/node_modules/call-bind/README.md +0 -2
- package/node_modules/call-bind/callBound.js +0 -15
- package/node_modules/call-bind/index.js +0 -47
- package/node_modules/call-bind/package.json +0 -80
- package/node_modules/call-bind/test/index.js +0 -66
- package/node_modules/component-emitter/History.md +0 -75
- package/node_modules/function-bind/.jscs.json +0 -176
- package/node_modules/function-bind/.npmignore +0 -22
- package/node_modules/function-bind/.travis.yml +0 -168
- package/node_modules/has/LICENSE-MIT +0 -22
- package/node_modules/has/README.md +0 -18
- package/node_modules/has/package.json +0 -48
- package/node_modules/has/src/index.js +0 -5
- package/node_modules/has/test/index.js +0 -10
- package/node_modules/lru-cache/README.md +0 -166
- package/node_modules/lru-cache/index.js +0 -334
- package/node_modules/lru-cache/package.json +0 -34
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/functions/diff.js +0 -23
- package/node_modules/semver/functions/parse.js +0 -33
- package/node_modules/semver/index.js +0 -48
- package/node_modules/semver/internal/parse-options.js +0 -11
- package/node_modules/side-channel/.eslintignore +0 -1
- package/node_modules/superagent/node_modules/form-data/README.md.bak +0 -356
- package/node_modules/superagent/node_modules/form-data/Readme.md +0 -356
- package/node_modules/yallist/LICENSE +0 -15
- package/node_modules/yallist/README.md +0 -204
- package/node_modules/yallist/iterator.js +0 -8
- package/node_modules/yallist/package.json +0 -29
- package/node_modules/yallist/yallist.js +0 -426
- /package/node_modules/{superagent → axios}/node_modules/form-data/License +0 -0
- /package/node_modules/{superagent → axios}/node_modules/form-data/index.d.ts +0 -0
- /package/node_modules/{superagent → axios}/node_modules/form-data/lib/browser.js +0 -0
- /package/node_modules/{superagent → axios}/node_modules/form-data/lib/populate.js +0 -0
- /package/node_modules/{@babel/cli/node_modules/commander → commander}/LICENSE +0 -0
- /package/node_modules/{call-bind → dunder-proto}/.nycrc +0 -0
- /package/node_modules/{@babel/cli/node_modules/make-dir → make-dir}/index.d.ts +0 -0
- /package/node_modules/{@babel/cli/node_modules/make-dir → make-dir}/index.js +0 -0
- /package/node_modules/{@babel/cli/node_modules/make-dir → make-dir}/license +0 -0
- /package/node_modules/{@babel/cli → make-dir}/node_modules/semver/LICENSE +0 -0
- /package/node_modules/{@babel/cli → make-dir}/node_modules/semver/README.md +0 -0
- /package/node_modules/{@babel/cli → make-dir}/node_modules/semver/bin/semver +0 -0
- /package/node_modules/{@babel/cli → make-dir}/node_modules/semver/range.bnf +0 -0
- /package/node_modules/{@babel/cli/node_modules/make-dir → make-dir}/package.json +0 -0
- /package/node_modules/{@babel/cli/node_modules/make-dir → make-dir}/readme.md +0 -0
- /package/node_modules/{@babel/cli/node_modules/pify → pify}/index.js +0 -0
- /package/node_modules/{@babel/cli/node_modules/pify → pify}/license +0 -0
- /package/node_modules/{@babel/cli/node_modules/pify → pify}/package.json +0 -0
- /package/node_modules/{@babel/cli/node_modules/pify → pify}/readme.md +0 -0
- /package/node_modules/{@babel/cli/node_modules/slash → slash}/index.js +0 -0
- /package/node_modules/{@babel/cli/node_modules/slash → slash}/license +0 -0
- /package/node_modules/{@babel/cli/node_modules/slash → slash}/package.json +0 -0
- /package/node_modules/{@babel/cli/node_modules/slash → slash}/readme.md +0 -0
- /package/node_modules/{lru-cache → superagent/node_modules/semver}/LICENSE +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/classes/index.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/clean.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/cmp.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/compare-build.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/compare-loose.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/compare.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/eq.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/gt.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/gte.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/lt.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/lte.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/major.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/minor.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/neq.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/patch.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/prerelease.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/rcompare.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/rsort.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/satisfies.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/sort.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/functions/valid.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/internal/debug.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/internal/identifiers.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/preload.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/range.bnf +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/ranges/gtr.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/ranges/ltr.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/ranges/max-satisfying.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/ranges/min-satisfying.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/ranges/min-version.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/ranges/outside.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/ranges/simplify.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/ranges/to-comparators.js +0 -0
- /package/node_modules/{semver → superagent/node_modules/semver}/ranges/valid.js +0 -0
@@ -4,64 +4,46 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = _default;
|
7
|
-
|
8
7
|
function _slash() {
|
9
8
|
const data = require("slash");
|
10
|
-
|
11
9
|
_slash = function () {
|
12
10
|
return data;
|
13
11
|
};
|
14
|
-
|
15
12
|
return data;
|
16
13
|
}
|
17
|
-
|
18
14
|
function _path() {
|
19
15
|
const data = require("path");
|
20
|
-
|
21
16
|
_path = function () {
|
22
17
|
return data;
|
23
18
|
};
|
24
|
-
|
25
19
|
return data;
|
26
20
|
}
|
27
|
-
|
28
21
|
function _fs() {
|
29
22
|
const data = require("fs");
|
30
|
-
|
31
23
|
_fs = function () {
|
32
24
|
return data;
|
33
25
|
};
|
34
|
-
|
35
26
|
return data;
|
36
27
|
}
|
37
|
-
|
38
|
-
var
|
39
|
-
|
40
|
-
var
|
41
|
-
|
42
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
43
|
-
|
44
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
45
|
-
|
28
|
+
var util = require("./util.js");
|
29
|
+
var watcher = require("./watcher.js");
|
30
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
31
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
46
32
|
const FILE_TYPE = Object.freeze({
|
47
33
|
NON_COMPILABLE: "NON_COMPILABLE",
|
48
34
|
COMPILED: "COMPILED",
|
49
35
|
IGNORED: "IGNORED",
|
50
36
|
ERR_COMPILATION: "ERR_COMPILATION"
|
51
37
|
});
|
52
|
-
|
53
38
|
function outputFileSync(filePath, data) {
|
54
39
|
(((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "10.12") ? _fs().mkdirSync : require("make-dir").sync)(_path().dirname(filePath), {
|
55
40
|
recursive: true
|
56
41
|
});
|
57
|
-
|
58
42
|
_fs().writeFileSync(filePath, data);
|
59
43
|
}
|
60
|
-
|
61
44
|
function _default(_x) {
|
62
45
|
return _ref.apply(this, arguments);
|
63
46
|
}
|
64
|
-
|
65
47
|
function _ref() {
|
66
48
|
_ref = _asyncToGenerator(function* ({
|
67
49
|
cliOptions,
|
@@ -70,102 +52,88 @@ function _ref() {
|
|
70
52
|
function write(_x2, _x3) {
|
71
53
|
return _write.apply(this, arguments);
|
72
54
|
}
|
73
|
-
|
74
55
|
function _write() {
|
75
56
|
_write = _asyncToGenerator(function* (src, base) {
|
76
57
|
let relative = _path().relative(base, src);
|
77
|
-
|
78
58
|
if (!util.isCompilableExtension(relative, cliOptions.extensions)) {
|
79
59
|
return FILE_TYPE.NON_COMPILABLE;
|
80
60
|
}
|
81
|
-
|
82
61
|
relative = util.withExtension(relative, cliOptions.keepFileExtension ? _path().extname(relative) : cliOptions.outFileExtension);
|
83
62
|
const dest = getDest(relative, base);
|
84
|
-
|
85
63
|
try {
|
86
64
|
const res = yield util.compile(src, Object.assign({}, babelOptions, {
|
87
65
|
sourceFileName: _slash()(_path().relative(dest + "/..", src))
|
88
66
|
}));
|
89
67
|
if (!res) return FILE_TYPE.IGNORED;
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
68
|
+
if (res.map) {
|
69
|
+
let outputMap = false;
|
70
|
+
if (babelOptions.sourceMaps && babelOptions.sourceMaps !== "inline") {
|
71
|
+
outputMap = "external";
|
72
|
+
} else if (babelOptions.sourceMaps == null) {
|
73
|
+
outputMap = util.hasDataSourcemap(res.code) ? "external" : "both";
|
74
|
+
}
|
75
|
+
if (outputMap) {
|
76
|
+
const mapLoc = dest + ".map";
|
77
|
+
if (outputMap === "external") {
|
78
|
+
res.code = util.addSourceMappingUrl(res.code, mapLoc);
|
79
|
+
}
|
80
|
+
res.map.file = _path().basename(relative);
|
81
|
+
outputFileSync(mapLoc, JSON.stringify(res.map));
|
82
|
+
}
|
96
83
|
}
|
97
|
-
|
98
84
|
outputFileSync(dest, res.code);
|
99
85
|
util.chmod(src, dest);
|
100
|
-
|
101
86
|
if (cliOptions.verbose) {
|
102
87
|
console.log(_path().relative(process.cwd(), src) + " -> " + dest);
|
103
88
|
}
|
104
|
-
|
105
89
|
return FILE_TYPE.COMPILED;
|
106
90
|
} catch (err) {
|
107
91
|
if (cliOptions.watch) {
|
108
92
|
console.error(err);
|
109
93
|
return FILE_TYPE.ERR_COMPILATION;
|
110
94
|
}
|
111
|
-
|
112
95
|
throw err;
|
113
96
|
}
|
114
97
|
});
|
115
98
|
return _write.apply(this, arguments);
|
116
99
|
}
|
117
|
-
|
118
100
|
function getDest(filename, base) {
|
119
101
|
if (cliOptions.relative) {
|
120
102
|
return _path().join(base, cliOptions.outDir, filename);
|
121
103
|
}
|
122
|
-
|
123
104
|
return _path().join(cliOptions.outDir, filename);
|
124
105
|
}
|
125
|
-
|
126
106
|
function handleFile(_x4, _x5) {
|
127
107
|
return _handleFile.apply(this, arguments);
|
128
108
|
}
|
129
|
-
|
130
109
|
function _handleFile() {
|
131
110
|
_handleFile = _asyncToGenerator(function* (src, base) {
|
132
111
|
const written = yield write(src, base);
|
133
|
-
|
134
112
|
if (cliOptions.copyFiles && written === FILE_TYPE.NON_COMPILABLE || cliOptions.copyIgnored && written === FILE_TYPE.IGNORED) {
|
135
113
|
const filename = _path().relative(base, src);
|
136
|
-
|
137
114
|
const dest = getDest(filename, base);
|
138
115
|
outputFileSync(dest, _fs().readFileSync(src));
|
139
116
|
util.chmod(src, dest);
|
140
117
|
}
|
141
|
-
|
142
118
|
return written === FILE_TYPE.COMPILED;
|
143
119
|
});
|
144
120
|
return _handleFile.apply(this, arguments);
|
145
121
|
}
|
146
|
-
|
147
122
|
function handle(_x6) {
|
148
123
|
return _handle.apply(this, arguments);
|
149
124
|
}
|
150
|
-
|
151
125
|
function _handle() {
|
152
126
|
_handle = _asyncToGenerator(function* (filenameOrDir) {
|
153
127
|
if (!_fs().existsSync(filenameOrDir)) return 0;
|
154
|
-
|
155
128
|
const stat = _fs().statSync(filenameOrDir);
|
156
|
-
|
157
129
|
if (stat.isDirectory()) {
|
158
130
|
const dirname = filenameOrDir;
|
159
131
|
let count = 0;
|
160
132
|
const files = util.readdir(dirname, cliOptions.includeDotfiles);
|
161
|
-
|
162
133
|
for (const filename of files) {
|
163
|
-
const
|
164
|
-
|
165
|
-
const written = yield handleFile(src, dirname);
|
134
|
+
const written = yield handleFile(filename, dirname);
|
166
135
|
if (written) count += 1;
|
167
136
|
}
|
168
|
-
|
169
137
|
return count;
|
170
138
|
} else {
|
171
139
|
const filename = filenameOrDir;
|
@@ -175,14 +143,12 @@ function _ref() {
|
|
175
143
|
});
|
176
144
|
return _handle.apply(this, arguments);
|
177
145
|
}
|
178
|
-
|
179
146
|
let compiledFiles = 0;
|
180
147
|
let startTime = null;
|
181
148
|
const logSuccess = util.debounce(function () {
|
182
149
|
if (startTime === null) {
|
183
150
|
return;
|
184
151
|
}
|
185
|
-
|
186
152
|
const diff = process.hrtime(startTime);
|
187
153
|
console.log(`Successfully compiled ${compiledFiles} ${compiledFiles !== 1 ? "files" : "file"} with Babel (${diff[0] * 1e3 + Math.round(diff[1] / 1e6)}ms).`);
|
188
154
|
compiledFiles = 0;
|
@@ -191,76 +157,60 @@ function _ref() {
|
|
191
157
|
if (cliOptions.watch) watcher.enable({
|
192
158
|
enableGlobbing: true
|
193
159
|
});
|
194
|
-
|
195
160
|
if (!cliOptions.skipInitialBuild) {
|
196
161
|
if (cliOptions.deleteDirOnStart) {
|
197
162
|
util.deleteDir(cliOptions.outDir);
|
198
163
|
}
|
199
|
-
|
200
164
|
(((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "10.12") ? _fs().mkdirSync : require("make-dir").sync)(cliOptions.outDir, {
|
201
165
|
recursive: true
|
202
166
|
});
|
203
167
|
startTime = process.hrtime();
|
204
|
-
|
205
168
|
for (const filename of cliOptions.filenames) {
|
206
169
|
compiledFiles += yield handle(filename);
|
207
170
|
}
|
208
|
-
|
209
171
|
if (!cliOptions.quiet) {
|
210
172
|
logSuccess();
|
211
173
|
logSuccess.flush();
|
212
174
|
}
|
213
175
|
}
|
214
|
-
|
215
176
|
if (cliOptions.watch) {
|
216
177
|
let processing = 0;
|
217
178
|
const {
|
218
179
|
filenames
|
219
180
|
} = cliOptions;
|
220
181
|
let getBase;
|
221
|
-
|
222
182
|
if (filenames.length === 1) {
|
223
183
|
const base = filenames[0];
|
224
|
-
|
225
184
|
const absoluteBase = _path().resolve(base);
|
226
|
-
|
227
185
|
getBase = filename => {
|
228
186
|
return filename === absoluteBase ? _path().dirname(base) : base;
|
229
187
|
};
|
230
188
|
} else {
|
231
189
|
const filenameToBaseMap = new Map(filenames.map(filename => {
|
232
190
|
const absoluteFilename = _path().resolve(filename);
|
233
|
-
|
234
191
|
return [absoluteFilename, _path().dirname(filename)];
|
235
192
|
}));
|
236
193
|
const absoluteFilenames = new Map(filenames.map(filename => {
|
237
194
|
const absoluteFilename = _path().resolve(filename);
|
238
|
-
|
239
195
|
return [absoluteFilename, filename];
|
240
196
|
}));
|
241
|
-
|
242
197
|
const {
|
243
198
|
sep
|
244
199
|
} = _path();
|
245
|
-
|
246
200
|
getBase = filename => {
|
247
201
|
const base = filenameToBaseMap.get(filename);
|
248
|
-
|
249
202
|
if (base !== undefined) {
|
250
203
|
return base;
|
251
204
|
}
|
252
|
-
|
253
205
|
for (const [absoluteFilenameOrDir, relative] of absoluteFilenames) {
|
254
206
|
if (filename.startsWith(absoluteFilenameOrDir + sep)) {
|
255
207
|
filenameToBaseMap.set(filename, relative);
|
256
208
|
return relative;
|
257
209
|
}
|
258
210
|
}
|
259
|
-
|
260
211
|
return "";
|
261
212
|
};
|
262
213
|
}
|
263
|
-
|
264
214
|
filenames.forEach(filenameOrDir => {
|
265
215
|
watcher.watch(filenameOrDir);
|
266
216
|
});
|
@@ -268,18 +218,18 @@ function _ref() {
|
|
268
218
|
watcher.onFilesChange(_asyncToGenerator(function* (filenames) {
|
269
219
|
processing++;
|
270
220
|
if (startTime === null) startTime = process.hrtime();
|
271
|
-
|
272
221
|
try {
|
273
222
|
const written = yield Promise.all(filenames.map(filename => handleFile(filename, getBase(filename))));
|
274
223
|
compiledFiles += written.filter(Boolean).length;
|
275
224
|
} catch (err) {
|
276
225
|
console.error(err);
|
277
226
|
}
|
278
|
-
|
279
227
|
processing--;
|
280
228
|
if (processing === 0 && !cliOptions.quiet) logSuccess();
|
281
229
|
}));
|
282
230
|
}
|
283
231
|
});
|
284
232
|
return _ref.apply(this, arguments);
|
285
|
-
}
|
233
|
+
}
|
234
|
+
|
235
|
+
//# sourceMappingURL=dir.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_slash","data","require","_path","_fs","util","watcher","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","FILE_TYPE","Object","freeze","NON_COMPILABLE","COMPILED","IGNORED","ERR_COMPILATION","outputFileSync","filePath","v","w","split","process","versions","node","mkdirSync","sync","path","dirname","recursive","fs","writeFileSync","_default","_x","_ref","cliOptions","babelOptions","write","_x2","_x3","_write","src","base","relative","isCompilableExtension","extensions","withExtension","keepFileExtension","extname","outFileExtension","dest","getDest","res","compile","assign","sourceFileName","slash","map","outputMap","sourceMaps","hasDataSourcemap","code","mapLoc","addSourceMappingUrl","file","basename","JSON","stringify","chmod","verbose","console","log","cwd","err","watch","error","filename","join","outDir","handleFile","_x4","_x5","_handleFile","written","copyFiles","copyIgnored","readFileSync","handle","_x6","_handle","filenameOrDir","existsSync","stat","statSync","isDirectory","count","files","readdir","includeDotfiles","compiledFiles","startTime","logSuccess","debounce","diff","hrtime","Math","round","enable","enableGlobbing","skipInitialBuild","deleteDirOnStart","deleteDir","filenames","quiet","flush","processing","getBase","length","absoluteBase","filenameToBaseMap","Map","absoluteFilename","absoluteFilenames","sep","get","undefined","absoluteFilenameOrDir","startsWith","set","forEach","startWatcher","onFilesChange","all","filter","Boolean"],"sources":["../../src/babel/dir.ts"],"sourcesContent":["import slash from \"slash\";\nimport path from \"path\";\nimport fs from \"fs\";\n\nimport * as util from \"./util.ts\";\nimport * as watcher from \"./watcher.ts\";\nimport type { CmdOptions } from \"./options.ts\";\n\nconst FILE_TYPE = Object.freeze({\n NON_COMPILABLE: \"NON_COMPILABLE\",\n COMPILED: \"COMPILED\",\n IGNORED: \"IGNORED\",\n ERR_COMPILATION: \"ERR_COMPILATION\",\n} as const);\n\nfunction outputFileSync(filePath: string, data: string | Buffer): void {\n fs.mkdirSync(path.dirname(filePath), { recursive: true });\n fs.writeFileSync(filePath, data);\n}\n\nexport default async function ({\n cliOptions,\n babelOptions,\n}: CmdOptions): Promise<void> {\n async function write(\n src: string,\n base: string,\n ): Promise<keyof typeof FILE_TYPE> {\n let relative = path.relative(base, src);\n\n if (!util.isCompilableExtension(relative, cliOptions.extensions)) {\n return FILE_TYPE.NON_COMPILABLE;\n }\n\n relative = util.withExtension(\n relative,\n cliOptions.keepFileExtension\n ? path.extname(relative)\n : cliOptions.outFileExtension,\n );\n\n const dest = getDest(relative, base);\n\n try {\n const res = await util.compile(src, {\n ...babelOptions,\n sourceFileName: slash(path.relative(dest + \"/..\", src)),\n });\n\n if (!res) return FILE_TYPE.IGNORED;\n\n if (res.map) {\n let outputMap: \"both\" | \"external\" | false = false;\n if (babelOptions.sourceMaps && babelOptions.sourceMaps !== \"inline\") {\n outputMap = \"external\";\n } else if (babelOptions.sourceMaps == null) {\n outputMap = util.hasDataSourcemap(res.code) ? \"external\" : \"both\";\n }\n\n if (outputMap) {\n const mapLoc = dest + \".map\";\n if (outputMap === \"external\") {\n res.code = util.addSourceMappingUrl(res.code, mapLoc);\n }\n res.map.file = path.basename(relative);\n outputFileSync(mapLoc, JSON.stringify(res.map));\n }\n }\n\n outputFileSync(dest, res.code);\n util.chmod(src, dest);\n\n if (cliOptions.verbose) {\n console.log(path.relative(process.cwd(), src) + \" -> \" + dest);\n }\n\n return FILE_TYPE.COMPILED;\n } catch (err) {\n if (cliOptions.watch) {\n console.error(err);\n return FILE_TYPE.ERR_COMPILATION;\n }\n\n throw err;\n }\n }\n\n function getDest(filename: string, base: string): string {\n if (cliOptions.relative) {\n return path.join(base, cliOptions.outDir, filename);\n }\n return path.join(cliOptions.outDir, filename);\n }\n\n async function handleFile(src: string, base: string): Promise<boolean> {\n const written = await write(src, base);\n\n if (\n (cliOptions.copyFiles && written === FILE_TYPE.NON_COMPILABLE) ||\n (cliOptions.copyIgnored && written === FILE_TYPE.IGNORED)\n ) {\n const filename = path.relative(base, src);\n const dest = getDest(filename, base);\n outputFileSync(dest, fs.readFileSync(src));\n util.chmod(src, dest);\n }\n return written === FILE_TYPE.COMPILED;\n }\n\n async function handle(filenameOrDir: string): Promise<number> {\n if (!fs.existsSync(filenameOrDir)) return 0;\n\n const stat = fs.statSync(filenameOrDir);\n\n if (stat.isDirectory()) {\n const dirname = filenameOrDir;\n\n let count = 0;\n\n const files = util.readdir(dirname, cliOptions.includeDotfiles);\n for (const filename of files) {\n const written = await handleFile(filename, dirname);\n if (written) count += 1;\n }\n\n return count;\n } else {\n const filename = filenameOrDir;\n const written = await handleFile(filename, path.dirname(filename));\n\n return written ? 1 : 0;\n }\n }\n\n let compiledFiles = 0;\n let startTime: [number, number] | null = null;\n\n const logSuccess = util.debounce(function () {\n if (startTime === null) {\n // This should never happen, but just in case it's better\n // to ignore the log message rather than making @babel/cli crash.\n return;\n }\n\n const diff = process.hrtime(startTime);\n\n console.log(\n `Successfully compiled ${compiledFiles} ${\n compiledFiles !== 1 ? \"files\" : \"file\"\n } with Babel (${diff[0] * 1e3 + Math.round(diff[1] / 1e6)}ms).`,\n );\n compiledFiles = 0;\n startTime = null;\n }, 100);\n\n if (cliOptions.watch) watcher.enable({ enableGlobbing: true });\n\n if (!cliOptions.skipInitialBuild) {\n if (cliOptions.deleteDirOnStart) {\n util.deleteDir(cliOptions.outDir);\n }\n\n fs.mkdirSync(cliOptions.outDir, { recursive: true });\n\n startTime = process.hrtime();\n\n for (const filename of cliOptions.filenames) {\n // compiledFiles is just incremented without reading its value, so we\n // don't risk race conditions.\n compiledFiles += await handle(filename);\n }\n\n if (!cliOptions.quiet) {\n logSuccess();\n logSuccess.flush();\n }\n }\n\n if (cliOptions.watch) {\n // This, alongside with debounce, allows us to only log\n // when we are sure that all the files have been compiled.\n let processing = 0;\n const { filenames } = cliOptions;\n let getBase: (filename: string) => string | null;\n if (filenames.length === 1) {\n // fast path: If there is only one filenames, we know it must be the base\n const base = filenames[0];\n const absoluteBase = path.resolve(base);\n getBase = filename => {\n return filename === absoluteBase ? path.dirname(base) : base;\n };\n } else {\n // A map from absolute compiled file path to its base, from which\n // the output destination will be determined\n const filenameToBaseMap: Map<string, string> = new Map(\n filenames.map(filename => {\n const absoluteFilename = path.resolve(filename);\n return [absoluteFilename, path.dirname(filename)];\n }),\n );\n\n const absoluteFilenames: Map<string, string> = new Map(\n filenames.map(filename => {\n const absoluteFilename = path.resolve(filename);\n return [absoluteFilename, filename];\n }),\n );\n\n const { sep } = path;\n // determine base from the absolute file path\n getBase = filename => {\n const base = filenameToBaseMap.get(filename);\n if (base !== undefined) {\n return base;\n }\n for (const [absoluteFilenameOrDir, relative] of absoluteFilenames) {\n if (filename.startsWith(absoluteFilenameOrDir + sep)) {\n filenameToBaseMap.set(filename, relative);\n return relative;\n }\n }\n // Can't determine the base, probably external deps\n return \"\";\n };\n }\n\n filenames.forEach(filenameOrDir => {\n watcher.watch(filenameOrDir);\n });\n\n watcher.startWatcher();\n\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n watcher.onFilesChange(async filenames => {\n processing++;\n if (startTime === null) startTime = process.hrtime();\n\n try {\n const written = await Promise.all(\n filenames.map(filename => handleFile(filename, getBase(filename))),\n );\n\n compiledFiles += written.filter(Boolean).length;\n } catch (err) {\n console.error(err);\n }\n\n processing--;\n if (processing === 0 && !cliOptions.quiet) logSuccess();\n });\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAI,IAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAAwC,SAAAK,mBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,cAAAC,CAAA,GAAAP,CAAA,CAAAK,CAAA,EAAAC,CAAA,GAAAE,CAAA,GAAAD,CAAA,CAAAE,KAAA,WAAAT,CAAA,gBAAAE,CAAA,CAAAF,CAAA,KAAAO,CAAA,CAAAG,IAAA,GAAAT,CAAA,CAAAO,CAAA,IAAAG,OAAA,CAAAC,OAAA,CAAAJ,CAAA,EAAAK,IAAA,CAAAV,CAAA,EAAAC,CAAA;AAAA,SAAAU,kBAAAd,CAAA,6BAAAC,CAAA,SAAAC,CAAA,GAAAa,SAAA,aAAAJ,OAAA,WAAAR,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAL,CAAA,CAAAgB,KAAA,CAAAf,CAAA,EAAAC,CAAA,YAAAe,MAAAjB,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6I,YAAY,CAAC,CAAC;MAGtB7I,OAAO,CAAC8I,aAAa,CAAA9H,iBAAA,CAAC,WAAM2G,SAAS,EAAI;QACvCG,UAAU,EAAE;QACZ,IAAIf,SAAS,KAAK,IAAI,EAAEA,SAAS,GAAG9E,OAAO,CAACkF,MAAM,CAAC,CAAC;QAEpD,IAAI;UACF,MAAMrB,OAAO,SAASjF,OAAO,CAACkI,GAAG,CAC/BpB,SAAS,CAACvD,GAAG,CAACmB,QAAQ,IAAIG,UAAU,CAACH,QAAQ,EAAEwC,OAAO,CAACxC,QAAQ,CAAC,CAAC,CACnE,CAAC;UAEDuB,aAAa,IAAIhB,OAAO,CAACkD,MAAM,CAACC,OAAO,CAAC,CAACjB,MAAM;QACjD,CAAC,CAAC,OAAO5C,GAAG,EAAE;UACZH,OAAO,CAACK,KAAK,CAACF,GAAG,CAAC;QACpB;QAEA0C,UAAU,EAAE;QACZ,IAAIA,UAAU,KAAK,CAAC,IAAI,CAAChF,UAAU,CAAC8E,KAAK,EAAEZ,UAAU,CAAC,CAAC;MACzD,CAAC,EAAC;IACJ;EACF,CAAC;EAAA,OAAAnE,IAAA,CAAA3B,KAAA,OAAAD,SAAA;AAAA","ignoreList":[]}
|
@@ -4,69 +4,48 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.default = _default;
|
7
|
-
|
8
7
|
function _convertSourceMap() {
|
9
8
|
const data = require("convert-source-map");
|
10
|
-
|
11
9
|
_convertSourceMap = function () {
|
12
10
|
return data;
|
13
11
|
};
|
14
|
-
|
15
12
|
return data;
|
16
13
|
}
|
17
|
-
|
18
14
|
function _traceMapping() {
|
19
15
|
const data = require("@jridgewell/trace-mapping");
|
20
|
-
|
21
16
|
_traceMapping = function () {
|
22
17
|
return data;
|
23
18
|
};
|
24
|
-
|
25
19
|
return data;
|
26
20
|
}
|
27
|
-
|
28
21
|
function _slash() {
|
29
22
|
const data = require("slash");
|
30
|
-
|
31
23
|
_slash = function () {
|
32
24
|
return data;
|
33
25
|
};
|
34
|
-
|
35
26
|
return data;
|
36
27
|
}
|
37
|
-
|
38
28
|
function _path() {
|
39
29
|
const data = require("path");
|
40
|
-
|
41
30
|
_path = function () {
|
42
31
|
return data;
|
43
32
|
};
|
44
|
-
|
45
33
|
return data;
|
46
34
|
}
|
47
|
-
|
48
35
|
function _fs() {
|
49
36
|
const data = require("fs");
|
50
|
-
|
51
37
|
_fs = function () {
|
52
38
|
return data;
|
53
39
|
};
|
54
|
-
|
55
40
|
return data;
|
56
41
|
}
|
57
|
-
|
58
|
-
var
|
59
|
-
|
60
|
-
var
|
61
|
-
|
62
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
63
|
-
|
64
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
65
|
-
|
42
|
+
var util = require("./util.js");
|
43
|
+
var watcher = require("./watcher.js");
|
44
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
45
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
66
46
|
function _default(_x) {
|
67
47
|
return _ref.apply(this, arguments);
|
68
48
|
}
|
69
|
-
|
70
49
|
function _ref() {
|
71
50
|
_ref = _asyncToGenerator(function* ({
|
72
51
|
cliOptions,
|
@@ -76,78 +55,72 @@ function _ref() {
|
|
76
55
|
const mapSections = [];
|
77
56
|
let code = "";
|
78
57
|
let offset = 0;
|
79
|
-
|
58
|
+
let hasRawMap = false;
|
80
59
|
for (const result of fileResults) {
|
81
60
|
if (!result) continue;
|
61
|
+
hasRawMap = !!result.map;
|
82
62
|
mapSections.push({
|
83
63
|
offset: {
|
84
64
|
line: offset,
|
85
65
|
column: 0
|
86
66
|
},
|
87
|
-
map: result.map ||
|
67
|
+
map: result.map || {
|
68
|
+
version: 3,
|
69
|
+
names: [],
|
70
|
+
sources: [],
|
71
|
+
mappings: []
|
72
|
+
}
|
88
73
|
});
|
89
74
|
code += result.code + "\n";
|
90
75
|
offset += countNewlines(result.code) + 1;
|
91
76
|
}
|
92
|
-
|
93
77
|
const map = new (_traceMapping().AnyMap)({
|
94
78
|
version: 3,
|
95
79
|
file: cliOptions.sourceMapTarget || _path().basename(cliOptions.outFile || "") || "stdout",
|
96
80
|
sections: mapSections
|
97
81
|
});
|
98
82
|
map.sourceRoot = babelOptions.sourceRoot;
|
99
|
-
|
100
83
|
if (babelOptions.sourceMaps === "inline" || !cliOptions.outFile && babelOptions.sourceMaps) {
|
101
84
|
code += "\n" + _convertSourceMap().fromObject((0, _traceMapping().encodedMap)(map)).toComment();
|
102
85
|
}
|
103
|
-
|
104
86
|
return {
|
105
87
|
map: map,
|
106
|
-
code: code
|
88
|
+
code: code,
|
89
|
+
hasRawMap: hasRawMap
|
107
90
|
};
|
108
91
|
}
|
109
|
-
|
110
92
|
function countNewlines(code) {
|
111
93
|
let count = 0;
|
112
94
|
let index = -1;
|
113
|
-
|
114
95
|
while ((index = code.indexOf("\n", index + 1)) !== -1) {
|
115
96
|
count++;
|
116
97
|
}
|
117
|
-
|
118
98
|
return count;
|
119
99
|
}
|
120
|
-
|
121
|
-
function emptyMap() {
|
122
|
-
return {
|
123
|
-
version: 3,
|
124
|
-
names: [],
|
125
|
-
sources: [],
|
126
|
-
mappings: []
|
127
|
-
};
|
128
|
-
}
|
129
|
-
|
130
100
|
function output(fileResults) {
|
131
101
|
const result = buildResult(fileResults);
|
132
|
-
|
133
102
|
if (cliOptions.outFile) {
|
134
103
|
(((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "10.12") ? _fs().mkdirSync : require("make-dir").sync)(_path().dirname(cliOptions.outFile), {
|
135
104
|
recursive: true
|
136
105
|
});
|
137
|
-
|
106
|
+
let outputMap = false;
|
138
107
|
if (babelOptions.sourceMaps && babelOptions.sourceMaps !== "inline") {
|
108
|
+
outputMap = "external";
|
109
|
+
} else if (babelOptions.sourceMaps == null && result.hasRawMap) {
|
110
|
+
outputMap = util.hasDataSourcemap(result.code) ? "external" : "both";
|
111
|
+
}
|
112
|
+
if (outputMap) {
|
139
113
|
const mapLoc = cliOptions.outFile + ".map";
|
140
|
-
|
141
|
-
|
114
|
+
if (outputMap === "external") {
|
115
|
+
result.code = util.addSourceMappingUrl(result.code, mapLoc);
|
116
|
+
}
|
142
117
|
_fs().writeFileSync(mapLoc, JSON.stringify((0, _traceMapping().encodedMap)(result.map)));
|
143
118
|
}
|
144
|
-
|
145
119
|
_fs().writeFileSync(cliOptions.outFile, result.code);
|
146
120
|
} else {
|
147
121
|
process.stdout.write(result.code + "\n");
|
148
122
|
}
|
149
123
|
}
|
150
|
-
|
151
124
|
function readStdin() {
|
152
125
|
return new Promise((resolve, reject) => {
|
153
126
|
let code = "";
|
@@ -162,11 +135,9 @@ function _ref() {
|
|
162
135
|
process.stdin.on("error", reject);
|
163
136
|
});
|
164
137
|
}
|
165
|
-
|
166
138
|
function stdin() {
|
167
139
|
return _stdin.apply(this, arguments);
|
168
140
|
}
|
169
|
-
|
170
141
|
function _stdin() {
|
171
142
|
_stdin = _asyncToGenerator(function* () {
|
172
143
|
const code = yield readStdin();
|
@@ -177,37 +148,27 @@ function _ref() {
|
|
177
148
|
});
|
178
149
|
return _stdin.apply(this, arguments);
|
179
150
|
}
|
180
|
-
|
181
151
|
function walk(_x2) {
|
182
152
|
return _walk.apply(this, arguments);
|
183
153
|
}
|
184
|
-
|
185
154
|
function _walk() {
|
186
155
|
_walk = _asyncToGenerator(function* (filenames) {
|
187
156
|
const _filenames = [];
|
188
157
|
filenames.forEach(function (filename) {
|
189
158
|
if (!_fs().existsSync(filename)) return;
|
190
|
-
|
191
159
|
const stat = _fs().statSync(filename);
|
192
|
-
|
193
160
|
if (stat.isDirectory()) {
|
194
|
-
|
195
|
-
util.readdirForCompilable(filename, cliOptions.includeDotfiles, cliOptions.extensions).forEach(function (filename) {
|
196
|
-
_filenames.push(_path().join(dirname, filename));
|
197
|
-
});
|
161
|
+
_filenames.push(...util.readdirForCompilable(filename, cliOptions.includeDotfiles, cliOptions.extensions));
|
198
162
|
} else {
|
199
163
|
_filenames.push(filename);
|
200
164
|
}
|
201
165
|
});
|
202
166
|
const results = yield Promise.all(_filenames.map(_asyncToGenerator(function* (filename) {
|
203
167
|
let sourceFilename = filename;
|
204
|
-
|
205
168
|
if (cliOptions.outFile) {
|
206
169
|
sourceFilename = _path().relative(_path().dirname(cliOptions.outFile), sourceFilename);
|
207
170
|
}
|
208
|
-
|
209
171
|
sourceFilename = _slash()(sourceFilename);
|
210
|
-
|
211
172
|
try {
|
212
173
|
return yield util.compile(filename, Object.assign({}, babelOptions, {
|
213
174
|
sourceFileName: sourceFilename,
|
@@ -217,7 +178,6 @@ function _ref() {
|
|
217
178
|
if (!cliOptions.watch) {
|
218
179
|
throw err;
|
219
180
|
}
|
220
|
-
|
221
181
|
console.error(err);
|
222
182
|
return null;
|
223
183
|
}
|
@@ -226,11 +186,9 @@ function _ref() {
|
|
226
186
|
});
|
227
187
|
return _walk.apply(this, arguments);
|
228
188
|
}
|
229
|
-
|
230
189
|
function files(_x3) {
|
231
190
|
return _files.apply(this, arguments);
|
232
191
|
}
|
233
|
-
|
234
192
|
function _files() {
|
235
193
|
_files = _asyncToGenerator(function* (filenames) {
|
236
194
|
if (cliOptions.watch) {
|
@@ -238,22 +196,18 @@ function _ref() {
|
|
238
196
|
enableGlobbing: false
|
239
197
|
});
|
240
198
|
}
|
241
|
-
|
242
199
|
if (!cliOptions.skipInitialBuild) {
|
243
200
|
yield walk(filenames);
|
244
201
|
}
|
245
|
-
|
246
202
|
if (cliOptions.watch) {
|
247
203
|
filenames.forEach(watcher.watch);
|
248
204
|
watcher.startWatcher();
|
249
205
|
watcher.onFilesChange((changes, event, cause) => {
|
250
206
|
const actionableChange = changes.some(filename => util.isCompilableExtension(filename, cliOptions.extensions) || filenames.includes(filename));
|
251
207
|
if (!actionableChange) return;
|
252
|
-
|
253
208
|
if (cliOptions.verbose) {
|
254
209
|
console.log(`${event} ${cause}`);
|
255
210
|
}
|
256
|
-
|
257
211
|
walk(filenames).catch(err => {
|
258
212
|
console.error(err);
|
259
213
|
});
|
@@ -262,7 +216,6 @@ function _ref() {
|
|
262
216
|
});
|
263
217
|
return _files.apply(this, arguments);
|
264
218
|
}
|
265
|
-
|
266
219
|
if (cliOptions.filenames.length) {
|
267
220
|
yield files(cliOptions.filenames);
|
268
221
|
} else {
|
@@ -270,4 +223,6 @@ function _ref() {
|
|
270
223
|
}
|
271
224
|
});
|
272
225
|
return _ref.apply(this, arguments);
|
273
|
-
}
|
226
|
+
}
|
227
|
+
|
228
|
+
//# sourceMappingURL=file.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_convertSourceMap","data","require","_traceMapping","_slash","_path","_fs","util","watcher","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","_default","_x","_ref","cliOptions","babelOptions","buildResult","fileResults","mapSections","code","offset","hasRawMap","result","map","push","line","column","version","names","sources","mappings","countNewlines","AnyMap","file","sourceMapTarget","path","basename","outFile","sections","sourceRoot","sourceMaps","convertSourceMap","fromObject","encodedMap","toComment","count","index","indexOf","output","v","w","split","process","versions","node","mkdirSync","sync","dirname","recursive","outputMap","hasDataSourcemap","mapLoc","addSourceMappingUrl","fs","writeFileSync","JSON","stringify","stdout","write","readStdin","reject","stdin","setEncoding","on","chunk","read","_stdin","res","transformRepl","filename","Object","assign","sourceFileName","walk","_x2","_walk","filenames","_filenames","forEach","existsSync","stat","statSync","isDirectory","readdirForCompilable","includeDotfiles","extensions","results","all","sourceFilename","relative","slash","compile","err","watch","console","error","files","_x3","_files","enable","enableGlobbing","skipInitialBuild","startWatcher","onFilesChange","changes","event","cause","actionableChange","some","isCompilableExtension","includes","verbose","log","catch","length"],"sources":["../../src/babel/file.ts"],"sourcesContent":["import convertSourceMap from \"convert-source-map\";\nimport { AnyMap, encodedMap } from \"@jridgewell/trace-mapping\";\nimport slash from \"slash\";\nimport path from \"path\";\nimport fs from \"fs\";\n\nimport * as util from \"./util.ts\";\nimport type { CmdOptions } from \"./options.ts\";\nimport * as watcher from \"./watcher.ts\";\n\nimport type {\n EncodedSourceMap,\n SectionedSourceMap,\n SourceMapInput,\n TraceMap,\n} from \"@jridgewell/trace-mapping\";\nimport type { FileResult } from \"@babel/core\";\n\ntype CompilationOutput = {\n code: string;\n map: SourceMapInput;\n hasRawMap: boolean;\n};\n\nexport default async function ({\n cliOptions,\n babelOptions,\n}: CmdOptions): Promise<void> {\n function buildResult(fileResults: Array<FileResult>): CompilationOutput {\n const mapSections: SectionedSourceMap[\"sections\"] = [];\n\n let code = \"\";\n let offset = 0;\n\n let hasRawMap = false;\n\n for (const result of fileResults) {\n if (!result) continue;\n\n hasRawMap = !!result.map;\n\n mapSections.push({\n offset: { line: offset, column: 0 },\n map: (result.map as EncodedSourceMap) || {\n version: 3,\n names: [],\n sources: [],\n mappings: [],\n },\n });\n\n code += result.code + \"\\n\";\n offset += countNewlines(result.code) + 1;\n }\n\n const map = new AnyMap({\n version: 3,\n file:\n cliOptions.sourceMapTarget ||\n path.basename(cliOptions.outFile || \"\") ||\n \"stdout\",\n sections: mapSections,\n });\n // For some reason, the spec doesn't allow sourceRoot when constructing a\n // sectioned sourcemap. But AllMap returns a regular sourcemap, we can\n // freely add to with a sourceRoot.\n map.sourceRoot = babelOptions.sourceRoot;\n\n // add the inline sourcemap comment if we've either explicitly asked for inline source\n // maps, or we've requested them without any output file\n if (\n babelOptions.sourceMaps === \"inline\" ||\n (!cliOptions.outFile && babelOptions.sourceMaps)\n ) {\n code += \"\\n\" + convertSourceMap.fromObject(encodedMap(map)).toComment();\n }\n\n return {\n map: map,\n code: code,\n hasRawMap: hasRawMap,\n };\n }\n\n function countNewlines(code: string): number {\n let count = 0;\n let index = -1;\n while ((index = code.indexOf(\"\\n\", index + 1)) !== -1) {\n count++;\n }\n return count;\n }\n\n function output(fileResults: Array<FileResult>): void {\n const result = buildResult(fileResults);\n\n if (cliOptions.outFile) {\n fs.mkdirSync(path.dirname(cliOptions.outFile), { recursive: true });\n\n let outputMap: \"both\" | \"external\" | false = false;\n if (babelOptions.sourceMaps && babelOptions.sourceMaps !== \"inline\") {\n outputMap = \"external\";\n } else if (babelOptions.sourceMaps == null && result.hasRawMap) {\n outputMap = util.hasDataSourcemap(result.code) ? \"external\" : \"both\";\n }\n\n if (outputMap) {\n const mapLoc = cliOptions.outFile + \".map\";\n if (outputMap === \"external\") {\n result.code = util.addSourceMappingUrl(result.code, mapLoc);\n }\n fs.writeFileSync(\n mapLoc,\n JSON.stringify(encodedMap(result.map as TraceMap)),\n );\n }\n\n fs.writeFileSync(cliOptions.outFile, result.code);\n } else {\n process.stdout.write(result.code + \"\\n\");\n }\n }\n\n function readStdin(): Promise<string> {\n return new Promise((resolve, reject): void => {\n let code = \"\";\n\n process.stdin.setEncoding(\"utf8\");\n\n process.stdin.on(\"readable\", function () {\n const chunk = process.stdin.read();\n if (chunk !== null) code += chunk;\n });\n\n process.stdin.on(\"end\", function () {\n resolve(code);\n });\n process.stdin.on(\"error\", reject);\n });\n }\n\n async function stdin(): Promise<void> {\n const code = await readStdin();\n\n const res = await util.transformRepl(cliOptions.filename, code, {\n ...babelOptions,\n sourceFileName: \"stdin\",\n });\n\n output([res]);\n }\n\n async function walk(filenames: Array<string>): Promise<void> {\n const _filenames: string[] = [];\n\n filenames.forEach(function (filename) {\n if (!fs.existsSync(filename)) return;\n\n const stat = fs.statSync(filename);\n if (stat.isDirectory()) {\n _filenames.push(\n ...util.readdirForCompilable(\n filename,\n cliOptions.includeDotfiles,\n cliOptions.extensions,\n ),\n );\n } else {\n _filenames.push(filename);\n }\n });\n\n const results = await Promise.all(\n _filenames.map(async function (filename: string): Promise<any> {\n let sourceFilename = filename;\n if (cliOptions.outFile) {\n sourceFilename = path.relative(\n path.dirname(cliOptions.outFile),\n sourceFilename,\n );\n }\n sourceFilename = slash(sourceFilename);\n\n try {\n return await util.compile(filename, {\n ...babelOptions,\n sourceFileName: sourceFilename,\n // Since we're compiling everything to be merged together,\n // \"inline\" applies to the final output file, but not to the individual\n // files being concatenated.\n sourceMaps:\n babelOptions.sourceMaps === \"inline\"\n ? true\n : babelOptions.sourceMaps,\n });\n } catch (err) {\n if (!cliOptions.watch) {\n throw err;\n }\n\n console.error(err);\n return null;\n }\n }),\n );\n\n output(results);\n }\n\n async function files(filenames: Array<string>): Promise<void> {\n if (cliOptions.watch) {\n watcher.enable({ enableGlobbing: false });\n }\n\n if (!cliOptions.skipInitialBuild) {\n await walk(filenames);\n }\n\n if (cliOptions.watch) {\n filenames.forEach(watcher.watch);\n\n watcher.startWatcher();\n\n watcher.onFilesChange((changes, event, cause) => {\n const actionableChange = changes.some(\n filename =>\n util.isCompilableExtension(filename, cliOptions.extensions) ||\n filenames.includes(filename),\n );\n if (!actionableChange) return;\n\n if (cliOptions.verbose) {\n console.log(`${event} ${cause}`);\n }\n\n walk(filenames).catch(err => {\n console.error(err);\n });\n });\n }\n }\n\n if (cliOptions.filenames.length) {\n await files(cliOptions.filenames);\n } else {\n await stdin();\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,kBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,iBAAA,YA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