@@ -53,7 +53,7 @@ DATABASE_URL=file:./db.sqlite
53
53
`
54
54
55
55
const prismaExampleEndpoint = `/**
56
- * Fetch all \`examples\` from the database. Run \`npx prisma generate\` and \`npx prisma db push\` for this to work.
56
+ * Fetch all \`examples\` from the database. Run \`npx prisma db push\` at least once for this to work.
57
57
*
58
58
* If you are using \`tRPC\` you can access the prisma-client by adding it to the context:
59
59
* \`\`\`ts
@@ -111,21 +111,12 @@ export const resetDatabase = (databaseUrl?: string) => {
111
111
`
112
112
113
113
const prismaExamplePage = `<script setup lang="ts">
114
- /**
115
- * In Nuxt 3.1.2 \`useFetch\` return types are not correctly inferred. In order to workaround this limitation, we sadly need to manually import and type a lof ot things.
116
- *
117
- * As soon as https://github.com/nuxt/nuxt/issues/15280 is closed and released, we can go back to just: \`const { data: examples } = useFetch('/api/examples')\`
118
- * */
119
- import type { Ref } from 'vue'
120
- import { Example } from '.prisma/client'
121
-
122
- const { data } = useFetch('/api/examples')
123
- const examples = (data as Ref<Example[] | null>)
114
+ const { data: examples } = useFetch('/api/examples')
124
115
</script>
125
116
126
117
<template>
127
118
<div>
128
- <p> Prisma ORM Data from the database, received {{ examples?.length || 0 }} records: <pre>{{ examples }}</pre></p >
119
+ Prisma ORM Data from the database, received {{ examples?.length || 0 }} records: <pre>{{ examples }}</pre>
129
120
</div>
130
121
</template>
131
122
`
@@ -315,7 +306,7 @@ const hello = await $client.hello.useQuery({ text: 'client' })
315
306
<template>
316
307
<div>
317
308
<!-- As \`superjson\` is already pre-configured, we can use \`time\` as a \`Date\` object without further deserialization 🎉 -->
318
- <p> tRPC Data: "{{ hello.data.value?.greeting }}" send at "{{ hello.data.value?.time.toLocaleDateString() }}".</p>
309
+ tRPC Data: "{{ hello.data.value?.greeting }}" send at "{{ hello.data.value?.time.toLocaleDateString('en-EN' ) }}".
319
310
</div>
320
311
</template>
321
312
`
@@ -348,12 +339,12 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
348
339
dependencies : [
349
340
{
350
341
name : "prisma" ,
351
- version : "^4.8.0 " ,
342
+ version : "^4.10.1 " ,
352
343
isDev : true
353
344
} ,
354
345
{
355
346
name : "@prisma/client" ,
356
- version : "^4.8.0 " ,
347
+ version : "^4.10.1 " ,
357
348
isDev : false
358
349
}
359
350
] ,
@@ -379,8 +370,7 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
379
370
} ] ,
380
371
tasksPostInstall : [
381
372
"- [ ] Prisma: Edit your `prisma/prisma.schema` to your liking" ,
382
- "- [ ] Prisma: Run `npx prisma db push` to sync the schema to your database after changing the schema" ,
383
- "- [ ] Prisma: Run `npx prisma generate` to re-generate the client after changing the schema"
373
+ "- [ ] Prisma: Run `npx prisma db push` to sync the schema to your database & generate the Prisma Client" ,
384
374
] ,
385
375
indexVue : generateModuleHTMLSnippet (
386
376
"Prisma ORM" ,
@@ -396,9 +386,14 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
396
386
dependencies : [
397
387
{
398
388
name : "@sidebase/nuxt-auth" ,
399
- version : "^0.3.3 " ,
389
+ version : "^0.4.1 " ,
400
390
isDev : true
401
391
} ,
392
+ {
393
+ name : "next-auth" ,
394
+ version : "^4.18.8" ,
395
+ isDev : false
396
+ }
402
397
] ,
403
398
nuxtConfig : {
404
399
modules : [ "@sidebase/nuxt-auth" ]
@@ -427,23 +422,23 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
427
422
description : "Build end-to-end typesafe APIs in Nuxt applications. See more: https://trpc.io/" ,
428
423
dependencies : [ {
429
424
name : "@trpc/server" ,
430
- version : "^10.5 .0" ,
425
+ version : "^10.10 .0" ,
431
426
isDev : false
432
427
} , {
433
428
name : "@trpc/client" ,
434
- version : "^10.5 .0" ,
429
+ version : "^10.10 .0" ,
435
430
isDev : false
436
431
} , {
437
432
name : "trpc-nuxt" ,
438
- version : "^0.4.4 " ,
433
+ version : "^0.6.0 " ,
439
434
isDev : false
440
435
} , {
441
436
name : "zod" ,
442
- version : "^3.20.2 " ,
437
+ version : "^3.20.6 " ,
443
438
isDev : false
444
439
} , {
445
440
name : "superjson" ,
446
- version : "^1.12.1 " ,
441
+ version : "^1.12.2 " ,
447
442
isDev : false
448
443
} ] ,
449
444
nuxtConfig : {
@@ -512,7 +507,7 @@ export const moduleConfigs: Record<Modules, ModuleConfig> = {
512
507
description : "A Vue 3 Component Library. Complete, Customizable, Uses TypeScript, Fast. See more: https://www.naiveui.com/" ,
513
508
dependencies : [ {
514
509
name : "@huntersofbook/naive-ui-nuxt" ,
515
- version : "^0.5.1 " ,
510
+ version : "^0.6.0 " ,
516
511
isDev : true
517
512
} ] ,
518
513
nuxtConfig : {
0 commit comments