zerostarter 0.1.39-canary.0 → 0.1.39
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/README.md +8 -11
- package/dist/bin/index.mjs +1 -1
- package/dist/{convert-CQ63p2pc.mjs → convert-D5950liy.mjs} +1 -1
- package/dist/index.d.mts +0 -4
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,14 +36,12 @@ bunx zerostarter <command> [dir] [options]
|
|
|
36
36
|
|
|
37
37
|
Scaffold a new product. Run it in an empty directory (its name becomes the project name), or pass a name: `bunx zerostarter init my-app`.
|
|
38
38
|
|
|
39
|
-
| Option
|
|
40
|
-
|
|
|
41
|
-
| `-y`, `--yes`
|
|
42
|
-
| `--
|
|
43
|
-
| `--
|
|
44
|
-
| `--
|
|
45
|
-
| `--<feature>`, `--no-<feature>` | Turn an optional surface on or off: `allowlist`, `api-docs`, `blog`, `docs`, `internal-docs`, `waitlist` (on by default except `allowlist` and `waitlist`); any feature flag skips the picker |
|
|
46
|
-
| `-h`, `--help` | Display help |
|
|
39
|
+
| Option | Description |
|
|
40
|
+
| -------------- | --------------------------------------------------------------------- |
|
|
41
|
+
| `-y`, `--yes` | Skip prompts, taking defaults (provisions Postgres when Docker is up) |
|
|
42
|
+
| `--db` | Provision a local Postgres (via pglaunch) and migrate; needs Docker |
|
|
43
|
+
| `--dry-run` | Print the plan without writing anything |
|
|
44
|
+
| `-h`, `--help` | Display help |
|
|
47
45
|
|
|
48
46
|
### `reinit`
|
|
49
47
|
|
|
@@ -58,14 +56,13 @@ Re-scaffold an existing repo in place. Every file is deleted (except `.git` and
|
|
|
58
56
|
|
|
59
57
|
Re-baseline a fork on the latest ZeroStarter. A gitpick overlay updates the starter files while your content, `public/marketing`, branding, `package.json` identity, dev-URL names, and favicon are preserved. Requires a clean tree; lands as a reviewable diff you commit yourself.
|
|
60
58
|
|
|
61
|
-
Skills you own are preserved too: sync only rewrites a skill whose `source` is this repo. One you authored, one you vendored from a tool, one you took from another upstream, one you edited, or one whose sync note you removed keeps your version, and sync names it in the summary rather than replacing it.
|
|
59
|
+
Skills you own are preserved too: sync only rewrites a skill whose `source` is this repo. One you authored, one you vendored from a tool, one you took from another upstream, one you edited, or one whose sync note you removed keeps your version, and sync names it in the summary rather than replacing it.
|
|
62
60
|
|
|
63
|
-
`AGENTS.md` ships to a fork whole, rebranded, and follows the same contract: sync hands you the starter's latest while your copy is unedited, and keeps yours once you have changed it
|
|
61
|
+
`AGENTS.md` ships to a fork whole, rebranded, and follows the same contract: sync hands you the starter's latest while your copy is unedited, and keeps yours once you have changed it.
|
|
64
62
|
|
|
65
63
|
## Requirements
|
|
66
64
|
|
|
67
65
|
- **[Bun](https://bun.sh)** runs the scaffolded project. If it is missing, the CLI offers to install it for you.
|
|
68
|
-
- **Git** with a commit identity (`user.name` and `user.email`), since `init` and `reinit` commit their work; `reinit` and `sync` also need a clean working tree.
|
|
69
66
|
- **Docker** (optional) lets `init` provision a local Postgres and migrate automatically. Without it, point `POSTGRES_URL` at any Postgres and run `bun run db:migrate`.
|
|
70
67
|
|
|
71
68
|
## Links
|
package/dist/bin/index.mjs
CHANGED
|
@@ -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-
|
|
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-D5950liy.mjs";import{basename as se,delimiter as ce,dirname as le,join as k,parse as ue,resolve as A}from"node:path";import{existsSync as j,readFileSync as de,readdirSync as fe}from"node:fs";import{randomBytes as pe}from"node:crypto";import{createInterface as me}from"node:readline/promises";import{parseArgs as he}from"node:util";import{homedir as ge}from"node:os";var _e={name:`zerostarter`,version:`0.1.39`,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":`tsrs --noEmit`,dev:`tsdown --watch`},devDependencies:{"@packages/config":`workspace:*`,"@types/bun":`catalog:`,"@types/node":`catalog:`,tsdown:`catalog:`,tsrs:`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===`
|
|
@@ -11,7 +11,7 @@ export const features = {
|
|
|
11
11
|
waitlist: ${e.waitlist},
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export type Feature = keyof typeof features`,ye=({name:e},t=H)=>{let n=e.charAt(0).toUpperCase()+e.slice(1);return`//
|
|
14
|
+
export type Feature = keyof typeof features`,ye=({name:e},t=H)=>{let n=e.charAt(0).toUpperCase()+e.slice(1);return`// Brand identity for this app: the single source a fork edits to rebrand. web reads it via lib/config.ts.
|
|
15
15
|
export const site = {
|
|
16
16
|
name: ${JSON.stringify(n)},
|
|
17
17
|
description: ${JSON.stringify(`${n} is just getting started. Tell its story here.`)},
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/templates.d.ts
|
|
2
1
|
interface Brand {
|
|
3
2
|
name: string;
|
|
4
3
|
}
|
|
@@ -10,8 +9,5 @@ type FeatureFlags = {
|
|
|
10
9
|
internalDocs: boolean;
|
|
11
10
|
waitlist: boolean;
|
|
12
11
|
};
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/convert.d.ts
|
|
15
12
|
export declare const convertRepo: (root: string, brand: Brand, features?: FeatureFlags) => void;
|
|
16
|
-
//#endregion
|
|
17
13
|
export type { Brand };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as convertRepo}from"./convert-
|
|
1
|
+
export{t as convertRepo}from"./convert-D5950liy.mjs";
|