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

Compare commits

..

22 Commits

Author SHA1 Message Date
github-actions[bot]
ae04524b4c Version Packages (#4397)
* Version Packages

* pnpm lock update

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2024-12-23 12:03:32 +00:00
Siddharth Suresh
38d320fd28 chore: Upgrade to prisma v6 (#4400)
* test: upgrade to latest prisma version

* Create twelve-wolves-fix.md
2024-12-23 17:16:25 +05:30
Blitz.js Bot
8723d0053c (meta) added @fungilation as contributor 2024-12-06 22:37:48 -06:00
Gary Fung
ce23d4ed09 Fix turbopack to work with Next 15 (#4396)
* Update turbopack-empty.js

fix https://github.com/blitz-js/blitz/issues/4395

* Create brown-cobras-dream.md

---------

Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2024-12-07 04:37:43 +00:00
github-actions[bot]
b6c9c4ae6d Version Packages (#4383)
* Version Packages

* pnpm lock update

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2024-10-21 17:29:25 +00:00
Siddharth Suresh
0b3286468b chore: bump deps (#4380)
* chore: bump deps

* fix version

* Create honest-moons-build.md
2024-10-21 22:42:04 +05:30
Kevin Østerkilde
50f17d21ce chore: update prisma-ast version in blitz package (#4382)
* chore: align prisma-ast dependency versions

* chore: add changeset

* chore: add corrected changeset
2024-10-14 16:59:52 +05:30
Siddharth Suresh
57add5f1c5 chore: update pnpm lock file 2024-10-08 19:23:13 +05:30
github-actions[bot]
3f239e78b6 Version Packages (#4379)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-08 19:15:27 +05:30
Blitz.js Bot
3bf90c167c (meta) added @doe-base as contributor 2024-09-30 10:47:47 -05:00
Daniel Idoko
56bd32b553 Fix Incorrect Zod Schema Generation for Datetime Fields (#4377)
* Fix Zod schema generation for datetime fields

* Add changeset for datetime schema fix

* Set changeset to patch release

* chore: update unit test

---------

Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2024-09-30 15:47:42 +00:00
Kevin Østerkilde
2711291e97 fix: remove views from public Session data (again) (#4375)
* fix: remove views from public Session data (again)

* Update .changeset/small-parents-press.md

---------

Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-09-29 21:17:38 +00:00
Blitz.js Bot
ab29c5bf3f (meta) added @cherniavskii as contributor 2024-09-29 16:07:38 -05:00
Siddharth Suresh
a096f2cd80 chore: update pnpm-lock.yaml 2024-08-14 19:33:16 +05:30
github-actions[bot]
ded16b325b Version Packages (#4368)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 19:31:29 +05:30
github-actions[bot]
4494662d6d Version Packages (#4353)
* Version Packages

* make the version 2.1.0

* Update integration-tests/no-suspense/package.json

* pnpm lock fix

* use latest pnpm version

* Revert "use latest pnpm version"

This reverts commit 5fab234a4a.

* Revert "pnpm lock fix"

This reverts commit 690a467cf7.

* Revert "make the version 2.1.0"

This reverts commit 922e95156f.

* make the version 2.1.0

* pnpm lock fix

* fix

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2024-08-14 19:27:52 +05:30
Siddharth Suresh
9a0ba87d15 add error register in rpc handler (#4356)
* add error register in rpc handler

* fix

* Create empty-pugs-prove.md

* fixes

* Update packages/blitz/src/errors.ts
2024-08-05 19:53:03 +05:30
Siddharth Suresh
c80ce51d36 chore: fix CI action versions (#4366) 2024-07-30 18:35:59 +05:30
Blitz.js Bot
b505933a16 (meta) added @bezalel6 as contributor 2024-07-30 08:03:36 -05:00
bezalel6
d53da39cbf modify parseDefaultExportName so it does not grab an HOC, but the fir… (#4359)
* modify parseDefaultExportName so it does not grab an HOC, but the first Argument it takes. presumably the actual component

* created changeset
2024-07-30 18:33:31 +05:30
Siddharth Suresh
e1055f7366 sponsor: add route4me as seedling sponsor (#4361)
* sponser: add route4me as seedling sponser

* readMe changes
2024-07-22 19:18:38 +05:30
Siddharth Suresh
3b10b13e6b feat: Blitz RPC endpoint to the app directory (#4341)
* feat: make `rpchandler` work with `Request` and return a `Response`

* rename: rpcRequestHandler

* feat: improvements

* blitz-auth now works

* return headers

* working

* cleanup

* working sveltekit, with regressin of next.js app dir

* cleanup

* pnpm lock fix

* Update packages/blitz-auth/src/server/auth-plugin.ts

* fix build

* more work

* fixes

* fix issues with auth

* maybe required breaking change

* pointless test

* Update packages/blitz-auth/package.json

* fixes

* fix

* get all tests passing

* more fixes

* changeset

* fixes

* fix

* pnpm lock update

* fix

* update pnpm lcok

* revert unnecessary changes

* imporve api naming

* cleanup

* fix

* Update integration-tests/next-13-app-dir/src/blitz-server.ts

* Apply suggestions from code review

* remove unrelated changes

* Update packages/blitz-auth/src/server/auth-sessions.ts

* fix types

* fix overload

* remove dependence on http module

* review changes

* oops

* fix

* fix types

* Revert "fix types"

This reverts commit b06a4fb3bf.

* Revert "fix"

This reverts commit 47d0cdd568.

* Revert "oops"

This reverts commit 94cb55839d.

* Revert "review changes"

This reverts commit 14d8eb2820.

* fix the logic

* sort deps

* template fixes

* chore: add changeset

* chore: remove outdated changeset

* fix changeset formatting

* Update .changeset/tidy-gorillas-confess.md

* remove `blitzAuthRpcMiddleware`

* remove uses of any

* fix jsdoc

* no var

* separate the type imports

* fix unsupported method of session in rsc

* fix

* api changes

* Apply suggestions from code review

Co-authored-by: Brandon Bayer <b@bayer.ws>

* Apply suggestions from code review

* Update .changeset/tidy-gorillas-confess.md

* fix

* fic

---------

Co-authored-by: Brandon Bayer <b@bayer.ws>
2024-07-01 23:41:12 +05:30
82 changed files with 1409 additions and 2501 deletions

View File

@@ -4074,6 +4074,46 @@
"contributions": [
"code"
]
},
{
"login": "bezalel6",
"name": "bezalel6",
"avatar_url": "https://avatars.githubusercontent.com/u/51681171?v=4",
"profile": "https://github.com/bezalel6",
"contributions": [
"doc",
"code"
]
},
{
"login": "cherniavskii",
"name": "Andrew Cherniavskii",
"avatar_url": "https://avatars.githubusercontent.com/u/13808724?v=4",
"profile": "cherniavskii.com",
"contributions": [
"doc"
]
},
{
"login": "doe-base",
"name": "Daniel Idoko",
"avatar_url": "https://avatars.githubusercontent.com/u/95912955?v=4",
"profile": "https://danielidoko-r3zt.vercel.app/",
"contributions": [
"doc",
"code",
"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,

View File

@@ -1,47 +0,0 @@
---
"blitz": minor
"@blitzjs/auth": minor
"@blitzjs/next": minor
"@blitzjs/rpc": minor
"@blitzjs/generator": minor
---
feat: add blitz auth support for the Web `Request` API standard
Usage using the new `withBlitzAuth` adapter in the App Router:
```ts
import {withBlitzAuth} from "app/blitz-server"
export const {POST} = withBlitzAuth({
POST: async (_request, _params, ctx) => {
const session = ctx.session
await session.$revoke()
return new Response(
JSON.stringify({
userId: session.userId,
}),
{status: 200},
)
},
})
```
feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files
Usage using the new `rpcAppHandler` function
```ts
// app/api/rpc/[[...blitz]]/route.ts
import {rpcAppHandler} from "@blitzjs/rpc"
import {withBlitzAuth} from "app/blitz-server"
// Usage with blitz auth
export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler())
// Standalone usage
export const {GET, POST, HEAD} = rpcAppHandler()
```
chore: Update the app directory starter

View File

@@ -17,9 +17,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4.0.0
with:
version: 8.6.5
version: 8.6.6
- name: Setup node
uses: actions/setup-node@v2
with:
@@ -38,9 +38,9 @@ jobs:
name: Build
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.4
- uses: pnpm/action-setup@v4.0.0
with:
version: 8.6.5
version: 8.6.6
- name: Setup node
uses: actions/setup-node@v2
with:
@@ -68,9 +68,9 @@ jobs:
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4.0.0
with:
version: 8.6.5
version: 8.6.6
- name: Setup node@16
uses: actions/setup-node@v2
@@ -129,9 +129,9 @@ jobs:
- name: Setup PNPM
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
uses: pnpm/action-setup@v2.2.4
uses: pnpm/action-setup@v4.0.0
with:
version: 8.6.5
version: 8.6.6
- name: Setup node@18
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'

View File

@@ -6,7 +6,7 @@
<img alt="" src="https://img.shields.io/badge/Join%20our%20community-6700EB.svg?style=for-the-badge&labelColor=000000&logoWidth=20&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQ9SURBVHgB7d3dVdtAEIbhcSpICUoH0IEogQqSVBBSAU4FSSpIOoAORAfQgSghHXzZ1U/YcMD4R9rZmf2ec3y448LyiNf27iLiGIAmPLrweC9Un3DhrzG6EarLNP09nlwJ1SOZ/lQr5N80/S/p2QMVCBf5N17XCfm1Y/rBHqjAG9PPHvBsz+mf9WAP+HLA9M/YA14cOP2payH7jpj+VCtk1wnTP+vj7xCy6cTpn7EHLMLp059iD1iD8eveJbVCNsSLheX1YA/YgOWnf8YeKB3Wmf7Ud6Fy4f/FHmtpxbl3YlC4MJ/Cj0bWdwPnPbARg+L0S54XQHS32WwuxClzd4CM0z9rPfeAuTtA5ulPXYQ7wZ04Y+oOoDD9KZc9YOoOoDj9s4dwFzgXR6w1wIPoOvPWA9buAHEJ173o3gWiy3AnuBUHLEbgmYwvAk1/wuM8vAgexThzbwPDkx7/DHwVXfFOxP2GmsKd4Ab6zPeAyU8CI7AHFmH2BRCBPXAyk18GzUrqAXCTiR4ssyj0VFw/oCU8+e+RZ33AWz6KMaYbIIWxB+JSLs1bsbkeMN0AqakHvoku9oA2sAfqBvbAQdw0QArsgb25aYBUQT3QgT2gB+yBuqGcHij2UCqXDZACe2Anlw2QYg/QAOyBuoE98CL3DZDCuK4/rh/Q7oGL6U+TOvcNkJoijN8X1C48+T+g75eQDrAH/qmqAVJgDwyqaoAUe4AGYA/UDZX3QLUNkEIZPRCd5+6BahsgVUgPROwBTSijB7jpVAvGHriHvmw9wAZ4BpX1ABvgmakHtPcbRuwBTWAPULgAV9D/jKDY9YRvwvgEaurD44uQHvAol7qBW7WKluVtIHiUS7GyvA0s6CiXDnxrpQfsgbqBS7GKk/2jYHCrVlGyfxTMrVo0ALdq1Q3sgSKofh0M9oA61a+D2QM0AHugbmAPqClmSRjK2apVVQ8UsySsoK1aHdgDesCtWnUDeyCrIpeFg1u3sylyWTi3btMA7IG6gT2wuuK3hoE9sKrit4YVslWLPaAN7IG6ocKt2zmY2h4O9sDiTG0PZw/QANy6XTewBxZj9ogYVHy025LMHhEz9cBn0We6B0yfERReBLfhx0/R1YQHPx/QBPbA0VwcEwf2wNFcHBPHHjiem3MC2QPHcXdSaJjA+KfgTPQ8hhfjBzHC40mhlzJ+Xq9lK4a4PCs43AVaGTed5mZq+iOXZwWHi3AnOj2wFWNcnxYe7gTxLtBKHuamP/J+Wnh8a5irB7ZC5Yk9gPX1QuXC+usHWqGyhYvUYR0a7zboUOFCNVhnk0krZAOW7wFOvzXhom2xnEbIHizTA1wEYhWW6YFGyC6c1gOcfg9wfA80Qj7g8B7g9HuCww+haIR8wf49wOn3Cvv9k8tGyC/s7gFOv3fY3QONkH+v9MBWqB7PeqDn9FcIT//kcitUn6kHOu/T/xfWzlQy3dEHhwAAAABJRU5ErkJggg==">
</a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-429-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 -->
<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">
@@ -79,6 +79,9 @@ Your financial contributions help ensure Blitz continues to be developed and mai
</a></td>
<td><a aria-label="Simon Lammes" href="https://github.com/simon-lammes">
<img alt="" src="https://avatars.githubusercontent.com/u/46446421?v=4" width="40px"/>
</a></td>
<td><a aria-label="Route Optimizer and Route Planning Software" href="https://route4me.com">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/route4me.png" width="40px"/>
</a></td>
</tr>
</table>
@@ -755,6 +758,10 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
<tr>
<td align="center"><a href="https://timn.tech"><img src="https://avatars.githubusercontent.com/u/6324199?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tim Neutkens</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=timneutkens" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=timneutkens" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=timneutkens" title="Tests">⚠️</a></td>
<td align="center"><a href="https://redyetidev.github.io"><img src="https://avatars.githubusercontent.com/u/38299977?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aviv Keller</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=RedYetiDev" 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="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>
</table>

View File

@@ -1,5 +1,61 @@
# next-blitz-auth
## 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
### Patch Changes
- blitz@2.1.2
- @blitzjs/auth@2.1.2
- @blitzjs/next@2.1.2
- @blitzjs/rpc@2.1.2
- @blitzjs/config@2.1.2
## 0.1.13
### Patch Changes
- Updated dependencies [9a0ba87d1]
- @blitzjs/rpc@2.1.1
- blitz@2.1.1
- @blitzjs/next@2.1.1
- @blitzjs/auth@2.1.1
- @blitzjs/config@2.1.1
## 0.1.12
### Patch Changes
- Updated dependencies [d53da39cb]
- Updated dependencies [3b10b13e6]
- blitz@2.1.0
- @blitzjs/auth@2.1.0
- @blitzjs/next@2.1.0
- @blitzjs/rpc@2.1.0
- @blitzjs/config@2.1.0
## 0.1.11
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "next-blitz-auth",
"version": "0.1.11",
"version": "0.1.16",
"private": true,
"scripts": {
"blitz:dev": "next dev",
@@ -12,23 +12,23 @@
"schema": "prisma/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@blitzjs/auth": "2.1.4",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "^4.5.0",
"@tanstack/react-query": "4.0.10",
"blitz": "2.0.10",
"blitz": "2.1.4",
"flatted": "3.2.7",
"next": "14.3.0-canary.28",
"next": "14.2.15",
"prisma": "^4.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.39.1",
"superjson": "1.11.0",
"zod": "3.20.2"
"zod": "3.23.8"
},
"devDependencies": {
"@types/node": "18.11.7",

View File

@@ -23,22 +23,22 @@
]
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@blitzjs/auth": "2.1.4",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"@prisma/client": "6.1.0",
"blitz": "2.1.4",
"next": "14.2.15",
"openid-client": "5.2.1",
"prisma": "4.6.1",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.39.1",
"ts-node": "10.9.1",
"zod": "3.20.2"
"zod": "3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -24,22 +24,22 @@
]
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@blitzjs/auth": "2.1.4",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"@prisma/client": "6.1.0",
"blitz": "2.1.4",
"next": "14.2.15",
"next-auth": "4.24.7",
"prisma": "4.6.1",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.39.1",
"ts-node": "10.9.1",
"zod": "3.20.2"
"zod": "3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -16,20 +16,20 @@
"schema": "./db/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@prisma/client": "4.6.1",
"@blitzjs/auth": "2.1.4",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@prisma/client": "6.1.0",
"@types/jest": "29.2.2",
"@types/passport-twitter": "1.0.37",
"blitz": "2.0.10",
"blitz": "2.1.4",
"jest": "29.3.0",
"jest-environment-jsdom": "29.3.0",
"next": "14.3.0-canary.28",
"next": "14.2.15",
"passport-mock-strategy": "2.0.0",
"passport-twitter": "1.0.4",
"prisma": "4.6.1",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"ts-node": "10.9.1"

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

BIN
assets/route4me.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -17,22 +17,22 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@blitzjs/auth": "2.1.4",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "2.0.10",
"@prisma/client": "6.1.0",
"blitz": "2.1.4",
"delay": "5.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.39.1",
"ts-node": "10.9.1",
"zod": "3.20.2"
"zod": "3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -17,14 +17,14 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@prisma/client": "4.6.1",
"blitz": "2.0.10",
"@blitzjs/auth": "2.1.4",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@prisma/client": "6.1.0",
"blitz": "2.1.4",
"lowdb": "3.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"secure-password": "4.0.0",

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -16,19 +16,19 @@
"schema": "db/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@prisma/client": "4.6.1",
"blitz": "2.0.10",
"lowdb": "3.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"@blitzjs/auth": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@prisma/client": "6.1.0",
"blitz": "2.1.4",
"lowdb": "2.1.0",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -11,11 +11,11 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"blitz": "2.1.4",
"next": "14.2.15",
"react": "18.2.0",
"react-dom": "18.2.0"
},

View File

@@ -17,15 +17,15 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@prisma/client": "4.6.1",
"blitz": "2.0.10",
"lowdb": "3.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"@blitzjs/auth": "2.1.4",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@prisma/client": "6.1.0",
"blitz": "2.1.4",
"lowdb": "2.1.0",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"secure-password": "4.0.0",

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -16,19 +16,19 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@prisma/client": "4.6.1",
"blitz": "2.0.10",
"@blitzjs/auth": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@prisma/client": "6.1.0",
"blitz": "2.1.4",
"lowdb": "3.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -8,15 +8,15 @@
"clean": "rm -rf .turbo && rm -rf node_modules"
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@prisma/client": "4.6.1",
"@blitzjs/auth": "2.1.4",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@prisma/client": "6.1.0",
"@tanstack/react-query": "4.0.10",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"blitz": "2.1.4",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},

View File

@@ -16,18 +16,18 @@
"schema": "db/schema.prisma"
},
"dependencies": {
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@prisma/client": "4.6.1",
"blitz": "2.0.10",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@prisma/client": "6.1.0",
"blitz": "2.1.4",
"lowdb": "3.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -7,11 +7,11 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"blitz": "2.1.4",
"next": "14.2.15",
"react": "18.2.0",
"react-dom": "18.2.0"
},

View File

@@ -7,11 +7,11 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"@blitzjs/config": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"blitz": "2.1.4",
"next": "14.2.15",
"react": "18.2.0",
"react-dom": "18.2.0"
},

View File

@@ -16,19 +16,19 @@
"schema": "db/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@prisma/client": "4.6.1",
"blitz": "2.0.10",
"@blitzjs/auth": "2.1.4",
"@blitzjs/next": "2.1.4",
"@blitzjs/rpc": "2.1.4",
"@prisma/client": "6.1.0",
"blitz": "2.1.4",
"lowdb": "3.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -3,9 +3,9 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@blitzjs/config": "workspace:2.0.10",
"@blitzjs/next": "workspace:2.0.10",
"@blitzjs/rpc": "workspace:2.0.10",
"@blitzjs/config": "workspace:2.1.4",
"@blitzjs/next": "workspace:2.1.4",
"@blitzjs/rpc": "workspace:2.1.4",
"@tanstack/react-query": "4.13.0",
"@testing-library/react": "13.4.0",
"@types/express": "4.17.13",

View File

@@ -29,7 +29,7 @@
"husky": "8.0.2",
"jsdom": "^19.0.0",
"lint-staged": "13.0.3",
"next": "14.3.0-canary.28",
"next": "14.2.15",
"only-allow": "1.1.0",
"prettier": "^2.8.8",
"prettier-plugin-prisma": "4.4.0",
@@ -51,7 +51,7 @@
},
"overrides": {
"@types/mime": "3.0.4",
"next": "14.3.0-canary.28"
"next": "14.2.15"
}
}
}

View File

@@ -1,5 +1,83 @@
# @blitzjs/auth
## 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
### Patch Changes
- blitz@2.1.2
## 2.1.1
### Patch Changes
- Updated dependencies [9a0ba87d1]
- blitz@2.1.1
## 2.1.0
### Minor Changes
- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard
Usage using the new `withBlitzAuth` adapter in the App Router:
```ts
import {withBlitzAuth} from "app/blitz-server"
export const {POST} = withBlitzAuth({
POST: async (_request, _params, ctx) => {
const session = ctx.session
await session.$revoke()
return new Response(
JSON.stringify({
userId: session.userId,
}),
{status: 200},
)
},
})
```
feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files
Usage using the new `rpcAppHandler` function
```ts
// app/api/rpc/[[...blitz]]/route.ts
import {rpcAppHandler} from "@blitzjs/rpc"
import {withBlitzAuth} from "app/blitz-server"
// Usage with blitz auth
export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler())
// Standalone usage
export const {GET, POST, HEAD} = rpcAppHandler()
```
chore: Update the app directory starter
### Patch Changes
- Updated dependencies [d53da39cb]
- Updated dependencies [3b10b13e6]
- blitz@2.1.0
## 2.0.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/auth",
"version": "2.0.10",
"version": "2.1.4",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -50,7 +50,7 @@
"url": "0.11.0"
},
"peerDependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"next": "*",
"next-auth": "*",
"secure-password": "4.0.0"
@@ -67,7 +67,7 @@
}
},
"devDependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@types/cookie": "0.4.1",
@@ -75,8 +75,8 @@
"@types/jsonwebtoken": "8.5.8",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"blitz": "2.1.4",
"next": "14.2.15",
"next-auth": "4.24.7",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -1,5 +1,89 @@
# @blitzjs/next
## 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
### Patch Changes
- blitz@2.1.2
- @blitzjs/rpc@2.1.2
## 2.1.1
### Patch Changes
- Updated dependencies [9a0ba87d1]
- @blitzjs/rpc@2.1.1
- blitz@2.1.1
## 2.1.0
### Minor Changes
- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard
Usage using the new `withBlitzAuth` adapter in the App Router:
```ts
import {withBlitzAuth} from "app/blitz-server"
export const {POST} = withBlitzAuth({
POST: async (_request, _params, ctx) => {
const session = ctx.session
await session.$revoke()
return new Response(
JSON.stringify({
userId: session.userId,
}),
{status: 200},
)
},
})
```
feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files
Usage using the new `rpcAppHandler` function
```ts
// app/api/rpc/[[...blitz]]/route.ts
import {rpcAppHandler} from "@blitzjs/rpc"
import {withBlitzAuth} from "app/blitz-server"
// Usage with blitz auth
export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler())
// Standalone usage
export const {GET, POST, HEAD} = rpcAppHandler()
```
chore: Update the app directory starter
### Patch Changes
- Updated dependencies [d53da39cb]
- Updated dependencies [3b10b13e6]
- blitz@2.1.0
- @blitzjs/rpc@2.1.0
## 2.0.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/next",
"version": "2.0.10",
"version": "2.1.4",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -29,7 +29,7 @@
"eslint.js"
],
"dependencies": {
"@blitzjs/rpc": "2.0.10",
"@blitzjs/rpc": "2.1.4",
"@types/hoist-non-react-statics": "3.3.1",
"copy-webpack-plugin": "11.0.0",
"debug": "4.3.3",
@@ -39,13 +39,13 @@
"supports-color": "8.1.1"
},
"peerDependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"next": "*",
"react": "*",
"tslog": "4.9.0"
},
"devDependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.3",
"@testing-library/react": "13.4.0",
@@ -56,10 +56,10 @@
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"@types/testing-library__react-hooks": "4.0.0",
"blitz": "2.0.10",
"blitz": "2.1.4",
"cross-spawn": "7.0.3",
"find-up": "4.1.0",
"next": "14.3.0-canary.28",
"next": "14.2.15",
"next-router-mock": "0.9.1",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -1 +1 @@
export {}
module.exports = {}

View File

@@ -1,5 +1,84 @@
# @blitzjs/rpc
## 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
### Patch Changes
- blitz@2.1.2
## 2.1.1
### Patch Changes
- 9a0ba87d1: fix: make sure blitz superjson custom error registers in rpc handler
- Updated dependencies [9a0ba87d1]
- blitz@2.1.1
## 2.1.0
### Minor Changes
- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard
Usage using the new `withBlitzAuth` adapter in the App Router:
```ts
import {withBlitzAuth} from "app/blitz-server"
export const {POST} = withBlitzAuth({
POST: async (_request, _params, ctx) => {
const session = ctx.session
await session.$revoke()
return new Response(
JSON.stringify({
userId: session.userId,
}),
{status: 200},
)
},
})
```
feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files
Usage using the new `rpcAppHandler` function
```ts
// app/api/rpc/[[...blitz]]/route.ts
import {rpcAppHandler} from "@blitzjs/rpc"
import {withBlitzAuth} from "app/blitz-server"
// Usage with blitz auth
export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler())
// Standalone usage
export const {GET, POST, HEAD} = rpcAppHandler()
```
chore: Update the app directory starter
### Patch Changes
- Updated dependencies [d53da39cb]
- Updated dependencies [3b10b13e6]
- blitz@2.1.0
## 2.0.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/rpc",
"version": "2.0.10",
"version": "2.1.4",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -37,25 +37,25 @@
},
"peerDependencies": {
"@tanstack/query-core": "4.24.4",
"blitz": "2.0.10",
"blitz": "2.1.4",
"next": "*",
"react": "*"
},
"devDependencies": {
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/auth": "2.1.4",
"@blitzjs/config": "2.1.4",
"@tanstack/query-core": "4.24.4",
"@types/debug": "4.1.7",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"blitz": "2.1.4",
"next": "14.2.15",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "^4.8.4",
"unbuild": "0.7.6",
"watch": "1.0.2",
"zod": "3.20.2"
"zod": "3.23.8"
},
"publishConfig": {
"access": "public"

View File

@@ -1,4 +1,4 @@
import {assert, Ctx, ResolverConfig} from "blitz"
import {assert, Ctx, ResolverConfig, registerBlitzErrorClasses} from "blitz"
import {NextApiRequest, NextApiResponse} from "next"
import {resolve} from "path"
import {deserialize, parse, serialize as superjsonSerialize} from "superjson"
@@ -239,6 +239,7 @@ interface RpcConfig {
}
export function rpcHandler(config?: RpcConfig) {
registerBlitzErrorClasses()
return async function handleRpcRequest(req: NextApiRequest, res: NextApiResponse, ctx: Ctx) {
const resolverMap = await getResolverMap()
assert(resolverMap, "No query or mutation resolvers found")
@@ -362,6 +363,7 @@ export function rpcHandler(config?: RpcConfig) {
type Params = Record<string, unknown>
export function rpcAppHandler(config?: RpcConfig) {
registerBlitzErrorClasses()
async function handleRpcRequest(req: Request, context: {params: Params}, ctx?: Ctx) {
const session = ctx?.session
const resolverMap = await getResolverMap()

View File

@@ -1,5 +1,86 @@
# blitz
## 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
### Patch Changes
- Updated dependencies [2711291e9]
- Updated dependencies [56bd32b55]
- @blitzjs/generator@2.1.2
## 2.1.1
### Patch Changes
- 9a0ba87d1: fix: make sure blitz superjson custom error registers in rpc handler
- @blitzjs/generator@2.1.1
## 2.1.0
### Minor Changes
- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard
Usage using the new `withBlitzAuth` adapter in the App Router:
```ts
import {withBlitzAuth} from "app/blitz-server"
export const {POST} = withBlitzAuth({
POST: async (_request, _params, ctx) => {
const session = ctx.session
await session.$revoke()
return new Response(
JSON.stringify({
userId: session.userId,
}),
{status: 200},
)
},
})
```
feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files
Usage using the new `rpcAppHandler` function
```ts
// app/api/rpc/[[...blitz]]/route.ts
import {rpcAppHandler} from "@blitzjs/rpc"
import {withBlitzAuth} from "app/blitz-server"
// Usage with blitz auth
export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler())
// Standalone usage
export const {GET, POST, HEAD} = rpcAppHandler()
```
chore: Update the app directory starter
### Patch Changes
- d53da39cb: Improved parsing of default export names to handle higher-order components (HOCs) in the `parseDefaultExportName` function.
- Updated dependencies [3b10b13e6]
- @blitzjs/generator@2.1.0
## 2.0.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "blitz",
"version": "2.0.10",
"version": "2.1.4",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -30,8 +30,8 @@
"blitz": "bin/blitz"
},
"dependencies": {
"@blitzjs/generator": "2.0.10",
"@mrleebo/prisma-ast": "0.2.6",
"@blitzjs/generator": "2.1.4",
"@mrleebo/prisma-ast": "0.4.1",
"@types/global-agent": "2.1.1",
"arg": "5.0.1",
"ast-types": "0.14.2",
@@ -80,7 +80,7 @@
"watchpack": "2.1.1"
},
"devDependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@types/cookie": "0.4.1",
"@types/cross-spawn": "6.0.2",
"@types/debug": "4.1.7",
@@ -105,7 +105,7 @@
"typescript": "^4.8.4",
"unbuild": "0.7.6",
"watch": "1.0.2",
"zod": "3.20.2"
"zod": "3.23.8"
},
"publishConfig": {
"access": "public"

View File

@@ -504,12 +504,13 @@ const pascalCase = (value: string): string => {
return val.substr(0, 1).toUpperCase() + val.substr(1)
}
export function parseDefaultExportName(contents: string): string | null {
const result = contents.match(/export\s+default(?:\s+(?:const|let|class|var|function))?\s+(\w+)/)
const result = contents.match(/export\s+default(?:\s+(const|let|class|var|function))?\s+(\w+)(?:\(([a-zA-Z_$][a-zA-Z0-9_$]*\b).*\))?/)
if (!result) {
return null
}
return result[1] ?? null
const [,declaration,compOrHOCName,comp] = result
if(declaration||!comp) return compOrHOCName ?? null;
return comp ?? null
}
export async function generateManifest() {
const config = await loadConfig(process.cwd())

View File

@@ -89,7 +89,10 @@ export class PaginationArgumentError extends Error {
}
}
if (isNotInUserTestEnvironment() && !globalThis._BLITZ_ERROR_CLASS_REGISTERED) {
let _blitzErrorClassRegistered = false
export function registerBlitzErrorClasses() {
if (_blitzErrorClassRegistered || !isNotInUserTestEnvironment()) return
SuperJson.registerClass(AuthenticationError, {
identifier: "BlitzAuthenticationError",
allowProps: errorProps,
@@ -125,5 +128,7 @@ if (isNotInUserTestEnvironment() && !globalThis._BLITZ_ERROR_CLASS_REGISTERED) {
allowProps: errorProps,
})
globalThis._BLITZ_ERROR_CLASS_REGISTERED = true
_blitzErrorClassRegistered = true
}
registerBlitzErrorClasses()

View File

@@ -8,6 +8,7 @@ import {
PaginationArgumentError,
RedirectError,
OAuthError,
registerBlitzErrorClasses,
} from "./errors"
import type {EventHooks, MiddlewareHooks} from "./types"
export {
@@ -18,6 +19,7 @@ export {
PaginationArgumentError,
RedirectError,
OAuthError,
registerBlitzErrorClasses,
}
export * from "./utils/enhance-prisma"

View File

@@ -1,5 +1,48 @@
# @blitzjs/codemod
## 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
### Patch Changes
- Updated dependencies [2711291e9]
- Updated dependencies [56bd32b55]
- @blitzjs/generator@2.1.2
- blitz@2.1.2
## 2.1.1
### Patch Changes
- Updated dependencies [9a0ba87d1]
- blitz@2.1.1
- @blitzjs/generator@2.1.1
## 2.1.0
### Patch Changes
- Updated dependencies [d53da39cb]
- Updated dependencies [3b10b13e6]
- blitz@2.1.0
- @blitzjs/generator@2.1.0
## 2.0.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/codemod",
"version": "2.0.10",
"version": "2.1.4",
"scripts": {
"build": "unbuild",
"dev": "watch unbuild src --wait=0.2",
@@ -25,9 +25,9 @@
"@babel/plugin-proposal-class-properties": "7.17.12",
"@babel/plugin-syntax-jsx": "7.17.12",
"@babel/plugin-syntax-typescript": "7.17.12",
"@blitzjs/generator": "2.0.10",
"@blitzjs/generator": "2.1.4",
"arg": "5.0.1",
"blitz": "2.0.10",
"blitz": "2.1.4",
"chalk": "^4.1.0",
"cross-spawn": "7.0.3",
"debug": "4.3.3",
@@ -38,7 +38,7 @@
},
"devDependencies": {
"@babel/preset-env": "7.12.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@types/jscodeshift": "0.11.2",
"@types/node": "18.11.9",
"ast-types": "0.14.2",

View File

@@ -10,7 +10,7 @@ describe("replaceBlitzPkgsVersions", () => {
return {
fetchDistTags: vi.fn((pkg: string) => {
if (pkg === "blitz") {
return {alpha: "1.0.0", beta: "2.0.0", danger: "3.0.0"}
return {alpha: "1.0.0", beta: "2.0.0", danger: "2.1.0"}
}
if (pkg === "zod") {
return {latest: "1.2.3"}
@@ -52,10 +52,10 @@ describe("replaceBlitzPkgsVersions", () => {
it("correctly updates versions with the danger tag", async () => {
expect(await replaceBlitzPkgsVersions(pkgJson, "danger")).toEqual({
dependencies: {
blitz: "3.0.0",
"@blitzjs/rpc": "3.0.0",
"@blitzjs/auth": "3.0.0",
"@blitzjs/next": "3.0.0",
blitz: "2.1.0",
"@blitzjs/rpc": "2.1.0",
"@blitzjs/auth": "2.1.0",
"@blitzjs/next": "2.1.0",
next: "12.2.0",
zod: "1.2.3",
},

View File

@@ -1,5 +1,15 @@
# @blitzjs/config
## 2.1.4
## 2.1.3
## 2.1.2
## 2.1.1
## 2.1.0
## 2.0.10
## 2.0.9

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/config",
"private": true,
"version": "2.0.10",
"version": "2.1.4",
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "5.42.1",

View File

@@ -1,5 +1,70 @@
# @blitzjs/generator
## 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
### Patch Changes
- 2711291e9: Remove `views` property from `Session.PublicData` in `types.ts` file again
- 56bd32b55: Fix Zod schema generation for datetime fields by removing extra parentheses.
## 2.1.1
## 2.1.0
### Minor Changes
- 3b10b13e6: feat: add blitz auth support for the Web `Request` API standard
Usage using the new `withBlitzAuth` adapter in the App Router:
```ts
import {withBlitzAuth} from "app/blitz-server"
export const {POST} = withBlitzAuth({
POST: async (_request, _params, ctx) => {
const session = ctx.session
await session.$revoke()
return new Response(
JSON.stringify({
userId: session.userId,
}),
{status: 200},
)
},
})
```
feat: New Blitz RPC handler meant to with the next.js app router `route.ts` files
Usage using the new `rpcAppHandler` function
```ts
// app/api/rpc/[[...blitz]]/route.ts
import {rpcAppHandler} from "@blitzjs/rpc"
import {withBlitzAuth} from "app/blitz-server"
// Usage with blitz auth
export const {GET, POST, HEAD} = withBlitzAuth(rpcAppHandler())
// Standalone usage
export const {GET, POST, HEAD} = rpcAppHandler()
```
chore: Update the app directory starter
## 2.0.10
## 2.0.9

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/generator",
"version": "2.0.10",
"version": "2.1.4",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -51,10 +51,10 @@
"tslog": "4.9.0",
"username": "5.1.0",
"vinyl": "2.2.1",
"zod": "3.20.2"
"zod": "3.23.8"
},
"devDependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@juanm04/cpx": "2.0.1",
"@types/babel__core": "7.1.19",
"@types/diff": "5.0.2",

View File

@@ -96,7 +96,7 @@ export const defaultCodegenConfig: CodegenConfig = {
datetime: {
component: "LabeledTextField",
inputType: "text",
zodType: "string().datetime()",
zodType: "string().datetime",
prismaType: "DateTime",
},
uuid: {

View File

@@ -31,12 +31,12 @@
"@prisma/client": "5.4.2",
"blitz": "latest",
"formik": "2.4.5",
"next": "14.1.4",
"next": "14.2.15",
"prisma": "5.4.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"secure-password": "4.0.0",
"zod": "3.22.4"
"zod": "3.23.8"
},
"devDependencies": {
"@next/env": "13.4.19",

View File

@@ -9,7 +9,6 @@ declare module "@blitzjs/auth" {
PublicData: {
userId: User["id"]
role: Role
views?: number
}
}
}

View File

@@ -25,14 +25,14 @@
"@blitzjs/auth": "latest",
"@blitzjs/next": "latest",
"@blitzjs/rpc": "latest",
"@prisma/client": "4.6.1",
"@prisma/client": "6.1.0",
"blitz": "latest",
"next": "14.1.4",
"prisma": "4.6.1",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"secure-password": "4.0.0",
"zod": "3.20.2"
"zod": "3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",

View File

@@ -25,14 +25,14 @@
"@blitzjs/auth": "latest",
"@blitzjs/next": "latest",
"@blitzjs/rpc": "latest",
"@prisma/client": "4.6.1",
"@prisma/client": "6.1.0",
"blitz": "latest",
"next": "14.1.4",
"prisma": "4.6.1",
"next": "14.2.15",
"prisma": "6.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"secure-password": "4.0.0",
"zod": "3.20.2"
"zod": "3.23.8"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",

View File

@@ -220,7 +220,7 @@ describe("Form Generator", () => {
attributeName: "field8",
fieldName: "field8",
field_name: "field8",
zodType: "string().datetime()",
zodType: "string().datetime",
prismaType: "DateTime",
inputType: "text",
},

View File

@@ -25,7 +25,7 @@
"@typescript-eslint/parser": "5.9.1"
},
"devDependencies": {
"@blitzjs/config": "2.0.10",
"@blitzjs/config": "2.1.4",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"react": "18.2.0",

2888
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -24,6 +24,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10"
"blitz": "2.1.4"
}
}

View File

@@ -24,6 +24,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10"
"blitz": "2.1.4"
}
}

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0",
"uuid": "^8.3.1"
},

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -23,6 +23,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10"
"blitz": "2.1.4"
}
}

View File

@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10"
"blitz": "2.1.4"
}
}

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10"
"blitz": "2.1.4"
}
}

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0",
"uuid": "^8.3.1"
},

View File

@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -25,7 +25,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.10",
"blitz": "2.1.4",
"jscodeshift": "0.13.0"
},
"devDependencies": {