@absolutejs/absolute 0.19.0-beta.885 → 0.19.0-beta.887
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
|
@@ -20244,12 +20244,18 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
20244
20244
|
});
|
|
20245
20245
|
const { invalidateFingerprintCache: invalidateFingerprintCache2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
|
|
20246
20246
|
invalidateFingerprintCache2();
|
|
20247
|
-
}, angularBundleState, scheduleAngularBundleRebuild = (state, pageEntries, angularDir) => {
|
|
20248
|
-
|
|
20249
|
-
|
|
20250
|
-
|
|
20251
|
-
|
|
20252
|
-
|
|
20247
|
+
}, ANGULAR_BUNDLE_DEBOUNCE_MS = 2000, angularBundleState, scheduleAngularBundleRebuild = (state, pageEntries, angularDir) => {
|
|
20248
|
+
let ctx = angularBundleState.get(state);
|
|
20249
|
+
if (!ctx) {
|
|
20250
|
+
ctx = {
|
|
20251
|
+
debouncedPromise: null,
|
|
20252
|
+
debouncedResolve: null,
|
|
20253
|
+
debounceTimer: null,
|
|
20254
|
+
inFlight: null,
|
|
20255
|
+
pending: false
|
|
20256
|
+
};
|
|
20257
|
+
angularBundleState.set(state, ctx);
|
|
20258
|
+
}
|
|
20253
20259
|
const doOne = async () => {
|
|
20254
20260
|
if (pageEntries.length === 0)
|
|
20255
20261
|
return;
|
|
@@ -20268,14 +20274,46 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
20268
20274
|
ctx.inFlight = null;
|
|
20269
20275
|
}
|
|
20270
20276
|
};
|
|
20271
|
-
|
|
20277
|
+
const fire = () => {
|
|
20278
|
+
ctx.debounceTimer = null;
|
|
20279
|
+
const resolve38 = ctx.debouncedResolve;
|
|
20280
|
+
ctx.debouncedResolve = null;
|
|
20281
|
+
ctx.debouncedPromise = null;
|
|
20272
20282
|
if (ctx.inFlight) {
|
|
20273
20283
|
ctx.pending = true;
|
|
20274
|
-
|
|
20284
|
+
ctx.inFlight.finally(() => resolve38?.());
|
|
20285
|
+
return;
|
|
20275
20286
|
}
|
|
20276
20287
|
ctx.inFlight = drive();
|
|
20277
|
-
|
|
20288
|
+
ctx.inFlight.finally(() => resolve38?.());
|
|
20278
20289
|
};
|
|
20290
|
+
return ({ immediate = false } = {}) => {
|
|
20291
|
+
if (!ctx.debouncedPromise) {
|
|
20292
|
+
ctx.debouncedPromise = new Promise((res) => {
|
|
20293
|
+
ctx.debouncedResolve = res;
|
|
20294
|
+
});
|
|
20295
|
+
}
|
|
20296
|
+
if (immediate) {
|
|
20297
|
+
if (ctx.debounceTimer) {
|
|
20298
|
+
clearTimeout(ctx.debounceTimer);
|
|
20299
|
+
ctx.debounceTimer = null;
|
|
20300
|
+
}
|
|
20301
|
+
fire();
|
|
20302
|
+
} else if (!ctx.debounceTimer) {
|
|
20303
|
+
ctx.debounceTimer = setTimeout(fire, ANGULAR_BUNDLE_DEBOUNCE_MS);
|
|
20304
|
+
} else {
|
|
20305
|
+
clearTimeout(ctx.debounceTimer);
|
|
20306
|
+
ctx.debounceTimer = setTimeout(fire, ANGULAR_BUNDLE_DEBOUNCE_MS);
|
|
20307
|
+
}
|
|
20308
|
+
return ctx.debouncedPromise;
|
|
20309
|
+
};
|
|
20310
|
+
}, runAngularHmrIncremental = async (state) => {
|
|
20311
|
+
try {
|
|
20312
|
+
const { compileAngularForHmr: compileAngularForHmr2 } = await Promise.resolve().then(() => (init_hmrCompiler(), exports_hmrCompiler));
|
|
20313
|
+
await compileAngularForHmr2([], state.resolvedPaths.buildDir, state.lastUserEditedFiles ?? null);
|
|
20314
|
+
} catch (err) {
|
|
20315
|
+
logWarn(`[hmr] surgical-HMR shadow compile skipped: ${err instanceof Error ? err.message : String(err)}`);
|
|
20316
|
+
}
|
|
20279
20317
|
}, compileAndBundleAngular = async (state, pageEntries, angularDir) => {
|
|
20280
20318
|
const { compileAngular: compileAngular2 } = await Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular));
|
|
20281
20319
|
const { clientPaths, serverPaths } = await compileAngular2(pageEntries, angularDir, true, getStyleTransformConfig(state.config));
|
|
@@ -20321,21 +20359,17 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
20321
20359
|
const runBundle = scheduleAngularBundleRebuild(state, pageEntries, angularDir);
|
|
20322
20360
|
const queueDescription = (queue) => queue.map((e) => e.className).join(", ");
|
|
20323
20361
|
if (verdict.tier === 0) {
|
|
20362
|
+
await runAngularHmrIncremental(state);
|
|
20324
20363
|
broadcastSurgical(state, verdict.queue);
|
|
20325
20364
|
const b2 = verdict.breakdown;
|
|
20326
20365
|
logInfo(`[ng-hmr] tier-0 ${queueDescription(verdict.queue)} (server ${tierMs}ms: imports ${b2.importsMs}/resolve ${b2.resolveMs}/compile ${b2.compileMs}; awaiting client apply)`);
|
|
20327
|
-
runBundle().catch((err) => {
|
|
20328
|
-
logWarn(`[ng-hmr async bundle] rebuild failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
20329
|
-
});
|
|
20330
20366
|
} else if (verdict.tier === 1 && verdict.kind === "remount") {
|
|
20367
|
+
await runAngularHmrIncremental(state);
|
|
20331
20368
|
broadcastRemount(state, verdict.queue);
|
|
20332
20369
|
const b2 = verdict.breakdown;
|
|
20333
20370
|
logInfo(`[ng-hmr] tier-1a remount ${queueDescription(verdict.queue)} (server ${tierMs}ms: imports ${b2.importsMs}/resolve ${b2.resolveMs}/compile ${b2.compileMs}; awaiting client apply)`);
|
|
20334
|
-
runBundle().catch((err) => {
|
|
20335
|
-
logWarn(`[ng-hmr async bundle] rebuild failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
20336
|
-
});
|
|
20337
20371
|
} else if (verdict.tier === 1 && verdict.kind === "rebootstrap") {
|
|
20338
|
-
await runBundle();
|
|
20372
|
+
await runBundle({ immediate: true });
|
|
20339
20373
|
await broadcastRebootstrap(state, verdict.reason);
|
|
20340
20374
|
}
|
|
20341
20375
|
const { manifest } = state;
|
|
@@ -30639,5 +30673,5 @@ export {
|
|
|
30639
30673
|
ANGULAR_INIT_TIMEOUT_MS
|
|
30640
30674
|
};
|
|
30641
30675
|
|
|
30642
|
-
//# debugId=
|
|
30676
|
+
//# debugId=F971A5A35190242364756E2164756E21
|
|
30643
30677
|
//# sourceMappingURL=index.js.map
|