create-qwik 1.5.1-dev20240330093502 → 1.5.1-dev20240330145203
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 +3 -3
- package/package.json +1 -1
- package/starters/apps/base/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* create-qwik 1.5.1-
|
|
3
|
+
* create-qwik 1.5.1-dev20240330145203
|
|
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
|
|
@@ -160,7 +160,7 @@ ${b.join(`
|
|
|
160
160
|
`;d.forEach(b=>{C+=b}),e.fail(C)}};let D={};o.conflicts=function(c,d){x("<string|object> [array|string]",[c,d],arguments.length),typeof c=="object"?Object.keys(c).forEach(C=>{o.conflicts(C,c[C])}):(n.global(c),D[c]||(D[c]=[]),Array.isArray(d)?d.forEach(C=>o.conflicts(c,C)):D[c].push(d))},o.getConflicting=()=>D,o.conflicting=function(c){Object.keys(c).forEach(d=>{D[d]&&D[d].forEach(C=>{C&&c[d]!==void 0&&c[C]!==void 0&&e.fail(s("Arguments %s and %s are mutually exclusive",d,C))})}),n.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(D).forEach(d=>{D[d].forEach(C=>{C&&c[t.Parser.camelCase(d)]!==void 0&&c[t.Parser.camelCase(C)]!==void 0&&e.fail(s("Arguments %s and %s are mutually exclusive",d,C))})})},o.recommendCommands=function(c,d){d=d.sort((g,O)=>O.length-g.length);let b=null,E=1/0;for(let g=0,O;(O=d[g])!==void 0;g++){let T=Ao(c,O);T<=3&&T<E&&(E=T,b=O)}b&&e.fail(s("Did you mean %s?",b))},o.reset=function(c){return i=Qe(i,d=>!c[d]),D=Qe(D,d=>!c[d]),o};let h=[];return o.freeze=function(){h.push({implied:i,conflicting:D})},o.unfreeze=function(){let c=h.pop();Fe(c,void 0,t),{implied:i,conflicting:D}=c},o}var Rs=[],Ut;function On(n,e,t,s){Ut=s;let r={};if(Object.prototype.hasOwnProperty.call(n,"extends")){if(typeof n.extends!="string")return r;let o=/\.json|\..*rc$/.test(n.extends),i=null;if(o)i=rc(e,n.extends);else try{i=require.resolve(n.extends)}catch{return n}ic(i),Rs.push(i),r=o?JSON.parse(Ut.readFileSync(i,"utf8")):require(n.extends),delete n.extends,r=On(r,Ut.path.dirname(i),t,Ut)}return Rs=[],t?vo(r,n):Object.assign({},r,n)}function ic(n){if(Rs.indexOf(n)>-1)throw new Y(`Circular extended configurations: '${n}'.`)}function rc(n,e){return Ut.path.resolve(n,e)}function vo(n,e){let t={};function s(r){return r&&typeof r=="object"&&!Array.isArray(r)}Object.assign(t,n);for(let r of Object.keys(e))s(e[r])&&s(t[r])?t[r]=vo(n[r],e[r]):t[r]=e[r];return t}var v=function(n,e,t,s,r){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?r.call(n,t):r?r.value=t:e.set(n,t),t},u=function(n,e,t,s){if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!s:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?s:t==="a"?s.call(n):s?s.value:e.get(n)},ae,lt,Vt,_e,we,_n,Xe,Dt,jn,je,Sn,Se,Ne,Ae,Ie,In,Mt,fe,S,Pn,Mn,$e,ht,Wt,ft,et,Wn,W,pt,dt,mt,k,kn,Re,re;function Go(n){return(e=[],t=n.process.cwd(),s)=>{let r=new Qs(e,t,s,n);return Object.defineProperty(r,"argv",{get:()=>r.parse(),enumerable:!0}),r.help(),r.version(),r}}var Bo=Symbol("copyDoubleDash"),Oo=Symbol("copyDoubleDash"),Ls=Symbol("deleteFromParserHintObject"),_o=Symbol("emitWarning"),jo=Symbol("freeze"),So=Symbol("getDollarZero"),gt=Symbol("getParserConfiguration"),Io=Symbol("getUsageConfiguration"),zs=Symbol("guessLocale"),Po=Symbol("guessVersion"),Mo=Symbol("parsePositionalNumbers"),qs=Symbol("pkgUp"),tt=Symbol("populateParserHintArray"),kt=Symbol("populateParserHintSingleValueDictionary"),Hs=Symbol("populateParserHintArrayDictionary"),Us=Symbol("populateParserHintDictionary"),Vs=Symbol("sanitizeKey"),Gs=Symbol("setKey"),Ys=Symbol("unfreeze"),Wo=Symbol("validateAsync"),ko=Symbol("getCommandInstance"),To=Symbol("getContext"),No=Symbol("getHasOutput"),Ro=Symbol("getLoggerInstance"),Lo=Symbol("getParseContext"),zo=Symbol("getUsageInstance"),qo=Symbol("getValidationInstance"),Tn=Symbol("hasParseCallback"),Ho=Symbol("isGlobalContext"),Ct=Symbol("postProcess"),Uo=Symbol("rebase"),Js=Symbol("reset"),Gt=Symbol("runYargsParserAndExecuteCommands"),Ks=Symbol("runValidation"),Vo=Symbol("setHasOutput"),Ft=Symbol("kTrackManuallySetKeys"),Qs=class{constructor(e=[],t,s,r){this.customScriptName=!1,this.parsed=!1,ae.set(this,void 0),lt.set(this,void 0),Vt.set(this,{commands:[],fullCommands:[]}),_e.set(this,null),we.set(this,null),_n.set(this,"show-hidden"),Xe.set(this,null),Dt.set(this,!0),jn.set(this,{}),je.set(this,!0),Sn.set(this,[]),Se.set(this,void 0),Ne.set(this,{}),Ae.set(this,!1),Ie.set(this,null),In.set(this,!0),Mt.set(this,void 0),fe.set(this,""),S.set(this,void 0),Pn.set(this,void 0),Mn.set(this,{}),$e.set(this,null),ht.set(this,null),Wt.set(this,{}),ft.set(this,{}),et.set(this,void 0),Wn.set(this,!1),W.set(this,void 0),pt.set(this,!1),dt.set(this,!1),mt.set(this,!1),k.set(this,void 0),kn.set(this,{}),Re.set(this,null),re.set(this,void 0),v(this,W,r,"f"),v(this,et,e,"f"),v(this,lt,t,"f"),v(this,Pn,s,"f"),v(this,Se,new xn(this),"f"),this.$0=this[So](),this[Js](),v(this,ae,u(this,ae,"f"),"f"),v(this,k,u(this,k,"f"),"f"),v(this,re,u(this,re,"f"),"f"),v(this,S,u(this,S,"f"),"f"),u(this,S,"f").showHiddenOpt=u(this,_n,"f"),v(this,Mt,this[Oo](),"f")}addHelpOpt(e,t){let s="help";return x("[string|boolean] [string]",[e,t],arguments.length),u(this,Ie,"f")&&(this[Ls](u(this,Ie,"f")),v(this,Ie,null,"f")),e===!1&&t===void 0?this:(v(this,Ie,typeof e=="string"?e:s,"f"),this.boolean(u(this,Ie,"f")),this.describe(u(this,Ie,"f"),t||u(this,k,"f").deferY18nLookup("Show help")),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(x("[string|boolean] [string]",[e,t],arguments.length),e===!1&&t===void 0)return this;let s=typeof e=="string"?e:u(this,_n,"f");return this.boolean(s),this.describe(s,t||u(this,k,"f").deferY18nLookup("Show hidden options")),u(this,S,"f").showHiddenOpt=s,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return x("<object|string|array> [string|array]",[e,t],arguments.length),this[Hs](this.alias.bind(this),"alias",e,t),this}array(e){return x("<array|string>",[e],arguments.length),this[tt]("array",e),this[Ft](e),this}boolean(e){return x("<array|string>",[e],arguments.length),this[tt]("boolean",e),this[Ft](e),this}check(e,t){return x("<function> [boolean]",[e,t],arguments.length),this.middleware((s,r)=>ct(()=>e(s,r.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&u(this,k,"f").fail(o.toString(),o):u(this,k,"f").fail(u(this,W,"f").y18n.__("Argument check failed: %s",e.toString())),s),o=>(u(this,k,"f").fail(o.message?o.message:o.toString(),o),s)),!1,t),this}choices(e,t){return x("<object|string|array> [string|array]",[e,t],arguments.length),this[Hs](this.choices.bind(this),"choices",e,t),this}coerce(e,t){if(x("<object|string|array> [function]",[e,t],arguments.length),Array.isArray(e)){if(!t)throw new Y("coerce callback must be provided");for(let s of e)this.coerce(s,t);return this}else if(typeof e=="object"){for(let s of Object.keys(e))this.coerce(s,e[s]);return this}if(!t)throw new Y("coerce callback must be provided");return u(this,S,"f").key[e]=!0,u(this,Se,"f").addCoerceMiddleware((s,r)=>{let o;return Object.prototype.hasOwnProperty.call(s,e)?ct(()=>(o=r.getAliases(),t(s[e])),a=>{s[e]=a;let D=r.getInternalMethods().getParserConfiguration()["strip-aliased"];if(o[e]&&D!==!0)for(let h of o[e])s[h]=a;return s},a=>{throw new Y(a.message)}):s},e),this}conflicts(e,t){return x("<string|object> [string|array]",[e,t],arguments.length),u(this,re,"f").conflicts(e,t),this}config(e="config",t,s){return x("[object|string] [string|function] [function]",[e,t,s],arguments.length),typeof e=="object"&&!Array.isArray(e)?(e=On(e,u(this,lt,"f"),this[gt]()["deep-merge-config"]||!1,u(this,W,"f")),u(this,S,"f").configObjects=(u(this,S,"f").configObjects||[]).concat(e),this):(typeof t=="function"&&(s=t,t=void 0),this.describe(e,t||u(this,k,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(e)?e:[e]).forEach(r=>{u(this,S,"f").config[r]=s||!0}),this)}completion(e,t,s){return x("[string] [string|boolean|function] [function]",[e,t,s],arguments.length),typeof t=="function"&&(s=t,t=void 0),v(this,we,e||u(this,we,"f")||"completion","f"),!t&&t!==!1&&(t="generate completion script"),this.command(u(this,we,"f"),t),s&&u(this,_e,"f").registerFunction(s),this}command(e,t,s,r,o,i){return x("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[e,t,s,r,o,i],arguments.length),u(this,ae,"f").addHandler(e,t,s,r,o,i),this}commands(e,t,s,r,o,i){return this.command(e,t,s,r,o,i)}commandDir(e,t){x("<string> [object]",[e,t],arguments.length);let s=u(this,Pn,"f")||u(this,W,"f").require;return u(this,ae,"f").addDirectory(e,s,u(this,W,"f").getCallerFile(),t),this}count(e){return x("<array|string>",[e],arguments.length),this[tt]("count",e),this[Ft](e),this}default(e,t,s){return x("<object|string|array> [*] [string]",[e,t,s],arguments.length),s&&(Ms(e,u(this,W,"f")),u(this,S,"f").defaultDescription[e]=s),typeof t=="function"&&(Ms(e,u(this,W,"f")),u(this,S,"f").defaultDescription[e]||(u(this,S,"f").defaultDescription[e]=u(this,k,"f").functionDescription(t)),t=t.call()),this[kt](this.default.bind(this),"default",e,t),this}defaults(e,t,s){return this.default(e,t,s)}demandCommand(e=1,t,s,r){return x("[number] [number|string] [string|null|undefined] [string|null|undefined]",[e,t,s,r],arguments.length),typeof t!="number"&&(s=t,t=1/0),this.global("_",!1),u(this,S,"f").demandedCommands._={min:e,max:t,minMsg:s,maxMsg:r},this}demand(e,t,s){return Array.isArray(t)?(t.forEach(r=>{Fe(s,!0,u(this,W,"f")),this.demandOption(r,s)}),t=1/0):typeof t!="number"&&(s=t,t=1/0),typeof e=="number"?(Fe(s,!0,u(this,W,"f")),this.demandCommand(e,t,s,s)):Array.isArray(e)?e.forEach(r=>{Fe(s,!0,u(this,W,"f")),this.demandOption(r,s)}):typeof s=="string"?this.demandOption(e,s):(s===!0||typeof s>"u")&&this.demandOption(e),this}demandOption(e,t){return x("<object|string|array> [string]",[e,t],arguments.length),this[kt](this.demandOption.bind(this),"demandedOptions",e,t),this}deprecateOption(e,t){return x("<string> [string|boolean]",[e,t],arguments.length),u(this,S,"f").deprecatedOptions[e]=t,this}describe(e,t){return x("<object|string|array> [string]",[e,t],arguments.length),this[Gs](e,!0),u(this,k,"f").describe(e,t),this}detectLocale(e){return x("<boolean>",[e],arguments.length),v(this,Dt,e,"f"),this}env(e){return x("[string|boolean]",[e],arguments.length),e===!1?delete u(this,S,"f").envPrefix:u(this,S,"f").envPrefix=e||"",this}epilogue(e){return x("<string>",[e],arguments.length),u(this,k,"f").epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return x("<string|array> [string]",[e,t],arguments.length),Array.isArray(e)?e.forEach(s=>this.example(...s)):u(this,k,"f").example(e,t),this}exit(e,t){v(this,Ae,!0,"f"),v(this,Xe,t,"f"),u(this,je,"f")&&u(this,W,"f").process.exit(e)}exitProcess(e=!0){return x("[boolean]",[e],arguments.length),v(this,je,e,"f"),this}fail(e){if(x("<function|boolean>",[e],arguments.length),typeof e=="boolean"&&e!==!1)throw new Y("Invalid first argument. Expected function or boolean 'false'");return u(this,k,"f").failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return x("<array> [function]",[e,t],arguments.length),t?u(this,_e,"f").getCompletion(e,t):new Promise((s,r)=>{u(this,_e,"f").getCompletion(e,(o,i)=>{o?r(o):s(i)})})}getDemandedOptions(){return x([],0),u(this,S,"f").demandedOptions}getDemandedCommands(){return x([],0),u(this,S,"f").demandedCommands}getDeprecatedOptions(){return x([],0),u(this,S,"f").deprecatedOptions}getDetectLocale(){return u(this,Dt,"f")}getExitProcess(){return u(this,je,"f")}getGroups(){return Object.assign({},u(this,Ne,"f"),u(this,ft,"f"))}getHelp(){if(v(this,Ae,!0,"f"),!u(this,k,"f").hasCachedHelpMessage()){if(!this.parsed){let t=this[Gt](u(this,et,"f"),void 0,void 0,0,!0);if(J(t))return t.then(()=>u(this,k,"f").help())}let e=u(this,ae,"f").runDefaultBuilderOn(this);if(J(e))return e.then(()=>u(this,k,"f").help())}return Promise.resolve(u(this,k,"f").help())}getOptions(){return u(this,S,"f")}getStrict(){return u(this,pt,"f")}getStrictCommands(){return u(this,dt,"f")}getStrictOptions(){return u(this,mt,"f")}global(e,t){return x("<string|array> [boolean]",[e,t],arguments.length),e=[].concat(e),t!==!1?u(this,S,"f").local=u(this,S,"f").local.filter(s=>e.indexOf(s)===-1):e.forEach(s=>{u(this,S,"f").local.includes(s)||u(this,S,"f").local.push(s)}),this}group(e,t){x("<string|array> <string>",[e,t],arguments.length);let s=u(this,ft,"f")[t]||u(this,Ne,"f")[t];u(this,ft,"f")[t]&&delete u(this,ft,"f")[t];let r={};return u(this,Ne,"f")[t]=(s||[]).concat(e).filter(o=>r[o]?!1:r[o]=!0),this}hide(e){return x("<string>",[e],arguments.length),u(this,S,"f").hiddenOptions.push(e),this}implies(e,t){return x("<string|object> [number|string|array]",[e,t],arguments.length),u(this,re,"f").implies(e,t),this}locale(e){return x("[string]",[e],arguments.length),e===void 0?(this[zs](),u(this,W,"f").y18n.getLocale()):(v(this,Dt,!1,"f"),u(this,W,"f").y18n.setLocale(e),this)}middleware(e,t,s){return u(this,Se,"f").addMiddleware(e,!!t,s)}nargs(e,t){return x("<string|object|array> [number]",[e,t],arguments.length),this[kt](this.nargs.bind(this),"narg",e,t),this}normalize(e){return x("<array|string>",[e],arguments.length),this[tt]("normalize",e),this}number(e){return x("<array|string>",[e],arguments.length),this[tt]("number",e),this[Ft](e),this}option(e,t){if(x("<string|object> [object]",[e,t],arguments.length),typeof e=="object")Object.keys(e).forEach(s=>{this.options(s,e[s])});else{typeof t!="object"&&(t={}),this[Ft](e),u(this,Re,"f")&&(e==="version"||(t==null?void 0:t.alias)==="version")&&this[_o](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
161
161
|
`),void 0,"versionWarning"),u(this,S,"f").key[e]=!0,t.alias&&this.alias(e,t.alias);let s=t.deprecate||t.deprecated;s&&this.deprecateOption(e,s);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption=="string"?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),"default"in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type==="boolean")&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type==="array")&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type==="number")&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type==="string")&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type==="count")&&this.count(e),typeof t.global=="boolean"&&this.global(e,t.global),t.defaultDescription&&(u(this,S,"f").defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let o=t.describe||t.description||t.desc,i=u(this,k,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(i,e)||typeof o=="string")&&this.describe(e,o),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,s){x("[string|array] [function|boolean|object] [function]",[e,t,s],arguments.length),this[jo](),typeof e>"u"&&(e=u(this,et,"f")),typeof t=="object"&&(v(this,ht,t,"f"),t=s),typeof t=="function"&&(v(this,$e,t,"f"),t=!1),t||v(this,et,e,"f"),u(this,$e,"f")&&v(this,je,!1,"f");let r=this[Gt](e,!!t),o=this.parsed;return u(this,_e,"f").setParsed(this.parsed),J(r)?r.then(i=>(u(this,$e,"f")&&u(this,$e,"f").call(this,u(this,Xe,"f"),i,u(this,fe,"f")),i)).catch(i=>{throw u(this,$e,"f")&&u(this,$e,"f")(i,this.parsed.argv,u(this,fe,"f")),i}).finally(()=>{this[Ys](),this.parsed=o}):(u(this,$e,"f")&&u(this,$e,"f").call(this,u(this,Xe,"f"),r,u(this,fe,"f")),this[Ys](),this.parsed=o,r)}parseAsync(e,t,s){let r=this.parse(e,t,s);return J(r)?r:Promise.resolve(r)}parseSync(e,t,s){let r=this.parse(e,t,s);if(J(r))throw new Y(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return r}parserConfiguration(e){return x("<object>",[e],arguments.length),v(this,Mn,e,"f"),this}pkgConf(e,t){x("<string> [string]",[e,t],arguments.length);let s=null,r=this[qs](t||u(this,lt,"f"));return r[e]&&typeof r[e]=="object"&&(s=On(r[e],t||u(this,lt,"f"),this[gt]()["deep-merge-config"]||!1,u(this,W,"f")),u(this,S,"f").configObjects=(u(this,S,"f").configObjects||[]).concat(s)),this}positional(e,t){x("<string> <object>",[e,t],arguments.length);let s=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];t=Qe(t,(i,a)=>i==="type"&&!["string","number","boolean"].includes(a)?!1:s.includes(i));let r=u(this,Vt,"f").fullCommands[u(this,Vt,"f").fullCommands.length-1],o=r?u(this,ae,"f").cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return It(o).forEach(i=>{let a=o[i];Array.isArray(a)?a.indexOf(e)!==-1&&(t[i]=!0):a[e]&&!(i in t)&&(t[i]=a[e])}),this.group(e,u(this,k,"f").getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return x("[boolean]",[e],arguments.length),v(this,Wn,e,"f"),this}required(e,t,s){return this.demand(e,t,s)}require(e,t,s){return this.demand(e,t,s)}requiresArg(e){return x("<array|string|object> [number]",[e],arguments.length),typeof e=="string"&&u(this,S,"f").narg[e]?this:(this[kt](this.requiresArg.bind(this),"narg",e,NaN),this)}showCompletionScript(e,t){return x("[string] [string]",[e,t],arguments.length),e=e||this.$0,u(this,Mt,"f").log(u(this,_e,"f").generateCompletionScript(e,t||u(this,we,"f")||"completion")),this}showHelp(e){if(x("[string|function]",[e],arguments.length),v(this,Ae,!0,"f"),!u(this,k,"f").hasCachedHelpMessage()){if(!this.parsed){let s=this[Gt](u(this,et,"f"),void 0,void 0,0,!0);if(J(s))return s.then(()=>{u(this,k,"f").showHelp(e)}),this}let t=u(this,ae,"f").runDefaultBuilderOn(this);if(J(t))return t.then(()=>{u(this,k,"f").showHelp(e)}),this}return u(this,k,"f").showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return x("[boolean|string] [string]",[e,t],arguments.length),u(this,k,"f").showHelpOnFail(e,t),this}showVersion(e){return x("[string|function]",[e],arguments.length),u(this,k,"f").showVersion(e),this}skipValidation(e){return x("<array|string>",[e],arguments.length),this[tt]("skipValidation",e),this}strict(e){return x("[boolean]",[e],arguments.length),v(this,pt,e!==!1,"f"),this}strictCommands(e){return x("[boolean]",[e],arguments.length),v(this,dt,e!==!1,"f"),this}strictOptions(e){return x("[boolean]",[e],arguments.length),v(this,mt,e!==!1,"f"),this}string(e){return x("<array|string>",[e],arguments.length),this[tt]("string",e),this[Ft](e),this}terminalWidth(){return x([],0),u(this,W,"f").process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return x("<object>",[e],arguments.length),v(this,Dt,!1,"f"),u(this,W,"f").y18n.updateLocale(e),this}usage(e,t,s,r){if(x("<string|null|undefined> [string|boolean] [function|object] [function]",[e,t,s,r],arguments.length),t!==void 0){if(Fe(e,null,u(this,W,"f")),(e||"").match(/^\$0( |$)/))return this.command(e,t,s,r);throw new Y(".usage() description must start with $0 if being used as alias for .command()")}else return u(this,k,"f").usage(e),this}usageConfiguration(e){return x("<object>",[e],arguments.length),v(this,kn,e,"f"),this}version(e,t,s){let r="version";if(x("[boolean|string] [string] [string]",[e,t,s],arguments.length),u(this,Re,"f")&&(this[Ls](u(this,Re,"f")),u(this,k,"f").version(void 0),v(this,Re,null,"f")),arguments.length===0)s=this[Po](),e=r;else if(arguments.length===1){if(e===!1)return this;s=e,e=r}else arguments.length===2&&(s=t,t=void 0);return v(this,Re,typeof e=="string"?e:r,"f"),t=t||u(this,k,"f").deferY18nLookup("Show version number"),u(this,k,"f").version(s||void 0),this.boolean(u(this,Re,"f")),this.describe(u(this,Re,"f"),t),this}wrap(e){return x("<number|null|undefined>",[e],arguments.length),u(this,k,"f").wrap(e),this}[(ae=new WeakMap,lt=new WeakMap,Vt=new WeakMap,_e=new WeakMap,we=new WeakMap,_n=new WeakMap,Xe=new WeakMap,Dt=new WeakMap,jn=new WeakMap,je=new WeakMap,Sn=new WeakMap,Se=new WeakMap,Ne=new WeakMap,Ae=new WeakMap,Ie=new WeakMap,In=new WeakMap,Mt=new WeakMap,fe=new WeakMap,S=new WeakMap,Pn=new WeakMap,Mn=new WeakMap,$e=new WeakMap,ht=new WeakMap,Wt=new WeakMap,ft=new WeakMap,et=new WeakMap,Wn=new WeakMap,W=new WeakMap,pt=new WeakMap,dt=new WeakMap,mt=new WeakMap,k=new WeakMap,kn=new WeakMap,Re=new WeakMap,re=new WeakMap,Bo)](e){if(!e._||!e["--"])return e;e._.push.apply(e._,e["--"]);try{delete e["--"]}catch{}return e}[Oo](){return{log:(...e)=>{this[Tn]()||console.log(...e),v(this,Ae,!0,"f"),u(this,fe,"f").length&&v(this,fe,u(this,fe,"f")+`
|
|
162
162
|
`,"f"),v(this,fe,u(this,fe,"f")+e.join(" "),"f")},error:(...e)=>{this[Tn]()||console.error(...e),v(this,Ae,!0,"f"),u(this,fe,"f").length&&v(this,fe,u(this,fe,"f")+`
|
|
163
|
-
`,"f"),v(this,fe,u(this,fe,"f")+e.join(" "),"f")}}}[Ls](e){It(u(this,S,"f")).forEach(t=>{if((r=>r==="configObjects")(t))return;let s=u(this,S,"f")[t];Array.isArray(s)?s.includes(e)&&s.splice(s.indexOf(e),1):typeof s=="object"&&delete s[e]}),delete u(this,k,"f").getDescriptions()[e]}[_o](e,t,s){u(this,jn,"f")[s]||(u(this,W,"f").process.emitWarning(e,t),u(this,jn,"f")[s]=!0)}[jo](){u(this,Sn,"f").push({options:u(this,S,"f"),configObjects:u(this,S,"f").configObjects.slice(0),exitProcess:u(this,je,"f"),groups:u(this,Ne,"f"),strict:u(this,pt,"f"),strictCommands:u(this,dt,"f"),strictOptions:u(this,mt,"f"),completionCommand:u(this,we,"f"),output:u(this,fe,"f"),exitError:u(this,Xe,"f"),hasOutput:u(this,Ae,"f"),parsed:this.parsed,parseFn:u(this,$e,"f"),parseContext:u(this,ht,"f")}),u(this,k,"f").freeze(),u(this,re,"f").freeze(),u(this,ae,"f").freeze(),u(this,Se,"f").freeze()}[So](){let e="",t;return/\b(node|iojs|electron)(\.exe)?$/.test(u(this,W,"f").process.argv()[0])?t=u(this,W,"f").process.argv().slice(1,2):t=u(this,W,"f").process.argv().slice(0,1),e=t.map(s=>{let r=this[Uo](u(this,lt,"f"),s);return s.match(/^(\/|([a-zA-Z]:)?\\)/)&&r.length<s.length?r:s}).join(" ").trim(),u(this,W,"f").getEnv("_")&&u(this,W,"f").getProcessArgvBin()===u(this,W,"f").getEnv("_")&&(e=u(this,W,"f").getEnv("_").replace(`${u(this,W,"f").path.dirname(u(this,W,"f").process.execPath())}/`,"")),e}[gt](){return u(this,Mn,"f")}[Io](){return u(this,kn,"f")}[zs](){if(!u(this,Dt,"f"))return;let e=u(this,W,"f").getEnv("LC_ALL")||u(this,W,"f").getEnv("LC_MESSAGES")||u(this,W,"f").getEnv("LANG")||u(this,W,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Po](){return this[qs]().version||"unknown"}[Mo](e){let t=e["--"]?e["--"]:e._;for(let s=0,r;(r=t[s])!==void 0;s++)u(this,W,"f").Parser.looksLikeNumber(r)&&Number.isSafeInteger(Math.floor(parseFloat(`${r}`)))&&(t[s]=Number(r));return e}[qs](e){let t=e||"*";if(u(this,Wt,"f")[t])return u(this,Wt,"f")[t];let s={};try{let r=e||u(this,W,"f").mainFilename;!e&&u(this,W,"f").path.extname(r)&&(r=u(this,W,"f").path.dirname(r));let o=u(this,W,"f").findUp(r,(i,a)=>{if(a.includes("package.json"))return"package.json"});Fe(o,void 0,u(this,W,"f")),s=JSON.parse(u(this,W,"f").readFileSync(o,"utf8"))}catch{}return u(this,Wt,"f")[t]=s||{},u(this,Wt,"f")[t]}[tt](e,t){t=[].concat(t),t.forEach(s=>{s=this[Vs](s),u(this,S,"f")[e].push(s)})}[kt](e,t,s,r){this[Us](e,t,s,r,(o,i,a)=>{u(this,S,"f")[o][i]=a})}[Hs](e,t,s,r){this[Us](e,t,s,r,(o,i,a)=>{u(this,S,"f")[o][i]=(u(this,S,"f")[o][i]||[]).concat(a)})}[Us](e,t,s,r,o){if(Array.isArray(s))s.forEach(i=>{e(i,r)});else if((i=>typeof i=="object")(s))for(let i of It(s))e(i,s[i]);else o(t,this[Vs](s),r)}[Vs](e){return e==="__proto__"?"___proto___":e}[Gs](e,t){return this[kt](this[Gs].bind(this),"key",e,t),this}[Ys](){var e,t,s,r,o,i,a,D,h,f,c,d;let C=u(this,Sn,"f").pop();Fe(C,void 0,u(this,W,"f"));let b;e=this,t=this,s=this,r=this,o=this,i=this,a=this,D=this,h=this,f=this,c=this,d=this,{options:{set value(E){v(e,S,E,"f")}}.value,configObjects:b,exitProcess:{set value(E){v(t,je,E,"f")}}.value,groups:{set value(E){v(s,Ne,E,"f")}}.value,output:{set value(E){v(r,fe,E,"f")}}.value,exitError:{set value(E){v(o,Xe,E,"f")}}.value,hasOutput:{set value(E){v(i,Ae,E,"f")}}.value,parsed:this.parsed,strict:{set value(E){v(a,pt,E,"f")}}.value,strictCommands:{set value(E){v(D,dt,E,"f")}}.value,strictOptions:{set value(E){v(h,mt,E,"f")}}.value,completionCommand:{set value(E){v(f,we,E,"f")}}.value,parseFn:{set value(E){v(c,$e,E,"f")}}.value,parseContext:{set value(E){v(d,ht,E,"f")}}.value}=C,u(this,S,"f").configObjects=b,u(this,k,"f").unfreeze(),u(this,re,"f").unfreeze(),u(this,ae,"f").unfreeze(),u(this,Se,"f").unfreeze()}[Wo](e,t){return ct(t,s=>(e(s),s))}getInternalMethods(){return{getCommandInstance:this[ko].bind(this),getContext:this[To].bind(this),getHasOutput:this[No].bind(this),getLoggerInstance:this[Ro].bind(this),getParseContext:this[Lo].bind(this),getParserConfiguration:this[gt].bind(this),getUsageConfiguration:this[Io].bind(this),getUsageInstance:this[zo].bind(this),getValidationInstance:this[qo].bind(this),hasParseCallback:this[Tn].bind(this),isGlobalContext:this[Ho].bind(this),postProcess:this[Ct].bind(this),reset:this[Js].bind(this),runValidation:this[Ks].bind(this),runYargsParserAndExecuteCommands:this[Gt].bind(this),setHasOutput:this[Vo].bind(this)}}[ko](){return u(this,ae,"f")}[To](){return u(this,Vt,"f")}[No](){return u(this,Ae,"f")}[Ro](){return u(this,Mt,"f")}[Lo](){return u(this,ht,"f")||{}}[zo](){return u(this,k,"f")}[qo](){return u(this,re,"f")}[Tn](){return!!u(this,$e,"f")}[Ho](){return u(this,In,"f")}[Ct](e,t,s,r){return s||J(e)||(t||(e=this[Bo](e)),(this[gt]()["parse-positional-numbers"]||this[gt]()["parse-positional-numbers"]===void 0)&&(e=this[Mo](e)),r&&(e=at(e,this,u(this,Se,"f").getMiddleware(),!1))),e}[Js](e={}){v(this,S,u(this,S,"f")||{},"f");let t={};t.local=u(this,S,"f").local||[],t.configObjects=u(this,S,"f").configObjects||[];let s={};t.local.forEach(i=>{s[i]=!0,(e[i]||[]).forEach(a=>{s[a]=!0})}),Object.assign(u(this,ft,"f"),Object.keys(u(this,Ne,"f")).reduce((i,a)=>{let D=u(this,Ne,"f")[a].filter(h=>!(h in s));return D.length>0&&(i[a]=D),i},{})),v(this,Ne,{},"f");let r=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return r.forEach(i=>{t[i]=(u(this,S,"f")[i]||[]).filter(a=>!s[a])}),o.forEach(i=>{t[i]=Qe(u(this,S,"f")[i],a=>!s[a])}),t.envPrefix=u(this,S,"f").envPrefix,v(this,S,t,"f"),v(this,k,u(this,k,"f")?u(this,k,"f").reset(s):bo(this,u(this,W,"f")),"f"),v(this,re,u(this,re,"f")?u(this,re,"f").reset(s):xo(this,u(this,k,"f"),u(this,W,"f")),"f"),v(this,ae,u(this,ae,"f")?u(this,ae,"f").reset():go(u(this,k,"f"),u(this,re,"f"),u(this,Se,"f"),u(this,W,"f")),"f"),u(this,_e,"f")||v(this,_e,wo(this,u(this,k,"f"),u(this,ae,"f"),u(this,W,"f")),"f"),u(this,Se,"f").reset(),v(this,we,null,"f"),v(this,fe,"","f"),v(this,Xe,null,"f"),v(this,Ae,!1,"f"),this.parsed=!1,this}[Uo](e,t){return u(this,W,"f").path.relative(e,t)}[Gt](e,t,s,r=0,o=!1){let i=!!s||o;e=e||u(this,et,"f"),u(this,S,"f").__=u(this,W,"f").y18n.__,u(this,S,"f").configuration=this[gt]();let a=!!u(this,S,"f").configuration["populate--"],D=Object.assign({},u(this,S,"f").configuration,{"populate--":!0}),h=u(this,W,"f").Parser.detailed(e,Object.assign({},u(this,S,"f"),{configuration:{"parse-positional-numbers":!1,...D}})),f=Object.assign(h.argv,u(this,ht,"f")),c,d=h.aliases,C=!1,b=!1;Object.keys(f).forEach(E=>{E===u(this,Ie,"f")&&f[E]?C=!0:E===u(this,Re,"f")&&f[E]&&(b=!0)}),f.$0=this.$0,this.parsed=h,r===0&&u(this,k,"f").clearCachedHelpMessage();try{if(this[zs](),t)return this[Ct](f,a,!!s,!1);u(this,Ie,"f")&&[u(this,Ie,"f")].concat(d[u(this,Ie,"f")]||[]).filter(H=>H.length>1).includes(""+f._[f._.length-1])&&(f._.pop(),C=!0),v(this,In,!1,"f");let E=u(this,ae,"f").getCommands(),g=u(this,_e,"f").completionKey in f,O=C||g||o;if(f._.length){if(E.length){let T;for(let H=r||0,L;f._[H]!==void 0;H++)if(L=String(f._[H]),E.includes(L)&&L!==u(this,we,"f")){let U=u(this,ae,"f").runCommand(L,this,h,H+1,o,C||b||o);return this[Ct](U,a,!!s,!1)}else if(!T&&L!==u(this,we,"f")){T=L;break}!u(this,ae,"f").hasDefaultCommand()&&u(this,Wn,"f")&&T&&!O&&u(this,re,"f").recommendCommands(T,E)}u(this,we,"f")&&f._.includes(u(this,we,"f"))&&!g&&(u(this,je,"f")&&Ze(!0),this.showCompletionScript(),this.exit(0))}if(u(this,ae,"f").hasDefaultCommand()&&!O){let T=u(this,ae,"f").runCommand(null,this,h,0,o,C||b||o);return this[Ct](T,a,!!s,!1)}if(g){u(this,je,"f")&&Ze(!0),e=[].concat(e);let T=e.slice(e.indexOf(`--${u(this,_e,"f").completionKey}`)+1);return u(this,_e,"f").getCompletion(T,(H,L)=>{if(H)throw new Y(H.message);(L||[]).forEach(U=>{u(this,Mt,"f").log(U)}),this.exit(0)}),this[Ct](f,!a,!!s,!1)}if(u(this,Ae,"f")||(C?(u(this,je,"f")&&Ze(!0),i=!0,this.showHelp("log"),this.exit(0)):b&&(u(this,je,"f")&&Ze(!0),i=!0,u(this,k,"f").showVersion("log"),this.exit(0))),!i&&u(this,S,"f").skipValidation.length>0&&(i=Object.keys(f).some(T=>u(this,S,"f").skipValidation.indexOf(T)>=0&&f[T]===!0)),!i){if(h.error)throw new Y(h.error.message);if(!g){let T=this[Ks](d,{},h.error);s||(c=at(f,this,u(this,Se,"f").getMiddleware(),!0)),c=this[Wo](T,c??f),J(c)&&!s&&(c=c.then(()=>at(f,this,u(this,Se,"f").getMiddleware(),!1)))}}}catch(E){if(E instanceof Y)u(this,k,"f").fail(E.message,E);else throw E}return this[Ct](c??f,a,!!s,!0)}[Ks](e,t,s,r){let o={...this.getDemandedOptions()};return i=>{if(s)throw new Y(s.message);u(this,re,"f").nonOptionCount(i),u(this,re,"f").requiredArguments(i,o);let a=!1;u(this,dt,"f")&&(a=u(this,re,"f").unknownCommands(i)),u(this,pt,"f")&&!a?u(this,re,"f").unknownArguments(i,e,t,!!r):u(this,mt,"f")&&u(this,re,"f").unknownArguments(i,e,{},!1,!1),u(this,re,"f").limitedChoices(i),u(this,re,"f").implications(i),u(this,re,"f").conflicting(i)}}[Vo](){v(this,Ae,!0,"f")}[Ft](e){if(typeof e=="string")u(this,S,"f").key[e]=!0;else for(let t of e)u(this,S,"f").key[t]=!0}};function Co(n){return!!n&&typeof n.getInternalMethods=="function"}var oc=Go(Do),Yo=oc;function uc(n,e){return Yo(n).strict().command("* <template> <outDir>","Create a new project powered by qwik",s=>s.positional("template",{type:"string",desc:"Starter template",choices:e}).positional("outDir",{type:"string",desc:"Directory of the project"}).option("force",{alias:"f",type:"boolean",default:!1,desc:"Overwrite target directory if it exists"}).option("installDeps",{alias:"i",default:!1,type:"boolean",desc:"Install dependencies"}).usage("npm create qwik@latest base ./my-project <options>")).argv}async function Xs(...n){let e=Je(),t=await Ot("app"),s=t.standaloneTemplates.map(({id:d})=>d),r=uc(n,s),{force:o,installDeps:i,template:a}=r,D=r.outDir;nn(`Let's create a ${Rt(" Qwik App ")} \u2728 (v1.5.1-dev20240330093502)`),ac()?D=process.cwd():(D=gn(D),Zs.default.existsSync(D)&&Zs.default.readdirSync(D).length>0&&(o?await rn(D):(te.error(`Directory "${D}" already exists.`),te.info("Please either remove this directory, choose another location or run the command again with '--force | -f' flag."),rt(),process.exit(1))));let h=await _t({outDir:D,appId:a,pkgManager:e,templateManager:t}),f=At(),c=!1;return i&&(c=await dn(async()=>await ot(e,D).install,{pkgManager:e,spinner:f})),mn(e,h,c),h}function ac(){return cc()}function cc(){try{return process.cwd().startsWith("/home/projects/")}catch{}return!1}var Rn=require("node:path");var Nn=ce(require("node:fs"));var ei=[["Dad, can you put my shoes on?","I don't think they'll fit me."],["What do ghosts call their true love?","Their ghoul-friend"],["How do the trees get on the internet?","They log on."],["Lady: How do I spread love in this cruel world?","Random Dude: [...\u{1F498}]"],["How do you find Will Smith in the snow?"," Look for fresh prints."],["Why did the mushroom get invited to the party?","Because he was a fungi."],["Why is peter pan always flying?","Because he neverlands"],["How do you know if there\u2019s an elephant under your bed?","Your head hits the ceiling!"],["How do you fix a broken pizza?","With tomato paste."],["Why did the butcher work extra hours at the shop?","To make ends meat."],["What time is it?","I don't know... it keeps changing."],["What did the traffic light say to the car as it passed?","Don't look I'm changing!"],["What do you call someone with no nose?","Nobody knows."],["Why did the worker get fired from the orange juice factory?","Lack of concentration."],["What did the say to the ?","Nice belt."],["What animal is always at a game of cricket?","A bat."],["Why did the tomato blush?","Because it saw the salad dressing."],["What\u2019s E.T. short for?","He\u2019s only got little legs."],["What did the beaver say to the tree?","It's been nice gnawing you."],["What do you call a girl between two posts?","Annette."],["What do you call a boomerang that won't come back?","A stick."],["What do you do on a remote island?","Try and find the TV island it belongs to."],["Why did the barber win the race?","He took a short cut."],["Do you want a brief explanation of what an acorn is?","In a nutshell, it's an oak tree."],["What do you call a belt made out of watches?","A waist of time."],["How many lips does a flower have?","Tulips"],["Did you hear about the guy who invented Lifesavers?","They say he made a mint."],["I Got Hit In the Head By A Soda Can, But It Didn't Hurt That Much...","It was a soft drink."],["When a dad drives past a graveyard: Did you know that's a popular cemetery?","Yep, people are just dying to get in there"],["What did the fish say when it hit the wall?","Dam."],["Want to hear a joke about a piece of paper?","Never mind...it's tearable"],["What did the big flower say to the littler flower?","Hi, bud!"],["What's the best thing about elevator jokes?","They work on so many levels."],["Why can't your nose be inches long?","Because then it'd be a foot!"],["Why does Superman get invited to dinners?","Because he is a Supperhero."],["What's red and bad for your teeth?","A Brick."],["What's the difference between a guitar and a fish?",`You can tune a guitar but you can't "tuna" fish!`],["Why did the coffee file a police report?","It got mugged."],["What do you do when you see a space man?","Park your car, man."],["What do you give a sick lemon?","Lemonaid."],["Where do rabbits go after they get married?","On a bunny-moon."],["What creature is smarter than a talking parrot?","A spelling bee."],["How does the moon cut his hair?","Eclipse it."],["What do you get when you cross a chicken with a skunk?","A fowl smell!"],["Why do crabs never give to charity?","Because they\u2019re shellfish."],["did you know the first French fries weren't cooked in France?","they were cooked in Greece"],["Did you hear that the police have a warrant out on a midget psychic ripping people off?",'It reads "Small medium at large."'],["A termite walks into a bar and says...","'Where is the bar tended?'"],["Why do chicken coops only have two doors?","Because if they had four, they would be chicken sedans"],["What's the best thing about a Boolean?","Even if you're wrong, you're only off by a bit."],["If you put a million monkeys at a million keyboards, one of them will eventually write a Java program","the rest of them will write Perl"],["How many programmers does it take to change a lightbulb?","None that's a hardware problem"],["A user interface is like a joke.","If you have to explain it then it is not that good."],["['hip', 'hip']","(hip hip array)"],["A SQL query walks into a bar, walks up to two tables and asks...","'Can I join you?'"],["Which song would an exception sing?","Can't catch me - Avicii"],["Why do C# and Java developers keep breaking their keyboards?","Because they use a strongly typed language."],["What's the object-oriented way to become wealthy?","Inheritance"],["Where do programmers like to hangout?","The Foo Bar."],["Why do Java programmers wear glasses?","Because they don't C#"],["To understand what recursion is...","You must first understand what recursion is"],["The punchline often arrives before the set-up.","Do you know the problem with UDP jokes?"],["Why did the programmer quit his job?","Because he didn't get arrays."],["How do you check if a webpage is HTML?","Try it out on Internet Explorer"],["There are 10 types of people in this world...","Those who understand binary and those who don't"],["Why do programmers always mix up Halloween and Christmas?","Because Oct == Dec "],["I was gonna tell you a joke about UDP...","...but you might not get it."],["How do you get a squirrel to like you"," Act like a nut."],["Why did the math book look so sad"," Because of all of its problems!"],["What's the best way to watch a fly fishing tournament"," Live stream."],["Why couldn't the bicycle stand up by itself"," It was two tired."],["Why did the scarecrow win an award"," Because he was outstanding in his field."],["I ordered a chicken and an egg online. I\u2019ll let you know."," I\u2019ll let you know"],["How do you make a Kleenex dance"," Put a little boogie in it!"],["I'm reading a book about anti-gravity. It's impossible to put down!"," It's impossible to put down!"],["Why can't you hear a psychiatrist using the bathroom"," Because the 'P' is silent."],["I like telling Dad jokes. Sometimes he laughs!"," Sometimes he laughs!"],["I'm so good at sleeping, I can do it with my eyes closed!"," I can do it with my eyes closed!"],["How do you make a tissue dance"," You put a little boogie in it."],["What do you call cheese that isn't yours"," Nacho cheese."],["What kind of shoes do ninjas wear"," Sneakers!"],["What do you call a fake noodle"," An impasta."],["I made a pencil with two erasers. It was pointless."," It was pointless"],["I've got a great joke about construction, but I'm still working on it.",""],["Did I tell you the time I fell in love during a backflip"," I was heels over head!"],["What\u2019s an astronaut\u2019s favorite part of a computer"," The space bar."],["What time did the man go to the dentist"," Tooth hurt-y."],["It's inappropriate to make a 'dad joke' if you're not a dad. It's a faux pa."," It's a faux pa"],["What did the fish say when he hit the wall"," Dam."],["I don't trust stairs. They're always up to something."," They're always up to something"],["What do you call someone with no body and no nose"," Nobody knows."],["Did you hear the rumor about butter"," Well, I'm not going to spread it!"],["I used to hate facial hair...but then it grew on me.",null],["What's brown and sticky"," A stick."],["Can February March"," No, but April May!"],["Don't trust atoms. They make up everything!"," They make up everything!"],["Why don't eggs tell jokes"," They'd crack each other up."],["Did you hear about the circus fire"," It was in tents."],["How do lawyers say goodbye"," We'll be suing ya!"],["When does a joke become a dad joke"," When it becomes apparent."],["Wanna hear a joke about paper"," Never mind\u2014it's tearable."],["What did the coffee report to the police"," A mugging."],["Dad, can you put my shoes on","No, I don't think they'll fit me."],["How many tickles does it take to make an octopus laugh"," Ten tickles."],["Dad, did you get a haircut","No, I got them all cut!"],["My wife is really mad at the fact that I have no sense of direction."," So I packed up my stuff and right!"],["Why do bees have sticky hair"," Because they use a honeycomb."],["Which state has the most streets"," Rhode Island."],["I'm on a seafood diet. I see food and I eat it."," I see food and I eat it"],["Did you hear about the guy who invented the knock-knock joke"," He won the 'no-bell' prize."],["How does a penguin build its house"," Igloos it together."],["What do you call an elephant that doesn't matter"," An irrelephant."],["I wouldn't buy anything with velcro. It's a total rip-off."," It's a total rip-off"],["Dad, can you put the cat out","I didn't know it was on fire."],["What concert costs just 45 cents"," 50 Cent featuring Nickelback!"],["Why are elevator jokes so classic and good"," They work on many levels."],["Is this pool safe for diving"," It deep ends."],[`Knock knock.
|
|
163
|
+
`,"f"),v(this,fe,u(this,fe,"f")+e.join(" "),"f")}}}[Ls](e){It(u(this,S,"f")).forEach(t=>{if((r=>r==="configObjects")(t))return;let s=u(this,S,"f")[t];Array.isArray(s)?s.includes(e)&&s.splice(s.indexOf(e),1):typeof s=="object"&&delete s[e]}),delete u(this,k,"f").getDescriptions()[e]}[_o](e,t,s){u(this,jn,"f")[s]||(u(this,W,"f").process.emitWarning(e,t),u(this,jn,"f")[s]=!0)}[jo](){u(this,Sn,"f").push({options:u(this,S,"f"),configObjects:u(this,S,"f").configObjects.slice(0),exitProcess:u(this,je,"f"),groups:u(this,Ne,"f"),strict:u(this,pt,"f"),strictCommands:u(this,dt,"f"),strictOptions:u(this,mt,"f"),completionCommand:u(this,we,"f"),output:u(this,fe,"f"),exitError:u(this,Xe,"f"),hasOutput:u(this,Ae,"f"),parsed:this.parsed,parseFn:u(this,$e,"f"),parseContext:u(this,ht,"f")}),u(this,k,"f").freeze(),u(this,re,"f").freeze(),u(this,ae,"f").freeze(),u(this,Se,"f").freeze()}[So](){let e="",t;return/\b(node|iojs|electron)(\.exe)?$/.test(u(this,W,"f").process.argv()[0])?t=u(this,W,"f").process.argv().slice(1,2):t=u(this,W,"f").process.argv().slice(0,1),e=t.map(s=>{let r=this[Uo](u(this,lt,"f"),s);return s.match(/^(\/|([a-zA-Z]:)?\\)/)&&r.length<s.length?r:s}).join(" ").trim(),u(this,W,"f").getEnv("_")&&u(this,W,"f").getProcessArgvBin()===u(this,W,"f").getEnv("_")&&(e=u(this,W,"f").getEnv("_").replace(`${u(this,W,"f").path.dirname(u(this,W,"f").process.execPath())}/`,"")),e}[gt](){return u(this,Mn,"f")}[Io](){return u(this,kn,"f")}[zs](){if(!u(this,Dt,"f"))return;let e=u(this,W,"f").getEnv("LC_ALL")||u(this,W,"f").getEnv("LC_MESSAGES")||u(this,W,"f").getEnv("LANG")||u(this,W,"f").getEnv("LANGUAGE")||"en_US";this.locale(e.replace(/[.:].*/,""))}[Po](){return this[qs]().version||"unknown"}[Mo](e){let t=e["--"]?e["--"]:e._;for(let s=0,r;(r=t[s])!==void 0;s++)u(this,W,"f").Parser.looksLikeNumber(r)&&Number.isSafeInteger(Math.floor(parseFloat(`${r}`)))&&(t[s]=Number(r));return e}[qs](e){let t=e||"*";if(u(this,Wt,"f")[t])return u(this,Wt,"f")[t];let s={};try{let r=e||u(this,W,"f").mainFilename;!e&&u(this,W,"f").path.extname(r)&&(r=u(this,W,"f").path.dirname(r));let o=u(this,W,"f").findUp(r,(i,a)=>{if(a.includes("package.json"))return"package.json"});Fe(o,void 0,u(this,W,"f")),s=JSON.parse(u(this,W,"f").readFileSync(o,"utf8"))}catch{}return u(this,Wt,"f")[t]=s||{},u(this,Wt,"f")[t]}[tt](e,t){t=[].concat(t),t.forEach(s=>{s=this[Vs](s),u(this,S,"f")[e].push(s)})}[kt](e,t,s,r){this[Us](e,t,s,r,(o,i,a)=>{u(this,S,"f")[o][i]=a})}[Hs](e,t,s,r){this[Us](e,t,s,r,(o,i,a)=>{u(this,S,"f")[o][i]=(u(this,S,"f")[o][i]||[]).concat(a)})}[Us](e,t,s,r,o){if(Array.isArray(s))s.forEach(i=>{e(i,r)});else if((i=>typeof i=="object")(s))for(let i of It(s))e(i,s[i]);else o(t,this[Vs](s),r)}[Vs](e){return e==="__proto__"?"___proto___":e}[Gs](e,t){return this[kt](this[Gs].bind(this),"key",e,t),this}[Ys](){var e,t,s,r,o,i,a,D,h,f,c,d;let C=u(this,Sn,"f").pop();Fe(C,void 0,u(this,W,"f"));let b;e=this,t=this,s=this,r=this,o=this,i=this,a=this,D=this,h=this,f=this,c=this,d=this,{options:{set value(E){v(e,S,E,"f")}}.value,configObjects:b,exitProcess:{set value(E){v(t,je,E,"f")}}.value,groups:{set value(E){v(s,Ne,E,"f")}}.value,output:{set value(E){v(r,fe,E,"f")}}.value,exitError:{set value(E){v(o,Xe,E,"f")}}.value,hasOutput:{set value(E){v(i,Ae,E,"f")}}.value,parsed:this.parsed,strict:{set value(E){v(a,pt,E,"f")}}.value,strictCommands:{set value(E){v(D,dt,E,"f")}}.value,strictOptions:{set value(E){v(h,mt,E,"f")}}.value,completionCommand:{set value(E){v(f,we,E,"f")}}.value,parseFn:{set value(E){v(c,$e,E,"f")}}.value,parseContext:{set value(E){v(d,ht,E,"f")}}.value}=C,u(this,S,"f").configObjects=b,u(this,k,"f").unfreeze(),u(this,re,"f").unfreeze(),u(this,ae,"f").unfreeze(),u(this,Se,"f").unfreeze()}[Wo](e,t){return ct(t,s=>(e(s),s))}getInternalMethods(){return{getCommandInstance:this[ko].bind(this),getContext:this[To].bind(this),getHasOutput:this[No].bind(this),getLoggerInstance:this[Ro].bind(this),getParseContext:this[Lo].bind(this),getParserConfiguration:this[gt].bind(this),getUsageConfiguration:this[Io].bind(this),getUsageInstance:this[zo].bind(this),getValidationInstance:this[qo].bind(this),hasParseCallback:this[Tn].bind(this),isGlobalContext:this[Ho].bind(this),postProcess:this[Ct].bind(this),reset:this[Js].bind(this),runValidation:this[Ks].bind(this),runYargsParserAndExecuteCommands:this[Gt].bind(this),setHasOutput:this[Vo].bind(this)}}[ko](){return u(this,ae,"f")}[To](){return u(this,Vt,"f")}[No](){return u(this,Ae,"f")}[Ro](){return u(this,Mt,"f")}[Lo](){return u(this,ht,"f")||{}}[zo](){return u(this,k,"f")}[qo](){return u(this,re,"f")}[Tn](){return!!u(this,$e,"f")}[Ho](){return u(this,In,"f")}[Ct](e,t,s,r){return s||J(e)||(t||(e=this[Bo](e)),(this[gt]()["parse-positional-numbers"]||this[gt]()["parse-positional-numbers"]===void 0)&&(e=this[Mo](e)),r&&(e=at(e,this,u(this,Se,"f").getMiddleware(),!1))),e}[Js](e={}){v(this,S,u(this,S,"f")||{},"f");let t={};t.local=u(this,S,"f").local||[],t.configObjects=u(this,S,"f").configObjects||[];let s={};t.local.forEach(i=>{s[i]=!0,(e[i]||[]).forEach(a=>{s[a]=!0})}),Object.assign(u(this,ft,"f"),Object.keys(u(this,Ne,"f")).reduce((i,a)=>{let D=u(this,Ne,"f")[a].filter(h=>!(h in s));return D.length>0&&(i[a]=D),i},{})),v(this,Ne,{},"f");let r=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return r.forEach(i=>{t[i]=(u(this,S,"f")[i]||[]).filter(a=>!s[a])}),o.forEach(i=>{t[i]=Qe(u(this,S,"f")[i],a=>!s[a])}),t.envPrefix=u(this,S,"f").envPrefix,v(this,S,t,"f"),v(this,k,u(this,k,"f")?u(this,k,"f").reset(s):bo(this,u(this,W,"f")),"f"),v(this,re,u(this,re,"f")?u(this,re,"f").reset(s):xo(this,u(this,k,"f"),u(this,W,"f")),"f"),v(this,ae,u(this,ae,"f")?u(this,ae,"f").reset():go(u(this,k,"f"),u(this,re,"f"),u(this,Se,"f"),u(this,W,"f")),"f"),u(this,_e,"f")||v(this,_e,wo(this,u(this,k,"f"),u(this,ae,"f"),u(this,W,"f")),"f"),u(this,Se,"f").reset(),v(this,we,null,"f"),v(this,fe,"","f"),v(this,Xe,null,"f"),v(this,Ae,!1,"f"),this.parsed=!1,this}[Uo](e,t){return u(this,W,"f").path.relative(e,t)}[Gt](e,t,s,r=0,o=!1){let i=!!s||o;e=e||u(this,et,"f"),u(this,S,"f").__=u(this,W,"f").y18n.__,u(this,S,"f").configuration=this[gt]();let a=!!u(this,S,"f").configuration["populate--"],D=Object.assign({},u(this,S,"f").configuration,{"populate--":!0}),h=u(this,W,"f").Parser.detailed(e,Object.assign({},u(this,S,"f"),{configuration:{"parse-positional-numbers":!1,...D}})),f=Object.assign(h.argv,u(this,ht,"f")),c,d=h.aliases,C=!1,b=!1;Object.keys(f).forEach(E=>{E===u(this,Ie,"f")&&f[E]?C=!0:E===u(this,Re,"f")&&f[E]&&(b=!0)}),f.$0=this.$0,this.parsed=h,r===0&&u(this,k,"f").clearCachedHelpMessage();try{if(this[zs](),t)return this[Ct](f,a,!!s,!1);u(this,Ie,"f")&&[u(this,Ie,"f")].concat(d[u(this,Ie,"f")]||[]).filter(H=>H.length>1).includes(""+f._[f._.length-1])&&(f._.pop(),C=!0),v(this,In,!1,"f");let E=u(this,ae,"f").getCommands(),g=u(this,_e,"f").completionKey in f,O=C||g||o;if(f._.length){if(E.length){let T;for(let H=r||0,L;f._[H]!==void 0;H++)if(L=String(f._[H]),E.includes(L)&&L!==u(this,we,"f")){let U=u(this,ae,"f").runCommand(L,this,h,H+1,o,C||b||o);return this[Ct](U,a,!!s,!1)}else if(!T&&L!==u(this,we,"f")){T=L;break}!u(this,ae,"f").hasDefaultCommand()&&u(this,Wn,"f")&&T&&!O&&u(this,re,"f").recommendCommands(T,E)}u(this,we,"f")&&f._.includes(u(this,we,"f"))&&!g&&(u(this,je,"f")&&Ze(!0),this.showCompletionScript(),this.exit(0))}if(u(this,ae,"f").hasDefaultCommand()&&!O){let T=u(this,ae,"f").runCommand(null,this,h,0,o,C||b||o);return this[Ct](T,a,!!s,!1)}if(g){u(this,je,"f")&&Ze(!0),e=[].concat(e);let T=e.slice(e.indexOf(`--${u(this,_e,"f").completionKey}`)+1);return u(this,_e,"f").getCompletion(T,(H,L)=>{if(H)throw new Y(H.message);(L||[]).forEach(U=>{u(this,Mt,"f").log(U)}),this.exit(0)}),this[Ct](f,!a,!!s,!1)}if(u(this,Ae,"f")||(C?(u(this,je,"f")&&Ze(!0),i=!0,this.showHelp("log"),this.exit(0)):b&&(u(this,je,"f")&&Ze(!0),i=!0,u(this,k,"f").showVersion("log"),this.exit(0))),!i&&u(this,S,"f").skipValidation.length>0&&(i=Object.keys(f).some(T=>u(this,S,"f").skipValidation.indexOf(T)>=0&&f[T]===!0)),!i){if(h.error)throw new Y(h.error.message);if(!g){let T=this[Ks](d,{},h.error);s||(c=at(f,this,u(this,Se,"f").getMiddleware(),!0)),c=this[Wo](T,c??f),J(c)&&!s&&(c=c.then(()=>at(f,this,u(this,Se,"f").getMiddleware(),!1)))}}}catch(E){if(E instanceof Y)u(this,k,"f").fail(E.message,E);else throw E}return this[Ct](c??f,a,!!s,!0)}[Ks](e,t,s,r){let o={...this.getDemandedOptions()};return i=>{if(s)throw new Y(s.message);u(this,re,"f").nonOptionCount(i),u(this,re,"f").requiredArguments(i,o);let a=!1;u(this,dt,"f")&&(a=u(this,re,"f").unknownCommands(i)),u(this,pt,"f")&&!a?u(this,re,"f").unknownArguments(i,e,t,!!r):u(this,mt,"f")&&u(this,re,"f").unknownArguments(i,e,{},!1,!1),u(this,re,"f").limitedChoices(i),u(this,re,"f").implications(i),u(this,re,"f").conflicting(i)}}[Vo](){v(this,Ae,!0,"f")}[Ft](e){if(typeof e=="string")u(this,S,"f").key[e]=!0;else for(let t of e)u(this,S,"f").key[t]=!0}};function Co(n){return!!n&&typeof n.getInternalMethods=="function"}var oc=Go(Do),Yo=oc;function uc(n,e){return Yo(n).strict().command("* <template> <outDir>","Create a new project powered by qwik",s=>s.positional("template",{type:"string",desc:"Starter template",choices:e}).positional("outDir",{type:"string",desc:"Directory of the project"}).option("force",{alias:"f",type:"boolean",default:!1,desc:"Overwrite target directory if it exists"}).option("installDeps",{alias:"i",default:!1,type:"boolean",desc:"Install dependencies"}).usage("npm create qwik@latest base ./my-project <options>")).argv}async function Xs(...n){let e=Je(),t=await Ot("app"),s=t.standaloneTemplates.map(({id:d})=>d),r=uc(n,s),{force:o,installDeps:i,template:a}=r,D=r.outDir;nn(`Let's create a ${Rt(" Qwik App ")} \u2728 (v1.5.1-dev20240330145203)`),ac()?D=process.cwd():(D=gn(D),Zs.default.existsSync(D)&&Zs.default.readdirSync(D).length>0&&(o?await rn(D):(te.error(`Directory "${D}" already exists.`),te.info("Please either remove this directory, choose another location or run the command again with '--force | -f' flag."),rt(),process.exit(1))));let h=await _t({outDir:D,appId:a,pkgManager:e,templateManager:t}),f=At(),c=!1;return i&&(c=await dn(async()=>await ot(e,D).install,{pkgManager:e,spinner:f})),mn(e,h,c),h}function ac(){return cc()}function cc(){try{return process.cwd().startsWith("/home/projects/")}catch{}return!1}var Rn=require("node:path");var Nn=ce(require("node:fs"));var ei=[["Dad, can you put my shoes on?","I don't think they'll fit me."],["What do ghosts call their true love?","Their ghoul-friend"],["How do the trees get on the internet?","They log on."],["Lady: How do I spread love in this cruel world?","Random Dude: [...\u{1F498}]"],["How do you find Will Smith in the snow?"," Look for fresh prints."],["Why did the mushroom get invited to the party?","Because he was a fungi."],["Why is peter pan always flying?","Because he neverlands"],["How do you know if there\u2019s an elephant under your bed?","Your head hits the ceiling!"],["How do you fix a broken pizza?","With tomato paste."],["Why did the butcher work extra hours at the shop?","To make ends meat."],["What time is it?","I don't know... it keeps changing."],["What did the traffic light say to the car as it passed?","Don't look I'm changing!"],["What do you call someone with no nose?","Nobody knows."],["Why did the worker get fired from the orange juice factory?","Lack of concentration."],["What did the say to the ?","Nice belt."],["What animal is always at a game of cricket?","A bat."],["Why did the tomato blush?","Because it saw the salad dressing."],["What\u2019s E.T. short for?","He\u2019s only got little legs."],["What did the beaver say to the tree?","It's been nice gnawing you."],["What do you call a girl between two posts?","Annette."],["What do you call a boomerang that won't come back?","A stick."],["What do you do on a remote island?","Try and find the TV island it belongs to."],["Why did the barber win the race?","He took a short cut."],["Do you want a brief explanation of what an acorn is?","In a nutshell, it's an oak tree."],["What do you call a belt made out of watches?","A waist of time."],["How many lips does a flower have?","Tulips"],["Did you hear about the guy who invented Lifesavers?","They say he made a mint."],["I Got Hit In the Head By A Soda Can, But It Didn't Hurt That Much...","It was a soft drink."],["When a dad drives past a graveyard: Did you know that's a popular cemetery?","Yep, people are just dying to get in there"],["What did the fish say when it hit the wall?","Dam."],["Want to hear a joke about a piece of paper?","Never mind...it's tearable"],["What did the big flower say to the littler flower?","Hi, bud!"],["What's the best thing about elevator jokes?","They work on so many levels."],["Why can't your nose be inches long?","Because then it'd be a foot!"],["Why does Superman get invited to dinners?","Because he is a Supperhero."],["What's red and bad for your teeth?","A Brick."],["What's the difference between a guitar and a fish?",`You can tune a guitar but you can't "tuna" fish!`],["Why did the coffee file a police report?","It got mugged."],["What do you do when you see a space man?","Park your car, man."],["What do you give a sick lemon?","Lemonaid."],["Where do rabbits go after they get married?","On a bunny-moon."],["What creature is smarter than a talking parrot?","A spelling bee."],["How does the moon cut his hair?","Eclipse it."],["What do you get when you cross a chicken with a skunk?","A fowl smell!"],["Why do crabs never give to charity?","Because they\u2019re shellfish."],["did you know the first French fries weren't cooked in France?","they were cooked in Greece"],["Did you hear that the police have a warrant out on a midget psychic ripping people off?",'It reads "Small medium at large."'],["A termite walks into a bar and says...","'Where is the bar tended?'"],["Why do chicken coops only have two doors?","Because if they had four, they would be chicken sedans"],["What's the best thing about a Boolean?","Even if you're wrong, you're only off by a bit."],["If you put a million monkeys at a million keyboards, one of them will eventually write a Java program","the rest of them will write Perl"],["How many programmers does it take to change a lightbulb?","None that's a hardware problem"],["A user interface is like a joke.","If you have to explain it then it is not that good."],["['hip', 'hip']","(hip hip array)"],["A SQL query walks into a bar, walks up to two tables and asks...","'Can I join you?'"],["Which song would an exception sing?","Can't catch me - Avicii"],["Why do C# and Java developers keep breaking their keyboards?","Because they use a strongly typed language."],["What's the object-oriented way to become wealthy?","Inheritance"],["Where do programmers like to hangout?","The Foo Bar."],["Why do Java programmers wear glasses?","Because they don't C#"],["To understand what recursion is...","You must first understand what recursion is"],["The punchline often arrives before the set-up.","Do you know the problem with UDP jokes?"],["Why did the programmer quit his job?","Because he didn't get arrays."],["How do you check if a webpage is HTML?","Try it out on Internet Explorer"],["There are 10 types of people in this world...","Those who understand binary and those who don't"],["Why do programmers always mix up Halloween and Christmas?","Because Oct == Dec "],["I was gonna tell you a joke about UDP...","...but you might not get it."],["How do you get a squirrel to like you"," Act like a nut."],["Why did the math book look so sad"," Because of all of its problems!"],["What's the best way to watch a fly fishing tournament"," Live stream."],["Why couldn't the bicycle stand up by itself"," It was two tired."],["Why did the scarecrow win an award"," Because he was outstanding in his field."],["I ordered a chicken and an egg online. I\u2019ll let you know."," I\u2019ll let you know"],["How do you make a Kleenex dance"," Put a little boogie in it!"],["I'm reading a book about anti-gravity. It's impossible to put down!"," It's impossible to put down!"],["Why can't you hear a psychiatrist using the bathroom"," Because the 'P' is silent."],["I like telling Dad jokes. Sometimes he laughs!"," Sometimes he laughs!"],["I'm so good at sleeping, I can do it with my eyes closed!"," I can do it with my eyes closed!"],["How do you make a tissue dance"," You put a little boogie in it."],["What do you call cheese that isn't yours"," Nacho cheese."],["What kind of shoes do ninjas wear"," Sneakers!"],["What do you call a fake noodle"," An impasta."],["I made a pencil with two erasers. It was pointless."," It was pointless"],["I've got a great joke about construction, but I'm still working on it.",""],["Did I tell you the time I fell in love during a backflip"," I was heels over head!"],["What\u2019s an astronaut\u2019s favorite part of a computer"," The space bar."],["What time did the man go to the dentist"," Tooth hurt-y."],["It's inappropriate to make a 'dad joke' if you're not a dad. It's a faux pa."," It's a faux pa"],["What did the fish say when he hit the wall"," Dam."],["I don't trust stairs. They're always up to something."," They're always up to something"],["What do you call someone with no body and no nose"," Nobody knows."],["Did you hear the rumor about butter"," Well, I'm not going to spread it!"],["I used to hate facial hair...but then it grew on me.",null],["What's brown and sticky"," A stick."],["Can February March"," No, but April May!"],["Don't trust atoms. They make up everything!"," They make up everything!"],["Why don't eggs tell jokes"," They'd crack each other up."],["Did you hear about the circus fire"," It was in tents."],["How do lawyers say goodbye"," We'll be suing ya!"],["When does a joke become a dad joke"," When it becomes apparent."],["Wanna hear a joke about paper"," Never mind\u2014it's tearable."],["What did the coffee report to the police"," A mugging."],["Dad, can you put my shoes on","No, I don't think they'll fit me."],["How many tickles does it take to make an octopus laugh"," Ten tickles."],["Dad, did you get a haircut","No, I got them all cut!"],["My wife is really mad at the fact that I have no sense of direction."," So I packed up my stuff and right!"],["Why do bees have sticky hair"," Because they use a honeycomb."],["Which state has the most streets"," Rhode Island."],["I'm on a seafood diet. I see food and I eat it."," I see food and I eat it"],["Did you hear about the guy who invented the knock-knock joke"," He won the 'no-bell' prize."],["How does a penguin build its house"," Igloos it together."],["What do you call an elephant that doesn't matter"," An irrelephant."],["I wouldn't buy anything with velcro. It's a total rip-off."," It's a total rip-off"],["Dad, can you put the cat out","I didn't know it was on fire."],["What concert costs just 45 cents"," 50 Cent featuring Nickelback!"],["Why are elevator jokes so classic and good"," They work on many levels."],["Is this pool safe for diving"," It deep ends."],[`Knock knock.
|
|
164
164
|
Who's there?
|
|
165
165
|
Cows go.
|
|
166
166
|
Cows go who?`,"No, cows go moo."],[`Knock knock.
|
|
@@ -174,7 +174,7 @@ ${b.join(`
|
|
|
174
174
|
Opportunity.`,"That is impossible. Opportunity doesn\u2019t come knocking twice!"],[`Knock knock.
|
|
175
175
|
Who's there?
|
|
176
176
|
Hatch.
|
|
177
|
-
Hatch who?`,"Bless you!"]];function Jo(){let n=Math.floor(Math.random()*ei.length);return ei[n]}async function ti(){let n=Je(),e=await Ot("app"),t="./qwik-app";nn(`Let's create a ${Rt(" Qwik App ")} \u2728 (v1.5.1-
|
|
177
|
+
Hatch who?`,"Bless you!"]];function Jo(){let n=Math.floor(Math.random()*ei.length);return ei[n]}async function ti(){let n=Je(),e=await Ot("app"),t="./qwik-app";nn(`Let's create a ${Rt(" Qwik App ")} \u2728 (v1.5.1-dev20240330145203)`),await Sr(500);let s=await $i({message:`Where would you like to create your new project? ${Ye("(Use '.' or './' for current directory)")}`,placeholder:t})||t;Ge(s)&&(rt("Operation cancelled."),process.exit(0));let r=e.getBaseApp();if(!r)throw new Error("Base app not found");let o=e.templates.filter(O=>O.id!==r.id),i=gn(s.trim());r.target=i;let a=kr(n,r);te.info(`Creating new project in ${Rt(" "+i+" ")} ... \u{1F407}`);let D=null;if(Nn.default.existsSync(i)&&Nn.default.readdirSync(i).length>0){let O=await ss({message:`Directory "./${(0,Rn.relative)(process.cwd(),i)}" 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"}]});(Ge(O)||O==="exit")&&(rt("Operation cancelled."),process.exit(0)),O==="replace"&&(D=rn(i))}let h=await ss({message:"Select a starter",options:o.map(O=>{var T;return{label:O.name,value:O.id,hint:(T=O.pkgJson)==null?void 0:T.description}})});Ge(h)&&(rt("Operation cancelled."),process.exit(0));let f=h,c=await tn({message:`Would you like to install ${n} dependencies?`,initialValue:!0});Ge(c)&&(rt("Operation cancelled."),process.exit(0));let d=await tn({message:"Initialize a new git repository?",initialValue:!0});D&&await D;let C=c;if(!C)a.abort();else if(typeof a.success>"u")try{let O=await tn({message:"Finishing the install. Wanna hear a joke?",initialValue:!0});if(!Ge(O)&&O){let[T,H]=Jo();an(Ce(`${T.trim()}
|
|
178
178
|
${H.trim()}`),"\u{1F648}")}}catch{}let b=At();b.start("Creating App...");let E=await _t({appId:f,outDir:i,pkgManager:n,templateManager:e});if(b.stop("App Created \u{1F430}"),d)if(Nn.default.existsSync((0,Rn.join)(i,".git")))te.info("Git has already been initialized before. Skipping...");else{b.start("Git initializing...");try{let O=[];if(O.push(await vt("git",["init"],i).install),O.push(await vt("git",["add","-A"],i).install),O.push(await vt("git",["commit","-m","Initial commit \u26A1\uFE0F"],i).install),O.some(T=>T===!1))throw"";b.stop("Git initialized \u{1F3B2}")}catch{b.stop("Git failed to initialize"),te.error(be("Git failed to initialize. You can do this manually by running: git init"))}}let g=!1;return C&&(g=await dn(async()=>{let O=await a.complete(E.outDir);return O&&await ot(n,E.outDir).install},{pkgManager:n,spinner:b})),mn(n,E,g),E}async function Ko(n){let e=Je(),t=await Ot("app");return await _t({appId:n.starterId,templateManager:t,outDir:n.outDir,pkgManager:e})}async function Dc(){console.clear(),Mr(),hc();try{let n=process.argv.slice(2);n.length>0?await Xs(...n):await ti()}catch(n){un(n.message||n)}}function hc(){let n=process.version,[e,t]=n.replace("v","").split(".");Number(e)<16?(console.error(be(`Qwik requires Node.js 16.8 or higher. You are currently running Node.js ${n}.`)),process.exit(1)):Number(e)===16?Number(t)<8&&console.warn(Ii(`Node.js 16.8 or higher is recommended. You are currently running Node.js ${n}.`)):Number(e)===18&&Number(t)<11&&console.error(be(`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 ${n}. https://github.com/BuilderIO/qwik/issues/3035`))}0&&(module.exports={createApp,runCli,runCreateCli,runCreateInteractiveCli});
|
|
179
179
|
/*! Bundled license information:
|
|
180
180
|
|
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.5.1-
|
|
4
|
+
"version": "1.5.1-dev20240330145203",
|
|
5
5
|
"author": "Builder.io Team",
|
|
6
6
|
"bin": "./create-qwik.cjs",
|
|
7
7
|
"bugs": "https://github.com/BuilderIO/qwik/issues",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"qwik": "qwik"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@builder.io/qwik": "1.5.1-
|
|
20
|
-
"@builder.io/qwik-city": "1.5.1-
|
|
19
|
+
"@builder.io/qwik": "1.5.1-dev20240330145203",
|
|
20
|
+
"@builder.io/qwik-city": "1.5.1-dev20240330145203",
|
|
21
21
|
"@types/eslint": "^8.56.6",
|
|
22
22
|
"@types/node": "^20.11.30",
|
|
23
23
|
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
24
24
|
"@typescript-eslint/parser": "^7.3.1",
|
|
25
25
|
"eslint": "^8.57.0",
|
|
26
|
-
"eslint-plugin-qwik": "1.5.1-
|
|
26
|
+
"eslint-plugin-qwik": "1.5.1-dev20240330145203",
|
|
27
27
|
"prettier": "^3.2.5",
|
|
28
28
|
"typescript": "5.3.3",
|
|
29
29
|
"undici": "*",
|