@scaleway/regex 3.0.0 → 3.1.1
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 +19 -7
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,37 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 3.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1254](https://github.com/scaleway/scaleway-lib/pull/1254) [`1af34cb`](https://github.com/scaleway/scaleway-lib/commit/1af34cb8a49cb1d5fd5ddaf608df4d1c160b2e10) Thanks [@ModuloM](https://github.com/ModuloM)! - Add Scaleway access key regex.
|
|
8
|
+
|
|
3
9
|
All notable changes to this project will be documented in this file.
|
|
4
10
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
11
|
|
|
6
|
-
## 3.
|
|
12
|
+
## 3.1.0 (2023-01-12)
|
|
7
13
|
|
|
14
|
+
### :package: Chore
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
- **release:** publish ([22abd68](https://github.com/scaleway/scaleway-lib/commit/22abd687033bcd8c7cd187c8a9370c02fe7c0ef4))
|
|
17
|
+
|
|
18
|
+
### :gear: Features
|
|
10
19
|
|
|
11
|
-
|
|
20
|
+
- **regex:** advanced domain regex for non ASCII characters ([#1156](https://github.com/scaleway/scaleway-lib/issues/1156)) ([6b896f8](https://github.com/scaleway/scaleway-lib/commit/6b896f824a773e0fa342357e11074551688429e3))
|
|
12
21
|
|
|
13
|
-
|
|
22
|
+
## 3.0.0 (2023-01-06)
|
|
14
23
|
|
|
15
|
-
|
|
24
|
+
### ⚠ BREAKING CHANGES
|
|
16
25
|
|
|
26
|
+
- packages are ESM only
|
|
17
27
|
|
|
18
|
-
### :
|
|
28
|
+
### :package: Chore
|
|
19
29
|
|
|
20
|
-
|
|
30
|
+
- **release:** publish ([20c9d4f](https://github.com/scaleway/scaleway-lib/commit/20c9d4fb39822245252bf362bc7a8d26127e511d))
|
|
21
31
|
|
|
32
|
+
### :gear: Features
|
|
22
33
|
|
|
34
|
+
- publish packages as ESM only ([#1145](https://github.com/scaleway/scaleway-lib/issues/1145)) ([4c25097](https://github.com/scaleway/scaleway-lib/commit/4c25097254a5ba7f0a5dbb6fdf5d6578a75f777a))
|
|
23
35
|
|
|
24
36
|
## 2.9.1 (2022-12-29)
|
|
25
37
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
declare const accessKeyRegex: RegExp;
|
|
1
2
|
declare const alpha: RegExp;
|
|
2
3
|
declare const alphaLower: RegExp;
|
|
3
4
|
declare const alphanum: RegExp;
|
|
@@ -20,6 +21,7 @@ declare const ascii: RegExp;
|
|
|
20
21
|
declare const backupKey: RegExp;
|
|
21
22
|
declare const basicDomain: RegExp;
|
|
22
23
|
declare const uppercaseBasicDomain: RegExp;
|
|
24
|
+
declare const advancedDomainName: RegExp;
|
|
23
25
|
declare const cron: RegExp;
|
|
24
26
|
declare const digits: RegExp;
|
|
25
27
|
declare const macAddress: RegExp;
|
|
@@ -40,4 +42,4 @@ declare const ipv6Cidr: RegExp;
|
|
|
40
42
|
declare const reverseDNS: RegExp;
|
|
41
43
|
declare const dashedIpv4: RegExp;
|
|
42
44
|
|
|
43
|
-
export { absoluteLinuxPath, alpha, alphaDashes, alphaLower, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashLowercase, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdashunderscoredotsspacesparenthesis, alphanumdots, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
|
|
45
|
+
export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes, alphaLower, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashLowercase, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdashunderscoredotsspacesparenthesis, alphanumdots, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const accessKeyRegex = /^SCW[A-Z0-9]{17}$/i;
|
|
1
2
|
const alpha = /^[a-zA-Z]*$/;
|
|
2
3
|
const alphaLower = /^[a-z]+$/;
|
|
3
4
|
const alphanum = /^[a-zA-Z0-9]*$/;
|
|
@@ -20,6 +21,7 @@ const ascii = /^[\x00-\x7F]+$/;
|
|
|
20
21
|
const backupKey = /^[A-Z0-9]{32}$/;
|
|
21
22
|
const basicDomain = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+$/;
|
|
22
23
|
const uppercaseBasicDomain = /^(?![-])+[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{1,63})+$/;
|
|
24
|
+
const advancedDomainName = /^(?:(?:(?:[a-zA-Z0-9À-ÖØ-öø-ÿ](?:[a-zA-Z0-9À-ÖØ-öø-ÿ-]{0,61}[a-zA-Z0-9À-ÖØ-öø-ÿ])?)\.)+[a-zA-Z]{2,}|(?:[0-9]{1,3}\.){3}[0-9]{1,3})(?::[\d]{1,5})?$/;
|
|
23
25
|
const cron = /^((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})$/;
|
|
24
26
|
const digits = /^[0-9]*$/;
|
|
25
27
|
const macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/;
|
|
@@ -56,4 +58,4 @@ const ipv6Cidr = new RegExp(`^${cidrv6}$`);
|
|
|
56
58
|
const reverseDNS = /^[a-z0-9-]+(\.[a-z0-9-]{1,63})+(\.)$/;
|
|
57
59
|
const dashedIpv4 = /(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(-(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}/;
|
|
58
60
|
|
|
59
|
-
export { absoluteLinuxPath, alpha, alphaDashes, alphaLower, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashLowercase, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdashunderscoredotsspacesparenthesis, alphanumdots, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
|
|
61
|
+
export { absoluteLinuxPath, accessKeyRegex, advancedDomainName, alpha, alphaDashes, alphaLower, alphanum, alphanumLowercase, alphanumSpacesDotsUnderscoreDash, alphanumUnderscoreDash, alphanumUnderscoreDollarDash, alphanumdash, alphanumdashLowercase, alphanumdashdots, alphanumdashdotsorempty, alphanumdashdotsspaces, alphanumdashorempty, alphanumdashspaces, alphanumdashunderscoredotsspacesparenthesis, alphanumdots, ascii, backupKey, basicDomain, cron, dashedIpv4, digits, email, fourDigitsCode, hexadecimal, ip, ipCidr, ipv4, ipv4Cidr, ipv6, ipv6Cidr, macAddress, phone, reverseDNS, s3BucketName, sixDigitsCode, spaces, uppercaseBasicDomain, url };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/regex",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "A small utility to use regex",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -18,6 +18,5 @@
|
|
|
18
18
|
"url": "https://github.com/scaleway/scaleway-lib",
|
|
19
19
|
"directory": "packages/regex"
|
|
20
20
|
},
|
|
21
|
-
"license": "MIT"
|
|
22
|
-
|
|
23
|
-
}
|
|
21
|
+
"license": "MIT"
|
|
22
|
+
}
|