@kubb/agent 4.28.0 → 4.29.0
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/.output/nitro.json +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +382 -642
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +4 -6
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/index.mjs +4 -6
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@kubb/fabric-core/dist/{defaultParser-BD_N68Bo.js → defaultParser-C1atU7yU.js} +2 -3
- package/.output/server/node_modules/@kubb/fabric-core/dist/{getRelativePath-C4Au07ON.js → getRelativePath-BcieQL5M.js} +1 -2
- package/.output/server/node_modules/@kubb/fabric-core/dist/index.js +8 -9
- package/.output/server/node_modules/@kubb/fabric-core/dist/{Root-BQX3eHqb.js → onProcessExit-CF200hsz.js} +109 -190
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers/typescript.js +3 -4
- package/.output/server/node_modules/@kubb/fabric-core/dist/parsers.js +2 -3
- package/.output/server/node_modules/@kubb/fabric-core/dist/plugins.js +58 -298
- package/.output/server/node_modules/@kubb/fabric-core/package.json +8 -18
- package/.output/server/node_modules/@kubb/react-fabric/dist/{chunk-DbZtQ4qb.js → chunk-Cnw5r_-A.js} +1 -5
- package/.output/server/node_modules/@kubb/react-fabric/dist/index.js +39 -41
- package/.output/server/node_modules/@kubb/react-fabric/dist/{jsx-runtime-CQFBnRKx.js → jsx-runtime-Dm7PKVbc.js} +6 -24
- package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime.js +5 -4
- package/.output/server/node_modules/@kubb/react-fabric/dist/plugins.js +3 -3
- package/.output/server/node_modules/@kubb/react-fabric/dist/{react--draJ5Pm.js → react-D652OKii.js} +31 -91
- package/.output/server/node_modules/@kubb/react-fabric/dist/{reactPlugin-DqJsInTf.js → reactPlugin-BkDkx1cs.js} +410 -1650
- package/.output/server/node_modules/@kubb/react-fabric/package.json +8 -11
- package/.output/server/node_modules/empathic/access.js +39 -0
- package/.output/server/node_modules/empathic/access.mjs +34 -0
- package/.output/server/node_modules/empathic/find.js +81 -0
- package/.output/server/node_modules/empathic/find.mjs +76 -0
- package/.output/server/node_modules/empathic/package.json +49 -0
- package/.output/server/node_modules/empathic/package.mjs +52 -0
- package/.output/server/node_modules/empathic/resolve.js +31 -0
- package/.output/server/node_modules/empathic/resolve.mjs +27 -0
- package/.output/server/node_modules/empathic/walk.js +22 -0
- package/.output/server/node_modules/empathic/walk.mjs +20 -0
- package/.output/server/node_modules/tinyexec/dist/main.js +633 -0
- package/.output/server/node_modules/tinyexec/package.json +61 -0
- package/.output/server/package.json +6 -44
- package/package.json +19 -21
- package/.output/server/node_modules/.nitro/path-key@3.1.1/index.js +0 -16
- package/.output/server/node_modules/.nitro/path-key@3.1.1/package.json +0 -39
- package/.output/server/node_modules/.nitro/path-key@4.0.0/index.js +0 -12
- package/.output/server/node_modules/.nitro/path-key@4.0.0/package.json +0 -41
- package/.output/server/node_modules/.nitro/path-to-regexp@3.3.0/index.js +0 -421
- package/.output/server/node_modules/.nitro/path-to-regexp@3.3.0/package.json +0 -46
- package/.output/server/node_modules/@kubb/fabric-core/dist/chunk-BVHe6Par.js +0 -22
- package/.output/server/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js +0 -89
- package/.output/server/node_modules/@sec-ant/readable-stream/dist/ponyfill/fromAnyIterable.js +0 -34
- package/.output/server/node_modules/@sec-ant/readable-stream/dist/ponyfill/index.js +0 -6
- package/.output/server/node_modules/@sec-ant/readable-stream/package.json +0 -98
- package/.output/server/node_modules/@sindresorhus/merge-streams/index.js +0 -265
- package/.output/server/node_modules/@sindresorhus/merge-streams/package.json +0 -49
- package/.output/server/node_modules/balanced-match/index.js +0 -62
- package/.output/server/node_modules/balanced-match/package.json +0 -48
- package/.output/server/node_modules/brace-expansion/index.js +0 -201
- package/.output/server/node_modules/brace-expansion/package.json +0 -50
- package/.output/server/node_modules/bytes/index.js +0 -159
- package/.output/server/node_modules/bytes/package.json +0 -39
- package/.output/server/node_modules/concat-map/index.js +0 -13
- package/.output/server/node_modules/concat-map/package.json +0 -59
- package/.output/server/node_modules/content-disposition/index.js +0 -445
- package/.output/server/node_modules/content-disposition/package.json +0 -39
- package/.output/server/node_modules/cross-spawn/index.js +0 -39
- package/.output/server/node_modules/cross-spawn/lib/enoent.js +0 -59
- package/.output/server/node_modules/cross-spawn/lib/parse.js +0 -91
- package/.output/server/node_modules/cross-spawn/lib/util/escape.js +0 -47
- package/.output/server/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
- package/.output/server/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
- package/.output/server/node_modules/cross-spawn/package.json +0 -73
- package/.output/server/node_modules/execa/index.js +0 -28
- package/.output/server/node_modules/execa/lib/arguments/command.js +0 -20
- package/.output/server/node_modules/execa/lib/arguments/cwd.js +0 -39
- package/.output/server/node_modules/execa/lib/arguments/encoding-option.js +0 -50
- package/.output/server/node_modules/execa/lib/arguments/escape.js +0 -88
- package/.output/server/node_modules/execa/lib/arguments/fd-options.js +0 -108
- package/.output/server/node_modules/execa/lib/arguments/file-url.js +0 -25
- package/.output/server/node_modules/execa/lib/arguments/options.js +0 -96
- package/.output/server/node_modules/execa/lib/arguments/shell.js +0 -11
- package/.output/server/node_modules/execa/lib/arguments/specific.js +0 -111
- package/.output/server/node_modules/execa/lib/convert/add.js +0 -15
- package/.output/server/node_modules/execa/lib/convert/concurrent.js +0 -33
- package/.output/server/node_modules/execa/lib/convert/duplex.js +0 -69
- package/.output/server/node_modules/execa/lib/convert/iterable.js +0 -34
- package/.output/server/node_modules/execa/lib/convert/readable.js +0 -113
- package/.output/server/node_modules/execa/lib/convert/shared.js +0 -46
- package/.output/server/node_modules/execa/lib/convert/writable.js +0 -90
- package/.output/server/node_modules/execa/lib/io/contents.js +0 -116
- package/.output/server/node_modules/execa/lib/io/input-sync.js +0 -44
- package/.output/server/node_modules/execa/lib/io/iterate.js +0 -110
- package/.output/server/node_modules/execa/lib/io/max-buffer.js +0 -89
- package/.output/server/node_modules/execa/lib/io/output-async.js +0 -80
- package/.output/server/node_modules/execa/lib/io/output-sync.js +0 -135
- package/.output/server/node_modules/execa/lib/io/pipeline.js +0 -48
- package/.output/server/node_modules/execa/lib/io/strip-newline.js +0 -12
- package/.output/server/node_modules/execa/lib/ipc/array.js +0 -4
- package/.output/server/node_modules/execa/lib/ipc/buffer-messages.js +0 -47
- package/.output/server/node_modules/execa/lib/ipc/forward.js +0 -56
- package/.output/server/node_modules/execa/lib/ipc/get-each.js +0 -89
- package/.output/server/node_modules/execa/lib/ipc/get-one.js +0 -69
- package/.output/server/node_modules/execa/lib/ipc/graceful.js +0 -72
- package/.output/server/node_modules/execa/lib/ipc/incoming.js +0 -79
- package/.output/server/node_modules/execa/lib/ipc/ipc-input.js +0 -44
- package/.output/server/node_modules/execa/lib/ipc/methods.js +0 -49
- package/.output/server/node_modules/execa/lib/ipc/outgoing.js +0 -47
- package/.output/server/node_modules/execa/lib/ipc/reference.js +0 -44
- package/.output/server/node_modules/execa/lib/ipc/send.js +0 -91
- package/.output/server/node_modules/execa/lib/ipc/strict.js +0 -113
- package/.output/server/node_modules/execa/lib/ipc/validation.js +0 -111
- package/.output/server/node_modules/execa/lib/methods/bind.js +0 -23
- package/.output/server/node_modules/execa/lib/methods/command.js +0 -43
- package/.output/server/node_modules/execa/lib/methods/create.js +0 -65
- package/.output/server/node_modules/execa/lib/methods/main-async.js +0 -194
- package/.output/server/node_modules/execa/lib/methods/main-sync.js +0 -163
- package/.output/server/node_modules/execa/lib/methods/node.js +0 -51
- package/.output/server/node_modules/execa/lib/methods/parameters.js +0 -31
- package/.output/server/node_modules/execa/lib/methods/promise.js +0 -15
- package/.output/server/node_modules/execa/lib/methods/script.js +0 -22
- package/.output/server/node_modules/execa/lib/methods/template.js +0 -153
- package/.output/server/node_modules/execa/lib/pipe/abort.js +0 -20
- package/.output/server/node_modules/execa/lib/pipe/pipe-arguments.js +0 -91
- package/.output/server/node_modules/execa/lib/pipe/sequence.js +0 -24
- package/.output/server/node_modules/execa/lib/pipe/setup.js +0 -72
- package/.output/server/node_modules/execa/lib/pipe/streaming.js +0 -51
- package/.output/server/node_modules/execa/lib/pipe/throw.js +0 -58
- package/.output/server/node_modules/execa/lib/resolve/all-async.js +0 -46
- package/.output/server/node_modules/execa/lib/resolve/all-sync.js +0 -33
- package/.output/server/node_modules/execa/lib/resolve/exit-async.js +0 -54
- package/.output/server/node_modules/execa/lib/resolve/exit-sync.js +0 -25
- package/.output/server/node_modules/execa/lib/resolve/stdio.js +0 -47
- package/.output/server/node_modules/execa/lib/resolve/wait-stream.js +0 -96
- package/.output/server/node_modules/execa/lib/resolve/wait-subprocess.js +0 -146
- package/.output/server/node_modules/execa/lib/return/duration.js +0 -8
- package/.output/server/node_modules/execa/lib/return/early-error.js +0 -60
- package/.output/server/node_modules/execa/lib/return/final-error.js +0 -40
- package/.output/server/node_modules/execa/lib/return/message.js +0 -157
- package/.output/server/node_modules/execa/lib/return/reject.js +0 -13
- package/.output/server/node_modules/execa/lib/return/result.js +0 -186
- package/.output/server/node_modules/execa/lib/stdio/direction.js +0 -76
- package/.output/server/node_modules/execa/lib/stdio/duplicate.js +0 -116
- package/.output/server/node_modules/execa/lib/stdio/handle-async.js +0 -52
- package/.output/server/node_modules/execa/lib/stdio/handle-sync.js +0 -57
- package/.output/server/node_modules/execa/lib/stdio/handle.js +0 -214
- package/.output/server/node_modules/execa/lib/stdio/input-option.js +0 -50
- package/.output/server/node_modules/execa/lib/stdio/native.js +0 -106
- package/.output/server/node_modules/execa/lib/stdio/stdio-option.js +0 -60
- package/.output/server/node_modules/execa/lib/stdio/type.js +0 -173
- package/.output/server/node_modules/execa/lib/terminate/cancel.js +0 -20
- package/.output/server/node_modules/execa/lib/terminate/cleanup.js +0 -16
- package/.output/server/node_modules/execa/lib/terminate/graceful.js +0 -71
- package/.output/server/node_modules/execa/lib/terminate/kill.js +0 -93
- package/.output/server/node_modules/execa/lib/terminate/signal.js +0 -70
- package/.output/server/node_modules/execa/lib/terminate/timeout.js +0 -21
- package/.output/server/node_modules/execa/lib/transform/encoding-transform.js +0 -51
- package/.output/server/node_modules/execa/lib/transform/generator.js +0 -107
- package/.output/server/node_modules/execa/lib/transform/normalize.js +0 -111
- package/.output/server/node_modules/execa/lib/transform/object-mode.js +0 -41
- package/.output/server/node_modules/execa/lib/transform/run-async.js +0 -60
- package/.output/server/node_modules/execa/lib/transform/run-sync.js +0 -50
- package/.output/server/node_modules/execa/lib/transform/split.js +0 -110
- package/.output/server/node_modules/execa/lib/transform/validate.js +0 -43
- package/.output/server/node_modules/execa/lib/utils/abort-signal.js +0 -8
- package/.output/server/node_modules/execa/lib/utils/deferred.js +0 -7
- package/.output/server/node_modules/execa/lib/utils/max-listeners.js +0 -14
- package/.output/server/node_modules/execa/lib/utils/standard-stream.js +0 -6
- package/.output/server/node_modules/execa/lib/utils/uint-array.js +0 -69
- package/.output/server/node_modules/execa/lib/verbose/complete.js +0 -24
- package/.output/server/node_modules/execa/lib/verbose/custom.js +0 -26
- package/.output/server/node_modules/execa/lib/verbose/default.js +0 -54
- package/.output/server/node_modules/execa/lib/verbose/error.js +0 -13
- package/.output/server/node_modules/execa/lib/verbose/info.js +0 -39
- package/.output/server/node_modules/execa/lib/verbose/ipc.js +0 -15
- package/.output/server/node_modules/execa/lib/verbose/log.js +0 -54
- package/.output/server/node_modules/execa/lib/verbose/output.js +0 -60
- package/.output/server/node_modules/execa/lib/verbose/start.js +0 -15
- package/.output/server/node_modules/execa/lib/verbose/values.js +0 -33
- package/.output/server/node_modules/execa/package.json +0 -105
- package/.output/server/node_modules/figures/index.js +0 -292
- package/.output/server/node_modules/figures/package.json +0 -49
- package/.output/server/node_modules/fs-extra/lib/copy/copy-sync.js +0 -176
- package/.output/server/node_modules/fs-extra/lib/copy/copy.js +0 -180
- package/.output/server/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/.output/server/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/.output/server/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/.output/server/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/.output/server/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/.output/server/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/.output/server/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/.output/server/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/.output/server/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/.output/server/node_modules/fs-extra/lib/index.js +0 -16
- package/.output/server/node_modules/fs-extra/lib/json/index.js +0 -16
- package/.output/server/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/.output/server/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/.output/server/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/.output/server/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/.output/server/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/.output/server/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/.output/server/node_modules/fs-extra/lib/move/index.js +0 -7
- package/.output/server/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/.output/server/node_modules/fs-extra/lib/move/move.js +0 -59
- package/.output/server/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/.output/server/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/.output/server/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/.output/server/node_modules/fs-extra/lib/util/async.js +0 -29
- package/.output/server/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/.output/server/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/.output/server/node_modules/fs-extra/package.json +0 -71
- package/.output/server/node_modules/get-stream/package.json +0 -60
- package/.output/server/node_modules/get-stream/source/array-buffer.js +0 -84
- package/.output/server/node_modules/get-stream/source/array.js +0 -32
- package/.output/server/node_modules/get-stream/source/buffer.js +0 -19
- package/.output/server/node_modules/get-stream/source/contents.js +0 -121
- package/.output/server/node_modules/get-stream/source/exports.js +0 -5
- package/.output/server/node_modules/get-stream/source/index.js +0 -13
- package/.output/server/node_modules/get-stream/source/stream.js +0 -65
- package/.output/server/node_modules/get-stream/source/string.js +0 -41
- package/.output/server/node_modules/get-stream/source/utils.js +0 -11
- package/.output/server/node_modules/graceful-fs/clone.js +0 -23
- package/.output/server/node_modules/graceful-fs/graceful-fs.js +0 -448
- package/.output/server/node_modules/graceful-fs/legacy-streams.js +0 -118
- package/.output/server/node_modules/graceful-fs/package.json +0 -53
- package/.output/server/node_modules/graceful-fs/polyfills.js +0 -355
- package/.output/server/node_modules/human-signals/build/src/core.js +0 -273
- package/.output/server/node_modules/human-signals/build/src/main.js +0 -70
- package/.output/server/node_modules/human-signals/build/src/realtime.js +0 -16
- package/.output/server/node_modules/human-signals/build/src/signals.js +0 -34
- package/.output/server/node_modules/human-signals/package.json +0 -66
- package/.output/server/node_modules/is-plain-obj/index.js +0 -8
- package/.output/server/node_modules/is-plain-obj/package.json +0 -41
- package/.output/server/node_modules/is-stream/index.js +0 -37
- package/.output/server/node_modules/is-stream/package.json +0 -48
- package/.output/server/node_modules/is-unicode-supported/index.js +0 -21
- package/.output/server/node_modules/is-unicode-supported/package.json +0 -47
- package/.output/server/node_modules/isexe/index.js +0 -57
- package/.output/server/node_modules/isexe/mode.js +0 -41
- package/.output/server/node_modules/isexe/package.json +0 -31
- package/.output/server/node_modules/isexe/windows.js +0 -42
- package/.output/server/node_modules/js-runtime/dist/index.js +0 -5
- package/.output/server/node_modules/js-runtime/package.json +0 -72
- package/.output/server/node_modules/jsonfile/index.js +0 -88
- package/.output/server/node_modules/jsonfile/package.json +0 -40
- package/.output/server/node_modules/jsonfile/utils.js +0 -14
- package/.output/server/node_modules/mime-db/db.json +0 -7088
- package/.output/server/node_modules/mime-db/index.js +0 -11
- package/.output/server/node_modules/mime-db/package.json +0 -57
- package/.output/server/node_modules/mime-types/index.js +0 -188
- package/.output/server/node_modules/mime-types/package.json +0 -43
- package/.output/server/node_modules/minimatch/minimatch.js +0 -947
- package/.output/server/node_modules/minimatch/package.json +0 -33
- package/.output/server/node_modules/natural-orderby/dist/main.js +0 -19
- package/.output/server/node_modules/natural-orderby/dist/umd/natural-orderby.development.js +0 -420
- package/.output/server/node_modules/natural-orderby/dist/umd/natural-orderby.production.min.js +0 -11
- package/.output/server/node_modules/natural-orderby/package.json +0 -119
- package/.output/server/node_modules/npm-run-path/index.js +0 -55
- package/.output/server/node_modules/npm-run-path/package.json +0 -52
- package/.output/server/node_modules/parse-ms/index.js +0 -45
- package/.output/server/node_modules/parse-ms/package.json +0 -47
- package/.output/server/node_modules/path-is-inside/lib/path-is-inside.js +0 -28
- package/.output/server/node_modules/path-is-inside/package.json +0 -27
- package/.output/server/node_modules/pretty-ms/index.js +0 -149
- package/.output/server/node_modules/pretty-ms/package.json +0 -55
- package/.output/server/node_modules/range-parser/index.js +0 -158
- package/.output/server/node_modules/range-parser/package.json +0 -40
- package/.output/server/node_modules/serve-handler/package.json +0 -68
- package/.output/server/node_modules/serve-handler/src/directory.js +0 -16
- package/.output/server/node_modules/serve-handler/src/error.js +0 -10
- package/.output/server/node_modules/serve-handler/src/glob-slash.js +0 -9
- package/.output/server/node_modules/serve-handler/src/index.js +0 -769
- package/.output/server/node_modules/shebang-command/index.js +0 -19
- package/.output/server/node_modules/shebang-command/package.json +0 -34
- package/.output/server/node_modules/shebang-regex/index.js +0 -2
- package/.output/server/node_modules/shebang-regex/package.json +0 -35
- package/.output/server/node_modules/signal-exit/dist/mjs/index.js +0 -275
- package/.output/server/node_modules/signal-exit/dist/mjs/package.json +0 -3
- package/.output/server/node_modules/signal-exit/dist/mjs/signals.js +0 -39
- package/.output/server/node_modules/signal-exit/package.json +0 -106
- package/.output/server/node_modules/string-argv/index.js +0 -41
- package/.output/server/node_modules/string-argv/package.json +0 -51
- package/.output/server/node_modules/strip-final-newline/index.js +0 -26
- package/.output/server/node_modules/strip-final-newline/package.json +0 -49
- package/.output/server/node_modules/unicorn-magic/default.js +0 -14
- package/.output/server/node_modules/unicorn-magic/node.js +0 -49
- package/.output/server/node_modules/unicorn-magic/package.json +0 -62
- package/.output/server/node_modules/universalify/index.js +0 -24
- package/.output/server/node_modules/universalify/package.json +0 -34
- package/.output/server/node_modules/which/package.json +0 -43
- package/.output/server/node_modules/which/which.js +0 -125
- package/.output/server/node_modules/yoctocolors/base.js +0 -94
- package/.output/server/node_modules/yoctocolors/index.js +0 -2
- package/.output/server/node_modules/yoctocolors/package.json +0 -69
- /package/.output/server/node_modules/{.nitro/path-to-regexp@8.3.0 → path-to-regexp}/dist/index.js +0 -0
- /package/.output/server/node_modules/{.nitro/path-to-regexp@8.3.0 → path-to-regexp}/package.json +0 -0
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
import { createRequire as e } from "module";
|
|
2
|
+
import { spawn as t } from "node:child_process";
|
|
3
|
+
import { delimiter as n, dirname as r, normalize as i, resolve as a } from "node:path";
|
|
4
|
+
import { cwd as o } from "node:process";
|
|
5
|
+
import { PassThrough as s } from "node:stream";
|
|
6
|
+
import c from "node:readline";
|
|
7
|
+
var l = Object.create;
|
|
8
|
+
var u = Object.defineProperty;
|
|
9
|
+
var d = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var f = Object.getOwnPropertyNames;
|
|
11
|
+
var p = Object.getPrototypeOf;
|
|
12
|
+
var m = Object.prototype.hasOwnProperty;
|
|
13
|
+
var h = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
|
|
14
|
+
var g = (e, t, n, r) => {
|
|
15
|
+
if (t && typeof t === "object" || typeof t === "function") for (var i = f(t), a = 0, o = i.length, s; a < o; a++) {
|
|
16
|
+
s = i[a];
|
|
17
|
+
if (!m.call(e, s) && s !== n) u(e, s, {
|
|
18
|
+
get: ((e) => t[e]).bind(null, s),
|
|
19
|
+
enumerable: !(r = d(t, s)) || r.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return e;
|
|
23
|
+
};
|
|
24
|
+
var _ = (e, t, n) => (n = e != null ? l(p(e)) : {}, g(t || !e || !e.__esModule ? u(n, "default", {
|
|
25
|
+
value: e,
|
|
26
|
+
enumerable: true
|
|
27
|
+
}) : n, e));
|
|
28
|
+
var v = /* @__PURE__ */ e(import.meta.url);
|
|
29
|
+
const y = /^path$/i;
|
|
30
|
+
const b = {
|
|
31
|
+
key: "PATH",
|
|
32
|
+
value: ""
|
|
33
|
+
};
|
|
34
|
+
function x(e) {
|
|
35
|
+
for (const t in e) {
|
|
36
|
+
if (!Object.prototype.hasOwnProperty.call(e, t) || !y.test(t)) continue;
|
|
37
|
+
const n = e[t];
|
|
38
|
+
if (!n) return b;
|
|
39
|
+
return {
|
|
40
|
+
key: t,
|
|
41
|
+
value: n
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return b;
|
|
45
|
+
}
|
|
46
|
+
function S(e, t) {
|
|
47
|
+
const i = t.value.split(n);
|
|
48
|
+
let o = e;
|
|
49
|
+
let s;
|
|
50
|
+
do {
|
|
51
|
+
i.push(a(o, "node_modules", ".bin"));
|
|
52
|
+
s = o;
|
|
53
|
+
o = r(o);
|
|
54
|
+
} while (o !== s);
|
|
55
|
+
return {
|
|
56
|
+
key: t.key,
|
|
57
|
+
value: i.join(n)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function C(e, t) {
|
|
61
|
+
const n = {
|
|
62
|
+
...process.env,
|
|
63
|
+
...t
|
|
64
|
+
};
|
|
65
|
+
const r = S(e, x(n));
|
|
66
|
+
n[r.key] = r.value;
|
|
67
|
+
return n;
|
|
68
|
+
}
|
|
69
|
+
const w = (e) => {
|
|
70
|
+
let t = e.length;
|
|
71
|
+
const n = new s();
|
|
72
|
+
const r = () => {
|
|
73
|
+
if (--t === 0) n.emit("end");
|
|
74
|
+
};
|
|
75
|
+
for (const t of e) {
|
|
76
|
+
t.pipe(n, { end: false });
|
|
77
|
+
t.on("end", r);
|
|
78
|
+
}
|
|
79
|
+
return n;
|
|
80
|
+
};
|
|
81
|
+
var T = h((exports, t) => {
|
|
82
|
+
t.exports = a;
|
|
83
|
+
a.sync = o;
|
|
84
|
+
var n = v("fs");
|
|
85
|
+
function r(e, t) {
|
|
86
|
+
var n = t.pathExt !== void 0 ? t.pathExt : process.env.PATHEXT;
|
|
87
|
+
if (!n) return true;
|
|
88
|
+
n = n.split(";");
|
|
89
|
+
if (n.indexOf("") !== -1) return true;
|
|
90
|
+
for (var r = 0; r < n.length; r++) {
|
|
91
|
+
var i = n[r].toLowerCase();
|
|
92
|
+
if (i && e.substr(-i.length).toLowerCase() === i) return true;
|
|
93
|
+
}
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
function i(e, t, n) {
|
|
97
|
+
if (!e.isSymbolicLink() && !e.isFile()) return false;
|
|
98
|
+
return r(t, n);
|
|
99
|
+
}
|
|
100
|
+
function a(e, t, r) {
|
|
101
|
+
n.stat(e, function(n, a) {
|
|
102
|
+
r(n, n ? false : i(a, e, t));
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function o(e, t) {
|
|
106
|
+
return i(n.statSync(e), e, t);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
var E = h((exports, t) => {
|
|
110
|
+
t.exports = r;
|
|
111
|
+
r.sync = i;
|
|
112
|
+
var n = v("fs");
|
|
113
|
+
function r(e, t, r) {
|
|
114
|
+
n.stat(e, function(e, n) {
|
|
115
|
+
r(e, e ? false : a(n, t));
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function i(e, t) {
|
|
119
|
+
return a(n.statSync(e), t);
|
|
120
|
+
}
|
|
121
|
+
function a(e, t) {
|
|
122
|
+
return e.isFile() && o(e, t);
|
|
123
|
+
}
|
|
124
|
+
function o(e, t) {
|
|
125
|
+
var n = e.mode;
|
|
126
|
+
var r = e.uid;
|
|
127
|
+
var i = e.gid;
|
|
128
|
+
var a = t.uid !== void 0 ? t.uid : process.getuid && process.getuid();
|
|
129
|
+
var o = t.gid !== void 0 ? t.gid : process.getgid && process.getgid();
|
|
130
|
+
var s = parseInt("100", 8);
|
|
131
|
+
var c = parseInt("010", 8);
|
|
132
|
+
var l = parseInt("001", 8);
|
|
133
|
+
var u = s | c;
|
|
134
|
+
var d = n & l || n & c && i === o || n & s && r === a || n & u && a === 0;
|
|
135
|
+
return d;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
var D = h((exports, t) => {
|
|
139
|
+
var n = v("fs");
|
|
140
|
+
var r;
|
|
141
|
+
if (process.platform === "win32" || global.TESTING_WINDOWS) r = T();
|
|
142
|
+
else r = E();
|
|
143
|
+
t.exports = i;
|
|
144
|
+
i.sync = a;
|
|
145
|
+
function i(e, t, n) {
|
|
146
|
+
if (typeof t === "function") {
|
|
147
|
+
n = t;
|
|
148
|
+
t = {};
|
|
149
|
+
}
|
|
150
|
+
if (!n) {
|
|
151
|
+
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
152
|
+
return new Promise(function(n, r) {
|
|
153
|
+
i(e, t || {}, function(e, t) {
|
|
154
|
+
if (e) r(e);
|
|
155
|
+
else n(t);
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
r(e, t || {}, function(e, r) {
|
|
160
|
+
if (e) {
|
|
161
|
+
if (e.code === "EACCES" || t && t.ignoreErrors) {
|
|
162
|
+
e = null;
|
|
163
|
+
r = false;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
n(e, r);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function a(e, t) {
|
|
170
|
+
try {
|
|
171
|
+
return r.sync(e, t || {});
|
|
172
|
+
} catch (e) {
|
|
173
|
+
if (t && t.ignoreErrors || e.code === "EACCES") return false;
|
|
174
|
+
else throw e;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
var O = h((exports, t) => {
|
|
179
|
+
const n = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
180
|
+
const r = v("path");
|
|
181
|
+
const i = n ? ";" : ":";
|
|
182
|
+
const a = D();
|
|
183
|
+
const o = (e) => Object.assign(new Error(`not found: ${e}`), { code: "ENOENT" });
|
|
184
|
+
const s = (e, t) => {
|
|
185
|
+
const r = t.colon || i;
|
|
186
|
+
const a = e.match(/\//) || n && e.match(/\\/) ? [""] : [...n ? [process.cwd()] : [], ...(t.path || process.env.PATH || "").split(r)];
|
|
187
|
+
const o = n ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
188
|
+
const s = n ? o.split(r) : [""];
|
|
189
|
+
if (n) {
|
|
190
|
+
if (e.indexOf(".") !== -1 && s[0] !== "") s.unshift("");
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
pathEnv: a,
|
|
194
|
+
pathExt: s,
|
|
195
|
+
pathExtExe: o
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
const c = (e, t, n) => {
|
|
199
|
+
if (typeof t === "function") {
|
|
200
|
+
n = t;
|
|
201
|
+
t = {};
|
|
202
|
+
}
|
|
203
|
+
if (!t) t = {};
|
|
204
|
+
const { pathEnv: i, pathExt: c, pathExtExe: l } = s(e, t);
|
|
205
|
+
const u = [];
|
|
206
|
+
const d = (n) => new Promise((a, s) => {
|
|
207
|
+
if (n === i.length) return t.all && u.length ? a(u) : s(o(e));
|
|
208
|
+
const c = i[n];
|
|
209
|
+
const l = /^".*"$/.test(c) ? c.slice(1, -1) : c;
|
|
210
|
+
const d = r.join(l, e);
|
|
211
|
+
const p = !l && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d;
|
|
212
|
+
a(f(p, n, 0));
|
|
213
|
+
});
|
|
214
|
+
const f = (e, n, r) => new Promise((i, o) => {
|
|
215
|
+
if (r === c.length) return i(d(n + 1));
|
|
216
|
+
const s = c[r];
|
|
217
|
+
a(e + s, { pathExt: l }, (a, o) => {
|
|
218
|
+
if (!a && o) if (t.all) u.push(e + s);
|
|
219
|
+
else return i(e + s);
|
|
220
|
+
return i(f(e, n, r + 1));
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
return n ? d(0).then((e) => n(null, e), n) : d(0);
|
|
224
|
+
};
|
|
225
|
+
const l = (e, t) => {
|
|
226
|
+
t = t || {};
|
|
227
|
+
const { pathEnv: n, pathExt: i, pathExtExe: c } = s(e, t);
|
|
228
|
+
const l = [];
|
|
229
|
+
for (let o = 0; o < n.length; o++) {
|
|
230
|
+
const s = n[o];
|
|
231
|
+
const u = /^".*"$/.test(s) ? s.slice(1, -1) : s;
|
|
232
|
+
const d = r.join(u, e);
|
|
233
|
+
const f = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d;
|
|
234
|
+
for (let e = 0; e < i.length; e++) {
|
|
235
|
+
const n = f + i[e];
|
|
236
|
+
try {
|
|
237
|
+
const e = a.sync(n, { pathExt: c });
|
|
238
|
+
if (e) if (t.all) l.push(n);
|
|
239
|
+
else return n;
|
|
240
|
+
} catch (e) {}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
if (t.all && l.length) return l;
|
|
244
|
+
if (t.nothrow) return null;
|
|
245
|
+
throw o(e);
|
|
246
|
+
};
|
|
247
|
+
t.exports = c;
|
|
248
|
+
c.sync = l;
|
|
249
|
+
});
|
|
250
|
+
var k = h((exports, t) => {
|
|
251
|
+
const n = (e = {}) => {
|
|
252
|
+
const t = e.env || process.env;
|
|
253
|
+
const n = e.platform || process.platform;
|
|
254
|
+
if (n !== "win32") return "PATH";
|
|
255
|
+
return Object.keys(t).reverse().find((e) => e.toUpperCase() === "PATH") || "Path";
|
|
256
|
+
};
|
|
257
|
+
t.exports = n;
|
|
258
|
+
t.exports.default = n;
|
|
259
|
+
});
|
|
260
|
+
var A = h((exports, t) => {
|
|
261
|
+
const n = v("path");
|
|
262
|
+
const r = O();
|
|
263
|
+
const i = k();
|
|
264
|
+
function a(e, t) {
|
|
265
|
+
const a = e.options.env || process.env;
|
|
266
|
+
const o = process.cwd();
|
|
267
|
+
const s = e.options.cwd != null;
|
|
268
|
+
const c = s && process.chdir !== void 0 && !process.chdir.disabled;
|
|
269
|
+
if (c) try {
|
|
270
|
+
process.chdir(e.options.cwd);
|
|
271
|
+
} catch (e) {}
|
|
272
|
+
let l;
|
|
273
|
+
try {
|
|
274
|
+
l = r.sync(e.command, {
|
|
275
|
+
path: a[i({ env: a })],
|
|
276
|
+
pathExt: t ? n.delimiter : void 0
|
|
277
|
+
});
|
|
278
|
+
} catch (e) {} finally {
|
|
279
|
+
if (c) process.chdir(o);
|
|
280
|
+
}
|
|
281
|
+
if (l) l = n.resolve(s ? e.options.cwd : "", l);
|
|
282
|
+
return l;
|
|
283
|
+
}
|
|
284
|
+
function o(e) {
|
|
285
|
+
return a(e) || a(e, true);
|
|
286
|
+
}
|
|
287
|
+
t.exports = o;
|
|
288
|
+
});
|
|
289
|
+
var j = h((exports, t) => {
|
|
290
|
+
const n = /([()\][%!^"`<>&|;, *?])/g;
|
|
291
|
+
function r(e) {
|
|
292
|
+
e = e.replace(n, "^$1");
|
|
293
|
+
return e;
|
|
294
|
+
}
|
|
295
|
+
function i(e, t) {
|
|
296
|
+
e = `${e}`;
|
|
297
|
+
e = e.replace(/(\\*)"/g, "$1$1\\\"");
|
|
298
|
+
e = e.replace(/(\\*)$/, "$1$1");
|
|
299
|
+
e = `"${e}"`;
|
|
300
|
+
e = e.replace(n, "^$1");
|
|
301
|
+
if (t) e = e.replace(n, "^$1");
|
|
302
|
+
return e;
|
|
303
|
+
}
|
|
304
|
+
t.exports.command = r;
|
|
305
|
+
t.exports.argument = i;
|
|
306
|
+
});
|
|
307
|
+
var M = h((exports, t) => {
|
|
308
|
+
t.exports = /^#!(.*)/;
|
|
309
|
+
});
|
|
310
|
+
var N = h((exports, t) => {
|
|
311
|
+
const n = M();
|
|
312
|
+
t.exports = (e = "") => {
|
|
313
|
+
const t = e.match(n);
|
|
314
|
+
if (!t) return null;
|
|
315
|
+
const [r, i] = t[0].replace(/#! ?/, "").split(" ");
|
|
316
|
+
const a = r.split("/").pop();
|
|
317
|
+
if (a === "env") return i;
|
|
318
|
+
return i ? `${a} ${i}` : a;
|
|
319
|
+
};
|
|
320
|
+
});
|
|
321
|
+
var P = h((exports, t) => {
|
|
322
|
+
const n = v("fs");
|
|
323
|
+
const r = N();
|
|
324
|
+
function i(e) {
|
|
325
|
+
const t = 150;
|
|
326
|
+
const i = Buffer.alloc(t);
|
|
327
|
+
let a;
|
|
328
|
+
try {
|
|
329
|
+
a = n.openSync(e, "r");
|
|
330
|
+
n.readSync(a, i, 0, t, 0);
|
|
331
|
+
n.closeSync(a);
|
|
332
|
+
} catch (e) {}
|
|
333
|
+
return r(i.toString());
|
|
334
|
+
}
|
|
335
|
+
t.exports = i;
|
|
336
|
+
});
|
|
337
|
+
var F = h((exports, t) => {
|
|
338
|
+
const n = v("path");
|
|
339
|
+
const r = A();
|
|
340
|
+
const i = j();
|
|
341
|
+
const a = P();
|
|
342
|
+
const o = process.platform === "win32";
|
|
343
|
+
const s = /\.(?:com|exe)$/i;
|
|
344
|
+
const c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
345
|
+
function l(e) {
|
|
346
|
+
e.file = r(e);
|
|
347
|
+
const t = e.file && a(e.file);
|
|
348
|
+
if (t) {
|
|
349
|
+
e.args.unshift(e.file);
|
|
350
|
+
e.command = t;
|
|
351
|
+
return r(e);
|
|
352
|
+
}
|
|
353
|
+
return e.file;
|
|
354
|
+
}
|
|
355
|
+
function u(e) {
|
|
356
|
+
if (!o) return e;
|
|
357
|
+
const t = l(e);
|
|
358
|
+
const r = !s.test(t);
|
|
359
|
+
if (e.options.forceShell || r) {
|
|
360
|
+
const r = c.test(t);
|
|
361
|
+
e.command = n.normalize(e.command);
|
|
362
|
+
e.command = i.command(e.command);
|
|
363
|
+
e.args = e.args.map((e) => i.argument(e, r));
|
|
364
|
+
const a = [e.command].concat(e.args).join(" ");
|
|
365
|
+
e.args = [
|
|
366
|
+
"/d",
|
|
367
|
+
"/s",
|
|
368
|
+
"/c",
|
|
369
|
+
`"${a}"`
|
|
370
|
+
];
|
|
371
|
+
e.command = process.env.comspec || "cmd.exe";
|
|
372
|
+
e.options.windowsVerbatimArguments = true;
|
|
373
|
+
}
|
|
374
|
+
return e;
|
|
375
|
+
}
|
|
376
|
+
function d(e, t, n) {
|
|
377
|
+
if (t && !Array.isArray(t)) {
|
|
378
|
+
n = t;
|
|
379
|
+
t = null;
|
|
380
|
+
}
|
|
381
|
+
t = t ? t.slice(0) : [];
|
|
382
|
+
n = Object.assign({}, n);
|
|
383
|
+
const r = {
|
|
384
|
+
command: e,
|
|
385
|
+
args: t,
|
|
386
|
+
options: n,
|
|
387
|
+
file: void 0,
|
|
388
|
+
original: {
|
|
389
|
+
command: e,
|
|
390
|
+
args: t
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
return n.shell ? r : u(r);
|
|
394
|
+
}
|
|
395
|
+
t.exports = d;
|
|
396
|
+
});
|
|
397
|
+
var I = h((exports, t) => {
|
|
398
|
+
const n = process.platform === "win32";
|
|
399
|
+
function r(e, t) {
|
|
400
|
+
return Object.assign(new Error(`${t} ${e.command} ENOENT`), {
|
|
401
|
+
code: "ENOENT",
|
|
402
|
+
errno: "ENOENT",
|
|
403
|
+
syscall: `${t} ${e.command}`,
|
|
404
|
+
path: e.command,
|
|
405
|
+
spawnargs: e.args
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
function i(e, t) {
|
|
409
|
+
if (!n) return;
|
|
410
|
+
const r = e.emit;
|
|
411
|
+
e.emit = function(n, i) {
|
|
412
|
+
if (n === "exit") {
|
|
413
|
+
const n = a(i, t, "spawn");
|
|
414
|
+
if (n) return r.call(e, "error", n);
|
|
415
|
+
}
|
|
416
|
+
return r.apply(e, arguments);
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
function a(e, t) {
|
|
420
|
+
if (n && e === 1 && !t.file) return r(t.original, "spawn");
|
|
421
|
+
return null;
|
|
422
|
+
}
|
|
423
|
+
function o(e, t) {
|
|
424
|
+
if (n && e === 1 && !t.file) return r(t.original, "spawnSync");
|
|
425
|
+
return null;
|
|
426
|
+
}
|
|
427
|
+
t.exports = {
|
|
428
|
+
hookChildProcess: i,
|
|
429
|
+
verifyENOENT: a,
|
|
430
|
+
verifyENOENTSync: o,
|
|
431
|
+
notFoundError: r
|
|
432
|
+
};
|
|
433
|
+
});
|
|
434
|
+
var L = h((exports, t) => {
|
|
435
|
+
const n = v("child_process");
|
|
436
|
+
const r = F();
|
|
437
|
+
const i = I();
|
|
438
|
+
function a(e, t, a) {
|
|
439
|
+
const o = r(e, t, a);
|
|
440
|
+
const s = n.spawn(o.command, o.args, o.options);
|
|
441
|
+
i.hookChildProcess(s, o);
|
|
442
|
+
return s;
|
|
443
|
+
}
|
|
444
|
+
function o(e, t, a) {
|
|
445
|
+
const o = r(e, t, a);
|
|
446
|
+
const s = n.spawnSync(o.command, o.args, o.options);
|
|
447
|
+
s.error = s.error || i.verifyENOENTSync(s.status, o);
|
|
448
|
+
return s;
|
|
449
|
+
}
|
|
450
|
+
t.exports = a;
|
|
451
|
+
t.exports.spawn = a;
|
|
452
|
+
t.exports.sync = o;
|
|
453
|
+
t.exports._parse = r;
|
|
454
|
+
t.exports._enoent = i;
|
|
455
|
+
});
|
|
456
|
+
var R = _(L(), 1);
|
|
457
|
+
var z = class extends Error {
|
|
458
|
+
result;
|
|
459
|
+
output;
|
|
460
|
+
get exitCode() {
|
|
461
|
+
if (this.result.exitCode !== null) return this.result.exitCode;
|
|
462
|
+
return void 0;
|
|
463
|
+
}
|
|
464
|
+
constructor(e, t) {
|
|
465
|
+
super(`Process exited with non-zero status (${e.exitCode})`);
|
|
466
|
+
this.result = e;
|
|
467
|
+
this.output = t;
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
const B = {
|
|
471
|
+
timeout: void 0,
|
|
472
|
+
persist: false
|
|
473
|
+
};
|
|
474
|
+
const V = { windowsHide: true };
|
|
475
|
+
function H(e, t) {
|
|
476
|
+
const n = i(e);
|
|
477
|
+
const r = t ?? [];
|
|
478
|
+
return {
|
|
479
|
+
command: n,
|
|
480
|
+
args: r
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
function U(e) {
|
|
484
|
+
const t = new AbortController();
|
|
485
|
+
for (const n of e) {
|
|
486
|
+
if (n.aborted) {
|
|
487
|
+
t.abort();
|
|
488
|
+
return n;
|
|
489
|
+
}
|
|
490
|
+
const e = () => {
|
|
491
|
+
t.abort(n.reason);
|
|
492
|
+
};
|
|
493
|
+
n.addEventListener("abort", e, { signal: t.signal });
|
|
494
|
+
}
|
|
495
|
+
return t.signal;
|
|
496
|
+
}
|
|
497
|
+
async function W(e) {
|
|
498
|
+
let t = "";
|
|
499
|
+
for await (const n of e) t += n.toString();
|
|
500
|
+
return t;
|
|
501
|
+
}
|
|
502
|
+
var G = class {
|
|
503
|
+
_process;
|
|
504
|
+
_aborted = false;
|
|
505
|
+
_options;
|
|
506
|
+
_command;
|
|
507
|
+
_args;
|
|
508
|
+
_resolveClose;
|
|
509
|
+
_processClosed;
|
|
510
|
+
_thrownError;
|
|
511
|
+
get process() {
|
|
512
|
+
return this._process;
|
|
513
|
+
}
|
|
514
|
+
get pid() {
|
|
515
|
+
return this._process?.pid;
|
|
516
|
+
}
|
|
517
|
+
get exitCode() {
|
|
518
|
+
if (this._process && this._process.exitCode !== null) return this._process.exitCode;
|
|
519
|
+
return void 0;
|
|
520
|
+
}
|
|
521
|
+
constructor(e, t, n) {
|
|
522
|
+
this._options = {
|
|
523
|
+
...B,
|
|
524
|
+
...n
|
|
525
|
+
};
|
|
526
|
+
this._command = e;
|
|
527
|
+
this._args = t ?? [];
|
|
528
|
+
this._processClosed = new Promise((e) => {
|
|
529
|
+
this._resolveClose = e;
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
kill(e) {
|
|
533
|
+
return this._process?.kill(e) === true;
|
|
534
|
+
}
|
|
535
|
+
get aborted() {
|
|
536
|
+
return this._aborted;
|
|
537
|
+
}
|
|
538
|
+
get killed() {
|
|
539
|
+
return this._process?.killed === true;
|
|
540
|
+
}
|
|
541
|
+
pipe(e, t, n) {
|
|
542
|
+
return q(e, t, {
|
|
543
|
+
...n,
|
|
544
|
+
stdin: this
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
async *[Symbol.asyncIterator]() {
|
|
548
|
+
const e = this._process;
|
|
549
|
+
if (!e) return;
|
|
550
|
+
const t = [];
|
|
551
|
+
if (this._streamErr) t.push(this._streamErr);
|
|
552
|
+
if (this._streamOut) t.push(this._streamOut);
|
|
553
|
+
const n = w(t);
|
|
554
|
+
const r = c.createInterface({ input: n });
|
|
555
|
+
for await (const e of r) yield e.toString();
|
|
556
|
+
await this._processClosed;
|
|
557
|
+
e.removeAllListeners();
|
|
558
|
+
if (this._thrownError) throw this._thrownError;
|
|
559
|
+
if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z(this);
|
|
560
|
+
}
|
|
561
|
+
async _waitForOutput() {
|
|
562
|
+
const e = this._process;
|
|
563
|
+
if (!e) throw new Error("No process was started");
|
|
564
|
+
const [t, n] = await Promise.all([this._streamOut ? W(this._streamOut) : "", this._streamErr ? W(this._streamErr) : ""]);
|
|
565
|
+
await this._processClosed;
|
|
566
|
+
if (this._options?.stdin) await this._options.stdin;
|
|
567
|
+
e.removeAllListeners();
|
|
568
|
+
if (this._thrownError) throw this._thrownError;
|
|
569
|
+
const r = {
|
|
570
|
+
stderr: n,
|
|
571
|
+
stdout: t,
|
|
572
|
+
exitCode: this.exitCode
|
|
573
|
+
};
|
|
574
|
+
if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z(this, r);
|
|
575
|
+
return r;
|
|
576
|
+
}
|
|
577
|
+
then(e, t) {
|
|
578
|
+
return this._waitForOutput().then(e, t);
|
|
579
|
+
}
|
|
580
|
+
_streamOut;
|
|
581
|
+
_streamErr;
|
|
582
|
+
spawn() {
|
|
583
|
+
const e = o();
|
|
584
|
+
const n = this._options;
|
|
585
|
+
const r = {
|
|
586
|
+
...V,
|
|
587
|
+
...n.nodeOptions
|
|
588
|
+
};
|
|
589
|
+
const i = [];
|
|
590
|
+
this._resetState();
|
|
591
|
+
if (n.timeout !== void 0) i.push(AbortSignal.timeout(n.timeout));
|
|
592
|
+
if (n.signal !== void 0) i.push(n.signal);
|
|
593
|
+
if (n.persist === true) r.detached = true;
|
|
594
|
+
if (i.length > 0) r.signal = U(i);
|
|
595
|
+
r.env = C(e, r.env);
|
|
596
|
+
const { command: a, args: s } = H(this._command, this._args);
|
|
597
|
+
const c = (0, R._parse)(a, s, r);
|
|
598
|
+
const l = t(c.command, c.args, c.options);
|
|
599
|
+
if (l.stderr) this._streamErr = l.stderr;
|
|
600
|
+
if (l.stdout) this._streamOut = l.stdout;
|
|
601
|
+
this._process = l;
|
|
602
|
+
l.once("error", this._onError);
|
|
603
|
+
l.once("close", this._onClose);
|
|
604
|
+
if (n.stdin !== void 0 && l.stdin && n.stdin.process) {
|
|
605
|
+
const { stdout: e } = n.stdin.process;
|
|
606
|
+
if (e) e.pipe(l.stdin);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
_resetState() {
|
|
610
|
+
this._aborted = false;
|
|
611
|
+
this._processClosed = new Promise((e) => {
|
|
612
|
+
this._resolveClose = e;
|
|
613
|
+
});
|
|
614
|
+
this._thrownError = void 0;
|
|
615
|
+
}
|
|
616
|
+
_onError = (e) => {
|
|
617
|
+
if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
|
|
618
|
+
this._aborted = true;
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
this._thrownError = e;
|
|
622
|
+
};
|
|
623
|
+
_onClose = () => {
|
|
624
|
+
if (this._resolveClose) this._resolveClose();
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
const K = (e, t, n) => {
|
|
628
|
+
const r = new G(e, t, n);
|
|
629
|
+
r.spawn();
|
|
630
|
+
return r;
|
|
631
|
+
};
|
|
632
|
+
const q = K;
|
|
633
|
+
export { G as ExecProcess, z as NonZeroExitError, q as exec, K as x };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tinyexec",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A minimal library for executing processes in Node",
|
|
6
|
+
"main": "./dist/main.js",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=18"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsdown",
|
|
15
|
+
"build:types": "tsc",
|
|
16
|
+
"dev": "tsdown --watch",
|
|
17
|
+
"format": "prettier --write src",
|
|
18
|
+
"format:check": "prettier --check src",
|
|
19
|
+
"lint": "eslint src",
|
|
20
|
+
"prepare": "npm run build",
|
|
21
|
+
"test": "npm run build && vitest run"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/tinylibs/tinyexec.git"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"execa",
|
|
29
|
+
"exec",
|
|
30
|
+
"tiny",
|
|
31
|
+
"child_process",
|
|
32
|
+
"spawn"
|
|
33
|
+
],
|
|
34
|
+
"author": "James Garbutt (https://github.com/43081j)",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/tinylibs/tinyexec/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/tinylibs/tinyexec#readme",
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@eslint/js": "^9.0.0",
|
|
42
|
+
"@types/cross-spawn": "^6.0.6",
|
|
43
|
+
"@types/node": "^20.12.7",
|
|
44
|
+
"@vitest/coverage-v8": "^4.0.7",
|
|
45
|
+
"cross-spawn": "^7.0.3",
|
|
46
|
+
"eslint-config-google": "^0.14.0",
|
|
47
|
+
"prettier": "^3.2.5",
|
|
48
|
+
"tsdown": "^0.9.9",
|
|
49
|
+
"typescript": "^5.4.5",
|
|
50
|
+
"typescript-eslint": "^7.7.0",
|
|
51
|
+
"vitest": "^4.0.7"
|
|
52
|
+
},
|
|
53
|
+
"exports": {
|
|
54
|
+
".": {
|
|
55
|
+
"types": "./dist/main.d.ts",
|
|
56
|
+
"default": "./dist/main.js"
|
|
57
|
+
},
|
|
58
|
+
"./package.json": "./package.json"
|
|
59
|
+
},
|
|
60
|
+
"types": "./dist/main.d.ts"
|
|
61
|
+
}
|