@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/.absolutejs/tsconfig.tsbuildinfo +1 -1
- package/dist/build.js +26 -9
- package/dist/build.js.map +3 -3
- package/dist/index.js +26 -9
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/build.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,
|
|
203025
|
+
import { basename as basename8, relative as relative9, resolve as resolve20 } 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
|
|
204345
|
-
const
|
|
204344
|
+
const tmpConfig = resolve20(process.cwd(), ".absolutejs", "build-config.json");
|
|
204345
|
+
const tmpScript = resolve20(process.cwd(), ".absolutejs", "fresh-build.ts");
|
|
204346
|
+
const { mkdirSync: mkdirSync9, writeFileSync: writeFileSync5 } = await import("fs");
|
|
204347
|
+
mkdirSync9(resolve20(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
|
-
|
|
204351
|
-
|
|
204352
|
-
|
|
204363
|
+
logWarn(`Fresh build stderr: ${stderr.slice(0, 500)}`);
|
|
204364
|
+
manifest = await build(buildConfig);
|
|
204365
|
+
} else {
|
|
204366
|
+
const manifestLine = stdout.split(`
|
|
204353
204367
|
`).find((l) => l.startsWith("__MANIFEST__"));
|
|
204354
|
-
|
|
204355
|
-
|
|
204368
|
+
if (manifestLine) {
|
|
204369
|
+
manifest = JSON.parse(manifestLine.slice("__MANIFEST__".length));
|
|
204370
|
+
} else {
|
|
204371
|
+
manifest = await build(buildConfig);
|
|
204372
|
+
}
|
|
204356
204373
|
}
|
|
204357
204374
|
} else {
|
|
204358
204375
|
manifest = await build(buildConfig);
|
|
@@ -204884,5 +204901,5 @@ export {
|
|
|
204884
204901
|
build
|
|
204885
204902
|
};
|
|
204886
204903
|
|
|
204887
|
-
//# debugId=
|
|
204904
|
+
//# debugId=AAC98E4F6883D08F64756E2164756E21
|
|
204888
204905
|
//# sourceMappingURL=build.js.map
|