@absolutejs/absolute 0.19.0-beta.1101 → 0.19.0-beta.1103

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-5v4sJq/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-B8wHMF/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-5v4sJq/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-B8wHMF/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-5v4sJq/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-B8wHMF/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
@@ -14191,6 +14191,7 @@ var resolveDevClientDir2 = () => {
14191
14191
  const built = {
14192
14192
  client: clientPath,
14193
14193
  hasAwaitSlot: loweredAwaitServerSource.transformed || loweredAwaitClientSource.transformed || loweredServerSource.transformed || loweredClientSource.transformed || hasAwaitSlotFromChildren,
14194
+ isModule,
14194
14195
  ssr: ssrPath
14195
14196
  };
14196
14197
  cache.set(src, built);
@@ -14198,7 +14199,8 @@ var resolveDevClientDir2 = () => {
14198
14199
  return built;
14199
14200
  };
14200
14201
  const roots = await Promise.all(entryPoints.map(build));
14201
- await Promise.all(roots.map(async ({ client, hasAwaitSlot }) => {
14202
+ const componentRoots = roots.filter((root) => !root.isModule);
14203
+ await Promise.all(componentRoots.map(async ({ client, hasAwaitSlot }) => {
14202
14204
  const relClientDir = dirname14(relative11(clientDir, client));
14203
14205
  const name = basename10(client, extname6(client));
14204
14206
  const indexPath = join28(indexDir, relClientDir, `${name}.js`);
@@ -14286,7 +14288,7 @@ if (typeof window !== "undefined") {
14286
14288
  }));
14287
14289
  return {
14288
14290
  svelteClientPaths: roots.map(({ client }) => client),
14289
- svelteIndexPaths: roots.map(({ client }) => {
14291
+ svelteIndexPaths: componentRoots.map(({ client }) => {
14290
14292
  const rel = dirname14(relative11(clientDir, client));
14291
14293
  return join28(indexDir, rel, basename10(client));
14292
14294
  }),
@@ -29176,6 +29178,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
29176
29178
  const state = cached.hmrState;
29177
29179
  await waitForRebuild(state);
29178
29180
  state.isRebuilding = true;
29181
+ state.fileChangeQueue.clear();
29179
29182
  try {
29180
29183
  const buildResult = await build({
29181
29184
  ...state.config,
@@ -29198,7 +29201,10 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
29198
29201
  } catch {} finally {
29199
29202
  state.rebuildCount++;
29200
29203
  state.isRebuilding = false;
29201
- state.fileChangeQueue.clear();
29204
+ drainPendingQueue(state, state.config, (newBuildResult) => {
29205
+ Object.assign(cached.manifest, newBuildResult.manifest);
29206
+ state.manifest = cached.manifest;
29207
+ });
29202
29208
  }
29203
29209
  }, handleCachedReload = async () => {
29204
29210
  const serverMtime = statSync7(resolve43(Bun.main)).mtimeMs;
@@ -29313,6 +29319,56 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
29313
29319
  stepStartedAt = performance.now();
29314
29320
  await resolveAbsoluteVersion2();
29315
29321
  recordStep("resolve version", stepStartedAt);
29322
+ const manifest = {};
29323
+ stepStartedAt = performance.now();
29324
+ const onWatcherRebuildComplete = (newBuildResult) => {
29325
+ Object.assign(manifest, newBuildResult.manifest);
29326
+ state.manifest = manifest;
29327
+ };
29328
+ const settleRecoveryQueue = () => {
29329
+ if (state.initialBuildFailed) {
29330
+ state.fileChangeQueue.clear();
29331
+ return;
29332
+ }
29333
+ drainPendingQueue(state, config, onWatcherRebuildComplete);
29334
+ };
29335
+ const recoverFromColdStartFailure = async () => {
29336
+ await waitForRebuild(state);
29337
+ state.isRebuilding = true;
29338
+ state.fileChangeQueue.clear();
29339
+ try {
29340
+ const recoveryResult = await build({
29341
+ ...config,
29342
+ mode: "development",
29343
+ options: {
29344
+ ...config.options,
29345
+ injectHMR: true,
29346
+ throwOnError: true
29347
+ }
29348
+ });
29349
+ if (recoveryResult?.manifest) {
29350
+ Object.assign(manifest, recoveryResult.manifest);
29351
+ state.manifest = manifest;
29352
+ await populateAssetStore(state.assetStore, manifest, state.resolvedPaths.buildDir);
29353
+ state.initialBuildFailed = false;
29354
+ console.log("[hmr] cold-start recovery rebuild succeeded \u2014 manifest populated.");
29355
+ }
29356
+ } catch {} finally {
29357
+ state.rebuildCount++;
29358
+ state.isRebuilding = false;
29359
+ settleRecoveryQueue();
29360
+ }
29361
+ };
29362
+ state.isRebuilding = true;
29363
+ startFileWatching(state, config, (filePath) => {
29364
+ if (state.initialBuildFailed) {
29365
+ recoverFromColdStartFailure();
29366
+ return;
29367
+ }
29368
+ queueFileChange(state, filePath, config, onWatcherRebuildComplete);
29369
+ });
29370
+ console.log("[hmr] watching for file changes \u2014 edits saved during the boot build are queued.");
29371
+ recordStep("start file watching", stepStartedAt);
29316
29372
  const buildStart = performance.now();
29317
29373
  let buildResult = null;
29318
29374
  try {
@@ -29333,7 +29389,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
29333
29389
  }
29334
29390
  state.initialBuildFailed = true;
29335
29391
  }
29336
- const manifest = buildResult?.manifest ?? {};
29392
+ Object.assign(manifest, buildResult?.manifest ?? {});
29337
29393
  const conventions = buildResult?.conventions ?? {};
29338
29394
  if (buildResult?.errors && buildResult.errors.length > 0) {
29339
29395
  state.lastBuildErrors = buildResult.errors;
@@ -29420,44 +29476,14 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
29420
29476
  recordStep("warm tailwind compiler", stepStartedAt);
29421
29477
  }
29422
29478
  state.manifest = manifest;
29423
- stepStartedAt = performance.now();
29424
- const recoverFromColdStartFailure = async () => {
29425
- await waitForRebuild(state);
29426
- state.isRebuilding = true;
29427
- try {
29428
- const recoveryResult = await build({
29429
- ...config,
29430
- mode: "development",
29431
- options: {
29432
- ...config.options,
29433
- injectHMR: true,
29434
- throwOnError: true
29435
- }
29436
- });
29437
- if (recoveryResult?.manifest) {
29438
- Object.assign(manifest, recoveryResult.manifest);
29439
- state.manifest = manifest;
29440
- await populateAssetStore(state.assetStore, manifest, state.resolvedPaths.buildDir);
29441
- state.initialBuildFailed = false;
29442
- console.log("[hmr] cold-start recovery rebuild succeeded \u2014 manifest populated.");
29443
- }
29444
- } catch {} finally {
29445
- state.rebuildCount++;
29446
- state.isRebuilding = false;
29447
- state.fileChangeQueue.clear();
29448
- }
29449
- };
29450
- startFileWatching(state, config, (filePath) => {
29451
- if (state.initialBuildFailed) {
29452
- recoverFromColdStartFailure();
29453
- return;
29454
- }
29455
- queueFileChange(state, filePath, config, (newBuildResult) => {
29456
- Object.assign(manifest, newBuildResult.manifest);
29457
- state.manifest = manifest;
29458
- });
29459
- });
29460
- recordStep("start file watching", stepStartedAt);
29479
+ state.isRebuilding = false;
29480
+ if (state.fileChangeQueue.size > 0 && state.initialBuildFailed) {
29481
+ state.fileChangeQueue.clear();
29482
+ recoverFromColdStartFailure();
29483
+ } else if (state.fileChangeQueue.size > 0) {
29484
+ console.log("[hmr] edits landed during the boot build \u2014 rebuilding to pick them up.");
29485
+ drainPendingQueue(state, config, onWatcherRebuildComplete);
29486
+ }
29461
29487
  globalThis.__hmrBuildDuration = performance.now() - buildStart;
29462
29488
  logStartupTimingBlock("AbsoluteJS devBuild timing", startupSteps);
29463
29489
  const result = {
@@ -29506,5 +29532,5 @@ export {
29506
29532
  build
29507
29533
  };
29508
29534
 
29509
- //# debugId=4D88A1C2DD16F93964756E2164756E21
29535
+ //# debugId=D5BC49AA2D61155364756E2164756E21
29510
29536
  //# sourceMappingURL=build.js.map