projen 0.99.71 → 0.99.73
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/.jsii +3 -3
- package/lib/ai-instructions.js +2 -2
- package/lib/awscdk/auto-discover.js +6 -6
- package/lib/awscdk/awscdk-app-java.js +1 -1
- package/lib/awscdk/awscdk-app-py.js +1 -1
- package/lib/awscdk/awscdk-app-ts.js +1 -1
- package/lib/awscdk/awscdk-construct.js +2 -2
- package/lib/awscdk/awscdk-deps-java.js +1 -1
- package/lib/awscdk/awscdk-deps-js.js +1 -1
- package/lib/awscdk/awscdk-deps-py.js +1 -1
- package/lib/awscdk/awscdk-deps.js +1 -1
- package/lib/awscdk/cdk-config.js +4 -4
- package/lib/awscdk/cdk-tasks.js +1 -1
- package/lib/awscdk/integration-test.js +1 -1
- package/lib/awscdk/lambda-extension.js +1 -1
- package/lib/awscdk/lambda-function.js +2 -2
- package/lib/awscdk/private/feature-flags-v2.const.d.ts +1 -1
- package/lib/awscdk/private/feature-flags-v2.const.js +2 -2
- package/lib/build/build-workflow.js +1 -1
- package/lib/cdk/auto-discover-base.js +2 -2
- package/lib/cdk/construct-lib.js +1 -1
- package/lib/cdk/integration-test-base.js +1 -1
- package/lib/cdk/jsii-build.js +1 -1
- package/lib/cdk/jsii-docgen.js +1 -1
- package/lib/cdk/jsii-project.js +1 -1
- package/lib/cdk8s/auto-discover.js +2 -2
- package/lib/cdk8s/cdk8s-app-py.js +1 -1
- package/lib/cdk8s/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s/cdk8s-construct.js +1 -1
- package/lib/cdk8s/cdk8s-deps-py.js +1 -1
- package/lib/cdk8s/cdk8s-deps.js +1 -1
- package/lib/cdk8s/integration-test.js +1 -1
- package/lib/cdktf/cdktf-construct.js +1 -1
- package/lib/circleci/circleci.js +1 -1
- package/lib/component.js +1 -1
- package/lib/dependencies.js +1 -1
- package/lib/dev-env.js +1 -1
- package/lib/docker-compose/docker-compose-service.js +1 -1
- package/lib/docker-compose/docker-compose.js +1 -1
- package/lib/file.js +1 -1
- package/lib/gitattributes.js +1 -1
- package/lib/github/actions-provider.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/auto-queue.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/dependency-review.js +1 -1
- package/lib/github/github-credentials.js +1 -1
- package/lib/github/github-project.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/merge-queue.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/pull-request-backport.js +1 -1
- package/lib/github/pull-request-lint.js +1 -1
- package/lib/github/stale.js +1 -1
- package/lib/github/task-workflow-job.js +1 -1
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflow-actions.js +1 -1
- package/lib/github/workflow-jobs.js +1 -1
- package/lib/github/workflow-steps.js +1 -1
- package/lib/github/workflows.js +1 -1
- package/lib/gitlab/configuration.js +1 -1
- package/lib/gitlab/gitlab-configuration.js +1 -1
- package/lib/gitlab/nested-configuration.js +1 -1
- package/lib/gitpod.js +1 -1
- package/lib/ignore-file.js +1 -1
- package/lib/ini.js +1 -1
- package/lib/java/java-project.js +1 -1
- package/lib/java/junit.js +1 -1
- package/lib/java/maven-compile.js +1 -1
- package/lib/java/maven-packaging.js +1 -1
- package/lib/java/maven-sample.js +1 -1
- package/lib/java/pom.js +2 -2
- package/lib/java/projenrc.js +1 -1
- package/lib/javascript/biome/biome.js +1 -1
- package/lib/javascript/bundler.js +1 -1
- package/lib/javascript/eslint.js +1 -1
- package/lib/javascript/jest.js +4 -4
- package/lib/javascript/license-checker.js +1 -1
- package/lib/javascript/node-package.js +1 -1
- package/lib/javascript/node-project.js +1 -1
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/prettier.js +1 -1
- package/lib/javascript/projenrc.js +1 -1
- package/lib/javascript/typescript-config.js +2 -2
- package/lib/javascript/upgrade-dependencies.js +2 -2
- package/lib/javascript/yarnrc.js +1 -1
- package/lib/json-patch.js +1 -1
- package/lib/json.js +1 -1
- package/lib/license.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/makefile.js +1 -1
- package/lib/object-file.js +1 -1
- package/lib/project-build.js +1 -1
- package/lib/project-tree.js +1 -1
- package/lib/project.js +1 -1
- package/lib/projects.js +1 -1
- package/lib/projenrc-json.js +2 -2
- package/lib/projenrc.js +1 -1
- package/lib/python/pip.js +1 -1
- package/lib/python/poetry.js +2 -2
- package/lib/python/projenrc.js +1 -1
- package/lib/python/pyproject-toml-file.js +1 -1
- package/lib/python/pytest-sample.js +1 -1
- package/lib/python/pytest.js +1 -1
- package/lib/python/python-project.js +1 -1
- package/lib/python/python-sample.js +1 -1
- package/lib/python/requirements-file.js +1 -1
- package/lib/python/setuppy.js +1 -1
- package/lib/python/setuptools.js +1 -1
- package/lib/python/uv.js +1 -1
- package/lib/python/venv.js +1 -1
- package/lib/readme.js +1 -1
- package/lib/release/publisher.js +1 -1
- package/lib/release/release-trigger.js +1 -1
- package/lib/release/release.js +1 -1
- package/lib/renovatebot.js +1 -1
- package/lib/sample-file.js +2 -2
- package/lib/semver.js +1 -1
- package/lib/source-code.js +1 -1
- package/lib/task-runtime.js +1 -1
- package/lib/task.js +1 -1
- package/lib/tasks.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/textfile.js +1 -1
- package/lib/toml.js +1 -1
- package/lib/typescript/projenrc-ts.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript/typescript-typedoc.js +1 -1
- package/lib/typescript/typescript.js +6 -6
- package/lib/version.js +2 -2
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/extensions.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/settings.js +1 -1
- package/lib/vscode/vscode.js +1 -1
- package/lib/web/next.js +3 -3
- package/lib/web/postcss.js +1 -1
- package/lib/web/react.js +4 -4
- package/lib/web/tailwind.js +1 -1
- package/lib/xmlfile.js +1 -1
- package/lib/yaml.js +1 -1
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/README.md +10 -15
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/enoent.js +1 -1
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/parse.js +1 -35
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/util/readShebang.js +1 -10
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/util/resolveCommand.js +4 -3
- package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/package.json +23 -25
- package/node_modules/execa/index.d.ts +564 -0
- package/node_modules/execa/index.js +268 -0
- package/node_modules/execa/lib/command.js +52 -0
- package/node_modules/execa/lib/error.js +88 -0
- package/node_modules/execa/lib/kill.js +115 -0
- package/node_modules/execa/lib/promise.js +46 -0
- package/node_modules/execa/lib/stdio.js +52 -0
- package/node_modules/execa/lib/stream.js +97 -0
- package/node_modules/execa/license +9 -0
- package/node_modules/execa/package.json +74 -0
- package/node_modules/execa/readme.md +663 -0
- package/node_modules/fastq/README.md +0 -2
- package/node_modules/fastq/eslint.config.js +11 -0
- package/node_modules/fastq/example.mjs +0 -2
- package/node_modules/fastq/index.d.ts +2 -0
- package/node_modules/fastq/package.json +5 -9
- package/node_modules/fastq/queue.js +36 -1
- package/node_modules/fastq/test/promise.js +34 -0
- package/node_modules/fastq/test/test.js +80 -0
- package/node_modules/get-stream/buffer-stream.js +52 -0
- package/node_modules/get-stream/index.d.ts +105 -0
- package/node_modules/get-stream/index.js +61 -0
- package/node_modules/get-stream/license +9 -0
- package/node_modules/{shelljs/node_modules/get-stream → get-stream}/package.json +11 -10
- package/node_modules/{shelljs/node_modules/get-stream → get-stream}/readme.md +19 -18
- package/node_modules/human-signals/LICENSE +201 -0
- package/node_modules/human-signals/README.md +165 -0
- package/node_modules/human-signals/build/src/core.js +273 -0
- package/node_modules/human-signals/build/src/core.js.map +1 -0
- package/node_modules/human-signals/build/src/main.d.ts +52 -0
- package/node_modules/human-signals/build/src/main.js +71 -0
- package/node_modules/human-signals/build/src/main.js.map +1 -0
- package/node_modules/human-signals/build/src/realtime.js +19 -0
- package/node_modules/human-signals/build/src/realtime.js.map +1 -0
- package/node_modules/human-signals/build/src/signals.js +35 -0
- package/node_modules/human-signals/build/src/signals.js.map +1 -0
- package/node_modules/human-signals/package.json +64 -0
- package/node_modules/is-stream/index.d.ts +79 -0
- package/node_modules/is-stream/index.js +28 -0
- package/node_modules/is-stream/license +9 -0
- package/node_modules/is-stream/package.json +42 -0
- package/node_modules/is-stream/readme.md +60 -0
- package/node_modules/js-yaml/README.md +4 -20
- package/node_modules/js-yaml/bin/js-yaml.js +53 -62
- package/node_modules/js-yaml/dist/js-yaml.js +2404 -3880
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js +33 -2
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs +2381 -3855
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -0
- package/node_modules/js-yaml/index.js +32 -35
- package/node_modules/js-yaml/lib/common.js +28 -37
- package/node_modules/js-yaml/lib/dumper.js +450 -478
- package/node_modules/js-yaml/lib/exception.js +23 -27
- package/node_modules/js-yaml/lib/index_vite_proxy.tmp.mjs +37 -0
- package/node_modules/js-yaml/lib/loader.js +927 -866
- package/node_modules/js-yaml/lib/schema/core.js +2 -4
- package/node_modules/js-yaml/lib/schema/default.js +2 -4
- package/node_modules/js-yaml/lib/schema/failsafe.js +3 -6
- package/node_modules/js-yaml/lib/schema/json.js +2 -4
- package/node_modules/js-yaml/lib/schema.js +56 -68
- package/node_modules/js-yaml/lib/snippet.js +47 -52
- package/node_modules/js-yaml/lib/type/binary.js +61 -64
- package/node_modules/js-yaml/lib/type/bool.js +14 -14
- package/node_modules/js-yaml/lib/type/float.js +47 -45
- package/node_modules/js-yaml/lib/type/int.js +65 -79
- package/node_modules/js-yaml/lib/type/map.js +4 -4
- package/node_modules/js-yaml/lib/type/merge.js +5 -5
- package/node_modules/js-yaml/lib/type/null.js +16 -16
- package/node_modules/js-yaml/lib/type/omap.js +22 -21
- package/node_modules/js-yaml/lib/type/pairs.js +24 -27
- package/node_modules/js-yaml/lib/type/seq.js +4 -4
- package/node_modules/js-yaml/lib/type/set.js +12 -12
- package/node_modules/js-yaml/lib/type/str.js +4 -4
- package/node_modules/js-yaml/lib/type/timestamp.js +53 -53
- package/node_modules/js-yaml/lib/type.js +30 -30
- package/node_modules/js-yaml/package.json +32 -21
- package/node_modules/{nice-try → merge-stream}/LICENSE +1 -1
- package/node_modules/merge-stream/README.md +78 -0
- package/node_modules/merge-stream/index.js +41 -0
- package/node_modules/merge-stream/package.json +19 -0
- package/node_modules/mimic-fn/index.d.ts +54 -0
- package/node_modules/mimic-fn/index.js +13 -0
- package/node_modules/mimic-fn/package.json +42 -0
- package/node_modules/mimic-fn/readme.md +69 -0
- package/node_modules/npm-run-path/index.d.ts +89 -0
- package/node_modules/npm-run-path/index.js +47 -0
- package/node_modules/npm-run-path/package.json +44 -0
- package/node_modules/{shelljs/node_modules/npm-run-path → npm-run-path}/readme.md +39 -5
- package/node_modules/onetime/index.d.ts +64 -0
- package/node_modules/onetime/index.js +44 -0
- package/node_modules/onetime/license +9 -0
- package/node_modules/onetime/package.json +43 -0
- package/node_modules/onetime/readme.md +94 -0
- package/node_modules/path-key/index.d.ts +40 -0
- package/node_modules/path-key/index.js +16 -0
- package/node_modules/path-key/license +9 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/{shelljs/node_modules/path-key → path-key}/readme.md +15 -5
- package/node_modules/semver/classes/range.js +11 -2
- package/node_modules/semver/package.json +2 -2
- package/node_modules/shebang-command/index.js +19 -0
- package/node_modules/shebang-command/license +9 -0
- package/node_modules/shebang-command/package.json +34 -0
- package/node_modules/{shelljs/node_modules/shebang-command → shebang-command}/readme.md +1 -6
- package/node_modules/shebang-regex/index.d.ts +22 -0
- package/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/shebang-regex/license +9 -0
- package/node_modules/shebang-regex/package.json +35 -0
- package/node_modules/shebang-regex/readme.md +33 -0
- package/node_modules/shelljs/README.md +7 -1
- package/node_modules/shelljs/global.js +4 -1
- package/node_modules/shelljs/package.json +8 -13
- package/node_modules/shelljs/shell.js +9 -7
- package/node_modules/shelljs/src/cat.js +1 -1
- package/node_modules/shelljs/src/chmod.js +1 -1
- package/node_modules/shelljs/src/cmd.js +25 -9
- package/node_modules/shelljs/src/common.js +11 -8
- package/node_modules/shelljs/src/dirs.js +1 -1
- package/node_modules/shelljs/src/exec.js +6 -6
- package/node_modules/shelljs/src/grep.js +121 -7
- package/node_modules/shelljs/src/head.js +1 -1
- package/node_modules/shelljs/src/ls.js +1 -1
- package/node_modules/shelljs/src/mkdir.js +1 -1
- package/node_modules/shelljs/src/rm.js +1 -1
- package/node_modules/shelljs/src/sed.js +1 -1
- package/node_modules/shelljs/src/sort.js +1 -1
- package/node_modules/shelljs/src/tail.js +1 -1
- package/node_modules/shelljs/src/tempdir.js +1 -1
- package/node_modules/shelljs/src/test.js +1 -1
- package/node_modules/shelljs/src/to.js +1 -1
- package/node_modules/shelljs/src/toEnd.js +1 -1
- package/node_modules/shelljs/src/touch.js +1 -1
- package/node_modules/shelljs/src/uniq.js +1 -1
- package/node_modules/shelljs/src/which.js +1 -1
- package/node_modules/strip-final-newline/index.js +16 -0
- package/node_modules/strip-final-newline/license +9 -0
- package/node_modules/strip-final-newline/package.json +40 -0
- package/node_modules/strip-final-newline/readme.md +30 -0
- package/node_modules/{shelljs/node_modules/which → which}/README.md +3 -0
- package/node_modules/which/package.json +43 -0
- package/node_modules/which/which.js +125 -0
- package/package.json +5 -2
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -96
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/fastq/.github/dependabot.yml +0 -11
- package/node_modules/fastq/.github/workflows/ci.yml +0 -75
- package/node_modules/function-bind/.eslintrc +0 -21
- package/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/node_modules/function-bind/.nycrc +0 -13
- package/node_modules/function-bind/CHANGELOG.md +0 -136
- package/node_modules/function-bind/LICENSE +0 -20
- package/node_modules/function-bind/README.md +0 -46
- package/node_modules/function-bind/implementation.js +0 -84
- package/node_modules/function-bind/index.js +0 -5
- package/node_modules/function-bind/package.json +0 -87
- package/node_modules/function-bind/test/.eslintrc +0 -9
- package/node_modules/function-bind/test/index.js +0 -252
- package/node_modules/hasown/.eslintrc +0 -5
- package/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/node_modules/hasown/.nycrc +0 -13
- package/node_modules/hasown/CHANGELOG.md +0 -40
- package/node_modules/hasown/LICENSE +0 -21
- package/node_modules/hasown/README.md +0 -40
- package/node_modules/hasown/index.d.ts +0 -3
- package/node_modules/hasown/index.js +0 -8
- package/node_modules/hasown/package.json +0 -92
- package/node_modules/hasown/tsconfig.json +0 -6
- package/node_modules/interpret/LICENSE +0 -22
- package/node_modules/interpret/README.md +0 -187
- package/node_modules/interpret/index.js +0 -168
- package/node_modules/interpret/mjs-stub.js +0 -1
- package/node_modules/interpret/package.json +0 -75
- package/node_modules/is-core-module/.eslintrc +0 -18
- package/node_modules/is-core-module/.nycrc +0 -9
- package/node_modules/is-core-module/CHANGELOG.md +0 -218
- package/node_modules/is-core-module/LICENSE +0 -20
- package/node_modules/is-core-module/README.md +0 -40
- package/node_modules/is-core-module/core.json +0 -162
- package/node_modules/is-core-module/index.js +0 -69
- package/node_modules/is-core-module/package.json +0 -76
- package/node_modules/is-core-module/test/index.js +0 -157
- package/node_modules/nice-try/README.md +0 -32
- package/node_modules/nice-try/package.json +0 -33
- package/node_modules/nice-try/src/index.js +0 -12
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- package/node_modules/p-finally/index.js +0 -15
- package/node_modules/p-finally/license +0 -21
- package/node_modules/p-finally/package.json +0 -42
- package/node_modules/p-finally/readme.md +0 -47
- package/node_modules/path-parse/LICENSE +0 -21
- package/node_modules/path-parse/README.md +0 -42
- package/node_modules/path-parse/index.js +0 -75
- package/node_modules/path-parse/package.json +0 -33
- package/node_modules/pump/.github/FUNDING.yml +0 -2
- package/node_modules/pump/.travis.yml +0 -5
- package/node_modules/pump/LICENSE +0 -21
- package/node_modules/pump/README.md +0 -74
- package/node_modules/pump/SECURITY.md +0 -5
- package/node_modules/pump/index.js +0 -86
- package/node_modules/pump/package.json +0 -24
- package/node_modules/pump/test-browser.js +0 -66
- package/node_modules/pump/test-node.js +0 -53
- package/node_modules/rechoir/.npmignore +0 -1
- package/node_modules/rechoir/.travis.yml +0 -24
- package/node_modules/rechoir/CHANGELOG +0 -38
- package/node_modules/rechoir/LICENSE +0 -22
- package/node_modules/rechoir/README.md +0 -42
- package/node_modules/rechoir/index.js +0 -59
- package/node_modules/rechoir/lib/extension.js +0 -11
- package/node_modules/rechoir/lib/normalize.js +0 -15
- package/node_modules/rechoir/lib/register.js +0 -15
- package/node_modules/rechoir/package.json +0 -88
- package/node_modules/resolve/.editorconfig +0 -37
- package/node_modules/resolve/.eslintrc +0 -65
- package/node_modules/resolve/.github/FUNDING.yml +0 -12
- package/node_modules/resolve/.github/INCIDENT_RESPONSE_PROCESS.md +0 -119
- package/node_modules/resolve/.github/THREAT_MODEL.md +0 -74
- package/node_modules/resolve/LICENSE +0 -21
- package/node_modules/resolve/SECURITY.md +0 -11
- package/node_modules/resolve/async.js +0 -3
- package/node_modules/resolve/bin/resolve +0 -50
- package/node_modules/resolve/example/async.js +0 -5
- package/node_modules/resolve/example/sync.js +0 -3
- package/node_modules/resolve/index.js +0 -6
- package/node_modules/resolve/lib/async.js +0 -333
- package/node_modules/resolve/lib/caller.js +0 -8
- package/node_modules/resolve/lib/core.js +0 -12
- package/node_modules/resolve/lib/core.json +0 -162
- package/node_modules/resolve/lib/homedir.js +0 -24
- package/node_modules/resolve/lib/is-core.js +0 -5
- package/node_modules/resolve/lib/node-modules-paths.js +0 -45
- package/node_modules/resolve/lib/normalize-options.js +0 -10
- package/node_modules/resolve/lib/sync.js +0 -212
- package/node_modules/resolve/package.json +0 -75
- package/node_modules/resolve/readme.markdown +0 -301
- package/node_modules/resolve/sync.js +0 -3
- package/node_modules/resolve/test/core.js +0 -88
- package/node_modules/resolve/test/dotdot/abc/index.js +0 -2
- package/node_modules/resolve/test/dotdot/index.js +0 -1
- package/node_modules/resolve/test/dotdot.js +0 -29
- package/node_modules/resolve/test/faulty_basedir.js +0 -29
- package/node_modules/resolve/test/filter.js +0 -34
- package/node_modules/resolve/test/filter_sync.js +0 -33
- package/node_modules/resolve/test/home_paths.js +0 -127
- package/node_modules/resolve/test/home_paths_sync.js +0 -114
- package/node_modules/resolve/test/mock.js +0 -315
- package/node_modules/resolve/test/mock_sync.js +0 -214
- package/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +0 -1
- package/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +0 -1
- package/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +0 -1
- package/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +0 -3
- package/node_modules/resolve/test/module_dir.js +0 -56
- package/node_modules/resolve/test/node-modules-paths.js +0 -143
- package/node_modules/resolve/test/node_path/x/aaa/index.js +0 -1
- package/node_modules/resolve/test/node_path/x/ccc/index.js +0 -1
- package/node_modules/resolve/test/node_path/y/bbb/index.js +0 -1
- package/node_modules/resolve/test/node_path/y/ccc/index.js +0 -1
- package/node_modules/resolve/test/node_path.js +0 -70
- package/node_modules/resolve/test/nonstring.js +0 -9
- package/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
- package/node_modules/resolve/test/pathfilter.js +0 -75
- package/node_modules/resolve/test/precedence/aaa/index.js +0 -1
- package/node_modules/resolve/test/precedence/aaa/main.js +0 -1
- package/node_modules/resolve/test/precedence/aaa.js +0 -1
- package/node_modules/resolve/test/precedence/bbb/main.js +0 -1
- package/node_modules/resolve/test/precedence/bbb.js +0 -1
- package/node_modules/resolve/test/precedence.js +0 -23
- package/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- package/node_modules/resolve/test/resolver/baz/package.json +0 -4
- package/node_modules/resolve/test/resolver/baz/quux.js +0 -1
- package/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
- package/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
- package/node_modules/resolve/test/resolver/browser_field/package.json +0 -5
- package/node_modules/resolve/test/resolver/cup.coffee +0 -1
- package/node_modules/resolve/test/resolver/dot_main/index.js +0 -1
- package/node_modules/resolve/test/resolver/dot_main/package.json +0 -3
- package/node_modules/resolve/test/resolver/dot_slash_main/index.js +0 -1
- package/node_modules/resolve/test/resolver/dot_slash_main/package.json +0 -3
- package/node_modules/resolve/test/resolver/false_main/index.js +0 -0
- package/node_modules/resolve/test/resolver/false_main/package.json +0 -4
- package/node_modules/resolve/test/resolver/foo.js +0 -1
- package/node_modules/resolve/test/resolver/incorrect_main/index.js +0 -2
- package/node_modules/resolve/test/resolver/incorrect_main/package.json +0 -3
- package/node_modules/resolve/test/resolver/invalid_main/package.json +0 -7
- package/node_modules/resolve/test/resolver/mug.coffee +0 -0
- package/node_modules/resolve/test/resolver/mug.js +0 -0
- package/node_modules/resolve/test/resolver/multirepo/lerna.json +0 -6
- package/node_modules/resolve/test/resolver/multirepo/package.json +0 -20
- package/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +0 -35
- package/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +0 -14
- package/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
- package/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +0 -14
- package/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +0 -26
- package/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +0 -15
- package/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +0 -12
- package/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- package/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- package/node_modules/resolve/test/resolver/quux/foo/index.js +0 -1
- package/node_modules/resolve/test/resolver/same_names/foo/index.js +0 -1
- package/node_modules/resolve/test/resolver/same_names/foo.js +0 -1
- package/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
- package/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
- package/node_modules/resolve/test/resolver/symlinked/package/bar.js +0 -1
- package/node_modules/resolve/test/resolver/symlinked/package/package.json +0 -3
- package/node_modules/resolve/test/resolver/without_basedir/main.js +0 -5
- package/node_modules/resolve/test/resolver.js +0 -597
- package/node_modules/resolve/test/resolver_sync.js +0 -730
- package/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
- package/node_modules/resolve/test/shadowed_core.js +0 -54
- package/node_modules/resolve/test/subdirs.js +0 -13
- package/node_modules/resolve/test/symlinks.js +0 -176
- package/node_modules/shelljs/bin/shjs +0 -48
- package/node_modules/shelljs/node_modules/execa/index.js +0 -361
- package/node_modules/shelljs/node_modules/execa/lib/errname.js +0 -39
- package/node_modules/shelljs/node_modules/execa/lib/stdio.js +0 -41
- package/node_modules/shelljs/node_modules/execa/package.json +0 -69
- package/node_modules/shelljs/node_modules/execa/readme.md +0 -327
- package/node_modules/shelljs/node_modules/get-stream/buffer-stream.js +0 -51
- package/node_modules/shelljs/node_modules/get-stream/index.js +0 -50
- package/node_modules/shelljs/node_modules/is-stream/index.js +0 -21
- package/node_modules/shelljs/node_modules/is-stream/license +0 -21
- package/node_modules/shelljs/node_modules/is-stream/package.json +0 -38
- package/node_modules/shelljs/node_modules/is-stream/readme.md +0 -42
- package/node_modules/shelljs/node_modules/npm-run-path/index.js +0 -39
- package/node_modules/shelljs/node_modules/npm-run-path/license +0 -21
- package/node_modules/shelljs/node_modules/npm-run-path/package.json +0 -45
- package/node_modules/shelljs/node_modules/path-key/index.js +0 -13
- package/node_modules/shelljs/node_modules/path-key/license +0 -21
- package/node_modules/shelljs/node_modules/path-key/package.json +0 -39
- package/node_modules/shelljs/node_modules/semver/LICENSE +0 -15
- package/node_modules/shelljs/node_modules/semver/README.md +0 -412
- package/node_modules/shelljs/node_modules/semver/bin/semver +0 -160
- package/node_modules/shelljs/node_modules/semver/package.json +0 -38
- package/node_modules/shelljs/node_modules/semver/range.bnf +0 -16
- package/node_modules/shelljs/node_modules/semver/semver.js +0 -1525
- package/node_modules/shelljs/node_modules/shebang-command/index.js +0 -19
- package/node_modules/shelljs/node_modules/shebang-command/license +0 -21
- package/node_modules/shelljs/node_modules/shebang-command/package.json +0 -39
- package/node_modules/shelljs/node_modules/shebang-regex/index.js +0 -2
- package/node_modules/shelljs/node_modules/shebang-regex/license +0 -21
- package/node_modules/shelljs/node_modules/shebang-regex/package.json +0 -32
- package/node_modules/shelljs/node_modules/shebang-regex/readme.md +0 -29
- package/node_modules/shelljs/node_modules/which/LICENSE +0 -15
- package/node_modules/shelljs/node_modules/which/package.json +0 -30
- package/node_modules/shelljs/node_modules/which/which.js +0 -135
- package/node_modules/strip-eof/index.js +0 -15
- package/node_modules/strip-eof/license +0 -21
- package/node_modules/strip-eof/package.json +0 -39
- package/node_modules/strip-eof/readme.md +0 -28
- package/node_modules/supports-preserve-symlinks-flag/.eslintrc +0 -14
- package/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +0 -12
- package/node_modules/supports-preserve-symlinks-flag/.nycrc +0 -9
- package/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +0 -22
- package/node_modules/supports-preserve-symlinks-flag/LICENSE +0 -21
- package/node_modules/supports-preserve-symlinks-flag/README.md +0 -42
- package/node_modules/supports-preserve-symlinks-flag/browser.js +0 -3
- package/node_modules/supports-preserve-symlinks-flag/index.js +0 -9
- package/node_modules/supports-preserve-symlinks-flag/package.json +0 -70
- package/node_modules/supports-preserve-symlinks-flag/test/index.js +0 -29
- package/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
- /package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/LICENSE +0 -0
- /package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/index.js +0 -0
- /package/node_modules/{shelljs/node_modules/cross-spawn → cross-spawn}/lib/util/escape.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/LICENSE +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/README.md +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/index.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/constants.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/parse.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/picomatch.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/scan.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/lib/utils.js +0 -0
- /package/node_modules/{picomatch → micromatch/node_modules/picomatch}/package.json +0 -0
- /package/node_modules/{shelljs/node_modules/execa → mimic-fn}/license +0 -0
- /package/node_modules/{shelljs/node_modules/get-stream → npm-run-path}/license +0 -0
- /package/node_modules/{once → which}/LICENSE +0 -0
- /package/node_modules/{shelljs/node_modules/which/bin/which → which/bin/node-which} +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const alias = ['stdin', 'stdout', 'stderr'];
|
|
3
|
-
|
|
4
|
-
const hasAlias = opts => alias.some(x => Boolean(opts[x]));
|
|
5
|
-
|
|
6
|
-
module.exports = opts => {
|
|
7
|
-
if (!opts) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
if (opts.stdio && hasAlias(opts)) {
|
|
12
|
-
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (typeof opts.stdio === 'string') {
|
|
16
|
-
return opts.stdio;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const stdio = opts.stdio || [];
|
|
20
|
-
|
|
21
|
-
if (!Array.isArray(stdio)) {
|
|
22
|
-
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const result = [];
|
|
26
|
-
const len = Math.max(stdio.length, alias.length);
|
|
27
|
-
|
|
28
|
-
for (let i = 0; i < len; i++) {
|
|
29
|
-
let value = null;
|
|
30
|
-
|
|
31
|
-
if (stdio[i] !== undefined) {
|
|
32
|
-
value = stdio[i];
|
|
33
|
-
} else if (opts[alias[i]] !== undefined) {
|
|
34
|
-
value = opts[alias[i]];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
result[i] = value;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return result;
|
|
41
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "execa",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "A better `child_process`",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/execa",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Sindre Sorhus",
|
|
9
|
-
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
-
},
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=6"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "xo && nyc ava"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"index.js",
|
|
20
|
-
"lib"
|
|
21
|
-
],
|
|
22
|
-
"keywords": [
|
|
23
|
-
"exec",
|
|
24
|
-
"child",
|
|
25
|
-
"process",
|
|
26
|
-
"execute",
|
|
27
|
-
"fork",
|
|
28
|
-
"execfile",
|
|
29
|
-
"spawn",
|
|
30
|
-
"file",
|
|
31
|
-
"shell",
|
|
32
|
-
"bin",
|
|
33
|
-
"binary",
|
|
34
|
-
"binaries",
|
|
35
|
-
"npm",
|
|
36
|
-
"path",
|
|
37
|
-
"local"
|
|
38
|
-
],
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"cross-spawn": "^6.0.0",
|
|
41
|
-
"get-stream": "^4.0.0",
|
|
42
|
-
"is-stream": "^1.1.0",
|
|
43
|
-
"npm-run-path": "^2.0.0",
|
|
44
|
-
"p-finally": "^1.0.0",
|
|
45
|
-
"signal-exit": "^3.0.0",
|
|
46
|
-
"strip-eof": "^1.0.0"
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"ava": "*",
|
|
50
|
-
"cat-names": "^1.0.2",
|
|
51
|
-
"coveralls": "^3.0.1",
|
|
52
|
-
"delay": "^3.0.0",
|
|
53
|
-
"is-running": "^2.0.0",
|
|
54
|
-
"nyc": "^13.0.1",
|
|
55
|
-
"tempfile": "^2.0.0",
|
|
56
|
-
"xo": "*"
|
|
57
|
-
},
|
|
58
|
-
"nyc": {
|
|
59
|
-
"reporter": [
|
|
60
|
-
"text",
|
|
61
|
-
"lcov"
|
|
62
|
-
],
|
|
63
|
-
"exclude": [
|
|
64
|
-
"**/fixtures/**",
|
|
65
|
-
"**/test.js",
|
|
66
|
-
"**/test/**"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
# execa [](https://travis-ci.org/sindresorhus/execa) [](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [](https://coveralls.io/github/sindresorhus/execa?branch=master)
|
|
2
|
-
|
|
3
|
-
> A better [`child_process`](https://nodejs.org/api/child_process.html)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Why
|
|
7
|
-
|
|
8
|
-
- Promise interface.
|
|
9
|
-
- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`.
|
|
10
|
-
- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform.
|
|
11
|
-
- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why)
|
|
12
|
-
- Higher max buffer. 10 MB instead of 200 KB.
|
|
13
|
-
- [Executes locally installed binaries by name.](#preferlocal)
|
|
14
|
-
- [Cleans up spawned processes when the parent process dies.](#cleanup)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Install
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
$ npm install execa
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
<a href="https://www.patreon.com/sindresorhus">
|
|
24
|
-
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
|
|
25
|
-
</a>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Usage
|
|
29
|
-
|
|
30
|
-
```js
|
|
31
|
-
const execa = require('execa');
|
|
32
|
-
|
|
33
|
-
(async () => {
|
|
34
|
-
const {stdout} = await execa('echo', ['unicorns']);
|
|
35
|
-
console.log(stdout);
|
|
36
|
-
//=> 'unicorns'
|
|
37
|
-
})();
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Additional examples:
|
|
41
|
-
|
|
42
|
-
```js
|
|
43
|
-
const execa = require('execa');
|
|
44
|
-
|
|
45
|
-
(async () => {
|
|
46
|
-
// Pipe the child process stdout to the current stdout
|
|
47
|
-
execa('echo', ['unicorns']).stdout.pipe(process.stdout);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// Run a shell command
|
|
51
|
-
const {stdout} = await execa.shell('echo unicorns');
|
|
52
|
-
//=> 'unicorns'
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// Catching an error
|
|
56
|
-
try {
|
|
57
|
-
await execa.shell('exit 3');
|
|
58
|
-
} catch (error) {
|
|
59
|
-
console.log(error);
|
|
60
|
-
/*
|
|
61
|
-
{
|
|
62
|
-
message: 'Command failed: /bin/sh -c exit 3'
|
|
63
|
-
killed: false,
|
|
64
|
-
code: 3,
|
|
65
|
-
signal: null,
|
|
66
|
-
cmd: '/bin/sh -c exit 3',
|
|
67
|
-
stdout: '',
|
|
68
|
-
stderr: '',
|
|
69
|
-
timedOut: false
|
|
70
|
-
}
|
|
71
|
-
*/
|
|
72
|
-
}
|
|
73
|
-
})();
|
|
74
|
-
|
|
75
|
-
// Catching an error with a sync method
|
|
76
|
-
try {
|
|
77
|
-
execa.shellSync('exit 3');
|
|
78
|
-
} catch (error) {
|
|
79
|
-
console.log(error);
|
|
80
|
-
/*
|
|
81
|
-
{
|
|
82
|
-
message: 'Command failed: /bin/sh -c exit 3'
|
|
83
|
-
code: 3,
|
|
84
|
-
signal: null,
|
|
85
|
-
cmd: '/bin/sh -c exit 3',
|
|
86
|
-
stdout: '',
|
|
87
|
-
stderr: '',
|
|
88
|
-
timedOut: false
|
|
89
|
-
}
|
|
90
|
-
*/
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## API
|
|
96
|
-
|
|
97
|
-
### execa(file, [arguments], [options])
|
|
98
|
-
|
|
99
|
-
Execute a file.
|
|
100
|
-
|
|
101
|
-
Think of this as a mix of `child_process.execFile` and `child_process.spawn`.
|
|
102
|
-
|
|
103
|
-
Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties.
|
|
104
|
-
|
|
105
|
-
### execa.stdout(file, [arguments], [options])
|
|
106
|
-
|
|
107
|
-
Same as `execa()`, but returns only `stdout`.
|
|
108
|
-
|
|
109
|
-
### execa.stderr(file, [arguments], [options])
|
|
110
|
-
|
|
111
|
-
Same as `execa()`, but returns only `stderr`.
|
|
112
|
-
|
|
113
|
-
### execa.shell(command, [options])
|
|
114
|
-
|
|
115
|
-
Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer.
|
|
116
|
-
|
|
117
|
-
Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess).
|
|
118
|
-
|
|
119
|
-
The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties.
|
|
120
|
-
|
|
121
|
-
### execa.sync(file, [arguments], [options])
|
|
122
|
-
|
|
123
|
-
Execute a file synchronously.
|
|
124
|
-
|
|
125
|
-
Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).
|
|
126
|
-
|
|
127
|
-
This method throws an `Error` if the command fails.
|
|
128
|
-
|
|
129
|
-
### execa.shellSync(file, [options])
|
|
130
|
-
|
|
131
|
-
Execute a command synchronously through the system shell.
|
|
132
|
-
|
|
133
|
-
Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options).
|
|
134
|
-
|
|
135
|
-
### options
|
|
136
|
-
|
|
137
|
-
Type: `Object`
|
|
138
|
-
|
|
139
|
-
#### cwd
|
|
140
|
-
|
|
141
|
-
Type: `string`<br>
|
|
142
|
-
Default: `process.cwd()`
|
|
143
|
-
|
|
144
|
-
Current working directory of the child process.
|
|
145
|
-
|
|
146
|
-
#### env
|
|
147
|
-
|
|
148
|
-
Type: `Object`<br>
|
|
149
|
-
Default: `process.env`
|
|
150
|
-
|
|
151
|
-
Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this.
|
|
152
|
-
|
|
153
|
-
#### extendEnv
|
|
154
|
-
|
|
155
|
-
Type: `boolean`<br>
|
|
156
|
-
Default: `true`
|
|
157
|
-
|
|
158
|
-
Set to `false` if you don't want to extend the environment variables when providing the `env` property.
|
|
159
|
-
|
|
160
|
-
#### argv0
|
|
161
|
-
|
|
162
|
-
Type: `string`
|
|
163
|
-
|
|
164
|
-
Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified.
|
|
165
|
-
|
|
166
|
-
#### stdio
|
|
167
|
-
|
|
168
|
-
Type: `string[]` `string`<br>
|
|
169
|
-
Default: `pipe`
|
|
170
|
-
|
|
171
|
-
Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration.
|
|
172
|
-
|
|
173
|
-
#### detached
|
|
174
|
-
|
|
175
|
-
Type: `boolean`
|
|
176
|
-
|
|
177
|
-
Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached).
|
|
178
|
-
|
|
179
|
-
#### uid
|
|
180
|
-
|
|
181
|
-
Type: `number`
|
|
182
|
-
|
|
183
|
-
Sets the user identity of the process.
|
|
184
|
-
|
|
185
|
-
#### gid
|
|
186
|
-
|
|
187
|
-
Type: `number`
|
|
188
|
-
|
|
189
|
-
Sets the group identity of the process.
|
|
190
|
-
|
|
191
|
-
#### shell
|
|
192
|
-
|
|
193
|
-
Type: `boolean` `string`<br>
|
|
194
|
-
Default: `false`
|
|
195
|
-
|
|
196
|
-
If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows.
|
|
197
|
-
|
|
198
|
-
#### stripEof
|
|
199
|
-
|
|
200
|
-
Type: `boolean`<br>
|
|
201
|
-
Default: `true`
|
|
202
|
-
|
|
203
|
-
[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output.
|
|
204
|
-
|
|
205
|
-
#### preferLocal
|
|
206
|
-
|
|
207
|
-
Type: `boolean`<br>
|
|
208
|
-
Default: `true`
|
|
209
|
-
|
|
210
|
-
Prefer locally installed binaries when looking for a binary to execute.<br>
|
|
211
|
-
If you `$ npm install foo`, you can then `execa('foo')`.
|
|
212
|
-
|
|
213
|
-
#### localDir
|
|
214
|
-
|
|
215
|
-
Type: `string`<br>
|
|
216
|
-
Default: `process.cwd()`
|
|
217
|
-
|
|
218
|
-
Preferred path to find locally installed binaries in (use with `preferLocal`).
|
|
219
|
-
|
|
220
|
-
#### input
|
|
221
|
-
|
|
222
|
-
Type: `string` `Buffer` `stream.Readable`
|
|
223
|
-
|
|
224
|
-
Write some input to the `stdin` of your binary.<br>
|
|
225
|
-
Streams are not allowed when using the synchronous methods.
|
|
226
|
-
|
|
227
|
-
#### reject
|
|
228
|
-
|
|
229
|
-
Type: `boolean`<br>
|
|
230
|
-
Default: `true`
|
|
231
|
-
|
|
232
|
-
Setting this to `false` resolves the promise with the error instead of rejecting it.
|
|
233
|
-
|
|
234
|
-
#### cleanup
|
|
235
|
-
|
|
236
|
-
Type: `boolean`<br>
|
|
237
|
-
Default: `true`
|
|
238
|
-
|
|
239
|
-
Keep track of the spawned process and `kill` it when the parent process exits.
|
|
240
|
-
|
|
241
|
-
#### encoding
|
|
242
|
-
|
|
243
|
-
Type: `string`<br>
|
|
244
|
-
Default: `utf8`
|
|
245
|
-
|
|
246
|
-
Specify the character encoding used to decode the `stdout` and `stderr` output.
|
|
247
|
-
|
|
248
|
-
#### timeout
|
|
249
|
-
|
|
250
|
-
Type: `number`<br>
|
|
251
|
-
Default: `0`
|
|
252
|
-
|
|
253
|
-
If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds.
|
|
254
|
-
|
|
255
|
-
#### buffer
|
|
256
|
-
|
|
257
|
-
Type: `boolean`<br>
|
|
258
|
-
Default: `true`
|
|
259
|
-
|
|
260
|
-
Buffer the output from the spawned process. When buffering is disabled you must consume the output of the `stdout` and `stderr` streams because the promise will not be resolved/rejected until they have completed.
|
|
261
|
-
|
|
262
|
-
#### maxBuffer
|
|
263
|
-
|
|
264
|
-
Type: `number`<br>
|
|
265
|
-
Default: `10000000` (10MB)
|
|
266
|
-
|
|
267
|
-
Largest amount of data in bytes allowed on `stdout` or `stderr`.
|
|
268
|
-
|
|
269
|
-
#### killSignal
|
|
270
|
-
|
|
271
|
-
Type: `string` `number`<br>
|
|
272
|
-
Default: `SIGTERM`
|
|
273
|
-
|
|
274
|
-
Signal value to be used when the spawned process will be killed.
|
|
275
|
-
|
|
276
|
-
#### stdin
|
|
277
|
-
|
|
278
|
-
Type: `string` `number` `Stream` `undefined` `null`<br>
|
|
279
|
-
Default: `pipe`
|
|
280
|
-
|
|
281
|
-
Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
|
|
282
|
-
|
|
283
|
-
#### stdout
|
|
284
|
-
|
|
285
|
-
Type: `string` `number` `Stream` `undefined` `null`<br>
|
|
286
|
-
Default: `pipe`
|
|
287
|
-
|
|
288
|
-
Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
|
|
289
|
-
|
|
290
|
-
#### stderr
|
|
291
|
-
|
|
292
|
-
Type: `string` `number` `Stream` `undefined` `null`<br>
|
|
293
|
-
Default: `pipe`
|
|
294
|
-
|
|
295
|
-
Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio).
|
|
296
|
-
|
|
297
|
-
#### windowsVerbatimArguments
|
|
298
|
-
|
|
299
|
-
Type: `boolean`<br>
|
|
300
|
-
Default: `false`
|
|
301
|
-
|
|
302
|
-
If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`.
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
## Tips
|
|
306
|
-
|
|
307
|
-
### Save and pipe output from a child process
|
|
308
|
-
|
|
309
|
-
Let's say you want to show the output of a child process in real-time while also saving it to a variable.
|
|
310
|
-
|
|
311
|
-
```js
|
|
312
|
-
const execa = require('execa');
|
|
313
|
-
const getStream = require('get-stream');
|
|
314
|
-
|
|
315
|
-
const stream = execa('echo', ['foo']).stdout;
|
|
316
|
-
|
|
317
|
-
stream.pipe(process.stdout);
|
|
318
|
-
|
|
319
|
-
getStream(stream).then(value => {
|
|
320
|
-
console.log('child output:', value);
|
|
321
|
-
});
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
## License
|
|
326
|
-
|
|
327
|
-
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const {PassThrough} = require('stream');
|
|
3
|
-
|
|
4
|
-
module.exports = options => {
|
|
5
|
-
options = Object.assign({}, options);
|
|
6
|
-
|
|
7
|
-
const {array} = options;
|
|
8
|
-
let {encoding} = options;
|
|
9
|
-
const buffer = encoding === 'buffer';
|
|
10
|
-
let objectMode = false;
|
|
11
|
-
|
|
12
|
-
if (array) {
|
|
13
|
-
objectMode = !(encoding || buffer);
|
|
14
|
-
} else {
|
|
15
|
-
encoding = encoding || 'utf8';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (buffer) {
|
|
19
|
-
encoding = null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let len = 0;
|
|
23
|
-
const ret = [];
|
|
24
|
-
const stream = new PassThrough({objectMode});
|
|
25
|
-
|
|
26
|
-
if (encoding) {
|
|
27
|
-
stream.setEncoding(encoding);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
stream.on('data', chunk => {
|
|
31
|
-
ret.push(chunk);
|
|
32
|
-
|
|
33
|
-
if (objectMode) {
|
|
34
|
-
len = ret.length;
|
|
35
|
-
} else {
|
|
36
|
-
len += chunk.length;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
stream.getBufferedValue = () => {
|
|
41
|
-
if (array) {
|
|
42
|
-
return ret;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return buffer ? Buffer.concat(ret, len) : ret.join('');
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
stream.getBufferedLength = () => len;
|
|
49
|
-
|
|
50
|
-
return stream;
|
|
51
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const pump = require('pump');
|
|
3
|
-
const bufferStream = require('./buffer-stream');
|
|
4
|
-
|
|
5
|
-
class MaxBufferError extends Error {
|
|
6
|
-
constructor() {
|
|
7
|
-
super('maxBuffer exceeded');
|
|
8
|
-
this.name = 'MaxBufferError';
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function getStream(inputStream, options) {
|
|
13
|
-
if (!inputStream) {
|
|
14
|
-
return Promise.reject(new Error('Expected a stream'));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
options = Object.assign({maxBuffer: Infinity}, options);
|
|
18
|
-
|
|
19
|
-
const {maxBuffer} = options;
|
|
20
|
-
|
|
21
|
-
let stream;
|
|
22
|
-
return new Promise((resolve, reject) => {
|
|
23
|
-
const rejectPromise = error => {
|
|
24
|
-
if (error) { // A null check
|
|
25
|
-
error.bufferedData = stream.getBufferedValue();
|
|
26
|
-
}
|
|
27
|
-
reject(error);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
stream = pump(inputStream, bufferStream(options), error => {
|
|
31
|
-
if (error) {
|
|
32
|
-
rejectPromise(error);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
resolve();
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
stream.on('data', () => {
|
|
40
|
-
if (stream.getBufferedLength() > maxBuffer) {
|
|
41
|
-
rejectPromise(new MaxBufferError());
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
}).then(() => stream.getBufferedValue());
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = getStream;
|
|
48
|
-
module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'}));
|
|
49
|
-
module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true}));
|
|
50
|
-
module.exports.MaxBufferError = MaxBufferError;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var isStream = module.exports = function (stream) {
|
|
4
|
-
return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function';
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
isStream.writable = function (stream) {
|
|
8
|
-
return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object';
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
isStream.readable = function (stream) {
|
|
12
|
-
return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object';
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
isStream.duplex = function (stream) {
|
|
16
|
-
return isStream.writable(stream) && isStream.readable(stream);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
isStream.transform = function (stream) {
|
|
20
|
-
return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object';
|
|
21
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "is-stream",
|
|
3
|
-
"version": "1.1.0",
|
|
4
|
-
"description": "Check if something is a Node.js stream",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/is-stream",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Sindre Sorhus",
|
|
9
|
-
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
-
},
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=0.10.0"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "xo && ava"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"index.js"
|
|
20
|
-
],
|
|
21
|
-
"keywords": [
|
|
22
|
-
"stream",
|
|
23
|
-
"type",
|
|
24
|
-
"streams",
|
|
25
|
-
"writable",
|
|
26
|
-
"readable",
|
|
27
|
-
"duplex",
|
|
28
|
-
"transform",
|
|
29
|
-
"check",
|
|
30
|
-
"detect",
|
|
31
|
-
"is"
|
|
32
|
-
],
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"ava": "*",
|
|
35
|
-
"tempfile": "^1.1.0",
|
|
36
|
-
"xo": "*"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# is-stream [](https://travis-ci.org/sindresorhus/is-stream)
|
|
2
|
-
|
|
3
|
-
> Check if something is a [Node.js stream](https://nodejs.org/api/stream.html)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
$ npm install --save is-stream
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
const fs = require('fs');
|
|
17
|
-
const isStream = require('is-stream');
|
|
18
|
-
|
|
19
|
-
isStream(fs.createReadStream('unicorn.png'));
|
|
20
|
-
//=> true
|
|
21
|
-
|
|
22
|
-
isStream({});
|
|
23
|
-
//=> false
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## API
|
|
28
|
-
|
|
29
|
-
### isStream(stream)
|
|
30
|
-
|
|
31
|
-
#### isStream.writable(stream)
|
|
32
|
-
|
|
33
|
-
#### isStream.readable(stream)
|
|
34
|
-
|
|
35
|
-
#### isStream.duplex(stream)
|
|
36
|
-
|
|
37
|
-
#### isStream.transform(stream)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## License
|
|
41
|
-
|
|
42
|
-
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const pathKey = require('path-key');
|
|
4
|
-
|
|
5
|
-
module.exports = opts => {
|
|
6
|
-
opts = Object.assign({
|
|
7
|
-
cwd: process.cwd(),
|
|
8
|
-
path: process.env[pathKey()]
|
|
9
|
-
}, opts);
|
|
10
|
-
|
|
11
|
-
let prev;
|
|
12
|
-
let pth = path.resolve(opts.cwd);
|
|
13
|
-
const ret = [];
|
|
14
|
-
|
|
15
|
-
while (prev !== pth) {
|
|
16
|
-
ret.push(path.join(pth, 'node_modules/.bin'));
|
|
17
|
-
prev = pth;
|
|
18
|
-
pth = path.resolve(pth, '..');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// ensure the running `node` binary is used
|
|
22
|
-
ret.push(path.dirname(process.execPath));
|
|
23
|
-
|
|
24
|
-
return ret.concat(opts.path).join(path.delimiter);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
module.exports.env = opts => {
|
|
28
|
-
opts = Object.assign({
|
|
29
|
-
env: process.env
|
|
30
|
-
}, opts);
|
|
31
|
-
|
|
32
|
-
const env = Object.assign({}, opts.env);
|
|
33
|
-
const path = pathKey({env});
|
|
34
|
-
|
|
35
|
-
opts.path = env[path];
|
|
36
|
-
env[path] = module.exports(opts);
|
|
37
|
-
|
|
38
|
-
return env;
|
|
39
|
-
};
|