@tachybase/plugin-password-policy 1.0.6 → 1.0.25

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.
@@ -0,0 +1,71 @@
1
+ declare module "ipaddr.js" {
2
+ type IPvXRangeDefaults = 'unicast' | 'unspecified' | 'multicast' | 'linkLocal' | 'loopback' | 'reserved' | 'benchmarking' | 'amt';
3
+ type IPv4Range = IPvXRangeDefaults | 'broadcast' | 'carrierGradeNat' | 'private' | 'as112';
4
+ type IPv6Range = IPvXRangeDefaults | 'uniqueLocal' | 'ipv4Mapped' | 'rfc6145' | 'rfc6052' | '6to4' | 'teredo' | 'as112v6' | 'orchid2' | 'droneRemoteIdProtocolEntityTags';
5
+
6
+ interface RangeList<T> {
7
+ [name: string]: [T, number] | [T, number][];
8
+ }
9
+
10
+ // Common methods/properties for IPv4 and IPv6 classes.
11
+ class IP {
12
+ prefixLengthFromSubnetMask(): number | null;
13
+ toByteArray(): number[];
14
+ toNormalizedString(): string;
15
+ toString(): string;
16
+ }
17
+
18
+ namespace Address {
19
+ export function fromByteArray(bytes: number[]): IPv4 | IPv6;
20
+ export function isValid(addr: string): boolean;
21
+ export function isValidCIDR(addr: string): boolean;
22
+ export function parse(addr: string): IPv4 | IPv6;
23
+ export function parseCIDR(mask: string): [IPv4 | IPv6, number];
24
+ export function process(addr: string): IPv4 | IPv6;
25
+ export function subnetMatch(addr: IPv4 | IPv6, rangeList: RangeList<IPv4 | IPv6>, defaultName?: string): string;
26
+
27
+ export class IPv4 extends IP {
28
+ static broadcastAddressFromCIDR(addr: string): IPv4;
29
+ static isIPv4(addr: string): boolean;
30
+ static isValid(addr: string): boolean;
31
+ static isValidCIDR(addr: string): boolean;
32
+ static isValidFourPartDecimal(addr: string): boolean;
33
+ static networkAddressFromCIDR(addr: string): IPv4;
34
+ static parse(addr: string): IPv4;
35
+ static parseCIDR(addr: string): [IPv4, number];
36
+ static subnetMaskFromPrefixLength(prefix: number): IPv4;
37
+ constructor(octets: number[]);
38
+ octets: number[]
39
+
40
+ kind(): 'ipv4';
41
+ match(what: IPv4 | IPv6 | [IPv4 | IPv6, number], bits?: number): boolean;
42
+ range(): IPv4Range;
43
+ subnetMatch(rangeList: RangeList<IPv4>, defaultName?: string): string;
44
+ toIPv4MappedAddress(): IPv6;
45
+ }
46
+
47
+ export class IPv6 extends IP {
48
+ static broadcastAddressFromCIDR(addr: string): IPv6;
49
+ static isIPv6(addr: string): boolean;
50
+ static isValid(addr: string): boolean;
51
+ static isValidCIDR(addr: string): boolean;
52
+ static networkAddressFromCIDR(addr: string): IPv6;
53
+ static parse(addr: string): IPv6;
54
+ static parseCIDR(addr: string): [IPv6, number];
55
+ static subnetMaskFromPrefixLength(prefix: number): IPv6;
56
+ constructor(parts: number[]);
57
+ parts: number[]
58
+ zoneId?: string
59
+
60
+ isIPv4MappedAddress(): boolean;
61
+ kind(): 'ipv6';
62
+ match(what: IPv4 | IPv6 | [IPv4 | IPv6, number], bits?: number): boolean;
63
+ range(): IPv6Range;
64
+ subnetMatch(rangeList: RangeList<IPv6>, defaultName?: string): string;
65
+ toIPv4Address(): IPv4;
66
+ toRFC5952String(): string;
67
+ }
68
+ }
69
+
70
+ export = Address;
71
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "ipaddr.js",
3
+ "description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.",
4
+ "version": "2.2.0",
5
+ "author": "whitequark <whitequark@whitequark.org>",
6
+ "directories": {
7
+ "lib": "./lib"
8
+ },
9
+ "dependencies": {},
10
+ "devDependencies": {
11
+ "eslint": "^8.57.0",
12
+ "uglify-es": "*"
13
+ },
14
+ "scripts": {
15
+ "lint": "npx eslint lib",
16
+ "lintfix": "npx eslint --fix lib test",
17
+ "build": "npx uglifyjs --compress --mangle --wrap=window -o ipaddr.min.js lib/ipaddr.js",
18
+ "test": "node --test"
19
+ },
20
+ "files": [
21
+ "lib",
22
+ "LICENSE",
23
+ "ipaddr.min.js"
24
+ ],
25
+ "keywords": [
26
+ "ip",
27
+ "ipv4",
28
+ "ipv6"
29
+ ],
30
+ "repository": "git://github.com/whitequark/ipaddr.js",
31
+ "main": "./lib/ipaddr.js",
32
+ "engines": {
33
+ "node": ">= 10"
34
+ },
35
+ "license": "MIT",
36
+ "types": "./lib/ipaddr.js.d.ts"
37
+ }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-password-policy",
3
- "version": "1.0.6",
3
+ "displayName": "Password policy",
4
+ "version": "1.0.25",
4
5
  "description": "Password policy, including password strength, password attempt limit, password lock time, ip whitelist/blacklist, etc.",
5
6
  "keywords": [
6
7
  "Security"
@@ -13,12 +14,12 @@
13
14
  "ipaddr.js": "^2.1.0"
14
15
  },
15
16
  "peerDependencies": {
16
- "@tachybase/actions": "1.0.6",
17
- "@tachybase/client": "1.0.6",
18
- "@tachybase/database": "1.0.6",
19
- "@tachybase/schema": "1.0.6",
20
- "@tachybase/server": "1.0.6",
21
- "@tachybase/utils": "1.0.6"
17
+ "@tachybase/actions": "1.0.25",
18
+ "@tachybase/client": "1.0.25",
19
+ "@tachybase/database": "1.0.25",
20
+ "@tachybase/schema": "1.0.25",
21
+ "@tachybase/server": "1.0.25",
22
+ "@tachybase/utils": "1.0.25"
22
23
  },
23
24
  "description.zh-CN": "密码策略, 包含密码强度、密码尝试次数限制、密码锁定时间、ip黑白名单等",
24
25
  "displayName.zh-CN": "密码策略"