generate-pw 1.5.7 → 1.5.9
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 +33 -32
- package/dist/cli.min.js +10 -10
- package/dist/generate-pw.min.js +3 -3
- package/docs/LICENSE.md +2 -2
- package/docs/README.md +33 -32
- package/docs/SECURITY.md +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<div align="right">
|
|
2
2
|
<h6>
|
|
3
3
|
<picture>
|
|
4
|
-
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://
|
|
5
|
-
<img height=14 src="https://
|
|
4
|
+
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://media.js-utils.com/images/icons/earth/white/icon32.svg?7c33be0">
|
|
5
|
+
<img height=14 src="https://media.js-utils.com/images/icons/earth/black/icon32.svg?7c33be0">
|
|
6
6
|
</picture>
|
|
7
7
|
English |
|
|
8
8
|
<a href="https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/zh-cn#readme">简体中文</a> |
|
|
@@ -19,16 +19,17 @@
|
|
|
19
19
|
|
|
20
20
|
### Randomly generate, strengthen, and validate cryptographically-secure passwords.
|
|
21
21
|
|
|
22
|
+
<a href="https://www.npmjs.com/package/generate-pw"><img height=31 src="https://img.shields.io/npm/dm/generate-pw?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
22
23
|
<a href="#%EF%B8%8F-mit-license"><img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
23
|
-
<a href="https://github.com/adamlui/js-utils/releases/tag/generate-pw-1.5.
|
|
24
|
+
<a href="https://github.com/adamlui/js-utils/releases/tag/generate-pw-1.5.9"><img height=31 src="https://img.shields.io/badge/Latest_Build-1.5.9-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
24
25
|
<a href="https://www.npmjs.com/package/generate-pw?activeTab=code"><img height=31 src="https://img.shields.io/npm/unpacked-size/generate-pw?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
|
|
25
|
-
<a href="https://github.com/adamlui/js-utils/blob/generate-pw-1.5.
|
|
26
|
+
<a href="https://github.com/adamlui/js-utils/blob/generate-pw-1.5.9/generate-pw/dist/generate-pw.min.js"><img height=31 src="https://img.shields.io/github/size/adamlui/js-utils/generate-pw/dist/generate-pw.min.js?branch=generate-pw-1.5.9&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge"></a>
|
|
26
27
|
<a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_js-utils:generate-pw/src/generate-pw.js"><img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Agenerate-pw%2Fsrc%2Fgenerate-pw.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
|
|
27
28
|
<a href="https://github.com/toolleeo/cli-apps#password-managers"><img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-c4a2bd?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
28
29
|
|
|
29
30
|
<br>
|
|
30
31
|
|
|
31
|
-
<img height=6px width="100%" src="https://
|
|
32
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
32
33
|
|
|
33
34
|
## 💡 About
|
|
34
35
|
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
- **Multi-environment support —** Use in Node.js or the web browser
|
|
40
41
|
- **Command line usable —** Just type `generate-pw`, that's it
|
|
41
42
|
|
|
42
|
-
<img height=6px width="100%" src="https://
|
|
43
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
43
44
|
|
|
44
45
|
## ⚡ Installation
|
|
45
46
|
|
|
@@ -57,11 +58,11 @@ $ npm install generate-pw
|
|
|
57
58
|
|
|
58
59
|
<br>
|
|
59
60
|
|
|
60
|
-
<img height=6px width="100%" src="https://
|
|
61
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
61
62
|
|
|
62
63
|
## 🔌 Importing the API
|
|
63
64
|
|
|
64
|
-
### <img height=18 src="https://
|
|
65
|
+
### <img height=18 src="https://media.js-utils.com/images/icons/platforms/node.js/icon25x28.png?3e22bae"> Node.js
|
|
65
66
|
|
|
66
67
|
#### ECMAScript*:
|
|
67
68
|
|
|
@@ -77,28 +78,28 @@ const pw = require('generate-pw');
|
|
|
77
78
|
|
|
78
79
|
###### _*Node.js version 14 or higher required_
|
|
79
80
|
|
|
80
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://
|
|
81
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.js-utils.com/images/icons/platforms/web/light/icon25.png?3e22bae"><img width=16 src="https://media.js-utils.com/images/icons/platforms/web/dark/icon25.png?3e22bae"></picture> Web
|
|
81
82
|
|
|
82
83
|
#### <> HTML script tag:
|
|
83
84
|
|
|
84
85
|
```html
|
|
85
|
-
<script src="https://cdn.jsdelivr.net/npm/generate-pw@1.5.
|
|
86
|
+
<script src="https://cdn.jsdelivr.net/npm/generate-pw@1.5.9/dist/generate-pw.min.js"></script>
|
|
86
87
|
```
|
|
87
88
|
|
|
88
89
|
#### ES6:
|
|
89
90
|
|
|
90
91
|
```js
|
|
91
92
|
(async () => {
|
|
92
|
-
await import('https://cdn.jsdelivr.net/npm/generate-pw@1.5.
|
|
93
|
+
await import('https://cdn.jsdelivr.net/npm/generate-pw@1.5.9/dist/generate-pw.min.js');
|
|
93
94
|
// Your code here...
|
|
94
95
|
})();
|
|
95
96
|
```
|
|
96
97
|
|
|
97
|
-
### <img height=17 src="https://
|
|
98
|
+
### <img height=17 src="https://media.js-utils.com/images/icons/platforms/tampermonkey/icon28.png?4fd2fa7"><img height=17.5 src="https://media.js-utils.com/images/icons/platforms/violentmonkey/icon25.png?2fe972c"> Greasemonkey
|
|
98
99
|
|
|
99
100
|
```js
|
|
100
101
|
...
|
|
101
|
-
// @require https://cdn.jsdelivr.net/npm/generate-pw@1.5.
|
|
102
|
+
// @require https://cdn.jsdelivr.net/npm/generate-pw@1.5.9/dist/generate-pw.min.js
|
|
102
103
|
// ==/UserScript==
|
|
103
104
|
|
|
104
105
|
// Your code here...
|
|
@@ -106,11 +107,11 @@ const pw = require('generate-pw');
|
|
|
106
107
|
|
|
107
108
|
<br>
|
|
108
109
|
|
|
109
|
-
**💡 Note:** To always import the latest version (not recommended in production!) remove the `@1.5.
|
|
110
|
+
**💡 Note:** To always import the latest version (not recommended in production!) remove the `@1.5.9` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/generate-pw/dist/generate-pw.min.js`
|
|
110
111
|
|
|
111
112
|
<br>
|
|
112
113
|
|
|
113
|
-
<img height=6px width="100%" src="https://
|
|
114
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
114
115
|
|
|
115
116
|
## 📋 API usage
|
|
116
117
|
|
|
@@ -247,7 +248,7 @@ Name | Type | Description
|
|
|
247
248
|
|
|
248
249
|
<br>
|
|
249
250
|
|
|
250
|
-
<img height=6px width="100%" src="https://
|
|
251
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
251
252
|
|
|
252
253
|
## 💻 Command line usage
|
|
253
254
|
|
|
@@ -257,7 +258,7 @@ When installed [globally](#-installation), **generate-pw** can also be used from
|
|
|
257
258
|
$ generate-pw
|
|
258
259
|
```
|
|
259
260
|
|
|
260
|
-
|
|
261
|
+
<img src="https://media.generatepw.org/images/screenshots/cli/generate-pw-cmd-output.png?7b16322">
|
|
261
262
|
|
|
262
263
|
#
|
|
263
264
|
|
|
@@ -287,7 +288,7 @@ Info commands:
|
|
|
287
288
|
|
|
288
289
|
<br>
|
|
289
290
|
|
|
290
|
-
<img height=6px width="100%" src="https://
|
|
291
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
291
292
|
|
|
292
293
|
## 🏛️ MIT License
|
|
293
294
|
|
|
@@ -301,32 +302,32 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
301
302
|
|
|
302
303
|
<br>
|
|
303
304
|
|
|
304
|
-
<img height=6px width="100%" src="https://
|
|
305
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
305
306
|
|
|
306
307
|
## 🛠️ Related utilities
|
|
307
308
|
|
|
308
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://
|
|
309
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.generate-ip.org/images/icons/node-graph/white/icon55x49.png?b4eb06e"><img height=21 src="https://media.generate-ip.org/images/icons/node-graph/black/icon55x49.png?b4eb06e"></picture> [generate-ip](https://js-utils.com/generate-ip) <a href="https://github.com/toolleeo/cli-apps#networking"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
|
|
309
310
|
|
|
310
|
-
> Randomly generate, format, and validate IPv4
|
|
311
|
-
<br>[Install](https://docs.
|
|
312
|
-
[Readme](https://docs.
|
|
313
|
-
[API usage](https://docs.
|
|
314
|
-
[CLI usage](https://docs.
|
|
311
|
+
> Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
|
|
312
|
+
<br>[Install](https://docs.generate-ip.org/#-installation) /
|
|
313
|
+
[Readme](https://docs.generate-ip.org/#readme) /
|
|
314
|
+
[API usage](https://docs.generate-ip.org/#-api-usage) /
|
|
315
|
+
[CLI usage](https://docs.generate-ip.org/#-command-line-usage) /
|
|
315
316
|
[Discuss](https://github.js-utils.com/discussions)
|
|
316
317
|
|
|
317
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://
|
|
318
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.geolocatejs.org/images/icons/wire-globe/white/icon32.png?e735b99"><img height=22 src="https://media.geolocatejs.org/images/icons/wire-globe/black/icon32.png?e735b99"></picture> [geolocate](https://js-utils.com/geolocate)
|
|
318
319
|
|
|
319
320
|
> Fetch IP geolocation data from the CLI.
|
|
320
|
-
<br>[Install](https://docs.
|
|
321
|
-
[Readme](https://docs.
|
|
322
|
-
[CLI usage](https://docs.
|
|
323
|
-
[API usage](https://docs.
|
|
321
|
+
<br>[Install](https://docs.geolocatejs.org/#-installation) /
|
|
322
|
+
[Readme](https://docs.geolocatejs.org/#readme) /
|
|
323
|
+
[CLI usage](https://docs.geolocatejs.org/#-command-line-usage) /
|
|
324
|
+
[API usage](https://docs.geolocatejs.org/#-api-usage) /
|
|
324
325
|
[Discuss](https://github.js-utils.com/discussions)
|
|
325
326
|
|
|
326
327
|
<br>
|
|
327
328
|
|
|
328
|
-
<img height=6px width="100%" src="https://
|
|
329
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
329
330
|
|
|
330
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://
|
|
331
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="https://media.js-utils.com/images/icons/home/white/icon32x27.png?e735b99"><img height=13 src="https://media.js-utils.com/images/icons/home/dark-gray/icon32x27.png?e735b99"></picture> <a href="https://js-utils.com">**More JavaScript utilities**</a> /
|
|
331
332
|
<a href="https://github.js-utils.com/discussions">Discuss</a> /
|
|
332
333
|
<a href="#-generate-pw">Back to top ↑</a>
|
package/dist/cli.min.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* © 2024 Adam Lui & contributors under the MIT license.
|
|
4
|
-
* Source: https://code.
|
|
5
|
-
* Documentation: https://docs.
|
|
4
|
+
* Source: https://code.generatepw.org
|
|
5
|
+
* Documentation: https://docs.generatepw.org
|
|
6
6
|
*/
|
|
7
|
-
const pkgName="generate-pw",copyright="© 2024 Adam Lui & contributors under the MIT license.",cmdFormat="generate-pw [options|commands]",srcURL="https://code.
|
|
8
|
-
${a+(l.prefix_error||"ERROR")}: `+`Arg [--${s.replace(/-/g,"")}] `+`${l.error_noEqual||"requires '=' followed by a value"}.${t}`),
|
|
7
|
+
const pkgName="generate-pw",copyright="© 2024 Adam Lui & contributors under the MIT license.",cmdFormat="generate-pw [options|commands]",srcURL="https://code.generatepw.org",docURL="https://docs.generatepw.org/#-command-line-usage";(async()=>{const e=require(__dirname.match(/src/)?"./generate-pw":"./generate-pw.min")["generatePassword"],r=require("fs"),o=require("path"),n=require("child_process")["execSync"],t="[0m",a="[1;91m",i="[1;97m";let p="en";if("win32"==process.platform)try{p=n("(Get-Culture).TwoLetterISOLanguageName",{shell:"powershell",encoding:"utf-8"}).trim()}catch(e){}else{var c=process.env;p=(c.LANG||c.LANGUAGE||c.LC_ALL||c.LC_MESSAGES||c.LC_NAME||"en").split(".")[0]}let l={};var s,c=new Promise((t,a)=>{const i="https://cdn.jsdelivr.net/gh/adamlui/js-utils@7ae55f3cf240d0f4d07abacec1ab6e142458bb35/generate-pw/_locales/",e=(p?p.replace("-","_"):"en")+"/";let c=i+e+"messages.json",l=0;h(c).then(async function s(e){try{const r=await e.json(),o={};for(const n in r)"object"==typeof r[n]&&"message"in r[n]&&(o[n]=r[n].message);t(o)}catch(e){if(3==++l)return t({});h(c=p.includes("-")&&1==l?c.replace(/([^_]*)_[^/]*(\/.*)/,"$1$2"):i+"en/messages.json").then(s).catch(a)}}).catch(a)});try{l=await c}catch(e){}const m={},d={paramOptions:{length:/^--?length(?:=.*|$)/,qty:/^--?qu?a?n?ti?t?y(?:=.*|$)/,charset:/^--?charse?t?(?:=.*|$)/,excludeChars:/^--?exclude(?:=.*|$)/},flags:{includeNums:/^--?(?:n|(?:include-?)?num(?:ber)?s?=?(?:true|1)?)$/,includeSymbols:/^--?(?:y|(?:include-?)?symbols?=?(?:true|1)?)$/,excludeLowerChars:/^--?(?:L|(?:exclude|disable|no)-?lower-?(?:case)?|lower-?(?:case)?=(?:false|0))$/,excludeUpperChars:/^--?(?:U|(?:exclude|disable|no)-?upper-?(?:case)?|upper-?(?:case)?=(?:false|0))$/,excludeSimilarChars:/^--?(?:S|(?:exclude|disable|no)-?similar-?(?:char(?:acter)?s?)?|similar-?(?:char(?:acter)?s?)?=(?:false|0))$/,strictMode:/^--?s(?:trict)?(?:-?mode)?$/,quietMode:/^--?q(?:uiet)?(?:-?mode)?$/},infoCmds:{help:/^--?h(?:elp)?$/,version:/^--?ve?r?s?i?o?n?$/}};process.argv.forEach(s=>{var e,r,o;s.startsWith("-")&&(e=Object.keys(d.paramOptions).find(e=>d.paramOptions[e].test(s)),o=Object.keys(d.flags).find(e=>d.flags[e].test(s)),r=Object.keys(d.infoCmds).find(e=>d.infoCmds[e].test(s)),o?m[o]=!0:e?(/=.+/.test(s)||(console.error(`
|
|
8
|
+
${a+(l.prefix_error||"ERROR")}: `+`Arg [--${s.replace(/-/g,"")}] `+`${l.error_noEqual||"requires '=' followed by a value"}.${t}`),f(),process.exit(1)),o=s.split("=")[1],m[e]=parseInt(o)||o):r||(console.error(`
|
|
9
9
|
${a+(l.prefix_error||"ERROR")}: `+`Arg [${s}] ${l.error_notRecognized||"not recognized"}.[0m`),console.info(`
|
|
10
|
-
${"[1;33m"+(l.info_validArgs||"Valid arguments are below")}.[0m`),
|
|
11
|
-
${l.
|
|
12
|
-
${
|
|
13
|
-
${l.info_copying||"Copying to clipboard"}...`,m.quietMode||console.info(s),s=(s=Array.isArray(c)?c.join("\n"):c).replace(/"/g,'""'),"darwin"==process.platform?n(`printf "${s}" | pbcopy`):"linux"==process.platform?n(`printf "${s}" | xclip -selection clipboard`):"win32"==process.platform&&n(`Set-Clipboard -Value "${s}"`,{shell:"powershell"})}function h(
|
|
10
|
+
${"[1;33m"+(l.info_validArgs||"Valid arguments are below")}.[0m`),g(["paramOptions","flags","infoCmds"]),process.exit(1)))});for(const $ of["length","qty"])m[$]&&(isNaN(m[$])||m[$]<1)&&(console.error(`
|
|
11
|
+
${a+(l.prefix_error||"ERROR")}: [${$}] `+`${l.error_nonPositiveNum||"argument can only be > 0"}.${t}`),f(),process.exit(1));if(process.argv.some(e=>d.infoCmds.help.test(e)))g();else if(process.argv.some(e=>d.infoCmds.version.test(e))){c=n(`npm view ${pkgName} version`).toString().trim()||"none";let e,s=process.cwd();for(;"/"!=s;){var u=o.join(s,"package.json");if(r.existsSync(u)){u=require(u);e=(u.dependencies?.[pkgName]||u.devDependencies?.[pkgName])?.match(/(\d+\.\d+\.\d+)/)[0]||"none";break}s=o.dirname(s)}console.info(`
|
|
12
|
+
${l.prefix_globalVer||"Global version"}: `+c),console.info(`${l.prefix_localVer||"Local version"}: `+e)}else{c={length:m.length||8,qty:m.qty||1,charset:m.charset,exclude:m.excludeChars,numbers:!!m.includeNums,symbols:!!m.includeSymbols,lowercase:!m.excludeLowerChars,uppercase:!m.excludeUpperChars,excludeSimilarChars:!!m.excludeSimilarChars,strict:!!m.strictMode,verbose:!m.quietMode},c=e(c);s=`
|
|
13
|
+
${l.info_copying||"Copying to clipboard"}...`,m.quietMode||console.info(s),s=(s=Array.isArray(c)?c.join("\n"):c).replace(/"/g,'""'),"darwin"==process.platform?n(`printf "${s}" | pbcopy`):"linux"==process.platform?n(`printf "${s}" | xclip -selection clipboard`):"win32"==process.platform&&n(`Set-Clipboard -Value "${s}"`,{shell:"powershell"})}function h(o){return new Promise((r,e)=>{var s=o.match(/^([^:]+):\/\//)[1];/^https?$/.test(s)||e(new Error(`${l.error_invalidURL||"Invalid URL"}.`)),require(s).get(o,e=>{let s="";e.on("data",e=>s+=e),e.on("end",()=>r({json:()=>JSON.parse(s)}))}).on("error",e)})}function g(e=["header","usage","paramOptions","flags","infoCmds"]){var s=`[106m[30m ${pkgName} [0m `;const r={header:["\n├ "+s+(l.appCopyright||copyright),s+(l.prefix_source||"Source")+": "+srcURL],usage:[`
|
|
14
14
|
${i}o ${l.helpSection_usage||"Usage"}:[0m`," [1;97m» [1;92m"+cmdFormat+t],paramOptions:[`
|
|
15
15
|
${i}o ${l.helpSection_paramOptions||"Parameter options"}:[0m`,` --length=n ${l.optionDesc_length||"Generate password(s) of n length"}.`,` --qty=n ${l.optionDesc_qty||"Generate n password(s)"}.`,` --charset=chars ${l.optionDesc_charset||"Only include chars in password(s)"}.`,` --exclude=chars ${l.optionDesc_exclude||"Exclude chars from password(s)"}.`],flags:[`
|
|
16
16
|
${i}o ${l.helpSection_flags||"Boolean options"}:[0m`,` -n, --include-numbers ${l.optionDesc_includeNums||"Allow numbers in password(s)"}.`,` -y, --include-symbols ${l.optionDesc_includeSymbols||"Allow symbols in password(s)"}.`,` -L, --no-lowercase ${l.optionDesc_noLower||"Disallow lowercase letters in password(s)"}.`,` -U, --no-uppercase ${l.optionDesc_noUpper||"Disallow uppercase letters in password(s)"}.`,` -S, --no-similar ${l.optionDesc_noSimilar||"Exclude similar characters in password(s)"}.`,` -s, --strict ${l.optionDesc_strict||"Require at least one character from eachallowed character set in password(s)"}.`,` -q, --quiet ${l.optionDesc_quiet||"Suppress all logging except errors"}.`],infoCmds:[`
|
|
17
|
-
${i}o ${l.helpSection_infoCmds||"Info commands"}:[0m`," -h, --help "+(l.optionDesc_help||"Display help screen."),` -v, --version ${l.optionDesc_version||"Show version number"}.`]};e.forEach(a=>{
|
|
18
|
-
${l.info_moreHelp||"For more help"}, ${l.info_visit||"visit"}: `+i+docURL+t)}function
|
|
17
|
+
${i}o ${l.helpSection_infoCmds||"Info commands"}:[0m`," -h, --help "+(l.optionDesc_help||"Display help screen."),` -v, --version ${l.optionDesc_version||"Show version number"}.`]};e.forEach(a=>{r[a]?.forEach(e=>{{var o=/header|usage/.test(a)?1:29;const n=process.stdout.columns||80,t=[],s=e.match(/\S+|\s+/g);let r="";s.forEach(e=>{var s=n-(0==t.length?0:o);r.length+"| ".length+e.length>s&&(t.push(0==t.length?r:r.trimStart()),r=""),r+=e}),t.push(0==t.length?r:r.trimStart()),t.forEach((e,s)=>console.info("| "+(0==s?e:" ".repeat(o)+e)))}})}),console.info(`
|
|
18
|
+
${l.info_moreHelp||"For more help"}, ${l.info_visit||"visit"}: `+i+docURL+t)}function f(){console.info(`
|
|
19
19
|
${l.info_moreHelp||"For more help"},`+` ${l.info_type||"type"} 'generate-pw --help'`+` ${l.info_or||"or"} ${l.info_visit||"visit"}
|
|
20
20
|
`+i+docURL+t)}})();
|
package/dist/generate-pw.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* © 2024 Adam Lui & contributors under the MIT license.
|
|
3
|
-
* Source: https://code.
|
|
4
|
-
* Documentation: https://docs.
|
|
3
|
+
* Source: https://code.generatepw.org
|
|
4
|
+
* Documentation: https://docs.generatepw.org
|
|
5
5
|
*/
|
|
6
|
-
const charsets={lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",numbers:"0123456789",symbols:"!@#$%^&*()-_=+[]{}/\\|;:'\",.<>?"};function generatePassword(t={}){var e={verbose:!0,length:8,qty:1,charset:"",exclude:"",numbers:!1,symbols:!1,lowercase:!0,uppercase:!0,excludeSimilarChars:!1,strict:!1};if(validateOptions(t,e,"https://docs.
|
|
6
|
+
const charsets={lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",numbers:"0123456789",symbols:"!@#$%^&*()-_=+[]{}/\\|;:'\",.<>?"};function generatePassword(t={}){var e={verbose:!0,length:8,qty:1,charset:"",exclude:"",numbers:!1,symbols:!1,lowercase:!0,uppercase:!0,excludeSimilarChars:!1,strict:!1};if(validateOptions(t,e,"https://docs.generatepw.org/#generatepasswordoptions","generatePassword({ verbose: false, numbers: true })")){if(1<(t={...e,...t}).qty){const{qty:r,...s}=t;return generatePasswords(r,s)}{var o,e="generatePasswords"==generatePassword.caller?.name;t.verbose&&!e&&console.info("generatePassword() » Initializing character set...");let r=t.charset?.toString()||(t.numbers?charsets.numbers:"")+(t.symbols?charsets.symbols:"")+(t.lowercase?charsets.lower:"")+(t.uppercase?charsets.upper:""),s=(""==r&&(r=charsets.lower+charsets.upper),t.exclude&&(t.verbose&&!e&&console.info("generatePassword() » Removing excluded characters..."),r=r.replace(new RegExp(`[${t.exclude}]`,"g"),"")),t.excludeSimilarChars&&(t.verbose&&!e&&console.info("generatePassword() » Excluding similar characters..."),r=r.replace(/[o0Oil1|]/g,"")),t.verbose&&!e&&console.info("generatePassword() » Generating password..."),"");for(let e=0;e<t.length;e++){var n=randomInt(0,r.length);s+=r.charAt(n)}return t.strict&&(t.verbose&&!e&&console.info("generatePassword() » Enforcing strict mode..."),o=["number","symbol","lower","upper"].filter(e=>t[e+"s"]||t[e+"case"]),s=strictify(s,o)),t.verbose&&!e&&(console.info("generatePassword() » Password generated!"),"undefined"!=typeof require&&/cli(?:\.min)?\.js$/.test(require.main.filename)||console.info("generatePassword() » Check returned string.")),s}}}function generatePasswords(r,s={}){var e="https://docs.generatepw.org/#generatepasswordsqty-options",t={verbose:!0,length:8,charset:"",exclude:"",numbers:!1,symbols:!1,lowercase:!0,uppercase:!0,excludeSimilarChars:!1,strict:!1};if(r=parseInt(r,10),isNaN(r)||r<1)console.error("generatePasswords() » ERROR: 1st arg <qty> can only be an integer > 0."),console.info("generatePasswords() » For more help, please visit "+e);else if(validateOptions(s,t,e,"generatePasswords(3, { verbose: false, symbols: true })")){(s={...t,...s}).verbose&&console.info(`generatePasswords() » Generating password${1<r?"s":""}...`);var o=[];for(let e=0;e<r;e++)o.push(generatePassword(s));return s.verbose&&console.info(`generatePasswords() » Password${1<r?"s":""} generated!`),"undefined"!=typeof require&&/cli(?:\.min)?\.js$/.test(require.main.filename)||console.info("generatePasswords() » Check returned array."),o}}function strictify(t,o=["number","symbol","lower","upper"],e={}){var r="https://docs.generatepw.org/#strictifypassword-requiredchartypes-options",n={verbose:!0};if("string"!=typeof t)console.error("strictify() » ERROR: 1st arg <password> must be a string."),console.info("strictify() » For more help, please visit "+r);else{var s=["number","symbol","lower","upper"];for(const c of o=Array.isArray(o)?o:[o])if(!s.includes(c))return console.error(`strictify() » ERROR: 2nd arg \`${c}\` is an invalid character type.`),console.info(`strictify() » Valid character types: [ '${s.join("', '")}' ]`),console.info("strictify() » Pass one as a string or more as an array, or all types will be required."),void console.info("strictify() » For more help, please visit "+r);if(validateOptions(e,n,r,"strictify('pa55word', ['symbol', 'upper'], { verbose: false })")){e={...n,...e};const l={},d=[];o.forEach(e=>l[e]=!1);for(let e=0;e<t.length;e++)for(const f of o)(charsets[f]||charsets[f+"s"]).includes(t.charAt(e))&&(l[f]=!0,d.push(e));e.verbose&&console.info("strictify() » Strictifying password...");var a=Math.min(t.length,o.length);let r=0,s=t;for(const p of o)if(r<a&&!l[p]){let e;for(;e=randomInt(0,t.length),d.includes(e););d.push(e);var i=charsets[p]||charsets[p+"s"];s=s.substring(0,e)+i.charAt(randomInt(0,i.length))+s.substring(e+1),r++}return e.verbose&&(0<r?(console.info("strictify() » Password is now strict!"),console.info("strictify() » Check returned string.")):(console.info(`strictify() » Password already includes ${o.join(" + ")} characters!`),console.info("strictify() » No modifications made."))),s}}}function validateStrength(r,s={}){var e="https://docs.generatepw.org/#validatestrengthpassword-options",t={minLength:8,minLower:1,minUpper:1,minNumber:1,minSymbol:1},o={verbose:!0};if("string"!=typeof r)console.error("validateStrength() » ERROR: 1st arg <password> must be a string."),console.info("validateStrength() » For more help, please visit "+e);else if(validateOptions(s,o,e,"validateStrength('pa55word', { verbose: false })")){(s={...o,...s}).verbose&&console.info("validateStrength() » Validating password strength...");var n={lower:0,upper:0,number:0,symbol:0};for(const i of r)for(const c of Object.keys(n))(charsets[c]||charsets[c+"s"]).includes(i)&&n[c]++;var a=[];r.length<t.minLength&&a.push(`Make it at least ${t.minLength} characters long.`);for(const l of Object.keys(n))n[l]<t["min"+l.charAt(0).toUpperCase()+l.slice(1)]&&a.push("Include at least one "+l+`${["upper","lower"].includes(l)?"case letter":""}.`);let e=0;e+=r.length>=t.minLength?20:0;for(const d of Object.keys(n))e+=n[d]>=t["min"+d.charAt(0).toUpperCase()+d.slice(1)]?20:0;return s.verbose&&(console.info("validateStrength() » Password strength validated!"),console.info("validateStrength() » Check returned object for score/recommendations.")),{strengthScore:e,recommendations:a,isGood:80<=e}}}function randomInt(e,r){var s;return"undefined"==typeof require?(s=(window.crypto||window.msCrypto)?.getRandomValues(new Uint32Array(1))[0]/4294967295||Math.random(),Math.floor(s*(r-e))+e):require("crypto").randomInt(e,r)}function validateOptions(e,r,s,t){const o=JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'").replace(/\n\s*/g," "),n=Object.keys(r).join(", "),a=Object.keys(r).filter(e=>"boolean"==typeof r[e]),i=Object.keys(r).filter(e=>Number.isInteger(r[e]));let c="validateOptions() » ";try{c=validateOptions.caller?.name+"() » "}catch(e){}var l=t.split(",").findIndex(e=>e.trim().startsWith("{"))+1,d=(l+=["st","nd","rd"][l-1]||"th",()=>{console.info(`${c}Valid options: [ ${n} ]`),console.info(c+"If omitted, default settings are: "+o)}),f=()=>{console.info(c+"For more help, please visit "+s)};if("object"!=typeof e)return console.error(c+`ERROR: ${"0th"==l?"[O":l+" arg [o"}ptions] can only be an object of key/values.`),console.info(c+"Example valid call: "+t),d(),f(),!1;for(const p in e){if(!Object.prototype.hasOwnProperty.call(r,p))return console.error(`${c}ERROR: \`${p}\` is an invalid option.`),d(),f(),!1;if(a.includes(p)&&"boolean"!=typeof e[p])return console.error(`${c}ERROR: [${p}] option can only be \`true\` or \`false\`.`),f(),!1;if(i.includes(p)&&(e[p]=parseInt(e[p],10),isNaN(e[p])||e[p]<1))return console.error(`${c}ERROR: [${p}] option can only be an integer > 0.`),f(),!1}return!0}const apiFunctions={generatePassword:generatePassword,generatePasswords:generatePasswords,strictify:strictify,validateStrength:validateStrength};try{module.exports={...apiFunctions}}catch(e){}try{window.pw={...apiFunctions}}catch(e){}
|
package/docs/LICENSE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<div align="right">
|
|
2
2
|
<h6>
|
|
3
3
|
<picture>
|
|
4
|
-
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://
|
|
5
|
-
<img height=14 src="https://
|
|
4
|
+
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://media.js-utils.com/images/icons/earth/white/icon32.svg?7c33be0">
|
|
5
|
+
<img height=14 src="https://media.js-utils.com/images/icons/earth/black/icon32.svg?7c33be0">
|
|
6
6
|
</picture>
|
|
7
7
|
English |
|
|
8
8
|
<a href="zh-cn/LICENSE.md">简体中文</a> |
|
package/docs/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<div align="right">
|
|
2
2
|
<h6>
|
|
3
3
|
<picture>
|
|
4
|
-
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://
|
|
5
|
-
<img height=14 src="https://
|
|
4
|
+
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://media.js-utils.com/images/icons/earth/white/icon32.svg?7c33be0">
|
|
5
|
+
<img height=14 src="https://media.js-utils.com/images/icons/earth/black/icon32.svg?7c33be0">
|
|
6
6
|
</picture>
|
|
7
7
|
English |
|
|
8
8
|
<a href="https://github.com/adamlui/js-utils/tree/main/generate-pw/docs/zh-cn#readme">简体中文</a> |
|
|
@@ -19,16 +19,17 @@
|
|
|
19
19
|
|
|
20
20
|
### Randomly generate, strengthen, and validate cryptographically-secure passwords.
|
|
21
21
|
|
|
22
|
+
<a href="https://www.npmjs.com/package/generate-pw"><img height=31 src="https://img.shields.io/npm/dm/generate-pw?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
22
23
|
<a href="#%EF%B8%8F-mit-license"><img height=31 src="https://img.shields.io/badge/License-MIT-orange.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
23
|
-
<a href="https://github.com/adamlui/js-utils/releases/tag/generate-pw-1.5.
|
|
24
|
+
<a href="https://github.com/adamlui/js-utils/releases/tag/generate-pw-1.5.9"><img height=31 src="https://img.shields.io/badge/Latest_Build-1.5.9-44cc11.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
24
25
|
<a href="https://www.npmjs.com/package/generate-pw?activeTab=code"><img height=31 src="https://img.shields.io/npm/unpacked-size/generate-pw?style=for-the-badge&logo=ebox&logoColor=white&labelColor=464646&color=blue"></a>
|
|
25
|
-
<a href="https://github.com/adamlui/js-utils/blob/generate-pw-1.5.
|
|
26
|
+
<a href="https://github.com/adamlui/js-utils/blob/generate-pw-1.5.9/generate-pw/dist/generate-pw.min.js"><img height=31 src="https://img.shields.io/github/size/adamlui/js-utils/generate-pw/dist/generate-pw.min.js?branch=generate-pw-1.5.9&label=Minified%20Size&logo=databricks&logoColor=white&labelColor=464646&color=ff69b4&style=for-the-badge"></a>
|
|
26
27
|
<a href="https://sonarcloud.io/component_measures?metric=new_vulnerabilities&id=adamlui_js-utils:generate-pw/src/generate-pw.js"><img height=31 src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fsonarcloud.io%2Fapi%2Fmeasures%2Fcomponent%3Fcomponent%3Dadamlui_js-utils%3Agenerate-pw%2Fsrc%2Fgenerate-pw.js%26metricKeys%3Dvulnerabilities&query=%24.component.measures.0.value&style=for-the-badge&logo=sonarcloud&logoColor=white&labelColor=464646&label=Vulnerabilities&color=gold"></a>
|
|
27
28
|
<a href="https://github.com/toolleeo/cli-apps#password-managers"><img height=31 src="https://img.shields.io/badge/Mentioned_in-Awesome-c4a2bd?logo=awesomelists&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
28
29
|
|
|
29
30
|
<br>
|
|
30
31
|
|
|
31
|
-
<img height=6px width="100%" src="https://
|
|
32
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
32
33
|
|
|
33
34
|
## 💡 About
|
|
34
35
|
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
- **Multi-environment support —** Use in Node.js or the web browser
|
|
40
41
|
- **Command line usable —** Just type `generate-pw`, that's it
|
|
41
42
|
|
|
42
|
-
<img height=6px width="100%" src="https://
|
|
43
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
43
44
|
|
|
44
45
|
## ⚡ Installation
|
|
45
46
|
|
|
@@ -57,11 +58,11 @@ $ npm install generate-pw
|
|
|
57
58
|
|
|
58
59
|
<br>
|
|
59
60
|
|
|
60
|
-
<img height=6px width="100%" src="https://
|
|
61
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
61
62
|
|
|
62
63
|
## 🔌 Importing the API
|
|
63
64
|
|
|
64
|
-
### <img height=18 src="https://
|
|
65
|
+
### <img height=18 src="https://media.js-utils.com/images/icons/platforms/node.js/icon25x28.png?3e22bae"> Node.js
|
|
65
66
|
|
|
66
67
|
#### ECMAScript*:
|
|
67
68
|
|
|
@@ -77,28 +78,28 @@ const pw = require('generate-pw');
|
|
|
77
78
|
|
|
78
79
|
###### _*Node.js version 14 or higher required_
|
|
79
80
|
|
|
80
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://
|
|
81
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.js-utils.com/images/icons/platforms/web/light/icon25.png?3e22bae"><img width=16 src="https://media.js-utils.com/images/icons/platforms/web/dark/icon25.png?3e22bae"></picture> Web
|
|
81
82
|
|
|
82
83
|
#### <> HTML script tag:
|
|
83
84
|
|
|
84
85
|
```html
|
|
85
|
-
<script src="https://cdn.jsdelivr.net/npm/generate-pw@1.5.
|
|
86
|
+
<script src="https://cdn.jsdelivr.net/npm/generate-pw@1.5.9/dist/generate-pw.min.js"></script>
|
|
86
87
|
```
|
|
87
88
|
|
|
88
89
|
#### ES6:
|
|
89
90
|
|
|
90
91
|
```js
|
|
91
92
|
(async () => {
|
|
92
|
-
await import('https://cdn.jsdelivr.net/npm/generate-pw@1.5.
|
|
93
|
+
await import('https://cdn.jsdelivr.net/npm/generate-pw@1.5.9/dist/generate-pw.min.js');
|
|
93
94
|
// Your code here...
|
|
94
95
|
})();
|
|
95
96
|
```
|
|
96
97
|
|
|
97
|
-
### <img height=17 src="https://
|
|
98
|
+
### <img height=17 src="https://media.js-utils.com/images/icons/platforms/tampermonkey/icon28.png?4fd2fa7"><img height=17.5 src="https://media.js-utils.com/images/icons/platforms/violentmonkey/icon25.png?2fe972c"> Greasemonkey
|
|
98
99
|
|
|
99
100
|
```js
|
|
100
101
|
...
|
|
101
|
-
// @require https://cdn.jsdelivr.net/npm/generate-pw@1.5.
|
|
102
|
+
// @require https://cdn.jsdelivr.net/npm/generate-pw@1.5.9/dist/generate-pw.min.js
|
|
102
103
|
// ==/UserScript==
|
|
103
104
|
|
|
104
105
|
// Your code here...
|
|
@@ -106,11 +107,11 @@ const pw = require('generate-pw');
|
|
|
106
107
|
|
|
107
108
|
<br>
|
|
108
109
|
|
|
109
|
-
**💡 Note:** To always import the latest version (not recommended in production!) remove the `@1.5.
|
|
110
|
+
**💡 Note:** To always import the latest version (not recommended in production!) remove the `@1.5.9` version tag from the jsDelivr URL: `https://cdn.jsdelivr.net/npm/generate-pw/dist/generate-pw.min.js`
|
|
110
111
|
|
|
111
112
|
<br>
|
|
112
113
|
|
|
113
|
-
<img height=6px width="100%" src="https://
|
|
114
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
114
115
|
|
|
115
116
|
## 📋 API usage
|
|
116
117
|
|
|
@@ -247,7 +248,7 @@ Name | Type | Description
|
|
|
247
248
|
|
|
248
249
|
<br>
|
|
249
250
|
|
|
250
|
-
<img height=6px width="100%" src="https://
|
|
251
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
251
252
|
|
|
252
253
|
## 💻 Command line usage
|
|
253
254
|
|
|
@@ -257,7 +258,7 @@ When installed [globally](#-installation), **generate-pw** can also be used from
|
|
|
257
258
|
$ generate-pw
|
|
258
259
|
```
|
|
259
260
|
|
|
260
|
-
|
|
261
|
+
<img src="https://media.generatepw.org/images/screenshots/cli/generate-pw-cmd-output.png?7b16322">
|
|
261
262
|
|
|
262
263
|
#
|
|
263
264
|
|
|
@@ -287,7 +288,7 @@ Info commands:
|
|
|
287
288
|
|
|
288
289
|
<br>
|
|
289
290
|
|
|
290
|
-
<img height=6px width="100%" src="https://
|
|
291
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
291
292
|
|
|
292
293
|
## 🏛️ MIT License
|
|
293
294
|
|
|
@@ -301,32 +302,32 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
301
302
|
|
|
302
303
|
<br>
|
|
303
304
|
|
|
304
|
-
<img height=6px width="100%" src="https://
|
|
305
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
305
306
|
|
|
306
307
|
## 🛠️ Related utilities
|
|
307
308
|
|
|
308
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://
|
|
309
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.generate-ip.org/images/icons/node-graph/white/icon55x49.png?b4eb06e"><img height=21 src="https://media.generate-ip.org/images/icons/node-graph/black/icon55x49.png?b4eb06e"></picture> [generate-ip](https://js-utils.com/generate-ip) <a href="https://github.com/toolleeo/cli-apps#networking"><img height=18 src="https://media.js-utils.com/images/badges/awesome/badge.svg?7b16322"></a>
|
|
309
310
|
|
|
310
|
-
> Randomly generate, format, and validate IPv4
|
|
311
|
-
<br>[Install](https://docs.
|
|
312
|
-
[Readme](https://docs.
|
|
313
|
-
[API usage](https://docs.
|
|
314
|
-
[CLI usage](https://docs.
|
|
311
|
+
> Randomly generate, format, and validate IPv4 + IPv6 + MAC addresses.
|
|
312
|
+
<br>[Install](https://docs.generate-ip.org/#-installation) /
|
|
313
|
+
[Readme](https://docs.generate-ip.org/#readme) /
|
|
314
|
+
[API usage](https://docs.generate-ip.org/#-api-usage) /
|
|
315
|
+
[CLI usage](https://docs.generate-ip.org/#-command-line-usage) /
|
|
315
316
|
[Discuss](https://github.js-utils.com/discussions)
|
|
316
317
|
|
|
317
|
-
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://
|
|
318
|
+
### <picture><source media="(prefers-color-scheme: dark)" srcset="https://media.geolocatejs.org/images/icons/wire-globe/white/icon32.png?e735b99"><img height=22 src="https://media.geolocatejs.org/images/icons/wire-globe/black/icon32.png?e735b99"></picture> [geolocate](https://js-utils.com/geolocate)
|
|
318
319
|
|
|
319
320
|
> Fetch IP geolocation data from the CLI.
|
|
320
|
-
<br>[Install](https://docs.
|
|
321
|
-
[Readme](https://docs.
|
|
322
|
-
[CLI usage](https://docs.
|
|
323
|
-
[API usage](https://docs.
|
|
321
|
+
<br>[Install](https://docs.geolocatejs.org/#-installation) /
|
|
322
|
+
[Readme](https://docs.geolocatejs.org/#readme) /
|
|
323
|
+
[CLI usage](https://docs.geolocatejs.org/#-command-line-usage) /
|
|
324
|
+
[API usage](https://docs.geolocatejs.org/#-api-usage) /
|
|
324
325
|
[Discuss](https://github.js-utils.com/discussions)
|
|
325
326
|
|
|
326
327
|
<br>
|
|
327
328
|
|
|
328
|
-
<img height=6px width="100%" src="https://
|
|
329
|
+
<img height=6px width="100%" src="https://media.js-utils.com/images/separators/gradient-aqua.png?c0192d3">
|
|
329
330
|
|
|
330
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://
|
|
331
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="https://media.js-utils.com/images/icons/home/white/icon32x27.png?e735b99"><img height=13 src="https://media.js-utils.com/images/icons/home/dark-gray/icon32x27.png?e735b99"></picture> <a href="https://js-utils.com">**More JavaScript utilities**</a> /
|
|
331
332
|
<a href="https://github.js-utils.com/discussions">Discuss</a> /
|
|
332
333
|
<a href="#-generate-pw">Back to top ↑</a>
|
package/docs/SECURITY.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<div align="right">
|
|
2
2
|
<h6>
|
|
3
3
|
<picture>
|
|
4
|
-
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://
|
|
5
|
-
<img height=14 src="https://
|
|
4
|
+
<source type="image/svg+xml" media="(prefers-color-scheme: dark)" srcset="https://media.js-utils.com/images/icons/earth/white/icon32.svg?7c33be0">
|
|
5
|
+
<img height=14 src="https://media.js-utils.com/images/icons/earth/black/icon32.svg?7c33be0">
|
|
6
6
|
</picture>
|
|
7
7
|
English |
|
|
8
8
|
<a href="zh-cn/SECURITY.md">简体中文</a> |
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
|
|
18
18
|
# 🛡️ Security Policy
|
|
19
19
|
|
|
20
|
-
If you find a vulnerability, please open a [draft security advisory](https://github.
|
|
20
|
+
If you find a vulnerability, please open a [draft security advisory](https://github.js-utils.com/security/advisories/new).
|
|
21
21
|
|
|
22
22
|
Pull requests are also welcome, but for safety reasons, send an email to <adam@kudoai.com> and wait for a response before making it public.
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generate-pw",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.9",
|
|
4
4
|
"description": "Randomly generate, strengthen, and validate cryptographically-secure passwords.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Adam Lui",
|
|
7
7
|
"email": "adam@kudoai.com",
|
|
8
8
|
"url": "https://github.com/adamlui"
|
|
9
9
|
},
|
|
10
|
-
"homepage": "https://
|
|
10
|
+
"homepage": "https://generatepw.org",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"main": "dist/generate-pw.min.js",
|
|
13
13
|
"files": [
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
"url": "https://github.com/sponsors/adamlui"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@adamlui/minify.js": "^1.5.
|
|
56
|
+
"@adamlui/minify.js": "^1.5.8"
|
|
57
57
|
}
|
|
58
58
|
}
|