@embeddable.com/sdk-core 2.5.5 → 2.6.0-next.0
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 +34 -9
- package/lib/entryPoint.d.ts +1 -0
- package/lib/index.esm.js +1 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/package.json +2 -1
package/bin/embeddable
CHANGED
|
@@ -1,16 +1,41 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
"use strict";
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const { spawn } = require("child_process");
|
|
5
|
+
const path = require("path");
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
// Check if the loader is already applied to avoid infinite spawning
|
|
8
|
+
if (!process.env.LOADER_APPLIED) {
|
|
9
|
+
const env = { ...process.env, LOADER_APPLIED: "1" };
|
|
10
|
+
const entryPointPath = path.join(__dirname, "../src/entryPoint.ts");
|
|
11
|
+
const customLoaderPath = path.join(
|
|
12
|
+
__dirname,
|
|
13
|
+
"../loader/custom-esm-loader.mjs",
|
|
14
|
+
);
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
const child = spawn(
|
|
17
|
+
process.execPath,
|
|
18
|
+
[
|
|
19
|
+
"--loader",
|
|
20
|
+
customLoaderPath,
|
|
21
|
+
"--no-warnings=ExperimentalWarning",
|
|
22
|
+
"--enable-source-maps",
|
|
23
|
+
entryPointPath,
|
|
24
|
+
...process.argv.slice(2),
|
|
25
|
+
],
|
|
26
|
+
{ stdio: ["inherit", "pipe", "inherit"], env },
|
|
27
|
+
);
|
|
10
28
|
|
|
11
|
-
|
|
29
|
+
child.stdout.on("data", (data) => {
|
|
30
|
+
const message = data.toString();
|
|
31
|
+
if (!message.includes("importAssertions: ")) {
|
|
32
|
+
process.stdout.write(data);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
12
35
|
|
|
13
|
-
|
|
36
|
+
child.on("exit", process.exit);
|
|
37
|
+
} else {
|
|
38
|
+
console.log(
|
|
39
|
+
"Loader already applied, this log should not appear in normal execution.",
|
|
40
|
+
);
|
|
14
41
|
}
|
|
15
|
-
|
|
16
|
-
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/index.esm.js
CHANGED
|
@@ -20215,6 +20215,7 @@ const buildWebComponent = async (config) => {
|
|
|
20215
20215
|
};
|
|
20216
20216
|
var dev = async () => {
|
|
20217
20217
|
var _a;
|
|
20218
|
+
checkNodeVersion();
|
|
20218
20219
|
const http = require("http");
|
|
20219
20220
|
ora = (await oraP).default;
|
|
20220
20221
|
process.on("warning", (e) => console.warn(e.stack));
|