create-arkstack 0.13.0 → 0.13.1

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.
Files changed (2) hide show
  1. package/bin/run.js +2 -2
  2. package/package.json +1 -1
package/bin/run.js CHANGED
@@ -28,7 +28,7 @@ import{AbortPromptError as e,ExitPromptError as t}from"@inquirer/core";import n,
28
28
  {--t|token?: Kit repo authentication token.}
29
29
  {--d|desc?: Project Description.}
30
30
  {--k|kit?: Runtime template. [${O.map(e=>e.alias).join(`,`)}]}
31
- {--l|lean: Make a lean project.}
31
+ {--l|lean: Make a lean project (Set to false or 0 for explicit set).}
32
32
  {--p|pre: Download prerelease version if available.}
33
33
  {--o|overwrite: Overwrite the installation directory if it is not empty.}
34
- `;description=`Display a personalized greeting.`;async handle(){let n=this.options(),a=this.argument(`location`);console.log(R,`font-family: monospace`);let{template:o}=await w.prompt([{type:`list`,name:`template`,message:`Choose Runtime:`,choices:O.map(e=>({name:`${e.name} - ${e.hint}`,value:e.alias,disabled:e.source?!1:`(Unavailable at this time)`})),default:`full`,when:()=>!n.kit}]).catch(n=>((n instanceof e||n instanceof t)&&(this.info(`Thanks for trying out Arkstack.`),process.exit(0)),n)),{lean:s,appName:c,description:l}=await w.prompt([{type:`list`,name:`lean`,message:`Project Scope:`,choices:k.map(e=>({name:`${e.name} - ${e.hint.replace(`{template}`,g.title(n.kit||o))}`,value:e.lean})),default:`full`,when:()=>!n.lean},{type:`input`,name:`appName`,message:`What is the name of your project:`,default:`arkstack-${n.kit||o}`,when:()=>!n.name},{type:`input`,name:`description`,message:`Project Description:`,default:`Simple ${g.of(n.kit||o).ucfirst()}.js project created with Arkstack.`,when:()=>!n.desc}]).catch(n=>((n instanceof e||n instanceof t)&&(this.info(`Thanks for trying out Arkstack.`),process.exit(0)),n)),{location:u}=await w.prompt([{type:`input`,name:`location`,message:`Installation location relative to the current dir:`,default:g.slugify(n.name??c??r(process.cwd()),`-`),when:()=>!a}]).catch(n=>((n instanceof e||n instanceof t)&&(this.info(`Thanks for trying out Arkstack.`),process.exit(0)),n)),d=O.find(e=>e.alias===(n.kit||o));d.lean=n.lean||s||!1;let{install:f,token:p,pre:h}=await w.prompt([{type:`confirm`,name:`pre`,message:`An alpha version of the ${d.name.replace(/\s*template$/i,``).trim()} template is available. Would you like to use it instead?`,default:!1,when:()=>d.prereleaseSource&&!n.pre},{type:`input`,name:`token`,message:`Authentication token:`,when:()=>d.locked&&!n.token},{type:`confirm`,name:`install`,message:`Would you like to install node_modules right away?:`,default:!0,when:()=>!n.install}]).catch(n=>((n instanceof e||n instanceof t)&&(this.info(`Thanks for trying out Arkstack.`),process.exit(0)),n));h=n.pre??h,p=n.token??p,c=n.name??c,f=n.install??f,o=n.kit??o,u=a??u,l=n.description??l,d&&!d.source&&(this.error(`ERROR: The ${d.name} kit is not currently available`),process.exit(1));let _=(d.baseAlias??d.alias).replace(/-lean$/i,``),v=h&&d.prereleaseSource?d.prereleaseSource:d.source,y=new L(i(process.cwd(),u),c,l),b=this.spinner(`Loading Template...`).start(),x=await y.download(v,f,p,n.overwrite);x.dir&&_&&(await T(x.dir),await E(x.dir,_),await D(x.dir,i(x.dir,_))),d.lean?(b.info(m.parse([[`Applying lean profile...`,`green`]],``,!1)).start(),await y.makeLeanProfile(_)):await y.makeFullProfile(_),b.info(m.parse([[`Cleaning Up...`,`green`]],``,!1)).start(),await y.cleanup(_),b.info(m.parse([[`Initializing Project...`,`green`]],``,!1)).start(),await y.createDotEnv(d.lean?`min`:`max`),await y.complete(f),b.succeed(m.parse([[`Project initialization complete!`,`green`]],``,!1))}},B=class{};C.init(new B,{rootCommand:z,exceptionHandler:e=>{m.error(`ERROR: ${e.message}`)}});export{};
34
+ `;description=`Display a personalized greeting.`;async handle(){let n=this.options(),a=this.argument(`location`);console.log(R,`font-family: monospace`);let{template:o}=await w.prompt([{type:`list`,name:`template`,message:`Choose Runtime:`,choices:O.map(e=>({name:`${e.name} - ${e.hint}`,value:e.alias,disabled:e.source?!1:`(Unavailable at this time)`})),default:`full`,when:()=>!n.kit}]).catch(n=>((n instanceof e||n instanceof t)&&(this.info(`Thanks for trying out Arkstack.`),process.exit(0)),n)),{lean:s,appName:c,description:l}=await w.prompt([{type:`list`,name:`lean`,message:`Project Scope:`,choices:k.map(e=>({name:`${e.name} - ${e.hint.replace(`{template}`,g.title(n.kit||o))}`,value:e.lean})),default:`full`,when:()=>!n.lean&&![`0`,0,`false`].includes(n.lean)},{type:`input`,name:`appName`,message:`What is the name of your project:`,default:`arkstack-${n.kit||o}`,when:()=>!n.name},{type:`input`,name:`description`,message:`Project Description:`,default:`Simple ${g.of(n.kit||o).ucfirst()}.js project created with Arkstack.`,when:()=>!n.desc}]).catch(n=>((n instanceof e||n instanceof t)&&(this.info(`Thanks for trying out Arkstack.`),process.exit(0)),n)),{location:u}=await w.prompt([{type:`input`,name:`location`,message:`Installation location relative to the current dir:`,default:g.slugify(n.name??c??r(process.cwd()),`-`),when:()=>!a}]).catch(n=>((n instanceof e||n instanceof t)&&(this.info(`Thanks for trying out Arkstack.`),process.exit(0)),n)),d=O.find(e=>e.alias===(n.kit||o));d.lean=n.lean||!!s||!1;let{install:f,token:p,pre:h}=await w.prompt([{type:`confirm`,name:`pre`,message:`An alpha version of the ${d.name.replace(/\s*template$/i,``).trim()} template is available. Would you like to use it instead?`,default:!1,when:()=>d.prereleaseSource&&!n.pre},{type:`input`,name:`token`,message:`Authentication token:`,when:()=>d.locked&&!n.token},{type:`confirm`,name:`install`,message:`Would you like to install node_modules right away?:`,default:!0,when:()=>!n.install}]).catch(n=>((n instanceof e||n instanceof t)&&(this.info(`Thanks for trying out Arkstack.`),process.exit(0)),n));h=n.pre??h,p=n.token??p,c=n.name??c,f=n.install??f,o=n.kit??o,u=a??u,l=n.description??l,d&&!d.source&&(this.error(`ERROR: The ${d.name} kit is not currently available`),process.exit(1));let _=(d.baseAlias??d.alias).replace(/-lean$/i,``),v=h&&d.prereleaseSource?d.prereleaseSource:d.source,y=new L(i(process.cwd(),u),c,l),b=this.spinner(`Loading Template...`).start(),x=await y.download(v,f,p,n.overwrite);x.dir&&_&&(await T(x.dir),await E(x.dir,_),await D(x.dir,i(x.dir,_))),d.lean?(b.info(m.parse([[`Applying lean profile...`,`green`]],``,!1)).start(),await y.makeLeanProfile(_)):await y.makeFullProfile(_),b.info(m.parse([[`Cleaning Up...`,`green`]],``,!1)).start(),await y.cleanup(_),b.info(m.parse([[`Initializing Project...`,`green`]],``,!1)).start(),await y.createDotEnv(d.lean?`min`:`max`),await y.complete(f),b.succeed(m.parse([[`Project initialization complete!`,`green`]],``,!1))}},B=class{};C.init(new B,{rootCommand:z,exceptionHandler:e=>{m.error(`ERROR: ${e.message}`)}});export{};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-arkstack",
3
3
  "type": "module",
4
- "version": "0.13.0",
4
+ "version": "0.13.1",
5
5
  "description": "Create new Arkstack framework applications on Express or H3 runtime drivers",
6
6
  "homepage": "https://arkstack.toneflix.net",
7
7
  "repository": {