@nevermorelove/ompp 0.2.2 → 0.2.3
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 +3 -5
- package/ompp.js +6 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,12 +34,10 @@ ompp pentest --dry-run show the omp command line instead of running it
|
|
|
34
34
|
|
|
35
35
|
Before launch it prints one line to stderr, `[ompp] mode: pentest`, so you always know where you are.
|
|
36
36
|
|
|
37
|
-
Modes are read from
|
|
38
|
-
places win:
|
|
37
|
+
Modes are read from two places, and same-named modes from the first win:
|
|
39
38
|
|
|
40
|
-
1. `OMPP_MODES_DIR`, if you set it
|
|
41
|
-
2.
|
|
42
|
-
3. `~/.omp/ompp/modes/`, the user-level home for your own modes
|
|
39
|
+
1. `OMPP_MODES_DIR`, if you set it (a repo checkout, any custom folder)
|
|
40
|
+
2. `~/.omp/ompp/modes/`, the user-level home for your own modes
|
|
43
41
|
|
|
44
42
|
`ompp create` always writes to `~/.omp/ompp/modes/`, so you never edit files
|
|
45
43
|
inside an installed package. The first `ompp create` makes the folder for you.
|
package/ompp.js
CHANGED
|
@@ -22,16 +22,15 @@ const { spawn } = require("child_process");
|
|
|
22
22
|
|
|
23
23
|
const os = require("os");
|
|
24
24
|
|
|
25
|
-
// Modes come from
|
|
26
|
-
// 1. OMPP_MODES_DIR (explicit override)
|
|
27
|
-
// 2. modes
|
|
28
|
-
//
|
|
29
|
-
//
|
|
25
|
+
// Modes come from two places, in priority order:
|
|
26
|
+
// 1. OMPP_MODES_DIR (explicit override; repo checkout, custom folder)
|
|
27
|
+
// 2. ~/.omp/ompp/modes (the user-level home; `ompp create` writes here)
|
|
28
|
+
// Same-named modes from OMPP_MODES_DIR win. The folder next to the script
|
|
29
|
+
// is never scanned: with a global install it sits inside node_modules, and
|
|
30
|
+
// user modes must not live there.
|
|
30
31
|
const DEFAULT_MODES_DIR = path.join(os.homedir(), ".omp", "ompp", "modes");
|
|
31
|
-
const BUNDLED_MODES_DIR = path.join(__dirname, "modes");
|
|
32
32
|
const SOURCES = [];
|
|
33
33
|
if (process.env.OMPP_MODES_DIR) SOURCES.push(process.env.OMPP_MODES_DIR);
|
|
34
|
-
SOURCES.push(BUNDLED_MODES_DIR);
|
|
35
34
|
SOURCES.push(DEFAULT_MODES_DIR);
|
|
36
35
|
const RESERVED_NAMES = ["create", "list", "help", "version"];
|
|
37
36
|
const CONFIG_NAMES = ["config.yml", "config.yaml"];
|