Compare commits
37 Commits
fix-javasc
...
@blitzjs/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1bffdf3d6 | ||
|
|
8b01175b47 | ||
|
|
0f1beb55b7 | ||
|
|
82649f3415 | ||
|
|
231c2ff5ab | ||
|
|
47c6b62dcb | ||
|
|
cf393786c0 | ||
|
|
8d29b8afa9 | ||
|
|
f8bf8af28f | ||
|
|
8255172940 | ||
|
|
90f1741dac | ||
|
|
df3265b854 | ||
|
|
0ba2f4e77a | ||
|
|
da76acc90a | ||
|
|
c5572bec6e | ||
|
|
727734955a | ||
|
|
831a493ab6 | ||
|
|
b6b9a1c5a4 | ||
|
|
61888d1a30 | ||
|
|
7aef610d85 | ||
|
|
b266254247 | ||
|
|
67e00d9108 | ||
|
|
d25c965bc8 | ||
|
|
1bb3a65566 | ||
|
|
28b0ffeb5f | ||
|
|
c7ac86b857 | ||
|
|
5166e5e037 | ||
|
|
2533caf484 | ||
|
|
85a71ffef9 | ||
|
|
803f533a3d | ||
|
|
63ee9423a9 | ||
|
|
89446b3656 | ||
|
|
5a64f1c39c | ||
|
|
fa30de4599 | ||
|
|
3d004dc415 | ||
|
|
08fbede75e | ||
|
|
eda14fa8aa |
@@ -3896,6 +3896,85 @@
|
|||||||
"doc",
|
"doc",
|
||||||
"code"
|
"code"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "dbrxnds",
|
||||||
|
"name": "David",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/32268383?v=4",
|
||||||
|
"profile": "https://github.com/dbrxnds",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code",
|
||||||
|
"test"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "gjmoed",
|
||||||
|
"name": "G.J. Moed",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/4458993?v=4",
|
||||||
|
"profile": "https://github.com/gjmoed",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "GHKEN",
|
||||||
|
"name": "Tetsuya Fukuda",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/5304351?v=4",
|
||||||
|
"profile": "https://ghken.com",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "nerixim",
|
||||||
|
"name": "Nikita Kamaev",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/26106502?v=4",
|
||||||
|
"profile": "https://github.com/nerixim",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "nikola-wd",
|
||||||
|
"name": "Nikola Ivanov",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/11588823?v=4",
|
||||||
|
"profile": "https://webredone.com/",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "jayu",
|
||||||
|
"name": "Jakub Mazurek",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/11561585?v=4",
|
||||||
|
"profile": "jayu.dev",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "maciej-ka",
|
||||||
|
"name": "Maciej Kasprzyk",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/5403694?v=4",
|
||||||
|
"profile": "https://github.com/maciej-ka",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "justinsmid",
|
||||||
|
"name": "Justin Smid",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/34271675?v=4",
|
||||||
|
"profile": "https://github.com/justinsmid",
|
||||||
|
"contributions": [
|
||||||
|
"doc",
|
||||||
|
"code"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
|
|||||||
9
.changeset/big-turtles-tease.md
Normal file
9
.changeset/big-turtles-tease.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/auth": patch
|
||||||
|
"@blitzjs/next": patch
|
||||||
|
"@blitzjs/rpc": patch
|
||||||
|
"blitz": patch
|
||||||
|
"@blitzjs/generator": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
(feat) upgrade tslog to v4.8.2
|
||||||
6
.changeset/chatty-gifts-whisper.md
Normal file
6
.changeset/chatty-gifts-whisper.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/next": minor
|
||||||
|
"@blitzjs/rpc": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add ability to format the error on the server before returning it to the client.
|
||||||
5
.changeset/chilly-jeans-fix.md
Normal file
5
.changeset/chilly-jeans-fix.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/generator": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update examples of generate all in docs to include one column in model.
|
||||||
9
.changeset/clever-hornets-talk.md
Normal file
9
.changeset/clever-hornets-talk.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
"blitz": patch
|
||||||
|
"@blitzjs/next": patch
|
||||||
|
"@blitzjs/generator": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Upgrade tslog to `4.9.0`.
|
||||||
|
|
||||||
|
This due a [tslog issue](https://github.com/fullstack-build/tslog/issues/227) that causes tslog to crash when attempting to log an error whose constructor expects more than one argument.
|
||||||
6
.changeset/curvy-drinks-perform.md
Normal file
6
.changeset/curvy-drinks-perform.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/auth": patch
|
||||||
|
"blitz": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
blitz-auth: Fix webpack from following next-auth
|
||||||
5
.changeset/few-elephants-approve.md
Normal file
5
.changeset/few-elephants-approve.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/rpc": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix return type of `requestMiddlewares` in `RpcServerPlugin`
|
||||||
8
.changeset/fifty-drinks-cry.md
Normal file
8
.changeset/fifty-drinks-cry.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/auth": patch
|
||||||
|
"blitz": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
blitz-auth: Support for Prisma v5
|
||||||
|
|
||||||
|
Internal: Make `handle` a required paramter while updating the `session` modal.
|
||||||
5
.changeset/fresh-camels-return.md
Normal file
5
.changeset/fresh-camels-return.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/auth": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Updated `useAuthenticatedBlitzContext` to now return `AuthenticatedCtx`
|
||||||
5
.changeset/fresh-crews-chew.md
Normal file
5
.changeset/fresh-crews-chew.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/next": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix the DYNAMIC_SERVER_USAGE error for Next.js 13.3.1+
|
||||||
26
.changeset/good-oranges-pretend.md
Normal file
26
.changeset/good-oranges-pretend.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/rpc": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes enormous memory consumption of the dev server by changing the default import strategy to "require" instead of "import" which in webpack causes multiple chunks to be created for each import.
|
||||||
|
|
||||||
|
## Blitz Configuration
|
||||||
|
|
||||||
|
To configure this behaviour, you can add the following to your next.config.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
/**
|
||||||
|
* @type {import('@blitzjs/next').BlitzConfig}
|
||||||
|
**/
|
||||||
|
const config = {
|
||||||
|
blitz: {
|
||||||
|
resolversDynamicImport: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
When `resolversDynamicImport` is set to `true`, the import strategy will be "import" instead of "require".
|
||||||
|
|
||||||
|
### On Vercel
|
||||||
|
|
||||||
|
If you are using Vercel, `resolversDynamicImport` will be set to `true` by default, since it is better for the separate chunks to be create for serverless lambdas.
|
||||||
5
.changeset/large-hairs-battle.md
Normal file
5
.changeset/large-hairs-battle.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/generator": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Make Next.js version stick to 13.4.5 when generating a new app
|
||||||
5
.changeset/moody-crews-travel.md
Normal file
5
.changeset/moody-crews-travel.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/auth": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Stop exporting `useAuthenticatedBlitzContext` from `@blitzjs/auth` this must be imported from `app/blitz-server.ts` file in order to work correctly
|
||||||
5
.changeset/poor-crabs-drum.md
Normal file
5
.changeset/poor-crabs-drum.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"blitz": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
blitz-rpc: Cleanup Event Listeners - Fix potential memory leak by cleaning up any residual event listeners set by blitz.
|
||||||
@@ -55,6 +55,7 @@
|
|||||||
"afraid-ears-repair",
|
"afraid-ears-repair",
|
||||||
"big-boats-lay",
|
"big-boats-lay",
|
||||||
"big-phones-bow",
|
"big-phones-bow",
|
||||||
|
"big-turtles-tease",
|
||||||
"blue-flowers-peel",
|
"blue-flowers-peel",
|
||||||
"blue-pigs-tan",
|
"blue-pigs-tan",
|
||||||
"brave-zebras-deny",
|
"brave-zebras-deny",
|
||||||
@@ -70,12 +71,15 @@
|
|||||||
"calm-papayas-protect",
|
"calm-papayas-protect",
|
||||||
"calm-tomatoes-drive",
|
"calm-tomatoes-drive",
|
||||||
"chatty-fireants-leave",
|
"chatty-fireants-leave",
|
||||||
|
"chatty-gifts-whisper",
|
||||||
"chilled-carrots-own",
|
"chilled-carrots-own",
|
||||||
"chilly-candles-care",
|
"chilly-candles-care",
|
||||||
|
"chilly-jeans-fix",
|
||||||
"chilly-nails-nail",
|
"chilly-nails-nail",
|
||||||
"clean-hats-pump",
|
"clean-hats-pump",
|
||||||
"clean-hounds-laugh",
|
"clean-hounds-laugh",
|
||||||
"clean-walls-wink",
|
"clean-walls-wink",
|
||||||
|
"clever-hornets-talk",
|
||||||
"clever-radios-lie",
|
"clever-radios-lie",
|
||||||
"cool-doors-invent",
|
"cool-doors-invent",
|
||||||
"cool-horses-check",
|
"cool-horses-check",
|
||||||
@@ -84,6 +88,7 @@
|
|||||||
"curly-rules-speak",
|
"curly-rules-speak",
|
||||||
"curly-seas-serve",
|
"curly-seas-serve",
|
||||||
"curvy-days-attend",
|
"curvy-days-attend",
|
||||||
|
"curvy-drinks-perform",
|
||||||
"cyan-bulldogs-heal",
|
"cyan-bulldogs-heal",
|
||||||
"cyan-cars-greet",
|
"cyan-cars-greet",
|
||||||
"dirty-monkeys-greet",
|
"dirty-monkeys-greet",
|
||||||
@@ -108,8 +113,10 @@
|
|||||||
"fast-toys-wash",
|
"fast-toys-wash",
|
||||||
"fast-trainers-kneel",
|
"fast-trainers-kneel",
|
||||||
"few-dogs-fetch",
|
"few-dogs-fetch",
|
||||||
|
"few-elephants-approve",
|
||||||
"few-hounds-worry",
|
"few-hounds-worry",
|
||||||
"few-shrimps-leave",
|
"few-shrimps-leave",
|
||||||
|
"fifty-drinks-cry",
|
||||||
"flat-bees-approve",
|
"flat-bees-approve",
|
||||||
"fluffy-coats-flow",
|
"fluffy-coats-flow",
|
||||||
"fluffy-mangos-begin",
|
"fluffy-mangos-begin",
|
||||||
@@ -119,6 +126,8 @@
|
|||||||
"four-meals-fry",
|
"four-meals-fry",
|
||||||
"four-radios-tickle",
|
"four-radios-tickle",
|
||||||
"four-sheep-judge",
|
"four-sheep-judge",
|
||||||
|
"fresh-camels-return",
|
||||||
|
"fresh-crews-chew",
|
||||||
"funny-cups-pay",
|
"funny-cups-pay",
|
||||||
"fuzzy-bees-warn",
|
"fuzzy-bees-warn",
|
||||||
"fuzzy-dots-cross",
|
"fuzzy-dots-cross",
|
||||||
@@ -131,6 +140,7 @@
|
|||||||
"gold-horses-punch",
|
"gold-horses-punch",
|
||||||
"good-apes-drum",
|
"good-apes-drum",
|
||||||
"good-insects-wink",
|
"good-insects-wink",
|
||||||
|
"good-oranges-pretend",
|
||||||
"gorgeous-birds-warn",
|
"gorgeous-birds-warn",
|
||||||
"gorgeous-buses-scream",
|
"gorgeous-buses-scream",
|
||||||
"gorgeous-games-obey",
|
"gorgeous-games-obey",
|
||||||
@@ -160,6 +170,7 @@
|
|||||||
"khaki-ducks-cheer",
|
"khaki-ducks-cheer",
|
||||||
"khaki-pens-rest",
|
"khaki-pens-rest",
|
||||||
"kind-walls-suffer",
|
"kind-walls-suffer",
|
||||||
|
"large-hairs-battle",
|
||||||
"late-steaks-give",
|
"late-steaks-give",
|
||||||
"lazy-maps-sort",
|
"lazy-maps-sort",
|
||||||
"lemon-games-press",
|
"lemon-games-press",
|
||||||
@@ -185,6 +196,7 @@
|
|||||||
"modern-games-dream",
|
"modern-games-dream",
|
||||||
"modern-ligers-behave",
|
"modern-ligers-behave",
|
||||||
"moody-bags-walk",
|
"moody-bags-walk",
|
||||||
|
"moody-crews-travel",
|
||||||
"moody-spoons-rhyme",
|
"moody-spoons-rhyme",
|
||||||
"moody-squids-cheer",
|
"moody-squids-cheer",
|
||||||
"nasty-suns-wash",
|
"nasty-suns-wash",
|
||||||
@@ -195,6 +207,7 @@
|
|||||||
"nice-boxes-travel",
|
"nice-boxes-travel",
|
||||||
"nice-deers-dream",
|
"nice-deers-dream",
|
||||||
"nice-starfishes-live",
|
"nice-starfishes-live",
|
||||||
|
"nine-bags-rhyme",
|
||||||
"nine-birds-confess",
|
"nine-birds-confess",
|
||||||
"nine-onions-admire",
|
"nine-onions-admire",
|
||||||
"ninety-lies-press",
|
"ninety-lies-press",
|
||||||
@@ -216,6 +229,7 @@
|
|||||||
"plenty-gifts-provide",
|
"plenty-gifts-provide",
|
||||||
"plenty-kiwis-greet",
|
"plenty-kiwis-greet",
|
||||||
"polite-lizards-love",
|
"polite-lizards-love",
|
||||||
|
"poor-crabs-drum",
|
||||||
"poor-peas-lick",
|
"poor-peas-lick",
|
||||||
"poor-penguins-look",
|
"poor-penguins-look",
|
||||||
"poor-shrimps-think",
|
"poor-shrimps-think",
|
||||||
@@ -251,11 +265,13 @@
|
|||||||
"silly-peas-work",
|
"silly-peas-work",
|
||||||
"silly-shoes-agree",
|
"silly-shoes-agree",
|
||||||
"six-apricots-kick",
|
"six-apricots-kick",
|
||||||
|
"sixty-rockets-count",
|
||||||
"slimy-humans-impress",
|
"slimy-humans-impress",
|
||||||
"slimy-needles-taste",
|
"slimy-needles-taste",
|
||||||
"slow-impalas-tap",
|
"slow-impalas-tap",
|
||||||
"slow-walls-camp",
|
"slow-walls-camp",
|
||||||
"slow-walls-poke",
|
"slow-walls-poke",
|
||||||
|
"small-monkeys-battle",
|
||||||
"small-socks-confess",
|
"small-socks-confess",
|
||||||
"smooth-planets-admire",
|
"smooth-planets-admire",
|
||||||
"smooth-rice-clap",
|
"smooth-rice-clap",
|
||||||
@@ -285,6 +301,7 @@
|
|||||||
"tall-radios-clean",
|
"tall-radios-clean",
|
||||||
"tame-keys-reply",
|
"tame-keys-reply",
|
||||||
"tame-pumpkins-nail",
|
"tame-pumpkins-nail",
|
||||||
|
"tame-rocks-unite",
|
||||||
"tasty-maps-fetch",
|
"tasty-maps-fetch",
|
||||||
"tasty-news-collect",
|
"tasty-news-collect",
|
||||||
"tasty-squids-sin",
|
"tasty-squids-sin",
|
||||||
@@ -322,7 +339,9 @@
|
|||||||
"wicked-rings-walk",
|
"wicked-rings-walk",
|
||||||
"wise-eels-visit",
|
"wise-eels-visit",
|
||||||
"wise-frogs-give",
|
"wise-frogs-give",
|
||||||
|
"wise-lies-relate",
|
||||||
"wise-rabbits-complain",
|
"wise-rabbits-complain",
|
||||||
|
"yellow-numbers-serve",
|
||||||
"young-birds-talk"
|
"young-birds-talk"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
68
.changeset/sixty-rockets-count.md
Normal file
68
.changeset/sixty-rockets-count.md
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/rpc": patch
|
||||||
|
"blitz": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
### Now we can configure Blitz RPC in the following way,
|
||||||
|
|
||||||
|
In your `[[...blitz]].ts` api file you can see the following settings
|
||||||
|
```ts
|
||||||
|
logging?: {
|
||||||
|
/**
|
||||||
|
* allowList Represents the list of routes for which logging should be enabled
|
||||||
|
* If whiteList is defined then only those routes will be logged
|
||||||
|
*/
|
||||||
|
allowList?: string[]
|
||||||
|
/**
|
||||||
|
* blockList Represents the list of routes for which logging should be disabled
|
||||||
|
* If blockList is defined then all routes except those will be logged
|
||||||
|
*/
|
||||||
|
blockList?: string[]
|
||||||
|
/**
|
||||||
|
* verbose Represents the flag to enable/disable logging
|
||||||
|
* If verbose is true then Blitz RPC will log the input and output of each resolver
|
||||||
|
*/
|
||||||
|
verbose?: boolean
|
||||||
|
/**
|
||||||
|
* disablelevel Represents the flag to enable/disable logging for a particular level
|
||||||
|
*/
|
||||||
|
disablelevel?: "debug" | "info"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
```ts
|
||||||
|
import { rpcHandler } from "@blitzjs/rpc"
|
||||||
|
import { api } from "src/blitz-server"
|
||||||
|
|
||||||
|
export default api(
|
||||||
|
rpcHandler({
|
||||||
|
onError: console.log,
|
||||||
|
formatError: (error) => {
|
||||||
|
error.message = `FormatError handler: ${error.message}`
|
||||||
|
return error
|
||||||
|
},
|
||||||
|
logging: {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```ts
|
||||||
|
export default api(
|
||||||
|
rpcHandler({
|
||||||
|
onError: console.log,
|
||||||
|
formatError: (error) => {
|
||||||
|
error.message = `FormatError handler: ${error.message}`
|
||||||
|
return error
|
||||||
|
},
|
||||||
|
logging: {
|
||||||
|
verbose: true,
|
||||||
|
blockList: ["getCurrentUser", ...], //just write the resolver name [which is the resolver file name]
|
||||||
|
},
|
||||||
|
})
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
This is enable verbose blitz rpc logging for all resolvers except the resolvers `getCurrentUser` and others mentioned in the `blockList`
|
||||||
|
|
||||||
6
.changeset/small-monkeys-battle.md
Normal file
6
.changeset/small-monkeys-battle.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/auth": patch
|
||||||
|
"blitz": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix Next-Auth integration: `Unable to use next-auth with provider: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]`
|
||||||
5
.changeset/tame-rocks-unite.md
Normal file
5
.changeset/tame-rocks-unite.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"blitz": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix log formatting to not show the path of blitz rpc
|
||||||
5
.changeset/yellow-numbers-serve.md
Normal file
5
.changeset/yellow-numbers-serve.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@blitzjs/recipe-tailwind": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
support both directory style in tailwind recipe
|
||||||
26
.github/workflows/main.yml
vendored
26
.github/workflows/main.yml
vendored
@@ -7,8 +7,8 @@ on:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -17,9 +17,9 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
|
- uses: pnpm/action-setup@v2.2.4
|
||||||
with:
|
with:
|
||||||
version: 7.11.0
|
version: 8.6.5
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
@@ -38,9 +38,9 @@ jobs:
|
|||||||
name: Build
|
name: Build
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
|
- uses: pnpm/action-setup@v2.2.4
|
||||||
with:
|
with:
|
||||||
version: 7.11.0
|
version: 8.6.5
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
@@ -68,9 +68,9 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup PNPM
|
- name: Setup PNPM
|
||||||
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
|
uses: pnpm/action-setup@v2.2.4
|
||||||
with:
|
with:
|
||||||
version: 7.11.0
|
version: 8.6.5
|
||||||
|
|
||||||
- name: Setup node@16
|
- name: Setup node@16
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
@@ -127,14 +127,14 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup PNPM
|
- name: Setup PNPM
|
||||||
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
|
uses: pnpm/action-setup@v2.2.4
|
||||||
with:
|
with:
|
||||||
version: 7.11.0
|
version: 8.6.5
|
||||||
|
|
||||||
- name: Setup node@${{ matrix.NODE_VERSION }}
|
- name: Setup node@18
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.NODE_VERSION }}
|
node-version: 18
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -143,7 +143,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Install playwright
|
- name: Install playwright
|
||||||
run: |
|
run: |
|
||||||
pnpx playwright@1.28.0 install --with-deps
|
pnpx playwright@1.28.0 install --with-deps
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
. "$(dirname "$0")/_/husky.sh"
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
pnpm manypkg check
|
pnpm manypkg check
|
||||||
pnpm lint
|
# pnpm lint
|
||||||
pnpm pretty-quick --staged
|
pnpm pretty-quick --staged
|
||||||
|
|||||||
1
.npmrc
1
.npmrc
@@ -1,4 +1,5 @@
|
|||||||
save-exact=true
|
save-exact=true
|
||||||
|
dedupe-peer-dependents=true
|
||||||
strict-peer-dependencies=false
|
strict-peer-dependencies=false
|
||||||
|
|
||||||
public-hoist-pattern[]=secure-password
|
public-hoist-pattern[]=secure-password
|
||||||
|
|||||||
17
README.md
17
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==">
|
<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>
|
</a>
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- 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-411-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-419-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/main/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">
|
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
|
||||||
@@ -94,6 +94,11 @@ Your financial contributions help ensure Blitz continues to be developed and mai
|
|||||||
<td><a aria-label="Boostry" href="https://boostry.co.jp/?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2021">
|
<td><a aria-label="Boostry" href="https://boostry.co.jp/?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2021">
|
||||||
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/boostry.svg" width="200px">
|
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/boostry.svg" width="200px">
|
||||||
</a></td>
|
</a></td>
|
||||||
|
<td>
|
||||||
|
<a aria-label="Byteflow" href="https://byteflow.app/?ref=blitzjs">
|
||||||
|
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/Byteflow.png" width="70px">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -724,6 +729,16 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
|
|||||||
<td align="center"><a href="https://maotoramm.com"><img src="https://avatars.githubusercontent.com/u/5174884?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maotora ᕙ(⇀‸↼‶)ᕗ</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=maotora" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=maotora" title="Code">💻</a></td>
|
<td align="center"><a href="https://maotoramm.com"><img src="https://avatars.githubusercontent.com/u/5174884?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maotora ᕙ(⇀‸↼‶)ᕗ</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=maotora" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=maotora" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://github.com/vitaliemiron"><img src="https://avatars.githubusercontent.com/u/45145592?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vitalie</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=vitaliemiron" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=vitaliemiron" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/vitaliemiron"><img src="https://avatars.githubusercontent.com/u/45145592?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vitalie</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=vitaliemiron" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=vitaliemiron" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://estevao.org"><img src="https://avatars.githubusercontent.com/u/19409687?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nelson Estevão</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=nelsonmestevao" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=nelsonmestevao" title="Code">💻</a></td>
|
<td align="center"><a href="https://estevao.org"><img src="https://avatars.githubusercontent.com/u/19409687?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nelson Estevão</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=nelsonmestevao" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=nelsonmestevao" title="Code">💻</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/dbrxnds"><img src="https://avatars.githubusercontent.com/u/32268383?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=dbrxnds" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=dbrxnds" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=dbrxnds" title="Tests">⚠️</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/gjmoed"><img src="https://avatars.githubusercontent.com/u/4458993?v=4?s=100" width="100px;" alt=""/><br /><sub><b>G.J. Moed</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=gjmoed" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=gjmoed" title="Code">💻</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="https://ghken.com"><img src="https://avatars.githubusercontent.com/u/5304351?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tetsuya Fukuda</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=GHKEN" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=GHKEN" title="Code">💻</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/nerixim"><img src="https://avatars.githubusercontent.com/u/26106502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikita Kamaev</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=nerixim" title="Documentation">📖</a></td>
|
||||||
|
<td align="center"><a href="https://webredone.com/"><img src="https://avatars.githubusercontent.com/u/11588823?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikola Ivanov</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=nikola-wd" title="Documentation">📖</a></td>
|
||||||
|
<td align="center"><a href="jayu.dev"><img src="https://avatars.githubusercontent.com/u/11561585?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jakub Mazurek</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jayu" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=jayu" title="Code">💻</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/maciej-ka"><img src="https://avatars.githubusercontent.com/u/5403694?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maciej Kasprzyk</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=maciej-ka" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=maciej-ka" title="Code">💻</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/justinsmid"><img src="https://avatars.githubusercontent.com/u/34271675?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Justin Smid</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=justinsmid" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=justinsmid" title="Code">💻</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,80 @@
|
|||||||
# next-blitz-auth
|
# next-blitz-auth
|
||||||
|
|
||||||
|
## 0.1.1-beta.8
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [82649f341]
|
||||||
|
- Updated dependencies [8b01175b4]
|
||||||
|
- blitz@2.0.0-beta.32
|
||||||
|
- @blitzjs/next@2.0.0-beta.32
|
||||||
|
- @blitzjs/auth@2.0.0-beta.32
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.32
|
||||||
|
- @blitzjs/config@2.0.0-beta.32
|
||||||
|
|
||||||
|
## 0.1.1-beta.7
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [90f1741da]
|
||||||
|
- Updated dependencies [df3265b85]
|
||||||
|
- @blitzjs/auth@2.0.0-beta.31
|
||||||
|
- blitz@2.0.0-beta.31
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.31
|
||||||
|
- @blitzjs/next@2.0.0-beta.31
|
||||||
|
- @blitzjs/config@2.0.0-beta.31
|
||||||
|
|
||||||
|
## 0.1.1-beta.6
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [c5572bec6]
|
||||||
|
- Updated dependencies [727734955]
|
||||||
|
- @blitzjs/auth@2.0.0-beta.30
|
||||||
|
- blitz@2.0.0-beta.30
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.30
|
||||||
|
- @blitzjs/next@2.0.0-beta.30
|
||||||
|
- @blitzjs/config@2.0.0-beta.30
|
||||||
|
|
||||||
|
## 0.1.1-beta.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6b9a1c5a]
|
||||||
|
- Updated dependencies [61888d1a3]
|
||||||
|
- @blitzjs/auth@2.0.0-beta.29
|
||||||
|
- blitz@2.0.0-beta.29
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.29
|
||||||
|
- @blitzjs/next@2.0.0-beta.29
|
||||||
|
- @blitzjs/config@2.0.0-beta.29
|
||||||
|
|
||||||
|
## 0.1.1-beta.4
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5166e5e03]
|
||||||
|
- Updated dependencies [2533caf48]
|
||||||
|
- Updated dependencies [c7ac86b85]
|
||||||
|
- Updated dependencies [1bb3a6556]
|
||||||
|
- @blitzjs/auth@2.0.0-beta.28
|
||||||
|
- @blitzjs/next@2.0.0-beta.28
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.28
|
||||||
|
- blitz@2.0.0-beta.28
|
||||||
|
- @blitzjs/config@2.0.0-beta.28
|
||||||
|
|
||||||
|
## 0.1.1-beta.3
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [eda14fa8a]
|
||||||
|
- Updated dependencies [3d004dc41]
|
||||||
|
- Updated dependencies [29c2b029a]
|
||||||
|
- @blitzjs/next@2.0.0-beta.27
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.27
|
||||||
|
- @blitzjs/auth@2.0.0-beta.27
|
||||||
|
- blitz@2.0.0-beta.27
|
||||||
|
- @blitzjs/config@2.0.0-beta.27
|
||||||
|
|
||||||
## 0.1.1-beta.2
|
## 0.1.1-beta.2
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "next-blitz-auth",
|
"name": "next-blitz-auth",
|
||||||
"version": "0.1.1-beta.2",
|
"version": "0.1.1-beta.8",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"blitz:dev": "next dev",
|
"blitz:dev": "next dev",
|
||||||
@@ -9,15 +9,15 @@
|
|||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:*",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/config": "workspace:*",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:*",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:*",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@hookform/error-message": "2.0.0",
|
"@hookform/error-message": "2.0.0",
|
||||||
"@hookform/resolvers": "2.9.10",
|
"@hookform/resolvers": "2.9.10",
|
||||||
"@prisma/client": "^4.5.0",
|
"@prisma/client": "^4.5.0",
|
||||||
"@tanstack/react-query": "4.0.10",
|
"@tanstack/react-query": "4.0.10",
|
||||||
"blitz": "workspace:*",
|
"blitz": "2.0.0-beta.32",
|
||||||
"flatted": "3.2.7",
|
"flatted": "3.2.7",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"prisma": "^4.5.0",
|
"prisma": "^4.5.0",
|
||||||
|
|||||||
@@ -23,14 +23,14 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:*",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/config": "workspace:*",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:*",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:*",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@hookform/error-message": "2.0.0",
|
"@hookform/error-message": "2.0.0",
|
||||||
"@hookform/resolvers": "2.9.10",
|
"@hookform/resolvers": "2.9.10",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"openid-client": "5.2.1",
|
"openid-client": "5.2.1",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
const { withNextAuthAdapter } = require("@blitzjs/auth/next-auth")
|
const { withNextAuthAdapter } = require("@blitzjs/auth")
|
||||||
const { withBlitz } = require("@blitzjs/next")
|
const { withBlitz } = require("@blitzjs/next")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import('@blitzjs/next').BlitzConfig}
|
* @type {import('next').NextConfig}
|
||||||
**/
|
**/
|
||||||
const config = {
|
const config = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
|
blitz: {
|
||||||
|
resolversDynamicImport: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = withBlitz(withNextAuthAdapter(config))
|
module.exports = withBlitz(withNextAuthAdapter(config))
|
||||||
|
|||||||
@@ -24,14 +24,14 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:*",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/config": "workspace:*",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:*",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:*",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@hookform/error-message": "2.0.0",
|
"@hookform/error-message": "2.0.0",
|
||||||
"@hookform/resolvers": "2.9.10",
|
"@hookform/resolvers": "2.9.10",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"next-auth": "4.18.7",
|
"next-auth": "4.18.7",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ type SignupFormProps = {
|
|||||||
|
|
||||||
export const SignupForm = (props: SignupFormProps) => {
|
export const SignupForm = (props: SignupFormProps) => {
|
||||||
const [signupMutation] = useMutation(signup)
|
const [signupMutation] = useMutation(signup)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>Create an Account</h1>
|
<h1>Create an Account</h1>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import db from "db"
|
import db from "db"
|
||||||
import { SecurePassword } from "@blitzjs/auth/secure-password"
|
|
||||||
import { Role } from "types"
|
import { Role } from "types"
|
||||||
|
|
||||||
export default async function signup(input, ctx) {
|
export default async function signup(input, ctx) {
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import type { BlitzCliConfig } from "blitz"
|
import type { BlitzCliConfig } from "blitz"
|
||||||
import { setupBlitzServer } from "@blitzjs/next"
|
|
||||||
import { AuthServerPlugin, PrismaStorage } from "@blitzjs/auth"
|
|
||||||
import db from "db"
|
|
||||||
import { simpleRolesIsAuthorized } from "@blitzjs/auth"
|
|
||||||
import { BlitzLogger } from "blitz"
|
import { BlitzLogger } from "blitz"
|
||||||
|
import { setupBlitzServer } from "@blitzjs/next"
|
||||||
|
import { AuthServerPlugin, PrismaStorage, simpleRolesIsAuthorized } from "@blitzjs/auth"
|
||||||
|
import db from "db"
|
||||||
|
|
||||||
export const cliConfig: BlitzCliConfig = {
|
export const cliConfig: BlitzCliConfig = {
|
||||||
customTemplates: "src/templates",
|
customTemplates: "src/templates",
|
||||||
@@ -27,6 +26,9 @@ const { gSSP, gSP, api } = setupBlitzServer({
|
|||||||
isAuthorized: simpleRolesIsAuthorized,
|
isAuthorized: simpleRolesIsAuthorized,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
formatError: (error) => {
|
||||||
|
return new Error("Formatted error" + error.message)
|
||||||
|
},
|
||||||
logger: BlitzLogger({}),
|
logger: BlitzLogger({}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,16 @@
|
|||||||
import { rpcHandler } from "@blitzjs/rpc"
|
import { rpcHandler } from "@blitzjs/rpc"
|
||||||
import { api } from "src/blitz-server"
|
import { api } from "src/blitz-server"
|
||||||
|
|
||||||
export default api(rpcHandler({ onError: console.log }))
|
export default api(
|
||||||
|
rpcHandler({
|
||||||
|
onError: console.log,
|
||||||
|
formatError: (error) => {
|
||||||
|
error.message = `FormatError handler: ${error.message}`
|
||||||
|
return error
|
||||||
|
},
|
||||||
|
// logging: {
|
||||||
|
// verbose: true,
|
||||||
|
// blockList: ["/getCurrentUser"],
|
||||||
|
// },
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|||||||
@@ -38,13 +38,13 @@ const UserInfo = () => {
|
|||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Link href={Routes.SignupPage()} className={styles.button}>
|
<Link href={"/signup"} className={styles.button}>
|
||||||
<strong>Sign Up</strong>
|
<strong>Sign Up</strong>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href={Routes.LoginPage()} className={styles.loginButton}>
|
<Link href={"/login"} className={styles.loginButton}>
|
||||||
<strong>Login</strong>
|
<strong>Login</strong>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href="/api/auth/github/login" passHref>
|
<Link href="/api/auth/github/login" passHref legacyBehavior>
|
||||||
<a className="button small">
|
<a className="button small">
|
||||||
<strong>Sign in with GitHub</strong>
|
<strong>Sign in with GitHub</strong>
|
||||||
</a>
|
</a>
|
||||||
@@ -99,7 +99,7 @@ const Home: BlitzPage = () => {
|
|||||||
<div className={styles.code}>
|
<div className={styles.code}>
|
||||||
<span>1</span>
|
<span>1</span>
|
||||||
<pre>
|
<pre>
|
||||||
<code>blitz generate all project</code>
|
<code>blitz generate all project name:string</code>
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -16,14 +16,14 @@
|
|||||||
"schema": "./db/schema.prisma"
|
"schema": "./db/schema.prisma"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:*",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/config": "workspace:*",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:*",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:*",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"@types/jest": "29.2.2",
|
"@types/jest": "29.2.2",
|
||||||
"@types/passport-twitter": "1.0.37",
|
"@types/passport-twitter": "1.0.37",
|
||||||
"blitz": "workspace:*",
|
"blitz": "2.0.0-beta.32",
|
||||||
"jest": "29.3.0",
|
"jest": "29.3.0",
|
||||||
"jest-environment-jsdom": "29.3.0",
|
"jest-environment-jsdom": "29.3.0",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const {gSSP, gSP, api} = setupBlitzServer({
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
logger: BlitzLogger({
|
logger: BlitzLogger({
|
||||||
colorizePrettyLogs: true,
|
|
||||||
prefix: ["[blitz]>>>>>"],
|
prefix: ["[blitz]>>>>>"],
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|||||||
BIN
assets/Byteflow.png
Normal file
BIN
assets/Byteflow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1687709756,
|
||||||
|
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1688221086,
|
||||||
|
"narHash": "sha256-cdW6qUL71cNWhHCpMPOJjlw0wzSRP0pVlRn2vqX/VVg=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "cd99c2b3c9f160cd004318e0697f90bbd5960825",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
39
flake.nix
Normal file
39
flake.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
description = "The Blitzjs Monorepo";
|
||||||
|
nixConfig.bash-prompt = "\[nix:blitz\]$ ";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs = {
|
||||||
|
url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
flake-utils = {
|
||||||
|
url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
formatter = pkgs.alejandra;
|
||||||
|
|
||||||
|
devShells = {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
nodejs-18_x
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
${pkgs.nodejs-18_x}/bin/corepack enable --install-directory $out/bin
|
||||||
|
export PATH="$out/bin:$PATH"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -17,14 +17,14 @@
|
|||||||
"prisma:studio": "prisma studio"
|
"prisma:studio": "prisma studio"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:2.0.0-beta.26",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@hookform/error-message": "2.0.0",
|
"@hookform/error-message": "2.0.0",
|
||||||
"@hookform/resolvers": "2.9.10",
|
"@hookform/resolvers": "2.9.10",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"delay": "5.0.0",
|
"delay": "5.0.0",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import {describe, it, expect, beforeAll, afterAll} from "vitest"
|
import {afterAll, beforeAll, describe, expect, it} from "vitest"
|
||||||
import {
|
import {
|
||||||
killApp,
|
|
||||||
findPort,
|
|
||||||
runBlitzCommand,
|
|
||||||
blitzLaunchApp,
|
|
||||||
blitzBuild,
|
blitzBuild,
|
||||||
|
blitzLaunchApp,
|
||||||
blitzStart,
|
blitzStart,
|
||||||
|
findPort,
|
||||||
|
killApp,
|
||||||
|
runBlitzCommand,
|
||||||
waitFor,
|
waitFor,
|
||||||
} from "../../utils/next-test-utils"
|
} from "../../utils/next-test-utils"
|
||||||
import webdriver from "../../utils/next-webdriver"
|
import webdriver from "../../utils/next-webdriver"
|
||||||
@@ -15,7 +15,7 @@ let appPort: number
|
|||||||
|
|
||||||
const runTests = () => {
|
const runTests = () => {
|
||||||
describe("Auth", () => {
|
describe("Auth", () => {
|
||||||
/* TODO - Add a non flaky Integration Test for custom plugin
|
/* TODO - Add a non flaky Integration Test for custom plugin
|
||||||
describe("custom plugin", () => {
|
describe("custom plugin", () => {
|
||||||
it("custom plugin - events", async () => {
|
it("custom plugin - events", async () => {
|
||||||
const browser = await webdriver(appPort, "/custom-plugin")
|
const browser = await webdriver(appPort, "/custom-plugin")
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
"prisma:studio": "prisma studio"
|
"prisma:studio": "prisma studio"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:2.0.0-beta.26",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const runTests = (mode?: string) => {
|
|||||||
const browser = await webdriver(appPort, "/authenticated-page")
|
const browser = await webdriver(appPort, "/authenticated-page")
|
||||||
let errorMsg = await browser.elementById(`error`).text()
|
let errorMsg = await browser.elementById(`error`).text()
|
||||||
expect(errorMsg).toMatch(/Error: You are not authenticated/)
|
expect(errorMsg).toMatch(/Error: You are not authenticated/)
|
||||||
if (browser) browser.close()
|
if (browser) void browser.close()
|
||||||
},
|
},
|
||||||
5000 * 60 * 2,
|
5000 * 60 * 2,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -16,11 +16,11 @@
|
|||||||
"schema": "db/schema.prisma"
|
"schema": "db/schema.prisma"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:2.0.0-beta.26",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
/// <reference types="next/navigation-types/compat/navigation" />
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||||
|
|||||||
@@ -17,12 +17,12 @@
|
|||||||
"prisma:studio": "prisma studio"
|
"prisma:studio": "prisma studio"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:2.0.0-beta.26",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
|
|||||||
@@ -1,13 +1,6 @@
|
|||||||
import {describe, it, expect, beforeAll, afterAll} from "vitest"
|
import {afterAll, beforeAll, describe, expect, it} from "vitest"
|
||||||
import waitPort from "wait-port"
|
import waitPort from "wait-port"
|
||||||
import {
|
import {blitzLaunchApp, findPort, killApp, runBlitzCommand} from "../../utils/next-test-utils"
|
||||||
killApp,
|
|
||||||
findPort,
|
|
||||||
runBlitzCommand,
|
|
||||||
blitzLaunchApp,
|
|
||||||
blitzBuild,
|
|
||||||
blitzStart,
|
|
||||||
} from "../../utils/next-test-utils"
|
|
||||||
import webdriver from "../../utils/next-webdriver"
|
import webdriver from "../../utils/next-webdriver"
|
||||||
|
|
||||||
import fetch from "node-fetch"
|
import fetch from "node-fetch"
|
||||||
@@ -43,7 +36,7 @@ const runTests = (mode?: string) => {
|
|||||||
const browser = await webdriver(appPort, "/authenticated-client")
|
const browser = await webdriver(appPort, "/authenticated-client")
|
||||||
let errorMsg = await browser.elementById(`error`).text()
|
let errorMsg = await browser.elementById(`error`).text()
|
||||||
expect(errorMsg).toMatch(/Error: You are not authenticated/)
|
expect(errorMsg).toMatch(/Error: You are not authenticated/)
|
||||||
if (browser) browser.close()
|
if (browser) await browser.close()
|
||||||
},
|
},
|
||||||
5000 * 60 * 2,
|
5000 * 60 * 2,
|
||||||
)
|
)
|
||||||
@@ -55,7 +48,7 @@ const runTests = (mode?: string) => {
|
|||||||
const browser = await webdriver(appPort, "/authenticated-server")
|
const browser = await webdriver(appPort, "/authenticated-server")
|
||||||
let errorMsg = await browser.elementById(`error`).text()
|
let errorMsg = await browser.elementById(`error`).text()
|
||||||
expect(errorMsg).toMatch(/Error: You are not authenticated/)
|
expect(errorMsg).toMatch(/Error: You are not authenticated/)
|
||||||
if (browser) browser.close()
|
if (browser) await browser.close()
|
||||||
},
|
},
|
||||||
5000 * 60 * 2,
|
5000 * 60 * 2,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
{
|
{
|
||||||
"name": "next"
|
"name": "next"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"strictNullChecks": true
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"],
|
||||||
"baseUrl": "."
|
"baseUrl": "."
|
||||||
|
|||||||
@@ -16,11 +16,11 @@
|
|||||||
"prisma:studio": "prisma studio"
|
"prisma:studio": "prisma studio"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:2.0.0-beta.26",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
"clean": "rm -rf .turbo && rm -rf node_modules"
|
"clean": "rm -rf .turbo && rm -rf node_modules"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:2.0.0-beta.26",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"@tanstack/react-query": "4.0.10",
|
"@tanstack/react-query": "4.0.10",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
"schema": "db/schema.prisma"
|
"schema": "db/schema.prisma"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
class ErrorWithStatusCode extends Error {
|
||||||
|
statusCode
|
||||||
|
|
||||||
|
constructor(message, statusCode) {
|
||||||
|
super(message)
|
||||||
|
this.statusCode = statusCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function getCustomStatusCodeFailure() {
|
||||||
|
throw new ErrorWithStatusCode("Error with custom status code for test", 418)
|
||||||
|
}
|
||||||
@@ -7,10 +7,10 @@
|
|||||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf .next"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
import {describe, it, expect, beforeAll, afterAll} from "vitest"
|
import {afterAll, beforeAll, describe, expect, it} from "vitest"
|
||||||
import fs from "fs-extra"
|
|
||||||
import {join} from "path"
|
import {join} from "path"
|
||||||
import {
|
import {
|
||||||
killApp,
|
|
||||||
findPort,
|
|
||||||
launchApp,
|
|
||||||
fetchViaHTTP,
|
fetchViaHTTP,
|
||||||
|
findPort,
|
||||||
|
killApp,
|
||||||
|
launchApp,
|
||||||
nextBuild,
|
nextBuild,
|
||||||
nextStart,
|
|
||||||
nextExport,
|
nextExport,
|
||||||
|
nextStart,
|
||||||
} from "../../utils/next-test-utils"
|
} from "../../utils/next-test-utils"
|
||||||
|
|
||||||
// jest.setTimeout(1000 * 60 * 2)
|
// jest.setTimeout(1000 * 60 * 2)
|
||||||
|
|||||||
@@ -16,11 +16,11 @@
|
|||||||
"schema": "db/schema.prisma"
|
"schema": "db/schema.prisma"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/auth": "workspace:2.0.0-beta.26",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/next": "workspace:2.0.0-beta.26",
|
"@blitzjs/next": "2.0.0-beta.32",
|
||||||
"@blitzjs/rpc": "workspace:2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@prisma/client": "4.6.1",
|
"@prisma/client": "4.6.1",
|
||||||
"blitz": "workspace:2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"lowdb": "3.0.0",
|
"lowdb": "3.0.0",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@next/bundle-analyzer": "12.0.8",
|
"@next/bundle-analyzer": "12.0.8",
|
||||||
"@types/express": "4.17.13",
|
"@types/express": "4.17.13",
|
||||||
"@types/fs-extra": "9.0.13",
|
"@types/fs-extra": "9.0.13",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"build": "turbo run build",
|
"build": "turbo run build",
|
||||||
"build:apps": "turbo run buildapp --concurrency=1",
|
"build:apps": "turbo run buildapp --concurrency=1",
|
||||||
"dev": "turbo run dev --no-cache --parallel",
|
"dev": "turbo run dev --filter='./packages/*'",
|
||||||
"lint": "turbo run lint",
|
"lint": "turbo run lint",
|
||||||
"test": "turbo run test",
|
"test": "turbo run test",
|
||||||
"clean": "turbo run clean && rm -rf node_modules",
|
"clean": "turbo run clean && rm -rf node_modules",
|
||||||
@@ -34,12 +34,12 @@
|
|||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"prettier-plugin-prisma": "4.4.0",
|
"prettier-plugin-prisma": "4.4.0",
|
||||||
"pretty-quick": "3.1.3",
|
"pretty-quick": "3.1.3",
|
||||||
"turbo": "1.4.2",
|
"turbo": "1.10.7",
|
||||||
"vitest": "0.25.3",
|
"vitest": "0.25.3",
|
||||||
"wait-on": "6.0.1"
|
"wait-on": "6.0.1"
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"packageManager": "pnpm@7.11.0",
|
"packageManager": "pnpm@8.6.6",
|
||||||
"manypkg": {
|
"manypkg": {
|
||||||
"ignoredRules": [
|
"ignoredRules": [
|
||||||
"EXTERNAL_MISMATCH"
|
"EXTERNAL_MISMATCH"
|
||||||
|
|||||||
@@ -1,5 +1,62 @@
|
|||||||
# @blitzjs/auth
|
# @blitzjs/auth
|
||||||
|
|
||||||
|
## 2.0.0-beta.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 8b01175b4: Updated `useAuthenticatedBlitzContext` to now return `AuthenticatedCtx`
|
||||||
|
- Updated dependencies [82649f341]
|
||||||
|
- blitz@2.0.0-beta.32
|
||||||
|
|
||||||
|
## 2.0.0-beta.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 90f1741da: blitz-auth: Support for Prisma v5
|
||||||
|
|
||||||
|
Internal: Make `handle` a required paramter while updating the `session` modal.
|
||||||
|
|
||||||
|
- Updated dependencies [90f1741da]
|
||||||
|
- Updated dependencies [df3265b85]
|
||||||
|
- blitz@2.0.0-beta.31
|
||||||
|
|
||||||
|
## 2.0.0-beta.30
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- c5572bec6: blitz-auth: Fix webpack from following next-auth
|
||||||
|
- Updated dependencies [c5572bec6]
|
||||||
|
- Updated dependencies [727734955]
|
||||||
|
- blitz@2.0.0-beta.30
|
||||||
|
|
||||||
|
## 2.0.0-beta.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- b6b9a1c5a: Fix Next-Auth integration: `Unable to use next-auth with provider: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]`
|
||||||
|
- Updated dependencies [b6b9a1c5a]
|
||||||
|
- Updated dependencies [61888d1a3]
|
||||||
|
- blitz@2.0.0-beta.29
|
||||||
|
|
||||||
|
## 2.0.0-beta.28
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 1bb3a6556: Stop exporting `useAuthenticatedBlitzContext` from `@blitzjs/auth` this must be imported from `app/blitz-server.ts` file in order to work correctly
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 5166e5e03: (feat) upgrade tslog to v4.8.2
|
||||||
|
- Updated dependencies [5166e5e03]
|
||||||
|
- blitz@2.0.0-beta.28
|
||||||
|
|
||||||
|
## 2.0.0-beta.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 29c2b029a: Fix: Add missing entry to expose next-auth adapter in Blitz Auth
|
||||||
|
- blitz@2.0.0-beta.27
|
||||||
|
|
||||||
## 2.0.0-beta.26
|
## 2.0.0-beta.26
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/auth",
|
"name": "@blitzjs/auth",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0-beta.32",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
"cookie": "0.4.1",
|
"cookie": "0.4.1",
|
||||||
"cookie-session": "2.0.0",
|
"cookie-session": "2.0.0",
|
||||||
"debug": "4.3.3",
|
"debug": "4.3.3",
|
||||||
|
"find-up": "4.1.0",
|
||||||
"http": "0.0.1-security",
|
"http": "0.0.1-security",
|
||||||
"jsonwebtoken": "9.0.0",
|
"jsonwebtoken": "9.0.0",
|
||||||
"nanoid": "3.2.0",
|
"nanoid": "3.2.0",
|
||||||
@@ -44,11 +45,12 @@
|
|||||||
"openid-client": "5.2.1",
|
"openid-client": "5.2.1",
|
||||||
"passport": "0.6.0",
|
"passport": "0.6.0",
|
||||||
"path": "0.12.7",
|
"path": "0.12.7",
|
||||||
|
"resolve-from": "5.0.0",
|
||||||
"supports-color": "8.1.1",
|
"supports-color": "8.1.1",
|
||||||
"url": "0.11.0"
|
"url": "0.11.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"blitz": "2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "*",
|
"next": "*",
|
||||||
"next-auth": "*",
|
"next-auth": "*",
|
||||||
"secure-password": "4.0.0"
|
"secure-password": "4.0.0"
|
||||||
@@ -65,7 +67,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "13.4.0",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
"@testing-library/react-hooks": "8.0.1",
|
||||||
"@types/cookie": "0.4.1",
|
"@types/cookie": "0.4.1",
|
||||||
@@ -73,7 +75,7 @@
|
|||||||
"@types/jsonwebtoken": "8.5.8",
|
"@types/jsonwebtoken": "8.5.8",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "18.0.25",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "17.0.14",
|
||||||
"blitz": "2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"next-auth": "4.18.7",
|
"next-auth": "4.18.7",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
export * from "./passport/adapter"
|
export * from "./passport/adapter"
|
||||||
|
export * from "./next-auth/webpack"
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
export * from "./next-auth/adapter"
|
export * from "./next-auth/adapter"
|
||||||
export * from "./next-auth/types"
|
export * from "./next-auth/types"
|
||||||
export * from "./next-auth/webpack"
|
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ import type {
|
|||||||
} from "./types"
|
} from "./types"
|
||||||
import {Provider} from "next-auth/providers"
|
import {Provider} from "next-auth/providers"
|
||||||
|
|
||||||
export {withNextAuthAdapter} from "./webpack"
|
import {init} from "next-auth/core/init"
|
||||||
|
import getAuthorizationUrl from "next-auth/core/lib/oauth/authorization-url"
|
||||||
|
import oAuthCallback from "next-auth/core/lib/oauth/callback"
|
||||||
|
|
||||||
const INTERNAL_REDIRECT_URL_KEY = "_redirectUrl"
|
const INTERNAL_REDIRECT_URL_KEY = "_redirectUrl"
|
||||||
|
|
||||||
@@ -102,7 +104,6 @@ export function NextAuthAdapter<P extends Provider[]>(
|
|||||||
if (providerId?.includes("?")) {
|
if (providerId?.includes("?")) {
|
||||||
providerId = providerId.split("?")[0]
|
providerId = providerId.split("?")[0]
|
||||||
}
|
}
|
||||||
const {init} = await import("next-auth/core/init").then((m) => m)
|
|
||||||
const {options, cookies} = await init({
|
const {options, cookies} = await init({
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
url: new URL(
|
url: new URL(
|
||||||
@@ -158,9 +159,6 @@ async function AuthHandler<P extends Provider[]>(
|
|||||||
if (action === "login") {
|
if (action === "login") {
|
||||||
middleware.push(async (req, res, next) => {
|
middleware.push(async (req, res, next) => {
|
||||||
try {
|
try {
|
||||||
const getAuthorizationUrl = await import("next-auth/core/lib/oauth/authorization-url").then(
|
|
||||||
(m) => m.default,
|
|
||||||
)
|
|
||||||
const _signin = await getAuthorizationUrl({options: options, query: req.query})
|
const _signin = await getAuthorizationUrl({options: options, query: req.query})
|
||||||
if (_signin.cookies) cookies.push(..._signin.cookies)
|
if (_signin.cookies) cookies.push(..._signin.cookies)
|
||||||
const session = res.blitzCtx.session as SessionContext
|
const session = res.blitzCtx.session as SessionContext
|
||||||
@@ -191,9 +189,6 @@ async function AuthHandler<P extends Provider[]>(
|
|||||||
middleware.push(
|
middleware.push(
|
||||||
// eslint-disable-next-line no-shadow
|
// eslint-disable-next-line no-shadow
|
||||||
connectMiddleware(async (req, res, next) => {
|
connectMiddleware(async (req, res, next) => {
|
||||||
const oAuthCallback = await import("next-auth/core/lib/oauth/callback").then(
|
|
||||||
(m) => m.default,
|
|
||||||
)
|
|
||||||
try {
|
try {
|
||||||
const {profile, account, OAuthProfile} = await oAuthCallback({
|
const {profile, account, OAuthProfile} = await oAuthCallback({
|
||||||
query: internalRequest.query,
|
query: internalRequest.query,
|
||||||
|
|||||||
@@ -1,15 +1,30 @@
|
|||||||
//@ts-nocheck
|
//@ts-nocheck
|
||||||
|
import path from "path"
|
||||||
|
|
||||||
export function withNextAuthAdapter(nextConfig) {
|
export function withNextAuthAdapter(nextConfig) {
|
||||||
const config = Object.assign({}, nextConfig)
|
const config = Object.assign({}, nextConfig)
|
||||||
config.webpack = (config) => {
|
try {
|
||||||
//add a required resolve alias
|
const nextAuthPath = path.dirname(require.resolve("next-auth"))
|
||||||
config.resolve.alias["next-auth/core/lib/oauth/callback"] =
|
const webpack = (config) => {
|
||||||
process.cwd() + "/node_modules/next-auth/core/lib/oauth/callback.js"
|
config.resolve.alias = {
|
||||||
config.resolve.alias["next-auth/core/lib/oauth/authorization-url"] =
|
...config.resolve.alias,
|
||||||
process.cwd() + "/node_modules/next-auth/core/lib/oauth/authorization-url.js"
|
"next-auth/core/lib/oauth/callback": path.join(nextAuthPath, "core/lib/oauth/callback.js"),
|
||||||
config.resolve.alias["next-auth/core/init"] =
|
"next-auth/core/lib/oauth/authorization-url": path.join(
|
||||||
process.cwd() + "/node_modules/next-auth/core/init.js"
|
nextAuthPath,
|
||||||
|
"core/lib/oauth/authorization-url.js",
|
||||||
|
),
|
||||||
|
"next-auth/core/init": path.join(nextAuthPath, "core/init.js"),
|
||||||
|
}
|
||||||
|
return config
|
||||||
|
}
|
||||||
|
if (typeof nextConfig.webpack === "function") {
|
||||||
|
config.webpack = (config, options) => {
|
||||||
|
return nextConfig.webpack(webpack(config), options)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
config.webpack = webpack
|
||||||
|
return config
|
||||||
|
} catch (e) {
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
return config
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ interface PrismaClientWithSession {
|
|||||||
}): Promise<SessionModel>
|
}): Promise<SessionModel>
|
||||||
update(args: {
|
update(args: {
|
||||||
data: Partial<SessionModel>
|
data: Partial<SessionModel>
|
||||||
where: {handle?: SessionModel["handle"]}
|
where: {handle: SessionModel["handle"]}
|
||||||
}): Promise<SessionModel>
|
}): Promise<SessionModel>
|
||||||
delete(args: {where: {handle?: SessionModel["handle"]}}): Promise<SessionModel>
|
delete(args: {where: {handle?: SessionModel["handle"]}}): Promise<SessionModel>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
log,
|
log,
|
||||||
baseLogger,
|
baseLogger,
|
||||||
chalk,
|
chalk,
|
||||||
|
AuthenticatedCtx,
|
||||||
} from "blitz"
|
} from "blitz"
|
||||||
import {
|
import {
|
||||||
EmptyPublicData,
|
EmptyPublicData,
|
||||||
@@ -219,8 +220,8 @@ export async function useAuthenticatedBlitzContext({
|
|||||||
redirectTo?: string | RouteUrlObject
|
redirectTo?: string | RouteUrlObject
|
||||||
redirectAuthenticatedTo?: string | RouteUrlObject | ((ctx: Ctx) => string | RouteUrlObject)
|
redirectAuthenticatedTo?: string | RouteUrlObject | ((ctx: Ctx) => string | RouteUrlObject)
|
||||||
role?: string | string[]
|
role?: string | string[]
|
||||||
}): Promise<void> {
|
}): Promise<AuthenticatedCtx> {
|
||||||
const log = baseLogger().getChildLogger()
|
const log = baseLogger().getSubLogger({name: "useAuthenticatedBlitzContext"})
|
||||||
const customChalk = new chalk.Instance({
|
const customChalk = new chalk.Instance({
|
||||||
level: log.settings.type === "json" ? 0 : chalk.level,
|
level: log.settings.type === "json" ? 0 : chalk.level,
|
||||||
})
|
})
|
||||||
@@ -268,6 +269,7 @@ export async function useAuthenticatedBlitzContext({
|
|||||||
redirect(redirectTo)
|
redirect(redirectTo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return ctx as AuthenticatedCtx
|
||||||
}
|
}
|
||||||
|
|
||||||
const makeProxyToPublicData = <T extends SessionContextClass>(ctxClass: T): T => {
|
const makeProxyToPublicData = <T extends SessionContextClass>(ctxClass: T): T => {
|
||||||
|
|||||||
@@ -1,4 +1,16 @@
|
|||||||
export * from "./auth-sessions"
|
|
||||||
export * from "./auth-utils"
|
export * from "./auth-utils"
|
||||||
export * from "./auth-plugin"
|
export * from "./auth-plugin"
|
||||||
export * from "./adapters"
|
export * from "./adapters"
|
||||||
|
|
||||||
|
export {
|
||||||
|
SessionContextClass,
|
||||||
|
getAllSessionHandlesForUser,
|
||||||
|
getCookieParser,
|
||||||
|
getSession,
|
||||||
|
isLocalhost,
|
||||||
|
setPublicDataForUser,
|
||||||
|
setCookie,
|
||||||
|
simpleRolesIsAuthorized,
|
||||||
|
getBlitzContext,
|
||||||
|
} from "./auth-sessions"
|
||||||
|
export type {AnonymousSessionPayload, SimpleRolesIsAuthorized} from "./auth-sessions"
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ declare module "blitz" {
|
|||||||
export interface Ctx {
|
export interface Ctx {
|
||||||
session: SessionContext
|
session: SessionContext
|
||||||
}
|
}
|
||||||
export interface AuthenticatedMiddlewareCtx extends Omit<Ctx, "session"> {
|
export interface AuthenticatedCtx extends Omit<Ctx, "session"> {
|
||||||
session: AuthenticatedSessionContext
|
session: AuthenticatedSessionContext
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
packages/blitz-auth/turbo.json
Normal file
11
packages/blitz-auth/turbo.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://turbo.build/schema.json",
|
||||||
|
"extends": ["//"],
|
||||||
|
"pipeline": {
|
||||||
|
"dev": {
|
||||||
|
"dependsOn": ["blitz#build"],
|
||||||
|
"persistent": true,
|
||||||
|
"cache": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,68 @@
|
|||||||
# @blitzjs/next
|
# @blitzjs/next
|
||||||
|
|
||||||
|
## 2.0.0-beta.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 82649f341: Upgrade tslog to `4.9.0`.
|
||||||
|
|
||||||
|
This due a [tslog issue](https://github.com/fullstack-build/tslog/issues/227) that causes tslog to crash when attempting to log an error whose constructor expects more than one argument.
|
||||||
|
|
||||||
|
- Updated dependencies [82649f341]
|
||||||
|
- blitz@2.0.0-beta.32
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.32
|
||||||
|
|
||||||
|
## 2.0.0-beta.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [90f1741da]
|
||||||
|
- Updated dependencies [df3265b85]
|
||||||
|
- blitz@2.0.0-beta.31
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.31
|
||||||
|
|
||||||
|
## 2.0.0-beta.30
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [c5572bec6]
|
||||||
|
- Updated dependencies [727734955]
|
||||||
|
- blitz@2.0.0-beta.30
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.30
|
||||||
|
|
||||||
|
## 2.0.0-beta.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6b9a1c5a]
|
||||||
|
- Updated dependencies [61888d1a3]
|
||||||
|
- blitz@2.0.0-beta.29
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.29
|
||||||
|
|
||||||
|
## 2.0.0-beta.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 5166e5e03: (feat) upgrade tslog to v4.8.2
|
||||||
|
- Updated dependencies [5166e5e03]
|
||||||
|
- Updated dependencies [2533caf48]
|
||||||
|
- Updated dependencies [c7ac86b85]
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.28
|
||||||
|
- blitz@2.0.0-beta.28
|
||||||
|
|
||||||
|
## 2.0.0-beta.27
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- eda14fa8a: Add ability to format the error on the server before returning it to the client.
|
||||||
|
- 3d004dc41: Fix the DYNAMIC_SERVER_USAGE error for Next.js 13.3.1+
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [eda14fa8a]
|
||||||
|
- @blitzjs/rpc@2.0.0-beta.27
|
||||||
|
- blitz@2.0.0-beta.27
|
||||||
|
|
||||||
## 2.0.0-beta.26
|
## 2.0.0-beta.26
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/next",
|
"name": "@blitzjs/next",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0-beta.32",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
"eslint.js"
|
"eslint.js"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/rpc": "2.0.0-beta.26",
|
"@blitzjs/rpc": "2.0.0-beta.32",
|
||||||
"@types/hoist-non-react-statics": "3.3.1",
|
"@types/hoist-non-react-statics": "3.3.1",
|
||||||
"debug": "4.3.3",
|
"debug": "4.3.3",
|
||||||
"fs-extra": "10.0.1",
|
"fs-extra": "10.0.1",
|
||||||
@@ -38,22 +38,24 @@
|
|||||||
"supports-color": "8.1.1"
|
"supports-color": "8.1.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"blitz": "2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "*",
|
"next": "*",
|
||||||
"react": "*"
|
"react": "*",
|
||||||
|
"tslog": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@testing-library/dom": "8.13.0",
|
"@testing-library/dom": "8.13.0",
|
||||||
"@testing-library/jest-dom": "5.16.3",
|
"@testing-library/jest-dom": "5.16.3",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "13.4.0",
|
||||||
"@testing-library/react-hooks": "8.0.1",
|
"@testing-library/react-hooks": "8.0.1",
|
||||||
"@testing-library/user-event": "13.5.0",
|
"@testing-library/user-event": "13.5.0",
|
||||||
|
"@types/debug": "4.1.7",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "18.0.25",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "17.0.14",
|
||||||
"@types/testing-library__react-hooks": "4.0.0",
|
"@types/testing-library__react-hooks": "4.0.0",
|
||||||
"blitz": "2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"cross-spawn": "7.0.3",
|
"cross-spawn": "7.0.3",
|
||||||
"find-up": "4.1.0",
|
"find-up": "4.1.0",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
@@ -62,6 +64,7 @@
|
|||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"resolve-from": "5.0.0",
|
"resolve-from": "5.0.0",
|
||||||
"ts-jest": "27.1.4",
|
"ts-jest": "27.1.4",
|
||||||
|
"tslog": "4.9.0",
|
||||||
"typescript": "^4.8.4",
|
"typescript": "^4.8.4",
|
||||||
"unbuild": "0.7.6",
|
"unbuild": "0.7.6",
|
||||||
"watch": "1.0.2"
|
"watch": "1.0.2"
|
||||||
|
|||||||
@@ -211,8 +211,9 @@ test("withErrorBoundary HOC", () => {
|
|||||||
expect(cleanStack(onErrorComponentStack)).toMatchInlineSnapshot(`
|
expect(cleanStack(onErrorComponentStack)).toMatchInlineSnapshot(`
|
||||||
{
|
{
|
||||||
"componentStack": "
|
"componentStack": "
|
||||||
at ErrorBoundaryRoot
|
at __vite_ssr_import_4__.withErrorBoundary.FallbackComponent
|
||||||
at withRouter
|
at ErrorBoundaryRoot
|
||||||
|
at WithRouterWrapper
|
||||||
at withErrorBoundary",
|
at withErrorBoundary",
|
||||||
}
|
}
|
||||||
`)
|
`)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {NextRouter, withRouter} from "next/router"
|
|||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import {RouterContext} from "./router-context"
|
import {RouterContext} from "./router-context"
|
||||||
import _debug from "debug"
|
import _debug from "debug"
|
||||||
|
import {ExcludeRouterProps} from "next/dist/client/with-router"
|
||||||
|
|
||||||
const debug = _debug("blitz:errorboundary")
|
const debug = _debug("blitz:errorboundary")
|
||||||
|
|
||||||
@@ -72,7 +73,9 @@ type ErrorBoundaryState = {error: Error | null}
|
|||||||
|
|
||||||
const initialState: ErrorBoundaryState = {error: null}
|
const initialState: ErrorBoundaryState = {error: null}
|
||||||
|
|
||||||
const ErrorBoundary = withRouter(
|
const ErrorBoundary: React.ComponentType<
|
||||||
|
ExcludeRouterProps<React.PropsWithChildren<ErrorBoundaryProps>>
|
||||||
|
> = withRouter(
|
||||||
class ErrorBoundaryRoot extends React.Component<
|
class ErrorBoundaryRoot extends React.Component<
|
||||||
React.PropsWithRef<React.PropsWithChildren<ErrorBoundaryProps>>,
|
React.PropsWithRef<React.PropsWithChildren<ErrorBoundaryProps>>,
|
||||||
ErrorBoundaryState
|
ErrorBoundaryState
|
||||||
|
|||||||
@@ -1,41 +1,43 @@
|
|||||||
import type {
|
import type {
|
||||||
NextConfig,
|
|
||||||
GetServerSideProps,
|
GetServerSideProps,
|
||||||
GetServerSidePropsResult,
|
GetServerSidePropsResult,
|
||||||
GetStaticProps,
|
GetStaticProps,
|
||||||
GetStaticPropsResult,
|
GetStaticPropsResult,
|
||||||
NextApiRequest,
|
NextApiRequest,
|
||||||
NextApiResponse,
|
NextApiResponse,
|
||||||
|
NextConfig,
|
||||||
} from "next"
|
} from "next"
|
||||||
import {
|
import {
|
||||||
AddParameters,
|
AddParameters,
|
||||||
AsyncFunc,
|
AsyncFunc,
|
||||||
|
BlitzLogger,
|
||||||
BlitzServerPlugin,
|
BlitzServerPlugin,
|
||||||
Ctx as BlitzCtx,
|
Ctx as BlitzCtx,
|
||||||
FirstParam,
|
FirstParam,
|
||||||
RequestMiddleware,
|
handleRequestWithMiddleware,
|
||||||
MiddlewareResponse,
|
|
||||||
BlitzLogger,
|
|
||||||
initializeLogger,
|
initializeLogger,
|
||||||
Simplify,
|
isRouteUrlObject,
|
||||||
UnionToIntersection,
|
MiddlewareResponse,
|
||||||
reduceBlitzServerPlugins,
|
reduceBlitzServerPlugins,
|
||||||
|
RouteUrlObject,
|
||||||
|
startWatcher,
|
||||||
|
stopWatcher,
|
||||||
} from "blitz"
|
} from "blitz"
|
||||||
import {handleRequestWithMiddleware, startWatcher, stopWatcher} from "blitz"
|
|
||||||
import {installWebpackConfig, InstallWebpackConfigOptions, ResolverPathOptions} from "@blitzjs/rpc"
|
|
||||||
import {
|
import {
|
||||||
DefaultOptions,
|
DefaultOptions,
|
||||||
QueryClient,
|
|
||||||
getQueryKey,
|
|
||||||
getInfiniteQueryKey,
|
|
||||||
dehydrate,
|
dehydrate,
|
||||||
|
getInfiniteQueryKey,
|
||||||
|
getQueryKey,
|
||||||
|
installWebpackConfig,
|
||||||
|
InstallWebpackConfigOptions,
|
||||||
|
QueryClient,
|
||||||
|
ResolverPathOptions,
|
||||||
} from "@blitzjs/rpc"
|
} from "@blitzjs/rpc"
|
||||||
import {IncomingMessage, ServerResponse} from "http"
|
import {IncomingMessage, ServerResponse} from "http"
|
||||||
import {withSuperJsonProps} from "./superjson"
|
import {withSuperJsonProps} from "./superjson"
|
||||||
import {ParsedUrlQuery} from "querystring"
|
import {ParsedUrlQuery} from "querystring"
|
||||||
import {PreviewData} from "next/types"
|
import {PreviewData} from "next/types"
|
||||||
import {resolveHref} from "next/dist/shared/lib/router/utils/resolve-href"
|
import {resolveHref} from "next/dist/shared/lib/router/utils/resolve-href"
|
||||||
import {RouteUrlObject, isRouteUrlObject} from "blitz"
|
|
||||||
|
|
||||||
export * from "./index-browser"
|
export * from "./index-browser"
|
||||||
|
|
||||||
@@ -130,10 +132,12 @@ export const setupBlitzServer = <TPlugins extends readonly BlitzServerPlugin<obj
|
|||||||
plugins,
|
plugins,
|
||||||
onError,
|
onError,
|
||||||
logger,
|
logger,
|
||||||
|
formatError,
|
||||||
}: {
|
}: {
|
||||||
plugins: TPlugins
|
plugins: TPlugins
|
||||||
onError?: (err: Error) => void
|
onError?: (err: Error) => void
|
||||||
logger?: ReturnType<typeof BlitzLogger>
|
logger?: ReturnType<typeof BlitzLogger>
|
||||||
|
formatError?: (err: Error) => Error
|
||||||
}) => {
|
}) => {
|
||||||
initializeLogger(logger ?? BlitzLogger())
|
initializeLogger(logger ?? BlitzLogger())
|
||||||
|
|
||||||
@@ -168,9 +172,9 @@ export const setupBlitzServer = <TPlugins extends readonly BlitzServerPlugin<obj
|
|||||||
getClient(),
|
getClient(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
} catch (err: any) {
|
} catch (error: any) {
|
||||||
onError?.(err)
|
onError?.(error)
|
||||||
throw err
|
throw formatError?.(error) ?? error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,9 +201,9 @@ export const setupBlitzServer = <TPlugins extends readonly BlitzServerPlugin<obj
|
|||||||
getClient(),
|
getClient(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
} catch (err: any) {
|
} catch (error: any) {
|
||||||
onError?.(err)
|
onError?.(error)
|
||||||
throw err
|
throw formatError?.(error) ?? error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,7 +219,8 @@ export const setupBlitzServer = <TPlugins extends readonly BlitzServerPlugin<obj
|
|||||||
])
|
])
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
onError?.(error)
|
onError?.(error)
|
||||||
return res.status(400).send(error)
|
const formattedError = formatError?.(error) ?? error
|
||||||
|
return res.status(400).send(formattedError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,6 +230,7 @@ export const setupBlitzServer = <TPlugins extends readonly BlitzServerPlugin<obj
|
|||||||
export interface BlitzConfig extends NextConfig {
|
export interface BlitzConfig extends NextConfig {
|
||||||
blitz?: {
|
blitz?: {
|
||||||
resolverPath?: ResolverPathOptions
|
resolverPath?: ResolverPathOptions
|
||||||
|
resolversDynamicImport?: boolean
|
||||||
includeRPCFolders?: string[]
|
includeRPCFolders?: string[]
|
||||||
customServer?: {
|
customServer?: {
|
||||||
hotReload?: boolean
|
hotReload?: boolean
|
||||||
@@ -256,6 +262,8 @@ export function withBlitz(nextConfig: BlitzConfig = {}): NextConfig {
|
|||||||
webpackConfig: config,
|
webpackConfig: config,
|
||||||
webpackRuleOptions: {
|
webpackRuleOptions: {
|
||||||
resolverPath: nextConfig.blitz?.resolverPath,
|
resolverPath: nextConfig.blitz?.resolverPath,
|
||||||
|
resolversDynamicImport:
|
||||||
|
nextConfig.blitz?.resolversDynamicImport ?? Boolean(process.env.VERCEL),
|
||||||
includeRPCFolders: nextConfig.blitz?.includeRPCFolders,
|
includeRPCFolders: nextConfig.blitz?.includeRPCFolders,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
11
packages/blitz-next/turbo.json
Normal file
11
packages/blitz-next/turbo.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://turbo.build/schema.json",
|
||||||
|
"extends": ["//"],
|
||||||
|
"pipeline": {
|
||||||
|
"dev": {
|
||||||
|
"dependsOn": ["@blitzjs/rpc#build", "blitz#build"],
|
||||||
|
"persistent": true,
|
||||||
|
"cache": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,144 @@
|
|||||||
# @blitzjs/rpc
|
# @blitzjs/rpc
|
||||||
|
|
||||||
|
## 2.0.0-beta.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [82649f341]
|
||||||
|
- blitz@2.0.0-beta.32
|
||||||
|
|
||||||
|
## 2.0.0-beta.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [90f1741da]
|
||||||
|
- Updated dependencies [df3265b85]
|
||||||
|
- blitz@2.0.0-beta.31
|
||||||
|
|
||||||
|
## 2.0.0-beta.30
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 727734955: ### Now we can configure Blitz RPC in the following way,
|
||||||
|
|
||||||
|
In your `[[...blitz]].ts` api file you can see the following settings
|
||||||
|
|
||||||
|
```ts
|
||||||
|
logging?: {
|
||||||
|
/**
|
||||||
|
* allowList Represents the list of routes for which logging should be enabled
|
||||||
|
* If whiteList is defined then only those routes will be logged
|
||||||
|
*/
|
||||||
|
allowList?: string[]
|
||||||
|
/**
|
||||||
|
* blockList Represents the list of routes for which logging should be disabled
|
||||||
|
* If blockList is defined then all routes except those will be logged
|
||||||
|
*/
|
||||||
|
blockList?: string[]
|
||||||
|
/**
|
||||||
|
* verbose Represents the flag to enable/disable logging
|
||||||
|
* If verbose is true then Blitz RPC will log the input and output of each resolver
|
||||||
|
*/
|
||||||
|
verbose?: boolean
|
||||||
|
/**
|
||||||
|
* disablelevel Represents the flag to enable/disable logging for a particular level
|
||||||
|
*/
|
||||||
|
disablelevel?: "debug" | "info"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```ts
|
||||||
|
import { rpcHandler } from "@blitzjs/rpc"
|
||||||
|
import { api } from "src/blitz-server"
|
||||||
|
|
||||||
|
export default api(
|
||||||
|
rpcHandler({
|
||||||
|
onError: console.log,
|
||||||
|
formatError: (error) => {
|
||||||
|
error.message = `FormatError handler: ${error.message}`
|
||||||
|
return error
|
||||||
|
},
|
||||||
|
logging: {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
export default api(
|
||||||
|
rpcHandler({
|
||||||
|
onError: console.log,
|
||||||
|
formatError: (error) => {
|
||||||
|
error.message = `FormatError handler: ${error.message}`
|
||||||
|
return error
|
||||||
|
},
|
||||||
|
logging: {
|
||||||
|
verbose: true,
|
||||||
|
blockList: ["getCurrentUser", ...], //just write the resolver name [which is the resolver file name]
|
||||||
|
},
|
||||||
|
})
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
This is enable verbose blitz rpc logging for all resolvers except the resolvers `getCurrentUser` and others mentioned in the `blockList`
|
||||||
|
|
||||||
|
- Updated dependencies [c5572bec6]
|
||||||
|
- Updated dependencies [727734955]
|
||||||
|
- blitz@2.0.0-beta.30
|
||||||
|
|
||||||
|
## 2.0.0-beta.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6b9a1c5a]
|
||||||
|
- Updated dependencies [61888d1a3]
|
||||||
|
- blitz@2.0.0-beta.29
|
||||||
|
|
||||||
|
## 2.0.0-beta.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 5166e5e03: (feat) upgrade tslog to v4.8.2
|
||||||
|
- 2533caf48: Fix return type of `requestMiddlewares` in `RpcServerPlugin`
|
||||||
|
- c7ac86b85: Fixes enormous memory consumption of the dev server by changing the default import strategy to "require" instead of "import" which in webpack causes multiple chunks to be created for each import.
|
||||||
|
|
||||||
|
## Blitz Configuration
|
||||||
|
|
||||||
|
To configure this behaviour, you can add the following to your next.config.js:
|
||||||
|
|
||||||
|
```js
|
||||||
|
/**
|
||||||
|
* @type {import('@blitzjs/next').BlitzConfig}
|
||||||
|
**/
|
||||||
|
const config = {
|
||||||
|
blitz: {
|
||||||
|
resolversDynamicImport: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
When `resolversDynamicImport` is set to `true`, the import strategy will be "import" instead of "require".
|
||||||
|
|
||||||
|
### On Vercel
|
||||||
|
|
||||||
|
If you are using Vercel, `resolversDynamicImport` will be set to `true` by default, since it is better for the separate chunks to be create for serverless lambdas.
|
||||||
|
|
||||||
|
- Updated dependencies [5166e5e03]
|
||||||
|
- blitz@2.0.0-beta.28
|
||||||
|
|
||||||
|
## 2.0.0-beta.27
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- eda14fa8a: Add ability to format the error on the server before returning it to the client.
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- blitz@2.0.0-beta.27
|
||||||
|
|
||||||
## 2.0.0-beta.26
|
## 2.0.0-beta.26
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/rpc",
|
"name": "@blitzjs/rpc",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0-beta.32",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -37,18 +37,18 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@tanstack/query-core": "4.24.4",
|
"@tanstack/query-core": "4.24.4",
|
||||||
"blitz": "2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "*",
|
"next": "*",
|
||||||
"react": "*"
|
"react": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/auth": "2.0.0-beta.26",
|
"@blitzjs/auth": "2.0.0-beta.32",
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@tanstack/query-core": "4.24.4",
|
"@tanstack/query-core": "4.24.4",
|
||||||
"@types/debug": "4.1.7",
|
"@types/debug": "4.1.7",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "18.0.25",
|
||||||
"@types/react-dom": "17.0.14",
|
"@types/react-dom": "17.0.14",
|
||||||
"blitz": "2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"next": "13.3.0",
|
"next": "13.3.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import {assert, baseLogger, Ctx, newLine, prettyMs, ResolverConfig} from "blitz"
|
import {assert, baseLogger, Ctx, newLine, prettyMs, ResolverConfig} from "blitz"
|
||||||
import {NextApiRequest, NextApiResponse} from "next"
|
import {NextApiRequest, NextApiResponse} from "next"
|
||||||
import {deserialize, serialize as superjsonSerialize, parse} from "superjson"
|
import {deserialize, parse, serialize as superjsonSerialize} from "superjson"
|
||||||
import {resolve} from "path"
|
import {resolve} from "path"
|
||||||
import chalk from "chalk"
|
import chalk from "chalk"
|
||||||
|
import {LoaderOptions} from "./server/loader/utils/loader-utils"
|
||||||
|
|
||||||
// TODO - optimize end user server bundles by not exporting all client stuff here
|
// TODO - optimize end user server bundles by not exporting all client stuff here
|
||||||
export * from "./index-browser"
|
export * from "./index-browser"
|
||||||
@@ -60,16 +61,11 @@ const loaderClient = resolve(dir, "./loader-client.cjs")
|
|||||||
const loaderServer = resolve(dir, "./loader-server.cjs")
|
const loaderServer = resolve(dir, "./loader-server.cjs")
|
||||||
const loaderServerResolvers = resolve(dir, "./loader-server-resolvers.cjs")
|
const loaderServerResolvers = resolve(dir, "./loader-server-resolvers.cjs")
|
||||||
|
|
||||||
interface WebpackRuleOptions {
|
|
||||||
resolverPath: ResolverPathOptions | undefined
|
|
||||||
includeRPCFolders: string[] | undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WebpackRule {
|
interface WebpackRule {
|
||||||
test: RegExp
|
test: RegExp
|
||||||
use: Array<{
|
use: Array<{
|
||||||
loader: string
|
loader: string
|
||||||
options: WebpackRuleOptions
|
options: LoaderOptions
|
||||||
}>
|
}>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,7 +80,7 @@ export interface InstallWebpackConfigOptions {
|
|||||||
rules: WebpackRule[]
|
rules: WebpackRule[]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
webpackRuleOptions: WebpackRuleOptions
|
webpackRuleOptions: LoaderOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
export function installWebpackConfig({
|
export function installWebpackConfig({
|
||||||
@@ -149,6 +145,60 @@ async function getResolverMap(): Promise<ResolverFiles | null | undefined> {
|
|||||||
|
|
||||||
interface RpcConfig {
|
interface RpcConfig {
|
||||||
onError?: (error: Error) => void
|
onError?: (error: Error) => void
|
||||||
|
formatError?: (error: Error) => Error
|
||||||
|
logging?: {
|
||||||
|
/**
|
||||||
|
* allowList Represents the list of routes for which logging should be enabled
|
||||||
|
* If allowList is defined then only those routes will be logged
|
||||||
|
*/
|
||||||
|
allowList?: string[]
|
||||||
|
/**
|
||||||
|
* blockList Represents the list of routes for which logging should be disabled
|
||||||
|
* If blockList is defined then all routes except those will be logged
|
||||||
|
*/
|
||||||
|
blockList?: string[]
|
||||||
|
/**
|
||||||
|
* verbose Represents the flag to enable/disable logging
|
||||||
|
* If verbose is true then Blitz RPC will log the input and output of each resolver
|
||||||
|
*/
|
||||||
|
verbose?: boolean
|
||||||
|
/**
|
||||||
|
* disablelevel Represents the flag to enable/disable logging for a particular level
|
||||||
|
*/
|
||||||
|
disablelevel?: "debug" | "info"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isBlitzRPCVerbose(resolverName: string, config: RpcConfig, level: string) {
|
||||||
|
// blitz rpc is by default verbose - to keep current behaviour
|
||||||
|
if (!config.logging) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
//if logging exists and verbose is not defined then default to true
|
||||||
|
if (config.logging && !("verbose" in config.logging)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
const isLevelDisabled = config.logging?.disablelevel === level
|
||||||
|
if (config.logging?.verbose) {
|
||||||
|
// If allowList array is defined then allow only those routes in allowList
|
||||||
|
if (config.logging?.allowList) {
|
||||||
|
if (config.logging?.allowList?.includes(resolverName) && !isLevelDisabled) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If blockList array is defined then allow all routes except those in blockList
|
||||||
|
if (config.logging?.blockList) {
|
||||||
|
if (!config.logging?.blockList?.includes(resolverName) && !isLevelDisabled) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if both allowList and blockList are not defined, then allow all routes
|
||||||
|
if (!config.logging?.allowList && !config.logging?.blockList && !isLevelDisabled) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
export function rpcHandler(config: RpcConfig) {
|
export function rpcHandler(config: RpcConfig) {
|
||||||
@@ -162,9 +212,11 @@ export function rpcHandler(config: RpcConfig) {
|
|||||||
|
|
||||||
const relativeRoutePath = (req.query.blitz as string[])?.join("/")
|
const relativeRoutePath = (req.query.blitz as string[])?.join("/")
|
||||||
const routePath = "/" + relativeRoutePath
|
const routePath = "/" + relativeRoutePath
|
||||||
|
const resolverName = routePath.replace(/(\/api\/rpc)?\//, "")
|
||||||
|
|
||||||
const log = baseLogger().getChildLogger({
|
const log = baseLogger().getSubLogger({
|
||||||
prefix: [routePath.replace(/(\/api\/rpc)?\//, "") + "()"],
|
name: "blitz-rpc",
|
||||||
|
prefix: [resolverName + "()"],
|
||||||
})
|
})
|
||||||
const customChalk = new chalk.Instance({
|
const customChalk = new chalk.Instance({
|
||||||
level: log.settings.type === "json" ? 0 : chalk.level,
|
level: log.settings.type === "json" ? 0 : chalk.level,
|
||||||
@@ -215,11 +267,16 @@ export function rpcHandler(config: RpcConfig) {
|
|||||||
? parse(`${req.query.meta}`)
|
? parse(`${req.query.meta}`)
|
||||||
: undefined,
|
: undefined,
|
||||||
})
|
})
|
||||||
log.info(customChalk.dim("Starting with input:"), data ? data : JSON.stringify(data))
|
if (isBlitzRPCVerbose(resolverName, config, "info")) {
|
||||||
|
log.info(customChalk.dim("Starting with input:"), data ? data : JSON.stringify(data))
|
||||||
|
}
|
||||||
const startTime = Date.now()
|
const startTime = Date.now()
|
||||||
const result = await resolver(data, (res as any).blitzCtx)
|
const result = await resolver(data, (res as any).blitzCtx)
|
||||||
const resolverDuration = Date.now() - startTime
|
const resolverDuration = Date.now() - startTime
|
||||||
log.debug(customChalk.dim("Result:"), result ? result : JSON.stringify(result))
|
|
||||||
|
if (isBlitzRPCVerbose(resolverName, config, "debug")) {
|
||||||
|
log.debug(customChalk.dim("Result:"), result ? result : JSON.stringify(result))
|
||||||
|
}
|
||||||
|
|
||||||
const serializerStartTime = Date.now()
|
const serializerStartTime = Date.now()
|
||||||
const serializedResult = superjsonSerialize(result)
|
const serializedResult = superjsonSerialize(result)
|
||||||
@@ -233,21 +290,26 @@ export function rpcHandler(config: RpcConfig) {
|
|||||||
result: serializedResult.meta,
|
result: serializedResult.meta,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
log.debug(
|
|
||||||
customChalk.dim(
|
if (isBlitzRPCVerbose(resolverName, config, "debug")) {
|
||||||
`Next.js serialization:${prettyMs(Date.now() - nextSerializerStartTime)}`,
|
log.debug(
|
||||||
),
|
customChalk.dim(
|
||||||
)
|
`Next.js serialization:${prettyMs(Date.now() - nextSerializerStartTime)}`,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const serializerDuration = Date.now() - serializerStartTime
|
const serializerDuration = Date.now() - serializerStartTime
|
||||||
const duration = Date.now() - startTime
|
const duration = Date.now() - startTime
|
||||||
|
if (isBlitzRPCVerbose(resolverName, config, "info")) {
|
||||||
log.info(
|
log.info(
|
||||||
customChalk.dim(
|
customChalk.dim(
|
||||||
`Finished: resolver:${prettyMs(resolverDuration)} serializer:${prettyMs(
|
`Finished: resolver:${prettyMs(resolverDuration)} serializer:${prettyMs(
|
||||||
serializerDuration,
|
serializerDuration,
|
||||||
)} total:${prettyMs(duration)}`,
|
)} total:${prettyMs(duration)}`,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
}
|
||||||
newLine()
|
newLine()
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -265,7 +327,8 @@ export function rpcHandler(config: RpcConfig) {
|
|||||||
error.statusCode = 500
|
error.statusCode = 500
|
||||||
}
|
}
|
||||||
|
|
||||||
const serializedError = superjsonSerialize(error)
|
const formattedError = config.formatError?.(error) ?? error
|
||||||
|
const serializedError = superjsonSerialize(formattedError)
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
result: null,
|
result: null,
|
||||||
|
|||||||
@@ -64,12 +64,14 @@ export async function transformBlitzRpcServer(
|
|||||||
extraRpcBasePaths: options?.includeRPCFolders,
|
extraRpcBasePaths: options?.includeRPCFolders,
|
||||||
})
|
})
|
||||||
|
|
||||||
code += `__internal_addBlitzRpcResolver('${routePath}',() => import('${slash(
|
const importStrategy = options?.resolversDynamicImport ? "import" : "require"
|
||||||
|
|
||||||
|
code += `__internal_addBlitzRpcResolver('${routePath}',() => ${importStrategy}('${slash(
|
||||||
resolverFilePath,
|
resolverFilePath,
|
||||||
)}'));`
|
)}'));`
|
||||||
code += "\n"
|
code += "\n"
|
||||||
}
|
}
|
||||||
// console.log("NEW CODE", code)
|
|
||||||
return code
|
return code
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,9 @@ import {posix, sep, win32, join, normalize} from "path"
|
|||||||
import {ResolverPathOptions} from "../../../index-server"
|
import {ResolverPathOptions} from "../../../index-server"
|
||||||
|
|
||||||
export interface LoaderOptions {
|
export interface LoaderOptions {
|
||||||
resolverPath: ResolverPathOptions
|
resolverPath?: ResolverPathOptions
|
||||||
includeRPCFolders?: string[]
|
includeRPCFolders?: string[]
|
||||||
|
resolversDynamicImport?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Loader {
|
export interface Loader {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import {createServerPlugin} from "blitz"
|
import {RequestMiddleware, createServerPlugin} from "blitz"
|
||||||
import {invoke} from "../client/invoke"
|
import {invoke} from "../client/invoke"
|
||||||
|
|
||||||
export const RpcServerPlugin = createServerPlugin(() => {
|
export const RpcServerPlugin = createServerPlugin(() => {
|
||||||
return {
|
return {
|
||||||
requestMiddlewares: [],
|
requestMiddlewares: [] as RequestMiddleware<any, any, void | Promise<void>>[],
|
||||||
exports: () => ({
|
exports: () => ({
|
||||||
invoke,
|
invoke,
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type {SessionContext, SessionContextBase} from "@blitzjs/auth"
|
import type {SessionContext, SessionContextBase} from "@blitzjs/auth"
|
||||||
import {Await, Ctx, EnsurePromise, AuthenticatedMiddlewareCtx} from "blitz"
|
import {Await, Ctx, EnsurePromise, AuthenticatedCtx} from "blitz"
|
||||||
import type {input as zInput, output as zOutput, ZodTypeAny} from "zod"
|
import type {input as zInput, output as zOutput, ZodTypeAny} from "zod"
|
||||||
|
|
||||||
export type ParserType = "sync" | "async"
|
export type ParserType = "sync" | "async"
|
||||||
@@ -271,7 +271,7 @@ interface ResolverAuthorize {
|
|||||||
<T, C = Ctx>(...args: Parameters<SessionContextBase["$authorize"]>): (
|
<T, C = Ctx>(...args: Parameters<SessionContextBase["$authorize"]>): (
|
||||||
input: T,
|
input: T,
|
||||||
ctx: C,
|
ctx: C,
|
||||||
) => ResultWithContext<T, AuthenticatedMiddlewareCtx>
|
) => ResultWithContext<T, AuthenticatedCtx>
|
||||||
}
|
}
|
||||||
|
|
||||||
const authorize: ResolverAuthorize = (...args) => {
|
const authorize: ResolverAuthorize = (...args) => {
|
||||||
|
|||||||
11
packages/blitz-rpc/turbo.json
Normal file
11
packages/blitz-rpc/turbo.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://turbo.build/schema.json",
|
||||||
|
"extends": ["//"],
|
||||||
|
"pipeline": {
|
||||||
|
"dev": {
|
||||||
|
"dependsOn": ["@blitzjs/auth#build", "blitz#build"],
|
||||||
|
"persistent": true,
|
||||||
|
"cache": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,125 @@
|
|||||||
# blitz
|
# blitz
|
||||||
|
|
||||||
|
## 2.0.0-beta.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 82649f341: Upgrade tslog to `4.9.0`.
|
||||||
|
|
||||||
|
This due a [tslog issue](https://github.com/fullstack-build/tslog/issues/227) that causes tslog to crash when attempting to log an error whose constructor expects more than one argument.
|
||||||
|
|
||||||
|
- Updated dependencies [47c6b62dc]
|
||||||
|
- Updated dependencies [82649f341]
|
||||||
|
- @blitzjs/generator@2.0.0-beta.32
|
||||||
|
|
||||||
|
## 2.0.0-beta.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 90f1741da: blitz-auth: Support for Prisma v5
|
||||||
|
|
||||||
|
Internal: Make `handle` a required paramter while updating the `session` modal.
|
||||||
|
|
||||||
|
- df3265b85: blitz-rpc: Cleanup Event Listeners - Fix potential memory leak by cleaning up any residual event listeners set by blitz.
|
||||||
|
- @blitzjs/generator@2.0.0-beta.31
|
||||||
|
|
||||||
|
## 2.0.0-beta.30
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- c5572bec6: blitz-auth: Fix webpack from following next-auth
|
||||||
|
- 727734955: ### Now we can configure Blitz RPC in the following way,
|
||||||
|
|
||||||
|
In your `[[...blitz]].ts` api file you can see the following settings
|
||||||
|
|
||||||
|
```ts
|
||||||
|
logging?: {
|
||||||
|
/**
|
||||||
|
* allowList Represents the list of routes for which logging should be enabled
|
||||||
|
* If whiteList is defined then only those routes will be logged
|
||||||
|
*/
|
||||||
|
allowList?: string[]
|
||||||
|
/**
|
||||||
|
* blockList Represents the list of routes for which logging should be disabled
|
||||||
|
* If blockList is defined then all routes except those will be logged
|
||||||
|
*/
|
||||||
|
blockList?: string[]
|
||||||
|
/**
|
||||||
|
* verbose Represents the flag to enable/disable logging
|
||||||
|
* If verbose is true then Blitz RPC will log the input and output of each resolver
|
||||||
|
*/
|
||||||
|
verbose?: boolean
|
||||||
|
/**
|
||||||
|
* disablelevel Represents the flag to enable/disable logging for a particular level
|
||||||
|
*/
|
||||||
|
disablelevel?: "debug" | "info"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```ts
|
||||||
|
import { rpcHandler } from "@blitzjs/rpc"
|
||||||
|
import { api } from "src/blitz-server"
|
||||||
|
|
||||||
|
export default api(
|
||||||
|
rpcHandler({
|
||||||
|
onError: console.log,
|
||||||
|
formatError: (error) => {
|
||||||
|
error.message = `FormatError handler: ${error.message}`
|
||||||
|
return error
|
||||||
|
},
|
||||||
|
logging: {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
export default api(
|
||||||
|
rpcHandler({
|
||||||
|
onError: console.log,
|
||||||
|
formatError: (error) => {
|
||||||
|
error.message = `FormatError handler: ${error.message}`
|
||||||
|
return error
|
||||||
|
},
|
||||||
|
logging: {
|
||||||
|
verbose: true,
|
||||||
|
blockList: ["getCurrentUser", ...], //just write the resolver name [which is the resolver file name]
|
||||||
|
},
|
||||||
|
})
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
This is enable verbose blitz rpc logging for all resolvers except the resolvers `getCurrentUser` and others mentioned in the `blockList`
|
||||||
|
|
||||||
|
- @blitzjs/generator@2.0.0-beta.30
|
||||||
|
|
||||||
|
## 2.0.0-beta.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- b6b9a1c5a: Fix Next-Auth integration: `Unable to use next-auth with provider: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]`
|
||||||
|
- 61888d1a3: Fix log formatting to not show the path of blitz rpc
|
||||||
|
- Updated dependencies [7aef610d8]
|
||||||
|
- @blitzjs/generator@2.0.0-beta.29
|
||||||
|
|
||||||
|
## 2.0.0-beta.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 5166e5e03: (feat) upgrade tslog to v4.8.2
|
||||||
|
- Updated dependencies [5166e5e03]
|
||||||
|
- @blitzjs/generator@2.0.0-beta.28
|
||||||
|
|
||||||
|
## 2.0.0-beta.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [d814c2d2d]
|
||||||
|
- @blitzjs/generator@2.0.0-beta.27
|
||||||
|
|
||||||
## 2.0.0-beta.26
|
## 2.0.0-beta.26
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "blitz",
|
"name": "blitz",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0-beta.32",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"blitz": "bin/blitz"
|
"blitz": "bin/blitz"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blitzjs/generator": "2.0.0-beta.26",
|
"@blitzjs/generator": "2.0.0-beta.32",
|
||||||
"@mrleebo/prisma-ast": "0.2.6",
|
"@mrleebo/prisma-ast": "0.2.6",
|
||||||
"@types/global-agent": "2.1.1",
|
"@types/global-agent": "2.1.1",
|
||||||
"arg": "5.0.1",
|
"arg": "5.0.1",
|
||||||
@@ -76,11 +76,11 @@
|
|||||||
"tar": "6.1.11",
|
"tar": "6.1.11",
|
||||||
"ts-node": "10.9.1",
|
"ts-node": "10.9.1",
|
||||||
"tsconfig-paths": "4.0.0",
|
"tsconfig-paths": "4.0.0",
|
||||||
"tslog": "3.3.4",
|
"tslog": "4.9.0",
|
||||||
"watchpack": "2.1.1"
|
"watchpack": "2.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "workspace:2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@types/cookie": "0.4.1",
|
"@types/cookie": "0.4.1",
|
||||||
"@types/cross-spawn": "6.0.2",
|
"@types/cross-spawn": "6.0.2",
|
||||||
"@types/debug": "4.1.7",
|
"@types/debug": "4.1.7",
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const pipeline = promisify(Stream.pipeline)
|
|||||||
const got = async (url: string) => {
|
const got = async (url: string) => {
|
||||||
return require("got")(url).catch((e: any) => {
|
return require("got")(url).catch((e: any) => {
|
||||||
if (e.response.statusCode === 403) {
|
if (e.response.statusCode === 403) {
|
||||||
baseLogger({displayDateTime: false}).error(e.response.body)
|
baseLogger().error(e.response.body)
|
||||||
} else {
|
} else {
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
@@ -264,7 +264,7 @@ const install: CliCommand = async () => {
|
|||||||
|
|
||||||
if (!(await isUrlValid(packageJsonPath))) {
|
if (!(await isUrlValid(packageJsonPath))) {
|
||||||
debug("Url is invalid for ", packageJsonPath)
|
debug("Url is invalid for ", packageJsonPath)
|
||||||
baseLogger({displayDateTime: false}).error(`Could not find recipe "${args._[1]}"\n`)
|
baseLogger().error(`Could not find recipe "${args._[1]}"\n`)
|
||||||
console.log(`${chalk.bold("Please provide one of the following:")}
|
console.log(`${chalk.bold("Please provide one of the following:")}
|
||||||
|
|
||||||
1. The name of a recipe to install (e.g. "tailwind")
|
1. The name of a recipe to install (e.g. "tailwind")
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export const codegenTasks = async () => {
|
|||||||
*/
|
*/
|
||||||
const nextDir = await resolveCwd("next")
|
const nextDir = await resolveCwd("next")
|
||||||
const nextClientIndex = join(nextDir, "../..", "client", "index.js")
|
const nextClientIndex = join(nextDir, "../..", "client", "index.js")
|
||||||
|
console.log(nextClientIndex)
|
||||||
const readFile = await fs.readFile(nextClientIndex)
|
const readFile = await fs.readFile(nextClientIndex)
|
||||||
const packageJson = await getPackageJson()
|
const packageJson = await getPackageJson()
|
||||||
const version = packageJson.dependencies.next
|
const version = packageJson.dependencies.next
|
||||||
@@ -39,15 +40,24 @@ export const codegenTasks = async () => {
|
|||||||
)
|
)
|
||||||
await fs.writeFile(nextClientIndex, updatedFile)
|
await fs.writeFile(nextClientIndex, updatedFile)
|
||||||
log.success("Next.js was successfully patched with a React Suspense fix")
|
log.success("Next.js was successfully patched with a React Suspense fix")
|
||||||
} else if (nextVersion && semver.satisfies(nextVersion, ">=13.2")) {
|
} else if (nextVersion && semver.satisfies(nextVersion, "13.1 - 13.3.0")) {
|
||||||
const updatedFile = readFile
|
const updatedFile = readFile
|
||||||
.toString()
|
.toString()
|
||||||
.replace(
|
.replace(
|
||||||
/_onRecoverableError\.default/,
|
/_onRecoverableError\.default$/gm,
|
||||||
`(err) => (err.toString().includes("DYNAMIC_SERVER_USAGE") || err.toString().includes("could not finish this Suspense boundary") || err.toString().includes("Minified React error #419")) ? null : _onRecoverableError.default(err)`,
|
`(err) => (err.toString().includes("DYNAMIC_SERVER_USAGE") || err.toString().includes("could not finish this Suspense boundary") || err.toString().includes("Minified React error #419")) ? null : _onRecoverableError.default(err)`,
|
||||||
)
|
)
|
||||||
await fs.writeFile(nextClientIndex, updatedFile)
|
await fs.writeFile(nextClientIndex, updatedFile)
|
||||||
log.success("Next.js was successfully patched with a React Suspense fix")
|
log.success("Next.js was successfully patched with a React Suspense fix")
|
||||||
|
} else if (nextVersion && semver.satisfies(nextVersion, ">=13.3.1")) {
|
||||||
|
const updatedFile = readFile
|
||||||
|
.toString()
|
||||||
|
.replace(
|
||||||
|
/_onrecoverableerror\.default$/gm,
|
||||||
|
`(err) => (err.toString().includes("DYNAMIC_SERVER_USAGE") || err.toString().includes("could not finish this Suspense boundary") || err.toString().includes("Minified React error #419")) ? null : _onrecoverableerror.default(err)`,
|
||||||
|
)
|
||||||
|
await fs.writeFile(nextClientIndex, updatedFile)
|
||||||
|
log.success("Next.js was successfully patched with a React Suspense fix")
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.error(JSON.stringify(err, null, 2))
|
log.error(JSON.stringify(err, null, 2))
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
import {join, dirname} from "path"
|
import {join} from "path"
|
||||||
import os from "os"
|
import os from "os"
|
||||||
import {promises} from "fs"
|
import {promises} from "fs"
|
||||||
const readFile = promises.readFile
|
import {outputFile, readdir, readFile} from "fs-extra"
|
||||||
import {outputFile, readdir} from "fs-extra"
|
|
||||||
import findUp from "find-up"
|
|
||||||
import resolveFrom from "resolve-from"
|
|
||||||
import Watchpack from "watchpack"
|
import Watchpack from "watchpack"
|
||||||
import {isInternalBlitzMonorepoDevelopment} from "./helpers"
|
|
||||||
import {findNodeModulesRoot} from "./find-node-modules"
|
import {findNodeModulesRoot} from "./find-node-modules"
|
||||||
|
|
||||||
const debug = require("debug")("blitz")
|
const debug = require("debug")("blitz")
|
||||||
export const CONFIG_FILE = ".blitz.config.compiled.js"
|
export const CONFIG_FILE = ".blitz.config.compiled.js"
|
||||||
export const NEXT_CONFIG_FILE = "next.config.js"
|
export const NEXT_CONFIG_FILE = "next.config.js"
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ declare global {
|
|||||||
beforeHttpRequest: BeforeHttpRequest
|
beforeHttpRequest: BeforeHttpRequest
|
||||||
beforeHttpResponse: BeforeHttpResponse
|
beforeHttpResponse: BeforeHttpResponse
|
||||||
}
|
}
|
||||||
|
var __BLITZ_CLEAN_UP_LISTENERS: () => void
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,11 +41,9 @@ export class RecipeExecutor<Options extends RecipeMeta> {
|
|||||||
{exitOnCtrlC: false},
|
{exitOnCtrlC: false},
|
||||||
)
|
)
|
||||||
await waitUntilExit()
|
await waitUntilExit()
|
||||||
baseLogger({displayDateTime: false, displayLogLevel: false}).info(
|
baseLogger().info(`\n🎉 The ${this.options.name} recipe has been installed!\n`)
|
||||||
`\n🎉 The ${this.options.name} recipe has been installed!\n`,
|
|
||||||
)
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
baseLogger({displayDateTime: false}).error(e as any)
|
baseLogger().error(e as any)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import {ISettingsParam, Logger, TLogLevelName} from "tslog"
|
import {ILogObj, ISettingsParam, Logger} from "tslog"
|
||||||
import c from "chalk"
|
import c from "chalk"
|
||||||
import {Table} from "console-table-printer"
|
import {Table} from "console-table-printer"
|
||||||
import ora from "ora"
|
import ora from "ora"
|
||||||
import readline from "readline"
|
import readline from "readline"
|
||||||
|
|
||||||
export type BlitzLoggerSettings = ISettingsParam
|
export type BlitzLoggerSettings = ISettingsParam<ILogObj>
|
||||||
export type BlitzLogLevel = TLogLevelName
|
export type BlitzLogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal"
|
||||||
|
|
||||||
declare namespace globalThis {
|
declare namespace globalThis {
|
||||||
let _blitz_baseLogger: Logger
|
let _blitz_baseLogger: Logger<ILogObj>
|
||||||
let _blitz_logLevel: BlitzLogLevel
|
let _blitz_logLevel: BlitzLogLevel
|
||||||
}
|
}
|
||||||
|
|
||||||
export const baseLogger = (options: BlitzLoggerSettings = {}): Logger => {
|
export const baseLogger = (options: BlitzLoggerSettings = {}): Logger<ILogObj> => {
|
||||||
if (globalThis._blitz_baseLogger) return globalThis._blitz_baseLogger
|
if (globalThis._blitz_baseLogger) return globalThis._blitz_baseLogger
|
||||||
|
|
||||||
globalThis._blitz_baseLogger = BlitzLogger(options)
|
globalThis._blitz_baseLogger = BlitzLogger(options)
|
||||||
@@ -22,34 +22,18 @@ export const baseLogger = (options: BlitzLoggerSettings = {}): Logger => {
|
|||||||
|
|
||||||
export const BlitzLogger = (settings: BlitzLoggerSettings = {}) => {
|
export const BlitzLogger = (settings: BlitzLoggerSettings = {}) => {
|
||||||
const baseLogger = new Logger({
|
const baseLogger = new Logger({
|
||||||
minLevel: "info",
|
prettyLogTimeZone: process.env.NODE_ENV === "production" ? "UTC" : "local",
|
||||||
type: "pretty",
|
|
||||||
dateTimePattern:
|
|
||||||
process.env.NODE_ENV === "production"
|
|
||||||
? "year-month-day hour:minute:second.millisecond"
|
|
||||||
: "hour:minute:second.millisecond",
|
|
||||||
displayFunctionName: false,
|
|
||||||
displayFilePath: "hidden",
|
|
||||||
displayRequestId: false,
|
|
||||||
dateTimeTimezone:
|
|
||||||
process.env.NODE_ENV === "production"
|
|
||||||
? "utc"
|
|
||||||
: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
||||||
prettyInspectHighlightStyles: {
|
|
||||||
name: "yellow",
|
|
||||||
number: "blue",
|
|
||||||
bigint: "blue",
|
|
||||||
boolean: "blue",
|
|
||||||
},
|
|
||||||
maskValuesOfKeys: ["password", "passwordConfirmation", "currentPassword"],
|
maskValuesOfKeys: ["password", "passwordConfirmation", "currentPassword"],
|
||||||
exposeErrorCodeFrame: process.env.NODE_ENV !== "production",
|
type: process.env.NODE_ENV === "production" ? "json" : "pretty",
|
||||||
|
prettyLogTemplate:
|
||||||
|
"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}\t{{logLevelName}}\t[{{name}}]\t",
|
||||||
...settings,
|
...settings,
|
||||||
})
|
})
|
||||||
|
|
||||||
return baseLogger
|
return baseLogger
|
||||||
}
|
}
|
||||||
|
|
||||||
export const initializeLogger = (logger: Logger) => {
|
export const initializeLogger = (logger: Logger<ILogObj>) => {
|
||||||
globalThis._blitz_baseLogger = logger
|
globalThis._blitz_baseLogger = logger
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {IncomingMessage, ServerResponse} from "http"
|
import {IncomingMessage, ServerResponse} from "http"
|
||||||
import {compose, Ctx, RequestMiddleware, MiddlewareNext, MiddlewareResponse} from "./index-server"
|
import {compose, Ctx, MiddlewareNext, MiddlewareResponse, RequestMiddleware} from "./index-server"
|
||||||
|
|
||||||
export async function handleRequestWithMiddleware<
|
export async function handleRequestWithMiddleware<
|
||||||
Req extends IncomingMessage = IncomingMessage,
|
Req extends IncomingMessage = IncomingMessage,
|
||||||
|
|||||||
@@ -89,13 +89,23 @@ export function reduceBlitzClientPlugins<TPlugins extends readonly ClientPlugin<
|
|||||||
globalThis.__BLITZ_MIDDLEWARE_HOOKS = middleware
|
globalThis.__BLITZ_MIDDLEWARE_HOOKS = middleware
|
||||||
|
|
||||||
if (isClient) {
|
if (isClient) {
|
||||||
document.addEventListener("blitz:session-created", async () => {
|
if (globalThis.__BLITZ_CLEAN_UP_LISTENERS) {
|
||||||
|
globalThis.__BLITZ_CLEAN_UP_LISTENERS()
|
||||||
|
}
|
||||||
|
const onSessionCreated = async () => {
|
||||||
await Promise.all(events.onSessionCreated())
|
await Promise.all(events.onSessionCreated())
|
||||||
})
|
}
|
||||||
document.addEventListener("blitz:rpc-error", async (e) => {
|
const onRpcError = async (e: Event): Promise<void> => {
|
||||||
const customEvent = e as CustomEvent<Error>
|
const customEvent = e as CustomEvent<Error>
|
||||||
await Promise.all(events.onRpcError(customEvent.detail))
|
await Promise.all(events.onRpcError(customEvent.detail))
|
||||||
})
|
}
|
||||||
|
document.addEventListener("blitz:session-created", onSessionCreated)
|
||||||
|
document.addEventListener("blitz:rpc-error", onRpcError)
|
||||||
|
|
||||||
|
globalThis.__BLITZ_CLEAN_UP_LISTENERS = () => {
|
||||||
|
document.removeEventListener("blitz:session-created", onSessionCreated)
|
||||||
|
document.removeEventListener("blitz:rpc-error", onRpcError)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const withPlugins = compose(...providers)
|
const withPlugins = compose(...providers)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {UrlObject} from "url"
|
|||||||
// Context for plugins to declaration merge stuff into
|
// Context for plugins to declaration merge stuff into
|
||||||
export interface Ctx {}
|
export interface Ctx {}
|
||||||
|
|
||||||
export interface AuthenticatedMiddlewareCtx {}
|
export interface AuthenticatedCtx {}
|
||||||
|
|
||||||
export type CodegenField = {
|
export type CodegenField = {
|
||||||
component: string
|
component: string
|
||||||
@@ -17,7 +17,7 @@ export interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query" | "
|
|||||||
href: string
|
href: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AuthenticatedMiddlewareCtx {}
|
export interface AuthenticatedCtx {}
|
||||||
|
|
||||||
export type EventHooks = {
|
export type EventHooks = {
|
||||||
onSessionCreated?: OnSessionCreated
|
onSessionCreated?: OnSessionCreated
|
||||||
|
|||||||
11
packages/blitz/turbo.json
Normal file
11
packages/blitz/turbo.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://turbo.build/schema.json",
|
||||||
|
"extends": ["//"],
|
||||||
|
"pipeline": {
|
||||||
|
"dev": {
|
||||||
|
"dependsOn": ["@blitzjs/generator#build"],
|
||||||
|
"persistent": true,
|
||||||
|
"cache": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,58 @@
|
|||||||
# @blitzjs/codemod
|
# @blitzjs/codemod
|
||||||
|
|
||||||
|
## 2.0.0-beta.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [47c6b62dc]
|
||||||
|
- Updated dependencies [82649f341]
|
||||||
|
- @blitzjs/generator@2.0.0-beta.32
|
||||||
|
- blitz@2.0.0-beta.32
|
||||||
|
|
||||||
|
## 2.0.0-beta.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [90f1741da]
|
||||||
|
- Updated dependencies [df3265b85]
|
||||||
|
- blitz@2.0.0-beta.31
|
||||||
|
- @blitzjs/generator@2.0.0-beta.31
|
||||||
|
|
||||||
|
## 2.0.0-beta.30
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [c5572bec6]
|
||||||
|
- Updated dependencies [727734955]
|
||||||
|
- blitz@2.0.0-beta.30
|
||||||
|
- @blitzjs/generator@2.0.0-beta.30
|
||||||
|
|
||||||
|
## 2.0.0-beta.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [7aef610d8]
|
||||||
|
- Updated dependencies [b6b9a1c5a]
|
||||||
|
- Updated dependencies [61888d1a3]
|
||||||
|
- @blitzjs/generator@2.0.0-beta.29
|
||||||
|
- blitz@2.0.0-beta.29
|
||||||
|
|
||||||
|
## 2.0.0-beta.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [5166e5e03]
|
||||||
|
- blitz@2.0.0-beta.28
|
||||||
|
- @blitzjs/generator@2.0.0-beta.28
|
||||||
|
|
||||||
|
## 2.0.0-beta.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [d814c2d2d]
|
||||||
|
- @blitzjs/generator@2.0.0-beta.27
|
||||||
|
- blitz@2.0.0-beta.27
|
||||||
|
|
||||||
## 2.0.0-beta.26
|
## 2.0.0-beta.26
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/codemod",
|
"name": "@blitzjs/codemod",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0-beta.32",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "unbuild",
|
"build": "unbuild",
|
||||||
"dev": "watch unbuild src --wait=0.2",
|
"dev": "watch unbuild src --wait=0.2",
|
||||||
@@ -25,9 +25,9 @@
|
|||||||
"@babel/plugin-proposal-class-properties": "7.17.12",
|
"@babel/plugin-proposal-class-properties": "7.17.12",
|
||||||
"@babel/plugin-syntax-jsx": "7.17.12",
|
"@babel/plugin-syntax-jsx": "7.17.12",
|
||||||
"@babel/plugin-syntax-typescript": "7.17.12",
|
"@babel/plugin-syntax-typescript": "7.17.12",
|
||||||
"@blitzjs/generator": "2.0.0-beta.26",
|
"@blitzjs/generator": "2.0.0-beta.32",
|
||||||
"arg": "5.0.1",
|
"arg": "5.0.1",
|
||||||
"blitz": "2.0.0-beta.26",
|
"blitz": "2.0.0-beta.32",
|
||||||
"chalk": "^4.1.0",
|
"chalk": "^4.1.0",
|
||||||
"cross-spawn": "7.0.3",
|
"cross-spawn": "7.0.3",
|
||||||
"debug": "4.3.3",
|
"debug": "4.3.3",
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/preset-env": "7.12.10",
|
"@babel/preset-env": "7.12.10",
|
||||||
"@blitzjs/config": "workspace:*",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@types/jscodeshift": "0.11.2",
|
"@types/jscodeshift": "0.11.2",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"ast-types": "0.14.2",
|
"ast-types": "0.14.2",
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
# @blitzjs/config
|
# @blitzjs/config
|
||||||
|
|
||||||
|
## 2.0.0-beta.32
|
||||||
|
|
||||||
|
## 2.0.0-beta.31
|
||||||
|
|
||||||
|
## 2.0.0-beta.30
|
||||||
|
|
||||||
|
## 2.0.0-beta.29
|
||||||
|
|
||||||
|
## 2.0.0-beta.28
|
||||||
|
|
||||||
|
## 2.0.0-beta.27
|
||||||
|
|
||||||
## 2.0.0-beta.26
|
## 2.0.0-beta.26
|
||||||
|
|
||||||
## 2.0.0-beta.25
|
## 2.0.0-beta.25
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/config",
|
"name": "@blitzjs/config",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0-beta.32",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "5.42.1",
|
"@typescript-eslint/eslint-plugin": "5.42.1",
|
||||||
|
|||||||
@@ -1,5 +1,36 @@
|
|||||||
# @blitzjs/generator
|
# @blitzjs/generator
|
||||||
|
|
||||||
|
## 2.0.0-beta.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 47c6b62dc: Update examples of generate all in docs to include one column in model.
|
||||||
|
- 82649f341: Upgrade tslog to `4.9.0`.
|
||||||
|
|
||||||
|
This due a [tslog issue](https://github.com/fullstack-build/tslog/issues/227) that causes tslog to crash when attempting to log an error whose constructor expects more than one argument.
|
||||||
|
|
||||||
|
## 2.0.0-beta.31
|
||||||
|
|
||||||
|
## 2.0.0-beta.30
|
||||||
|
|
||||||
|
## 2.0.0-beta.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 7aef610d8: Make Next.js version stick to 13.4.5 when generating a new app
|
||||||
|
|
||||||
|
## 2.0.0-beta.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 5166e5e03: (feat) upgrade tslog to v4.8.2
|
||||||
|
|
||||||
|
## 2.0.0-beta.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- d814c2d2d: fix: add missing key prop to LabelSelectField
|
||||||
|
|
||||||
## 2.0.0-beta.26
|
## 2.0.0-beta.26
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@blitzjs/generator",
|
"name": "@blitzjs/generator",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0-beta.32",
|
||||||
"homepage": "https://blitzjs.com/",
|
"homepage": "https://blitzjs.com/",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -48,13 +48,13 @@
|
|||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"recast": "0.20.5",
|
"recast": "0.20.5",
|
||||||
"supports-color": "8.1.1",
|
"supports-color": "8.1.1",
|
||||||
"tslog": "3.3.4",
|
"tslog": "4.9.0",
|
||||||
"username": "5.1.0",
|
"username": "5.1.0",
|
||||||
"vinyl": "2.2.1",
|
"vinyl": "2.2.1",
|
||||||
"zod": "3.20.2"
|
"zod": "3.20.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@blitzjs/config": "2.0.0-beta.26",
|
"@blitzjs/config": "2.0.0-beta.32",
|
||||||
"@juanm04/cpx": "2.0.1",
|
"@juanm04/cpx": "2.0.1",
|
||||||
"@types/babel__core": "7.1.19",
|
"@types/babel__core": "7.1.19",
|
||||||
"@types/diff": "5.0.2",
|
"@types/diff": "5.0.2",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user