@intuned/runtime-dev 1.2.0-cli.7 → 1.2.0-cli.8
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.
|
@@ -183,7 +183,8 @@ async function runDeployProject(projectName, auth) {
|
|
|
183
183
|
const {
|
|
184
184
|
status,
|
|
185
185
|
message,
|
|
186
|
-
projectId
|
|
186
|
+
projectId,
|
|
187
|
+
...rest
|
|
187
188
|
} = await checkIntunedProjectDeployStatus(workspaceId, projectName, apiKey);
|
|
188
189
|
if (status === "pending") {
|
|
189
190
|
const elapsedTime = Date.now() - startTime;
|
|
@@ -201,7 +202,14 @@ async function runDeployProject(projectName, auth) {
|
|
|
201
202
|
(0, _terminal.terminal)(`^+You can check your project on the platform:^s ^c^_${url}/projects/${projectId}/details^:\n`);
|
|
202
203
|
return;
|
|
203
204
|
}
|
|
204
|
-
|
|
205
|
+
let errorMessage = `^r^+An error occurred while deploying project:^:\n^R${message}^:\n`;
|
|
206
|
+
if (rest.reason) {
|
|
207
|
+
errorMessage += `^r^+Reason:^:\n^R${rest.reason}^:\n`;
|
|
208
|
+
}
|
|
209
|
+
errorMessage += `^r^+Project deployment failed^:\n`;
|
|
210
|
+
throw new _helpers.CLIError(errorMessage, {
|
|
211
|
+
autoColor: false
|
|
212
|
+
});
|
|
205
213
|
}
|
|
206
214
|
} catch (e) {
|
|
207
215
|
spinner?.animate(false);
|
|
@@ -338,11 +346,7 @@ const checkIntunedProjectDeployStatus = async (workspaceId, projectName, apiKey)
|
|
|
338
346
|
}
|
|
339
347
|
const data = await response.json();
|
|
340
348
|
if (data.status) {
|
|
341
|
-
return
|
|
342
|
-
status: data.status,
|
|
343
|
-
message: data.message,
|
|
344
|
-
projectId: data.projectId
|
|
345
|
-
};
|
|
349
|
+
return data;
|
|
346
350
|
}
|
|
347
351
|
return {
|
|
348
352
|
status: "failed",
|