@absolutejs/absolute 0.19.0-beta.884 → 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
@@ -20244,6 +20244,38 @@ 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
+ 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
+ };
20247
20279
  }, compileAndBundleAngular = async (state, pageEntries, angularDir) => {
20248
20280
  const { compileAngular: compileAngular2 } = await Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular));
20249
20281
  const { clientPaths, serverPaths } = await compileAngular2(pageEntries, angularDir, true, getStyleTransformConfig(state.config));
@@ -20286,12 +20318,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
20286
20318
  const tierStart = performance.now();
20287
20319
  const verdict = await decideAngularTier(state, angularDir);
20288
20320
  const tierMs = (performance.now() - tierStart).toFixed(0);
20289
- const runBundle = async () => {
20290
- if (pageEntries.length === 0)
20291
- return;
20292
- await compileAndBundleAngular(state, pageEntries, angularDir);
20293
- markSsrCacheDirty("angular");
20294
- };
20321
+ const runBundle = scheduleAngularBundleRebuild(state, pageEntries, angularDir);
20295
20322
  const queueDescription = (queue) => queue.map((e) => e.className).join(", ");
20296
20323
  if (verdict.tier === 0) {
20297
20324
  broadcastSurgical(state, verdict.queue);
@@ -21383,6 +21410,7 @@ var init_rebuildTrigger = __esm(() => {
21383
21410
  init_tailwindCompiler();
21384
21411
  init_ssrCache();
21385
21412
  moduleServerPromise = Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
21413
+ angularBundleState = new WeakMap;
21386
21414
  getReactModuleUrl = getModuleUrl;
21387
21415
  EMBER_PAGE_EXTENSIONS = [".gts", ".gjs", ".ts", ".js"];
21388
21416
  HMR_SCRIPT_PATTERN = /<script>window\.__HMR_FRAMEWORK__[\s\S]*?<\/script>\s*<script data-hmr-client>[\s\S]*?<\/script>/;
@@ -30611,5 +30639,5 @@ export {
30611
30639
  ANGULAR_INIT_TIMEOUT_MS
30612
30640
  };
30613
30641
 
30614
- //# debugId=8DCA359899760D3964756E2164756E21
30642
+ //# debugId=DD22867E883BBEBF64756E2164756E21
30615
30643
  //# sourceMappingURL=index.js.map