@absolutejs/absolute 0.19.0-beta.1076 → 0.19.0-beta.1077

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-2ETjhB/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-PxMA4z/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-2ETjhB/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-PxMA4z/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-2ETjhB/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-PxMA4z/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/cli/index.js CHANGED
@@ -759,6 +759,14 @@ var COMPOSE_PATH = "db/docker-compose.db.yml", DEFAULT_SERVER_ENTRY = "src/backe
759
759
  try {
760
760
  process.kill(pid, "SIGTERM");
761
761
  } catch {}
762
+ }, findFreePort = () => {
763
+ const server2 = Bun.serve({ fetch: () => new Response, port: 0 });
764
+ const { port } = server2;
765
+ server2.stop(true);
766
+ if (port === undefined) {
767
+ throw new Error("Failed to allocate a free port");
768
+ }
769
+ return port;
762
770
  }, killStaleProcesses = (port, logMessage) => {
763
771
  let output;
764
772
  try {
@@ -170571,7 +170579,14 @@ ${serverOutput}` : "Server failed to start for pre-rendering";
170571
170579
  const serverOutput = [];
170572
170580
  const serverProcess = Bun.spawn(["bun", "run", serverBundlePath], {
170573
170581
  cwd: process.cwd(),
170574
- env: { ...process.env, ...env2, PORT: String(port) },
170582
+ env: {
170583
+ ...process.env,
170584
+ ...env2,
170585
+ ABSOLUTE_HOST: "localhost",
170586
+ ABSOLUTE_PORT: String(port),
170587
+ HOST: "localhost",
170588
+ PORT: String(port)
170589
+ },
170575
170590
  stderr: "pipe",
170576
170591
  stdout: "pipe"
170577
170592
  });
@@ -177546,7 +177561,7 @@ console.log(\`
177546
177561
  const resolvedOutdir = resolve21(outdir ?? "dist");
177547
177562
  await withBuildDirectoryLock(resolvedOutdir, () => compileUnlocked(serverEntry, resolvedOutdir, outfile, configPath2));
177548
177563
  }, compileUnlocked = async (serverEntry, resolvedOutdir, outfile, configPath2) => {
177549
- const prerenderPort = Number(env5.COMPILE_PORT) || Number(env5.PORT) || DEFAULT_PORT + 1;
177564
+ const prerenderPort = Number(env5.COMPILE_PORT) || Number(env5.PORT) || findFreePort();
177550
177565
  killStaleProcesses(prerenderPort);
177551
177566
  const entryName = basename7(serverEntry).replace(/\.[^.]+$/, "");
177552
177567
  const resolvedOutfile = resolve21(outfile ?? "compiled-server");
package/dist/index.js CHANGED
@@ -38396,7 +38396,14 @@ ${serverOutput}` : "Server failed to start for pre-rendering";
38396
38396
  const serverOutput = [];
38397
38397
  const serverProcess = Bun.spawn(["bun", "run", serverBundlePath], {
38398
38398
  cwd: process.cwd(),
38399
- env: { ...process.env, ...env4, PORT: String(port) },
38399
+ env: {
38400
+ ...process.env,
38401
+ ...env4,
38402
+ ABSOLUTE_HOST: "localhost",
38403
+ ABSOLUTE_PORT: String(port),
38404
+ HOST: "localhost",
38405
+ PORT: String(port)
38406
+ },
38400
38407
  stderr: "pipe",
38401
38408
  stdout: "pipe"
38402
38409
  });
@@ -46730,5 +46737,5 @@ export {
46730
46737
  ANGULAR_INIT_TIMEOUT_MS
46731
46738
  };
46732
46739
 
46733
- //# debugId=EC9A975400DDE1A164756E2164756E21
46740
+ //# debugId=0728DC41DA5C84B964756E2164756E21
46734
46741
  //# sourceMappingURL=index.js.map