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

Compare commits

...

724 Commits

Author SHA1 Message Date
Brandon Bayer
ed23307267 v0.16.5-canary.7 2020-07-25 18:50:11 +07:00
Brandon Bayer
436bd4e306 v0.16.5-canary.6 2020-07-25 18:43:56 +07:00
Brandon Bayer
8ee9df51fd 🎉 Add Passport.js authentication adapter! (#796)
(minor)
2020-07-25 18:31:56 +07:00
robertgrzonka
a421212e63 Add github orkflow for bundle size reporting (#799)
Co-authored-by: Brandon Bayer <b@bayer.ws> (meta)
2020-07-25 16:46:38 +07:00
allcontributors[bot]
10c3b248e9 docs: add robertgrzonka as a contributor (#802)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-07-25 13:43:44 +07:00
Brandon Bayer
b5da9c2822 Add bundle analyzer to auth example (#795)
(example)
2020-07-24 20:32:44 +07:00
Brandon Bayer
509110b1ea Fix regression from getConfig in session management file (#793)
* fix regression from getConfig in session management file

* bump CI (ignore)
2020-07-24 20:32:23 +07:00
Brandon Bayer
852fdc6016 Update README.md 2020-07-24 16:18:05 +07:00
Brandon Bayer
69449ca6b9 Fix cannot read property 'getSession' of undefined (#790)
(patch)
2020-07-24 15:31:38 +07:00
Brandon Bayer
35ff20bc78 Fully fix errors from useQuery during pre-rendering (#791)
(patch)
2020-07-24 15:31:15 +07:00
Brandon Bayer
000cf2d4bf Revert "Allow custom DB connection logic and add example for using DB clients other than Prisma (#739)"
This reverts commit 20f1d99e7c.
2020-07-23 20:29:05 +07:00
Simon Knott
20f1d99e7c Allow custom DB connection logic and add example for using DB clients other than Prisma (#739)
(minor)
2020-07-23 19:24:24 +07:00
Brandon Bayer
960e225f0c fix yarn.lock 2020-07-22 22:24:10 +07:00
Brandon Bayer
d8449d4458 v0.16.5-canary.5 2020-07-22 22:22:49 +07:00
Brandon Bayer
50e20b812c Fix global middleware not working in serverless builds (#787)
(patch)
2020-07-22 22:17:53 +07:00
Brandon Bayer
fa8616f8a3 Fix blitz db migrate stuck on first production deploy (#786)
(patch)
2020-07-22 18:23:12 +07:00
Brandon Bayer
362352379d Enable CI cache for windows (#785)
(meta)
2020-07-22 17:49:17 +07:00
Dylan Brookes
580e2724ff Remove GUI code - rework in progress (#781)
Co-authored-by: merelinguist <merelinguist@users.noreply.github.com> (meta)
2020-07-22 16:00:40 +07:00
allcontributors[bot]
19c3f13de9 docs: add rubenmoya as a contributor (#783)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-07-22 15:58:53 +07:00
Rubén Moya
53f3fbf7c7 Fix auth public-data-token localstorage key (#780)
(patch)
2020-07-22 15:58:15 +07:00
Adam Markon
7426fc5794 Add Blitz Recipe for Tailwind CSS (#776) 2020-07-21 09:32:59 -04:00
Brandon Bayer
089ca908ed Change auth example to use a shared <Form> component that abstracts the actual form library (#778)
(example)
2020-07-21 16:56:53 +07:00
Brandon Bayer
820c678533 v0.16.5-canary.4 2020-07-21 16:13:53 +07:00
Brandon Bayer
abd0bbd7cf Switch to url safe CSRF tokens (#777)
(patch)
2020-07-21 15:48:22 +07:00
Brandon Bayer
af68b9aa0a v0.16.5-canary.3 2020-07-21 10:18:46 +07:00
Adam Markon
4ce2161ec7 Improved API for defining Blitz Recipes (#770)
(minor)
2020-07-20 10:47:55 -04:00
Brandon Bayer
2d9338a613 v0.16.5-canary.2 2020-07-20 20:47:33 +07:00
Brandon Bayer
9e39c4229b Fix auth with SSR + add full ssr auth example (#774)
(patch)
2020-07-20 20:40:24 +07:00
dependabot[bot]
ea58cc336b Bump lodash from 4.17.15 to 4.17.19 (#769)
(meta)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 09:41:14 +07:00
Brandon Bayer
323bb28cc3 Refactor auth example, add signup/login pages, add react-final-form (#766)
(example)
2020-07-18 17:52:04 +07:00
Brandon Bayer
7f232be90f v0.16.5-canary.1 2020-07-18 16:29:54 +07:00
Brandon Bayer
60d48c6f83 Fix session management in SSR (#765)
(patch)
2020-07-18 16:20:50 +07:00
Brandon Bayer
0753dae8ca Add optional returnType parameter to useParams (#759)
(minor)
2020-07-18 14:54:48 +07:00
Brandon Bayer
d70cf53f16 Fix error during static pre-rendering in development (#761)
(patch)
2020-07-18 14:53:30 +07:00
C. K. Tang
c4589bd9fe Fix small README typo in new app template (#764)
(patch)
2020-07-18 11:27:57 +07:00
Brandon Bayer
33b888e1ea Fix a couple useParam() bugs + add full tests (#762)
(patch)
2020-07-18 09:44:03 +07:00
Brandon Bayer
fa8ab60870 delete a few old .md files
(ignore)
2020-07-17 14:39:35 +07:00
Brandon Bayer
7f8609bbea update sponsorship section 2020-07-17 14:29:48 +07:00
Brandon Bayer
927c3ac6a5 fix yarn.lock 2020-07-16 21:09:11 +07:00
Brandon Bayer
2e7f191a31 v0.16.5-canary.0 2020-07-16 21:02:04 +07:00
Brandon Bayer
2da0508964 🎉Add supertokens session management package (#694)
(minor)
2020-07-16 20:51:23 +07:00
Brandon Bayer
02d0d06b84 v0.16.4 2020-07-13 19:33:53 +07:00
Brandon Bayer
4eb00cfdc6 Fix bug preventing use of next-compose-plugins (#746)
(patch)
2020-07-13 19:23:40 +07:00
Brandon Bayer
389921d0da Fix tiny page template issue with an unused import (#744)
(patch)
2020-07-13 18:52:51 +07:00
Brandon Bayer
09ab9cc9fc Upgrade react-query to 2.4.15 (#743)
(patch)
2020-07-13 18:24:06 +07:00
Brandon Bayer
c0efe8c411 Fix lint warnings (#742)
(meta)
2020-07-13 18:04:29 +07:00
Daniel Kempner
26626ced9f Fix comment spelling in display package (#738)
(meta)
2020-07-12 21:57:30 +07:00
Rafael Nunes
d7d733c5a4 Updates README.md in the new app template (#735)
Co-authored-by: Brandon Bayer <b@bayer.ws> (patch)
2020-07-11 10:11:58 +07:00
Brandon Bayer
82fd604be4 v0.16.3 2020-07-08 17:17:49 +07:00
Rudi Yardley
342782fe12 Fix issue with using non-page files inside pages folders (#733)
(patch)
2020-07-08 17:11:04 +07:00
Brandon Bayer
a45235ef58 Update MEETING_NOTES.md 2020-07-07 09:16:13 +07:00
Brandon Bayer
440ed3d81a v0.16.2 2020-07-06 21:41:57 +07:00
Brandon Bayer
fc9da2ace1 Fix buggy global/local CLI resolution code (#731)
(patch)
2020-07-06 21:24:39 +07:00
allcontributors[bot]
9a6fc37b7d docs: add tylangesmith as a contributor (#732)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-07-06 21:16:03 +07:00
Ty Lange-Smith
3ac4303dad Update blitz db cli command to default to --help if no command specified (#730)
(patch)
2020-07-06 21:15:46 +07:00
Brandon Bayer
93f4768535 v0.16.1 2020-07-03 00:04:12 +07:00
Brandon Bayer
a24b78e654 Fix global middleware not running with blitz start --production (#726)
(patch)
2020-07-02 22:59:43 +07:00
Brandon Bayer
843dbc2c66 v0.16.0 2020-07-01 16:30:51 +07:00
Matsumoto Toshi
9e75a75049 Breaking: Upgrade React Query to v2 (#720)
(major)
2020-07-01 16:01:16 +07:00
GaneshMani
df3349e403 Fix experimental flags in blitz.config.js not being used (#721)
(patch)
2020-07-01 15:56:26 +07:00
Brandon Bayer
396613aee3 Fix Router export from 'blitz' (#722)
(patch)
2020-06-30 22:03:51 +07:00
Brandon Bayer
06859d6bdb Add @garrisons as a contributor 2020-06-30 16:01:52 +07:00
Brandon Bayer
d4cb65277b Add @sbardian as a contributor 2020-06-30 16:00:04 +07:00
Brandon Bayer
8b2a50d288 Fix middleware error handling when using next(error) (#719)
(patch)
2020-06-29 18:29:05 +07:00
allcontributors[bot]
10146f6723 docs: add SigurdMW as a contributor (#718)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-27 11:05:20 +07:00
Sigurd Moland Wahl
5294166ea7 Fix blitz db reset for Prisma >=2.0.0-beta.8 (#716)
Co-authored-by: Sigurd Moland Wahl <sigurd.wahl@bouvet.no> (patch)
2020-06-27 10:59:21 +07:00
allcontributors[bot]
fbfc2c86e0 docs: add shaunchurch as a contributor (#717)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-06-27 10:52:56 +07:00
Shaun Church
1cee5ead28 Support Optimistic UI Updates: Add refetch option to useQuery mutate() (#715)
(minor)
2020-06-27 10:52:34 +07:00
Brandon Bayer
eba7be8626 scaffold user code for auth example app
(ignore)
2020-06-23 21:52:51 +07:00
Brandon Bayer
8d699f5a6b Add @styfle as a contributor 2020-06-23 21:48:59 +07:00
Brandon Bayer
35b5f12395 add auth example app (currently empty, PRs coming soon) 2020-06-23 20:55:40 +07:00
Brandon Bayer
2d8fb4b135 update yarn.lock 2020-06-23 20:44:22 +07:00
Brandon Bayer
9bb5730793 v0.15.3 2020-06-23 20:41:42 +07:00
Justin Hall
8bc416d8ae Fix blitz new dependency install issue (missing dependency in @blitzjs/generator) (#711)
(patch)
Co-authored-by: Adam Markon <amarkon895@gmail.com>
2020-06-23 20:34:34 +07:00
Brandon Bayer
48250d04ac Update MEETING_NOTES.md 2020-06-23 09:38:57 +07:00
Matsumoto Toshi
8ecdc3253d Prevent automatic conversion of field names (#708)
Co-authored-by: Adam Markon <amarkon895@gmail.com>
2020-06-22 16:15:04 -04:00
GaneshMani
58900eb9eb Fix blitz start -p 1234 not throwing an error if port 1234 is already in use (#631)
Co-authored-by: mac <mac@macs-MacBook-Pro.local>
Co-authored-by: Brandon Bayer <b@bayer.ws> (patch)
2020-06-22 20:26:31 +07:00
Brandon Bayer
9c04a9d5e4 Update @LoriKarikari as a contributor 2020-06-22 09:02:45 +07:00
Brandon Bayer
c6f47729b4 Update @osirvent as a contributor 2020-06-22 09:02:10 +07:00
Brandon Bayer
7a1b4b40d1 v0.15.2 2020-06-20 16:00:06 +07:00
Brandon Bayer
0f70020312 v0.15.2-canary.3 2020-06-20 15:49:15 +07:00
Brandon Bayer
24ef56ca18 fix bug in form template from last PR
(ignore)
2020-06-20 15:43:14 +07:00
Brandon Bayer
3d85f365db v0.15.2-canary.2 2020-06-20 15:37:04 +07:00
Brandon Bayer
eaa1a88318 Various DX improvements (#706)
(patch)
2020-06-20 15:22:45 +07:00
Brandon Bayer
11e82686d9 Fix broken cli when using npm where global blitz version used instead of local (#705)
(patch)
2020-06-20 15:00:14 +07:00
Brandon Bayer
25f96d0ca6 remove post-checkout git hook - too annoying 2020-06-20 14:44:29 +07:00
Brandon Bayer
4c5bb19766 run prettier on cli.ts file
(ignore)
2020-06-20 14:11:12 +07:00
Brandon Bayer
57a798af34 Fix broken CLI from error: @blitzjs/cli: Cannot find module 'react' (#704)
(patch)
2020-06-20 13:17:36 +07:00
Justin Hall
b3814fc7c0 Standardize prettier options across all Blitz code bases (#703)
Co-authored-by: Brandon Bayer <b@bayer.ws> (meta)
2020-06-19 09:33:57 +07:00
Rafael Nunes
09fc2e10d6 Fix page generator with custom context (#669)
Co-authored-by: Rafael Nunes <rafaelgnds@gmail.com> (patch)
2020-06-19 09:11:46 +07:00
Dylan Brookes
a3fcc3d7b3 GUI design polish (#702)
Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
2020-06-18 22:34:03 +01:00
Brandon Bayer
8ae42c5d97 Add @shaunchurch as a contributor 2020-06-18 09:22:08 +07:00
Brandon Bayer
832820c97c v0.15.1 2020-06-17 18:13:50 +07:00
Brandon Bayer
5ec2f8ca5c fix yarn.lock 2020-06-17 18:08:23 +07:00
Brandon Bayer
581e2fa807 Update MEETING_NOTES.md 2020-06-17 16:24:41 +07:00
Brandon Bayer
b8e2e10288 v0.15.1-canary.0 2020-06-17 11:54:53 +07:00
Rudi Yardley
15c7b76b51 Maybe fix the stuck at _manifest issue: Increase stream highwatermark (#697)
(patch)
2020-06-17 11:49:36 +07:00
Justin Hall
86c7281c46 [Page template] Forward submit event from form to parent event handler (#695)
(patch)
2020-06-17 09:13:12 +07:00
allcontributors[bot]
57fb819152 docs: add simonedelmann as a contributor (#693)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-16 21:00:35 +07:00
Simon Edelmann
acdcdbafb1 Update react-query to 1.5.8 (#692)
Co-authored-by: Brandon Bayer <b@bayer.ws> (patch)
2020-06-16 21:00:18 +07:00
Brandon Bayer
dd2d759d35 v0.15.0 2020-06-16 17:49:32 +07:00
Matsumoto Toshi
3494e07d67 Added params and query to useRouter and withRouter (#677)
Co-authored-by: Brandon Bayer <b@bayer.ws> (major)
2020-06-16 17:38:50 +07:00
allcontributors[bot]
32a3a3f97a docs: add toshi1127 as a contributor (#691)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-16 17:23:10 +07:00
allcontributors[bot]
4386d2cb80 docs: add toshi1127 as a contributor (#690)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-16 17:14:54 +07:00
Matsumoto Toshi
f82e905c8e Prevent blitz db migrate from attempting to create new migration files in production (#683)
(patch)
2020-06-16 17:14:40 +07:00
Brandon Bayer
775d62702f Add HTTP Middleware 🎉 (#652)
(minor)
2020-06-16 16:59:15 +07:00
Justin Hall
f1ec0f8c46 Fix typo in model genereation output (#688) 2020-06-15 12:36:29 -04:00
Justin Hall
247bb8227e Fix top level await in blitz console 🎉 (#659)
Co-authored-by: Adam Markon <amarkon895@gmail.com> (patch)
2020-06-15 22:31:34 +07:00
Brandon Bayer
339ebcab7a v0.14.2-canary.0 2020-06-15 13:50:59 +07:00
Rudi Yardley
fe384f546b Ignore all .git sub files and folders (#687)
(patch)
2020-06-15 13:17:54 +07:00
Brandon Bayer
278fa74e1b v0.14.1 2020-06-15 09:35:50 +07:00
allcontributors[bot]
8587e4618b docs: add donni106 as a contributor (#686)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-15 09:27:49 +07:00
Rudi Yardley
62fb3978b2 Possible fix for stuck at _manifest: Debounce manifest writing (#685)
(patch)
2020-06-15 09:25:45 +07:00
Daniel Molnar
f0573ac033 Fix missing useParam import in edit.tsx page template (#684)
(patch)
- added `useParam` from blitz, which was missing and visiting
  edit pages for created models failed
2020-06-14 21:40:26 -04:00
allcontributors[bot]
799f7b2916 docs: add fnoah as a contributor (#681)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-14 14:59:55 +07:00
Noah Fleischmann
1b2c5a35ef Add spinner for Prettier formatting during 'blitz new' (#680)
(patch)
2020-06-14 14:59:17 +07:00
Fran Zekan
ce49a2da51 Fix eslint warnings in GUI (#679)
(meta)
2020-06-14 14:56:38 +07:00
Fran Zekan
3d4a15efd7 Syncify getConfig method in @blitzjs/config package (#676)
(meta)
2020-06-14 13:01:07 +07:00
Brandon Bayer
9eb85f61ed v0.14.0 2020-06-13 23:00:52 +07:00
Brandon Bayer
f0775cbbb9 v0.14.0-canary.0 2020-06-13 22:38:32 +07:00
Fran Zekan
25e9b2645e Add @blitzjs/config package for internal use (#653)
Co-authored-by: Brandon Bayer <b@bayer.ws> (meta)
2020-06-13 15:20:24 +07:00
allcontributors[bot]
2ace6c728b docs: add tehnuge as a contributor (#675)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-13 15:09:24 +07:00
John Duong
da7f542122 Add AppProps to _app.tsx in new app template (#671) (#674)
(patch)
2020-06-13 15:08:49 +07:00
allcontributors[bot]
8d0da90367 docs: add exclipy as a contributor (#673)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-13 09:25:12 +07:00
Juan Di Toro
24f55ab085 Import Blitz Projects (#643)
Co-authored-by: Dylan Brookes <24858006+merelinguist@users.noreply.github.com>
2020-06-11 17:17:23 +01:00
Brandon Bayer
ea63de0d21 Add three lint rules to catch async/await promise bugs (#662)
(meta)
2020-06-11 09:03:22 +07:00
allcontributors[bot]
2230842648 docs: add donni106 as a contributor (#665)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-11 09:02:18 +07:00
Daniel Molnar
ad77e2cdd9 Sync README parts with blitzjs.com/docs/getting-started (#664)
(meta)
2020-06-11 09:01:47 +07:00
Brandon Bayer
439d12694b Fix broken linting by centralizing it + run via lint-staged (#661)
(meta)
2020-06-10 21:22:49 +07:00
allcontributors[bot]
6a951c9d3c docs: add osirvent as a contributor (#660)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-10 17:43:01 +07:00
Oscar Sirvent
f185138712 Update example apps to Prisma 2.0.0 (#658)
(example)
2020-06-10 17:42:27 +07:00
allcontributors[bot]
bf13f61046 docs: add josemiguelo as a contributor (#657)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-09 18:47:31 +07:00
Dylan Brookes
c3d4882151 Update query/mutation templates for Prisma 2.0.0 (#655)
Co-authored-by: merelinguist <merelinguist@users.noreply.github.com> (patch)
2020-06-09 18:45:38 +07:00
Brandon Bayer
56f4e6efec Update MEETING_NOTES.md
(ignore)
2020-06-09 09:27:49 +07:00
Dylan Brookes
a175fd2f26 Fix pipeline build error (#651) 2020-06-08 15:23:50 +10:00
Brandon Bayer
7975373551 Do some yarn workspace maintenance (#633)
(meta)
2020-06-07 17:35:52 +07:00
allcontributors[bot]
73502e3a9a docs: add gvasquez11 as a contributor (#649)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-07 17:24:32 +07:00
gvasquez11
b04a76a6dc Add missing re-export items from Next.js (#636)
(minor)
2020-06-07 17:24:07 +07:00
Adam Markon
c05b43a4dd Add blitz generate model 🎉 (#545)
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Adam Markon <amarkon@hubspot.com> (minor)
2020-06-07 17:06:50 +07:00
allcontributors[bot]
e99462b8ff docs: add anteprimorac as a contributor (#648)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-07 17:03:14 +07:00
Ante Primorac
201ea1eb25 Add useParam hook (#637)
(minor)
2020-06-07 17:02:14 +07:00
Rudi Yardley
9c9c42309a Add dot option to glob (#646) 2020-06-07 10:49:19 +01:00
Rudi Yardley
baf4907912 Only parse typescript/js files (#645) 2020-06-07 18:17:20 +10:00
Adam Markon
bc1e695ca8 Rewrite recipe installer framework with Ink (#608)
(meta)
2020-06-07 15:03:50 +07:00
Brandon Bayer
3f6b9ef1ad Update PULL_REQUEST_TEMPLATE.md
(ignore)
2020-06-06 21:42:51 +07:00
allcontributors[bot]
a5410053e1 docs: add reymon359 as a contributor (#640)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-06 21:33:58 +07:00
reymon359
798eb7a394 Rename NextScript to BlitzScript (#638)
(major)
2020-06-06 21:33:45 +07:00
Brandon Bayer
cda8313cfd Update README.md
(ignore)
2020-06-06 21:27:58 +07:00
Brandon Bayer
462e22a745 v0.13.0 2020-06-06 16:27:01 +07:00
Brandon Bayer
3215b32b32 tiny improvement to blitz console help text 2020-06-06 16:21:17 +07:00
Rudi Yardley
c64256ca26 Add new unit tests for file-pipeline (#617)
Co-authored-by: Dylan Brookes <24858006+merelinguist@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws> (meta)
2020-06-06 14:27:59 +07:00
Jeremy Liberman
6459d24bce Add rules summary to stages README.md (#629)
Co-authored-by: Brandon Bayer <b@bayer.ws> (meta)
2020-06-06 14:27:38 +07:00
Brandon Bayer
15d00bc8de v0.13.0-canary.3 2020-06-06 13:07:36 +07:00
Brandon Bayer
643e6a1701 update publish script
(ignore)
2020-06-05 22:24:41 +07:00
Brandon Bayer
09932642f9 v0.13.0-canary.2 2020-06-05 22:23:31 +07:00
Brandon Bayer
b3a5ab20d4 v0.13.0-canary.1 2020-06-05 22:17:47 +07:00
Brandon Bayer
9c387e11be update publish script
(ignore)
2020-06-05 22:12:13 +07:00
Brandon Bayer
96013f4a9c v0.13.0-canary.0 2020-06-05 22:07:49 +07:00
Brandon Bayer
a5a8f4268a [RFC] Blitz App Architecture (#73)
Co-authored-by: Sonny <pgs.sonny@gmail.com> (meta)
2020-06-05 22:00:08 +07:00
Brandon Bayer
f398efa76c [RFC] Blitz File Structure & Routing (#74)
(meta)
2020-06-05 21:50:33 +07:00
Brandon Bayer
b34c0d77b9 Remove alpha docs and redirect to blitzjs.com (#628)
(meta)
2020-06-05 21:22:57 +07:00
GaneshMani
922cba40f3 Ensure Prisma client is generated on blitz build & blitz start (#567)
Co-authored-by: Brandon Bayer <b@bayer.ws> (patch)
2020-06-05 21:04:42 +07:00
allcontributors[bot]
451dcb7e45 docs: add ganeshmani as a contributor (#625)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-06-05 20:45:46 +07:00
Rudi Yardley
3b316448a7 Fix ready event bug (#616)
* Apply transform to file-pipeline

* Rewrite writer to correctly report that file has been deleted

* Debug windows issues

* Fix up action changes to run all tests

* Fix bad merge

* Fire ready event as string down pipeline

* Fire ready event always

* Add comment

* Close stream in test

* Debugging: Try skip live watching test

* Don't create the watcher unless we are in watch mode

* Update agnostic-source.test.ts

* Wait for close promise to end before starting other test

* Debug watcher limit issue

* Try increasing watchers

* Try increasing watchers after dependency installation

* Only increase watchers in linux

* Only increase watchers in linux

* Fix bad os selection

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-06-05 19:15:22 +10:00
Ante Primorac
280755c83a Add useParams and useRouterQuery hooks (#574)
Co-authored-by: Brandon Bayer <b@bayer.ws> (minor)
2020-06-04 21:22:15 +07:00
Jamie Davenport
b94a55f9ce [GUI] Fallback to NPM when Yarn isn't installed (#621) 2020-06-04 14:58:03 +01:00
allcontributors[bot]
3ab8951764 docs: add jamiedavenport as a contributor (#622)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-06-04 14:56:39 +01:00
Justin Hall
83f01434c4 Fix 'blitz help' not working from global cli (#613)
(patch)
2020-06-04 19:59:08 +07:00
Elias Johansson
e7dcf1c898 Add useQuery mutate function for updating query cache (#596)
Co-authored-by: Brandon Bayer <b@bayer.ws> (minor)
2020-06-04 19:57:51 +07:00
Rudi Yardley
533f97c1c8 Add universal stream abstraction (#615) 2020-06-04 12:57:18 +01:00
Rudi Yardley
d9fb0dde48 Do not warn on nested route errors (#601)
* Allow api folder inside global pages folder to accommodate plain next app

* Removed warning about nested API routes

* Revert useless change

* Add test cases and fix up algorhythm

* Remove unnecessary function

* Allow Stage to have a ReadWriteStream so we can test it easily

* Add normalize to paths to account for windowz hackrz

* Remove comment

* Tidy up normalize code so it is clearer
2020-06-04 20:43:08 +10:00
Ivan Medina
077644ec76 Add ability to prefetch query data (#546)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-06-03 18:50:31 +07:00
Mykal Machon
21060b410b Fix Glob in GUI for Windows (#609) 2020-06-03 09:26:36 +01:00
Dylan Brookes
f53a560b84 Add base infrastructure for blitz gui (#603)
Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
2020-06-01 15:52:33 +01:00
Rudi Yardley
7bdc524de4 Allow function config in withBlitz (#599) 2020-06-02 00:02:44 +10:00
João Portela
36ffb7c93a Fix blitz console loading freeze (#592)
(patch)
2020-06-01 20:36:46 +07:00
Rudi Yardley
ce9d2aa8dc Extract out file transformer (#591)
* Extract out synchronizer

* Alter codeowner of synchronizer

* Move agnostic input to pipeline

* Fix up manifest writing

* Abstract away Manifest ready output

* Extract rules from pipeline

* Move rules to live within server as they are blitz specific business concerns and depend on next.js

* Fix up auto import error

* Fix up incorrect Manifest type path

* Create DEBUG logger

* Pass configuration to rules not synchronizer

* Rename configureRules function

* Tidy up file transformer API

* Simplify configuration

* synchronizer -> file-pipeline

* Rule -> Stage

* Use nullish coalescing now we have it in TS

* Add documentation for file-pipeline

* Update docs

* Move image and remove outdated diagram

* Update Docs

* Refactor: Remove pipeline folder

* Update readme with a PR suggestion

* Update wait on scripts

* Add Documentation

* Update docs
2020-06-01 09:11:48 +10:00
allcontributors[bot]
05dad27f35 docs: add MykalMachon as a contributor (#594)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-05-31 21:06:17 +07:00
Mykal Machon
1700343f11 Fix queries when Prisma isn't being used (#593)
(patch)
2020-05-31 21:05:56 +07:00
Elias Johansson
2a0ab59f0f Add useInfiniteQuery hook (#590)
(minor)
2020-05-31 12:04:36 +07:00
Rudi Yardley
c057bfd531 Extract out display package (#589)
* Add display package

* Extract out log to display package

* Remove server references from packages that dont use it

* Remove incorrect dependency

* Fix up incorrect module field
2020-05-31 13:00:51 +10:00
Rudi Yardley
855363b2c7 Tidy up tests in server (#584)
* Unify mockFs usage. Provide multiMock function

* Add better comment

* Fix join used before defined
2020-05-30 20:19:53 +10:00
allcontributors[bot]
c8a5304d3c docs: add anteprimorac as a contributor (#581)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-05-30 11:19:24 +07:00
Ante Primorac
3aa919e825 Fix examples/store code style issues (#580)
(meta)
2020-05-30 11:17:30 +07:00
Brandon Bayer
4181efb75c update release script
(meta)
2020-05-29 21:47:13 +07:00
Brandon Bayer
7b7b3383ed v0.12.0 2020-05-29 21:31:21 +07:00
Brandon Bayer
e1b1fcb6b5 v0.12.0-canary.3 2020-05-29 21:19:42 +07:00
Brandon Bayer
d3b9fce0bd v0.12.0-canary.2 2020-05-29 21:06:16 +07:00
Brandon Bayer
5d0531d35a v0.12.0-canary.1 2020-05-29 19:38:23 +07:00
Brandon Bayer
0f6ea26560 failed publish 2020-05-29 19:33:18 +07:00
Brandon Bayer
5c434e3b3e v0.12.0-canary.0 2020-05-29 19:30:00 +07:00
Kevin Tovar
b5f0cb2ae7 Upgrade next to 9.4.4 version (#576)
Co-authored-by: Brandon Bayer <b@bayer.ws> (patch)
2020-05-29 19:23:41 +07:00
Rudi Yardley
02219a22e7 Use previous build for blitz start --production if up-to-date (#565)
(patch)
2020-05-29 18:46:35 +07:00
allcontributors[bot]
c80f28b588 docs: add kevotovar as a contributor (#578)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-05-29 18:43:15 +07:00
allcontributors[bot]
4daa44442f docs: add pixelmord as a contributor (#575)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-05-28 17:49:06 +07:00
Andreas Adam
0bd1b6fefc Add husky git hooks for yarn install when changing branches (#571)
(meta)
2020-05-28 17:48:09 +07:00
Brandon Bayer
0f279082c4 update user guide with pgbouncer instructions for Prisma 2020-05-28 17:09:33 +07:00
Brandon Bayer
cde418ffae add architecture diagram to readme
(meta)
2020-05-28 17:06:34 +07:00
Jack Clancy
9e681c6363 Add studio pkg.json script to new app template (#568)
(minor)
2020-05-28 17:03:58 +07:00
Rafael Nunes
2b4aa6fb2e Extract CLI repl into its own package (#520)
Co-authored-by: Brandon Bayer <b@bayer.ws> (meta)
2020-05-27 20:48:12 +07:00
Brandon Bayer
c11ffe82b0 Fix error in types for generated queries (#537)
(patch)
2020-05-27 18:14:27 +07:00
John Letey
0296f3c5c3 Tiny refactor to new app template's index page (#563)
(patch)
2020-05-27 18:09:53 +07:00
allcontributors[bot]
279557459d docs: add jletey as a contributor (#564)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-05-27 18:08:46 +07:00
John Letey
3b64d994f7 Remove the unused jobs folder from the new app template (#561)
(patch)
2020-05-27 18:08:27 +07:00
allcontributors[bot]
50e7a8f1fe docs: add pgrimaud as a contributor (#556)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-05-26 21:38:19 +07:00
Brandon Bayer
f3ad5fde7c disable video for cypress test. Not needed and causing ci problems 2020-05-26 21:26:31 +07:00
allcontributors[bot]
129fd02ce1 docs: add enzoferey as a contributor (#555)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> (meta)
2020-05-26 21:13:31 +07:00
Enzo Ferey
b622847184 Fix some dependency install warnings (#547)
(patch)
2020-05-26 21:12:37 +07:00
Jeremy Liberman
c743e82451 Add support for Dependent Queries to useQuery and usePaginatedQuery (#487)
Co-authored-by: Brandon Bayer <b@bayer.ws>
(patch)
2020-05-26 20:55:04 +07:00
Pierre Grimaud
ee91ef2972 Fix typos (#551) 2020-05-26 12:51:26 +01:00
Brandon Bayer
a7195f44b3 Create MEETING_NOTES.md
(meta)
2020-05-26 09:55:55 +07:00
Brandon Bayer
b1c8cf6e00 add codebase walkthrough video to CONTRIBUTING.md
(meta)
2020-05-25 22:33:09 +07:00
allcontributors[bot]
227f5da7ba docs: add lachlanjc as a contributor (#550)
(meta)
2020-05-25 22:25:27 +07:00
Jack Clancy
dc9c9756ae Improved error messages for blitz db commands (#544)
(patch)
2020-05-24 18:42:33 -04:00
Dylan Brookes
9aebf5129d Add meta and assets packages (#521)
Merging myself since this is zero-impact.
2020-05-24 22:54:57 +01:00
Lachlan Campbell
c23aba87b6 Improve JSON readability on generated show page (#548) 2020-05-24 21:27:27 +01:00
Brandon Bayer
fcd572a5e4 Update README.md 2020-05-23 21:07:38 +07:00
Brandon Bayer
a8e352ce17 Update README.md 2020-05-23 21:05:41 +07:00
Brandon Bayer
e69a7b6166 Update README.md 2020-05-23 21:03:42 +07:00
Brandon Bayer
b66b655154 Update README.md 2020-05-23 21:03:13 +07:00
Brandon Bayer
b900095313 Update README.md 2020-05-23 21:02:45 +07:00
John Cantrell
4f7fc78e59 Update Render deployment instructions in USER_GUIDE (#532)
(patch)
2020-05-22 09:10:00 +07:00
allcontributors[bot]
eaf1e0c340 docs: add nabi009 as a contributor (#536)
(meta)
2020-05-21 21:55:28 +07:00
Adam Markon
8786b2034b Fix bug in installer package with log imports (#535)
(meta)
2020-05-21 21:33:08 +07:00
Fran Zekan
7ec2a22b64 Update Next to 9.4.2 (#534)
(patch)
2020-05-21 21:31:42 +07:00
Brandon Bayer
1429b510bd BREAKING: Change useQuery() to require second argument (#526)
(minor)
2020-05-21 21:06:54 +07:00
Brandon Bayer
b16d6b8e5a update user_guide - add note about render.com not working 2020-05-20 22:41:29 +07:00
Brandon Bayer
2c5bc8dbf4 v0.11.0 2020-05-20 12:45:44 +07:00
Brandon Bayer
25904c8d55 v0.11.0-canary.0 2020-05-20 12:04:48 +07:00
Brandon Bayer
eb7f668d52 Upgrade Next.js to 9.4.1 (#527)
(patch)
2020-05-20 11:55:08 +07:00
Brandon Bayer
f223f84f02 update user_guide - tweak render config slightly 2020-05-20 11:54:55 +07:00
Brandon Bayer
46185f8832 Update some docs for recent template changes 2020-05-20 11:45:18 +07:00
Brandon Bayer
e543e8a892 Update USER_GUIDE for new templates and generate --parent 2020-05-20 11:35:41 +07:00
Abu Uzayr
a7ae0fbc0c Adds a failure message if the cli compilation isn't complete (#524)
(meta)
2020-05-20 10:49:06 +07:00
Adam Markon
3317ab74c2 Add --parent to blitz generate + Lots of code template updates + change route id to modelId (#494)
(minor)
2020-05-20 10:46:33 +07:00
Brandon Bayer
3f265c8f5b increase cypress test timeout
(meta)
2020-05-19 21:42:49 +07:00
Abu Uzayr
0e647ddfac Ensure same prisma client is being used on hot reload (#514)
(patch)
2020-05-19 21:38:52 +07:00
Elias Johansson
1c064e56b2 Extract usePaginatedQuery out of useQuery into a separate hook (#523)
(minor)
2020-05-19 21:24:58 +07:00
Fran Zekan
e63fe53dc6 Fix oclif hook id bug (#522)
(patch)
2020-05-18 19:14:55 +07:00
Brandon Bayer
6858fe4101 Add instructions to deploy to Render.com to the USER_GUIDE (#518)
(patch)
2020-05-16 19:10:15 +07:00
allcontributors[bot]
f5b7b25611 docs: add abuuzayr as a contributor (#513)
(meta)
2020-05-14 23:01:17 +07:00
Abu Uzayr
b2407ebdea Update fork sync script to add upstream remote (#512)
(meta)
2020-05-14 22:55:29 +07:00
Brandon Bayer
caefccfda1 increase timeout for generator test
(ignore)
2020-05-14 22:42:07 +07:00
Brandon Bayer
4f5c09f32c increase jest timeout for cli
(meta)
2020-05-14 22:05:27 +07:00
Brandon Bayer
1c0d7e1d5b v0.10.0 2020-05-14 21:46:11 +07:00
Brandon Bayer
ed27152c51 add back double jest run for cli test so I can publish to npm :/
(ignore)
2020-05-14 21:40:18 +07:00
Brandon Bayer
95bbbfc4e7 Remove typescript-eslint version override for blitz new (#511)
(ignore)
2020-05-14 21:29:04 +07:00
Brandon Bayer
c17e161f80 v0.10.0-canary.1 2020-05-14 20:21:08 +07:00
Brandon Bayer
7456d62171 Revert JS server pipeline rule (#510)
(meta)
2020-05-14 20:06:43 +07:00
Brandon Bayer
9eb5bb4584 Add a plain-js example and build it in our tests (#507)
(meta)
2020-05-14 19:09:39 +07:00
Brandon Bayer
17d9895070 v0.10.0-canary.0 2020-05-14 18:21:29 +07:00
Adam Markon
b7bc20574a 🚀 Add context path option to blitz generate (#493)
(minor)
2020-05-14 18:00:44 +07:00
Brandon Bayer
5dbe2af6ed Make a few cleanups to guides and templates (#506)
(meta)
2020-05-14 17:56:46 +07:00
Fran Zekan
a1e41101cc Update Next.js to 9.4! (requires react 0.0.0-experimental-33c3af284) (#498)
(minor)
2020-05-14 17:29:03 +07:00
Jose Felix
3e04881e96 Enable JavaScript project compilation (#476)
* Rule to compile typescript to javascript

* TS to JS compilation

* Files compile from ts to js

* Added tests

* Remove redundant buffer.from call
2020-05-14 17:47:47 +10:00
Simon Knott
ee6e492185 Fix some node v10 compatibility issues (#454)
(patch)
2020-05-13 14:27:05 +07:00
Brandon Bayer
ec613d4549 Add Jack Clancy (@jclancy93) and Ivan Medina (@ivandevp) as L1 mainta… (#504)
(meta)
2020-05-13 13:41:07 +07:00
Brandon Bayer
717548af26 Update CONTRIBUTING.md
(ignore)
2020-05-13 12:36:19 +07:00
Brandon Bayer
287b72726e Update USER_GUIDE.md
(ignore)
2020-05-13 12:34:57 +07:00
Brandon Bayer
d76fc7494c v0.9.2-canary.1 2020-05-12 23:38:12 +07:00
Brandon Bayer
33e28877e9 Fix blitz new failing because of prettier babel-ts error (#502)
(meta)
2020-05-12 23:32:33 +07:00
Brandon Bayer
114ae77bec v0.9.2-canary.0 2020-05-12 22:55:52 +07:00
Brandon Bayer
4cf74b19b5 Fix git commit error during blitz new (#501)
(patch)
2020-05-12 22:41:32 +07:00
Brandon Bayer
96b12eabe3 Change all dependency versions to be pinned (#500)
(meta)
2020-05-12 22:11:27 +07:00
Brandon Bayer
d51b92bbec update issue template
(ignore)
2020-05-12 21:59:08 +07:00
Brandon Bayer
5e4227181b update PR template
(ignore)
2020-05-12 21:57:38 +07:00
Justin Hall
7761f63534 Fix 'blitz db reset' command (#497) 2020-05-12 21:21:22 +07:00
Brandon Bayer
f1881993dd Fix blitz generate error about prettier parser (#499)
(meta)
2020-05-12 21:05:38 +07:00
Brandon Bayer
7cfc586667 update PR template 2020-05-12 20:55:16 +07:00
Adam Markon
19e4620c23 Support remote packages in the installer (#491)
(meta)
2020-05-12 19:24:13 +07:00
Brandon Bayer
3a407b7c08 add github discussions
(meta)
2020-05-12 11:26:12 +07:00
Nhat Khanh
6eb07b688f Run prettier on output of blitz generate commands (#453)
(patch)
2020-05-10 20:47:21 +07:00
allcontributors[bot]
c147048e6d docs: add lednhatkhanh as a contributor (#489)
(meta)
2020-05-10 20:16:45 +07:00
Dwight Watson
750cba1b19 Fix jest typo (#486)
(meta)
2020-05-10 20:10:16 +07:00
Simon Knott
ffaba32b12 Add CI step to monitor install time (#420)
(meta)
2020-05-09 22:01:08 +07:00
Brandon Bayer
dedad9e55a Add Fauna as a bronze sponsor 🎉 (#484)
(meta)
2020-05-09 09:40:33 +07:00
Brandon Bayer
ea91de84c0 v0.9.1 2020-05-08 19:26:19 +07:00
Brandon Bayer
944ec4576b fix failing cypress test 2020-05-08 19:17:55 +07:00
Brandon Bayer
96b8f69464 v0.9.1-canary.0 2020-05-08 19:11:58 +07:00
Brandon Bayer
17a43b8001 Fix blitz new --js not working in monorepo (#481)
(meta)
2020-05-08 19:02:54 +07:00
Brandon Bayer
cbce0c7ac1 Remove JS instructions and flag until we get bugs fixed (#407)" (#482)
(patch)
2020-05-08 18:55:14 +07:00
Brandon Bayer
0117198864 Remove blitz db migrate from new app template build script (#480)
(patch)
2020-05-08 16:57:41 +07:00
Brandon Bayer
150d320e7f Pin react experimental version & fix graceful fallback for prisma version (#479)
(patch)
2020-05-08 16:40:01 +07:00
Justin Hall
290702e7be ci: run tests on both Windows and Ubuntu (#368)
(meta)
2020-05-08 09:53:29 +07:00
Adam Markon
75a7feabf9 Add base infrastructure for blitz install (#434)
(meta)
2020-05-07 20:18:59 +07:00
Rudi Yardley
603e5cbaf2 Allow blitz in both dependencies and dev dependencies (#474)
(patch)
2020-05-07 20:14:06 +07:00
Justin Hall
3c52246478 Fix RPC routes on Windows (#451)
* fix(server): make @prisma/client omission rule cross-platform

* refactor(server): fix a couple typos

* fix(server): generate RPC routes correctly on Windows
2020-05-07 17:40:50 +10:00
Ivan Medina
3acf590e1c Update react-query to 1.3.3 (#450)
(patch)
2020-05-07 10:18:19 +07:00
Jeremy Liberman
060cfac2f8 Test: Add RPC tests (#449)
(meta)
2020-05-07 10:15:31 +07:00
allcontributors[bot]
3e5d2f4c6f docs: add MrLeebo as a contributor (#457)
(meta)
2020-05-06 18:18:41 +07:00
Simon Debbarma
623c4b37fc Update maintainers on allcontributors (#456)
(meta)
2020-05-06 18:10:50 +07:00
Brandon Bayer
6e85653f82 v0.9.0 2020-05-05 22:15:33 +07:00
Brandon Bayer
8e5e2b3cbd remove release from publish script
(ignore)
2020-05-05 22:09:28 +07:00
Brandon Bayer
094df2a7bb v0.9.0-canary.1 2020-05-05 22:02:34 +07:00
Brandon Bayer
47155fbec3 fix logic for default blitz new --npm flag value
(ignore)
2020-05-05 21:57:10 +07:00
Brandon Bayer
96ef3fe6b7 fix check-before-running error on canary
(ignore)
2020-05-05 21:54:58 +07:00
Brandon Bayer
6cd9d9496c v0.9.0-canary.0 2020-05-05 21:49:50 +07:00
Horie Issei #hashtagtest
223ab891db Fix Node 10 error for Object.fromEntries (#441)
(patch)
2020-05-05 21:45:05 +07:00
allcontributors[bot]
25c5e05ea3 docs: add is2ei as a contributor (#445)
(meta)
2020-05-05 21:43:38 +07:00
allcontributors[bot]
aad5ab772f docs: add dwightwatson as a contributor (#444)
(meta)
2020-05-05 21:42:05 +07:00
Dwight Watson
4651ae021a Enable React Fast Refresh (#435)
(minor)
2020-05-05 21:41:17 +07:00
allcontributors[bot]
8abcc8e78c docs: add ivandevp as a contributor (#443)
(meta)
2020-05-05 21:38:08 +07:00
Brandon Bayer
44532424a9 fix cypress config for store example
(ignore)
2020-05-05 21:37:24 +07:00
Brandon Bayer
bea6fdc0ec Revert "tweak test script"
This reverts commit 3339b131e1.
2020-05-05 21:33:48 +07:00
Brandon Bayer
b6b110fd10 fix store test script by explicitly setting port 2020-05-05 21:31:59 +07:00
Brandon Bayer
3339b131e1 tweak test script
(ignore)
2020-05-05 21:27:13 +07:00
Brandon Bayer
58d1bcf2f9 Change blitz new --no-yarn flag to --npm, for better UX (#442)
(patch)
2020-05-05 17:31:35 +07:00
Brandon Bayer
c5008e263a fix blitz new not working when linked from monorepo
(meta)
2020-05-05 17:23:44 +07:00
Brandon Bayer
ef451feb6a truly fix the yarn dev error 2020-05-05 17:05:16 +07:00
Brandon Bayer
2bf589d4f8 Fix blitz console by adding missing tsconfig-paths dependency (#439)
(patch)
2020-05-05 16:56:10 +07:00
Brandon Bayer
fd8a29f9cd Fix CLI crash when prisma is not installed (#438)
(patch)
2020-05-05 16:50:09 +07:00
Fran Zekan
f0517e072d Add helpful error messages to CLI when trying to use commands outside an app (#319)
(patch)
2020-05-05 16:11:26 +07:00
Brandon Bayer
6cd3abe6ea Fix yarn dev (#437) 2020-05-05 15:48:58 +07:00
allcontributors[bot]
2d8e33151f docs: add harris1717 as a contributor (#436)
(meta)
2020-05-05 15:07:28 +07:00
Jru Harris
307f373b42 Fix file path in TUTORIAL (#429)
(patch)
2020-05-05 15:07:15 +07:00
Ivan Medina
45cbd02370 Adds --port and --hostname to blitz start and dev commands (#413)
(minor)
2020-05-05 15:00:30 +07:00
Justin Hall
cddba4ef7a Fix bug breaking absolute imports in JS projects (#433)
(patch)
2020-05-05 00:01:01 -04:00
Justin Hall
4988dd7a00 test(generator): ignore dist directory (#427) 2020-05-04 13:39:57 -04:00
Brandon Bayer
ea61978d08 chore: remove release from publish script
(ignore)
2020-05-04 22:36:32 +07:00
Brandon Bayer
a11c1d4191 v0.8.2 2020-05-04 22:35:14 +07:00
Brandon Bayer
4ac78002ff Fix lint error for generated code about confirm 2020-05-04 22:28:10 +07:00
Brandon Bayer
10bb5873cf v0.8.2-canary.2 2020-05-04 22:17:27 +07:00
Brandon Bayer
ac30c9f39b add missing generator dependency to blitz 2020-05-04 22:16:14 +07:00
Brandon Bayer
a5d3f9a493 v0.8.2-canary.1 2020-05-04 22:13:27 +07:00
Brandon Bayer
2461caa685 v0.8.2-canary.0 2020-05-04 22:11:02 +07:00
Rafael Nunes
1d16593dce Initialize git before app generate to properly set up husky hooks (#399)
(patch)
2020-05-04 11:04:31 -04:00
Brandon Bayer
3790e2cf17 increase cli jest timeout
(ignore)
2020-05-04 21:49:01 +07:00
Adam Markon
92c0f85c82 Fix badly broken blitz generate command! (#424)
(patch)
2020-05-04 21:40:42 +07:00
Brandon Bayer
2f2496fa00 Add null-loader for @prisma/client to fix child_process crashes (#423)
(patch)
2020-05-04 21:11:53 +07:00
João Portela
e12d17b6c1 Fix additional lint rules (#366)
(meta)
2020-05-04 20:28:15 +07:00
allcontributors[bot]
0153bd1444 docs: add tmns as a contributor (#422)
(meta)
2020-05-04 20:27:56 +07:00
tmns
230c363409 Add instructions on how to generate a plain JS project (#407)
(patch)
2020-05-04 20:27:43 +07:00
allcontributors[bot]
14a09e1e03 docs: add simonpeterdebbarma as a contributor (#421)
(meta)
2020-05-04 20:21:59 +07:00
Simon Debbarma
229272f772 Contributing.md: Add node-pty troubleshooting for WSL (#419)
(meta)
2020-05-04 20:21:02 +07:00
Oscar Sirvent
f450692e65 Fix postcss purge routes on Tailwind example (#381)
(example)
2020-05-04 17:48:32 +07:00
allcontributors[bot]
d4654c8837 docs: add tmns as a contributor (#418)
(meta)
2020-05-04 17:46:26 +07:00
Adam Markon
85fcebadd5 Remove extraneous console.log (#411)
(meta)
2020-05-04 17:39:50 +07:00
tmns
a7fd429e20 Fix fetchRemote dev script to be sh compatible (#406)
(meta)
2020-05-04 17:39:10 +07:00
Brandon Bayer
e688267f3f Update README.md 2020-05-04 13:05:15 +07:00
Adam Markon
c8043d93d4 refactor(cli): split out generator package (#346)
* create generator package

* readme and update lockfile

* copy code ownership

* post-migration cleanup

* fix template compilation

* fix template build
2020-05-03 22:05:24 +01:00
Dylan Brookes
2c9e8e1318 Make tutorial link more prominent 2020-05-03 20:32:12 +01:00
Justin Hall
386a7fdbe5 fix(server): force forward slashes in absolute imports (#393) 2020-05-03 17:56:38 +10:00
Jaga Santagostino
1b02b5fb39 Improve error message for api routes in wrong folder (#342)
(patch)
2020-05-02 19:43:03 +07:00
Brandon Bayer
ff097bd67b v0.8.1 2020-05-02 09:15:33 +07:00
Da-Jin Chu
5a6f73b140 Fix server tests not running on windows (#347)
(meta)
2020-05-02 09:05:11 +07:00
allcontributors[bot]
aa64c5e467 docs: add 0xflotus as a contributor (#397)
(meta)
2020-05-02 08:59:46 +07:00
Brandon Bayer
74487a37d5 Remove pkg comments that got added back accidentally
(ignore)
2020-05-02 08:58:58 +07:00
0xflotus
50a2bd1db7 Change "Zeit" to "Vercel" (#371)
(patch)
2020-05-02 08:56:59 +07:00
Jose Felix
d1c2d44f94 Fix blitz new on Linux (fromEntries/eslint-plugin error) (#396)
(patch)
2020-05-02 08:53:43 +07:00
Brandon Bayer
26ebf8ce48 v0.8.0 2020-05-01 21:15:03 +07:00
Brandon Bayer
2063a1878f fix double jest script
(ignore)
2020-05-01 21:09:16 +07:00
Brandon Bayer
6911a2c60e v0.8.0-canary.5 2020-05-01 20:58:45 +07:00
Brandon Bayer
a44dea27ac remove --parallel in tests
(ignore)
2020-05-01 20:36:49 +07:00
Brandon Bayer
21f29d23ec add back --parallel and double jest call in cli tests, because still failing on 1st run again 2020-05-01 20:31:29 +07:00
Brandon Bayer
83fbd5827b Add Simon Debbarma (@simonpeterdebbarma) as L1 maintainer (#390)
(meta)
2020-05-01 20:16:56 +07:00
Simon Knott
3b595320aa Fix broken blitz start in canary (#389)
(patch)
2020-05-01 20:09:58 +07:00
Lori Karikari
e10f1253db Add blitz db reset command (#339)
(minor)
2020-05-01 20:07:57 +07:00
Brandon Bayer
b7331375df v0.8.0-canary.4 2020-05-01 16:43:58 +07:00
Brandon Bayer
b249ce04a6 Log any errors that happen during blitz start/build 2020-05-01 16:26:30 +07:00
Brandon Bayer
aa5eb90952 v0.8.0-canary.3 2020-05-01 16:07:49 +07:00
Brandon Bayer
6819da290b Remove next dependency from new app template package.json (#387)
(patch)
2020-05-01 16:01:55 +07:00
Brandon Bayer
fd1cd78a05 Remove unnecessary runtime stream logging (#369) (#386)
(ignore)
2020-05-01 15:55:11 +07:00
Brandon Bayer
2b79c3f3bd Revert "fix publish script"
This reverts commit bec4a65d36.
2020-05-01 15:39:01 +07:00
Brandon Bayer
e9ae33700c v0.8.0-canary.2 2020-05-01 15:30:56 +07:00
Brandon Bayer
bec4a65d36 fix publish script 2020-05-01 15:29:56 +07:00
Brandon Bayer
b7a8667003 v0.8.0-canary.1 2020-05-01 15:20:04 +07:00
Brandon Bayer
e6ddb8603f Fix broken blitz start in 0.8.0-canary.0 by reverting #369 (#384)
(patch)
2020-05-01 15:10:25 +07:00
Brandon Bayer
d72f2839d7 v0.8.0-canary.0 2020-05-01 14:42:41 +07:00
Brandon Bayer
7ec6244884 update publish script 2020-05-01 14:37:28 +07:00
allcontributors[bot]
3892b23dfd docs: add peaonunes as a contributor (#382)
(meta)
2020-05-01 14:26:08 +07:00
Elias Johansson
a6c018b93d Hide all the scary warning messages during blitz new (#302)
(patch)
2020-05-01 14:22:43 +07:00
Simon Knott
32d05e2447 Fix git ignored files being processed when they shouldn't (#365)
(patch)
2020-05-01 13:33:18 +07:00
Simon Knott
b08de105ef Major cleanup to blitz new dependency update + graceful failure (Closes #202, #284)
Co-Authored-By: Adam Markon <amarkon895@gmail.com> (patch)
2020-05-01 13:21:08 +07:00
Justin Hall
b0120d718d style: fix editor integration with ESLint (#373)
(meta)
2020-05-01 12:09:24 +07:00
allcontributors[bot]
f8c0f122b9 docs: add developerfred as a contributor (#380)
(meta)
2020-05-01 12:08:37 +07:00
codingsh
bfd4642955 Change @blitzjs/core to blitz in new app template _document (#379)
(patch)
2020-05-01 12:06:39 +07:00
Simon Knott
2fb9abce86 Fix prettier failure on blitz new with npm (#370)
(patch)
2020-05-01 12:04:53 +07:00
Rudi Yardley
a406c82607 Remove unnecessary runtime stream logging (#369)
(patch)
2020-05-01 11:48:31 +07:00
Brandon Bayer
ae15456576 Update MAINTAINERS.md with Slack info
(meta)
2020-05-01 11:18:33 +07:00
Jose Felix
99b4cd628c Native tailwindcss purgecss integration (#362)
* Native tailwindcss purgecss integration

* Requested changes:

- Add next to dev deps
- Remove comments from index.css
2020-04-30 08:49:07 +01:00
allcontributors[bot]
2552a99e6d docs: add merelinguist as a contributor (#364)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-04-30 08:42:18 +01:00
Brandon Bayer
a2b94603a0 Add Jaga Santagostino (@kandros) as L1 maintainer (#363)
(meta)
2020-04-30 14:26:48 +07:00
Brandon Bayer
e846560b3b Update MAINTAINERS.md
(ignore)
2020-04-30 14:19:06 +07:00
Brandon Bayer
fb298bb0c0 Update MAINTAINERS.md Fundamentals section
(meta)
2020-04-30 14:12:09 +07:00
Shinobu Hayashi
b417a6da83 Add lint rule 'no-anonymous default export' for new apps (#337)
(minor)
2020-04-30 12:59:43 +07:00
Devan
c3f0609b0d Update some tutorial issues (#359)
(patch)
2020-04-30 12:26:36 +07:00
João Portela
6e1b8d63e4 Enables linting rules for kebabCase and no-default-export (#298)
(meta)
2020-04-30 12:18:33 +07:00
Rudi Yardley
1774d816a8 Update next in examples (#351)
(example)
2020-04-30 11:50:13 +07:00
allcontributors[bot]
c16f8e65f3 docs: add wKovacs64 as a contributor (#358)
(meta)
2020-04-30 11:49:26 +07:00
Brandon Bayer
54b716ef23 Update MAINTAINERS.md (#357)
(meta)
2020-04-30 11:13:07 +07:00
allcontributors[bot]
1e0cd973e0 docs: add fullmetalengineer as a contributor (#356)
(meta)
2020-04-30 10:57:33 +07:00
Alan Long
d1d3c97303 Tutorial: Fix database query syntax in example code (#354)
(patch)
2020-04-30 10:57:12 +07:00
Brandon Bayer
3f428e3cb3 Add Jeremey Liberman (@MrLeebo) as L1 Maintainer (#355)
(meta)
2020-04-30 10:55:47 +07:00
Justin Hall
44c48839e0 docs(tutorial): fix a couple typos and change some copy (#344)
(patch)
2020-04-30 10:45:38 +07:00
Brandon Bayer
79d9619c3d Fix errors in Tutorial.md for the console usage 2020-04-30 10:39:38 +07:00
Karan Kiri
7b0a483c7b Feature/update server nextjs version (#313)
* updated next version

Co-authored-by: karan kiri <karan.kiri@rebelfoods.co>
2020-04-30 11:31:12 +10:00
Jaga Santagostino
a33005e7c5 Fix Typo (#341)
* fix typo ✍

* typos

* capitalize Blitz
2020-04-29 19:24:24 +01:00
allcontributors[bot]
cec8b6130d docs: add Shinyaigeek as a contributor (#340)
(meta)
2020-04-29 19:53:48 +07:00
allcontributors[bot]
9340d8dec9 docs: add jportela as a contributor (#328)
(meta)
2020-04-29 19:51:58 +07:00
allcontributors[bot]
d29e62965f docs: add kandros as a contributor (#329)
(meta)
2020-04-29 19:49:46 +07:00
allcontributors[bot]
9531593463 docs: add dajinchu as a contributor (#327)
(meta)
2020-04-29 19:49:28 +07:00
Jaga Santagostino
6fabfc41ba Update new app instructions in template for SQLite (#320)
(patch)
2020-04-29 19:48:55 +07:00
Brandon Bayer
dd97061ac1 v0.7.1-canary.1 2020-04-29 19:33:55 +07:00
Brandon Bayer
86ace11282 script add force publish 2020-04-29 19:29:34 +07:00
Brandon Bayer
75816d11fd remove parallel tests so they don't have false failure 2020-04-29 19:28:04 +07:00
Brandon Bayer
612c09f9b3 v0.7.1-canary.0 2020-04-29 19:17:40 +07:00
Dylan Brookes
303ce52757 Add beginner tutorial (#336)
* Add beginner tutorial

* Add links to tutorial

* Fix typo

Co-Authored-By: Brandon Bayer <b@bayer.ws>

* Typo

Co-Authored-By: Brandon Bayer <b@bayer.ws>

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-29 09:43:58 +01:00
Brandon Bayer
9e663e1c37 Add cypress E2E test for store example + CI (+ switch store to SQLite) (#335)
Co-Authored-By: Brandon Bayer <b@bayer.ws> (meta)
2020-04-29 14:16:04 +07:00
Jaga Santagostino
268f8bb4c0 Update contributing.md with weekly call info (#321)
Co-Authored-By: Brandon Bayer <b@bayer.ws> (meta)
2020-04-29 12:46:14 +07:00
Adam Markon
01c016ab7b Add plain JavaScript support with blitz new myapp --js (#305)
Co-Authored-By: Brandon Bayer <b@bayer.ws> (minor)
2020-04-29 12:32:32 +07:00
allcontributors[bot]
746eb7508c docs: add kandros as a contributor (#317)
(meta)
2020-04-29 10:50:02 +07:00
Da-Jin Chu
aeed847926 In-memory FS for server tests (#323) 2020-04-29 11:47:42 +10:00
Adam Markon
3bcc1de895 feat(cli): use custom template format instead of EJS (#281) 2020-04-28 12:59:08 -04:00
Jaga Santagostino
6f3ef059af fix link (#312)
using relative link is branch-independant

Co-authored-by: Dylan Brookes <24858006+merelinguist@users.noreply.github.com>
2020-04-28 17:41:46 +01:00
Adam Markon
523ce93402 Revert "Print helpful error if try to use CLI commands outside of blitz app (#203)" (#316)
This reverts commit e8f68a5c19.
2020-04-28 17:14:01 +01:00
Fran Zekan
e8f68a5c19 Print helpful error if try to use CLI commands outside of blitz app (#203)
(patch)
2020-04-28 21:23:25 +07:00
Justin Hall
d5aa2b77e8 test(server): normalize CWD in relative paths synchronizer rule test (#300)
(meta)
2020-04-28 21:12:56 +07:00
Brandon Bayer
a36d943e05 fix code owners 2020-04-28 21:11:30 +07:00
Brandon Bayer
7459f691ae Add Corey Brown (@coreybrown89) as L1 maintainer (#315)
(meta)
2020-04-28 21:05:35 +07:00
Brandon Bayer
08e351dcc1 Add Lori Karikari (@LoriKarikari) as L1 maintainer (#311)
(meta)
2020-04-28 20:33:45 +07:00
Brandon Bayer
ae3c530d8f Add Elias Johansson (@eliasjohansson) as L1 maintainer (#310)
(meta)
2020-04-28 19:54:05 +07:00
Jaga Santagostino
79f1d23604 Move typescript to devDependencies in new app template (#293)
(patch)
2020-04-28 19:23:45 +07:00
allcontributors[bot]
07a97ba992 docs: add kandros as a contributor (#297)
(meta)
2020-04-28 19:23:06 +07:00
Brandon Bayer
4eb17f088a Add Simon Knott (@skn0tt) as level 1 maintainer (#308)
(meta)
2020-04-28 19:01:31 +07:00
Brandon Bayer
07312c1162 Announcing Official Core Team and Maintainers + Maintainers.md and Governance.md (#307)
(meta)
2020-04-28 18:37:14 +07:00
Brandon Bayer
f519f159cf Update CONTRIBUTING.md 2020-04-28 12:34:55 +07:00
Brandon Bayer
badd5adaf0 final change to release I think 2020-04-27 21:22:18 +07:00
Brandon Bayer
15f30d394c more work on release script 2020-04-27 21:13:17 +07:00
Brandon Bayer
c2b85a747e more work on release.js 2020-04-27 20:36:43 +07:00
Brandon Bayer
cb028a6e3e add release note script 2020-04-27 19:18:27 +07:00
Brandon Bayer
192f79e064 v0.7.0 2020-04-27 19:13:51 +07:00
Brandon Bayer
a8d152ba87 Fix some HMR bugs by upgrading next to 9.3.6-canary.13 (#291)
(patch)
2020-04-27 19:06:19 +07:00
Brandon Bayer
875f99a20c update links on homepage of store example
(example)
2020-04-27 18:51:54 +07:00
allcontributors[bot]
c73bdc7487 docs: add eliasjohansson as a contributor (#290) 2020-04-27 18:44:50 +07:00
Elias Johansson
040deeed32 Add useQuery pagination & add pagination to store example (#278)
(minor)
2020-04-27 18:44:00 +07:00
allcontributors[bot]
9c670ef77d docs: add LoriKarikari as a contributor (#288)
(meta)
2020-04-27 17:23:42 +07:00
Lori Karikari
7db98c3636 changed btliz to blitz in fork script (#285)
(ignore)
2020-04-27 17:22:45 +07:00
allcontributors[bot]
08195b04e6 docs: add kandros as a contributor (#287)
(ignore)
2020-04-27 17:05:18 +07:00
Brandon Bayer
cdf8cc4a9f Fix types for second argument of useQuery and ssrQuery (#286)
(patch)
2020-04-27 17:04:14 +07:00
Brandon Bayer
0c3b8dd17a Update PULL_REQUEST_TEMPLATE.md 2020-04-27 17:03:30 +07:00
Brandon Bayer
fd624213b3 chore: remove double jest usage - tests now fixed 2020-04-27 13:07:18 +07:00
allcontributors[bot]
9d91117b97 docs: add skn0tt as a contributor (#273)
(ignore)
2020-04-27 12:39:57 +07:00
Brandon Bayer
8cd670296e Change default DB to SQLite instead of postgres (#283)
(patch)
2020-04-27 12:39:02 +07:00
Jaga Santagostino
14df845e16 Add start script to new app template package.json (#270)
(patch)
2020-04-27 12:38:38 +07:00
Brandon Bayer
7b6b024388 v0.6.6 2020-04-26 19:27:56 +07:00
Rudi Yardley
d736ea11f3 Fix relative imports (#271)
(patch)
2020-04-26 19:27:01 +07:00
Brandon Bayer
9a67da5993 v0.6.5 2020-04-26 14:36:54 +07:00
Brandon Bayer
ba981694ad Fix HMR, Enable Fast Refresh, Upgrade next to 9.3.6-canary.11 (#268) 2020-04-26 14:31:12 +07:00
Rudi Yardley
1eebdb54c6 Fix UnhandledPromiseRejectionWarning error during blitz start (#266)
(patch)
2020-04-26 14:14:19 +07:00
Brandon Bayer
fe1f4b0785 Clean and upgrade dependencies (#267)
(ignore)
2020-04-26 14:10:01 +07:00
Justin Hall
63921f3e23 refactor(cli): rename generator template files for compatibility (#249)
Co-authored-by: Brandon Bayer <b@bayer.ws> (ignore)
2020-04-26 12:29:05 +07:00
allcontributors[bot]
69b02ffb54 docs: add Zeko369 as a contributor (#265)
(ignore)
2020-04-26 12:23:39 +07:00
Fran Zekan
86eec51d24 Update Contributing.md and add script for syncing fork (#248)
(ignore)
2020-04-26 12:23:21 +07:00
Brandon Bayer
d59c0a4fd3 Add Tailwind CSS example app (#264) 2020-04-26 12:04:59 +07:00
Brandon Bayer
852e32a484 Revert "Add Tailwind CSS example app"
This reverts commit 052300f09d.
2020-04-26 11:57:11 +07:00
Brandon Bayer
052300f09d Add Tailwind CSS example app 2020-04-26 11:55:13 +07:00
Brandon Bayer
d2f94ff0cb update issue templates
(ignore)
2020-04-26 11:05:02 +07:00
Brandon Bayer
262a228cd9 update feature issue template 2020-04-26 10:55:49 +07:00
Brandon Bayer
9bf36b0421 update PR template 2020-04-26 10:50:40 +07:00
Brandon Bayer
73d2251168 update issue_template 2020-04-26 10:43:49 +07:00
Brandon Bayer
2d52ceec7f v0.6.4 2020-04-26 10:35:53 +07:00
Brandon Bayer
c8527d93f9 remove the slow warning message 2020-04-26 10:31:51 +07:00
Brandon Bayer
5a69c49976 change new app template Prisma model to be the same as the user guide 2020-04-26 10:31:51 +07:00
allcontributors[bot]
49044611eb docs: add ntgussoni as a contributor (#258)
(ignore)
2020-04-26 10:31:21 +07:00
allcontributors[bot]
2997fcc17d docs: add jclancy93 as a contributor (#256)
(ignore)
2020-04-26 08:54:03 +07:00
Jack Clancy
6f1900c5e6 Make blitz h print the help menu (#252)
(patch)
2020-04-26 08:53:43 +07:00
allcontributors[bot]
a342d62cb5 docs: add DevanB as a contributor (#255)
(ignore)
2020-04-26 08:41:51 +07:00
Devan
5c89d7feb9 Correct Prisma schema name in USER_GUIDE.md (#250)
(ignore)
2020-04-26 08:41:31 +07:00
Jim Cummins
92cf7b599f Fix super slow CLI startup when used in a folder with many files (#254)
(patch)
2020-04-26 08:38:27 +07:00
Brandon Bayer
47d16202c3 Update README.md 2020-04-26 01:15:37 +07:00
allcontributors[bot]
5fb24faa1a docs: add mikeattara as a contributor (#247) 2020-04-25 22:32:30 +07:00
Mike Perry Y Attara
815b351f4a fix typo (#244)
(ignore)
2020-04-25 22:32:02 +07:00
Brandon Bayer
b7528b2058 v0.6.3 2020-04-25 14:07:35 +07:00
Brandon Bayer
6af0eb7ea5 Fix Linux & Remove top level await support in console, temporarily (#231)
(patch)
2020-04-25 14:06:39 +07:00
Brandon Bayer
dcc9c4ddc9 Change email field to be optional in new app template schema 2020-04-25 09:01:00 +07:00
allcontributors[bot]
e7982a1132 docs: add janbaykara as a contributor (#222)
(ignore)
2020-04-24 22:13:15 +07:00
Jan Baykara
64eccf8bb4 Fix reference to id in README (#221)
(ignore)
2020-04-24 22:12:41 +07:00
Brandon Bayer
caad5b44f1 v0.6.2 2020-04-24 22:07:23 +07:00
Brandon Bayer
4b4d65cb7e v0.6.2-canary.0 2020-04-24 21:43:28 +07:00
Brandon Bayer
55fdaa0530 attempt fix for cli package detection 2020-04-24 21:41:14 +07:00
Brandon Bayer
fb3893a8d4 update blitz pkg description 2020-04-24 21:29:29 +07:00
Brandon Bayer
ca5d6ee0aa v0.6.1 2020-04-24 19:18:09 +07:00
Brandon Bayer
f17820f81d Add needed blitz db migrate command to the blitz new template app page 2020-04-24 19:17:19 +07:00
Brandon Bayer
ab6f60571a v0.6.0 2020-04-24 18:25:15 +07:00
Brandon Bayer
5f3d5dd7a3 change pkg script 2020-04-24 18:24:37 +07:00
Brandon Bayer
8b8143d2c2 v0.6.0-alpha 2020-04-24 18:15:41 +07:00
Brandon Bayer
8b6a51f8f1 Update readme for pending alpha release (#219)
* Update readme for pending alpha release

* Fix some language stuff 😄
(ignore)
Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
2020-04-24 18:14:30 +07:00
Brandon Bayer
0c23a7873c v0.6.0-canary.4 2020-04-24 17:50:00 +07:00
Brandon Bayer
0fa28d20c4 Remove oops debug log from blitz generator 2020-04-24 17:47:35 +07:00
Brandon Bayer
97132996b8 Add more useful instructions to the blitz new index page (#217)
* add more useful instructions to the `blitz new` index page

* fix (patch)
2020-04-24 17:41:27 +07:00
Brandon Bayer
96ac63d3a4 Update USER_GUIDE.md 2020-04-24 17:11:59 +07:00
Brandon Bayer
132601f0c2 Update USER_GUIDE.md 2020-04-24 16:59:46 +07:00
Brandon Bayer
c47d15a09f v0.6.0-canary.3 2020-04-24 16:38:59 +07:00
Brandon Bayer
0892137370 🎉 Add full working CRUD actions to pages generator! + fix RPC b… (#214)
minor
2020-04-24 16:36:56 +07:00
Brandon Bayer
797060c068 v0.6.0-canary.2 2020-04-24 15:32:28 +07:00
Adam Markon
1c7134c272 feat(cli): generate command (#187)
* initial scaffolding for generate command and validation in place

* page generator

* mutation generator

* add query and crud generator

* move to server logger

* update docs with most recent API changes

* undo logging changes in new command

* rename a few things, clean up early returns

* use path context relative to the root

* lots of cleanup, changes, fixes

* fix test

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-24 15:28:40 +07:00
Rudi Yardley
2638ec73b3 Speed up blitz start/build by parallelizing prisma generation (#212)
* Parallelize Prisma generation

* Provide resolving promise to fix failing tests (patch)
2020-04-24 15:15:17 +07:00
Brandon Bayer
3c4db0453e v0.6.0-canary.1 2020-04-24 13:59:45 +07:00
Brandon Bayer
d824459190 Add alpha msg to CLI and add OS version with blitz -v (#211)
(patch)
2020-04-24 13:22:58 +07:00
Brandon Bayer
5da2eae6e1 Fix some type issues
(patch)
2020-04-24 13:02:41 +07:00
Brandon Bayer
73f6be0814 Disable jsx-a11y/anchor-is-valid because it doesn't plan will with Blitz/Next links
(patch)
2020-04-24 13:02:02 +07:00
Dylan Brookes
2dfa86556d Beautify query/mutation logging and Refactor logger (#199)
* Refactor logger and beautify rpc logging

* Resolve conflicts and make requested changes

* move rpcHandler into server package where it belongs

* improve logging even more

* fix dependency issue
(patch)
Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-24 12:36:10 +07:00
Fran Zekan
7097150c2d Fix possible race condition during blitz new (#198)
* Refactor dependecy upgrader to mitigate the race condition

* Refactor reduce -> for loop
(patch)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-24 11:18:06 +07:00
Rudi Yardley
84a8ac7512 Maybe fix one issue on windows by removing node-pty (#210)
* Remove node-pty

* Use next instead of process.stdout
(patch)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-24 11:13:09 +07:00
Brandon Bayer
ef48721625 set up release notes (ignore) 2020-04-24 11:07:03 +07:00
Brandon Bayer
a54b48190c Update issue templates 2020-04-24 10:53:48 +07:00
Justin Hall
ff5cab07fc refactor(server): simplify resolveBinAsync (#208)
(patch)
2020-04-24 10:45:17 +07:00
Justin Hall
02ccc7db0e fix(cli): populate new apps with latest version of deps in range (#206) 2020-04-24 00:04:09 +07:00
Brandon Bayer
9de79ba621 v0.6.0-canary.0 2020-04-23 22:26:42 +07:00
allcontributors[bot]
dfac941a80 docs: add Zeko369 as a contributor (#201)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
(ignore)
2020-04-23 22:14:10 +07:00
Brandon Bayer
f3f17a2452 Add spinner to blitz new and blitz start/build (#200)
(patch)
2020-04-23 22:10:10 +07:00
Brandon Bayer
aa6d0e0dc0 update console in user guide 2020-04-23 21:16:21 +07:00
Dylan Brookes
4b0b1b8c66 Change blitz new install to cli version (#195)
* Change blitz new install to cli version

* Update replace-blitz-dependency.ts

* Simplify

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
2020-04-23 20:44:53 +07:00
Brandon Bayer
7e72dd3ccd Merge branch 'master' into canary 2020-04-23 15:29:05 +07:00
Brandon Bayer
0aa16e25ae update publish script 2020-04-23 15:10:20 +07:00
Brandon Bayer
9e5d58ddbd v0.5.2-alpha 2020-04-23 15:06:17 +07:00
Brandon Bayer
edd673f54c publish script change 2020-04-23 15:04:45 +07:00
Brandon Bayer
6cccbe3487 publish script 2020-04-23 15:03:33 +07:00
Brandon Bayer
92069cfef8 v0.5.0-canary.10 2020-04-23 14:56:30 +07:00
Brandon Bayer
b16424592f run reset on publish 2020-04-23 14:56:08 +07:00
Brandon Bayer
92c4a4bfc8 auto rerun CLI test if fails first time & some dx scripts 2020-04-23 14:54:12 +07:00
Brandon Bayer
ffd87a80af v0.5.0-canary.9 2020-04-23 14:40:52 +07:00
Brandon Bayer
9c54cfaef1 v0.5.0-canary.8 2020-04-23 14:37:44 +07:00
Brandon Bayer
fd2e9d2988 fix blitz console again... 2020-04-23 14:33:58 +07:00
Brandon Bayer
3cc4476a98 v0.5.0-canary.7 2020-04-23 13:03:01 +07:00
Brandon Bayer
1a45b2d394 Fix CLI on windows (#192) 2020-04-23 13:00:26 +07:00
Beata Obrok
bac7f21295 fix(cli): console crashing when importing ts files (#185)
* fix(cli): console crashing when importing ts files

* fixes

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-23 10:17:17 +07:00
Brandon Bayer
9755466f9b Update bug_report.md 2020-04-23 09:43:56 +07:00
Justin Hall
3a85e83b56 fix(server): make synchronizer pages rule cross-platform (#186)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-23 09:37:30 +07:00
Justin Hall
4e49239f53 test(server): make dev tests cross-platform (#184) 2020-04-23 09:30:55 +07:00
Camilo Gonzalez
f0a56ff2fe refactor: replaceDependencies to run in parallel (#183) 2020-04-22 22:54:08 +07:00
Brandon Bayer
2a71e3441d fix tsconfig-paths being registered for all commands 2020-04-22 22:16:36 +07:00
Brandon Bayer
63cacbb73c tweak readme 2020-04-22 22:03:16 +07:00
Brandon Bayer
219d12aaa2 update issue templates 2020-04-22 21:57:58 +07:00
Brandon Bayer
b1321c77e1 v0.5.0-canary.6 2020-04-22 21:04:43 +07:00
Brandon Bayer
f7685b4abb fix typo 2020-04-22 21:03:43 +07:00
Brandon Bayer
cf215b4a12 Update USER_GUIDE.md 2020-04-22 20:52:00 +07:00
Rudi Yardley
32f0a76b18 Refactor synchronizer (#146)
* Refactor Synchronizer

* Add api routes functionality

* Add functions to test files

* Update docs

* Added view rendering and error section

* Move devdeps to root

* Add VERCEL_BUILDER env var check

* Update file writer reporter to clear the line and wait less for the ready event

* Alter types

* Update docs add image files

* Update README.md

* Update README.md

* Add params to log docs

* Update README.md

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
2020-04-22 21:08:15 +10:00
Brandon Bayer
e9e8841f07 Implement the blitz console command (#176)
* wip

* working

* add default blitz files to store example

* finish up

* fix tests
2020-04-22 17:43:14 +07:00
Dylan Brookes
d6b29a2f71 Use latest versions for app template (#170)
* Use latest versions for app template

* Make dependency swapping more robust

* Make it faster

* Only upgrade as far as the current major version

* Use dep replace for devDependencies as well

* pretty print json and add .npmrc

* Clean up fetching

* Fail on a case-by-case basis

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-22 15:15:57 +07:00
Brandon Bayer
af338d99e4 Fix yarn test by also running the build (#174) 2020-04-21 21:36:54 +07:00
allcontributors[bot]
bd63e4cab0 docs: add sonnypgs as a contributor (#172)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-04-21 19:46:18 +07:00
Brandon Bayer
e387936cb0 Update README.md 2020-04-21 19:42:07 +07:00
Dylan Brookes
0650252c53 Print help message for unsupported commands (#153)
* Print help message for unsupported commands

* Fix not found hook

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
2020-04-21 15:22:04 +07:00
Brandon Bayer
76cfb8c076 Fix store example static pages (#168)
* fix revalidate for latest Next version

* also single product page
2020-04-21 14:34:03 +07:00
Brandon Bayer
6273ffd255 fix PR template 2020-04-21 14:32:07 +07:00
Brandon Bayer
6e447f1f44 fix blitz -v when globally linked but using it outside monorepo 2020-04-21 14:12:12 +07:00
Corey Brown
4c4721250a Branded Welcome Template (#158)
* adds blitz branding to welcome template screen

* add dynamic name tag back in

* updates and new logo

* adds dynamic title

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-21 13:54:47 +07:00
Brandon Bayer
6852cfc208 Update issue templates 2020-04-21 13:47:09 +07:00
Brandon Bayer
da488ccf33 update issue template feature_request 2020-04-21 13:14:28 +07:00
Brandon Bayer
36d0ae8587 update PR template 2020-04-21 13:11:07 +07:00
Brandon Bayer
8bcaf62641 Update issue templates 2020-04-21 13:10:55 +07:00
Brandon Bayer
820d191a63 Upgrade and organize dependencies (#165)
* monorepo dependency maintenance

* update dependencies
2020-04-21 13:08:15 +07:00
Brandon Bayer
45842d48ad Add issue templates 2020-04-21 13:02:25 +07:00
Brandon Bayer
67ed16429d fix eslint react warning 2020-04-21 11:22:44 +07:00
allcontributors[bot]
45cb96f9f1 docs: add hew as a contributor (#164)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-04-21 10:50:33 +07:00
Matt
9063758292 Fix: typo in install instructions (#156) 2020-04-21 10:49:48 +07:00
allcontributors[bot]
2a892ba4d0 docs: add mattleff as a contributor (#163)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-04-21 10:48:54 +07:00
Matthew Leffler
73b3920a53 Fix typo (#155) 2020-04-21 10:48:36 +07:00
Brandon Bayer
fae90065df add logging util to PULL_REQUEST_TEMPLATE 2020-04-21 10:42:24 +07:00
allcontributors[bot]
fc762c15fc docs: add ETLopes as a contributor (#162)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-04-21 10:42:01 +07:00
Eduardo Lopes
cc10b71f9d chore(prtemplate): create a PR Template for the project. (#4)
* feat(prtemplate): create a PR Template for the project.

* Update PULL_REQUEST_TEMPLATE.md

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-21 10:39:43 +07:00
Brandon Bayer
998d227832 fix all_contributors 2020-04-21 10:39:04 +07:00
Dylan Brookes
35c150a46a Add logging util (#154)
* Add a logging util file and use for synchronizer

* Delete stray file

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
2020-04-21 10:27:32 +07:00
Brandon Bayer
920716a0d8 move README back to root so github mobile readme view works correctly 2020-04-21 10:11:27 +07:00
Brandon Bayer
39675d1da8 Update USER_GUIDE.md 2020-04-21 10:00:28 +07:00
Brandon Bayer
dd20c0ac6c fix readme 2020-04-20 21:28:38 +07:00
Brandon Bayer
2ea1e7b522 restore buried readme updates 2020-04-20 21:27:02 +07:00
Brandon Bayer
44c3ea22e2 Update README.md 2020-04-20 21:25:42 +07:00
Brandon Bayer
f4760776ee Update readme with benefits and features 2020-04-20 21:25:33 +07:00
Brandon Bayer
65bb7e8e84 add publish-alpha script 2020-04-20 21:23:11 +07:00
Brandon Bayer
8547585cc7 v0.5.1-alpha 2020-04-20 21:20:04 +07:00
Brandon Bayer
16b810e0c3 Merge to master (#152)
* docs: add code of conduct

* Update README.md

* remove broken gh action

* chore: update readme

* Add initial Blitz Core and First Demo 🎉 (#11)

* wip

* chore: fix typings, tweak build config

* update prettier config

* set up husky to run prettier on commit

* add migrate script and update readme

* changes, still broken

* add yarn dev command

* more changes, still broken

* demo working again!

* fix: yarn why do you hate me so much?

* add to gitignore

* trying to get demo dev to work right

* refactor and cleanup

* more cleanup

* update deps

* tweak

* update readme

* fix

* update readme

Co-authored-by: Michael Edelman  <michael@edel.mn>

* Live Demo Deployment (#12)

* add github link to demo

* fix(core): connect to db right away + fix for connection undefined

* changes to demo needed for production deployment

* fix(demo): relax tsconfig

* upgrade prisma & fix core for deployment

* demo updates

* chore(demo): add some comments

* fix(demo): untitled posts

* fix(demo): add content filtering!

* Add Open Collective Sponsor button (#15)

* fix(demo): switch to fruit content filter

* chore: add flybayer as codeowner of everything

* chore: Add Patreon and Paypal to the sponsor button options (#18)

* chore: add sponsor section to readme

* feat(cli): Add initial CLI (#8)

* v0.0.1

Initial PR for oclif CLI

* update prettier config

* chore: repo updates - run prettier on commit

* organize package.json + correct package name

* Add initial app generator

* changes & cleanup

* more tweaks

* Add basic nextjs generation

* #9 Swapping Mocha with Jest for CLI

Swapped Mocha with Jest.

* Swapping Mocha with Jest for CLI

Swapped Mocha with Jest.

* add `yarn b [COMMAND]` for dev convenience

* Formalize path arg

* Make jest work

* Remove empty commands and make tests pass

* Fix path argument

* Revert "target" in tsconfig.json

* Remove `target` from cli package.json

* Fix build command

* Use custom tsconfig for test script

* remove nyc because jest has coverage built in

* little cleanup

Co-authored-by: Mina Abadir <mina@abadir.email>
Co-authored-by: Lorenzo Rapetti <lorenzo.rapetti.94@gmail.com>

* chore(core): Add core tests (#16)

* Add core tests

- Tests cover Form and Controller
- You can check code coverage with "yarn test --coverage"

* A little formatting + form test modifications

* add back console log

Co-authored-by: Yanick Bélanger <yanick.belanger@yahoo.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>

* fix: noop @prisma/client in browser, closes #13 (#19)

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

* feat(core): Add withBlitz webpack wrapper + fix prisma/client (#31)

* add withBlitz webpack config wrapper

* Move prisma/client noop into withBlitz!

* chore: add pull_request event to github action

* docs: Update CODE_OF_CONDUCT.md (#28)

* feat(cli): Add `blitz console` command (#32)

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

* feat(cli): Add `blitz test` command (#30)

* add run tests command

* add test command

* add test cmd unit test

* uses project package manager (npm/yarn) to run test script

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

closes #22

* docs: add dev onboarding blurb to readme

* docs: fix typo

* chore: comment cleanup

* bug(example): Fix Invalid hook call error. (#37)

* fix: Fix jest version incompatability (#43)

* bug(webpack): Create webpack package to avoid context bugs (#42)

* Add new webpack package

* Delete webpack files from core

* Pin dependencies

* feat(cli): use custom REPL in console command (#38)

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

* feat(core): Return 404 if controller action is not defined (#39)

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

* fix(core): Add support for multiple attribute types for id (#35)

* Add support for multiple attribute types for id

* Add comment + tests

* test(examples): add cypress tests to first demo (#47)

* [examples] feat: setup cypress in first demo

* [examples] spec: add cypress tests for first demo

closes #44

* feat(cli): Compile to Next (#45)

* Only create a prisma client when it actually needed

* Setup start script for a simple next-project

* Enable "compile to next" on first-demo

* Whitespace

* Fix failing webpack config test

* Testing spawn call

* Neaten up code

* Test tsExtraMock instead of reporter

* Test file deletion

* Better file locations

* Dont need persistent anymore

* Development, Production, Build, Deploy

* Add ts-ignore so we dont get compiler errors

* Remove test on command with flags

* Tidy up typescript config and add test

* Add comment around type issues

* Remove author field

* Tidy up config changs

* quiet core tests

* move es6 from root tsconfig to cli tsconfig

* Rename start -> scripts and tidy up descriptions

* Test build script

* Fix up test description

* Fix bug in build script

Closes #21, #36

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

* fix(cli): Fix bug in build script (#49)

* Unlink doesnt work on folders

* Mock remove

* feat(cli): Add `blitz test watch` command #23 (#50)

* Add test watch

* Add test:watch

closes #23

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

* tweak funding

* feat(cli): Add `blitz db` command #24 (#51)

* Add db command

* fixed test

closes #24

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

* docs: Add the Blitz Manifesto! (#52)

* refactor(server): create server package (#57)

* @blitzjs/webpack -> @blitzjs/server

* Move server code out of cli

* Fix up type and lerna issues

* Prebuild non-cli before test

* Remove noise in PR

* fix: running tests locally after packages have been built

* chore: tweak github actions to remove duplicate builds

* feat: Upgrade next to latest release v9.3.0, closes #60 (#65)

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

* feat(server): Errors respect file path redirection (#66)

* Expose next-executable

* Redirecting errors correctly with mocked rules

* Add comments about what is waiting

* Remove prepare as it was causing errors when installing dependencies

* Mock outer function instead of call to spawn

* Try using import *

* Remove CI switch as that was not the problem

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

* docs: add manifesto to readme

* docs: update readme

* chore: add github sponsor link

* feat(server): Transform rules and synchronisation manifest (#69)

* Extract config

* Use gulp pipes to apply tranforms and write manifest.

* Add linting comments to allow import reordering

* Fix manifest bug

* Refactor to pipeline and fix testing method

* Include clean

* Fix up dependencies and tidy up code

* Fix newline issue

* Fix dependencies again

* Fix up testing strategy for file manipulations

* Renaming file because of inconsistency pt1

* Renaming file because of inconsistency pt2

* Update CLI test

* Debug CI build failures not occuring locally

* Include catch for missing unlink

* bug(server): CI pathname errors for readable-stream (#71)

* Try setting normalise to false on tree testing

* Remove debugging log

* feat(cli): load dependencies in blitz console (#68)

* [cli] feat: autoload package dependencies in console

* feat: load Prisma Client into console context

* [cli] spec: fix spec for console command

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

* Update MANIFESTO.md

* add initial file structure rfc

* Revert "add initial file structure rfc"

This reverts commit f48a776e99.

* Update README.md

* doc: Add All Contributors Spec, Add CONTRIBUTING.md, Update Readme (#77)

* Added financial contributors to the README

* Add @flybayer as a contributor

* Add @medelman17 as a contributor

* Add @ryardley as a contributor

* Add @toddgeist as a contributor

* Add @quirk0o as a contributor

* Add @tsawan as a contributor

* Add @camilo86 as a contributor

* Add @dkempner as a contributor

* Add @gielcobben as a contributor

* Add @MrLeebo as a contributor

* Add @jimthedev as a contributor

* update readme & add CONTRIBUTING.md

* add Kristina

* Add @robdrosenberg as a contributor

* Add @jasonblalock as a contributor

* Add @coreybrown89 as a contributor

* Add @aej11a as a contributor

* update badegs

* tweak

* tweak

* more

Co-authored-by: Jess <jessachandler@gmail.com>

* docs: add lorenzorapetti as a contributor (#80)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* docs: add aem as a contributor (#79)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>

* docs: add rishabhpoddar as a contributor (#78)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>

* docs: add marcoseoane as a contributor (#81)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>

* fix readme

* refactor(cli): CLI refactoring (#25)

* Add base generator class

* change from mem-fs to fs.mkdirSync due to undefined error

* Add base command class

* Add conflict checker

* Add dry run to generator

* Add install via npm or yarn

* Add --no-yarn

* remove unused nyc dependency

Co-authored-by: marcoseoane <marcorseoane@outlook.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>

* chore: fix rishabhpoddar readme link

* Add @merelinguist as a contributor

* chore: tweak readme

* chore: update readme

* Fix dangling chokidar watch and add temporary logging.  (#82)

* Add logging

* Add better commit message

* Ensure will only run if jest is running

* Add manifest to output log

* Update message

* Use specific ignore in build folder

* Add dot ahead of ignored patterns

* Close Watcher

* Remove stray reference

* Neaten up

* chore: add rudi as code owner of packages/server

* chore(deps): bump acorn from 5.7.3 to 5.7.4 (#83)

Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Rudi Yardley <contact@rudiyardley.com>

* docs: Fix website link (#86)

* Fix website link

* regenerate readme

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

* docs: update readme

* chore: remove all prototype code in prep for new architecture code (#90)

* remove all prototype code and clean up deps

* fixes

* Fix launchEditor bug (#92)

* fix(server): Fix ignorePath (#94)

* Fix up globs

* Revert move as it doesnt really matter because of ignorePaths

* chore: upgrade dependencies (#96)

* feat: Implement the new Architecture! (#95)

* wip

* working rpc mutation

* queries and mutations working!!

* prewarm the lamba

* update withBlitz config wrapper - remove stuff no longer needed

* switch from `pages` to `routes`

* fix a test issue

* fix cli test

* Add file addition and subtraction to transform stream

* Remove comments

* Allow pages and routes

* Allow routes folder without context

* Tidy up build rules

* Fix broken transform test

* Use done callback to ensure all events have passed in stream test

* Fix next build breaking

* File generation RPC works

* Remove commented out code

* Ensure correct jest version so tests run and tidy up

* Fix up linting

* Tidy up synchroniser

* Ensure watcher close is run when watchmode is false

* typo

* update cli readme

* Fix start error

* Downgrade ts-jest to remove warning

* fix build with static pages

* rerun prettier on all files

* yarn workspace: nohoist husky and prisma

* add missing dependency

Co-authored-by: Rudi Yardley <contact@rudiyardley.com>

* chore: change version to 0.0.0

* chore: update lerna config

* v0.0.1-canary.0

* chore: remove version from examples

* v0.0.1-canary.1

* chore: update githead

* fix(examples): Fix Yarn link blitz cli failing (#105)

* Add version to example

* Try using generic versions

* fix(cli): spawn Windows .cmd entrypoints on win32 platform (#109)

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

* docs: add wKovacs64 as a contributor (#111)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* feat(server): Warning about invalid routes/api structure (#106)

* First pass at warning about duplicate routes

* Move dupe checker to its own function

* Fix some accidental changes

* Revert yarn.lock(?)

* Route > page

* Use pages for store example

* Warn about nested api routes

* Check for duplicate api routes

* Warn api dupe routes

* Remove stray process.exit

* Merge api and pages dupe checkers

* Delete old checkers

* Remove stray line

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>

* docs: add merelinguist as a contributor (#112)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* feat: use `db` folder instead of `prisma` (#114)

* feat: use `db` folder instead of `prisma`

* fix tests

* feat(cli): don't bundle cli (and remove pkg) (#115)

* feat(cli): don't bundle cli with pkg or anything. npm package now working

* fix tests

* chore: update lerna script

* v0.0.1-0.0.1-canary.4.0

* v0.0.2-alpha.0

* chore: update example dependency versions

* fix: build from dependency issues

* chore(examples): Make store work in prod (switch to Postgres) (#117)

* wip

* fix(example): changes for deploying store to Zeit. Switch to postgres

* feat: enable concurrent mode for Blitz apps (#118)

* v0.0.2-canary.0

* build(cli): fix @blitzjs/cli build script on Windows (#120)

* chore: fix all contributors badge generation

* docs: add alpha release note to readme

* docs: readme typo

* Change blitz new template to be a working blitz app (#123)

* change blitz new template to be a working blitz app

* fix tests

* Add the `blitz` package (#125)

* Revert "Add the `blitz` package (#125)"

This reverts commit 9e1ce7dda0.

* fix(cli): leverage cross-spawn for cross-platform compatibility (#122)

* fix(cli): leverage cross-spawn for cross-platform compatibility

* refactor(server): use cross-spawn in next-utils for consistency

* feat(server): `blitz.config.js` config support without `withBlit… (#130)

* Allow blitz config

* Add error message

* Update tests

* Support only blitz.config.js

* Remove blitz.config.js

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

* give the README a fresh coat of paint!

* Update .all-contributorsrc

* Update README.md

* Update README.md

* automatically read .env for blitz cli commands (#133)

(minor)

* Add `blitz db studio` and `blitz db introspect` (#134)

(minor)

* Implement ssrQuery (#136)

* add medelman17 for code

* Update new app template: favicon, blitz.config.js, .env, fixes (#137)

* Rexport Next stuff from Blitz (#138)

* Update CONTRIBUTING.md

* feat(cli): add help for db commands (#139)

* docs: add sijad as a contributor (#141)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* v0.0.2-canary.1

* tweak readme

* Fix server for deployment to Zeit (#143)

* fix production, but tests still failing

* Fix missing await and avoid changing source folder

Co-authored-by: Rudi Yardley <contact@rudiyardley.com>

* Fix ugly blitz start --production error (#144)

* Automatically run `blitz db migrate` on every `blitz start` (#147)

* Automatically run `blitz db migrate` on every `blitz start`

* Fix test

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>

* Update readme with benefits and features

* Update README.md

* Update MANIFESTO.md

* Add the `blitz` package and proper global/local CLI handling (#128)

* add the `blitz` package (but yarn blitz start not working)

* wip

* working

* updates

* cleanup

* adjustment

* chore: make 'blitz' work (#129)

* chore: make 'blitz' work

* fix: make example work in dev mode with blitz mono-package

* test: skip failing test re patched version of next

* fix: issues re bundling & store example

* fix blitz building in development and some other cleanup

* fixes for CLI usage from blitz

* more changes. blitz build still broken from child_process thing

* remove .yarnrc

* few DX fixes

* fix bug in store example

* fix the build and CLI!

* code comments

* delete vanilla-next

* fix tests

* fix tests

* fix CI tests

* remove server export from `blitz` since end-users don't use it

* move README into the Blitz package

* add link-cli script

* change prisma resolve to use resolveBinAsync

Co-authored-by: Michael Edelman <michael@fabulas.io>

* add register to server package

* add publish script

* v0.5.0-canary.0

* v0.5.0-canary.1

* Many updates to blitz new template, including prettier, eslint,… (#150)

* update template app

* fix `blitz -v`

* v0.5.0-canary.2

* fix cli template files in npm package

* tweak link-cli scripts

* v0.5.0-canary.3

* Back out the auto db migrate, and instead only auto generate pri… (#151)

* change to only generate prisma client on blitz start

* add comment

* v0.5.0-canary.4

* move test mocks to top of file

* v0.5.0-canary.5

* Add the Alpha User Guide (#131)

* Create USER_GUIDE.md

* Update USER_GUIDE.md

* Update USER_GUIDE.md

* Update USER_GUIDE.md

* Update USER_GUIDE.md

* add custom header image

* Update USER_GUIDE.md

* add cli commands

* add blitz db introspect

* Update USER_GUIDE.md

Co-authored-by: Michael Edelman  <michael@edel.mn>
Co-authored-by: Mina Abadir <mina@abadir.email>
Co-authored-by: Lorenzo Rapetti <lorenzo.rapetti.94@gmail.com>
Co-authored-by: Jeremy Liberman <mrleebo@msn.com>
Co-authored-by: Yanick Bélanger <yanick.belanger@yahoo.com>
Co-authored-by: Jim Cummins <jim.for.cy@gmail.com>
Co-authored-by: Beata Obrok <beata.obrok@u2i.com>
Co-authored-by: Camilo Gonzalez <cgs.camilogonzalez@gmail.com>
Co-authored-by: Rudi Yardley <contact@rudiyardley.com>
Co-authored-by: Tahir Awan <tahir.awan@gmail.com>
Co-authored-by: Giel <g.cobben@gmail.com>
Co-authored-by: Jess <jessachandler@gmail.com>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: marcoseoane <marcorseoane@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dylan Brookes <24858006+merelinguist@users.noreply.github.com>
Co-authored-by: Justin Hall <justin.r.hall@gmail.com>
Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
Co-authored-by: Sajjad Hashemian <sijad@disroot.org>
Co-authored-by: Michael Edelman <michael@fabulas.io>
2020-04-20 21:17:20 +07:00
Brandon Bayer
8d38c6c225 Add the Alpha User Guide (#131)
* Create USER_GUIDE.md

* Update USER_GUIDE.md

* Update USER_GUIDE.md

* Update USER_GUIDE.md

* Update USER_GUIDE.md

* add custom header image

* Update USER_GUIDE.md

* add cli commands

* add blitz db introspect

* Update USER_GUIDE.md
2020-04-20 21:09:15 +07:00
Brandon Bayer
c00e78cbc7 v0.5.0-canary.5 2020-04-20 21:02:53 +07:00
Brandon Bayer
11325ba136 move test mocks to top of file 2020-04-20 21:02:25 +07:00
Brandon Bayer
477094d042 v0.5.0-canary.4 2020-04-20 20:57:31 +07:00
Brandon Bayer
2c91340539 Back out the auto db migrate, and instead only auto generate pri… (#151)
* change to only generate prisma client on blitz start

* add comment
2020-04-20 20:56:26 +07:00
Brandon Bayer
4c42176ec9 v0.5.0-canary.3 2020-04-20 20:08:54 +07:00
Brandon Bayer
6564a268f6 tweak link-cli scripts 2020-04-20 20:08:20 +07:00
Brandon Bayer
9c66a2938e fix cli template files in npm package 2020-04-20 19:29:10 +07:00
Brandon Bayer
27e314821d v0.5.0-canary.2 2020-04-20 17:16:31 +07:00
Brandon Bayer
bf4b90943b Many updates to blitz new template, including prettier, eslint,… (#150)
* update template app

* fix `blitz -v`
2020-04-20 17:12:54 +07:00
Brandon Bayer
3b5f7bc6c8 v0.5.0-canary.1 2020-04-20 12:41:07 +07:00
Brandon Bayer
0659b37d77 v0.5.0-canary.0 2020-04-20 12:32:48 +07:00
Brandon Bayer
67950db948 add publish script 2020-04-20 12:30:31 +07:00
Brandon Bayer
45a09911a4 add register to server package 2020-04-20 12:23:15 +07:00
Brandon Bayer
e89127358f Add the blitz package and proper global/local CLI handling (#128)
* add the `blitz` package (but yarn blitz start not working)

* wip

* working

* updates

* cleanup

* adjustment

* chore: make 'blitz' work (#129)

* chore: make 'blitz' work

* fix: make example work in dev mode with blitz mono-package

* test: skip failing test re patched version of next

* fix: issues re bundling & store example

* fix blitz building in development and some other cleanup

* fixes for CLI usage from blitz

* more changes. blitz build still broken from child_process thing

* remove .yarnrc

* few DX fixes

* fix bug in store example

* fix the build and CLI!

* code comments

* delete vanilla-next

* fix tests

* fix tests

* fix CI tests

* remove server export from `blitz` since end-users don't use it

* move README into the Blitz package

* add link-cli script

* change prisma resolve to use resolveBinAsync

Co-authored-by: Michael Edelman <michael@fabulas.io>
2020-04-20 12:18:20 +07:00
Brandon Bayer
cf94dc866d Update MANIFESTO.md 2020-04-20 11:40:42 +07:00
Brandon Bayer
bd3841b43b Update README.md 2020-04-20 11:32:46 +07:00
Brandon Bayer
50dd2dcc4e Update readme with benefits and features 2020-04-20 11:22:58 +07:00
Dylan Brookes
6443184f0f Automatically run blitz db migrate on every blitz start (#147)
* Automatically run `blitz db migrate` on every `blitz start`

* Fix test

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
2020-04-20 09:17:19 +07:00
Brandon Bayer
9f8a7afd17 Fix ugly blitz start --production error (#144) 2020-04-19 13:04:49 +07:00
Brandon Bayer
5d3afb0230 Fix server for deployment to Zeit (#143)
* fix production, but tests still failing

* Fix missing await and avoid changing source folder

Co-authored-by: Rudi Yardley <contact@rudiyardley.com>
2020-04-19 12:47:16 +07:00
Brandon Bayer
9dfc5c53ed tweak readme 2020-04-19 11:50:10 +07:00
Brandon Bayer
ba540bb546 v0.0.2-canary.1 2020-04-18 14:58:46 +07:00
allcontributors[bot]
b70296a7a2 docs: add sijad as a contributor (#141)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-04-18 12:52:39 +07:00
Sajjad Hashemian
36c0acdb92 feat(cli): add help for db commands (#139) 2020-04-18 10:21:09 +07:00
Brandon Bayer
549115af97 Update CONTRIBUTING.md 2020-04-17 17:38:30 +07:00
Brandon Bayer
a4d6fe139e Rexport Next stuff from Blitz (#138) 2020-04-17 17:16:19 +07:00
Brandon Bayer
9010566895 Update new app template: favicon, blitz.config.js, .env, fixes (#137) 2020-04-17 16:32:45 +07:00
Brandon Bayer
167fc251fd add medelman17 for code 2020-04-17 15:56:56 +07:00
Brandon Bayer
4bcc2efbec Implement ssrQuery (#136) 2020-04-17 15:50:09 +07:00
Brandon Bayer
4c1eed6248 Add blitz db studio and blitz db introspect (#134)
(minor)
2020-04-17 15:28:08 +07:00
Brandon Bayer
36b4f101f9 automatically read .env for blitz cli commands (#133)
(minor)
2020-04-17 14:43:13 +07:00
Brandon Bayer
9209c934ee Update README.md 2020-04-17 10:59:23 +07:00
Brandon Bayer
ecd1118ce5 Update README.md 2020-04-17 10:54:24 +07:00
Brandon Bayer
29820ac964 Update .all-contributorsrc 2020-04-17 10:53:04 +07:00
Brandon Bayer
93dcd6d884 give the README a fresh coat of paint! 2020-04-17 10:51:57 +07:00
Rudi Yardley
6f66e5bd72 feat(server): blitz.config.js config support without `withBlit… (#130)
* Allow blitz config

* Add error message

* Update tests

* Support only blitz.config.js

* Remove blitz.config.js

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-16 19:07:46 +07:00
Justin Hall
df76a4b2ab fix(cli): leverage cross-spawn for cross-platform compatibility (#122)
* fix(cli): leverage cross-spawn for cross-platform compatibility

* refactor(server): use cross-spawn in next-utils for consistency
2020-04-16 14:06:45 +07:00
Brandon Bayer
b9391305b0 Revert "Add the blitz package (#125)"
This reverts commit 9e1ce7dda0.
2020-04-15 21:03:52 +07:00
Brandon Bayer
9e1ce7dda0 Add the blitz package (#125) 2020-04-15 16:35:47 +07:00
Brandon Bayer
d956da624f Change blitz new template to be a working blitz app (#123)
* change blitz new template to be a working blitz app

* fix tests
2020-04-15 15:04:50 +07:00
Brandon Bayer
4b29564f12 docs: readme typo 2020-04-15 10:55:26 +07:00
Brandon Bayer
227c1204c2 docs: add alpha release note to readme 2020-04-15 10:54:47 +07:00
Brandon Bayer
1ca88afcef chore: fix all contributors badge generation 2020-04-15 10:27:54 +07:00
Justin Hall
bb4272bbe6 build(cli): fix @blitzjs/cli build script on Windows (#120) 2020-04-15 09:37:06 +07:00
Brandon Bayer
b749884ddc v0.0.2-canary.0 2020-04-14 19:32:41 +07:00
Brandon Bayer
0b18df1390 feat: enable concurrent mode for Blitz apps (#118) 2020-04-14 19:30:58 +07:00
Brandon Bayer
256387cbbd chore(examples): Make store work in prod (switch to Postgres) (#117)
* wip

* fix(example): changes for deploying store to Zeit. Switch to postgres
2020-04-14 18:42:24 +07:00
Brandon Bayer
f80071913d fix: build from dependency issues 2020-04-14 17:16:10 +07:00
Brandon Bayer
c05afe8bf6 chore: update example dependency versions 2020-04-14 17:01:04 +07:00
Brandon Bayer
95713e627b v0.0.2-alpha.0 2020-04-14 16:50:21 +07:00
Brandon Bayer
4184a4fe5d v0.0.1-0.0.1-canary.4.0 2020-04-14 16:47:37 +07:00
Brandon Bayer
5933b6189e chore: update lerna script 2020-04-14 16:46:55 +07:00
Brandon Bayer
2d545688cb feat(cli): don't bundle cli (and remove pkg) (#115)
* feat(cli): don't bundle cli with pkg or anything. npm package now working

* fix tests
2020-04-14 16:29:42 +07:00
Brandon Bayer
c3dee2271e feat: use db folder instead of prisma (#114)
* feat: use `db` folder instead of `prisma`

* fix tests
2020-04-14 14:58:44 +07:00
allcontributors[bot]
93865f4431 docs: add merelinguist as a contributor (#112)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-04-14 12:43:45 +07:00
Dylan Brookes
be1c57b345 feat(server): Warning about invalid routes/api structure (#106)
* First pass at warning about duplicate routes

* Move dupe checker to its own function

* Fix some accidental changes

* Revert yarn.lock(?)

* Route > page

* Use pages for store example

* Warn about nested api routes

* Check for duplicate api routes

* Warn api dupe routes

* Remove stray process.exit

* Merge api and pages dupe checkers

* Delete old checkers

* Remove stray line

Co-authored-by: merelinguist <merelinguist@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-14 12:43:01 +07:00
allcontributors[bot]
5d22f9b2cc docs: add wKovacs64 as a contributor (#111)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-04-14 11:22:28 +07:00
Justin Hall
1ea4398216 fix(cli): spawn Windows .cmd entrypoints on win32 platform (#109)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-14 11:21:30 +07:00
Rudi Yardley
bb93ed8843 fix(examples): Fix Yarn link blitz cli failing (#105)
* Add version to example

* Try using generic versions
2020-04-14 11:03:11 +07:00
Brandon Bayer
e2eed221e0 chore: update githead 2020-04-13 15:45:10 +07:00
Brandon Bayer
6719104cb3 v0.0.1-canary.1 2020-04-13 15:39:42 +07:00
Brandon Bayer
d103345b77 chore: remove version from examples 2020-04-13 15:38:54 +07:00
Brandon Bayer
ae99dc4a55 v0.0.1-canary.0 2020-04-13 15:35:08 +07:00
Brandon Bayer
4658f616f1 chore: update lerna config 2020-04-13 15:31:44 +07:00
Brandon Bayer
48861cbf25 chore: change version to 0.0.0 2020-04-13 15:27:16 +07:00
Brandon Bayer
c82de5cfd0 feat: Implement the new Architecture! (#95)
* wip

* working rpc mutation

* queries and mutations working!!

* prewarm the lamba

* update withBlitz config wrapper - remove stuff no longer needed

* switch from `pages` to `routes`

* fix a test issue

* fix cli test

* Add file addition and subtraction to transform stream

* Remove comments

* Allow pages and routes

* Allow routes folder without context

* Tidy up build rules

* Fix broken transform test

* Use done callback to ensure all events have passed in stream test

* Fix next build breaking

* File generation RPC works

* Remove commented out code

* Ensure correct jest version so tests run and tidy up

* Fix up linting

* Tidy up synchroniser

* Ensure watcher close is run when watchmode is false

* typo

* update cli readme

* Fix start error

* Downgrade ts-jest to remove warning

* fix build with static pages

* rerun prettier on all files

* yarn workspace: nohoist husky and prisma

* add missing dependency

Co-authored-by: Rudi Yardley <contact@rudiyardley.com>
2020-04-13 13:53:33 +07:00
Brandon Bayer
64185b884d chore: upgrade dependencies (#96) 2020-04-11 21:25:36 +07:00
Rudi Yardley
9bdc4350f9 fix(server): Fix ignorePath (#94)
* Fix up globs

* Revert move as it doesnt really matter because of ignorePaths
2020-04-11 14:17:25 +07:00
Rudi Yardley
81735c4dec Fix launchEditor bug (#92) 2020-04-11 16:37:39 +10:00
Brandon Bayer
53eab985fd chore: remove all prototype code in prep for new architecture code (#90)
* remove all prototype code and clean up deps

* fixes
2020-04-11 10:25:33 +07:00
Brandon Bayer
e16d66a4c5 docs: update readme 2020-04-09 10:20:49 +07:00
Dylan Brookes
bc3aa30929 docs: Fix website link (#86)
* Fix website link

* regenerate readme

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-07 18:18:01 +07:00
dependabot[bot]
9d8edb6ead chore(deps): bump acorn from 5.7.3 to 5.7.4 (#83)
Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
Co-authored-by: Rudi Yardley <contact@rudiyardley.com>
2020-04-07 14:47:54 +10:00
Brandon Bayer
25ff55291a chore: add rudi as code owner of packages/server 2020-04-07 09:18:33 +07:00
Rudi Yardley
2a9ac48a72 Fix dangling chokidar watch and add temporary logging. (#82)
* Add logging

* Add better commit message

* Ensure will only run if jest is running

* Add manifest to output log

* Update message

* Use specific ignore in build folder

* Add dot ahead of ignored patterns

* Close Watcher

* Remove stray reference

* Neaten up
2020-04-07 08:42:07 +07:00
Brandon Bayer
925098534f chore: update readme 2020-04-06 20:57:11 +07:00
Brandon Bayer
277c704be8 chore: tweak readme 2020-04-06 20:06:46 +07:00
Brandon Bayer
046b2ed300 Add @merelinguist as a contributor 2020-04-06 20:05:20 +07:00
Brandon Bayer
ef579daf1c chore: fix rishabhpoddar readme link 2020-04-06 20:05:13 +07:00
Lorenzo Rapetti
e44785bcff refactor(cli): CLI refactoring (#25)
* Add base generator class

* change from mem-fs to fs.mkdirSync due to undefined error

* Add base command class

* Add conflict checker

* Add dry run to generator

* Add install via npm or yarn

* Add --no-yarn

* remove unused nyc dependency

Co-authored-by: marcoseoane <marcorseoane@outlook.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-06 18:27:29 +07:00
Brandon Bayer
72697f25f9 fix readme 2020-04-05 17:58:47 +07:00
allcontributors[bot]
fa6067eee7 docs: add marcoseoane as a contributor (#81)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-03 12:05:40 +07:00
allcontributors[bot]
6879be005e docs: add rishabhpoddar as a contributor (#78)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-03 12:04:22 +07:00
allcontributors[bot]
52e93a608b docs: add aem as a contributor (#79)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-04-03 12:02:10 +07:00
allcontributors[bot]
bce5a4bd37 docs: add lorenzorapetti as a contributor (#80)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-04-03 11:59:58 +07:00
Brandon Bayer
1dad620368 doc: Add All Contributors Spec, Add CONTRIBUTING.md, Update Readme (#77)
* Added financial contributors to the README

* Add @flybayer as a contributor

* Add @medelman17 as a contributor

* Add @ryardley as a contributor

* Add @toddgeist as a contributor

* Add @quirk0o as a contributor

* Add @tsawan as a contributor

* Add @camilo86 as a contributor

* Add @dkempner as a contributor

* Add @gielcobben as a contributor

* Add @MrLeebo as a contributor

* Add @jimthedev as a contributor

* update readme & add CONTRIBUTING.md

* add Kristina

* Add @robdrosenberg as a contributor

* Add @jasonblalock as a contributor

* Add @coreybrown89 as a contributor

* Add @aej11a as a contributor

* update badegs

* tweak

* tweak

* more

Co-authored-by: Jess <jessachandler@gmail.com>
2020-04-03 11:40:31 +07:00
Brandon Bayer
f09b968e27 Update README.md 2020-04-02 20:14:26 +07:00
Brandon Bayer
7f81d6291d Revert "add initial file structure rfc"
This reverts commit f48a776e99.
2020-04-02 19:25:02 +07:00
Brandon Bayer
f48a776e99 add initial file structure rfc 2020-04-02 19:24:07 +07:00
Brandon Bayer
3e63287fa2 Update MANIFESTO.md 2020-04-01 13:13:21 +07:00
Beata Obrok
828c8d2f23 feat(cli): load dependencies in blitz console (#68)
* [cli] feat: autoload package dependencies in console

* feat: load Prisma Client into console context

* [cli] spec: fix spec for console command

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-25 12:13:55 +07:00
Rudi Yardley
d8c2f696b1 bug(server): CI pathname errors for readable-stream (#71)
* Try setting normalise to false on tree testing

* Remove debugging log
2020-03-24 12:57:35 +07:00
Rudi Yardley
4f21628365 feat(server): Transform rules and synchronisation manifest (#69)
* Extract config

* Use gulp pipes to apply tranforms and write manifest.

* Add linting comments to allow import reordering

* Fix manifest bug

* Refactor to pipeline and fix testing method

* Include clean

* Fix up dependencies and tidy up code

* Fix newline issue

* Fix dependencies again

* Fix up testing strategy for file manipulations

* Renaming file because of inconsistency pt1

* Renaming file because of inconsistency pt2

* Update CLI test

* Debug CI build failures not occuring locally

* Include catch for missing unlink
2020-03-20 15:45:24 +07:00
Brandon Bayer
0521b595fe chore: add github sponsor link 2020-03-13 14:16:51 +07:00
Brandon Bayer
f0159a05ae docs: update readme 2020-03-12 19:05:03 +07:00
Brandon Bayer
4a1e7e361f docs: add manifesto to readme 2020-03-11 22:00:20 +07:00
Rudi Yardley
b1f620a579 feat(server): Errors respect file path redirection (#66)
* Expose next-executable

* Redirecting errors correctly with mocked rules

* Add comments about what is waiting

* Remove prepare as it was causing errors when installing dependencies

* Mock outer function instead of call to spawn

* Try using import *

* Remove CI switch as that was not the problem

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-11 21:56:47 +07:00
Giel
dfbcb5bf67 feat: Upgrade next to latest release v9.3.0, closes #60 (#65)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-11 21:45:54 +07:00
Brandon Bayer
0677a16e75 chore: tweak github actions to remove duplicate builds 2020-03-11 21:37:45 +07:00
Brandon Bayer
968b507570 fix: running tests locally after packages have been built 2020-03-11 17:57:15 +07:00
Rudi Yardley
e773b26f5f refactor(server): create server package (#57)
* @blitzjs/webpack -> @blitzjs/server

* Move server code out of cli

* Fix up type and lerna issues

* Prebuild non-cli before test

* Remove noise in PR
2020-03-11 14:02:23 +07:00
Brandon Bayer
54e4759791 docs: Add the Blitz Manifesto! (#52) 2020-03-10 18:06:40 +07:00
Tahir Awan
df0e5d3539 feat(cli): Add blitz db command #24 (#51)
* Add db command

* fixed test

closes #24

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-10 15:51:38 +07:00
Brandon Bayer
32944666f4 tweak funding 2020-03-10 10:48:32 +07:00
Tahir Awan
b5e0d7afed feat(cli): Add blitz test watch command #23 (#50)
* Add test watch

* Add test:watch

closes #23

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-09 15:30:08 +07:00
Rudi Yardley
4bb86dc8b8 fix(cli): Fix bug in build script (#49)
* Unlink doesnt work on folders

* Mock remove
2020-03-09 15:25:42 +07:00
Rudi Yardley
93a5fb057e feat(cli): Compile to Next (#45)
* Only create a prisma client when it actually needed

* Setup start script for a simple next-project

* Enable "compile to next" on first-demo

* Whitespace

* Fix failing webpack config test

* Testing spawn call

* Neaten up code

* Test tsExtraMock instead of reporter

* Test file deletion

* Better file locations

* Dont need persistent anymore

* Development, Production, Build, Deploy

* Add ts-ignore so we dont get compiler errors

* Remove test on command with flags

* Tidy up typescript config and add test

* Add comment around type issues

* Remove author field

* Tidy up config changs

* quiet core tests

* move es6 from root tsconfig to cli tsconfig

* Rename start -> scripts and tidy up descriptions

* Test build script

* Fix up test description

* Fix bug in build script

Closes #21, #36

Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-09 09:37:59 +07:00
Beata Obrok
3c044fd4d0 test(examples): add cypress tests to first demo (#47)
* [examples] feat: setup cypress in first demo

* [examples] spec: add cypress tests for first demo

closes #44
2020-03-08 18:34:21 +07:00
Brandon Bayer
b430c87b65 fix(core): Add support for multiple attribute types for id (#35)
* Add support for multiple attribute types for id

* Add comment + tests
2020-03-05 21:05:22 +07:00
Brandon Bayer
903644b628 feat(core): Return 404 if controller action is not defined (#39)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-05 11:11:39 +07:00
Brandon Bayer
d26be24cb3 feat(cli): use custom REPL in console command (#38)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-05 10:51:06 +07:00
Brandon Bayer
949e7eb83f bug(webpack): Create webpack package to avoid context bugs (#42)
* Add new webpack package

* Delete webpack files from core

* Pin dependencies
2020-03-05 10:40:15 +07:00
Brandon Bayer
97bb455cc4 fix: Fix jest version incompatability (#43) 2020-03-05 08:12:35 +07:00
Brandon Bayer
cdb5ff2133 bug(example): Fix Invalid hook call error. (#37) 2020-03-05 08:11:13 +07:00
Brandon Bayer
b1aee93e2d chore: comment cleanup 2020-03-04 10:24:34 +07:00
Brandon Bayer
667566e341 docs: fix typo 2020-03-04 09:46:24 +07:00
Brandon Bayer
c51443bf5d docs: add dev onboarding blurb to readme 2020-03-04 09:45:26 +07:00
Camilo Gonzalez
ab4a3d2748 feat(cli): Add blitz test command (#30)
* add run tests command

* add test command

* add test cmd unit test

* uses project package manager (npm/yarn) to run test script

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

closes #22
2020-03-04 09:37:46 +07:00
Beata Obrok
6d6a689557 feat(cli): Add blitz console command (#32)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-04 09:36:22 +07:00
Brandon Bayer
16c2031d2a docs: Update CODE_OF_CONDUCT.md (#28) 2020-03-04 09:33:21 +07:00
Brandon Bayer
590b20f12e chore: add pull_request event to github action 2020-03-04 09:30:02 +07:00
Brandon Bayer
c82c0b3689 feat(core): Add withBlitz webpack wrapper + fix prisma/client (#31)
* add withBlitz webpack config wrapper

* Move prisma/client noop into withBlitz!
2020-03-03 16:16:10 +07:00
Jim Cummins
18d38d79e7 fix: noop @prisma/client in browser, closes #13 (#19)
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-02 21:50:56 +07:00
Jeremy Liberman
4113124ec4 chore(core): Add core tests (#16)
* Add core tests

- Tests cover Form and Controller
- You can check code coverage with "yarn test --coverage"

* A little formatting + form test modifications

* add back console log

Co-authored-by: Yanick Bélanger <yanick.belanger@yahoo.com>
Co-authored-by: Brandon Bayer <b@bayer.ws>
2020-03-02 10:22:08 +07:00
Brandon Bayer
8f6d0e03ac feat(cli): Add initial CLI (#8)
* v0.0.1

Initial PR for oclif CLI

* update prettier config

* chore: repo updates - run prettier on commit

* organize package.json + correct package name

* Add initial app generator

* changes & cleanup

* more tweaks

* Add basic nextjs generation

* #9 Swapping Mocha with Jest for CLI

Swapped Mocha with Jest.

* Swapping Mocha with Jest for CLI

Swapped Mocha with Jest.

* add `yarn b [COMMAND]` for dev convenience

* Formalize path arg

* Make jest work

* Remove empty commands and make tests pass

* Fix path argument

* Revert "target" in tsconfig.json

* Remove `target` from cli package.json

* Fix build command

* Use custom tsconfig for test script

* remove nyc because jest has coverage built in

* little cleanup

Co-authored-by: Mina Abadir <mina@abadir.email>
Co-authored-by: Lorenzo Rapetti <lorenzo.rapetti.94@gmail.com>
2020-03-01 15:46:35 +07:00
Brandon Bayer
c48fd8925b chore: add sponsor section to readme 2020-02-27 18:39:07 -08:00
Brandon Bayer
66af983955 chore: Add Patreon and Paypal to the sponsor button options (#18) 2020-02-27 18:36:11 -08:00
Brandon Bayer
55b735086c chore: add flybayer as codeowner of everything 2020-02-27 18:14:45 -08:00
Brandon Bayer
4e64784749 fix(demo): switch to fruit content filter 2020-02-27 18:13:49 -08:00
Brandon Bayer
3ee2ef0b42 Add Open Collective Sponsor button (#15) 2020-02-26 21:25:33 -08:00
Brandon Bayer
eaa6fc8802 fix(demo): add content filtering! 2020-02-26 17:11:56 -08:00
Brandon Bayer
ef6bf61c5b fix(demo): untitled posts 2020-02-26 16:33:55 -08:00
Brandon Bayer
5f5b589a7f chore(demo): add some comments 2020-02-26 16:07:18 -08:00
Brandon Bayer
82ae27841c Live Demo Deployment (#12)
* add github link to demo

* fix(core): connect to db right away + fix for connection undefined

* changes to demo needed for production deployment

* fix(demo): relax tsconfig

* upgrade prisma & fix core for deployment

* demo updates
2020-02-26 15:56:47 -08:00
Brandon Bayer
8623d5a817 Add initial Blitz Core and First Demo 🎉 (#11)
* wip

* chore: fix typings, tweak build config

* update prettier config

* set up husky to run prettier on commit

* add migrate script and update readme

* changes, still broken

* add yarn dev command

* more changes, still broken

* demo working again!

* fix: yarn why do you hate me so much?

* add to gitignore

* trying to get demo dev to work right

* refactor and cleanup

* more cleanup

* update deps

* tweak

* update readme

* fix

* update readme

Co-authored-by: Michael Edelman  <michael@edel.mn>
2020-02-26 12:46:30 -08:00
Brandon Bayer
250c49c7bd chore: update readme 2020-02-25 16:28:33 -08:00
Brandon Bayer
7739c3e951 remove broken gh action 2020-02-25 16:24:11 -08:00
Brandon Bayer
8a7f7931f4 Update README.md 2020-02-23 13:03:33 -08:00
Brandon Bayer
6579e85a96 docs: add code of conduct 2020-02-23 11:46:21 -08:00
Michael Edelman
1195f5225e chore: shush slack bot, add GH actions badge to README (#6) 2020-02-22 09:29:35 -08:00
Michael Edelman
9b206a9831 Implement Initial Continuous Integration Workflow Using GitHub Actions (#3)
* build: add GH action for CI

* fix: tweak test-related scripts in package.json
2020-02-20 14:12:36 -08:00
Michael Edelman
dae1db73e9 Create GitHub Action for Slack Notice 2020-02-20 16:07:12 -05:00
Michael Edelman
d63f59d2fa tada: bootstrap all the things (#2) 2020-02-19 16:33:26 -08:00
Brandon Bayer
bbf9cb0d2b Update README.md 2020-02-19 10:24:12 -08:00
Brandon Bayer
a44b1d93c1 Update README.md 2020-02-19 10:21:17 -08:00
Brandon Bayer
3dab930a75 Merge pull request #1 from dkempner/patch-1
Bigger click target = higher conversion rate
2020-02-17 14:51:14 -08:00
Daniel Kempner
939fad20f6 Bigger click target = higher conversion rate 2020-02-17 14:44:26 -08:00
Brandon Bayer
2e06ef8637 Update README.md 2020-02-17 14:28:53 -08:00
Brandon Bayer
12ab14bc57 Update README.md 2020-02-17 13:56:53 -08:00
Brandon Bayer
45000493e0 Update README.md 2020-02-17 13:55:13 -08:00
501 changed files with 48520 additions and 2 deletions

800
.all-contributorsrc Normal file
View File

@@ -0,0 +1,800 @@
{
"projectName": "blitz",
"projectOwner": "blitz-js",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"badgeTemplate": "<a aria-label=\"All Contributors\" href=\"#contributors-\"><img alt=\"\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-17BB8A.svg?style=for-the-badge&labelColor=000000\"></a>",
"imageSize": 100,
"commit": true,
"commitConvention": "none",
"contributors": [
{
"login": "flybayer",
"name": "Brandon Bayer",
"avatar_url": "https://avatars3.githubusercontent.com/u/8813276?v=4",
"profile": "https://twitter.com/flybayer",
"contributions": [
"code",
"content",
"ideas",
"review"
]
},
{
"login": "ryardley",
"name": "Rudi Yardley",
"avatar_url": "https://avatars0.githubusercontent.com/u/1256409?v=4",
"profile": "https://medium.com/@ryardley",
"contributions": [
"code",
"ideas",
"review",
"test"
]
},
{
"login": "merelinguist",
"name": "Dylan Brookes",
"avatar_url": "https://avatars3.githubusercontent.com/u/24858006?v=4",
"profile": "https://merelinguist.me",
"contributions": [
"code",
"ideas",
"review",
"test",
"doc"
]
},
{
"login": "aem",
"name": "Adam Markon",
"avatar_url": "https://avatars0.githubusercontent.com/u/1909883?v=4",
"profile": "https://github.com/aem",
"contributions": [
"code",
"ideas",
"review",
"test",
"maintenance"
]
},
{
"login": "coreybrown89",
"name": "Corey Brown",
"avatar_url": "https://avatars1.githubusercontent.com/u/12791148?v=4",
"profile": "https://corey-brown.com",
"contributions": [
"code",
"review",
"maintenance"
]
},
{
"login": "LoriKarikari",
"name": "Lori Karikari",
"avatar_url": "https://avatars1.githubusercontent.com/u/7902980?v=4",
"profile": "https://github.com/LoriKarikari",
"contributions": [
"code",
"review",
"maintenance",
"doc"
]
},
{
"login": "eliasjohansson",
"name": "Elias Johansson",
"avatar_url": "https://avatars3.githubusercontent.com/u/22719177?v=4",
"profile": "https://twitter.com/GeggsElias",
"contributions": [
"code",
"review",
"maintenance"
]
},
{
"login": "medelman17",
"name": "Michael Edelman ",
"avatar_url": "https://avatars1.githubusercontent.com/u/14793389?v=4",
"profile": "https://fabulas.io",
"contributions": [
"infra",
"code"
]
},
{
"login": "toddgeist",
"name": "Todd Geist",
"avatar_url": "https://avatars2.githubusercontent.com/u/316792?v=4",
"profile": "http://www.geistinteractive.com",
"contributions": [
"financial"
]
},
{
"login": "robdrosenberg",
"name": "Robert Rosenberg",
"avatar_url": "https://avatars0.githubusercontent.com/u/20813991?v=4",
"profile": "http://robdrosenberg.com",
"contributions": [
"code",
"maintenance",
"doc"
]
},
{
"login": "quirk0o",
"name": "Beata Obrok",
"avatar_url": "https://avatars3.githubusercontent.com/u/5123725?v=4",
"profile": "https://github.com/quirk0o",
"contributions": [
"code"
]
},
{
"login": "tsawan",
"name": "Tahir Awan",
"avatar_url": "https://avatars3.githubusercontent.com/u/3263082?v=4",
"profile": "https://github.com/tsawan",
"contributions": [
"code"
]
},
{
"login": "camilo86",
"name": "Camilo Gonzalez",
"avatar_url": "https://avatars1.githubusercontent.com/u/2454632?v=4",
"profile": "https://raluce.com",
"contributions": [
"code"
]
},
{
"login": "dkempner",
"name": "Daniel Kempner",
"avatar_url": "https://avatars3.githubusercontent.com/u/2532112?v=4",
"profile": "http://da.nielkempner.com",
"contributions": [
"code"
]
},
{
"login": "gielcobben",
"name": "Giel",
"avatar_url": "https://avatars0.githubusercontent.com/u/2663212?v=4",
"profile": "http://gielcobben.com",
"contributions": [
"code"
]
},
{
"login": "MrLeebo",
"name": "Jeremy Liberman",
"avatar_url": "https://avatars3.githubusercontent.com/u/2754163?v=4",
"profile": "http://jeremyliberman.com/",
"contributions": [
"code",
"maintenance",
"test"
]
},
{
"login": "jimthedev",
"name": "Jim Cummins",
"avatar_url": "https://avatars0.githubusercontent.com/u/108938?v=4",
"profile": "https://jimthedev.com",
"contributions": [
"code"
]
},
{
"name": "Kristina Matuška",
"avatar_url": "https://media-exp1.licdn.com/dms/image/C5603AQHVPAjV21gw9g/profile-displayphoto-shrink_200_200/0?e=1591228800&v=beta&t=0MlbmiYhNvGv1xjLD_fOhOFjVDZ7ltNwfGNeJ4DHedQ",
"profile": "http://kristinamatuska.com/",
"contributions": [
"design"
]
},
{
"login": "jasonblalock",
"name": "Jason Blalock",
"avatar_url": "https://avatars0.githubusercontent.com/u/5899929?v=4",
"profile": "https://github.com/jasonblalock",
"contributions": [
"code"
]
},
{
"login": "aej11a",
"name": "aej11a",
"avatar_url": "https://avatars2.githubusercontent.com/u/10066422?v=4",
"profile": "https://github.com/aej11a",
"contributions": [
"code"
]
},
{
"login": "marcoseoane",
"name": "marcoseoane",
"avatar_url": "https://avatars0.githubusercontent.com/u/28088807?v=4",
"profile": "https://github.com/marcoseoane",
"contributions": [
"ideas"
]
},
{
"login": "rishabhpoddar",
"name": "Rishabh Poddar",
"avatar_url": "https://avatars2.githubusercontent.com/u/2976287?v=4",
"profile": "https://github.com/rishabhpoddar",
"contributions": [
"ideas"
]
},
{
"login": "lorenzorapetti",
"name": "Lorenzo Rapetti",
"avatar_url": "https://avatars1.githubusercontent.com/u/2632174?v=4",
"profile": "https://github.com/lorenzorapetti",
"contributions": [
"code"
]
},
{
"login": "wKovacs64",
"name": "Justin Hall",
"avatar_url": "https://avatars1.githubusercontent.com/u/1288694?v=4",
"profile": "https://github.com/wKovacs64",
"contributions": [
"code",
"doc"
]
},
{
"login": "sijad",
"name": "Sajjad Hashemian",
"avatar_url": "https://avatars3.githubusercontent.com/u/7693001?v=4",
"profile": "https://github.com/sijad",
"contributions": [
"code"
]
},
{
"login": "ETLopes",
"name": "Eduardo Lopes",
"avatar_url": "https://avatars3.githubusercontent.com/u/34959471?v=4",
"profile": "https://github.com/ETLopes",
"contributions": [
"code"
]
},
{
"login": "mattleff",
"name": "Matthew Leffler",
"avatar_url": "https://avatars0.githubusercontent.com/u/120155?v=4",
"profile": "https://github.com/mattleff",
"contributions": [
"doc"
]
},
{
"login": "hew",
"name": "Matt",
"avatar_url": "https://avatars0.githubusercontent.com/u/3103241?v=4",
"profile": "https://hew.tools",
"contributions": [
"doc"
]
},
{
"login": "sonnypgs",
"name": "Sonny",
"avatar_url": "https://avatars3.githubusercontent.com/u/1431300?v=4",
"profile": "https://github.com/sonnypgs",
"contributions": [
"doc"
]
},
{
"login": "Zeko369",
"name": "Fran Zekan",
"avatar_url": "https://avatars3.githubusercontent.com/u/3064377?v=4",
"profile": "https://github.com/Zeko369",
"contributions": [
"code",
"doc"
]
},
{
"login": "janbaykara",
"name": "Jan Baykara",
"avatar_url": "https://avatars2.githubusercontent.com/u/237556?v=4",
"profile": "http://twitter.com/JanBaykara",
"contributions": [
"doc"
]
},
{
"login": "mikeattara",
"name": "Mike Perry Y Attara",
"avatar_url": "https://avatars1.githubusercontent.com/u/31483629?v=4",
"profile": "https://mikeattara.com",
"contributions": [
"doc"
]
},
{
"login": "DevanB",
"name": "Devan",
"avatar_url": "https://avatars0.githubusercontent.com/u/354652?v=4",
"profile": "https://devanthe.dev",
"contributions": [
"doc"
]
},
{
"login": "jclancy93",
"name": "Jack Clancy",
"avatar_url": "https://avatars2.githubusercontent.com/u/7850202?v=4",
"profile": "https://github.com/jclancy93",
"contributions": [
"code",
"maintenance"
]
},
{
"login": "ntgussoni",
"name": "Nicolas Torres",
"avatar_url": "https://avatars0.githubusercontent.com/u/10161067?v=4",
"profile": "https://github.com/ntgussoni",
"contributions": [
"test",
"code"
]
},
{
"login": "skn0tt",
"name": "Simon Knott",
"avatar_url": "https://avatars1.githubusercontent.com/u/14912729?v=4",
"profile": "http://simonknott.de",
"contributions": [
"code",
"test",
"maintenance"
]
},
{
"login": "kandros",
"name": "Jaga Santagostino",
"avatar_url": "https://avatars0.githubusercontent.com/u/4562878?v=4",
"profile": "http://jagascript.com",
"contributions": [
"code",
"doc",
"maintenance"
]
},
{
"login": "jportela",
"name": "João Portela",
"avatar_url": "https://avatars0.githubusercontent.com/u/1010018?v=4",
"profile": "http://www.joaoportela.com",
"contributions": [
"code"
]
},
{
"login": "dajinchu",
"name": "Da-Jin Chu",
"avatar_url": "https://avatars0.githubusercontent.com/u/7122182?v=4",
"profile": "http://dajin.dev",
"contributions": [
"code"
]
},
{
"login": "Shinyaigeek",
"name": "Shinobu Hayashi",
"avatar_url": "https://avatars1.githubusercontent.com/u/42742053?v=4",
"profile": "https://shinyaigeek.dev/",
"contributions": [
"code"
]
},
{
"login": "karankiri",
"name": "Karan Kiri",
"avatar_url": "https://avatars2.githubusercontent.com/u/19989161?v=4",
"profile": "http://karankiri.com",
"contributions": [
"code"
]
},
{
"login": "fullmetalengineer",
"name": "Alan Long",
"avatar_url": "https://avatars2.githubusercontent.com/u/5294903?v=4",
"profile": "https://github.com/fullmetalengineer",
"contributions": [
"doc"
]
},
{
"login": "developerfred",
"name": "codingsh",
"avatar_url": "https://avatars2.githubusercontent.com/u/57037080?v=4",
"profile": "http://codingsh.xyz",
"contributions": [
"code"
]
},
{
"login": "peaonunes",
"name": "Rafael Nunes",
"avatar_url": "https://avatars0.githubusercontent.com/u/3356720?v=4",
"profile": "http://twitter.com/peaonunes",
"contributions": [
"review",
"code"
]
},
{
"login": "0ww",
"name": "Simon Debbarma",
"avatar_url": "https://avatars3.githubusercontent.com/u/31207418?v=4",
"profile": "https://simonpeterdebbarma.com",
"contributions": [
"design",
"maintenance",
"doc"
]
},
{
"login": "0xflotus",
"name": "0xflotus",
"avatar_url": "https://avatars3.githubusercontent.com/u/26602940?v=4",
"profile": "https://github.com/0xflotus",
"contributions": [
"code",
"doc"
]
},
{
"login": "tmns",
"name": "tmns",
"avatar_url": "https://avatars3.githubusercontent.com/u/35785003?v=4",
"profile": "https://dev.to/tmns",
"contributions": [
"code",
"doc"
]
},
{
"login": "harris1717",
"name": "Jru Harris",
"avatar_url": "https://avatars1.githubusercontent.com/u/8636691?v=4",
"profile": "http://jruharris.com",
"contributions": [
"doc"
]
},
{
"login": "ivandevp",
"name": "Ivan Medina",
"avatar_url": "https://avatars3.githubusercontent.com/u/9284690?v=4",
"profile": "https://twitter.com/ivandevp",
"contributions": [
"code",
"maintenance"
]
},
{
"login": "dwightwatson",
"name": "Dwight Watson",
"avatar_url": "https://avatars3.githubusercontent.com/u/1100408?v=4",
"profile": "https://www.dwightwatson.com",
"contributions": [
"code"
]
},
{
"login": "is2ei",
"name": "Horie Issei",
"avatar_url": "https://avatars3.githubusercontent.com/u/3948353?v=4",
"profile": "http://is2ei.com/",
"contributions": [
"code"
]
},
{
"login": "lednhatkhanh",
"name": "Nhat Khanh",
"avatar_url": "https://avatars2.githubusercontent.com/u/9303093?v=4",
"profile": "https://twitter.com/lednhatkhanh",
"contributions": [
"code"
]
},
{
"login": "abuuzayr",
"name": "Abu Uzayr",
"avatar_url": "https://avatars1.githubusercontent.com/u/19371989?v=4",
"profile": "https://builtforfifty.com",
"contributions": [
"code"
]
},
{
"login": "nabi009",
"name": "Nabiullah elham",
"avatar_url": "https://avatars0.githubusercontent.com/u/3170831?v=4",
"profile": "https://github.com/nabi009",
"contributions": [
"code"
]
},
{
"login": "lachlanjc",
"name": "Lachlan Campbell",
"avatar_url": "https://avatars1.githubusercontent.com/u/5074763?v=4",
"profile": "https://lachlanjc.com",
"contributions": [
"code"
]
},
{
"login": "enzoferey",
"name": "Enzo Ferey",
"avatar_url": "https://avatars1.githubusercontent.com/u/10673347?v=4",
"profile": "http://enzoferey.com",
"contributions": [
"code"
]
},
{
"login": "pgrimaud",
"name": "Pierre Grimaud",
"avatar_url": "https://avatars1.githubusercontent.com/u/1866496?v=4",
"profile": "https://github.com/pgrimaud",
"contributions": [
"code"
]
},
{
"login": "jletey",
"name": "John Letey",
"avatar_url": "https://avatars1.githubusercontent.com/u/62398724?v=4",
"profile": "https://github.com/jletey",
"contributions": [
"code"
]
},
{
"login": "pixelmord",
"name": "Andreas Adam",
"avatar_url": "https://avatars2.githubusercontent.com/u/224168?v=4",
"profile": "https://pixelmord.github.io",
"contributions": [
"code"
]
},
{
"login": "kevotovar",
"name": "Kevin Tovar",
"avatar_url": "https://avatars3.githubusercontent.com/u/15717067?v=4",
"profile": "https://kevo.dev",
"contributions": [
"code"
]
},
{
"login": "anteprimorac",
"name": "Ante Primorac",
"avatar_url": "https://avatars0.githubusercontent.com/u/972083?v=4",
"profile": "http://anteprimorac.com.hr",
"contributions": [
"code",
"doc"
]
},
{
"login": "MykalMachon",
"name": "Mykal Machon",
"avatar_url": "https://avatars1.githubusercontent.com/u/7844994?v=4",
"profile": "http://mykalmachon.dev",
"contributions": [
"code"
]
},
{
"login": "jamiedavenport",
"name": "Jamie Davenport",
"avatar_url": "https://avatars2.githubusercontent.com/u/1329874?v=4",
"profile": "https://jamiedavenport.dev",
"contributions": [
"code"
]
},
{
"login": "ganeshmani",
"name": "GaneshMani",
"avatar_url": "https://avatars0.githubusercontent.com/u/17050715?v=4",
"profile": "https://cloudnweb.dev/",
"contributions": [
"code"
]
},
{
"login": "reymon359",
"name": "reymon359",
"avatar_url": "https://avatars3.githubusercontent.com/u/31936665?v=4",
"profile": "http://ramonmorcillo.com",
"contributions": [
"code"
]
},
{
"login": "gvasquez11",
"name": "gvasquez11",
"avatar_url": "https://avatars1.githubusercontent.com/u/36422346?v=4",
"profile": "https://www.linkedin.com/in/gregory-vasquez-96413b184/",
"contributions": [
"code"
]
},
{
"login": "josemiguelo",
"name": " José Miguel Ochoa",
"avatar_url": "https://avatars1.githubusercontent.com/u/15330034?v=4",
"profile": "https://github.com/josemiguelo",
"contributions": [
"code"
]
},
{
"login": "osirvent",
"name": "Oscar Sirvent",
"avatar_url": "https://avatars2.githubusercontent.com/u/5927133?v=4",
"profile": "https://github.com/osirvent",
"contributions": [
"code",
"doc"
]
},
{
"login": "donni106",
"name": "Daniel Molnar",
"avatar_url": "https://avatars0.githubusercontent.com/u/1942953?v=4",
"profile": "https://github.com/donni106",
"contributions": [
"doc",
"code"
]
},
{
"login": "exclipy",
"name": "Kevin Wu Won",
"avatar_url": "https://avatars1.githubusercontent.com/u/508799?v=4",
"profile": "https://github.com/exclipy",
"contributions": [
"doc"
]
},
{
"login": "tehnuge",
"name": "John Duong",
"avatar_url": "https://avatars1.githubusercontent.com/u/1928236?v=4",
"profile": "https://github.com/tehnuge",
"contributions": [
"code"
]
},
{
"login": "fnoah",
"name": "Noah Fleischmann",
"avatar_url": "https://avatars0.githubusercontent.com/u/23707137?v=4",
"profile": "https://noahfleischmann.com",
"contributions": [
"code"
]
},
{
"login": "toshi1127",
"name": "Matsumoto Toshi",
"avatar_url": "https://avatars3.githubusercontent.com/u/32378535?v=4",
"profile": "https://github.com/toshi1127",
"contributions": [
"code",
"doc"
]
},
{
"login": "simonedelmann",
"name": "Simon Edelmann",
"avatar_url": "https://avatars2.githubusercontent.com/u/2821076?v=4",
"profile": "https://github.com/simonedelmann",
"contributions": [
"code"
]
},
{
"login": "shaunchurch",
"name": "Shaun Church",
"avatar_url": "https://avatars3.githubusercontent.com/u/571764?v=4",
"profile": "https://shaun.church",
"contributions": [
"doc",
"code"
]
},
{
"login": "styfle",
"name": "Steven",
"avatar_url": "https://avatars1.githubusercontent.com/u/229881?v=4",
"profile": "https://styfle.dev",
"contributions": [
"doc"
]
},
{
"login": "SigurdMW",
"name": "Sigurd Moland Wahl",
"avatar_url": "https://avatars3.githubusercontent.com/u/6359003?v=4",
"profile": "https://github.com/SigurdMW",
"contributions": [
"code"
]
},
{
"login": "sbardian",
"name": "Brian Andrews",
"avatar_url": "https://avatars1.githubusercontent.com/u/6384100?v=4",
"profile": "https://brianandrews.dev/",
"contributions": [
"doc"
]
},
{
"login": "garrisons",
"name": "Garrison Snelling",
"avatar_url": "https://avatars0.githubusercontent.com/u/5100597?v=4",
"profile": "http://garrisonsnelling.com",
"contributions": [
"doc"
]
},
{
"login": "tylangesmith",
"name": "Ty Lange-Smith",
"avatar_url": "https://avatars1.githubusercontent.com/u/22609577?v=4",
"profile": "https://github.com/tylangesmith",
"contributions": [
"code"
]
},
{
"login": "rubenmoya",
"name": "Rubén Moya",
"avatar_url": "https://avatars3.githubusercontent.com/u/905225?v=4",
"profile": "https://rubenmoya.dev",
"contributions": [
"code"
]
},
{
"login": "robertgrzonka",
"name": "robertgrzonka",
"avatar_url": "https://avatars0.githubusercontent.com/u/35585466?v=4",
"profile": "https://github.com/robertgrzonka",
"contributions": [
"code",
"infra"
]
}
],
"contributorsPerLine": 7,
"skipCi": true
}

39
.eslintrc.js Normal file
View File

@@ -0,0 +1,39 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
project: `./tsconfig.json`,
},
plugins: ["@typescript-eslint", "import", "unicorn"],
extends: ["react-app"],
rules: {
"react/react-in-jsx-scope": "off", // React is always in scope with Blitz
"jsx-a11y/anchor-is-valid": "off", //Doesn't play well with Blitz/Next <Link> usage
"import/first": "off",
"import/no-default-export": "error",
"require-await": "error",
"no-async-promise-executor": "error",
"unicorn/filename-case": [
"error",
{
case: "kebabCase",
},
],
"@typescript-eslint/no-floating-promises": "error",
},
ignorePatterns: ["packages/cli/", "packages/generator/templates"],
overrides: [
{
files: ["examples/**", "packages/gui/**", "recipes/**"],
rules: {
"import/no-default-export": "off",
"unicorn/filename-case": "off",
"@typescript-eslint/no-floating-promises": "off",
},
},
],
}

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=auto eol=lf

10
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,10 @@
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
* @flybayer
*.md @merelinguist
packages/server/**/* @ryardley
packages/file-pipeline/**/* @ryardley
packages/cli/**/* @aem
packages/generator/**/* @aem
packages/installer/**/* @aem

4
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
github: blitz-js
custom: ["https://paypal.me/thebayers"]
open_collective: blitzjs
patreon: flybayer

23
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,23 @@
---
name: Bug report
about: Something is not working right. Or error messages are unclear.
title: ''
labels: ''
assignees: ''
---
### What is the problem?
### Steps to Reproduce
1.
### Versions
```
output of `blitz --version --verbose`
```
### Other
Please include applicable logs and screenshots that show your problem.

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Question or Discussion
url: https://github.com/blitz-js/blitz/discussions/new
about: Ask questions and discuss with other community members

View File

@@ -0,0 +1,19 @@
---
name: Feature/change request
about: Something new or better!
title: ""
labels: ""
assignees: ""
---
### What do you want and why?
The more information the better!
### Possible implementation(s)
How might we do this?
### Additional context
Add any other context or screenshots about the feature request here.

10
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,10 @@
Closes: ??
### What are the changes and their implications?
### Checklist
- [ ] Tests added for changes
- [ ] PR submitted to [blitzjs.com](https://github.com/blitz-js/blitzjs.com) for any user facing changes
<!-- IMPORTANT: Make sure to check the "Allow edits from maintainers" box below this window -->

18
.github/checkInstallTime.js vendored Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env node
const fs = require("fs")
const yarnOut = fs.readFileSync(0, {encoding: "utf8"})
const [installTimeString] = /(?<=^Done in )\d+\.\d+(?=s\.$)/m.exec(yarnOut)
const installTime = Number(installTimeString)
console.log(`Install time: ${installTime}s`)
if (installTime < 30) {
console.log("We're below 30 secs. That's awesome!")
} else if (installTime < 50) {
console.log("We're below 50 secs. That's fine!")
} else {
console.log("We're above 50 secs. That's not great!")
process.exit(1)
}

29
.github/workflows/compressed.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Compressed Size
on:
pull_request:
branches: [master, canary]
registry_package:
types: [published]
push:
branches: [master, canary]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node and Yarn
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Install dependencies
run: |
yarn && yarn build
env:
CI: true
- name: Count size
uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

143
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,143 @@
name: Continuous Integration
on:
push:
branches:
- master
- canary
pull_request:
branches:
- master
- canary
jobs:
check_install_time:
name: Check install time
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "12.16.1"
- name: Test Install time
run: |
cd ../ && mkdir test && cd test
yarn add file:../blitz/packages/blitz --non-interactive | tee out.txt
cat out.txt | ../blitz/.github/checkInstallTime.js
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "12.16.1"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules
id: yarn-cache
uses: actions/cache@v2
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
/home/runner/.cache/Cypress
C:\Users\runneradmin\AppData\Local\Cypress\Cache
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile --silent
env:
CI: true
- name: yarn lint
run: yarn lint
env:
CI: true
build_and_test_pkgs:
name: Build & Test Packages
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "12.16.1"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules
id: yarn-cache
uses: actions/cache@v2
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
/home/runner/.cache/Cypress
C:\Users\runneradmin\AppData\Local\Cypress\Cache
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile --silent
env:
CI: true
- name: Setup kernel to increase watchers
if: matrix.os == 'ubuntu-latest'
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Build packages
run: yarn build
env:
CI: true
- name: Test Blitz Packages
run: yarn testonly:packages
env:
CI: true
build_and_test_examples:
name: Build & Test Examples
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "12.16.1"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache node_modules
id: yarn-cache
uses: actions/cache@v2
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
/home/runner/.cache/Cypress
C:\Users\runneradmin\AppData\Local\Cypress\Cache
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile --silent
env:
CI: true
- name: Setup kernel to increase watchers
if: matrix.os == 'ubuntu-latest'
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Build packages
run: yarn build
env:
CI: true
- name: Test examples
run: yarn testonly:examples
env:
CI: true

24
.gitignore vendored Normal file
View File

@@ -0,0 +1,24 @@
.log
.DS_Store
.jest-*
lib
node_modules
reports
*.log
.nyc_output
**/coverage
.yarn
.yarnrc
tsconfig.tsbuildinfo
.blitz
.next
dist
.now
# local env files
**/.envrc
**/.env
**/.env.local
**/.env.development.local
**/.env.test.local
**/.env.production.local
.blitz-*

16
.npmignore Normal file
View File

@@ -0,0 +1,16 @@
.DS_Store
.prettierrc
.nyc_output
.travis.yml
coverage
coverage.lcov
bench
docs
src
examples
babel.config.js
test
CONTRIBUTING.md
CODE_OF_CONDUCT.md
*.ts
!*.d.ts

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
save-exact=true

20
.prettierignore Normal file
View File

@@ -0,0 +1,20 @@
**/migrations/**
.blitz
.next
.log
.DS_Store
.jest-*
lib
node_modules
reports
*.log
**/.env*
.nyc_output
**/coverage
.yarn
.yarnrc
tsconfig.tsbuildinfo
dist
bin
packages/generator/templates/**
.github/ISSUE_TEMPLATE/bug_report.md

3
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,3 @@
# The Blitz Community Code of Conduct
[Read the Code of Conduct at Blitzjs.com](https://blitzjs.com/docs/code-of-conduct)

3
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,3 @@
# Contributing
[Read the Contributing Guide at Blitzjs.com](https://blitzjs.com/docs/contributing)

11
GOVERNANCE.md Normal file
View File

@@ -0,0 +1,11 @@
# Blitz.js Governance
_From Brandon Bayer (@flybayer), the creator:_
Currently at this very early stage it's basically a [BDFL situation](https://opensource.guide/leadership-and-governance/#what-are-some-of-the-common-governance-structures-for-open-source-projects), with me having the final say in decisions.
However we will move away from BDFL to something that looks more like Ember.js. It's extremely important to me (Brandon) that Blitz.js is a long-term, sustainable, and community-run project.
I would love some mentorship from people with experience in large open-source projects on making this transition.
Also, it's possible I will create one or more business around Blitz, perhaps similar to how Taylor Otwell has around Laravel, but Blitz itself will always remain a separate community-run project.

104
MAINTAINERS.md Normal file
View File

@@ -0,0 +1,104 @@
# ❤️ Blitz Maintainers
Aside from the core team, there are two levels of maintainers, described below.
## Becoming a Maintainer
We always need more level 1 maintainers! The main requirement is that you can show empathy when communicating online. We'll train you as needed on the other specifics. **This is a great role if you have limited time, because you can spend just as much time as you have without any ongoing responsibilities (unlike level 2)**
Level 2 maintainers have a much higher responsibility, so usually you will spend time as a level 1 maintainer before moving to level 2.
Please DM a core team member (Brandon Bayer, Rudi Yardley, or Dylan Brookes) in Slack if you're interested in becoming an official maintainer!
## Level 1 Maintainers
Level 1 maintainers are critical for a healthy Blitz community and project. They take a lot of burden off the core team and level 2 maintainers so they can focus on higher level things with longer term impact.
The primary responsibilities of level 1 maintainers are:
- Being a friendly, welcoming voice for the Blitz community
- Issue triage
- Pull request triage
- Monitor and answer the `#-help` slack channel
- Community encouragement
- Community moderation
- Tracking and ensuring progress of key issues
## Level 2 Maintainers
Level 2 maintainers are the backbone of the project. They are watchdogs over the code, ensuring code quality, correctness, and security. They also facilitate a rapid pace of progress.
The primary responsibilities of level 2 maintainers are:
- Code ownership over specific parts of the project
- Maintaining and improving the architecture of what they own
- Final pull request reviews
- Merging pull requests
- Tracking and ensuring progress of open pull requests
## ⚠️ Fundamentals
Maintainers are the face of the project and the front-line touch point for the community. Therefore maintainers have the very important responsibility of making people feel welcome, valued, understood, and appreciated.
**Please take time to read and understand everything outlined in this [guide on building welcoming communities](https://opensource.guide/building-community)**
Some especially important points:
- **Gratitude:** immediately express gratitude when someone opens an issue or PR. This takes effort/time and we appreciate it
- **Responsiveness:** during issue/PR triage, even if we cant do a full review right away, leave a comment thanking them and saying well review it soon
- **Understanding:** it's critical to ensure you understand exactly what someone is saying before you respond. Ask plenty of questions if needed. It's very bad if someone has to reply to your response and say "actually I was asking about X"
- In fact, at least one question is almost always required before you can respond appropriately  — whether in Github or in Slack
## Slack
- All `#-*` channels are for Blitz users
- All `#dev-*` channels are for Blitz internal development
If someone that's not a maintainer post in the wrong area, that's fine. Don't tell them they posted in the wrong place. But as a maintainer, you should for sure post in the right channel :)
## Issue Triage
#### If a bug report:
- Does it have enough information? Versions? Logs? Some way to reproduce?
- Has this already been fixed in a previous release?
- Is there already an existing issue for this?
### If a feature/change request:
- Is it clear what the request is and what the benefit will be?
- Is this an obvious win for Blitz? Then accept it
- If not obvious, then pull in a core team member or level 2 maintainer for more review
### Actions
1. Add tags:
- Add a `kind/*` tag
- Add a `scope/*` tag
- Add a `status/*` tag
- Add a good first/second issue tag if appropriate
## Pull Request Triage
- Are the changes covered by tests?
- Do the changes look ok? Make sure there's no obvious issues
### Actions
1. Kindly request any changes if needed
2. Else add a Github approval so that level 2 maintainers know it's already had an initial review
## Final PR Review & Merging (Level 2 maintainers)
As a level 2 maintainer, it is your responsibility to make sure broken code and regressions never reach the canary branch.
1. Ensure the PR'ed code fully works as intended and that there are no regressions in related code
1. If not fully covered by automated tests, you need to pull down the code locally and manually verify everything (the Github CLI helps with this!)
2. During squash & merge:
1. Change the commit title to be public friendly - this exact text will go in the release notes
2. Add the commit type in the description, in parenthesis like `(patch)`. Commit types:
- `major` - major breaking change
- `minor` - minor feature addition
- `patch` - patches, bug fixes, perf improvements, etc
- `example` - change to an example app
- `meta` - internal meta change related to the Blitz repo/project

3
MANIFESTO.md Normal file
View File

@@ -0,0 +1,3 @@
# Manifesto
[The Manifesto has been moved to Blitzjs.com](https://blitzjs.com/docs/manifesto)

107
MEETING_NOTES.md Normal file
View File

@@ -0,0 +1,107 @@
# 2020-07-07 Blitz Contributor Call
- Attending: Brandon Bayer, Robert Rosenburg, Jeremy Liberman
- Brandon:
- Finishing up session managment code
- Waiting for review of session managment code from Rishabh
- Will be working on actual auth code (vs session management) like password hashing, password reset, social login, etc.
- Benefits of our session managment vs rails
- Dont have to redirect to login page
- Using top level error component that catches authentication errors
- You can login from anywhere, during sign up
- Robert:
- Waiting on Kirstinas website designs. Desktop design is finished, but she's working on mobile design
- Code snippet / sandbox of blitz code for the website
# 2020-06-23 Blitz Contributor Call
- Attending: Brandon Bayer, Robert Rosenberg, Justin Hall, Adam Markon
- Brandon:
- Server side session management code is mostly set up. Still need to integrate client side of RPC calls to expose session information
- Identity verification/Oauth integrations still need to be firmed up
- Once auth is wrapped up we should be ready to start on plugins
- Adam:
- Been experimenting with smart page generation based on the current schema model
- MDX installer recipes
- Robert:
- Waiting on designs from Kristina
- Prism component from theme ui customization? If not try and grab source code from docusaurus line highlighting component
- Justin:
- Updated the tutorial
- Helped with various bug fixes
# 2020-06-17 Blitz Contributor Call
- Attending: Brandon Bayer, Fran Zekan, Sigurd Wahl
- Brandon:
- Spent the past week implementing HTTP middlware which is now released!
- Now working on implementing session management!
- Fran:
- Finishing up the PR for adding `blitz db seed`
- Sigurd:
- New to the community, slowly learning the codebase
- Exicited to get a first PR in here sometime soon :)
# 2020-06-09 Blitz Contributor Call
- Attending: Brandon Bayer, Rudi Yardley, Fran Zekan, Adam Markon, Robert Rosenberg, Kristina Matuska
- Brandon:
- blitzjs.com published, docs + marketing site v0.1 live
- For now most of the docs copied from react-query and Next, we should eventually clean them up so they&#39;re stylistically similar to ours, but really easy to start
- HTTP middleware is almost done, just fixing a few edge cases
- Authentication is up next after that, translating pseudocode into actual code
- Kristina:
- Homepage design mostly wrapped up right now, have to finish up mobile and light mode and then ready to move on to the rest of the docs
- Syntax highlighting, we can customize colors
- Sidebar inspiration from tailwindcss
- Robert:
- Decided to wait to convert existing components to theme UI until the final design is done
- More docs content:
- More guides
- Improve the tutorial to incorporate relationship generation
- Add branches for canary and master
- If you add a feature you can add your documentation to the canary branch
- Adam:
- blitz generate model finished!
- Installer rewrite complete
- At similar place to what Gatsby has for installing stuff
- Next up:
- Support gatsby MDX recipes
- Make all code generators aware of actual model attributes
- Fran:
- Working on a package for getting the blitz config anywhere - getConfig()
- Prevent app from &quot;warming&quot; the server when deployed as server rather than serverless
- Testing examples - e2e with cypress and unit tests with Jest so we can link to a testing setup in the docs/getting started guide
- Rudi:
- Extracted out the @blitzjs/file-pipeline (previously synchronizer)
- Extracted out the @blitzjs/display package
- Working on various Next.js compatibility issues
- Debugging a bug in blitz start where it gets stuck at \_manifest.json
# 2020-05-26 Blitz Contributor Call
- Attending: Brandon Bayer, Robert Rosenberg, Adam Markon, Simon Debbarma
- Brandon:
- Kitze livestream last week went great — recording on youtube
- Codebase walkthrough yesterday went great — recording on youtube
- Website overhaul, installed Theme UI
- Adam:
- Opened PR for Prisma model generation from the CLI
- Working on Installer stuff and prepping for integration with Gatsby recipes
- Simon
- Working on custom illustrations for the web
- Robert
- Misc work on website
- Website
- Most website components are owned by us now instead of docusaurus, we&#39;ll need to be weary of api updates and any other important component updates
- Make sidebar like tailwind docs sidebar
- Dark theme needs to be fixed
- Theme switcher inconsistent
- Live code sandbox examples
- Code comparison between blitz and rails
- Auth
- Rishabh continuing to work on pseudo code for the session management library
- Brandon planning to build http middleware support this week
- CLI
- Adam working on new features, including generating prisma models and making existing templates aware of actual model attributes
- Plugin ideas / discussion once recipes are farther along. Will post an RFC for plugins at some point

324
README.md
View File

@@ -1,2 +1,322 @@
# blitz
Framework for building monolithic, full-stack, serverless React apps with zero data-fetching and zero client-side state management
[![Blitz.js](https://raw.githubusercontent.com/blitz-js/art/master/github-cover-photo.png)](https://blitzjs.com)
<!-- prettier-ignore-start -->
<p align="center">
<a aria-label="Join our Slack Community" href="https://slack.blitzjs.com">
<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-82-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">
<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">
<img alt="" src="https://img.shields.io/npm/v/blitz.svg?style=for-the-badge&labelColor=000000&color=E65528">
</a>
</p>
<!-- prettier-ignore-end -->
<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">Makes you far more productive than you ever dreamed was possible 😉</h3>
<h3 align="center"><a href="https://blitzjs.com" 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.
Includes everything you need for production apps. **Everything end-to-end from the database to the frontend.**
Blitz brings back the **simplicity and conventions** of server-rendered frameworks like Ruby on Rails while preserving everything we love about React and client-side rendering!
<br>
### Quick Start
You need Node.js 12 or newer
#### Install Blitz
Run `npm install -g blitz`
#### Create a New App
1. `blitz new myAppName`
2. `cd myAppName`
3. `blitz start`
4. View your baby app at http://localhost:3000
<br><br>
![Architecture diagram](https://blitzjs.now.sh/img/architecture-diagram.png)
<br><br>
**Features:**<br>
⚡️ Built on Next.js<br>
⚡️ Don't have to build an API for client-side rendering<br>
⚡️ Client-side rendering, Server-side rendering, and fully static pages all in the same app<br>
⚡️ Full Typescript support with static, end-to-end typing (no code generation step needed like with GraphQL)<br>
⚡️ React Concurrent Mode enabled<br>
⚡️ Database/ORM agnostic, but Prisma 2 is default<br>
⚡️ CLI with code scaffolding, Rails-style console REPL, etc<br>
⚡️ GraphQL Ready<br>
⚡️ Deploy serverless or serverful<br>
**Other key features coming:**<br>
⚡️ Highly secure authentication <br>
⚡️ Authorization you can use on both server and client<br>
⚡️ Model validation you can use on both server and client<br>
⚡️ Plugins for easily adding libraries like Tailwind, CSS-in-JS, etc.<br>
⚡️ React native support<br>
⚡️ GUI so you don't have to use the CLI<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).
[Join our Slack Community](https://slack.blitzjs.com) where we help each other build Blitz apps. It's also where we collaborate on building Blitz itself.
For questions and longer form discussions, [post in our forum](https://github.com/blitz-js/blitz/discussions).
There's still a lot of work to do, so you are especially invited to join us in building Blitz! A good place to start is [The Contributing Guide](https://blitzjs.com/docs/contributing).
<br>
## Financial Contributors
Your financial contributions help ensure Blitz continues to be developed and maintained! We have monthly sponsorship options starting at $5/month.
👉 View options and contribute at [GitHub Sponsors](https://github.com/sponsors/blitz-js), [PayPal](https://paypal.me/thebayers), or [Open Collective](https://opencollective.com/blitzjs)
### 🥉 Bronze Sponsors
### 🥈 Silver Sponsors
<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="175px">
</a>
### 🏆 Gold Sponsors
### 💎 Diamond Sponsors
<br>
## Core Team ✨
<!-- markdownlint-disable -->
<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="https://medium.com/@ryardley"><img src="https://avatars0.githubusercontent.com/u/1256409?v=4" width="100px;" alt=""/><br /><sub><b>Rudi Yardley</b></sub></a><br />Node.js Wizard</td>
<td align="center"><a href="https://merelinguist.now.sh"><img src="https://avatars3.githubusercontent.com/u/24858006?v=4" width="100px;" alt=""/><br /><sub><b>Dylan Brookes</b></sub></a><br />Friendly Generalist</td>
</tr>
</table>
<!-- markdownlint-enable -->
<br>
## Maintainers (Level 2) ✨
_Code ownership, pull request approvals and merging, etc_ (see [MAINTAINERS.md](./MAINTAINERS.md))
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/aem"><img src="https://avatars0.githubusercontent.com/u/1909883?v=4" width="100px;" alt=""/><br /><sub><b>Adam Markon</b></sub></a><br />CLI</td>
<td align="center"><a href="http://robdrosenberg.com"><img src="https://avatars0.githubusercontent.com/u/20813991?v=4" width="100px;" alt=""/><br /><sub><b>Robert Rosenberg</b></sub></a><br />Website/Docs</td>
</tr>
</table>
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<br>
## Maintainers (Level 1) ✨
_Issue triage, pull request triage, community encouragement and moderation, etc_ (see [MAINTAINERS.md](./MAINTAINERS.md))
We need more woman & nonbinary level 1 maintainers. See [MAINTAINERS.md](./MAINTAINERS.md) for what this entails
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="https://github.com/LoriKarikari"><img src="https://avatars1.githubusercontent.com/u/7902980?v=4" width="100px;" alt=""/><br /><sub><b>Lori Karikari</b></sub></a></td>
<td align="center"><a href="https://corey-brown.com"><img src="https://avatars1.githubusercontent.com/u/12791148?v=4" width="100px;" alt=""/><br /><sub><b>Corey Brown</b></sub></a></td>
<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></td>
<td align="center"><a href="https://twitter.com/GeggsElias"><img src="https://avatars3.githubusercontent.com/u/22719177?v=4" width="100px;" alt=""/><br /><sub><b>Elias Johansson</b></sub></a></td>
<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="http://jagascript.com"><img src="https://avatars0.githubusercontent.com/u/4562878?v=4" width="100px;" alt=""/><br /><sub><b>Jaga Santagostino</b></sub></a></td>
<td align="center"><a href="https://simonpeterdebbarma.com"><img src="https://avatars3.githubusercontent.com/u/31207418?v=4" width="100px;" alt=""/><br /><sub><b>Simon Debbarma</b></sub></a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/jclancy93"><img src="https://avatars2.githubusercontent.com/u/7850202?v=4" width="100px;" alt=""/><br /><sub><b>Jack Clancy</b></sub></a></td>
<td align="center"><a href="https://twitter.com/ivandevp"><img src="https://avatars3.githubusercontent.com/u/9284690?v=4" width="100px;" alt=""/><br /><sub><b>Ivan Medina</b></sub></a></td>
</tr>
</table>
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<br>
## Contributors ✨
Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<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 /><a href="https://github.com/blitz-js/blitz/commits?author=flybayer" title="Code">💻</a> <a href="#content-flybayer" title="Content">🖋</a> <a href="#ideas-flybayer" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Aflybayer" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://medium.com/@ryardley"><img src="https://avatars0.githubusercontent.com/u/1256409?v=4" width="100px;" alt=""/><br /><sub><b>Rudi Yardley</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ryardley" title="Code">💻</a> <a href="#ideas-ryardley" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Aryardley" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/blitz-js/blitz/commits?author=ryardley" title="Tests">⚠️</a></td>
<td align="center"><a href="https://merelinguist.me"><img src="https://avatars3.githubusercontent.com/u/24858006?v=4" width="100px;" alt=""/><br /><sub><b>Dylan Brookes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=merelinguist" title="Code">💻</a> <a href="#ideas-merelinguist" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Amerelinguist" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/blitz-js/blitz/commits?author=merelinguist" title="Tests">⚠️</a> <a href="https://github.com/blitz-js/blitz/commits?author=merelinguist" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/aem"><img src="https://avatars0.githubusercontent.com/u/1909883?v=4" width="100px;" alt=""/><br /><sub><b>Adam Markon</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=aem" title="Code">💻</a> <a href="#ideas-aem" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Aaem" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/blitz-js/blitz/commits?author=aem" title="Tests">⚠️</a> <a href="#maintenance-aem" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://corey-brown.com"><img src="https://avatars1.githubusercontent.com/u/12791148?v=4" width="100px;" alt=""/><br /><sub><b>Corey Brown</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=coreybrown89" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Acoreybrown89" title="Reviewed Pull Requests">👀</a> <a href="#maintenance-coreybrown89" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://github.com/LoriKarikari"><img src="https://avatars1.githubusercontent.com/u/7902980?v=4" width="100px;" alt=""/><br /><sub><b>Lori Karikari</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=LoriKarikari" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3ALoriKarikari" title="Reviewed Pull Requests">👀</a> <a href="#maintenance-LoriKarikari" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=LoriKarikari" title="Documentation">📖</a></td>
<td align="center"><a href="https://twitter.com/GeggsElias"><img src="https://avatars3.githubusercontent.com/u/22719177?v=4" width="100px;" alt=""/><br /><sub><b>Elias Johansson</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=eliasjohansson" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Aeliasjohansson" title="Reviewed Pull Requests">👀</a> <a href="#maintenance-eliasjohansson" title="Maintenance">🚧</a></td>
</tr>
<tr>
<td align="center"><a href="https://fabulas.io"><img src="https://avatars1.githubusercontent.com/u/14793389?v=4" width="100px;" alt=""/><br /><sub><b>Michael Edelman </b></sub></a><br /><a href="#infra-medelman17" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/blitz-js/blitz/commits?author=medelman17" title="Code">💻</a></td>
<td align="center"><a href="http://www.geistinteractive.com"><img src="https://avatars2.githubusercontent.com/u/316792?v=4" width="100px;" alt=""/><br /><sub><b>Todd Geist</b></sub></a><br /><a href="#financial-toddgeist" title="Financial">💵</a></td>
<td align="center"><a href="http://robdrosenberg.com"><img src="https://avatars0.githubusercontent.com/u/20813991?v=4" width="100px;" alt=""/><br /><sub><b>Robert Rosenberg</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=robdrosenberg" title="Code">💻</a> <a href="#maintenance-robdrosenberg" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=robdrosenberg" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/quirk0o"><img src="https://avatars3.githubusercontent.com/u/5123725?v=4" width="100px;" alt=""/><br /><sub><b>Beata Obrok</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=quirk0o" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/tsawan"><img src="https://avatars3.githubusercontent.com/u/3263082?v=4" width="100px;" alt=""/><br /><sub><b>Tahir Awan</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tsawan" title="Code">💻</a></td>
<td align="center"><a href="https://raluce.com"><img src="https://avatars1.githubusercontent.com/u/2454632?v=4" width="100px;" alt=""/><br /><sub><b>Camilo Gonzalez</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=camilo86" title="Code">💻</a></td>
<td align="center"><a href="http://da.nielkempner.com"><img src="https://avatars3.githubusercontent.com/u/2532112?v=4" width="100px;" alt=""/><br /><sub><b>Daniel Kempner</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=dkempner" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="http://gielcobben.com"><img src="https://avatars0.githubusercontent.com/u/2663212?v=4" width="100px;" alt=""/><br /><sub><b>Giel</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=gielcobben" title="Code">💻</a></td>
<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></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=MrLeebo" title="Code">💻</a> <a href="#maintenance-MrLeebo" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=MrLeebo" title="Tests">⚠️</a></td>
<td align="center"><a href="https://jimthedev.com"><img src="https://avatars0.githubusercontent.com/u/108938?v=4" width="100px;" alt=""/><br /><sub><b>Jim Cummins</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jimthedev" title="Code">💻</a></td>
<td align="center"><a href="http://kristinamatuska.com/"><img src="https://media-exp1.licdn.com/dms/image/C5603AQHVPAjV21gw9g/profile-displayphoto-shrink_200_200/0?e=1591228800&v=beta&t=0MlbmiYhNvGv1xjLD_fOhOFjVDZ7ltNwfGNeJ4DHedQ" width="100px;" alt=""/><br /><sub><b>Kristina Matuška</b></sub></a><br /><a href="#design" title="Design">🎨</a></td>
<td align="center"><a href="https://github.com/jasonblalock"><img src="https://avatars0.githubusercontent.com/u/5899929?v=4" width="100px;" alt=""/><br /><sub><b>Jason Blalock</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jasonblalock" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/aej11a"><img src="https://avatars2.githubusercontent.com/u/10066422?v=4" width="100px;" alt=""/><br /><sub><b>aej11a</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=aej11a" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/marcoseoane"><img src="https://avatars0.githubusercontent.com/u/28088807?v=4" width="100px;" alt=""/><br /><sub><b>marcoseoane</b></sub></a><br /><a href="#ideas-marcoseoane" title="Ideas, Planning, & Feedback">🤔</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/rishabhpoddar"><img src="https://avatars2.githubusercontent.com/u/2976287?v=4" width="100px;" alt=""/><br /><sub><b>Rishabh Poddar</b></sub></a><br /><a href="#ideas-rishabhpoddar" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/lorenzorapetti"><img src="https://avatars1.githubusercontent.com/u/2632174?v=4" width="100px;" alt=""/><br /><sub><b>Lorenzo Rapetti</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=lorenzorapetti" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/wKovacs64"><img src="https://avatars1.githubusercontent.com/u/1288694?v=4" width="100px;" alt=""/><br /><sub><b>Justin Hall</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=wKovacs64" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=wKovacs64" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/sijad"><img src="https://avatars3.githubusercontent.com/u/7693001?v=4" width="100px;" alt=""/><br /><sub><b>Sajjad Hashemian</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sijad" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/ETLopes"><img src="https://avatars3.githubusercontent.com/u/34959471?v=4" width="100px;" alt=""/><br /><sub><b>Eduardo Lopes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ETLopes" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/mattleff"><img src="https://avatars0.githubusercontent.com/u/120155?v=4" width="100px;" alt=""/><br /><sub><b>Matthew Leffler</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=mattleff" title="Documentation">📖</a></td>
<td align="center"><a href="https://hew.tools"><img src="https://avatars0.githubusercontent.com/u/3103241?v=4" width="100px;" alt=""/><br /><sub><b>Matt</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=hew" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/sonnypgs"><img src="https://avatars3.githubusercontent.com/u/1431300?v=4" width="100px;" alt=""/><br /><sub><b>Sonny</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sonnypgs" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Zeko369"><img src="https://avatars3.githubusercontent.com/u/3064377?v=4" width="100px;" alt=""/><br /><sub><b>Fran Zekan</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=Zeko369" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=Zeko369" title="Documentation">📖</a></td>
<td align="center"><a href="http://twitter.com/JanBaykara"><img src="https://avatars2.githubusercontent.com/u/237556?v=4" width="100px;" alt=""/><br /><sub><b>Jan Baykara</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=janbaykara" title="Documentation">📖</a></td>
<td align="center"><a href="https://mikeattara.com"><img src="https://avatars1.githubusercontent.com/u/31483629?v=4" width="100px;" alt=""/><br /><sub><b>Mike Perry Y Attara</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=mikeattara" title="Documentation">📖</a></td>
<td align="center"><a href="https://devanthe.dev"><img src="https://avatars0.githubusercontent.com/u/354652?v=4" width="100px;" alt=""/><br /><sub><b>Devan</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=DevanB" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/jclancy93"><img src="https://avatars2.githubusercontent.com/u/7850202?v=4" width="100px;" alt=""/><br /><sub><b>Jack Clancy</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jclancy93" title="Code">💻</a> <a href="#maintenance-jclancy93" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://github.com/ntgussoni"><img src="https://avatars0.githubusercontent.com/u/10161067?v=4" width="100px;" alt=""/><br /><sub><b>Nicolas Torres</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ntgussoni" title="Tests">⚠️</a> <a href="https://github.com/blitz-js/blitz/commits?author=ntgussoni" title="Code">💻</a></td>
</tr>
<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 /><a href="https://github.com/blitz-js/blitz/commits?author=skn0tt" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=skn0tt" title="Tests">⚠️</a> <a href="#maintenance-skn0tt" title="Maintenance">🚧</a></td>
<td align="center"><a href="http://jagascript.com"><img src="https://avatars0.githubusercontent.com/u/4562878?v=4" width="100px;" alt=""/><br /><sub><b>Jaga Santagostino</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=kandros" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=kandros" title="Documentation">📖</a> <a href="#maintenance-kandros" title="Maintenance">🚧</a></td>
<td align="center"><a href="http://www.joaoportela.com"><img src="https://avatars0.githubusercontent.com/u/1010018?v=4" width="100px;" alt=""/><br /><sub><b>João Portela</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jportela" title="Code">💻</a></td>
<td align="center"><a href="http://dajin.dev"><img src="https://avatars0.githubusercontent.com/u/7122182?v=4" width="100px;" alt=""/><br /><sub><b>Da-Jin Chu</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=dajinchu" title="Code">💻</a></td>
<td align="center"><a href="https://shinyaigeek.dev/"><img src="https://avatars1.githubusercontent.com/u/42742053?v=4" width="100px;" alt=""/><br /><sub><b>Shinobu Hayashi</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=Shinyaigeek" title="Code">💻</a></td>
<td align="center"><a href="http://karankiri.com"><img src="https://avatars2.githubusercontent.com/u/19989161?v=4" width="100px;" alt=""/><br /><sub><b>Karan Kiri</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=karankiri" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/fullmetalengineer"><img src="https://avatars2.githubusercontent.com/u/5294903?v=4" width="100px;" alt=""/><br /><sub><b>Alan Long</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=fullmetalengineer" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="http://codingsh.xyz"><img src="https://avatars2.githubusercontent.com/u/57037080?v=4" width="100px;" alt=""/><br /><sub><b>codingsh</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=developerfred" title="Code">💻</a></td>
<td align="center"><a href="http://twitter.com/peaonunes"><img src="https://avatars0.githubusercontent.com/u/3356720?v=4" width="100px;" alt=""/><br /><sub><b>Rafael Nunes</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/pulls?q=is%3Apr+reviewed-by%3Apeaonunes" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/blitz-js/blitz/commits?author=peaonunes" title="Code">💻</a></td>
<td align="center"><a href="https://simonpeterdebbarma.com"><img src="https://avatars3.githubusercontent.com/u/31207418?v=4" width="100px;" alt=""/><br /><sub><b>Simon Debbarma</b></sub></a><br /><a href="#design-0ww" title="Design">🎨</a> <a href="#maintenance-0ww" title="Maintenance">🚧</a> <a href="https://github.com/blitz-js/blitz/commits?author=0ww" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/0xflotus"><img src="https://avatars3.githubusercontent.com/u/26602940?v=4" width="100px;" alt=""/><br /><sub><b>0xflotus</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=0xflotus" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=0xflotus" title="Documentation">📖</a></td>
<td align="center"><a href="https://dev.to/tmns"><img src="https://avatars3.githubusercontent.com/u/35785003?v=4" width="100px;" alt=""/><br /><sub><b>tmns</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tmns" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=tmns" title="Documentation">📖</a></td>
<td align="center"><a href="http://jruharris.com"><img src="https://avatars1.githubusercontent.com/u/8636691?v=4" width="100px;" alt=""/><br /><sub><b>Jru Harris</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=harris1717" title="Documentation">📖</a></td>
<td align="center"><a href="https://twitter.com/ivandevp"><img src="https://avatars3.githubusercontent.com/u/9284690?v=4" width="100px;" alt=""/><br /><sub><b>Ivan Medina</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ivandevp" title="Code">💻</a> <a href="#maintenance-ivandevp" title="Maintenance">🚧</a></td>
</tr>
<tr>
<td align="center"><a href="https://www.dwightwatson.com"><img src="https://avatars3.githubusercontent.com/u/1100408?v=4" width="100px;" alt=""/><br /><sub><b>Dwight Watson</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=dwightwatson" title="Code">💻</a></td>
<td align="center"><a href="http://is2ei.com/"><img src="https://avatars3.githubusercontent.com/u/3948353?v=4" width="100px;" alt=""/><br /><sub><b>Horie Issei</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=is2ei" title="Code">💻</a></td>
<td align="center"><a href="https://twitter.com/lednhatkhanh"><img src="https://avatars2.githubusercontent.com/u/9303093?v=4" width="100px;" alt=""/><br /><sub><b>Nhat Khanh</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=lednhatkhanh" title="Code">💻</a></td>
<td align="center"><a href="https://builtforfifty.com"><img src="https://avatars1.githubusercontent.com/u/19371989?v=4" width="100px;" alt=""/><br /><sub><b>Abu Uzayr</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=abuuzayr" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/nabi009"><img src="https://avatars0.githubusercontent.com/u/3170831?v=4" width="100px;" alt=""/><br /><sub><b>Nabiullah elham</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=nabi009" title="Code">💻</a></td>
<td align="center"><a href="https://lachlanjc.com"><img src="https://avatars1.githubusercontent.com/u/5074763?v=4" width="100px;" alt=""/><br /><sub><b>Lachlan Campbell</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=lachlanjc" title="Code">💻</a></td>
<td align="center"><a href="http://enzoferey.com"><img src="https://avatars1.githubusercontent.com/u/10673347?v=4" width="100px;" alt=""/><br /><sub><b>Enzo Ferey</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=enzoferey" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/pgrimaud"><img src="https://avatars1.githubusercontent.com/u/1866496?v=4" width="100px;" alt=""/><br /><sub><b>Pierre Grimaud</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=pgrimaud" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/jletey"><img src="https://avatars1.githubusercontent.com/u/62398724?v=4" width="100px;" alt=""/><br /><sub><b>John Letey</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jletey" title="Code">💻</a></td>
<td align="center"><a href="https://pixelmord.github.io"><img src="https://avatars2.githubusercontent.com/u/224168?v=4" width="100px;" alt=""/><br /><sub><b>Andreas Adam</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=pixelmord" title="Code">💻</a></td>
<td align="center"><a href="https://kevo.dev"><img src="https://avatars3.githubusercontent.com/u/15717067?v=4" width="100px;" alt=""/><br /><sub><b>Kevin Tovar</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=kevotovar" title="Code">💻</a></td>
<td align="center"><a href="http://anteprimorac.com.hr"><img src="https://avatars0.githubusercontent.com/u/972083?v=4" width="100px;" alt=""/><br /><sub><b>Ante Primorac</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=anteprimorac" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=anteprimorac" title="Documentation">📖</a></td>
<td align="center"><a href="http://mykalmachon.dev"><img src="https://avatars1.githubusercontent.com/u/7844994?v=4" width="100px;" alt=""/><br /><sub><b>Mykal Machon</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=MykalMachon" title="Code">💻</a></td>
<td align="center"><a href="https://jamiedavenport.dev"><img src="https://avatars2.githubusercontent.com/u/1329874?v=4" width="100px;" alt=""/><br /><sub><b>Jamie Davenport</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=jamiedavenport" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://cloudnweb.dev/"><img src="https://avatars0.githubusercontent.com/u/17050715?v=4" width="100px;" alt=""/><br /><sub><b>GaneshMani</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=ganeshmani" title="Code">💻</a></td>
<td align="center"><a href="http://ramonmorcillo.com"><img src="https://avatars3.githubusercontent.com/u/31936665?v=4" width="100px;" alt=""/><br /><sub><b>reymon359</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=reymon359" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/gregory-vasquez-96413b184/"><img src="https://avatars1.githubusercontent.com/u/36422346?v=4" width="100px;" alt=""/><br /><sub><b>gvasquez11</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=gvasquez11" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/josemiguelo"><img src="https://avatars1.githubusercontent.com/u/15330034?v=4" width="100px;" alt=""/><br /><sub><b> José Miguel Ochoa</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=josemiguelo" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/osirvent"><img src="https://avatars2.githubusercontent.com/u/5927133?v=4" width="100px;" alt=""/><br /><sub><b>Oscar Sirvent</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=osirvent" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=osirvent" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/donni106"><img src="https://avatars0.githubusercontent.com/u/1942953?v=4" width="100px;" alt=""/><br /><sub><b>Daniel Molnar</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=donni106" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=donni106" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/exclipy"><img src="https://avatars1.githubusercontent.com/u/508799?v=4" width="100px;" alt=""/><br /><sub><b>Kevin Wu Won</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=exclipy" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/tehnuge"><img src="https://avatars1.githubusercontent.com/u/1928236?v=4" width="100px;" alt=""/><br /><sub><b>John Duong</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tehnuge" title="Code">💻</a></td>
<td align="center"><a href="https://noahfleischmann.com"><img src="https://avatars0.githubusercontent.com/u/23707137?v=4" width="100px;" alt=""/><br /><sub><b>Noah Fleischmann</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=fnoah" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/toshi1127"><img src="https://avatars3.githubusercontent.com/u/32378535?v=4" width="100px;" alt=""/><br /><sub><b>Matsumoto Toshi</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=toshi1127" title="Code">💻</a> <a href="https://github.com/blitz-js/blitz/commits?author=toshi1127" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/simonedelmann"><img src="https://avatars2.githubusercontent.com/u/2821076?v=4" width="100px;" alt=""/><br /><sub><b>Simon Edelmann</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=simonedelmann" title="Code">💻</a></td>
<td align="center"><a href="https://shaun.church"><img src="https://avatars3.githubusercontent.com/u/571764?v=4" width="100px;" alt=""/><br /><sub><b>Shaun Church</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=shaunchurch" title="Documentation">📖</a> <a href="https://github.com/blitz-js/blitz/commits?author=shaunchurch" title="Code">💻</a></td>
<td align="center"><a href="https://styfle.dev"><img src="https://avatars1.githubusercontent.com/u/229881?v=4" width="100px;" alt=""/><br /><sub><b>Steven</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=styfle" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/SigurdMW"><img src="https://avatars3.githubusercontent.com/u/6359003?v=4" width="100px;" alt=""/><br /><sub><b>Sigurd Moland Wahl</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=SigurdMW" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://brianandrews.dev/"><img src="https://avatars1.githubusercontent.com/u/6384100?v=4" width="100px;" alt=""/><br /><sub><b>Brian Andrews</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=sbardian" title="Documentation">📖</a></td>
<td align="center"><a href="http://garrisonsnelling.com"><img src="https://avatars0.githubusercontent.com/u/5100597?v=4" width="100px;" alt=""/><br /><sub><b>Garrison Snelling</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=garrisons" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/tylangesmith"><img src="https://avatars1.githubusercontent.com/u/22609577?v=4" width="100px;" alt=""/><br /><sub><b>Ty Lange-Smith</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=tylangesmith" title="Code">💻</a></td>
<td align="center"><a href="https://rubenmoya.dev"><img src="https://avatars3.githubusercontent.com/u/905225?v=4" width="100px;" alt=""/><br /><sub><b>Rubén Moya</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=rubenmoya" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/robertgrzonka"><img src="https://avatars0.githubusercontent.com/u/35585466?v=4" width="100px;" alt=""/><br /><sub><b>robertgrzonka</b></sub></a><br /><a href="https://github.com/blitz-js/blitz/commits?author=robertgrzonka" title="Code">💻</a> <a href="#infra-robertgrzonka" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
</table>
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

3
__mocks__/fs.js Normal file
View File

@@ -0,0 +1,3 @@
const {fs} = require("memfs")
module.exports = fs

BIN
assets/Fauna_Logo_Blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,4 @@
module.exports = {
presets: ["next/babel"],
plugins: [],
}

View File

@@ -0,0 +1,11 @@
module.exports = {
extends: ["react-app", "plugin:jsx-a11y/recommended"],
plugins: ["jsx-a11y"],
rules: {
"import/no-anonymous-default-export": "error",
"import/no-webpack-loader-syntax": "off",
"react/react-in-jsx-scope": "off", // React is always in scope with Blitz
"jsx-a11y/anchor-is-valid": "off", //Doesn't play well with Blitz/Next <Link> usage
"jsx-a11y/label-has-associated-control": "off", //Doesn't play well with form libraries
},
}

57
examples/auth/.gitignore vendored Normal file
View File

@@ -0,0 +1,57 @@
# dependencies
node_modules
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.pnp.*
.npm
web_modules/
# blitz
/.blitz/
/.next/
*.sqlite
.now
.blitz-console-history
blitz-log.log
# misc
.DS_Store
# local env files
.env
.envrc
.env.local
.env.development.local
.env.test.local
.env.production.local
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Testing
coverage
*.lcov
.nyc_output
lib-cov
# Caches
*.tsbuildinfo
.eslintcache
.node_repl_history
.yarn-integrity
# Serverless directories
.serverless/
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
.vercel

1
examples/auth/.npmrc Normal file
View File

@@ -0,0 +1 @@
save-exact=true

View File

@@ -0,0 +1,5 @@
.gitkeep
.env*
*.ico
*.lock
db/migrations

View File

@@ -0,0 +1,2 @@
.blitz
*.sqlite

26
examples/auth/README.md Normal file
View File

@@ -0,0 +1,26 @@
# auth
## Getting Started
1. Add this code to db/schema.prisma:
```
model Project {
id Int @default(autoincrement()) @id
name String
}
```
2. DB migrate
```
blitz db migrate
```
3. Start the dev server
```
blitz start
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

View File

@@ -0,0 +1,89 @@
import {passportAuth} from "blitz"
import db from "db"
import {Strategy as TwitterStrategy} from "passport-twitter"
import {Strategy as GitHubStrategy} from "passport-github2"
function assert(condition: any, message: string): asserts condition {
if (!condition) throw new Error(message)
}
// These aren't required, but this is a good practice to ensure you have the env vars you need
assert(process.env.TWITTER_CONSUMER_KEY, "You must provide the TWITTER_CONSUMER_KEY env variable")
assert(
process.env.TWITTER_CONSUMER_SECRET,
"You must provide the TWITTER_CONSUMER_SECRET env variable",
)
assert(process.env.GITHUB_CLIENT_ID, "You must provide the GITHUB_CLIENT_ID env variable")
assert(process.env.GITHUB_CLIENT_SECRET, "You must provide the GITHUB_CLIENT_SECRET env variable")
export default passportAuth({
successRedirectUrl: "/",
strategies: [
new TwitterStrategy(
{
consumerKey: process.env.TWITTER_CONSUMER_KEY,
consumerSecret: process.env.TWITTER_CONSUMER_SECRET,
callbackURL:
process.env.NODE_ENV === "production"
? "https://auth-example-flybayer.blitzjs.vercel.app/api/auth/twitter/callback"
: "http://localhost:3000/api/auth/twitter/callback",
includeEmail: true,
},
async function (_token, _tokenSecret, profile, done) {
const email = profile.emails && profile.emails[0]?.value
if (!email) {
// This can happen if you haven't enabled email access in your twitter app permissions
return done(new Error("Twitter OAuth response doesn't have email."))
}
const user = await db.user.upsert({
where: {email},
create: {
email,
name: profile.displayName,
},
update: {email},
})
const publicData = {userId: user.id, roles: [user.role], source: "twitter"}
done(null, {publicData})
},
),
new GitHubStrategy(
{
clientID: process.env.GITHUB_CLIENT_ID,
clientSecret: process.env.GITHUB_CLIENT_SECRET,
callbackURL:
process.env.NODE_ENV === "production"
? "https://auth-example-flybayer.blitzjs.vercel.app/api/auth/github/callback"
: "http://localhost:3000/api/auth/github/callback",
},
async function (_token, _tokenSecret, profile, done) {
const email = profile.emails && profile.emails[0]?.value
if (!email) {
// This can happen if you haven't enabled email access in your twitter app permissions
return done(new Error("Twitter OAuth response doesn't have email."))
}
const user = await db.user.upsert({
where: {email},
create: {
email,
name: profile.displayName,
},
update: {email},
})
const publicData = {
userId: user.id,
roles: [user.role],
source: "github",
githubUsername: profile.username,
}
done(null, {publicData})
},
),
],
})

View File

@@ -0,0 +1,43 @@
import React from "react"
import {LabeledTextField} from "app/components/LabeledTextField"
import {Form, FORM_ERROR} from "app/components/Form"
import login from "app/auth/mutations/login"
import {LoginInput, LoginInputType} from "app/auth/validations"
type LoginFormProps = {
onSuccess?: () => void
}
export const LoginForm = (props: LoginFormProps) => {
return (
<div>
<h1>Login</h1>
<Form<LoginInputType>
submitText="Log In"
schema={LoginInput}
initialValues={{email: undefined, password: undefined}}
onSubmit={async (values) => {
try {
await login({email: values.email, password: values.password})
props.onSuccess && props.onSuccess()
} catch (error) {
if (error.name === "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" />
</Form>
</div>
)
}
export default LoginForm

View File

@@ -0,0 +1,34 @@
import {AuthenticationError} from "blitz"
import SecurePassword from "secure-password"
import db, {User} from "db"
const SP = new SecurePassword()
export const hashPassword = async (password: string) => {
const hashedBuffer = await SP.hash(Buffer.from(password))
return hashedBuffer.toString("base64")
}
export const verifyPassword = async (hashedPassword: string, password: string) => {
return await SP.verify(Buffer.from(password), Buffer.from(hashedPassword, "base64"))
}
export const authenticateUser = async (email: string, password: string) => {
const user = await db.user.findOne({where: {email}})
if (!user || !user.hashedPassword) throw new AuthenticationError()
switch (await verifyPassword(user.hashedPassword, password)) {
case SecurePassword.VALID:
break
case SecurePassword.VALID_NEEDS_REHASH:
// Upgrade hashed password with a more secure hash
const improvedHash = await hashPassword(password)
await db.user.update({where: {id: user.id}, data: {hashedPassword: improvedHash}})
break
default:
throw new AuthenticationError()
}
delete user.hashedPassword
return user as Omit<User, "hashedPassword">
}

View File

@@ -0,0 +1,15 @@
import {SessionContext} from "blitz"
import {authenticateUser} from "app/auth"
import {LoginInput, LoginInputType} from "../validations"
export default async function login(input: LoginInputType, ctx: {session?: SessionContext} = {}) {
// This throws an error if input is invalid
const {email, password} = LoginInput.parse(input)
// This throws an error if credentials are invalid
const user = await authenticateUser(email, password)
await ctx.session!.create({userId: user.id, roles: [user.role]})
return user
}

View File

@@ -0,0 +1,5 @@
import {SessionContext} from "blitz"
export default async function logout(_ = null, ctx: {session?: SessionContext} = {}) {
return await ctx.session!.revoke()
}

View File

@@ -0,0 +1,19 @@
import db from "db"
import {SessionContext} from "blitz"
import {hashPassword} from "app/auth"
import {SignupInput, SignupInputType} from "app/auth/validations"
export default async function signup(input: SignupInputType, ctx: {session?: SessionContext} = {}) {
// This throws an error if input is invalid
const {email, password} = SignupInput.parse(input)
const hashedPassword = await hashPassword(password)
const user = await db.user.create({
data: {email, hashedPassword, role: "user"},
select: {id: true, name: true, email: true, role: true},
})
await ctx.session!.create({userId: user.id, roles: [user.role]})
return user
}

View File

@@ -0,0 +1,22 @@
import React from "react"
import {Head, useRouter, BlitzPage} from "blitz"
import {LoginForm} from "app/auth/components/LoginForm"
const SignupPage: BlitzPage = () => {
const router = useRouter()
return (
<>
<Head>
<title>Log In</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<div>
<LoginForm onSuccess={() => router.push("/")} />
</div>
</>
)
}
export default SignupPage

View File

@@ -0,0 +1,51 @@
import React from "react"
import {Head, useRouter, BlitzPage} from "blitz"
import {Form, FORM_ERROR} from "app/components/Form"
import {LabeledTextField} from "app/components/LabeledTextField"
import signup from "app/auth/mutations/signup"
import {SignupInput, SignupInputType} from "app/auth/validations"
const SignupPage: BlitzPage = () => {
const router = useRouter()
return (
<>
<Head>
<title>Sign Up</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<div>
<h1>Create an Account</h1>
<Form<SignupInputType>
submitText="Create Account"
schema={SignupInput}
onSubmit={async (values) => {
try {
await signup({email: values.email, password: values.password})
router.push("/")
} catch (error) {
if (error.code === "P2002" && error.meta?.target?.includes("email")) {
// This error comes from Prisma
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 SignupPage

View File

@@ -0,0 +1,13 @@
import * as z from "zod"
export const SignupInput = z.object({
email: z.string().email(),
password: z.string().min(10).max(100),
})
export type SignupInputType = z.infer<typeof SignupInput>
export const LoginInput = z.object({
email: z.string().email(),
password: z.string(),
})
export type LoginInputType = z.infer<typeof LoginInput>

View File

View File

@@ -0,0 +1,44 @@
import React from "react"
import {Error as ErrorComponent} from "blitz"
import {queryCache} from "react-query"
import LoginForm from "app/auth/components/LoginForm"
export default class ErrorBoundary extends React.Component<{
fallback?: (error: any) => React.ReactNode
}> {
state = {
error: null as Error | null,
}
static getDerivedStateFromError(error: any) {
return {
error,
}
}
reset = () => {
this.setState({error: null})
queryCache.resetErrorBoundaries()
}
render() {
const {error} = this.state
if (error) {
if (error.name === "AuthenticationError") {
return <LoginForm onSuccess={this.reset} />
} else if (error.name === "AuthorizationError") {
return (
<ErrorComponent
statusCode={(error as any).statusCode}
title="Sorry, you are not authorized to access this"
/>
)
} else if (this.props.fallback) {
return this.props.fallback(error)
} else {
throw error
}
}
return this.props.children
}
}

View File

@@ -0,0 +1,62 @@
import React, {ReactNode, PropsWithoutRef} from "react"
import {Form as FinalForm, FormProps as FinalFormProps} from "react-final-form"
import * as z from "zod"
export {FORM_ERROR} from "final-form"
type FormProps<FormValues> = {
/** All your form fields */
children: ReactNode
/** Text to display in the submit button */
submitText: string
onSubmit: FinalFormProps<FormValues>["onSubmit"]
initialValues?: FinalFormProps<FormValues>["initialValues"]
schema?: z.ZodType<any, any>
} & Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit">
export function Form<FormValues extends Record<string, unknown>>({
children,
submitText,
schema,
initialValues,
onSubmit,
...props
}: FormProps<FormValues>) {
return (
<FinalForm<FormValues>
initialValues={initialValues}
validate={(values) => {
if (!schema) return
try {
schema.parse(values)
} catch (error) {
return error.formErrors.fieldErrors
}
}}
onSubmit={onSubmit}
render={({handleSubmit, submitting, submitError}) => (
<form onSubmit={handleSubmit} className="form" {...props}>
{/* Form fields supplied as children are rendered here */}
{children}
{submitError && (
<div role="alert" style={{color: "red"}}>
{submitError}
</div>
)}
<button type="submit" disabled={submitting}>
{submitText}
</button>
<style global jsx>{`
.form > * + * {
margin-top: 1rem;
}
`}</style>
</form>
)}
/>
)
}
export default Form

View File

@@ -0,0 +1,55 @@
import React, {PropsWithoutRef} from "react"
import {useField} from "react-final-form"
export interface LabeledTextFieldProps extends PropsWithoutRef<JSX.IntrinsicElements["input"]> {
/** Field name. */
name: string
/** Field label. */
label: string
/** Field type. Doesn't include radio buttons and checkboxes */
type?: "text" | "password" | "email" | "number"
outerProps?: PropsWithoutRef<JSX.IntrinsicElements["div"]>
}
export const LabeledTextField = React.forwardRef<HTMLInputElement, LabeledTextFieldProps>(
({name, label, outerProps, ...props}, ref) => {
const {
input,
meta: {touched, error, submitError, submitting},
} = useField(name)
return (
<div {...outerProps}>
<label>
{label}
<input {...input} disabled={submitting} {...props} ref={ref} />
</label>
{touched && (error || submitError) && (
<div role="alert" style={{color: "red"}}>
{error || submitError}
</div>
)}
<style jsx>{`
label {
display: flex;
flex-direction: column;
align-items: start;
font-size: 1rem;
}
input {
font-size: 1rem;
padding: 0.25rem 0.5rem;
border-radius: 3px;
border: 1px solid purple;
appearance: none;
margin-top: 0.5rem;
}
`}</style>
</div>
)
},
)
export default LabeledTextField

View File

View File

@@ -0,0 +1,22 @@
import {useSession, useRouter} from "blitz"
import logout from "app/auth/mutations/logout"
export default function Layout({children}: {children: React.ReactNode}) {
const session = useSession()
const router = useRouter()
return (
<div>
{session.userId && (
<button
onClick={async () => {
router.push("/")
await logout()
}}
>
Logout
</button>
)}
<div>{children}</div>
</div>
)
}

View File

@@ -0,0 +1,10 @@
import {AppProps} from "blitz"
import ErrorBoundary from "app/components/ErrorBoundary"
export default function MyApp({Component, pageProps}: AppProps) {
return (
<ErrorBoundary>
<Component {...pageProps} />
</ErrorBoundary>
)
}

View File

@@ -0,0 +1,23 @@
import {Document, Html, DocumentHead, Main, BlitzScript /*DocumentContext*/} from "blitz"
class MyDocument extends Document {
// Only uncomment if you need to customize this behaviour
// static async getInitialProps(ctx: DocumentContext) {
// const initialProps = await Document.getInitialProps(ctx)
// return {...initialProps}
// }
render() {
return (
<Html lang="en">
<DocumentHead />
<body>
<Main />
<BlitzScript />
</body>
</Html>
)
}
}
export default MyDocument

View File

@@ -0,0 +1,214 @@
import {Head, Link, useSession, useRouterQuery} from "blitz"
import getUser from "app/users/queries/getUser"
import trackView from "app/users/mutations/trackView"
import Layout from "app/layouts/Layout"
const UserStuff = () => {
const session = useSession()
const query = useRouterQuery()
return (
<div>
{!session.userId && (
<>
<div style={{marginTop: "1rem"}}>
<Link href="/signup">Sign Up</Link>
</div>
<div>
<Link href="/login">Log In</Link>
</div>
<a href="/api/auth/twitter" style={{display: "block"}}>
Login with Twitter
</a>
<a href="/api/auth/github" style={{display: "block"}}>
Login with Github
</a>
{query.authError && <div style={{color: "red"}}>{query.authError}</div>}
</>
)}
<pre>{JSON.stringify(session, null, 2)}</pre>
<button
onClick={async () => {
try {
const user = await getUser({where: {id: session.userId as number}})
alert(JSON.stringify(user))
} catch (error) {
alert("error: " + JSON.stringify(error))
}
}}
>
Get user
</button>
<button
onClick={async () => {
try {
await trackView()
} catch (error) {
alert("error: " + error)
console.log(error)
}
}}
>
Track view
</button>
</div>
)
}
const Home = () => (
<Layout>
<div className="container">
<Head>
<title>auth</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<div className="logo">
<img src="/logo.png" alt="blitz.js" />
</div>
<UserStuff />
</main>
<footer>
<a
href="https://blitzjs.com?utm_source=blitz-new&utm_medium=app-template&utm_campaign=blitz-new"
target="_blank"
rel="noopener noreferrer"
>
Powered by Blitz.js
</a>
</footer>
<style jsx>{`
.container {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
main {
padding: 5rem 0;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
main p {
font-size: 1.2rem;
}
footer {
width: 100%;
height: 60px;
border-top: 1px solid #eaeaea;
display: flex;
justify-content: center;
align-items: center;
background-color: #45009d;
}
footer a {
display: flex;
justify-content: center;
align-items: center;
}
footer a {
color: #f4f4f4;
text-decoration: none;
}
.logo {
margin-bottom: 2rem;
}
.logo img {
width: 300px;
}
.buttons {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 0.5rem;
margin-top: 6rem;
}
a.button {
background-color: #6700eb;
padding: 1rem 2rem;
color: #f4f4f4;
text-align: center;
}
a.button:hover {
background-color: #45009d;
}
a.button-outline {
border: 2px solid #6700eb;
padding: 1rem 2rem;
color: #6700eb;
text-align: center;
}
a.button-outline:hover {
border-color: #45009d;
color: #45009d;
}
pre {
background: #fafafa;
border-radius: 5px;
padding: 0.75rem;
}
code {
font-size: 0.9rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
}
.grid {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 800px;
margin-top: 3rem;
}
@media (max-width: 600px) {
.grid {
width: 100%;
flex-direction: column;
}
}
`}</style>
<style jsx global>{`
@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@300;700&display=swap");
html,
body {
padding: 0;
margin: 0;
font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
}
`}</style>
</div>
</Layout>
)
export default Home

View File

@@ -0,0 +1,75 @@
import * as React from "react"
import {getSessionContext} from "@blitzjs/server"
import {ssrQuery, useRouter, GetServerSideProps, PromiseReturnType, Error as ErrorPage} from "blitz"
import getUser from "app/users/queries/getUser"
import logout from "app/auth/mutations/logout"
import path from "path"
type PageProps = {
user?: PromiseReturnType<typeof getUser>
error?: {
statusCode: number
message: string
}
}
export const getServerSideProps: GetServerSideProps<PageProps> = async ({req, res}) => {
// Ensure these files are not eliminated by trace-based tree-shaking (like Vercel)
// https://github.com/blitz-js/blitz/issues/794
path.resolve("next.config.js")
path.resolve("blitz.config.js")
path.resolve(".next/__db.js")
// End anti-tree-shaking
const session = await getSessionContext(req, res)
console.log("Session id:", session.userId)
try {
const user = await ssrQuery(
getUser,
{where: {id: Number(session.userId)}, select: {id: true}},
{res, req},
)
return {props: {user}}
} catch (error) {
if (error.name === "AuthenticationError") {
res.writeHead(302, {location: "/login"})
res.end()
return {props: {}}
} else if (error.name === "AuthorizationError") {
return {
props: {
error: {
statusCode: error.statusCode,
message: "Sorry, you are not authorized to access this",
},
},
}
} else {
return {props: {error: {statusCode: error.statusCode || 500, message: error.message}}}
}
}
}
const Test: React.FC<PageProps> = ({user, error}: PageProps) => {
const router = useRouter()
if (error) {
return <ErrorPage statusCode={error.statusCode} title={error.message} />
}
return (
<div>
<div>Logged in user id: {user?.id}</div>
<button
onClick={async () => {
await logout()
router.push("/")
}}
>
Logout
</button>
</div>
)
}
export default Test

View File

@@ -0,0 +1,23 @@
import React from "react"
type UserFormProps = {
initialValues: any
onSubmit: React.FormEventHandler<HTMLFormElement>
}
const UserForm = ({initialValues, onSubmit}: UserFormProps) => {
return (
<form
onSubmit={(event) => {
event.preventDefault()
onSubmit(event)
}}
>
<div>Put your form fields here. But for now, just click submit</div>
<div>{JSON.stringify(initialValues)}</div>
<button>Submit</button>
</form>
)
}
export default UserForm

View File

@@ -0,0 +1,10 @@
import db, {UserCreateArgs} from "db"
type CreateUserInput = {
data: UserCreateArgs["data"]
}
export default async function createUser({data}: CreateUserInput, ctx: Record<any, any> = {}) {
const user = await db.user.create({data})
return user
}

View File

@@ -0,0 +1,11 @@
import db, {UserDeleteArgs} from "db"
type DeleteUserInput = {
where: UserDeleteArgs["where"]
}
export default async function deleteUser({where}: DeleteUserInput, ctx: Record<any, any> = {}) {
const user = await db.user.delete({where})
return user
}

View File

@@ -0,0 +1,9 @@
import {SessionContext} from "blitz"
export default async function trackView(_ = null, ctx: {session?: SessionContext} = {}) {
const currentViews = ctx.session!.publicData.views || 0
await ctx.session!.setPublicData({views: currentViews + 1})
await ctx.session!.setPrivateData({views: currentViews + 1})
return
}

View File

@@ -0,0 +1,18 @@
import db, {UserUpdateArgs} from "db"
type UpdateUserInput = {
where: UserUpdateArgs["where"]
data: UserUpdateArgs["data"]
}
export default async function updateUser(
{where, data}: UpdateUserInput,
ctx: Record<any, any> = {},
) {
// Don't allow updating
delete data.id
const user = await db.user.update({where, data})
return user
}

View File

@@ -0,0 +1,62 @@
import React, {Suspense} from "react"
import {Head, Link, useRouter, useQuery, useParam, BlitzPage} from "blitz"
import getUser from "app/users/queries/getUser"
import deleteUser from "app/users/mutations/deleteUser"
export const User = () => {
const router = useRouter()
const userId = useParam("userId", "number")
const [user] = useQuery(getUser, {where: {id: userId}})
return (
<div>
<h1>User {user.id}</h1>
<pre>{JSON.stringify(user, null, 2)}</pre>
{
<Link href="/users/[userId]/edit" as={`/users/${user.id}/edit`}>
<a>Edit</a>
</Link>
}
<button
type="button"
onClick={async () => {
if (window.confirm("This will be deleted")) {
await deleteUser({where: {id: user.id}})
router.push("/users")
}
}}
>
Delete
</button>
</div>
)
}
const ShowUserPage: BlitzPage = () => {
return (
<div>
<Head>
<title>User</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<p>
{
<Link href="/users">
<a>Users</a>
</Link>
}
</p>
<Suspense fallback={<div>Loading...</div>}>
<User />
</Suspense>
</main>
</div>
)
}
export default ShowUserPage

View File

@@ -0,0 +1,63 @@
import React, {Suspense} from "react"
import {Head, Link, useRouter, useQuery, useParam, BlitzPage} from "blitz"
import getUser from "app/users/queries/getUser"
import updateUser from "app/users/mutations/updateUser"
import UserForm from "app/users/components/UserForm"
export const EditUser = () => {
const router = useRouter()
const userId = useParam("userId", "number")
const [user, {mutate}] = useQuery(getUser, {where: {id: userId}})
return (
<div>
<h1>Edit User {user.id}</h1>
<pre>{JSON.stringify(user)}</pre>
<UserForm
initialValues={user}
onSubmit={async () => {
try {
const updated = await updateUser({
where: {id: user.id},
data: {name: "MyNewName"},
})
mutate(updated)
alert("Success!" + JSON.stringify(updated))
router.push("/users/[userId]", `/users/${updated.id}`)
} catch (error) {
console.log(error)
alert("Error creating user " + JSON.stringify(error, null, 2))
}
}}
/>
</div>
)
}
const EditUserPage: BlitzPage = () => {
return (
<div>
<Head>
<title>Edit User</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<Suspense fallback={<div>Loading...</div>}>
<EditUser />
</Suspense>
<p>
{
<Link href="/users">
<a>Users</a>
</Link>
}
</p>
</main>
</div>
)
}
export default EditUserPage

View File

@@ -0,0 +1,49 @@
import React, {Suspense} from "react"
import {Head, Link, useQuery, BlitzPage} from "blitz"
import getUsers from "app/users/queries/getUsers"
import Layout from "app/layouts/Layout"
export const UsersList = () => {
const [users] = useQuery(getUsers, {orderBy: {id: "desc"}})
return (
<ul>
{users?.map((user) => (
<li key={user.id}>
<Link href="/users/[userId]" as={`/users/${user.id}`}>
<a>{user.email}</a>
</Link>
</li>
))}
</ul>
)
}
const UsersPage: BlitzPage = () => {
return (
<Layout>
<Head>
<title>Users</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<h1>Users</h1>
<p>
{
<Link href="/users/new">
<a>Create User</a>
</Link>
}
</p>
<Suspense fallback={<div>Loading...</div>}>
<UsersList />
</Suspense>
</main>
</Layout>
)
}
export default UsersPage

View File

@@ -0,0 +1,44 @@
import React from "react"
import {Head, Link, useRouter, BlitzPage} from "blitz"
import createUser from "app/users/mutations/createUser"
import UserForm from "app/users/components/UserForm"
const NewUserPage: BlitzPage = () => {
const router = useRouter()
return (
<div>
<Head>
<title>New User</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<h1>Create New User </h1>
<UserForm
initialValues={{}}
onSubmit={async () => {
try {
const user = await createUser({data: {name: "MyName"}})
alert("Success!" + JSON.stringify(user))
router.push("/users/[userId]", `/users/${user.id}`)
} catch (error) {
alert("Error creating user " + JSON.stringify(error, null, 2))
}
}}
/>
<p>
{
<Link href="/users">
<a>Users</a>
</Link>
}
</p>
</main>
</div>
)
}
export default NewUserPage

View File

@@ -0,0 +1,30 @@
import db, {FindOneUserArgs} from "db"
import {SessionContext} from "blitz"
type GetUserInput = {
where: FindOneUserArgs["where"]
select?: FindOneUserArgs["select"]
// Only available if a model relationship exists
// include?: FindOneUserArgs['include']
}
export class NotFoundError extends Error {
statusCode = 404
constructor(message?: string) {
super(message)
this.name = "NotFoundError"
}
}
export default async function getUser(
{where, select}: GetUserInput,
ctx: {session?: SessionContext} = {},
) {
ctx.session?.authorize(["admin", "user"])
const user = await db.user.findOne({where, select})
if (!user) throw new NotFoundError(`User with id ${where.id} does not exist`)
return user
}

View File

@@ -0,0 +1,29 @@
import db, {FindManyUserArgs} from "db"
import {SessionContext} from "blitz"
type GetUsersInput = {
where?: FindManyUserArgs["where"]
orderBy?: FindManyUserArgs["orderBy"]
cursor?: FindManyUserArgs["cursor"]
take?: FindManyUserArgs["take"]
skip?: FindManyUserArgs["skip"]
// Only available if a model relationship exists
// include?: FindManyUserArgs['include']
}
export default async function getUsers(
{where, orderBy, cursor, take, skip}: GetUsersInput,
ctx: {session?: SessionContext} = {},
) {
ctx.session?.authorize(["admin"])
const users = await db.user.findMany({
where,
orderBy,
cursor,
take,
skip,
})
return users
}

View File

@@ -0,0 +1,25 @@
const {sessionMiddleware, unstable_simpleRolesIsAuthorized} = require("@blitzjs/server")
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
})
module.exports = withBundleAnalyzer({
middleware: [
sessionMiddleware({
unstable_isAuthorized: unstable_simpleRolesIsAuthorized,
}),
],
/*
webpack: (config, {buildId, dev, isServer, defaultLoaders, webpack}) => {
// Note: we provide webpack above so you should not `require` it
// Perform customizations to webpack config
// Important: return the modified config
return config
},
webpackDevMiddleware: (config) => {
// Perform customizations to webpack dev middleware config
// Important: return the modified config
return config
},
*/
})

15
examples/auth/db/index.ts Normal file
View File

@@ -0,0 +1,15 @@
import {PrismaClient} from "@prisma/client"
export * from "@prisma/client"
let prisma: PrismaClient
if (process.env.NODE_ENV === "production") {
prisma = new PrismaClient()
} else {
// Ensure the prisma instance is re-used during hot-reloading
// Otherwise, a new client will be created on every reload
global["prisma"] = global["prisma"] || new PrismaClient()
prisma = global["prisma"]
}
export default prisma

View File

View File

@@ -0,0 +1,82 @@
# Migration `20200704211726`
This migration has been generated by Brandon Bayer at 7/4/2020, 9:17:26 PM.
You can check out the [state of the schema](./schema.prisma) after the migration.
## Database Steps
```sql
PRAGMA foreign_keys=OFF;
CREATE TABLE "quaint"."User" (
"createdAt" DATE NOT NULL DEFAULT CURRENT_TIMESTAMP ,"email" TEXT NOT NULL ,"hashedPassword" TEXT NOT NULL ,"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,"name" TEXT ,"role" TEXT NOT NULL ,"updatedAt" DATE NOT NULL )
CREATE TABLE "quaint"."Session" (
"antiCSRFToken" TEXT ,"createdAt" DATE NOT NULL DEFAULT CURRENT_TIMESTAMP ,"expiresAt" DATE ,"handle" TEXT NOT NULL ,"hashedSessionToken" TEXT ,"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,"privateData" TEXT ,"publicData" TEXT ,"updatedAt" DATE NOT NULL ,"userId" INTEGER ,FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE)
CREATE UNIQUE INDEX "quaint"."User.email" ON "User"("email")
CREATE UNIQUE INDEX "quaint"."Session.handle" ON "Session"("handle")
PRAGMA "quaint".foreign_key_check;
PRAGMA foreign_keys=ON;
```
## Changes
```diff
diff --git schema.prisma schema.prisma
migration ..20200704211726
--- datamodel.dml
+++ datamodel.dml
@@ -1,0 +1,46 @@
+// This is your Prisma schema file,
+// learn more about it in the docs: https://pris.ly/d/prisma-schema
+
+datasource sqlite {
+ provider = "sqlite"
+ url = "***"
+}
+
+// SQLite is easy to start with, but if you use Postgres in production
+// you should also use it in development with the following:
+//datasource postgresql {
+// provider = "postgresql"
+// url = "***"
+//}
+
+generator client {
+ provider = "prisma-client-js"
+}
+
+
+// --------------------------------------
+
+model User {
+ id Int @default(autoincrement()) @id
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+ name String?
+ email String @unique
+ hashedPassword String
+ role String
+ sessions Session[]
+}
+
+model Session {
+ id Int @default(autoincrement()) @id
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+ expiresAt DateTime?
+ handle String @unique
+ user User? @relation(fields: [userId], references: [id])
+ userId Int?
+ hashedSessionToken String?
+ antiCSRFToken String?
+ publicData String?
+ privateData String?
+}
```

View File

@@ -0,0 +1,46 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource sqlite {
provider = "sqlite"
url = "***"
}
// SQLite is easy to start with, but if you use Postgres in production
// you should also use it in development with the following:
//datasource postgresql {
// provider = "postgresql"
// url = "***"
//}
generator client {
provider = "prisma-client-js"
}
// --------------------------------------
model User {
id Int @default(autoincrement()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String?
email String @unique
hashedPassword String
role String
sessions Session[]
}
model Session {
id Int @default(autoincrement()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
expiresAt DateTime?
handle String @unique
user User? @relation(fields: [userId], references: [id])
userId Int?
hashedSessionToken String?
antiCSRFToken String?
publicData String?
privateData String?
}

View File

@@ -0,0 +1,373 @@
{
"version": "0.3.14-fixed",
"steps": [
{
"tag": "CreateSource",
"source": "sqlite"
},
{
"tag": "CreateArgument",
"location": {
"tag": "Source",
"source": "sqlite"
},
"argument": "provider",
"value": "\"sqlite\""
},
{
"tag": "CreateArgument",
"location": {
"tag": "Source",
"source": "sqlite"
},
"argument": "url",
"value": "\"file:./db.sqlite\""
},
{
"tag": "CreateModel",
"model": "User"
},
{
"tag": "CreateField",
"model": "User",
"field": "id",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "User",
"field": "id"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "User",
"field": "id"
},
"directive": "default"
},
"argument": "",
"value": "autoincrement()"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "User",
"field": "id"
},
"directive": "id"
}
},
{
"tag": "CreateField",
"model": "User",
"field": "createdAt",
"type": "DateTime",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "User",
"field": "createdAt"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "User",
"field": "createdAt"
},
"directive": "default"
},
"argument": "",
"value": "now()"
},
{
"tag": "CreateField",
"model": "User",
"field": "updatedAt",
"type": "DateTime",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "User",
"field": "updatedAt"
},
"directive": "updatedAt"
}
},
{
"tag": "CreateField",
"model": "User",
"field": "name",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "User",
"field": "email",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "User",
"field": "email"
},
"directive": "unique"
}
},
{
"tag": "CreateField",
"model": "User",
"field": "hashedPassword",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "User",
"field": "role",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateField",
"model": "User",
"field": "sessions",
"type": "Session",
"arity": "List"
},
{
"tag": "CreateModel",
"model": "Session"
},
{
"tag": "CreateField",
"model": "Session",
"field": "id",
"type": "Int",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Session",
"field": "id"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Session",
"field": "id"
},
"directive": "default"
},
"argument": "",
"value": "autoincrement()"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Session",
"field": "id"
},
"directive": "id"
}
},
{
"tag": "CreateField",
"model": "Session",
"field": "createdAt",
"type": "DateTime",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Session",
"field": "createdAt"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Session",
"field": "createdAt"
},
"directive": "default"
},
"argument": "",
"value": "now()"
},
{
"tag": "CreateField",
"model": "Session",
"field": "updatedAt",
"type": "DateTime",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Session",
"field": "updatedAt"
},
"directive": "updatedAt"
}
},
{
"tag": "CreateField",
"model": "Session",
"field": "expiresAt",
"type": "DateTime",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Session",
"field": "handle",
"type": "String",
"arity": "Required"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Session",
"field": "handle"
},
"directive": "unique"
}
},
{
"tag": "CreateField",
"model": "Session",
"field": "user",
"type": "User",
"arity": "Optional"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "Session",
"field": "user"
},
"directive": "relation"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Session",
"field": "user"
},
"directive": "relation"
},
"argument": "fields",
"value": "[userId]"
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "Session",
"field": "user"
},
"directive": "relation"
},
"argument": "references",
"value": "[id]"
},
{
"tag": "CreateField",
"model": "Session",
"field": "userId",
"type": "Int",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Session",
"field": "hashedSessionToken",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Session",
"field": "antiCSRFToken",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Session",
"field": "publicData",
"type": "String",
"arity": "Optional"
},
{
"tag": "CreateField",
"model": "Session",
"field": "privateData",
"type": "String",
"arity": "Optional"
}
]
}

View File

@@ -0,0 +1,66 @@
# Migration `20200711145940`
This migration has been generated by Brandon Bayer at 7/11/2020, 2:59:40 PM.
You can check out the [state of the schema](./schema.prisma) after the migration.
## Database Steps
```sql
PRAGMA foreign_keys=OFF;
CREATE TABLE "quaint"."new_User" (
"createdAt" DATE NOT NULL DEFAULT CURRENT_TIMESTAMP ,"email" TEXT NOT NULL ,"hashedPassword" TEXT ,"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,"name" TEXT ,"role" TEXT NOT NULL DEFAULT 'user' ,"updatedAt" DATE NOT NULL )
INSERT INTO "quaint"."new_User" ("createdAt", "email", "hashedPassword", "id", "name", "role", "updatedAt") SELECT "createdAt", "email", "hashedPassword", "id", "name", "role", "updatedAt" FROM "quaint"."User"
PRAGMA foreign_keys=off;
DROP TABLE "quaint"."User";;
PRAGMA foreign_keys=on
ALTER TABLE "quaint"."new_User" RENAME TO "User";
CREATE UNIQUE INDEX "quaint"."User.email" ON "User"("email")
PRAGMA "quaint".foreign_key_check;
PRAGMA foreign_keys=ON;
```
## Changes
```diff
diff --git schema.prisma schema.prisma
migration 20200704211726..20200711145940
--- datamodel.dml
+++ datamodel.dml
@@ -2,16 +2,16 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource sqlite {
provider = "sqlite"
- url = "***"
+ url = "***"
}
// SQLite is easy to start with, but if you use Postgres in production
// you should also use it in development with the following:
//datasource postgresql {
// provider = "postgresql"
-// url = "***"
+// url = "***"
//}
generator client {
provider = "prisma-client-js"
@@ -25,10 +25,10 @@
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String?
email String @unique
- hashedPassword String
- role String
+ hashedPassword String?
+ role String @default("user")
sessions Session[]
}
model Session {
```

View File

@@ -0,0 +1,46 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource sqlite {
provider = "sqlite"
url = "***"
}
// SQLite is easy to start with, but if you use Postgres in production
// you should also use it in development with the following:
//datasource postgresql {
// provider = "postgresql"
// url = "***"
//}
generator client {
provider = "prisma-client-js"
}
// --------------------------------------
model User {
id Int @default(autoincrement()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String?
email String @unique
hashedPassword String?
role String @default("user")
sessions Session[]
}
model Session {
id Int @default(autoincrement()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
expiresAt DateTime?
handle String @unique
user User? @relation(fields: [userId], references: [id])
userId Int?
hashedSessionToken String?
antiCSRFToken String?
publicData String?
privateData String?
}

View File

@@ -0,0 +1,36 @@
{
"version": "0.3.14-fixed",
"steps": [
{
"tag": "UpdateField",
"model": "User",
"field": "hashedPassword",
"arity": "Optional"
},
{
"tag": "CreateDirective",
"location": {
"path": {
"tag": "Field",
"model": "User",
"field": "role"
},
"directive": "default"
}
},
{
"tag": "CreateArgument",
"location": {
"tag": "Directive",
"path": {
"tag": "Field",
"model": "User",
"field": "role"
},
"directive": "default"
},
"argument": "",
"value": "\"user\""
}
]
}

View File

@@ -0,0 +1,4 @@
# Prisma Migrate lockfile v1
20200704211726
20200711145940

View File

@@ -0,0 +1,46 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource sqlite {
provider = "sqlite"
url = "file:./db.sqlite"
}
// SQLite is easy to start with, but if you use Postgres in production
// you should also use it in development with the following:
//datasource postgresql {
// provider = "postgresql"
// url = env("DATABASE_URL")
//}
generator client {
provider = "prisma-client-js"
}
// --------------------------------------
model User {
id Int @default(autoincrement()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
name String?
email String @unique
hashedPassword String?
role String @default("user")
sessions Session[]
}
model Session {
id Int @default(autoincrement()) @id
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
expiresAt DateTime?
handle String @unique
user User? @relation(fields: [userId], references: [id])
userId Int?
hashedSessionToken String?
antiCSRFToken String?
publicData String?
privateData String?
}

View File

View File

@@ -0,0 +1,69 @@
{
"name": "@examples/auth",
"version": "0.16.5-canary.7",
"scripts": {
"start": "blitz start",
"studio": "blitz db studio",
"build": "blitz build",
"lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
"test": "blitz build",
"analyze": "cross-env ANALYZE=true blitz build"
},
"browserslist": [
"defaults"
],
"prettier": {
"semi": false,
"printWidth": 100,
"bracketSpacing": false,
"trailingComma": "all"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && pretty-quick --staged",
"pre-push": "blitz test"
}
},
"lint-staged": {
"*.{js,ts,tsx}": [
"eslint --fix"
]
},
"dependencies": {
"@prisma/cli": "2.1.0",
"@prisma/client": "2.1.0",
"blitz": "0.16.5-canary.7",
"final-form": "4.20.1",
"passport-github2": "0.1.11",
"passport-twitter": "1.0.4",
"react": "0.0.0-experimental-33c3af284",
"react-dom": "0.0.0-experimental-33c3af284",
"react-final-form": "6.5.1",
"secure-password": "4.0.0",
"zod": "1.10.0"
},
"devDependencies": {
"@next/bundle-analyzer": "latest",
"@types/passport-github2": "1.2.4",
"@types/passport-twitter": "1.0.36",
"@types/react": "16.9.38",
"@types/secure-password": "3.1.0",
"@typescript-eslint/eslint-plugin": "2.34.1-alpha.2",
"@typescript-eslint/parser": "2.34.1-alpha.2",
"babel-eslint": "10.1.0",
"cross-env": "latest",
"eslint": "6.8.0",
"eslint-config-react-app": "5.2.1",
"eslint-plugin-flowtype": "4.7.0",
"eslint-plugin-import": "2.21.2",
"eslint-plugin-jsx-a11y": "6.3.1",
"eslint-plugin-react": "7.20.0",
"eslint-plugin-react-hooks": "3.0.0",
"husky": "4.2.5",
"lint-staged": "10.2.11",
"prettier": "2.0.5",
"pretty-quick": "2.0.1",
"typescript": "3.9.5"
},
"private": true
}

BIN
examples/auth/public/favicon.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"baseUrl": "./",
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"strictNullChecks": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
}

View File

View File

@@ -0,0 +1,4 @@
module.exports = {
presets: ["next/babel"],
plugins: [],
}

View File

@@ -0,0 +1,10 @@
module.exports = {
extends: ["react-app", "plugin:jsx-a11y/recommended"],
plugins: ["jsx-a11y"],
rules: {
"import/no-anonymous-default-export": "error",
"import/no-webpack-loader-syntax": "off",
"react/react-in-jsx-scope": "off", // React is always in scope with Blitz
"jsx-a11y/anchor-is-valid": "off", //Doesn't play well with Blitz/Next <Link> usage
},
}

55
examples/plain-js/.gitignore vendored Normal file
View File

@@ -0,0 +1,55 @@
# dependencies
node_modules
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.pnp.*
.npm
web_modules/
# blitz
/.blitz/
/.next/
*.sqlite
.now
.blitz-console-history
blitz-log.log
# misc
.DS_Store
# local env files
.env
.envrc
.env.local
.env.development.local
.env.test.local
.env.production.local
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Testing
coverage
*.lcov
.nyc_output
lib-cov
# Caches
*.tsbuildinfo
.eslintcache
.node_repl_history
.yarn-integrity
# Serverless directories
.serverless/
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

1
examples/plain-js/.npmrc Normal file
View File

@@ -0,0 +1 @@
save-exact=true

View File

@@ -0,0 +1,5 @@
.gitkeep
.env
*.ico
*.lock
db/migrations

View File

@@ -0,0 +1,26 @@
# plain-js
## Getting Started
1. Add this code to db/schema.prisma:
```
model Project {
id Int @default(autoincrement()) @id
name String
}
```
2. DB migrate
```
blitz db migrate
```
3. Start the dev server
```
blitz start
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

View File

View File

@@ -0,0 +1,22 @@
import React from "react"
export default class ErrorBoundary extends React.Component {
state = {
hasError: false,
error: null,
}
static getDerivedStateFromError(error) {
return {
hasError: true,
error,
}
}
render() {
if (this.state.hasError) {
return this.props.fallback(this.state.error)
}
return this.props.children
}
}

View File

View File

@@ -0,0 +1,3 @@
export default function MyApp({Component, pageProps}) {
return <Component {...pageProps} />
}

View File

@@ -0,0 +1,29 @@
import {
Document,
Html,
DocumentHead,
Main,
BlitzScript,
/*DocumentContext*/
} from "blitz"
class MyDocument extends Document {
// Only uncomment if you need to customize this behaviour
// static async getInitialProps(ctx: DocumentContext) {
// const initialProps = await Document.getInitialProps(ctx)
// return {...initialProps}
// }
render() {
return (
<Html lang="en">
<DocumentHead />
<body>
<Main />
<BlitzScript />
</body>
</Html>
)
}
}
export default MyDocument

View File

@@ -0,0 +1,205 @@
import {Head, Link} from "blitz"
const modelSnippet = `model Project {
id Int @default(autoincrement()) @id
name String
}`
const migrateSnippet = `$ blitz db migrate
$ blitz generate all project`
const Home = () => (
<div className="container">
<Head>
<title>plain-js</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<div className="logo">
<img src="/logo.png" alt="blitz.js" />
</div>
<p>
1. Add this code to <strong>db/schema.prisma</strong>:
</p>
<pre>
<code>{modelSnippet}</code>
</pre>
<p>2. Run these commands in your terminal:</p>
<pre>
<code>{migrateSnippet}</code>
</pre>
<p>
3. Go to{" "}
<Link href="/projects">
<a>/projects</a>
</Link>
</p>
<div className="buttons">
<a
className="button"
href="https://github.com/blitz-js/blitz/blob/master/USER_GUIDE.md?utm_source=blitz-new&utm_medium=app-template&utm_campaign=blitz-new"
target="_blank"
rel="noopener noreferrer"
>
Documentation
</a>
<a
className="button-outline"
href="https://github.com/blitz-js/blitz"
target="_blank"
rel="noopener noreferrer"
>
Github Repo
</a>
<a
className="button-outline"
href="https://slack.blitzjs.com"
target="_blank"
rel="noopener noreferrer"
>
Slack Community
</a>
</div>
</main>
<footer>
<a
href="https://blitzjs.com?utm_source=blitz-new&utm_medium=app-template&utm_campaign=blitz-new"
target="_blank"
rel="noopener noreferrer"
>
Powered by Blitz.js
</a>
</footer>
<style jsx>{`
.container {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
main {
padding: 5rem 0;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
main p {
font-size: 1.2rem;
}
footer {
width: 100%;
height: 60px;
border-top: 1px solid #eaeaea;
display: flex;
justify-content: center;
align-items: center;
background-color: #45009d;
}
footer a {
display: flex;
justify-content: center;
align-items: center;
}
footer a {
color: #f4f4f4;
text-decoration: none;
}
.logo {
margin-bottom: 2rem;
}
.logo img {
width: 300px;
}
.buttons {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 0.5rem;
margin-top: 6rem;
}
a.button {
background-color: #6700eb;
padding: 1rem 2rem;
color: #f4f4f4;
text-align: center;
}
a.button:hover {
background-color: #45009d;
}
a.button-outline {
border: 2px solid #6700eb;
padding: 1rem 2rem;
color: #6700eb;
text-align: center;
}
a.button-outline:hover {
border-color: #45009d;
color: #45009d;
}
pre {
background: #fafafa;
border-radius: 5px;
padding: 0.75rem;
}
code {
font-size: 0.9rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
}
.grid {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 800px;
margin-top: 3rem;
}
@media (max-width: 600px) {
.grid {
width: 100%;
flex-direction: column;
}
}
`}</style>
<style jsx global>{`
@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@300;700&display=swap");
html,
body {
padding: 0;
margin: 0;
font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
}
`}</style>
</div>
)
export default Home

View File

@@ -0,0 +1,5 @@
import db from "db"
export default async function createProject(args) {
const project = await db.project.create(args)
return project
}

View File

@@ -0,0 +1,5 @@
import db from "db"
export default async function deleteProject(args) {
const project = await db.project.delete(args)
return project
}

View File

@@ -0,0 +1,7 @@
import db from "db"
export default async function updateProject(args) {
// Don't allow updating ID
delete args.data.id
const project = await db.project.update(args)
return project
}

View File

@@ -0,0 +1,64 @@
import {Suspense} from "react"
import {Head, Link, useRouter, useQuery} from "blitz"
import getProject from "app/projects/queries/getProject"
import deleteProject from "app/projects/mutations/deleteProject"
export const Project = () => {
const router = useRouter()
const id = parseInt(router?.query.id)
const [project] = useQuery(getProject, {
where: {
id,
},
})
return (
<div>
<h1>Project {project.id}</h1>
<pre>{JSON.stringify(project)}</pre>
<Link href="/projects/[id]/edit" as={`/projects/${project.id}/edit`}>
<a>Edit</a>
</Link>
<button
type="button"
onClick={async () => {
if (window.confirm("This will be deleted")) {
await deleteProject({
where: {
id: project.id,
},
})
router.push("/projects")
}
}}
>
Delete
</button>
</div>
)
}
const ShowProjectPage = () => {
return (
<div>
<Head>
<title>Project</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<p>
<Link href="/projects">
<a>Projects</a>
</Link>
</p>
<Suspense fallback={<div>Loading...</div>}>
<Project />
</Suspense>
</main>
</div>
)
}
export default ShowProjectPage

View File

@@ -0,0 +1,68 @@
import {Suspense} from "react"
import {Head, Link, useRouter, useQuery} from "blitz"
import getProject from "app/projects/queries/getProject"
import updateProject from "app/projects/mutations/updateProject"
export const EditProject = () => {
const router = useRouter()
const id = parseInt(router?.query.id)
const [project] = useQuery(getProject, {
where: {
id,
},
})
return (
<div>
<h1>Edit Project {project.id}</h1>
<pre>{JSON.stringify(project)}</pre>
<form
onSubmit={async (event) => {
event.preventDefault()
try {
const updated = await updateProject({
where: {
id: project.id,
},
data: {
name: "MyNewName",
},
})
alert("Success!" + JSON.stringify(updated))
router.push("/projects/[id]", `/projects/${updated.id}`)
} catch (error) {
alert("Error creating project " + JSON.stringify(error, null, 2))
}
}}
>
<div>Put your form fields here. But for now, just click submit</div>
<button>Submit</button>
</form>
</div>
)
}
const EditProjectPage = () => {
return (
<div>
<Head>
<title>Edit Project</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<Suspense fallback={<div>Loading...</div>}>
<EditProject />
</Suspense>
<p>
<Link href="/projects">
<a>Projects</a>
</Link>
</p>
</main>
</div>
)
}
export default EditProjectPage

View File

@@ -0,0 +1,45 @@
import {Suspense} from "react"
import {Head, Link, useQuery} from "blitz"
import getProjects from "app/projects/queries/getProjects"
export const ProjectsList = () => {
const [projects] = useQuery(getProjects, {})
return (
<ul>
{projects.map((project) => (
<li key={project.id}>
<Link href="/projects/[id]" as={`/projects/${project.id}`}>
<a>{project.name}</a>
</Link>
</li>
))}
</ul>
)
}
const ProjectsPage = () => {
return (
<div>
<Head>
<title>Projects</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<h1>Projects</h1>
<p>
<Link href="/projects/new">
<a>Create Project</a>
</Link>
</p>
<Suspense fallback={<div>Loading...</div>}>
<ProjectsList />
</Suspense>
</main>
</div>
)
}
export default ProjectsPage

View File

@@ -0,0 +1,47 @@
import {Head, Link, useRouter} from "blitz"
import createProject from "app/projects/mutations/createProject"
const NewProjectPage = () => {
const router = useRouter()
return (
<div>
<Head>
<title>New Project</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<h1>Create New Project </h1>
<form
onSubmit={async (event) => {
event.preventDefault()
try {
const project = await createProject({
data: {
name: "MyName",
},
})
alert("Success!" + JSON.stringify(project))
router.push("/projects/[id]", `/projects/${project.id}`)
} catch (error) {
alert("Error creating project " + JSON.stringify(error, null, 2))
}
}}
>
<div>Put your form fields here. But for now, just click submit</div>
<button>Submit</button>
</form>
<p>
<Link href="/projects">
<a>Projects</a>
</Link>
</p>
</main>
</div>
)
}
export default NewProjectPage

View File

@@ -0,0 +1,5 @@
import db from "db"
export default async function getProject(args) {
const project = await db.project.findOne(args)
return project
}

View File

@@ -0,0 +1,5 @@
import db from "db"
export default async function getProjects(args) {
const projects = await db.project.findMany(args)
return projects
}

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