@absolutejs/absolute 0.16.10 → 0.16.11-beta.1

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,14 +1,18 @@
1
1
  {
2
2
  "permissions": {
3
3
  "allow": [
4
- "WebSearch",
5
- "WebFetch(domain:bun.com)",
6
- "WebFetch(domain:github.com)",
4
+ "Bash(export PATH=\"$HOME/.bun/bin:$PATH\")",
7
5
  "Bash(bun run typecheck:*)",
8
- "WebFetch(domain:gist.github.com)",
9
- "WebFetch(domain:vite.dev)",
10
- "WebFetch(domain:leapcell.io)",
11
- "Bash(bun run build:*)"
6
+ "Bash(bun install:*)",
7
+ "Bash(curl:*)",
8
+ "Bash(pkill:*)",
9
+ "Bash(echo:*)",
10
+ "Bash(bun run build:*)",
11
+ "Bash(ln:*)",
12
+ "Bash(NODE_ENV=development bun run:*)",
13
+ "Bash(ls:*)",
14
+ "Bash(head:*)",
15
+ "Bash(bun run:*)"
12
16
  ]
13
17
  }
14
18
  }
package/dist/index.js CHANGED
@@ -1306,7 +1306,8 @@ var generateReactIndexFiles = async (reactPagesDirectory, reactIndexesDirectory,
1306
1306
  });
1307
1307
  await Promise.all(promises);
1308
1308
  if (isDev) {
1309
- await writeFile(join(reactIndexesDirectory, "_refresh.tsx"), `import 'react';
1309
+ await writeFile(join(reactIndexesDirectory, "_refresh.tsx"), `import '${refreshSetupPath}';
1310
+ import 'react';
1310
1311
  import 'react-dom/client';
1311
1312
  `);
1312
1313
  }
@@ -3072,6 +3073,8 @@ var triggerRebuild = async (state, config, onRebuildComplete, filesToRebuild) =>
3072
3073
  throw new Error("Build failed - no manifest generated");
3073
3074
  }
3074
3075
  const duration = Date.now() - startTime;
3076
+ await populateAssetStore(state.assetStore, manifest, state.resolvedPaths.buildDir);
3077
+ await cleanStaleAssets(state.assetStore, manifest, state.resolvedPaths.buildDir);
3075
3078
  broadcastToClients(state, {
3076
3079
  data: {
3077
3080
  affectedFrameworks,
@@ -3438,8 +3441,6 @@ var triggerRebuild = async (state, config, onRebuildComplete, filesToRebuild) =>
3438
3441
  });
3439
3442
  }
3440
3443
  onRebuildComplete({ manifest, hmrState: state });
3441
- await populateAssetStore(state.assetStore, manifest, state.resolvedPaths.buildDir);
3442
- await cleanStaleAssets(state.assetStore, manifest, state.resolvedPaths.buildDir);
3443
3444
  return manifest;
3444
3445
  } catch (error) {
3445
3446
  const errorData = extractBuildErrorDetails(error, affectedFrameworks, state.resolvedPaths);
@@ -3564,9 +3565,11 @@ var handleReactPageRequest = async (PageComponent, index, ...props) => {
3564
3565
  const { createElement } = await import("react");
3565
3566
  const { renderToReadableStream: renderToReadableStream2 } = await import("react-dom/server");
3566
3567
  const element = maybeProps !== undefined ? createElement(PageComponent, maybeProps) : createElement(PageComponent);
3568
+ const refreshStubs = "window.$RefreshReg$=function(){};window.$RefreshSig$=function(){return function(t){return t}};";
3569
+ const propsScript = maybeProps ? `window.__INITIAL_PROPS__=${JSON.stringify(maybeProps)}` : "";
3567
3570
  const stream = await renderToReadableStream2(element, {
3568
3571
  bootstrapModules: [index],
3569
- bootstrapScriptContent: maybeProps ? `window.__INITIAL_PROPS__=${JSON.stringify(maybeProps)}` : undefined,
3572
+ bootstrapScriptContent: refreshStubs + propsScript || undefined,
3570
3573
  onError(error) {
3571
3574
  console.error("[SSR] React streaming error:", error);
3572
3575
  }
@@ -3813,5 +3816,5 @@ export {
3813
3816
  BUN_BUILD_WARNING_SUPPRESSION
3814
3817
  };
3815
3818
 
3816
- //# debugId=2BF1125B1D79B27A64756E2164756E21
3819
+ //# debugId=E924130F6C46BB7964756E2164756E21
3817
3820
  //# sourceMappingURL=index.js.map