1
0
mirror of synced 2026-02-07 03:00:10 -05:00

Compare commits

...

14 Commits

Author SHA1 Message Date
Brandon Bayer
ef38a4008a ah, there it is 2022-04-26 14:04:02 -04:00
Brandon Bayer
a9a3167a0f fix more 2022-04-26 11:38:52 -04:00
Brandon Bayer
64c75087dc fix 2022-04-26 11:29:22 -04:00
Brandon Bayer
257b1e8b27 remove db 2022-04-26 11:23:30 -04:00
Brandon Bayer
2fc9ceeed7 make it work 2022-04-26 11:22:17 -04:00
Dillon Raphael
1d9d890d9c use projectName variable for postInstallSteps in new app generator 2022-04-20 17:21:38 -04:00
Dillon Raphael
b8f51a2354 remove name flag from new app generator cli 2022-04-20 17:09:19 -04:00
Dillon Raphael
6552b11b94 Make server and client setup consistent with naming 2022-04-20 16:25:36 -04:00
Dillon Raphael
d1dd2bc56e fix generator typescript config to make customTsParser work 2022-04-20 15:51:57 -04:00
Dillon Raphael
09b732860d export eslint file from blitz next package for use in app generator 2022-04-20 15:28:28 -04:00
Dillon Raphael
ccb6cfd2a0 Merge branch 'main' of github.com:blitz-js/blitz
merge
2022-04-20 15:14:05 -04:00
Dillon Raphael
502b8f7820 rename blitz rpc api route during precommit 2022-04-20 15:13:43 -04:00
Aleksandra
3888d7018a Add rpc resolver and update template app (#3307) 2022-04-20 14:33:41 +02:00
Dillon Raphael
02f7822437 Prisma CLI command (#3305)
* blitz prisma command & tidy up templates

* update lockfile

* update lockfile

* hardcode versions

* update ci pnpm version

* update ci pnpm version

* revert ci pnpm version

* fresh clone with updated pnpm-lock

* update packages
2022-04-15 18:38:53 -04:00
68 changed files with 1038 additions and 330 deletions

1
.gitignore vendored
View File

@@ -68,3 +68,4 @@ test/**/blitz-env.d.ts
examples/**/blitz-env.d.ts
.blitz**
*.sqlite

View File

@@ -1,26 +1,25 @@
import { NotFoundError, Ctx } from "blitz"
import { prisma } from "db"
import { NotFoundError } from "blitz"
import { prisma as db } from "db"
import { authenticateUser } from "./login"
import { ChangePassword } from "../validations"
import { resolver } from "@blitzjs/rpc"
import { SecurePassword } from "@blitzjs/auth"
export default async function changePassword(input, ctx: Ctx) {
ChangePassword.parse(input)
ctx.session.$isAuthorized()
export default resolver.pipe(
resolver.zod(ChangePassword),
resolver.authorize(),
async ({ currentPassword, newPassword }, ctx) => {
const user = await db.user.findFirst({ where: { id: ctx.session.userId as number } })
if (!user) throw new NotFoundError()
const user = await prisma.user.findFirst({
where: {
id: ctx.session.userId as number,
},
})
await authenticateUser(user.email, currentPassword)
if (!user) throw new NotFoundError()
await authenticateUser(user.email, input.currentPassword)
const hashedPassword = await SecurePassword.hash(newPassword.trim())
await db.user.update({
where: { id: user.id },
data: { hashedPassword },
})
const hashedPassword = await SecurePassword.hash(input.newPassword.trim())
await prisma.user.update({
where: { id: user.id },
data: { hashedPassword },
})
}
return true
}
)

View File

@@ -1,15 +1,14 @@
import { prisma } from "db"
import { generateToken, hash256 } from "@blitzjs/auth"
import { resolver } from "@blitzjs/rpc"
import { prisma as db } from "db"
import { forgotPasswordMailer } from "mailers/forgotPasswordMailer"
import { ForgotPassword } from "../validations"
import { Ctx } from "@blitzjs/next"
const RESET_PASSWORD_TOKEN_EXPIRATION_IN_HOURS = 4
export default async function forgotPassword(input, ctx: Ctx) {
ForgotPassword.parse(input)
export default resolver.pipe(resolver.zod(ForgotPassword), async ({ email }) => {
// 1. Get the user
const user = await prisma.user.findFirst({ where: { email: input.email.toLowerCase() } })
const user = await db.user.findFirst({ where: { email: email.toLowerCase() } })
// 2. Generate the token and expiration date.
const token = generateToken()
@@ -20,9 +19,9 @@ export default async function forgotPassword(input, ctx: Ctx) {
// 3. If user with this email was found
if (user) {
// 4. Delete any existing password reset tokens
await prisma.token.deleteMany({ where: { type: "RESET_PASSWORD", userId: user.id } })
await db.token.deleteMany({ where: { type: "RESET_PASSWORD", userId: user.id } })
// 5. Save this new token in the database.
await prisma.token.create({
await db.token.create({
data: {
user: { connect: { id: user.id } },
type: "RESET_PASSWORD",
@@ -40,4 +39,4 @@ export default async function forgotPassword(input, ctx: Ctx) {
// 8. Return the same result whether a password reset email was sent or not
return
}
})

View File

@@ -1,11 +1,13 @@
import { AuthenticationError } from "blitz"
import { prisma } from "db"
import { Login } from "../validations"
import { SecurePassword } from "@blitzjs/auth"
import { resolver } from "@blitzjs/rpc"
import { AuthenticationError } from "blitz"
import { prisma as db, User } from "db"
import { Role } from "types"
import { Login } from "../validations"
export const authenticateUser = async (rawEmail: string, rawPassword: string) => {
const { email, password } = Login.parse({ email: rawEmail, password: rawPassword })
const user = await prisma.user.findFirst({ where: { email } })
const user = await db.user.findFirst({ where: { email } })
if (!user) throw new AuthenticationError()
const result = await SecurePassword.verify(user.hashedPassword, password)
@@ -13,16 +15,18 @@ export const authenticateUser = async (rawEmail: string, rawPassword: string) =>
if (result === SecurePassword.VALID_NEEDS_REHASH) {
// Upgrade hashed password with a more secure hash
const improvedHash = await SecurePassword.hash(password)
await prisma.user.update({ where: { id: user.id }, data: { hashedPassword: improvedHash } })
await db.user.update({ where: { id: user.id }, data: { hashedPassword: improvedHash } })
}
const { hashedPassword, ...rest } = user
return rest
}
export default async function login(input, ctx) {
const user = await authenticateUser(input.email, input.password)
await ctx.session.$create({ userId: user.id, role: user.role })
export default resolver.pipe(resolver.zod(Login), async ({ email, password }, ctx) => {
// This throws an error if credentials are invalid
const user = await authenticateUser(email, password)
await ctx.session.$create({ userId: user.id, role: user.role as Role })
return user
}
})

View File

@@ -1,8 +1,8 @@
import { AuthClientPlugin } from "@blitzjs/auth"
import { setupClient } from "@blitzjs/next"
import { setupBlitzClient } from "@blitzjs/next"
import { BlitzRpcPlugin } from "@blitzjs/rpc"
const { withBlitz } = setupClient({
const { withBlitz } = setupBlitzClient({
plugins: [
AuthClientPlugin({
cookiePrefix: "web-cookie-prefix",

View File

@@ -1,9 +1,9 @@
import { setupBlitz } from "@blitzjs/next"
import { setupBlitzServer } from "@blitzjs/next"
import { AuthServerPlugin, PrismaStorage } from "@blitzjs/auth"
import { prisma as db } from "../db/index"
import { simpleRolesIsAuthorized } from "@blitzjs/auth"
const { gSSP, gSP, api } = setupBlitz({
const { gSSP, gSP, api } = setupBlitzServer({
plugins: [
AuthServerPlugin({
cookiePrefix: "web-cookie-prefix",

View File

@@ -0,0 +1,47 @@
-- CreateTable
CREATE TABLE "User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"name" TEXT,
"email" TEXT NOT NULL,
"hashedPassword" TEXT,
"role" TEXT NOT NULL DEFAULT 'USER'
);
-- CreateTable
CREATE TABLE "Session" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"expiresAt" DATETIME,
"handle" TEXT NOT NULL,
"hashedSessionToken" TEXT,
"antiCSRFToken" TEXT,
"publicData" TEXT,
"privateData" TEXT,
"userId" INTEGER,
CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Token" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"hashedToken" TEXT NOT NULL,
"type" TEXT NOT NULL,
"expiresAt" DATETIME NOT NULL,
"sentTo" TEXT NOT NULL,
"userId" INTEGER NOT NULL,
CONSTRAINT "Token_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
-- CreateIndex
CREATE UNIQUE INDEX "Session_handle_key" ON "Session"("handle");
-- CreateIndex
CREATE UNIQUE INDEX "Token_hashedToken_type_key" ON "Token"("hashedToken", "type");

View File

@@ -35,6 +35,7 @@
"react": "18.0.0",
"react-dom": "18.0.0",
"react-hook-form": "7.29.0",
"styled-jsx": "5.0.2",
"ts-node": "10.7.0",
"zod": "3.10.1"
},

View File

@@ -20,5 +20,5 @@
"tsBuildInfoFile": ".tsbuildinfo"
},
"exclude": ["node_modules", "**/*.e2e.ts", "cypress"],
"include": ["blitz-env.d.ts", "**/*.ts", "**/*.tsx"]
"include": ["blitz-env.d.ts", "**/*.ts", "**/*.tsx", "types"]
}

15
apps/toolkit-app/types.ts Normal file
View File

@@ -0,0 +1,15 @@
import { SimpleRolesIsAuthorized } from "@blitzjs/auth"
import { User } from "db"
export type Role = "ADMIN" | "USER"
declare module "@blitzjs/auth" {
export interface Session {
isAuthorized: SimpleRolesIsAuthorized<Role>
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -1,8 +1,8 @@
import {AuthClientPlugin} from "@blitzjs/auth"
import {setupClient} from "@blitzjs/next"
import {setupBlitzClient} from "@blitzjs/next"
import {BlitzRpcPlugin} from "@blitzjs/rpc"
const {withBlitz} = setupClient({
const {withBlitz} = setupBlitzClient({
plugins: [
AuthClientPlugin({
cookiePrefix: "webapp-cookie-prefix",

View File

@@ -1,9 +1,9 @@
import {setupBlitz} from "@blitzjs/next"
import {setupBlitzServer} from "@blitzjs/next"
import {AuthServerPlugin, PrismaStorage} from "@blitzjs/auth"
import {prisma as db} from "../prisma/index"
import {simpleRolesIsAuthorized} from "@blitzjs/auth"
const {gSSP, gSP, api} = setupBlitz({
const {gSSP, gSP, api} = setupBlitzServer({
plugins: [
AuthServerPlugin({
cookiePrefix: "webapp-cookie-prefix",

View File

@@ -1,7 +1,7 @@
import {AuthClientPlugin} from "@blitzjs/auth"
import {setupClient} from "@blitzjs/next"
import {setupBlitzClient} from "@blitzjs/next"
const {withBlitz} = setupClient({
const {withBlitz} = setupBlitzClient({
plugins: [
AuthClientPlugin({
cookiePrefix: "auth-tests-cookie-prefix",

View File

@@ -1,9 +1,9 @@
import {setupBlitz} from "@blitzjs/next"
import {setupBlitzServer} from "@blitzjs/next"
import {AuthServerPlugin, PrismaStorage} from "@blitzjs/auth"
import {simpleRolesIsAuthorized} from "@blitzjs/auth"
import {prisma as db} from "../prisma/index"
const {gSSP, gSP, api} = setupBlitz({
const {gSSP, gSP, api} = setupBlitzServer({
plugins: [
AuthServerPlugin({
cookiePrefix: "auth-tests-cookie-prefix",

View File

@@ -24,7 +24,7 @@
"@types/secure-password": "3.1.1",
"b64-lite": "1.4.0",
"bad-behavior": "1.0.1",
"blitz": "workspace:*",
"blitz": "2.0.0-alpha.5",
"cookie": "0.4.1",
"debug": "4.3.3",
"http": "0.0.1-security",
@@ -35,7 +35,7 @@
"url": "0.11.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:*",
"@blitzjs/config": "2.0.0-alpha.5",
"@testing-library/react": "13.0.0",
"@testing-library/react-hooks": "7.0.2",
"@types/cookie": "0.4.1",

View File

@@ -2,10 +2,4 @@ import "./global"
export * from "./client"
export * from "./shared/constants"
export type {
SessionContextBase,
SessionContext,
AuthenticatedSessionContext,
ClientSession,
AuthenticatedClientSession,
} from "./shared/types"
export * from "./shared/types"

View File

@@ -0,0 +1,29 @@
module.exports = {
extends: ["eslint-config-next", "prettier"],
ignorePatterns: ["*.d.ts"],
settings: {
next: {
rootDir: ["./apps/*/", "./packages/*/"],
},
},
rules: {
"@next/next/no-html-link-for-pages": "off",
},
overrides: [
{
files: ["**/*.ts?(x)"],
plugins: ["@typescript-eslint"],
parserOptions: {
project: "./tsconfig.json",
},
rules: {
"@typescript-eslint/no-floating-promises": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["off"],
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": ["error"],
"react/display-name": "off",
},
},
],
}

View File

@@ -17,7 +17,8 @@
"sideEffects": false,
"license": "MIT",
"files": [
"dist/**"
"dist/**",
"eslint.js"
],
"dependencies": {
"@blitzjs/rpc": "2.0.0-alpha.5",
@@ -26,7 +27,7 @@
"react-query": "3.21.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:*",
"@blitzjs/config": "2.0.0-alpha.5",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.3",
"@testing-library/react": "13.0.0",
@@ -37,7 +38,7 @@
"@types/react": "17.0.43",
"@types/react-dom": "17.0.14",
"@types/testing-library__react-hooks": "4.0.0",
"blitz": "workspace:*",
"blitz": "2.0.0-alpha.5",
"lodash.frompairs": "4.0.1",
"next": "12.1.1",
"react": "18.0.0",

View File

@@ -88,7 +88,7 @@ export type PluginsExports<TPlugins extends readonly ClientPlugin<object>[]> = S
>
>
const setupClient = <TPlugins extends readonly ClientPlugin<object>[]>({
const setupBlitzClient = <TPlugins extends readonly ClientPlugin<object>[]>({
plugins,
}: {
plugins: TPlugins
@@ -121,7 +121,7 @@ const setupClient = <TPlugins extends readonly ClientPlugin<object>[]>({
}
}
export {setupClient}
export {setupBlitzClient}
const customCSS = `
body::before {

View File

@@ -38,7 +38,7 @@ export type BlitzAPIHandler = (
ctx: Ctx,
) => ReturnType<NextApiHandler>
export const setupBlitz = ({plugins}: SetupBlitzOptions) => {
export const setupBlitzServer = ({plugins}: SetupBlitzOptions) => {
const middlewares = plugins.flatMap((p) => p.middlewares)
const contextMiddleware = plugins.flatMap((p) => p.contextMiddleware).filter(Boolean)

View File

@@ -26,10 +26,11 @@
"chalk": "^4.1.0",
"debug": "4.3.3",
"react-query": "3.21.1",
"superjson": "1.8.0"
"superjson": "1.8.0",
"zod": "3.10.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:*",
"@blitzjs/config": "2.0.0-alpha.5",
"@types/debug": "4.1.7",
"@types/react": "17.0.43",
"@types/react-dom": "17.0.14",

View File

@@ -6,6 +6,8 @@ import chalk from "chalk"
// TODO - optimize end user server bundles by not exporting all client stuff here
export * from "./index-browser"
export * from "./resolver"
// Mechanism used by Vite/Next/Nuxt plugins for automatically loading query and mutation resolvers
function isObject(value: unknown): value is Record<string | symbol, unknown> {
return typeof value === "object" && value !== null

View File

@@ -0,0 +1,63 @@
import {Ctx} from "blitz"
import {describe, it, expect} from "vitest"
import {z} from "zod"
import {ParserType, resolver} from "./resolver"
describe("resolver", () => {
it("should typecheck and pass along value", async () => {
await resolverTest({})
})
it("should typecheck and pass along value if sync resolver is specified", async () => {
await resolverTest({type: "sync"})
})
it("should typecheck and pass along value if async resolver is specified", async () => {
await resolverTest({type: "async"})
})
})
const syncResolver = resolver.pipe(
resolver.zod(
z.object({
email: z.string().email(),
}),
"sync",
),
resolver.authorize({}),
(input) => {
return input.email
},
)
const asyncResolver = resolver.pipe(
resolver.zod(
z.object({
email: z.string().email(),
}),
"async",
),
resolver.authorize({}),
(input) => {
return input.email
},
)
const resolverTest = async ({type}: {type?: ParserType}) => {
const resolver1 = type === "sync" ? syncResolver : asyncResolver
const result1 = await resolver1(
{email: "test@example.com"},
{session: {$authorize: () => undefined} as Ctx},
)
expect(result1).toBe("test@example.com")
const resolver2 = resolver.pipe(
/*resolver.authorize(), */ (input: {email: string}) => {
return input.email
},
)
const result2 = await resolver2(
{email: "test@example.com"},
{session: {$authorize: () => undefined} as Ctx},
)
expect(result2).toBe("test@example.com")
}

View File

@@ -0,0 +1,321 @@
import {AuthenticatedSessionContext, SessionContext, SessionContextBase} from "@blitzjs/auth"
import {Await, Ctx, EnsurePromise} from "blitz"
import type {input as zInput, output as zOutput, ZodTypeAny} from "zod"
export type ParserType = "sync" | "async"
interface ResultWithContext<Result = unknown, Context = unknown> {
__blitz: true
value: Result
ctx: Context
}
function isResultWithContext(x: unknown): x is ResultWithContext {
return (
typeof x === "object" && x !== null && "ctx" in x && (x as ResultWithContext).__blitz === true
)
}
export interface AuthenticatedMiddlewareCtx extends Omit<Ctx, "session"> {
session: AuthenticatedSessionContext
}
type PipeFn<Prev, Next, PrevCtx, NextCtx = PrevCtx> = (
i: Await<Prev>,
c: PrevCtx,
) => Next extends ResultWithContext ? never : Next | ResultWithContext<Next, NextCtx>
function pipe<A, Z>(ab: (i: A, c: Ctx) => Z): (input: A, ctx: Ctx) => EnsurePromise<Z>
function pipe<A, B, C, CA = Ctx, CB = CA, CC = CB>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
): (input: A, ctx: CA) => EnsurePromise<C>
function pipe<A, B, C, D, CA = Ctx, CB = CA, CC = CB, CD = CC>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
): (input: A, ctx: CA) => EnsurePromise<D>
function pipe<A, B, C, D, E, CA = Ctx, CB = CA, CC = CB, CD = CC, CE = CD>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
de: PipeFn<D, E, CD, CE>,
): (input: A, ctx: CA) => EnsurePromise<E>
function pipe<A, B, C, D, E, F, CA = Ctx, CB = CA, CC = CB, CD = CC, CE = CD, CF = CE>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
de: PipeFn<D, E, CD, CE>,
ef: PipeFn<E, F, CE, CF>,
): (input: A, ctx: CA) => EnsurePromise<F>
function pipe<A, B, C, D, E, F, G, CA = Ctx, CB = CA, CC = CB, CD = CC, CE = CD, CF = CE, CG = CF>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
de: PipeFn<D, E, CD, CE>,
ef: PipeFn<E, F, CE, CF>,
fg: PipeFn<F, G, CF, CG>,
): (input: A, ctx: CA) => EnsurePromise<CG>
function pipe<
A,
B,
C,
D,
E,
F,
G,
H,
CA = Ctx,
CB = CA,
CC = CB,
CD = CC,
CE = CD,
CF = CE,
CG = CF,
CH = CG,
>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
de: PipeFn<D, E, CD, CE>,
ef: PipeFn<E, F, CE, CF>,
fg: PipeFn<F, G, CF, CG>,
gh: PipeFn<G, H, CG, CH>,
): (input: A, ctx: CA) => EnsurePromise<H>
function pipe<
A,
B,
C,
D,
E,
F,
G,
H,
I,
CA = Ctx,
CB = CA,
CC = CB,
CD = CC,
CE = CD,
CF = CE,
CG = CF,
CH = CG,
CI = CH,
>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
de: PipeFn<D, E, CD, CE>,
ef: PipeFn<E, F, CE, CF>,
fg: PipeFn<F, G, CF, CG>,
gh: PipeFn<G, H, CG, CH>,
hi: PipeFn<H, I, CH, CI>,
): (input: A, ctx: CA) => EnsurePromise<I>
function pipe<
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
CA = Ctx,
CB = CA,
CC = CB,
CD = CC,
CE = CD,
CF = CE,
CG = CF,
CH = CG,
CI = CH,
CJ = CI,
>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
de: PipeFn<D, E, CD, CE>,
ef: PipeFn<E, F, CE, CF>,
fg: PipeFn<F, G, CF, CG>,
gh: PipeFn<G, H, CG, CH>,
hi: PipeFn<H, I, CH, CI>,
ij: PipeFn<I, J, CI, CJ>,
): (input: A, ctx: CA) => EnsurePromise<J>
function pipe<
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
CA = Ctx,
CB = CA,
CC = CB,
CD = CC,
CE = CD,
CF = CE,
CG = CF,
CH = CG,
CI = CH,
CJ = CI,
CK = CJ,
>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
de: PipeFn<D, E, CD, CE>,
ef: PipeFn<E, F, CE, CF>,
fg: PipeFn<F, G, CF, CG>,
gh: PipeFn<G, H, CG, CH>,
hi: PipeFn<H, I, CH, CI>,
ij: PipeFn<I, J, CI, CJ>,
jk: PipeFn<J, K, CJ, CK>,
): (input: A, ctx: CA) => EnsurePromise<K>
function pipe<
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
L,
CA = Ctx,
CB = CA,
CC = CB,
CD = CC,
CE = CD,
CF = CE,
CG = CF,
CH = CG,
CI = CH,
CJ = CI,
CK = CJ,
CL = CK,
>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
de: PipeFn<D, E, CD, CE>,
ef: PipeFn<E, F, CE, CF>,
fg: PipeFn<F, G, CF, CG>,
gh: PipeFn<G, H, CG, CH>,
hi: PipeFn<H, I, CH, CI>,
ij: PipeFn<I, J, CI, CJ>,
jk: PipeFn<J, K, CJ, CK>,
kl: PipeFn<K, L, CK, CL>,
): (input: A, ctx: CA) => EnsurePromise<L>
function pipe<
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
L,
M,
CA = Ctx,
CB = CA,
CC = CB,
CD = CC,
CE = CD,
CF = CE,
CG = CF,
CH = CG,
CI = CH,
CJ = CI,
CK = CJ,
CL = CK,
CM = CL,
>(
ab: PipeFn<A, B, CA, CB>,
bc: PipeFn<B, C, CB, CC>,
cd: PipeFn<C, D, CC, CD>,
de: PipeFn<D, E, CD, CE>,
ef: PipeFn<E, F, CE, CF>,
fg: PipeFn<F, G, CF, CG>,
gh: PipeFn<G, H, CG, CH>,
hi: PipeFn<H, I, CH, CI>,
ij: PipeFn<I, J, CI, CJ>,
jk: PipeFn<J, K, CJ, CK>,
kl: PipeFn<K, L, CK, CL>,
lm: PipeFn<L, M, CL, CM>,
): (input: A, ctx: CA) => EnsurePromise<M>
function pipe(...args: unknown[]): unknown {
const functions = args as PipeFn<unknown, unknown, Ctx>[]
return async function (input: unknown, ctx: Ctx) {
let lastResult = input
for (let fn of functions) {
lastResult = await fn(lastResult, ctx)
if (isResultWithContext(lastResult)) {
ctx = lastResult.ctx as Ctx
lastResult = lastResult.value
}
}
return lastResult
}
}
interface ResolverAuthorize {
<T, C = Ctx>(...args: Parameters<SessionContextBase["$authorize"]>): (
input: T,
ctx: C,
) => ResultWithContext<T, AuthenticatedMiddlewareCtx>
}
const authorize: ResolverAuthorize = (...args) => {
return function _innerAuthorize(input, ctx) {
const session: SessionContext = (ctx as any).session
session.$authorize(...args)
return {
__blitz: true,
value: input,
// we could use {...ctx, session} instead of `as any` just for TypeScript's sake
ctx: ctx as any,
}
}
}
function zod<Schema extends ZodTypeAny, InputType = zInput<Schema>, OutputType = zOutput<Schema>>(
schema: Schema,
parserType: "sync",
): (input: InputType) => OutputType
function zod<Schema extends ZodTypeAny, InputType = zInput<Schema>, OutputType = zOutput<Schema>>(
schema: Schema,
parserType: "async",
): (input: InputType) => Promise<OutputType>
function zod<Schema extends ZodTypeAny, InputType = zInput<Schema>, OutputType = zOutput<Schema>>(
schema: Schema,
): (input: InputType) => Promise<OutputType>
function zod<Schema extends ZodTypeAny, InputType = zInput<Schema>, OutputType = zOutput<Schema>>(
schema: Schema,
parserType: ParserType = "async",
) {
if (parserType === "sync") {
return (input: InputType): OutputType => schema.parse(input)
} else {
return (input: InputType): Promise<OutputType> => schema.parseAsync(input)
}
}
export const resolver = {
pipe,
zod,
authorize,
}

View File

@@ -23,7 +23,7 @@
"blitz": "bin/blitz"
},
"dependencies": {
"@blitzjs/generator": "workspace:*",
"@blitzjs/generator": "2.0.0-alpha.5",
"arg": "5.0.1",
"chalk": "^4.1.0",
"console-table-printer": "2.10.0",
@@ -45,7 +45,7 @@
"tslog": "3.3.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:*",
"@blitzjs/config": "2.0.0-alpha.5",
"@types/cookie": "0.4.1",
"@types/cross-spawn": "6.0.2",
"@types/debug": "4.1.7",

View File

@@ -1,7 +0,0 @@
import {CliCommand} from "../index"
const dev: CliCommand = (argv) => {
console.log("dev hit")
}
export {dev}

View File

@@ -74,6 +74,13 @@ const args = arg(
"--parent": String,
"--dry-run": Boolean,
"--env": String,
// Aliases
"-e": "--env",
"-n": "--name",
"-t": "--type",
"-c": "--context",
"-p": "--dry-run",
},
{
permissive: true,

View File

@@ -48,7 +48,6 @@ const PREFERABLE_PKG_MANAGER: TPkgManager = IS_PNPM_INSTALLED
const args = arg(
{
// Types
"--name": String,
"--npm": Boolean,
"--yarn": Boolean,
"--pnpm": Boolean,
@@ -59,6 +58,8 @@ const args = arg(
"--dry-run": Boolean,
"--no-git": Boolean,
"--skip-upgrade": Boolean,
// Aliases
},
{
permissive: true,
@@ -74,7 +75,7 @@ let projectPkgManger: TPkgManager = PREFERABLE_PKG_MANAGER
let shouldInstallDeps: boolean = true
const determineProjectName = async () => {
if (!args["--name"]) {
if (args._.slice(1).length < 1) {
const res = await prompts({
type: "text",
name: "name",
@@ -85,7 +86,7 @@ const determineProjectName = async () => {
projectName = res.name.trim().replaceAll(" ", "-")
projectPath = path.resolve(projectName)
} else {
projectName = args["--name"]
projectName = args._.slice(1)[0] as string
projectPath = path.resolve(projectName)
}
}
@@ -233,7 +234,7 @@ const newApp: CliCommand = async (argv) => {
try {
const latestBlitzVersion = (await getLatestVersion("blitz")).value
const requireManualInstall = args["--dry-run"] || !shouldInstallDeps
const postInstallSteps = args["--name"] === "." ? [] : [`cd ${projectName}`]
const postInstallSteps = projectName === "." ? [] : [`cd ${projectName}`]
const generatorOpts: AppGeneratorOptions = {
template: projectTemplate,

View File

@@ -0,0 +1,56 @@
import {Readable} from "stream"
import {getPrismaBin} from "../utils/config"
import {CliCommand} from "../index"
import arg from "arg"
let prismaBin: string
export const runPrisma = async (args: string[], silent = false) => {
if (!prismaBin) {
try {
prismaBin = await getPrismaBin(process.cwd())
} catch (err) {
throw err
}
}
const cp = require("cross-spawn").spawn(prismaBin, args, {
stdio: silent ? "pipe" : "inherit",
env: process.env,
})
const cp_stderr: string[] = []
if (silent) {
cp.stderr.on("data", (chunk: Readable) => {
cp_stderr.push(chunk.toString())
})
}
const code = await require("p-event")(cp, "exit", {rejectionEvents: []})
return {
success: code === 0,
stderr: silent ? cp_stderr.join("") : undefined,
}
}
export const runPrismaExitOnError = async (...args: Parameters<typeof runPrisma>) => {
const result = await runPrisma(...args)
if (!result.success) {
process.exit(1)
}
}
const prisma: CliCommand = async () => {
const args = arg(
{},
{
permissive: true,
},
)
await runPrismaExitOnError(args._.slice(1))
}
export {prisma}

View File

@@ -32,6 +32,7 @@ const commands: {[command: string]: () => Promise<CliCommand>} = {
new: () => import("./commands/new").then((i) => i.newApp),
generate: () => import("./commands/generate").then((i) => i.generate),
codegen: () => import("./commands/codegen").then((i) => i.codegen),
prisma: () => import("./commands/prisma").then((i) => i.prisma),
}
const args = arg(commonArgs, {

View File

@@ -93,6 +93,16 @@ async function getNextBin(rootFolder: string, _usePatched: boolean = false): Pro
return resolve(rootFolder, nextBin)
}
export async function getPrismaBin(
rootFolder: string,
_usePatched: boolean = false,
): Promise<string> {
const prismaBinPkg = "prisma"
const prismaBin = await resolveBinAsync(prismaBinPkg)
return resolve(rootFolder, prismaBin)
}
async function getIsTypeScript(rootFolder: string): Promise<boolean> {
try {
await promises.access(join(rootFolder, "tsconfig.json"))

View File

@@ -45,7 +45,7 @@
"vinyl": "2.2.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:*",
"@blitzjs/config": "2.0.0-alpha.5",
"@juanm04/cpx": "2.0.1",
"@types/babel__core": "7.1.19",
"@types/diff": "5.0.2",

View File

@@ -40,7 +40,7 @@ export interface SourceRootType {
const alwaysIgnoreFiles = [".blitz", ".DS_Store", ".git", ".next", ".now", "node_modules"]
const ignoredExtensions = [".ico", ".png", ".jpg"]
const tsExtension = /\.(tsx?)$/
const tsExtension = /\.(tsx?|ts?)$/
const codeFileExtensions = /\.(tsx?|jsx?)$/
function getStatements(node: j.BlockStatement | j.Statement): j.Statement[] {
@@ -269,11 +269,6 @@ export abstract class Generator<
)
this.fs.write(this.destinationPath(pathSuffix), newContent)
// this.fs.copy(this.sourcePath(filePath), this.destinationPath(pathSuffix), {
// process: (input) =>
// // this.process(input, pathSuffix, templateValues, prettierOptions ?? undefined),
// this.process(input, pathSuffix, templateValues, undefined),
// })
if (!this.useTs && tsExtension.test(this.destinationPath(pathSuffix))) {
templatedPathSuffix = templatedPathSuffix.replace(tsExtension, ".js")
}

View File

@@ -76,6 +76,10 @@ export class AppGenerator extends Generator<AppGeneratorOptions> {
this.destinationPath(this.options.useTs ? "package.ts.json" : "package.js.json"),
this.destinationPath("package.json"),
)
this.fs.move(
this.destinationPath(`pages/api/rpc/blitzrpcroute.${this.options.useTs ? "ts" : "js"}`),
this.destinationPath(`pages/api/rpc/[...blitz].${this.options.useTs ? "ts" : "js"}`),
)
if (!this.options.template.skipForms) {
this.updateForms()
@@ -231,6 +235,14 @@ export class AppGenerator extends Generator<AppGeneratorOptions> {
}
}
// if(this.options.useTs) {
// if(templatedPathSuffix === "pages/api/rpc/blitzrpcroute.js") {
// this.fs.write(this.destinationPath("pages/api/rpc/[...blitz].js"), this.sourcePath("pages/api/rpc/blitzrpcroute.js"))
// } else {
// }
// }
if (!this.options.skipGit && gitInitSuccessful) {
this.commitChanges()
}

View File

@@ -0,0 +1,8 @@
# This env file should NOT be checked into source control
# This is the place for values that changed for every developer
# SQLite is ready to go out of the box, but you can switch to Postgres
# by first changing the provider from "sqlite" to "postgres" in the Prisma
# schema file and by second swapping the DATABASE_URL below.
DATABASE_URL="file:./db.sqlite"
# DATABASE_URL=postgresql://__username__@localhost:5432/__name__

View File

@@ -1 +1 @@
module.exports = require("@blitzjs/config/eslint")
module.exports = require("@blitzjs/next/eslint")

View File

@@ -7,3 +7,4 @@ db/migrations
.yarn
.pnp.*
node_modules
README.md

View File

@@ -39,7 +39,7 @@ export const LoginForm = (props: LoginFormProps) => {
<LabeledTextField name="email" label="Email" placeholder="Email" />
<LabeledTextField name="password" label="Password" placeholder="Password" type="password" />
<div>
<Link href="/auth/forgot-password" passHref>
<Link href="/auth/forgot-password">
<a>Forgot your password?</a>
</Link>
</div>
@@ -47,7 +47,7 @@ export const LoginForm = (props: LoginFormProps) => {
<div style={{ marginTop: "1rem" }}>
Or{" "}
<Link href="/auth/signup" passHref>
<Link href="/auth/signup">
<a>Sign Up</a>
</Link>
</div>

View File

@@ -1,26 +1,25 @@
import { NotFoundError, Ctx } from "blitz"
import { prisma } from "db"
import { NotFoundError } from "blitz"
import { db } from "db"
import { authenticateUser } from "./login"
import { ChangePassword } from "../validations"
import { resolver } from "@blitzjs/rpc"
import { SecurePassword } from "@blitzjs/auth"
export default async function changePassword(input, ctx: Ctx) {
ChangePassword.parse(input)
ctx.session.$isAuthorized()
export default resolver.pipe(
resolver.zod(ChangePassword),
resolver.authorize(),
async ({ currentPassword, newPassword }, ctx) => {
const user = await db.user.findFirst({ where: { id: ctx.session.userId as number } })
if (!user) throw new NotFoundError()
const user = await prisma.user.findFirst({
where: {
id: ctx.session.userId as number,
},
})
await authenticateUser(user.email, currentPassword)
if (!user) throw new NotFoundError()
await authenticateUser(user.email, input.currentPassword)
const hashedPassword = await SecurePassword.hash(newPassword.trim())
await db.user.update({
where: { id: user.id },
data: { hashedPassword },
})
const hashedPassword = await SecurePassword.hash(input.newPassword.trim())
await prisma.user.update({
where: { id: user.id },
data: { hashedPassword },
})
}
return true
}
)

View File

@@ -1,11 +1,11 @@
import { prisma } from "db"
import { db } from "db"
import { hash256 } from "@blitzjs/auth"
import forgotPassword from "./forgotPassword"
import previewEmail from "preview-email"
import { Ctx } from "@blitzjs/next"
beforeEach(async () => {
await prisma.$reset()
await db.$reset()
})
const generatedToken = "plain-token"
@@ -22,7 +22,7 @@ describe("forgotPassword mutation", () => {
it("works correctly", async () => {
// Create test user
const user = await prisma.user.create({
const user = await db.user.create({
data: {
email: "user@example.com",
tokens: {
@@ -41,7 +41,7 @@ describe("forgotPassword mutation", () => {
// Invoke the mutation
await forgotPassword({ email: user.email }, {} as Ctx)
const tokens = await prisma.token.findMany({ where: { userId: user.id } })
const tokens = await db.token.findMany({ where: { userId: user.id } })
const token = tokens[0]
if (!user.tokens[0]) throw new Error("Missing user token")
if (!token) throw new Error("Missing token")

View File

@@ -1,15 +1,14 @@
import { prisma } from "db"
import { generateToken, hash256 } from "@blitzjs/auth"
import { resolver } from "@blitzjs/rpc"
import { db } from "db"
import { forgotPasswordMailer } from "mailers/forgotPasswordMailer"
import { ForgotPassword } from "../validations"
import { Ctx } from "@blitzjs/next"
const RESET_PASSWORD_TOKEN_EXPIRATION_IN_HOURS = 4
export default async function forgotPassword(input, ctx: Ctx) {
ForgotPassword.parse(input)
export default resolver.pipe(resolver.zod(ForgotPassword), async ({ email }) => {
// 1. Get the user
const user = await prisma.user.findFirst({ where: { email: input.email.toLowerCase() } })
const user = await db.user.findFirst({ where: { email: email.toLowerCase() } })
// 2. Generate the token and expiration date.
const token = generateToken()
@@ -20,9 +19,9 @@ export default async function forgotPassword(input, ctx: Ctx) {
// 3. If user with this email was found
if (user) {
// 4. Delete any existing password reset tokens
await prisma.token.deleteMany({ where: { type: "RESET_PASSWORD", userId: user.id } })
await db.token.deleteMany({ where: { type: "RESET_PASSWORD", userId: user.id } })
// 5. Save this new token in the database.
await prisma.token.create({
await db.token.create({
data: {
user: { connect: { id: user.id } },
type: "RESET_PASSWORD",
@@ -40,4 +39,4 @@ export default async function forgotPassword(input, ctx: Ctx) {
// 8. Return the same result whether a password reset email was sent or not
return
}
})

View File

@@ -1,11 +1,13 @@
import { AuthenticationError } from "blitz"
import { prisma } from "db"
import { Login } from "../validations"
import { SecurePassword } from "@blitzjs/auth"
import { resolver } from "@blitzjs/rpc"
import { AuthenticationError } from "blitz"
import { prisma as db, User } from "db"
import { Role } from "types"
import { Login } from "../validations"
export const authenticateUser = async (rawEmail: string, rawPassword: string) => {
const { email, password } = Login.parse({ email: rawEmail, password: rawPassword })
const user = await prisma.user.findFirst({ where: { email } })
const user = await db.user.findFirst({ where: { email } })
if (!user) throw new AuthenticationError()
const result = await SecurePassword.verify(user.hashedPassword, password)
@@ -13,16 +15,18 @@ export const authenticateUser = async (rawEmail: string, rawPassword: string) =>
if (result === SecurePassword.VALID_NEEDS_REHASH) {
// Upgrade hashed password with a more secure hash
const improvedHash = await SecurePassword.hash(password)
await prisma.user.update({ where: { id: user.id }, data: { hashedPassword: improvedHash } })
await db.user.update({ where: { id: user.id }, data: { hashedPassword: improvedHash } })
}
const { hashedPassword, ...rest } = user
return rest
}
export default async function login(input, ctx) {
const user = await authenticateUser(input.email, input.password)
await ctx.session.$create({ userId: user.id, role: user.role })
export default resolver.pipe(resolver.zod(Login), async ({ email, password }, ctx) => {
// This throws an error if credentials are invalid
const user = await authenticateUser(email, password)
await ctx.session.$create({ userId: user.id, role: user.role as Role})
return user
}
})

View File

@@ -1,9 +1,9 @@
import resetPassword from "./resetPassword"
import { prisma } from "db"
import { db } from "db"
import { SecurePassword, hash256 } from "@blitzjs/auth"
beforeEach(async () => {
await prisma.$reset()
await db.$reset()
})
const mockCtx: any = {
@@ -24,7 +24,7 @@ describe("resetPassword mutation", () => {
const past = new Date()
past.setHours(past.getHours() - 4)
const user = await prisma.user.create({
const user = await db.user.create({
data: {
email: "user@example.com",
tokens: {
@@ -70,11 +70,11 @@ describe("resetPassword mutation", () => {
)
// Delete's the token
const numberOfTokens = await prisma.token.count({ where: { userId: user.id } })
const numberOfTokens = await db.token.count({ where: { userId: user.id } })
expect(numberOfTokens).toBe(0)
// Updates user's password
const updatedUser = await prisma.user.findFirst({ where: { id: user.id } })
const updatedUser = await db.user.findFirst({ where: { id: user.id } })
expect(await SecurePassword.verify(updatedUser!.hashedPassword, newPassword)).toBe(
SecurePassword.VALID
)

View File

@@ -1,5 +1,5 @@
import { SecurePassword, hash256 } from "@blitzjs/auth"
import { prisma } from "db"
import { db } from "db"
import { ResetPassword } from "../validations"
import login from "./login"
@@ -12,7 +12,7 @@ export default async function resetPassword(input, ctx) {
ResetPassword.parse(input)
// 1. Try to find this token in the database
const hashedToken = hash256(input.token)
const possibleToken = await prisma.token.findFirst({
const possibleToken = await db.token.findFirst({
where: { hashedToken, type: "RESET_PASSWORD" },
include: { user: true },
})
@@ -24,7 +24,7 @@ export default async function resetPassword(input, ctx) {
const savedToken = possibleToken
// 3. Delete token so it can't be used again
await prisma.token.delete({ where: { id: savedToken.id } })
await db.token.delete({ where: { id: savedToken.id } })
// 4. If token has expired, error
if (savedToken.expiresAt < new Date()) {
@@ -33,13 +33,13 @@ export default async function resetPassword(input, ctx) {
// 5. Since token is valid, now we can update the user's password
const hashedPassword = await SecurePassword.hash(input.password.trim())
const user = await prisma.user.update({
const user = await db.user.update({
where: { id: savedToken.userId },
data: { hashedPassword },
})
// 6. Revoke all existing login sessions for this user
await prisma.session.deleteMany({ where: { userId: user.id } })
await db.session.deleteMany({ where: { userId: user.id } })
// 7. Now log the user in with the new credentials
await login({ email: user.email, password: input.password }, ctx)

View File

@@ -1,4 +1,4 @@
import { prisma } from "db"
import { db } from "db"
import { SecurePassword } from "@blitzjs/auth"
export default async function signup(input, ctx) {
@@ -6,7 +6,7 @@ export default async function signup(input, ctx) {
const hashedPassword = await SecurePassword.hash((input.password as string) || "test-password")
const email = (input.email as string) || "test" + Math.random() + "@test.com"
const user = await prisma.user.create({
const user = await db.user.create({
data: { email, hashedPassword, role: "user" },
select: { id: true, name: true, email: true, role: true },
})

View File

@@ -1,8 +1,8 @@
import { AuthClientPlugin } from "@blitzjs/auth"
import { setupClient } from "@blitzjs/next"
import { setupBlitzClient } from "@blitzjs/next"
import { BlitzRpcPlugin } from "@blitzjs/rpc"
const { withBlitz } = setupClient({
export const { withBlitz } = setupBlitzClient({
plugins: [
AuthClientPlugin({
cookiePrefix: "__safeNameSlug__-cookie-prefix",
@@ -16,5 +16,3 @@ const { withBlitz } = setupClient({
}),
],
})
export { withBlitz }

View File

@@ -1,9 +1,9 @@
import { setupBlitz } from "@blitzjs/next"
import { setupBlitzServer } from "@blitzjs/next"
import { AuthServerPlugin, PrismaStorage } from "@blitzjs/auth"
import { prisma as db } from "../db/index"
import {db} from "db"
import { simpleRolesIsAuthorized } from "@blitzjs/auth"
const { gSSP, gSP, api } = setupBlitz({
export const { gSSP, gSP, api } = setupBlitzServer({
plugins: [
AuthServerPlugin({
cookiePrefix: "__safeNameSlug__-cookie-prefix",
@@ -14,4 +14,3 @@ const { gSSP, gSP, api } = setupBlitz({
],
})
export { gSSP, gSP, api }

View File

@@ -1,10 +1,10 @@
import { Ctx } from "blitz"
import { prisma } from "db"
import { db } from "db"
export default async function getCurrentUser(_ = null, { session }: Ctx) {
if (!session.userId) return null
const user = await prisma.user.findFirst({
const user = await db.user.findFirst({
where: { id: session.userId as number },
select: { id: true, name: true, email: true, role: true },
})

View File

@@ -4,5 +4,5 @@ import { PrismaClient } from "@prisma/client"
const EnhancedPrisma = enhancePrisma(PrismaClient)
export * from "@prisma/client"
const prisma = new EnhancedPrisma()
export { prisma }
const db = new EnhancedPrisma()
export { db }

View File

@@ -1,3 +0,0 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "sqlite"

View File

@@ -3,7 +3,7 @@
datasource db {
provider = "sqlite"
url = "file:./db.sqlite"
url = env("DATABASE_URL")
}
generator client {

View File

@@ -22,18 +22,15 @@
"*.{js}": ["eslint --fix"]
},
"dependencies": {
"@blitzjs/auth": "latest",
"@blitzjs/config": "latest",
"@blitzjs/next": "latest",
"@blitzjs/rpc": "latest",
"@hookform/resolvers": "2.8.8",
"@blitzjs/auth": "alpha",
"@blitzjs/next": "alpha",
"@blitzjs/rpc": "alpha",
"@prisma/client": "3.9.0",
"blitz": "latest",
"blitz": "alpha",
"next": "12.1.1",
"prisma": "3.9.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"ts-node": "10.7.0",
"zod": "3.10.1"
},
"devDependencies": {

View File

@@ -22,18 +22,15 @@
"*.{js,ts,tsx}": ["eslint --fix"]
},
"dependencies": {
"@blitzjs/auth": "latest",
"@blitzjs/config": "latest",
"@blitzjs/next": "latest",
"@blitzjs/rpc": "latest",
"@hookform/resolvers": "2.8.8",
"@blitzjs/auth": "alpha",
"@blitzjs/next": "alpha",
"@blitzjs/rpc": "alpha",
"@prisma/client": "3.9.0",
"blitz": "latest",
"blitz": "alpha",
"next": "12.1.1",
"prisma": "3.9.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"ts-node": "10.7.0",
"zod": "3.10.1"
},
"devDependencies": {

View File

@@ -37,12 +37,12 @@ const UserInfo = () => {
} else {
return (
<>
<Link href="/auth/signup" passHref>
<Link href="/auth/signup">
<a className="button small">
<strong>Sign Up</strong>
</a>
</Link>
<Link href="/auth/login" passHref>
<Link href="/auth/login">
<a className="button small">
<strong>Login</strong>
</a>

View File

@@ -20,5 +20,5 @@
"tsBuildInfoFile": ".tsbuildinfo"
},
"exclude": ["node_modules", "**/*.e2e.ts", "cypress"],
"include": ["blitz-env.d.ts", "**/*.ts", "**/*.tsx"]
"include": ["blitz-env.d.ts", "**/*.ts", "**/*.tsx", "types"]
}

View File

@@ -0,0 +1,15 @@
import { SimpleRolesIsAuthorized } from "@blitzjs/auth"
import { User } from "db"
export type Role = "ADMIN" | "USER"
declare module "@blitzjs/auth" {
export interface Session {
isAuthorized: SimpleRolesIsAuthorized<Role>
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -1,7 +1,5 @@
import {setupClient} from "@blitzjs/next"
import {setupBlitzClient} from "@blitzjs/next"
const {withBlitz} = setupClient({
export const {withBlitz} = setupBlitzClient({
plugins: []
})
export {withBlitz}

View File

@@ -18,9 +18,8 @@
"*.{js}": ["eslint --fix"]
},
"dependencies": {
"@blitzjs/config": "latest",
"@blitzjs/next": "latest",
"blitz": "latest",
"@blitzjs/next": "alpha",
"blitz": "alpha",
"next": "12.1.1",
"react": "18.0.0",
"react-dom": "18.0.0",

View File

@@ -20,9 +20,8 @@
]
},
"dependencies": {
"@blitzjs/config": "latest",
"@blitzjs/next": "latest",
"blitz": "latest",
"@blitzjs/next": "alpha",
"blitz": "alpha",
"next": "12.1.1",
"react": "18.0.0",
"react-dom": "18.0.0",

View File

@@ -1,5 +1,5 @@
import {Ctx} from "blitz"
import { prisma } from "db"
import { db } from "db"
import {z} from "zod"
if (process.env.parentModel) {
@@ -18,7 +18,7 @@ export default async function Create__ModelName__(input, ctx: Ctx) {
ctx.session.$isAuthorized()
// TODO: in multi-tenant app, you must add validation to ensure correct tenant
const __modelName__ = await prisma.__modelName__.create({data: input})
const __modelName__ = await db.__modelName__.create({data: input})
return __modelName__

View File

@@ -1,5 +1,5 @@
import {Ctx} from "blitz"
import { prisma } from "db"
import { db } from "db"
import {z} from "zod"
const Delete__ModelName__Input = z.object({
@@ -11,7 +11,7 @@ export default async function Delete__ModelName__(input, ctx: Ctx) {
ctx.session.$isAuthorized()
// TODO: in multi-tenant app, you must add validation to ensure correct tenant
const __modelName__ = await prisma.__modelName__.deleteMany({where: {id: input.id}})
const __modelName__ = await db.__modelName__.deleteMany({where: {id: input.id}})
return __modelName__

View File

@@ -1,5 +1,4 @@
import {resolver} from "blitz"
import { prisma } from "db"
import { db } from "db"
import {z} from "zod"
const Update__ModelName__Input = z.object({
@@ -12,7 +11,7 @@ export default async function Update__ModelName__(input, ctx: Ctx) {
ctx.session.$isAuthorized()
// TODO: in multi-tenant app, you must add validation to ensure correct tenant
const __modelName__ = await prisma.__modelName__.update({where: {id: input.id}, input})
const __modelName__ = await db.__modelName__.update({where: {id: input.id}, input})
return __modelName__

View File

@@ -1,5 +1,5 @@
import {Ctx, NotFoundError} from "blitz"
import { prisma } from "db"
import { db } from "db"
import {z} from "zod"
const Get__ModelName__Input = z.object({
@@ -12,7 +12,7 @@ export default async function Get__ModelName__(input, ctx: Ctx) {
ctx.session.$isAuthorized()
// TODO: in multi-tenant app, you must add validation to ensure correct tenant
const __modelName__ = await prisma.__modelName__.findFirst({where: {id: input.id}})
const __modelName__ = await db.__modelName__.findFirst({where: {id: input.id}})
if (!__modelName__) throw new NotFoundError()

View File

@@ -1,5 +1,5 @@
import {paginate, Ctx} from "blitz"
import { prisma } from "db"
import { db } from "db"
import { Prisma } from "@prisma/client"
interface Get__ModelNames__Input
@@ -12,8 +12,8 @@ export default async function Get__ModelNames(input: Get__ModelNames__Input, ctx
const {items: __modelNames__, hasMore, nextPage, count} = await paginate({
skip: input.skip,
take: input.take,
count: () => prisma.__modelName__.count({where: input.where}),
query: (paginateArgs) => prisma.__modelName__.findMany({...paginateArgs, where: input.where, orderBy: input.orderBy}),
count: () => db.__modelName__.count({where: input.where}),
query: (paginateArgs) => db.__modelName__.findMany({...paginateArgs, where: input.where, orderBy: input.orderBy}),
})
return {

View File

@@ -1,7 +1,10 @@
{
"extends": "@blitzjs/config/tsconfig.library.json",
"compilerOptions": {
"lib": ["ES2019"]
"lib": ["ES2019"],
"declaration": true,
"baseUrl": ".",
"preserveSymlinks": true
},
"include": ["."],
"exclude": ["dist", "build", "node_modules", "./templates/**"]

View File

@@ -25,7 +25,7 @@
"@typescript-eslint/parser": "5.9.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:*",
"@blitzjs/config": "2.0.0-alpha.5",
"@types/react": "17.0.43",
"@types/react-dom": "17.0.14",
"react": "18.0.0",

408
pnpm-lock.yaml generated
View File

@@ -50,7 +50,7 @@ importers:
"@types/node": 17.0.16
"@types/preview-email": 2.0.1
"@types/react": 17.0.43
blitz: "workspace: *"
blitz: workspace:2.0.0-alpha.5
eslint: 7.32.0
husky: 7.0.4
jest: 27.5.1
@@ -64,6 +64,7 @@ importers:
react: 18.0.0
react-dom: 18.0.0
react-hook-form: 7.29.0
styled-jsx: 5.0.2
ts-node: 10.7.0
typescript: ^4.5.3
zod: 3.10.1
@@ -80,6 +81,7 @@ importers:
react: 18.0.0
react-dom: 18.0.0_react@18.0.0
react-hook-form: 7.29.0_react@18.0.0
styled-jsx: 5.0.2_react@18.0.0
ts-node: 10.7.0_2dcdb8fdc9a6e6d9aaf2aac9443a7c28
zod: 3.10.1
devDependencies:
@@ -263,8 +265,8 @@ importers:
packages/blitz:
specifiers:
"@blitzjs/config": workspace:*
"@blitzjs/generator": workspace:*
"@blitzjs/config": 2.0.0-alpha.5
"@blitzjs/generator": 2.0.0-alpha.5
"@types/cookie": 0.4.1
"@types/cross-spawn": 6.0.2
"@types/debug": 4.1.7
@@ -352,7 +354,7 @@ importers:
packages/blitz-auth:
specifiers:
"@blitzjs/config": workspace:*
"@blitzjs/config": 2.0.0-alpha.5
"@testing-library/react": 13.0.0
"@testing-library/react-hooks": 7.0.2
"@types/b64-lite": 1.3.0
@@ -364,7 +366,7 @@ importers:
"@types/secure-password": 3.1.1
b64-lite: 1.4.0
bad-behavior: 1.0.1
blitz: workspace:*
blitz: 2.0.0-alpha.5
cookie: 0.4.1
debug: 4.3.3
http: 0.0.1-security
@@ -409,8 +411,8 @@ importers:
packages/blitz-next:
specifiers:
"@blitzjs/config": workspace:*
"@blitzjs/rpc": 2.0.0-alpha.4
"@blitzjs/config": 2.0.0-alpha.5
"@blitzjs/rpc": 2.0.0-alpha.5
"@testing-library/dom": 8.13.0
"@testing-library/jest-dom": 5.16.3
"@testing-library/react": 13.0.0
@@ -421,7 +423,7 @@ importers:
"@types/react": 17.0.43
"@types/react-dom": 17.0.14
"@types/testing-library__react-hooks": 4.0.0
blitz: workspace:*
blitz: 2.0.0-alpha.5
debug: 4.3.3
fs-extra: 10.0.1
lodash.frompairs: 4.0.1
@@ -462,14 +464,14 @@ importers:
packages/blitz-rpc:
specifiers:
"@blitzjs/auth": 2.0.0-alpha.4
"@blitzjs/config": workspace:*
"@blitzjs/auth": 2.0.0-alpha.5
"@blitzjs/config": 2.0.0-alpha.5
"@types/debug": 4.1.7
"@types/react": 17.0.43
"@types/react-dom": 17.0.14
b64-lite: 1.4.0
bad-behavior: 1.0.1
blitz: 2.0.0-alpha.4
blitz: 2.0.0-alpha.5
chalk: ^4.1.0
debug: 4.3.3
next: 12.1.1
@@ -480,6 +482,7 @@ importers:
typescript: ^4.5.3
unbuild: 0.6.9
watch: 1.0.2
zod: 3.10.1
dependencies:
"@blitzjs/auth": link:../blitz-auth
b64-lite: 1.4.0
@@ -488,6 +491,7 @@ importers:
debug: 4.3.3
react-query: 3.21.1_react-dom@18.0.0+react@18.0.0
superjson: 1.8.0
zod: 3.10.1
devDependencies:
"@blitzjs/config": link:../config
"@types/debug": 4.1.7
@@ -509,10 +513,10 @@ importers:
eslint-config-prettier: 8.3.0
typescript: ^4.5.3
dependencies:
"@typescript-eslint/eslint-plugin": 5.9.1_8d4b52c6a654d64d1d8b695e9b6b2fe5
"@typescript-eslint/parser": 5.9.1_eslint@7.32.0+typescript@4.6.3
eslint-config-next: 12.0.7_f066dc8242e0fb1833636efd615b2015
eslint-config-prettier: 8.3.0_eslint@7.32.0
"@typescript-eslint/eslint-plugin": 5.9.1_ceaf00bd57d7914f6a37d6473774bd86
"@typescript-eslint/parser": 5.9.1_typescript@4.6.3
eslint-config-next: 12.0.7_typescript@4.6.3
eslint-config-prettier: 8.3.0
devDependencies:
typescript: 4.6.3
@@ -522,7 +526,7 @@ importers:
"@babel/plugin-transform-typescript": 7.12.1
"@babel/preset-env": 7.12.10
"@babel/types": 7.12.10
"@blitzjs/config": workspace:*
"@blitzjs/config": 2.0.0-alpha.5
"@juanm04/cpx": 2.0.1
"@mrleebo/prisma-ast": 0.2.6
"@types/babel__core": 7.1.19
@@ -613,7 +617,7 @@ importers:
packages/pkg-template:
specifiers:
"@blitzjs/config": workspace:*
"@blitzjs/config": 2.0.0-alpha.5
"@types/react": 17.0.43
"@types/react-dom": 17.0.14
"@typescript-eslint/eslint-plugin": 5.9.1
@@ -623,8 +627,8 @@ importers:
unbuild: 0.6.9
watch: 1.0.2
dependencies:
"@typescript-eslint/eslint-plugin": 5.9.1_8d4b52c6a654d64d1d8b695e9b6b2fe5
"@typescript-eslint/parser": 5.9.1_eslint@7.32.0+typescript@4.6.3
"@typescript-eslint/eslint-plugin": 5.9.1_ceaf00bd57d7914f6a37d6473774bd86
"@typescript-eslint/parser": 5.9.1_typescript@4.6.3
devDependencies:
"@blitzjs/config": link:../config
"@types/react": 17.0.43
@@ -642,7 +646,7 @@ packages:
}
engines: {node: ">=6.0.0"}
dependencies:
"@jridgewell/trace-mapping": 0.3.4
"@jridgewell/trace-mapping": 0.3.8
/@babel/code-frame/7.12.11:
resolution:
@@ -2198,7 +2202,7 @@ packages:
"@babel/plugin-transform-unicode-regex": 7.16.7_@babel+core@7.12.10
"@babel/preset-modules": 0.1.5_@babel+core@7.12.10
"@babel/types": 7.12.10
core-js-compat: 3.22.0
core-js-compat: 3.22.1
semver: 5.7.1
transitivePeerDependencies:
- supports-color
@@ -2276,7 +2280,7 @@ packages:
}
engines: {node: ">=6.9.0"}
dependencies:
core-js-pure: 3.22.0
core-js-pure: 3.22.1
regenerator-runtime: 0.13.9
dev: false
@@ -2849,7 +2853,7 @@ packages:
glob: 7.2.0
graceful-fs: 4.2.10
istanbul-lib-coverage: 3.2.0
istanbul-lib-instrument: 5.1.0
istanbul-lib-instrument: 5.2.0
istanbul-lib-report: 3.0.0
istanbul-lib-source-maps: 4.0.1
istanbul-reports: 3.1.4
@@ -2953,10 +2957,10 @@ packages:
integrity: sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==,
}
/@jridgewell/trace-mapping/0.3.4:
/@jridgewell/trace-mapping/0.3.8:
resolution:
{
integrity: sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==,
integrity: sha512-zdpaWDz5IEyHlu1EO+B+qRHmJkSxMVV6SXngDry9n1ZqslLXFH9Dw6lRqDidm/sOJAWdRltJsmZ1SK28/uZKsw==,
}
dependencies:
"@jridgewell/resolve-uri": 3.0.5
@@ -3272,7 +3276,7 @@ packages:
integrity: sha512-r3eqcIkyLMLGXMAO5anxDUlDjkJQLJ9WfVyBzaPDQICNw+506MWx3J3jllGSPEqifch17NLNEckfb9ox5gn7tA==,
}
/@rollup/plugin-alias/3.1.9_rollup@2.70.1:
/@rollup/plugin-alias/3.1.9_rollup@2.70.2:
resolution:
{
integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==,
@@ -3281,30 +3285,30 @@ packages:
peerDependencies:
rollup: ^1.20.0||^2.0.0
dependencies:
rollup: 2.70.1
rollup: 2.70.2
slash: 3.0.0
dev: true
/@rollup/plugin-commonjs/21.0.3_rollup@2.70.1:
/@rollup/plugin-commonjs/21.1.0_rollup@2.70.2:
resolution:
{
integrity: sha512-ThGfwyvcLc6cfP/MWxA5ACF+LZCvsuhUq7V5134Az1oQWsiC7lNpLT4mJI86WQunK7BYmpUiHmMk2Op6OAHs0g==,
integrity: sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==,
}
engines: {node: ">= 8.0.0"}
peerDependencies:
rollup: ^2.38.3
dependencies:
"@rollup/pluginutils": 3.1.0_rollup@2.70.1
"@rollup/pluginutils": 3.1.0_rollup@2.70.2
commondir: 1.0.1
estree-walker: 2.0.2
glob: 7.2.0
is-reference: 1.2.1
magic-string: 0.25.9
resolve: 1.22.0
rollup: 2.70.1
rollup: 2.70.2
dev: true
/@rollup/plugin-json/4.1.0_rollup@2.70.1:
/@rollup/plugin-json/4.1.0_rollup@2.70.2:
resolution:
{
integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==,
@@ -3312,29 +3316,29 @@ packages:
peerDependencies:
rollup: ^1.20.0 || ^2.0.0
dependencies:
"@rollup/pluginutils": 3.1.0_rollup@2.70.1
rollup: 2.70.1
"@rollup/pluginutils": 3.1.0_rollup@2.70.2
rollup: 2.70.2
dev: true
/@rollup/plugin-node-resolve/13.2.0_rollup@2.70.1:
/@rollup/plugin-node-resolve/13.2.1_rollup@2.70.2:
resolution:
{
integrity: sha512-GuUIUyIKq7EjQxB51XSn6zPHYo+cILQQBYOGYvFFNxws2OVOqCBShAoof2hFrV8bAZzZGDBDQ8m2iUt8SLOUkg==,
integrity: sha512-btX7kzGvp1JwShQI9V6IM841YKNPYjKCvUbNrQ2EcVYbULtUd/GH6wZ/qdqH13j9pOHBER+EZXNN2L8RSJhVRA==,
}
engines: {node: ">= 10.0.0"}
peerDependencies:
rollup: ^2.42.0
dependencies:
"@rollup/pluginutils": 3.1.0_rollup@2.70.1
"@rollup/pluginutils": 3.1.0_rollup@2.70.2
"@types/resolve": 1.17.1
builtin-modules: 3.2.0
deepmerge: 4.2.2
is-module: 1.0.0
resolve: 1.22.0
rollup: 2.70.1
rollup: 2.70.2
dev: true
/@rollup/plugin-replace/3.1.0_rollup@2.70.1:
/@rollup/plugin-replace/3.1.0_rollup@2.70.2:
resolution:
{
integrity: sha512-pA3XRUrSKybVYqmH5TqWNZpGxF+VV+1GrYchKgCNIj2vsSOX7CVm2RCtx8p2nrC7xvkziYyK+lSi74T93MU3YA==,
@@ -3342,12 +3346,12 @@ packages:
peerDependencies:
rollup: ^1.20.0 || ^2.0.0
dependencies:
"@rollup/pluginutils": 3.1.0_rollup@2.70.1
"@rollup/pluginutils": 3.1.0_rollup@2.70.2
magic-string: 0.25.9
rollup: 2.70.1
rollup: 2.70.2
dev: true
/@rollup/pluginutils/3.1.0_rollup@2.70.1:
/@rollup/pluginutils/3.1.0_rollup@2.70.2:
resolution:
{
integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==,
@@ -3359,7 +3363,7 @@ packages:
"@types/estree": 0.0.39
estree-walker: 1.0.1
picomatch: 2.3.1
rollup: 2.70.1
rollup: 2.70.2
dev: true
/@rollup/pluginutils/4.2.1:
@@ -3924,13 +3928,13 @@ packages:
integrity: sha512-rwCUf4NMKhXpiVjL/RXP8YOk+rd02/J4tACADEgaMXRVnzDbSSlBMKFZoX/ARmHVLg3Qc98Um4PErGv8FbxU7w==,
}
dependencies:
"@types/lodash": 4.14.181
"@types/lodash": 4.14.182
dev: true
/@types/lodash/4.14.181:
/@types/lodash/4.14.182:
resolution:
{
integrity: sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag==,
integrity: sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==,
}
dev: true
@@ -4297,6 +4301,36 @@ packages:
typescript: 4.6.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/eslint-plugin/5.9.1_ceaf00bd57d7914f6a37d6473774bd86:
resolution:
{
integrity: sha512-Xv9tkFlyD4MQGpJgTo6wqDqGvHIRmRgah/2Sjz1PUnJTawjHWIwBivUE9x0QtU2WVii9baYgavo/bHjrZJkqTw==,
}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
"@typescript-eslint/parser": ^5.0.0
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: "*"
peerDependenciesMeta:
typescript:
optional: true
dependencies:
"@typescript-eslint/experimental-utils": 5.9.1_typescript@4.6.3
"@typescript-eslint/parser": 5.9.1_typescript@4.6.3
"@typescript-eslint/scope-manager": 5.9.1
"@typescript-eslint/type-utils": 5.9.1_typescript@4.6.3
debug: 4.3.4
functional-red-black-tree: 1.0.1
ignore: 5.2.0
regexpp: 3.2.0
semver: 7.3.7
tsutils: 3.21.0_typescript@4.6.3
typescript: 4.6.3
transitivePeerDependencies:
- supports-color
dev: false
/@typescript-eslint/experimental-utils/5.9.1_eslint@7.32.0+typescript@4.6.3:
resolution:
@@ -4317,6 +4351,27 @@ packages:
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/@typescript-eslint/experimental-utils/5.9.1_typescript@4.6.3:
resolution:
{
integrity: sha512-cb1Njyss0mLL9kLXgS/eEY53SZQ9sT519wpX3i+U457l2UXRDuo87hgKfgRazmu9/tQb0x2sr3Y0yrU+Zz0y+w==,
}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
"@types/json-schema": 7.0.11
"@typescript-eslint/scope-manager": 5.9.1
"@typescript-eslint/types": 5.9.1
"@typescript-eslint/typescript-estree": 5.9.1_typescript@4.6.3
eslint-scope: 5.1.1
eslint-utils: 3.0.0
transitivePeerDependencies:
- supports-color
- typescript
dev: false
/@typescript-eslint/parser/5.9.1_eslint@7.32.0+typescript@4.6.3:
resolution:
@@ -4339,6 +4394,29 @@ packages:
typescript: 4.6.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/parser/5.9.1_typescript@4.6.3:
resolution:
{
integrity: sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g==,
}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
typescript: "*"
peerDependenciesMeta:
typescript:
optional: true
dependencies:
"@typescript-eslint/scope-manager": 5.9.1
"@typescript-eslint/types": 5.9.1
"@typescript-eslint/typescript-estree": 5.9.1_typescript@4.6.3
debug: 4.3.4
typescript: 4.6.3
transitivePeerDependencies:
- supports-color
dev: false
/@typescript-eslint/scope-manager/5.9.1:
resolution:
@@ -4370,6 +4448,28 @@ packages:
typescript: 4.6.3
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/type-utils/5.9.1_typescript@4.6.3:
resolution:
{
integrity: sha512-tRSpdBnPRssjlUh35rE9ug5HrUvaB9ntREy7gPXXKwmIx61TNN7+l5YKgi1hMKxo5NvqZCfYhA5FvyuJG6X6vg==,
}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: "*"
typescript: "*"
peerDependenciesMeta:
typescript:
optional: true
dependencies:
"@typescript-eslint/experimental-utils": 5.9.1_typescript@4.6.3
debug: 4.3.4
tsutils: 3.21.0_typescript@4.6.3
typescript: 4.6.3
transitivePeerDependencies:
- supports-color
dev: false
/@typescript-eslint/types/5.9.1:
resolution:
@@ -4418,10 +4518,10 @@ packages:
}
dev: false
/abab/2.0.5:
/abab/2.0.6:
resolution:
{
integrity: sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==,
integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==,
}
/accepts/1.3.8:
@@ -4805,14 +4905,17 @@ packages:
}
engines: {node: ">=8"}
/async/0.9.2:
resolution: {integrity: sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=}
dev: false
/async/1.5.2:
resolution: {integrity: sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=}
dev: false
/async/3.2.3:
resolution:
{
integrity: sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==,
}
dev: false
/asynckit/0.4.0:
resolution: {integrity: sha1-x57Zf380y48robyXkLzDZkdLS3k=}
@@ -4928,7 +5031,7 @@ packages:
"@babel/helper-plugin-utils": 7.16.7
"@istanbuljs/load-nyc-config": 1.1.0
"@istanbuljs/schema": 0.1.3
istanbul-lib-instrument: 5.1.0
istanbul-lib-instrument: 5.2.0
test-exclude: 6.0.0
transitivePeerDependencies:
- supports-color
@@ -5112,6 +5215,15 @@ packages:
balanced-match: 1.0.2
concat-map: 0.0.1
/brace-expansion/2.0.1:
resolution:
{
integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==,
}
dependencies:
balanced-match: 1.0.2
dev: false
/braces/2.3.2:
resolution:
{
@@ -5180,7 +5292,7 @@ packages:
hasBin: true
dependencies:
caniuse-lite: 1.0.30001332
electron-to-chromium: 1.4.109
electron-to-chromium: 1.4.114
escalade: 3.1.1
node-releases: 2.0.3
picocolors: 1.0.0
@@ -5810,20 +5922,20 @@ packages:
engines: {node: ">=0.10.0"}
dev: false
/core-js-compat/3.22.0:
/core-js-compat/3.22.1:
resolution:
{
integrity: sha512-WwA7xbfRGrk8BGaaHlakauVXrlYmAIkk8PNGb1FDQS+Rbrewc3pgFfwJFRw6psmJVAll7Px9UHRYE16oRQnwAQ==,
integrity: sha512-CWbNqTluLMvZg1cjsQUbGiCM91dobSHKfDIyCoxuqxthdjGuUlaMbCsSehP3CBiVvG0C7P6UIrC1v0hgFE75jw==,
}
dependencies:
browserslist: 4.20.2
semver: 7.0.0
dev: false
/core-js-pure/3.22.0:
/core-js-pure/3.22.1:
resolution:
{
integrity: sha512-ylOC9nVy0ak1N+fPIZj00umoZHgUVqmucklP5RT5N+vJof38klKn8Ze6KGyvchdClvEBr6LcQqJpI216LUMqYA==,
integrity: sha512-TChjCtgcMDc8t12RiwAsThjqrS/VpBlEvDgL009ot4HESzBo3h2FSZNa6ZS1nWKZEPDoulnszxUll9n0/spflQ==,
}
requiresBuild: true
dev: false
@@ -5980,7 +6092,7 @@ packages:
}
engines: {node: ">=10"}
dependencies:
abab: 2.0.5
abab: 2.0.6
whatwg-mimetype: 2.3.0
whatwg-url: 8.7.0
@@ -5991,7 +6103,7 @@ packages:
}
engines: {node: ">=12"}
dependencies:
abab: 2.0.5
abab: 2.0.6
whatwg-mimetype: 3.0.0
whatwg-url: 10.0.0
dev: false
@@ -6467,21 +6579,21 @@ packages:
resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=}
dev: true
/ejs/3.1.6:
/ejs/3.1.7:
resolution:
{
integrity: sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==,
integrity: sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==,
}
engines: {node: ">=0.10.0"}
hasBin: true
dependencies:
jake: 10.8.4
jake: 10.8.5
dev: false
/electron-to-chromium/1.4.109:
/electron-to-chromium/1.4.114:
resolution:
{
integrity: sha512-LCF+Oqs2Oqwf8M3oc8T59Wi9C0xpL1qVyqIR6bPTCl8uPvln7G184L39tO4SE4Dyg/Kp1RjAz//BKMvi0uvw4w==,
integrity: sha512-gRwLpVYWHGbERPU6o8pKfR168V6enWEXzZc6zQNNXbgJ7UJna+9qzAIHY94+9KOv71D/CH+QebLA9pChD2q8zA==,
}
/emittery/0.8.1:
@@ -7383,7 +7495,7 @@ packages:
optionalDependencies:
source-map: 0.6.1
/eslint-config-next/12.0.7_f066dc8242e0fb1833636efd615b2015:
/eslint-config-next/12.0.7_typescript@4.6.3:
resolution:
{
integrity: sha512-kWOaym5qjyzR190zFKkZMaHetmiRORmzJiKML7Kr9CL213S6SwkrHHCEL58TRdpx0NA+HzrsFR9zgcV2pvV2Yg==,
@@ -7398,21 +7510,19 @@ packages:
dependencies:
"@next/eslint-plugin-next": 12.0.7
"@rushstack/eslint-patch": 1.1.3
"@typescript-eslint/parser": 5.9.1_eslint@7.32.0+typescript@4.6.3
eslint: 7.32.0
"@typescript-eslint/parser": 5.9.1_typescript@4.6.3
eslint-import-resolver-node: 0.3.6
eslint-import-resolver-typescript: 2.7.1_3bd94fa9be989baab6ef2e6b5dec3766
eslint-plugin-import: 2.26.0_eslint@7.32.0
eslint-plugin-jsx-a11y: 6.5.1_eslint@7.32.0
eslint-plugin-react: 7.29.4_eslint@7.32.0
eslint-plugin-react-hooks: 4.4.0_eslint@7.32.0
next: 12.1.1
eslint-import-resolver-typescript: 2.7.1_eslint-plugin-import@2.26.0
eslint-plugin-import: 2.26.0
eslint-plugin-jsx-a11y: 6.5.1
eslint-plugin-react: 7.29.4
eslint-plugin-react-hooks: 4.4.0
typescript: 4.6.3
transitivePeerDependencies:
- supports-color
dev: false
/eslint-config-prettier/8.3.0_eslint@7.32.0:
/eslint-config-prettier/8.3.0:
resolution:
{
integrity: sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==,
@@ -7420,8 +7530,6 @@ packages:
hasBin: true
peerDependencies:
eslint: ">=7.0.0"
dependencies:
eslint: 7.32.0
dev: false
/eslint-import-resolver-node/0.3.6:
@@ -7434,7 +7542,7 @@ packages:
resolve: 1.22.0
dev: false
/eslint-import-resolver-typescript/2.7.1_3bd94fa9be989baab6ef2e6b5dec3766:
/eslint-import-resolver-typescript/2.7.1_eslint-plugin-import@2.26.0:
resolution:
{
integrity: sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==,
@@ -7445,8 +7553,7 @@ packages:
eslint-plugin-import: "*"
dependencies:
debug: 4.3.4
eslint: 7.32.0
eslint-plugin-import: 2.26.0_eslint@7.32.0
eslint-plugin-import: 2.26.0
glob: 7.2.0
is-glob: 4.0.3
resolve: 1.22.0
@@ -7466,7 +7573,7 @@ packages:
find-up: 2.1.0
dev: false
/eslint-plugin-import/2.26.0_eslint@7.32.0:
/eslint-plugin-import/2.26.0:
resolution:
{
integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==,
@@ -7479,7 +7586,6 @@ packages:
array.prototype.flat: 1.3.0
debug: 2.6.9
doctrine: 2.1.0
eslint: 7.32.0
eslint-import-resolver-node: 0.3.6
eslint-module-utils: 2.7.3
has: 1.0.3
@@ -7491,7 +7597,7 @@ packages:
tsconfig-paths: 3.14.1
dev: false
/eslint-plugin-jsx-a11y/6.5.1_eslint@7.32.0:
/eslint-plugin-jsx-a11y/6.5.1:
resolution:
{
integrity: sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==,
@@ -7508,14 +7614,13 @@ packages:
axobject-query: 2.2.0
damerau-levenshtein: 1.0.8
emoji-regex: 9.2.2
eslint: 7.32.0
has: 1.0.3
jsx-ast-utils: 3.2.2
language-tags: 1.0.5
minimatch: 3.1.2
dev: false
/eslint-plugin-react-hooks/4.4.0_eslint@7.32.0:
/eslint-plugin-react-hooks/4.4.0:
resolution:
{
integrity: sha512-U3RVIfdzJaeKDQKEJbz5p3NW8/L80PCATJAfuojwbaEL+gBjfGdhUcGde+WGUW46Q5sr/NgxevsIiDtNXrvZaQ==,
@@ -7523,11 +7628,9 @@ packages:
engines: {node: ">=10"}
peerDependencies:
eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
dependencies:
eslint: 7.32.0
dev: false
/eslint-plugin-react/7.29.4_eslint@7.32.0:
/eslint-plugin-react/7.29.4:
resolution:
{
integrity: sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==,
@@ -7539,7 +7642,6 @@ packages:
array-includes: 3.1.4
array.prototype.flatmap: 1.3.0
doctrine: 2.1.0
eslint: 7.32.0
estraverse: 5.3.0
jsx-ast-utils: 3.2.2
minimatch: 3.1.2
@@ -7572,6 +7674,18 @@ packages:
dependencies:
eslint-visitor-keys: 1.3.0
/eslint-utils/3.0.0:
resolution:
{
integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==,
}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
peerDependencies:
eslint: ">=5"
dependencies:
eslint-visitor-keys: 2.1.0
dev: false
/eslint-utils/3.0.0_eslint@7.32.0:
resolution:
{
@@ -7583,6 +7697,7 @@ packages:
dependencies:
eslint: 7.32.0
eslint-visitor-keys: 2.1.0
dev: true
/eslint-visitor-keys/1.3.0:
resolution:
@@ -8013,13 +8128,13 @@ packages:
dependencies:
flat-cache: 3.0.4
/filelist/1.0.2:
/filelist/1.0.3:
resolution:
{
integrity: sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ==,
integrity: sha512-LwjCsruLWQULGYKy7TX0OPtrL9kLpojOFKc5VCTxdFTV7w5zbsgqVKfnkKG7Qgjtq50gKfO56hJv88OfcGb70Q==,
}
dependencies:
minimatch: 3.1.2
minimatch: 5.0.1
dev: false
/fill-range/4.0.0:
@@ -8301,10 +8416,10 @@ packages:
/functional-red-black-tree/1.0.1:
resolution: {integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=}
/functions-have-names/1.2.2:
/functions-have-names/1.2.3:
resolution:
{
integrity: sha512-bLgc3asbWdwPbx2mNk2S49kmJCuQeu0nfmaOgbs8WIyzzkw3r4htszdIi9Q9EMezDPTYuJx2wvjZ/EwgAthpnA==,
integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==,
}
dev: false
@@ -8577,10 +8692,10 @@ packages:
engines: {node: ">=6"}
dev: false
/has-bigints/1.0.1:
/has-bigints/1.0.2:
resolution:
{
integrity: sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==,
integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==,
}
dev: false
@@ -9011,7 +9126,7 @@ packages:
integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==,
}
dependencies:
has-bigints: 1.0.1
has-bigints: 1.0.2
dev: false
/is-boolean-object/1.1.2:
@@ -9444,10 +9559,10 @@ packages:
}
engines: {node: ">=8"}
/istanbul-lib-instrument/5.1.0:
/istanbul-lib-instrument/5.2.0:
resolution:
{
integrity: sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==,
integrity: sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==,
}
engines: {node: ">=8"}
dependencies:
@@ -9493,17 +9608,17 @@ packages:
html-escaper: 2.0.2
istanbul-lib-report: 3.0.0
/jake/10.8.4:
/jake/10.8.5:
resolution:
{
integrity: sha512-MtWeTkl1qGsWUtbl/Jsca/8xSoK3x0UmS82sNbjqxxG/de/M/3b1DntdjHgPMC50enlTNwXOCRqPXLLt5cCfZA==,
integrity: sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==,
}
engines: {node: ">=10"}
hasBin: true
dependencies:
async: 0.9.2
async: 3.2.3
chalk: 4.1.2
filelist: 1.0.2
filelist: 1.0.3
minimatch: 3.1.2
dev: false
@@ -10133,7 +10248,7 @@ packages:
canvas:
optional: true
dependencies:
abab: 2.0.5
abab: 2.0.6
acorn: 8.7.0
acorn-globals: 6.0.0
cssom: 0.4.4
@@ -10177,7 +10292,7 @@ packages:
canvas:
optional: true
dependencies:
abab: 2.0.5
abab: 2.0.6
acorn: 8.7.0
acorn-globals: 6.0.0
cssom: 0.5.0
@@ -10916,7 +11031,7 @@ packages:
dependencies:
commondir: 1.0.1
deep-extend: 0.6.0
ejs: 3.1.6
ejs: 3.1.7
globby: 11.1.0
isbinaryfile: 4.0.10
multimatch: 5.0.0
@@ -11099,6 +11214,16 @@ packages:
dependencies:
brace-expansion: 1.1.11
/minimatch/5.0.1:
resolution:
{
integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==,
}
engines: {node: ">=10"}
dependencies:
brace-expansion: 2.0.1
dev: false
/minimist-options/4.1.0:
resolution:
{
@@ -11264,10 +11389,10 @@ packages:
hasBin: true
dev: false
/nanoid/3.3.2:
/nanoid/3.3.3:
resolution:
{
integrity: sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA==,
integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==,
}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
@@ -12213,7 +12338,7 @@ packages:
}
engines: {node: ^10 || ^12 || >=14}
dependencies:
nanoid: 3.3.2
nanoid: 3.3.3
picocolors: 1.0.0
source-map-js: 1.0.2
dev: false
@@ -12225,7 +12350,7 @@ packages:
}
engines: {node: ^10 || ^12 || >=14}
dependencies:
nanoid: 3.3.2
nanoid: 3.3.3
picocolors: 1.0.0
source-map-js: 1.0.2
@@ -12888,7 +13013,7 @@ packages:
dependencies:
call-bind: 1.0.2
define-properties: 1.1.4
functions-have-names: 1.2.2
functions-have-names: 1.2.3
dev: false
/regexpp/3.2.0:
@@ -13134,7 +13259,7 @@ packages:
dependencies:
glob: 7.2.0
/rollup-plugin-dts/4.2.1_rollup@2.70.1+typescript@4.6.3:
/rollup-plugin-dts/4.2.1_rollup@2.70.2+typescript@4.6.3:
resolution:
{
integrity: sha512-eaxQZNUJ5iQcxNGlpJ1CUgG4OSVqWjDZ3nNSWBIoGrpcote2aNphSe1RJOaSYkb8dwn3o+rYm1vvld/5z3EGSQ==,
@@ -13145,13 +13270,13 @@ packages:
typescript: ^4.6
dependencies:
magic-string: 0.26.1
rollup: 2.70.1
rollup: 2.70.2
typescript: 4.6.3
optionalDependencies:
"@babel/code-frame": 7.16.7
dev: true
/rollup-plugin-esbuild/4.9.1_esbuild@0.14.36+rollup@2.70.1:
/rollup-plugin-esbuild/4.9.1_esbuild@0.14.36+rollup@2.70.2:
resolution:
{
integrity: sha512-qn/x7Wz9p3Xnva99qcb+nopH0d2VJwVnsxJTGEg+Sh2Z3tqQl33MhOwzekVo1YTKgv+yAmosjcBRJygMfGrtLw==,
@@ -13167,15 +13292,15 @@ packages:
esbuild: 0.14.36
joycon: 3.1.1
jsonc-parser: 3.0.0
rollup: 2.70.1
rollup: 2.70.2
transitivePeerDependencies:
- supports-color
dev: true
/rollup/2.70.1:
/rollup/2.70.2:
resolution:
{
integrity: sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==,
integrity: sha512-EitogNZnfku65I1DD5Mxe8JYRUCy0hkK5X84IlDtUs+O6JRMpRciXTzyCUuX11b5L5pvjH+OmFXiQ3XjabcXgg==,
}
engines: {node: ">=10.0.0"}
hasBin: true
@@ -13967,6 +14092,25 @@ packages:
dependencies:
react: 18.0.0
/styled-jsx/5.0.2_react@18.0.0:
resolution:
{
integrity: sha512-LqPQrbBh3egD57NBcHET4qcgshPks+yblyhPlH2GY8oaDgKs8SK4C3dBh3oSJjgzJ3G5t1SYEZGHkP+QEpX9EQ==,
}
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:
react: 18.0.0
dev: false
/subarg/1.0.0:
resolution: {integrity: sha1-9izxdYHplrSPyWVpn1TAauJouNI=}
dependencies:
@@ -13980,7 +14124,7 @@ packages:
}
engines: {node: ">=10"}
dependencies:
debug: 4.3.4
debug: 4.3.3
lodash.clonedeep: 4.5.0
transitivePeerDependencies:
- supports-color
@@ -14375,7 +14519,7 @@ packages:
diff: 4.0.2
make-error: 1.3.6
typescript: 4.6.3
v8-compile-cache-lib: 3.0.0
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: false
@@ -14408,7 +14552,7 @@ packages:
diff: 4.0.2
make-error: 1.3.6
typescript: 4.6.3
v8-compile-cache-lib: 3.0.0
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: false
@@ -14730,7 +14874,7 @@ packages:
}
dependencies:
function-bind: 1.1.1
has-bigints: 1.0.1
has-bigints: 1.0.2
has-symbols: 1.0.3
which-boxed-primitive: 1.0.2
dev: false
@@ -14742,11 +14886,11 @@ packages:
}
hasBin: true
dependencies:
"@rollup/plugin-alias": 3.1.9_rollup@2.70.1
"@rollup/plugin-commonjs": 21.0.3_rollup@2.70.1
"@rollup/plugin-json": 4.1.0_rollup@2.70.1
"@rollup/plugin-node-resolve": 13.2.0_rollup@2.70.1
"@rollup/plugin-replace": 3.1.0_rollup@2.70.1
"@rollup/plugin-alias": 3.1.9_rollup@2.70.2
"@rollup/plugin-commonjs": 21.1.0_rollup@2.70.2
"@rollup/plugin-json": 4.1.0_rollup@2.70.2
"@rollup/plugin-node-resolve": 13.2.1_rollup@2.70.2
"@rollup/plugin-replace": 3.1.0_rollup@2.70.2
"@rollup/pluginutils": 4.2.1
chalk: 5.0.1
consola: 2.15.3
@@ -14763,9 +14907,9 @@ packages:
pkg-types: 0.3.2
pretty-bytes: 5.6.0
rimraf: 3.0.2
rollup: 2.70.1
rollup-plugin-dts: 4.2.1_rollup@2.70.1+typescript@4.6.3
rollup-plugin-esbuild: 4.9.1_esbuild@0.14.36+rollup@2.70.1
rollup: 2.70.2
rollup-plugin-dts: 4.2.1_rollup@2.70.2+typescript@4.6.3
rollup-plugin-esbuild: 4.9.1_esbuild@0.14.36+rollup@2.70.2
scule: 0.2.1
typescript: 4.6.3
untyped: 0.3.0
@@ -14958,10 +15102,10 @@ packages:
hasBin: true
dev: true
/v8-compile-cache-lib/3.0.0:
/v8-compile-cache-lib/3.0.1:
resolution:
{
integrity: sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==,
integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==,
}
dev: false
@@ -15051,7 +15195,7 @@ packages:
esbuild: 0.14.36
postcss: 8.4.12
resolve: 1.22.0
rollup: 2.70.1
rollup: 2.70.2
optionalDependencies:
fsevents: 2.3.2
dev: false