nx 19.4.3 → 19.5.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/init-local.js +2 -3
- package/package.json +30 -26
- package/src/adapter/angular-json.js +6 -6
- package/src/adapter/decorate-cli.js +1 -2
- package/src/adapter/ngcli-adapter.js +8 -8
- package/src/adapter/rxjs-for-await.js +5 -5
- package/src/command-line/add/add.js +2 -2
- package/src/command-line/affected/affected.js +2 -3
- package/src/command-line/connect/connect-to-nx-cloud.js +5 -6
- package/src/command-line/connect/view-logs.js +1 -2
- package/src/command-line/daemon/daemon.js +1 -2
- package/src/command-line/exec/exec.js +1 -2
- package/src/command-line/format/format.js +1 -2
- package/src/command-line/generate/generate.js +4 -5
- package/src/command-line/generate/generator-utils.js +2 -3
- package/src/command-line/graph/command-object.js +2 -2
- package/src/command-line/graph/graph.js +9 -5
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +1 -2
- package/src/command-line/init/implementation/add-nx-to-nest.js +1 -2
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +1 -2
- package/src/command-line/init/implementation/angular/index.js +1 -2
- package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -2
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +1 -2
- package/src/command-line/init/implementation/angular/standalone-workspace.js +1 -2
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +1 -1
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +7 -7
- package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.js +1 -2
- package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +1 -2
- package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.js +1 -2
- package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -2
- package/src/command-line/init/implementation/react/clean-up-files.js +1 -2
- package/src/command-line/init/implementation/react/index.js +1 -2
- package/src/command-line/init/implementation/react/read-name-from-package-json.js +1 -2
- package/src/command-line/init/implementation/react/rename-js-to-jsx.js +1 -2
- package/src/command-line/init/implementation/react/tsconfig-setup.js +1 -2
- package/src/command-line/init/implementation/react/write-craco-config.js +1 -2
- package/src/command-line/init/implementation/react/write-vite-config.js +1 -2
- package/src/command-line/init/implementation/react/write-vite-index-html.js +1 -2
- package/src/command-line/init/implementation/utils.js +10 -11
- package/src/command-line/init/init-v1.js +1 -2
- package/src/command-line/init/init-v2.js +1 -2
- package/src/command-line/list/list.js +1 -2
- package/src/command-line/migrate/migrate.d.ts +1 -1
- package/src/command-line/migrate/migrate.js +5 -5
- package/src/command-line/new/new.js +1 -2
- package/src/command-line/release/changelog.js +3 -3
- package/src/command-line/release/config/config.js +3 -3
- package/src/command-line/release/config/filter-release-groups.js +1 -2
- package/src/command-line/release/config/version-plans.js +3 -4
- package/src/command-line/release/plan.js +2 -2
- package/src/command-line/release/publish.js +2 -2
- package/src/command-line/release/release.js +2 -2
- package/src/command-line/release/utils/batch-projects-by-generator-config.js +1 -2
- package/src/command-line/release/utils/exec-command.js +1 -2
- package/src/command-line/release/utils/git.js +11 -12
- package/src/command-line/release/utils/github.js +5 -6
- package/src/command-line/release/utils/launch-editor.js +1 -2
- package/src/command-line/release/utils/markdown.js +1 -2
- package/src/command-line/release/utils/print-changes.d.ts +0 -1
- package/src/command-line/release/utils/print-changes.js +2 -3
- package/src/command-line/release/utils/resolve-changelog-renderer.js +1 -2
- package/src/command-line/release/utils/resolve-nx-json-error-message.js +1 -2
- package/src/command-line/release/utils/resolve-semver-specifier.js +2 -3
- package/src/command-line/release/utils/semver.js +4 -5
- package/src/command-line/release/utils/shared.js +6 -6
- package/src/command-line/release/version.js +2 -2
- package/src/command-line/repair/repair.js +1 -2
- package/src/command-line/report/report.js +7 -7
- package/src/command-line/reset/reset.js +1 -2
- package/src/command-line/run/executor-utils.js +2 -3
- package/src/command-line/run/run-one.js +1 -2
- package/src/command-line/run/run.js +5 -6
- package/src/command-line/run-many/run-many.js +2 -3
- package/src/command-line/show/project.js +1 -2
- package/src/command-line/show/projects.js +1 -2
- package/src/command-line/watch/watch.js +8 -2
- package/src/command-line/yargs-utils/documentation.js +1 -2
- package/src/command-line/yargs-utils/shared-options.js +12 -13
- package/src/commands-runner/create-command-graph.js +1 -2
- package/src/commands-runner/get-command-projects.js +1 -2
- package/src/config/calculate-default-project-name.js +2 -3
- package/src/config/configuration.js +2 -2
- package/src/config/nx-json.js +2 -3
- package/src/config/project-graph.js +3 -3
- package/src/config/schema-utils.js +3 -4
- package/src/config/to-project-name.js +1 -2
- package/src/core/graph/main.js +1 -1
- package/src/daemon/cache.js +6 -6
- package/src/daemon/client/client.d.ts +1 -2
- package/src/daemon/client/client.js +13 -1
- package/src/daemon/client/daemon-socket-messenger.d.ts +0 -1
- package/src/daemon/client/generate-help-output.js +1 -2
- package/src/daemon/is-on-daemon.js +1 -2
- package/src/daemon/message-types/get-context-file-data.js +2 -2
- package/src/daemon/message-types/get-files-in-directory.js +2 -2
- package/src/daemon/message-types/get-nx-workspace-files.js +2 -2
- package/src/daemon/message-types/glob.js +2 -2
- package/src/daemon/message-types/hash-glob.js +2 -2
- package/src/daemon/message-types/task-history.js +3 -3
- package/src/daemon/message-types/update-context-files.js +2 -2
- package/src/daemon/server/file-watching/changed-projects.js +1 -2
- package/src/daemon/server/file-watching/file-watcher-sockets.d.ts +0 -1
- package/src/daemon/server/file-watching/file-watcher-sockets.js +4 -4
- package/src/daemon/server/handle-context-file-data.js +1 -2
- package/src/daemon/server/handle-get-files-in-directory.js +1 -2
- package/src/daemon/server/handle-get-task-history.js +1 -2
- package/src/daemon/server/handle-glob.js +1 -2
- package/src/daemon/server/handle-hash-glob.js +1 -2
- package/src/daemon/server/handle-hash-tasks.js +1 -2
- package/src/daemon/server/handle-nx-workspace-files.js +1 -2
- package/src/daemon/server/handle-outputs-tracking.js +2 -3
- package/src/daemon/server/handle-process-in-background.js +1 -2
- package/src/daemon/server/handle-request-project-graph.js +1 -2
- package/src/daemon/server/handle-request-shutdown.d.ts +0 -1
- package/src/daemon/server/handle-request-shutdown.js +1 -2
- package/src/daemon/server/handle-write-task-runs-to-history.js +1 -2
- package/src/daemon/server/outputs-tracking.js +7 -8
- package/src/daemon/server/plugins.js +2 -3
- package/src/daemon/server/project-graph-incremental-recomputation.js +3 -3
- package/src/daemon/server/server.d.ts +0 -1
- package/src/daemon/server/server.js +2 -3
- package/src/daemon/server/shutdown-utils.d.ts +0 -1
- package/src/daemon/server/shutdown-utils.js +9 -9
- package/src/daemon/server/watcher.d.ts +0 -1
- package/src/daemon/server/watcher.js +3 -4
- package/src/daemon/socket-utils.js +3 -3
- package/src/daemon/tmp-dir.js +6 -6
- package/src/devkit-exports.d.ts +1 -0
- package/src/devkit-exports.js +3 -1
- package/src/executors/noop/noop.impl.js +1 -1
- package/src/executors/run-commands/run-commands.impl.js +3 -3
- package/src/executors/run-script/run-script.impl.js +1 -1
- package/src/executors/utils/convert-nx-executor.js +1 -2
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +1 -2
- package/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +1 -1
- package/src/generators/testing-utils/create-tree-with-empty-workspace.js +2 -3
- package/src/generators/testing-utils/create-tree.js +1 -2
- package/src/generators/tree.d.ts +0 -2
- package/src/generators/tree.js +3 -3
- package/src/generators/utils/glob.js +2 -3
- package/src/generators/utils/json.js +3 -4
- package/src/generators/utils/nx-json.js +2 -3
- package/src/generators/utils/project-configuration.js +7 -7
- package/src/hasher/create-task-hasher.js +1 -2
- package/src/hasher/file-hasher.js +2 -3
- package/src/hasher/hash-task.d.ts +0 -1
- package/src/hasher/hash-task.js +2 -3
- package/src/hasher/native-task-hasher-impl.d.ts +0 -1
- package/src/hasher/node-task-hasher-impl.d.ts +0 -1
- package/src/hasher/task-hasher.d.ts +0 -1
- package/src/hasher/task-hasher.js +10 -10
- package/src/migrations/update-15-0-0/migrate-to-inputs.js +1 -1
- package/src/migrations/update-15-0-0/prefix-outputs.js +1 -1
- package/src/migrations/update-16-0-0/remove-nrwl-cli.js +1 -1
- package/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +1 -1
- package/src/migrations/update-16-0-0/update-nx-cloud-runner.js +1 -1
- package/src/migrations/update-16-2-0/remove-run-commands-output-path.js +1 -1
- package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +1 -1
- package/src/migrations/update-16-9-0/remove-project-name-and-root-format.js +1 -1
- package/src/migrations/update-17-0-0/move-cache-directory.js +1 -1
- package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +1 -1
- package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +1 -1
- package/src/migrations/update-17-2-0/move-default-base.js +1 -1
- package/src/migrations/update-17-3-0/nx-release-path.js +2 -3
- package/src/migrations/update-17-3-0/update-nxw.js +1 -1
- package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +1 -1
- package/src/migrations/update-19-2-0/move-workspace-data-directory.js +3 -4
- package/src/migrations/update-19-2-4/set-project-name.js +1 -1
- package/src/native/assert-supported-platform.js +1 -2
- package/src/native/browser.js +1 -0
- package/src/native/index.d.ts +178 -138
- package/src/native/index.js +16 -0
- package/src/native/native-bindings.js +352 -238
- package/src/native/native-file-cache-location.js +1 -2
- package/src/native/nx.wasi-browser.js +108 -0
- package/src/native/nx.wasi.cjs +139 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/native/transform-objects.js +1 -2
- package/src/native/wasi-worker-browser.mjs +32 -0
- package/src/native/wasi-worker.mjs +63 -0
- package/src/nx-cloud/debug-logger.js +1 -2
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +1 -2
- package/src/nx-cloud/resolution-helpers.js +1 -2
- package/src/nx-cloud/update-manager.js +2 -2
- package/src/nx-cloud/utilities/axios.js +1 -2
- package/src/nx-cloud/utilities/get-cloud-options.js +1 -2
- package/src/nx-cloud/utilities/url-shorten.js +8 -9
- package/src/plugins/js/hasher/hasher.js +1 -2
- package/src/plugins/js/lock-file/lock-file.js +6 -6
- package/src/plugins/js/lock-file/npm-parser.js +3 -4
- package/src/plugins/js/lock-file/pnpm-parser.js +3 -4
- package/src/plugins/js/lock-file/project-graph-pruning.js +1 -2
- package/src/plugins/js/lock-file/utils/package-json.js +2 -3
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +5 -6
- package/src/plugins/js/lock-file/yarn-parser.js +3 -4
- package/src/plugins/js/package-json/create-package-json.js +2 -3
- package/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +1 -2
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +1 -2
- package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +1 -2
- package/src/plugins/js/project-graph/build-dependencies/strip-source-code.js +1 -2
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +2 -2
- package/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +1 -2
- package/src/plugins/js/utils/config.js +1 -2
- package/src/plugins/js/utils/register.d.ts +1 -0
- package/src/plugins/js/utils/register.js +7 -8
- package/src/plugins/js/utils/resolve-relative-to-dir.js +1 -2
- package/src/plugins/js/utils/typescript.js +5 -6
- package/src/plugins/js/versions.d.ts +1 -1
- package/src/plugins/js/versions.js +1 -1
- package/src/plugins/package-json-workspaces/create-nodes.js +5 -5
- package/src/plugins/project-json/build-nodes/project-json.js +3 -3
- package/src/project-graph/affected/affected-project-graph.js +1 -2
- package/src/project-graph/build-project-graph.js +3 -4
- package/src/project-graph/error-types.js +11 -11
- package/src/project-graph/file-map-utils.js +4 -5
- package/src/project-graph/file-utils.d.ts +1 -1
- package/src/project-graph/file-utils.js +7 -7
- package/src/project-graph/nx-deps-cache.js +8 -8
- package/src/project-graph/operators.js +5 -5
- package/src/project-graph/plugins/internal-api.js +4 -5
- package/src/project-graph/plugins/isolation/index.js +1 -2
- package/src/project-graph/plugins/isolation/messaging.d.ts +0 -2
- package/src/project-graph/plugins/isolation/messaging.js +4 -5
- package/src/project-graph/plugins/isolation/plugin-pool.js +1 -2
- package/src/project-graph/plugins/loader.js +7 -7
- package/src/project-graph/plugins/utils.js +4 -5
- package/src/project-graph/project-graph-builder.js +2 -2
- package/src/project-graph/project-graph.js +7 -8
- package/src/project-graph/utils/build-all-workspace-files.js +1 -2
- package/src/project-graph/utils/find-project-for-path.js +4 -5
- package/src/project-graph/utils/implicit-project-dependencies.js +1 -2
- package/src/project-graph/utils/normalize-project-nodes.js +2 -3
- package/src/project-graph/utils/project-configuration-utils.d.ts +8 -6
- package/src/project-graph/utils/project-configuration-utils.js +118 -54
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -3
- package/src/project-graph/utils/retrieve-workspace-files.js +6 -7
- package/src/tasks-runner/create-task-graph.js +3 -3
- package/src/tasks-runner/forked-process-task-runner.d.ts +0 -1
- package/src/tasks-runner/init-tasks-runner.js +1 -2
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +1 -2
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +1 -2
- package/src/tasks-runner/life-cycles/formatting-utils.js +2 -3
- package/src/tasks-runner/life-cycles/pretty-time.js +1 -2
- package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -2
- package/src/tasks-runner/pseudo-ipc.d.ts +0 -1
- package/src/tasks-runner/pseudo-terminal.d.ts +0 -1
- package/src/tasks-runner/pseudo-terminal.js +5 -2
- package/src/tasks-runner/run-command.js +4 -5
- package/src/tasks-runner/task-env.d.ts +0 -1
- package/src/tasks-runner/task-env.js +5 -6
- package/src/tasks-runner/task-graph-utils.js +2 -3
- package/src/tasks-runner/utils.js +25 -26
- package/src/utils/ab-testing.js +2 -2
- package/src/utils/all-file-data.js +1 -2
- package/src/utils/assert-workspace-validity.js +1 -2
- package/src/utils/async-iterator.js +2 -3
- package/src/utils/cache-directory.js +2 -2
- package/src/utils/child-process.d.ts +0 -1
- package/src/utils/child-process.js +3 -3
- package/src/utils/chunkify.js +1 -2
- package/src/utils/code-frames.js +1 -2
- package/src/utils/collapse-expanded-outputs.js +1 -2
- package/src/utils/command-line-utils.js +5 -6
- package/src/utils/consume-messages-from-socket.js +1 -2
- package/src/utils/default-base.js +1 -2
- package/src/utils/dotenv.js +1 -2
- package/src/utils/exit-codes.d.ts +0 -1
- package/src/utils/exit-codes.js +1 -2
- package/src/utils/fileutils.d.ts +0 -1
- package/src/utils/fileutils.js +9 -10
- package/src/utils/find-matching-projects.js +2 -2
- package/src/utils/find-workspace-root.js +1 -2
- package/src/utils/get-package-name-from-import-path.js +1 -2
- package/src/utils/git-utils.js +4 -5
- package/src/utils/globs.js +1 -2
- package/src/utils/ignore.js +4 -4
- package/src/utils/installation-directory.js +2 -3
- package/src/utils/is-ci.js +1 -2
- package/src/utils/json-diff.js +5 -5
- package/src/utils/json.js +3 -3
- package/src/utils/logger.js +2 -2
- package/src/utils/nx-cloud-utils.js +3 -4
- package/src/utils/nx-plugin.deprecated.js +1 -4
- package/src/utils/object-sort.js +1 -2
- package/src/utils/package-json.js +8 -9
- package/src/utils/package-manager.js +13 -14
- package/src/utils/params.js +14 -14
- package/src/utils/path.js +3 -4
- package/src/utils/plugins/community-plugins.js +1 -2
- package/src/utils/plugins/core-plugins.js +2 -3
- package/src/utils/plugins/installed-plugins.js +3 -4
- package/src/utils/plugins/local-plugins.js +2 -3
- package/src/utils/plugins/plugin-capabilities.js +2 -3
- package/src/utils/plugins/shared.js +1 -2
- package/src/utils/print-help.js +1 -2
- package/src/utils/project-graph-utils.js +4 -5
- package/src/utils/serializable-error.js +1 -2
- package/src/utils/serialize-overrides-into-command-line.js +1 -2
- package/src/utils/serialize-target.js +1 -2
- package/src/utils/split-target.js +2 -3
- package/src/utils/strip-indents.js +1 -2
- package/src/utils/task-history.js +3 -3
- package/src/utils/update-nxw.js +1 -2
- package/src/utils/workspace-configuration-check.js +1 -2
- package/src/utils/workspace-context.js +10 -11
- package/src/utils/workspace-root.js +3 -3
- package/src/plugins/target-defaults/symbols.d.ts +0 -17
- package/src/plugins/target-defaults/symbols.js +0 -20
- package/src/plugins/target-defaults/target-defaults-plugin.d.ts +0 -121
- package/src/plugins/target-defaults/target-defaults-plugin.js +0 -176
@@ -1,6 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.withExcludeOption = withExcludeOption;
|
4
|
+
exports.withRunOptions = withRunOptions;
|
5
|
+
exports.withTargetAndConfigurationOption = withTargetAndConfigurationOption;
|
6
|
+
exports.withConfiguration = withConfiguration;
|
7
|
+
exports.withVerbose = withVerbose;
|
8
|
+
exports.withBatch = withBatch;
|
9
|
+
exports.withAffectedOptions = withAffectedOptions;
|
10
|
+
exports.withRunManyOptions = withRunManyOptions;
|
11
|
+
exports.withOverrides = withOverrides;
|
12
|
+
exports.withOutputStyleOption = withOutputStyleOption;
|
13
|
+
exports.withRunOneOptions = withRunOneOptions;
|
14
|
+
exports.parseCSV = parseCSV;
|
4
15
|
function withExcludeOption(yargs) {
|
5
16
|
return yargs.option('exclude', {
|
6
17
|
describe: 'Exclude certain projects from being processed',
|
@@ -8,7 +19,6 @@ function withExcludeOption(yargs) {
|
|
8
19
|
coerce: parseCSV,
|
9
20
|
});
|
10
21
|
}
|
11
|
-
exports.withExcludeOption = withExcludeOption;
|
12
22
|
function withRunOptions(yargs) {
|
13
23
|
return withVerbose(withExcludeOption(yargs))
|
14
24
|
.option('parallel', {
|
@@ -71,7 +81,6 @@ function withRunOptions(yargs) {
|
|
71
81
|
alias: 'agents',
|
72
82
|
});
|
73
83
|
}
|
74
|
-
exports.withRunOptions = withRunOptions;
|
75
84
|
function withTargetAndConfigurationOption(yargs, demandOption = true) {
|
76
85
|
return withConfiguration(yargs).option('targets', {
|
77
86
|
describe: 'Tasks to run for affected projects',
|
@@ -83,7 +92,6 @@ function withTargetAndConfigurationOption(yargs, demandOption = true) {
|
|
83
92
|
global: false,
|
84
93
|
});
|
85
94
|
}
|
86
|
-
exports.withTargetAndConfigurationOption = withTargetAndConfigurationOption;
|
87
95
|
function withConfiguration(yargs) {
|
88
96
|
return yargs.options('configuration', {
|
89
97
|
describe: 'This is the configuration to use when performing tasks on projects',
|
@@ -91,7 +99,6 @@ function withConfiguration(yargs) {
|
|
91
99
|
alias: 'c',
|
92
100
|
});
|
93
101
|
}
|
94
|
-
exports.withConfiguration = withConfiguration;
|
95
102
|
function withVerbose(yargs) {
|
96
103
|
return yargs
|
97
104
|
.option('verbose', {
|
@@ -104,7 +111,6 @@ function withVerbose(yargs) {
|
|
104
111
|
}
|
105
112
|
});
|
106
113
|
}
|
107
|
-
exports.withVerbose = withVerbose;
|
108
114
|
function withBatch(yargs) {
|
109
115
|
return yargs.options('batch', {
|
110
116
|
type: 'boolean',
|
@@ -115,7 +121,6 @@ function withBatch(yargs) {
|
|
115
121
|
default: false,
|
116
122
|
});
|
117
123
|
}
|
118
|
-
exports.withBatch = withBatch;
|
119
124
|
function withAffectedOptions(yargs) {
|
120
125
|
return withExcludeOption(yargs)
|
121
126
|
.parserConfiguration({
|
@@ -157,7 +162,6 @@ function withAffectedOptions(yargs) {
|
|
157
162
|
uncommitted: ['files', 'untracked', 'base', 'head'],
|
158
163
|
});
|
159
164
|
}
|
160
|
-
exports.withAffectedOptions = withAffectedOptions;
|
161
165
|
function withRunManyOptions(yargs) {
|
162
166
|
return withRunOptions(yargs)
|
163
167
|
.parserConfiguration({
|
@@ -177,7 +181,6 @@ function withRunManyOptions(yargs) {
|
|
177
181
|
default: true,
|
178
182
|
});
|
179
183
|
}
|
180
|
-
exports.withRunManyOptions = withRunManyOptions;
|
181
184
|
function withOverrides(args, commandLevel = 1) {
|
182
185
|
const unparsedArgs = (args['--'] ?? args._.slice(commandLevel)).map((v) => v.toString());
|
183
186
|
delete args['--'];
|
@@ -187,7 +190,6 @@ function withOverrides(args, commandLevel = 1) {
|
|
187
190
|
__overrides_unparsed__: unparsedArgs,
|
188
191
|
};
|
189
192
|
}
|
190
|
-
exports.withOverrides = withOverrides;
|
191
193
|
const allOutputStyles = [
|
192
194
|
'dynamic',
|
193
195
|
'static',
|
@@ -215,7 +217,6 @@ function withOutputStyleOption(yargs, choices = [
|
|
215
217
|
choices,
|
216
218
|
});
|
217
219
|
}
|
218
|
-
exports.withOutputStyleOption = withOutputStyleOption;
|
219
220
|
function withRunOneOptions(yargs) {
|
220
221
|
const executorShouldShowHelp = !(process.argv[2] === 'run' && process.argv[3] === '--help');
|
221
222
|
const res = withRunOptions(withOutputStyleOption(withConfiguration(yargs), allOutputStyles))
|
@@ -239,7 +240,6 @@ function withRunOneOptions(yargs) {
|
|
239
240
|
return res.epilog(`Run "nx run myapp:mytarget --help" to see information about the executor's schema.`);
|
240
241
|
}
|
241
242
|
}
|
242
|
-
exports.withRunOneOptions = withRunOneOptions;
|
243
243
|
function parseCSV(args) {
|
244
244
|
if (!args) {
|
245
245
|
return [];
|
@@ -253,4 +253,3 @@ function parseCSV(args) {
|
|
253
253
|
const items = args.split(',');
|
254
254
|
return items.map((i) => i.startsWith('"') && i.endsWith('"') ? i.slice(1, -1) : i);
|
255
255
|
}
|
256
|
-
exports.parseCSV = parseCSV;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.createCommandGraph =
|
3
|
+
exports.createCommandGraph = createCommandGraph;
|
4
4
|
const task_graph_utils_1 = require("../tasks-runner/task-graph-utils");
|
5
5
|
const output_1 = require("../utils/output");
|
6
6
|
/**
|
@@ -63,4 +63,3 @@ function createCommandGraph(projectGraph, projectNames, nxArgs) {
|
|
63
63
|
}
|
64
64
|
return commandGraph;
|
65
65
|
}
|
66
|
-
exports.createCommandGraph = createCommandGraph;
|
@@ -1,13 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getCommandProjects =
|
3
|
+
exports.getCommandProjects = getCommandProjects;
|
4
4
|
const utils_1 = require("../tasks-runner/utils");
|
5
5
|
const create_command_graph_1 = require("./create-command-graph");
|
6
6
|
function getCommandProjects(projectGraph, projects, nxArgs) {
|
7
7
|
const commandGraph = (0, create_command_graph_1.createCommandGraph)(projectGraph, projects.map((project) => project.name), nxArgs);
|
8
8
|
return getSortedProjects(commandGraph);
|
9
9
|
}
|
10
|
-
exports.getCommandProjects = getCommandProjects;
|
11
10
|
function getSortedProjects(commandGraph, sortedProjects = []) {
|
12
11
|
const roots = commandGraph.roots;
|
13
12
|
if (!roots.length) {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.calculateDefaultProjectName = calculateDefaultProjectName;
|
4
|
+
exports.findMatchingProjectInCwd = findMatchingProjectInCwd;
|
4
5
|
const find_project_for_path_1 = require("../project-graph/utils/find-project-for-path");
|
5
6
|
const path_1 = require("path");
|
6
7
|
function calculateDefaultProjectName(cwd, root, { projects }, nxJson) {
|
@@ -29,7 +30,6 @@ function calculateDefaultProjectName(cwd, root, { projects }, nxJson) {
|
|
29
30
|
nxJson.cli?.defaultProjectName ??
|
30
31
|
nxJson?.defaultProject);
|
31
32
|
}
|
32
|
-
exports.calculateDefaultProjectName = calculateDefaultProjectName;
|
33
33
|
function findMatchingProjectInCwd(projects, relativeCwd) {
|
34
34
|
const projectRootMappings = new Map();
|
35
35
|
for (const projectName of Object.keys(projects)) {
|
@@ -39,4 +39,3 @@ function findMatchingProjectInCwd(projects, relativeCwd) {
|
|
39
39
|
const matchingProject = (0, find_project_for_path_1.findProjectForPath)(relativeCwd, projectRootMappings);
|
40
40
|
return matchingProject;
|
41
41
|
}
|
42
|
-
exports.findMatchingProjectInCwd = findMatchingProjectInCwd;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.readNxJson =
|
3
|
+
exports.readNxJson = void 0;
|
4
|
+
exports.workspaceLayout = workspaceLayout;
|
4
5
|
const nx_json_1 = require("./nx-json");
|
5
6
|
/**
|
6
7
|
* Returns information about where apps and libs will be created.
|
@@ -12,6 +13,5 @@ function workspaceLayout() {
|
|
12
13
|
libsDir: nxJson.workspaceLayout?.libsDir ?? 'libs',
|
13
14
|
};
|
14
15
|
}
|
15
|
-
exports.workspaceLayout = workspaceLayout;
|
16
16
|
var nx_json_2 = require("./nx-json");
|
17
17
|
Object.defineProperty(exports, "readNxJson", { enumerable: true, get: function () { return nx_json_2.readNxJson; } });
|
package/src/config/nx-json.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.readNxJson = readNxJson;
|
4
|
+
exports.hasNxJson = hasNxJson;
|
4
5
|
const fs_1 = require("fs");
|
5
6
|
const path_1 = require("path");
|
6
7
|
const fileutils_1 = require("../utils/fileutils");
|
@@ -32,9 +33,7 @@ function readNxJson(root = workspace_root_1.workspaceRoot) {
|
|
32
33
|
}
|
33
34
|
}
|
34
35
|
}
|
35
|
-
exports.readNxJson = readNxJson;
|
36
36
|
function hasNxJson(root) {
|
37
37
|
const nxJson = (0, path_1.join)(root, 'nx.json');
|
38
38
|
return (0, fs_1.existsSync)(nxJson);
|
39
39
|
}
|
40
|
-
exports.hasNxJson = hasNxJson;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.DependencyType =
|
3
|
+
exports.DependencyType = void 0;
|
4
|
+
exports.fileDataDepTarget = fileDataDepTarget;
|
5
|
+
exports.fileDataDepType = fileDataDepType;
|
4
6
|
function fileDataDepTarget(dep) {
|
5
7
|
return typeof dep === 'string'
|
6
8
|
? dep
|
@@ -8,7 +10,6 @@ function fileDataDepTarget(dep) {
|
|
8
10
|
? dep[0]
|
9
11
|
: dep[1];
|
10
12
|
}
|
11
|
-
exports.fileDataDepTarget = fileDataDepTarget;
|
12
13
|
function fileDataDepType(dep) {
|
13
14
|
return typeof dep === 'string'
|
14
15
|
? 'static'
|
@@ -16,7 +17,6 @@ function fileDataDepType(dep) {
|
|
16
17
|
? dep[1]
|
17
18
|
: dep[2];
|
18
19
|
}
|
19
|
-
exports.fileDataDepType = fileDataDepType;
|
20
20
|
/**
|
21
21
|
* Type of dependency between projects
|
22
22
|
*/
|
@@ -1,6 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.getImplementationFactory = getImplementationFactory;
|
4
|
+
exports.resolveImplementation = resolveImplementation;
|
5
|
+
exports.resolveSchema = resolveSchema;
|
4
6
|
const fs_1 = require("fs");
|
5
7
|
const path_1 = require("path");
|
6
8
|
const plugins_1 = require("../project-graph/plugins");
|
@@ -23,7 +25,6 @@ function getImplementationFactory(implementation, directory) {
|
|
23
25
|
: module.default ?? module;
|
24
26
|
};
|
25
27
|
}
|
26
|
-
exports.getImplementationFactory = getImplementationFactory;
|
27
28
|
/**
|
28
29
|
* This function is used to resolve the implementation of an executor or generator.
|
29
30
|
* @param implementationModulePath
|
@@ -46,7 +47,6 @@ function resolveImplementation(implementationModulePath, directory) {
|
|
46
47
|
}
|
47
48
|
throw new Error(`Could not resolve "${implementationModulePath}" from "${directory}".`);
|
48
49
|
}
|
49
|
-
exports.resolveImplementation = resolveImplementation;
|
50
50
|
function resolveSchema(schemaPath, directory) {
|
51
51
|
const maybeSchemaPath = (0, path_1.join)(directory, schemaPath);
|
52
52
|
if ((0, fs_1.existsSync)(maybeSchemaPath)) {
|
@@ -56,4 +56,3 @@ function resolveSchema(schemaPath, directory) {
|
|
56
56
|
paths: [directory],
|
57
57
|
});
|
58
58
|
}
|
59
|
-
exports.resolveSchema = resolveSchema;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.toProjectName =
|
3
|
+
exports.toProjectName = toProjectName;
|
4
4
|
const path_1 = require("path");
|
5
5
|
/**
|
6
6
|
* Pulled from toFileName in names from @nx/devkit.
|
@@ -10,4 +10,3 @@ function toProjectName(fileName) {
|
|
10
10
|
const parts = (0, path_1.dirname)(fileName).split(/[\/\\]/g);
|
11
11
|
return parts[parts.length - 1].toLowerCase();
|
12
12
|
}
|
13
|
-
exports.toProjectName = toProjectName;
|