@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,187 +0,0 @@
1
- declare module "safe-buffer" {
2
- export class Buffer {
3
- length: number
4
- write(string: string, offset?: number, length?: number, encoding?: string): number;
5
- toString(encoding?: string, start?: number, end?: number): string;
6
- toJSON(): { type: 'Buffer', data: any[] };
7
- equals(otherBuffer: Buffer): boolean;
8
- compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
9
- copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
10
- slice(start?: number, end?: number): Buffer;
11
- writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
12
- writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
13
- writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
14
- writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
15
- readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
16
- readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
17
- readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
18
- readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
19
- readUInt8(offset: number, noAssert?: boolean): number;
20
- readUInt16LE(offset: number, noAssert?: boolean): number;
21
- readUInt16BE(offset: number, noAssert?: boolean): number;
22
- readUInt32LE(offset: number, noAssert?: boolean): number;
23
- readUInt32BE(offset: number, noAssert?: boolean): number;
24
- readInt8(offset: number, noAssert?: boolean): number;
25
- readInt16LE(offset: number, noAssert?: boolean): number;
26
- readInt16BE(offset: number, noAssert?: boolean): number;
27
- readInt32LE(offset: number, noAssert?: boolean): number;
28
- readInt32BE(offset: number, noAssert?: boolean): number;
29
- readFloatLE(offset: number, noAssert?: boolean): number;
30
- readFloatBE(offset: number, noAssert?: boolean): number;
31
- readDoubleLE(offset: number, noAssert?: boolean): number;
32
- readDoubleBE(offset: number, noAssert?: boolean): number;
33
- swap16(): Buffer;
34
- swap32(): Buffer;
35
- swap64(): Buffer;
36
- writeUInt8(value: number, offset: number, noAssert?: boolean): number;
37
- writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
38
- writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
39
- writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
40
- writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
41
- writeInt8(value: number, offset: number, noAssert?: boolean): number;
42
- writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
43
- writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
44
- writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
45
- writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
46
- writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
47
- writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
48
- writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
49
- writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
50
- fill(value: any, offset?: number, end?: number): this;
51
- indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
52
- lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
53
- includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
54
-
55
- /**
56
- * Allocates a new buffer containing the given {str}.
57
- *
58
- * @param str String to store in buffer.
59
- * @param encoding encoding to use, optional. Default is 'utf8'
60
- */
61
- constructor (str: string, encoding?: string);
62
- /**
63
- * Allocates a new buffer of {size} octets.
64
- *
65
- * @param size count of octets to allocate.
66
- */
67
- constructor (size: number);
68
- /**
69
- * Allocates a new buffer containing the given {array} of octets.
70
- *
71
- * @param array The octets to store.
72
- */
73
- constructor (array: Uint8Array);
74
- /**
75
- * Produces a Buffer backed by the same allocated memory as
76
- * the given {ArrayBuffer}.
77
- *
78
- *
79
- * @param arrayBuffer The ArrayBuffer with which to share memory.
80
- */
81
- constructor (arrayBuffer: ArrayBuffer);
82
- /**
83
- * Allocates a new buffer containing the given {array} of octets.
84
- *
85
- * @param array The octets to store.
86
- */
87
- constructor (array: any[]);
88
- /**
89
- * Copies the passed {buffer} data onto a new {Buffer} instance.
90
- *
91
- * @param buffer The buffer to copy.
92
- */
93
- constructor (buffer: Buffer);
94
- prototype: Buffer;
95
- /**
96
- * Allocates a new Buffer using an {array} of octets.
97
- *
98
- * @param array
99
- */
100
- static from(array: any[]): Buffer;
101
- /**
102
- * When passed a reference to the .buffer property of a TypedArray instance,
103
- * the newly created Buffer will share the same allocated memory as the TypedArray.
104
- * The optional {byteOffset} and {length} arguments specify a memory range
105
- * within the {arrayBuffer} that will be shared by the Buffer.
106
- *
107
- * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
108
- * @param byteOffset
109
- * @param length
110
- */
111
- static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
112
- /**
113
- * Copies the passed {buffer} data onto a new Buffer instance.
114
- *
115
- * @param buffer
116
- */
117
- static from(buffer: Buffer): Buffer;
118
- /**
119
- * Creates a new Buffer containing the given JavaScript string {str}.
120
- * If provided, the {encoding} parameter identifies the character encoding.
121
- * If not provided, {encoding} defaults to 'utf8'.
122
- *
123
- * @param str
124
- */
125
- static from(str: string, encoding?: string): Buffer;
126
- /**
127
- * Returns true if {obj} is a Buffer
128
- *
129
- * @param obj object to test.
130
- */
131
- static isBuffer(obj: any): obj is Buffer;
132
- /**
133
- * Returns true if {encoding} is a valid encoding argument.
134
- * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
135
- *
136
- * @param encoding string to test.
137
- */
138
- static isEncoding(encoding: string): boolean;
139
- /**
140
- * Gives the actual byte length of a string. encoding defaults to 'utf8'.
141
- * This is not the same as String.prototype.length since that returns the number of characters in a string.
142
- *
143
- * @param string string to test.
144
- * @param encoding encoding used to evaluate (defaults to 'utf8')
145
- */
146
- static byteLength(string: string, encoding?: string): number;
147
- /**
148
- * Returns a buffer which is the result of concatenating all the buffers in the list together.
149
- *
150
- * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
151
- * If the list has exactly one item, then the first item of the list is returned.
152
- * If the list has more than one item, then a new Buffer is created.
153
- *
154
- * @param list An array of Buffer objects to concatenate
155
- * @param totalLength Total length of the buffers when concatenated.
156
- * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
157
- */
158
- static concat(list: Buffer[], totalLength?: number): Buffer;
159
- /**
160
- * The same as buf1.compare(buf2).
161
- */
162
- static compare(buf1: Buffer, buf2: Buffer): number;
163
- /**
164
- * Allocates a new buffer of {size} octets.
165
- *
166
- * @param size count of octets to allocate.
167
- * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
168
- * If parameter is omitted, buffer will be filled with zeros.
169
- * @param encoding encoding used for call to buf.fill while initalizing
170
- */
171
- static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
172
- /**
173
- * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
174
- * of the newly created Buffer are unknown and may contain sensitive data.
175
- *
176
- * @param size count of octets to allocate
177
- */
178
- static allocUnsafe(size: number): Buffer;
179
- /**
180
- * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
181
- * of the newly created Buffer are unknown and may contain sensitive data.
182
- *
183
- * @param size count of octets to allocate
184
- */
185
- static allocUnsafeSlow(size: number): Buffer;
186
- }
187
- }
@@ -1,62 +0,0 @@
1
- /* eslint-disable node/no-deprecated-api */
2
- var buffer = require('buffer')
3
- var Buffer = buffer.Buffer
4
-
5
- // alternative to using Object.keys for old browsers
6
- function copyProps (src, dst) {
7
- for (var key in src) {
8
- dst[key] = src[key]
9
- }
10
- }
11
- if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
12
- module.exports = buffer
13
- } else {
14
- // Copy properties from require('buffer')
15
- copyProps(buffer, exports)
16
- exports.Buffer = SafeBuffer
17
- }
18
-
19
- function SafeBuffer (arg, encodingOrOffset, length) {
20
- return Buffer(arg, encodingOrOffset, length)
21
- }
22
-
23
- // Copy static methods from Buffer
24
- copyProps(Buffer, SafeBuffer)
25
-
26
- SafeBuffer.from = function (arg, encodingOrOffset, length) {
27
- if (typeof arg === 'number') {
28
- throw new TypeError('Argument must not be a number')
29
- }
30
- return Buffer(arg, encodingOrOffset, length)
31
- }
32
-
33
- SafeBuffer.alloc = function (size, fill, encoding) {
34
- if (typeof size !== 'number') {
35
- throw new TypeError('Argument must be a number')
36
- }
37
- var buf = Buffer(size)
38
- if (fill !== undefined) {
39
- if (typeof encoding === 'string') {
40
- buf.fill(fill, encoding)
41
- } else {
42
- buf.fill(fill)
43
- }
44
- } else {
45
- buf.fill(0)
46
- }
47
- return buf
48
- }
49
-
50
- SafeBuffer.allocUnsafe = function (size) {
51
- if (typeof size !== 'number') {
52
- throw new TypeError('Argument must be a number')
53
- }
54
- return Buffer(size)
55
- }
56
-
57
- SafeBuffer.allocUnsafeSlow = function (size) {
58
- if (typeof size !== 'number') {
59
- throw new TypeError('Argument must be a number')
60
- }
61
- return buffer.SlowBuffer(size)
62
- }
@@ -1,37 +0,0 @@
1
- {
2
- "name": "safe-buffer",
3
- "description": "Safer Node.js Buffer API",
4
- "version": "5.1.2",
5
- "author": {
6
- "name": "Feross Aboukhadijeh",
7
- "email": "feross@feross.org",
8
- "url": "http://feross.org"
9
- },
10
- "bugs": {
11
- "url": "https://github.com/feross/safe-buffer/issues"
12
- },
13
- "devDependencies": {
14
- "standard": "*",
15
- "tape": "^4.0.0"
16
- },
17
- "homepage": "https://github.com/feross/safe-buffer",
18
- "keywords": [
19
- "buffer",
20
- "buffer allocate",
21
- "node security",
22
- "safe",
23
- "safe-buffer",
24
- "security",
25
- "uninitialized"
26
- ],
27
- "license": "MIT",
28
- "main": "index.js",
29
- "types": "index.d.ts",
30
- "repository": {
31
- "type": "git",
32
- "url": "git://github.com/feross/safe-buffer.git"
33
- },
34
- "scripts": {
35
- "test": "standard && tape test/*.js"
36
- }
37
- }
@@ -1,202 +0,0 @@
1
- // Note: since nyc uses this module to output coverage, any lines
2
- // that are in the direct sync flow of nyc's outputCoverage are
3
- // ignored, since we can never get coverage for them.
4
- // grab a reference to node's real process object right away
5
- var process = global.process
6
-
7
- const processOk = function (process) {
8
- return process &&
9
- typeof process === 'object' &&
10
- typeof process.removeListener === 'function' &&
11
- typeof process.emit === 'function' &&
12
- typeof process.reallyExit === 'function' &&
13
- typeof process.listeners === 'function' &&
14
- typeof process.kill === 'function' &&
15
- typeof process.pid === 'number' &&
16
- typeof process.on === 'function'
17
- }
18
-
19
- // some kind of non-node environment, just no-op
20
- /* istanbul ignore if */
21
- if (!processOk(process)) {
22
- module.exports = function () {
23
- return function () {}
24
- }
25
- } else {
26
- var assert = require('assert')
27
- var signals = require('./signals.js')
28
- var isWin = /^win/i.test(process.platform)
29
-
30
- var EE = require('events')
31
- /* istanbul ignore if */
32
- if (typeof EE !== 'function') {
33
- EE = EE.EventEmitter
34
- }
35
-
36
- var emitter
37
- if (process.__signal_exit_emitter__) {
38
- emitter = process.__signal_exit_emitter__
39
- } else {
40
- emitter = process.__signal_exit_emitter__ = new EE()
41
- emitter.count = 0
42
- emitter.emitted = {}
43
- }
44
-
45
- // Because this emitter is a global, we have to check to see if a
46
- // previous version of this library failed to enable infinite listeners.
47
- // I know what you're about to say. But literally everything about
48
- // signal-exit is a compromise with evil. Get used to it.
49
- if (!emitter.infinite) {
50
- emitter.setMaxListeners(Infinity)
51
- emitter.infinite = true
52
- }
53
-
54
- module.exports = function (cb, opts) {
55
- /* istanbul ignore if */
56
- if (!processOk(global.process)) {
57
- return function () {}
58
- }
59
- assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
60
-
61
- if (loaded === false) {
62
- load()
63
- }
64
-
65
- var ev = 'exit'
66
- if (opts && opts.alwaysLast) {
67
- ev = 'afterexit'
68
- }
69
-
70
- var remove = function () {
71
- emitter.removeListener(ev, cb)
72
- if (emitter.listeners('exit').length === 0 &&
73
- emitter.listeners('afterexit').length === 0) {
74
- unload()
75
- }
76
- }
77
- emitter.on(ev, cb)
78
-
79
- return remove
80
- }
81
-
82
- var unload = function unload () {
83
- if (!loaded || !processOk(global.process)) {
84
- return
85
- }
86
- loaded = false
87
-
88
- signals.forEach(function (sig) {
89
- try {
90
- process.removeListener(sig, sigListeners[sig])
91
- } catch (er) {}
92
- })
93
- process.emit = originalProcessEmit
94
- process.reallyExit = originalProcessReallyExit
95
- emitter.count -= 1
96
- }
97
- module.exports.unload = unload
98
-
99
- var emit = function emit (event, code, signal) {
100
- /* istanbul ignore if */
101
- if (emitter.emitted[event]) {
102
- return
103
- }
104
- emitter.emitted[event] = true
105
- emitter.emit(event, code, signal)
106
- }
107
-
108
- // { <signal>: <listener fn>, ... }
109
- var sigListeners = {}
110
- signals.forEach(function (sig) {
111
- sigListeners[sig] = function listener () {
112
- /* istanbul ignore if */
113
- if (!processOk(global.process)) {
114
- return
115
- }
116
- // If there are no other listeners, an exit is coming!
117
- // Simplest way: remove us and then re-send the signal.
118
- // We know that this will kill the process, so we can
119
- // safely emit now.
120
- var listeners = process.listeners(sig)
121
- if (listeners.length === emitter.count) {
122
- unload()
123
- emit('exit', null, sig)
124
- /* istanbul ignore next */
125
- emit('afterexit', null, sig)
126
- /* istanbul ignore next */
127
- if (isWin && sig === 'SIGHUP') {
128
- // "SIGHUP" throws an `ENOSYS` error on Windows,
129
- // so use a supported signal instead
130
- sig = 'SIGINT'
131
- }
132
- /* istanbul ignore next */
133
- process.kill(process.pid, sig)
134
- }
135
- }
136
- })
137
-
138
- module.exports.signals = function () {
139
- return signals
140
- }
141
-
142
- var loaded = false
143
-
144
- var load = function load () {
145
- if (loaded || !processOk(global.process)) {
146
- return
147
- }
148
- loaded = true
149
-
150
- // This is the number of onSignalExit's that are in play.
151
- // It's important so that we can count the correct number of
152
- // listeners on signals, and don't wait for the other one to
153
- // handle it instead of us.
154
- emitter.count += 1
155
-
156
- signals = signals.filter(function (sig) {
157
- try {
158
- process.on(sig, sigListeners[sig])
159
- return true
160
- } catch (er) {
161
- return false
162
- }
163
- })
164
-
165
- process.emit = processEmit
166
- process.reallyExit = processReallyExit
167
- }
168
- module.exports.load = load
169
-
170
- var originalProcessReallyExit = process.reallyExit
171
- var processReallyExit = function processReallyExit (code) {
172
- /* istanbul ignore if */
173
- if (!processOk(global.process)) {
174
- return
175
- }
176
- process.exitCode = code || /* istanbul ignore next */ 0
177
- emit('exit', process.exitCode, null)
178
- /* istanbul ignore next */
179
- emit('afterexit', process.exitCode, null)
180
- /* istanbul ignore next */
181
- originalProcessReallyExit.call(process, process.exitCode)
182
- }
183
-
184
- var originalProcessEmit = process.emit
185
- var processEmit = function processEmit (ev, arg) {
186
- if (ev === 'exit' && processOk(global.process)) {
187
- /* istanbul ignore else */
188
- if (arg !== undefined) {
189
- process.exitCode = arg
190
- }
191
- var ret = originalProcessEmit.apply(this, arguments)
192
- /* istanbul ignore next */
193
- emit('exit', process.exitCode, null)
194
- /* istanbul ignore next */
195
- emit('afterexit', process.exitCode, null)
196
- /* istanbul ignore next */
197
- return ret
198
- } else {
199
- return originalProcessEmit.apply(this, arguments)
200
- }
201
- }
202
- }
@@ -1,53 +0,0 @@
1
- // This is not the set of all possible signals.
2
- //
3
- // It IS, however, the set of all signals that trigger
4
- // an exit on either Linux or BSD systems. Linux is a
5
- // superset of the signal names supported on BSD, and
6
- // the unknown signals just fail to register, so we can
7
- // catch that easily enough.
8
- //
9
- // Don't bother with SIGKILL. It's uncatchable, which
10
- // means that we can't fire any callbacks anyway.
11
- //
12
- // If a user does happen to register a handler on a non-
13
- // fatal signal like SIGWINCH or something, and then
14
- // exit, it'll end up firing `process.emit('exit')`, so
15
- // the handler will be fired anyway.
16
- //
17
- // SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
18
- // artificially, inherently leave the process in a
19
- // state from which it is not safe to try and enter JS
20
- // listeners.
21
- module.exports = [
22
- 'SIGABRT',
23
- 'SIGALRM',
24
- 'SIGHUP',
25
- 'SIGINT',
26
- 'SIGTERM'
27
- ]
28
-
29
- if (process.platform !== 'win32') {
30
- module.exports.push(
31
- 'SIGVTALRM',
32
- 'SIGXCPU',
33
- 'SIGXFSZ',
34
- 'SIGUSR2',
35
- 'SIGTRAP',
36
- 'SIGSYS',
37
- 'SIGQUIT',
38
- 'SIGIOT'
39
- // should detect profiler and enable/disable accordingly.
40
- // see #21
41
- // 'SIGPROF'
42
- )
43
- }
44
-
45
- if (process.platform === 'linux') {
46
- module.exports.push(
47
- 'SIGIO',
48
- 'SIGPOLL',
49
- 'SIGPWR',
50
- 'SIGSTKFLT',
51
- 'SIGUNUSED'
52
- )
53
- }
@@ -1,50 +0,0 @@
1
- sudo: false
2
- language: node_js
3
- before_install:
4
- - npm install -g npm@2
5
- - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g
6
- notifications:
7
- email: false
8
- matrix:
9
- fast_finish: true
10
- include:
11
- - node_js: '0.8'
12
- env:
13
- - TASK=test
14
- - NPM_LEGACY=true
15
- - node_js: '0.10'
16
- env:
17
- - TASK=test
18
- - NPM_LEGACY=true
19
- - node_js: '0.11'
20
- env:
21
- - TASK=test
22
- - NPM_LEGACY=true
23
- - node_js: '0.12'
24
- env:
25
- - TASK=test
26
- - NPM_LEGACY=true
27
- - node_js: 1
28
- env:
29
- - TASK=test
30
- - NPM_LEGACY=true
31
- - node_js: 2
32
- env:
33
- - TASK=test
34
- - NPM_LEGACY=true
35
- - node_js: 3
36
- env:
37
- - TASK=test
38
- - NPM_LEGACY=true
39
- - node_js: 4
40
- env: TASK=test
41
- - node_js: 5
42
- env: TASK=test
43
- - node_js: 6
44
- env: TASK=test
45
- - node_js: 7
46
- env: TASK=test
47
- - node_js: 8
48
- env: TASK=test
49
- - node_js: 9
50
- env: TASK=test
@@ -1,48 +0,0 @@
1
- Node.js is licensed for use as follows:
2
-
3
- """
4
- Copyright Node.js contributors. All rights reserved.
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to
8
- deal in the Software without restriction, including without limitation the
9
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
- sell copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
- IN THE SOFTWARE.
23
- """
24
-
25
- This license applies to parts of Node.js originating from the
26
- https://github.com/joyent/node repository:
27
-
28
- """
29
- Copyright Joyent, Inc. and other Node contributors. All rights reserved.
30
- Permission is hereby granted, free of charge, to any person obtaining a copy
31
- of this software and associated documentation files (the "Software"), to
32
- deal in the Software without restriction, including without limitation the
33
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
34
- sell copies of the Software, and to permit persons to whom the Software is
35
- furnished to do so, subject to the following conditions:
36
-
37
- The above copyright notice and this permission notice shall be included in
38
- all copies or substantial portions of the Software.
39
-
40
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
46
- IN THE SOFTWARE.
47
- """
48
-
@@ -1,47 +0,0 @@
1
- # string_decoder
2
-
3
- ***Node-core v8.9.4 string_decoder for userland***
4
-
5
-
6
- [![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/)
7
- [![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/)
8
-
9
-
10
- ```bash
11
- npm install --save string_decoder
12
- ```
13
-
14
- ***Node-core string_decoder for userland***
15
-
16
- This package is a mirror of the string_decoder implementation in Node-core.
17
-
18
- Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/).
19
-
20
- As of version 1.0.0 **string_decoder** uses semantic versioning.
21
-
22
- ## Previous versions
23
-
24
- Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10.
25
-
26
- ## Update
27
-
28
- The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version.
29
-
30
- ## Streams Working Group
31
-
32
- `string_decoder` is maintained by the Streams Working Group, which
33
- oversees the development and maintenance of the Streams API within
34
- Node.js. The responsibilities of the Streams Working Group include:
35
-
36
- * Addressing stream issues on the Node.js issue tracker.
37
- * Authoring and editing stream documentation within the Node.js project.
38
- * Reviewing changes to stream subclasses within the Node.js project.
39
- * Redirecting changes to streams from the Node.js project to this
40
- project.
41
- * Assisting in the implementation of stream providers within Node.js.
42
- * Recommending versions of `readable-stream` to be included in Node.js.
43
- * Messaging about the future of streams to give the community advance
44
- notice of changes.
45
-
46
- See [readable-stream](https://github.com/nodejs/readable-stream) for
47
- more details.