1
0
mirror of synced 2026-02-03 18:01:02 -05:00

Compare commits

...

26 Commits

Author SHA1 Message Date
github-actions[bot]
353af3fae6 Version Packages (beta) (#4216)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-03 12:07:42 +05:30
Siddharth Suresh
3ddb57072b Update location of resolve-href in next 13.5.2 (#4222)
* upgrade to next 13.5.2 and update location of internal function

* Create lucky-teachers-sleep.md

* fix bootupMarkers

* fix issues with qm integration test

* Update integration-tests/utils/next-test-utils.ts

* next.js generated stuff

* Update .changeset/lucky-teachers-sleep.md

* remove unnecessary next lints to the integration-tests

* Update main.yml

* Revert "remove unnecessary next lints to the integration-tests"

This reverts commit 3226b2e3ba.
2023-10-03 12:02:46 +05:30
Siddharth Suresh
8477d44aa7 Update Flightcontrol logo formatting 2023-09-19 23:18:53 +05:30
Siddharth Suresh
6802c67809 [Internal] Update Flightcontrol logo (#4220) 2023-09-19 23:00:39 +05:30
Siddharth Suresh
fe8c937d24 Remove rouge console.log from codegen (#4215) 2023-09-11 23:53:47 +05:30
Kevin Østerkilde
30fd613164 feat(cli): remove unnecessary language selector step (#4214) 2023-09-11 19:14:51 +05:30
github-actions[bot]
9a5ce2e8ea Version Packages (beta) (#4212)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-06 16:39:31 +05:30
Blitz.js Bot
81290b478c (meta) added @rodobre as contributor 2023-09-06 06:54:22 -04:00
rodobre
19898a4886 Fix for tslog error logging (#4208)
* Added: Fix for tslog error logging

* Create nervous-shrimps-serve.md

---------

Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-06 10:54:17 +00:00
David
6811eab1aa Add .tsx & .jsx file extensions for resolvers (#4209)
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-09-06 16:16:19 +05:30
Siddharth Suresh
022392c123 fixes: Blitz template (#4211) 2023-09-05 19:37:55 +05:30
Siddharth Suresh
e3522d65ef sponser: update asset names 2023-08-25 12:30:58 +05:30
Siddharth Suresh
cb1600a821 sponsor: update Byteflow Logo 2023-08-25 12:23:12 +05:30
github-actions[bot]
e1bffdf3d6 Version Packages (beta) (#4197)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-08-17 23:41:49 +05:30
Siddharth Suresh
8b01175b47 blitz-auth: useAuthenticatedBlitzContext returns AuthenticatedCtx (#4198)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2023-08-17 13:29:31 +05:30
Blitz.js Bot
0f1beb55b7 (meta) added @justinsmid as contributor 2023-08-14 12:35:36 -04:00
Justin Smid
82649f3415 Upgrade tslog dependency from 4.8.2 to 4.9.0 (#4180)
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-08-14 22:05:31 +05:30
Blitz.js Bot
231c2ff5ab (meta) added @maciej-ka as contributor 2023-08-14 12:26:03 -04:00
Maciej Kasprzyk
47c6b62dcb docs: add a name column to generate all examples (#4181)
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-08-14 21:55:58 +05:30
Siddharth Suresh
cf393786c0 Fix CI: remove workspace from package.json (#4196) 2023-08-14 21:35:52 +05:30
Siddharth Suresh
8d29b8afa9 sponser: add Byteflow as a bronze sponsor 2023-08-04 00:53:41 +05:30
Siddharth Suresh
f8bf8af28f sponser: add Byteflow logo 2023-08-04 00:43:40 +05:30
github-actions[bot]
8255172940 Version Packages (beta) (#4177)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-07-21 01:52:20 +05:30
Siddharth Suresh
90f1741dac blitz-auth: Update Prisma Adapter for v5 (#4174)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-20 22:16:28 +05:30
Siddharth Suresh
df3265b854 blitz-rpc: Cleanup Method for Event Listeners (#4173)
* feat: logic to cleanup potential memory leak

* styling: add space

* Create poor-crabs-drum.md
2023-07-20 16:36:08 +00:00
Datner
0ba2f4e77a update monorepo tooling (#4169)
* chore: add nix

This could help contributers... contribute!

* build: use turborepo pipelines for coordination

instead of hacking it with sleeps and such....

* chore: update dev script

now we're cooking with gas! no more hacks, no more awkward flags

* chore: update pnpm version requirement

you want to support v6?? then use a v6-compatible pnpm version

* chore: update pnpm-lock
2023-07-12 13:13:51 +00:00
107 changed files with 1135 additions and 870 deletions

View File

@@ -3955,6 +3955,36 @@
"doc",
"code"
]
},
{
"login": "maciej-ka",
"name": "Maciej Kasprzyk",
"avatar_url": "https://avatars.githubusercontent.com/u/5403694?v=4",
"profile": "https://github.com/maciej-ka",
"contributions": [
"doc",
"code"
]
},
{
"login": "justinsmid",
"name": "Justin Smid",
"avatar_url": "https://avatars.githubusercontent.com/u/34271675?v=4",
"profile": "https://github.com/justinsmid",
"contributions": [
"doc",
"code"
]
},
{
"login": "rodobre",
"name": "rodobre",
"avatar_url": "https://avatars.githubusercontent.com/u/52138375?v=4",
"profile": "https://github.com/rodobre",
"contributions": [
"doc",
"code"
]
}
],
"contributorsPerLine": 7,

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Update examples of generate all in docs to include one column in model.

View File

@@ -0,0 +1,9 @@
---
"blitz": patch
"@blitzjs/next": patch
"@blitzjs/generator": patch
---
Upgrade tslog to `4.9.0`.
This due a [tslog issue](https://github.com/fullstack-build/tslog/issues/227) that causes tslog to crash when attempting to log an error whose constructor expects more than one argument.

View File

@@ -0,0 +1,8 @@
---
"@blitzjs/auth": patch
"blitz": patch
---
blitz-auth: Support for Prisma v5
Internal: Make `handle` a required paramter while updating the `session` modal.

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/auth": patch
---
Updated `useAuthenticatedBlitzContext` to now return `AuthenticatedCtx`

View File

@@ -0,0 +1,6 @@
---
"blitz": patch
---
- Removes language selection step from `blitz new` menu
- Make `formik` the default/recommended form library

View File

@@ -0,0 +1,10 @@
---
"@blitzjs/auth": patch
"@blitzjs/next": major
"@blitzjs/rpc": patch
"blitz": patch
---
⚠️ Breaking Change:
Next.js version 13.5 or above is now required to use `@blitzjs/next`
Fix `Error: Cannot find module 'next/dist/shared/lib/router/utils/resolve-href'` by updating the location of next.js internal function.

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---
Fix for tslog error `TypeError: Cannot read properties of undefined (reading 'map')` while using custom errors.

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---
Allow `.tsx` & `.jsx` file extensions to be used for resolvers

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
blitz-rpc: Cleanup Event Listeners - Fix potential memory leak by cleaning up any residual event listeners set by blitz.

View File

@@ -74,10 +74,12 @@
"chatty-gifts-whisper",
"chilled-carrots-own",
"chilly-candles-care",
"chilly-jeans-fix",
"chilly-nails-nail",
"clean-hats-pump",
"clean-hounds-laugh",
"clean-walls-wink",
"clever-hornets-talk",
"clever-radios-lie",
"cool-doors-invent",
"cool-horses-check",
@@ -114,6 +116,7 @@
"few-elephants-approve",
"few-hounds-worry",
"few-shrimps-leave",
"fifty-drinks-cry",
"flat-bees-approve",
"fluffy-coats-flow",
"fluffy-mangos-begin",
@@ -123,6 +126,7 @@
"four-meals-fry",
"four-radios-tickle",
"four-sheep-judge",
"fresh-camels-return",
"fresh-crews-chew",
"funny-cups-pay",
"fuzzy-bees-warn",
@@ -175,6 +179,7 @@
"lemon-teachers-jam",
"light-donkeys-double",
"light-squids-draw",
"little-cycles-hang",
"little-pears-ring",
"long-bees-hope",
"long-dancers-jog",
@@ -184,6 +189,7 @@
"lovely-colts-share",
"lucky-cows-try",
"lucky-months-guess",
"lucky-teachers-sleep",
"lucky-years-turn",
"many-fans-fetch",
"mean-ears-speak",
@@ -198,9 +204,11 @@
"nasty-suns-wash",
"nervous-beds-travel",
"nervous-dolls-rule",
"nervous-shrimps-serve",
"new-coats-turn",
"new-olives-protect",
"nice-boxes-travel",
"nice-cats-lay",
"nice-deers-dream",
"nice-starfishes-live",
"nine-bags-rhyme",
@@ -225,6 +233,7 @@
"plenty-gifts-provide",
"plenty-kiwis-greet",
"polite-lizards-love",
"poor-crabs-drum",
"poor-peas-lick",
"poor-penguins-look",
"poor-shrimps-think",
@@ -234,6 +243,7 @@
"purple-donkeys-smash",
"purple-jars-begin",
"purple-singers-greet",
"quick-crews-occur",
"quick-cycles-confess",
"quick-dots-fetch",
"quiet-feet-travel",
@@ -248,6 +258,7 @@
"rotten-rocks-remember",
"rude-trainers-visit",
"serious-mugs-leave",
"shaggy-boxes-exercise",
"shaggy-carpets-brake",
"sharp-falcons-begin",
"sharp-olives-sip",

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Remove rouge `console.log` during start

View File

@@ -0,0 +1,9 @@
---
"@blitzjs/next": patch
"blitz": patch
"@blitzjs/generator": patch
---
- Updates `ts-log` peer dependency to `4.9.0`
- Removes `javascript` from `blitz new` menu
- Hot Fix the `Update Schema` when using blitz generator

View File

@@ -23,7 +23,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
@@ -44,7 +44,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Build
@@ -62,7 +62,7 @@ jobs:
- windows-latest
fail-fast: false
env:
NODE_VERSION: 16
NODE_VERSION: 18
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -75,7 +75,7 @@ jobs:
- name: Setup node@16
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
cache: "pnpm"
- name: Install dependencies
@@ -111,7 +111,7 @@ jobs:
echo "folders=$folders" >> $GITHUB_OUTPUT
Integration-Tests:
name: "Integration Test: ${{matrix.folder}} @ ${{ matrix.os }} "
name: "Integration Test: ${{matrix.folder}} @ ${{ matrix.os }}"
needs: [find-integration-tests]
strategy:
matrix:
@@ -124,32 +124,39 @@ jobs:
steps:
- run: echo ${{matrix.folder}}
- name: Checkout
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
uses: actions/checkout@v3
- name: Setup PNPM
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.5
- name: Setup node@${{ matrix.NODE_VERSION }}
- name: Setup node@18
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.NODE_VERSION }}
node-version: 18
cache: "pnpm"
- name: Install dependencies
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
run: pnpm install --frozen-lockfile
shell: bash
- name: Install playwright
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
run: |
pnpx playwright@1.28.0 install --with-deps
shell: bash
- name: Build
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
run: pnpm build
shell: bash
- name: Test Packages
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
run: pnpm test -- --filter=./integration-tests/${{matrix.folder}}
shell: bash

1
.npmrc
View File

@@ -1,4 +1,5 @@
save-exact=true
dedupe-peer-dependents=true
strict-peer-dependencies=false
public-hoist-pattern[]=secure-password

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-417-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-420-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">
@@ -94,6 +94,11 @@ Your financial contributions help ensure Blitz continues to be developed and mai
<td><a aria-label="Boostry" href="https://boostry.co.jp/?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2021">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/boostry.svg" width="200px">
</a></td>
<td>
<a aria-label="Byteflow" href="https://byteflow.app/?ref=blitzjs">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/byteflow.png" width="70px">
</a>
</td>
</tr>
</table>
@@ -121,9 +126,11 @@ Your financial contributions help ensure Blitz continues to be developed and mai
<table>
<tr>
<td>
<a aria-label="Flightcontrol" href="https://www.flightcontrol.dev?ref=blitzjs">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/flightcontrol.png" width="400px">
</a>
</td>
</tr>
</table>
@@ -732,6 +739,9 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
<td align="center"><a href="https://github.com/nerixim"><img src="https://avatars.githubusercontent.com/u/26106502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikita Kamaev</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=nerixim" title="Documentation">📖</a></td>
<td align="center"><a href="https://webredone.com/"><img src="https://avatars.githubusercontent.com/u/11588823?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikola Ivanov</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=nikola-wd" title="Documentation">📖</a></td>
<td align="center"><a href="jayu.dev"><img src="https://avatars.githubusercontent.com/u/11561585?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jakub Mazurek</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jayu" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=jayu" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/maciej-ka"><img src="https://avatars.githubusercontent.com/u/5403694?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maciej Kasprzyk</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=maciej-ka" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=maciej-ka" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/justinsmid"><img src="https://avatars.githubusercontent.com/u/34271675?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Justin Smid</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=justinsmid" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=justinsmid" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/rodobre"><img src="https://avatars.githubusercontent.com/u/52138375?v=4?s=100" width="100px;" alt=""/><br /><sub><b>rodobre</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=rodobre" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=rodobre" title="Code">💻</a></td>
</tr>
</table>

View File

@@ -1,5 +1,55 @@
# next-blitz-auth
## 0.1.1-beta.10
### Patch Changes
- Updated dependencies [30fd61316]
- Updated dependencies [3ddb57072]
- Updated dependencies [fe8c937d2]
- blitz@2.0.0-beta.34
- @blitzjs/auth@2.0.0-beta.34
- @blitzjs/next@2.0.0-beta.34
- @blitzjs/rpc@2.0.0-beta.34
- @blitzjs/config@2.0.0-beta.34
## 0.1.1-beta.9
### Patch Changes
- Updated dependencies [19898a488]
- Updated dependencies [6811eab1a]
- Updated dependencies [022392c12]
- @blitzjs/rpc@2.0.0-beta.33
- blitz@2.0.0-beta.33
- @blitzjs/next@2.0.0-beta.33
- @blitzjs/auth@2.0.0-beta.33
- @blitzjs/config@2.0.0-beta.33
## 0.1.1-beta.8
### Patch Changes
- Updated dependencies [82649f341]
- Updated dependencies [8b01175b4]
- blitz@2.0.0-beta.32
- @blitzjs/next@2.0.0-beta.32
- @blitzjs/auth@2.0.0-beta.32
- @blitzjs/rpc@2.0.0-beta.32
- @blitzjs/config@2.0.0-beta.32
## 0.1.1-beta.7
### Patch Changes
- Updated dependencies [90f1741da]
- Updated dependencies [df3265b85]
- @blitzjs/auth@2.0.0-beta.31
- blitz@2.0.0-beta.31
- @blitzjs/rpc@2.0.0-beta.31
- @blitzjs/next@2.0.0-beta.31
- @blitzjs/config@2.0.0-beta.31
## 0.1.1-beta.6
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "next-blitz-auth",
"version": "0.1.1-beta.6",
"version": "0.1.1-beta.10",
"private": true,
"scripts": {
"blitz:dev": "next dev",
@@ -9,17 +9,17 @@
"lint": "next lint"
},
"dependencies": {
"@blitzjs/auth": "workspace:*",
"@blitzjs/config": "workspace:*",
"@blitzjs/next": "workspace:*",
"@blitzjs/rpc": "workspace:*",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "^4.5.0",
"@tanstack/react-query": "4.0.10",
"blitz": "workspace:*",
"blitz": "2.0.0-beta.34",
"flatted": "3.2.7",
"next": "13.3.0",
"next": "13.5.2",
"prisma": "^4.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -23,15 +23,15 @@
]
},
"dependencies": {
"@blitzjs/auth": "workspace:*",
"@blitzjs/config": "workspace:*",
"@blitzjs/next": "workspace:*",
"@blitzjs/rpc": "workspace:*",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "workspace:2.0.0-beta.30",
"next": "13.3.0",
"blitz": "2.0.0-beta.34",
"next": "13.5.2",
"openid-client": "5.2.1",
"prisma": "4.6.1",
"react": "18.2.0",

View File

@@ -24,15 +24,15 @@
]
},
"dependencies": {
"@blitzjs/auth": "workspace:*",
"@blitzjs/config": "workspace:*",
"@blitzjs/next": "workspace:*",
"@blitzjs/rpc": "workspace:*",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "workspace:2.0.0-beta.30",
"next": "13.3.0",
"blitz": "2.0.0-beta.34",
"next": "13.5.2",
"next-auth": "4.18.7",
"prisma": "4.6.1",
"react": "18.2.0",

View File

@@ -99,7 +99,7 @@ const Home: BlitzPage = () => {
<div className={styles.code}>
<span>1</span>
<pre>
<code>blitz generate all project</code>
<code>blitz generate all project name:string</code>
</pre>
</div>

View File

@@ -16,17 +16,17 @@
"schema": "./db/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "workspace:*",
"@blitzjs/config": "workspace:*",
"@blitzjs/next": "workspace:*",
"@blitzjs/rpc": "workspace:*",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@prisma/client": "4.6.1",
"@types/jest": "29.2.2",
"@types/passport-twitter": "1.0.37",
"blitz": "workspace:*",
"blitz": "2.0.0-beta.34",
"jest": "29.3.0",
"jest-environment-jsdom": "29.3.0",
"next": "13.3.0",
"next": "13.5.2",
"passport-mock-strategy": "2.0.0",
"passport-twitter": "1.0.4",
"prisma": "4.6.1",

BIN
assets/byteflow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 87 KiB

61
flake.lock generated Normal file
View File

@@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1688221086,
"narHash": "sha256-cdW6qUL71cNWhHCpMPOJjlw0wzSRP0pVlRn2vqX/VVg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "cd99c2b3c9f160cd004318e0697f90bbd5960825",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

39
flake.nix Normal file
View File

@@ -0,0 +1,39 @@
{
description = "The Blitzjs Monorepo";
nixConfig.bash-prompt = "\[nix:blitz\]$ ";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter = pkgs.alejandra;
devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs-18_x
];
shellHook = ''
mkdir -p $out/bin
${pkgs.nodejs-18_x}/bin/corepack enable --install-directory $out/bin
export PATH="$out/bin:$PATH"
'';
};
};
});
}

View File

@@ -17,16 +17,16 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.30",
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.1",
"blitz": "workspace:2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"delay": "5.0.0",
"next": "13.3.0",
"next": "13.5.2",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -13,37 +13,10 @@ import webdriver from "../../utils/next-webdriver"
let app: any
let appPort: number
let mode: "dev" | "server" = "dev"
const runTests = () => {
describe("Auth", () => {
/* TODO - Add a non flaky Integration Test for custom plugin
describe("custom plugin", () => {
it("custom plugin - events", async () => {
const browser = await webdriver(appPort, "/custom-plugin")
let text = await browser.elementByCss("#page").text()
await waitFor(250)
text = await browser.elementByCss("#page").text()
expect(text).toBe("Custom plugin Session Created")
await waitFor(3000)
text = await browser.elementByCss("#page").text()
expect(text).toBe("Custom plugin RPC Error")
if (browser) {
await browser.close()
}
})
it("custom plugin - middleware", async () => {
const browser = await webdriver(appPort, "/custom-plugin")
await waitFor(100)
let text = await browser.elementByCss("#before-req").text()
expect(text).toBe("customHeaderValue")
await waitFor(2000)
text = await browser.elementByCss("#before-res").text()
expect(text).toBe("55")
if (browser) {
await browser.close()
}
})
})
*/
describe("unauthenticated", () => {
it("should render result for open query", async () => {
const browser = await webdriver(appPort, "/noauth-query")
@@ -58,7 +31,11 @@ const runTests = () => {
const browser = await webdriver(appPort, "/authenticated-query")
await browser.waitForElementByCss("#error")
let text = await browser.elementByCss("#error").text()
expect(text).toMatch(/AuthenticationError/)
if (mode === "server") {
expect(text).toMatch(/AuthenticationError/)
} else {
expect(text).toContain("Error")
}
if (browser) await browser.close()
})
@@ -120,7 +97,11 @@ const runTests = () => {
await waitFor(200)
await browser.waitForElementByCss("#error")
text = await browser.elementByCss("#error").text()
expect(text).toMatch(/AuthenticationError/)
if (mode === "server") {
expect(text).toMatch(/AuthenticationError/)
} else {
expect(text).toContain("Error")
}
if (browser) await browser.close()
})
@@ -262,6 +243,7 @@ const runTests = () => {
describe("Auth Tests", () => {
describe("dev mode", () => {
beforeAll(async () => {
mode = "dev"
try {
await runBlitzCommand(["prisma", "migrate", "reset", "--force"])
appPort = await findPort()
@@ -276,6 +258,7 @@ describe("Auth Tests", () => {
describe("server mode", () => {
beforeAll(async () => {
mode = "server"
try {
await runBlitzCommand(["prisma", "generate"])
await runBlitzCommand(["prisma", "migrate", "deploy"])

View File

@@ -17,13 +17,13 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.30",
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@prisma/client": "4.6.1",
"blitz": "workspace:2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"lowdb": "3.0.0",
"next": "13.3.0",
"next": "13.5.2",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -43,7 +43,7 @@ const runTests = (mode?: string) => {
const browser = await webdriver(appPort, "/authenticated-page")
let errorMsg = await browser.elementById(`error`).text()
expect(errorMsg).toMatch(/Error: You are not authenticated/)
if (browser) browser.close()
if (browser) void browser.close()
},
5000 * 60 * 2,
)

View File

@@ -16,19 +16,19 @@
"schema": "db/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@prisma/client": "4.6.1",
"blitz": "workspace:2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"lowdb": "3.0.0",
"next": "13.3.0",
"next": "13.5.2",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/config": "2.0.0-beta.34",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@@ -11,11 +11,11 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"blitz": "workspace:2.0.0-beta.30",
"next": "13.3.0",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"blitz": "2.0.0-beta.34",
"next": "13.5.2",
"react": "18.2.0",
"react-dom": "18.2.0"
},

View File

@@ -1,10 +1,16 @@
{
"extends": "@blitzjs/config/tsconfig.nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "types"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "types", ".next/types/**/*.ts"],
"compilerOptions": {
"paths": {
"react": ["./node_modules/@types/react"]
}
},
"plugins": [
{
"name": "next"
}
],
"strictNullChecks": true
},
"exclude": ["node_modules"],
"baseUrl": "."

View File

@@ -17,14 +17,14 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.30",
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@prisma/client": "4.6.1",
"blitz": "workspace:2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"lowdb": "3.0.0",
"next": "13.3.0",
"next": "13.5.2",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -16,19 +16,19 @@
"prisma:studio": "prisma studio"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@prisma/client": "4.6.1",
"blitz": "workspace:2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"lowdb": "3.0.0",
"next": "13.3.0",
"next": "13.5.2",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/config": "2.0.0-beta.34",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -8,14 +8,14 @@
"clean": "rm -rf .turbo && rm -rf node_modules"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.30",
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@prisma/client": "4.6.1",
"@tanstack/react-query": "4.0.10",
"blitz": "workspace:2.0.0-beta.30",
"next": "13.3.0",
"blitz": "2.0.0-beta.34",
"next": "13.5.2",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0"

View File

@@ -4,7 +4,7 @@ import {useQuery, useInfiniteQuery, BlitzRpcPlugin, QueryClientProvider} from "@
import React from "react"
import delay from "delay"
import {buildMutationRpc, buildQueryRpc, mockRouter, render} from "../../utils/blitz-test-utils"
import {RouterContext} from "next/dist/shared/lib/router-context"
import {RouterContext} from "@blitzjs/next"
beforeAll(() => {
globalThis.__BLITZ_SESSION_COOKIE_PREFIX = "qm-test-cookie-prefix"

View File

@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

View File

@@ -16,18 +16,18 @@
"schema": "db/schema.prisma"
},
"dependencies": {
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@prisma/client": "4.6.1",
"blitz": "workspace:2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"lowdb": "3.0.0",
"next": "13.3.0",
"next": "13.5.2",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/config": "2.0.0-beta.34",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -1,10 +1,16 @@
{
"extends": "@blitzjs/config/tsconfig.nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "types"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "types", ".next/types/**/*.ts"],
"compilerOptions": {
"paths": {
"react": ["./node_modules/@types/react"]
}
},
"plugins": [
{
"name": "next"
}
],
"strictNullChecks": true
},
"exclude": ["node_modules"],
"baseUrl": "."

View File

@@ -7,11 +7,11 @@
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
},
"dependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"blitz": "workspace:2.0.0-beta.30",
"next": "13.3.0",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"blitz": "2.0.0-beta.34",
"next": "13.5.2",
"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": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"blitz": "workspace:2.0.0-beta.30",
"next": "13.3.0",
"@blitzjs/config": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"blitz": "2.0.0-beta.34",
"next": "13.5.2",
"react": "18.2.0",
"react-dom": "18.2.0"
},

View File

@@ -16,19 +16,19 @@
"schema": "db/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "workspace:2.0.0-beta.30",
"@blitzjs/next": "workspace:2.0.0-beta.30",
"@blitzjs/rpc": "workspace:2.0.0-beta.30",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/next": "2.0.0-beta.34",
"@blitzjs/rpc": "2.0.0-beta.34",
"@prisma/client": "4.6.1",
"blitz": "workspace:2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"lowdb": "3.0.0",
"next": "13.3.0",
"next": "13.5.2",
"prisma": "4.6.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/config": "2.0.0-beta.34",
"@next/bundle-analyzer": "12.0.8",
"@types/express": "4.17.13",
"@types/fs-extra": "9.0.13",

View File

@@ -3,7 +3,7 @@ import {vi} from "vitest"
import {QueryClient} from "@tanstack/react-query"
import {BlitzRpcPlugin, QueryClientProvider} from "@blitzjs/rpc"
import {NextRouter} from "next/router"
import {RouterContext} from "next/dist/shared/lib/router-context"
import {RouterContext} from "@blitzjs/next"
import {render as defaultRender} from "@testing-library/react"
export const mockRouter: NextRouter = {
@@ -27,6 +27,7 @@ export const mockRouter: NextRouter = {
emit: vi.fn(),
},
isFallback: false,
forward: vi.fn(),
}
type DefaultParams = Parameters<typeof defaultRender>
@@ -74,7 +75,10 @@ const BlitzWrapper = ({plugins, children}) => {
)
}
export function render(ui: RenderUI, {wrapper, router, ...options}: RenderOptions = {}) {
export function render(
ui: RenderUI,
{wrapper, router, ...options}: RenderOptions = {},
): ReturnType<typeof defaultRender> {
if (!wrapper) {
wrapper = ({children}) => {
return <BlitzWrapper plugins={[BlitzRpcPlugin({})]}>{children}</BlitzWrapper>

View File

@@ -242,8 +242,8 @@ export function runBlitzCommandDev(argv, stdOut, opts: RunNextCommandDevOptions
function handleStdout(data) {
const message = data.toString()
const bootupMarkers = {
dev: /compiled .*successfully/i,
start: /started server/i,
dev: /Ready/i,
start: /Ready/i,
}
if (
(opts.bootupMarker && opts.bootupMarker.test(message)) ||
@@ -417,9 +417,10 @@ export function runNextCommandDev(argv, stdOut, opts: RunNextCommandDevOptions =
function handleStdout(data) {
const message = data.toString()
console.log(message)
const bootupMarkers = {
dev: /compiled .*successfully/i,
start: /started server/i,
dev: /Next.js/i,
start: /Next.js/i,
}
if (
(opts.bootupMarker && opts.bootupMarker.test(message)) ||
@@ -436,7 +437,7 @@ export function runNextCommandDev(argv, stdOut, opts: RunNextCommandDevOptions =
}
if (opts.stdout !== false) {
process.stdout.write(message)
process.stdout.write(message)
}
}

View File

@@ -3,8 +3,9 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@blitzjs/config": "workspace: *",
"@blitzjs/rpc": "workspace: *",
"@blitzjs/config": "workspace:2.0.0-beta.34",
"@blitzjs/next": "workspace:2.0.0-beta.34",
"@blitzjs/rpc": "workspace:2.0.0-beta.34",
"@tanstack/react-query": "4.13.0",
"@testing-library/react": "13.4.0",
"@types/express": "4.17.13",

View File

@@ -13,7 +13,7 @@
"prepare": "husky install",
"build": "turbo run build",
"build:apps": "turbo run buildapp --concurrency=1",
"dev": "turbo run dev --no-cache --parallel",
"dev": "turbo run dev --filter='./packages/*'",
"lint": "turbo run lint",
"test": "turbo run test",
"clean": "turbo run clean && rm -rf node_modules",
@@ -29,17 +29,17 @@
"husky": "8.0.2",
"jsdom": "^19.0.0",
"lint-staged": "13.0.3",
"next": "13.3.0",
"next": "13.5.2",
"only-allow": "1.1.0",
"prettier": "^2.7.1",
"prettier-plugin-prisma": "4.4.0",
"pretty-quick": "3.1.3",
"turbo": "1.4.2",
"turbo": "1.10.7",
"vitest": "0.25.3",
"wait-on": "6.0.1"
},
"npmClient": "pnpm",
"packageManager": "pnpm@7.11.0",
"packageManager": "pnpm@8.6.6",
"manypkg": {
"ignoredRules": [
"EXTERNAL_MISMATCH"

View File

@@ -1,5 +1,48 @@
# @blitzjs/auth
## 2.0.0-beta.34
### Patch Changes
- 3ddb57072: ⚠️ Breaking Change:
Next.js version 13.5 or above is now required to use `@blitzjs/next`
Fix `Error: Cannot find module 'next/dist/shared/lib/router/utils/resolve-href'` by updating the location of next.js internal function.
- Updated dependencies [30fd61316]
- Updated dependencies [3ddb57072]
- Updated dependencies [fe8c937d2]
- blitz@2.0.0-beta.34
## 2.0.0-beta.33
### Patch Changes
- Updated dependencies [19898a488]
- Updated dependencies [6811eab1a]
- Updated dependencies [022392c12]
- blitz@2.0.0-beta.33
## 2.0.0-beta.32
### Patch Changes
- 8b01175b4: Updated `useAuthenticatedBlitzContext` to now return `AuthenticatedCtx`
- Updated dependencies [82649f341]
- blitz@2.0.0-beta.32
## 2.0.0-beta.31
### Patch Changes
- 90f1741da: blitz-auth: Support for Prisma v5
Internal: Make `handle` a required paramter while updating the `session` modal.
- Updated dependencies [90f1741da]
- Updated dependencies [df3265b85]
- blitz@2.0.0-beta.31
## 2.0.0-beta.30
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/auth",
"version": "2.0.0-beta.30",
"version": "2.0.0-beta.34",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -50,7 +50,7 @@
"url": "0.11.0"
},
"peerDependencies": {
"blitz": "2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"next": "*",
"next-auth": "*",
"secure-password": "4.0.0"
@@ -67,7 +67,7 @@
}
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/config": "2.0.0-beta.34",
"@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.0-beta.30",
"next": "13.3.0",
"blitz": "2.0.0-beta.34",
"next": "13.5.2",
"next-auth": "4.18.7",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -31,7 +31,7 @@ interface PrismaClientWithSession {
}): Promise<SessionModel>
update(args: {
data: Partial<SessionModel>
where: {handle?: SessionModel["handle"]}
where: {handle: SessionModel["handle"]}
}): Promise<SessionModel>
delete(args: {where: {handle?: SessionModel["handle"]}}): Promise<SessionModel>
}

View File

@@ -15,6 +15,7 @@ import {
log,
baseLogger,
chalk,
AuthenticatedCtx,
} from "blitz"
import {
EmptyPublicData,
@@ -219,7 +220,7 @@ export async function useAuthenticatedBlitzContext({
redirectTo?: string | RouteUrlObject
redirectAuthenticatedTo?: string | RouteUrlObject | ((ctx: Ctx) => string | RouteUrlObject)
role?: string | string[]
}): Promise<void> {
}): Promise<AuthenticatedCtx> {
const log = baseLogger().getSubLogger({name: "useAuthenticatedBlitzContext"})
const customChalk = new chalk.Instance({
level: log.settings.type === "json" ? 0 : chalk.level,
@@ -268,6 +269,7 @@ export async function useAuthenticatedBlitzContext({
redirect(redirectTo)
}
}
return ctx as AuthenticatedCtx
}
const makeProxyToPublicData = <T extends SessionContextClass>(ctxClass: T): T => {

View File

@@ -82,7 +82,7 @@ declare module "blitz" {
export interface Ctx {
session: SessionContext
}
export interface AuthenticatedMiddlewareCtx extends Omit<Ctx, "session"> {
export interface AuthenticatedCtx extends Omit<Ctx, "session"> {
session: AuthenticatedSessionContext
}
}

View File

@@ -0,0 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"dev": {
"dependsOn": ["blitz#build"],
"persistent": true,
"cache": false
}
}
}

View File

@@ -1,5 +1,56 @@
# @blitzjs/next
## 2.0.0-beta.34
### Major Changes
- 3ddb57072: ⚠️ Breaking Change:
Next.js version 13.5 or above is now required to use `@blitzjs/next`
Fix `Error: Cannot find module 'next/dist/shared/lib/router/utils/resolve-href'` by updating the location of next.js internal function.
### Patch Changes
- Updated dependencies [30fd61316]
- Updated dependencies [3ddb57072]
- Updated dependencies [fe8c937d2]
- blitz@2.0.0-beta.34
- @blitzjs/rpc@2.0.0-beta.34
## 2.0.0-beta.33
### Patch Changes
- 022392c12: - Updates `ts-log` peer dependency to `4.9.0`
- Removes `javascript` from `blitz new` menu
- Hot Fix the `Update Schema` when using blitz generator
- Updated dependencies [19898a488]
- Updated dependencies [6811eab1a]
- Updated dependencies [022392c12]
- @blitzjs/rpc@2.0.0-beta.33
- blitz@2.0.0-beta.33
## 2.0.0-beta.32
### Patch Changes
- 82649f341: Upgrade tslog to `4.9.0`.
This due a [tslog issue](https://github.com/fullstack-build/tslog/issues/227) that causes tslog to crash when attempting to log an error whose constructor expects more than one argument.
- Updated dependencies [82649f341]
- blitz@2.0.0-beta.32
- @blitzjs/rpc@2.0.0-beta.32
## 2.0.0-beta.31
### Patch Changes
- Updated dependencies [90f1741da]
- Updated dependencies [df3265b85]
- blitz@2.0.0-beta.31
- @blitzjs/rpc@2.0.0-beta.31
## 2.0.0-beta.30
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/next",
"version": "2.0.0-beta.30",
"version": "2.0.0-beta.34",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -29,7 +29,7 @@
"eslint.js"
],
"dependencies": {
"@blitzjs/rpc": "2.0.0-beta.30",
"@blitzjs/rpc": "2.0.0-beta.34",
"@types/hoist-non-react-statics": "3.3.1",
"debug": "4.3.3",
"fs-extra": "10.0.1",
@@ -38,13 +38,13 @@
"supports-color": "8.1.1"
},
"peerDependencies": {
"blitz": "2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"next": "*",
"react": "*",
"tslog": "*"
"tslog": "4.9.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/config": "2.0.0-beta.34",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.3",
"@testing-library/react": "13.4.0",
@@ -55,16 +55,16 @@
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"@types/testing-library__react-hooks": "4.0.0",
"blitz": "2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"cross-spawn": "7.0.3",
"find-up": "4.1.0",
"next": "13.3.0",
"next": "13.5.2",
"next-router-mock": "0.9.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"resolve-from": "5.0.0",
"ts-jest": "27.1.4",
"tslog": "4.8.2",
"tslog": "4.9.0",
"typescript": "^4.8.4",
"unbuild": "0.7.6",
"watch": "1.0.2"

View File

@@ -37,7 +37,7 @@ import {IncomingMessage, ServerResponse} from "http"
import {withSuperJsonProps} from "./superjson"
import {ParsedUrlQuery} from "querystring"
import {PreviewData} from "next/types"
import {resolveHref} from "next/dist/shared/lib/router/utils/resolve-href"
import {resolveHref} from "next/dist/client/resolve-href"
export * from "./index-browser"

View File

@@ -0,0 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"dev": {
"dependsOn": ["@blitzjs/rpc#build", "blitz#build"],
"persistent": true,
"cache": false
}
}
}

View File

@@ -1,5 +1,45 @@
# @blitzjs/rpc
## 2.0.0-beta.34
### Patch Changes
- 3ddb57072: ⚠️ Breaking Change:
Next.js version 13.5 or above is now required to use `@blitzjs/next`
Fix `Error: Cannot find module 'next/dist/shared/lib/router/utils/resolve-href'` by updating the location of next.js internal function.
- Updated dependencies [30fd61316]
- Updated dependencies [3ddb57072]
- Updated dependencies [fe8c937d2]
- blitz@2.0.0-beta.34
## 2.0.0-beta.33
### Patch Changes
- 19898a488: Fix for tslog error `TypeError: Cannot read properties of undefined (reading 'map')` while using custom errors.
- 6811eab1a: Allow `.tsx` & `.jsx` file extensions to be used for resolvers
- Updated dependencies [19898a488]
- Updated dependencies [6811eab1a]
- Updated dependencies [022392c12]
- blitz@2.0.0-beta.33
## 2.0.0-beta.32
### Patch Changes
- Updated dependencies [82649f341]
- blitz@2.0.0-beta.32
## 2.0.0-beta.31
### Patch Changes
- Updated dependencies [90f1741da]
- Updated dependencies [df3265b85]
- blitz@2.0.0-beta.31
## 2.0.0-beta.30
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/rpc",
"version": "2.0.0-beta.30",
"version": "2.0.0-beta.34",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -37,19 +37,19 @@
},
"peerDependencies": {
"@tanstack/query-core": "4.24.4",
"blitz": "2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"next": "*",
"react": "*"
},
"devDependencies": {
"@blitzjs/auth": "2.0.0-beta.30",
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/auth": "2.0.0-beta.34",
"@blitzjs/config": "2.0.0-beta.34",
"@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.0-beta.30",
"next": "13.3.0",
"blitz": "2.0.0-beta.34",
"next": "13.5.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "^4.8.4",

View File

@@ -320,7 +320,7 @@ export function rpcHandler(config: RpcConfig) {
config.onError?.(error)
log.error(error)
log.error(new Error(error))
newLine()
if (!error.statusCode) {

View File

@@ -23,7 +23,7 @@ export async function loader(this: Loader, input: string): Promise<string> {
if (isSSR) {
this.cacheable(false)
const resolvers = await collectResolvers(root, rpcFolders, ["ts", "js"])
const resolvers = await collectResolvers(root, rpcFolders, ["ts", "js", "tsx", "jsx"])
return await transformBlitzRpcServer(
input,
toPosixPath(id),

View File

@@ -1,5 +1,5 @@
import type {SessionContext, SessionContextBase} from "@blitzjs/auth"
import {Await, Ctx, EnsurePromise, AuthenticatedMiddlewareCtx} from "blitz"
import {Await, Ctx, EnsurePromise, AuthenticatedCtx} from "blitz"
import type {input as zInput, output as zOutput, ZodTypeAny} from "zod"
export type ParserType = "sync" | "async"
@@ -271,7 +271,7 @@ interface ResolverAuthorize {
<T, C = Ctx>(...args: Parameters<SessionContextBase["$authorize"]>): (
input: T,
ctx: C,
) => ResultWithContext<T, AuthenticatedMiddlewareCtx>
) => ResultWithContext<T, AuthenticatedCtx>
}
const authorize: ResolverAuthorize = (...args) => {

View File

@@ -0,0 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"dev": {
"dependsOn": ["@blitzjs/auth#build", "blitz#build"],
"persistent": true,
"cache": false
}
}
}

View File

@@ -1,5 +1,54 @@
# blitz
## 2.0.0-beta.34
### Patch Changes
- 30fd61316: - Removes language selection step from `blitz new` menu
- Make `formik` the default/recommended form library
- 3ddb57072: ⚠️ Breaking Change:
Next.js version 13.5 or above is now required to use `@blitzjs/next`
Fix `Error: Cannot find module 'next/dist/shared/lib/router/utils/resolve-href'` by updating the location of next.js internal function.
- fe8c937d2: Remove rouge `console.log` during start
- @blitzjs/generator@2.0.0-beta.34
## 2.0.0-beta.33
### Patch Changes
- 19898a488: Fix for tslog error `TypeError: Cannot read properties of undefined (reading 'map')` while using custom errors.
- 6811eab1a: Allow `.tsx` & `.jsx` file extensions to be used for resolvers
- 022392c12: - Updates `ts-log` peer dependency to `4.9.0`
- Removes `javascript` from `blitz new` menu
- Hot Fix the `Update Schema` when using blitz generator
- Updated dependencies [022392c12]
- @blitzjs/generator@2.0.0-beta.33
## 2.0.0-beta.32
### Patch Changes
- 82649f341: Upgrade tslog to `4.9.0`.
This due a [tslog issue](https://github.com/fullstack-build/tslog/issues/227) that causes tslog to crash when attempting to log an error whose constructor expects more than one argument.
- Updated dependencies [47c6b62dc]
- Updated dependencies [82649f341]
- @blitzjs/generator@2.0.0-beta.32
## 2.0.0-beta.31
### Patch Changes
- 90f1741da: blitz-auth: Support for Prisma v5
Internal: Make `handle` a required paramter while updating the `session` modal.
- df3265b85: blitz-rpc: Cleanup Event Listeners - Fix potential memory leak by cleaning up any residual event listeners set by blitz.
- @blitzjs/generator@2.0.0-beta.31
## 2.0.0-beta.30
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "blitz",
"version": "2.0.0-beta.30",
"version": "2.0.0-beta.34",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -30,7 +30,7 @@
"blitz": "bin/blitz"
},
"dependencies": {
"@blitzjs/generator": "2.0.0-beta.30",
"@blitzjs/generator": "2.0.0-beta.34",
"@mrleebo/prisma-ast": "0.2.6",
"@types/global-agent": "2.1.1",
"arg": "5.0.1",
@@ -76,11 +76,11 @@
"tar": "6.1.11",
"ts-node": "10.9.1",
"tsconfig-paths": "4.0.0",
"tslog": "4.8.2",
"tslog": "4.9.0",
"watchpack": "2.1.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.30",
"@blitzjs/config": "2.0.0-beta.34",
"@types/cookie": "0.4.1",
"@types/cross-spawn": "6.0.2",
"@types/debug": "4.1.7",

View File

@@ -12,14 +12,13 @@ import {codegenTasks} from "../utils/codegen-tasks"
type NotUndefined<T> = T extends undefined ? never : T
const forms: Record<NotUndefined<AppGeneratorOptions["form"]>, string> = {
finalform: "React Final Form (recommended)",
formik: "Formik (Recommended)",
finalform: "React Final Form",
hookform: "React Hook Form",
formik: "Formik",
}
const language = {
typescript: "TypeScript",
javascript: "JavaScript",
}
type TLanguage = keyof typeof language
@@ -74,8 +73,8 @@ const args = arg(
let projectName: string = ""
let projectPath: string = ""
let projectLanguage: string | TLanguage = ""
let projectFormLib: AppGeneratorOptions["form"] = "finalform"
let projectLanguage: string | TLanguage = language.typescript
let projectFormLib: AppGeneratorOptions["form"] = "formik"
let projectTemplate: AppGeneratorOptions["template"] = templates.full
let projectPkgManger: TPkgManager = PREFERABLE_PKG_MANAGER
let shouldInstallDeps: boolean = true
@@ -101,28 +100,6 @@ const determineProjectName = async () => {
}
}
const determineLanguage = async () => {
// Check if language from flag is valid
if (
!args["--language"] ||
(args["--language"] && !Object.keys(language).includes(args["--language"].toLowerCase()))
) {
const res = await prompts({
type: "select",
name: "language",
message: "Pick a new project's language",
initial: 0,
choices: Object.entries(language).map((c) => {
return {title: c[1], value: c[1]}
}),
})
projectLanguage = res.language
} else {
projectLanguage = args["--language"]
}
}
const determineFormLib = async () => {
// Check if form from flag is valid
if (!args["--form"] || (args["--form"] && !Object.keys(forms).includes(args["--form"]))) {
@@ -225,14 +202,13 @@ const determinePkgManagerToInstallDeps = async () => {
}
}
const newApp: CliCommand = async (argv) => {
const newApp: CliCommand = async () => {
const shouldUpgrade = !args["--skip-upgrade"]
if (shouldUpgrade) {
await checkLatestVersion()
}
await determineProjectName()
await determineLanguage()
await determineTemplate()
await determinePkgManagerToInstallDeps()
if (!projectTemplate.skipForms) {
@@ -284,7 +260,7 @@ const newApp: CliCommand = async (argv) => {
}
const generator = new AppGenerator(generatorOpts)
console.log(`Hang tight while we set up your new Blitz app!`)
console.log("Hang tight while we set up your new Blitz app!")
await generator.run()
if (requireManualInstall) {

View File

@@ -16,7 +16,6 @@ export const codegenTasks = async () => {
*/
const nextDir = await resolveCwd("next")
const nextClientIndex = join(nextDir, "../..", "client", "index.js")
console.log(nextClientIndex)
const readFile = await fs.readFile(nextClientIndex)
const packageJson = await getPackageJson()
const version = packageJson.dependencies.next

View File

@@ -5,4 +5,5 @@ declare global {
beforeHttpRequest: BeforeHttpRequest
beforeHttpResponse: BeforeHttpResponse
}
var __BLITZ_CLEAN_UP_LISTENERS: () => void
}

View File

@@ -1,4 +1,4 @@
import {ILogObj, ISettingsParam, Logger, IMeta} from "tslog"
import {ILogObj, ISettingsParam, Logger} from "tslog"
import c from "chalk"
import {Table} from "console-table-printer"
import ora from "ora"

View File

@@ -89,13 +89,23 @@ export function reduceBlitzClientPlugins<TPlugins extends readonly ClientPlugin<
globalThis.__BLITZ_MIDDLEWARE_HOOKS = middleware
if (isClient) {
document.addEventListener("blitz:session-created", async () => {
if (globalThis.__BLITZ_CLEAN_UP_LISTENERS) {
globalThis.__BLITZ_CLEAN_UP_LISTENERS()
}
const onSessionCreated = async () => {
await Promise.all(events.onSessionCreated())
})
document.addEventListener("blitz:rpc-error", async (e) => {
}
const onRpcError = async (e: Event): Promise<void> => {
const customEvent = e as CustomEvent<Error>
await Promise.all(events.onRpcError(customEvent.detail))
})
}
document.addEventListener("blitz:session-created", onSessionCreated)
document.addEventListener("blitz:rpc-error", onRpcError)
globalThis.__BLITZ_CLEAN_UP_LISTENERS = () => {
document.removeEventListener("blitz:session-created", onSessionCreated)
document.removeEventListener("blitz:rpc-error", onRpcError)
}
}
const withPlugins = compose(...providers)

View File

@@ -2,7 +2,7 @@ import {UrlObject} from "url"
// Context for plugins to declaration merge stuff into
export interface Ctx {}
export interface AuthenticatedMiddlewareCtx {}
export interface AuthenticatedCtx {}
export type CodegenField = {
component: string
@@ -17,7 +17,7 @@ export interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query" | "
href: string
}
export interface AuthenticatedMiddlewareCtx {}
export interface AuthenticatedCtx {}
export type EventHooks = {
onSessionCreated?: OnSessionCreated

11
packages/blitz/turbo.json Normal file
View File

@@ -0,0 +1,11 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"dev": {
"dependsOn": ["@blitzjs/generator#build"],
"persistent": true,
"cache": false
}
}
}

View File

@@ -1,5 +1,43 @@
# @blitzjs/codemod
## 2.0.0-beta.34
### Patch Changes
- Updated dependencies [30fd61316]
- Updated dependencies [3ddb57072]
- Updated dependencies [fe8c937d2]
- blitz@2.0.0-beta.34
- @blitzjs/generator@2.0.0-beta.34
## 2.0.0-beta.33
### Patch Changes
- Updated dependencies [19898a488]
- Updated dependencies [6811eab1a]
- Updated dependencies [022392c12]
- blitz@2.0.0-beta.33
- @blitzjs/generator@2.0.0-beta.33
## 2.0.0-beta.32
### Patch Changes
- Updated dependencies [47c6b62dc]
- Updated dependencies [82649f341]
- @blitzjs/generator@2.0.0-beta.32
- blitz@2.0.0-beta.32
## 2.0.0-beta.31
### Patch Changes
- Updated dependencies [90f1741da]
- Updated dependencies [df3265b85]
- blitz@2.0.0-beta.31
- @blitzjs/generator@2.0.0-beta.31
## 2.0.0-beta.30
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/codemod",
"version": "2.0.0-beta.30",
"version": "2.0.0-beta.34",
"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.0-beta.30",
"@blitzjs/generator": "2.0.0-beta.34",
"arg": "5.0.1",
"blitz": "2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"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": "workspace:*",
"@blitzjs/config": "2.0.0-beta.34",
"@types/jscodeshift": "0.11.2",
"@types/node": "18.11.9",
"ast-types": "0.14.2",

View File

@@ -1,5 +1,13 @@
# @blitzjs/config
## 2.0.0-beta.34
## 2.0.0-beta.33
## 2.0.0-beta.32
## 2.0.0-beta.31
## 2.0.0-beta.30
## 2.0.0-beta.29

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/config",
"private": true,
"version": "2.0.0-beta.30",
"version": "2.0.0-beta.34",
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "5.42.1",

View File

@@ -1,5 +1,26 @@
# @blitzjs/generator
## 2.0.0-beta.34
## 2.0.0-beta.33
### Patch Changes
- 022392c12: - Updates `ts-log` peer dependency to `4.9.0`
- Removes `javascript` from `blitz new` menu
- Hot Fix the `Update Schema` when using blitz generator
## 2.0.0-beta.32
### Patch Changes
- 47c6b62dc: Update examples of generate all in docs to include one column in model.
- 82649f341: Upgrade tslog to `4.9.0`.
This due a [tslog issue](https://github.com/fullstack-build/tslog/issues/227) that causes tslog to crash when attempting to log an error whose constructor expects more than one argument.
## 2.0.0-beta.31
## 2.0.0-beta.30
## 2.0.0-beta.29

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/generator",
"version": "2.0.0-beta.30",
"version": "2.0.0-beta.34",
"homepage": "https://blitzjs.com/",
"repository": {
"type": "git",
@@ -48,13 +48,13 @@
"prettier": "^2.7.1",
"recast": "0.20.5",
"supports-color": "8.1.1",
"tslog": "4.8.2",
"tslog": "4.9.0",
"username": "5.1.0",
"vinyl": "2.2.1",
"zod": "3.20.2"
},
"devDependencies": {
"@blitzjs/config": "2.0.0-beta.30",
"@blitzjs/config": "2.0.0-beta.34",
"@juanm04/cpx": "2.0.1",
"@types/babel__core": "7.1.19",
"@types/diff": "5.0.2",

View File

@@ -36,6 +36,7 @@
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",
"@next/env": "13.4.19",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",

View File

@@ -95,7 +95,7 @@ const Home: BlitzPage = () => {
<div className={styles.code}>
<span>1</span>
<pre>
<code>blitz generate all project</code>
<code>blitz generate all project name:string</code>
</pre>
</div>

View File

@@ -12,16 +12,14 @@ if (process.env.parentModel) {
}
if (process.env.parentModel) {
export const Update__ModelName__Schema = z.object({
export const Update__ModelName__Schema = Create__ModelName__Schema.merge(z.object({
id: z.__modelIdZodType__(),
__parentModelId__: z.__parentModelIdZodType__(),
// template: __fieldName__: z.__zodType__(),
})
}))
} else {
export const Update__ModelName__Schema = z.object({
export const Update__ModelName__Schema = Create__ModelName__Schema.merge(z.object({
id: z.__modelIdZodType__(),
// template: __fieldName__: z.__zodType__(),
})
}))
}
export const Delete__ModelName__Schema = z.object({

View File

@@ -25,7 +25,7 @@
"@typescript-eslint/parser": "5.9.1"
},
"devDependencies": {
"@blitzjs/config": "2.0.0-beta.30",
"@blitzjs/config": "2.0.0-beta.34",
"@types/react": "18.0.25",
"@types/react-dom": "17.0.14",
"react": "18.2.0",

932
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.0-beta.30",
"blitz": "2.0.0-beta.34",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

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

View File

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

View File

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

View File

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

View File

@@ -24,6 +24,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.30"
"blitz": "2.0.0-beta.34"
}
}

View File

@@ -24,6 +24,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.30"
"blitz": "2.0.0-beta.34"
}
}

View File

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

View File

@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.30",
"blitz": "2.0.0-beta.34",
"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.0-beta.30",
"blitz": "2.0.0-beta.34",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

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

View File

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

View File

@@ -23,6 +23,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.30"
"blitz": "2.0.0-beta.34"
}
}

View File

@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.30"
"blitz": "2.0.0-beta.34"
}
}

View File

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

View File

@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "2.0.0-beta.30"
"blitz": "2.0.0-beta.34"
}
}

Some files were not shown because too many files have changed in this diff Show More