zerostarter 0.1.26 → 0.1.27

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,M as i,N as a,O as o,P as s,S as c,T as l,_ as u,a as d,b as f,c as p,d as m,f as h,g,h as _,i as ee,j as v,k as y,l as b,m as te,n as x,o as S,p as C,r as ne,s as re,t as ie,u as ae,v as w,w as T,x as E,y as D}from"../convert-DRUnL5sE.mjs";import{basename as oe,delimiter as se,dirname as ce,join as O,parse as le,resolve as k}from"node:path";import{existsSync as A,readFileSync as ue,readdirSync as de}from"node:fs";import{randomBytes as fe}from"node:crypto";import{createInterface as pe}from"node:readline/promises";import{parseArgs as me}from"node:util";import{homedir as he}from"node:os";var ge={name:`zerostarter`,version:`0.1.26`,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":`tsc --noEmit`,dev:`tsdown --watch`},devDependencies:{"@packages/config":`workspace:*`,"@types/bun":`catalog:`,"@types/node":`catalog:`,tsdown:`catalog:`,typescript:`catalog:`}};const j=()=>!!(process.stdin.isTTY&&process.stdout.isTTY),M=(e,t=e)=>process.stdout.isTTY?`\x1b]8;;${e}\x07${t}\x1b]8;;\x07`:e,N=e=>M(e,u(e)),P=e=>{process.stdout.write(`\n ${D(g.barStart)} ${e}\n ${D(g.bar)}\n`)},F=e=>{process.stdout.write(` ${D(g.bar)}\n ${D(g.barEnd)} ${e}\n`)},I=(e=`Cancelled`)=>{process.stdout.write(` ${D(g.barEnd)} ${t(e)}\n`)},L=e=>e.replace(RegExp(`\x1B\\[[0-9;?]*[a-zA-Z]`,`g`),``).replace(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,M as i,N as a,O as o,P as s,S as c,T as l,_ as u,a as d,b as f,c as p,d as m,f as h,g,h as _,i as ee,j as v,k as y,l as b,m as te,n as x,o as S,p as C,r as ne,s as re,t as ie,u as ae,v as w,w as T,x as E,y as D}from"../convert-Cq2vrNh-.mjs";import{basename as oe,delimiter as se,dirname as ce,join as O,parse as le,resolve as k}from"node:path";import{existsSync as A,readFileSync as ue,readdirSync as de}from"node:fs";import{randomBytes as fe}from"node:crypto";import{createInterface as pe}from"node:readline/promises";import{parseArgs as me}from"node:util";import{homedir as he}from"node:os";var ge={name:`zerostarter`,version:`0.1.27`,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":`tsc --noEmit`,dev:`tsdown --watch`},devDependencies:{"@packages/config":`workspace:*`,"@types/bun":`catalog:`,"@types/node":`catalog:`,tsdown:`catalog:`,typescript:`catalog:`}};const j=()=>!!(process.stdin.isTTY&&process.stdout.isTTY),M=(e,t=e)=>process.stdout.isTTY?`\x1b]8;;${e}\x07${t}\x1b]8;;\x07`:e,N=e=>M(e,u(e)),P=e=>{process.stdout.write(`\n ${D(g.barStart)} ${e}\n ${D(g.bar)}\n`)},F=e=>{process.stdout.write(` ${D(g.bar)}\n ${D(g.barEnd)} ${e}\n`)},I=(e=`Cancelled`)=>{process.stdout.write(` ${D(g.barEnd)} ${t(e)}\n`)},L=e=>e.replace(RegExp(`\x1B\\[[0-9;?]*[a-zA-Z]`,`g`),``).replace(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(g.bar)} ${e}${` `.repeat(o-L(e))}${D(g.bar)}`).join(`
4
4
  `),c=n?g.cornerBL:g.connectL;process.stdout.write(` ${u(g.active)} ${t} ${D(g.barH.repeat(Math.max(o-i-1,1))+g.cornerTR)}\n${s}\n ${D(c+g.barH.repeat(o+2)+g.cornerBR)}\n`)},z=(e,t=[])=>{process.stdout.write(` ${u(g.active)} ${e}\n`);for(let e of t)process.stdout.write(` ${D(g.bar)} ${e}\n`)},_e=e=>{process.stdout.write(` ${f(g.active)} ${f(e)}\n`)},B=(e,t=[])=>{process.stdout.write(` ${T(g.warn)} ${T(e)}\n`);for(let e of t)process.stdout.write(` ${D(g.bar)} ${T(e)}\n`)},ve=async(e,t,n)=>{let r=process.stdout,i=null;if(r.isTTY){let t=0;r.write(` ${c(0,e)}`),i=setInterval(()=>{t+=1,r.write(`\r\x1b[K ${c(t,e)}`)},400)}try{let e=await n();return i&&clearInterval(i),r.write(r.isTTY?`\r\x1b[K ${u(g.active)} ${t}\n`:` ${u(g.active)} ${t}\n`),e}catch(e){throw i&&clearInterval(i),r.isTTY&&r.write(`\r\x1B[K`),e}},ye=e=>{let t=e?`${f(g.radioOn)} Yes`:w(`${g.radioOff} Yes`),n=e?w(`${g.radioOff} No`):`${f(g.radioOn)} No`;return` ${D(g.bar)} ${t} ${w(`/`)} ${n}`},V=async(e,t=!0)=>{let n=process.stdout;return j()?new Promise(r=>{let i=t,a=process.stdin,o=Math.max(1,Math.ceil((5+L(e))/(n.columns||80)));n.write(` ${u(g.submit)} ${e}\n`),n.write(ye(i)),a.setRawMode(!0),a.resume(),a.setEncoding(`utf8`);let s=()=>{a.setRawMode(!1),a.pause(),a.removeListener(`data`,d)},c=()=>{n.write(`\r\x1b[K\x1b[${o}A\r\x1b[0J`)},l=()=>{s(),c(),r(i)};function d(t){t===``?(s(),c(),n.write(` ${u(g.submit)} ${w(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${ye(i)}`))}a.on(`data`,d)}):(n.write(` ${u(g.active)} ${e} ${w(t?`Yes`:`No`)}\n`),t)},be=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 j()?new Promise(a=>{let o=process.stdin,s=0,c=e=>{let n=t[e],i=r.has(n.value)?f(g.checkboxOn):w(g.checkboxOff),a=e===s?n.label:w(n.label);return` ${D(g.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(` ${u(g.submit)} ${e}\n`),l(!0),o.setRawMode(!0),o.resume(),o.setEncoding(`utf8`);let d=()=>{o.setRawMode(!1),o.pause(),o.removeListener(`data`,p)};function p(o){if(o===``)d(),n.write(`\x1b[${t.length+1}A\r\x1b[0J ${u(g.submit)} ${w(e)}\n`),I(),process.exit(130);else if(o===`\r`||o===`
@@ -0,0 +1,161 @@
1
+ import{delimiter as e,dirname as t,isAbsolute as n,join as r,relative as i,resolve as a,sep as o}from"node:path";import{existsSync as s,mkdirSync as c,readFileSync as l,readdirSync as u,rmSync as d,writeFileSync as f}from"node:fs";import{createHash as p}from"node:crypto";import{spawn as m}from"node:child_process";import{access as h}from"node:fs/promises";const g=e=>{let t=[],n=[],r=!1;for(let i of e.split(`
2
+ `)){let e=i.trim();if(e){if(!r&&e.startsWith(`# PRESERVE_ON_SYNC`)){n=e.slice(18).replace(/^\s*-\s*/,``).split(`,`).map(e=>e.trim()).filter(Boolean),r=!0;continue}e.startsWith(`#`)||t.push(e)}}return{excludes:t,preserve:n}},_=e=>s(e),v=e=>l(e,`utf8`),y=(e,n)=>{c(t(e),{recursive:!0}),f(e,n)},b=e=>{d(e,{force:!0,recursive:!0})},x=new Set([`node_modules`,`.next`,`.turbo`,`dist`]),S=(e,t=!0)=>{for(let n of u(e,{withFileTypes:!0})){let i=r(e,n.name);if(n.name===`.git`){if(t)continue;d(i,{force:!0,recursive:!0});continue}n.isDirectory()?x.has(n.name)?d(i,{force:!0,recursive:!0}):(S(i,!1),u(i).length===0&&d(i,{force:!0,recursive:!0})):n.name.startsWith(`.env`)||d(i,{force:!0})}},ee=e=>{let t=[];for(let n of u(e,{withFileTypes:!0})){if(n.name===`.git`||x.has(n.name))continue;let i=r(e,n.name);n.isDirectory()?t.push(...ee(i)):n.name===`package.json`&&t.push(i)}return t},C=e=>JSON.parse(v(e)),w=(e,t)=>{y(e,`${JSON.stringify(t,null,2)}\n`)},te=(e,t)=>{if(!s(e))return!1;let n=v(e),r=n.replace(t,``);return r!==n&&(f(e,r),!0)},T=[`homepage`,`bugs`,`license`,`author`,`repository`,`funding`],ne=[`name`,`version`,...T],re=(e,t)=>{let n={...e,...t};return Object.keys(n).length>0?n:void 0},ie=(e,t)=>{let n=Array.isArray(e)?e:[],r=Array.isArray(t)?t:[];return n.length||r.length?[...new Set([...r,...n])]:void 0},ae=[`dependencies`,`devDependencies`,`optionalDependencies`,`peerDependencies`,`resolutions`,`catalog`,`scripts`,`overrides`],oe=(e,t,n)=>{let r={...t};for(let n of Object.keys(e))n in t||(r[n]=e[n]);for(let n of ae){let i=re(e[n],t[n]);i&&(r[n]=i)}let i=ie(e.workspaces,t.workspaces);if(i&&(r.workspaces=i),n)for(let t of ne)t in e?r[t]=e[t]:delete r[t];return r},E=(e,t,n=process.stdout)=>r=>n.isTTY?`\x1b[${e}m${r}\x1b[${t}m`:r,D=E(`36`,`39`),se=E(`32`,`39`),ce=E(`33`,`39`),O=E(`90`,`39`),k=E(`2`,`22`),A=E(`31`,`39`,process.stderr),le=E(`2`,`22`,process.stderr),ue=E(`38;5;208`,`39`),j=[`◇`,`◆`],M=(e,t)=>{let n=(e%j.length+j.length)%j.length;return`${D(j[n])} ${t}`},N={barStart:`┌`,bar:`│`,barEnd:`└`,active:`◆`,submit:`◇`,radioOn:`●`,radioOff:`○`,checkboxOn:`◼`,checkboxOff:`◻`,warn:`▲`,error:`■`,barH:`─`,cornerTR:`╮`,connectL:`├`,cornerBL:`╰`,cornerBR:`╯`};var P=class extends Error{constructor(...e){super(...e),this.name=`SubprocessError`,this.stdout=``,this.stderr=``}};const F=[`.exe`,`.com`],I=e=>e.replaceAll(/([()\][%!^"`<>&|;, *?])/g,`^$1`),de=e=>I(I(`"${e.replaceAll(/(\\*)"/g,`$1$1\\"`).replace(/(\\*)$/,`$1$1`)}"`)),fe=async(t,n,r)=>{if(F.some(e=>t.toLowerCase().endsWith(e)))return!0;let i=(r.PATH||r.Path||``).split(e).filter(Boolean).map(e=>e.replace(/^"(.*)"$/,`$1`));try{return await Promise.any([n,...i].flatMap(e=>F.map(n=>h(`${a(e,t)}${n}`)))),!0}catch{return!1}},pe=async(e,t,n,r=process.platform===`win32`)=>{let i=n.cwd?String(n.cwd):`.`,a=n.env||process.env;return r&&!n.shell&&!await fe(e,i,a)?[I(e),t.map(de),{...n,shell:!0}]:[e,t,n]},L=async(e,t,n,r)=>{let i=[e,...t].join(` `),[a,o,s]=await pe(e,t,n);s.shell&&o.length>0&&(a=[a,...o].join(` `),o=[]);let c=m(a,o,s),l=``,u=``;return new Promise((e,t)=>{let n=(e,n,r)=>{let i=new P(e,r?{cause:r}:void 0);i.stdout=l,i.stderr=u,i.exitCode=n,t(i)},a=e=>{e.code!==`ERR_STREAM_PREMATURE_CLOSE`&&e.code!==`EPIPE`&&n(`Command failed: ${i}`,void 0,e)};c.stdout&&(c.stdout.setEncoding(`utf8`),c.stdout.on(`data`,e=>{l+=e,r?.(e)}),c.stdout.on(`error`,a)),c.stderr&&(c.stderr.setEncoding(`utf8`),c.stderr.on(`data`,e=>{u+=e,r?.(e)}),c.stderr.on(`error`,a)),c.on(`error`,e=>n(`Command failed: ${i}`,void 0,e)),c.on(`close`,(t,r)=>{if(r)return n(`Command was terminated with ${r}: ${i}`);if(t!==0)return n(`Command failed with exit code ${t}: ${i}`,t??void 0);e({stdout:l,stderr:u})})})},R=async(e,t,n)=>{let{stdout:r}=await L(e,t,{cwd:n,stdio:[`ignore`,`pipe`,`pipe`]});return r},z=async(e,t,n)=>{await L(e,t,{cwd:n,stdio:`inherit`})},me=async(e,t)=>{try{return await L(e,t,{stdio:`ignore`}),!0}catch{return!1}},he=RegExp(`\x1B\\[[0-9;?]*[a-zA-Z]`,`g`),B=e=>e.replace(he,``),V=new WeakSet,ge=e=>{if(process.stderr.write(`\n ${A(e instanceof Error?e.message:String(e))}\n`),!(e instanceof P)||V.has(e))return;let t=(e.stderr||e.stdout||``).trim();if(!t)return;let n=B(t).split(`
3
+ `).map(e=>e.trimEnd()).filter(Boolean).slice(-12);for(let e of n)process.stderr.write(` ${le(e)}\n`)},_e=async(e,t,n)=>{let r=process.stdout,i=n.label??``;if(!r.isTTY){i&&r.write(` ${D(N.active)} ${i}\n`),await z(e,t,n.cwd);return}let a=n.lines??3,o=[],s=0,c=0,l=``,u=``,d=()=>(r.columns||80)-1,f=e=>{r.write(e?`\x1B[?7h`:`\x1B[?7l`)},p=()=>{c>0&&(r.write(`[${c}A`),c=0)},m=()=>{p();let e=0;r.write(` ${M(s,i)}\n`),e++;for(let t of o.slice(-a))r.write(` ${O(N.bar)} ${k(t.slice(0,Math.max(0,d()-5)))}\n`),e++;c=e},h=e=>{u+=e,l+=e;let t=l.split(`
4
+ `);l=t.pop()??``;for(let e of t)o.push(B(e).replace(/\r/g,``).replace(/\t/g,` `).trimEnd()),m()};m(),f(!1);let g=()=>{f(!0),process.exit(130)};process.once(`SIGINT`,g);let _=setInterval(()=>{s+=1,m()},400),v=()=>{clearInterval(_),process.removeListener(`SIGINT`,g)};try{await L(e,t,{cwd:n.cwd,stdio:[`ignore`,`pipe`,`pipe`]},h)}catch(e){throw v(),p(),f(!0),r.write(u),e&&typeof e==`object`&&V.add(e),e}v(),p(),f(!0),r.write(` ${D(N.active)} ${n.done??i}\n`);for(let e of o.slice(-a))r.write(` ${O(N.bar)} ${k(e.slice(0,Math.max(0,d()-5)))}\n`)},H=`https://github.com/nrjdalal/zerostarter`,U=`.agents/skills/.sync.json`,W=()=>({adopted:[],customized:[],forkOwned:[],unverified:[]}),G=e=>p(`sha256`).update(e.replace(/\r\n/g,`
5
+ `)).digest(`hex`).slice(0,12),K=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`app`,q=(e,t,n)=>e.replaceAll(`ZeroStarter`,()=>n).replace(/(?<!bunx )zerostarter(?! scaffolding CLI)/g,t),J=`> Synced from ${H}.`,ve=()=>`> [!CAUTION]\n${J} Customize this skill or remove this note to stop syncing.`,Y=e=>e.replace(/^https?:\/\/github\.com\//,``).replace(/\/+$/,``),X=Y(H),Z=e=>{let t=e.split(`
6
+ `);if(t[0]===void 0||t[0].trim()!==`---`)return``;for(let e of t.slice(1)){if(e.trim()===`---`)break;if(e.startsWith(`source:`))return e.slice(7).trim()}return``},ye=e=>u(e,{withFileTypes:!0}).filter(t=>t.isDirectory()&&_(r(e,t.name,`SKILL.md`))).map(e=>e.name).sort(),be=e=>{let t=r(e,U);if(!_(t))return{};try{return C(t)}catch{return{}}},xe=e=>{let t=r(e,`.agents/skills`),n=new Map;if(!_(t))return n;for(let e of ye(t))n.set(e,v(r(t,e,`SKILL.md`)));return n},Se=(e,t,n,r,i=!1)=>{let a=e.replace(/\r\n/g,`
7
+ `).split(`
8
+ `),o=a.indexOf(`---`),s=a.indexOf(`---`,o+1);if(o!==0||s===-1)throw Error(`.agents/skills/${r}/SKILL.md has no frontmatter to reconcile (the skill shape drifted). Update packages/cli/src/skills.ts.`);let c=Z(e),l=i||c===``||c===`local`?H:c,u=a.slice(o+1,s).map(e=>e.startsWith(`source:`)?`source: ${l}`:q(e,t,n));u.some(e=>e.startsWith(`source:`))||u.push(`source: ${l}`);let d=q(a.slice(s+1).join(`
9
+ `),t,n).replace(/^\n+/,``),f=l===H?`${ve()}\n\n`:``;return`---\n${u.join(`
10
+ `)}\n---\n\n${f}${d}`},Ce=(e,t,n)=>{let i=r(e,`.agents/skills`),a=W();if(!_(i))return a;let o=K(t.name),s=be(e),c={};for(let e of ye(i)){let l=r(i,e,`SKILL.md`),u=v(l),d=Se(u,o,t.name,e),f=n===void 0?void 0:n.get(e),p=s[e];if(f!==void 0){let n=Z(f),r=t=>{y(l,f),t.push(e),p&&(c[e]=p)},i=Y(n);if(n!==``&&i!==X){r(a.forkOwned);continue}if(i===X&&!f.includes(J)){r(a.forkOwned);continue}if(p){if(p.written!==G(f)){r(a.customized);continue}}else G(f)!==G(d)&&G(f)!==G(Se(u,o,t.name,e,!0))&&a.unverified.push(e)}y(l,d),c[e]={ref:`main`,upstream:G(u),written:G(d)},a.adopted.push(e)}return w(r(e,U),c),a},we=e=>{let t=r(e,`AGENTS.md`);if(!_(t))return!1;let n=v(t);return!n.includes(`<!-- skills:custom -->`)||!n.includes(`<!-- skills:vendored -->`)},Te=async e=>{if(_(r(e,`.github/scripts/skills-manager.ts`)))try{await R(`bun`,[`.github/scripts/skills-manager.ts`],e)}catch{}},Ee=(e,t)=>{let n=C(r(e,`package.json`)).name;return n?Ce(e,{name:n},t):W()},Q={allowlist:!1,apiDocs:!0,blog:!0,docs:!0,internalDocs:!0,waitlist:!1},De=e=>`// Optional surfaces a fork enables or disables. Typed boolean (not \`as const\`) so a fork can flip them and the runtime gates are not dead code. Off means the routes 404 and the links, nav, sitemap, llms, and search drop the surface. waitlist off makes the home a plain landing page.
11
+ export const features = {
12
+ allowlist: ${e.allowlist},
13
+ apiDocs: ${e.apiDocs},
14
+ blog: ${e.blog},
15
+ docs: ${e.docs},
16
+ internalDocs: ${e.internalDocs},
17
+ waitlist: ${e.waitlist},
18
+ }
19
+
20
+ export type Feature = keyof typeof features`,Oe=({name:e},t=Q)=>{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.
21
+ export const site = {
22
+ name: ${JSON.stringify(n)},
23
+ description: ${JSON.stringify(`${n} is just getting started. Tell its story here.`)},
24
+ tagline: "Your tagline, ready when you are.",
25
+ social: {
26
+ discord: "",
27
+ github: "",
28
+ x: "",
29
+ },
30
+ // Local-only dev agent identity (api/hono agents router).
31
+ agent: {
32
+ name: "LocalAgent",
33
+ email: "agent@local.host",
34
+ },
35
+ // Injectable long-form text blocks. A product sets its own, or leaves them empty.
36
+ apiReferenceDescription: "",
37
+ llmsFullPreamble: "",
38
+ } as const
39
+
40
+ export type Site = typeof site
41
+
42
+ ${De(t)}
43
+ `},ke=()=>`import { features, site } from "@packages/config/site"
44
+ import { redirect } from "next/navigation"
45
+
46
+ // Fresh fork: the waitlist capture when the waitlist feature is on, otherwise a plain landing page. Replace this with your real home when ready.
47
+ export default function Home() {
48
+ if (features.waitlist) redirect("/waitlist")
49
+
50
+ return (
51
+ <main className="flex min-h-svh flex-col items-center justify-center p-8 text-center">
52
+ <div className="mx-auto flex w-full max-w-xl flex-col items-center">
53
+ <h1 className="mb-4 text-5xl font-bold tracking-tight sm:text-6xl">{site.name}</h1>
54
+ <p className="text-muted-foreground max-w-md text-lg">{site.tagline}</p>
55
+ </div>
56
+ </main>
57
+ )
58
+ }
59
+ `,Ae=()=>`# AGENTS.md
60
+
61
+ Guidance for AI coding agents working in this repository.
62
+
63
+ ## Instructions
64
+
65
+ - ALWAYS: Use \`@/\` for imports, and follow the \`design\` skill for UI and styling conventions.
66
+ - ALWAYS: Keep documentation in sync with every change.
67
+ - NEVER: Include "Co-authored-by" in commit messages.
68
+ - NEVER: Use em-dashes (the long dash, U+2014) in code, comments, docs, or copy. Regular hyphens are fine; for a pause or aside, use a comma, colon, or period.
69
+
70
+ ## Skills
71
+
72
+ Skills live in \`.agents/skills\` (symlinked to \`.claude/skills\` and \`.github/skills\`, so every agent tool reads the same files). Each is a \`SKILL.md\` with a \`description\` trigger and a literal procedure. Start with \`codebase-map\` to orient, then load the task skill that fits.
73
+
74
+ These tables are generated from each skill's own description by \`bun .github/scripts/skills-manager.ts\`, which a pre-commit hook runs for you. **Custom** skills are maintained here; **vendored** skills are copied verbatim from an upstream project (re-vendor to update, do not hand-edit).
75
+
76
+ **Custom**
77
+
78
+ <!-- skills:custom -->
79
+
80
+ <!-- /skills:custom -->
81
+
82
+ **Vendored** (upstream, copied verbatim)
83
+
84
+ <!-- skills:vendored -->
85
+
86
+ <!-- /skills:vendored -->
87
+ `,je=({name:e})=>`# ${e.charAt(0).toUpperCase()+e.slice(1)}
88
+
89
+ Built on top of [ZeroStarter](https://zerostarter.dev).
90
+
91
+ ## Development
92
+
93
+ \`\`\`bash
94
+ bun run dev
95
+ \`\`\`
96
+
97
+ This serves named \`.localhost\` dev URLs via portless (\`bunx portless list\` shows them); \`PORTLESS=0 bun run dev\` uses fixed ports instead (web \`:3000\`, api \`:4000\`).
98
+ `,Me=()=>`---
99
+ slug: /docs
100
+ title: Introduction
101
+ description: Documentation.
102
+ ---
103
+
104
+ # Introduction
105
+
106
+ This is your documentation home. Start writing, this page is yours.
107
+ `,Ne=()=>`---
108
+ slug: /console/docs
109
+ title: Introduction
110
+ description: Internal documentation.
111
+ ---
112
+
113
+ # Introduction
114
+
115
+ Your team's internal docs live here.
116
+ `,Pe=e=>`---
117
+ title: Blog
118
+ description: Latest articles and updates
119
+ createdAt: ${e}
120
+ ---
121
+
122
+ ## Recent Posts
123
+
124
+ <BlogPostList />
125
+ `,Fe=e=>`---
126
+ title: Hello World
127
+ description: The first post on your new blog.
128
+ createdAt: ${e}
129
+ publishedAt: ${e}
130
+ ---
131
+
132
+ ## Hello World
133
+
134
+ Your very first post. Replace it with something worth reading.
135
+ `,Ie=()=>`import type { DocsConfig } from "./src/lib/docs"
136
+
137
+ const docsConfig = {
138
+ docs: {
139
+ "Getting Started": [
140
+ {
141
+ "/docs": {
142
+ title: "Introduction",
143
+ description: "Documentation.",
144
+ },
145
+ },
146
+ ],
147
+ },
148
+ console: {
149
+ "Getting Started": [
150
+ {
151
+ "/console/docs": {
152
+ title: "Introduction",
153
+ description: "Internal documentation.",
154
+ },
155
+ },
156
+ ],
157
+ },
158
+ } satisfies DocsConfig
159
+
160
+ export default docsConfig
161
+ `,$=(e,...t)=>r(e,...t),Le=e=>{let t=$(e,`.gitpickignore`);if(!_(t))return;let s=a(e),c=(e,t)=>{throw Error(`.gitpickignore entry "${e}" ${t}; the in-place converter only removes literal paths under the root.`)},l=g(v(t)).excludes.map(e=>{/[*?![\]]/.test(e)&&c(e,`is not a literal path (a glob or negation would diverge from gitpick's fetch)`);let t=i(s,a(s,e));return(n(e)||!t||t===`..`||t.startsWith(`..${o}`)||n(t))&&c(e,`is not inside the project`),r(s,t)});for(let e of l)b(e);b(t)},Re=/[ \t]*\{[^}\r\n]*href:[ \t]*["']\/hire["'][^}\r\n]*\},?[ \t]*\r?\n/,ze=(e,t)=>{let n=new Date,r=n.toISOString().slice(0,10),i=[n.getFullYear(),n.getMonth()+1,n.getDate()].map(e=>String(e).padStart(2,`0`)).join(`-`),a=i<r?i:r;y($(e,`web/next/content/docs/index.mdx`),Me()),y($(e,`web/next/content/blog/index.mdx`),Pe(a)),y($(e,`web/next/content/blog/hello-world.mdx`),Fe(a)),y($(e,`web/next/content/console/docs/index.mdx`),Ne()),y($(e,`web/next/docs.config.ts`),Ie()),y($(e,`web/next/public/.gitkeep`),``),y($(e,`web/next/src/app/page.tsx`),ke()),y($(e,`AGENTS.md`),Ae()),y($(e,`README.md`),je(t))},Be=`web/next/src/lib/marketing/fonts.ts`,Ve=e=>_($(e,Be)),He=(e,t=!1)=>{let n=$(e,`web/next/src/lib/fonts.ts`),r=$(e,Be),i=$(e,`web/next/src/components/common/navbar.tsx`);if(te(i,Re),_(r)&&!t)throw Error(`web/next/src/lib/marketing/fonts.ts survived the fork strip (add web/next/src/lib/marketing/ to .gitpickignore).`);if(_(n)&&v(n).includes(`fonts/marketing/`))throw Error(`fonts.ts references fonts/marketing/; author-only marketing fonts must live in the fork-excluded web/next/src/lib/marketing/, not the shared fonts.ts.`);if(_(i)&&/href:\s*["']\/hire["']/.test(v(i)))throw Error(`common/navbar.tsx still has the /hire entry after fixDangling (regex drift). Update packages/cli/src/convert.ts.`)},Ue=(e,t)=>{for(let[n,r]of[[`web/next`,t],[`api/hono`,`api.${t}`]]){let t=$(e,n,`package.json`),i=C(t),a=i.portless;if(!a||typeof a!=`object`||Array.isArray(a))throw Error(`${n}/package.json has no "portless" object to rebrand (the dev-URL setup drifted). Update packages/cli/src/convert.ts.`);let o=a;o.name=r,w(t,i)}},We=e=>{let t=C($(e,`package.json`)).name;t&&Ue(e,K(t))},Ge=(e,t,n)=>{y($(e,`packages/config/src/site.ts`),Oe(t,n));let r=K(t.name),i=$(e,`package.json`),a=C(i);a.name=r,a.version=`0.0.0`;for(let e of T)delete a[e];w(i,a),Ue(e,r)},Ke=(e,t,n=Q)=>{Le(e),ze(e,t),He(e),Ge(e,t,n),Ce(e,t)};export{C as A,A as C,_ as D,S as E,y as M,w as N,ee as O,g as P,M as S,oe as T,D as _,Q as a,se as b,Ee as c,me as d,ge as f,N as g,_e as h,We as i,b as j,v as k,Te as l,z as m,He as n,W as o,R as p,Ve as r,we as s,Ke as t,xe as u,k as v,ce as w,ue as x,O as y};
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./convert-DRUnL5sE.mjs";export{e as convertRepo};
1
+ import{t as e}from"./convert-Cq2vrNh-.mjs";export{e as convertRepo};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zerostarter",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "Go from zero to a production-ready SaaS, rebranded and ready to ship.",
5
5
  "keywords": [
6
6
  "cli",
@@ -1,161 +0,0 @@
1
- import{delimiter as e,dirname as t,join as n,resolve as r}from"node:path";import{existsSync as i,mkdirSync as a,readFileSync as o,readdirSync as s,rmSync as c,writeFileSync as l}from"node:fs";import{createHash as u}from"node:crypto";import{spawn as d}from"node:child_process";import{access as f}from"node:fs/promises";const p=e=>{let t=[],n=[],r=!1;for(let i of e.split(`
2
- `)){let e=i.trim();if(e){if(!r&&e.startsWith(`# PRESERVE_ON_SYNC`)){n=e.slice(18).replace(/^\s*-\s*/,``).split(`,`).map(e=>e.trim()).filter(Boolean),r=!0;continue}e.startsWith(`#`)||t.push(e)}}return{excludes:t,preserve:n}},m=e=>i(e),h=e=>o(e,`utf8`),g=(e,n)=>{a(t(e),{recursive:!0}),l(e,n)},_=e=>{c(e,{force:!0,recursive:!0})},v=new Set([`node_modules`,`.next`,`.turbo`,`dist`]),y=(e,t=!0)=>{for(let r of s(e,{withFileTypes:!0})){let i=n(e,r.name);if(r.name===`.git`){if(t)continue;c(i,{force:!0,recursive:!0});continue}r.isDirectory()?v.has(r.name)?c(i,{force:!0,recursive:!0}):(y(i,!1),s(i).length===0&&c(i,{force:!0,recursive:!0})):r.name.startsWith(`.env`)||c(i,{force:!0})}},b=e=>{let t=[];for(let r of s(e,{withFileTypes:!0})){if(r.name===`.git`||v.has(r.name))continue;let i=n(e,r.name);r.isDirectory()?t.push(...b(i)):r.name===`package.json`&&t.push(i)}return t},x=e=>JSON.parse(h(e)),S=(e,t)=>{g(e,`${JSON.stringify(t,null,2)}\n`)},ee=(e,t)=>{if(!i(e))return!1;let n=h(e),r=n.replace(t,``);return r!==n&&(l(e,r),!0)},te=[`homepage`,`bugs`,`license`,`author`,`repository`,`funding`],ne=[`name`,`version`,...te],re=(e,t)=>{let n={...e,...t};return Object.keys(n).length>0?n:void 0},ie=(e,t)=>{let n=Array.isArray(e)?e:[],r=Array.isArray(t)?t:[];return n.length||r.length?[...new Set([...r,...n])]:void 0},ae=[`dependencies`,`devDependencies`,`optionalDependencies`,`peerDependencies`,`resolutions`,`catalog`,`scripts`,`overrides`],oe=(e,t,n)=>{let r={...t};for(let n of Object.keys(e))n in t||(r[n]=e[n]);for(let n of ae){let i=re(e[n],t[n]);i&&(r[n]=i)}let i=ie(e.workspaces,t.workspaces);if(i&&(r.workspaces=i),n)for(let t of ne)t in e?r[t]=e[t]:delete r[t];return r},C=(e,t,n=process.stdout)=>r=>n.isTTY?`\x1b[${e}m${r}\x1b[${t}m`:r,w=C(`36`,`39`),se=C(`32`,`39`),ce=C(`33`,`39`),T=C(`90`,`39`),E=C(`2`,`22`),D=C(`31`,`39`,process.stderr),le=C(`2`,`22`,process.stderr),ue=C(`38;5;208`,`39`),O=[`◇`,`◆`],k=(e,t)=>{let n=(e%O.length+O.length)%O.length;return`${w(O[n])} ${t}`},A={barStart:`┌`,bar:`│`,barEnd:`└`,active:`◆`,submit:`◇`,radioOn:`●`,radioOff:`○`,checkboxOn:`◼`,checkboxOff:`◻`,warn:`▲`,error:`■`,barH:`─`,cornerTR:`╮`,connectL:`├`,cornerBL:`╰`,cornerBR:`╯`};var j=class extends Error{constructor(...e){super(...e),this.name=`SubprocessError`,this.stdout=``,this.stderr=``}};const M=[`.exe`,`.com`],N=e=>e.replaceAll(/([()\][%!^"`<>&|;, *?])/g,`^$1`),de=e=>N(N(`"${e.replaceAll(/(\\*)"/g,`$1$1\\"`).replace(/(\\*)$/,`$1$1`)}"`)),fe=async(t,n,i)=>{if(M.some(e=>t.toLowerCase().endsWith(e)))return!0;let a=(i.PATH||i.Path||``).split(e).filter(Boolean).map(e=>e.replace(/^"(.*)"$/,`$1`));try{return await Promise.any([n,...a].flatMap(e=>M.map(n=>f(`${r(e,t)}${n}`)))),!0}catch{return!1}},pe=async(e,t,n,r=process.platform===`win32`)=>{let i=n.cwd?String(n.cwd):`.`,a=n.env||process.env;return r&&!n.shell&&!await fe(e,i,a)?[N(e),t.map(de),{...n,shell:!0}]:[e,t,n]},P=async(e,t,n,r)=>{let i=[e,...t].join(` `),[a,o,s]=await pe(e,t,n);s.shell&&o.length>0&&(a=[a,...o].join(` `),o=[]);let c=d(a,o,s),l=``,u=``;return new Promise((e,t)=>{let n=(e,n,r)=>{let i=new j(e,r?{cause:r}:void 0);i.stdout=l,i.stderr=u,i.exitCode=n,t(i)},a=e=>{e.code!==`ERR_STREAM_PREMATURE_CLOSE`&&e.code!==`EPIPE`&&n(`Command failed: ${i}`,void 0,e)};c.stdout&&(c.stdout.setEncoding(`utf8`),c.stdout.on(`data`,e=>{l+=e,r?.(e)}),c.stdout.on(`error`,a)),c.stderr&&(c.stderr.setEncoding(`utf8`),c.stderr.on(`data`,e=>{u+=e,r?.(e)}),c.stderr.on(`error`,a)),c.on(`error`,e=>n(`Command failed: ${i}`,void 0,e)),c.on(`close`,(t,r)=>{if(r)return n(`Command was terminated with ${r}: ${i}`);if(t!==0)return n(`Command failed with exit code ${t}: ${i}`,t??void 0);e({stdout:l,stderr:u})})})},F=async(e,t,n)=>{let{stdout:r}=await P(e,t,{cwd:n,stdio:[`ignore`,`pipe`,`pipe`]});return r},I=async(e,t,n)=>{await P(e,t,{cwd:n,stdio:`inherit`})},me=async(e,t)=>{try{return await P(e,t,{stdio:`ignore`}),!0}catch{return!1}},he=RegExp(`\x1B\\[[0-9;?]*[a-zA-Z]`,`g`),L=e=>e.replace(he,``),R=new WeakSet,ge=e=>{if(process.stderr.write(`\n ${D(e instanceof Error?e.message:String(e))}\n`),!(e instanceof j)||R.has(e))return;let t=(e.stderr||e.stdout||``).trim();if(!t)return;let n=L(t).split(`
3
- `).map(e=>e.trimEnd()).filter(Boolean).slice(-12);for(let e of n)process.stderr.write(` ${le(e)}\n`)},_e=async(e,t,n)=>{let r=process.stdout,i=n.label??``;if(!r.isTTY){i&&r.write(` ${w(A.active)} ${i}\n`),await I(e,t,n.cwd);return}let a=n.lines??3,o=[],s=0,c=0,l=``,u=``,d=()=>(r.columns||80)-1,f=e=>{r.write(e?`\x1B[?7h`:`\x1B[?7l`)},p=()=>{c>0&&(r.write(`[${c}A`),c=0)},m=()=>{p();let e=0;r.write(` ${k(s,i)}\n`),e++;for(let t of o.slice(-a))r.write(` ${T(A.bar)} ${E(t.slice(0,Math.max(0,d()-5)))}\n`),e++;c=e},h=e=>{u+=e,l+=e;let t=l.split(`
4
- `);l=t.pop()??``;for(let e of t)o.push(L(e).replace(/\r/g,``).replace(/\t/g,` `).trimEnd()),m()};m(),f(!1);let g=()=>{f(!0),process.exit(130)};process.once(`SIGINT`,g);let _=setInterval(()=>{s+=1,m()},400),v=()=>{clearInterval(_),process.removeListener(`SIGINT`,g)};try{await P(e,t,{cwd:n.cwd,stdio:[`ignore`,`pipe`,`pipe`]},h)}catch(e){throw v(),p(),f(!0),r.write(u),e&&typeof e==`object`&&R.add(e),e}v(),p(),f(!0),r.write(` ${w(A.active)} ${n.done??i}\n`);for(let e of o.slice(-a))r.write(` ${T(A.bar)} ${E(e.slice(0,Math.max(0,d()-5)))}\n`)},z=`https://github.com/nrjdalal/zerostarter`,B=`.agents/skills/.sync.json`,V=()=>({adopted:[],customized:[],forkOwned:[],unverified:[]}),H=e=>u(`sha256`).update(e.replace(/\r\n/g,`
5
- `)).digest(`hex`).slice(0,12),U=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`app`,W=(e,t,n)=>e.replaceAll(`ZeroStarter`,n).replace(/(?<!bunx )zerostarter(?! scaffolding CLI)/g,t),G=`> Synced from ${z}.`,ve=()=>`> [!CAUTION]\n${G} Customize this skill or remove this note to stop syncing.`,K=e=>e.replace(/^https?:\/\/github\.com\//,``).replace(/\/+$/,``),q=K(z),J=e=>{let t=e.split(`
6
- `);if(t[0]===void 0||t[0].trim()!==`---`)return``;for(let e of t.slice(1)){if(e.trim()===`---`)break;if(e.startsWith(`source:`))return e.slice(7).trim()}return``},Y=e=>s(e,{withFileTypes:!0}).filter(t=>t.isDirectory()&&m(n(e,t.name,`SKILL.md`))).map(e=>e.name).sort(),ye=e=>{let t=n(e,B);if(!m(t))return{};try{return x(t)}catch{return{}}},be=e=>{let t=n(e,`.agents/skills`),r=new Map;if(!m(t))return r;for(let e of Y(t))r.set(e,h(n(t,e,`SKILL.md`)));return r},X=(e,t,n,r,i=!1)=>{let a=e.replace(/\r\n/g,`
7
- `).split(`
8
- `),o=a.indexOf(`---`),s=a.indexOf(`---`,o+1);if(o!==0||s===-1)throw Error(`.agents/skills/${r}/SKILL.md has no frontmatter to reconcile (the skill shape drifted). Update packages/cli/src/skills.ts.`);let c=J(e),l=i||c===``||c===`local`?z:c,u=a.slice(o+1,s).map(e=>e.startsWith(`source:`)?`source: ${l}`:W(e,t,n));u.some(e=>e.startsWith(`source:`))||u.push(`source: ${l}`);let d=W(a.slice(s+1).join(`
9
- `),t,n).replace(/^\n+/,``),f=l===z?`${ve()}\n\n`:``;return`---\n${u.join(`
10
- `)}\n---\n\n${f}${d}`},Z=(e,t,r)=>{let i=n(e,`.agents/skills`),a=V();if(!m(i))return a;let o=U(t.name),s=ye(e),c={};for(let e of Y(i)){let l=n(i,e,`SKILL.md`),u=h(l),d=X(u,o,t.name,e),f=r===void 0?void 0:r.get(e),p=s[e];if(f!==void 0){let n=J(f),r=t=>{g(l,f),t.push(e),p&&(c[e]=p)},i=K(n);if(n!==``&&i!==q){r(a.forkOwned);continue}if(i===q&&!f.includes(G)){r(a.forkOwned);continue}if(p){if(p.written!==H(f)){r(a.customized);continue}}else H(f)!==H(d)&&H(f)!==H(X(u,o,t.name,e,!0))&&a.unverified.push(e)}g(l,d),c[e]={ref:`main`,upstream:H(u),written:H(d)},a.adopted.push(e)}return S(n(e,B),c),a},xe=e=>{let t=n(e,`AGENTS.md`);if(!m(t))return!1;let r=h(t);return!r.includes(`<!-- skills:custom -->`)||!r.includes(`<!-- skills:vendored -->`)},Se=async e=>{if(m(n(e,`.github/scripts/skills-manager.ts`)))try{await F(`bun`,[`.github/scripts/skills-manager.ts`],e)}catch{}},Ce=(e,t)=>{let r=x(n(e,`package.json`)).name;return r?Z(e,{name:r},t):V()},Q={allowlist:!1,apiDocs:!0,blog:!0,docs:!0,internalDocs:!0,waitlist:!1},we=e=>`// Optional surfaces a fork enables or disables. Typed boolean (not \`as const\`) so a fork can flip them and the runtime gates are not dead code. Off means the routes 404 and the links, nav, sitemap, llms, and search drop the surface. waitlist off makes the home a plain landing page.
11
- export const features = {
12
- allowlist: ${e.allowlist},
13
- apiDocs: ${e.apiDocs},
14
- blog: ${e.blog},
15
- docs: ${e.docs},
16
- internalDocs: ${e.internalDocs},
17
- waitlist: ${e.waitlist},
18
- }
19
-
20
- export type Feature = keyof typeof features`,Te=({name:e},t=Q)=>{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.
21
- export const site = {
22
- name: "${n}",
23
- description: "${n} is just getting started. Tell its story here.",
24
- tagline: "Your tagline, ready when you are.",
25
- social: {
26
- discord: "",
27
- github: "",
28
- x: "",
29
- },
30
- // Local-only dev agent identity (api/hono agents router).
31
- agent: {
32
- name: "LocalAgent",
33
- email: "agent@local.host",
34
- },
35
- // Injectable long-form text blocks. A product sets its own, or leaves them empty.
36
- apiReferenceDescription: "",
37
- llmsFullPreamble: "",
38
- } as const
39
-
40
- export type Site = typeof site
41
-
42
- ${we(t)}
43
- `},Ee=()=>`import { features, site } from "@packages/config/site"
44
- import { redirect } from "next/navigation"
45
-
46
- // Fresh fork: the waitlist capture when the waitlist feature is on, otherwise a plain landing page. Replace this with your real home when ready.
47
- export default function Home() {
48
- if (features.waitlist) redirect("/waitlist")
49
-
50
- return (
51
- <main className="flex min-h-svh flex-col items-center justify-center p-8 text-center">
52
- <div className="mx-auto flex w-full max-w-xl flex-col items-center">
53
- <h1 className="mb-4 text-5xl font-bold tracking-tight sm:text-6xl">{site.name}</h1>
54
- <p className="text-muted-foreground max-w-md text-lg">{site.tagline}</p>
55
- </div>
56
- </main>
57
- )
58
- }
59
- `,De=()=>`# AGENTS.md
60
-
61
- Guidance for AI coding agents working in this repository.
62
-
63
- ## Instructions
64
-
65
- - ALWAYS: Use \`@/\` for imports, and follow the \`design\` skill for UI and styling conventions.
66
- - ALWAYS: Keep documentation in sync with every change.
67
- - NEVER: Include "Co-authored-by" in commit messages.
68
- - NEVER: Use em-dashes (the long dash, U+2014) in code, comments, docs, or copy. Regular hyphens are fine; for a pause or aside, use a comma, colon, or period.
69
-
70
- ## Skills
71
-
72
- Skills live in \`.agents/skills\` (symlinked to \`.claude/skills\` and \`.github/skills\`, so every agent tool reads the same files). Each is a \`SKILL.md\` with a \`description\` trigger and a literal procedure. Start with \`codebase-map\` to orient, then load the task skill that fits.
73
-
74
- These tables are generated from each skill's own description by \`bun .github/scripts/skills-manager.ts\`, which a pre-commit hook runs for you. **Custom** skills are maintained here; **vendored** skills are copied verbatim from an upstream project (re-vendor to update, do not hand-edit).
75
-
76
- **Custom**
77
-
78
- <!-- skills:custom -->
79
-
80
- <!-- /skills:custom -->
81
-
82
- **Vendored** (upstream, copied verbatim)
83
-
84
- <!-- skills:vendored -->
85
-
86
- <!-- /skills:vendored -->
87
- `,Oe=({name:e})=>`# ${e.charAt(0).toUpperCase()+e.slice(1)}
88
-
89
- Built on top of [ZeroStarter](https://zerostarter.dev).
90
-
91
- ## Development
92
-
93
- \`\`\`bash
94
- bun run dev
95
- \`\`\`
96
-
97
- This serves named \`.localhost\` dev URLs via portless (\`bunx portless list\` shows them); \`PORTLESS=0 bun run dev\` uses fixed ports instead (web \`:3000\`, api \`:4000\`).
98
- `,ke=()=>`---
99
- slug: /docs
100
- title: Introduction
101
- description: Documentation.
102
- ---
103
-
104
- # Introduction
105
-
106
- This is your documentation home. Start writing, this page is yours.
107
- `,Ae=()=>`---
108
- slug: /console/docs
109
- title: Introduction
110
- description: Internal documentation.
111
- ---
112
-
113
- # Introduction
114
-
115
- Your team's internal docs live here.
116
- `,je=e=>`---
117
- title: Blog
118
- description: Latest articles and updates
119
- createdAt: ${e}
120
- ---
121
-
122
- ## Recent Posts
123
-
124
- <BlogPostList />
125
- `,Me=e=>`---
126
- title: Hello World
127
- description: The first post on your new blog.
128
- createdAt: ${e}
129
- publishedAt: ${e}
130
- ---
131
-
132
- ## Hello World
133
-
134
- Your very first post. Replace it with something worth reading.
135
- `,Ne=()=>`import type { DocsConfig } from "./src/lib/docs"
136
-
137
- const docsConfig = {
138
- docs: {
139
- "Getting Started": [
140
- {
141
- "/docs": {
142
- title: "Introduction",
143
- description: "Documentation.",
144
- },
145
- },
146
- ],
147
- },
148
- console: {
149
- "Getting Started": [
150
- {
151
- "/console/docs": {
152
- title: "Introduction",
153
- description: "Internal documentation.",
154
- },
155
- },
156
- ],
157
- },
158
- } satisfies DocsConfig
159
-
160
- export default docsConfig
161
- `,$=(e,...t)=>n(e,...t),Pe=e=>{let t=$(e,`.gitpickignore`);if(m(t)){for(let n of p(h(t)).excludes){if(/[*?![\]]/.test(n))throw Error(`.gitpickignore entry "${n}" is not a literal path; the in-place converter only supports literal paths (a glob or negation would diverge from gitpick's fetch).`);_($(e,n))}_(t)}},Fe=/[ \t]*\{[^}\r\n]*href:[ \t]*["']\/hire["'][^}\r\n]*\},?[ \t]*\r?\n/,Ie=(e,t)=>{let n=new Date,r=n.toISOString().slice(0,10),i=[n.getFullYear(),n.getMonth()+1,n.getDate()].map(e=>String(e).padStart(2,`0`)).join(`-`),a=i<r?i:r;g($(e,`web/next/content/docs/index.mdx`),ke()),g($(e,`web/next/content/blog/index.mdx`),je(a)),g($(e,`web/next/content/blog/hello-world.mdx`),Me(a)),g($(e,`web/next/content/console/docs/index.mdx`),Ae()),g($(e,`web/next/docs.config.ts`),Ne()),g($(e,`web/next/public/.gitkeep`),``),g($(e,`web/next/src/app/page.tsx`),Ee()),g($(e,`AGENTS.md`),De()),g($(e,`README.md`),Oe(t))},Le=`web/next/src/lib/marketing/fonts.ts`,Re=e=>m($(e,Le)),ze=(e,t=!1)=>{let n=$(e,`web/next/src/lib/fonts.ts`),r=$(e,Le),i=$(e,`web/next/src/components/common/navbar.tsx`);if(ee(i,Fe),m(r)&&!t)throw Error(`web/next/src/lib/marketing/fonts.ts survived the fork strip (add web/next/src/lib/marketing/ to .gitpickignore).`);if(m(n)&&h(n).includes(`fonts/marketing/`))throw Error(`fonts.ts references fonts/marketing/; author-only marketing fonts must live in the fork-excluded web/next/src/lib/marketing/, not the shared fonts.ts.`);if(m(i)&&/href:\s*["']\/hire["']/.test(h(i)))throw Error(`common/navbar.tsx still has the /hire entry after fixDangling (regex drift). Update packages/cli/src/convert.ts.`)},Be=(e,t)=>{for(let[n,r]of[[`web/next`,t],[`api/hono`,`api.${t}`]]){let t=$(e,n,`package.json`),i=x(t),a=i.portless;if(!a||typeof a!=`object`||Array.isArray(a))throw Error(`${n}/package.json has no "portless" object to rebrand (the dev-URL setup drifted). Update packages/cli/src/convert.ts.`);let o=a;o.name=r,S(t,i)}},Ve=e=>{let t=x($(e,`package.json`)).name;t&&Be(e,U(t))},He=(e,t,n)=>{g($(e,`packages/config/src/site.ts`),Te(t,n));let r=U(t.name),i=$(e,`package.json`),a=x(i);a.name=r,a.version=`0.0.0`;for(let e of te)delete a[e];S(i,a),Be(e,r)},Ue=(e,t,n=Q)=>{Pe(e),Ie(e,t),ze(e),He(e,t,n),Z(e,t)};export{x as A,D as C,m as D,y as E,g as M,S as N,b as O,p as P,k as S,oe as T,w as _,Q as a,se as b,Ce as c,me as d,ge as f,A as g,_e as h,Ve as i,_ as j,h as k,Se as l,I as m,ze as n,V as o,F as p,Re as r,xe as s,Ue as t,be as u,E as v,ce as w,ue as x,T as y};