gen-random-cli 1.0.0 → 1.0.2
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 +10 -1
- package/bin/gen-random.js +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -18,6 +18,15 @@ Generated values are printed to the terminal and are not written to files by the
|
|
|
18
18
|
npm install --global gen-random-cli
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
This installs the commands `gen-random-cli`, `gen-random`, and `genran` locally on your system. To run a command through npm without a global install, use the explicit package option:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npx --package gen-random-cli genran --help
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`npx genran` asks npm for the separate package named `genran`, not for a binary in `gen-random-cli`. A standalone `genran` package alias must be published separately before that exact invocation can work.
|
|
28
|
+
|
|
29
|
+
|
|
21
30
|
## Usage
|
|
22
31
|
|
|
23
32
|
Print both values:
|
|
@@ -48,7 +57,7 @@ Open the interactive settings menu to change the saved prefix:
|
|
|
48
57
|
gen-random settings
|
|
49
58
|
```
|
|
50
59
|
|
|
51
|
-
Type printable ASCII characters to add to the prefix, use Backspace to remove characters, press Enter to save, or Esc to cancel. Settings are stored in `~/.config/gen-random/settings.json`.
|
|
60
|
+
Type printable ASCII characters to add to the prefix, use Backspace to remove characters, press Enter to save, or Esc to cancel. Settings are stored in `~/.config/gen-random-cli/settings.json`.
|
|
52
61
|
|
|
53
62
|
Show all options:
|
|
54
63
|
|
package/bin/gen-random.js
CHANGED
|
@@ -15,7 +15,7 @@ const OUTPUT_SIZES = [
|
|
|
15
15
|
{ targetBits: 128, totalChars: 32, minRandomHexLength: 28 },
|
|
16
16
|
{ targetBits: 256, totalChars: 64, minRandomHexLength: 32 },
|
|
17
17
|
];
|
|
18
|
-
const settingsPath = path.join(os.homedir(), '.config', 'gen-random', 'settings.json');
|
|
18
|
+
const settingsPath = path.join(os.homedir(), '.config', 'gen-random-cli', 'settings.json');
|
|
19
19
|
|
|
20
20
|
function isValidSettings(settings) {
|
|
21
21
|
return typeof settings?.prefix === 'string'
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gen-random-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "A secure multi-length random password generator for your terminal",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=22"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
"gen-random": "bin/gen-random.js"
|
|
10
|
+
"gen-random-cli": "bin/gen-random.js",
|
|
11
|
+
"gen-random": "bin/gen-random.js",
|
|
12
|
+
"genran": "bin/gen-random.js"
|
|
11
13
|
},
|
|
12
14
|
"files": [
|
|
13
15
|
"bin/gen-random.js",
|