plutin 1.7.7 → 1.7.11
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/dist/index.cjs +2564 -10077
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +338 -162
- package/dist/index.d.ts +338 -162
- package/dist/index.mjs +2529 -10077
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -16
- package/readme.md +36 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plutin",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.11",
|
|
4
4
|
"description": "Plutin lib",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -66,26 +66,29 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@fastify/cors": "11.0.1",
|
|
68
68
|
"@sentry/node": "9.13.0",
|
|
69
|
-
"@
|
|
70
|
-
"@opentelemetry/api
|
|
71
|
-
"@opentelemetry/
|
|
72
|
-
"@opentelemetry/
|
|
73
|
-
"@opentelemetry/exporter-
|
|
74
|
-
"@opentelemetry/
|
|
75
|
-
"@opentelemetry/
|
|
76
|
-
"@opentelemetry/
|
|
77
|
-
"@opentelemetry/
|
|
78
|
-
"@opentelemetry/
|
|
79
|
-
"@opentelemetry/
|
|
80
|
-
"
|
|
69
|
+
"@fastify/otel": "0.14.0",
|
|
70
|
+
"@opentelemetry/api": "^1.9.0",
|
|
71
|
+
"@opentelemetry/api-logs": "^0.52.1",
|
|
72
|
+
"@opentelemetry/auto-instrumentations-node": "^0.48.0",
|
|
73
|
+
"@opentelemetry/exporter-logs-otlp-http": "^0.52.1",
|
|
74
|
+
"@opentelemetry/exporter-metrics-otlp-http": "0.52.1",
|
|
75
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.52.1",
|
|
76
|
+
"@opentelemetry/instrumentation-http": "0.52.1",
|
|
77
|
+
"@opentelemetry/otlp-exporter-base": "0.208.0",
|
|
78
|
+
"@opentelemetry/resources": "^1.25.1",
|
|
79
|
+
"@opentelemetry/sdk-logs": "^0.52.1",
|
|
80
|
+
"@opentelemetry/sdk-metrics": "1.25.1",
|
|
81
|
+
"@opentelemetry/sdk-node": "0.52.1",
|
|
82
|
+
"@opentelemetry/sdk-trace-node": "^1.25.1",
|
|
83
|
+
"@opentelemetry/semantic-conventions": "^1.25.1",
|
|
84
|
+
"pino": "10.1.0",
|
|
85
|
+
"pino-pretty": "13.1.2",
|
|
81
86
|
"bson": "6.10.3",
|
|
82
87
|
"cors": "2.8.5",
|
|
83
88
|
"discord-webhook-node": "1.1.8",
|
|
84
|
-
"express": "5.1.0",
|
|
85
89
|
"fastify": "5.2.2",
|
|
86
|
-
"kleur": "4.1.5",
|
|
87
90
|
"qs": "6.14.0",
|
|
88
91
|
"reflect-metadata": "0.2.2",
|
|
89
92
|
"zod": "3.24.3"
|
|
90
93
|
}
|
|
91
|
-
}
|
|
94
|
+
}
|
package/readme.md
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
### Fluxo completo:
|
|
1
|
+
### Fluxo completo (Publicação Automática):
|
|
2
2
|
|
|
3
3
|
- Mudanças no código.
|
|
4
|
-
- Atualiza a versão no package.json
|
|
5
|
-
- Comita
|
|
6
|
-
- Cria e envia uma tag:
|
|
4
|
+
- Atualiza a versão no `package.json`.
|
|
5
|
+
- Comita e faz push para `master` ou `main`:
|
|
7
6
|
|
|
7
|
+
```bash
|
|
8
|
+
git add .
|
|
9
|
+
git commit -m "feat: nova funcionalidade"
|
|
10
|
+
git push origin master
|
|
8
11
|
```
|
|
9
|
-
git tag v1.2.0
|
|
10
|
-
git push origin v1.2.0
|
|
11
|
-
```
|
|
12
12
|
|
|
13
|
-
O CI
|
|
13
|
+
O CI detecta automaticamente a nova versão e:
|
|
14
|
+
|
|
15
|
+
- ✅ Executa os testes
|
|
16
|
+
- ✅ Faz o build do projeto
|
|
17
|
+
- ✅ Publica no NPM (se a versão ainda não existir)
|
|
18
|
+
- ✅ Cria uma tag Git automaticamente (ex: `v1.2.0`)
|
|
19
|
+
|
|
20
|
+
**Nota:** O workflow também funciona com tags manuais (`git push origin v1.2.0`).
|
|
14
21
|
|
|
15
22
|
### Commits
|
|
16
23
|
|
|
@@ -35,31 +42,30 @@ Quando usar
|
|
|
35
42
|
- 1.1.1: Corrigiu bugs sem mudar funcionalidade
|
|
36
43
|
- 2.0.0: Mudança que quebra compatibilidade
|
|
37
44
|
|
|
45
|
+
### Configuração do NPM Token (GitHub Actions)
|
|
46
|
+
|
|
47
|
+
Para que a publicação automática funcione, você precisa configurar um token do NPM no GitHub:
|
|
48
|
+
|
|
49
|
+
1. **Criar um token no NPM:**
|
|
50
|
+
|
|
51
|
+
- Acesse: https://www.npmjs.com/settings/[seu-usuario]/tokens
|
|
52
|
+
- Clique em "Generate New Token"
|
|
53
|
+
- Escolha "Granular Access Token" (recomendado)
|
|
54
|
+
- Configure as permissões: **Read & Write** para o pacote `plutin`
|
|
55
|
+
- Copie o token gerado
|
|
56
|
+
|
|
57
|
+
2. **Adicionar o token no GitHub:**
|
|
58
|
+
- Vá para: `Settings` > `Secrets and variables` > `Actions` no seu repositório
|
|
59
|
+
- Clique em "New repository secret"
|
|
60
|
+
- Nome: `NPM_TOKEN`
|
|
61
|
+
- Valor: Cole o token copiado do NPM
|
|
62
|
+
- Salve
|
|
63
|
+
|
|
64
|
+
**Importante:** Tokens granulares têm validade de 90 dias e exigem 2FA. Atualize o token antes de expirar.
|
|
65
|
+
|
|
38
66
|
### Padrões
|
|
39
67
|
|
|
40
68
|
Body - camelCase - snake_case
|
|
41
69
|
Query - camelCase - snake_case
|
|
42
70
|
Path (URLs) - kebab-case - snake_case
|
|
43
71
|
Headers - kebab-case (lowercase)
|
|
44
|
-
|
|
45
|
-
### Steps
|
|
46
|
-
|
|
47
|
-
[x] publish in npm (automatic)
|
|
48
|
-
[x] adapters (express, fastify)
|
|
49
|
-
[x] controller decorator
|
|
50
|
-
[x] create validator (sync)
|
|
51
|
-
[TEMPLATE] Unit of Work (repositories)
|
|
52
|
-
[TEMPLATE] config to test e2e
|
|
53
|
-
[TEMPLATE] import paths with '@/'
|
|
54
|
-
[x] controller receive error agente (sentry)
|
|
55
|
-
[x] controller receive error agente (discord)
|
|
56
|
-
[ ] create doc via DTO (zod?)
|
|
57
|
-
[x] execute middlewares. Pass in decorator Http?
|
|
58
|
-
[ ] remove dependencies to start server unnecessary (ts-node, ts-node-dev, vite-node)
|
|
59
|
-
[ ] 100% coverage tests
|
|
60
|
-
|
|
61
|
-
Otel
|
|
62
|
-
|
|
63
|
-
- tracer deveria ser desdo inicio da requisicao
|
|
64
|
-
- devemos verificar se ja existe um traceId vindo da request
|
|
65
|
-
- pensar se o trace deveria passar em controller -> use case -> gateway
|