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

Compare commits

...

124 Commits

Author SHA1 Message Date
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
651 changed files with 20631 additions and 4434 deletions

View File

@@ -2314,7 +2314,9 @@
"avatar_url": "https://avatars.githubusercontent.com/u/32314?v=4",
"profile": "https://macwright.com/",
"contributions": [
"doc"
"doc",
"test",
"code"
]
},
{
@@ -2911,7 +2913,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/120626?v=4",
"profile": "https://github.com/medihack",
"contributions": [
"doc"
"doc",
"code"
]
},
{
@@ -2938,7 +2941,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/230500?v=4",
"profile": "https://github.com/bravo-kernel",
"contributions": [
"code"
"code",
"doc"
]
},
{
@@ -3689,7 +3693,9 @@
"profile": "https://github.com/siddhsuresh",
"contributions": [
"doc",
"code"
"code",
"test",
"maintenance"
]
},
{
@@ -3712,6 +3718,104 @@
"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"
]
},
{
"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"
]
}
],
"contributorsPerLine": 7,

View File

@@ -0,0 +1,6 @@
---
"blitz": patch
"@blitzjs/generator": patch
---
Upgrade `tslog` to the latest version

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Update prisma-ast dependency to prevent Blitz generator from failing when Prisma keywords are used as model names

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": minor
---
internal: remove unneeed useSession from useQuery hooks

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Fix `blitz --help` CLI command not being found

View File

@@ -0,0 +1,8 @@
---
"blitz": minor
"@blitzjs/auth": minor
"@blitzjs/next": minor
"@blitzjs/rpc": minor
---
transpile packages to es2015 to support older browsers

View File

@@ -0,0 +1,5 @@
---
"blitz": minor
---
When db.\$reset() rejects, reject with an Error object

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Remove husky prepush hook & update precommit hook to only run prettier

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Remove unnecessary `as number` assertions from new app templates

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": minor
---
change rpc route basepath to be one folder higher when using includeRPC in monorepos

View File

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

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"@blitzjs/generator": patch
---
Switch from jest to vitest in new app templates

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/auth": patch
---
Fixes adding authError query param in Passport adapter.

View File

@@ -0,0 +1,8 @@
---
"blitz": minor
"@blitzjs/auth": minor
"@blitzjs/next": minor
"@blitzjs/rpc": minor
---
Decoupled Blitz RPC from Blitz Auth to allow independent use.

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Fix `no-floating-promises` lint errors after generating pages with Blitz generator by adding `await` to `router.push` calls in the templates

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Load schema.prisma path from `package.json` instead of assuming it's `db/schema.prisma`

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Update generator templates to use the src directory instead of app

View File

@@ -0,0 +1,5 @@
---
"blitz": minor
---
some providers need extra attributes, update for wrapAppWithProvider

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Add `blitz routes` CLI command back to toolkit

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---
Fix suspense error codegen patch for nextjs versions 13-13.0.6

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Check if blitz-server & blitz-client is located in either the app or src directory and return the correct path for blitz recipes.

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
---
"blitz": patch
"@blitzjs/next": patch
---
Add BlitzLogger plugin and allow customizing logging

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Fix form paths when running blitz generate all

View File

@@ -0,0 +1,5 @@
---
"toolkit-app": patch
---
Update zod to 3.20.2 (was 3.19.1).

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/next": patch
---
Fix prefetching infinite Blitz queries.

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Move `useCurrentUser` hook from `core/hooks` to `users/hooks` folder

View File

@@ -0,0 +1,7 @@
---
"@blitzjs/auth": patch
"@blitzjs/next": patch
"blitz": patch
---
Fix auth related React hydration errors by not redirecting until after component mount.

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/auth": minor
"@blitzjs/rpc": minor
---
maybe fix anon session CSRF issue + add ability to customize anon session expiry time

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Remove the random user (noop@blitzjs.com) & use user's default git account when commiting a new generated blitz project.

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Add a global Blitz version check when generating a new Blitz project to ensure users use the latest Blitz.

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Fix Blitz Install issue that gets stuck on "Generating file diff"

View File

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

View File

@@ -0,0 +1,7 @@
---
"blitz": patch
"@blitzjs/rpc": patch
---
Add an opt-in GET request support to RPC specification by exporting a `config` object that has the `httpMethod` property.
from `query` files.

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Add `blitz export` CLI command to toolkit

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---
Allow for custom page extensions for the wildcard blitz route. For example [...blitz].api.ts. For more information vist https://nextjs.org/docs/api-reference/next.config.js/custom-page-extensions

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": patch
---
Allow the updater function in setQueryData to return undefined to match react-query typings

View File

@@ -0,0 +1,7 @@
---
"@blitzjs/auth": minor
"@blitzjs/next": minor
"@blitzjs/rpc": minor
---
fix Cannot read properties of null (reading 'isReady') for pnpm/yarn v3

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Fix reset token being undefined when passed to the resetPassword mutation

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Use `src` instead of `app` folder for `blitz generate custom-template`

View File

@@ -0,0 +1,6 @@
---
"blitz": patch
"@blitzjs/generator": patch
---
Fix `cannot find module db error` in JavaScript template. Replace requiring the config using `esbuild` with parsing using `jscodeshift` to get the `cliConfig` values. Added logic to find the `blitz-server` file in `src` directory

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Fix "Ambiguous class detected" errors reported by SuperJson by removing duplicated export from errors.ts file

View File

@@ -0,0 +1,5 @@
---
"blitz": major
---
update paginate.ts, return more params for more complex pagination control

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/config": patch
"@blitzjs/generator": patch
---
Upgrade eslint-config-next in new app templates to fix linting issues on blitz build

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Export enhancePrisma for client again (Fixes #3964)

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Fix Custom Server TS error - add `es6` target config to esbuild

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/codemod": patch
---
Unwrap `invokeWithMiddleware` so the query or mutation is called directly when running the codemod

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/next": minor
---
Change setupBlitzServer logger config to be optional. Will default to BlitzLogger

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": patch
---
Add ability to put your query and mutation resolvers in a separate monorepo folder, allowing you to use them in multiple apps.

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Only generate the prisma client if it's not found in node_modules when running a blitz cli command.

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Fix eslint config in new JavaScript app templates

View File

@@ -20,22 +20,57 @@
"test-no-suspense": "0.0.0",
"test-trailing-slash": "0.0.0",
"test-middleware": "0.0.0",
"test-react-query-utils": "0.0.0"
"test-react-query-utils": "0.0.0",
"toolkit-app-passport": "1.0.1-alpha.16",
"test-get-initial-props": "0.0.0",
"@blitzjs/recipe-base-web": "0.34.0-canary.0",
"@blitzjs/recipe-bulma": "0.34.0-canary.0",
"@blitzjs/recipe-bumbag-ui": "0.34.0-canary.0",
"@blitzjs/recipe-chakra-ui": "0.34.0-canary.0",
"@blitzjs/recipe-emotion": "0.34.0-canary.0",
"@blitzjs/recipe-gh-action-yarn-mariadb": "0.34.0-canary.0",
"@blitzjs/recipe-gh-action-yarn-postgres": "0.34.0-canary.0",
"@blitzjs/recipe-ghost": "0.40.0-canary.9",
"@blitzjs/recipe-graphql": "0.34.0-canary.0",
"@blitzjs/recipe-logrocket": "0.34.0-canary.0",
"@blitzjs/recipe-material-ui": "0.34.0-canary.0",
"@blitzjs/recipe-next-ui": "0.34.0-canary.0",
"@blitzjs/recipe-passenger": "0.34.0-canary.0",
"@blitzjs/recipe-quirrel": "0.34.0-canary.0",
"@blitzjs/recipe-reflexjs": "0.34.0-canary.0",
"@blitzjs/recipe-render": "0.34.0-canary.0",
"@blitzjs/recipe-secureheaders": "0.34.0-canary.0",
"@blitzjs/recipe-stitches": "0.34.0-canary.0",
"@blitzjs/recipe-styled-components": "0.34.0-canary.0",
"@blitzjs/recipe-tailwind": "0.34.0-canary.0",
"@blitzjs/recipe-theme-ui": "0.34.0-canary.0",
"@blitzjs/recipe-vanilla-extract": "0.34.0-canary.0",
"test-rpc-path-root": "0.0.0",
"test-full-auth-with-rpc": "0.0.0"
},
"changesets": [
"afraid-dancers-juggle",
"afraid-ears-repair",
"big-phones-bow",
"blue-flowers-peel",
"blue-pigs-tan",
"brave-zebras-deny",
"breezy-bees-beg",
"breezy-cameras-double",
"breezy-moose-behave",
"bright-mangos-run",
"brown-avocados-wink",
"calm-books-push",
"calm-carpets-deny",
"calm-horses-tie",
"calm-nails-wait",
"calm-papayas-protect",
"calm-tomatoes-drive",
"chilled-carrots-own",
"chilly-candles-care",
"chilly-nails-nail",
"clean-hats-pump",
"clean-hounds-laugh",
"clean-walls-wink",
"clever-radios-lie",
"cool-doors-invent",
@@ -43,31 +78,46 @@
"cuddly-pugs-crash",
"curly-rules-speak",
"curly-seas-serve",
"curvy-days-attend",
"cyan-bulldogs-heal",
"cyan-cars-greet",
"dirty-monkeys-greet",
"dirty-planets-chew",
"dull-rings-arrive",
"early-lamps-itch",
"eighty-apes-sleep",
"eleven-humans-sort",
"eleven-lobsters-drop",
"empty-berries-rule",
"empty-pants-search",
"empty-turkeys-wave",
"fair-carrots-guess",
"fair-kangaroos-clean",
"fair-wombats-sneeze",
"famous-kings-explain",
"fast-clocks-push",
"fast-papayas-grow",
"fast-trainers-kneel",
"few-dogs-fetch",
"few-hounds-worry",
"few-shrimps-leave",
"flat-bees-approve",
"fluffy-coats-flow",
"fluffy-mangos-begin",
"fluffy-mice-wash",
"forty-timers-rhyme",
"four-brooms-juggle",
"four-meals-fry",
"four-sheep-judge",
"funny-cups-pay",
"fuzzy-bees-warn",
"fuzzy-dots-cross",
"fuzzy-jars-admire",
"gentle-dogs-reply",
"gentle-lions-explode",
"giant-mails-tap",
"giant-students-carry",
"giant-timers-search",
"gold-horses-punch",
"good-apes-drum",
"good-insects-wink",
@@ -79,35 +129,57 @@
"great-terms-rescue",
"green-papayas-do",
"green-pillows-hammer",
"happy-bees-lick",
"happy-hotels-visit",
"happy-paws-join",
"healthy-rice-shout",
"heavy-apes-judge",
"heavy-cobras-own",
"heavy-students-buy",
"hip-buttons-dance",
"honest-candles-yawn",
"honest-cherries-push",
"honest-comics-vanish",
"hot-cups-rhyme",
"hot-drinks-approve",
"hungry-baboons-swim",
"hungry-pens-collect",
"itchy-cups-double",
"itchy-houses-marry",
"itchy-spoons-tan",
"khaki-ducks-cheer",
"khaki-pens-rest",
"kind-walls-suffer",
"late-steaks-give",
"lazy-maps-sort",
"lemon-games-press",
"lemon-pillows-switch",
"lemon-seas-push",
"lemon-teachers-jam",
"light-donkeys-double",
"light-squids-draw",
"little-pears-ring",
"long-bees-hope",
"long-dancers-jog",
"long-hounds-melt",
"long-lobsters-drop",
"lovely-berries-sell",
"lovely-colts-share",
"lucky-cows-try",
"lucky-months-guess",
"lucky-years-turn",
"mean-gorillas-reply",
"modern-cameras-pull",
"modern-games-dream",
"modern-ligers-behave",
"moody-bags-walk",
"moody-spoons-rhyme",
"moody-squids-cheer",
"nasty-suns-wash",
"nervous-beds-travel",
"nervous-dolls-rule",
"new-coats-turn",
"new-olives-protect",
"nice-deers-dream",
"nice-starfishes-live",
"nine-birds-confess",
@@ -115,9 +187,13 @@
"ninety-lies-press",
"ninety-pets-heal",
"ninety-rice-tickle",
"odd-bears-run",
"olive-bees-buy",
"olive-dragons-drum",
"olive-feet-rhyme",
"olive-kings-invent",
"olive-sheep-rhyme",
"orange-mirrors-tap",
"orange-zebras-reflect",
"perfect-eyes-repeat",
"perfect-trains-double",
@@ -130,27 +206,36 @@
"popular-teachers-pay",
"pretty-games-march",
"purple-donkeys-smash",
"purple-jars-begin",
"purple-singers-greet",
"quick-cycles-confess",
"quick-dots-fetch",
"quiet-feet-travel",
"quiet-pans-hunt",
"quiet-sloths-rule",
"rare-crews-sleep",
"red-badgers-retire",
"red-gorillas-marry",
"rich-chairs-invent",
"rich-gorillas-develop",
"rich-queens-travel",
"rotten-rocks-remember",
"rude-trainers-visit",
"serious-mugs-leave",
"shaggy-carpets-brake",
"sharp-falcons-begin",
"sharp-olives-sip",
"shy-olives-hang",
"shy-pumpkins-try",
"shy-socks-eat",
"silent-colts-reply",
"silent-lies-run",
"silly-apricots-share",
"silly-shoes-agree",
"six-apricots-kick",
"slimy-humans-impress",
"slimy-needles-taste",
"slow-impalas-tap",
"slow-walls-camp",
"slow-walls-poke",
"small-socks-confess",
@@ -159,30 +244,45 @@
"smooth-stingrays-drum",
"smooth-tools-train",
"soft-adults-smell",
"soft-fans-carry",
"sour-lemons-hunt",
"sour-mails-lick",
"spicy-beds-float",
"spotty-dingos-stare",
"spotty-lies-visit",
"spotty-peas-hope",
"spotty-zoos-film",
"stale-jobs-drum",
"stale-parents-yawn",
"strong-apes-reply",
"strong-keys-lie",
"stupid-rabbits-jump",
"stupid-walls-sell",
"sweet-kiwis-cross",
"swift-drinks-dress",
"swift-poets-travel",
"tall-meals-learn",
"tame-keys-reply",
"tame-pumpkins-nail",
"tasty-maps-fetch",
"tasty-news-collect",
"ten-hairs-listen",
"ten-rivers-burn",
"tender-cooks-tie",
"tender-pianos-check",
"thick-moons-fry",
"thick-parrots-float",
"thirty-countries-build",
"thirty-spies-applaud",
"three-lies-pull",
"three-toes-sell",
"tidy-clouds-smoke",
"tidy-llamas-compare",
"tough-toes-pull",
"tricky-kids-press",
"twelve-hornets-sip",
"twelve-lemons-smile",
"twelve-needles-worry",
"twenty-beans-pump",
"two-carpets-rhyme",
"two-eyes-knock",
@@ -194,6 +294,7 @@
"violet-bags-leave",
"violet-lions-help",
"weak-suns-shave",
"wicked-badgers-smoke",
"wicked-ghosts-cough",
"wicked-rings-walk",
"wise-eels-visit",

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Fix missing MockRouter prop in test utils

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": minor
---
Fix mutability bug in RPC configuration

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/auth": patch
"@blitzjs/next": patch
---
Added option `role` to `authenticate` property of `BlitzPage` to authenticate page with respect to the role of the user. `String` value or `Array` of strings can be passed to authorize users.

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": patch
---
fix: allow `GET` requests without `params` and `meta` keys

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Fix blitz install for recipes that use the path helper to check if ./src/pages directory is available, otherwise use ./pages

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Patch next13 for suspense error

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
using "blitz install" inside recipe with addRunCommandStep causes hangs up

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Fix `useSession` hook by exporting `enhancePrisma` from the server entry point instead of server

View File

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

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/auth": minor
---
fix failed localStorage access to not crash the application

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/codemod": patch
---
Fix detecting `blitz.config.(ts|js)` config file when running the codemod.

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Add `blitz console` CLI command back to toolkit

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
Include resolvers in `src` directory in blitz console

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Remove `views` property from `Session.PublicData` in `types.ts` file

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": patch
---
Support full api of tanstack invalidateQueries

View File

@@ -0,0 +1,5 @@
---
"blitz": minor
---
add `currentPassword` to the default fields that are masked in the logger

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---
Fix invalidateQuery generating wrong param when no param argument is passed

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---
Add missing Layout.tsx for generated mimimalapp

View File

@@ -0,0 +1,7 @@
---
"blitz": patch
"@blitzjs/next": patch
"@blitzjs/rpc": patch
---
Fix ambigious class warning log & upgrade superjson from 1.9.1 to 1.11.0

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/next": patch
"blitz": patch
---
Add an href property to the generated route manifest that will return a string of the pathname and included query params.

View File

@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---
Migrate over recipe functionality from legacy framework & expose recipe builder helper functions that find and modify next.config.js, blitz-server & blitz-client.

View File

@@ -0,0 +1,5 @@
---
"blitz": patch
---
add regex to support inline and non-inline codebase and proper next.js package version check

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": minor
---
fix resolverPath:root and make it work with monorepo resolvers

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/generator": minor
---
Redesign the index page for newly generated blitz projects

View File

@@ -0,0 +1,7 @@
---
"blitz": patch
"@blitzjs/next": patch
"@blitzjs/generator": patch
---
Add client testing utilities and a sample test to a new blitz app template

View File

@@ -0,0 +1,5 @@
---
"@blitzjs/next": patch
---
Treat API Route handler as a middleware. This allows outer middlewares to completely wrap queries and mutations.

4
.github/CODEOWNERS vendored
View File

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

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

@@ -7,10 +7,9 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TURBO_TOKEN: 05de0230f01174d1f8cb4845a01dc6c895ce28f04ebef2318ab11615791b871c35eabbf8
TURBO_TEAM: foo
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
jobs:
lint:
@@ -20,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.32.6
version: 7.11.0
- name: Setup node
uses: actions/setup-node@v2
with:
@@ -29,15 +28,10 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpm manypkg check
- name: Turborepo local server
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}
- name: Build
run: pnpm build -- --api="http://127.0.0.1:9080"
run: pnpm build
- name: Lint
run: pnpm lint -- --api="http://127.0.0.1:9080"
run: pnpm lint
build:
runs-on: ubuntu-latest
@@ -46,23 +40,17 @@ jobs:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.32.6
version: 7.11.0
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm manypkg check
- name: Turborepo local server
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}
- name: Build
run: pnpm build -- --api="http://127.0.0.1:9080"
run: pnpm build
- name: Build Apps
run: pnpm build:apps -- --api="http://127.0.0.1:9080"
run: pnpm build:apps
Unit-Tests:
name: "Unit Test: ${{ matrix.os }} (node@16)"
@@ -82,7 +70,7 @@ jobs:
- name: Setup PNPM
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.32.6
version: 7.11.0
- name: Setup node@16
uses: actions/setup-node@v2
@@ -94,17 +82,8 @@ jobs:
run: pnpm install --frozen-lockfile
shell: bash
- run: pnpm manypkg check
shell: bash
- name: Turborepo local server
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}
- name: Build
run: pnpm build -- --api="http://127.0.0.1:9080"
run: pnpm build
shell: bash
- name: Test Packages
@@ -127,9 +106,9 @@ jobs:
shell: bash
run: |
cd ./integration-tests
tree -J -d -L 1 | jq -c '.[0].contents | map(.name | tostring)'
folders=$(tree -J -d -L 1 | jq -c '.[0].contents | map(.name | tostring)')
echo "::set-output name=folders::$folders"
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 }} "
@@ -150,7 +129,7 @@ jobs:
- name: Setup PNPM
uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.32.6
version: 7.11.0
- name: Setup node@${{ matrix.NODE_VERSION }}
uses: actions/setup-node@v2
@@ -162,17 +141,13 @@ jobs:
run: pnpm install --frozen-lockfile
shell: bash
- run: pnpm manypkg check
- name: Install playwright
run: |
pnpx playwright@1.28.0 install --with-deps
shell: bash
- name: Turborepo local server
uses: felixmosh/turborepo-gh-artifacts@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}
- name: Build
run: pnpm build -- --api="http://127.0.0.1:9080"
run: pnpm build
shell: bash
- name: Test Packages

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

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

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
.vscode/settings.json vendored Normal file
View File

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

View File

@@ -6,7 +6,7 @@
<img alt="" src="https://img.shields.io/badge/Join%20our%20community-6700EB.svg?style=for-the-badge&labelColor=000000&logoWidth=20&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQ9SURBVHgB7d3dVdtAEIbhcSpICUoH0IEogQqSVBBSAU4FSSpIOoAORAfQgSghHXzZ1U/YcMD4R9rZmf2ec3y448LyiNf27iLiGIAmPLrweC9Un3DhrzG6EarLNP09nlwJ1SOZ/lQr5N80/S/p2QMVCBf5N17XCfm1Y/rBHqjAG9PPHvBsz+mf9WAP+HLA9M/YA14cOP2payH7jpj+VCtk1wnTP+vj7xCy6cTpn7EHLMLp059iD1iD8eveJbVCNsSLheX1YA/YgOWnf8YeKB3Wmf7Ud6Fy4f/FHmtpxbl3YlC4MJ/Cj0bWdwPnPbARg+L0S54XQHS32WwuxClzd4CM0z9rPfeAuTtA5ulPXYQ7wZ04Y+oOoDD9KZc9YOoOoDj9s4dwFzgXR6w1wIPoOvPWA9buAHEJ173o3gWiy3AnuBUHLEbgmYwvAk1/wuM8vAgexThzbwPDkx7/DHwVXfFOxP2GmsKd4Ab6zPeAyU8CI7AHFmH2BRCBPXAyk18GzUrqAXCTiR4ssyj0VFw/oCU8+e+RZ33AWz6KMaYbIIWxB+JSLs1bsbkeMN0AqakHvoku9oA2sAfqBvbAQdw0QArsgb25aYBUQT3QgT2gB+yBuqGcHij2UCqXDZACe2Anlw2QYg/QAOyBuoE98CL3DZDCuK4/rh/Q7oGL6U+TOvcNkJoijN8X1C48+T+g75eQDrAH/qmqAVJgDwyqaoAUe4AGYA/UDZX3QLUNkEIZPRCd5+6BahsgVUgPROwBTSijB7jpVAvGHriHvmw9wAZ4BpX1ABvgmakHtPcbRuwBTWAPULgAV9D/jKDY9YRvwvgEaurD44uQHvAol7qBW7WKluVtIHiUS7GyvA0s6CiXDnxrpQfsgbqBS7GKk/2jYHCrVlGyfxTMrVo0ALdq1Q3sgSKofh0M9oA61a+D2QM0AHugbmAPqClmSRjK2apVVQ8UsySsoK1aHdgDesCtWnUDeyCrIpeFg1u3sylyWTi3btMA7IG6gT2wuuK3hoE9sKrit4YVslWLPaAN7IG6ocKt2zmY2h4O9sDiTG0PZw/QANy6XTewBxZj9ogYVHy025LMHhEz9cBn0We6B0yfERReBLfhx0/R1YQHPx/QBPbA0VwcEwf2wNFcHBPHHjiem3MC2QPHcXdSaJjA+KfgTPQ8hhfjBzHC40mhlzJ+Xq9lK4a4PCs43AVaGTed5mZq+iOXZwWHi3AnOj2wFWNcnxYe7gTxLtBKHuamP/J+Wnh8a5irB7ZC5Yk9gPX1QuXC+usHWqGyhYvUYR0a7zboUOFCNVhnk0krZAOW7wFOvzXhom2xnEbIHizTA1wEYhWW6YFGyC6c1gOcfg9wfA80Qj7g8B7g9HuCww+haIR8wf49wOn3Cvv9k8tGyC/s7gFOv3fY3QONkH+v9MBWqB7PeqDn9FcIT//kcitUn6kHOu/T/xfWzlQy3dEHhwAAAABJRU5ErkJggg==">
</a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-393-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
<a aria-label="All Contributors" href="#contributors-"><img alt="" src="https://img.shields.io/badge/all_contributors-403-17BB8A.svg?style=for-the-badge&labelColor=000000"></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<a aria-label="License" href="https://github.com/blitz-js/blitz/blob/main/LICENSE">
<img alt="" src="https://img.shields.io/npm/l/blitz.svg?style=for-the-badge&labelColor=000000&color=blue">
@@ -76,6 +76,9 @@ Your financial contributions help ensure Blitz continues to be developed and mai
</a></td>
<td><a aria-label="MeetKai" href="https://meetkai.com/?ref=blitzjs">
<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>
@@ -132,8 +135,7 @@ 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 />Lead Maintainer</td>
</tr>
</table>
@@ -195,6 +197,14 @@ _Issue triage, pull request triage, community encouragement and moderation, etc_
</sub>
</a>
</td>
<td align="center">
<a href="https://siddharthsuresh.vercel.app/">
<img src="https://avatars.githubusercontent.com/u/83594610?v=4" width="100px;" alt="Siddharth Suresh avatar" /><br />
<sub>
<b>Siddharth Suresh</b>
</sub>
</a>
</td>
</tr>
</table>
<!-- markdownlint-enable -->
@@ -523,7 +533,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>
@@ -605,12 +615,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>
@@ -712,11 +722,23 @@ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/e
<td align="center"><a href="https://chaiwattsw.com/"><img src="https://avatars.githubusercontent.com/u/30198386?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chaiwat Trisuwan</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=chaiwattsw" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=chaiwattsw" title="Code">💻</a></td>
<td align="center"><a href="oltdaniel.eu"><img src="https://avatars.githubusercontent.com/u/53529846?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniel Oltmanns</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=oltdaniel" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=oltdaniel" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/edrickleong"><img src="https://avatars.githubusercontent.com/u/10529706?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Edrick Leong</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=edrickleong" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=edrickleong" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=edrickleong" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/siddhsuresh"><img src="https://avatars.githubusercontent.com/u/83594610?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Siddharth Suresh</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=siddhsuresh" title="Code">💻</a></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></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>
</tr>
</table>

View File

@@ -67,7 +67,7 @@ Here is the starting structure of your app.
```
__name__
├── app/
├── src/
│ ├── api/
│ ├── auth/
│ │ ├── components/
@@ -92,8 +92,6 @@ __name__
│ │ ├── components/
│ │ │ ├── Form.tsx
│ │ │ └── LabeledTextField.tsx
│ │ ├── hooks/
│ │ │ └── useCurrentUser.ts
│ │ └── layouts/
│ │ └── Layout.tsx
│ ├── pages/
@@ -103,6 +101,8 @@ __name__
│ │ ├── index.test.tsx
│ │ └── index.tsx
│ └── users/
│ ├── hooks/
│ │ └── useCurrentUser.ts
│ └── queries/
│ └── getCurrentUser.ts
├── db/
@@ -131,7 +131,7 @@ __name__
These files are:
- The `app/` folder is a container for most of your project. This is where youll put any pages or API routes.
- The `src/` folder is a container for most of your project. This is where youll put any pages or API routes.
- `db/` is where your database configuration goes. If youre writing models or checking migrations, this is where to go.

View File

@@ -27,38 +27,40 @@
"@blitzjs/config": "workspace:*",
"@blitzjs/next": "workspace:*",
"@blitzjs/rpc": "workspace:*",
"@hookform/resolvers": "2.8.8",
"@prisma/client": "4.0.0",
"blitz": "workspace:2.0.0-beta.4",
"@hookform/error-message": "2.0.0",
"@hookform/resolvers": "2.9.10",
"@prisma/client": "4.6.0",
"blitz": "workspace:2.0.0-beta.22",
"next": "12.2.5",
"openid-client": "5.1.8",
"prisma": "4.0.0",
"openid-client": "5.2.1",
"prisma": "4.6.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "7.29.0",
"ts-node": "10.7.0",
"zod": "3.17.3"
"react-hook-form": "7.39.1",
"ts-node": "10.9.1",
"zod": "3.20.2"
},
"devDependencies": {
"@next/bundle-analyzer": "12.0.8",
"@testing-library/react": "13.0.0",
"@testing-library/react-hooks": "7.0.2",
"@types/jest": "27.4.1",
"@types/node": "17.0.16",
"@testing-library/react": "13.4.0",
"@testing-library/react-hooks": "8.0.1",
"@types/jest": "29.2.2",
"@types/node": "18.11.9",
"@types/preview-email": "2.0.1",
"@types/react": "18.0.17",
"@typescript-eslint/eslint-plugin": "5.9.1",
"eslint": "7.32.0",
"eslint-config-next": "12.2.0",
"@types/react": "18.0.25",
"@typescript-eslint/eslint-plugin": "5.42.1",
"eslint": "8.27.0",
"eslint-config-next": "12.3.1",
"eslint-config-prettier": "8.5.0",
"husky": "7.0.4",
"jest": "27.5.1",
"lint-staged": "12.1.7",
"prettier": "^2.5.1",
"prettier-plugin-prisma": "3.8.0",
"husky": "8.0.2",
"jest": "29.3.0",
"jest-environment-jsdom": "29.3.0",
"lint-staged": "13.0.3",
"prettier": "^2.7.1",
"prettier-plugin-prisma": "4.4.0",
"pretty-quick": "3.1.3",
"preview-email": "3.x",
"typescript": "^4.5.3"
"preview-email": "3.0.7",
"typescript": "^4.8.4"
},
"private": true
}

View File

@@ -1,9 +1,9 @@
import { AuthenticationError, PromiseReturnType } from "blitz"
import Link from "next/link"
import { LabeledTextField } from "app/core/components/LabeledTextField"
import { Form, FORM_ERROR } from "app/core/components/Form"
import login from "app/auth/mutations/login"
import { Login } from "app/auth/validations"
import { LabeledTextField } from "src/core/components/LabeledTextField"
import { Form, FORM_ERROR } from "src/core/components/Form"
import login from "src/auth/mutations/login"
import { Login } from "src/auth/validations"
import { useMutation } from "@blitzjs/rpc"
import { Routes } from "@blitzjs/next"

View File

@@ -1,7 +1,7 @@
import { LabeledTextField } from "app/core/components/LabeledTextField"
import { Form, FORM_ERROR } from "app/core/components/Form"
import signup from "app/auth/mutations/signup"
import { Signup } from "app/auth/validations"
import { LabeledTextField } from "src/core/components/LabeledTextField"
import { Form, FORM_ERROR } from "src/core/components/Form"
import signup from "src/auth/mutations/signup"
import { Signup } from "src/auth/validations"
import { useMutation } from "@blitzjs/rpc"
type SignupFormProps = {

View File

@@ -9,7 +9,7 @@ export default resolver.pipe(
resolver.zod(ChangePassword),
resolver.authorize(),
async ({ currentPassword, newPassword }, ctx) => {
const user = await db.user.findFirst({ where: { id: ctx.session.userId as number } })
const user = await db.user.findFirst({ where: { id: ctx.session.userId } })
if (!user) throw new NotFoundError()
await authenticateUser(user.email, currentPassword)

View File

@@ -2,6 +2,7 @@ import { setupBlitzServer } from "@blitzjs/next"
import { AuthServerPlugin, PrismaStorage } from "@blitzjs/auth"
import db from "db"
import { simpleRolesIsAuthorized } from "@blitzjs/auth"
import { BlitzLogger } from "blitz"
const { gSSP, gSP, api } = setupBlitzServer({
plugins: [
@@ -11,6 +12,7 @@ const { gSSP, gSP, api } = setupBlitzServer({
isAuthorized: simpleRolesIsAuthorized,
}),
],
logger: BlitzLogger({}),
})
export { gSSP, gSP, api }

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