@absolutejs/absolute 0.19.0-beta.883 → 0.19.0-beta.884
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);
|
|
@@ -30597,5 +30611,5 @@ export {
|
|
|
30597
30611
|
ANGULAR_INIT_TIMEOUT_MS
|
|
30598
30612
|
};
|
|
30599
30613
|
|
|
30600
|
-
//# debugId=
|
|
30614
|
+
//# debugId=8DCA359899760D3964756E2164756E21
|
|
30601
30615
|
//# sourceMappingURL=index.js.map
|