zerostarter 0.1.45 → 0.1.46

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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{A as e,C as t,D as n,E as r,F as i,I as a,M as o,N as s,O as c,P as l,S as u,T as d,_ as f,a as p,b as m,c as ee,d as h,f as g,g as _,h as v,i as y,j as b,k as x,l as S,m as C,n as te,o as ne,p as w,r as re,s as ie,t as ae,u as T,v as E,w as oe,x as D,y as O}from"../convert-CpZLx7IJ.mjs";import{createInterface as se}from"node:readline/promises";import{existsSync as k,readFileSync as ce,readdirSync as le}from"node:fs";import{basename as ue,delimiter as de,dirname as fe,join as A,parse as pe,resolve as j}from"node:path";import{randomBytes as me}from"node:crypto";import{parseArgs as he}from"node:util";import{homedir as ge}from"node:os";var _e={name:`zerostarter`,version:`0.1.45`,description:`Go from zero to a production-ready SaaS, rebranded and ready to ship.`,keywords:[`cli`,`saas`,`scaffold`,`starter`,`template`,`zerostarter`],homepage:`https://github.com/nrjdalal/zerostarter#readme`,bugs:`https://github.com/nrjdalal/zerostarter/issues`,license:`MIT`,author:{name:`Neeraj Dalal`,email:`admin@nrjdalal.com`,url:`https://nrjdalal.com`},repository:`nrjdalal/zerostarter`,funding:`https://github.com/sponsors/nrjdalal`,bin:{zerostarter:`dist/bin/index.mjs`},files:[`dist`],type:`module`,types:`./dist/index.d.mts`,exports:`./dist/index.mjs`,scripts:{build:`tsdown`,"check-types":`bun check`,dev:`tsdown --watch`},devDependencies:{"@packages/config":`workspace:*`,"@types/bun":`catalog:`,"@types/node":`catalog:`,tsdown:`catalog:`,typescript:`catalog:`}};const M=()=>!!(process.stdin.isTTY&&process.stdout.isTTY),ve=(e,t=e)=>process.stdout.isTTY?`\x1b]8;;${e}\x07${t}\x1b]8;;\x07`:e,N=e=>ve(e,O(e)),P=e=>{process.stdout.write(`\n ${D(E.barStart)} ${e}\n ${D(E.bar)}\n`)},F=e=>{process.stdout.write(` ${D(E.bar)}\n ${D(E.barEnd)} ${e}\n`)},I=(e=`Cancelled`)=>{process.stdout.write(` ${D(E.barEnd)} ${d(e)}\n`)},L=e=>e.replace(/* @__PURE__ */ RegExp(`\x1B\\[[0-9;?]*[a-zA-Z]`,`g`),``).replace(/* @__PURE__ */ RegExp(`\x1B\\]8;;.*?\\x07`,`g`),``).length,R=(e,t=``,n=!1)=>{let r=`\n${e}\n`.split(`
2
+ import{A as e,C as t,D as n,E as r,F as i,I as a,M as o,N as s,O as c,P as l,S as u,T as d,_ as f,a as p,b as m,c as ee,d as h,f as g,g as _,h as v,i as y,j as b,k as x,l as S,m as C,n as te,o as ne,p as w,r as re,s as ie,t as ae,u as T,v as E,w as oe,x as D,y as O}from"../convert-CpZLx7IJ.mjs";import{createInterface as se}from"node:readline/promises";import{existsSync as k,readFileSync as ce,readdirSync as le}from"node:fs";import{basename as ue,delimiter as de,dirname as fe,join as A,parse as pe,resolve as j}from"node:path";import{randomBytes as me}from"node:crypto";import{parseArgs as he}from"node:util";import{homedir as ge}from"node:os";var _e={name:`zerostarter`,version:`0.1.46`,description:`Go from zero to a production-ready SaaS, rebranded and ready to ship.`,keywords:[`cli`,`saas`,`scaffold`,`starter`,`template`,`zerostarter`],homepage:`https://github.com/nrjdalal/zerostarter#readme`,bugs:`https://github.com/nrjdalal/zerostarter/issues`,license:`MIT`,author:{name:`Neeraj Dalal`,email:`admin@nrjdalal.com`,url:`https://nrjdalal.com`},repository:`nrjdalal/zerostarter`,funding:`https://github.com/sponsors/nrjdalal`,bin:{zerostarter:`dist/bin/index.mjs`},files:[`dist`],type:`module`,types:`./dist/index.d.mts`,exports:`./dist/index.mjs`,scripts:{build:`tsdown`,"check-types":`bun check`,dev:`tsdown --watch`},devDependencies:{"@packages/config":`workspace:*`,"@types/bun":`catalog:`,"@types/node":`catalog:`,tsdown:`catalog:`,typescript:`catalog:`}};const M=()=>!!(process.stdin.isTTY&&process.stdout.isTTY),ve=(e,t=e)=>process.stdout.isTTY?`\x1b]8;;${e}\x07${t}\x1b]8;;\x07`:e,N=e=>ve(e,O(e)),P=e=>{process.stdout.write(`\n ${D(E.barStart)} ${e}\n ${D(E.bar)}\n`)},F=e=>{process.stdout.write(` ${D(E.bar)}\n ${D(E.barEnd)} ${e}\n`)},I=(e=`Cancelled`)=>{process.stdout.write(` ${D(E.barEnd)} ${d(e)}\n`)},L=e=>e.replace(/* @__PURE__ */ RegExp(`\x1B\\[[0-9;?]*[a-zA-Z]`,`g`),``).replace(/* @__PURE__ */ RegExp(`\x1B\\]8;;.*?\\x07`,`g`),``).length,R=(e,t=``,n=!1)=>{let r=`\n${e}\n`.split(`
3
3
  `),i=L(t),a=r.reduce((e,t)=>Math.max(e,L(t)),i),o=Math.max(a,54)+2,s=r.map(e=>` ${D(E.bar)} ${e}${` `.repeat(o-L(e))}${D(E.bar)}`).join(`
4
4
  `),c=n?E.cornerBL:E.connectL;process.stdout.write(` ${O(E.active)} ${t} ${D(E.barH.repeat(Math.max(o-i-1,1))+E.cornerTR)}\n${s}\n ${D(c+E.barH.repeat(o+2)+E.cornerBR)}\n`)},z=(e,t=[])=>{process.stdout.write(` ${O(E.active)} ${e}\n`);for(let e of t)process.stdout.write(` ${D(E.bar)} ${e}\n`)},ye=e=>{process.stdout.write(` ${u(E.active)} ${u(e)}\n`)},B=(e,t=[])=>{process.stdout.write(` ${r(E.warn)} ${r(e)}\n`);for(let e of t)process.stdout.write(` ${D(E.bar)} ${r(e)}\n`)},be=async(e,t,n)=>{let r=process.stdout,i=null;if(r.isTTY){let t=0;r.write(` ${oe(0,e)}`),i=setInterval(()=>{t+=1,r.write(`\r\x1b[K ${oe(t,e)}`)},400)}try{let e=await n();return i&&clearInterval(i),r.write(r.isTTY?`\r\x1b[K ${O(E.active)} ${t}\n`:` ${O(E.active)} ${t}\n`),e}catch(e){throw i&&clearInterval(i),r.isTTY&&r.write(`\r\x1B[K`),e}},xe=e=>{let t=e?`${u(E.radioOn)} Yes`:m(`${E.radioOff} Yes`),n=e?m(`${E.radioOff} No`):`${u(E.radioOn)} No`;return` ${D(E.bar)} ${t} ${m(`/`)} ${n}`},V=async(e,t=!0)=>{let n=process.stdout;return M()?new Promise(r=>{let i=t,a=process.stdin,o=Math.max(1,Math.ceil((5+L(e))/(n.columns||80)));n.write(` ${O(E.submit)} ${e}\n`),n.write(xe(i)),a.setRawMode(!0),a.resume(),a.setEncoding(`utf8`);let s=()=>{a.setRawMode(!1),a.pause(),a.removeListener(`data`,u)},c=()=>{n.write(`\r\x1b[K\x1b[${o}A\r\x1b[0J`)},l=()=>{s(),c(),r(i)};function u(t){t===``?(s(),c(),n.write(` ${O(E.submit)} ${m(e)}\n`),I(),process.exit(130)):t===`\r`||t===`
5
5
  `?l():t===`y`||t===`Y`?(i=!0,l()):t===`n`||t===`N`?(i=!1,l()):(t===`\x1B[C`||t===`\x1B[D`||t===`\x1B[A`||t===`\x1B[B`||t===`h`||t===`l`)&&(i=!i,n.write(`\r\x1b[K${xe(i)}`))}a.on(`data`,u)}):(n.write(` ${O(E.active)} ${e} ${m(t?`Yes`:`No`)}\n`),t)},Se=async(e,t)=>{if(t.length===0)return[];let n=process.stdout,r=new Set(t.filter(e=>e.checked).map(e=>e.value)),i=()=>t.filter(e=>r.has(e.value)).map(e=>e.label).join(`, `)||`none`;return M()?new Promise(a=>{let o=process.stdin,s=0,c=e=>{let n=t[e],i=r.has(n.value)?u(E.checkboxOn):m(E.checkboxOff),a=e===s?n.label:m(n.label);return` ${D(E.bar)} ${i} ${a}`},l=e=>{e||n.write(`\x1b[${t.length}A`);for(let e=0;e<t.length;e++)n.write(`\r\x1b[K${c(e)}\n`)};n.write(` ${O(E.submit)} ${e}\n`),l(!0),o.setRawMode(!0),o.resume(),o.setEncoding(`utf8`);let d=()=>{o.setRawMode(!1),o.pause(),o.removeListener(`data`,f)};function f(o){if(o===``)d(),n.write(`\x1b[${t.length+1}A\r\x1b[0J ${O(E.submit)} ${m(e)}\n`),I(),process.exit(130);else if(o===`\r`||o===`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zerostarter",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "description": "Go from zero to a production-ready SaaS, rebranded and ready to ship.",
5
5
  "keywords": [
6
6
  "cli",