nx 22.0.0-canary.20251007-01d5f3f → 22.0.0-canary.20251010-bfaa91b

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 (84) hide show
  1. package/executors.json +16 -16
  2. package/generators.json +13 -13
  3. package/migrations.json +100 -95
  4. package/package.json +11 -14
  5. package/presets/npm.json +4 -4
  6. package/schemas/nx-schema.json +1297 -1129
  7. package/schemas/project-schema.json +359 -359
  8. package/schemas/workspace-schema.json +165 -165
  9. package/src/ai/set-up-ai-agents/schema.json +31 -31
  10. package/src/command-line/configure-ai-agents/command-object.d.ts +1 -1
  11. package/src/command-line/configure-ai-agents/command-object.d.ts.map +1 -1
  12. package/src/command-line/configure-ai-agents/command-object.js +18 -4
  13. package/src/command-line/configure-ai-agents/configure-ai-agents.d.ts.map +1 -1
  14. package/src/command-line/configure-ai-agents/configure-ai-agents.js +58 -31
  15. package/src/command-line/nx-cloud/login/command-object.d.ts.map +1 -1
  16. package/src/command-line/nx-cloud/login/command-object.js +2 -2
  17. package/src/command-line/nx-cloud/logout/command-object.js +1 -1
  18. package/src/command-line/release/changelog.d.ts.map +1 -1
  19. package/src/command-line/release/changelog.js +58 -47
  20. package/src/command-line/release/command-object.d.ts +7 -3
  21. package/src/command-line/release/command-object.d.ts.map +1 -1
  22. package/src/command-line/release/config/config.d.ts +6 -2
  23. package/src/command-line/release/config/config.d.ts.map +1 -1
  24. package/src/command-line/release/config/config.js +124 -61
  25. package/src/command-line/release/config/version-plans.d.ts.map +1 -1
  26. package/src/command-line/release/config/version-plans.js +4 -1
  27. package/src/command-line/release/publish.d.ts.map +1 -1
  28. package/src/command-line/release/publish.js +35 -11
  29. package/src/command-line/release/release.d.ts.map +1 -1
  30. package/src/command-line/release/release.js +31 -30
  31. package/src/command-line/release/utils/git.d.ts +2 -2
  32. package/src/command-line/release/utils/git.d.ts.map +1 -1
  33. package/src/command-line/release/utils/git.js +5 -5
  34. package/src/command-line/release/utils/release-graph.d.ts +219 -0
  35. package/src/command-line/release/utils/release-graph.d.ts.map +1 -0
  36. package/src/command-line/release/utils/release-graph.js +658 -0
  37. package/src/command-line/release/utils/semver.d.ts +1 -2
  38. package/src/command-line/release/utils/semver.d.ts.map +1 -1
  39. package/src/command-line/release/utils/semver.js +3 -5
  40. package/src/command-line/release/utils/shared.d.ts +1 -1
  41. package/src/command-line/release/utils/shared.d.ts.map +1 -1
  42. package/src/command-line/release/utils/shared.js +53 -19
  43. package/src/command-line/release/version/release-group-processor.d.ts +3 -152
  44. package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
  45. package/src/command-line/release/version/release-group-processor.js +58 -569
  46. package/src/command-line/release/version/resolve-current-version.d.ts +1 -1
  47. package/src/command-line/release/version/resolve-current-version.d.ts.map +1 -1
  48. package/src/command-line/release/version/resolve-current-version.js +1 -1
  49. package/src/command-line/release/version/test-utils.d.ts +13 -4
  50. package/src/command-line/release/version/test-utils.d.ts.map +1 -1
  51. package/src/command-line/release/version/test-utils.js +26 -11
  52. package/src/command-line/release/version/version-actions.d.ts +12 -5
  53. package/src/command-line/release/version/version-actions.d.ts.map +1 -1
  54. package/src/command-line/release/version/version-actions.js +36 -19
  55. package/src/command-line/release/version.d.ts +6 -1
  56. package/src/command-line/release/version.d.ts.map +1 -1
  57. package/src/command-line/release/version.js +57 -28
  58. package/src/config/nx-json.d.ts +139 -58
  59. package/src/config/nx-json.d.ts.map +1 -1
  60. package/src/config/nx-json.js +8 -8
  61. package/src/core/graph/main.js +1 -1
  62. package/src/daemon/client/client.d.ts +4 -0
  63. package/src/daemon/client/client.d.ts.map +1 -1
  64. package/src/daemon/client/client.js +23 -0
  65. package/src/daemon/message-types/register-project-graph-listener.d.ts +6 -0
  66. package/src/daemon/message-types/register-project-graph-listener.d.ts.map +1 -0
  67. package/src/daemon/message-types/register-project-graph-listener.js +11 -0
  68. package/src/daemon/server/project-graph-incremental-recomputation.d.ts +3 -1
  69. package/src/daemon/server/project-graph-incremental-recomputation.d.ts.map +1 -1
  70. package/src/daemon/server/project-graph-incremental-recomputation.js +13 -5
  71. package/src/daemon/server/project-graph-listener-sockets.d.ts +8 -0
  72. package/src/daemon/server/project-graph-listener-sockets.d.ts.map +1 -0
  73. package/src/daemon/server/project-graph-listener-sockets.js +24 -0
  74. package/src/daemon/server/server.d.ts.map +1 -1
  75. package/src/daemon/server/server.js +9 -2
  76. package/src/executors/noop/schema.json +8 -8
  77. package/src/executors/run-commands/schema.json +187 -187
  78. package/src/executors/run-script/schema.json +25 -25
  79. package/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts +3 -0
  80. package/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts.map +1 -0
  81. package/src/migrations/update-22-0-0/consolidate-release-tag-config.js +100 -0
  82. package/src/native/nx.wasm32-wasi.wasm +0 -0
  83. package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +38 -38
  84. package/src/tasks-runner/run-command.js +2 -2
@@ -1,185 +1,185 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema",
3
- "$id": "https://nx.dev",
4
- "title": "JSON schema for Nx workspaces",
5
- "type": "object",
6
- "properties": {
7
- "version": {
8
- "type": "number",
9
- "enum": [1, 2]
10
- }
11
- },
12
- "allOf": [
13
- {
14
- "if": {
15
- "properties": { "version": { "const": 2 } },
16
- "required": ["version"]
17
- },
18
- "then": {
19
- "properties": {
20
- "projects": {
21
- "type": "object",
22
- "additionalProperties": {
23
- "oneOf": [
24
- {
25
- "type": "string"
26
- },
27
- {
28
- "type": "object",
29
- "properties": {
30
- "targets": {
31
- "type": "object",
32
- "description": "Configures all the targets which define what tasks you can run against the project",
33
- "additionalProperties": {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "$id": "https://nx.dev",
4
+ "title": "JSON schema for Nx workspaces",
5
+ "type": "object",
6
+ "properties": {
7
+ "version": {
8
+ "type": "number",
9
+ "enum": [1, 2]
10
+ }
11
+ },
12
+ "allOf": [
13
+ {
14
+ "if": {
15
+ "properties": { "version": { "const": 2 } },
16
+ "required": ["version"]
17
+ },
18
+ "then": {
19
+ "properties": {
20
+ "projects": {
34
21
  "type": "object",
35
- "properties": {
36
- "executor": {
37
- "description": "The function that Nx will invoke when you run this target",
38
- "type": "string"
39
- },
40
- "options": {
41
- "type": "object"
42
- },
43
- "outputs": {
44
- "type": "array",
45
- "items": {
46
- "type": "string"
47
- }
48
- },
49
- "configurations": {
50
- "type": "object",
51
- "description": "provides extra sets of values that will be merged into the options map",
52
- "additionalProperties": {
53
- "type": "object"
54
- }
55
- },
56
- "dependsOn": {
57
- "type": "array",
58
- "description": "Target dependency.",
59
- "items": {
60
- "oneOf": [
22
+ "additionalProperties": {
23
+ "oneOf": [
61
24
  {
62
- "type": "string"
25
+ "type": "string"
63
26
  },
64
27
  {
65
- "type": "object",
66
- "properties": {
67
- "projects": {
68
- "oneOf": [
69
- {
70
- "type": "string",
71
- "description": "A project name"
28
+ "type": "object",
29
+ "properties": {
30
+ "targets": {
31
+ "type": "object",
32
+ "description": "Configures all the targets which define what tasks you can run against the project",
33
+ "additionalProperties": {
34
+ "type": "object",
35
+ "properties": {
36
+ "executor": {
37
+ "description": "The function that Nx will invoke when you run this target",
38
+ "type": "string"
39
+ },
40
+ "options": {
41
+ "type": "object"
42
+ },
43
+ "outputs": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "configurations": {
50
+ "type": "object",
51
+ "description": "provides extra sets of values that will be merged into the options map",
52
+ "additionalProperties": {
53
+ "type": "object"
54
+ }
55
+ },
56
+ "dependsOn": {
57
+ "type": "array",
58
+ "description": "Target dependency.",
59
+ "items": {
60
+ "oneOf": [
61
+ {
62
+ "type": "string"
63
+ },
64
+ {
65
+ "type": "object",
66
+ "properties": {
67
+ "projects": {
68
+ "oneOf": [
69
+ {
70
+ "type": "string",
71
+ "description": "A project name"
72
+ },
73
+ {
74
+ "type": "array",
75
+ "description": "An array of project names",
76
+ "items": {
77
+ "type": "string"
78
+ }
79
+ }
80
+ ]
81
+ },
82
+ "dependencies": {
83
+ "type": "boolean"
84
+ },
85
+ "target": {
86
+ "type": "string",
87
+ "description": "The name of the target."
88
+ },
89
+ "params": {
90
+ "type": "string",
91
+ "description": "Configuration for params handling.",
92
+ "enum": ["ignore", "forward"],
93
+ "default": "ignore"
94
+ }
95
+ },
96
+ "oneOf": [
97
+ {
98
+ "required": ["projects", "target"]
99
+ },
100
+ {
101
+ "required": ["dependencies", "target"]
102
+ },
103
+ {
104
+ "required": ["target"],
105
+ "not": {
106
+ "anyOf": [
107
+ { "required": ["projects"] },
108
+ { "required": ["dependencies"] }
109
+ ]
110
+ }
111
+ }
112
+ ],
113
+ "additionalProperties": false
114
+ }
115
+ ]
116
+ }
117
+ },
118
+ "command": {
119
+ "type": "string",
120
+ "description": "A shorthand for using the nx:run-commands executor"
121
+ },
122
+ "cache": {
123
+ "type": "boolean",
124
+ "description": "Specifies if the given target should be cacheable"
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "tags": {
130
+ "type": "array",
131
+ "items": {
132
+ "type": "string"
133
+ }
72
134
  },
73
- {
74
- "type": "array",
75
- "description": "An array of project names",
76
- "items": {
77
- "type": "string"
78
- }
135
+ "implicitDependencies": {
136
+ "type": "array",
137
+ "items": {
138
+ "type": "string"
139
+ }
79
140
  }
80
- ]
81
- },
82
- "dependencies": {
83
- "type": "boolean"
84
- },
85
- "target": {
86
- "type": "string",
87
- "description": "The name of the target."
88
- },
89
- "params": {
90
- "type": "string",
91
- "description": "Configuration for params handling.",
92
- "enum": ["ignore", "forward"],
93
- "default": "ignore"
94
141
  }
95
- },
96
- "oneOf": [
97
- {
98
- "required": ["projects", "target"]
99
- },
100
- {
101
- "required": ["dependencies", "target"]
102
- },
103
- {
104
- "required": ["target"],
105
- "not": {
106
- "anyOf": [
107
- { "required": ["projects"] },
108
- { "required": ["dependencies"] }
109
- ]
110
- }
111
- }
112
- ],
113
- "additionalProperties": false
114
142
  }
115
- ]
116
- }
117
- },
118
- "command": {
119
- "type": "string",
120
- "description": "A shorthand for using the nx:run-commands executor"
121
- },
122
- "cache": {
123
- "type": "boolean",
124
- "description": "Specifies if the given target should be cacheable"
125
- }
143
+ ]
126
144
  }
127
- }
128
- },
129
- "tags": {
130
- "type": "array",
131
- "items": {
132
- "type": "string"
133
- }
134
- },
135
- "implicitDependencies": {
136
- "type": "array",
137
- "items": {
138
- "type": "string"
139
- }
140
145
  }
141
- }
142
146
  }
143
- ]
144
- }
145
- }
146
- }
147
- },
148
- "else": {
149
- "properties": {
150
- "projects": {
151
- "type": "object",
152
- "additionalProperties": {
153
- "type": "object",
154
- "properties": {
155
- "architect": {
156
- "type": "object",
157
- "description": "Configures all the targets which define what tasks you can run against the project",
158
- "additionalProperties": {
159
- "type": "object",
160
- "properties": {
161
- "builder": {
162
- "description": "The function that Nx will invoke when you run this architect",
163
- "type": "string"
164
- },
165
- "options": {
166
- "type": "object"
167
- },
168
- "configurations": {
147
+ },
148
+ "else": {
149
+ "properties": {
150
+ "projects": {
169
151
  "type": "object",
170
- "description": "provides extra sets of values that will be merged into the options map",
171
152
  "additionalProperties": {
172
- "type": "object"
153
+ "type": "object",
154
+ "properties": {
155
+ "architect": {
156
+ "type": "object",
157
+ "description": "Configures all the targets which define what tasks you can run against the project",
158
+ "additionalProperties": {
159
+ "type": "object",
160
+ "properties": {
161
+ "builder": {
162
+ "description": "The function that Nx will invoke when you run this architect",
163
+ "type": "string"
164
+ },
165
+ "options": {
166
+ "type": "object"
167
+ },
168
+ "configurations": {
169
+ "type": "object",
170
+ "description": "provides extra sets of values that will be merged into the options map",
171
+ "additionalProperties": {
172
+ "type": "object"
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
173
179
  }
174
- }
175
180
  }
176
- }
177
181
  }
178
- }
179
182
  }
180
- }
181
183
  }
182
- }
183
- }
184
- ]
184
+ ]
185
185
  }
@@ -1,34 +1,34 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "$id": "SetupAiAgents",
4
- "title": "Set Up AI Agents",
5
- "description": "Sets up the Nx MCP & rule files for common AI Agents.",
6
- "type": "object",
7
- "properties": {
8
- "directory": {
9
- "type": "string",
10
- "description": "Directory where the AI agent configuration files will be generated",
11
- "default": "."
2
+ "$schema": "https://json-schema.org/schema",
3
+ "$id": "SetupAiAgents",
4
+ "title": "Set Up AI Agents",
5
+ "description": "Sets up the Nx MCP & rule files for common AI Agents.",
6
+ "type": "object",
7
+ "properties": {
8
+ "directory": {
9
+ "type": "string",
10
+ "description": "Directory where the AI agent configuration files will be generated",
11
+ "default": "."
12
+ },
13
+ "writeNxCloudRules": {
14
+ "type": "boolean",
15
+ "description": "Whether to write Nx Cloud rules",
16
+ "default": false
17
+ },
18
+ "packageVersion": {
19
+ "type": "string",
20
+ "description": "The version of the package to use",
21
+ "default": "latest"
22
+ },
23
+ "agents": {
24
+ "type": "array",
25
+ "description": "The agents to setup Nx configuration for.",
26
+ "items": {
27
+ "type": "string",
28
+ "enum": ["claude", "gemini", "codex", "cursor", "copilot"]
29
+ },
30
+ "default": ["claude", "gemini", "codex", "cursor", "copilot"]
31
+ }
12
32
  },
13
- "writeNxCloudRules": {
14
- "type": "boolean",
15
- "description": "Whether to write Nx Cloud rules",
16
- "default": false
17
- },
18
- "packageVersion": {
19
- "type": "string",
20
- "description": "The version of the package to use",
21
- "default": "latest"
22
- },
23
- "agents": {
24
- "type": "array",
25
- "description": "The agents to setup Nx configuration for.",
26
- "items": {
27
- "type": "string",
28
- "enum": ["claude", "gemini", "codex", "cursor", "copilot"]
29
- },
30
- "default": ["claude", "gemini", "codex", "cursor", "copilot"]
31
- }
32
- },
33
- "required": ["directory"]
33
+ "required": ["directory"]
34
34
  }
@@ -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
  }
@@ -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;AAExB,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,CAgqBrC"}