@embeddable.com/sdk-core 3.4.0 → 3.4.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
@@ -4945,21 +4945,26 @@ async function dataModelsValidation(filesList) {
4945
4945
  const errors = [];
4946
4946
  for (const [_, filePath] of filesList) {
4947
4947
  const fileContentRaw = await fs$1.readFile(filePath, "utf8");
4948
- const cube = YAML.parse(fileContentRaw);
4949
- if (!(cube === null || cube === void 0 ? void 0 : cube.cubes) && !(cube === null || cube === void 0 ? void 0 : cube.views)) {
4950
- return [`${filePath}: At least one cubes or views must be defined`];
4951
- }
4952
- const cubeModelSafeParse = cubeModelSchema.safeParse(cube);
4953
- const viewModelSafeParse = viewModelSchema.safeParse(cube);
4954
- if (cube.cubes && !cubeModelSafeParse.success) {
4955
- errorFormatter(cubeModelSafeParse.error.issues).forEach((error) => {
4956
- errors.push(`${filePath}: ${error}`);
4957
- });
4948
+ try {
4949
+ const cube = YAML.parse(fileContentRaw);
4950
+ if (!(cube === null || cube === void 0 ? void 0 : cube.cubes) && !(cube === null || cube === void 0 ? void 0 : cube.views)) {
4951
+ return [`${filePath}: At least one cubes or views must be defined`];
4952
+ }
4953
+ const cubeModelSafeParse = cubeModelSchema.safeParse(cube);
4954
+ const viewModelSafeParse = viewModelSchema.safeParse(cube);
4955
+ if (cube.cubes && !cubeModelSafeParse.success) {
4956
+ errorFormatter(cubeModelSafeParse.error.issues).forEach((error) => {
4957
+ errors.push(`${filePath}: ${error}`);
4958
+ });
4959
+ }
4960
+ if (cube.views && !viewModelSafeParse.success) {
4961
+ errorFormatter(viewModelSafeParse.error.issues).forEach((error) => {
4962
+ errors.push(`${filePath}: ${error}`);
4963
+ });
4964
+ }
4958
4965
  }
4959
- if (cube.views && !viewModelSafeParse.success) {
4960
- errorFormatter(viewModelSafeParse.error.issues).forEach((error) => {
4961
- errors.push(`${filePath}: ${error}`);
4962
- });
4966
+ catch (e) {
4967
+ errors.push(`${filePath}: ${e.message}`);
4963
4968
  }
4964
4969
  }
4965
4970
  return errors;
@@ -20935,7 +20940,7 @@ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientI
20935
20940
  };
20936
20941
 
20937
20942
  var name = "@embeddable.com/sdk-core";
20938
- var version = "3.4.0";
20943
+ var version = "3.4.1";
20939
20944
  var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
20940
20945
  var keywords = [
20941
20946
  "embeddable",
@@ -20986,7 +20991,7 @@ var dependencies = {
20986
20991
  ora: "^8.0.1",
20987
20992
  "serve-static": "^1.15.0",
20988
20993
  sorcery: "^0.11.0",
20989
- vite: "^5.3.1",
20994
+ vite: "^5.3.2",
20990
20995
  ws: "^8.17.0",
20991
20996
  yaml: "^2.3.3"
20992
20997
  };