@embeddable.com/sdk-core 3.10.0 → 3.10.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 +20 -13
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +20 -13
- package/lib/index.js.map +1 -1
- package/package.json +5 -4
- package/src/dev.ts +20 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embeddable.com/sdk-core",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.1",
|
|
4
4
|
"description": "Core Embeddable SDK module responsible for web-components bundling and publishing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"embeddable",
|
|
@@ -40,11 +40,12 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@embeddable.com/sdk-utils": "*",
|
|
42
42
|
"@inquirer/prompts": "^7.1.0",
|
|
43
|
-
"@stencil/core": "^4.22.
|
|
43
|
+
"@stencil/core": "^4.22.3",
|
|
44
44
|
"@swc-node/register": "^1.10.9",
|
|
45
45
|
"archiver": "^5.3.2",
|
|
46
|
-
"axios": "^1.7.
|
|
46
|
+
"axios": "^1.7.8",
|
|
47
47
|
"chokidar": "^4.0.1",
|
|
48
|
+
"fast-glob": "^3.3.2",
|
|
48
49
|
"finalhandler": "^1.3.1",
|
|
49
50
|
"formdata-node": "^6.0.3",
|
|
50
51
|
"minimist": "^1.2.8",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"sorcery": "^0.11.1",
|
|
55
56
|
"vite": "^5.4.11",
|
|
56
57
|
"ws": "^8.18.0",
|
|
57
|
-
"yaml": "^2.6.
|
|
58
|
+
"yaml": "^2.6.1"
|
|
58
59
|
},
|
|
59
60
|
"lint-staged": {
|
|
60
61
|
"*.{js,ts,json}": [
|
package/src/dev.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
createNodeLogger,
|
|
11
11
|
createNodeSys,
|
|
12
12
|
} from "@stencil/core/sys/node";
|
|
13
|
+
import { glob } from "node:fs/promises";
|
|
13
14
|
import { RollupWatcher } from "rollup";
|
|
14
15
|
import * as http from "node:http";
|
|
15
16
|
import { IncomingMessage, Server, ServerResponse } from "http";
|
|
@@ -29,6 +30,7 @@ import { selectWorkspace } from "./workspaceUtils";
|
|
|
29
30
|
import * as fs from "fs";
|
|
30
31
|
const minimist = require("minimist");
|
|
31
32
|
import { initLogger, logError } from "./logger";
|
|
33
|
+
import fg from "fast-glob";
|
|
32
34
|
|
|
33
35
|
const oraP = import("ora");
|
|
34
36
|
let wss: WSServer;
|
|
@@ -206,8 +208,7 @@ export default async () => {
|
|
|
206
208
|
}
|
|
207
209
|
|
|
208
210
|
const dataModelAndSecurityContextWatch =
|
|
209
|
-
dataModelAndSecurityContextWatcher(config);
|
|
210
|
-
|
|
211
|
+
await dataModelAndSecurityContextWatcher(config);
|
|
211
212
|
const customGlobalCssWatch = globalCssWatcher(config);
|
|
212
213
|
watchers.push(dataModelAndSecurityContextWatch);
|
|
213
214
|
watchers.push(customGlobalCssWatch);
|
|
@@ -272,17 +273,26 @@ const onBundleBuildEnd = async (ctx: any) => {
|
|
|
272
273
|
}
|
|
273
274
|
};
|
|
274
275
|
|
|
275
|
-
const dataModelAndSecurityContextWatcher = (
|
|
276
|
+
const dataModelAndSecurityContextWatcher = async (
|
|
277
|
+
ctx: any,
|
|
278
|
+
): Promise<FSWatcher> => {
|
|
279
|
+
const [modelsFiles, presetsFiles] = await Promise.all([
|
|
280
|
+
fg("**/*.cube.{yaml,yml,js}", {
|
|
281
|
+
cwd: ctx.client.modelsSrc,
|
|
282
|
+
absolute: true,
|
|
283
|
+
}),
|
|
284
|
+
fg("**/*.{sc,cc}.{yaml,yml}", {
|
|
285
|
+
cwd: ctx.client.presetsSrc,
|
|
286
|
+
absolute: true,
|
|
287
|
+
}),
|
|
288
|
+
]);
|
|
289
|
+
|
|
276
290
|
const fsWatcher = chokidar.watch(
|
|
277
|
-
[
|
|
278
|
-
path.resolve(ctx.client.modelsSrc, "**/*.cube.{yaml,yml,js}"),
|
|
279
|
-
path.resolve(ctx.client.presetsSrc, "**/*.{sc,cc}.{yaml,yml}"),
|
|
280
|
-
],
|
|
291
|
+
[...modelsFiles, ...presetsFiles],
|
|
281
292
|
chokidarWatchOptions,
|
|
282
293
|
);
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
});
|
|
294
|
+
|
|
295
|
+
fsWatcher.on("all", () => sendDataModelsAndContextsChanges(ctx));
|
|
286
296
|
|
|
287
297
|
return fsWatcher;
|
|
288
298
|
};
|