Compare commits

...

2 Commits

Author SHA1 Message Date
pegasust e40a7aea4d Merge pull request 'scaffold: api-as-package' (#1) from api-as-package into master
Reviewed-on: #1
2022-12-01 08:36:18 +00:00
pegasust ce6dee5b17 scaffold: api-as-package 2022-12-01 08:32:38 +00:00
21 changed files with 810 additions and 9 deletions

View File

@ -0,0 +1,14 @@
# Cloudflare-nginx
This mini-repo consists of my configuration for Felia homelab. This is version-controlled
with Felia's local-fs git.
NOTE: Felia consists of a custom Linux (fel) and a Windows machine (Felia) with
NixOS on WSL (felia-1). This deployment works on Docker WSL of Felia node.
## How to apply changes
The current way to apply the changes is to push to Felia's git server and
`cloudflare-nginx/scripts/reload_nginx.sh` on a Docker client that connected to Felia

5
packages/api/index.ts Normal file
View File

@ -0,0 +1,5 @@
export type { AppRouter } from "./src/router";
export { appRouter } from "./src/router";
export { createContext } from "./src/context";
export type { Context } from "./src/context";

24
packages/api/package.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "@acme/api",
"version": "0.1.0",
"main": "./index.ts",
"types": "./index.ts",
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@acme/auth": "*",
"@acme/db": "*",
"@trpc/client": "^10.1.0",
"@trpc/server": "^10.1.0",
"superjson": "^1.9.1",
"zod": "^3.18.0"
},
"devDependencies": {
"eslint": "^8.28.0",
"typescript": "^4.9.3"
}
}

View File

@ -0,0 +1,37 @@
import { getServerSession, type Session } from "@acme/auth";
import { prisma } from "@acme/db";
import { type inferAsyncReturnType } from "@trpc/server";
import { type CreateNextContextOptions } from "@trpc/server/adapters/next";
/**
* Replace this with an object if you want to pass things to createContextInner
*/
type CreateContextOptions = {
session: Session | null;
};
/** Use this helper for:
* - testing, where we dont have to Mock Next.js' req/res
* - trpc's `createSSGHelpers` where we don't have req/res
* @see https://beta.create.t3.gg/en/usage/trpc#-servertrpccontextts
*/
export const createContextInner = async (opts: CreateContextOptions) => {
return {
session: opts.session,
prisma,
};
};
/**
* This is the actual context you'll use in your router
* @link https://trpc.io/docs/context
**/
export const createContext = async (opts: CreateNextContextOptions) => {
const session = await getServerSession(opts);
return await createContextInner({
session,
});
};
export type Context = inferAsyncReturnType<typeof createContext>;

View File

@ -0,0 +1,11 @@
import { protectedProcedure, publicProcedure, router } from "../trpc";
export const authRouter = router({
getSession: publicProcedure.query(({ ctx }) => {
return ctx.session;
}),
getSecretMessage: protectedProcedure.query(() => {
// testing type validation of overridden next-auth Session in @acme/auth package
return "you can see this secret message!";
}),
});

View File

@ -0,0 +1,11 @@
import { router } from "../trpc";
import { postRouter } from "./post";
import { authRouter } from "./auth";
export const appRouter = router({
post: postRouter,
auth: authRouter,
});
// export type definition of API
export type AppRouter = typeof appRouter;

View File

@ -0,0 +1,16 @@
import { router, publicProcedure } from "../trpc";
import { z } from "zod";
export const postRouter = router({
all: publicProcedure.query(({ ctx }) => {
return ctx.prisma.post.findMany();
}),
byId: publicProcedure.input(z.string()).query(({ ctx, input }) => {
return ctx.prisma.post.findFirst({ where: { id: input } });
}),
create: publicProcedure
.input(z.object({ title: z.string(), content: z.string() }))
.mutation(({ ctx, input }) => {
return ctx.prisma.post.create({ data: input });
}),
});

29
packages/api/src/trpc.ts Normal file
View File

@ -0,0 +1,29 @@
import { initTRPC, TRPCError } from "@trpc/server";
import { type Context } from "./context";
import superjson from "superjson";
const t = initTRPC.context<Context>().create({
transformer: superjson,
errorFormatter({ shape }) {
return shape;
},
});
const isAuthed = t.middleware(({ ctx, next }) => {
if (!ctx.session) {
throw new TRPCError({
code: "UNAUTHORIZED",
message: "Not authenticated",
});
}
return next({
ctx: {
session: ctx.session,
},
});
});
export const router = t.router;
export const publicProcedure = t.procedure;
export const protectedProcedure = t.procedure.use(isAuthed);

View File

@ -0,0 +1,2 @@
import superjson from "superjson";
export const transformer = superjson;

View File

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"include": [
"src",
"index.ts",
"transformer.ts",
"node_modules/@acme/auth/next-auth.d.ts"
]
}

4
packages/auth/index.ts Normal file
View File

@ -0,0 +1,4 @@
export { authOptions } from "./src/auth-options";
export { getServerSession } from "./src/get-session";
export type { Session } from "next-auth";

16
packages/auth/next-auth.d.ts vendored Normal file
View File

@ -0,0 +1,16 @@
import { DefaultSession } from "next-auth";
/**
* Module augmentation for `next-auth` types
* Allows us to add custom properties to the `session` object
* and keep type safety
* @see https://next-auth.js.org/getting-started/typescript#module-augmentation
*/
declare module "next-auth" {
interface Session extends DefaultSession {
user: {
id: string;
} & DefaultSession["user"];
}
}

View File

@ -0,0 +1,24 @@
{
"name": "@acme/auth",
"version": "0.1.0",
"main": "./src/index.ts",
"types": "./src/index.ts",
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@acme/db": "*",
"@next-auth/prisma-adapter": "^1.0.5",
"next": "^13.0.5",
"next-auth": "^4.17.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"eslint": "^8.28.0",
"typescript": "^4.9.3"
}
}

View File

@ -0,0 +1,25 @@
import { type NextAuthOptions } from "next-auth";
import DiscordProvider from "next-auth/providers/discord";
import { prisma } from "@acme/db";
import { PrismaAdapter } from "@next-auth/prisma-adapter";
export const authOptions: NextAuthOptions = {
// Configure one or more authentication providers
adapter: PrismaAdapter(prisma),
providers: [
DiscordProvider({
clientId: process.env.DISCORD_CLIENT_ID as string,
clientSecret: process.env.DISCORD_CLIENT_SECRET as string,
}),
// ...add more providers here
],
callbacks: {
session({ session, user }) {
if (session.user) {
session.user.id = user.id;
}
return session;
},
},
};

View File

@ -0,0 +1,19 @@
import type {
GetServerSidePropsContext,
NextApiRequest,
NextApiResponse,
} from "next";
import { unstable_getServerSession } from "next-auth";
import { authOptions } from "./auth-options";
export const getServerSession = async (
ctx:
| {
req: GetServerSidePropsContext["req"];
res: GetServerSidePropsContext["res"];
}
| { req: NextApiRequest; res: NextApiResponse },
) => {
return await unstable_getServerSession(ctx.req, ctx.res, authOptions);
};

View File

@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "index.ts", "next-auth.d.ts"]
}

19
packages/db/index.ts Normal file
View File

@ -0,0 +1,19 @@
import { PrismaClient } from "@prisma/client";
declare global {
// allow global `var` declarations
//
// eslint-disable-next-line no-var
var prisma: PrismaClient | undefined;
}
export const prisma =
global.prisma ||
new PrismaClient({
log:
process.env.NODE_ENV === "development"
? ["query", "error", "warn"]
: ["error"],
});
export * from "@prisma/client";
if (process.env.NODE_ENV !== "production") {
global.prisma = prisma;
}

22
packages/db/package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "@acme/db",
"version": "0.1.0",
"main": "./index.ts",
"types": "./index.ts",
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"with-env": "dotenv -e ../../.env --",
"dev": "pnpm with-env prisma studio --port 5556",
"db-push": "pnpm with-env prisma db push",
"db-generate": "pnpm with-env prisma generate"
},
"dependencies": {
"@prisma/client": "^4.6.1"
},
"devDependencies": {
"dotenv-cli": "^6.0.0",
"prisma": "^4.6.1",
"typescript": "^4.9.3"
}
}

View File

@ -0,0 +1,66 @@
// docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
// REGION: Services
model Post {
id String @id @default(cuid())
title String
content String
}
// REGION: NextAuth stuffs
// NOTE: When using postgresql, mysql or sqlserver,
// uncomment the @db.Text annotations below
// @see https://next-auth.js.org/schemas/models
model Account {
id String @id @default(cuid())
userId String
type String
provider String
providerAccountId String
refresh_token String? // @db.Text
access_token String? // @db.Text
expires_at Int?
token_type String?
scope String?
id_token String? // @db.Text
session_state String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([provider, providerAccountId])
}
model Session {
id String @id @default(cuid())
sessionToken String @unique
userId String
expires DateTime
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model User {
id String @id @default(cuid())
name String?
email String? @unique
emailVerified DateTime?
image String?
accounts Account[]
sessions Session[]
}
model VerificationToken {
identifier String
token String @unique
expires DateTime
@@unique([identifier, token])
}

View File

@ -0,0 +1,6 @@
{
"extends": "../../tsconfig.json",
"include": [
"index.ts"
]
}

View File

@ -9,7 +9,7 @@ importers:
turbo: 1.6.2
devDependencies:
eslint-config-custom: link:packages/eslint-config-custom
prettier: 2.7.1
prettier: 2.8.0
turbo: 1.6.2
apps/about-me:
@ -137,6 +137,48 @@ importers:
tsconfig: link:../../packages/tsconfig
typescript: 4.8.4
packages/api:
specifiers:
'@acme/auth': '*'
'@acme/db': '*'
'@trpc/client': ^10.1.0
'@trpc/server': ^10.1.0
eslint: ^8.28.0
superjson: ^1.9.1
typescript: ^4.9.3
zod: ^3.18.0
dependencies:
'@acme/auth': link:../auth
'@acme/db': link:../db
'@trpc/client': 10.4.2_@trpc+server@10.4.2
'@trpc/server': 10.4.2
superjson: 1.9.1
zod: 3.19.1
devDependencies:
eslint: 8.28.0
typescript: 4.9.3
packages/auth:
specifiers:
'@acme/db': '*'
'@next-auth/prisma-adapter': ^1.0.5
eslint: ^8.28.0
next: ^13.0.5
next-auth: ^4.17.0
react: 18.2.0
react-dom: 18.2.0
typescript: ^4.9.3
dependencies:
'@acme/db': link:../db
'@next-auth/prisma-adapter': 1.0.5_next-auth@4.17.0
next: 13.0.5_biqbaboplfbrettd7655fr4n2y
next-auth: 4.17.0_7iuvftg57tblwyxclfkwku5xo4
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
devDependencies:
eslint: 8.28.0
typescript: 4.9.3
packages/config:
specifiers:
eslint: ^8.27.0
@ -149,6 +191,19 @@ importers:
eslint-config-prettier: 8.5.0_eslint@8.27.0
typescript: 4.8.4
packages/db:
specifiers:
'@prisma/client': ^4.6.1
dotenv-cli: ^6.0.0
prisma: ^4.6.1
typescript: ^4.9.3
dependencies:
'@prisma/client': 4.6.1_prisma@4.6.1
devDependencies:
dotenv-cli: 6.0.0
prisma: 4.6.1
typescript: 4.9.3
packages/eslint-config-custom:
specifiers:
eslint: ^7.23.0
@ -161,7 +216,7 @@ importers:
eslint: 7.32.0
eslint-config-next: 13.0.0_3rubbgt5ekhqrcgx4uwls3neim
eslint-config-prettier: 8.5.0_eslint@7.32.0
eslint-config-turbo: 0.0.4_eslint@7.32.0
eslint-config-turbo: 0.0.6_eslint@7.32.0
eslint-plugin-react: 7.31.8_eslint@7.32.0
devDependencies:
typescript: 4.8.4
@ -479,6 +534,15 @@ packages:
'@jridgewell/resolve-uri': 3.1.0
'@jridgewell/sourcemap-codec': 1.4.14
/@next-auth/prisma-adapter/1.0.5_next-auth@4.17.0:
resolution: {integrity: sha512-VqMS11IxPXrPGXw6Oul6jcyS/n8GLOWzRMrPr3EMdtD6eOalM6zz05j08PcNiis8QzkfuYnCv49OvufTuaEwYQ==}
peerDependencies:
'@prisma/client': '>=2.26.0 || >=3'
next-auth: ^4
dependencies:
next-auth: 4.17.0_7iuvftg57tblwyxclfkwku5xo4
dev: false
/@next/env/13.0.0:
resolution: {integrity: sha512-65v9BVuah2Mplohm4+efsKEnoEuhmlGm8B2w6vD1geeEP2wXtlSJCvR/cCRJ3fD8wzCQBV41VcMBQeYET6MRkg==}
dev: false
@ -487,6 +551,10 @@ packages:
resolution: {integrity: sha512-Qb6WPuRriGIQ19qd6NBxpcrFOfj8ziN7l9eZUfwff5gl4zLXluqtuZPddYZM/oWjN53ZYcuRXzL+oowKyJeYtA==}
dev: false
/@next/env/13.0.5:
resolution: {integrity: sha512-F3KLtiDrUslAZhTYTh8Zk5ZaavbYwLUn3NYPBnOjAXU8hWm0QVGVzKIOuURQ098ofRU4e9oglf3Sj9pFx5nI5w==}
dev: false
/@next/eslint-plugin-next/12.3.3:
resolution: {integrity: sha512-s1mPMhhmwc+B97lQ2xzLLEdn3TR6ietc8Z1zLhAEd5Vujqx+Ks7E8Qr8V93I/qTs21WY66zvs1SXKYLvOHbQVw==}
dependencies:
@ -517,6 +585,15 @@ packages:
dev: false
optional: true
/@next/swc-android-arm-eabi/13.0.5:
resolution: {integrity: sha512-YO691dxHlviy6H0eghgwqn+5kU9J3iQnKERHTDSppqjjGDBl6ab4wz9XfI5AhljjkaTg3TknHoIEWFDoZ4Ve8g==}
engines: {node: '>= 10'}
cpu: [arm]
os: [android]
requiresBuild: true
dev: false
optional: true
/@next/swc-android-arm64/13.0.0:
resolution: {integrity: sha512-RW9Uy3bMSc0zVGCa11klFuwfP/jdcdkhdruqnrJ7v+7XHm6OFKkSRzX6ee7yGR1rdDZvTnP4GZSRSpzjLv/N0g==}
engines: {node: '>= 10'}
@ -535,6 +612,15 @@ packages:
dev: false
optional: true
/@next/swc-android-arm64/13.0.5:
resolution: {integrity: sha512-ugbwffkUmp8cd2afehDC8LtQeFUxElRUBBngfB5UYSWBx18HW4OgzkPFIY8jUBH16zifvGZWXbICXJWDHrOLtw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [android]
requiresBuild: true
dev: false
optional: true
/@next/swc-darwin-arm64/13.0.0:
resolution: {integrity: sha512-APA26nps1j4qyhOIzkclW/OmgotVHj1jBxebSpMCPw2rXfiNvKNY9FA0TcuwPmUCNqaTnm703h6oW4dvp73A4Q==}
engines: {node: '>= 10'}
@ -553,6 +639,15 @@ packages:
dev: false
optional: true
/@next/swc-darwin-arm64/13.0.5:
resolution: {integrity: sha512-mshlh8QOtOalfZbc17uNAftWgqHTKnrv6QUwBe+mpGz04eqsSUzVz1JGZEdIkmuDxOz00cK2NPoc+VHDXh99IQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: false
optional: true
/@next/swc-darwin-x64/13.0.0:
resolution: {integrity: sha512-qsUhUdoFuRJiaJ7LnvTQ6GZv1QnMDcRXCIjxaN0FNVXwrjkq++U7KjBUaxXkRzLV4C7u0NHLNOp0iZwNNE7ypw==}
engines: {node: '>= 10'}
@ -571,6 +666,15 @@ packages:
dev: false
optional: true
/@next/swc-darwin-x64/13.0.5:
resolution: {integrity: sha512-SfigOKW4Z2UB3ruUPyvrlDIkcJq1hiw1wvYApWugD+tQsAkYZKEoz+/8emCmeYZ6Gwgi1WHV+z52Oj8u7bEHPg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: false
optional: true
/@next/swc-freebsd-x64/13.0.0:
resolution: {integrity: sha512-sCdyCbboS7CwdnevKH9J6hkJI76LUw1jVWt4eV7kISuLiPba3JmehZSWm80oa4ADChRVAwzhLAo2zJaYRrInbg==}
engines: {node: '>= 10'}
@ -589,6 +693,15 @@ packages:
dev: false
optional: true
/@next/swc-freebsd-x64/13.0.5:
resolution: {integrity: sha512-0NJg8HZr4yG8ynmMGFXQf+Mahvq4ZgBmUwSlLXXymgxEQgH17erH/LoR69uITtW+KTsALgk9axEt5AAabM4ucg==}
engines: {node: '>= 10'}
cpu: [x64]
os: [freebsd]
requiresBuild: true
dev: false
optional: true
/@next/swc-linux-arm-gnueabihf/13.0.0:
resolution: {integrity: sha512-/X/VxfFA41C9jrEv+sUsPLQ5vbDPVIgG0CJrzKvrcc+b+4zIgPgtfsaWq9ockjHFQi3ycvlZK4TALOXO8ovQ6Q==}
engines: {node: '>= 10'}
@ -607,6 +720,15 @@ packages:
dev: false
optional: true
/@next/swc-linux-arm-gnueabihf/13.0.5:
resolution: {integrity: sha512-Cye+h3oDT3NDWjACMlRaolL8fokpKie34FlPj9nfoW7bYKmoMBY1d4IO/GgBF+5xEl7HkH0Ny/qex63vQ0pN+A==}
engines: {node: '>= 10'}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: false
optional: true
/@next/swc-linux-arm64-gnu/13.0.0:
resolution: {integrity: sha512-x6Oxr1GIi0ZtNiT6jbw+JVcbEi3UQgF7mMmkrgfL4mfchOwXtWSHKTSSPnwoJWJfXYa0Vy1n8NElWNTGAqoWFw==}
engines: {node: '>= 10'}
@ -625,6 +747,15 @@ packages:
dev: false
optional: true
/@next/swc-linux-arm64-gnu/13.0.5:
resolution: {integrity: sha512-5BfDS/VoRDR5QUGG9oedOCEZGmV2zxUVFYLUJVPMSMeIgqkjxWQBiG2BUHZI6/LGk9yvHmjx7BTvtBCLtRg6IQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: false
optional: true
/@next/swc-linux-arm64-musl/13.0.0:
resolution: {integrity: sha512-SnMH9ngI+ipGh3kqQ8+mDtWunirwmhQnQeZkEq9e/9Xsgjf04OetqrqRHKM1HmJtG2qMUJbyXFJ0F81TPuT+3g==}
engines: {node: '>= 10'}
@ -643,6 +774,15 @@ packages:
dev: false
optional: true
/@next/swc-linux-arm64-musl/13.0.5:
resolution: {integrity: sha512-xenvqlXz+KxVKAB1YR723gnVNszpsCvKZkiFFaAYqDGJ502YuqU2fwLsaSm/ASRizNcBYeo9HPLTyc3r/9cdMQ==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: false
optional: true
/@next/swc-linux-x64-gnu/13.0.0:
resolution: {integrity: sha512-VSQwTX9EmdbotArtA1J67X8964oQfe0xHb32x4tu+JqTR+wOHyG6wGzPMdXH2oKAp6rdd7BzqxUXXf0J+ypHlw==}
engines: {node: '>= 10'}
@ -661,6 +801,15 @@ packages:
dev: false
optional: true
/@next/swc-linux-x64-gnu/13.0.5:
resolution: {integrity: sha512-9Ahi1bbdXwhrWQmOyoTod23/hhK05da/FzodiNqd6drrMl1y7+RujoEcU8Dtw3H1mGWB+yuTlWo8B4Iba8hqiQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: false
optional: true
/@next/swc-linux-x64-musl/13.0.0:
resolution: {integrity: sha512-xBCP0nnpO0q4tsytXkvIwWFINtbFRyVY5gxa1zB0vlFtqYR9lNhrOwH3CBrks3kkeaePOXd611+8sjdUtrLnXA==}
engines: {node: '>= 10'}
@ -679,6 +828,15 @@ packages:
dev: false
optional: true
/@next/swc-linux-x64-musl/13.0.5:
resolution: {integrity: sha512-V+1mnh49qmS9fOZxVRbzjhBEz9IUGJ7AQ80JPWAYQM5LI4TxfdiF4APLPvJ52rOmNeTqnVz1bbKtVOso+7EZ4w==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: false
optional: true
/@next/swc-win32-arm64-msvc/13.0.0:
resolution: {integrity: sha512-NutwDafqhGxqPj/eiUixJq9ImS/0sgx6gqlD7jRndCvQ2Q8AvDdu1+xKcGWGNnhcDsNM/n1avf1e62OG1GaqJg==}
engines: {node: '>= 10'}
@ -697,6 +855,15 @@ packages:
dev: false
optional: true
/@next/swc-win32-arm64-msvc/13.0.5:
resolution: {integrity: sha512-wRE9rkp7I+/3Jf2T9PFIJOKq3adMWYEFkPOA7XAkUfYbQHlDJm/U5cVCWUsKByyQq5RThwufI91sgd19MfxRxg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: false
optional: true
/@next/swc-win32-ia32-msvc/13.0.0:
resolution: {integrity: sha512-zNaxaO+Kl/xNz02E9QlcVz0pT4MjkXGDLb25qxtAzyJL15aU0+VjjbIZAYWctG59dvggNIUNDWgoBeVTKB9xLg==}
engines: {node: '>= 10'}
@ -715,6 +882,15 @@ packages:
dev: false
optional: true
/@next/swc-win32-ia32-msvc/13.0.5:
resolution: {integrity: sha512-Q1XQSLEhFuFhkKFdJIGt7cYQ4T3u6P5wrtUNreg5M+7P+fjSiC8+X+Vjcw+oebaacsdl0pWZlK+oACGafush1w==}
engines: {node: '>= 10'}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: false
optional: true
/@next/swc-win32-x64-msvc/13.0.0:
resolution: {integrity: sha512-FFOGGWwTCRMu9W7MF496Urefxtuo2lttxF1vwS+1rIRsKvuLrWhVaVTj3T8sf2EBL6gtJbmh4TYlizS+obnGKA==}
engines: {node: '>= 10'}
@ -733,6 +909,15 @@ packages:
dev: false
optional: true
/@next/swc-win32-x64-msvc/13.0.5:
resolution: {integrity: sha512-t5gRblrwwiNZP6cT7NkxlgxrFgHWtv9ei5vUraCLgBqzvIsa7X+PnarZUeQCXqz6Jg9JSGGT9j8lvzD97UqeJQ==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: false
optional: true
/@nodelib/fs.scandir/2.1.5:
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@ -751,6 +936,10 @@ packages:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.13.0
/@panva/hkdf/1.0.2:
resolution: {integrity: sha512-MSAs9t3Go7GUkMhpKC44T58DJ5KGk2vBo+h1cqQeqlMfdGkxaVB78ZWpv9gYi/g2fa4sopag9gJsNvS8XGgWJA==}
dev: false
/@prisma/client/4.6.1_prisma@4.6.1:
resolution: {integrity: sha512-M1+NNrMzqaOIxT7PBGcTs3IZo7d1EW/+gVQd4C4gUgWBDGgD9AcIeZnUSidgWClmpMSgVUdnVORjsWWGUameYA==}
engines: {node: '>=14.17'}
@ -783,6 +972,12 @@ packages:
tslib: 2.4.1
dev: false
/@swc/helpers/0.4.14:
resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==}
dependencies:
tslib: 2.4.1
dev: false
/@tanstack/query-core/4.15.1:
resolution: {integrity: sha512-+UfqJsNbPIVo0a9ANW0ZxtjiMfGLaaoIaL9vZeVycvmBuWywJGtSi7fgPVMCPdZQFOzMsaXaOsDtSKQD5xLRVQ==}
dev: false
@ -813,6 +1008,14 @@ packages:
'@trpc/server': 10.0.0-rc.4
dev: false
/@trpc/client/10.4.2_@trpc+server@10.4.2:
resolution: {integrity: sha512-E21TTmFN8bWYWrZk4nDaNsOUektL8I1ASvToSzOIys9X7iF/IRZ6H8CNdTZtQ3k6K7kvcDAu/8SlPuqZRgFvsg==}
peerDependencies:
'@trpc/server': 10.4.2
dependencies:
'@trpc/server': 10.4.2
dev: false
/@trpc/next/10.0.0-rc.4_skfskd5lhpkyk3yzyrw6tb7uyi:
resolution: {integrity: sha512-i9lynpSeBxZnEVqALNQVWidlQbagsLGP+IIWILV7x70ltZI8A+k2T1bwfd+ZhS6Mj1Avp0bvW2sB0psfS8pE5g==}
peerDependencies:
@ -854,6 +1057,10 @@ packages:
resolution: {integrity: sha512-svW7FcjoWv4AXPjF0Kyf4c3zGuav/GwzfyldZyQh+qQ5fEHBRe69aNNpifbykuxv4svV8daQtTYqW/PsItO7FQ==}
dev: false
/@trpc/server/10.4.2:
resolution: {integrity: sha512-/DO7fwIHjKmZ4QawYVbmJnPzTdtTRQR1qrVgQNYf8YlqygQe6xPlPjBQK47iIi1G5fveXhgKFG8SQjNDP3vaDQ==}
dev: false
/@types/json-schema/7.0.11:
resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==}
dev: true
@ -1326,6 +1533,11 @@ packages:
/convert-source-map/1.9.0:
resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==}
/cookie/0.5.0:
resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
engines: {node: '>= 0.6'}
dev: false
/copy-anything/3.0.2:
resolution: {integrity: sha512-CzATjGXzUQ0EvuvgOCI6A4BGOo2bcVx8B+eC2nF862iv9fopnPQwlrbACakNCHRIJbCSBj+J/9JeDf60k64MkA==}
engines: {node: '>=12.13'}
@ -1445,6 +1657,26 @@ packages:
dependencies:
esutils: 2.0.3
/dotenv-cli/6.0.0:
resolution: {integrity: sha512-qXlCOi3UMDhCWFKe0yq5sg3X+pJAz+RQDiFN38AMSbUrnY3uZshSfDJUAge951OS7J9gwLZGfsBlWRSOYz/TRg==}
hasBin: true
dependencies:
cross-spawn: 7.0.3
dotenv: 16.0.3
dotenv-expand: 8.0.3
minimist: 1.2.7
dev: true
/dotenv-expand/8.0.3:
resolution: {integrity: sha512-SErOMvge0ZUyWd5B0NXMQlDkN+8r+HhVUsxgOO7IoPDOdDRD2JjExpN6y3KnFR66jsJMwSn1pqIivhU5rcJiNg==}
engines: {node: '>=12'}
dev: true
/dotenv/16.0.3:
resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==}
engines: {node: '>=12'}
dev: true
/electron-to-chromium/1.4.284:
resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==}
@ -1586,13 +1818,13 @@ packages:
eslint: 8.27.0
dev: false
/eslint-config-turbo/0.0.4_eslint@7.32.0:
resolution: {integrity: sha512-HErPS/wfWkSdV9Yd2dDkhZt3W2B78Ih/aWPFfaHmCMjzPalh+5KxRRGTf8MOBQLCebcWJX0lP1Zvc1rZIHlXGg==}
/eslint-config-turbo/0.0.6_eslint@7.32.0:
resolution: {integrity: sha512-Cx0yRJvAvPh0lJI1jVJMDRdJiF3w/Q7fA7Lgak568uBVYU0vetaak3yVHJtCLik2Z88emkSyOj2pAUPwqOEg9g==}
peerDependencies:
eslint: ^7.23.0 || ^8.0.0
eslint: ^6.6.0 || ^8.0.0
dependencies:
eslint: 7.32.0
eslint-plugin-turbo: 0.0.4_eslint@7.32.0
eslint-plugin-turbo: 0.0.6_eslint@7.32.0
dev: false
/eslint-import-resolver-node/0.3.6:
@ -1870,10 +2102,10 @@ packages:
string.prototype.matchall: 4.0.8
dev: false
/eslint-plugin-turbo/0.0.4_eslint@7.32.0:
resolution: {integrity: sha512-dfmYE/iPvoJInQq+5E/0mj140y/rYwKtzZkn3uVK8+nvwC5zmWKQ6ehMWrL4bYBkGzSgpOndZM+jOXhPQ2m8Cg==}
/eslint-plugin-turbo/0.0.6_eslint@7.32.0:
resolution: {integrity: sha512-GgisxIg4saIUlwUbiXPec00dkp2D8iar717g8TuIgCzStO4P24Ob2920CVFNftC5Rm4NFx19E9dLa4P1SwCniA==}
peerDependencies:
eslint: ^7.23.0 || ^8.0.0
eslint: ^6.6.0 || ^8.0.0
dependencies:
eslint: 7.32.0
dev: false
@ -1907,6 +2139,16 @@ packages:
eslint: 8.27.0
eslint-visitor-keys: 2.1.0
/eslint-utils/3.0.0_eslint@8.28.0:
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
peerDependencies:
eslint: '>=5'
dependencies:
eslint: 8.28.0
eslint-visitor-keys: 2.1.0
dev: true
/eslint-visitor-keys/1.3.0:
resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==}
engines: {node: '>=4'}
@ -2014,6 +2256,54 @@ packages:
transitivePeerDependencies:
- supports-color
/eslint/8.28.0:
resolution: {integrity: sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
'@eslint/eslintrc': 1.3.3
'@humanwhocodes/config-array': 0.11.7
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
debug: 4.3.4
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.1.1
eslint-utils: 3.0.0_eslint@8.28.0
eslint-visitor-keys: 3.3.0
espree: 9.4.1
esquery: 1.4.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
file-entry-cache: 6.0.1
find-up: 5.0.0
glob-parent: 6.0.2
globals: 13.17.0
grapheme-splitter: 1.0.4
ignore: 5.2.0
import-fresh: 3.3.0
imurmurhash: 0.1.4
is-glob: 4.0.3
is-path-inside: 3.0.3
js-sdsl: 4.1.5
js-yaml: 4.1.0
json-stable-stringify-without-jsonify: 1.0.1
levn: 0.4.1
lodash.merge: 4.6.2
minimatch: 3.1.2
natural-compare: 1.4.0
optionator: 0.9.1
regexpp: 3.2.0
strip-ansi: 6.0.1
strip-json-comments: 3.1.1
text-table: 0.2.0
transitivePeerDependencies:
- supports-color
dev: true
/espree/7.3.1:
resolution: {integrity: sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==}
engines: {node: ^10.12.0 || >=12.0.0}
@ -2411,6 +2701,10 @@ packages:
/isexe/2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
/jose/4.11.1:
resolution: {integrity: sha512-YRv4Tk/Wlug8qicwqFNFVEZSdbROCHRAC6qu/i0dyNKr5JQdoa2pIGoS04lLO/jXQX7Z9omoNewYIVIxqZBd9Q==}
dev: false
/js-sdsl/4.1.5:
resolution: {integrity: sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==}
@ -2552,6 +2846,32 @@ packages:
/natural-compare/1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
/next-auth/4.17.0_7iuvftg57tblwyxclfkwku5xo4:
resolution: {integrity: sha512-aN2tdnjS0MDeUpB2tBDOaWnegkgeMWrsccujbXRGMJ607b+EwRcy63MFGSr0OAboDJEe0902piXQkt94GqF8Qw==}
engines: {node: ^12.19.0 || ^14.15.0 || ^16.13.0 || ^18.12.0}
peerDependencies:
next: ^12.2.5 || ^13
nodemailer: ^6.6.5
react: ^17.0.2 || ^18
react-dom: ^17.0.2 || ^18
peerDependenciesMeta:
nodemailer:
optional: true
dependencies:
'@babel/runtime': 7.20.1
'@panva/hkdf': 1.0.2
cookie: 0.5.0
jose: 4.11.1
next: 13.0.5_biqbaboplfbrettd7655fr4n2y
oauth: 0.9.15
openid-client: 5.3.1
preact: 10.11.3
preact-render-to-string: 5.2.6_preact@10.11.3
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
uuid: 8.3.2
dev: false
/next/13.0.0_mqvh5p7ejg4taogoj6tpk3gd5a:
resolution: {integrity: sha512-puH1WGM6rGeFOoFdXXYfUxN9Sgi4LMytCV5HkQJvVUOhHfC1DoVqOfvzaEteyp6P04IW+gbtK2Q9pInVSrltPA==}
engines: {node: '>=14.6.0'}
@ -2642,6 +2962,50 @@ packages:
- babel-plugin-macros
dev: false
/next/13.0.5_biqbaboplfbrettd7655fr4n2y:
resolution: {integrity: sha512-awpc3DkphyKydwCotcBnuKwh6hMqkT5xdiBK4OatJtOZurDPBYLP62jtM2be/4OunpmwIbsS0Eyv+ZGU97ciEg==}
engines: {node: '>=14.6.0'}
hasBin: true
peerDependencies:
fibers: '>= 3.1.0'
node-sass: ^6.0.0 || ^7.0.0
react: ^18.2.0
react-dom: ^18.2.0
sass: ^1.3.0
peerDependenciesMeta:
fibers:
optional: true
node-sass:
optional: true
sass:
optional: true
dependencies:
'@next/env': 13.0.5
'@swc/helpers': 0.4.14
caniuse-lite: 1.0.30001431
postcss: 8.4.14
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
styled-jsx: 5.1.0_react@18.2.0
optionalDependencies:
'@next/swc-android-arm-eabi': 13.0.5
'@next/swc-android-arm64': 13.0.5
'@next/swc-darwin-arm64': 13.0.5
'@next/swc-darwin-x64': 13.0.5
'@next/swc-freebsd-x64': 13.0.5
'@next/swc-linux-arm-gnueabihf': 13.0.5
'@next/swc-linux-arm64-gnu': 13.0.5
'@next/swc-linux-arm64-musl': 13.0.5
'@next/swc-linux-x64-gnu': 13.0.5
'@next/swc-linux-x64-musl': 13.0.5
'@next/swc-win32-arm64-msvc': 13.0.5
'@next/swc-win32-ia32-msvc': 13.0.5
'@next/swc-win32-x64-msvc': 13.0.5
transitivePeerDependencies:
- '@babel/core'
- babel-plugin-macros
dev: false
/node-releases/2.0.6:
resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==}
@ -2655,11 +3019,20 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
/oauth/0.9.15:
resolution: {integrity: sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==}
dev: false
/object-assign/4.1.1:
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
dev: false
/object-hash/2.2.0:
resolution: {integrity: sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==}
engines: {node: '>= 6'}
dev: false
/object-hash/3.0.0:
resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==}
engines: {node: '>= 6'}
@ -2718,11 +3091,25 @@ packages:
es-abstract: 1.20.4
dev: false
/oidc-token-hash/5.0.1:
resolution: {integrity: sha512-EvoOtz6FIEBzE+9q253HsLCVRiK/0doEJ2HCvvqMQb3dHZrP3WlJKYtJ55CRTw4jmYomzH4wkPuCj/I3ZvpKxQ==}
engines: {node: ^10.13.0 || >=12.0.0}
dev: false
/once/1.4.0:
resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
dependencies:
wrappy: 1.0.2
/openid-client/5.3.1:
resolution: {integrity: sha512-RLfehQiHch9N6tRWNx68cicf3b1WR0x74bJWHRc25uYIbSRwjxYcTFaRnzbbpls5jroLAaB/bFIodTgA5LJMvw==}
dependencies:
jose: 4.11.1
lru-cache: 6.0.0
object-hash: 2.2.0
oidc-token-hash: 5.0.1
dev: false
/optionator/0.9.1:
resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==}
engines: {node: '>= 0.8.0'}
@ -2852,6 +3239,19 @@ packages:
picocolors: 1.0.0
source-map-js: 1.0.2
/preact-render-to-string/5.2.6_preact@10.11.3:
resolution: {integrity: sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==}
peerDependencies:
preact: '>=10'
dependencies:
preact: 10.11.3
pretty-format: 3.8.0
dev: false
/preact/10.11.3:
resolution: {integrity: sha512-eY93IVpod/zG3uMF22Unl8h9KkrcKIRs2EGar8hwLZZDU1lkjph303V9HZBwufh2s736U6VXuhD109LYqPoffg==}
dev: false
/prelude-ls/1.2.1:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
@ -2871,6 +3271,16 @@ packages:
hasBin: true
dev: true
/prettier/2.8.0:
resolution: {integrity: sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==}
engines: {node: '>=10.13.0'}
hasBin: true
dev: true
/pretty-format/3.8.0:
resolution: {integrity: sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==}
dev: false
/prisma/4.6.1:
resolution: {integrity: sha512-BR4itMCuzrDV4tn3e2TF+nh1zIX/RVU0isKtKoN28ADeoJ9nYaMhiuRRkFd2TZN8+l/XfYzoRKyHzUFXLQhmBQ==}
engines: {node: '>=14.17'}
@ -3141,6 +3551,23 @@ packages:
react: 18.2.0
dev: false
/styled-jsx/5.1.0_react@18.2.0:
resolution: {integrity: sha512-/iHaRJt9U7T+5tp6TRelLnqBqiaIT0HsO0+vgyj8hK2KUk7aejFqRrumqPUlAqDwAj8IbS/1hk3IhBAAK/FCUQ==}
engines: {node: '>= 12.0.0'}
peerDependencies:
'@babel/core': '*'
babel-plugin-macros: '*'
react: '>= 16.8.0 || 17.x.x || ^18.0.0-0'
peerDependenciesMeta:
'@babel/core':
optional: true
babel-plugin-macros:
optional: true
dependencies:
client-only: 0.0.1
react: 18.2.0
dev: false
/superjson/1.9.1:
resolution: {integrity: sha512-oT3HA2nPKlU1+5taFgz/HDy+GEaY+CWEbLzaRJVD4gZ7zMVVC4GDNFdgvAZt6/VuIk6D2R7RtPAiCHwmdzlMmg==}
engines: {node: '>=10'}
@ -3331,6 +3758,12 @@ packages:
engines: {node: '>=4.2.0'}
hasBin: true
/typescript/4.9.3:
resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/unbox-primitive/1.0.2:
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
dependencies:
@ -3367,6 +3800,11 @@ packages:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
dev: true
/uuid/8.3.2:
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
hasBin: true
dev: false
/v8-compile-cache/2.3.0:
resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==}