@andrewthecoder/secure-password-generator 0.2.4 → 0.2.5
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 +26 -1
- package/dist/cli.js +1 -1
- package/package.json +2 -3
- package/src/cli.ts +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,32 @@ A secure password generator written in TypeScript that generates cryptographical
|
|
|
8
8
|
npm install @andrewthecoder/secure-password-generator
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Usage
|
|
11
|
+
## CLI Usage
|
|
12
|
+
|
|
13
|
+
Generate passwords directly from the command line using npx:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Generate a password with default length (16-24 characters)
|
|
17
|
+
npx @andrewthecoder/secure-password-generator
|
|
18
|
+
|
|
19
|
+
# Generate a password between 12 and 20 characters
|
|
20
|
+
npx @andrewthecoder/secure-password-generator 12 20
|
|
21
|
+
|
|
22
|
+
# Generate a password with exact length (32 characters)
|
|
23
|
+
npx @andrewthecoder/secure-password-generator 32 32
|
|
24
|
+
|
|
25
|
+
# Show help
|
|
26
|
+
npx @andrewthecoder/secure-password-generator --help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or install globally:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g @andrewthecoder/secure-password-generator
|
|
33
|
+
secure-password-generator 16 24
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Library Usage
|
|
12
37
|
|
|
13
38
|
```typescript
|
|
14
39
|
import { generate } from '@andrewthecoder/secure-password-generator';
|
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ Options:
|
|
|
20
20
|
Examples:
|
|
21
21
|
npx @andrewthecoder/secure-password-generator
|
|
22
22
|
npx @andrewthecoder/secure-password-generator 12 20
|
|
23
|
-
|
|
23
|
+
secure-password-generator 32 32 # if installed globally`);
|
|
24
24
|
process.exit(0);
|
|
25
25
|
}
|
|
26
26
|
if (args.length >= 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrewthecoder/secure-password-generator",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "A secure password generator written in TypeScript",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"bin": {
|
|
12
|
-
"secure-password-generator": "dist/cli.js"
|
|
13
|
-
"@andrewthecoder/secure-password-generator": "dist/cli.js"
|
|
12
|
+
"secure-password-generator": "dist/cli.js"
|
|
14
13
|
},
|
|
15
14
|
"scripts": {
|
|
16
15
|
"build": "tsc && chmod +x dist/cli.js",
|
package/src/cli.ts
CHANGED
|
@@ -23,7 +23,7 @@ Options:
|
|
|
23
23
|
Examples:
|
|
24
24
|
npx @andrewthecoder/secure-password-generator
|
|
25
25
|
npx @andrewthecoder/secure-password-generator 12 20
|
|
26
|
-
|
|
26
|
+
secure-password-generator 32 32 # if installed globally`);
|
|
27
27
|
process.exit(0);
|
|
28
28
|
}
|
|
29
29
|
|