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
package/bin/init-local.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.initLocal = initLocal;
|
4
|
+
exports.rewriteTargetsAndProjects = rewriteTargetsAndProjects;
|
4
5
|
const perf_hooks_1 = require("perf_hooks");
|
5
6
|
const nx_commands_1 = require("../src/command-line/nx-commands");
|
6
7
|
const strip_indents_1 = require("../src/utils/strip-indents");
|
@@ -45,7 +46,6 @@ function initLocal(workspace) {
|
|
45
46
|
process.exit(1);
|
46
47
|
}
|
47
48
|
}
|
48
|
-
exports.initLocal = initLocal;
|
49
49
|
function rewriteTargetsAndProjects(args) {
|
50
50
|
const newArgs = [args[2]];
|
51
51
|
let i = 3;
|
@@ -76,7 +76,6 @@ function rewriteTargetsAndProjects(args) {
|
|
76
76
|
}
|
77
77
|
return newArgs;
|
78
78
|
}
|
79
|
-
exports.rewriteTargetsAndProjects = rewriteTargetsAndProjects;
|
80
79
|
function isKnownCommand(command) {
|
81
80
|
const commands = [
|
82
81
|
...Object.keys(nx_commands_1.commandsObject
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.
|
3
|
+
"version": "19.5.0-beta.1",
|
4
4
|
"private": false,
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
6
6
|
"repository": {
|
@@ -37,6 +37,7 @@
|
|
37
37
|
},
|
38
38
|
"homepage": "https://nx.dev",
|
39
39
|
"dependencies": {
|
40
|
+
"@napi-rs/wasm-runtime": "0.2.4",
|
40
41
|
"@yarnpkg/lockfile": "^1.1.0",
|
41
42
|
"@yarnpkg/parsers": "3.0.0-rc.46",
|
42
43
|
"@zkochan/js-yaml": "0.0.7",
|
@@ -70,7 +71,7 @@
|
|
70
71
|
"yargs-parser": "21.1.1",
|
71
72
|
"node-machine-id": "1.1.12",
|
72
73
|
"ora": "5.3.0",
|
73
|
-
"@nrwl/tao": "19.
|
74
|
+
"@nrwl/tao": "19.5.0-beta.1"
|
74
75
|
},
|
75
76
|
"peerDependencies": {
|
76
77
|
"@swc-node/register": "^1.8.0",
|
@@ -85,16 +86,16 @@
|
|
85
86
|
}
|
86
87
|
},
|
87
88
|
"optionalDependencies": {
|
88
|
-
"@nx/nx-darwin-x64": "19.
|
89
|
-
"@nx/nx-darwin-arm64": "19.
|
90
|
-
"@nx/nx-linux-x64-gnu": "19.
|
91
|
-
"@nx/nx-linux-x64-musl": "19.
|
92
|
-
"@nx/nx-win32-x64-msvc": "19.
|
93
|
-
"@nx/nx-linux-arm64-gnu": "19.
|
94
|
-
"@nx/nx-linux-arm64-musl": "19.
|
95
|
-
"@nx/nx-linux-arm-gnueabihf": "19.
|
96
|
-
"@nx/nx-win32-arm64-msvc": "19.
|
97
|
-
"@nx/nx-freebsd-x64": "19.
|
89
|
+
"@nx/nx-darwin-x64": "19.5.0-beta.1",
|
90
|
+
"@nx/nx-darwin-arm64": "19.5.0-beta.1",
|
91
|
+
"@nx/nx-linux-x64-gnu": "19.5.0-beta.1",
|
92
|
+
"@nx/nx-linux-x64-musl": "19.5.0-beta.1",
|
93
|
+
"@nx/nx-win32-x64-msvc": "19.5.0-beta.1",
|
94
|
+
"@nx/nx-linux-arm64-gnu": "19.5.0-beta.1",
|
95
|
+
"@nx/nx-linux-arm64-musl": "19.5.0-beta.1",
|
96
|
+
"@nx/nx-linux-arm-gnueabihf": "19.5.0-beta.1",
|
97
|
+
"@nx/nx-win32-arm64-msvc": "19.5.0-beta.1",
|
98
|
+
"@nx/nx-freebsd-x64": "19.5.0-beta.1"
|
98
99
|
},
|
99
100
|
"nx-migrations": {
|
100
101
|
"migrations": "./migrations.json",
|
@@ -170,21 +171,24 @@
|
|
170
171
|
"access": "public"
|
171
172
|
},
|
172
173
|
"napi": {
|
173
|
-
"
|
174
|
-
"
|
175
|
-
|
174
|
+
"binaryName": "nx",
|
175
|
+
"packageName": "@nx/nx",
|
176
|
+
"wasm": {
|
177
|
+
"initialMemory": 16384,
|
178
|
+
"maximumMemory": 32768
|
176
179
|
},
|
177
|
-
"
|
178
|
-
"
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
180
|
+
"targets": [
|
181
|
+
"x86_64-unknown-linux-gnu",
|
182
|
+
"x86_64-pc-windows-msvc",
|
183
|
+
"x86_64-apple-darwin",
|
184
|
+
"aarch64-apple-darwin",
|
185
|
+
"aarch64-unknown-linux-gnu",
|
186
|
+
"aarch64-unknown-linux-musl",
|
187
|
+
"aarch64-pc-windows-msvc",
|
188
|
+
"armv7-unknown-linux-gnueabihf",
|
189
|
+
"x86_64-unknown-linux-musl",
|
190
|
+
"x86_64-unknown-freebsd"
|
191
|
+
]
|
188
192
|
},
|
189
193
|
"main": "./bin/nx.js",
|
190
194
|
"type": "commonjs"
|
@@ -1,6 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.NxAngularJsonPlugin = exports.NX_ANGULAR_JSON_PLUGIN_NAME = void 0;
|
4
|
+
exports.shouldMergeAngularProjects = shouldMergeAngularProjects;
|
5
|
+
exports.isAngularPluginInstalled = isAngularPluginInstalled;
|
6
|
+
exports.toNewFormat = toNewFormat;
|
7
|
+
exports.toOldFormat = toOldFormat;
|
8
|
+
exports.renamePropertyWithStableKeys = renamePropertyWithStableKeys;
|
4
9
|
const fs_1 = require("fs");
|
5
10
|
const path = require("path");
|
6
11
|
const fileutils_1 = require("../utils/fileutils");
|
@@ -28,7 +33,6 @@ function shouldMergeAngularProjects(root, includeProjectsFromAngularJson) {
|
|
28
33
|
return false;
|
29
34
|
}
|
30
35
|
}
|
31
|
-
exports.shouldMergeAngularProjects = shouldMergeAngularProjects;
|
32
36
|
function isAngularPluginInstalled() {
|
33
37
|
try {
|
34
38
|
// nx-ignore-next-line
|
@@ -45,7 +49,6 @@ function isAngularPluginInstalled() {
|
|
45
49
|
}
|
46
50
|
}
|
47
51
|
}
|
48
|
-
exports.isAngularPluginInstalled = isAngularPluginInstalled;
|
49
52
|
function readAngularJson(angularCliWorkspaceRoot) {
|
50
53
|
return toNewFormat((0, fileutils_1.readJsonFile)(path.join(angularCliWorkspaceRoot, 'angular.json'))).projects;
|
51
54
|
}
|
@@ -78,7 +81,6 @@ function toNewFormat(w) {
|
|
78
81
|
}
|
79
82
|
return w;
|
80
83
|
}
|
81
|
-
exports.toNewFormat = toNewFormat;
|
82
84
|
function toOldFormat(w) {
|
83
85
|
if (w.projects) {
|
84
86
|
for (const name in w.projects) {
|
@@ -108,7 +110,6 @@ function toOldFormat(w) {
|
|
108
110
|
}
|
109
111
|
return w;
|
110
112
|
}
|
111
|
-
exports.toOldFormat = toOldFormat;
|
112
113
|
// we have to do it this way to preserve the order of properties
|
113
114
|
// not to screw up the formatting
|
114
115
|
function renamePropertyWithStableKeys(obj, from, to) {
|
@@ -125,4 +126,3 @@ function renamePropertyWithStableKeys(obj, from, to) {
|
|
125
126
|
}
|
126
127
|
});
|
127
128
|
}
|
128
|
-
exports.renamePropertyWithStableKeys = renamePropertyWithStableKeys;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.decorateCli =
|
3
|
+
exports.decorateCli = decorateCli;
|
4
4
|
const fs_1 = require("fs");
|
5
5
|
const output_1 = require("../utils/output");
|
6
6
|
function decorateCli() {
|
@@ -22,4 +22,3 @@ function decorateCli() {
|
|
22
22
|
`;
|
23
23
|
(0, fs_1.writeFileSync)(path, newContent);
|
24
24
|
}
|
25
|
-
exports.decorateCli = decorateCli;
|
@@ -1,6 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getLogger = exports.
|
3
|
+
exports.getLogger = exports.NxScopeHostUsedForWrappedSchematics = exports.NxScopedHostForBuilders = exports.NxScopedHost = void 0;
|
4
|
+
exports.createBuilderContext = createBuilderContext;
|
5
|
+
exports.scheduleTarget = scheduleTarget;
|
6
|
+
exports.arrayBufferToString = arrayBufferToString;
|
7
|
+
exports.generate = generate;
|
8
|
+
exports.runMigration = runMigration;
|
9
|
+
exports.mockSchematicsForTesting = mockSchematicsForTesting;
|
10
|
+
exports.wrapAngularDevkitSchematic = wrapAngularDevkitSchematic;
|
4
11
|
const core_1 = require("@angular-devkit/core");
|
5
12
|
const node_1 = require("@angular-devkit/core/node");
|
6
13
|
const chalk = require("chalk");
|
@@ -104,7 +111,6 @@ async function createBuilderContext(builderInfo, context) {
|
|
104
111
|
};
|
105
112
|
return builderContext;
|
106
113
|
}
|
107
|
-
exports.createBuilderContext = createBuilderContext;
|
108
114
|
async function scheduleTarget(root, opts, verbose) {
|
109
115
|
const { Architect } = require('@angular-devkit/architect');
|
110
116
|
const logger = (0, exports.getLogger)(verbose);
|
@@ -129,7 +135,6 @@ async function scheduleTarget(root, opts, verbose) {
|
|
129
135
|
lastOutputError ? logger.error(lastOutputError) : 0;
|
130
136
|
}));
|
131
137
|
}
|
132
|
-
exports.scheduleTarget = scheduleTarget;
|
133
138
|
function createNodeModulesEngineHost(resolvePaths, projects) {
|
134
139
|
const NodeModulesEngineHost = require('@angular-devkit/schematics/tools')
|
135
140
|
.NodeModulesEngineHost;
|
@@ -413,7 +418,6 @@ function arrayBufferToString(buffer) {
|
|
413
418
|
result += String.fromCharCode.apply(null, array.subarray(i * chunkSize));
|
414
419
|
return result;
|
415
420
|
}
|
416
|
-
exports.arrayBufferToString = arrayBufferToString;
|
417
421
|
/**
|
418
422
|
* Host used by Angular CLI schematics. It reads the project configurations from
|
419
423
|
* the project configuration files.
|
@@ -507,7 +511,6 @@ async function generate(root, opts, projects, verbose) {
|
|
507
511
|
const schematic = collection.createSchematic(opts.generatorName, true);
|
508
512
|
return (await runSchematic(fsHost, root, workflow, logger, { ...opts, generatorName: schematic.description.name }, schematic)).status;
|
509
513
|
}
|
510
|
-
exports.generate = generate;
|
511
514
|
function createPromptProvider() {
|
512
515
|
return (definitions) => {
|
513
516
|
const questions = definitions.map((definition) => {
|
@@ -578,7 +581,6 @@ async function runMigration(root, packageName, migrationName, projects, isVerbos
|
|
578
581
|
madeChanges: record.loggingQueue.length > 0,
|
579
582
|
};
|
580
583
|
}
|
581
|
-
exports.runMigration = runMigration;
|
582
584
|
function resolveMigrationsCollection(name) {
|
583
585
|
let collectionPath = undefined;
|
584
586
|
if (name.startsWith('.') || name.startsWith('/')) {
|
@@ -636,7 +638,6 @@ let mockedSchematics = null;
|
|
636
638
|
function mockSchematicsForTesting(schematics) {
|
637
639
|
mockedSchematics = schematics;
|
638
640
|
}
|
639
|
-
exports.mockSchematicsForTesting = mockSchematicsForTesting;
|
640
641
|
function wrapAngularDevkitSchematic(collectionName, generatorName) {
|
641
642
|
// This is idempotent, if it happens to get called
|
642
643
|
// multiple times its no big deal. It ensures that some
|
@@ -723,7 +724,6 @@ function wrapAngularDevkitSchematic(collectionName, generatorName) {
|
|
723
724
|
};
|
724
725
|
};
|
725
726
|
}
|
726
|
-
exports.wrapAngularDevkitSchematic = wrapAngularDevkitSchematic;
|
727
727
|
let logger;
|
728
728
|
const getLogger = (isVerbose = false) => {
|
729
729
|
if (!logger) {
|
@@ -1,6 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.Deferred = void 0;
|
4
|
+
exports.eachValueFrom = eachValueFrom;
|
5
|
+
exports.bufferedValuesFrom = bufferedValuesFrom;
|
6
|
+
exports.latestValueFrom = latestValueFrom;
|
7
|
+
exports.nextValueFrom = nextValueFrom;
|
4
8
|
class Deferred {
|
5
9
|
constructor() {
|
6
10
|
this.resolve = null;
|
@@ -100,7 +104,6 @@ async function* eachValueFrom(source) {
|
|
100
104
|
subs.unsubscribe();
|
101
105
|
}
|
102
106
|
}
|
103
|
-
exports.eachValueFrom = eachValueFrom;
|
104
107
|
/**
|
105
108
|
* Will subscribe to the `source` observable provided
|
106
109
|
* and build the emitted values up in a buffer. Allowing
|
@@ -192,7 +195,6 @@ async function* bufferedValuesFrom(source) {
|
|
192
195
|
subs.unsubscribe();
|
193
196
|
}
|
194
197
|
}
|
195
|
-
exports.bufferedValuesFrom = bufferedValuesFrom;
|
196
198
|
/**
|
197
199
|
* Will subscribe to the provided `source` observable,
|
198
200
|
* allowing `for await..of` loops to iterate and get the
|
@@ -282,7 +284,6 @@ async function* latestValueFrom(source) {
|
|
282
284
|
subs.unsubscribe();
|
283
285
|
}
|
284
286
|
}
|
285
|
-
exports.latestValueFrom = latestValueFrom;
|
286
287
|
/**
|
287
288
|
* Subscribes to the provided `source` observable and allows
|
288
289
|
* `for await..of` loops to iterate over it, such that
|
@@ -359,4 +360,3 @@ async function* nextValueFrom(source) {
|
|
359
360
|
subs.unsubscribe();
|
360
361
|
}
|
361
362
|
}
|
362
|
-
exports.nextValueFrom = nextValueFrom;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.coreNxPluginVersions =
|
3
|
+
exports.coreNxPluginVersions = void 0;
|
4
|
+
exports.addHandler = addHandler;
|
4
5
|
const child_process_1 = require("child_process");
|
5
6
|
const fs_1 = require("fs");
|
6
7
|
const ora = require("ora");
|
@@ -32,7 +33,6 @@ function addHandler(options) {
|
|
32
33
|
});
|
33
34
|
});
|
34
35
|
}
|
35
|
-
exports.addHandler = addHandler;
|
36
36
|
async function installPackage(pkgName, version, nxJson) {
|
37
37
|
const spinner = ora(`Installing ${pkgName}@${version}...`);
|
38
38
|
spinner.start();
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.affected = affected;
|
4
|
+
exports.getAffectedGraphNodes = getAffectedGraphNodes;
|
4
5
|
const file_utils_1 = require("../../project-graph/file-utils");
|
5
6
|
const run_command_1 = require("../../tasks-runner/run-command");
|
6
7
|
const output_1 = require("../../utils/output");
|
@@ -62,7 +63,6 @@ async function affected(command, args, extraTargetDependencies = {}, extraOption
|
|
62
63
|
process.exit(1);
|
63
64
|
}
|
64
65
|
}
|
65
|
-
exports.affected = affected;
|
66
66
|
async function getAffectedGraphNodes(nxArgs, projectGraph) {
|
67
67
|
let affectedGraph = nxArgs.all
|
68
68
|
? projectGraph
|
@@ -75,7 +75,6 @@ async function getAffectedGraphNodes(nxArgs, projectGraph) {
|
|
75
75
|
}
|
76
76
|
return Object.values(affectedGraph.nodes);
|
77
77
|
}
|
78
|
-
exports.getAffectedGraphNodes = getAffectedGraphNodes;
|
79
78
|
function allProjectsWithTarget(projects, nxArgs) {
|
80
79
|
return projects.filter((p) => nxArgs.targets.find((target) => (0, project_graph_utils_1.projectHasTarget)(p, target)));
|
81
80
|
}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.onlyDefaultRunnerIsUsed = onlyDefaultRunnerIsUsed;
|
4
|
+
exports.connectToNxCloudIfExplicitlyAsked = connectToNxCloudIfExplicitlyAsked;
|
5
|
+
exports.connectToNxCloudCommand = connectToNxCloudCommand;
|
6
|
+
exports.connectToNxCloudWithPrompt = connectToNxCloudWithPrompt;
|
7
|
+
exports.connectExistingRepoToNxCloudPrompt = connectExistingRepoToNxCloudPrompt;
|
4
8
|
const output_1 = require("../../utils/output");
|
5
9
|
const configuration_1 = require("../../config/configuration");
|
6
10
|
const tree_1 = require("../../generators/tree");
|
@@ -22,7 +26,6 @@ function onlyDefaultRunnerIsUsed(nxJson) {
|
|
22
26
|
}
|
23
27
|
return defaultRunner === 'nx/tasks-runners/default';
|
24
28
|
}
|
25
|
-
exports.onlyDefaultRunnerIsUsed = onlyDefaultRunnerIsUsed;
|
26
29
|
async function connectToNxCloudIfExplicitlyAsked(opts) {
|
27
30
|
if (opts['cloud'] === true) {
|
28
31
|
const nxJson = (0, configuration_1.readNxJson)();
|
@@ -40,7 +43,6 @@ async function connectToNxCloudIfExplicitlyAsked(opts) {
|
|
40
43
|
process.exit(0);
|
41
44
|
}
|
42
45
|
}
|
43
|
-
exports.connectToNxCloudIfExplicitlyAsked = connectToNxCloudIfExplicitlyAsked;
|
44
46
|
async function connectToNxCloudCommand(command) {
|
45
47
|
const nxJson = (0, configuration_1.readNxJson)();
|
46
48
|
if ((0, nx_cloud_utils_1.isNxCloudUsed)(nxJson)) {
|
@@ -69,7 +71,6 @@ async function connectToNxCloudCommand(command) {
|
|
69
71
|
await callback();
|
70
72
|
return true;
|
71
73
|
}
|
72
|
-
exports.connectToNxCloudCommand = connectToNxCloudCommand;
|
73
74
|
async function connectToNxCloudWithPrompt(command) {
|
74
75
|
const setNxCloud = await nxCloudPrompt('setupNxCloud');
|
75
76
|
const useCloud = setNxCloud === 'yes' ? await connectToNxCloudCommand(command) : false;
|
@@ -80,11 +81,9 @@ async function connectToNxCloudWithPrompt(command) {
|
|
80
81
|
meta: ab_testing_1.messages.codeOfSelectedPromptMessage('setupNxCloud'),
|
81
82
|
});
|
82
83
|
}
|
83
|
-
exports.connectToNxCloudWithPrompt = connectToNxCloudWithPrompt;
|
84
84
|
async function connectExistingRepoToNxCloudPrompt(key = 'setupNxCloud') {
|
85
85
|
return nxCloudPrompt(key).then((value) => value === 'yes');
|
86
86
|
}
|
87
|
-
exports.connectExistingRepoToNxCloudPrompt = connectExistingRepoToNxCloudPrompt;
|
88
87
|
async function nxCloudPrompt(key) {
|
89
88
|
const { message, choices, initial, footer, hint } = ab_testing_1.messages.getPrompt(key);
|
90
89
|
const promptConfig = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.viewLogs =
|
3
|
+
exports.viewLogs = viewLogs;
|
4
4
|
const package_manager_1 = require("../../utils/package-manager");
|
5
5
|
const child_process_1 = require("child_process");
|
6
6
|
const nx_cloud_utils_1 = require("../../utils/nx-cloud-utils");
|
@@ -50,4 +50,3 @@ async function viewLogs() {
|
|
50
50
|
}
|
51
51
|
return 0;
|
52
52
|
}
|
53
|
-
exports.viewLogs = viewLogs;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.daemonHandler =
|
3
|
+
exports.daemonHandler = daemonHandler;
|
4
4
|
const tmp_dir_1 = require("../../daemon/tmp-dir");
|
5
5
|
const output_1 = require("../../utils/output");
|
6
6
|
const generate_help_output_1 = require("../../daemon/client/generate-help-output");
|
@@ -24,4 +24,3 @@ async function daemonHandler(args) {
|
|
24
24
|
console.log((0, generate_help_output_1.generateDaemonHelpOutput)());
|
25
25
|
}
|
26
26
|
}
|
27
|
-
exports.daemonHandler = daemonHandler;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.nxExecCommand =
|
3
|
+
exports.nxExecCommand = nxExecCommand;
|
4
4
|
const child_process_1 = require("child_process");
|
5
5
|
const path_1 = require("path");
|
6
6
|
const process_1 = require("process");
|
@@ -44,7 +44,6 @@ async function nxExecCommand(args) {
|
|
44
44
|
return runScriptAsNxTarget(projectGraph, scriptArgV, nxArgs);
|
45
45
|
}
|
46
46
|
}
|
47
|
-
exports.nxExecCommand = nxExecCommand;
|
48
47
|
async function runScriptAsNxTarget(projectGraph, argv, nxArgs) {
|
49
48
|
// NPM, Yarn, and PNPM set this to the name of the currently executing script. Lets use it if we can.
|
50
49
|
const targetName = process.env.npm_lifecycle_event;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.format =
|
3
|
+
exports.format = format;
|
4
4
|
const node_child_process_1 = require("node:child_process");
|
5
5
|
const path = require("node:path");
|
6
6
|
const file_utils_1 = require("../../project-graph/file-utils");
|
@@ -60,7 +60,6 @@ async function format(command, args) {
|
|
60
60
|
}
|
61
61
|
}
|
62
62
|
}
|
63
|
-
exports.format = format;
|
64
63
|
async function getPatterns(args) {
|
65
64
|
const graph = await (0, project_graph_1.createProjectGraphAsync)({ exitOnError: true });
|
66
65
|
const allFilesPattern = ['.'];
|
@@ -1,6 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.printChanges = printChanges;
|
4
|
+
exports.parseGeneratorString = parseGeneratorString;
|
5
|
+
exports.printGenHelp = printGenHelp;
|
6
|
+
exports.generate = generate;
|
4
7
|
const chalk = require("chalk");
|
5
8
|
const enquirer_1 = require("enquirer");
|
6
9
|
const path_1 = require("path");
|
@@ -28,7 +31,6 @@ function printChanges(fileChanges) {
|
|
28
31
|
}
|
29
32
|
});
|
30
33
|
}
|
31
|
-
exports.printChanges = printChanges;
|
32
34
|
async function promptForCollection(generatorName, interactive, projectsConfiguration) {
|
33
35
|
const localPlugins = await (0, local_plugins_1.getLocalWorkspacePlugins)(projectsConfiguration, (0, configuration_1.readNxJson)());
|
34
36
|
const installedCollections = Array.from(new Set((0, installed_plugins_1.findInstalledPlugins)().map((x) => x.name)));
|
@@ -144,7 +146,6 @@ function parseGeneratorString(value) {
|
|
144
146
|
};
|
145
147
|
}
|
146
148
|
}
|
147
|
-
exports.parseGeneratorString = parseGeneratorString;
|
148
149
|
async function convertToGenerateOptions(generatorOptions, mode, projectsConfiguration) {
|
149
150
|
let collectionName = null;
|
150
151
|
let generatorName = null;
|
@@ -204,7 +205,6 @@ function printGenHelp(opts, schema, normalizedGeneratorName, aliases) {
|
|
204
205
|
aliases,
|
205
206
|
});
|
206
207
|
}
|
207
|
-
exports.printGenHelp = printGenHelp;
|
208
208
|
async function generate(cwd, args) {
|
209
209
|
if (args['verbose']) {
|
210
210
|
process.env.NX_VERBOSE_LOGGING = 'true';
|
@@ -263,4 +263,3 @@ async function generate(cwd, args) {
|
|
263
263
|
}
|
264
264
|
});
|
265
265
|
}
|
266
|
-
exports.generate = generate;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.getGeneratorInformation = getGeneratorInformation;
|
4
|
+
exports.readGeneratorsJson = readGeneratorsJson;
|
4
5
|
const path_1 = require("path");
|
5
6
|
const schema_utils_1 = require("../../config/schema-utils");
|
6
7
|
const fileutils_1 = require("../../utils/fileutils");
|
@@ -39,7 +40,6 @@ function getGeneratorInformation(collectionName, generatorName, root, projects)
|
|
39
40
|
throw new Error(`Unable to resolve ${collectionName}:${generatorName}.\n${e.message}`);
|
40
41
|
}
|
41
42
|
}
|
42
|
-
exports.getGeneratorInformation = getGeneratorInformation;
|
43
43
|
function readGeneratorsJson(collectionName, generator, root, projects) {
|
44
44
|
let generatorsFilePath;
|
45
45
|
if (collectionName.endsWith('.json')) {
|
@@ -74,7 +74,6 @@ function readGeneratorsJson(collectionName, generator, root, projects) {
|
|
74
74
|
resolvedCollectionName: collectionName,
|
75
75
|
};
|
76
76
|
}
|
77
|
-
exports.readGeneratorsJson = readGeneratorsJson;
|
78
77
|
function findFullGeneratorName(name, generators) {
|
79
78
|
if (generators) {
|
80
79
|
for (let [key, data] of Object.entries(generators)) {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.yargsGraphCommand = void 0;
|
4
|
+
exports.withGraphOptions = withGraphOptions;
|
4
5
|
const documentation_1 = require("../yargs-utils/documentation");
|
5
6
|
const shared_options_1 = require("../yargs-utils/shared-options");
|
6
7
|
exports.yargsGraphCommand = {
|
@@ -72,4 +73,3 @@ function withGraphOptions(yargs) {
|
|
72
73
|
default: true,
|
73
74
|
});
|
74
75
|
}
|
75
|
-
exports.withGraphOptions = withGraphOptions;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.generateGraph =
|
3
|
+
exports.generateGraph = generateGraph;
|
4
4
|
const crypto_1 = require("crypto");
|
5
5
|
const node_child_process_1 = require("node:child_process");
|
6
6
|
const fs_1 = require("fs");
|
@@ -318,10 +318,14 @@ async function generateGraph(args, affectedProjects) {
|
|
318
318
|
});
|
319
319
|
}
|
320
320
|
}
|
321
|
-
|
322
|
-
async function startServer(html, environmentJs, host, port = 4211, watchForchanges = true, affected = [], focus = null, groupByFolder = false, exclude = []) {
|
321
|
+
async function startServer(html, environmentJs, host, port = 4211, watchForChanges = true, affected = [], focus = null, groupByFolder = false, exclude = []) {
|
323
322
|
let unregisterFileWatcher;
|
324
|
-
if (
|
323
|
+
if (watchForChanges && !client_1.daemonClient.enabled()) {
|
324
|
+
output_1.output.warn({
|
325
|
+
title: 'Nx Daemon is not enabled. Graph will not refresh on file changes.',
|
326
|
+
});
|
327
|
+
}
|
328
|
+
if (watchForChanges && client_1.daemonClient.enabled()) {
|
325
329
|
unregisterFileWatcher = await createFileWatcher();
|
326
330
|
}
|
327
331
|
const { projectGraphClientResponse, sourceMapResponse } = await createProjectGraphAndSourceMapClientResponse(affected);
|
@@ -774,6 +778,6 @@ function getHelpTextFromTarget(projectName, targetName) {
|
|
774
778
|
if (!command)
|
775
779
|
throw new Error(`No help command found for ${projectName}:${targetName}`);
|
776
780
|
return (0, node_child_process_1.execSync)(command, {
|
777
|
-
cwd:
|
781
|
+
cwd: target.options?.cwd ?? workspace_root_1.workspaceRoot,
|
778
782
|
}).toString();
|
779
783
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addNxToMonorepo =
|
3
|
+
exports.addNxToMonorepo = addNxToMonorepo;
|
4
4
|
const enquirer_1 = require("enquirer");
|
5
5
|
const fs_1 = require("fs");
|
6
6
|
const ignore_1 = require("ignore");
|
@@ -77,7 +77,6 @@ async function addNxToMonorepo(options) {
|
|
77
77
|
(0, utils_1.initCloud)(repoRoot, 'nx-init-monorepo');
|
78
78
|
}
|
79
79
|
}
|
80
|
-
exports.addNxToMonorepo = addNxToMonorepo;
|
81
80
|
// scanning package.json files
|
82
81
|
function allProjectPackageJsonFiles(repoRoot) {
|
83
82
|
const packageJsonFiles = allPackageJsonFiles(repoRoot, repoRoot);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addNxToNest =
|
3
|
+
exports.addNxToNest = addNxToNest;
|
4
4
|
const enquirer = require("enquirer");
|
5
5
|
const fs_extra_1 = require("fs-extra");
|
6
6
|
const path_1 = require("path");
|
@@ -96,7 +96,6 @@ async function addNxToNest(options, packageJson) {
|
|
96
96
|
(0, utils_1.initCloud)(repoRoot, 'nx-init-nest');
|
97
97
|
}
|
98
98
|
}
|
99
|
-
exports.addNxToNest = addNxToNest;
|
100
99
|
function addNestPluginToPackageJson(repoRoot) {
|
101
100
|
const path = (0, path_1.join)(repoRoot, `package.json`);
|
102
101
|
const json = (0, fileutils_1.readJsonFile)(path);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addNxToNpmRepo =
|
3
|
+
exports.addNxToNpmRepo = addNxToNpmRepo;
|
4
4
|
const enquirer = require("enquirer");
|
5
5
|
const path_1 = require("path");
|
6
6
|
const fileutils_1 = require("../../../utils/fileutils");
|
@@ -70,4 +70,3 @@ async function addNxToNpmRepo(options) {
|
|
70
70
|
(0, utils_1.initCloud)(repoRoot, 'nx-init-npm-repo');
|
71
71
|
}
|
72
72
|
}
|
73
|
-
exports.addNxToNpmRepo = addNxToNpmRepo;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addNxToAngularCliRepo =
|
3
|
+
exports.addNxToAngularCliRepo = addNxToAngularCliRepo;
|
4
4
|
const enquirer_1 = require("enquirer");
|
5
5
|
const path_1 = require("path");
|
6
6
|
const fileutils_1 = require("../../../../utils/fileutils");
|
@@ -47,7 +47,6 @@ async function addNxToAngularCliRepo(options) {
|
|
47
47
|
(0, utils_1.initCloud)(repoRoot, 'nx-init-angular');
|
48
48
|
}
|
49
49
|
}
|
50
|
-
exports.addNxToAngularCliRepo = addNxToAngularCliRepo;
|
51
50
|
async function collectCacheableOperations(options) {
|
52
51
|
let cacheableOperations;
|
53
52
|
workspaceTargets = getWorkspaceTargets();
|
@@ -1,10 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.setupIntegratedWorkspace =
|
3
|
+
exports.setupIntegratedWorkspace = setupIntegratedWorkspace;
|
4
4
|
const child_process_1 = require("child_process");
|
5
5
|
const package_manager_1 = require("../../../../utils/package-manager");
|
6
6
|
function setupIntegratedWorkspace() {
|
7
7
|
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
8
8
|
(0, child_process_1.execSync)(`${pmc.exec} nx g @nx/angular:ng-add`, { stdio: [0, 1, 2] });
|
9
9
|
}
|
10
|
-
exports.setupIntegratedWorkspace = setupIntegratedWorkspace;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getLegacyMigrationFunctionIfApplicable =
|
3
|
+
exports.getLegacyMigrationFunctionIfApplicable = getLegacyMigrationFunctionIfApplicable;
|
4
4
|
const child_process_1 = require("child_process");
|
5
5
|
const path_1 = require("path");
|
6
6
|
const semver_1 = require("semver");
|
@@ -89,7 +89,6 @@ async function getLegacyMigrationFunctionIfApplicable(repoRoot, options) {
|
|
89
89
|
}
|
90
90
|
};
|
91
91
|
}
|
92
|
-
exports.getLegacyMigrationFunctionIfApplicable = getLegacyMigrationFunctionIfApplicable;
|
93
92
|
async function installDependencies(repoRoot, pkgInfo, pmc) {
|
94
93
|
const json = (0, fileutils_1.readJsonFile)((0, path_1.join)(repoRoot, 'package.json'));
|
95
94
|
json.devDependencies ??= {};
|