bosia 0.5.5 → 0.5.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/core/build.ts +16 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bosia",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "type": "module",
5
5
  "description": "A fast, batteries-included fullstack framework — SSR · Svelte 5 Runes · Bun · ElysiaJS. File-based routing inspired by SvelteKit. No Node.js, no Vite, no adapters.",
6
6
  "keywords": [
package/src/core/build.ts CHANGED
@@ -45,13 +45,25 @@ const envMode = isProduction ? "production" : "development";
45
45
  const envVars = loadEnv(envMode);
46
46
  const classifiedEnv = classifyEnvVars(envVars);
47
47
 
48
- // 0b. Clean all generated output first
48
+ // 0b. Clean generated output. Only OUT_DIR (this build's artifacts) and the
49
+ // codegen files inside .bosia/ that this build owns. A blanket wipe of .bosia/
50
+ // would clobber a concurrently-running `bosia dev` whose compiled server lives
51
+ // at .bosia/dev/ — the codegen files (routes*.ts, env.*.ts, types/) are the
52
+ // only things this build needs to clear to avoid stale entries on route renames.
49
53
  try {
50
54
  rmSync(OUT_DIR, { recursive: true, force: true });
51
55
  } catch {}
52
- try {
53
- rmSync("./.bosia", { recursive: true, force: true });
54
- } catch {}
56
+ for (const p of [
57
+ ".bosia/routes.ts",
58
+ ".bosia/routes.client.ts",
59
+ ".bosia/env.server.ts",
60
+ ".bosia/env.client.ts",
61
+ ".bosia/types",
62
+ ]) {
63
+ try {
64
+ rmSync(p, { recursive: true, force: true });
65
+ } catch {}
66
+ }
55
67
 
56
68
  // 1. Scan routes
57
69
  const manifest = scanRoutes();