@powerlines/plugin-env 0.16.60 → 0.16.62
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/README.md +14 -16
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +1 -3
- package/dist/_virtual/{rolldown_runtime.mjs → _rolldown/runtime.mjs} +2 -3
- package/dist/babel/index.cjs +1 -0
- package/dist/babel/plugin.cjs +20 -19
- package/dist/babel/plugin.d.cts +0 -1
- package/dist/babel/plugin.d.cts.map +1 -1
- package/dist/babel/plugin.d.mts +0 -1
- package/dist/babel/plugin.d.mts.map +1 -1
- package/dist/babel/plugin.mjs +3 -3
- package/dist/babel/plugin.mjs.map +1 -1
- package/dist/components/docs.cjs +26 -25
- package/dist/components/docs.d.cts.map +1 -1
- package/dist/components/docs.d.mts.map +1 -1
- package/dist/components/docs.mjs +1 -1
- package/dist/components/env-builtin.cjs +155 -153
- package/dist/components/env-builtin.d.cts +0 -1
- package/dist/components/env-builtin.d.cts.map +1 -1
- package/dist/components/env-builtin.d.mts +0 -1
- package/dist/components/env-builtin.d.mts.map +1 -1
- package/dist/components/env-builtin.mjs +1 -1
- package/dist/components/index.cjs +1 -0
- package/dist/helpers/automd-generator.cjs +4 -3
- package/dist/helpers/automd-generator.d.cts +2 -3
- package/dist/helpers/automd-generator.d.cts.map +1 -1
- package/dist/helpers/automd-generator.d.mts +2 -3
- package/dist/helpers/automd-generator.d.mts.map +1 -1
- package/dist/helpers/automd-generator.mjs +1 -1
- package/dist/helpers/automd-generator.mjs.map +1 -1
- package/dist/helpers/create-reflection-resource.cjs +1 -0
- package/dist/helpers/create-reflection-resource.d.cts +0 -1
- package/dist/helpers/create-reflection-resource.d.cts.map +1 -1
- package/dist/helpers/create-reflection-resource.d.mts +0 -1
- package/dist/helpers/create-reflection-resource.d.mts.map +1 -1
- package/dist/helpers/create-reflection-resource.mjs.map +1 -1
- package/dist/helpers/docs-helper.cjs +4 -2
- package/dist/helpers/docs-helper.d.cts +0 -1
- package/dist/helpers/docs-helper.d.cts.map +1 -1
- package/dist/helpers/docs-helper.d.mts +0 -1
- package/dist/helpers/docs-helper.d.mts.map +1 -1
- package/dist/helpers/docs-helper.mjs +1 -1
- package/dist/helpers/docs-helper.mjs.map +1 -1
- package/dist/helpers/index.cjs +1 -0
- package/dist/helpers/load.cjs +19 -17
- package/dist/helpers/load.d.cts +0 -1
- package/dist/helpers/load.d.cts.map +1 -1
- package/dist/helpers/load.d.mts +0 -1
- package/dist/helpers/load.d.mts.map +1 -1
- package/dist/helpers/load.mjs +2 -2
- package/dist/helpers/load.mjs.map +1 -1
- package/dist/helpers/persistence.cjs +59 -58
- package/dist/helpers/persistence.d.cts +0 -1
- package/dist/helpers/persistence.d.cts.map +1 -1
- package/dist/helpers/persistence.d.mts +0 -1
- package/dist/helpers/persistence.d.mts.map +1 -1
- package/dist/helpers/persistence.mjs +15 -15
- package/dist/helpers/persistence.mjs.map +1 -1
- package/dist/helpers/reflect.cjs +40 -39
- package/dist/helpers/reflect.d.cts.map +1 -1
- package/dist/helpers/reflect.d.mts.map +1 -1
- package/dist/helpers/reflect.mjs +2 -2
- package/dist/helpers/reflect.mjs.map +1 -1
- package/dist/helpers/source-file-env.cjs +8 -7
- package/dist/helpers/source-file-env.d.cts.map +1 -1
- package/dist/helpers/source-file-env.d.mts.map +1 -1
- package/dist/helpers/source-file-env.mjs.map +1 -1
- package/dist/helpers/template-helpers.cjs +6 -5
- package/dist/helpers/template-helpers.d.cts +0 -1
- package/dist/helpers/template-helpers.d.cts.map +1 -1
- package/dist/helpers/template-helpers.d.mts +0 -1
- package/dist/helpers/template-helpers.d.mts.map +1 -1
- package/dist/helpers/template-helpers.mjs.map +1 -1
- package/dist/index.cjs +49 -49
- package/dist/index.d.cts +0 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -6
- package/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.cjs +7 -7
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs +6 -6
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.cjs +6 -6
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +6 -6
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.cjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.cjs +655 -655
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs +655 -655
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.cjs +179 -179
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs +179 -179
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.cjs +188 -188
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +188 -188
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.cjs +297 -297
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs +297 -297
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.cjs +8 -8
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs +8 -8
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.cjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs +4 -4
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.cjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +3 -3
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +1 -1
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.cjs +2 -2
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs +2 -2
- package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs.map +1 -1
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.cjs +5 -5
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs +4 -4
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs.map +1 -1
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.cjs +2 -2
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs +1 -1
- package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs.map +1 -1
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +18 -18
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +2 -2
- package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +1308 -1311
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +1294 -1297
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +1 -1
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs +2194 -2194
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +2193 -2193
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +1 -1
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +3 -3
- package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +3 -3
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +34 -34
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +33 -33
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +221 -223
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +220 -222
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +1 -1
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +2 -2
- package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +1 -1
- package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.cjs +3 -3
- package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs +5 -5
- package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs +1 -1
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +6 -6
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +5 -5
- package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +10 -10
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +16 -16
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +412 -412
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +189 -189
- package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +1 -1
- package/dist/types/index.cjs +1 -0
- package/dist/types/plugin.cjs +20 -19
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts.map +1 -1
- package/dist/types/plugin.mjs.map +1 -1
- package/dist/types/runtime.cjs +1 -0
- package/dist/types/runtime.d.cts.map +1 -1
- package/dist/types/runtime.d.mts.map +1 -1
- package/dist/types/runtime.mjs.map +1 -1
- package/package.json +45 -26
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.cjs +0 -37
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.mjs +0 -38
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/parse-type-definition.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/to-array.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -3
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -5
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +0 -7
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -3
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +0 -19
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +0 -20
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +0 -63
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +0 -64
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +0 -17
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.53/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.cjs +0 -32
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.mjs +0 -33
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-parent-path.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.cjs +0 -28
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.mjs +0 -29
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/is-type.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.cjs +0 -122
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs +0 -123
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/join-paths.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.mjs +0 -9
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/regex.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.19/node_modules/@stryke/path/dist/slash.mjs.map +0 -1
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.cjs +0 -43
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs +0 -43
- package/dist/node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs.map +0 -1
package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_runtime = require('../../../../../../../_virtual/_rolldown/runtime.cjs');
|
|
2
2
|
const require_pathe_M_eThtNZ = require('../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs');
|
|
3
|
-
const require_defu = require('../../../../../defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
4
3
|
const require_index = require('../../../../../nypm@0.6.5/node_modules/nypm/dist/index.cjs');
|
|
5
4
|
const require_proxy$1 = require('../../../../../node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs');
|
|
6
5
|
let node_fs = require("node:fs");
|
|
7
|
-
node_fs =
|
|
6
|
+
node_fs = require_runtime.__toESM(node_fs);
|
|
8
7
|
let node_path = require("node:path");
|
|
9
|
-
node_path =
|
|
8
|
+
node_path = require_runtime.__toESM(node_path);
|
|
10
9
|
let node_os = require("node:os");
|
|
11
10
|
let node_crypto = require("node:crypto");
|
|
12
|
-
node_crypto =
|
|
11
|
+
node_crypto = require_runtime.__toESM(node_crypto);
|
|
13
12
|
let node_fs_promises = require("node:fs/promises");
|
|
14
13
|
let node_assert = require("node:assert");
|
|
15
|
-
node_assert =
|
|
14
|
+
node_assert = require_runtime.__toESM(node_assert);
|
|
16
15
|
let node_process = require("node:process");
|
|
17
|
-
node_process =
|
|
16
|
+
node_process = require_runtime.__toESM(node_process);
|
|
18
17
|
let node_util = require("node:util");
|
|
19
|
-
node_util =
|
|
18
|
+
node_util = require_runtime.__toESM(node_util);
|
|
19
|
+
let defu = require("defu");
|
|
20
20
|
let node_events = require("node:events");
|
|
21
|
-
node_events =
|
|
21
|
+
node_events = require_runtime.__toESM(node_events);
|
|
22
22
|
let node_stream = require("node:stream");
|
|
23
|
-
node_stream =
|
|
23
|
+
node_stream = require_runtime.__toESM(node_stream);
|
|
24
24
|
let node_string_decoder = require("node:string_decoder");
|
|
25
|
-
node_string_decoder =
|
|
25
|
+
node_string_decoder = require_runtime.__toESM(node_string_decoder);
|
|
26
26
|
let node_buffer = require("node:buffer");
|
|
27
|
-
node_buffer =
|
|
27
|
+
node_buffer = require_runtime.__toESM(node_buffer);
|
|
28
28
|
let node_zlib = require("node:zlib");
|
|
29
|
-
node_zlib =
|
|
29
|
+
node_zlib = require_runtime.__toESM(node_zlib);
|
|
30
30
|
let node_child_process = require("node:child_process");
|
|
31
31
|
|
|
32
32
|
//#region ../../node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs
|
|
@@ -39,7 +39,7 @@ var i$6, t$5;
|
|
|
39
39
|
function s$6() {
|
|
40
40
|
if (t$5) return i$6;
|
|
41
41
|
t$5 = 1;
|
|
42
|
-
const n
|
|
42
|
+
const n = new Map([
|
|
43
43
|
["C", "cwd"],
|
|
44
44
|
["f", "file"],
|
|
45
45
|
["z", "gzip"],
|
|
@@ -60,21 +60,21 @@ function s$6() {
|
|
|
60
60
|
["L", "follow"],
|
|
61
61
|
["h", "follow"]
|
|
62
62
|
]);
|
|
63
|
-
return i$6 = (r) => r ? Object.keys(r).map((e
|
|
63
|
+
return i$6 = (r) => r ? Object.keys(r).map((e) => [n.has(e) ? n.get(e) : e, r[e]]).reduce((e, p) => (e[p[0]] = p[1], e), Object.create(null)) : {}, i$6;
|
|
64
64
|
}
|
|
65
65
|
var e$5, t$4;
|
|
66
66
|
function c$4() {
|
|
67
|
-
return t$4 || (t$4 = 1, e$5 = (o
|
|
68
|
-
warn(n
|
|
69
|
-
this.file && (r.file = this.file), this.cwd && (r.cwd = this.cwd), r.code = i
|
|
67
|
+
return t$4 || (t$4 = 1, e$5 = (o) => class extends o {
|
|
68
|
+
warn(n, i, r = {}) {
|
|
69
|
+
this.file && (r.file = this.file), this.cwd && (r.cwd = this.cwd), r.code = i instanceof Error && i.code || n, r.tarCode = n, !this.strict && r.recoverable !== false ? (i instanceof Error && (r = Object.assign(i, r), i = i.message), this.emit("warn", r.tarCode, i, r)) : i instanceof Error ? this.emit("error", Object.assign(i, r)) : this.emit("error", Object.assign(/* @__PURE__ */ new Error(`${n}: ${i}`), r));
|
|
70
70
|
}
|
|
71
71
|
}), e$5;
|
|
72
72
|
}
|
|
73
73
|
var e$4 = {};
|
|
74
74
|
var a$9;
|
|
75
75
|
function n$3() {
|
|
76
|
-
return a$9 ? e$4 : (a$9 = 1, function(e
|
|
77
|
-
e
|
|
76
|
+
return a$9 ? e$4 : (a$9 = 1, function(e) {
|
|
77
|
+
e.name = new Map([
|
|
78
78
|
["0", "File"],
|
|
79
79
|
["", "OldFile"],
|
|
80
80
|
["1", "Link"],
|
|
@@ -96,48 +96,48 @@ function n$3() {
|
|
|
96
96
|
["S", "SparseFile"],
|
|
97
97
|
["V", "TapeVolumeHeader"],
|
|
98
98
|
["X", "OldExtendedHeader"]
|
|
99
|
-
]), e
|
|
99
|
+
]), e.code = new Map(Array.from(e.name).map((i) => [i[1], i[0]]));
|
|
100
100
|
}(e$4), e$4);
|
|
101
101
|
}
|
|
102
102
|
var f$3, i$5;
|
|
103
103
|
function w$1() {
|
|
104
104
|
if (i$5) return f$3;
|
|
105
105
|
i$5 = 1;
|
|
106
|
-
const v
|
|
107
|
-
if (Number.isSafeInteger(e
|
|
106
|
+
const v = (e, r) => {
|
|
107
|
+
if (Number.isSafeInteger(e)) e < 0 ? g(e, r) : p(e, r);
|
|
108
108
|
else throw Error("cannot encode number outside of javascript safe integer range");
|
|
109
109
|
return r;
|
|
110
|
-
}, p
|
|
110
|
+
}, p = (e, r) => {
|
|
111
111
|
r[0] = 128;
|
|
112
|
-
for (var o
|
|
113
|
-
}, g = (e
|
|
112
|
+
for (var o = r.length; o > 1; o--) r[o - 1] = e & 255, e = Math.floor(e / 256);
|
|
113
|
+
}, g = (e, r) => {
|
|
114
114
|
r[0] = 255;
|
|
115
|
-
var o
|
|
116
|
-
e
|
|
117
|
-
for (var s
|
|
118
|
-
var a
|
|
119
|
-
e
|
|
120
|
-
}
|
|
121
|
-
}, h = (e
|
|
122
|
-
const r = e
|
|
123
|
-
if (o
|
|
124
|
-
if (!Number.isSafeInteger(o
|
|
125
|
-
return o
|
|
126
|
-
}, x = (e
|
|
127
|
-
for (var r = e
|
|
128
|
-
var n
|
|
129
|
-
s
|
|
130
|
-
}
|
|
131
|
-
return o
|
|
132
|
-
}, d = (e
|
|
133
|
-
for (var r = e
|
|
134
|
-
var a
|
|
135
|
-
a
|
|
136
|
-
}
|
|
137
|
-
return o
|
|
138
|
-
}, l
|
|
115
|
+
var o = false;
|
|
116
|
+
e = e * -1;
|
|
117
|
+
for (var s = r.length; s > 1; s--) {
|
|
118
|
+
var a = e & 255;
|
|
119
|
+
e = Math.floor(e / 256), o ? r[s - 1] = l(a) : a === 0 ? r[s - 1] = 0 : (o = true, r[s - 1] = c(a));
|
|
120
|
+
}
|
|
121
|
+
}, h = (e) => {
|
|
122
|
+
const r = e[0], o = r === 128 ? d(e.slice(1, e.length)) : r === 255 ? x(e) : null;
|
|
123
|
+
if (o === null) throw Error("invalid base256 encoding");
|
|
124
|
+
if (!Number.isSafeInteger(o)) throw Error("parsed number outside of javascript safe integer range");
|
|
125
|
+
return o;
|
|
126
|
+
}, x = (e) => {
|
|
127
|
+
for (var r = e.length, o = 0, s = false, a = r - 1; a > -1; a--) {
|
|
128
|
+
var n = e[a], t;
|
|
129
|
+
s ? t = l(n) : n === 0 ? t = n : (s = true, t = c(n)), t !== 0 && (o -= t * Math.pow(256, r - a - 1));
|
|
130
|
+
}
|
|
131
|
+
return o;
|
|
132
|
+
}, d = (e) => {
|
|
133
|
+
for (var r = e.length, o = 0, s = r - 1; s > -1; s--) {
|
|
134
|
+
var a = e[s];
|
|
135
|
+
a !== 0 && (o += a * Math.pow(256, r - s - 1));
|
|
136
|
+
}
|
|
137
|
+
return o;
|
|
138
|
+
}, l = (e) => (255 ^ e) & 255, c = (e) => (255 ^ e) + 1 & 255;
|
|
139
139
|
return f$3 = {
|
|
140
|
-
encode: v
|
|
140
|
+
encode: v,
|
|
141
141
|
parse: h
|
|
142
142
|
}, f$3;
|
|
143
143
|
}
|
|
@@ -145,86 +145,86 @@ var k, w;
|
|
|
145
145
|
function E() {
|
|
146
146
|
if (w) return k;
|
|
147
147
|
w = 1;
|
|
148
|
-
const u
|
|
148
|
+
const u = n$3(), x = node_path.default.posix, y = w$1(), P = Symbol("slurp"), a = Symbol("type");
|
|
149
149
|
class B {
|
|
150
|
-
constructor(e
|
|
151
|
-
this.cksumValid = false, this.needPax = false, this.nullBlock = false, this.block = null, this.path = null, this.mode = null, this.uid = null, this.gid = null, this.size = null, this.mtime = null, this.cksum = null, this[a
|
|
150
|
+
constructor(e, t, i, h) {
|
|
151
|
+
this.cksumValid = false, this.needPax = false, this.nullBlock = false, this.block = null, this.path = null, this.mode = null, this.uid = null, this.gid = null, this.size = null, this.mtime = null, this.cksum = null, this[a] = "0", this.linkpath = null, this.uname = null, this.gname = null, this.devmaj = 0, this.devmin = 0, this.atime = null, this.ctime = null, Buffer.isBuffer(e) ? this.decode(e, t || 0, i, h) : e && this.set(e);
|
|
152
152
|
}
|
|
153
|
-
decode(e
|
|
154
|
-
if (t
|
|
155
|
-
if (this.path = d(e
|
|
153
|
+
decode(e, t, i, h) {
|
|
154
|
+
if (t || (t = 0), !e || !(e.length >= t + 512)) throw new Error("need 512 bytes for header");
|
|
155
|
+
if (this.path = d(e, t, 100), this.mode = r(e, t + 100, 8), this.uid = r(e, t + 108, 8), this.gid = r(e, t + 116, 8), this.size = r(e, t + 124, 12), this.mtime = o(e, t + 136, 12), this.cksum = r(e, t + 148, 12), this[P](i), this[P](h, true), this[a] = d(e, t + 156, 1), this[a] === "" && (this[a] = "0"), this[a] === "0" && this.path.slice(-1) === "/" && (this[a] = "5"), this[a] === "5" && (this.size = 0), this.linkpath = d(e, t + 157, 100), e.slice(t + 257, t + 265).toString() === "ustar\x0000") if (this.uname = d(e, t + 265, 32), this.gname = d(e, t + 297, 32), this.devmaj = r(e, t + 329, 8), this.devmin = r(e, t + 337, 8), e[t + 475] !== 0) this.path = d(e, t + 345, 155) + "/" + this.path;
|
|
156
156
|
else {
|
|
157
|
-
const n
|
|
158
|
-
n
|
|
157
|
+
const n = d(e, t + 345, 130);
|
|
158
|
+
n && (this.path = n + "/" + this.path), this.atime = o(e, t + 476, 12), this.ctime = o(e, t + 488, 12);
|
|
159
159
|
}
|
|
160
|
-
let l
|
|
161
|
-
for (let n
|
|
162
|
-
for (let n
|
|
163
|
-
this.cksumValid = l
|
|
164
|
-
}
|
|
165
|
-
[P
|
|
166
|
-
for (const i
|
|
167
|
-
}
|
|
168
|
-
encode(e
|
|
169
|
-
if (e
|
|
170
|
-
const i
|
|
171
|
-
this.needPax = h[2], this.needPax = m
|
|
172
|
-
let S
|
|
173
|
-
for (let p
|
|
174
|
-
for (let p
|
|
175
|
-
return this.cksum = S
|
|
176
|
-
}
|
|
177
|
-
set(e
|
|
178
|
-
for (const t
|
|
160
|
+
let l = 256;
|
|
161
|
+
for (let n = t; n < t + 148; n++) l += e[n];
|
|
162
|
+
for (let n = t + 156; n < t + 512; n++) l += e[n];
|
|
163
|
+
this.cksumValid = l === this.cksum, this.cksum === null && l === 256 && (this.nullBlock = true);
|
|
164
|
+
}
|
|
165
|
+
[P](e, t) {
|
|
166
|
+
for (const i in e) e[i] !== null && e[i] !== void 0 && !(t && i === "path") && (this[i] = e[i]);
|
|
167
|
+
}
|
|
168
|
+
encode(e, t) {
|
|
169
|
+
if (e || (e = this.block = Buffer.alloc(512), t = 0), t || (t = 0), !(e.length >= t + 512)) throw new Error("need 512 bytes for header");
|
|
170
|
+
const i = this.ctime || this.atime ? 130 : 155, h = L(this.path || "", i), l = h[0], n = h[1];
|
|
171
|
+
this.needPax = h[2], this.needPax = m(e, t, 100, l) || this.needPax, this.needPax = c(e, t + 100, 8, this.mode) || this.needPax, this.needPax = c(e, t + 108, 8, this.uid) || this.needPax, this.needPax = c(e, t + 116, 8, this.gid) || this.needPax, this.needPax = c(e, t + 124, 12, this.size) || this.needPax, this.needPax = g(e, t + 136, 12, this.mtime) || this.needPax, e[t + 156] = this[a].charCodeAt(0), this.needPax = m(e, t + 157, 100, this.linkpath) || this.needPax, e.write("ustar\x0000", t + 257, 8), this.needPax = m(e, t + 265, 32, this.uname) || this.needPax, this.needPax = m(e, t + 297, 32, this.gname) || this.needPax, this.needPax = c(e, t + 329, 8, this.devmaj) || this.needPax, this.needPax = c(e, t + 337, 8, this.devmin) || this.needPax, this.needPax = m(e, t + 345, i, n) || this.needPax, e[t + 475] !== 0 ? this.needPax = m(e, t + 345, 155, n) || this.needPax : (this.needPax = m(e, t + 345, 130, n) || this.needPax, this.needPax = g(e, t + 476, 12, this.atime) || this.needPax, this.needPax = g(e, t + 488, 12, this.ctime) || this.needPax);
|
|
172
|
+
let S = 256;
|
|
173
|
+
for (let p = t; p < t + 148; p++) S += e[p];
|
|
174
|
+
for (let p = t + 156; p < t + 512; p++) S += e[p];
|
|
175
|
+
return this.cksum = S, c(e, t + 148, 8, this.cksum), this.cksumValid = true, this.needPax;
|
|
176
|
+
}
|
|
177
|
+
set(e) {
|
|
178
|
+
for (const t in e) e[t] !== null && e[t] !== void 0 && (this[t] = e[t]);
|
|
179
179
|
}
|
|
180
180
|
get type() {
|
|
181
|
-
return u
|
|
181
|
+
return u.name.get(this[a]) || this[a];
|
|
182
182
|
}
|
|
183
183
|
get typeKey() {
|
|
184
|
-
return this[a
|
|
184
|
+
return this[a];
|
|
185
185
|
}
|
|
186
|
-
set type(e
|
|
187
|
-
u
|
|
186
|
+
set type(e) {
|
|
187
|
+
u.code.has(e) ? this[a] = u.code.get(e) : this[a] = e;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
const L = (s
|
|
191
|
-
let i
|
|
192
|
-
const n
|
|
193
|
-
if (Buffer.byteLength(i
|
|
194
|
-
i
|
|
190
|
+
const L = (s, e) => {
|
|
191
|
+
let i = s, h = "", l;
|
|
192
|
+
const n = x.parse(s).root || ".";
|
|
193
|
+
if (Buffer.byteLength(i) < 100) l = [
|
|
194
|
+
i,
|
|
195
195
|
h,
|
|
196
196
|
false
|
|
197
197
|
];
|
|
198
198
|
else {
|
|
199
|
-
h = x.dirname(i
|
|
199
|
+
h = x.dirname(i), i = x.basename(i);
|
|
200
200
|
do
|
|
201
|
-
Buffer.byteLength(i
|
|
202
|
-
i
|
|
201
|
+
Buffer.byteLength(i) <= 100 && Buffer.byteLength(h) <= e ? l = [
|
|
202
|
+
i,
|
|
203
203
|
h,
|
|
204
204
|
false
|
|
205
|
-
] : Buffer.byteLength(i
|
|
206
|
-
i
|
|
205
|
+
] : Buffer.byteLength(i) > 100 && Buffer.byteLength(h) <= e ? l = [
|
|
206
|
+
i.slice(0, 99),
|
|
207
207
|
h,
|
|
208
208
|
true
|
|
209
|
-
] : (i
|
|
210
|
-
while (h !== n
|
|
211
|
-
l
|
|
212
|
-
s
|
|
209
|
+
] : (i = x.join(x.basename(h), i), h = x.dirname(h));
|
|
210
|
+
while (h !== n && !l);
|
|
211
|
+
l || (l = [
|
|
212
|
+
s.slice(0, 99),
|
|
213
213
|
"",
|
|
214
214
|
true
|
|
215
215
|
]);
|
|
216
216
|
}
|
|
217
|
-
return l
|
|
218
|
-
}, d = (s
|
|
217
|
+
return l;
|
|
218
|
+
}, d = (s, e, t) => s.slice(e, e + t).toString("utf8").replace(/\0.*/, ""), o = (s, e, t) => N(r(s, e, t)), N = (s) => s === null ? null : /* @__PURE__ */ new Date(s * 1e3), r = (s, e, t) => s[e] & 128 ? y.parse(s.slice(e, e + t)) : j(s, e, t), q = (s) => isNaN(s) ? null : s, j = (s, e, t) => q(parseInt(s.slice(e, e + t).toString("utf8").replace(/\0.*$/, "").trim(), 8)), v = {
|
|
219
219
|
12: 8589934591,
|
|
220
220
|
8: 2097151
|
|
221
|
-
}, c
|
|
221
|
+
}, c = (s, e, t, i) => i === null ? false : i > v[t] || i < 0 ? (y.encode(i, s.slice(e, e + t)), true) : ($(s, e, t, i), false), $ = (s, e, t, i) => s.write(_(i, t), e, t, "ascii"), _ = (s, e) => z(Math.floor(s).toString(8), e), z = (s, e) => (s.length === e - 1 ? s : new Array(e - s.length - 1).join("0") + s + " ") + "\0", g = (s, e, t, i) => i === null ? false : c(s, e, t, i.getTime() / 1e3), A = new Array(156).join("\0"), m = (s, e, t, i) => i === null ? false : (s.write(i + A, e, t, "utf8"), i.length !== Buffer.byteLength(i) || i.length > t);
|
|
222
222
|
return k = B, k;
|
|
223
223
|
}
|
|
224
224
|
var e$3, t$3;
|
|
225
225
|
function i$4() {
|
|
226
|
-
return t$3 || (t$3 = 1, e$3 = function(o
|
|
227
|
-
o
|
|
226
|
+
return t$3 || (t$3 = 1, e$3 = function(o) {
|
|
227
|
+
o.prototype[Symbol.iterator] = function* () {
|
|
228
228
|
for (let r = this.head; r; r = r.next) yield r.value;
|
|
229
229
|
};
|
|
230
230
|
}), e$3;
|
|
@@ -232,130 +232,130 @@ function i$4() {
|
|
|
232
232
|
var u$4, a$8;
|
|
233
233
|
function c$3() {
|
|
234
234
|
if (a$8) return u$4;
|
|
235
|
-
a$8 = 1, u$4 = r, r.Node = s
|
|
236
|
-
function r(t
|
|
237
|
-
var i
|
|
238
|
-
if (i
|
|
239
|
-
i
|
|
235
|
+
a$8 = 1, u$4 = r, r.Node = s, r.create = r;
|
|
236
|
+
function r(t) {
|
|
237
|
+
var i = this;
|
|
238
|
+
if (i instanceof r || (i = new r()), i.tail = null, i.head = null, i.length = 0, t && typeof t.forEach == "function") t.forEach(function(n) {
|
|
239
|
+
i.push(n);
|
|
240
240
|
});
|
|
241
|
-
else if (arguments.length > 0) for (var e
|
|
242
|
-
return i
|
|
241
|
+
else if (arguments.length > 0) for (var e = 0, h = arguments.length; e < h; e++) i.push(arguments[e]);
|
|
242
|
+
return i;
|
|
243
243
|
}
|
|
244
|
-
r.prototype.removeNode = function(t
|
|
245
|
-
if (t
|
|
246
|
-
var i
|
|
247
|
-
return i
|
|
248
|
-
}, r.prototype.unshiftNode = function(t
|
|
249
|
-
if (t
|
|
250
|
-
t
|
|
251
|
-
var i
|
|
252
|
-
t
|
|
253
|
-
}
|
|
254
|
-
}, r.prototype.pushNode = function(t
|
|
255
|
-
if (t
|
|
256
|
-
t
|
|
257
|
-
var i
|
|
258
|
-
t
|
|
244
|
+
r.prototype.removeNode = function(t) {
|
|
245
|
+
if (t.list !== this) throw new Error("removing node which does not belong to this list");
|
|
246
|
+
var i = t.next, e = t.prev;
|
|
247
|
+
return i && (i.prev = e), e && (e.next = i), t === this.head && (this.head = i), t === this.tail && (this.tail = e), t.list.length--, t.next = null, t.prev = null, t.list = null, i;
|
|
248
|
+
}, r.prototype.unshiftNode = function(t) {
|
|
249
|
+
if (t !== this.head) {
|
|
250
|
+
t.list && t.list.removeNode(t);
|
|
251
|
+
var i = this.head;
|
|
252
|
+
t.list = this, t.next = i, i && (i.prev = t), this.head = t, this.tail || (this.tail = t), this.length++;
|
|
253
|
+
}
|
|
254
|
+
}, r.prototype.pushNode = function(t) {
|
|
255
|
+
if (t !== this.tail) {
|
|
256
|
+
t.list && t.list.removeNode(t);
|
|
257
|
+
var i = this.tail;
|
|
258
|
+
t.list = this, t.prev = i, i && (i.next = t), this.tail = t, this.head || (this.head = t), this.length++;
|
|
259
259
|
}
|
|
260
260
|
}, r.prototype.push = function() {
|
|
261
|
-
for (var t
|
|
261
|
+
for (var t = 0, i = arguments.length; t < i; t++) f(this, arguments[t]);
|
|
262
262
|
return this.length;
|
|
263
263
|
}, r.prototype.unshift = function() {
|
|
264
|
-
for (var t
|
|
264
|
+
for (var t = 0, i = arguments.length; t < i; t++) o(this, arguments[t]);
|
|
265
265
|
return this.length;
|
|
266
266
|
}, r.prototype.pop = function() {
|
|
267
267
|
if (this.tail) {
|
|
268
|
-
var t
|
|
269
|
-
return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, t
|
|
268
|
+
var t = this.tail.value;
|
|
269
|
+
return this.tail = this.tail.prev, this.tail ? this.tail.next = null : this.head = null, this.length--, t;
|
|
270
270
|
}
|
|
271
271
|
}, r.prototype.shift = function() {
|
|
272
272
|
if (this.head) {
|
|
273
|
-
var t
|
|
274
|
-
return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, t
|
|
275
|
-
}
|
|
276
|
-
}, r.prototype.forEach = function(t
|
|
277
|
-
i
|
|
278
|
-
for (var e
|
|
279
|
-
}, r.prototype.forEachReverse = function(t
|
|
280
|
-
i
|
|
281
|
-
for (var e
|
|
282
|
-
}, r.prototype.get = function(t
|
|
283
|
-
for (var i
|
|
284
|
-
if (i
|
|
285
|
-
}, r.prototype.getReverse = function(t
|
|
286
|
-
for (var i
|
|
287
|
-
if (i
|
|
288
|
-
}, r.prototype.map = function(t
|
|
289
|
-
i
|
|
290
|
-
for (var e
|
|
291
|
-
return e
|
|
292
|
-
}, r.prototype.mapReverse = function(t
|
|
293
|
-
i
|
|
294
|
-
for (var e
|
|
295
|
-
return e
|
|
296
|
-
}, r.prototype.reduce = function(t
|
|
297
|
-
var e
|
|
298
|
-
if (arguments.length > 1) e
|
|
299
|
-
else if (this.head) h = this.head.next, e
|
|
273
|
+
var t = this.head.value;
|
|
274
|
+
return this.head = this.head.next, this.head ? this.head.prev = null : this.tail = null, this.length--, t;
|
|
275
|
+
}
|
|
276
|
+
}, r.prototype.forEach = function(t, i) {
|
|
277
|
+
i = i || this;
|
|
278
|
+
for (var e = this.head, h = 0; e !== null; h++) t.call(i, e.value, h, this), e = e.next;
|
|
279
|
+
}, r.prototype.forEachReverse = function(t, i) {
|
|
280
|
+
i = i || this;
|
|
281
|
+
for (var e = this.tail, h = this.length - 1; e !== null; h--) t.call(i, e.value, h, this), e = e.prev;
|
|
282
|
+
}, r.prototype.get = function(t) {
|
|
283
|
+
for (var i = 0, e = this.head; e !== null && i < t; i++) e = e.next;
|
|
284
|
+
if (i === t && e !== null) return e.value;
|
|
285
|
+
}, r.prototype.getReverse = function(t) {
|
|
286
|
+
for (var i = 0, e = this.tail; e !== null && i < t; i++) e = e.prev;
|
|
287
|
+
if (i === t && e !== null) return e.value;
|
|
288
|
+
}, r.prototype.map = function(t, i) {
|
|
289
|
+
i = i || this;
|
|
290
|
+
for (var e = new r(), h = this.head; h !== null;) e.push(t.call(i, h.value, this)), h = h.next;
|
|
291
|
+
return e;
|
|
292
|
+
}, r.prototype.mapReverse = function(t, i) {
|
|
293
|
+
i = i || this;
|
|
294
|
+
for (var e = new r(), h = this.tail; h !== null;) e.push(t.call(i, h.value, this)), h = h.prev;
|
|
295
|
+
return e;
|
|
296
|
+
}, r.prototype.reduce = function(t, i) {
|
|
297
|
+
var e, h = this.head;
|
|
298
|
+
if (arguments.length > 1) e = i;
|
|
299
|
+
else if (this.head) h = this.head.next, e = this.head.value;
|
|
300
300
|
else throw new TypeError("Reduce of empty list with no initial value");
|
|
301
|
-
for (var n
|
|
302
|
-
return e
|
|
303
|
-
}, r.prototype.reduceReverse = function(t
|
|
304
|
-
var e
|
|
305
|
-
if (arguments.length > 1) e
|
|
306
|
-
else if (this.tail) h = this.tail.prev, e
|
|
301
|
+
for (var n = 0; h !== null; n++) e = t(e, h.value, n), h = h.next;
|
|
302
|
+
return e;
|
|
303
|
+
}, r.prototype.reduceReverse = function(t, i) {
|
|
304
|
+
var e, h = this.tail;
|
|
305
|
+
if (arguments.length > 1) e = i;
|
|
306
|
+
else if (this.tail) h = this.tail.prev, e = this.tail.value;
|
|
307
307
|
else throw new TypeError("Reduce of empty list with no initial value");
|
|
308
|
-
for (var n
|
|
309
|
-
return e
|
|
308
|
+
for (var n = this.length - 1; h !== null; n--) e = t(e, h.value, n), h = h.prev;
|
|
309
|
+
return e;
|
|
310
310
|
}, r.prototype.toArray = function() {
|
|
311
|
-
for (var t
|
|
312
|
-
return t
|
|
311
|
+
for (var t = new Array(this.length), i = 0, e = this.head; e !== null; i++) t[i] = e.value, e = e.next;
|
|
312
|
+
return t;
|
|
313
313
|
}, r.prototype.toArrayReverse = function() {
|
|
314
|
-
for (var t
|
|
315
|
-
return t
|
|
316
|
-
}, r.prototype.slice = function(t
|
|
317
|
-
i
|
|
318
|
-
var e
|
|
319
|
-
if (i
|
|
320
|
-
t
|
|
321
|
-
for (var h = 0, n
|
|
322
|
-
for (; n
|
|
323
|
-
return e
|
|
324
|
-
}, r.prototype.sliceReverse = function(t
|
|
325
|
-
i
|
|
326
|
-
var e
|
|
327
|
-
if (i
|
|
328
|
-
t
|
|
329
|
-
for (var h = this.length, n
|
|
330
|
-
for (; n
|
|
331
|
-
return e
|
|
332
|
-
}, r.prototype.splice = function(t
|
|
333
|
-
t
|
|
334
|
-
for (var h = 0, n
|
|
335
|
-
for (var l
|
|
336
|
-
n
|
|
337
|
-
for (var h = 0; h < e
|
|
338
|
-
return l
|
|
314
|
+
for (var t = new Array(this.length), i = 0, e = this.tail; e !== null; i++) t[i] = e.value, e = e.prev;
|
|
315
|
+
return t;
|
|
316
|
+
}, r.prototype.slice = function(t, i) {
|
|
317
|
+
i = i || this.length, i < 0 && (i += this.length), t = t || 0, t < 0 && (t += this.length);
|
|
318
|
+
var e = new r();
|
|
319
|
+
if (i < t || i < 0) return e;
|
|
320
|
+
t < 0 && (t = 0), i > this.length && (i = this.length);
|
|
321
|
+
for (var h = 0, n = this.head; n !== null && h < t; h++) n = n.next;
|
|
322
|
+
for (; n !== null && h < i; h++, n = n.next) e.push(n.value);
|
|
323
|
+
return e;
|
|
324
|
+
}, r.prototype.sliceReverse = function(t, i) {
|
|
325
|
+
i = i || this.length, i < 0 && (i += this.length), t = t || 0, t < 0 && (t += this.length);
|
|
326
|
+
var e = new r();
|
|
327
|
+
if (i < t || i < 0) return e;
|
|
328
|
+
t < 0 && (t = 0), i > this.length && (i = this.length);
|
|
329
|
+
for (var h = this.length, n = this.tail; n !== null && h > i; h--) n = n.prev;
|
|
330
|
+
for (; n !== null && h > t; h--, n = n.prev) e.push(n.value);
|
|
331
|
+
return e;
|
|
332
|
+
}, r.prototype.splice = function(t, i, ...e) {
|
|
333
|
+
t > this.length && (t = this.length - 1), t < 0 && (t = this.length + t);
|
|
334
|
+
for (var h = 0, n = this.head; n !== null && h < t; h++) n = n.next;
|
|
335
|
+
for (var l = [], h = 0; n && h < i; h++) l.push(n.value), n = this.removeNode(n);
|
|
336
|
+
n === null && (n = this.tail), n !== this.head && n !== this.tail && (n = n.prev);
|
|
337
|
+
for (var h = 0; h < e.length; h++) n = v(this, n, e[h]);
|
|
338
|
+
return l;
|
|
339
339
|
}, r.prototype.reverse = function() {
|
|
340
|
-
for (var t
|
|
341
|
-
var h = e
|
|
342
|
-
e
|
|
340
|
+
for (var t = this.head, i = this.tail, e = t; e !== null; e = e.prev) {
|
|
341
|
+
var h = e.prev;
|
|
342
|
+
e.prev = e.next, e.next = h;
|
|
343
343
|
}
|
|
344
|
-
return this.head = i
|
|
344
|
+
return this.head = i, this.tail = t, this;
|
|
345
345
|
};
|
|
346
|
-
function v
|
|
347
|
-
var h = i
|
|
348
|
-
return h.next === null && (t
|
|
346
|
+
function v(t, i, e) {
|
|
347
|
+
var h = i === t.head ? new s(e, null, i, t) : new s(e, i, i.next, t);
|
|
348
|
+
return h.next === null && (t.tail = h), h.prev === null && (t.head = h), t.length++, h;
|
|
349
349
|
}
|
|
350
|
-
function f
|
|
351
|
-
t
|
|
350
|
+
function f(t, i) {
|
|
351
|
+
t.tail = new s(i, t.tail, null, t), t.head || (t.head = t.tail), t.length++;
|
|
352
352
|
}
|
|
353
|
-
function o
|
|
354
|
-
t
|
|
353
|
+
function o(t, i) {
|
|
354
|
+
t.head = new s(i, null, t.head, t), t.tail || (t.tail = t.head), t.length++;
|
|
355
355
|
}
|
|
356
|
-
function s
|
|
357
|
-
if (!(this instanceof s
|
|
358
|
-
this.list = h, this.value = t
|
|
356
|
+
function s(t, i, e, h) {
|
|
357
|
+
if (!(this instanceof s)) return new s(t, i, e, h);
|
|
358
|
+
this.list = h, this.value = t, i ? (i.next = this, this.prev = i) : this.prev = null, e ? (e.prev = this, this.next = e) : this.next = null;
|
|
359
359
|
}
|
|
360
360
|
try {
|
|
361
361
|
i$4()(r);
|
|
@@ -367,13 +367,13 @@ var X$1;
|
|
|
367
367
|
function ft() {
|
|
368
368
|
if (X$1) return s$5;
|
|
369
369
|
X$1 = 1;
|
|
370
|
-
const H
|
|
370
|
+
const H = typeof process == "object" && process ? process : {
|
|
371
371
|
stdout: null,
|
|
372
372
|
stderr: null
|
|
373
|
-
}, Z = node_events.default, q
|
|
374
|
-
class z
|
|
375
|
-
constructor(t
|
|
376
|
-
this.src = t
|
|
373
|
+
}, Z = node_events.default, q = node_stream.default, G = node_string_decoder.default.StringDecoder, m = Symbol("EOF"), d = Symbol("maybeEmitEnd"), y = Symbol("emittedEnd"), R = Symbol("emittingEnd"), g = Symbol("emittedError"), B = Symbol("closed"), Y = Symbol("read"), T = Symbol("flush"), $ = Symbol("flushChunk"), f = Symbol("encoding"), c = Symbol("decoder"), M = Symbol("flowing"), S = Symbol("paused"), b = Symbol("resume"), i = Symbol("buffer"), a = Symbol("pipes"), n = Symbol("bufferLength"), j = Symbol("bufferPush"), I = Symbol("bufferShift"), o = Symbol("objectMode"), r = Symbol("destroyed"), P = Symbol("error"), x = Symbol("emitData"), V = Symbol("emitEnd"), N = Symbol("emitEnd2"), p = Symbol("async"), _ = Symbol("abort"), O = Symbol("aborted"), E = Symbol("signal"), w = (h) => Promise.resolve().then(h), J = commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", K = J && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), W = J && Symbol.iterator || Symbol("iterator not implemented"), k = (h) => h === "end" || h === "finish" || h === "prefinish", tt = (h) => h instanceof ArrayBuffer || typeof h == "object" && h.constructor && h.constructor.name === "ArrayBuffer" && h.byteLength >= 0, et = (h) => !Buffer.isBuffer(h) && ArrayBuffer.isView(h);
|
|
374
|
+
class z {
|
|
375
|
+
constructor(t, e, s) {
|
|
376
|
+
this.src = t, this.dest = e, this.opts = s, this.ondrain = () => t[b](), e.on("drain", this.ondrain);
|
|
377
377
|
}
|
|
378
378
|
unpipe() {
|
|
379
379
|
this.dest.removeListener("drain", this.ondrain);
|
|
@@ -383,80 +383,80 @@ function ft() {
|
|
|
383
383
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
class st extends z
|
|
386
|
+
class st extends z {
|
|
387
387
|
unpipe() {
|
|
388
388
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
389
389
|
}
|
|
390
|
-
constructor(t
|
|
391
|
-
super(t
|
|
390
|
+
constructor(t, e, s) {
|
|
391
|
+
super(t, e, s), this.proxyErrors = (l) => e.emit("error", l), t.on("error", this.proxyErrors);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
class F
|
|
395
|
-
constructor(t
|
|
396
|
-
super(), this[M] = false, this[S
|
|
394
|
+
class F extends q {
|
|
395
|
+
constructor(t) {
|
|
396
|
+
super(), this[M] = false, this[S] = false, this[a] = [], this[i] = [], this[o] = t && t.objectMode || false, this[o] ? this[f] = null : this[f] = t && t.encoding || null, this[f] === "buffer" && (this[f] = null), this[p] = t && !!t.async || false, this[c] = this[f] ? new G(this[f]) : null, this[m] = false, this[y] = false, this[R] = false, this[B] = false, this[g] = null, this.writable = true, this.readable = true, this[n] = 0, this[r] = false, t && t.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[i] }), t && t.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[a] }), this[E] = t && t.signal, this[O] = false, this[E] && (this[E].addEventListener("abort", () => this[_]()), this[E].aborted && this[_]());
|
|
397
397
|
}
|
|
398
398
|
get bufferLength() {
|
|
399
|
-
return this[n
|
|
399
|
+
return this[n];
|
|
400
400
|
}
|
|
401
401
|
get encoding() {
|
|
402
|
-
return this[f
|
|
402
|
+
return this[f];
|
|
403
403
|
}
|
|
404
|
-
set encoding(t
|
|
405
|
-
if (this[o
|
|
406
|
-
if (this[f
|
|
407
|
-
this[f
|
|
404
|
+
set encoding(t) {
|
|
405
|
+
if (this[o]) throw new Error("cannot set encoding in objectMode");
|
|
406
|
+
if (this[f] && t !== this[f] && (this[c] && this[c].lastNeed || this[n])) throw new Error("cannot change encoding");
|
|
407
|
+
this[f] !== t && (this[c] = t ? new G(t) : null, this[i].length && (this[i] = this[i].map((e) => this[c].write(e)))), this[f] = t;
|
|
408
408
|
}
|
|
409
|
-
setEncoding(t
|
|
410
|
-
this.encoding = t
|
|
409
|
+
setEncoding(t) {
|
|
410
|
+
this.encoding = t;
|
|
411
411
|
}
|
|
412
412
|
get objectMode() {
|
|
413
|
-
return this[o
|
|
413
|
+
return this[o];
|
|
414
414
|
}
|
|
415
|
-
set objectMode(t
|
|
416
|
-
this[o
|
|
415
|
+
set objectMode(t) {
|
|
416
|
+
this[o] = this[o] || !!t;
|
|
417
417
|
}
|
|
418
418
|
get async() {
|
|
419
|
-
return this[p
|
|
419
|
+
return this[p];
|
|
420
420
|
}
|
|
421
|
-
set async(t
|
|
422
|
-
this[p
|
|
421
|
+
set async(t) {
|
|
422
|
+
this[p] = this[p] || !!t;
|
|
423
423
|
}
|
|
424
|
-
[_
|
|
425
|
-
this[O
|
|
424
|
+
[_]() {
|
|
425
|
+
this[O] = true, this.emit("abort", this[E].reason), this.destroy(this[E].reason);
|
|
426
426
|
}
|
|
427
427
|
get aborted() {
|
|
428
|
-
return this[O
|
|
428
|
+
return this[O];
|
|
429
429
|
}
|
|
430
|
-
set aborted(t
|
|
431
|
-
write(t
|
|
432
|
-
if (this[O
|
|
433
|
-
if (this[m
|
|
430
|
+
set aborted(t) {}
|
|
431
|
+
write(t, e, s) {
|
|
432
|
+
if (this[O]) return false;
|
|
433
|
+
if (this[m]) throw new Error("write after end");
|
|
434
434
|
if (this[r]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
435
|
-
typeof e
|
|
436
|
-
const l
|
|
437
|
-
return !this[o
|
|
435
|
+
typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
|
|
436
|
+
const l = this[p] ? w : (u) => u();
|
|
437
|
+
return !this[o] && !Buffer.isBuffer(t) && (et(t) ? t = Buffer.from(t.buffer, t.byteOffset, t.byteLength) : tt(t) ? t = Buffer.from(t) : typeof t != "string" && (this.objectMode = true)), this[o] ? (this.flowing && this[n] !== 0 && this[T](true), this.flowing ? this.emit("data", t) : this[j](t), this[n] !== 0 && this.emit("readable"), s && l(s), this.flowing) : t.length ? (typeof t == "string" && !(e === this[f] && !this[c].lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[f] && (t = this[c].write(t)), this.flowing && this[n] !== 0 && this[T](true), this.flowing ? this.emit("data", t) : this[j](t), this[n] !== 0 && this.emit("readable"), s && l(s), this.flowing) : (this[n] !== 0 && this.emit("readable"), s && l(s), this.flowing);
|
|
438
438
|
}
|
|
439
|
-
read(t
|
|
439
|
+
read(t) {
|
|
440
440
|
if (this[r]) return null;
|
|
441
|
-
if (this[n
|
|
442
|
-
this[o
|
|
443
|
-
const e
|
|
444
|
-
return this[d](), e
|
|
441
|
+
if (this[n] === 0 || t === 0 || t > this[n]) return this[d](), null;
|
|
442
|
+
this[o] && (t = null), this[i].length > 1 && !this[o] && (this.encoding ? this[i] = [this[i].join("")] : this[i] = [Buffer.concat(this[i], this[n])]);
|
|
443
|
+
const e = this[Y](t || null, this[i][0]);
|
|
444
|
+
return this[d](), e;
|
|
445
445
|
}
|
|
446
|
-
[Y](t
|
|
447
|
-
return t
|
|
446
|
+
[Y](t, e) {
|
|
447
|
+
return t === e.length || t === null ? this[I]() : (this[i][0] = e.slice(t), e = e.slice(0, t), this[n] -= t), this.emit("data", e), !this[i].length && !this[m] && this.emit("drain"), e;
|
|
448
448
|
}
|
|
449
|
-
end(t
|
|
450
|
-
return typeof t
|
|
449
|
+
end(t, e, s) {
|
|
450
|
+
return typeof t == "function" && (s = t, t = null), typeof e == "function" && (s = e, e = "utf8"), t && this.write(t, e), s && this.once("end", s), this[m] = true, this.writable = false, (this.flowing || !this[S]) && this[d](), this;
|
|
451
451
|
}
|
|
452
452
|
[b]() {
|
|
453
|
-
this[r] || (this[S
|
|
453
|
+
this[r] || (this[S] = false, this[M] = true, this.emit("resume"), this[i].length ? this[T]() : this[m] ? this[d]() : this.emit("drain"));
|
|
454
454
|
}
|
|
455
455
|
resume() {
|
|
456
456
|
return this[b]();
|
|
457
457
|
}
|
|
458
458
|
pause() {
|
|
459
|
-
this[M] = false, this[S
|
|
459
|
+
this[M] = false, this[S] = true;
|
|
460
460
|
}
|
|
461
461
|
get destroyed() {
|
|
462
462
|
return this[r];
|
|
@@ -465,160 +465,160 @@ function ft() {
|
|
|
465
465
|
return this[M];
|
|
466
466
|
}
|
|
467
467
|
get paused() {
|
|
468
|
-
return this[S
|
|
468
|
+
return this[S];
|
|
469
469
|
}
|
|
470
|
-
[j
|
|
471
|
-
this[o
|
|
470
|
+
[j](t) {
|
|
471
|
+
this[o] ? this[n] += 1 : this[n] += t.length, this[i].push(t);
|
|
472
472
|
}
|
|
473
473
|
[I]() {
|
|
474
|
-
return this[o
|
|
474
|
+
return this[o] ? this[n] -= 1 : this[n] -= this[i][0].length, this[i].shift();
|
|
475
475
|
}
|
|
476
|
-
[T
|
|
476
|
+
[T](t) {
|
|
477
477
|
do ;
|
|
478
|
-
while (this[$](this[I]()) && this[i
|
|
479
|
-
!t
|
|
478
|
+
while (this[$](this[I]()) && this[i].length);
|
|
479
|
+
!t && !this[i].length && !this[m] && this.emit("drain");
|
|
480
480
|
}
|
|
481
|
-
[$](t
|
|
482
|
-
return this.emit("data", t
|
|
481
|
+
[$](t) {
|
|
482
|
+
return this.emit("data", t), this.flowing;
|
|
483
483
|
}
|
|
484
|
-
pipe(t
|
|
484
|
+
pipe(t, e) {
|
|
485
485
|
if (this[r]) return;
|
|
486
|
-
const s
|
|
487
|
-
return e
|
|
486
|
+
const s = this[y];
|
|
487
|
+
return e = e || {}, t === H.stdout || t === H.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[a].push(e.proxyErrors ? new st(this, t, e) : new z(this, t, e)), this[p] ? w(() => this[b]()) : this[b]()), t;
|
|
488
488
|
}
|
|
489
|
-
unpipe(t
|
|
490
|
-
const e
|
|
491
|
-
e
|
|
489
|
+
unpipe(t) {
|
|
490
|
+
const e = this[a].find((s) => s.dest === t);
|
|
491
|
+
e && (this[a].splice(this[a].indexOf(e), 1), e.unpipe());
|
|
492
492
|
}
|
|
493
|
-
addListener(t
|
|
494
|
-
return this.on(t
|
|
493
|
+
addListener(t, e) {
|
|
494
|
+
return this.on(t, e);
|
|
495
495
|
}
|
|
496
|
-
on(t
|
|
497
|
-
const s
|
|
498
|
-
return t
|
|
496
|
+
on(t, e) {
|
|
497
|
+
const s = super.on(t, e);
|
|
498
|
+
return t === "data" && !this[a].length && !this.flowing ? this[b]() : t === "readable" && this[n] !== 0 ? super.emit("readable") : k(t) && this[y] ? (super.emit(t), this.removeAllListeners(t)) : t === "error" && this[g] && (this[p] ? w(() => e.call(this, this[g])) : e.call(this, this[g])), s;
|
|
499
499
|
}
|
|
500
500
|
get emittedEnd() {
|
|
501
|
-
return this[y
|
|
501
|
+
return this[y];
|
|
502
502
|
}
|
|
503
503
|
[d]() {
|
|
504
|
-
!this[R
|
|
505
|
-
}
|
|
506
|
-
emit(t
|
|
507
|
-
if (t
|
|
508
|
-
if (t
|
|
509
|
-
if (t
|
|
510
|
-
if (t
|
|
511
|
-
if (this[B] = true, !this[y
|
|
512
|
-
const u
|
|
513
|
-
return this.removeAllListeners("close"), u
|
|
514
|
-
} else if (t
|
|
515
|
-
this[g] = e
|
|
516
|
-
const u
|
|
517
|
-
return this[d](), u
|
|
518
|
-
} else if (t
|
|
519
|
-
const u
|
|
520
|
-
return this[d](), u
|
|
521
|
-
} else if (t
|
|
522
|
-
const u
|
|
523
|
-
return this.removeAllListeners(t
|
|
504
|
+
!this[R] && !this[y] && !this[r] && this[i].length === 0 && this[m] && (this[R] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[B] && this.emit("close"), this[R] = false);
|
|
505
|
+
}
|
|
506
|
+
emit(t, e, ...s) {
|
|
507
|
+
if (t !== "error" && t !== "close" && t !== r && this[r]) return;
|
|
508
|
+
if (t === "data") return !this[o] && !e ? false : this[p] ? w(() => this[x](e)) : this[x](e);
|
|
509
|
+
if (t === "end") return this[V]();
|
|
510
|
+
if (t === "close") {
|
|
511
|
+
if (this[B] = true, !this[y] && !this[r]) return;
|
|
512
|
+
const u = super.emit("close");
|
|
513
|
+
return this.removeAllListeners("close"), u;
|
|
514
|
+
} else if (t === "error") {
|
|
515
|
+
this[g] = e, super.emit(P, e);
|
|
516
|
+
const u = !this[E] || this.listeners("error").length ? super.emit("error", e) : false;
|
|
517
|
+
return this[d](), u;
|
|
518
|
+
} else if (t === "resume") {
|
|
519
|
+
const u = super.emit("resume");
|
|
520
|
+
return this[d](), u;
|
|
521
|
+
} else if (t === "finish" || t === "prefinish") {
|
|
522
|
+
const u = super.emit(t);
|
|
523
|
+
return this.removeAllListeners(t), u;
|
|
524
524
|
}
|
|
525
|
-
const l
|
|
526
|
-
return this[d](), l
|
|
525
|
+
const l = super.emit(t, e, ...s);
|
|
526
|
+
return this[d](), l;
|
|
527
527
|
}
|
|
528
|
-
[x](t
|
|
529
|
-
for (const s
|
|
530
|
-
const e
|
|
531
|
-
return this[d](), e
|
|
528
|
+
[x](t) {
|
|
529
|
+
for (const s of this[a]) s.dest.write(t) === false && this.pause();
|
|
530
|
+
const e = super.emit("data", t);
|
|
531
|
+
return this[d](), e;
|
|
532
532
|
}
|
|
533
|
-
[V
|
|
534
|
-
this[y
|
|
533
|
+
[V]() {
|
|
534
|
+
this[y] || (this[y] = true, this.readable = false, this[p] ? w(() => this[N]()) : this[N]());
|
|
535
535
|
}
|
|
536
536
|
[N]() {
|
|
537
|
-
if (this[c
|
|
538
|
-
const e
|
|
539
|
-
if (e
|
|
540
|
-
for (const s
|
|
541
|
-
super.emit("data", e
|
|
537
|
+
if (this[c]) {
|
|
538
|
+
const e = this[c].end();
|
|
539
|
+
if (e) {
|
|
540
|
+
for (const s of this[a]) s.dest.write(e);
|
|
541
|
+
super.emit("data", e);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
for (const e
|
|
545
|
-
const t
|
|
546
|
-
return this.removeAllListeners("end"), t
|
|
544
|
+
for (const e of this[a]) e.end();
|
|
545
|
+
const t = super.emit("end");
|
|
546
|
+
return this.removeAllListeners("end"), t;
|
|
547
547
|
}
|
|
548
548
|
collect() {
|
|
549
|
-
const t
|
|
550
|
-
this[o
|
|
551
|
-
const e
|
|
552
|
-
return this.on("data", (s
|
|
553
|
-
t
|
|
554
|
-
}), e
|
|
549
|
+
const t = [];
|
|
550
|
+
this[o] || (t.dataLength = 0);
|
|
551
|
+
const e = this.promise();
|
|
552
|
+
return this.on("data", (s) => {
|
|
553
|
+
t.push(s), this[o] || (t.dataLength += s.length);
|
|
554
|
+
}), e.then(() => t);
|
|
555
555
|
}
|
|
556
556
|
concat() {
|
|
557
|
-
return this[o
|
|
557
|
+
return this[o] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t) => this[o] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this[f] ? t.join("") : Buffer.concat(t, t.dataLength));
|
|
558
558
|
}
|
|
559
559
|
promise() {
|
|
560
|
-
return new Promise((t
|
|
561
|
-
this.on(r, () => e
|
|
560
|
+
return new Promise((t, e) => {
|
|
561
|
+
this.on(r, () => e(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
|
|
562
562
|
});
|
|
563
563
|
}
|
|
564
564
|
[K]() {
|
|
565
|
-
let t
|
|
566
|
-
const e
|
|
565
|
+
let t = false;
|
|
566
|
+
const e = () => (this.pause(), t = true, Promise.resolve({ done: true }));
|
|
567
567
|
return {
|
|
568
568
|
next: () => {
|
|
569
|
-
if (t
|
|
570
|
-
const l
|
|
571
|
-
if (l
|
|
569
|
+
if (t) return e();
|
|
570
|
+
const l = this.read();
|
|
571
|
+
if (l !== null) return Promise.resolve({
|
|
572
572
|
done: false,
|
|
573
|
-
value: l
|
|
573
|
+
value: l
|
|
574
574
|
});
|
|
575
|
-
if (this[m
|
|
576
|
-
let u
|
|
575
|
+
if (this[m]) return e();
|
|
576
|
+
let u = null, Q = null;
|
|
577
577
|
const A = (L) => {
|
|
578
|
-
this.removeListener("data", U), this.removeListener("end", C
|
|
578
|
+
this.removeListener("data", U), this.removeListener("end", C), this.removeListener(r, D), e(), Q(L);
|
|
579
579
|
}, U = (L) => {
|
|
580
|
-
this.removeListener("error", A), this.removeListener("end", C
|
|
580
|
+
this.removeListener("error", A), this.removeListener("end", C), this.removeListener(r, D), this.pause(), u({
|
|
581
581
|
value: L,
|
|
582
|
-
done: !!this[m
|
|
582
|
+
done: !!this[m]
|
|
583
583
|
});
|
|
584
|
-
}, C
|
|
585
|
-
this.removeListener("error", A), this.removeListener("data", U), this.removeListener(r, D), e
|
|
584
|
+
}, C = () => {
|
|
585
|
+
this.removeListener("error", A), this.removeListener("data", U), this.removeListener(r, D), e(), u({ done: true });
|
|
586
586
|
}, D = () => A(/* @__PURE__ */ new Error("stream destroyed"));
|
|
587
587
|
return new Promise((L, it) => {
|
|
588
|
-
Q = it, u
|
|
588
|
+
Q = it, u = L, this.once(r, D), this.once("error", A), this.once("end", C), this.once("data", U);
|
|
589
589
|
});
|
|
590
590
|
},
|
|
591
|
-
throw: e
|
|
592
|
-
return: e
|
|
591
|
+
throw: e,
|
|
592
|
+
return: e,
|
|
593
593
|
[K]() {
|
|
594
594
|
return this;
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
598
|
[W]() {
|
|
599
|
-
let t
|
|
600
|
-
const e
|
|
601
|
-
if (t
|
|
602
|
-
const l
|
|
603
|
-
return l
|
|
599
|
+
let t = false;
|
|
600
|
+
const e = () => (this.pause(), this.removeListener(P, e), this.removeListener(r, e), this.removeListener("end", e), t = true, { done: true }), s = () => {
|
|
601
|
+
if (t) return e();
|
|
602
|
+
const l = this.read();
|
|
603
|
+
return l === null ? e() : { value: l };
|
|
604
604
|
};
|
|
605
|
-
return this.once("end", e
|
|
606
|
-
next: s
|
|
607
|
-
throw: e
|
|
608
|
-
return: e
|
|
605
|
+
return this.once("end", e), this.once(P, e), this.once(r, e), {
|
|
606
|
+
next: s,
|
|
607
|
+
throw: e,
|
|
608
|
+
return: e,
|
|
609
609
|
[W]() {
|
|
610
610
|
return this;
|
|
611
611
|
}
|
|
612
612
|
};
|
|
613
613
|
}
|
|
614
|
-
destroy(t
|
|
615
|
-
return this[r] ? (t
|
|
614
|
+
destroy(t) {
|
|
615
|
+
return this[r] ? (t ? this.emit("error", t) : this.emit(r), this) : (this[r] = true, this[i].length = 0, this[n] = 0, typeof this.close == "function" && !this[B] && this.close(), t ? this.emit("error", t) : this.emit(r), this);
|
|
616
616
|
}
|
|
617
|
-
static isStream(t
|
|
618
|
-
return !!t
|
|
617
|
+
static isStream(t) {
|
|
618
|
+
return !!t && (t instanceof F || t instanceof q || t instanceof Z && (typeof t.pipe == "function" || typeof t.write == "function" && typeof t.end == "function"));
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
return s$5.Minipass = F
|
|
621
|
+
return s$5.Minipass = F, s$5;
|
|
622
622
|
}
|
|
623
623
|
var e$2, o$4;
|
|
624
624
|
function a$7() {
|
|
@@ -628,10 +628,10 @@ var n$2, a$6;
|
|
|
628
628
|
function u$3() {
|
|
629
629
|
if (a$6) return n$2;
|
|
630
630
|
a$6 = 1;
|
|
631
|
-
const { Minipass: o
|
|
632
|
-
return n$2 = class extends o
|
|
633
|
-
constructor(t
|
|
634
|
-
switch (super(), this.pause(), this.extended = e
|
|
631
|
+
const { Minipass: o } = ft(), s = a$7(), r = Symbol("slurp");
|
|
632
|
+
return n$2 = class extends o {
|
|
633
|
+
constructor(t, e, i) {
|
|
634
|
+
switch (super(), this.pause(), this.extended = e, this.globalExtended = i, this.header = t, this.startBlockSize = 512 * Math.ceil(t.size / 512), this.blockRemain = this.startBlockSize, this.remain = t.size, this.type = t.type, this.meta = false, this.ignore = false, this.type) {
|
|
635
635
|
case "File":
|
|
636
636
|
case "OldFile":
|
|
637
637
|
case "Link":
|
|
@@ -652,16 +652,16 @@ function u$3() {
|
|
|
652
652
|
break;
|
|
653
653
|
default: this.ignore = true;
|
|
654
654
|
}
|
|
655
|
-
this.path = s
|
|
655
|
+
this.path = s(t.path), this.mode = t.mode, this.mode && (this.mode = this.mode & 4095), this.uid = t.uid, this.gid = t.gid, this.uname = t.uname, this.gname = t.gname, this.size = t.size, this.mtime = t.mtime, this.atime = t.atime, this.ctime = t.ctime, this.linkpath = s(t.linkpath), this.uname = t.uname, this.gname = t.gname, e && this[r](e), i && this[r](i, true);
|
|
656
656
|
}
|
|
657
|
-
write(t
|
|
658
|
-
const e
|
|
659
|
-
if (e
|
|
660
|
-
const i
|
|
661
|
-
return this.remain = Math.max(0, i
|
|
657
|
+
write(t) {
|
|
658
|
+
const e = t.length;
|
|
659
|
+
if (e > this.blockRemain) throw new Error("writing more to entry than is appropriate");
|
|
660
|
+
const i = this.remain, c = this.blockRemain;
|
|
661
|
+
return this.remain = Math.max(0, i - e), this.blockRemain = Math.max(0, c - e), this.ignore ? true : i >= e ? super.write(t) : super.write(t.slice(0, i));
|
|
662
662
|
}
|
|
663
|
-
[r](t
|
|
664
|
-
for (const i
|
|
663
|
+
[r](t, e) {
|
|
664
|
+
for (const i in t) t[i] !== null && t[i] !== void 0 && !(e && i === "path") && (this[i] = i === "path" || i === "linkpath" ? s(t[i]) : t[i]);
|
|
665
665
|
}
|
|
666
666
|
}, n$2;
|
|
667
667
|
}
|
|
@@ -669,22 +669,22 @@ var r$2, a$5;
|
|
|
669
669
|
function f$2() {
|
|
670
670
|
if (a$5) return r$2;
|
|
671
671
|
a$5 = 1;
|
|
672
|
-
const c
|
|
672
|
+
const c = E(), d = node_path.default;
|
|
673
673
|
class h {
|
|
674
|
-
constructor(e
|
|
675
|
-
this.atime = e
|
|
674
|
+
constructor(e, n) {
|
|
675
|
+
this.atime = e.atime || null, this.charset = e.charset || null, this.comment = e.comment || null, this.ctime = e.ctime || null, this.gid = e.gid || null, this.gname = e.gname || null, this.linkpath = e.linkpath || null, this.mtime = e.mtime || null, this.path = e.path || null, this.size = e.size || null, this.uid = e.uid || null, this.uname = e.uname || null, this.dev = e.dev || null, this.ino = e.ino || null, this.nlink = e.nlink || null, this.global = n || false;
|
|
676
676
|
}
|
|
677
677
|
encode() {
|
|
678
|
-
const e
|
|
679
|
-
if (e
|
|
680
|
-
const n
|
|
681
|
-
for (let t
|
|
682
|
-
new c
|
|
678
|
+
const e = this.encodeBody();
|
|
679
|
+
if (e === "") return null;
|
|
680
|
+
const n = Buffer.byteLength(e), l = 512 * Math.ceil(1 + n / 512), i = Buffer.allocUnsafe(l);
|
|
681
|
+
for (let t = 0; t < 512; t++) i[t] = 0;
|
|
682
|
+
new c({
|
|
683
683
|
path: ("PaxHeader/" + d.basename(this.path)).slice(0, 99),
|
|
684
684
|
mode: this.mode || 420,
|
|
685
685
|
uid: this.uid || null,
|
|
686
686
|
gid: this.gid || null,
|
|
687
|
-
size: n
|
|
687
|
+
size: n,
|
|
688
688
|
mtime: this.mtime || null,
|
|
689
689
|
type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader",
|
|
690
690
|
linkpath: "",
|
|
@@ -694,31 +694,31 @@ function f$2() {
|
|
|
694
694
|
devmin: 0,
|
|
695
695
|
atime: this.atime || null,
|
|
696
696
|
ctime: this.ctime || null
|
|
697
|
-
}).encode(i
|
|
698
|
-
for (let t
|
|
699
|
-
return i
|
|
697
|
+
}).encode(i), i.write(e, 512, n, "utf8");
|
|
698
|
+
for (let t = n + 512; t < i.length; t++) i[t] = 0;
|
|
699
|
+
return i;
|
|
700
700
|
}
|
|
701
701
|
encodeBody() {
|
|
702
702
|
return this.encodeField("path") + this.encodeField("ctime") + this.encodeField("atime") + this.encodeField("dev") + this.encodeField("ino") + this.encodeField("nlink") + this.encodeField("charset") + this.encodeField("comment") + this.encodeField("gid") + this.encodeField("gname") + this.encodeField("linkpath") + this.encodeField("mtime") + this.encodeField("size") + this.encodeField("uid") + this.encodeField("uname");
|
|
703
703
|
}
|
|
704
|
-
encodeField(e
|
|
705
|
-
if (this[e
|
|
706
|
-
const n
|
|
707
|
-
`, i
|
|
708
|
-
let t
|
|
709
|
-
return i
|
|
704
|
+
encodeField(e) {
|
|
705
|
+
if (this[e] === null || this[e] === void 0) return "";
|
|
706
|
+
const n = this[e] instanceof Date ? this[e].getTime() / 1e3 : this[e], l = " " + (e === "dev" || e === "ino" || e === "nlink" ? "SCHILY." : "") + e + "=" + n + `
|
|
707
|
+
`, i = Buffer.byteLength(l);
|
|
708
|
+
let t = Math.floor(Math.log(i) / Math.log(10)) + 1;
|
|
709
|
+
return i + t >= Math.pow(10, t) && (t += 1), t + i + l;
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
h.parse = (s
|
|
713
|
-
const o
|
|
714
|
-
`).reduce(m
|
|
715
|
-
const n
|
|
716
|
-
if (n
|
|
717
|
-
e
|
|
718
|
-
const l
|
|
719
|
-
if (!i
|
|
720
|
-
const t
|
|
721
|
-
return s
|
|
712
|
+
h.parse = (s, e, n) => new h(o(u(s), e), n);
|
|
713
|
+
const o = (s, e) => e ? Object.keys(s).reduce((n, l) => (n[l] = s[l], n), e) : s, u = (s) => s.replace(/\n$/, "").split(`
|
|
714
|
+
`).reduce(m, Object.create(null)), m = (s, e) => {
|
|
715
|
+
const n = parseInt(e, 10);
|
|
716
|
+
if (n !== Buffer.byteLength(e) + 1) return s;
|
|
717
|
+
e = e.slice((n + " ").length);
|
|
718
|
+
const l = e.split("="), i = l.shift().replace(/^SCHILY\.(dev|ino|nlink)/, "$1");
|
|
719
|
+
if (!i) return s;
|
|
720
|
+
const t = l.join("=");
|
|
721
|
+
return s[i] = /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i) ? /* @__PURE__ */ new Date(t * 1e3) : /^[0-9]+$/.test(t) ? +t : t, s;
|
|
722
722
|
};
|
|
723
723
|
return r$2 = h, r$2;
|
|
724
724
|
}
|
|
@@ -727,7 +727,7 @@ var _, R$1;
|
|
|
727
727
|
function T() {
|
|
728
728
|
if (R$1) return _;
|
|
729
729
|
R$1 = 1;
|
|
730
|
-
const E
|
|
730
|
+
const E = node_zlib.default.constants || { ZLIB_VERNUM: 4736 };
|
|
731
731
|
return _ = Object.freeze(Object.assign(Object.create(null), {
|
|
732
732
|
Z_NO_FLUSH: 0,
|
|
733
733
|
Z_PARTIAL_FLUSH: 1,
|
|
@@ -835,7 +835,7 @@ function T() {
|
|
|
835
835
|
BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27,
|
|
836
836
|
BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
|
|
837
837
|
BROTLI_DECODER_ERROR_UNREACHABLE: -31
|
|
838
|
-
}, E
|
|
838
|
+
}, E)), _;
|
|
839
839
|
}
|
|
840
840
|
var j, H$1;
|
|
841
841
|
function tt() {
|
|
@@ -844,10 +844,10 @@ function tt() {
|
|
|
844
844
|
const I = typeof process == "object" && process ? process : {
|
|
845
845
|
stdout: null,
|
|
846
846
|
stderr: null
|
|
847
|
-
}, Y = node_events.default, x = node_stream.default, N = node_string_decoder.default.StringDecoder, u
|
|
847
|
+
}, Y = node_events.default, x = node_stream.default, N = node_string_decoder.default.StringDecoder, u = Symbol("EOF"), a = Symbol("maybeEmitEnd"), c = Symbol("emittedEnd"), S = Symbol("emittingEnd"), E = Symbol("emittedError"), w = Symbol("closed"), P = Symbol("read"), L = Symbol("flush"), _ = Symbol("flushChunk"), h = Symbol("encoding"), m = Symbol("decoder"), M = Symbol("flowing"), y = Symbol("paused"), p = Symbol("resume"), s = Symbol("bufferLength"), T = Symbol("bufferPush"), B = Symbol("bufferShift"), r = Symbol("objectMode"), n = Symbol("destroyed"), D = Symbol("emitData"), F = Symbol("emitEnd"), R = Symbol("emitEnd2"), d = Symbol("async"), b = (o) => Promise.resolve().then(o), C = commonjsGlobal._MP_NO_ITERATOR_SYMBOLS_ !== "1", $ = C && Symbol.asyncIterator || Symbol("asyncIterator not implemented"), G = C && Symbol.iterator || Symbol("iterator not implemented"), V = (o) => o === "end" || o === "finish" || o === "prefinish", v = (o) => o instanceof ArrayBuffer || typeof o == "object" && o.constructor && o.constructor.name === "ArrayBuffer" && o.byteLength >= 0, J = (o) => !Buffer.isBuffer(o) && ArrayBuffer.isView(o);
|
|
848
848
|
class U {
|
|
849
|
-
constructor(t
|
|
850
|
-
this.src = t
|
|
849
|
+
constructor(t, e, i) {
|
|
850
|
+
this.src = t, this.dest = e, this.opts = i, this.ondrain = () => t[p](), e.on("drain", this.ondrain);
|
|
851
851
|
}
|
|
852
852
|
unpipe() {
|
|
853
853
|
this.dest.removeListener("drain", this.ondrain);
|
|
@@ -861,210 +861,210 @@ function tt() {
|
|
|
861
861
|
unpipe() {
|
|
862
862
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
863
863
|
}
|
|
864
|
-
constructor(t
|
|
865
|
-
super(t
|
|
864
|
+
constructor(t, e, i) {
|
|
865
|
+
super(t, e, i), this.proxyErrors = (l) => e.emit("error", l), t.on("error", this.proxyErrors);
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
return j = class q
|
|
869
|
-
constructor(t
|
|
870
|
-
super(), this[M] = false, this[y
|
|
868
|
+
return j = class q extends x {
|
|
869
|
+
constructor(t) {
|
|
870
|
+
super(), this[M] = false, this[y] = false, this.pipes = [], this.buffer = [], this[r] = t && t.objectMode || false, this[r] ? this[h] = null : this[h] = t && t.encoding || null, this[h] === "buffer" && (this[h] = null), this[d] = t && !!t.async || false, this[m] = this[h] ? new N(this[h]) : null, this[u] = false, this[c] = false, this[S] = false, this[w] = false, this[E] = null, this.writable = true, this.readable = true, this[s] = 0, this[n] = false;
|
|
871
871
|
}
|
|
872
872
|
get bufferLength() {
|
|
873
|
-
return this[s
|
|
873
|
+
return this[s];
|
|
874
874
|
}
|
|
875
875
|
get encoding() {
|
|
876
876
|
return this[h];
|
|
877
877
|
}
|
|
878
|
-
set encoding(t
|
|
878
|
+
set encoding(t) {
|
|
879
879
|
if (this[r]) throw new Error("cannot set encoding in objectMode");
|
|
880
|
-
if (this[h] && t
|
|
881
|
-
this[h] !== t
|
|
880
|
+
if (this[h] && t !== this[h] && (this[m] && this[m].lastNeed || this[s])) throw new Error("cannot change encoding");
|
|
881
|
+
this[h] !== t && (this[m] = t ? new N(t) : null, this.buffer.length && (this.buffer = this.buffer.map((e) => this[m].write(e)))), this[h] = t;
|
|
882
882
|
}
|
|
883
|
-
setEncoding(t
|
|
884
|
-
this.encoding = t
|
|
883
|
+
setEncoding(t) {
|
|
884
|
+
this.encoding = t;
|
|
885
885
|
}
|
|
886
886
|
get objectMode() {
|
|
887
887
|
return this[r];
|
|
888
888
|
}
|
|
889
|
-
set objectMode(t
|
|
890
|
-
this[r] = this[r] || !!t
|
|
889
|
+
set objectMode(t) {
|
|
890
|
+
this[r] = this[r] || !!t;
|
|
891
891
|
}
|
|
892
892
|
get async() {
|
|
893
893
|
return this[d];
|
|
894
894
|
}
|
|
895
|
-
set async(t
|
|
896
|
-
this[d] = this[d] || !!t
|
|
895
|
+
set async(t) {
|
|
896
|
+
this[d] = this[d] || !!t;
|
|
897
897
|
}
|
|
898
|
-
write(t
|
|
899
|
-
if (this[u
|
|
900
|
-
if (this[n
|
|
901
|
-
typeof e
|
|
902
|
-
const l
|
|
903
|
-
return !this[r] && !Buffer.isBuffer(t
|
|
898
|
+
write(t, e, i) {
|
|
899
|
+
if (this[u]) throw new Error("write after end");
|
|
900
|
+
if (this[n]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
|
|
901
|
+
typeof e == "function" && (i = e, e = "utf8"), e || (e = "utf8");
|
|
902
|
+
const l = this[d] ? b : (f) => f();
|
|
903
|
+
return !this[r] && !Buffer.isBuffer(t) && (J(t) ? t = Buffer.from(t.buffer, t.byteOffset, t.byteLength) : v(t) ? t = Buffer.from(t) : typeof t != "string" && (this.objectMode = true)), this[r] ? (this.flowing && this[s] !== 0 && this[L](true), this.flowing ? this.emit("data", t) : this[T](t), this[s] !== 0 && this.emit("readable"), i && l(i), this.flowing) : t.length ? (typeof t == "string" && !(e === this[h] && !this[m].lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[h] && (t = this[m].write(t)), this.flowing && this[s] !== 0 && this[L](true), this.flowing ? this.emit("data", t) : this[T](t), this[s] !== 0 && this.emit("readable"), i && l(i), this.flowing) : (this[s] !== 0 && this.emit("readable"), i && l(i), this.flowing);
|
|
904
904
|
}
|
|
905
|
-
read(t
|
|
906
|
-
if (this[n
|
|
907
|
-
if (this[s
|
|
908
|
-
this[r] && (t
|
|
909
|
-
const e
|
|
910
|
-
return this[a
|
|
905
|
+
read(t) {
|
|
906
|
+
if (this[n]) return null;
|
|
907
|
+
if (this[s] === 0 || t === 0 || t > this[s]) return this[a](), null;
|
|
908
|
+
this[r] && (t = null), this.buffer.length > 1 && !this[r] && (this.encoding ? this.buffer = [this.buffer.join("")] : this.buffer = [Buffer.concat(this.buffer, this[s])]);
|
|
909
|
+
const e = this[P](t || null, this.buffer[0]);
|
|
910
|
+
return this[a](), e;
|
|
911
911
|
}
|
|
912
|
-
[P
|
|
913
|
-
return t
|
|
912
|
+
[P](t, e) {
|
|
913
|
+
return t === e.length || t === null ? this[B]() : (this.buffer[0] = e.slice(t), e = e.slice(0, t), this[s] -= t), this.emit("data", e), !this.buffer.length && !this[u] && this.emit("drain"), e;
|
|
914
914
|
}
|
|
915
|
-
end(t
|
|
916
|
-
return typeof t
|
|
915
|
+
end(t, e, i) {
|
|
916
|
+
return typeof t == "function" && (i = t, t = null), typeof e == "function" && (i = e, e = "utf8"), t && this.write(t, e), i && this.once("end", i), this[u] = true, this.writable = false, (this.flowing || !this[y]) && this[a](), this;
|
|
917
917
|
}
|
|
918
|
-
[p
|
|
919
|
-
this[n
|
|
918
|
+
[p]() {
|
|
919
|
+
this[n] || (this[y] = false, this[M] = true, this.emit("resume"), this.buffer.length ? this[L]() : this[u] ? this[a]() : this.emit("drain"));
|
|
920
920
|
}
|
|
921
921
|
resume() {
|
|
922
|
-
return this[p
|
|
922
|
+
return this[p]();
|
|
923
923
|
}
|
|
924
924
|
pause() {
|
|
925
|
-
this[M] = false, this[y
|
|
925
|
+
this[M] = false, this[y] = true;
|
|
926
926
|
}
|
|
927
927
|
get destroyed() {
|
|
928
|
-
return this[n
|
|
928
|
+
return this[n];
|
|
929
929
|
}
|
|
930
930
|
get flowing() {
|
|
931
931
|
return this[M];
|
|
932
932
|
}
|
|
933
933
|
get paused() {
|
|
934
|
-
return this[y
|
|
934
|
+
return this[y];
|
|
935
935
|
}
|
|
936
|
-
[T
|
|
937
|
-
this[r] ? this[s
|
|
936
|
+
[T](t) {
|
|
937
|
+
this[r] ? this[s] += 1 : this[s] += t.length, this.buffer.push(t);
|
|
938
938
|
}
|
|
939
939
|
[B]() {
|
|
940
|
-
return this.buffer.length && (this[r] ? this[s
|
|
940
|
+
return this.buffer.length && (this[r] ? this[s] -= 1 : this[s] -= this.buffer[0].length), this.buffer.shift();
|
|
941
941
|
}
|
|
942
|
-
[L](t
|
|
942
|
+
[L](t) {
|
|
943
943
|
do ;
|
|
944
|
-
while (this[_
|
|
945
|
-
!t
|
|
944
|
+
while (this[_](this[B]()));
|
|
945
|
+
!t && !this.buffer.length && !this[u] && this.emit("drain");
|
|
946
946
|
}
|
|
947
|
-
[_
|
|
948
|
-
return t
|
|
947
|
+
[_](t) {
|
|
948
|
+
return t ? (this.emit("data", t), this.flowing) : false;
|
|
949
949
|
}
|
|
950
|
-
pipe(t
|
|
951
|
-
if (this[n
|
|
952
|
-
const i
|
|
953
|
-
return e
|
|
950
|
+
pipe(t, e) {
|
|
951
|
+
if (this[n]) return;
|
|
952
|
+
const i = this[c];
|
|
953
|
+
return e = e || {}, t === I.stdout || t === I.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, i ? e.end && t.end() : (this.pipes.push(e.proxyErrors ? new K(this, t, e) : new U(this, t, e)), this[d] ? b(() => this[p]()) : this[p]()), t;
|
|
954
954
|
}
|
|
955
|
-
unpipe(t
|
|
956
|
-
const e
|
|
957
|
-
e
|
|
955
|
+
unpipe(t) {
|
|
956
|
+
const e = this.pipes.find((i) => i.dest === t);
|
|
957
|
+
e && (this.pipes.splice(this.pipes.indexOf(e), 1), e.unpipe());
|
|
958
958
|
}
|
|
959
|
-
addListener(t
|
|
960
|
-
return this.on(t
|
|
959
|
+
addListener(t, e) {
|
|
960
|
+
return this.on(t, e);
|
|
961
961
|
}
|
|
962
|
-
on(t
|
|
963
|
-
const i
|
|
964
|
-
return t
|
|
962
|
+
on(t, e) {
|
|
963
|
+
const i = super.on(t, e);
|
|
964
|
+
return t === "data" && !this.pipes.length && !this.flowing ? this[p]() : t === "readable" && this[s] !== 0 ? super.emit("readable") : V(t) && this[c] ? (super.emit(t), this.removeAllListeners(t)) : t === "error" && this[E] && (this[d] ? b(() => e.call(this, this[E])) : e.call(this, this[E])), i;
|
|
965
965
|
}
|
|
966
966
|
get emittedEnd() {
|
|
967
|
-
return this[c
|
|
968
|
-
}
|
|
969
|
-
[a
|
|
970
|
-
!this[S
|
|
971
|
-
}
|
|
972
|
-
emit(t
|
|
973
|
-
if (t
|
|
974
|
-
if (t
|
|
975
|
-
if (t
|
|
976
|
-
if (t
|
|
977
|
-
if (this[w
|
|
978
|
-
const f
|
|
979
|
-
return this.removeAllListeners("close"), f
|
|
980
|
-
} else if (t
|
|
981
|
-
this[E
|
|
982
|
-
const f
|
|
983
|
-
return this[a
|
|
984
|
-
} else if (t
|
|
985
|
-
const f
|
|
986
|
-
return this[a
|
|
987
|
-
} else if (t
|
|
988
|
-
const f
|
|
989
|
-
return this.removeAllListeners(t
|
|
967
|
+
return this[c];
|
|
968
|
+
}
|
|
969
|
+
[a]() {
|
|
970
|
+
!this[S] && !this[c] && !this[n] && this.buffer.length === 0 && this[u] && (this[S] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[w] && this.emit("close"), this[S] = false);
|
|
971
|
+
}
|
|
972
|
+
emit(t, e, ...i) {
|
|
973
|
+
if (t !== "error" && t !== "close" && t !== n && this[n]) return;
|
|
974
|
+
if (t === "data") return e ? this[d] ? b(() => this[D](e)) : this[D](e) : false;
|
|
975
|
+
if (t === "end") return this[F]();
|
|
976
|
+
if (t === "close") {
|
|
977
|
+
if (this[w] = true, !this[c] && !this[n]) return;
|
|
978
|
+
const f = super.emit("close");
|
|
979
|
+
return this.removeAllListeners("close"), f;
|
|
980
|
+
} else if (t === "error") {
|
|
981
|
+
this[E] = e;
|
|
982
|
+
const f = super.emit("error", e);
|
|
983
|
+
return this[a](), f;
|
|
984
|
+
} else if (t === "resume") {
|
|
985
|
+
const f = super.emit("resume");
|
|
986
|
+
return this[a](), f;
|
|
987
|
+
} else if (t === "finish" || t === "prefinish") {
|
|
988
|
+
const f = super.emit(t);
|
|
989
|
+
return this.removeAllListeners(t), f;
|
|
990
990
|
}
|
|
991
|
-
const l
|
|
992
|
-
return this[a
|
|
993
|
-
}
|
|
994
|
-
[D](t
|
|
995
|
-
for (const i
|
|
996
|
-
const e
|
|
997
|
-
return this[a
|
|
998
|
-
}
|
|
999
|
-
[F
|
|
1000
|
-
this[c
|
|
1001
|
-
}
|
|
1002
|
-
[R
|
|
1003
|
-
if (this[m
|
|
1004
|
-
const e
|
|
1005
|
-
if (e
|
|
1006
|
-
for (const i
|
|
1007
|
-
super.emit("data", e
|
|
991
|
+
const l = super.emit(t, e, ...i);
|
|
992
|
+
return this[a](), l;
|
|
993
|
+
}
|
|
994
|
+
[D](t) {
|
|
995
|
+
for (const i of this.pipes) i.dest.write(t) === false && this.pause();
|
|
996
|
+
const e = super.emit("data", t);
|
|
997
|
+
return this[a](), e;
|
|
998
|
+
}
|
|
999
|
+
[F]() {
|
|
1000
|
+
this[c] || (this[c] = true, this.readable = false, this[d] ? b(() => this[R]()) : this[R]());
|
|
1001
|
+
}
|
|
1002
|
+
[R]() {
|
|
1003
|
+
if (this[m]) {
|
|
1004
|
+
const e = this[m].end();
|
|
1005
|
+
if (e) {
|
|
1006
|
+
for (const i of this.pipes) i.dest.write(e);
|
|
1007
|
+
super.emit("data", e);
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
for (const e
|
|
1011
|
-
const t
|
|
1012
|
-
return this.removeAllListeners("end"), t
|
|
1010
|
+
for (const e of this.pipes) e.end();
|
|
1011
|
+
const t = super.emit("end");
|
|
1012
|
+
return this.removeAllListeners("end"), t;
|
|
1013
1013
|
}
|
|
1014
1014
|
collect() {
|
|
1015
|
-
const t
|
|
1016
|
-
this[r] || (t
|
|
1017
|
-
const e
|
|
1018
|
-
return this.on("data", (i
|
|
1019
|
-
t
|
|
1020
|
-
}), e
|
|
1015
|
+
const t = [];
|
|
1016
|
+
this[r] || (t.dataLength = 0);
|
|
1017
|
+
const e = this.promise();
|
|
1018
|
+
return this.on("data", (i) => {
|
|
1019
|
+
t.push(i), this[r] || (t.dataLength += i.length);
|
|
1020
|
+
}), e.then(() => t);
|
|
1021
1021
|
}
|
|
1022
1022
|
concat() {
|
|
1023
|
-
return this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t
|
|
1023
|
+
return this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this.collect().then((t) => this[r] ? Promise.reject(/* @__PURE__ */ new Error("cannot concat in objectMode")) : this[h] ? t.join("") : Buffer.concat(t, t.dataLength));
|
|
1024
1024
|
}
|
|
1025
1025
|
promise() {
|
|
1026
|
-
return new Promise((t
|
|
1027
|
-
this.on(n
|
|
1026
|
+
return new Promise((t, e) => {
|
|
1027
|
+
this.on(n, () => e(/* @__PURE__ */ new Error("stream destroyed"))), this.on("error", (i) => e(i)), this.on("end", () => t());
|
|
1028
1028
|
});
|
|
1029
1029
|
}
|
|
1030
1030
|
[$]() {
|
|
1031
1031
|
return { next: () => {
|
|
1032
|
-
const e
|
|
1033
|
-
if (e
|
|
1032
|
+
const e = this.read();
|
|
1033
|
+
if (e !== null) return Promise.resolve({
|
|
1034
1034
|
done: false,
|
|
1035
|
-
value: e
|
|
1035
|
+
value: e
|
|
1036
1036
|
});
|
|
1037
|
-
if (this[u
|
|
1038
|
-
let i
|
|
1039
|
-
const f
|
|
1040
|
-
this.removeListener("data", A), this.removeListener("end", O
|
|
1037
|
+
if (this[u]) return Promise.resolve({ done: true });
|
|
1038
|
+
let i = null, l = null;
|
|
1039
|
+
const f = (g) => {
|
|
1040
|
+
this.removeListener("data", A), this.removeListener("end", O), l(g);
|
|
1041
1041
|
}, A = (g) => {
|
|
1042
|
-
this.removeListener("error", f
|
|
1042
|
+
this.removeListener("error", f), this.removeListener("end", O), this.pause(), i({
|
|
1043
1043
|
value: g,
|
|
1044
|
-
done: !!this[u
|
|
1044
|
+
done: !!this[u]
|
|
1045
1045
|
});
|
|
1046
|
-
}, O
|
|
1047
|
-
this.removeListener("error", f
|
|
1048
|
-
}, W = () => f
|
|
1049
|
-
return new Promise((g, z
|
|
1050
|
-
l
|
|
1046
|
+
}, O = () => {
|
|
1047
|
+
this.removeListener("error", f), this.removeListener("data", A), i({ done: true });
|
|
1048
|
+
}, W = () => f(/* @__PURE__ */ new Error("stream destroyed"));
|
|
1049
|
+
return new Promise((g, z) => {
|
|
1050
|
+
l = z, i = g, this.once(n, W), this.once("error", f), this.once("end", O), this.once("data", A);
|
|
1051
1051
|
});
|
|
1052
1052
|
} };
|
|
1053
1053
|
}
|
|
1054
|
-
[G
|
|
1054
|
+
[G]() {
|
|
1055
1055
|
return { next: () => {
|
|
1056
|
-
const e
|
|
1056
|
+
const e = this.read();
|
|
1057
1057
|
return {
|
|
1058
|
-
value: e
|
|
1059
|
-
done: e
|
|
1058
|
+
value: e,
|
|
1059
|
+
done: e === null
|
|
1060
1060
|
};
|
|
1061
1061
|
} };
|
|
1062
1062
|
}
|
|
1063
|
-
destroy(t
|
|
1064
|
-
return this[n
|
|
1063
|
+
destroy(t) {
|
|
1064
|
+
return this[n] ? (t ? this.emit("error", t) : this.emit(n), this) : (this[n] = true, this.buffer.length = 0, this[s] = 0, typeof this.close == "function" && !this[w] && this.close(), t ? this.emit("error", t) : this.emit(n), this);
|
|
1065
1065
|
}
|
|
1066
|
-
static isStream(t
|
|
1067
|
-
return !!t
|
|
1066
|
+
static isStream(t) {
|
|
1067
|
+
return !!t && (t instanceof q || t instanceof x || t instanceof Y && (typeof t.pipe == "function" || typeof t.write == "function" && typeof t.end == "function"));
|
|
1068
1068
|
}
|
|
1069
1069
|
}, j;
|
|
1070
1070
|
}
|
|
@@ -1072,151 +1072,151 @@ var C;
|
|
|
1072
1072
|
function J() {
|
|
1073
1073
|
if (C) return i$3;
|
|
1074
1074
|
C = 1;
|
|
1075
|
-
const w
|
|
1075
|
+
const w = node_assert.default, n = node_buffer.default.Buffer, z = node_zlib.default, u = i$3.constants = T(), L = tt(), E = n.concat, c = Symbol("_superWrite");
|
|
1076
1076
|
class d extends Error {
|
|
1077
|
-
constructor(s
|
|
1078
|
-
super("zlib: " + s
|
|
1077
|
+
constructor(s) {
|
|
1078
|
+
super("zlib: " + s.message), this.code = s.code, this.errno = s.errno, this.code || (this.code = "ZLIB_ERROR"), this.message = "zlib: " + s.message, Error.captureStackTrace(this, this.constructor);
|
|
1079
1079
|
}
|
|
1080
1080
|
get name() {
|
|
1081
1081
|
return "ZlibError";
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
|
-
const Z = Symbol("opts"), p
|
|
1084
|
+
const Z = Symbol("opts"), p = Symbol("flushFlag"), I = Symbol("finishFlushFlag"), y = Symbol("fullFlushFlag"), t = Symbol("handle"), _ = Symbol("onError"), f = Symbol("sawError"), F = Symbol("level"), S = Symbol("strategy"), g = Symbol("ended");
|
|
1085
1085
|
class x extends L {
|
|
1086
|
-
constructor(s
|
|
1087
|
-
if (!s
|
|
1088
|
-
super(s
|
|
1086
|
+
constructor(s, e) {
|
|
1087
|
+
if (!s || typeof s != "object") throw new TypeError("invalid options for ZlibBase constructor");
|
|
1088
|
+
super(s), this[f] = false, this[g] = false, this[Z] = s, this[p] = s.flush, this[I] = s.finishFlush;
|
|
1089
1089
|
try {
|
|
1090
|
-
this[t
|
|
1091
|
-
} catch (i
|
|
1092
|
-
throw new d(i
|
|
1090
|
+
this[t] = new z[e](s);
|
|
1091
|
+
} catch (i) {
|
|
1092
|
+
throw new d(i);
|
|
1093
1093
|
}
|
|
1094
|
-
this[_
|
|
1095
|
-
this[f
|
|
1096
|
-
}, this[t
|
|
1094
|
+
this[_] = (i) => {
|
|
1095
|
+
this[f] || (this[f] = true, this.close(), this.emit("error", i));
|
|
1096
|
+
}, this[t].on("error", (i) => this[_](new d(i))), this.once("end", () => this.close);
|
|
1097
1097
|
}
|
|
1098
1098
|
close() {
|
|
1099
|
-
this[t
|
|
1099
|
+
this[t] && (this[t].close(), this[t] = null, this.emit("close"));
|
|
1100
1100
|
}
|
|
1101
1101
|
reset() {
|
|
1102
|
-
if (!this[f
|
|
1102
|
+
if (!this[f]) return w(this[t], "zlib binding closed"), this[t].reset();
|
|
1103
1103
|
}
|
|
1104
|
-
flush(s
|
|
1105
|
-
this.ended || (typeof s
|
|
1104
|
+
flush(s) {
|
|
1105
|
+
this.ended || (typeof s != "number" && (s = this[y]), this.write(Object.assign(n.alloc(0), { [p]: s })));
|
|
1106
1106
|
}
|
|
1107
|
-
end(s
|
|
1108
|
-
return s
|
|
1107
|
+
end(s, e, i) {
|
|
1108
|
+
return s && this.write(s, e), this.flush(this[I]), this[g] = true, super.end(null, null, i);
|
|
1109
1109
|
}
|
|
1110
1110
|
get ended() {
|
|
1111
1111
|
return this[g];
|
|
1112
1112
|
}
|
|
1113
|
-
write(s
|
|
1114
|
-
if (typeof e
|
|
1115
|
-
w
|
|
1116
|
-
const m
|
|
1117
|
-
m
|
|
1118
|
-
const G
|
|
1119
|
-
this[t
|
|
1113
|
+
write(s, e, i) {
|
|
1114
|
+
if (typeof e == "function" && (i = e, e = "utf8"), typeof s == "string" && (s = n.from(s, e)), this[f]) return;
|
|
1115
|
+
w(this[t], "zlib binding closed");
|
|
1116
|
+
const m = this[t]._handle, R = m.close;
|
|
1117
|
+
m.close = () => {};
|
|
1118
|
+
const G = this[t].close;
|
|
1119
|
+
this[t].close = () => {}, n.concat = (l) => l;
|
|
1120
1120
|
let h;
|
|
1121
1121
|
try {
|
|
1122
|
-
const l
|
|
1123
|
-
h = this[t
|
|
1124
|
-
} catch (l
|
|
1125
|
-
n
|
|
1122
|
+
const l = typeof s[p] == "number" ? s[p] : this[p];
|
|
1123
|
+
h = this[t]._processChunk(s, l), n.concat = E;
|
|
1124
|
+
} catch (l) {
|
|
1125
|
+
n.concat = E, this[_](new d(l));
|
|
1126
1126
|
} finally {
|
|
1127
|
-
this[t
|
|
1127
|
+
this[t] && (this[t]._handle = m, m.close = R, this[t].close = G, this[t].removeAllListeners("error"));
|
|
1128
1128
|
}
|
|
1129
|
-
this[t
|
|
1129
|
+
this[t] && this[t].on("error", (l) => this[_](new d(l)));
|
|
1130
1130
|
let b;
|
|
1131
1131
|
if (h) if (Array.isArray(h) && h.length > 0) {
|
|
1132
|
-
b = this[c
|
|
1133
|
-
for (let l
|
|
1134
|
-
} else b = this[c
|
|
1135
|
-
return i
|
|
1132
|
+
b = this[c](n.from(h[0]));
|
|
1133
|
+
for (let l = 1; l < h.length; l++) b = this[c](h[l]);
|
|
1134
|
+
} else b = this[c](n.from(h));
|
|
1135
|
+
return i && i(), b;
|
|
1136
1136
|
}
|
|
1137
|
-
[c
|
|
1138
|
-
return super.write(s
|
|
1137
|
+
[c](s) {
|
|
1138
|
+
return super.write(s);
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
|
-
class a
|
|
1142
|
-
constructor(s
|
|
1143
|
-
s
|
|
1144
|
-
}
|
|
1145
|
-
params(s
|
|
1146
|
-
if (!this[f
|
|
1147
|
-
if (!this[t
|
|
1148
|
-
if (!this[t
|
|
1149
|
-
if (this[F
|
|
1150
|
-
this.flush(u
|
|
1151
|
-
const i
|
|
1152
|
-
this[t
|
|
1153
|
-
this.flush(m
|
|
1141
|
+
class a extends x {
|
|
1142
|
+
constructor(s, e) {
|
|
1143
|
+
s = s || {}, s.flush = s.flush || u.Z_NO_FLUSH, s.finishFlush = s.finishFlush || u.Z_FINISH, super(s, e), this[y] = u.Z_FULL_FLUSH, this[F] = s.level, this[S] = s.strategy;
|
|
1144
|
+
}
|
|
1145
|
+
params(s, e) {
|
|
1146
|
+
if (!this[f]) {
|
|
1147
|
+
if (!this[t]) throw new Error("cannot switch params when binding is closed");
|
|
1148
|
+
if (!this[t].params) throw new Error("not supported in this implementation");
|
|
1149
|
+
if (this[F] !== s || this[S] !== e) {
|
|
1150
|
+
this.flush(u.Z_SYNC_FLUSH), w(this[t], "zlib binding closed");
|
|
1151
|
+
const i = this[t].flush;
|
|
1152
|
+
this[t].flush = (m, R) => {
|
|
1153
|
+
this.flush(m), R();
|
|
1154
1154
|
};
|
|
1155
1155
|
try {
|
|
1156
|
-
this[t
|
|
1156
|
+
this[t].params(s, e);
|
|
1157
1157
|
} finally {
|
|
1158
|
-
this[t
|
|
1158
|
+
this[t].flush = i;
|
|
1159
1159
|
}
|
|
1160
|
-
this[t
|
|
1160
|
+
this[t] && (this[F] = s, this[S] = e);
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
|
-
class q
|
|
1166
|
-
constructor(s
|
|
1167
|
-
super(s
|
|
1165
|
+
class q extends a {
|
|
1166
|
+
constructor(s) {
|
|
1167
|
+
super(s, "Deflate");
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
|
-
class D extends a
|
|
1171
|
-
constructor(s
|
|
1172
|
-
super(s
|
|
1170
|
+
class D extends a {
|
|
1171
|
+
constructor(s) {
|
|
1172
|
+
super(s, "Inflate");
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
1175
|
const B = Symbol("_portable");
|
|
1176
|
-
class $ extends a
|
|
1177
|
-
constructor(s
|
|
1178
|
-
super(s
|
|
1176
|
+
class $ extends a {
|
|
1177
|
+
constructor(s) {
|
|
1178
|
+
super(s, "Gzip"), this[B] = s && !!s.portable;
|
|
1179
1179
|
}
|
|
1180
|
-
[c
|
|
1181
|
-
return this[B] ? (this[B] = false, s
|
|
1180
|
+
[c](s) {
|
|
1181
|
+
return this[B] ? (this[B] = false, s[9] = 255, super[c](s)) : super[c](s);
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
|
-
class N extends a
|
|
1185
|
-
constructor(s
|
|
1186
|
-
super(s
|
|
1184
|
+
class N extends a {
|
|
1185
|
+
constructor(s) {
|
|
1186
|
+
super(s, "Gunzip");
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
|
-
class H
|
|
1190
|
-
constructor(s
|
|
1191
|
-
super(s
|
|
1189
|
+
class H extends a {
|
|
1190
|
+
constructor(s) {
|
|
1191
|
+
super(s, "DeflateRaw");
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
|
-
let T$1 = class T
|
|
1195
|
-
constructor(s
|
|
1196
|
-
super(s
|
|
1194
|
+
let T$1 = class T extends a {
|
|
1195
|
+
constructor(s) {
|
|
1196
|
+
super(s, "InflateRaw");
|
|
1197
1197
|
}
|
|
1198
1198
|
};
|
|
1199
|
-
class U extends a
|
|
1200
|
-
constructor(s
|
|
1201
|
-
super(s
|
|
1199
|
+
class U extends a {
|
|
1200
|
+
constructor(s) {
|
|
1201
|
+
super(s, "Unzip");
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
|
-
class O
|
|
1205
|
-
constructor(s
|
|
1206
|
-
s
|
|
1204
|
+
class O extends x {
|
|
1205
|
+
constructor(s, e) {
|
|
1206
|
+
s = s || {}, s.flush = s.flush || u.BROTLI_OPERATION_PROCESS, s.finishFlush = s.finishFlush || u.BROTLI_OPERATION_FINISH, super(s, e), this[y] = u.BROTLI_OPERATION_FLUSH;
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
|
-
class v
|
|
1210
|
-
constructor(s
|
|
1211
|
-
super(s
|
|
1209
|
+
class v extends O {
|
|
1210
|
+
constructor(s) {
|
|
1211
|
+
super(s, "BrotliCompress");
|
|
1212
1212
|
}
|
|
1213
1213
|
}
|
|
1214
|
-
class A extends O
|
|
1215
|
-
constructor(s
|
|
1216
|
-
super(s
|
|
1214
|
+
class A extends O {
|
|
1215
|
+
constructor(s) {
|
|
1216
|
+
super(s, "BrotliDecompress");
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
|
-
return i$3.Deflate = q
|
|
1219
|
+
return i$3.Deflate = q, i$3.Inflate = D, i$3.Gzip = $, i$3.Gunzip = N, i$3.DeflateRaw = H, i$3.InflateRaw = T$1, i$3.Unzip = U, typeof z.BrotliCompress == "function" ? (i$3.BrotliCompress = v, i$3.BrotliDecompress = A) : i$3.BrotliCompress = i$3.BrotliDecompress = class {
|
|
1220
1220
|
constructor() {
|
|
1221
1221
|
throw new Error("Brotli is not supported in this version of Node.js");
|
|
1222
1222
|
}
|
|
@@ -1226,174 +1226,174 @@ var O$1, F$2;
|
|
|
1226
1226
|
function rt() {
|
|
1227
1227
|
if (F$2) return O$1;
|
|
1228
1228
|
F$2 = 1;
|
|
1229
|
-
const P
|
|
1230
|
-
return O$1 = P
|
|
1231
|
-
constructor(t
|
|
1232
|
-
t
|
|
1229
|
+
const P = c$4(), $ = E(), v = node_events.default, W = c$3(), G = 1024 * 1024, k = u$3(), C = f$2(), x = J(), { nextTick: j } = node_process.default, B = Buffer.from([31, 139]), h = Symbol("state"), d = Symbol("writeEntry"), a = Symbol("readEntry"), I = Symbol("nextEntry"), U = Symbol("processEntry"), l = Symbol("extendedHeader"), y = Symbol("globalExtendedHeader"), c = Symbol("meta"), H = Symbol("emitMeta"), n = Symbol("buffer"), f = Symbol("queue"), u = Symbol("ended"), L = Symbol("emittedEnd"), b = Symbol("emit"), r = Symbol("unzip"), _ = Symbol("consumeChunk"), g = Symbol("consumeChunkSub"), q = Symbol("consumeBody"), z = Symbol("consumeMeta"), Y = Symbol("consumeHeader"), N = Symbol("consuming"), D = Symbol("bufferConcat"), M = Symbol("maybeEnd"), S = Symbol("writing"), m = Symbol("aborted"), T = Symbol("onDone"), E$1 = Symbol("sawValidEntry"), R = Symbol("sawNullBlock"), A = Symbol("sawEOF"), V = Symbol("closeStream"), K = (X) => true;
|
|
1230
|
+
return O$1 = P(class extends v {
|
|
1231
|
+
constructor(t) {
|
|
1232
|
+
t = t || {}, super(t), this.file = t.file || "", this[E$1] = null, this.on(T, (s) => {
|
|
1233
1233
|
(this[h] === "begin" || this[E$1] === false) && this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
|
|
1234
|
-
}), t
|
|
1234
|
+
}), t.ondone ? this.on(T, t.ondone) : this.on(T, (s) => {
|
|
1235
1235
|
this.emit("prefinish"), this.emit("finish"), this.emit("end");
|
|
1236
|
-
}), this.strict = !!t
|
|
1237
|
-
const i
|
|
1238
|
-
this.brotli = !t
|
|
1236
|
+
}), this.strict = !!t.strict, this.maxMetaEntrySize = t.maxMetaEntrySize || G, this.filter = typeof t.filter == "function" ? t.filter : K;
|
|
1237
|
+
const i = t.file && (t.file.endsWith(".tar.br") || t.file.endsWith(".tbr"));
|
|
1238
|
+
this.brotli = !t.gzip && t.brotli !== void 0 ? t.brotli : i ? void 0 : false, this.writable = true, this.readable = false, this[f] = new W(), this[n] = null, this[a] = null, this[d] = null, this[h] = "begin", this[c] = "", this[l] = null, this[y] = null, this[u] = false, this[r] = null, this[m] = false, this[R] = false, this[A] = false, this.on("end", () => this[V]()), typeof t.onwarn == "function" && this.on("warn", t.onwarn), typeof t.onentry == "function" && this.on("entry", t.onentry);
|
|
1239
1239
|
}
|
|
1240
|
-
[Y](t
|
|
1240
|
+
[Y](t, i) {
|
|
1241
1241
|
this[E$1] === null && (this[E$1] = false);
|
|
1242
|
-
let s
|
|
1242
|
+
let s;
|
|
1243
1243
|
try {
|
|
1244
|
-
s
|
|
1245
|
-
} catch (o
|
|
1246
|
-
return this.warn("TAR_ENTRY_INVALID", o
|
|
1244
|
+
s = new $(t, i, this[l], this[y]);
|
|
1245
|
+
} catch (o) {
|
|
1246
|
+
return this.warn("TAR_ENTRY_INVALID", o);
|
|
1247
1247
|
}
|
|
1248
|
-
if (s
|
|
1249
|
-
else if (this[R
|
|
1250
|
-
else if (!s
|
|
1248
|
+
if (s.nullBlock) this[R] ? (this[A] = true, this[h] === "begin" && (this[h] = "header"), this[b]("eof")) : (this[R] = true, this[b]("nullBlock"));
|
|
1249
|
+
else if (this[R] = false, !s.cksumValid) this.warn("TAR_ENTRY_INVALID", "checksum failure", { header: s });
|
|
1250
|
+
else if (!s.path) this.warn("TAR_ENTRY_INVALID", "path is required", { header: s });
|
|
1251
1251
|
else {
|
|
1252
|
-
const o
|
|
1253
|
-
if (/^(Symbolic)?Link$/.test(o
|
|
1254
|
-
else if (!/^(Symbolic)?Link$/.test(o
|
|
1252
|
+
const o = s.type;
|
|
1253
|
+
if (/^(Symbolic)?Link$/.test(o) && !s.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath required", { header: s });
|
|
1254
|
+
else if (!/^(Symbolic)?Link$/.test(o) && s.linkpath) this.warn("TAR_ENTRY_INVALID", "linkpath forbidden", { header: s });
|
|
1255
1255
|
else {
|
|
1256
|
-
const e
|
|
1257
|
-
if (!this[E$1]) if (e
|
|
1258
|
-
const w
|
|
1259
|
-
e
|
|
1256
|
+
const e = this[d] = new k(s, this[l], this[y]);
|
|
1257
|
+
if (!this[E$1]) if (e.remain) {
|
|
1258
|
+
const w = () => {
|
|
1259
|
+
e.invalid || (this[E$1] = true);
|
|
1260
1260
|
};
|
|
1261
|
-
e
|
|
1261
|
+
e.on("end", w);
|
|
1262
1262
|
} else this[E$1] = true;
|
|
1263
|
-
e
|
|
1263
|
+
e.meta ? e.size > this.maxMetaEntrySize ? (e.ignore = true, this[b]("ignoredEntry", e), this[h] = "ignore", e.resume()) : e.size > 0 && (this[c] = "", e.on("data", (w) => this[c] += w), this[h] = "meta") : (this[l] = null, e.ignore = e.ignore || !this.filter(e.path, e), e.ignore ? (this[b]("ignoredEntry", e), this[h] = e.remain ? "ignore" : "header", e.resume()) : (e.remain ? this[h] = "body" : (this[h] = "header", e.end()), this[a] ? this[f].push(e) : (this[f].push(e), this[I]())));
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
1267
|
-
[V
|
|
1268
|
-
j
|
|
1267
|
+
[V]() {
|
|
1268
|
+
j(() => this.emit("close"));
|
|
1269
1269
|
}
|
|
1270
|
-
[U](t
|
|
1271
|
-
let i
|
|
1272
|
-
return t
|
|
1270
|
+
[U](t) {
|
|
1271
|
+
let i = true;
|
|
1272
|
+
return t ? Array.isArray(t) ? this.emit.apply(this, t) : (this[a] = t, this.emit("entry", t), t.emittedEnd || (t.on("end", (s) => this[I]()), i = false)) : (this[a] = null, i = false), i;
|
|
1273
1273
|
}
|
|
1274
1274
|
[I]() {
|
|
1275
1275
|
do ;
|
|
1276
|
-
while (this[U](this[f
|
|
1277
|
-
if (!this[f
|
|
1278
|
-
const t
|
|
1279
|
-
!t
|
|
1276
|
+
while (this[U](this[f].shift()));
|
|
1277
|
+
if (!this[f].length) {
|
|
1278
|
+
const t = this[a];
|
|
1279
|
+
!t || t.flowing || t.size === t.remain ? this[S] || this.emit("drain") : t.once("drain", (s) => this.emit("drain"));
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
|
-
[q
|
|
1283
|
-
const s
|
|
1284
|
-
return s
|
|
1282
|
+
[q](t, i) {
|
|
1283
|
+
const s = this[d], o = s.blockRemain, e = o >= t.length && i === 0 ? t : t.slice(i, i + o);
|
|
1284
|
+
return s.write(e), s.blockRemain || (this[h] = "header", this[d] = null, s.end()), e.length;
|
|
1285
1285
|
}
|
|
1286
|
-
[z
|
|
1287
|
-
const s
|
|
1288
|
-
return this[d] || this[H
|
|
1286
|
+
[z](t, i) {
|
|
1287
|
+
const s = this[d], o = this[q](t, i);
|
|
1288
|
+
return this[d] || this[H](s), o;
|
|
1289
1289
|
}
|
|
1290
|
-
[b](t
|
|
1291
|
-
!this[f
|
|
1292
|
-
t
|
|
1293
|
-
i
|
|
1294
|
-
s
|
|
1290
|
+
[b](t, i, s) {
|
|
1291
|
+
!this[f].length && !this[a] ? this.emit(t, i, s) : this[f].push([
|
|
1292
|
+
t,
|
|
1293
|
+
i,
|
|
1294
|
+
s
|
|
1295
1295
|
]);
|
|
1296
1296
|
}
|
|
1297
|
-
[H
|
|
1298
|
-
switch (this[b]("meta", this[c
|
|
1297
|
+
[H](t) {
|
|
1298
|
+
switch (this[b]("meta", this[c]), t.type) {
|
|
1299
1299
|
case "ExtendedHeader":
|
|
1300
1300
|
case "OldExtendedHeader":
|
|
1301
|
-
this[l
|
|
1301
|
+
this[l] = C.parse(this[c], this[l], false);
|
|
1302
1302
|
break;
|
|
1303
1303
|
case "GlobalExtendedHeader":
|
|
1304
|
-
this[y
|
|
1304
|
+
this[y] = C.parse(this[c], this[y], true);
|
|
1305
1305
|
break;
|
|
1306
1306
|
case "NextFileHasLongPath":
|
|
1307
1307
|
case "OldGnuLongPath":
|
|
1308
|
-
this[l
|
|
1308
|
+
this[l] = this[l] || Object.create(null), this[l].path = this[c].replace(/\0.*/, "");
|
|
1309
1309
|
break;
|
|
1310
1310
|
case "NextFileHasLongLinkpath":
|
|
1311
|
-
this[l
|
|
1311
|
+
this[l] = this[l] || Object.create(null), this[l].linkpath = this[c].replace(/\0.*/, "");
|
|
1312
1312
|
break;
|
|
1313
|
-
default: throw new Error("unknown meta: " + t
|
|
1313
|
+
default: throw new Error("unknown meta: " + t.type);
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
abort(t
|
|
1317
|
-
this[m
|
|
1318
|
-
}
|
|
1319
|
-
write(t
|
|
1320
|
-
if (this[m
|
|
1321
|
-
if ((this[r] === null || this.brotli === void 0 && this[r] === false) && t
|
|
1322
|
-
if (this[n
|
|
1323
|
-
for (let e
|
|
1324
|
-
const o
|
|
1325
|
-
if (this[r] === false && o
|
|
1326
|
-
else return this[n
|
|
1316
|
+
abort(t) {
|
|
1317
|
+
this[m] = true, this.emit("abort", t), this.warn("TAR_ABORT", t, { recoverable: false });
|
|
1318
|
+
}
|
|
1319
|
+
write(t) {
|
|
1320
|
+
if (this[m]) return;
|
|
1321
|
+
if ((this[r] === null || this.brotli === void 0 && this[r] === false) && t) {
|
|
1322
|
+
if (this[n] && (t = Buffer.concat([this[n], t]), this[n] = null), t.length < B.length) return this[n] = t, true;
|
|
1323
|
+
for (let e = 0; this[r] === null && e < B.length; e++) t[e] !== B[e] && (this[r] = false);
|
|
1324
|
+
const o = this.brotli === void 0;
|
|
1325
|
+
if (this[r] === false && o) if (t.length < 512) if (this[u]) this.brotli = true;
|
|
1326
|
+
else return this[n] = t, true;
|
|
1327
1327
|
else try {
|
|
1328
|
-
new $(t
|
|
1328
|
+
new $(t.slice(0, 512)), this.brotli = !1;
|
|
1329
1329
|
} catch {
|
|
1330
1330
|
this.brotli = true;
|
|
1331
1331
|
}
|
|
1332
1332
|
if (this[r] === null || this[r] === false && this.brotli) {
|
|
1333
|
-
const e
|
|
1334
|
-
this[u
|
|
1335
|
-
this[u
|
|
1336
|
-
}), this[S
|
|
1337
|
-
const w
|
|
1338
|
-
return this[S
|
|
1333
|
+
const e = this[u];
|
|
1334
|
+
this[u] = false, this[r] = this[r] === null ? new x.Unzip() : new x.BrotliDecompress(), this[r].on("data", (p) => this[_](p)), this[r].on("error", (p) => this.abort(p)), this[r].on("end", (p) => {
|
|
1335
|
+
this[u] = true, this[_]();
|
|
1336
|
+
}), this[S] = true;
|
|
1337
|
+
const w = this[r][e ? "end" : "write"](t);
|
|
1338
|
+
return this[S] = false, w;
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
|
-
this[S
|
|
1342
|
-
const s
|
|
1343
|
-
return !s
|
|
1341
|
+
this[S] = true, this[r] ? this[r].write(t) : this[_](t), this[S] = false;
|
|
1342
|
+
const s = this[f].length ? false : this[a] ? this[a].flowing : true;
|
|
1343
|
+
return !s && !this[f].length && this[a].once("drain", (o) => this.emit("drain")), s;
|
|
1344
1344
|
}
|
|
1345
|
-
[D](t
|
|
1346
|
-
t
|
|
1345
|
+
[D](t) {
|
|
1346
|
+
t && !this[m] && (this[n] = this[n] ? Buffer.concat([this[n], t]) : t);
|
|
1347
1347
|
}
|
|
1348
1348
|
[M]() {
|
|
1349
|
-
if (this[u
|
|
1349
|
+
if (this[u] && !this[L] && !this[m] && !this[N]) {
|
|
1350
1350
|
this[L] = true;
|
|
1351
|
-
const t
|
|
1352
|
-
if (t
|
|
1353
|
-
const i
|
|
1354
|
-
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t
|
|
1351
|
+
const t = this[d];
|
|
1352
|
+
if (t && t.blockRemain) {
|
|
1353
|
+
const i = this[n] ? this[n].length : 0;
|
|
1354
|
+
this.warn("TAR_BAD_ARCHIVE", `Truncated input (needed ${t.blockRemain} more bytes, only ${i} available)`, { entry: t }), this[n] && t.write(this[n]), t.end();
|
|
1355
1355
|
}
|
|
1356
|
-
this[b](T
|
|
1356
|
+
this[b](T);
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
|
-
[_
|
|
1360
|
-
if (this[N]) this[D](t
|
|
1361
|
-
else if (!t
|
|
1359
|
+
[_](t) {
|
|
1360
|
+
if (this[N]) this[D](t);
|
|
1361
|
+
else if (!t && !this[n]) this[M]();
|
|
1362
1362
|
else {
|
|
1363
|
-
if (this[N] = true, this[n
|
|
1364
|
-
this[D](t
|
|
1365
|
-
const i
|
|
1366
|
-
this[n
|
|
1367
|
-
} else this[g](t
|
|
1368
|
-
for (; this[n
|
|
1369
|
-
const i
|
|
1370
|
-
this[n
|
|
1363
|
+
if (this[N] = true, this[n]) {
|
|
1364
|
+
this[D](t);
|
|
1365
|
+
const i = this[n];
|
|
1366
|
+
this[n] = null, this[g](i);
|
|
1367
|
+
} else this[g](t);
|
|
1368
|
+
for (; this[n] && this[n].length >= 512 && !this[m] && !this[A];) {
|
|
1369
|
+
const i = this[n];
|
|
1370
|
+
this[n] = null, this[g](i);
|
|
1371
1371
|
}
|
|
1372
1372
|
this[N] = false;
|
|
1373
1373
|
}
|
|
1374
|
-
(!this[n
|
|
1374
|
+
(!this[n] || this[u]) && this[M]();
|
|
1375
1375
|
}
|
|
1376
|
-
[g](t
|
|
1377
|
-
let i
|
|
1378
|
-
const s
|
|
1379
|
-
for (; i
|
|
1376
|
+
[g](t) {
|
|
1377
|
+
let i = 0;
|
|
1378
|
+
const s = t.length;
|
|
1379
|
+
for (; i + 512 <= s && !this[m] && !this[A];) switch (this[h]) {
|
|
1380
1380
|
case "begin":
|
|
1381
1381
|
case "header":
|
|
1382
|
-
this[Y](t
|
|
1382
|
+
this[Y](t, i), i += 512;
|
|
1383
1383
|
break;
|
|
1384
1384
|
case "ignore":
|
|
1385
1385
|
case "body":
|
|
1386
|
-
i
|
|
1386
|
+
i += this[q](t, i);
|
|
1387
1387
|
break;
|
|
1388
1388
|
case "meta":
|
|
1389
|
-
i
|
|
1389
|
+
i += this[z](t, i);
|
|
1390
1390
|
break;
|
|
1391
1391
|
default: throw new Error("invalid state: " + this[h]);
|
|
1392
1392
|
}
|
|
1393
|
-
i
|
|
1393
|
+
i < s && (this[n] ? this[n] = Buffer.concat([t.slice(i), this[n]]) : this[n] = t.slice(i));
|
|
1394
1394
|
}
|
|
1395
|
-
end(t
|
|
1396
|
-
this[m
|
|
1395
|
+
end(t) {
|
|
1396
|
+
this[m] || (this[r] ? this[r].end(t) : (this[u] = true, this.brotli === void 0 && (t = t || Buffer.alloc(0)), this.write(t)));
|
|
1397
1397
|
}
|
|
1398
1398
|
}), O$1;
|
|
1399
1399
|
}
|
|
@@ -1402,26 +1402,26 @@ var v$1;
|
|
|
1402
1402
|
function X() {
|
|
1403
1403
|
if (v$1) return s$4;
|
|
1404
1404
|
v$1 = 1;
|
|
1405
|
-
const H
|
|
1406
|
-
let R
|
|
1407
|
-
if (!R
|
|
1408
|
-
const c
|
|
1409
|
-
R
|
|
1410
|
-
const G
|
|
1411
|
-
j
|
|
1405
|
+
const H = tt(), I = node_events.default.EventEmitter, r = node_fs.default;
|
|
1406
|
+
let R = r.writev;
|
|
1407
|
+
if (!R) {
|
|
1408
|
+
const c = process.binding("fs"), t = c.FSReqWrap || c.FSReqCallback;
|
|
1409
|
+
R = (e, i, $, A) => {
|
|
1410
|
+
const G = (J, K) => A(J, K, i), j = new t();
|
|
1411
|
+
j.oncomplete = G, c.writeBuffers(e, i, $, j);
|
|
1412
1412
|
};
|
|
1413
1413
|
}
|
|
1414
|
-
const m
|
|
1415
|
-
class D extends H
|
|
1416
|
-
constructor(t
|
|
1417
|
-
if (e
|
|
1418
|
-
this[p
|
|
1414
|
+
const m = Symbol("_autoClose"), h = Symbol("_close"), g = Symbol("_ended"), s = Symbol("_fd"), B = Symbol("_finished"), o = Symbol("_flags"), x = Symbol("_flush"), z = Symbol("_handleChunk"), T = Symbol("_makeBuf"), q = Symbol("_mode"), E = Symbol("_needDrain"), d = Symbol("_onerror"), y = Symbol("_onopen"), W = Symbol("_onread"), _ = Symbol("_onwrite"), a = Symbol("_open"), l = Symbol("_path"), u = Symbol("_pos"), n = Symbol("_queue"), S = Symbol("_read"), M = Symbol("_readSize"), f = Symbol("_reading"), k = Symbol("_remain"), N = Symbol("_size"), C = Symbol("_write"), b = Symbol("_writing"), F = Symbol("_defaultFlag"), p = Symbol("_errored");
|
|
1415
|
+
class D extends H {
|
|
1416
|
+
constructor(t, e) {
|
|
1417
|
+
if (e = e || {}, super(e), this.readable = true, this.writable = false, typeof t != "string") throw new TypeError("path must be a string");
|
|
1418
|
+
this[p] = false, this[s] = typeof e.fd == "number" ? e.fd : null, this[l] = t, this[M] = e.readSize || 16 * 1024 * 1024, this[f] = false, this[N] = typeof e.size == "number" ? e.size : Infinity, this[k] = this[N], this[m] = typeof e.autoClose == "boolean" ? e.autoClose : true, typeof this[s] == "number" ? this[S]() : this[a]();
|
|
1419
1419
|
}
|
|
1420
1420
|
get fd() {
|
|
1421
|
-
return this[s
|
|
1421
|
+
return this[s];
|
|
1422
1422
|
}
|
|
1423
1423
|
get path() {
|
|
1424
|
-
return this[l
|
|
1424
|
+
return this[l];
|
|
1425
1425
|
}
|
|
1426
1426
|
write() {
|
|
1427
1427
|
throw new TypeError("this is a readable stream");
|
|
@@ -1429,210 +1429,210 @@ function X() {
|
|
|
1429
1429
|
end() {
|
|
1430
1430
|
throw new TypeError("this is a readable stream");
|
|
1431
1431
|
}
|
|
1432
|
-
[a
|
|
1433
|
-
r.open(this[l
|
|
1432
|
+
[a]() {
|
|
1433
|
+
r.open(this[l], "r", (t, e) => this[y](t, e));
|
|
1434
1434
|
}
|
|
1435
|
-
[y
|
|
1436
|
-
t
|
|
1435
|
+
[y](t, e) {
|
|
1436
|
+
t ? this[d](t) : (this[s] = e, this.emit("open", e), this[S]());
|
|
1437
1437
|
}
|
|
1438
|
-
[T
|
|
1439
|
-
return Buffer.allocUnsafe(Math.min(this[M], this[k
|
|
1438
|
+
[T]() {
|
|
1439
|
+
return Buffer.allocUnsafe(Math.min(this[M], this[k]));
|
|
1440
1440
|
}
|
|
1441
|
-
[S
|
|
1442
|
-
if (!this[f
|
|
1443
|
-
this[f
|
|
1444
|
-
const t
|
|
1445
|
-
if (t
|
|
1446
|
-
r.read(this[s
|
|
1441
|
+
[S]() {
|
|
1442
|
+
if (!this[f]) {
|
|
1443
|
+
this[f] = true;
|
|
1444
|
+
const t = this[T]();
|
|
1445
|
+
if (t.length === 0) return process.nextTick(() => this[W](null, 0, t));
|
|
1446
|
+
r.read(this[s], t, 0, t.length, null, (e, i, $) => this[W](e, i, $));
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
|
-
[W](t
|
|
1450
|
-
this[f
|
|
1449
|
+
[W](t, e, i) {
|
|
1450
|
+
this[f] = false, t ? this[d](t) : this[z](e, i) && this[S]();
|
|
1451
1451
|
}
|
|
1452
1452
|
[h]() {
|
|
1453
|
-
if (this[m
|
|
1454
|
-
const t
|
|
1455
|
-
this[s
|
|
1453
|
+
if (this[m] && typeof this[s] == "number") {
|
|
1454
|
+
const t = this[s];
|
|
1455
|
+
this[s] = null, r.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
1456
1456
|
}
|
|
1457
1457
|
}
|
|
1458
|
-
[d](t
|
|
1459
|
-
this[f
|
|
1458
|
+
[d](t) {
|
|
1459
|
+
this[f] = true, this[h](), this.emit("error", t);
|
|
1460
1460
|
}
|
|
1461
|
-
[z
|
|
1462
|
-
let i
|
|
1463
|
-
return this[k
|
|
1461
|
+
[z](t, e) {
|
|
1462
|
+
let i = false;
|
|
1463
|
+
return this[k] -= t, t > 0 && (i = super.write(t < e.length ? e.slice(0, t) : e)), (t === 0 || this[k] <= 0) && (i = false, this[h](), super.end()), i;
|
|
1464
1464
|
}
|
|
1465
|
-
emit(t
|
|
1466
|
-
switch (t
|
|
1465
|
+
emit(t, e) {
|
|
1466
|
+
switch (t) {
|
|
1467
1467
|
case "prefinish":
|
|
1468
1468
|
case "finish": break;
|
|
1469
1469
|
case "drain":
|
|
1470
|
-
typeof this[s
|
|
1470
|
+
typeof this[s] == "number" && this[S]();
|
|
1471
1471
|
break;
|
|
1472
|
-
case "error": return this[p
|
|
1473
|
-
default: return super.emit(t
|
|
1472
|
+
case "error": return this[p] ? void 0 : (this[p] = true, super.emit(t, e));
|
|
1473
|
+
default: return super.emit(t, e);
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
|
-
class P
|
|
1478
|
-
[a
|
|
1479
|
-
let t
|
|
1477
|
+
class P extends D {
|
|
1478
|
+
[a]() {
|
|
1479
|
+
let t = true;
|
|
1480
1480
|
try {
|
|
1481
|
-
this[y
|
|
1481
|
+
this[y](null, r.openSync(this[l], "r")), t = !1;
|
|
1482
1482
|
} finally {
|
|
1483
|
-
t
|
|
1483
|
+
t && this[h]();
|
|
1484
1484
|
}
|
|
1485
1485
|
}
|
|
1486
|
-
[S
|
|
1487
|
-
let t
|
|
1486
|
+
[S]() {
|
|
1487
|
+
let t = true;
|
|
1488
1488
|
try {
|
|
1489
|
-
if (!this[f
|
|
1490
|
-
this[f
|
|
1489
|
+
if (!this[f]) {
|
|
1490
|
+
this[f] = !0;
|
|
1491
1491
|
do {
|
|
1492
|
-
const e
|
|
1493
|
-
if (!this[z
|
|
1492
|
+
const e = this[T](), i = e.length === 0 ? 0 : r.readSync(this[s], e, 0, e.length, null);
|
|
1493
|
+
if (!this[z](i, e)) break;
|
|
1494
1494
|
} while (!0);
|
|
1495
|
-
this[f
|
|
1495
|
+
this[f] = !1;
|
|
1496
1496
|
}
|
|
1497
|
-
t
|
|
1497
|
+
t = !1;
|
|
1498
1498
|
} finally {
|
|
1499
|
-
t
|
|
1499
|
+
t && this[h]();
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
1502
|
[h]() {
|
|
1503
|
-
if (this[m
|
|
1504
|
-
const t
|
|
1505
|
-
this[s
|
|
1503
|
+
if (this[m] && typeof this[s] == "number") {
|
|
1504
|
+
const t = this[s];
|
|
1505
|
+
this[s] = null, r.closeSync(t), this.emit("close");
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
class O
|
|
1510
|
-
constructor(t
|
|
1511
|
-
e
|
|
1512
|
-
const i
|
|
1513
|
-
this[F
|
|
1514
|
-
}
|
|
1515
|
-
emit(t
|
|
1516
|
-
if (t
|
|
1517
|
-
if (this[p
|
|
1518
|
-
this[p
|
|
1509
|
+
class O extends I {
|
|
1510
|
+
constructor(t, e) {
|
|
1511
|
+
e = e || {}, super(e), this.readable = false, this.writable = true, this[p] = false, this[b] = false, this[g] = false, this[E] = false, this[n] = [], this[l] = t, this[s] = typeof e.fd == "number" ? e.fd : null, this[q] = e.mode === void 0 ? 438 : e.mode, this[u] = typeof e.start == "number" ? e.start : null, this[m] = typeof e.autoClose == "boolean" ? e.autoClose : true;
|
|
1512
|
+
const i = this[u] !== null ? "r+" : "w";
|
|
1513
|
+
this[F] = e.flags === void 0, this[o] = this[F] ? i : e.flags, this[s] === null && this[a]();
|
|
1514
|
+
}
|
|
1515
|
+
emit(t, e) {
|
|
1516
|
+
if (t === "error") {
|
|
1517
|
+
if (this[p]) return;
|
|
1518
|
+
this[p] = true;
|
|
1519
1519
|
}
|
|
1520
|
-
return super.emit(t
|
|
1520
|
+
return super.emit(t, e);
|
|
1521
1521
|
}
|
|
1522
1522
|
get fd() {
|
|
1523
|
-
return this[s
|
|
1523
|
+
return this[s];
|
|
1524
1524
|
}
|
|
1525
1525
|
get path() {
|
|
1526
|
-
return this[l
|
|
1526
|
+
return this[l];
|
|
1527
1527
|
}
|
|
1528
|
-
[d](t
|
|
1529
|
-
this[h](), this[b] = true, this.emit("error", t
|
|
1528
|
+
[d](t) {
|
|
1529
|
+
this[h](), this[b] = true, this.emit("error", t);
|
|
1530
1530
|
}
|
|
1531
|
-
[a
|
|
1532
|
-
r.open(this[l
|
|
1531
|
+
[a]() {
|
|
1532
|
+
r.open(this[l], this[o], this[q], (t, e) => this[y](t, e));
|
|
1533
1533
|
}
|
|
1534
|
-
[y
|
|
1535
|
-
this[F
|
|
1534
|
+
[y](t, e) {
|
|
1535
|
+
this[F] && this[o] === "r+" && t && t.code === "ENOENT" ? (this[o] = "w", this[a]()) : t ? this[d](t) : (this[s] = e, this.emit("open", e), this[x]());
|
|
1536
1536
|
}
|
|
1537
|
-
end(t
|
|
1538
|
-
return t
|
|
1537
|
+
end(t, e) {
|
|
1538
|
+
return t && this.write(t, e), this[g] = true, !this[b] && !this[n].length && typeof this[s] == "number" && this[_](null, 0), this;
|
|
1539
1539
|
}
|
|
1540
|
-
write(t
|
|
1541
|
-
return typeof t
|
|
1540
|
+
write(t, e) {
|
|
1541
|
+
return typeof t == "string" && (t = Buffer.from(t, e)), this[g] ? (this.emit("error", /* @__PURE__ */ new Error("write() after end()")), false) : this[s] === null || this[b] || this[n].length ? (this[n].push(t), this[E] = true, false) : (this[b] = true, this[C](t), true);
|
|
1542
1542
|
}
|
|
1543
|
-
[C
|
|
1544
|
-
r.write(this[s
|
|
1543
|
+
[C](t) {
|
|
1544
|
+
r.write(this[s], t, 0, t.length, this[u], (e, i) => this[_](e, i));
|
|
1545
1545
|
}
|
|
1546
|
-
[_
|
|
1547
|
-
t
|
|
1546
|
+
[_](t, e) {
|
|
1547
|
+
t ? this[d](t) : (this[u] !== null && (this[u] += e), this[n].length ? this[x]() : (this[b] = false, this[g] && !this[B] ? (this[B] = true, this[h](), this.emit("finish")) : this[E] && (this[E] = false, this.emit("drain"))));
|
|
1548
1548
|
}
|
|
1549
1549
|
[x]() {
|
|
1550
|
-
if (this[n
|
|
1551
|
-
else if (this[n
|
|
1550
|
+
if (this[n].length === 0) this[g] && this[_](null, 0);
|
|
1551
|
+
else if (this[n].length === 1) this[C](this[n].pop());
|
|
1552
1552
|
else {
|
|
1553
|
-
const t
|
|
1554
|
-
this[n
|
|
1553
|
+
const t = this[n];
|
|
1554
|
+
this[n] = [], R(this[s], t, this[u], (e, i) => this[_](e, i));
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
1557
|
[h]() {
|
|
1558
|
-
if (this[m
|
|
1559
|
-
const t
|
|
1560
|
-
this[s
|
|
1558
|
+
if (this[m] && typeof this[s] == "number") {
|
|
1559
|
+
const t = this[s];
|
|
1560
|
+
this[s] = null, r.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
1563
|
}
|
|
1564
|
-
class U extends O
|
|
1565
|
-
[a
|
|
1566
|
-
let t
|
|
1567
|
-
if (this[F
|
|
1568
|
-
t
|
|
1569
|
-
} catch (e
|
|
1570
|
-
if (e
|
|
1571
|
-
throw e
|
|
1564
|
+
class U extends O {
|
|
1565
|
+
[a]() {
|
|
1566
|
+
let t;
|
|
1567
|
+
if (this[F] && this[o] === "r+") try {
|
|
1568
|
+
t = r.openSync(this[l], this[o], this[q]);
|
|
1569
|
+
} catch (e) {
|
|
1570
|
+
if (e.code === "ENOENT") return this[o] = "w", this[a]();
|
|
1571
|
+
throw e;
|
|
1572
1572
|
}
|
|
1573
|
-
else t
|
|
1574
|
-
this[y
|
|
1573
|
+
else t = r.openSync(this[l], this[o], this[q]);
|
|
1574
|
+
this[y](null, t);
|
|
1575
1575
|
}
|
|
1576
1576
|
[h]() {
|
|
1577
|
-
if (this[m
|
|
1578
|
-
const t
|
|
1579
|
-
this[s
|
|
1577
|
+
if (this[m] && typeof this[s] == "number") {
|
|
1578
|
+
const t = this[s];
|
|
1579
|
+
this[s] = null, r.closeSync(t), this.emit("close");
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
1582
|
-
[C
|
|
1583
|
-
let e
|
|
1582
|
+
[C](t) {
|
|
1583
|
+
let e = true;
|
|
1584
1584
|
try {
|
|
1585
|
-
this[_
|
|
1585
|
+
this[_](null, r.writeSync(this[s], t, 0, t.length, this[u])), e = !1;
|
|
1586
1586
|
} finally {
|
|
1587
|
-
if (e
|
|
1587
|
+
if (e) try {
|
|
1588
1588
|
this[h]();
|
|
1589
1589
|
} catch {}
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
|
-
return s$4.ReadStream = D, s$4.ReadStreamSync = P
|
|
1593
|
+
return s$4.ReadStream = D, s$4.ReadStreamSync = P, s$4.WriteStream = O, s$4.WriteStreamSync = U, s$4;
|
|
1594
1594
|
}
|
|
1595
1595
|
var r$1 = { exports: {} };
|
|
1596
1596
|
var i$2, m$2;
|
|
1597
1597
|
function t$2() {
|
|
1598
1598
|
if (m$2) return i$2;
|
|
1599
1599
|
m$2 = 1;
|
|
1600
|
-
const { promisify: n
|
|
1600
|
+
const { promisify: n } = node_util.default, e = node_fs.default;
|
|
1601
1601
|
return i$2 = (r) => {
|
|
1602
1602
|
if (!r) r = {
|
|
1603
1603
|
mode: 511,
|
|
1604
|
-
fs: e
|
|
1604
|
+
fs: e
|
|
1605
1605
|
};
|
|
1606
1606
|
else if (typeof r == "object") r = {
|
|
1607
1607
|
mode: 511,
|
|
1608
|
-
fs: e
|
|
1608
|
+
fs: e,
|
|
1609
1609
|
...r
|
|
1610
1610
|
};
|
|
1611
1611
|
else if (typeof r == "number") r = {
|
|
1612
1612
|
mode: r,
|
|
1613
|
-
fs: e
|
|
1613
|
+
fs: e
|
|
1614
1614
|
};
|
|
1615
1615
|
else if (typeof r == "string") r = {
|
|
1616
1616
|
mode: parseInt(r, 8),
|
|
1617
|
-
fs: e
|
|
1617
|
+
fs: e
|
|
1618
1618
|
};
|
|
1619
1619
|
else throw new TypeError("invalid options argument");
|
|
1620
|
-
return r.mkdir = r.mkdir || r.fs.mkdir || e
|
|
1620
|
+
return r.mkdir = r.mkdir || r.fs.mkdir || e.mkdir, r.mkdirAsync = n(r.mkdir), r.stat = r.stat || r.fs.stat || e.stat, r.statAsync = n(r.stat), r.statSync = r.statSync || r.fs.statSync || e.statSync, r.mkdirSync = r.mkdirSync || r.fs.mkdirSync || e.mkdirSync, r;
|
|
1621
1621
|
}, i$2;
|
|
1622
1622
|
}
|
|
1623
1623
|
var e$1, t$1;
|
|
1624
1624
|
function u$2() {
|
|
1625
1625
|
if (t$1) return e$1;
|
|
1626
1626
|
t$1 = 1;
|
|
1627
|
-
const s
|
|
1627
|
+
const s = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform, { resolve: o, parse: n } = node_path.default;
|
|
1628
1628
|
return e$1 = (r) => {
|
|
1629
1629
|
if (/\0/.test(r)) throw Object.assign(/* @__PURE__ */ new TypeError("path must be a string without null bytes"), {
|
|
1630
1630
|
path: r,
|
|
1631
1631
|
code: "ERR_INVALID_ARG_VALUE"
|
|
1632
1632
|
});
|
|
1633
|
-
if (r = o
|
|
1634
|
-
const i
|
|
1635
|
-
if (i
|
|
1633
|
+
if (r = o(r), s === "win32") {
|
|
1634
|
+
const i = /[*|"<>?:]/, { root: a } = n(r);
|
|
1635
|
+
if (i.test(r.substr(a.length))) throw Object.assign(/* @__PURE__ */ new Error("Illegal characters in path."), {
|
|
1636
1636
|
path: r,
|
|
1637
1637
|
code: "EINVAL"
|
|
1638
1638
|
});
|
|
@@ -1644,59 +1644,59 @@ var i$1, c$2;
|
|
|
1644
1644
|
function t() {
|
|
1645
1645
|
if (c$2) return i$1;
|
|
1646
1646
|
c$2 = 1;
|
|
1647
|
-
const { dirname: u
|
|
1648
|
-
if (n
|
|
1649
|
-
return r.statSync(e
|
|
1647
|
+
const { dirname: u } = node_path.default, f = (r, e, n = void 0) => n === e ? Promise.resolve() : r.statAsync(e).then((d) => d.isDirectory() ? n : void 0, (d) => d.code === "ENOENT" ? f(r, u(e), e) : void 0), o = (r, e, n = void 0) => {
|
|
1648
|
+
if (n !== e) try {
|
|
1649
|
+
return r.statSync(e).isDirectory() ? n : void 0;
|
|
1650
1650
|
} catch (d) {
|
|
1651
|
-
return d.code === "ENOENT" ? o
|
|
1651
|
+
return d.code === "ENOENT" ? o(r, u(e), e) : void 0;
|
|
1652
1652
|
}
|
|
1653
1653
|
};
|
|
1654
1654
|
return i$1 = {
|
|
1655
|
-
findMade: f
|
|
1656
|
-
findMadeSync: o
|
|
1655
|
+
findMade: f,
|
|
1656
|
+
findMadeSync: o
|
|
1657
1657
|
}, i$1;
|
|
1658
1658
|
}
|
|
1659
1659
|
var o$3, a$4;
|
|
1660
1660
|
function y$2() {
|
|
1661
1661
|
if (a$4) return o$3;
|
|
1662
1662
|
a$4 = 1;
|
|
1663
|
-
const { dirname: f
|
|
1664
|
-
e
|
|
1665
|
-
const i
|
|
1666
|
-
return i
|
|
1663
|
+
const { dirname: f } = node_path.default, t = (n, e, c) => {
|
|
1664
|
+
e.recursive = false;
|
|
1665
|
+
const i = f(n);
|
|
1666
|
+
return i === n ? e.mkdirAsync(n, e).catch((r) => {
|
|
1667
1667
|
if (r.code !== "EISDIR") throw r;
|
|
1668
|
-
}) : e
|
|
1669
|
-
if (r.code === "ENOENT") return t
|
|
1668
|
+
}) : e.mkdirAsync(n, e).then(() => c || n, (r) => {
|
|
1669
|
+
if (r.code === "ENOENT") return t(i, e).then((u) => t(n, e, u));
|
|
1670
1670
|
if (r.code !== "EEXIST" && r.code !== "EROFS") throw r;
|
|
1671
|
-
return e
|
|
1672
|
-
if (u
|
|
1671
|
+
return e.statAsync(n).then((u) => {
|
|
1672
|
+
if (u.isDirectory()) return c;
|
|
1673
1673
|
throw r;
|
|
1674
1674
|
}, () => {
|
|
1675
1675
|
throw r;
|
|
1676
1676
|
});
|
|
1677
1677
|
});
|
|
1678
|
-
}, d = (n
|
|
1679
|
-
const i
|
|
1680
|
-
if (e
|
|
1681
|
-
return e
|
|
1678
|
+
}, d = (n, e, c) => {
|
|
1679
|
+
const i = f(n);
|
|
1680
|
+
if (e.recursive = false, i === n) try {
|
|
1681
|
+
return e.mkdirSync(n, e);
|
|
1682
1682
|
} catch (r) {
|
|
1683
1683
|
if (r.code !== "EISDIR") throw r;
|
|
1684
1684
|
return;
|
|
1685
1685
|
}
|
|
1686
1686
|
try {
|
|
1687
|
-
return e
|
|
1687
|
+
return e.mkdirSync(n, e), c || n;
|
|
1688
1688
|
} catch (r) {
|
|
1689
|
-
if (r.code === "ENOENT") return d(n
|
|
1689
|
+
if (r.code === "ENOENT") return d(n, e, d(i, e, c));
|
|
1690
1690
|
if (r.code !== "EEXIST" && r.code !== "EROFS") throw r;
|
|
1691
1691
|
try {
|
|
1692
|
-
if (!e
|
|
1692
|
+
if (!e.statSync(n).isDirectory()) throw r;
|
|
1693
1693
|
} catch {
|
|
1694
1694
|
throw r;
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
};
|
|
1698
1698
|
return o$3 = {
|
|
1699
|
-
mkdirpManual: t
|
|
1699
|
+
mkdirpManual: t,
|
|
1700
1700
|
mkdirpManualSync: d
|
|
1701
1701
|
}, o$3;
|
|
1702
1702
|
}
|
|
@@ -1704,20 +1704,20 @@ var c$1, m$1;
|
|
|
1704
1704
|
function s$3() {
|
|
1705
1705
|
if (m$1) return c$1;
|
|
1706
1706
|
m$1 = 1;
|
|
1707
|
-
const { dirname: u
|
|
1707
|
+
const { dirname: u } = node_path.default, { findMade: d, findMadeSync: t$1 } = t(), { mkdirpManual: a, mkdirpManualSync: k } = y$2();
|
|
1708
1708
|
return c$1 = {
|
|
1709
|
-
mkdirpNative: (e
|
|
1710
|
-
if (i
|
|
1711
|
-
throw i
|
|
1709
|
+
mkdirpNative: (e, r) => (r.recursive = true, u(e) === e ? r.mkdirAsync(e, r) : d(r, e).then((n) => r.mkdirAsync(e, r).then(() => n).catch((i) => {
|
|
1710
|
+
if (i.code === "ENOENT") return a(e, r);
|
|
1711
|
+
throw i;
|
|
1712
1712
|
}))),
|
|
1713
|
-
mkdirpNativeSync: (e
|
|
1714
|
-
if (r.recursive = true, u
|
|
1715
|
-
const n
|
|
1713
|
+
mkdirpNativeSync: (e, r) => {
|
|
1714
|
+
if (r.recursive = true, u(e) === e) return r.mkdirSync(e, r);
|
|
1715
|
+
const n = t$1(r, e);
|
|
1716
1716
|
try {
|
|
1717
|
-
return r.mkdirSync(e
|
|
1718
|
-
} catch (i
|
|
1719
|
-
if (i
|
|
1720
|
-
throw i
|
|
1717
|
+
return r.mkdirSync(e, r), n;
|
|
1718
|
+
} catch (i) {
|
|
1719
|
+
if (i.code === "ENOENT") return k(e, r);
|
|
1720
|
+
throw i;
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
1723
|
}, c$1;
|
|
@@ -1726,261 +1726,261 @@ var s$2, n$1;
|
|
|
1726
1726
|
function a$3() {
|
|
1727
1727
|
if (n$1) return s$2;
|
|
1728
1728
|
n$1 = 1;
|
|
1729
|
-
const i
|
|
1729
|
+
const i = node_fs.default, e = (process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version).replace(/^v/, "").split("."), t = +e[0] > 10 || +e[0] == 10 && +e[1] >= 12;
|
|
1730
1730
|
return s$2 = {
|
|
1731
|
-
useNative: t
|
|
1732
|
-
useNativeSync: t
|
|
1731
|
+
useNative: t ? (r) => r.mkdir === i.mkdir : () => false,
|
|
1732
|
+
useNativeSync: t ? (r) => r.mkdirSync === i.mkdirSync : () => false
|
|
1733
1733
|
}, s$2;
|
|
1734
1734
|
}
|
|
1735
1735
|
var m, s$1;
|
|
1736
1736
|
function S() {
|
|
1737
1737
|
if (s$1) return m;
|
|
1738
1738
|
s$1 = 1;
|
|
1739
|
-
const i
|
|
1740
|
-
return n
|
|
1739
|
+
const i = t$2(), u = u$2(), { mkdirpNative: a, mkdirpNativeSync: c } = s$3(), { mkdirpManual: o, mkdirpManualSync: q } = y$2(), { useNative: t, useNativeSync: _ } = a$3(), n = (e, r) => (e = u(e), r = i(r), t(r) ? a(e, r) : o(e, r)), d = (e, r) => (e = u(e), r = i(r), _(r) ? c(e, r) : q(e, r));
|
|
1740
|
+
return n.sync = d, n.native = (e, r) => a(u(e), i(r)), n.manual = (e, r) => o(u(e), i(r)), n.nativeSync = (e, r) => c(u(e), i(r)), n.manualSync = (e, r) => q(u(e), i(r)), m = n, m;
|
|
1741
1741
|
}
|
|
1742
1742
|
var y$1, O;
|
|
1743
1743
|
function F$1() {
|
|
1744
1744
|
if (O) return y$1;
|
|
1745
1745
|
O = 1;
|
|
1746
|
-
const c
|
|
1746
|
+
const c = node_fs.default, a = node_path.default, T = c.lchown ? "lchown" : "chown", I = c.lchownSync ? "lchownSync" : "chownSync", i = c.lchown && !process.version.match(/v1[1-9]+\./) && !process.version.match(/v10\.[6-9]/), u = (r, e, n) => {
|
|
1747
1747
|
try {
|
|
1748
|
-
return c
|
|
1749
|
-
} catch (t
|
|
1750
|
-
if (t
|
|
1748
|
+
return c[I](r, e, n);
|
|
1749
|
+
} catch (t) {
|
|
1750
|
+
if (t.code !== "ENOENT") throw t;
|
|
1751
1751
|
}
|
|
1752
|
-
}, D = (r, e
|
|
1752
|
+
}, D = (r, e, n) => {
|
|
1753
1753
|
try {
|
|
1754
|
-
return c
|
|
1755
|
-
} catch (t
|
|
1756
|
-
if (t
|
|
1754
|
+
return c.chownSync(r, e, n);
|
|
1755
|
+
} catch (t) {
|
|
1756
|
+
if (t.code !== "ENOENT") throw t;
|
|
1757
1757
|
}
|
|
1758
|
-
}, _
|
|
1759
|
-
!o
|
|
1760
|
-
} : (r, e
|
|
1758
|
+
}, _ = i ? (r, e, n, t) => (o) => {
|
|
1759
|
+
!o || o.code !== "EISDIR" ? t(o) : c.chown(r, e, n, t);
|
|
1760
|
+
} : (r, e, n, t) => t, w = i ? (r, e, n) => {
|
|
1761
1761
|
try {
|
|
1762
|
-
return u
|
|
1763
|
-
} catch (t
|
|
1764
|
-
if (t
|
|
1765
|
-
D(r, e
|
|
1766
|
-
}
|
|
1767
|
-
} : (r, e
|
|
1768
|
-
let N = (r, e
|
|
1769
|
-
/^v4\./.test(R
|
|
1770
|
-
const h = (r, e
|
|
1771
|
-
c
|
|
1772
|
-
t
|
|
1762
|
+
return u(r, e, n);
|
|
1763
|
+
} catch (t) {
|
|
1764
|
+
if (t.code !== "EISDIR") throw t;
|
|
1765
|
+
D(r, e, n);
|
|
1766
|
+
}
|
|
1767
|
+
} : (r, e, n) => u(r, e, n), R = process.version;
|
|
1768
|
+
let N = (r, e, n) => c.readdir(r, e, n), q = (r, e) => c.readdirSync(r, e);
|
|
1769
|
+
/^v4\./.test(R) && (N = (r, e, n) => c.readdir(r, n));
|
|
1770
|
+
const h = (r, e, n, t) => {
|
|
1771
|
+
c[T](r, e, n, _(r, e, n, (o) => {
|
|
1772
|
+
t(o && o.code !== "ENOENT" ? o : null);
|
|
1773
1773
|
}));
|
|
1774
|
-
}, S
|
|
1775
|
-
if (typeof e
|
|
1776
|
-
if (s
|
|
1777
|
-
f
|
|
1774
|
+
}, S = (r, e, n, t, o) => {
|
|
1775
|
+
if (typeof e == "string") return c.lstat(a.resolve(r, e), (s, f) => {
|
|
1776
|
+
if (s) return o(s.code !== "ENOENT" ? s : null);
|
|
1777
|
+
f.name = e, S(r, f, n, t, o);
|
|
1778
1778
|
});
|
|
1779
|
-
if (e
|
|
1780
|
-
if (s
|
|
1781
|
-
h(a
|
|
1779
|
+
if (e.isDirectory()) E(a.resolve(r, e.name), n, t, (s) => {
|
|
1780
|
+
if (s) return o(s);
|
|
1781
|
+
h(a.resolve(r, e.name), n, t, o);
|
|
1782
1782
|
});
|
|
1783
|
-
else h(a
|
|
1784
|
-
}, E
|
|
1785
|
-
N(r, { withFileTypes: true }, (o
|
|
1786
|
-
if (o
|
|
1787
|
-
if (o
|
|
1788
|
-
if (o
|
|
1783
|
+
else h(a.resolve(r, e.name), n, t, o);
|
|
1784
|
+
}, E = (r, e, n, t) => {
|
|
1785
|
+
N(r, { withFileTypes: true }, (o, s) => {
|
|
1786
|
+
if (o) {
|
|
1787
|
+
if (o.code === "ENOENT") return t();
|
|
1788
|
+
if (o.code !== "ENOTDIR" && o.code !== "ENOTSUP") return t(o);
|
|
1789
1789
|
}
|
|
1790
|
-
if (o
|
|
1791
|
-
let f
|
|
1792
|
-
const H
|
|
1793
|
-
if (!v
|
|
1794
|
-
if (l
|
|
1795
|
-
if (--f
|
|
1790
|
+
if (o || !s.length) return h(r, e, n, t);
|
|
1791
|
+
let f = s.length, v = null;
|
|
1792
|
+
const H = (l) => {
|
|
1793
|
+
if (!v) {
|
|
1794
|
+
if (l) return t(v = l);
|
|
1795
|
+
if (--f === 0) return h(r, e, n, t);
|
|
1796
1796
|
}
|
|
1797
1797
|
};
|
|
1798
|
-
s
|
|
1798
|
+
s.forEach((l) => S(r, l, e, n, H));
|
|
1799
1799
|
});
|
|
1800
|
-
}, C
|
|
1801
|
-
if (typeof e
|
|
1802
|
-
const o
|
|
1803
|
-
o
|
|
1804
|
-
} catch (o
|
|
1805
|
-
if (o
|
|
1806
|
-
throw o
|
|
1807
|
-
}
|
|
1808
|
-
e
|
|
1809
|
-
}, m
|
|
1810
|
-
let t
|
|
1800
|
+
}, C = (r, e, n, t) => {
|
|
1801
|
+
if (typeof e == "string") try {
|
|
1802
|
+
const o = c.lstatSync(a.resolve(r, e));
|
|
1803
|
+
o.name = e, e = o;
|
|
1804
|
+
} catch (o) {
|
|
1805
|
+
if (o.code === "ENOENT") return;
|
|
1806
|
+
throw o;
|
|
1807
|
+
}
|
|
1808
|
+
e.isDirectory() && m(a.resolve(r, e.name), n, t), w(a.resolve(r, e.name), n, t);
|
|
1809
|
+
}, m = (r, e, n) => {
|
|
1810
|
+
let t;
|
|
1811
1811
|
try {
|
|
1812
|
-
t
|
|
1813
|
-
} catch (o
|
|
1814
|
-
if (o
|
|
1815
|
-
if (o
|
|
1816
|
-
throw o
|
|
1812
|
+
t = q(r, { withFileTypes: !0 });
|
|
1813
|
+
} catch (o) {
|
|
1814
|
+
if (o.code === "ENOENT") return;
|
|
1815
|
+
if (o.code === "ENOTDIR" || o.code === "ENOTSUP") return w(r, e, n);
|
|
1816
|
+
throw o;
|
|
1817
1817
|
}
|
|
1818
|
-
return t
|
|
1818
|
+
return t && t.length && t.forEach((o) => C(r, o, e, n)), w(r, e, n);
|
|
1819
1819
|
};
|
|
1820
|
-
return y$1 = E
|
|
1820
|
+
return y$1 = E, E.sync = m, y$1;
|
|
1821
1821
|
}
|
|
1822
1822
|
var R;
|
|
1823
1823
|
function H() {
|
|
1824
1824
|
if (R) return r$1.exports;
|
|
1825
1825
|
R = 1;
|
|
1826
|
-
const g = S(), l
|
|
1826
|
+
const g = S(), l = node_fs.default, p = node_path.default, x = F$1(), y = a$7();
|
|
1827
1827
|
class D extends Error {
|
|
1828
|
-
constructor(e
|
|
1829
|
-
super("Cannot extract through symbolic link"), this.path = s
|
|
1828
|
+
constructor(e, s) {
|
|
1829
|
+
super("Cannot extract through symbolic link"), this.path = s, this.symlink = e;
|
|
1830
1830
|
}
|
|
1831
1831
|
get name() {
|
|
1832
1832
|
return "SylinkError";
|
|
1833
1833
|
}
|
|
1834
1834
|
}
|
|
1835
|
-
class E
|
|
1836
|
-
constructor(e
|
|
1837
|
-
super(s
|
|
1835
|
+
class E extends Error {
|
|
1836
|
+
constructor(e, s) {
|
|
1837
|
+
super(s + ": Cannot cd into '" + e + "'"), this.path = e, this.code = s;
|
|
1838
1838
|
}
|
|
1839
1839
|
get name() {
|
|
1840
1840
|
return "CwdError";
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
|
-
const v
|
|
1844
|
-
l
|
|
1845
|
-
(s
|
|
1843
|
+
const v = (n, e) => n.get(y(e)), q = (n, e, s) => n.set(y(e), s), I = (n, e) => {
|
|
1844
|
+
l.stat(n, (s, r) => {
|
|
1845
|
+
(s || !r.isDirectory()) && (s = new E(n, s && s.code || "ENOTDIR")), e(s);
|
|
1846
1846
|
});
|
|
1847
1847
|
};
|
|
1848
|
-
r$1.exports = (n
|
|
1849
|
-
n
|
|
1850
|
-
const r = e
|
|
1851
|
-
k
|
|
1848
|
+
r$1.exports = (n, e, s) => {
|
|
1849
|
+
n = y(n);
|
|
1850
|
+
const r = e.umask, c = e.mode | 448, f = (c & r) !== 0, t = e.uid, i = e.gid, a = typeof t == "number" && typeof i == "number" && (t !== e.processUid || i !== e.processGid), u = e.preserve, m = e.unlink, h = e.cache, d = y(e.cwd), w = (k, o) => {
|
|
1851
|
+
k ? s(k) : (q(h, n, true), o && a ? x(o, t, i, (G) => w(G)) : f ? l.chmod(n, c, s) : s());
|
|
1852
1852
|
};
|
|
1853
|
-
if (h && v
|
|
1854
|
-
if (n
|
|
1855
|
-
if (u
|
|
1856
|
-
C
|
|
1853
|
+
if (h && v(h, n) === true) return w();
|
|
1854
|
+
if (n === d) return I(n, w);
|
|
1855
|
+
if (u) return g(n, { mode: c }).then((k) => w(null, k), w);
|
|
1856
|
+
C(d, y(p.relative(d, n)).split("/"), c, h, m, d, null, w);
|
|
1857
1857
|
};
|
|
1858
|
-
const C
|
|
1859
|
-
if (!e
|
|
1860
|
-
const a
|
|
1861
|
-
if (v
|
|
1862
|
-
l
|
|
1863
|
-
}, j
|
|
1864
|
-
a
|
|
1865
|
-
if (u
|
|
1866
|
-
else if (m
|
|
1867
|
-
else if (c
|
|
1868
|
-
if (h) return i
|
|
1869
|
-
l
|
|
1858
|
+
const C = (n, e, s, r, c, f, t, i) => {
|
|
1859
|
+
if (!e.length) return i(null, t);
|
|
1860
|
+
const a = e.shift(), u = y(p.resolve(n + "/" + a));
|
|
1861
|
+
if (v(r, u)) return C(u, e, s, r, c, f, t, i);
|
|
1862
|
+
l.mkdir(u, s, j(u, e, s, r, c, f, t, i));
|
|
1863
|
+
}, j = (n, e, s, r, c, f, t, i) => (a) => {
|
|
1864
|
+
a ? l.lstat(n, (u, m) => {
|
|
1865
|
+
if (u) u.path = u.path && y(u.path), i(u);
|
|
1866
|
+
else if (m.isDirectory()) C(n, e, s, r, c, f, t, i);
|
|
1867
|
+
else if (c) l.unlink(n, (h) => {
|
|
1868
|
+
if (h) return i(h);
|
|
1869
|
+
l.mkdir(n, s, j(n, e, s, r, c, f, t, i));
|
|
1870
1870
|
});
|
|
1871
1871
|
else {
|
|
1872
|
-
if (m
|
|
1873
|
-
i
|
|
1872
|
+
if (m.isSymbolicLink()) return i(new D(n, n + "/" + e.join("/")));
|
|
1873
|
+
i(a);
|
|
1874
1874
|
}
|
|
1875
|
-
}) : (t
|
|
1876
|
-
}, L = (n
|
|
1877
|
-
let e
|
|
1875
|
+
}) : (t = t || n, C(n, e, s, r, c, f, t, i));
|
|
1876
|
+
}, L = (n) => {
|
|
1877
|
+
let e = false, s = "ENOTDIR";
|
|
1878
1878
|
try {
|
|
1879
|
-
e
|
|
1879
|
+
e = l.statSync(n).isDirectory();
|
|
1880
1880
|
} catch (r) {
|
|
1881
|
-
s
|
|
1881
|
+
s = r.code;
|
|
1882
1882
|
} finally {
|
|
1883
|
-
if (!e
|
|
1883
|
+
if (!e) throw new E(n, s);
|
|
1884
1884
|
}
|
|
1885
1885
|
};
|
|
1886
|
-
return r$1.exports.sync = (n
|
|
1887
|
-
n
|
|
1888
|
-
const s
|
|
1889
|
-
q
|
|
1886
|
+
return r$1.exports.sync = (n, e) => {
|
|
1887
|
+
n = y(n);
|
|
1888
|
+
const s = e.umask, r = e.mode | 448, c = (r & s) !== 0, f = e.uid, t = e.gid, i = typeof f == "number" && typeof t == "number" && (f !== e.processUid || t !== e.processGid), a = e.preserve, u = e.unlink, m = e.cache, h = y(e.cwd), d = (k) => {
|
|
1889
|
+
q(m, n, true), k && i && x.sync(k, f, t), c && l.chmodSync(n, r);
|
|
1890
1890
|
};
|
|
1891
|
-
if (m
|
|
1892
|
-
if (n
|
|
1893
|
-
if (a
|
|
1894
|
-
const $ = y
|
|
1895
|
-
let S
|
|
1896
|
-
for (let k
|
|
1897
|
-
l
|
|
1891
|
+
if (m && v(m, n) === true) return d();
|
|
1892
|
+
if (n === h) return L(h), d();
|
|
1893
|
+
if (a) return d(g.sync(n, r));
|
|
1894
|
+
const $ = y(p.relative(h, n)).split("/");
|
|
1895
|
+
let S = null;
|
|
1896
|
+
for (let k = $.shift(), o = h; k && (o += "/" + k); k = $.shift()) if (o = y(p.resolve(o)), !v(m, o)) try {
|
|
1897
|
+
l.mkdirSync(o, r), S = S || o, q(m, o, !0);
|
|
1898
1898
|
} catch {
|
|
1899
|
-
const M = l
|
|
1899
|
+
const M = l.lstatSync(o);
|
|
1900
1900
|
if (M.isDirectory()) {
|
|
1901
|
-
q
|
|
1901
|
+
q(m, o, true);
|
|
1902
1902
|
continue;
|
|
1903
|
-
} else if (u
|
|
1904
|
-
l
|
|
1903
|
+
} else if (u) {
|
|
1904
|
+
l.unlinkSync(o), l.mkdirSync(o, r), S = S || o, q(m, o, true);
|
|
1905
1905
|
continue;
|
|
1906
|
-
} else if (M.isSymbolicLink()) return new D(o
|
|
1906
|
+
} else if (M.isSymbolicLink()) return new D(o, o + "/" + $.join("/"));
|
|
1907
1907
|
}
|
|
1908
|
-
return d(S
|
|
1908
|
+
return d(S);
|
|
1909
1909
|
}, r$1.exports;
|
|
1910
1910
|
}
|
|
1911
1911
|
var a$2, i;
|
|
1912
1912
|
function p() {
|
|
1913
1913
|
if (i) return a$2;
|
|
1914
1914
|
i = 1;
|
|
1915
|
-
const o
|
|
1915
|
+
const o = [
|
|
1916
1916
|
"|",
|
|
1917
1917
|
"<",
|
|
1918
1918
|
">",
|
|
1919
1919
|
"?",
|
|
1920
1920
|
":"
|
|
1921
|
-
], t
|
|
1921
|
+
], t = o.map((e) => String.fromCharCode(61440 + e.charCodeAt(0))), s = new Map(o.map((e, r) => [e, t[r]])), c = new Map(t.map((e, r) => [e, o[r]]));
|
|
1922
1922
|
return a$2 = {
|
|
1923
|
-
encode: (e
|
|
1924
|
-
decode: (e
|
|
1923
|
+
encode: (e) => o.reduce((r, n) => r.split(n).join(s.get(n)), e),
|
|
1924
|
+
decode: (e) => t.reduce((r, n) => r.split(n).join(c.get(n)), e)
|
|
1925
1925
|
}, a$2;
|
|
1926
1926
|
}
|
|
1927
1927
|
var o$2, n;
|
|
1928
1928
|
function a$1() {
|
|
1929
1929
|
if (n) return o$2;
|
|
1930
1930
|
n = 1;
|
|
1931
|
-
const r = Object.create(null), { hasOwnProperty: i
|
|
1932
|
-
return o$2 = (e
|
|
1931
|
+
const r = Object.create(null), { hasOwnProperty: i } = Object.prototype;
|
|
1932
|
+
return o$2 = (e) => (i.call(r, e) || (r[e] = e.normalize("NFD")), r[e]), o$2;
|
|
1933
1933
|
}
|
|
1934
1934
|
var a, l;
|
|
1935
1935
|
function s() {
|
|
1936
1936
|
return l || (l = 1, a = (r) => {
|
|
1937
|
-
let e
|
|
1938
|
-
for (; e
|
|
1939
|
-
return i
|
|
1937
|
+
let e = r.length - 1, i = -1;
|
|
1938
|
+
for (; e > -1 && r.charAt(e) === "/";) i = e, e--;
|
|
1939
|
+
return i === -1 ? r : r.slice(0, i);
|
|
1940
1940
|
}), a;
|
|
1941
1941
|
}
|
|
1942
1942
|
var u$1, f$1;
|
|
1943
1943
|
function z() {
|
|
1944
1944
|
if (f$1) return u$1;
|
|
1945
1945
|
f$1 = 1;
|
|
1946
|
-
const l
|
|
1946
|
+
const l = node_assert.default, m = a$1(), g = s(), { join: d } = node_path.default, q = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
1947
1947
|
return u$1 = () => {
|
|
1948
|
-
const i
|
|
1949
|
-
const s
|
|
1950
|
-
if (!s
|
|
1948
|
+
const i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), v = (e) => e.split("/").slice(0, -1).reduce((o, r) => (o.length && (r = d(o[o.length - 1], r)), o.push(r || "/"), o), []), a = /* @__PURE__ */ new Set(), w = (e) => {
|
|
1949
|
+
const s = c.get(e);
|
|
1950
|
+
if (!s) throw new Error("function does not have any path reservations");
|
|
1951
1951
|
return {
|
|
1952
|
-
paths: s
|
|
1953
|
-
dirs: [...s
|
|
1952
|
+
paths: s.paths.map((o) => i.get(o)),
|
|
1953
|
+
dirs: [...s.dirs].map((o) => i.get(o))
|
|
1954
1954
|
};
|
|
1955
|
-
}, h = (e
|
|
1956
|
-
const { paths: s
|
|
1957
|
-
return s
|
|
1958
|
-
}, p
|
|
1959
|
-
if (!a
|
|
1960
|
-
const { paths: s
|
|
1961
|
-
return s
|
|
1962
|
-
const n
|
|
1963
|
-
l
|
|
1964
|
-
}), o
|
|
1965
|
-
const n
|
|
1966
|
-
l
|
|
1967
|
-
}), a
|
|
1955
|
+
}, h = (e) => {
|
|
1956
|
+
const { paths: s, dirs: o } = w(e);
|
|
1957
|
+
return s.every((r) => r[0] === e) && o.every((r) => r[0] instanceof Set && r[0].has(e));
|
|
1958
|
+
}, p = (e) => a.has(e) || !h(e) ? false : (a.add(e), e(() => S(e)), true), S = (e) => {
|
|
1959
|
+
if (!a.has(e)) return false;
|
|
1960
|
+
const { paths: s, dirs: o } = c.get(e), r = /* @__PURE__ */ new Set();
|
|
1961
|
+
return s.forEach((t) => {
|
|
1962
|
+
const n = i.get(t);
|
|
1963
|
+
l.equal(n[0], e), n.length === 1 ? i.delete(t) : (n.shift(), typeof n[0] == "function" ? r.add(n[0]) : n[0].forEach((E) => r.add(E)));
|
|
1964
|
+
}), o.forEach((t) => {
|
|
1965
|
+
const n = i.get(t);
|
|
1966
|
+
l(n[0] instanceof Set), n[0].size === 1 && n.length === 1 ? i.delete(t) : n[0].size === 1 ? (n.shift(), r.add(n[0])) : n[0].delete(e);
|
|
1967
|
+
}), a.delete(e), r.forEach((t) => p(t)), true;
|
|
1968
1968
|
};
|
|
1969
1969
|
return {
|
|
1970
1970
|
check: h,
|
|
1971
|
-
reserve: (e
|
|
1972
|
-
e
|
|
1973
|
-
const o
|
|
1974
|
-
return c
|
|
1975
|
-
dirs: o
|
|
1976
|
-
paths: e
|
|
1977
|
-
}), e
|
|
1978
|
-
const t
|
|
1979
|
-
t
|
|
1980
|
-
}), o
|
|
1981
|
-
const t
|
|
1982
|
-
t
|
|
1983
|
-
}), p
|
|
1971
|
+
reserve: (e, s) => {
|
|
1972
|
+
e = q ? ["win32 parallelization disabled"] : e.map((r) => g(d(m(r))).toLowerCase());
|
|
1973
|
+
const o = new Set(e.map((r) => v(r)).reduce((r, t) => r.concat(t)));
|
|
1974
|
+
return c.set(s, {
|
|
1975
|
+
dirs: o,
|
|
1976
|
+
paths: e
|
|
1977
|
+
}), e.forEach((r) => {
|
|
1978
|
+
const t = i.get(r);
|
|
1979
|
+
t ? t.push(s) : i.set(r, [s]);
|
|
1980
|
+
}), o.forEach((r) => {
|
|
1981
|
+
const t = i.get(r);
|
|
1982
|
+
t ? t[t.length - 1] instanceof Set ? t[t.length - 1].add(s) : t.push(new Set([s])) : i.set(r, [new Set([s])]);
|
|
1983
|
+
}), p(s);
|
|
1984
1984
|
}
|
|
1985
1985
|
};
|
|
1986
1986
|
}, u$1;
|
|
@@ -1989,128 +1989,125 @@ var o$1, u;
|
|
|
1989
1989
|
function c() {
|
|
1990
1990
|
if (u) return o$1;
|
|
1991
1991
|
u = 1;
|
|
1992
|
-
const { isAbsolute: l
|
|
1992
|
+
const { isAbsolute: l, parse: t } = node_path.default.win32;
|
|
1993
1993
|
return o$1 = (r) => {
|
|
1994
|
-
let s
|
|
1995
|
-
for (; l
|
|
1996
|
-
const i
|
|
1997
|
-
r = r.slice(i
|
|
1994
|
+
let s = "", e = t(r);
|
|
1995
|
+
for (; l(r) || e.root;) {
|
|
1996
|
+
const i = r.charAt(0) === "/" && r.slice(0, 4) !== "//?/" ? "/" : e.root;
|
|
1997
|
+
r = r.slice(i.length), s += i, e = t(r);
|
|
1998
1998
|
}
|
|
1999
|
-
return [s
|
|
1999
|
+
return [s, r];
|
|
2000
2000
|
}, o$1;
|
|
2001
2001
|
}
|
|
2002
2002
|
var e, o;
|
|
2003
2003
|
function F() {
|
|
2004
2004
|
if (o) return e;
|
|
2005
2005
|
o = 1;
|
|
2006
|
-
const t
|
|
2007
|
-
return e = c
|
|
2006
|
+
const t = process.env.__FAKE_PLATFORM__ || process.platform, s = typeof Bun < "u" ? false : t === "win32", { O_CREAT: _, O_TRUNC: a, O_WRONLY: i, UV_FS_O_FILEMAP: r = 0 } = (commonjsGlobal.__FAKE_TESTING_FS__ || node_fs.default).constants, c = s && !!r, f = 512 * 1024, p = r | a | _ | i;
|
|
2007
|
+
return e = c ? (l) => l < f ? p : "w" : () => "w", e;
|
|
2008
2008
|
}
|
|
2009
2009
|
var G, y;
|
|
2010
2010
|
function Os() {
|
|
2011
2011
|
if (y) return G;
|
|
2012
2012
|
y = 1;
|
|
2013
|
-
const ss = node_assert.default, is = rt(), r = node_fs.default, es = X(), w
|
|
2014
|
-
if (!C
|
|
2015
|
-
const i
|
|
2016
|
-
r.rename(a
|
|
2017
|
-
if (e
|
|
2018
|
-
r.unlink(i
|
|
2013
|
+
const ss = node_assert.default, is = rt(), r = node_fs.default, es = X(), w = node_path.default, M = H(), K = p(), ts = z(), os = c(), l = a$7(), rs = s(), hs = a$1(), H$1 = Symbol("onEntry"), q = Symbol("checkFs"), Y = Symbol("checkFs2"), v = Symbol("pruneCache"), N = Symbol("isReusable"), d = Symbol("makeFs"), U = Symbol("file"), F$1 = Symbol("directory"), O = Symbol("link"), B = Symbol("symlink"), z$1 = Symbol("hardlink"), W = Symbol("unsupported"), j = Symbol("checkPath"), b = Symbol("mkdir"), m = Symbol("onError"), $ = Symbol("pending"), V$1 = Symbol("pend"), S = Symbol("unpend"), P = Symbol("ended"), A = Symbol("maybeClose"), x = Symbol("skip"), E = Symbol("doChown"), R = Symbol("uid"), _ = Symbol("gid"), g = Symbol("checkedCwd"), X$1 = node_crypto.default, J = F(), C = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32", cs = 1024, as = (a, s) => {
|
|
2014
|
+
if (!C) return r.unlink(a, s);
|
|
2015
|
+
const i = a + ".DELETE." + X$1.randomBytes(16).toString("hex");
|
|
2016
|
+
r.rename(a, i, (e) => {
|
|
2017
|
+
if (e) return s(e);
|
|
2018
|
+
r.unlink(i, s);
|
|
2019
2019
|
});
|
|
2020
|
-
}, us = (a
|
|
2021
|
-
if (!C
|
|
2022
|
-
const s
|
|
2023
|
-
r.renameSync(a
|
|
2024
|
-
}, Q = (a
|
|
2025
|
-
s
|
|
2026
|
-
for (const i
|
|
2027
|
-
const e
|
|
2028
|
-
(e
|
|
2029
|
-
}
|
|
2030
|
-
}, ms = (a
|
|
2031
|
-
for (const s
|
|
2020
|
+
}, us = (a) => {
|
|
2021
|
+
if (!C) return r.unlinkSync(a);
|
|
2022
|
+
const s = a + ".DELETE." + X$1.randomBytes(16).toString("hex");
|
|
2023
|
+
r.renameSync(a, s), r.unlinkSync(s);
|
|
2024
|
+
}, Q = (a, s, i) => a === a >>> 0 ? a : s === s >>> 0 ? s : i, Z = (a) => rs(l(hs(a))).toLowerCase(), ns = (a, s) => {
|
|
2025
|
+
s = Z(s);
|
|
2026
|
+
for (const i of a.keys()) {
|
|
2027
|
+
const e = Z(i);
|
|
2028
|
+
(e === s || e.indexOf(s + "/") === 0) && a.delete(i);
|
|
2029
|
+
}
|
|
2030
|
+
}, ms = (a) => {
|
|
2031
|
+
for (const s of a.keys()) a.delete(s);
|
|
2032
2032
|
};
|
|
2033
2033
|
class L extends is {
|
|
2034
|
-
constructor(s
|
|
2035
|
-
if (s
|
|
2036
|
-
this[P
|
|
2037
|
-
}, super(s
|
|
2038
|
-
if (typeof s
|
|
2039
|
-
if (s
|
|
2040
|
-
this.uid = s
|
|
2034
|
+
constructor(s) {
|
|
2035
|
+
if (s || (s = {}), s.ondone = (i) => {
|
|
2036
|
+
this[P] = true, this[A]();
|
|
2037
|
+
}, super(s), this[g] = false, this.reservations = ts(), this.transform = typeof s.transform == "function" ? s.transform : null, this.writable = true, this.readable = false, this[$] = 0, this[P] = false, this.dirCache = s.dirCache || /* @__PURE__ */ new Map(), typeof s.uid == "number" || typeof s.gid == "number") {
|
|
2038
|
+
if (typeof s.uid != "number" || typeof s.gid != "number") throw new TypeError("cannot set owner without number uid and gid");
|
|
2039
|
+
if (s.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
2040
|
+
this.uid = s.uid, this.gid = s.gid, this.setOwner = true;
|
|
2041
2041
|
} else this.uid = null, this.gid = null, this.setOwner = false;
|
|
2042
|
-
s
|
|
2042
|
+
s.preserveOwner === void 0 && typeof s.uid != "number" ? this.preserveOwner = process.getuid && process.getuid() === 0 : this.preserveOwner = !!s.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : null, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : null, this.maxDepth = typeof s.maxDepth == "number" ? s.maxDepth : cs, this.forceChown = s.forceChown === true, this.win32 = !!s.win32 || C, this.newer = !!s.newer, this.keep = !!s.keep, this.noMtime = !!s.noMtime, this.preservePaths = !!s.preservePaths, this.unlink = !!s.unlink, this.cwd = l(w.resolve(s.cwd || process.cwd())), this.strip = +s.strip || 0, this.processUmask = s.noChmod ? 0 : process.umask(), this.umask = typeof s.umask == "number" ? s.umask : this.processUmask, this.dmode = s.dmode || 511 & ~this.umask, this.fmode = s.fmode || 438 & ~this.umask, this.on("entry", (i) => this[H$1](i));
|
|
2043
2043
|
}
|
|
2044
|
-
warn(s
|
|
2045
|
-
return (s
|
|
2044
|
+
warn(s, i, e = {}) {
|
|
2045
|
+
return (s === "TAR_BAD_ARCHIVE" || s === "TAR_ABORT") && (e.recoverable = false), super.warn(s, i, e);
|
|
2046
2046
|
}
|
|
2047
2047
|
[A]() {
|
|
2048
|
-
this[P
|
|
2048
|
+
this[P] && this[$] === 0 && (this.emit("prefinish"), this.emit("finish"), this.emit("end"));
|
|
2049
2049
|
}
|
|
2050
|
-
[j
|
|
2051
|
-
const i
|
|
2050
|
+
[j](s) {
|
|
2051
|
+
const i = l(s.path), e = i.split("/");
|
|
2052
2052
|
if (this.strip) {
|
|
2053
|
-
if (e
|
|
2054
|
-
if (s
|
|
2055
|
-
const t
|
|
2056
|
-
if (t
|
|
2053
|
+
if (e.length < this.strip) return false;
|
|
2054
|
+
if (s.type === "Link") {
|
|
2055
|
+
const t = l(s.linkpath).split("/");
|
|
2056
|
+
if (t.length >= this.strip) s.linkpath = t.slice(this.strip).join("/");
|
|
2057
2057
|
else return false;
|
|
2058
2058
|
}
|
|
2059
|
-
e
|
|
2059
|
+
e.splice(0, this.strip), s.path = e.join("/");
|
|
2060
2060
|
}
|
|
2061
|
-
if (isFinite(this.maxDepth) && e
|
|
2062
|
-
entry: s
|
|
2063
|
-
path: i
|
|
2064
|
-
depth: e
|
|
2061
|
+
if (isFinite(this.maxDepth) && e.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", {
|
|
2062
|
+
entry: s,
|
|
2063
|
+
path: i,
|
|
2064
|
+
depth: e.length,
|
|
2065
2065
|
maxDepth: this.maxDepth
|
|
2066
2066
|
}), false;
|
|
2067
2067
|
if (!this.preservePaths) {
|
|
2068
|
-
if (e
|
|
2069
|
-
entry: s
|
|
2070
|
-
path: i
|
|
2068
|
+
if (e.includes("..") || C && /^[a-z]:\.\.$/i.test(e[0])) return this.warn("TAR_ENTRY_ERROR", "path contains '..'", {
|
|
2069
|
+
entry: s,
|
|
2070
|
+
path: i
|
|
2071
2071
|
}), false;
|
|
2072
|
-
const [t
|
|
2073
|
-
t
|
|
2074
|
-
entry: s
|
|
2075
|
-
path: i
|
|
2072
|
+
const [t, o] = os(i);
|
|
2073
|
+
t && (s.path = o, this.warn("TAR_ENTRY_INFO", `stripping ${t} from absolute path`, {
|
|
2074
|
+
entry: s,
|
|
2075
|
+
path: i
|
|
2076
2076
|
}));
|
|
2077
2077
|
}
|
|
2078
|
-
if (w
|
|
2079
|
-
entry: s
|
|
2080
|
-
path: l
|
|
2081
|
-
resolvedPath: s
|
|
2078
|
+
if (w.isAbsolute(s.path) ? s.absolute = l(w.resolve(s.path)) : s.absolute = l(w.resolve(this.cwd, s.path)), !this.preservePaths && s.absolute.indexOf(this.cwd + "/") !== 0 && s.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
2079
|
+
entry: s,
|
|
2080
|
+
path: l(s.path),
|
|
2081
|
+
resolvedPath: s.absolute,
|
|
2082
2082
|
cwd: this.cwd
|
|
2083
2083
|
}), false;
|
|
2084
|
-
if (s
|
|
2084
|
+
if (s.absolute === this.cwd && s.type !== "Directory" && s.type !== "GNUDumpDir") return false;
|
|
2085
2085
|
if (this.win32) {
|
|
2086
|
-
const { root: t
|
|
2087
|
-
s
|
|
2088
|
-
const { root: o
|
|
2089
|
-
s
|
|
2086
|
+
const { root: t } = w.win32.parse(s.absolute);
|
|
2087
|
+
s.absolute = t + K.encode(s.absolute.slice(t.length));
|
|
2088
|
+
const { root: o } = w.win32.parse(s.path);
|
|
2089
|
+
s.path = o + K.encode(s.path.slice(o.length));
|
|
2090
2090
|
}
|
|
2091
2091
|
return true;
|
|
2092
2092
|
}
|
|
2093
|
-
[H$1
|
|
2094
|
-
if (!this[j
|
|
2095
|
-
switch (ss.equal(typeof s
|
|
2093
|
+
[H$1](s) {
|
|
2094
|
+
if (!this[j](s)) return s.resume();
|
|
2095
|
+
switch (ss.equal(typeof s.absolute, "string"), s.type) {
|
|
2096
2096
|
case "Directory":
|
|
2097
|
-
case "GNUDumpDir": s
|
|
2097
|
+
case "GNUDumpDir": s.mode && (s.mode = s.mode | 448);
|
|
2098
2098
|
case "File":
|
|
2099
2099
|
case "OldFile":
|
|
2100
2100
|
case "ContiguousFile":
|
|
2101
2101
|
case "Link":
|
|
2102
|
-
case "SymbolicLink": return this[q
|
|
2103
|
-
|
|
2104
|
-
case "BlockDevice":
|
|
2105
|
-
case "FIFO":
|
|
2106
|
-
default: return this[W](s$7);
|
|
2102
|
+
case "SymbolicLink": return this[q](s);
|
|
2103
|
+
default: return this[W](s);
|
|
2107
2104
|
}
|
|
2108
2105
|
}
|
|
2109
|
-
[m
|
|
2110
|
-
s
|
|
2106
|
+
[m](s, i) {
|
|
2107
|
+
s.name === "CwdError" ? this.emit("error", s) : (this.warn("TAR_ENTRY_ERROR", s, { entry: i }), this[S](), i.resume());
|
|
2111
2108
|
}
|
|
2112
|
-
[b](s
|
|
2113
|
-
M(l
|
|
2109
|
+
[b](s, i, e) {
|
|
2110
|
+
M(l(s), {
|
|
2114
2111
|
uid: this.uid,
|
|
2115
2112
|
gid: this.gid,
|
|
2116
2113
|
processUid: this.processUid,
|
|
@@ -2120,275 +2117,275 @@ function Os() {
|
|
|
2120
2117
|
unlink: this.unlink,
|
|
2121
2118
|
cache: this.dirCache,
|
|
2122
2119
|
cwd: this.cwd,
|
|
2123
|
-
mode: i
|
|
2120
|
+
mode: i,
|
|
2124
2121
|
noChmod: this.noChmod
|
|
2125
|
-
}, e
|
|
2122
|
+
}, e);
|
|
2126
2123
|
}
|
|
2127
|
-
[E
|
|
2128
|
-
return this.forceChown || this.preserveOwner && (typeof s
|
|
2124
|
+
[E](s) {
|
|
2125
|
+
return this.forceChown || this.preserveOwner && (typeof s.uid == "number" && s.uid !== this.processUid || typeof s.gid == "number" && s.gid !== this.processGid) || typeof this.uid == "number" && this.uid !== this.processUid || typeof this.gid == "number" && this.gid !== this.processGid;
|
|
2129
2126
|
}
|
|
2130
|
-
[R
|
|
2131
|
-
return Q(this.uid, s
|
|
2127
|
+
[R](s) {
|
|
2128
|
+
return Q(this.uid, s.uid, this.processUid);
|
|
2132
2129
|
}
|
|
2133
|
-
[_
|
|
2134
|
-
return Q(this.gid, s
|
|
2130
|
+
[_](s) {
|
|
2131
|
+
return Q(this.gid, s.gid, this.processGid);
|
|
2135
2132
|
}
|
|
2136
|
-
[U](s
|
|
2137
|
-
const e
|
|
2138
|
-
flags: J
|
|
2139
|
-
mode: e
|
|
2133
|
+
[U](s, i) {
|
|
2134
|
+
const e = s.mode & 4095 || this.fmode, t = new es.WriteStream(s.absolute, {
|
|
2135
|
+
flags: J(s.size),
|
|
2136
|
+
mode: e,
|
|
2140
2137
|
autoClose: false
|
|
2141
2138
|
});
|
|
2142
|
-
t
|
|
2143
|
-
t
|
|
2139
|
+
t.on("error", (c) => {
|
|
2140
|
+
t.fd && r.close(t.fd, () => {}), t.write = () => true, this[m](c, s), i();
|
|
2144
2141
|
});
|
|
2145
|
-
let o
|
|
2146
|
-
const u
|
|
2147
|
-
if (c
|
|
2148
|
-
t
|
|
2142
|
+
let o = 1;
|
|
2143
|
+
const u = (c) => {
|
|
2144
|
+
if (c) {
|
|
2145
|
+
t.fd && r.close(t.fd, () => {}), this[m](c, s), i();
|
|
2149
2146
|
return;
|
|
2150
2147
|
}
|
|
2151
|
-
--o
|
|
2152
|
-
n
|
|
2148
|
+
--o === 0 && r.close(t.fd, (n) => {
|
|
2149
|
+
n ? this[m](n, s) : this[S](), i();
|
|
2153
2150
|
});
|
|
2154
2151
|
};
|
|
2155
|
-
t
|
|
2156
|
-
const n
|
|
2157
|
-
if (s
|
|
2158
|
-
o
|
|
2159
|
-
const f
|
|
2160
|
-
r.futimes(p
|
|
2152
|
+
t.on("finish", (c) => {
|
|
2153
|
+
const n = s.absolute, p = t.fd;
|
|
2154
|
+
if (s.mtime && !this.noMtime) {
|
|
2155
|
+
o++;
|
|
2156
|
+
const f = s.atime || /* @__PURE__ */ new Date(), k = s.mtime;
|
|
2157
|
+
r.futimes(p, f, k, (D) => D ? r.utimes(n, f, k, (I) => u(I && D)) : u());
|
|
2161
2158
|
}
|
|
2162
|
-
if (this[E
|
|
2163
|
-
o
|
|
2164
|
-
const f
|
|
2165
|
-
r.fchown(p
|
|
2159
|
+
if (this[E](s)) {
|
|
2160
|
+
o++;
|
|
2161
|
+
const f = this[R](s), k = this[_](s);
|
|
2162
|
+
r.fchown(p, f, k, (D) => D ? r.chown(n, f, k, (I) => u(I && D)) : u());
|
|
2166
2163
|
}
|
|
2167
|
-
u
|
|
2164
|
+
u();
|
|
2168
2165
|
});
|
|
2169
|
-
const h = this.transform && this.transform(s
|
|
2170
|
-
h !== s
|
|
2171
|
-
this[m
|
|
2172
|
-
}), s
|
|
2173
|
-
}
|
|
2174
|
-
[F$1
|
|
2175
|
-
const e
|
|
2176
|
-
this[b](s
|
|
2177
|
-
if (t
|
|
2178
|
-
this[m
|
|
2166
|
+
const h = this.transform && this.transform(s) || s;
|
|
2167
|
+
h !== s && (h.on("error", (c) => {
|
|
2168
|
+
this[m](c, s), i();
|
|
2169
|
+
}), s.pipe(h)), h.pipe(t);
|
|
2170
|
+
}
|
|
2171
|
+
[F$1](s, i) {
|
|
2172
|
+
const e = s.mode & 4095 || this.dmode;
|
|
2173
|
+
this[b](s.absolute, e, (t) => {
|
|
2174
|
+
if (t) {
|
|
2175
|
+
this[m](t, s), i();
|
|
2179
2176
|
return;
|
|
2180
2177
|
}
|
|
2181
|
-
let o
|
|
2182
|
-
const u
|
|
2183
|
-
--o
|
|
2178
|
+
let o = 1;
|
|
2179
|
+
const u = (h) => {
|
|
2180
|
+
--o === 0 && (i(), this[S](), s.resume());
|
|
2184
2181
|
};
|
|
2185
|
-
s
|
|
2182
|
+
s.mtime && !this.noMtime && (o++, r.utimes(s.absolute, s.atime || /* @__PURE__ */ new Date(), s.mtime, u)), this[E](s) && (o++, r.chown(s.absolute, this[R](s), this[_](s), u)), u();
|
|
2186
2183
|
});
|
|
2187
2184
|
}
|
|
2188
|
-
[W](s
|
|
2189
|
-
s
|
|
2185
|
+
[W](s) {
|
|
2186
|
+
s.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${s.type}`, { entry: s }), s.resume();
|
|
2190
2187
|
}
|
|
2191
|
-
[B](s
|
|
2192
|
-
this[O
|
|
2188
|
+
[B](s, i) {
|
|
2189
|
+
this[O](s, s.linkpath, "symlink", i);
|
|
2193
2190
|
}
|
|
2194
|
-
[z$1](s
|
|
2195
|
-
const e
|
|
2196
|
-
this[O
|
|
2191
|
+
[z$1](s, i) {
|
|
2192
|
+
const e = l(w.resolve(this.cwd, s.linkpath));
|
|
2193
|
+
this[O](s, e, "link", i);
|
|
2197
2194
|
}
|
|
2198
2195
|
[V$1]() {
|
|
2199
2196
|
this[$]++;
|
|
2200
2197
|
}
|
|
2201
|
-
[S
|
|
2198
|
+
[S]() {
|
|
2202
2199
|
this[$]--, this[A]();
|
|
2203
2200
|
}
|
|
2204
|
-
[x](s
|
|
2205
|
-
this[S
|
|
2201
|
+
[x](s) {
|
|
2202
|
+
this[S](), s.resume();
|
|
2206
2203
|
}
|
|
2207
|
-
[N](s
|
|
2208
|
-
return s
|
|
2204
|
+
[N](s, i) {
|
|
2205
|
+
return s.type === "File" && !this.unlink && i.isFile() && i.nlink <= 1 && !C;
|
|
2209
2206
|
}
|
|
2210
|
-
[q
|
|
2207
|
+
[q](s) {
|
|
2211
2208
|
this[V$1]();
|
|
2212
|
-
const i
|
|
2213
|
-
s
|
|
2209
|
+
const i = [s.path];
|
|
2210
|
+
s.linkpath && i.push(s.linkpath), this.reservations.reserve(i, (e) => this[Y](s, e));
|
|
2214
2211
|
}
|
|
2215
|
-
[v
|
|
2216
|
-
s
|
|
2212
|
+
[v](s) {
|
|
2213
|
+
s.type === "SymbolicLink" ? ms(this.dirCache) : s.type !== "Directory" && ns(this.dirCache, s.absolute);
|
|
2217
2214
|
}
|
|
2218
|
-
[Y](s
|
|
2219
|
-
this[v
|
|
2220
|
-
const e
|
|
2221
|
-
this[v
|
|
2222
|
-
}, t
|
|
2215
|
+
[Y](s, i) {
|
|
2216
|
+
this[v](s);
|
|
2217
|
+
const e = (h) => {
|
|
2218
|
+
this[v](s), i(h);
|
|
2219
|
+
}, t = () => {
|
|
2223
2220
|
this[b](this.cwd, this.dmode, (h) => {
|
|
2224
2221
|
if (h) {
|
|
2225
|
-
this[m
|
|
2222
|
+
this[m](h, s), e();
|
|
2226
2223
|
return;
|
|
2227
2224
|
}
|
|
2228
|
-
this[g] = true, o
|
|
2225
|
+
this[g] = true, o();
|
|
2229
2226
|
});
|
|
2230
|
-
}, o
|
|
2231
|
-
if (s
|
|
2232
|
-
const h = l
|
|
2233
|
-
if (h !== this.cwd) return this[b](h, this.dmode, (c
|
|
2234
|
-
if (c
|
|
2235
|
-
this[m
|
|
2227
|
+
}, o = () => {
|
|
2228
|
+
if (s.absolute !== this.cwd) {
|
|
2229
|
+
const h = l(w.dirname(s.absolute));
|
|
2230
|
+
if (h !== this.cwd) return this[b](h, this.dmode, (c) => {
|
|
2231
|
+
if (c) {
|
|
2232
|
+
this[m](c, s), e();
|
|
2236
2233
|
return;
|
|
2237
2234
|
}
|
|
2238
|
-
u
|
|
2235
|
+
u();
|
|
2239
2236
|
});
|
|
2240
2237
|
}
|
|
2241
|
-
u
|
|
2242
|
-
}, u
|
|
2243
|
-
r.lstat(s
|
|
2244
|
-
if (c
|
|
2245
|
-
this[x](s
|
|
2238
|
+
u();
|
|
2239
|
+
}, u = () => {
|
|
2240
|
+
r.lstat(s.absolute, (h, c) => {
|
|
2241
|
+
if (c && (this.keep || this.newer && c.mtime > s.mtime)) {
|
|
2242
|
+
this[x](s), e();
|
|
2246
2243
|
return;
|
|
2247
2244
|
}
|
|
2248
|
-
if (h || this[N](s
|
|
2249
|
-
if (c
|
|
2250
|
-
if (s
|
|
2251
|
-
const n
|
|
2252
|
-
return n
|
|
2245
|
+
if (h || this[N](s, c)) return this[d](null, s, e);
|
|
2246
|
+
if (c.isDirectory()) {
|
|
2247
|
+
if (s.type === "Directory") {
|
|
2248
|
+
const n = !this.noChmod && s.mode && (c.mode & 4095) !== s.mode, p = (f) => this[d](f, s, e);
|
|
2249
|
+
return n ? r.chmod(s.absolute, s.mode, p) : p();
|
|
2253
2250
|
}
|
|
2254
|
-
if (s
|
|
2251
|
+
if (s.absolute !== this.cwd) return r.rmdir(s.absolute, (n) => this[d](n, s, e));
|
|
2255
2252
|
}
|
|
2256
|
-
if (s
|
|
2257
|
-
as(s
|
|
2253
|
+
if (s.absolute === this.cwd) return this[d](null, s, e);
|
|
2254
|
+
as(s.absolute, (n) => this[d](n, s, e));
|
|
2258
2255
|
});
|
|
2259
2256
|
};
|
|
2260
|
-
this[g] ? o
|
|
2257
|
+
this[g] ? o() : t();
|
|
2261
2258
|
}
|
|
2262
|
-
[d](s
|
|
2263
|
-
if (s
|
|
2264
|
-
this[m
|
|
2259
|
+
[d](s, i, e) {
|
|
2260
|
+
if (s) {
|
|
2261
|
+
this[m](s, i), e();
|
|
2265
2262
|
return;
|
|
2266
2263
|
}
|
|
2267
|
-
switch (i
|
|
2264
|
+
switch (i.type) {
|
|
2268
2265
|
case "File":
|
|
2269
2266
|
case "OldFile":
|
|
2270
|
-
case "ContiguousFile": return this[U](i
|
|
2271
|
-
case "Link": return this[z$1](i
|
|
2272
|
-
case "SymbolicLink": return this[B](i
|
|
2267
|
+
case "ContiguousFile": return this[U](i, e);
|
|
2268
|
+
case "Link": return this[z$1](i, e);
|
|
2269
|
+
case "SymbolicLink": return this[B](i, e);
|
|
2273
2270
|
case "Directory":
|
|
2274
|
-
case "GNUDumpDir": return this[F$1
|
|
2271
|
+
case "GNUDumpDir": return this[F$1](i, e);
|
|
2275
2272
|
}
|
|
2276
2273
|
}
|
|
2277
|
-
[O
|
|
2278
|
-
r[e
|
|
2279
|
-
o
|
|
2274
|
+
[O](s, i, e, t) {
|
|
2275
|
+
r[e](i, s.absolute, (o) => {
|
|
2276
|
+
o ? this[m](o, s) : (this[S](), s.resume()), t();
|
|
2280
2277
|
});
|
|
2281
2278
|
}
|
|
2282
2279
|
}
|
|
2283
|
-
const T
|
|
2280
|
+
const T = (a) => {
|
|
2284
2281
|
try {
|
|
2285
|
-
return [null, a
|
|
2286
|
-
} catch (s
|
|
2287
|
-
return [s
|
|
2282
|
+
return [null, a()];
|
|
2283
|
+
} catch (s) {
|
|
2284
|
+
return [s, null];
|
|
2288
2285
|
}
|
|
2289
2286
|
};
|
|
2290
2287
|
class ls extends L {
|
|
2291
|
-
[d](s
|
|
2292
|
-
return super[d](s
|
|
2288
|
+
[d](s, i) {
|
|
2289
|
+
return super[d](s, i, () => {});
|
|
2293
2290
|
}
|
|
2294
|
-
[q
|
|
2295
|
-
if (this[v
|
|
2296
|
-
const o
|
|
2297
|
-
if (o
|
|
2291
|
+
[q](s) {
|
|
2292
|
+
if (this[v](s), !this[g]) {
|
|
2293
|
+
const o = this[b](this.cwd, this.dmode);
|
|
2294
|
+
if (o) return this[m](o, s);
|
|
2298
2295
|
this[g] = true;
|
|
2299
2296
|
}
|
|
2300
|
-
if (s
|
|
2301
|
-
const o
|
|
2302
|
-
if (o
|
|
2303
|
-
const u
|
|
2304
|
-
if (u
|
|
2297
|
+
if (s.absolute !== this.cwd) {
|
|
2298
|
+
const o = l(w.dirname(s.absolute));
|
|
2299
|
+
if (o !== this.cwd) {
|
|
2300
|
+
const u = this[b](o, this.dmode);
|
|
2301
|
+
if (u) return this[m](u, s);
|
|
2305
2302
|
}
|
|
2306
2303
|
}
|
|
2307
|
-
const [i
|
|
2308
|
-
if (e
|
|
2309
|
-
if (i
|
|
2310
|
-
if (e
|
|
2311
|
-
if (s
|
|
2312
|
-
const [h] = !this.noChmod && s
|
|
2313
|
-
r.chmodSync(s
|
|
2304
|
+
const [i, e] = T(() => r.lstatSync(s.absolute));
|
|
2305
|
+
if (e && (this.keep || this.newer && e.mtime > s.mtime)) return this[x](s);
|
|
2306
|
+
if (i || this[N](s, e)) return this[d](null, s);
|
|
2307
|
+
if (e.isDirectory()) {
|
|
2308
|
+
if (s.type === "Directory") {
|
|
2309
|
+
const [h] = !this.noChmod && s.mode && (e.mode & 4095) !== s.mode ? T(() => {
|
|
2310
|
+
r.chmodSync(s.absolute, s.mode);
|
|
2314
2311
|
}) : [];
|
|
2315
|
-
return this[d](h, s
|
|
2312
|
+
return this[d](h, s);
|
|
2316
2313
|
}
|
|
2317
|
-
const [o
|
|
2318
|
-
this[d](o
|
|
2314
|
+
const [o] = T(() => r.rmdirSync(s.absolute));
|
|
2315
|
+
this[d](o, s);
|
|
2319
2316
|
}
|
|
2320
|
-
const [t
|
|
2321
|
-
this[d](t
|
|
2317
|
+
const [t] = s.absolute === this.cwd ? [] : T(() => us(s.absolute));
|
|
2318
|
+
this[d](t, s);
|
|
2322
2319
|
}
|
|
2323
|
-
[U](s
|
|
2324
|
-
const e
|
|
2325
|
-
let c
|
|
2320
|
+
[U](s, i) {
|
|
2321
|
+
const e = s.mode & 4095 || this.fmode, t = (h) => {
|
|
2322
|
+
let c;
|
|
2326
2323
|
try {
|
|
2327
|
-
r.closeSync(o
|
|
2328
|
-
} catch (n
|
|
2329
|
-
c
|
|
2324
|
+
r.closeSync(o);
|
|
2325
|
+
} catch (n) {
|
|
2326
|
+
c = n;
|
|
2330
2327
|
}
|
|
2331
|
-
(h || c
|
|
2328
|
+
(h || c) && this[m](h || c, s), i();
|
|
2332
2329
|
};
|
|
2333
|
-
let o
|
|
2330
|
+
let o;
|
|
2334
2331
|
try {
|
|
2335
|
-
o
|
|
2332
|
+
o = r.openSync(s.absolute, J(s.size), e);
|
|
2336
2333
|
} catch (h) {
|
|
2337
|
-
return t
|
|
2334
|
+
return t(h);
|
|
2338
2335
|
}
|
|
2339
|
-
const u
|
|
2340
|
-
u
|
|
2336
|
+
const u = this.transform && this.transform(s) || s;
|
|
2337
|
+
u !== s && (u.on("error", (h) => this[m](h, s)), s.pipe(u)), u.on("data", (h) => {
|
|
2341
2338
|
try {
|
|
2342
|
-
r.writeSync(o
|
|
2343
|
-
} catch (c
|
|
2344
|
-
t
|
|
2339
|
+
r.writeSync(o, h, 0, h.length);
|
|
2340
|
+
} catch (c) {
|
|
2341
|
+
t(c);
|
|
2345
2342
|
}
|
|
2346
|
-
}), u
|
|
2347
|
-
let c
|
|
2348
|
-
if (s
|
|
2349
|
-
const n
|
|
2343
|
+
}), u.on("end", (h) => {
|
|
2344
|
+
let c = null;
|
|
2345
|
+
if (s.mtime && !this.noMtime) {
|
|
2346
|
+
const n = s.atime || /* @__PURE__ */ new Date(), p = s.mtime;
|
|
2350
2347
|
try {
|
|
2351
|
-
r.futimesSync(o
|
|
2352
|
-
} catch (f
|
|
2348
|
+
r.futimesSync(o, n, p);
|
|
2349
|
+
} catch (f) {
|
|
2353
2350
|
try {
|
|
2354
|
-
r.utimesSync(s
|
|
2351
|
+
r.utimesSync(s.absolute, n, p);
|
|
2355
2352
|
} catch {
|
|
2356
|
-
c
|
|
2353
|
+
c = f;
|
|
2357
2354
|
}
|
|
2358
2355
|
}
|
|
2359
2356
|
}
|
|
2360
|
-
if (this[E
|
|
2361
|
-
const n
|
|
2357
|
+
if (this[E](s)) {
|
|
2358
|
+
const n = this[R](s), p = this[_](s);
|
|
2362
2359
|
try {
|
|
2363
|
-
r.fchownSync(o
|
|
2364
|
-
} catch (f
|
|
2360
|
+
r.fchownSync(o, n, p);
|
|
2361
|
+
} catch (f) {
|
|
2365
2362
|
try {
|
|
2366
|
-
r.chownSync(s
|
|
2363
|
+
r.chownSync(s.absolute, n, p);
|
|
2367
2364
|
} catch {
|
|
2368
|
-
c
|
|
2365
|
+
c = c || f;
|
|
2369
2366
|
}
|
|
2370
2367
|
}
|
|
2371
2368
|
}
|
|
2372
|
-
t
|
|
2369
|
+
t(c);
|
|
2373
2370
|
});
|
|
2374
2371
|
}
|
|
2375
|
-
[F$1
|
|
2376
|
-
const e
|
|
2377
|
-
if (t
|
|
2378
|
-
this[m
|
|
2372
|
+
[F$1](s, i) {
|
|
2373
|
+
const e = s.mode & 4095 || this.dmode, t = this[b](s.absolute, e);
|
|
2374
|
+
if (t) {
|
|
2375
|
+
this[m](t, s), i();
|
|
2379
2376
|
return;
|
|
2380
2377
|
}
|
|
2381
|
-
if (s
|
|
2382
|
-
r.utimesSync(s
|
|
2378
|
+
if (s.mtime && !this.noMtime) try {
|
|
2379
|
+
r.utimesSync(s.absolute, s.atime || /* @__PURE__ */ new Date(), s.mtime);
|
|
2383
2380
|
} catch {}
|
|
2384
|
-
if (this[E
|
|
2385
|
-
r.chownSync(s
|
|
2381
|
+
if (this[E](s)) try {
|
|
2382
|
+
r.chownSync(s.absolute, this[R](s), this[_](s));
|
|
2386
2383
|
} catch {}
|
|
2387
|
-
i
|
|
2384
|
+
i(), s.resume();
|
|
2388
2385
|
}
|
|
2389
|
-
[b](s
|
|
2386
|
+
[b](s, i) {
|
|
2390
2387
|
try {
|
|
2391
|
-
return M.sync(l
|
|
2388
|
+
return M.sync(l(s), {
|
|
2392
2389
|
uid: this.uid,
|
|
2393
2390
|
gid: this.gid,
|
|
2394
2391
|
processUid: this.processUid,
|
|
@@ -2398,17 +2395,17 @@ function Os() {
|
|
|
2398
2395
|
unlink: this.unlink,
|
|
2399
2396
|
cache: this.dirCache,
|
|
2400
2397
|
cwd: this.cwd,
|
|
2401
|
-
mode: i
|
|
2398
|
+
mode: i
|
|
2402
2399
|
});
|
|
2403
|
-
} catch (e
|
|
2404
|
-
return e
|
|
2400
|
+
} catch (e) {
|
|
2401
|
+
return e;
|
|
2405
2402
|
}
|
|
2406
2403
|
}
|
|
2407
|
-
[O
|
|
2404
|
+
[O](s, i, e, t) {
|
|
2408
2405
|
try {
|
|
2409
|
-
r[e
|
|
2410
|
-
} catch (o
|
|
2411
|
-
return this[m
|
|
2406
|
+
r[e + "Sync"](i, s.absolute), t(), s.resume();
|
|
2407
|
+
} catch (o) {
|
|
2408
|
+
return this[m](o, s);
|
|
2412
2409
|
}
|
|
2413
2410
|
}
|
|
2414
2411
|
}
|
|
@@ -2418,41 +2415,41 @@ var f, q;
|
|
|
2418
2415
|
function v() {
|
|
2419
2416
|
if (q) return f;
|
|
2420
2417
|
q = 1;
|
|
2421
|
-
const w
|
|
2422
|
-
f = (r, e
|
|
2423
|
-
typeof r == "function" ? (o
|
|
2424
|
-
const t
|
|
2425
|
-
if (t
|
|
2426
|
-
if (!t
|
|
2427
|
-
return e
|
|
2418
|
+
const w = s$6(), u = Os(), p = node_fs.default, y = X(), l = node_path.default, m = s();
|
|
2419
|
+
f = (r, e, o) => {
|
|
2420
|
+
typeof r == "function" ? (o = r, e = null, r = {}) : Array.isArray(r) && (e = r, r = {}), typeof e == "function" && (o = e, e = null), e ? e = Array.from(e) : e = [];
|
|
2421
|
+
const t = w(r);
|
|
2422
|
+
if (t.sync && typeof o == "function") throw new TypeError("callback not supported for sync tar functions");
|
|
2423
|
+
if (!t.file && typeof o == "function") throw new TypeError("callback only supported with file option");
|
|
2424
|
+
return e.length && d(t, e), t.file && t.sync ? $(t) : t.file ? h(t, o) : t.sync ? x(t) : z(t);
|
|
2428
2425
|
};
|
|
2429
|
-
const d = (r, e
|
|
2430
|
-
const o
|
|
2431
|
-
const a
|
|
2432
|
-
return o
|
|
2426
|
+
const d = (r, e) => {
|
|
2427
|
+
const o = new Map(e.map((n) => [m(n), true])), t = r.filter, s = (n, i) => {
|
|
2428
|
+
const a = i || l.parse(n).root || ".", c = n === a ? false : o.has(n) ? o.get(n) : s(l.dirname(n), a);
|
|
2429
|
+
return o.set(n, c), c;
|
|
2433
2430
|
};
|
|
2434
|
-
r.filter = t
|
|
2431
|
+
r.filter = t ? (n, i) => t(n, i) && s(m(n)) : (n) => s(m(n));
|
|
2435
2432
|
}, $ = (r) => {
|
|
2436
|
-
const e
|
|
2437
|
-
new y
|
|
2438
|
-
readSize: s
|
|
2439
|
-
size: t
|
|
2440
|
-
}).pipe(e
|
|
2441
|
-
}, h = (r, e
|
|
2442
|
-
const o
|
|
2443
|
-
o
|
|
2444
|
-
if (c
|
|
2433
|
+
const e = new u.Sync(r), o = r.file, t = p.statSync(o), s = r.maxReadSize || 16 * 1024 * 1024;
|
|
2434
|
+
new y.ReadStreamSync(o, {
|
|
2435
|
+
readSize: s,
|
|
2436
|
+
size: t.size
|
|
2437
|
+
}).pipe(e);
|
|
2438
|
+
}, h = (r, e) => {
|
|
2439
|
+
const o = new u(r), t = r.maxReadSize || 16 * 1024 * 1024, s = r.file, n = new Promise((i, a) => {
|
|
2440
|
+
o.on("error", a), o.on("close", i), p.stat(s, (c, R) => {
|
|
2441
|
+
if (c) a(c);
|
|
2445
2442
|
else {
|
|
2446
|
-
const S
|
|
2447
|
-
readSize: t
|
|
2448
|
-
size: R
|
|
2443
|
+
const S = new y.ReadStream(s, {
|
|
2444
|
+
readSize: t,
|
|
2445
|
+
size: R.size
|
|
2449
2446
|
});
|
|
2450
|
-
S
|
|
2447
|
+
S.on("error", a), S.pipe(o);
|
|
2451
2448
|
}
|
|
2452
2449
|
});
|
|
2453
2450
|
});
|
|
2454
|
-
return e
|
|
2455
|
-
}, x = (r) => new u
|
|
2451
|
+
return e ? n.then(e, e) : n;
|
|
2452
|
+
}, x = (r) => new u.Sync(r), z = (r) => new u(r);
|
|
2456
2453
|
return f;
|
|
2457
2454
|
}
|
|
2458
2455
|
const tarExtract = getDefaultExportFromCjs(v());
|
|
@@ -2473,11 +2470,11 @@ async function download(url, filePath, options = {}) {
|
|
|
2473
2470
|
}
|
|
2474
2471
|
const inputRegex = /^(?<repo>[\w.-]+\/[\w.-]+)(?<subdir>[^#]+)?(?<ref>#[\w./@-]+)?/;
|
|
2475
2472
|
function parseGitURI(input) {
|
|
2476
|
-
const m
|
|
2473
|
+
const m = input.match(inputRegex)?.groups || {};
|
|
2477
2474
|
return {
|
|
2478
|
-
repo: m
|
|
2479
|
-
subdir: m
|
|
2480
|
-
ref: m
|
|
2475
|
+
repo: m.repo,
|
|
2476
|
+
subdir: m.subdir || "/",
|
|
2477
|
+
ref: m.ref ? m.ref.slice(1) : "main"
|
|
2481
2478
|
};
|
|
2482
2479
|
}
|
|
2483
2480
|
function debug(...args) {
|
|
@@ -2623,7 +2620,7 @@ const registryProvider = (registryEndpoint = DEFAULT_REGISTRY, options = {}) =>
|
|
|
2623
2620
|
};
|
|
2624
2621
|
const sourceProtoRe = /^([\w-.]+):/;
|
|
2625
2622
|
async function downloadTemplate(input, options = {}) {
|
|
2626
|
-
options =
|
|
2623
|
+
options = (0, defu.defu)({
|
|
2627
2624
|
registry: process.env.GIGET_REGISTRY,
|
|
2628
2625
|
auth: process.env.GIGET_AUTH
|
|
2629
2626
|
}, options);
|
|
@@ -2667,7 +2664,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
2667
2664
|
});
|
|
2668
2665
|
if (!options.force && (0, node_fs.existsSync)(extractPath) && (0, node_fs.readdirSync)(extractPath).length > 0) throw new Error(`Destination ${extractPath} already exists.`);
|
|
2669
2666
|
await (0, node_fs_promises.mkdir)(extractPath, { recursive: true });
|
|
2670
|
-
const s
|
|
2667
|
+
const s = Date.now();
|
|
2671
2668
|
const subdir = template.subdir?.replace(/^\//, "") || "";
|
|
2672
2669
|
await tarExtract({
|
|
2673
2670
|
file: tarPath,
|
|
@@ -2678,7 +2675,7 @@ async function downloadTemplate(input, options = {}) {
|
|
|
2678
2675
|
else entry.path = "";
|
|
2679
2676
|
}
|
|
2680
2677
|
});
|
|
2681
|
-
debug(`Extracted to ${extractPath} in ${Date.now() - s
|
|
2678
|
+
debug(`Extracted to ${extractPath} in ${Date.now() - s}ms`);
|
|
2682
2679
|
if (options.install) {
|
|
2683
2680
|
debug("Installing dependencies...");
|
|
2684
2681
|
await require_index.installDependencies({
|