@aws-solutions-constructs/core 2.50.0 → 2.52.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/.eslintignore +2 -0
- package/.jsii +50 -5
- package/node_modules/ansi-regex/index.js +8 -2
- package/node_modules/ansi-regex/license +4 -16
- package/node_modules/ansi-regex/package.json +53 -62
- package/node_modules/ansi-regex/readme.md +48 -9
- package/node_modules/aproba/index.js +33 -33
- package/node_modules/aproba/package.json +5 -4
- package/node_modules/are-we-there-yet/LICENSE.md +18 -0
- package/node_modules/are-we-there-yet/README.md +16 -3
- package/node_modules/are-we-there-yet/lib/tracker-base.js +13 -0
- package/node_modules/are-we-there-yet/lib/tracker-group.js +112 -0
- package/node_modules/are-we-there-yet/lib/tracker-stream.js +42 -0
- package/node_modules/are-we-there-yet/lib/tracker.js +34 -0
- package/node_modules/are-we-there-yet/package.json +38 -20
- package/node_modules/color-support/README.md +129 -0
- package/node_modules/color-support/bin.js +3 -0
- package/node_modules/color-support/browser.js +14 -0
- package/node_modules/color-support/index.js +134 -0
- package/node_modules/color-support/package.json +36 -0
- package/node_modules/gauge/LICENSE.md +20 -0
- package/node_modules/gauge/README.md +19 -16
- package/node_modules/gauge/{base-theme.js → lib/base-theme.js} +7 -3
- package/node_modules/gauge/lib/has-color.js +4 -0
- package/node_modules/gauge/{index.js → lib/index.js} +90 -34
- package/node_modules/gauge/{plumbing.js → lib/plumbing.js} +3 -1
- package/node_modules/gauge/{progress-bar.js → lib/progress-bar.js} +12 -6
- package/node_modules/gauge/{render-template.js → lib/render-template.js} +69 -28
- package/node_modules/gauge/{template-item.js → lib/template-item.js} +21 -7
- package/node_modules/gauge/{theme-set.js → lib/theme-set.js} +31 -24
- package/node_modules/gauge/lib/themes.js +56 -0
- package/node_modules/gauge/{wide-truncate.js → lib/wide-truncate.js} +9 -3
- package/node_modules/gauge/package.json +47 -42
- package/node_modules/is-fullwidth-code-point/index.js +40 -36
- package/node_modules/is-fullwidth-code-point/license +4 -16
- package/node_modules/is-fullwidth-code-point/package.json +40 -43
- package/node_modules/is-fullwidth-code-point/readme.md +8 -8
- package/node_modules/npmlog/LICENSE.md +20 -0
- package/node_modules/npmlog/{log.js → lib/log.js} +149 -58
- package/node_modules/npmlog/package.json +36 -12
- package/node_modules/signal-exit/LICENSE.txt +1 -1
- package/node_modules/signal-exit/README.md +56 -21
- package/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
- package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/browser.js +10 -0
- package/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
- package/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
- package/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/index.js +279 -0
- package/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
- package/node_modules/signal-exit/dist/cjs/package.json +3 -0
- package/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
- package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/signals.js +42 -0
- package/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
- package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/browser.js +4 -0
- package/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
- package/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/index.js +275 -0
- package/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/package.json +3 -0
- package/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
- package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/signals.js +39 -0
- package/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
- package/node_modules/signal-exit/package.json +87 -19
- package/node_modules/string-width/index.js +29 -19
- package/node_modules/string-width/license +4 -16
- package/node_modules/string-width/package.json +54 -54
- package/node_modules/string-width/readme.md +17 -9
- package/node_modules/strip-ansi/index.js +2 -4
- package/node_modules/strip-ansi/license +4 -16
- package/node_modules/strip-ansi/package.json +52 -55
- package/node_modules/strip-ansi/readme.md +20 -7
- package/package.json +11 -10
- package/test/test-helper.d.ts +1 -1
- package/test/test-helper.js +5 -5
- package/node_modules/are-we-there-yet/CHANGES.md +0 -37
- package/node_modules/are-we-there-yet/LICENSE +0 -5
- package/node_modules/are-we-there-yet/tracker-base.js +0 -11
- package/node_modules/are-we-there-yet/tracker-group.js +0 -107
- package/node_modules/are-we-there-yet/tracker-stream.js +0 -36
- package/node_modules/are-we-there-yet/tracker.js +0 -30
- package/node_modules/code-point-at/index.js +0 -32
- package/node_modules/code-point-at/license +0 -21
- package/node_modules/code-point-at/package.json +0 -38
- package/node_modules/code-point-at/readme.md +0 -32
- package/node_modules/core-util-is/LICENSE +0 -19
- package/node_modules/core-util-is/README.md +0 -3
- package/node_modules/core-util-is/lib/util.js +0 -107
- package/node_modules/core-util-is/package.json +0 -38
- package/node_modules/delegates/.npmignore +0 -1
- package/node_modules/delegates/History.md +0 -22
- package/node_modules/delegates/License +0 -20
- package/node_modules/delegates/Makefile +0 -8
- package/node_modules/delegates/Readme.md +0 -94
- package/node_modules/delegates/index.js +0 -121
- package/node_modules/delegates/package.json +0 -13
- package/node_modules/delegates/test/index.js +0 -94
- package/node_modules/gauge/CHANGELOG.md +0 -160
- package/node_modules/gauge/LICENSE +0 -13
- package/node_modules/gauge/has-color.js +0 -12
- package/node_modules/gauge/themes.js +0 -54
- package/node_modules/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -29
- package/node_modules/isarray/.npmignore +0 -1
- package/node_modules/isarray/.travis.yml +0 -4
- package/node_modules/isarray/Makefile +0 -6
- package/node_modules/isarray/README.md +0 -60
- package/node_modules/isarray/component.json +0 -19
- package/node_modules/isarray/index.js +0 -5
- package/node_modules/isarray/package.json +0 -45
- package/node_modules/isarray/test.js +0 -20
- package/node_modules/number-is-nan/index.js +0 -4
- package/node_modules/number-is-nan/license +0 -21
- package/node_modules/number-is-nan/package.json +0 -35
- package/node_modules/number-is-nan/readme.md +0 -28
- package/node_modules/object-assign/index.js +0 -90
- package/node_modules/object-assign/license +0 -21
- package/node_modules/object-assign/package.json +0 -42
- package/node_modules/object-assign/readme.md +0 -61
- package/node_modules/process-nextick-args/index.js +0 -45
- package/node_modules/process-nextick-args/license.md +0 -19
- package/node_modules/process-nextick-args/package.json +0 -25
- package/node_modules/process-nextick-args/readme.md +0 -18
- package/node_modules/readable-stream/.travis.yml +0 -34
- package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -58
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/readable-stream/duplex-browser.js +0 -1
- package/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -214
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -685
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -78
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -84
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/readable-stream/package.json +0 -52
- package/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/readable-stream/readable-browser.js +0 -7
- package/node_modules/readable-stream/readable.js +0 -19
- package/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/readable-stream/writable-browser.js +0 -1
- package/node_modules/readable-stream/writable.js +0 -8
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -62
- package/node_modules/safe-buffer/package.json +0 -37
- package/node_modules/signal-exit/index.js +0 -202
- package/node_modules/signal-exit/signals.js +0 -53
- package/node_modules/string_decoder/.travis.yml +0 -50
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -31
- package/node_modules/util-deprecate/History.md +0 -16
- package/node_modules/util-deprecate/LICENSE +0 -24
- package/node_modules/util-deprecate/README.md +0 -53
- package/node_modules/util-deprecate/browser.js +0 -67
- package/node_modules/util-deprecate/node.js +0 -6
- package/node_modules/util-deprecate/package.json +0 -27
- package/node_modules/wide-align/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/wide-align/node_modules/ansi-regex/license +0 -9
- package/node_modules/wide-align/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/wide-align/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/wide-align/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/node_modules/wide-align/node_modules/is-fullwidth-code-point/license +0 -9
- package/node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json +0 -42
- package/node_modules/wide-align/node_modules/is-fullwidth-code-point/readme.md +0 -39
- package/node_modules/wide-align/node_modules/string-width/index.js +0 -47
- package/node_modules/wide-align/node_modules/string-width/license +0 -9
- package/node_modules/wide-align/node_modules/string-width/package.json +0 -56
- package/node_modules/wide-align/node_modules/string-width/readme.md +0 -50
- package/node_modules/wide-align/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/wide-align/node_modules/strip-ansi/license +0 -9
- package/node_modules/wide-align/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/wide-align/node_modules/strip-ansi/readme.md +0 -46
- /package/node_modules/{wide-align/node_modules/ansi-regex → ansi-regex}/index.d.ts +0 -0
- /package/node_modules/are-we-there-yet/{index.js → lib/index.js} +0 -0
- /package/node_modules/{npmlog → color-support}/LICENSE +0 -0
- /package/node_modules/gauge/{error.js → lib/error.js} +0 -0
- /package/node_modules/gauge/{process.js → lib/process.js} +0 -0
- /package/node_modules/gauge/{set-immediate.js → lib/set-immediate.js} +0 -0
- /package/node_modules/gauge/{set-interval.js → lib/set-interval.js} +0 -0
- /package/node_modules/gauge/{spin.js → lib/spin.js} +0 -0
- /package/node_modules/{wide-align/node_modules/is-fullwidth-code-point → is-fullwidth-code-point}/index.d.ts +0 -0
- /package/node_modules/{wide-align/node_modules/string-width → string-width}/index.d.ts +0 -0
- /package/node_modules/{wide-align/node_modules/strip-ansi → strip-ansi}/index.d.ts +0 -0
package/.eslintignore
CHANGED
package/.jsii
CHANGED
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
"bundled": {
|
|
11
11
|
"deep-diff": "^1.0.2",
|
|
12
12
|
"deepmerge": "^4.0.0",
|
|
13
|
-
"npmlog": "^
|
|
13
|
+
"npmlog": "^7.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"aws-cdk-
|
|
17
|
-
"
|
|
16
|
+
"@aws-cdk/integ-tests-alpha": "2.127.0-alpha.0",
|
|
17
|
+
"aws-cdk-lib": "2.127.0",
|
|
18
|
+
"constructs": "^10.0.0"
|
|
18
19
|
},
|
|
19
20
|
"dependencyClosure": {
|
|
20
21
|
"@aws-cdk/asset-awscli-v1": {
|
|
@@ -95,6 +96,37 @@
|
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
},
|
|
99
|
+
"@aws-cdk/integ-tests-alpha": {
|
|
100
|
+
"targets": {
|
|
101
|
+
"dotnet": {
|
|
102
|
+
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png",
|
|
103
|
+
"namespace": "Amazon.CDK.IntegTests.Alpha",
|
|
104
|
+
"packageId": "Amazon.CDK.IntegTests.Alpha"
|
|
105
|
+
},
|
|
106
|
+
"go": {
|
|
107
|
+
"moduleName": "github.com/aws/aws-cdk-go",
|
|
108
|
+
"packageName": "awscdkintegtestsalpha"
|
|
109
|
+
},
|
|
110
|
+
"java": {
|
|
111
|
+
"maven": {
|
|
112
|
+
"artifactId": "cdk-integ-tests-alpha",
|
|
113
|
+
"groupId": "software.amazon.awscdk"
|
|
114
|
+
},
|
|
115
|
+
"package": "software.amazon.awscdk.integtests.alpha"
|
|
116
|
+
},
|
|
117
|
+
"js": {
|
|
118
|
+
"npm": "@aws-cdk/integ-tests-alpha"
|
|
119
|
+
},
|
|
120
|
+
"python": {
|
|
121
|
+
"classifiers": [
|
|
122
|
+
"Framework :: AWS CDK",
|
|
123
|
+
"Framework :: AWS CDK :: 2"
|
|
124
|
+
],
|
|
125
|
+
"distName": "aws-cdk.integ-tests-alpha",
|
|
126
|
+
"module": "aws_cdk.integ_tests_alpha"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
98
130
|
"aws-cdk-lib": {
|
|
99
131
|
"submodules": {
|
|
100
132
|
"aws-cdk-lib.alexa_ask": {
|
|
@@ -984,6 +1016,19 @@
|
|
|
984
1016
|
}
|
|
985
1017
|
}
|
|
986
1018
|
},
|
|
1019
|
+
"aws-cdk-lib.aws_datazone": {
|
|
1020
|
+
"targets": {
|
|
1021
|
+
"dotnet": {
|
|
1022
|
+
"package": "Amazon.CDK.AWS.DataZone"
|
|
1023
|
+
},
|
|
1024
|
+
"java": {
|
|
1025
|
+
"package": "software.amazon.awscdk.services.datazone"
|
|
1026
|
+
},
|
|
1027
|
+
"python": {
|
|
1028
|
+
"module": "aws_cdk.aws_datazone"
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
987
1032
|
"aws-cdk-lib.aws_dax": {
|
|
988
1033
|
"targets": {
|
|
989
1034
|
"dotnet": {
|
|
@@ -7973,6 +8018,6 @@
|
|
|
7973
8018
|
"symbolId": "lib/waf-helper:WafWebAclProps"
|
|
7974
8019
|
}
|
|
7975
8020
|
},
|
|
7976
|
-
"version": "2.
|
|
7977
|
-
"fingerprint": "
|
|
8021
|
+
"version": "2.52.0",
|
|
8022
|
+
"fingerprint": "3kgOOmOvtdcbj/kElWhVcnIlW7g/G2UQtIIHdXDfwPQ="
|
|
7978
8023
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
module.exports = ({onlyFirst = false} = {}) => {
|
|
4
|
+
const pattern = [
|
|
5
|
+
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
|
6
|
+
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
|
|
7
|
+
].join('|');
|
|
8
|
+
|
|
9
|
+
return new RegExp(pattern, onlyFirst ? undefined : 'g');
|
|
4
10
|
};
|
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
4
|
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
11
6
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
14
8
|
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,64 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"ava": "0.17.0",
|
|
56
|
-
"xo": "0.16.0"
|
|
57
|
-
},
|
|
58
|
-
"xo": {
|
|
59
|
-
"rules": {
|
|
60
|
-
"guard-for-in": 0,
|
|
61
|
-
"no-loop-func": 0
|
|
62
|
-
}
|
|
63
|
-
}
|
|
2
|
+
"name": "ansi-regex",
|
|
3
|
+
"version": "5.0.1",
|
|
4
|
+
"description": "Regular expression for matching ANSI escape codes",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "chalk/ansi-regex",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=8"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "xo && ava && tsd",
|
|
17
|
+
"view-supported": "node fixtures/view-codes.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"index.js",
|
|
21
|
+
"index.d.ts"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"ansi",
|
|
25
|
+
"styles",
|
|
26
|
+
"color",
|
|
27
|
+
"colour",
|
|
28
|
+
"colors",
|
|
29
|
+
"terminal",
|
|
30
|
+
"console",
|
|
31
|
+
"cli",
|
|
32
|
+
"string",
|
|
33
|
+
"tty",
|
|
34
|
+
"escape",
|
|
35
|
+
"formatting",
|
|
36
|
+
"rgb",
|
|
37
|
+
"256",
|
|
38
|
+
"shell",
|
|
39
|
+
"xterm",
|
|
40
|
+
"command-line",
|
|
41
|
+
"text",
|
|
42
|
+
"regex",
|
|
43
|
+
"regexp",
|
|
44
|
+
"re",
|
|
45
|
+
"match",
|
|
46
|
+
"test",
|
|
47
|
+
"find",
|
|
48
|
+
"pattern"
|
|
49
|
+
],
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"ava": "^2.4.0",
|
|
52
|
+
"tsd": "^0.9.0",
|
|
53
|
+
"xo": "^0.25.3"
|
|
54
|
+
}
|
|
64
55
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# ansi-regex
|
|
1
|
+
# ansi-regex
|
|
2
2
|
|
|
3
|
-
> Regular expression for matching [ANSI escape codes](
|
|
3
|
+
> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
$ npm install
|
|
9
|
+
$ npm install ansi-regex
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
|
|
@@ -15,25 +15,64 @@ $ npm install --save ansi-regex
|
|
|
15
15
|
```js
|
|
16
16
|
const ansiRegex = require('ansi-regex');
|
|
17
17
|
|
|
18
|
-
ansiRegex().test('\
|
|
18
|
+
ansiRegex().test('\u001B[4mcake\u001B[0m');
|
|
19
19
|
//=> true
|
|
20
20
|
|
|
21
21
|
ansiRegex().test('cake');
|
|
22
22
|
//=> false
|
|
23
23
|
|
|
24
|
-
'\
|
|
25
|
-
//=> ['\
|
|
24
|
+
'\u001B[4mcake\u001B[0m'.match(ansiRegex());
|
|
25
|
+
//=> ['\u001B[4m', '\u001B[0m']
|
|
26
|
+
|
|
27
|
+
'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));
|
|
28
|
+
//=> ['\u001B[4m']
|
|
29
|
+
|
|
30
|
+
'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());
|
|
31
|
+
//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']
|
|
26
32
|
```
|
|
27
33
|
|
|
34
|
+
|
|
35
|
+
## API
|
|
36
|
+
|
|
37
|
+
### ansiRegex(options?)
|
|
38
|
+
|
|
39
|
+
Returns a regex for matching ANSI escape codes.
|
|
40
|
+
|
|
41
|
+
#### options
|
|
42
|
+
|
|
43
|
+
Type: `object`
|
|
44
|
+
|
|
45
|
+
##### onlyFirst
|
|
46
|
+
|
|
47
|
+
Type: `boolean`<br>
|
|
48
|
+
Default: `false` *(Matches any ANSI escape codes in a string)*
|
|
49
|
+
|
|
50
|
+
Match only the first ANSI escape.
|
|
51
|
+
|
|
52
|
+
|
|
28
53
|
## FAQ
|
|
29
54
|
|
|
30
55
|
### Why do you test for codes not in the ECMA 48 standard?
|
|
31
56
|
|
|
32
|
-
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes.
|
|
57
|
+
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
|
|
33
58
|
|
|
34
59
|
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
|
|
35
60
|
|
|
36
61
|
|
|
37
|
-
##
|
|
62
|
+
## Maintainers
|
|
63
|
+
|
|
64
|
+
- [Sindre Sorhus](https://github.com/sindresorhus)
|
|
65
|
+
- [Josh Junon](https://github.com/qix-)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
---
|
|
38
69
|
|
|
39
|
-
|
|
70
|
+
<div align="center">
|
|
71
|
+
<b>
|
|
72
|
+
<a href="https://tidelift.com/subscription/pkg/npm-ansi-regex?utm_source=npm-ansi-regex&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
|
73
|
+
</b>
|
|
74
|
+
<br>
|
|
75
|
+
<sub>
|
|
76
|
+
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
|
77
|
+
</sub>
|
|
78
|
+
</div>
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
+
module.exports = validate
|
|
2
3
|
|
|
3
4
|
function isArguments (thingy) {
|
|
4
5
|
return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
'*': {label: 'any', check:
|
|
9
|
-
A: {label: 'array', check:
|
|
10
|
-
S: {label: 'string', check:
|
|
11
|
-
N: {label: 'number', check:
|
|
12
|
-
F: {label: 'function', check:
|
|
13
|
-
O: {label: 'object', check:
|
|
14
|
-
B: {label: 'boolean', check:
|
|
15
|
-
E: {label: 'error', check:
|
|
16
|
-
Z: {label: 'null', check:
|
|
8
|
+
const types = {
|
|
9
|
+
'*': {label: 'any', check: () => true},
|
|
10
|
+
A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)},
|
|
11
|
+
S: {label: 'string', check: _ => typeof _ === 'string'},
|
|
12
|
+
N: {label: 'number', check: _ => typeof _ === 'number'},
|
|
13
|
+
F: {label: 'function', check: _ => typeof _ === 'function'},
|
|
14
|
+
O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)},
|
|
15
|
+
B: {label: 'boolean', check: _ => typeof _ === 'boolean'},
|
|
16
|
+
E: {label: 'error', check: _ => _ instanceof Error},
|
|
17
|
+
Z: {label: 'null', check: _ => _ == null}
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
function addSchema (schema, arity) {
|
|
20
|
-
|
|
21
|
+
const group = arity[schema.length] = arity[schema.length] || []
|
|
21
22
|
if (group.indexOf(schema) === -1) group.push(schema)
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
function validate (rawSchemas, args) {
|
|
25
26
|
if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
|
|
26
27
|
if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
|
|
27
28
|
if (!args) throw missingRequiredArg(1, 'args')
|
|
28
29
|
if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
|
|
29
30
|
if (!types.A.check(args)) throw invalidType(1, ['array'], args)
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
const schemas = rawSchemas.split('|')
|
|
32
|
+
const arity = {}
|
|
32
33
|
|
|
33
|
-
schemas.forEach(
|
|
34
|
-
for (
|
|
35
|
-
|
|
34
|
+
schemas.forEach(schema => {
|
|
35
|
+
for (let ii = 0; ii < schema.length; ++ii) {
|
|
36
|
+
const type = schema[ii]
|
|
36
37
|
if (!types[type]) throw unknownType(ii, type)
|
|
37
38
|
}
|
|
38
39
|
if (/E.*E/.test(schema)) throw moreThanOneError(schema)
|
|
@@ -43,20 +44,18 @@ var validate = module.exports = function (rawSchemas, args) {
|
|
|
43
44
|
if (schema.length === 1) addSchema('', arity)
|
|
44
45
|
}
|
|
45
46
|
})
|
|
46
|
-
|
|
47
|
+
let matching = arity[args.length]
|
|
47
48
|
if (!matching) {
|
|
48
49
|
throw wrongNumberOfArgs(Object.keys(arity), args.length)
|
|
49
50
|
}
|
|
50
|
-
for (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
for (let ii = 0; ii < args.length; ++ii) {
|
|
52
|
+
let newMatching = matching.filter(schema => {
|
|
53
|
+
const type = schema[ii]
|
|
54
|
+
const typeCheck = types[type].check
|
|
54
55
|
return typeCheck(args[ii])
|
|
55
56
|
})
|
|
56
57
|
if (!newMatching.length) {
|
|
57
|
-
|
|
58
|
-
return types[schema[ii]].label
|
|
59
|
-
}).filter(function (schema) { return schema != null })
|
|
58
|
+
const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null)
|
|
60
59
|
throw invalidType(ii, labels, args[ii])
|
|
61
60
|
}
|
|
62
61
|
matching = newMatching
|
|
@@ -72,8 +71,8 @@ function unknownType (num, type) {
|
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
function invalidType (num, expectedTypes, value) {
|
|
75
|
-
|
|
76
|
-
Object.keys(types).forEach(
|
|
74
|
+
let valueType
|
|
75
|
+
Object.keys(types).forEach(typeCode => {
|
|
77
76
|
if (types[typeCode].check(value)) valueType = types[typeCode].label
|
|
78
77
|
})
|
|
79
78
|
return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
|
|
@@ -85,8 +84,8 @@ function englishList (list) {
|
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
function wrongNumberOfArgs (expected, got) {
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
const english = englishList(expected)
|
|
88
|
+
const args = expected.every(ex => ex.length === 1)
|
|
90
89
|
? 'argument'
|
|
91
90
|
: 'arguments'
|
|
92
91
|
return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
|
|
@@ -98,8 +97,9 @@ function moreThanOneError (schema) {
|
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
function newException (code, msg) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
const err = new Error(msg)
|
|
101
|
+
err.code = code
|
|
102
|
+
/* istanbul ignore else */
|
|
103
|
+
if (Error.captureStackTrace) Error.captureStackTrace(err, validate)
|
|
104
|
+
return err
|
|
105
105
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aproba",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A ridiculously light-weight argument validator (now browser friendly)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -8,14 +8,15 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"standard": "^
|
|
12
|
-
"tap": "^
|
|
11
|
+
"standard": "^11.0.1",
|
|
12
|
+
"tap": "^12.0.1"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"index.js"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"
|
|
18
|
+
"pretest": "standard",
|
|
19
|
+
"test": "tap --100 -J test/*.js"
|
|
19
20
|
},
|
|
20
21
|
"repository": {
|
|
21
22
|
"type": "git",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright npm, Inc.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this
|
|
6
|
+
software for any purpose with or without fee is hereby
|
|
7
|
+
granted, provided that the above copyright notice and this
|
|
8
|
+
permission notice appear in all copies.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL
|
|
11
|
+
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
|
12
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
|
|
13
|
+
EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
16
|
+
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
17
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
|
|
18
|
+
USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
are-we-there-yet
|
|
2
2
|
----------------
|
|
3
3
|
|
|
4
|
-
Track complex
|
|
4
|
+
Track complex hierarchies of asynchronous task completion statuses. This is
|
|
5
5
|
intended to give you a way of recording and reporting the progress of the big
|
|
6
6
|
recursive fan-out and gather type workflows that are so common in async.
|
|
7
7
|
|
|
8
8
|
What you do with this completion data is up to you, but the most common use case is to
|
|
9
9
|
feed it to one of the many progress bar modules.
|
|
10
10
|
|
|
11
|
-
Most progress bar modules include a
|
|
11
|
+
Most progress bar modules include a rudimentary version of this, but my
|
|
12
12
|
needs were more complex.
|
|
13
13
|
|
|
14
14
|
Usage
|
|
@@ -85,7 +85,20 @@ TrackerGroup
|
|
|
85
85
|
notifications if the component updating didn't have a name. Defaults to undefined.
|
|
86
86
|
|
|
87
87
|
Creates a new empty tracker aggregation group. These are trackers whose
|
|
88
|
-
completion status is determined by the completion status of other trackers.
|
|
88
|
+
completion status is determined by the completion status of other trackers added to this aggregation group.
|
|
89
|
+
|
|
90
|
+
Ex.
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
var tracker = new TrackerGroup("parent")
|
|
94
|
+
var foo = tracker.newItem("firstChild", 100)
|
|
95
|
+
var bar = tracker.newItem("secondChild", 100)
|
|
96
|
+
|
|
97
|
+
foo.finish()
|
|
98
|
+
console.log(tracker.completed()) // 0.5
|
|
99
|
+
bar.finish()
|
|
100
|
+
console.log(tracker.completed()) // 1
|
|
101
|
+
```
|
|
89
102
|
|
|
90
103
|
* tracker.addUnit(**otherTracker**, **weight**)
|
|
91
104
|
|