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

Compare commits

...

471 Commits

Author SHA1 Message Date
github-actions[bot]
6f44c2334e Version Packages (#4301)
* Version Packages

* pnpm lock

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2024-02-17 06:33:47 +00:00
Siddharth Suresh
8a417533f6 feat: remove restriction to use secure cookies in localhost (#4300)
* feat: remove restriction to use secure cookies in localhost

* changeset

* pnpm lock fix

* Update .changeset/grumpy-deers-rest.md

* Update .changeset/grumpy-deers-rest.md

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-16 23:34:36 +00:00
Siddharth Suresh
6f54841b7a fix: getBlitzContext() can only be used in React Server Components in Nextjs 13 or higher (#4299)
* fix: remove custom errors thrown by blitz

* Create curvy-cougars-lick.md

* use require and eval rather than the await which becomes a `yield import` possibly causing the issue

* pnpm lock fix

* Update .changeset/curvy-cougars-lick.md

* add comment

* use correct error type

* Apply suggestions from code review
2024-02-16 23:27:05 +00:00
github-actions[bot]
e8f564ea66 Version Packages (#4292)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-06 22:30:47 +05:30
Siddharth Suresh
71b9950037 fix: ajv dependency was not installed with blitz new (#4297)
* add ajv to devDeps

* Create four-dots-retire.md
2024-02-06 22:25:55 +05:30
Siddharth Suresh
28a79040e4 feat: export BlitzServerMiddleware from blitz-next (#4296)
* feat: export `BlitzServerMiddleware` from blitz-next

* Create sixty-pants-hunt.md

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-06 22:25:36 +05:30
Siddharth Suresh
dd604c7675 perf: add filter to query only non expired sessions (#4288)
* perf: add check to make sure only non expired sessions are selected by default

* remove console.logs

* Create chatty-ants-bake.md

* remove `expiresAt` from the publicData

* remove internal from changelog

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-06 16:13:32 +00:00
Blitz.js Bot
0a8d4bfdaf (meta) added @Doc0x1 as contributor 2024-01-25 03:48:39 -05:00
Doc0x1
f25aac08c0 Added codemod support for legacy projects with a /src folder (#4290)
* Added support for legacy projects that have the pages folder located inside a /src directory

* Fixed line 687 for path.resolve(`${findPagesDirectory}/api/rpc`) not actually calling the function and added path.resolve's to findPagesDirectory

* Update for lines 56 and 1340 to add support for app and pages directories located in /src
2024-01-25 14:18:34 +05:30
github-actions[bot]
a09685a63a Version Packages (#4283)
* Version Packages

* pnpm lock fix

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2024-01-16 16:10:03 +00:00
Siddharth Suresh
595f400e9a fix: add missing devDeps to the new app template (#4284)
* add prettier and other missing devDeps

* match the devDeps to the pages template

* Create unlucky-spoons-guess.md
2024-01-16 21:26:54 +05:30
Blitz.js Bot
6f333ee643 (meta) added @LeonMueller-OneAndOnly as contributor 2024-01-16 10:55:11 -05:00
Leonidas
956a739e83 fix<codemod-upgrade-legacy>: provide correct path to template files (#4274)
* fix<codemod-upgrade-legacy>: provide correct path to template files

* fix<codemod-upgrade-legacy>: corrected path

* fix<codemod-legacy-upgrade>: add cookiePrefix step: always errored that collection was empty => invoke it only conditionally

* Create famous-worms-grab.md

---------

Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-01-16 15:55:07 +00:00
Siddharth Suresh
47722e0456 Fix: BlitzCliConfig does not work when blitz-server.ts is in /src/app directory (#4279)
* fix: search any subdirectly in `app/src` to find `blitz-server.ts`

* Create giant-knives-wonder.md

* Update packages/generator/src/generator.ts
2024-01-16 15:43:22 +00:00
Siddharth Suresh
2f5c8a3a0d fix: sodium native missing prebuilds (#4276)
* fix: copy sodium native prebuilds to `vender-chunks` and `chunks` using webpack

* Create seven-cheetahs-enjoy.md
2024-01-16 15:36:45 +00:00
github-actions[bot]
4ac47ff2a1 Version Packages (#4270)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-05 11:03:08 +05:30
Siddharth Suresh
e8fd12e4f9 Fix: windows slash correction for rpc resolvers (#4269)
* add slash to both absolute path and resolver import

* Update pr-release.yml

* pnpm lock fix

* fix

* Create slow-papayas-beam.md
2024-01-04 18:44:03 +00:00
Siddharth Suresh
89d3d0279e chore: improve github comment from snap shot release 2024-01-04 10:15:32 +05:30
Siddharth Suresh
cd9852a60b chore: remove changeset pre exit from workflow 2024-01-04 09:46:18 +05:30
Siddharth Suresh
29dcb9a24a chore: cleanup changesets 2024-01-04 09:37:37 +05:30
github-actions[bot]
0b941dc841 Version Packages (#4268)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-03 22:32:20 +05:30
Siddharth Suresh
8782aae640 create a new patch to cause the auto push to npm (#4267) 2024-01-03 16:28:38 +00:00
Siddharth Suresh
612aa1dd74 🎉 2.0 Stable Release (#4264)
* stable release

* pnpm lock
2024-01-02 17:52:37 +00:00
github-actions[bot]
f7735d59a3 Version Packages (beta) (#4262)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-02 22:55:50 +05:30
Siddharth Suresh
6d5f9efe14 new blitz app starter (#4146)
* new blitz app starter

* tanstack form first time working

* complete app template

* re-arrange generator folders

* add app router as recomended

* upgrade to next 13.5.2 and update location of internal function

* Create lucky-teachers-sleep.md

* fix bootupMarkers

* fix issues with qm integration test

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

* next.js generated stuff

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

* remove unnecessary next lints to the integration-tests

* Update main.yml

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

This reverts commit 3226b2e3ba.

* fix starter with tanstack form

* make changes to the generator

* mske final changes

* pnpm lock fix

* more changes

* add logging to rsc invoke and decouple auth from rpc again

* implement object chaining

* add `onInvokeError` options to catch errors without manual wrapping

* rename `LoggerOptions` to `RpcLoggerOptions`

* spacing

* fix error typed to `any`

* update class code

* tests working again

* add last test case proving working modal of roles

* Create moody-pandas-do.md

* Apply suggestions from code review

* move app -> `src/app`

* move from auth -> (auth) directory structure

* review 1 fixes

* missing change from auth -> (auth) change

* review 2: more fixes and match old behaviour

* pnpm lock fix

* add new pages to the `pathsToMove` array

* remove submodule

* remove changelog from the template

* fix name of .env

* match readme

* march prisma schema

* match package.json

* match blitz-client and blitz-server files

* remove vercel logo

* remove `next13`

* upgrade next and add husky

* fix build error

* Create poor-bikes-wait.md

* Revert "remove `next13`"

This reverts commit c0d7f54ab1.

* remove next13

* re-add next 13 that exists in main

* Apply suggestions from code review

* pnpm lock

* improvements to the template

* fix location of imports in `reset-password` page

* Update packages/blitz/src/cli/commands/new.ts

Co-authored-by: Tobias <tobias@fixmycity.de>

* Update packages/generator/templates/app/src/pages/api/rpc/blitzrpcroute.ts

Co-authored-by: Tobias <tobias@fixmycity.de>

* fix auth -> (auth)

* Update packages/generator/templates/app/src/app/layout.tsx

Co-authored-by: Tobias <tobias@fixmycity.de>

* Apply suggestions from code review

Co-authored-by: Tobias <tobias@fixmycity.de>

* abstact forms as client compoennts and pages as rscs

* re-add proper singup mutation

* remove console.log

* fix additonal forms

* pnpm lock fix

* fix missing ,

* Add project package manager to postInstallSteps

* add husky

* move to devDeps

* add preview email

* remove extra components folder

* add 800px as maximum of body size

* remove auth from reset-password url

* fix non-existant compoennts

* pnpm

* fix favicon

* package.json fixes

* revert to `latest`

* move to `devDeps`

* add display names

* make it a template

* new route generator

* fidnally got it working

* add `isAppDir` check

* should be the final changes

* fix

* fix import error

* revert

* make zod optional when needed

* fix tests

* fix nullable issue

* Update packages/blitz-auth/src/server/auth-sessions.ts

* new folder structure

---------

Co-authored-by: Tobias <tobias@fixmycity.de>
2024-01-02 22:52:14 +05:30
Siddharth Suresh
b84c5bedbd Next 14 Compatibility (#4263)
* upgrade to next 14

* use default react import

* use `next/compat/router`

* set baseurl for next13 app

* get it working

* fix Error Component

* fix floating promisis

* Create modern-cups-cheat.md

* fix type of error boundary

* get react query working again

* remove experimental

* remove broken test since next export is removed

* fix qm integration test

* fix mismatch of cookie names in client and server

* fix `auth-with-rpc`

* fix unit tests

* fix snapshot

* remove `@tanstack/query-core` dep from `@blitzjs/rpc`

* Update .changeset/modern-cups-cheat.md

* fix: lockfile

* regression: re-export react query client utilites

* Update .changeset/modern-cups-cheat.md

* do not export `withRouter`

* revert change to `BlitzProvider`

* remove unnecessary next types
2024-01-02 17:05:41 +00:00
Blitz.js Bot
f80cd3dba9 (meta) added @papsavas as contributor 2023-12-20 13:09:22 -05:00
Savvas Papageorgiadis
e5cd2c8622 chore(rpcHandler): onError ctx (#4259)
* chore(rpcHandler): onError ctx

* chore: add changeset

* Update .changeset/rare-squids-brake.md

---------

Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-12-20 18:09:17 +00:00
Siddharth Suresh
86e8eb7c8c Add helpful error message when RPC resolvers have the same path (#4261)
* add helpful error message when resolvers have the same path

* Create cyan-rings-play.md

* Apply suggestions from code review
2023-12-13 17:17:04 +00:00
github-actions[bot]
99541848b3 Version Packages (beta) (#4258)
* Version Packages (beta)

* pnpm lock fix

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-11-29 00:21:19 +05:30
Siddharth Suresh
09e0c68db9 Add logic to auto authorize role with usage of redirectAuthenticatedTo (#4257)
* add logic to auto handle role with usage of `redirectAuthenticatedTo`

* Create hot-knives-vanish.md

* fix `globalThis.__BLITZ_GET_RSC_CONTEXT` being overriden

* pnpm lock fix
2023-11-28 17:58:39 +00:00
github-actions[bot]
fb232d126e Version Packages (beta) (#4227)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-30 18:48:22 +05:30
Siddharth Suresh
b97366c427 Remove unintended dependency on next-auth (#4235)
* export `next-auth` and all its requirements in a sub-directory

* Create modern-insects-raise.md

* undo changes to `secure-password` adapter

* try another way

* Update .changeset/modern-insects-raise.md

* Update .changeset/modern-insects-raise.md

* patch next-auth
2023-10-30 18:41:44 +05:30
Blitz.js Bot
11eeebee67 (meta) added @potikhanovsergey as contributor 2023-10-25 12:29:05 -04:00
Siddharth Suresh
c89cb943bb Upgrade next, prisma and zod to latest versions (#4237)
* upgrade next, prisma and zod to latest versions

* Create green-years-behave.md
2023-10-24 13:26:40 +00:00
Siddharth Suresh
3bcbad1a91 invoke with RPC Logger (#4229)
* add logging to rsc invoke and decouple auth from rpc again

* implement object chaining

* add `onInvokeError` options to catch errors without manual wrapping

* rename `LoggerOptions` to `RpcLoggerOptions`

* spacing

* fix error typed to `any`

* update class code

* tests working again

* add last test case proving working modal of roles

* Create moody-pandas-do.md

* Apply suggestions from code review

* blitz invoke logger
2023-10-24 18:48:11 +05:30
Siddharth Suresh
98d04ed613 Recipes: Map Repo link to this repository (#4228)
* map repolink of recipies to main repo

* Create pretty-snakes-search.md
2023-10-15 14:21:11 +05:30
Siddharth Suresh
cee2dec179 Authenticate does not work with roles (#4225)
* fix logic to test the role

* add tests

* pnpm lock

* Create afraid-ligers-build.md

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-10-05 20:26:42 +05:30
Siddharth Suresh
aec1bb076b blitz-next: Fix next/head warning in app directory (#4176)
* feat: Load Head lazyily using `dynamic`

* feat: upgrate turbo and fix layout.tsx

* fix: pnpm lock version

* Create chatty-scissors-jump.md

* Update .changeset/chatty-scissors-jump.md

* fix: move `dynamic` call to the top of the file

* add loading state to be null and no ssr
2023-10-05 20:12:26 +05:30
Blitz.js Bot
2c72af7175 (meta) added @Zamfi99 as contributor 2023-10-05 10:24:23 -04:00
Zamfira Costin-Andrei
465a5c0720 Fix for Tailwind recipe (#4165)
* Tailwind recipe: fixed tailwind.config.js

* Tailwind recipe: change dependecies to devDependecies

* Update recipes/tailwind/templates/config/tailwind.config.js

* Create neat-gorillas-switch.md

* pnpm lock fix

---------

Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-10-05 14:24:18 +00:00
github-actions[bot]
353af3fae6 Version Packages (beta) (#4216)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-03 12:07:42 +05:30
Siddharth Suresh
3ddb57072b Update location of resolve-href in next 13.5.2 (#4222)
* upgrade to next 13.5.2 and update location of internal function

* Create lucky-teachers-sleep.md

* fix bootupMarkers

* fix issues with qm integration test

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

* next.js generated stuff

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

* remove unnecessary next lints to the integration-tests

* Update main.yml

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

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

* Create nervous-shrimps-serve.md

---------

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

* styling: add space

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

This could help contributers... contribute!

* build: use turborepo pipelines for coordination

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

* chore: update dev script

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

* chore: update pnpm version requirement

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

* chore: update pnpm-lock
2023-07-12 13:13:51 +00:00
github-actions[bot]
da76acc90a Version Packages (beta) (#4167)
* Version Packages (beta)

* pnpm lock

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-07-05 20:46:08 +05:30
Siddharth Suresh
c5572bec6e blitz-auth: Fix webpack from following next-auth (#4160)
* fix webpack from following next-auth

* redo

* Create curvy-drinks-perform.md

* wrap with try catch

* fix build issue

* upgrade ci to pnpm 8

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-03 17:36:46 +00:00
Siddharth Suresh
727734955a Configure the Verbosity of Blitz RPC Logging (#4162)
* improve blitz rpc logging

* implement improved setup with jsdoc comments

* make it verbose by default

* change routePath to resolverName for easier use

* Update packages/blitz-rpc/src/index-server.ts

* rename to make language more inclusive

* set output as debug

* Create sixty-rockets-count.md

* Update sixty-rockets-count.md

* Update sixty-rockets-count.md

* fix verbose bug

* Apply suggestions from code review

Co-authored-by: Brandon Bayer <b@bayer.ws>

---------

Co-authored-by: Brandon Bayer <b@bayer.ws>
2023-07-03 22:57:34 +05:30
github-actions[bot]
831a493ab6 Version Packages (beta) (#4159)
* Version Packages (beta)

* updat pnpm lock

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-06-14 18:12:23 +00:00
Siddharth Suresh
b6b9a1c5a4 (fix) Next-Auth integration (#4153)
* fix next-auth integration

* Create small-monkeys-battle.md

* Update .changeset/small-monkeys-battle.md

* add a postinstall script for good measure

* add a postinstall script for good measure

* fix lock file

* upgrade pnpm

* fix version

* fix build error

* suggessions

* fix pnpm lock

* fix pnpm lock

* Update main.yml

* Update apps/toolkit-app/next.config.js

* next-auth working again

* Update apps/toolkit-app/.env

* Update packages/blitz-auth/src/server/auth-sessions.ts

* Update packages/blitz-auth/src/server/auth-sessions.ts
2023-06-14 22:54:48 +05:30
Siddharth Suresh
61888d1a30 fix: blitz logging formatting (#4158)
* fix blitz logging setup

* changeset

* Update packages/blitz/src/logging.ts
2023-06-13 13:04:23 +00:00
Sakamoto, Kazunori
7aef610d85 fix(@blitzjs/generator): make Next.js version pinning to 13.4.5 (#4150)
* fix: make Next.js version stick to 13.3.4

* fix: upgrade Next.js from 13.3.4 to 13.4.5

---------

Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-06-12 15:12:40 +05:30
Siddharth Suresh
b266254247 Revert "fix log showing path"
This reverts commit 67e00d9108.
2023-06-12 12:44:45 +05:30
Siddharth Suresh
67e00d9108 fix log showing path 2023-06-12 12:40:54 +05:30
github-actions[bot]
d25c965bc8 Version Packages (beta) (#4144)
* Version Packages (beta)

* pnpm lock

* fix worlfow pnpm version

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-06-09 23:54:35 +05:30
Siddharth Suresh
1bb3a65566 (fix): Stop exporting useAuthenticatedBlitzContext from @blitzjs/auth (#4157)
* Remove unnecessary exports from @blitzjs/auth

* add changeset

* allow exporting getBlitzContext as we need it for blitz rpc

* Update .changeset/moody-crews-travel.md

---------

Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 17:01:55 +00:00
Blitz.js Bot
28b0ffeb5f (meta) added @jayu as contributor 2023-06-09 12:52:10 -04:00
Jakub Mazurek
c7ac86b857 fix: enormous memory consumption of the dev server (#4148)
* fix: enormous dev server memory consumption

* chore: add changeset file

* add resolversDynamicImport configuration

* make vercel default to true

* imporve the changelog

* Update .changeset/good-oranges-pretend.md

* make code cleaner

* a fix and refactor

* fix build

---------

Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2023-06-09 16:52:04 +00:00
Siddharth Suresh
5166e5e037 (feat) upgrade tslog (#4154)
* upgrade tslog

* Create big-turtles-tease.md

* pnpm lock

* fix build issue

* upgrade pnpm in the lock file to v8

* try again

* Update main.yml

* fix build

* fix

* again

* fix spacing
2023-06-05 21:11:34 +05:30
Siddharth Suresh
2533caf484 (fix): Fix the Type error in RpcServerPlugin (#4152)
* fix type error

* changeset
2023-06-05 19:31:27 +05:30
Blitz.js Bot
85a71ffef9 (meta) added @nikola-wd as contributor 2023-05-31 11:36:16 -04:00
Blitz.js Bot
803f533a3d (meta) added @nerixim as contributor 2023-05-31 11:21:39 -04:00
Blitz.js Bot
63ee9423a9 (meta) added @GHKEN as contributor 2023-05-11 12:06:35 -04:00
Tetsuya Fukuda
89446b3656 support both directory style in tailwind recipe (#4137)
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-05-11 21:36:30 +05:30
github-actions[bot]
5a64f1c39c Version Packages (beta) (#4135)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-05-01 23:33:32 +05:30
Blitz.js Bot
fa30de4599 (meta) added @gjmoed as contributor 2023-05-01 13:39:26 -04:00
G.J. Moed
3d004dc415 Adjust codegen logic for suspense patch (#4138)
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-05-01 23:09:20 +05:30
Blitz.js Bot
08fbede75e (meta) added @dbrxnds as contributor 2023-05-01 12:30:21 -04:00
David
eda14fa8aa Add formatError property to Blitz server- & rpchandler setup (#4124)
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-05-01 22:00:15 +05:30
Blitz.js Bot
7e0e0f984c (meta) added @nelsonmestevao as contributor 2023-04-19 14:27:42 -04:00
Nelson Estevão
d814c2d2d8 fix: add missing key prop to LabelSelectField (#4122)
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-04-19 23:57:37 +05:30
Siddharth Suresh
29c2b029ac Fix: Add missing entry to expose next-auth adapter (#4133) 2023-04-19 23:45:39 +05:30
Siddharth Suresh
ed22706e5f fix (minor): Replace console.log with debug (#4132) 2023-04-19 23:44:46 +05:30
github-actions[bot]
3e8f04ed03 Version Packages (beta) (#4121)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-04-10 19:24:42 +05:30
Siddharth Suresh
e82a79be50 Update the version of next in the new template from 13.2 to 13.3.0 (#4120)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2023-04-10 18:45:54 +05:30
Blitz.js Bot
b1fdb63470 (meta) added @vitaliemiron as contributor 2023-04-07 12:46:27 -04:00
Vitalie
38d945a3fb fix: new app generated by blitz new causes Error: DYNAMIC_SERVER_USAGE (#4113)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-07 16:46:22 +00:00
Blitz.js Bot
ac587b6ac3 (meta) added @maotora as contributor 2023-04-07 12:38:51 -04:00
Maotora ᕙ(⇀‸↼‶)ᕗ
c07a13eefb Fix blitz recipe paths (#3997)
Co-authored-by: Tobias <t@tobiasjordans.de>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-04-07 12:38:46 -04:00
github-actions[bot]
9f316d73f5 Version Packages (beta) (#4111)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-04-03 19:26:36 +05:30
Siddharth Suresh
f84d77a425 Fix invoke type regression (#4110) 2023-04-03 08:49:55 +05:30
github-actions[bot]
f2da4f1516 Version Packages (beta) (#4083)
* Version Packages (beta)

* pnpm lock

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-03-31 23:30:39 +05:30
Brandon Bayer
acc07ce943 Fix Next 13.2 compatibility (#4108)
* make everything work with next 13.2

* changeset

* update test

* fix test
2023-03-30 20:20:30 +00:00
Siddharth Suresh
ea7561b8ee feature: Multiple fields forms using templates during generation (#3869)
* initial port

* read custom template values from blitz-server

* fix unit tests

* add unit tests

* remove comments

* make db import generic

* fix blitz genrate not updating values

* cleanup

* fix parent generation in createMutation and components, and move existing pages when --parent is called

* cleanup

* Create silly-peas-work.md

* Update .changeset/silly-peas-work.md

* add types for codegen

* fix belongsTo not working

* fix pnpm-lock

* use latest blitz logging setup in generator

* show error when structure of codegen is incorrect using zod

* cleanup

* make prisma import generic

* update tests

* generic prisma to work on subsequent runs

* initial commit adding dropdown option when using belongTo and parent flag

* cleanup

* fix --parent flag

* fix type

* Update getUsers.ts

* fix duplicate

* update prop type to options for --parent or belongsTo option and add LabelSelectField

* update tests

* Update blitz-server.ts

* fix lock file and add react-final-form select component

* fix default bug for string values in #2863

* Update apps/toolkit-app/app/blitz-server.ts

* update to latest changes

* implement suggessions

* fix tests and remove custom log

* add required test and remove error if prisma does not exist

* remove error log if no prisma schema

* works without prisma

* move zod to devDeps

* fix zod version

* preWriteFile and postWriteFile hooks

* fix pnpm lock

* Update packages/generator/src/generators/template-builders/field-values-builder.ts

Co-authored-by: John Vandivier <vandivier_john@yahoo.com>

* initial revert changes to log and add better types

* minor fix

* minor fix

* Update main.yml

* fix playwright issue

* Update main.yml

* try agin

* fix env location

* fix path

* fix version

* try another way

* with deps

* fix version

* cleanup

* add new zod `datetime`

Co-authored-by: Tobias <tobias@fixmycity.de>

* pnpm lock

* update zod to 3.20.0 in generator

* update unit tests

* Create pr-release.yml

* add changeset pre exit to fix error

* update to latest

* fix syntax

* try again

* feature: Consolidate mutations schema to schemas.ts file (#4057)

* fix global install issue

* update the templates from suggestions

* merge the default and custom config

* fix custom codegen

* fix validations

* add partial type to codegen

* commit to rerun the action

---------

Co-authored-by: John Vandivier <vandivier_john@yahoo.com>
Co-authored-by: Tobias <tobias@fixmycity.de>
2023-03-29 23:34:00 +05:30
Blitz.js Bot
13639c5d1d (meta) added @jafarlihi as contributor 2023-03-29 09:49:53 -04:00
Hikmat Jafarli
afdc810d0b Fix LabeledTextField update on next-ui and chakra-ui recipes (#4106)
* Fix LabeledTextField update on next-ui and chakra-ui recipes

* Create empty-spiders-lay.md

---------

Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-03-29 19:19:46 +05:30
Siddharth Suresh
37aeaa7fa2 feature: Nextjs 13 App Directory Utility Methods (#4103)
* working

* fix toolkit app

* fix add directive

* add back secure password

* changeset

* improve blitz rpc structure

* make it work

* fix most integration tests

* fix the tests

* fix import error

* fix unit test

* fix tests

* remove breaking changes

* remove another breaking change

* fix typescript declaration

* fix errorboundary redirect issues

* cleanup

* upgrade to next13

* update pnpm-lock

* add Server Plugin Export

* fix lint error

* fix build errors

* fixes

* Solve NextRouter is not mounted

* fix

* fix issues

* pnpm lock fix

* rename session function and add auth utility

* remove potential implicit warning

* fix deps and cleanup

* fix secure-password missing file

* fix possibility of crsf token cookie being null

* remove secure-password breaking changes

* Update cuddly-singers-perform.md

* rename functions and remove headers

* Revert "remove secure-password breaking changes"

This reverts commit abccf93d0c.

* unsupported auth methods in react server components

* remove authorizedContext: To be done in another PR

* add integration test for app dir

* fix duplicate package name

* Revert "remove authorizedContext: To be done in another PR"

This reverts commit 46fe8afab9.

* pnpm lock

* integration test

* remove empty then and add void operator

* add new invokeResolver function

* fix bug in useAuthenticatedBlitzContext

* Create .changeset/tall-radios-clean.md

* overload the invoke function for the new RSC usecase

* invoke works without implicit passing of arguments

* fix pnpm lock
2023-03-29 19:05:46 +05:30
Siddharth Suresh
cadefb88e4 feature: Next 13 App directory (#4079)
* working

* fix toolkit app

* fix add directive

* add back secure password

* changeset

* improve blitz rpc structure

* make it work

* fix most integration tests

* fix the tests

* fix import error

* fix unit test

* fix tests

* remove breaking changes

* remove another breaking change

* fix typescript declaration

* fix errorboundary redirect issues

* cleanup

* upgrade to next13

* update pnpm-lock

* add Server Plugin Export

* fix lint error

* fix build errors

* fixes

* Solve NextRouter is not mounted

* fix

* fix issues

* pnpm lock fix

* rename session function and add auth utility

* remove potential implicit warning

* fix deps and cleanup

* fix secure-password missing file

* fix possibility of crsf token cookie being null

* remove secure-password breaking changes

* Update cuddly-singers-perform.md

* rename functions and remove headers

* Revert "remove secure-password breaking changes"

This reverts commit abccf93d0c.

* unsupported auth methods in react server components

* remove authorizedContext: To be done in another PR

* add integration test for app dir

* fix duplicate package name

* integration test

* remove empty then and add void operator

* fix pnpm lock
2023-03-24 11:10:36 +05:30
Siddharth Suresh
6f18cbdc98 feature: Next Auth Adapter (#4046)
* initial working

* add user side callback control

* connect to blitz-auth

* better error handling

* initial working after submodule

* Create fast-adults-guess.md

* add submodule init and update to workflow

* remove internal folder

* cleanup

* ignore tests from next-auth

* add redirectUrl config and maintin consistency

* move required files back to internals folder

* remove submodule cloning

* Patch NextAuth

another time

fix import issue

fix import

add path imports for the adapters

Revert "add to blitz-auth"

This reverts commit 246e62faa5a451aad9f4a2530a159ca3457b8b75.

add to blitz-auth

pnpm lock fix

cleanup

fix codegen

remove nextauth submodule and internal folder and patch nextauth

* Revert "Patch NextAuth"

This reverts commit 31888fc643.

* switch

* DRY

* optional peerDependency

* Delete .gitmodules

* make it work with webpack alias

* fix

* split to new path

* undo unnecessary changes

* more fixes

* add strong typing to nextauth adapter (#4104)

* add strong typing to nextauth adapter

* cleanup

---------

Co-authored-by: Brandon Bayer <b@bayer.ws>
2023-03-24 09:07:11 +05:30
Blitz.js Bot
3480d90098 (meta) added @jeliasson as contributor 2023-03-21 04:18:29 -04:00
Siddharth Suresh
9529dbd6f4 Make secure password completely optional (#4085)
* secure-password breaking changes

* fix

* more fixes

* fix secure-password imports

* add codemod

* add secure-password to auth integration test

* Apply suggestions from code review

* try adding playwrigth to package.json

* without server mode

* add one to fix conficting ports

* another try

* add waitPort in the right place

* use same port

* manually kill the process

* remove the server mode

* cleanup
2023-03-18 16:48:08 +05:30
Blitz.js Bot
f443118b9d (meta) added @exKAZUu as contributor 2023-02-16 12:17:01 -05:00
Sakamoto, Kazunori
e228ba5dee fix: type error in reset-password.tsx (#4081) 2023-02-17 00:16:55 +07:00
Tobias
430f0b52dd Update to "prisma": "4.6.1" (#4062)
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-02-13 18:47:50 +05:30
Marcus Reinhardt
6e88a847fe fix: vulnerabilities in @blitz/auth (#4082)
* fix vulnerabilities

* Update .changeset/strong-chicken-study.md

---------

Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-13 10:20:10 +00:00
Brandon Bayer
1db963a8ca update readme 2023-02-13 17:12:26 +07:00
github-actions[bot]
6374f2ff0c Version Packages (beta) (#4055)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-02-09 21:44:34 +05:30
Tobias
6ec020c6d6 Remove useEffect from reset password templates (#4051)
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2023-02-09 11:19:10 +05:30
Blitz.js Bot
a3d8b287f1 (meta) added @sweetliquid as contributor 2023-02-07 03:24:20 -05:00
sweetliquid
4ed1fc1233 docs: delete duplicates of the in comments (#4073)
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-07 08:24:14 +00:00
Siddharth Suresh
3fa3c70b39 internal: Readme for the packages (#4052) 2023-02-07 15:14:58 +07:00
Blitz.js Bot
a9b1989bb0 (meta) added @jhonnymichel as contributor 2023-02-06 10:47:34 -05:00
Jhonny Michel
c3c789740a Fixing tests for blitz apps that use vitest (#4072)
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
Closes https://github.com/blitz-js/blitz/issues/4065
2023-02-06 21:17:28 +05:30
Siddharth Suresh
42a2cf951a Add secure-password as an Optional peerDependency (#4067)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2023-02-06 19:11:42 +05:30
Tobias
d316d0db7f Next 13: Remove anchor tags from Link component (#4071)
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
Closes https://github.com/blitz-js/blitz/issues/4066
2023-02-06 18:52:49 +05:30
Siddharth Suresh
a8ce2325fc Fix max-width of body in new app template (#4068)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2023-01-27 20:41:15 +05:30
Blitz.js Bot
f58a0e42f7 (meta) updated @tordans contributions 2023-01-26 05:23:14 -05:00
Tobias
cb63a0ea5b Guard blitz generate input against unwanted characters (#4024)
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
Closes https://github.com/blitz-js/blitz/issues/4021
2023-01-26 15:53:08 +05:30
Siddharth Suresh
a78bd33706 internal: Publish PRs to npm (#4050) 2023-01-14 20:39:16 +05:30
bravo-kernel
79c5e86d71 Add missing Layout.tsx for generated mimimalapp (#4054) 2023-01-13 17:28:53 -05:00
github-actions[bot]
21b83fb7bf Version Packages (beta) (#4038)
* Version Packages (beta)

* pnpm lock

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-01-12 10:43:33 +05:30
Tobias
14882d43fe Update package Zod to 3.20.2 (#4039)
* Update package zod to 3.20.2

* `pnpm changeset` Update zod to 3.20.2 (was 3.19.1).

Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-01-11 11:32:02 +05:30
Tobias
989691ec87 Use src instead of app folder for blitz generate custom-template (#4033)
* Use src instead of app in `customTemplates: "src/templates"`

* Use src instead of app in `cli/commands/generate`

* Add changeset

* remove ignored packages

Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-01-11 05:25:57 +00:00
Brandon Bayer
2703618868 change rpc route basepath includeRPC in monorepos to be one folder up (#4045)
* change rpc route basepath includeRPC in monorepos to be one folder up

* changeset

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-11 00:13:11 +00:00
Blitz.js Bot
44ddf5b423 (meta) updated @bravo-kernel contributions 2023-01-10 19:06:15 -05:00
bravo-kernel
bcef81fadc Add missing MockRouter prop in generated test utils (#4043)
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 19:06:10 -05:00
Dillon Raphael
7abfb9086a Redesign the index page for newly generated blitz projects (#3987)
* redesign index page for full app template

* pnpmlock

* iteration 2

* Add padding around blitz logo

* Fix more padding

* update padding for logo and button container

* increase max-width

* final draft

* address comments

Co-authored-by: Brandon Bayer <b@bayer.ws>
2023-01-11 00:04:54 +00:00
Siddharth Suresh
57101e9adf internal: fix playwright installation error by fixing version (#4047) 2023-01-10 18:57:30 -05:00
Siddharth Suresh
497b87f7fb internal: Fix playwright install issue (#4044) 2023-01-10 00:02:44 +05:30
Tobias
64a98e201d prisma/field: Guard TS warning (#4032)
The previous solution did solve the if-statement but not the line below, which still had this TS error:

```
      const relationType = Relation[_fieldName]
// ^- const _fieldName: string | undefined
//    Type 'undefined' cannot be used as an index type.ts(2538)
```

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
Co-authored-by: Siddharth Suresh <siddh.suresh@gmail.com>
2023-01-09 22:08:30 +05:30
Brandon Bayer
8aa22a0b2f add currentPassword to default masked fields in the logger (#4042) 2023-01-06 17:55:07 -05:00
Brandon Bayer
145d5a02b3 fix failed localstorage access to not crash the application (#4037) 2023-01-04 18:28:31 -05:00
Siddharth Suresh
9be4d86174 Version Packages (beta) (#4035)
* Version Packages (beta)

* Version Packages (beta)

* pnpm lock

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-04 01:16:55 +05:30
Siddharth Suresh
249e7cf527 Revert "Version Packages (beta) (#4012)" (#4034)
This reverts commit 76df5db1c3.
2023-01-04 00:54:38 +05:30
github-actions[bot]
76df5db1c3 Version Packages (beta) (#4012)
* Version Packages (beta)

* pnpmlock

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2023-01-04 00:37:02 +05:30
Brandon Bayer
556f5cd13d update CODEOWNERS 2023-01-03 14:02:03 -05:00
Dillon Raphael
d692b4c1d7 Fix suspense error codegen patch for latest nextjs version (#4031)
* Use the new nextjs constant to check if SSR and fix suspense for nextjs 13.1 and above

* satisfy version from 13 to 13.0.6

* check for DYNAMIC_SERVER_USAGE error string for nextjs versions 13-13.0.6

* Create fluffy-coats-flow.md

* revert toolkit-app update to next 13.1

* set error message for compatability with next 13.0.7

* fix changeset
2023-01-03 13:49:53 -05:00
Blitz.js Bot
bd4db6d701 (meta) added @Trancever as contributor 2023-01-02 14:18:58 -05:00
Dawid Urbaniak
82e8b64f59 fix: properly add authError query param to redirect url (#4027) 2023-01-02 14:18:53 -05:00
Tobias
e9dfbcf85a Reference vitest.config.ts instead of jest for README|s (#4019)
* Reference `vitest.config.ts` instead of jest for README|s

* Update apps/toolkit-app/README.md

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-29 14:51:14 -05:00
Blitz.js Bot
a4294ad29c (meta) updated @tordans contributions 2022-12-28 15:23:30 -05:00
Tobias
ea83f0d174 Update README.md|s to use src/ instead ofapp/ (#4018)
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-28 15:23:25 -05:00
Blitz.js Bot
f32f6d3ac9 (meta) added @iagormoraes as contributor 2022-12-28 13:12:38 -05:00
Iagor Moraes
d5b8faa860 React Suspense on Next 13 patch fix (#4009)
* fix: add regex to support inline and non-inline codebase

- add proper regex test for package version

* chore: add changelog

* chore: update lock file

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-28 13:12:33 -05:00
Blitz.js Bot
4a6612b942 (meta) added @tordans as contributor 2022-12-28 10:13:58 -05:00
Tobias
c941d993a8 SignupForm.tsx: Improve helper comment (#4016)
This comment was helpful but could be even more helpful if it clearly stated that it referenced the "P"-Code; and link to docs to learn more.

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-28 10:13:53 -05:00
Blitz.js Bot
3633f23ceb (meta) added @a11rew as contributor 2022-12-26 18:59:00 -05:00
Andrew Glago
10f98c681d feat(cli): add href property to RouteURLObject (#3892)
* feat(cli): add href property to RouteURLObject

* Create thick-moons-fry.md

* update playwright install github action

* add browser path env variable to test stage

* revert

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-26 18:58:54 -05:00
Datner
0025856b9e support invalidate all queries (#3899)
* support invalidate all queries

* Add changeset

* Update .changeset/stupid-rabbits-jump.md

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>

Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-12-20 15:09:15 -05:00
Dillon Raphael
77b7da0f38 Remove husky prepush hook & update precommit hook to only run prettier (#3984)
* Remove husky prepush hook & update precommit hook to only run prettier for full app & minimal app templates

* pnpmlock
2022-12-20 14:44:15 -05:00
github-actions[bot]
13c2642bdb Version Packages (beta) (#3992)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-12-16 14:09:41 -05:00
Brandon Bayer
03bad3175d fix Cannot read properties of null (reading 'isReady') for pnpm/yarn v3 (#4008) 2022-12-16 14:02:44 -05:00
Tom MacWright
74a14b7040 fix: Reject db.() with an error object (#4006) 2022-12-15 09:58:27 -05:00
Siddharth Suresh
6ece096134 Decouple Blitz RPC and Blitz Auth (#3943)
* inital unwrapping of blitz rpc from blitz auth

* fix linr

* Revert "fix linr"

This reverts commit 000e2c7259.

* remove duplication of code and dynamically import blitz auth if plugin is used

* return types to blitz-auth and import in rpc as types

* remove excess files from git diff

* remove todo ts-ignore

* add changeset

* better error messages

* Update odd-cars-fry.md

* switch from blitz log to console - due to import error.

* Revert "Merge branch 'rpc-without-auth' of https://github.com/blitz-js/blitz into rpc-without-auth"

This reverts commit 5b45d65b4d, reversing
changes made to b15dfa6dec.

* Revert "switch from blitz log to console - due to import error."

This reverts commit b15dfa6dec.

* Revert "better error messages"

This reverts commit 75922cb063.

* fix location of seting global variable

* better error message due to dynamic import

* allow setting csrf token in blitz rpc

* cleanup

* fix

* pnpm lock fix and update csrf api

* fix global.ts type definition

* remove change to merge

* fix pnpm-lock

* update integration-tests to work without blitz-auth

* initial working commit after switch to plugin system

* fix pnpm-lock

* readd the changeset

* update hook names

* Revert "readd the changeset"

This reverts commit 796f3f518e.

* Revert "update hook names"

This reverts commit fb127ed84e.

* Revert "fix pnpm-lock"

This reverts commit d7447b5966.

* Revert "Revert "fix pnpm-lock""

This reverts commit c2f21aa0e5.

* Revert "Revert "update hook names""

This reverts commit 4b66846b20.

* Revert "Revert "readd the changeset""

This reverts commit c95d150e64.

* add header to rpc plugin

* pnpm lock fix

* cleanup - change global hook names to prefix with __BLITZ

* initial commit suggestion - TODO Fix types

* fix most type assertions

* fix error without blitz auth

* add typea to events and middleware reducers

* implement suggestion

* Apply suggestions from code review

Co-authored-by: Brandon Bayer <b@bayer.ws>

* move onSessionCreated event from blitz-auth to blitz-rpc

* move globals to blitz core, move event listener to blitz-next

* remove middlewareCtx to Ctx

* fix imports

* improve type definition of hook types

* format

* Revert "remove middlewareCtx to Ctx"

This reverts commit 4259b4dbed.

* Revert "fix imports"

This reverts commit 7422bfaee3.

* revert changes from MiddlewareCtx to Ctx

* pnpm lock and other fixes

* remove type assertion

* merge to one `Array.reduce`

* Apply suggestions from code review

Co-authored-by: Brandon Bayer <b@bayer.ws>

* implement review suggestions

* Update packages/blitz/src/types.ts

* add unit tests

* cleanup

* Update packages/blitz/tests/plugin.test.ts

* add providers to plugin reduce

* add initial integration test for full blitz rpc+auth and custom client plugins

* test commenting out playwright install

* fixes

* remove changes related to console.log checking

* test

* try with different command

* comment

* another try

* try adding global install

* change console.log to console.info for better identification

* fix db

* lowdb import fix

* convert from lowdb to prisma

* fix blitz build error

* add custom plugin events to integration-tests

* manipulate the timing of event firing

* fix

* check

* add middleware tests

* fix

* fix commented test and cleanup

* add the migration file

Co-authored-by: Brandon Bayer <b@bayer.ws>
2022-12-13 18:44:39 -05:00
Dillon Raphael
a0596279bd Fix blitz install for recipes that use the path helper (#3995) 2022-12-09 08:32:44 -08:00
Dillon Raphael
fe2e4eb1e9 Update readme 2022-12-02 08:51:26 -05:00
Aleksandra
8c247e26e7 Switch from jest to vitest in new app templates (#3985)
* Switch from jest to vitest in new app templates

* Finish vitest setup

* Handle vitest.config.js vs vitest.config.ts

* Add proper vitest config to js templates

* Add changeset

* Update READMEs in new app templates

* Fix tests after vitest upgrade

* Update spyOn references in tests
2022-11-28 14:24:08 -05:00
Siddharth Suresh
650a157e1d fix #3989 (#3990) 2022-11-25 18:21:41 -05:00
Blitz.js Bot
9dc81fe958 (meta) added @usamaster as contributor 2022-11-24 11:22:59 -05:00
github-actions[bot]
474b5494ac Version Packages (beta) (#3977)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-22 16:09:29 -05:00
Dillon Raphael
b33db08286 Ensure superjson registers error classes once (#3982)
* bump superjson version & ensure superjson register

* update changeset & use error name as property for check if class has been registered

* refactor
2022-11-22 16:04:42 -05:00
Brandon Bayer
c1e0040639 transpile packages to es2015 to support older browsers (#3983) 2022-11-22 13:39:11 -05:00
Blitz.js Bot
5a7e6e0bb8 (meta) updated @medihack contributions 2022-11-21 14:30:17 -05:00
Kai Schlamp
a6f32d1d0b Export enhancePrisma for client again (#3965)
* Export enhancePrisma for client again
2022-11-21 14:30:11 -05:00
Selçuk Fatih Sevinç
c126b8191b Fix builder execute command hangs up (#3958)
* fix: builder execute command hangs up

* using "blitz install" inside recipe with addRunCommandStep causes hangs up

Co-authored-by: Selçuk Fatih Sevinç <selcuk@hub.studio>
2022-11-21 10:20:46 -05:00
Blitz.js Bot
775004f23e (meta) added @selcukfatihsevinc as contributor 2022-11-21 09:43:43 -05:00
Selçuk Fatih Sevinç
696f48c4e8 some providers need extra attributes, update for wrapAppWithProvider (#3959)
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-11-21 09:43:36 -05:00
Paul
942536d9ad Extend paginate.ts to support more complex pagination object (#3970)
* Extend paginate.ts to support more complex pagination object

* change pagination object based on reviewer suggestion

* changest inclusion

* update paginate test

Co-authored-by: Paul Moss <paulmoss06@gmail.com>
2022-11-18 09:50:10 -05:00
Brandon Bayer
b493c93f8b fix resolverPath:root and make it work with monorepo resolvers (#3978) 2022-11-17 21:47:17 -05:00
Dillon Raphael
b80c3d92ca Fix form paths when running blitz generate all (#3961)
* Update form paths when running blitz generate all

* pnpmlock & update changeset

* Update changeset

* pnpmlock

* update playwright
2022-11-17 17:41:11 -05:00
github-actions[bot]
4c0024c468 Version Packages (beta) (#3967)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-16 18:56:59 -05:00
Brandon Bayer
72a4e594ae internal: remove unneeded useSession from useQuery hooks (#3968) 2022-11-14 18:00:20 -05:00
Blitz.js Bot
62212bcc78 (meta) added @paulm17 as contributor 2022-11-14 14:51:47 -05:00
Paul
ed2b0e22c5 Add feature for resolvers to exist outside of Blitz root (#3953)
Co-authored-by: Paul Moss <paulmoss06@gmail.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-11-14 14:51:42 -05:00
Blitz.js Bot
d250346d8b (meta) updated @tmcw contributions 2022-11-14 14:23:27 -05:00
Tom MacWright
c0a3b1ee36 Fix runaway mutability bug in httpMethod (#3963)
Co-authored-by: Brandon Bayer <b@bayer.ws>
Closes https://github.com/blitz-js/blitz/issues/3962
2022-11-14 14:23:22 -05:00
Brandon Bayer
aaed9caa82 CI - upgrade pnpm version (#3966) 2022-11-14 14:14:16 -05:00
Brandon Bayer
0020db295d Revert "try fix"
This reverts commit 9fd032106e.
2022-11-14 13:00:59 -05:00
Brandon Bayer
9fd032106e try fix 2022-11-14 13:00:35 -05:00
github-actions[bot]
936211a657 Version Packages (beta) (#3955)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-09 15:22:38 -05:00
Siddharth Suresh
97469a1265 Page authenticate role (#3902) 2022-11-09 14:57:02 -05:00
Aleksandra
8b4bf999ce Update deps (#3957) 2022-11-09 14:11:28 -05:00
Dillon Raphael
5ea068b28b Check location for blitz-server & blitz-client in blitz installer path utils (#3942)
* Check if blitz-server & blitz-client exists in app or src directory in the path utils for blitz recipes
2022-11-09 10:25:08 -05:00
Dillon Raphael
88caa18e61 patch next13 for suspense error (#3956) 2022-11-08 13:33:00 -05:00
Dillon Raphael
2a81af7b78 Update templates & generator to use src directory (#3947)
* update templates & generator to use src directory

* changeset

* fix imports for toolkit-app-passportjs example
2022-11-08 08:34:36 -05:00
Dillon Raphael
916692db74 update README 2022-11-04 20:06:53 -04:00
github-actions[bot]
0959a11fc6 Version Packages (beta) (#3930)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-04 15:52:57 -04:00
Siddharth Suresh
4545912936 Include resolvers in src in blitz console (#3933)
* optimse only-db flag and add src directory to find resolvers in console

* default parameter
2022-11-04 12:32:45 -04:00
Brandon Bayer
55a43ce1f8 maybe fix anon session CSRF issue + add ability to customize anon session expiry time (#3945)
* maybe fix anon session CSRF issue + add ability to customize anon session expiry time
2022-11-04 12:12:15 -04:00
Aleksandra
1569bd53e0 Upgrade tslog to latest version (#3946)
* Upgrade tslog to latest version
2022-11-04 11:59:13 -04:00
Siddharth Suresh
8e5903c0fa Fix cannot find module db error in JavaScript template (#3940)
* use AST to parse the config and allow blitz server to be in `src`
2022-11-02 09:22:49 -04:00
Brandon Bayer
11b548edee make logger optional (will default to BlitzLogger) (#3939)
* make logger optional (will default to BlitzLogger)
2022-11-01 15:28:57 -04:00
Siddharth Suresh
ceb7db274f Add GET support to RPC specification (#3891) 2022-10-29 17:10:27 -04:00
github-actions[bot]
0ebdf3bc93 Version Packages (beta) (#3929)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-28 15:27:06 +08:00
Aleksandra
1b798d9a03 Export enhancePrisma from the server entry point (#3928)
* Export enhancePrisma from the server entry point

* Changeset

* Update pnpm lock
2022-10-27 10:04:31 -04:00
Blitz.js Bot
758ccbbbe5 (meta) added @joneskj55 as contributor 2022-10-25 06:38:44 -04:00
github-actions[bot]
d73b1d76ab Version Packages (beta) (#3916)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-25 18:32:26 +08:00
Dillon Raphael
78fd5c489b Fix Blitz Install (#3909) 2022-10-24 21:50:54 -04:00
Aleksandra
60de057477 Fix reset token being undefined when passed to the resetPassword mutation (#3922) 2022-10-22 11:23:51 +08:00
Siddharth Suresh
0a8b0cb350 Custom Server TS error (#3888) 2022-10-20 14:56:40 +08:00
Aleksandra
5476139375 Remove unnecessary as number assertions from new app templates (#3915) 2022-10-19 16:25:35 +08:00
github-actions[bot]
81dd346c85 Version Packages (beta) (#3907)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-19 14:56:44 +08:00
Aleksandra
6f4349896f Fix 'ambiguous class detected' errors (#3912) 2022-10-19 13:44:33 +08:00
Aleksandra
a6e81f156b Add BlitzLogger plugin and allow customizing logging (#3886) 2022-10-18 15:50:17 +08:00
Aleksandra
4e26ae21bc Upgrade eslint-config-next in new app templates to fix linting issues on blitz build (#3910) 2022-10-18 14:54:47 +08:00
Blitz.js Bot
70ca39e059 (meta) added @janvennemann as contributor 2022-10-17 04:06:03 -04:00
Jan Vennemann
7b63f0f1f2 fix(rpc): allow return undefined in setQueryData updater function (#3898)
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-10-17 16:05:57 +08:00
Siddharth Suresh
2e5d7ae40c Upgrade CI Syntax (#3906) 2022-10-17 15:33:36 +08:00
github-actions[bot]
67de028732 Version Packages (beta) (#3896)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-13 14:02:17 +08: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
github-actions[bot]
4e3c25d9a0 Version Packages (beta) (#3839)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-11 16:24:43 +08:00
Estevan Jantsk
2ade7268e2 Add blitz export command (#3885)
Co-authored-by: Fran Zekan <zekan.fran369@gmail.com>
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-10-11 16:18:54 +08:00
Fran Zekan
aa34661fac Fix queryKeyGeneration when using invalidateQuery (#3728)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-10-11 16:01:47 +08:00
Siddharth Suresh
d98e4bac4e Migrate blitz routes command (#3890) 2022-10-11 15:50:30 +08:00
Isuru Maldeniya
0473020555 update prisma-ast version in blitz generator package (#3882)
Co-authored-by: Isuru Maldeniya <isuru.m@synergentl.com>
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-10-04 18:30:33 +08:00
Jannik Schmidtke
8a88dec873 Add a .vscode/settings.json file to specify a TypeScript version (#3876) 2022-10-04 15:35:03 +08:00
Fran Zekan
d6717b9d3c Try to load prisma.schema path from pkg json (#3874)
* Try to load prisma.schema path from pkg json
2022-10-03 13:02:41 -04:00
Daniel Oltmanns
eb970f7bbc fix detecting blitz.config.(ts|js) config file (#3701)
* fix detecting blit.config.(ts|js) config file
2022-10-03 12:41:57 -04:00
Dillon Raphael
8e0c9d76b5 Migrate recipes (#3784) 2022-10-03 09:21:45 -04:00
portalninja
bd09db7533 remove views property from Session's publicData in types.ts file (#3872)
* fix: remove views from public Session data

* add changeset

* Update .changeset/strong-keys-lie.md

Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-10-03 11:29:20 +08:00
João Jesus
83281a8469 remove {} from single values in the eslint config in package.json (#3877)
* refactor(js-templates): remove {} from single values inside package.json

* Add changeset

Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-10-03 11:05:13 +08:00
Siddharth Suresh
15d22af24a Migrate console (#3863)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-09-29 22:22:07 +02:00
Siddharth Suresh
1c3106eacf (meta) add @siddhsuresh as maintainer (#3868) 2022-09-29 16:47:09 +02:00
Fran Zekan
af58e2b239 CLI Version check fixes (#3675)
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-09-29 08:59:40 +02:00
Dillon Raphael
430f6ec782 Only generate the prisma client if it's not found (#3855) 2022-09-29 08:34:40 +02:00
Aleksandra
e2c18895da Add client testing utilities and index.test.tsx back to toolkit (#3857) 2022-09-28 16:38:58 -04:00
Aleksandra
3b3c245fb1 Update sponsors list (#3865) 2022-09-26 10:37:56 +02:00
Siddharth Suresh
7b00c17376 Add CI action that checks if changeset was added (#3850) 2022-09-23 14:22:12 +02:00
Dillon Raphael
b43c1a81cc Remove random user git config when generating a new project (#3852) 2022-09-22 12:49:48 +02:00
Aleksandra
1742eb45db Use prefetchInfiniteQuery from @tanstack/react-query for prefetching infinite Blitz queries (#3847)
* Use prefetchInfiniteQuery from @tanstack/react-query for prefetching infinite Blitz queries
2022-09-19 15:23:57 -04:00
Aleksandra
824a9b5e29 Update generator templates to stop breaking no-floating-promises rule (#3848)
* Update generator templates to stop breaking no-floating-promises rule
2022-09-19 15:07:42 -04:00
Aleksandra
9db6c88555 Fix help CLI command not working correctly (#3849)
* Fix help CLI command not working correctly
2022-09-19 14:57:53 -04:00
Jan Wilhelm
25f4526f7e Add API Route handler to the middleware stack (#3830)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-09-19 10:41:42 +02:00
Dillon Raphael
9fe0cc5468 Throw redirect errors when component has mounted in blitz-auth (#3842)
* Throw redirect errors when component has mounted

* Create heavy-cobras-own.md

* clean up useEffect

* Add mounted check for AuthenticationError

* remove clean up
2022-09-16 16:33:34 -04:00
Dillon Raphael
0edeaa37a3 Update regex for wildcard blitz route in webpack config (#3843)
* update regex for wildcard blitz route in webpack config

* Create itchy-spoons-tan.md

* fix regex

* Update itchy-spoons-tan.md
2022-09-16 14:05:31 -04:00
Estevan Jantsk
bf4aaf1de6 move useCurrentUser from core/hooks to users/hooks (#3831)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-09-15 15:56:09 +02:00
Siddharth Suresh
b3b4c21501 convert invokeWithMiddleware to resolver call in codemod (#3764) 2022-09-14 14:38:04 -04:00
Dillon Raphael
757789c43b CI Fixes (#3834) 2022-09-14 09:42:27 -04:00
Dillon Raphael
870986b5ad rename test-get-initial-props 2022-09-13 15:22:44 -04:00
Dillon Raphael
30406891b1 rename toolkit-app-passport & fix version of blitz in toolkit-app 2022-09-13 15:19:07 -04:00
github-actions[bot]
f1ba20f690 Version Packages (beta) (#3779)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-13 15:01:11 -04:00
Siddharth Suresh
aba000a812 Update CI (#3824) 2022-09-13 11:30:52 -04:00
Aleksandra
0b94a45039 Upgrade superjson to the latest version (#3827) 2022-09-12 18:05:44 +02:00
Dillon Raphael
6b788b03be Fix CI & Tests (#3822)
* set bash as shell for github action
2022-09-08 11:04:43 -04:00
Siddharth Suresh
d3403cf860 #3804 Show file path on error (#3809)
* Show file path on error in codemod
2022-09-07 09:18:23 -04:00
Siddharth Suresh
39fd15d4b5 Fix remote caching in CI (#3810) 2022-09-06 12:31:31 -04:00
Dillon Raphael
e3523407b9 fix duplicates in frontmatter for changeset 2022-08-31 11:13:24 -04:00
Dillon Raphael
2f914a54d9 Remove toolkit-app from changeset since it's an ignored package 2022-08-31 11:03:44 -04:00
Siddharth Suresh
c213d521c6 Add Windows Testing to CI (#3799)
* add windows testing
2022-08-30 18:32:48 -04:00
Siddharth Suresh
da914c9294 Codemod should convert import statements to require when creating next.config.js (#3803) 2022-08-30 13:25:33 -04:00
Dillon Raphael
22344d058a Add getLayout to full & minimal app template in _app (#3802)
* Add getLayout to full & minimal app template in _app
2022-08-30 12:16:44 -04:00
Dillon Raphael
43e65cfecd Fix for codemod that removes types from the blitz config file (#3759)
* check if typeAnnotation when trying to remove types during creating the next config file with codemod
2022-08-26 16:25:46 -04:00
Dillon Raphael
a84b8de4e6 Remove -cookie-prefix appended to the cookiePrefix string (#3792)
* Remove  appended to the cookiePrefix string
2022-08-26 11:50:37 -04:00
Aleksandra
8fa9a56f63 Make minimal app template setup work (#3795) 2022-08-26 11:05:39 +02:00
Marcus Reinhardt
713aead933 Allow custom strategy name in passportAdapter (#3754)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-08-24 16:12:28 +02:00
Dillon Raphael
74a4ce8e85 Add AuthenticatedSessionContext to the codemod import map (#3771)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-08-24 11:09:14 +02:00
Siddharth Suresh
c53978d58e Update upgrade-legacy codemod imports (#3788) 2022-08-24 10:57:42 +02:00
Siddharth Suresh
161270e3b1 #3775 Only generate prisma client if it has not been generated (#3780) 2022-08-23 12:25:10 -04:00
Aleksandra
f6dac093d2 Improve RPC logging: print resolverName() insetad of /resolverName() (#3777)
* Remove  from RPC resolvers logging
2022-08-23 10:49:17 -04:00
Aleksandra
69fb280340 Copy App component properties inside withBlitz (#3778)
* Copy App component properties inside withBlitz
2022-08-23 10:24:28 -04:00
Kai Schlamp
7498aef4fc Replace blitz-env.d.ts with next-env.d.ts (#3773)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-08-23 13:56:17 +02:00
github-actions[bot]
49aaaaefb0 Version Packages (beta) (#3756)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-22 18:08:41 -04:00
Dillon Raphael
638f2319b7 Prevent Minified react error #419 in production (#3755)
* add check for Minified React error #419 during codegen nextjs patch
2022-08-22 17:31:17 -04:00
Siddharth Suresh
3d950f7772 show file name when unexpected error occurs (#3763)
* show file name when unexpected error occurs
2022-08-22 14:26:29 -04:00
Aleksandra
2313fa61b0 Fix replaceIdentifiers codemod utility (#3766)
* Fix replaceIdentifiers utility
2022-08-22 14:11:14 -04:00
Siddharth Suresh
b72d1215c3 Add .vscode/launch.json to the generator templates (#3703)
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-08-22 14:02:35 +02:00
Siddharth Suresh
1bf185d618 Fix #3737 Fix eslint config using the codemod (#3753)
* Fix #3737 Fix eslint config using the codemod

* check if .eslintrc.js exists

* change log.error in .eslintrc.js check to collectedErrors
2022-08-19 09:33:10 -04:00
github-actions[bot]
000bc2334c Version Packages (beta) (#3751)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-18 14:22:30 +02:00
Dillon Raphael
0936cb38a6 Remove the NODE_ENV development check when patching nextjs (#3742) 2022-08-17 17:51:31 +02:00
Aleksandra
8ada2c26f7 Include ResetPasswordPage in new app template (#3743) 2022-08-17 17:25:57 +02:00
Aleksandra
eb9715688c Add BlitzPage type to auth pages in new app template (#3750) 2022-08-17 17:17:12 +02:00
Siddharth Suresh
ebfb562bfa Fix #3735 Add Script as a Default Import of Next.js (#3736)
* Fix #3735 Add Script as a Default Import of Next,js
2022-08-17 11:03:28 -04:00
Siddharth Suresh
a3b5fdd03e Fix #3745 Change ES6 import to require syntax (#3746)
* Fix #3745 Change ES6 import to require syntax

* fix error in syntax of callExpression
2022-08-17 10:44:52 -04:00
Aleksandra
3f9fe8f043 Exit process after finishing blitz new command (#3749) 2022-08-17 16:19:13 +02:00
Guillermo Antony Cava Nuñez
db7233db6a version bump to fix hydration mismatch react error (#3739)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-08-17 15:34:40 +02:00
Blitz.js Bot
1a6e953976 (meta) added @corydeppen as contributor 2022-08-16 04:27:27 -04:00
Dillon Raphael
58ae66fdb5 Remove console log from blitz util file (#3738)
* remove console log from blitz util file
2022-08-15 15:06:14 -04:00
github-actions[bot]
6eb5bc8987 Version Packages (beta) (#3732)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-15 11:38:08 +02:00
Aleksandra
0f4926fd1f Set latest tag in package json files (#3731) 2022-08-15 11:29:21 +02:00
github-actions[bot]
dff9fd042a Version Packages (beta) (#3730)
* Version Packages (beta)

* Update version number

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-08-15 10:38:03 +02:00
Aleksandra
2cc888eff8 Update changeset config (#3729) 2022-08-15 10:13:57 +02:00
github-actions[bot]
8a0a97bebb Version Packages (alpha) (#3724)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-14 15:57:22 +02:00
Aleksandra
176c7b8b57 Use correct path for log utilities import (#3721) 2022-08-14 15:49:43 +02:00
Aleksandra
b307931f2e Point to main branch instead of canary in README.md 2022-08-13 11:33:47 +02:00
Aleksandra
14375e25c4 Update sponsors list (#3720) 2022-08-13 11:30:30 +02:00
github-actions[bot]
8b755574b5 Version Packages (alpha) (#3717)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-12 20:05:18 +02:00
Aleksandra
4656e6ecd6 Print model added or updated in schema.prisma after running model generator (#3718) 2022-08-12 20:01:15 +02:00
Aleksandra
1e0ec7a972 Add missing BlitzPage type to Home page (#3716) 2022-08-12 19:43:40 +02:00
Dillon Raphael
f88702c1c1 Minimal codemod fixes (#3715)
* fix removing trailing comma when removing BlitzConfig from next.config.js during codemod

* fix codemod for consolidating pages
2022-08-12 13:21:25 -04:00
github-actions[bot]
8b9ad3f40c Version Packages (alpha) (#3705)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-12 13:37:07 +02:00
Daniel Bannert
37623a4f4c add missing g in next.config.js file name (#3713)
* feat: added missing g in confi.js

* Add Changeset

Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-08-12 13:28:47 +02:00
Aleksandra
6baab1907e Add type checking to next.config.js files in templates (#3710) 2022-08-12 11:37:06 +02:00
JH.Lee
b5de25c3d8 (meta) add @orionmiz as contributor (#3712) 2022-08-12 11:24:26 +02:00
Dillon Raphael
86af6dec5f Wrap middlewares with BlitzServerMiddleware function with codemod (#3711)
* wrap middlewares with BlitzServerMiddleware function & fix generating next config file
2022-08-11 14:39:59 -04:00
Blitz.js Bot
52a6338772 (meta) added @siddhsuresh as contributor 2022-08-11 11:11:28 -04:00
Siddharth Suresh
72a332e013 #3602 Fix the way next.config.js file is created by the codemod (#3709)
* #3602 fix the way next.config.js file is created by the codemod

* Update upgrade-legacy.ts

* remove middleware block
2022-08-11 11:11:23 -04:00
Dillon Raphael
fd31e56bc5 blitz generate changeset 2022-08-11 10:47:03 -04:00
Dillon Raphael
e2fac297fd Add back generate command (#3707)
* add back generate command

* use Routes object in generator templates

* update query & mutation templates to use resolver
2022-08-11 10:34:57 -04:00
Aleksandra
a3c92cb863 Allow using RouteUrlObject as redirect.destination in getStaticProps and getServerSideProps (#3699) 2022-08-11 13:20:57 +02:00
Dillon Raphael
2d1482fc8b Store error for cookiePrefix if undefined & show error at the end of codemod (#3704)
* store error for cookiePrefix if undefined & show error at the end

* rename to collectedErrors

* fix type & update error message
2022-08-10 15:40:17 -04:00
Blitz.js Bot
85b15a9cfb (meta) added @edrickleong as contributor 2022-08-10 05:17:42 -04:00
Edrick Leong
4902802402 Add getQueryData utility to get an existing query's cached data (#3648)
* feat: add getQueryData

* test: add integration test for getQueryData

* Add changeset

Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-08-10 11:17:37 +02:00
github-actions[bot]
0bc107fd7f Version Packages (alpha) (#3684)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-10 10:36:04 +02:00
Dillon Raphael
cb55ed266d check if DocumentHead is self closing in the codemod step (#3702) 2022-08-09 13:21:26 -04:00
Aleksandra
271c58ac62 Fix Cannot find module 'generate' error (#3700) 2022-08-09 14:32:22 +02:00
Dillon Raphael
06427f67f2 Throw error if cookiePrefix is undefined during codemod (#3696)
* throws error if cookiePrefix is undefined

* create ExpectedError class
2022-08-08 16:35:17 -04:00
Dillon Raphael
f120f6723a Add DocumentProps to codemod import map (#3695)
* add DocumentProps & DocumentContext to import map & clean up post structuring of _document imports from next/document
2022-08-08 16:10:33 -04:00
Blitz.js Bot
bac5e740ba (meta) added @oltdaniel as contributor 2022-08-08 15:35:24 -04:00
Daniel Oltmanns
630c718129 Fixes #3614 - changed console logs to standard logger (#3693)
* Fixes #3614 - changed console logs to standard logger

I tried to keep the logging format close to what has been present before, by also including the chalk package for coloring.

* Create great-candles-stare.md

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-08-08 15:35:20 -04:00
Aleksandra
078fe47419 Add '@testing-library/jest-dom' to new app dependecies (#3694) 2022-08-08 19:23:33 +02:00
Aleksandra
8dfaad088d Set correct packages versions in package.json with upgrade-legacy codemod (#3678) 2022-08-08 18:54:21 +02:00
Aleksandra
dd299ae89f Add ts-jest dependency to the new app templates (#3688) 2022-08-08 18:10:22 +02:00
Aleksandra
41608c4c34 Run codegen tasks after installing dependecies in the new command (#3692) 2022-08-08 17:57:39 +02:00
Aleksandra
70b334a2f7 Remove trailing comma from tsconfig.json in new app template (#3687) 2022-08-08 12:12:18 +02:00
Dillon Raphael
f0ca738d56 Run the codegen tasks on blitz dev (#3683) 2022-08-05 19:13:45 +02:00
github-actions[bot]
1010858446 Version Packages (alpha) (#3680)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-05 15:44:22 +02:00
Dillon Raphael
ebd74b4e97 Fix template path for the generator (#3679) 2022-08-05 15:35:31 +02:00
Aleksandra
8870580710 Utilities cleanup (#3677) 2022-08-05 14:42:25 +02:00
github-actions[bot]
414d758fe8 Version Packages (alpha) (#3653)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-05 00:04:16 +02:00
Blitz.js Bot
fce0f3135a (meta) added @chaiwattsw as contributor 2022-08-04 17:57:34 -04:00
Chaiwat Trisuwan
9620ef6b1e chore: move zod to devDependencies (#3674) 2022-08-04 23:57:29 +02:00
Dillon Raphael
240f3f3471 exports BlitzServerMiddleware util function (#3671) 2022-08-04 18:54:40 +02:00
Dillon Raphael
91aa535632 Include .env.test to generator templates (#3672)
* adds env test file to generator templates
2022-08-04 18:43:13 +02:00
Aleksandra
ccb1af8d08 Avoid Next's invalid config detected warnings by deleting "blitz" key from the config object (#3670) 2022-08-04 13:21:50 +02:00
Dillon Raphael
807a2b5645 removes peer dependencies and adds to build externals (#3667) 2022-08-04 01:51:13 +02:00
Dillon Raphael
a3e6c49c4d Fixes the supports-color warning for pnpm (#3666)
* add supports-color to package.json
2022-08-04 01:13:33 +02:00
Aleksandra
4d7d126d9c Run prisma generate as a blitz codegen step (#3662) 2022-08-03 18:02:03 +02:00
Aleksandra
890b0c0c9d various blitz new fixes and improvements (#3661) 2022-08-03 12:46:00 +02:00
Dillon Raphael
928e840b59 Fixes loading production env variables by default for blitz build command (#3659) 2022-08-03 01:21:58 +02:00
Dillon Raphael
55b1cb2044 runs codegen on build & remove stopWatcher console log (#3658) 2022-08-03 01:07:44 +02:00
Blitz.js Bot
3a6677b307 (meta) updated @dillonraphael contributions 2022-08-02 16:19:49 -04:00
Dillon Raphael
f202aac183 fixes mock in forgotPassword mutation test & uses hardcoded blitz package versions instead of the alpha tag (#3655) 2022-08-02 22:19:43 +02:00
Aleksandra
065db256d7 Update generator templates to use resolver function (#3652) 2022-08-02 14:49:31 +02:00
github-actions[bot]
ada5cac7e3 Version Packages (alpha) (#3650)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-08-02 11:02:12 +02:00
Blitz.js Bot
e286bcb3ff (meta) added @datner as contributor 2022-08-02 04:57:42 -04:00
Datner
dd5f51744f Move enchancePrisma to a browser entrypoint (#3609)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-08-02 10:57:37 +02:00
github-actions[bot]
99b054a44a Version Packages (alpha) (#3645)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-01 13:11:24 +02:00
Aleksandra
54db8a46dd Comment out version check until it's fixed & fix missing value in pkg manager options (#3647) 2022-08-01 13:01:56 +02:00
Blitz.js Bot
6125eb7837 (meta) added @tommywong-dev as contributor 2022-08-01 05:08:00 -04:00
Dillon Raphael
62bf12b5c6 Update how cli checks if isInternalBlitzMonorepoDevelopment for codegen (#3644)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-08-01 11:03:19 +02:00
github-actions[bot]
8e4580a446 Version Packages (alpha) (#3642)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-30 21:03:36 +02:00
Fran Zekan
f52ca398ee Upgrade React-Query to V4 (#3557) 2022-07-30 20:59:38 +02:00
github-actions[bot]
922bc276d9 Version Packages (alpha) (#3638)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-29 19:58:38 +02:00
Dillon Raphael
365e67094c Fixes db seed command (#3639)
* require db.default in db runSeed cli command
2022-07-29 19:51:23 +02:00
Dillon Raphael
31d7a6f413 Adds rootDir prefix to tsconfig alias module name mapper (#3634)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-07-29 11:36:43 +02:00
github-actions[bot]
8726b16bb9 Version Packages (alpha) (#3632) 2022-07-28 20:06:17 +02:00
Dillon Raphael
240f378b54 passes the correct arguments to runCommandFromBin in blitz cli index (#3631) 2022-07-28 19:57:08 +02:00
github-actions[bot]
d6655f0178 Version Packages (alpha) (#3630)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-07-28 16:23:15 +02:00
Blitz.js Bot
001c174cbf (meta) updated @dillonraphael contributions 2022-07-28 10:18:55 -04:00
Dillon Raphael
1d863f352a Fix APP_ENV not being set before running loadEnvConfig (#3629)
* rearanges the order of setting --env before loading envConfig
2022-07-28 16:16:19 +02:00
Blitz.js Bot
a36110171a (meta) added @sherryxiao1988 as contributor 2022-07-27 13:29:50 -04:00
github-actions[bot]
37b5e35e22 Version Packages (alpha) (#3622)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-27 18:51:31 +02:00
beerose
3b213a35b0 Add missing changesets 2022-07-27 18:46:06 +02:00
Marcus Reinhardt
809f6019be Remove debug print (#3616)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-27 18:44:51 +02:00
Aleksandra
a51b1e85e1 Export router-context from blitz-next (#3621) 2022-07-27 18:23:28 +02:00
Blitz.js Bot
a948dbb7b8 (meta) added @ryanwashburne as contributor 2022-07-27 11:08:20 -04:00
github-actions[bot]
4b91c429ca Version Packages (alpha) (#3588)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-26 17:09:46 +02:00
Aleksandra
6ab9db7802 Infer result type in the api handler (#3610) 2022-07-26 17:04:39 +02:00
Blitz.js Bot
d3e6b02ad4 (meta) updated @iojcde contributions 2022-07-26 05:21:37 -04:00
Jeeho Ahn
813365da61 (meta) add @iojcde as contributor (#3606) 2022-07-26 11:21:32 +02:00
Blitz.js Bot
6559c25f71 (meta) added @saadaltabari as contributor 2022-07-25 09:08:44 -04:00
saadaltabari
83b355900b Truncate error messages in passportAuth redirectUri (#3596)
Co-authored-by: Fran Zekan <zekan.fran369@gmail.com>
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-25 15:08:40 +02:00
Fran Zekan
c721c104db Hook up react-query fetch cancellation (#3590)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-07-25 14:57:42 +02:00
Fran Zekan
7e538ba451 Import ErrorComponent as DefaultErrorComponent (#3589)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-25 11:33:38 +02:00
Dillon Raphael
8e00605a86 Codemod: update the error messages based on if it's a babel parse error or an unexpected error (#3593) 2022-07-25 11:15:28 +02:00
Dillon Raphael
dcdcd04055 Various codemod fixes (#3576)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-22 20:55:33 +02:00
Fran Zekan
e339e2fd0a Hoist up react-query (#3585)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-22 20:35:37 +02:00
Brandon Bayer
37e1ec4abc Update README.md messaging (#3577)
* Update README.md

* Update pnpm lock

Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-22 20:23:02 +02:00
github-actions[bot]
718a194891 Version Packages (alpha) (#3583)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-22 20:06:49 +02:00
Fran Zekan
0f18c68d63 Fix prefetching, again... (#3578)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-07-22 18:08:12 +02:00
Aleksandra
3511d5b69b [temporary fix] skip version check until internal issues are resolved (#3584) 2022-07-22 17:05:40 +02:00
Aleksandra
716e188d13 Fix queries/mutations lookup on Windows (#3581) 2022-07-22 16:16:01 +02:00
github-actions[bot]
57a53fa3c2 Version Packages (alpha) (#3561)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-20 14:34:36 +02:00
Fran Zekan
abb1ad5d1c Don't throw error on a missing app/api folder when running codemod (#3568)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-20 08:26:14 +02:00
Brandon Bayer
7096083038 Update CODEOWNERS 2022-07-19 18:29:15 +02:00
Ante Primorac
0ac6e17122 fix blitz not loading custom server (#3564)
* fix blitz not loading custom server
2022-07-19 00:42:14 +02:00
Brandon Bayer
8bcb471a53 Fix auth issue where session token and publicData cookie were updated unnecessarily, leading to potential user logout (#3556)
* fix auth issue where session token and public data token was updated unnecessarily
2022-07-19 00:19:55 +02:00
Brandon Bayer
abe2afccdf Fix a long-standing issue with occasional blitz auth flakiness (#3554)
* fix cookie set bug
2022-07-19 00:06:38 +02:00
Fran Zekan
d9fc5d8e26 Fix queryClient not working the same in SSP and SP (#3563)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-07-18 17:14:53 +02:00
Aleksandra
3f20a47405 Fix delete session type (#3560) 2022-07-18 12:58:03 +02:00
github-actions[bot]
72addbbeed Version Packages (alpha) (#3540)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-18 11:29:22 +02:00
Fran Zekan
1c809094fd Fix Page.authenticate not working for layout components (#3547)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-18 10:39:07 +02:00
Fran Zekan
54a66a95dc Show all blitz packages when running blitz version command (#3553)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-07-18 10:03:44 +02:00
Fran Zekan
8d9ea00e1d Fix prefetching multiple queries causes only the last one to be passed to page (#3551) 2022-07-17 19:28:45 +02:00
Fran Zekan
ab4d9de70f Don't try to copy RPC API endpoint in templates that don't have it (#3545)
* Don't try to copy RPC API endpoint in templates that don't have it
2022-07-17 18:08:08 +02:00
Fran Zekan
8f166a5db0 Check for new versions when running CLI (#3465)
* Simple function to call new on every cli invocation to update blitz

* Fix printing of how to

* Catch network errors

* Cleanup

* Loop through all locally installed and packages and check if an update is needed

* cache checkForLatestVersion so it runs only on every 24 hours

* make update message pretty

* uncomment shouldUpdate boolean

* run checkLatestVersion on dev command and new

* Dont run in our monorepo + small changes

* Create curly-seas-serve.md

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-07-17 01:01:52 +02:00
Datner
df7cee84ad fix(blitz-rpc): fix 6th pipe resolver not returning resolved value (#3537)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-07-15 12:18:00 +02:00
github-actions[bot]
b364af7f57 Version Packages (alpha) (#3516)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-14 16:07:20 +02:00
Fran Zekan
20fc9f80f4 Fix SSP / SP not prefetching queries correctly (#3518)
* Fix prefetchQuery getting key for infinite wrong

* Add new webpack loader to transform resolvers server-side to have _routePath and other meta values

* Fix key error when loading dehydrated props

* Add unit-tests for loader-server-resolvers.ts
2022-07-12 14:41:26 +02:00
Aleksandra
80e1ead7cb Create jest.config.js with new app generator (#3532)
* Create jest.config.js with new app generator
2022-07-12 11:44:36 +02:00
Fran Zekan
a3bbe6ce3f Fix routes manifest showing duplicates for non queries|resolvers reso… (#3531)
* Fix routes manifest showing duplicates for non queries|resolvers resolver type

* Simplify resolverType checking
2022-07-12 11:36:59 +02:00
Fran Zekan
348fd6f5e4 Fix redirectAuthenticatedTo errors (#3529)
* Wrap BlitzProvider from next with RouterContext
2022-07-11 21:47:16 +02:00
Dawid Urbaniak
cacb65d633 fix: fix wrong import of the db module in blitz db seed command function (#3526)
* fix: fix wrong import of the db module
2022-07-11 11:35:08 +02:00
Fran Zekan
f397cc2036 Fix switch case fall-through bug in CLI (#3525)
* Fix redundant if

* Fix switch fallthrough cases

* Extract install map to top

* Create cool-horses-check.md

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-07-11 10:30:03 +02:00
Fran Zekan
ffa7b5ccc2 If project name argument is set to "." change it to current folder name (#3523)
* If project name argument is set to "." change it to current folder name

* Create two-carpets-rhyme.md

Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
2022-07-11 10:22:03 +02:00
Aleksandra
a961aff881 Add missing lint deps (#3515) 2022-07-07 16:45:02 +02:00
github-actions[bot]
ac9c4cebc8 Version Packages (alpha) (#3514)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-07 15:43:57 +02:00
Dillon Raphael
a7e37c58db Export BlitzProvider from blitz-next (#3513)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-07 15:36:52 +02:00
Brandon Bayer
b0d2505a85 Update CODEOWNERS 2022-07-06 23:54:29 +02:00
github-actions[bot]
024cd819e3 Version Packages (alpha) (#3512)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-06 19:25:31 +02:00
Dillon Raphael
12cb7a727d Upgrade Prisma to v4.0.0 (#3511)
* Upgrade Prisma to v4.0.0

* Changeset
2022-07-06 19:21:36 +02:00
github-actions[bot]
923703b661 Version Packages (alpha) (#3510)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-06 18:26:09 +02:00
Dillon Raphael
70f9ae4921 Handle next/dynamic default import in codemod (#3509) 2022-07-06 18:21:45 +02:00
beerose
c738ecacbc Remove --tag option from release script 2022-07-06 17:07:55 +02:00
github-actions[bot]
ad0b087d9f Version Packages (alpha) (#3507)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-06 16:03:29 +02:00
Dillon Raphael
dc694cf1cf remove mounted check from withBlitz (#3504)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-07-06 15:59:18 +02:00
Aleksandra
4c221b655e Tag @blitzjs/rpc and @blitzjs/auth with alpha, update package.json files (#3508) 2022-07-06 13:56:25 +02:00
Aleksandra
c11f0401cf Update Next.js version and addBasePath location (#3506) 2022-07-06 13:14:48 +02:00
github-actions[bot]
830b51d0dc Version Packages (alpha) (#3492)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-04 17:39:14 +02:00
David
bec9512e30 Expand & rename baseResolverPath (#3421)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-07-04 17:35:36 +02:00
Dillon Raphael
1493729d6b forked changesets action 2022-07-04 16:48:30 +02:00
Dillon Raphael
6bb5980da9 revert changesets action version 2022-07-04 15:44:21 +02:00
Dillon Raphael
7310f7171d use forked changesets github action 2022-07-04 15:32:28 +02:00
github-actions[bot]
d855ee3e1d Version Packages (alpha) (#3487)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-04 13:29:42 +02:00
Aleksandra
93851d90ca Handle duplicated imports with Blitz codemod (#3486) 2022-07-04 13:25:44 +02:00
beerose
3ab05b3cda Update pnpm-lock.yaml 2022-07-01 17:07:36 +02:00
github-actions[bot]
bb3dd56f7a Version Packages (alpha) (#3482)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-01 17:06:10 +02:00
Aleksandra
1d9804a610 remove references to the logging package (#3474) 2022-07-01 17:01:41 +02:00
Aleksandra
0fd1f9c9b1 Revert codemod changes (#3483) 2022-07-01 16:10:28 +02:00
Aleksandra
b86b569d56 Remove as any assertion for the PrismaStorage argument (#3481) 2022-07-01 16:04:58 +02:00
Aleksandra
b405c1e876 Add missing _document and 404 pages to the templates (#3480) 2022-07-01 12:44:37 +02:00
Dillon Raphael
c957828ea6 remove release-drafter 2022-06-30 11:54:31 +02:00
Dillon Raphael
c78e5c4704 set config name in release action 2022-06-30 11:47:58 +02:00
Dillon Raphael
009664e0f5 Merge branch 'main' of github.com:blitz-js/blitz 2022-06-30 11:33:42 +02:00
Dillon Raphael
3110522dca release drafter template 2022-06-30 11:33:32 +02:00
github-actions[bot]
7269ac2bc5 Version Packages (alpha) (#3472)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-30 11:09:25 +02:00
Datner
7a7ce2229e Add middleware integration tests (#3411)
* Set up middleware integration test application

* Add middleware integration test

* Update pnpm lock

Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-06-30 11:05:30 +02:00
Dillon Raphael
10c23d3d20 Merge branch 'main' of github.com:blitz-js/blitz 2022-06-29 13:03:54 +02:00
Dillon Raphael
d93b05d0ac Add github release template 2022-06-29 13:03:41 +02:00
Dillon Raphael
aafdc5b4c4 Codemod: Move middlewares from blitz config to blitz server (#3471)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-06-29 12:52:56 +02:00
Dillon Raphael
37ef42811b Merge branch 'main' of github.com:blitz-js/blitz 2022-06-29 12:24:44 +02:00
Dillon Raphael
34cc29e40c Turn off auto github releases 2022-06-29 12:24:26 +02:00
Fran Zekan
bee19a259d Hook up onError function for rpc server and next (#3460)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-06-29 12:18:22 +02:00
Fran Zekan
9ada0f6661 Allow customizing PreviewData in gSSP (#3461) 2022-06-29 11:42:41 +02:00
Dillon Raphael
425559d360 pnpm install without frozen lockfile for github release action 2022-06-29 10:40:12 +02:00
Dillon Raphael
0411689b1d pnpmlock 2022-06-26 06:28:07 -04:00
github-actions[bot]
0d3514cd27 Version Packages (alpha) (#3464)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-26 06:18:37 -04:00
Dillon Raphael
a9edde6d83 pnpmlock 2022-06-26 06:05:38 -04:00
Dillon Raphael
5c5decbce2 Remove suspense wrapper from withBlitz (#3463)
* remove suspense wrapper

* changeset
2022-06-26 06:02:45 -04:00
beerose
e476beba39 Update pnpm-lock.yaml 2022-06-23 17:00:27 +02:00
github-actions[bot]
1a1b23a7e8 Version Packages (alpha) (#3459)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-23 16:59:54 +02:00
Fran Zekan
ae0b714f69 Expanding types for GetServerSideProps (#3457)
Co-authored-by: beerose <alexsandra.sikora@gmail.com>
2022-06-23 16:56:41 +02:00
Aleksandra
7817fe3a85 Add missing RouteUrlObject on Page.authenticate.redirectTo (#3458) 2022-06-23 16:45:27 +02:00
beerose
30bb474abb Update pnpm-lock.yaml 2022-06-23 13:32:30 +02:00
github-actions[bot]
135b30efde Version Packages (alpha) (#3456)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-23 13:31:59 +02:00
Aleksandra
527e48ac3e Fix running bin commands with Blitz CLI (#3455) 2022-06-23 13:29:22 +02:00
beerose
b905270875 Update pnpm-lock.yaml 2022-06-23 12:56:21 +02:00
github-actions[bot]
96ea5291e4 Version Packages (alpha) (#3454)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-23 12:54:23 +02:00
Aleksandra
9c2e7d372c Import useRouter form next/router in useParams.tsx (#3453) 2022-06-23 12:47:01 +02:00
beerose
493d505b24 Update pnpm-lock 2022-06-22 12:12:57 +02:00
github-actions[bot]
09da992bef Version Packages (alpha) (#3450)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-22 12:11:54 +02:00
Dillon Raphael
bbac7906e8 fix codemod for wrapping \_app arrow function and nested pages directory (#3443)
Co-authored-by: Aleksandra <alexsandra.sikora@gmail.com>
2022-06-22 10:55:35 +02:00
Dillon Raphael
21ca3a9b02 pnpmlock 2022-06-21 10:27:09 -04:00
github-actions[bot]
32274803d9 Version Packages (alpha) (#3449)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-21 10:25:53 -04:00
Dillon Raphael
9ded8dacba Export useParam & useParams from @blitzjs/next (#3448) 2022-06-21 14:45:29 +02:00
1028 changed files with 48903 additions and 9026 deletions

View File

@@ -970,7 +970,9 @@
"avatar_url": "https://avatars0.githubusercontent.com/u/3496193?v=4",
"profile": "https://twitter.com/dillonraphael",
"contributions": [
"code"
"code",
"doc",
"test"
]
},
{
@@ -2312,7 +2314,9 @@
"avatar_url": "https://avatars.githubusercontent.com/u/32314?v=4",
"profile": "https://macwright.com/",
"contributions": [
"doc"
"doc",
"test",
"code"
]
},
{
@@ -2909,7 +2913,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/120626?v=4",
"profile": "https://github.com/medihack",
"contributions": [
"doc"
"doc",
"code"
]
},
{
@@ -2936,7 +2941,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/230500?v=4",
"profile": "https://github.com/bravo-kernel",
"contributions": [
"code"
"code",
"doc"
]
},
{
@@ -3590,6 +3596,444 @@
"contributions": [
"doc"
]
},
{
"login": "saadaltabari",
"name": "saadaltabari",
"avatar_url": "https://avatars.githubusercontent.com/u/29986512?v=4",
"profile": "https://github.com/saadaltabari",
"contributions": [
"doc",
"code"
]
},
{
"login": "iojcde",
"name": "Jeeho Ahn",
"avatar_url": "https://avatars.githubusercontent.com/u/31413538?v=4",
"profile": "https://github.com/iojcde",
"contributions": [
"doc",
"tool",
"code"
]
},
{
"login": "ryanwashburne",
"name": "Ryan Washburne",
"avatar_url": "https://avatars.githubusercontent.com/u/12566087?v=4",
"profile": "https://linkedin.com/in/ryanwashburne",
"contributions": [
"doc"
]
},
{
"login": "sherryxiao1988",
"name": "Shundan Xiao",
"avatar_url": "https://avatars.githubusercontent.com/u/1202426?v=4",
"profile": "https://github.com/sherryxiao1988",
"contributions": [
"doc"
]
},
{
"login": "tommywong-dev",
"name": "tommywong-dev",
"avatar_url": "https://avatars.githubusercontent.com/u/79971095?v=4",
"profile": "https://github.com/tommywong-dev",
"contributions": [
"doc"
]
},
{
"login": "datner",
"name": "Datner",
"avatar_url": "https://avatars.githubusercontent.com/u/22598347?v=4",
"profile": "https://github.com/datner",
"contributions": [
"doc",
"code"
]
},
{
"login": "chaiwattsw",
"name": "Chaiwat Trisuwan",
"avatar_url": "https://avatars.githubusercontent.com/u/30198386?v=4",
"profile": "https://chaiwattsw.com/",
"contributions": [
"doc",
"code"
]
},
{
"login": "oltdaniel",
"name": "Daniel Oltmanns",
"avatar_url": "https://avatars.githubusercontent.com/u/53529846?v=4",
"profile": "oltdaniel.eu",
"contributions": [
"doc",
"code"
]
},
{
"login": "edrickleong",
"name": "Edrick Leong",
"avatar_url": "https://avatars.githubusercontent.com/u/10529706?v=4",
"profile": "https://github.com/edrickleong",
"contributions": [
"doc",
"code",
"test"
]
},
{
"login": "siddhsuresh",
"name": "Siddharth Suresh",
"avatar_url": "https://avatars.githubusercontent.com/u/83594610?v=4",
"profile": "https://github.com/siddhsuresh",
"contributions": [
"doc",
"code",
"test",
"maintenance"
]
},
{
"login": "orionmiz",
"name": "JH.Lee",
"avatar_url": "https://avatars.githubusercontent.com/u/39466936?v=4",
"profile": "http://jins.dev",
"contributions": [
"code",
"test",
"maintenance",
"doc"
]
},
{
"login": "corydeppen",
"name": "Cory Deppen",
"avatar_url": "https://avatars.githubusercontent.com/u/313264?v=4",
"profile": "https://github.com/corydeppen",
"contributions": [
"doc"
]
},
{
"login": "oloost",
"name": "oloost",
"avatar_url": "https://avatars.githubusercontent.com/u/72395941?v=4",
"profile": "https://github.com/oloost",
"contributions": [
"doc"
]
},
{
"login": "janvennemann",
"name": "Jan Vennemann",
"avatar_url": "https://avatars.githubusercontent.com/u/1406024?v=4",
"profile": "https://github.com/janvennemann",
"contributions": [
"doc",
"code"
]
},
{
"login": "joneskj55",
"name": "Kevin Jones",
"avatar_url": "https://avatars.githubusercontent.com/u/20748598?v=4",
"profile": "https://kevinjones.engineer",
"contributions": [
"doc"
]
},
{
"login": "paulm17",
"name": "Paul",
"avatar_url": "https://avatars.githubusercontent.com/u/387463?v=4",
"profile": "https://github.com/paulm17",
"contributions": [
"doc",
"code",
"test"
]
},
{
"login": "selcukfatihsevinc",
"name": "Selçuk Fatih Sevinç",
"avatar_url": "https://avatars.githubusercontent.com/u/384836?v=4",
"profile": "https://github.com/selcukfatihsevinc",
"contributions": [
"doc",
"code"
]
},
{
"login": "usamaster",
"name": "usamaster",
"avatar_url": "https://avatars.githubusercontent.com/u/5255330?v=4",
"profile": "https://github.com/usamaster",
"contributions": [
"doc"
]
},
{
"login": "a11rew",
"name": "Andrew Glago",
"avatar_url": "https://avatars.githubusercontent.com/u/87580113?v=4",
"profile": "a11rew.dev",
"contributions": [
"doc",
"code"
]
},
{
"login": "tordans",
"name": "Tobias",
"avatar_url": "https://avatars.githubusercontent.com/u/111561?v=4",
"profile": "http://tobiasjordans.de",
"contributions": [
"code",
"doc",
"test"
]
},
{
"login": "iagormoraes",
"name": "Iagor Moraes",
"avatar_url": "https://avatars.githubusercontent.com/u/13892132?v=4",
"profile": "https://www.linkedin.com/in/iagor-moraes/",
"contributions": [
"doc",
"code"
]
},
{
"login": "Trancever",
"name": "Dawid Urbaniak",
"avatar_url": "https://avatars.githubusercontent.com/u/18584155?v=4",
"profile": "https://twitter.com/trensik",
"contributions": [
"doc",
"code"
]
},
{
"login": "jhonnymichel",
"name": "Jhonny Michel",
"avatar_url": "https://avatars.githubusercontent.com/u/7006387?v=4",
"profile": "https://github.com/jhonnymichel",
"contributions": [
"doc",
"code",
"test"
]
},
{
"login": "sweetliquid",
"name": "sweetliquid",
"avatar_url": "https://avatars.githubusercontent.com/u/18693190?v=4",
"profile": "sweetliquid.me",
"contributions": [
"code"
]
},
{
"login": "exKAZUu",
"name": "Sakamoto, Kazunori",
"avatar_url": "https://avatars.githubusercontent.com/u/436237?v=4",
"profile": "https://github.com/exKAZUu",
"contributions": [
"doc",
"code"
]
},
{
"login": "jeliasson",
"name": "Johan Eliasson",
"avatar_url": "https://avatars.githubusercontent.com/u/865493?v=4",
"profile": "https://github.com/jeliasson",
"contributions": [
"doc"
]
},
{
"login": "jafarlihi",
"name": "Hikmat Jafarli",
"avatar_url": "https://avatars.githubusercontent.com/u/43515211?v=4",
"profile": "https://github.com/jafarlihi",
"contributions": [
"doc",
"code"
]
},
{
"login": "maotora",
"name": "Maotora ᕙ(⇀‸↼‶)ᕗ",
"avatar_url": "https://avatars.githubusercontent.com/u/5174884?v=4",
"profile": "https://maotoramm.com",
"contributions": [
"doc",
"code"
]
},
{
"login": "vitaliemiron",
"name": "Vitalie",
"avatar_url": "https://avatars.githubusercontent.com/u/45145592?v=4",
"profile": "https://github.com/vitaliemiron",
"contributions": [
"doc",
"code"
]
},
{
"login": "nelsonmestevao",
"name": "Nelson Estevão",
"avatar_url": "https://avatars.githubusercontent.com/u/19409687?v=4",
"profile": "https://estevao.org",
"contributions": [
"doc",
"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"
]
},
{
"login": "rodobre",
"name": "rodobre",
"avatar_url": "https://avatars.githubusercontent.com/u/52138375?v=4",
"profile": "https://github.com/rodobre",
"contributions": [
"doc",
"code"
]
},
{
"login": "Zamfi99",
"name": "Zamfira Costin-Andrei",
"avatar_url": "https://avatars.githubusercontent.com/u/19189337?v=4",
"profile": "https://github.com/Zamfi99",
"contributions": [
"doc",
"code"
]
},
{
"login": "potikhanovsergey",
"name": "Sergey",
"avatar_url": "https://avatars.githubusercontent.com/u/71494201?v=4",
"profile": "https://github.com/potikhanovsergey",
"contributions": [
"doc"
]
},
{
"login": "papsavas",
"name": "Savvas Papageorgiadis",
"avatar_url": "https://avatars.githubusercontent.com/u/50584606?v=4",
"profile": "https://github.com/papsavas",
"contributions": [
"doc",
"code"
]
},
{
"login": "LeonMueller-OneAndOnly",
"name": "Leonidas",
"avatar_url": "https://avatars.githubusercontent.com/u/77194479?v=4",
"profile": "https://flow-office.eu/",
"contributions": [
"doc",
"code"
]
},
{
"login": "Doc0x1",
"name": "Doc0x1",
"avatar_url": "https://avatars.githubusercontent.com/u/19937034?v=4",
"profile": "https://hacknex.us",
"contributions": [
"doc",
"code"
]
}
],
"contributorsPerLine": 7,

View File

@@ -1,6 +0,0 @@
---
"@blitzjs/next": patch
"@blitzjs/generator": patch
---
add mounted check inside withBlitz

View File

@@ -1,7 +0,0 @@
---
"blitz": patch
"@blitzjs/next": patch
"@blitzjs/generator": patch
---
Fix codegen and postinstall to make work with pnpm

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/rpc": patch
---
Add queryClient to RPC Plugin exports

View File

@@ -7,5 +7,5 @@
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["web", "test-*", "toolkit-app"]
"ignore": ["web", "test-*", "toolkit-*", "@blitzjs/recipe-*"]
}

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/rpc": patch
---
Add invokeWithCtx function

View File

@@ -1,6 +0,0 @@
---
"blitz": patch
"@blitzjs/generator": patch
---
Use alpha version for blitz dependency, fix package manager selection

View File

@@ -1,6 +0,0 @@
---
"@blitzjs/codemod": patch
"@blitzjs/generator": patch
---
codemod fixes

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/generator": patch
---
fix app generator for pnpm unmet dependency

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/next": patch
---
added superjson

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/generator": patch
---
updated nextjs version in generator & npmrc file

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
Export Zod utils from blitz core package

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
set default enviornment variable to development unless build and start command

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/next": patch
---
export BlitzPage & BlitzLayout types from @blitzjs/next

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/codemod": patch
---
Update queryClient import in codemod

View File

@@ -1,9 +0,0 @@
---
"blitz": patch
"@blitzjs/next": patch
"@blitzjs/auth": patch
"@blitzjs/rpc": patch
"@blitzjs/generator": patch
---
fix route manifest codegen

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/generator": patch
---
Update codemod and template with a new queryClient import location

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
detailed print env info

View File

@@ -1,6 +0,0 @@
---
"@blitzjs/next": patch
"@blitzjs/generator": patch
---
Upgrade @types/react, fix typings inside @blitzjs/next

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
fix broken cli versioning

View File

@@ -1,7 +0,0 @@
---
"blitz": patch
"@blitzjs/auth": patch
"@blitzjs/next": patch
---
rename middleware type for blitz server plugin

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/next": patch
---
Support `prefetchBlitzQuery` in gSSP and gSP

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
test automated publish

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/generator": patch
---
add mounted check to app generator template

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
downgrade pkg-dir to non-esm only version

View File

@@ -1,9 +0,0 @@
---
"blitz": patch
"@blitzjs/auth": patch
"@blitzjs/next": patch
"@blitzjs/rpc": patch
"@blitzjs/generator": patch
---
initial publish

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/codemod": patch
---
Fix templates source in RPC codemod step

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/codemod": patch
---
Add codemod to upgrade from legacy framework to the Blitz Toolkit

View File

@@ -1,11 +0,0 @@
---
"blitz": patch
"@blitzjs/next": patch
"@blitzjs/generator": patch
---
- Add mounted check to withBlitz
- Upgrade @types/react, fix typings inside @blitzjs/next
- Support prefetchBlitzQuery in gSP and gSSP
- Add db seed cli command
- Add try/catch to changePassword mutation

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/generator": patch
---
fix generator npm package dist

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
add `db seed` cli command

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/next": patch
---
Setup SuperJson for GSSP and GSP

View File

@@ -1,77 +0,0 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"web": "0.0.0",
"test-auth": "0.0.0",
"test-rpc": "0.0.0",
"test-utils": "0.0.0",
"blitz": "2.0.0-alpha.0",
"@blitzjs/auth": "2.0.0-alpha.0",
"@blitzjs/next": "2.0.0-alpha.0",
"@blitzjs/rpc": "2.0.0-alpha.0",
"@blitzjs/config": "0.0.0",
"@blitzjs/generator": "2.0.0-alpha.0",
"@blitzjs/codemod": "2.0.0-alpha.0",
"template": "0.0.0",
"toolkit-app": "1.0.0",
"test-qm": "0.0.0",
"test-no-suspense": "0.0.0",
"test-trailing-slash": "0.0.0"
},
"changesets": [
"big-phones-bow",
"breezy-cameras-double",
"bright-mangos-run",
"cool-doors-invent",
"dirty-monkeys-greet",
"eleven-humans-sort",
"empty-berries-rule",
"fair-wombats-sneeze",
"famous-kings-explain",
"fast-trainers-kneel",
"flat-bees-approve",
"four-meals-fry",
"gentle-dogs-reply",
"great-months-train",
"green-papayas-do",
"healthy-rice-shout",
"hot-drinks-approve",
"lovely-colts-share",
"lucky-cows-try",
"modern-cameras-pull",
"moody-squids-cheer",
"nice-starfishes-live",
"nine-onions-admire",
"ninety-pets-heal",
"olive-bees-buy",
"olive-feet-rhyme",
"plenty-bottles-swim",
"poor-peas-lick",
"poor-penguins-look",
"poor-shrimps-think",
"purple-singers-greet",
"quiet-feet-travel",
"rich-chairs-invent",
"sharp-falcons-begin",
"shy-olives-hang",
"silent-colts-reply",
"small-socks-confess",
"stupid-walls-sell",
"swift-drinks-dress",
"tame-keys-reply",
"tasty-news-collect",
"ten-rivers-burn",
"tender-pianos-check",
"thick-parrots-float",
"thirty-countries-build",
"twenty-beans-pump",
"two-kiwis-help",
"unlucky-papayas-sleep",
"violet-bags-leave",
"violet-lions-help",
"weak-suns-shave",
"wicked-ghosts-cough",
"wise-frogs-give"
]
}

View File

@@ -1,7 +0,0 @@
---
"@blitzjs/rpc": patch
"@blitzjs/codemod": patch
"@blitzjs/generator": patch
---
getQueryClient function & queryClient codemod updates & shared plugin config

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/generator": patch
---
fix source path for templates

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/next": patch
---
Rename prefetchBlitzQuery to prefetchQuery, add prefetchInfiniteQuery

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/generator": patch
---
Use routes manifest in template app

View File

@@ -1,6 +0,0 @@
---
"@blitzjs/rpc": patch
"@blitzjs/generator": patch
---
Update RPC plugin setup in templates

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
added index.cjs to blitz externals

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/auth": patch
---
Add passport adapter to @blitzjs/auth

View File

@@ -1,8 +0,0 @@
---
"blitz": patch
"@blitzjs/auth": patch
"@blitzjs/next": patch
"@blitzjs/rpc": patch
---
testing set dist-tag

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/next": patch
---
Fix postinstall script not being found

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
Add aliases for Blitz CLI commands

View File

@@ -1,6 +0,0 @@
---
"blitz": patch
"@blitzjs/codemod": patch
---
init codemod generator

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
fix more cli problems

View File

@@ -1,7 +0,0 @@
---
"blitz": patch
"@blitzjs/next": patch
"@blitzjs/generator": patch
---
various improvements and fixes

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/codemod": patch
---
allow extension catch in getAllFiles codemod util

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
add @blitzjs/generator as external

View File

@@ -1,10 +0,0 @@
---
"blitz": patch
"@blitzjs/auth": patch
"@blitzjs/next": patch
"@blitzjs/rpc": patch
"@blitzjs/config": patch
"@blitzjs/generator": patch
---
new app template

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
fix generate cli command

View File

@@ -1,5 +0,0 @@
---
"blitz": patch
---
remove console logs inside onPostInstall in the new cli command

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/codemod": patch
---
Update templates directory for codemod

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/rpc": patch
---
Add resolverBasePath to Blitz config to change the way rpc routes are generated

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/next": patch
---
Move blitz config to next.config.js

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/generator": patch
---
fix template sourcepath because of new env variable

View File

@@ -1,5 +0,0 @@
---
"@blitzjs/generator": patch
---
use latest tag for generator template on rpc & auth packages

4
.github/CODEOWNERS vendored
View File

@@ -1,5 +1,5 @@
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
* @flybayer @beerose
* @flybayer
packages/generator/templates**/* @flybayer
# packages/generator/templates**/* @flybayer

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))

26
.github/workflows/changeset_check.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Changeset
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changeset:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changeset') && github.event.pull_request.merged == false }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
- name: Check if changeset is added
run: |
npx @changesets/cli@2.12.0 status --since=origin/${GITHUB_BASE_REF}

View File

@@ -1,5 +1,3 @@
# https://github.com/vercel/next.js/commits/canary/.github/workflows/build_test_deploy.yml
name: CI
on:
@@ -10,29 +8,155 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.5
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 18
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpm manypkg check
- name: Build
run: pnpm build
- name: Lint
run: pnpm lint
build:
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.5
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 18
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Build Apps
run: pnpm build:apps
Unit-Tests:
name: "Unit Test: ${{ matrix.os }} (node@16)"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
node_version:
- 16
name: Node ${{ matrix.node_version }} - ${{ matrix.os }}
- windows-latest
fail-fast: false
env:
NODE_VERSION: 18
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
- name: Checkout
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.4
with:
version: 6.32.6
- name: Setup node
version: 8.6.5
- name: Setup node@16
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
node-version: 18
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm manypkg check
- run: pnpm build
- run: pnpm lint
- run: pnpm build:apps
- run: pnpm test
- name: Install dependencies
run: pnpm install --frozen-lockfile
shell: bash
- name: Build
run: pnpm build
shell: bash
- name: Test Packages
run: pnpm test -- --filter=./packages/*
shell: bash
- name: Test Apps
run: pnpm test -- --filter=./apps/*
shell: bash
find-integration-tests:
name: "Find Integration Tests"
runs-on: ubuntu-latest
outputs:
folders: ${{ steps.set-matrix.outputs.folders }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
name: "Find all folders"
shell: bash
run: |
cd ./integration-tests
tree -J -d -L 1 | jq -c '.[0].contents | map(.name | tostring) | map(select(. != "utils"))'
folders=$(tree -J -d -L 1 | jq -c '.[0].contents | map(.name | tostring) | map(select(. != "utils"))')
echo "folders=$folders" >> $GITHUB_OUTPUT
Integration-Tests:
name: "Integration Test: ${{matrix.folder}} @ ${{ matrix.os }}"
needs: [find-integration-tests]
strategy:
matrix:
folder: ${{fromJSON(needs.find-integration-tests.outputs.folders)}}
os:
- ubuntu-latest
- windows-latest
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- run: echo ${{matrix.folder}}
- name: Checkout
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
uses: actions/checkout@v3
- name: Setup PNPM
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
uses: pnpm/action-setup@v2.2.4
with:
version: 8.6.5
- name: Setup node@18
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
uses: actions/setup-node@v2
with:
node-version: 18
cache: "pnpm"
- name: Install dependencies
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
run: pnpm install --frozen-lockfile
shell: bash
- name: Install playwright
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
run: |
pnpx playwright@1.28.0 install --with-deps
shell: bash
- name: Build
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
run: pnpm build
shell: bash
- name: Test Packages
if: matrix.folder != 'next-13-app-dir' || matrix.os != 'windows-latest'
run: pnpm test -- --filter=./integration-tests/${{matrix.folder}}
shell: bash

100
.github/workflows/pr-release.yml vendored Normal file
View File

@@ -0,0 +1,100 @@
# https://github.com/withastro/astro/blob/main/.github/workflows/snapshot-release.yml
name: Create a Snapshot Release
on:
issue_comment:
types: [created]
defaults:
run:
shell: bash
jobs:
snapshot-release:
name: Create a snapshot release of a pull request
if: ${{ github.repository_owner == 'blitz-js' && github.event.issue.pull_request && startsWith(github.event.comment.body, '!preview') }}
runs-on: ubuntu-latest
steps:
- name: "Check if user has admin access (only admins can publish snapshot releases)."
uses: "lannonbr/repo-permission-check-action@2.0.0"
with:
permission: "admin"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: resolve pr refs
id: refs
uses: eficode/resolve-pr-refs@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
with:
ref: ${{ steps.refs.outputs.head_ref }}
- name: Setup PNPM
uses: pnpm/action-setup@v2.2.1
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- name: Short SHA
id: vars
run: echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_OUTPUT
- name: Extract the snapshot name from comment body
id: getSnapshotName
uses: actions/github-script@v6
with:
script: |
const splitComment = context.payload.comment.body.split(' ');
if(splitComment.length !== 2) {
return "${{ steps.vars.outputs.sha_short }}";
}
return splitComment[1].trim();
result-encoding: string
- name: Install dependencies
run: pnpm install
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- name: Build Packages
run: pnpm run build
- name: Bump Package Versions
id: changesets
run: |
pnpm changeset version --snapshot ${{ steps.getSnapshotName.outputs.result }} > changesets.output.txt 2>&1
echo ::set-output name=result::`cat changesets.output.txt`
env:
# Needs access to run the script
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Release
id: publish
run: |
pnpm run release --tag next--${{ steps.getSnapshotName.outputs.result }} > publish.output.txt 2>&1
echo ::set-output name=result::`cat publish.output.txt`
env:
# Needs access to publish to npm
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Pull Request Notification
uses: actions/github-script@v6
env:
MESSAGE: ${{ steps.publish.outputs.result }}
with:
script: |
console.log(process.env.MESSAGE);
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Snapshot Release ${{steps.getSnapshotName.outputs.result}}`
})

View File

@@ -7,9 +7,15 @@ on:
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: read
jobs:
release:
name: Release
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
@@ -32,13 +38,21 @@ jobs:
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.32.6
- run: pnpm install --frozen-lockfile
- run: pnpm install --no-frozen-lockfile
- run: pnpm build
- name: Create Release Pull Request
uses: changesets/action@v1
uses: blitz-js/changesets-action@main
with:
publish: pnpm release
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Github Release
# uses: release-drafter/release-drafter@v5.19.0
# with:
# config-name: release-drafter.yml
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

7
.gitignore vendored
View File

@@ -48,13 +48,13 @@ tsconfig.tsbuildinfo
.next
dist
.now
# local env files
**/.env.local
**/.env.*.local
**/.envrc
.blitz-*
.blitz-cli-cache
.vscode
.tsbuildinfo
.nvmrc
**/.test*
@@ -65,7 +65,6 @@ db.sqlite-journal
**/db/db.sqlite
test/integration/**/db.json
test/**/*/out
test/**/blitz-env.d.ts
examples/**/blitz-env.d.ts
test/**/next-env.d.ts
examples/**/next-env.d.ts
.blitz**

View File

@@ -2,5 +2,5 @@
. "$(dirname "$0")/_/husky.sh"
pnpm manypkg check
pnpm lint
# pnpm lint
pnpm pretty-quick --staged

5
.kodiak.toml Normal file
View File

@@ -0,0 +1,5 @@
# .kodiak.toml
# Minimal config. version is the only required field.
version = 1
merge.automerge_label = "0 - <(^_^)> - merge it! ✌️"
approve.auto_approve_usernames = ["flybayer", "depfu"]

3
.npmrc
View File

@@ -1,4 +1,5 @@
save-exact=true
dedupe-peer-dependents=true
strict-peer-dependencies=false
public-hoist-pattern[]=secure-password
@@ -6,4 +7,4 @@ public-hoist-pattern[]=*types*
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=@prettier/plugin-*
public-hoist-pattern[]=*prettier-plugin-*
strict-peer-dependencies=false

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}

186
README.md
View File

@@ -6,9 +6,9 @@
<img alt="" src="https://img.shields.io/badge/Join%20our%20community-6700EB.svg?style=for-the-badge&labelColor=000000&logoWidth=20&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQ9SURBVHgB7d3dVdtAEIbhcSpICUoH0IEogQqSVBBSAU4FSSpIOoAORAfQgSghHXzZ1U/YcMD4R9rZmf2ec3y448LyiNf27iLiGIAmPLrweC9Un3DhrzG6EarLNP09nlwJ1SOZ/lQr5N80/S/p2QMVCBf5N17XCfm1Y/rBHqjAG9PPHvBsz+mf9WAP+HLA9M/YA14cOP2payH7jpj+VCtk1wnTP+vj7xCy6cTpn7EHLMLp059iD1iD8eveJbVCNsSLheX1YA/YgOWnf8YeKB3Wmf7Ud6Fy4f/FHmtpxbl3YlC4MJ/Cj0bWdwPnPbARg+L0S54XQHS32WwuxClzd4CM0z9rPfeAuTtA5ulPXYQ7wZ04Y+oOoDD9KZc9YOoOoDj9s4dwFzgXR6w1wIPoOvPWA9buAHEJ173o3gWiy3AnuBUHLEbgmYwvAk1/wuM8vAgexThzbwPDkx7/DHwVXfFOxP2GmsKd4Ab6zPeAyU8CI7AHFmH2BRCBPXAyk18GzUrqAXCTiR4ssyj0VFw/oCU8+e+RZ33AWz6KMaYbIIWxB+JSLs1bsbkeMN0AqakHvoku9oA2sAfqBvbAQdw0QArsgb25aYBUQT3QgT2gB+yBuqGcHij2UCqXDZACe2Anlw2QYg/QAOyBuoE98CL3DZDCuK4/rh/Q7oGL6U+TOvcNkJoijN8X1C48+T+g75eQDrAH/qmqAVJgDwyqaoAUe4AGYA/UDZX3QLUNkEIZPRCd5+6BahsgVUgPROwBTSijB7jpVAvGHriHvmw9wAZ4BpX1ABvgmakHtPcbRuwBTWAPULgAV9D/jKDY9YRvwvgEaurD44uQHvAol7qBW7WKluVtIHiUS7GyvA0s6CiXDnxrpQfsgbqBS7GKk/2jYHCrVlGyfxTMrVo0ALdq1Q3sgSKofh0M9oA61a+D2QM0AHugbmAPqClmSRjK2apVVQ8UsySsoK1aHdgDesCtWnUDeyCrIpeFg1u3sylyWTi3btMA7IG6gT2wuuK3hoE9sKrit4YVslWLPaAN7IG6ocKt2zmY2h4O9sDiTG0PZw/QANy6XTewBxZj9ogYVHy025LMHhEz9cBn0We6B0yfERReBLfhx0/R1YQHPx/QBPbA0VwcEwf2wNFcHBPHHjiem3MC2QPHcXdSaJjA+KfgTPQ8hhfjBzHC40mhlzJ+Xq9lK4a4PCs43AVaGTed5mZq+iOXZwWHi3AnOj2wFWNcnxYe7gTxLtBKHuamP/J+Wnh8a5irB7ZC5Yk9gPX1QuXC+usHWqGyhYvUYR0a7zboUOFCNVhnk0krZAOW7wFOvzXhom2xnEbIHizTA1wEYhWW6YFGyC6c1gOcfg9wfA80Qj7g8B7g9HuCww+haIR8wf49wOn3Cvv9k8tGyC/s7gFOv3fY3QONkH+v9MBWqB7PeqDn9FcIT//kcitUn6kHOu/T/xfWzlQy3dEHhwAAAABJRU5ErkJggg==">
</a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-381-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-425-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/canary/LICENSE">
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/main/LICENSE">
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
</a>
<a aria-label="NPM version" href="https://www.npmjs.com/package/blitz">
@@ -19,25 +19,12 @@
<br>
<h1 align="center">The Fullstack React Framework</h1>
<h5 align="center">"Zero-API" Data Layer — Built on Next.js — Inspired by Ruby on Rails</h3>
<h3 align="center"><a href="https://blitzjs.com/docs/get-started" target="_blank">Read the Documentation</a></h3>
<br>
“Zero-API” data layer **lets you import server code directly into your React components** instead of having to manually add API endpoints and do client-side fetching and caching.
New Blitz apps come with **all the boring stuff already set up for you!** Like ESLint, Prettier, Jest, user sign up, log in, and password reset.
Provides **helpful defaults and conventions** for things like routing, file structure, and authentication while also being extremely flexible.
<h1 align="center">The Missing Fullstack Toolkit for Next.js</h1>
<br>
### Quick Start
You need Node.js 12 or newer
#### Install Blitz
Run `npm install -g blitz` or `yarn global add blitz`
@@ -53,37 +40,8 @@ _You can alternatively use [`npx`](https://www.npmjs.com/package/npx)_
<br><br>
<a aria-label="Bytes Newsletter" href="https://ui.dev/bytes/?r=blitzjs">
<img alt="Bytes Newsletter" src="https://files-8wtskjofb.vercel.app/smarter-16x1.jpg">
</a>
<br><br>
### The Foundational Principles
1. Fullstack & Monolithic
2. API Not Required
3. Convention over Configuration
4. Loose Opinions
5. Easy to Start, Easy to Scale
6. Stability
7. Community over Code
[The Blitz Manifesto](https://blitzjs.com/docs/manifesto) explains these principles in detail.
<br>
### What is Blitz Designed For?
Blitz is designed for tiny to large database-backed applications that have one or more graphical user interfaces.
While we currently only support web, we are pursuing the dream of a single monolithic application that runs on web and mobile with maximum code sharing and minimal boilerplate.
<br>
## Welcome to the Blitz Community 👋
The Blitz community is warm, safe, diverse, inclusive, and fun! LGBTQ+, women, and minorities are especially welcome. Please read our [Code of Conduct](https://blitzjs.com/docs/code-of-conduct).
@@ -108,16 +66,19 @@ Your financial contributions help ensure Blitz continues to be developed and mai
<table>
<tr>
<td><a aria-label="Andreas Asprou" href="https://andreas.fyi">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/andreas.jpg" width="40px"/>
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/andreas.jpg" width="40px"/>
</a></td>
<td><a aria-label="Digas" href="https://digsas.com">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/digsas.svg" width="40px"/>
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/digsas.svg" width="40px"/>
</a></td>
<td><a aria-label="userTrack" href="https://www.usertrack.net/?ref=blitzjs">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/usertrack.png" width="40px"/>
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/usertrack.png" width="40px"/>
</a></td>
<td><a aria-label="MeetKai" href="https://meetkai.com/?ref=blitzjs">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/meetkai.png" width="40px"/>
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/meetkai.png" width="40px"/>
</a></td>
<td><a aria-label="Simon Lammes" href="https://github.com/simon-lammes">
<img alt="" src="https://avatars.githubusercontent.com/u/46446421?v=4" width="40px"/>
</a></td>
</tr>
</table>
@@ -127,15 +88,17 @@ Your financial contributions help ensure Blitz continues to be developed and mai
<table>
<tr>
<td><a aria-label="Render.com" href="https://render.com?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2020">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/render-logo-color2.png" width="200px">
</a></td>
<td><a aria-label="RIT" href="https://rit-inc.co.jp/?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2021">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/rit_logo.png" width="200px">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/rit_logo.png" width="200px">
</a></td>
<td><a aria-label="Boostry" href="https://boostry.co.jp/?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2021">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/boostry.svg" width="200px">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/boostry.svg" width="200px">
</a></td>
<td>
<a aria-label="Byteflow" href="https://byteflow.app/?ref=blitzjs">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/byteflow.png" width="70px">
</a>
</td>
</tr>
</table>
@@ -147,7 +110,7 @@ Your financial contributions help ensure Blitz continues to be developed and mai
<tr>
<td>
<a aria-label="Fauna" href="https://dashboard.fauna.com/accounts/register?utm_source=BlitzJS&utm_medium=sponsorship&utm_campaign=BlitzJS_Sponsorship_2020">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/canary/assets/Fauna_Logo_Blue.png" width="300px">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/Fauna_Logo_Blue.png" width="300px">
</a>
</td>
</tr>
@@ -161,9 +124,15 @@ Your financial contributions help ensure Blitz continues to be developed and mai
### 💎 Diamond Sponsors
<a aria-label="Your Company" href="#">
<img alt="" src="https://dummyimage.com/1000x330/efe8ff/000000.png&text=Your+Logo+Here" width="500px">
</a>
<table>
<tr>
<td>
<a aria-label="Flightcontrol" href="https://www.flightcontrol.dev?ref=blitzjs">
<img alt="" src="https://raw.githubusercontent.com/blitz-js/blitz/main/assets/flightcontrol.png" width="400px">
</a>
</td>
</tr>
</table>
<br>
@@ -173,8 +142,15 @@ Your financial contributions help ensure Blitz continues to be developed and mai
<table>
<tr>
<td align="center"><a href="https://twitter.com/flybayer"><img src="https://avatars3.githubusercontent.com/u/8813276?v=4" width="100px;" alt=""/><br /><sub><b>Brandon Bayer</b></sub></a><br />Creator</td>
<td align="center"><a href="http://aleksandra.codes"><img src="https://avatars.githubusercontent.com/u/9019397?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aleksandra Sikora</b></sub></a><br />Lead Maintainer</td>
<td align="center"><a href="http://twitter.com/dillonraphael"><img src="https://avatars.githubusercontent.com/u/3496193?v=4" width="100px;" alt=""/><br /><sub><b>Dillon Raphael</b></sub></a><br />Senior Maintainer</td>
<td align="center"><a href="http://twitter.com/dillonraphael"><img src="https://avatars.githubusercontent.com/u/3496193?v=4" width="100px;" alt=""/><br /><sub><b>Dillon Raphael</b></sub></a><br /></td>
<td align="center">
<a href="https://siddharthsuresh.vercel.app/">
<img src="https://avatars.githubusercontent.com/u/83594610?v=4" width="100px;" alt="Siddharth Suresh avatar" /><br />
<sub>
<b>Siddharth Suresh</b>
</sub>
</a>
</td>
</tr>
</table>
@@ -193,7 +169,7 @@ _Code ownership, pull request approvals and merging, etc_ (see [Maintainers L2](
<table>
<tr>
<td align="center"><a href="http://simonknott.de"><img src="https://avatars1.githubusercontent.com/u/14912729?v=4" width="100px;" alt=""/><br /><sub><b>Simon Knott</b></sub></a><br />SuperJSON</td>
<td align="center"><a href="https://juanm04.com"><img src="https://avatars0.githubusercontent.com/u/16712703?v=4" width="100px;" alt=""/><br /><sub><b>Juan Martín Seery</b></sub></a><br />Website/Docs</td>
<td align="center"><a href="http://jins.dev"><img src="https://avatars.githubusercontent.com/u/39466936?v=4" width="100px;" alt=""/><br /><sub><b>JH.Lee</b></sub></a><br />SuperJSON</td>
</tr>
</table>
<!-- markdownlint-enable -->
@@ -211,30 +187,6 @@ _Issue triage, pull request triage, community encouragement and moderation, etc_
<table>
<tr>
<td align="center"><a href="http://jeremyliberman.com/"><img src="https://avatars3.githubusercontent.com/u/2754163?v=4" width="100px;" alt=""/><br /><sub><b>Jeremy Liberman</b></td>
<td align="center">
<a href="https://mina.ca">
<img src="https://avatars.githubusercontent.com/mabadir" width="100px;" alt="Mina Abadir avatar" /><br />
<sub>
<b>Mina Abadir</b>
</sub>
</a>
</td>
<td align="center">
<a href="https://builtforfifty.com">
<img src="https://avatars.githubusercontent.com/abuuzayr" width="100px;" alt="Abu Uzayr avatar" /><br />
<sub>
<b>Abu Uzayr</b>
</sub>
</a>
</td>
<td align="center">
<a href="https://damilolarandolph.com/">
<img src="https://avatars.githubusercontent.com/damilolarandolph" width="100px;" alt="Damilola Randolph avatar" /><br />
<sub>
<b>Damilola Randolph</b>
</sub>
</a>
</td>
</tr>
</table>
<!-- markdownlint-enable -->
@@ -379,7 +331,7 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
</tr>
<tr>
<td align="center"><a href="https://github.com/jschepmans"><img src="https://avatars2.githubusercontent.com/u/5782977?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Johan Schepmans</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jschepmans" title="Code">💻</a></td>
<td align="center"><a href="https://twitter.com/dillonraphael"><img src="https://avatars0.githubusercontent.com/u/3496193?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dillon Raphael</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=dillonraphael" title="Code">💻</a></td>
<td align="center"><a href="https://twitter.com/dillonraphael"><img src="https://avatars0.githubusercontent.com/u/3496193?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dillon Raphael</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=dillonraphael" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=dillonraphael" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=dillonraphael" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/clgeoio"><img src="https://avatars2.githubusercontent.com/u/37571416?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cody G</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=clgeoio" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=clgeoio" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/madflow"><img src="https://avatars0.githubusercontent.com/u/183248?v=4?s=100" width="100px;" alt=""/><br /><sub><b>madflow</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=madflow" title="Documentation">📖</a></td>
<td align="center"><a href="https://twitter.com/nitaking_"><img src="https://avatars2.githubusercontent.com/u/10850034?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Satoshi Nitawaki</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=nitaking" title="Code">💻</a> <a href="#maintenance-nitaking" title="Maintenance">🚧</a> <a href="#question-nitaking" title="Answering Questions">💬</a> <a href="https://github.com/blitz-js/blitz/commits?author=nitaking" title="Documentation">📖</a></td>
@@ -563,7 +515,7 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
<td align="center"><a href="https://bhanuteja.dev/"><img src="https://avatars.githubusercontent.com/u/17903466?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bhanu Teja Pachipulusu</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=pbteja1998" title="Code">💻</a></td>
<td align="center"><a href="https://twitter.com/pavestru"><img src="https://avatars.githubusercontent.com/u/10186479?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pavel Struhar</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=pavestru" title="Code">💻</a></td>
<td align="center"><a href="https://in-thepink.com/"><img src="https://avatars.githubusercontent.com/u/42126368?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Reo Ishiyama</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=reo777" title="Code">💻</a></td>
<td align="center"><a href="https://macwright.com/"><img src="https://avatars.githubusercontent.com/u/32314?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tom MacWright</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tmcw" title="Documentation">📖</a></td>
<td align="center"><a href="https://macwright.com/"><img src="https://avatars.githubusercontent.com/u/32314?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tom MacWright</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tmcw" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=tmcw" title="Tests">⚠️</a> <a href="https://github.com/blitz-js/blitz/commits?author=tmcw" title="Code">💻</a></td>
<td align="center"><a href="https://francoisbest.com"><img src="https://avatars.githubusercontent.com/u/1174092?v=4?s=100" width="100px;" alt=""/><br /><sub><b>François Best</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=franky47" title="Code">💻</a></td>
</tr>
<tr>
@@ -645,12 +597,12 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
<td align="center"><a href="https://github.com/ricardo-rp"><img src="https://avatars.githubusercontent.com/u/30808767?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ricardo Romero</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ricardo-rp" title="Documentation">📖</a></td>
<td align="center"><a href="exocortex.anothernode.com"><img src="https://avatars.githubusercontent.com/u/3286144?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Moritz Reiter</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=anothernode" title="Documentation">📖</a></td>
<td align="center"><a href="https://msich.dev"><img src="https://avatars.githubusercontent.com/u/38794918?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matt Sichterman</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=msichterman" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/medihack"><img src="https://avatars.githubusercontent.com/u/120626?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kai Schlamp</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=medihack" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/medihack"><img src="https://avatars.githubusercontent.com/u/120626?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kai Schlamp</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=medihack" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=medihack" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://muyiwa.me"><img src="https://avatars.githubusercontent.com/u/6832244?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Muyiwa Olu</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=muyiwaolu" title="Code">💻</a></td>
<td align="center"><a href="http://2hr.me/"><img src="https://avatars.githubusercontent.com/u/4346154?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rabbi Hossain</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=rabbihossain" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/bravo-kernel"><img src="https://avatars.githubusercontent.com/u/230500?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bravo-kernel</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=bravo-kernel" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/bravo-kernel"><img src="https://avatars.githubusercontent.com/u/230500?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bravo-kernel</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=bravo-kernel" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=bravo-kernel" title="Documentation">📖</a></td>
<td align="center"><a href="https://samholmes.net"><img src="https://avatars.githubusercontent.com/u/8385528?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sam Holmes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sam3d" title="Code">💻</a></td>
<td align="center"><a href="https://doncicuto.medium.com"><img src="https://avatars.githubusercontent.com/u/30386061?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Miguel Cabrerizo</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=doncicuto" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=doncicuto" title="Documentation">📖</a></td>
<td align="center"><a href="http://zackhobson.com/"><img src="https://avatars.githubusercontent.com/u/12092?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zack Hobson</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=zenhob" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=zenhob" title="Documentation">📖</a></td>
@@ -741,6 +693,62 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
<td align="center"><a href="https://github.com/c-ciobanu"><img src="https://avatars.githubusercontent.com/u/33382714?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cristi Ciobanu</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=c-ciobanu" title="Documentation">📖</a></td>
<td align="center"><a href="https://arpitdalal.dev"><img src="https://avatars.githubusercontent.com/u/61059807?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Arpit Dalal</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=arpitdalal" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/robertrisch"><img src="https://avatars.githubusercontent.com/u/73828816?v=4?s=100" width="100px;" alt=""/><br /><sub><b>robertrisch</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=robertrisch" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/saadaltabari"><img src="https://avatars.githubusercontent.com/u/29986512?v=4?s=100" width="100px;" alt=""/><br /><sub><b>saadaltabari</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=saadaltabari" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=saadaltabari" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/iojcde"><img src="https://avatars.githubusercontent.com/u/31413538?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeeho Ahn</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=iojcde" title="Documentation">📖</a> <a href="#tool-iojcde" title="Tools">🔧</a> <a href="https://github.com/blitz-js/blitz/commits?author=iojcde" title="Code">💻</a></td>
<td align="center"><a href="https://linkedin.com/in/ryanwashburne"><img src="https://avatars.githubusercontent.com/u/12566087?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ryan Washburne</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ryanwashburne" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/sherryxiao1988"><img src="https://avatars.githubusercontent.com/u/1202426?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shundan Xiao</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sherryxiao1988" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/tommywong-dev"><img src="https://avatars.githubusercontent.com/u/79971095?v=4?s=100" width="100px;" alt=""/><br /><sub><b>tommywong-dev</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tommywong-dev" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/datner"><img src="https://avatars.githubusercontent.com/u/22598347?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Datner</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=datner" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=datner" title="Code">💻</a></td>
<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="http://jins.dev"><img src="https://avatars.githubusercontent.com/u/39466936?v=4?s=100" width="100px;" alt=""/><br /><sub><b>JH.Lee</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Tests">⚠️</a> <a href="#maintenance-orionmiz" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=orionmiz" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/corydeppen"><img src="https://avatars.githubusercontent.com/u/313264?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cory Deppen</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=corydeppen" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/oloost"><img src="https://avatars.githubusercontent.com/u/72395941?v=4?s=100" width="100px;" alt=""/><br /><sub><b>oloost</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=oloost" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/janvennemann"><img src="https://avatars.githubusercontent.com/u/1406024?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan Vennemann</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=janvennemann" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=janvennemann" title="Code">💻</a></td>
<td align="center"><a href="https://kevinjones.engineer"><img src="https://avatars.githubusercontent.com/u/20748598?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kevin Jones</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=joneskj55" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/paulm17"><img src="https://avatars.githubusercontent.com/u/387463?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Paul</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=paulm17" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=paulm17" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=paulm17" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/selcukfatihsevinc"><img src="https://avatars.githubusercontent.com/u/384836?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Selçuk Fatih Sevinç</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=selcukfatihsevinc" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=selcukfatihsevinc" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/usamaster"><img src="https://avatars.githubusercontent.com/u/5255330?v=4?s=100" width="100px;" alt=""/><br /><sub><b>usamaster</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=usamaster" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="a11rew.dev"><img src="https://avatars.githubusercontent.com/u/87580113?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Glago</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=a11rew" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=a11rew" title="Code">💻</a></td>
<td align="center"><a href="http://tobiasjordans.de"><img src="https://avatars.githubusercontent.com/u/111561?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tobias</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=tordans" title="Tests">⚠️</a></td>
<td align="center"><a href="https://www.linkedin.com/in/iagor-moraes/"><img src="https://avatars.githubusercontent.com/u/13892132?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Iagor Moraes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=iagormoraes" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=iagormoraes" title="Code">💻</a></td>
<td align="center"><a href="https://twitter.com/trensik"><img src="https://avatars.githubusercontent.com/u/18584155?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dawid Urbaniak</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=Trancever" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=Trancever" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/jhonnymichel"><img src="https://avatars.githubusercontent.com/u/7006387?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jhonny Michel</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jhonnymichel" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=jhonnymichel" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=jhonnymichel" title="Tests">⚠️</a></td>
<td align="center"><a href="sweetliquid.me"><img src="https://avatars.githubusercontent.com/u/18693190?v=4?s=100" width="100px;" alt=""/><br /><sub><b>sweetliquid</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sweetliquid" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/exKAZUu"><img src="https://avatars.githubusercontent.com/u/436237?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sakamoto, Kazunori</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=exKAZUu" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=exKAZUu" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/jeliasson"><img src="https://avatars.githubusercontent.com/u/865493?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Johan Eliasson</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jeliasson" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/jafarlihi"><img src="https://avatars.githubusercontent.com/u/43515211?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hikmat Jafarli</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jafarlihi" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=jafarlihi" 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://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>
<td align="center"><a href="https://github.com/rodobre"><img src="https://avatars.githubusercontent.com/u/52138375?v=4?s=100" width="100px;" alt=""/><br /><sub><b>rodobre</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=rodobre" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=rodobre" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/Zamfi99"><img src="https://avatars.githubusercontent.com/u/19189337?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zamfira Costin-Andrei</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=Zamfi99" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=Zamfi99" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/potikhanovsergey"><img src="https://avatars.githubusercontent.com/u/71494201?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sergey</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=potikhanovsergey" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/papsavas"><img src="https://avatars.githubusercontent.com/u/50584606?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Savvas Papageorgiadis</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=papsavas" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=papsavas" title="Code">💻</a></td>
<td align="center"><a href="https://flow-office.eu/"><img src="https://avatars.githubusercontent.com/u/77194479?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Leonidas</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=LeonMueller-OneAndOnly" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=LeonMueller-OneAndOnly" title="Code">💻</a></td>
<td align="center"><a href="https://hacknex.us"><img src="https://avatars.githubusercontent.com/u/19937034?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Doc0x1</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=Doc0x1" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=Doc0x1" title="Code">💻</a></td>
</tr>
</table>

7
apps/next13/.env Normal file
View File

@@ -0,0 +1,7 @@
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
DATABASE_URL="file:./dev.db"

View File

@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}

38
apps/next13/.gitignore vendored Normal file
View File

@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
.vscode

524
apps/next13/CHANGELOG.md Normal file
View File

@@ -0,0 +1,524 @@
# next-blitz-auth
## 0.1.6
### Patch Changes
- Updated dependencies [6f54841b7]
- Updated dependencies [8a417533f]
- @blitzjs/auth@2.0.5
- blitz@2.0.5
- @blitzjs/rpc@2.0.5
- @blitzjs/next@2.0.5
- @blitzjs/config@2.0.5
## 0.1.5
### Patch Changes
- Updated dependencies [dd604c767]
- Updated dependencies [28a79040e]
- @blitzjs/auth@2.0.4
- blitz@2.0.4
- @blitzjs/next@2.0.4
- @blitzjs/rpc@2.0.4
- @blitzjs/config@2.0.4
## 0.1.4
### Patch Changes
- Updated dependencies [2f5c8a3a0]
- @blitzjs/next@2.0.3
- @blitzjs/rpc@2.0.3
- blitz@2.0.3
- @blitzjs/auth@2.0.3
- @blitzjs/config@2.0.3
## 0.1.3
### Patch Changes
- Updated dependencies [e8fd12e4f]
- @blitzjs/rpc@2.0.2
- blitz@2.0.2
- @blitzjs/next@2.0.2
- @blitzjs/auth@2.0.2
- @blitzjs/config@2.0.2
## 0.1.2
### Patch Changes
- Updated dependencies [8782aae64]
- blitz@2.0.1
- @blitzjs/auth@2.0.1
- @blitzjs/next@2.0.1
- @blitzjs/rpc@2.0.1
- @blitzjs/config@2.0.1
## 0.1.1
### Patch Changes
- Updated dependencies [db7233db6]
- Updated dependencies [1569bd53e]
- Updated dependencies [cee2dec17]
- Updated dependencies [c5c727cb6]
- Updated dependencies [5166e5e03]
- Updated dependencies [72a4e594a]
- Updated dependencies [9db6c8855]
- Updated dependencies [1e1bb73b2]
- Updated dependencies [83b355900]
- Updated dependencies [4cad9cca2]
- Updated dependencies [c1e004063]
- Updated dependencies [365e67094]
- Updated dependencies [fd31e56bc]
- Updated dependencies [74a14b704]
- Updated dependencies [eda14fa8a]
- Updated dependencies [aec1bb076]
- Updated dependencies [a3c92cb86]
- Updated dependencies [270361886]
- Updated dependencies [c721c104d]
- Updated dependencies [82649f341]
- Updated dependencies [072929109]
- Updated dependencies [f397cc203]
- Updated dependencies [cadefb88e]
- Updated dependencies [271c58ac6]
- Updated dependencies [8f166a5db]
- Updated dependencies [8c247e26e]
- Updated dependencies [c5572bec6]
- Updated dependencies [69fb28034]
- Updated dependencies [86e8eb7c8]
- Updated dependencies [99205f52d]
- Updated dependencies [3f20a4740]
- Updated dependencies [82e8b64f5]
- Updated dependencies [6ece09613]
- Updated dependencies [9c2e7d372]
- Updated dependencies [928e840b5]
- Updated dependencies [9631c4583]
- Updated dependencies [6f18cbdc9]
- Updated dependencies [acc07ce94]
- Updated dependencies [ea7561b8e]
- Updated dependencies [1436e7618]
- Updated dependencies [2533caf48]
- Updated dependencies [696f48c4e]
- Updated dependencies [d98e4bac4]
- Updated dependencies [90f1741da]
- Updated dependencies [4a9aa9f7f]
- Updated dependencies [d692b4c1d]
- Updated dependencies [638f2319b]
- Updated dependencies [c213d521c]
- Updated dependencies [7817fe3a8]
- Updated dependencies [0e762fb55]
- Updated dependencies [9529dbd6f]
- Updated dependencies [3b213a35b]
- Updated dependencies [8b01175b4]
- Updated dependencies [3d004dc41]
- Updated dependencies [5ea068b28]
- Updated dependencies [1d863f352]
- Updated dependencies [8b4bf999c]
- Updated dependencies [1476a577b]
- Updated dependencies [a6e81f156]
- Updated dependencies [cacb65d63]
- Updated dependencies [ae0b714f6]
- Updated dependencies [c7ac86b85]
- Updated dependencies [d9fc5d8e2]
- Updated dependencies [ccb1af8d0]
- Updated dependencies [630c71812]
- Updated dependencies [bf1b2c824]
- Updated dependencies [240f3f347]
- Updated dependencies [55b1cb204]
- Updated dependencies [1742eb45d]
- Updated dependencies [54db8a46d]
- Updated dependencies [962eb58af]
- Updated dependencies [54a66a95d]
- Updated dependencies [9fe0cc546]
- Updated dependencies [55a43ce1f]
- Updated dependencies [0b94a4503]
- Updated dependencies [af58e2b23]
- Updated dependencies [78fd5c489]
- Updated dependencies [62bf12b5c]
- Updated dependencies [6ff9ec0d7]
- Updated dependencies [09e0c68db]
- Updated dependencies [abb1ad5d1]
- Updated dependencies [3a602b613]
- Updated dependencies [ceb7db274]
- Updated dependencies [2ade7268e]
- Updated dependencies [0edeaa37a]
- Updated dependencies [7b63f0f1f]
- Updated dependencies [03bad3175]
- Updated dependencies [f0ca738d5]
- Updated dependencies [bee19a259]
- Updated dependencies [0936cb38a]
- Updated dependencies [c11f0401c]
- Updated dependencies [989691ec8]
- Updated dependencies [4d7d126d9]
- Updated dependencies [8e5903c0f]
- Updated dependencies [30fd61316]
- Updated dependencies [6f4349896]
- Updated dependencies [942536d9a]
- Updated dependencies [666a3ae3e]
- Updated dependencies [a80d2a8f7]
- Updated dependencies [f6dac093d]
- Updated dependencies [3ddb57072]
- Updated dependencies [4e26ae21b]
- Updated dependencies [abe2afccd]
- Updated dependencies [da17cc8a2]
- Updated dependencies [b84c5bedb]
- Updated dependencies [a6f32d1d0]
- Updated dependencies [b97366c42]
- Updated dependencies [348fd6f5e]
- Updated dependencies [1bb3a6556]
- Updated dependencies [3bcbad1a9]
- Updated dependencies [0a8b0cb35]
- Updated dependencies [8490b0724]
- Updated dependencies [9ded8dacb]
- Updated dependencies [19898a488]
- Updated dependencies [93851d90c]
- Updated dependencies [f84d77a42]
- Updated dependencies [6811eab1a]
- Updated dependencies [a7e37c58d]
- Updated dependencies [20fc9f80f]
- Updated dependencies [8dedca1a2]
- Updated dependencies [3511d5b69]
- Updated dependencies [46a34c7b3]
- Updated dependencies [e82a79be5]
- Updated dependencies [890b0c0c9]
- Updated dependencies [11b548ede]
- Updated dependencies [ed2b0e22c]
- Updated dependencies [430f6ec78]
- Updated dependencies [df7cee84a]
- Updated dependencies [adabb11a0]
- Updated dependencies [38d945a3f]
- Updated dependencies [c3c789740]
- Updated dependencies [240f378b5]
- Updated dependencies [df3265b85]
- Updated dependencies [89bf993a1]
- Updated dependencies [2150dcc3e]
- Updated dependencies [0f4926fd1]
- Updated dependencies [3f9fe8f04]
- Updated dependencies [8aee25c58]
- Updated dependencies [fe8c937d2]
- Updated dependencies [0ac6e1712]
- Updated dependencies [c0a3b1ee3]
- Updated dependencies [5c5decbce]
- Updated dependencies [dc694cf1c]
- Updated dependencies [e5cd2c862]
- Updated dependencies [807a2b564]
- Updated dependencies [97469a126]
- Updated dependencies [931156c35]
- Updated dependencies [650a157e1]
- Updated dependencies [1d9804a61]
- Updated dependencies [41608c4c3]
- Updated dependencies [a0596279b]
- Updated dependencies [88caa18e6]
- Updated dependencies [022392c12]
- Updated dependencies [17ce29e5e]
- Updated dependencies [f52ca398e]
- Updated dependencies [c126b8191]
- Updated dependencies [c9cf7adc3]
- Updated dependencies [1b798d9a0]
- Updated dependencies [0f18c68d6]
- Updated dependencies [ea7561b8e]
- Updated dependencies [6ab9db780]
- Updated dependencies [727734955]
- Updated dependencies [80e1ead7c]
- Updated dependencies [f39ba1ff1]
- Updated dependencies [161270e3b]
- Updated dependencies [bec9512e3]
- Updated dependencies [b6b9a1c5a]
- Updated dependencies [1436e7618]
- Updated dependencies [1c809094f]
- Updated dependencies [145d5a02b]
- Updated dependencies [8bcb471a5]
- Updated dependencies [a3e6c49c4]
- Updated dependencies [490280240]
- Updated dependencies [15d22af24]
- Updated dependencies [454591293]
- Updated dependencies [6e88a847f]
- Updated dependencies [0025856b9]
- Updated dependencies [2073714f8]
- Updated dependencies [716e188d1]
- Updated dependencies [d87288a2e]
- Updated dependencies [8aa22a0b2]
- Updated dependencies [37aeaa7fa]
- Updated dependencies [b918055bf]
- Updated dependencies [aa34661fa]
- Updated dependencies [61888d1a3]
- Updated dependencies [dd5f51744]
- Updated dependencies [ce4536833]
- Updated dependencies [9ada0f666]
- Updated dependencies [fb32903bf]
- Updated dependencies [b33db0828]
- Updated dependencies [f15a51901]
- Updated dependencies [10f98c681]
- Updated dependencies [42a2cf951]
- Updated dependencies [9674efc0b]
- Updated dependencies [8e0c9d76b]
- Updated dependencies [9620ef6b1]
- Updated dependencies [d5b8faa86]
- Updated dependencies [a3bbe6ce3]
- Updated dependencies [b493c93f8]
- Updated dependencies [3b213a35b]
- Updated dependencies [8d9ea00e1]
- Updated dependencies [e2c18895d]
- Updated dependencies [00bd849ee]
- Updated dependencies [ffa7b5ccc]
- Updated dependencies [1f6b0b54c]
- Updated dependencies [527e48ac3]
- Updated dependencies [01f3a03ea]
- Updated dependencies [dfd2408e9]
- Updated dependencies [b0c21b070]
- Updated dependencies [25f4526f7]
- Updated dependencies [31d7a6f41]
- Updated dependencies [2cc888eff]
- Updated dependencies [29c2b029a]
- Updated dependencies [713aead93]
- blitz@2.0.0
- @blitzjs/auth@2.0.0
- @blitzjs/next@2.0.0
- @blitzjs/rpc@2.0.0
- @blitzjs/config@2.0.0
## 0.1.1-beta.13
### Patch Changes
- Updated dependencies [86e8eb7c8]
- Updated dependencies [b84c5bedb]
- Updated dependencies [e5cd2c862]
- @blitzjs/rpc@2.0.0-beta.37
- blitz@2.0.0-beta.37
- @blitzjs/auth@2.0.0-beta.37
- @blitzjs/next@2.0.0-beta.37
- @blitzjs/config@2.0.0-beta.37
## 0.1.1-beta.12
### Patch Changes
- Updated dependencies [09e0c68db]
- @blitzjs/auth@2.0.0-beta.36
- blitz@2.0.0-beta.36
- @blitzjs/rpc@2.0.0-beta.36
- @blitzjs/next@2.0.0-beta.36
- @blitzjs/config@2.0.0-beta.36
## 0.1.1-beta.11
### Patch Changes
- Updated dependencies [cee2dec17]
- Updated dependencies [aec1bb076]
- Updated dependencies [b97366c42]
- Updated dependencies [3bcbad1a9]
- @blitzjs/auth@2.0.0-beta.35
- blitz@2.0.0-beta.35
- @blitzjs/next@2.0.0-beta.35
- @blitzjs/rpc@2.0.0-beta.35
- @blitzjs/config@2.0.0-beta.35
## 0.1.1-beta.10
### Patch Changes
- Updated dependencies [30fd61316]
- Updated dependencies [3ddb57072]
- Updated dependencies [fe8c937d2]
- blitz@2.0.0-beta.34
- @blitzjs/auth@2.0.0-beta.34
- @blitzjs/next@2.0.0-beta.34
- @blitzjs/rpc@2.0.0-beta.34
- @blitzjs/config@2.0.0-beta.34
## 0.1.1-beta.9
### Patch Changes
- Updated dependencies [19898a488]
- Updated dependencies [6811eab1a]
- Updated dependencies [022392c12]
- @blitzjs/rpc@2.0.0-beta.33
- blitz@2.0.0-beta.33
- @blitzjs/next@2.0.0-beta.33
- @blitzjs/auth@2.0.0-beta.33
- @blitzjs/config@2.0.0-beta.33
## 0.1.1-beta.8
### Patch Changes
- Updated dependencies [82649f341]
- Updated dependencies [8b01175b4]
- blitz@2.0.0-beta.32
- @blitzjs/next@2.0.0-beta.32
- @blitzjs/auth@2.0.0-beta.32
- @blitzjs/rpc@2.0.0-beta.32
- @blitzjs/config@2.0.0-beta.32
## 0.1.1-beta.7
### Patch Changes
- Updated dependencies [90f1741da]
- Updated dependencies [df3265b85]
- @blitzjs/auth@2.0.0-beta.31
- blitz@2.0.0-beta.31
- @blitzjs/rpc@2.0.0-beta.31
- @blitzjs/next@2.0.0-beta.31
- @blitzjs/config@2.0.0-beta.31
## 0.1.1-beta.6
### Patch Changes
- 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
### Patch Changes
- Updated dependencies [e82a79be5]
- Updated dependencies [38d945a3f]
- @blitzjs/auth@2.0.0-beta.26
- @blitzjs/next@2.0.0-beta.26
- @blitzjs/rpc@2.0.0-beta.26
- blitz@2.0.0-beta.26
- @blitzjs/config@2.0.0-beta.26
## 0.1.1-beta.1
### Patch Changes
- Updated dependencies [f84d77a42]
- @blitzjs/rpc@2.0.0-beta.25
- @blitzjs/next@2.0.0-beta.25
- @blitzjs/auth@2.0.0-beta.25
- @blitzjs/config@2.0.0-beta.25
- blitz@2.0.0-beta.25
## 0.1.1-beta.0
### Patch Changes
- 37aeaa7fa: feature: Nextjs 13 App Directory Utility Methods
### 🔧 New Blitz Auth Hook `useAuthenticatedBlitzContext`
This hook is implemented as the replacement of the [`BlitzPage` seurity auth utilities](https://blitzjs.com/docs/authorization#secure-your-pages) provided for the pages directory to work with React Server Components in the Nextjs 13 app directory
It can be used in any asynchronous server component be it in `page.ts` or in the layouts in `layout.ts`
It uses the new [`redirect` function](https://beta.nextjs.org/docs/api-reference/redirect) to provide the required authorization in server side
#### API
```ts
useAuthenticatedBlitzContext({
redirectTo,
redirectAuthenticatedTo,
role,
}: {
redirectTo?: string | RouteUrlObject
redirectAuthenticatedTo?: string | RouteUrlObject | ((ctx: Ctx) => string | RouteUrlObject)
role?: string | string[]
}): Promise<void>
```
#### Usage
**Example Usage in React Server Component in `app` directory in Next 13**
```ts
import {getAppSession, useAuthenticatedBlitzContext} from "src/blitz-server"
...
await useAuthenticatedBlitzContext({
redirectTo: "/auth/login",
role: ["admin"],
redirectAuthenticatedTo: "/dashboard",
})
```
### 🔧 New Blitz RPC Hook `invokeResolver`
#### API
```ts
invokeResolver<T extends (...args: any) => any, TInput = FirstParam<T>>(
queryFn: T,
params: TInput,
): Promise<PromiseReturnType<T>>
```
#### Example Usage
```ts
...
import {invokeResolver, useAuthenticatedBlitzContext} from "../src/blitz-server"
import getCurrentUser from "../src/users/queries/getCurrentUser"
export default async function Home() {
await useAuthenticatedBlitzContext({
redirectTo: "/auth/login",
})
const user = await invokeResolver(getCurrentUser, null)
...
```
- Updated dependencies [cadefb88e]
- Updated dependencies [6f18cbdc9]
- Updated dependencies [acc07ce94]
- Updated dependencies [ea7561b8e]
- Updated dependencies [9529dbd6f]
- Updated dependencies [ea7561b8e]
- Updated dependencies [6e88a847f]
- Updated dependencies [37aeaa7fa]
- blitz@2.0.0-beta.24
- @blitzjs/auth@2.0.0-beta.24
- @blitzjs/next@2.0.0-beta.24
- @blitzjs/rpc@2.0.0-beta.24
- @blitzjs/config@2.0.0-beta.24

26
apps/next13/README.md Normal file
View File

@@ -0,0 +1,26 @@
# Next.js 13 + Blitz Auth
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) + [`Blitz Auth`](https://blitzjs.com/docs/auth).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can go to the `/signup` page and create a new account.
## Learn More
To learn more about Next.js and Blitz.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- [Blitz.js Documentation](https://blitzjs.com/docs/) — learn about Blitz.js.
- [Blitz Auth Documentation](https://blitzjs.com/docs/auth) — learn about Blitz Auth plugin.

View File

@@ -0,0 +1,6 @@
const {withBlitz} = require("@blitzjs/next")
/** @type {import('next').NextConfig} */
const nextConfig = {}
module.exports = withBlitz(nextConfig)

41
apps/next13/package.json Normal file
View File

@@ -0,0 +1,41 @@
{
"name": "next-blitz-auth",
"version": "0.1.6",
"private": true,
"scripts": {
"blitz:dev": "next dev",
"blitz:build": "next build",
"blitz:start": "next start",
"lint": "next lint"
},
"prisma": {
"schema": "prisma/schema.prisma"
},
"dependencies": {
"@blitzjs/auth": "2.0.5",
"@blitzjs/config": "2.0.5",
"@blitzjs/next": "2.0.5",
"@blitzjs/rpc": "2.0.5",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "^4.5.0",
"@tanstack/react-query": "4.0.10",
"blitz": "2.0.5",
"flatted": "3.2.7",
"next": "14.0.4",
"prisma": "^4.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.39.1",
"superjson": "1.11.0",
"zod": "3.20.2"
},
"devDependencies": {
"@types/node": "18.11.7",
"@types/react": "18.0.23",
"@types/react-dom": "18.0.7",
"eslint": "8.26.0",
"eslint-config-next": "13.0.0",
"typescript": "4.8.4"
}
}

BIN
apps/next13/prisma/dev.db Normal file

Binary file not shown.

View File

@@ -0,0 +1,5 @@
import {PrismaClient} from "@prisma/client"
export * from "@prisma/client"
const db = new PrismaClient()
export default db

View File

@@ -0,0 +1,47 @@
-- CreateTable
CREATE TABLE "User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"name" TEXT,
"email" TEXT NOT NULL,
"hashedPassword" TEXT,
"role" TEXT NOT NULL DEFAULT 'USER'
);
-- CreateTable
CREATE TABLE "Session" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"expiresAt" DATETIME,
"handle" TEXT NOT NULL,
"hashedSessionToken" TEXT,
"antiCSRFToken" TEXT,
"publicData" TEXT,
"privateData" TEXT,
"userId" INTEGER,
CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
-- CreateTable
CREATE TABLE "Token" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" DATETIME NOT NULL,
"hashedToken" TEXT NOT NULL,
"type" TEXT NOT NULL,
"expiresAt" DATETIME NOT NULL,
"sentTo" TEXT NOT NULL,
"userId" INTEGER NOT NULL,
CONSTRAINT "Token_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
-- CreateIndex
CREATE UNIQUE INDEX "Session_handle_key" ON "Session"("handle");
-- CreateIndex
CREATE UNIQUE INDEX "Token_hashedToken_type_key" ON "Token"("hashedToken", "type");

View File

@@ -0,0 +1,48 @@
/*
Warnings:
- You are about to drop the `Token` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the column `createdAt` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `role` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `updatedAt` on the `User` table. All the data in the column will be lost.
- You are about to drop the column `createdAt` on the `Session` table. All the data in the column will be lost.
- You are about to drop the column `updatedAt` on the `Session` table. All the data in the column will be lost.
*/
-- DropIndex
DROP INDEX "Token_hashedToken_type_key";
-- DropTable
PRAGMA foreign_keys=off;
DROP TABLE "Token";
PRAGMA foreign_keys=on;
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"name" TEXT,
"email" TEXT NOT NULL,
"hashedPassword" TEXT
);
INSERT INTO "new_User" ("email", "hashedPassword", "id", "name") SELECT "email", "hashedPassword", "id", "name" FROM "User";
DROP TABLE "User";
ALTER TABLE "new_User" RENAME TO "User";
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
CREATE TABLE "new_Session" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"expiresAt" DATETIME,
"handle" TEXT NOT NULL,
"hashedSessionToken" TEXT,
"antiCSRFToken" TEXT,
"publicData" TEXT,
"privateData" TEXT,
"userId" INTEGER,
CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);
INSERT INTO "new_Session" ("antiCSRFToken", "expiresAt", "handle", "hashedSessionToken", "id", "privateData", "publicData", "userId") SELECT "antiCSRFToken", "expiresAt", "handle", "hashedSessionToken", "id", "privateData", "publicData", "userId" FROM "Session";
DROP TABLE "Session";
ALTER TABLE "new_Session" RENAME TO "Session";
CREATE UNIQUE INDEX "Session_handle_key" ON "Session"("handle");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;

View File

@@ -0,0 +1,33 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
name String?
email String @unique
hashedPassword String?
sessions Session[]
}
model Session {
id Int @id @default(autoincrement())
expiresAt DateTime?
handle String @unique
hashedSessionToken String?
antiCSRFToken String?
publicData String?
privateData String?
user User? @relation(fields: [userId], references: [id])
userId Int?
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,4 @@
<svg width="283" height="64" viewBox="0 0 283 64" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M141.04 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.46 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM248.72 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.45 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM200.24 34c0 6 3.92 10 10 10 4.12 0 7.21-1.87 8.8-4.92l7.68 4.43c-3.18 5.3-9.14 8.49-16.48 8.49-11.05 0-19-7.2-19-18s7.96-18 19-18c7.34 0 13.29 3.19 16.48 8.49l-7.68 4.43c-1.59-3.05-4.68-4.92-8.8-4.92-6.07 0-10 4-10 10zm82.48-29v46h-9V5h9zM36.95 0L73.9 64H0L36.95 0zm92.38 5l-27.71 48L73.91 5H84.3l17.32 30 17.32-30h10.39zm58.91 12v9.69c-1-.29-2.06-.49-3.2-.49-5.81 0-10 4-10 10V51h-9V17h9v9.2c0-5.08 5.91-9.2 13.2-9.2z" fill="#000"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,8 @@
import {useAuthenticatedBlitzContext} from "../../blitz-server"
export default async function RootLayout({children}: {children: React.ReactNode}) {
await useAuthenticatedBlitzContext({
redirectAuthenticatedTo: "/",
})
return <>{children}</>
}

View File

@@ -0,0 +1,13 @@
"use client"
import {LoginForm} from "../../../auth/components/LoginForm"
import {useRouter} from "next/navigation"
import {useSearchParams} from "next/navigation"
const LoginPage = () => {
const router = useRouter()
const searchParams = useSearchParams()
return <LoginForm onSuccess={(_user) => {}} />
}
export default LoginPage

View File

@@ -0,0 +1,11 @@
"use client"
import {useRouter} from "next/navigation"
import SignupForm from "../../../auth/components/SignupForm"
const SignUp = () => {
const router = useRouter()
return <SignupForm onSuccess={() => router.push("/")} />
}
export default SignUp

View File

@@ -0,0 +1,24 @@
"use client" // Error components must be Client components
import React, {useEffect} from "react"
export default function Error({error, reset}: {error: Error; reset: () => void}) {
useEffect(() => {
// Log the error to an error reporting service
console.error(error)
}, [error])
return (
<div>
<h2>Something went wrong!</h2>
<button
onClick={
// Attempt to recover by trying to re-render the segment
() => reset()
}
>
Try again
</button>
</div>
)
}

View File

@@ -0,0 +1,57 @@
import "src/styles/globals.css"
import {BlitzProvider} from "../blitz-client"
import styles from "src/styles/Home.module.css"
export default function RootLayout({children}: {children: React.ReactNode}) {
return (
<html lang="en">
<head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.ico" />
</head>
<body>
<BlitzProvider>
<div className={styles.globe} />
<div className={styles.container}>
<div className={styles.toastContainer}>
<p>
<strong>Congrats!</strong> Your app is ready, including user sign-up and log-in.
</p>
</div>
<main className={styles.main}>
<div className={styles.wrapper}>
<div className={styles.header}>
<div className={styles.logo}>
<svg viewBox="0 0 165 66">
<path d="M104.292 56.033C104.292 56.408 104.206 56.6636 104.036 56.8C103.9 56.9363 103.627 57.0045 103.218 57.0045H99.7409C99.4001 57.0045 99.1615 56.9533 99.0251 56.8511C98.8888 56.7147 98.8206 56.4932 98.8206 56.1864L98.9229 19.8324C98.9229 19.3211 99.1444 19.0654 99.5876 19.0654H103.627C103.839 19.0654 104.292 19.0672 104.292 19.0672V19.8324V56.033ZM64.3531 57.0081C64.1145 57.0081 63.927 56.9399 63.7906 56.8035C63.6543 56.6672 63.5861 56.4968 63.5861 56.2922V19.9383C63.5861 19.3588 63.8588 19.069 64.4042 19.069H76.829C81.533 19.069 85.1463 19.9212 87.6687 21.6256C90.1912 23.2958 91.4524 25.7331 91.4524 28.9373C91.4524 30.9484 90.924 32.6528 89.8673 34.0504C88.8106 35.4138 87.1063 36.5217 84.7543 37.3739C84.6179 37.4079 84.5497 37.4932 84.5497 37.6295C84.5497 37.7318 84.6179 37.7999 84.7543 37.834C87.2767 38.5158 89.1686 39.5895 90.4298 41.0553C91.7251 42.521 92.3727 44.4469 92.3727 46.833C92.3727 50.2418 91.0945 52.7983 88.5379 54.5027C85.9814 56.1729 82.2318 57.0081 77.2892 57.0081H64.3531ZM77.5448 35.5843C79.6923 35.5843 81.516 35.1071 83.0158 34.1526C84.5157 33.1982 85.2656 31.6983 85.2656 29.6531C85.2656 27.6079 84.5157 26.0569 83.0158 25.0002C81.5501 23.9435 79.5219 23.4151 76.9313 23.4151H70.5399C70.0286 23.4151 69.7729 23.6367 69.7729 24.0798V34.8684C69.7729 35.3457 69.9604 35.5843 70.3354 35.5843H77.5448ZM77.0335 52.662C82.9647 52.662 85.9303 50.5997 85.9303 46.4751C85.9303 44.3276 85.1633 42.7255 83.6294 41.6688C82.0955 40.6121 80.0673 40.0838 77.5448 40.0838H70.591C70.2843 40.0838 70.0627 40.1349 69.9263 40.2372C69.8241 40.3394 69.7729 40.5099 69.7729 40.7485V51.895C69.7729 52.4063 69.9604 52.662 70.3354 52.662H77.0335ZM142.707 56.8624C142.81 56.9647 142.997 57.0158 143.27 57.0158H163.876C164.387 57.0158 164.643 56.7772 164.643 56.3V53.948V53.3344H163.978H149.866C149.593 53.3344 149.457 53.2492 149.457 53.0788C149.457 52.9765 149.508 52.8572 149.61 52.7208L163.876 33.8536C164.251 33.2741 164.438 32.7628 164.438 32.3197V30.479V29.9144C164.438 29.9144 164.051 29.9165 163.876 29.9165H144.241C143.866 29.9165 143.679 30.121 143.679 30.5301V32.831C143.679 33.1037 143.713 33.2911 143.781 33.3934C143.883 33.4957 144.071 33.5468 144.344 33.5468H157.075C157.382 33.5468 157.535 33.632 157.535 33.8025L157.382 34.1092L143.219 52.9765C142.946 53.3515 142.759 53.6412 142.656 53.8457C142.588 54.0502 142.554 54.3059 142.554 54.6127V56.3C142.554 56.5727 142.605 56.7602 142.707 56.8624ZM116.929 19.0676H111.51V27.7684C114.503 27.7684 116.929 25.3419 116.929 22.3486V19.0676ZM116.926 56.0308C116.926 56.4058 116.841 56.6614 116.67 56.7978C116.534 56.9341 116.278 57.0023 115.903 57.0023H112.427C112.086 57.0023 111.847 56.9512 111.711 56.8489C111.574 56.7126 111.506 56.491 111.506 56.1842V30.6699C111.506 30.3972 111.557 30.2098 111.66 30.1075C111.762 29.9712 111.949 29.903 112.222 29.903H117.028L116.926 56.0308ZM132.183 34.3137C132.183 33.9728 132.336 33.8024 132.643 33.8024H138.779C139.256 33.8024 139.495 33.5979 139.495 33.1888V30.4789V29.9165H138.881H132.745C132.439 29.9165 132.285 29.7631 132.285 29.4563V21.531V20.713L131.621 20.7129H128.093C127.752 20.7129 127.547 20.9515 127.479 21.4288L126.865 29.4563C126.865 29.7631 126.729 29.9165 126.456 29.9165H122.366C121.957 29.9165 121.752 30.1039 121.752 30.4789V33.1888C121.752 33.5979 121.974 33.8024 122.417 33.8024H126.252C126.593 33.8024 126.763 34.0069 126.763 34.416V50.6244C126.763 52.806 127.309 54.4252 128.399 55.4819C129.49 56.5045 131.16 57.0158 133.41 57.0158C135.796 57.0158 137.535 56.9306 138.625 56.7601C139.137 56.6579 139.392 56.3681 139.392 55.8909V53.6923V53.0787H138.779H135.507C134.348 53.0787 133.495 52.806 132.95 52.2606C132.439 51.7152 132.183 50.7267 132.183 49.295V34.3137Z"></path>
<path d="M0.241243 33.2639H10.9742C15.0585 33.2639 18.9054 35.1835 21.3612 38.4471L31.9483 52.5165C32.1484 52.7824 32.1786 53.1393 32.026 53.435L25.9232 65.2592C25.6304 65.8265 24.8455 65.8932 24.4612 65.3835L0.241243 33.2639Z"></path>
<path d="M42.4727 33.2822H31.7398C27.6555 33.2822 23.8086 31.3626 21.3528 28.0991L10.7656 14.0297C10.5656 13.7638 10.5354 13.4068 10.688 13.1111L16.7908 1.28696C17.0836 0.719654 17.8684 0.652924 18.2528 1.16266L42.4727 33.2822Z"></path>
</svg>
</div>
<div className={styles.buttonContainer}></div>
</div>
<div className={styles.body}>{children} </div>
</div>
</main>
<footer className={styles.footer}>
<span>Powered by</span>
<a
href="https://blitzjs.com?utm_source=blitz-new&utm_medium=app-template&utm_campaign=blitz-new"
target="_blank"
rel="noopener noreferrer"
className={styles.textLink}
>
Blitz.js
</a>
</footer>
</div>
</BlitzProvider>
</body>
</html>
)
}

View File

@@ -0,0 +1,46 @@
import Link from "next/link"
import styles from "src/styles/Home.module.css"
import Test from "./react-query"
import {invoke, useAuthenticatedBlitzContext} from "../blitz-server"
import getCurrentUser from "../users/queries/getCurrentUser"
export default async function Home() {
await useAuthenticatedBlitzContext({
redirectTo: "/auth/login",
})
const user = await invoke(getCurrentUser, null)
return (
<div
style={{
display: "flex",
justifyContent: "center",
alignItems: "center",
flexDirection: "column",
width: "100%",
}}
>
<div
style={{
display: "flex",
justifyContent: "center",
alignItems: "center",
flexDirection: "column",
}}
>
<Link href={"/auth/signup"} className={styles.button}>
<strong>Sign Up</strong>
</Link>
<Link href={"/auth/login"} className={styles.loginButton}>
<strong>Login</strong>
</Link>
<div style={{height: 20}} />
<p>Server Session</p>
<p>UserId: {user?.id}</p>
<p>Email: {user?.email}</p>
<div style={{height: 20}} />
<p>Client Session</p>
<Test />
</div>
</div>
)
}

View File

@@ -0,0 +1,34 @@
"use client"
import {useQuery, useMutation} from "@blitzjs/rpc"
import logout from "../auth/mutations/logout"
import getCurrentUser from "../users/queries/getCurrentUser"
import {useTransition} from "react"
import {useRouter} from "next/navigation"
export default function Test() {
const router = useRouter()
const [user] = useQuery(getCurrentUser, null)
const [isPending, startTransition] = useTransition()
const [logoutMutation] = useMutation(logout)
console.log(user)
return (
<div>
<h1>Test</h1>
<p>{user?.email}</p>
<button
className="button small"
onClick={async () => {
await logoutMutation()
startTransition(() => {
// Refresh the current route and fetch new data from the server without
// losing client-side browser or React state.
router.refresh()
})
}}
>
Logout
</button>
</div>
)
}

View File

@@ -0,0 +1,61 @@
import {AuthenticationError, PromiseReturnType} from "blitz"
import Link from "next/link"
import {LabeledTextField} from "../../core/components/LabeledTextField"
import {Form, FORM_ERROR} from "../../core/components/Form"
import login from "../../auth/mutations/login"
import {Login} from "../../auth/validations"
import {useMutation} from "@blitzjs/rpc"
import {startTransition} from "react"
import {useRouter} from "next/navigation"
type LoginFormProps = {
onSuccess?: (user: PromiseReturnType<typeof login>) => void
}
export const LoginForm = (props: LoginFormProps) => {
const [loginMutation] = useMutation(login)
const router = useRouter()
return (
<div>
<h1>Login</h1>
<Form
submitText="Login"
schema={Login}
initialValues={{email: "", password: ""}}
onSubmit={async (values) => {
try {
const user = await loginMutation(values)
props.onSuccess?.(user)
startTransition(() => {
// Refresh the current route and fetch new data from the server without
// losing client-side browser or React state.
router.refresh()
})
} catch (error: any) {
if (error instanceof AuthenticationError) {
return {[FORM_ERROR]: "Sorry, those credentials are invalid"}
} else {
return {
[FORM_ERROR]:
"Sorry, we had an unexpected error. Please try again. - " + error.toString(),
}
}
}
}}
>
<LabeledTextField name="email" label="Email" placeholder="Email" />
<LabeledTextField name="password" label="Password" placeholder="Password" type="password" />
<div>
<a>Forgot your password?</a>
</div>
</Form>
<div style={{marginTop: "1rem"}}>
Or <Link href={"/auth/signup"}>Sign Up</Link>
</div>
</div>
)
}
export default LoginForm

View File

@@ -0,0 +1,51 @@
import {LabeledTextField} from "../../core/components/LabeledTextField"
import {Form, FORM_ERROR} from "../../core/components/Form"
import signup from "../../auth/mutations/signup"
import {Signup} from "../../auth/validations"
import {useMutation} from "@blitzjs/rpc"
import {startTransition} from "react"
import {useRouter} from "next/navigation"
type SignupFormProps = {
onSuccess?: () => void
}
export const SignupForm = (props: SignupFormProps) => {
const [signupMutation] = useMutation(signup)
const router = useRouter()
return (
<div>
<h1>Create an Account</h1>
<Form
submitText="Create Account"
schema={Signup}
initialValues={{email: "", password: ""}}
onSubmit={async (values) => {
try {
await signupMutation(values)
props.onSuccess?.()
startTransition(() => {
// Refresh the current route and fetch new data from the server without
// losing client-side browser or React state.
router.refresh()
})
} catch (error: any) {
if (error.code === "P2002" && error.meta?.target?.includes("email")) {
// Error "P2002" comes from Prisma (https://www.prisma.io/docs/reference/api-reference/error-reference#p2002)
return {email: "This email is already being used"}
} else {
return {[FORM_ERROR]: error.toString()}
}
}
}}
>
<LabeledTextField name="email" label="Email" placeholder="Email" />
<LabeledTextField name="password" label="Password" placeholder="Password" type="password" />
</Form>
</div>
)
}
export default SignupForm

View File

@@ -0,0 +1,26 @@
import {NotFoundError} from "blitz"
import db from "../../../prisma"
// import {authenticateUser} from "./login"
import {ChangePassword} from "../validations"
import {resolver} from "@blitzjs/rpc"
// import {SecurePassword} from "@blitzjs/auth"
export default resolver.pipe(
//@ts-ignore
resolver.zod(ChangePassword),
resolver.authorize(),
async ({currentPassword, newPassword}, ctx) => {
const user = await db.user.findFirst({where: {id: ctx.session.userId}})
if (!user) throw new NotFoundError()
// await authenticateUser(user.email, currentPassword)
// const hashedPassword = await SecurePassword.hash(newPassword.trim())
await db.user.update({
where: {id: user.id},
data: {hashedPassword: newPassword},
})
return true
},
)

View File

@@ -0,0 +1,64 @@
import {vi, describe, it, beforeEach} from "vitest"
import db from "db"
import {hash256} from "@blitzjs/auth"
import forgotPassword from "./forgotPassword"
import previewEmail from "preview-email"
import {Ctx} from "@blitzjs/next"
beforeEach(async () => {
await db.$reset()
})
const generatedToken = "plain-token"
vi.mock("@blitzjs/auth", async () => {
const auth = await vi.importActual<Record<string, unknown>>("@blitzjs/auth")!
return {
...auth,
generateToken: () => generatedToken,
}
})
vi.mock("preview-email", () => ({default: vi.fn()}))
describe("forgotPassword mutation", () => {
it("does not throw error if user doesn't exist", async () => {
await expect(forgotPassword({email: "no-user@email.com"}, {} as Ctx)).resolves.not.toThrow()
})
it("works correctly", async () => {
// Create test user
const user = await db.user.create({
data: {
email: "user@example.com",
tokens: {
// Create old token to ensure it's deleted
create: {
type: "RESET_PASSWORD",
hashedToken: "token",
expiresAt: new Date(),
sentTo: "user@example.com",
},
},
},
include: {tokens: true},
})
// Invoke the mutation
await forgotPassword({email: user.email}, {} as Ctx)
const tokens = await db.token.findMany({where: {userId: user.id}})
const token = tokens[0]
if (!user.tokens[0]) throw new Error("Missing user token")
if (!token) throw new Error("Missing token")
// delete's existing tokens
expect(tokens.length).toBe(1)
expect(token.id).not.toBe(user.tokens[0].id)
expect(token.type).toBe("RESET_PASSWORD")
expect(token.sentTo).toBe(user.email)
expect(token.hashedToken).toBe(hash256(generatedToken))
expect(token.expiresAt > new Date()).toBe(true)
expect(previewEmail).toBeCalled()
})
})

View File

@@ -0,0 +1,40 @@
import {generateToken, hash256} from "@blitzjs/auth"
import {resolver} from "@blitzjs/rpc"
import db from "../../../prisma"
import {ForgotPassword} from "../validations"
const RESET_PASSWORD_TOKEN_EXPIRATION_IN_HOURS = 4
//@ts-ignore
export default resolver.pipe(resolver.zod(ForgotPassword), async ({email}) => {
// 1. Get the user
const user = await db.user.findFirst({where: {email: email.toLowerCase()}})
// 2. Generate the token and expiration date.
const token = generateToken()
const hashedToken = hash256(token)
const expiresAt = new Date()
expiresAt.setHours(expiresAt.getHours() + RESET_PASSWORD_TOKEN_EXPIRATION_IN_HOURS)
// 3. If user with this email was found
if (user) {
// 4. Delete any existing password reset tokens
await db.token.deleteMany({where: {type: "RESET_PASSWORD", userId: user.id}})
// 5. Save this new token in the database.
await db.token.create({
data: {
user: {connect: {id: user.id}},
type: "RESET_PASSWORD",
expiresAt,
hashedToken,
sentTo: user.email,
},
})
// 6. Send the email
} else {
// 7. If no user found wait the same time so attackers can't tell the difference
await new Promise((resolve) => setTimeout(resolve, 750))
}
// 8. Return the same result whether a password reset email was sent or not
return
})

View File

@@ -0,0 +1,31 @@
import {resolver} from "@blitzjs/rpc"
// import {AuthenticationError} from "blitz"
import db from "../../../prisma"
import {Login} from "../validations"
// export const authenticateUser = async (rawEmail: string, rawPassword: string) => {
// const {email, password} = Login.parse({email: rawEmail, password: rawPassword})
// const user = await db.user.findFirst({where: {email}})
// if (!user) throw new AuthenticationError()
// const result = await SecurePassword.verify(user.hashedPassword, password)
// if (result === SecurePassword.VALID_NEEDS_REHASH) {
// // Upgrade hashed password with a more secure hash
// const improvedHash = await SecurePassword.hash(password)
// await db.user.update({where: {id: user.id}, data: {hashedPassword: improvedHash}})
// }
// const {hashedPassword, ...rest} = user
// return rest
// }
//@ts-ignore
export default resolver.pipe(resolver.zod(Login), async ({email, password}, ctx) => {
// This throws an error if credentials are invalid
// const user = await authenticateUser(email, password)
const user = await db.user.findFirst({where: {email}})
//@ts-ignore
await ctx.session.$create({userId: user.id, role: user.role})
console.log("user", user)
return user
})

View File

@@ -0,0 +1,5 @@
import {Ctx} from "blitz"
export default async function logout(_: any, ctx: Ctx) {
return await ctx.session.$revoke()
}

View File

@@ -0,0 +1,83 @@
import {vi, describe, it, beforeEach, expect} from "vitest"
import resetPassword from "./resetPassword"
import db from "db"
import {SecurePassword, hash256} from "@blitzjs/auth"
beforeEach(async () => {
await db.$reset()
})
const mockCtx: any = {
session: {
$create: vi.fn(),
},
}
describe("resetPassword mutation", () => {
it("works correctly", async () => {
expect(true).toBe(true)
// Create test user
const goodToken = "randomPasswordResetToken"
const expiredToken = "expiredRandomPasswordResetToken"
const future = new Date()
future.setHours(future.getHours() + 4)
const past = new Date()
past.setHours(past.getHours() - 4)
const user = await db.user.create({
data: {
email: "user@example.com",
tokens: {
// Create old token to ensure it's deleted
create: [
{
type: "RESET_PASSWORD",
hashedToken: hash256(expiredToken),
expiresAt: past,
sentTo: "user@example.com",
},
{
type: "RESET_PASSWORD",
hashedToken: hash256(goodToken),
expiresAt: future,
sentTo: "user@example.com",
},
],
},
},
include: {tokens: true},
})
const newPassword = "newPassword"
// Non-existent token
await expect(
resetPassword({token: "no-token", password: "", passwordConfirmation: ""}, mockCtx),
).rejects.toThrowError()
// Expired token
await expect(
resetPassword(
{token: expiredToken, password: newPassword, passwordConfirmation: newPassword},
mockCtx,
),
).rejects.toThrowError()
// Good token
await resetPassword(
{token: goodToken, password: newPassword, passwordConfirmation: newPassword},
mockCtx,
)
// Delete's the token
const numberOfTokens = await db.token.count({where: {userId: user.id}})
expect(numberOfTokens).toBe(0)
// Updates user's password
const updatedUser = await db.user.findFirst({where: {id: user.id}})
expect(await SecurePassword.verify(updatedUser!.hashedPassword, newPassword)).toBe(
SecurePassword.VALID,
)
})
})

View File

@@ -0,0 +1,50 @@
import {hash256} from "@blitzjs/auth"
import db from "../../../prisma"
import {ResetPassword} from "../validations"
import login from "./login"
export class ResetPasswordError extends Error {
name = "ResetPasswordError"
message = "Reset password link is invalid or it has expired."
}
export default async function resetPassword(input: any, ctx: any) {
ResetPassword.parse(input)
// 1. Try to find this token in the database
const hashedToken = hash256(input.token)
const possibleToken = await db.token.findFirst({
where: {hashedToken, type: "RESET_PASSWORD"},
include: {user: true},
})
// 2. If token not found, error
if (!possibleToken) {
throw new ResetPasswordError()
}
const savedToken = possibleToken
// 3. Delete token so it can't be used again
await db.token.delete({where: {id: savedToken.id}})
// 4. If token has expired, error
if (savedToken.expiresAt < new Date()) {
throw new ResetPasswordError()
}
// 5. Since token is valid, now we can update the user's password
// const hashedPassword = await SecurePassword.hash(input.password.trim())
const user = await db.user.update({
where: {id: savedToken.userId},
data: {
hashedPassword: input.password,
},
})
// 6. Revoke all existing login sessions for this user
await db.session.deleteMany({where: {userId: user.id}})
// 7. Now log the user in with the new credentials
await login({email: user.email, password: input.password}, ctx)
return true
}

View File

@@ -0,0 +1,18 @@
import db from "../../../prisma"
import {SecurePassword} from "@blitzjs/auth/secure-password"
export default async function signup(input: {password: string; email: string}, ctx: any) {
const blitzContext = ctx
const hashedPassword = await SecurePassword.hash((input.password as string) || "test-password")
const email = input.email
const user = await db.user.create({
data: {email, hashedPassword},
})
await blitzContext.session.$create({
userId: user.id,
role: "user",
})
return {userId: blitzContext.session.userId, ...user, email: input.email}
}

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