@mocoto/mahoraga 0.14.9 → 0.15.1
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 +263 -30
- package/dist/analysts/js-ts/registrar.js +1 -1
- package/dist/analysts/react/analysts/analyst-react-hooks.js +30 -15
- package/dist/analysts/react/analysts/analyst-react.js +4 -2
- package/dist/analysts/react/detectors/detector-react-best-practices.js +7 -4
- package/dist/caretakers/caretaker-imports.js +0 -9
- package/dist/cli/commands/command-github-actions.js +0 -27
- package/dist/core/messages/en/cli/cli-command-github-actions-messages.js +0 -5
- package/dist/core/messages/en/github/index.js +0 -1
- package/dist/core/messages/ja/cli/cli-command-github-actions-messages.js +0 -5
- package/dist/core/messages/ja/github/index.js +0 -1
- package/dist/core/messages/pt/cli/cli-command-github-actions-messages.js +0 -5
- package/dist/core/messages/pt/github/index.js +0 -1
- package/dist/core/messages/zh/cli/cli-command-github-actions-messages.js +0 -5
- package/dist/core/messages/zh/github/index.js +0 -1
- package/dist/core/registry/file-registry.js +1 -1
- package/dist/node.loader.js +0 -2
- package/dist/shared/formatters/formatters/commons.js +36 -10
- package/dist/shared/formatters/formatters/shell.js +6 -3
- package/dist/types/analysts/index.js +1 -1
- package/docs/.obsidian/app.json +7 -0
- package/docs/.obsidian/appearance.json +8 -0
- package/docs/.obsidian/community-plugins.json +28 -0
- package/docs/.obsidian/core-plugins-migration.json +18 -0
- package/docs/.obsidian/core-plugins.json +73 -0
- package/docs/.obsidian/graph.json +22 -0
- package/docs/.obsidian/workspace.json +196 -0
- package/docs/01-arquitetura/ADR-001-estrutura-testes.md +31 -0
- package/docs/01-arquitetura/_index.md +152 -0
- package/docs/02-componentes/_index.md +294 -0
- package/docs/02-componentes/supressao-inline.md +88 -0
- package/docs/03-guias/_index.md +173 -0
- package/docs/03-guias/contribuindo.md +71 -0
- package/docs/03-guias/testes.md +133 -0
- package/docs/04-glossario/_index.md +29 -0
- package/docs/04-glossario/termos.md +247 -0
- package/docs/05-referencias/_index.md +87 -0
- package/docs/_home.md +140 -0
- package/docs/partials/AVISO-PROVENIENCIA.md +3 -0
- package/docs/templates/ADR.md +24 -0
- package/docs/templates/componente.md +34 -0
- package/docs/templates/guia.md +28 -0
- package/package.json +31 -32
- package/dist/app/github.js +0 -14
- package/dist/app/index.js +0 -1
- package/dist/core/messages/en/github/github-app-messages.js +0 -9
- package/dist/core/messages/ja/github/github-app-messages.js +0 -9
- package/dist/core/messages/pt/github/github-app-messages.js +0 -9
- package/dist/core/messages/zh/github/github-app-messages.js +0 -9
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
Proveniência e Autoria: Este documento integra o projeto @mocoto/mahoraga (licença MIT-0).
|
|
3
|
+
tags: [moc, referencias]
|
|
4
|
+
created: 2026-07-24
|
|
5
|
+
updated: 2026-07-25
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Referências
|
|
9
|
+
|
|
10
|
+
## Links Externos
|
|
11
|
+
|
|
12
|
+
### Dependências Principais
|
|
13
|
+
|
|
14
|
+
| Biblioteca | Uso | Link |
|
|
15
|
+
|------------|-----|------|
|
|
16
|
+
| Commander.js | CLI framework | https://github.com/tj/commander.js |
|
|
17
|
+
| Vitest | Test framework | https://vitest.dev/ |
|
|
18
|
+
| TypeScript | Linguagem | https://www.typescriptlang.org/ |
|
|
19
|
+
| Babel | AST Parser | https://babel.dev/ |
|
|
20
|
+
| postcss | CSS Parser | https://postcss.org/ |
|
|
21
|
+
| htmlparser2 | HTML Parser | https://github.com/fb55/htmlparser2 |
|
|
22
|
+
| fast-xml-parser | XML Parser | https://github.com/NaturalIntelligence/fast-xml-parser |
|
|
23
|
+
| openpgp | GPG/Cryptography | https://openpgpjs.org/ |
|
|
24
|
+
| chalk | Terminal colors | https://github.com/chalk/chalk |
|
|
25
|
+
| ora | Terminal spinners | https://github.com/sindresorhus/ora |
|
|
26
|
+
| p-limit | Concurrency | https://github.com/sindresorhus/p-limit |
|
|
27
|
+
| micromatch | Glob matching | https://github.com/micromatch/micromatch |
|
|
28
|
+
| yaml | YAML parser | https://eemeli.org/yaml/ |
|
|
29
|
+
| xxhashjs | Hashing | https://github.com/pierrec/js-xxhash |
|
|
30
|
+
| dotenv | Environment vars | https://github.com/motdotla/dotenv |
|
|
31
|
+
|
|
32
|
+
### Convenções e Standards
|
|
33
|
+
|
|
34
|
+
| Recurso | Link |
|
|
35
|
+
|---------|------|
|
|
36
|
+
| Conventional Commits | https://www.conventionalcommits.org/ |
|
|
37
|
+
| MIT-0 License | https://opensource.org/license/mit-0 |
|
|
38
|
+
| SPDX Specification | https://spdx.dev/ |
|
|
39
|
+
| ISO 27001 | https://www.iso.org/standard/27001 |
|
|
40
|
+
| SOC 2 | https://www.aicpa-cima.com/topic/audit-assurance/audit-and-assurance/soc-2 |
|
|
41
|
+
| Obsidian | https://obsidian.md/ |
|
|
42
|
+
|
|
43
|
+
## Recursos do Projeto
|
|
44
|
+
|
|
45
|
+
| Arquivo | Conteúdo |
|
|
46
|
+
|---------|----------|
|
|
47
|
+
| `AGENTS.md` | Instruções mestre para agentes de IA |
|
|
48
|
+
| `README.md` | README principal do projeto |
|
|
49
|
+
| `package.json` | Dependências, scripts, configurações |
|
|
50
|
+
| `tsconfig.json` | Configuração TypeScript (paths, strict, ES2024) |
|
|
51
|
+
| `vitest.config.ts` | Configuração de testes e aliases |
|
|
52
|
+
| `eslint.config.js` | Configuração ESLint |
|
|
53
|
+
| `THIRD-PARTY-NOTICES.txt` | Atribuições de licenças |
|
|
54
|
+
| `.github/workflows/ci.yml` | CI pipeline |
|
|
55
|
+
| `.github/workflows/publish.yml` | Publicação no npm |
|
|
56
|
+
| `LICENSE` | Licença MIT-0 |
|
|
57
|
+
| `SKILLS.md` | Índice de skills para agentes de IA |
|
|
58
|
+
|
|
59
|
+
## Arquivos de Configuração
|
|
60
|
+
|
|
61
|
+
### tsconfig.json (destaques)
|
|
62
|
+
|
|
63
|
+
- **target:** ES2024
|
|
64
|
+
- **module:** NodeNext
|
|
65
|
+
- **moduleResolution:** NodeNext
|
|
66
|
+
- **strict:** true
|
|
67
|
+
- **verbatimModuleSyntax:** true
|
|
68
|
+
- **paths:** ~160+ aliases internos (`@core/*`, `@cli/*`, `@analysts/*`, etc.)
|
|
69
|
+
|
|
70
|
+
### vitest.config.ts (destaques)
|
|
71
|
+
|
|
72
|
+
- **provider:** v8 coverage
|
|
73
|
+
- **aliases:** mesmos paths do tsconfig
|
|
74
|
+
- **include:** `tests/**/*.test.ts`
|
|
75
|
+
- **coverage exclude:** coverage, dist, `*.d.ts`, node_modules, tests
|
|
76
|
+
|
|
77
|
+
## Comandos npm
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm run build # compilar TypeScript
|
|
81
|
+
npm run typecheck # verificar tipos
|
|
82
|
+
npm test # rodar testes
|
|
83
|
+
npm run coverage # cobertura de testes
|
|
84
|
+
npm run lint # ESLint
|
|
85
|
+
npm run formatar # auto-formatação
|
|
86
|
+
npm run diagnosticar # auto-análise do mahoraga
|
|
87
|
+
```
|
package/docs/_home.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
Proveniência e Autoria: Este documento integra o projeto @mocoto/mahoraga (licença MIT-0).
|
|
3
|
+
tags: [moc, index]
|
|
4
|
+
created: 2026-07-24
|
|
5
|
+
updated: 2026-07-25
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# @mocoto/mahoraga: Documentação Viva
|
|
9
|
+
|
|
10
|
+
CLI modular para análise, diagnóstico e manutenção de projetos JavaScript/TypeScript e multi-stack leve.
|
|
11
|
+
|
|
12
|
+
## Navegação
|
|
13
|
+
|
|
14
|
+
| Área | Descrição |
|
|
15
|
+
| ---------------------------------- | ------------------ | ------------------------------------------------------------ |
|
|
16
|
+
| [[01-arquitetura/_index\ | Arquitetura]] | Decisões arquiteturais, ADRs, diagramas, fluxos |
|
|
17
|
+
| [[02-componentes/_index\ | Componentes]] | Documentação de todos os módulos do sistema |
|
|
18
|
+
| [[02-componentes/supressao-inline\ | Supressão Inline]] | Sistema de `@mahoraga-disable` para analistas e formatadores |
|
|
19
|
+
| [[03-guias/_index\ | Guias]] | Guias de contribuição, testes, CLI, debug |
|
|
20
|
+
| [[04-glossario/_index\ | Glossário]] | Termos do domínio e conceitos |
|
|
21
|
+
| [[05-referencias/_index\ | Referências]] | Links externos, specs, recursos |
|
|
22
|
+
|
|
23
|
+
## Visão Geral
|
|
24
|
+
|
|
25
|
+
Mahoraga é uma ferramenta CLI que funciona como "médico de projetos": analisa código fonte, detecta problemas de qualidade, segurança e arquitetura, e oferece correções automatizadas. Suporta múltiplas linguagens (JS, TS, React, CSS, HTML, Python, Shell, SQL, Go, Rust, PHP) e plataformas de CI/CD (GitHub Actions, GitLab CI, CircleCI, Jenkins, Azure Pipelines).
|
|
26
|
+
|
|
27
|
+
## Stack
|
|
28
|
+
|
|
29
|
+
- **Runtime:** Node.js >=24.16.0
|
|
30
|
+
- **Linguagem:** TypeScript (ES2024, NodeNext)
|
|
31
|
+
- **Build:** tsc + tsc-alias
|
|
32
|
+
- **Testes:** Vitest v4 + v8 coverage
|
|
33
|
+
- **CLI:** Commander.js
|
|
34
|
+
- **Parser:** Babel (AST), postcss, htmlparser2, fast-xml-parser
|
|
35
|
+
- **GPG:** openpgp (Ed25519)
|
|
36
|
+
- **i18n:** pt, en, zh, ja
|
|
37
|
+
- **Licença:** MIT-0
|
|
38
|
+
|
|
39
|
+
## Snapshot do Projeto
|
|
40
|
+
|
|
41
|
+
| Métrica | Valor |
|
|
42
|
+
|---------|-------|
|
|
43
|
+
| Versão | 0.15.1 |
|
|
44
|
+
| Comandos CLI | 27 |
|
|
45
|
+
| Arquivos de teste | ~230 |
|
|
46
|
+
| Testes | ~3200 |
|
|
47
|
+
| Cobertura (statements) | ~47% |
|
|
48
|
+
| Source lines | ~22k |
|
|
49
|
+
| Diretórios em `src/` | 15+ |
|
|
50
|
+
| Analisadores de linguagem | 11 |
|
|
51
|
+
| Analisadores de CI/CD | 5 |
|
|
52
|
+
| Línguas suportadas | 4 (pt, en, zh, ja) |
|
|
53
|
+
|
|
54
|
+
## Arquitetura em Camadas
|
|
55
|
+
|
|
56
|
+
```mermaid
|
|
57
|
+
flowchart TB
|
|
58
|
+
subgraph Entry
|
|
59
|
+
bin["src/bin/index.ts<br/>Entry Point"]
|
|
60
|
+
end
|
|
61
|
+
subgraph CLI["CLI Layer<br/>src/cli/"]
|
|
62
|
+
CMDS["27 comandos<br/>Commander.js"]
|
|
63
|
+
DIAG["Diagnóstico"]
|
|
64
|
+
HELP["Helpers"]
|
|
65
|
+
end
|
|
66
|
+
subgraph CORE["Core Layer<br/>src/core/"]
|
|
67
|
+
EXEC["Execução<br/>Scanner / Workers"]
|
|
68
|
+
CONF["Config"]
|
|
69
|
+
PARSE["Parsing<br/>Babel + langs"]
|
|
70
|
+
I18N["i18n<br/>pt/en/zh/ja"]
|
|
71
|
+
CORR["Correções"]
|
|
72
|
+
end
|
|
73
|
+
subgraph ANALYSTS["Analysis Layer<br/>src/analysts/"]
|
|
74
|
+
DETECT["Detectores<br/>15+ especializados"]
|
|
75
|
+
LANG["Analisadores<br/>11 linguagens"]
|
|
76
|
+
CICD["Analisadores<br/>5 plataformas CI/CD"]
|
|
77
|
+
PLUGINS["Plugins"]
|
|
78
|
+
end
|
|
79
|
+
subgraph SERVICES["Service Layer"]
|
|
80
|
+
GUARDIAN["Guardian<br/>Integridade GPG"]
|
|
81
|
+
LICENSES["Licenças<br/>SPDX + scanner"]
|
|
82
|
+
VULN["Vulnerabilidades<br/>npm audit"]
|
|
83
|
+
CARETAKERS["Caretakers<br/>Transformações"]
|
|
84
|
+
REPORTS["Relatórios<br/>Compliance + Advisor"]
|
|
85
|
+
end
|
|
86
|
+
subgraph SHARED["Shared Layer<br/>src/shared/"]
|
|
87
|
+
FORM["Formatters"]
|
|
88
|
+
PERSIST["Persistência"]
|
|
89
|
+
VAL["Validação"]
|
|
90
|
+
MP["Marketplace"]
|
|
91
|
+
end
|
|
92
|
+
subgraph TYPES["Types<br/>src/types/"]
|
|
93
|
+
TINDEX["14 namespaces"]
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
bin --> CLI
|
|
97
|
+
CLI --> CORE
|
|
98
|
+
CORE --> ANALYSTS
|
|
99
|
+
CORE --> SERVICES
|
|
100
|
+
SERVICES --> SHARED
|
|
101
|
+
ANALYSTS --> SHARED
|
|
102
|
+
CORE --> TYPES
|
|
103
|
+
ANALYSTS --> TYPES
|
|
104
|
+
SERVICES --> TYPES
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Comandos Rápidos
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Diagnóstico
|
|
111
|
+
mahoraga diagnosticar # análise padrão
|
|
112
|
+
mahoraga diagnosticar --full # completa
|
|
113
|
+
mahoraga diagnosticar --fast # rápida
|
|
114
|
+
mahoraga diagnosticar --json # JSON output
|
|
115
|
+
|
|
116
|
+
# Integridade
|
|
117
|
+
mahoraga guardian # verificar integridade
|
|
118
|
+
mahoraga guardian --accept-baseline # aceitar baseline
|
|
119
|
+
|
|
120
|
+
# CI/CD
|
|
121
|
+
mahoraga github-actions scan
|
|
122
|
+
mahoraga gitlab-ci scan
|
|
123
|
+
mahoraga circleci scan
|
|
124
|
+
mahoraga convert --from github --to gitlab
|
|
125
|
+
|
|
126
|
+
# Licenças
|
|
127
|
+
mahoraga licencas scan
|
|
128
|
+
mahoraga licencas notices generate
|
|
129
|
+
mahoraga licencas disclaimer add
|
|
130
|
+
|
|
131
|
+
# Manutenção
|
|
132
|
+
mahoraga formatar --write
|
|
133
|
+
mahoraga podar
|
|
134
|
+
mahoraga fix-types --target src
|
|
135
|
+
mahoraga imports --scan
|
|
136
|
+
|
|
137
|
+
# Compliance
|
|
138
|
+
mahoraga compliance report iso-27001
|
|
139
|
+
mahoraga compliance report soc2
|
|
140
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
Proveniência e Autoria: Este documento integra o projeto @mocoto/mahoraga (licença MIT-0).
|
|
3
|
+
tags: [adr]
|
|
4
|
+
status: proposto | aceito | deprecated
|
|
5
|
+
created: {{date}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# ADR-NNN: Título da Decisão
|
|
9
|
+
|
|
10
|
+
## Contexto
|
|
11
|
+
|
|
12
|
+
<!-- Por que essa decisão foi necessária? Qual problema resolve? -->
|
|
13
|
+
|
|
14
|
+
## Decisão
|
|
15
|
+
|
|
16
|
+
<!-- O que foi decidido? Qual caminho foi escolhido? -->
|
|
17
|
+
|
|
18
|
+
## Consequências
|
|
19
|
+
|
|
20
|
+
<!-- Impactos positivos e negativos da decisão -->
|
|
21
|
+
|
|
22
|
+
## Alternativas Consideradas
|
|
23
|
+
|
|
24
|
+
<!-- Quais outras opções foram avaliadas e por que foram descartadas? -->
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
Proveniência e Autoria: Este documento integra o projeto @mocoto/mahoraga (licença MIT-0).
|
|
3
|
+
tags: [componente]
|
|
4
|
+
status: rascunho
|
|
5
|
+
created: {{date}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Nome do Componente
|
|
9
|
+
|
|
10
|
+
## Propósito
|
|
11
|
+
|
|
12
|
+
<!-- O que este componente faz? Qual problema resolve? -->
|
|
13
|
+
|
|
14
|
+
## Dependências
|
|
15
|
+
|
|
16
|
+
- Entrada: <!-- o que ele recebe -->
|
|
17
|
+
- Saída: <!-- o que ele produz -->
|
|
18
|
+
- Importa de: <!-- módulos que usa -->
|
|
19
|
+
|
|
20
|
+
## API Pública
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
// Assinaturas principais
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Exemplo de Uso
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Testes
|
|
33
|
+
|
|
34
|
+
<!-- Onde estão os testes e como rodá-los -->
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
Proveniência e Autoria: Este documento integra o projeto @mocoto/mahoraga (licença MIT-0).
|
|
3
|
+
tags: [guia]
|
|
4
|
+
status: rascunho
|
|
5
|
+
created: {{date}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Título do Guia
|
|
9
|
+
|
|
10
|
+
## Objetivo
|
|
11
|
+
|
|
12
|
+
<!-- O que este guia ensina? -->
|
|
13
|
+
|
|
14
|
+
## Passo a Passo
|
|
15
|
+
|
|
16
|
+
1. <!-- passo 1 -->
|
|
17
|
+
2. <!-- passo 2 -->
|
|
18
|
+
3. <!-- passo 3 -->
|
|
19
|
+
|
|
20
|
+
## Exemplos
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Comandos de exemplo
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Referências
|
|
27
|
+
|
|
28
|
+
- Links para notas relacionadas
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mocoto/mahoraga",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "C.L.I modular para análise, diagnóstico e manutenção de projetos JavaScript/TypeScript e multi-stack leve",
|
|
6
6
|
"author": "Italo Lopes",
|
|
@@ -23,59 +23,58 @@
|
|
|
23
23
|
"start": "mahoraga",
|
|
24
24
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
25
25
|
"lint": "eslint src",
|
|
26
|
+
"security:lint": "npm run lint",
|
|
27
|
+
"security-check": "npm audit --production --audit-level=moderate",
|
|
26
28
|
"test": "vitest run --passWithNoTests",
|
|
27
29
|
"coverage": "vitest run --coverage",
|
|
30
|
+
|
|
28
31
|
"diagnosticar": "mahoraga diagnosticar",
|
|
32
|
+
"analistas": "mahoraga analistas",
|
|
33
|
+
"metricas": "mahoraga metricas",
|
|
34
|
+
"vulnerabilidades": "mahoraga vulnerabilidades scan",
|
|
35
|
+
|
|
29
36
|
"imports": "mahoraga imports",
|
|
30
37
|
"imports:scan": "mahoraga imports --scan",
|
|
31
38
|
"imports:apply": "mahoraga imports --apply",
|
|
39
|
+
"names": "mahoraga names",
|
|
40
|
+
"names:scan": "mahoraga names --scan",
|
|
41
|
+
"names:apply": "mahoraga names --apply",
|
|
42
|
+
"barrels": "mahoraga barrels",
|
|
43
|
+
|
|
32
44
|
"formatar": "mahoraga formatar --write",
|
|
33
45
|
"format:check": "mahoraga formatar --check",
|
|
34
46
|
"podar": "mahoraga podar",
|
|
35
47
|
"fix-types": "mahoraga fix-types",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
48
|
+
"otimizar-svg": "mahoraga otimizar-svg --write",
|
|
49
|
+
"atualizar": "mahoraga atualizar",
|
|
50
|
+
"convert": "mahoraga convert",
|
|
51
|
+
|
|
40
52
|
"perf:baseline": "mahoraga perf snapshot --baseline || true",
|
|
41
53
|
"perf:compare": "mahoraga perf compare",
|
|
42
54
|
"perf:gate": "mahoraga perf compare --threshold 0",
|
|
55
|
+
|
|
43
56
|
"scan": "mahoraga licencas scan",
|
|
44
57
|
"scan:root": "mahoraga licencas scan --root .",
|
|
58
|
+
"licenses:json": "mahoraga licencas scan --json",
|
|
45
59
|
"notices": "mahoraga licencas notices generate",
|
|
46
|
-
"disclaimer:add": "mahoraga licencas disclaimer add",
|
|
47
60
|
"disclaimer:verify": "mahoraga licencas disclaimer verify",
|
|
48
61
|
"add": "mahoraga licencas disclaimer add",
|
|
49
|
-
|
|
50
|
-
"audit": "mahoraga licencas scan",
|
|
51
|
-
"licenses:audit": "mahoraga licencas scan",
|
|
52
|
-
"licenses:json": "mahoraga licencas scan --json",
|
|
53
|
-
"json": "mahoraga licencas scan --json",
|
|
54
|
-
"guardian": "mahoraga guardian",
|
|
55
|
-
"otimizar-svg": "mahoraga otimizar-svg --write",
|
|
56
|
-
"atualizar": "mahoraga atualizar",
|
|
57
|
-
"convert": "mahoraga convert",
|
|
58
|
-
"analistas": "mahoraga analistas",
|
|
59
|
-
"metricas": "mahoraga metricas",
|
|
60
|
-
"vulnerabilidades": "mahoraga vulnerabilidades scan",
|
|
61
|
-
"security:deps": "mahoraga vulnerabilidades scan",
|
|
62
|
-
"security:lint": "npm run lint",
|
|
63
|
-
"security-check": "npm audit --production --audit-level=moderate",
|
|
62
|
+
|
|
64
63
|
"gha:scan": "mahoraga github-actions scan",
|
|
65
64
|
"gha:report": "mahoraga github-actions report",
|
|
66
65
|
"gha:gate": "mahoraga github-actions gate",
|
|
67
|
-
"gha:app": "mahoraga github-actions app",
|
|
68
66
|
"gitlab:scan": "mahoraga gitlab-ci scan",
|
|
69
67
|
"circleci:scan": "mahoraga circleci scan",
|
|
70
68
|
"jenkins:scan": "mahoraga jenkins scan",
|
|
71
69
|
"azure:scan": "mahoraga azure scan",
|
|
70
|
+
|
|
72
71
|
"plugins:list": "mahoraga plugins list",
|
|
73
72
|
"marketplace:search": "mahoraga marketplace search",
|
|
74
73
|
"marketplace:list": "mahoraga marketplace list",
|
|
74
|
+
|
|
75
|
+
"guardian": "mahoraga guardian",
|
|
75
76
|
"reverter:listar": "mahoraga reverter listar",
|
|
76
|
-
"reverter:status": "mahoraga reverter status"
|
|
77
|
-
"headers:spdx": "find src -name \"*.ts\" -exec grep -L \"SPDX-License-Identifier\" {} \\; 2>/dev/null | head -20",
|
|
78
|
-
"license-check": "mahoraga licencas scan"
|
|
77
|
+
"reverter:status": "mahoraga reverter status"
|
|
79
78
|
},
|
|
80
79
|
"keywords": [
|
|
81
80
|
"cli",
|
|
@@ -114,15 +113,15 @@
|
|
|
114
113
|
"chalk": "^5.6.2",
|
|
115
114
|
"commander": "^15.0.0",
|
|
116
115
|
"dotenv": "^17.4.2",
|
|
117
|
-
"fast-xml-parser": "^5.10.
|
|
116
|
+
"fast-xml-parser": "^5.10.1",
|
|
118
117
|
"htmlparser2": "^12.0.0",
|
|
119
|
-
"marked": "^18.0.
|
|
118
|
+
"marked": "^18.0.7",
|
|
120
119
|
"micromatch": "^4.0.8",
|
|
121
120
|
"minimatch": "^10.2.5",
|
|
122
121
|
"openpgp": "^6.3.1",
|
|
123
122
|
"ora": "^9.4.1",
|
|
124
|
-
"p-limit": "^7.3.
|
|
125
|
-
"postcss": "^8.5.
|
|
123
|
+
"p-limit": "^7.3.1",
|
|
124
|
+
"postcss": "^8.5.23",
|
|
126
125
|
"postcss-sass": "^0.5.0",
|
|
127
126
|
"postcss-scss": "^4.0.9",
|
|
128
127
|
"xxhashjs": "^0.2.2",
|
|
@@ -133,12 +132,12 @@
|
|
|
133
132
|
"@types/node": "^26.1.1",
|
|
134
133
|
"@vitest/coverage-istanbul": "^4.1.8",
|
|
135
134
|
"@vitest/coverage-v8": "^4.1.8",
|
|
136
|
-
"autoprefixer": "^10.5.
|
|
135
|
+
"autoprefixer": "^10.5.4",
|
|
137
136
|
"husky": "^9.1.7",
|
|
138
137
|
"license-checker-rseidelsohn": "^5.0.1",
|
|
139
|
-
"lint-staged": "^17.0
|
|
138
|
+
"lint-staged": "^17.2.0",
|
|
140
139
|
"rimraf": "^6.1.3",
|
|
141
|
-
"tsc-alias": "^1.9.
|
|
140
|
+
"tsc-alias": "^1.9.1",
|
|
142
141
|
"tsx": "^4.23.1",
|
|
143
142
|
"typescript": "^7.0.2",
|
|
144
143
|
"vitest": "^4.1.8"
|
package/dist/app/github.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createServer } from 'node:http';
|
|
2
|
-
export async function iniciarServidorApp(opts) {
|
|
3
|
-
const server = createServer((_req, res) => {
|
|
4
|
-
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
5
|
-
res.end(JSON.stringify({ status: 'ok', appId: opts.appId }));
|
|
6
|
-
});
|
|
7
|
-
return new Promise((resolve, reject) => {
|
|
8
|
-
server.listen(opts.port, () => {
|
|
9
|
-
console.log(`GitHub App server running on port ${opts.port}`);
|
|
10
|
-
resolve();
|
|
11
|
-
});
|
|
12
|
-
server.on('error', reject);
|
|
13
|
-
});
|
|
14
|
-
}
|
package/dist/app/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './github.js';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const GithubAppMensagens = {
|
|
2
|
-
servidorRodando: (port) => `[LAUNCH] Server running on port ${port}`,
|
|
3
|
-
webhooksEndpoint: (port) => `[DIRECT-LINK] Webhooks: http://localhost:${port}/api/github/webhooks`,
|
|
4
|
-
restApiEndpoint: (port) => `[DIRECT-LINK] REST API: http://localhost:${port}/api`,
|
|
5
|
-
healthEndpoint: (port) => `[DIRECT-LINK] Health: http://localhost:${port}/api/health`,
|
|
6
|
-
dashboardEndpoint: (port) => `[DIRECT-LINK] Dashboard: http://localhost:${port}/`,
|
|
7
|
-
statsEndpoint: (port) => `[DIRECT-LINK] Stats: http://localhost:${port}/api/github/stats`,
|
|
8
|
-
erroIniciarServidor: (erro) => `Failed to start server: ${erro}`,
|
|
9
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const GithubAppMensagens = {
|
|
2
|
-
servidorRodando: (port) => `[起動] ポート ${port} でサーバーが稼働中です`,
|
|
3
|
-
webhooksEndpoint: (port) => `[ダイレクトリンク] Webhooks: http://localhost:${port}/api/github/webhooks`,
|
|
4
|
-
restApiEndpoint: (port) => `[ダイレクトリンク] REST API: http://localhost:${port}/api`,
|
|
5
|
-
healthEndpoint: (port) => `[ダイレクトリンク] Health: http://localhost:${port}/api/health`,
|
|
6
|
-
dashboardEndpoint: (port) => `[ダイレクトリンク] Dashboard: http://localhost:${port}/`,
|
|
7
|
-
statsEndpoint: (port) => `[ダイレクトリンク] Stats: http://localhost:${port}/api/github/stats`,
|
|
8
|
-
erroIniciarServidor: (erro) => `サーバーの起動に失敗しました: ${erro}`,
|
|
9
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const GithubAppMensagens = {
|
|
2
|
-
servidorRodando: (port) => `[LANCAMENTO] Servidor rodando na porta ${port}`,
|
|
3
|
-
webhooksEndpoint: (port) => `[APONTAR-DIRETA] Webhooks: http://localhost:${port}/api/github/webhooks`,
|
|
4
|
-
restApiEndpoint: (port) => `[APONTAR-DIRETA] REST API: http://localhost:${port}/api`,
|
|
5
|
-
healthEndpoint: (port) => `[APONTAR-DIRETA] Health: http://localhost:${port}/api/health`,
|
|
6
|
-
dashboardEndpoint: (port) => `[APONTAR-DIRETA] Dashboard: http://localhost:${port}/`,
|
|
7
|
-
statsEndpoint: (port) => `[APONTAR-DIRETA] Stats: http://localhost:${port}/api/github/stats`,
|
|
8
|
-
erroIniciarServidor: (erro) => `Falha ao iniciar servidor: ${erro}`,
|
|
9
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const GithubAppMensagens = {
|
|
2
|
-
servidorRodando: (port) => `[启动] 服务器正在端口 ${port} 上运行`,
|
|
3
|
-
webhooksEndpoint: (port) => `[直接链接] Webhooks: http://localhost:${port}/api/github/webhooks`,
|
|
4
|
-
restApiEndpoint: (port) => `[直接链接] REST API: http://localhost:${port}/api`,
|
|
5
|
-
healthEndpoint: (port) => `[直接链接] Health: http://localhost:${port}/api/health`,
|
|
6
|
-
dashboardEndpoint: (port) => `[直接链接] Dashboard: http://localhost:${port}/`,
|
|
7
|
-
statsEndpoint: (port) => `[直接链接] Stats: http://localhost:${port}/api/github/stats`,
|
|
8
|
-
erroIniciarServidor: (erro) => `服务器启动失败: ${erro}`,
|
|
9
|
-
};
|