Compare commits
10 Commits
@blitzjs/n
...
@blitzjs/g
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fc2d71a18 | ||
|
|
3fa3a4ef30 | ||
|
|
565db3c5a8 | ||
|
|
ae04524b4c | ||
|
|
38d320fd28 | ||
|
|
8723d0053c | ||
|
|
ce23d4ed09 | ||
|
|
b6c9c4ae6d | ||
|
|
0b3286468b | ||
|
|
50f17d21ce |
@@ -4104,6 +4104,16 @@
|
|||||||
"code",
|
"code",
|
||||||
"test"
|
"test"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "fungilation",
|
||||||
|
"name": "Gary Fung",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/3803466?v=4",
|
||||||
|
"profile": "https://garyfung.medium.com",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
|
|||||||
@@ -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==">
|
<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>
|
</a>
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- 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-432-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-433-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/main/LICENSE">
|
<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">
|
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
|
||||||
@@ -761,6 +761,7 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
|
|||||||
<td align="center"><a href="https://github.com/bezalel6"><img src="https://avatars.githubusercontent.com/u/51681171?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bezalel6</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=bezalel6" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=bezalel6" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/bezalel6"><img src="https://avatars.githubusercontent.com/u/51681171?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bezalel6</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=bezalel6" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=bezalel6" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="cherniavskii.com"><img src="https://avatars.githubusercontent.com/u/13808724?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Cherniavskii</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=cherniavskii" title="Documentation">📖</a></td>
|
<td align="center"><a href="cherniavskii.com"><img src="https://avatars.githubusercontent.com/u/13808724?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Cherniavskii</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=cherniavskii" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://danielidoko-r3zt.vercel.app/"><img src="https://avatars.githubusercontent.com/u/95912955?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniel Idoko</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=doe-base" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=doe-base" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=doe-base" title="Tests">⚠️</a></td>
|
<td align="center"><a href="https://danielidoko-r3zt.vercel.app/"><img src="https://avatars.githubusercontent.com/u/95912955?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniel Idoko</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=doe-base" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=doe-base" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=doe-base" title="Tests">⚠️</a></td>
|
||||||
|
<td align="center"><a href="https://garyfung.medium.com"><img src="https://avatars.githubusercontent.com/u/3803466?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gary Fung</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=fungilation" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=fungilation" title="Code">💻</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,40 @@
|
|||||||
# next-blitz-auth
|
# next-blitz-auth
|
||||||
|
|
||||||
|
## 0.1.17
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [565db3c5a]
|
||||||
|
- Updated dependencies [3fa3a4ef3]
|
||||||
|
- blitz@2.2.0
|
||||||
|
- @blitzjs/auth@2.2.0
|
||||||
|
- @blitzjs/next@2.2.0
|
||||||
|
- @blitzjs/rpc@2.2.0
|
||||||
|
- @blitzjs/config@2.2.0
|
||||||
|
|
||||||
|
## 0.1.16
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [ce23d4ed0]
|
||||||
|
- @blitzjs/next@2.1.4
|
||||||
|
- blitz@2.1.4
|
||||||
|
- @blitzjs/auth@2.1.4
|
||||||
|
- @blitzjs/rpc@2.1.4
|
||||||
|
- @blitzjs/config@2.1.4
|
||||||
|
|
||||||
|
## 0.1.15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0b3286468]
|
||||||
|
- Updated dependencies [50f17d21c]
|
||||||
|
- @blitzjs/auth@2.1.3
|
||||||
|
- @blitzjs/next@2.1.3
|
||||||
|
- @blitzjs/rpc@2.1.3
|
||||||
|
- blitz@2.1.3
|
||||||
|
- @blitzjs/config@2.1.3
|
||||||
|
|
||||||
## 0.1.14
|
## 0.1.14
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "next-blitz-auth",
|
"name": "next-blitz-auth",
|
||||||
"version": "0.1.14",
|
"version": "0.1.17",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"blitz:dev": "next dev",
|
"blitz:dev": "next dev",
|
||||||
@@ -12,28 +12,28 @@
|
|||||||
"schema": "prisma/schema.prisma"
|
"schema": "prisma/schema.prisma"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@hookform/error-message": "2.0.0",
|
"@hookform/error-message": "2.0.0",
|
||||||
"@hookform/resolvers": "2.9.10",
|
"@hookform/resolvers": "2.9.10",
|
||||||
"@prisma/client": "^4.5.0",
|
"@prisma/client": "^4.5.0",
|
||||||
"@tanstack/react-query": "4.0.10",
|
"@tanstack/react-query": "4.0.10",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"flatted": "3.2.7",
|
"flatted": "3.2.7",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"prisma": "^4.5.0",
|
"prisma": "^4.5.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"react-hook-form": "7.39.1",
|
"react-hook-form": "7.39.1",
|
||||||
"superjson": "1.11.0",
|
"superjson": "1.11.0",
|
||||||
"zod": "3.20.2"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "18.11.7",
|
"@types/node": "18.11.7",
|
||||||
"@types/react": "18.0.23",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@types/react-dom": "18.0.7",
|
"@types/react-dom": "npm:types-react-dom@19.0.0",
|
||||||
"eslint": "8.26.0",
|
"eslint": "8.26.0",
|
||||||
"eslint-config-next": "13.0.0",
|
"eslint-config-next": "13.0.0",
|
||||||
"typescript": "4.8.4"
|
"typescript": "4.8.4"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {zodResolver} from "@hookform/resolvers/zod"
|
|||||||
import {z} from "zod"
|
import {z} from "zod"
|
||||||
|
|
||||||
export interface FormProps<S extends z.ZodType<any, any>>
|
export interface FormProps<S extends z.ZodType<any, any>>
|
||||||
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
||||||
/** All your form fields */
|
/** All your form fields */
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
/** Text to display in the submit button */
|
/** Text to display in the submit button */
|
||||||
|
|||||||
@@ -2,14 +2,15 @@ import {forwardRef, PropsWithoutRef, ComponentPropsWithoutRef} from "react"
|
|||||||
import {useFormContext} from "react-hook-form"
|
import {useFormContext} from "react-hook-form"
|
||||||
import {ErrorMessage} from "@hookform/error-message"
|
import {ErrorMessage} from "@hookform/error-message"
|
||||||
|
|
||||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
export interface LabeledTextFieldProps
|
||||||
|
extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
type?: "text" | "password" | "email" | "number"
|
type?: "text" | "password" | "email" | "number"
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,31 +23,30 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@hookform/error-message": "2.0.0",
|
"@hookform/error-message": "2.0.0",
|
||||||
"@hookform/resolvers": "2.9.10",
|
"@hookform/resolvers": "2.9.10",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"openid-client": "5.2.1",
|
"openid-client": "5.2.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"react-hook-form": "7.39.1",
|
"react-hook-form": "7.39.1",
|
||||||
"ts-node": "10.9.1",
|
"ts-node": "10.9.1",
|
||||||
"zod": "3.20.2"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
|
||||||
"@types/jest": "29.2.2",
|
"@types/jest": "29.2.2",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/preview-email": "2.0.1",
|
"@types/preview-email": "2.0.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "5.42.1",
|
"@typescript-eslint/eslint-plugin": "5.42.1",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"eslint-config-next": "12.3.1",
|
"eslint-config-next": "12.3.1",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
|
|||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
export interface FormProps<S extends z.ZodType<any, any>>
|
export interface FormProps<S extends z.ZodType<any, any>>
|
||||||
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
||||||
/** All your form fields */
|
/** All your form fields */
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
/** Text to display in the submit button */
|
/** Text to display in the submit button */
|
||||||
|
|||||||
@@ -2,14 +2,15 @@ import { forwardRef, PropsWithoutRef, ComponentPropsWithoutRef } from "react"
|
|||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
import { ErrorMessage } from "@hookform/error-message"
|
import { ErrorMessage } from "@hookform/error-message"
|
||||||
|
|
||||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
export interface LabeledTextFieldProps
|
||||||
|
extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
type?: "text" | "password" | "email" | "number"
|
type?: "text" | "password" | "email" | "number"
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
apps/toolkit-app/next-env.d.ts
vendored
2
apps/toolkit-app/next-env.d.ts
vendored
@@ -2,4 +2,4 @@
|
|||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
|
||||||
|
|||||||
@@ -24,31 +24,30 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@hookform/error-message": "2.0.0",
|
"@hookform/error-message": "2.0.0",
|
||||||
"@hookform/resolvers": "2.9.10",
|
"@hookform/resolvers": "2.9.10",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"next-auth": "4.24.7",
|
"next-auth": "4.24.7",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"react-hook-form": "7.39.1",
|
"react-hook-form": "7.39.1",
|
||||||
"ts-node": "10.9.1",
|
"ts-node": "10.9.1",
|
||||||
"zod": "3.20.2"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@testing-library/jest-dom": "5.16.5",
|
"@testing-library/jest-dom": "5.16.5",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/preview-email": "2.0.1",
|
"@types/preview-email": "2.0.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "5.42.1",
|
"@typescript-eslint/eslint-plugin": "5.42.1",
|
||||||
"@vitejs/plugin-react": "2.2.0",
|
"@vitejs/plugin-react": "2.2.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
|
|||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
export interface FormProps<S extends z.ZodType<any, any>>
|
export interface FormProps<S extends z.ZodType<any, any>>
|
||||||
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
||||||
/** All your form fields */
|
/** All your form fields */
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
/** Text to display in the submit button */
|
/** Text to display in the submit button */
|
||||||
|
|||||||
@@ -2,14 +2,15 @@ import { ComponentPropsWithoutRef, forwardRef, PropsWithoutRef } from "react"
|
|||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
import { ErrorMessage } from "@hookform/error-message"
|
import { ErrorMessage } from "@hookform/error-message"
|
||||||
|
|
||||||
export interface LabeledSelectFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["select"]> {
|
export interface LabeledSelectFieldProps
|
||||||
|
extends PropsWithoutRef<React.JSX.IntrinsicElements["select"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
options: any[]
|
options: any[]
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,15 @@ import { forwardRef, PropsWithoutRef, ComponentPropsWithoutRef } from "react"
|
|||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
import { ErrorMessage } from "@hookform/error-message"
|
import { ErrorMessage } from "@hookform/error-message"
|
||||||
|
|
||||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
export interface LabeledTextFieldProps
|
||||||
|
extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
type?: "text" | "password" | "email" | "number"
|
type?: "text" | "password" | "email" | "number"
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,27 +16,27 @@
|
|||||||
"schema": "./db/schema.prisma"
|
"schema": "./db/schema.prisma"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"@types/jest": "29.2.2",
|
"@types/jest": "29.2.2",
|
||||||
"@types/passport-twitter": "1.0.37",
|
"@types/passport-twitter": "1.0.37",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jest": "29.3.0",
|
"jest": "29.3.0",
|
||||||
"jest-environment-jsdom": "29.3.0",
|
"jest-environment-jsdom": "29.3.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"passport-mock-strategy": "2.0.0",
|
"passport-mock-strategy": "2.0.0",
|
||||||
"passport-twitter": "1.0.4",
|
"passport-twitter": "1.0.4",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"ts-node": "10.9.1"
|
"ts-node": "10.9.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"typescript": "^4.8.4"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,31 +17,30 @@
|
|||||||
"prisma:studio": "prisma studio"
|
"prisma:studio": "prisma studio"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@hookform/error-message": "2.0.0",
|
"@hookform/error-message": "2.0.0",
|
||||||
"@hookform/resolvers": "2.9.10",
|
"@hookform/resolvers": "2.9.10",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"delay": "5.0.0",
|
"delay": "5.0.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"react-hook-form": "7.39.1",
|
"react-hook-form": "7.39.1",
|
||||||
"ts-node": "10.9.1",
|
"ts-node": "10.9.1",
|
||||||
"zod": "3.20.2"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@testing-library/jest-dom": "5.16.5",
|
"@testing-library/jest-dom": "5.16.5",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/preview-email": "2.0.1",
|
"@types/preview-email": "2.0.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "5.42.1",
|
"@typescript-eslint/eslint-plugin": "5.42.1",
|
||||||
"@vitejs/plugin-react": "2.2.0",
|
"@vitejs/plugin-react": "2.2.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
|
|||||||
@@ -17,16 +17,16 @@
|
|||||||
"prisma:studio": "prisma studio"
|
"prisma:studio": "prisma studio"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"secure-password": "4.0.0",
|
"secure-password": "4.0.0",
|
||||||
"wait-port": "1.0.4"
|
"wait-port": "1.0.4"
|
||||||
},
|
},
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node": "18.7.13",
|
"@types/node": "18.7.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"b64-lite": "1.4.0",
|
"b64-lite": "1.4.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
|
|||||||
@@ -16,24 +16,24 @@
|
|||||||
"schema": "db/schema.prisma"
|
"schema": "db/schema.prisma"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"lowdb": "2.1.0",
|
"lowdb": "2.1.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"b64-lite": "1.4.0",
|
"b64-lite": "1.4.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
|
|||||||
@@ -11,20 +11,20 @@
|
|||||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
"get-port": "6.1.2",
|
"get-port": "6.1.2",
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
|
||||||
|
|||||||
@@ -17,17 +17,17 @@
|
|||||||
"prisma:studio": "prisma studio"
|
"prisma:studio": "prisma studio"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"lowdb": "2.1.0",
|
"lowdb": "2.1.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"secure-password": "4.0.0",
|
"secure-password": "4.0.0",
|
||||||
"wait-port": "1.0.4"
|
"wait-port": "1.0.4"
|
||||||
},
|
},
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node": "18.7.13",
|
"@types/node": "18.7.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"b64-lite": "1.4.0",
|
"b64-lite": "1.4.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
|
|||||||
@@ -16,24 +16,24 @@
|
|||||||
"prisma:studio": "prisma studio"
|
"prisma:studio": "prisma studio"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"b64-lite": "1.4.0",
|
"b64-lite": "1.4.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
|
|||||||
@@ -8,21 +8,21 @@
|
|||||||
"clean": "rm -rf .turbo && rm -rf node_modules"
|
"clean": "rm -rf .turbo && rm -rf node_modules"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"@tanstack/react-query": "4.0.10",
|
"@tanstack/react-query": "4.0.10",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@vitejs/plugin-react": "1.3.0",
|
"@vitejs/plugin-react": "1.3.0",
|
||||||
"delay": "5.0.0",
|
"delay": "5.0.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
|
|||||||
@@ -16,23 +16,23 @@
|
|||||||
"schema": "db/schema.prisma"
|
"schema": "db/schema.prisma"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"b64-lite": "1.4.0",
|
"b64-lite": "1.4.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
|
|||||||
@@ -7,19 +7,19 @@
|
|||||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"b64-lite": "1.4.0",
|
"b64-lite": "1.4.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
|
|||||||
@@ -7,19 +7,19 @@
|
|||||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"b64-lite": "1.4.0",
|
"b64-lite": "1.4.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
|
|||||||
@@ -16,24 +16,24 @@
|
|||||||
"schema": "db/schema.prisma"
|
"schema": "db/schema.prisma"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/next": "2.1.2",
|
"@blitzjs/next": "2.2.0",
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "19.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"b64-lite": "1.4.0",
|
"b64-lite": "1.4.0",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "workspace:2.1.2",
|
"@blitzjs/config": "workspace:2.2.0",
|
||||||
"@blitzjs/next": "workspace:2.1.2",
|
"@blitzjs/next": "workspace:2.2.0",
|
||||||
"@blitzjs/rpc": "workspace:2.1.2",
|
"@blitzjs/rpc": "workspace:2.2.0",
|
||||||
"@tanstack/react-query": "4.13.0",
|
"@tanstack/react-query": "4.13.0",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@types/rimraf": "3.0.2",
|
"@types/rimraf": "3.0.2",
|
||||||
"@types/selenium-webdriver": "4.0.18",
|
"@types/selenium-webdriver": "4.0.18",
|
||||||
"chromedriver": "100.0.0",
|
"chromedriver": "100.0.0",
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
"node-fetch": "3.2.3",
|
"node-fetch": "3.2.3",
|
||||||
"pkg-dir": "5.0.0",
|
"pkg-dir": "5.0.0",
|
||||||
"playwright-chromium": "1.28.0",
|
"playwright-chromium": "1.28.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"resolve-cwd": "3.0.0",
|
"resolve-cwd": "3.0.0",
|
||||||
"resolve-from": "5.0.0",
|
"resolve-from": "5.0.0",
|
||||||
"rimraf": "3.0.2",
|
"rimraf": "3.0.2",
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
"husky": "8.0.2",
|
"husky": "8.0.2",
|
||||||
"jsdom": "^19.0.0",
|
"jsdom": "^19.0.0",
|
||||||
"lint-staged": "13.0.3",
|
"lint-staged": "13.0.3",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"only-allow": "1.1.0",
|
"only-allow": "1.1.0",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"prettier-plugin-prisma": "4.4.0",
|
"prettier-plugin-prisma": "4.4.0",
|
||||||
@@ -51,7 +51,9 @@
|
|||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@types/mime": "3.0.4",
|
"@types/mime": "3.0.4",
|
||||||
"next": "14.3.0-canary.28"
|
"next": "15.0.1",
|
||||||
|
"@types/react": "npm:types-react@rc",
|
||||||
|
"@types/react-dom": "npm:types-react-dom@rc"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,32 @@
|
|||||||
# @blitzjs/auth
|
# @blitzjs/auth
|
||||||
|
|
||||||
|
## 2.2.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 3fa3a4ef3: chore: support next.js 15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [565db3c5a]
|
||||||
|
- Updated dependencies [3fa3a4ef3]
|
||||||
|
- blitz@2.2.0
|
||||||
|
|
||||||
|
## 2.1.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- blitz@2.1.4
|
||||||
|
|
||||||
|
## 2.1.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 0b3286468: chore: bump `next.js` and `zod` versions
|
||||||
|
- Updated dependencies [0b3286468]
|
||||||
|
- Updated dependencies [50f17d21c]
|
||||||
|
- blitz@2.1.3
|
||||||
|
|
||||||
## 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/auth",
|
"name": "@blitzjs/auth",
|
||||||
"version": "2.1.2",
|
"version": "2.2.0",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
"url": "0.11.0"
|
"url": "0.11.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "*",
|
"next": "*",
|
||||||
"next-auth": "*",
|
"next-auth": "*",
|
||||||
"secure-password": "4.0.0"
|
"secure-password": "4.0.0"
|
||||||
@@ -67,19 +67,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
|
||||||
"@types/cookie": "0.4.1",
|
"@types/cookie": "0.4.1",
|
||||||
"@types/debug": "4.1.7",
|
"@types/debug": "4.1.7",
|
||||||
"@types/jsonwebtoken": "8.5.8",
|
"@types/jsonwebtoken": "8.5.8",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "npm:types-react-dom@19.0.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"next-auth": "4.24.7",
|
"next-auth": "4.24.7",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"secure-password": "4.0.0",
|
"secure-password": "4.0.0",
|
||||||
"typescript": "^4.8.4",
|
"typescript": "^4.8.4",
|
||||||
"unbuild": "0.7.6",
|
"unbuild": "0.7.6",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {parsePublicDataToken, getPublicDataStore, useSession} from "./index"
|
|||||||
import {COOKIE_PUBLIC_DATA_TOKEN} from "../shared"
|
import {COOKIE_PUBLIC_DATA_TOKEN} from "../shared"
|
||||||
import {toBase64} from "b64-lite"
|
import {toBase64} from "b64-lite"
|
||||||
import {act} from "@testing-library/react"
|
import {act} from "@testing-library/react"
|
||||||
import {renderHook} from "@testing-library/react-hooks"
|
import {renderHook} from "@testing-library/react"
|
||||||
|
|
||||||
vi.mock("blitz", async () => {
|
vi.mock("blitz", async () => {
|
||||||
const blitz = await vi.importActual("blitz")
|
const blitz = await vi.importActual("blitz")
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ export type RedirectAuthenticatedToFn = (
|
|||||||
) => RedirectAuthenticatedTo
|
) => RedirectAuthenticatedTo
|
||||||
|
|
||||||
export type BlitzPage<P = {}> = React.ComponentType<P> & {
|
export type BlitzPage<P = {}> = React.ComponentType<P> & {
|
||||||
getLayout?: (component: JSX.Element) => JSX.Element
|
getLayout?: (component: React.JSX.Element) => React.JSX.Element
|
||||||
authenticate?: boolean | {redirectTo?: string | RouteUrlObject; role?: string | Array<string>}
|
authenticate?: boolean | {redirectTo?: string | RouteUrlObject; role?: string | Array<string>}
|
||||||
suppressFirstRenderFlicker?: boolean
|
suppressFirstRenderFlicker?: boolean
|
||||||
redirectAuthenticatedTo?: RedirectAuthenticatedTo | RedirectAuthenticatedToFn
|
redirectAuthenticatedTo?: RedirectAuthenticatedTo | RedirectAuthenticatedToFn
|
||||||
|
|||||||
@@ -289,8 +289,10 @@ const makeProxyToPublicData = <T extends SessionContextClass>(ctxClass: T): T =>
|
|||||||
export async function getBlitzContext(): Promise<Ctx> {
|
export async function getBlitzContext(): Promise<Ctx> {
|
||||||
try {
|
try {
|
||||||
const {headers, cookies} = require("next/headers")
|
const {headers, cookies} = require("next/headers")
|
||||||
const reqHeader = Object.fromEntries(headers())
|
const cookieStore = await cookies()
|
||||||
const csrfToken = cookies().get(COOKIE_CSRF_TOKEN())
|
const headersStore = await headers()
|
||||||
|
const reqHeader = Object.fromEntries(headersStore)
|
||||||
|
const csrfToken = cookieStore.get(COOKIE_CSRF_TOKEN())
|
||||||
if (csrfToken) {
|
if (csrfToken) {
|
||||||
reqHeader[HEADER_CSRF] = csrfToken.value
|
reqHeader[HEADER_CSRF] = csrfToken.value
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,36 @@
|
|||||||
# @blitzjs/next
|
# @blitzjs/next
|
||||||
|
|
||||||
|
## 2.2.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 3fa3a4ef3: chore: support next.js 15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [565db3c5a]
|
||||||
|
- Updated dependencies [3fa3a4ef3]
|
||||||
|
- blitz@2.2.0
|
||||||
|
- @blitzjs/rpc@2.2.0
|
||||||
|
|
||||||
|
## 2.1.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- ce23d4ed0: fix: Update `turbopack-empty.js` syntax to support latest turbopack and next.js versions
|
||||||
|
- blitz@2.1.4
|
||||||
|
- @blitzjs/rpc@2.1.4
|
||||||
|
|
||||||
|
## 2.1.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 0b3286468: chore: bump `next.js` and `zod` versions
|
||||||
|
- Updated dependencies [0b3286468]
|
||||||
|
- Updated dependencies [50f17d21c]
|
||||||
|
- @blitzjs/rpc@2.1.3
|
||||||
|
- blitz@2.1.3
|
||||||
|
|
||||||
## 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/next",
|
"name": "@blitzjs/next",
|
||||||
"version": "2.1.2",
|
"version": "2.2.0",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"eslint.js"
|
"eslint.js"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/rpc": "2.1.2",
|
"@blitzjs/rpc": "2.2.0",
|
||||||
"@types/hoist-non-react-statics": "3.3.1",
|
"@types/hoist-non-react-statics": "3.3.1",
|
||||||
"copy-webpack-plugin": "11.0.0",
|
"copy-webpack-plugin": "11.0.0",
|
||||||
"debug": "4.3.3",
|
"debug": "4.3.3",
|
||||||
@@ -39,30 +39,29 @@
|
|||||||
"supports-color": "8.1.1"
|
"supports-color": "8.1.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "*",
|
"next": "*",
|
||||||
"react": "*",
|
"react": "*",
|
||||||
"tslog": "4.9.0"
|
"tslog": "4.9.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@testing-library/dom": "8.13.0",
|
"@testing-library/dom": "8.13.0",
|
||||||
"@testing-library/jest-dom": "5.16.3",
|
"@testing-library/jest-dom": "5.16.3",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
|
||||||
"@testing-library/user-event": "13.5.0",
|
"@testing-library/user-event": "13.5.0",
|
||||||
"@types/debug": "4.1.7",
|
"@types/debug": "4.1.7",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "npm:types-react-dom@19.0.0",
|
||||||
"@types/testing-library__react-hooks": "4.0.0",
|
"@types/testing-library__react-hooks": "4.0.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"cross-spawn": "7.0.3",
|
"cross-spawn": "7.0.3",
|
||||||
"find-up": "4.1.0",
|
"find-up": "4.1.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"next-router-mock": "0.9.1",
|
"next-router-mock": "0.9.1",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"resolve-from": "5.0.0",
|
"resolve-from": "5.0.0",
|
||||||
"ts-jest": "27.1.4",
|
"ts-jest": "27.1.4",
|
||||||
"tslog": "4.9.0",
|
"tslog": "4.9.0",
|
||||||
|
|||||||
@@ -1 +1,8 @@
|
|||||||
export {}
|
const exports = {
|
||||||
|
"npm-which": {},
|
||||||
|
"cross-spawn": {},
|
||||||
|
fs: {},
|
||||||
|
child_process: {},
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = exports
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ test("handleError forwards along async errors", async () => {
|
|||||||
//
|
//
|
||||||
// React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary."
|
// React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary."
|
||||||
// `)
|
// `)
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
// can recover
|
// can recover
|
||||||
@@ -116,7 +116,7 @@ test("can pass an error to useErrorHandler", async () => {
|
|||||||
//
|
//
|
||||||
// React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary."
|
// React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary."
|
||||||
// `)
|
// `)
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
// can recover
|
// can recover
|
||||||
|
|||||||
@@ -77,25 +77,10 @@ test("standard use-case", () => {
|
|||||||
const {unmount} = render(<App />)
|
const {unmount} = render(<App />)
|
||||||
|
|
||||||
userEvent.type(screen.getByRole("textbox", {name: /username/i}), "fail")
|
userEvent.type(screen.getByRole("textbox", {name: /username/i}), "fail")
|
||||||
|
const calls = consoleError.mock.calls[0]
|
||||||
const [[actualError], [componentStack]] = consoleError.mock.calls
|
//@ts-expect-error - it's a mock
|
||||||
expect(firstLine(actualError as string)).toMatchInlineSnapshot(
|
expect(calls[1]).toMatchInlineSnapshot("[Error: 💥 CABOOM 💥]")
|
||||||
`"Error: Uncaught [Error: 💥 CABOOM 💥]"`,
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
)
|
|
||||||
expect(cleanStack(componentStack)).toMatchInlineSnapshot(`
|
|
||||||
"Error: Uncaught [Error: 💥 CABOOM 💥]
|
|
||||||
at reportException
|
|
||||||
at innerInvokeEventListeners
|
|
||||||
at invokeEventListeners
|
|
||||||
at HTMLUnknownElementImpl._dispatch
|
|
||||||
at HTMLUnknownElementImpl.dispatchEvent
|
|
||||||
at HTMLUnknownElement.dispatchEvent
|
|
||||||
at Object.invokeGuardedCallbackDev
|
|
||||||
at invokeGuardedCallback
|
|
||||||
at beginWork\$1
|
|
||||||
at performUnitOfWork "
|
|
||||||
`)
|
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
expect(screen.getByRole("alert")).toMatchInlineSnapshot(`
|
expect(screen.getByRole("alert")).toMatchInlineSnapshot(`
|
||||||
@@ -149,7 +134,7 @@ test("fallbackRender prop", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const {unmount} = render(<App />)
|
const {unmount} = render(<App />)
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
// the render prop API allows a single action to reset the app state
|
// the render prop API allows a single action to reset the app state
|
||||||
@@ -168,7 +153,7 @@ test("simple fallback is supported", () => {
|
|||||||
<span>child</span>
|
<span>child</span>
|
||||||
</ErrorBoundary>,
|
</ErrorBoundary>,
|
||||||
)
|
)
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
expect(screen.getByText(/oh no/i)).to.exist
|
expect(screen.getByText(/oh no/i)).to.exist
|
||||||
expect(screen.queryByText(/child/i)).to.not.exist
|
expect(screen.queryByText(/child/i)).to.not.exist
|
||||||
@@ -183,27 +168,16 @@ test("withErrorBoundary HOC", () => {
|
|||||||
() => {
|
() => {
|
||||||
throw new Error("💥 CABOOM 💥")
|
throw new Error("💥 CABOOM 💥")
|
||||||
},
|
},
|
||||||
{FallbackComponent: ErrorFallback, onError: onErrorHandler},
|
{
|
||||||
|
FallbackComponent: ErrorFallback,
|
||||||
|
onError: onErrorHandler,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
const {unmount} = render(<Boundary />)
|
const {unmount} = render(<Boundary />)
|
||||||
|
const calls = consoleError.mock.calls[0]
|
||||||
const [[actualError], [componentStack]] = consoleError.mock.calls
|
//@ts-expect-error - it's a mock
|
||||||
const firstLineOfError = firstLine(actualError as string)
|
expect(calls[1]).toMatchInlineSnapshot("[Error: 💥 CABOOM 💥]")
|
||||||
expect(firstLineOfError).toMatchInlineSnapshot(`"Error: Uncaught [Error: 💥 CABOOM 💥]"`)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
expect(cleanStack(componentStack)).toMatchInlineSnapshot(`
|
|
||||||
"Error: Uncaught [Error: 💥 CABOOM 💥]
|
|
||||||
at reportException
|
|
||||||
at innerInvokeEventListeners
|
|
||||||
at invokeEventListeners
|
|
||||||
at HTMLUnknownElementImpl._dispatch
|
|
||||||
at HTMLUnknownElementImpl.dispatchEvent
|
|
||||||
at HTMLUnknownElement.dispatchEvent
|
|
||||||
at Object.invokeGuardedCallbackDev
|
|
||||||
at invokeGuardedCallback
|
|
||||||
at beginWork\$1
|
|
||||||
at performUnitOfWork "
|
|
||||||
`)
|
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
const [error, onErrorComponentStack] = (onErrorHandler.mock.calls as [[Error, string]])[0]
|
const [error, onErrorComponentStack] = (onErrorHandler.mock.calls as [[Error, string]])[0]
|
||||||
@@ -265,7 +239,6 @@ test("requires either a fallback, fallbackRender, or FallbackComponent", () => {
|
|||||||
let unmount: undefined | (() => void)
|
let unmount: undefined | (() => void)
|
||||||
expect(() => {
|
expect(() => {
|
||||||
const result = render(
|
const result = render(
|
||||||
// @ts-expect-error we're testing the runtime check of missing props here
|
|
||||||
<ErrorBoundary>
|
<ErrorBoundary>
|
||||||
<Bomb />
|
<Bomb />
|
||||||
</ErrorBoundary>,
|
</ErrorBoundary>,
|
||||||
@@ -318,7 +291,7 @@ test("supports automatic reset of error boundary when resetKeys change", () => {
|
|||||||
// blow it up
|
// blow it up
|
||||||
userEvent.click(screen.getByText("toggle explode"))
|
userEvent.click(screen.getByText("toggle explode"))
|
||||||
expect(screen.getByRole("alert")).to.exist
|
expect(screen.getByRole("alert")).to.exist
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
// recover via try again button
|
// recover via try again button
|
||||||
@@ -333,7 +306,7 @@ test("supports automatic reset of error boundary when resetKeys change", () => {
|
|||||||
// blow it up again
|
// blow it up again
|
||||||
userEvent.click(screen.getByText("toggle explode"))
|
userEvent.click(screen.getByText("toggle explode"))
|
||||||
expect(screen.getByRole("alert")).to.exist
|
expect(screen.getByRole("alert")).to.exist
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
// recover via resetKeys change
|
// recover via resetKeys change
|
||||||
@@ -348,7 +321,7 @@ test("supports automatic reset of error boundary when resetKeys change", () => {
|
|||||||
// blow it up again
|
// blow it up again
|
||||||
userEvent.click(screen.getByText("toggle explode"))
|
userEvent.click(screen.getByText("toggle explode"))
|
||||||
expect(screen.getByRole("alert")).to.exist
|
expect(screen.getByRole("alert")).to.exist
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
// toggles adding an extra resetKey to the array
|
// toggles adding an extra resetKey to the array
|
||||||
@@ -358,7 +331,7 @@ test("supports automatic reset of error boundary when resetKeys change", () => {
|
|||||||
expect(handleResetKeysChange).toHaveBeenCalledWith([true], [true, true])
|
expect(handleResetKeysChange).toHaveBeenCalledWith([true], [true, true])
|
||||||
handleResetKeysChange.mockClear()
|
handleResetKeysChange.mockClear()
|
||||||
expect(screen.getByRole("alert")).to.exist
|
expect(screen.getByRole("alert")).to.exist
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
// toggle explode back to false
|
// toggle explode back to false
|
||||||
@@ -369,7 +342,7 @@ test("supports automatic reset of error boundary when resetKeys change", () => {
|
|||||||
expect(handleResetKeysChange).toHaveBeenCalledWith([true, true], [false, true])
|
expect(handleResetKeysChange).toHaveBeenCalledWith([true, true], [false, true])
|
||||||
expect(screen.getByRole("alert")).to.exist
|
expect(screen.getByRole("alert")).to.exist
|
||||||
handleResetKeysChange.mockClear()
|
handleResetKeysChange.mockClear()
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
// toggle extra resetKey
|
// toggle extra resetKey
|
||||||
@@ -411,7 +384,7 @@ test("supports reset via resetKeys right after error is triggered on component m
|
|||||||
|
|
||||||
// it blows up on render
|
// it blows up on render
|
||||||
expect(screen.queryByRole("alert", {})).to.exist
|
expect(screen.queryByRole("alert", {})).to.exist
|
||||||
expect(consoleError).toHaveBeenCalledTimes(3)
|
expect(consoleError).toHaveBeenCalledTimes(1)
|
||||||
consoleError.mockClear()
|
consoleError.mockClear()
|
||||||
|
|
||||||
// recover via "toggle explode" button
|
// recover via "toggle explode" button
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {RedirectError} from "blitz"
|
import {RedirectError} from "blitz"
|
||||||
import {useRouter} from "next/compat/router"
|
import {useRouter} from "next/compat/router"
|
||||||
import type {NextRouter} from "next/router"
|
import type {NextRouter} from "next/router"
|
||||||
import * as React from "react"
|
import React from "react"
|
||||||
import {RouterContext} from "./router-context"
|
import {RouterContext} from "./router-context"
|
||||||
import _debug from "debug"
|
import _debug from "debug"
|
||||||
import type {ExcludeRouterProps, WithRouterProps} from "next/dist/client/with-router"
|
import type {ExcludeRouterProps, WithRouterProps} from "next/dist/client/with-router"
|
||||||
@@ -77,7 +77,7 @@ const initialState: ErrorBoundaryState = {error: null}
|
|||||||
function withRouter<P extends WithRouterProps>(
|
function withRouter<P extends WithRouterProps>(
|
||||||
ComposedComponent: React.ComponentType<P>,
|
ComposedComponent: React.ComponentType<P>,
|
||||||
): React.ComponentType<ExcludeRouterProps<P>> {
|
): React.ComponentType<ExcludeRouterProps<P>> {
|
||||||
function WithRouterWrapper(props: any): JSX.Element {
|
function WithRouterWrapper(props: any): React.JSX.Element {
|
||||||
return <ComposedComponent router={useRouter()} {...props} />
|
return <ComposedComponent router={useRouter()} {...props} />
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,7 +114,13 @@ export const ErrorBoundary = withRouter(
|
|||||||
await this.props.router.push(error.url)
|
await this.props.router.push(error.url)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.props.onError?.(error, info)
|
if (this.props.onError) {
|
||||||
|
let componentStack = info.componentStack
|
||||||
|
if (!componentStack) {
|
||||||
|
componentStack = new Error("Stack trace").stack || ""
|
||||||
|
}
|
||||||
|
this.props.onError(error, {componentStack})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@@ -190,7 +196,7 @@ export const ErrorBoundary = withRouter(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
function withErrorBoundary<P extends JSX.IntrinsicAttributes>(
|
function withErrorBoundary<P extends React.JSX.IntrinsicAttributes>(
|
||||||
Component: React.ComponentType<P>,
|
Component: React.ComponentType<P>,
|
||||||
errorBoundaryProps: ErrorBoundaryProps,
|
errorBoundaryProps: ErrorBoundaryProps,
|
||||||
): React.ComponentType<P> {
|
): React.ComponentType<P> {
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import {NextPageContext} from "next"
|
import {NextPageContext} from "next"
|
||||||
import dynamic from "next/dynamic"
|
import dynamic from "next/dynamic"
|
||||||
const Head = dynamic(() => import("next/head").then((mod) => mod.default), {
|
const Head = dynamic(
|
||||||
ssr: false,
|
() =>
|
||||||
loading: () => null,
|
import("next/head").then((mod) => ({
|
||||||
})
|
default: mod.default,
|
||||||
|
})),
|
||||||
|
{
|
||||||
|
ssr: false,
|
||||||
|
loading: () => null,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
const statusCodes: {[code: number]: string} = {
|
const statusCodes: {[code: number]: string} = {
|
||||||
400: "Bad Request",
|
400: "Bad Request",
|
||||||
|
|||||||
@@ -9,10 +9,16 @@ import type {Router} from "next/router"
|
|||||||
import {BlitzProvider} from "./provider"
|
import {BlitzProvider} from "./provider"
|
||||||
import dynamic from "next/dynamic"
|
import dynamic from "next/dynamic"
|
||||||
export {Routes} from ".blitz"
|
export {Routes} from ".blitz"
|
||||||
const Head = dynamic(() => import("next/head").then((mod) => mod.default), {
|
const Head = dynamic(
|
||||||
ssr: false,
|
() =>
|
||||||
loading: () => null,
|
import("next/head").then((mod) => ({
|
||||||
})
|
default: mod.default,
|
||||||
|
})),
|
||||||
|
{
|
||||||
|
ssr: false,
|
||||||
|
loading: () => null,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
export {BlitzProvider} from "./provider"
|
export {BlitzProvider} from "./provider"
|
||||||
|
|
||||||
@@ -55,7 +61,7 @@ type RedirectAuthenticatedToFnCtx = {
|
|||||||
}
|
}
|
||||||
type RedirectAuthenticatedToFn = (args: RedirectAuthenticatedToFnCtx) => RedirectAuthenticatedTo
|
type RedirectAuthenticatedToFn = (args: RedirectAuthenticatedToFnCtx) => RedirectAuthenticatedTo
|
||||||
export type BlitzPage<P = {}> = React.ComponentType<P> & {
|
export type BlitzPage<P = {}> = React.ComponentType<P> & {
|
||||||
getLayout?: (component: JSX.Element) => JSX.Element
|
getLayout?: (component: React.JSX.Element) => React.JSX.Element
|
||||||
authenticate?: boolean | {redirectTo?: string | RouteUrlObject; role?: string | Array<string>}
|
authenticate?: boolean | {redirectTo?: string | RouteUrlObject; role?: string | Array<string>}
|
||||||
suppressFirstRenderFlicker?: boolean
|
suppressFirstRenderFlicker?: boolean
|
||||||
redirectAuthenticatedTo?: RedirectAuthenticatedTo | RedirectAuthenticatedToFn
|
redirectAuthenticatedTo?: RedirectAuthenticatedTo | RedirectAuthenticatedToFn
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import type {QueryClient, HydrateOptions} from "@blitzjs/rpc"
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
|
|
||||||
export type BlitzProviderProps = {
|
export type BlitzProviderProps = {
|
||||||
children: JSX.Element
|
children: React.JSX.Element
|
||||||
client?: QueryClient
|
client?: QueryClient
|
||||||
contextSharing?: boolean
|
contextSharing?: boolean
|
||||||
dehydratedState?: unknown
|
dehydratedState?: unknown
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import {describe, it, expect, vi, afterEach} from "vitest"
|
import {describe, it, expect, vi, afterEach} from "vitest"
|
||||||
import {extractRouterParams, useParam, useParams} from "./use-params"
|
import {extractRouterParams, useParam, useParams} from "./use-params"
|
||||||
import {renderHook as defaultRenderHook} from "@testing-library/react-hooks"
|
import {renderHook as defaultRenderHook} from "@testing-library/react"
|
||||||
import {NextRouter} from "next/router"
|
import {NextRouter} from "next/router"
|
||||||
import {RouterContext} from "./router-context"
|
import {RouterContext} from "./router-context"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,32 @@
|
|||||||
# @blitzjs/rpc
|
# @blitzjs/rpc
|
||||||
|
|
||||||
|
## 2.2.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 3fa3a4ef3: chore: support next.js 15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [565db3c5a]
|
||||||
|
- Updated dependencies [3fa3a4ef3]
|
||||||
|
- blitz@2.2.0
|
||||||
|
|
||||||
|
## 2.1.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- blitz@2.1.4
|
||||||
|
|
||||||
|
## 2.1.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 0b3286468: chore: bump `next.js` and `zod` versions
|
||||||
|
- Updated dependencies [0b3286468]
|
||||||
|
- Updated dependencies [50f17d21c]
|
||||||
|
- blitz@2.1.3
|
||||||
|
|
||||||
## 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/rpc",
|
"name": "@blitzjs/rpc",
|
||||||
"version": "2.1.2",
|
"version": "2.2.0",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -37,25 +37,25 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@tanstack/query-core": "4.24.4",
|
"@tanstack/query-core": "4.24.4",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "*",
|
"next": "*",
|
||||||
"react": "*"
|
"react": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/auth": "2.1.2",
|
"@blitzjs/auth": "2.2.0",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@tanstack/query-core": "4.24.4",
|
"@tanstack/query-core": "4.24.4",
|
||||||
"@types/debug": "4.1.7",
|
"@types/debug": "4.1.7",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "npm:types-react-dom@19.0.0",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"next": "14.3.0-canary.28",
|
"next": "15.0.1",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "19.0.0",
|
||||||
"typescript": "^4.8.4",
|
"typescript": "^4.8.4",
|
||||||
"unbuild": "0.7.6",
|
"unbuild": "0.7.6",
|
||||||
"watch": "1.0.2",
|
"watch": "1.0.2",
|
||||||
"zod": "3.20.2"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ async function getResolverMap(): Promise<ResolverFiles | null | undefined> {
|
|||||||
// Handles:
|
// Handles:
|
||||||
// - Vite
|
// - Vite
|
||||||
// {
|
// {
|
||||||
// const {resolverFilesLoaded, viteProvider} = await loadTelefuncFilesWithVite(runContext)
|
// const {resolverFilesLoaded, viteProvider} = await loadTelefuncFilesWithVite(run
|
||||||
// if (resolverFilesLoaded) {
|
// if (resolverFilesLoaded) {
|
||||||
// assertUsage(
|
// assertUsage(
|
||||||
// Object.keys(resolverFilesLoaded).length > 0,
|
// Object.keys(resolverFilesLoaded).length > 0,
|
||||||
@@ -364,17 +364,18 @@ type Params = Record<string, unknown>
|
|||||||
|
|
||||||
export function rpcAppHandler(config?: RpcConfig) {
|
export function rpcAppHandler(config?: RpcConfig) {
|
||||||
registerBlitzErrorClasses()
|
registerBlitzErrorClasses()
|
||||||
async function handleRpcRequest(req: Request, context: {params: Params}, ctx?: Ctx) {
|
async function handleRpcRequest(req: Request, segmentData: {params: Promise<Params>}, ctx?: Ctx) {
|
||||||
|
const params = await segmentData.params
|
||||||
const session = ctx?.session
|
const session = ctx?.session
|
||||||
const resolverMap = await getResolverMap()
|
const resolverMap = await getResolverMap()
|
||||||
assert(resolverMap, "No query or mutation resolvers found")
|
assert(resolverMap, "No query or mutation resolvers found")
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
Array.isArray(context.params.blitz),
|
Array.isArray(params.blitz),
|
||||||
"It seems your Blitz RPC endpoint file is not named [[...blitz]].(jt)s. Please ensure it is",
|
"It seems your Blitz RPC endpoint file is not named [[...blitz]].(jt)s. Please ensure it is",
|
||||||
)
|
)
|
||||||
|
|
||||||
const relativeRoutePath = (context.params.blitz as string[])?.join("/")
|
const relativeRoutePath = (params.blitz as string[])?.join("/")
|
||||||
const routePath = "/" + relativeRoutePath
|
const routePath = "/" + relativeRoutePath
|
||||||
const resolverName = routePath.replace(/(\/api\/rpc)?\//, "")
|
const resolverName = routePath.replace(/(\/api\/rpc)?\//, "")
|
||||||
const rpcLogger = new RpcLogger(resolverName, config?.logging)
|
const rpcLogger = new RpcLogger(resolverName, config?.logging)
|
||||||
@@ -413,14 +414,14 @@ export function rpcAppHandler(config?: RpcConfig) {
|
|||||||
json:
|
json:
|
||||||
req.method === "POST"
|
req.method === "POST"
|
||||||
? body.params
|
? body.params
|
||||||
: context.params.params
|
: params.params
|
||||||
? parse(`${context.params.params}`)
|
? parse(`${params.params}`)
|
||||||
: undefined,
|
: undefined,
|
||||||
meta:
|
meta:
|
||||||
req.method === "POST"
|
req.method === "POST"
|
||||||
? body.meta?.params
|
? body.meta?.params
|
||||||
: context.params.meta
|
: params.meta
|
||||||
? parse(`${context.params.meta}`)
|
? parse(`${params.meta}`)
|
||||||
: undefined,
|
: undefined,
|
||||||
})
|
})
|
||||||
rpcLogger.timer.initResolver()
|
rpcLogger.timer.initResolver()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {QueryClientProvider} from "@tanstack/react-query"
|
import {QueryClientProvider} from "@tanstack/react-query"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
|
|
||||||
export type BlitzProviderType = ({children}: {children: React.ReactNode}) => JSX.Element
|
export type BlitzProviderType = ({children}: {children: React.ReactNode}) => React.JSX.Element
|
||||||
|
|
||||||
const BlitzProvider: BlitzProviderType = ({children}) => {
|
const BlitzProvider: BlitzProviderType = ({children}) => {
|
||||||
const [queryClient] = React.useState(globalThis.queryClient)
|
const [queryClient] = React.useState(globalThis.queryClient)
|
||||||
|
|||||||
@@ -1,5 +1,32 @@
|
|||||||
# blitz
|
# blitz
|
||||||
|
|
||||||
|
## 2.2.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 3fa3a4ef3: chore: support next.js 15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 565db3c5a: Fixed incorrect terminal message after creating a new Blitz project to use the correct command (`npm run dev` or `yarn dev`).
|
||||||
|
- @blitzjs/generator@2.2.0
|
||||||
|
|
||||||
|
## 2.1.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [38d320fd2]
|
||||||
|
- @blitzjs/generator@2.1.4
|
||||||
|
|
||||||
|
## 2.1.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 0b3286468: chore: bump `next.js` and `zod` versions
|
||||||
|
- 50f17d21c: Update prisma-ast dependency to prevent Blitz generator from failing when Prisma keywords are used as model names
|
||||||
|
- Updated dependencies [0b3286468]
|
||||||
|
- @blitzjs/generator@2.1.3
|
||||||
|
|
||||||
## 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "blitz",
|
"name": "blitz",
|
||||||
"version": "2.1.2",
|
"version": "2.2.0",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -30,8 +30,8 @@
|
|||||||
"blitz": "bin/blitz"
|
"blitz": "bin/blitz"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/generator": "2.1.2",
|
"@blitzjs/generator": "2.2.0",
|
||||||
"@mrleebo/prisma-ast": "0.2.6",
|
"@mrleebo/prisma-ast": "0.4.1",
|
||||||
"@types/global-agent": "2.1.1",
|
"@types/global-agent": "2.1.1",
|
||||||
"arg": "5.0.1",
|
"arg": "5.0.1",
|
||||||
"ast-types": "0.14.2",
|
"ast-types": "0.14.2",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
"watchpack": "2.1.1"
|
"watchpack": "2.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@types/cookie": "0.4.1",
|
"@types/cookie": "0.4.1",
|
||||||
"@types/cross-spawn": "6.0.2",
|
"@types/cross-spawn": "6.0.2",
|
||||||
"@types/debug": "4.1.7",
|
"@types/debug": "4.1.7",
|
||||||
@@ -95,17 +95,17 @@
|
|||||||
"@types/npm-which": "3.0.1",
|
"@types/npm-which": "3.0.1",
|
||||||
"@types/progress": "2.0.5",
|
"@types/progress": "2.0.5",
|
||||||
"@types/prompts": "2.0.14",
|
"@types/prompts": "2.0.14",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "npm:types-react-dom@19.0.0",
|
||||||
"@types/test-listen": "1.1.0",
|
"@types/test-listen": "1.1.0",
|
||||||
"@types/watchpack": "1.1.1",
|
"@types/watchpack": "1.1.1",
|
||||||
"express": "4.17.3",
|
"express": "4.17.3",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"test-listen": "1.1.0",
|
"test-listen": "1.1.0",
|
||||||
"typescript": "^4.8.4",
|
"typescript": "^4.8.4",
|
||||||
"unbuild": "0.7.6",
|
"unbuild": "0.7.6",
|
||||||
"watch": "1.0.2",
|
"watch": "1.0.2",
|
||||||
"zod": "3.20.2"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ const newApp: CliCommand = async () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
postInstallSteps.push(`${projectPkgManger} blitz dev`)
|
postInstallSteps.push(`${projectPkgManger} ${projectPkgManger === "npm" ? "run " : ""}dev`);
|
||||||
|
|
||||||
console.log("\n Your new Blitz app is ready! Next steps:")
|
console.log("\n Your new Blitz app is ready! Next steps:")
|
||||||
postInstallSteps.forEach((step, index) => {
|
postInstallSteps.forEach((step, index) => {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
registerBlitzErrorClasses,
|
registerBlitzErrorClasses,
|
||||||
} from "./errors"
|
} from "./errors"
|
||||||
import type {EventHooks, MiddlewareHooks} from "./types"
|
import type {EventHooks, MiddlewareHooks} from "./types"
|
||||||
|
import React from "react"
|
||||||
export {
|
export {
|
||||||
AuthenticationError,
|
AuthenticationError,
|
||||||
AuthorizationError,
|
AuthorizationError,
|
||||||
@@ -26,7 +27,7 @@ export * from "./utils/enhance-prisma"
|
|||||||
export type BlitzProviderComponentType = <TProps = any>(
|
export type BlitzProviderComponentType = <TProps = any>(
|
||||||
component: ComponentType<TProps>,
|
component: ComponentType<TProps>,
|
||||||
) => {
|
) => {
|
||||||
(props: TProps): JSX.Element
|
(props: TProps): React.JSX.Element
|
||||||
displayName: string
|
displayName: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,31 @@
|
|||||||
# @blitzjs/codemod
|
# @blitzjs/codemod
|
||||||
|
|
||||||
|
## 2.2.0
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [565db3c5a]
|
||||||
|
- Updated dependencies [3fa3a4ef3]
|
||||||
|
- blitz@2.2.0
|
||||||
|
- @blitzjs/generator@2.2.0
|
||||||
|
|
||||||
|
## 2.1.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [38d320fd2]
|
||||||
|
- @blitzjs/generator@2.1.4
|
||||||
|
- blitz@2.1.4
|
||||||
|
|
||||||
|
## 2.1.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0b3286468]
|
||||||
|
- Updated dependencies [50f17d21c]
|
||||||
|
- blitz@2.1.3
|
||||||
|
- @blitzjs/generator@2.1.3
|
||||||
|
|
||||||
## 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/codemod",
|
"name": "@blitzjs/codemod",
|
||||||
"version": "2.1.2",
|
"version": "2.2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "unbuild",
|
"build": "unbuild",
|
||||||
"dev": "watch unbuild src --wait=0.2",
|
"dev": "watch unbuild src --wait=0.2",
|
||||||
@@ -25,9 +25,9 @@
|
|||||||
"@babel/plugin-proposal-class-properties": "7.17.12",
|
"@babel/plugin-proposal-class-properties": "7.17.12",
|
||||||
"@babel/plugin-syntax-jsx": "7.17.12",
|
"@babel/plugin-syntax-jsx": "7.17.12",
|
||||||
"@babel/plugin-syntax-typescript": "7.17.12",
|
"@babel/plugin-syntax-typescript": "7.17.12",
|
||||||
"@blitzjs/generator": "2.1.2",
|
"@blitzjs/generator": "2.2.0",
|
||||||
"arg": "5.0.1",
|
"arg": "5.0.1",
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"chalk": "^4.1.0",
|
"chalk": "^4.1.0",
|
||||||
"cross-spawn": "7.0.3",
|
"cross-spawn": "7.0.3",
|
||||||
"debug": "4.3.3",
|
"debug": "4.3.3",
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/preset-env": "7.12.10",
|
"@babel/preset-env": "7.12.10",
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@types/jscodeshift": "0.11.2",
|
"@types/jscodeshift": "0.11.2",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"ast-types": "0.14.2",
|
"ast-types": "0.14.2",
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @blitzjs/config
|
# @blitzjs/config
|
||||||
|
|
||||||
|
## 2.2.0
|
||||||
|
|
||||||
|
## 2.1.4
|
||||||
|
|
||||||
|
## 2.1.3
|
||||||
|
|
||||||
## 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
## 2.1.1
|
## 2.1.1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/config",
|
"name": "@blitzjs/config",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.1.2",
|
"version": "2.2.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "5.42.1",
|
"@typescript-eslint/eslint-plugin": "5.42.1",
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# @blitzjs/generator
|
# @blitzjs/generator
|
||||||
|
|
||||||
|
## 2.2.0
|
||||||
|
|
||||||
|
## 2.1.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 38d320fd2: chore: Upgrade to prisma v6. Read more about migration in https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6
|
||||||
|
|
||||||
|
## 2.1.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 0b3286468: chore: bump `next.js` and `zod` versions
|
||||||
|
|
||||||
## 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/generator",
|
"name": "@blitzjs/generator",
|
||||||
"version": "2.1.2",
|
"version": "2.2.0",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -51,10 +51,10 @@
|
|||||||
"tslog": "4.9.0",
|
"tslog": "4.9.0",
|
||||||
"username": "5.1.0",
|
"username": "5.1.0",
|
||||||
"vinyl": "2.2.1",
|
"vinyl": "2.2.1",
|
||||||
"zod": "3.20.2"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@juanm04/cpx": "2.0.1",
|
"@juanm04/cpx": "2.0.1",
|
||||||
"@types/babel__core": "7.1.19",
|
"@types/babel__core": "7.1.19",
|
||||||
"@types/diff": "5.0.2",
|
"@types/diff": "5.0.2",
|
||||||
@@ -64,15 +64,15 @@
|
|||||||
"@types/mem-fs-editor": "7.0.1",
|
"@types/mem-fs-editor": "7.0.1",
|
||||||
"@types/pluralize": "0.0.29",
|
"@types/pluralize": "0.0.29",
|
||||||
"@types/prettier": "2.4.4",
|
"@types/prettier": "2.4.4",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "npm:types-react-dom@19.0.0",
|
||||||
"@types/vinyl": "2.0.6",
|
"@types/vinyl": "2.0.6",
|
||||||
"@typescript-eslint/eslint-plugin": "5.42.1",
|
"@typescript-eslint/eslint-plugin": "5.42.1",
|
||||||
"@typescript-eslint/parser": "5.9.1",
|
"@typescript-eslint/parser": "5.9.1",
|
||||||
"babylon": "6.18.0",
|
"babylon": "6.18.0",
|
||||||
"debug": "4.3.3",
|
"debug": "4.3.3",
|
||||||
"eslint": "8.27.0",
|
"eslint": "8.27.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"typescript": "^4.8.4",
|
"typescript": "^4.8.4",
|
||||||
"unbuild": "0.6.9",
|
"unbuild": "0.6.9",
|
||||||
"watch": "1.0.2"
|
"watch": "1.0.2"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { validateZodSchema } from "blitz"
|
|||||||
export { FORM_ERROR } from "final-form"
|
export { FORM_ERROR } from "final-form"
|
||||||
|
|
||||||
export interface FormProps<S extends z.ZodType<any, any>>
|
export interface FormProps<S extends z.ZodType<any, any>>
|
||||||
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
||||||
/** All your form fields */
|
/** All your form fields */
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
/** Text to display in the submit button */
|
/** Text to display in the submit button */
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { forwardRef, PropsWithoutRef } from "react"
|
import { forwardRef, PropsWithoutRef } from "react"
|
||||||
import { useField } from "react-final-form"
|
import { useField } from "react-final-form"
|
||||||
|
|
||||||
export interface LabeledSelectFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["select"]> {
|
export interface LabeledSelectFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["select"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
type?: "number" | "string"
|
type?: "number" | "string"
|
||||||
options: any
|
options: any
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LabeledSelectField = forwardRef<HTMLSelectElement, LabeledSelectFieldProps>(
|
export const LabeledSelectField = forwardRef<HTMLSelectElement, LabeledSelectFieldProps>(
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { forwardRef, ComponentPropsWithoutRef, PropsWithoutRef } from "react"
|
import { forwardRef, ComponentPropsWithoutRef, PropsWithoutRef } from "react"
|
||||||
import { useField, UseFieldConfig } from "react-final-form"
|
import { useField, UseFieldConfig } from "react-final-form"
|
||||||
|
|
||||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
export interface LabeledTextFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
type?: "text" | "password" | "email" | "number"
|
type?: "text" | "password" | "email" | "number"
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
fieldProps?: UseFieldConfig<string>
|
fieldProps?: UseFieldConfig<string>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { validateZodSchema } from "blitz"
|
|||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
export interface FormProps<S extends z.ZodType<any, any>>
|
export interface FormProps<S extends z.ZodType<any, any>>
|
||||||
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
||||||
/** All your form fields */
|
/** All your form fields */
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
/** Text to display in the submit button */
|
/** Text to display in the submit button */
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import { forwardRef, PropsWithoutRef } from "react";
|
|||||||
import { useFormikContext, ErrorMessage, Field } from "formik";
|
import { useFormikContext, ErrorMessage, Field } from "formik";
|
||||||
|
|
||||||
export interface LabeledSelectFieldProps
|
export interface LabeledSelectFieldProps
|
||||||
extends PropsWithoutRef<JSX.IntrinsicElements["select"]> {
|
extends PropsWithoutRef<React.JSX.IntrinsicElements["select"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string;
|
name: string;
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string;
|
label: string;
|
||||||
/** Field options. */
|
/** Field options. */
|
||||||
options: any;
|
options: any;
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>;
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LabeledSelectField = forwardRef<
|
export const LabeledSelectField = forwardRef<
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { forwardRef, PropsWithoutRef } from "react"
|
import { forwardRef, PropsWithoutRef } from "react"
|
||||||
import { useField, useFormikContext, ErrorMessage } from "formik"
|
import { useField, useFormikContext, ErrorMessage } from "formik"
|
||||||
|
|
||||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
export interface LabeledTextFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
type?: "text" | "password" | "email" | "number"
|
type?: "text" | "password" | "email" | "number"
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LabeledTextField = forwardRef<HTMLInputElement, LabeledTextFieldProps>(
|
export const LabeledTextField = forwardRef<HTMLInputElement, LabeledTextFieldProps>(
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
|
|||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
export interface FormProps<S extends z.ZodType<any, any>>
|
export interface FormProps<S extends z.ZodType<any, any>>
|
||||||
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
||||||
/** All your form fields */
|
/** All your form fields */
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
/** Text to display in the submit button */
|
/** Text to display in the submit button */
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import { ComponentPropsWithoutRef, forwardRef, PropsWithoutRef } from "react"
|
|||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
import { ErrorMessage } from "@hookform/error-message"
|
import { ErrorMessage } from "@hookform/error-message"
|
||||||
|
|
||||||
export interface LabeledSelectFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["select"]> {
|
export interface LabeledSelectFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["select"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
options: any[]
|
options: any[]
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import { forwardRef, PropsWithoutRef, ComponentPropsWithoutRef } from "react"
|
|||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
import { ErrorMessage } from "@hookform/error-message"
|
import { ErrorMessage } from "@hookform/error-message"
|
||||||
|
|
||||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
export interface LabeledTextFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
type?: "text" | "password" | "email" | "number"
|
type?: "text" | "password" | "email" | "number"
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,18 +31,17 @@
|
|||||||
"@prisma/client": "5.4.2",
|
"@prisma/client": "5.4.2",
|
||||||
"blitz": "latest",
|
"blitz": "latest",
|
||||||
"formik": "2.4.5",
|
"formik": "2.4.5",
|
||||||
"next": "14.1.4",
|
"next": "14.2.15",
|
||||||
"prisma": "5.4.2",
|
"prisma": "5.4.2",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"secure-password": "4.0.0",
|
"secure-password": "4.0.0",
|
||||||
"zod": "3.22.4"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/env": "13.4.19",
|
"@next/env": "13.4.19",
|
||||||
"@testing-library/jest-dom": "5.16.5",
|
"@testing-library/jest-dom": "5.16.5",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/preview-email": "2.0.1",
|
"@types/preview-email": "2.0.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "18.0.25",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { validateZodSchema } from "blitz"
|
|||||||
export { FORM_ERROR } from "final-form"
|
export { FORM_ERROR } from "final-form"
|
||||||
|
|
||||||
export interface FormProps<S extends z.ZodType<any, any>>
|
export interface FormProps<S extends z.ZodType<any, any>>
|
||||||
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
||||||
/** All your form fields */
|
/** All your form fields */
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
/** Text to display in the submit button */
|
/** Text to display in the submit button */
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { forwardRef, PropsWithoutRef } from "react"
|
import { forwardRef, PropsWithoutRef } from "react"
|
||||||
import { useField } from "react-final-form"
|
import { useField } from "react-final-form"
|
||||||
|
|
||||||
export interface LabeledSelectFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["select"]> {
|
export interface LabeledSelectFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["select"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
type?: "number" | "string"
|
type?: "number" | "string"
|
||||||
options: any
|
options: any
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LabeledSelectField = forwardRef<HTMLSelectElement, LabeledSelectFieldProps>(
|
export const LabeledSelectField = forwardRef<HTMLSelectElement, LabeledSelectFieldProps>(
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { forwardRef, ComponentPropsWithoutRef, PropsWithoutRef } from "react"
|
import { forwardRef, ComponentPropsWithoutRef, PropsWithoutRef } from "react"
|
||||||
import { useField, UseFieldConfig } from "react-final-form"
|
import { useField, UseFieldConfig } from "react-final-form"
|
||||||
|
|
||||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
export interface LabeledTextFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
type?: "text" | "password" | "email" | "number"
|
type?: "text" | "password" | "email" | "number"
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
fieldProps?: UseFieldConfig<string>
|
fieldProps?: UseFieldConfig<string>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { validateZodSchema } from "blitz"
|
|||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
export interface FormProps<S extends z.ZodType<any, any>>
|
export interface FormProps<S extends z.ZodType<any, any>>
|
||||||
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
||||||
/** All your form fields */
|
/** All your form fields */
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
/** Text to display in the submit button */
|
/** Text to display in the submit button */
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import { forwardRef, PropsWithoutRef } from "react";
|
|||||||
import { useFormikContext, ErrorMessage, Field } from "formik";
|
import { useFormikContext, ErrorMessage, Field } from "formik";
|
||||||
|
|
||||||
export interface LabeledSelectFieldProps
|
export interface LabeledSelectFieldProps
|
||||||
extends PropsWithoutRef<JSX.IntrinsicElements["select"]> {
|
extends PropsWithoutRef<React.JSX.IntrinsicElements["select"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string;
|
name: string;
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string;
|
label: string;
|
||||||
/** Field options. */
|
/** Field options. */
|
||||||
options: any;
|
options: any;
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>;
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LabeledSelectField = forwardRef<
|
export const LabeledSelectField = forwardRef<
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { forwardRef, PropsWithoutRef } from "react"
|
import { forwardRef, PropsWithoutRef } from "react"
|
||||||
import { useField, useFormikContext, ErrorMessage } from "formik"
|
import { useField, useFormikContext, ErrorMessage } from "formik"
|
||||||
|
|
||||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
export interface LabeledTextFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
type?: "text" | "password" | "email" | "number"
|
type?: "text" | "password" | "email" | "number"
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LabeledTextField = forwardRef<HTMLInputElement, LabeledTextFieldProps>(
|
export const LabeledTextField = forwardRef<HTMLInputElement, LabeledTextFieldProps>(
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
|
|||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
export interface FormProps<S extends z.ZodType<any, any>>
|
export interface FormProps<S extends z.ZodType<any, any>>
|
||||||
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
extends Omit<PropsWithoutRef<React.JSX.IntrinsicElements["form"]>, "onSubmit"> {
|
||||||
/** All your form fields */
|
/** All your form fields */
|
||||||
children?: ReactNode
|
children?: ReactNode
|
||||||
/** Text to display in the submit button */
|
/** Text to display in the submit button */
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import { ComponentPropsWithoutRef, forwardRef, PropsWithoutRef } from "react"
|
|||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
import { ErrorMessage } from "@hookform/error-message"
|
import { ErrorMessage } from "@hookform/error-message"
|
||||||
|
|
||||||
export interface LabeledSelectFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["select"]> {
|
export interface LabeledSelectFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["select"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
options: any[]
|
options: any[]
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import { forwardRef, PropsWithoutRef, ComponentPropsWithoutRef } from "react"
|
|||||||
import { useFormContext } from "react-hook-form"
|
import { useFormContext } from "react-hook-form"
|
||||||
import { ErrorMessage } from "@hookform/error-message"
|
import { ErrorMessage } from "@hookform/error-message"
|
||||||
|
|
||||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
export interface LabeledTextFieldProps extends PropsWithoutRef<React.JSX.IntrinsicElements["input"]> {
|
||||||
/** Field name. */
|
/** Field name. */
|
||||||
name: string
|
name: string
|
||||||
/** Field label. */
|
/** Field label. */
|
||||||
label: string
|
label: string
|
||||||
/** Field type. Doesn't include radio buttons and checkboxes */
|
/** Field type. Doesn't include radio buttons and checkboxes */
|
||||||
type?: "text" | "password" | "email" | "number"
|
type?: "text" | "password" | "email" | "number"
|
||||||
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
|
outerProps?: PropsWithoutRef<React.JSX.IntrinsicElements["div"]>
|
||||||
labelProps?: ComponentPropsWithoutRef<"label">
|
labelProps?: ComponentPropsWithoutRef<"label">
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,20 +25,19 @@
|
|||||||
"@blitzjs/auth": "latest",
|
"@blitzjs/auth": "latest",
|
||||||
"@blitzjs/next": "latest",
|
"@blitzjs/next": "latest",
|
||||||
"@blitzjs/rpc": "latest",
|
"@blitzjs/rpc": "latest",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "latest",
|
"blitz": "latest",
|
||||||
"next": "14.1.4",
|
"next": "14.2.15",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"secure-password": "4.0.0",
|
"secure-password": "4.0.0",
|
||||||
"zod": "3.20.2"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@testing-library/jest-dom": "5.16.5",
|
"@testing-library/jest-dom": "5.16.5",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/preview-email": "2.0.1",
|
"@types/preview-email": "2.0.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "18.0.25",
|
||||||
|
|||||||
@@ -25,21 +25,20 @@
|
|||||||
"@blitzjs/auth": "latest",
|
"@blitzjs/auth": "latest",
|
||||||
"@blitzjs/next": "latest",
|
"@blitzjs/next": "latest",
|
||||||
"@blitzjs/rpc": "latest",
|
"@blitzjs/rpc": "latest",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "6.1.0",
|
||||||
"blitz": "latest",
|
"blitz": "latest",
|
||||||
"next": "14.1.4",
|
"next": "14.2.15",
|
||||||
"prisma": "4.6.1",
|
"prisma": "6.1.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"secure-password": "4.0.0",
|
"secure-password": "4.0.0",
|
||||||
"zod": "3.20.2"
|
"zod": "3.23.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@next/env": "13.4.19",
|
"@next/env": "13.4.19",
|
||||||
"@testing-library/jest-dom": "5.16.5",
|
"@testing-library/jest-dom": "5.16.5",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "16.0.1",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/preview-email": "2.0.1",
|
"@types/preview-email": "2.0.1",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "18.0.25",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import {vi} from "vitest"
|
import {vi} from "vitest"
|
||||||
import { render as defaultRender } from "@testing-library/react"
|
import { render as defaultRender } from "@testing-library/react"
|
||||||
import { renderHook as defaultRenderHook } from "@testing-library/react-hooks"
|
import { renderHook as defaultRenderHook } from "@testing-library/react"
|
||||||
import { NextRouter } from "next/router"
|
import { NextRouter } from "next/router"
|
||||||
import {BlitzProvider, RouterContext} from "@blitzjs/next"
|
import {BlitzProvider, RouterContext} from "@blitzjs/next"
|
||||||
import { QueryClient } from "@blitzjs/rpc"
|
import { QueryClient } from "@blitzjs/rpc"
|
||||||
|
|||||||
@@ -5,17 +5,19 @@ import get__ModelName__ from "../../queries/get__ModelName__"
|
|||||||
import { Edit__ModelName__ } from "../../components/Edit__ModelName__"
|
import { Edit__ModelName__ } from "../../components/Edit__ModelName__"
|
||||||
|
|
||||||
type Edit__ModelName__PageProps = {
|
type Edit__ModelName__PageProps = {
|
||||||
params: { __modelId__: string }
|
params: Promise<{ __modelId__: string }>
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function generateMetadata({ params }: Edit__ModelName__PageProps): Promise<Metadata> {
|
export async function generateMetadata(props: Edit__ModelName__PageProps): Promise<Metadata> {
|
||||||
|
const params = await props.params;
|
||||||
const __ModelName__ = await invoke(get__ModelName__, { id: Number(params.__modelId__) })
|
const __ModelName__ = await invoke(get__ModelName__, { id: Number(params.__modelId__) })
|
||||||
return {
|
return {
|
||||||
title: `Edit __ModelName__ ${__ModelName__.id} - ${__ModelName__.name}`,
|
title: `Edit __ModelName__ ${__ModelName__.id} - ${__ModelName__.name}`,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Page({ params }: Edit__ModelName__PageProps) {
|
export default async function Page(props: Edit__ModelName__PageProps) {
|
||||||
|
const params = await props.params;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Suspense fallback={<div>Loading...</div>}>
|
<Suspense fallback={<div>Loading...</div>}>
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import { invoke } from "src/app/blitz-server"
|
|||||||
import get__ModelName__ from "../queries/get__ModelName__"
|
import get__ModelName__ from "../queries/get__ModelName__"
|
||||||
import { __ModelName__ } from "../components/__ModelName__"
|
import { __ModelName__ } from "../components/__ModelName__"
|
||||||
|
|
||||||
export async function generateMetadata({ params }: __ModelName__PageProps): Promise<Metadata> {
|
export async function generateMetadata(props: __ModelName__PageProps): Promise<Metadata> {
|
||||||
|
const params = await props.params;
|
||||||
const __ModelName__ = await invoke(get__ModelName__, { id: Number(params.__modelId__) })
|
const __ModelName__ = await invoke(get__ModelName__, { id: Number(params.__modelId__) })
|
||||||
return {
|
return {
|
||||||
title: `__ModelName__ ${__ModelName__.id} - ${__ModelName__.name}`,
|
title: `__ModelName__ ${__ModelName__.id} - ${__ModelName__.name}`,
|
||||||
@@ -13,10 +14,11 @@ export async function generateMetadata({ params }: __ModelName__PageProps): Prom
|
|||||||
}
|
}
|
||||||
|
|
||||||
type __ModelName__PageProps = {
|
type __ModelName__PageProps = {
|
||||||
params: { __modelId__: string }
|
params: Promise<{ __modelId__: string }>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Page({ params }: __ModelName__PageProps) {
|
export default async function Page(props: __ModelName__PageProps) {
|
||||||
|
const params = await props.params;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -25,10 +25,10 @@
|
|||||||
"@typescript-eslint/parser": "5.9.1"
|
"@typescript-eslint/parser": "5.9.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.1.2",
|
"@blitzjs/config": "2.2.0",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "npm:types-react@19.0.0",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "npm:types-react-dom@19.0.0",
|
||||||
"react": "18.2.0",
|
"react": "19.0.0",
|
||||||
"typescript": "^4.8.4",
|
"typescript": "^4.8.4",
|
||||||
"unbuild": "0.7.6",
|
"unbuild": "0.7.6",
|
||||||
"watch": "1.0.2"
|
"watch": "1.0.2"
|
||||||
|
|||||||
2331
pnpm-lock.yaml
generated
2331
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2"
|
"blitz": "2.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2"
|
"blitz": "2.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0",
|
"jscodeshift": "0.13.0",
|
||||||
"uuid": "^8.3.1"
|
"uuid": "^8.3.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -23,6 +23,6 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2"
|
"blitz": "2.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,6 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2"
|
"blitz": "2.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2",
|
"blitz": "2.2.0",
|
||||||
"jscodeshift": "0.13.0"
|
"jscodeshift": "0.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -22,6 +22,6 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/blitz-js/blitz#readme",
|
"homepage": "https://github.com/blitz-js/blitz#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"blitz": "2.1.2"
|
"blitz": "2.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user