@nimbuslab/cli 0.16.4 → 0.16.5
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/README.md +41 -75
- package/dist/index.js +4 -3
- package/package.json +4 -1
- package/.github/workflows/publish.yml +0 -67
- package/CLAUDE.md +0 -106
- package/MIGRATION-ROADMAP.md +0 -201
- package/bun.lock +0 -36
- package/docs/CI-CD.md +0 -181
- package/docs/analyze.md +0 -148
- package/docs/create.md +0 -219
- package/docs/migrate.md +0 -177
- package/docs/package.md +0 -229
- package/docs/upgrade.md +0 -152
- package/src/commands/analyze.ts +0 -210
- package/src/commands/create.ts +0 -1323
- package/src/commands/lola.ts +0 -1029
- package/src/commands/update.ts +0 -334
- package/src/commands/upgrade.ts +0 -251
- package/src/index.ts +0 -161
- package/tsconfig.json +0 -29
package/src/index.ts
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
|
|
3
|
-
import * as p from "@clack/prompts"
|
|
4
|
-
import pc from "picocolors"
|
|
5
|
-
import { create } from "./commands/create"
|
|
6
|
-
import { analyze } from "./commands/analyze"
|
|
7
|
-
import { upgrade } from "./commands/upgrade"
|
|
8
|
-
import { update } from "./commands/update"
|
|
9
|
-
import { lola } from "./commands/lola"
|
|
10
|
-
|
|
11
|
-
const PACKAGE_NAME = "@nimbuslab/cli"
|
|
12
|
-
|
|
13
|
-
// Lê versão do package.json em runtime
|
|
14
|
-
const pkg = await import("../package.json")
|
|
15
|
-
const CURRENT_VERSION = pkg.version
|
|
16
|
-
|
|
17
|
-
const LOGO = `
|
|
18
|
-
███╗ ██╗██╗███╗ ███╗██████╗ ██╗ ██╗███████╗
|
|
19
|
-
████╗ ██║██║████╗ ████║██╔══██╗██║ ██║██╔════╝
|
|
20
|
-
██╔██╗ ██║██║██╔████╔██║██████╔╝██║ ██║███████╗
|
|
21
|
-
██║╚██╗██║██║██║╚██╔╝██║██╔══██╗██║ ██║╚════██║
|
|
22
|
-
██║ ╚████║██║██║ ╚═╝ ██║██████╔╝╚██████╔╝███████║
|
|
23
|
-
╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚══════╝`
|
|
24
|
-
|
|
25
|
-
async function checkForUpdates(): Promise<string | null> {
|
|
26
|
-
try {
|
|
27
|
-
const controller = new AbortController()
|
|
28
|
-
const timeout = setTimeout(() => controller.abort(), 3000)
|
|
29
|
-
|
|
30
|
-
const res = await fetch(`https://registry.npmjs.org/${PACKAGE_NAME}/latest`, {
|
|
31
|
-
signal: controller.signal,
|
|
32
|
-
})
|
|
33
|
-
clearTimeout(timeout)
|
|
34
|
-
|
|
35
|
-
if (!res.ok) return null
|
|
36
|
-
|
|
37
|
-
const data = await res.json() as { version?: string }
|
|
38
|
-
const latestVersion = data.version
|
|
39
|
-
|
|
40
|
-
if (latestVersion && latestVersion !== CURRENT_VERSION) {
|
|
41
|
-
return latestVersion
|
|
42
|
-
}
|
|
43
|
-
return null
|
|
44
|
-
} catch {
|
|
45
|
-
return null
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function showUpdateNotice(latestVersion: string) {
|
|
50
|
-
const current = CURRENT_VERSION
|
|
51
|
-
const latest = latestVersion
|
|
52
|
-
const command = "nimbus update"
|
|
53
|
-
|
|
54
|
-
const line1 = ` Nova versão disponível: ${current} → ${latest}`
|
|
55
|
-
const line2 = ` Atualize com: ${command}`
|
|
56
|
-
|
|
57
|
-
const maxLen = Math.max(line1.length, line2.length)
|
|
58
|
-
const border = "─".repeat(maxLen + 2)
|
|
59
|
-
|
|
60
|
-
console.log(pc.yellow(` ┌${border}┐`))
|
|
61
|
-
console.log(pc.yellow(` │`) + pc.white(line1.padEnd(maxLen + 2)) + pc.yellow(`│`))
|
|
62
|
-
console.log(pc.yellow(` │`) + pc.cyan(line2.padEnd(maxLen + 2)) + pc.yellow(`│`))
|
|
63
|
-
console.log(pc.yellow(` └${border}┘`))
|
|
64
|
-
console.log()
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
async function main() {
|
|
68
|
-
const args = process.argv.slice(2)
|
|
69
|
-
const command = args[0]
|
|
70
|
-
|
|
71
|
-
console.log(pc.cyan(LOGO))
|
|
72
|
-
console.log(pc.white(" nimbuslab CLI"))
|
|
73
|
-
console.log(pc.dim(" Create awesome projects"))
|
|
74
|
-
console.log()
|
|
75
|
-
|
|
76
|
-
// Check for updates (non-blocking)
|
|
77
|
-
const latestVersion = await checkForUpdates()
|
|
78
|
-
if (latestVersion) {
|
|
79
|
-
showUpdateNotice(latestVersion)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (!command || command === "create") {
|
|
83
|
-
await create(args.slice(1))
|
|
84
|
-
} else if (command === "analyze") {
|
|
85
|
-
await analyze(args.slice(1))
|
|
86
|
-
} else if (command === "upgrade") {
|
|
87
|
-
await upgrade(args.slice(1))
|
|
88
|
-
} else if (command === "update") {
|
|
89
|
-
await update(args.slice(1))
|
|
90
|
-
} else if (command === "lola") {
|
|
91
|
-
await lola(args.slice(1))
|
|
92
|
-
} else if (command === "help" || command === "--help" || command === "-h") {
|
|
93
|
-
showHelp()
|
|
94
|
-
} else if (command === "version" || command === "--version" || command === "-v") {
|
|
95
|
-
showVersion()
|
|
96
|
-
} else {
|
|
97
|
-
console.log(pc.red(`Comando desconhecido: ${command}`))
|
|
98
|
-
showHelp()
|
|
99
|
-
process.exit(1)
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function showHelp() {
|
|
104
|
-
console.log(`
|
|
105
|
-
${pc.bold("Uso:")} nimbus [comando] [opções]
|
|
106
|
-
|
|
107
|
-
${pc.bold("Comandos:")}
|
|
108
|
-
create [nome] Criar novo projeto
|
|
109
|
-
analyze [dir] Analisar stack do projeto
|
|
110
|
-
upgrade [alvo] Atualizar dependências
|
|
111
|
-
update [versão] Atualizar o CLI
|
|
112
|
-
lola [ação] Lola - Code Agent
|
|
113
|
-
help Mostrar esta ajuda
|
|
114
|
-
version Mostrar versão
|
|
115
|
-
|
|
116
|
-
${pc.bold("Templates:")}
|
|
117
|
-
--landing Landing page (Next.js 16 + Tailwind 4 + shadcn)
|
|
118
|
-
--app Web app (Landing + Better Auth + Drizzle)
|
|
119
|
-
--turborepo Monorepo (Turborepo + apps/packages)
|
|
120
|
-
|
|
121
|
-
${pc.bold("Analyze & Upgrade:")}
|
|
122
|
-
analyze . Detectar stack e mostrar recomendações
|
|
123
|
-
analyze --json Output em JSON
|
|
124
|
-
upgrade --plan Mostrar plano de upgrade
|
|
125
|
-
upgrade next Atualizar Next.js
|
|
126
|
-
upgrade tailwind Atualizar Tailwind CSS
|
|
127
|
-
|
|
128
|
-
${pc.bold("Update (CLI):")}
|
|
129
|
-
update Atualizar para ultima versao
|
|
130
|
-
update 0.11.0 Instalar versao especifica
|
|
131
|
-
update --list Listar versoes disponiveis
|
|
132
|
-
update --force Forcar reinstalacao (limpa cache)
|
|
133
|
-
|
|
134
|
-
${pc.bold("Opções:")}
|
|
135
|
-
-y, --yes Aceitar padrões
|
|
136
|
-
--no-git Não inicializar Git
|
|
137
|
-
--no-install Não instalar dependências
|
|
138
|
-
--template <url> Usar template customizado
|
|
139
|
-
|
|
140
|
-
${pc.bold("Lola (Code Agent):")}
|
|
141
|
-
lola install Instalar/atualizar Lola
|
|
142
|
-
lola suggest Sugerir melhoria (cria issue)
|
|
143
|
-
|
|
144
|
-
${pc.bold("Exemplos:")}
|
|
145
|
-
${pc.dim("$")} nimbus create my-landing --landing
|
|
146
|
-
${pc.dim("$")} nimbus create my-app --app
|
|
147
|
-
${pc.dim("$")} nimbus analyze ./my-project
|
|
148
|
-
${pc.dim("$")} nimbus upgrade --plan
|
|
149
|
-
${pc.dim("$")} nimbus update
|
|
150
|
-
${pc.dim("$")} nimbus lola install
|
|
151
|
-
`)
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function showVersion() {
|
|
155
|
-
console.log(`${PACKAGE_NAME} v${CURRENT_VERSION}`)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
main().catch((err) => {
|
|
159
|
-
console.error(pc.red("Erro:"), err.message)
|
|
160
|
-
process.exit(1)
|
|
161
|
-
})
|
package/tsconfig.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
// Environment setup & latest features
|
|
4
|
-
"lib": ["ESNext"],
|
|
5
|
-
"target": "ESNext",
|
|
6
|
-
"module": "Preserve",
|
|
7
|
-
"moduleDetection": "force",
|
|
8
|
-
"jsx": "react-jsx",
|
|
9
|
-
"allowJs": true,
|
|
10
|
-
|
|
11
|
-
// Bundler mode
|
|
12
|
-
"moduleResolution": "bundler",
|
|
13
|
-
"allowImportingTsExtensions": true,
|
|
14
|
-
"verbatimModuleSyntax": true,
|
|
15
|
-
"noEmit": true,
|
|
16
|
-
|
|
17
|
-
// Best practices
|
|
18
|
-
"strict": true,
|
|
19
|
-
"skipLibCheck": true,
|
|
20
|
-
"noFallthroughCasesInSwitch": true,
|
|
21
|
-
"noUncheckedIndexedAccess": true,
|
|
22
|
-
"noImplicitOverride": true,
|
|
23
|
-
|
|
24
|
-
// Some stricter flags (disabled by default)
|
|
25
|
-
"noUnusedLocals": false,
|
|
26
|
-
"noUnusedParameters": false,
|
|
27
|
-
"noPropertyAccessFromIndexSignature": false
|
|
28
|
-
}
|
|
29
|
-
}
|