@absolutejs/absolute 0.19.0-beta.944 → 0.19.0-beta.946
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/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +31 -1
- package/dist/build.js.map +4 -4
- package/dist/cli/index.js +47 -0
- package/dist/index.js +31 -1
- package/dist/index.js.map +4 -4
- package/dist/src/dev/configResolver.d.ts +1 -0
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2905,6 +2905,53 @@ var dev = async (serverEntry, configPath2) => {
|
|
|
2905
2905
|
};
|
|
2906
2906
|
let serverProcess = spawnServer();
|
|
2907
2907
|
const sessionStart = Date.now();
|
|
2908
|
+
let serverRestartPending = false;
|
|
2909
|
+
const scheduleServerRestart = (filePath) => {
|
|
2910
|
+
if (serverRestartPending)
|
|
2911
|
+
return;
|
|
2912
|
+
serverRestartPending = true;
|
|
2913
|
+
const relPath = filePath.startsWith(process.cwd()) ? filePath.slice(process.cwd().length + 1) : filePath;
|
|
2914
|
+
console.log(cliTag("\x1B[36m", `Server file changed: ${relPath} \u2014 restarting...`));
|
|
2915
|
+
setTimeout(() => {
|
|
2916
|
+
serverRestartPending = false;
|
|
2917
|
+
restartServer().catch((err) => {
|
|
2918
|
+
console.error(cliTag("\x1B[31m", `Restart failed: ${err}`));
|
|
2919
|
+
});
|
|
2920
|
+
}, 80);
|
|
2921
|
+
};
|
|
2922
|
+
try {
|
|
2923
|
+
const { watch, existsSync: existsSync6 } = await import("fs");
|
|
2924
|
+
const { dirname: dirname3, basename } = await import("path");
|
|
2925
|
+
const absServerEntry = resolve3(serverEntry);
|
|
2926
|
+
const serverEntryDir = dirname3(absServerEntry);
|
|
2927
|
+
const serverEntryBase = basename(absServerEntry);
|
|
2928
|
+
const fsWatcher = watch(serverEntryDir, { persistent: false }, (eventType, filename) => {
|
|
2929
|
+
if (eventType !== "change" && eventType !== "rename")
|
|
2930
|
+
return;
|
|
2931
|
+
if (filename !== serverEntryBase)
|
|
2932
|
+
return;
|
|
2933
|
+
scheduleServerRestart(absServerEntry);
|
|
2934
|
+
});
|
|
2935
|
+
fsWatcher.unref();
|
|
2936
|
+
const configCandidates = ["absolute.config.ts", "absolute.config.js"];
|
|
2937
|
+
const projectRoot = process.cwd();
|
|
2938
|
+
for (const candidate of configCandidates) {
|
|
2939
|
+
const absCandidate = resolve3(projectRoot, candidate);
|
|
2940
|
+
if (!existsSync6(absCandidate))
|
|
2941
|
+
continue;
|
|
2942
|
+
const candidateBase = basename(absCandidate);
|
|
2943
|
+
const configWatcher = watch(dirname3(absCandidate), { persistent: false }, (eventType, filename) => {
|
|
2944
|
+
if (eventType !== "change" && eventType !== "rename")
|
|
2945
|
+
return;
|
|
2946
|
+
if (filename !== candidateBase)
|
|
2947
|
+
return;
|
|
2948
|
+
scheduleServerRestart(absCandidate);
|
|
2949
|
+
});
|
|
2950
|
+
configWatcher.unref();
|
|
2951
|
+
}
|
|
2952
|
+
} catch (err) {
|
|
2953
|
+
console.error(cliTag("\x1B[33m", `Failed to set up server entry watcher: ${err}`));
|
|
2954
|
+
}
|
|
2908
2955
|
let frameworks = [];
|
|
2909
2956
|
try {
|
|
2910
2957
|
const cfg = await loadConfig(configPath2);
|
package/dist/index.js
CHANGED
|
@@ -19144,6 +19144,7 @@ var resolveBuildPaths = (config) => {
|
|
|
19144
19144
|
emberDir: optional(config.emberDirectory),
|
|
19145
19145
|
htmlDir: optional(config.htmlDirectory),
|
|
19146
19146
|
htmxDir: optional(config.htmxDirectory),
|
|
19147
|
+
publicDir: optional(config.publicDirectory),
|
|
19147
19148
|
reactDir: optional(config.reactDirectory),
|
|
19148
19149
|
stylesDir: optional(typeof config.stylesConfig === "string" ? config.stylesConfig : config.stylesConfig?.path),
|
|
19149
19150
|
svelteDir: optional(config.svelteDirectory),
|
|
@@ -21325,6 +21326,12 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
21325
21326
|
const { cssChanged } = await incrementalTailwindBuild(config.tailwind, state.resolvedPaths.buildDir, files, getStyleTransformConfig(config));
|
|
21326
21327
|
if (!cssChanged)
|
|
21327
21328
|
return;
|
|
21329
|
+
try {
|
|
21330
|
+
const outputPath = resolve39(state.resolvedPaths.buildDir, config.tailwind.output);
|
|
21331
|
+
const bytes = await Bun.file(outputPath).bytes();
|
|
21332
|
+
const webPath = `/${config.tailwind.output.replace(/^\/+/, "")}`;
|
|
21333
|
+
state.assetStore.set(webPath, bytes);
|
|
21334
|
+
} catch {}
|
|
21328
21335
|
broadcastToClients(state, {
|
|
21329
21336
|
data: { framework: "tailwind", manifest: state.manifest },
|
|
21330
21337
|
message: "Tailwind utilities recompiled",
|
|
@@ -21583,6 +21590,29 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
|
|
|
21583
21590
|
if (!hasFileChanged(filePath, currentHash, state.fileHashes)) {
|
|
21584
21591
|
return;
|
|
21585
21592
|
}
|
|
21593
|
+
const publicDir = state.resolvedPaths.publicDir;
|
|
21594
|
+
if (publicDir && resolve39(filePath).replace(/\\/g, "/").startsWith(publicDir + "/")) {
|
|
21595
|
+
try {
|
|
21596
|
+
const absSource = resolve39(filePath);
|
|
21597
|
+
const relFromPublic = absSource.replace(/\\/g, "/").slice(publicDir.length + 1);
|
|
21598
|
+
const buildDir = state.resolvedPaths.buildDir;
|
|
21599
|
+
const destPath = resolve39(buildDir, relFromPublic);
|
|
21600
|
+
const { mkdir: mkdir7, copyFile, readFile: readFile6 } = await import("fs/promises");
|
|
21601
|
+
const { dirname: dirname23 } = await import("path");
|
|
21602
|
+
await mkdir7(dirname23(destPath), { recursive: true });
|
|
21603
|
+
await copyFile(absSource, destPath);
|
|
21604
|
+
const bytes = await readFile6(destPath);
|
|
21605
|
+
state.assetStore.set(`/${relFromPublic}`, new Uint8Array(bytes));
|
|
21606
|
+
state.fileHashes.set(absSource, currentHash);
|
|
21607
|
+
logHmrUpdate(relative16(process.cwd(), filePath));
|
|
21608
|
+
broadcastToClients(state, {
|
|
21609
|
+
data: { framework: "public", manifest: state.manifest },
|
|
21610
|
+
message: "Public asset updated",
|
|
21611
|
+
type: "style-update"
|
|
21612
|
+
});
|
|
21613
|
+
} catch {}
|
|
21614
|
+
return;
|
|
21615
|
+
}
|
|
21586
21616
|
if (framework === "unknown") {
|
|
21587
21617
|
invalidate(resolve39(filePath));
|
|
21588
21618
|
const relPath = relative16(process.cwd(), filePath);
|
|
@@ -32543,5 +32573,5 @@ export {
|
|
|
32543
32573
|
ANGULAR_INIT_TIMEOUT_MS
|
|
32544
32574
|
};
|
|
32545
32575
|
|
|
32546
|
-
//# debugId=
|
|
32576
|
+
//# debugId=955376BF8D8A029164756E2164756E21
|
|
32547
32577
|
//# sourceMappingURL=index.js.map
|