@intuned/runtime-dev 1.2.0-cli.7 → 1.2.0-cli.9

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,10 +202,18 @@ 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
- throw new _helpers.CLIError(`^r^+An error occurred while deploying project:^:\n^R${message}^:\n^r^+Project deployment failed^:\n`);
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);
216
+ throw e;
208
217
  }
209
218
  }
210
219
  const projectNameSchema = exports.projectNameSchema = _zod.z.string().min(1, "Project Name is required").max(50, "Name must be 50 characters or less").regex(/^[a-z0-9]+(?:[-_][a-z0-9]+)*$/, "Name can only contain lowercase letters, numbers, hyphens, and underscores in between").refine(value => !_zod.z.string().uuid().safeParse(value).success, {
@@ -338,11 +347,7 @@ const checkIntunedProjectDeployStatus = async (workspaceId, projectName, apiKey)
338
347
  }
339
348
  const data = await response.json();
340
349
  if (data.status) {
341
- return {
342
- status: data.status,
343
- message: data.message,
344
- projectId: data.projectId
345
- };
350
+ return data;
346
351
  }
347
352
  return {
348
353
  status: "failed",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.2.0-cli.7",
3
+ "version": "1.2.0-cli.9",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",