nx 22.0.1 → 22.1.0-canary.20251023-59cf495
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 +11 -14
- package/presets/npm.json +4 -4
- package/schemas/nx-schema.json +1286 -1286
- 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/ai-agent-prompts.d.ts.map +1 -1
- package/src/command-line/init/ai-agent-prompts.js +12 -11
- package/src/command-line/release/config/config.d.ts +1 -1
- package/src/command-line/release/config/config.d.ts.map +1 -1
- package/src/command-line/release/config/config.js +39 -0
- package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
- package/src/command-line/release/version/release-group-processor.js +3 -2
- package/src/config/nx-json.d.ts +2 -0
- package/src/config/nx-json.d.ts.map +1 -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/nx-cloud/generators/connect-to-nx-cloud/schema.json +38 -38
- package/src/tasks-runner/cache.d.ts.map +1 -1
- package/src/tasks-runner/cache.js +27 -14
|
@@ -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
|
-
"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
|
-
|
|
104
|
-
|
|
105
|
-
"items": {
|
|
106
|
-
"type": "string"
|
|
107
|
-
},
|
|
108
|
-
"x-priority": "important"
|
|
14
|
+
"name": "Custom done conditions",
|
|
15
|
+
"keys": ["commands", "readyWhen"]
|
|
109
16
|
},
|
|
110
17
|
{
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
"
|
|
133
|
-
|
|
188
|
+
"additionalProperties": true,
|
|
189
|
+
"oneOf": [
|
|
134
190
|
{
|
|
135
|
-
|
|
136
|
-
"items": {
|
|
137
|
-
"type": "string"
|
|
138
|
-
}
|
|
191
|
+
"required": ["commands"]
|
|
139
192
|
},
|
|
140
193
|
{
|
|
141
|
-
|
|
194
|
+
"required": ["command"]
|
|
142
195
|
}
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
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
|
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
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
|
+
}
|
|
13
38
|
},
|
|
14
|
-
"
|
|
15
|
-
|
|
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": []
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": []
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/cache.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,WAAW,EAEZ,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAW5C,OAAO,EAAE,mBAAmB,EAAc,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/cache.ts"],"names":[],"mappings":"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"}
|
|
@@ -138,23 +138,36 @@ class DbCache {
|
|
|
138
138
|
const nxJson = (0, nx_json_1.readNxJson)();
|
|
139
139
|
if ((0, nx_cloud_utils_1.isNxCloudUsed)(nxJson)) {
|
|
140
140
|
const options = (0, get_cloud_options_1.getCloudOptions)();
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
try {
|
|
142
|
+
const { nxCloudClient } = await (0, update_manager_1.verifyOrUpdateNxCloudClient)(options);
|
|
143
|
+
if (nxCloudClient.getRemoteCache) {
|
|
144
|
+
return nxCloudClient.getRemoteCache();
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
// old nx cloud instance
|
|
148
|
+
return await default_tasks_runner_1.RemoteCacheV2.fromCacheV1(this.options.nxCloudRemoteCache);
|
|
149
|
+
}
|
|
144
150
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
151
|
+
catch (e) {
|
|
152
|
+
if (e instanceof update_manager_1.NxCloudClientUnavailableError) {
|
|
153
|
+
output_1.output.warn({
|
|
154
|
+
title: 'No existing Nx Cloud client and failed to download new version.',
|
|
155
|
+
bodyLines: [
|
|
156
|
+
'Nx will continue running, but nothing will be written or read from the remote cache.',
|
|
157
|
+
],
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
throw e;
|
|
162
|
+
}
|
|
148
163
|
}
|
|
149
164
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
null);
|
|
157
|
-
}
|
|
165
|
+
return ((await this.getS3Cache()) ??
|
|
166
|
+
(await this.getSharedCache()) ??
|
|
167
|
+
(await this.getGcsCache()) ??
|
|
168
|
+
(await this.getAzureCache()) ??
|
|
169
|
+
this.getHttpCache() ??
|
|
170
|
+
null);
|
|
158
171
|
}
|
|
159
172
|
async getS3Cache() {
|
|
160
173
|
const cache = await this.resolveRemoteCache('@nx/s3-cache');
|