@embeddable.com/sdk-core 3.9.14 → 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/bin/embeddable +8 -5
- package/bin/package.json +3 -0
- package/lib/index.esm.js +30 -23
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +30 -23
- package/lib/index.js.map +1 -1
- package/loader/entryPoint.js +75 -0
- package/loader/entryPoint.test.js +122 -0
- package/loader/package.json +3 -0
- package/package.json +15 -14
- package/src/build.test.ts +0 -1
- package/src/dev.ts +20 -10
- package/src/rollbar.test.ts +0 -1
- package/src/entryPoint.js +0 -12
package/bin/embeddable
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import { pathToFileURL } from "url";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { spawn } from "child_process";
|
|
7
|
+
import path from "path";
|
|
8
8
|
|
|
9
9
|
// Check if the loader is already applied to avoid infinite spawning
|
|
10
10
|
if (!process.env.LOADER_APPLIED) {
|
|
@@ -13,9 +13,12 @@ if (!process.env.LOADER_APPLIED) {
|
|
|
13
13
|
LOADER_APPLIED: "1",
|
|
14
14
|
VITE_CJS_IGNORE_WARNING: "true", // see https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
const dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
18
|
+
|
|
19
|
+
const entryPointPath = path.join(dirname, "../loader/entryPoint.js");
|
|
17
20
|
const customLoaderPath = path.join(
|
|
18
|
-
|
|
21
|
+
dirname,
|
|
19
22
|
"../loader/custom-esm-loader.mjs",
|
|
20
23
|
);
|
|
21
24
|
|
package/bin/package.json
ADDED
package/lib/index.esm.js
CHANGED
|
@@ -27,6 +27,7 @@ import { select } from '@inquirer/prompts';
|
|
|
27
27
|
import * as http from 'node:http';
|
|
28
28
|
import { WebSocketServer } from 'ws';
|
|
29
29
|
import * as chokidar from 'chokidar';
|
|
30
|
+
import fg from 'fast-glob';
|
|
30
31
|
import { stat } from 'fs/promises';
|
|
31
32
|
|
|
32
33
|
var findFiles = async (initialSrcDir, regex) => {
|
|
@@ -21788,7 +21789,7 @@ var dev = async () => {
|
|
|
21788
21789
|
await configureWatcher(watcher, config);
|
|
21789
21790
|
watchers.push(watcher);
|
|
21790
21791
|
}
|
|
21791
|
-
const dataModelAndSecurityContextWatch = dataModelAndSecurityContextWatcher(config);
|
|
21792
|
+
const dataModelAndSecurityContextWatch = await dataModelAndSecurityContextWatcher(config);
|
|
21792
21793
|
const customGlobalCssWatch = globalCssWatcher(config);
|
|
21793
21794
|
watchers.push(dataModelAndSecurityContextWatch);
|
|
21794
21795
|
watchers.push(customGlobalCssWatch);
|
|
@@ -21845,14 +21846,19 @@ const onBundleBuildEnd = async (ctx) => {
|
|
|
21845
21846
|
sendMessage("componentsBuildSuccess");
|
|
21846
21847
|
}
|
|
21847
21848
|
};
|
|
21848
|
-
const dataModelAndSecurityContextWatcher = (ctx) => {
|
|
21849
|
-
const
|
|
21850
|
-
|
|
21851
|
-
|
|
21852
|
-
|
|
21853
|
-
|
|
21854
|
-
|
|
21855
|
-
|
|
21849
|
+
const dataModelAndSecurityContextWatcher = async (ctx) => {
|
|
21850
|
+
const [modelsFiles, presetsFiles] = await Promise.all([
|
|
21851
|
+
fg("**/*.cube.{yaml,yml,js}", {
|
|
21852
|
+
cwd: ctx.client.modelsSrc,
|
|
21853
|
+
absolute: true,
|
|
21854
|
+
}),
|
|
21855
|
+
fg("**/*.{sc,cc}.{yaml,yml}", {
|
|
21856
|
+
cwd: ctx.client.presetsSrc,
|
|
21857
|
+
absolute: true,
|
|
21858
|
+
}),
|
|
21859
|
+
]);
|
|
21860
|
+
const fsWatcher = chokidar.watch([...modelsFiles, ...presetsFiles], chokidarWatchOptions);
|
|
21861
|
+
fsWatcher.on("all", () => sendDataModelsAndContextsChanges(ctx));
|
|
21856
21862
|
return fsWatcher;
|
|
21857
21863
|
};
|
|
21858
21864
|
const globalCssWatcher = (ctx) => {
|
|
@@ -21993,7 +21999,7 @@ var defineConfig = ({ plugins, pushBaseUrl, audienceUrl, authDomain, authClientI
|
|
|
21993
21999
|
};
|
|
21994
22000
|
|
|
21995
22001
|
var name = "@embeddable.com/sdk-core";
|
|
21996
|
-
var version = "3.
|
|
22002
|
+
var version = "3.10.1";
|
|
21997
22003
|
var description = "Core Embeddable SDK module responsible for web-components bundling and publishing.";
|
|
21998
22004
|
var keywords = [
|
|
21999
22005
|
"embeddable",
|
|
@@ -22032,26 +22038,27 @@ var engines = {
|
|
|
22032
22038
|
var license = "MIT";
|
|
22033
22039
|
var dependencies = {
|
|
22034
22040
|
"@embeddable.com/sdk-utils": "*",
|
|
22035
|
-
"@inquirer/prompts": "^7.
|
|
22036
|
-
"@stencil/core": "^4.22.
|
|
22041
|
+
"@inquirer/prompts": "^7.1.0",
|
|
22042
|
+
"@stencil/core": "^4.22.3",
|
|
22037
22043
|
"@swc-node/register": "^1.10.9",
|
|
22038
|
-
archiver: "^5.3.
|
|
22039
|
-
axios: "^1.7.
|
|
22040
|
-
chokidar: "^
|
|
22041
|
-
|
|
22044
|
+
archiver: "^5.3.2",
|
|
22045
|
+
axios: "^1.7.8",
|
|
22046
|
+
chokidar: "^4.0.1",
|
|
22047
|
+
"fast-glob": "^3.3.2",
|
|
22048
|
+
finalhandler: "^1.3.1",
|
|
22042
22049
|
"formdata-node": "^6.0.3",
|
|
22043
22050
|
minimist: "^1.2.8",
|
|
22044
22051
|
open: "^9.1.0",
|
|
22045
|
-
ora: "^8.
|
|
22046
|
-
"serve-static": "^1.
|
|
22047
|
-
sorcery: "^0.11.
|
|
22048
|
-
vite: "^5.4.
|
|
22049
|
-
ws: "^8.
|
|
22050
|
-
yaml: "^2.
|
|
22052
|
+
ora: "^8.1.1",
|
|
22053
|
+
"serve-static": "^1.16.2",
|
|
22054
|
+
sorcery: "^0.11.1",
|
|
22055
|
+
vite: "^5.4.11",
|
|
22056
|
+
ws: "^8.18.0",
|
|
22057
|
+
yaml: "^2.6.1"
|
|
22051
22058
|
};
|
|
22052
22059
|
var devDependencies = {
|
|
22053
22060
|
"@types/archiver": "^5.3.4",
|
|
22054
|
-
"@types/ws": "^8.5.
|
|
22061
|
+
"@types/ws": "^8.5.13"
|
|
22055
22062
|
};
|
|
22056
22063
|
var _package = {
|
|
22057
22064
|
name: name,
|