@embeddable.com/sdk-react 3.5.2 → 3.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/lib/dynamicImportHandler.js +14 -0
- package/lib/index.esm.js +3 -10
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +3 -10
- package/lib/index.js.map +1 -1
- package/lib/plugin.d.ts +14 -0
- package/lib/proxyHandler.d.ts +4 -0
- package/lib/utils/modules.d.ts +10 -0
- package/lib/validate/errorFormatter.d.ts +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const { fileURLToPath, pathToFileURL } = require("url");
|
|
2
|
+
|
|
3
|
+
async function loadModule(modulePath) {
|
|
4
|
+
try {
|
|
5
|
+
const module = await import(pathToFileURL(modulePath).href);
|
|
6
|
+
process.stdout.write(JSON.stringify(module.meta));
|
|
7
|
+
} catch (error) {
|
|
8
|
+
console.error(`Failed to load module: ${error.message}`);
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const modulePath = fileURLToPath(process.argv[2]);
|
|
14
|
+
loadModule(modulePath);
|
package/lib/index.esm.js
CHANGED
|
@@ -1032,7 +1032,7 @@ const usageValidator = async (directory) => {
|
|
|
1032
1032
|
};
|
|
1033
1033
|
|
|
1034
1034
|
const oraP = import('ora');
|
|
1035
|
-
const EMB_FILE_REGEX =
|
|
1035
|
+
const EMB_FILE_REGEX = /(DataGridWrapper)(?<!\.type|\.options)\.emb\.[jt]s$/;
|
|
1036
1036
|
var generate = async (ctx) => {
|
|
1037
1037
|
var _a;
|
|
1038
1038
|
const ora = (await oraP).default;
|
|
@@ -1081,14 +1081,7 @@ async function runViteBuild(ctx, watch = null) {
|
|
|
1081
1081
|
minify: !watch,
|
|
1082
1082
|
rollupOptions: watch
|
|
1083
1083
|
? {
|
|
1084
|
-
|
|
1085
|
-
if (log.cause &&
|
|
1086
|
-
log.cause.message ===
|
|
1087
|
-
`Can't resolve original location of error.`) {
|
|
1088
|
-
return;
|
|
1089
|
-
}
|
|
1090
|
-
handler(level, log);
|
|
1091
|
-
},
|
|
1084
|
+
...ctx.client.rollupOptions,
|
|
1092
1085
|
output: {
|
|
1093
1086
|
sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => {
|
|
1094
1087
|
// will replace relative paths with absolute paths
|
|
@@ -1096,7 +1089,7 @@ async function runViteBuild(ctx, watch = null) {
|
|
|
1096
1089
|
},
|
|
1097
1090
|
},
|
|
1098
1091
|
}
|
|
1099
|
-
:
|
|
1092
|
+
: ctx.client.rollupOptions,
|
|
1100
1093
|
lib: {
|
|
1101
1094
|
entry: path.resolve(ctx.client.buildDir, ctx["sdk-react"].outputOptions.componentsEntryPointFilename),
|
|
1102
1095
|
formats: ["es"],
|