Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-qwik

Package Overview
Dependencies
Maintainers
4
Versions
294
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-qwik - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16-12

starters/apps/base/index.html

10

index.js

@@ -7,3 +7,9 @@ /**

*/
var J=Object.create;var y=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var w=e=>y(e,"__esModule",{value:!0});var L=(e,r)=>{w(e);for(var t in r)y(e,t,{get:r[t],enumerable:!0})},F=(e,r,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of R(r))!O.call(e,o)&&o!=="default"&&y(e,o,{get:()=>r[o],enumerable:!(t=N(r,o))||t.enumerable});return e},u=e=>F(w(y(e!=null?J(E(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);L(exports,{generateStarter:()=>I,getStarters:()=>x});var S=u(require("fs"));var a=u(require("fs")),m=u(require("path"));function T(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var D=function(r){T(r);let t=-1,o=0,i=-1,n=!0,s=0;for(let l=r.length-1;l>=0;--l){let f=r.charCodeAt(l);if(f===47){if(!n){o=l+1;break}continue}i===-1&&(n=!1,i=l+1),f===46?t===-1?t=l:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||i===-1||s===0||s===1&&t===i-1&&t===o+1?"":r.slice(t,i)};function h(e,r,t){let o=(0,a.readdirSync)(e);for(let i of o){let n=(0,m.join)(e,i),s=(0,m.join)(r,i),l=(0,a.statSync)(n);if(l.isDirectory())(0,a.mkdirSync)(s,{recursive:!0}),h(n,s,t);else if(l.isFile())if(t.length>0&&[".json",".toml",".md",".html"].includes(D(n))){let d=(0,a.readFileSync)(n,"utf8");for(let A of t)d=d.replace(A[0],A[1]);(0,a.writeFileSync)(s,d)}else(0,a.copyFileSync)(n,s)}}function g(e){let r=(0,m.join)(e,"package.json");return JSON.parse((0,a.readFileSync)(r,"utf-8"))}function v(e,r){let t=(0,m.join)(e,"package.json");(0,a.writeFileSync)(t,JSON.stringify(r,null,2)+`
`)}function j(e){return e.toLocaleLowerCase().split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function c(e,r,t){if(r[t]){e[t]?Object.assign(e[t],r[t]):e[t]=r[t];let o={},i=Object.keys(e[t]).sort();for(let n of i)o[n]=e[t][n];e[t]=o}}async function I(e){if(!C(e.projectName))throw new Error("Missing project name");if(!C(e.appId))throw new Error("Missing starter id");if(!C(e.outDir))throw new Error("Missing outDir");(0,S.existsSync)(e.outDir)||(0,S.mkdirSync)(e.outDir,{recursive:!0});let r={projectName:e.projectName,appId:e.appId,serverId:e.serverId||"",outDir:e.outDir},t=await x(),o=t.apps.find(s=>s.id===e.appId),i=t.servers.find(s=>s.id===e.serverId),n=t.features.filter(s=>e.featureIds.includes(s.id));if(o)G(r,o,i,n);else throw new Error(`Invalid starter id "${e.appId}".`);return r}function G(e,r,t,o){let i=[[/\bqwik-project-name\b/g,e.projectName]];h(r.dir,e.outDir,i);let n=g(r.dir);if(t){n.name=e.projectName.toLocaleLowerCase().replace(/ /g,"-"),h(t.dir,e.outDir,i);let s=g(t.dir);c(n,s,"scripts"),c(n,s,"dependencies"),c(n,s,"devDependencies")}for(let s of o){h(s.dir,e.outDir,i);let l=g(s.dir);c(n,l,"scripts"),c(n,l,"dependencies"),c(n,l,"devDependencies")}delete n.priority,v(e.outDir,n)}function C(e){return typeof e=="string"&&e.trim().length>0}var k=u(require("fs")),p=u(require("path"));var P=null;async function x(){return P==null&&(P=_((0,p.join)(__dirname,"starters"))),P}function _(e){return{apps:b(e,"apps"),servers:b(e,"servers"),features:b(e,"features")}}function b(e,r){let t=(0,p.join)(e,r);return(0,k.readdirSync)(t).filter(i=>(0,k.statSync)((0,p.join)(t,i)).isDirectory()).map(i=>{var f,d;let n=(0,p.join)(t,i),s=g(n);return{id:i,name:j(i),description:(f=s.description)!=null?f:"",dir:n,priority:(d=s.priority)!=null?d:0}}).sort((i,n)=>i.priority>n.priority?-1:i.priority<n.priority?1:i.name<n.name?-1:i.name>n.name?1:0)}0&&(module.exports={generateStarter,getStarters});
var z=Object.create;var y=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames,O=Object.getOwnPropertySymbols,V=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var E=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t)=>{for(var r in t||(t={}))N.call(t,r)&&E(e,r,t[r]);if(O)for(var r of O(t))B.call(t,r)&&E(e,r,t[r]);return e};var I=e=>y(e,"__esModule",{value:!0});var K=(e,t)=>{I(e);for(var r in t)y(e,r,{get:t[r],enumerable:!0})},H=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of U(t))!N.call(e,i)&&i!=="default"&&y(e,i,{get:()=>t[i],enumerable:!(r=M(t,i))||r.enumerable});return e},p=e=>H(I(y(e!=null?z(V(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);K(exports,{generateStarter:()=>_,getStarters:()=>A});var g=p(require("fs")),G=p(require("path"));var l=p(require("fs")),x=p(require("path"));function Q(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var R=function(t){Q(t);let r=-1,i=0,o=-1,s=!0,n=0;for(let a=t.length-1;a>=0;--a){let d=t.charCodeAt(a);if(d===47){if(!s){i=a+1;break}continue}o===-1&&(s=!1,o=a+1),d===46?r===-1?r=a:n!==1&&(n=1):r!==-1&&(n=-1)}return r===-1||o===-1||n===0||n===1&&r===o-1&&r===i+1?"":t.slice(r,o)};function h(e,t,r){let i=(0,l.readdirSync)(e);for(let o of i){let s=(0,x.join)(e,o),n=(0,x.join)(t,o),a=(0,l.statSync)(s);if(a.isDirectory())(0,l.mkdirSync)(n,{recursive:!0}),h(s,n,r);else if(a.isFile())if(r.length>0&&[".json",".toml",".md",".html"].includes(R(s))){let c=(0,l.readFileSync)(s,"utf8");for(let u of r)c=c.replace(u[0],u[1]);(0,l.writeFileSync)(n,c)}else(0,l.copyFileSync)(s,n)}}function m(e){let t=(0,x.join)(e,"package.json");return JSON.parse((0,l.readFileSync)(t,"utf-8"))}function F(e,t){let r=(0,x.join)(e,"package.json");(0,l.writeFileSync)(r,JSON.stringify(t,null,2)+`
`)}function L(e){return e.toLocaleLowerCase().split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function T(e){return e.toLocaleLowerCase().replace(/ /g,"-")}function w(e,t){["scripts","dependencies","devDependencies"].forEach(i=>{W(e,t,i)})}function W(e,t,r){if(t[r]){e[r]?Object.assign(e[r],S({},t[r])):e[r]=S({},t[r]);let i={},o=Object.keys(e[r]).sort();for(let s of o)i[s]=e[r][s];e[r]=i}}async function _(e){if(!j(e.projectName))throw new Error("Missing project name");if(!j(e.appId))throw new Error("Missing starter id");if(!j(e.outDir))throw new Error("Missing outDir");(0,g.existsSync)(e.outDir)||(0,g.mkdirSync)(e.outDir,{recursive:!0});let t={projectName:e.projectName,appId:e.appId,serverId:e.serverId,outDir:e.outDir},r=await A(),i=r.apps.find(n=>n.id===e.appId),o=r.servers.find(n=>n.id===e.serverId),s=r.features.filter(n=>e.featureIds.includes(n.id));if(i)X(r,t,i,o,s);else throw new Error(`Invalid starter id "${e.appId}".`);return t}function X(e,t,r,i,o){let s=[[/\bqwik-project-name\b/g,t.projectName]],n=e.apps.find(f=>f.id==="base");if(!n)throw new Error("Unable to find base app.");h(n.dir,t.outDir,s),h(r.dir,t.outDir,s);let a=m(n.dir),d=m(n.dir);w(a,d);let c=[r.description,"Vite.js tooling."];if(i){h(i.dir,t.outDir,s);let f=m(i.dir);w(a,f),f.description&&c.push(f.description)}for(let f of o){h(f.dir,t.outDir,s);let D=m(f.dir);w(a,D),D.description&&c.push(D.description)}a.name=T(t.projectName),a.description=c.join(" ").trim();let u=(0,G.join)(t.outDir,"README.md"),C=(0,g.readFileSync)(u,"utf-8"),k=c.map(f=>`- ${f}`).join(`
`).trim(),$=`# ${t.projectName}
${k}
${C}`;(0,g.writeFileSync)(u,$.trim()+`
`);let q=Y(a);F(t.outDir,q)}function Y(e){e=S({},e);let t={name:e.name,version:e.version,description:e.description,scripts:e.scripts,dependencies:e.dependencies,devDependencies:e.devDependencies};Object.keys(t).forEach(i=>{delete e[i]}),delete e.qwik;let r=Object.keys(e).sort();for(let i of r)t[i]=e[i];return t}function j(e){return typeof e=="string"&&e.trim().length>0}var P=p(require("fs")),b=p(require("path"));var v=null;async function A(){return v==null&&(v=Z((0,b.join)(__dirname,"starters"))),v}function Z(e){return{apps:J(e,"apps"),servers:J(e,"servers"),features:J(e,"features")}}function J(e,t){let r=(0,b.join)(e,t);return(0,P.readdirSync)(r).filter(o=>(0,P.statSync)((0,b.join)(r,o)).isDirectory()).map(o=>{var d,c,u,C,k;let s=(0,b.join)(r,o),n=m(s);return{id:o,name:L(o),description:(d=n.description)!=null?d:"",dir:s,priority:(u=(c=n==null?void 0:n.qwik)==null?void 0:c.priority)!=null?u:0,featureOptions:(k=(C=n==null?void 0:n.qwik)==null?void 0:C.featureOptions)!=null?k:[]}}).sort((o,s)=>o.priority>s.priority?-1:o.priority<s.priority?1:o.name<s.name?-1:o.name>s.name?1:0)}0&&(module.exports={generateStarter,getStarters});

2

package.json
{
"name": "create-qwik",
"version": "0.0.15",
"version": "0.0.16-12",
"description": "Interactive CLI and API for generating Qwik projects.",

@@ -5,0 +5,0 @@ "bin": {

{
"name": "qwik-project-name",
"version": "0.0.1",
"description": "Blank builder starter app",
"scripts": {
"build": "npm run build.client && npm run build.server",
"build.client": "vite build",
"build.server": "vite build --outDir server/build --ssr src/entry.server.tsx",
"start": "npm run dev",
"dev": "vite"
},
"devDependencies": {
"@builder.io/qwik": "0.0.16-10",
"typescript": "^4.5.2",
"vite": "2.7.13"
},
"author": "Builder.io Team",
"license": "MIT",
"engines": {
"node": ">=14.14.0"
"description": "Blank Qwik starter app with Builder.io.",
"qwik": {
"priority": 0,
"featureOptions": [
"prettier",
"tailwindcss"
]
}
}
{
"name": "qwik-project-name",
"version": "0.0.1",
"description": "Blank starter app with Partytown",
"scripts": {
"build": "npm run build.client && npm run build.server",
"build.client": "vite build",
"build.server": "vite build --outDir server/build --ssr src/entry.server.tsx",
"start": "npm run dev",
"dev": "vite"
"description": "Blank Qwik starter app with Partytown.",
"dependencies": {
"@builder.io/partytown": "^0.3.1"
},
"devDependencies": {
"@builder.io/qwik": "0.0.16-10",
"typescript": "4.5.2",
"vite": "2.7.13"
},
"author": "Builder.io Team",
"license": "MIT",
"engines": {
"node": ">=14.14.0"
},
"dependencies": {
"@builder.io/partytown": "^0.0.22"
"qwik": {
"priority": 0,
"featureOptions": [
"prettier",
"tailwindcss"
]
}
}
{
"name": "qwik-project-name",
"version": "0.0.1",
"description": "Blank starter app",
"scripts": {
"build": "npm run build.client && npm run build.server",
"build.client": "vite build",
"build.server": "vite build --outDir server/build --ssr src/entry.server.tsx",
"start": "npm run dev",
"dev": "vite"
},
"devDependencies": {
"@builder.io/qwik": "0.0.16-10",
"typescript": "^4.5.2",
"vite": "2.7.13"
},
"author": "Builder.io Team",
"license": "MIT",
"engines": {
"node": ">=14.14.0"
"description": "Blank Qwik starter app.",
"qwik": {
"priority": 0,
"featureOptions": [
"prettier",
"tailwindcss"
]
}
}
{
"name": "qwik-project-name",
"version": "0.0.1",
"description": "Classic Todo MVC app",
"scripts": {
"build": "npm run build.client && npm run build.server",
"build.client": "vite build",
"build.server": "vite build --outDir server/build --ssr src/entry.server.tsx",
"start": "npm run dev",
"dev": "vite"
},
"devDependencies": {
"@builder.io/qwik": "0.0.16-10",
"typescript": "^4.5.2",
"vite": "2.7.13"
},
"author": "Builder.io Team",
"license": "MIT",
"engines": {
"node": ">=14.14.0"
"description": "Qwik implementation of TodoMVC: https://todomvc.com/.",
"qwik": {
"priority": 0,
"featureOptions": []
}
}
{
"name": "qwik-project-name",
"version": "0.0.1",
"description": "The de facto standard in JS formatting",
"description": "Prettier code formatter.",
"scripts": {

@@ -6,0 +4,0 @@ "fmt": "prettier --write .",

{
"name": "qwik-project-name",
"version": "0.0.1",
"description": "Utility-first CSS framework for rapidly building custom user interfaces",
"description": "Tailwind CSS framework.",
"devDependencies": {

@@ -6,0 +4,0 @@ "autoprefixer": "10.4.2",

{
"name": "qwik-project-name",
"description": "Cloudflare Workers (serverless)",
"priority": -1,
"description": "Cloudflare Workers (serverless).",
"scripts": {

@@ -16,3 +14,6 @@ "build.server": "vite build --outDir server/build --ssr src/entry.cloudflare.tsx",

"@types/service-worker-mock": "2.0.1"
},
"qwik": {
"priority": -1
}
}
{
"name": "qwik-project-name",
"description": "Express.js Server",
"description": "Express.js server.",
"scripts": {

@@ -5,0 +4,0 @@ "serve": "node server/index.js"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc