@nimbuslab/cli 0.16.3 → 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 +72 -10
- package/package.json +12 -2
- 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 -1026
- package/src/commands/update.ts +0 -267
- package/src/commands/upgrade.ts +0 -251
- package/src/index.ts +0 -161
- package/tsconfig.json +0 -29
package/MIGRATION-ROADMAP.md
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
# Roadmap - Sistema de Migracao nimbuslab
|
|
2
|
-
|
|
3
|
-
> Lola Migration Assistant - Facilitar migracoes de projetos para o ecossistema nimbuslab
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Visao Geral
|
|
8
|
-
|
|
9
|
-
O sistema de migracao permite:
|
|
10
|
-
1. **Analisar** projetos existentes (detectar stack)
|
|
11
|
-
2. **Planejar** caminho de migracao
|
|
12
|
-
3. **Executar** transformacoes automaticas (codemods)
|
|
13
|
-
4. **Verificar** resultado final
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Fase 1: Fundacao (v0.9.0)
|
|
18
|
-
|
|
19
|
-
### M80: Estrutura base do sistema de migracao
|
|
20
|
-
- [ ] Criar `src/commands/migrate.ts`
|
|
21
|
-
- [ ] Criar `src/commands/analyze.ts`
|
|
22
|
-
- [ ] Criar `src/commands/upgrade.ts`
|
|
23
|
-
- [ ] Estrutura de pastas para codemods
|
|
24
|
-
|
|
25
|
-
### M81: Comando `nimbus analyze`
|
|
26
|
-
- [ ] Detectar package.json (name, version, dependencies)
|
|
27
|
-
- [ ] Detectar framework (Next.js, React, Angular, Vue, etc)
|
|
28
|
-
- [ ] Detectar styling (Tailwind, CSS Modules, styled-components)
|
|
29
|
-
- [ ] Detectar package manager (bun, pnpm, npm, yarn)
|
|
30
|
-
- [ ] Detectar monorepo (Turborepo, Nx, Lerna)
|
|
31
|
-
- [ ] Detectar auth (Better Auth, NextAuth, Clerk, etc)
|
|
32
|
-
- [ ] Detectar DB (Drizzle, Prisma, TypeORM, etc)
|
|
33
|
-
- [ ] Output: JSON com analise completa
|
|
34
|
-
|
|
35
|
-
### M82: Comando `nimbus upgrade --plan`
|
|
36
|
-
- [ ] Comparar versoes atuais com recomendadas
|
|
37
|
-
- [ ] Listar breaking changes conhecidos
|
|
38
|
-
- [ ] Gerar plano de upgrade
|
|
39
|
-
- [ ] Estimar complexidade (low/medium/high)
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## Fase 2: Codemods (v0.10.0)
|
|
44
|
-
|
|
45
|
-
### M83: Infraestrutura de codemods
|
|
46
|
-
- [ ] Criar `src/codemods/` estrutura
|
|
47
|
-
- [ ] Runner de codemods (jscodeshift ou ts-morph)
|
|
48
|
-
- [ ] Sistema de dry-run (preview)
|
|
49
|
-
- [ ] Rollback automatico em caso de erro
|
|
50
|
-
|
|
51
|
-
### M84: Codemod Tailwind 3 -> 4
|
|
52
|
-
- [ ] Migrar classes depreciadas
|
|
53
|
-
- [ ] Atualizar config (tailwind.config.js -> CSS)
|
|
54
|
-
- [ ] Converter @apply para novo formato
|
|
55
|
-
- [ ] Atualizar imports
|
|
56
|
-
|
|
57
|
-
### M85: Codemod React 18 -> 19
|
|
58
|
-
- [ ] Remover forwardRef (nao mais necessario)
|
|
59
|
-
- [ ] Atualizar tipos (ref como prop)
|
|
60
|
-
- [ ] Ajustar Suspense boundaries
|
|
61
|
-
- [ ] Atualizar async components
|
|
62
|
-
|
|
63
|
-
### M86: Codemod pnpm -> bun
|
|
64
|
-
- [ ] Converter pnpm-lock.yaml para bun.lockb
|
|
65
|
-
- [ ] Atualizar scripts no package.json
|
|
66
|
-
- [ ] Remover .npmrc especifico pnpm
|
|
67
|
-
- [ ] Atualizar CI/CD configs
|
|
68
|
-
|
|
69
|
-
### M87: Codemod Prisma -> Drizzle
|
|
70
|
-
- [ ] Converter schema.prisma para drizzle schema
|
|
71
|
-
- [ ] Gerar migrations Drizzle
|
|
72
|
-
- [ ] Atualizar queries (findMany -> select, etc)
|
|
73
|
-
- [ ] Atualizar auth config
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## Fase 3: Templates Modulares (v0.11.0)
|
|
78
|
-
|
|
79
|
-
### M88: Refatorar templates em camadas
|
|
80
|
-
- [ ] Extrair `layers/base` (tsconfig, eslint, prettier)
|
|
81
|
-
- [ ] Extrair `layers/nextjs` (next.config, app structure)
|
|
82
|
-
- [ ] Extrair `layers/tailwind` (tailwind config, globals.css)
|
|
83
|
-
- [ ] Extrair `layers/shadcn` (components.json, ui/)
|
|
84
|
-
- [ ] Extrair `layers/auth` (Better Auth setup)
|
|
85
|
-
- [ ] Extrair `layers/db` (Drizzle setup)
|
|
86
|
-
- [ ] Extrair `layers/monorepo` (Turborepo config)
|
|
87
|
-
|
|
88
|
-
### M89: Comando `nimbus add <layer>`
|
|
89
|
-
- [ ] `nimbus add auth` - Adiciona Better Auth
|
|
90
|
-
- [ ] `nimbus add db` - Adiciona Drizzle
|
|
91
|
-
- [ ] `nimbus add shadcn` - Adiciona shadcn/ui
|
|
92
|
-
- [ ] `nimbus add monorepo` - Converte para Turborepo
|
|
93
|
-
- [ ] Detectar conflitos antes de aplicar
|
|
94
|
-
- [ ] Merge inteligente de configs
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Fase 4: Migracao Assistida (v0.12.0)
|
|
99
|
-
|
|
100
|
-
### M90: Lola Migration Assistant
|
|
101
|
-
- [ ] Criar `.claude/agents/lola-migrate.md`
|
|
102
|
-
- [ ] Criar `.gemini/lola-migrate.md`
|
|
103
|
-
- [ ] Prompts especializados para migracao
|
|
104
|
-
- [ ] Checklist interativo
|
|
105
|
-
- [ ] Documentacao de decisoes
|
|
106
|
-
|
|
107
|
-
### M91: Comando `nimbus migrate`
|
|
108
|
-
- [ ] `nimbus migrate --from=angular` - Plano Angular -> Next.js
|
|
109
|
-
- [ ] `nimbus migrate --from=php` - Plano PHP -> Next.js
|
|
110
|
-
- [ ] `nimbus migrate --from=vue` - Plano Vue -> React
|
|
111
|
-
- [ ] Gerar plano detalhado (markdown)
|
|
112
|
-
- [ ] Estimar esforco (horas/dias)
|
|
113
|
-
|
|
114
|
-
### M92: Migration Guides
|
|
115
|
-
- [ ] `knowledge/migrations/nextjs-15-to-16.md`
|
|
116
|
-
- [ ] `knowledge/migrations/tailwind-3-to-4.md`
|
|
117
|
-
- [ ] `knowledge/migrations/prisma-to-drizzle.md`
|
|
118
|
-
- [ ] `knowledge/migrations/pnpm-to-bun.md`
|
|
119
|
-
- [ ] `knowledge/migrations/angular-to-nextjs.md`
|
|
120
|
-
- [ ] `knowledge/migrations/php-laravel-to-nextjs.md`
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Fase 5: Automacao Completa (v1.0.0)
|
|
125
|
-
|
|
126
|
-
### M93: Pipeline de migracao
|
|
127
|
-
- [ ] `nimbus migrate --execute` (aplica codemods)
|
|
128
|
-
- [ ] `nimbus migrate --verify` (roda build + lint + tests)
|
|
129
|
-
- [ ] Relatorio de migracao (o que mudou, o que revisar)
|
|
130
|
-
- [ ] Integracao com CI/CD
|
|
131
|
-
|
|
132
|
-
### M94: Atualizacao automatica
|
|
133
|
-
- [ ] `nimbus upgrade` detecta atualizacoes disponiveis
|
|
134
|
-
- [ ] `nimbus upgrade --all` aplica todas seguras
|
|
135
|
-
- [ ] Notificacao de breaking changes
|
|
136
|
-
- [ ] Changelog automatico
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Prioridade de Implementacao
|
|
141
|
-
|
|
142
|
-
| Milestone | Prioridade | Dependencia |
|
|
143
|
-
|-----------|------------|-------------|
|
|
144
|
-
| M80 | Alta | - |
|
|
145
|
-
| M81 | Alta | M80 |
|
|
146
|
-
| M82 | Alta | M81 |
|
|
147
|
-
| M83 | Alta | M80 |
|
|
148
|
-
| M84 | Media | M83 |
|
|
149
|
-
| M85 | Media | M83 |
|
|
150
|
-
| M86 | Media | M83 |
|
|
151
|
-
| M87 | Media | M83 |
|
|
152
|
-
| M88 | Media | M80 |
|
|
153
|
-
| M89 | Media | M88 |
|
|
154
|
-
| M90 | Alta | M80 |
|
|
155
|
-
| M91 | Media | M81, M83 |
|
|
156
|
-
| M92 | Media | - |
|
|
157
|
-
| M93 | Baixa | M91 |
|
|
158
|
-
| M94 | Baixa | M93 |
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## Stack dos Codemods
|
|
163
|
-
|
|
164
|
-
- **Parser:** ts-morph (TypeScript AST)
|
|
165
|
-
- **Runner:** Custom (baseado em jscodeshift patterns)
|
|
166
|
-
- **Configs:** JSON transforms
|
|
167
|
-
- **CSS:** PostCSS para Tailwind
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Exemplo de Uso Final
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
# Analisar projeto
|
|
175
|
-
nimbus analyze ./meu-projeto
|
|
176
|
-
# Output: Next.js 15, React 18, Tailwind 3, pnpm, Prisma
|
|
177
|
-
|
|
178
|
-
# Ver plano de upgrade
|
|
179
|
-
nimbus upgrade --plan
|
|
180
|
-
# Output: Recomendado: Next 16, React 19, Tailwind 4, bun, Drizzle
|
|
181
|
-
|
|
182
|
-
# Upgrade especifico
|
|
183
|
-
nimbus upgrade tailwind
|
|
184
|
-
# Executa codemod Tailwind 3 -> 4
|
|
185
|
-
|
|
186
|
-
# Adicionar camada
|
|
187
|
-
nimbus add auth
|
|
188
|
-
# Adiciona Better Auth ao projeto
|
|
189
|
-
|
|
190
|
-
# Migracao completa
|
|
191
|
-
nimbus migrate --from=angular --plan
|
|
192
|
-
# Gera plano de migracao Angular -> Next.js
|
|
193
|
-
|
|
194
|
-
# Usar Lola para assistir
|
|
195
|
-
claude --agent lola-migrate
|
|
196
|
-
# Lola especializada em migracoes
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
*Ultima atualizacao: Janeiro 2026*
|
package/bun.lock
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"lockfileVersion": 1,
|
|
3
|
-
"configVersion": 1,
|
|
4
|
-
"workspaces": {
|
|
5
|
-
"": {
|
|
6
|
-
"name": "nimbus-cli",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@clack/prompts": "^0.11.0",
|
|
9
|
-
"picocolors": "^1.1.1",
|
|
10
|
-
},
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"@types/bun": "latest",
|
|
13
|
-
"typescript": "^5",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
"packages": {
|
|
18
|
-
"@clack/core": ["@clack/core@0.5.0", "", { "dependencies": { "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-p3y0FIOwaYRUPRcMO7+dlmLh8PSRcrjuTndsiA0WAFbWES0mLZlrjVoBRZ9DzkPFJZG6KGkJmoEAY0ZcVWTkow=="],
|
|
19
|
-
|
|
20
|
-
"@clack/prompts": ["@clack/prompts@0.11.0", "", { "dependencies": { "@clack/core": "0.5.0", "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-pMN5FcrEw9hUkZA4f+zLlzivQSeQf5dRGJjSUbvVYDLvpKCdQx5OaknvKzgbtXOizhP+SJJJjqEbOe55uKKfAw=="],
|
|
21
|
-
|
|
22
|
-
"@types/bun": ["@types/bun@1.3.6", "", { "dependencies": { "bun-types": "1.3.6" } }, "sha512-uWCv6FO/8LcpREhenN1d1b6fcspAB+cefwD7uti8C8VffIv0Um08TKMn98FynpTiU38+y2dUO55T11NgDt8VAA=="],
|
|
23
|
-
|
|
24
|
-
"@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="],
|
|
25
|
-
|
|
26
|
-
"bun-types": ["bun-types@1.3.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ=="],
|
|
27
|
-
|
|
28
|
-
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
|
|
29
|
-
|
|
30
|
-
"sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
|
|
31
|
-
|
|
32
|
-
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
33
|
-
|
|
34
|
-
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
35
|
-
}
|
|
36
|
-
}
|
package/docs/CI-CD.md
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
# CI/CD - Publicacao no npm
|
|
2
|
-
|
|
3
|
-
Documentacao do pipeline de publicacao automatica no npm.
|
|
4
|
-
|
|
5
|
-
## Como Funciona
|
|
6
|
-
|
|
7
|
-
Ao fazer merge na branch `main`, o GitHub Actions publica automaticamente no npm.
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
develop → main → GitHub Actions → npm publish
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Workflow
|
|
14
|
-
|
|
15
|
-
Arquivo: `.github/workflows/publish.yml`
|
|
16
|
-
|
|
17
|
-
```yaml
|
|
18
|
-
name: Publish to npm
|
|
19
|
-
|
|
20
|
-
on:
|
|
21
|
-
push:
|
|
22
|
-
branches:
|
|
23
|
-
- main
|
|
24
|
-
|
|
25
|
-
jobs:
|
|
26
|
-
publish:
|
|
27
|
-
runs-on: ubuntu-latest
|
|
28
|
-
permissions:
|
|
29
|
-
contents: read
|
|
30
|
-
id-token: write # Necessario para OIDC
|
|
31
|
-
|
|
32
|
-
steps:
|
|
33
|
-
- uses: actions/checkout@v4
|
|
34
|
-
- uses: oven-sh/setup-bun@v2
|
|
35
|
-
- uses: actions/setup-node@v4
|
|
36
|
-
with:
|
|
37
|
-
node-version: "24"
|
|
38
|
-
registry-url: "https://registry.npmjs.org"
|
|
39
|
-
|
|
40
|
-
- run: bun install
|
|
41
|
-
- run: bun run typecheck
|
|
42
|
-
- run: bun run build
|
|
43
|
-
|
|
44
|
-
- name: Publish to npm
|
|
45
|
-
run: npm publish --access public
|
|
46
|
-
env:
|
|
47
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Requisitos
|
|
51
|
-
|
|
52
|
-
### 1. Secret NPM_TOKEN
|
|
53
|
-
|
|
54
|
-
Configurar no GitHub:
|
|
55
|
-
1. Acesse: `Settings > Secrets and variables > Actions`
|
|
56
|
-
2. Criar secret `NPM_TOKEN` com um Granular Access Token do npm
|
|
57
|
-
|
|
58
|
-
Para criar o token no npm:
|
|
59
|
-
1. Acesse: https://www.npmjs.com/settings/tokens
|
|
60
|
-
2. Clique em "Generate New Token" > "Granular Access Token"
|
|
61
|
-
3. Selecione permissao de publish para `@nimbuslab/cli`
|
|
62
|
-
4. Copie o token e adicione como secret no GitHub
|
|
63
|
-
|
|
64
|
-
### 2. Permissoes do Workflow
|
|
65
|
-
|
|
66
|
-
O workflow precisa de:
|
|
67
|
-
- `contents: read` - para checkout
|
|
68
|
-
- `id-token: write` - para OIDC (opcional, mas recomendado)
|
|
69
|
-
|
|
70
|
-
## Fluxo de Release
|
|
71
|
-
|
|
72
|
-
1. Desenvolva na branch `develop`
|
|
73
|
-
2. Atualize a versao no `package.json` e `src/index.ts`
|
|
74
|
-
3. Commit e push: `git push origin develop`
|
|
75
|
-
4. Merge para main:
|
|
76
|
-
```bash
|
|
77
|
-
git checkout main
|
|
78
|
-
git merge develop
|
|
79
|
-
git push origin main
|
|
80
|
-
git checkout develop
|
|
81
|
-
```
|
|
82
|
-
5. GitHub Actions publica automaticamente
|
|
83
|
-
|
|
84
|
-
## Versionamento
|
|
85
|
-
|
|
86
|
-
Seguimos [Semantic Versioning](https://semver.org/):
|
|
87
|
-
|
|
88
|
-
| Tipo | Quando usar | Exemplo |
|
|
89
|
-
|------|-------------|---------|
|
|
90
|
-
| Patch | Bug fixes | 0.6.3 → 0.6.4 |
|
|
91
|
-
| Minor | Novas features | 0.6.3 → 0.7.0 |
|
|
92
|
-
| Major | Breaking changes | 0.6.3 → 1.0.0 |
|
|
93
|
-
|
|
94
|
-
**IMPORTANTE:** Atualizar a versao em DOIS lugares:
|
|
95
|
-
- `package.json` → campo `version`
|
|
96
|
-
- `src/index.ts` → constante `CURRENT_VERSION`
|
|
97
|
-
|
|
98
|
-
## Troubleshooting
|
|
99
|
-
|
|
100
|
-
### Erro: "You cannot publish over the previously published versions"
|
|
101
|
-
|
|
102
|
-
A versao ja foi publicada. Bump a versao e tente novamente.
|
|
103
|
-
|
|
104
|
-
### Erro: "E401 Unauthorized"
|
|
105
|
-
|
|
106
|
-
O token NPM_TOKEN esta invalido ou expirado.
|
|
107
|
-
1. Gere um novo token no npmjs.com
|
|
108
|
-
2. Atualize a secret no GitHub
|
|
109
|
-
|
|
110
|
-
### Erro: "E403 Forbidden"
|
|
111
|
-
|
|
112
|
-
O token nao tem permissao de publish.
|
|
113
|
-
1. Verifique se o token tem permissao para `@nimbuslab/cli`
|
|
114
|
-
2. Verifique se voce e maintainer do pacote
|
|
115
|
-
|
|
116
|
-
### CI passa mas versao nao aparece no npm
|
|
117
|
-
|
|
118
|
-
Isso pode acontecer quando:
|
|
119
|
-
1. **OIDC sem NODE_AUTH_TOKEN**: O OIDC pode falhar silenciosamente
|
|
120
|
-
2. **Trusted Publisher mal configurado**: Verificar no npmjs.com
|
|
121
|
-
|
|
122
|
-
**Solucao**: Sempre usar `NODE_AUTH_TOKEN` como fallback:
|
|
123
|
-
```yaml
|
|
124
|
-
- name: Publish to npm
|
|
125
|
-
run: npm publish --access public
|
|
126
|
-
env:
|
|
127
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Verificar se publicou
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
# Ver ultimas versoes
|
|
134
|
-
curl -s "https://registry.npmjs.org/@nimbuslab/cli" | jq '.versions | keys | .[-5:]'
|
|
135
|
-
|
|
136
|
-
# Ver versao latest
|
|
137
|
-
curl -s "https://registry.npmjs.org/@nimbuslab/cli" | jq -r '.["dist-tags"].latest'
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## OIDC Trusted Publishing (Opcional)
|
|
141
|
-
|
|
142
|
-
O npm suporta autenticacao via OIDC, eliminando necessidade de tokens.
|
|
143
|
-
|
|
144
|
-
### Configuracao no npmjs.com
|
|
145
|
-
|
|
146
|
-
1. Acesse: https://www.npmjs.com/package/@nimbuslab/cli/access
|
|
147
|
-
2. Em "Trusted Publisher", configure:
|
|
148
|
-
- Organization: `nimbuslab`
|
|
149
|
-
- Repository: `cli`
|
|
150
|
-
- Workflow: `publish.yml`
|
|
151
|
-
|
|
152
|
-
### Limitacoes do OIDC
|
|
153
|
-
|
|
154
|
-
- Nao funciona para publicar a versao inicial do pacote
|
|
155
|
-
- Pode falhar silenciosamente em alguns casos
|
|
156
|
-
- Requer `id-token: write` no workflow
|
|
157
|
-
|
|
158
|
-
**Recomendacao**: Mesmo usando OIDC, manter `NODE_AUTH_TOKEN` como fallback.
|
|
159
|
-
|
|
160
|
-
## Historico de Problemas
|
|
161
|
-
|
|
162
|
-
### 2026-01-26: Publicacao falhando silenciosamente
|
|
163
|
-
|
|
164
|
-
**Problema**: CI mostrava sucesso (`+ @nimbuslab/cli@0.6.x`) mas versao nao aparecia no npm. Tarball retornava 404 com mensagem "Access token expired or revoked".
|
|
165
|
-
|
|
166
|
-
**Causa**: OIDC Trusted Publishing falhando silenciosamente. Os tarballs eram criados mas ficavam inacessiveis.
|
|
167
|
-
|
|
168
|
-
**Solucao**: Adicionar `NODE_AUTH_TOKEN` como fallback junto com OIDC.
|
|
169
|
-
|
|
170
|
-
```yaml
|
|
171
|
-
- name: Publish to npm
|
|
172
|
-
run: npm publish --access public
|
|
173
|
-
env:
|
|
174
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
**Importante**: Mesmo com OIDC configurado, SEMPRE manter o `NODE_AUTH_TOKEN` como fallback. O token deve ser do tipo "Granular Access Token" (nao "Classic", que foi deprecado em dez/2025).
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
*Ultima atualizacao: 2026-01-26*
|
package/docs/analyze.md
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
# nimbus analyze
|
|
2
|
-
|
|
3
|
-
Analisa a stack de um projeto existente e sugere melhorias baseadas na stack nimbuslab.
|
|
4
|
-
|
|
5
|
-
## Uso
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Analisar diretorio atual
|
|
9
|
-
nimbus analyze
|
|
10
|
-
|
|
11
|
-
# Analisar diretorio especifico
|
|
12
|
-
nimbus analyze ./meu-projeto
|
|
13
|
-
nimbus analyze ~/www/nimbuslab/projeto
|
|
14
|
-
|
|
15
|
-
# Output em JSON (para automacao)
|
|
16
|
-
nimbus analyze --json
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## O que Detecta
|
|
20
|
-
|
|
21
|
-
### Framework
|
|
22
|
-
- Next.js (com versao)
|
|
23
|
-
- React (standalone)
|
|
24
|
-
- Angular
|
|
25
|
-
- Vue
|
|
26
|
-
- Svelte
|
|
27
|
-
|
|
28
|
-
### Styling
|
|
29
|
-
- Tailwind CSS (com versao)
|
|
30
|
-
- styled-components
|
|
31
|
-
- Emotion
|
|
32
|
-
- Sass/SCSS
|
|
33
|
-
- Less
|
|
34
|
-
- CSS puro
|
|
35
|
-
|
|
36
|
-
### Package Manager
|
|
37
|
-
- bun (recomendado)
|
|
38
|
-
- pnpm
|
|
39
|
-
- npm
|
|
40
|
-
- yarn
|
|
41
|
-
|
|
42
|
-
### Monorepo
|
|
43
|
-
- Turborepo
|
|
44
|
-
- Nx
|
|
45
|
-
- Lerna
|
|
46
|
-
- Workspaces nativo
|
|
47
|
-
|
|
48
|
-
### Autenticacao
|
|
49
|
-
- Better Auth (recomendado)
|
|
50
|
-
- NextAuth / Auth.js
|
|
51
|
-
- Clerk
|
|
52
|
-
- Auth0
|
|
53
|
-
- Supabase Auth
|
|
54
|
-
|
|
55
|
-
### Banco de Dados
|
|
56
|
-
- Drizzle ORM (recomendado)
|
|
57
|
-
- Prisma
|
|
58
|
-
- TypeORM
|
|
59
|
-
- Mongoose
|
|
60
|
-
- pg / mysql2 direto
|
|
61
|
-
|
|
62
|
-
### Outros
|
|
63
|
-
- TypeScript (tsconfig.json)
|
|
64
|
-
- ESLint
|
|
65
|
-
- Prettier
|
|
66
|
-
|
|
67
|
-
## Recomendacoes Automaticas
|
|
68
|
-
|
|
69
|
-
O comando gera recomendacoes baseadas na stack nimbuslab:
|
|
70
|
-
|
|
71
|
-
| Detectado | Recomendacao |
|
|
72
|
-
|-----------|--------------|
|
|
73
|
-
| pnpm/npm/yarn | Migrar para bun |
|
|
74
|
-
| Next.js < 16 | Atualizar para Next.js 16 |
|
|
75
|
-
| React < 19 | Atualizar para React 19 |
|
|
76
|
-
| Tailwind < 4 | Atualizar para Tailwind 4 |
|
|
77
|
-
| Prisma | Considerar Drizzle ORM |
|
|
78
|
-
| NextAuth | Considerar Better Auth |
|
|
79
|
-
| Sem auth | Adicionar autenticacao |
|
|
80
|
-
| Sem DB | Adicionar banco de dados |
|
|
81
|
-
|
|
82
|
-
## Exemplo de Output
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
Analisando projeto...
|
|
86
|
-
|
|
87
|
-
Projeto: meu-app v1.0.0
|
|
88
|
-
|
|
89
|
-
Stack Detectada:
|
|
90
|
-
Framework: nextjs@15.0.2
|
|
91
|
-
Styling: tailwind@3.4.1
|
|
92
|
-
Package Manager: pnpm
|
|
93
|
-
TypeScript: sim
|
|
94
|
-
Monorepo: turborepo
|
|
95
|
-
Auth: next-auth
|
|
96
|
-
Database: prisma
|
|
97
|
-
|
|
98
|
-
Recomendacoes:
|
|
99
|
-
1. Migrar pnpm -> bun (nimbus codemod bun)
|
|
100
|
-
2. Atualizar Next.js 15 -> 16 (nimbus upgrade next)
|
|
101
|
-
3. Atualizar React 18 -> 19 (nimbus upgrade react)
|
|
102
|
-
4. Atualizar Tailwind 3 -> 4 (nimbus upgrade tailwind)
|
|
103
|
-
5. Considerar migrar Prisma -> Drizzle (nimbus codemod drizzle)
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Output JSON
|
|
107
|
-
|
|
108
|
-
Com `--json`, retorna estrutura para automacao:
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"name": "meu-app",
|
|
113
|
-
"version": "1.0.0",
|
|
114
|
-
"framework": "nextjs",
|
|
115
|
-
"frameworkVersion": "15.0.2",
|
|
116
|
-
"styling": ["tailwind@3.4.1"],
|
|
117
|
-
"packageManager": "pnpm",
|
|
118
|
-
"monorepo": "turborepo",
|
|
119
|
-
"auth": "next-auth",
|
|
120
|
-
"database": "prisma",
|
|
121
|
-
"typescript": true,
|
|
122
|
-
"recommendations": [
|
|
123
|
-
"Migrar pnpm -> bun",
|
|
124
|
-
"Atualizar Next.js 15 -> 16"
|
|
125
|
-
]
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
## Integracao com Outros Comandos
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
# Analisar e depois ver plano de upgrade
|
|
133
|
-
nimbus analyze
|
|
134
|
-
nimbus upgrade --plan
|
|
135
|
-
|
|
136
|
-
# Pipeline completo
|
|
137
|
-
nimbus analyze ./projeto && nimbus upgrade --plan
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Limitacoes
|
|
141
|
-
|
|
142
|
-
- Analisa apenas `package.json` e arquivos de config
|
|
143
|
-
- Nao analisa codigo-fonte
|
|
144
|
-
- Requer projeto Node.js (package.json)
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
[Voltar ao README](../README.md) | [create](./create.md) | [upgrade](./upgrade.md) | [migrate](./migrate.md)
|