zerostarter 0.0.7 → 0.0.8
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/dist/bin/index.mjs
CHANGED
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,t}from"../convert-
|
|
2
|
+
import{n as e,t}from"../convert-BzMTXW9D.mjs";import{basename as n,join as r,resolve as i}from"node:path";import{existsSync as a,readdirSync as o}from"node:fs";import{createInterface as s}from"node:readline/promises";import{parseArgs as c}from"node:util";import{execFileSync as l}from"node:child_process";var u={name:`zerostarter`,version:`0.0.8`,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`,test:`bun test`},devDependencies:{"@packages/config":`workspace:*`,"@types/bun":`catalog:`,"@types/node":`catalog:`,tsdown:`catalog:`,typescript:`catalog:`}};const d=()=>!!(process.stdin.isTTY&&process.stdout.isTTY),f=(e,t=e)=>process.stdout.isTTY?`\x1b]8;;${e}\x07${t}\x1b]8;;\x07`:e,p=(e,t=process.stdout)=>n=>t.isTTY?`\x1b[${e}m${n}\x1b[0m`:n,m=p(`38;5;208`),h=p(`38;2;63;185;80`),g=p(`38;2;210;153;34`),_=p(`38;2;248;81;73`,process.stderr),v=async(e,t=``)=>{let n=s({input:process.stdin,output:process.stdout});try{return(await n.question(`${e}${t?` (${t})`:``}: `)).trim()||t}finally{n.close()}},y=async(e,t=!0)=>{let n=s({input:process.stdin,output:process.stdout});try{let r=(await n.question(`${e} (${t?`Y/n`:`y/N`}) `)).trim().toLowerCase();return r?r===`y`||r===`yes`:t}finally{n.close()}},b=(e,t,n)=>l(e,t,{cwd:n,encoding:`utf8`,stdio:[`ignore`,`pipe`,`pipe`]}),x=(e,t=`main`)=>{b(`bunx`,[`gitpick@5.4.1`,`https://github.com/nrjdalal/zerostarter/tree/${t}`,e])},S=e=>{b(`bun`,[`install`],e)},C=e=>{b(`git`,[`init`,`-q`],e)},w=(e,t)=>{b(`git`,[`add`,`-A`],e);try{b(`git`,[`commit`,`--no-verify`,`-q`,`-m`,t],e)}catch{}},T=e=>!a(e)||o(e).filter(e=>e!==`.git`).length===0,E=t=>e(r(t,`packages/config/src/site.ts`)),D=async a=>{let{positionals:o,values:s}=c({allowPositionals:!0,args:a,options:{"dry-run":{type:`boolean`},help:{short:`h`,type:`boolean`},yes:{short:`y`,type:`boolean`}}});if(s.help){console.log(`Usage:
|
|
3
3
|
$ zerostarter init [dir] [options]
|
|
4
4
|
|
|
5
|
-
Scaffold
|
|
5
|
+
Scaffold ZeroStarter into dir (default .) as a fresh product. The author's
|
|
6
6
|
content, public assets, and agent skills are left out for you to supply; the
|
|
7
7
|
dir name becomes the project name and site.ts + package.json are rebranded. If
|
|
8
|
-
the dir already holds a
|
|
9
|
-
latest
|
|
8
|
+
the dir already holds a ZeroStarter clone it is used in place; otherwise the
|
|
9
|
+
latest ZeroStarter is fetched into it first.
|
|
10
10
|
|
|
11
11
|
Options:
|
|
12
12
|
-y, --yes Skip prompts; fail instead of prompting when input is needed
|
|
13
13
|
--dry-run Print the plan without writing anything
|
|
14
|
-
-h, --help Display help`);return}let l
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
${C}@${w}
|
|
14
|
+
-h, --help Display help`);return}let l=d()&&!s.yes,u=o[0]??`.`,f=i(u),p=E(f);if(!p&&!T(f)){if(!l)throw Error(`Target directory is not empty. Pass an empty target dir, for example: zerostarter init my-product`);let e=await v(`Target directory is not empty. New project directory`);if(!e)throw Error(`No directory name provided.`);u=e}let _=i(u),b=n(_),D={name:b};if(s[`dry-run`]){console.log(`zerostarter init (dry run)`),console.log(` target: ${_}`),console.log(` name: ${b}`),console.log(` mode: ${E(_)?`in place`:`fetch first`}`);return}if(p&&l&&!await y(g(`Convert ${_} in place? This rewrites files and commits.`),!1)){console.log(`Aborted.`);return}E(_)||(console.log(`Fetching the latest ZeroStarter ...`),x(_)),e(r(_,`.git`))||(C(_),w(_,`chore: scaffold from zerostarter`)),console.log(`Removing starter content and rebranding ...`),t(_,D),console.log(`Installing dependencies ...`),S(_),w(_,`chore: re-baseline as ${b}`);let O=[[`packages/config/src/site.ts`,`your brand: name, tagline, links`],[`web/next/content`,`your docs and blog`],[`web/next/public`,`your logo and assets`]];console.log(`\n${h(`✓`)} ${b} is ready.\n`),console.log(`Next steps:`),_!==process.cwd()&&console.log(` ${m(`cd ${u}`)}`),console.log(` ${m(`cp .env.example .env`)} # add your secrets`),console.log(` ${m(`bun dev`)}`),console.log(`
|
|
15
|
+
Make it yours:`);for(let[e,t]of O)console.log(` ${e.padEnd(29)} ${t}`)},O=async e=>{console.log(`zerostarter sync is not implemented yet.`),console.log(`Planned: a gitpick overlay of the latest zerostarter onto an existing fork, then a`),console.log(`prune of starter-only artifacts while preserving the fork's product and branding.`)},{author:k,name:A,version:j}=u,M=`Version:
|
|
16
|
+
${A}@${j}
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
sync with upstream.
|
|
18
|
+
Go from zero to a production-ready SaaS, rebranded and ready to ship.
|
|
21
19
|
|
|
22
20
|
Usage:
|
|
23
|
-
$ ${
|
|
21
|
+
$ ${A} <command> [options]
|
|
24
22
|
|
|
25
23
|
Commands:
|
|
26
|
-
init [dir] Scaffold
|
|
24
|
+
init [dir] Scaffold ZeroStarter into dir (default .) as a fresh product.
|
|
27
25
|
The dir name becomes the project name.
|
|
28
|
-
sync Re-baseline an existing fork on
|
|
26
|
+
sync Re-baseline an existing fork on ZeroStarter's latest scaffold
|
|
29
27
|
|
|
30
28
|
Options:
|
|
31
29
|
-v, --version Display version
|
|
32
30
|
-h, --help Display help
|
|
33
31
|
|
|
34
32
|
Author:
|
|
35
|
-
${
|
|
33
|
+
${k.name} <${k.email}> (${f(k.url)})`;(async()=>{try{let e=process.argv.slice(2),t=e[0],n=e.slice(1);switch(t){case`init`:return await D(n);case`sync`:return await O(n);case void 0:case`-h`:case`--help`:console.log(M);return;case`-v`:case`--version`:console.log(`${A}@${j}`);return;default:console.error(_(`Unknown command: ${t}\n`)),console.log(M),process.exit(1)}}catch(e){console.error(_(e instanceof Error?e.message:String(e))),process.exit(1)}})();export{};
|
|
@@ -91,7 +91,7 @@ const docsConfig = {
|
|
|
91
91
|
} satisfies DocsConfig
|
|
92
92
|
|
|
93
93
|
export default docsConfig
|
|
94
|
-
`,S=(e,...n)=>t(e,...n),C=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`app`,w=[`web/next/content`,`web/next/public`,`.agents/skills`,`.claude/skills`,`.github/skills`],T=[`packages/cli`,`.github/workflows/cli-release.yml`,`.github/audit`,`.github/reviews`,`.infisical.json`,`.github/assets/graph-build.svg`,`.github/FUNDING.yml`,`LICENSE.md`,`CHANGELOG.md`,`bun.lock`,`skills-lock.json`,`web/next/src/app/hire`,`web/next/src/app/resume`,`web/next/src/fonts/caveat-latin-wght-normal.woff2`,`web/next/src/fonts/newsreader-latin-wght-normal.woff2`,`web/next/src/fonts/newsreader-latin-wght-italic.woff2`],E=e=>{let t=new Date,n=t.toISOString().slice(0,10),r=[t.getFullYear(),t.getMonth()+1,t.getDate()].map(e=>String(e).padStart(2,`0`)).join(`-`),i=r<n?r:n;l(S(e,`web/next/content/docs/index.mdx`),_()),l(S(e,`web/next/content/blog/index.mdx`),y(i)),l(S(e,`web/next/content/blog/hello-world.mdx`),b(i)),l(S(e,`web/next/content/console/docs/index.mdx`),v()),l(S(e,`web/next/docs.config.ts`),x()),l(S(e,`web/next/public/.gitkeep`),``),l(S(e,`web/next/src/app/page.tsx`),h()),l(S(e,`AGENTS.md`),g())},D=e=>{let t=p(S(e,`web/next/src/components/navbar/home.tsx`),[[` { href: "/hire", label: "Hire" },
|
|
94
|
+
`,S=(e,...n)=>t(e,...n),C=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`app`,w=[`web/next/content`,`web/next/public`,`.agents/skills`,`.claude/skills`,`.github/skills`],T=[`packages/cli`,`.github/workflows/cli-release.yml`,`.github/audit`,`.github/reviews`,`.infisical.json`,`.github/assets/graph-build.svg`,`.github/assets/cli.tape`,`.github/assets/setup.sh`,`.github/assets/cli.gif`,`.github/FUNDING.yml`,`LICENSE.md`,`CHANGELOG.md`,`bun.lock`,`skills-lock.json`,`web/next/src/app/hire`,`web/next/src/app/resume`,`web/next/src/fonts/caveat-latin-wght-normal.woff2`,`web/next/src/fonts/newsreader-latin-wght-normal.woff2`,`web/next/src/fonts/newsreader-latin-wght-italic.woff2`],E=e=>{let t=new Date,n=t.toISOString().slice(0,10),r=[t.getFullYear(),t.getMonth()+1,t.getDate()].map(e=>String(e).padStart(2,`0`)).join(`-`),i=r<n?r:n;l(S(e,`web/next/content/docs/index.mdx`),_()),l(S(e,`web/next/content/blog/index.mdx`),y(i)),l(S(e,`web/next/content/blog/hello-world.mdx`),b(i)),l(S(e,`web/next/content/console/docs/index.mdx`),v()),l(S(e,`web/next/docs.config.ts`),x()),l(S(e,`web/next/public/.gitkeep`),``),l(S(e,`web/next/src/app/page.tsx`),h()),l(S(e,`AGENTS.md`),g())},D=e=>{let t=p(S(e,`web/next/src/components/navbar/home.tsx`),[[` { href: "/hire", label: "Hire" },
|
|
95
95
|
`,``]]),n=p(S(e,`web/next/src/lib/fonts.ts`),[[`
|
|
96
96
|
export const caveat = localFont({
|
|
97
97
|
src: "../fonts/caveat-latin-wght-normal.woff2",
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./convert-
|
|
1
|
+
import{t as e}from"./convert-BzMTXW9D.mjs";export{e as convertRepo};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zerostarter",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.8",
|
|
4
|
+
"description": "Go from zero to a production-ready SaaS, rebranded and ready to ship.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
7
7
|
"saas",
|