Compare commits
13 Commits
@blitzjs/n
...
prisma-pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a074ec4f00 | ||
|
|
e9dfbcf85a | ||
|
|
a4294ad29c | ||
|
|
ea83f0d174 | ||
|
|
f32f6d3ac9 | ||
|
|
d5b8faa860 | ||
|
|
4a6612b942 | ||
|
|
c941d993a8 | ||
|
|
3633f23ceb | ||
|
|
10f98c681d | ||
|
|
0025856b9e | ||
|
|
77b7da0f38 | ||
|
|
d222b63e28 |
@@ -3775,6 +3775,36 @@
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "a11rew",
|
||||
"name": "Andrew Glago",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/87580113?v=4",
|
||||
"profile": "a11rew.dev",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "tordans",
|
||||
"name": "Tobias",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/111561?v=4",
|
||||
"profile": "http://tobiasjordans.de",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "iagormoraes",
|
||||
"name": "Iagor Moraes",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/13892132?v=4",
|
||||
"profile": "https://www.linkedin.com/in/iagor-moraes/",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
|
||||
5
.changeset/chilly-candles-care.md
Normal file
5
.changeset/chilly-candles-care.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Remove husky prepush hook & update precommit hook to only run prettier
|
||||
5
.changeset/giant-clocks-mate.md
Normal file
5
.changeset/giant-clocks-mate.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
A prisma helper function that converts nested array fields to the prisma api format and use the correct CRUD method based on initial form data.
|
||||
5
.changeset/stupid-rabbits-jump.md
Normal file
5
.changeset/stupid-rabbits-jump.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/rpc": patch
|
||||
---
|
||||
|
||||
Support full api of tanstack invalidateQueries
|
||||
6
.changeset/thick-moons-fry.md
Normal file
6
.changeset/thick-moons-fry.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@blitzjs/next": patch
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Add an href property to the generated route manifest that will return a string of the pathname and included query params.
|
||||
5
.changeset/three-toes-sell.md
Normal file
5
.changeset/three-toes-sell.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
add regex to support inline and non-inline codebase and proper next.js package version check
|
||||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -141,7 +141,7 @@ jobs:
|
||||
- name: Install playwright
|
||||
run: |
|
||||
npm i -g playwright
|
||||
PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install
|
||||
PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install --with-deps
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<img alt="" src="https://img.shields.io/badge/Join%20our%20community-6700EB.svg?style=for-the-badge&labelColor=000000&logoWidth=20&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQ9SURBVHgB7d3dVdtAEIbhcSpICUoH0IEogQqSVBBSAU4FSSpIOoAORAfQgSghHXzZ1U/YcMD4R9rZmf2ec3y448LyiNf27iLiGIAmPLrweC9Un3DhrzG6EarLNP09nlwJ1SOZ/lQr5N80/S/p2QMVCBf5N17XCfm1Y/rBHqjAG9PPHvBsz+mf9WAP+HLA9M/YA14cOP2payH7jpj+VCtk1wnTP+vj7xCy6cTpn7EHLMLp059iD1iD8eveJbVCNsSLheX1YA/YgOWnf8YeKB3Wmf7Ud6Fy4f/FHmtpxbl3YlC4MJ/Cj0bWdwPnPbARg+L0S54XQHS32WwuxClzd4CM0z9rPfeAuTtA5ulPXYQ7wZ04Y+oOoDD9KZc9YOoOoDj9s4dwFzgXR6w1wIPoOvPWA9buAHEJ173o3gWiy3AnuBUHLEbgmYwvAk1/wuM8vAgexThzbwPDkx7/DHwVXfFOxP2GmsKd4Ab6zPeAyU8CI7AHFmH2BRCBPXAyk18GzUrqAXCTiR4ssyj0VFw/oCU8+e+RZ33AWz6KMaYbIIWxB+JSLs1bsbkeMN0AqakHvoku9oA2sAfqBvbAQdw0QArsgb25aYBUQT3QgT2gB+yBuqGcHij2UCqXDZACe2Anlw2QYg/QAOyBuoE98CL3DZDCuK4/rh/Q7oGL6U+TOvcNkJoijN8X1C48+T+g75eQDrAH/qmqAVJgDwyqaoAUe4AGYA/UDZX3QLUNkEIZPRCd5+6BahsgVUgPROwBTSijB7jpVAvGHriHvmw9wAZ4BpX1ABvgmakHtPcbRuwBTWAPULgAV9D/jKDY9YRvwvgEaurD44uQHvAol7qBW7WKluVtIHiUS7GyvA0s6CiXDnxrpQfsgbqBS7GKk/2jYHCrVlGyfxTMrVo0ALdq1Q3sgSKofh0M9oA61a+D2QM0AHugbmAPqClmSRjK2apVVQ8UsySsoK1aHdgDesCtWnUDeyCrIpeFg1u3sylyWTi3btMA7IG6gT2wuuK3hoE9sKrit4YVslWLPaAN7IG6ocKt2zmY2h4O9sDiTG0PZw/QANy6XTewBxZj9ogYVHy025LMHhEz9cBn0We6B0yfERReBLfhx0/R1YQHPx/QBPbA0VwcEwf2wNFcHBPHHjiem3MC2QPHcXdSaJjA+KfgTPQ8hhfjBzHC40mhlzJ+Xq9lK4a4PCs43AVaGTed5mZq+iOXZwWHi3AnOj2wFWNcnxYe7gTxLtBKHuamP/J+Wnh8a5irB7ZC5Yk9gPX1QuXC+usHWqGyhYvUYR0a7zboUOFCNVhnk0krZAOW7wFOvzXhom2xnEbIHizTA1wEYhWW6YFGyC6c1gOcfg9wfA80Qj7g8B7g9HuCww+haIR8wf49wOn3Cvv9k8tGyC/s7gFOv3fY3QONkH+v9MBWqB7PeqDn9FcIT//kcitUn6kHOu/T/xfWzlQy3dEHhwAAAABJRU5ErkJggg==">
|
||||
</a>
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-399-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
|
||||
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-402-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/main/LICENSE">
|
||||
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
|
||||
@@ -734,6 +734,11 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
|
||||
<td align="center"><a href="https://github.com/selcukfatihsevinc"><img src="https://avatars.githubusercontent.com/u/384836?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Selçuk Fatih Sevinç</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=selcukfatihsevinc" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=selcukfatihsevinc" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/usamaster"><img src="https://avatars.githubusercontent.com/u/5255330?v=4?s=100" width="100px;" alt=""/><br /><sub><b>usamaster</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=usamaster" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="a11rew.dev"><img src="https://avatars.githubusercontent.com/u/87580113?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Glago</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=a11rew" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=a11rew" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://tobiasjordans.de"><img src="https://avatars.githubusercontent.com/u/111561?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tobias</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://www.linkedin.com/in/iagor-moraes/"><img src="https://avatars.githubusercontent.com/u/13892132?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Iagor Moraes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=iagormoraes" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=iagormoraes" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-restore -->
|
||||
|
||||
@@ -67,7 +67,7 @@ Here is the starting structure of your app.
|
||||
|
||||
```
|
||||
__name__
|
||||
├── app/
|
||||
├── src/
|
||||
│ ├── api/
|
||||
│ ├── auth/
|
||||
│ │ ├── components/
|
||||
@@ -131,7 +131,7 @@ __name__
|
||||
|
||||
These files are:
|
||||
|
||||
- The `app/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
- The `src/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
|
||||
- `db/` is where your database configuration goes. If you’re writing models or checking migrations, this is where to go.
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ Here is the starting structure of your app.
|
||||
|
||||
```
|
||||
__name__
|
||||
├── app/
|
||||
├── src/
|
||||
│ ├── api/
|
||||
│ ├── auth/
|
||||
│ │ ├── components/
|
||||
@@ -122,7 +122,7 @@ __name__
|
||||
├── .eslintrc.js
|
||||
├── babel.config.js
|
||||
├── blitz.config.ts
|
||||
├── jest.config.ts
|
||||
├── vitest.config.ts
|
||||
├── package.json
|
||||
├── README.md
|
||||
├── tsconfig.json
|
||||
@@ -131,7 +131,7 @@ __name__
|
||||
|
||||
These files are:
|
||||
|
||||
- The `app/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
- The `src/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
|
||||
- `db/` is where your database configuration goes. If you’re writing models or checking migrations, this is where to go.
|
||||
|
||||
@@ -149,7 +149,7 @@ These files are:
|
||||
|
||||
- `blitz.config.ts` is for advanced custom configuration of Blitz. [Here you can learn how to use it](https://blitzjs.com/docs/blitz-config).
|
||||
|
||||
- `jest.config.js` contains config for Jest tests. You can [customize it if needed](https://jestjs.io/docs/en/configuration).
|
||||
- `vitest.config.ts` contains config for Vitest tests. You can [customize it if needed](https://vitejs.dev/config/).
|
||||
|
||||
You can read more about it in the [File Structure](https://blitzjs.com/docs/file-structure) section of the documentation.
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export const SignupForm = (props: SignupFormProps) => {
|
||||
props.onSuccess?.()
|
||||
} catch (error: any) {
|
||||
if (error.code === "P2002" && error.meta?.target?.includes("email")) {
|
||||
// This error comes from Prisma
|
||||
// Error "P2002" comes from Prisma (https://www.prisma.io/docs/reference/api-reference/error-reference#p2002)
|
||||
return { email: "This email is already being used" }
|
||||
} else {
|
||||
return { [FORM_ERROR]: error.toString() }
|
||||
|
||||
@@ -51,7 +51,7 @@ export type BlitzProviderProps = {
|
||||
hydrateOptions?: HydrateOptions
|
||||
}
|
||||
|
||||
interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query"> {
|
||||
interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query" | "href"> {
|
||||
pathname: string
|
||||
}
|
||||
|
||||
|
||||
@@ -164,23 +164,20 @@ export function getInfiniteQueryKey<TInput, TResult, T extends AsyncFunc>(
|
||||
return [...queryKey, "infinite"]
|
||||
}
|
||||
|
||||
type InvalidateQueryTypeWithParams = <TInput, TResult, T extends AsyncFunc>(
|
||||
resolver: T | Resolver<TInput, TResult> | RpcClient<TInput, TResult>,
|
||||
...params: [TInput]
|
||||
) => Promise<void>
|
||||
type InvalidateQueryTypeAllQueries = <TInput, TResult, T extends AsyncFunc>(
|
||||
resolver: T | Resolver<TInput, TResult> | RpcClient<TInput, TResult>,
|
||||
) => Promise<void>
|
||||
type InvalidateQueryType = InvalidateQueryTypeWithParams & InvalidateQueryTypeAllQueries
|
||||
interface InvalidateQuery {
|
||||
<TInput, TResult, T extends AsyncFunc>(
|
||||
resolver: T | Resolver<TInput, TResult> | RpcClient<TInput, TResult>,
|
||||
...params: [TInput]
|
||||
): Promise<void>
|
||||
<TInput, TResult, T extends AsyncFunc>(
|
||||
resolver: T | Resolver<TInput, TResult> | RpcClient<TInput, TResult>,
|
||||
): Promise<void>
|
||||
(): Promise<void>
|
||||
}
|
||||
|
||||
export const invalidateQuery: InvalidateQueryType = (resolver, ...params: []) => {
|
||||
if (typeof resolver === "undefined") {
|
||||
throw new Error(
|
||||
"invalidateQuery is missing the first argument - it must be a resolver function",
|
||||
)
|
||||
}
|
||||
|
||||
const fullQueryKey = getQueryKey(resolver, ...params)
|
||||
export const invalidateQuery: InvalidateQuery = (resolver = undefined, ...params: []) => {
|
||||
const fullQueryKey =
|
||||
typeof resolver === "undefined" ? undefined : getQueryKey(resolver, ...params)
|
||||
return getQueryClient().invalidateQueries(fullQueryKey)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {runPrisma} from "../../utils/run-prisma"
|
||||
import resolveFrom from "resolve-from"
|
||||
export const codegenTasks = async () => {
|
||||
try {
|
||||
/*
|
||||
/*
|
||||
Updates the user's nextjs file and adds onRecoverableError to the hydrateRoot 3rd parameter object.
|
||||
We can remove this when https://github.com/vercel/next.js/pull/38207 is merged into next.js
|
||||
*/
|
||||
@@ -18,7 +18,7 @@ export const codegenTasks = async () => {
|
||||
const readFile = await fs.readFile(nextClientIndex)
|
||||
const packageJson = await getPackageJson()
|
||||
const nextVersion = packageJson.dependencies.next
|
||||
if (nextVersion && nextVersion.startsWith("12")) {
|
||||
if (nextVersion && /^([~^])?12/.test(nextVersion)) {
|
||||
const updatedFile = readFile
|
||||
.toString()
|
||||
.replace(
|
||||
@@ -27,11 +27,11 @@ export const codegenTasks = async () => {
|
||||
)
|
||||
await fs.writeFile(nextClientIndex, updatedFile)
|
||||
log.success("Next.js was successfully patched with a React Suspense fix")
|
||||
} else if (nextVersion && nextVersion.startsWith("13")) {
|
||||
} else if (nextVersion && /^([~^])?13/.test(nextVersion)) {
|
||||
const updatedFile = readFile
|
||||
.toString()
|
||||
.replace(
|
||||
/_client.default\.hydrateRoot\(.*?\);/,
|
||||
/_client\.default\.hydrateRoot\(.*?\{?[\s\S]*?}?\);/,
|
||||
`_client.default.hydrateRoot(domEl, reactEl, {onRecoverableError: (err) => (err.toString().includes("could not finish this Suspense boundary") || err.toString().includes("Minified React error #419")) ? null : console.error(err)});`,
|
||||
)
|
||||
await fs.writeFile(nextClientIndex, updatedFile)
|
||||
|
||||
@@ -368,9 +368,32 @@ export function setupManifest(routes: Record<string, RouteManifestEntry>): {
|
||||
const routesWithoutDuplicates = dedupeBy(Object.entries(routes), ([_path, {name}]) => name)
|
||||
|
||||
const implementationLines = routesWithoutDuplicates.map(
|
||||
([path, {name}]) => `${name}: (query) => ({ pathname: "${path}", query })`,
|
||||
([path, {name}]) => `${name}: (query) => ({
|
||||
pathname: "${path}",
|
||||
query,
|
||||
href: query
|
||||
? replaceSlugsWithValues(
|
||||
"${path}",
|
||||
Object.keys(query),
|
||||
Object.values(query)
|
||||
)
|
||||
: "${path}",
|
||||
})`,
|
||||
)
|
||||
|
||||
const implementationHelpers = [
|
||||
`function replaceSlugsWithValues(str, slugs, values) {
|
||||
let result = str;
|
||||
slugs.forEach((slug, i) => {
|
||||
const value = values[i];
|
||||
if (value) {
|
||||
result = result.replace('[' + slug + ']', String(value));
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}`,
|
||||
]
|
||||
|
||||
const declarationLines = routesWithoutDuplicates.map(
|
||||
([_path, {name, parameters, multipleParameters}]) => {
|
||||
if (parameters.length === 0 && multipleParameters.length === 0) {
|
||||
@@ -392,7 +415,11 @@ export function setupManifest(routes: Record<string, RouteManifestEntry>): {
|
||||
|
||||
return {
|
||||
implementation:
|
||||
"exports.Routes = {\n" + implementationLines.map((line) => " " + line).join(",\n") + "\n}",
|
||||
"exports.Routes = {\n" +
|
||||
implementationLines.map((line) => " " + line).join(",\n") +
|
||||
"\n}" +
|
||||
"\n" +
|
||||
implementationHelpers.join("\n"),
|
||||
declaration: `
|
||||
import type { ParsedUrlQueryInput } from "querystring"
|
||||
import type { RouteUrlObject } from "blitz"
|
||||
|
||||
@@ -6,6 +6,7 @@ export * from "./index-browser"
|
||||
export * from "./types"
|
||||
export * from "./utils/run-prisma"
|
||||
export * from "./utils/enhance-prisma"
|
||||
export {prepareArrayField} from "./utils/prisma-prepare-array"
|
||||
export * from "./middleware"
|
||||
export * from "./paginate"
|
||||
export * from "./logging"
|
||||
|
||||
@@ -79,8 +79,8 @@ export async function executeCommand(input: CliCommand): Promise<void> {
|
||||
const cp = spawn(`${command[0]}`, command.slice(1), {
|
||||
stdio: ["inherit", "pipe", "pipe"],
|
||||
})
|
||||
cp.on("exit", resolve);
|
||||
cp.stdout.on('data', () => {});
|
||||
cp.on("exit", resolve)
|
||||
cp.stdout.on("data", () => {})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,13 @@ import {UrlObject} from "url"
|
||||
// Context for plugins to declaration merge stuff into
|
||||
export interface Ctx {}
|
||||
|
||||
export interface AuthenticatedMiddlewareCtx {}
|
||||
|
||||
export interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query"> {
|
||||
export interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query" | "href"> {
|
||||
pathname: string
|
||||
href: string
|
||||
}
|
||||
|
||||
export interface AuthenticatedMiddlewareCtx {}
|
||||
|
||||
export type EventHooks = {
|
||||
onSessionCreated?: OnSessionCreated
|
||||
onRpcError?: OnRpcError
|
||||
@@ -35,7 +36,13 @@ export type BlitzCliConfig = {
|
||||
}
|
||||
|
||||
export const isRouteUrlObject = (x: any): x is RouteUrlObject => {
|
||||
return typeof x === "object" && "pathname" in x && typeof x.pathname === "string"
|
||||
return (
|
||||
typeof x === "object" &&
|
||||
"pathname" in x &&
|
||||
typeof x.pathname === "string" &&
|
||||
"href" in x &&
|
||||
typeof x.href === "string"
|
||||
)
|
||||
}
|
||||
|
||||
export type AsyncFunc = (...args: any) => Promise<any>
|
||||
|
||||
@@ -40,7 +40,9 @@ export const enhancePrisma = <TPrismaClientCtor extends Constructor>(
|
||||
const process = spawn(prismaBin, ["migrate", "reset", "--force", "--skip-generate"], {
|
||||
stdio: "ignore",
|
||||
})
|
||||
process.on("exit", (code) => (code === 0 ? res(0) : rej(new Error(`db.$reset() failed with code ${code}`))))
|
||||
process.on("exit", (code) =>
|
||||
code === 0 ? res(0) : rej(new Error(`db.$reset() failed with code ${code}`)),
|
||||
)
|
||||
})
|
||||
globalThis._blitz_prismaClient.$disconnect()
|
||||
}
|
||||
|
||||
125
packages/blitz/src/utils/prisma-prepare-array.ts
Normal file
125
packages/blitz/src/utils/prisma-prepare-array.ts
Normal file
@@ -0,0 +1,125 @@
|
||||
type Options = {
|
||||
removedItemsMethod?: "delete" | "disconnect"
|
||||
}
|
||||
|
||||
function isDeepEqual(val1: any, val2: any): boolean {
|
||||
if (val1 === val2) {
|
||||
return true
|
||||
} else if (typeof val1 === "object" && typeof val2 === "object") {
|
||||
if (val1 === null || val2 === null) {
|
||||
return val1 === val2
|
||||
} else if (Array.isArray(val1) && Array.isArray(val2)) {
|
||||
if (val1.length !== val2.length) {
|
||||
return false
|
||||
}
|
||||
for (let i = 0; i < val1.length; i++) {
|
||||
if (!isDeepEqual(val1[i], val2[i])) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
const keys1 = Object.keys(val1)
|
||||
const keys2 = Object.keys(val2)
|
||||
if (keys1.length !== keys2.length) {
|
||||
return false
|
||||
}
|
||||
for (const key of keys1) {
|
||||
if (!isDeepEqual(val1[key], val2[key])) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* helper to convert array-like fields into Prisma Api format
|
||||
* it converts arrays like [ 1,2,3 ] to something like { create: [1,2,3] }
|
||||
* @example
|
||||
* value = [ {name: 1}, {id: 2, name: 3} ]
|
||||
* initial = [ {id: 2, name: 2}, {id: 3} ]
|
||||
* prepareArrayField(value, initial)
|
||||
* // returns
|
||||
* {
|
||||
* create: [ {name: 1} ],
|
||||
* update: [ { data: {name: 3}, where: {id: 2} } ],
|
||||
* remove: [ {id: 3} ]
|
||||
* }
|
||||
*/
|
||||
export function prepareArrayField(
|
||||
value: any[],
|
||||
initial?: any[],
|
||||
mapper?: null | ((item: any, initial?: any) => any),
|
||||
{removedItemsMethod = "delete"}: Options = {},
|
||||
) {
|
||||
value = value.filter(Boolean)
|
||||
|
||||
const valueById = value.reduce((res, item) => {
|
||||
item.id && (res[item.id] = item)
|
||||
return res
|
||||
}, {})
|
||||
|
||||
const initialById =
|
||||
initial?.reduce((res, item) => {
|
||||
item.id && (res[item.id] = item)
|
||||
return res
|
||||
}, {}) || {}
|
||||
|
||||
const create: any[] = []
|
||||
const connect: any[] = []
|
||||
const update: any[] = []
|
||||
const remove = initial?.filter(({id}) => !valueById[id])
|
||||
|
||||
for (const item of value) {
|
||||
const {id} = item
|
||||
|
||||
if (id) {
|
||||
if (initialById[id]) {
|
||||
if (!isDeepEqual(item, initialById[id])) {
|
||||
update.push(item)
|
||||
}
|
||||
} else {
|
||||
connect.push(item)
|
||||
}
|
||||
} else {
|
||||
create.push(item)
|
||||
}
|
||||
}
|
||||
|
||||
const connectItems = connect.map(({id}) => ({id}))
|
||||
|
||||
const removeItems = remove?.map(({id}) => ({id}))
|
||||
|
||||
const createItems = mapper ? create.map((item) => mapper(item)) : create
|
||||
|
||||
const updateItems = update.map((item) => {
|
||||
const initialItemValue = initialById[item.id]
|
||||
|
||||
const changed = Object.keys(item).reduce((acc: {[key: string]: unknown}, key) => {
|
||||
const value = item[key]
|
||||
if (!isDeepEqual(value, initialItemValue && initialItemValue[key])) {
|
||||
acc[key] = value
|
||||
}
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
return {
|
||||
data: mapper ? mapper(changed, initialItemValue) : changed,
|
||||
where: {id: item.id},
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
connect: connectItems.length ? connectItems : undefined,
|
||||
|
||||
create: createItems.length ? createItems : undefined,
|
||||
|
||||
update: updateItems?.length ? updateItems : undefined,
|
||||
|
||||
[removedItemsMethod]: removeItems?.length ? removeItems : undefined,
|
||||
}
|
||||
}
|
||||
@@ -41,17 +41,9 @@ export class AppGenerator extends Generator<AppGeneratorOptions> {
|
||||
|
||||
filesToIgnore() {
|
||||
if (!this.options.useTs) {
|
||||
return [
|
||||
"tsconfig.json",
|
||||
"next-env.d.ts",
|
||||
"jest.config.ts",
|
||||
"package.ts.json",
|
||||
"vitest-config.ts",
|
||||
"pre-push-ts",
|
||||
"types.ts",
|
||||
]
|
||||
return ["tsconfig.json", "next-env.d.ts", "vitest-config.ts", "package.ts.json", "types.ts"]
|
||||
}
|
||||
return ["jsconfig.json", "package.js.json", "vitest.config.js", "pre-push-js"]
|
||||
return ["jsconfig.json", "package.js.json", "vitest.config.js"]
|
||||
}
|
||||
|
||||
async getTemplateValues() {
|
||||
@@ -70,10 +62,6 @@ export class AppGenerator extends Generator<AppGeneratorOptions> {
|
||||
async preCommit() {
|
||||
this.fs.move(this.destinationPath("gitignore"), this.destinationPath(".gitignore"))
|
||||
this.fs.move(this.destinationPath("npmrc"), this.destinationPath(".npmrc"))
|
||||
this.fs.move(
|
||||
this.destinationPath(this.options.useTs ? ".husky/pre-push-ts" : ".husky/pre-push-js"),
|
||||
this.destinationPath(".husky/pre-push"),
|
||||
)
|
||||
this.fs.move(
|
||||
this.destinationPath(this.options.useTs ? "package.ts.json" : "package.js.json"),
|
||||
this.destinationPath("package.json"),
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
npx pretty-quick --staged
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npm run lint
|
||||
npm run test
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx tsc
|
||||
npm run lint
|
||||
npm run test
|
||||
@@ -65,7 +65,7 @@ Here is the starting structure of your app.
|
||||
|
||||
```
|
||||
__name__
|
||||
├── app/
|
||||
├── src/
|
||||
│ ├── api/
|
||||
│ ├── auth/
|
||||
│ │ ├── components/
|
||||
@@ -120,7 +120,7 @@ __name__
|
||||
├── .eslintrc.js
|
||||
├── babel.config.js
|
||||
├── blitz.config.ts
|
||||
├── jest.config.ts
|
||||
├── vitest.config.ts
|
||||
├── package.json
|
||||
├── README.md
|
||||
├── tsconfig.json
|
||||
@@ -129,7 +129,7 @@ __name__
|
||||
|
||||
These files are:
|
||||
|
||||
- The `app/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
- The `src/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
|
||||
- `db/` is where your database configuration goes. If you’re writing models or checking migrations, this is where to go.
|
||||
|
||||
@@ -147,7 +147,7 @@ These files are:
|
||||
|
||||
- `blitz.config.ts` is for advanced custom configuration of Blitz. [Here you can learn how to use it](https://blitzjs.com/docs/blitz-config).
|
||||
|
||||
- `jest.config.js` contains config for Jest tests. You can [customize it if needed](https://jestjs.io/docs/en/configuration).
|
||||
- `vitest.config.ts` contains config for Vitest tests. You can [customize it if needed](https://vitejs.dev/config/).
|
||||
|
||||
You can read more about it in the [File Structure](https://blitzjs.com/docs/file-structure) section of the documentation.
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
npx pretty-quick --staged
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npm run lint
|
||||
npm run test
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx tsc
|
||||
npm run lint
|
||||
npm run test
|
||||
@@ -51,7 +51,7 @@ Here is the starting structure of your app.
|
||||
|
||||
```
|
||||
__name__
|
||||
├── app/
|
||||
├── src/
|
||||
│ ├── pages/
|
||||
│ │ ├── _app.tsx
|
||||
│ │ ├── _document.tsx
|
||||
@@ -67,7 +67,7 @@ __name__
|
||||
├── .eslintrc.js
|
||||
├── babel.config.js
|
||||
├── blitz.config.ts
|
||||
├── jest.config.ts
|
||||
├── vitest.config.ts
|
||||
├── package.json
|
||||
├── README.md
|
||||
├── tsconfig.json
|
||||
@@ -76,7 +76,7 @@ __name__
|
||||
|
||||
These files are:
|
||||
|
||||
- The `app/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
- The `src/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
|
||||
- `public/` is a folder where you will put any static assets. If you have images, files, or videos which you want to use in your app, this is where to put them.
|
||||
|
||||
@@ -90,7 +90,7 @@ These files are:
|
||||
|
||||
- `blitz.config.ts` is for advanced custom configuration of Blitz. [Here you can learn how to use it](https://blitzjs.com/docs/blitz-config).
|
||||
|
||||
- `jest.config.js` contains config for Jest tests. You can [customize it if needed](https://jestjs.io/docs/en/configuration).
|
||||
- `vitest.config.ts` contains config for Vitest tests. You can [customize it if needed](https://vitejs.dev/config/).
|
||||
|
||||
You can read more about it in the [File Structure](https://blitzjs.com/docs/file-structure) section of the documentation.
|
||||
|
||||
|
||||
192
pnpm-lock.yaml
generated
192
pnpm-lock.yaml
generated
@@ -51,7 +51,7 @@ importers:
|
||||
"@types/react": 18.0.25
|
||||
"@typescript-eslint/eslint-plugin": 5.42.1
|
||||
"@vitejs/plugin-react": 2.2.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
eslint-config-next: 12.3.1
|
||||
eslint-config-prettier: 8.5.0
|
||||
@@ -129,7 +129,7 @@ importers:
|
||||
"@types/preview-email": 2.0.1
|
||||
"@types/react": 18.0.25
|
||||
"@typescript-eslint/eslint-plugin": 5.42.1
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
eslint-config-next: 12.3.1
|
||||
eslint-config-prettier: 8.5.0
|
||||
@@ -238,9 +238,9 @@ importers:
|
||||
|
||||
integration-tests/auth:
|
||||
specifiers:
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.20
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@next/bundle-analyzer": 12.0.8
|
||||
"@prisma/client": 4.6.0
|
||||
"@types/express": 4.17.13
|
||||
@@ -249,7 +249,7 @@ importers:
|
||||
"@types/node-fetch": 2.6.1
|
||||
"@types/react": 18.0.25
|
||||
b64-lite: 1.4.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
fs-extra: 10.0.1
|
||||
get-port: 6.1.2
|
||||
@@ -289,10 +289,10 @@ importers:
|
||||
|
||||
integration-tests/auth-with-rpc:
|
||||
specifiers:
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.19
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.20
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.20
|
||||
"@hookform/error-message": 2.0.0
|
||||
"@hookform/resolvers": 2.9.10
|
||||
"@next/bundle-analyzer": 12.0.8
|
||||
@@ -305,7 +305,7 @@ importers:
|
||||
"@types/react": 18.0.25
|
||||
"@typescript-eslint/eslint-plugin": 5.42.1
|
||||
"@vitejs/plugin-react": 2.2.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
delay: 5.0.0
|
||||
eslint: 8.27.0
|
||||
eslint-config-next: 12.3.1
|
||||
@@ -372,10 +372,10 @@ importers:
|
||||
|
||||
integration-tests/get-initial-props:
|
||||
specifiers:
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.19
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.20
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.20
|
||||
"@next/bundle-analyzer": 12.0.8
|
||||
"@prisma/client": 4.6.0
|
||||
"@types/express": 4.17.13
|
||||
@@ -383,7 +383,7 @@ importers:
|
||||
"@types/node-fetch": 2.6.1
|
||||
"@types/react": 18.0.25
|
||||
b64-lite: 1.4.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
fs-extra: 10.0.1
|
||||
get-port: 6.1.2
|
||||
@@ -421,15 +421,15 @@ importers:
|
||||
|
||||
integration-tests/middleware:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.20
|
||||
"@next/bundle-analyzer": 12.0.8
|
||||
"@types/express": 4.17.13
|
||||
"@types/fs-extra": 9.0.13
|
||||
"@types/node-fetch": 2.6.1
|
||||
"@types/react": 18.0.25
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
fs-extra: 10.0.1
|
||||
get-port: 6.1.2
|
||||
@@ -460,10 +460,10 @@ importers:
|
||||
|
||||
integration-tests/no-suspense:
|
||||
specifiers:
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.19
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.20
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.20
|
||||
"@next/bundle-analyzer": 12.0.8
|
||||
"@prisma/client": 4.6.0
|
||||
"@types/express": 4.17.13
|
||||
@@ -471,7 +471,7 @@ importers:
|
||||
"@types/node-fetch": 2.6.1
|
||||
"@types/react": 18.0.25
|
||||
b64-lite: 1.4.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
fs-extra: 10.0.1
|
||||
get-port: 6.1.2
|
||||
@@ -509,16 +509,16 @@ importers:
|
||||
|
||||
integration-tests/qm:
|
||||
specifiers:
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.19
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.20
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.20
|
||||
"@prisma/client": 4.6.0
|
||||
"@tanstack/react-query": 4.0.10
|
||||
"@testing-library/react": 13.4.0
|
||||
"@types/react": 18.0.25
|
||||
"@vitejs/plugin-react": 1.3.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
delay: 5.0.0
|
||||
eslint: 8.27.0
|
||||
eslint-config-next: latest
|
||||
@@ -547,16 +547,16 @@ importers:
|
||||
"@vitejs/plugin-react": 1.3.0
|
||||
delay: 5.0.0
|
||||
eslint: 8.27.0
|
||||
eslint-config-next: 13.0.7_rmayb2veg2btbq6mbmnyivgasy
|
||||
eslint-config-next: 13.1.1_rmayb2veg2btbq6mbmnyivgasy
|
||||
eslint-plugin-testing-library: 5.0.1_rmayb2veg2btbq6mbmnyivgasy
|
||||
jsdom: 19.0.0
|
||||
typescript: 4.8.4
|
||||
|
||||
integration-tests/react-query-utils:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.20
|
||||
"@next/bundle-analyzer": 12.0.8
|
||||
"@prisma/client": 4.6.0
|
||||
"@types/express": 4.17.13
|
||||
@@ -564,7 +564,7 @@ importers:
|
||||
"@types/node-fetch": 2.6.1
|
||||
"@types/react": 18.0.25
|
||||
b64-lite: 1.4.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
fs-extra: 10.0.1
|
||||
get-port: 6.1.2
|
||||
@@ -601,15 +601,15 @@ importers:
|
||||
|
||||
integration-tests/rpc:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.20
|
||||
"@types/express": 4.17.13
|
||||
"@types/fs-extra": 9.0.13
|
||||
"@types/node-fetch": 2.6.1
|
||||
"@types/react": 18.0.25
|
||||
b64-lite: 1.4.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
fs-extra: 10.0.1
|
||||
next: 12.2.5
|
||||
@@ -636,15 +636,15 @@ importers:
|
||||
|
||||
integration-tests/rpc-path-root:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.20
|
||||
"@types/express": 4.17.13
|
||||
"@types/fs-extra": 9.0.13
|
||||
"@types/node-fetch": 2.6.1
|
||||
"@types/react": 18.0.25
|
||||
b64-lite: 1.4.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
fs-extra: 10.0.1
|
||||
next: 12.2.5
|
||||
@@ -671,10 +671,10 @@ importers:
|
||||
|
||||
integration-tests/trailing-slash:
|
||||
specifiers:
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/next": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.19
|
||||
"@blitzjs/auth": workspace:2.0.0-beta.20
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/next": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": workspace:2.0.0-beta.20
|
||||
"@next/bundle-analyzer": 12.0.8
|
||||
"@prisma/client": 4.6.0
|
||||
"@types/express": 4.17.13
|
||||
@@ -682,7 +682,7 @@ importers:
|
||||
"@types/node-fetch": 2.6.1
|
||||
"@types/react": 18.0.25
|
||||
b64-lite: 1.4.0
|
||||
blitz: workspace:2.0.0-beta.19
|
||||
blitz: workspace:2.0.0-beta.20
|
||||
eslint: 8.27.0
|
||||
fs-extra: 10.0.1
|
||||
get-port: 6.1.2
|
||||
@@ -778,8 +778,8 @@ importers:
|
||||
|
||||
packages/blitz:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/generator": 2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/generator": 2.0.0-beta.20
|
||||
"@mrleebo/prisma-ast": 0.2.6
|
||||
"@types/cookie": 0.4.1
|
||||
"@types/cross-spawn": 6.0.2
|
||||
@@ -925,7 +925,7 @@ importers:
|
||||
|
||||
packages/blitz-auth:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@testing-library/react": 13.4.0
|
||||
"@testing-library/react-hooks": 8.0.1
|
||||
"@types/b64-lite": 1.3.0
|
||||
@@ -939,7 +939,7 @@ importers:
|
||||
"@types/secure-password": 3.1.1
|
||||
b64-lite: 1.4.0
|
||||
bad-behavior: 1.0.1
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
cookie: 0.4.1
|
||||
cookie-session: 2.0.0
|
||||
debug: 4.3.3
|
||||
@@ -992,8 +992,8 @@ importers:
|
||||
|
||||
packages/blitz-next:
|
||||
specifiers:
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/rpc": 2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@blitzjs/rpc": 2.0.0-beta.20
|
||||
"@tanstack/react-query": 4.0.10
|
||||
"@testing-library/dom": 8.13.0
|
||||
"@testing-library/jest-dom": 5.16.3
|
||||
@@ -1005,7 +1005,7 @@ importers:
|
||||
"@types/react": 18.0.25
|
||||
"@types/react-dom": 17.0.14
|
||||
"@types/testing-library__react-hooks": 4.0.0
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
cross-spawn: 7.0.3
|
||||
debug: 4.3.3
|
||||
find-up: 4.1.0
|
||||
@@ -1055,8 +1055,8 @@ importers:
|
||||
|
||||
packages/blitz-rpc:
|
||||
specifiers:
|
||||
"@blitzjs/auth": 2.0.0-beta.19
|
||||
"@blitzjs/config": workspace:2.0.0-beta.19
|
||||
"@blitzjs/auth": 2.0.0-beta.20
|
||||
"@blitzjs/config": workspace:2.0.0-beta.20
|
||||
"@swc/core": 1.3.7
|
||||
"@tanstack/react-query": 4.0.10
|
||||
"@types/debug": 4.1.7
|
||||
@@ -1064,7 +1064,7 @@ importers:
|
||||
"@types/react-dom": 17.0.14
|
||||
b64-lite: 1.4.0
|
||||
bad-behavior: 1.0.1
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
chalk: ^4.1.0
|
||||
debug: 4.3.3
|
||||
next: 12.2.5
|
||||
@@ -1108,12 +1108,12 @@ importers:
|
||||
"@babel/plugin-syntax-typescript": 7.17.12
|
||||
"@babel/preset-env": 7.12.10
|
||||
"@blitzjs/config": workspace:*
|
||||
"@blitzjs/generator": 2.0.0-beta.19
|
||||
"@blitzjs/generator": 2.0.0-beta.20
|
||||
"@types/jscodeshift": 0.11.2
|
||||
"@types/node": 18.11.9
|
||||
arg: 5.0.1
|
||||
ast-types: 0.14.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
chalk: ^4.1.0
|
||||
cross-spawn: 7.0.3
|
||||
debug: 4.3.3
|
||||
@@ -1168,7 +1168,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-beta.19
|
||||
"@blitzjs/config": 2.0.0-beta.20
|
||||
"@juanm04/cpx": 2.0.1
|
||||
"@mrleebo/prisma-ast": 0.4.1
|
||||
"@types/babel__core": 7.1.19
|
||||
@@ -1263,7 +1263,7 @@ importers:
|
||||
|
||||
packages/pkg-template:
|
||||
specifiers:
|
||||
"@blitzjs/config": 2.0.0-beta.19
|
||||
"@blitzjs/config": 2.0.0-beta.20
|
||||
"@types/react": 18.0.25
|
||||
"@types/react-dom": 17.0.14
|
||||
"@typescript-eslint/eslint-plugin": 5.42.1
|
||||
@@ -1287,7 +1287,7 @@ importers:
|
||||
recipes/base-web:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1298,7 +1298,7 @@ importers:
|
||||
recipes/bulma:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1310,7 +1310,7 @@ importers:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
ast-types: 0.14.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1323,7 +1323,7 @@ importers:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
ast-types: 0.14.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1335,7 +1335,7 @@ importers:
|
||||
recipes/emotion:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1345,20 +1345,20 @@ importers:
|
||||
|
||||
recipes/gh-action-yarn-mariadb:
|
||||
specifiers:
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
|
||||
recipes/gh-action-yarn-postgres:
|
||||
specifiers:
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
|
||||
recipes/ghost:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1369,7 +1369,7 @@ importers:
|
||||
recipes/graphql-apollo-server:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
uuid: ^8.3.1
|
||||
dependencies:
|
||||
@@ -1382,7 +1382,7 @@ importers:
|
||||
recipes/logrocket:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1393,7 +1393,7 @@ importers:
|
||||
recipes/material-ui:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1405,7 +1405,7 @@ importers:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
ast-types: 0.14.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1416,13 +1416,13 @@ importers:
|
||||
|
||||
recipes/passenger:
|
||||
specifiers:
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
|
||||
recipes/quirrel:
|
||||
specifiers:
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
|
||||
@@ -1430,7 +1430,7 @@ importers:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
ast-types: 0.14.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1441,14 +1441,14 @@ importers:
|
||||
|
||||
recipes/render:
|
||||
specifiers:
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
|
||||
recipes/secureheaders:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
uuid: ^8.3.1
|
||||
dependencies:
|
||||
@@ -1461,7 +1461,7 @@ importers:
|
||||
recipes/stitches:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1473,7 +1473,7 @@ importers:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
ast-types: 0.14.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1485,7 +1485,7 @@ importers:
|
||||
recipes/tailwind:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1497,7 +1497,7 @@ importers:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
ast-types: 0.14.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -1509,7 +1509,7 @@ importers:
|
||||
recipes/vanilla-extract:
|
||||
specifiers:
|
||||
"@types/jscodeshift": 0.11.2
|
||||
blitz: 2.0.0-beta.19
|
||||
blitz: 2.0.0-beta.20
|
||||
jscodeshift: 0.13.0
|
||||
dependencies:
|
||||
blitz: link:../../packages/blitz
|
||||
@@ -3942,6 +3942,7 @@ packages:
|
||||
semver: 5.7.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@babel/preset-flow/7.17.12_@babel+core@7.18.2:
|
||||
resolution:
|
||||
@@ -4536,6 +4537,7 @@ packages:
|
||||
strip-json-comments: 3.1.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@hapi/hoek/9.3.0:
|
||||
resolution:
|
||||
@@ -4604,6 +4606,7 @@ packages:
|
||||
minimatch: 3.1.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@humanwhocodes/module-importer/1.0.1:
|
||||
resolution:
|
||||
@@ -5085,10 +5088,10 @@ packages:
|
||||
dependencies:
|
||||
glob: 7.1.7
|
||||
|
||||
/@next/eslint-plugin-next/13.0.7:
|
||||
/@next/eslint-plugin-next/13.1.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-Q/Z0V3D3UpKhhzFU6/s17wD4rqJ+ZDGded8UpqNyzX1nUdD+/PnsZexPhSIZ2Yf/c8QESeirmJVRb3eAfCQkRQ==,
|
||||
integrity: sha512-SBrOFS8PC3nQ5aeZmawJkjKkWjwK9RoxvBSv/86nZp0ubdoVQoko8r8htALd9ufp16NhacCdqhu9bzZLDWtALQ==,
|
||||
}
|
||||
dependencies:
|
||||
glob: 7.1.7
|
||||
@@ -6821,6 +6824,7 @@ packages:
|
||||
typescript: 4.8.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@typescript-eslint/experimental-utils/5.28.0_rmayb2veg2btbq6mbmnyivgasy:
|
||||
resolution:
|
||||
@@ -10943,11 +10947,12 @@ packages:
|
||||
transitivePeerDependencies:
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/eslint-config-next/13.0.7_rmayb2veg2btbq6mbmnyivgasy:
|
||||
/eslint-config-next/13.1.1_rmayb2veg2btbq6mbmnyivgasy:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-X7DB7iDJ9iHi5DAZbnFdWm4M0dwarj5h5y6Vpm9INCYzFgAwSWslq3v0qjYEjtUO5IQ8n1WK6IU5FkOQ2HBhOA==,
|
||||
integrity: sha512-/5S2XGWlGaiqrRhzpn51ux5JUSLwx8PVK2keLi5xk7QmhfYB8PqE6R6SlVw6hgnf/VexvUXSrlNJ/su00NhtHQ==,
|
||||
}
|
||||
peerDependencies:
|
||||
eslint: ^7.23.0 || ^8.0.0
|
||||
@@ -10956,7 +10961,7 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
"@next/eslint-plugin-next": 13.0.7
|
||||
"@next/eslint-plugin-next": 13.1.1
|
||||
"@rushstack/eslint-patch": 1.1.3
|
||||
"@typescript-eslint/parser": 5.43.0_rmayb2veg2btbq6mbmnyivgasy
|
||||
eslint: 8.27.0
|
||||
@@ -10980,6 +10985,7 @@ packages:
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
eslint: ">=7.0.0"
|
||||
dev: false
|
||||
|
||||
/eslint-config-prettier/8.5.0_eslint@8.27.0:
|
||||
resolution:
|
||||
@@ -11403,7 +11409,7 @@ packages:
|
||||
peerDependencies:
|
||||
eslint: ">=5"
|
||||
dependencies:
|
||||
eslint: 8.27.0_supports-color@8.1.1
|
||||
eslint: 8.27.0
|
||||
eslint-visitor-keys: 2.1.0
|
||||
|
||||
/eslint-visitor-keys/2.1.0:
|
||||
@@ -11519,6 +11525,7 @@ packages:
|
||||
text-table: 0.2.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/espree/9.4.1:
|
||||
resolution:
|
||||
@@ -13966,7 +13973,7 @@ packages:
|
||||
pretty-format: 29.2.1
|
||||
slash: 3.0.0
|
||||
strip-json-comments: 3.1.1
|
||||
ts-node: 10.9.1_cbe7ovvae6zqfnmtgctpgpys54
|
||||
ts-node: 10.9.1_typescript@4.8.4
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -19733,6 +19740,7 @@ packages:
|
||||
typescript: 4.8.4
|
||||
v8-compile-cache-lib: 3.0.1
|
||||
yn: 3.1.1
|
||||
dev: false
|
||||
|
||||
/ts-node/10.9.1_ieummqxttktzud32hpyrer46t4:
|
||||
resolution:
|
||||
@@ -19799,7 +19807,6 @@ packages:
|
||||
typescript: 4.8.4
|
||||
v8-compile-cache-lib: 3.0.1
|
||||
yn: 3.1.1
|
||||
dev: false
|
||||
|
||||
/tsconfig-paths/3.14.1:
|
||||
resolution:
|
||||
@@ -20700,6 +20707,7 @@ packages:
|
||||
- sugarss
|
||||
- supports-color
|
||||
- terser
|
||||
dev: false
|
||||
|
||||
/vitest/0.25.3_jsdom@20.0.3:
|
||||
resolution:
|
||||
|
||||
Reference in New Issue
Block a user