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

Compare commits

...

13 Commits

Author SHA1 Message Date
Dillon Raphael
11fdad3acf Merge branch 'main' into feature/onAuth 2022-10-12 12:58:06 -04:00
Siddharth Suresh
f39ba1ff13 #3748 Add custom template option back to blitz generate command (#3866) 2022-10-12 11:46:24 -04:00
Blitz.js Bot
149b999f67 (meta) added @oloost as contributor 2022-10-12 06:13:22 -04:00
Aleksandra
3a602b613b Fix missing blitz/installer dependency in recipes (#3895) 2022-10-12 18:11:12 +08:00
github-actions[bot]
58bb38f809 Version Packages (beta) (#3893)
* Version Packages (beta)

* Fix version

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-10-11 17:48:40 +08:00
Aleksandra
1476a577bb Update PULL_REQUEST_TEMPLATE.md (#3878) 2022-10-11 17:32:21 +08:00
Fran Zekan
ba309d9cdd Merge branch 'main' into feature/onAuth 2022-10-03 14:02:16 +02:00
Fran Zekan
7e6ccd0359 Fix pnpm-lock 2022-10-02 01:17:47 +02:00
Fran Zekan
602d461b8e Fix onAuthorize client side 2022-10-02 01:07:45 +02:00
Fran Zekan
f383d10406 Merge branch 'main' into feature/onAuth 2022-10-02 00:28:48 +02:00
Fran Zekan
392440b39e Merge branch 'main' into feature/onAuth 2022-07-22 23:53:32 +02:00
Fran Zekan
9d5e0f5804 Wip testing onAuthorize in client 2022-07-17 23:10:02 +02:00
Fran Zekan
178956a76b Add serverSide onAuthMiddleware hook 2022-07-17 19:03:02 +02:00
84 changed files with 598 additions and 191 deletions

View File

@@ -3714,8 +3714,17 @@
"contributions": [
"doc"
]
},
{
"login": "oloost",
"name": "oloost",
"avatar_url": "https://avatars.githubusercontent.com/u/72395941?v=4",
"profile": "https://github.com/oloost",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
"skipCi": true
}
}

View File

@@ -10,4 +10,4 @@
Bump react, react-dom, @types/react and next versions
This fixes a console warning: `Warning: Received `true` for a non-boolean attribute `global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.
This fixes a console warning: `Warning: Received `true`for a non-boolean attribute`global`.` when using `styled-jsx`. Versions bump also fixes React Hydration error that happens on and off when using `redirectAuthenticatedTo`.

View File

@@ -1,5 +1,5 @@
---
"@blitzjs/codemod": patch
---
Add DocumentProps & DocumentContext to the codemod import map
Add DocumentProps & DocumentContext to the codemod import map

View File

@@ -2,21 +2,10 @@
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [
[
"blitz"
],
[
"@blitzjs/*"
]
],
"fixed": [["blitz"], ["@blitzjs/*"]],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"web",
"test-*",
"toolkit-*"
]
"ignore": ["web", "test-*", "toolkit-*", "@blitzjs/recipe-*"]
}

View File

@@ -0,0 +1,11 @@
---
"blitz": patch
"@blitzjs/auth": patch
"@blitzjs/next": patch
"@blitzjs/rpc": patch
"@blitzjs/codemod": patch
"@blitzjs/config": patch
"@blitzjs/generator": patch
---
Fix release

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Fix `blitz install` not working due to missing `blitz/installer` dependency

View File

@@ -97,6 +97,7 @@
"fuzzy-bees-warn",
"fuzzy-jars-admire",
"gentle-dogs-reply",
"gentle-lions-explode",
"gold-horses-punch",
"good-apes-drum",
"good-insects-wink",

View File

@@ -0,0 +1,6 @@
---
"blitz": patch
"@blitzjs/generator": patch
---
Allow passing custom templates to the `blitz generate` command. Extend the `generate` command with `custom-templates` to provide an easy starting point for users to customize the default templates: `blitz generate custom-templates`.

View File

@@ -5,4 +5,5 @@
"blitz": patch
"@blitzjs/generator": patch
---
Fixes the supports-color warning for pnpm

View File

@@ -3,6 +3,11 @@ Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible please:
- Link issue via "Closes #[issue_number]
- Choose & follow the right checklist for the change that you're making:
Please make sure to add a changeset. Run `pnpm changeset` in the root directory to do so.
Then select updated Blitz packages when prompted, and add a short message describing the changes.
The message should be user-facing — explain **what** was changed, not **how**.
Ignore if there are no user-facing changes.
-->
Closes: ?
@@ -11,9 +16,11 @@ Closes: ?
## Bug Checklist
- [ ] Changeset added (run `pnpm changeset` in the root directory)
- [ ] Integration test added (see [test docs](https://blitzjs.com/docs/contributing#running-tests) if needed)
## Feature Checklist
- [ ] Changeset added (run `pnpm changeset` in the root directory)
- [ ] Integration test added (see [test docs](https://blitzjs.com/docs/contributing#running-tests) if needed)
- [ ] Documentation added/updated (submit PR to [blitzjs.com repo `canary` branch](https://github.com/blitz-js/blitzjs.com/tree/canary))
- [ ] Documentation added/updated (submit PR to [blitzjs.com repo `main` branch](https://github.com/blitz-js/blitzjs.com))

View File

@@ -6,7 +6,7 @@
<img alt="" src="https://img.shields.io/badge/Join%20our%20community-6700EB.svg?style=for-the-badge&labelColor=000000&logoWidth=20&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQ9SURBVHgB7d3dVdtAEIbhcSpICUoH0IEogQqSVBBSAU4FSSpIOoAORAfQgSghHXzZ1U/YcMD4R9rZmf2ec3y448LyiNf27iLiGIAmPLrweC9Un3DhrzG6EarLNP09nlwJ1SOZ/lQr5N80/S/p2QMVCBf5N17XCfm1Y/rBHqjAG9PPHvBsz+mf9WAP+HLA9M/YA14cOP2payH7jpj+VCtk1wnTP+vj7xCy6cTpn7EHLMLp059iD1iD8eveJbVCNsSLheX1YA/YgOWnf8YeKB3Wmf7Ud6Fy4f/FHmtpxbl3YlC4MJ/Cj0bWdwPnPbARg+L0S54XQHS32WwuxClzd4CM0z9rPfeAuTtA5ulPXYQ7wZ04Y+oOoDD9KZc9YOoOoDj9s4dwFzgXR6w1wIPoOvPWA9buAHEJ173o3gWiy3AnuBUHLEbgmYwvAk1/wuM8vAgexThzbwPDkx7/DHwVXfFOxP2GmsKd4Ab6zPeAyU8CI7AHFmH2BRCBPXAyk18GzUrqAXCTiR4ssyj0VFw/oCU8+e+RZ33AWz6KMaYbIIWxB+JSLs1bsbkeMN0AqakHvoku9oA2sAfqBvbAQdw0QArsgb25aYBUQT3QgT2gB+yBuqGcHij2UCqXDZACe2Anlw2QYg/QAOyBuoE98CL3DZDCuK4/rh/Q7oGL6U+TOvcNkJoijN8X1C48+T+g75eQDrAH/qmqAVJgDwyqaoAUe4AGYA/UDZX3QLUNkEIZPRCd5+6BahsgVUgPROwBTSijB7jpVAvGHriHvmw9wAZ4BpX1ABvgmakHtPcbRuwBTWAPULgAV9D/jKDY9YRvwvgEaurD44uQHvAol7qBW7WKluVtIHiUS7GyvA0s6CiXDnxrpQfsgbqBS7GKk/2jYHCrVlGyfxTMrVo0ALdq1Q3sgSKofh0M9oA61a+D2QM0AHugbmAPqClmSRjK2apVVQ8UsySsoK1aHdgDesCtWnUDeyCrIpeFg1u3sylyWTi3btMA7IG6gT2wuuK3hoE9sKrit4YVslWLPaAN7IG6ocKt2zmY2h4O9sDiTG0PZw/QANy6XTewBxZj9ogYVHy025LMHhEz9cBn0We6B0yfERReBLfhx0/R1YQHPx/QBPbA0VwcEwf2wNFcHBPHHjiem3MC2QPHcXdSaJjA+KfgTPQ8hhfjBzHC40mhlzJ+Xq9lK4a4PCs43AVaGTed5mZq+iOXZwWHi3AnOj2wFWNcnxYe7gTxLtBKHuamP/J+Wnh8a5irB7ZC5Yk9gPX1QuXC+usHWqGyhYvUYR0a7zboUOFCNVhnk0krZAOW7wFOvzXhom2xnEbIHizTA1wEYhWW6YFGyC6c1gOcfg9wfA80Qj7g8B7g9HuCww+haIR8wf49wOn3Cvv9k8tGyC/s7gFOv3fY3QONkH+v9MBWqB7PeqDn9FcIT//kcitUn6kHOu/T/xfWzlQy3dEHhwAAAABJRU5ErkJggg==">
</a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-393-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-394-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/main/LICENSE">
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
@@ -723,11 +723,12 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
<td align="center"><a href="https://chaiwattsw.com/"><img src="https://avatars.githubusercontent.com/u/30198386?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chaiwat Trisuwan</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=chaiwattsw" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=chaiwattsw" title="Code">💻</a></td>
<td align="center"><a href="oltdaniel.eu"><img src="https://avatars.githubusercontent.com/u/53529846?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniel Oltmanns</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=oltdaniel" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=oltdaniel" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/edrickleong"><img src="https://avatars.githubusercontent.com/u/10529706?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Edrick Leong</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=edrickleong" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=edrickleong" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=edrickleong" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/siddhsuresh"><img src="https://avatars.githubusercontent.com/u/83594610?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Siddharth Suresh</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Code">💻</a><a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Tests">⚠️</a> <a href="#maintenance-siddhsuresh" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://github.com/siddhsuresh"><img src="https://avatars.githubusercontent.com/u/83594610?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Siddharth Suresh</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Tests">⚠️</a> <a href="#maintenance-siddhsuresh" title="Maintenance">🚧</a></td>
<td align="center"><a href="http://jins.dev"><img src="https://avatars.githubusercontent.com/u/39466936?v=4?s=100" width="100px;" alt=""/><br /><sub><b>JH.Lee</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Tests">⚠️</a> <a href="#maintenance-orionmiz" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/corydeppen"><img src="https://avatars.githubusercontent.com/u/313264?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cory Deppen</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=corydeppen" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/oloost"><img src="https://avatars.githubusercontent.com/u/72395941?v=4?s=100" width="100px;" alt=""/><br /><sub><b>oloost</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=oloost" title="Documentation">📖</a></td>
</tr>
</table>

View File

@@ -1,2 +1 @@
# toolkit-app-passportjs

View File

@@ -29,7 +29,7 @@
"@blitzjs/rpc": "workspace:*",
"@hookform/resolvers": "2.8.8",
"@prisma/client": "4.0.0",
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"next": "12.2.5",
"openid-client": "5.1.8",
"prisma": "4.0.0",

View File

@@ -4,7 +4,7 @@ TODO
This is a [Blitz.js](https://github.com/blitz-js/blitz) app.
# ****name****
# \***\*name\*\***
## Getting Started

View File

@@ -1,3 +1,4 @@
import type { BlitzCliConfig } from "blitz"
import { setupBlitzServer } from "@blitzjs/next"
import { AuthServerPlugin, PrismaStorage } from "@blitzjs/auth"
import db from "db"
@@ -14,3 +15,7 @@ const { gSSP, gSP, api } = setupBlitzServer({
})
export { gSSP, gSP, api }
export const cliConfig: BlitzCliConfig = {
customTemplates: "app/templates",
}

View File

@@ -29,7 +29,7 @@
"@blitzjs/rpc": "workspace:*",
"@hookform/resolvers": "2.8.8",
"@prisma/client": "4.0.0",
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"next": "12.2.5",
"prisma": "4.0.0",
"react": "18.2.0",

View File

@@ -21,7 +21,7 @@
"@blitzjs/config": "workspace:*",
"@blitzjs/next": "workspace:*",
"@prisma/client": "4.0.0",
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"lowdb": "3.0.0",
"next": "12.2.5",
"prisma": "4.0.0",

View File

@@ -6,4 +6,3 @@ export default defineConfig({
hookTimeout: 100000,
},
})

View File

@@ -1,5 +1,13 @@
# @blitzjs/auth
## 2.0.0-beta.11
### Patch Changes
- 1476a577: Fix release
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/auth",
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"scripts": {
"build": "unbuild",
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts",
@@ -26,7 +26,7 @@
"@types/secure-password": "3.1.1",
"b64-lite": "1.4.0",
"bad-behavior": "1.0.1",
"blitz": "2.0.0-beta.5",
"blitz": "2.0.0-beta.11",
"cookie": "0.4.1",
"cookie-session": "2.0.0",
"debug": "4.3.3",
@@ -40,7 +40,7 @@
"url": "0.11.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.10",
"@blitzjs/config": "workspace:2.0.0-beta.11",
"@testing-library/react": "13.0.0",
"@testing-library/react-hooks": "7.0.2",
"@types/cookie": "0.4.1",

View File

@@ -109,6 +109,7 @@ class PublicDataStore {
}
}
}
export const getPublicDataStore = (): PublicDataStore => {
if (!(window as any).__publicDataStore) {
;(window as any).__publicDataStore = new PublicDataStore()
@@ -257,89 +258,99 @@ export function getAuthValues<TProps = any>(
return {authenticate, redirectAuthenticatedTo}
}
function withBlitzAuthPlugin<TProps = any>(Page: ComponentType<TProps> | BlitzPage<TProps>) {
const AuthRoot = (props: ComponentProps<any>) => {
useSession({suspense: false})
const [mounted, setMounted] = useState(false)
const withBlitzAuthPluginFactory = (hooks: AuthPluginClientOptions["hooks"]) => {
return function withBlitzAuthPlugin<TProps = any>(
Page: ComponentType<TProps> | BlitzPage<TProps>,
) {
const AuthRoot = (props: ComponentProps<any>) => {
useSession({suspense: false})
useEffect(() => {
setMounted(true)
}, [])
const [mounted, setMounted] = useState(false)
mounted && hooks?.onAuthorize?.(getPublicDataStore().getData() as any)
let {authenticate, redirectAuthenticatedTo} = getAuthValues(Page, props)
useEffect(() => {
setMounted(true)
}, [])
useAuthorizeIf(authenticate === true)
let {authenticate, redirectAuthenticatedTo} = getAuthValues(Page, props)
if (typeof window !== "undefined") {
const publicData = getPublicDataStore().getData()
useAuthorizeIf(authenticate === true)
// We read directly from publicData.userId instead of useSession
// so we can access userId on first render. useSession is always empty on first render
if (publicData.userId) {
debug("[BlitzAuthInnerRoot] logged in")
if (typeof window !== "undefined") {
const publicData = getPublicDataStore().getData()
if (typeof redirectAuthenticatedTo === "function") {
redirectAuthenticatedTo = redirectAuthenticatedTo({
session: publicData,
})
}
// We read directly from publicData.userId instead of useSession
// so we can access userId on first render. useSession is always empty on first render
if (publicData.userId) {
debug("[BlitzAuthInnerRoot] logged in")
if (redirectAuthenticatedTo) {
const redirectUrl =
typeof redirectAuthenticatedTo === "string"
? redirectAuthenticatedTo
: formatWithValidation(redirectAuthenticatedTo)
if (mounted) {
debug("[BlitzAuthInnerRoot] redirecting to", redirectUrl)
const error = new RedirectError(redirectUrl)
error.stack = null!
throw error
}
}
} else {
debug("[BlitzAuthInnerRoot] logged out")
if (authenticate && typeof authenticate === "object" && authenticate.redirectTo) {
let {redirectTo} = authenticate
if (typeof redirectTo !== "string") {
redirectTo = formatWithValidation(redirectTo)
if (typeof redirectAuthenticatedTo === "function") {
redirectAuthenticatedTo = redirectAuthenticatedTo({
session: publicData,
})
}
const url = new URL(redirectTo, window.location.href)
url.searchParams.append("next", window.location.pathname)
if (redirectAuthenticatedTo) {
const redirectUrl =
typeof redirectAuthenticatedTo === "string"
? redirectAuthenticatedTo
: formatWithValidation(redirectAuthenticatedTo)
if (mounted) {
debug("[BlitzAuthInnerRoot] redirecting to", url.toString())
const error = new RedirectError(url.toString())
error.stack = null!
throw error
if (mounted) {
debug("[BlitzAuthInnerRoot] redirecting to", redirectUrl)
const error = new RedirectError(redirectUrl)
error.stack = null!
throw error
}
}
} else {
debug("[BlitzAuthInnerRoot] logged out")
if (authenticate && typeof authenticate === "object" && authenticate.redirectTo) {
let {redirectTo} = authenticate
if (typeof redirectTo !== "string") {
redirectTo = formatWithValidation(redirectTo)
}
const url = new URL(redirectTo, window.location.href)
url.searchParams.append("next", window.location.pathname)
if (mounted) {
debug("[BlitzAuthInnerRoot] redirecting to", url.toString())
const error = new RedirectError(url.toString())
error.stack = null!
throw error
}
}
}
}
return <Page {...props} />
}
return <Page {...props} />
}
for (let [key, value] of Object.entries(Page)) {
// @ts-ignore
AuthRoot[key] = value
}
if (process.env.NODE_ENV !== "production") {
AuthRoot.displayName = `BlitzAuthInnerRoot`
}
for (let [key, value] of Object.entries(Page)) {
// @ts-ignore
AuthRoot[key] = value
return AuthRoot
}
if (process.env.NODE_ENV !== "production") {
AuthRoot.displayName = `BlitzAuthInnerRoot`
}
return AuthRoot
}
export interface AuthPluginClientOptions {
cookiePrefix: string
hooks?: {
onAuthorize?: (user: ClientSession) => void
}
}
export const AuthClientPlugin = createClientPlugin((options: AuthPluginClientOptions) => {
globalThis.__BLITZ_SESSION_COOKIE_PREFIX = options.cookiePrefix || "blitz"
return {
withProvider: withBlitzAuthPlugin,
withProvider: withBlitzAuthPluginFactory(options?.hooks),
events: {},
middleware: {},
exports: () => ({

View File

@@ -1,7 +1,7 @@
import type {BlitzServerPlugin, RequestMiddleware, Ctx} from "blitz"
import {assert} from "blitz"
import {IncomingMessage, ServerResponse} from "http"
import {PublicData, SessionModel, SessionConfigMethods} from "../shared/types"
import {PublicData, SessionModel, SessionConfigMethods, SessionContext} from "../shared/types"
import {getSession} from "./auth-sessions"
interface SessionConfigOptions {
@@ -12,6 +12,9 @@ interface SessionConfigOptions {
secureCookies?: boolean
domain?: string
publicDataKeysToSyncAcrossSessions?: string[]
hooks?: {
onAuthMiddleware: (sc: SessionContext["$publicData"]) => void
}
}
interface IsAuthorized {
@@ -108,6 +111,9 @@ export function AuthServerPlugin(options: AuthPluginOptions): BlitzServerPlugin<
if (!res.blitzCtx?.session) {
await getSession(req, res)
}
options.hooks?.onAuthMiddleware(res.blitzCtx.session.$publicData)
return next()
}
@@ -117,6 +123,7 @@ export function AuthServerPlugin(options: AuthPluginOptions): BlitzServerPlugin<
}
return blitzSessionMiddleware
}
return {
requestMiddlewares: [authPluginSessionMiddleware()],
}

View File

@@ -118,8 +118,11 @@ export function passportAuth(config: BlitzPassportConfig): ApiHandler {
const {name, strategy, authenticateOptions} = blitzStrategy
assert(typeof strategy.name !== "undefined", `A passport strategy name was not found for: ${req.query.auth[0]}`)
assert(
typeof strategy.name !== "undefined",
`A passport strategy name was not found for: ${req.query.auth[0]}`,
)
const strategyName = name || strategy.name
passport.use(strategyName, strategy)

View File

@@ -1,5 +1,13 @@
# @blitzjs/next
## 2.0.0-beta.11
### Patch Changes
- 1476a577: Fix release
- Updated dependencies [1476a577]
- @blitzjs/rpc@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/next",
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"scripts": {
"build": "unbuild",
"dev": "pnpm predev && pnpm watch unbuild src --wait=0.2",
@@ -24,7 +24,7 @@
"eslint.js"
],
"dependencies": {
"@blitzjs/rpc": "2.0.0-beta.10",
"@blitzjs/rpc": "2.0.0-beta.11",
"@tanstack/react-query": "4.0.10",
"@types/hoist-non-react-statics": "3.3.1",
"debug": "4.3.3",
@@ -34,7 +34,7 @@
"supports-color": "8.1.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.10",
"@blitzjs/config": "workspace:2.0.0-beta.11",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.3",
"@testing-library/react": "13.0.0",
@@ -44,7 +44,7 @@
"@types/react": "18.0.17",
"@types/react-dom": "17.0.14",
"@types/testing-library__react-hooks": "4.0.0",
"blitz": "2.0.0-beta.5",
"blitz": "2.0.0-beta.11",
"cross-spawn": "7.0.3",
"find-up": "4.1.0",
"next": "12.2.5",

View File

@@ -1,5 +1,13 @@
# @blitzjs/rpc
## 2.0.0-beta.11
### Patch Changes
- 1476a577: Fix release
- Updated dependencies [1476a577]
- @blitzjs/auth@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/rpc",
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"scripts": {
"build": "unbuild",
"predev": "wait-on -d 400 ../blitz/dist/index-server.d.ts && wait-on -d 400 ../blitz-auth/dist/index-browser.d.ts",
@@ -20,7 +20,7 @@
"dist/**"
],
"dependencies": {
"@blitzjs/auth": "2.0.0-beta.10",
"@blitzjs/auth": "2.0.0-beta.11",
"@tanstack/react-query": "4.0.10",
"b64-lite": "1.4.0",
"bad-behavior": "1.0.1",
@@ -30,11 +30,11 @@
"supports-color": "8.1.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.10",
"@blitzjs/config": "workspace:2.0.0-beta.11",
"@types/debug": "4.1.7",
"@types/react": "18.0.17",
"@types/react-dom": "17.0.14",
"blitz": "2.0.0-beta.5",
"blitz": "2.0.0-beta.11",
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",

View File

@@ -1,5 +1,13 @@
# blitz
## 2.0.0-beta.11
### Patch Changes
- 1476a577: Fix release
- Updated dependencies [1476a577]
- @blitzjs/generator@2.0.0-beta.11
## 2.0.0-beta.5
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "blitz",
"version": "2.0.0-beta.5",
"version": "2.0.0-beta.11",
"scripts": {
"build": "unbuild",
"dev": "pnpm run predev && watch unbuild src --wait=0.2",
@@ -17,6 +17,7 @@
"sideEffects": false,
"license": "MIT",
"files": [
"installer.*",
"dist/**",
"bin/**"
],
@@ -24,7 +25,7 @@
"blitz": "bin/blitz"
},
"dependencies": {
"@blitzjs/generator": "2.0.0-beta.10",
"@blitzjs/generator": "2.0.0-beta.11",
"@mrleebo/prisma-ast": "0.2.6",
"@types/global-agent": "2.1.1",
"arg": "5.0.1",
@@ -71,7 +72,7 @@
"watchpack": "2.1.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-beta.10",
"@blitzjs/config": "workspace:2.0.0-beta.11",
"@types/cookie": "0.4.1",
"@types/cross-spawn": "6.0.2",
"@types/debug": "4.1.7",

View File

@@ -15,7 +15,9 @@ import {
MutationsGenerator,
ModelGenerator,
QueryGenerator,
addCustomTemplatesBlitzConfig,
} from "@blitzjs/generator"
import {log} from "../../logging"
const getIsTypeScript = async () =>
require("fs").existsSync(require("path").join(process.cwd(), "tsconfig.json"))
@@ -30,6 +32,7 @@ enum ResourceType {
Mutations = "mutations",
Mutation = "mutation",
Resource = "resource",
CustomTemplates = "custom-templates",
}
function modelName(input: string = "") {
@@ -45,6 +48,39 @@ function ModelNames(input: string = "") {
return pluralPascal(input)
}
const createCustomTemplates = async () => {
const continuePrompt = await prompts({
type: "confirm",
name: "value",
message: `This will copy the default templates to your app/templates folder. Do you want to continue?`,
})
if (!continuePrompt.value) {
process.exit(0)
}
const templatesPath = await prompts({
type: "text",
name: "value",
message: `Enter the path to save the custom templates folder`,
initial: "app/templates",
})
const templatesPathValue: string = templatesPath.value
const isTypeScript = await getIsTypeScript()
addCustomTemplatesBlitzConfig(templatesPathValue, isTypeScript)
log.success(`🚀 Custom templates path added/updated in app/blitz-server file`)
const customTemplatesPath = require("path").join(process.cwd(), templatesPathValue)
const fsExtra = await import("fs-extra")
const blitzGeneratorPath = require.resolve("@blitzjs/generator")
const templateFolder = ["form", "page", "query", "mutation", "queries", "mutations"]
for (const template of templateFolder) {
await fsExtra.copy(
require("path").join(blitzGeneratorPath, "..", "templates", template),
require("path").join(customTemplatesPath, template),
)
}
log.success(`🚀 Custom templates created in ${templatesPathValue} directory`)
process.exit(0)
}
const generatorMap = {
[ResourceType.All]: [
PageGenerator,
@@ -61,6 +97,7 @@ const generatorMap = {
[ResourceType.Mutations]: [MutationsGenerator],
[ResourceType.Mutation]: [MutationGenerator],
[ResourceType.Resource]: [QueriesGenerator, MutationsGenerator, ModelGenerator],
[ResourceType.CustomTemplates]: [],
}
const args = arg(
@@ -199,6 +236,13 @@ const getHelp = async () => {
> blitz generate all tasks --parent=projects
# To customize the templates used by the blitz generate command,
> blitz generate custom-templates
This command will copy the default templates to your app and update the app/blitz-server file to enable
the custom templating feature of the blitz CLI
# Database models can also be generated directly from the CLI.
Model fields can be specified with any generator that generates a database model ("all", "model", "resource").
Both of the commands below will generate the proper database model for a Task.
@@ -216,6 +260,9 @@ const getHelp = async () => {
const generate: CliCommand = async () => {
await getHelp()
await determineType()
if (selectedType === "custom-templates") {
await createCustomTemplates()
}
if (!selectedModelName) {
await determineName()
}
@@ -227,9 +274,21 @@ const generate: CliCommand = async () => {
const generators = generatorMap[selectedType as keyof typeof generatorMap]
const isTypeScript = await getIsTypeScript()
const blitzServerPath = isTypeScript ? "app/blitz-server.ts" : "app/blitz-server.js"
const blitzServer = require("path").join(process.cwd(), blitzServerPath)
const {register} = require("esbuild-register/dist/node")
const {unregister} = register({
target: "es6",
})
const blitzConfig = require(blitzServer)
const {cliConfig} = blitzConfig
unregister()
for (const GeneratorClass of generators) {
const generator = new GeneratorClass({
destinationRoot: require("path").resolve(),
templateDir: cliConfig?.customTemplates,
extraArgs: args["_"].slice(3) as string[],
modelName: singularRootContext,
modelNames: modelNames(singularRootContext),

View File

@@ -6,6 +6,10 @@ export interface RouteUrlObject extends Pick<UrlObject, "pathname" | "query"> {
pathname: string
}
export type BlitzCliConfig = {
customTemplates?: string
}
export const isRouteUrlObject = (x: any): x is RouteUrlObject => {
return typeof x === "object" && "pathname" in x && typeof x.pathname === "string"
}

View File

@@ -1,5 +1,14 @@
# @blitzjs/codemod
## 2.0.0-beta.11
### Patch Changes
- 1476a577: Fix release
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
- @blitzjs/generator@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/codemod",
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"scripts": {
"build": "unbuild",
"dev": "watch unbuild src --wait=0.2",
@@ -25,9 +25,9 @@
"@babel/plugin-proposal-class-properties": "7.17.12",
"@babel/plugin-syntax-jsx": "7.17.12",
"@babel/plugin-syntax-typescript": "7.17.12",
"@blitzjs/generator": "2.0.0-beta.10",
"@blitzjs/generator": "2.0.0-beta.11",
"arg": "5.0.1",
"blitz": "2.0.0-beta.5",
"blitz": "2.0.0-beta.11",
"chalk": "^4.1.0",
"cross-spawn": "7.0.3",
"debug": "4.3.3",

View File

@@ -1,5 +1,11 @@
# @blitzjs/config
## 2.0.0-beta.11
### Patch Changes
- 1476a577: Fix release
## 2.0.0-beta.10
## 2.0.0-beta.4

View File

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

View File

@@ -1,5 +1,11 @@
# @blitzjs/generator
## 2.0.0-beta.11
### Patch Changes
- 1476a577: Fix release
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/generator",
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"scripts": {
"dev": "watch unbuild src --wait=0.2",
"build": "unbuild && pnpm build:templates",
@@ -46,7 +46,7 @@
"vinyl": "2.2.1"
},
"devDependencies": {
"@blitzjs/config": "2.0.0-beta.10",
"@blitzjs/config": "2.0.0-beta.11",
"@juanm04/cpx": "2.0.1",
"@types/babel__core": "7.1.19",
"@types/diff": "5.0.2",

View File

@@ -16,6 +16,88 @@ import {readdirRecursive} from "./utils/readdir-recursive"
import prettier from "prettier"
const debug = require("debug")("blitz:generator")
export const addCustomTemplatesBlitzConfig = (
customTemplatesPath: string,
isTypeScript: boolean,
) => {
const blitzServer = isTypeScript ? "app/blitz-server.ts" : "app/blitz-server.js"
const blitzServerPath = require("path").join(process.cwd(), blitzServer)
const userConfigModuleSource = fs.readFileSync(blitzServerPath, {encoding: "utf-8"})
const userConfigModule = j(userConfigModuleSource, {parser: customTsParser})
const program = userConfigModule.get()
const cliConfigDeclaration = userConfigModule
.find(j.ExportNamedDeclaration, {
declaration: {
type: "VariableDeclaration",
declarations: [
{
id: {
name: "cliConfig",
},
},
],
},
})
.paths()
.at(0)
if (!cliConfigDeclaration) {
const config = j.identifier("cliConfig")
const configVariable = j.variableDeclaration("const", [
j.variableDeclarator(
config,
j.objectExpression([
j.objectProperty(j.identifier("customTemplates"), j.literal(customTemplatesPath)),
]),
),
])
if (isTypeScript) {
const type = j.tsTypeAnnotation(j.tsTypeReference(j.identifier("BlitzCliConfig")))
const declaration: any = configVariable?.declarations
declaration[0].id.typeAnnotation = type
const typeImport = j.importDeclaration(
[j.importSpecifier(j.identifier("BlitzCliConfig"))],
j.literal("blitz"),
)
typeImport.importKind = "type"
program.node.program.body.unshift(typeImport)
}
const exportConfig = j.exportNamedDeclaration(configVariable)
program.node.program.body.push(exportConfig)
} else {
const configType = cliConfigDeclaration.value.declaration?.type
if (configType === "VariableDeclaration") {
const config = cliConfigDeclaration.value.declaration.declarations[0]
if (config?.type === "VariableDeclarator") {
const configProperties = config.init
if (configProperties?.type === "ObjectExpression") {
const customTemplatesProperty = configProperties.properties.find((property) => {
if (property.type === "ObjectProperty") {
const key = property.key
if (key.type === "Identifier") {
return key.name === "customTemplates"
}
}
})
if (!customTemplatesProperty) {
configProperties.properties.push(
j.objectProperty(j.identifier("customTemplates"), j.literal(customTemplatesPath)),
)
} else {
if (customTemplatesProperty.type === "ObjectProperty") {
const customValue = customTemplatesProperty.value
if (customValue.type === "StringLiteral") {
customValue.value = customTemplatesPath
}
}
}
}
}
}
}
const newSource = userConfigModule.toSource()
fs.writeFileSync(blitzServerPath, newSource)
}
export const customTsParser = {
parse(source: string, options?: Overrides) {
const babelOptions = getBabelOptions(options)

View File

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

82
pnpm-lock.yaml generated
View File

@@ -49,7 +49,7 @@ importers:
"@types/preview-email": 2.0.1
"@types/react": 18.0.17
"@typescript-eslint/eslint-plugin": 5.9.1
blitz: workspace:2.0.0-beta.4
blitz: workspace:2.0.0-beta.11
eslint: 7.32.0
eslint-config-next: 12.2.0
eslint-config-prettier: 8.5.0
@@ -120,7 +120,7 @@ importers:
"@types/preview-email": 2.0.1
"@types/react": 18.0.17
"@typescript-eslint/eslint-plugin": 5.9.1
blitz: workspace:2.0.0-beta.4
blitz: workspace:2.0.0-beta.11
eslint: 7.32.0
eslint-config-next: 12.2.0
eslint-config-prettier: 8.5.0
@@ -235,7 +235,7 @@ importers:
"@types/node-fetch": 2.6.1
"@types/react": 18.0.17
b64-lite: 1.4.0
blitz: workspace:2.0.0-beta.4
blitz: workspace:2.0.0-beta.11
eslint: 7.32.0
fs-extra: 10.0.1
get-port: 6.1.2
@@ -650,8 +650,8 @@ importers:
packages/blitz:
specifiers:
"@blitzjs/config": workspace:2.0.0-beta.4
"@blitzjs/generator": 2.0.0-beta.4
"@blitzjs/config": workspace:2.0.0-beta.11
"@blitzjs/generator": 2.0.0-beta.11
"@mrleebo/prisma-ast": 0.2.6
"@types/cookie": 0.4.1
"@types/cross-spawn": 6.0.2
@@ -795,7 +795,7 @@ importers:
packages/blitz-auth:
specifiers:
"@blitzjs/config": workspace:2.0.0-beta.4
"@blitzjs/config": workspace:2.0.0-beta.11
"@testing-library/react": 13.0.0
"@testing-library/react-hooks": 7.0.2
"@types/b64-lite": 1.3.0
@@ -809,7 +809,7 @@ importers:
"@types/secure-password": 3.1.1
b64-lite: 1.4.0
bad-behavior: 1.0.1
blitz: 2.0.0-beta.4
blitz: 2.0.0-beta.11
cookie: 0.4.1
cookie-session: 2.0.0
debug: 4.3.3
@@ -862,8 +862,8 @@ importers:
packages/blitz-next:
specifiers:
"@blitzjs/config": workspace:2.0.0-beta.4
"@blitzjs/rpc": 2.0.0-beta.4
"@blitzjs/config": workspace:2.0.0-beta.11
"@blitzjs/rpc": 2.0.0-beta.11
"@tanstack/react-query": 4.0.10
"@testing-library/dom": 8.13.0
"@testing-library/jest-dom": 5.16.3
@@ -875,7 +875,7 @@ importers:
"@types/react": 18.0.17
"@types/react-dom": 17.0.14
"@types/testing-library__react-hooks": 4.0.0
blitz: 2.0.0-beta.4
blitz: 2.0.0-beta.11
cross-spawn: 7.0.3
debug: 4.3.3
find-up: 4.1.0
@@ -925,15 +925,15 @@ importers:
packages/blitz-rpc:
specifiers:
"@blitzjs/auth": 2.0.0-beta.4
"@blitzjs/config": workspace:2.0.0-beta.4
"@blitzjs/auth": 2.0.0-beta.11
"@blitzjs/config": workspace:2.0.0-beta.11
"@tanstack/react-query": 4.0.10
"@types/debug": 4.1.7
"@types/react": 18.0.17
"@types/react-dom": 17.0.14
b64-lite: 1.4.0
bad-behavior: 1.0.1
blitz: 2.0.0-beta.4
blitz: 2.0.0-beta.11
chalk: ^4.1.0
debug: 4.3.3
next: 12.2.5
@@ -976,12 +976,12 @@ importers:
"@babel/plugin-syntax-typescript": 7.17.12
"@babel/preset-env": 7.12.10
"@blitzjs/config": workspace:*
"@blitzjs/generator": 2.0.0-beta.4
"@blitzjs/generator": 2.0.0-beta.11
"@types/jscodeshift": 0.11.2
"@types/node": 17.0.16
arg: 5.0.1
ast-types: 0.14.2
blitz: 2.0.0-beta.4
blitz: 2.0.0-beta.11
chalk: ^4.1.0
cross-spawn: 7.0.3
debug: 4.3.3
@@ -1036,7 +1036,7 @@ importers:
"@babel/plugin-transform-typescript": 7.12.1
"@babel/preset-env": 7.12.10
"@babel/types": 7.12.10
"@blitzjs/config": 2.0.0-beta.4
"@blitzjs/config": 2.0.0-beta.11
"@juanm04/cpx": 2.0.1
"@mrleebo/prisma-ast": 0.4.1
"@types/babel__core": 7.1.19
@@ -1129,7 +1129,7 @@ importers:
packages/pkg-template:
specifiers:
"@blitzjs/config": 2.0.0-beta.4
"@blitzjs/config": 2.0.0-beta.11
"@types/react": 18.0.17
"@types/react-dom": 17.0.14
"@typescript-eslint/eslint-plugin": 5.9.1
@@ -1153,7 +1153,7 @@ importers:
recipes/base-web:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1164,7 +1164,7 @@ importers:
recipes/bulma:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1176,7 +1176,7 @@ importers:
specifiers:
"@types/jscodeshift": 0.11.2
ast-types: 0.14.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1189,7 +1189,7 @@ importers:
specifiers:
"@types/jscodeshift": 0.11.2
ast-types: 0.14.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1201,7 +1201,7 @@ importers:
recipes/emotion:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1211,20 +1211,20 @@ importers:
recipes/gh-action-yarn-mariadb:
specifiers:
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
dependencies:
blitz: link:../../packages/blitz
recipes/gh-action-yarn-postgres:
specifiers:
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
dependencies:
blitz: link:../../packages/blitz
recipes/ghost:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1235,7 +1235,7 @@ importers:
recipes/graphql-apollo-server:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
uuid: ^8.3.1
dependencies:
@@ -1247,14 +1247,14 @@ importers:
recipes/logrocket:
specifiers:
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
dependencies:
blitz: link:../../packages/blitz
recipes/material-ui:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1266,7 +1266,7 @@ importers:
specifiers:
"@types/jscodeshift": 0.11.2
ast-types: 0.14.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1277,13 +1277,13 @@ importers:
recipes/passenger:
specifiers:
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
dependencies:
blitz: link:../../packages/blitz
recipes/quirrel:
specifiers:
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
dependencies:
blitz: link:../../packages/blitz
@@ -1291,7 +1291,7 @@ importers:
specifiers:
"@types/jscodeshift": 0.11.2
ast-types: 0.14.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1302,14 +1302,14 @@ importers:
recipes/render:
specifiers:
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
dependencies:
blitz: link:../../packages/blitz
recipes/secureheaders:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
uuid: ^8.3.1
dependencies:
@@ -1322,7 +1322,7 @@ importers:
recipes/stitches:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1334,7 +1334,7 @@ importers:
specifiers:
"@types/jscodeshift": 0.11.2
ast-types: 0.14.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1346,7 +1346,7 @@ importers:
recipes/tailwind:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1358,7 +1358,7 @@ importers:
specifiers:
"@types/jscodeshift": 0.11.2
ast-types: 0.14.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -1370,7 +1370,7 @@ importers:
recipes/vanilla-extract:
specifiers:
"@types/jscodeshift": 0.11.2
blitz: "workspace: 2.0.0-beta.4"
blitz: workspace:2.0.0-beta.11
jscodeshift: 0.13.0
dependencies:
blitz: link:../../packages/blitz
@@ -12920,7 +12920,7 @@ packages:
pretty-format: 27.5.1
slash: 3.0.0
strip-json-comments: 3.1.1
ts-node: 10.7.0_fxg3r7oju3tntkxsvleuiot4fa
ts-node: 10.7.0_typescript@4.6.3
transitivePeerDependencies:
- bufferutil
- canvas
@@ -18461,6 +18461,7 @@ packages:
typescript: 4.6.3
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: false
/ts-node/10.7.0_typescript@4.6.3:
resolution:
@@ -18493,7 +18494,6 @@ packages:
typescript: 4.6.3
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: false
/ts-node/10.9.1_kakyiqi62sfonxvjmz3ft5vt7y:
resolution:

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-base-web
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-base-web",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Base Web",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-bulma
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-bulma",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Bulma CSS",
"main": "index.ts",
"scripts": {
@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-bumbag-ui
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-bumbag-ui",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Bumbag UI",
"main": "index.ts",
"scripts": {
@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-chakra-ui
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-chakra-ui",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Chakra UI",
"main": "index.ts",
"scripts": {
@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-emotion
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-emotion",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Emotion",
"main": "index.ts",
"scripts": {
@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-gh-action-yarn-mariadb
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-gh-action-yarn-mariadb",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for adding github actions workflow with MariaDB",
"main": "index.ts",
"scripts": {
@@ -24,6 +24,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5"
"blitz": "workspace:2.0.0-beta.11"
}
}

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-gh-action-yarn-postgres
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-gh-action-yarn-postgres",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for adding github actions workflow with postgres",
"main": "index.ts",
"scripts": {
@@ -24,6 +24,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5"
"blitz": "workspace:2.0.0-beta.11"
}
}

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-ghost
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-ghost",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "Use Ghost in blitz",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-graphql
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-graphql",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for creating a GraphQL API endpoint with blitz",
"main": "index.ts",
"scripts": {
@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0",
"uuid": "^8.3.1"
},

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-logrocket
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-logrocket",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for adding basic LogRocket integration.",
"main": "index.ts",
"scripts": {
@@ -23,6 +23,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5"
"blitz": "workspace:2.0.0-beta.11"
}
}

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-material-ui
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-material-ui",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Material-UI",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-next-ui
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-next-ui",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Next UI",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-passenger
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-passenger",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for adding passenger.js",
"main": "index.ts",
"scripts": {
@@ -23,6 +23,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5"
"blitz": "workspace:2.0.0-beta.11"
}
}

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-quirrel
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-quirrel",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for adding Quirrel",
"main": "index.ts",
"scripts": {
@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5"
"blitz": "workspace:2.0.0-beta.11"
}
}

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-reflexjs
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-reflexjs",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Reflexjs",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-render
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-render",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for adding render.yaml",
"main": "index.ts",
"scripts": {
@@ -22,6 +22,6 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5"
"blitz": "workspace:2.0.0-beta.11"
}
}

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-secureheaders
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-secureheaders",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for configuring Secure Headers",
"main": "index.ts",
"scripts": {
@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0",
"uuid": "^8.3.1"
},

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-stitches
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-stitches",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Stitches",
"main": "index.ts",
"scripts": {
@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-styled-components
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-styled-components",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Styled Components",
"main": "index.ts",
"scripts": {
@@ -24,7 +24,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-tailwind
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-tailwind",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Tailwind CSS",
"main": "index.ts",
"scripts": {
@@ -22,7 +22,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-theme-ui
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-theme-ui",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing Theme UI",
"main": "index.ts",
"scripts": {
@@ -23,7 +23,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {

View File

@@ -1,5 +1,12 @@
# @blitzjs/recipe-vanilla-extract
## 2.0.0-beta.11
### Patch Changes
- Updated dependencies [1476a577]
- blitz@2.0.0-beta.11
## 2.0.0-beta.10
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@blitzjs/recipe-vanilla-extract",
"private": true,
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "The Blitz Recipe for installing vanilla-extract",
"main": "index.ts",
"scripts": {
@@ -25,7 +25,7 @@
},
"homepage": "https://github.com/blitz-js/blitz#readme",
"dependencies": {
"blitz": "workspace:2.0.0-beta.5",
"blitz": "workspace:2.0.0-beta.11",
"jscodeshift": "0.13.0"
},
"devDependencies": {