@teispace/next-maker 0.1.1 → 0.2.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/CHANGELOG.md +14 -0
- package/dist/index.js +81 -1
- package/dist/index.js.map +4 -4
- package/dist/src/commands/app.d.ts.map +1 -1
- package/dist/src/commands/feature.d.ts.map +1 -1
- package/dist/src/core/files.d.ts +7 -0
- package/dist/src/core/files.d.ts.map +1 -0
- package/dist/src/core/git.d.ts +4 -0
- package/dist/src/core/git.d.ts.map +1 -0
- package/dist/src/core/package-manager.d.ts +5 -0
- package/dist/src/core/package-manager.d.ts.map +1 -0
- package/dist/src/prompts/create-app.prompt.d.ts +29 -2
- package/dist/src/prompts/create-app.prompt.d.ts.map +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.0](https://github.com/teispace/npm-packages/compare/next-maker-v0.1.1...next-maker-v0.2.0) (2025-12-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* initial monorepo setup with multi-package release workflows ([70c369b](https://github.com/teispace/npm-packages/commit/70c369b6694fedd68485167f8f5c252bb59d2354))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Miscellaneous Chores
|
|
12
|
+
|
|
13
|
+
* **next-maker:** remove test subproject reference ([fe549f9](https://github.com/teispace/npm-packages/commit/fe549f956fa21ce9b859c2a94e5dab1565405949))
|
|
14
|
+
* **next-maker:** revert typing changes and allow any in eslint ([315e2f3](https://github.com/teispace/npm-packages/commit/315e2f3e7bc2f80cf0816d3c71432c1cfbd73798))
|
|
15
|
+
* **release:** merge alpha into beta ([cd53b76](https://github.com/teispace/npm-packages/commit/cd53b76fa53f97af31e5e88b733dd81743bda94c))
|
|
16
|
+
|
|
3
17
|
## [0.1.1](https://github.com/teispace/npm-packages/compare/next-maker-v0.1.0...next-maker-v0.1.1) (2025-11-27)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,83 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{Command as
|
|
2
|
+
import{Command as pe}from"commander";import ae from"degit";import i from"node:path";import{readdir as q}from"node:fs/promises";import P from"picocolors";import Q from"ora";function F(o="",e){let n=Q({text:o,...e});return n.start(),n}import X from"enquirer";var{prompt:Z}=X,_=async o=>await Z([{type:"input",name:"projectName",message:"What is the project name?",initial:o||"my-app",skip:!!o},{type:"input",name:"description",message:"Project description:",initial:"A Next.js application"},{type:"input",name:"author",message:"Author:",initial:"Teispace"},{type:"input",name:"version",message:"Version:",initial:"0.1.0"},{type:"input",name:"email",message:"Support email:",initial:"support@example.com"},{type:"input",name:"company",message:"Company name:",initial:"Teispace"},{type:"select",name:"packageManager",message:"Which package manager would you like to use?",choices:["npm","yarn","pnpm","bun"],initial:0},{type:"input",name:"gitRemote",message:"Git remote origin URL (optional):"},{type:"input",name:"gitIssues",message:"Git issues URL (optional):"},{type:"input",name:"gitHomepage",message:"Project homepage URL (optional):"},{type:"confirm",name:"keepTemplates",message:"Do you want to keep GitHub issue and pull request templates?",initial:!0},{type:"select",name:"httpClient",message:"Which HTTP client do you want to use?",choices:["axios","fetch","both","none"],initial:0},{type:"confirm",name:"reactSecureStorage",message:"Do you want to include react-secure-storage?",initial:!0,skip:function(){let n=this.state?.answers??this.enquirer?.answers??{};return!!(n.httpClient&&n.httpClient!=="none")}},{type:"confirm",name:"darkMode",message:"Do you want to include Dark Mode (Tailwind + next-themes)?",initial:!0},{type:"confirm",name:"redux",message:"Do you want to include Redux Toolkit?",initial:!0},{type:"confirm",name:"i18n",message:"Do you want to include Internationalization (next-intl)?",initial:!0},{type:"multiselect",name:"communityFiles",message:"Select community files to include:",choices:[{name:"CODE_OF_CONDUCT.md",value:"CODE_OF_CONDUCT.md"},{name:"CONTRIBUTING.md",value:"CONTRIBUTING.md"},{name:"SECURITY.md",value:"SECURITY.md"}],initial:["CODE_OF_CONDUCT.md","CONTRIBUTING.md","SECURITY.md"]},{type:"confirm",name:"readme",message:"Do you want to create a README.md?",initial:!0},{type:"confirm",name:"docker",message:"Do you want to include Docker configuration?",initial:!0},{type:"input",name:"containerName",message:"Docker Container Name:",initial:"next-app",skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).docker}},{type:"input",name:"imageName",message:"Docker Image Name:",initial:"nextjs-starter",skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).docker}},{type:"input",name:"imageTag",message:"Docker Image Tag:",initial:"latest",skip:function(){return!(this.state?.answers??this.enquirer?.answers??{}).docker}},{type:"confirm",name:"ci",message:"Do you want to include GitHub Actions (CI/CD)?",initial:!0},{type:"confirm",name:"preCommitHooks",message:"Do you want to setup pre-commit hooks (Husky, Commitlint, Lint-staged)?",initial:!0},{type:"confirm",name:"commitizen",message:"Do you want to setup Commitizen?",initial:!0}]);import N from"node:fs/promises";import ee from"node:path";import{existsSync as D}from"node:fs";var d=async o=>N.readFile(o,"utf-8"),m=async(o,e)=>{await N.mkdir(ee.dirname(o),{recursive:!0}),await N.writeFile(o,e,"utf-8")},l=async o=>{D(o)&&await N.unlink(o)},u=async o=>{D(o)&&await N.rm(o,{recursive:!0,force:!0})},b=async(o,e)=>{let n=await d(o),c=JSON.parse(n),y=e(c);await m(o,JSON.stringify(y,null,2))},x=o=>D(o);import{exec as te}from"node:child_process";import{promisify as ne}from"node:util";var S=ne(te),U=async o=>{try{await S("git init",{cwd:o}),await S("git add .",{cwd:o}),await S('git commit -m "Initial commit from @teispace/next-maker"',{cwd:o})}catch(e){console.warn("Failed to initialize git repository",e)}},G=async(o,e)=>{try{await S(`git remote add origin ${e}`,{cwd:o})}catch(n){console.warn("Failed to add remote origin",n)}};import{exec as ie}from"node:child_process";import{promisify as oe}from"node:util";var L=oe(ie),H=async(o,e)=>{let n=`${e} install`;try{await L(n,{cwd:o})}catch(c){throw new Error(`Failed to install dependencies with ${e}: ${c}`)}},M=async(o,e,n)=>{let c=`${e} run ${n}`;try{await L(c,{cwd:o})}catch(y){console.warn(`Warning: Failed to run script '${n}': ${y}`)}};import w from"picocolors";var re={reset:o=>o,red:w.red,green:w.green,yellow:w.yellow,blue:w.blue,cyan:w.cyan,magenta:w.magenta,white:w.white,gray:w.gray,bright:w.bold,dim:w.dim};function C(o,e="reset"){let n=re[e]??(c=>c);console.log(n(o))}function A(o){C(`\u2716 ${o}`,"red")}function h(o){C(o)}function z(){console.log(""),C("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557","cyan"),C("\u2551 \u2551","cyan"),C("\u2551 \u{1F680} Create Teispace Next.js App \u{1F680} \u2551","cyan"),C("\u2551 \u2551","cyan"),C("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D","cyan"),console.log("")}function W(o){let{logger:e=g=>console.error(g),exitOnCancel:n=process.env.NODE_ENV!=="test"}=o??{},c=()=>{console.log(""),console.log(""),e("Setup cancelled by user"),console.log(""),n&&process.exit(0)},y=g=>{if(g!==null&&typeof g=="object"&&"code"in g&&g.code==="ERR_USE_AFTER_CLOSE"){c();return}if(g instanceof Error){e(`Uncaught exception: ${g.message}`);return}e(`Uncaught exception: ${String(g)}`)},f=g=>{if(g instanceof Error){e(`Unhandled promise rejection: ${g.message}`);return}e(`Unhandled promise rejection: ${String(g)}`)};return process.on("SIGINT",c),process.on("SIGTERM",c),process.on("uncaughtException",y),process.on("unhandledRejection",f),()=>{process.off("SIGINT",c),process.off("SIGTERM",c),process.off("uncaughtException",y),process.off("unhandledRejection",f)}}var B=o=>{o.command("init").description("Initialize a new Next.js project").argument("[name]","Project name").action(async e=>{await se(e)})},se=async o=>{z(),h("Welcome to the Teispace Next.js App Creator!"),h("");let e=await _(o),n=i.resolve(process.cwd(),e.projectName);x(n)&&(console.error(P.red(`Error: Directory ${e.projectName} already exists.`)),process.exit(1));let c=F("Initializing project...");try{c.text="Downloading template...",await ae("teispace/nextjs-starter",{cache:!1,force:!0,verbose:!0}).clone(n),c.text="Configuring package.json...",await b(i.join(n,"package.json"),t=>(t.name=e.projectName,t.version=e.version,t.description=e.description,t.author=e.author,delete t.packageManager,e.gitHomepage&&(t.homepage=e.gitHomepage),e.gitIssues&&(t.bugs={url:e.gitIssues}),e.gitRemote&&(t.repository={type:"git",url:e.gitRemote}),e.redux||(delete t.dependencies["@reduxjs/toolkit"],delete t.dependencies["react-redux"],delete t.dependencies["redux-persist"]),e.httpClient!=="none"||e.reactSecureStorage||delete t.dependencies["react-secure-storage"],e.i18n||delete t.dependencies["next-intl"],e.darkMode||delete t.dependencies["next-themes"],(e.httpClient==="none"||e.httpClient==="fetch")&&delete t.dependencies.axios,t)),c.text="Customizing features...";let f=i.join(n,"src/lib/utils/http"),g=e.httpClient!=="none"||e.reactSecureStorage;if(e.httpClient==="none"){if(await u(i.join(f,"axios-client")),await u(i.join(f,"fetch-client")),g)await m(i.join(f,"index.ts"),`export * from './token-store';
|
|
3
|
+
`);else{await u(f);let a=i.join(n,"src/lib/utils/index.ts");if(x(a)){let s=await d(a);s=s.replace(/export \* from '\.\/http';\n/,""),await m(a,s)}}let t=i.join(n,"src/lib/config/constants.ts");if(x(t)){let a=await d(t);a=a.replace(/export const API_RESPONSE_DATA_KEY = 'data';\n/,""),a=a.replace(/export const SAVE_AUTH_TOKENS = false;\n/,""),await m(t,a)}await u(i.join(n,"src/lib/errors")),await u(i.join(n,"src/types/utility")),await u(i.join(n,"src/types/common"));let r=i.join(n,"src/types/index.ts");if(x(r)){let a=await d(r);a=a.replace(/export \* from '\.\/utility';\n/,""),a=a.replace(/export \* from '\.\/common';\n/,""),await m(r,a)}}else if(e.httpClient==="axios"){await u(i.join(f,"fetch-client"));let t=await d(i.join(f,"index.ts"));t=t.replace(/export .* from '\.\/fetch-client';\n/g,""),await m(i.join(f,"index.ts"),t)}else if(e.httpClient==="fetch"){await u(i.join(f,"axios-client"));let t=await d(i.join(f,"index.ts"));t=t.replace(/export .* from '\.\/axios-client';\n/g,""),await m(i.join(f,"index.ts"),t)}g||await u(i.join(n,"src/services/storage"));let I=[],T=[];e.redux&&(T.push("import { StoreProvider } from '@/providers';"),I.push("StoreProvider")),e.darkMode&&(T.push("import { CustomThemeProvider } from '@/providers';"),I.push("CustomThemeProvider")),e.i18n&&(T.push("import { NextIntlClientProvider, AbstractIntlMessages } from 'next-intl';"),T.push("import { SupportedLocale } from '@/types/i18n';"));let $=`'use client';
|
|
4
|
+
${T.join(`
|
|
5
|
+
`)}
|
|
6
|
+
|
|
7
|
+
export const RootProvider = ({
|
|
8
|
+
children,
|
|
9
|
+
${e.i18n?`locale,
|
|
10
|
+
messages,`:""}
|
|
11
|
+
}: {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
${e.i18n?`locale: SupportedLocale;
|
|
14
|
+
messages: AbstractIntlMessages;`:""}
|
|
15
|
+
}) => {
|
|
16
|
+
return (
|
|
17
|
+
`,j="{children}";if(e.i18n&&(j=`<NextIntlClientProvider locale={locale} messages={messages}>
|
|
18
|
+
${j}
|
|
19
|
+
</NextIntlClientProvider>`),e.darkMode&&(j=`<CustomThemeProvider>
|
|
20
|
+
${j}
|
|
21
|
+
</CustomThemeProvider>`),e.redux&&(j=`<StoreProvider>
|
|
22
|
+
${j}
|
|
23
|
+
</StoreProvider>`),j==="{children}"&&(j="<>{children}</>"),$+=` ${j}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
`,await m(i.join(n,"src/providers/RootProvider.tsx"),$),!e.redux){await u(i.join(n,"src/store")),await u(i.join(n,"src/features/counter")),await l(i.join(n,"src/providers/StoreProvider.tsx")),await l(i.join(n,"src/components/Count.tsx"));let t=i.join(n,"src/providers/index.ts"),r=await d(t);r=r.replace(/export \* from '\.\/StoreProvider';\n/,""),await m(t,r);let a=i.join(n,"src/components/index.ts");if(x(a)){let s=await d(a);s=s.replace(/export \* from '\.\/Count';\n?/,""),await m(a,s)}}if(!e.darkMode){await l(i.join(n,"src/providers/CustomThemeProvider.tsx"));let t=i.join(n,"src/providers/index.ts"),r=await d(t);r=r.replace(/export \* from '\.\/CustomThemeProvider';\n/,""),await m(t,r);let a=i.join(n,"src/styles/globals.css");if(x(a)){let s=await d(a);s=s.replace(/@custom-variant dark \(.*?\);\n?/,""),await m(a,s)}}if(!e.i18n){await u(i.join(n,"src/i18n")),await u(i.join(n,"src/app/[locale]")),await l(i.join(n,"src/proxy.ts")),await l(i.join(n,"src/middleware.ts")),await l(i.join(n,"src/types/i18n.ts")),await l(i.join(n,"src/lib/config/app-locales.ts"));let t=i.join(n,"src/types/index.ts");if(x(t)){let p=await d(t);p=p.replace(/export \* from '\.\/i18n';\n/,""),await m(t,p)}let r=i.join(n,"src/lib/config/index.ts");if(x(r)){let p=await d(r);p=p.replace(/export \* from '\.\/app-locales';\n/,""),await m(r,p)}let a=i.join(n,"next.config.ts");if(x(a)){let p=await d(a);p=p.replace(/import createNextIntlPlugin from 'next-intl\/plugin';\n/,""),p=p.replace(/const withNextIntl = createNextIntlPlugin\(\);\n/,""),p=p.replace(/export default withNextIntl\(nextConfig\);/,"export default nextConfig;"),p=p.replace(/export default withNextIntl\(withAnalyzer\(nextConfig\)\);/,"export default withAnalyzer(nextConfig);"),await m(a,p)}let s=`import type { Metadata } from 'next';
|
|
27
|
+
import '@/styles/globals.css';
|
|
28
|
+
import { Livvic } from 'next/font/google';
|
|
29
|
+
import { RootProvider } from '@/providers';
|
|
30
|
+
|
|
31
|
+
const livvic = Livvic({
|
|
32
|
+
subsets: ['latin'],
|
|
33
|
+
variable: '--font-livvic',
|
|
34
|
+
weight: ['100', '200', '300', '400', '500', '600', '700', '900'],
|
|
35
|
+
display: 'swap',
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const metadata: Metadata = {
|
|
39
|
+
title: '${e.projectName}',
|
|
40
|
+
description: '${e.description}',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default function RootLayout({
|
|
44
|
+
children,
|
|
45
|
+
}: Readonly<{
|
|
46
|
+
children: React.ReactNode;
|
|
47
|
+
}>) {
|
|
48
|
+
return (
|
|
49
|
+
<html lang="en" suppressHydrationWarning={true}>
|
|
50
|
+
<body className={\`\${livvic.variable} bg-light dark:bg-dark antialiased\`}>
|
|
51
|
+
<RootProvider>
|
|
52
|
+
{children}
|
|
53
|
+
</RootProvider>
|
|
54
|
+
</body>
|
|
55
|
+
</html>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
`;await m(i.join(n,"src/app/layout.tsx"),s);let v=`export default function Home() {
|
|
59
|
+
return (
|
|
60
|
+
<div className="flex min-h-screen flex-col items-center justify-center p-24">
|
|
61
|
+
<h1 className="text-4xl font-bold">Welcome to ${e.projectName}</h1>
|
|
62
|
+
<p className="mt-4 text-xl">Get started by editing src/app/page.tsx</p>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
`;await m(i.join(n,"src/app/page.tsx"),v)}await l(i.join(n,"LICENSE"));let V=["CODE_OF_CONDUCT.md","CONTRIBUTING.md","SECURITY.md"];for(let t of V)e.communityFiles.includes(t)||await l(i.join(n,t));await l(i.join(n,"CHANGELOG.md"));let O=async t=>{let r=await q(t,{withFileTypes:!0}),a=[];for(let s of r){let v=i.join(t,s.name);s.isDirectory()&&s.name!=="node_modules"&&s.name!==".git"?a.push(...await O(v)):s.isFile()&&s.name.toLowerCase()==="readme.md"&&a.push(v)}return a},K=await O(n),R=i.join(n,"README.md");for(let t of K)t!==R&&await l(t);if(e.readme){let t=`# ${e.projectName}
|
|
67
|
+
|
|
68
|
+
${e.description}
|
|
69
|
+
|
|
70
|
+
## Getting Started
|
|
71
|
+
|
|
72
|
+
First, run the development server:
|
|
73
|
+
|
|
74
|
+
\`\`\`bash
|
|
75
|
+
${e.packageManager==="npm"?"npm run dev":e.packageManager+" dev"}
|
|
76
|
+
\`\`\`
|
|
77
|
+
|
|
78
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
79
|
+
`;await m(R,t)}else await l(R);if(e.docker){let t=i.join(n,".env.example");if(x(t)){let r=await d(t),a=(s,v)=>{let p=new RegExp(`${s}=.*`);p.test(r)?r=r.replace(p,`${s}=${v}`):r+=`${s}=${v}
|
|
80
|
+
`};a("CONTAINER_NAME",e.containerName||"next-app"),a("IMAGE_NAME",e.imageName||"nextjs-starter"),a("IMAGE_TAG",e.imageTag||"latest"),await m(t,r)}}else{await l(i.join(n,"Dockerfile")),await l(i.join(n,"docker-compose.yml")),await l(i.join(n,".dockerignore"));let t=i.join(n,".env.example");if(x(t)){let r=await d(t);r=r.replace(/# Docker Compose Configuration\n/,""),r=r.replace(/CONTAINER_NAME=.*\n/,""),r=r.replace(/IMAGE_NAME=.*\n/,""),r=r.replace(/IMAGE_TAG=.*\n/,""),await m(t,r)}}e.ci||await u(i.join(n,".github/workflows"));let E=i.join(n,".github");if(!e.keepTemplates)await u(i.join(E,"ISSUE_TEMPLATE")),await l(i.join(E,"PULL_REQUEST_TEMPLATE.md"));else{let t=i.join(E,"ISSUE_TEMPLATE"),r=i.join(E,"PULL_REQUEST_TEMPLATE.md"),a=s=>s.replace(/Teispace/g,e.company).replace(/support@teispace\.com/g,e.email).replace(/Next\.js Starter/g,e.projectName).replace(/\[AUTHOR\]/g,e.author).replace(/\[COMPANY\]/g,e.company).replace(/\[EMAIL\]/g,e.email);if(x(r)){let s=await d(r);s=a(s),await m(r,s)}try{if(x(t)){let s=await q(t);for(let v of s){let p=i.join(t,v),k=await d(p);k=a(k),await m(p,k)}}}catch{}}e.preCommitHooks||(await u(i.join(n,".husky")),await l(i.join(n,"commitlint.config.mjs")),await l(i.join(n,".lintstagedrc.mjs")),await b(i.join(n,"package.json"),t=>(delete t.devDependencies.husky,delete t.devDependencies["@commitlint/cli"],delete t.devDependencies["@commitlint/config-conventional"],delete t.devDependencies["lint-staged"],delete t.scripts.prepare,delete t.scripts.postinstall,delete t.commitlint,delete t["lint-staged"],t))),e.commitizen||(await l(i.join(n,".czrc")),await b(i.join(n,"package.json"),t=>(delete t.devDependencies.commitizen,delete t.devDependencies["cz-conventional-changelog"],delete t.config?.commitizen,t.config&&Object.keys(t.config).length===0&&delete t.config,delete t.scripts.commit,t))),c.text="Initializing Git...",await U(n),e.gitRemote&&await G(n,e.gitRemote),c.text="Installing dependencies...",await H(n,e.packageManager),c.text="Formatting and Linting...",await M(n,e.packageManager,"format"),await M(n,e.packageManager,"lint:fix"),c.succeed(P.green(`Project ${e.projectName} created successfully!`)),h(""),h("To get started:"),h(P.cyan(` cd ${e.projectName}`)),h(P.cyan(` ${e.packageManager==="npm"?"npm run dev":e.packageManager+" dev"}`)),h("")}catch(y){if(c.fail("Failed to create project."),console.error(y),x(n)){c.text="Cleaning up...";try{await u(n),console.log(P.yellow(`
|
|
81
|
+
Cleaned up: Deleted directory ${e.projectName}`))}catch(f){console.error(P.red(`
|
|
82
|
+
Failed to clean up directory ${e.projectName}:`),f)}}process.exit(1)}};import ce from"picocolors";var Y=o=>{o.command("feature [name]").description("Generate a new feature module").action(async()=>{h(ce.yellow("Feature generation will be available soon!"))})};var J=o=>{B(o),Y(o)};async function me(){W({logger:e=>A(e)});let o=new pe;o.name("next-maker").description("Teispace Next.js Project Generator").version("1.0.0"),J(o),o.parse()}me().catch(o=>{let e=o&&typeof o=="object"&&"message"in o?o.message:String(o);A(`Unexpected error: ${e}`)});
|
|
3
83
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/index.ts", "../src/
|
|
4
|
-
"sourcesContent": ["import { Command } from 'commander';\nimport { registerCommands } from './commands/index';\nimport { error, setupCancellationHandlers } from './config';\n\nasync function main() {\n setupCancellationHandlers({ logger: (m: string) => error(m) });\n\n const program = new Command();\n\n program.name('next-maker').description('Teispace Next.js Project Generator').version('1.0.0');\n\n registerCommands(program);\n\n program.parse();\n}\n\nmain().catch((err) => {\n const message =\n err && typeof err === 'object' && 'message' in err ? (err as Error).message : String(err);\n error(`Unexpected error: ${message}`);\n});\n", "import pc from 'picocolors';\n\n// Define a type for allowed colors explicitly\nexport type Color =\n | 'reset'\n | 'red'\n | 'green'\n | 'yellow'\n | 'blue'\n | 'cyan'\n | 'magenta'\n | 'white'\n | 'gray'\n | 'bright'\n | 'dim';\n\nconst colorMap: Record<Color, (s: string) => string> = {\n reset: (s: string) => s,\n red: pc.red,\n green: pc.green,\n yellow: pc.yellow,\n blue: pc.blue,\n cyan: pc.cyan,\n magenta: pc.magenta,\n white: pc.white,\n gray: pc.gray,\n bright: pc.bold,\n dim: pc.dim,\n};\n\n// Print with color\nexport function print(message: string, color: Color = 'reset'): void {\n const colorFn = colorMap[color] ?? ((text: string) => text);\n console.log(colorFn(message));\n}\n\n// Print section header\nexport function printHeader(title: string): void {\n console.log('');\n print('\u2550'.repeat(60), 'cyan');\n print(` ${title}`, 'bright');\n print('\u2550'.repeat(60), 'cyan');\n console.log('');\n}\n\n// Print success message\nexport function success(message: string): void {\n print(`\u2713 ${message}`, 'green');\n}\n\n// Print error message\nexport function error(message: string): void {\n print(`\u2716 ${message}`, 'red');\n}\n\n// Print warning message\nexport function warning(message: string): void {\n print(`\u26A0 ${message}`, 'yellow');\n}\n\n// Print info message\nexport function info(message: string): void {\n print(`\u2139 ${message}`, 'cyan');\n}\n\nexport function log(message: string): void {\n print(message);\n}\n\n// Print banner\nexport function printBanner(): void {\n console.log('');\n print('\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557', 'cyan');\n print('\u2551 \u2551', 'cyan');\n print('\u2551 \uD83D\uDE80 Create Teispace Next.js App \uD83D\uDE80 \u2551', 'cyan');\n print('\u2551 \u2551', 'cyan');\n print('\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D', 'cyan');\n console.log('');\n}\n", "export type SetupOptions = {\n logger?: (msg: string) => void;\n exitOnCancel?: boolean;\n};\n\nexport function setupCancellationHandlers(options?: SetupOptions): () => void {\n const {\n logger = (m: string) => console.error(m),\n exitOnCancel = process.env.NODE_ENV !== 'test',\n } = options ?? {};\n\n const onCancel = (): void => {\n console.log('');\n console.log('');\n logger('Setup cancelled by user');\n console.log('');\n if (exitOnCancel) process.exit(0);\n };\n\n const onUncaught = (err: unknown): void => {\n if (err !== null && typeof err === 'object' && 'code' in err) {\n const maybeErrWithCode = err as { code?: unknown };\n if (maybeErrWithCode.code === 'ERR_USE_AFTER_CLOSE') {\n onCancel();\n return;\n }\n }\n\n // Log uncaught exceptions instead of throwing so the CLI can report\n // the error and exit gracefully when appropriate.\n if (err instanceof Error) {\n logger(`Uncaught exception: ${err.message}`);\n return;\n }\n logger(`Uncaught exception: ${String(err)}`);\n };\n\n const onRejection = (reason: unknown): void => {\n // Log unhandled promise rejections rather than letting them crash the\n // process. This converts the reason to a readable string safely.\n if (reason instanceof Error) {\n logger(`Unhandled promise rejection: ${reason.message}`);\n return;\n }\n logger(`Unhandled promise rejection: ${String(reason)}`);\n };\n\n process.on('SIGINT', onCancel);\n process.on('SIGTERM', onCancel);\n process.on('uncaughtException', onUncaught);\n process.on('unhandledRejection', onRejection as (...args: unknown[]) => void);\n\n // Return a cleanup function to remove listeners (useful in tests).\n return (): void => {\n process.off('SIGINT', onCancel);\n process.off('SIGTERM', onCancel);\n process.off('uncaughtException', onUncaught);\n process.off('unhandledRejection', onRejection as (...args: unknown[]) => void);\n };\n}\n\nexport default setupCancellationHandlers;\n", "import ora, { Ora, Options } from 'ora';\n\n// Create and start a spinner\nexport function startSpinner(text = '', options?: Options): Ora {\n const spinner = ora({ text, ...options });\n spinner.start();\n return spinner;\n}\n\n// Stop a spinner without changing its status\nexport function stopSpinner(spinner: Ora): void {\n spinner.stop();\n}\n\n// Mark spinner as succeeded\nexport function succeedSpinner(spinner: Ora, text?: string): void {\n spinner.succeed(text);\n}\n\n// Mark spinner as failed\nexport function failSpinner(spinner: Ora, text?: string): void {\n spinner.fail(text);\n}\n\n// Run an async function while showing a spinner; auto-succeed/fail\nexport async function withSpinner<T>(\n text: string,\n fn: () => Promise<T>,\n {\n successText,\n failText,\n options,\n }: { successText?: string; failText?: string; options?: Options } = {},\n): Promise<T> {\n const spinner = startSpinner(text, options);\n try {\n const result = await fn();\n spinner.succeed(successText ?? 'Done');\n return result;\n } catch (err) {\n spinner.fail(failText ?? 'Failed');\n throw err;\n }\n}\n\nexport default startSpinner;\n", "import Enquirer from 'enquirer';\nconst { prompt } = Enquirer;\n\nexport const promptForProjectName = async (): Promise<string> => {\n const response = await prompt<{ projectName: string }>({\n type: 'input',\n name: 'projectName',\n message: 'What is the project name?',\n initial: 'my-app',\n });\n\n return response.projectName;\n};\n\nexport const promptForPackageManager = async (): Promise<string> => {\n const response = await prompt<{ packageManager: string }>({\n type: 'select',\n name: 'packageManager',\n message: 'Which package manager would you like to use?',\n choices: ['yarn', 'npm', 'pnpm', 'bun'],\n initial: 0,\n });\n return response.packageManager;\n};\n", "import { Command } from 'commander';\nimport { log, printBanner, printHeader } from '../config';\nimport { promptForProjectName, promptForPackageManager } from '../prompts/create-app.prompt';\n\ninterface AppOptions {\n packageManager: 'npm' | 'yarn' | 'pnpm';\n}\n\ninterface CreateAppParams {\n name?: string;\n options?: AppOptions;\n}\n\nexport const registerAppCommand = (program: Command) => {\n program\n .argument('[name]', 'Project name')\n .option('--package-manager <packageManager>', 'Package manager to use (npm|yarn|pnpm)', 'npm')\n .action(async (name, options) => {\n await createApp({ name, options });\n });\n};\n\nconst createApp = async (params: CreateAppParams): Promise<void> => {\n printBanner();\n\n log('Welcome to the Teispace Next.js App Creator!');\n log('');\n log('This tool will help you create a new Next.js application');\n log('with best practices and modern tooling.');\n log('');\n\n printHeader('\uD83D\uDCE6 Project Setup');\n\n // Prompt for project name if not provided\n if (!params.name) {\n params.name = await promptForProjectName();\n }\n\n // Prompt for package manager\n const packageManager = await promptForPackageManager();\n\n log('');\n log(`Creating a new Next.js app in folder: ${params.name}`);\n log(`Using package manager: ${packageManager}`);\n log(`Options: ${JSON.stringify(params.options)}`);\n log('');\n};\n", "import { Command, InvalidArgumentError } from 'commander';\nimport { log } from '../config';\nimport { promptForFeatureName } from '../prompts/feature.prompt';\n\ninterface FeatureOptions {\n tests: boolean;\n stories: boolean;\n css: boolean;\n path: string;\n template: 'basic' | 'advanced' | 'minimal';\n author?: string;\n}\n\ninterface CreateFeatureParams {\n name?: string;\n options?: FeatureOptions;\n}\n\nexport const registerFeatureCommand = (program: Command) => {\n program\n .command('feature [name]')\n .description('Generate a new feature module')\n .option('--tests', 'Include test files', true)\n .option('--stories', 'Include Storybook stories', false)\n .option('--css', 'Include CSS module', true)\n .option('-p, --path <path>', 'Custom path for feature', 'src/features')\n .option(\n '-t, --template <template>',\n 'Template to use (basic|advanced|minimal)',\n (value) => {\n const valid = ['basic', 'advanced', 'minimal'];\n if (!valid.includes(value)) {\n throw new InvalidArgumentError(`Template must be one of: ${valid.join(', ')}`);\n }\n return value;\n },\n 'basic',\n )\n .option('--author <name>', 'Author name for file headers')\n .action(async (name, options) => {\n await createFeature({ name, options });\n });\n};\n\nconst createFeature = async (params: CreateFeatureParams): Promise<void> => {\n log('\uD83C\uDFA8 Creating a new feature...');\n\n // Prompt for feature name if not provided\n if (!params.name) {\n params.name = await promptForFeatureName();\n }\n\n // Log the received values\n log(`Feature name is ${params.name}`);\n log(`Options: ${JSON.stringify(params.options)}`);\n};\n", "import Enquirer from 'enquirer';\nconst { prompt } = Enquirer;\n\nexport const promptForFeatureName = async (): Promise<string> => {\n const response = await prompt<{ featureName: string }>({\n type: 'input',\n name: 'featureName',\n message: 'What is the feature name?',\n initial: 'my-feature',\n });\n return response.featureName;\n};\n", "import { Command } from 'commander';\nimport { registerAppCommand } from './app';\nimport { registerFeatureCommand } from './feature';\n\nexport const registerCommands = (program: Command) => {\n registerAppCommand(program);\n registerFeatureCommand(program);\n};\n"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,WAAAA,MAAe,YCAxB,OAAOC,MAAQ,aAgBf,IAAMC,EAAiD,CACrD,MAAQC,GAAcA,EACtB,IAAKF,EAAG,IACR,MAAOA,EAAG,MACV,OAAQA,EAAG,OACX,KAAMA,EAAG,KACT,KAAMA,EAAG,KACT,QAASA,EAAG,QACZ,MAAOA,EAAG,MACV,KAAMA,EAAG,KACT,OAAQA,EAAG,KACX,IAAKA,EAAG,GACV,EAGO,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G,GAAO,CACpBC,EAA0B,CAAE,OAASC,GAAcC,EAAMD,CAAC,CAAE,CAAC,EAE7D,IAAME,EAAU,IAAIC,EAEpBD,EAAQ,KAAK,YAAY,EAAE,YAAY,oCAAoC,EAAE,QAAQ,OAAO,EAE5FE,EAAiBF,CAAO,EAExBA,EAAQ,MAAM,CAChB,CAEAJ,EAAK,EAAE,MAAOO,GAAQ,CACpB,IAAMC,EACJD,GAAO,OAAOA,GAAQ,UAAY,YAAaA,EAAOA,EAAc,QAAU,OAAOA,CAAG,EAC1FJ,EAAM,qBAAqBK,CAAO,EAAE,CACtC,CAAC",
|
|
6
|
-
"names": ["Command", "pc", "
|
|
3
|
+
"sources": ["../src/index.ts", "../src/commands/app.ts", "../src/config/spinner.ts", "../src/prompts/create-app.prompt.ts", "../src/core/files.ts", "../src/core/git.ts", "../src/core/package-manager.ts", "../src/config/output.ts", "../src/config/errorHandlers.ts", "../src/commands/feature.ts", "../src/commands/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { Command } from 'commander';\nimport { registerCommands } from './commands/index';\nimport { error, setupCancellationHandlers } from './config';\n\nasync function main() {\n setupCancellationHandlers({ logger: (m: string) => error(m) });\n\n const program = new Command();\n\n program.name('next-maker').description('Teispace Next.js Project Generator').version('1.0.0');\n\n registerCommands(program);\n\n program.parse();\n}\n\nmain().catch((err) => {\n const message =\n err && typeof err === 'object' && 'message' in err ? (err as Error).message : String(err);\n error(`Unexpected error: ${message}`);\n});\n", "import { Command } from 'commander';\nimport degit from 'degit';\nimport path from 'node:path';\nimport { readdir } from 'node:fs/promises';\nimport pc from 'picocolors';\nimport { startSpinner } from '../config/spinner';\nimport { promptForProjectDetails } from '../prompts/create-app.prompt';\nimport {\n readFile,\n writeFile,\n deleteFile,\n deleteDirectory,\n updateJson,\n fileExists,\n} from '../core/files';\nimport { initializeGit, addRemote } from '../core/git';\nimport { installDependencies, runScript } from '../core/package-manager';\nimport { log, printBanner } from '../config';\n\nexport const registerAppCommand = (program: Command) => {\n program\n .command('init')\n .description('Initialize a new Next.js project')\n .argument('[name]', 'Project name')\n .action(async (name) => {\n await createApp(name);\n });\n};\n\nconst createApp = async (initialName?: string): Promise<void> => {\n printBanner();\n log('Welcome to the Teispace Next.js App Creator!');\n log('');\n\n const answers = await promptForProjectDetails(initialName);\n const projectPath = path.resolve(process.cwd(), answers.projectName);\n\n if (fileExists(projectPath)) {\n console.error(pc.red(`Error: Directory ${answers.projectName} already exists.`));\n process.exit(1);\n }\n\n const spinner = startSpinner('Initializing project...');\n\n try {\n // 1. Clone template\n spinner.text = 'Downloading template...';\n const emitter = degit('teispace/nextjs-starter', {\n cache: false,\n force: true,\n verbose: true,\n });\n await emitter.clone(projectPath);\n\n // 2. Update package.json\n spinner.text = 'Configuring package.json...';\n await updateJson(path.join(projectPath, 'package.json'), (pkg) => {\n pkg.name = answers.projectName;\n pkg.version = answers.version;\n pkg.description = answers.description;\n pkg.author = answers.author;\n // Remove packageManager field to avoid \"configured to use yarn\" errors\n // and let the user's environment handle it.\n delete pkg.packageManager;\n\n if (answers.gitHomepage) pkg.homepage = answers.gitHomepage;\n if (answers.gitIssues) pkg.bugs = { url: answers.gitIssues };\n if (answers.gitRemote) pkg.repository = { type: 'git', url: answers.gitRemote };\n\n // Remove dependencies based on choices\n if (!answers.redux) {\n delete pkg.dependencies['@reduxjs/toolkit'];\n delete pkg.dependencies['react-redux'];\n delete pkg.dependencies['redux-persist'];\n }\n\n // Handle react-secure-storage\n // Keep if HTTP client is selected OR if user explicitly selected it\n const keepSecureStorage = answers.httpClient !== 'none' || answers.reactSecureStorage;\n if (!keepSecureStorage) {\n delete pkg.dependencies['react-secure-storage'];\n }\n if (!answers.i18n) {\n delete pkg.dependencies['next-intl'];\n }\n if (!answers.darkMode) {\n delete pkg.dependencies['next-themes'];\n }\n if (answers.httpClient === 'none') {\n delete pkg.dependencies['axios'];\n } else if (answers.httpClient === 'fetch') {\n delete pkg.dependencies['axios'];\n }\n\n // DevTools cleanup is handled later to group file and package.json changes\n\n return pkg;\n });\n\n // 3. Handle Features\n spinner.text = 'Customizing features...';\n\n // HTTP Client\n const httpUtilsPath = path.join(projectPath, 'src/lib/utils/http');\n\n // Define keepSecureStorage early as it's used in multiple places\n const keepSecureStorage = answers.httpClient !== 'none' || answers.reactSecureStorage;\n\n if (answers.httpClient === 'none') {\n await deleteDirectory(path.join(httpUtilsPath, 'axios-client'));\n await deleteDirectory(path.join(httpUtilsPath, 'fetch-client'));\n\n if (keepSecureStorage) {\n // Clear index.ts but keep token-store export\n await writeFile(path.join(httpUtilsPath, 'index.ts'), \"export * from './token-store';\\n\");\n } else {\n // If no client and no secure storage, we don't need http utils at all\n // This removes token-store.ts and index.ts\n await deleteDirectory(httpUtilsPath);\n\n // Also remove export from src/lib/utils/index.ts\n const utilsIndexPath = path.join(projectPath, 'src/lib/utils/index.ts');\n if (fileExists(utilsIndexPath)) {\n let content = await readFile(utilsIndexPath);\n content = content.replace(/export \\* from '\\.\\/http';\\n/, '');\n await writeFile(utilsIndexPath, content);\n }\n }\n\n // Remove API constants\n const constantsPath = path.join(projectPath, 'src/lib/config/constants.ts');\n if (fileExists(constantsPath)) {\n let content = await readFile(constantsPath);\n content = content.replace(/export const API_RESPONSE_DATA_KEY = 'data';\\n/, '');\n content = content.replace(/export const SAVE_AUTH_TOKENS = false;\\n/, '');\n await writeFile(constantsPath, content);\n }\n\n // Remove errors and types\n await deleteDirectory(path.join(projectPath, 'src/lib/errors'));\n await deleteDirectory(path.join(projectPath, 'src/types/utility'));\n await deleteDirectory(path.join(projectPath, 'src/types/common'));\n\n // Update types/index.ts\n const typesIndexPath = path.join(projectPath, 'src/types/index.ts');\n if (fileExists(typesIndexPath)) {\n let content = await readFile(typesIndexPath);\n content = content.replace(/export \\* from '\\.\\/utility';\\n/, '');\n content = content.replace(/export \\* from '\\.\\/common';\\n/, '');\n await writeFile(typesIndexPath, content);\n }\n } else if (answers.httpClient === 'axios') {\n await deleteDirectory(path.join(httpUtilsPath, 'fetch-client'));\n // Update index.ts\n let content = await readFile(path.join(httpUtilsPath, 'index.ts'));\n content = content.replace(/export .* from '\\.\\/fetch-client';\\n/g, '');\n await writeFile(path.join(httpUtilsPath, 'index.ts'), content);\n } else if (answers.httpClient === 'fetch') {\n await deleteDirectory(path.join(httpUtilsPath, 'axios-client'));\n // Update index.ts\n let content = await readFile(path.join(httpUtilsPath, 'index.ts'));\n content = content.replace(/export .* from '\\.\\/axios-client';\\n/g, '');\n await writeFile(path.join(httpUtilsPath, 'index.ts'), content);\n }\n\n // Secure Storage Service Cleanup\n if (!keepSecureStorage) {\n await deleteDirectory(path.join(projectPath, 'src/services/storage'));\n }\n\n // Dynamic RootProvider Generation\n const providers: string[] = [];\n const imports: string[] = [];\n\n if (answers.redux) {\n imports.push(\"import { StoreProvider } from '@/providers';\");\n providers.push('StoreProvider');\n }\n\n if (answers.darkMode) {\n imports.push(\"import { CustomThemeProvider } from '@/providers';\");\n providers.push('CustomThemeProvider');\n }\n\n if (answers.i18n) {\n imports.push(\"import { NextIntlClientProvider, AbstractIntlMessages } from 'next-intl';\");\n imports.push(\"import { SupportedLocale } from '@/types/i18n';\");\n }\n\n let rootProviderContent = `'use client';\n${imports.join('\\n')}\n\nexport const RootProvider = ({\n children,\n ${answers.i18n ? 'locale,\\n messages,' : ''}\n}: {\n children: React.ReactNode;\n ${answers.i18n ? 'locale: SupportedLocale;\\n messages: AbstractIntlMessages;' : ''}\n}) => {\n return (\n`;\n\n // Build the nesting\n let content = '{children}';\n\n if (answers.i18n) {\n content = `<NextIntlClientProvider locale={locale} messages={messages}>\n ${content}\n </NextIntlClientProvider>`;\n }\n\n if (answers.darkMode) {\n content = `<CustomThemeProvider>\n ${content}\n </CustomThemeProvider>`;\n }\n\n if (answers.redux) {\n content = `<StoreProvider>\n ${content}\n </StoreProvider>`;\n }\n\n // If no providers are wrapped, ensure we return a valid JSX element (Fragment)\n // instead of an object literal\n if (content === '{children}') {\n content = `<>{children}</>`;\n }\n\n rootProviderContent += ` ${content}\n );\n};\n`;\n\n await writeFile(path.join(projectPath, 'src/providers/RootProvider.tsx'), rootProviderContent);\n\n // Clean up individual feature handlers that were modifying RootProvider\n // Redux\n if (!answers.redux) {\n await deleteDirectory(path.join(projectPath, 'src/store'));\n // Remove the counter feature as it depends on Redux\n await deleteDirectory(path.join(projectPath, 'src/features/counter'));\n await deleteFile(path.join(projectPath, 'src/providers/StoreProvider.tsx'));\n\n // Delete Count component as it uses Redux\n await deleteFile(path.join(projectPath, 'src/components/Count.tsx'));\n\n // Update src/providers/index.ts\n const providersIndexPath = path.join(projectPath, 'src/providers/index.ts');\n let providersIndexContent = await readFile(providersIndexPath);\n providersIndexContent = providersIndexContent.replace(\n /export \\* from '\\.\\/StoreProvider';\\n/,\n '',\n );\n await writeFile(providersIndexPath, providersIndexContent);\n\n // Update src/components/index.ts\n const componentsIndexPath = path.join(projectPath, 'src/components/index.ts');\n if (fileExists(componentsIndexPath)) {\n let componentsIndexContent = await readFile(componentsIndexPath);\n componentsIndexContent = componentsIndexContent.replace(\n /export \\* from '\\.\\/Count';\\n?/,\n '',\n );\n await writeFile(componentsIndexPath, componentsIndexContent);\n }\n }\n\n // Dark Mode\n if (!answers.darkMode) {\n await deleteFile(path.join(projectPath, 'src/providers/CustomThemeProvider.tsx'));\n // Update src/providers/index.ts\n const providersIndexPath = path.join(projectPath, 'src/providers/index.ts');\n let providersIndexContent = await readFile(providersIndexPath);\n providersIndexContent = providersIndexContent.replace(\n /export \\* from '\\.\\/CustomThemeProvider';\\n/,\n '',\n );\n await writeFile(providersIndexPath, providersIndexContent);\n\n // Update src/styles/globals.css for Tailwind v4\n const globalsCssPath = path.join(projectPath, 'src/styles/globals.css');\n if (fileExists(globalsCssPath)) {\n let cssContent = await readFile(globalsCssPath);\n cssContent = cssContent.replace(/@custom-variant dark \\(.*?\\);\\n?/, '');\n await writeFile(globalsCssPath, cssContent);\n }\n }\n\n // i18n\n if (!answers.i18n) {\n await deleteDirectory(path.join(projectPath, 'src/i18n'));\n await deleteDirectory(path.join(projectPath, 'src/app/[locale]'));\n await deleteFile(path.join(projectPath, 'src/proxy.ts'));\n await deleteFile(path.join(projectPath, 'src/middleware.ts')); // Just in case\n await deleteFile(path.join(projectPath, 'src/types/i18n.ts'));\n await deleteFile(path.join(projectPath, 'src/lib/config/app-locales.ts'));\n\n // Update src/types/index.ts\n const typesIndexPath = path.join(projectPath, 'src/types/index.ts');\n if (fileExists(typesIndexPath)) {\n let content = await readFile(typesIndexPath);\n content = content.replace(/export \\* from '\\.\\/i18n';\\n/, '');\n await writeFile(typesIndexPath, content);\n }\n\n // Update src/lib/config/index.ts\n const configIndexPath = path.join(projectPath, 'src/lib/config/index.ts');\n if (fileExists(configIndexPath)) {\n let content = await readFile(configIndexPath);\n content = content.replace(/export \\* from '\\.\\/app-locales';\\n/, '');\n await writeFile(configIndexPath, content);\n }\n\n // Update next.config.ts\n const nextConfigPath = path.join(projectPath, 'next.config.ts');\n if (fileExists(nextConfigPath)) {\n let configContent = await readFile(nextConfigPath);\n configContent = configContent.replace(\n /import createNextIntlPlugin from 'next-intl\\/plugin';\\n/,\n '',\n );\n configContent = configContent.replace(\n /const withNextIntl = createNextIntlPlugin\\(\\);\\n/,\n '',\n );\n // Updated regex to handle removal of bundle analyzer wrapper\n // Template now likely has: export default withNextIntl(nextConfig);\n // We want: export default nextConfig;\n configContent = configContent.replace(\n /export default withNextIntl\\(nextConfig\\);/,\n 'export default nextConfig;',\n );\n // Fallback for old template structure just in case (withAnalyzer)\n configContent = configContent.replace(\n /export default withNextIntl\\(withAnalyzer\\(nextConfig\\)\\);/,\n 'export default withAnalyzer(nextConfig);',\n );\n await writeFile(nextConfigPath, configContent);\n }\n\n // Create basic layout\n const basicLayout = `import type { Metadata } from 'next';\nimport '@/styles/globals.css';\nimport { Livvic } from 'next/font/google';\nimport { RootProvider } from '@/providers';\n\nconst livvic = Livvic({\n subsets: ['latin'],\n variable: '--font-livvic',\n weight: ['100', '200', '300', '400', '500', '600', '700', '900'],\n display: 'swap',\n});\n\nexport const metadata: Metadata = {\n title: '${answers.projectName}',\n description: '${answers.description}',\n};\n\nexport default function RootLayout({\n children,\n}: Readonly<{\n children: React.ReactNode;\n}>) {\n return (\n <html lang=\"en\" suppressHydrationWarning={true}>\n <body className={\\`\\${livvic.variable} bg-light dark:bg-dark antialiased\\`}>\n <RootProvider>\n {children}\n </RootProvider>\n </body>\n </html>\n );\n}\n`;\n await writeFile(path.join(projectPath, 'src/app/layout.tsx'), basicLayout);\n\n // Create basic page\n const basicPage = `export default function Home() {\n return (\n <div className=\"flex min-h-screen flex-col items-center justify-center p-24\">\n <h1 className=\"text-4xl font-bold\">Welcome to ${answers.projectName}</h1>\n <p className=\"mt-4 text-xl\">Get started by editing src/app/page.tsx</p>\n </div>\n );\n}\n`;\n await writeFile(path.join(projectPath, 'src/app/page.tsx'), basicPage);\n }\n\n // License - Always remove the existing LICENSE file\n await deleteFile(path.join(projectPath, 'LICENSE'));\n\n // Community Files\n const allCommunityFiles = ['CODE_OF_CONDUCT.md', 'CONTRIBUTING.md', 'SECURITY.md'];\n for (const file of allCommunityFiles) {\n if (!answers.communityFiles.includes(file)) {\n await deleteFile(path.join(projectPath, file));\n }\n }\n\n // Changelog - Always remove the existing CHANGELOG.md\n await deleteFile(path.join(projectPath, 'CHANGELOG.md'));\n\n // Readme Handling\n // 1. Find all README.md files (recursively)\n const findReadmes = async (dir: string): Promise<string[]> => {\n const entries = await readdir(dir, { withFileTypes: true });\n const files: string[] = [];\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name);\n if (entry.isDirectory() && entry.name !== 'node_modules' && entry.name !== '.git') {\n files.push(...(await findReadmes(fullPath)));\n } else if (entry.isFile() && entry.name.toLowerCase() === 'readme.md') {\n files.push(fullPath);\n }\n }\n return files;\n };\n\n const allReadmes = await findReadmes(projectPath);\n const rootReadmePath = path.join(projectPath, 'README.md');\n\n // 2. Delete all non-root READMEs\n for (const readmePath of allReadmes) {\n if (readmePath !== rootReadmePath) {\n await deleteFile(readmePath);\n }\n }\n\n // 3. Handle root README\n if (answers.readme) {\n // Generate simple README\n const simpleReadme = `# ${answers.projectName}\n\n${answers.description}\n\n## Getting Started\n\nFirst, run the development server:\n\n\\`\\`\\`bash\n${answers.packageManager === 'npm' ? 'npm run dev' : answers.packageManager + ' dev'}\n\\`\\`\\`\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n`;\n await writeFile(rootReadmePath, simpleReadme);\n } else {\n // Delete root README\n await deleteFile(rootReadmePath);\n }\n\n // Docker\n if (!answers.docker) {\n await deleteFile(path.join(projectPath, 'Dockerfile'));\n await deleteFile(path.join(projectPath, 'docker-compose.yml'));\n await deleteFile(path.join(projectPath, '.dockerignore'));\n\n // Remove Docker env vars from .env.example\n const envPath = path.join(projectPath, '.env.example');\n if (fileExists(envPath)) {\n let envContent = await readFile(envPath);\n envContent = envContent.replace(/# Docker Compose Configuration\\n/, '');\n envContent = envContent.replace(/CONTAINER_NAME=.*\\n/, '');\n envContent = envContent.replace(/IMAGE_NAME=.*\\n/, '');\n envContent = envContent.replace(/IMAGE_TAG=.*\\n/, '');\n await writeFile(envPath, envContent);\n }\n } else {\n // Update Docker env vars in .env.example\n const envPath = path.join(projectPath, '.env.example');\n if (fileExists(envPath)) {\n let envContent = await readFile(envPath);\n\n // Helper to update or append env var\n const updateEnvVar = (key: string, value: string) => {\n const regex = new RegExp(`${key}=.*`);\n if (regex.test(envContent)) {\n envContent = envContent.replace(regex, `${key}=${value}`);\n } else {\n envContent += `${key}=${value}\\n`;\n }\n };\n\n updateEnvVar('CONTAINER_NAME', answers.containerName || 'next-app');\n updateEnvVar('IMAGE_NAME', answers.imageName || 'nextjs-starter');\n updateEnvVar('IMAGE_TAG', answers.imageTag || 'latest');\n\n await writeFile(envPath, envContent);\n }\n }\n\n // CI/CD\n if (!answers.ci) {\n await deleteDirectory(path.join(projectPath, '.github/workflows'));\n }\n\n // GitHub Templates\n const githubPath = path.join(projectPath, '.github');\n if (!answers.keepTemplates) {\n await deleteDirectory(path.join(githubPath, 'ISSUE_TEMPLATE'));\n await deleteFile(path.join(githubPath, 'PULL_REQUEST_TEMPLATE.md'));\n } else {\n // Update templates with config\n const issueTemplatePath = path.join(githubPath, 'ISSUE_TEMPLATE');\n const prTemplatePath = path.join(githubPath, 'PULL_REQUEST_TEMPLATE.md');\n\n // Helper to replace placeholders\n const replacePlaceholders = (content: string) => {\n return content\n .replace(/Teispace/g, answers.company)\n .replace(/support@teispace\\.com/g, answers.email)\n .replace(/Next\\.js Starter/g, answers.projectName)\n .replace(/\\[AUTHOR\\]/g, answers.author)\n .replace(/\\[COMPANY\\]/g, answers.company)\n .replace(/\\[EMAIL\\]/g, answers.email);\n };\n\n // Update PR Template\n if (fileExists(prTemplatePath)) {\n let content = await readFile(prTemplatePath);\n content = replacePlaceholders(content);\n await writeFile(prTemplatePath, content);\n }\n\n // Update Issue Templates (if directory exists)\n try {\n if (fileExists(issueTemplatePath)) {\n const files = await readdir(issueTemplatePath);\n for (const file of files) {\n const filePath = path.join(issueTemplatePath, file);\n let content = await readFile(filePath);\n content = replacePlaceholders(content);\n await writeFile(filePath, content);\n }\n }\n } catch {\n // Ignore errors if directory doesn't exist or can't be read\n }\n }\n\n // DevTools\n // DevTools - Pre-commit hooks\n if (!answers.preCommitHooks) {\n await deleteDirectory(path.join(projectPath, '.husky'));\n await deleteFile(path.join(projectPath, 'commitlint.config.mjs'));\n await deleteFile(path.join(projectPath, '.lintstagedrc.mjs'));\n\n // Remove scripts and deps\n await updateJson(path.join(projectPath, 'package.json'), (pkg) => {\n delete pkg.devDependencies['husky'];\n delete pkg.devDependencies['@commitlint/cli'];\n delete pkg.devDependencies['@commitlint/config-conventional'];\n delete pkg.devDependencies['lint-staged'];\n delete pkg.scripts['prepare'];\n delete pkg.scripts['postinstall']; // Often used for husky install\n delete pkg.commitlint;\n delete pkg['lint-staged'];\n return pkg;\n });\n }\n\n // DevTools - Commitizen\n if (!answers.commitizen) {\n await deleteFile(path.join(projectPath, '.czrc'));\n\n // Remove scripts and deps\n await updateJson(path.join(projectPath, 'package.json'), (pkg) => {\n delete pkg.devDependencies['commitizen'];\n delete pkg.devDependencies['cz-conventional-changelog'];\n delete pkg.config?.commitizen;\n if (pkg.config && Object.keys(pkg.config).length === 0) {\n delete pkg.config;\n }\n delete pkg.scripts['commit'];\n return pkg;\n });\n }\n\n // 4. Initialize Git\n spinner.text = 'Initializing Git...';\n await initializeGit(projectPath);\n if (answers.gitRemote) {\n await addRemote(projectPath, answers.gitRemote);\n }\n\n // 5. Install Dependencies\n spinner.text = 'Installing dependencies...';\n await installDependencies(projectPath, answers.packageManager);\n\n // 6. Format and Lint\n spinner.text = 'Formatting and Linting...';\n await runScript(projectPath, answers.packageManager, 'format');\n await runScript(projectPath, answers.packageManager, 'lint:fix');\n\n spinner.succeed(pc.green(`Project ${answers.projectName} created successfully!`));\n log('');\n log('To get started:');\n log(pc.cyan(` cd ${answers.projectName}`));\n log(\n pc.cyan(\n ` ${answers.packageManager === 'npm' ? 'npm run dev' : answers.packageManager + ' dev'}`,\n ),\n );\n log('');\n } catch (err) {\n spinner.fail('Failed to create project.');\n console.error(err);\n // Cleanup: Delete the created directory if it exists\n if (fileExists(projectPath)) {\n spinner.text = 'Cleaning up...';\n try {\n await deleteDirectory(projectPath);\n console.log(pc.yellow(`\\nCleaned up: Deleted directory ${answers.projectName}`));\n } catch (cleanupErr) {\n console.error(pc.red(`\\nFailed to clean up directory ${answers.projectName}:`), cleanupErr);\n }\n }\n process.exit(1);\n }\n};\n", "import ora, { Ora, Options } from 'ora';\n\n// Create and start a spinner\nexport function startSpinner(text = '', options?: Options): Ora {\n const spinner = ora({ text, ...options });\n spinner.start();\n return spinner;\n}\n\n// Stop a spinner without changing its status\nexport function stopSpinner(spinner: Ora): void {\n spinner.stop();\n}\n\n// Mark spinner as succeeded\nexport function succeedSpinner(spinner: Ora, text?: string): void {\n spinner.succeed(text);\n}\n\n// Mark spinner as failed\nexport function failSpinner(spinner: Ora, text?: string): void {\n spinner.fail(text);\n}\n\n// Run an async function while showing a spinner; auto-succeed/fail\nexport async function withSpinner<T>(\n text: string,\n fn: () => Promise<T>,\n {\n successText,\n failText,\n options,\n }: { successText?: string; failText?: string; options?: Options } = {},\n): Promise<T> {\n const spinner = startSpinner(text, options);\n try {\n const result = await fn();\n spinner.succeed(successText ?? 'Done');\n return result;\n } catch (err) {\n spinner.fail(failText ?? 'Failed');\n throw err;\n }\n}\n\nexport default startSpinner;\n", "import Enquirer from 'enquirer';\nimport { PackageManager } from '../core/package-manager';\n\nconst { prompt } = Enquirer;\n\ntype PromptContext = {\n state?: { answers?: Partial<ProjectPrompts> };\n enquirer?: { answers?: Partial<ProjectPrompts> };\n};\n\nexport interface ProjectPrompts {\n projectName: string;\n description: string;\n author: string;\n version: string;\n packageManager: PackageManager;\n gitRemote: string;\n gitIssues: string;\n gitHomepage: string;\n httpClient: 'axios' | 'fetch' | 'both' | 'none';\n reactSecureStorage?: boolean;\n email: string;\n company: string;\n keepTemplates: boolean;\n darkMode: boolean;\n redux: boolean;\n i18n: boolean;\n communityFiles: string[];\n readme: boolean;\n docker: boolean;\n containerName?: string;\n imageName?: string;\n imageTag?: string;\n ci: boolean;\n preCommitHooks: boolean;\n commitizen: boolean;\n}\n\nexport const promptForProjectDetails = async (initialName?: string): Promise<ProjectPrompts> => {\n const response = await prompt<ProjectPrompts>([\n {\n type: 'input',\n name: 'projectName',\n message: 'What is the project name?',\n initial: initialName || 'my-app',\n skip: !!initialName,\n },\n {\n type: 'input',\n name: 'description',\n message: 'Project description:',\n initial: 'A Next.js application',\n },\n {\n type: 'input',\n name: 'author',\n message: 'Author:',\n initial: 'Teispace',\n },\n {\n type: 'input',\n name: 'version',\n message: 'Version:',\n initial: '0.1.0',\n },\n {\n type: 'input',\n name: 'email',\n message: 'Support email:',\n initial: 'support@example.com',\n },\n {\n type: 'input',\n name: 'company',\n message: 'Company name:',\n initial: 'Teispace',\n },\n {\n type: 'select',\n name: 'packageManager',\n message: 'Which package manager would you like to use?',\n choices: ['npm', 'yarn', 'pnpm', 'bun'],\n initial: 0,\n },\n {\n type: 'input',\n name: 'gitRemote',\n message: 'Git remote origin URL (optional):',\n },\n {\n type: 'input',\n name: 'gitIssues',\n message: 'Git issues URL (optional):',\n },\n {\n type: 'input',\n name: 'gitHomepage',\n message: 'Project homepage URL (optional):',\n },\n {\n type: 'confirm',\n name: 'keepTemplates',\n message: 'Do you want to keep GitHub issue and pull request templates?',\n initial: true,\n },\n {\n type: 'select',\n name: 'httpClient',\n message: 'Which HTTP client do you want to use?',\n choices: ['axios', 'fetch', 'both', 'none'],\n initial: 0,\n },\n {\n type: 'confirm',\n name: 'reactSecureStorage',\n message: 'Do you want to include react-secure-storage?',\n initial: true,\n skip: function (this: PromptContext) {\n // Access answers from the prompt instance safely across versions\n const answers = this.state?.answers ?? this.enquirer?.answers ?? {};\n // If HTTP client is selected (not 'none'), we skip this question (it will be auto-included)\n return !!(answers.httpClient && answers.httpClient !== 'none');\n },\n },\n {\n type: 'confirm',\n name: 'darkMode',\n message: 'Do you want to include Dark Mode (Tailwind + next-themes)?',\n initial: true,\n },\n {\n type: 'confirm',\n name: 'redux',\n message: 'Do you want to include Redux Toolkit?',\n initial: true,\n },\n {\n type: 'confirm',\n name: 'i18n',\n message: 'Do you want to include Internationalization (next-intl)?',\n initial: true,\n },\n {\n type: 'multiselect',\n name: 'communityFiles',\n message: 'Select community files to include:',\n choices: [\n { name: 'CODE_OF_CONDUCT.md', value: 'CODE_OF_CONDUCT.md' },\n { name: 'CONTRIBUTING.md', value: 'CONTRIBUTING.md' },\n { name: 'SECURITY.md', value: 'SECURITY.md' },\n ],\n initial: ['CODE_OF_CONDUCT.md', 'CONTRIBUTING.md', 'SECURITY.md'],\n },\n {\n type: 'confirm',\n name: 'readme',\n message: 'Do you want to create a README.md?',\n initial: true,\n },\n {\n type: 'confirm',\n name: 'docker',\n message: 'Do you want to include Docker configuration?',\n initial: true,\n },\n {\n type: 'input',\n name: 'containerName',\n message: 'Docker Container Name:',\n initial: 'next-app',\n skip: function (this: PromptContext) {\n const answers = this.state?.answers ?? this.enquirer?.answers ?? {};\n return !answers.docker;\n },\n },\n {\n type: 'input',\n name: 'imageName',\n message: 'Docker Image Name:',\n initial: 'nextjs-starter',\n skip: function (this: PromptContext) {\n const answers = this.state?.answers ?? this.enquirer?.answers ?? {};\n return !answers.docker;\n },\n },\n {\n type: 'input',\n name: 'imageTag',\n message: 'Docker Image Tag:',\n initial: 'latest',\n skip: function (this: PromptContext) {\n const answers = this.state?.answers ?? this.enquirer?.answers ?? {};\n return !answers.docker;\n },\n },\n {\n type: 'confirm',\n name: 'ci',\n message: 'Do you want to include GitHub Actions (CI/CD)?',\n initial: true,\n },\n {\n type: 'confirm',\n name: 'preCommitHooks',\n message: 'Do you want to setup pre-commit hooks (Husky, Commitlint, Lint-staged)?',\n initial: true,\n },\n {\n type: 'confirm',\n name: 'commitizen',\n message: 'Do you want to setup Commitizen?',\n initial: true,\n },\n ] as any);\n\n return response;\n};\n", "import fs from 'node:fs/promises';\nimport path from 'node:path';\nimport { existsSync } from 'node:fs';\n\nexport const readFile = async (filePath: string): Promise<string> => {\n return fs.readFile(filePath, 'utf-8');\n};\n\nexport const writeFile = async (filePath: string, content: string): Promise<void> => {\n await fs.mkdir(path.dirname(filePath), { recursive: true });\n await fs.writeFile(filePath, content, 'utf-8');\n};\n\nexport const deleteFile = async (filePath: string): Promise<void> => {\n if (existsSync(filePath)) {\n await fs.unlink(filePath);\n }\n};\n\nexport const deleteDirectory = async (dirPath: string): Promise<void> => {\n if (existsSync(dirPath)) {\n await fs.rm(dirPath, { recursive: true, force: true });\n }\n};\n\nexport const updateJson = async <T = any>(\n filePath: string,\n update: (json: T) => T,\n): Promise<void> => {\n const content = await readFile(filePath);\n const json = JSON.parse(content) as T;\n const updatedJson = update(json);\n await writeFile(filePath, JSON.stringify(updatedJson, null, 2));\n};\n\nexport const fileExists = (filePath: string): boolean => {\n return existsSync(filePath);\n};\n", "import { exec } from 'node:child_process';\nimport { promisify } from 'node:util';\n\nconst execAsync = promisify(exec);\n\nexport const initializeGit = async (cwd: string): Promise<void> => {\n try {\n await execAsync('git init', { cwd });\n await execAsync('git add .', { cwd });\n await execAsync('git commit -m \"Initial commit from @teispace/next-maker\"', { cwd });\n } catch (error) {\n // Ignore error if git is not installed or fails\n console.warn('Failed to initialize git repository', error);\n }\n};\n\nexport const addRemote = async (cwd: string, url: string): Promise<void> => {\n try {\n await execAsync(`git remote add origin ${url}`, { cwd });\n } catch (error) {\n console.warn('Failed to add remote origin', error);\n }\n};\n\nexport const isGitInstalled = async (): Promise<boolean> => {\n try {\n await execAsync('git --version');\n return true;\n } catch {\n return false;\n }\n};\n", "import { exec } from 'node:child_process';\nimport { promisify } from 'node:util';\n\nconst execAsync = promisify(exec);\n\nexport type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun';\n\nexport const installDependencies = async (cwd: string, manager: PackageManager): Promise<void> => {\n const command = `${manager} install`;\n try {\n await execAsync(command, { cwd });\n } catch (error) {\n throw new Error(`Failed to install dependencies with ${manager}: ${error}`);\n }\n};\n\nexport const runScript = async (\n cwd: string,\n manager: PackageManager,\n script: string,\n): Promise<void> => {\n const command = `${manager} run ${script}`;\n try {\n await execAsync(command, { cwd });\n } catch (error) {\n // We don't want to fail the whole setup if linting fails, just warn\n console.warn(`Warning: Failed to run script '${script}': ${error}`);\n }\n};\n\nexport const getPackageManager = (): PackageManager => {\n const userAgent = process.env.npm_config_user_agent;\n if (userAgent) {\n if (userAgent.startsWith('yarn')) return 'yarn';\n if (userAgent.startsWith('pnpm')) return 'pnpm';\n if (userAgent.startsWith('bun')) return 'bun';\n }\n return 'npm';\n};\n", "import pc from 'picocolors';\n\n// Define a type for allowed colors explicitly\nexport type Color =\n | 'reset'\n | 'red'\n | 'green'\n | 'yellow'\n | 'blue'\n | 'cyan'\n | 'magenta'\n | 'white'\n | 'gray'\n | 'bright'\n | 'dim';\n\nconst colorMap: Record<Color, (s: string) => string> = {\n reset: (s: string) => s,\n red: pc.red,\n green: pc.green,\n yellow: pc.yellow,\n blue: pc.blue,\n cyan: pc.cyan,\n magenta: pc.magenta,\n white: pc.white,\n gray: pc.gray,\n bright: pc.bold,\n dim: pc.dim,\n};\n\n// Print with color\nexport function print(message: string, color: Color = 'reset'): void {\n const colorFn = colorMap[color] ?? ((text: string) => text);\n console.log(colorFn(message));\n}\n\n// Print section header\nexport function printHeader(title: string): void {\n console.log('');\n print('\u2550'.repeat(60), 'cyan');\n print(` ${title}`, 'bright');\n print('\u2550'.repeat(60), 'cyan');\n console.log('');\n}\n\n// Print success message\nexport function success(message: string): void {\n print(`\u2713 ${message}`, 'green');\n}\n\n// Print error message\nexport function error(message: string): void {\n print(`\u2716 ${message}`, 'red');\n}\n\n// Print warning message\nexport function warning(message: string): void {\n print(`\u26A0 ${message}`, 'yellow');\n}\n\n// Print info message\nexport function info(message: string): void {\n print(`\u2139 ${message}`, 'cyan');\n}\n\nexport function log(message: string): void {\n print(message);\n}\n\n// Print banner\nexport function printBanner(): void {\n console.log('');\n print('\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557', 'cyan');\n print('\u2551 \u2551', 'cyan');\n print('\u2551 \uD83D\uDE80 Create Teispace Next.js App \uD83D\uDE80 \u2551', 'cyan');\n print('\u2551 \u2551', 'cyan');\n print('\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D', 'cyan');\n console.log('');\n}\n", "export type SetupOptions = {\n logger?: (msg: string) => void;\n exitOnCancel?: boolean;\n};\n\nexport function setupCancellationHandlers(options?: SetupOptions): () => void {\n const {\n logger = (m: string) => console.error(m),\n exitOnCancel = process.env.NODE_ENV !== 'test',\n } = options ?? {};\n\n const onCancel = (): void => {\n console.log('');\n console.log('');\n logger('Setup cancelled by user');\n console.log('');\n if (exitOnCancel) process.exit(0);\n };\n\n const onUncaught = (err: unknown): void => {\n if (err !== null && typeof err === 'object' && 'code' in err) {\n const maybeErrWithCode = err as { code?: unknown };\n if (maybeErrWithCode.code === 'ERR_USE_AFTER_CLOSE') {\n onCancel();\n return;\n }\n }\n\n // Log uncaught exceptions instead of throwing so the CLI can report\n // the error and exit gracefully when appropriate.\n if (err instanceof Error) {\n logger(`Uncaught exception: ${err.message}`);\n return;\n }\n logger(`Uncaught exception: ${String(err)}`);\n };\n\n const onRejection = (reason: unknown): void => {\n // Log unhandled promise rejections rather than letting them crash the\n // process. This converts the reason to a readable string safely.\n if (reason instanceof Error) {\n logger(`Unhandled promise rejection: ${reason.message}`);\n return;\n }\n logger(`Unhandled promise rejection: ${String(reason)}`);\n };\n\n process.on('SIGINT', onCancel);\n process.on('SIGTERM', onCancel);\n process.on('uncaughtException', onUncaught);\n process.on('unhandledRejection', onRejection as (...args: unknown[]) => void);\n\n // Return a cleanup function to remove listeners (useful in tests).\n return (): void => {\n process.off('SIGINT', onCancel);\n process.off('SIGTERM', onCancel);\n process.off('uncaughtException', onUncaught);\n process.off('unhandledRejection', onRejection as (...args: unknown[]) => void);\n };\n}\n\nexport default setupCancellationHandlers;\n", "import { Command } from 'commander';\nimport pc from 'picocolors';\nimport { log } from '../config';\n\nexport const registerFeatureCommand = (program: Command) => {\n program\n .command('feature [name]')\n .description('Generate a new feature module')\n .action(async () => {\n log(pc.yellow('Feature generation will be available soon!'));\n });\n};\n", "import { Command } from 'commander';\nimport { registerAppCommand } from './app';\nimport { registerFeatureCommand } from './feature';\n\nexport const registerCommands = (program: Command) => {\n registerAppCommand(program);\n registerFeatureCommand(program);\n};\n"],
|
|
5
|
+
"mappings": ";AAAA,OAAS,WAAAA,OAAe,YCCxB,OAAOC,OAAW,QAClB,OAAOC,MAAU,YACjB,OAAS,WAAAC,MAAe,mBACxB,OAAOC,MAAQ,aCJf,OAAOC,MAA2B,MAG3B,SAASC,EAAaC,EAAO,GAAIC,EAAwB,CAC9D,IAAMC,EAAUJ,EAAI,CAAE,KAAAE,EAAM,GAAGC,CAAQ,CAAC,EACxC,OAAAC,EAAQ,MAAM,EACPA,CACT,CCPA,OAAOC,MAAc,WAGrB,GAAM,CAAE,OAAAC,CAAO,EAAID,EAmCNE,EAA0B,MAAOC,GAC3B,MAAMF,EAAuB,CAC5C,CACE,KAAM,QACN,KAAM,cACN,QAAS,4BACT,QAASE,GAAe,SACxB,KAAM,CAAC,CAACA,CACV,EACA,CACE,KAAM,QACN,KAAM,cACN,QAAS,uBACT,QAAS,uBACX,EACA,CACE,KAAM,QACN,KAAM,SACN,QAAS,UACT,QAAS,UACX,EACA,CACE,KAAM,QACN,KAAM,UACN,QAAS,WACT,QAAS,OACX,EACA,CACE,KAAM,QACN,KAAM,QACN,QAAS,iBACT,QAAS,qBACX,EACA,CACE,KAAM,QACN,KAAM,UACN,QAAS,gBACT,QAAS,UACX,EACA,CACE,KAAM,SACN,KAAM,iBACN,QAAS,+CACT,QAAS,CAAC,MAAO,OAAQ,OAAQ,KAAK,EACtC,QAAS,CACX,EACA,CACE,KAAM,QACN,KAAM,YACN,QAAS,mCACX,EACA,CACE,KAAM,QACN,KAAM,YACN,QAAS,4BACX,EACA,CACE,KAAM,QACN,KAAM,cACN,QAAS,kCACX,EACA,CACE,KAAM,UACN,KAA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ExBA,EAAQ,MAAM,CAChB,CAEAJ,GAAK,EAAE,MAAOO,GAAQ,CACpB,IAAMC,EACJD,GAAO,OAAOA,GAAQ,UAAY,YAAaA,EAAOA,EAAc,QAAU,OAAOA,CAAG,EAC1FJ,EAAM,qBAAqBK,CAAO,EAAE,CACtC,CAAC",
|
|
6
|
+
"names": ["Command", "degit", "path", "readdir", "pc", "ora", "startSpinner", "text", "options", "spinner", "Enquirer", "prompt", "promptForProjectDetails", "initialName", "answers", "fs", "path", "existsSync", "readFile", "filePath", "writeFile", "content", "deleteFile", "deleteDirectory", "dirPath", "updateJson", "update", "json", "updatedJson", "fileExists", "exec", "promisify", "execAsync", "initializeGit", "cwd", "error", "addRemote", "url", "exec", "promisify", "execAsync", "installDependencies", "cwd", "manager", "command", "error", "runScript", "script", "pc", "colorMap", "s", "print", "message", "color", "colorFn", "text", "error", "message", "print", "log", "message", "print", "printBanner", "setupCancellationHandlers", "options", "logger", "m", "exitOnCancel", "onCancel", "onUncaught", "err", "onRejection", "reason", "registerAppCommand", "program", "name", "createApp", "initialName", "printBanner", "log", "answers", "promptForProjectDetails", "projectPath", "path", "fileExists", "pc", "spinner", "startSpinner", "degit", "updateJson", "pkg", "httpUtilsPath", "keepSecureStorage", "deleteDirectory", "writeFile", "utilsIndexPath", "content", "readFile", "constantsPath", "typesIndexPath", "providers", "imports", "rootProviderContent", "deleteFile", "providersIndexPath", "providersIndexContent", "componentsIndexPath", "componentsIndexContent", "globalsCssPath", "cssContent", "configIndexPath", "nextConfigPath", "configContent", "basicLayout", "basicPage", "allCommunityFiles", "file", "findReadmes", "dir", "entries", "readdir", "files", "entry", "fullPath", "allReadmes", "rootReadmePath", "readmePath", "simpleReadme", "envPath", "envContent", "updateEnvVar", "key", "value", "regex", "githubPath", "issueTemplatePath", "prTemplatePath", "replacePlaceholders", "filePath", "initializeGit", "addRemote", "installDependencies", "runScript", "err", "cleanupErr", "pc", "registerFeatureCommand", "program", "log", "pc", "registerCommands", "program", "registerAppCommand", "registerFeatureCommand", "main", "setupCancellationHandlers", "m", "error", "program", "Command", "registerCommands", "err", "message"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/commands/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/commands/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,eAAO,MAAM,kBAAkB,GAAI,SAAS,OAAO,SAQlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/commands/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/commands/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,sBAAsB,GAAI,SAAS,OAAO,SAOtD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const readFile: (filePath: string) => Promise<string>;
|
|
2
|
+
export declare const writeFile: (filePath: string, content: string) => Promise<void>;
|
|
3
|
+
export declare const deleteFile: (filePath: string) => Promise<void>;
|
|
4
|
+
export declare const deleteDirectory: (dirPath: string) => Promise<void>;
|
|
5
|
+
export declare const updateJson: <T = any>(filePath: string, update: (json: T) => T) => Promise<void>;
|
|
6
|
+
export declare const fileExists: (filePath: string) => boolean;
|
|
7
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/core/files.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,CAE/D,CAAC;AAEF,eAAO,MAAM,SAAS,GAAU,UAAU,MAAM,EAAE,SAAS,MAAM,KAAG,OAAO,CAAC,IAAI,CAG/E,CAAC;AAEF,eAAO,MAAM,UAAU,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,IAAI,CAI/D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,IAAI,CAInE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAU,CAAC,GAAG,GAAG,EACtC,UAAU,MAAM,EAChB,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KACrB,OAAO,CAAC,IAAI,CAKd,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,KAAG,OAE7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../src/core/git.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,GAAU,KAAK,MAAM,KAAG,OAAO,CAAC,IAAI,CAS7D,CAAC;AAEF,eAAO,MAAM,SAAS,GAAU,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,OAAO,CAAC,IAAI,CAMtE,CAAC;AAEF,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC,OAAO,CAOtD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun';
|
|
2
|
+
export declare const installDependencies: (cwd: string, manager: PackageManager) => Promise<void>;
|
|
3
|
+
export declare const runScript: (cwd: string, manager: PackageManager, script: string) => Promise<void>;
|
|
4
|
+
export declare const getPackageManager: () => PackageManager;
|
|
5
|
+
//# sourceMappingURL=package-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../../../src/core/package-manager.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAE7D,eAAO,MAAM,mBAAmB,GAAU,KAAK,MAAM,EAAE,SAAS,cAAc,KAAG,OAAO,CAAC,IAAI,CAO5F,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,KAAK,MAAM,EACX,SAAS,cAAc,EACvB,QAAQ,MAAM,KACb,OAAO,CAAC,IAAI,CAQd,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,cAQpC,CAAC"}
|
|
@@ -1,3 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import { PackageManager } from '../core/package-manager';
|
|
2
|
+
export interface ProjectPrompts {
|
|
3
|
+
projectName: string;
|
|
4
|
+
description: string;
|
|
5
|
+
author: string;
|
|
6
|
+
version: string;
|
|
7
|
+
packageManager: PackageManager;
|
|
8
|
+
gitRemote: string;
|
|
9
|
+
gitIssues: string;
|
|
10
|
+
gitHomepage: string;
|
|
11
|
+
httpClient: 'axios' | 'fetch' | 'both' | 'none';
|
|
12
|
+
reactSecureStorage?: boolean;
|
|
13
|
+
email: string;
|
|
14
|
+
company: string;
|
|
15
|
+
keepTemplates: boolean;
|
|
16
|
+
darkMode: boolean;
|
|
17
|
+
redux: boolean;
|
|
18
|
+
i18n: boolean;
|
|
19
|
+
communityFiles: string[];
|
|
20
|
+
readme: boolean;
|
|
21
|
+
docker: boolean;
|
|
22
|
+
containerName?: string;
|
|
23
|
+
imageName?: string;
|
|
24
|
+
imageTag?: string;
|
|
25
|
+
ci: boolean;
|
|
26
|
+
preCommitHooks: boolean;
|
|
27
|
+
commitizen: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare const promptForProjectDetails: (initialName?: string) => Promise<ProjectPrompts>;
|
|
3
30
|
//# sourceMappingURL=create-app.prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-app.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/create-app.prompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-app.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/create-app.prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AASzD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAChD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,OAAO,CAAC;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,uBAAuB,GAAU,cAAc,MAAM,KAAG,OAAO,CAAC,cAAc,CAkL1F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teispace/next-maker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Create a new Teispace Next.js application with interactive setup.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nextjs",
|
|
@@ -40,14 +40,16 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"commander": "^14.0.2",
|
|
43
|
+
"degit": "^2.8.4",
|
|
43
44
|
"enquirer": "^2.4.1",
|
|
44
45
|
"ora": "^9.0.0",
|
|
45
46
|
"picocolors": "^1.1.1"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
49
|
+
"@types/degit": "^2.8.6",
|
|
48
50
|
"@types/node": "^24.10.1",
|
|
49
51
|
"esbuild": "^0.27.0",
|
|
50
|
-
"tsx": "^4.
|
|
52
|
+
"tsx": "^4.21.0"
|
|
51
53
|
},
|
|
52
54
|
"engines": {
|
|
53
55
|
"node": ">=20.0.0"
|