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",
|
||||
|
@ -8,4 +8,4 @@ const config = {
|
||||
documents: './web/src/**/!(*.d).{ts,tsx,js,jsx}',
|
||||
}
|
||||
|
||||
module.exports = config
|
||||
export default config
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Each side, e.g. ./web/ and ./api/ has specific config that references this root
|
||||
// More info at https://redwoodjs.com/docs/project-configuration-dev-test-build
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
rootDir: '.',
|
||||
projects: ['<rootDir>/{*,!(node_modules)/**/}/jest.config.js'],
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@redwoodjs/auth-dbauth-setup": "7.7.4",
|
||||
"@redwoodjs/core": "7.7.4",
|
||||
"@redwoodjs/project-config": "7.7.4",
|
||||
"@redwoodjs/auth-dbauth-setup": "8.0.0",
|
||||
"@redwoodjs/core": "8.0.0",
|
||||
"@redwoodjs/project-config": "8.0.0",
|
||||
"prettier-plugin-tailwindcss": "0.4.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
@ -22,5 +22,5 @@
|
||||
"prisma": {
|
||||
"seed": "yarn rw exec seed"
|
||||
},
|
||||
"packageManager": "yarn@4.3.0"
|
||||
"packageManager": "yarn@4.4.0"
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// https://prettier.io/docs/en/options.html
|
||||
/** @type {import('prettier').RequiredOptions} */
|
||||
module.exports = {
|
||||
export default {
|
||||
trailingComma: 'es5',
|
||||
bracketSpacing: true,
|
||||
tabWidth: 2,
|
||||
@ -16,5 +16,5 @@ module.exports = {
|
||||
},
|
||||
],
|
||||
tailwindConfig: './web/config/tailwind.config.js',
|
||||
plugins: [require('prettier-plugin-tailwindcss')],
|
||||
plugins: [await import('prettier-plugin-tailwindcss')],
|
||||
}
|
@ -3,9 +3,9 @@
|
||||
"noEmit": true,
|
||||
"allowJs": true,
|
||||
"esModuleInterop": true,
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"target": "ES2023",
|
||||
"module": "Node16",
|
||||
"moduleResolution": "Node16",
|
||||
"paths": {
|
||||
"$api/*": [
|
||||
"../api/*"
|
||||
|
@ -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/web',
|
||||
}
|
||||
|
||||
module.exports = config
|
||||
|
@ -14,10 +14,10 @@
|
||||
"@icons-pack/react-simple-icons": "^10.0.0",
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@mdi/react": "^1.6.1",
|
||||
"@redwoodjs/auth-dbauth-web": "7.7.4",
|
||||
"@redwoodjs/forms": "7.7.4",
|
||||
"@redwoodjs/router": "7.7.4",
|
||||
"@redwoodjs/web": "7.7.4",
|
||||
"@redwoodjs/auth-dbauth-web": "8.0.0",
|
||||
"@redwoodjs/forms": "8.0.0",
|
||||
"@redwoodjs/router": "8.0.0",
|
||||
"@redwoodjs/web": "8.0.0",
|
||||
"@uppy/compressor": "^2.0.1",
|
||||
"@uppy/core": "^4.1.0",
|
||||
"@uppy/dashboard": "^4.0.2",
|
||||
@ -27,11 +27,11 @@
|
||||
"@uppy/react": "^4.0.1",
|
||||
"@uppy/tus": "^4.0.0",
|
||||
"humanize-string": "2.1.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@redwoodjs/vite": "7.7.4",
|
||||
"@redwoodjs/vite": "8.0.0",
|
||||
"@types/react": "^18.2.55",
|
||||
"@types/react-dom": "^18.2.19",
|
||||
"autoprefixer": "^10.4.20",
|
||||
|
@ -12,7 +12,7 @@ import type {
|
||||
} from 'types/graphql'
|
||||
|
||||
import { TypedDocumentNode, useMutation } from '@redwoodjs/web'
|
||||
import { toast } from '@redwoodjs/web/dist/toast'
|
||||
import { toast } from '@redwoodjs/web/toast'
|
||||
|
||||
import Uploader from 'src/components/Uploader/Uploader'
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Toaster } from '@redwoodjs/web/dist/toast'
|
||||
import { Toaster } from '@redwoodjs/web/toast'
|
||||
import type { Toast } from '@redwoodjs/web/toast'
|
||||
|
||||
import ToastNotification from 'src/components/ToastNotification'
|
||||
|
||||
@ -11,7 +12,7 @@ const ToasterWrapper = () => (
|
||||
}}
|
||||
gutter={8}
|
||||
>
|
||||
{(t) => (
|
||||
{(t: Toast) => (
|
||||
<ToastNotification t={t} type={t.type} message={t.message.toString()} />
|
||||
)}
|
||||
</Toaster>
|
||||
|
@ -6,7 +6,7 @@ import type { UploadResult, Meta } from '@uppy/core'
|
||||
import { Dashboard } from '@uppy/react'
|
||||
import Tus from '@uppy/tus'
|
||||
|
||||
import { isProduction } from '@redwoodjs/api/dist/logger'
|
||||
import { isProduction } from '@redwoodjs/api/logger'
|
||||
|
||||
import '@uppy/core/dist/style.min.css'
|
||||
import '@uppy/dashboard/dist/style.min.css'
|
||||
|
@ -3,9 +3,9 @@
|
||||
"noEmit": true,
|
||||
"allowJs": true,
|
||||
"esModuleInterop": true,
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "Bundler",
|
||||
"skipLibCheck": false,
|
||||
"rootDirs": [
|
||||
"./src",
|
||||
|
Reference in New Issue
Block a user