@embeddable.com/sdk-core 2.4.28 → 2.4.29
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 +12 -12
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +12 -12
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -20238,7 +20238,7 @@ var dev = async () => {
|
|
|
20238
20238
|
if (sys === null || sys === void 0 ? void 0 : sys.onProcessInterrupt) {
|
|
20239
20239
|
sys.onProcessInterrupt(async () => await onClose(server, sys, watchers, config));
|
|
20240
20240
|
}
|
|
20241
|
-
await
|
|
20241
|
+
await sendDataModelsAndSecurityContextsChanges(config);
|
|
20242
20242
|
for (const getPlugin of config.plugins) {
|
|
20243
20243
|
const plugin = getPlugin();
|
|
20244
20244
|
await plugin.validate(config);
|
|
@@ -20246,8 +20246,8 @@ var dev = async () => {
|
|
|
20246
20246
|
await configureWatcher(watcher, config);
|
|
20247
20247
|
watchers.push(watcher);
|
|
20248
20248
|
}
|
|
20249
|
-
const
|
|
20250
|
-
watchers.push(
|
|
20249
|
+
const dataModelAndSecurityContextWatch = dataModelAndSecurityContextWatcher(config);
|
|
20250
|
+
watchers.push(dataModelAndSecurityContextWatch);
|
|
20251
20251
|
});
|
|
20252
20252
|
};
|
|
20253
20253
|
const configureWatcher = async (watcher, ctx) => {
|
|
@@ -20296,29 +20296,29 @@ const onBundleBuildEnd = async (ctx) => {
|
|
|
20296
20296
|
sendMessage("componentsBuildSuccess");
|
|
20297
20297
|
}
|
|
20298
20298
|
};
|
|
20299
|
-
const
|
|
20300
|
-
const fsWatcher = chokidar.watch([path$2.resolve(ctx.client.srcDir, "**/*.cube.{yaml,yml,js}")], {
|
|
20299
|
+
const dataModelAndSecurityContextWatcher = (ctx) => {
|
|
20300
|
+
const fsWatcher = chokidar.watch([path$2.resolve(ctx.client.srcDir, "**/*.{cube,sc}.{yaml,yml,js}")], {
|
|
20301
20301
|
ignoreInitial: true,
|
|
20302
20302
|
});
|
|
20303
20303
|
fsWatcher.on("all", async () => {
|
|
20304
|
-
await
|
|
20304
|
+
await sendDataModelsAndSecurityContextsChanges(ctx);
|
|
20305
20305
|
});
|
|
20306
20306
|
return fsWatcher;
|
|
20307
20307
|
};
|
|
20308
|
-
const
|
|
20309
|
-
sendMessage("
|
|
20308
|
+
const sendDataModelsAndSecurityContextsChanges = async (ctx) => {
|
|
20309
|
+
sendMessage("dataModelsAndOrSecurityContextUpdateStart");
|
|
20310
20310
|
const isValid = await validate(ctx, false);
|
|
20311
20311
|
if (isValid) {
|
|
20312
20312
|
const token = await getToken();
|
|
20313
|
-
const sending = ora("Synchronising data models...").start();
|
|
20313
|
+
const sending = ora("Synchronising data models and/or security contexts...").start();
|
|
20314
20314
|
const filesList = await findFiles(ctx.client.srcDir, YAML_OR_JS_FILES);
|
|
20315
20315
|
await archive(ctx, filesList, false);
|
|
20316
20316
|
await sendBuild(ctx, { workspaceId: previewWorkspace, token });
|
|
20317
|
-
sending.succeed(`Data models synchronized`);
|
|
20318
|
-
sendMessage("
|
|
20317
|
+
sending.succeed(`Data models and/or security context synchronized`);
|
|
20318
|
+
sendMessage("dataModelsAndOrSecurityContextUpdateSuccess");
|
|
20319
20319
|
}
|
|
20320
20320
|
else {
|
|
20321
|
-
sendMessage("
|
|
20321
|
+
sendMessage("dataModelsAndOrSecurityContextUpdateError");
|
|
20322
20322
|
}
|
|
20323
20323
|
};
|
|
20324
20324
|
const onClose = async (server, sys, watchers, config) => {
|