@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 +24 -6
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +24 -6
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/defineConfig.ts +1 -1
- package/src/dev.ts +26 -10
package/lib/index.js
CHANGED
|
@@ -20789,7 +20789,7 @@ var dev = async () => {
|
|
|
20789
20789
|
const logger = node.createNodeLogger({ process });
|
|
20790
20790
|
const sys = node.createNodeSys({ process });
|
|
20791
20791
|
const defaultConfig = await provideConfig();
|
|
20792
|
-
const buildDir = path__namespace$1.resolve(defaultConfig.client.rootDir,
|
|
20792
|
+
const buildDir = path__namespace$1.resolve(defaultConfig.client.rootDir, BUILD_DEV_DIR);
|
|
20793
20793
|
const config = {
|
|
20794
20794
|
...defaultConfig,
|
|
20795
20795
|
dev: {
|
|
@@ -20799,7 +20799,7 @@ var dev = async () => {
|
|
|
20799
20799
|
},
|
|
20800
20800
|
client: {
|
|
20801
20801
|
...defaultConfig.client,
|
|
20802
|
-
buildDir
|
|
20802
|
+
buildDir,
|
|
20803
20803
|
componentDir: path__namespace$1.resolve(buildDir, "component"),
|
|
20804
20804
|
stencilBuild: path__namespace$1.resolve(buildDir, "dist", "embeddable-wrapper"),
|
|
20805
20805
|
tmpDir: path__namespace$1.resolve(defaultConfig.client.rootDir, ".embeddable-dev-tmp"),
|
|
@@ -20837,6 +20837,19 @@ var dev = async () => {
|
|
|
20837
20837
|
if (sys === null || sys === void 0 ? void 0 : sys.onProcessInterrupt) {
|
|
20838
20838
|
sys.onProcessInterrupt(async () => await onClose(server, sys, watchers, config));
|
|
20839
20839
|
}
|
|
20840
|
+
await createManifest({
|
|
20841
|
+
ctx: {
|
|
20842
|
+
...config,
|
|
20843
|
+
client: {
|
|
20844
|
+
...config.client,
|
|
20845
|
+
tmpDir: buildDir,
|
|
20846
|
+
},
|
|
20847
|
+
},
|
|
20848
|
+
typesFileName: "embeddable-types.js",
|
|
20849
|
+
stencilWrapperFileName: "embeddable-wrapper.js",
|
|
20850
|
+
metaFileName: "embeddable-components-meta.js",
|
|
20851
|
+
editorsMetaFileName: "embeddable-editors-meta.js",
|
|
20852
|
+
});
|
|
20840
20853
|
await sendDataModelsAndSecurityContextsChanges(config);
|
|
20841
20854
|
for (const getPlugin of config.plugins) {
|
|
20842
20855
|
const plugin = getPlugin();
|
|
@@ -20896,7 +20909,7 @@ const onBundleBuildEnd = async (ctx) => {
|
|
|
20896
20909
|
}
|
|
20897
20910
|
};
|
|
20898
20911
|
const dataModelAndSecurityContextWatcher = (ctx) => {
|
|
20899
|
-
const fsWatcher = chokidar__namespace.watch([path__namespace$1.resolve(ctx.client.
|
|
20912
|
+
const fsWatcher = chokidar__namespace.watch([path__namespace$1.resolve(ctx.client.modelsSrc, "**/*.{cube,sc}.{yaml,yml,js}")], {
|
|
20900
20913
|
ignoreInitial: true,
|
|
20901
20914
|
});
|
|
20902
20915
|
fsWatcher.on("all", async () => {
|
|
@@ -20910,7 +20923,12 @@ const sendDataModelsAndSecurityContextsChanges = async (ctx) => {
|
|
|
20910
20923
|
if (isValid) {
|
|
20911
20924
|
const token = await getToken();
|
|
20912
20925
|
const sending = ora("Synchronising data models and/or security contexts...").start();
|
|
20913
|
-
const filesList = await findFiles(ctx.client.modelsSrc
|
|
20926
|
+
const filesList = await findFiles(ctx.client.modelsSrc, YAML_OR_JS_FILES);
|
|
20927
|
+
// add manifest to the archive
|
|
20928
|
+
filesList.push([
|
|
20929
|
+
"embeddable-manifest",
|
|
20930
|
+
path__namespace$1.resolve(ctx.client.buildDir, "embeddable-manifest.json"),
|
|
20931
|
+
]);
|
|
20914
20932
|
await archive(ctx, filesList, false);
|
|
20915
20933
|
await sendBuild(ctx, { workspaceId: previewWorkspace, token });
|
|
20916
20934
|
sending.succeed(`Data models and/or security context synchronized`);
|
|
@@ -20962,7 +20980,7 @@ const getPreviewWorkspace = async (ctx) => {
|
|
|
20962
20980
|
}
|
|
20963
20981
|
};
|
|
20964
20982
|
|
|
20965
|
-
var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc, componentsSrc = "src", }) => {
|
|
20983
|
+
var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientId, errorFallbackComponent, applicationEnvironment, rollbarAccessToken, previewBaseUrl, modelsSrc = "src", componentsSrc = "src", }) => {
|
|
20966
20984
|
const coreRoot = path__namespace.resolve(__dirname, "..");
|
|
20967
20985
|
const clientRoot = process.cwd();
|
|
20968
20986
|
if (!path__namespace.isAbsolute(componentsSrc)) {
|
|
@@ -21012,7 +21030,7 @@ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientI
|
|
|
21012
21030
|
};
|
|
21013
21031
|
|
|
21014
21032
|
var name = "@embeddable.com/sdk-core";
|
|
21015
|
-
var version = "3.5.
|
|
21033
|
+
var version = "3.5.2";
|
|
21016
21034
|
var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
|
|
21017
21035
|
var keywords = [
|
|
21018
21036
|
"embeddable",
|