@mocoto/mahoraga 0.14.3 → 0.14.4
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
CHANGED
|
@@ -8,6 +8,10 @@ Proveniência e Autoria: Este documento integra o projeto Mahoraga (licença MIT
|
|
|
8
8
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
+
<p> Estou ficando desanimado de continuar com esse projeto, caso goste do projeto e queira ajudar pra eu não desanimar entre em contato por esse E-mail:</p>
|
|
12
|
+
|
|
13
|
+
[Gmail](mailto:mocoto.persona@gmail.com)
|
|
14
|
+
|
|
11
15
|
## Começar Rápido (30 segundos)
|
|
12
16
|
|
|
13
17
|
```bash
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
import { accessSync } from 'node:fs';
|
|
3
|
-
import { resolve, sep } from 'node:path';
|
|
4
3
|
import { Command } from 'commander';
|
|
4
|
+
import { resolverPluginSeguro } from '../../core/config/index.js';
|
|
5
5
|
import { listarFormatters, registrarFormatter, removerFormatter } from '../../core/formatters/index.js';
|
|
6
6
|
import { getMessages } from '../../core/messages/index.js';
|
|
7
|
+
import { PROJETO_RAIZ } from '../../core/registry/index.js';
|
|
7
8
|
const { log, FormattersMensagens } = getMessages();
|
|
8
9
|
export function comandoFormatters() {
|
|
9
10
|
const cmd = new Command('formatters')
|
|
@@ -34,12 +35,12 @@ export function comandoFormatters() {
|
|
|
34
35
|
.argument('<caminho>', 'Caminho do módulo do formatador')
|
|
35
36
|
.action(async (nome, caminho) => {
|
|
36
37
|
try {
|
|
37
|
-
|
|
38
|
-
if (
|
|
38
|
+
const resolvido = resolverPluginSeguro(PROJETO_RAIZ, caminho);
|
|
39
|
+
if (resolvido.erro || !resolvido.caminho) {
|
|
39
40
|
log.erro(FormattersMensagens.moduloInvalido(caminho));
|
|
40
41
|
return;
|
|
41
42
|
}
|
|
42
|
-
const caminhoResolvido =
|
|
43
|
+
const caminhoResolvido = resolvido.caminho;
|
|
43
44
|
try {
|
|
44
45
|
accessSync(caminhoResolvido);
|
|
45
46
|
}
|
package/package.json
CHANGED