@nevermorelove/ompp 0.2.1 → 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 +4 -6
- package/ompp.js +8 -9
- package/package.json +1 -1
- package/modes/general/append.md +0 -3
- package/modes/general/config.yml +0 -8
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.
|
|
@@ -63,7 +61,7 @@ inside an installed package. The first `ompp create` makes the folder for you.
|
|
|
63
61
|
|
|
64
62
|
A new mode is `ompp create <name>` (or plain `mkdir` plus files). No manifest,
|
|
65
63
|
no code. The wrapper reads the folder, so it never needs to change when you
|
|
66
|
-
add modes.
|
|
64
|
+
add modes.
|
|
67
65
|
|
|
68
66
|
## Precedence
|
|
69
67
|
|
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"];
|
|
@@ -326,7 +325,7 @@ async function main() {
|
|
|
326
325
|
const { modes, skipped } = discoverModes();
|
|
327
326
|
if (!modes.length) {
|
|
328
327
|
console.error(
|
|
329
|
-
`
|
|
328
|
+
`You have no modes yet. Create one with "ompp create <name>".`,
|
|
330
329
|
);
|
|
331
330
|
for (const s of SOURCES) console.error(`[ompp] looked in: ${s}`);
|
|
332
331
|
return 1;
|
|
@@ -360,7 +359,7 @@ async function main() {
|
|
|
360
359
|
}
|
|
361
360
|
if (!modes.length) {
|
|
362
361
|
console.error(
|
|
363
|
-
`
|
|
362
|
+
`You have no modes yet. Create one with "ompp create <name>".`,
|
|
364
363
|
);
|
|
365
364
|
for (const s of SOURCES) console.error(`[ompp] looked in: ${s}`);
|
|
366
365
|
return 1;
|
package/package.json
CHANGED
package/modes/general/append.md
DELETED