@embeddable.com/sdk-core 2.4.27 → 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.js
CHANGED
|
@@ -20264,7 +20264,7 @@ var dev = async () => {
|
|
|
20264
20264
|
if (sys === null || sys === void 0 ? void 0 : sys.onProcessInterrupt) {
|
|
20265
20265
|
sys.onProcessInterrupt(async () => await onClose(server, sys, watchers, config));
|
|
20266
20266
|
}
|
|
20267
|
-
await
|
|
20267
|
+
await sendDataModelsAndSecurityContextsChanges(config);
|
|
20268
20268
|
for (const getPlugin of config.plugins) {
|
|
20269
20269
|
const plugin = getPlugin();
|
|
20270
20270
|
await plugin.validate(config);
|
|
@@ -20272,8 +20272,8 @@ var dev = async () => {
|
|
|
20272
20272
|
await configureWatcher(watcher, config);
|
|
20273
20273
|
watchers.push(watcher);
|
|
20274
20274
|
}
|
|
20275
|
-
const
|
|
20276
|
-
watchers.push(
|
|
20275
|
+
const dataModelAndSecurityContextWatch = dataModelAndSecurityContextWatcher(config);
|
|
20276
|
+
watchers.push(dataModelAndSecurityContextWatch);
|
|
20277
20277
|
});
|
|
20278
20278
|
};
|
|
20279
20279
|
const configureWatcher = async (watcher, ctx) => {
|
|
@@ -20322,29 +20322,29 @@ const onBundleBuildEnd = async (ctx) => {
|
|
|
20322
20322
|
sendMessage("componentsBuildSuccess");
|
|
20323
20323
|
}
|
|
20324
20324
|
};
|
|
20325
|
-
const
|
|
20326
|
-
const fsWatcher = chokidar__namespace.watch([path__namespace$1.resolve(ctx.client.srcDir, "**/*.cube.{yaml,yml,js}")], {
|
|
20325
|
+
const dataModelAndSecurityContextWatcher = (ctx) => {
|
|
20326
|
+
const fsWatcher = chokidar__namespace.watch([path__namespace$1.resolve(ctx.client.srcDir, "**/*.{cube,sc}.{yaml,yml,js}")], {
|
|
20327
20327
|
ignoreInitial: true,
|
|
20328
20328
|
});
|
|
20329
20329
|
fsWatcher.on("all", async () => {
|
|
20330
|
-
await
|
|
20330
|
+
await sendDataModelsAndSecurityContextsChanges(ctx);
|
|
20331
20331
|
});
|
|
20332
20332
|
return fsWatcher;
|
|
20333
20333
|
};
|
|
20334
|
-
const
|
|
20335
|
-
sendMessage("
|
|
20334
|
+
const sendDataModelsAndSecurityContextsChanges = async (ctx) => {
|
|
20335
|
+
sendMessage("dataModelsAndOrSecurityContextUpdateStart");
|
|
20336
20336
|
const isValid = await validate(ctx, false);
|
|
20337
20337
|
if (isValid) {
|
|
20338
20338
|
const token = await getToken();
|
|
20339
|
-
const sending = ora("Synchronising data models...").start();
|
|
20339
|
+
const sending = ora("Synchronising data models and/or security contexts...").start();
|
|
20340
20340
|
const filesList = await findFiles(ctx.client.srcDir, YAML_OR_JS_FILES);
|
|
20341
20341
|
await archive(ctx, filesList, false);
|
|
20342
20342
|
await sendBuild(ctx, { workspaceId: previewWorkspace, token });
|
|
20343
|
-
sending.succeed(`Data models synchronized`);
|
|
20344
|
-
sendMessage("
|
|
20343
|
+
sending.succeed(`Data models and/or security context synchronized`);
|
|
20344
|
+
sendMessage("dataModelsAndOrSecurityContextUpdateSuccess");
|
|
20345
20345
|
}
|
|
20346
20346
|
else {
|
|
20347
|
-
sendMessage("
|
|
20347
|
+
sendMessage("dataModelsAndOrSecurityContextUpdateError");
|
|
20348
20348
|
}
|
|
20349
20349
|
};
|
|
20350
20350
|
const onClose = async (server, sys, watchers, config) => {
|