create-qwik 0.19.1 → 0.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * create-qwik 0.19.1
3
+ * create-qwik 0.19.2
4
4
  * Copyright Builder.io, Inc. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/BuilderIO/qwik/blob/main/LICENSE
@@ -76,7 +76,7 @@ ${e}
76
76
  ${h.green("\u25CB")} ${h.reset(t)} ${h.gray("\u2500".repeat(i-t.length-1)+"\u256E")}
77
77
  ${n}
78
78
  ${h.gray("\u251C"+"\u2500".repeat(i+2)+"\u256F")}
79
- `)};async function Si(){Oo(`Let's create a ${h.bgBlue(" Qwik App ")} \u2728 (v0.19.1)`);let e="./qwik-app",t=await To({message:"Where would you like to create your new project?",placeholder:e})||e;Ce(t)&&(mt("Operation cancelled."),process.exit(0));let r=ge(),n=(await Ae()).filter(B=>B.type==="app"),s=n.find(B=>B.id==="base"),o=n.filter(B=>B.id!==s.id),a=mo(r,s,!0),l=ui(t.trim()),f=null;if(Ei.default.existsSync(l)){let B=await vi({message:`Directory "./${(0,Bo.relative)(process.cwd(),l)}" already exists. What would you like to do?`,options:[{value:"exit",label:"Do not overwrite this directory and exit"},{value:"replace",label:"Overwrite and replace this directory"}]});(Ce(B)||B==="exit")&&(mt("Operation cancelled."),process.exit(0)),B==="replace"&&(f=Ei.default.promises.rm(l,{recursive:!0}))}let g=await vi({message:"Select a starter",options:o.map(B=>{var He;return{label:B.name,value:B.id,hint:(He=B.pkgJson)==null?void 0:He.description}})});Ce(g)&&(mt("Operation cancelled."),process.exit(0));let d=g,m=await Ao({message:`Would you like to install ${r} dependencies?`,initialValue:!0});Ce(m)&&(mt("Operation cancelled."),process.exit(0)),f&&await f;let b=m,x={starterId:d,outDir:l},_=Io();_.start("Creating App");let F=await dt(x);_.stop("Created App \u{1F430}");let A=!1;return b&&(_.start("Installing dependencies"),A=await a.complete(b,F.outDir),_.stop("Installed dependencies \u{1F4CB}")),Zu(li(r,F,A),"Result"),Do(""),F}async function Qu(){console.clear(),ef(),Xu();try{let e=process.argv.slice(2);e.length>=2?await ai(e[0],e[1]):await Si()}catch(e){Te(e.message||e)}}function Xu(){let e=process.version,[t,r]=e.replace("v","").split(".");Number(t)<16?(console.error(h.red(`Qwik requires Node.js 16.8 or higher. You are currently running Node.js ${e}.`)),process.exit(1)):Number(t)===16?Number(r)<8&&console.warn(h.yellow(`Node.js 16.8 or higher is recommended. You are currently running Node.js ${e}.`)):Number(t)===18&&Number(r)<11&&console.error(h.red(`Node.js 18.11 or higher is REQUIRED. From Node 18.0.0 to 18.11.0, there is a bug preventing correct behaviour of Qwik. You are currently running Node.js ${e}. https://github.com/BuilderIO/qwik/issues/3035`))}function ef(){console.log(h.blue(`
79
+ `)};async function Si(){Oo(`Let's create a ${h.bgBlue(" Qwik App ")} \u2728 (v0.19.2)`);let e="./qwik-app",t=await To({message:"Where would you like to create your new project?",placeholder:e})||e;Ce(t)&&(mt("Operation cancelled."),process.exit(0));let r=ge(),n=(await Ae()).filter(B=>B.type==="app"),s=n.find(B=>B.id==="base"),o=n.filter(B=>B.id!==s.id),a=mo(r,s,!0),l=ui(t.trim()),f=null;if(Ei.default.existsSync(l)){let B=await vi({message:`Directory "./${(0,Bo.relative)(process.cwd(),l)}" already exists. What would you like to do?`,options:[{value:"exit",label:"Do not overwrite this directory and exit"},{value:"replace",label:"Overwrite and replace this directory"}]});(Ce(B)||B==="exit")&&(mt("Operation cancelled."),process.exit(0)),B==="replace"&&(f=Ei.default.promises.rm(l,{recursive:!0}))}let g=await vi({message:"Select a starter",options:o.map(B=>{var He;return{label:B.name,value:B.id,hint:(He=B.pkgJson)==null?void 0:He.description}})});Ce(g)&&(mt("Operation cancelled."),process.exit(0));let d=g,m=await Ao({message:`Would you like to install ${r} dependencies?`,initialValue:!0});Ce(m)&&(mt("Operation cancelled."),process.exit(0)),f&&await f;let b=m,x={starterId:d,outDir:l},_=Io();_.start("Creating App");let F=await dt(x);_.stop("Created App \u{1F430}");let A=!1;return b&&(_.start("Installing dependencies"),A=await a.complete(b,F.outDir),_.stop("Installed dependencies \u{1F4CB}")),Zu(li(r,F,A),"Result"),Do(""),F}async function Qu(){console.clear(),ef(),Xu();try{let e=process.argv.slice(2);e.length>=2?await ai(e[0],e[1]):await Si()}catch(e){Te(e.message||e)}}function Xu(){let e=process.version,[t,r]=e.replace("v","").split(".");Number(t)<16?(console.error(h.red(`Qwik requires Node.js 16.8 or higher. You are currently running Node.js ${e}.`)),process.exit(1)):Number(t)===16?Number(r)<8&&console.warn(h.yellow(`Node.js 16.8 or higher is recommended. You are currently running Node.js ${e}.`)):Number(t)===18&&Number(r)<11&&console.error(h.red(`Node.js 18.11 or higher is REQUIRED. From Node 18.0.0 to 18.11.0, there is a bug preventing correct behaviour of Qwik. You are currently running Node.js ${e}. https://github.com/BuilderIO/qwik/issues/3035`))}function ef(){console.log(h.blue(`
80
80
  ${h.magenta("............")}
81
81
  .::: ${h.magenta(":--------:.")}
82
82
  .:::: ${h.magenta(".:-------:.")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-qwik",
3
- "version": "0.19.1",
3
+ "version": "0.19.2",
4
4
  "description": "Interactive CLI for create Qwik projects and adding features.",
5
5
  "bin": "./create-qwik.cjs",
6
6
  "main": "./index.cjs",
@@ -16,14 +16,14 @@
16
16
  "qwik": "qwik"
17
17
  },
18
18
  "devDependencies": {
19
- "@builder.io/qwik": "0.19.1",
19
+ "@builder.io/qwik": "0.19.2",
20
20
  "@builder.io/qwik-city": "0.4.0",
21
21
  "@types/eslint": "8.21.1",
22
22
  "@types/node": "^18.14.0",
23
23
  "@types/node-fetch": "latest",
24
24
  "@typescript-eslint/eslint-plugin": "5.53.0",
25
25
  "@typescript-eslint/parser": "5.53.0",
26
- "eslint-plugin-qwik": "0.19.1",
26
+ "eslint-plugin-qwik": "0.19.2",
27
27
  "eslint": "8.34.0",
28
28
  "node-fetch": "3.3.0",
29
29
  "undici": "5.20.0",
@@ -32,7 +32,7 @@
32
32
  "release": "np"
33
33
  },
34
34
  "devDependencies": {
35
- "@builder.io/qwik": "0.19.1",
35
+ "@builder.io/qwik": "0.19.2",
36
36
  "@types/eslint": "8.21.1",
37
37
  "@types/node": "^18.14.0",
38
38
  "@types/node-fetch": "latest",