create-better-t-stack 2.47.8 → 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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { createBtsCli } from "./src-D7YJOo26.js";
2
+ import { createBtsCli } from "./src-BwIapwZk.js";
3
3
 
4
4
  //#region src/cli.ts
5
5
  createBtsCli().run();
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { builder, createBtsCli, docs, init, router, sponsors } from "./src-D7YJOo26.js";
2
+ import { builder, createBtsCli, docs, init, router, sponsors } from "./src-BwIapwZk.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -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.39",
110
+ ai: "^5.0.49",
111
111
  "@ai-sdk/google": "^2.0.13",
112
- "@ai-sdk/vue": "^2.0.39",
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.8.6",
118
- "@orpc/client": "^1.8.6",
119
- "@orpc/openapi": "^1.8.6",
120
- "@orpc/zod": "^1.8.6",
121
- "@orpc/tanstack-query": "^1.8.6",
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.83.0",
134
- "@tanstack/vue-query": "^5.83.0",
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.47.8",
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",
@@ -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 { nextTick, ref, watch } from 'vue'
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
- const handleSubmit = (e: Event) => {
24
+ async function handleSubmit(e: Event) {
27
25
  e.preventDefault()
28
- const text = input.value.trim()
29
- if (!text) return
30
- chat.sendMessage({ text })
26
+ const userInput = input.value
31
27
  input.value = ''
32
- }
33
-
34
- function getMessageText(message: any) {
35
- return message.parts
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] overflow-hidden w-full mx-auto p-4">
44
- <div class="overflow-y-auto space-y-4 pb-4">
45
- <div v-if="chat.messages.length === 0" class="text-center text-muted-foreground mt-8">
46
- Ask me anything to get started!
47
- </div>
48
- <div
49
- v-for="message in chat.messages"
50
- :key="message.id"
51
- :class="[
52
- 'p-3 rounded-lg',
53
- message.role === 'user' ? 'bg-primary/10 ml-8' : 'bg-secondary/20 mr-8'
54
- ]"
55
- >
56
- <p class="text-sm font-semibold mb-1">
57
- \{{ message.role === 'user' ? 'You' : 'AI Assistant' }}
58
- </p>
59
- <div class="whitespace-pre-wrap">\{{ getMessageText(message) }}</div>
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
- <UButton type="submit" color="primary" size="md" square>
74
- <UIcon name="i-lucide-send" class="w-5 h-5" />
75
- </UButton>
76
- </form>
54
+ </UChatPrompt>
77
55
  </div>
78
56
  </template>
@@ -2,7 +2,7 @@
2
2
  </script>
3
3
 
4
4
  <template>
5
- <div class="grid grid-rows-[auto_1fr] h-full">
5
+ <div class="grid grid-rows-[auto_1fr] h-svh">
6
6
  <Header />
7
7
  <main class="overflow-y-auto">
8
8
  <slot />
@@ -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": "3.3.3",
14
- "nuxt": "^4.1.1",
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.11",
23
+ "tailwindcss": "^4.1.13",
22
24
  "@iconify-json/lucide": "^1.2.57"
23
25
  }
24
26
  }