Compare commits
5 Commits
@blitzjs/a
...
working-to
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef38a4008a | ||
|
|
a9a3167a0f | ||
|
|
64c75087dc | ||
|
|
257b1e8b27 | ||
|
|
2fc9ceeed7 |
@@ -1,9 +0,0 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/next": patch
|
||||
"@blitzjs/auth": patch
|
||||
"@blitzjs/rpc": patch
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
fix route manifest codegen
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
fix broken cli versioning
|
||||
@@ -16,14 +16,10 @@
|
||||
"toolkit-app": "1.0.0"
|
||||
},
|
||||
"changesets": [
|
||||
"great-months-train",
|
||||
"lovely-colts-share",
|
||||
"nine-onions-admire",
|
||||
"ninety-pets-heal",
|
||||
"poor-peas-lick",
|
||||
"silent-colts-reply",
|
||||
"ten-rivers-burn",
|
||||
"thirty-countries-build",
|
||||
"twenty-beans-pump"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
added index.cjs to blitz externals
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
add @blitzjs/generator as external
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -62,10 +62,10 @@ examples/auth2
|
||||
.idea
|
||||
.ultra.cache.json
|
||||
db.sqlite-journal
|
||||
**/db/db.sqlite
|
||||
test/integration/**/db.json
|
||||
test/**/*/out
|
||||
test/**/blitz-env.d.ts
|
||||
examples/**/blitz-env.d.ts
|
||||
.blitz**
|
||||
|
||||
*.sqlite
|
||||
|
||||
@@ -174,7 +174,6 @@ Your financial contributions help ensure Blitz continues to be developed and mai
|
||||
<tr>
|
||||
<td align="center"><a href="https://twitter.com/flybayer"><img src="https://avatars3.githubusercontent.com/u/8813276?v=4" width="100px;" alt=""/><br /><sub><b>Brandon Bayer</b></sub></a><br />Creator</td>
|
||||
<td align="center"><a href="http://aleksandra.codes"><img src="https://avatars.githubusercontent.com/u/9019397?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aleksandra Sikora</b></sub></a><br />Lead Maintainer</td>
|
||||
<td align="center"><a href="http://twitter.com/dillonraphael"><img src="https://avatars.githubusercontent.com/u/3496193?v=4" width="100px;" alt=""/><br /><sub><b>Dillon Raphael</b></sub></a><br />Senior Maintainer</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1 +1 @@
|
||||
module.exports = require("@blitzjs/next/eslint")
|
||||
module.exports = require("@blitzjs/config/eslint")
|
||||
|
||||
@@ -1,49 +1,5 @@
|
||||
# toolkit-app
|
||||
|
||||
## 1.0.1-alpha.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.9
|
||||
- @blitzjs/auth@2.0.0-alpha.9
|
||||
- @blitzjs/next@2.0.0-alpha.9
|
||||
- @blitzjs/rpc@2.0.0-alpha.9
|
||||
- @blitzjs/config@2.0.0-alpha.9
|
||||
|
||||
## 1.0.1-alpha.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.8
|
||||
- @blitzjs/auth@2.0.0-alpha.8
|
||||
- @blitzjs/next@2.0.0-alpha.8
|
||||
- @blitzjs/rpc@2.0.0-alpha.8
|
||||
- @blitzjs/config@2.0.0-alpha.8
|
||||
|
||||
## 1.0.1-alpha.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.7
|
||||
- @blitzjs/auth@2.0.0-alpha.7
|
||||
- @blitzjs/next@2.0.0-alpha.7
|
||||
- @blitzjs/rpc@2.0.0-alpha.7
|
||||
- @blitzjs/config@2.0.0-alpha.7
|
||||
|
||||
## 1.0.1-alpha.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @blitzjs/next@2.0.0-alpha.6
|
||||
- blitz@2.0.0-alpha.6
|
||||
- @blitzjs/auth@2.0.0-alpha.6
|
||||
- @blitzjs/rpc@2.0.0-alpha.6
|
||||
- @blitzjs/config@2.0.0-alpha.6
|
||||
|
||||
## 1.0.1-alpha.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NotFoundError } from "blitz"
|
||||
import { db } from "db"
|
||||
import { prisma as db } from "db"
|
||||
import { authenticateUser } from "./login"
|
||||
import { ChangePassword } from "../validations"
|
||||
import { resolver } from "@blitzjs/rpc"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { generateToken, hash256 } from "@blitzjs/auth"
|
||||
import { resolver } from "@blitzjs/rpc"
|
||||
import { db } from "db"
|
||||
import { prisma as db } from "db"
|
||||
import { forgotPasswordMailer } from "mailers/forgotPasswordMailer"
|
||||
import { ForgotPassword } from "../validations"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { SecurePassword } from "@blitzjs/auth"
|
||||
import { resolver } from "@blitzjs/rpc"
|
||||
import { AuthenticationError } from "blitz"
|
||||
import { db } from "db"
|
||||
import { prisma as db, User } from "db"
|
||||
import { Role } from "types"
|
||||
import { Login } from "../validations"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SecurePassword, hash256 } from "@blitzjs/auth"
|
||||
import { db } from "db"
|
||||
import { prisma } 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 db.token.findFirst({
|
||||
const possibleToken = await prisma.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 db.token.delete({ where: { id: savedToken.id } })
|
||||
await prisma.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 db.user.update({
|
||||
const user = await prisma.user.update({
|
||||
where: { id: savedToken.userId },
|
||||
data: { hashedPassword },
|
||||
})
|
||||
|
||||
// 6. Revoke all existing login sessions for this user
|
||||
await db.session.deleteMany({ where: { userId: user.id } })
|
||||
await prisma.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)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { db } from "db"
|
||||
import { prisma } 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 db.user.create({
|
||||
const user = await prisma.user.create({
|
||||
data: { email, hashedPassword, role: "user" },
|
||||
select: { id: true, name: true, email: true, role: true },
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@ import { AuthClientPlugin } from "@blitzjs/auth"
|
||||
import { setupBlitzClient } from "@blitzjs/next"
|
||||
import { BlitzRpcPlugin } from "@blitzjs/rpc"
|
||||
|
||||
export const { withBlitz } = setupBlitzClient({
|
||||
const { withBlitz } = setupBlitzClient({
|
||||
plugins: [
|
||||
AuthClientPlugin({
|
||||
cookiePrefix: "web-cookie-prefix",
|
||||
@@ -16,3 +16,5 @@ export const { withBlitz } = setupBlitzClient({
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
export { withBlitz }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { setupBlitzServer } from "@blitzjs/next"
|
||||
import { AuthServerPlugin, PrismaStorage } from "@blitzjs/auth"
|
||||
import { db } from "db"
|
||||
import { prisma as db } from "../db/index"
|
||||
import { simpleRolesIsAuthorized } from "@blitzjs/auth"
|
||||
|
||||
const { gSSP, gSP, api } = setupBlitzServer({
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Ctx } from "blitz"
|
||||
import { db } from "db"
|
||||
import { prisma } from "db"
|
||||
|
||||
export default async function getCurrentUser(_ = null, { session }: Ctx) {
|
||||
if (!session.userId) return null
|
||||
|
||||
const user = await db.user.findFirst({
|
||||
const user = await prisma.user.findFirst({
|
||||
where: { id: session.userId as number },
|
||||
select: { id: true, name: true, email: true, role: true },
|
||||
})
|
||||
|
||||
@@ -4,5 +4,5 @@ import { PrismaClient } from "@prisma/client"
|
||||
const EnhancedPrisma = enhancePrisma(PrismaClient)
|
||||
|
||||
export * from "@prisma/client"
|
||||
const db = new EnhancedPrisma()
|
||||
export { db }
|
||||
const prisma = new EnhancedPrisma()
|
||||
export { prisma }
|
||||
|
||||
47
apps/toolkit-app/db/migrations/20220426152136_/migration.sql
Normal file
47
apps/toolkit-app/db/migrations/20220426152136_/migration.sql
Normal 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");
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "toolkit-app",
|
||||
"version": "1.0.1-alpha.4",
|
||||
"version": "1.0.1-alpha.0",
|
||||
"scripts": {
|
||||
"start:dev": "pnpm run prisma:start && next dev",
|
||||
"buildapp": "prisma generate && next build",
|
||||
@@ -29,12 +29,13 @@
|
||||
"@blitzjs/rpc": "workspace:*",
|
||||
"@hookform/resolvers": "2.8.8",
|
||||
"@prisma/client": "3.9.0",
|
||||
"blitz": "workspace:2.0.0-alpha.9",
|
||||
"blitz": "workspace:2.0.0-alpha.5",
|
||||
"next": "12.1.1",
|
||||
"prisma": "3.9.0",
|
||||
"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"
|
||||
},
|
||||
|
||||
@@ -1,34 +1,5 @@
|
||||
# @blitzjs/auth
|
||||
|
||||
## 2.0.0-alpha.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.9
|
||||
|
||||
## 2.0.0-alpha.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.8
|
||||
|
||||
## 2.0.0-alpha.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.7
|
||||
|
||||
## 2.0.0-alpha.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix route manifest codegen
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.6
|
||||
|
||||
## 2.0.0-alpha.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/auth",
|
||||
"version": "2.0.0-alpha.9",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts",
|
||||
@@ -24,7 +24,7 @@
|
||||
"@types/secure-password": "3.1.1",
|
||||
"b64-lite": "1.4.0",
|
||||
"bad-behavior": "1.0.1",
|
||||
"blitz": "2.0.0-alpha.9",
|
||||
"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:2.0.0-alpha.9",
|
||||
"@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",
|
||||
|
||||
@@ -1,31 +1,5 @@
|
||||
# @blitzjs/next
|
||||
|
||||
## 2.0.0-alpha.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @blitzjs/rpc@2.0.0-alpha.9
|
||||
|
||||
## 2.0.0-alpha.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @blitzjs/rpc@2.0.0-alpha.8
|
||||
|
||||
## 2.0.0-alpha.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @blitzjs/rpc@2.0.0-alpha.7
|
||||
|
||||
## 2.0.0-alpha.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix route manifest codegen
|
||||
- Updated dependencies
|
||||
- @blitzjs/rpc@2.0.0-alpha.6
|
||||
|
||||
## 2.0.0-alpha.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,7 +2,7 @@ import {BuildConfig} from "unbuild"
|
||||
|
||||
const config: BuildConfig = {
|
||||
entries: ["./src/index-browser", "./src/index-server"],
|
||||
externals: ["index-browser.cjs", "index-browser.mjs", "blitz", ".blitz"],
|
||||
externals: ["index-browser.cjs", "index-browser.mjs", "blitz"],
|
||||
declaration: true,
|
||||
rollup: {
|
||||
emitCJS: true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/next",
|
||||
"version": "2.0.0-alpha.9",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"dev": "pnpm predev && pnpm watch unbuild src --wait=0.2",
|
||||
@@ -8,8 +8,7 @@
|
||||
"lint": "eslint . --fix",
|
||||
"test": "vitest run",
|
||||
"test-watch": "vitest",
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
||||
"postinstall": "node src/scripts/postinstall.js"
|
||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
||||
},
|
||||
"main": "./dist/index-server.cjs",
|
||||
"module": "./dist/index-server.mjs",
|
||||
@@ -22,13 +21,13 @@
|
||||
"eslint.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@blitzjs/rpc": "2.0.0-alpha.9",
|
||||
"@blitzjs/rpc": "2.0.0-alpha.5",
|
||||
"debug": "4.3.3",
|
||||
"fs-extra": "10.0.1",
|
||||
"react-query": "3.21.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:2.0.0-alpha.9",
|
||||
"@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",
|
||||
@@ -39,14 +38,11 @@
|
||||
"@types/react": "17.0.43",
|
||||
"@types/react-dom": "17.0.14",
|
||||
"@types/testing-library__react-hooks": "4.0.0",
|
||||
"blitz": "2.0.0-alpha.9",
|
||||
"cross-spawn": "7.0.3",
|
||||
"find-up": "4.1.0",
|
||||
"blitz": "2.0.0-alpha.5",
|
||||
"lodash.frompairs": "4.0.1",
|
||||
"next": "12.1.1",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"resolve-from": "5.0.0",
|
||||
"ts-jest": "27.1.4",
|
||||
"typescript": "^4.5.3",
|
||||
"unbuild": "0.6.9",
|
||||
|
||||
@@ -13,7 +13,6 @@ import {Hydrate, HydrateOptions} from "react-query/hydration"
|
||||
|
||||
export * from "./error-boundary"
|
||||
export * from "./error-component"
|
||||
export {Routes} from ".blitz"
|
||||
|
||||
const compose =
|
||||
(...rest: BlitzProviderType[]) =>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
exports.Routes = {
|
||||
ThisFileHasNotYetBeenGeneratedPleaseRunBlitzCodeGen: (query) => ({pathname: "⚡️", query}),
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import type {ParsedUrlQueryInput} from "querystring"
|
||||
import type {UrlObject} from "url"
|
||||
|
||||
export const Routes: {
|
||||
ThisFileHasNotYetBeenGeneratedPleaseRunBlitzCodeGen(query?: ParsedUrlQueryInput): UrlObject
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
exports.Routes = {
|
||||
ThisFileHasNotYetBeenGeneratedPleaseRunBlitzCodeGen: (query) => ({pathname: "⚡️", query}),
|
||||
}
|
||||
@@ -1,328 +0,0 @@
|
||||
const childProcess = require("cross-spawn")
|
||||
const {promisify} = require("util")
|
||||
const fs = require("fs")
|
||||
const path = require("path")
|
||||
const resolveFrom = require("resolve-from")
|
||||
const findUp = require("find-up")
|
||||
|
||||
const copyFile = promisify(fs.copyFile)
|
||||
const mkdir = promisify(fs.mkdir)
|
||||
const stat = promisify(fs.stat)
|
||||
|
||||
const debug = require("debug")("blitz:postinstall")
|
||||
|
||||
const isInBlitzMonorepo = fs.existsSync(path.join(__dirname, "../../src"))
|
||||
let isInstalledGlobally = isInBlitzMonorepo ? false : true // default
|
||||
|
||||
try {
|
||||
const maybeGlobalBlitzPath = resolveFrom(__dirname, "blitz")
|
||||
const localBlitzPath = resolveFrom.silent(process.cwd(), "blitz")
|
||||
isInstalledGlobally = maybeGlobalBlitzPath !== localBlitzPath
|
||||
} catch (error) {
|
||||
// noop
|
||||
}
|
||||
|
||||
// todo: we should reuse `findNodeModulesRoot` from /nextjs/packages/next/build/routes.ts
|
||||
async function findNodeModulesRoot(src) {
|
||||
let root
|
||||
if (isInBlitzMonorepo) {
|
||||
root = path.join(src, "node_modules")
|
||||
} else {
|
||||
const blitzPkgLocation = path.dirname(
|
||||
(await findUp("package.json", {
|
||||
cwd: resolveFrom(src, "blitz"),
|
||||
})) || "",
|
||||
)
|
||||
if (!blitzPkgLocation) {
|
||||
throw new Error("Internal Blitz Error: unable to find 'blitz' package location")
|
||||
}
|
||||
|
||||
root = path.join(blitzPkgLocation, "../")
|
||||
}
|
||||
return path.join(root, ".blitz")
|
||||
}
|
||||
|
||||
/*
|
||||
Adapted from https://github.com/prisma/prisma/blob/974cbeff4a7f616137ce540d0ec88a2a86365892/src/packages/client/scripts/postinstall.js
|
||||
*/
|
||||
function codegen() {
|
||||
async function main() {
|
||||
if (process.env.INIT_CWD) {
|
||||
process.chdir(process.env.INIT_CWD) // necessary, because npm chooses __dirname as process.cwd()
|
||||
// in the postinstall hook
|
||||
}
|
||||
await ensureEmptyDotBlitz()
|
||||
|
||||
const localPath = getLocalPackagePath()
|
||||
|
||||
// Only execute if !localpath
|
||||
const installedGlobally = localPath ? undefined : await isInstalledGlobally()
|
||||
|
||||
debug({
|
||||
localPath,
|
||||
installedGlobally,
|
||||
init_cwd: process.env.INIT_CWD,
|
||||
})
|
||||
try {
|
||||
if (localPath) {
|
||||
await run("node", [
|
||||
localPath,
|
||||
"codegen",
|
||||
"--postinstall",
|
||||
doubleQuote(getPostInstallTrigger()),
|
||||
])
|
||||
return
|
||||
}
|
||||
|
||||
if (installedGlobally) {
|
||||
await run("blitz", ["codegen", "--postinstall", doubleQuote(getPostInstallTrigger())])
|
||||
return
|
||||
}
|
||||
} catch (e) {
|
||||
// if exit code = 1 do not print
|
||||
if (e && e !== 1) {
|
||||
console.error(e)
|
||||
}
|
||||
debug(e)
|
||||
}
|
||||
|
||||
if (!localPath && !installedGlobally) {
|
||||
console.error(`Please install Blitz CLI. You can install it with "npm add -D blitz".`)
|
||||
}
|
||||
}
|
||||
|
||||
function getLocalPackagePath() {
|
||||
try {
|
||||
const packagePath = require.resolve("blitz/package.json")
|
||||
if (packagePath) {
|
||||
const blitzPkg = require.resolve("blitz")
|
||||
return path.join(blitzPkg, "/dist/index.cjs")
|
||||
}
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
async function isInstalledGlobally() {
|
||||
try {
|
||||
await run("blitz", ["-v"], process.cwd(), ["ignore"])
|
||||
return true
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if (!process.env.BLITZ_SKIP_POSTINSTALL_GENERATE) {
|
||||
main()
|
||||
.catch((e) => {
|
||||
console.error(e)
|
||||
process.exit(0)
|
||||
})
|
||||
.finally(() => {
|
||||
debug(`postinstall trigger: ${getPostInstallTrigger()}`)
|
||||
})
|
||||
}
|
||||
|
||||
function run(cmd, params, cwd = process.cwd(), stdio = ["pipe", "inherit", "inherit"]) {
|
||||
const child = childProcess.spawn(cmd, params, {
|
||||
stdio,
|
||||
cwd,
|
||||
})
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
child.on("close", () => {
|
||||
resolve()
|
||||
})
|
||||
child.on("exit", (code) => {
|
||||
if (code === 0) {
|
||||
resolve()
|
||||
} else {
|
||||
reject(code)
|
||||
}
|
||||
})
|
||||
child.on("error", () => {
|
||||
reject()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async function ensureEmptyDotBlitz() {
|
||||
try {
|
||||
const dotBlitzDir = isInBlitzMonorepo
|
||||
? path.join(process.cwd(), "node_modules/.blitz")
|
||||
: await findNodeModulesRoot(__dirname)
|
||||
|
||||
await makeDir(dotBlitzDir)
|
||||
const defaultIndexJsPath = path.join(dotBlitzDir, "index.js")
|
||||
const defaultIndexBrowserJSPath = path.join(dotBlitzDir, "index-browser.js")
|
||||
const defaultIndexDTSPath = path.join(dotBlitzDir, "index.d.ts")
|
||||
|
||||
if (!fs.existsSync(defaultIndexJsPath)) {
|
||||
await copyFile(path.join(__dirname, "default-index.js"), defaultIndexJsPath)
|
||||
}
|
||||
if (!fs.existsSync(defaultIndexBrowserJSPath)) {
|
||||
await copyFile(path.join(__dirname, "default-index-browser.js"), defaultIndexBrowserJSPath)
|
||||
}
|
||||
|
||||
if (!fs.existsSync(defaultIndexDTSPath)) {
|
||||
await copyFile(path.join(__dirname, "default-index.d.ts"), defaultIndexDTSPath)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
async function makeDir(input) {
|
||||
const make = async (pth) => {
|
||||
try {
|
||||
await mkdir(pth)
|
||||
|
||||
return pth
|
||||
} catch (error) {
|
||||
if (error.code === "EPERM") {
|
||||
throw error
|
||||
}
|
||||
|
||||
if (error.code === "ENOENT") {
|
||||
if (path.dirname(pth) === pth) {
|
||||
throw new Error(`operation not permitted, mkdir '${pth}'`)
|
||||
}
|
||||
|
||||
if (error.message.includes("null bytes")) {
|
||||
throw error
|
||||
}
|
||||
|
||||
await make(path.dirname(pth))
|
||||
|
||||
return make(pth)
|
||||
}
|
||||
|
||||
try {
|
||||
const stats = await stat(pth)
|
||||
if (!stats.isDirectory()) {
|
||||
throw new Error("The path is not a directory")
|
||||
}
|
||||
} catch (_) {
|
||||
throw error
|
||||
}
|
||||
|
||||
return pth
|
||||
}
|
||||
}
|
||||
|
||||
return await make(path.resolve(input))
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the command that triggered this postinstall script being run. If there is
|
||||
* an error while attempting to get this value then the string constant
|
||||
* 'ERROR_WHILE_FINDING_POSTINSTALL_TRIGGER' is returned.
|
||||
* This information is just necessary for telemetry.
|
||||
* This get's passed in to Generate, which then automatically get's propagated to telemetry.
|
||||
*/
|
||||
function getPostInstallTrigger() {
|
||||
/*
|
||||
npm_config_argv` is not officially documented so here are our (Prisma's) research notes
|
||||
`npm_config_argv` is available to the postinstall script when the containing package has been installed by npm into some project.
|
||||
An example of its value:
|
||||
```
|
||||
npm_config_argv: '{"remain":["../test"],"cooked":["add","../test"],"original":["add","../test"]}',
|
||||
```
|
||||
We are interesting in the data contained in the "original" field.
|
||||
Trivia/Note: `npm_config_argv` is not available when running e.g. `npm install` on the containing package itself (e.g. when working on it)
|
||||
Yarn mimics this data and environment variable. Here is an example following `yarn add` for the same package:
|
||||
```
|
||||
npm_config_argv: '{"remain":[],"cooked":["add"],"original":["add","../test"]}'
|
||||
```
|
||||
Other package managers like `pnpm` have not been tested.
|
||||
*/
|
||||
|
||||
const maybe_npm_config_argv_string = process.env.npm_config_argv
|
||||
|
||||
if (maybe_npm_config_argv_string === undefined) {
|
||||
return UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING
|
||||
}
|
||||
|
||||
let npm_config_argv
|
||||
try {
|
||||
npm_config_argv = JSON.parse(maybe_npm_config_argv_string)
|
||||
} catch (e) {
|
||||
return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR}: ${maybe_npm_config_argv_string}`
|
||||
}
|
||||
|
||||
if (typeof npm_config_argv !== "object" || npm_config_argv === null) {
|
||||
return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}`
|
||||
}
|
||||
|
||||
const npm_config_arv_original_arr = npm_config_argv.original
|
||||
|
||||
if (!Array.isArray(npm_config_arv_original_arr)) {
|
||||
return `${UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR}: ${maybe_npm_config_argv_string}`
|
||||
}
|
||||
|
||||
const npm_config_arv_original = npm_config_arv_original_arr
|
||||
.filter((arg) => arg !== "")
|
||||
.join(" ")
|
||||
|
||||
const command =
|
||||
npm_config_arv_original === ""
|
||||
? getPackageManagerName()
|
||||
: [getPackageManagerName(), npm_config_arv_original].join(" ")
|
||||
|
||||
return command
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap double quotes around the given string.
|
||||
*/
|
||||
function doubleQuote(x) {
|
||||
return `"${x}"`
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the package manager name currently being used. If parsing fails, then the following pattern is returned:
|
||||
* UNKNOWN_NPM_CONFIG_USER_AGENT(<string received>).
|
||||
*/
|
||||
function getPackageManagerName() {
|
||||
const userAgent = process.env.npm_config_user_agent
|
||||
if (!userAgent) return "MISSING_NPM_CONFIG_USER_AGENT"
|
||||
|
||||
const name = parsePackageManagerName(userAgent)
|
||||
if (!name) return `UNKNOWN_NPM_CONFIG_USER_AGENT(${userAgent})`
|
||||
|
||||
return name
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse package manager name from useragent. If parsing fails, `null` is returned.
|
||||
*/
|
||||
function parsePackageManagerName(userAgent) {
|
||||
let packageManager = null
|
||||
|
||||
// example: 'yarn/1.22.4 npm/? node/v13.11.0 darwin x64'
|
||||
// References:
|
||||
// - https://pnpm.js.org/en/3.6/only-allow-pnpm
|
||||
// - https://github.com/cameronhunter/npm-config-user-agent-parser
|
||||
if (userAgent) {
|
||||
const matchResult = userAgent.match(/^([^/]+)\/.+/)
|
||||
if (matchResult) {
|
||||
packageManager = matchResult[1].trim()
|
||||
}
|
||||
}
|
||||
|
||||
return packageManager
|
||||
}
|
||||
|
||||
// prettier-ignore
|
||||
const UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER__ENVAR_MISSING'
|
||||
// prettier-ignore
|
||||
const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_PARSE_ERROR'
|
||||
// prettier-ignore
|
||||
const UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR = 'UNABLE_TO_FIND_POSTINSTALL_TRIGGER_JSON_SCHEMA_ERROR'
|
||||
}
|
||||
|
||||
if (!isInstalledGlobally) {
|
||||
codegen()
|
||||
}
|
||||
@@ -1,38 +1,5 @@
|
||||
# @blitzjs/rpc
|
||||
|
||||
## 2.0.0-alpha.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.9
|
||||
- @blitzjs/auth@2.0.0-alpha.9
|
||||
|
||||
## 2.0.0-alpha.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.8
|
||||
- @blitzjs/auth@2.0.0-alpha.8
|
||||
|
||||
## 2.0.0-alpha.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.7
|
||||
- @blitzjs/auth@2.0.0-alpha.7
|
||||
|
||||
## 2.0.0-alpha.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix route manifest codegen
|
||||
- Updated dependencies
|
||||
- blitz@2.0.0-alpha.6
|
||||
- @blitzjs/auth@2.0.0-alpha.6
|
||||
|
||||
## 2.0.0-alpha.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/rpc",
|
||||
"version": "2.0.0-alpha.9",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts && wait-on -d 250 ../blitz-auth/dist/index-browser.d.ts",
|
||||
@@ -20,7 +20,7 @@
|
||||
"dist/**"
|
||||
],
|
||||
"dependencies": {
|
||||
"@blitzjs/auth": "2.0.0-alpha.9",
|
||||
"@blitzjs/auth": "2.0.0-alpha.5",
|
||||
"b64-lite": "1.4.0",
|
||||
"bad-behavior": "1.0.1",
|
||||
"chalk": "^4.1.0",
|
||||
@@ -30,11 +30,11 @@
|
||||
"zod": "3.10.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:2.0.0-alpha.9",
|
||||
"@blitzjs/config": "2.0.0-alpha.5",
|
||||
"@types/debug": "4.1.7",
|
||||
"@types/react": "17.0.43",
|
||||
"@types/react-dom": "17.0.14",
|
||||
"blitz": "2.0.0-alpha.9",
|
||||
"blitz": "2.0.0-alpha.5",
|
||||
"next": "12.1.1",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
@@ -43,7 +43,7 @@
|
||||
"watch": "1.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"blitz": "2.0.0-alpha.9",
|
||||
"blitz": "2.0.0-alpha.5",
|
||||
"next": "*"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,34 +1,5 @@
|
||||
# blitz
|
||||
|
||||
## 2.0.0-alpha.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- add @blitzjs/generator as external
|
||||
- @blitzjs/generator@2.0.0-alpha.9
|
||||
|
||||
## 2.0.0-alpha.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix broken cli versioning
|
||||
- @blitzjs/generator@2.0.0-alpha.8
|
||||
|
||||
## 2.0.0-alpha.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- added index.cjs to blitz externals
|
||||
- @blitzjs/generator@2.0.0-alpha.7
|
||||
|
||||
## 2.0.0-alpha.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix route manifest codegen
|
||||
- Updated dependencies
|
||||
- @blitzjs/generator@2.0.0-alpha.6
|
||||
|
||||
## 2.0.0-alpha.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,7 +2,7 @@ import {BuildConfig} from "unbuild"
|
||||
|
||||
const config: BuildConfig = {
|
||||
entries: ["./src/index-browser", "./src/index-server", "./src/cli/index"],
|
||||
externals: ["index-browser.cjs", "index-browser.mjs", "index.cjs", "zod", "@blitzjs/generator"],
|
||||
externals: ["index-browser.cjs", "index-browser.mjs", "zod"],
|
||||
declaration: true,
|
||||
rollup: {
|
||||
emitCJS: true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "blitz",
|
||||
"version": "2.0.0-alpha.9",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"dev": "watch unbuild src --wait=0.2",
|
||||
@@ -23,7 +23,7 @@
|
||||
"blitz": "bin/blitz"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/generator": "2.0.0-alpha.9",
|
||||
"@blitzjs/generator": "2.0.0-alpha.5",
|
||||
"arg": "5.0.1",
|
||||
"chalk": "^4.1.0",
|
||||
"console-table-printer": "2.10.0",
|
||||
@@ -33,7 +33,6 @@
|
||||
"dotenv": "16.0.0",
|
||||
"dotenv-expand": "8.0.3",
|
||||
"esbuild": "0.14.34",
|
||||
"find-up": "4.1.0",
|
||||
"fs-extra": "10.0.1",
|
||||
"hasbin": "1.2.3",
|
||||
"npm-which": "3.0.1",
|
||||
@@ -42,12 +41,11 @@
|
||||
"pkg-dir": "5.0.0",
|
||||
"prompts": "2.4.2",
|
||||
"resolve-cwd": "3.0.0",
|
||||
"resolve-from": "5.0.0",
|
||||
"superjson": "1.8.0",
|
||||
"tslog": "3.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:2.0.0-alpha.9",
|
||||
"@blitzjs/config": "2.0.0-alpha.5",
|
||||
"@types/cookie": "0.4.1",
|
||||
"@types/cross-spawn": "6.0.2",
|
||||
"@types/debug": "4.1.7",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Readable} from "stream"
|
||||
import {getCommandBin} from "../utils/config"
|
||||
import {getPrismaBin} from "../utils/config"
|
||||
import {CliCommand} from "../index"
|
||||
import arg from "arg"
|
||||
|
||||
@@ -8,7 +8,7 @@ let prismaBin: string
|
||||
export const runPrisma = async (args: string[], silent = false) => {
|
||||
if (!prismaBin) {
|
||||
try {
|
||||
prismaBin = await getCommandBin("prisma")
|
||||
prismaBin = await getPrismaBin(process.cwd())
|
||||
} catch (err) {
|
||||
throw err
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ import {NON_STANDARD_NODE_ENV} from "./utils/constants"
|
||||
import arg from "arg"
|
||||
import packageJson from "../../package.json"
|
||||
import {loadEnvConfig} from "../env-utils"
|
||||
import {getCommandBin} from "./utils/config"
|
||||
import spawn from "cross-spawn"
|
||||
|
||||
const commonArgs = {
|
||||
// Types
|
||||
@@ -24,9 +22,17 @@ const commands: {[command: string]: () => Promise<CliCommand>} = {
|
||||
dev: () => import("./commands/next/dev").then((i) => i.dev),
|
||||
build: () => import("./commands/next/build").then((i) => i.build),
|
||||
start: () => import("./commands/next/start").then((i) => i.start),
|
||||
next: async () => (argv) => {
|
||||
if (argv?.[0] && ["dev", "start", "build"].includes(argv[0])) {
|
||||
const command = argv[0] as "dev" | "start" | "build"
|
||||
return import("./commands/next").then((i) => i[command]())
|
||||
}
|
||||
console.error(`Invalid command provided: "blitz next ${argv?.[0]}".`)
|
||||
},
|
||||
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, {
|
||||
@@ -47,45 +53,8 @@ if (args["--version"]) {
|
||||
|
||||
const foundCommand = Boolean(commands[args._[0] as string])
|
||||
|
||||
const command = foundCommand ? (args._[0] as string) : defaultCommand
|
||||
const forwardedArgs = foundCommand ? args._.slice(1) : args._
|
||||
|
||||
if (args["--env"]) {
|
||||
process.env.APP_ENV = args["--env"]
|
||||
}
|
||||
|
||||
if (args["--help"]) {
|
||||
forwardedArgs.push("--help")
|
||||
}
|
||||
|
||||
const defaultEnv = command === "dev" ? "development" : "production"
|
||||
|
||||
const standardEnv = ["production", "development", "test"]
|
||||
if (process.env.NODE_ENV && !standardEnv.includes(process.env.NODE_ENV)) {
|
||||
console.warn(NON_STANDARD_NODE_ENV)
|
||||
}
|
||||
;(process.env as any).NODE_ENV = process.env.NODE_ENV || defaultEnv
|
||||
|
||||
// Make sure commands gracefully respect termination signals (e.g. from Docker)
|
||||
process.on("SIGTERM", () => process.exit(0))
|
||||
process.on("SIGINT", () => process.exit(0))
|
||||
|
||||
if (foundCommand) {
|
||||
commands[command]?.()
|
||||
.then((exec: any) => exec(forwardedArgs))
|
||||
.then(() => {
|
||||
if (command === "build") {
|
||||
// ensure process exits after build completes so open handles/connections
|
||||
// don't cause process to hang
|
||||
process.exit(0)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
} else {
|
||||
if (args["--help"] && args._.length === 0) {
|
||||
console.log(`
|
||||
if (!foundCommand && args["--help"]) {
|
||||
console.log(`
|
||||
Usage
|
||||
$ blitz <command>
|
||||
|
||||
@@ -100,26 +69,41 @@ if (foundCommand) {
|
||||
For more information run a command with the --help flag
|
||||
$ blitz build --help
|
||||
`)
|
||||
process.exit(0)
|
||||
} else {
|
||||
// If the command is not found, we assume it is a command from the bin
|
||||
void runCommandFromBin()
|
||||
}
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
async function runCommandFromBin() {
|
||||
const command = args._[0] as string
|
||||
let commandBin: string | null = null
|
||||
try {
|
||||
commandBin = await getCommandBin(command)
|
||||
} catch (e: any) {
|
||||
console.error(`Error: ${e.message}`)
|
||||
}
|
||||
const command = foundCommand ? (args._[0] as string) : defaultCommand
|
||||
const forwardedArgs = foundCommand ? args._.slice(1) : args._
|
||||
|
||||
if (!commandBin) {
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const result = spawn.sync(commandBin, process.argv.slice(3), {stdio: "inherit"})
|
||||
process.exit(result.status || 0)
|
||||
if (args["--help"]) {
|
||||
forwardedArgs.push("--help")
|
||||
}
|
||||
|
||||
if (args["--env"]) {
|
||||
process.env.APP_ENV = args["--env"]
|
||||
}
|
||||
|
||||
const defaultEnv = command === "dev" ? "development" : "production"
|
||||
|
||||
const standardEnv = ["production", "development", "test"]
|
||||
if (process.env.NODE_ENV && !standardEnv.includes(process.env.NODE_ENV)) {
|
||||
console.warn(NON_STANDARD_NODE_ENV)
|
||||
}
|
||||
;(process.env as any).NODE_ENV = process.env.NODE_ENV || defaultEnv
|
||||
|
||||
// Make sure commands gracefully respect termination signals (e.g. from Docker)
|
||||
process.on("SIGTERM", () => process.exit(0))
|
||||
process.on("SIGINT", () => process.exit(0))
|
||||
|
||||
commands[command]?.()
|
||||
.then((exec: any) => exec(forwardedArgs))
|
||||
.then(() => {
|
||||
if (command === "build") {
|
||||
// ensure process exits after build completes so open handles/connections
|
||||
// don't cause process to hang
|
||||
process.exit(0)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
@@ -83,17 +83,24 @@ export async function normalize(config: ServerConfig): Promise<NormalizedConfig>
|
||||
watch: config.watch ?? env === "dev",
|
||||
clean: config.clean,
|
||||
// -
|
||||
nextBin: await getCommandBin("next", rootFolder, env === "dev"),
|
||||
nextBin: await getNextBin(rootFolder, env === "dev"),
|
||||
}
|
||||
}
|
||||
|
||||
export async function getCommandBin(
|
||||
command: string,
|
||||
rootFolder: string = process.cwd(),
|
||||
async function getNextBin(rootFolder: string, _usePatched: boolean = false): Promise<string> {
|
||||
const nextBinPkg = "next"
|
||||
const nextBin = await resolveBinAsync(nextBinPkg)
|
||||
return resolve(rootFolder, nextBin)
|
||||
}
|
||||
|
||||
export async function getPrismaBin(
|
||||
rootFolder: string,
|
||||
_usePatched: boolean = false,
|
||||
): Promise<string> {
|
||||
const bin = await resolveBinAsync(command)
|
||||
return resolve(rootFolder, bin)
|
||||
const prismaBinPkg = "prisma"
|
||||
const prismaBin = await resolveBinAsync(prismaBinPkg)
|
||||
|
||||
return resolve(rootFolder, prismaBin)
|
||||
}
|
||||
|
||||
async function getIsTypeScript(rootFolder: string): Promise<boolean> {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import {join, dirname} from "path"
|
||||
import os from "os"
|
||||
import {promises} from "fs"
|
||||
import {readdirSync, promises} from "fs"
|
||||
const readFile = promises.readFile
|
||||
import {outputFile} from "fs-extra"
|
||||
import findUp from "find-up"
|
||||
import resolveFrom from "resolve-from"
|
||||
|
||||
export const CONFIG_FILE = ".blitz.config.compiled.js"
|
||||
export const NEXT_CONFIG_FILE = "next.config.js"
|
||||
@@ -497,7 +495,7 @@ export async function generateManifest() {
|
||||
|
||||
const {declaration, implementation} = setupManifest(routes)
|
||||
|
||||
const dotBlitz = join(await findNodeModulesRoot(process.cwd()), ".blitz")
|
||||
const dotBlitz = join(process.cwd(), ".blitz")
|
||||
|
||||
await outputFile(join(dotBlitz, "index.js"), implementation, {
|
||||
encoding: "utf-8",
|
||||
@@ -509,37 +507,9 @@ export async function generateManifest() {
|
||||
encoding: "utf-8",
|
||||
})
|
||||
}
|
||||
|
||||
export const isInternalBlitzMonorepoDevelopment = __dirname.match(
|
||||
/[\\/]packages[\\/]blitz[\\/]dist[\\/]chunks$/,
|
||||
)
|
||||
|
||||
async function findNodeModulesRoot(src: string) {
|
||||
/*
|
||||
* Because of our package structure, and because of how things like pnpm link modules,
|
||||
* we must first find blitz package, and then find `next` and then
|
||||
* the root of `next`
|
||||
*
|
||||
* This is because we import from `.blitz` inside `next/stdlib`.
|
||||
* If that changes, then this logic here will need to change
|
||||
*/
|
||||
|
||||
let root: string
|
||||
if (isInternalBlitzMonorepoDevelopment) {
|
||||
root = join(__dirname, "..", "..", "..", "..", "/node_modules")
|
||||
} else {
|
||||
const blitzPkgLocation = dirname(
|
||||
(await findUp("package.json", {
|
||||
cwd: resolveFrom(src, "blitz"),
|
||||
})) ?? "",
|
||||
)
|
||||
|
||||
if (!blitzPkgLocation) {
|
||||
throw new Error("Internal Blitz Error: unable to find 'blitz' package location")
|
||||
}
|
||||
|
||||
root = join(blitzPkgLocation, "../")
|
||||
}
|
||||
|
||||
return root
|
||||
}
|
||||
// export const findBlitzConfigDirectory = () => {
|
||||
// let blitzDir = readdirSync(join(process.cwd(), ".blitz"))
|
||||
// if (blitzDir.length) {
|
||||
// return join(process.cwd(), ".blitz/index.js")
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
# @blitzjs/config
|
||||
|
||||
## 2.0.0-alpha.9
|
||||
|
||||
## 2.0.0-alpha.8
|
||||
|
||||
## 2.0.0-alpha.7
|
||||
|
||||
## 2.0.0-alpha.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix route manifest codegen
|
||||
|
||||
## 2.0.0-alpha.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@blitzjs/config",
|
||||
"private": true,
|
||||
"version": "2.0.0-alpha.9",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "5.9.1",
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
# @blitzjs/generator
|
||||
|
||||
## 2.0.0-alpha.9
|
||||
|
||||
## 2.0.0-alpha.8
|
||||
|
||||
## 2.0.0-alpha.7
|
||||
|
||||
## 2.0.0-alpha.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- fix route manifest codegen
|
||||
|
||||
## 2.0.0-alpha.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/generator",
|
||||
"version": "2.0.0-alpha.9",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"scripts": {
|
||||
"dev": "watch unbuild src --wait=0.2",
|
||||
"build": "unbuild && pnpm build:templates",
|
||||
@@ -45,7 +45,7 @@
|
||||
"vinyl": "2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "2.0.0-alpha.9",
|
||||
"@blitzjs/config": "2.0.0-alpha.5",
|
||||
"@juanm04/cpx": "2.0.1",
|
||||
"@types/babel__core": "7.1.19",
|
||||
"@types/diff": "5.0.2",
|
||||
|
||||
@@ -78,7 +78,7 @@ export class AppGenerator extends Generator<AppGeneratorOptions> {
|
||||
)
|
||||
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"}`),
|
||||
this.destinationPath(`pages/api/rpc/[...blitz].${this.options.useTs ? "ts" : "js"}`),
|
||||
)
|
||||
|
||||
if (!this.options.template.skipForms) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { SecurePassword } from "@blitzjs/auth"
|
||||
import { resolver } from "@blitzjs/rpc"
|
||||
import { AuthenticationError } from "blitz"
|
||||
import { db} from "db"
|
||||
import { prisma as db, User } from "db"
|
||||
import { Role } from "types"
|
||||
import { Login } from "../validations"
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ export const { gSSP, gSP, api } = setupBlitzServer({
|
||||
plugins: [
|
||||
AuthServerPlugin({
|
||||
cookiePrefix: "__safeNameSlug__-cookie-prefix",
|
||||
// TODO fix type
|
||||
storage: PrismaStorage(db as any),
|
||||
isAuthorized: simpleRolesIsAuthorized,
|
||||
}),
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
||||
enabled: process.env.ANALYZE === "true",
|
||||
})
|
||||
const {withBlitz} = require("@blitzjs/next")
|
||||
|
||||
module.exports = withBlitz()
|
||||
module.exports = withBlitz(
|
||||
withBundleAnalyzer({
|
||||
reactStrictMode: true,
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"@typescript-eslint/parser": "5.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "2.0.0-alpha.9",
|
||||
"@blitzjs/config": "2.0.0-alpha.5",
|
||||
"@types/react": "17.0.43",
|
||||
"@types/react-dom": "17.0.14",
|
||||
"react": "18.0.0",
|
||||
|
||||
328
pnpm-lock.yaml
generated
328
pnpm-lock.yaml
generated
@@ -1,4 +1,4 @@
|
||||
lockfileVersion: 5.4
|
||||
lockfileVersion: 5.3
|
||||
|
||||
importers:
|
||||
.:
|
||||
@@ -50,7 +50,7 @@ importers:
|
||||
"@types/node": 17.0.16
|
||||
"@types/preview-email": 2.0.1
|
||||
"@types/react": 17.0.43
|
||||
blitz: workspace:2.0.0-alpha.8
|
||||
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
|
||||
@@ -75,17 +76,18 @@ importers:
|
||||
"@hookform/resolvers": 2.8.8_react-hook-form@7.29.0
|
||||
"@prisma/client": 3.9.0_prisma@3.9.0
|
||||
blitz: link:../../packages/blitz
|
||||
next: 12.1.1_zpnidt7m3osuk7shl3s4oenomq
|
||||
next: 12.1.1_react-dom@18.0.0+react@18.0.0
|
||||
prisma: 3.9.0
|
||||
react: 18.0.0
|
||||
react-dom: 18.0.0_react@18.0.0
|
||||
react-hook-form: 7.29.0_react@18.0.0
|
||||
ts-node: 10.7.0_fxg3r7oju3tntkxsvleuiot4fa
|
||||
styled-jsx: 5.0.2_react@18.0.0
|
||||
ts-node: 10.7.0_2dcdb8fdc9a6e6d9aaf2aac9443a7c28
|
||||
zod: 3.10.1
|
||||
devDependencies:
|
||||
"@next/bundle-analyzer": 12.0.8
|
||||
"@testing-library/react": 13.0.0_zpnidt7m3osuk7shl3s4oenomq
|
||||
"@testing-library/react-hooks": 7.0.2_zpnidt7m3osuk7shl3s4oenomq
|
||||
"@testing-library/react": 13.0.0_react-dom@18.0.0+react@18.0.0
|
||||
"@testing-library/react-hooks": 7.0.2_react-dom@18.0.0+react@18.0.0
|
||||
"@types/jest": 27.4.1
|
||||
"@types/node": 17.0.16
|
||||
"@types/preview-email": 2.0.1
|
||||
@@ -128,7 +130,7 @@ importers:
|
||||
"@types/jest": 27.4.1
|
||||
blitz: link:../../packages/blitz
|
||||
jest: 27.5.1_ts-node@10.7.0
|
||||
next: 12.1.1_zpnidt7m3osuk7shl3s4oenomq
|
||||
next: 12.1.1_react-dom@18.0.0+react@18.0.0
|
||||
prisma: 3.9.0
|
||||
react: 18.0.0
|
||||
react-dom: 18.0.0_react@18.0.0
|
||||
@@ -169,7 +171,7 @@ importers:
|
||||
"@prisma/client": 3.9.0_prisma@3.9.0
|
||||
blitz: link:../../packages/blitz
|
||||
lowdb: 3.0.0
|
||||
next: 12.1.1_zpnidt7m3osuk7shl3s4oenomq
|
||||
next: 12.1.1_react-dom@18.0.0+react@18.0.0
|
||||
prisma: 3.9.0
|
||||
react: 18.0.0
|
||||
react-dom: 18.0.0_react@18.0.0
|
||||
@@ -210,7 +212,7 @@ importers:
|
||||
"@blitzjs/next": link:../../packages/blitz-next
|
||||
"@blitzjs/rpc": link:../../packages/blitz-rpc
|
||||
blitz: link:../../packages/blitz
|
||||
next: 12.1.1_zpnidt7m3osuk7shl3s4oenomq
|
||||
next: 12.1.1_react-dom@18.0.0+react@18.0.0
|
||||
react: 18.0.0
|
||||
react-dom: 18.0.0_react@18.0.0
|
||||
devDependencies:
|
||||
@@ -263,8 +265,8 @@ importers:
|
||||
|
||||
packages/blitz:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-alpha.8
|
||||
"@blitzjs/generator": 2.0.0-alpha.8
|
||||
"@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
|
||||
@@ -288,7 +290,6 @@ importers:
|
||||
dotenv-expand: 8.0.3
|
||||
esbuild: 0.14.34
|
||||
express: 4.17.3
|
||||
find-up: 4.1.0
|
||||
fs-extra: 10.0.1
|
||||
hasbin: 1.2.3
|
||||
node-fetch: 3.2.3
|
||||
@@ -299,7 +300,6 @@ importers:
|
||||
prompts: 2.4.2
|
||||
react: 18.0.0
|
||||
resolve-cwd: 3.0.0
|
||||
resolve-from: 5.0.0
|
||||
superjson: 1.8.0
|
||||
test-listen: 1.1.0
|
||||
tslog: 3.3.1
|
||||
@@ -318,7 +318,6 @@ importers:
|
||||
dotenv: 16.0.0
|
||||
dotenv-expand: 8.0.3
|
||||
esbuild: 0.14.34
|
||||
find-up: 4.1.0
|
||||
fs-extra: 10.0.1
|
||||
hasbin: 1.2.3
|
||||
npm-which: 3.0.1
|
||||
@@ -327,7 +326,6 @@ importers:
|
||||
pkg-dir: 5.0.0
|
||||
prompts: 2.4.2
|
||||
resolve-cwd: 3.0.0
|
||||
resolve-from: 5.0.0
|
||||
superjson: 1.8.0
|
||||
tslog: 3.3.1
|
||||
devDependencies:
|
||||
@@ -356,7 +354,7 @@ importers:
|
||||
|
||||
packages/blitz-auth:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-alpha.8
|
||||
"@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
|
||||
@@ -368,7 +366,7 @@ importers:
|
||||
"@types/secure-password": 3.1.1
|
||||
b64-lite: 1.4.0
|
||||
bad-behavior: 1.0.1
|
||||
blitz: 2.0.0-alpha.8
|
||||
blitz: 2.0.0-alpha.5
|
||||
cookie: 0.4.1
|
||||
debug: 4.3.3
|
||||
http: 0.0.1-security
|
||||
@@ -398,8 +396,8 @@ importers:
|
||||
url: 0.11.0
|
||||
devDependencies:
|
||||
"@blitzjs/config": link:../config
|
||||
"@testing-library/react": 13.0.0_zpnidt7m3osuk7shl3s4oenomq
|
||||
"@testing-library/react-hooks": 7.0.2_zpnidt7m3osuk7shl3s4oenomq
|
||||
"@testing-library/react": 13.0.0_react-dom@18.0.0+react@18.0.0
|
||||
"@testing-library/react-hooks": 7.0.2_react-dom@18.0.0+react@18.0.0
|
||||
"@types/cookie": 0.4.1
|
||||
"@types/debug": 4.1.7
|
||||
"@types/jsonwebtoken": 8.5.8
|
||||
@@ -413,8 +411,8 @@ importers:
|
||||
|
||||
packages/blitz-next:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-alpha.8
|
||||
"@blitzjs/rpc": 2.0.0-alpha.8
|
||||
"@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
|
||||
@@ -425,17 +423,14 @@ importers:
|
||||
"@types/react": 17.0.43
|
||||
"@types/react-dom": 17.0.14
|
||||
"@types/testing-library__react-hooks": 4.0.0
|
||||
blitz: 2.0.0-alpha.8
|
||||
cross-spawn: 7.0.3
|
||||
blitz: 2.0.0-alpha.5
|
||||
debug: 4.3.3
|
||||
find-up: 4.1.0
|
||||
fs-extra: 10.0.1
|
||||
lodash.frompairs: 4.0.1
|
||||
next: 12.1.1
|
||||
react: 18.0.0
|
||||
react-dom: 18.0.0
|
||||
react-query: 3.21.1
|
||||
resolve-from: 5.0.0
|
||||
ts-jest: 27.1.4
|
||||
typescript: ^4.5.3
|
||||
unbuild: 0.6.9
|
||||
@@ -444,27 +439,24 @@ importers:
|
||||
"@blitzjs/rpc": link:../blitz-rpc
|
||||
debug: 4.3.3
|
||||
fs-extra: 10.0.1
|
||||
react-query: 3.21.1_zpnidt7m3osuk7shl3s4oenomq
|
||||
react-query: 3.21.1_react-dom@18.0.0+react@18.0.0
|
||||
devDependencies:
|
||||
"@blitzjs/config": link:../config
|
||||
"@testing-library/dom": 8.13.0
|
||||
"@testing-library/jest-dom": 5.16.3
|
||||
"@testing-library/react": 13.0.0_zpnidt7m3osuk7shl3s4oenomq
|
||||
"@testing-library/react-hooks": 7.0.2_zpnidt7m3osuk7shl3s4oenomq
|
||||
"@testing-library/user-event": 13.5.0_tlwynutqiyp5mns3woioasuxnq
|
||||
"@testing-library/react": 13.0.0_react-dom@18.0.0+react@18.0.0
|
||||
"@testing-library/react-hooks": 7.0.2_react-dom@18.0.0+react@18.0.0
|
||||
"@testing-library/user-event": 13.5.0_@testing-library+dom@8.13.0
|
||||
"@types/lodash.frompairs": 4.0.6
|
||||
"@types/node": 17.0.16
|
||||
"@types/react": 17.0.43
|
||||
"@types/react-dom": 17.0.14
|
||||
"@types/testing-library__react-hooks": 4.0.0_zpnidt7m3osuk7shl3s4oenomq
|
||||
"@types/testing-library__react-hooks": 4.0.0_react-dom@18.0.0+react@18.0.0
|
||||
blitz: link:../blitz
|
||||
cross-spawn: 7.0.3
|
||||
find-up: 4.1.0
|
||||
lodash.frompairs: 4.0.1
|
||||
next: 12.1.1_zpnidt7m3osuk7shl3s4oenomq
|
||||
next: 12.1.1_react-dom@18.0.0+react@18.0.0
|
||||
react: 18.0.0
|
||||
react-dom: 18.0.0_react@18.0.0
|
||||
resolve-from: 5.0.0
|
||||
ts-jest: 27.1.4_typescript@4.6.3
|
||||
typescript: 4.6.3
|
||||
unbuild: 0.6.9
|
||||
@@ -472,14 +464,14 @@ importers:
|
||||
|
||||
packages/blitz-rpc:
|
||||
specifiers:
|
||||
"@blitzjs/auth": 2.0.0-alpha.8
|
||||
"@blitzjs/config": workspace:2.0.0-alpha.8
|
||||
"@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.8
|
||||
blitz: 2.0.0-alpha.5
|
||||
chalk: ^4.1.0
|
||||
debug: 4.3.3
|
||||
next: 12.1.1
|
||||
@@ -497,7 +489,7 @@ importers:
|
||||
bad-behavior: 1.0.1
|
||||
chalk: 4.1.2
|
||||
debug: 4.3.3
|
||||
react-query: 3.21.1_zpnidt7m3osuk7shl3s4oenomq
|
||||
react-query: 3.21.1_react-dom@18.0.0+react@18.0.0
|
||||
superjson: 1.8.0
|
||||
zod: 3.10.1
|
||||
devDependencies:
|
||||
@@ -506,7 +498,7 @@ importers:
|
||||
"@types/react": 17.0.43
|
||||
"@types/react-dom": 17.0.14
|
||||
blitz: link:../blitz
|
||||
next: 12.1.1_zpnidt7m3osuk7shl3s4oenomq
|
||||
next: 12.1.1_react-dom@18.0.0+react@18.0.0
|
||||
react: 18.0.0
|
||||
react-dom: 18.0.0_react@18.0.0
|
||||
typescript: 4.6.3
|
||||
@@ -521,7 +513,7 @@ importers:
|
||||
eslint-config-prettier: 8.3.0
|
||||
typescript: ^4.5.3
|
||||
dependencies:
|
||||
"@typescript-eslint/eslint-plugin": 5.9.1_z2xqbpkx26iu62rx2zdto5f5qy
|
||||
"@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
|
||||
@@ -534,7 +526,7 @@ importers:
|
||||
"@babel/plugin-transform-typescript": 7.12.1
|
||||
"@babel/preset-env": 7.12.10
|
||||
"@babel/types": 7.12.10
|
||||
"@blitzjs/config": 2.0.0-alpha.8
|
||||
"@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,8 +605,8 @@ importers:
|
||||
"@types/react": 17.0.43
|
||||
"@types/react-dom": 17.0.14
|
||||
"@types/vinyl": 2.0.6
|
||||
"@typescript-eslint/eslint-plugin": 5.9.1_rvfvfrvgktle2hmlnfpjw2zp4u
|
||||
"@typescript-eslint/parser": 5.9.1_hrkuebk64jiu2ut2d2sm4oylnu
|
||||
"@typescript-eslint/eslint-plugin": 5.9.1_8d4b52c6a654d64d1d8b695e9b6b2fe5
|
||||
"@typescript-eslint/parser": 5.9.1_eslint@7.32.0+typescript@4.6.3
|
||||
babylon: 6.18.0
|
||||
debug: 4.3.3
|
||||
eslint: 7.32.0
|
||||
@@ -625,7 +617,7 @@ importers:
|
||||
|
||||
packages/pkg-template:
|
||||
specifiers:
|
||||
"@blitzjs/config": 2.0.0-alpha.8
|
||||
"@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
|
||||
@@ -635,7 +627,7 @@ importers:
|
||||
unbuild: 0.6.9
|
||||
watch: 1.0.2
|
||||
dependencies:
|
||||
"@typescript-eslint/eslint-plugin": 5.9.1_z2xqbpkx26iu62rx2zdto5f5qy
|
||||
"@typescript-eslint/eslint-plugin": 5.9.1_ceaf00bd57d7914f6a37d6473774bd86
|
||||
"@typescript-eslint/parser": 5.9.1_typescript@4.6.3
|
||||
devDependencies:
|
||||
"@blitzjs/config": link:../config
|
||||
@@ -647,15 +639,14 @@ importers:
|
||||
watch: 1.0.2
|
||||
|
||||
packages:
|
||||
/@ampproject/remapping/2.2.0:
|
||||
/@ampproject/remapping/2.1.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==,
|
||||
integrity: sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==,
|
||||
}
|
||||
engines: {node: ">=6.0.0"}
|
||||
dependencies:
|
||||
"@jridgewell/gen-mapping": 0.1.1
|
||||
"@jridgewell/trace-mapping": 0.3.9
|
||||
"@jridgewell/trace-mapping": 0.3.8
|
||||
|
||||
/@babel/code-frame/7.12.11:
|
||||
resolution:
|
||||
@@ -715,7 +706,7 @@ packages:
|
||||
}
|
||||
engines: {node: ">=6.9.0"}
|
||||
dependencies:
|
||||
"@ampproject/remapping": 2.2.0
|
||||
"@ampproject/remapping": 2.1.2
|
||||
"@babel/code-frame": 7.16.7
|
||||
"@babel/generator": 7.17.9
|
||||
"@babel/helper-compilation-targets": 7.17.7_@babel+core@7.17.9
|
||||
@@ -777,7 +768,7 @@ packages:
|
||||
"@babel/compat-data": 7.17.7
|
||||
"@babel/core": 7.12.10
|
||||
"@babel/helper-validator-option": 7.16.7
|
||||
browserslist: 4.20.3
|
||||
browserslist: 4.20.2
|
||||
semver: 6.3.0
|
||||
dev: false
|
||||
|
||||
@@ -793,7 +784,7 @@ packages:
|
||||
"@babel/compat-data": 7.17.7
|
||||
"@babel/core": 7.17.9
|
||||
"@babel/helper-validator-option": 7.16.7
|
||||
browserslist: 4.20.3
|
||||
browserslist: 4.20.2
|
||||
semver: 6.3.0
|
||||
|
||||
/@babel/helper-create-class-features-plugin/7.17.9_@babel+core@7.12.10:
|
||||
@@ -2211,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.3
|
||||
core-js-compat: 3.22.1
|
||||
semver: 5.7.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -2289,7 +2280,7 @@ packages:
|
||||
}
|
||||
engines: {node: ">=6.9.0"}
|
||||
dependencies:
|
||||
core-js-pure: 3.22.3
|
||||
core-js-pure: 3.22.1
|
||||
regenerator-runtime: 0.13.9
|
||||
dev: false
|
||||
|
||||
@@ -2953,27 +2944,10 @@ packages:
|
||||
"@types/yargs": 16.0.4
|
||||
chalk: 4.1.2
|
||||
|
||||
/@jridgewell/gen-mapping/0.1.1:
|
||||
/@jridgewell/resolve-uri/3.0.5:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==,
|
||||
}
|
||||
engines: {node: ">=6.0.0"}
|
||||
dependencies:
|
||||
"@jridgewell/set-array": 1.1.0
|
||||
"@jridgewell/sourcemap-codec": 1.4.11
|
||||
|
||||
/@jridgewell/resolve-uri/3.0.6:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-R7xHtBSNm+9SyvpJkdQl+qrM3Hm2fea3Ef197M3mUug+v+yR+Rhfbs7PBtcBUVnIWJ4JcAdjvij+c8hXS9p5aw==,
|
||||
}
|
||||
engines: {node: ">=6.0.0"}
|
||||
|
||||
/@jridgewell/set-array/1.1.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-SfJxIxNVYLTsKwzB3MoOQ1yxf4w/E6MdkvTgrgAt1bfxjSrLUoHMKrDOykwN14q65waezZIdqDneUIPh4/sKxg==,
|
||||
integrity: sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==,
|
||||
}
|
||||
engines: {node: ">=6.0.0"}
|
||||
|
||||
@@ -2983,13 +2957,13 @@ packages:
|
||||
integrity: sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==,
|
||||
}
|
||||
|
||||
/@jridgewell/trace-mapping/0.3.9:
|
||||
/@jridgewell/trace-mapping/0.3.8:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==,
|
||||
integrity: sha512-zdpaWDz5IEyHlu1EO+B+qRHmJkSxMVV6SXngDry9n1ZqslLXFH9Dw6lRqDidm/sOJAWdRltJsmZ1SK28/uZKsw==,
|
||||
}
|
||||
dependencies:
|
||||
"@jridgewell/resolve-uri": 3.0.6
|
||||
"@jridgewell/resolve-uri": 3.0.5
|
||||
"@jridgewell/sourcemap-codec": 1.4.11
|
||||
|
||||
/@juanm04/cpx/2.0.1:
|
||||
@@ -3023,7 +2997,7 @@ packages:
|
||||
}
|
||||
dependencies:
|
||||
"@babel/runtime": 7.17.9
|
||||
"@types/node": 12.20.50
|
||||
"@types/node": 12.20.48
|
||||
find-up: 4.1.0
|
||||
fs-extra: 8.1.0
|
||||
dev: false
|
||||
@@ -3514,7 +3488,7 @@ packages:
|
||||
"@types/aria-query": 4.2.2
|
||||
aria-query: 5.0.0
|
||||
chalk: 4.1.2
|
||||
dom-accessibility-api: 0.5.14
|
||||
dom-accessibility-api: 0.5.13
|
||||
lz-string: 1.4.4
|
||||
pretty-format: 27.5.1
|
||||
dev: true
|
||||
@@ -3532,12 +3506,12 @@ packages:
|
||||
chalk: 3.0.0
|
||||
css: 3.0.0
|
||||
css.escape: 1.5.1
|
||||
dom-accessibility-api: 0.5.14
|
||||
dom-accessibility-api: 0.5.13
|
||||
lodash: 4.17.21
|
||||
redent: 3.0.0
|
||||
dev: true
|
||||
|
||||
/@testing-library/react-hooks/7.0.2_zpnidt7m3osuk7shl3s4oenomq:
|
||||
/@testing-library/react-hooks/7.0.2_react-dom@18.0.0+react@18.0.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-dYxpz8u9m4q1TuzfcUApqi8iFfR6R0FaMbr2hjZJy1uC8z+bO/K4v8Gs9eogGKYQop7QsrBTFkv/BCF7MzD2Cg==,
|
||||
@@ -3562,7 +3536,7 @@ packages:
|
||||
react-error-boundary: 3.1.4_react@18.0.0
|
||||
dev: true
|
||||
|
||||
/@testing-library/react/13.0.0_zpnidt7m3osuk7shl3s4oenomq:
|
||||
/@testing-library/react/13.0.0_react-dom@18.0.0+react@18.0.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-p0lYA1M7uoEmk2LnCbZLGmHJHyH59sAaZVXChTXlyhV/PRW9LoIh4mdf7tiXsO8BoNG+vN8UnFJff1hbZeXv+w==,
|
||||
@@ -3579,7 +3553,7 @@ packages:
|
||||
react-dom: 18.0.0_react@18.0.0
|
||||
dev: true
|
||||
|
||||
/@testing-library/user-event/13.5.0_tlwynutqiyp5mns3woioasuxnq:
|
||||
/@testing-library/user-event/13.5.0_@testing-library+dom@8.13.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==,
|
||||
@@ -3659,7 +3633,7 @@ packages:
|
||||
"@babel/types": 7.12.10
|
||||
"@types/babel__generator": 7.6.4
|
||||
"@types/babel__template": 7.4.1
|
||||
"@types/babel__traverse": 7.17.1
|
||||
"@types/babel__traverse": 7.17.0
|
||||
|
||||
/@types/babel__generator/7.6.4:
|
||||
resolution:
|
||||
@@ -3678,10 +3652,10 @@ packages:
|
||||
"@babel/parser": 7.17.9
|
||||
"@babel/types": 7.12.10
|
||||
|
||||
/@types/babel__traverse/7.17.1:
|
||||
/@types/babel__traverse/7.17.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==,
|
||||
integrity: sha512-r8aveDbd+rzGP+ykSdF3oPuTVRWRfbBiHl0rVDM2yNEmSMXfkObQLV46b4RnCv3Lra51OlfnZhkkFaDl2MIRaA==,
|
||||
}
|
||||
dependencies:
|
||||
"@babel/types": 7.12.10
|
||||
@@ -4025,10 +3999,10 @@ packages:
|
||||
form-data: 3.0.1
|
||||
dev: true
|
||||
|
||||
/@types/node/12.20.50:
|
||||
/@types/node/12.20.48:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-+9axpWx2b2JCVovr7Ilgt96uc6C1zBKOQMpGtRbWT9IoR/8ue32GGMfGA4woP8QyP2gBs6GQWEVM3tCybGCxDA==,
|
||||
integrity: sha512-4kxzqkrpwYtn6okJUcb2lfUu9ilnb3yhUOH6qX3nug8D2DupZ2drIkff2yJzYcNJVl3begnlcaBJ7tqiTTzjnQ==,
|
||||
}
|
||||
dev: false
|
||||
|
||||
@@ -4250,14 +4224,14 @@ packages:
|
||||
"@types/jest": 27.4.1
|
||||
dev: true
|
||||
|
||||
/@types/testing-library__react-hooks/4.0.0_zpnidt7m3osuk7shl3s4oenomq:
|
||||
/@types/testing-library__react-hooks/4.0.0_react-dom@18.0.0+react@18.0.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-UzZUXthQtVjDruR2YA+hqg9ux5AfmZ8Kaw+QDungax+T7wb/5NC4x7YOpIqRx7oY3KksGQ69bzNE/xwzb5NslQ==,
|
||||
}
|
||||
deprecated: This is a stub types definition. @testing-library/react-hooks provides its own type definitions, so you do not need this installed.
|
||||
dependencies:
|
||||
"@testing-library/react-hooks": 7.0.2_zpnidt7m3osuk7shl3s4oenomq
|
||||
"@testing-library/react-hooks": 7.0.2_react-dom@18.0.0+react@18.0.0
|
||||
transitivePeerDependencies:
|
||||
- react
|
||||
- react-dom
|
||||
@@ -4299,7 +4273,7 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@typescript-eslint/eslint-plugin/5.9.1_rvfvfrvgktle2hmlnfpjw2zp4u:
|
||||
/@typescript-eslint/eslint-plugin/5.9.1_8d4b52c6a654d64d1d8b695e9b6b2fe5:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-Xv9tkFlyD4MQGpJgTo6wqDqGvHIRmRgah/2Sjz1PUnJTawjHWIwBivUE9x0QtU2WVii9baYgavo/bHjrZJkqTw==,
|
||||
@@ -4313,10 +4287,10 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils": 5.9.1_hrkuebk64jiu2ut2d2sm4oylnu
|
||||
"@typescript-eslint/parser": 5.9.1_hrkuebk64jiu2ut2d2sm4oylnu
|
||||
"@typescript-eslint/experimental-utils": 5.9.1_eslint@7.32.0+typescript@4.6.3
|
||||
"@typescript-eslint/parser": 5.9.1_eslint@7.32.0+typescript@4.6.3
|
||||
"@typescript-eslint/scope-manager": 5.9.1
|
||||
"@typescript-eslint/type-utils": 5.9.1_hrkuebk64jiu2ut2d2sm4oylnu
|
||||
"@typescript-eslint/type-utils": 5.9.1_eslint@7.32.0+typescript@4.6.3
|
||||
debug: 4.3.4
|
||||
eslint: 7.32.0
|
||||
functional-red-black-tree: 1.0.1
|
||||
@@ -4329,7 +4303,7 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@typescript-eslint/eslint-plugin/5.9.1_z2xqbpkx26iu62rx2zdto5f5qy:
|
||||
/@typescript-eslint/eslint-plugin/5.9.1_ceaf00bd57d7914f6a37d6473774bd86:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-Xv9tkFlyD4MQGpJgTo6wqDqGvHIRmRgah/2Sjz1PUnJTawjHWIwBivUE9x0QtU2WVii9baYgavo/bHjrZJkqTw==,
|
||||
@@ -4358,7 +4332,7 @@ packages:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/experimental-utils/5.9.1_hrkuebk64jiu2ut2d2sm4oylnu:
|
||||
/@typescript-eslint/experimental-utils/5.9.1_eslint@7.32.0+typescript@4.6.3:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-cb1Njyss0mLL9kLXgS/eEY53SZQ9sT519wpX3i+U457l2UXRDuo87hgKfgRazmu9/tQb0x2sr3Y0yrU+Zz0y+w==,
|
||||
@@ -4399,7 +4373,7 @@ packages:
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/parser/5.9.1_hrkuebk64jiu2ut2d2sm4oylnu:
|
||||
/@typescript-eslint/parser/5.9.1_eslint@7.32.0+typescript@4.6.3:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g==,
|
||||
@@ -4454,7 +4428,7 @@ packages:
|
||||
"@typescript-eslint/types": 5.9.1
|
||||
"@typescript-eslint/visitor-keys": 5.9.1
|
||||
|
||||
/@typescript-eslint/type-utils/5.9.1_hrkuebk64jiu2ut2d2sm4oylnu:
|
||||
/@typescript-eslint/type-utils/5.9.1_eslint@7.32.0+typescript@4.6.3:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-tRSpdBnPRssjlUh35rE9ug5HrUvaB9ntREy7gPXXKwmIx61TNN7+l5YKgi1hMKxo5NvqZCfYhA5FvyuJG6X6vg==,
|
||||
@@ -4467,7 +4441,7 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils": 5.9.1_hrkuebk64jiu2ut2d2sm4oylnu
|
||||
"@typescript-eslint/experimental-utils": 5.9.1_eslint@7.32.0+typescript@4.6.3
|
||||
debug: 4.3.4
|
||||
eslint: 7.32.0
|
||||
tsutils: 3.21.0_typescript@4.6.3
|
||||
@@ -4602,10 +4576,10 @@ packages:
|
||||
engines: {node: ">=0.4.0"}
|
||||
hasBin: true
|
||||
|
||||
/acorn/8.7.1:
|
||||
/acorn/8.7.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==,
|
||||
integrity: sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==,
|
||||
}
|
||||
engines: {node: ">=0.4.0"}
|
||||
hasBin: true
|
||||
@@ -4922,7 +4896,7 @@ packages:
|
||||
}
|
||||
engines: {node: ">=4"}
|
||||
dependencies:
|
||||
tslib: 2.4.0
|
||||
tslib: 2.3.1
|
||||
|
||||
/astral-regex/2.0.0:
|
||||
resolution:
|
||||
@@ -5072,7 +5046,7 @@ packages:
|
||||
"@babel/template": 7.16.7
|
||||
"@babel/types": 7.17.0
|
||||
"@types/babel__core": 7.1.19
|
||||
"@types/babel__traverse": 7.17.1
|
||||
"@types/babel__traverse": 7.17.0
|
||||
|
||||
/babel-preset-current-node-syntax/1.0.1_@babel+core@7.17.9:
|
||||
resolution:
|
||||
@@ -5309,18 +5283,18 @@ packages:
|
||||
integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==,
|
||||
}
|
||||
|
||||
/browserslist/4.20.3:
|
||||
/browserslist/4.20.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==,
|
||||
integrity: sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==,
|
||||
}
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001334
|
||||
electron-to-chromium: 1.4.124
|
||||
caniuse-lite: 1.0.30001332
|
||||
electron-to-chromium: 1.4.114
|
||||
escalade: 3.1.1
|
||||
node-releases: 2.0.4
|
||||
node-releases: 2.0.3
|
||||
picocolors: 1.0.0
|
||||
|
||||
/bs-logger/0.2.6:
|
||||
@@ -5489,10 +5463,10 @@ packages:
|
||||
}
|
||||
engines: {node: ">=10"}
|
||||
|
||||
/caniuse-lite/1.0.30001334:
|
||||
/caniuse-lite/1.0.30001332:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-kbaCEBRRVSoeNs74sCuq92MJyGrMtjWVfhltoHUCW4t4pXFvGjUBrfo47weBRViHkiV3eBYyIsfl956NtHGazw==,
|
||||
integrity: sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==,
|
||||
}
|
||||
|
||||
/chai/4.3.6:
|
||||
@@ -5948,20 +5922,20 @@ packages:
|
||||
engines: {node: ">=0.10.0"}
|
||||
dev: false
|
||||
|
||||
/core-js-compat/3.22.3:
|
||||
/core-js-compat/3.22.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-wliMbvPI2idgFWpFe7UEyHMvu6HWgW8WA+HnDRtgzoSDYvXFMpoGX1H3tPDDXrcfUSyXafCLDd7hOeMQHEZxGw==,
|
||||
integrity: sha512-CWbNqTluLMvZg1cjsQUbGiCM91dobSHKfDIyCoxuqxthdjGuUlaMbCsSehP3CBiVvG0C7P6UIrC1v0hgFE75jw==,
|
||||
}
|
||||
dependencies:
|
||||
browserslist: 4.20.3
|
||||
browserslist: 4.20.2
|
||||
semver: 7.0.0
|
||||
dev: false
|
||||
|
||||
/core-js-pure/3.22.3:
|
||||
/core-js-pure/3.22.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-oN88zz7nmKROMy8GOjs+LN+0LedIvbMdnB5XsTlhcOg1WGARt9l0LFg0zohdoFmCsEZ1h2ZbSQ6azj3M+vhzwQ==,
|
||||
integrity: sha512-TChjCtgcMDc8t12RiwAsThjqrS/VpBlEvDgL009ot4HESzBo3h2FSZNa6ZS1nWKZEPDoulnszxUll9n0/spflQ==,
|
||||
}
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
@@ -6122,16 +6096,16 @@ packages:
|
||||
whatwg-mimetype: 2.3.0
|
||||
whatwg-url: 8.7.0
|
||||
|
||||
/data-urls/3.0.2:
|
||||
/data-urls/3.0.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==,
|
||||
integrity: sha512-Ds554NeT5Gennfoo9KN50Vh6tpgtvYEwraYjejXnyTpu1C7oXKxdFk75REooENHE8ndTVOJuv+BEs4/J/xcozw==,
|
||||
}
|
||||
engines: {node: ">=12"}
|
||||
dependencies:
|
||||
abab: 2.0.6
|
||||
whatwg-mimetype: 3.0.0
|
||||
whatwg-url: 11.0.0
|
||||
whatwg-url: 10.0.0
|
||||
dev: false
|
||||
|
||||
/dayjs/1.11.1:
|
||||
@@ -6494,10 +6468,10 @@ packages:
|
||||
resolution: {integrity: sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk=}
|
||||
dev: true
|
||||
|
||||
/dom-accessibility-api/0.5.14:
|
||||
/dom-accessibility-api/0.5.13:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-NMt+m9zFMPZe0JcY9gN224Qvk6qLIdqex29clBvc/y75ZBX9YA9wNK3frsYvu2DI1xcCIwxwnX+TlsJ2DSOADg==,
|
||||
integrity: sha512-R305kwb5CcMDIpSHUnLyIAp7SrSPBx6F0VfQFB3M75xVMHhXJJIdePYgbPPh1o57vCHNu5QztokWUPsLjWzFqw==,
|
||||
}
|
||||
dev: true
|
||||
|
||||
@@ -6616,10 +6590,10 @@ packages:
|
||||
jake: 10.8.5
|
||||
dev: false
|
||||
|
||||
/electron-to-chromium/1.4.124:
|
||||
/electron-to-chromium/1.4.114:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-VhaE9VUYU6d2eIb+4xf83CATD+T+3bTzvxvlADkQE+c2hisiw3sZmvEDtsW704+Zky9WZGhBuQXijDVqSriQLA==,
|
||||
integrity: sha512-gRwLpVYWHGbERPU6o8pKfR168V6enWEXzZc6zQNNXbgJ7UJna+9qzAIHY94+9KOv71D/CH+QebLA9pChD2q8zA==,
|
||||
}
|
||||
|
||||
/emittery/0.8.1:
|
||||
@@ -6711,7 +6685,7 @@ packages:
|
||||
object.assign: 4.1.2
|
||||
string.prototype.trimend: 1.0.4
|
||||
string.prototype.trimstart: 1.0.4
|
||||
unbox-primitive: 1.0.2
|
||||
unbox-primitive: 1.0.1
|
||||
dev: false
|
||||
|
||||
/es-module-lexer/0.9.3:
|
||||
@@ -7538,11 +7512,11 @@ packages:
|
||||
"@rushstack/eslint-patch": 1.1.3
|
||||
"@typescript-eslint/parser": 5.9.1_typescript@4.6.3
|
||||
eslint-import-resolver-node: 0.3.6
|
||||
eslint-import-resolver-typescript: 2.7.1_fkfqfehjtk7sk2efaqbgxsuasa
|
||||
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.5.0
|
||||
eslint-plugin-react-hooks: 4.4.0
|
||||
typescript: 4.6.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -7568,7 +7542,7 @@ packages:
|
||||
resolve: 1.22.0
|
||||
dev: false
|
||||
|
||||
/eslint-import-resolver-typescript/2.7.1_fkfqfehjtk7sk2efaqbgxsuasa:
|
||||
/eslint-import-resolver-typescript/2.7.1_eslint-plugin-import@2.26.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ==,
|
||||
@@ -7646,10 +7620,10 @@ packages:
|
||||
minimatch: 3.1.2
|
||||
dev: false
|
||||
|
||||
/eslint-plugin-react-hooks/4.5.0:
|
||||
/eslint-plugin-react-hooks/4.4.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw==,
|
||||
integrity: sha512-U3RVIfdzJaeKDQKEJbz5p3NW8/L80PCATJAfuojwbaEL+gBjfGdhUcGde+WGUW46Q5sr/NgxevsIiDtNXrvZaQ==,
|
||||
}
|
||||
engines: {node: ">=10"}
|
||||
peerDependencies:
|
||||
@@ -8294,10 +8268,10 @@ packages:
|
||||
integrity: sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==,
|
||||
}
|
||||
|
||||
/flow-parser/0.176.3:
|
||||
/flow-parser/0.176.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-KDzHEoEtc/kbW7NzujhfFkcTCdNi6VK91UpcdT3tc3yEAQdh4JXAEY/0TVJKipjRuVm8E2FxX/3B5Xpm3EFWXA==,
|
||||
integrity: sha512-unqoh60i18C67h2rvK0SCFUBac/waUcx7CF1a5E4D0Cwj1NErTP42RF7yb7+dy25Tpyzt7uwVtXw13Wr17VzWA==,
|
||||
}
|
||||
engines: {node: ">=0.4.0"}
|
||||
dev: false
|
||||
@@ -9756,7 +9730,7 @@ packages:
|
||||
pretty-format: 27.5.1
|
||||
slash: 3.0.0
|
||||
strip-json-comments: 3.1.1
|
||||
ts-node: 10.7.0_fxg3r7oju3tntkxsvleuiot4fa
|
||||
ts-node: 10.7.0_2dcdb8fdc9a6e6d9aaf2aac9443a7c28
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- canvas
|
||||
@@ -10078,7 +10052,7 @@ packages:
|
||||
"@babel/types": 7.17.0
|
||||
"@jest/transform": 27.5.1
|
||||
"@jest/types": 27.5.1
|
||||
"@types/babel__traverse": 7.17.1
|
||||
"@types/babel__traverse": 7.17.0
|
||||
"@types/prettier": 2.6.0
|
||||
babel-preset-current-node-syntax: 1.0.1_@babel+core@7.17.9
|
||||
chalk: 4.1.2
|
||||
@@ -10250,7 +10224,7 @@ packages:
|
||||
"@babel/register": 7.17.7_@babel+core@7.17.9
|
||||
babel-core: 7.0.0-bridge.0_@babel+core@7.17.9
|
||||
colors: 1.4.0
|
||||
flow-parser: 0.176.3
|
||||
flow-parser: 0.176.2
|
||||
graceful-fs: 4.2.10
|
||||
micromatch: 3.1.10
|
||||
neo-async: 2.6.2
|
||||
@@ -10275,7 +10249,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
abab: 2.0.6
|
||||
acorn: 8.7.1
|
||||
acorn: 8.7.0
|
||||
acorn-globals: 6.0.0
|
||||
cssom: 0.4.4
|
||||
cssstyle: 2.3.0
|
||||
@@ -10319,11 +10293,11 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
abab: 2.0.6
|
||||
acorn: 8.7.1
|
||||
acorn: 8.7.0
|
||||
acorn-globals: 6.0.0
|
||||
cssom: 0.5.0
|
||||
cssstyle: 2.3.0
|
||||
data-urls: 3.0.2
|
||||
data-urls: 3.0.1
|
||||
decimal.js: 10.3.1
|
||||
domexception: 4.0.0
|
||||
escodegen: 2.0.0
|
||||
@@ -11496,7 +11470,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
"@next/env": 12.1.1
|
||||
caniuse-lite: 1.0.30001334
|
||||
caniuse-lite: 1.0.30001332
|
||||
postcss: 8.4.5
|
||||
styled-jsx: 5.0.1
|
||||
use-subscription: 1.5.1
|
||||
@@ -11518,7 +11492,7 @@ packages:
|
||||
- babel-plugin-macros
|
||||
dev: false
|
||||
|
||||
/next/12.1.1_zpnidt7m3osuk7shl3s4oenomq:
|
||||
/next/12.1.1_react-dom@18.0.0+react@18.0.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-IOfEIAgroMtsoYz6HXpDS+b5WB9WZ+MH266COXGlcpIiYSgUyJf9xV6vF+zY2RPvBJFT4fUW0EVdVnoOmTloDw==,
|
||||
@@ -11540,7 +11514,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
"@next/env": 12.1.1
|
||||
caniuse-lite: 1.0.30001334
|
||||
caniuse-lite: 1.0.30001332
|
||||
postcss: 8.4.5
|
||||
react: 18.0.0
|
||||
react-dom: 18.0.0_react@18.0.0
|
||||
@@ -11608,10 +11582,10 @@ packages:
|
||||
/node-int64/0.4.0:
|
||||
resolution: {integrity: sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=}
|
||||
|
||||
/node-releases/2.0.4:
|
||||
/node-releases/2.0.3:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==,
|
||||
integrity: sha512-maHFz6OLqYxz+VQyCAtA3PTX4UP/53pa05fyDNc9CwjvJ0yEh6+xBwKsgCxMNhS8taUKBFYxfuiaD9U/55iFaw==,
|
||||
}
|
||||
|
||||
/nodemailer/6.7.0:
|
||||
@@ -12863,7 +12837,7 @@ packages:
|
||||
integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==,
|
||||
}
|
||||
|
||||
/react-query/3.21.1_zpnidt7m3osuk7shl3s4oenomq:
|
||||
/react-query/3.21.1_react-dom@18.0.0+react@18.0.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-aKFLfNJc/m21JBXJk7sR9tDUYPjotWA4EHAKvbZ++GgxaY+eI0tqBxXmGBuJo0Pisis1W4pZWlZgoRv9yE8yjA==,
|
||||
@@ -12968,7 +12942,7 @@ packages:
|
||||
ast-types: 0.14.2
|
||||
esprima: 4.0.1
|
||||
source-map: 0.6.1
|
||||
tslib: 2.4.0
|
||||
tslib: 2.3.1
|
||||
|
||||
/redent/3.0.0:
|
||||
resolution:
|
||||
@@ -13285,7 +13259,7 @@ packages:
|
||||
dependencies:
|
||||
glob: 7.2.0
|
||||
|
||||
/rollup-plugin-dts/4.2.1_nmerszcjz2rfjina4mudxa4qka:
|
||||
/rollup-plugin-dts/4.2.1_rollup@2.70.2+typescript@4.6.3:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-eaxQZNUJ5iQcxNGlpJ1CUgG4OSVqWjDZ3nNSWBIoGrpcote2aNphSe1RJOaSYkb8dwn3o+rYm1vvld/5z3EGSQ==,
|
||||
@@ -13302,7 +13276,7 @@ packages:
|
||||
"@babel/code-frame": 7.16.7
|
||||
dev: true
|
||||
|
||||
/rollup-plugin-esbuild/4.9.1_spogcnvgx2zlfpppdv5errowom:
|
||||
/rollup-plugin-esbuild/4.9.1_esbuild@0.14.36+rollup@2.70.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-qn/x7Wz9p3Xnva99qcb+nopH0d2VJwVnsxJTGEg+Sh2Z3tqQl33MhOwzekVo1YTKgv+yAmosjcBRJygMfGrtLw==,
|
||||
@@ -13347,7 +13321,7 @@ packages:
|
||||
integrity: sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==,
|
||||
}
|
||||
dependencies:
|
||||
tslib: 2.4.0
|
||||
tslib: 2.3.1
|
||||
|
||||
/safe-buffer/5.1.2:
|
||||
resolution:
|
||||
@@ -14118,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:
|
||||
@@ -14296,10 +14289,10 @@ packages:
|
||||
readable-stream: 3.6.0
|
||||
dev: false
|
||||
|
||||
/tinypool/0.1.3:
|
||||
/tinypool/0.1.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-2IfcQh7CP46XGWGGbdyO4pjcKqsmVqFAPcXfPxcPXmOWt9cYkTP9HcDmGgsfijYoAEc4z9qcpM/BaBz46Y9/CQ==,
|
||||
integrity: sha512-fvtYGXoui2RpeMILfkvGIgOVkzJEGediv8UJt7TxdAOY8pnvUkFg/fkvqTfXG9Acc9S17Cnn1S4osDc2164guA==,
|
||||
}
|
||||
engines: {node: ">=14.0.0"}
|
||||
dev: false
|
||||
@@ -14496,7 +14489,7 @@ packages:
|
||||
yargs-parser: 20.2.9
|
||||
dev: true
|
||||
|
||||
/ts-node/10.7.0_fxg3r7oju3tntkxsvleuiot4fa:
|
||||
/ts-node/10.7.0_2dcdb8fdc9a6e6d9aaf2aac9443a7c28:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==,
|
||||
@@ -14519,7 +14512,7 @@ packages:
|
||||
"@tsconfig/node14": 1.0.1
|
||||
"@tsconfig/node16": 1.0.2
|
||||
"@types/node": 17.0.16
|
||||
acorn: 8.7.1
|
||||
acorn: 8.7.0
|
||||
acorn-walk: 8.2.0
|
||||
arg: 4.1.3
|
||||
create-require: 1.1.1
|
||||
@@ -14552,7 +14545,7 @@ packages:
|
||||
"@tsconfig/node12": 1.0.9
|
||||
"@tsconfig/node14": 1.0.1
|
||||
"@tsconfig/node16": 1.0.2
|
||||
acorn: 8.7.1
|
||||
acorn: 8.7.0
|
||||
acorn-walk: 8.2.0
|
||||
arg: 4.1.3
|
||||
create-require: 1.1.1
|
||||
@@ -14581,10 +14574,10 @@ packages:
|
||||
integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==,
|
||||
}
|
||||
|
||||
/tslib/2.4.0:
|
||||
/tslib/2.3.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==,
|
||||
integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==,
|
||||
}
|
||||
|
||||
/tslog/3.3.1:
|
||||
@@ -14874,13 +14867,13 @@ packages:
|
||||
}
|
||||
dev: true
|
||||
|
||||
/unbox-primitive/1.0.2:
|
||||
/unbox-primitive/1.0.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==,
|
||||
integrity: sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==,
|
||||
}
|
||||
dependencies:
|
||||
call-bind: 1.0.2
|
||||
function-bind: 1.1.1
|
||||
has-bigints: 1.0.2
|
||||
has-symbols: 1.0.3
|
||||
which-boxed-primitive: 1.0.2
|
||||
@@ -14915,8 +14908,8 @@ packages:
|
||||
pretty-bytes: 5.6.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 2.70.2
|
||||
rollup-plugin-dts: 4.2.1_nmerszcjz2rfjina4mudxa4qka
|
||||
rollup-plugin-esbuild: 4.9.1_spogcnvgx2zlfpppdv5errowom
|
||||
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
|
||||
@@ -15180,10 +15173,10 @@ packages:
|
||||
replace-ext: 1.0.1
|
||||
dev: false
|
||||
|
||||
/vite/2.9.6:
|
||||
/vite/2.9.5:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-3IffdrByHW95Yjv0a13TQOQfJs7L5dVlSPuTt432XLbRMriWbThqJN2k/IS6kXn5WY4xBLhK9XoaWay1B8VzUw==,
|
||||
integrity: sha512-dvMN64X2YEQgSXF1lYabKXw3BbN6e+BL67+P3Vy4MacnY+UzT1AfkHiioFSi9+uiDUiaDy7Ax/LQqivk6orilg==,
|
||||
}
|
||||
engines: {node: ">=12.2.0"}
|
||||
hasBin: true
|
||||
@@ -15234,9 +15227,9 @@ packages:
|
||||
chai: 4.3.6
|
||||
jsdom: 19.0.0
|
||||
local-pkg: 0.4.1
|
||||
tinypool: 0.1.3
|
||||
tinypool: 0.1.2
|
||||
tinyspy: 0.3.2
|
||||
vite: 2.9.6
|
||||
vite: 2.9.5
|
||||
transitivePeerDependencies:
|
||||
- less
|
||||
- sass
|
||||
@@ -15353,7 +15346,7 @@ packages:
|
||||
engines: {node: ">= 10.13.0"}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
acorn: 8.7.1
|
||||
acorn: 8.7.0
|
||||
acorn-walk: 8.2.0
|
||||
chalk: 4.1.2
|
||||
commander: 6.2.1
|
||||
@@ -15410,17 +15403,6 @@ packages:
|
||||
webidl-conversions: 7.0.0
|
||||
dev: false
|
||||
|
||||
/whatwg-url/11.0.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==,
|
||||
}
|
||||
engines: {node: ">=12"}
|
||||
dependencies:
|
||||
tr46: 3.0.0
|
||||
webidl-conversions: 7.0.0
|
||||
dev: false
|
||||
|
||||
/whatwg-url/8.7.0:
|
||||
resolution:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user