Compare commits
22 Commits
@blitzjs/a
...
@blitzjs/n
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
000bc2334c | ||
|
|
0936cb38a6 | ||
|
|
8ada2c26f7 | ||
|
|
eb9715688c | ||
|
|
ebfb562bfa | ||
|
|
a3b5fdd03e | ||
|
|
3f9fe8f043 | ||
|
|
db7233db6a | ||
|
|
1a6e953976 | ||
|
|
58ae66fdb5 | ||
|
|
6eb5bc8987 | ||
|
|
0f4926fd1f | ||
|
|
dff9fd042a | ||
|
|
2cc888eff8 | ||
|
|
8a0a97bebb | ||
|
|
176c7b8b57 | ||
|
|
b307931f2e | ||
|
|
14375e25c4 | ||
|
|
8b755574b5 | ||
|
|
4656e6ecd6 | ||
|
|
1e0ec7a972 | ||
|
|
f88702c1c1 |
@@ -3703,6 +3703,15 @@
|
||||
"maintenance",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "corydeppen",
|
||||
"name": "Cory Deppen",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/313264?v=4",
|
||||
"profile": "https://github.com/corydeppen",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
|
||||
13
.changeset/afraid-dancers-juggle.md
Normal file
13
.changeset/afraid-dancers-juggle.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/auth": patch
|
||||
"@blitzjs/next": patch
|
||||
"@blitzjs/rpc": patch
|
||||
"@blitzjs/codemod": patch
|
||||
"@blitzjs/config": patch
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Bump react, react-dom, @types/react and next versions
|
||||
|
||||
This fixes a console warning: `Warning: Received `true` for a non-boolean attribute `global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.
|
||||
5
.changeset/brown-avocados-wink.md
Normal file
5
.changeset/brown-avocados-wink.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Print model added or updated in schema.prisma after running model generator
|
||||
5
.changeset/chilled-carrots-own.md
Normal file
5
.changeset/chilled-carrots-own.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Add `BlitzPage` type to Home pages in app templates
|
||||
5
.changeset/few-dogs-fetch.md
Normal file
5
.changeset/few-dogs-fetch.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Use correct path for log utilities import
|
||||
5
.changeset/forty-timers-rhyme.md
Normal file
5
.changeset/forty-timers-rhyme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/codemod": patch
|
||||
---
|
||||
|
||||
Change ES6 import for `withBlitz` during the codemod to the require syntax.
|
||||
5
.changeset/gorgeous-birds-warn.md
Normal file
5
.changeset/gorgeous-birds-warn.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Add `BlitzPage` types to auth pages in new app template
|
||||
5
.changeset/lazy-maps-sort.md
Normal file
5
.changeset/lazy-maps-sort.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Patch Next.js Suspense issue in all node environments. Previously we only patched it in the `development` environment, but now we make sure it gets patched in the `production` env (with the `blitz build` command) as well.
|
||||
5
.changeset/long-lobsters-drop.md
Normal file
5
.changeset/long-lobsters-drop.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Include ResetPasswordPage in new app template
|
||||
5
.changeset/lovely-berries-sell.md
Normal file
5
.changeset/lovely-berries-sell.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/codemod": patch
|
||||
---
|
||||
|
||||
Remove trailing comma when removing BlitzConfig from next.config.js & Fix codemod so if route (eg. `app/auth/pages`) convert to (eg. `pages/`) instead of (eg. `pages/auth`)
|
||||
10
.changeset/poor-walls-relax.md
Normal file
10
.changeset/poor-walls-relax.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
"@blitzjs/codemod": patch
|
||||
"@blitzjs/generator": patch
|
||||
"@blitzjs/auth": patch
|
||||
"@blitzjs/next": patch
|
||||
"@blitzjs/rpc": patch
|
||||
"@blitzjs/config": patch
|
||||
---
|
||||
|
||||
Set current Blitz tag to latest
|
||||
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"mode": "pre",
|
||||
"tag": "alpha",
|
||||
"tag": "beta",
|
||||
"initialVersions": {
|
||||
"web": "0.0.0",
|
||||
"test-auth": "0.0.0",
|
||||
"test-rpc": "0.0.0",
|
||||
"test-utils": "0.0.0",
|
||||
"blitz": "2.0.0-alpha.0",
|
||||
"@blitzjs/auth": "2.0.0-alpha.0",
|
||||
"@blitzjs/next": "2.0.0-alpha.0",
|
||||
"@blitzjs/rpc": "2.0.0-alpha.0",
|
||||
"blitz": "2.0.0-beta.0",
|
||||
"@blitzjs/auth": "2.0.0-beta.0",
|
||||
"@blitzjs/next": "2.0.0-beta.0",
|
||||
"@blitzjs/rpc": "2.0.0-beta.0",
|
||||
"@blitzjs/config": "0.0.0",
|
||||
"@blitzjs/generator": "2.0.0-alpha.0",
|
||||
"@blitzjs/codemod": "2.0.0-alpha.0",
|
||||
"@blitzjs/generator": "2.0.0-beta.0",
|
||||
"@blitzjs/codemod": "2.0.0-beta.0",
|
||||
"template": "0.0.0",
|
||||
"toolkit-app": "1.0.0",
|
||||
"test-qm": "0.0.0",
|
||||
@@ -22,15 +22,18 @@
|
||||
"test-react-query-utils": "0.0.0"
|
||||
},
|
||||
"changesets": [
|
||||
"afraid-dancers-juggle",
|
||||
"big-phones-bow",
|
||||
"blue-pigs-tan",
|
||||
"breezy-cameras-double",
|
||||
"breezy-moose-behave",
|
||||
"bright-mangos-run",
|
||||
"brown-avocados-wink",
|
||||
"calm-carpets-deny",
|
||||
"calm-horses-tie",
|
||||
"calm-nails-wait",
|
||||
"calm-tomatoes-drive",
|
||||
"chilled-carrots-own",
|
||||
"clean-hats-pump",
|
||||
"clean-walls-wink",
|
||||
"clever-radios-lie",
|
||||
@@ -48,7 +51,9 @@
|
||||
"fair-wombats-sneeze",
|
||||
"famous-kings-explain",
|
||||
"fast-trainers-kneel",
|
||||
"few-dogs-fetch",
|
||||
"flat-bees-approve",
|
||||
"forty-timers-rhyme",
|
||||
"four-brooms-juggle",
|
||||
"four-meals-fry",
|
||||
"four-sheep-judge",
|
||||
@@ -57,6 +62,7 @@
|
||||
"gentle-dogs-reply",
|
||||
"good-apes-drum",
|
||||
"good-insects-wink",
|
||||
"gorgeous-birds-warn",
|
||||
"gorgeous-buses-scream",
|
||||
"gorgeous-games-obey",
|
||||
"great-candles-stare",
|
||||
@@ -72,10 +78,13 @@
|
||||
"hungry-baboons-swim",
|
||||
"kind-walls-suffer",
|
||||
"late-steaks-give",
|
||||
"lazy-maps-sort",
|
||||
"lemon-games-press",
|
||||
"lemon-seas-push",
|
||||
"light-donkeys-double",
|
||||
"long-bees-hope",
|
||||
"long-lobsters-drop",
|
||||
"lovely-berries-sell",
|
||||
"lovely-colts-share",
|
||||
"lucky-cows-try",
|
||||
"mean-gorillas-reply",
|
||||
@@ -103,8 +112,10 @@
|
||||
"poor-peas-lick",
|
||||
"poor-penguins-look",
|
||||
"poor-shrimps-think",
|
||||
"poor-walls-relax",
|
||||
"popular-teachers-pay",
|
||||
"pretty-games-march",
|
||||
"purple-donkeys-smash",
|
||||
"purple-singers-greet",
|
||||
"quick-cycles-confess",
|
||||
"quiet-feet-travel",
|
||||
@@ -158,6 +169,7 @@
|
||||
"two-eyes-knock",
|
||||
"two-kiwis-help",
|
||||
"two-tigers-type",
|
||||
"two-turtles-poke",
|
||||
"unlucky-avocados-fix",
|
||||
"unlucky-papayas-sleep",
|
||||
"violet-bags-leave",
|
||||
@@ -165,6 +177,7 @@
|
||||
"weak-suns-shave",
|
||||
"wicked-ghosts-cough",
|
||||
"wicked-rings-walk",
|
||||
"wise-eels-visit",
|
||||
"wise-frogs-give",
|
||||
"wise-rabbits-complain"
|
||||
]
|
||||
|
||||
5
.changeset/purple-donkeys-smash.md
Normal file
5
.changeset/purple-donkeys-smash.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Exit CLI process after `blitz new` command is finished
|
||||
5
.changeset/two-turtles-poke.md
Normal file
5
.changeset/two-turtles-poke.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/codemod": patch
|
||||
---
|
||||
|
||||
Add `Script` as a default import from next.js during the codemod.
|
||||
11
.changeset/wise-eels-visit.md
Normal file
11
.changeset/wise-eels-visit.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/auth": patch
|
||||
"@blitzjs/next": patch
|
||||
"@blitzjs/rpc": patch
|
||||
"@blitzjs/codemod": patch
|
||||
"@blitzjs/config": patch
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Beta release
|
||||
@@ -1,6 +1,6 @@
|
||||
# Contributing
|
||||
|
||||
[Read the Contributing Guide at Blitzjs.com](https://alpha.blitzjs.com/docs/contributing)
|
||||
[Read the Contributing Guide at Blitzjs.com](https://blitzjs.com/docs/contributing)
|
||||
|
||||
## To run tests
|
||||
|
||||
|
||||
36
README.md
36
README.md
@@ -6,9 +6,9 @@
|
||||
<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-391-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-393-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/canary/LICENSE">
|
||||
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/main/LICENSE">
|
||||
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
|
||||
</a>
|
||||
<a aria-label="NPM version" href="https://www.npmjs.com/package/blitz">
|
||||
@@ -66,16 +66,16 @@ Your financial contributions help ensure Blitz continues to be developed and mai
|
||||
<table>
|
||||
<tr>
|
||||
<td><a aria-label="Andreas Asprou" href="https://andreas.fyi">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/andreas.jpg" width="40px"/>
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/andreas.jpg" width="40px"/>
|
||||
</a></td>
|
||||
<td><a aria-label="Digas" href="https://digsas.com">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/digsas.svg" width="40px"/>
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/digsas.svg" width="40px"/>
|
||||
</a></td>
|
||||
<td><a aria-label="userTrack" href="https://www.usertrack.net/?ref=blitzjs">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/usertrack.png" width="40px"/>
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/usertrack.png" width="40px"/>
|
||||
</a></td>
|
||||
<td><a aria-label="MeetKai" href="https://meetkai.com/?ref=blitzjs">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/meetkai.png" width="40px"/>
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/meetkai.png" width="40px"/>
|
||||
</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -85,14 +85,11 @@ Your financial contributions help ensure Blitz continues to be developed and mai
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><a aria-label="Render.com" href="https://render.com?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2020">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/render-logo-color2.png" width="200px">
|
||||
</a></td>
|
||||
<td><a aria-label="RIT" href="https://rit-inc.co.jp/?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2021">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/rit_logo.png" width="200px">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/rit_logo.png" width="200px">
|
||||
</a></td>
|
||||
<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/canary/assets/boostry.svg" width="200px">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/boostry.svg" width="200px">
|
||||
</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -105,7 +102,7 @@ Your financial contributions help ensure Blitz continues to be developed and mai
|
||||
<tr>
|
||||
<td>
|
||||
<a aria-label="Fauna" href="https://dashboard.fauna.com/accounts/register?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2020">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/Fauna_Logo_Blue.png" width="300px">
|
||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/Fauna_Logo_Blue.png" width="300px">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -119,9 +116,13 @@ Your financial contributions help ensure Blitz continues to be developed and mai
|
||||
|
||||
### 💎 Diamond Sponsors
|
||||
|
||||
<a aria-label="Your Company" href="#">
|
||||
<img alt="" src="https://dummyimage.com/1000x330/efe8ff/000000.png&text=Your+Logo+Here" width="500px">
|
||||
</a>
|
||||
<table>
|
||||
<tr>
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
@@ -712,7 +713,10 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
|
||||
<td align="center"><a href="oltdaniel.eu"><img src="https://avatars.githubusercontent.com/u/53529846?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniel Oltmanns</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=oltdaniel" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=oltdaniel" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/edrickleong"><img src="https://avatars.githubusercontent.com/u/10529706?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Edrick Leong</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=edrickleong" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=edrickleong" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=edrickleong" title="Tests">⚠️</a></td>
|
||||
<td align="center"><a href="https://github.com/siddhsuresh"><img src="https://avatars.githubusercontent.com/u/83594610?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Siddharth Suresh</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://jins.dev"><img src="https://avatars.githubusercontent.com/u/39466936?v=4" width="100px;" alt=""/><br /><sub><b>JH.Lee</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Tests">⚠️</a> <a href="#maintenance-orionmiz" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="http://jins.dev"><img src="https://avatars.githubusercontent.com/u/39466936?v=4?s=100" width="100px;" alt=""/><br /><sub><b>JH.Lee</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Tests">⚠️</a> <a href="#maintenance-orionmiz" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/corydeppen"><img src="https://avatars.githubusercontent.com/u/313264?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cory Deppen</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=corydeppen" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ type ResetPasswordMailer = {
|
||||
export function forgotPasswordMailer({ to, token }: ResetPasswordMailer) {
|
||||
// In production, set APP_ORIGIN to your production server origin
|
||||
const origin = process.env.APP_ORIGIN || process.env.BLITZ_DEV_SERVER_ORIGIN
|
||||
const resetUrl = `${origin}/reset-password?token=${token}`
|
||||
const resetUrl = `${origin}/auth/reset-password?token=${token}`
|
||||
|
||||
const msg = {
|
||||
from: "TODO@example.com",
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
"@blitzjs/rpc": "workspace:*",
|
||||
"@hookform/resolvers": "2.8.8",
|
||||
"@prisma/client": "4.0.0",
|
||||
"blitz": "workspace:2.0.0-alpha.69",
|
||||
"next": "12.2.0",
|
||||
"blitz": "workspace:2.0.0-beta.2",
|
||||
"next": "12.2.5",
|
||||
"prisma": "4.0.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-hook-form": "7.29.0",
|
||||
"ts-node": "10.7.0",
|
||||
"zod": "3.17.3"
|
||||
@@ -45,7 +45,7 @@
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "17.0.16",
|
||||
"@types/preview-email": "2.0.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@typescript-eslint/eslint-plugin": "5.9.1",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-next": "12.2.0",
|
||||
|
||||
@@ -4,8 +4,9 @@ import { Form, FORM_ERROR } from "app/core/components/Form"
|
||||
import { ForgotPassword } from "app/auth/validations"
|
||||
import forgotPassword from "app/auth/mutations/forgotPassword"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import { BlitzPage } from "@blitzjs/next"
|
||||
|
||||
const ForgotPasswordPage = () => {
|
||||
const ForgotPasswordPage: BlitzPage = () => {
|
||||
const [forgotPasswordMutation, { isSuccess }] = useMutation(forgotPassword)
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { LoginForm } from "app/auth/components/LoginForm"
|
||||
import { useRouter } from "next/router"
|
||||
import { BlitzPage } from "@blitzjs/next"
|
||||
|
||||
const LoginPage = () => {
|
||||
const LoginPage: BlitzPage = () => {
|
||||
const router = useRouter()
|
||||
|
||||
return (
|
||||
|
||||
66
apps/toolkit-app/pages/auth/reset-password.tsx
Normal file
66
apps/toolkit-app/pages/auth/reset-password.tsx
Normal file
@@ -0,0 +1,66 @@
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { LabeledTextField } from "app/core/components/LabeledTextField"
|
||||
import { Form, FORM_ERROR } from "app/core/components/Form"
|
||||
import { ResetPassword } from "app/auth/validations"
|
||||
import resetPassword from "app/auth/mutations/resetPassword"
|
||||
import { BlitzPage, Routes } from "@blitzjs/next"
|
||||
import { useRouter } from "next/router"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import Link from "next/link"
|
||||
|
||||
const ResetPasswordPage: BlitzPage = () => {
|
||||
const router = useRouter()
|
||||
const [resetPasswordMutation, { isSuccess }] = useMutation(resetPassword)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Set a New Password</h1>
|
||||
|
||||
{isSuccess ? (
|
||||
<div>
|
||||
<h2>Password Reset Successfully</h2>
|
||||
<p>
|
||||
Go to the <Link href={Routes.Home()}>homepage</Link>
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<Form
|
||||
submitText="Reset Password"
|
||||
schema={ResetPassword}
|
||||
initialValues={{
|
||||
password: "",
|
||||
passwordConfirmation: "",
|
||||
token: router.query.token as string,
|
||||
}}
|
||||
onSubmit={async (values) => {
|
||||
try {
|
||||
await resetPasswordMutation(values)
|
||||
} catch (error: any) {
|
||||
if (error.name === "ResetPasswordError") {
|
||||
return {
|
||||
[FORM_ERROR]: error.message,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
[FORM_ERROR]: "Sorry, we had an unexpected error. Please try again.",
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
<LabeledTextField name="password" label="New Password" type="password" />
|
||||
<LabeledTextField
|
||||
name="passwordConfirmation"
|
||||
label="Confirm New Password"
|
||||
type="password"
|
||||
/>
|
||||
</Form>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
ResetPasswordPage.redirectAuthenticatedTo = "/"
|
||||
ResetPasswordPage.getLayout = (page) => <Layout title="Reset Your Password">{page}</Layout>
|
||||
|
||||
export default ResetPasswordPage
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useRouter } from "next/router"
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { SignupForm } from "app/auth/components/SignupForm"
|
||||
import { Routes } from "@blitzjs/next"
|
||||
import { BlitzPage, Routes } from "@blitzjs/next"
|
||||
|
||||
const SignupPage = () => {
|
||||
const SignupPage: BlitzPage = () => {
|
||||
const router = useRouter()
|
||||
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useCurrentUser } from "app/core/hooks/useCurrentUser"
|
||||
import logout from "app/auth/mutations/logout"
|
||||
import logo from "public/logo.png"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import { Routes } from "@blitzjs/next"
|
||||
import { Routes, BlitzPage } from "@blitzjs/next"
|
||||
|
||||
/*
|
||||
* This file is just for a pleasant getting started page for your new app.
|
||||
@@ -53,7 +53,7 @@ const UserInfo = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const Home = () => {
|
||||
const Home: BlitzPage = () => {
|
||||
return (
|
||||
<Layout title="Home">
|
||||
<div className="container">
|
||||
|
||||
@@ -25,17 +25,17 @@
|
||||
"@types/passport-twitter": "1.0.37",
|
||||
"blitz": "workspace:*",
|
||||
"jest": "27.5.1",
|
||||
"next": "12.2.0",
|
||||
"next": "12.2.5",
|
||||
"passport-mock-strategy": "2.0.0",
|
||||
"passport-twitter": "1.0.4",
|
||||
"prisma": "4.0.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"ts-node": "10.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "12.0.8",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"eslint": "7.32.0",
|
||||
"typescript": "^4.5.3"
|
||||
}
|
||||
|
||||
BIN
assets/flightcontrol.png
Normal file
BIN
assets/flightcontrol.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
@@ -19,17 +19,17 @@
|
||||
"@prisma/client": "4.0.0",
|
||||
"blitz": "workspace:*",
|
||||
"lowdb": "3.0.0",
|
||||
"next": "12.2.0",
|
||||
"next": "12.2.5",
|
||||
"prisma": "4.0.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0"
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "12.0.8",
|
||||
"@types/express": "4.17.13",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/node-fetch": "2.6.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"b64-lite": "1.4.0",
|
||||
"eslint": "7.32.0",
|
||||
"fs-extra": "10.0.1",
|
||||
|
||||
@@ -15,16 +15,16 @@
|
||||
"@blitzjs/next": "workspace:*",
|
||||
"@blitzjs/rpc": "workspace:*",
|
||||
"blitz": "workspace:*",
|
||||
"next": "12.2.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0"
|
||||
"next": "12.2.5",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "12.0.8",
|
||||
"@types/express": "4.17.13",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/node-fetch": "2.6.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"eslint": "7.32.0",
|
||||
"fs-extra": "10.0.1",
|
||||
"get-port": "6.1.2",
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
"@prisma/client": "4.0.0",
|
||||
"blitz": "workspace:*",
|
||||
"lowdb": "3.0.0",
|
||||
"next": "12.2.0",
|
||||
"next": "12.2.5",
|
||||
"prisma": "4.0.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0"
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:*",
|
||||
@@ -30,7 +30,7 @@
|
||||
"@types/express": "4.17.13",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/node-fetch": "2.6.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"b64-lite": "1.4.0",
|
||||
"eslint": "7.32.0",
|
||||
"fs-extra": "10.0.1",
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
"@prisma/client": "4.0.0",
|
||||
"@tanstack/react-query": "4.0.10",
|
||||
"blitz": "workspace:*",
|
||||
"next": "12.2.0",
|
||||
"next": "12.2.5",
|
||||
"prisma": "4.0.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0"
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/react": "13.0.0",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@vitejs/plugin-react": "1.3.0",
|
||||
"delay": "5.0.0",
|
||||
"eslint": "7.32.0",
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
"@prisma/client": "4.0.0",
|
||||
"blitz": "workspace:*",
|
||||
"lowdb": "3.0.0",
|
||||
"next": "12.2.0",
|
||||
"next": "12.2.5",
|
||||
"prisma": "4.0.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0"
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:*",
|
||||
@@ -33,7 +33,7 @@
|
||||
"@types/express": "4.17.13",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/node-fetch": "2.6.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"b64-lite": "1.4.0",
|
||||
"eslint": "7.32.0",
|
||||
"fs-extra": "10.0.1",
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
"@blitzjs/next": "workspace:*",
|
||||
"@blitzjs/rpc": "workspace:*",
|
||||
"blitz": "workspace:*",
|
||||
"next": "12.2.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0"
|
||||
"next": "12.2.5",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "4.17.13",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/node-fetch": "2.6.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"b64-lite": "1.4.0",
|
||||
"eslint": "7.32.0",
|
||||
"fs-extra": "10.0.1",
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
"@prisma/client": "4.0.0",
|
||||
"blitz": "workspace:*",
|
||||
"lowdb": "3.0.0",
|
||||
"next": "12.2.0",
|
||||
"next": "12.2.5",
|
||||
"prisma": "4.0.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0"
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:*",
|
||||
@@ -33,7 +33,7 @@
|
||||
"@types/express": "4.17.13",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/node-fetch": "2.6.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"b64-lite": "1.4.0",
|
||||
"eslint": "7.32.0",
|
||||
"fs-extra": "10.0.1",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"@types/express": "4.17.13",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
"@types/node-fetch": "2.6.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@types/rimraf": "3.0.2",
|
||||
"@types/selenium-webdriver": "4.0.18",
|
||||
"chromedriver": "100.0.0",
|
||||
@@ -22,8 +22,8 @@
|
||||
"node-fetch": "3.2.3",
|
||||
"pkg-dir": "5.0.0",
|
||||
"playwright-chromium": "1.14.1",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"resolve-cwd": "3.0.0",
|
||||
"resolve-from": "5.0.0",
|
||||
"rimraf": "3.0.2",
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"husky": "7.0.4",
|
||||
"jsdom": "^19.0.0",
|
||||
"lint-staged": "12.1.7",
|
||||
"next": "12.2.0",
|
||||
"next": "12.2.5",
|
||||
"only-allow": "1.1.0",
|
||||
"prettier": "^2.5.1",
|
||||
"prettier-plugin-prisma": "3.8.0",
|
||||
|
||||
@@ -1,5 +1,45 @@
|
||||
# @blitzjs/auth
|
||||
|
||||
## 2.0.0-beta.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- db7233db: Bump react, react-dom, @types/react and next versions
|
||||
|
||||
This fixes a console warning: `Warning: Received`true`for a non-boolean attribute`global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.
|
||||
|
||||
- Updated dependencies [db7233db]
|
||||
- Updated dependencies [0936cb38]
|
||||
- Updated dependencies [3f9fe8f0]
|
||||
- blitz@2.0.0-beta.2
|
||||
|
||||
## 2.0.0-beta.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0f4926fd: Set current Blitz tag to latest
|
||||
- blitz@2.0.0-beta.1
|
||||
|
||||
## 2.0.0-beta.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2cc888ef: Beta release
|
||||
- Updated dependencies [2cc888ef]
|
||||
- blitz@2.0.0-beta.72
|
||||
|
||||
## 2.0.0-alpha.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- blitz@2.0.0-alpha.71
|
||||
|
||||
## 2.0.0-alpha.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- blitz@2.0.0-alpha.70
|
||||
|
||||
## 2.0.0-alpha.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/auth",
|
||||
"version": "2.0.0-alpha.69",
|
||||
"version": "2.0.0-beta.2",
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts",
|
||||
@@ -26,7 +26,7 @@
|
||||
"@types/secure-password": "3.1.1",
|
||||
"b64-lite": "1.4.0",
|
||||
"bad-behavior": "1.0.1",
|
||||
"blitz": "2.0.0-alpha.69",
|
||||
"blitz": "2.0.0-beta.2",
|
||||
"cookie": "0.4.1",
|
||||
"cookie-session": "2.0.0",
|
||||
"debug": "4.3.3",
|
||||
@@ -40,16 +40,16 @@
|
||||
"url": "0.11.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:2.0.0-alpha.69",
|
||||
"@blitzjs/config": "workspace:2.0.0-beta.2",
|
||||
"@testing-library/react": "13.0.0",
|
||||
"@testing-library/react-hooks": "7.0.2",
|
||||
"@types/cookie": "0.4.1",
|
||||
"@types/debug": "4.1.7",
|
||||
"@types/jsonwebtoken": "8.5.8",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@types/react-dom": "17.0.14",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"typescript": "^4.5.3",
|
||||
"unbuild": "0.7.6",
|
||||
"watch": "1.0.2"
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
# @blitzjs/next
|
||||
|
||||
## 2.0.0-beta.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- db7233db: Bump react, react-dom, @types/react and next versions
|
||||
|
||||
This fixes a console warning: `Warning: Received`true`for a non-boolean attribute`global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.
|
||||
|
||||
- Updated dependencies [db7233db]
|
||||
- @blitzjs/rpc@2.0.0-beta.2
|
||||
|
||||
## 2.0.0-beta.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0f4926fd: Set current Blitz tag to latest
|
||||
- Updated dependencies [0f4926fd]
|
||||
- @blitzjs/rpc@2.0.0-beta.1
|
||||
|
||||
## 2.0.0-beta.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2cc888ef: Beta release
|
||||
- Updated dependencies [2cc888ef]
|
||||
- @blitzjs/rpc@2.0.0-beta.72
|
||||
|
||||
## 2.0.0-alpha.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @blitzjs/rpc@2.0.0-alpha.71
|
||||
|
||||
## 2.0.0-alpha.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @blitzjs/rpc@2.0.0-alpha.70
|
||||
|
||||
## 2.0.0-alpha.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/next",
|
||||
"version": "2.0.0-alpha.69",
|
||||
"version": "2.0.0-beta.2",
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"dev": "pnpm predev && pnpm watch unbuild src --wait=0.2",
|
||||
@@ -24,7 +24,7 @@
|
||||
"eslint.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@blitzjs/rpc": "2.0.0-alpha.69",
|
||||
"@blitzjs/rpc": "2.0.0-beta.2",
|
||||
"@tanstack/react-query": "4.0.10",
|
||||
"@types/hoist-non-react-statics": "3.3.1",
|
||||
"debug": "4.3.3",
|
||||
@@ -34,22 +34,22 @@
|
||||
"supports-color": "8.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:2.0.0-alpha.69",
|
||||
"@blitzjs/config": "workspace:2.0.0-beta.2",
|
||||
"@testing-library/dom": "8.13.0",
|
||||
"@testing-library/jest-dom": "5.16.3",
|
||||
"@testing-library/react": "13.0.0",
|
||||
"@testing-library/react-hooks": "7.0.2",
|
||||
"@testing-library/user-event": "13.5.0",
|
||||
"@types/node": "17.0.16",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@types/react-dom": "17.0.14",
|
||||
"@types/testing-library__react-hooks": "4.0.0",
|
||||
"blitz": "2.0.0-alpha.69",
|
||||
"blitz": "2.0.0-beta.2",
|
||||
"cross-spawn": "7.0.3",
|
||||
"find-up": "4.1.0",
|
||||
"next": "12.2.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"next": "12.2.5",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"resolve-from": "5.0.0",
|
||||
"ts-jest": "27.1.4",
|
||||
"typescript": "^4.5.3",
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
# @blitzjs/rpc
|
||||
|
||||
## 2.0.0-beta.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- db7233db: Bump react, react-dom, @types/react and next versions
|
||||
|
||||
This fixes a console warning: `Warning: Received`true`for a non-boolean attribute`global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.
|
||||
|
||||
- Updated dependencies [db7233db]
|
||||
- @blitzjs/auth@2.0.0-beta.2
|
||||
|
||||
## 2.0.0-beta.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0f4926fd: Set current Blitz tag to latest
|
||||
- Updated dependencies [0f4926fd]
|
||||
- @blitzjs/auth@2.0.0-beta.1
|
||||
|
||||
## 2.0.0-beta.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2cc888ef: Beta release
|
||||
- Updated dependencies [2cc888ef]
|
||||
- @blitzjs/auth@2.0.0-beta.72
|
||||
|
||||
## 2.0.0-alpha.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @blitzjs/auth@2.0.0-alpha.71
|
||||
|
||||
## 2.0.0-alpha.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @blitzjs/auth@2.0.0-alpha.70
|
||||
|
||||
## 2.0.0-alpha.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/rpc",
|
||||
"version": "2.0.0-alpha.69",
|
||||
"version": "2.0.0-beta.2",
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts && wait-on -d 250 ../blitz-auth/dist/index-browser.d.ts",
|
||||
@@ -20,7 +20,7 @@
|
||||
"dist/**"
|
||||
],
|
||||
"dependencies": {
|
||||
"@blitzjs/auth": "2.0.0-alpha.69",
|
||||
"@blitzjs/auth": "2.0.0-beta.2",
|
||||
"@tanstack/react-query": "4.0.10",
|
||||
"b64-lite": "1.4.0",
|
||||
"bad-behavior": "1.0.1",
|
||||
@@ -30,14 +30,14 @@
|
||||
"supports-color": "8.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:2.0.0-alpha.69",
|
||||
"@blitzjs/config": "workspace:2.0.0-beta.2",
|
||||
"@types/debug": "4.1.7",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@types/react-dom": "17.0.14",
|
||||
"blitz": "2.0.0-alpha.69",
|
||||
"next": "12.2.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"blitz": "2.0.0-beta.2",
|
||||
"next": "12.2.5",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"typescript": "^4.5.3",
|
||||
"unbuild": "0.7.6",
|
||||
"watch": "1.0.2",
|
||||
|
||||
@@ -1,5 +1,50 @@
|
||||
# blitz
|
||||
|
||||
## 2.0.0-beta.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- db7233db: Bump react, react-dom, @types/react and next versions
|
||||
|
||||
This fixes a console warning: `Warning: Received`true`for a non-boolean attribute`global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.
|
||||
|
||||
- 0936cb38: Patch Next.js Suspense issue in all node environments. Previously we only patched it in the `development` environment, but now we make sure it gets patched in the `production` env (with the `blitz build` command) as well.
|
||||
- 3f9fe8f0: Exit CLI process after `blitz new` command is finished
|
||||
- Updated dependencies [db7233db]
|
||||
- Updated dependencies [eb971568]
|
||||
- Updated dependencies [8ada2c26]
|
||||
- @blitzjs/generator@2.0.0-beta.2
|
||||
|
||||
## 2.0.0-beta.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0f4926fd]
|
||||
- @blitzjs/generator@2.0.0-beta.1
|
||||
|
||||
## 2.0.0-beta.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2cc888ef: Beta release
|
||||
- Updated dependencies [2cc888ef]
|
||||
- @blitzjs/generator@2.0.0-beta.72
|
||||
|
||||
## 2.0.0-alpha.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [176c7b8b]
|
||||
- @blitzjs/generator@2.0.0-alpha.71
|
||||
|
||||
## 2.0.0-alpha.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [4656e6ec]
|
||||
- Updated dependencies [1e0ec7a9]
|
||||
- @blitzjs/generator@2.0.0-alpha.70
|
||||
|
||||
## 2.0.0-alpha.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "blitz",
|
||||
"version": "2.0.0-alpha.69",
|
||||
"version": "2.0.0-beta.2",
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"dev": "watch unbuild src --wait=0.2",
|
||||
@@ -23,7 +23,7 @@
|
||||
"blitz": "bin/blitz"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/generator": "2.0.0-alpha.69",
|
||||
"@blitzjs/generator": "2.0.0-beta.2",
|
||||
"arg": "5.0.1",
|
||||
"boxen": "7.0.0",
|
||||
"chalk": "^4.1.0",
|
||||
@@ -55,7 +55,7 @@
|
||||
"watchpack": "2.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "workspace:2.0.0-alpha.69",
|
||||
"@blitzjs/config": "workspace:2.0.0-beta.2",
|
||||
"@types/cookie": "0.4.1",
|
||||
"@types/cross-spawn": "6.0.2",
|
||||
"@types/debug": "4.1.7",
|
||||
@@ -67,12 +67,12 @@
|
||||
"@types/node-fetch": "2.6.1",
|
||||
"@types/npm-which": "3.0.1",
|
||||
"@types/prompts": "2.0.14",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@types/react-dom": "17.0.14",
|
||||
"@types/test-listen": "1.1.0",
|
||||
"@types/watchpack": "1.1.1",
|
||||
"express": "4.17.3",
|
||||
"react": "18.0.0",
|
||||
"react": "18.2.0",
|
||||
"test-listen": "1.1.0",
|
||||
"typescript": "^4.5.3",
|
||||
"unbuild": "0.7.6",
|
||||
|
||||
@@ -300,8 +300,10 @@ const newApp: CliCommand = async (argv) => {
|
||||
console.log(chalk.yellow(` ${index + 1}. ${step}`))
|
||||
})
|
||||
console.log("") // new line
|
||||
process.exit(0)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export const codegenTasks = async () => {
|
||||
.toString()
|
||||
.replace(
|
||||
/ReactDOM\.hydrateRoot\(.*?\);/,
|
||||
`ReactDOM.hydrateRoot(domEl, reactEl, process.env.NODE_ENV === 'development' ? {onRecoverableError: (err) => err.toString().includes("could not finish this Suspense boundary") ? null : console.error(err)} : undefined);`,
|
||||
`ReactDOM.hydrateRoot(domEl, reactEl, {onRecoverableError: (err) => err.toString().includes("could not finish this Suspense boundary") ? null : console.error(err)});`,
|
||||
)
|
||||
await fs.writeFile(nextClientIndex, updatedFile)
|
||||
log.success("Next.js was successfully patched with a React Suspense fix")
|
||||
|
||||
@@ -104,7 +104,6 @@ export function compose(middleware: RequestMiddleware<any, any>[]) {
|
||||
}
|
||||
|
||||
try {
|
||||
console.log(`[${handler.name}] Starting handler...`)
|
||||
return Promise.resolve(handler(req, res, dispatch.bind(null, i + 1)))
|
||||
} catch (err) {
|
||||
return Promise.reject(err)
|
||||
|
||||
@@ -1,5 +1,59 @@
|
||||
# @blitzjs/codemod
|
||||
|
||||
## 2.0.0-beta.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- db7233db: Bump react, react-dom, @types/react and next versions
|
||||
|
||||
This fixes a console warning: `Warning: Received`true`for a non-boolean attribute`global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.
|
||||
|
||||
- a3b5fdd0: Change ES6 import for `withBlitz` during the codemod to the require syntax.
|
||||
- ebfb562b: Add `Script` as a default import from next.js during the codemod.
|
||||
- Updated dependencies [db7233db]
|
||||
- Updated dependencies [eb971568]
|
||||
- Updated dependencies [0936cb38]
|
||||
- Updated dependencies [8ada2c26]
|
||||
- Updated dependencies [3f9fe8f0]
|
||||
- blitz@2.0.0-beta.2
|
||||
- @blitzjs/generator@2.0.0-beta.2
|
||||
|
||||
## 2.0.0-beta.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0f4926fd: Set current Blitz tag to latest
|
||||
- Updated dependencies [0f4926fd]
|
||||
- @blitzjs/generator@2.0.0-beta.1
|
||||
- blitz@2.0.0-beta.1
|
||||
|
||||
## 2.0.0-beta.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2cc888ef: Beta release
|
||||
- Updated dependencies [2cc888ef]
|
||||
- blitz@2.0.0-beta.72
|
||||
- @blitzjs/generator@2.0.0-beta.72
|
||||
|
||||
## 2.0.0-alpha.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [176c7b8b]
|
||||
- @blitzjs/generator@2.0.0-alpha.71
|
||||
- blitz@2.0.0-alpha.71
|
||||
|
||||
## 2.0.0-alpha.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- f88702c1: Remove trailing comma when removing BlitzConfig from next.config.js & Fix codemod so if route (eg. `app/auth/pages`) convert to (eg. `pages/`) instead of (eg. `pages/auth`)
|
||||
- Updated dependencies [4656e6ec]
|
||||
- Updated dependencies [1e0ec7a9]
|
||||
- @blitzjs/generator@2.0.0-alpha.70
|
||||
- blitz@2.0.0-alpha.70
|
||||
|
||||
## 2.0.0-alpha.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/codemod",
|
||||
"version": "2.0.0-alpha.69",
|
||||
"version": "2.0.0-beta.2",
|
||||
"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-alpha.69",
|
||||
"@blitzjs/generator": "2.0.0-beta.2",
|
||||
"arg": "5.0.1",
|
||||
"blitz": "2.0.0-alpha.69",
|
||||
"blitz": "2.0.0-beta.2",
|
||||
"chalk": "^4.1.0",
|
||||
"cross-spawn": "7.0.3",
|
||||
"debug": "4.3.3",
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
} from "./utils"
|
||||
import {log} from "blitz"
|
||||
|
||||
const CURRENT_BLITZ_TAG = "alpha"
|
||||
const CURRENT_BLITZ_TAG = "latest"
|
||||
|
||||
class ExpectedError extends Error {
|
||||
constructor(message: string) {
|
||||
@@ -63,7 +63,7 @@ const upgradeLegacy = async () => {
|
||||
}
|
||||
|
||||
if (c.name === "imported") {
|
||||
j(c).remove()
|
||||
j(c.parentPath).remove()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -90,8 +90,14 @@ const upgradeLegacy = async () => {
|
||||
},
|
||||
})
|
||||
let createdConfig = config.get().value.right
|
||||
|
||||
addNamedImport(program, "withBlitz", "@blitzjs/next")
|
||||
let importWithBlitz = j.expressionStatement(
|
||||
j.assignmentExpression(
|
||||
"=",
|
||||
j.identifier("const { withBlitz }"),
|
||||
j.callExpression(j.identifier("require"), [j.identifier(`"@blitzjs/next"`)]),
|
||||
)
|
||||
)
|
||||
parsedProgram.value.program.body.unshift(importWithBlitz)
|
||||
config.remove()
|
||||
|
||||
let moduleExportStatement = j.expressionStatement(
|
||||
@@ -257,6 +263,7 @@ const upgradeLegacy = async () => {
|
||||
const nextLink = findImport(program, "next/link")
|
||||
const nextHead = findImport(program, "next/head")
|
||||
const dynamic = findImport(program, "next/dynamic")
|
||||
const nextScript = findImport(program, "next/script")
|
||||
|
||||
if (nextImage?.length) {
|
||||
nextImage.remove()
|
||||
@@ -269,6 +276,18 @@ const upgradeLegacy = async () => {
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
if (nextScript?.length) {
|
||||
nextScript.remove()
|
||||
program
|
||||
.get()
|
||||
.value.program.body.unshift(
|
||||
j.importDeclaration(
|
||||
[j.importDefaultSpecifier(j.identifier("Script"))],
|
||||
j.stringLiteral("next/script"),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
if (nextLink?.length) {
|
||||
nextLink.remove()
|
||||
@@ -625,7 +644,7 @@ const upgradeLegacy = async () => {
|
||||
}
|
||||
} else {
|
||||
arr.push({
|
||||
model: file,
|
||||
model: "",
|
||||
path: dirPath + "/" + file + "/pages",
|
||||
})
|
||||
break
|
||||
@@ -659,6 +678,7 @@ const upgradeLegacy = async () => {
|
||||
// If the directory exists without a sub model (sub page directory), loop through the directory manually move each file/directory
|
||||
if (fs.existsSync(path.join(path.resolve("pages"), pages.model))) {
|
||||
let subs = fs.readdirSync(pages.path)
|
||||
|
||||
subs.forEach((sub) => {
|
||||
fs.moveSync(
|
||||
path.join(pages.path, sub),
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
# @blitzjs/config
|
||||
|
||||
## 2.0.0-beta.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- db7233db: Bump react, react-dom, @types/react and next versions
|
||||
|
||||
This fixes a console warning: `Warning: Received`true`for a non-boolean attribute`global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.
|
||||
|
||||
## 2.0.0-beta.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0f4926fd: Set current Blitz tag to latest
|
||||
|
||||
## 2.0.0-beta.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2cc888ef: Beta release
|
||||
|
||||
## 2.0.0-alpha.71
|
||||
|
||||
## 2.0.0-alpha.70
|
||||
|
||||
## 2.0.0-alpha.69
|
||||
|
||||
## 2.0.0-alpha.68
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@blitzjs/config",
|
||||
"private": true,
|
||||
"version": "2.0.0-alpha.69",
|
||||
"version": "2.0.0-beta.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "5.9.1",
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
# @blitzjs/generator
|
||||
|
||||
## 2.0.0-beta.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- db7233db: Bump react, react-dom, @types/react and next versions
|
||||
|
||||
This fixes a console warning: `Warning: Received`true`for a non-boolean attribute`global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.
|
||||
|
||||
- eb971568: Add `BlitzPage` types to auth pages in new app template
|
||||
- 8ada2c26: Include ResetPasswordPage in new app template
|
||||
|
||||
## 2.0.0-beta.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0f4926fd: Set current Blitz tag to latest
|
||||
|
||||
## 2.0.0-beta.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2cc888ef: Beta release
|
||||
|
||||
## 2.0.0-alpha.71
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 176c7b8b: Use correct path for log utilities import
|
||||
|
||||
## 2.0.0-alpha.70
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 4656e6ec: Print model added or updated in schema.prisma after running model generator
|
||||
- 1e0ec7a9: Add `BlitzPage` type to Home pages in app templates
|
||||
|
||||
## 2.0.0-alpha.69
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@blitzjs/generator",
|
||||
"version": "2.0.0-alpha.69",
|
||||
"version": "2.0.0-beta.2",
|
||||
"scripts": {
|
||||
"dev": "watch unbuild src --wait=0.2",
|
||||
"build": "unbuild && pnpm build:templates",
|
||||
@@ -46,7 +46,7 @@
|
||||
"vinyl": "2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "2.0.0-alpha.69",
|
||||
"@blitzjs/config": "2.0.0-beta.2",
|
||||
"@juanm04/cpx": "2.0.1",
|
||||
"@types/babel__core": "7.1.19",
|
||||
"@types/diff": "5.0.2",
|
||||
@@ -56,7 +56,7 @@
|
||||
"@types/mem-fs-editor": "7.0.1",
|
||||
"@types/pluralize": "0.0.29",
|
||||
"@types/prettier": "2.4.4",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@types/react-dom": "17.0.14",
|
||||
"@types/vinyl": "2.0.6",
|
||||
"@typescript-eslint/eslint-plugin": "5.9.1",
|
||||
@@ -64,7 +64,7 @@
|
||||
"babylon": "6.18.0",
|
||||
"debug": "4.3.3",
|
||||
"eslint": "7.32.0",
|
||||
"react": "18.0.0",
|
||||
"react": "18.2.0",
|
||||
"typescript": "^4.5.3",
|
||||
"unbuild": "0.6.9",
|
||||
"watch": "1.0.2"
|
||||
|
||||
@@ -2,6 +2,7 @@ import * as ast from "@mrleebo/prisma-ast"
|
||||
import {spawn} from "cross-spawn"
|
||||
import which from "npm-which"
|
||||
import path from "path"
|
||||
import {log} from "../utils/log"
|
||||
import {Generator, GeneratorOptions, SourceRootType} from "../generator"
|
||||
import {Field} from "../prisma/field"
|
||||
import {Model} from "../prisma/model"
|
||||
@@ -88,8 +89,10 @@ export class ModelGenerator extends Generator<ModelGeneratorOptions> {
|
||||
dryRun ? "" : ` ${updatedOrCreated} in schema.prisma`
|
||||
}:\n`,
|
||||
)
|
||||
ast.printSchema({type: "schema", list: [model]}).split("\n")
|
||||
// .map(log.progress) // todo
|
||||
ast
|
||||
.printSchema({type: "schema", list: [model]})
|
||||
.split("\n")
|
||||
.map(log.progress)
|
||||
console.log("\n")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {logFailedVersionFetch} from "./get-latest-version"
|
||||
import {fetchDistTags} from "./npm-fetch"
|
||||
|
||||
const CURRENT_BLITZ_TAG = "alpha"
|
||||
const CURRENT_BLITZ_TAG = "latest"
|
||||
|
||||
export const getBlitzDependencyVersion = async () => {
|
||||
try {
|
||||
|
||||
@@ -13,7 +13,7 @@ type ResetPasswordMailer = {
|
||||
export function forgotPasswordMailer({ to, token }: ResetPasswordMailer) {
|
||||
// In production, set APP_ORIGIN to your production server origin
|
||||
const origin = process.env.APP_ORIGIN || process.env.BLITZ_DEV_SERVER_ORIGIN
|
||||
const resetUrl = `${origin}/reset-password?token=${token}`
|
||||
const resetUrl = `${origin}/auth/reset-password?token=${token}`
|
||||
|
||||
const msg = {
|
||||
from: "TODO@example.com",
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
"*.{js}": ["eslint --fix"]
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/auth": "alpha",
|
||||
"@blitzjs/next": "alpha",
|
||||
"@blitzjs/rpc": "alpha",
|
||||
"@blitzjs/auth": "latest",
|
||||
"@blitzjs/next": "latest",
|
||||
"@blitzjs/rpc": "latest",
|
||||
"@prisma/client": "4.0.0",
|
||||
"blitz": "alpha",
|
||||
"next": "12.2.0",
|
||||
"blitz": "latest",
|
||||
"next": "12.2.5",
|
||||
"prisma": "4.0.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"zod": "3.17.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -39,7 +39,7 @@
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "17.0.16",
|
||||
"@types/preview-email": "2.0.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-next": "12.2.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
"*.{js,ts,tsx}": ["eslint --fix"]
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/auth": "alpha",
|
||||
"@blitzjs/next": "alpha",
|
||||
"@blitzjs/rpc": "alpha",
|
||||
"@blitzjs/auth": "latest",
|
||||
"@blitzjs/next": "latest",
|
||||
"@blitzjs/rpc": "latest",
|
||||
"@prisma/client": "4.0.0",
|
||||
"blitz": "alpha",
|
||||
"next": "12.2.0",
|
||||
"blitz": "latest",
|
||||
"next": "12.2.5",
|
||||
"prisma": "4.0.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"zod": "3.17.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -39,7 +39,7 @@
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "17.0.16",
|
||||
"@types/preview-email": "2.0.1",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@typescript-eslint/eslint-plugin": "5.30.5",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-next": "12.2.0",
|
||||
|
||||
@@ -4,8 +4,9 @@ import { Form, FORM_ERROR } from "app/core/components/Form"
|
||||
import { ForgotPassword } from "app/auth/validations"
|
||||
import forgotPassword from "app/auth/mutations/forgotPassword"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import { BlitzPage } from "@blitzjs/next"
|
||||
|
||||
const ForgotPasswordPage = () => {
|
||||
const ForgotPasswordPage: BlitzPage = () => {
|
||||
const [forgotPasswordMutation, { isSuccess }] = useMutation(forgotPassword)
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { BlitzPage } from "@blitzjs/next"
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { LoginForm } from "app/auth/components/LoginForm"
|
||||
import { useRouter } from "next/router"
|
||||
|
||||
const LoginPage = () => {
|
||||
const LoginPage: BlitzPage = () => {
|
||||
const router = useRouter()
|
||||
|
||||
return (
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { LabeledTextField } from "app/core/components/LabeledTextField"
|
||||
import { Form, FORM_ERROR } from "app/core/components/Form"
|
||||
import { ResetPassword } from "app/auth/validations"
|
||||
import resetPassword from "app/auth/mutations/resetPassword"
|
||||
import { BlitzPage, Routes } from "@blitzjs/next"
|
||||
import { useRouter } from "next/router"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import Link from "next/link"
|
||||
|
||||
const ResetPasswordPage: BlitzPage = () => {
|
||||
const router = useRouter()
|
||||
const [resetPasswordMutation, { isSuccess }] = useMutation(resetPassword)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1>Set a New Password</h1>
|
||||
|
||||
{isSuccess ? (
|
||||
<div>
|
||||
<h2>Password Reset Successfully</h2>
|
||||
<p>
|
||||
Go to the <Link href={Routes.Home()}>homepage</Link>
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<Form
|
||||
submitText="Reset Password"
|
||||
schema={ResetPassword}
|
||||
initialValues={{ password: "", passwordConfirmation: "", token: router.query.token as string }}
|
||||
onSubmit={async (values) => {
|
||||
try {
|
||||
await resetPasswordMutation(values)
|
||||
} catch (error: any) {
|
||||
if (error.name === "ResetPasswordError") {
|
||||
return {
|
||||
[FORM_ERROR]: error.message,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
[FORM_ERROR]: "Sorry, we had an unexpected error. Please try again.",
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
>
|
||||
<LabeledTextField name="password" label="New Password" type="password" />
|
||||
<LabeledTextField
|
||||
name="passwordConfirmation"
|
||||
label="Confirm New Password"
|
||||
type="password"
|
||||
/>
|
||||
</Form>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
ResetPasswordPage.redirectAuthenticatedTo = "/"
|
||||
ResetPasswordPage.getLayout = (page) => <Layout title="Reset Your Password">{page}</Layout>
|
||||
|
||||
export default ResetPasswordPage
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useRouter } from "next/router"
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { SignupForm } from "app/auth/components/SignupForm"
|
||||
import { Routes } from "@blitzjs/next"
|
||||
import { BlitzPage, Routes } from "@blitzjs/next"
|
||||
|
||||
const SignupPage = () => {
|
||||
const SignupPage: BlitzPage = () => {
|
||||
const router = useRouter()
|
||||
|
||||
return (
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useCurrentUser } from "app/core/hooks/useCurrentUser"
|
||||
import logout from "app/auth/mutations/logout"
|
||||
import logo from "public/logo.png"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import { Routes } from "@blitzjs/next"
|
||||
import { Routes, BlitzPage } from "@blitzjs/next"
|
||||
|
||||
/*
|
||||
* This file is just for a pleasant getting started page for your new app.
|
||||
@@ -53,7 +53,7 @@ const UserInfo = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const Home = () => {
|
||||
const Home: BlitzPage = () => {
|
||||
return (
|
||||
<Layout title="Home">
|
||||
<div className="container">
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
"*.{js}": ["eslint --fix"]
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/next": "alpha",
|
||||
"blitz": "alpha",
|
||||
"next": "12.2.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"@blitzjs/next": "latest",
|
||||
"blitz": "latest",
|
||||
"next": "12.2.5",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"ts-node": "10.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -30,7 +30,7 @@
|
||||
"@testing-library/jest-dom": "5.16.3",
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "17.0.16",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-next": "12.2.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@blitzjs/next": "alpha",
|
||||
"blitz": "alpha",
|
||||
"next": "12.2.0",
|
||||
"react": "18.0.0",
|
||||
"react-dom": "18.0.0",
|
||||
"@blitzjs/next": "latest",
|
||||
"blitz": "latest",
|
||||
"next": "12.2.5",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"ts-node": "10.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -32,7 +32,7 @@
|
||||
"@testing-library/jest-dom": "5.16.3",
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "17.0.16",
|
||||
"@types/react": "18.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@typescript-eslint/eslint-plugin": "5.30.5",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Image from 'next/image'
|
||||
import { NextPage } from "next"
|
||||
import { BlitzPage } from "@blitzjs/next"
|
||||
import logo from "public/logo.png"
|
||||
|
||||
/*
|
||||
@@ -7,7 +7,7 @@ import logo from "public/logo.png"
|
||||
* You can delete everything in here and start from scratch if you like.
|
||||
*/
|
||||
|
||||
const Home: NextPage = () => {
|
||||
const Home: BlitzPage = () => {
|
||||
return (
|
||||
<div className="container">
|
||||
<main>
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
"@typescript-eslint/parser": "5.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blitzjs/config": "2.0.0-alpha.69",
|
||||
"@types/react": "18.0.1",
|
||||
"@blitzjs/config": "2.0.0-beta.2",
|
||||
"@types/react": "18.0.17",
|
||||
"@types/react-dom": "17.0.14",
|
||||
"react": "18.0.0",
|
||||
"react": "18.2.0",
|
||||
"typescript": "^4.5.3",
|
||||
"unbuild": "0.7.6",
|
||||
"watch": "1.0.2"
|
||||
|
||||
538
pnpm-lock.yaml
generated
538
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user