@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/index.js CHANGED
@@ -5010,7 +5010,7 @@ var z = /*#__PURE__*/Object.freeze({
5010
5010
  const CUBE_YAML_FILE_REGEX = /^(.*)\.cube\.ya?ml$/;
5011
5011
  const SECURITY_CONTEXT_FILE_REGEX = /^(.*)\.sc\.ya?ml$/;
5012
5012
  const CLIENT_CONTEXT_FILE_REGEX = /^(.*)\.cc\.ya?ml$/;
5013
- var validate = async (ctx, exitIfInvalid = true) => {
5013
+ var validate = async (ctx) => {
5014
5014
  checkNodeVersion();
5015
5015
  const ora = (await import('ora')).default;
5016
5016
  const spinnerValidate = ora("Data model validation...").start();
@@ -5021,9 +5021,7 @@ var validate = async (ctx, exitIfInvalid = true) => {
5021
5021
  if (dataModelErrors.length) {
5022
5022
  spinnerValidate.fail("One or more cube.yaml files are invalid:");
5023
5023
  dataModelErrors.forEach((errorMessage) => spinnerValidate.info(errorMessage));
5024
- if (exitIfInvalid) {
5025
- process.exit(1);
5026
- }
5024
+ process.exit(1);
5027
5025
  }
5028
5026
  spinnerValidate.succeed("Data model validation completed");
5029
5027
  const securityContextErrors = await securityContextValidation(securityContextFilesList);
@@ -5031,16 +5029,12 @@ var validate = async (ctx, exitIfInvalid = true) => {
5031
5029
  if (securityContextErrors.length) {
5032
5030
  spinnerValidate.fail("One or more security context files are invalid:");
5033
5031
  securityContextErrors.forEach((errorMessage) => spinnerValidate.info(errorMessage));
5034
- if (exitIfInvalid) {
5035
- process.exit(1);
5036
- }
5032
+ process.exit(1);
5037
5033
  }
5038
5034
  if (clientContextErrors.length) {
5039
5035
  spinnerValidate.fail("One or more client context files are invalid:");
5040
5036
  clientContextErrors.forEach((errorMessage) => spinnerValidate.info(errorMessage));
5041
- if (exitIfInvalid) {
5042
- process.exit(1);
5043
- }
5037
+ process.exit(1);
5044
5038
  }
5045
5039
  return (dataModelErrors.length === 0 &&
5046
5040
  securityContextErrors.length === 0 &&
@@ -21353,7 +21347,7 @@ async function rotateLogIfNeeded() {
21353
21347
  function setupGlobalErrorHandlers(command) {
21354
21348
  process.on("uncaughtException", async (error) => {
21355
21349
  await logError({ command, breadcrumbs: ["uncaughtException"], error });
21356
- console.error("An uncaught error occurred. Check the log file for details.");
21350
+ console.error(error);
21357
21351
  process.exit(1);
21358
21352
  });
21359
21353
  process.on("unhandledRejection", async (reason) => {
@@ -21362,7 +21356,7 @@ function setupGlobalErrorHandlers(command) {
21362
21356
  breadcrumbs: ["unhandledRejection"],
21363
21357
  error: reason,
21364
21358
  });
21365
- console.error("An unhandled rejection occurred. Check the log file for details.");
21359
+ console.error(reason);
21366
21360
  process.exit(1);
21367
21361
  });
21368
21362
  }
@@ -21584,6 +21578,7 @@ var push = async () => {
21584
21578
  spinnerPushing === null || spinnerPushing === void 0 ? void 0 : spinnerPushing.fail("Publishing failed");
21585
21579
  await logError({ command: "push", breadcrumbs, error });
21586
21580
  await reportErrorToRollbar(error);
21581
+ console.log(error);
21587
21582
  process.exit(1);
21588
21583
  }
21589
21584
  };
@@ -21825,6 +21820,7 @@ var dev = async () => {
21825
21820
  }
21826
21821
  catch (error) {
21827
21822
  await logError({ command: "dev", breadcrumbs, error });
21823
+ console.log(error);
21828
21824
  process.exit(1);
21829
21825
  }
21830
21826
  };
@@ -21898,7 +21894,7 @@ const globalCssWatcher = (ctx) => {
21898
21894
  };
21899
21895
  const sendDataModelsAndContextsChanges = async (ctx) => {
21900
21896
  sendMessage("dataModelsAndOrSecurityContextUpdateStart");
21901
- const isValid = await validate(ctx, false);
21897
+ const isValid = await validate(ctx);
21902
21898
  if (isValid) {
21903
21899
  const token = await getToken();
21904
21900
  const sending = ora("Synchronising data models and/or security contexts...").start();
@@ -22027,7 +22023,7 @@ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientI
22027
22023
  };
22028
22024
 
22029
22025
  var name = "@embeddable.com/sdk-core";
22030
- var version = "3.12.0-next.0";
22026
+ var version = "3.12.0-next.1";
22031
22027
  var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
22032
22028
  var keywords = [
22033
22029
  "embeddable",