@absolutejs/absolute 0.19.0-beta.883 → 0.19.0-beta.885
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.js
CHANGED
|
@@ -9883,6 +9883,15 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
|
|
|
9883
9883
|
// patch the prototype, no view recreation needed).
|
|
9884
9884
|
{
|
|
9885
9885
|
const __ng_hmr_id = ${encodedIdLiteral};
|
|
9886
|
+
// Per-class sequence counter. Each \`__ng_hmr_load\` /
|
|
9887
|
+
// \`__ng_hmr_remount\` invocation captures \`seq\` at start, then
|
|
9888
|
+
// checks after the async fetch + before the apply. If a NEWER
|
|
9889
|
+
// event has bumped the counter while we were awaiting (rapid
|
|
9890
|
+
// edits), this older invocation aborts so the latest payload
|
|
9891
|
+
// is the one that lands. Without this guard, racing
|
|
9892
|
+
// \`\u0275\u0275replaceMetadata\` calls can complete out of order and an
|
|
9893
|
+
// older edit's def stomps a newer one's.
|
|
9894
|
+
let __ng_hmr_seq = 0;
|
|
9886
9895
|
// Send a server-side ack so the dev terminal can log the
|
|
9887
9896
|
// full HMR latency (server compile + WS hop + client apply +
|
|
9888
9897
|
// CD pulse) rather than just the server-side compile time.
|
|
@@ -9902,11 +9911,13 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
|
|
|
9902
9911
|
} catch {}
|
|
9903
9912
|
};
|
|
9904
9913
|
const __ng_hmr_load = async (t) => {
|
|
9914
|
+
const mySeq = ++__ng_hmr_seq;
|
|
9905
9915
|
const t0 = performance.now();
|
|
9906
9916
|
const [u, core] = await Promise.all([
|
|
9907
9917
|
import('/@ng/component?c=' + encodeURIComponent(__ng_hmr_id) + '&t=' + t),
|
|
9908
9918
|
import('@angular/core')
|
|
9909
9919
|
]);
|
|
9920
|
+
if (mySeq !== __ng_hmr_seq) return; // superseded by a newer event
|
|
9910
9921
|
if (!u || typeof u.default !== 'function') return;
|
|
9911
9922
|
if (${className}.\u0275cmp && typeof core.\u0275\u0275replaceMetadata === 'function') {
|
|
9912
9923
|
try {
|
|
@@ -9940,11 +9951,13 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
|
|
|
9940
9951
|
// shared implementation is on \`globalThis.__absAngularRemount\` \u2014
|
|
9941
9952
|
// installed by hmrClient.ts's import-time wiring.
|
|
9942
9953
|
const __ng_hmr_remount = async (t) => {
|
|
9954
|
+
const mySeq = ++__ng_hmr_seq;
|
|
9943
9955
|
const t0 = performance.now();
|
|
9944
9956
|
const [u, core] = await Promise.all([
|
|
9945
9957
|
import('/@ng/component?c=' + encodeURIComponent(__ng_hmr_id) + '&t=' + t),
|
|
9946
9958
|
import('@angular/core')
|
|
9947
9959
|
]);
|
|
9960
|
+
if (mySeq !== __ng_hmr_seq) return; // superseded by a newer event
|
|
9948
9961
|
if (!u || typeof u.default !== 'function') return;
|
|
9949
9962
|
if (typeof globalThis.__absAngularRemount === 'function' && ${className}.\u0275cmp) {
|
|
9950
9963
|
try {
|
|
@@ -9956,6 +9969,7 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
|
|
|
9956
9969
|
core,
|
|
9957
9970
|
${JSON.stringify(className)}
|
|
9958
9971
|
);
|
|
9972
|
+
if (mySeq !== __ng_hmr_seq) return; // newer event arrived during remount
|
|
9959
9973
|
__ng_hmr_ack('tier-1a', performance.now() - t0);
|
|
9960
9974
|
} catch (err) {
|
|
9961
9975
|
console.error('[abs-hmr] remount threw for ${className}:', err);
|
|
@@ -20230,6 +20244,38 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
20230
20244
|
});
|
|
20231
20245
|
const { invalidateFingerprintCache: invalidateFingerprintCache2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
|
|
20232
20246
|
invalidateFingerprintCache2();
|
|
20247
|
+
}, angularBundleState, scheduleAngularBundleRebuild = (state, pageEntries, angularDir) => {
|
|
20248
|
+
const ctx = angularBundleState.get(state) ?? {
|
|
20249
|
+
inFlight: null,
|
|
20250
|
+
pending: false
|
|
20251
|
+
};
|
|
20252
|
+
angularBundleState.set(state, ctx);
|
|
20253
|
+
const doOne = async () => {
|
|
20254
|
+
if (pageEntries.length === 0)
|
|
20255
|
+
return;
|
|
20256
|
+
await compileAndBundleAngular(state, pageEntries, angularDir);
|
|
20257
|
+
markSsrCacheDirty("angular");
|
|
20258
|
+
};
|
|
20259
|
+
const drive = async () => {
|
|
20260
|
+
try {
|
|
20261
|
+
while (true) {
|
|
20262
|
+
ctx.pending = false;
|
|
20263
|
+
await doOne();
|
|
20264
|
+
if (!ctx.pending)
|
|
20265
|
+
break;
|
|
20266
|
+
}
|
|
20267
|
+
} finally {
|
|
20268
|
+
ctx.inFlight = null;
|
|
20269
|
+
}
|
|
20270
|
+
};
|
|
20271
|
+
return () => {
|
|
20272
|
+
if (ctx.inFlight) {
|
|
20273
|
+
ctx.pending = true;
|
|
20274
|
+
return ctx.inFlight;
|
|
20275
|
+
}
|
|
20276
|
+
ctx.inFlight = drive();
|
|
20277
|
+
return ctx.inFlight;
|
|
20278
|
+
};
|
|
20233
20279
|
}, compileAndBundleAngular = async (state, pageEntries, angularDir) => {
|
|
20234
20280
|
const { compileAngular: compileAngular2 } = await Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular));
|
|
20235
20281
|
const { clientPaths, serverPaths } = await compileAngular2(pageEntries, angularDir, true, getStyleTransformConfig(state.config));
|
|
@@ -20272,12 +20318,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
20272
20318
|
const tierStart = performance.now();
|
|
20273
20319
|
const verdict = await decideAngularTier(state, angularDir);
|
|
20274
20320
|
const tierMs = (performance.now() - tierStart).toFixed(0);
|
|
20275
|
-
const runBundle =
|
|
20276
|
-
if (pageEntries.length === 0)
|
|
20277
|
-
return;
|
|
20278
|
-
await compileAndBundleAngular(state, pageEntries, angularDir);
|
|
20279
|
-
markSsrCacheDirty("angular");
|
|
20280
|
-
};
|
|
20321
|
+
const runBundle = scheduleAngularBundleRebuild(state, pageEntries, angularDir);
|
|
20281
20322
|
const queueDescription = (queue) => queue.map((e) => e.className).join(", ");
|
|
20282
20323
|
if (verdict.tier === 0) {
|
|
20283
20324
|
broadcastSurgical(state, verdict.queue);
|
|
@@ -21369,6 +21410,7 @@ var init_rebuildTrigger = __esm(() => {
|
|
|
21369
21410
|
init_tailwindCompiler();
|
|
21370
21411
|
init_ssrCache();
|
|
21371
21412
|
moduleServerPromise = Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
|
|
21413
|
+
angularBundleState = new WeakMap;
|
|
21372
21414
|
getReactModuleUrl = getModuleUrl;
|
|
21373
21415
|
EMBER_PAGE_EXTENSIONS = [".gts", ".gjs", ".ts", ".js"];
|
|
21374
21416
|
HMR_SCRIPT_PATTERN = /<script>window\.__HMR_FRAMEWORK__[\s\S]*?<\/script>\s*<script data-hmr-client>[\s\S]*?<\/script>/;
|
|
@@ -30597,5 +30639,5 @@ export {
|
|
|
30597
30639
|
ANGULAR_INIT_TIMEOUT_MS
|
|
30598
30640
|
};
|
|
30599
30641
|
|
|
30600
|
-
//# debugId=
|
|
30642
|
+
//# debugId=DD22867E883BBEBF64756E2164756E21
|
|
30601
30643
|
//# sourceMappingURL=index.js.map
|