@justmpm/ai-tool 0.6.0 → 0.7.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/README.md +53 -3
- package/dist/{chunk-UDT7TLSN.js → chunk-CRVOX3U4.js} +731 -25
- package/dist/cli.js +17 -6
- package/dist/index.d.ts +229 -4
- package/dist/index.js +5 -1
- package/dist/{server-VKLU25E2.js → server-SZHX26N6.js} +44 -4
- package/package.json +1 -1
- package/dist/chunk-M7JM3XRW.js +0 -219
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ Ideal para entender rapidamente a API publica de um arquivo.
|
|
|
124
124
|
|
|
125
125
|
### `find` - Busca de Simbolos
|
|
126
126
|
|
|
127
|
-
Busca simbolos no codigo (funcoes, tipos, componentes, hooks, constantes).
|
|
127
|
+
Busca simbolos no codigo (funcoes, tipos, componentes, hooks, constantes, triggers).
|
|
128
128
|
|
|
129
129
|
```bash
|
|
130
130
|
ai-tool find useAuth # Definicao + usos
|
|
@@ -132,18 +132,63 @@ ai-tool find User --type=type # Busca apenas tipos
|
|
|
132
132
|
ai-tool find login --area=auth # Busca na area auth
|
|
133
133
|
ai-tool find submit --def # Apenas definicoes
|
|
134
134
|
ai-tool find submit --refs # Apenas referencias/usos
|
|
135
|
+
ai-tool find createUser --type=trigger # Busca Cloud Functions
|
|
135
136
|
```
|
|
136
137
|
|
|
137
138
|
**Tipos de simbolos:**
|
|
138
|
-
- `function` - Funcoes e arrow functions
|
|
139
|
+
- `function` - Funcoes e arrow functions (inclui triggers)
|
|
139
140
|
- `type` - Types, interfaces e enums
|
|
140
141
|
- `const` - Constantes e variaveis
|
|
141
142
|
- `component` - Componentes React (funcao que retorna JSX)
|
|
142
143
|
- `hook` - React hooks (funcao que comeca com `use`)
|
|
144
|
+
- `trigger` - Firebase Cloud Functions (onCall, onDocumentCreated, etc.)
|
|
143
145
|
- `all` - Todos os tipos (default)
|
|
144
146
|
|
|
145
147
|
**Diferente de grep:** Entende o AST do TypeScript, encontra definicoes reais e onde sao usados.
|
|
146
148
|
|
|
149
|
+
### `functions` - Firebase Cloud Functions
|
|
150
|
+
|
|
151
|
+
Lista todas as Cloud Functions do projeto Firebase.
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
ai-tool functions # Lista todas as functions
|
|
155
|
+
ai-tool functions --trigger=onCall # Filtra por tipo de trigger
|
|
156
|
+
ai-tool functions --format=json
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Output:**
|
|
160
|
+
```
|
|
161
|
+
⚡ CLOUD FUNCTIONS
|
|
162
|
+
|
|
163
|
+
📊 RESUMO
|
|
164
|
+
Total: 12 functions
|
|
165
|
+
Exportadas: 10
|
|
166
|
+
|
|
167
|
+
🌐 onCall (4)
|
|
168
|
+
createCheckoutSession
|
|
169
|
+
functions/src/stripe.ts:99
|
|
170
|
+
|
|
171
|
+
⏰ onSchedule (2)
|
|
172
|
+
dailyCleanup
|
|
173
|
+
functions/src/cron.ts:10
|
|
174
|
+
schedule: every day 00:00
|
|
175
|
+
|
|
176
|
+
🔥 onDocumentCreated (3)
|
|
177
|
+
onUserCreated
|
|
178
|
+
functions/src/users.ts:25
|
|
179
|
+
path: users/{userId}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Triggers suportados (40+):**
|
|
183
|
+
- HTTPS: `onCall`, `onRequest`
|
|
184
|
+
- Firestore: `onDocumentCreated`, `onDocumentUpdated`, `onDocumentDeleted`, `onDocumentWritten` (+ variantes WithAuthContext)
|
|
185
|
+
- Realtime Database: `onValueCreated`, `onValueUpdated`, `onValueDeleted`, `onValueWritten`
|
|
186
|
+
- Scheduler: `onSchedule`
|
|
187
|
+
- Storage: `onObjectFinalized`, `onObjectArchived`, `onObjectDeleted`, `onMetadataUpdated`
|
|
188
|
+
- Pub/Sub: `onMessagePublished`
|
|
189
|
+
- Identity: `beforeUserCreated`, `beforeUserSignedIn`, `beforeEmailSent`, `beforeSmsSent`
|
|
190
|
+
- E mais: Crashlytics, Performance, Remote Config, Eventarc, Tasks, Test Lab
|
|
191
|
+
|
|
147
192
|
### `areas` - Areas/Dominios Funcionais
|
|
148
193
|
|
|
149
194
|
Lista todas as areas funcionais do projeto (auth, dashboard, stripe, etc).
|
|
@@ -246,6 +291,7 @@ ai-tool --mcp
|
|
|
246
291
|
- `aitool_areas_init` - Gera config de areas
|
|
247
292
|
- `aitool_area_context` - Contexto consolidado de toda uma area
|
|
248
293
|
- `aitool_find` - Busca simbolos no codigo (definicao + usos)
|
|
294
|
+
- `aitool_list_functions` - Lista Cloud Functions Firebase
|
|
249
295
|
|
|
250
296
|
### Configuracao Claude Code
|
|
251
297
|
|
|
@@ -283,7 +329,7 @@ Adicione ao `claude_desktop_config.json`:
|
|
|
283
329
|
## Uso Programatico
|
|
284
330
|
|
|
285
331
|
```typescript
|
|
286
|
-
import { map, dead, impact, suggest, context, areaContext, find, areas, area, areasInit } from "@justmpm/ai-tool";
|
|
332
|
+
import { map, dead, impact, suggest, context, areaContext, find, functions, areas, area, areasInit } from "@justmpm/ai-tool";
|
|
287
333
|
|
|
288
334
|
// Mapa do projeto (resumo por padrao, full: true para lista completa)
|
|
289
335
|
const projectMap = await map({ format: "json" });
|
|
@@ -307,6 +353,9 @@ const authContext = await areaContext("auth", { format: "json" });
|
|
|
307
353
|
// Busca de simbolos
|
|
308
354
|
const symbolSearch = await find("useAuth", { type: "hook", area: "auth" });
|
|
309
355
|
|
|
356
|
+
// Cloud Functions Firebase
|
|
357
|
+
const cloudFunctions = await functions({ trigger: "onCall" });
|
|
358
|
+
|
|
310
359
|
// Areas funcionais
|
|
311
360
|
const projectAreas = await areas({ format: "json" });
|
|
312
361
|
|
|
@@ -348,6 +397,7 @@ await areasInit({ force: false });
|
|
|
348
397
|
| `type` | Tipos TypeScript |
|
|
349
398
|
| `config` | Configuracoes |
|
|
350
399
|
| `test` | Testes |
|
|
400
|
+
| `cloud-function` | Firebase Cloud Functions |
|
|
351
401
|
| `other` | Outros |
|
|
352
402
|
|
|
353
403
|
## Cache
|