@korajs/cli 0.0.0-canary-20261008174129
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/LICENSE +21 -0
- package/README.md +44 -0
- package/dist/bin.cjs +9465 -0
- package/dist/bin.cjs.map +1 -0
- package/dist/bin.js +3150 -0
- package/dist/bin.js.map +1 -0
- package/dist/chunk-5NI2FEQL.js +92 -0
- package/dist/chunk-5NI2FEQL.js.map +1 -0
- package/dist/chunk-6C4BHSRA.js +82 -0
- package/dist/chunk-6C4BHSRA.js.map +1 -0
- package/dist/chunk-7Y4J2GXP.js +796 -0
- package/dist/chunk-7Y4J2GXP.js.map +1 -0
- package/dist/chunk-BURFQVMV.js +719 -0
- package/dist/chunk-BURFQVMV.js.map +1 -0
- package/dist/chunk-TVIRMDER.js +2569 -0
- package/dist/chunk-TVIRMDER.js.map +1 -0
- package/dist/create.cjs +1368 -0
- package/dist/create.cjs.map +1 -0
- package/dist/create.js +11 -0
- package/dist/create.js.map +1 -0
- package/dist/index.cjs +3489 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +772 -0
- package/dist/index.d.ts +772 -0
- package/dist/index.js +129 -0
- package/dist/index.js.map +1 -0
- package/dist/lab-manager-KUDII6BT.js +280 -0
- package/dist/lab-manager-KUDII6BT.js.map +1 -0
- package/dist/schema-loader-GGHECMTM.js +9 -0
- package/dist/schema-loader-GGHECMTM.js.map +1 -0
- package/dist/spectator-manager-FTH2NFSE.js +145 -0
- package/dist/spectator-manager-FTH2NFSE.js.map +1 -0
- package/dist/studio-server-XLGZNGG5.js +1747 -0
- package/dist/studio-server-XLGZNGG5.js.map +1 -0
- package/dist/vite.cjs +351 -0
- package/dist/vite.cjs.map +1 -0
- package/dist/vite.d.cts +161 -0
- package/dist/vite.d.ts +161 -0
- package/dist/vite.js +321 -0
- package/dist/vite.js.map +1 -0
- package/package.json +79 -0
- package/templates/react-basic/.env.example +3 -0
- package/templates/react-basic/AGENTS.md +87 -0
- package/templates/react-basic/README.md.hbs +62 -0
- package/templates/react-basic/index.html.hbs +12 -0
- package/templates/react-basic/kora.config.ts +13 -0
- package/templates/react-basic/package.json.hbs +35 -0
- package/templates/react-basic/src/App.tsx +132 -0
- package/templates/react-basic/src/index.css +287 -0
- package/templates/react-basic/src/kora-worker.ts +9 -0
- package/templates/react-basic/src/main.tsx +24 -0
- package/templates/react-basic/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/react-basic/src/modules/todos/todo.queries.ts +5 -0
- package/templates/react-basic/src/modules/todos/todo.schema.ts +10 -0
- package/templates/react-basic/src/modules/todos/useTodos.ts +31 -0
- package/templates/react-basic/src/schema.ts +9 -0
- package/templates/react-basic/src/vite-env.d.ts +18 -0
- package/templates/react-basic/tsconfig.json.hbs +14 -0
- package/templates/react-basic/vite.config.ts +88 -0
- package/templates/react-sync/.env.example +25 -0
- package/templates/react-sync/AGENTS.md +87 -0
- package/templates/react-sync/README.md.hbs +106 -0
- package/templates/react-sync/index.html.hbs +12 -0
- package/templates/react-sync/kora.config.ts +17 -0
- package/templates/react-sync/package.json.hbs +44 -0
- package/templates/react-sync/server.ts +141 -0
- package/templates/react-sync/src/App.tsx +160 -0
- package/templates/react-sync/src/auth.ts +25 -0
- package/templates/react-sync/src/index.css +350 -0
- package/templates/react-sync/src/kora-worker.ts +9 -0
- package/templates/react-sync/src/main.tsx +52 -0
- package/templates/react-sync/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/react-sync/src/modules/todos/todo.queries.ts +5 -0
- package/templates/react-sync/src/modules/todos/todo.schema.ts +10 -0
- package/templates/react-sync/src/modules/todos/useTodos.ts +31 -0
- package/templates/react-sync/src/schema.ts +9 -0
- package/templates/react-sync/src/vite-env.d.ts +19 -0
- package/templates/react-sync/tsconfig.json.hbs +14 -0
- package/templates/react-sync/vite.config.ts +105 -0
- package/templates/react-tailwind/.env.example +3 -0
- package/templates/react-tailwind/AGENTS.md +87 -0
- package/templates/react-tailwind/README.md.hbs +62 -0
- package/templates/react-tailwind/index.html.hbs +12 -0
- package/templates/react-tailwind/kora.config.ts +13 -0
- package/templates/react-tailwind/package.json.hbs +38 -0
- package/templates/react-tailwind/src/App.tsx +201 -0
- package/templates/react-tailwind/src/index.css +7 -0
- package/templates/react-tailwind/src/kora-worker.ts +9 -0
- package/templates/react-tailwind/src/main.tsx +31 -0
- package/templates/react-tailwind/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/react-tailwind/src/modules/todos/todo.queries.ts +5 -0
- package/templates/react-tailwind/src/modules/todos/todo.schema.ts +10 -0
- package/templates/react-tailwind/src/modules/todos/useTodos.ts +31 -0
- package/templates/react-tailwind/src/schema.ts +9 -0
- package/templates/react-tailwind/src/vite-env.d.ts +18 -0
- package/templates/react-tailwind/tsconfig.json.hbs +14 -0
- package/templates/react-tailwind/vite.config.ts +95 -0
- package/templates/react-tailwind-sync/.env.example +25 -0
- package/templates/react-tailwind-sync/AGENTS.md +89 -0
- package/templates/react-tailwind-sync/README.md.hbs +106 -0
- package/templates/react-tailwind-sync/index.html.hbs +12 -0
- package/templates/react-tailwind-sync/kora.config.ts +17 -0
- package/templates/react-tailwind-sync/package.json.hbs +47 -0
- package/templates/react-tailwind-sync/server.ts +141 -0
- package/templates/react-tailwind-sync/src/App.tsx +293 -0
- package/templates/react-tailwind-sync/src/auth.ts +25 -0
- package/templates/react-tailwind-sync/src/index.css +7 -0
- package/templates/react-tailwind-sync/src/kora-worker.ts +9 -0
- package/templates/react-tailwind-sync/src/kora.ts +32 -0
- package/templates/react-tailwind-sync/src/main.tsx +44 -0
- package/templates/react-tailwind-sync/src/modules/todos/todo.mutations.ts +21 -0
- package/templates/react-tailwind-sync/src/modules/todos/todo.queries.ts +5 -0
- package/templates/react-tailwind-sync/src/modules/todos/todo.schema.ts +10 -0
- package/templates/react-tailwind-sync/src/modules/todos/useTodos.ts +31 -0
- package/templates/react-tailwind-sync/src/schema.ts +9 -0
- package/templates/react-tailwind-sync/src/vite-env.d.ts +19 -0
- package/templates/react-tailwind-sync/tsconfig.json.hbs +14 -0
- package/templates/react-tailwind-sync/vite.config.ts +112 -0
- package/templates/svelte-basic/.env.example +3 -0
- package/templates/svelte-basic/AGENTS.md +76 -0
- package/templates/svelte-basic/README.md.hbs +62 -0
- package/templates/svelte-basic/index.html.hbs +12 -0
- package/templates/svelte-basic/kora.config.ts +12 -0
- package/templates/svelte-basic/package.json.hbs +33 -0
- package/templates/svelte-basic/src/App.svelte +128 -0
- package/templates/svelte-basic/src/Root.svelte +14 -0
- package/templates/svelte-basic/src/index.css +287 -0
- package/templates/svelte-basic/src/kora-worker.ts +9 -0
- package/templates/svelte-basic/src/main.ts +16 -0
- package/templates/svelte-basic/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/svelte-basic/src/modules/todos/todo.queries.ts +5 -0
- package/templates/svelte-basic/src/modules/todos/todo.schema.ts +10 -0
- package/templates/svelte-basic/src/modules/todos/useTodos.ts +25 -0
- package/templates/svelte-basic/src/schema.ts +9 -0
- package/templates/svelte-basic/src/vite-env.d.ts +12 -0
- package/templates/svelte-basic/svelte.config.js +5 -0
- package/templates/svelte-basic/tsconfig.json.hbs +14 -0
- package/templates/svelte-basic/vite.config.ts +57 -0
- package/templates/svelte-sync/.env.example +25 -0
- package/templates/svelte-sync/AGENTS.md +76 -0
- package/templates/svelte-sync/README.md.hbs +106 -0
- package/templates/svelte-sync/index.html.hbs +12 -0
- package/templates/svelte-sync/kora.config.ts +17 -0
- package/templates/svelte-sync/package.json.hbs +43 -0
- package/templates/svelte-sync/server.ts +141 -0
- package/templates/svelte-sync/src/App.svelte +151 -0
- package/templates/svelte-sync/src/Root.svelte +22 -0
- package/templates/svelte-sync/src/auth.ts +25 -0
- package/templates/svelte-sync/src/index.css +339 -0
- package/templates/svelte-sync/src/kora-worker.ts +9 -0
- package/templates/svelte-sync/src/main.ts +32 -0
- package/templates/svelte-sync/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/svelte-sync/src/modules/todos/todo.queries.ts +5 -0
- package/templates/svelte-sync/src/modules/todos/todo.schema.ts +10 -0
- package/templates/svelte-sync/src/modules/todos/useTodos.ts +25 -0
- package/templates/svelte-sync/src/schema.ts +9 -0
- package/templates/svelte-sync/src/vite-env.d.ts +22 -0
- package/templates/svelte-sync/svelte.config.js +5 -0
- package/templates/svelte-sync/tsconfig.json.hbs +14 -0
- package/templates/svelte-sync/vite.config.ts +91 -0
- package/templates/svelte-tailwind/AGENTS.md +76 -0
- package/templates/svelte-tailwind/README.md.hbs +62 -0
- package/templates/svelte-tailwind/index.html.hbs +12 -0
- package/templates/svelte-tailwind/kora.config.ts +12 -0
- package/templates/svelte-tailwind/package.json.hbs +36 -0
- package/templates/svelte-tailwind/src/App.svelte +76 -0
- package/templates/svelte-tailwind/src/Root.svelte +14 -0
- package/templates/svelte-tailwind/src/index.css +7 -0
- package/templates/svelte-tailwind/src/kora-worker.ts +9 -0
- package/templates/svelte-tailwind/src/main.ts +16 -0
- package/templates/svelte-tailwind/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/svelte-tailwind/src/modules/todos/todo.queries.ts +5 -0
- package/templates/svelte-tailwind/src/modules/todos/todo.schema.ts +10 -0
- package/templates/svelte-tailwind/src/modules/todos/useTodos.ts +25 -0
- package/templates/svelte-tailwind/src/schema.ts +9 -0
- package/templates/svelte-tailwind/src/vite-env.d.ts +12 -0
- package/templates/svelte-tailwind/svelte.config.js +5 -0
- package/templates/svelte-tailwind/tsconfig.json.hbs +14 -0
- package/templates/svelte-tailwind/vite.config.ts +64 -0
- package/templates/svelte-tailwind-sync/.env.example +25 -0
- package/templates/svelte-tailwind-sync/AGENTS.md +76 -0
- package/templates/svelte-tailwind-sync/README.md.hbs +106 -0
- package/templates/svelte-tailwind-sync/index.html.hbs +12 -0
- package/templates/svelte-tailwind-sync/kora.config.ts +17 -0
- package/templates/svelte-tailwind-sync/package.json.hbs +46 -0
- package/templates/svelte-tailwind-sync/server.ts +141 -0
- package/templates/svelte-tailwind-sync/src/App.svelte +193 -0
- package/templates/svelte-tailwind-sync/src/Root.svelte +26 -0
- package/templates/svelte-tailwind-sync/src/auth.ts +25 -0
- package/templates/svelte-tailwind-sync/src/index.css +7 -0
- package/templates/svelte-tailwind-sync/src/kora-worker.ts +9 -0
- package/templates/svelte-tailwind-sync/src/main.ts +32 -0
- package/templates/svelte-tailwind-sync/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/svelte-tailwind-sync/src/modules/todos/todo.queries.ts +5 -0
- package/templates/svelte-tailwind-sync/src/modules/todos/todo.schema.ts +10 -0
- package/templates/svelte-tailwind-sync/src/modules/todos/useTodos.ts +25 -0
- package/templates/svelte-tailwind-sync/src/schema.ts +9 -0
- package/templates/svelte-tailwind-sync/src/vite-env.d.ts +22 -0
- package/templates/svelte-tailwind-sync/svelte.config.js +5 -0
- package/templates/svelte-tailwind-sync/tsconfig.json.hbs +14 -0
- package/templates/svelte-tailwind-sync/vite.config.ts +98 -0
- package/templates/tauri-react/.env.example +27 -0
- package/templates/tauri-react/.github/workflows/release-desktop.yml +107 -0
- package/templates/tauri-react/AGENTS.md +91 -0
- package/templates/tauri-react/README.md.hbs +183 -0
- package/templates/tauri-react/dev.ts +37 -0
- package/templates/tauri-react/index.html.hbs +16 -0
- package/templates/tauri-react/kora.config.ts +17 -0
- package/templates/tauri-react/package.json.hbs +46 -0
- package/templates/tauri-react/server.ts +148 -0
- package/templates/tauri-react/src/App.tsx +803 -0
- package/templates/tauri-react/src/AppShell.tsx +158 -0
- package/templates/tauri-react/src/SetupScreen.tsx +288 -0
- package/templates/tauri-react/src/auth.ts +45 -0
- package/templates/tauri-react/src/main.tsx +9 -0
- package/templates/tauri-react/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/tauri-react/src/modules/todos/todo.queries.ts +5 -0
- package/templates/tauri-react/src/modules/todos/todo.schema.ts +10 -0
- package/templates/tauri-react/src/modules/todos/useTodos.ts +31 -0
- package/templates/tauri-react/src/schema.ts +9 -0
- package/templates/tauri-react/src/sync-config.ts +103 -0
- package/templates/tauri-react/src/updater.ts +38 -0
- package/templates/tauri-react/src/vite-env.d.ts +19 -0
- package/templates/tauri-react/src-tauri/Cargo.toml +19 -0
- package/templates/tauri-react/src-tauri/build.rs +3 -0
- package/templates/tauri-react/src-tauri/capabilities/default.json +12 -0
- package/templates/tauri-react/src-tauri/icons/128x128.png +0 -0
- package/templates/tauri-react/src-tauri/icons/128x128@2x.png +0 -0
- package/templates/tauri-react/src-tauri/icons/32x32.png +0 -0
- package/templates/tauri-react/src-tauri/icons/icon.icns +0 -0
- package/templates/tauri-react/src-tauri/icons/icon.ico +0 -0
- package/templates/tauri-react/src-tauri/src/lib.rs +8 -0
- package/templates/tauri-react/src-tauri/src/main.rs +6 -0
- package/templates/tauri-react/src-tauri/tauri.conf.json +44 -0
- package/templates/tauri-react/tsconfig.json.hbs +14 -0
- package/templates/tauri-react/vite.config.ts +15 -0
- package/templates/vue-basic/AGENTS.md +84 -0
- package/templates/vue-basic/README.md.hbs +62 -0
- package/templates/vue-basic/index.html.hbs +12 -0
- package/templates/vue-basic/kora.config.ts +12 -0
- package/templates/vue-basic/package.json.hbs +32 -0
- package/templates/vue-basic/src/App.vue +117 -0
- package/templates/vue-basic/src/index.css +287 -0
- package/templates/vue-basic/src/kora-worker.ts +9 -0
- package/templates/vue-basic/src/main.ts +20 -0
- package/templates/vue-basic/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/vue-basic/src/modules/todos/todo.queries.ts +5 -0
- package/templates/vue-basic/src/modules/todos/todo.schema.ts +10 -0
- package/templates/vue-basic/src/modules/todos/useTodos.ts +32 -0
- package/templates/vue-basic/src/schema.ts +9 -0
- package/templates/vue-basic/src/vite-env.d.ts +17 -0
- package/templates/vue-basic/tsconfig.json.hbs +15 -0
- package/templates/vue-basic/vite.config.ts +74 -0
- package/templates/vue-sync/.env.example +25 -0
- package/templates/vue-sync/AGENTS.md +84 -0
- package/templates/vue-sync/README.md.hbs +106 -0
- package/templates/vue-sync/index.html.hbs +12 -0
- package/templates/vue-sync/kora.config.ts +17 -0
- package/templates/vue-sync/package.json.hbs +42 -0
- package/templates/vue-sync/server.ts +141 -0
- package/templates/vue-sync/src/App.vue +135 -0
- package/templates/vue-sync/src/auth.ts +25 -0
- package/templates/vue-sync/src/index.css +339 -0
- package/templates/vue-sync/src/kora-worker.ts +9 -0
- package/templates/vue-sync/src/main.ts +47 -0
- package/templates/vue-sync/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/vue-sync/src/modules/todos/todo.queries.ts +5 -0
- package/templates/vue-sync/src/modules/todos/todo.schema.ts +10 -0
- package/templates/vue-sync/src/modules/todos/useTodos.ts +32 -0
- package/templates/vue-sync/src/schema.ts +9 -0
- package/templates/vue-sync/src/vite-env.d.ts +27 -0
- package/templates/vue-sync/tsconfig.json.hbs +15 -0
- package/templates/vue-sync/vite.config.ts +91 -0
- package/templates/vue-tailwind/AGENTS.md +84 -0
- package/templates/vue-tailwind/README.md.hbs +62 -0
- package/templates/vue-tailwind/index.html.hbs +12 -0
- package/templates/vue-tailwind/kora.config.ts +12 -0
- package/templates/vue-tailwind/package.json.hbs +35 -0
- package/templates/vue-tailwind/src/App.vue +135 -0
- package/templates/vue-tailwind/src/index.css +7 -0
- package/templates/vue-tailwind/src/kora-worker.ts +9 -0
- package/templates/vue-tailwind/src/main.ts +31 -0
- package/templates/vue-tailwind/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/vue-tailwind/src/modules/todos/todo.queries.ts +5 -0
- package/templates/vue-tailwind/src/modules/todos/todo.schema.ts +10 -0
- package/templates/vue-tailwind/src/modules/todos/useTodos.ts +32 -0
- package/templates/vue-tailwind/src/schema.ts +9 -0
- package/templates/vue-tailwind/src/vite-env.d.ts +17 -0
- package/templates/vue-tailwind/tsconfig.json.hbs +15 -0
- package/templates/vue-tailwind/vite.config.ts +75 -0
- package/templates/vue-tailwind-sync/.env.example +25 -0
- package/templates/vue-tailwind-sync/AGENTS.md +84 -0
- package/templates/vue-tailwind-sync/README.md.hbs +106 -0
- package/templates/vue-tailwind-sync/index.html.hbs +12 -0
- package/templates/vue-tailwind-sync/kora.config.ts +17 -0
- package/templates/vue-tailwind-sync/package.json.hbs +45 -0
- package/templates/vue-tailwind-sync/server.ts +141 -0
- package/templates/vue-tailwind-sync/src/App.vue +245 -0
- package/templates/vue-tailwind-sync/src/auth.ts +25 -0
- package/templates/vue-tailwind-sync/src/index.css +7 -0
- package/templates/vue-tailwind-sync/src/kora-worker.ts +9 -0
- package/templates/vue-tailwind-sync/src/main.ts +56 -0
- package/templates/vue-tailwind-sync/src/modules/todos/todo.mutations.ts +25 -0
- package/templates/vue-tailwind-sync/src/modules/todos/todo.queries.ts +5 -0
- package/templates/vue-tailwind-sync/src/modules/todos/todo.schema.ts +10 -0
- package/templates/vue-tailwind-sync/src/modules/todos/useTodos.ts +32 -0
- package/templates/vue-tailwind-sync/src/schema.ts +9 -0
- package/templates/vue-tailwind-sync/src/vite-env.d.ts +27 -0
- package/templates/vue-tailwind-sync/tsconfig.json.hbs +15 -0
- package/templates/vue-tailwind-sync/vite.config.ts +92 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
--color-bg: #0a0a0f;
|
|
11
|
+
--color-surface: #111118;
|
|
12
|
+
--color-border: #1e1e2a;
|
|
13
|
+
--color-border-hover: #2a2a3a;
|
|
14
|
+
--color-text: #e4e4e7;
|
|
15
|
+
--color-text-muted: #71717a;
|
|
16
|
+
--color-text-dim: #3f3f46;
|
|
17
|
+
--color-primary: #6366f1;
|
|
18
|
+
--color-primary-hover: #818cf8;
|
|
19
|
+
--color-success: #34d399;
|
|
20
|
+
--color-warning: #fbbf24;
|
|
21
|
+
--color-danger: #f87171;
|
|
22
|
+
--font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
23
|
+
--radius: 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
font-family: var(--font-sans);
|
|
28
|
+
background: var(--color-bg);
|
|
29
|
+
color: var(--color-text);
|
|
30
|
+
line-height: 1.6;
|
|
31
|
+
-webkit-font-smoothing: antialiased;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.app {
|
|
35
|
+
max-width: 640px;
|
|
36
|
+
margin: 0 auto;
|
|
37
|
+
padding: 48px 16px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.header {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: space-between;
|
|
44
|
+
margin-bottom: 32px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.header h1 {
|
|
48
|
+
font-size: 1.5rem;
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.header-actions {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.sync-badge {
|
|
59
|
+
display: inline-flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 6px;
|
|
62
|
+
padding: 4px 12px;
|
|
63
|
+
border-radius: 999px;
|
|
64
|
+
background: var(--color-surface);
|
|
65
|
+
font-size: 0.8rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.sync-dot {
|
|
69
|
+
width: 8px;
|
|
70
|
+
height: 8px;
|
|
71
|
+
border-radius: 50%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.sync-dot.connected,
|
|
75
|
+
.sync-dot.synced {
|
|
76
|
+
background: var(--color-success);
|
|
77
|
+
}
|
|
78
|
+
.sync-dot.syncing {
|
|
79
|
+
background: var(--color-warning);
|
|
80
|
+
}
|
|
81
|
+
.sync-dot.offline {
|
|
82
|
+
background: var(--color-text-muted);
|
|
83
|
+
}
|
|
84
|
+
.sync-dot.error {
|
|
85
|
+
background: var(--color-danger);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.auth-button {
|
|
89
|
+
border: 1px solid var(--color-border);
|
|
90
|
+
border-radius: 999px;
|
|
91
|
+
background: var(--color-surface);
|
|
92
|
+
color: var(--color-text);
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
font-size: 0.8rem;
|
|
95
|
+
max-width: 180px;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
padding: 4px 12px;
|
|
98
|
+
text-overflow: ellipsis;
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.auth-button:hover {
|
|
103
|
+
border-color: var(--color-border-hover);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.auth-error {
|
|
107
|
+
border: 1px solid rgba(248, 113, 113, 0.35);
|
|
108
|
+
border-radius: var(--radius);
|
|
109
|
+
color: var(--color-danger);
|
|
110
|
+
font-size: 0.85rem;
|
|
111
|
+
margin-bottom: 16px;
|
|
112
|
+
padding: 10px 12px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.stats {
|
|
116
|
+
display: grid;
|
|
117
|
+
grid-template-columns: repeat(3, 1fr);
|
|
118
|
+
gap: 12px;
|
|
119
|
+
margin-bottom: 32px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.stat-card {
|
|
123
|
+
background: var(--color-surface);
|
|
124
|
+
border: 1px solid var(--color-border);
|
|
125
|
+
border-radius: var(--radius);
|
|
126
|
+
padding: 16px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.stat-card .label {
|
|
130
|
+
font-size: 0.8rem;
|
|
131
|
+
color: var(--color-text-muted);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.stat-card .value {
|
|
135
|
+
font-size: 1.5rem;
|
|
136
|
+
font-weight: 700;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.stat-card .value.muted {
|
|
140
|
+
color: var(--color-text-muted);
|
|
141
|
+
}
|
|
142
|
+
.stat-card .value.warning {
|
|
143
|
+
color: var(--color-warning);
|
|
144
|
+
}
|
|
145
|
+
.stat-card .value.success {
|
|
146
|
+
color: var(--color-success);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.add-form {
|
|
150
|
+
display: flex;
|
|
151
|
+
gap: 12px;
|
|
152
|
+
margin-bottom: 32px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.add-form input {
|
|
156
|
+
flex: 1;
|
|
157
|
+
padding: 10px 16px;
|
|
158
|
+
border: 1px solid var(--color-border);
|
|
159
|
+
border-radius: var(--radius);
|
|
160
|
+
background: var(--color-surface);
|
|
161
|
+
color: var(--color-text);
|
|
162
|
+
font-size: 0.95rem;
|
|
163
|
+
outline: none;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.add-form input:focus {
|
|
167
|
+
border-color: var(--color-primary);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.add-form input::placeholder {
|
|
171
|
+
color: var(--color-text-muted);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.add-form button {
|
|
175
|
+
padding: 10px 20px;
|
|
176
|
+
border: none;
|
|
177
|
+
border-radius: var(--radius);
|
|
178
|
+
background: var(--color-primary);
|
|
179
|
+
color: white;
|
|
180
|
+
font-size: 0.95rem;
|
|
181
|
+
font-weight: 500;
|
|
182
|
+
cursor: pointer;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.add-form button:hover {
|
|
186
|
+
background: var(--color-primary-hover);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.add-form button:disabled {
|
|
190
|
+
opacity: 0.5;
|
|
191
|
+
cursor: not-allowed;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.filters {
|
|
195
|
+
display: flex;
|
|
196
|
+
gap: 8px;
|
|
197
|
+
margin-bottom: 24px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.filter-btn {
|
|
201
|
+
padding: 6px 16px;
|
|
202
|
+
border: none;
|
|
203
|
+
border-radius: var(--radius);
|
|
204
|
+
background: var(--color-surface);
|
|
205
|
+
color: var(--color-text-muted);
|
|
206
|
+
font-size: 0.85rem;
|
|
207
|
+
font-weight: 500;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.filter-btn:hover {
|
|
212
|
+
background: var(--color-border-hover);
|
|
213
|
+
color: var(--color-text);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.filter-btn.active {
|
|
217
|
+
background: var(--color-primary);
|
|
218
|
+
color: white;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.filter-btn .badge {
|
|
222
|
+
display: inline-block;
|
|
223
|
+
margin-left: 6px;
|
|
224
|
+
padding: 1px 6px;
|
|
225
|
+
border-radius: 999px;
|
|
226
|
+
font-size: 0.75rem;
|
|
227
|
+
background: rgba(255, 255, 255, 0.15);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.filter-btn:not(.active) .badge {
|
|
231
|
+
background: var(--color-border);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.todo-list {
|
|
235
|
+
display: flex;
|
|
236
|
+
flex-direction: column;
|
|
237
|
+
gap: 8px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.todo-item {
|
|
241
|
+
display: flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
gap: 12px;
|
|
244
|
+
padding: 12px 16px;
|
|
245
|
+
border: 1px solid var(--color-border);
|
|
246
|
+
border-radius: var(--radius);
|
|
247
|
+
background: var(--color-surface);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.todo-item:hover {
|
|
251
|
+
border-color: var(--color-border-hover);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.todo-item .toggle {
|
|
255
|
+
background: none;
|
|
256
|
+
border: 2px solid var(--color-text-muted);
|
|
257
|
+
width: 20px;
|
|
258
|
+
height: 20px;
|
|
259
|
+
border-radius: 50%;
|
|
260
|
+
cursor: pointer;
|
|
261
|
+
display: flex;
|
|
262
|
+
align-items: center;
|
|
263
|
+
justify-content: center;
|
|
264
|
+
color: transparent;
|
|
265
|
+
font-size: 0.7rem;
|
|
266
|
+
flex-shrink: 0;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.todo-item .toggle.checked {
|
|
270
|
+
border-color: var(--color-success);
|
|
271
|
+
background: var(--color-success);
|
|
272
|
+
color: white;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.todo-item .title {
|
|
276
|
+
flex: 1;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.todo-item .title.done {
|
|
280
|
+
text-decoration: line-through;
|
|
281
|
+
color: var(--color-text-muted);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.todo-item .time {
|
|
285
|
+
font-size: 0.75rem;
|
|
286
|
+
color: var(--color-text-dim);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.todo-item .delete-btn {
|
|
290
|
+
background: none;
|
|
291
|
+
border: none;
|
|
292
|
+
color: var(--color-text-dim);
|
|
293
|
+
cursor: pointer;
|
|
294
|
+
padding: 4px;
|
|
295
|
+
opacity: 0;
|
|
296
|
+
transition: opacity 0.15s;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.todo-item:hover .delete-btn {
|
|
300
|
+
opacity: 1;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.todo-item .delete-btn:hover {
|
|
304
|
+
color: var(--color-danger);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.empty-state {
|
|
308
|
+
padding: 48px 0;
|
|
309
|
+
text-align: center;
|
|
310
|
+
color: var(--color-text-dim);
|
|
311
|
+
border: 1px dashed var(--color-border);
|
|
312
|
+
border-radius: var(--radius);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.footer {
|
|
316
|
+
display: flex;
|
|
317
|
+
justify-content: space-between;
|
|
318
|
+
margin-top: 24px;
|
|
319
|
+
font-size: 0.85rem;
|
|
320
|
+
color: var(--color-text-muted);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.footer button {
|
|
324
|
+
background: none;
|
|
325
|
+
border: none;
|
|
326
|
+
color: var(--color-text-muted);
|
|
327
|
+
cursor: pointer;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.footer button:hover {
|
|
331
|
+
color: var(--color-text);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.branding {
|
|
335
|
+
margin-top: 48px;
|
|
336
|
+
text-align: center;
|
|
337
|
+
font-size: 0.75rem;
|
|
338
|
+
color: var(--color-text-dim);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.clock-error-banner {
|
|
342
|
+
margin: 0 0 16px;
|
|
343
|
+
padding: 12px 16px;
|
|
344
|
+
border: 1px solid rgba(251, 191, 36, 0.4);
|
|
345
|
+
border-radius: 8px;
|
|
346
|
+
background: rgba(251, 191, 36, 0.1);
|
|
347
|
+
color: #fbbf24;
|
|
348
|
+
font-size: 14px;
|
|
349
|
+
line-height: 1.5;
|
|
350
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Web Worker entry point for SQLite WASM.
|
|
2
|
+
// Loaded automatically by the Kora store to run SQLite in a background thread.
|
|
3
|
+
|
|
4
|
+
// Import the WASM binary URL so Vite resolves it with the correct content hash.
|
|
5
|
+
// Without this, production builds fail because sqlite3 looks for the unhashed filename.
|
|
6
|
+
import sqliteWasmUrl from '@sqlite.org/sqlite-wasm/sqlite3.wasm?url'
|
|
7
|
+
;(globalThis as Record<string, unknown>).__KORA_SQLITE_WASM_URL = sqliteWasmUrl
|
|
8
|
+
|
|
9
|
+
import '@korajs/store/sqlite-wasm/worker'
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createKoraAuthSync } from '@korajs/auth'
|
|
2
|
+
import { AuthProvider } from '@korajs/auth/react'
|
|
3
|
+
import { KoraProvider } from '@korajs/react'
|
|
4
|
+
import { createApp } from 'korajs'
|
|
5
|
+
import { StrictMode } from 'react'
|
|
6
|
+
import { createRoot } from 'react-dom/client'
|
|
7
|
+
import { App } from './App'
|
|
8
|
+
import { authClient, completeOAuthCallbackFromLocation } from './auth'
|
|
9
|
+
import schema from './schema'
|
|
10
|
+
import './index.css'
|
|
11
|
+
import koraWorkerUrl from './kora-worker.ts?worker&url'
|
|
12
|
+
|
|
13
|
+
// Build sync URL: use env var if set, otherwise derive from current page host.
|
|
14
|
+
// This allows the Vite proxy (/kora-sync → ws://localhost:3001) to work in dev,
|
|
15
|
+
// and also works through any tunnel (ngrok, cloudflared) without extra configuration.
|
|
16
|
+
const syncUrl =
|
|
17
|
+
import.meta.env.VITE_SYNC_URL ||
|
|
18
|
+
`${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/kora-sync`
|
|
19
|
+
|
|
20
|
+
const app = createApp({
|
|
21
|
+
schema,
|
|
22
|
+
sync: {
|
|
23
|
+
url: syncUrl,
|
|
24
|
+
authClient: createKoraAuthSync({ authClient, schema }),
|
|
25
|
+
},
|
|
26
|
+
store: {
|
|
27
|
+
workerUrl: koraWorkerUrl,
|
|
28
|
+
},
|
|
29
|
+
devtools: import.meta.env.DEV,
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
// Connect to sync server once the app is ready
|
|
33
|
+
app.ready.then(() => app.sync?.connect())
|
|
34
|
+
void completeOAuthCallbackFromLocation().catch((error) => {
|
|
35
|
+
console.error('[Kora Auth] OAuth callback failed:', error)
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
const rootElement = document.getElementById('root')
|
|
39
|
+
|
|
40
|
+
if (!rootElement) {
|
|
41
|
+
throw new Error('Root element not found')
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
createRoot(rootElement).render(
|
|
45
|
+
<StrictMode>
|
|
46
|
+
<AuthProvider client={authClient} fallback={<div>Restoring session...</div>}>
|
|
47
|
+
<KoraProvider app={app} fallback={<div>Loading...</div>}>
|
|
48
|
+
<App />
|
|
49
|
+
</KoraProvider>
|
|
50
|
+
</AuthProvider>
|
|
51
|
+
</StrictMode>,
|
|
52
|
+
)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CollectionAccessor } from 'korajs'
|
|
2
|
+
|
|
3
|
+
export interface CreateTodoInput {
|
|
4
|
+
title: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface UpdateTodoStatusInput {
|
|
8
|
+
completed: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function createTodo(todos: CollectionAccessor, data: CreateTodoInput) {
|
|
12
|
+
return todos.insert({ title: data.title })
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function updateTodoStatus(
|
|
16
|
+
todos: CollectionAccessor,
|
|
17
|
+
id: string,
|
|
18
|
+
data: UpdateTodoStatusInput,
|
|
19
|
+
) {
|
|
20
|
+
return todos.update(id, { completed: data.completed })
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function deleteTodo(todos: CollectionAccessor, id: string) {
|
|
24
|
+
return todos.delete(id)
|
|
25
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useCollection, useMutation, useQuery } from '@korajs/react'
|
|
2
|
+
import {
|
|
3
|
+
type CreateTodoInput,
|
|
4
|
+
type UpdateTodoStatusInput,
|
|
5
|
+
createTodo,
|
|
6
|
+
deleteTodo,
|
|
7
|
+
updateTodoStatus,
|
|
8
|
+
} from './todo.mutations'
|
|
9
|
+
import { orderedTodos } from './todo.queries'
|
|
10
|
+
|
|
11
|
+
export function useTodos() {
|
|
12
|
+
const todos = useCollection('todos')
|
|
13
|
+
const allTodos = useQuery(orderedTodos(todos))
|
|
14
|
+
const addTodo = useMutation((data: CreateTodoInput) => createTodo(todos, data))
|
|
15
|
+
const toggleTodo = useMutation((id: string, data: UpdateTodoStatusInput) =>
|
|
16
|
+
updateTodoStatus(todos, id, data),
|
|
17
|
+
)
|
|
18
|
+
const removeTodo = useMutation((id: string) => deleteTodo(todos, id))
|
|
19
|
+
|
|
20
|
+
const activeTodos = allTodos.filter((todo) => !todo.completed)
|
|
21
|
+
const completedTodos = allTodos.filter((todo) => !!todo.completed)
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
allTodos,
|
|
25
|
+
activeTodos,
|
|
26
|
+
completedTodos,
|
|
27
|
+
addTodo,
|
|
28
|
+
toggleTodo,
|
|
29
|
+
deleteTodo: removeTodo,
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface ImportMetaEnv {
|
|
2
|
+
readonly DEV: boolean
|
|
3
|
+
readonly VITE_SYNC_URL?: string
|
|
4
|
+
readonly VITE_AUTH_URL?: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface ImportMeta {
|
|
8
|
+
readonly env: ImportMetaEnv
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module '*?worker&url' {
|
|
12
|
+
const url: string
|
|
13
|
+
export default url
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module '*?url' {
|
|
17
|
+
const url: string
|
|
18
|
+
export default url
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"jsx": "react-jsx",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noUncheckedIndexedAccess": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"outDir": "dist"
|
|
12
|
+
},
|
|
13
|
+
"include": ["src"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { copyFileSync, existsSync, readdirSync } from 'node:fs'
|
|
2
|
+
import { join, resolve } from 'node:path'
|
|
3
|
+
import { koraServiceWorker } from '@korajs/cli/vite'
|
|
4
|
+
import react from '@vitejs/plugin-react'
|
|
5
|
+
import type { Plugin } from 'vite'
|
|
6
|
+
import { defineConfig } from 'vite'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Adds Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers
|
|
10
|
+
* enabling SharedArrayBuffer where browsers support it while keeping common
|
|
11
|
+
* third-party embeds such as YouTube and Vimeo usable. Kora falls back to
|
|
12
|
+
* durable IndexedDB storage when SharedArrayBuffer is unavailable.
|
|
13
|
+
*/
|
|
14
|
+
function crossOriginIsolation(): Plugin {
|
|
15
|
+
const embedderPolicy = process.env.KORA_COEP_POLICY || 'credentialless'
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
name: 'cross-origin-isolation',
|
|
19
|
+
configureServer(server) {
|
|
20
|
+
server.middlewares.use((_req, res, next) => {
|
|
21
|
+
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin')
|
|
22
|
+
res.setHeader('Cross-Origin-Embedder-Policy', embedderPolicy)
|
|
23
|
+
next()
|
|
24
|
+
})
|
|
25
|
+
},
|
|
26
|
+
configurePreviewServer(server) {
|
|
27
|
+
server.middlewares.use((_req, res, next) => {
|
|
28
|
+
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin')
|
|
29
|
+
res.setHeader('Cross-Origin-Embedder-Policy', embedderPolicy)
|
|
30
|
+
next()
|
|
31
|
+
})
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Fixes sqlite3 WASM assets in production builds:
|
|
38
|
+
* 1. Copies the hashed sqlite3.wasm to an unhashed name so Emscripten's locateFile works
|
|
39
|
+
* 2. Copies sqlite3-opfs-async-proxy.js from node_modules (not bundled by Vite since
|
|
40
|
+
* sqlite3 loads it dynamically) so the full OPFS VFS can initialize without errors
|
|
41
|
+
*/
|
|
42
|
+
function sqliteWasmHotfix(): Plugin {
|
|
43
|
+
return {
|
|
44
|
+
name: 'sqlite-wasm-hotfix',
|
|
45
|
+
apply: 'build',
|
|
46
|
+
closeBundle() {
|
|
47
|
+
const assetsDir = resolve('dist', 'assets')
|
|
48
|
+
if (!existsSync(assetsDir)) return
|
|
49
|
+
|
|
50
|
+
// Copy hashed sqlite3.wasm to unhashed name
|
|
51
|
+
for (const file of readdirSync(assetsDir)) {
|
|
52
|
+
if (/^sqlite3-.+\.wasm$/.test(file)) {
|
|
53
|
+
copyFileSync(join(assetsDir, file), join(assetsDir, 'sqlite3.wasm'))
|
|
54
|
+
break
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Copy OPFS async proxy worker (dynamically loaded by sqlite3, not detected by Vite)
|
|
59
|
+
const proxyFile = resolve(
|
|
60
|
+
'node_modules',
|
|
61
|
+
'@sqlite.org',
|
|
62
|
+
'sqlite-wasm',
|
|
63
|
+
'sqlite-wasm',
|
|
64
|
+
'jswasm',
|
|
65
|
+
'sqlite3-opfs-async-proxy.js',
|
|
66
|
+
)
|
|
67
|
+
if (existsSync(proxyFile)) {
|
|
68
|
+
copyFileSync(proxyFile, join(assetsDir, 'sqlite3-opfs-async-proxy.js'))
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// koraServiceWorker() (build only, keep it last): precaches the built app shell so the
|
|
75
|
+
// app opens offline, with a "new version available" reload prompt. See @korajs/cli/vite.
|
|
76
|
+
export default defineConfig({
|
|
77
|
+
plugins: [react(), crossOriginIsolation(), sqliteWasmHotfix(), koraServiceWorker()],
|
|
78
|
+
worker: {
|
|
79
|
+
format: 'es',
|
|
80
|
+
},
|
|
81
|
+
optimizeDeps: {
|
|
82
|
+
exclude: ['@sqlite.org/sqlite-wasm', '@korajs/store'],
|
|
83
|
+
include: ['yjs'],
|
|
84
|
+
},
|
|
85
|
+
resolve: {
|
|
86
|
+
dedupe: ['yjs'],
|
|
87
|
+
},
|
|
88
|
+
server: {
|
|
89
|
+
allowedHosts: true,
|
|
90
|
+
watch: {
|
|
91
|
+
ignored: ['**/.kora/**', '**/kora/generated/**', '**/*.db', '**/*.db-shm', '**/*.db-wal'],
|
|
92
|
+
},
|
|
93
|
+
proxy: {
|
|
94
|
+
'/kora-sync': {
|
|
95
|
+
target: 'ws://localhost:3001',
|
|
96
|
+
ws: true,
|
|
97
|
+
rewriteWsOrigin: true,
|
|
98
|
+
},
|
|
99
|
+
'/auth': {
|
|
100
|
+
target: 'http://localhost:3001',
|
|
101
|
+
changeOrigin: true,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
})
|