create-qwik 1.2.7 → 1.2.8

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 1.2.7
3
+ * create-qwik 1.2.8
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
@@ -114,5 +114,5 @@ ${_("\u251C"+"\u2500".repeat(s+2)+"\u256F")}
114
114
  Opportunity.`,"That is impossible. Opportunity doesn\u2019t come knocking twice!"],[`Knock knock.
115
115
  Who's there?
116
116
  Hatch.
117
- Hatch who?`,"Bless you!"]];function zt(){let e=Math.floor(Math.random()*au.length);return au[e]}async function cu(){Mu(`Let's create a ${we(" Qwik App ")} \u2728 (v1.2.7)`),await Ot(500);let e="./qwik-app",t=await Nu({message:`Where would you like to create your new project? ${_("(Use '.' or './' for current directory)")}`,placeholder:e})||e;N(t)&&(ue("Operation cancelled."),process.exit(0));let D=R(),r=(await U()).filter(m=>m.type==="app"),i=r.find(m=>m.id==="base"),u=r.filter(m=>m.id!==i.id),n=qt(D,i),a=ou(t.trim());w.info(`Creating new project in ${we(" "+a+" ")} ... \u{1F407}`);let c=null;if(Y.default.existsSync(a)&&Y.default.readdirSync(a).length>0){let m=await qe({message:`Directory "./${(0,re.relative)(process.cwd(),a)}" already exists and is not empty. What would you like to do?`,options:[{value:"exit",label:"Do not overwrite this directory and exit"},{value:"replace",label:"Remove contents of this directory"}]});(N(m)||m==="exit")&&(ue("Operation cancelled."),process.exit(0)),m==="replace"&&(c=Y.default.promises.readdir(a).then(O=>Promise.all(O.map(Ee=>Y.default.promises.rm((0,re.join)(a,Ee),{recursive:!0})))))}let h=await qe({message:"Select a starter",options:u.map(m=>{var O;return{label:m.name,value:m.id,hint:(O=m.pkgJson)==null?void 0:O.description}})});N(h)&&(ue("Operation cancelled."),process.exit(0));let l=h,p=await de({message:`Would you like to install ${D} dependencies?`,initialValue:!0});N(p)&&(ue("Operation cancelled."),process.exit(0));let F=await de({message:"Initialize a new git repository?",initialValue:!0});c&&await c;let $=p;if(!$)n.abort();else try{let m=await de({message:"Finishing the install. Wanna hear a joke?",initialValue:!0});if(!N(m)&&m){let[O,Ee]=zt();uu(A(`${O.trim()}
117
+ Hatch who?`,"Bless you!"]];function zt(){let e=Math.floor(Math.random()*au.length);return au[e]}async function cu(){Mu(`Let's create a ${we(" Qwik App ")} \u2728 (v1.2.8)`),await Ot(500);let e="./qwik-app",t=await Nu({message:`Where would you like to create your new project? ${_("(Use '.' or './' for current directory)")}`,placeholder:e})||e;N(t)&&(ue("Operation cancelled."),process.exit(0));let D=R(),r=(await U()).filter(m=>m.type==="app"),i=r.find(m=>m.id==="base"),u=r.filter(m=>m.id!==i.id),n=qt(D,i),a=ou(t.trim());w.info(`Creating new project in ${we(" "+a+" ")} ... \u{1F407}`);let c=null;if(Y.default.existsSync(a)&&Y.default.readdirSync(a).length>0){let m=await qe({message:`Directory "./${(0,re.relative)(process.cwd(),a)}" already exists and is not empty. What would you like to do?`,options:[{value:"exit",label:"Do not overwrite this directory and exit"},{value:"replace",label:"Remove contents of this directory"}]});(N(m)||m==="exit")&&(ue("Operation cancelled."),process.exit(0)),m==="replace"&&(c=Y.default.promises.readdir(a).then(O=>Promise.all(O.map(Ee=>Y.default.promises.rm((0,re.join)(a,Ee),{recursive:!0})))))}let h=await qe({message:"Select a starter",options:u.map(m=>{var O;return{label:m.name,value:m.id,hint:(O=m.pkgJson)==null?void 0:O.description}})});N(h)&&(ue("Operation cancelled."),process.exit(0));let l=h,p=await de({message:`Would you like to install ${D} dependencies?`,initialValue:!0});N(p)&&(ue("Operation cancelled."),process.exit(0));let F=await de({message:"Initialize a new git repository?",initialValue:!0});c&&await c;let $=p;if(!$)n.abort();else try{let m=await de({message:"Finishing the install. Wanna hear a joke?",initialValue:!0});if(!N(m)&&m){let[O,Ee]=zt();uu(A(`${O.trim()}
118
118
  ${Ee.trim()}`),"\u{1F648}")}}catch{}let M={starterId:l,outDir:a},W=me();W.start("Creating App...");let ie=await se(M);if(W.stop("App Created \u{1F430}"),F)if(Y.default.existsSync((0,re.join)(a,".git")))w.info("Git has already been initialized before. Skipping...");else{W.start("Git initializing...");try{let m=[];if(m.push(await z("git",["init"],a).install),m.push(await z("git",["add","-A"],a).install),m.push(await z("git",["commit","-m","Initial commit \u26A1\uFE0F"],a).install),m.some(O=>O===!1))throw"";W.stop("Git initialized \u{1F3B2}")}catch{W.stop("Git failed to initialize"),w.error(k("Git failed to initialize. You can do this manually by running: git init"))}}let Z=!1;return $&&(W.start(`Installing ${D} dependencies...`),Z=await n.complete(ie.outDir),Z&&(Z=await te(D,ie.outDir).install),W.stop(`${Z?"Installed":"Failed to install"} ${D} dependencies \u{1F4CB}`)),uu(nu(D,ie,Z),"Result"),Le("Happy coding! \u{1F407}"),ie}async function Fs(){console.clear(),Nt(),ds();try{let e=process.argv.slice(2);e.length>=2?await iu(e[0],e[1]):await cu()}catch(e){G(e.message||e)}}function ds(){let e=process.version,[t,D]=e.replace("v","").split(".");Number(t)<16?(console.error(k(`Qwik requires Node.js 16.8 or higher. You are currently running Node.js ${e}.`)),process.exit(1)):Number(t)===16?Number(D)<8&&console.warn(fu(`Node.js 16.8 or higher is recommended. You are currently running Node.js ${e}.`)):Number(t)===18&&Number(D)<11&&console.error(k(`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`))}0&&(module.exports={createApp,runCli,runCreateCli,runCreateInteractiveCli});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-qwik",
3
3
  "description": "Interactive CLI for create Qwik projects and adding features.",
4
- "version": "1.2.7",
4
+ "version": "1.2.8",
5
5
  "author": "Builder.io Team",
6
6
  "bin": "./create-qwik.cjs",
7
7
  "bugs": "https://github.com/BuilderIO/qwik/issues",
@@ -16,13 +16,13 @@
16
16
  "qwik": "qwik"
17
17
  },
18
18
  "devDependencies": {
19
- "@builder.io/qwik": "^1.2.7",
20
- "@builder.io/qwik-city": "^1.2.7",
19
+ "@builder.io/qwik": "^1.2.8",
20
+ "@builder.io/qwik-city": "^1.2.8",
21
21
  "@types/eslint": "8.44.1",
22
22
  "@types/node": "^20.4.5",
23
23
  "@typescript-eslint/eslint-plugin": "6.2.0",
24
24
  "@typescript-eslint/parser": "6.2.0",
25
- "eslint-plugin-qwik": "^1.2.7",
25
+ "eslint-plugin-qwik": "^1.2.8",
26
26
  "eslint": "8.45.0",
27
27
  "undici": "5.22.1",
28
28
  "prettier": "3.0.0",
@@ -27,6 +27,10 @@ export const RouterHead = component$(() => {
27
27
  {head.styles.map((s) => (
28
28
  <style key={s.key} {...s.props} dangerouslySetInnerHTML={s.style} />
29
29
  ))}
30
+
31
+ {head.scripts.map((s) => (
32
+ <script {...s.props} dangerouslySetInnerHTML={s.script} />
33
+ ))}
30
34
  </>
31
35
  );
32
36
  });
@@ -27,12 +27,13 @@
27
27
  "fmt": "prettier --write .",
28
28
  "fmt.check": "prettier --check .",
29
29
  "lint": "eslint \"src/**/*.ts*\"",
30
+ "test": "echo \"No test specified\" && exit 0",
30
31
  "start": "vite --open --mode ssr",
31
32
  "qwik": "qwik",
32
33
  "release": "np"
33
34
  },
34
35
  "devDependencies": {
35
- "@builder.io/qwik": "1.2.7",
36
+ "@builder.io/qwik": "1.2.8",
36
37
  "@types/eslint": "8.44.1",
37
38
  "@types/node": "^20.4.5",
38
39
  "@typescript-eslint/eslint-plugin": "6.2.0",