mhx 2026.1.17 → 2026.1.18
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.mjs +10 -1
- package/npm/postbuild.mjs +13 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9631,9 +9631,18 @@ const handle_event = (event, target) =>
|
|
|
9631
9631
|
const get_instance = () => f4ah6o$mhx$core$$global_mhx;
|
|
9632
9632
|
|
|
9633
9633
|
|
|
9634
|
+
const mhx_callbacks = {
|
|
9635
|
+
on_fetch_success: f4ah6o$mhx$network$$on_fetch_success,
|
|
9636
|
+
on_fetch_error: f4ah6o$mhx$network$$on_fetch_error,
|
|
9637
|
+
on_mutation_observed: f4ah6o$mhx$core$$on_mutation_observed,
|
|
9638
|
+
};
|
|
9639
|
+
mhx_ffi.initMhxFfi(mhx_callbacks);
|
|
9640
|
+
globalThis.mhx_callbacks = mhx_callbacks;
|
|
9641
|
+
|
|
9642
|
+
|
|
9634
9643
|
export const init_mhx = f4ah6o$mhx$core$$init_mhx;
|
|
9635
9644
|
export { process, handle_event, get_instance };
|
|
9636
|
-
export const version = "2026.1.
|
|
9645
|
+
export const version = "2026.1.18";
|
|
9637
9646
|
export const on_fetch_success = f4ah6o$mhx$network$$on_fetch_success;
|
|
9638
9647
|
export const on_fetch_error = f4ah6o$mhx$network$$on_fetch_error;
|
|
9639
9648
|
export const on_mutation_observed = f4ah6o$mhx$core$$on_mutation_observed;
|
package/npm/postbuild.mjs
CHANGED
|
@@ -20,6 +20,16 @@ const packageVersion = String(packageJson.version ?? "0.0.0");
|
|
|
20
20
|
const autorunRe =
|
|
21
21
|
/\(\(\)\s*=>\s*\{\s*moonbitlang\$async\$\$run_async_main\([\s\S]*?\);\s*\}\)\(\);\s*/;
|
|
22
22
|
const rawMainJsNoAutorun = rawMainJs.replace(autorunRe, "");
|
|
23
|
+
|
|
24
|
+
const ffiInitBlock = `
|
|
25
|
+
const mhx_callbacks = {
|
|
26
|
+
on_fetch_success: f4ah6o$mhx$network$$on_fetch_success,
|
|
27
|
+
on_fetch_error: f4ah6o$mhx$network$$on_fetch_error,
|
|
28
|
+
on_mutation_observed: f4ah6o$mhx$core$$on_mutation_observed,
|
|
29
|
+
};
|
|
30
|
+
mhx_ffi.initMhxFfi(mhx_callbacks);
|
|
31
|
+
globalThis.mhx_callbacks = mhx_callbacks;
|
|
32
|
+
`;
|
|
23
33
|
let esmMainJs = rawMainJsNoAutorun;
|
|
24
34
|
const ffiHeader =
|
|
25
35
|
'import mhxFfi from "./mhx_ffi.js";\nconst mhx_ffi = mhxFfi;\n';
|
|
@@ -49,6 +59,9 @@ const hasStableExports = esmMainJs.includes("const process = (root) =>");
|
|
|
49
59
|
if (!hasStableExports) {
|
|
50
60
|
esmMainJs += `\n${stableExports}`;
|
|
51
61
|
}
|
|
62
|
+
if (!esmMainJs.includes("mhx_ffi.initMhxFfi")) {
|
|
63
|
+
esmMainJs += `\n${ffiInitBlock}`;
|
|
64
|
+
}
|
|
52
65
|
if (!esmMainJs.includes("export const init_mhx")) {
|
|
53
66
|
esmMainJs += `\n${exportsBlock}`;
|
|
54
67
|
}
|