create-nx-workspace 23.3.0-rc.0 → 23.3.0
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.
|
@@ -66,7 +66,7 @@ export interface SuccessResult {
|
|
|
66
66
|
preset?: string;
|
|
67
67
|
};
|
|
68
68
|
/** Display these to the user as next steps */
|
|
69
|
-
userNextSteps
|
|
69
|
+
userNextSteps?: UserNextSteps;
|
|
70
70
|
/** Reference documentation */
|
|
71
71
|
docs: {
|
|
72
72
|
gettingStarted: string;
|
|
@@ -90,7 +90,7 @@ export type AiOutputMessage = ProgressMessage | TemplateRequiredResult | Success
|
|
|
90
90
|
/**
|
|
91
91
|
* Write NDJSON message to stdout.
|
|
92
92
|
* Each message is a single line of JSON.
|
|
93
|
-
* For success results, also outputs plain text instructions
|
|
93
|
+
* For success results with next steps, also outputs plain text instructions.
|
|
94
94
|
*/
|
|
95
95
|
export declare function writeAiOutput(message: AiOutputMessage): void;
|
|
96
96
|
/**
|
|
@@ -86,7 +86,7 @@ function detectAiAgentName() {
|
|
|
86
86
|
/**
|
|
87
87
|
* Write NDJSON message to stdout.
|
|
88
88
|
* Each message is a single line of JSON.
|
|
89
|
-
* For success results, also outputs plain text instructions
|
|
89
|
+
* For success results with next steps, also outputs plain text instructions.
|
|
90
90
|
*/
|
|
91
91
|
function writeAiOutput(message) {
|
|
92
92
|
if (isAiAgent()) {
|
|
@@ -96,7 +96,10 @@ function writeAiOutput(message) {
|
|
|
96
96
|
'success' in message &&
|
|
97
97
|
message.success) {
|
|
98
98
|
const successMsg = message;
|
|
99
|
-
const steps = successMsg.userNextSteps
|
|
99
|
+
const steps = successMsg.userNextSteps?.steps;
|
|
100
|
+
if (!steps?.length) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
100
103
|
let plainText = '\n---USER_NEXT_STEPS---\n';
|
|
101
104
|
plainText +=
|
|
102
105
|
'[DISPLAY] Show the user these next steps to complete setup:\n\n';
|
|
@@ -188,20 +191,21 @@ function buildSuccessResult(options) {
|
|
|
188
191
|
note: 'Complete setup to enable remote caching and CI insights',
|
|
189
192
|
});
|
|
190
193
|
}
|
|
191
|
-
const userNextSteps = {
|
|
192
|
-
description: 'CRITICAL: Show the user these exact steps to complete setup.',
|
|
193
|
-
steps,
|
|
194
|
-
};
|
|
195
194
|
const successResult = {
|
|
196
195
|
stage: 'complete',
|
|
197
196
|
success: true,
|
|
198
197
|
result: resultData,
|
|
199
|
-
userNextSteps,
|
|
200
198
|
docs: {
|
|
201
199
|
gettingStarted: 'https://nx.dev/getting-started/intro',
|
|
202
200
|
nxCloud: 'https://nx.dev/ci/intro/why-nx-cloud',
|
|
203
201
|
},
|
|
204
202
|
};
|
|
203
|
+
if (steps.length > 0) {
|
|
204
|
+
successResult.userNextSteps = {
|
|
205
|
+
description: 'CRITICAL: Show the user these exact steps to complete setup.',
|
|
206
|
+
steps,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
205
209
|
if (nxCloudError) {
|
|
206
210
|
successResult.nxCloudError = nxCloudError;
|
|
207
211
|
}
|