bosia 0.1.9 → 0.1.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bosia",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
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/cli/create.ts CHANGED
@@ -14,7 +14,7 @@ const BOSIA_VERSION: string = BOSIA_PKG.version;
14
14
  const TEMPLATE_DESCRIPTIONS: Record<string, string> = {
15
15
  default: "Minimal starter with routing and Tailwind",
16
16
  demo: "Full-featured demo with hooks, API routes, form actions, and more",
17
- drizzle: "PostgreSQL + Drizzle ORM with full CRUD todo demo",
17
+ todo: "Todo app with PostgreSQL + Drizzle ORM",
18
18
  };
19
19
 
20
20
  export async function runCreate(name: string | undefined, args: string[] = []) {
package/src/cli/index.ts CHANGED
@@ -62,7 +62,7 @@ Commands:
62
62
 
63
63
  Examples:
64
64
  bosia create my-app
65
- bosia create my-app --template demo
65
+ bosia create my-app --template todo
66
66
  bosia dev
67
67
  bosia build
68
68
  bosia start
package/src/core/html.ts CHANGED
@@ -216,7 +216,7 @@ export function compress(body: string, contentType: string, req: Request, status
216
216
 
217
217
  // ─── Static File Detection ────────────────────────────────
218
218
 
219
- const STATIC_EXTS = new Set([".ico", ".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg", ".css", ".js", ".woff", ".woff2", ".ttf"]);
219
+ const STATIC_EXTS = new Set([".ico", ".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg", ".css", ".js", ".woff", ".woff2", ".ttf", ".xml", ".txt"]);
220
220
 
221
221
  export function isStaticPath(path: string): boolean {
222
222
  if (path.startsWith("/dist/") || path.startsWith("/__bosia/")) return true;
@@ -192,6 +192,11 @@ async function resolve(event: RequestEvent): Promise<Response> {
192
192
  const dist = Bun.file(distPath);
193
193
  if (await dist.exists()) return new Response(dist);
194
194
  }
195
+ const staticPath = safePath("./dist/static", path);
196
+ if (staticPath) {
197
+ const staticFile = Bun.file(staticPath);
198
+ if (await staticFile.exists()) return new Response(staticFile);
199
+ }
195
200
  return new Response("Not Found", { status: 404 });
196
201
  }
197
202
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes