docuapi 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/bin/index.js +32 -2
  2. package/package.json +6 -2
package/bin/index.js CHANGED
@@ -1,3 +1,33 @@
1
1
  #!/usr/bin/env node
2
-
3
- console.log("oieeee");
2
+
3
+ const fs = require("fs");
4
+ // Importa o módulo File System
5
+
6
+ // Permite:
7
+ // ler arquivos
8
+ // criar arquivos
9
+ // verificar pastas
10
+ // navegar no projeto
11
+
12
+ const path = require("path");
13
+ // Importa o módulo path
14
+
15
+ // Serve para montar caminhos sem quebrar em diferentes SO
16
+
17
+ // Exemplo:
18
+ // path.join("src", "index.js");
19
+
20
+ // No Windows vira:
21
+ // src\index.js
22
+
23
+ // No Linux:
24
+ // src/index.js
25
+
26
+ const projectRoot = process.cwd();
27
+ // process.cwd() - CWD -> current working directory
28
+
29
+ // Coletando a pasta em que o usuário rodou o comando
30
+
31
+
32
+ console.log("📁 Analisando projeto em:");
33
+ console.log(projectRoot);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "bin": {
4
4
  "analyze": "./bin/index.js"
5
5
  },
6
- "version": "1.0.0",
6
+ "version": "1.0.1",
7
7
  "description": "CLI de teste para gerar documentação automática de APIs",
8
8
  "main": "index.js",
9
9
  "scripts": {
@@ -12,5 +12,9 @@
12
12
  "keywords": [],
13
13
  "author": "",
14
14
  "license": "MIT",
15
- "type": "commonjs"
15
+ "type": "commonjs",
16
+ "dependencies": {
17
+ "fs": "^0.0.1-security",
18
+ "path": "^0.12.7"
19
+ }
16
20
  }