@embeddable.com/sdk-core 3.12.0-next.0 → 3.12.0-next.1

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/lib/validate.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare const _default: (ctx: any, exitIfInvalid?: boolean) => Promise<boolean>;
1
+ declare const _default: (ctx: any) => Promise<boolean>;
2
2
  export default _default;
3
3
  export declare function dataModelsValidation(filesList: [string, string][]): Promise<string[]>;
4
4
  export declare function securityContextValidation(filesList: [string, string][]): Promise<string[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embeddable.com/sdk-core",
3
- "version": "3.12.0-next.0",
3
+ "version": "3.12.0-next.1",
4
4
  "description": "Core Embeddable SDK module responsible for web-components bundling and publishing.",
5
5
  "keywords": [
6
6
  "embeddable",
package/src/dev.ts CHANGED
@@ -215,6 +215,7 @@ export default async () => {
215
215
  });
216
216
  } catch (error: any) {
217
217
  await logError({ command: "dev", breadcrumbs, error });
218
+ console.log(error);
218
219
  process.exit(1);
219
220
  }
220
221
  };
@@ -309,7 +310,7 @@ const globalCssWatcher = (ctx: any): FSWatcher => {
309
310
 
310
311
  const sendDataModelsAndContextsChanges = async (ctx: any) => {
311
312
  sendMessage("dataModelsAndOrSecurityContextUpdateStart");
312
- const isValid = await validate(ctx, false);
313
+ const isValid = await validate(ctx);
313
314
  if (isValid) {
314
315
  const token = await getToken();
315
316
  const sending = ora(
package/src/logger.ts CHANGED
@@ -96,9 +96,7 @@ async function rotateLogIfNeeded() {
96
96
  function setupGlobalErrorHandlers(command: string) {
97
97
  process.on("uncaughtException", async (error) => {
98
98
  await logError({ command, breadcrumbs: ["uncaughtException"], error });
99
- console.error(
100
- "An uncaught error occurred. Check the log file for details.",
101
- );
99
+ console.error(error);
102
100
  process.exit(1);
103
101
  });
104
102
 
@@ -108,9 +106,7 @@ function setupGlobalErrorHandlers(command: string) {
108
106
  breadcrumbs: ["unhandledRejection"],
109
107
  error: reason as Error | string,
110
108
  });
111
- console.error(
112
- "An unhandled rejection occurred. Check the log file for details.",
113
- );
109
+ console.error(reason);
114
110
  process.exit(1);
115
111
  });
116
112
  }
package/src/login.ts CHANGED
@@ -80,7 +80,6 @@ export default async () => {
80
80
  await logError({ command: "login", breadcrumbs, error });
81
81
  await reportErrorToRollbar(error);
82
82
  console.log(error);
83
-
84
83
  process.exit(1);
85
84
  }
86
85
  };
package/src/push.ts CHANGED
@@ -82,6 +82,7 @@ export default async () => {
82
82
  spinnerPushing?.fail("Publishing failed");
83
83
  await logError({ command: "push", breadcrumbs, error });
84
84
  await reportErrorToRollbar(error);
85
+ console.log(error);
85
86
  process.exit(1);
86
87
  }
87
88
  };
package/src/validate.ts CHANGED
@@ -8,7 +8,7 @@ const CUBE_YAML_FILE_REGEX = /^(.*)\.cube\.ya?ml$/;
8
8
  const SECURITY_CONTEXT_FILE_REGEX = /^(.*)\.sc\.ya?ml$/;
9
9
  const CLIENT_CONTEXT_FILE_REGEX = /^(.*)\.cc\.ya?ml$/;
10
10
 
11
- export default async (ctx: any, exitIfInvalid = true) => {
11
+ export default async (ctx: any) => {
12
12
  checkNodeVersion();
13
13
  const ora = (await import("ora")).default;
14
14
 
@@ -36,9 +36,7 @@ export default async (ctx: any, exitIfInvalid = true) => {
36
36
  spinnerValidate.info(errorMessage),
37
37
  );
38
38
 
39
- if (exitIfInvalid) {
40
- process.exit(1);
41
- }
39
+ process.exit(1);
42
40
  }
43
41
 
44
42
  spinnerValidate.succeed("Data model validation completed");
@@ -58,9 +56,7 @@ export default async (ctx: any, exitIfInvalid = true) => {
58
56
  spinnerValidate.info(errorMessage),
59
57
  );
60
58
 
61
- if (exitIfInvalid) {
62
- process.exit(1);
63
- }
59
+ process.exit(1);
64
60
  }
65
61
 
66
62
  if (clientContextErrors.length) {
@@ -70,9 +66,7 @@ export default async (ctx: any, exitIfInvalid = true) => {
70
66
  spinnerValidate.info(errorMessage),
71
67
  );
72
68
 
73
- if (exitIfInvalid) {
74
- process.exit(1);
75
- }
69
+ process.exit(1);
76
70
  }
77
71
 
78
72
  return (