@absolutejs/absolute 0.19.0-beta.1096 → 0.19.0-beta.1098

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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-X6J1no/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-g7pc2I/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-X6J1no/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-g7pc2I/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
48
48
  getWarningController()?.maybeWarn(primitiveName);
49
49
  };
50
50
 
51
- // .angular-partial-tmp-X6J1no/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-g7pc2I/src/core/streamingSlotRegistry.ts
52
52
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
53
53
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
54
54
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
package/dist/build.js CHANGED
@@ -26167,6 +26167,32 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
26167
26167
  }
26168
26168
  } catch {}
26169
26169
  }
26170
+ }, drainQueueAndRebuild = async (state, config, onRebuildComplete) => {
26171
+ await waitForStableWrites(state);
26172
+ if (state.isRebuilding) {
26173
+ return;
26174
+ }
26175
+ const userEditedFiles = new Set;
26176
+ state.fileChangeQueue.forEach((filePaths) => {
26177
+ for (const filePath of filePaths) {
26178
+ userEditedFiles.add(resolve40(filePath));
26179
+ }
26180
+ });
26181
+ state.lastUserEditedFiles = userEditedFiles;
26182
+ const filesToProcess = buildFilesToProcess(state);
26183
+ state.fileChangeQueue.clear();
26184
+ if (filesToProcess.size === 0) {
26185
+ return;
26186
+ }
26187
+ const affectedFrameworks = Array.from(filesToProcess.keys());
26188
+ affectedFrameworks.forEach((frameworkKey) => {
26189
+ state.rebuildQueue.add(frameworkKey);
26190
+ });
26191
+ const filesToRebuild = [];
26192
+ filesToProcess.forEach((filePaths) => {
26193
+ filesToRebuild.push(...filePaths);
26194
+ });
26195
+ triggerRebuild(state, config, onRebuildComplete, filesToRebuild);
26170
26196
  }, queueFileChange = async (state, filePath, config, onRebuildComplete) => {
26171
26197
  const framework = detectFramework(filePath, state.resolvedPaths);
26172
26198
  if (framework === "ignored") {
@@ -26280,29 +26306,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
26280
26306
  clearTimeout(state.rebuildTimeout);
26281
26307
  }
26282
26308
  const DEBOUNCE_MS = config.options?.hmr?.debounceMs ?? DEFAULT_DEBOUNCE_MS;
26283
- state.rebuildTimeout = setTimeout(async () => {
26284
- await waitForStableWrites(state);
26285
- const userEditedFiles = new Set;
26286
- state.fileChangeQueue.forEach((filePaths) => {
26287
- for (const filePath2 of filePaths) {
26288
- userEditedFiles.add(resolve40(filePath2));
26289
- }
26290
- });
26291
- state.lastUserEditedFiles = userEditedFiles;
26292
- const filesToProcess = buildFilesToProcess(state);
26293
- state.fileChangeQueue.clear();
26294
- if (filesToProcess.size === 0) {
26295
- return;
26296
- }
26297
- const affectedFrameworks = Array.from(filesToProcess.keys());
26298
- affectedFrameworks.forEach((frameworkKey) => {
26299
- state.rebuildQueue.add(frameworkKey);
26300
- });
26301
- const filesToRebuild = [];
26302
- filesToProcess.forEach((filePaths) => {
26303
- filesToRebuild.push(...filePaths);
26304
- });
26305
- triggerRebuild(state, config, onRebuildComplete, filesToRebuild);
26309
+ state.rebuildTimeout = setTimeout(() => {
26310
+ drainQueueAndRebuild(state, config, onRebuildComplete);
26306
26311
  }, DEBOUNCE_MS);
26307
26312
  }, resolveComponentLookupFile = (componentFile, graph) => {
26308
26313
  if (!componentFile.endsWith(".html")) {
@@ -26412,8 +26417,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
26412
26417
  await Promise.all(entries.map(async (entryName) => {
26413
26418
  if (keep.has(entryName))
26414
26419
  return;
26415
- if (!entryName.endsWith(".js"))
26420
+ if (!entryName.endsWith(".js") && !entryName.endsWith(".css")) {
26416
26421
  return;
26422
+ }
26417
26423
  const parts = entryName.split(".");
26418
26424
  if (parts.length !== 3)
26419
26425
  return;
@@ -27127,6 +27133,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
27127
27133
  handleServerManifestUpdate(state, serverResult);
27128
27134
  await handleClientManifestUpdate(state, clientResult, buildDir);
27129
27135
  await pruneStaleHashedSiblings(serverResult?.outputs);
27136
+ await pruneStaleHashedSiblings(clientResult?.outputs);
27130
27137
  if (serverResult?.success || clientResult?.success) {
27131
27138
  const { chainBundleInlineSourcemap: chainBundleInlineSourcemap2 } = await Promise.resolve().then(() => (init_chainInlineSourcemaps(), exports_chainInlineSourcemaps));
27132
27139
  for (const out of serverResult?.outputs ?? []) {
@@ -27237,6 +27244,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
27237
27244
  ]);
27238
27245
  handleServerManifestUpdate(state, serverResult);
27239
27246
  await handleClientManifestUpdate(state, clientResult, buildDir);
27247
+ await pruneStaleHashedSiblings(serverResult?.outputs);
27248
+ await pruneStaleHashedSiblings(clientResult?.outputs);
27240
27249
  }
27241
27250
  const { manifest } = state;
27242
27251
  const duration = Date.now() - startTime;
@@ -27367,6 +27376,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
27367
27376
  await handleClientManifestUpdate(state, clientResult, buildDir);
27368
27377
  await handleClientManifestUpdate(state, cssResult, buildDir);
27369
27378
  await pruneStaleHashedSiblings(serverResult?.outputs);
27379
+ await pruneStaleHashedSiblings(clientResult?.outputs);
27370
27380
  await pruneStaleHashedSiblings(cssResult?.outputs);
27371
27381
  if (serverResult?.success) {
27372
27382
  const { chainBundleInlineSourcemap: chainBundleInlineSourcemap2 } = await Promise.resolve().then(() => (init_chainInlineSourcemaps(), exports_chainInlineSourcemaps));
@@ -28194,17 +28204,10 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
28194
28204
  if (state.fileChangeQueue.size === 0) {
28195
28205
  return;
28196
28206
  }
28197
- const pending = Array.from(state.fileChangeQueue.keys());
28198
- const queuedFiles = [];
28199
- state.fileChangeQueue.forEach((filePaths) => {
28200
- queuedFiles.push(...filePaths);
28201
- });
28202
- state.fileChangeQueue.clear();
28203
- pending.forEach((file4) => state.rebuildQueue.add(file4));
28204
28207
  if (state.rebuildTimeout)
28205
28208
  clearTimeout(state.rebuildTimeout);
28206
28209
  state.rebuildTimeout = setTimeout(() => {
28207
- triggerRebuild(state, config, onRebuildComplete, queuedFiles.length > 0 ? queuedFiles : undefined);
28210
+ drainQueueAndRebuild(state, config, onRebuildComplete);
28208
28211
  }, REBUILD_BATCH_DELAY_MS);
28209
28212
  }, STYLE_FILE_EXT_RE, hasAngularOwnedStyleEdit = async (state, angularDir) => {
28210
28213
  const edited = state.lastUserEditedFiles;
@@ -29095,5 +29098,5 @@ export {
29095
29098
  build
29096
29099
  };
29097
29100
 
29098
- //# debugId=43AB0E9B045691AA64756E2164756E21
29101
+ //# debugId=BC416AC2EAE55DC864756E2164756E21
29099
29102
  //# sourceMappingURL=build.js.map