bosia 0.6.21 → 0.6.22

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 (55) hide show
  1. package/package.json +2 -2
  2. package/src/cli/add.ts +3 -4
  3. package/src/cli/block.ts +16 -10
  4. package/src/cli/create.ts +6 -11
  5. package/src/cli/feat.ts +19 -22
  6. package/src/cli/index.ts +1 -2
  7. package/src/cli/manifest.ts +1 -1
  8. package/src/cli/registry.ts +3 -1
  9. package/src/core/build.ts +1 -3
  10. package/src/core/client/App.svelte +3 -8
  11. package/src/core/client/router.svelte.ts +3 -8
  12. package/src/core/config.ts +1 -4
  13. package/src/core/cookies.ts +1 -2
  14. package/src/core/dev-500.ts +1 -1
  15. package/src/core/html.ts +1 -2
  16. package/src/core/plugin.ts +1 -3
  17. package/src/core/plugins/inspector/bun-plugin.ts +1 -4
  18. package/src/core/plugins/inspector/index.ts +45 -59
  19. package/src/core/renderer.ts +3 -10
  20. package/src/core/routeTypes.ts +3 -9
  21. package/src/core/scanner.ts +1 -3
  22. package/src/core/server.ts +9 -34
  23. package/src/core/staticManifest.ts +1 -3
  24. package/src/core/svelteAudit.ts +2 -5
  25. package/src/core/svelteCompiler.ts +2 -8
  26. package/templates/default/.prettierignore +1 -0
  27. package/templates/demo/.prettierignore +1 -0
  28. package/templates/shop/.env.example +12 -0
  29. package/templates/shop/.prettierignore +7 -0
  30. package/templates/shop/.prettierrc.json +9 -0
  31. package/templates/shop/README.md +62 -0
  32. package/templates/shop/_gitignore +12 -0
  33. package/templates/shop/bosia.config.ts +10 -0
  34. package/templates/shop/instructions.txt +8 -0
  35. package/templates/shop/package.json +27 -0
  36. package/templates/shop/public/favicon.svg +14 -0
  37. package/templates/shop/public/logo-dark.svg +14 -0
  38. package/templates/shop/public/logo-light.svg +14 -0
  39. package/templates/shop/src/app.css +132 -0
  40. package/templates/shop/src/app.d.ts +14 -0
  41. package/templates/shop/src/app.html +11 -0
  42. package/templates/shop/src/hooks.server.ts +21 -0
  43. package/templates/shop/src/lib/utils.ts +1 -0
  44. package/templates/shop/src/routes/(private)/+layout.server.ts +10 -0
  45. package/templates/shop/src/routes/(private)/+layout.svelte +14 -0
  46. package/templates/shop/src/routes/(private)/dashboard/+page.svelte +11 -0
  47. package/templates/shop/src/routes/(public)/+layout.svelte +13 -0
  48. package/templates/shop/src/routes/(public)/+page.svelte +30 -0
  49. package/templates/shop/src/routes/+error.svelte +19 -0
  50. package/templates/shop/src/routes/+layout.server.ts +9 -0
  51. package/templates/shop/src/routes/+layout.svelte +6 -0
  52. package/templates/shop/template.json +10 -0
  53. package/templates/shop/tsconfig.json +22 -0
  54. package/templates/todo/.prettierignore +1 -0
  55. package/templates/todo/template.json +4 -1
@@ -0,0 +1,19 @@
1
+ <script lang="ts">
2
+ import type { ErrorProps } from "./$types";
3
+ let { error }: ErrorProps = $props();
4
+ </script>
5
+
6
+ <svelte:head>
7
+ <title>{error.status} — {error.message}</title>
8
+ </svelte:head>
9
+
10
+ <div class="min-h-screen flex flex-col items-center justify-center gap-4 text-center px-4">
11
+ <p class="text-8xl font-bold text-gray-200">{error.status}</p>
12
+ <p class="text-2xl font-semibold text-gray-700">{error.message}</p>
13
+ <a
14
+ href="/"
15
+ class="mt-4 px-5 py-2 rounded-lg bg-gray-900 text-white text-sm hover:bg-gray-700 transition-colors"
16
+ >
17
+ Go home
18
+ </a>
19
+ </div>
@@ -0,0 +1,9 @@
1
+ import type { LoadEvent } from "bosia";
2
+
3
+ export async function load({ locals }: LoadEvent) {
4
+ return {
5
+ appName: "Bosia Shop",
6
+ requestTime: (locals.requestTime as number | null) ?? null,
7
+ user: locals.user ?? null,
8
+ };
9
+ }
@@ -0,0 +1,6 @@
1
+ <script lang="ts">
2
+ import "../app.css";
3
+ let { children }: { children: any } = $props();
4
+ </script>
5
+
6
+ {@render children()}
@@ -0,0 +1,10 @@
1
+ {
2
+ "features": ["auth", "rbac", "file-upload", "shop"],
3
+ "featureOptions": {
4
+ "drizzle.dialect": "postgres",
5
+ "auth.dialect": "postgres",
6
+ "rbac.dialect": "postgres",
7
+ "file-upload.dialect": "postgres",
8
+ "shop.dialect": "postgres"
9
+ }
10
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "allowJs": true,
8
+ "skipLibCheck": true,
9
+ "allowImportingTsExtensions": true,
10
+ "noEmit": true,
11
+ "verbatimModuleSyntax": true,
12
+ "types": ["bun-types"],
13
+ "lib": ["dom", "dom.iterable", "esnext"],
14
+ "rootDirs": [".", ".bosia/types"],
15
+ "paths": {
16
+ "$lib": ["./src/lib"],
17
+ "$lib/*": ["./src/lib/*"]
18
+ }
19
+ },
20
+ "include": ["src/**/*", ".bosia/types/**/*.d.ts"],
21
+ "exclude": ["node_modules", "dist"]
22
+ }
@@ -4,3 +4,4 @@ build
4
4
  .bosia
5
5
  bun.lock
6
6
  public/bosia-tw.css
7
+ bosia.json
@@ -1,3 +1,6 @@
1
1
  {
2
- "features": ["todo"]
2
+ "features": ["todo"],
3
+ "featureOptions": {
4
+ "drizzle.dialect": "postgres"
5
+ }
3
6
  }