@teispace/next-maker 0.0.1

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/README.md +184 -0
  3. package/dist/build.d.ts +2 -0
  4. package/dist/build.d.ts.map +1 -0
  5. package/dist/build.js +19 -0
  6. package/dist/build.js.map +1 -0
  7. package/dist/index.js +3 -0
  8. package/dist/index.js.map +7 -0
  9. package/dist/src/commands/app.d.ts +3 -0
  10. package/dist/src/commands/app.d.ts.map +1 -0
  11. package/dist/src/commands/app.js +16 -0
  12. package/dist/src/commands/app.js.map +1 -0
  13. package/dist/src/commands/feature.d.ts +3 -0
  14. package/dist/src/commands/feature.d.ts.map +1 -0
  15. package/dist/src/commands/feature.js +13 -0
  16. package/dist/src/commands/feature.js.map +1 -0
  17. package/dist/src/commands/index.d.ts +3 -0
  18. package/dist/src/commands/index.d.ts.map +1 -0
  19. package/dist/src/commands/index.js +28 -0
  20. package/dist/src/commands/index.js.map +1 -0
  21. package/dist/src/config/colors.d.ts +18 -0
  22. package/dist/src/config/colors.d.ts.map +1 -0
  23. package/dist/src/config/constants.d.ts +1 -0
  24. package/dist/src/config/constants.d.ts.map +1 -0
  25. package/dist/src/config/constants.js +2 -0
  26. package/dist/src/config/constants.js.map +1 -0
  27. package/dist/src/config/errorHandlers.d.ts +7 -0
  28. package/dist/src/config/errorHandlers.d.ts.map +1 -0
  29. package/dist/src/config/errorHandlers.js +35 -0
  30. package/dist/src/config/errorHandlers.js.map +1 -0
  31. package/dist/src/config/index.d.ts +4 -0
  32. package/dist/src/config/index.d.ts.map +1 -0
  33. package/dist/src/config/index.js +3 -0
  34. package/dist/src/config/index.js.map +1 -0
  35. package/dist/src/config/output.d.ts +10 -0
  36. package/dist/src/config/output.d.ts.map +1 -0
  37. package/dist/src/config/output.js +57 -0
  38. package/dist/src/config/output.js.map +1 -0
  39. package/dist/src/config/spinner.d.ts +12 -0
  40. package/dist/src/config/spinner.d.ts.map +1 -0
  41. package/dist/src/config/utils.d.ts +1 -0
  42. package/dist/src/config/utils.d.ts.map +1 -0
  43. package/dist/src/config/utils.js +2 -0
  44. package/dist/src/config/utils.js.map +1 -0
  45. package/dist/src/index.d.ts +2 -0
  46. package/dist/src/index.d.ts.map +1 -0
  47. package/dist/src/index.js +20 -0
  48. package/dist/src/index.js.map +1 -0
  49. package/dist/src/prompts/create-app.prompt.d.ts +3 -0
  50. package/dist/src/prompts/create-app.prompt.d.ts.map +1 -0
  51. package/dist/src/prompts/create-app.prompt.js +22 -0
  52. package/dist/src/prompts/create-app.prompt.js.map +1 -0
  53. package/dist/src/prompts/feature.prompt.d.ts +2 -0
  54. package/dist/src/prompts/feature.prompt.d.ts.map +1 -0
  55. package/dist/src/prompts/feature.prompt.js +11 -0
  56. package/dist/src/prompts/feature.prompt.js.map +1 -0
  57. package/package.json +59 -0
package/CHANGELOG.md ADDED
File without changes
package/README.md ADDED
@@ -0,0 +1,184 @@
1
+ # @teispace/create-next-app
2
+
3
+ A powerful CLI tool to scaffold Next.js applications and generate boilerplate code for features, Redux slices, and API services.
4
+
5
+ ## Installation
6
+
7
+ ### Using npx (Recommended)
8
+
9
+ ```bash
10
+ npx @teispace/create-next-app <command> [name] [options]
11
+ ```
12
+
13
+ ### Global Installation
14
+
15
+ ```bash
16
+ npm install -g @teispace/create-next-app
17
+ create-next-app <command> [name] [options]
18
+ ```
19
+
20
+ ## Commands
21
+
22
+ ### 1. Create a New App (Default)
23
+
24
+ Generate a complete Next.js application with your preferred configuration.
25
+
26
+ ```bash
27
+ npx @teispace/create-next-app [project-name]
28
+ # or just
29
+ npx @teispace/create-next-app
30
+ ```
31
+
32
+ **Interactive prompts:**
33
+
34
+ - TypeScript configuration
35
+ - Tailwind CSS setup
36
+ - Redux Toolkit integration
37
+ - i18n (internationalization) support
38
+
39
+ **Example:**
40
+
41
+ ```bash
42
+ npx @teispace/create-next-app my-awesome-app
43
+ ```
44
+
45
+ ---
46
+
47
+ ### 2. Generate a Feature Module
48
+
49
+ Create a feature module with components, hooks, and utilities.
50
+
51
+ ```bash
52
+ npx @teispace/create-next-app feature user-dashboard
53
+ ```
54
+
55
+ **Interactive prompts:**
56
+
57
+ - Include test files
58
+ - Include Storybook stories
59
+ - Include CSS module
60
+
61
+ **Generated structure:**
62
+
63
+ ```
64
+ src/features/user-dashboard/
65
+ ├── components/
66
+ ├── hooks/
67
+ ├── utils/
68
+ ├── __tests__/ (optional)
69
+ ├── stories/ (optional)
70
+ └── index.ts
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Usage Examples
76
+
77
+ ### Create a new app with all features
78
+
79
+ ```bash
80
+ npx @teispace/create-next-app my-project
81
+ # Follow the interactive prompts
82
+ ```
83
+
84
+ ### Generate a feature
85
+
86
+ ```bash
87
+ # Create a feature
88
+ npx @teispace/create-next-app feature user-profile
89
+ ```
90
+
91
+ ### Get help
92
+
93
+ ```bash
94
+ # General help
95
+ npx @teispace/create-next-app --help
96
+
97
+ # Feature command help
98
+ npx @teispace/create-next-app feature --help
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Command-Line Arguments
104
+
105
+ All commands support the following pattern:
106
+
107
+ ```bash
108
+ create-next-app <command> [name] [options]
109
+ ```
110
+
111
+ - `<command>`: Required. One of: `app`, `feature`, `slice`, `service`
112
+ - `[name]`: Optional. The name of what you're creating (will prompt if not provided)
113
+ - `[options]`: Optional flags like `--help`
114
+
115
+ ---
116
+
117
+ ## Features
118
+
119
+ ✨ **Interactive Prompts** - Guided setup with sensible defaults
120
+ 🎨 **Multiple Generators** - App, features, slices, and services
121
+ 📦 **Modern Stack** - Next.js, TypeScript, Redux Toolkit, Tailwind CSS
122
+ 🧪 **Test-Ready** - Optional test file generation
123
+ 📚 **Well-Structured** - Follows best practices and conventions
124
+ 🚀 **Fast Setup** - Get started in seconds
125
+
126
+ ---
127
+
128
+ ## Development
129
+
130
+ ### Setup
131
+
132
+ ```bash
133
+ git clone <repository-url>
134
+ cd create-next-app
135
+ npm install
136
+ ```
137
+
138
+ ### Build
139
+
140
+ ```bash
141
+ npm run build
142
+ ```
143
+
144
+ ### Test Locally
145
+
146
+ ```bash
147
+ npx .
148
+ ```
149
+
150
+ ### Link for Global Testing
151
+
152
+ ```bash
153
+ npm link
154
+ create-next-app app test-project
155
+ npm unlink -g
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Tech Stack
161
+
162
+ - **TypeScript** - Type-safe development
163
+ - **esbuild** - Fast bundling
164
+ - **Commander.js** - Professional CLI framework
165
+ - **enquirer** - Interactive prompts
166
+ - **Node.js** - Runtime environment
167
+
168
+ ---
169
+
170
+ ## License
171
+
172
+ MIT
173
+
174
+ ---
175
+
176
+ ## Contributing
177
+
178
+ Contributions are welcome! Please feel free to submit a Pull Request.
179
+
180
+ ---
181
+
182
+ ## Support
183
+
184
+ For issues and questions, please visit our [GitHub Issues](https://github.com/teispace/nextjs-starter/issues).
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../build.ts"],"names":[],"mappings":""}
package/dist/build.js ADDED
@@ -0,0 +1,19 @@
1
+ import * as esbuild from 'esbuild';
2
+ import { chmodSync } from 'fs';
3
+ await esbuild.build({
4
+ entryPoints: ['src/index.ts'],
5
+ bundle: true,
6
+ platform: 'node',
7
+ format: 'esm',
8
+ banner: {
9
+ js: '#!/usr/bin/env node',
10
+ },
11
+ outfile: 'dist/index.js',
12
+ external: ['enquirer', 'commander', 'picocolors'],
13
+ minify: true, // Minify the output
14
+ treeShaking: true, // Remove unused code
15
+ target: 'node20', // Target Node.js 20+
16
+ });
17
+ // Make the output file executable
18
+ chmodSync('dist/index.js', 0o755);
19
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,MAAM,OAAO,CAAC,KAAK,CAAC;IAClB,WAAW,EAAE,CAAC,cAAc,CAAC;IAC7B,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE;QACN,EAAE,EAAE,qBAAqB;KAC1B;IACD,OAAO,EAAE,eAAe;IACxB,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC;IACjD,MAAM,EAAE,IAAI,EAAE,oBAAoB;IAClC,WAAW,EAAE,IAAI,EAAE,qBAAqB;IACxC,MAAM,EAAE,QAAQ,EAAE,qBAAqB;CACxC,CAAC,CAAC;AAEH,kCAAkC;AAClC,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{Command as F}from"commander";import a from"picocolors";var v={reset:e=>e,red:a.red,green:a.green,yellow:a.yellow,blue:a.blue,cyan:a.cyan,magenta:a.magenta,white:a.white,gray:a.gray,bright:a.bold,dim:a.dim};function i(e,o="reset"){let r=v[o]??(s=>s);console.log(r(e))}function g(e){console.log(""),i("\u2550".repeat(60),"cyan"),i(` ${e}`,"bright"),i("\u2550".repeat(60),"cyan"),console.log("")}function p(e){i(`\u2716 ${e}`,"red")}function n(e){i(e)}function u(){console.log(""),i("\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"),i("\u2551 \u2551","cyan"),i("\u2551 \u{1F680} Create Teispace Next.js App \u{1F680} \u2551","cyan"),i("\u2551 \u2551","cyan"),i("\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 l(e){let{logger:o=t=>console.error(t),exitOnCancel:r=process.env.NODE_ENV!=="test"}=e??{},s=()=>{console.log(""),console.log(""),o("Setup cancelled by user"),console.log(""),r&&process.exit(0)},c=t=>{if(t!==null&&typeof t=="object"&&"code"in t&&t.code==="ERR_USE_AFTER_CLOSE"){s();return}if(t instanceof Error){o(`Uncaught exception: ${t.message}`);return}o(`Uncaught exception: ${String(t)}`)},m=t=>{if(t instanceof Error){o(`Unhandled promise rejection: ${t.message}`);return}o(`Unhandled promise rejection: ${String(t)}`)};return process.on("SIGINT",s),process.on("SIGTERM",s),process.on("uncaughtException",c),process.on("unhandledRejection",m),()=>{process.off("SIGINT",s),process.off("SIGTERM",s),process.off("uncaughtException",c),process.off("unhandledRejection",m)}}import I from"ora";import b from"enquirer";var{prompt:d}=b,f=async()=>(await d({type:"input",name:"projectName",message:"What is the project name?",initial:"my-app"})).projectName,y=async()=>(await d({type:"select",name:"packageManager",message:"Which package manager would you like to use?",choices:["yarn","npm","pnpm","bun"],initial:0})).packageManager;var x=e=>{e.argument("[name]","Project name").option("--package-manager <packageManager>","Package manager to use (npm|yarn|pnpm)","npm").action(async(o,r)=>{await S({name:o,options:r})})},S=async e=>{u(),n("Welcome to the Teispace Next.js App Creator!"),n(""),n("This tool will help you create a new Next.js application"),n("with best practices and modern tooling."),n(""),g("\u{1F4E6} Project Setup"),e.name||(e.name=await f());let o=await y();n(""),n(`Creating a new Next.js app in folder: ${e.name}`),n(`Using package manager: ${o}`),n(`Options: ${JSON.stringify(e.options)}`),n("")};import{InvalidArgumentError as N}from"commander";import j from"enquirer";var{prompt:O}=j,h=async()=>(await O({type:"input",name:"featureName",message:"What is the feature name?",initial:"my-feature"})).featureName;var w=e=>{e.command("feature [name]").description("Generate a new feature module").option("--tests","Include test files",!0).option("--stories","Include Storybook stories",!1).option("--css","Include CSS module",!0).option("-p, --path <path>","Custom path for feature","src/features").option("-t, --template <template>","Template to use (basic|advanced|minimal)",o=>{let r=["basic","advanced","minimal"];if(!r.includes(o))throw new N(`Template must be one of: ${r.join(", ")}`);return o},"basic").option("--author <name>","Author name for file headers").action(async(o,r)=>{await k({name:o,options:r})})},k=async e=>{n("\u{1F3A8} Creating a new feature..."),e.name||(e.name=await h()),n(`Feature name is ${e.name}`),n(`Options: ${JSON.stringify(e.options)}`)};var C=e=>{x(e),w(e)};async function P(){l({logger:o=>p(o)});let e=new F;e.name("create-next-app").description("Teispace Next.js Project Generator").version("1.0.0"),C(e),e.parse()}P().catch(e=>{let o=e&&typeof e=="object"&&"message"in e?e.message:String(e);p(`Unexpected error: ${o}`)});
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts", "../src/config/output.ts", "../src/config/errorHandlers.ts", "../src/config/spinner.ts", "../src/prompts/create-app.prompt.ts", "../src/commands/app.ts", "../src/commands/feature.ts", "../src/prompts/feature.prompt.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\n .name('create-next-app')\n .description('Teispace Next.js Project Generator')\n .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": "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",
6
+ "names": ["Command", "pc", "colorMap", "s", "print", "message", "color", "colorFn", "text", "printHeader", "title", "error", "message", "print", "log", "message", "print", "printBanner", "setupCancellationHandlers", "options", "logger", "m", "exitOnCancel", "onCancel", "onUncaught", "err", "onRejection", "reason", "ora", "Enquirer", "prompt", "promptForProjectName", "promptForPackageManager", "registerAppCommand", "program", "name", "options", "createApp", "params", "printBanner", "log", "printHeader", "promptForProjectName", "packageManager", "promptForPackageManager", "InvalidArgumentError", "Enquirer", "prompt", "promptForFeatureName", "registerFeatureCommand", "program", "value", "valid", "InvalidArgumentError", "name", "options", "createFeature", "params", "log", "promptForFeatureName", "registerCommands", "program", "registerAppCommand", "registerFeatureCommand", "main", "setupCancellationHandlers", "m", "error", "program", "Command", "registerCommands", "err", "message"]
7
+ }
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const registerAppCommand: (program: Command) => void;
3
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/commands/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAapC,eAAO,MAAM,kBAAkB,GAAI,SAAS,OAAO,SAOlD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { log } from '../config/output.js';
2
+ import { promptForProjectName, promptForPackageManager } from '../prompts/create-app.prompt.js';
3
+ export const createApp = async (name, options) => {
4
+ log('🚀 Creating a new Next.js app...');
5
+ // Prompt for project name if not provided
6
+ if (!name) {
7
+ name = await promptForProjectName();
8
+ }
9
+ // Prompt for package manager
10
+ const packageManager = await promptForPackageManager();
11
+ // Log the received values
12
+ log(`App name is ${name}`);
13
+ log(`Package manager is ${packageManager}`);
14
+ log(`Options: ${JSON.stringify(options)}`);
15
+ };
16
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/commands/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAEhG,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAC5B,IAAa,EACb,OAAiC,EAClB,EAAE;IACjB,GAAG,CAAC,kCAAkC,CAAC,CAAC;IAExC,0CAA0C;IAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,MAAM,oBAAoB,EAAE,CAAC;IACtC,CAAC;IAED,6BAA6B;IAC7B,MAAM,cAAc,GAAG,MAAM,uBAAuB,EAAE,CAAC;IAEvD,0BAA0B;IAC1B,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC;IAC3B,GAAG,CAAC,sBAAsB,cAAc,EAAE,CAAC,CAAC;IAC5C,GAAG,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC7C,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const registerFeatureCommand: (program: Command) => void;
3
+ //# sourceMappingURL=feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/commands/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AAkB1D,eAAO,MAAM,sBAAsB,GAAI,SAAS,OAAO,SAwBtD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { log } from '../config/output.js';
2
+ import { promptForFeatureName } from '../prompts/feature.prompt.js';
3
+ export const createFeature = async (name, options) => {
4
+ log('🎨 Creating a new feature...');
5
+ // Prompt for feature name if not provided
6
+ if (!name) {
7
+ name = await promptForFeatureName();
8
+ }
9
+ // Log the received values
10
+ log(`Feature name is ${name}`);
11
+ log(`Options: ${JSON.stringify(options)}`);
12
+ };
13
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../src/commands/feature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAWpE,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,IAAa,EAAE,OAAwB,EAAiB,EAAE;IAC5F,GAAG,CAAC,8BAA8B,CAAC,CAAC;IAEpC,0CAA0C;IAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,MAAM,oBAAoB,EAAE,CAAC;IACtC,CAAC;IAED,0BAA0B;IAC1B,GAAG,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;IAC/B,GAAG,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC7C,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const registerCommands: (program: Command) => void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,gBAAgB,GAAI,SAAS,OAAO,SAGhD,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { InvalidArgumentError } from 'commander';
2
+ import { createApp } from './app.js';
3
+ import { createFeature } from './feature.js';
4
+ export const registerCommands = (program) => {
5
+ program.argument('[name]', 'Project name').action(async (name, options) => {
6
+ await createApp(name, options);
7
+ });
8
+ // Feature command
9
+ program
10
+ .command('feature [name]')
11
+ .description('Generate a new feature module')
12
+ .option('--tests', 'Include test files', true)
13
+ .option('--stories', 'Include Storybook stories', false)
14
+ .option('--css', 'Include CSS module', true)
15
+ .option('-p, --path <path>', 'Custom path for feature', 'src/features')
16
+ .option('-t, --template <template>', 'Template to use (basic|advanced|minimal)', (value) => {
17
+ const valid = ['basic', 'advanced', 'minimal'];
18
+ if (!valid.includes(value)) {
19
+ throw new InvalidArgumentError(`Template must be one of: ${valid.join(', ')}`);
20
+ }
21
+ return value;
22
+ }, 'basic')
23
+ .option('--author <name>', 'Author name for file headers')
24
+ .action(async (name, options) => {
25
+ await createFeature(name, options);
26
+ });
27
+ };
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAgB,EAAE,EAAE;IACnD,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QACxE,MAAM,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,kBAAkB;IAClB,OAAO;SACJ,OAAO,CAAC,gBAAgB,CAAC;SACzB,WAAW,CAAC,+BAA+B,CAAC;SAC5C,MAAM,CAAC,SAAS,EAAE,oBAAoB,EAAE,IAAI,CAAC;SAC7C,MAAM,CAAC,WAAW,EAAE,2BAA2B,EAAE,KAAK,CAAC;SACvD,MAAM,CAAC,OAAO,EAAE,oBAAoB,EAAE,IAAI,CAAC;SAC3C,MAAM,CAAC,mBAAmB,EAAE,yBAAyB,EAAE,cAAc,CAAC;SACtE,MAAM,CACL,2BAA2B,EAC3B,0CAA0C,EAC1C,CAAC,KAAK,EAAE,EAAE;QACR,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,oBAAoB,CAAC,4BAA4B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjF,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,EACD,OAAO,CACR;SACA,MAAM,CAAC,iBAAiB,EAAE,8BAA8B,CAAC;SACzD,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC9B,MAAM,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ export declare const red: (s: string) => string;
2
+ export declare const green: (s: string) => string;
3
+ export declare const yellow: (s: string) => string;
4
+ export declare const blue: (s: string) => string;
5
+ export declare const bold: (s: string) => string;
6
+ export declare const dim: (s: string) => string;
7
+ export declare const strip: (s: string) => string;
8
+ declare const _default: {
9
+ red: (s: string) => string;
10
+ green: (s: string) => string;
11
+ yellow: (s: string) => string;
12
+ blue: (s: string) => string;
13
+ bold: (s: string) => string;
14
+ dim: (s: string) => string;
15
+ strip: (s: string) => string;
16
+ };
17
+ export default _default;
18
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/config/colors.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,WAAc,CAAC;AAC5C,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,WAAgB,CAAC;AAChD,eAAO,MAAM,MAAM,GAAI,GAAG,MAAM,WAAiB,CAAC;AAClD,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,WAAe,CAAC;AAC9C,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,WAAe,CAAC;AAC9C,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,WAAc,CAAC;AAE5C,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,WAAqC,CAAC;;aAP9C,MAAM;eACJ,MAAM;gBACL,MAAM;cACR,MAAM;cACN,MAAM;aACP,MAAM;eAEJ,MAAM;;AAE/B,wBAQE"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/config/constants.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/config/constants.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type SetupOptions = {
2
+ logger?: (msg: string) => void;
3
+ exitOnCancel?: boolean;
4
+ };
5
+ export declare function setupCancellationHandlers(options?: SetupOptions): () => void;
6
+ export default setupCancellationHandlers;
7
+ //# sourceMappingURL=errorHandlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorHandlers.d.ts","sourceRoot":"","sources":["../../../src/config/errorHandlers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,IAAI,CAsD5E;AAED,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,35 @@
1
+ export function setupCancellationHandlers(options) {
2
+ const { logger = (m) => console.error(m), exitOnCancel = process.env.NODE_ENV !== 'test', } = options ?? {};
3
+ const onCancel = () => {
4
+ console.log('');
5
+ console.log('');
6
+ logger('Setup cancelled by user');
7
+ console.log('');
8
+ if (exitOnCancel)
9
+ process.exit(0);
10
+ };
11
+ const onUncaught = (err) => {
12
+ if (err !== null && typeof err === 'object' && 'code' in err) {
13
+ const maybeErrWithCode = err;
14
+ if (maybeErrWithCode.code === 'ERR_USE_AFTER_CLOSE') {
15
+ onCancel();
16
+ return;
17
+ }
18
+ }
19
+ if (err instanceof Error) {
20
+ throw err;
21
+ }
22
+ throw new Error(String(err));
23
+ };
24
+ process.on('SIGINT', onCancel);
25
+ process.on('SIGTERM', onCancel);
26
+ process.on('uncaughtException', onUncaught);
27
+ // Return a cleanup function to remove listeners (useful in tests).
28
+ return () => {
29
+ process.off('SIGINT', onCancel);
30
+ process.off('SIGTERM', onCancel);
31
+ process.off('uncaughtException', onUncaught);
32
+ };
33
+ }
34
+ export default setupCancellationHandlers;
35
+ //# sourceMappingURL=errorHandlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorHandlers.js","sourceRoot":"","sources":["../../../src/config/errorHandlers.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,yBAAyB,CAAC,OAAsB;IAC9D,MAAM,EACJ,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EACxC,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,GAC/C,GAAG,OAAO,IAAI,EAAE,CAAC;IAElB,MAAM,QAAQ,GAAG,GAAS,EAAE;QAC1B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,MAAM,CAAC,yBAAyB,CAAC,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,IAAI,YAAY;YAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,CAAC,GAAY,EAAQ,EAAE;QACxC,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC;YAC7D,MAAM,gBAAgB,GAAG,GAAyB,CAAC;YACnD,IAAI,gBAAgB,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;gBACpD,QAAQ,EAAE,CAAC;gBACX,OAAO;YACT,CAAC;QACH,CAAC;QAED,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;YACzB,MAAM,GAAG,CAAC;QACZ,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;IAEF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;IAE5C,mEAAmE;IACnE,OAAO,GAAS,EAAE;QAChB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAChC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC,CAAC;AACJ,CAAC;AAED,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './output';
2
+ export * from './errorHandlers';
3
+ export * from './spinner';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './output.js';
2
+ export * from './errorHandlers.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export type Color = 'reset' | 'red' | 'green' | 'yellow' | 'blue' | 'cyan' | 'magenta' | 'white' | 'gray' | 'bright' | 'dim';
2
+ export declare function print(message: string, color?: Color): void;
3
+ export declare function printHeader(title: string): void;
4
+ export declare function success(message: string): void;
5
+ export declare function error(message: string): void;
6
+ export declare function warning(message: string): void;
7
+ export declare function info(message: string): void;
8
+ export declare function log(message: string): void;
9
+ export declare function printBanner(): void;
10
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/config/output.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,KAAK,GACb,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,MAAM,GACN,SAAS,GACT,OAAO,GACP,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;AAiBV,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,KAAe,GAAG,IAAI,CAGnE;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAM/C;AAGD,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE7C;AAGD,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE3C;AAGD,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE7C;AAGD,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEzC;AAGD,wBAAgB,WAAW,IAAI,IAAI,CAQlC"}
@@ -0,0 +1,57 @@
1
+ import pc from 'picocolors';
2
+ const colorMap = {
3
+ reset: (s) => s,
4
+ red: pc.red,
5
+ green: pc.green,
6
+ yellow: pc.yellow,
7
+ blue: pc.blue,
8
+ cyan: pc.cyan,
9
+ magenta: pc.magenta,
10
+ white: pc.white,
11
+ gray: pc.gray,
12
+ bright: pc.bold,
13
+ dim: pc.dim,
14
+ };
15
+ // Print with color
16
+ export function print(message, color = 'reset') {
17
+ const colorFn = colorMap[color] ?? ((text) => text);
18
+ console.log(colorFn(message));
19
+ }
20
+ // Print section header
21
+ export function printHeader(title) {
22
+ console.log('');
23
+ print('═'.repeat(60), 'cyan');
24
+ print(` ${title}`, 'bright');
25
+ print('═'.repeat(60), 'cyan');
26
+ console.log('');
27
+ }
28
+ // Print success message
29
+ export function success(message) {
30
+ print(`✓ ${message}`, 'green');
31
+ }
32
+ // Print error message
33
+ export function error(message) {
34
+ print(`✖ ${message}`, 'red');
35
+ }
36
+ // Print warning message
37
+ export function warning(message) {
38
+ print(`⚠ ${message}`, 'yellow');
39
+ }
40
+ // Print info message
41
+ export function info(message) {
42
+ print(`ℹ ${message}`, 'cyan');
43
+ }
44
+ export function log(message) {
45
+ print(message);
46
+ }
47
+ // Print banner
48
+ export function printBanner() {
49
+ console.log('');
50
+ print('╔═══════════════════════════════════════════════════════════╗', 'cyan');
51
+ print('║ ║', 'cyan');
52
+ print('║ 🚀 Create Teispace Next.js App 🚀 ║', 'cyan');
53
+ print('║ ║', 'cyan');
54
+ print('╚═══════════════════════════════════════════════════════════╝', 'cyan');
55
+ console.log('');
56
+ }
57
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/config/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,QAAQ,GAA0C;IACtD,KAAK,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC;IACvB,GAAG,EAAE,EAAE,CAAC,GAAG;IACX,KAAK,EAAE,EAAE,CAAC,KAAK;IACf,MAAM,EAAE,EAAE,CAAC,MAAM;IACjB,IAAI,EAAE,EAAE,CAAC,IAAI;IACb,IAAI,EAAE,EAAE,CAAC,IAAI;IACb,OAAO,EAAE,EAAE,CAAC,OAAO;IACnB,KAAK,EAAE,EAAE,CAAC,KAAK;IACf,IAAI,EAAE,EAAE,CAAC,IAAI;IACb,MAAM,EAAE,EAAE,CAAC,IAAI;IACf,GAAG,EAAE,EAAE,CAAC,GAAG;CACZ,CAAC;AAEF,mBAAmB;AACnB,MAAM,UAAU,KAAK,CAAC,OAAe,EAAE,KAAK,GAAG,OAAO;IACpD,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAC5D,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAChC,CAAC;AAED,uBAAuB;AACvB,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IAC9B,KAAK,CAAC,KAAK,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC9B,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IAC9B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AAED,wBAAwB;AACxB,MAAM,UAAU,OAAO,CAAC,OAAe;IACrC,KAAK,CAAC,KAAK,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;AACjC,CAAC;AAED,sBAAsB;AACtB,MAAM,UAAU,KAAK,CAAC,OAAe;IACnC,KAAK,CAAC,KAAK,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,wBAAwB;AACxB,MAAM,UAAU,OAAO,CAAC,OAAe;IACrC,KAAK,CAAC,KAAK,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;AAClC,CAAC;AAED,qBAAqB;AACrB,MAAM,UAAU,IAAI,CAAC,OAAe;IAClC,KAAK,CAAC,KAAK,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,OAAe;IACjC,KAAK,CAAC,OAAO,CAAC,CAAC;AACjB,CAAC;AAED,eAAe;AACf,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,KAAK,CAAC,+DAA+D,EAAE,MAAM,CAAC,CAAC;IAC/E,KAAK,CAAC,+DAA+D,EAAE,MAAM,CAAC,CAAC;IAC/E,KAAK,CAAC,8DAA8D,EAAE,MAAM,CAAC,CAAC;IAC9E,KAAK,CAAC,+DAA+D,EAAE,MAAM,CAAC,CAAC;IAC/E,KAAK,CAAC,+DAA+D,EAAE,MAAM,CAAC,CAAC;IAC/E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { Ora, Options } from 'ora';
2
+ export declare function startSpinner(text?: string, options?: Options): Ora;
3
+ export declare function stopSpinner(spinner: Ora): void;
4
+ export declare function succeedSpinner(spinner: Ora, text?: string): void;
5
+ export declare function failSpinner(spinner: Ora, text?: string): void;
6
+ export declare function withSpinner<T>(text: string, fn: () => Promise<T>, { successText, failText, options, }?: {
7
+ successText?: string;
8
+ failText?: string;
9
+ options?: Options;
10
+ }): Promise<T>;
11
+ export default startSpinner;
12
+ //# sourceMappingURL=spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/config/spinner.ts"],"names":[],"mappings":"AAAA,OAAY,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAGxC,wBAAgB,YAAY,CAAC,IAAI,SAAK,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,GAAG,CAI9D;AAGD,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAE9C;AAGD,wBAAgB,cAAc,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAEhE;AAGD,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAE7D;AAGD,wBAAsB,WAAW,CAAC,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,EACE,WAAW,EACX,QAAQ,EACR,OAAO,GACR,GAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GACrE,OAAO,CAAC,CAAC,CAAC,CAUZ;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/config/utils.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/config/utils.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { Command } from 'commander';
2
+ import { registerCommands } from './commands/index.js';
3
+ import { setupCancellationHandlers } from './config/errorHandlers.js';
4
+ import { error, warning } from './config/output.js';
5
+ async function main() {
6
+ setupCancellationHandlers({ logger: (m) => error(m) });
7
+ const program = new Command();
8
+ warning('This is a beta version of create-next-app. Please report any issues you encounter.');
9
+ program
10
+ .name('create-next-app')
11
+ .description('Teispace Next.js Project Generator')
12
+ .version('1.0.0');
13
+ registerCommands(program);
14
+ program.parse();
15
+ }
16
+ main().catch((err) => {
17
+ error(`Unexpected error: ${err.message}`);
18
+ process.exit(1);
19
+ });
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEpD,KAAK,UAAU,IAAI;IACjB,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAE/D,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO,CAAC,oFAAoF,CAAC,CAAC;IAE9F,OAAO;SACJ,IAAI,CAAC,iBAAiB,CAAC;SACvB,WAAW,CAAC,oCAAoC,CAAC;SACjD,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE1B,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,KAAK,CAAC,qBAAsB,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const promptForProjectName: () => Promise<string>;
2
+ export declare const promptForPackageManager: () => Promise<string>;
3
+ //# sourceMappingURL=create-app.prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-app.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/create-app.prompt.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,QAAa,OAAO,CAAC,MAAM,CAS3D,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAa,OAAO,CAAC,MAAM,CAS9D,CAAC"}
@@ -0,0 +1,22 @@
1
+ import Enquirer from 'enquirer';
2
+ const { prompt } = Enquirer;
3
+ export const promptForProjectName = async () => {
4
+ const response = await prompt({
5
+ type: 'input',
6
+ name: 'projectName',
7
+ message: 'What is the project name?',
8
+ initial: 'my-app',
9
+ });
10
+ return response.projectName;
11
+ };
12
+ export const promptForPackageManager = async () => {
13
+ const response = await prompt({
14
+ type: 'select',
15
+ name: 'packageManager',
16
+ message: 'Which package manager would you like to use?',
17
+ choices: ['yarn', 'npm', 'pnpm', 'bun'],
18
+ initial: 0,
19
+ });
20
+ return response.packageManager;
21
+ };
22
+ //# sourceMappingURL=create-app.prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-app.prompt.js","sourceRoot":"","sources":["../../../src/prompts/create-app.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,IAAqB,EAAE;IAC9D,MAAM,QAAQ,GAAG,MAAM,MAAM,CAA0B;QACrD,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,2BAA2B;QACpC,OAAO,EAAE,QAAQ;KAClB,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC,WAAW,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,IAAqB,EAAE;IACjE,MAAM,QAAQ,GAAG,MAAM,MAAM,CAA6B;QACxD,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,8CAA8C;QACvD,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;QACvC,OAAO,EAAE,CAAC;KACX,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,cAAc,CAAC;AACjC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const promptForFeatureName: () => Promise<string>;
2
+ //# sourceMappingURL=feature.prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.prompt.d.ts","sourceRoot":"","sources":["../../../src/prompts/feature.prompt.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,QAAa,OAAO,CAAC,MAAM,CAQ3D,CAAC"}
@@ -0,0 +1,11 @@
1
+ import Enquirer from 'enquirer';
2
+ export const promptForFeatureName = async () => {
3
+ const response = await Enquirer.prompt({
4
+ type: 'input',
5
+ name: 'featureName',
6
+ message: 'What is the feature name?',
7
+ initial: 'my-feature',
8
+ });
9
+ return response.featureName;
10
+ };
11
+ //# sourceMappingURL=feature.prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.prompt.js","sourceRoot":"","sources":["../../../src/prompts/feature.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,IAAqB,EAAE;IAC9D,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,MAAM,CAA0B;QAC9D,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,2BAA2B;QACpC,OAAO,EAAE,YAAY;KACtB,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,WAAW,CAAC;AAC9B,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@teispace/next-maker",
3
+ "version": "0.0.1",
4
+ "description": "Create a new Teispace Next.js application with interactive setup.",
5
+ "keywords": [
6
+ "nextjs",
7
+ "react",
8
+ "typescript",
9
+ "tailwindcss",
10
+ "starter",
11
+ "template",
12
+ "redux"
13
+ ],
14
+ "type": "module",
15
+ "homepage": "https://github.com/teispace/npm-packages/tree/main/packages/next-maker#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/teispace/npm-packages/issues"
18
+ },
19
+ "license": "MIT",
20
+ "author": "Teispace",
21
+ "files": [
22
+ "dist",
23
+ "README.md",
24
+ "LICENSE",
25
+ "CHANGELOG.md"
26
+ ],
27
+ "main": "dist/index.js",
28
+ "types": "dist/index.d.ts",
29
+ "bin": "dist/index.js",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/teispace/npm-packages.git",
33
+ "directory": "packages/next-maker"
34
+ },
35
+ "scripts": {
36
+ "build": "tsx build.ts && ../../node_modules/.bin/tsc --emitDeclarationOnly --outDir dist",
37
+ "start": "node dist/index.js",
38
+ "dev": "tsx --watch src/index.ts",
39
+ "test": "jest"
40
+ },
41
+ "dependencies": {
42
+ "commander": "^14.0.2",
43
+ "enquirer": "^2.4.1",
44
+ "ora": "^9.0.0",
45
+ "picocolors": "^1.1.1"
46
+ },
47
+ "devDependencies": {
48
+ "@types/node": "^24.10.1",
49
+ "esbuild": "^0.27.0",
50
+ "tsx": "^4.20.6"
51
+ },
52
+ "engines": {
53
+ "node": ">=20.0.0"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public",
57
+ "registry": "https://registry.npmjs.org/"
58
+ }
59
+ }