@embeddable.com/sdk-core 3.5.0 → 3.5.2

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
@@ -20762,7 +20762,7 @@ var dev = async () => {
20762
20762
  const logger = createNodeLogger({ process });
20763
20763
  const sys = createNodeSys({ process });
20764
20764
  const defaultConfig = await provideConfig();
20765
- const buildDir = path$2.resolve(defaultConfig.client.rootDir, ".embeddable-dev-build");
20765
+ const buildDir = path$2.resolve(defaultConfig.client.rootDir, BUILD_DEV_DIR);
20766
20766
  const config = {
20767
20767
  ...defaultConfig,
20768
20768
  dev: {
@@ -20772,7 +20772,7 @@ var dev = async () => {
20772
20772
  },
20773
20773
  client: {
20774
20774
  ...defaultConfig.client,
20775
- buildDir: buildDir,
20775
+ buildDir,
20776
20776
  componentDir: path$2.resolve(buildDir, "component"),
20777
20777
  stencilBuild: path$2.resolve(buildDir, "dist", "embeddable-wrapper"),
20778
20778
  tmpDir: path$2.resolve(defaultConfig.client.rootDir, ".embeddable-dev-tmp"),
@@ -20810,6 +20810,19 @@ var dev = async () => {
20810
20810
  if (sys === null || sys === void 0 ? void 0 : sys.onProcessInterrupt) {
20811
20811
  sys.onProcessInterrupt(async () => await onClose(server, sys, watchers, config));
20812
20812
  }
20813
+ await createManifest({
20814
+ ctx: {
20815
+ ...config,
20816
+ client: {
20817
+ ...config.client,
20818
+ tmpDir: buildDir,
20819
+ },
20820
+ },
20821
+ typesFileName: "embeddable-types.js",
20822
+ stencilWrapperFileName: "embeddable-wrapper.js",
20823
+ metaFileName: "embeddable-components-meta.js",
20824
+ editorsMetaFileName: "embeddable-editors-meta.js",
20825
+ });
20813
20826
  await sendDataModelsAndSecurityContextsChanges(config);
20814
20827
  for (const getPlugin of config.plugins) {
20815
20828
  const plugin = getPlugin();
@@ -20869,7 +20882,7 @@ const onBundleBuildEnd = async (ctx) => {
20869
20882
  }
20870
20883
  };
20871
20884
  const dataModelAndSecurityContextWatcher = (ctx) => {
20872
- const fsWatcher = chokidar.watch([path$2.resolve(ctx.client.srcDir, "**/*.{cube,sc}.{yaml,yml,js}")], {
20885
+ const fsWatcher = chokidar.watch([path$2.resolve(ctx.client.modelsSrc, "**/*.{cube,sc}.{yaml,yml,js}")], {
20873
20886
  ignoreInitial: true,
20874
20887
  });
20875
20888
  fsWatcher.on("all", async () => {
@@ -20883,7 +20896,12 @@ const sendDataModelsAndSecurityContextsChanges = async (ctx) => {
20883
20896
  if (isValid) {
20884
20897
  const token = await getToken();
20885
20898
  const sending = ora("Synchronising data models and/or security contexts...").start();
20886
- const filesList = await findFiles(ctx.client.modelsSrc || ctx.client.srcDir, YAML_OR_JS_FILES);
20899
+ const filesList = await findFiles(ctx.client.modelsSrc, YAML_OR_JS_FILES);
20900
+ // add manifest to the archive
20901
+ filesList.push([
20902
+ "embeddable-manifest",
20903
+ path$2.resolve(ctx.client.buildDir, "embeddable-manifest.json"),
20904
+ ]);
20887
20905
  await archive(ctx, filesList, false);
20888
20906
  await sendBuild(ctx, { workspaceId: previewWorkspace, token });
20889
20907
  sending.succeed(`Data models and/or security context synchronized`);
@@ -20935,7 +20953,7 @@ const getPreviewWorkspace = async (ctx) => {
20935
20953
  }
20936
20954
  };
20937
20955
 
20938
- var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc, componentsSrc = "src", }) => {
20956
+ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc = "src", componentsSrc = "src", }) => {
20939
20957
  const coreRoot = path$1.resolve(__dirname, "..");
20940
20958
  const clientRoot = process.cwd();
20941
20959
  if (!path$1.isAbsolute(componentsSrc)) {
@@ -20985,7 +21003,7 @@ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientI
20985
21003
  };
20986
21004
 
20987
21005
  var name = "@embeddable.com/sdk-core";
20988
- var version = "3.5.0";
21006
+ var version = "3.5.2";
20989
21007
  var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
20990
21008
  var keywords = [
20991
21009
  "embeddable",