nx 22.1.0-canary.20251114-b3e6b03 → 22.1.0-canary.20251118-3206c35

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 (33) hide show
  1. package/executors.json +16 -16
  2. package/generators.json +13 -13
  3. package/migrations.json +143 -143
  4. package/package.json +11 -14
  5. package/presets/npm.json +4 -4
  6. package/schemas/nx-schema.json +1286 -1286
  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/core/graph/main.js +1 -1
  11. package/src/daemon/client/client.d.ts.map +1 -1
  12. package/src/daemon/client/client.js +4 -4
  13. package/src/daemon/client/daemon-socket-messenger.d.ts.map +1 -1
  14. package/src/daemon/client/daemon-socket-messenger.js +4 -0
  15. package/src/daemon/server/server.d.ts.map +1 -1
  16. package/src/daemon/server/server.js +4 -0
  17. package/src/executors/noop/schema.json +8 -8
  18. package/src/executors/run-commands/schema.json +187 -187
  19. package/src/executors/run-script/schema.json +25 -25
  20. package/src/native/index.d.ts +1 -0
  21. package/src/native/nx.wasi-browser.js +45 -53
  22. package/src/native/nx.wasm32-wasi.wasm +0 -0
  23. package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +38 -38
  24. package/src/project-graph/plugins/resolve-plugin.js +1 -1
  25. package/src/tasks-runner/task-env-paths.d.ts +2 -0
  26. package/src/tasks-runner/task-env-paths.d.ts.map +1 -0
  27. package/src/tasks-runner/task-env-paths.js +45 -0
  28. package/src/tasks-runner/task-env.d.ts +3 -1
  29. package/src/tasks-runner/task-env.d.ts.map +1 -1
  30. package/src/tasks-runner/task-env.js +27 -51
  31. package/src/tasks-runner/task-orchestrator.js +1 -1
  32. package/src/utils/consume-messages-from-socket.d.ts.map +1 -1
  33. package/src/utils/consume-messages-from-socket.js +4 -2
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../packages/n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,CAAC,IAAI,CAAC;IAQhB,kBAAkB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAOtD,gCAAgC,CAC9B,UAAU,EAAE,OAAO,GAClB,OAAO,CAAC,wCAAwC,CAAC;IAQ9C,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;YAgB7B,oBAAoB;IASlC,OAAO,CAAC,eAAe;YAoDT,mBAAmB;YAuCnB,uCAAuC;IAiBrD,OAAO,CAAC,gCAAgC;IAyBxC,OAAO,CAAC,aAAa;IAmDf,iBAAiB,IAAI,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAwDjD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAkB5B;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C,wBAAgB,eAAe,YAE9B"}
@@ -499,12 +499,12 @@ class DaemonClient {
499
499
  }
500
500
  handleMessage(serializedResult) {
501
501
  try {
502
- perf_hooks_1.performance.mark('result-parse-start');
502
+ perf_hooks_1.performance.mark('result-parse-start-' + this.currentMessage.type);
503
503
  const parsedResult = (0, consume_messages_from_socket_1.isJsonMessage)(serializedResult)
504
504
  ? JSON.parse(serializedResult)
505
505
  : (0, node_v8_1.deserialize)(Buffer.from(serializedResult, 'binary'));
506
- perf_hooks_1.performance.mark('result-parse-end');
507
- perf_hooks_1.performance.measure('deserialize daemon response', 'result-parse-start', 'result-parse-end');
506
+ perf_hooks_1.performance.mark('result-parse-end-' + this.currentMessage.type);
507
+ perf_hooks_1.performance.measure('deserialize daemon response - ' + this.currentMessage.type, 'result-parse-start-' + this.currentMessage.type, 'result-parse-end-' + this.currentMessage.type);
508
508
  if (parsedResult.error) {
509
509
  if ('message' in parsedResult.error &&
510
510
  (parsedResult.error.message === 'NX_VERSION_CHANGED' ||
@@ -516,7 +516,7 @@ class DaemonClient {
516
516
  }
517
517
  }
518
518
  else {
519
- perf_hooks_1.performance.measure('total for sendMessageToDaemon()', 'sendMessageToDaemon-start', 'result-parse-end');
519
+ perf_hooks_1.performance.measure(`${this.currentMessage.type} round trip`, 'sendMessageToDaemon-start', 'result-parse-end-' + this.currentMessage.type);
520
520
  return this.currentResolve(parsedResult);
521
521
  }
522
522
  }
@@ -1 +1 @@
1
- {"version":3,"file":"daemon-socket-messenger.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/client/daemon-socket-messenger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAQ7B,MAAM,WAAW,OAAQ,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,qBAAa,qBAAqB;IACpB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE5B,WAAW,CAAC,eAAe,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM;IAOjE,MAAM,CACJ,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACjC,OAAO,GAAE,MAAM,IAAe,EAC9B,OAAO,GAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAkB;IAe7C,KAAK;CAGN"}
1
+ {"version":3,"file":"daemon-socket-messenger.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/client/daemon-socket-messenger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAQ7B,MAAM,WAAW,OAAQ,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,qBAAa,qBAAqB;IACpB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE5B,WAAW,CAAC,eAAe,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM;IAkBjE,MAAM,CACJ,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACjC,OAAO,GAAE,MAAM,IAAe,EAC9B,OAAO,GAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAkB;IAe7C,KAAK;CAGN"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DaemonSocketMessenger = void 0;
4
+ const perf_hooks_1 = require("perf_hooks");
4
5
  const consume_messages_from_socket_1 = require("../../utils/consume-messages-from-socket");
5
6
  const socket_utils_1 = require("../socket-utils");
6
7
  class DaemonSocketMessenger {
@@ -8,7 +9,10 @@ class DaemonSocketMessenger {
8
9
  this.socket = socket;
9
10
  }
10
11
  async sendMessage(messageToDaemon, force) {
12
+ perf_hooks_1.performance.mark('daemon-message-serialization-start-' + messageToDaemon.type);
11
13
  const serialized = (0, socket_utils_1.serialize)(messageToDaemon, force);
14
+ perf_hooks_1.performance.mark('daemon-message-serialization-end-' + messageToDaemon.type);
15
+ perf_hooks_1.performance.measure('daemon-message-serialization-' + messageToDaemon.type, 'daemon-message-serialization-start-' + messageToDaemon.type, 'daemon-message-serialization-end-' + messageToDaemon.type);
12
16
  this.socket.write(serialized);
13
17
  // send EOT to indicate that the message has been fully written
14
18
  this.socket.write(consume_messages_from_socket_1.MESSAGE_END_SEQ);
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAgKnD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACtC,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CAAa,CAAC;AAyRlD,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,EAClC,IAAI,EAAE,MAAM,GAAG,IAAI,iBAyBpB;AAoMD,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAqEnD"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAgKnD,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACtC,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,GAAG,CAAC,MAAM,CAAa,CAAC;AA8RlD,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,OAAO,CAAC,aAAa,CAAC,EAClC,IAAI,EAAE,MAAM,GAAG,IAAI,iBA6BpB;AAoMD,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAqEnD"}
@@ -103,6 +103,7 @@ async function handleMessage(socket, data) {
103
103
  const unparsedPayload = data;
104
104
  let payload;
105
105
  let mode = 'json';
106
+ logger_1.serverLogger.log(`Received raw message of length ${unparsedPayload.length}`);
106
107
  try {
107
108
  // JSON Message
108
109
  if ((0, consume_messages_from_socket_1.isJsonMessage)(unparsedPayload)) {
@@ -117,6 +118,7 @@ async function handleMessage(socket, data) {
117
118
  catch (e) {
118
119
  await (0, shutdown_utils_1.respondWithErrorAndExit)(socket, `Invalid payload from the client`, new Error(`Unsupported payload sent to daemon server: ${unparsedPayload}`));
119
120
  }
121
+ logger_1.serverLogger.log(`Received ${mode} message of type ${payload.type}`);
120
122
  if (payload.type === 'PING') {
121
123
  await handleResult(socket, 'PING', () => Promise.resolve({ response: true, description: 'ping' }), mode);
122
124
  }
@@ -219,9 +221,11 @@ async function handleResult(socket, type, hrFn, mode) {
219
221
  await (0, shutdown_utils_1.respondWithErrorAndExit)(socket, hr.description, hr.error);
220
222
  }
221
223
  else {
224
+ logger_1.serverLogger.log(`Serializing response for ${type} message in ${mode} mode`);
222
225
  const response = typeof hr.response === 'string'
223
226
  ? hr.response
224
227
  : serializeUnserializedResult(hr.response, mode);
228
+ logger_1.serverLogger.log(`Responding to ${type} message`);
225
229
  await (0, shutdown_utils_1.respondToClient)(socket, response, hr.description);
226
230
  }
227
231
  const endMark = new Date();
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": 2,
3
- "title": "Noop",
4
- "description": "An executor that does nothing.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "properties": {},
9
- "additionalProperties": true
2
+ "version": 2,
3
+ "title": "Noop",
4
+ "description": "An executor that does nothing.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "properties": {},
9
+ "additionalProperties": true
10
10
  }
@@ -1,198 +1,198 @@
1
1
  {
2
- "version": 2,
3
- "title": "Run Commands",
4
- "description": "Run any custom commands with Nx.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "presets": [
9
- {
10
- "name": "Arguments forwarding",
11
- "keys": ["commands"]
12
- },
13
- {
14
- "name": "Custom done conditions",
15
- "keys": ["commands", "readyWhen"]
16
- },
17
- {
18
- "name": "Setting the cwd",
19
- "keys": ["commands", "cwd"]
20
- }
21
- ],
22
- "properties": {
23
- "commands": {
24
- "type": "array",
25
- "description": "Commands to run in child process.",
26
- "items": {
27
- "oneOf": [
28
- {
29
- "type": "object",
30
- "properties": {
31
- "command": {
32
- "type": "string",
33
- "description": "Command to run in child process."
34
- },
35
- "forwardAllArgs": {
36
- "type": "boolean",
37
- "description": "Whether arguments should be forwarded when interpolation is not present."
38
- },
39
- "prefix": {
40
- "type": "string",
41
- "description": "Prefix in front of every line out of the output"
42
- },
43
- "prefixColor": {
44
- "type": "string",
45
- "description": "Color of the prefix",
46
- "enum": [
47
- "black",
48
- "red",
49
- "green",
50
- "yellow",
51
- "blue",
52
- "magenta",
53
- "cyan",
54
- "white"
55
- ]
56
- },
57
- "color": {
58
- "type": "string",
59
- "description": "Color of the output",
60
- "enum": [
61
- "black",
62
- "red",
63
- "green",
64
- "yellow",
65
- "blue",
66
- "magenta",
67
- "cyan",
68
- "white"
69
- ]
70
- },
71
- "bgColor": {
72
- "type": "string",
73
- "description": "Background color of the output",
74
- "enum": [
75
- "bgBlack",
76
- "bgRed",
77
- "bgGreen",
78
- "bgYellow",
79
- "bgBlue",
80
- "bgMagenta",
81
- "bgCyan",
82
- "bgWhite"
83
- ]
84
- },
85
- "description": {
86
- "type": "string",
87
- "description": "An optional description useful for inline documentation purposes. It is not used as part of the execution of the command."
88
- }
89
- },
90
- "additionalProperties": false,
91
- "required": ["command"]
92
- },
93
- {
94
- "type": "string"
95
- }
96
- ]
97
- },
98
- "x-priority": "important"
99
- },
100
- "command": {
101
- "oneOf": [
2
+ "version": 2,
3
+ "title": "Run Commands",
4
+ "description": "Run any custom commands with Nx.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "presets": [
9
+ {
10
+ "name": "Arguments forwarding",
11
+ "keys": ["commands"]
12
+ },
102
13
  {
103
- "type": "array",
104
- "description": "Command to run in child process, but divided into parts.",
105
- "items": {
106
- "type": "string"
107
- },
108
- "x-priority": "important"
14
+ "name": "Custom done conditions",
15
+ "keys": ["commands", "readyWhen"]
109
16
  },
110
17
  {
111
- "type": "string",
112
- "description": "Command to run in child process."
18
+ "name": "Setting the cwd",
19
+ "keys": ["commands", "cwd"]
20
+ }
21
+ ],
22
+ "properties": {
23
+ "commands": {
24
+ "type": "array",
25
+ "description": "Commands to run in child process.",
26
+ "items": {
27
+ "oneOf": [
28
+ {
29
+ "type": "object",
30
+ "properties": {
31
+ "command": {
32
+ "type": "string",
33
+ "description": "Command to run in child process."
34
+ },
35
+ "forwardAllArgs": {
36
+ "type": "boolean",
37
+ "description": "Whether arguments should be forwarded when interpolation is not present."
38
+ },
39
+ "prefix": {
40
+ "type": "string",
41
+ "description": "Prefix in front of every line out of the output"
42
+ },
43
+ "prefixColor": {
44
+ "type": "string",
45
+ "description": "Color of the prefix",
46
+ "enum": [
47
+ "black",
48
+ "red",
49
+ "green",
50
+ "yellow",
51
+ "blue",
52
+ "magenta",
53
+ "cyan",
54
+ "white"
55
+ ]
56
+ },
57
+ "color": {
58
+ "type": "string",
59
+ "description": "Color of the output",
60
+ "enum": [
61
+ "black",
62
+ "red",
63
+ "green",
64
+ "yellow",
65
+ "blue",
66
+ "magenta",
67
+ "cyan",
68
+ "white"
69
+ ]
70
+ },
71
+ "bgColor": {
72
+ "type": "string",
73
+ "description": "Background color of the output",
74
+ "enum": [
75
+ "bgBlack",
76
+ "bgRed",
77
+ "bgGreen",
78
+ "bgYellow",
79
+ "bgBlue",
80
+ "bgMagenta",
81
+ "bgCyan",
82
+ "bgWhite"
83
+ ]
84
+ },
85
+ "description": {
86
+ "type": "string",
87
+ "description": "An optional description useful for inline documentation purposes. It is not used as part of the execution of the command."
88
+ }
89
+ },
90
+ "additionalProperties": false,
91
+ "required": ["command"]
92
+ },
93
+ {
94
+ "type": "string"
95
+ }
96
+ ]
97
+ },
98
+ "x-priority": "important"
99
+ },
100
+ "command": {
101
+ "oneOf": [
102
+ {
103
+ "type": "array",
104
+ "description": "Command to run in child process, but divided into parts.",
105
+ "items": {
106
+ "type": "string"
107
+ },
108
+ "x-priority": "important"
109
+ },
110
+ {
111
+ "type": "string",
112
+ "description": "Command to run in child process."
113
+ }
114
+ ],
115
+ "type": "string",
116
+ "description": "Command to run in child process.",
117
+ "x-priority": "important"
118
+ },
119
+ "parallel": {
120
+ "type": "boolean",
121
+ "description": "Run commands in parallel.",
122
+ "default": true,
123
+ "x-priority": "important"
124
+ },
125
+ "readyWhen": {
126
+ "description": "String or array of strings to appear in `stdout` or `stderr` that indicate that the task is done. When running multiple commands, this option can only be used when `parallel` is set to `true`. If not specified, the task is done when all the child processes complete.",
127
+ "oneOf": [
128
+ { "type": "string" },
129
+ { "type": "array", "items": { "type": "string" } }
130
+ ]
131
+ },
132
+ "args": {
133
+ "oneOf": [
134
+ {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ {
141
+ "type": "string"
142
+ }
143
+ ],
144
+ "description": "Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)"
145
+ },
146
+ "envFile": {
147
+ "type": "string",
148
+ "description": "You may specify a custom .env file path."
149
+ },
150
+ "color": {
151
+ "type": "boolean",
152
+ "description": "Use colors when showing output of command.",
153
+ "default": false
154
+ },
155
+ "cwd": {
156
+ "type": "string",
157
+ "description": "Current working directory of the commands. If it's not specified the commands will run in the workspace root, if a relative path is specified the commands will run in that path relative to the workspace root and if it's an absolute path the commands will run in that path."
158
+ },
159
+ "env": {
160
+ "type": "object",
161
+ "description": "Environment variables that will be made available to the commands. This property has priority over the `.env` files.",
162
+ "additionalProperties": {
163
+ "type": "string"
164
+ }
165
+ },
166
+ "__unparsed__": {
167
+ "hidden": true,
168
+ "type": "array",
169
+ "items": {
170
+ "type": "string"
171
+ },
172
+ "$default": {
173
+ "$source": "unparsed"
174
+ },
175
+ "x-priority": "internal"
176
+ },
177
+ "forwardAllArgs": {
178
+ "type": "boolean",
179
+ "description": "Whether arguments should be forwarded when interpolation is not present.",
180
+ "default": true
181
+ },
182
+ "tty": {
183
+ "type": "boolean",
184
+ "description": "Whether commands should be run with a tty terminal",
185
+ "hidden": true
113
186
  }
114
- ],
115
- "type": "string",
116
- "description": "Command to run in child process.",
117
- "x-priority": "important"
118
- },
119
- "parallel": {
120
- "type": "boolean",
121
- "description": "Run commands in parallel.",
122
- "default": true,
123
- "x-priority": "important"
124
- },
125
- "readyWhen": {
126
- "description": "String or array of strings to appear in `stdout` or `stderr` that indicate that the task is done. When running multiple commands, this option can only be used when `parallel` is set to `true`. If not specified, the task is done when all the child processes complete.",
127
- "oneOf": [
128
- { "type": "string" },
129
- { "type": "array", "items": { "type": "string" } }
130
- ]
131
187
  },
132
- "args": {
133
- "oneOf": [
188
+ "additionalProperties": true,
189
+ "oneOf": [
134
190
  {
135
- "type": "array",
136
- "items": {
137
- "type": "string"
138
- }
191
+ "required": ["commands"]
139
192
  },
140
193
  {
141
- "type": "string"
194
+ "required": ["command"]
142
195
  }
143
- ],
144
- "description": "Extra arguments. You can pass them as follows: nx run project:target --args='--wait=100'. You can then use {args.wait} syntax to interpolate them in the workspace config file. See example [above](#chaining-commands-interpolating-args-and-setting-the-cwd)"
145
- },
146
- "envFile": {
147
- "type": "string",
148
- "description": "You may specify a custom .env file path."
149
- },
150
- "color": {
151
- "type": "boolean",
152
- "description": "Use colors when showing output of command.",
153
- "default": false
154
- },
155
- "cwd": {
156
- "type": "string",
157
- "description": "Current working directory of the commands. If it's not specified the commands will run in the workspace root, if a relative path is specified the commands will run in that path relative to the workspace root and if it's an absolute path the commands will run in that path."
158
- },
159
- "env": {
160
- "type": "object",
161
- "description": "Environment variables that will be made available to the commands. This property has priority over the `.env` files.",
162
- "additionalProperties": {
163
- "type": "string"
164
- }
165
- },
166
- "__unparsed__": {
167
- "hidden": true,
168
- "type": "array",
169
- "items": {
170
- "type": "string"
171
- },
172
- "$default": {
173
- "$source": "unparsed"
174
- },
175
- "x-priority": "internal"
176
- },
177
- "forwardAllArgs": {
178
- "type": "boolean",
179
- "description": "Whether arguments should be forwarded when interpolation is not present.",
180
- "default": true
181
- },
182
- "tty": {
183
- "type": "boolean",
184
- "description": "Whether commands should be run with a tty terminal",
185
- "hidden": true
186
- }
187
- },
188
- "additionalProperties": true,
189
- "oneOf": [
190
- {
191
- "required": ["commands"]
192
- },
193
- {
194
- "required": ["command"]
195
- }
196
- ],
197
- "examplesFile": "../../../docs/run-commands-examples.md"
196
+ ],
197
+ "examplesFile": "../../../docs/run-commands-examples.md"
198
198
  }
@@ -1,28 +1,28 @@
1
1
  {
2
- "version": 2,
3
- "title": "Run Script",
4
- "description": "Run any NPM script of a project in the project's root directory.",
5
- "type": "object",
6
- "cli": "nx",
7
- "outputCapture": "pipe",
8
- "properties": {
9
- "script": {
10
- "type": "string",
11
- "description": "An npm script name in the `package.json` file of the project (e.g., `build`)."
2
+ "version": 2,
3
+ "title": "Run Script",
4
+ "description": "Run any NPM script of a project in the project's root directory.",
5
+ "type": "object",
6
+ "cli": "nx",
7
+ "outputCapture": "pipe",
8
+ "properties": {
9
+ "script": {
10
+ "type": "string",
11
+ "description": "An npm script name in the `package.json` file of the project (e.g., `build`)."
12
+ },
13
+ "__unparsed__": {
14
+ "hidden": true,
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string"
18
+ },
19
+ "$default": {
20
+ "$source": "unparsed"
21
+ },
22
+ "x-priority": "internal"
23
+ }
12
24
  },
13
- "__unparsed__": {
14
- "hidden": true,
15
- "type": "array",
16
- "items": {
17
- "type": "string"
18
- },
19
- "$default": {
20
- "$source": "unparsed"
21
- },
22
- "x-priority": "internal"
23
- }
24
- },
25
- "additionalProperties": true,
26
- "required": ["script"],
27
- "examplesFile": "../../../docs/run-script-examples.md"
25
+ "additionalProperties": true,
26
+ "required": ["script"],
27
+ "examplesFile": "../../../docs/run-script-examples.md"
28
28
  }
@@ -285,6 +285,7 @@ export declare const enum GroupType {
285
285
  MainCLI = 'MainCLI',
286
286
  MainCliSubprocesses = 'MainCliSubprocesses',
287
287
  Daemon = 'Daemon',
288
+ DaemonSubprocesses = 'DaemonSubprocesses',
288
289
  Task = 'Task',
289
290
  Batch = 'Batch'
290
291
  }