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

Compare commits

...

4 Commits

Author SHA1 Message Date
Dillon Raphael
1f6b0b54c2 alpha.18 2022-04-29 20:46:32 -04:00
Dillon Raphael
4603a2b7bd alpha.17 2022-04-29 20:04:23 -04:00
Dillon Raphael
01f3a03ea9 alpha.16 2022-04-29 18:21:07 -04:00
Dillon Raphael
36e26193b7 alpha.15 2022-04-29 18:13:17 -04:00
25 changed files with 247 additions and 45 deletions

View File

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

View File

@@ -18,6 +18,7 @@
"changesets": [
"breezy-cameras-double",
"dirty-monkeys-greet",
"empty-berries-rule",
"flat-bees-approve",
"great-months-train",
"lovely-colts-share",
@@ -29,6 +30,9 @@
"swift-drinks-dress",
"ten-rivers-burn",
"thirty-countries-build",
"twenty-beans-pump"
"twenty-beans-pump",
"two-kiwis-help",
"unlucky-papayas-sleep",
"wicked-ghosts-cough"
]
}

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,47 @@
# toolkit-app
## 1.0.1-alpha.13
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.18
- @blitzjs/auth@2.0.0-alpha.18
- @blitzjs/next@2.0.0-alpha.18
- @blitzjs/rpc@2.0.0-alpha.18
- @blitzjs/config@2.0.0-alpha.18
## 1.0.1-alpha.12
### Patch Changes
- blitz@2.0.0-alpha.17
- @blitzjs/auth@2.0.0-alpha.17
- @blitzjs/next@2.0.0-alpha.17
- @blitzjs/rpc@2.0.0-alpha.17
- @blitzjs/config@2.0.0-alpha.17
## 1.0.1-alpha.11
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.16
- @blitzjs/auth@2.0.0-alpha.16
- @blitzjs/next@2.0.0-alpha.16
- @blitzjs/rpc@2.0.0-alpha.16
- @blitzjs/config@2.0.0-alpha.16
## 1.0.1-alpha.10
### Patch Changes
- blitz@2.0.0-alpha.15
- @blitzjs/auth@2.0.0-alpha.15
- @blitzjs/next@2.0.0-alpha.15
- @blitzjs/rpc@2.0.0-alpha.15
- @blitzjs/config@2.0.0-alpha.15
## 1.0.1-alpha.9
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "toolkit-app",
"version": "1.0.1-alpha.9",
"version": "1.0.1-alpha.13",
"scripts": {
"start:dev": "pnpm run prisma:start && next dev",
"buildapp": "prisma generate && next build",
@@ -29,7 +29,7 @@
"@blitzjs/rpc": "workspace:*",
"@hookform/resolvers": "2.8.8",
"@prisma/client": "3.9.0",
"blitz": "workspace:2.0.0-alpha.14",
"blitz": "workspace:2.0.0-alpha.18",
"next": "12.1.1",
"prisma": "3.9.0",
"react": "18.0.0",

View File

@@ -1,5 +1,31 @@
# @blitzjs/auth
## 2.0.0-alpha.18
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.18
## 2.0.0-alpha.17
### Patch Changes
- blitz@2.0.0-alpha.17
## 2.0.0-alpha.16
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.16
## 2.0.0-alpha.15
### Patch Changes
- blitz@2.0.0-alpha.15
## 2.0.0-alpha.14
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/auth",
"version": "2.0.0-alpha.14",
"version": "2.0.0-alpha.18",
"scripts": {
"build": "unbuild",
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts",
@@ -24,7 +24,7 @@
"@types/secure-password": "3.1.1",
"b64-lite": "1.4.0",
"bad-behavior": "1.0.1",
"blitz": "2.0.0-alpha.14",
"blitz": "2.0.0-alpha.18",
"cookie": "0.4.1",
"debug": "4.3.3",
"http": "0.0.1-security",
@@ -35,7 +35,7 @@
"url": "0.11.0"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-alpha.14",
"@blitzjs/config": "workspace:2.0.0-alpha.18",
"@testing-library/react": "13.0.0",
"@testing-library/react-hooks": "7.0.2",
"@types/cookie": "0.4.1",

View File

@@ -1,5 +1,29 @@
# @blitzjs/next
## 2.0.0-alpha.18
### Patch Changes
- @blitzjs/rpc@2.0.0-alpha.18
## 2.0.0-alpha.17
### Patch Changes
- @blitzjs/rpc@2.0.0-alpha.17
## 2.0.0-alpha.16
### Patch Changes
- @blitzjs/rpc@2.0.0-alpha.16
## 2.0.0-alpha.15
### Patch Changes
- @blitzjs/rpc@2.0.0-alpha.15
## 2.0.0-alpha.14
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/next",
"version": "2.0.0-alpha.14",
"version": "2.0.0-alpha.18",
"scripts": {
"build": "unbuild",
"dev": "pnpm predev && pnpm watch unbuild src --wait=0.2",
@@ -23,13 +23,13 @@
"eslint.js"
],
"dependencies": {
"@blitzjs/rpc": "2.0.0-alpha.14",
"@blitzjs/rpc": "2.0.0-alpha.18",
"debug": "4.3.3",
"fs-extra": "10.0.1",
"react-query": "3.21.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-alpha.14",
"@blitzjs/config": "workspace:2.0.0-alpha.18",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.3",
"@testing-library/react": "13.0.0",
@@ -40,7 +40,7 @@
"@types/react": "17.0.43",
"@types/react-dom": "17.0.14",
"@types/testing-library__react-hooks": "4.0.0",
"blitz": "2.0.0-alpha.14",
"blitz": "2.0.0-alpha.18",
"cross-spawn": "7.0.3",
"find-up": "4.1.0",
"lodash.frompairs": "4.0.1",

View File

@@ -1,5 +1,35 @@
# @blitzjs/rpc
## 2.0.0-alpha.18
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.18
- @blitzjs/auth@2.0.0-alpha.18
## 2.0.0-alpha.17
### Patch Changes
- blitz@2.0.0-alpha.17
- @blitzjs/auth@2.0.0-alpha.17
## 2.0.0-alpha.16
### Patch Changes
- Updated dependencies
- blitz@2.0.0-alpha.16
- @blitzjs/auth@2.0.0-alpha.16
## 2.0.0-alpha.15
### Patch Changes
- blitz@2.0.0-alpha.15
- @blitzjs/auth@2.0.0-alpha.15
## 2.0.0-alpha.14
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@blitzjs/rpc",
"version": "2.0.0-alpha.14",
"version": "2.0.0-alpha.18",
"scripts": {
"build": "unbuild",
"predev": "wait-on -d 250 ../blitz/dist/index-server.d.ts && wait-on -d 250 ../blitz-auth/dist/index-browser.d.ts",
@@ -20,7 +20,7 @@
"dist/**"
],
"dependencies": {
"@blitzjs/auth": "2.0.0-alpha.14",
"@blitzjs/auth": "2.0.0-alpha.18",
"b64-lite": "1.4.0",
"bad-behavior": "1.0.1",
"chalk": "^4.1.0",
@@ -30,11 +30,11 @@
"zod": "3.10.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-alpha.14",
"@blitzjs/config": "workspace:2.0.0-alpha.18",
"@types/debug": "4.1.7",
"@types/react": "17.0.43",
"@types/react-dom": "17.0.14",
"blitz": "2.0.0-alpha.14",
"blitz": "2.0.0-alpha.18",
"next": "12.1.1",
"react": "18.0.0",
"react-dom": "18.0.0",
@@ -43,7 +43,7 @@
"watch": "1.0.2"
},
"peerDependencies": {
"blitz": "2.0.0-alpha.14",
"blitz": "2.0.0-alpha.18",
"next": "*"
},
"publishConfig": {

View File

@@ -1,5 +1,33 @@
# blitz
## 2.0.0-alpha.18
### Patch Changes
- fix generate cli command
- @blitzjs/generator@2.0.0-alpha.18
## 2.0.0-alpha.17
### Patch Changes
- Updated dependencies
- @blitzjs/generator@2.0.0-alpha.17
## 2.0.0-alpha.16
### Patch Changes
- remove console logs inside onPostInstall in the new cli command
- @blitzjs/generator@2.0.0-alpha.16
## 2.0.0-alpha.15
### Patch Changes
- Updated dependencies
- @blitzjs/generator@2.0.0-alpha.15
## 2.0.0-alpha.14
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "blitz",
"version": "2.0.0-alpha.14",
"version": "2.0.0-alpha.18",
"scripts": {
"build": "unbuild",
"dev": "watch unbuild src --wait=0.2",
@@ -23,7 +23,7 @@
"blitz": "bin/blitz"
},
"dependencies": {
"@blitzjs/generator": "2.0.0-alpha.14",
"@blitzjs/generator": "2.0.0-alpha.18",
"arg": "5.0.1",
"chalk": "^4.1.0",
"console-table-printer": "2.10.0",
@@ -47,7 +47,7 @@
"tslog": "3.3.1"
},
"devDependencies": {
"@blitzjs/config": "workspace:2.0.0-alpha.14",
"@blitzjs/config": "workspace:2.0.0-alpha.18",
"@types/cookie": "0.4.1",
"@types/cross-spawn": "6.0.2",
"@types/debug": "4.1.7",

View File

@@ -133,8 +133,9 @@ const validateModelName = (modelName: string): void => {
const determineType = async () => {
if (
!args["--type"] ||
(args["--type"] && !Object.keys(generatorMap).includes(args["--type"].toLowerCase()))
!args["_"].slice(1)[0] ||
(args["_"].slice(1)[0] &&
!Object.keys(generatorMap).includes(args["_"].slice(1)[0]?.toLowerCase() as string))
) {
const res = await prompts({
type: "select",
@@ -148,12 +149,12 @@ const determineType = async () => {
selectedType = res.type
} else {
selectedType = args["--type"]
selectedType = args["_"].slice(1)[0]?.toLowerCase() as string
}
}
const determineName = async () => {
if (!args["--name"]) {
if (!args["_"].slice(1)[1]) {
const res = await prompts({
type: "text",
name: "model",
@@ -164,7 +165,7 @@ const determineName = async () => {
selectedModelName = model
selectedContext = context
} else {
const {model, context} = getModelNameAndContext(args["--name"])
const {model, context} = getModelNameAndContext(args["_"].slice(1)[1]!)
selectedModelName = model
selectedContext = context
}
@@ -249,7 +250,7 @@ const generate: CliCommand = async (argv) => {
const generator = new GeneratorClass({
destinationRoot: require("path").resolve(),
// templateDir: blitzConfig.codegen?.templateDir,
extraArgs: args["_"].slice(1) as string[],
extraArgs: args["_"].slice(3) as string[],
modelName: singularRootContext,
modelNames: modelNames(singularRootContext),
ModelName: ModelName(singularRootContext),

View File

@@ -264,7 +264,6 @@ const newApp: CliCommand = async (argv) => {
{ignoreCache: true},
)
const result = await runPrisma(["migrate", "dev", "--name", "Initial migration"], true)
console.log("primsa result", result)
if (!result.success) throw new Error()
} catch (error) {
postInstallSteps.push(

View File

@@ -1,5 +1,13 @@
# @blitzjs/config
## 2.0.0-alpha.18
## 2.0.0-alpha.17
## 2.0.0-alpha.16
## 2.0.0-alpha.15
## 2.0.0-alpha.14
## 2.0.0-alpha.13

View File

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

View File

@@ -1,5 +1,21 @@
# @blitzjs/generator
## 2.0.0-alpha.18
## 2.0.0-alpha.17
### Patch Changes
- fix app generator for pnpm unmet dependency
## 2.0.0-alpha.16
## 2.0.0-alpha.15
### Patch Changes
- fix template sourcepath because of new env variable
## 2.0.0-alpha.14
## 2.0.0-alpha.13

View File

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

View File

@@ -302,9 +302,7 @@ export abstract class Generator<
return path.join(
__dirname,
"..",
process.env.NODE_ENV === "test" || process.env.NODE_ENV === "development"
? "./templates"
: "./dist/templates",
process.env.NODE_ENV === "test" ? "./templates" : "./dist/templates",
this.sourceRoot.path,
...paths,
)

View File

@@ -155,6 +155,12 @@ export class AppGenerator extends Generator<AppGeneratorOptions> {
cp.stdout?.setEncoding("utf8")
cp.stderr?.setEncoding("utf8")
cp.stdout?.on("data", (data) => {
if (pkgManager === "pnpm") {
if (data.includes("ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies")) {
spinners[spinners.length - 1]?.succeed()
}
}
if (pkgManager === "yarn") {
let json = getJSON(data)
if (json && json.type === "step") {

View File

@@ -25,7 +25,7 @@
"@typescript-eslint/parser": "5.9.1"
},
"devDependencies": {
"@blitzjs/config": "2.0.0-alpha.14",
"@blitzjs/config": "2.0.0-alpha.18",
"@types/react": "17.0.43",
"@types/react-dom": "17.0.14",
"react": "18.0.0",

26
pnpm-lock.yaml generated
View File

@@ -50,7 +50,7 @@ importers:
"@types/node": 17.0.16
"@types/preview-email": 2.0.1
"@types/react": 17.0.43
blitz: workspace:2.0.0-alpha.13
blitz: workspace:2.0.0-alpha.17
eslint: 7.32.0
husky: 7.0.4
jest: 27.5.1
@@ -263,8 +263,8 @@ importers:
packages/blitz:
specifiers:
"@blitzjs/config": workspace:2.0.0-alpha.13
"@blitzjs/generator": 2.0.0-alpha.13
"@blitzjs/config": workspace:2.0.0-alpha.17
"@blitzjs/generator": 2.0.0-alpha.17
"@types/cookie": 0.4.1
"@types/cross-spawn": 6.0.2
"@types/debug": 4.1.7
@@ -356,7 +356,7 @@ importers:
packages/blitz-auth:
specifiers:
"@blitzjs/config": workspace:2.0.0-alpha.13
"@blitzjs/config": workspace:2.0.0-alpha.17
"@testing-library/react": 13.0.0
"@testing-library/react-hooks": 7.0.2
"@types/b64-lite": 1.3.0
@@ -368,7 +368,7 @@ importers:
"@types/secure-password": 3.1.1
b64-lite: 1.4.0
bad-behavior: 1.0.1
blitz: 2.0.0-alpha.13
blitz: 2.0.0-alpha.17
cookie: 0.4.1
debug: 4.3.3
http: 0.0.1-security
@@ -413,8 +413,8 @@ importers:
packages/blitz-next:
specifiers:
"@blitzjs/config": workspace:2.0.0-alpha.13
"@blitzjs/rpc": 2.0.0-alpha.13
"@blitzjs/config": workspace:2.0.0-alpha.17
"@blitzjs/rpc": 2.0.0-alpha.17
"@testing-library/dom": 8.13.0
"@testing-library/jest-dom": 5.16.3
"@testing-library/react": 13.0.0
@@ -425,7 +425,7 @@ importers:
"@types/react": 17.0.43
"@types/react-dom": 17.0.14
"@types/testing-library__react-hooks": 4.0.0
blitz: 2.0.0-alpha.13
blitz: 2.0.0-alpha.17
cross-spawn: 7.0.3
debug: 4.3.3
find-up: 4.1.0
@@ -472,14 +472,14 @@ importers:
packages/blitz-rpc:
specifiers:
"@blitzjs/auth": 2.0.0-alpha.13
"@blitzjs/config": workspace:2.0.0-alpha.13
"@blitzjs/auth": 2.0.0-alpha.17
"@blitzjs/config": workspace:2.0.0-alpha.17
"@types/debug": 4.1.7
"@types/react": 17.0.43
"@types/react-dom": 17.0.14
b64-lite: 1.4.0
bad-behavior: 1.0.1
blitz: 2.0.0-alpha.13
blitz: 2.0.0-alpha.17
chalk: ^4.1.0
debug: 4.3.3
next: 12.1.1
@@ -534,7 +534,7 @@ importers:
"@babel/plugin-transform-typescript": 7.12.1
"@babel/preset-env": 7.12.10
"@babel/types": 7.12.10
"@blitzjs/config": 2.0.0-alpha.13
"@blitzjs/config": 2.0.0-alpha.17
"@juanm04/cpx": 2.0.1
"@mrleebo/prisma-ast": 0.2.6
"@types/babel__core": 7.1.19
@@ -625,7 +625,7 @@ importers:
packages/pkg-template:
specifiers:
"@blitzjs/config": 2.0.0-alpha.13
"@blitzjs/config": 2.0.0-alpha.17
"@types/react": 17.0.43
"@types/react-dom": 17.0.14
"@typescript-eslint/eslint-plugin": 5.9.1