@mercurjs/dashboard-sdk 2.0.0-canary.75 → 2.0.0-canary.76
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/dist/index.cjs +7 -2
- package/dist/index.js +6 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -38,6 +38,9 @@ module.exports = __toCommonJS(index_exports);
|
|
|
38
38
|
var import_path5 = __toESM(require("path"), 1);
|
|
39
39
|
var import_fs4 = __toESM(require("fs"), 1);
|
|
40
40
|
|
|
41
|
+
// src/utils.ts
|
|
42
|
+
var import_node_module = require("module");
|
|
43
|
+
|
|
41
44
|
// src/babel.ts
|
|
42
45
|
var import_parser = require("@babel/parser");
|
|
43
46
|
var import_traverse = __toESM(require("@babel/traverse"), 1);
|
|
@@ -50,6 +53,7 @@ if (typeof import_traverse.default === "function") {
|
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
// src/utils.ts
|
|
56
|
+
var import_meta = {};
|
|
53
57
|
function normalizePath(filePath) {
|
|
54
58
|
return filePath.replace(/\\/g, "/");
|
|
55
59
|
}
|
|
@@ -69,9 +73,10 @@ function resolveExports(moduleExports) {
|
|
|
69
73
|
}
|
|
70
74
|
return moduleExports;
|
|
71
75
|
}
|
|
72
|
-
|
|
76
|
+
var esmRequire = typeof require !== "undefined" ? require : (0, import_node_module.createRequire)(import_meta.url);
|
|
77
|
+
async function getFileExports(filePath) {
|
|
73
78
|
const { unregister } = await safeRegister();
|
|
74
|
-
const module2 =
|
|
79
|
+
const module2 = esmRequire(filePath);
|
|
75
80
|
unregister();
|
|
76
81
|
return resolveExports(module2);
|
|
77
82
|
}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
9
9
|
import path5 from "path";
|
|
10
10
|
import fs4 from "fs";
|
|
11
11
|
|
|
12
|
+
// src/utils.ts
|
|
13
|
+
import { createRequire } from "module";
|
|
14
|
+
|
|
12
15
|
// src/babel.ts
|
|
13
16
|
import { parse } from "@babel/parser";
|
|
14
17
|
import _traverse from "@babel/traverse";
|
|
@@ -53,9 +56,10 @@ function resolveExports(moduleExports) {
|
|
|
53
56
|
}
|
|
54
57
|
return moduleExports;
|
|
55
58
|
}
|
|
56
|
-
|
|
59
|
+
var esmRequire = typeof __require !== "undefined" ? __require : createRequire(import.meta.url);
|
|
60
|
+
async function getFileExports(filePath) {
|
|
57
61
|
const { unregister } = await safeRegister();
|
|
58
|
-
const module =
|
|
62
|
+
const module = esmRequire(filePath);
|
|
59
63
|
unregister();
|
|
60
64
|
return resolveExports(module);
|
|
61
65
|
}
|