@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.
Files changed (200) hide show
  1. package/.eslintignore +2 -0
  2. package/.jsii +50 -5
  3. package/node_modules/ansi-regex/index.js +8 -2
  4. package/node_modules/ansi-regex/license +4 -16
  5. package/node_modules/ansi-regex/package.json +53 -62
  6. package/node_modules/ansi-regex/readme.md +48 -9
  7. package/node_modules/aproba/index.js +33 -33
  8. package/node_modules/aproba/package.json +5 -4
  9. package/node_modules/are-we-there-yet/LICENSE.md +18 -0
  10. package/node_modules/are-we-there-yet/README.md +16 -3
  11. package/node_modules/are-we-there-yet/lib/tracker-base.js +13 -0
  12. package/node_modules/are-we-there-yet/lib/tracker-group.js +112 -0
  13. package/node_modules/are-we-there-yet/lib/tracker-stream.js +42 -0
  14. package/node_modules/are-we-there-yet/lib/tracker.js +34 -0
  15. package/node_modules/are-we-there-yet/package.json +38 -20
  16. package/node_modules/color-support/README.md +129 -0
  17. package/node_modules/color-support/bin.js +3 -0
  18. package/node_modules/color-support/browser.js +14 -0
  19. package/node_modules/color-support/index.js +134 -0
  20. package/node_modules/color-support/package.json +36 -0
  21. package/node_modules/gauge/LICENSE.md +20 -0
  22. package/node_modules/gauge/README.md +19 -16
  23. package/node_modules/gauge/{base-theme.js → lib/base-theme.js} +7 -3
  24. package/node_modules/gauge/lib/has-color.js +4 -0
  25. package/node_modules/gauge/{index.js → lib/index.js} +90 -34
  26. package/node_modules/gauge/{plumbing.js → lib/plumbing.js} +3 -1
  27. package/node_modules/gauge/{progress-bar.js → lib/progress-bar.js} +12 -6
  28. package/node_modules/gauge/{render-template.js → lib/render-template.js} +69 -28
  29. package/node_modules/gauge/{template-item.js → lib/template-item.js} +21 -7
  30. package/node_modules/gauge/{theme-set.js → lib/theme-set.js} +31 -24
  31. package/node_modules/gauge/lib/themes.js +56 -0
  32. package/node_modules/gauge/{wide-truncate.js → lib/wide-truncate.js} +9 -3
  33. package/node_modules/gauge/package.json +47 -42
  34. package/node_modules/is-fullwidth-code-point/index.js +40 -36
  35. package/node_modules/is-fullwidth-code-point/license +4 -16
  36. package/node_modules/is-fullwidth-code-point/package.json +40 -43
  37. package/node_modules/is-fullwidth-code-point/readme.md +8 -8
  38. package/node_modules/npmlog/LICENSE.md +20 -0
  39. package/node_modules/npmlog/{log.js → lib/log.js} +149 -58
  40. package/node_modules/npmlog/package.json +36 -12
  41. package/node_modules/signal-exit/LICENSE.txt +1 -1
  42. package/node_modules/signal-exit/README.md +56 -21
  43. package/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
  44. package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
  45. package/node_modules/signal-exit/dist/cjs/browser.js +10 -0
  46. package/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
  47. package/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
  48. package/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
  49. package/node_modules/signal-exit/dist/cjs/index.js +279 -0
  50. package/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
  51. package/node_modules/signal-exit/dist/cjs/package.json +3 -0
  52. package/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
  53. package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
  54. package/node_modules/signal-exit/dist/cjs/signals.js +42 -0
  55. package/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
  56. package/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
  57. package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
  58. package/node_modules/signal-exit/dist/mjs/browser.js +4 -0
  59. package/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
  60. package/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
  61. package/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
  62. package/node_modules/signal-exit/dist/mjs/index.js +275 -0
  63. package/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
  64. package/node_modules/signal-exit/dist/mjs/package.json +3 -0
  65. package/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
  66. package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
  67. package/node_modules/signal-exit/dist/mjs/signals.js +39 -0
  68. package/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
  69. package/node_modules/signal-exit/package.json +87 -19
  70. package/node_modules/string-width/index.js +29 -19
  71. package/node_modules/string-width/license +4 -16
  72. package/node_modules/string-width/package.json +54 -54
  73. package/node_modules/string-width/readme.md +17 -9
  74. package/node_modules/strip-ansi/index.js +2 -4
  75. package/node_modules/strip-ansi/license +4 -16
  76. package/node_modules/strip-ansi/package.json +52 -55
  77. package/node_modules/strip-ansi/readme.md +20 -7
  78. package/package.json +11 -10
  79. package/test/test-helper.d.ts +1 -1
  80. package/test/test-helper.js +5 -5
  81. package/node_modules/are-we-there-yet/CHANGES.md +0 -37
  82. package/node_modules/are-we-there-yet/LICENSE +0 -5
  83. package/node_modules/are-we-there-yet/tracker-base.js +0 -11
  84. package/node_modules/are-we-there-yet/tracker-group.js +0 -107
  85. package/node_modules/are-we-there-yet/tracker-stream.js +0 -36
  86. package/node_modules/are-we-there-yet/tracker.js +0 -30
  87. package/node_modules/code-point-at/index.js +0 -32
  88. package/node_modules/code-point-at/license +0 -21
  89. package/node_modules/code-point-at/package.json +0 -38
  90. package/node_modules/code-point-at/readme.md +0 -32
  91. package/node_modules/core-util-is/LICENSE +0 -19
  92. package/node_modules/core-util-is/README.md +0 -3
  93. package/node_modules/core-util-is/lib/util.js +0 -107
  94. package/node_modules/core-util-is/package.json +0 -38
  95. package/node_modules/delegates/.npmignore +0 -1
  96. package/node_modules/delegates/History.md +0 -22
  97. package/node_modules/delegates/License +0 -20
  98. package/node_modules/delegates/Makefile +0 -8
  99. package/node_modules/delegates/Readme.md +0 -94
  100. package/node_modules/delegates/index.js +0 -121
  101. package/node_modules/delegates/package.json +0 -13
  102. package/node_modules/delegates/test/index.js +0 -94
  103. package/node_modules/gauge/CHANGELOG.md +0 -160
  104. package/node_modules/gauge/LICENSE +0 -13
  105. package/node_modules/gauge/has-color.js +0 -12
  106. package/node_modules/gauge/themes.js +0 -54
  107. package/node_modules/inherits/LICENSE +0 -16
  108. package/node_modules/inherits/README.md +0 -42
  109. package/node_modules/inherits/inherits.js +0 -9
  110. package/node_modules/inherits/inherits_browser.js +0 -27
  111. package/node_modules/inherits/package.json +0 -29
  112. package/node_modules/isarray/.npmignore +0 -1
  113. package/node_modules/isarray/.travis.yml +0 -4
  114. package/node_modules/isarray/Makefile +0 -6
  115. package/node_modules/isarray/README.md +0 -60
  116. package/node_modules/isarray/component.json +0 -19
  117. package/node_modules/isarray/index.js +0 -5
  118. package/node_modules/isarray/package.json +0 -45
  119. package/node_modules/isarray/test.js +0 -20
  120. package/node_modules/number-is-nan/index.js +0 -4
  121. package/node_modules/number-is-nan/license +0 -21
  122. package/node_modules/number-is-nan/package.json +0 -35
  123. package/node_modules/number-is-nan/readme.md +0 -28
  124. package/node_modules/object-assign/index.js +0 -90
  125. package/node_modules/object-assign/license +0 -21
  126. package/node_modules/object-assign/package.json +0 -42
  127. package/node_modules/object-assign/readme.md +0 -61
  128. package/node_modules/process-nextick-args/index.js +0 -45
  129. package/node_modules/process-nextick-args/license.md +0 -19
  130. package/node_modules/process-nextick-args/package.json +0 -25
  131. package/node_modules/process-nextick-args/readme.md +0 -18
  132. package/node_modules/readable-stream/.travis.yml +0 -34
  133. package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
  134. package/node_modules/readable-stream/GOVERNANCE.md +0 -136
  135. package/node_modules/readable-stream/LICENSE +0 -47
  136. package/node_modules/readable-stream/README.md +0 -58
  137. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
  138. package/node_modules/readable-stream/duplex-browser.js +0 -1
  139. package/node_modules/readable-stream/duplex.js +0 -1
  140. package/node_modules/readable-stream/lib/_stream_duplex.js +0 -131
  141. package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -47
  142. package/node_modules/readable-stream/lib/_stream_readable.js +0 -1019
  143. package/node_modules/readable-stream/lib/_stream_transform.js +0 -214
  144. package/node_modules/readable-stream/lib/_stream_writable.js +0 -685
  145. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -78
  146. package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -84
  147. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  148. package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  149. package/node_modules/readable-stream/package.json +0 -52
  150. package/node_modules/readable-stream/passthrough.js +0 -1
  151. package/node_modules/readable-stream/readable-browser.js +0 -7
  152. package/node_modules/readable-stream/readable.js +0 -19
  153. package/node_modules/readable-stream/transform.js +0 -1
  154. package/node_modules/readable-stream/writable-browser.js +0 -1
  155. package/node_modules/readable-stream/writable.js +0 -8
  156. package/node_modules/safe-buffer/LICENSE +0 -21
  157. package/node_modules/safe-buffer/README.md +0 -584
  158. package/node_modules/safe-buffer/index.d.ts +0 -187
  159. package/node_modules/safe-buffer/index.js +0 -62
  160. package/node_modules/safe-buffer/package.json +0 -37
  161. package/node_modules/signal-exit/index.js +0 -202
  162. package/node_modules/signal-exit/signals.js +0 -53
  163. package/node_modules/string_decoder/.travis.yml +0 -50
  164. package/node_modules/string_decoder/LICENSE +0 -48
  165. package/node_modules/string_decoder/README.md +0 -47
  166. package/node_modules/string_decoder/lib/string_decoder.js +0 -296
  167. package/node_modules/string_decoder/package.json +0 -31
  168. package/node_modules/util-deprecate/History.md +0 -16
  169. package/node_modules/util-deprecate/LICENSE +0 -24
  170. package/node_modules/util-deprecate/README.md +0 -53
  171. package/node_modules/util-deprecate/browser.js +0 -67
  172. package/node_modules/util-deprecate/node.js +0 -6
  173. package/node_modules/util-deprecate/package.json +0 -27
  174. package/node_modules/wide-align/node_modules/ansi-regex/index.js +0 -10
  175. package/node_modules/wide-align/node_modules/ansi-regex/license +0 -9
  176. package/node_modules/wide-align/node_modules/ansi-regex/package.json +0 -55
  177. package/node_modules/wide-align/node_modules/ansi-regex/readme.md +0 -78
  178. package/node_modules/wide-align/node_modules/is-fullwidth-code-point/index.js +0 -50
  179. package/node_modules/wide-align/node_modules/is-fullwidth-code-point/license +0 -9
  180. package/node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json +0 -42
  181. package/node_modules/wide-align/node_modules/is-fullwidth-code-point/readme.md +0 -39
  182. package/node_modules/wide-align/node_modules/string-width/index.js +0 -47
  183. package/node_modules/wide-align/node_modules/string-width/license +0 -9
  184. package/node_modules/wide-align/node_modules/string-width/package.json +0 -56
  185. package/node_modules/wide-align/node_modules/string-width/readme.md +0 -50
  186. package/node_modules/wide-align/node_modules/strip-ansi/index.js +0 -4
  187. package/node_modules/wide-align/node_modules/strip-ansi/license +0 -9
  188. package/node_modules/wide-align/node_modules/strip-ansi/package.json +0 -54
  189. package/node_modules/wide-align/node_modules/strip-ansi/readme.md +0 -46
  190. /package/node_modules/{wide-align/node_modules/ansi-regex → ansi-regex}/index.d.ts +0 -0
  191. /package/node_modules/are-we-there-yet/{index.js → lib/index.js} +0 -0
  192. /package/node_modules/{npmlog → color-support}/LICENSE +0 -0
  193. /package/node_modules/gauge/{error.js → lib/error.js} +0 -0
  194. /package/node_modules/gauge/{process.js → lib/process.js} +0 -0
  195. /package/node_modules/gauge/{set-immediate.js → lib/set-immediate.js} +0 -0
  196. /package/node_modules/gauge/{set-interval.js → lib/set-interval.js} +0 -0
  197. /package/node_modules/gauge/{spin.js → lib/spin.js} +0 -0
  198. /package/node_modules/{wide-align/node_modules/is-fullwidth-code-point → is-fullwidth-code-point}/index.d.ts +0 -0
  199. /package/node_modules/{wide-align/node_modules/string-width → string-width}/index.d.ts +0 -0
  200. /package/node_modules/{wide-align/node_modules/strip-ansi → strip-ansi}/index.d.ts +0 -0
package/.eslintignore CHANGED
@@ -3,5 +3,7 @@ lib/*.js
3
3
  test/*.js
4
4
  *.d.ts
5
5
  coverage
6
+ test/integ.*.js.snapshot/
7
+ test/cdk-integ.out.integ.*.snapshot
6
8
  test/lambda/index.js
7
9
  test/lambda-test/index.js
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": "^4.1.2"
13
+ "npmlog": "^7.0.0"
14
14
  },
15
15
  "dependencies": {
16
- "aws-cdk-lib": "2.118.0",
17
- "constructs": "10.0.0"
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.50.0",
7977
- "fingerprint": "1o9Uwh3LMy39gspt7XcKzMaqM0kzjToOhykv+Xzo1x4="
8021
+ "version": "2.52.0",
8022
+ "fingerprint": "3kgOOmOvtdcbj/kElWhVcnIlW7g/G2UQtIIHdXDfwPQ="
7978
8023
  }
@@ -1,4 +1,10 @@
1
1
  'use strict';
2
- module.exports = function () {
3
- return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
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
- The MIT License (MIT)
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
- "name": "ansi-regex",
3
- "version": "2.1.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
- "maintainers": [
13
- "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
14
- "Joshua Appelman <jappelman@xebia.com> (jbnicolai.com)",
15
- "JD Ballard <i.am.qix@gmail.com> (github.com/qix-)"
16
- ],
17
- "engines": {
18
- "node": ">=0.10.0"
19
- },
20
- "scripts": {
21
- "test": "xo && ava --verbose",
22
- "view-supported": "node fixtures/view-codes.js"
23
- },
24
- "files": [
25
- "index.js"
26
- ],
27
- "keywords": [
28
- "ansi",
29
- "styles",
30
- "color",
31
- "colour",
32
- "colors",
33
- "terminal",
34
- "console",
35
- "cli",
36
- "string",
37
- "tty",
38
- "escape",
39
- "formatting",
40
- "rgb",
41
- "256",
42
- "shell",
43
- "xterm",
44
- "command-line",
45
- "text",
46
- "regex",
47
- "regexp",
48
- "re",
49
- "match",
50
- "test",
51
- "find",
52
- "pattern"
53
- ],
54
- "devDependencies": {
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 [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
1
+ # ansi-regex
2
2
 
3
- > Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
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 --save ansi-regex
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('\u001b[4mcake\u001b[0m');
18
+ ansiRegex().test('\u001B[4mcake\u001B[0m');
19
19
  //=> true
20
20
 
21
21
  ansiRegex().test('cake');
22
22
  //=> false
23
23
 
24
- '\u001b[4mcake\u001b[0m'.match(ansiRegex());
25
- //=> ['\u001b[4m', '\u001b[0m']
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. If I recall correctly, 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.
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
- ## License
62
+ ## Maintainers
63
+
64
+ - [Sindre Sorhus](https://github.com/sindresorhus)
65
+ - [Josh Junon](https://github.com/qix-)
66
+
67
+
68
+ ---
38
69
 
39
- MIT © [Sindre Sorhus](http://sindresorhus.com)
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
- var types = {
8
- '*': {label: 'any', check: function () { return true }},
9
- A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
10
- S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
11
- N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
12
- F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
13
- O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
14
- B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
15
- E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
16
- Z: {label: 'null', check: function (thingy) { return thingy == null }}
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
- var group = arity[schema.length] = arity[schema.length] || []
21
+ const group = arity[schema.length] = arity[schema.length] || []
21
22
  if (group.indexOf(schema) === -1) group.push(schema)
22
23
  }
23
24
 
24
- var validate = module.exports = function (rawSchemas, args) {
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
- var schemas = rawSchemas.split('|')
31
- var arity = {}
31
+ const schemas = rawSchemas.split('|')
32
+ const arity = {}
32
33
 
33
- schemas.forEach(function (schema) {
34
- for (var ii = 0; ii < schema.length; ++ii) {
35
- var type = schema[ii]
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
- var matching = arity[args.length]
47
+ let matching = arity[args.length]
47
48
  if (!matching) {
48
49
  throw wrongNumberOfArgs(Object.keys(arity), args.length)
49
50
  }
50
- for (var ii = 0; ii < args.length; ++ii) {
51
- var newMatching = matching.filter(function (schema) {
52
- var type = schema[ii]
53
- var typeCheck = types[type].check
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
- var labels = matching.map(function (schema) {
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
- var valueType
76
- Object.keys(types).forEach(function (typeCode) {
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
- var english = englishList(expected)
89
- var args = expected.every(function (ex) { return ex.length === 1 })
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
- var e = new Error(msg)
102
- e.code = code
103
- if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
104
- return e
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": "1.2.0",
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": "^10.0.3",
12
- "tap": "^10.0.2"
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
- "test": "standard && tap -j3 test/*.js"
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 hiearchies of asynchronous task completion statuses. This is
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 rudamentary version of this, but my
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
 
@@ -0,0 +1,13 @@
1
+ 'use strict'
2
+ const EventEmitter = require('events')
3
+
4
+ let trackerId = 0
5
+ class TrackerBase extends EventEmitter {
6
+ constructor (name) {
7
+ super()
8
+ this.id = ++trackerId
9
+ this.name = name
10
+ }
11
+ }
12
+
13
+ module.exports = TrackerBase