Skip to content

Commit af15182

Browse files
committed
revert back commented out features
1 parent bc7d7ff commit af15182

30 files changed

+397
-392
lines changed

bun.lockb

-32 Bytes
Binary file not shown.

cspell.json

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"forgetme",
6666
"frontends",
6767
"Geralt",
68-
"giget",
6968
"goroutines",
7069
"Greyjoy",
7170
"Griptape",

jsr.jsonc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reliverse/cli",
3-
"version": "1.3.2",
3+
"version": "1.3.4",
44
"author": "blefnk",
55
"license": "MIT",
66
"exports": "./dist-jsr/main.ts",
@@ -35,4 +35,4 @@
3535
"reset.d.ts"
3636
]
3737
}
38-
}
38+
}

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@reliverse/cli",
3-
"version": "1.3.2",
3+
"version": "1.3.4",
44
"author": "blefnk",
55
"type": "module",
66
"description": "A CLI tool that offers a convenient way to bootstrap a new web project and prepare it for work.",
@@ -67,7 +67,6 @@
6767
"execa": "^9.5.1",
6868
"fast-glob": "^3.3.2",
6969
"fs-extra": "^11.2.0",
70-
"giget": "^1.2.3",
7170
"glob": "^11.0.0",
7271
"magic-regexp": "^0.8.0",
7372
"nanoid": "^5.0.9",

src/app/data/constants.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export const CONFIG = ".reliverse";
21
export const verbose = false;
32

43
// Debug settings to control verbose logging and temp clone cleanup behavior
@@ -30,8 +29,6 @@ export const FILE_CONFLICTS = [
3029
// Command-line arguments to check if we are in development mode
3130
const args = process.argv.slice(2);
3231

33-
export const isDev = args.includes("--dev");
34-
3532
export const REPO_FULL_URLS = {
3633
relivatorGithubLink: "https://github.com/blefnk/relivator",
3734
};
@@ -41,6 +38,8 @@ export const REPO_SHORT_URLS = {
4138
versatorGithubLink: "blefnk/versator",
4239
};
4340

41+
export const MEMORY_FILE = ".reliverse/.reliverse";
42+
4443
// Path settings for important files and directories
4544
export const FILE_PATHS = {
4645
layoutFile: "src/app/layout.tsx", // Path to layout file in the repo

src/app/data/prompts.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function showStartPrompt() {
4040
titleColor: "inverse",
4141
clearConsole: true,
4242
packageName: "@reliverse/cli",
43-
packageVersion: "1.3.2",
43+
packageVersion: "1.3.4",
4444
// packageName: pkg.name,
4545
// packageVersion: pkg.version,
4646
});
@@ -312,17 +312,15 @@ export async function showTogglePrompt() {
312312
const result = await togglePrompt({
313313
title: "Do you like @reliverse/relinka library?",
314314
options: ["Yes", "No"],
315-
initial: "Yes",
316315
});
317316

318-
const agree = result === "Yes";
319317
msg({
320318
type: "M_INFO",
321319
title: "Your response:",
322-
content: agree ? "You like it! 🥰" : "You don't like it... 😔",
320+
content: result ? "You like it! 🥰" : "You don't like it... 😔",
323321
});
324322

325-
return agree;
323+
return result;
326324
}
327325

328326
export async function showConfirmPrompt(

src/app/menu/01-showReliverseMenu.ts

+43-33
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,72 @@
11
import { selectPrompt } from "@reliverse/prompts";
22
import { relinka } from "@reliverse/relinka";
3-
import { emojify } from "node-emoji";
43
import pc from "picocolors";
54

5+
import { readReliverseMemory } from "~/args/memory/impl.js";
6+
67
import { buildBrandNewThing } from "./02-buildBrandNewThing.js";
78

8-
// import { installAnyGitRepo } from "./03-installAnyGitRepo.js";
9-
// import { askProjectDetails } from "./04-askProjectDetails.js";
10-
// import { pkg } from "~/utils/pkg.js";
9+
export async function showReliverseMenu(isDev: boolean) {
10+
// TODO: if config contains at least one project, show "Open project" option
11+
// TODO: implement "Edit Reliverse Memory" option (configuration data editor)
1112

12-
// import { installAnyGitRepo } from "./03-installAnyGitRepo";
13-
// import { shadcnComponents } from "~/utils/shadcnComponents";
13+
const memory = await readReliverseMemory();
14+
const username = memory.user?.name;
1415

15-
// export async function showReliverseMenu(program: Command) {
16-
export async function showReliverseMenu() {
17-
// let template = "";
16+
const welcomeBackMessages = [
17+
`Welcome back, ${username}!`,
18+
`It's great to see you again, ${username}!`,
19+
`Nice to see you back, ${username}!`,
20+
`Hey ${username}, welcome back!`,
21+
`Good to have you back, ${username}!`,
22+
`Look who's back - it's ${username}!`,
23+
`${username} has returned! Welcome back!`,
24+
`Welcome back to your dev journey, ${username}!`,
25+
];
1826

19-
// TODO: if config contains at least one project, show "Open project" option
20-
// TODO: implement "Edit Reliverse Memory" option (configuration data editor)
27+
const randomReliverseMenuTitle = [
28+
"What would you like to create today? I'm your all-in-one tool for developing anything!",
29+
"Ready to build something amazing? I'm here to help you develop your next big project!",
30+
"Let's create something special today! I'm your development companion for any kind of project.",
31+
"Looking to start a new project? I've got all the tools you need to build anything!",
32+
"Welcome to your development journey! What would you like to create today?",
33+
"Got an idea? Let's turn it into reality! I'm here to help you build anything you imagine.",
34+
"Time to start building! What kind of project can I help you develop today?",
35+
];
2136

2237
const option = await selectPrompt({
23-
title:
24-
"🤖 What would you like to create today? I'm your all-in-one tool for developing anything!",
38+
title: `🤖 ${
39+
username &&
40+
welcomeBackMessages[
41+
Math.floor(Math.random() * welcomeBackMessages.length)
42+
]
43+
} ${
44+
randomReliverseMenuTitle[
45+
Math.floor(Math.random() * randomReliverseMenuTitle.length)
46+
]
47+
}`,
2548
titleColor: "retroGradient",
2649
options: [
2750
{
2851
label: "Build a brand new thing from scratch",
2952
value: "1",
3053
},
31-
// {
32-
// label: emojify(
33-
// ":toolbox: [Maintenance] Clone and configure any GitHub repo",
34-
// ),
35-
// value: "2",
36-
// disabled: true,
37-
// },
54+
{
55+
label: "Clone and configure any GitHub repo",
56+
hint: "coming soon",
57+
value: "2",
58+
disabled: true,
59+
},
3860
// "4. Add shadcn/ui components to your React/Vue/Svelte project",
3961
// "5. Run code modifications on the existing codebase",
4062
// "6. Update your GitHub clone with the latest changes",
4163
// "7. Add, remove, or replace the Relivator's features",
4264
{ label: pc.italic("Exit"), value: "exit" },
4365
],
44-
// debug: false,
45-
// terminalHeight: 14,
46-
// availableHeight: 10,
47-
// computedMaxItems: 3,
48-
// displayItems: 3,
49-
// startIdx: 0,
50-
// endIdx: 2,
51-
// shouldRenderTopEllipsis: false,
52-
// shouldRenderBottomEllipsis: false,
53-
// linesRendered: 5,
5466
});
5567

5668
if (option === "1") {
57-
await buildBrandNewThing();
69+
await buildBrandNewThing(isDev);
5870
}
5971
// else if (option === "2") {
6072
// // await installAnyGitRepo();
@@ -75,6 +87,4 @@ export async function showReliverseMenu() {
7587
} else {
7688
relinka.error("Invalid option selected. Exiting.");
7789
}
78-
79-
// return template;
8090
}

src/app/menu/02-buildBrandNewThing.ts

+96-8
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,21 @@ import { REPO_SHORT_URLS } from "~/app/data/constants.js";
55

66
import { askProjectDetails } from "./04-askProjectDetails.js";
77

8-
export async function buildBrandNewThing() {
8+
const randomInitialMessage = [
9+
"Let's build your own brand new digital thing from scratch! After that, you can customize everything however you like. What category describes your project best?",
10+
"Let's bring your vision to life by building something brand new from scratch! Once we're done, you'll have full freedom to customize it however you like. What category describes your project best?",
11+
"Ready to create something amazing? Let's start fresh with a brand new project that you can shape exactly how you want. What category fits your project best?",
12+
"Time to turn your ideas into reality! We'll build something from the ground up that you can fully customize. What category would you say your project falls under?",
13+
"Let's embark on a creative journey and build your project from scratch! You'll have complete freedom to make it your own. What category best describes what you want to create?",
14+
];
15+
16+
export async function buildBrandNewThing(isDev: boolean) {
917
const endTitle =
1018
"📚 Check the docs to learn more: https://docs.reliverse.org/cli";
1119
const initialMessage =
12-
// "Let's build your own brand new digital thing from scratch! After that, you can customize everything however you like.";
13-
"Let's bring your vision to life by building something brand new from scratch! Once we're done, you'll have full freedom to customize it however you like. What category describes your project best?";
20+
randomInitialMessage[
21+
Math.floor(Math.random() * randomInitialMessage.length)
22+
];
1423

1524
const category = await selectPrompt({
1625
endTitle,
@@ -21,6 +30,12 @@ export async function buildBrandNewThing() {
2130
value: "development",
2231
hint: "apps, sites, plugins, etc",
2332
},
33+
{
34+
label: "...",
35+
hint: "coming soon",
36+
value: "coming-soon",
37+
disabled: true,
38+
},
2439
// {
2540
// label: "[Coming soon] Design — Video — Music",
2641
// value: "digital",
@@ -37,16 +52,31 @@ export async function buildBrandNewThing() {
3752
if (category === "development") {
3853
let template = "";
3954

55+
const randomDevProjectTypeTitle = [
56+
"Fantastic! Let me help you craft a solid plan for your new project. Which subcategory best describes what you're working on?",
57+
"Great choice! Now, let's narrow down your development focus. What type of project are you looking to create?",
58+
"Perfect! To help set you up with the right tools, could you tell me more specifically what kind of development project this will be?",
59+
"Excellent! Let's get more specific about your development project. Which of these categories aligns best with your vision?",
60+
];
61+
4062
const devProjectType = await selectPrompt({
4163
endTitle,
4264
title:
43-
"Fantastic! Let me help you craft a solid plan for your new project. Which subcategory best describes what you're working on?",
65+
randomDevProjectTypeTitle[
66+
Math.floor(Math.random() * randomDevProjectTypeTitle.length)
67+
],
4468
options: [
4569
{
4670
label: "Web Development",
4771
value: "website",
4872
hint: "web apps, sites, plugins, and more",
4973
},
74+
{
75+
label: "...",
76+
hint: "coming soon",
77+
value: "coming-soon",
78+
disabled: true,
79+
},
5080
// {
5181
// label: "[Coming soon] Native Development",
5282
// value: "native-dev",
@@ -98,16 +128,32 @@ export async function buildBrandNewThing() {
98128
// ],
99129
// });
100130

131+
const randomWebsiteSubcategoryTitle = [
132+
"What type of website do you want me to help you build?",
133+
"Great choice! Now, let's narrow down your website focus. What type of website are you looking to create?",
134+
"Excellent! To help set you up with the right tools, could you tell me more specifically what kind of website this will be?",
135+
"Perfect! Let's get more specific about your website. Which of these categories aligns best with your vision?",
136+
];
137+
101138
if (devProjectType === "website") {
102139
const websiteSubcategory = await selectPrompt({
103140
endTitle,
104-
title: "What type of website do you want me to help you build?",
141+
title:
142+
randomWebsiteSubcategoryTitle[
143+
Math.floor(Math.random() * randomWebsiteSubcategoryTitle.length)
144+
],
105145
options: [
106146
{
107147
label: "Web App & Static Site",
108148
value: "web-app",
109149
hint: "Next.js, Vite, Astro, Vue, etc",
110150
},
151+
{
152+
label: "...",
153+
hint: "coming soon",
154+
value: "coming-soon",
155+
disabled: true,
156+
},
111157
// {
112158
// label: "[Coming soon] WordPress",
113159
// value: "wordpress",
@@ -123,15 +169,31 @@ export async function buildBrandNewThing() {
123169
],
124170
});
125171

172+
const randomFrameworkTitle = [
173+
"Time to make a choice! Which framework would you like to use?",
174+
"Great choice! Now, let's narrow down your framework choice. Which framework aligns best with your vision?",
175+
"Excellent! To help set you up with the right tools, could you tell me more specifically which framework you're interested in?",
176+
"Perfect! Let's get more specific about your framework choice. Which of these options aligns best with your vision?",
177+
];
178+
126179
const framework = await selectPrompt({
127180
endTitle,
128-
title: "Time to make a choice! Which framework would you like to use?",
181+
title:
182+
randomFrameworkTitle[
183+
Math.floor(Math.random() * randomFrameworkTitle.length)
184+
],
129185
options: [
130186
{
131187
label: "Next.js",
132188
value: "nextjs",
133189
hint: "recommended for most projects",
134190
},
191+
{
192+
label: "...",
193+
hint: "coming soon",
194+
value: "coming-soon",
195+
disabled: true,
196+
},
135197
// {
136198
// label: "[Coming soon] Vite",
137199
// value: "vite",
@@ -153,11 +215,27 @@ export async function buildBrandNewThing() {
153215
],
154216
});
155217

218+
const randomWebsiteCategoryTitle = [
219+
"Let's narrow it down: What category best fits your website?",
220+
"Great choice! Now, let's narrow down your website focus. What category aligns best with your vision?",
221+
"Excellent! To help set you up with the right tools, could you tell me more specifically which category you're interested in?",
222+
"Perfect! Let's get more specific about your website category. Which of these options aligns best with your vision?",
223+
];
224+
156225
const websiteCategory = await selectPrompt({
157226
endTitle,
158-
title: "Let's narrow it down: What category best fits your website?",
227+
title:
228+
randomWebsiteCategoryTitle[
229+
Math.floor(Math.random() * randomWebsiteCategoryTitle.length)
230+
],
159231
options: [
160232
{ label: "E-commerce", value: "e-commerce" },
233+
{
234+
label: "...",
235+
hint: "coming soon",
236+
value: "coming-soon",
237+
disabled: true,
238+
},
161239
// { label: "[Coming soon] Blog", value: "blog", disabled: true },
162240
// {
163241
// label: "[Coming soon] Portfolio",
@@ -171,11 +249,21 @@ export async function buildBrandNewThing() {
171249
template = REPO_SHORT_URLS.versatorGithubLink;
172250
}
173251

252+
const randomWebsiteDetailsTitle = [
253+
" Your initial plan is all set! Now, let’s add some personal touches. Please share a few details about yourself and the app so I can personalize everything for you.",
254+
" Great choice! Now, let’s add some personal touches. Please share a few details about yourself and the app so I can personalize everything for you.",
255+
" Excellent! To help set you up with the right tools, could you tell me more specifically which details you're interested in?",
256+
" Perfect! Let's get more specific about your website details. Which of these options aligns best with your vision?",
257+
];
258+
174259
await askProjectDetails(
175260
template,
176-
" Your initial plan is all set! Now, let’s add some personal touches. Please share a few details about yourself and the app so I can personalize everything for you.",
261+
randomWebsiteDetailsTitle[
262+
Math.floor(Math.random() * randomWebsiteDetailsTitle.length)
263+
],
177264
"buildBrandNewThing",
178265
true,
266+
isDev,
179267
);
180268
/* END OF WEBSITE CATEGORY */
181269
}

0 commit comments

Comments
 (0)