Compare commits
114 Commits
@blitzjs/a
...
docs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee99c5739c | ||
|
|
de5b6eb9a9 | ||
|
|
d86bb0cf83 | ||
|
|
f443118b9d | ||
|
|
e228ba5dee | ||
|
|
430f0b52dd | ||
|
|
6e88a847fe | ||
|
|
1db963a8ca | ||
|
|
6374f2ff0c | ||
|
|
6ec020c6d6 | ||
|
|
a3d8b287f1 | ||
|
|
4ed1fc1233 | ||
|
|
3fa3c70b39 | ||
|
|
a9b1989bb0 | ||
|
|
c3c789740a | ||
|
|
42a2cf951a | ||
|
|
d316d0db7f | ||
|
|
a8ce2325fc | ||
|
|
f58a0e42f7 | ||
|
|
cb63a0ea5b | ||
|
|
a78bd33706 | ||
|
|
79c5e86d71 | ||
|
|
21b83fb7bf | ||
|
|
14882d43fe | ||
|
|
989691ec87 | ||
|
|
2703618868 | ||
|
|
44ddf5b423 | ||
|
|
bcef81fadc | ||
|
|
7abfb9086a | ||
|
|
57101e9adf | ||
|
|
497b87f7fb | ||
|
|
64a98e201d | ||
|
|
8aa22a0b2f | ||
|
|
145d5a02b3 | ||
|
|
9be4d86174 | ||
|
|
249e7cf527 | ||
|
|
76df5db1c3 | ||
|
|
556f5cd13d | ||
|
|
d692b4c1d7 | ||
|
|
bd4db6d701 | ||
|
|
82e8b64f59 | ||
|
|
e9dfbcf85a | ||
|
|
a4294ad29c | ||
|
|
ea83f0d174 | ||
|
|
f32f6d3ac9 | ||
|
|
d5b8faa860 | ||
|
|
4a6612b942 | ||
|
|
c941d993a8 | ||
|
|
3633f23ceb | ||
|
|
10f98c681d | ||
|
|
0025856b9e | ||
|
|
77b7da0f38 | ||
|
|
13c2642bdb | ||
|
|
03bad3175d | ||
|
|
74a14b7040 | ||
|
|
6ece096134 | ||
|
|
a0596279bd | ||
|
|
fe2e4eb1e9 | ||
|
|
8c247e26e7 | ||
|
|
650a157e1d | ||
|
|
9dc81fe958 | ||
|
|
474b5494ac | ||
|
|
b33db08286 | ||
|
|
c1e0040639 | ||
|
|
5a7e6e0bb8 | ||
|
|
a6f32d1d0b | ||
|
|
c126b8191b | ||
|
|
775004f23e | ||
|
|
696f48c4e8 | ||
|
|
942536d9ad | ||
|
|
b493c93f8b | ||
|
|
b80c3d92ca | ||
|
|
4c0024c468 | ||
|
|
72a4e594ae | ||
|
|
62212bcc78 | ||
|
|
ed2b0e22c5 | ||
|
|
d250346d8b | ||
|
|
c0a3b1ee36 | ||
|
|
aaed9caa82 | ||
|
|
0020db295d | ||
|
|
9fd032106e | ||
|
|
936211a657 | ||
|
|
97469a1265 | ||
|
|
8b4bf999ce | ||
|
|
5ea068b28b | ||
|
|
88caa18e61 | ||
|
|
2a81af7b78 | ||
|
|
916692db74 | ||
|
|
0959a11fc6 | ||
|
|
4545912936 | ||
|
|
55a43ce1f8 | ||
|
|
1569bd53e0 | ||
|
|
8e5903c0fa | ||
|
|
11b548edee | ||
|
|
ceb7db274f | ||
|
|
0ebdf3bc93 | ||
|
|
1b798d9a03 | ||
|
|
758ccbbbe5 | ||
|
|
d73b1d76ab | ||
|
|
78fd5c489b | ||
|
|
60de057477 | ||
|
|
0a8b0cb350 | ||
|
|
5476139375 | ||
|
|
81dd346c85 | ||
|
|
6f4349896f | ||
|
|
a6e81f156b | ||
|
|
4e26ae21bc | ||
|
|
70ca39e059 | ||
|
|
7b63f0f1f2 | ||
|
|
2e5d7ae40c | ||
|
|
67de028732 | ||
|
|
f39ba1ff13 | ||
|
|
149b999f67 | ||
|
|
3a602b613b |
@@ -2314,7 +2314,9 @@
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/32314?v=4",
|
||||
"profile": "https://macwright.com/",
|
||||
"contributions": [
|
||||
"doc"
|
||||
"doc",
|
||||
"test",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2911,7 +2913,8 @@
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/120626?v=4",
|
||||
"profile": "https://github.com/medihack",
|
||||
"contributions": [
|
||||
"doc"
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2938,7 +2941,8 @@
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/230500?v=4",
|
||||
"profile": "https://github.com/bravo-kernel",
|
||||
"contributions": [
|
||||
"code"
|
||||
"code",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -3714,8 +3718,137 @@
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "oloost",
|
||||
"name": "oloost",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/72395941?v=4",
|
||||
"profile": "https://github.com/oloost",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "janvennemann",
|
||||
"name": "Jan Vennemann",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/1406024?v=4",
|
||||
"profile": "https://github.com/janvennemann",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "joneskj55",
|
||||
"name": "Kevin Jones",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/20748598?v=4",
|
||||
"profile": "https://kevinjones.engineer",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "paulm17",
|
||||
"name": "Paul",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/387463?v=4",
|
||||
"profile": "https://github.com/paulm17",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "selcukfatihsevinc",
|
||||
"name": "Selçuk Fatih Sevinç",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/384836?v=4",
|
||||
"profile": "https://github.com/selcukfatihsevinc",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "usamaster",
|
||||
"name": "usamaster",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/5255330?v=4",
|
||||
"profile": "https://github.com/usamaster",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "a11rew",
|
||||
"name": "Andrew Glago",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/87580113?v=4",
|
||||
"profile": "a11rew.dev",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "tordans",
|
||||
"name": "Tobias",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/111561?v=4",
|
||||
"profile": "http://tobiasjordans.de",
|
||||
"contributions": [
|
||||
"code",
|
||||
"doc",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "iagormoraes",
|
||||
"name": "Iagor Moraes",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/13892132?v=4",
|
||||
"profile": "https://www.linkedin.com/in/iagor-moraes/",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Trancever",
|
||||
"name": "Dawid Urbaniak",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/18584155?v=4",
|
||||
"profile": "https://twitter.com/trensik",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jhonnymichel",
|
||||
"name": "Jhonny Michel",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/7006387?v=4",
|
||||
"profile": "https://github.com/jhonnymichel",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code",
|
||||
"test"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "sweetliquid",
|
||||
"name": "sweetliquid",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/18693190?v=4",
|
||||
"profile": "sweetliquid.me",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "exKAZUu",
|
||||
"name": "Sakamoto, Kazunori",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/436237?v=4",
|
||||
"profile": "https://github.com/exKAZUu",
|
||||
"contributions": [
|
||||
"doc",
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
"skipCi": true
|
||||
}
|
||||
}
|
||||
6
.changeset/afraid-ears-repair.md
Normal file
6
.changeset/afraid-ears-repair.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Upgrade `tslog` to the latest version
|
||||
5
.changeset/big-boats-lay.md
Normal file
5
.changeset/big-boats-lay.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Guard `blitz g` input via an allow-list of characters; throw if unwanted characters are found. Prevents to break the blitz command by accident (https://github.com/blitz-js/blitz/issues/4021).
|
||||
5
.changeset/brave-zebras-deny.md
Normal file
5
.changeset/brave-zebras-deny.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/rpc": minor
|
||||
---
|
||||
|
||||
internal: remove unneeed useSession from useQuery hooks
|
||||
8
.changeset/calm-books-push.md
Normal file
8
.changeset/calm-books-push.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"blitz": minor
|
||||
"@blitzjs/auth": minor
|
||||
"@blitzjs/next": minor
|
||||
"@blitzjs/rpc": minor
|
||||
---
|
||||
|
||||
transpile packages to es2015 to support older browsers
|
||||
5
.changeset/calm-papayas-protect.md
Normal file
5
.changeset/calm-papayas-protect.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": minor
|
||||
---
|
||||
|
||||
When db.\$reset() rejects, reject with an Error object
|
||||
5
.changeset/chatty-fireants-leave.md
Normal file
5
.changeset/chatty-fireants-leave.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Fix a type error in reset password templates.
|
||||
5
.changeset/chilly-candles-care.md
Normal file
5
.changeset/chilly-candles-care.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Remove husky prepush hook & update precommit hook to only run prettier
|
||||
5
.changeset/chilly-nails-nail.md
Normal file
5
.changeset/chilly-nails-nail.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Remove unnecessary `as number` assertions from new app templates
|
||||
5
.changeset/clean-hounds-laugh.md
Normal file
5
.changeset/clean-hounds-laugh.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/rpc": minor
|
||||
---
|
||||
|
||||
change rpc route basepath to be one folder higher when using includeRPC in monorepos
|
||||
6
.changeset/curvy-days-attend.md
Normal file
6
.changeset/curvy-days-attend.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@blitzjs/rpc": patch
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Switch from jest to vitest in new app templates
|
||||
5
.changeset/dull-rings-arrive.md
Normal file
5
.changeset/dull-rings-arrive.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/auth": patch
|
||||
---
|
||||
|
||||
Fixes adding authError query param in Passport adapter.
|
||||
8
.changeset/eighty-apes-sleep.md
Normal file
8
.changeset/eighty-apes-sleep.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
"blitz": minor
|
||||
"@blitzjs/auth": minor
|
||||
"@blitzjs/next": minor
|
||||
"@blitzjs/rpc": minor
|
||||
---
|
||||
|
||||
Decoupled Blitz RPC from Blitz Auth to allow independent use.
|
||||
5
.changeset/fast-papayas-grow.md
Normal file
5
.changeset/fast-papayas-grow.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Update generator templates to use the src directory instead of app
|
||||
5
.changeset/few-hounds-worry.md
Normal file
5
.changeset/few-hounds-worry.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": minor
|
||||
---
|
||||
|
||||
some providers need extra attributes, update for wrapAppWithProvider
|
||||
6
.changeset/fluffy-coats-flow.md
Normal file
6
.changeset/fluffy-coats-flow.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@blitzjs/rpc": patch
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Fix suspense error codegen patch for nextjs versions 13-13.0.6
|
||||
5
.changeset/funny-cups-pay.md
Normal file
5
.changeset/funny-cups-pay.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Check if blitz-server & blitz-client is located in either the app or src directory and return the correct path for blitz recipes.
|
||||
9
.changeset/fuzzy-dots-cross.md
Normal file
9
.changeset/fuzzy-dots-cross.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/auth": patch
|
||||
"@blitzjs/next": patch
|
||||
"@blitzjs/rpc": patch
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Update dependencies
|
||||
6
.changeset/giant-mails-tap.md
Normal file
6
.changeset/giant-mails-tap.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/next": patch
|
||||
---
|
||||
|
||||
Add BlitzLogger plugin and allow customizing logging
|
||||
5
.changeset/giant-students-carry.md
Normal file
5
.changeset/giant-students-carry.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Fix form paths when running blitz generate all
|
||||
5
.changeset/giant-timers-search.md
Normal file
5
.changeset/giant-timers-search.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"toolkit-app": patch
|
||||
---
|
||||
|
||||
Update zod to 3.20.2 (was 3.19.1).
|
||||
6
.changeset/heavy-students-buy.md
Normal file
6
.changeset/heavy-students-buy.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@blitzjs/auth": minor
|
||||
"@blitzjs/rpc": minor
|
||||
---
|
||||
|
||||
maybe fix anon session CSRF issue + add ability to customize anon session expiry time
|
||||
5
.changeset/honest-comics-vanish.md
Normal file
5
.changeset/honest-comics-vanish.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Fix Blitz Install issue that gets stuck on "Generating file diff"
|
||||
5
.changeset/hungry-pens-collect.md
Normal file
5
.changeset/hungry-pens-collect.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Fix `blitz install` not working due to missing `blitz/installer` dependency
|
||||
7
.changeset/itchy-cups-double.md
Normal file
7
.changeset/itchy-cups-double.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/rpc": patch
|
||||
---
|
||||
|
||||
Add an opt-in GET request support to RPC specification by exporting a `config` object that has the `httpMethod` property.
|
||||
from `query` files.
|
||||
5
.changeset/khaki-ducks-cheer.md
Normal file
5
.changeset/khaki-ducks-cheer.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/rpc": patch
|
||||
---
|
||||
|
||||
Allow the updater function in setQueryData to return undefined to match react-query typings
|
||||
7
.changeset/khaki-pens-rest.md
Normal file
7
.changeset/khaki-pens-rest.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@blitzjs/auth": minor
|
||||
"@blitzjs/next": minor
|
||||
"@blitzjs/rpc": minor
|
||||
---
|
||||
|
||||
fix Cannot read properties of null (reading 'isReady') for pnpm/yarn v3
|
||||
5
.changeset/lemon-pillows-switch.md
Normal file
5
.changeset/lemon-pillows-switch.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Fix reset token being undefined when passed to the resetPassword mutation
|
||||
5
.changeset/lemon-teachers-jam.md
Normal file
5
.changeset/lemon-teachers-jam.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Use `src` instead of `app` folder for `blitz generate custom-template`
|
||||
6
.changeset/light-squids-draw.md
Normal file
6
.changeset/light-squids-draw.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Fix `cannot find module db error` in JavaScript template. Replace requiring the config using `esbuild` with parsing using `jscodeshift` to get the `cliConfig` values. Added logic to find the `blitz-server` file in `src` directory
|
||||
5
.changeset/little-pears-ring.md
Normal file
5
.changeset/little-pears-ring.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Fix "Ambiguous class detected" errors reported by SuperJson by removing duplicated export from errors.ts file
|
||||
5
.changeset/long-hounds-melt.md
Normal file
5
.changeset/long-hounds-melt.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": major
|
||||
---
|
||||
|
||||
update paginate.ts, return more params for more complex pagination control
|
||||
6
.changeset/lucky-years-turn.md
Normal file
6
.changeset/lucky-years-turn.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@blitzjs/config": patch
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Upgrade eslint-config-next in new app templates to fix linting issues on blitz build
|
||||
5
.changeset/mean-ears-speak.md
Normal file
5
.changeset/mean-ears-speak.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
For new applications, update Prisma (`prisma` and `@prisma/client`) from `4.6.0` to `4.6.1` to solve enum issue with postgresql https://github.com/prisma/prisma/issues/16180
|
||||
5
.changeset/modern-games-dream.md
Normal file
5
.changeset/modern-games-dream.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Export enhancePrisma for client again (Fixes #3964)
|
||||
5
.changeset/moody-spoons-rhyme.md
Normal file
5
.changeset/moody-spoons-rhyme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Fix Custom Server TS error - add `es6` target config to esbuild
|
||||
5
.changeset/odd-bears-run.md
Normal file
5
.changeset/odd-bears-run.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/next": minor
|
||||
---
|
||||
|
||||
Change setupBlitzServer logger config to be optional. Will default to BlitzLogger
|
||||
5
.changeset/olive-dragons-drum.md
Normal file
5
.changeset/olive-dragons-drum.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/rpc": patch
|
||||
---
|
||||
|
||||
Add ability to put your query and mutation resolvers in a separate monorepo folder, allowing you to use them in multiple apps.
|
||||
5
.changeset/perfect-baboons-relate.md
Normal file
5
.changeset/perfect-baboons-relate.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Remove useEffect from reset password templates.
|
||||
6
.changeset/plenty-kiwis-greet.md
Normal file
6
.changeset/plenty-kiwis-greet.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/rpc": patch
|
||||
---
|
||||
|
||||
Updates internal functions and tests to support blitz apps that run tests with vitest
|
||||
@@ -44,24 +44,34 @@
|
||||
"@blitzjs/recipe-styled-components": "0.34.0-canary.0",
|
||||
"@blitzjs/recipe-tailwind": "0.34.0-canary.0",
|
||||
"@blitzjs/recipe-theme-ui": "0.34.0-canary.0",
|
||||
"@blitzjs/recipe-vanilla-extract": "0.34.0-canary.0"
|
||||
"@blitzjs/recipe-vanilla-extract": "0.34.0-canary.0",
|
||||
"test-rpc-path-root": "0.0.0",
|
||||
"test-full-auth-with-rpc": "0.0.0"
|
||||
},
|
||||
"changesets": [
|
||||
"afraid-dancers-juggle",
|
||||
"afraid-ears-repair",
|
||||
"big-boats-lay",
|
||||
"big-phones-bow",
|
||||
"blue-flowers-peel",
|
||||
"blue-pigs-tan",
|
||||
"brave-zebras-deny",
|
||||
"breezy-bees-beg",
|
||||
"breezy-cameras-double",
|
||||
"breezy-moose-behave",
|
||||
"bright-mangos-run",
|
||||
"brown-avocados-wink",
|
||||
"calm-books-push",
|
||||
"calm-carpets-deny",
|
||||
"calm-horses-tie",
|
||||
"calm-nails-wait",
|
||||
"calm-papayas-protect",
|
||||
"calm-tomatoes-drive",
|
||||
"chilled-carrots-own",
|
||||
"chilly-candles-care",
|
||||
"chilly-nails-nail",
|
||||
"clean-hats-pump",
|
||||
"clean-hounds-laugh",
|
||||
"clean-walls-wink",
|
||||
"clever-radios-lie",
|
||||
"cool-doors-invent",
|
||||
@@ -69,11 +79,14 @@
|
||||
"cuddly-pugs-crash",
|
||||
"curly-rules-speak",
|
||||
"curly-seas-serve",
|
||||
"curvy-days-attend",
|
||||
"cyan-bulldogs-heal",
|
||||
"cyan-cars-greet",
|
||||
"dirty-monkeys-greet",
|
||||
"dirty-planets-chew",
|
||||
"dull-rings-arrive",
|
||||
"early-lamps-itch",
|
||||
"eighty-apes-sleep",
|
||||
"eleven-humans-sort",
|
||||
"eleven-lobsters-drop",
|
||||
"empty-berries-rule",
|
||||
@@ -84,20 +97,28 @@
|
||||
"fair-wombats-sneeze",
|
||||
"famous-kings-explain",
|
||||
"fast-clocks-push",
|
||||
"fast-papayas-grow",
|
||||
"fast-trainers-kneel",
|
||||
"few-dogs-fetch",
|
||||
"few-hounds-worry",
|
||||
"few-shrimps-leave",
|
||||
"flat-bees-approve",
|
||||
"fluffy-coats-flow",
|
||||
"fluffy-mangos-begin",
|
||||
"fluffy-mice-wash",
|
||||
"forty-timers-rhyme",
|
||||
"four-brooms-juggle",
|
||||
"four-meals-fry",
|
||||
"four-sheep-judge",
|
||||
"funny-cups-pay",
|
||||
"fuzzy-bees-warn",
|
||||
"fuzzy-dots-cross",
|
||||
"fuzzy-jars-admire",
|
||||
"gentle-dogs-reply",
|
||||
"gentle-lions-explode",
|
||||
"giant-mails-tap",
|
||||
"giant-students-carry",
|
||||
"giant-timers-search",
|
||||
"gold-horses-punch",
|
||||
"good-apes-drum",
|
||||
"good-insects-wink",
|
||||
@@ -115,31 +136,45 @@
|
||||
"healthy-rice-shout",
|
||||
"heavy-apes-judge",
|
||||
"heavy-cobras-own",
|
||||
"heavy-students-buy",
|
||||
"hip-buttons-dance",
|
||||
"honest-candles-yawn",
|
||||
"honest-cherries-push",
|
||||
"honest-comics-vanish",
|
||||
"hot-cups-rhyme",
|
||||
"hot-drinks-approve",
|
||||
"hungry-baboons-swim",
|
||||
"hungry-pens-collect",
|
||||
"itchy-cups-double",
|
||||
"itchy-houses-marry",
|
||||
"itchy-spoons-tan",
|
||||
"khaki-ducks-cheer",
|
||||
"khaki-pens-rest",
|
||||
"kind-walls-suffer",
|
||||
"late-steaks-give",
|
||||
"lazy-maps-sort",
|
||||
"lemon-games-press",
|
||||
"lemon-pillows-switch",
|
||||
"lemon-seas-push",
|
||||
"lemon-teachers-jam",
|
||||
"light-donkeys-double",
|
||||
"light-squids-draw",
|
||||
"little-pears-ring",
|
||||
"long-bees-hope",
|
||||
"long-dancers-jog",
|
||||
"long-hounds-melt",
|
||||
"long-lobsters-drop",
|
||||
"lovely-berries-sell",
|
||||
"lovely-colts-share",
|
||||
"lucky-cows-try",
|
||||
"lucky-months-guess",
|
||||
"lucky-years-turn",
|
||||
"mean-gorillas-reply",
|
||||
"modern-cameras-pull",
|
||||
"modern-games-dream",
|
||||
"modern-ligers-behave",
|
||||
"moody-bags-walk",
|
||||
"moody-spoons-rhyme",
|
||||
"moody-squids-cheer",
|
||||
"nasty-suns-wash",
|
||||
"nervous-beds-travel",
|
||||
@@ -153,15 +188,19 @@
|
||||
"ninety-lies-press",
|
||||
"ninety-pets-heal",
|
||||
"ninety-rice-tickle",
|
||||
"odd-bears-run",
|
||||
"olive-bees-buy",
|
||||
"olive-dragons-drum",
|
||||
"olive-feet-rhyme",
|
||||
"olive-kings-invent",
|
||||
"olive-sheep-rhyme",
|
||||
"orange-mirrors-tap",
|
||||
"orange-zebras-reflect",
|
||||
"perfect-baboons-relate",
|
||||
"perfect-eyes-repeat",
|
||||
"perfect-trains-double",
|
||||
"plenty-bottles-swim",
|
||||
"plenty-kiwis-greet",
|
||||
"polite-lizards-love",
|
||||
"poor-peas-lick",
|
||||
"poor-penguins-look",
|
||||
@@ -170,27 +209,36 @@
|
||||
"popular-teachers-pay",
|
||||
"pretty-games-march",
|
||||
"purple-donkeys-smash",
|
||||
"purple-jars-begin",
|
||||
"purple-singers-greet",
|
||||
"quick-cycles-confess",
|
||||
"quick-dots-fetch",
|
||||
"quiet-feet-travel",
|
||||
"quiet-pans-hunt",
|
||||
"quiet-sloths-rule",
|
||||
"rare-crews-sleep",
|
||||
"red-badgers-retire",
|
||||
"red-gorillas-marry",
|
||||
"rich-chairs-invent",
|
||||
"rich-gorillas-develop",
|
||||
"rich-queens-travel",
|
||||
"rotten-rocks-remember",
|
||||
"rude-trainers-visit",
|
||||
"serious-mugs-leave",
|
||||
"shaggy-carpets-brake",
|
||||
"sharp-falcons-begin",
|
||||
"sharp-olives-sip",
|
||||
"shy-olives-hang",
|
||||
"shy-pumpkins-try",
|
||||
"shy-socks-eat",
|
||||
"silent-colts-reply",
|
||||
"silent-lies-run",
|
||||
"silly-apricots-share",
|
||||
"silly-shoes-agree",
|
||||
"six-apricots-kick",
|
||||
"slimy-humans-impress",
|
||||
"slimy-needles-taste",
|
||||
"slow-impalas-tap",
|
||||
"slow-walls-camp",
|
||||
"slow-walls-poke",
|
||||
"small-socks-confess",
|
||||
@@ -199,6 +247,7 @@
|
||||
"smooth-stingrays-drum",
|
||||
"smooth-tools-train",
|
||||
"soft-adults-smell",
|
||||
"soft-fans-carry",
|
||||
"sour-lemons-hunt",
|
||||
"sour-mails-lick",
|
||||
"spicy-beds-float",
|
||||
@@ -207,25 +256,36 @@
|
||||
"spotty-peas-hope",
|
||||
"spotty-zoos-film",
|
||||
"stale-jobs-drum",
|
||||
"stale-parents-yawn",
|
||||
"strong-apes-reply",
|
||||
"strong-keys-lie",
|
||||
"stupid-rabbits-jump",
|
||||
"stupid-walls-sell",
|
||||
"sweet-kiwis-cross",
|
||||
"swift-drinks-dress",
|
||||
"swift-glasses-laugh",
|
||||
"swift-poets-travel",
|
||||
"tall-meals-learn",
|
||||
"tame-keys-reply",
|
||||
"tame-pumpkins-nail",
|
||||
"tasty-maps-fetch",
|
||||
"tasty-news-collect",
|
||||
"tasty-squids-sin",
|
||||
"ten-hairs-listen",
|
||||
"ten-rivers-burn",
|
||||
"tender-cooks-tie",
|
||||
"tender-pianos-check",
|
||||
"thick-moons-fry",
|
||||
"thick-parrots-float",
|
||||
"thick-peas-jog",
|
||||
"thirty-countries-build",
|
||||
"thirty-spies-applaud",
|
||||
"three-lies-pull",
|
||||
"three-toes-sell",
|
||||
"tidy-clouds-smoke",
|
||||
"tidy-llamas-compare",
|
||||
"tough-toes-pull",
|
||||
"tricky-kids-press",
|
||||
"twelve-hornets-sip",
|
||||
"twelve-lemons-smile",
|
||||
"twelve-needles-worry",
|
||||
|
||||
5
.changeset/purple-jars-begin.md
Normal file
5
.changeset/purple-jars-begin.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Fix missing MockRouter prop in test utils
|
||||
5
.changeset/quick-dots-fetch.md
Normal file
5
.changeset/quick-dots-fetch.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/rpc": minor
|
||||
---
|
||||
|
||||
Fix mutability bug in RPC configuration
|
||||
6
.changeset/red-gorillas-marry.md
Normal file
6
.changeset/red-gorillas-marry.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@blitzjs/auth": patch
|
||||
"@blitzjs/next": patch
|
||||
---
|
||||
|
||||
Added option `role` to `authenticate` property of `BlitzPage` to authenticate page with respect to the role of the user. `String` value or `Array` of strings can be passed to authorize users.
|
||||
5
.changeset/rich-gorillas-develop.md
Normal file
5
.changeset/rich-gorillas-develop.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/rpc": patch
|
||||
---
|
||||
|
||||
fix: allow `GET` requests without `params` and `meta` keys
|
||||
5
.changeset/rude-trainers-visit.md
Normal file
5
.changeset/rude-trainers-visit.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Fix blitz install for recipes that use the path helper to check if ./src/pages directory is available, otherwise use ./pages
|
||||
5
.changeset/serious-mugs-leave.md
Normal file
5
.changeset/serious-mugs-leave.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Patch next13 for suspense error
|
||||
5
.changeset/shy-socks-eat.md
Normal file
5
.changeset/shy-socks-eat.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
using "blitz install" inside recipe with addRunCommandStep causes hangs up
|
||||
5
.changeset/silent-lies-run.md
Normal file
5
.changeset/silent-lies-run.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Fix `useSession` hook by exporting `enhancePrisma` from the server entry point instead of server
|
||||
6
.changeset/slow-impalas-tap.md
Normal file
6
.changeset/slow-impalas-tap.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Allow passing custom templates to the `blitz generate` command. Extend the `generate` command with `custom-templates` to provide an easy starting point for users to customize the default templates: `blitz generate custom-templates`.
|
||||
5
.changeset/soft-fans-carry.md
Normal file
5
.changeset/soft-fans-carry.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/auth": minor
|
||||
---
|
||||
|
||||
fix failed localStorage access to not crash the application
|
||||
5
.changeset/stale-parents-yawn.md
Normal file
5
.changeset/stale-parents-yawn.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Include resolvers in `src` directory in blitz console
|
||||
5
.changeset/strong-chicken-study.md
Normal file
5
.changeset/strong-chicken-study.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/auth": patch
|
||||
---
|
||||
|
||||
Fixed security vulnerabilities in passport-adapter by upgrading `passport` and `jsonwebtoken`
|
||||
5
.changeset/stupid-rabbits-jump.md
Normal file
5
.changeset/stupid-rabbits-jump.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/rpc": patch
|
||||
---
|
||||
|
||||
Support full api of tanstack invalidateQueries
|
||||
5
.changeset/swift-glasses-laugh.md
Normal file
5
.changeset/swift-glasses-laugh.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Update all links to follow Next 13 format without a child anchor tag.
|
||||
5
.changeset/swift-poets-travel.md
Normal file
5
.changeset/swift-poets-travel.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": minor
|
||||
---
|
||||
|
||||
add `currentPassword` to the default fields that are masked in the logger
|
||||
5
.changeset/tasty-squids-sin.md
Normal file
5
.changeset/tasty-squids-sin.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": patch
|
||||
---
|
||||
|
||||
Add missing Layout.tsx for generated mimimalapp
|
||||
7
.changeset/tender-cooks-tie.md
Normal file
7
.changeset/tender-cooks-tie.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"blitz": patch
|
||||
"@blitzjs/next": patch
|
||||
"@blitzjs/rpc": patch
|
||||
---
|
||||
|
||||
Fix ambigious class warning log & upgrade superjson from 1.9.1 to 1.11.0
|
||||
6
.changeset/thick-moons-fry.md
Normal file
6
.changeset/thick-moons-fry.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@blitzjs/next": patch
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
Add an href property to the generated route manifest that will return a string of the pathname and included query params.
|
||||
7
.changeset/thick-peas-jog.md
Normal file
7
.changeset/thick-peas-jog.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@blitzjs/auth": major
|
||||
---
|
||||
|
||||
BREAKING CHANGE: secure-password is now an `optional peerDependency`, if you are using `SecurePassword` api, you need to now install `secure-password` in your application.
|
||||
|
||||
This helps users who do not use SecurePassword from having native package build issues.
|
||||
5
.changeset/three-toes-sell.md
Normal file
5
.changeset/three-toes-sell.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"blitz": patch
|
||||
---
|
||||
|
||||
add regex to support inline and non-inline codebase and proper next.js package version check
|
||||
5
.changeset/tidy-llamas-compare.md
Normal file
5
.changeset/tidy-llamas-compare.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/rpc": minor
|
||||
---
|
||||
|
||||
fix resolverPath:root and make it work with monorepo resolvers
|
||||
5
.changeset/tricky-kids-press.md
Normal file
5
.changeset/tricky-kids-press.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@blitzjs/generator": minor
|
||||
---
|
||||
|
||||
Redesign the index page for newly generated blitz projects
|
||||
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
@@ -1,5 +1,5 @@
|
||||
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
|
||||
|
||||
* @beerose @dillonraphael
|
||||
* @flybayer
|
||||
|
||||
packages/generator/templates**/* @flybayer
|
||||
# packages/generator/templates**/* @flybayer
|
||||
|
||||
2
.github/workflows/changeset_check.yml
vendored
2
.github/workflows/changeset_check.yml
vendored
@@ -10,7 +10,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
changeset:
|
||||
if: ${{ github.event.label.name != 'no-changeset' }}
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changeset') && github.event.pull_request.merged == false }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
|
||||
63
.github/workflows/main.yml
vendored
63
.github/workflows/main.yml
vendored
@@ -7,10 +7,9 @@ on:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
TURBO_TOKEN: 05de0230f01174d1f8cb4845a01dc6c895ce28f04ebef2318ab11615791b871c35eabbf8
|
||||
TURBO_TEAM: foo
|
||||
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -20,7 +19,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
|
||||
with:
|
||||
version: 6.32.6
|
||||
version: 7.11.0
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
@@ -29,15 +28,10 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
- run: pnpm manypkg check
|
||||
- name: Turborepo local server
|
||||
uses: felixmosh/turborepo-gh-artifacts@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
server-token: ${{ env.TURBO_TOKEN }}
|
||||
- name: Build
|
||||
run: pnpm build -- --api="http://127.0.0.1:9080"
|
||||
run: pnpm build
|
||||
- name: Lint
|
||||
run: pnpm lint -- --api="http://127.0.0.1:9080"
|
||||
run: pnpm lint
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -46,23 +40,17 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
|
||||
with:
|
||||
version: 6.32.6
|
||||
version: 7.11.0
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
cache: "pnpm"
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm manypkg check
|
||||
- name: Turborepo local server
|
||||
uses: felixmosh/turborepo-gh-artifacts@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
server-token: ${{ env.TURBO_TOKEN }}
|
||||
- name: Build
|
||||
run: pnpm build -- --api="http://127.0.0.1:9080"
|
||||
run: pnpm build
|
||||
- name: Build Apps
|
||||
run: pnpm build:apps -- --api="http://127.0.0.1:9080"
|
||||
run: pnpm build:apps
|
||||
|
||||
Unit-Tests:
|
||||
name: "Unit Test: ${{ matrix.os }} (node@16)"
|
||||
@@ -82,7 +70,7 @@ jobs:
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
|
||||
with:
|
||||
version: 6.32.6
|
||||
version: 7.11.0
|
||||
|
||||
- name: Setup node@16
|
||||
uses: actions/setup-node@v2
|
||||
@@ -94,17 +82,8 @@ jobs:
|
||||
run: pnpm install --frozen-lockfile
|
||||
shell: bash
|
||||
|
||||
- run: pnpm manypkg check
|
||||
shell: bash
|
||||
|
||||
- name: Turborepo local server
|
||||
uses: felixmosh/turborepo-gh-artifacts@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
server-token: ${{ env.TURBO_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
run: pnpm build -- --api="http://127.0.0.1:9080"
|
||||
run: pnpm build
|
||||
shell: bash
|
||||
|
||||
- name: Test Packages
|
||||
@@ -129,7 +108,7 @@ jobs:
|
||||
cd ./integration-tests
|
||||
tree -J -d -L 1 | jq -c '.[0].contents | map(.name | tostring) | map(select(. != "utils"))'
|
||||
folders=$(tree -J -d -L 1 | jq -c '.[0].contents | map(.name | tostring) | map(select(. != "utils"))')
|
||||
echo "::set-output name=folders::$folders"
|
||||
echo "folders=$folders" >> $GITHUB_OUTPUT
|
||||
|
||||
Integration-Tests:
|
||||
name: "Integration Test: ${{matrix.folder}} @ ${{ matrix.os }} "
|
||||
@@ -150,7 +129,7 @@ jobs:
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
|
||||
with:
|
||||
version: 6.32.6
|
||||
version: 7.11.0
|
||||
|
||||
- name: Setup node@${{ matrix.NODE_VERSION }}
|
||||
uses: actions/setup-node@v2
|
||||
@@ -158,25 +137,17 @@ jobs:
|
||||
node-version: ${{ matrix.NODE_VERSION }}
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Link Blitz CLI
|
||||
run: pnpm link ./packages/blitz
|
||||
shell: bash
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
shell: bash
|
||||
|
||||
- run: pnpm manypkg check
|
||||
- name: Install playwright
|
||||
run: |
|
||||
pnpx playwright@1.28.0 install --with-deps
|
||||
shell: bash
|
||||
|
||||
- name: Turborepo local server
|
||||
uses: felixmosh/turborepo-gh-artifacts@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
server-token: ${{ env.TURBO_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
run: pnpm build -- --api="http://127.0.0.1:9080"
|
||||
run: pnpm build
|
||||
shell: bash
|
||||
|
||||
- name: Test Packages
|
||||
|
||||
102
.github/workflows/pr-release.yml
vendored
Normal file
102
.github/workflows/pr-release.yml
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
# https://github.com/withastro/astro/blob/main/.github/workflows/snapshot-release.yml
|
||||
|
||||
name: Create a Snapshot Release
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
jobs:
|
||||
snapshot-release:
|
||||
name: Create a snapshot release of a pull request
|
||||
if: ${{ github.repository_owner == 'blitz-js' && github.event.issue.pull_request && startsWith(github.event.comment.body, '!preview') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Check if user has admin access (only admins can publish snapshot releases)."
|
||||
uses: "lannonbr/repo-permission-check-action@2.0.0"
|
||||
with:
|
||||
permission: "admin"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: resolve pr refs
|
||||
id: refs
|
||||
uses: eficode/resolve-pr-refs@main
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ steps.refs.outputs.head_ref }}
|
||||
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v2.2.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Short SHA
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Extract the snapshot name from comment body
|
||||
id: getSnapshotName
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const splitComment = context.payload.comment.body.split(' ');
|
||||
if(splitComment.length !== 2) {
|
||||
return "${{ steps.vars.outputs.sha_short }}";
|
||||
}
|
||||
return splitComment[1].trim();
|
||||
result-encoding: string
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
|
||||
- name: Build Packages
|
||||
run: pnpm run build
|
||||
|
||||
- name: Bump Package Versions
|
||||
id: changesets
|
||||
run: |
|
||||
pnpm changeset pre exit
|
||||
pnpm changeset version --snapshot ${{ steps.getSnapshotName.outputs.result }} > changesets.output.txt 2>&1
|
||||
echo ::set-output name=result::`cat changesets.output.txt`
|
||||
env:
|
||||
# Needs access to run the script
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Publish Release
|
||||
id: publish
|
||||
run: |
|
||||
pnpm run release --tag next--${{ steps.getSnapshotName.outputs.result }} > publish.output.txt 2>&1
|
||||
echo ::set-output name=result::`cat publish.output.txt`
|
||||
env:
|
||||
# Needs access to publish to npm
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Pull Request Notification
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
MESSAGE: ${{ steps.publish.outputs.result }}
|
||||
with:
|
||||
script: |
|
||||
console.log(process.env.MESSAGE);
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: '```\n' + process.env.MESSAGE + '\n```',
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
pnpm manypkg check
|
||||
pnpm lint
|
||||
pnpm pretty-quick --staged
|
||||
# pnpm manypkg check
|
||||
# pnpm lint
|
||||
# pnpm pretty-quick --staged
|
||||
|
||||
5
.kodiak.toml
Normal file
5
.kodiak.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
# .kodiak.toml
|
||||
# Minimal config. version is the only required field.
|
||||
version = 1
|
||||
merge.automerge_label = "0 - <(^_^)> - merge it! ✌️"
|
||||
approve.auto_approve_usernames = ["flybayer", "depfu"]
|
||||
69
README.md
69
README.md
@@ -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-393-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-406-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">
|
||||
@@ -135,8 +135,15 @@ Your financial contributions help ensure Blitz continues to be developed and mai
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://twitter.com/flybayer"><img src="https://avatars3.githubusercontent.com/u/8813276?v=4" width="100px;" alt=""/><br /><sub><b>Brandon Bayer</b></sub></a><br />Creator</td>
|
||||
<td align="center"><a href="http://aleksandra.codes"><img src="https://avatars.githubusercontent.com/u/9019397?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aleksandra Sikora</b></sub></a><br />Lead Maintainer</td>
|
||||
<td align="center"><a href="http://twitter.com/dillonraphael"><img src="https://avatars.githubusercontent.com/u/3496193?v=4" width="100px;" alt=""/><br /><sub><b>Dillon Raphael</b></sub></a><br />Senior Maintainer</td>
|
||||
<td align="center"><a href="http://twitter.com/dillonraphael"><img src="https://avatars.githubusercontent.com/u/3496193?v=4" width="100px;" alt=""/><br /><sub><b>Dillon Raphael</b></sub></a><br /></td>
|
||||
<td align="center">
|
||||
<a href="https://siddharthsuresh.vercel.app/">
|
||||
<img src="https://avatars.githubusercontent.com/u/83594610?v=4" width="100px;" alt="Siddharth Suresh avatar" /><br />
|
||||
<sub>
|
||||
<b>Siddharth Suresh</b>
|
||||
</sub>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
@@ -156,7 +163,6 @@ _Code ownership, pull request approvals and merging, etc_ (see [Maintainers L2](
|
||||
<tr>
|
||||
<td align="center"><a href="http://simonknott.de"><img src="https://avatars1.githubusercontent.com/u/14912729?v=4" width="100px;" alt=""/><br /><sub><b>Simon Knott</b></sub></a><br />SuperJSON</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 />SuperJSON</td>
|
||||
<td align="center"><a href="https://juanm04.com"><img src="https://avatars0.githubusercontent.com/u/16712703?v=4" width="100px;" alt=""/><br /><sub><b>Juan Martín Seery</b></sub></a><br />Website/Docs</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- markdownlint-enable -->
|
||||
@@ -174,38 +180,6 @@ _Issue triage, pull request triage, community encouragement and moderation, etc_
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="http://jeremyliberman.com/"><img src="https://avatars3.githubusercontent.com/u/2754163?v=4" width="100px;" alt=""/><br /><sub><b>Jeremy Liberman</b></td>
|
||||
<td align="center">
|
||||
<a href="https://mina.ca">
|
||||
<img src="https://avatars.githubusercontent.com/mabadir" width="100px;" alt="Mina Abadir avatar" /><br />
|
||||
<sub>
|
||||
<b>Mina Abadir</b>
|
||||
</sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://builtforfifty.com">
|
||||
<img src="https://avatars.githubusercontent.com/abuuzayr" width="100px;" alt="Abu Uzayr avatar" /><br />
|
||||
<sub>
|
||||
<b>Abu Uzayr</b>
|
||||
</sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://damilolarandolph.com/">
|
||||
<img src="https://avatars.githubusercontent.com/damilolarandolph" width="100px;" alt="Damilola Randolph avatar" /><br />
|
||||
<sub>
|
||||
<b>Damilola Randolph</b>
|
||||
</sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://siddharthsuresh.vercel.app/">
|
||||
<img src="https://avatars.githubusercontent.com/u/83594610?v=4" width="100px;" alt="Siddharth Suresh avatar" /><br />
|
||||
<sub>
|
||||
<b>Siddharth Suresh</b>
|
||||
</sub>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- markdownlint-enable -->
|
||||
@@ -534,7 +508,7 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
|
||||
<td align="center"><a href="https://bhanuteja.dev/"><img src="https://avatars.githubusercontent.com/u/17903466?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bhanu Teja Pachipulusu</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=pbteja1998" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://twitter.com/pavestru"><img src="https://avatars.githubusercontent.com/u/10186479?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pavel Struhar</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=pavestru" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://in-thepink.com/"><img src="https://avatars.githubusercontent.com/u/42126368?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Reo Ishiyama</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=reo777" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://macwright.com/"><img src="https://avatars.githubusercontent.com/u/32314?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tom MacWright</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tmcw" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://macwright.com/"><img src="https://avatars.githubusercontent.com/u/32314?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tom MacWright</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tmcw" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=tmcw" title="Tests">⚠️</a> <a href="https://github.com/blitz-js/blitz/commits?author=tmcw" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://francoisbest.com"><img src="https://avatars.githubusercontent.com/u/1174092?v=4?s=100" width="100px;" alt=""/><br /><sub><b>François Best</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=franky47" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -616,12 +590,12 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
|
||||
<td align="center"><a href="https://github.com/ricardo-rp"><img src="https://avatars.githubusercontent.com/u/30808767?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ricardo Romero</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ricardo-rp" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="exocortex.anothernode.com"><img src="https://avatars.githubusercontent.com/u/3286144?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Moritz Reiter</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=anothernode" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://msich.dev"><img src="https://avatars.githubusercontent.com/u/38794918?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt Sichterman</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=msichterman" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/medihack"><img src="https://avatars.githubusercontent.com/u/120626?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kai Schlamp</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=medihack" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/medihack"><img src="https://avatars.githubusercontent.com/u/120626?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kai Schlamp</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=medihack" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=medihack" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://muyiwa.me"><img src="https://avatars.githubusercontent.com/u/6832244?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Muyiwa Olu</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=muyiwaolu" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://2hr.me/"><img src="https://avatars.githubusercontent.com/u/4346154?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rabbi Hossain</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=rabbihossain" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/bravo-kernel"><img src="https://avatars.githubusercontent.com/u/230500?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bravo-kernel</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=bravo-kernel" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/bravo-kernel"><img src="https://avatars.githubusercontent.com/u/230500?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bravo-kernel</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=bravo-kernel" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=bravo-kernel" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://samholmes.net"><img src="https://avatars.githubusercontent.com/u/8385528?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sam Holmes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sam3d" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://doncicuto.medium.com"><img src="https://avatars.githubusercontent.com/u/30386061?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Miguel Cabrerizo</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=doncicuto" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=doncicuto" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="http://zackhobson.com/"><img src="https://avatars.githubusercontent.com/u/12092?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zack Hobson</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=zenhob" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=zenhob" title="Documentation">📖</a></td>
|
||||
@@ -723,11 +697,26 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
|
||||
<td align="center"><a href="https://chaiwattsw.com/"><img src="https://avatars.githubusercontent.com/u/30198386?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chaiwat Trisuwan</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=chaiwattsw" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=chaiwattsw" title="Code">💻</a></td>
|
||||
<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><a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Tests">⚠️</a> <a href="#maintenance-siddhsuresh" title="Maintenance">🚧</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> <a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Tests">⚠️</a> <a href="#maintenance-siddhsuresh" title="Maintenance">🚧</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>
|
||||
<td align="center"><a href="https://github.com/oloost"><img src="https://avatars.githubusercontent.com/u/72395941?v=4?s=100" width="100px;" alt=""/><br /><sub><b>oloost</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=oloost" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/janvennemann"><img src="https://avatars.githubusercontent.com/u/1406024?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan Vennemann</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=janvennemann" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=janvennemann" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://kevinjones.engineer"><img src="https://avatars.githubusercontent.com/u/20748598?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kevin Jones</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=joneskj55" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/paulm17"><img src="https://avatars.githubusercontent.com/u/387463?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Paul</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=paulm17" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=paulm17" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=paulm17" title="Tests">⚠️</a></td>
|
||||
<td align="center"><a href="https://github.com/selcukfatihsevinc"><img src="https://avatars.githubusercontent.com/u/384836?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Selçuk Fatih Sevinç</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=selcukfatihsevinc" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=selcukfatihsevinc" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/usamaster"><img src="https://avatars.githubusercontent.com/u/5255330?v=4?s=100" width="100px;" alt=""/><br /><sub><b>usamaster</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=usamaster" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="a11rew.dev"><img src="https://avatars.githubusercontent.com/u/87580113?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Glago</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=a11rew" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=a11rew" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://tobiasjordans.de"><img src="https://avatars.githubusercontent.com/u/111561?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tobias</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Tests">⚠️</a></td>
|
||||
<td align="center"><a href="https://www.linkedin.com/in/iagor-moraes/"><img src="https://avatars.githubusercontent.com/u/13892132?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Iagor Moraes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=iagormoraes" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=iagormoraes" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://twitter.com/trensik"><img src="https://avatars.githubusercontent.com/u/18584155?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dawid Urbaniak</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=Trancever" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=Trancever" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/jhonnymichel"><img src="https://avatars.githubusercontent.com/u/7006387?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jhonny Michel</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jhonnymichel" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=jhonnymichel" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=jhonnymichel" title="Tests">⚠️</a></td>
|
||||
<td align="center"><a href="sweetliquid.me"><img src="https://avatars.githubusercontent.com/u/18693190?v=4?s=100" width="100px;" alt=""/><br /><sub><b>sweetliquid</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sweetliquid" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/exKAZUu"><img src="https://avatars.githubusercontent.com/u/436237?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sakamoto, Kazunori</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=exKAZUu" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=exKAZUu" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ Here is the starting structure of your app.
|
||||
|
||||
```
|
||||
__name__
|
||||
├── app/
|
||||
├── src/
|
||||
│ ├── api/
|
||||
│ ├── auth/
|
||||
│ │ ├── components/
|
||||
@@ -131,7 +131,7 @@ __name__
|
||||
|
||||
These files are:
|
||||
|
||||
- The `app/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
- The `src/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
|
||||
- `db/` is where your database configuration goes. If you’re writing models or checking migrations, this is where to go.
|
||||
|
||||
|
||||
@@ -27,38 +27,40 @@
|
||||
"@blitzjs/config": "workspace:*",
|
||||
"@blitzjs/next": "workspace:*",
|
||||
"@blitzjs/rpc": "workspace:*",
|
||||
"@hookform/resolvers": "2.8.8",
|
||||
"@prisma/client": "4.0.0",
|
||||
"blitz": "workspace:2.0.0-beta.11",
|
||||
"@hookform/error-message": "2.0.0",
|
||||
"@hookform/resolvers": "2.9.10",
|
||||
"@prisma/client": "4.6.1",
|
||||
"blitz": "workspace:2.0.0-beta.23",
|
||||
"next": "12.2.5",
|
||||
"openid-client": "5.1.8",
|
||||
"prisma": "4.0.0",
|
||||
"openid-client": "5.2.1",
|
||||
"prisma": "4.6.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-hook-form": "7.29.0",
|
||||
"ts-node": "10.7.0",
|
||||
"zod": "3.17.3"
|
||||
"react-hook-form": "7.39.1",
|
||||
"ts-node": "10.9.1",
|
||||
"zod": "3.20.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "12.0.8",
|
||||
"@testing-library/react": "13.0.0",
|
||||
"@testing-library/react-hooks": "7.0.2",
|
||||
"@types/jest": "27.4.1",
|
||||
"@types/node": "17.0.16",
|
||||
"@testing-library/react": "13.4.0",
|
||||
"@testing-library/react-hooks": "8.0.1",
|
||||
"@types/jest": "29.2.2",
|
||||
"@types/node": "18.11.9",
|
||||
"@types/preview-email": "2.0.1",
|
||||
"@types/react": "18.0.17",
|
||||
"@typescript-eslint/eslint-plugin": "5.9.1",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-next": "12.2.0",
|
||||
"@types/react": "18.0.25",
|
||||
"@typescript-eslint/eslint-plugin": "5.42.1",
|
||||
"eslint": "8.27.0",
|
||||
"eslint-config-next": "12.3.1",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"husky": "7.0.4",
|
||||
"jest": "27.5.1",
|
||||
"lint-staged": "12.1.7",
|
||||
"prettier": "^2.5.1",
|
||||
"prettier-plugin-prisma": "3.8.0",
|
||||
"husky": "8.0.2",
|
||||
"jest": "29.3.0",
|
||||
"jest-environment-jsdom": "29.3.0",
|
||||
"lint-staged": "13.0.3",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier-plugin-prisma": "4.4.0",
|
||||
"pretty-quick": "3.1.3",
|
||||
"preview-email": "3.x",
|
||||
"typescript": "^4.5.3"
|
||||
"preview-email": "3.0.7",
|
||||
"typescript": "^4.8.4"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
import { Suspense } from "react"
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { useCurrentUser } from "app/users/hooks/useCurrentUser"
|
||||
import logout from "app/auth/mutations/logout"
|
||||
import logo from "public/logo.png"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import { Routes, BlitzPage } from "@blitzjs/next"
|
||||
|
||||
/*
|
||||
* This file is just for a pleasant getting started page for your new app.
|
||||
* You can delete everything in here and start from scratch if you like.
|
||||
*/
|
||||
|
||||
const UserInfo = () => {
|
||||
const currentUser = useCurrentUser()
|
||||
const [logoutMutation] = useMutation(logout)
|
||||
|
||||
if (currentUser) {
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
className="button small"
|
||||
onClick={async () => {
|
||||
await logoutMutation()
|
||||
}}
|
||||
>
|
||||
Logout
|
||||
</button>
|
||||
<div>
|
||||
User id: <code>{currentUser.id}</code>
|
||||
<br />
|
||||
User role: <code>{currentUser.role}</code>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
<Link href={Routes.SignupPage()} passHref>
|
||||
<a className="button small">
|
||||
<strong>Sign Up</strong>
|
||||
</a>
|
||||
</Link>
|
||||
<Link href={Routes.LoginPage()} passHref>
|
||||
<a className="button small">
|
||||
<strong>Login</strong>
|
||||
</a>
|
||||
</Link>
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const Home: BlitzPage = () => {
|
||||
return (
|
||||
<Layout title="Home">
|
||||
<div className="container">
|
||||
<main>
|
||||
<div className="logo">
|
||||
<Image src={`${logo.src}`} alt="blitzjs" width="256px" height="118px" layout="fixed" />
|
||||
</div>
|
||||
<p>
|
||||
<strong>Congrats!</strong> Your app is ready, including user sign-up and log-in.
|
||||
</p>
|
||||
<div className="buttons" style={{ marginTop: "1rem", marginBottom: "1rem" }}>
|
||||
<Suspense fallback="Loading...">
|
||||
<UserInfo />
|
||||
</Suspense>
|
||||
</div>
|
||||
<p>
|
||||
<strong>
|
||||
To add a new model to your app, <br />
|
||||
run the following in your terminal:
|
||||
</strong>
|
||||
</p>
|
||||
<pre>
|
||||
<code>blitz generate all project name:string</code>
|
||||
</pre>
|
||||
<div style={{ marginBottom: "1rem" }}>(And select Yes to run prisma migrate)</div>
|
||||
<div>
|
||||
<p>
|
||||
Then <strong>restart the server</strong>
|
||||
</p>
|
||||
<pre>
|
||||
<code>Ctrl + c</code>
|
||||
</pre>
|
||||
<pre>
|
||||
<code>blitz dev</code>
|
||||
</pre>
|
||||
<p>
|
||||
and go to{" "}
|
||||
<Link href="/projects">
|
||||
<a>/projects</a>
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
<div className="buttons" style={{ marginTop: "5rem" }}>
|
||||
<a
|
||||
className="button"
|
||||
href="https://blitzjs.com/docs/getting-started?utm_source=blitz-new&utm_medium=app-template&utm_campaign=blitz-new"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Documentation
|
||||
</a>
|
||||
<a
|
||||
className="button-outline"
|
||||
href="https://github.com/blitz-js/blitz"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Github Repo
|
||||
</a>
|
||||
<a
|
||||
className="button-outline"
|
||||
href="https://discord.blitzjs.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Discord Community
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<a
|
||||
href="https://blitzjs.com?utm_source=blitz-new&utm_medium=app-template&utm_campaign=blitz-new"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Powered by Blitz.js
|
||||
</a>
|
||||
</footer>
|
||||
|
||||
<style jsx global>{`
|
||||
@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@300;700&display=swap");
|
||||
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
|
||||
Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 5rem 0;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
main p {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
border-top: 1px solid #eaeaea;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #45009d;
|
||||
}
|
||||
|
||||
footer a {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
footer a {
|
||||
color: #f4f4f4;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
grid-gap: 0.5rem;
|
||||
}
|
||||
.button {
|
||||
font-size: 1rem;
|
||||
background-color: #6700eb;
|
||||
padding: 1rem 2rem;
|
||||
color: #f4f4f4;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button.small {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background-color: #45009d;
|
||||
}
|
||||
|
||||
.button-outline {
|
||||
border: 2px solid #6700eb;
|
||||
padding: 1rem 2rem;
|
||||
color: #6700eb;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button-outline:hover {
|
||||
border-color: #45009d;
|
||||
color: #45009d;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #fafafa;
|
||||
border-radius: 5px;
|
||||
padding: 0.75rem;
|
||||
text-align: center;
|
||||
}
|
||||
code {
|
||||
font-size: 0.9rem;
|
||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
||||
Bitstream Vera Sans Mono, Courier New, monospace;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
max-width: 800px;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.grid {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
export default Home
|
||||
@@ -1,9 +1,9 @@
|
||||
import { AuthenticationError, PromiseReturnType } from "blitz"
|
||||
import Link from "next/link"
|
||||
import { LabeledTextField } from "app/core/components/LabeledTextField"
|
||||
import { Form, FORM_ERROR } from "app/core/components/Form"
|
||||
import login from "app/auth/mutations/login"
|
||||
import { Login } from "app/auth/validations"
|
||||
import { LabeledTextField } from "src/core/components/LabeledTextField"
|
||||
import { Form, FORM_ERROR } from "src/core/components/Form"
|
||||
import login from "src/auth/mutations/login"
|
||||
import { Login } from "src/auth/validations"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import { Routes } from "@blitzjs/next"
|
||||
|
||||
@@ -41,7 +41,7 @@ export const LoginForm = (props: LoginFormProps) => {
|
||||
<LabeledTextField name="password" label="Password" placeholder="Password" type="password" />
|
||||
<div>
|
||||
<Link href={Routes.ForgotPasswordPage()}>
|
||||
<a>Forgot your password?</a>
|
||||
Forgot your password?
|
||||
</Link>
|
||||
</div>
|
||||
</Form>
|
||||
@@ -49,7 +49,7 @@ export const LoginForm = (props: LoginFormProps) => {
|
||||
<div style={{ marginTop: "1rem" }}>
|
||||
Or{" "}
|
||||
<Link href={Routes.SignupPage()}>
|
||||
<a>Sign Up</a>
|
||||
Sign Up
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
import { LabeledTextField } from "app/core/components/LabeledTextField"
|
||||
import { Form, FORM_ERROR } from "app/core/components/Form"
|
||||
import signup from "app/auth/mutations/signup"
|
||||
import { Signup } from "app/auth/validations"
|
||||
import { LabeledTextField } from "src/core/components/LabeledTextField"
|
||||
import { Form, FORM_ERROR } from "src/core/components/Form"
|
||||
import signup from "src/auth/mutations/signup"
|
||||
import { Signup } from "src/auth/validations"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
|
||||
type SignupFormProps = {
|
||||
@@ -9,7 +9,7 @@ export default resolver.pipe(
|
||||
resolver.zod(ChangePassword),
|
||||
resolver.authorize(),
|
||||
async ({ currentPassword, newPassword }, ctx) => {
|
||||
const user = await db.user.findFirst({ where: { id: ctx.session.userId as number } })
|
||||
const user = await db.user.findFirst({ where: { id: ctx.session.userId } })
|
||||
if (!user) throw new NotFoundError()
|
||||
|
||||
await authenticateUser(user.email, currentPassword)
|
||||
@@ -2,6 +2,7 @@ import { setupBlitzServer } from "@blitzjs/next"
|
||||
import { AuthServerPlugin, PrismaStorage } from "@blitzjs/auth"
|
||||
import db from "db"
|
||||
import { simpleRolesIsAuthorized } from "@blitzjs/auth"
|
||||
import { BlitzLogger } from "blitz"
|
||||
|
||||
const { gSSP, gSP, api } = setupBlitzServer({
|
||||
plugins: [
|
||||
@@ -11,6 +12,7 @@ const { gSSP, gSP, api } = setupBlitzServer({
|
||||
isAuthorized: simpleRolesIsAuthorized,
|
||||
}),
|
||||
],
|
||||
logger: BlitzLogger({}),
|
||||
})
|
||||
|
||||
export { gSSP, gSP, api }
|
||||
@@ -1,5 +1,6 @@
|
||||
import { forwardRef, PropsWithoutRef, ComponentPropsWithoutRef } from "react"
|
||||
import { useFormContext } from "react-hook-form"
|
||||
import { ErrorMessage } from "@hookform/error-message"
|
||||
|
||||
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
|
||||
/** Field name. */
|
||||
@@ -18,9 +19,6 @@ export const LabeledTextField = forwardRef<HTMLInputElement, LabeledTextFieldPro
|
||||
register,
|
||||
formState: { isSubmitting, errors },
|
||||
} = useFormContext()
|
||||
const error = Array.isArray(errors[name])
|
||||
? errors[name].join(", ")
|
||||
: errors[name]?.message || errors[name]
|
||||
|
||||
return (
|
||||
<div {...outerProps}>
|
||||
@@ -29,11 +27,15 @@ export const LabeledTextField = forwardRef<HTMLInputElement, LabeledTextFieldPro
|
||||
<input disabled={isSubmitting} {...register(name)} {...props} />
|
||||
</label>
|
||||
|
||||
{error && (
|
||||
<div role="alert" style={{ color: "red" }}>
|
||||
{error}
|
||||
</div>
|
||||
)}
|
||||
<ErrorMessage
|
||||
render={({ message }) => (
|
||||
<div role="alert" style={{ color: "red" }}>
|
||||
{message}
|
||||
</div>
|
||||
)}
|
||||
errors={errors}
|
||||
name={name}
|
||||
/>
|
||||
|
||||
<style jsx>{`
|
||||
label {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ErrorFallbackProps, ErrorComponent, ErrorBoundary, AppProps } from "@blitzjs/next"
|
||||
import { AuthenticationError, AuthorizationError } from "blitz"
|
||||
import React from "react"
|
||||
import { withBlitz } from "app/blitz-client"
|
||||
import { withBlitz } from "src/blitz-client"
|
||||
|
||||
function RootErrorFallback({ error }: ErrorFallbackProps) {
|
||||
if (error instanceof AuthenticationError) {
|
||||
@@ -1,5 +1,5 @@
|
||||
import { passportAuth } from "@blitzjs/auth"
|
||||
import { api } from "app/blitz-server"
|
||||
import { api } from "src/blitz-server"
|
||||
import db, { User } from "db"
|
||||
import { Issuer, Strategy as OpenIdStrategy } from "openid-client"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { rpcHandler } from "@blitzjs/rpc"
|
||||
import { api } from "app/blitz-server"
|
||||
import { api } from "src/blitz-server"
|
||||
|
||||
export default api(rpcHandler({ onError: console.log }))
|
||||
@@ -1,8 +1,8 @@
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { LabeledTextField } from "app/core/components/LabeledTextField"
|
||||
import { Form, FORM_ERROR } from "app/core/components/Form"
|
||||
import { ForgotPassword } from "app/auth/validations"
|
||||
import forgotPassword from "app/auth/mutations/forgotPassword"
|
||||
import Layout from "src/core/layouts/Layout"
|
||||
import { LabeledTextField } from "src/core/components/LabeledTextField"
|
||||
import { Form, FORM_ERROR } from "src/core/components/Form"
|
||||
import { ForgotPassword } from "src/auth/validations"
|
||||
import forgotPassword from "src/auth/mutations/forgotPassword"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import { BlitzPage } from "@blitzjs/next"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { LoginForm } from "app/auth/components/LoginForm"
|
||||
import Layout from "src/core/layouts/Layout"
|
||||
import { LoginForm } from "src/auth/components/LoginForm"
|
||||
import { useRouter } from "next/router"
|
||||
import { BlitzPage } from "@blitzjs/next"
|
||||
import Link from "next/link"
|
||||
@@ -1,8 +1,8 @@
|
||||
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 Layout from "src/core/layouts/Layout"
|
||||
import { LabeledTextField } from "src/core/components/LabeledTextField"
|
||||
import { Form, FORM_ERROR } from "src/core/components/Form"
|
||||
import { ResetPassword } from "src/auth/validations"
|
||||
import resetPassword from "src/auth/mutations/resetPassword"
|
||||
import { BlitzPage, Routes } from "@blitzjs/next"
|
||||
import { useRouter } from "next/router"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useRouter } from "next/router"
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { SignupForm } from "app/auth/components/SignupForm"
|
||||
import Layout from "src/core/layouts/Layout"
|
||||
import { SignupForm } from "src/auth/components/SignupForm"
|
||||
import { BlitzPage, Routes } from "@blitzjs/next"
|
||||
|
||||
const SignupPage: BlitzPage = () => {
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Suspense } from "react"
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import Layout from "app/core/layouts/Layout"
|
||||
import { useCurrentUser } from "app/users/hooks/useCurrentUser"
|
||||
import logout from "app/auth/mutations/logout"
|
||||
import Layout from "src/core/layouts/Layout"
|
||||
import { useCurrentUser } from "src/users/hooks/useCurrentUser"
|
||||
import logout from "src/auth/mutations/logout"
|
||||
import logo from "public/logo.png"
|
||||
import { useMutation } from "@blitzjs/rpc"
|
||||
import { Routes, BlitzPage } from "@blitzjs/next"
|
||||
@@ -38,15 +38,11 @@ const UserInfo = () => {
|
||||
} else {
|
||||
return (
|
||||
<>
|
||||
<Link href={Routes.SignupPage()}>
|
||||
<a className="button small">
|
||||
<strong>Sign Up</strong>
|
||||
</a>
|
||||
<Link href={Routes.SignupPage()}className="button small">
|
||||
<strong>Sign Up</strong>
|
||||
</Link>
|
||||
<Link href={Routes.LoginPage()}>
|
||||
<a className="button small">
|
||||
<strong>Login</strong>
|
||||
</a>
|
||||
<Link href={Routes.LoginPage()} className="button small">
|
||||
<strong>Login</strong>
|
||||
</Link>
|
||||
</>
|
||||
)
|
||||
@@ -90,10 +86,7 @@ const Home: BlitzPage = () => {
|
||||
<code>blitz dev</code>
|
||||
</pre>
|
||||
<p>
|
||||
and go to{" "}
|
||||
<Link href="/projects">
|
||||
<a>/projects</a>
|
||||
</Link>
|
||||
and go to <Link href="/projects">/projects</Link>
|
||||
</p>
|
||||
</div>
|
||||
<div className="buttons" style={{ marginTop: "5rem" }}>
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useQuery } from "@blitzjs/rpc"
|
||||
import getCurrentUser from "app/users/queries/getCurrentUser"
|
||||
import getCurrentUser from "src/users/queries/getCurrentUser"
|
||||
|
||||
export const useCurrentUser = () => {
|
||||
const [user] = useQuery(getCurrentUser, null)
|
||||
@@ -5,7 +5,7 @@ export default async function getCurrentUser(_ = null, { session }: Ctx) {
|
||||
if (!session.userId) return null
|
||||
|
||||
const user = await db.user.findFirst({
|
||||
where: { id: session.userId as number },
|
||||
where: { id: session.userId },
|
||||
select: { id: true, name: true, email: true, role: true },
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@ TODO
|
||||
|
||||
This is a [Blitz.js](https://github.com/blitz-js/blitz) app.
|
||||
|
||||
# ****name****
|
||||
# \***\*name\*\***
|
||||
|
||||
## Getting Started
|
||||
|
||||
@@ -38,7 +38,7 @@ Runs your tests using Jest.
|
||||
yarn test
|
||||
```
|
||||
|
||||
Blitz comes with a test setup using [Jest](https://jestjs.io/) and [react-testing-library](https://testing-library.com/).
|
||||
Blitz comes with a test setup using [Vitest](https://vitest.dev/) and [react-testing-library](https://testing-library.com/).
|
||||
|
||||
## Commands
|
||||
|
||||
@@ -67,7 +67,7 @@ Here is the starting structure of your app.
|
||||
|
||||
```
|
||||
__name__
|
||||
├── app/
|
||||
├── src/
|
||||
│ ├── api/
|
||||
│ ├── auth/
|
||||
│ │ ├── components/
|
||||
@@ -122,7 +122,7 @@ __name__
|
||||
├── .eslintrc.js
|
||||
├── babel.config.js
|
||||
├── blitz.config.ts
|
||||
├── jest.config.ts
|
||||
├── vitest.config.ts
|
||||
├── package.json
|
||||
├── README.md
|
||||
├── tsconfig.json
|
||||
@@ -131,7 +131,7 @@ __name__
|
||||
|
||||
These files are:
|
||||
|
||||
- The `app/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
- The `src/` folder is a container for most of your project. This is where you’ll put any pages or API routes.
|
||||
|
||||
- `db/` is where your database configuration goes. If you’re writing models or checking migrations, this is where to go.
|
||||
|
||||
@@ -149,7 +149,7 @@ These files are:
|
||||
|
||||
- `blitz.config.ts` is for advanced custom configuration of Blitz. [Here you can learn how to use it](https://blitzjs.com/docs/blitz-config).
|
||||
|
||||
- `jest.config.js` contains config for Jest tests. You can [customize it if needed](https://jestjs.io/docs/en/configuration).
|
||||
- `vitest.config.ts` contains config for Vitest tests. You can [customize it if needed](https://vitejs.dev/config/).
|
||||
|
||||
You can read more about it in the [File Structure](https://blitzjs.com/docs/file-structure) section of the documentation.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user