nx 22.5.1 → 22.6.0-beta.0
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/LICENSE +1 -1
- package/package.json +13 -13
- package/schemas/nx-schema.json +5 -0
- package/schemas/project-schema.json +5 -0
- package/src/ai/constants.d.ts +1 -1
- package/src/ai/constants.d.ts.map +1 -1
- package/src/ai/constants.js +5 -3
- package/src/ai/detect-ai-agent.d.ts +3 -0
- package/src/ai/detect-ai-agent.d.ts.map +1 -0
- package/src/ai/detect-ai-agent.js +12 -0
- package/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts.map +1 -1
- package/src/ai/set-up-ai-agents/set-up-ai-agents.js +23 -33
- package/src/ai/utils.d.ts.map +1 -1
- package/src/ai/utils.js +10 -9
- package/src/command-line/configure-ai-agents/configure-ai-agents.d.ts.map +1 -1
- package/src/command-line/configure-ai-agents/configure-ai-agents.js +56 -8
- package/src/command-line/init/ai-agent-prompts.d.ts.map +1 -1
- package/src/command-line/init/ai-agent-prompts.js +6 -1
- package/src/command-line/init/command-object.d.ts.map +1 -1
- package/src/command-line/init/command-object.js +34 -4
- package/src/command-line/init/init-v2.d.ts +2 -0
- package/src/command-line/init/init-v2.d.ts.map +1 -1
- package/src/command-line/init/init-v2.js +186 -19
- package/src/command-line/init/utils/ai-output.d.ts +112 -0
- package/src/command-line/init/utils/ai-output.d.ts.map +1 -0
- package/src/command-line/init/utils/ai-output.js +254 -0
- package/src/command-line/release/command-object.d.ts +1 -0
- package/src/command-line/release/command-object.d.ts.map +1 -1
- package/src/command-line/release/command-object.js +4 -0
- package/src/command-line/release/index.d.ts +1 -1
- package/src/command-line/release/index.d.ts.map +1 -1
- package/src/command-line/release/publish.d.ts.map +1 -1
- package/src/command-line/release/publish.js +56 -0
- package/src/command-line/release/release.d.ts +1 -1
- package/src/command-line/release/release.d.ts.map +1 -1
- package/src/command-line/yargs-utils/shared-options.d.ts +3 -0
- package/src/command-line/yargs-utils/shared-options.d.ts.map +1 -1
- package/src/command-line/yargs-utils/shared-options.js +30 -1
- package/src/config/workspace-json-project-json.d.ts +3 -0
- package/src/config/workspace-json-project-json.d.ts.map +1 -1
- package/src/core/graph/main.js +1 -1
- package/src/daemon/client/client.d.ts +5 -0
- package/src/daemon/client/client.d.ts.map +1 -1
- package/src/daemon/client/client.js +13 -0
- package/src/daemon/message-types/configure-ai-agents.d.ts +21 -0
- package/src/daemon/message-types/configure-ai-agents.d.ts.map +1 -0
- package/src/daemon/message-types/configure-ai-agents.js +19 -0
- package/src/daemon/server/handle-configure-ai-agents.d.ts +4 -0
- package/src/daemon/server/handle-configure-ai-agents.d.ts.map +1 -0
- package/src/daemon/server/handle-configure-ai-agents.js +94 -0
- package/src/daemon/server/latest-nx.d.ts +11 -0
- package/src/daemon/server/latest-nx.d.ts.map +1 -0
- package/src/daemon/server/latest-nx.js +49 -0
- package/src/daemon/server/nx-console-operations.d.ts +0 -4
- package/src/daemon/server/nx-console-operations.d.ts.map +1 -1
- package/src/daemon/server/nx-console-operations.js +9 -48
- package/src/daemon/server/server.d.ts.map +1 -1
- package/src/daemon/server/server.js +12 -0
- package/src/daemon/server/shutdown-utils.js +3 -3
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts +5 -0
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts.map +1 -1
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +12 -0
- package/src/hasher/task-hasher.d.ts +22 -0
- package/src/hasher/task-hasher.d.ts.map +1 -1
- package/src/hasher/task-hasher.js +35 -10
- package/src/native/index.d.ts +13 -5
- package/src/native/native-bindings.js +1 -0
- package/src/native/nx.wasi.cjs +13 -11
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/js/utils/register.d.ts.map +1 -1
- package/src/plugins/js/utils/register.js +14 -0
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts.map +1 -1
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +1 -0
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts.map +1 -1
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +1 -0
- package/src/tasks-runner/run-command.d.ts.map +1 -1
- package/src/tasks-runner/run-command.js +18 -1
- package/src/utils/nx-console-prompt.js +2 -2
- package/src/utils/output.d.ts +1 -0
- package/src/utils/output.d.ts.map +1 -1
- package/src/utils/output.js +10 -1
package/LICENSE
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.6.0-beta.0",
|
|
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": {
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"yargs-parser": "21.1.1"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@swc-node/register": "1.11.1",
|
|
76
|
-
"@swc/core": "1.15.8"
|
|
75
|
+
"@swc-node/register": "^1.11.1",
|
|
76
|
+
"@swc/core": "^1.15.8"
|
|
77
77
|
},
|
|
78
78
|
"peerDependenciesMeta": {
|
|
79
79
|
"@swc-node/register": {
|
|
@@ -84,16 +84,16 @@
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
"optionalDependencies": {
|
|
87
|
-
"@nx/nx-darwin-arm64": "22.
|
|
88
|
-
"@nx/nx-darwin-x64": "22.
|
|
89
|
-
"@nx/nx-freebsd-x64": "22.
|
|
90
|
-
"@nx/nx-linux-arm-gnueabihf": "22.
|
|
91
|
-
"@nx/nx-linux-arm64-gnu": "22.
|
|
92
|
-
"@nx/nx-linux-arm64-musl": "22.
|
|
93
|
-
"@nx/nx-linux-x64-gnu": "22.
|
|
94
|
-
"@nx/nx-linux-x64-musl": "22.
|
|
95
|
-
"@nx/nx-win32-arm64-msvc": "22.
|
|
96
|
-
"@nx/nx-win32-x64-msvc": "22.
|
|
87
|
+
"@nx/nx-darwin-arm64": "22.6.0-beta.0",
|
|
88
|
+
"@nx/nx-darwin-x64": "22.6.0-beta.0",
|
|
89
|
+
"@nx/nx-freebsd-x64": "22.6.0-beta.0",
|
|
90
|
+
"@nx/nx-linux-arm-gnueabihf": "22.6.0-beta.0",
|
|
91
|
+
"@nx/nx-linux-arm64-gnu": "22.6.0-beta.0",
|
|
92
|
+
"@nx/nx-linux-arm64-musl": "22.6.0-beta.0",
|
|
93
|
+
"@nx/nx-linux-x64-gnu": "22.6.0-beta.0",
|
|
94
|
+
"@nx/nx-linux-x64-musl": "22.6.0-beta.0",
|
|
95
|
+
"@nx/nx-win32-arm64-msvc": "22.6.0-beta.0",
|
|
96
|
+
"@nx/nx-win32-x64-msvc": "22.6.0-beta.0"
|
|
97
97
|
},
|
|
98
98
|
"nx-migrations": {
|
|
99
99
|
"migrations": "./migrations.json",
|
package/schemas/nx-schema.json
CHANGED
|
@@ -560,8 +560,13 @@
|
|
|
560
560
|
"fileset": {
|
|
561
561
|
"type": "string",
|
|
562
562
|
"description": "A glob"
|
|
563
|
+
},
|
|
564
|
+
"dependencies": {
|
|
565
|
+
"type": "boolean",
|
|
566
|
+
"description": "Include files matching the fileset for all the project dependencies of this target."
|
|
563
567
|
}
|
|
564
568
|
},
|
|
569
|
+
"required": ["fileset"],
|
|
565
570
|
"additionalProperties": false
|
|
566
571
|
},
|
|
567
572
|
{
|
|
@@ -216,8 +216,13 @@
|
|
|
216
216
|
"fileset": {
|
|
217
217
|
"type": "string",
|
|
218
218
|
"description": "A glob used to determine a fileset."
|
|
219
|
+
},
|
|
220
|
+
"dependencies": {
|
|
221
|
+
"type": "boolean",
|
|
222
|
+
"description": "Include files matching the fileset for all the project dependencies of this target."
|
|
219
223
|
}
|
|
220
224
|
},
|
|
225
|
+
"required": ["fileset"],
|
|
221
226
|
"additionalProperties": false
|
|
222
227
|
},
|
|
223
228
|
{
|
package/src/ai/constants.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare function geminiSettingsPath(root: string): string;
|
|
|
7
7
|
export declare function claudeMdPath(root: string): string;
|
|
8
8
|
export declare function claudeMcpJsonPath(root: string): string;
|
|
9
9
|
export declare function opencodeMcpPath(root: string): string;
|
|
10
|
-
export declare
|
|
10
|
+
export declare function codexConfigTomlPath(root: string): string;
|
|
11
11
|
export declare const nxRulesMarkerCommentStart = "<!-- nx configuration start-->";
|
|
12
12
|
export declare const nxRulesMarkerCommentDescription = "<!-- Leave the start & end comments to automatically receive updates. -->";
|
|
13
13
|
export declare const nxRulesMarkerCommentEnd = "<!-- nx configuration end-->";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/ai/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/ai/constants.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,iBAAiB,EAClB,MAAM,oCAAoC,CAAC;AAE5C,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAElC,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,CAOjE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,eAAO,MAAM,yBAAyB,mCAAmC,CAAC;AAC1E,eAAO,MAAM,+BAA+B,8EAA8E,CAAC;AAC3H,eAAO,MAAM,uBAAuB,iCAAiC,CAAC;AACtE,eAAO,MAAM,UAAU,QAGtB,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,oBAAoB,GAAI,SAAS,wBAAwB,WAIrE,CAAC;AAEF,eAAO,MAAM,eAAe,6BAA2B,CAAC;AAExD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAQ5D"}
|
package/src/ai/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nxMcpTomlHeader = exports.getAgentRulesWrapped = exports.rulesRegex = exports.nxRulesMarkerCommentEnd = exports.nxRulesMarkerCommentDescription = exports.nxRulesMarkerCommentStart =
|
|
3
|
+
exports.nxMcpTomlHeader = exports.getAgentRulesWrapped = exports.rulesRegex = exports.nxRulesMarkerCommentEnd = exports.nxRulesMarkerCommentDescription = exports.nxRulesMarkerCommentStart = void 0;
|
|
4
4
|
exports.agentsMdPath = agentsMdPath;
|
|
5
5
|
exports.geminiMdPath = geminiMdPath;
|
|
6
6
|
exports.parseGeminiSettings = parseGeminiSettings;
|
|
@@ -8,8 +8,8 @@ exports.geminiSettingsPath = geminiSettingsPath;
|
|
|
8
8
|
exports.claudeMdPath = claudeMdPath;
|
|
9
9
|
exports.claudeMcpJsonPath = claudeMcpJsonPath;
|
|
10
10
|
exports.opencodeMcpPath = opencodeMcpPath;
|
|
11
|
+
exports.codexConfigTomlPath = codexConfigTomlPath;
|
|
11
12
|
exports.getNxMcpTomlConfig = getNxMcpTomlConfig;
|
|
12
|
-
const os_1 = require("os");
|
|
13
13
|
const path_1 = require("path");
|
|
14
14
|
const semver_1 = require("semver");
|
|
15
15
|
const fileutils_1 = require("../utils/fileutils");
|
|
@@ -41,7 +41,9 @@ function claudeMcpJsonPath(root) {
|
|
|
41
41
|
function opencodeMcpPath(root) {
|
|
42
42
|
return (0, path_1.join)(root, 'opencode.json');
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
function codexConfigTomlPath(root) {
|
|
45
|
+
return (0, path_1.join)(root, '.codex', 'config.toml');
|
|
46
|
+
}
|
|
45
47
|
exports.nxRulesMarkerCommentStart = `<!-- nx configuration start-->`;
|
|
46
48
|
exports.nxRulesMarkerCommentDescription = `<!-- Leave the start & end comments to automatically receive updates. -->`;
|
|
47
49
|
exports.nxRulesMarkerCommentEnd = `<!-- nx configuration end-->`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-ai-agent.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/ai/detect-ai-agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAmB,MAAM,SAAS,CAAC;AAEjD,wBAAgB,aAAa,IAAI,KAAK,GAAG,IAAI,CAM5C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.detectAiAgent = detectAiAgent;
|
|
4
|
+
const native_1 = require("../native");
|
|
5
|
+
const utils_1 = require("./utils");
|
|
6
|
+
function detectAiAgent() {
|
|
7
|
+
const detected = (0, native_1.detectAiAgent)();
|
|
8
|
+
if (detected && utils_1.supportedAgents.includes(detected)) {
|
|
9
|
+
return detected;
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-up-ai-agents.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/ai/set-up-ai-agents/set-up-ai-agents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"set-up-ai-agents.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/ai/set-up-ai-agents/set-up-ai-agents.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAS7C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAwB5B,OAAO,EACL,sCAAsC,EACtC,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,MAAM,EAAE,qBAAqB,EAAE,CAAC;CACjC,CAAC;AAmCF,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,4BAA4B,EACrC,KAAK,UAAQ,GACZ,OAAO,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAmC5D;AAaD,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sCAAsC,GAC9C,OAAO,CAAC,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAgO7C;AAqJD,eAAe,sBAAsB,CAAC"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.setupAiAgentsGenerator = setupAiAgentsGenerator;
|
|
4
4
|
exports.setupAiAgentsGeneratorImpl = setupAiAgentsGeneratorImpl;
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
|
-
const os_1 = require("os");
|
|
7
6
|
const path_1 = require("path");
|
|
8
7
|
const semver_1 = require("semver");
|
|
9
8
|
const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
|
|
@@ -138,6 +137,19 @@ async function setupAiAgentsGeneratorImpl(tree, options) {
|
|
|
138
137
|
}
|
|
139
138
|
(0, json_1.updateJson)(tree, opencodeMcpJsonPath, (json) => opencodeMcpConfigUpdater(json, nxVersion));
|
|
140
139
|
}
|
|
140
|
+
if (hasAgent('codex')) {
|
|
141
|
+
const codexTomlPath = (0, path_1.join)(options.directory, '.codex', 'config.toml');
|
|
142
|
+
const tomlConfig = (0, constants_2.getNxMcpTomlConfig)(nxVersion);
|
|
143
|
+
if (!tree.exists(codexTomlPath)) {
|
|
144
|
+
tree.write(codexTomlPath, tomlConfig);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
const existing = tree.read(codexTomlPath, 'utf-8');
|
|
148
|
+
if (!existing.includes(constants_2.nxMcpTomlHeader)) {
|
|
149
|
+
tree.write(codexTomlPath, existing + '\n' + tomlConfig);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
141
153
|
if (hasAgent('gemini')) {
|
|
142
154
|
const geminiSettingsPath = (0, path_1.join)(options.directory, '.gemini', 'settings.json');
|
|
143
155
|
if (!tree.exists(geminiSettingsPath)) {
|
|
@@ -169,7 +181,7 @@ async function setupAiAgentsGeneratorImpl(tree, options) {
|
|
|
169
181
|
{ agent: 'opencode', src: 'generated/.opencode', dest: '.opencode' },
|
|
170
182
|
{ agent: 'copilot', src: 'generated/.github', dest: '.github' },
|
|
171
183
|
{ agent: 'cursor', src: 'generated/.cursor', dest: '.cursor' },
|
|
172
|
-
{ agent: 'codex', src: 'generated/.
|
|
184
|
+
{ agent: 'codex', src: 'generated/.agents', dest: '.agents' },
|
|
173
185
|
{ agent: 'gemini', src: 'generated/.gemini', dest: '.gemini' },
|
|
174
186
|
];
|
|
175
187
|
for (const { agent, src, dest } of agentDirs) {
|
|
@@ -186,34 +198,12 @@ async function setupAiAgentsGeneratorImpl(tree, options) {
|
|
|
186
198
|
return async (check = false) => {
|
|
187
199
|
const messages = [];
|
|
188
200
|
const errors = [];
|
|
189
|
-
if (hasAgent('codex')) {
|
|
190
|
-
if ((0, fs_1.existsSync)(constants_1.codexConfigTomlPath)) {
|
|
191
|
-
const tomlContents = (0, fs_1.readFileSync)(constants_1.codexConfigTomlPath, 'utf-8');
|
|
192
|
-
if (!tomlContents.includes(constants_2.nxMcpTomlHeader)) {
|
|
193
|
-
if (!check) {
|
|
194
|
-
(0, fs_1.appendFileSync)(constants_1.codexConfigTomlPath, `\n${(0, constants_2.getNxMcpTomlConfig)(nxVersion)}`);
|
|
195
|
-
}
|
|
196
|
-
messages.push({
|
|
197
|
-
title: `Updated ${constants_1.codexConfigTomlPath} with nx-mcp server`,
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
if (!check) {
|
|
203
|
-
(0, fs_1.mkdirSync)((0, path_1.join)((0, os_1.homedir)(), '.codex'), { recursive: true });
|
|
204
|
-
(0, fs_1.writeFileSync)(constants_1.codexConfigTomlPath, (0, constants_2.getNxMcpTomlConfig)(nxVersion));
|
|
205
|
-
}
|
|
206
|
-
messages.push({
|
|
207
|
-
title: `Created ${constants_1.codexConfigTomlPath} with nx-mcp server`,
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
201
|
if (hasAgent('copilot')) {
|
|
212
202
|
try {
|
|
213
|
-
if ((0, native_1.isEditorInstalled)(0 /* SupportedEditor.VSCode */) &&
|
|
214
|
-
(0, native_1.canInstallNxConsoleForEditor)(0 /* SupportedEditor.VSCode */)) {
|
|
203
|
+
if ((await (0, native_1.isEditorInstalled)(0 /* SupportedEditor.VSCode */)) &&
|
|
204
|
+
(await (0, native_1.canInstallNxConsoleForEditor)(0 /* SupportedEditor.VSCode */))) {
|
|
215
205
|
if (!check) {
|
|
216
|
-
(0, native_1.installNxConsoleForEditor)(0 /* SupportedEditor.VSCode */);
|
|
206
|
+
await (0, native_1.installNxConsoleForEditor)(0 /* SupportedEditor.VSCode */);
|
|
217
207
|
}
|
|
218
208
|
messages.push({
|
|
219
209
|
title: `Installed Nx Console for VSCode`,
|
|
@@ -227,10 +217,10 @@ async function setupAiAgentsGeneratorImpl(tree, options) {
|
|
|
227
217
|
});
|
|
228
218
|
}
|
|
229
219
|
try {
|
|
230
|
-
if ((0, native_1.isEditorInstalled)(1 /* SupportedEditor.VSCodeInsiders */) &&
|
|
231
|
-
(0, native_1.canInstallNxConsoleForEditor)(1 /* SupportedEditor.VSCodeInsiders */)) {
|
|
220
|
+
if ((await (0, native_1.isEditorInstalled)(1 /* SupportedEditor.VSCodeInsiders */)) &&
|
|
221
|
+
(await (0, native_1.canInstallNxConsoleForEditor)(1 /* SupportedEditor.VSCodeInsiders */))) {
|
|
232
222
|
if (!check) {
|
|
233
|
-
(0, native_1.installNxConsoleForEditor)(1 /* SupportedEditor.VSCodeInsiders */);
|
|
223
|
+
await (0, native_1.installNxConsoleForEditor)(1 /* SupportedEditor.VSCodeInsiders */);
|
|
234
224
|
}
|
|
235
225
|
messages.push({
|
|
236
226
|
title: `Installed Nx Console for VSCode Insiders`,
|
|
@@ -246,10 +236,10 @@ async function setupAiAgentsGeneratorImpl(tree, options) {
|
|
|
246
236
|
}
|
|
247
237
|
if (hasAgent('cursor')) {
|
|
248
238
|
try {
|
|
249
|
-
if ((0, native_1.isEditorInstalled)(2 /* SupportedEditor.Cursor */) &&
|
|
250
|
-
(0, native_1.canInstallNxConsoleForEditor)(2 /* SupportedEditor.Cursor */)) {
|
|
239
|
+
if ((await (0, native_1.isEditorInstalled)(2 /* SupportedEditor.Cursor */)) &&
|
|
240
|
+
(await (0, native_1.canInstallNxConsoleForEditor)(2 /* SupportedEditor.Cursor */))) {
|
|
251
241
|
if (!check) {
|
|
252
|
-
(0, native_1.installNxConsoleForEditor)(2 /* SupportedEditor.Cursor */);
|
|
242
|
+
await (0, native_1.installNxConsoleForEditor)(2 /* SupportedEditor.Cursor */);
|
|
253
243
|
}
|
|
254
244
|
messages.push({
|
|
255
245
|
title: `Installed Nx Console for Cursor`,
|
package/src/ai/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/ai/utils.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,eAAe,yEAOlB,CAAC;AACX,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AACrD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOjD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAsB,sBAAsB,CAC1C,gBAAgB,EAAE,KAAK,EAAE,EACzB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC;IACT,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;IAC1C,yBAAyB,EAAE,kBAAkB,EAAE,CAAC;IAChD,qBAAqB,EAAE,kBAAkB,EAAE,CAAC;IAC5C,cAAc,EAAE,kBAAkB,EAAE,CAAC;CACtC,CAAC,CA2BD;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/ai/utils.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,eAAe,yEAOlB,CAAC;AACX,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AACrD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAOjD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAsB,sBAAsB,CAC1C,gBAAgB,EAAE,KAAK,EAAE,EACzB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC;IACT,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;IAC1C,yBAAyB,EAAE,kBAAkB,EAAE,CAAC;IAChD,qBAAqB,EAAE,kBAAkB,EAAE,CAAC;IAC5C,cAAc,EAAE,kBAAkB,EAAE,CAAC;CACtC,CAAC,CA2BD;AAyLD,wBAAsB,eAAe,CACnC,MAAM,EAAE,KAAK,EAAE,EACf,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,IAAI,CAAC,CAoBf"}
|
package/src/ai/utils.js
CHANGED
|
@@ -108,12 +108,12 @@ async function getAgentConfiguration(agent, workspaceRoot) {
|
|
|
108
108
|
}
|
|
109
109
|
case 'copilot': {
|
|
110
110
|
const rulesPath = (0, constants_1.agentsMdPath)(workspaceRoot);
|
|
111
|
-
const hasInstalledVSCode = (0, native_1.isEditorInstalled)(0 /* SupportedEditor.VSCode */);
|
|
112
|
-
const hasInstalledVSCodeInsiders = (0, native_1.isEditorInstalled)(1 /* SupportedEditor.VSCodeInsiders */);
|
|
111
|
+
const hasInstalledVSCode = await (0, native_1.isEditorInstalled)(0 /* SupportedEditor.VSCode */);
|
|
112
|
+
const hasInstalledVSCodeInsiders = await (0, native_1.isEditorInstalled)(1 /* SupportedEditor.VSCodeInsiders */);
|
|
113
113
|
const hasInstalledNxConsoleForVSCode = hasInstalledVSCode &&
|
|
114
|
-
!(0, native_1.canInstallNxConsoleForEditor)(0 /* SupportedEditor.VSCode */);
|
|
114
|
+
!(await (0, native_1.canInstallNxConsoleForEditor)(0 /* SupportedEditor.VSCode */));
|
|
115
115
|
const hasInstalledNxConsoleForVSCodeInsiders = hasInstalledVSCodeInsiders &&
|
|
116
|
-
!(0, native_1.canInstallNxConsoleForEditor)(1 /* SupportedEditor.VSCodeInsiders */);
|
|
116
|
+
!(await (0, native_1.canInstallNxConsoleForEditor)(1 /* SupportedEditor.VSCodeInsiders */));
|
|
117
117
|
const agentsMdExists = (0, fs_1.existsSync)(rulesPath);
|
|
118
118
|
agentConfiguration = {
|
|
119
119
|
mcp: hasInstalledNxConsoleForVSCode ||
|
|
@@ -127,8 +127,8 @@ async function getAgentConfiguration(agent, workspaceRoot) {
|
|
|
127
127
|
}
|
|
128
128
|
case 'cursor': {
|
|
129
129
|
const rulesPath = (0, constants_1.agentsMdPath)(workspaceRoot);
|
|
130
|
-
const hasInstalledCursor = (0, native_1.isEditorInstalled)(2 /* SupportedEditor.Cursor */);
|
|
131
|
-
const hasInstalledNxConsole = !(0, native_1.canInstallNxConsoleForEditor)(2 /* SupportedEditor.Cursor */);
|
|
130
|
+
const hasInstalledCursor = await (0, native_1.isEditorInstalled)(2 /* SupportedEditor.Cursor */);
|
|
131
|
+
const hasInstalledNxConsole = !(await (0, native_1.canInstallNxConsoleForEditor)(2 /* SupportedEditor.Cursor */));
|
|
132
132
|
const agentsMdExists = (0, fs_1.existsSync)(rulesPath);
|
|
133
133
|
agentConfiguration = {
|
|
134
134
|
mcp: hasInstalledCursor ? hasInstalledNxConsole : false,
|
|
@@ -142,9 +142,10 @@ async function getAgentConfiguration(agent, workspaceRoot) {
|
|
|
142
142
|
case 'codex': {
|
|
143
143
|
const rulesPath = (0, constants_1.agentsMdPath)(workspaceRoot);
|
|
144
144
|
const agentsMdExists = (0, fs_1.existsSync)(rulesPath);
|
|
145
|
+
const mcpPath = (0, constants_1.codexConfigTomlPath)(workspaceRoot);
|
|
145
146
|
let mcpConfigured;
|
|
146
|
-
if ((0, fs_1.existsSync)(
|
|
147
|
-
const tomlContents = (0, fs_1.readFileSync)(
|
|
147
|
+
if ((0, fs_1.existsSync)(mcpPath)) {
|
|
148
|
+
const tomlContents = (0, fs_1.readFileSync)(mcpPath, 'utf-8');
|
|
148
149
|
mcpConfigured = tomlContents.includes(constants_1.nxMcpTomlHeader);
|
|
149
150
|
}
|
|
150
151
|
else {
|
|
@@ -154,7 +155,7 @@ async function getAgentConfiguration(agent, workspaceRoot) {
|
|
|
154
155
|
mcp: mcpConfigured,
|
|
155
156
|
rules: agentsMdExists,
|
|
156
157
|
rulesPath,
|
|
157
|
-
mcpPath
|
|
158
|
+
mcpPath,
|
|
158
159
|
};
|
|
159
160
|
break;
|
|
160
161
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure-ai-agents.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/configure-ai-agents/configure-ai-agents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"configure-ai-agents.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/configure-ai-agents/configure-ai-agents.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,wBAAwB,EAC9B,KAAK,UAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CAsDf;AAED,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC,CAyOf"}
|
|
@@ -8,17 +8,35 @@ const node_path_1 = require("node:path");
|
|
|
8
8
|
const pc = require("picocolors");
|
|
9
9
|
const constants_1 = require("../../ai/constants");
|
|
10
10
|
const utils_1 = require("../../ai/utils");
|
|
11
|
+
const client_1 = require("../../daemon/client/client");
|
|
11
12
|
const devkit_internals_1 = require("../../devkit-internals");
|
|
12
13
|
const output_1 = require("../../utils/output");
|
|
14
|
+
const package_manager_1 = require("../../utils/package-manager");
|
|
13
15
|
const provenance_1 = require("../../utils/provenance");
|
|
16
|
+
const versions_1 = require("../../utils/versions");
|
|
14
17
|
const workspace_root_1 = require("../../utils/workspace-root");
|
|
15
18
|
const ora = require("ora");
|
|
16
19
|
async function configureAiAgentsHandler(args, inner = false) {
|
|
20
|
+
// When called as inner from the tmp install, just run the impl directly
|
|
21
|
+
if (inner) {
|
|
22
|
+
return await configureAiAgentsHandlerImpl(args);
|
|
23
|
+
}
|
|
17
24
|
// Use environment variable to force local execution
|
|
18
25
|
if (process.env.NX_USE_LOCAL === 'true' ||
|
|
19
|
-
process.env.NX_AI_FILES_USE_LOCAL === 'true'
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
process.env.NX_AI_FILES_USE_LOCAL === 'true') {
|
|
27
|
+
await configureAiAgentsHandlerImpl(args);
|
|
28
|
+
await resetDaemonAgentStatus();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// Skip downloading latest if the current version is already the latest
|
|
32
|
+
try {
|
|
33
|
+
const latestVersion = await (0, package_manager_1.resolvePackageVersionUsingRegistry)('nx', 'latest');
|
|
34
|
+
if (latestVersion === versions_1.nxVersion) {
|
|
35
|
+
return await configureAiAgentsHandlerImpl(args);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
// If we can't check, proceed with download
|
|
22
40
|
}
|
|
23
41
|
let cleanup;
|
|
24
42
|
try {
|
|
@@ -27,19 +45,31 @@ async function configureAiAgentsHandler(args, inner = false) {
|
|
|
27
45
|
cleanup = packageInstallResults.cleanup;
|
|
28
46
|
let modulePath = require.resolve('nx/src/command-line/configure-ai-agents/configure-ai-agents.js', { paths: [packageInstallResults.tempDir] });
|
|
29
47
|
const module = await Promise.resolve(`${modulePath}`).then(s => require(s));
|
|
30
|
-
|
|
48
|
+
await module.configureAiAgentsHandler(args, true);
|
|
31
49
|
cleanup();
|
|
32
|
-
return configureAiAgentsResult;
|
|
33
50
|
}
|
|
34
51
|
catch (error) {
|
|
35
52
|
if (cleanup) {
|
|
36
53
|
cleanup();
|
|
37
54
|
}
|
|
38
55
|
// Fall back to local implementation
|
|
39
|
-
|
|
56
|
+
await configureAiAgentsHandlerImpl(args);
|
|
40
57
|
}
|
|
58
|
+
// Reset daemon cache using the local daemon client (the inner handler's
|
|
59
|
+
// client belongs to the tmp install and isn't connected to our daemon)
|
|
60
|
+
await resetDaemonAgentStatus();
|
|
41
61
|
}
|
|
42
62
|
async function configureAiAgentsHandlerImpl(options) {
|
|
63
|
+
// Node 24 has stricter readline behavior, and enquirer is not checking for closed state
|
|
64
|
+
// when invoking operations, thus you get an ERR_USE_AFTER_CLOSE error.
|
|
65
|
+
process.on('uncaughtException', (error) => {
|
|
66
|
+
if (error &&
|
|
67
|
+
typeof error === 'object' &&
|
|
68
|
+
'code' in error &&
|
|
69
|
+
error['code'] === 'ERR_USE_AFTER_CLOSE')
|
|
70
|
+
return;
|
|
71
|
+
throw error;
|
|
72
|
+
});
|
|
43
73
|
const normalizedOptions = normalizeOptions(options);
|
|
44
74
|
const { nonConfiguredAgents, partiallyConfiguredAgents, fullyConfiguredAgents, disabledAgents, } = await (0, utils_1.getAgentConfigurations)(normalizedOptions.agents, workspace_root_1.workspaceRoot);
|
|
45
75
|
if (disabledAgents.length > 0) {
|
|
@@ -249,7 +279,7 @@ function getAgentFooterDescription(agent) {
|
|
|
249
279
|
case 'opencode':
|
|
250
280
|
return `Configures MCP server. Adds skills and agents. Updates ${rulesFile}.`;
|
|
251
281
|
case 'codex':
|
|
252
|
-
return `Configures MCP server. Updates ${rulesFile}.`;
|
|
282
|
+
return `Configures MCP server. Adds skills. Updates ${rulesFile}.`;
|
|
253
283
|
default:
|
|
254
284
|
return '';
|
|
255
285
|
}
|
|
@@ -271,7 +301,7 @@ function getAgentConfiguredDescription(agent) {
|
|
|
271
301
|
case 'opencode':
|
|
272
302
|
return `MCP + skills + ${rulesFile}`;
|
|
273
303
|
case 'codex':
|
|
274
|
-
return `MCP + ${rulesFile}`;
|
|
304
|
+
return `MCP + skills + ${rulesFile}`;
|
|
275
305
|
default:
|
|
276
306
|
return '';
|
|
277
307
|
}
|
|
@@ -297,3 +327,21 @@ function normalizeOptions(options) {
|
|
|
297
327
|
check,
|
|
298
328
|
};
|
|
299
329
|
}
|
|
330
|
+
async function resetDaemonAgentStatus() {
|
|
331
|
+
try {
|
|
332
|
+
// Don't check daemonClient.enabled() — the CLI sets NX_DAEMON=false for
|
|
333
|
+
// configure-ai-agents (it doesn't need the daemon to do its work), but a
|
|
334
|
+
// daemon started by a previous command may still be running and serving
|
|
335
|
+
// cached status. We just need to reach it to reset its cache.
|
|
336
|
+
if (await client_1.daemonClient.isServerAvailable()) {
|
|
337
|
+
await client_1.daemonClient.resetConfigureAiAgentsStatus();
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
catch {
|
|
341
|
+
// Daemon may not be running, that's fine
|
|
342
|
+
}
|
|
343
|
+
finally {
|
|
344
|
+
// Close the daemon socket so the process can exit cleanly.
|
|
345
|
+
client_1.daemonClient.reset();
|
|
346
|
+
}
|
|
347
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent-prompts.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/init/ai-agent-prompts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAoC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-agent-prompts.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/init/ai-agent-prompts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAoC,MAAM,gBAAgB,CAAC;AAIzE,wBAAsB,iBAAiB,CACrC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAClB,WAAW,CAAC,EAAE,OAAO,GACpB,OAAO,CAAC,KAAK,EAAE,CAAC,CAalB"}
|
|
@@ -4,10 +4,15 @@ exports.determineAiAgents = determineAiAgents;
|
|
|
4
4
|
const enquirer_1 = require("enquirer");
|
|
5
5
|
const is_ci_1 = require("../../utils/is-ci");
|
|
6
6
|
const utils_1 = require("../../ai/utils");
|
|
7
|
+
const detect_ai_agent_1 = require("../../ai/detect-ai-agent");
|
|
7
8
|
const pc = require("picocolors");
|
|
8
9
|
async function determineAiAgents(aiAgents, interactive) {
|
|
9
10
|
if (interactive === false || (0, is_ci_1.isCI)()) {
|
|
10
|
-
|
|
11
|
+
if (aiAgents) {
|
|
12
|
+
return aiAgents;
|
|
13
|
+
}
|
|
14
|
+
const detected = (0, detect_ai_agent_1.detectAiAgent)();
|
|
15
|
+
return detected ? [detected] : [];
|
|
11
16
|
}
|
|
12
17
|
if (aiAgents) {
|
|
13
18
|
return aiAgents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/init/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/init/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,aAAa,EAAE,MAAM,OAAO,CAAC;AAU5C,eAAO,MAAM,gBAAgB,EAAE,aAqD9B,CAAC"}
|
|
@@ -2,10 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.yargsInitCommand = void 0;
|
|
4
4
|
const shared_options_1 = require("../yargs-utils/shared-options");
|
|
5
|
+
const native_1 = require("../../native");
|
|
6
|
+
const ai_output_1 = require("./utils/ai-output");
|
|
5
7
|
exports.yargsInitCommand = {
|
|
6
8
|
command: 'init',
|
|
7
9
|
describe: 'Adds Nx to any type of workspace. It installs nx, creates an nx.json configuration file and optionally sets up remote caching. For more info, check https://nx.dev/recipes/adopting-nx.',
|
|
8
|
-
builder: (yargs) =>
|
|
10
|
+
builder: async (yargs) => {
|
|
11
|
+
// Check for --help flag directly since async builder doesn't receive helpOrVersionSet reliably
|
|
12
|
+
const wantsHelp = process.argv.includes('--help') || process.argv.includes('-h');
|
|
13
|
+
if (wantsHelp) {
|
|
14
|
+
const y = await withInitOptions(yargs);
|
|
15
|
+
y.showHelp();
|
|
16
|
+
process.exit(0);
|
|
17
|
+
}
|
|
18
|
+
return withInitOptions(yargs);
|
|
19
|
+
},
|
|
9
20
|
handler: async (args) => {
|
|
10
21
|
// Node 24 has stricter readline behavior, and enquirer is not checking for closed state
|
|
11
22
|
// when invoking operations, thus you get an ERR_USE_AFTER_CLOSE error.
|
|
@@ -27,9 +38,19 @@ exports.yargsInitCommand = {
|
|
|
27
38
|
}
|
|
28
39
|
process.exit(0);
|
|
29
40
|
}
|
|
30
|
-
catch {
|
|
31
|
-
//
|
|
32
|
-
|
|
41
|
+
catch (error) {
|
|
42
|
+
// Output structured error for AI agents
|
|
43
|
+
if ((0, native_1.isAiAgent)()) {
|
|
44
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
45
|
+
const errorCode = (0, ai_output_1.determineErrorCode)(error);
|
|
46
|
+
const errorLogPath = (0, ai_output_1.writeErrorLog)(error);
|
|
47
|
+
(0, ai_output_1.writeAiOutput)((0, ai_output_1.buildErrorResult)(errorMessage, errorCode, errorLogPath));
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
// Ensure the cursor is always restored just in case the user has bailed during interactive prompts
|
|
51
|
+
// Skip for AI agents to avoid corrupting NDJSON output
|
|
52
|
+
process.stdout.write('\x1b[?25h');
|
|
53
|
+
}
|
|
33
54
|
process.exit(1);
|
|
34
55
|
}
|
|
35
56
|
},
|
|
@@ -67,6 +88,15 @@ async function withInitOptions(yargs) {
|
|
|
67
88
|
string: true,
|
|
68
89
|
description: 'List of AI agents to set up.',
|
|
69
90
|
choices: ['claude', 'codex', 'copilot', 'cursor', 'gemini', 'opencode'],
|
|
91
|
+
})
|
|
92
|
+
.option('plugins', {
|
|
93
|
+
type: 'string',
|
|
94
|
+
description: 'Plugins to install: "skip" for none, "all" for all detected, or comma-separated list (e.g., @nx/vite,@nx/jest).',
|
|
95
|
+
})
|
|
96
|
+
.option('cacheable', {
|
|
97
|
+
type: 'string',
|
|
98
|
+
description: 'Comma-separated list of cacheable operations (e.g., build,test,lint).',
|
|
99
|
+
coerce: shared_options_1.parseCSV,
|
|
70
100
|
});
|
|
71
101
|
}
|
|
72
102
|
else {
|
|
@@ -9,6 +9,8 @@ export interface InitArgs {
|
|
|
9
9
|
verbose?: boolean;
|
|
10
10
|
force?: boolean;
|
|
11
11
|
aiAgents?: Agent[];
|
|
12
|
+
plugins?: string;
|
|
13
|
+
cacheable?: string[];
|
|
12
14
|
}
|
|
13
15
|
export declare function initHandler(options: InitArgs, inner?: boolean): Promise<void>;
|
|
14
16
|
export declare function detectPlugins(nxJson: NxJsonConfiguration, packageJson: PackageJson | null, interactive: boolean, includeAngularCli?: boolean): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-v2.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/init/init-v2.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,sBAAsB,CAAC;AAIvE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"init-v2.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/init/init-v2.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,sBAAsB,CAAC;AAIvE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AA0BvD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAavC,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,QAAQ,EACjB,KAAK,UAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAuYD,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,WAAW,GAAG,IAAI,EAC/B,WAAW,EAAE,OAAO,EACpB,iBAAiB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC,CAsKD"}
|