@scaleway/regex 5.4.0 → 5.6.0
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 +12 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2782](https://github.com/scaleway/scaleway-lib/pull/2782) [`aececf9`](https://github.com/scaleway/scaleway-lib/commit/aececf9ba62bf9c7d78251504eac3f147b87005f) Thanks [@MathildeJolly](https://github.com/MathildeJolly)! - feat(regex): add new kafka username regex
|
|
8
|
+
|
|
9
|
+
## 5.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#2736](https://github.com/scaleway/scaleway-lib/pull/2736) [`9019322`](https://github.com/scaleway/scaleway-lib/commit/90193222e74c116016d52ef50d9c278d3bae522f) Thanks [@JulienSaguez](https://github.com/JulienSaguez)! - feat(regex): add regex organizationAlias and uuid
|
|
14
|
+
|
|
3
15
|
## 5.4.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export declare const alphanumDots: RegExp;
|
|
|
20
20
|
export declare const alphanumLowercase: RegExp;
|
|
21
21
|
export declare const absoluteLinuxPath: RegExp;
|
|
22
22
|
export declare const ascii: RegExp;
|
|
23
|
+
export declare const organizationAlias: RegExp;
|
|
23
24
|
export declare const backupKey: RegExp;
|
|
24
25
|
export declare const basicDomain: RegExp;
|
|
25
26
|
export declare const uppercaseBasicDomain: RegExp;
|
|
@@ -38,6 +39,7 @@ export declare const elevenDigitsCode: RegExp;
|
|
|
38
39
|
export declare const url: RegExp;
|
|
39
40
|
export declare const hexadecimal: RegExp;
|
|
40
41
|
export declare const s3BucketName: RegExp;
|
|
42
|
+
export declare const uuid: RegExp;
|
|
41
43
|
export declare const ip: RegExp;
|
|
42
44
|
export declare const ipv4: RegExp;
|
|
43
45
|
export declare const ipv6: RegExp;
|
|
@@ -50,3 +52,4 @@ export declare const pathSegment: RegExp;
|
|
|
50
52
|
export declare const absolutePath: RegExp;
|
|
51
53
|
export declare const sgPortRange: RegExp;
|
|
52
54
|
export declare const password: RegExp;
|
|
55
|
+
export declare const kafkaUsernameRegex: RegExp;
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ const alphanumDots = /^[a-zA-Z0-9.]*$/;
|
|
|
20
20
|
const alphanumLowercase = /^[a-z0-9]+$/;
|
|
21
21
|
const absoluteLinuxPath = /(^\/$|^(\/[a-zA-Z0-9_]+)*$)/;
|
|
22
22
|
const ascii = /^[\x00-\x7F]+$/;
|
|
23
|
+
const organizationAlias = /^[a-z0-9]{2,32}$/;
|
|
23
24
|
const backupKey = /^[A-Z0-9]{8}$|^[A-Z0-9]{32}$/;
|
|
24
25
|
const basicDomain = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+$/;
|
|
25
26
|
const uppercaseBasicDomain = /^(?![-])+[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,63})+$/;
|
|
@@ -38,6 +39,7 @@ const elevenDigitsCode = /^[0-9]{11}$/;
|
|
|
38
39
|
const url = /^http(s)?:\/\/?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/;
|
|
39
40
|
const hexadecimal = /^[0-9a-fA-F]+$/;
|
|
40
41
|
const s3BucketName = /^[a-z0-9][-.a-z0-9]{1,61}[a-z0-9]$/;
|
|
42
|
+
const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
41
43
|
const v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
|
|
42
44
|
const v6segment = "[a-fA-F\\d]{1,4}";
|
|
43
45
|
const v6 = `
|
|
@@ -66,6 +68,7 @@ const pathSegment = /^[_a-zA-Z0-9]([-_.a-zA-Z0-9]*[_a-zA-Z0-9])?$/;
|
|
|
66
68
|
const absolutePath = /^\/(([\w. -]*)[^\s?]\/?)+$/;
|
|
67
69
|
const sgPortRange = /^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5]?[0-9]{1,4})(-(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5]?[0-9]{1,4}))?$/;
|
|
68
70
|
const password = /^(?!@)[^`]*$/;
|
|
71
|
+
const kafkaUsernameRegex = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/;
|
|
69
72
|
export {
|
|
70
73
|
absoluteLinuxPath,
|
|
71
74
|
absolutePath,
|
|
@@ -106,8 +109,10 @@ export {
|
|
|
106
109
|
ipv4Cidr,
|
|
107
110
|
ipv6,
|
|
108
111
|
ipv6Cidr,
|
|
112
|
+
kafkaUsernameRegex,
|
|
109
113
|
macAddress,
|
|
110
114
|
nineDigitsCode,
|
|
115
|
+
organizationAlias,
|
|
111
116
|
password,
|
|
112
117
|
pathSegment,
|
|
113
118
|
phone,
|
|
@@ -118,5 +123,6 @@ export {
|
|
|
118
123
|
spaces,
|
|
119
124
|
uppercaseBasicDomain,
|
|
120
125
|
uppercaseBasicSubdomain,
|
|
121
|
-
url
|
|
126
|
+
url,
|
|
127
|
+
uuid
|
|
122
128
|
};
|