@absolutejs/absolute 0.18.3-beta.11 → 0.18.3-beta.12
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/build.js +20 -14
- package/dist/build.js.map +5 -4
- package/dist/index.js +46 -36
- package/dist/index.js.map +6 -5
- package/dist/react/index.js +44 -1
- package/dist/react/index.js.map +5 -4
- package/dist/src/react/bridgeInternals.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79,6 +79,45 @@ var init_constants = __esm(() => {
|
|
|
79
79
|
TWO_THIRDS = 2 / 3;
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
+
// src/react/bridgeInternals.ts
|
|
83
|
+
var INTERNALS_KEYS, findInternals = (mod) => {
|
|
84
|
+
for (const key of INTERNALS_KEYS) {
|
|
85
|
+
const val = mod[key];
|
|
86
|
+
if (val)
|
|
87
|
+
return val;
|
|
88
|
+
}
|
|
89
|
+
return;
|
|
90
|
+
}, bridgeReactInternals = async () => {
|
|
91
|
+
const pinned = globalThis.__reactModuleRef;
|
|
92
|
+
if (!pinned)
|
|
93
|
+
return;
|
|
94
|
+
const react = await import("react");
|
|
95
|
+
if (pinned === react)
|
|
96
|
+
return;
|
|
97
|
+
const pinnedInternals = findInternals(pinned);
|
|
98
|
+
const currentInternals = findInternals(react);
|
|
99
|
+
if (!pinnedInternals || !currentInternals || pinnedInternals === currentInternals)
|
|
100
|
+
return;
|
|
101
|
+
for (const prop of Object.keys(pinnedInternals)) {
|
|
102
|
+
Object.defineProperty(currentInternals, prop, {
|
|
103
|
+
get() {
|
|
104
|
+
return pinnedInternals[prop];
|
|
105
|
+
},
|
|
106
|
+
set(v) {
|
|
107
|
+
pinnedInternals[prop] = v;
|
|
108
|
+
},
|
|
109
|
+
configurable: true,
|
|
110
|
+
enumerable: true
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
var init_bridgeInternals = __esm(() => {
|
|
115
|
+
INTERNALS_KEYS = [
|
|
116
|
+
"__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE",
|
|
117
|
+
"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED"
|
|
118
|
+
];
|
|
119
|
+
});
|
|
120
|
+
|
|
82
121
|
// src/utils/normalizePath.ts
|
|
83
122
|
var normalizePath = (path) => path.replace(/\\/g, "/");
|
|
84
123
|
|
|
@@ -173552,37 +173591,7 @@ __export(exports_devBuild, {
|
|
|
173552
173591
|
import { readdir as readdir2 } from "fs/promises";
|
|
173553
173592
|
import { statSync } from "fs";
|
|
173554
173593
|
import { resolve as resolve20 } from "path";
|
|
173555
|
-
var
|
|
173556
|
-
for (const key of INTERNALS_KEYS) {
|
|
173557
|
-
const val = mod[key];
|
|
173558
|
-
if (val)
|
|
173559
|
-
return val;
|
|
173560
|
-
}
|
|
173561
|
-
return;
|
|
173562
|
-
}, bridgeReactInternals = async () => {
|
|
173563
|
-
const pinned = globalThis.__reactModuleRef;
|
|
173564
|
-
if (!pinned)
|
|
173565
|
-
return;
|
|
173566
|
-
const react = await import("react");
|
|
173567
|
-
if (pinned === react)
|
|
173568
|
-
return;
|
|
173569
|
-
const pinnedInternals = findInternals(pinned);
|
|
173570
|
-
const currentInternals = findInternals(react);
|
|
173571
|
-
if (!pinnedInternals || !currentInternals || pinnedInternals === currentInternals)
|
|
173572
|
-
return;
|
|
173573
|
-
for (const prop of Object.keys(pinnedInternals)) {
|
|
173574
|
-
Object.defineProperty(currentInternals, prop, {
|
|
173575
|
-
get() {
|
|
173576
|
-
return pinnedInternals[prop];
|
|
173577
|
-
},
|
|
173578
|
-
set(v) {
|
|
173579
|
-
pinnedInternals[prop] = v;
|
|
173580
|
-
},
|
|
173581
|
-
configurable: true,
|
|
173582
|
-
enumerable: true
|
|
173583
|
-
});
|
|
173584
|
-
}
|
|
173585
|
-
}, FRAMEWORK_DIR_KEYS, reloadConfig = async () => {
|
|
173594
|
+
var FRAMEWORK_DIR_KEYS, reloadConfig = async () => {
|
|
173586
173595
|
try {
|
|
173587
173596
|
const configPath2 = resolve20(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
|
|
173588
173597
|
const source = await Bun.file(configPath2).text();
|
|
@@ -173786,10 +173795,7 @@ var init_devBuild = __esm(() => {
|
|
|
173786
173795
|
init_assetStore();
|
|
173787
173796
|
init_rebuildTrigger();
|
|
173788
173797
|
init_logger();
|
|
173789
|
-
|
|
173790
|
-
"__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE",
|
|
173791
|
-
"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED"
|
|
173792
|
-
];
|
|
173798
|
+
init_bridgeInternals();
|
|
173793
173799
|
FRAMEWORK_DIR_KEYS = [
|
|
173794
173800
|
"reactDirectory",
|
|
173795
173801
|
"svelteDirectory",
|
|
@@ -173927,9 +173933,13 @@ body{min-height:100vh;background:linear-gradient(135deg,rgba(15,23,42,0.98) 0%,r
|
|
|
173927
173933
|
};
|
|
173928
173934
|
|
|
173929
173935
|
// src/react/pageHandler.ts
|
|
173936
|
+
init_bridgeInternals();
|
|
173930
173937
|
var handleReactPageRequest = async (PageComponent, index, ...props) => {
|
|
173931
173938
|
try {
|
|
173932
173939
|
const [maybeProps] = props;
|
|
173940
|
+
if (true) {
|
|
173941
|
+
await bridgeReactInternals();
|
|
173942
|
+
}
|
|
173933
173943
|
const { createElement } = await import("react");
|
|
173934
173944
|
const { renderToReadableStream } = await import("react-dom/server");
|
|
173935
173945
|
const element = maybeProps !== undefined ? createElement(PageComponent, maybeProps) : createElement(PageComponent);
|
|
@@ -174232,5 +174242,5 @@ export {
|
|
|
174232
174242
|
ANGULAR_INIT_TIMEOUT_MS
|
|
174233
174243
|
};
|
|
174234
174244
|
|
|
174235
|
-
//# debugId=
|
|
174245
|
+
//# debugId=108DC1BDF174039564756E2164756E21
|
|
174236
174246
|
//# sourceMappingURL=index.js.map
|