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.16-12 to 0.0.16-13

starters/apps/base/vite.config.ts

12

index.js

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

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

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

@@ -6,12 +6,15 @@ {

"scripts": {
"build": "npm run build.client && npm run build.server",
"typecheck": "npx tsc --noEmit",
"build": "npm run typecheck && npm run build.client && npm run build.server",
"build.client": "vite build",
"build.server": "vite build --outDir server/build --ssr src/entry.server.tsx",
"preview": "vite preview",
"dev": "vite",
"dev.client": "vite --mode clientonly",
"start": "npm run dev"
},
"devDependencies": {
"@builder.io/qwik": "0.0.16-12",
"typescript": "^4.5.2",
"vite": "2.7.13"
"@builder.io/qwik": "0.0.16-13",
"typescript": "4.5.5",
"vite": "2.8.0"
},

@@ -18,0 +21,0 @@ "author": "Builder.io Team",

@@ -1,29 +0,8 @@

/* Allows Typescript to import .css files */
declare module '*.css' {
const content: string;
export default content;
}
/**
* Add custom global types in this file
*/
/* Allows Typescript to import .gif files */
declare module '*.gif' {
const content: string;
export default content;
}
/* Allows Typescript to import .jpg files */
declare module '*.jpg' {
const content: string;
export default content;
}
/* Allows Typescript to import .png files */
declare module '*.png' {
const content: string;
export default content;
}
/* Allows Typescript to import .svg files */
declare module '*.svg' {
const content: string;
export default content;
}
// declare module '*.css' {
// const content: string;
// export default content;
// }

@@ -13,5 +13,7 @@ {

"skipLibCheck": true,
"incremental": true
"incremental": true,
"isolatedModules": true,
"types": ["vite/client"]
},
"include": ["src"]
}
{
"description": "Cloudflare Workers (serverless).",
"description": "Cloudflare Pages (serverless).",
"scripts": {
"build.server": "vite build --outDir server/build --ssr src/entry.cloudflare.tsx",
"deploy": "wrangler publish",
"deploy.preview": "wrangler preview",
"deploy.dev": "wrangler dev"
"build.server": "vite build --outDir server/build --ssr src/entry.cloudflare.tsx"
},
"devDependencies": {
"@cloudflare/kv-asset-handler": "0.2.0",
"@cloudflare/workers-types": "3.2.0",
"@cloudflare/wrangler": "1.19.7",
"@types/service-worker-mock": "2.0.1"
"@cloudflare/workers-types": "3.2.0"
},

@@ -15,0 +9,0 @@ "qwik": {

{
"description": "Express.js server.",
"scripts": {
"serve": "node server/index.js"
"build.client": "vite build --outDir server/public",
"build.server": "vite build --outDir server/build --ssr src/entry.express.tsx",
"serve": "node server/build/entry.express.js"
},

@@ -6,0 +8,0 @@ "devDependencies": {

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

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

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