@embeddable.com/sdk-core 3.11.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.esm.js CHANGED
@@ -4982,7 +4982,7 @@ var z = /*#__PURE__*/Object.freeze({
4982
4982
  const CUBE_YAML_FILE_REGEX = /^(.*)\.cube\.ya?ml$/;
4983
4983
  const SECURITY_CONTEXT_FILE_REGEX = /^(.*)\.sc\.ya?ml$/;
4984
4984
  const CLIENT_CONTEXT_FILE_REGEX = /^(.*)\.cc\.ya?ml$/;
4985
- var validate = async (ctx, exitIfInvalid = true) => {
4985
+ var validate = async (ctx) => {
4986
4986
  checkNodeVersion();
4987
4987
  const ora = (await import('ora')).default;
4988
4988
  const spinnerValidate = ora("Data model validation...").start();
@@ -4993,9 +4993,7 @@ var validate = async (ctx, exitIfInvalid = true) => {
4993
4993
  if (dataModelErrors.length) {
4994
4994
  spinnerValidate.fail("One or more cube.yaml files are invalid:");
4995
4995
  dataModelErrors.forEach((errorMessage) => spinnerValidate.info(errorMessage));
4996
- if (exitIfInvalid) {
4997
- process.exit(1);
4998
- }
4996
+ process.exit(1);
4999
4997
  }
5000
4998
  spinnerValidate.succeed("Data model validation completed");
5001
4999
  const securityContextErrors = await securityContextValidation(securityContextFilesList);
@@ -5003,16 +5001,12 @@ var validate = async (ctx, exitIfInvalid = true) => {
5003
5001
  if (securityContextErrors.length) {
5004
5002
  spinnerValidate.fail("One or more security context files are invalid:");
5005
5003
  securityContextErrors.forEach((errorMessage) => spinnerValidate.info(errorMessage));
5006
- if (exitIfInvalid) {
5007
- process.exit(1);
5008
- }
5004
+ process.exit(1);
5009
5005
  }
5010
5006
  if (clientContextErrors.length) {
5011
5007
  spinnerValidate.fail("One or more client context files are invalid:");
5012
5008
  clientContextErrors.forEach((errorMessage) => spinnerValidate.info(errorMessage));
5013
- if (exitIfInvalid) {
5014
- process.exit(1);
5015
- }
5009
+ process.exit(1);
5016
5010
  }
5017
5011
  return (dataModelErrors.length === 0 &&
5018
5012
  securityContextErrors.length === 0 &&
@@ -21325,7 +21319,7 @@ async function rotateLogIfNeeded() {
21325
21319
  function setupGlobalErrorHandlers(command) {
21326
21320
  process.on("uncaughtException", async (error) => {
21327
21321
  await logError({ command, breadcrumbs: ["uncaughtException"], error });
21328
- console.error("An uncaught error occurred. Check the log file for details.");
21322
+ console.error(error);
21329
21323
  process.exit(1);
21330
21324
  });
21331
21325
  process.on("unhandledRejection", async (reason) => {
@@ -21334,7 +21328,7 @@ function setupGlobalErrorHandlers(command) {
21334
21328
  breadcrumbs: ["unhandledRejection"],
21335
21329
  error: reason,
21336
21330
  });
21337
- console.error("An unhandled rejection occurred. Check the log file for details.");
21331
+ console.error(reason);
21338
21332
  process.exit(1);
21339
21333
  });
21340
21334
  }
@@ -21556,6 +21550,7 @@ var push = async () => {
21556
21550
  spinnerPushing === null || spinnerPushing === void 0 ? void 0 : spinnerPushing.fail("Publishing failed");
21557
21551
  await logError({ command: "push", breadcrumbs, error });
21558
21552
  await reportErrorToRollbar(error);
21553
+ console.log(error);
21559
21554
  process.exit(1);
21560
21555
  }
21561
21556
  };
@@ -21797,6 +21792,7 @@ var dev = async () => {
21797
21792
  }
21798
21793
  catch (error) {
21799
21794
  await logError({ command: "dev", breadcrumbs, error });
21795
+ console.log(error);
21800
21796
  process.exit(1);
21801
21797
  }
21802
21798
  };
@@ -21870,7 +21866,7 @@ const globalCssWatcher = (ctx) => {
21870
21866
  };
21871
21867
  const sendDataModelsAndContextsChanges = async (ctx) => {
21872
21868
  sendMessage("dataModelsAndOrSecurityContextUpdateStart");
21873
- const isValid = await validate(ctx, false);
21869
+ const isValid = await validate(ctx);
21874
21870
  if (isValid) {
21875
21871
  const token = await getToken();
21876
21872
  const sending = ora("Synchronising data models and/or security contexts...").start();
@@ -21999,7 +21995,7 @@ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientI
21999
21995
  };
22000
21996
 
22001
21997
  var name = "@embeddable.com/sdk-core";
22002
- var version = "3.11.0";
21998
+ var version = "3.12.0-next.1";
22003
21999
  var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
22004
22000
  var keywords = [
22005
22001
  "embeddable",
@@ -22037,7 +22033,7 @@ var engines = {
22037
22033
  };
22038
22034
  var license = "MIT";
22039
22035
  var dependencies = {
22040
- "@embeddable.com/sdk-utils": "0.5.0",
22036
+ "@embeddable.com/sdk-utils": "0.6.0-next.0",
22041
22037
  "@inquirer/prompts": "^7.1.0",
22042
22038
  "@stencil/core": "^4.22.3",
22043
22039
  "@swc-node/register": "^1.10.9",