@antelopejs/interface-dms 0.2.5 → 0.2.6
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/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/dist/auth/password.d.ts +3 -0
- package/dist/auth/password.js +11 -0
- package/dist/auth/password.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.2.6
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/interface-v0.2.5...v0.2.6)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **interface-dms:** Export the password policy for modules ([#70](https://github.com/AntelopeJS/dms/pull/70))
|
|
10
|
+
|
|
11
|
+
### 🏡 Chore
|
|
12
|
+
|
|
13
|
+
- **release:** @antelopejs/dms v0.4.6 ([5c157dd](https://github.com/AntelopeJS/dms/commit/5c157dd))
|
|
14
|
+
|
|
15
|
+
### ❤️ Contributors
|
|
16
|
+
|
|
17
|
+
- Antony Rizzitelli <rizzitelli.antony@pm.me>
|
|
18
|
+
|
|
3
19
|
## v0.2.5
|
|
4
20
|
|
|
5
21
|
[compare changes](https://github.com/AntelopeJS/dms/compare/interface-v0.2.4...v0.2.5)
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ pnpm add @antelopejs/interface-dms
|
|
|
26
26
|
| `@antelopejs/interface-dms/html-render` | server-side HTML templates |
|
|
27
27
|
|
|
28
28
|
`/auth`, `/base` and `/notifications` take subpaths of their own
|
|
29
|
-
(`/auth/db`, `/base/table-view`, `/base/data-types`, `/notifications/builder`,
|
|
29
|
+
(`/auth/db`, `/auth/password`, `/base/table-view`, `/base/data-types`, `/notifications/builder`,
|
|
30
30
|
...). The reference documentation lives in the runtime package, under
|
|
31
31
|
`docs/07.interfaces/`.
|
|
32
32
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PASSWORD_PATTERN = exports.PASSWORD_MIN_LENGTH = void 0;
|
|
4
|
+
exports.isPasswordCompliant = isPasswordCompliant;
|
|
5
|
+
exports.PASSWORD_MIN_LENGTH = 8;
|
|
6
|
+
const ALLOWED_SPECIAL_CHARS = "@$!%*?&";
|
|
7
|
+
exports.PASSWORD_PATTERN = new RegExp(`^(?=.*[A-Z])(?=.*\\d)(?=.*[${ALLOWED_SPECIAL_CHARS}])[A-Za-z\\d${ALLOWED_SPECIAL_CHARS}]+$`);
|
|
8
|
+
function isPasswordCompliant(password) {
|
|
9
|
+
return (password.length >= exports.PASSWORD_MIN_LENGTH && exports.PASSWORD_PATTERN.test(password));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=password.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.js","sourceRoot":"","sources":["../../src/auth/password.ts"],"names":[],"mappings":";;;AAgCA,kDAIC;AA5BY,QAAA,mBAAmB,GAAG,CAAC,CAAC;AAMrC,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAO3B,QAAA,gBAAgB,GAAG,IAAI,MAAM,CACxC,8BAA8B,qBAAqB,eAAe,qBAAqB,KAAK,CAC7F,CAAC;AASF,SAAgB,mBAAmB,CAAC,QAAgB;IAClD,OAAO,CACL,QAAQ,CAAC,MAAM,IAAI,2BAAmB,IAAI,wBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAC1E,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED