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

Compare commits

..

76 Commits

Author SHA1 Message Date
Siddharth Suresh
4e7f837a96 Merge branch 'main' into siddharth/work-with-request 2024-07-01 20:38:03 +05:30
Siddharth Suresh
14b9e0f599 fic 2024-06-19 00:50:18 +05:30
Siddharth Suresh
7c1159f64f fix 2024-06-19 00:49:56 +05:30
Siddharth Suresh
d8d517f0cc Update .changeset/tidy-gorillas-confess.md 2024-06-19 00:47:27 +05:30
Siddharth Suresh
ca1ed08b81 Apply suggestions from code review 2024-06-19 00:40:30 +05:30
Siddharth Suresh
64242c9748 Apply suggestions from code review
Co-authored-by: Brandon Bayer <b@bayer.ws>
2024-06-19 00:39:25 +05:30
Siddharth Suresh
dca22d155f api changes 2024-06-19 00:38:57 +05:30
Siddharth Suresh
0215480c61 fix 2024-06-18 17:42:51 +05:30
Siddharth Suresh
b1e74f894c fix unsupported method of session in rsc 2024-06-18 17:37:35 +05:30
Siddharth Suresh
fecfb99e0b separate the type imports 2024-06-18 17:28:59 +05:30
Siddharth Suresh
342a3bcd9d no var 2024-06-18 17:27:54 +05:30
Siddharth Suresh
7b37512d87 fix jsdoc 2024-06-18 17:24:20 +05:30
Siddharth Suresh
67629fd4a3 remove uses of any 2024-06-18 17:14:39 +05:30
Siddharth Suresh
4b8b909772 Merge branch 'siddharth/work-with-request' of https://github.com/blitz-js/blitz into siddharth/work-with-request 2024-06-16 22:43:30 +05:30
Siddharth Suresh
6e17a210fc remove blitzAuthRpcMiddleware 2024-06-16 22:43:27 +05:30
Siddharth Suresh
2992347aa6 Update .changeset/tidy-gorillas-confess.md 2024-06-16 22:41:29 +05:30
Siddharth Suresh
f3174ccea9 fix changeset formatting 2024-06-16 22:40:29 +05:30
Siddharth Suresh
e5af191880 chore: remove outdated changeset 2024-06-16 22:36:34 +05:30
Siddharth Suresh
0ebf9987e6 chore: add changeset 2024-06-16 22:35:59 +05:30
Siddharth Suresh
4ec2ba65e7 Merge branch 'main' into siddharth/work-with-request 2024-06-16 18:34:28 +05:30
Siddharth Suresh
1b190ba2f2 template fixes 2024-06-16 17:52:53 +05:30
Siddharth Suresh
094495b287 sort deps 2024-06-16 17:50:46 +05:30
Siddharth Suresh
4959b34492 fix the logic 2024-06-16 17:50:08 +05:30
Siddharth Suresh
ff3475a7c3 Revert "review changes"
This reverts commit 14d8eb2820.
2024-06-16 17:36:01 +05:30
Siddharth Suresh
44b88cd4ea Revert "oops"
This reverts commit 94cb55839d.
2024-06-16 17:35:58 +05:30
Siddharth Suresh
26b90c4416 Revert "fix"
This reverts commit 47d0cdd568.
2024-06-16 17:35:56 +05:30
Siddharth Suresh
1c43b2ed3d Revert "fix types"
This reverts commit b06a4fb3bf.
2024-06-16 17:35:53 +05:30
Siddharth Suresh
b1e51da7a7 Merge branch 'main' into siddharth/work-with-request 2024-06-13 19:01:28 +05:30
Siddharth Suresh
b06a4fb3bf fix types 2024-06-09 14:41:24 +05:30
Siddharth Suresh
47d0cdd568 fix 2024-06-06 01:02:09 +05:30
Siddharth Suresh
94cb55839d oops 2024-06-06 01:01:34 +05:30
Siddharth Suresh
14d8eb2820 review changes 2024-06-06 00:59:15 +05:30
Siddharth Suresh
32cc2049b0 remove dependence on http module 2024-06-03 15:30:15 +05:30
Siddharth Suresh
3a0468837e fix overload 2024-06-03 15:26:44 +05:30
Siddharth Suresh
b1d5021284 fix types 2024-06-03 15:24:08 +05:30
Siddharth Suresh
695d2ac3bc Update packages/blitz-auth/src/server/auth-sessions.ts 2024-06-02 00:07:27 +05:30
Siddharth Suresh
695c957633 remove unrelated changes 2024-06-02 00:02:48 +05:30
Siddharth Suresh
811f657d26 Apply suggestions from code review 2024-06-01 23:48:15 +05:30
Siddharth Suresh
aef8172f5b Update integration-tests/next-13-app-dir/src/blitz-server.ts 2024-06-01 23:41:22 +05:30
Siddharth Suresh
f0c3c7a558 fix 2024-06-01 23:39:16 +05:30
Siddharth Suresh
589da91e11 cleanup 2024-06-01 23:23:21 +05:30
Siddharth Suresh
8b345ccc47 imporve api naming 2024-06-01 23:20:58 +05:30
Siddharth Suresh
720e2deb76 revert unnecessary changes 2024-06-01 23:10:24 +05:30
Siddharth Suresh
3725202251 update pnpm lcok 2024-06-01 23:08:06 +05:30
Siddharth Suresh
74cc8f8cf2 fix 2024-06-01 23:04:28 +05:30
Siddharth Suresh
f84781520c pnpm lock update 2024-06-01 23:04:07 +05:30
Siddharth Suresh
ec8d1f583c fix 2024-06-01 23:01:47 +05:30
Siddharth Suresh
7f5c8bb6ab fixes 2024-06-01 23:01:42 +05:30
Siddharth Suresh
631e012969 changeset 2024-06-01 23:01:23 +05:30
Siddharth Suresh
73e0ae7b32 more fixes 2024-06-01 23:00:00 +05:30
Siddharth Suresh
43abbda23d get all tests passing 2024-06-01 22:59:37 +05:30
Siddharth Suresh
b6641c98ee fix 2024-05-28 19:46:34 +05:30
Siddharth Suresh
db9419cd7f Merge branch 'siddharth/work-with-request' of https://github.com/blitz-js/blitz into siddharth/work-with-request 2024-05-28 17:57:55 +05:30
Siddharth Suresh
166deea204 fixes 2024-05-28 17:57:52 +05:30
Siddharth Suresh
fb403302b1 Update packages/blitz-auth/package.json 2024-05-28 17:45:52 +05:30
Siddharth Suresh
31626bfad6 pointless test 2024-05-28 17:30:42 +05:30
Siddharth Suresh
6e8833c6b2 maybe required breaking change 2024-05-28 17:26:34 +05:30
Siddharth Suresh
e7da8b06e1 fix issues with auth 2024-05-28 17:23:11 +05:30
Siddharth Suresh
22d8eba3e2 Merge branch 'main' into siddharth/work-with-request 2024-05-27 10:29:31 +05:30
Siddharth Suresh
f50739a734 fixes 2024-05-22 12:46:35 +05:30
Siddharth Suresh
313e17894f more work 2024-05-22 12:43:04 +05:30
Siddharth Suresh
199b1af49c fix build 2024-04-06 22:10:40 +05:30
Siddharth Suresh
0e4e80bf40 Update packages/blitz-auth/src/server/auth-plugin.ts 2024-04-06 22:10:12 +05:30
Siddharth Suresh
8f2447f44f Merge branch 'siddharth/work-with-request' of https://github.com/blitz-js/blitz into siddharth/work-with-request 2024-04-06 22:09:52 +05:30
Siddharth Suresh
d8e5acceca pnpm lock fix 2024-04-06 22:09:46 +05:30
Siddharth Suresh
c60c0fe76b cleanup 2024-04-06 22:09:33 +05:30
Siddharth Suresh
e2911b0df5 Merge branch 'main' into siddharth/work-with-request 2024-04-06 19:37:04 +05:30
Siddharth Suresh
9b1f57529f Merge branch 'main' into siddharth/work-with-request 2024-04-04 22:59:59 +05:30
Siddharth Suresh
43cd82f4e8 working sveltekit, with regressin of next.js app dir 2023-09-04 16:21:36 +05:30
Siddharth Suresh
7b332d24ec cleanup 2023-09-04 00:21:36 +05:30
Siddharth Suresh
8f99e59dfb working 2023-09-04 00:20:26 +05:30
Siddharth Suresh
1e4cb3755c return headers 2023-08-29 18:46:07 +05:30
Siddharth Suresh
25037f3dd2 blitz-auth now works 2023-08-29 18:17:56 +05:30
Siddharth Suresh
f8054c5434 feat: improvements 2023-08-27 14:33:04 +05:30
Siddharth Suresh
ef36ad4516 rename: rpcRequestHandler 2023-08-27 12:28:20 +05:30
Siddharth Suresh
15a0b1a93c feat: make rpchandler work with Request and return a Response 2023-08-27 02:14:17 +05:30
77 changed files with 1364 additions and 879 deletions

View File

@@ -4074,36 +4074,6 @@
"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"
]
}
],
"contributorsPerLine": 7,

View File

@@ -0,0 +1,47 @@
---
"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@v4.0.0
- uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.6
version: 8.6.5
- 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@v4.0.0
- uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.6
version: 8.6.5
- 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@v4.0.0
uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.6
version: 8.6.5
- 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@v4.0.0
uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.6
version: 8.6.5
- 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-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-429-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,9 +79,6 @@ 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>
@@ -758,9 +755,6 @@ 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>
</tr>
</table>

View File

@@ -1,38 +1,5 @@
# next-blitz-auth
## 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.14",
"version": "0.1.11",
"private": true,
"scripts": {
"blitz:dev": "next dev",
@@ -12,15 +12,15 @@
"schema": "prisma/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "2.1.2",
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "^4.5.0",
"@tanstack/react-query": "4.0.10",
"blitz": "2.1.2",
"blitz": "2.0.10",
"flatted": "3.2.7",
"next": "14.3.0-canary.28",
"prisma": "^4.5.0",

View File

@@ -23,14 +23,14 @@
]
},
"dependencies": {
"@blitzjs/auth": "2.1.2",
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "2.1.2",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"openid-client": "5.2.1",
"prisma": "4.6.1",

View File

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

View File

@@ -24,14 +24,14 @@
]
},
"dependencies": {
"@blitzjs/auth": "2.1.2",
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "2.1.2",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"next-auth": "4.24.7",
"prisma": "4.6.1",

View File

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

View File

@@ -16,14 +16,14 @@
"schema": "./db/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "2.1.2",
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"@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",
"@types/jest": "29.2.2",
"@types/passport-twitter": "1.0.37",
"blitz": "2.1.2",
"blitz": "2.0.10",
"jest": "29.3.0",
"jest-environment-jsdom": "29.3.0",
"next": "14.3.0-canary.28",

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -17,14 +17,14 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "2.1.2",
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "2.1.2",
"blitz": "2.0.10",
"delay": "5.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",

View File

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

View File

@@ -17,11 +17,11 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "2.1.2",
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@blitzjs/next": "2.0.10",
"@prisma/client": "4.6.1",
"blitz": "2.1.2",
"blitz": "2.0.10",
"lowdb": "3.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",

View File

@@ -9,6 +9,7 @@ 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.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"@blitzjs/auth": "2.0.10",
"@blitzjs/next": "2.0.10",
"@blitzjs/rpc": "2.0.10",
"@prisma/client": "4.6.1",
"blitz": "2.1.2",
"lowdb": "2.1.0",
"blitz": "2.0.10",
"lowdb": "3.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "2.1.2",
"@blitzjs/config": "2.0.10",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

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

View File

@@ -11,10 +11,10 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"blitz": "2.1.2",
"@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",
"react": "18.2.0",
"react-dom": "18.2.0"

View File

@@ -17,13 +17,13 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "2.1.2",
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"@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.1.2",
"lowdb": "2.1.0",
"blitz": "2.0.10",
"lowdb": "3.0.0",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"react": "18.2.0",

View File

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

View File

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

View File

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

View File

@@ -8,13 +8,13 @@
"clean": "rm -rf .turbo && rm -rf node_modules"
},
"dependencies": {
"@blitzjs/auth": "2.1.2",
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"@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",
"@tanstack/react-query": "4.0.10",
"blitz": "2.1.2",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"prisma": "4.6.1",
"react": "18.2.0",

View File

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

View File

@@ -7,10 +7,10 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"blitz": "2.1.2",
"@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",
"react": "18.2.0",
"react-dom": "18.2.0"

View File

@@ -7,10 +7,10 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "2.1.2",
"@blitzjs/next": "2.1.2",
"@blitzjs/rpc": "2.1.2",
"blitz": "2.1.2",
"@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",
"react": "18.2.0",
"react-dom": "18.2.0"

View File

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

View File

@@ -9,6 +9,7 @@ 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.1.2",
"@blitzjs/next": "workspace:2.1.2",
"@blitzjs/rpc": "workspace:2.1.2",
"@blitzjs/config": "workspace:2.0.10",
"@blitzjs/next": "workspace:2.0.10",
"@blitzjs/rpc": "workspace:2.0.10",
"@tanstack/react-query": "4.13.0",
"@testing-library/react": "13.4.0",
"@types/express": "4.17.13",

View File

@@ -1,68 +1,5 @@
# @blitzjs/auth
## 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.1.2",
"version": "2.0.10",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -50,7 +50,7 @@
"url": "0.11.0"
},
"peerDependencies": {
"blitz": "2.1.2",
"blitz": "2.0.10",
"next": "*",
"next-auth": "*",
"secure-password": "4.0.0"
@@ -67,7 +67,7 @@
}
},
"devDependencies": {
"@blitzjs/config": "2.1.2",
"@blitzjs/config": "2.0.10",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@types/cookie": "0.4.1",
@@ -75,7 +75,7 @@
"@types/jsonwebtoken": "8.5.8",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"blitz": "2.1.2",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"next-auth": "4.24.7",
"react": "18.2.0",

View File

@@ -1,71 +1,5 @@
# @blitzjs/next
## 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.1.2",
"version": "2.0.10",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -29,7 +29,7 @@
"eslint.js"
],
"dependencies": {
"@blitzjs/rpc": "2.1.2",
"@blitzjs/rpc": "2.0.10",
"@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.1.2",
"blitz": "2.0.10",
"next": "*",
"react": "*",
"tslog": "4.9.0"
},
"devDependencies": {
"@blitzjs/config": "2.1.2",
"@blitzjs/config": "2.0.10",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.3",
"@testing-library/react": "13.4.0",
@@ -56,7 +56,7 @@
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"@types/testing-library__react-hooks": "4.0.0",
"blitz": "2.1.2",
"blitz": "2.0.10",
"cross-spawn": "7.0.3",
"find-up": "4.1.0",
"next": "14.3.0-canary.28",

View File

@@ -1,69 +1,5 @@
# @blitzjs/rpc
## 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.1.2",
"version": "2.0.10",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -37,18 +37,18 @@
},
"peerDependencies": {
"@tanstack/query-core": "4.24.4",
"blitz": "2.1.2",
"blitz": "2.0.10",
"next": "*",
"react": "*"
},
"devDependencies": {
"@blitzjs/auth": "2.1.2",
"@blitzjs/config": "2.1.2",
"@blitzjs/auth": "2.0.10",
"@blitzjs/config": "2.0.10",
"@tanstack/query-core": "4.24.4",
"@types/debug": "4.1.7",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"blitz": "2.1.2",
"blitz": "2.0.10",
"next": "14.3.0-canary.28",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -1,4 +1,4 @@
import {assert, Ctx, ResolverConfig, registerBlitzErrorClasses} from "blitz"
import {assert, Ctx, ResolverConfig} from "blitz"
import {NextApiRequest, NextApiResponse} from "next"
import {resolve} from "path"
import {deserialize, parse, serialize as superjsonSerialize} from "superjson"
@@ -239,7 +239,6 @@ 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")
@@ -363,7 +362,6 @@ 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,70 +1,5 @@
# blitz
## 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.1.2",
"version": "2.0.10",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -30,7 +30,7 @@
"blitz": "bin/blitz"
},
"dependencies": {
"@blitzjs/generator": "2.1.2",
"@blitzjs/generator": "2.0.10",
"@mrleebo/prisma-ast": "0.2.6",
"@types/global-agent": "2.1.1",
"arg": "5.0.1",
@@ -80,7 +80,7 @@
"watchpack": "2.1.1"
},
"devDependencies": {
"@blitzjs/config": "2.1.2",
"@blitzjs/config": "2.0.10",
"@types/cookie": "0.4.1",
"@types/cross-spawn": "6.0.2",
"@types/debug": "4.1.7",

View File

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

View File

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

View File

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

View File

@@ -1,31 +1,5 @@
# @blitzjs/codemod
## 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.1.2",
"version": "2.0.10",
"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.1.2",
"@blitzjs/generator": "2.0.10",
"arg": "5.0.1",
"blitz": "2.1.2",
"blitz": "2.0.10",
"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.1.2",
"@blitzjs/config": "2.0.10",
"@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: "2.1.0"}
return {alpha: "1.0.0", beta: "2.0.0", danger: "3.0.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: "2.1.0",
"@blitzjs/rpc": "2.1.0",
"@blitzjs/auth": "2.1.0",
"@blitzjs/next": "2.1.0",
blitz: "3.0.0",
"@blitzjs/rpc": "3.0.0",
"@blitzjs/auth": "3.0.0",
"@blitzjs/next": "3.0.0",
next: "12.2.0",
zod: "1.2.3",
},

View File

@@ -1,11 +1,5 @@
# @blitzjs/config
## 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.1.2",
"version": "2.0.10",
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "5.42.1",

View File

@@ -1,58 +1,5 @@
# @blitzjs/generator
## 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.1.2",
"version": "2.0.10",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -54,7 +54,7 @@
"zod": "3.20.2"
},
"devDependencies": {
"@blitzjs/config": "2.1.2",
"@blitzjs/config": "2.0.10",
"@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

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

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.1.2",
"@blitzjs/config": "2.0.10",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"react": "18.2.0",

1474
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.1.2",
"blitz": "2.0.10",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.1.2",
"blitz": "2.0.10",
"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.1.2",
"blitz": "2.0.10",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.1.2",
"blitz": "2.0.10",
"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.1.2",
"blitz": "2.0.10",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

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

View File

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

View File

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

View File

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