@murumets-ee/create 0.6.0 → 0.7.0

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/cli.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import*as e from"@clack/prompts";import t from"picocolors";import{existsSync as n,readFileSync as r}from"node:fs";import{readFile as i,readdir as a,rm as o,writeFile as s}from"node:fs/promises";import{dirname as c,join as l}from"node:path";import{fileURLToPath as u}from"node:url";import{extract as d}from"tar";import{execSync as f}from"node:child_process";function p(e){let t={},n=e.slice(2);for(let e=0;e<n.length;e++){let r=n[e];if(r===`--full`)t.preset=`demo`;else if(r===`--preset`&&n[e+1]){let r=n[++e];(r===`minimal`||r===`demo`)&&(t.preset=r)}else if(r.startsWith(`--preset=`)){let e=r.slice(9);(e===`minimal`||e===`demo`)&&(t.preset=e)}else r===`--install`?t.install=!0:r===`--no-install`?t.install=!1:!r.startsWith(`-`)&&!t.name&&(t.name=r)}return t}async function m(t){let n=p(process.argv),r=n.name??t;if(n.preset===`demo`&&n.install===!1)return e.intro(`@murumets-ee/create`),e.cancel("Preset `demo` installs plugins via `lumi add` after deps resolve, so --install must be true (or pick `minimal`)."),null;if(r&&n.install!==void 0&&n.preset!==void 0)return{name:r,installDeps:n.install,preset:n.preset};e.intro(`@murumets-ee/create`);let i=r??await e.text({message:`Project name:`,placeholder:`my-project`,validate:e=>{if(!e)return`Project name is required`;if(!/^[a-z0-9-]+$/.test(e))return`Use lowercase letters, numbers, and hyphens only`}});if(e.isCancel(i))return e.cancel(`Cancelled.`),null;let a=n.preset??await e.select({message:`Preset:`,options:[{value:`demo`,label:`Demo`,hint:`auth + media + ticketing (recommended for first-time setup)`},{value:`minimal`,label:`Minimal`,hint:"auth + infrastructure only — add plugins with `lumi add`"}],initialValue:`demo`});if(e.isCancel(a))return e.cancel(`Cancelled.`),null;let o=n.install??await e.confirm({message:`Install dependencies?`,initialValue:!0});return e.isCancel(o)?(e.cancel(`Cancelled.`),null):a===`demo`&&!o?(e.cancel("Preset `demo` installs plugins via `lumi add` after deps resolve, so --install must be true (or pick `minimal`)."),null):{name:i,installDeps:o,preset:a}}async function h(e,t){for(let n of t)await o(l(e,n),{force:!0,recursive:!0})}function g(e,t){return t?.inherit?(f(e,{cwd:t.cwd,stdio:`inherit`}),``):f(e,{cwd:t?.cwd,stdio:`pipe`,encoding:`utf-8`})}const _=new Set([`.ts`,`.tsx`,`.mts`,`.json`,`.md`,`.yml`,`.yaml`,`.css`,`.html`]),v=new Set([`.env.example`,`Dockerfile`,`.gitignore`]),y=`__PROJECT_NAME__`,b=`__PROJECT_NAME_TITLE__`;async function x(e,t){await S(e,t)}async function S(e,t){let n=l(process.cwd(),e.name);if(t?.(`Creating Next.js app...`),g(`pnpm create next-app@16 ${e.name} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await h(n,[`app/page.tsx`,`app/page.module.css`,`app/fonts`,`app/globals.css`,`README.md`]),t?.(`Extracting template...`),await w(n),t?.(`Personalizing template...`),await E(n,e.name),e.installDeps&&(t?.(`Installing dependencies...`),g(`pnpm install`,{cwd:n})),e.preset===`demo`){if(!e.installDeps)throw Error("Preset `demo` requires --install because the `lumi add` step runs from the scaffolded project. Re-run without --no-install, or pass --preset=minimal.");for(let e of C)t?.(`Adding ${e} plugin...`),g(`pnpm exec lumi add ${e}`,{cwd:n,inherit:!0})}}const C=[`media`,`ticketing`];async function w(e){let t=T();if(!n(t))throw Error(`Template tarball missing: ${t}\nRun \`pnpm --filter @murumets-ee/create build:templates\` first.`);await d({file:t,cwd:e})}function T(){let e=c(u(import.meta.url)),t=e;for(let e=0;e<5;e++){let e=l(t,`package.json`);if(n(e))try{if(JSON.parse(r(e,`utf-8`)).name===`@murumets-ee/create`)return l(t,`templates`,`template-demo.tar.gz`)}catch{}let i=c(t);if(i===t)break;t=i}throw Error(`Could not find @murumets-ee/create package root above ${e}. template-demo.tar.gz cannot be located.`)}async function E(e,t){let n=A(t);for await(let r of O(e)){if(!k(r))continue;let e=await i(r,`utf-8`);!e.includes(y)&&!e.includes(b)||await s(r,e.split(b).join(n).split(y).join(t),`utf-8`)}}const D=new Set([`node_modules`,`dist`,`build`,`coverage`,`out`]);async function*O(e){let t=await a(e,{withFileTypes:!0});for(let n of t){let t=l(e,n.name);if(n.isDirectory()){if(D.has(n.name)||n.name.startsWith(`.`))continue;yield*O(t)}else n.isFile()&&(yield t)}}function k(e){let t=e.lastIndexOf(`/`),n=t>=0?e.slice(t+1):e;if(v.has(n))return!0;let r=n.lastIndexOf(`.`);if(r<0)return!1;let i=n.slice(r);return _.has(i)}function A(e){return e.split(/[-_\s]+/).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(` `)}async function j(){let n=process.argv[2],r=await m(n);if(!r)return;let i=e.spinner();try{i.start(`Creating Next.js app...`),await x(r,e=>{i.stop(`${t.green(`✓`)} Done`),i.start(e)}),i.stop(`${t.green(`✓`)} Done`);let n=[`cd ${r.name}`,`cp .env.example .env`,`# Edit .env — set DATABASE_URL and BETTER_AUTH_SECRET`,`docker compose up -d`,`pnpm db:migrate`,`pnpm dev`,`# Sign up at /auth/sign-up — first user is auto-promoted to admin`];e.note(n.join(`
2
+ import*as e from"@clack/prompts";import t from"picocolors";import{existsSync as n,readFileSync as r}from"node:fs";import{readFile as i,readdir as a,rm as o,writeFile as s}from"node:fs/promises";import{dirname as c,join as l}from"node:path";import{fileURLToPath as u}from"node:url";import{extract as d}from"tar";import{execSync as f}from"node:child_process";function p(e){let t={},n=e.slice(2);for(let e=0;e<n.length;e++){let r=n[e];if(r===`--full`)t.preset=`demo`;else if(r===`--preset`&&n[e+1]){let r=n[++e];(r===`minimal`||r===`demo`)&&(t.preset=r)}else if(r.startsWith(`--preset=`)){let e=r.slice(9);(e===`minimal`||e===`demo`)&&(t.preset=e)}else r===`--install`?t.install=!0:r===`--no-install`?t.install=!1:!r.startsWith(`-`)&&!t.name&&(t.name=r)}return t}async function m(t){let n=p(process.argv),r=n.name??t;if(n.preset===`demo`&&n.install===!1)return e.intro(`@murumets-ee/create`),e.cancel("Preset `demo` installs plugins via `lumi add` after deps resolve, so --install must be true (or pick `minimal`)."),null;if(r&&n.install!==void 0&&n.preset!==void 0)return{name:r,installDeps:n.install,preset:n.preset};e.intro(`@murumets-ee/create`);let i=r??await e.text({message:`Project name:`,placeholder:`my-project`,validate:e=>{if(!e)return`Project name is required`;if(!/^[a-z0-9-]+$/.test(e))return`Use lowercase letters, numbers, and hyphens only`}});if(e.isCancel(i))return e.cancel(`Cancelled.`),null;let a=n.preset??await e.select({message:`Preset:`,options:[{value:`demo`,label:`Demo`,hint:`auth + media + ticketing (recommended for first-time setup)`},{value:`minimal`,label:`Minimal`,hint:"auth + infrastructure only — add plugins with `lumi add`"}],initialValue:`demo`});if(e.isCancel(a))return e.cancel(`Cancelled.`),null;let o=n.install??await e.confirm({message:`Install dependencies?`,initialValue:!0});return e.isCancel(o)?(e.cancel(`Cancelled.`),null):a===`demo`&&!o?(e.cancel("Preset `demo` installs plugins via `lumi add` after deps resolve, so --install must be true (or pick `minimal`)."),null):{name:i,installDeps:o,preset:a}}async function h(e,t){for(let n of t)await o(l(e,n),{force:!0,recursive:!0})}function g(e,t){return t?.inherit?(f(e,{cwd:t.cwd,stdio:`inherit`}),``):f(e,{cwd:t?.cwd,stdio:`pipe`,encoding:`utf-8`})}const _=new Set([`.ts`,`.tsx`,`.mts`,`.json`,`.md`,`.yml`,`.yaml`,`.css`,`.html`]),v=new Set([`.env.example`,`Dockerfile`,`.gitignore`]),y=`__PROJECT_NAME__`,b=`__PROJECT_NAME_TITLE__`;async function x(e,t){await S(e,t)}async function S(e,t){let n=l(process.cwd(),e.name);if(t?.(`Creating Next.js app...`),g(`pnpm create next-app@16 ${e.name} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await h(n,[`app/page.tsx`,`app/page.module.css`,`app/fonts`,`app/globals.css`,`README.md`]),t?.(`Extracting template...`),await w(n),t?.(`Personalizing template...`),await E(n,e.name),e.installDeps&&(t?.(`Installing dependencies...`),g(`pnpm install`,{cwd:n})),e.preset===`demo`){if(!e.installDeps)throw Error("Preset `demo` requires --install because the `lumi add` step runs from the scaffolded project. Re-run without --no-install, or pass --preset=minimal.");for(let e of C)t?.(`Adding ${e} plugin...`),g(`pnpm exec lumi add ${e}`,{cwd:n,inherit:!0})}}const C=[`taxonomy`,`blog`,`media`,`ticketing`];async function w(e){let t=T();if(!n(t))throw Error(`Template tarball missing: ${t}\nRun \`pnpm --filter @murumets-ee/create build:templates\` first.`);await d({file:t,cwd:e})}function T(){let e=c(u(import.meta.url)),t=e;for(let e=0;e<5;e++){let e=l(t,`package.json`);if(n(e))try{if(JSON.parse(r(e,`utf-8`)).name===`@murumets-ee/create`)return l(t,`templates`,`template-demo.tar.gz`)}catch{}let i=c(t);if(i===t)break;t=i}throw Error(`Could not find @murumets-ee/create package root above ${e}. template-demo.tar.gz cannot be located.`)}async function E(e,t){let n=A(t);for await(let r of O(e)){if(!k(r))continue;let e=await i(r,`utf-8`);!e.includes(y)&&!e.includes(b)||await s(r,e.split(b).join(n).split(y).join(t),`utf-8`)}}const D=new Set([`node_modules`,`dist`,`build`,`coverage`,`out`]);async function*O(e){let t=await a(e,{withFileTypes:!0});for(let n of t){let t=l(e,n.name);if(n.isDirectory()){if(D.has(n.name)||n.name.startsWith(`.`))continue;yield*O(t)}else n.isFile()&&(yield t)}}function k(e){let t=e.lastIndexOf(`/`),n=t>=0?e.slice(t+1):e;if(v.has(n))return!0;let r=n.lastIndexOf(`.`);if(r<0)return!1;let i=n.slice(r);return _.has(i)}function A(e){return e.split(/[-_\s]+/).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(` `)}async function j(){let n=process.argv[2],r=await m(n);if(!r)return;let i=e.spinner();try{i.start(`Creating Next.js app...`),await x(r,e=>{i.stop(`${t.green(`✓`)} Done`),i.start(e)}),i.stop(`${t.green(`✓`)} Done`);let n=[`cd ${r.name}`,`cp .env.example .env`,`# Edit .env — set DATABASE_URL and BETTER_AUTH_SECRET`,`docker compose up -d`,`pnpm db:migrate`,`pnpm exec lumi create-admin`,`# Bootstraps the first admin user. Public sign-up is closed by default.`,`pnpm dev`,`# Sign in at /auth/sign-in with the admin credentials you just created`];e.note(n.join(`
3
3
  `),`Next steps`),e.outro(`${t.green(`Success!`)} Your project is ready.`)}catch(n){i.stop(t.red(`Failed.`)),e.log.error(n instanceof Error?n.message:String(n)),process.exit(1)}}j();export{};
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{existsSync as e,readFileSync as t}from"node:fs";import{readFile as n,readdir as r,rm as i,writeFile as a}from"node:fs/promises";import{dirname as o,join as s}from"node:path";import{fileURLToPath as c}from"node:url";import{extract as l}from"tar";import{execSync as u}from"node:child_process";async function d(e,t){for(let n of t)await i(s(e,n),{force:!0,recursive:!0})}function f(e,t){return t?.inherit?(u(e,{cwd:t.cwd,stdio:`inherit`}),``):u(e,{cwd:t?.cwd,stdio:`pipe`,encoding:`utf-8`})}const p=new Set([`.ts`,`.tsx`,`.mts`,`.json`,`.md`,`.yml`,`.yaml`,`.css`,`.html`]),m=new Set([`.env.example`,`Dockerfile`,`.gitignore`]),h=`__PROJECT_NAME__`,g=`__PROJECT_NAME_TITLE__`;async function _(e,t){await v(e,t)}async function v(e,t){let n=s(process.cwd(),e.name);if(t?.(`Creating Next.js app...`),f(`pnpm create next-app@16 ${e.name} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await d(n,[`app/page.tsx`,`app/page.module.css`,`app/fonts`,`app/globals.css`,`README.md`]),t?.(`Extracting template...`),await b(n),t?.(`Personalizing template...`),await S(n,e.name),e.installDeps&&(t?.(`Installing dependencies...`),f(`pnpm install`,{cwd:n})),e.preset===`demo`){if(!e.installDeps)throw Error("Preset `demo` requires --install because the `lumi add` step runs from the scaffolded project. Re-run without --no-install, or pass --preset=minimal.");for(let e of y)t?.(`Adding ${e} plugin...`),f(`pnpm exec lumi add ${e}`,{cwd:n,inherit:!0})}}const y=[`media`,`ticketing`];async function b(t){let n=x();if(!e(n))throw Error(`Template tarball missing: ${n}\nRun \`pnpm --filter @murumets-ee/create build:templates\` first.`);await l({file:n,cwd:t})}function x(){let n=o(c(import.meta.url)),r=n;for(let n=0;n<5;n++){let n=s(r,`package.json`);if(e(n))try{if(JSON.parse(t(n,`utf-8`)).name===`@murumets-ee/create`)return s(r,`templates`,`template-demo.tar.gz`)}catch{}let i=o(r);if(i===r)break;r=i}throw Error(`Could not find @murumets-ee/create package root above ${n}. template-demo.tar.gz cannot be located.`)}async function S(e,t){let r=E(t);for await(let i of w(e)){if(!T(i))continue;let e=await n(i,`utf-8`);!e.includes(h)&&!e.includes(g)||await a(i,e.split(g).join(r).split(h).join(t),`utf-8`)}}const C=new Set([`node_modules`,`dist`,`build`,`coverage`,`out`]);async function*w(e){let t=await r(e,{withFileTypes:!0});for(let n of t){let t=s(e,n.name);if(n.isDirectory()){if(C.has(n.name)||n.name.startsWith(`.`))continue;yield*w(t)}else n.isFile()&&(yield t)}}function T(e){let t=e.lastIndexOf(`/`),n=t>=0?e.slice(t+1):e;if(m.has(n))return!0;let r=n.lastIndexOf(`.`);if(r<0)return!1;let i=n.slice(r);return p.has(i)}function E(e){return e.split(/[-_\s]+/).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(` `)}export{_ as scaffold};
1
+ import{existsSync as e,readFileSync as t}from"node:fs";import{readFile as n,readdir as r,rm as i,writeFile as a}from"node:fs/promises";import{dirname as o,join as s}from"node:path";import{fileURLToPath as c}from"node:url";import{extract as l}from"tar";import{execSync as u}from"node:child_process";async function d(e,t){for(let n of t)await i(s(e,n),{force:!0,recursive:!0})}function f(e,t){return t?.inherit?(u(e,{cwd:t.cwd,stdio:`inherit`}),``):u(e,{cwd:t?.cwd,stdio:`pipe`,encoding:`utf-8`})}const p=new Set([`.ts`,`.tsx`,`.mts`,`.json`,`.md`,`.yml`,`.yaml`,`.css`,`.html`]),m=new Set([`.env.example`,`Dockerfile`,`.gitignore`]),h=`__PROJECT_NAME__`,g=`__PROJECT_NAME_TITLE__`;async function _(e,t){await v(e,t)}async function v(e,t){let n=s(process.cwd(),e.name);if(t?.(`Creating Next.js app...`),f(`pnpm create next-app@16 ${e.name} --typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias "@/*"`),await d(n,[`app/page.tsx`,`app/page.module.css`,`app/fonts`,`app/globals.css`,`README.md`]),t?.(`Extracting template...`),await b(n),t?.(`Personalizing template...`),await S(n,e.name),e.installDeps&&(t?.(`Installing dependencies...`),f(`pnpm install`,{cwd:n})),e.preset===`demo`){if(!e.installDeps)throw Error("Preset `demo` requires --install because the `lumi add` step runs from the scaffolded project. Re-run without --no-install, or pass --preset=minimal.");for(let e of y)t?.(`Adding ${e} plugin...`),f(`pnpm exec lumi add ${e}`,{cwd:n,inherit:!0})}}const y=[`taxonomy`,`blog`,`media`,`ticketing`];async function b(t){let n=x();if(!e(n))throw Error(`Template tarball missing: ${n}\nRun \`pnpm --filter @murumets-ee/create build:templates\` first.`);await l({file:n,cwd:t})}function x(){let n=o(c(import.meta.url)),r=n;for(let n=0;n<5;n++){let n=s(r,`package.json`);if(e(n))try{if(JSON.parse(t(n,`utf-8`)).name===`@murumets-ee/create`)return s(r,`templates`,`template-demo.tar.gz`)}catch{}let i=o(r);if(i===r)break;r=i}throw Error(`Could not find @murumets-ee/create package root above ${n}. template-demo.tar.gz cannot be located.`)}async function S(e,t){let r=E(t);for await(let i of w(e)){if(!T(i))continue;let e=await n(i,`utf-8`);!e.includes(h)&&!e.includes(g)||await a(i,e.split(g).join(r).split(h).join(t),`utf-8`)}}const C=new Set([`node_modules`,`dist`,`build`,`coverage`,`out`]);async function*w(e){let t=await r(e,{withFileTypes:!0});for(let n of t){let t=s(e,n.name);if(n.isDirectory()){if(C.has(n.name)||n.name.startsWith(`.`))continue;yield*w(t)}else n.isFile()&&(yield t)}}function T(e){let t=e.lastIndexOf(`/`),n=t>=0?e.slice(t+1):e;if(m.has(n))return!0;let r=n.lastIndexOf(`.`);if(r<0)return!1;let i=n.slice(r);return p.has(i)}function E(e){return e.split(/[-_\s]+/).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(` `)}export{_ as scaffold};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["tarExtract"],"sources":["../src/utils.ts","../src/scaffold.ts"],"sourcesContent":["import { execSync } from 'node:child_process'\nimport { appendFile, writeFile as fsWriteFile, mkdir, readFile, rm } from 'node:fs/promises'\nimport { dirname, join } from 'node:path'\n\n/** Write a file, creating parent directories as needed */\nexport async function writeFile(filePath: string, content: string): Promise<void> {\n await mkdir(dirname(filePath), { recursive: true })\n await fsWriteFile(filePath, content, 'utf-8')\n}\n\n/** Read and parse package.json, merge in new deps/scripts, write back */\nexport async function mergePackageJson(\n pkgPath: string,\n merge: {\n type?: string\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n scripts?: Record<string, string>\n },\n): Promise<void> {\n const raw = await readFile(pkgPath, 'utf-8')\n const pkg = JSON.parse(raw)\n\n if (merge.type) {\n pkg.type = merge.type\n }\n if (merge.dependencies) {\n pkg.dependencies = { ...pkg.dependencies, ...merge.dependencies }\n }\n if (merge.devDependencies) {\n pkg.devDependencies = { ...pkg.devDependencies, ...merge.devDependencies }\n }\n if (merge.scripts) {\n pkg.scripts = { ...pkg.scripts, ...merge.scripts }\n }\n\n await fsWriteFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\\n`, 'utf-8')\n}\n\n/** Delete files (silently ignores missing) */\nexport async function deleteFiles(basePath: string, files: string[]): Promise<void> {\n for (const file of files) {\n await rm(join(basePath, file), { force: true, recursive: true })\n }\n}\n\n/**\n * Run a shell command synchronously.\n *\n * `stdio: 'pipe'` by default so return-value-style callers get the\n * captured stdout. Pass `inherit: true` for commands whose output the\n * user should see in real time (and where the buffered error-on-fail\n * behavior of pipe would hide diagnostics — e.g. `pnpm exec lumi add`\n * in the demo-preset post-install loop).\n */\nexport function runCommand(\n cmd: string,\n options?: { cwd?: string; inherit?: boolean },\n): string {\n if (options?.inherit) {\n execSync(cmd, { cwd: options.cwd, stdio: 'inherit' })\n return ''\n }\n return execSync(cmd, {\n cwd: options?.cwd,\n stdio: 'pipe',\n encoding: 'utf-8',\n })\n}\n\n/** Append content to a file */\nexport async function appendToFile(filePath: string, content: string): Promise<void> {\n await appendFile(filePath, content, 'utf-8')\n}\n","import { existsSync, readFileSync } from 'node:fs'\nimport { readdir, readFile, writeFile } from 'node:fs/promises'\nimport { dirname, join } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { extract as tarExtract } from 'tar'\nimport type { ProjectOptions } from './types'\nimport { deleteFiles, runCommand } from './utils'\n\n// Major Next.js version passed to `pnpm create next-app@<ver>`.\n// Bumped when the toolkit as a whole moves to a new Next major.\nconst CREATE_NEXT_APP_VERSION = '16'\n\nexport type ProgressCallback = (message: string) => void\n\n// File extensions eligible for token replacement during scaffolding.\nconst TOKENIZABLE_EXTENSIONS = new Set<string>([\n '.ts',\n '.tsx',\n '.mts',\n '.json',\n '.md',\n '.yml',\n '.yaml',\n '.css',\n '.html',\n])\n\nconst TOKENIZABLE_BASENAMES = new Set<string>(['.env.example', 'Dockerfile', '.gitignore'])\n\nconst TOKEN_PROJECT_NAME = '__PROJECT_NAME__'\nconst TOKEN_PROJECT_NAME_TITLE = '__PROJECT_NAME_TITLE__'\n\nexport async function scaffold(\n options: ProjectOptions,\n onProgress?: ProgressCallback,\n): Promise<void> {\n await scaffoldSingle(options, onProgress)\n}\n\n// ---------------------------------------------------------------------------\n// scaffoldSingle — extract a prebuilt tarball, then tokenize.\n// ---------------------------------------------------------------------------\n\nasync function scaffoldSingle(\n options: ProjectOptions,\n onProgress?: ProgressCallback,\n): Promise<void> {\n const projectDir = join(process.cwd(), options.name)\n\n // 1. Run create-next-app to get an authoritative Next.js skeleton\n // (lockfile, ESLint config, default tsconfig, etc.)\n onProgress?.('Creating Next.js app...')\n runCommand(\n `pnpm create next-app@${CREATE_NEXT_APP_VERSION} ${options.name} ` +\n '--typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias \"@/*\"',\n )\n\n // 2. Cleanup default Next.js artifacts that the template will replace\n await deleteFiles(projectDir, [\n 'app/page.tsx',\n 'app/page.module.css',\n 'app/fonts',\n 'app/globals.css',\n 'README.md',\n ])\n\n // 3. Extract the prebuilt template tarball over the project directory.\n // The template is the minimal Lumi skeleton — run `lumi add <plugin>`\n // after scaffolding to layer in plugins (auth is preinstalled).\n onProgress?.('Extracting template...')\n await extractTemplate(projectDir)\n\n // 4. Replace tokens in tokenizable files\n onProgress?.('Personalizing template...')\n await tokenizeProject(projectDir, options.name)\n\n // 5. Install deps\n if (options.installDeps) {\n onProgress?.('Installing dependencies...')\n runCommand('pnpm install', { cwd: projectDir })\n }\n\n // 6. Layer on demo-preset plugins via `lumi add`. Skipped for the minimal\n // preset — user runs `lumi add <plugin>` themselves. Requires the deps\n // step above, because `pnpm exec lumi` resolves the bin from\n // `node_modules/.bin/`.\n if (options.preset === 'demo') {\n if (!options.installDeps) {\n throw new Error(\n 'Preset `demo` requires --install because the `lumi add` step runs ' +\n 'from the scaffolded project. Re-run without --no-install, or pass ' +\n '--preset=minimal.',\n )\n }\n for (const plugin of DEMO_PRESET_PLUGINS) {\n onProgress?.(`Adding ${plugin} plugin...`)\n // stdio=inherit so the user sees `lumi add`'s own step-by-step\n // output + any error messages (otherwise they get buffered on\n // failure and surfaced as a generic execSync error).\n runCommand(`pnpm exec lumi add ${plugin}`, { cwd: projectDir, inherit: true })\n }\n }\n}\n\n/**\n * Optional plugins layered on top of the baseline skeleton for the demo\n * preset. Must stay in sync with `CATALOG` in `@murumets-ee/cli` minus\n * `auth` (which is preinstalled in the baseline `lumi.config.ts`). The\n * `preset-parity.test.ts` test reads `CATALOG` at test time and asserts\n * `[...DEMO_PRESET_PLUGINS, 'auth'].sort()` equals\n * `Object.keys(CATALOG).sort()` — rename or add an entry here whenever\n * the CLI catalog grows.\n */\nconst DEMO_PRESET_PLUGINS = ['media', 'ticketing'] as const\n\n// ---------------------------------------------------------------------------\n// Tarball extraction\n// ---------------------------------------------------------------------------\n\nasync function extractTemplate(destDir: string): Promise<void> {\n const tarball = resolveTemplateTarball()\n if (!existsSync(tarball)) {\n throw new Error(\n `Template tarball missing: ${tarball}\\n` +\n `Run \\`pnpm --filter @murumets-ee/create build:templates\\` first.`,\n )\n }\n await tarExtract({ file: tarball, cwd: destDir })\n}\n\n/**\n * Locate the template tarball relative to the published `@murumets-ee/create`\n * package root.\n *\n * Anchors on the package's own `package.json` (matched by `name`) so a parent\n * project that happens to have a `templates/` directory at a higher path\n * can't hijack the resolution. This is a defense-in-depth measure against\n * template-substitution attacks where `create-lumi` is invoked from inside\n * a malicious project layout.\n */\nfunction resolveTemplateTarball(): string {\n const here = dirname(fileURLToPath(import.meta.url))\n let dir = here\n for (let i = 0; i < 5; i++) {\n const pkgJsonPath = join(dir, 'package.json')\n if (existsSync(pkgJsonPath)) {\n try {\n const pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf-8')) as { name?: string }\n if (pkg.name === '@murumets-ee/create') {\n return join(dir, 'templates', 'template-demo.tar.gz')\n }\n } catch {\n // Malformed package.json — keep walking.\n }\n }\n const parent = dirname(dir)\n if (parent === dir) break // hit filesystem root\n dir = parent\n }\n throw new Error(\n `Could not find @murumets-ee/create package root above ${here}. ` +\n `template-demo.tar.gz cannot be located.`,\n )\n}\n\n\n// ---------------------------------------------------------------------------\n// Token replacement\n// ---------------------------------------------------------------------------\n\n/**\n * Walk the project directory and replace `__PROJECT_NAME__` /\n * `__PROJECT_NAME_TITLE__` tokens in eligible text files.\n *\n * Binary files (images, fonts) and `node_modules` / `.next` are skipped\n * to avoid corruption and pointless work.\n */\nasync function tokenizeProject(projectDir: string, projectName: string): Promise<void> {\n const titleName = toTitleCase(projectName)\n for await (const filePath of walkFiles(projectDir)) {\n if (!isTokenizable(filePath)) continue\n const original = await readFile(filePath, 'utf-8')\n if (!original.includes(TOKEN_PROJECT_NAME) && !original.includes(TOKEN_PROJECT_NAME_TITLE)) {\n continue\n }\n const replaced = original\n .split(TOKEN_PROJECT_NAME_TITLE)\n .join(titleName)\n .split(TOKEN_PROJECT_NAME)\n .join(projectName)\n await writeFile(filePath, replaced, 'utf-8')\n }\n}\n\n/**\n * Directories the tokenizer must skip.\n */\nconst SKIP_DIRS = new Set<string>([\n 'node_modules',\n 'dist',\n 'build',\n 'coverage',\n 'out',\n])\n\nasync function* walkFiles(root: string): AsyncGenerator<string> {\n const entries = await readdir(root, { withFileTypes: true })\n for (const entry of entries) {\n const full = join(root, entry.name)\n if (entry.isDirectory()) {\n if (SKIP_DIRS.has(entry.name) || entry.name.startsWith('.')) continue\n yield* walkFiles(full)\n } else if (entry.isFile()) {\n yield full\n }\n }\n}\n\nfunction isTokenizable(filePath: string): boolean {\n const slash = filePath.lastIndexOf('/')\n const basename = slash >= 0 ? filePath.slice(slash + 1) : filePath\n if (TOKENIZABLE_BASENAMES.has(basename)) return true\n const dot = basename.lastIndexOf('.')\n if (dot < 0) return false\n const ext = basename.slice(dot)\n return TOKENIZABLE_EXTENSIONS.has(ext)\n}\n\nfunction toTitleCase(name: string): string {\n return name\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((part) => part[0]?.toUpperCase() + part.slice(1))\n .join(' ')\n}\n"],"mappings":"0SAwCA,eAAsB,EAAY,EAAkB,EAAgC,CAClF,IAAK,IAAM,KAAQ,EACjB,MAAM,EAAG,EAAK,EAAU,EAAK,CAAE,CAAE,MAAO,GAAM,UAAW,GAAM,CAAC,CAapE,SAAgB,EACd,EACA,EACQ,CAKR,OAJI,GAAS,SACX,EAAS,EAAK,CAAE,IAAK,EAAQ,IAAK,MAAO,UAAW,C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AAO,GAChD,IAAM,EAAM,EAAS,YAAY,IAAI,CACrC,GAAI,EAAM,EAAG,MAAO,GACpB,IAAM,EAAM,EAAS,MAAM,EAAI,CAC/B,OAAO,EAAuB,IAAI,EAAI,CAGxC,SAAS,EAAY,EAAsB,CACzC,OAAO,EACJ,MAAM,UAAU,CAChB,OAAO,QAAQ,CACf,IAAK,GAAS,EAAK,IAAI,aAAa,CAAG,EAAK,MAAM,EAAE,CAAC,CACrD,KAAK,IAAI"}
1
+ {"version":3,"file":"index.mjs","names":["tarExtract"],"sources":["../src/utils.ts","../src/scaffold.ts"],"sourcesContent":["import { execSync } from 'node:child_process'\nimport { appendFile, writeFile as fsWriteFile, mkdir, readFile, rm } from 'node:fs/promises'\nimport { dirname, join } from 'node:path'\n\n/** Write a file, creating parent directories as needed */\nexport async function writeFile(filePath: string, content: string): Promise<void> {\n await mkdir(dirname(filePath), { recursive: true })\n await fsWriteFile(filePath, content, 'utf-8')\n}\n\n/** Read and parse package.json, merge in new deps/scripts, write back */\nexport async function mergePackageJson(\n pkgPath: string,\n merge: {\n type?: string\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n scripts?: Record<string, string>\n },\n): Promise<void> {\n const raw = await readFile(pkgPath, 'utf-8')\n const pkg = JSON.parse(raw)\n\n if (merge.type) {\n pkg.type = merge.type\n }\n if (merge.dependencies) {\n pkg.dependencies = { ...pkg.dependencies, ...merge.dependencies }\n }\n if (merge.devDependencies) {\n pkg.devDependencies = { ...pkg.devDependencies, ...merge.devDependencies }\n }\n if (merge.scripts) {\n pkg.scripts = { ...pkg.scripts, ...merge.scripts }\n }\n\n await fsWriteFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\\n`, 'utf-8')\n}\n\n/** Delete files (silently ignores missing) */\nexport async function deleteFiles(basePath: string, files: string[]): Promise<void> {\n for (const file of files) {\n await rm(join(basePath, file), { force: true, recursive: true })\n }\n}\n\n/**\n * Run a shell command synchronously.\n *\n * `stdio: 'pipe'` by default so return-value-style callers get the\n * captured stdout. Pass `inherit: true` for commands whose output the\n * user should see in real time (and where the buffered error-on-fail\n * behavior of pipe would hide diagnostics — e.g. `pnpm exec lumi add`\n * in the demo-preset post-install loop).\n */\nexport function runCommand(\n cmd: string,\n options?: { cwd?: string; inherit?: boolean },\n): string {\n if (options?.inherit) {\n execSync(cmd, { cwd: options.cwd, stdio: 'inherit' })\n return ''\n }\n return execSync(cmd, {\n cwd: options?.cwd,\n stdio: 'pipe',\n encoding: 'utf-8',\n })\n}\n\n/** Append content to a file */\nexport async function appendToFile(filePath: string, content: string): Promise<void> {\n await appendFile(filePath, content, 'utf-8')\n}\n","import { existsSync, readFileSync } from 'node:fs'\nimport { readdir, readFile, writeFile } from 'node:fs/promises'\nimport { dirname, join } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { extract as tarExtract } from 'tar'\nimport type { ProjectOptions } from './types'\nimport { deleteFiles, runCommand } from './utils'\n\n// Major Next.js version passed to `pnpm create next-app@<ver>`.\n// Bumped when the toolkit as a whole moves to a new Next major.\nconst CREATE_NEXT_APP_VERSION = '16'\n\nexport type ProgressCallback = (message: string) => void\n\n// File extensions eligible for token replacement during scaffolding.\nconst TOKENIZABLE_EXTENSIONS = new Set<string>([\n '.ts',\n '.tsx',\n '.mts',\n '.json',\n '.md',\n '.yml',\n '.yaml',\n '.css',\n '.html',\n])\n\nconst TOKENIZABLE_BASENAMES = new Set<string>(['.env.example', 'Dockerfile', '.gitignore'])\n\nconst TOKEN_PROJECT_NAME = '__PROJECT_NAME__'\nconst TOKEN_PROJECT_NAME_TITLE = '__PROJECT_NAME_TITLE__'\n\nexport async function scaffold(\n options: ProjectOptions,\n onProgress?: ProgressCallback,\n): Promise<void> {\n await scaffoldSingle(options, onProgress)\n}\n\n// ---------------------------------------------------------------------------\n// scaffoldSingle — extract a prebuilt tarball, then tokenize.\n// ---------------------------------------------------------------------------\n\nasync function scaffoldSingle(\n options: ProjectOptions,\n onProgress?: ProgressCallback,\n): Promise<void> {\n const projectDir = join(process.cwd(), options.name)\n\n // 1. Run create-next-app to get an authoritative Next.js skeleton\n // (lockfile, ESLint config, default tsconfig, etc.)\n onProgress?.('Creating Next.js app...')\n runCommand(\n `pnpm create next-app@${CREATE_NEXT_APP_VERSION} ${options.name} ` +\n '--typescript --tailwind --no-eslint --app --no-src-dir --turbopack --react-compiler --skip-install --import-alias \"@/*\"',\n )\n\n // 2. Cleanup default Next.js artifacts that the template will replace\n await deleteFiles(projectDir, [\n 'app/page.tsx',\n 'app/page.module.css',\n 'app/fonts',\n 'app/globals.css',\n 'README.md',\n ])\n\n // 3. Extract the prebuilt template tarball over the project directory.\n // The template is the minimal Lumi skeleton — run `lumi add <plugin>`\n // after scaffolding to layer in plugins (auth is preinstalled).\n onProgress?.('Extracting template...')\n await extractTemplate(projectDir)\n\n // 4. Replace tokens in tokenizable files\n onProgress?.('Personalizing template...')\n await tokenizeProject(projectDir, options.name)\n\n // 5. Install deps\n if (options.installDeps) {\n onProgress?.('Installing dependencies...')\n runCommand('pnpm install', { cwd: projectDir })\n }\n\n // 6. Layer on demo-preset plugins via `lumi add`. Skipped for the minimal\n // preset — user runs `lumi add <plugin>` themselves. Requires the deps\n // step above, because `pnpm exec lumi` resolves the bin from\n // `node_modules/.bin/`.\n if (options.preset === 'demo') {\n if (!options.installDeps) {\n throw new Error(\n 'Preset `demo` requires --install because the `lumi add` step runs ' +\n 'from the scaffolded project. Re-run without --no-install, or pass ' +\n '--preset=minimal.',\n )\n }\n for (const plugin of DEMO_PRESET_PLUGINS) {\n onProgress?.(`Adding ${plugin} plugin...`)\n // stdio=inherit so the user sees `lumi add`'s own step-by-step\n // output + any error messages (otherwise they get buffered on\n // failure and surfaced as a generic execSync error).\n runCommand(`pnpm exec lumi add ${plugin}`, { cwd: projectDir, inherit: true })\n }\n }\n}\n\n/**\n * Optional plugins layered on top of the baseline skeleton for the demo\n * preset. Must stay in sync with `CATALOG` in `@murumets-ee/cli` minus\n * `auth` (which is preinstalled in the baseline `lumi.config.ts`). The\n * `preset-parity.test.ts` test reads `CATALOG` at test time and asserts\n * `[...DEMO_PRESET_PLUGINS, 'auth'].sort()` equals\n * `Object.keys(CATALOG).sort()` — rename or add an entry here whenever\n * the CLI catalog grows.\n */\n/**\n * Order matters. `taxonomy` scaffolds `entities/category.ts` +\n * `entities/tag.ts`; `blog` imports those indirectly via entity\n * references. Running `taxonomy` first keeps the scaffolded `Article`\n * reference-field target available at plugin-resolution time.\n *\n * `media` and `ticketing` don't depend on the entity files; they can\n * run in any position but live at the end for readability.\n */\nconst DEMO_PRESET_PLUGINS = ['taxonomy', 'blog', 'media', 'ticketing'] as const\n\n// ---------------------------------------------------------------------------\n// Tarball extraction\n// ---------------------------------------------------------------------------\n\nasync function extractTemplate(destDir: string): Promise<void> {\n const tarball = resolveTemplateTarball()\n if (!existsSync(tarball)) {\n throw new Error(\n `Template tarball missing: ${tarball}\\n` +\n `Run \\`pnpm --filter @murumets-ee/create build:templates\\` first.`,\n )\n }\n await tarExtract({ file: tarball, cwd: destDir })\n}\n\n/**\n * Locate the template tarball relative to the published `@murumets-ee/create`\n * package root.\n *\n * Anchors on the package's own `package.json` (matched by `name`) so a parent\n * project that happens to have a `templates/` directory at a higher path\n * can't hijack the resolution. This is a defense-in-depth measure against\n * template-substitution attacks where `create-lumi` is invoked from inside\n * a malicious project layout.\n */\nfunction resolveTemplateTarball(): string {\n const here = dirname(fileURLToPath(import.meta.url))\n let dir = here\n for (let i = 0; i < 5; i++) {\n const pkgJsonPath = join(dir, 'package.json')\n if (existsSync(pkgJsonPath)) {\n try {\n const pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf-8')) as { name?: string }\n if (pkg.name === '@murumets-ee/create') {\n return join(dir, 'templates', 'template-demo.tar.gz')\n }\n } catch {\n // Malformed package.json — keep walking.\n }\n }\n const parent = dirname(dir)\n if (parent === dir) break // hit filesystem root\n dir = parent\n }\n throw new Error(\n `Could not find @murumets-ee/create package root above ${here}. ` +\n `template-demo.tar.gz cannot be located.`,\n )\n}\n\n\n// ---------------------------------------------------------------------------\n// Token replacement\n// ---------------------------------------------------------------------------\n\n/**\n * Walk the project directory and replace `__PROJECT_NAME__` /\n * `__PROJECT_NAME_TITLE__` tokens in eligible text files.\n *\n * Binary files (images, fonts) and `node_modules` / `.next` are skipped\n * to avoid corruption and pointless work.\n */\nasync function tokenizeProject(projectDir: string, projectName: string): Promise<void> {\n const titleName = toTitleCase(projectName)\n for await (const filePath of walkFiles(projectDir)) {\n if (!isTokenizable(filePath)) continue\n const original = await readFile(filePath, 'utf-8')\n if (!original.includes(TOKEN_PROJECT_NAME) && !original.includes(TOKEN_PROJECT_NAME_TITLE)) {\n continue\n }\n const replaced = original\n .split(TOKEN_PROJECT_NAME_TITLE)\n .join(titleName)\n .split(TOKEN_PROJECT_NAME)\n .join(projectName)\n await writeFile(filePath, replaced, 'utf-8')\n }\n}\n\n/**\n * Directories the tokenizer must skip.\n */\nconst SKIP_DIRS = new Set<string>([\n 'node_modules',\n 'dist',\n 'build',\n 'coverage',\n 'out',\n])\n\nasync function* walkFiles(root: string): AsyncGenerator<string> {\n const entries = await readdir(root, { withFileTypes: true })\n for (const entry of entries) {\n const full = join(root, entry.name)\n if (entry.isDirectory()) {\n if (SKIP_DIRS.has(entry.name) || entry.name.startsWith('.')) continue\n yield* walkFiles(full)\n } else if (entry.isFile()) {\n yield full\n }\n }\n}\n\nfunction isTokenizable(filePath: string): boolean {\n const slash = filePath.lastIndexOf('/')\n const basename = slash >= 0 ? filePath.slice(slash + 1) : filePath\n if (TOKENIZABLE_BASENAMES.has(basename)) return true\n const dot = basename.lastIndexOf('.')\n if (dot < 0) return false\n const ext = basename.slice(dot)\n return TOKENIZABLE_EXTENSIONS.has(ext)\n}\n\nfunction toTitleCase(name: string): string {\n return name\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((part) => part[0]?.toUpperCase() + part.slice(1))\n .join(' ')\n}\n"],"mappings":"0SAwCA,eAAsB,EAAY,EAAkB,EAAgC,CACl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E,SAC7D,MAAO,EAAU,EAAK,MACb,EAAM,QAAQ,GACvB,MAAM,IAKZ,SAAS,EAAc,EAA2B,CAChD,IAAM,EAAQ,EAAS,YAAY,IAAI,CACjC,EAAW,GAAS,EAAI,EAAS,MAAM,EAAQ,EAAE,CAAG,EAC1D,GAAI,EAAsB,IAAI,EAAS,CAAE,MAAO,GAChD,IAAM,EAAM,EAAS,YAAY,IAAI,CACrC,GAAI,EAAM,EAAG,MAAO,GACpB,IAAM,EAAM,EAAS,MAAM,EAAI,CAC/B,OAAO,EAAuB,IAAI,EAAI,CAGxC,SAAS,EAAY,EAAsB,CACzC,OAAO,EACJ,MAAM,UAAU,CAChB,OAAO,QAAQ,CACf,IAAK,GAAS,EAAK,IAAI,aAAa,CAAG,EAAK,MAAM,EAAE,CAAC,CACrD,KAAK,IAAI"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@murumets-ee/create",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "license": "Elastic-2.0",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,7 +27,7 @@
27
27
  "tsdown": "^0.21.7",
28
28
  "tsx": "^4.21.0",
29
29
  "typescript": "^5.7.3",
30
- "@murumets-ee/cli": "^0.6.0"
30
+ "@murumets-ee/cli": "^0.7.0"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "node ../../scripts/verify-catalog-sync.mjs && tsdown && tsx scripts/build-templates.ts",
Binary file