Upgrade to redwood v8
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
// More info at https://redwoodjs.com/docs/project-configuration-dev-test-build
|
||||
|
||||
const config = {
|
||||
export default {
|
||||
rootDir: '../',
|
||||
preset: '@redwoodjs/testing/config/jest/api',
|
||||
}
|
||||
|
||||
module.exports = config
|
||||
|
@ -5,10 +5,10 @@
|
||||
"dependencies": {
|
||||
"@fastify/cors": "^9.0.1",
|
||||
"@fastify/rate-limit": "^9.1.0",
|
||||
"@redwoodjs/api": "7.7.4",
|
||||
"@redwoodjs/api-server": "7.7.4",
|
||||
"@redwoodjs/auth-dbauth-api": "7.7.4",
|
||||
"@redwoodjs/graphql-server": "7.7.4",
|
||||
"@redwoodjs/api": "8.0.0",
|
||||
"@redwoodjs/api-server": "8.0.0",
|
||||
"@redwoodjs/auth-dbauth-api": "8.0.0",
|
||||
"@redwoodjs/graphql-server": "8.0.0",
|
||||
"@tus/file-store": "^1.4.0",
|
||||
"@tus/server": "^1.7.0",
|
||||
"graphql-scalars": "^1.23.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { APIGatewayProxyEvent, Context } from 'aws-lambda'
|
||||
|
||||
import { isProduction } from '@redwoodjs/api/dist/logger'
|
||||
import { isProduction } from '@redwoodjs/api/logger'
|
||||
import {
|
||||
DbAuthHandler,
|
||||
PasswordValidationError,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { FastifyReply } from 'fastify'
|
||||
|
||||
import { isProduction } from '@redwoodjs/api/dist/logger'
|
||||
import { isProduction } from '@redwoodjs/api/logger'
|
||||
|
||||
export const setCorsHeaders = (res: FastifyReply) => {
|
||||
res.raw.setHeader(
|
||||
|
@ -10,12 +10,15 @@ import { logger } from 'src/lib/logger'
|
||||
/*
|
||||
* Instance of the Prisma Client
|
||||
*/
|
||||
export const db = new PrismaClient({
|
||||
log: emitLogLevels(['info', 'warn', 'error']),
|
||||
|
||||
const prismaClient = new PrismaClient({
|
||||
log: emitLogLevels(['info', 'warn', 'error'])
|
||||
})
|
||||
|
||||
handlePrismaLogging({
|
||||
db,
|
||||
db: prismaClient,
|
||||
logger,
|
||||
logLevels: ['info', 'warn', 'error'],
|
||||
})
|
||||
|
||||
export const db = prismaClient
|
||||
|
@ -2,7 +2,7 @@
|
||||
import type { Server } from '@tus/server'
|
||||
import type { FastifyReply, FastifyRequest } from 'fastify'
|
||||
|
||||
import { isProduction } from '@redwoodjs/api/dist/logger'
|
||||
import { isProduction } from '@redwoodjs/api/logger'
|
||||
import { ValidationError } from '@redwoodjs/graphql-server'
|
||||
|
||||
import { decryptAndValidateSession, validateSessionCookie } from 'src/lib/auth'
|
||||
|
@ -4,7 +4,7 @@ import RateLimit from '@fastify/rate-limit'
|
||||
import { FileStore } from '@tus/file-store'
|
||||
import { Server } from '@tus/server'
|
||||
|
||||
import { isProduction } from '@redwoodjs/api/dist/logger'
|
||||
import { isProduction } from '@redwoodjs/api/logger'
|
||||
import { createServer } from '@redwoodjs/api-server'
|
||||
|
||||
import { logger } from 'src/lib/logger'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type { QueryResolvers, MutationResolvers } from 'types/graphql'
|
||||
|
||||
import { isProduction } from '@redwoodjs/api/dist/logger'
|
||||
import { isProduction } from '@redwoodjs/api/logger'
|
||||
import { ValidationError } from '@redwoodjs/graphql-server'
|
||||
|
||||
import { db } from 'src/lib/db'
|
||||
|
@ -3,9 +3,9 @@
|
||||
"noEmit": true,
|
||||
"allowJs": true,
|
||||
"esModuleInterop": true,
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"target": "ES2023",
|
||||
"module": "Node16",
|
||||
"moduleResolution": "Node16",
|
||||
"skipLibCheck": false,
|
||||
"rootDirs": [
|
||||
"./src",
|
||||
|
Reference in New Issue
Block a user