nx 22.0.0-canary.20251006-738b06b → 22.0.0-canary.20251008-05ab516

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.
Files changed (68) hide show
  1. package/package.json +11 -11
  2. package/schemas/nx-schema.json +96 -83
  3. package/src/adapter/angular-json.d.ts.map +1 -1
  4. package/src/adapter/angular-json.js +13 -17
  5. package/src/command-line/configure-ai-agents/command-object.d.ts +1 -1
  6. package/src/command-line/configure-ai-agents/command-object.d.ts.map +1 -1
  7. package/src/command-line/configure-ai-agents/command-object.js +18 -4
  8. package/src/command-line/configure-ai-agents/configure-ai-agents.d.ts.map +1 -1
  9. package/src/command-line/configure-ai-agents/configure-ai-agents.js +58 -31
  10. package/src/command-line/init/init-v2.js +1 -1
  11. package/src/command-line/nx-cloud/login/command-object.d.ts.map +1 -1
  12. package/src/command-line/nx-cloud/login/command-object.js +2 -2
  13. package/src/command-line/nx-cloud/logout/command-object.js +1 -1
  14. package/src/command-line/release/changelog.d.ts.map +1 -1
  15. package/src/command-line/release/changelog.js +40 -30
  16. package/src/command-line/release/command-object.d.ts +7 -3
  17. package/src/command-line/release/command-object.d.ts.map +1 -1
  18. package/src/command-line/release/config/config.d.ts.map +1 -1
  19. package/src/command-line/release/config/config.js +14 -0
  20. package/src/command-line/release/config/version-plans.d.ts.map +1 -1
  21. package/src/command-line/release/config/version-plans.js +4 -1
  22. package/src/command-line/release/publish.d.ts.map +1 -1
  23. package/src/command-line/release/publish.js +35 -11
  24. package/src/command-line/release/release.d.ts.map +1 -1
  25. package/src/command-line/release/release.js +31 -30
  26. package/src/command-line/release/utils/release-graph.d.ts +219 -0
  27. package/src/command-line/release/utils/release-graph.d.ts.map +1 -0
  28. package/src/command-line/release/utils/release-graph.js +658 -0
  29. package/src/command-line/release/utils/semver.d.ts +1 -2
  30. package/src/command-line/release/utils/semver.d.ts.map +1 -1
  31. package/src/command-line/release/utils/semver.js +3 -5
  32. package/src/command-line/release/utils/shared.d.ts +1 -1
  33. package/src/command-line/release/utils/shared.d.ts.map +1 -1
  34. package/src/command-line/release/utils/shared.js +49 -15
  35. package/src/command-line/release/version/release-group-processor.d.ts +3 -152
  36. package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
  37. package/src/command-line/release/version/release-group-processor.js +50 -570
  38. package/src/command-line/release/version/resolve-current-version.d.ts +1 -1
  39. package/src/command-line/release/version/resolve-current-version.d.ts.map +1 -1
  40. package/src/command-line/release/version/resolve-current-version.js +1 -1
  41. package/src/command-line/release/version/test-utils.d.ts +13 -4
  42. package/src/command-line/release/version/test-utils.d.ts.map +1 -1
  43. package/src/command-line/release/version/test-utils.js +26 -11
  44. package/src/command-line/release/version/version-actions.d.ts +12 -5
  45. package/src/command-line/release/version/version-actions.d.ts.map +1 -1
  46. package/src/command-line/release/version/version-actions.js +36 -19
  47. package/src/command-line/release/version.d.ts +6 -1
  48. package/src/command-line/release/version.d.ts.map +1 -1
  49. package/src/command-line/release/version.js +57 -28
  50. package/src/config/nx-json.d.ts +26 -4
  51. package/src/config/nx-json.d.ts.map +1 -1
  52. package/src/config/nx-json.js +8 -8
  53. package/src/devkit-exports.d.ts +1 -1
  54. package/src/devkit-exports.d.ts.map +1 -1
  55. package/src/native/nx.wasm32-wasi.wasm +0 -0
  56. package/src/plugins/js/index.d.ts +1 -2
  57. package/src/plugins/js/index.d.ts.map +1 -1
  58. package/src/plugins/js/index.js +28 -32
  59. package/src/plugins/js/lock-file/lock-file.d.ts +2 -2
  60. package/src/plugins/js/lock-file/lock-file.d.ts.map +1 -1
  61. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +1 -1
  62. package/src/project-graph/plugins/loaded-nx-plugin.d.ts.map +1 -1
  63. package/src/project-graph/plugins/loaded-nx-plugin.js +8 -6
  64. package/src/project-graph/plugins/public-api.d.ts +1 -36
  65. package/src/project-graph/plugins/public-api.d.ts.map +1 -1
  66. package/src/project-graph/plugins/utils.d.ts +4 -2
  67. package/src/project-graph/plugins/utils.d.ts.map +1 -1
  68. package/src/tasks-runner/run-command.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "22.0.0-canary.20251006-738b06b",
3
+ "version": "22.0.0-canary.20251008-05ab516",
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": {
@@ -83,16 +83,16 @@
83
83
  }
84
84
  },
85
85
  "optionalDependencies": {
86
- "@nx/nx-darwin-arm64": "22.0.0-canary.20251006-738b06b",
87
- "@nx/nx-darwin-x64": "22.0.0-canary.20251006-738b06b",
88
- "@nx/nx-freebsd-x64": "22.0.0-canary.20251006-738b06b",
89
- "@nx/nx-linux-arm-gnueabihf": "22.0.0-canary.20251006-738b06b",
90
- "@nx/nx-linux-arm64-gnu": "22.0.0-canary.20251006-738b06b",
91
- "@nx/nx-linux-arm64-musl": "22.0.0-canary.20251006-738b06b",
92
- "@nx/nx-linux-x64-gnu": "22.0.0-canary.20251006-738b06b",
93
- "@nx/nx-linux-x64-musl": "22.0.0-canary.20251006-738b06b",
94
- "@nx/nx-win32-arm64-msvc": "22.0.0-canary.20251006-738b06b",
95
- "@nx/nx-win32-x64-msvc": "22.0.0-canary.20251006-738b06b"
86
+ "@nx/nx-darwin-arm64": "22.0.0-canary.20251008-05ab516",
87
+ "@nx/nx-darwin-x64": "22.0.0-canary.20251008-05ab516",
88
+ "@nx/nx-freebsd-x64": "22.0.0-canary.20251008-05ab516",
89
+ "@nx/nx-linux-arm-gnueabihf": "22.0.0-canary.20251008-05ab516",
90
+ "@nx/nx-linux-arm64-gnu": "22.0.0-canary.20251008-05ab516",
91
+ "@nx/nx-linux-arm64-musl": "22.0.0-canary.20251008-05ab516",
92
+ "@nx/nx-linux-x64-gnu": "22.0.0-canary.20251008-05ab516",
93
+ "@nx/nx-linux-x64-musl": "22.0.0-canary.20251008-05ab516",
94
+ "@nx/nx-win32-arm64-msvc": "22.0.0-canary.20251008-05ab516",
95
+ "@nx/nx-win32-x64-msvc": "22.0.0-canary.20251008-05ab516"
96
96
  },
97
97
  "nx-migrations": {
98
98
  "migrations": "./migrations.json",
@@ -160,90 +160,98 @@
160
160
  },
161
161
  "groups": {
162
162
  "type": "object",
163
- "properties": {
164
- "projectsRelationship": {
165
- "type": "string",
166
- "enum": ["fixed", "independent"]
167
- },
168
- "projects": {
169
- "oneOf": [
170
- {
171
- "type": "string",
172
- "description": "A project name"
173
- },
174
- {
175
- "type": "array",
176
- "description": "An array of project names",
177
- "minItems": 1,
178
- "items": {
179
- "type": "string"
163
+ "additionalProperties": {
164
+ "type": "object",
165
+ "properties": {
166
+ "projectsRelationship": {
167
+ "type": "string",
168
+ "enum": ["fixed", "independent"]
169
+ },
170
+ "projects": {
171
+ "oneOf": [
172
+ {
173
+ "type": "string",
174
+ "description": "A project name"
175
+ },
176
+ {
177
+ "type": "array",
178
+ "description": "An array of project names",
179
+ "minItems": 1,
180
+ "items": {
181
+ "type": "string"
182
+ }
180
183
  }
181
- }
182
- ]
183
- },
184
- "version": {
185
- "$ref": "#/definitions/NxReleaseGroupVersionConfiguration"
186
- },
187
- "changelog": {
188
- "oneOf": [
189
- {
190
- "$ref": "#/definitions/NxReleaseChangelogConfiguration"
191
- },
192
- {
193
- "type": "boolean"
194
- }
195
- ]
196
- },
197
- "releaseTagPattern": {
198
- "type": "string",
199
- "description": "Optionally override the git/release tag pattern to use for this group."
200
- },
201
- "releaseTagPatternCheckAllBranchesWhen": {
202
- "oneOf": [
203
- {
204
- "type": "boolean"
205
- },
206
- {
207
- "type": "array",
208
- "items": {
209
- "type": "string"
184
+ ]
185
+ },
186
+ "version": {
187
+ "$ref": "#/definitions/NxReleaseGroupVersionConfiguration"
188
+ },
189
+ "changelog": {
190
+ "oneOf": [
191
+ {
192
+ "$ref": "#/definitions/NxReleaseChangelogConfiguration"
193
+ },
194
+ {
195
+ "type": "boolean"
210
196
  }
211
- }
212
- ],
213
- "description": "By default, we will try and resolve the latest match for the releaseTagPattern from the current branch, falling back to all branches if no match is found on the current branch. Setting this to true will cause us to ALWAYS check all branches for the latest match. Setting it to false will cause us to ONLY check the current branch for the latest match. Setting it to an array of strings will cause us to check all branches WHEN the current branch is one of the strings in the array. Glob patterns are supported."
214
- },
215
- "releaseTagPatternRequireSemver": {
216
- "type": "boolean",
217
- "description": "Whether to require semver to be used for the release tag pattern. If set to false, the release tag pattern will not be checked for semver compliance."
218
- },
219
- "releaseTagPatternStrictPreid": {
220
- "$ref": "#/definitions/NxReleaseReleaseTagPatternStrictPreidConfiguration"
221
- },
222
- "versionPlans": {
223
- "oneOf": [
224
- {
225
- "$ref": "#/definitions/NxReleaseVersionPlansConfiguration"
226
- },
227
- {
228
- "type": "boolean",
229
- "description": "Enables using version plans as a specifier source for versioning and to determine changes for changelog generation."
230
- }
231
- ]
197
+ ]
198
+ },
199
+ "releaseTagPattern": {
200
+ "type": "string",
201
+ "description": "Optionally override the git/release tag pattern to use for this group."
202
+ },
203
+ "releaseTagPatternCheckAllBranchesWhen": {
204
+ "oneOf": [
205
+ {
206
+ "type": "boolean"
207
+ },
208
+ {
209
+ "type": "array",
210
+ "items": {
211
+ "type": "string"
212
+ }
213
+ }
214
+ ],
215
+ "description": "By default, we will try and resolve the latest match for the releaseTagPattern from the current branch, falling back to all branches if no match is found on the current branch. Setting this to true will cause us to ALWAYS check all branches for the latest match. Setting it to false will cause us to ONLY check the current branch for the latest match. Setting it to an array of strings will cause us to check all branches WHEN the current branch is one of the strings in the array. Glob patterns are supported."
216
+ },
217
+ "releaseTagPatternRequireSemver": {
218
+ "type": "boolean",
219
+ "description": "Whether to require semver to be used for the release tag pattern. If set to false, the release tag pattern will not be checked for semver compliance."
220
+ },
221
+ "releaseTagPatternPreferDockerVersion": {
222
+ "type": ["boolean", "string"],
223
+ "enum": [true, false, "both"],
224
+ "description": "Controls how docker versions are used relative to semver versions when creating git tags and changelog entries. Set to true to use only the docker version, false to use only the semver version, or 'both' to create tags and changelog entries for both docker and semver versions. By default, this is set to true when docker configuration is present, and false otherwise."
225
+ },
226
+ "releaseTagPatternStrictPreid": {
227
+ "$ref": "#/definitions/NxReleaseReleaseTagPatternStrictPreidConfiguration"
228
+ },
229
+ "versionPlans": {
230
+ "oneOf": [
231
+ {
232
+ "$ref": "#/definitions/NxReleaseVersionPlansConfiguration"
233
+ },
234
+ {
235
+ "type": "boolean",
236
+ "description": "Enables using version plans as a specifier source for versioning and to determine changes for changelog generation."
237
+ }
238
+ ]
239
+ },
240
+ "docker": {
241
+ "oneOf": [
242
+ {
243
+ "type": "boolean",
244
+ "enum": [true],
245
+ "description": "Enable docker configuration with default settings. Warning: Docker support is experimental. Breaking changes may occur and not adhere to semver versioning. "
246
+ },
247
+ {
248
+ "$ref": "#/definitions/NxReleaseGroupDockerConfiguration"
249
+ }
250
+ ]
251
+ }
232
252
  },
233
- "docker": {
234
- "oneOf": [
235
- {
236
- "type": "boolean",
237
- "enum": [true],
238
- "description": "Enable docker configuration with default settings. Warning: Docker support is experimental. Breaking changes may occur and not adhere to semver versioning. "
239
- },
240
- {
241
- "$ref": "#/definitions/NxReleaseGroupDockerConfiguration"
242
- }
243
- ]
244
- }
245
- },
246
- "required": ["projects"]
253
+ "required": ["projects"]
254
+ }
247
255
  },
248
256
  "changelog": {
249
257
  "type": "object",
@@ -323,6 +331,11 @@
323
331
  "type": "boolean",
324
332
  "description": "Whether to require semver to be used for the release tag pattern. If set to false, the release tag pattern will not be checked for semver compliance."
325
333
  },
334
+ "releaseTagPatternPreferDockerVersion": {
335
+ "type": ["boolean", "string"],
336
+ "enum": [true, false, "both"],
337
+ "description": "Controls how docker versions are used relative to semver versions when creating git tags and changelog entries. Set to true to use only the docker version, false to use only the semver version, or 'both' to create tags and changelog entries for both docker and semver versions. By default, this is set to true when docker configuration is present, and false otherwise."
338
+ },
326
339
  "releaseTagPatternStrictPreid": {
327
340
  "$ref": "#/definitions/NxReleaseReleaseTagPatternStrictPreidConfiguration"
328
341
  },
@@ -833,9 +846,9 @@
833
846
  },
834
847
  "updateDependents": {
835
848
  "type": "string",
836
- "enum": ["never", "auto"],
849
+ "enum": ["never", "auto", "always"],
837
850
  "default": "auto",
838
- "description": "When versioning independent projects, this controls whether to update their dependents (i.e. the things that depend on them). 'never' means no dependents will be updated (unless they happen to be versioned directly as well). 'auto' is the default and will cause dependents to be updated (a patch version bump) when a dependency is versioned."
851
+ "description": "When versioning independent projects, this controls whether to update their dependents (i.e. the things that depend on them). 'never' means no dependents will be updated (unless they happen to be versioned directly as well). 'auto' is the default and will cause dependents to be updated (a patch version bump) when a dependency is versioned, as long as a group or projects filter is not applied that does not include them. 'always' will cause dependents to be updated (a patch version bump) when a dependency is versioned, even if they are not included in the group or projects filter."
839
852
  },
840
853
  "logUnchangedProjects": {
841
854
  "type": "boolean",
@@ -1 +1 @@
1
- {"version":3,"file":"angular-json.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/adapter/angular-json.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AAEpE,eAAO,MAAM,mBAAmB,EAAE,UAmBjC,CAAC;AAEF,eAAe,mBAAmB,CAAC;AAEnC,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,8BAA8B,EAAE,OAAO,GACtC,OAAO,CAaT;AAED,wBAAgB,wBAAwB,YAQvC;AAQD,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,GAAG,sBAAsB,CA+B1D;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,OA+BjC;AAID,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,QAaX"}
1
+ {"version":3,"file":"angular-json.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/adapter/angular-json.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAiB,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AAcpE,eAAO,MAAM,mBAAmB,EAAE,UAIjC,CAAC;AAEF,eAAe,mBAAmB,CAAC;AAEnC,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,8BAA8B,EAAE,OAAO,GACtC,OAAO,CAaT;AAED,wBAAgB,wBAAwB,YAQvC;AAQD,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,GAAG,sBAAsB,CA+B1D;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,OA+BjC;AAID,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,QAaX"}
@@ -10,25 +10,21 @@ const fs_1 = require("fs");
10
10
  const path = require("path");
11
11
  const fileutils_1 = require("../utils/fileutils");
12
12
  exports.NX_ANGULAR_JSON_PLUGIN_NAME = 'nx-angular-json-plugin';
13
- exports.NxAngularJsonPlugin = {
14
- name: exports.NX_ANGULAR_JSON_PLUGIN_NAME,
15
- createNodes: [
16
- 'angular.json',
17
- (f, _, ctx) => ({
18
- projects: readAngularJson(ctx.workspaceRoot),
19
- }),
20
- ],
21
- createNodesV2: [
22
- 'angular.json',
23
- (f, _, ctx) => [
24
- [
25
- 'angular.json',
26
- {
27
- projects: readAngularJson(ctx.workspaceRoot),
28
- },
29
- ],
13
+ const createNodes = [
14
+ 'angular.json',
15
+ (f, _, ctx) => [
16
+ [
17
+ 'angular.json',
18
+ {
19
+ projects: readAngularJson(ctx.workspaceRoot),
20
+ },
30
21
  ],
31
22
  ],
23
+ ];
24
+ exports.NxAngularJsonPlugin = {
25
+ name: exports.NX_ANGULAR_JSON_PLUGIN_NAME,
26
+ createNodes,
27
+ createNodesV2: createNodes,
32
28
  };
33
29
  exports.default = exports.NxAngularJsonPlugin;
34
30
  function shouldMergeAngularProjects(root, includeProjectsFromAngularJson) {
@@ -3,7 +3,7 @@ export interface ConfigureAiAgentsOptions {
3
3
  agents?: string[];
4
4
  interactive?: boolean;
5
5
  verbose?: boolean;
6
- check?: boolean;
6
+ check?: boolean | 'outdated' | 'all';
7
7
  }
8
8
  export declare const yargsConfigureAiAgentsCommand: CommandModule<{}, ConfigureAiAgentsOptions>;
9
9
  //# sourceMappingURL=command-object.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/configure-ai-agents/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,6BAA6B,EAAE,aAAa,CACvD,EAAE,EACF,wBAAwB,CA6CzB,CAAC"}
1
+ {"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/configure-ai-agents/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,KAAK,CAAC;CACtC;AAED,eAAO,MAAM,6BAA6B,EAAE,aAAa,CACvD,EAAE,EACF,wBAAwB,CA2DzB,CAAC"}
@@ -18,14 +18,28 @@ exports.yargsConfigureAiAgentsCommand = {
18
18
  default: true,
19
19
  })
20
20
  .option('check', {
21
- type: 'boolean',
22
- description: 'Check if any configured agents are out of date and need to be updated. Does not make any changes.',
23
- default: false,
21
+ type: 'string',
22
+ description: 'Check agent configurations. Use --check or --check=outdated to check only configured agents, or --check=all to include unconfigured/partial configurations. Does not make any changes.',
23
+ coerce: (value) => {
24
+ // --check (no value)
25
+ if (value === '')
26
+ return 'outdated';
27
+ // --check=true
28
+ if (value === 'true')
29
+ return 'outdated';
30
+ // --no-check or --check=false
31
+ if (value === 'false')
32
+ return false;
33
+ // --check=all or --check=outdated
34
+ return value;
35
+ },
36
+ choices: ['outdated', 'all'],
24
37
  })
25
38
  .example('$0 configure-ai-agents', 'Interactively select AI agents to update and configure')
26
39
  .example('$0 configure-ai-agents --agents claude gemini', 'Prompts for updates and and configuration of Claude and Gemini AI agents')
27
40
  .example('$0 configure-ai-agents --check', 'Checks if any configured agents are out of date and need to be updated')
28
- .example('$0 configure-ai-agents --agents claude gemini --no-interactive', 'Configures and updates Claude and Gemini AI agents without prompts'),
41
+ .example('$0 configure-ai-agents --check=all', 'Checks if any agents are not configured, out of date or partially configured')
42
+ .example('$0 configure-ai-agents --agents claude gemini --no-interactive', 'Configures and updates Claude and Gemini AI agents without prompts'), // because of the coerce function
29
43
  handler: async (args) => {
30
44
  await (await Promise.resolve().then(() => require('./configure-ai-agents'))).configureAiAgentsHandler(args);
31
45
  },
@@ -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":"AAeA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAI5D,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,wBAAwB,EAC9B,KAAK,UAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC,CA2Mf"}
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":"AAeA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAI5D,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,wBAAwB,EAC9B,KAAK,UAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC,CAyOf"}
@@ -64,38 +64,64 @@ async function configureAiAgentsHandlerImpl(options) {
64
64
  });
65
65
  process.exit(1);
66
66
  }
67
- if (options.check) {
68
- if (fullyConfiguredAgents.length === 0) {
69
- output_1.output.log({
70
- title: 'No AI agents are configured',
71
- bodyLines: [
72
- 'You can configure AI agents by running `nx configure-ai-agents`.',
73
- ],
74
- });
75
- process.exit(0);
76
- }
67
+ // important for wording
68
+ const usingAllAgents = normalizedOptions.agents.length === utils_1.supportedAgents.length;
69
+ if (normalizedOptions.check) {
77
70
  const outOfDateAgents = fullyConfiguredAgents.filter((a) => a?.outdated);
78
- if (outOfDateAgents.length === 0) {
79
- output_1.output.success({
80
- title: 'All configured AI agents are up to date',
81
- bodyLines: fullyConfiguredAgents.map((a) => `- ${a.displayName}`),
82
- });
83
- process.exit(0);
71
+ // only error if something is fully configured but outdated
72
+ if (normalizedOptions.check === 'outdated') {
73
+ if (fullyConfiguredAgents.length === 0) {
74
+ output_1.output.log({
75
+ title: 'No AI agents are configured',
76
+ bodyLines: [
77
+ 'You can configure AI agents by running `nx configure-ai-agents`.',
78
+ ],
79
+ });
80
+ process.exit(0);
81
+ }
82
+ if (outOfDateAgents.length === 0) {
83
+ output_1.output.success({
84
+ title: 'All configured AI agents are up to date',
85
+ bodyLines: fullyConfiguredAgents.map((a) => `- ${a.displayName}`),
86
+ });
87
+ process.exit(0);
88
+ }
89
+ else {
90
+ output_1.output.log({
91
+ title: 'The following AI agents are out of date:',
92
+ bodyLines: [
93
+ ...outOfDateAgents.map((a) => {
94
+ const rulesPath = a.rulesPath;
95
+ const displayPath = rulesPath.startsWith(workspace_root_1.workspaceRoot)
96
+ ? (0, path_1.relative)(workspace_root_1.workspaceRoot, rulesPath)
97
+ : rulesPath;
98
+ return `- ${a.displayName} (${displayPath})`;
99
+ }),
100
+ '',
101
+ 'You can update them by running `nx configure-ai-agents`.',
102
+ ],
103
+ });
104
+ process.exit(1);
105
+ }
106
+ // error on any partial, outdated or non-configured agent
84
107
  }
85
- else {
86
- output_1.output.log({
87
- title: 'The following AI agents are out of date:',
108
+ else if (normalizedOptions.check === 'all') {
109
+ if (partiallyConfiguredAgents.length === 0 &&
110
+ outOfDateAgents.length === 0 &&
111
+ nonConfiguredAgents.length === 0) {
112
+ output_1.output.success({
113
+ title: `All ${!usingAllAgents ? 'selected' : 'supported'} AI agents are fully configured and up to date`,
114
+ bodyLines: fullyConfiguredAgents.map((a) => `- ${a.displayName}`),
115
+ });
116
+ process.exit(0);
117
+ }
118
+ output_1.output.error({
119
+ title: 'The following agents are not fully configured or up to date:',
88
120
  bodyLines: [
89
- ...outOfDateAgents.map((a) => {
90
- const rulesPath = a.rulesPath;
91
- const displayPath = rulesPath.startsWith(workspace_root_1.workspaceRoot)
92
- ? (0, path_1.relative)(workspace_root_1.workspaceRoot, rulesPath)
93
- : rulesPath;
94
- return `- ${a.displayName} (${displayPath})`;
95
- }),
96
- '',
97
- 'You can update them by running `nx configure-ai-agents`.',
98
- ],
121
+ ...partiallyConfiguredAgents,
122
+ ...outOfDateAgents,
123
+ ...nonConfiguredAgents,
124
+ ].map((a) => getAgentChoiceForPrompt(a).message),
99
125
  });
100
126
  process.exit(1);
101
127
  }
@@ -123,7 +149,6 @@ async function configureAiAgentsHandlerImpl(options) {
123
149
  currentIndex++;
124
150
  });
125
151
  if (allAgentChoices.length === 0) {
126
- const usingAllAgents = normalizedOptions.agents.length === utils_1.supportedAgents.length;
127
152
  output_1.output.success({
128
153
  title: `No new agents to configure. All ${!usingAllAgents ? 'selected' : 'supported'} AI agents are already configured:`,
129
154
  bodyLines: fullyConfiguredAgents.map((agent) => `- ${agent.displayName}`),
@@ -228,9 +253,11 @@ function getAgentChoiceForPrompt(agent) {
228
253
  }
229
254
  function normalizeOptions(options) {
230
255
  const agents = (options.agents ?? utils_1.supportedAgents).filter((a) => utils_1.supportedAgents.includes(a));
256
+ // it used to be just --check which was implicitly 'outdated'
257
+ const check = (options.check === true ? 'outdated' : options.check) ?? false;
231
258
  return {
232
259
  ...options,
233
260
  agents,
234
- check: options.check ?? false,
261
+ check,
235
262
  };
236
263
  }
@@ -127,7 +127,7 @@ async function initHandler(options) {
127
127
  if (selectedAgents && selectedAgents.length > 0) {
128
128
  const tree = new tree_1.FsTree(repoRoot, false);
129
129
  const aiAgentsCallback = await (0, set_up_ai_agents_1.setupAiAgentsGenerator)(tree, {
130
- directory: repoRoot,
130
+ directory: '.',
131
131
  writeNxCloudRules: options.nxCloud !== false,
132
132
  packageVersion: 'latest',
133
133
  agents: [...selectedAgents],
@@ -1 +1 @@
1
- {"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/login/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,eAAO,MAAM,iBAAiB,EAAE,aAmB/B,CAAC"}
1
+ {"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/login/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,eAAO,MAAM,iBAAiB,EAAE,aAkB/B,CAAC"}
@@ -4,9 +4,9 @@ exports.yargsLoginCommand = void 0;
4
4
  const shared_options_1 = require("../../yargs-utils/shared-options");
5
5
  exports.yargsLoginCommand = {
6
6
  command: 'login [nxCloudUrl]',
7
- describe: 'Login to Nx Cloud. This command is an alias for [`nx-cloud login`](/ci/reference/nx-cloud-cli#npx-nxcloud-login).',
7
+ describe: 'Login to Nx Cloud. This command is an alias for `nx-cloud login`.',
8
8
  builder: (yargs) => (0, shared_options_1.withVerbose)(yargs.positional('nxCloudUrl', {
9
- describe: 'The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to https://cloud.nx.app.',
9
+ describe: 'The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to your configured Nx Cloud instance by default.',
10
10
  type: 'string',
11
11
  required: false,
12
12
  }))
@@ -4,7 +4,7 @@ exports.yargsLogoutCommand = void 0;
4
4
  const shared_options_1 = require("../../yargs-utils/shared-options");
5
5
  exports.yargsLogoutCommand = {
6
6
  command: 'logout',
7
- describe: 'Logout from Nx Cloud. This command is an alias for [`nx-cloud logout`](/ci/reference/nx-cloud-cli#npx-nxcloud-logout).',
7
+ describe: 'Logout from Nx Cloud. This command is an alias for `nx-cloud logout`.',
8
8
  builder: (yargs) => (0, shared_options_1.withVerbose)(yargs)
9
9
  .help(false)
10
10
  .showHelpOnFail(false)
@@ -1 +1 @@
1
- {"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/changelog.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAkB1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAkBpD,OAAO,EAEL,SAAS,EAWV,MAAM,aAAa,CAAC;AAYrB,OAAO,EACL,cAAc,EASf,MAAM,gBAAgB,CAAC;AAGxB,MAAM,WAAW,wBAAwB;IACvC,kBAAkB,CAAC,EAAE;QACnB,cAAc,EAAE,cAAc,CAAC;QAC/B,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;KACjC,CAAC;IACF,iBAAiB,CAAC,EAAE;QAClB,CAAC,WAAW,EAAE,MAAM,GAAG;YACrB,cAAc,EAAE,cAAc,CAAC;YAC/B,QAAQ,EAAE,MAAM,CAAC;YACjB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;SACjC,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAElE,eAAO,MAAM,0BAA0B,GAAI,MAAM,gBAAgB,oBACV,CAAC;AAExD,wBAAgB,SAAS,CAAC,qBAAqB,EAAE,sBAAsB,IAOnE,MAAM,gBAAgB,KACrB,OAAO,CAAC,wBAAwB,CAAC,CAyqBrC"}
1
+ {"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/changelog.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAkB1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAepD,OAAO,EAEL,SAAS,EAUV,MAAM,aAAa,CAAC;AASrB,OAAO,EACL,cAAc,EASf,MAAM,gBAAgB,CAAC;AAMxB,MAAM,WAAW,wBAAwB;IACvC,kBAAkB,CAAC,EAAE;QACnB,cAAc,EAAE,cAAc,CAAC;QAC/B,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;KACjC,CAAC;IACF,iBAAiB,CAAC,EAAE;QAClB,CAAC,WAAW,EAAE,MAAM,GAAG;YACrB,cAAc,EAAE,cAAc,CAAC;YAC/B,QAAQ,EAAE,MAAM,CAAC;YACjB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;SACjC,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAElE,eAAO,MAAM,0BAA0B,GAAI,MAAM,gBAAgB,oBACV,CAAC;AAExD,wBAAgB,SAAS,CAAC,qBAAqB,EAAE,sBAAsB,IAOnE,MAAM,gBAAgB,KACrB,OAAO,CAAC,wBAAwB,CAAC,CAsqBrC"}