mhx 2026.1.6 → 2026.1.7
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/npm/index.js +3 -3
- package/npm/postbuild.mjs +4 -8
- package/package.json +1 -1
package/npm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as mhxFfi from "../dist/mhx_ffi.js";
|
|
2
|
+
import * as mhx from "../dist/index.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
globalThis.mhx_ffi = mhxFfi;
|
|
5
5
|
if (mhxFfi.initMhxFfi) {
|
|
6
6
|
mhxFfi.initMhxFfi({
|
|
7
7
|
on_fetch_success: mhx.on_fetch_success,
|
package/npm/postbuild.mjs
CHANGED
|
@@ -9,14 +9,10 @@ const buildFfi = join(root, "src/ffi/mhx_ffi.js");
|
|
|
9
9
|
mkdirSync(distDir, { recursive: true });
|
|
10
10
|
|
|
11
11
|
let mainJs = readFileSync(buildMain, "utf8");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (start !== -1 && end !== -1) {
|
|
17
|
-
mainJs = mainJs.slice(0, start) + mainJs.slice(end + 5);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
12
|
+
mainJs = mainJs.replace(
|
|
13
|
+
/\(\(\)\s*=>\s*\{[\s\S]*?moonbitlang\$async\$\$run_async_main[\s\S]*?\}\)\(\);/g,
|
|
14
|
+
"",
|
|
15
|
+
);
|
|
20
16
|
const exportsBlock = `
|
|
21
17
|
export const init_mhx = f4ah6o$mhx$core$$init_mhx;
|
|
22
18
|
export const process = f4ah6o$mhx$core$$process;
|