@absolutejs/absolute 0.19.0-beta.81 → 0.19.0-beta.82

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
@@ -203022,7 +203022,7 @@ var init_simpleHTMXHMR = () => {};
203022
203022
  // src/dev/rebuildTrigger.ts
203023
203023
  import { existsSync as existsSync14 } from "fs";
203024
203024
  import { rm as rm8 } from "fs/promises";
203025
- import { basename as basename8, dirname as dirname8, relative as relative9, resolve as resolve21 } from "path";
203025
+ import { basename as basename8, relative as relative9, resolve as resolve21 } from "path";
203026
203026
  var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseErrorLocationFromMessage = (msg) => {
203027
203027
  const pathLineCol = msg.match(/^([^\s:]+):(\d+)(?::(\d+))?/);
203028
203028
  if (pathLineCol) {
@@ -204341,18 +204341,35 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, parseError
204341
204341
  };
204342
204342
  let manifest;
204343
204343
  if (hasNonComponentFiles) {
204344
- const workerPath = resolve21(dirname8(new URL(import.meta.url).pathname), "../build/freshBuildWorker.ts");
204345
- const proc = Bun.spawn(["bun", "run", workerPath, JSON.stringify(buildConfig)], { stdout: "pipe", stderr: "pipe" });
204344
+ const tmpConfig = resolve21(process.cwd(), ".absolutejs", "build-config.json");
204345
+ const tmpScript = resolve21(process.cwd(), ".absolutejs", "fresh-build.ts");
204346
+ const { mkdirSync: mkdirSync9, writeFileSync: writeFileSync5 } = await import("fs");
204347
+ mkdirSync9(resolve21(process.cwd(), ".absolutejs"), { recursive: true });
204348
+ writeFileSync5(tmpConfig, JSON.stringify(buildConfig));
204349
+ writeFileSync5(tmpScript, `import { build } from "@absolutejs/absolute";
204350
+ const config = JSON.parse(await Bun.file(${JSON.stringify(tmpConfig)}).text());
204351
+ const manifest = await build(config);
204352
+ console.log("__MANIFEST__" + JSON.stringify(manifest));
204353
+ `);
204354
+ const proc = Bun.spawn(["bun", "run", tmpScript], {
204355
+ cwd: process.cwd(),
204356
+ stderr: "pipe",
204357
+ stdout: "pipe"
204358
+ });
204346
204359
  const stdout = await new Response(proc.stdout).text();
204347
204360
  const stderr = await new Response(proc.stderr).text();
204348
204361
  await proc.exited;
204349
204362
  if (proc.exitCode !== 0) {
204350
- throw new Error(`Fresh build failed: ${stderr}`);
204351
- }
204352
- const manifestLine = stdout.split(`
204363
+ logWarn(`Fresh build stderr: ${stderr.slice(0, 500)}`);
204364
+ manifest = await build2(buildConfig);
204365
+ } else {
204366
+ const manifestLine = stdout.split(`
204353
204367
  `).find((l) => l.startsWith("__MANIFEST__"));
204354
- if (manifestLine) {
204355
- manifest = JSON.parse(manifestLine.slice("__MANIFEST__".length));
204368
+ if (manifestLine) {
204369
+ manifest = JSON.parse(manifestLine.slice("__MANIFEST__".length));
204370
+ } else {
204371
+ manifest = await build2(buildConfig);
204372
+ }
204356
204373
  }
204357
204374
  } else {
204358
204375
  manifest = await build2(buildConfig);
@@ -205289,5 +205306,5 @@ export {
205289
205306
  ANGULAR_INIT_TIMEOUT_MS
205290
205307
  };
205291
205308
 
205292
- //# debugId=4582269A50EC544264756E2164756E21
205309
+ //# debugId=59537330412D478264756E2164756E21
205293
205310
  //# sourceMappingURL=index.js.map