Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ jobs:

# start prod-app
- name: app:run in prod
env:
AUTH_ORIGIN: http://localhost:3000/api/auth
run: "cd my-sidebase-app && npm run build && timeout 30 npm run preview || ( [[ $? -eq 124 ]] && echo \"app started and did not exit within first 30 seconds, thats good\" )"

# start dev-app and curl from it
- name: app:test in prod
env:
AUTH_ORIGIN: http://localhost:3000/api/auth
run: "cd my-sidebase-app && timeout 30 npm run dev & (sleep 20 && curl --fail localhost:3000) || ( [[ $? -eq 124 ]] && echo \"app started and did not exit within first 30 seconds, thats good\" )"
4 changes: 2 additions & 2 deletions src/configs/droneCI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ trigger:

steps:
- name: lint-and-typecheck
image: node:20.9.0-slim
image: node:24.10.0-slim
commands:
- npm i -g @antfu/ni
- nci
- nr lint
- nr typecheck
- name: build
image: node:20.9.0-slim
image: node:24.10.0-slim
commands:
- npm i -g @antfu/ni
- nci
Expand Down
6 changes: 3 additions & 3 deletions src/configs/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ const eslint: Config = {
dependencies: [
{
name: 'eslint',
version: '^9.18.0',
version: '^9.37.0',
isDev: true
},
{
name: '@antfu/eslint-config',
version: '^3.15.0',
version: '^5.4.1',
isDev: true
},
{
name: 'oxlint',
version: '^0.15.7',
version: '^1.20.0',
isDev: true
}
],
Expand Down
11 changes: 7 additions & 4 deletions src/configs/github-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ on:
pull_request:
branches: [ main ]

env:
NODE_VERSION: '24.10.0'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.6.1
- name: Use Node.js $/{{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: 20.6.1
node-version: $/{{ env.NODE_VERSION }}

- name: Setup
run: npm i -g @antfu/ni
Expand All @@ -32,10 +35,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.6.1
- name: Use Node.js $/{{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: 20.6.1
node-version: $/{{ env.NODE_VERSION }}

- name: Setup
run: npm i -g @antfu/ni
Expand Down
6 changes: 2 additions & 4 deletions src/configs/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const i18n: ModuleConfig = {
dependencies: [
{
name: '@nuxtjs/i18n',
version: '^9.2.1',
version: '^10.1.0',
isDev: true
}
],
Expand All @@ -64,9 +64,7 @@ const i18n: ModuleConfig = {
],
strategy: 'prefix_except_default',
detectBrowserLanguage: false,
lazy: true,
experimental: {
autoImportTranslationFunctions: true,
localeDetector: 'localeDetector.ts'
}
}
Expand All @@ -81,7 +79,7 @@ const i18n: ModuleConfig = {
content: englishLocaleFile
},
{
path: 'components/Welcome/I18nDemo.vue',
path: 'app/components/Welcome/I18nDemo.vue',
content: i18nDemoComponent
}
],
Expand Down
6 changes: 3 additions & 3 deletions src/configs/naiveui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const naiveui: ModuleConfig = {
dependencies: [
{
name: '@bg-dev/nuxt-naiveui',
version: '2.0.0-rc.4',
version: '2.0.0',
isDev: true
}
],
Expand All @@ -51,11 +51,11 @@ const naiveui: ModuleConfig = {
},
files: [
{
path: 'components/Welcome/NaiveDemo.vue',
path: 'app/components/Welcome/NaiveDemo.vue',
content: naiveDemoComponent
},
{
path: 'app.vue',
path: 'app/app.vue',
content: nuxtAppVueWithNaiveConfig
}
],
Expand Down
41 changes: 21 additions & 20 deletions src/configs/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ const prismaRootSchema = `// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
provider = "prisma-client-js"
previewFeatures = ["prismaSchemaFolder"]
provider = "prisma-client"
output = "./client"

// NOTE: \`library\` will be deprecated in Prisma 7 where \`client\`, which is officially stable ("Generally Available") since Prisma 6.16, will become the new default.
// Nevertheless, at this time, there seem to be substantial problems with the \`client\` engine, forcing us to revert to \`library\`
engineType = "library"
}

datasource db {
Expand All @@ -21,9 +25,8 @@ datasource db {
// This is required for development only.
shadowDatabaseUrl = "postgres://postgres@localhost/prisma-shadow?pgbouncer=true&connection_limit=1"
}
`

const prismaExampleSchema = `model Example {
model Example {
id String @id @default(uuid())
details String
}
Expand All @@ -49,7 +52,8 @@ const prismaExampleEndpoint = `/**
export default defineEventHandler(event => event.context.prisma.example.findMany())
`

const prismaServerMiddleware = `import { PrismaClient } from '@prisma/client'
const prismaServerMiddleware = `import { PrismaPg } from '@prisma/adapter-pg'
import { PrismaClient } from '~~/prisma/client/client'

let prisma: PrismaClient

Expand All @@ -61,7 +65,8 @@ declare module 'h3' {

export default eventHandler((event) => {
if (!prisma) {
prisma = new PrismaClient()
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
prisma = new PrismaClient({ adapter })
}
event.context.prisma = prisma
})
Expand Down Expand Up @@ -166,20 +171,25 @@ const prisma: ModuleConfig = {
scripts: [
{
name: 'db',
command: 'vite-node prisma/pglite.ts',
command: 'node prisma/pglite.ts',
}
],
dependencies: [
{
name: 'prisma',
version: '^5.22.0',
version: '^6.17.1',
isDev: true
},
{
name: '@prisma/client',
version: '^5.22.0',
version: '^6.17.1',
isDev: false
},
{
name: '@prisma/adapter-pg',
version: '^6.17.1',
isDev: false,
},
{
name: '@electric-sql/pglite',
version: '0.2.13',
Expand All @@ -189,11 +199,6 @@ const prisma: ModuleConfig = {
name: 'pg-gateway',
version: '0.3.0-beta.3',
isDev: true,
},
{
name: 'vite-node',
version: '^2.1.5',
isDev: true,
}
],
nuxtConfig: {},
Expand All @@ -203,13 +208,9 @@ const prisma: ModuleConfig = {
content: prismaEnvFile
},
{
path: 'prisma/schema/schema.prisma',
path: 'prisma/schema.prisma',
content: prismaRootSchema
},
{
path: 'prisma/schema/example.prisma',
content: prismaExampleSchema
},
{
path: 'server/api/examples.get.ts',
content: prismaExampleEndpoint
Expand All @@ -219,7 +220,7 @@ const prisma: ModuleConfig = {
content: prismaServerMiddleware
},
{
path: 'components/Welcome/PrismaDemo.vue',
path: 'app/components/Welcome/PrismaDemo.vue',
content: prismaDemoComponent,
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/configs/sidebase-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const sidebaseAuth: ModuleConfig = {
dependencies: [
{
name: '@sidebase/nuxt-auth',
version: '^0.9.4',
version: '^1.1.0',
isDev: true
},
{
Expand All @@ -105,7 +105,7 @@ const sidebaseAuth: ModuleConfig = {
content: nuxtAuthServerFile
},
{
path: 'components/Welcome/AuthDemo.vue',
path: 'app/components/Welcome/AuthDemo.vue',
content: authDemoComponent
}
],
Expand Down
4 changes: 2 additions & 2 deletions src/configs/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const tailwind: ModuleConfig = {
dependencies: [
{
name: '@nuxtjs/tailwindcss',
version: '^6.13.1',
version: '^6.14.0',
isDev: true
}
],
Expand All @@ -30,7 +30,7 @@ const tailwind: ModuleConfig = {
},
files: [
{
path: 'components/Welcome/TailwindDemo.vue',
path: 'app/components/Welcome/TailwindDemo.vue',
content: tailwindDemoComponent,
}
],
Expand Down
28 changes: 14 additions & 14 deletions src/configs/trpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const nuxtTrpcRootConfig = `/**
* @see https://trpc.io/docs/v10/router
* @see https://trpc.io/docs/v10/procedures
*/
import type { Context } from '~/server/trpc/context'
import type { Context } from '~~/server/trpc/context'
import { initTRPC } from '@trpc/server'
import superjson from 'superjson'

Expand Down Expand Up @@ -69,8 +69,8 @@ export type Context = inferAsyncReturnType<typeof createContext>
`

const nuxtTrpcApiHandler = `import { createNuxtApiHandler } from 'trpc-nuxt'
import { createContext } from '~/server/trpc/context'
import { appRouter } from '~/server/trpc/routers'
import { createContext } from '~~/server/trpc/context'
import { appRouter } from '~~/server/trpc/routers'

// export API handler
export default createNuxtApiHandler({
Expand All @@ -79,7 +79,7 @@ export default createNuxtApiHandler({
})
`

const nuxtTrpcPlugin = `import type { AppRouter } from '~/server/trpc/routers'
const nuxtTrpcPlugin = `import type { AppRouter } from '~~/server/trpc/routers'
import superjson from 'superjson'
import { createTRPCNuxtClient, httpBatchLink } from 'trpc-nuxt/client'

Expand All @@ -89,10 +89,10 @@ export default defineNuxtPlugin(() => {
* built on top of \`useAsyncData\`.
*/
const client = createTRPCNuxtClient<AppRouter>({
transformer: superjson,
links: [
httpBatchLink({
url: '/api/trpc'
url: '/api/trpc',
transformer: superjson
})
]
})
Expand Down Expand Up @@ -126,33 +126,33 @@ const hello = await $client.hello.useQuery({ text: 'client' })
`

const trpc: ModuleConfig = {
humanReadableName: 'tRPC 10',
humanReadableName: 'tRPC',
description: 'Build end-to-end typesafe APIs in Nuxt applications. See more: https://trpc.io/',
scripts: [],
dependencies: [
{
name: '@trpc/server',
version: '^10.45.2',
version: '^11.6.0',
isDev: false
},
{
name: '@trpc/client',
version: '^10.45.2',
version: '^11.6.0',
isDev: false
},
{
name: 'trpc-nuxt',
version: '^0.10.21',
version: '^1.2.0',
isDev: false
},
{
name: 'zod',
version: '^3.23.8',
version: '^4.1.12',
isDev: false
},
{
name: 'superjson',
version: '^2.2.1',
version: '^2.2.2',
isDev: false
}
],
Expand All @@ -179,11 +179,11 @@ const trpc: ModuleConfig = {
content: nuxtTrpcApiHandler
},
{
path: 'plugins/trpcClient.ts',
path: 'app/plugins/trpcClient.ts',
content: nuxtTrpcPlugin
},
{
path: 'components/Welcome/TRPCDemo.vue',
path: 'app/components/Welcome/TRPCDemo.vue',
content: trpcDemoComponent,
}
],
Expand Down
4 changes: 2 additions & 2 deletions src/configs/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ const scripts: Config = {
dependencies: [
{
name: 'vue-tsc',
version: '2.2.8',
version: '^3.1.1',
isDev: true
},
{
name: 'typescript',
version: '5.7.3',
version: '^5.9.3',
isDev: true,
}
],
Expand Down
Loading