-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix scaffolding using default flow and config
- Loading branch information
Showing
144 changed files
with
1,458 additions
and
711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@reliverse/cli", | ||
"version": "1.4.3", | ||
"version": "1.4.8", | ||
"author": "blefnk", | ||
"type": "module", | ||
"description": "This superapp CLI tool can help you easily create new web projects, manage existing projects, and automatically make advanced codebase modifications, with more features coming soon.", | ||
|
@@ -44,9 +44,17 @@ | |
"url": "https://github.com/reliverse/cli/issues", | ||
"email": "[email protected]" | ||
}, | ||
"files": ["package.json", "README.md", "LICENSE.md", "dist-npm"], | ||
"files": [ | ||
"package.json", | ||
"README.md", | ||
"LICENSE.md", | ||
"dist-npm" | ||
], | ||
"homepage": "https://github.com/reliverse/cli", | ||
"keywords": ["cli", "reliverse"], | ||
"keywords": [ | ||
"cli", | ||
"reliverse" | ||
], | ||
"license": "MIT", | ||
"dependencies": { | ||
"@clack/core": "^0.4.0", | ||
|
@@ -71,8 +79,8 @@ | |
"drizzle-orm": "^0.38.3", | ||
"execa": "^9.5.2", | ||
"fs-extra": "^11.2.0", | ||
"geist": "^1.3.1", | ||
"globby": "^14.0.2", | ||
"gradient-string": "^3.0.0", | ||
"magic-regexp": "^0.8.0", | ||
"nanoid": "^5.0.9", | ||
"node-emoji": "^2.2.0", | ||
|
@@ -104,6 +112,7 @@ | |
"@planetscale/database": "^1.19.0", | ||
"@prisma/adapter-planetscale": "^6.1.0", | ||
"@prisma/client": "^6.1.0", | ||
"@react-router/dev": "^7.1.1", | ||
"@stylistic/eslint-plugin": "^2.12.1", | ||
"@swc/core": "^1.10.3", | ||
"@t3-oss/env-nextjs": "^0.11.1", | ||
|
@@ -118,7 +127,6 @@ | |
"@types/cross-spawn": "^6.0.6", | ||
"@types/eslint__js": "^8.42.3", | ||
"@types/fs-extra": "^11.0.4", | ||
"@types/gradient-string": "^1.1.6", | ||
"@types/node": "^22.10.2", | ||
"@types/react": "^19.0.2", | ||
"@types/react-dom": "^19.0.2", | ||
|
@@ -152,4 +160,4 @@ | |
"vitest": "^2.1.8", | ||
"zod": "^3.24.1" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,56 @@ | ||
import { inputPrompt } from "@reliverse/prompts"; | ||
import pc from "picocolors"; | ||
|
||
import { | ||
readReliverseMemory, | ||
updateReliverseMemory, | ||
} from "~/args/memory/impl.js"; | ||
import { relinka } from "~/utils/console.js"; | ||
|
||
export async function askGithubName(): Promise<string> { | ||
const memory = await readReliverseMemory(); | ||
export async function askGithubName(): Promise<string | null> { | ||
try { | ||
const memory = await readReliverseMemory(); | ||
if (!memory) { | ||
relinka("error", "Failed to read reliverse memory"); | ||
return null; | ||
} | ||
|
||
let placeholder = ""; | ||
let content = ""; | ||
if (memory.githubUsername && memory.githubUsername !== "") { | ||
return memory.githubUsername; | ||
} | ||
|
||
if (memory.githubUsername) { | ||
placeholder = memory.githubUsername; | ||
content = `Last used GitHub username: ${pc.cyanBright(placeholder)}`; | ||
} | ||
const ghUsername = await inputPrompt({ | ||
title: "What's your GitHub username?", | ||
content: | ||
"💡 If you don't have a GitHub account, you can create one for free at https://github.com/signup", | ||
validate: (value: string | undefined) => { | ||
if (!value?.trim()) { | ||
return "GitHub username is required for deployment"; | ||
} | ||
if (!/^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i.test(value)) { | ||
return "Invalid GitHub username format"; | ||
} | ||
return true; | ||
}, | ||
}); | ||
|
||
const githubUsername = await inputPrompt({ | ||
title: "What's your GitHub username?", | ||
placeholder, | ||
content, | ||
validate: (value: string | undefined) => { | ||
if (!value?.trim()) { | ||
return "GitHub username is required for deployment"; | ||
} | ||
if (!/^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i.test(value)) { | ||
return "Invalid GitHub username format"; | ||
} | ||
return true; | ||
}, | ||
}); | ||
if (ghUsername !== "" && ghUsername !== memory.githubUsername) { | ||
await updateReliverseMemory({ | ||
githubUsername: ghUsername, | ||
}); | ||
} else { | ||
relinka( | ||
"error", | ||
"Something went wrong while saving your GitHub username...", | ||
); | ||
} | ||
|
||
if (githubUsername && githubUsername !== placeholder) { | ||
await updateReliverseMemory({ | ||
githubUsername, | ||
}); | ||
return ghUsername; | ||
} catch (error) { | ||
relinka( | ||
"error", | ||
"Failed to get GitHub username:", | ||
error instanceof Error ? error.message : String(error), | ||
); | ||
return null; | ||
} | ||
|
||
return githubUsername; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.