@aws-solutions-constructs/core 2.51.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 +49 -4
  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 +8 -7
  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
@@ -1,296 +0,0 @@
1
- // Copyright Joyent, Inc. and other Node contributors.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a
4
- // copy of this software and associated documentation files (the
5
- // "Software"), to deal in the Software without restriction, including
6
- // without limitation the rights to use, copy, modify, merge, publish,
7
- // distribute, sublicense, and/or sell copies of the Software, and to permit
8
- // persons to whom the Software is furnished to do so, subject to the
9
- // following conditions:
10
- //
11
- // The above copyright notice and this permission notice shall be included
12
- // in all copies or substantial portions of the Software.
13
- //
14
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-
22
- 'use strict';
23
-
24
- /*<replacement>*/
25
-
26
- var Buffer = require('safe-buffer').Buffer;
27
- /*</replacement>*/
28
-
29
- var isEncoding = Buffer.isEncoding || function (encoding) {
30
- encoding = '' + encoding;
31
- switch (encoding && encoding.toLowerCase()) {
32
- case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
33
- return true;
34
- default:
35
- return false;
36
- }
37
- };
38
-
39
- function _normalizeEncoding(enc) {
40
- if (!enc) return 'utf8';
41
- var retried;
42
- while (true) {
43
- switch (enc) {
44
- case 'utf8':
45
- case 'utf-8':
46
- return 'utf8';
47
- case 'ucs2':
48
- case 'ucs-2':
49
- case 'utf16le':
50
- case 'utf-16le':
51
- return 'utf16le';
52
- case 'latin1':
53
- case 'binary':
54
- return 'latin1';
55
- case 'base64':
56
- case 'ascii':
57
- case 'hex':
58
- return enc;
59
- default:
60
- if (retried) return; // undefined
61
- enc = ('' + enc).toLowerCase();
62
- retried = true;
63
- }
64
- }
65
- };
66
-
67
- // Do not cache `Buffer.isEncoding` when checking encoding names as some
68
- // modules monkey-patch it to support additional encodings
69
- function normalizeEncoding(enc) {
70
- var nenc = _normalizeEncoding(enc);
71
- if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
72
- return nenc || enc;
73
- }
74
-
75
- // StringDecoder provides an interface for efficiently splitting a series of
76
- // buffers into a series of JS strings without breaking apart multi-byte
77
- // characters.
78
- exports.StringDecoder = StringDecoder;
79
- function StringDecoder(encoding) {
80
- this.encoding = normalizeEncoding(encoding);
81
- var nb;
82
- switch (this.encoding) {
83
- case 'utf16le':
84
- this.text = utf16Text;
85
- this.end = utf16End;
86
- nb = 4;
87
- break;
88
- case 'utf8':
89
- this.fillLast = utf8FillLast;
90
- nb = 4;
91
- break;
92
- case 'base64':
93
- this.text = base64Text;
94
- this.end = base64End;
95
- nb = 3;
96
- break;
97
- default:
98
- this.write = simpleWrite;
99
- this.end = simpleEnd;
100
- return;
101
- }
102
- this.lastNeed = 0;
103
- this.lastTotal = 0;
104
- this.lastChar = Buffer.allocUnsafe(nb);
105
- }
106
-
107
- StringDecoder.prototype.write = function (buf) {
108
- if (buf.length === 0) return '';
109
- var r;
110
- var i;
111
- if (this.lastNeed) {
112
- r = this.fillLast(buf);
113
- if (r === undefined) return '';
114
- i = this.lastNeed;
115
- this.lastNeed = 0;
116
- } else {
117
- i = 0;
118
- }
119
- if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
120
- return r || '';
121
- };
122
-
123
- StringDecoder.prototype.end = utf8End;
124
-
125
- // Returns only complete characters in a Buffer
126
- StringDecoder.prototype.text = utf8Text;
127
-
128
- // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
129
- StringDecoder.prototype.fillLast = function (buf) {
130
- if (this.lastNeed <= buf.length) {
131
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
132
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
133
- }
134
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
135
- this.lastNeed -= buf.length;
136
- };
137
-
138
- // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
139
- // continuation byte. If an invalid byte is detected, -2 is returned.
140
- function utf8CheckByte(byte) {
141
- if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
142
- return byte >> 6 === 0x02 ? -1 : -2;
143
- }
144
-
145
- // Checks at most 3 bytes at the end of a Buffer in order to detect an
146
- // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
147
- // needed to complete the UTF-8 character (if applicable) are returned.
148
- function utf8CheckIncomplete(self, buf, i) {
149
- var j = buf.length - 1;
150
- if (j < i) return 0;
151
- var nb = utf8CheckByte(buf[j]);
152
- if (nb >= 0) {
153
- if (nb > 0) self.lastNeed = nb - 1;
154
- return nb;
155
- }
156
- if (--j < i || nb === -2) return 0;
157
- nb = utf8CheckByte(buf[j]);
158
- if (nb >= 0) {
159
- if (nb > 0) self.lastNeed = nb - 2;
160
- return nb;
161
- }
162
- if (--j < i || nb === -2) return 0;
163
- nb = utf8CheckByte(buf[j]);
164
- if (nb >= 0) {
165
- if (nb > 0) {
166
- if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
167
- }
168
- return nb;
169
- }
170
- return 0;
171
- }
172
-
173
- // Validates as many continuation bytes for a multi-byte UTF-8 character as
174
- // needed or are available. If we see a non-continuation byte where we expect
175
- // one, we "replace" the validated continuation bytes we've seen so far with
176
- // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
177
- // behavior. The continuation byte check is included three times in the case
178
- // where all of the continuation bytes for a character exist in the same buffer.
179
- // It is also done this way as a slight performance increase instead of using a
180
- // loop.
181
- function utf8CheckExtraBytes(self, buf, p) {
182
- if ((buf[0] & 0xC0) !== 0x80) {
183
- self.lastNeed = 0;
184
- return '\ufffd';
185
- }
186
- if (self.lastNeed > 1 && buf.length > 1) {
187
- if ((buf[1] & 0xC0) !== 0x80) {
188
- self.lastNeed = 1;
189
- return '\ufffd';
190
- }
191
- if (self.lastNeed > 2 && buf.length > 2) {
192
- if ((buf[2] & 0xC0) !== 0x80) {
193
- self.lastNeed = 2;
194
- return '\ufffd';
195
- }
196
- }
197
- }
198
- }
199
-
200
- // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
201
- function utf8FillLast(buf) {
202
- var p = this.lastTotal - this.lastNeed;
203
- var r = utf8CheckExtraBytes(this, buf, p);
204
- if (r !== undefined) return r;
205
- if (this.lastNeed <= buf.length) {
206
- buf.copy(this.lastChar, p, 0, this.lastNeed);
207
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
208
- }
209
- buf.copy(this.lastChar, p, 0, buf.length);
210
- this.lastNeed -= buf.length;
211
- }
212
-
213
- // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
214
- // partial character, the character's bytes are buffered until the required
215
- // number of bytes are available.
216
- function utf8Text(buf, i) {
217
- var total = utf8CheckIncomplete(this, buf, i);
218
- if (!this.lastNeed) return buf.toString('utf8', i);
219
- this.lastTotal = total;
220
- var end = buf.length - (total - this.lastNeed);
221
- buf.copy(this.lastChar, 0, end);
222
- return buf.toString('utf8', i, end);
223
- }
224
-
225
- // For UTF-8, a replacement character is added when ending on a partial
226
- // character.
227
- function utf8End(buf) {
228
- var r = buf && buf.length ? this.write(buf) : '';
229
- if (this.lastNeed) return r + '\ufffd';
230
- return r;
231
- }
232
-
233
- // UTF-16LE typically needs two bytes per character, but even if we have an even
234
- // number of bytes available, we need to check if we end on a leading/high
235
- // surrogate. In that case, we need to wait for the next two bytes in order to
236
- // decode the last character properly.
237
- function utf16Text(buf, i) {
238
- if ((buf.length - i) % 2 === 0) {
239
- var r = buf.toString('utf16le', i);
240
- if (r) {
241
- var c = r.charCodeAt(r.length - 1);
242
- if (c >= 0xD800 && c <= 0xDBFF) {
243
- this.lastNeed = 2;
244
- this.lastTotal = 4;
245
- this.lastChar[0] = buf[buf.length - 2];
246
- this.lastChar[1] = buf[buf.length - 1];
247
- return r.slice(0, -1);
248
- }
249
- }
250
- return r;
251
- }
252
- this.lastNeed = 1;
253
- this.lastTotal = 2;
254
- this.lastChar[0] = buf[buf.length - 1];
255
- return buf.toString('utf16le', i, buf.length - 1);
256
- }
257
-
258
- // For UTF-16LE we do not explicitly append special replacement characters if we
259
- // end on a partial character, we simply let v8 handle that.
260
- function utf16End(buf) {
261
- var r = buf && buf.length ? this.write(buf) : '';
262
- if (this.lastNeed) {
263
- var end = this.lastTotal - this.lastNeed;
264
- return r + this.lastChar.toString('utf16le', 0, end);
265
- }
266
- return r;
267
- }
268
-
269
- function base64Text(buf, i) {
270
- var n = (buf.length - i) % 3;
271
- if (n === 0) return buf.toString('base64', i);
272
- this.lastNeed = 3 - n;
273
- this.lastTotal = 3;
274
- if (n === 1) {
275
- this.lastChar[0] = buf[buf.length - 1];
276
- } else {
277
- this.lastChar[0] = buf[buf.length - 2];
278
- this.lastChar[1] = buf[buf.length - 1];
279
- }
280
- return buf.toString('base64', i, buf.length - n);
281
- }
282
-
283
- function base64End(buf) {
284
- var r = buf && buf.length ? this.write(buf) : '';
285
- if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
286
- return r;
287
- }
288
-
289
- // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
290
- function simpleWrite(buf) {
291
- return buf.toString(this.encoding);
292
- }
293
-
294
- function simpleEnd(buf) {
295
- return buf && buf.length ? this.write(buf) : '';
296
- }
@@ -1,31 +0,0 @@
1
- {
2
- "name": "string_decoder",
3
- "version": "1.1.1",
4
- "description": "The string_decoder module from Node core",
5
- "main": "lib/string_decoder.js",
6
- "dependencies": {
7
- "safe-buffer": "~5.1.0"
8
- },
9
- "devDependencies": {
10
- "babel-polyfill": "^6.23.0",
11
- "core-util-is": "^1.0.2",
12
- "inherits": "^2.0.3",
13
- "tap": "~0.4.8"
14
- },
15
- "scripts": {
16
- "test": "tap test/parallel/*.js && node test/verify-dependencies",
17
- "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "git://github.com/nodejs/string_decoder.git"
22
- },
23
- "homepage": "https://github.com/nodejs/string_decoder",
24
- "keywords": [
25
- "string",
26
- "decoder",
27
- "browser",
28
- "browserify"
29
- ],
30
- "license": "MIT"
31
- }
@@ -1,16 +0,0 @@
1
-
2
- 1.0.2 / 2015-10-07
3
- ==================
4
-
5
- * use try/catch when checking `localStorage` (#3, @kumavis)
6
-
7
- 1.0.1 / 2014-11-25
8
- ==================
9
-
10
- * browser: use `console.warn()` for deprecation calls
11
- * browser: more jsdocs
12
-
13
- 1.0.0 / 2014-04-30
14
- ==================
15
-
16
- * initial commit
@@ -1,24 +0,0 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
4
-
5
- Permission is hereby granted, free of charge, to any person
6
- obtaining a copy of this software and associated documentation
7
- files (the "Software"), to deal in the Software without
8
- restriction, including without limitation the rights to use,
9
- copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the
11
- Software is furnished to do so, subject to the following
12
- conditions:
13
-
14
- The above copyright notice and this permission notice shall be
15
- included in all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
- OTHER DEALINGS IN THE SOFTWARE.
@@ -1,53 +0,0 @@
1
- util-deprecate
2
- ==============
3
- ### The Node.js `util.deprecate()` function with browser support
4
-
5
- In Node.js, this module simply re-exports the `util.deprecate()` function.
6
-
7
- In the web browser (i.e. via browserify), a browser-specific implementation
8
- of the `util.deprecate()` function is used.
9
-
10
-
11
- ## API
12
-
13
- A `deprecate()` function is the only thing exposed by this module.
14
-
15
- ``` javascript
16
- // setup:
17
- exports.foo = deprecate(foo, 'foo() is deprecated, use bar() instead');
18
-
19
-
20
- // users see:
21
- foo();
22
- // foo() is deprecated, use bar() instead
23
- foo();
24
- foo();
25
- ```
26
-
27
-
28
- ## License
29
-
30
- (The MIT License)
31
-
32
- Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
33
-
34
- Permission is hereby granted, free of charge, to any person
35
- obtaining a copy of this software and associated documentation
36
- files (the "Software"), to deal in the Software without
37
- restriction, including without limitation the rights to use,
38
- copy, modify, merge, publish, distribute, sublicense, and/or sell
39
- copies of the Software, and to permit persons to whom the
40
- Software is furnished to do so, subject to the following
41
- conditions:
42
-
43
- The above copyright notice and this permission notice shall be
44
- included in all copies or substantial portions of the Software.
45
-
46
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
47
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
48
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
49
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
50
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
51
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
52
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
53
- OTHER DEALINGS IN THE SOFTWARE.
@@ -1,67 +0,0 @@
1
-
2
- /**
3
- * Module exports.
4
- */
5
-
6
- module.exports = deprecate;
7
-
8
- /**
9
- * Mark that a method should not be used.
10
- * Returns a modified function which warns once by default.
11
- *
12
- * If `localStorage.noDeprecation = true` is set, then it is a no-op.
13
- *
14
- * If `localStorage.throwDeprecation = true` is set, then deprecated functions
15
- * will throw an Error when invoked.
16
- *
17
- * If `localStorage.traceDeprecation = true` is set, then deprecated functions
18
- * will invoke `console.trace()` instead of `console.error()`.
19
- *
20
- * @param {Function} fn - the function to deprecate
21
- * @param {String} msg - the string to print to the console when `fn` is invoked
22
- * @returns {Function} a new "deprecated" version of `fn`
23
- * @api public
24
- */
25
-
26
- function deprecate (fn, msg) {
27
- if (config('noDeprecation')) {
28
- return fn;
29
- }
30
-
31
- var warned = false;
32
- function deprecated() {
33
- if (!warned) {
34
- if (config('throwDeprecation')) {
35
- throw new Error(msg);
36
- } else if (config('traceDeprecation')) {
37
- console.trace(msg);
38
- } else {
39
- console.warn(msg);
40
- }
41
- warned = true;
42
- }
43
- return fn.apply(this, arguments);
44
- }
45
-
46
- return deprecated;
47
- }
48
-
49
- /**
50
- * Checks `localStorage` for boolean values for the given `name`.
51
- *
52
- * @param {String} name
53
- * @returns {Boolean}
54
- * @api private
55
- */
56
-
57
- function config (name) {
58
- // accessing global.localStorage can trigger a DOMException in sandboxed iframes
59
- try {
60
- if (!global.localStorage) return false;
61
- } catch (_) {
62
- return false;
63
- }
64
- var val = global.localStorage[name];
65
- if (null == val) return false;
66
- return String(val).toLowerCase() === 'true';
67
- }
@@ -1,6 +0,0 @@
1
-
2
- /**
3
- * For Node.js, simply re-export the core `util.deprecate` function.
4
- */
5
-
6
- module.exports = require('util').deprecate;
@@ -1,27 +0,0 @@
1
- {
2
- "name": "util-deprecate",
3
- "version": "1.0.2",
4
- "description": "The Node.js `util.deprecate()` function with browser support",
5
- "main": "node.js",
6
- "browser": "browser.js",
7
- "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1"
9
- },
10
- "repository": {
11
- "type": "git",
12
- "url": "git://github.com/TooTallNate/util-deprecate.git"
13
- },
14
- "keywords": [
15
- "util",
16
- "deprecate",
17
- "browserify",
18
- "browser",
19
- "node"
20
- ],
21
- "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
22
- "license": "MIT",
23
- "bugs": {
24
- "url": "https://github.com/TooTallNate/util-deprecate/issues"
25
- },
26
- "homepage": "https://github.com/TooTallNate/util-deprecate"
27
- }
@@ -1,10 +0,0 @@
1
- 'use strict';
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');
10
- };
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
-
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:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
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,55 +0,0 @@
1
- {
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
- }
55
- }
@@ -1,78 +0,0 @@
1
- # ansi-regex
2
-
3
- > Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
4
-
5
-
6
- ## Install
7
-
8
- ```
9
- $ npm install ansi-regex
10
- ```
11
-
12
-
13
- ## Usage
14
-
15
- ```js
16
- const ansiRegex = require('ansi-regex');
17
-
18
- ansiRegex().test('\u001B[4mcake\u001B[0m');
19
- //=> true
20
-
21
- ansiRegex().test('cake');
22
- //=> false
23
-
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']
32
- ```
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
-
53
- ## FAQ
54
-
55
- ### Why do you test for codes not in the ECMA 48 standard?
56
-
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.
58
-
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.
60
-
61
-
62
- ## Maintainers
63
-
64
- - [Sindre Sorhus](https://github.com/sindresorhus)
65
- - [Josh Junon](https://github.com/qix-)
66
-
67
-
68
- ---
69
-
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>