@relative-ci/core 5.0.0-alpha.2
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/lib/cjs/__/cross-spawn/index.js +59 -0
- package/lib/cjs/__/cross-spawn/index.js.map +1 -0
- package/lib/cjs/__/cross-spawn/lib/enoent.js +71 -0
- package/lib/cjs/__/cross-spawn/lib/enoent.js.map +1 -0
- package/lib/cjs/__/cross-spawn/lib/parse.js +112 -0
- package/lib/cjs/__/cross-spawn/lib/parse.js.map +1 -0
- package/lib/cjs/__/cross-spawn/lib/util/escape.js +60 -0
- package/lib/cjs/__/cross-spawn/lib/util/escape.js.map +1 -0
- package/lib/cjs/__/cross-spawn/lib/util/readShebang.js +42 -0
- package/lib/cjs/__/cross-spawn/lib/util/readShebang.js.map +1 -0
- package/lib/cjs/__/cross-spawn/lib/util/resolveCommand.js +72 -0
- package/lib/cjs/__/cross-spawn/lib/util/resolveCommand.js.map +1 -0
- package/lib/cjs/__/env-ci/index.js +81 -0
- package/lib/cjs/__/env-ci/index.js.map +1 -0
- package/lib/cjs/__/env-ci/lib/git.js +71 -0
- package/lib/cjs/__/env-ci/lib/git.js.map +1 -0
- package/lib/cjs/__/env-ci/lib/utils.js +15 -0
- package/lib/cjs/__/env-ci/lib/utils.js.map +1 -0
- package/lib/cjs/__/env-ci/services/appveyor.js +33 -0
- package/lib/cjs/__/env-ci/services/appveyor.js.map +1 -0
- package/lib/cjs/__/env-ci/services/azure-pipelines.js +35 -0
- package/lib/cjs/__/env-ci/services/azure-pipelines.js.map +1 -0
- package/lib/cjs/__/env-ci/services/bamboo.js +24 -0
- package/lib/cjs/__/env-ci/services/bamboo.js.map +1 -0
- package/lib/cjs/__/env-ci/services/bitbucket.js +25 -0
- package/lib/cjs/__/env-ci/services/bitbucket.js.map +1 -0
- package/lib/cjs/__/env-ci/services/bitrise.js +33 -0
- package/lib/cjs/__/env-ci/services/bitrise.js.map +1 -0
- package/lib/cjs/__/env-ci/services/buddy.js +34 -0
- package/lib/cjs/__/env-ci/services/buddy.js.map +1 -0
- package/lib/cjs/__/env-ci/services/buildkite.js +38 -0
- package/lib/cjs/__/env-ci/services/buildkite.js.map +1 -0
- package/lib/cjs/__/env-ci/services/circleci.js +36 -0
- package/lib/cjs/__/env-ci/services/circleci.js.map +1 -0
- package/lib/cjs/__/env-ci/services/cirrus.js +35 -0
- package/lib/cjs/__/env-ci/services/cirrus.js.map +1 -0
- package/lib/cjs/__/env-ci/services/cloudflare-pages.js +21 -0
- package/lib/cjs/__/env-ci/services/cloudflare-pages.js.map +1 -0
- package/lib/cjs/__/env-ci/services/codebuild.js +25 -0
- package/lib/cjs/__/env-ci/services/codebuild.js.map +1 -0
- package/lib/cjs/__/env-ci/services/codefresh.js +30 -0
- package/lib/cjs/__/env-ci/services/codefresh.js.map +1 -0
- package/lib/cjs/__/env-ci/services/codeship.js +23 -0
- package/lib/cjs/__/env-ci/services/codeship.js.map +1 -0
- package/lib/cjs/__/env-ci/services/drone.js +32 -0
- package/lib/cjs/__/env-ci/services/drone.js.map +1 -0
- package/lib/cjs/__/env-ci/services/git.js +12 -0
- package/lib/cjs/__/env-ci/services/git.js.map +1 -0
- package/lib/cjs/__/env-ci/services/github.js +65 -0
- package/lib/cjs/__/env-ci/services/github.js.map +1 -0
- package/lib/cjs/__/env-ci/services/gitlab.js +35 -0
- package/lib/cjs/__/env-ci/services/gitlab.js.map +1 -0
- package/lib/cjs/__/env-ci/services/jenkins.js +40 -0
- package/lib/cjs/__/env-ci/services/jenkins.js.map +1 -0
- package/lib/cjs/__/env-ci/services/jetbrains-space.js +29 -0
- package/lib/cjs/__/env-ci/services/jetbrains-space.js.map +1 -0
- package/lib/cjs/__/env-ci/services/netlify.js +29 -0
- package/lib/cjs/__/env-ci/services/netlify.js.map +1 -0
- package/lib/cjs/__/env-ci/services/puppet.js +23 -0
- package/lib/cjs/__/env-ci/services/puppet.js.map +1 -0
- package/lib/cjs/__/env-ci/services/sail.js +27 -0
- package/lib/cjs/__/env-ci/services/sail.js.map +1 -0
- package/lib/cjs/__/env-ci/services/screwdriver.js +31 -0
- package/lib/cjs/__/env-ci/services/screwdriver.js.map +1 -0
- package/lib/cjs/__/env-ci/services/scrutinizer.js +27 -0
- package/lib/cjs/__/env-ci/services/scrutinizer.js.map +1 -0
- package/lib/cjs/__/env-ci/services/semaphore.js +34 -0
- package/lib/cjs/__/env-ci/services/semaphore.js.map +1 -0
- package/lib/cjs/__/env-ci/services/shippable.js +32 -0
- package/lib/cjs/__/env-ci/services/shippable.js.map +1 -0
- package/lib/cjs/__/env-ci/services/teamcity.js +64 -0
- package/lib/cjs/__/env-ci/services/teamcity.js.map +1 -0
- package/lib/cjs/__/env-ci/services/travis.js +34 -0
- package/lib/cjs/__/env-ci/services/travis.js.map +1 -0
- package/lib/cjs/__/env-ci/services/vela.js +32 -0
- package/lib/cjs/__/env-ci/services/vela.js.map +1 -0
- package/lib/cjs/__/env-ci/services/vercel.js +34 -0
- package/lib/cjs/__/env-ci/services/vercel.js.map +1 -0
- package/lib/cjs/__/env-ci/services/wercker.js +24 -0
- package/lib/cjs/__/env-ci/services/wercker.js.map +1 -0
- package/lib/cjs/__/env-ci/services/woodpecker.js +32 -0
- package/lib/cjs/__/env-ci/services/woodpecker.js.map +1 -0
- package/lib/cjs/__/execa/index.js +149 -0
- package/lib/cjs/__/execa/index.js.map +1 -0
- package/lib/cjs/__/execa/lib/command.js +27 -0
- package/lib/cjs/__/execa/lib/command.js.map +1 -0
- package/lib/cjs/__/execa/lib/error.js +92 -0
- package/lib/cjs/__/execa/lib/error.js.map +1 -0
- package/lib/cjs/__/execa/lib/promise.js +10 -0
- package/lib/cjs/__/execa/lib/promise.js.map +1 -0
- package/lib/cjs/__/execa/lib/stdio.js +35 -0
- package/lib/cjs/__/execa/lib/stdio.js.map +1 -0
- package/lib/cjs/__/execa/lib/stream.js +35 -0
- package/lib/cjs/__/execa/lib/stream.js.map +1 -0
- package/lib/cjs/__/execa/lib/verbose.js +29 -0
- package/lib/cjs/__/execa/lib/verbose.js.map +1 -0
- package/lib/cjs/__/get-stream/source/array-buffer.js +4 -0
- package/lib/cjs/__/get-stream/source/array-buffer.js.map +1 -0
- package/lib/cjs/__/human-signals/build/src/core.js +276 -0
- package/lib/cjs/__/human-signals/build/src/core.js.map +1 -0
- package/lib/cjs/__/human-signals/build/src/main.js +72 -0
- package/lib/cjs/__/human-signals/build/src/main.js.map +1 -0
- package/lib/cjs/__/human-signals/build/src/realtime.js +21 -0
- package/lib/cjs/__/human-signals/build/src/realtime.js.map +1 -0
- package/lib/cjs/__/human-signals/build/src/signals.js +36 -0
- package/lib/cjs/__/human-signals/build/src/signals.js.map +1 -0
- package/lib/cjs/__/is-stream/index.js +10 -0
- package/lib/cjs/__/is-stream/index.js.map +1 -0
- package/lib/cjs/__/isexe/index.js +73 -0
- package/lib/cjs/__/isexe/index.js.map +1 -0
- package/lib/cjs/__/isexe/mode.js +60 -0
- package/lib/cjs/__/isexe/mode.js.map +1 -0
- package/lib/cjs/__/isexe/windows.js +61 -0
- package/lib/cjs/__/isexe/windows.js.map +1 -0
- package/lib/cjs/__/java-properties/dist-node/index.js +234 -0
- package/lib/cjs/__/java-properties/dist-node/index.js.map +1 -0
- package/lib/cjs/__/merge-stream/index.js +59 -0
- package/lib/cjs/__/merge-stream/index.js.map +1 -0
- package/lib/cjs/__/npm-run-path/__/path-key/index.js +17 -0
- package/lib/cjs/__/npm-run-path/__/path-key/index.js.map +1 -0
- package/lib/cjs/__/npm-run-path/index.js +63 -0
- package/lib/cjs/__/npm-run-path/index.js.map +1 -0
- package/lib/cjs/__/path-key/index.js +29 -0
- package/lib/cjs/__/path-key/index.js.map +1 -0
- package/lib/cjs/__/shebang-command/index.js +33 -0
- package/lib/cjs/__/shebang-command/index.js.map +1 -0
- package/lib/cjs/__/shebang-regex/index.js +14 -0
- package/lib/cjs/__/shebang-regex/index.js.map +1 -0
- package/lib/cjs/__/signal-exit/dist/mjs/index.js +253 -0
- package/lib/cjs/__/signal-exit/dist/mjs/index.js.map +1 -0
- package/lib/cjs/__/signal-exit/dist/mjs/signals.js +43 -0
- package/lib/cjs/__/signal-exit/dist/mjs/signals.js.map +1 -0
- package/lib/cjs/__/strip-final-newline/index.js +19 -0
- package/lib/cjs/__/strip-final-newline/index.js.map +1 -0
- package/lib/cjs/__/which/which.js +145 -0
- package/lib/cjs/__/which/which.js.map +1 -0
- package/lib/cjs/_virtual/_commonjsHelpers.js +11 -0
- package/lib/cjs/_virtual/_commonjsHelpers.js.map +1 -0
- package/lib/cjs/_virtual/escape.js +6 -0
- package/lib/cjs/_virtual/escape.js.map +1 -0
- package/lib/cjs/_virtual/index.js +10 -0
- package/lib/cjs/_virtual/index.js.map +1 -0
- package/lib/cjs/_virtual/index2.js +6 -0
- package/lib/cjs/_virtual/index2.js.map +1 -0
- package/lib/cjs/_virtual/index3.js +10 -0
- package/lib/cjs/_virtual/index3.js.map +1 -0
- package/lib/cjs/_virtual/index4.js +6 -0
- package/lib/cjs/_virtual/index4.js.map +1 -0
- package/lib/cjs/_virtual/index5.js +6 -0
- package/lib/cjs/_virtual/index5.js.map +1 -0
- package/lib/cjs/_virtual/index6.js +6 -0
- package/lib/cjs/_virtual/index6.js.map +1 -0
- package/lib/cjs/artifacts/filter-artifacts.js +27 -0
- package/lib/cjs/artifacts/filter-artifacts.js.map +1 -0
- package/lib/cjs/artifacts/validate-webpack-stats.js +18 -0
- package/lib/cjs/artifacts/validate-webpack-stats.js.map +1 -0
- package/lib/cjs/artifacts.js +10 -0
- package/lib/cjs/artifacts.js.map +1 -0
- package/lib/cjs/constants.js +10 -0
- package/lib/cjs/constants.js.map +1 -0
- package/lib/cjs/index.js +33 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/ingest/ingest.js +85 -0
- package/lib/cjs/ingest/ingest.js.map +1 -0
- package/lib/cjs/ingest.js +8 -0
- package/lib/cjs/ingest.js.map +1 -0
- package/lib/cjs/locales/en.js +27 -0
- package/lib/cjs/locales/en.js.map +1 -0
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/utils/debug.js +13 -0
- package/lib/cjs/utils/debug.js.map +1 -0
- package/lib/cjs/utils/get-commit-message.js +21 -0
- package/lib/cjs/utils/get-commit-message.js.map +1 -0
- package/lib/cjs/utils/get-env-vars.js +56 -0
- package/lib/cjs/utils/get-env-vars.js.map +1 -0
- package/lib/cjs/utils/get-slug.js +44 -0
- package/lib/cjs/utils/get-slug.js.map +1 -0
- package/lib/cjs/utils/log-response.js +19 -0
- package/lib/cjs/utils/log-response.js.map +1 -0
- package/lib/cjs/utils/logger.js +16 -0
- package/lib/cjs/utils/logger.js.map +1 -0
- package/lib/cjs/utils/mask-object-property.js +27 -0
- package/lib/cjs/utils/mask-object-property.js.map +1 -0
- package/lib/cjs/utils/normalize-params.js +62 -0
- package/lib/cjs/utils/normalize-params.js.map +1 -0
- package/lib/cjs/utils.js +23 -0
- package/lib/cjs/utils.js.map +1 -0
- package/lib/esm/__/cross-spawn/index.js +53 -0
- package/lib/esm/__/cross-spawn/index.js.map +1 -0
- package/lib/esm/__/cross-spawn/lib/enoent.js +69 -0
- package/lib/esm/__/cross-spawn/lib/enoent.js.map +1 -0
- package/lib/esm/__/cross-spawn/lib/parse.js +106 -0
- package/lib/esm/__/cross-spawn/lib/parse.js.map +1 -0
- package/lib/esm/__/cross-spawn/lib/util/escape.js +58 -0
- package/lib/esm/__/cross-spawn/lib/util/escape.js.map +1 -0
- package/lib/esm/__/cross-spawn/lib/util/readShebang.js +36 -0
- package/lib/esm/__/cross-spawn/lib/util/readShebang.js.map +1 -0
- package/lib/esm/__/cross-spawn/lib/util/resolveCommand.js +66 -0
- package/lib/esm/__/cross-spawn/lib/util/resolveCommand.js.map +1 -0
- package/lib/esm/__/env-ci/index.js +79 -0
- package/lib/esm/__/env-ci/index.js.map +1 -0
- package/lib/esm/__/env-ci/lib/git.js +67 -0
- package/lib/esm/__/env-ci/lib/git.js.map +1 -0
- package/lib/esm/__/env-ci/lib/utils.js +12 -0
- package/lib/esm/__/env-ci/lib/utils.js.map +1 -0
- package/lib/esm/__/env-ci/services/appveyor.js +31 -0
- package/lib/esm/__/env-ci/services/appveyor.js.map +1 -0
- package/lib/esm/__/env-ci/services/azure-pipelines.js +33 -0
- package/lib/esm/__/env-ci/services/azure-pipelines.js.map +1 -0
- package/lib/esm/__/env-ci/services/bamboo.js +22 -0
- package/lib/esm/__/env-ci/services/bamboo.js.map +1 -0
- package/lib/esm/__/env-ci/services/bitbucket.js +23 -0
- package/lib/esm/__/env-ci/services/bitbucket.js.map +1 -0
- package/lib/esm/__/env-ci/services/bitrise.js +31 -0
- package/lib/esm/__/env-ci/services/bitrise.js.map +1 -0
- package/lib/esm/__/env-ci/services/buddy.js +32 -0
- package/lib/esm/__/env-ci/services/buddy.js.map +1 -0
- package/lib/esm/__/env-ci/services/buildkite.js +36 -0
- package/lib/esm/__/env-ci/services/buildkite.js.map +1 -0
- package/lib/esm/__/env-ci/services/circleci.js +34 -0
- package/lib/esm/__/env-ci/services/circleci.js.map +1 -0
- package/lib/esm/__/env-ci/services/cirrus.js +33 -0
- package/lib/esm/__/env-ci/services/cirrus.js.map +1 -0
- package/lib/esm/__/env-ci/services/cloudflare-pages.js +19 -0
- package/lib/esm/__/env-ci/services/cloudflare-pages.js.map +1 -0
- package/lib/esm/__/env-ci/services/codebuild.js +23 -0
- package/lib/esm/__/env-ci/services/codebuild.js.map +1 -0
- package/lib/esm/__/env-ci/services/codefresh.js +28 -0
- package/lib/esm/__/env-ci/services/codefresh.js.map +1 -0
- package/lib/esm/__/env-ci/services/codeship.js +21 -0
- package/lib/esm/__/env-ci/services/codeship.js.map +1 -0
- package/lib/esm/__/env-ci/services/drone.js +30 -0
- package/lib/esm/__/env-ci/services/drone.js.map +1 -0
- package/lib/esm/__/env-ci/services/git.js +10 -0
- package/lib/esm/__/env-ci/services/git.js.map +1 -0
- package/lib/esm/__/env-ci/services/github.js +63 -0
- package/lib/esm/__/env-ci/services/github.js.map +1 -0
- package/lib/esm/__/env-ci/services/gitlab.js +33 -0
- package/lib/esm/__/env-ci/services/gitlab.js.map +1 -0
- package/lib/esm/__/env-ci/services/jenkins.js +38 -0
- package/lib/esm/__/env-ci/services/jenkins.js.map +1 -0
- package/lib/esm/__/env-ci/services/jetbrains-space.js +27 -0
- package/lib/esm/__/env-ci/services/jetbrains-space.js.map +1 -0
- package/lib/esm/__/env-ci/services/netlify.js +27 -0
- package/lib/esm/__/env-ci/services/netlify.js.map +1 -0
- package/lib/esm/__/env-ci/services/puppet.js +21 -0
- package/lib/esm/__/env-ci/services/puppet.js.map +1 -0
- package/lib/esm/__/env-ci/services/sail.js +25 -0
- package/lib/esm/__/env-ci/services/sail.js.map +1 -0
- package/lib/esm/__/env-ci/services/screwdriver.js +29 -0
- package/lib/esm/__/env-ci/services/screwdriver.js.map +1 -0
- package/lib/esm/__/env-ci/services/scrutinizer.js +25 -0
- package/lib/esm/__/env-ci/services/scrutinizer.js.map +1 -0
- package/lib/esm/__/env-ci/services/semaphore.js +32 -0
- package/lib/esm/__/env-ci/services/semaphore.js.map +1 -0
- package/lib/esm/__/env-ci/services/shippable.js +30 -0
- package/lib/esm/__/env-ci/services/shippable.js.map +1 -0
- package/lib/esm/__/env-ci/services/teamcity.js +62 -0
- package/lib/esm/__/env-ci/services/teamcity.js.map +1 -0
- package/lib/esm/__/env-ci/services/travis.js +32 -0
- package/lib/esm/__/env-ci/services/travis.js.map +1 -0
- package/lib/esm/__/env-ci/services/vela.js +30 -0
- package/lib/esm/__/env-ci/services/vela.js.map +1 -0
- package/lib/esm/__/env-ci/services/vercel.js +32 -0
- package/lib/esm/__/env-ci/services/vercel.js.map +1 -0
- package/lib/esm/__/env-ci/services/wercker.js +22 -0
- package/lib/esm/__/env-ci/services/wercker.js.map +1 -0
- package/lib/esm/__/env-ci/services/woodpecker.js +30 -0
- package/lib/esm/__/env-ci/services/woodpecker.js.map +1 -0
- package/lib/esm/__/execa/index.js +141 -0
- package/lib/esm/__/execa/index.js.map +1 -0
- package/lib/esm/__/execa/lib/command.js +24 -0
- package/lib/esm/__/execa/lib/command.js.map +1 -0
- package/lib/esm/__/execa/lib/error.js +86 -0
- package/lib/esm/__/execa/lib/error.js.map +1 -0
- package/lib/esm/__/execa/lib/promise.js +8 -0
- package/lib/esm/__/execa/lib/promise.js.map +1 -0
- package/lib/esm/__/execa/lib/stdio.js +33 -0
- package/lib/esm/__/execa/lib/stdio.js.map +1 -0
- package/lib/esm/__/execa/lib/stream.js +33 -0
- package/lib/esm/__/execa/lib/stream.js.map +1 -0
- package/lib/esm/__/execa/lib/verbose.js +22 -0
- package/lib/esm/__/execa/lib/verbose.js.map +1 -0
- package/lib/esm/__/get-stream/source/array-buffer.js +2 -0
- package/lib/esm/__/get-stream/source/array-buffer.js.map +1 -0
- package/lib/esm/__/human-signals/build/src/core.js +274 -0
- package/lib/esm/__/human-signals/build/src/core.js.map +1 -0
- package/lib/esm/__/human-signals/build/src/main.js +70 -0
- package/lib/esm/__/human-signals/build/src/main.js.map +1 -0
- package/lib/esm/__/human-signals/build/src/realtime.js +18 -0
- package/lib/esm/__/human-signals/build/src/realtime.js.map +1 -0
- package/lib/esm/__/human-signals/build/src/signals.js +34 -0
- package/lib/esm/__/human-signals/build/src/signals.js.map +1 -0
- package/lib/esm/__/is-stream/index.js +8 -0
- package/lib/esm/__/is-stream/index.js.map +1 -0
- package/lib/esm/__/isexe/index.js +71 -0
- package/lib/esm/__/isexe/index.js.map +1 -0
- package/lib/esm/__/isexe/mode.js +54 -0
- package/lib/esm/__/isexe/mode.js.map +1 -0
- package/lib/esm/__/isexe/windows.js +55 -0
- package/lib/esm/__/isexe/windows.js.map +1 -0
- package/lib/esm/__/java-properties/dist-node/index.js +228 -0
- package/lib/esm/__/java-properties/dist-node/index.js.map +1 -0
- package/lib/esm/__/merge-stream/index.js +53 -0
- package/lib/esm/__/merge-stream/index.js.map +1 -0
- package/lib/esm/__/npm-run-path/__/path-key/index.js +15 -0
- package/lib/esm/__/npm-run-path/__/path-key/index.js.map +1 -0
- package/lib/esm/__/npm-run-path/index.js +55 -0
- package/lib/esm/__/npm-run-path/index.js.map +1 -0
- package/lib/esm/__/path-key/index.js +27 -0
- package/lib/esm/__/path-key/index.js.map +1 -0
- package/lib/esm/__/shebang-command/index.js +31 -0
- package/lib/esm/__/shebang-command/index.js.map +1 -0
- package/lib/esm/__/shebang-regex/index.js +12 -0
- package/lib/esm/__/shebang-regex/index.js.map +1 -0
- package/lib/esm/__/signal-exit/dist/mjs/index.js +251 -0
- package/lib/esm/__/signal-exit/dist/mjs/index.js.map +1 -0
- package/lib/esm/__/signal-exit/dist/mjs/signals.js +41 -0
- package/lib/esm/__/signal-exit/dist/mjs/signals.js.map +1 -0
- package/lib/esm/__/strip-final-newline/index.js +17 -0
- package/lib/esm/__/strip-final-newline/index.js.map +1 -0
- package/lib/esm/__/which/which.js +139 -0
- package/lib/esm/__/which/which.js.map +1 -0
- package/lib/esm/_virtual/_commonjsHelpers.js +8 -0
- package/lib/esm/_virtual/_commonjsHelpers.js.map +1 -0
- package/lib/esm/_virtual/escape.js +4 -0
- package/lib/esm/_virtual/escape.js.map +1 -0
- package/lib/esm/_virtual/index.js +8 -0
- package/lib/esm/_virtual/index.js.map +1 -0
- package/lib/esm/_virtual/index2.js +4 -0
- package/lib/esm/_virtual/index2.js.map +1 -0
- package/lib/esm/_virtual/index3.js +8 -0
- package/lib/esm/_virtual/index3.js.map +1 -0
- package/lib/esm/_virtual/index4.js +4 -0
- package/lib/esm/_virtual/index4.js.map +1 -0
- package/lib/esm/_virtual/index5.js +4 -0
- package/lib/esm/_virtual/index5.js.map +1 -0
- package/lib/esm/_virtual/index6.js +4 -0
- package/lib/esm/_virtual/index6.js.map +1 -0
- package/lib/esm/artifacts/filter-artifacts.js +20 -0
- package/lib/esm/artifacts/filter-artifacts.js.map +1 -0
- package/lib/esm/artifacts/validate-webpack-stats.js +12 -0
- package/lib/esm/artifacts/validate-webpack-stats.js.map +1 -0
- package/lib/esm/artifacts.js +3 -0
- package/lib/esm/artifacts.js.map +1 -0
- package/lib/esm/constants.js +6 -0
- package/lib/esm/constants.js.map +1 -0
- package/lib/esm/index.js +13 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/ingest/ingest.js +78 -0
- package/lib/esm/ingest/ingest.js.map +1 -0
- package/lib/esm/ingest.js +6 -0
- package/lib/esm/ingest.js.map +1 -0
- package/lib/esm/locales/en.js +15 -0
- package/lib/esm/locales/en.js.map +1 -0
- package/lib/esm/package.json +1 -0
- package/lib/esm/utils/debug.js +7 -0
- package/lib/esm/utils/debug.js.map +1 -0
- package/lib/esm/utils/get-commit-message.js +15 -0
- package/lib/esm/utils/get-commit-message.js.map +1 -0
- package/lib/esm/utils/get-env-vars.js +54 -0
- package/lib/esm/utils/get-env-vars.js.map +1 -0
- package/lib/esm/utils/get-slug.js +41 -0
- package/lib/esm/utils/get-slug.js.map +1 -0
- package/lib/esm/utils/log-response.js +17 -0
- package/lib/esm/utils/log-response.js.map +1 -0
- package/lib/esm/utils/logger.js +14 -0
- package/lib/esm/utils/logger.js.map +1 -0
- package/lib/esm/utils/mask-object-property.js +21 -0
- package/lib/esm/utils/mask-object-property.js.map +1 -0
- package/lib/esm/utils/normalize-params.js +60 -0
- package/lib/esm/utils/normalize-params.js.map +1 -0
- package/lib/esm/utils.js +9 -0
- package/lib/esm/utils.js.map +1 -0
- package/lib/types/artifacts/filter-artifacts.d.ts +10 -0
- package/lib/types/artifacts/index.d.ts +2 -0
- package/lib/types/artifacts/validate-webpack-stats.d.ts +1 -0
- package/lib/types/constants.d.ts +111 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/ingest/index.d.ts +2 -0
- package/lib/types/ingest/ingest.d.ts +3 -0
- package/lib/types/ingest/ingest.test.d.ts +1 -0
- package/lib/types/locales/en.d.ts +11 -0
- package/lib/types/utils/debug.d.ts +2 -0
- package/lib/types/utils/get-commit-message.d.ts +1 -0
- package/lib/types/utils/get-env-vars.d.ts +5 -0
- package/lib/types/utils/get-slug.d.ts +9 -0
- package/lib/types/utils/get-slug.test.d.ts +1 -0
- package/lib/types/utils/index.d.ts +8 -0
- package/lib/types/utils/log-response.d.ts +8 -0
- package/lib/types/utils/logger.d.ts +12 -0
- package/lib/types/utils/mask-object-property.d.ts +1 -0
- package/lib/types/utils/normalize-params.d.ts +8 -0
- package/package.json +91 -0
- package/typings.d.ts +5 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var node_buffer = require('node:buffer');
|
|
4
|
+
var path = require('node:path');
|
|
5
|
+
var childProcess = require('node:child_process');
|
|
6
|
+
var process = require('node:process');
|
|
7
|
+
var index = require('../../_virtual/index.js');
|
|
8
|
+
var index$1 = require('../strip-final-newline/index.js');
|
|
9
|
+
var index$2 = require('../npm-run-path/index.js');
|
|
10
|
+
var error = require('./lib/error.js');
|
|
11
|
+
var stdio = require('./lib/stdio.js');
|
|
12
|
+
require('../signal-exit/dist/mjs/index.js');
|
|
13
|
+
var stream = require('./lib/stream.js');
|
|
14
|
+
require('./lib/promise.js');
|
|
15
|
+
var command = require('./lib/command.js');
|
|
16
|
+
var verbose = require('./lib/verbose.js');
|
|
17
|
+
|
|
18
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
|
|
20
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
21
|
+
var childProcess__default = /*#__PURE__*/_interopDefault(childProcess);
|
|
22
|
+
var process__default = /*#__PURE__*/_interopDefault(process);
|
|
23
|
+
|
|
24
|
+
const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;
|
|
25
|
+
|
|
26
|
+
const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {
|
|
27
|
+
const env = extendEnv ? {...process__default.default.env, ...envOption} : envOption;
|
|
28
|
+
|
|
29
|
+
if (preferLocal) {
|
|
30
|
+
return index$2.npmRunPathEnv({env, cwd: localDir, execPath});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return env;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const handleArguments = (file, args, options = {}) => {
|
|
37
|
+
const parsed = index._parse(file, args, options);
|
|
38
|
+
file = parsed.command;
|
|
39
|
+
args = parsed.args;
|
|
40
|
+
options = parsed.options;
|
|
41
|
+
|
|
42
|
+
options = {
|
|
43
|
+
maxBuffer: DEFAULT_MAX_BUFFER,
|
|
44
|
+
buffer: true,
|
|
45
|
+
stripFinalNewline: true,
|
|
46
|
+
extendEnv: true,
|
|
47
|
+
preferLocal: false,
|
|
48
|
+
localDir: options.cwd || process__default.default.cwd(),
|
|
49
|
+
execPath: process__default.default.execPath,
|
|
50
|
+
encoding: 'utf8',
|
|
51
|
+
reject: true,
|
|
52
|
+
cleanup: true,
|
|
53
|
+
all: false,
|
|
54
|
+
windowsHide: true,
|
|
55
|
+
verbose: verbose.verboseDefault,
|
|
56
|
+
...options,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
options.env = getEnv(options);
|
|
60
|
+
|
|
61
|
+
options.stdio = stdio.normalizeStdio(options);
|
|
62
|
+
|
|
63
|
+
if (process__default.default.platform === 'win32' && path__default.default.basename(file, '.exe') === 'cmd') {
|
|
64
|
+
// #116
|
|
65
|
+
args.unshift('/q');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {file, args, options, parsed};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const handleOutput = (options, value, error) => {
|
|
72
|
+
if (typeof value !== 'string' && !node_buffer.Buffer.isBuffer(value)) {
|
|
73
|
+
// When `execaSync()` errors, we normalize it to '' to mimic `execa()`
|
|
74
|
+
return error === undefined ? undefined : '';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (options.stripFinalNewline) {
|
|
78
|
+
return index$1(value);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return value;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
function execaSync(file, args, options) {
|
|
85
|
+
const parsed = handleArguments(file, args, options);
|
|
86
|
+
const command$1 = command.joinCommand(file, args);
|
|
87
|
+
const escapedCommand = command.getEscapedCommand(file, args);
|
|
88
|
+
verbose.logCommand(escapedCommand, parsed.options);
|
|
89
|
+
|
|
90
|
+
const input = stream.handleInputSync(parsed.options);
|
|
91
|
+
|
|
92
|
+
let result;
|
|
93
|
+
try {
|
|
94
|
+
result = childProcess__default.default.spawnSync(parsed.file, parsed.args, {...parsed.options, input});
|
|
95
|
+
} catch (error$1) {
|
|
96
|
+
throw error.makeError({
|
|
97
|
+
error: error$1,
|
|
98
|
+
stdout: '',
|
|
99
|
+
stderr: '',
|
|
100
|
+
all: '',
|
|
101
|
+
command: command$1,
|
|
102
|
+
escapedCommand,
|
|
103
|
+
parsed,
|
|
104
|
+
timedOut: false,
|
|
105
|
+
isCanceled: false,
|
|
106
|
+
killed: false,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
|
111
|
+
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
|
112
|
+
|
|
113
|
+
if (result.error || result.status !== 0 || result.signal !== null) {
|
|
114
|
+
const error$1 = error.makeError({
|
|
115
|
+
stdout,
|
|
116
|
+
stderr,
|
|
117
|
+
error: result.error,
|
|
118
|
+
signal: result.signal,
|
|
119
|
+
exitCode: result.status,
|
|
120
|
+
command: command$1,
|
|
121
|
+
escapedCommand,
|
|
122
|
+
parsed,
|
|
123
|
+
timedOut: result.error && result.error.code === 'ETIMEDOUT',
|
|
124
|
+
isCanceled: false,
|
|
125
|
+
killed: result.signal !== null,
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
if (!parsed.options.reject) {
|
|
129
|
+
return error$1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
throw error$1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
command: command$1,
|
|
137
|
+
escapedCommand,
|
|
138
|
+
exitCode: 0,
|
|
139
|
+
stdout,
|
|
140
|
+
stderr,
|
|
141
|
+
failed: false,
|
|
142
|
+
timedOut: false,
|
|
143
|
+
isCanceled: false,
|
|
144
|
+
killed: false,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
exports.execaSync = execaSync;
|
|
149
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/execa/index.js"],"sourcesContent":["import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n"],"names":["process","npmRunPathEnv","crossSpawn","verboseDefault","normalizeStdio","path","Buffer","stripFinalNewline","command","joinCommand","getEscapedCommand","logCommand","handleInputSync","childProcess","error","makeError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG;;AAE5C,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,KAAK;AACjF,CAAC,MAAM,GAAG,GAAG,SAAS,GAAG,CAAC,GAAGA,wBAAO,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,SAAS;;AAEnE,CAAC,IAAI,WAAW,EAAE;AAClB,EAAE,OAAOC,qBAAa,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtD;;AAEA,CAAC,OAAO,GAAG;AACX,CAAC;;AAED,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAG,EAAE,KAAK;AACtD,CAAC,MAAM,MAAM,GAAGC,KAAU,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC;AACtD,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO;AACtB,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI;AACnB,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO;;AAEzB,CAAC,OAAO,GAAG;AACX,EAAE,SAAS,EAAE,kBAAkB;AAC/B,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,iBAAiB,EAAE,IAAI;AACzB,EAAE,SAAS,EAAE,IAAI;AACjB,EAAE,WAAW,EAAE,KAAK;AACpB,EAAE,QAAQ,EAAE,OAAO,CAAC,GAAG,IAAIF,wBAAO,CAAC,GAAG,EAAE;AACxC,EAAE,QAAQ,EAAEA,wBAAO,CAAC,QAAQ;AAC5B,EAAE,QAAQ,EAAE,MAAM;AAClB,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,OAAO,EAAE,IAAI;AACf,EAAE,GAAG,EAAE,KAAK;AACZ,EAAE,WAAW,EAAE,IAAI;AACnB,EAAE,OAAO,EAAEG,sBAAc;AACzB,EAAE,GAAG,OAAO;AACZ,EAAE;;AAEF,CAAC,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;;AAE9B,CAAC,OAAO,CAAC,KAAK,GAAGC,oBAAc,CAAC,OAAO,CAAC;;AAExC,CAAC,IAAIJ,wBAAO,CAAC,QAAQ,KAAK,OAAO,IAAIK,qBAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,KAAK,EAAE;AAC5E;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;AACpB;;AAEA,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC;AACrC,CAAC;;AAED,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK;AAChD,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAACC,kBAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC3D;AACA,EAAE,OAAO,KAAK,KAAK,SAAS,GAAG,SAAS,GAAG,EAAE;AAC7C;;AAEA,CAAC,IAAI,OAAO,CAAC,iBAAiB,EAAE;AAChC,EAAE,OAAOC,OAAiB,CAAC,KAAK,CAAC;AACjC;;AAEA,CAAC,OAAO,KAAK;AACb,CAAC;;AA+FM,SAAS,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;AAC/C,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC;AACpD,CAAC,MAAMC,SAAO,GAAGC,mBAAW,CAAC,IAAI,EAAE,IAAI,CAAC;AACxC,CAAC,MAAM,cAAc,GAAGC,yBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC;AACrD,CAACC,kBAAU,CAAC,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC;;AAE3C,CAAC,MAAM,KAAK,GAAGC,sBAAe,CAAC,MAAM,CAAC,OAAO,CAAC;;AAE9C,CAAC,IAAI,MAAM;AACX,CAAC,IAAI;AACL,EAAE,MAAM,GAAGC,6BAAY,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACvF,EAAE,CAAC,OAAOC,OAAK,EAAE;AACjB,EAAE,MAAMC,eAAS,CAAC;AAClB,UAAGD,OAAK;AACR,GAAG,MAAM,EAAE,EAAE;AACb,GAAG,MAAM,EAAE,EAAE;AACb,GAAG,GAAG,EAAE,EAAE;AACV,YAAGN,SAAO;AACV,GAAG,cAAc;AACjB,GAAG,MAAM;AACT,GAAG,QAAQ,EAAE,KAAK;AAClB,GAAG,UAAU,EAAE,KAAK;AACpB,GAAG,MAAM,EAAE,KAAK;AAChB,GAAG,CAAC;AACJ;;AAEA,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;AACzE,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;;AAEzE,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,EAAE;AACpE,EAAE,MAAMM,OAAK,GAAGC,eAAS,CAAC;AAC1B,GAAG,MAAM;AACT,GAAG,MAAM;AACT,GAAG,KAAK,EAAE,MAAM,CAAC,KAAK;AACtB,GAAG,MAAM,EAAE,MAAM,CAAC,MAAM;AACxB,GAAG,QAAQ,EAAE,MAAM,CAAC,MAAM;AAC1B,YAAGP,SAAO;AACV,GAAG,cAAc;AACjB,GAAG,MAAM;AACT,GAAG,QAAQ,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,WAAW;AAC9D,GAAG,UAAU,EAAE,KAAK;AACpB,GAAG,MAAM,EAAE,MAAM,CAAC,MAAM,KAAK,IAAI;AACjC,GAAG,CAAC;;AAEJ,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;AAC9B,GAAG,OAAOM,OAAK;AACf;;AAEA,EAAE,MAAMA,OAAK;AACb;;AAEA,CAAC,OAAO;AACR,WAAEN,SAAO;AACT,EAAE,cAAc;AAChB,EAAE,QAAQ,EAAE,CAAC;AACb,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,MAAM,EAAE,KAAK;AACf,EAAE,QAAQ,EAAE,KAAK;AACjB,EAAE,UAAU,EAAE,KAAK;AACnB,EAAE,MAAM,EAAE,KAAK;AACf,EAAE;AACF;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const normalizeArgs = (file, args = []) => {
|
|
4
|
+
if (!Array.isArray(args)) {
|
|
5
|
+
return [file];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return [file, ...args];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const NO_ESCAPE_REGEXP = /^[\w.-]+$/;
|
|
12
|
+
|
|
13
|
+
const escapeArg = arg => {
|
|
14
|
+
if (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {
|
|
15
|
+
return arg;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return `"${arg.replaceAll('"', '\\"')}"`;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const joinCommand = (file, args) => normalizeArgs(file, args).join(' ');
|
|
22
|
+
|
|
23
|
+
const getEscapedCommand = (file, args) => normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' ');
|
|
24
|
+
|
|
25
|
+
exports.getEscapedCommand = getEscapedCommand;
|
|
26
|
+
exports.joinCommand = joinCommand;
|
|
27
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sources":["../../../../../../../node_modules/execa/lib/command.js"],"sourcesContent":["import {Buffer} from 'node:buffer';\nimport {ChildProcess} from 'node:child_process';\n\nconst normalizeArgs = (file, args = []) => {\n\tif (!Array.isArray(args)) {\n\t\treturn [file];\n\t}\n\n\treturn [file, ...args];\n};\n\nconst NO_ESCAPE_REGEXP = /^[\\w.-]+$/;\n\nconst escapeArg = arg => {\n\tif (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {\n\t\treturn arg;\n\t}\n\n\treturn `\"${arg.replaceAll('\"', '\\\\\"')}\"`;\n};\n\nexport const joinCommand = (file, args) => normalizeArgs(file, args).join(' ');\n\nexport const getEscapedCommand = (file, args) => normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' ');\n\nconst SPACES_REGEXP = / +/g;\n\n// Handle `execaCommand()`\nexport const parseCommand = command => {\n\tconst tokens = [];\n\tfor (const token of command.trim().split(SPACES_REGEXP)) {\n\t\t// Allow spaces to be escaped by a backslash if not meant as a delimiter\n\t\tconst previousToken = tokens.at(-1);\n\t\tif (previousToken && previousToken.endsWith('\\\\')) {\n\t\t\t// Merge previous token with current one\n\t\t\ttokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;\n\t\t} else {\n\t\t\ttokens.push(token);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nconst parseExpression = expression => {\n\tconst typeOfExpression = typeof expression;\n\n\tif (typeOfExpression === 'string') {\n\t\treturn expression;\n\t}\n\n\tif (typeOfExpression === 'number') {\n\t\treturn String(expression);\n\t}\n\n\tif (\n\t\ttypeOfExpression === 'object'\n\t\t&& expression !== null\n\t\t&& !(expression instanceof ChildProcess)\n\t\t&& 'stdout' in expression\n\t) {\n\t\tconst typeOfStdout = typeof expression.stdout;\n\n\t\tif (typeOfStdout === 'string') {\n\t\t\treturn expression.stdout;\n\t\t}\n\n\t\tif (Buffer.isBuffer(expression.stdout)) {\n\t\t\treturn expression.stdout.toString();\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected \"${typeOfStdout}\" stdout in template expression`);\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeOfExpression}\" in template expression`);\n};\n\nconst concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0\n\t? [...tokens, ...nextTokens]\n\t: [\n\t\t...tokens.slice(0, -1),\n\t\t`${tokens.at(-1)}${nextTokens[0]}`,\n\t\t...nextTokens.slice(1),\n\t];\n\nconst parseTemplate = ({templates, expressions, tokens, index, template}) => {\n\tconst templateString = template ?? templates.raw[index];\n\tconst templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);\n\tconst newTokens = concatTokens(\n\t\ttokens,\n\t\ttemplateTokens,\n\t\ttemplateString.startsWith(' '),\n\t);\n\n\tif (index === expressions.length) {\n\t\treturn newTokens;\n\t}\n\n\tconst expression = expressions[index];\n\tconst expressionTokens = Array.isArray(expression)\n\t\t? expression.map(expression => parseExpression(expression))\n\t\t: [parseExpression(expression)];\n\treturn concatTokens(\n\t\tnewTokens,\n\t\texpressionTokens,\n\t\ttemplateString.endsWith(' '),\n\t);\n};\n\nexport const parseTemplates = (templates, expressions) => {\n\tlet tokens = [];\n\n\tfor (const [index, template] of templates.entries()) {\n\t\ttokens = parseTemplate({templates, expressions, tokens, index, template});\n\t}\n\n\treturn tokens;\n};\n\n"],"names":[],"mappings":";;AAGA,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,KAAK;AAC3C,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AAC3B,EAAE,OAAO,CAAC,IAAI,CAAC;AACf;;AAEA,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC;AACvB,CAAC;;AAED,MAAM,gBAAgB,GAAG,WAAW;;AAEpC,MAAM,SAAS,GAAG,GAAG,IAAI;AACzB,CAAC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC5D,EAAE,OAAO,GAAG;AACZ;;AAEA,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;;AAEW,MAAC,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG;;AAEjE,MAAC,iBAAiB,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var process = require('node:process');
|
|
4
|
+
var main = require('../../human-signals/build/src/main.js');
|
|
5
|
+
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var process__default = /*#__PURE__*/_interopDefault(process);
|
|
9
|
+
|
|
10
|
+
const getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {
|
|
11
|
+
if (timedOut) {
|
|
12
|
+
return `timed out after ${timeout} milliseconds`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (errorCode !== undefined) {
|
|
16
|
+
return `failed with ${errorCode}`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (signal !== undefined) {
|
|
20
|
+
return `was killed with ${signal} (${signalDescription})`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (exitCode !== undefined) {
|
|
24
|
+
return `failed with exit code ${exitCode}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return 'failed';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const makeError = ({
|
|
31
|
+
stdout,
|
|
32
|
+
stderr,
|
|
33
|
+
all,
|
|
34
|
+
error,
|
|
35
|
+
signal,
|
|
36
|
+
exitCode,
|
|
37
|
+
command,
|
|
38
|
+
escapedCommand,
|
|
39
|
+
timedOut,
|
|
40
|
+
isCanceled,
|
|
41
|
+
killed,
|
|
42
|
+
parsed: {options: {timeout, cwd = process__default.default.cwd()}},
|
|
43
|
+
}) => {
|
|
44
|
+
// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.
|
|
45
|
+
// We normalize them to `undefined`
|
|
46
|
+
exitCode = exitCode === null ? undefined : exitCode;
|
|
47
|
+
signal = signal === null ? undefined : signal;
|
|
48
|
+
const signalDescription = signal === undefined ? undefined : main.signalsByName[signal].description;
|
|
49
|
+
|
|
50
|
+
const errorCode = error && error.code;
|
|
51
|
+
|
|
52
|
+
const prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});
|
|
53
|
+
const execaMessage = `Command ${prefix}: ${command}`;
|
|
54
|
+
const isError = Object.prototype.toString.call(error) === '[object Error]';
|
|
55
|
+
const shortMessage = isError ? `${execaMessage}\n${error.message}` : execaMessage;
|
|
56
|
+
const message = [shortMessage, stderr, stdout].filter(Boolean).join('\n');
|
|
57
|
+
|
|
58
|
+
if (isError) {
|
|
59
|
+
error.originalMessage = error.message;
|
|
60
|
+
error.message = message;
|
|
61
|
+
} else {
|
|
62
|
+
error = new Error(message);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
error.shortMessage = shortMessage;
|
|
66
|
+
error.command = command;
|
|
67
|
+
error.escapedCommand = escapedCommand;
|
|
68
|
+
error.exitCode = exitCode;
|
|
69
|
+
error.signal = signal;
|
|
70
|
+
error.signalDescription = signalDescription;
|
|
71
|
+
error.stdout = stdout;
|
|
72
|
+
error.stderr = stderr;
|
|
73
|
+
error.cwd = cwd;
|
|
74
|
+
|
|
75
|
+
if (all !== undefined) {
|
|
76
|
+
error.all = all;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if ('bufferedData' in error) {
|
|
80
|
+
delete error.bufferedData;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
error.failed = true;
|
|
84
|
+
error.timedOut = Boolean(timedOut);
|
|
85
|
+
error.isCanceled = isCanceled;
|
|
86
|
+
error.killed = killed && !timedOut;
|
|
87
|
+
|
|
88
|
+
return error;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
exports.makeError = makeError;
|
|
92
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sources":["../../../../../../../node_modules/execa/lib/error.js"],"sourcesContent":["import process from 'node:process';\nimport {signalsByName} from 'human-signals';\n\nconst getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {\n\tif (timedOut) {\n\t\treturn `timed out after ${timeout} milliseconds`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn 'was canceled';\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `failed with ${errorCode}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'failed';\n};\n\nexport const makeError = ({\n\tstdout,\n\tstderr,\n\tall,\n\terror,\n\tsignal,\n\texitCode,\n\tcommand,\n\tescapedCommand,\n\ttimedOut,\n\tisCanceled,\n\tkilled,\n\tparsed: {options: {timeout, cwd = process.cwd()}},\n}) => {\n\t// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.\n\t// We normalize them to `undefined`\n\texitCode = exitCode === null ? undefined : exitCode;\n\tsignal = signal === null ? undefined : signal;\n\tconst signalDescription = signal === undefined ? undefined : signalsByName[signal].description;\n\n\tconst errorCode = error && error.code;\n\n\tconst prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});\n\tconst execaMessage = `Command ${prefix}: ${command}`;\n\tconst isError = Object.prototype.toString.call(error) === '[object Error]';\n\tconst shortMessage = isError ? `${execaMessage}\\n${error.message}` : execaMessage;\n\tconst message = [shortMessage, stderr, stdout].filter(Boolean).join('\\n');\n\n\tif (isError) {\n\t\terror.originalMessage = error.message;\n\t\terror.message = message;\n\t} else {\n\t\terror = new Error(message);\n\t}\n\n\terror.shortMessage = shortMessage;\n\terror.command = command;\n\terror.escapedCommand = escapedCommand;\n\terror.exitCode = exitCode;\n\terror.signal = signal;\n\terror.signalDescription = signalDescription;\n\terror.stdout = stdout;\n\terror.stderr = stderr;\n\terror.cwd = cwd;\n\n\tif (all !== undefined) {\n\t\terror.all = all;\n\t}\n\n\tif ('bufferedData' in error) {\n\t\tdelete error.bufferedData;\n\t}\n\n\terror.failed = true;\n\terror.timedOut = Boolean(timedOut);\n\terror.isCanceled = isCanceled;\n\terror.killed = killed && !timedOut;\n\n\treturn error;\n};\n"],"names":["process","signalsByName"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line unicorn/prefer-top-level-await
|
|
4
|
+
const nativePromisePrototype = (async () => {})().constructor.prototype;
|
|
5
|
+
|
|
6
|
+
['then', 'catch', 'finally'].map(property => [
|
|
7
|
+
property,
|
|
8
|
+
Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property),
|
|
9
|
+
]);
|
|
10
|
+
//# sourceMappingURL=promise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promise.js","sources":["../../../../../../../node_modules/execa/lib/promise.js"],"sourcesContent":["// eslint-disable-next-line unicorn/prefer-top-level-await\nconst nativePromisePrototype = (async () => {})().constructor.prototype;\n\nconst descriptors = ['then', 'catch', 'finally'].map(property => [\n\tproperty,\n\tReflect.getOwnPropertyDescriptor(nativePromisePrototype, property),\n]);\n\n// The return value is a mixin of `childProcess` and `Promise`\nexport const mergePromise = (spawned, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\t// Starting the main `promise` is deferred to avoid consuming streams\n\t\tconst value = typeof promise === 'function'\n\t\t\t? (...args) => Reflect.apply(descriptor.value, promise(), args)\n\t\t\t: descriptor.value.bind(promise);\n\n\t\tReflect.defineProperty(spawned, property, {...descriptor, value});\n\t}\n};\n\n// Use promises instead of `child_process` events\nexport const getSpawnedPromise = spawned => new Promise((resolve, reject) => {\n\tspawned.on('exit', (exitCode, signal) => {\n\t\tresolve({exitCode, signal});\n\t});\n\n\tspawned.on('error', error => {\n\t\treject(error);\n\t});\n\n\tif (spawned.stdin) {\n\t\tspawned.stdin.on('error', error => {\n\t\t\treject(error);\n\t\t});\n\t}\n});\n"],"names":[],"mappings":";;AAAA;AACA,MAAM,sBAAsB,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,WAAW,CAAC,SAAS;;AAEnD,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,QAAQ,IAAI;AACjE,CAAC,QAAQ;AACT,CAAC,OAAO,CAAC,wBAAwB,CAAC,sBAAsB,EAAE,QAAQ,CAAC;AACnE,CAAC;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const aliases = ['stdin', 'stdout', 'stderr'];
|
|
4
|
+
|
|
5
|
+
const hasAlias = options => aliases.some(alias => options[alias] !== undefined);
|
|
6
|
+
|
|
7
|
+
const normalizeStdio = options => {
|
|
8
|
+
if (!options) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const {stdio} = options;
|
|
13
|
+
|
|
14
|
+
if (stdio === undefined) {
|
|
15
|
+
return aliases.map(alias => options[alias]);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (hasAlias(options)) {
|
|
19
|
+
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (typeof stdio === 'string') {
|
|
23
|
+
return stdio;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (!Array.isArray(stdio)) {
|
|
27
|
+
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const length = Math.max(stdio.length, aliases.length);
|
|
31
|
+
return Array.from({length}, (value, index) => stdio[index]);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.normalizeStdio = normalizeStdio;
|
|
35
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.js","sources":["../../../../../../../node_modules/execa/lib/stdio.js"],"sourcesContent":["const aliases = ['stdin', 'stdout', 'stderr'];\n\nconst hasAlias = options => aliases.some(alias => options[alias] !== undefined);\n\nexport const normalizeStdio = options => {\n\tif (!options) {\n\t\treturn;\n\t}\n\n\tconst {stdio} = options;\n\n\tif (stdio === undefined) {\n\t\treturn aliases.map(alias => options[alias]);\n\t}\n\n\tif (hasAlias(options)) {\n\t\tthrow new Error(`It's not possible to provide \\`stdio\\` in combination with one of ${aliases.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn stdio;\n\t}\n\n\tif (!Array.isArray(stdio)) {\n\t\tthrow new TypeError(`Expected \\`stdio\\` to be of type \\`string\\` or \\`Array\\`, got \\`${typeof stdio}\\``);\n\t}\n\n\tconst length = Math.max(stdio.length, aliases.length);\n\treturn Array.from({length}, (value, index) => stdio[index]);\n};\n\n// `ipc` is pushed unless it is already present\nexport const normalizeStdioNode = options => {\n\tconst stdio = normalizeStdio(options);\n\n\tif (stdio === 'ipc') {\n\t\treturn 'ipc';\n\t}\n\n\tif (stdio === undefined || typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio, 'ipc'];\n\t}\n\n\tif (stdio.includes('ipc')) {\n\t\treturn stdio;\n\t}\n\n\treturn [...stdio, 'ipc'];\n};\n"],"names":[],"mappings":";;AAAA,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC;;AAE7C,MAAM,QAAQ,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC;;AAEnE,MAAC,cAAc,GAAG,OAAO,IAAI;AACzC,CAAC,IAAI,CAAC,OAAO,EAAE;AACf,EAAE;AACF;;AAEA,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO;;AAExB,CAAC,IAAI,KAAK,KAAK,SAAS,EAAE;AAC1B,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7C;;AAEA,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE;AACxB,EAAE,MAAM,IAAI,KAAK,CAAC,CAAC,kEAAkE,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACzI;;AAEA,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAChC,EAAE,OAAO,KAAK;AACd;;AAEA,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC5B,EAAE,MAAM,IAAI,SAAS,CAAC,CAAC,gEAAgE,EAAE,OAAO,KAAK,CAAC,EAAE,CAAC,CAAC;AAC1G;;AAEA,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;AACtD,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC;AAC5D;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var require$$0 = require('node:fs');
|
|
4
|
+
var index = require('../../is-stream/index.js');
|
|
5
|
+
require('../../get-stream/source/array-buffer.js');
|
|
6
|
+
require('../../../_virtual/index2.js');
|
|
7
|
+
|
|
8
|
+
const validateInputOptions = input => {
|
|
9
|
+
if (input !== undefined) {
|
|
10
|
+
throw new TypeError('The `input` and `inputFile` options cannot be both set.');
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const getInputSync = ({input, inputFile}) => {
|
|
15
|
+
if (typeof inputFile !== 'string') {
|
|
16
|
+
return input;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
validateInputOptions(input);
|
|
20
|
+
return require$$0.readFileSync(inputFile);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// `input` and `inputFile` option in sync mode
|
|
24
|
+
const handleInputSync = options => {
|
|
25
|
+
const input = getInputSync(options);
|
|
26
|
+
|
|
27
|
+
if (index.isStream(input)) {
|
|
28
|
+
throw new TypeError('The `input` option cannot be a stream in sync mode');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return input;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.handleInputSync = handleInputSync;
|
|
35
|
+
//# sourceMappingURL=stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.js","sources":["../../../../../../../node_modules/execa/lib/stream.js"],"sourcesContent":["import {createReadStream, readFileSync} from 'node:fs';\nimport {setTimeout} from 'node:timers/promises';\nimport {isStream} from 'is-stream';\nimport getStream, {getStreamAsBuffer} from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\t// Wait for the `all` stream to receive the last chunk before destroying the stream\n\tawait setTimeout(0);\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\t// eslint-disable-next-line unicorn/text-encoding-identifier-case\n\tif (encoding === 'utf8' || encoding === 'utf-8') {\n\t\treturn getStream(stream, {maxBuffer});\n\t}\n\n\tif (encoding === null || encoding === 'buffer') {\n\t\treturn getStreamAsBuffer(stream, {maxBuffer});\n\t}\n\n\treturn applyEncoding(stream, maxBuffer, encoding);\n};\n\nconst applyEncoding = async (stream, maxBuffer, encoding) => {\n\tconst buffer = await getStreamAsBuffer(stream, {maxBuffer});\n\treturn buffer.toString(encoding);\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n"],"names":["readFileSync","isStream"],"mappings":";;;;;;;AAMA,MAAM,oBAAoB,GAAG,KAAK,IAAI;AACtC,CAAC,IAAI,KAAK,KAAK,SAAS,EAAE;AAC1B,EAAE,MAAM,IAAI,SAAS,CAAC,yDAAyD,CAAC;AAChF;AACA,CAAC;;AAED,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK;AAC7C,CAAC,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;AACpC,EAAE,OAAO,KAAK;AACd;;AAEA,CAAC,oBAAoB,CAAC,KAAK,CAAC;AAC5B,CAAC,OAAOA,uBAAY,CAAC,SAAS,CAAC;AAC/B,CAAC;;AAED;AACY,MAAC,eAAe,GAAG,OAAO,IAAI;AAC1C,CAAC,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC;;AAEpC,CAAC,IAAIC,cAAQ,CAAC,KAAK,CAAC,EAAE;AACtB,EAAE,MAAM,IAAI,SAAS,CAAC,oDAAoD,CAAC;AAC3E;;AAEA,CAAC,OAAO,KAAK;AACb;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var node_util = require('node:util');
|
|
4
|
+
var process = require('node:process');
|
|
5
|
+
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var process__default = /*#__PURE__*/_interopDefault(process);
|
|
9
|
+
|
|
10
|
+
const verboseDefault = node_util.debuglog('execa').enabled;
|
|
11
|
+
|
|
12
|
+
const padField = (field, padding) => String(field).padStart(padding, '0');
|
|
13
|
+
|
|
14
|
+
const getTimestamp = () => {
|
|
15
|
+
const date = new Date();
|
|
16
|
+
return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const logCommand = (escapedCommand, {verbose}) => {
|
|
20
|
+
if (!verbose) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
process__default.default.stderr.write(`[${getTimestamp()}] ${escapedCommand}\n`);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.logCommand = logCommand;
|
|
28
|
+
exports.verboseDefault = verboseDefault;
|
|
29
|
+
//# sourceMappingURL=verbose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verbose.js","sources":["../../../../../../../node_modules/execa/lib/verbose.js"],"sourcesContent":["import {debuglog} from 'node:util';\nimport process from 'node:process';\n\nexport const verboseDefault = debuglog('execa').enabled;\n\nconst padField = (field, padding) => String(field).padStart(padding, '0');\n\nconst getTimestamp = () => {\n\tconst date = new Date();\n\treturn `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;\n};\n\nexport const logCommand = (escapedCommand, {verbose}) => {\n\tif (!verbose) {\n\t\treturn;\n\t}\n\n\tprocess.stderr.write(`[${getTimestamp()}] ${escapedCommand}\\n`);\n};\n"],"names":["debuglog","process"],"mappings":";;;;;;;;;AAGY,MAAC,cAAc,GAAGA,kBAAQ,CAAC,OAAO,CAAC,CAAC;;AAEhD,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;;AAEzE,MAAM,YAAY,GAAG,MAAM;AAC3B,CAAC,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE;AACxB,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AACpJ,CAAC;;AAEW,MAAC,UAAU,GAAG,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,KAAK;AACzD,CAAC,IAAI,CAAC,OAAO,EAAE;AACf,EAAE;AACF;;AAEA,CAACC,wBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC;AAChE;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array-buffer.js","sources":["../../../../../../../node_modules/get-stream/source/array-buffer.js"],"sourcesContent":["import {getStreamContents} from './contents.js';\nimport {noop, throwObjectStream, getLengthProp} from './utils.js';\n\nexport async function getStreamAsArrayBuffer(stream, options) {\n\treturn getStreamContents(stream, arrayBufferMethods, options);\n}\n\nconst initArrayBuffer = () => ({contents: new ArrayBuffer(0)});\n\nconst useTextEncoder = chunk => textEncoder.encode(chunk);\nconst textEncoder = new TextEncoder();\n\nconst useUint8Array = chunk => new Uint8Array(chunk);\n\nconst useUint8ArrayWithOffset = chunk => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength);\n\nconst truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);\n\n// `contents` is an increasingly growing `Uint8Array`.\nconst addArrayBufferChunk = (convertedChunk, {contents, length: previousLength}, length) => {\n\tconst newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);\n\tnew Uint8Array(newContents).set(convertedChunk, previousLength);\n\treturn newContents;\n};\n\n// Without `ArrayBuffer.resize()`, `contents` size is always a power of 2.\n// This means its last bytes are zeroes (not stream data), which need to be\n// trimmed at the end with `ArrayBuffer.slice()`.\nconst resizeArrayBufferSlow = (contents, length) => {\n\tif (length <= contents.byteLength) {\n\t\treturn contents;\n\t}\n\n\tconst arrayBuffer = new ArrayBuffer(getNewContentsLength(length));\n\tnew Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);\n\treturn arrayBuffer;\n};\n\n// With `ArrayBuffer.resize()`, `contents` size matches exactly the size of\n// the stream data. It does not include extraneous zeroes to trim at the end.\n// The underlying `ArrayBuffer` does allocate a number of bytes that is a power\n// of 2, but those bytes are only visible after calling `ArrayBuffer.resize()`.\nconst resizeArrayBuffer = (contents, length) => {\n\tif (length <= contents.maxByteLength) {\n\t\tcontents.resize(length);\n\t\treturn contents;\n\t}\n\n\tconst arrayBuffer = new ArrayBuffer(length, {maxByteLength: getNewContentsLength(length)});\n\tnew Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);\n\treturn arrayBuffer;\n};\n\n// Retrieve the closest `length` that is both >= and a power of 2\nconst getNewContentsLength = length => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR));\n\nconst SCALE_FACTOR = 2;\n\nconst finalizeArrayBuffer = ({contents, length}) => hasArrayBufferResize() ? contents : contents.slice(0, length);\n\n// `ArrayBuffer.slice()` is slow. When `ArrayBuffer.resize()` is available\n// (Node >=20.0.0, Safari >=16.4 and Chrome), we can use it instead.\n// eslint-disable-next-line no-warning-comments\n// TODO: remove after dropping support for Node 20.\n// eslint-disable-next-line no-warning-comments\n// TODO: use `ArrayBuffer.transferToFixedLength()` instead once it is available\nconst hasArrayBufferResize = () => 'resize' in ArrayBuffer.prototype;\n\nconst arrayBufferMethods = {\n\tinit: initArrayBuffer,\n\tconvertChunk: {\n\t\tstring: useTextEncoder,\n\t\tbuffer: useUint8Array,\n\t\tarrayBuffer: useUint8Array,\n\t\tdataView: useUint8ArrayWithOffset,\n\t\ttypedArray: useUint8ArrayWithOffset,\n\t\tothers: throwObjectStream,\n\t},\n\tgetSize: getLengthProp,\n\ttruncateChunk: truncateArrayBufferChunk,\n\taddChunk: addArrayBufferChunk,\n\tgetFinalChunk: noop,\n\tfinalize: finalizeArrayBuffer,\n};\n"],"names":[],"mappings":";;AAUoB,IAAI,WAAW;;","x_google_ignoreList":[0]}
|