nx 22.1.0-canary.20251023-59cf495 → 22.1.0-canary.20251024-7712d2a
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/executors.json +16 -16
- package/generators.json +13 -13
- package/migrations.json +137 -137
- package/package.json +14 -11
- package/presets/npm.json +4 -4
- package/project.json +5 -1
- package/schemas/nx-schema.json +1285 -1285
- package/schemas/project-schema.json +359 -359
- package/schemas/workspace-schema.json +165 -165
- package/src/ai/set-up-ai-agents/schema.json +31 -31
- package/src/command-line/init/init-v2.d.ts.map +1 -1
- package/src/command-line/init/init-v2.js +4 -0
- package/src/core/graph/main.js +1 -1
- package/src/daemon/server/project-graph-incremental-recomputation.d.ts.map +1 -1
- package/src/daemon/server/project-graph-incremental-recomputation.js +14 -1
- package/src/devkit-internals.d.ts +1 -0
- package/src/devkit-internals.d.ts.map +1 -1
- package/src/devkit-internals.js +3 -1
- package/src/executors/noop/schema.json +8 -8
- package/src/executors/run-commands/schema.json +187 -187
- package/src/executors/run-script/schema.json +25 -25
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +38 -38
- package/src/plugins/js/lock-file/pnpm-parser.js +1 -1
- package/src/plugins/js/lock-file/project-graph-pruning.js +1 -1
- package/src/project-graph/utils/project-configuration-utils.d.ts +1 -1
- package/src/project-graph/utils/project-configuration-utils.d.ts.map +1 -1
- package/src/project-graph/utils/project-configuration-utils.js +4 -4
- package/src/tasks-runner/fork.js +3 -1
- package/src/tasks-runner/is-tui-enabled.d.ts.map +1 -1
- package/src/tasks-runner/is-tui-enabled.js +1 -1
- package/src/tasks-runner/run-command.d.ts.map +1 -1
- package/src/tasks-runner/run-command.js +4 -1
- package/src/utils/exit-codes.d.ts +1 -1
- package/src/utils/exit-codes.d.ts.map +1 -1
- package/src/utils/package-json.js +1 -1
- package/src/utils/package-manager.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-graph-incremental-recomputation.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/project-graph-incremental-recomputation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,YAAY,EAEb,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACL,YAAY,EAIb,MAAM,mCAAmC,CAAC;AAc3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAEL,uBAAuB,EACxB,MAAM,uDAAuD,CAAC;AAS/D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,mBAAmB,EAAE,YAAY,GAAG,IAAI,CAAC;IACzC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,iBAAiB,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACrC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC3C,cAAc,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAClD;AAGD,eAAO,IAAI,gBAAgB,EACvB;IACE,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,QAAQ,EAAE,CAAC;IAC9B,cAAc,EAAE,yBAAyB,CAAC;CAC3C,GACD,SAAS,CAAC;AACd,eAAO,IAAI,0BAA0B,EAAE,YAAY,GAAG,SAAS,CAAC;AAChE,eAAO,IAAI,mBAAmB,EAAE,YAAY,GAAG,SAAS,CAAC;AAYzD,wBAAsB,sCAAsC,IAAI,OAAO,CAAC,sBAAsB,CAAC,
|
|
1
|
+
{"version":3,"file":"project-graph-incremental-recomputation.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/daemon/server/project-graph-incremental-recomputation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL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@ async function getCachedSerializedProjectGraphPromise() {
|
|
|
59
59
|
if (wasScheduled) {
|
|
60
60
|
notifyProjectGraphRecomputationListeners(result.projectGraph, result.sourceMaps);
|
|
61
61
|
}
|
|
62
|
+
const errors = result.error
|
|
63
|
+
? result.error instanceof error_types_1.DaemonProjectGraphError
|
|
64
|
+
? result.error.errors
|
|
65
|
+
: [result.error]
|
|
66
|
+
: [];
|
|
67
|
+
// Always write the daemon's current graph to disk to ensure disk cache
|
|
68
|
+
// stays in sync with the daemon's in-memory cache. This prevents issues
|
|
69
|
+
// where a non-daemon process writes a stale/errored cache that never
|
|
70
|
+
// gets overwritten by the daemon's valid graph.
|
|
71
|
+
if (result.projectGraph &&
|
|
72
|
+
result.projectFileMapCache &&
|
|
73
|
+
result.sourceMaps) {
|
|
74
|
+
(0, nx_deps_cache_1.writeCache)(result.projectFileMapCache, result.projectGraph, result.sourceMaps, errors);
|
|
75
|
+
}
|
|
62
76
|
return result;
|
|
63
77
|
}
|
|
64
78
|
catch (e) {
|
|
@@ -197,7 +211,6 @@ async function processFilesAndCreateAndSerializeProjectGraph(plugins) {
|
|
|
197
211
|
};
|
|
198
212
|
}
|
|
199
213
|
}
|
|
200
|
-
(0, nx_deps_cache_1.writeCache)(g.projectFileMapCache, g.projectGraph, projectConfigurationsResult.sourceMaps, errors);
|
|
201
214
|
if (errors.length > 0) {
|
|
202
215
|
return {
|
|
203
216
|
error: new error_types_1.DaemonProjectGraphError(errors, g.projectGraph, projectConfigurationsResult.sourceMaps),
|
|
@@ -29,4 +29,5 @@ export { isCI } from './utils/is-ci';
|
|
|
29
29
|
export { isUsingPrettierInTree } from './utils/is-using-prettier';
|
|
30
30
|
export { readYamlFile } from './utils/fileutils';
|
|
31
31
|
export { globalSpinner } from './utils/spinner';
|
|
32
|
+
export { signalToCode } from './utils/exit-codes';
|
|
32
33
|
//# sourceMappingURL=devkit-internals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devkit-internals.d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EACxB,iCAAiC,GAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,kDAAkD,EAClD,kBAAkB,GACnB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
package/src/devkit-internals.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.globalSpinner = exports.readYamlFile = exports.isUsingPrettierInTree = exports.isCI = exports.interpolate = exports.registerTsProject = exports.LoadedNxPlugin = exports.retrieveProjectConfigurations = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashMultiGlobWithWorkspaceContext = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.installPackageToTmp = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.getIgnoreObjectForTree = exports.findMatchingConfigFiles = exports.readProjectConfigurationsFromRootMap = exports.mergeTargetConfigurations = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.parseExecutor = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0;
|
|
3
|
+
exports.signalToCode = exports.globalSpinner = exports.readYamlFile = exports.isUsingPrettierInTree = exports.isCI = exports.interpolate = exports.registerTsProject = exports.LoadedNxPlugin = exports.retrieveProjectConfigurations = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashMultiGlobWithWorkspaceContext = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.installPackageToTmp = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.getIgnoreObjectForTree = exports.findMatchingConfigFiles = exports.readProjectConfigurationsFromRootMap = exports.mergeTargetConfigurations = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.parseExecutor = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/**
|
|
6
6
|
* Note to developers: STOP! These exports are available via requireNx in @nx/devkit.
|
|
@@ -63,3 +63,5 @@ var fileutils_1 = require("./utils/fileutils");
|
|
|
63
63
|
Object.defineProperty(exports, "readYamlFile", { enumerable: true, get: function () { return fileutils_1.readYamlFile; } });
|
|
64
64
|
var spinner_1 = require("./utils/spinner");
|
|
65
65
|
Object.defineProperty(exports, "globalSpinner", { enumerable: true, get: function () { return spinner_1.globalSpinner; } });
|
|
66
|
+
var exit_codes_1 = require("./utils/exit-codes");
|
|
67
|
+
Object.defineProperty(exports, "signalToCode", { enumerable: true, get: function () { return exit_codes_1.signalToCode; } });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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": {
|
|
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
|
+
{
|
|
160
29
|
"type": "object",
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
"type": "string"
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
+
}
|
|
174
89
|
},
|
|
175
|
-
"
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"
|
|
180
|
-
|
|
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"
|
|
181
109
|
},
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
"hidden": true
|
|
110
|
+
{
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "Command to run in child process."
|
|
186
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
|
+
]
|
|
187
131
|
},
|
|
188
|
-
"
|
|
189
|
-
|
|
132
|
+
"args": {
|
|
133
|
+
"oneOf": [
|
|
190
134
|
{
|
|
191
|
-
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": {
|
|
137
|
+
"type": "string"
|
|
138
|
+
}
|
|
192
139
|
},
|
|
193
140
|
{
|
|
194
|
-
|
|
141
|
+
"type": "string"
|
|
195
142
|
}
|
|
196
|
-
|
|
197
|
-
|
|
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"
|
|
198
198
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
}
|
|
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`)."
|
|
24
12
|
},
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
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"
|
|
28
28
|
}
|
|
Binary file
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
"installationSource": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Name of Nx Cloud installation invoker (ex. user, add-nx-to-monorepo, create-nx-workspace, nx-upgrade",
|
|
17
|
-
"default": "user"
|
|
18
|
-
},
|
|
19
|
-
"hideFormatLogs": {
|
|
20
|
-
"type": "boolean",
|
|
21
|
-
"description": "Hide formatting logs",
|
|
22
|
-
"x-priority": "internal"
|
|
23
|
-
},
|
|
24
|
-
"generateToken": {
|
|
25
|
-
"type": "boolean",
|
|
26
|
-
"description": "Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud"
|
|
27
|
-
},
|
|
28
|
-
"github": {
|
|
29
|
-
"type": "boolean",
|
|
30
|
-
"description": "If the user will be using GitHub as their git hosting provider",
|
|
31
|
-
"default": false
|
|
32
|
-
},
|
|
33
|
-
"directory": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"description": "The directory where the workspace is located",
|
|
36
|
-
"x-priority": "internal"
|
|
37
|
-
}
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"id": "NxCloudInit",
|
|
4
|
+
"title": "Add Nx Cloud Configuration to the workspace",
|
|
5
|
+
"description": "Connect a workspace to Nx Cloud.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"cli": "nx",
|
|
8
|
+
"properties": {
|
|
9
|
+
"analytics": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"description": "Anonymously store hashed machine ID for task runs",
|
|
12
|
+
"default": false
|
|
38
13
|
},
|
|
39
|
-
"
|
|
40
|
-
|
|
14
|
+
"installationSource": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Name of Nx Cloud installation invoker (ex. user, add-nx-to-monorepo, create-nx-workspace, nx-upgrade",
|
|
17
|
+
"default": "user"
|
|
18
|
+
},
|
|
19
|
+
"hideFormatLogs": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Hide formatting logs",
|
|
22
|
+
"x-priority": "internal"
|
|
23
|
+
},
|
|
24
|
+
"generateToken": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud"
|
|
27
|
+
},
|
|
28
|
+
"github": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "If the user will be using GitHub as their git hosting provider",
|
|
31
|
+
"default": false
|
|
32
|
+
},
|
|
33
|
+
"directory": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "The directory where the workspace is located",
|
|
36
|
+
"x-priority": "internal"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": []
|
|
41
41
|
}
|
|
@@ -423,7 +423,7 @@ function mapRootSnapshot(packageJson, rootImporters, packages, graph, lockfileVe
|
|
|
423
423
|
let version = packageJson[depType][packageName];
|
|
424
424
|
const manager = (0, catalog_1.getCatalogManager)(workspaceRoot);
|
|
425
425
|
if (manager?.isCatalogReference(version)) {
|
|
426
|
-
version = manager.resolveCatalogReference(packageName, version
|
|
426
|
+
version = manager.resolveCatalogReference(workspaceRoot, packageName, version);
|
|
427
427
|
if (!version) {
|
|
428
428
|
throw new Error(`Could not resolve catalog reference for package ${packageName}@${version}.`);
|
|
429
429
|
}
|
|
@@ -42,7 +42,7 @@ function normalizeDependencies(packageJson, graph, workspacePackages, workspaceR
|
|
|
42
42
|
let resolvedVersionRange = versionRange;
|
|
43
43
|
const manager = (0, catalog_1.getCatalogManager)(workspaceRootPath);
|
|
44
44
|
if (manager?.isCatalogReference(versionRange)) {
|
|
45
|
-
|
|
45
|
+
resolvedVersionRange = manager.resolveCatalogReference(workspaceRootPath, packageName, versionRange);
|
|
46
46
|
if (!resolvedVersionRange) {
|
|
47
47
|
throw new Error(`Could not resolve catalog reference for ${packageName}@${versionRange}.`);
|
|
48
48
|
}
|
|
@@ -71,5 +71,5 @@ export declare function readTargetDefaultsForTarget(targetName: string, targetDe
|
|
|
71
71
|
* @param project The project that the target belongs to
|
|
72
72
|
* @returns The normalized target configuration
|
|
73
73
|
*/
|
|
74
|
-
export declare function normalizeTarget(target: TargetConfiguration, project: ProjectConfiguration, workspaceRoot: string, projectsMap: Record<string, ProjectConfiguration
|
|
74
|
+
export declare function normalizeTarget(target: TargetConfiguration, project: ProjectConfiguration, workspaceRoot: string, projectsMap: Record<string, ProjectConfiguration>, errorMsgKey: string): TargetConfiguration<any>;
|
|
75
75
|
//# sourceMappingURL=project-configuration-utils.d.ts.map
|