projen 0.91.17 → 0.91.18
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/awscdk/auto-discover.js +5 -5
- 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 +1 -1
- 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/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-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/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/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/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/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/{minimatch/node_modules/brace-expansion → @nodelib/fs.scandir}/LICENSE +2 -2
- package/node_modules/@nodelib/fs.scandir/README.md +171 -0
- package/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
- package/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
- package/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
- package/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
- package/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
- package/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
- package/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
- package/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
- package/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
- package/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
- package/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
- package/node_modules/@nodelib/fs.scandir/package.json +44 -0
- package/node_modules/@nodelib/fs.stat/LICENSE +21 -0
- package/node_modules/@nodelib/fs.stat/README.md +126 -0
- package/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
- package/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/node_modules/@nodelib/fs.stat/out/index.js +26 -0
- package/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
- package/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
- package/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
- package/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
- package/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
- package/node_modules/@nodelib/fs.stat/package.json +37 -0
- package/node_modules/@nodelib/fs.walk/LICENSE +21 -0
- package/node_modules/@nodelib/fs.walk/README.md +215 -0
- package/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/node_modules/@nodelib/fs.walk/out/index.js +34 -0
- package/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
- package/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
- package/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
- package/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
- package/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
- package/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
- package/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
- package/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
- package/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
- package/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
- package/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
- package/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
- package/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
- package/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
- package/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
- package/node_modules/@nodelib/fs.walk/package.json +44 -0
- package/node_modules/braces/LICENSE +21 -0
- package/node_modules/braces/README.md +586 -0
- package/node_modules/braces/index.js +170 -0
- package/node_modules/braces/lib/compile.js +60 -0
- package/node_modules/braces/lib/constants.js +57 -0
- package/node_modules/braces/lib/expand.js +113 -0
- package/node_modules/braces/lib/parse.js +331 -0
- package/node_modules/braces/lib/stringify.js +32 -0
- package/node_modules/braces/lib/utils.js +122 -0
- package/node_modules/braces/package.json +77 -0
- package/node_modules/end-of-stream/LICENSE +21 -0
- package/node_modules/end-of-stream/README.md +54 -0
- package/node_modules/end-of-stream/index.js +94 -0
- package/node_modules/end-of-stream/package.json +37 -0
- package/node_modules/execa/index.js +361 -0
- package/node_modules/execa/lib/errname.js +39 -0
- package/node_modules/execa/lib/stdio.js +41 -0
- package/node_modules/execa/license +9 -0
- package/node_modules/execa/node_modules/cross-spawn/LICENSE +21 -0
- package/node_modules/execa/node_modules/cross-spawn/README.md +94 -0
- package/node_modules/execa/node_modules/cross-spawn/index.js +39 -0
- package/node_modules/execa/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/node_modules/execa/node_modules/cross-spawn/lib/parse.js +125 -0
- package/node_modules/execa/node_modules/cross-spawn/lib/util/escape.js +47 -0
- package/node_modules/execa/node_modules/cross-spawn/lib/util/readShebang.js +32 -0
- package/node_modules/execa/node_modules/cross-spawn/lib/util/resolveCommand.js +51 -0
- package/node_modules/execa/node_modules/cross-spawn/package.json +75 -0
- package/node_modules/execa/node_modules/semver/README.md +412 -0
- package/node_modules/execa/node_modules/semver/bin/semver +160 -0
- package/node_modules/execa/node_modules/semver/package.json +38 -0
- package/node_modules/execa/node_modules/semver/range.bnf +16 -0
- package/node_modules/execa/node_modules/semver/semver.js +1525 -0
- package/node_modules/execa/node_modules/shebang-command/index.js +19 -0
- package/node_modules/execa/node_modules/shebang-command/license +21 -0
- package/node_modules/execa/node_modules/shebang-command/package.json +39 -0
- package/node_modules/execa/node_modules/shebang-command/readme.md +39 -0
- package/node_modules/execa/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/execa/node_modules/shebang-regex/package.json +32 -0
- package/node_modules/execa/node_modules/shebang-regex/readme.md +29 -0
- package/node_modules/{shelljs/node_modules/glob → execa/node_modules/which}/LICENSE +0 -6
- package/node_modules/execa/node_modules/which/README.md +51 -0
- package/node_modules/execa/node_modules/which/bin/which +52 -0
- package/node_modules/execa/node_modules/which/package.json +30 -0
- package/node_modules/execa/node_modules/which/which.js +135 -0
- package/node_modules/execa/package.json +69 -0
- package/node_modules/execa/readme.md +327 -0
- package/node_modules/fast-glob/LICENSE +21 -0
- package/node_modules/fast-glob/README.md +830 -0
- package/node_modules/fast-glob/node_modules/glob-parent/LICENSE +15 -0
- package/node_modules/fast-glob/node_modules/glob-parent/README.md +137 -0
- package/node_modules/fast-glob/node_modules/glob-parent/index.js +42 -0
- package/node_modules/fast-glob/node_modules/glob-parent/package.json +48 -0
- package/node_modules/fast-glob/out/index.d.ts +40 -0
- package/node_modules/fast-glob/out/index.js +102 -0
- package/node_modules/fast-glob/out/managers/tasks.d.ts +22 -0
- package/node_modules/fast-glob/out/managers/tasks.js +110 -0
- package/node_modules/fast-glob/out/providers/async.d.ts +9 -0
- package/node_modules/fast-glob/out/providers/async.js +23 -0
- package/node_modules/fast-glob/out/providers/filters/deep.d.ts +16 -0
- package/node_modules/fast-glob/out/providers/filters/deep.js +62 -0
- package/node_modules/fast-glob/out/providers/filters/entry.d.ts +17 -0
- package/node_modules/fast-glob/out/providers/filters/entry.js +85 -0
- package/node_modules/fast-glob/out/providers/filters/error.d.ts +8 -0
- package/node_modules/fast-glob/out/providers/filters/error.js +15 -0
- package/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +33 -0
- package/node_modules/fast-glob/out/providers/matchers/matcher.js +45 -0
- package/node_modules/fast-glob/out/providers/matchers/partial.d.ts +4 -0
- package/node_modules/fast-glob/out/providers/matchers/partial.js +38 -0
- package/node_modules/fast-glob/out/providers/provider.d.ts +19 -0
- package/node_modules/fast-glob/out/providers/provider.js +48 -0
- package/node_modules/fast-glob/out/providers/stream.d.ts +11 -0
- package/node_modules/fast-glob/out/providers/stream.js +31 -0
- package/node_modules/fast-glob/out/providers/sync.d.ts +9 -0
- package/node_modules/fast-glob/out/providers/sync.js +23 -0
- package/node_modules/fast-glob/out/providers/transformers/entry.d.ts +8 -0
- package/node_modules/fast-glob/out/providers/transformers/entry.js +26 -0
- package/node_modules/fast-glob/out/readers/async.d.ts +10 -0
- package/node_modules/fast-glob/out/readers/async.js +35 -0
- package/node_modules/fast-glob/out/readers/reader.d.ts +15 -0
- package/node_modules/fast-glob/out/readers/reader.js +33 -0
- package/node_modules/fast-glob/out/readers/stream.d.ts +14 -0
- package/node_modules/fast-glob/out/readers/stream.js +55 -0
- package/node_modules/fast-glob/out/readers/sync.d.ts +12 -0
- package/node_modules/fast-glob/out/readers/sync.js +43 -0
- package/node_modules/fast-glob/out/settings.d.ts +164 -0
- package/node_modules/fast-glob/out/settings.js +59 -0
- package/node_modules/fast-glob/out/types/index.d.ts +31 -0
- package/node_modules/fast-glob/out/types/index.js +2 -0
- package/node_modules/fast-glob/out/utils/array.d.ts +2 -0
- package/node_modules/fast-glob/out/utils/array.js +22 -0
- package/node_modules/fast-glob/out/utils/errno.d.ts +2 -0
- package/node_modules/fast-glob/out/utils/errno.js +7 -0
- package/node_modules/fast-glob/out/utils/fs.d.ts +4 -0
- package/node_modules/fast-glob/out/utils/fs.js +19 -0
- package/node_modules/fast-glob/out/utils/index.d.ts +8 -0
- package/node_modules/fast-glob/out/utils/index.js +17 -0
- package/node_modules/fast-glob/out/utils/path.d.ts +13 -0
- package/node_modules/fast-glob/out/utils/path.js +68 -0
- package/node_modules/fast-glob/out/utils/pattern.d.ts +49 -0
- package/node_modules/fast-glob/out/utils/pattern.js +206 -0
- package/node_modules/fast-glob/out/utils/stream.d.ts +4 -0
- package/node_modules/fast-glob/out/utils/stream.js +17 -0
- package/node_modules/fast-glob/out/utils/string.d.ts +2 -0
- package/node_modules/fast-glob/out/utils/string.js +11 -0
- package/node_modules/fast-glob/package.json +81 -0
- package/node_modules/fastq/.github/dependabot.yml +11 -0
- package/node_modules/fastq/.github/workflows/ci.yml +75 -0
- package/node_modules/fastq/LICENSE +13 -0
- package/node_modules/fastq/README.md +312 -0
- package/node_modules/fastq/SECURITY.md +15 -0
- package/node_modules/fastq/bench.js +66 -0
- package/node_modules/fastq/example.js +14 -0
- package/node_modules/fastq/example.mjs +11 -0
- package/node_modules/fastq/index.d.ts +57 -0
- package/node_modules/fastq/package.json +53 -0
- package/node_modules/fastq/queue.js +311 -0
- package/node_modules/fastq/test/example.ts +83 -0
- package/node_modules/fastq/test/promise.js +291 -0
- package/node_modules/fastq/test/test.js +653 -0
- package/node_modules/fastq/test/tsconfig.json +11 -0
- package/node_modules/fill-range/LICENSE +21 -0
- package/node_modules/fill-range/README.md +237 -0
- package/node_modules/fill-range/index.js +248 -0
- package/node_modules/fill-range/package.json +74 -0
- package/node_modules/get-stream/buffer-stream.js +51 -0
- package/node_modules/get-stream/index.js +50 -0
- package/node_modules/get-stream/license +9 -0
- package/node_modules/get-stream/package.json +46 -0
- package/node_modules/get-stream/readme.md +123 -0
- package/node_modules/is-extglob/LICENSE +21 -0
- package/node_modules/is-extglob/README.md +107 -0
- package/node_modules/is-extglob/index.js +20 -0
- package/node_modules/is-extglob/package.json +69 -0
- package/node_modules/is-glob/LICENSE +21 -0
- package/node_modules/is-glob/README.md +206 -0
- package/node_modules/is-glob/index.js +150 -0
- package/node_modules/is-glob/package.json +81 -0
- package/node_modules/is-number/LICENSE +21 -0
- package/node_modules/is-number/README.md +187 -0
- package/node_modules/is-number/index.js +18 -0
- package/node_modules/is-number/package.json +82 -0
- package/node_modules/is-stream/index.js +21 -0
- package/node_modules/is-stream/license +21 -0
- package/node_modules/is-stream/package.json +38 -0
- package/node_modules/is-stream/readme.md +42 -0
- package/node_modules/isexe/.npmignore +2 -0
- package/node_modules/isexe/LICENSE +15 -0
- package/node_modules/isexe/README.md +51 -0
- package/node_modules/isexe/index.js +57 -0
- package/node_modules/isexe/mode.js +41 -0
- package/node_modules/isexe/package.json +31 -0
- package/node_modules/isexe/test/basic.js +221 -0
- package/node_modules/isexe/windows.js +42 -0
- package/node_modules/merge2/LICENSE +21 -0
- package/node_modules/merge2/README.md +144 -0
- package/node_modules/merge2/index.js +144 -0
- package/node_modules/merge2/package.json +43 -0
- package/node_modules/micromatch/LICENSE +21 -0
- package/node_modules/micromatch/README.md +1024 -0
- package/node_modules/micromatch/index.js +474 -0
- package/node_modules/micromatch/package.json +119 -0
- package/node_modules/nice-try/LICENSE +21 -0
- package/node_modules/nice-try/README.md +32 -0
- package/node_modules/nice-try/package.json +33 -0
- package/node_modules/nice-try/src/index.js +12 -0
- package/node_modules/npm-run-path/index.js +39 -0
- package/node_modules/npm-run-path/license +21 -0
- package/node_modules/npm-run-path/package.json +45 -0
- package/node_modules/npm-run-path/readme.md +81 -0
- package/node_modules/p-finally/index.js +15 -0
- package/node_modules/p-finally/license +21 -0
- package/node_modules/p-finally/package.json +42 -0
- package/node_modules/p-finally/readme.md +47 -0
- package/node_modules/path-key/index.js +13 -0
- package/node_modules/path-key/license +21 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/path-key/readme.md +51 -0
- package/node_modules/picomatch/LICENSE +21 -0
- package/node_modules/picomatch/README.md +708 -0
- package/node_modules/picomatch/index.js +3 -0
- package/node_modules/picomatch/lib/constants.js +179 -0
- package/node_modules/picomatch/lib/parse.js +1091 -0
- package/node_modules/picomatch/lib/picomatch.js +342 -0
- package/node_modules/picomatch/lib/scan.js +391 -0
- package/node_modules/picomatch/lib/utils.js +64 -0
- package/node_modules/picomatch/package.json +81 -0
- package/node_modules/pump/.github/FUNDING.yml +2 -0
- package/node_modules/pump/.travis.yml +5 -0
- package/node_modules/pump/LICENSE +21 -0
- package/node_modules/pump/README.md +74 -0
- package/node_modules/pump/SECURITY.md +5 -0
- package/node_modules/pump/index.js +86 -0
- package/node_modules/pump/package.json +24 -0
- package/node_modules/pump/test-browser.js +66 -0
- package/node_modules/pump/test-node.js +53 -0
- package/node_modules/{concat-map → queue-microtask}/LICENSE +3 -1
- package/node_modules/queue-microtask/README.md +90 -0
- package/node_modules/queue-microtask/index.d.ts +2 -0
- package/node_modules/queue-microtask/index.js +9 -0
- package/node_modules/queue-microtask/package.json +55 -0
- package/node_modules/reusify/.github/dependabot.yml +7 -0
- package/node_modules/reusify/.github/workflows/ci.yml +96 -0
- package/node_modules/reusify/LICENSE +22 -0
- package/node_modules/reusify/README.md +139 -0
- package/node_modules/reusify/SECURITY.md +15 -0
- package/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
- package/node_modules/reusify/benchmarks/fib.js +13 -0
- package/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
- package/node_modules/reusify/eslint.config.js +14 -0
- package/node_modules/reusify/package.json +50 -0
- package/node_modules/reusify/reusify.d.ts +14 -0
- package/node_modules/reusify/reusify.js +33 -0
- package/node_modules/reusify/test.js +66 -0
- package/node_modules/reusify/tsconfig.json +11 -0
- package/node_modules/run-parallel/LICENSE +20 -0
- package/node_modules/run-parallel/README.md +85 -0
- package/node_modules/run-parallel/index.js +51 -0
- package/node_modules/run-parallel/package.json +58 -0
- package/node_modules/shelljs/LICENSE +23 -20
- package/node_modules/shelljs/README.md +173 -65
- package/node_modules/shelljs/package.json +38 -22
- package/node_modules/shelljs/plugin.js +1 -1
- package/node_modules/shelljs/shell.js +70 -12
- package/node_modules/shelljs/src/cat.js +3 -3
- package/node_modules/shelljs/src/cd.js +2 -1
- package/node_modules/shelljs/src/chmod.js +17 -11
- package/node_modules/shelljs/src/cmd.js +122 -0
- package/node_modules/shelljs/src/common.js +103 -29
- package/node_modules/shelljs/src/cp.js +24 -14
- package/node_modules/shelljs/src/dirs.js +7 -9
- package/node_modules/shelljs/src/echo.js +1 -2
- package/node_modules/shelljs/src/errorCode.js +10 -0
- package/node_modules/shelljs/src/exec-child.js +60 -28
- package/node_modules/shelljs/src/exec.js +39 -10
- package/node_modules/shelljs/src/find.js +8 -3
- package/node_modules/shelljs/src/grep.js +15 -4
- package/node_modules/shelljs/src/head.js +1 -1
- package/node_modules/shelljs/src/ln.js +3 -1
- package/node_modules/shelljs/src/ls.js +29 -15
- package/node_modules/shelljs/src/mkdir.js +13 -11
- package/node_modules/shelljs/src/mv.js +4 -3
- package/node_modules/shelljs/src/pwd.js +1 -1
- package/node_modules/shelljs/src/rm.js +11 -11
- package/node_modules/shelljs/src/sed.js +12 -4
- package/node_modules/shelljs/src/set.js +0 -1
- package/node_modules/shelljs/src/sort.js +3 -2
- package/node_modules/shelljs/src/tail.js +12 -2
- package/node_modules/shelljs/src/test.js +3 -2
- package/node_modules/shelljs/src/to.js +2 -1
- package/node_modules/shelljs/src/toEnd.js +2 -1
- package/node_modules/shelljs/src/touch.js +13 -7
- package/node_modules/shelljs/src/uniq.js +5 -4
- package/node_modules/shelljs/src/which.js +5 -4
- package/node_modules/shx/README.md +27 -15
- package/node_modules/shx/lib/help.js +1 -1
- package/node_modules/shx/lib/shx.js +13 -8
- package/node_modules/shx/package.json +17 -25
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/README.md +39 -0
- package/node_modules/signal-exit/index.js +202 -0
- package/node_modules/signal-exit/package.json +38 -0
- package/node_modules/signal-exit/signals.js +53 -0
- package/node_modules/strip-eof/index.js +15 -0
- package/node_modules/strip-eof/license +21 -0
- package/node_modules/strip-eof/package.json +39 -0
- package/node_modules/strip-eof/readme.md +28 -0
- package/node_modules/to-regex-range/LICENSE +21 -0
- package/node_modules/to-regex-range/README.md +305 -0
- package/node_modules/to-regex-range/index.js +288 -0
- package/node_modules/to-regex-range/package.json +88 -0
- package/package.json +2 -2
- package/node_modules/concat-map/.travis.yml +0 -4
- package/node_modules/concat-map/README.markdown +0 -62
- package/node_modules/concat-map/example/map.js +0 -6
- package/node_modules/concat-map/index.js +0 -13
- package/node_modules/concat-map/package.json +0 -43
- package/node_modules/concat-map/test/map.js +0 -39
- package/node_modules/minimatch/README.md +0 -230
- package/node_modules/minimatch/minimatch.js +0 -947
- package/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- package/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- package/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- package/node_modules/minimatch/package.json +0 -33
- package/node_modules/path-is-absolute/index.js +0 -20
- package/node_modules/path-is-absolute/package.json +0 -43
- package/node_modules/path-is-absolute/readme.md +0 -59
- package/node_modules/shelljs/commands.js +0 -29
- package/node_modules/shelljs/node_modules/glob/README.md +0 -378
- package/node_modules/shelljs/node_modules/glob/common.js +0 -238
- package/node_modules/shelljs/node_modules/glob/glob.js +0 -790
- package/node_modules/shelljs/node_modules/glob/package.json +0 -55
- package/node_modules/shelljs/node_modules/glob/sync.js +0 -486
- /package/node_modules/{minimatch → execa/node_modules/semver}/LICENSE +0 -0
- /package/node_modules/{path-is-absolute → execa/node_modules/shebang-regex}/license +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# isexe
|
|
2
|
+
|
|
3
|
+
Minimal module to check if a file is executable, and a normal file.
|
|
4
|
+
|
|
5
|
+
Uses `fs.stat` and tests against the `PATHEXT` environment variable on
|
|
6
|
+
Windows.
|
|
7
|
+
|
|
8
|
+
## USAGE
|
|
9
|
+
|
|
10
|
+
```javascript
|
|
11
|
+
var isexe = require('isexe')
|
|
12
|
+
isexe('some-file-name', function (err, isExe) {
|
|
13
|
+
if (err) {
|
|
14
|
+
console.error('probably file does not exist or something', err)
|
|
15
|
+
} else if (isExe) {
|
|
16
|
+
console.error('this thing can be run')
|
|
17
|
+
} else {
|
|
18
|
+
console.error('cannot be run')
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
// same thing but synchronous, throws errors
|
|
23
|
+
var isExe = isexe.sync('some-file-name')
|
|
24
|
+
|
|
25
|
+
// treat errors as just "not executable"
|
|
26
|
+
isexe('maybe-missing-file', { ignoreErrors: true }, callback)
|
|
27
|
+
var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true })
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## API
|
|
31
|
+
|
|
32
|
+
### `isexe(path, [options], [callback])`
|
|
33
|
+
|
|
34
|
+
Check if the path is executable. If no callback provided, and a
|
|
35
|
+
global `Promise` object is available, then a Promise will be returned.
|
|
36
|
+
|
|
37
|
+
Will raise whatever errors may be raised by `fs.stat`, unless
|
|
38
|
+
`options.ignoreErrors` is set to true.
|
|
39
|
+
|
|
40
|
+
### `isexe.sync(path, [options])`
|
|
41
|
+
|
|
42
|
+
Same as `isexe` but returns the value and throws any errors raised.
|
|
43
|
+
|
|
44
|
+
### Options
|
|
45
|
+
|
|
46
|
+
* `ignoreErrors` Treat all errors as "no, this is not executable", but
|
|
47
|
+
don't raise them.
|
|
48
|
+
* `uid` Number to use as the user id
|
|
49
|
+
* `gid` Number to use as the group id
|
|
50
|
+
* `pathExt` List of path extensions to use instead of `PATHEXT`
|
|
51
|
+
environment variable on Windows.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var fs = require('fs')
|
|
2
|
+
var core
|
|
3
|
+
if (process.platform === 'win32' || global.TESTING_WINDOWS) {
|
|
4
|
+
core = require('./windows.js')
|
|
5
|
+
} else {
|
|
6
|
+
core = require('./mode.js')
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
module.exports = isexe
|
|
10
|
+
isexe.sync = sync
|
|
11
|
+
|
|
12
|
+
function isexe (path, options, cb) {
|
|
13
|
+
if (typeof options === 'function') {
|
|
14
|
+
cb = options
|
|
15
|
+
options = {}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (!cb) {
|
|
19
|
+
if (typeof Promise !== 'function') {
|
|
20
|
+
throw new TypeError('callback not provided')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return new Promise(function (resolve, reject) {
|
|
24
|
+
isexe(path, options || {}, function (er, is) {
|
|
25
|
+
if (er) {
|
|
26
|
+
reject(er)
|
|
27
|
+
} else {
|
|
28
|
+
resolve(is)
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
core(path, options || {}, function (er, is) {
|
|
35
|
+
// ignore EACCES because that just means we aren't allowed to run it
|
|
36
|
+
if (er) {
|
|
37
|
+
if (er.code === 'EACCES' || options && options.ignoreErrors) {
|
|
38
|
+
er = null
|
|
39
|
+
is = false
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
cb(er, is)
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function sync (path, options) {
|
|
47
|
+
// my kingdom for a filtered catch
|
|
48
|
+
try {
|
|
49
|
+
return core.sync(path, options || {})
|
|
50
|
+
} catch (er) {
|
|
51
|
+
if (options && options.ignoreErrors || er.code === 'EACCES') {
|
|
52
|
+
return false
|
|
53
|
+
} else {
|
|
54
|
+
throw er
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module.exports = isexe
|
|
2
|
+
isexe.sync = sync
|
|
3
|
+
|
|
4
|
+
var fs = require('fs')
|
|
5
|
+
|
|
6
|
+
function isexe (path, options, cb) {
|
|
7
|
+
fs.stat(path, function (er, stat) {
|
|
8
|
+
cb(er, er ? false : checkStat(stat, options))
|
|
9
|
+
})
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function sync (path, options) {
|
|
13
|
+
return checkStat(fs.statSync(path), options)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function checkStat (stat, options) {
|
|
17
|
+
return stat.isFile() && checkMode(stat, options)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function checkMode (stat, options) {
|
|
21
|
+
var mod = stat.mode
|
|
22
|
+
var uid = stat.uid
|
|
23
|
+
var gid = stat.gid
|
|
24
|
+
|
|
25
|
+
var myUid = options.uid !== undefined ?
|
|
26
|
+
options.uid : process.getuid && process.getuid()
|
|
27
|
+
var myGid = options.gid !== undefined ?
|
|
28
|
+
options.gid : process.getgid && process.getgid()
|
|
29
|
+
|
|
30
|
+
var u = parseInt('100', 8)
|
|
31
|
+
var g = parseInt('010', 8)
|
|
32
|
+
var o = parseInt('001', 8)
|
|
33
|
+
var ug = u | g
|
|
34
|
+
|
|
35
|
+
var ret = (mod & o) ||
|
|
36
|
+
(mod & g) && gid === myGid ||
|
|
37
|
+
(mod & u) && uid === myUid ||
|
|
38
|
+
(mod & ug) && myUid === 0
|
|
39
|
+
|
|
40
|
+
return ret
|
|
41
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "isexe",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Minimal module to check if a file is executable.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"directories": {
|
|
7
|
+
"test": "test"
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"mkdirp": "^0.5.1",
|
|
11
|
+
"rimraf": "^2.5.0",
|
|
12
|
+
"tap": "^10.3.0"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "tap test/*.js --100",
|
|
16
|
+
"preversion": "npm test",
|
|
17
|
+
"postversion": "npm publish",
|
|
18
|
+
"postpublish": "git push origin --all; git push origin --tags"
|
|
19
|
+
},
|
|
20
|
+
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/isaacs/isexe.git"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [],
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/isaacs/isexe/issues"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/isaacs/isexe#readme"
|
|
31
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
var t = require('tap')
|
|
2
|
+
var fs = require('fs')
|
|
3
|
+
var path = require('path')
|
|
4
|
+
var fixture = path.resolve(__dirname, 'fixtures')
|
|
5
|
+
var meow = fixture + '/meow.cat'
|
|
6
|
+
var mine = fixture + '/mine.cat'
|
|
7
|
+
var ours = fixture + '/ours.cat'
|
|
8
|
+
var fail = fixture + '/fail.false'
|
|
9
|
+
var noent = fixture + '/enoent.exe'
|
|
10
|
+
var mkdirp = require('mkdirp')
|
|
11
|
+
var rimraf = require('rimraf')
|
|
12
|
+
|
|
13
|
+
var isWindows = process.platform === 'win32'
|
|
14
|
+
var hasAccess = typeof fs.access === 'function'
|
|
15
|
+
var winSkip = isWindows && 'windows'
|
|
16
|
+
var accessSkip = !hasAccess && 'no fs.access function'
|
|
17
|
+
var hasPromise = typeof Promise === 'function'
|
|
18
|
+
var promiseSkip = !hasPromise && 'no global Promise'
|
|
19
|
+
|
|
20
|
+
function reset () {
|
|
21
|
+
delete require.cache[require.resolve('../')]
|
|
22
|
+
return require('../')
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
t.test('setup fixtures', function (t) {
|
|
26
|
+
rimraf.sync(fixture)
|
|
27
|
+
mkdirp.sync(fixture)
|
|
28
|
+
fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n')
|
|
29
|
+
fs.chmodSync(meow, parseInt('0755', 8))
|
|
30
|
+
fs.writeFileSync(fail, '#!/usr/bin/env false\n')
|
|
31
|
+
fs.chmodSync(fail, parseInt('0644', 8))
|
|
32
|
+
fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n')
|
|
33
|
+
fs.chmodSync(mine, parseInt('0744', 8))
|
|
34
|
+
fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n')
|
|
35
|
+
fs.chmodSync(ours, parseInt('0754', 8))
|
|
36
|
+
t.end()
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
t.test('promise', { skip: promiseSkip }, function (t) {
|
|
40
|
+
var isexe = reset()
|
|
41
|
+
t.test('meow async', function (t) {
|
|
42
|
+
isexe(meow).then(function (is) {
|
|
43
|
+
t.ok(is)
|
|
44
|
+
t.end()
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
t.test('fail async', function (t) {
|
|
48
|
+
isexe(fail).then(function (is) {
|
|
49
|
+
t.notOk(is)
|
|
50
|
+
t.end()
|
|
51
|
+
})
|
|
52
|
+
})
|
|
53
|
+
t.test('noent async', function (t) {
|
|
54
|
+
isexe(noent).catch(function (er) {
|
|
55
|
+
t.ok(er)
|
|
56
|
+
t.end()
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
t.test('noent ignore async', function (t) {
|
|
60
|
+
isexe(noent, { ignoreErrors: true }).then(function (is) {
|
|
61
|
+
t.notOk(is)
|
|
62
|
+
t.end()
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
t.end()
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
t.test('no promise', function (t) {
|
|
69
|
+
global.Promise = null
|
|
70
|
+
var isexe = reset()
|
|
71
|
+
t.throws('try to meow a promise', function () {
|
|
72
|
+
isexe(meow)
|
|
73
|
+
})
|
|
74
|
+
t.end()
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
t.test('access', { skip: accessSkip || winSkip }, function (t) {
|
|
78
|
+
runTest(t)
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
t.test('mode', { skip: winSkip }, function (t) {
|
|
82
|
+
delete fs.access
|
|
83
|
+
delete fs.accessSync
|
|
84
|
+
var isexe = reset()
|
|
85
|
+
t.ok(isexe.sync(ours, { uid: 0, gid: 0 }))
|
|
86
|
+
t.ok(isexe.sync(mine, { uid: 0, gid: 0 }))
|
|
87
|
+
runTest(t)
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
t.test('windows', function (t) {
|
|
91
|
+
global.TESTING_WINDOWS = true
|
|
92
|
+
var pathExt = '.EXE;.CAT;.CMD;.COM'
|
|
93
|
+
t.test('pathExt option', function (t) {
|
|
94
|
+
runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' })
|
|
95
|
+
})
|
|
96
|
+
t.test('pathExt env', function (t) {
|
|
97
|
+
process.env.PATHEXT = pathExt
|
|
98
|
+
runTest(t)
|
|
99
|
+
})
|
|
100
|
+
t.test('no pathExt', function (t) {
|
|
101
|
+
// with a pathExt of '', any filename is fine.
|
|
102
|
+
// so the "fail" one would still pass.
|
|
103
|
+
runTest(t, { pathExt: '', skipFail: true })
|
|
104
|
+
})
|
|
105
|
+
t.test('pathext with empty entry', function (t) {
|
|
106
|
+
// with a pathExt of '', any filename is fine.
|
|
107
|
+
// so the "fail" one would still pass.
|
|
108
|
+
runTest(t, { pathExt: ';' + pathExt, skipFail: true })
|
|
109
|
+
})
|
|
110
|
+
t.end()
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
t.test('cleanup', function (t) {
|
|
114
|
+
rimraf.sync(fixture)
|
|
115
|
+
t.end()
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
function runTest (t, options) {
|
|
119
|
+
var isexe = reset()
|
|
120
|
+
|
|
121
|
+
var optionsIgnore = Object.create(options || {})
|
|
122
|
+
optionsIgnore.ignoreErrors = true
|
|
123
|
+
|
|
124
|
+
if (!options || !options.skipFail) {
|
|
125
|
+
t.notOk(isexe.sync(fail, options))
|
|
126
|
+
}
|
|
127
|
+
t.notOk(isexe.sync(noent, optionsIgnore))
|
|
128
|
+
if (!options) {
|
|
129
|
+
t.ok(isexe.sync(meow))
|
|
130
|
+
} else {
|
|
131
|
+
t.ok(isexe.sync(meow, options))
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
t.ok(isexe.sync(mine, options))
|
|
135
|
+
t.ok(isexe.sync(ours, options))
|
|
136
|
+
t.throws(function () {
|
|
137
|
+
isexe.sync(noent, options)
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
t.test('meow async', function (t) {
|
|
141
|
+
if (!options) {
|
|
142
|
+
isexe(meow, function (er, is) {
|
|
143
|
+
if (er) {
|
|
144
|
+
throw er
|
|
145
|
+
}
|
|
146
|
+
t.ok(is)
|
|
147
|
+
t.end()
|
|
148
|
+
})
|
|
149
|
+
} else {
|
|
150
|
+
isexe(meow, options, function (er, is) {
|
|
151
|
+
if (er) {
|
|
152
|
+
throw er
|
|
153
|
+
}
|
|
154
|
+
t.ok(is)
|
|
155
|
+
t.end()
|
|
156
|
+
})
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
t.test('mine async', function (t) {
|
|
161
|
+
isexe(mine, options, function (er, is) {
|
|
162
|
+
if (er) {
|
|
163
|
+
throw er
|
|
164
|
+
}
|
|
165
|
+
t.ok(is)
|
|
166
|
+
t.end()
|
|
167
|
+
})
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
t.test('ours async', function (t) {
|
|
171
|
+
isexe(ours, options, function (er, is) {
|
|
172
|
+
if (er) {
|
|
173
|
+
throw er
|
|
174
|
+
}
|
|
175
|
+
t.ok(is)
|
|
176
|
+
t.end()
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
if (!options || !options.skipFail) {
|
|
181
|
+
t.test('fail async', function (t) {
|
|
182
|
+
isexe(fail, options, function (er, is) {
|
|
183
|
+
if (er) {
|
|
184
|
+
throw er
|
|
185
|
+
}
|
|
186
|
+
t.notOk(is)
|
|
187
|
+
t.end()
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
t.test('noent async', function (t) {
|
|
193
|
+
isexe(noent, options, function (er, is) {
|
|
194
|
+
t.ok(er)
|
|
195
|
+
t.notOk(is)
|
|
196
|
+
t.end()
|
|
197
|
+
})
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
t.test('noent ignore async', function (t) {
|
|
201
|
+
isexe(noent, optionsIgnore, function (er, is) {
|
|
202
|
+
if (er) {
|
|
203
|
+
throw er
|
|
204
|
+
}
|
|
205
|
+
t.notOk(is)
|
|
206
|
+
t.end()
|
|
207
|
+
})
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
t.test('directory is not executable', function (t) {
|
|
211
|
+
isexe(__dirname, options, function (er, is) {
|
|
212
|
+
if (er) {
|
|
213
|
+
throw er
|
|
214
|
+
}
|
|
215
|
+
t.notOk(is)
|
|
216
|
+
t.end()
|
|
217
|
+
})
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
t.end()
|
|
221
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module.exports = isexe
|
|
2
|
+
isexe.sync = sync
|
|
3
|
+
|
|
4
|
+
var fs = require('fs')
|
|
5
|
+
|
|
6
|
+
function checkPathExt (path, options) {
|
|
7
|
+
var pathext = options.pathExt !== undefined ?
|
|
8
|
+
options.pathExt : process.env.PATHEXT
|
|
9
|
+
|
|
10
|
+
if (!pathext) {
|
|
11
|
+
return true
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
pathext = pathext.split(';')
|
|
15
|
+
if (pathext.indexOf('') !== -1) {
|
|
16
|
+
return true
|
|
17
|
+
}
|
|
18
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
19
|
+
var p = pathext[i].toLowerCase()
|
|
20
|
+
if (p && path.substr(-p.length).toLowerCase() === p) {
|
|
21
|
+
return true
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return false
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function checkStat (stat, path, options) {
|
|
28
|
+
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
29
|
+
return false
|
|
30
|
+
}
|
|
31
|
+
return checkPathExt(path, options)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function isexe (path, options, cb) {
|
|
35
|
+
fs.stat(path, function (er, stat) {
|
|
36
|
+
cb(er, er ? false : checkStat(stat, path, options))
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function sync (path, options) {
|
|
41
|
+
return checkStat(fs.statSync(path), path, options)
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2020 Teambition
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# merge2
|
|
2
|
+
|
|
3
|
+
Merge multiple streams into one stream in sequence or parallel.
|
|
4
|
+
|
|
5
|
+
[![NPM version][npm-image]][npm-url]
|
|
6
|
+
[![Build Status][travis-image]][travis-url]
|
|
7
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Install with [npm](https://npmjs.org/package/merge2)
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install merge2
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
const gulp = require('gulp')
|
|
21
|
+
const merge2 = require('merge2')
|
|
22
|
+
const concat = require('gulp-concat')
|
|
23
|
+
const minifyHtml = require('gulp-minify-html')
|
|
24
|
+
const ngtemplate = require('gulp-ngtemplate')
|
|
25
|
+
|
|
26
|
+
gulp.task('app-js', function () {
|
|
27
|
+
return merge2(
|
|
28
|
+
gulp.src('static/src/tpl/*.html')
|
|
29
|
+
.pipe(minifyHtml({empty: true}))
|
|
30
|
+
.pipe(ngtemplate({
|
|
31
|
+
module: 'genTemplates',
|
|
32
|
+
standalone: true
|
|
33
|
+
})
|
|
34
|
+
), gulp.src([
|
|
35
|
+
'static/src/js/app.js',
|
|
36
|
+
'static/src/js/locale_zh-cn.js',
|
|
37
|
+
'static/src/js/router.js',
|
|
38
|
+
'static/src/js/tools.js',
|
|
39
|
+
'static/src/js/services.js',
|
|
40
|
+
'static/src/js/filters.js',
|
|
41
|
+
'static/src/js/directives.js',
|
|
42
|
+
'static/src/js/controllers.js'
|
|
43
|
+
])
|
|
44
|
+
)
|
|
45
|
+
.pipe(concat('app.js'))
|
|
46
|
+
.pipe(gulp.dest('static/dist/js/'))
|
|
47
|
+
})
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
const stream = merge2([stream1, stream2], stream3, {end: false})
|
|
52
|
+
//...
|
|
53
|
+
stream.add(stream4, stream5)
|
|
54
|
+
//..
|
|
55
|
+
stream.end()
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
// equal to merge2([stream1, stream2], stream3)
|
|
60
|
+
const stream = merge2()
|
|
61
|
+
stream.add([stream1, stream2])
|
|
62
|
+
stream.add(stream3)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
// merge order:
|
|
67
|
+
// 1. merge `stream1`;
|
|
68
|
+
// 2. merge `stream2` and `stream3` in parallel after `stream1` merged;
|
|
69
|
+
// 3. merge 'stream4' after `stream2` and `stream3` merged;
|
|
70
|
+
const stream = merge2(stream1, [stream2, stream3], stream4)
|
|
71
|
+
|
|
72
|
+
// merge order:
|
|
73
|
+
// 1. merge `stream5` and `stream6` in parallel after `stream4` merged;
|
|
74
|
+
// 2. merge 'stream7' after `stream5` and `stream6` merged;
|
|
75
|
+
stream.add([stream5, stream6], stream7)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```js
|
|
79
|
+
// nest merge
|
|
80
|
+
// equal to merge2(stream1, stream2, stream6, stream3, [stream4, stream5]);
|
|
81
|
+
const streamA = merge2(stream1, stream2)
|
|
82
|
+
const streamB = merge2(stream3, [stream4, stream5])
|
|
83
|
+
const stream = merge2(streamA, streamB)
|
|
84
|
+
streamA.add(stream6)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## API
|
|
88
|
+
|
|
89
|
+
```js
|
|
90
|
+
const merge2 = require('merge2')
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### merge2()
|
|
94
|
+
|
|
95
|
+
### merge2(options)
|
|
96
|
+
|
|
97
|
+
### merge2(stream1, stream2, ..., streamN)
|
|
98
|
+
|
|
99
|
+
### merge2(stream1, stream2, ..., streamN, options)
|
|
100
|
+
|
|
101
|
+
### merge2(stream1, [stream2, stream3, ...], streamN, options)
|
|
102
|
+
|
|
103
|
+
return a duplex stream (mergedStream). streams in array will be merged in parallel.
|
|
104
|
+
|
|
105
|
+
### mergedStream.add(stream)
|
|
106
|
+
|
|
107
|
+
### mergedStream.add(stream1, [stream2, stream3, ...], ...)
|
|
108
|
+
|
|
109
|
+
return the mergedStream.
|
|
110
|
+
|
|
111
|
+
### mergedStream.on('queueDrain', function() {})
|
|
112
|
+
|
|
113
|
+
It will emit 'queueDrain' when all streams merged. If you set `end === false` in options, this event give you a notice that should add more streams to merge or end the mergedStream.
|
|
114
|
+
|
|
115
|
+
#### stream
|
|
116
|
+
|
|
117
|
+
*option*
|
|
118
|
+
Type: `Readable` or `Duplex` or `Transform` stream.
|
|
119
|
+
|
|
120
|
+
#### options
|
|
121
|
+
|
|
122
|
+
*option*
|
|
123
|
+
Type: `Object`.
|
|
124
|
+
|
|
125
|
+
* **end** - `Boolean` - if `end === false` then mergedStream will not be auto ended, you should end by yourself. **Default:** `undefined`
|
|
126
|
+
|
|
127
|
+
* **pipeError** - `Boolean` - if `pipeError === true` then mergedStream will emit `error` event from source streams. **Default:** `undefined`
|
|
128
|
+
|
|
129
|
+
* **objectMode** - `Boolean` . **Default:** `true`
|
|
130
|
+
|
|
131
|
+
`objectMode` and other options(`highWaterMark`, `defaultEncoding` ...) is same as Node.js `Stream`.
|
|
132
|
+
|
|
133
|
+
## License
|
|
134
|
+
|
|
135
|
+
MIT © [Teambition](https://www.teambition.com)
|
|
136
|
+
|
|
137
|
+
[npm-url]: https://npmjs.org/package/merge2
|
|
138
|
+
[npm-image]: http://img.shields.io/npm/v/merge2.svg
|
|
139
|
+
|
|
140
|
+
[travis-url]: https://travis-ci.org/teambition/merge2
|
|
141
|
+
[travis-image]: http://img.shields.io/travis/teambition/merge2.svg
|
|
142
|
+
|
|
143
|
+
[downloads-url]: https://npmjs.org/package/merge2
|
|
144
|
+
[downloads-image]: http://img.shields.io/npm/dm/merge2.svg?style=flat-square
|