nx 19.7.0-beta.4 → 19.7.0-beta.6
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +12 -12
- package/src/command-line/login/command-object.js +1 -1
- package/src/command-line/logout/command-object.js +1 -1
- package/src/core/graph/main.js +1 -1
- package/src/migrations/update-15-0-0/prefix-outputs.js +3 -18
- package/src/native/index.d.ts +4 -0
- package/src/native/native-bindings.js +2 -0
- package/src/native/nx.wasi-browser.js +53 -49
- package/src/native/nx.wasi.cjs +53 -49
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +6 -41
- package/src/tasks-runner/utils.d.ts +1 -8
- package/src/tasks-runner/utils.js +9 -12
@@ -18,12 +18,7 @@ async function default_1(tree) {
|
|
18
18
|
if (!target.outputs) {
|
19
19
|
continue;
|
20
20
|
}
|
21
|
-
|
22
|
-
(0, utils_1.validateOutputs)(target.outputs);
|
23
|
-
}
|
24
|
-
catch (e) {
|
25
|
-
target.outputs = (0, utils_1.transformLegacyOutputs)(project.root, e);
|
26
|
-
}
|
21
|
+
target.outputs = (0, utils_1.transformLegacyOutputs)(project.root, target.outputs);
|
27
22
|
}
|
28
23
|
try {
|
29
24
|
(0, project_configuration_1.updateProjectConfiguration)(tree, projectName, project);
|
@@ -33,12 +28,7 @@ async function default_1(tree) {
|
|
33
28
|
(0, json_1.updateJson)(tree, (0, path_1.join)(project.root, 'package.json'), (json) => {
|
34
29
|
for (const target of Object.values(json.nx?.targets ?? {})) {
|
35
30
|
if (target.outputs) {
|
36
|
-
|
37
|
-
(0, utils_1.validateOutputs)(target.outputs);
|
38
|
-
}
|
39
|
-
catch (e) {
|
40
|
-
target.outputs = (0, utils_1.transformLegacyOutputs)(project.root, e);
|
41
|
-
}
|
31
|
+
target.outputs = (0, utils_1.transformLegacyOutputs)(project.root, target.outputs);
|
42
32
|
}
|
43
33
|
}
|
44
34
|
return json;
|
@@ -51,12 +41,7 @@ async function default_1(tree) {
|
|
51
41
|
if (!target.outputs) {
|
52
42
|
continue;
|
53
43
|
}
|
54
|
-
|
55
|
-
(0, utils_1.validateOutputs)(target.outputs);
|
56
|
-
}
|
57
|
-
catch (e) {
|
58
|
-
target.outputs = (0, utils_1.transformLegacyOutputs)('{projectRoot}', e);
|
59
|
-
}
|
44
|
+
target.outputs = (0, utils_1.transformLegacyOutputs)('{projectRoot}', target.outputs);
|
60
45
|
}
|
61
46
|
(0, nx_json_1.updateNxJson)(tree, nxJson);
|
62
47
|
}
|
package/src/native/index.d.ts
CHANGED
@@ -150,6 +150,8 @@ export declare export function getBinaryTarget(): string
|
|
150
150
|
*/
|
151
151
|
export declare export function getFilesForOutputs(directory: string, entries: Array<string>): Array<string>
|
152
152
|
|
153
|
+
export declare export function getTransformableOutputs(outputs: Array<string>): Array<string>
|
154
|
+
|
153
155
|
export declare export function hashArray(input: Array<string>): string
|
154
156
|
|
155
157
|
export interface HashDetails {
|
@@ -263,6 +265,8 @@ export interface UpdatedWorkspaceFiles {
|
|
263
265
|
externalReferences: NxWorkspaceFilesExternals
|
264
266
|
}
|
265
267
|
|
268
|
+
export declare export function validateOutputs(outputs: Array<string>): void
|
269
|
+
|
266
270
|
export interface WatchEvent {
|
267
271
|
path: string
|
268
272
|
type: EventType
|
@@ -378,10 +378,12 @@ module.exports.expandOutputs = nativeBinding.expandOutputs
|
|
378
378
|
module.exports.findImports = nativeBinding.findImports
|
379
379
|
module.exports.getBinaryTarget = nativeBinding.getBinaryTarget
|
380
380
|
module.exports.getFilesForOutputs = nativeBinding.getFilesForOutputs
|
381
|
+
module.exports.getTransformableOutputs = nativeBinding.getTransformableOutputs
|
381
382
|
module.exports.hashArray = nativeBinding.hashArray
|
382
383
|
module.exports.hashFile = nativeBinding.hashFile
|
383
384
|
module.exports.IS_WASM = nativeBinding.IS_WASM
|
384
385
|
module.exports.remove = nativeBinding.remove
|
385
386
|
module.exports.testOnlyTransferFileMap = nativeBinding.testOnlyTransferFileMap
|
386
387
|
module.exports.transferProjectGraph = nativeBinding.transferProjectGraph
|
388
|
+
module.exports.validateOutputs = nativeBinding.validateOutputs
|
387
389
|
module.exports.WorkspaceErrors = nativeBinding.WorkspaceErrors
|
@@ -51,55 +51,57 @@ const {
|
|
51
51
|
})
|
52
52
|
|
53
53
|
function __napi_rs_initialize_modules(__napiInstance) {
|
54
|
-
__napiInstance.exports['
|
55
|
-
__napiInstance.exports['
|
56
|
-
__napiInstance.exports['
|
57
|
-
__napiInstance.exports['
|
58
|
-
__napiInstance.exports['
|
59
|
-
__napiInstance.exports['
|
60
|
-
__napiInstance.exports['
|
61
|
-
__napiInstance.exports['
|
62
|
-
__napiInstance.exports['
|
63
|
-
__napiInstance.exports['
|
64
|
-
__napiInstance.exports['
|
65
|
-
__napiInstance.exports['
|
66
|
-
__napiInstance.exports['
|
67
|
-
__napiInstance.exports['
|
68
|
-
__napiInstance.exports['
|
69
|
-
__napiInstance.exports['
|
70
|
-
__napiInstance.exports['
|
71
|
-
__napiInstance.exports['
|
72
|
-
__napiInstance.exports['
|
73
|
-
__napiInstance.exports['
|
74
|
-
__napiInstance.exports['
|
75
|
-
__napiInstance.exports['
|
76
|
-
__napiInstance.exports['
|
77
|
-
__napiInstance.exports['
|
78
|
-
__napiInstance.exports['
|
79
|
-
__napiInstance.exports['
|
80
|
-
__napiInstance.exports['
|
81
|
-
__napiInstance.exports['
|
82
|
-
__napiInstance.exports['
|
83
|
-
__napiInstance.exports['
|
84
|
-
__napiInstance.exports['
|
85
|
-
__napiInstance.exports['
|
86
|
-
__napiInstance.exports['
|
87
|
-
__napiInstance.exports['
|
88
|
-
__napiInstance.exports['
|
89
|
-
__napiInstance.exports['
|
90
|
-
__napiInstance.exports['
|
91
|
-
__napiInstance.exports['
|
92
|
-
__napiInstance.exports['
|
93
|
-
__napiInstance.exports['
|
94
|
-
__napiInstance.exports['
|
95
|
-
__napiInstance.exports['
|
96
|
-
__napiInstance.exports['
|
97
|
-
__napiInstance.exports['
|
98
|
-
__napiInstance.exports['
|
99
|
-
__napiInstance.exports['
|
100
|
-
__napiInstance.exports['
|
101
|
-
__napiInstance.exports['
|
102
|
-
__napiInstance.exports['
|
54
|
+
__napiInstance.exports['__napi_register__CachedResult_struct_0']?.()
|
55
|
+
__napiInstance.exports['__napi_register__NxCache_struct_1']?.()
|
56
|
+
__napiInstance.exports['__napi_register__NxCache_impl_9']?.()
|
57
|
+
__napiInstance.exports['__napi_register__expand_outputs_10']?.()
|
58
|
+
__napiInstance.exports['__napi_register__get_files_for_outputs_11']?.()
|
59
|
+
__napiInstance.exports['__napi_register__remove_12']?.()
|
60
|
+
__napiInstance.exports['__napi_register__copy_13']?.()
|
61
|
+
__napiInstance.exports['__napi_register__validate_outputs_14']?.()
|
62
|
+
__napiInstance.exports['__napi_register__get_transformable_outputs_15']?.()
|
63
|
+
__napiInstance.exports['__napi_register__hash_array_16']?.()
|
64
|
+
__napiInstance.exports['__napi_register__hash_file_17']?.()
|
65
|
+
__napiInstance.exports['__napi_register__IS_WASM_18']?.()
|
66
|
+
__napiInstance.exports['__napi_register__get_binary_target_19']?.()
|
67
|
+
__napiInstance.exports['__napi_register__ImportResult_struct_20']?.()
|
68
|
+
__napiInstance.exports['__napi_register__find_imports_21']?.()
|
69
|
+
__napiInstance.exports['__napi_register__transfer_project_graph_22']?.()
|
70
|
+
__napiInstance.exports['__napi_register__ExternalNode_struct_23']?.()
|
71
|
+
__napiInstance.exports['__napi_register__Target_struct_24']?.()
|
72
|
+
__napiInstance.exports['__napi_register__Project_struct_25']?.()
|
73
|
+
__napiInstance.exports['__napi_register__ProjectGraph_struct_26']?.()
|
74
|
+
__napiInstance.exports['__napi_register__HashedTask_struct_27']?.()
|
75
|
+
__napiInstance.exports['__napi_register__TaskDetails_struct_28']?.()
|
76
|
+
__napiInstance.exports['__napi_register__TaskDetails_impl_31']?.()
|
77
|
+
__napiInstance.exports['__napi_register__HashPlanner_struct_32']?.()
|
78
|
+
__napiInstance.exports['__napi_register__HashPlanner_impl_36']?.()
|
79
|
+
__napiInstance.exports['__napi_register__HashDetails_struct_37']?.()
|
80
|
+
__napiInstance.exports['__napi_register__HasherOptions_struct_38']?.()
|
81
|
+
__napiInstance.exports['__napi_register__TaskHasher_struct_39']?.()
|
82
|
+
__napiInstance.exports['__napi_register__TaskHasher_impl_42']?.()
|
83
|
+
__napiInstance.exports['__napi_register__TaskRun_struct_43']?.()
|
84
|
+
__napiInstance.exports['__napi_register__NxTaskHistory_struct_44']?.()
|
85
|
+
__napiInstance.exports['__napi_register__NxTaskHistory_impl_48']?.()
|
86
|
+
__napiInstance.exports['__napi_register__Task_struct_49']?.()
|
87
|
+
__napiInstance.exports['__napi_register__TaskTarget_struct_50']?.()
|
88
|
+
__napiInstance.exports['__napi_register__TaskGraph_struct_51']?.()
|
89
|
+
__napiInstance.exports['__napi_register__FileData_struct_52']?.()
|
90
|
+
__napiInstance.exports['__napi_register__InputsInput_struct_53']?.()
|
91
|
+
__napiInstance.exports['__napi_register__FileSetInput_struct_54']?.()
|
92
|
+
__napiInstance.exports['__napi_register__RuntimeInput_struct_55']?.()
|
93
|
+
__napiInstance.exports['__napi_register__EnvironmentInput_struct_56']?.()
|
94
|
+
__napiInstance.exports['__napi_register__ExternalDependenciesInput_struct_57']?.()
|
95
|
+
__napiInstance.exports['__napi_register__DepsOutputsInput_struct_58']?.()
|
96
|
+
__napiInstance.exports['__napi_register__NxJson_struct_59']?.()
|
97
|
+
__napiInstance.exports['__napi_register__WorkspaceContext_struct_60']?.()
|
98
|
+
__napiInstance.exports['__napi_register__WorkspaceContext_impl_69']?.()
|
99
|
+
__napiInstance.exports['__napi_register__WorkspaceErrors_70']?.()
|
100
|
+
__napiInstance.exports['__napi_register__NxWorkspaceFiles_struct_71']?.()
|
101
|
+
__napiInstance.exports['__napi_register__NxWorkspaceFilesExternals_struct_72']?.()
|
102
|
+
__napiInstance.exports['__napi_register__UpdatedWorkspaceFiles_struct_73']?.()
|
103
|
+
__napiInstance.exports['__napi_register__FileMap_struct_74']?.()
|
104
|
+
__napiInstance.exports['__napi_register____test_only_transfer_file_map_75']?.()
|
103
105
|
}
|
104
106
|
export const HashPlanner = __napiModule.exports.HashPlanner
|
105
107
|
export const ImportResult = __napiModule.exports.ImportResult
|
@@ -113,10 +115,12 @@ export const expandOutputs = __napiModule.exports.expandOutputs
|
|
113
115
|
export const findImports = __napiModule.exports.findImports
|
114
116
|
export const getBinaryTarget = __napiModule.exports.getBinaryTarget
|
115
117
|
export const getFilesForOutputs = __napiModule.exports.getFilesForOutputs
|
118
|
+
export const getTransformableOutputs = __napiModule.exports.getTransformableOutputs
|
116
119
|
export const hashArray = __napiModule.exports.hashArray
|
117
120
|
export const hashFile = __napiModule.exports.hashFile
|
118
121
|
export const IS_WASM = __napiModule.exports.IS_WASM
|
119
122
|
export const remove = __napiModule.exports.remove
|
120
123
|
export const testOnlyTransferFileMap = __napiModule.exports.testOnlyTransferFileMap
|
121
124
|
export const transferProjectGraph = __napiModule.exports.transferProjectGraph
|
125
|
+
export const validateOutputs = __napiModule.exports.validateOutputs
|
122
126
|
export const WorkspaceErrors = __napiModule.exports.WorkspaceErrors
|
package/src/native/nx.wasi.cjs
CHANGED
@@ -82,55 +82,57 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule
|
|
82
82
|
})
|
83
83
|
|
84
84
|
function __napi_rs_initialize_modules(__napiInstance) {
|
85
|
-
__napiInstance.exports['
|
86
|
-
__napiInstance.exports['
|
87
|
-
__napiInstance.exports['
|
88
|
-
__napiInstance.exports['
|
89
|
-
__napiInstance.exports['
|
90
|
-
__napiInstance.exports['
|
91
|
-
__napiInstance.exports['
|
92
|
-
__napiInstance.exports['
|
93
|
-
__napiInstance.exports['
|
94
|
-
__napiInstance.exports['
|
95
|
-
__napiInstance.exports['
|
96
|
-
__napiInstance.exports['
|
97
|
-
__napiInstance.exports['
|
98
|
-
__napiInstance.exports['
|
99
|
-
__napiInstance.exports['
|
100
|
-
__napiInstance.exports['
|
101
|
-
__napiInstance.exports['
|
102
|
-
__napiInstance.exports['
|
103
|
-
__napiInstance.exports['
|
104
|
-
__napiInstance.exports['
|
105
|
-
__napiInstance.exports['
|
106
|
-
__napiInstance.exports['
|
107
|
-
__napiInstance.exports['
|
108
|
-
__napiInstance.exports['
|
109
|
-
__napiInstance.exports['
|
110
|
-
__napiInstance.exports['
|
111
|
-
__napiInstance.exports['
|
112
|
-
__napiInstance.exports['
|
113
|
-
__napiInstance.exports['
|
114
|
-
__napiInstance.exports['
|
115
|
-
__napiInstance.exports['
|
116
|
-
__napiInstance.exports['
|
117
|
-
__napiInstance.exports['
|
118
|
-
__napiInstance.exports['
|
119
|
-
__napiInstance.exports['
|
120
|
-
__napiInstance.exports['
|
121
|
-
__napiInstance.exports['
|
122
|
-
__napiInstance.exports['
|
123
|
-
__napiInstance.exports['
|
124
|
-
__napiInstance.exports['
|
125
|
-
__napiInstance.exports['
|
126
|
-
__napiInstance.exports['
|
127
|
-
__napiInstance.exports['
|
128
|
-
__napiInstance.exports['
|
129
|
-
__napiInstance.exports['
|
130
|
-
__napiInstance.exports['
|
131
|
-
__napiInstance.exports['
|
132
|
-
__napiInstance.exports['
|
133
|
-
__napiInstance.exports['
|
85
|
+
__napiInstance.exports['__napi_register__CachedResult_struct_0']?.()
|
86
|
+
__napiInstance.exports['__napi_register__NxCache_struct_1']?.()
|
87
|
+
__napiInstance.exports['__napi_register__NxCache_impl_9']?.()
|
88
|
+
__napiInstance.exports['__napi_register__expand_outputs_10']?.()
|
89
|
+
__napiInstance.exports['__napi_register__get_files_for_outputs_11']?.()
|
90
|
+
__napiInstance.exports['__napi_register__remove_12']?.()
|
91
|
+
__napiInstance.exports['__napi_register__copy_13']?.()
|
92
|
+
__napiInstance.exports['__napi_register__validate_outputs_14']?.()
|
93
|
+
__napiInstance.exports['__napi_register__get_transformable_outputs_15']?.()
|
94
|
+
__napiInstance.exports['__napi_register__hash_array_16']?.()
|
95
|
+
__napiInstance.exports['__napi_register__hash_file_17']?.()
|
96
|
+
__napiInstance.exports['__napi_register__IS_WASM_18']?.()
|
97
|
+
__napiInstance.exports['__napi_register__get_binary_target_19']?.()
|
98
|
+
__napiInstance.exports['__napi_register__ImportResult_struct_20']?.()
|
99
|
+
__napiInstance.exports['__napi_register__find_imports_21']?.()
|
100
|
+
__napiInstance.exports['__napi_register__transfer_project_graph_22']?.()
|
101
|
+
__napiInstance.exports['__napi_register__ExternalNode_struct_23']?.()
|
102
|
+
__napiInstance.exports['__napi_register__Target_struct_24']?.()
|
103
|
+
__napiInstance.exports['__napi_register__Project_struct_25']?.()
|
104
|
+
__napiInstance.exports['__napi_register__ProjectGraph_struct_26']?.()
|
105
|
+
__napiInstance.exports['__napi_register__HashedTask_struct_27']?.()
|
106
|
+
__napiInstance.exports['__napi_register__TaskDetails_struct_28']?.()
|
107
|
+
__napiInstance.exports['__napi_register__TaskDetails_impl_31']?.()
|
108
|
+
__napiInstance.exports['__napi_register__HashPlanner_struct_32']?.()
|
109
|
+
__napiInstance.exports['__napi_register__HashPlanner_impl_36']?.()
|
110
|
+
__napiInstance.exports['__napi_register__HashDetails_struct_37']?.()
|
111
|
+
__napiInstance.exports['__napi_register__HasherOptions_struct_38']?.()
|
112
|
+
__napiInstance.exports['__napi_register__TaskHasher_struct_39']?.()
|
113
|
+
__napiInstance.exports['__napi_register__TaskHasher_impl_42']?.()
|
114
|
+
__napiInstance.exports['__napi_register__TaskRun_struct_43']?.()
|
115
|
+
__napiInstance.exports['__napi_register__NxTaskHistory_struct_44']?.()
|
116
|
+
__napiInstance.exports['__napi_register__NxTaskHistory_impl_48']?.()
|
117
|
+
__napiInstance.exports['__napi_register__Task_struct_49']?.()
|
118
|
+
__napiInstance.exports['__napi_register__TaskTarget_struct_50']?.()
|
119
|
+
__napiInstance.exports['__napi_register__TaskGraph_struct_51']?.()
|
120
|
+
__napiInstance.exports['__napi_register__FileData_struct_52']?.()
|
121
|
+
__napiInstance.exports['__napi_register__InputsInput_struct_53']?.()
|
122
|
+
__napiInstance.exports['__napi_register__FileSetInput_struct_54']?.()
|
123
|
+
__napiInstance.exports['__napi_register__RuntimeInput_struct_55']?.()
|
124
|
+
__napiInstance.exports['__napi_register__EnvironmentInput_struct_56']?.()
|
125
|
+
__napiInstance.exports['__napi_register__ExternalDependenciesInput_struct_57']?.()
|
126
|
+
__napiInstance.exports['__napi_register__DepsOutputsInput_struct_58']?.()
|
127
|
+
__napiInstance.exports['__napi_register__NxJson_struct_59']?.()
|
128
|
+
__napiInstance.exports['__napi_register__WorkspaceContext_struct_60']?.()
|
129
|
+
__napiInstance.exports['__napi_register__WorkspaceContext_impl_69']?.()
|
130
|
+
__napiInstance.exports['__napi_register__WorkspaceErrors_70']?.()
|
131
|
+
__napiInstance.exports['__napi_register__NxWorkspaceFiles_struct_71']?.()
|
132
|
+
__napiInstance.exports['__napi_register__NxWorkspaceFilesExternals_struct_72']?.()
|
133
|
+
__napiInstance.exports['__napi_register__UpdatedWorkspaceFiles_struct_73']?.()
|
134
|
+
__napiInstance.exports['__napi_register__FileMap_struct_74']?.()
|
135
|
+
__napiInstance.exports['__napi_register____test_only_transfer_file_map_75']?.()
|
134
136
|
}
|
135
137
|
module.exports.HashPlanner = __napiModule.exports.HashPlanner
|
136
138
|
module.exports.ImportResult = __napiModule.exports.ImportResult
|
@@ -144,10 +146,12 @@ module.exports.expandOutputs = __napiModule.exports.expandOutputs
|
|
144
146
|
module.exports.findImports = __napiModule.exports.findImports
|
145
147
|
module.exports.getBinaryTarget = __napiModule.exports.getBinaryTarget
|
146
148
|
module.exports.getFilesForOutputs = __napiModule.exports.getFilesForOutputs
|
149
|
+
module.exports.getTransformableOutputs = __napiModule.exports.getTransformableOutputs
|
147
150
|
module.exports.hashArray = __napiModule.exports.hashArray
|
148
151
|
module.exports.hashFile = __napiModule.exports.hashFile
|
149
152
|
module.exports.IS_WASM = __napiModule.exports.IS_WASM
|
150
153
|
module.exports.remove = __napiModule.exports.remove
|
151
154
|
module.exports.testOnlyTransferFileMap = __napiModule.exports.testOnlyTransferFileMap
|
152
155
|
module.exports.transferProjectGraph = __napiModule.exports.transferProjectGraph
|
156
|
+
module.exports.validateOutputs = __napiModule.exports.validateOutputs
|
153
157
|
module.exports.WorkspaceErrors = __napiModule.exports.WorkspaceErrors
|
Binary file
|
@@ -42,18 +42,6 @@ function getNxInitDate() {
|
|
42
42
|
return null;
|
43
43
|
}
|
44
44
|
}
|
45
|
-
async function createNxCloudWorkspaceV1(workspaceName, installationSource, nxInitDate) {
|
46
|
-
const apiUrl = (0, get_cloud_options_1.getCloudUrl)();
|
47
|
-
const response = await require('axios').post(`${apiUrl}/nx-cloud/create-org-and-workspace`, {
|
48
|
-
workspaceName,
|
49
|
-
installationSource,
|
50
|
-
nxInitDate,
|
51
|
-
});
|
52
|
-
if (response.data.message) {
|
53
|
-
throw new Error(response.data.message);
|
54
|
-
}
|
55
|
-
return response.data;
|
56
|
-
}
|
57
45
|
async function createNxCloudWorkspaceV2(workspaceName, installationSource, nxInitDate) {
|
58
46
|
const apiUrl = (0, get_cloud_options_1.getCloudUrl)();
|
59
47
|
const response = await require('axios').post(`${apiUrl}/nx-cloud/v2/create-org-and-workspace`, {
|
@@ -81,19 +69,6 @@ async function printSuccessMessage(token, installationSource, usesGithub) {
|
|
81
69
|
});
|
82
70
|
return connectCloudUrl;
|
83
71
|
}
|
84
|
-
function addNxCloudOptionsToNxJson(tree, token, directory = '') {
|
85
|
-
const nxJsonPath = (0, path_1.join)(directory, 'nx.json');
|
86
|
-
if (tree.exists(nxJsonPath)) {
|
87
|
-
(0, json_1.updateJson)(tree, (0, path_1.join)(directory, 'nx.json'), (nxJson) => {
|
88
|
-
const overrideUrl = process.env.NX_CLOUD_API || process.env.NRWL_API;
|
89
|
-
if (overrideUrl) {
|
90
|
-
nxJson.nxCloudUrl = overrideUrl;
|
91
|
-
}
|
92
|
-
nxJson.nxCloudAccessToken = token;
|
93
|
-
return nxJson;
|
94
|
-
});
|
95
|
-
}
|
96
|
-
}
|
97
72
|
function addNxCloudIdToNxJson(tree, nxCloudId, directory = '') {
|
98
73
|
const nxJsonPath = (0, path_1.join)(directory, 'nx.json');
|
99
74
|
if (tree.exists(nxJsonPath)) {
|
@@ -124,22 +99,12 @@ async function connectToNxCloud(tree, schema, nxJson = (0, nx_json_1.readNxJson)
|
|
124
99
|
isGitHubDetected &&
|
125
100
|
schema.installationSource === 'nx-connect')
|
126
101
|
return null;
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
return responseFromCreateNxCloudWorkspaceV2.nxCloudId;
|
134
|
-
}
|
135
|
-
else {
|
136
|
-
responseFromCreateNxCloudWorkspaceV1 = await createNxCloudWorkspaceV1(getRootPackageName(tree), schema.installationSource, getNxInitDate());
|
137
|
-
addNxCloudOptionsToNxJson(tree, responseFromCreateNxCloudWorkspaceV1?.token, schema.directory);
|
138
|
-
await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree, {
|
139
|
-
silent: schema.hideFormatLogs,
|
140
|
-
});
|
141
|
-
return responseFromCreateNxCloudWorkspaceV1.token;
|
142
|
-
}
|
102
|
+
responseFromCreateNxCloudWorkspaceV2 = await createNxCloudWorkspaceV2(getRootPackageName(tree), schema.installationSource, getNxInitDate());
|
103
|
+
addNxCloudIdToNxJson(tree, responseFromCreateNxCloudWorkspaceV2?.nxCloudId, schema.directory);
|
104
|
+
await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree, {
|
105
|
+
silent: schema.hideFormatLogs,
|
106
|
+
});
|
107
|
+
return responseFromCreateNxCloudWorkspaceV2.nxCloudId;
|
143
108
|
}
|
144
109
|
async function connectToNxCloudGenerator(tree, options) {
|
145
110
|
await connectToNxCloud(tree, options);
|
@@ -21,14 +21,8 @@ export declare function getOutputs(p: Record<string, ProjectGraphProjectNode>, t
|
|
21
21
|
export declare function normalizeTargetDependencyWithStringProjects(dependencyConfig: TargetDependencyConfig): Omit<TargetDependencyConfig, 'projects'> & {
|
22
22
|
projects: string[];
|
23
23
|
};
|
24
|
-
declare class InvalidOutputsError extends Error {
|
25
|
-
outputs: string[];
|
26
|
-
invalidOutputs: Set<string>;
|
27
|
-
constructor(outputs: string[], invalidOutputs: Set<string>);
|
28
|
-
private static createMessage;
|
29
|
-
}
|
30
24
|
export declare function validateOutputs(outputs: string[]): void;
|
31
|
-
export declare function transformLegacyOutputs(projectRoot: string,
|
25
|
+
export declare function transformLegacyOutputs(projectRoot: string, outputs: string[]): string[];
|
32
26
|
/**
|
33
27
|
* @deprecated Pass the target and overrides instead. This will be removed in v20.
|
34
28
|
*/
|
@@ -61,4 +55,3 @@ export declare function isCacheableTask(task: Task, options: {
|
|
61
55
|
cacheableTargets?: string[] | null;
|
62
56
|
}): boolean;
|
63
57
|
export declare function unparse(options: Object): string[];
|
64
|
-
export {};
|
@@ -37,6 +37,7 @@ const project_graph_1 = require("../project-graph/project-graph");
|
|
37
37
|
const find_matching_projects_1 = require("../utils/find-matching-projects");
|
38
38
|
const minimatch_1 = require("minimatch");
|
39
39
|
const globs_1 = require("../utils/globs");
|
40
|
+
const native_1 = require("../native");
|
40
41
|
function getDependencyConfigs({ project, target }, extraTargetDependencies, projectGraph, allTargetNames) {
|
41
42
|
const dependencyConfigs = (projectGraph.nodes[project].data?.targets[target]?.dependsOn ??
|
42
43
|
// This is passed into `run-command` from programmatic invocations
|
@@ -177,19 +178,15 @@ function assertOutputsAreValidType(outputs) {
|
|
177
178
|
}
|
178
179
|
function validateOutputs(outputs) {
|
179
180
|
assertOutputsAreValidType(outputs);
|
180
|
-
|
181
|
-
for (const output of outputs) {
|
182
|
-
if (!/^!?{[\s\S]+}/.test(output)) {
|
183
|
-
invalidOutputs.add(output);
|
184
|
-
}
|
185
|
-
}
|
186
|
-
if (invalidOutputs.size > 0) {
|
187
|
-
throw new InvalidOutputsError(outputs, invalidOutputs);
|
188
|
-
}
|
181
|
+
(0, native_1.validateOutputs)(outputs);
|
189
182
|
}
|
190
|
-
function transformLegacyOutputs(projectRoot,
|
191
|
-
|
192
|
-
|
183
|
+
function transformLegacyOutputs(projectRoot, outputs) {
|
184
|
+
const transformableOutputs = new Set((0, native_1.getTransformableOutputs)(outputs));
|
185
|
+
if (transformableOutputs.size === 0) {
|
186
|
+
return outputs;
|
187
|
+
}
|
188
|
+
return outputs.map((output) => {
|
189
|
+
if (!transformableOutputs.has(output)) {
|
193
190
|
return output;
|
194
191
|
}
|
195
192
|
let [isNegated, outputPath] = output.startsWith('!')
|