brewcli 1.0.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/.prettierignore +9 -0
- package/.prettierrc +25 -0
- package/LICENSE +21 -0
- package/Readme.md +157 -0
- package/dist/app.d.ts +8 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +188 -0
- package/dist/app.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +26 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/ErrorDisplay.d.ts +7 -0
- package/dist/components/ErrorDisplay.d.ts.map +1 -0
- package/dist/components/ErrorDisplay.js +8 -0
- package/dist/components/ErrorDisplay.js.map +1 -0
- package/dist/components/NamePrompt.d.ts +7 -0
- package/dist/components/NamePrompt.d.ts.map +1 -0
- package/dist/components/NamePrompt.js +19 -0
- package/dist/components/NamePrompt.js.map +1 -0
- package/dist/components/SelectionList.d.ts +13 -0
- package/dist/components/SelectionList.d.ts.map +1 -0
- package/dist/components/SelectionList.js +9 -0
- package/dist/components/SelectionList.js.map +1 -0
- package/dist/components/Spinner.d.ts +7 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner.js +9 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/components/SuccessBox.d.ts +8 -0
- package/dist/components/SuccessBox.d.ts.map +1 -0
- package/dist/components/SuccessBox.js +10 -0
- package/dist/components/SuccessBox.js.map +1 -0
- package/dist/components/Welcome.d.ts +4 -0
- package/dist/components/Welcome.d.ts.map +1 -0
- package/dist/components/Welcome.js +10 -0
- package/dist/components/Welcome.js.map +1 -0
- package/dist/templates/node/javascript/angular/.gitkeep +0 -0
- package/dist/templates/node/javascript/express/.env.example +5 -0
- package/dist/templates/node/javascript/express/.gitkeep +0 -0
- package/dist/templates/node/javascript/express/Readme.md +11 -0
- package/dist/templates/node/javascript/express/package.json +18 -0
- package/dist/templates/node/javascript/express/src/.gitkeep +0 -0
- package/dist/templates/node/javascript/express/src/app.js +23 -0
- package/dist/templates/node/javascript/express/src/constants.js +1 -0
- package/dist/templates/node/javascript/express/src/controllers/.gitkeep +0 -0
- package/dist/templates/node/javascript/express/src/db/.gitkeep +0 -0
- package/dist/templates/node/javascript/express/src/db/index.js +14 -0
- package/dist/templates/node/javascript/express/src/index.js +17 -0
- package/dist/templates/node/javascript/express/src/middlewares/.gitkeep +0 -0
- package/dist/templates/node/javascript/express/src/models/.gitkeep +0 -0
- package/dist/templates/node/javascript/express/src/routes/.gitkeep +0 -0
- package/dist/templates/node/javascript/express/src/utils/.gitkeep +0 -0
- package/dist/templates/node/javascript/fastify/.env.example +5 -0
- package/dist/templates/node/javascript/fastify/.gitkeep +0 -0
- package/dist/templates/node/javascript/fastify/package.json +20 -0
- package/dist/templates/node/javascript/fastify/src/index.js +28 -0
- package/dist/templates/node/javascript/nestjs/.gitkeep +0 -0
- package/dist/templates/node/javascript/nextjs/.gitkeep +0 -0
- package/dist/templates/node/javascript/reactjs/.gitkeep +0 -0
- package/dist/templates/node/javascript/vuejs/.gitkeep +0 -0
- package/dist/templates/node/typescript/angular/.gitkeep +0 -0
- package/dist/templates/node/typescript/express/.env.example +5 -0
- package/dist/templates/node/typescript/express/.gitkeep +0 -0
- package/dist/templates/node/typescript/express/package.json +25 -0
- package/dist/templates/node/typescript/express/src/app.ts +17 -0
- package/dist/templates/node/typescript/express/src/constants.ts +1 -0
- package/dist/templates/node/typescript/express/src/db/index.ts +14 -0
- package/dist/templates/node/typescript/express/src/index.ts +17 -0
- package/dist/templates/node/typescript/express/tsconfig.json +15 -0
- package/dist/templates/node/typescript/fastify/.env.example +5 -0
- package/dist/templates/node/typescript/fastify/.gitkeep +0 -0
- package/dist/templates/node/typescript/fastify/package.json +20 -0
- package/dist/templates/node/typescript/fastify/tsconfig.json +15 -0
- package/dist/templates/node/typescript/nestjs/.gitkeep +0 -0
- package/dist/templates/node/typescript/nextjs/.gitkeep +0 -0
- package/dist/templates/node/typescript/reactjs/.gitkeep +0 -0
- package/dist/templates/node/typescript/vuejs/.gitkeep +0 -0
- package/package.json +66 -0
- package/src/app.tsx +274 -0
- package/src/cli.tsx +32 -0
- package/src/components/ErrorDisplay.tsx +21 -0
- package/src/components/NamePrompt.tsx +67 -0
- package/src/components/SelectionList.tsx +64 -0
- package/src/components/Spinner.tsx +24 -0
- package/src/components/SuccessBox.tsx +79 -0
- package/src/components/Welcome.tsx +30 -0
- package/src/templates/node/javascript/angular/.gitkeep +0 -0
- package/src/templates/node/javascript/express/.env.example +5 -0
- package/src/templates/node/javascript/express/.gitkeep +0 -0
- package/src/templates/node/javascript/express/Readme.md +11 -0
- package/src/templates/node/javascript/express/package.json +18 -0
- package/src/templates/node/javascript/express/src/.gitkeep +0 -0
- package/src/templates/node/javascript/express/src/app.js +23 -0
- package/src/templates/node/javascript/express/src/constants.js +1 -0
- package/src/templates/node/javascript/express/src/controllers/.gitkeep +0 -0
- package/src/templates/node/javascript/express/src/db/.gitkeep +0 -0
- package/src/templates/node/javascript/express/src/db/index.js +14 -0
- package/src/templates/node/javascript/express/src/index.js +17 -0
- package/src/templates/node/javascript/express/src/middlewares/.gitkeep +0 -0
- package/src/templates/node/javascript/express/src/models/.gitkeep +0 -0
- package/src/templates/node/javascript/express/src/routes/.gitkeep +0 -0
- package/src/templates/node/javascript/express/src/utils/.gitkeep +0 -0
- package/src/templates/node/javascript/fastify/.env.example +5 -0
- package/src/templates/node/javascript/fastify/.gitkeep +0 -0
- package/src/templates/node/javascript/fastify/package.json +20 -0
- package/src/templates/node/javascript/fastify/src/index.js +28 -0
- package/src/templates/node/javascript/nestjs/.gitkeep +0 -0
- package/src/templates/node/javascript/nextjs/.gitkeep +0 -0
- package/src/templates/node/javascript/reactjs/.gitkeep +0 -0
- package/src/templates/node/javascript/vuejs/.gitkeep +0 -0
- package/src/templates/node/typescript/angular/.gitkeep +0 -0
- package/src/templates/node/typescript/express/.env.example +5 -0
- package/src/templates/node/typescript/express/.gitkeep +0 -0
- package/src/templates/node/typescript/express/package.json +25 -0
- package/src/templates/node/typescript/express/src/app.ts +17 -0
- package/src/templates/node/typescript/express/src/constants.ts +1 -0
- package/src/templates/node/typescript/express/src/db/index.ts +14 -0
- package/src/templates/node/typescript/express/src/index.ts +17 -0
- package/src/templates/node/typescript/express/tsconfig.json +15 -0
- package/src/templates/node/typescript/fastify/.env.example +5 -0
- package/src/templates/node/typescript/fastify/.gitkeep +0 -0
- package/src/templates/node/typescript/fastify/package.json +20 -0
- package/src/templates/node/typescript/fastify/tsconfig.json +15 -0
- package/src/templates/node/typescript/nestjs/.gitkeep +0 -0
- package/src/templates/node/typescript/nextjs/.gitkeep +0 -0
- package/src/templates/node/typescript/reactjs/.gitkeep +0 -0
- package/src/templates/node/typescript/vuejs/.gitkeep +0 -0
- package/tsconfig.json +46 -0
package/.prettierignore
ADDED
package/.prettierrc
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arrowParens": "always",
|
|
3
|
+
"bracketSpacing": true,
|
|
4
|
+
"endOfLine": "lf",
|
|
5
|
+
"htmlWhitespaceSensitivity": "css",
|
|
6
|
+
"insertPragma": false,
|
|
7
|
+
"singleAttributePerLine": false,
|
|
8
|
+
"bracketSameLine": false,
|
|
9
|
+
"jsxBracketSameLine": false,
|
|
10
|
+
"jsxSingleQuote": false,
|
|
11
|
+
"printWidth": 80,
|
|
12
|
+
"proseWrap": "preserve",
|
|
13
|
+
"quoteProps": "as-needed",
|
|
14
|
+
"requirePragma": false,
|
|
15
|
+
"semi": true,
|
|
16
|
+
"singleQuote": false,
|
|
17
|
+
"tabWidth": 2,
|
|
18
|
+
"trailingComma": "all",
|
|
19
|
+
"useTabs": false,
|
|
20
|
+
"embeddedLanguageFormatting": "auto",
|
|
21
|
+
"vueIndentScriptAndStyle": false,
|
|
22
|
+
"experimentalTernaries": false,
|
|
23
|
+
"objectWrap": "preserve",
|
|
24
|
+
"experimentalOperatorPosition": "end"
|
|
25
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Harsh Mer, Keval Tank
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/Readme.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# 🍺 brewcli
|
|
2
|
+
|
|
3
|
+
**The Ultimate Project Scaffolder — Brew a fresh project in seconds.**
|
|
4
|
+
|
|
5
|
+
`brewcli` is a beautiful, interactive CLI tool that scaffolds production-ready projects across the Node.js ecosystem. Pick your platform, language, and framework — and let brew handle the rest.
|
|
6
|
+
|
|
7
|
+
> No more copying boilerplate. No more wiring configs by hand. Just brew it.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Why brewcli?
|
|
12
|
+
|
|
13
|
+
Setting up a new project should take seconds, not hours. `brewcli` gives you a single command to scaffold fully configured projects across **10+ frameworks**, with support for both JavaScript and TypeScript out of the box. It wraps official CLIs (Next.js, Angular, NestJS, Expo, etc.) and ships battle-tested templates for Express and Fastify — so you always get the canonical project structure, not a random skeleton.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Supported Frameworks
|
|
18
|
+
|
|
19
|
+
| Framework | JavaScript | TypeScript |
|
|
20
|
+
| ----------------- | :--------: | :--------: |
|
|
21
|
+
| Express | ✅ | ✅ |
|
|
22
|
+
| Fastify | ✅ | ✅ |
|
|
23
|
+
| NestJS | ✅ | ✅ |
|
|
24
|
+
| React (Vite) | ✅ | ✅ |
|
|
25
|
+
| Next.js | ✅ | ✅ |
|
|
26
|
+
| Vue.js (Vite) | ✅ | ✅ |
|
|
27
|
+
| Angular | ✅ | ✅ |
|
|
28
|
+
| React Native CLI | — | ✅ |
|
|
29
|
+
| React Native Expo | ✅ | ✅ |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
### Install globally
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install -g brewcli
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Scaffold a project
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
create-brew-app my-app
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Or just run it directly without installing:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx brewcli my-app
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
You can also run it without a project name — brew will prompt you for one:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
create-brew-app
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## How It Works
|
|
62
|
+
|
|
63
|
+
`brewcli` walks you through an interactive flow right in your terminal:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
1. Choose your platform → Node.js (more coming soon)
|
|
67
|
+
2. Pick a language → JavaScript or TypeScript
|
|
68
|
+
3. Select a framework → Express, Next.js, React, etc.
|
|
69
|
+
4. Name your project → (if not passed as an argument)
|
|
70
|
+
5. Sit back → brew scaffolds everything for you
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Once complete, you'll see the **CHEERS** screen with your project path and next steps.
|
|
74
|
+
|
|
75
|
+
### What brew does under the hood
|
|
76
|
+
|
|
77
|
+
For **Express** and **Fastify**, brew copies from its own curated templates — pre-configured with sensible defaults so you can start coding immediately.
|
|
78
|
+
|
|
79
|
+
For everything else (**Next.js, React, Vue, Angular, NestJS, Expo, React Native CLI**), brew delegates to the official framework CLI with optimal flags — skip-install, skip-git, correct language template — then applies finishing touches like standardizing `package.json` fields and initializing a clean git repo.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Example
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
$ create-brew-app my-app
|
|
87
|
+
|
|
88
|
+
██████╗ ██████╗ ███████╗██╗ ██╗ ██████╗ ██╗ ██╗
|
|
89
|
+
██╔══██╗██╔══██╗██╔════╝██║ ██║ ██╔═══╝ ██║ ██║
|
|
90
|
+
██████╔╝██████╔╝█████╗ ██║ █╗ ██║ ██║ ██║ ██║
|
|
91
|
+
██╔══██╗██╔══██╗██╔══╝ ██║███╗██║ ██║ ██║ ██║
|
|
92
|
+
██████╔╝██║ ██║███████╗╚███╔███╔╝ ╚██████╗███████╗██║
|
|
93
|
+
╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═════╝╚══════╝╚═╝
|
|
94
|
+
|
|
95
|
+
⚡ The Ultimate Project Scaffolder for 2026
|
|
96
|
+
|
|
97
|
+
➜ Choose your platform:
|
|
98
|
+
❯ Node.js
|
|
99
|
+
Other Framework
|
|
100
|
+
|
|
101
|
+
➜ Select language for node:
|
|
102
|
+
❯ TypeScript
|
|
103
|
+
JavaScript
|
|
104
|
+
|
|
105
|
+
➜ Which framework or library do you want to use?
|
|
106
|
+
Express
|
|
107
|
+
❯ Fastify
|
|
108
|
+
NestJS
|
|
109
|
+
...
|
|
110
|
+
|
|
111
|
+
✨ Brewing complete! Your project is served hot.
|
|
112
|
+
|
|
113
|
+
🚀 NEXT STEPS:
|
|
114
|
+
1. cd my-app
|
|
115
|
+
2. npm install
|
|
116
|
+
3. npm run dev
|
|
117
|
+
|
|
118
|
+
Happy Coding! May your brew never turn cold. 🍺
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Requirements
|
|
124
|
+
|
|
125
|
+
- **Node.js** v18 or later
|
|
126
|
+
- **npm** v8 or later
|
|
127
|
+
- **git** (optional, for auto-initializing repos)
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Roadmap
|
|
132
|
+
|
|
133
|
+
- 🔜 Python (Flask, FastAPI, Django)
|
|
134
|
+
- 🔜 Go (Gin, Fiber)
|
|
135
|
+
- 🔜 Rust (Actix, Axum)
|
|
136
|
+
- 🔜 Custom template support
|
|
137
|
+
- 🔜 Plugin system for post-scaffold hooks
|
|
138
|
+
|
|
139
|
+
More platforms and frameworks are actively being added. Contributions and suggestions are welcome!
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Contributing
|
|
144
|
+
|
|
145
|
+
Contributions are welcome! If you'd like to add a framework, fix a bug, or improve the templates:
|
|
146
|
+
|
|
147
|
+
1. Fork the repository
|
|
148
|
+
2. Create a feature branch (`git checkout -b feat/add-django-support`)
|
|
149
|
+
3. Commit your changes (`git commit -m 'feat: add Django scaffolding'`)
|
|
150
|
+
4. Push to the branch (`git push origin feat/add-django-support`)
|
|
151
|
+
5. Open a Pull Request
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## License
|
|
156
|
+
|
|
157
|
+
MIT © [Harsh Mer](https://github.com/aspect-developer) · [Keval Tank](https://github.com/Keval-Tank)
|
package/dist/app.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,UAAU,QAAQ;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB;AAYD,QAAA,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAmP3B,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
package/dist/app.js
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
|
+
import { Box, useApp, Text } from "ink";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import fs from "fs-extra";
|
|
6
|
+
import { execSync } from "child_process";
|
|
7
|
+
import Welcome from "./components/Welcome.js";
|
|
8
|
+
import NamePrompt from "./components/NamePrompt.js";
|
|
9
|
+
import Spinner from "./components/Spinner.js";
|
|
10
|
+
import SuccessBox from "./components/SuccessBox.js";
|
|
11
|
+
import ErrorDisplay from "./components/ErrorDisplay.js";
|
|
12
|
+
import SelectionList from "./components/SelectionList.js";
|
|
13
|
+
const App = ({ initialProjectName, templatePath }) => {
|
|
14
|
+
const { exit } = useApp();
|
|
15
|
+
const [projectName, setProjectName] = useState(initialProjectName);
|
|
16
|
+
const [phase, setPhase] = useState("PLATFORM");
|
|
17
|
+
const [platform, setPlatform] = useState("");
|
|
18
|
+
const [language, setLanguage] = useState("");
|
|
19
|
+
const [framework, setFramework] = useState("");
|
|
20
|
+
const [statusMessage, setStatusMessage] = useState("Brewing your project...");
|
|
21
|
+
const [errorMessage, setErrorMessage] = useState("");
|
|
22
|
+
const [targetPath, setTargetPath] = useState("");
|
|
23
|
+
const platformItems = [
|
|
24
|
+
{ label: "Node.js", value: "node" },
|
|
25
|
+
{ label: "Other Framework", value: "other" },
|
|
26
|
+
];
|
|
27
|
+
const languageItems = [
|
|
28
|
+
{ label: "JavaScript", value: "javascript" },
|
|
29
|
+
{ label: "TypeScript", value: "typescript" },
|
|
30
|
+
];
|
|
31
|
+
const frameworkItems = [
|
|
32
|
+
{ label: "Express", value: "express" },
|
|
33
|
+
{ label: "Fastify", value: "fastify" },
|
|
34
|
+
{ label: "NestJS", value: "nestjs" },
|
|
35
|
+
{ label: "ReactJS", value: "reactjs" },
|
|
36
|
+
...(language === "typescript"
|
|
37
|
+
? [{ label: "React Native CLI", value: "reactNativeCli" }]
|
|
38
|
+
: []),
|
|
39
|
+
{ label: "React Native Expo", value: "reactNativeExpo" },
|
|
40
|
+
{ label: "Angular", value: "angular" },
|
|
41
|
+
{ label: "Vuejs", value: "vuejs" },
|
|
42
|
+
{ label: "NextJS", value: "nextjs" },
|
|
43
|
+
];
|
|
44
|
+
const handlePlatformSelect = (item) => {
|
|
45
|
+
if (item.value === "other") {
|
|
46
|
+
setPhase("COMING_SOON");
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
setPlatform(item.value);
|
|
50
|
+
setPhase("LANGUAGE");
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const handleLanguageSelect = (item) => {
|
|
54
|
+
setLanguage(item.value);
|
|
55
|
+
setPhase("FRAMEWORK");
|
|
56
|
+
};
|
|
57
|
+
const handleFrameworkSelect = (item) => {
|
|
58
|
+
setFramework(item.value);
|
|
59
|
+
if (projectName) {
|
|
60
|
+
setPhase("BREWING");
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
setPhase("NAME");
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const startBrewing = async (name) => {
|
|
67
|
+
setProjectName(name);
|
|
68
|
+
setPhase("BREWING");
|
|
69
|
+
};
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (phase === "BREWING" &&
|
|
72
|
+
projectName &&
|
|
73
|
+
platform &&
|
|
74
|
+
language &&
|
|
75
|
+
framework) {
|
|
76
|
+
brew();
|
|
77
|
+
}
|
|
78
|
+
if (phase === "SUCCESS")
|
|
79
|
+
exit();
|
|
80
|
+
}, [phase]);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (phase === "COMING_SOON") {
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
exit();
|
|
85
|
+
}, 3000);
|
|
86
|
+
}
|
|
87
|
+
}, [phase]);
|
|
88
|
+
const brew = async () => {
|
|
89
|
+
if (!projectName || !platform || !language || !framework)
|
|
90
|
+
return;
|
|
91
|
+
const target = path.join(process.cwd(), projectName);
|
|
92
|
+
setTargetPath(target);
|
|
93
|
+
try {
|
|
94
|
+
if (fs.existsSync(target)) {
|
|
95
|
+
throw new Error(`Folder "${projectName}" already exists!`);
|
|
96
|
+
}
|
|
97
|
+
// --- Scaffolding Logic ---
|
|
98
|
+
const isTS = language === "typescript";
|
|
99
|
+
// Logic based on framework type
|
|
100
|
+
if (framework === "express" || framework === "fastify") {
|
|
101
|
+
// TEMPLATE-BASED SCAFFOLDING
|
|
102
|
+
setStatusMessage(`Brewing ${framework} app (${language})...`);
|
|
103
|
+
const finalTemplatePath = path.join(templatePath, platform, language, framework);
|
|
104
|
+
await fs.ensureDir(target);
|
|
105
|
+
if (fs.existsSync(finalTemplatePath)) {
|
|
106
|
+
await fs.copy(finalTemplatePath, target);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// Minimal fallback
|
|
110
|
+
await fs.ensureDir(path.join(target, "src"));
|
|
111
|
+
await fs.writeJson(path.join(target, "package.json"), {
|
|
112
|
+
name: projectName,
|
|
113
|
+
version: "1.0.0",
|
|
114
|
+
type: "module",
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
// COMMAND-BASED SCAFFOLDING
|
|
120
|
+
setStatusMessage(`Invoking official ${framework} cli (might take a minute)...`);
|
|
121
|
+
let cmd = "";
|
|
122
|
+
switch (framework) {
|
|
123
|
+
case "nextjs":
|
|
124
|
+
cmd = `npx create-next-app@latest ${projectName} --${language} --eslint --tailwind --app --src-dir --import-alias "@/*" --use-npm --skip-install --yes`;
|
|
125
|
+
break;
|
|
126
|
+
case "reactjs":
|
|
127
|
+
cmd = `npm create vite@latest ${projectName} -- --template react${isTS ? "-ts" : ""} --no-interactive`;
|
|
128
|
+
break;
|
|
129
|
+
case "reactNativeCli":
|
|
130
|
+
cmd = `npx @react-native-community/cli@latest init ${projectName} --skip-install --install-pods false`;
|
|
131
|
+
break;
|
|
132
|
+
case "reactNativeExpo":
|
|
133
|
+
cmd = `npx create-expo-app@latest ${projectName} --template ${isTS ? "blank-typescript" : "blank"} --no-install`;
|
|
134
|
+
break;
|
|
135
|
+
case "vuejs":
|
|
136
|
+
cmd = `npm create vite@latest ${projectName} -- --template vue${isTS ? "-ts" : ""} --no-interactive`;
|
|
137
|
+
break;
|
|
138
|
+
case "angular":
|
|
139
|
+
cmd = `npx -y @angular/cli@latest new ${projectName} --defaults --skip-install --skip-git`;
|
|
140
|
+
break;
|
|
141
|
+
case "nestjs":
|
|
142
|
+
cmd = `npx -y @nestjs/cli@latest new ${projectName} --package-manager npm --language ${isTS ? "TS" : "JS"} --skip-install --skip-git`;
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
if (cmd) {
|
|
146
|
+
try {
|
|
147
|
+
execSync(cmd, { stdio: ["ignore", "ignore", "pipe"] });
|
|
148
|
+
}
|
|
149
|
+
catch (err) {
|
|
150
|
+
const stderr = err.stderr?.toString().trim();
|
|
151
|
+
throw new Error(stderr
|
|
152
|
+
? `${framework} scaffolder failed:\n${stderr}`
|
|
153
|
+
: `${framework} scaffolder failed (exit ${err.status ?? "?"})`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (!fs.existsSync(target)) {
|
|
157
|
+
throw new Error(`${framework} scaffolder reported success but did not create "${projectName}".`);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// --- Final Post-Scaffolding Customization ---
|
|
161
|
+
setStatusMessage("Finishing touches...");
|
|
162
|
+
const pkgPath = path.join(target, "package.json");
|
|
163
|
+
if (fs.existsSync(pkgPath)) {
|
|
164
|
+
const pkg = await fs.readJson(pkgPath);
|
|
165
|
+
pkg.name = projectName;
|
|
166
|
+
pkg.description = `Project scaffolded using brew-cli (${framework} / ${language})`;
|
|
167
|
+
await fs.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
168
|
+
}
|
|
169
|
+
// Standardize Git
|
|
170
|
+
try {
|
|
171
|
+
// Sometimes tools create it even if we ask not to, or don't.
|
|
172
|
+
// We ensure it's there and freshly initialized if it's missing.
|
|
173
|
+
if (!fs.existsSync(path.join(target, ".git"))) {
|
|
174
|
+
execSync("git init", { cwd: target, stdio: "ignore" });
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
catch (e) { }
|
|
178
|
+
setPhase("SUCCESS");
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
setErrorMessage(error.message || "An unknown error occurred");
|
|
182
|
+
setPhase("ERROR");
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsx(Welcome, {}), phase === "PLATFORM" && (_jsx(SelectionList, { title: "Choose your platform:", items: platformItems, onSelect: handlePlatformSelect })), phase === "LANGUAGE" && (_jsx(SelectionList, { title: `Select language for ${platform}:`, items: languageItems, onSelect: handleLanguageSelect })), phase === "FRAMEWORK" && (_jsx(SelectionList, { title: `Which framework or library do you want to use?`, items: frameworkItems, onSelect: handleFrameworkSelect })), phase === "NAME" && _jsx(NamePrompt, { onSubmit: startBrewing }), phase === "COMING_SOON" && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "yellow", bold: true, children: "More technologies will be available in the near future!" }) })), phase === "BREWING" && _jsx(Spinner, { label: statusMessage }), phase === "SUCCESS" && projectName && (_jsx(SuccessBox, { projectName: projectName, targetPath: targetPath })), phase === "ERROR" && _jsx(ErrorDisplay, { message: errorMessage })] }));
|
|
186
|
+
};
|
|
187
|
+
export default App;
|
|
188
|
+
//# sourceMappingURL=app.js.map
|
package/dist/app.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,UAAU,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAkB1D,MAAM,GAAG,GAAuB,CAAC,EAAE,kBAAkB,EAAE,YAAY,EAAE,EAAE,EAAE;IACvE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAC5C,kBAAkB,CACnB,CAAC;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAQ,UAAU,CAAC,CAAC;IAEtD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IACrD,MAAM,CAA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IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,8EAElB,GACH,CACP,EACA,KAAK,KAAK,SAAS,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,aAAa,GAAI,EACxD,KAAK,KAAK,SAAS,IAAI,WAAW,IAAI,CACrC,KAAC,UAAU,IAAC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,GAAI,CACjE,EACA,KAAK,KAAK,OAAO,IAAI,KAAC,YAAY,IAAC,OAAO,EAAE,YAAY,GAAI,IACzD,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":""}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { render } from "ink";
|
|
5
|
+
import { Command } from "commander";
|
|
6
|
+
import path from "path";
|
|
7
|
+
import { fileURLToPath } from "url";
|
|
8
|
+
import App from "./app.js";
|
|
9
|
+
// --- ESM __dirname Fix ---
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = path.dirname(__filename);
|
|
12
|
+
const program = new Command();
|
|
13
|
+
program
|
|
14
|
+
.name("create-brew-app")
|
|
15
|
+
.description("Brew a fresh Node.js backend with Express and MongoDB")
|
|
16
|
+
.version("1.1.0")
|
|
17
|
+
.argument("[project-name]", "Name of the project")
|
|
18
|
+
.action((projectName) => {
|
|
19
|
+
const templatePath = path.join(__dirname, "templates");
|
|
20
|
+
// We don't clear the screen anymore as Ink handles its own rendering
|
|
21
|
+
// but if the user really wants it we could do it before render.
|
|
22
|
+
// console.clear();
|
|
23
|
+
render(_jsx(App, { initialProjectName: projectName, templatePath: templatePath }));
|
|
24
|
+
});
|
|
25
|
+
program.parse(process.argv);
|
|
26
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":";;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B,4BAA4B;AAC5B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,iBAAiB,CAAC;KACvB,WAAW,CAAC,uDAAuD,CAAC;KACpE,OAAO,CAAC,OAAO,CAAC;KAChB,QAAQ,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;KACjD,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE;IACtB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IAEvD,qEAAqE;IACrE,gEAAgE;IAChE,mBAAmB;IAEnB,MAAM,CACJ,KAAC,GAAG,IAAC,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,GAAI,CACrE,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorDisplay.d.ts","sourceRoot":"","sources":["../../src/components/ErrorDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAW7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Text, Box } from "ink";
|
|
4
|
+
const ErrorDisplay = ({ message }) => {
|
|
5
|
+
return (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "red", bold: true, children: "The brew spilled (Error)!" }), _jsx(Box, { marginLeft: 1, children: _jsx(Text, { color: "red", children: message }) })] }));
|
|
6
|
+
};
|
|
7
|
+
export default ErrorDisplay;
|
|
8
|
+
//# sourceMappingURL=ErrorDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorDisplay.js","sourceRoot":"","sources":["../../src/components/ErrorDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAMhC,MAAM,YAAY,GAAgC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;IAChE,OAAO,CACL,MAAC,GAAG,IAAC,SAAS,EAAE,CAAC,aACf,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,gDAEf,EACP,KAAC,GAAG,IAAC,UAAU,EAAE,CAAC,YAChB,KAAC,IAAI,IAAC,KAAK,EAAC,KAAK,YAAE,OAAO,GAAQ,GAC9B,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamePrompt.d.ts","sourceRoot":"","sources":["../../src/components/NamePrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,eAAe;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwDzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Text, Box } from "ink";
|
|
4
|
+
import TextInput from "ink-text-input";
|
|
5
|
+
const NamePrompt = ({ onSubmit }) => {
|
|
6
|
+
const [name, setName] = React.useState("");
|
|
7
|
+
const [error, setError] = React.useState(null);
|
|
8
|
+
const handleSubmit = (value) => {
|
|
9
|
+
if (/^([a-z\-\_\d])+$/.test(value)) {
|
|
10
|
+
onSubmit(value);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
setError("Project name may only include letters, numbers, and dashes.");
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginLeft: 2, children: [_jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { bold: true, color: "yellow", children: ["\u279C", " "] }), _jsx(Text, { bold: true, color: "white", children: "What is your project name?" })] }), _jsxs(Box, { borderStyle: "round", borderColor: "cyan", paddingLeft: 1, paddingRight: 2, width: 40, children: [_jsxs(Text, { color: "yellow", bold: true, children: ["\u00BB", " "] }), _jsx(TextInput, { value: name, onChange: setName, onSubmit: handleSubmit, placeholder: "my-cool-project" })] }), error && (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { color: "red", bold: true, children: ["\u2716 ", error] }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, italic: true, children: "Enter your project identifier and press Enter" }) })] }));
|
|
17
|
+
};
|
|
18
|
+
export default NamePrompt;
|
|
19
|
+
//# sourceMappingURL=NamePrompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamePrompt.js","sourceRoot":"","sources":["../../src/components/NamePrompt.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAMvC,MAAM,UAAU,GAA8B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7D,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAE9D,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE;QACrC,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,6DAA6D,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,aACrD,MAAC,GAAG,IAAC,YAAY,EAAE,CAAC,aAClB,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,QAAQ,uBACrB,IAAI,IACD,EACP,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,OAAO,2CAEjB,IACH,EAEN,MAAC,GAAG,IACF,WAAW,EAAC,OAAO,EACnB,WAAW,EAAC,MAAM,EAClB,WAAW,EAAE,CAAC,EACd,YAAY,EAAE,CAAC,EACf,KAAK,EAAE,EAAE,aAET,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,6BACrB,GAAG,IACA,EACP,KAAC,SAAS,IACR,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAC,iBAAiB,GAC7B,IACE,EAEL,KAAK,IAAI,CACR,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,EAAC,IAAI,8BACjB,KAAK,IACH,GACH,CACP,EAED,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,QAAQ,QAAC,MAAM,oEAEd,GACH,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SelectionItem {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
interface SelectionListProps {
|
|
7
|
+
title: string;
|
|
8
|
+
items: SelectionItem[];
|
|
9
|
+
onSelect: (item: SelectionItem) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const SelectionList: React.FC<SelectionListProps>;
|
|
12
|
+
export default SelectionList;
|
|
13
|
+
//# sourceMappingURL=SelectionList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectionList.d.ts","sourceRoot":"","sources":["../../src/components/SelectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;CACzC;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8C/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Box, Text } from "ink";
|
|
4
|
+
import SelectInput from "ink-select-input";
|
|
5
|
+
const SelectionList = ({ title, items, onSelect, }) => {
|
|
6
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, marginLeft: 2, children: [_jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { bold: true, color: "yellow", children: ["\u279C", " "] }), _jsx(Text, { bold: true, color: "white", children: `${title}` })] }), _jsx(Box, { borderStyle: "round", borderColor: "cyan", paddingLeft: 1, paddingRight: 2, flexDirection: "column", children: _jsx(SelectInput, { items: items, onSelect: onSelect, indicatorComponent: ({ isSelected }) => (_jsx(Box, { marginRight: 1, children: _jsx(Text, { color: "blue", children: isSelected ? "❯" : " " }) })), itemComponent: ({ isSelected, label }) => (_jsx(Text, { color: isSelected ? "blue" : "white", bold: !!isSelected, children: label })) }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, italic: true, children: "Use arrow keys to navigate \u00B7 Enter to select" }) })] }));
|
|
7
|
+
};
|
|
8
|
+
export default SelectionList;
|
|
9
|
+
//# sourceMappingURL=SelectionList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectionList.js","sourceRoot":"","sources":["../../src/components/SelectionList.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAa3C,MAAM,aAAa,GAAiC,CAAC,EACnD,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE,EAAE;IACH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AAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAanC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Text, Box } from "ink";
|
|
4
|
+
import SpinnerLib from "ink-spinner";
|
|
5
|
+
const Spinner = ({ label }) => {
|
|
6
|
+
return (_jsxs(Box, { marginTop: 1, marginLeft: 2, children: [_jsx(Box, { marginRight: 1, children: _jsx(Text, { color: "yellow", children: _jsx(SpinnerLib, { type: "dots" }) }) }), _jsx(Text, { bold: true, color: "white", children: label })] }));
|
|
7
|
+
};
|
|
8
|
+
export default Spinner;
|
|
9
|
+
//# sourceMappingURL=Spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../src/components/Spinner.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,UAAU,MAAM,aAAa,CAAC;AAMrC,MAAM,OAAO,GAA2B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACpD,OAAO,CACL,MAAC,GAAG,IAAC,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,aAC9B,KAAC,GAAG,IAAC,WAAW,EAAE,CAAC,YACjB,KAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,YAClB,KAAC,UAAU,IAAC,IAAI,EAAC,MAAM,GAAG,GACrB,GACH,EACN,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,OAAO,YACrB,KAAK,GACD,IACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuccessBox.d.ts","sourceRoot":"","sources":["../../src/components/SuccessBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,eAAe;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkEzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Text, Box } from "ink";
|
|
4
|
+
import Gradient from "ink-gradient";
|
|
5
|
+
import BigText from "ink-big-text";
|
|
6
|
+
const SuccessBox = ({ projectName, targetPath }) => {
|
|
7
|
+
return (_jsxs(Box, { flexDirection: "column", marginLeft: 2, children: [_jsx(Gradient, { colors: ["#f7971e", "#ffd200", "#00c6ff", "#0072ff"], children: _jsx(BigText, { text: "CHEERS", font: "block" }) }), _jsx(Text, { color: "green", bold: true, children: "\u2728 Brewing complete! Your project is served hot." }), _jsxs(Box, { borderStyle: "double", borderColor: "yellow", padding: 1, flexDirection: "column", marginTop: 1, width: 60, children: [_jsx(Box, { justifyContent: "center", marginBottom: 1, children: _jsx(Text, { bold: true, color: "cyan", children: "\uD83C\uDF7A create-brew-app" }) }), _jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Project: " }), _jsx(Text, { color: "yellow", children: projectName })] }), _jsxs(Box, { marginBottom: 1, children: [_jsx(Text, { bold: true, children: "Path: " }), _jsx(Text, { color: "blue", children: targetPath })] }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, color: "magenta", children: "\uD83D\uDE80 NEXT STEPS:" }), _jsxs(Box, { marginTop: 1, flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: "cyan", children: " 1. " }), _jsx(Text, { children: "cd " }), _jsx(Text, { color: "yellow", bold: true, children: projectName })] }), _jsxs(Box, { children: [_jsx(Text, { color: "cyan", children: " 2. " }), _jsx(Text, { color: "white", children: "npm install" })] }), _jsxs(Box, { children: [_jsx(Text, { color: "cyan", children: " 3. " }), _jsx(Text, { color: "white", children: "npm run dev" })] })] })] }), _jsx(Box, { marginTop: 2, justifyContent: "center", children: _jsx(Text, { italic: true, dimColor: true, children: "Happy Coding! May your brew never turn cold." }) })] })] }));
|
|
8
|
+
};
|
|
9
|
+
export default SuccessBox;
|
|
10
|
+
//# sourceMappingURL=SuccessBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuccessBox.js","sourceRoot":"","sources":["../../src/components/SuccessBox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,QAAQ,MAAM,cAAc,CAAC;AACpC,OAAO,OAAO,MAAM,cAAc,CAAC;AAOnC,MAAM,UAAU,GAA8B,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,EAAE;IAC5E,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,UAAU,EAAE,CAAC,aACvC,KAAC,QAAQ,IAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,YAC5D,KAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,GAAG,GAC7B,EAEX,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,2EAEjB,EAEP,MAAC,GAAG,IACF,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAC,QAAQ,EACpB,OAAO,EAAE,CAAC,EACV,aAAa,EAAC,QAAQ,E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