create-better-t-stack 2.47.7 → 2.48.0
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/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-D7YJOo26.js → src-BwIapwZk.js} +9 -9
- package/package.json +2 -2
- package/templates/backend/server/elysia/src/index.ts.hbs +2 -2
- package/templates/examples/ai/web/nuxt/app/pages/ai.vue.hbs +33 -55
- package/templates/frontend/nuxt/app/layouts/default.vue.hbs +1 -1
- package/templates/frontend/nuxt/app/pages/index.vue.hbs +0 -11
- package/templates/frontend/nuxt/package.json.hbs +5 -3
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -107,18 +107,18 @@ const dependencyVersionMap = {
|
|
|
107
107
|
fastify: "^5.3.3",
|
|
108
108
|
"@fastify/cors": "^11.0.1",
|
|
109
109
|
turbo: "^2.5.4",
|
|
110
|
-
ai: "^5.0.
|
|
110
|
+
ai: "^5.0.49",
|
|
111
111
|
"@ai-sdk/google": "^2.0.13",
|
|
112
|
-
"@ai-sdk/vue": "^2.0.
|
|
112
|
+
"@ai-sdk/vue": "^2.0.49",
|
|
113
113
|
"@ai-sdk/svelte": "^3.0.39",
|
|
114
114
|
"@ai-sdk/react": "^2.0.39",
|
|
115
115
|
streamdown: "^1.3.0",
|
|
116
116
|
shiki: "^3.12.2",
|
|
117
|
-
"@orpc/server": "^1.
|
|
118
|
-
"@orpc/client": "^1.
|
|
119
|
-
"@orpc/openapi": "^1.
|
|
120
|
-
"@orpc/zod": "^1.
|
|
121
|
-
"@orpc/tanstack-query": "^1.
|
|
117
|
+
"@orpc/server": "^1.9.0",
|
|
118
|
+
"@orpc/client": "^1.9.0",
|
|
119
|
+
"@orpc/openapi": "^1.9.0",
|
|
120
|
+
"@orpc/zod": "^1.9.0",
|
|
121
|
+
"@orpc/tanstack-query": "^1.9.0",
|
|
122
122
|
"@trpc/tanstack-react-query": "^11.5.0",
|
|
123
123
|
"@trpc/server": "^11.5.0",
|
|
124
124
|
"@trpc/client": "^11.5.0",
|
|
@@ -130,8 +130,8 @@ const dependencyVersionMap = {
|
|
|
130
130
|
"@convex-dev/better-auth": "^0.8.4",
|
|
131
131
|
"@tanstack/svelte-query": "^5.85.3",
|
|
132
132
|
"@tanstack/svelte-query-devtools": "^5.85.3",
|
|
133
|
-
"@tanstack/vue-query-devtools": "^5.
|
|
134
|
-
"@tanstack/vue-query": "^5.
|
|
133
|
+
"@tanstack/vue-query-devtools": "^5.90.2",
|
|
134
|
+
"@tanstack/vue-query": "^5.90.2",
|
|
135
135
|
"@tanstack/react-query-devtools": "^5.85.5",
|
|
136
136
|
"@tanstack/react-query": "^5.85.5",
|
|
137
137
|
"@tanstack/solid-query": "^5.87.4",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.48.0",
|
|
4
4
|
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
"typescript": "^5.9.2",
|
|
88
88
|
"vitest": "^3.2.4"
|
|
89
89
|
}
|
|
90
|
-
}
|
|
90
|
+
}
|
|
@@ -65,11 +65,11 @@ const app = new Elysia()
|
|
|
65
65
|
)
|
|
66
66
|
{{#if (eq auth "better-auth")}}
|
|
67
67
|
.all("/api/auth/*", async (context) => {
|
|
68
|
-
const { request } = context;
|
|
68
|
+
const { request, status } = context;
|
|
69
69
|
if (["POST", "GET"].includes(request.method)) {
|
|
70
70
|
return auth.handler(request);
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
return status(405)
|
|
73
73
|
})
|
|
74
74
|
{{/if}}
|
|
75
75
|
{{#if (eq api "orpc")}}
|
|
@@ -1,78 +1,56 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { Chat } from '@ai-sdk/vue'
|
|
3
|
+
import type { UIMessage } from 'ai'
|
|
4
|
+
import { getTextFromMessage } from '@nuxt/ui/utils/ai'
|
|
3
5
|
import { DefaultChatTransport } from 'ai'
|
|
4
|
-
import {
|
|
6
|
+
import { ref } from 'vue'
|
|
5
7
|
|
|
6
8
|
const config = useRuntimeConfig()
|
|
7
9
|
const serverUrl = config.public.serverURL
|
|
8
10
|
|
|
11
|
+
const messages: UIMessage[] = []
|
|
9
12
|
const input = ref('')
|
|
13
|
+
|
|
10
14
|
const chat = new Chat({
|
|
15
|
+
messages,
|
|
11
16
|
transport: new DefaultChatTransport({
|
|
12
17
|
api: `${serverUrl}/ai`,
|
|
13
18
|
}),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const messagesEndRef = ref<null | HTMLDivElement>(null)
|
|
17
|
-
|
|
18
|
-
watch(
|
|
19
|
-
() => chat.messages,
|
|
20
|
-
async () => {
|
|
21
|
-
await nextTick()
|
|
22
|
-
messagesEndRef.value?.scrollIntoView({ behavior: 'smooth' })
|
|
19
|
+
onError(error) {
|
|
20
|
+
console.error('Chat error:', error)
|
|
23
21
|
}
|
|
24
|
-
)
|
|
22
|
+
})
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
async function handleSubmit(e: Event) {
|
|
27
25
|
e.preventDefault()
|
|
28
|
-
const
|
|
29
|
-
if (!text) return
|
|
30
|
-
chat.sendMessage({ text })
|
|
26
|
+
const userInput = input.value
|
|
31
27
|
input.value = ''
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.filter((part: any) => part.type === 'text')
|
|
37
|
-
.map((part: any) => part.text)
|
|
38
|
-
.join('')
|
|
28
|
+
|
|
29
|
+
if (!userInput.trim()) return
|
|
30
|
+
|
|
31
|
+
chat.sendMessage({ text: userInput })
|
|
39
32
|
}
|
|
40
33
|
</script>
|
|
41
34
|
|
|
42
35
|
<template>
|
|
43
|
-
<div class="grid grid-rows-[1fr_auto]
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
</
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</div>
|
|
61
|
-
<div ref="messagesEndRef"></div>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<form @submit="handleSubmit" class="w-full flex items-center space-x-2 pt-2 border-t">
|
|
65
|
-
<UInput
|
|
66
|
-
name="prompt"
|
|
67
|
-
v-model="input"
|
|
68
|
-
placeholder="Type your message..."
|
|
69
|
-
class="flex-1"
|
|
70
|
-
autocomplete="off"
|
|
71
|
-
autofocus
|
|
36
|
+
<div class="grid grid-rows-[1fr_auto] w-full h-full mx-auto p-4">
|
|
37
|
+
<UChatMessages :messages="chat.messages" :status="chat.status">
|
|
38
|
+
<template #content="{ message }">
|
|
39
|
+
<div class="whitespace-pre-wrap">\{{ getTextFromMessage(message) }}</div>
|
|
40
|
+
</template>
|
|
41
|
+
</UChatMessages>
|
|
42
|
+
<UChatPrompt
|
|
43
|
+
v-model="input"
|
|
44
|
+
:error="chat.error"
|
|
45
|
+
@submit="handleSubmit"
|
|
46
|
+
placeholder="Type your message..."
|
|
47
|
+
class="w-full"
|
|
48
|
+
>
|
|
49
|
+
<UChatPromptSubmit
|
|
50
|
+
:status="chat.status"
|
|
51
|
+
@stop="chat.stop"
|
|
52
|
+
@reload="chat.regenerate"
|
|
72
53
|
/>
|
|
73
|
-
|
|
74
|
-
<UIcon name="i-lucide-send" class="w-5 h-5" />
|
|
75
|
-
</UButton>
|
|
76
|
-
</form>
|
|
54
|
+
</UChatPrompt>
|
|
77
55
|
</div>
|
|
78
56
|
</template>
|
|
@@ -54,17 +54,6 @@ const healthCheck = useConvexQuery(api.healthCheck.get, {});
|
|
|
54
54
|
{{else}}
|
|
55
55
|
{{#unless (eq api "none")}}
|
|
56
56
|
<div class="flex items-center gap-2">
|
|
57
|
-
<div
|
|
58
|
-
class="w-2 h-2 rounded-full"
|
|
59
|
-
:class="{
|
|
60
|
-
'bg-yellow-500 animate-pulse': healthCheck.status.value === 'pending',
|
|
61
|
-
'bg-green-500': healthCheck.status.value === 'success',
|
|
62
|
-
'bg-red-500': healthCheck.status.value === 'error',
|
|
63
|
-
'bg-gray-400': healthCheck.status.value !== 'pending' &&
|
|
64
|
-
healthCheck.status.value !== 'success' &&
|
|
65
|
-
healthCheck.status.value !== 'error'
|
|
66
|
-
}"
|
|
67
|
-
></div>
|
|
68
57
|
<span class="text-sm text-muted-foreground">
|
|
69
58
|
<template v-if="healthCheck.status.value === 'pending'">
|
|
70
59
|
Checking...
|
|
@@ -10,15 +10,17 @@
|
|
|
10
10
|
"postinstall": "nuxt prepare"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@nuxt/ui": "
|
|
14
|
-
"nuxt": "^
|
|
13
|
+
"@nuxt/ui": "^4.0.0",
|
|
14
|
+
"@nuxt/content": "^3.7.1",
|
|
15
|
+
"@nuxtjs/mdc": "^0.17.4",
|
|
16
|
+
"nuxt": "^4.1.2",
|
|
15
17
|
"typescript": "^5.9.2",
|
|
16
18
|
"vue": "^3.5.21",
|
|
17
19
|
"vue-router": "^4.5.1",
|
|
18
20
|
"zod": "^4.1.5"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
21
|
-
"tailwindcss": "^4.1.
|
|
23
|
+
"tailwindcss": "^4.1.13",
|
|
22
24
|
"@iconify-json/lucide": "^1.2.57"
|
|
23
25
|
}
|
|
24
26
|
}
|