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