@teispace/next-maker 0.0.1 → 0.1.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 CHANGED
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ ## [0.1.0](https://github.com/teispace/npm-packages/compare/next-maker-v0.0.1...next-maker-v0.1.0) (2025-11-27)
4
+
5
+
6
+ ### Features
7
+
8
+ * rename to @teispace/next-maker and update workflows for multi-package support ([6202c21](https://github.com/teispace/npm-packages/commit/6202c21bb2e60f43889b8b0d4880dc0fbf70ce9c))
9
+
10
+
11
+ ### Miscellaneous Chores
12
+
13
+ * **next-maker:** promote to main (stable) ([9213dd0](https://github.com/teispace/npm-packages/commit/9213dd03c25fbd8ea936a9642c267b4562692025))
14
+ * **next-maker:** rename create-next-app -> next-maker; update docs, tsconfig, and VSCode settings ([3abf499](https://github.com/teispace/npm-packages/commit/3abf499ede2e67358a9dffa4c365dc7d167a6a44))
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @teispace/create-next-app
1
+ # @teispace/next-maker
2
2
 
3
3
  A powerful CLI tool to scaffold Next.js applications and generate boilerplate code for features, Redux slices, and API services.
4
4
 
@@ -7,14 +7,14 @@ A powerful CLI tool to scaffold Next.js applications and generate boilerplate co
7
7
  ### Using npx (Recommended)
8
8
 
9
9
  ```bash
10
- npx @teispace/create-next-app <command> [name] [options]
10
+ npx @teispace/next-maker <command> [name] [options]
11
11
  ```
12
12
 
13
13
  ### Global Installation
14
14
 
15
15
  ```bash
16
- npm install -g @teispace/create-next-app
17
- create-next-app <command> [name] [options]
16
+ npm install -g @teispace/next-maker
17
+ next-maker <command> [name] [options]
18
18
  ```
19
19
 
20
20
  ## Commands
@@ -24,9 +24,9 @@ create-next-app <command> [name] [options]
24
24
  Generate a complete Next.js application with your preferred configuration.
25
25
 
26
26
  ```bash
27
- npx @teispace/create-next-app [project-name]
27
+ npx @teispace/next-maker [project-name]
28
28
  # or just
29
- npx @teispace/create-next-app
29
+ npx @teispace/next-maker
30
30
  ```
31
31
 
32
32
  **Interactive prompts:**
@@ -39,7 +39,7 @@ npx @teispace/create-next-app
39
39
  **Example:**
40
40
 
41
41
  ```bash
42
- npx @teispace/create-next-app my-awesome-app
42
+ npx @teispace/next-maker my-awesome-app
43
43
  ```
44
44
 
45
45
  ---
@@ -49,7 +49,7 @@ npx @teispace/create-next-app my-awesome-app
49
49
  Create a feature module with components, hooks, and utilities.
50
50
 
51
51
  ```bash
52
- npx @teispace/create-next-app feature user-dashboard
52
+ npx @teispace/next-maker feature user-dashboard
53
53
  ```
54
54
 
55
55
  **Interactive prompts:**
@@ -77,7 +77,7 @@ src/features/user-dashboard/
77
77
  ### Create a new app with all features
78
78
 
79
79
  ```bash
80
- npx @teispace/create-next-app my-project
80
+ npx @teispace/next-maker my-project
81
81
  # Follow the interactive prompts
82
82
  ```
83
83
 
@@ -85,17 +85,17 @@ npx @teispace/create-next-app my-project
85
85
 
86
86
  ```bash
87
87
  # Create a feature
88
- npx @teispace/create-next-app feature user-profile
88
+ npx @teispace/next-maker feature user-profile
89
89
  ```
90
90
 
91
91
  ### Get help
92
92
 
93
93
  ```bash
94
94
  # General help
95
- npx @teispace/create-next-app --help
95
+ npx @teispace/next-maker --help
96
96
 
97
97
  # Feature command help
98
- npx @teispace/create-next-app feature --help
98
+ npx @teispace/next-maker feature --help
99
99
  ```
100
100
 
101
101
  ---
@@ -105,7 +105,7 @@ npx @teispace/create-next-app feature --help
105
105
  All commands support the following pattern:
106
106
 
107
107
  ```bash
108
- create-next-app <command> [name] [options]
108
+ next-maker <command> [name] [options]
109
109
  ```
110
110
 
111
111
  - `<command>`: Required. One of: `app`, `feature`, `slice`, `service`
@@ -116,11 +116,11 @@ create-next-app <command> [name] [options]
116
116
 
117
117
  ## Features
118
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
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
124
  🚀 **Fast Setup** - Get started in seconds
125
125
 
126
126
  ---
@@ -131,7 +131,7 @@ create-next-app <command> [name] [options]
131
131
 
132
132
  ```bash
133
133
  git clone <repository-url>
134
- cd create-next-app
134
+ cd next-maker
135
135
  npm install
136
136
  ```
137
137
 
@@ -151,7 +151,7 @@ npx .
151
151
 
152
152
  ```bash
153
153
  npm link
154
- create-next-app app test-project
154
+ next-maker app test-project
155
155
  npm unlink -g
156
156
  ```
157
157
 
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
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}`)});
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("next-maker").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
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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": ";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,SAASG,EAAMC,EAAiBC,EAAe,QAAe,CACnE,IAAMC,EAAUL,EAASI,CAAK,IAAOE,GAAiBA,GACtD,QAAQ,IAAID,EAAQF,CAAO,CAAC,CAC9B,CAGO,SAASI,EAAYC,EAAqB,CAC/C,QAAQ,IAAI,EAAE,EACdN,EAAM,SAAI,OAAO,EAAE,EAAG,MAAM,EAC5BA,EAAM,KAAKM,CAAK,GAAI,QAAQ,EAC5BN,EAAM,SAAI,OAAO,EAAE,EAAG,MAAM,EAC5B,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,OAAOA,CAAG,EAC1FJ,EAAM,qBAAqBK,CAAO,EAAE,CACtC,CAAC",
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,SAASG,EAAMC,EAAiBC,EAAe,QAAe,CACnE,IAAMC,EAAUL,EAASI,CAAK,IAAOE,GAAiBA,GACtD,QAAQ,IAAID,EAAQF,CAAO,CAAC,CAC9B,CAGO,SAASI,EAAYC,EAAqB,CAC/C,QAAQ,IAAI,EAAE,EACdN,EAAM,SAAI,OAAO,EAAE,EAAG,MA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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
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
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teispace/next-maker",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "Create a new Teispace Next.js application with interactive setup.",
5
5
  "keywords": [
6
6
  "nextjs",
package/dist/build.js DELETED
@@ -1,19 +0,0 @@
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
package/dist/build.js.map DELETED
@@ -1 +0,0 @@
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"}
@@ -1,16 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,13 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,28 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,18 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/config/constants.ts"],"names":[],"mappings":""}
@@ -1,35 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,3 +0,0 @@
1
- export * from './output.js';
2
- export * from './errorHandlers.js';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
@@ -1,57 +0,0 @@
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
@@ -1 +0,0 @@
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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,CAAC;IAC/E,KAAK,CAAC,+DAA+D,EAAE,MAAM,CAAC,CAAC;IAC/E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/config/utils.ts"],"names":[],"mappings":""}
package/dist/src/index.js DELETED
@@ -1,20 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,22 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,11 +0,0 @@
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
@@ -1 +0,0 @@
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"}