cloudstructs 0.4.20 → 0.4.23

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 (149) hide show
  1. package/.jsii +3 -3
  2. package/assets/email-receiver/s3.lambda/index.js +8 -13
  3. package/assets/email-receiver/whitelist.lambda/index.js +8 -13
  4. package/assets/slack-app/provider.lambda/index.js +203 -35
  5. package/assets/slack-events/events.lambda/index.js +9 -16
  6. package/assets/slack-textract/detect.lambda/index.js +323 -93
  7. package/assets/toolkit-cleaner/clean-images.lambda/index.js +8 -13
  8. package/assets/toolkit-cleaner/clean-objects.lambda/index.js +9 -16
  9. package/assets/toolkit-cleaner/extract-template-hashes.lambda/index.js +8 -13
  10. package/assets/toolkit-cleaner/get-stack-names.lambda/index.js +8 -13
  11. package/assets/url-shortener/shortener.lambda/index.js +8 -13
  12. package/changelog.md +1 -1
  13. package/lib/codecommit-mirror/index.js +2 -2
  14. package/lib/ecs-service-roller/index.js +2 -2
  15. package/lib/email-receiver/receiver.js +1 -1
  16. package/lib/saml-identity-provider/index.js +2 -2
  17. package/lib/slack-app/manifest.js +1 -1
  18. package/lib/slack-app/slack-app.js +2 -2
  19. package/lib/slack-events/index.js +1 -1
  20. package/lib/slack-textract/index.js +1 -1
  21. package/lib/state-machine-cr-provider/index.js +1 -1
  22. package/lib/static-website/index.js +14 -3
  23. package/lib/toolkit-cleaner/index.js +1 -1
  24. package/lib/url-shortener/index.js +1 -1
  25. package/node_modules/@sindresorhus/is/dist/index.d.ts +9 -4
  26. package/node_modules/@sindresorhus/is/dist/index.js +9 -3
  27. package/node_modules/@sindresorhus/is/package.json +1 -1
  28. package/node_modules/@sindresorhus/is/readme.md +24 -4
  29. package/node_modules/@slack/logger/node_modules/@types/node/README.md +2 -2
  30. package/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +1 -1
  31. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +2 -2
  32. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +41 -10
  33. package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +19 -1
  34. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +48 -14
  35. package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +12 -2
  36. package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +1 -0
  37. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +7 -0
  38. package/node_modules/@slack/logger/node_modules/@types/node/package.json +3 -3
  39. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +1 -1
  40. package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +2 -1
  41. package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +1 -1
  42. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
  43. package/node_modules/@slack/web-api/node_modules/@types/node/async_hooks.d.ts +1 -1
  44. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +2 -2
  45. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +41 -10
  46. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +19 -1
  47. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +48 -14
  48. package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +12 -2
  49. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +1 -0
  50. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +7 -0
  51. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +3 -3
  52. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +1 -1
  53. package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +2 -1
  54. package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +1 -1
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +1 -1
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +2 -2
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +41 -10
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +19 -1
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +48 -14
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +12 -2
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +1 -0
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +7 -0
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +3 -3
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1 -1
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +2 -1
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +1 -1
  68. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +2 -2
  69. package/node_modules/@types/is-stream/node_modules/@types/node/async_hooks.d.ts +1 -1
  70. package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +2 -2
  71. package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +41 -10
  72. package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +19 -1
  73. package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +48 -14
  74. package/node_modules/@types/is-stream/node_modules/@types/node/globals.d.ts +12 -2
  75. package/node_modules/@types/is-stream/node_modules/@types/node/http2.d.ts +1 -0
  76. package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +7 -0
  77. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +3 -3
  78. package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +1 -1
  79. package/node_modules/@types/is-stream/node_modules/@types/node/stream/web.d.ts +2 -1
  80. package/node_modules/@types/is-stream/node_modules/@types/node/tls.d.ts +1 -1
  81. package/node_modules/@types/json-buffer/LICENSE +21 -0
  82. package/node_modules/@types/json-buffer/README.md +16 -0
  83. package/node_modules/@types/json-buffer/index.d.ts +19 -0
  84. package/node_modules/@types/json-buffer/package.json +24 -0
  85. package/node_modules/@types/keyv/README.md +1 -1
  86. package/node_modules/@types/keyv/index.d.ts +16 -3
  87. package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
  88. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +1 -1
  89. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +2 -2
  90. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +41 -10
  91. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +19 -1
  92. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +48 -14
  93. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +12 -2
  94. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +1 -0
  95. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +7 -0
  96. package/node_modules/@types/keyv/node_modules/@types/node/package.json +3 -3
  97. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1 -1
  98. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +2 -1
  99. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +1 -1
  100. package/node_modules/@types/keyv/package.json +3 -3
  101. package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
  102. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +1 -1
  103. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +2 -2
  104. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +41 -10
  105. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +19 -1
  106. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +48 -14
  107. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +12 -2
  108. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +1 -0
  109. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +7 -0
  110. package/node_modules/@types/responselike/node_modules/@types/node/package.json +3 -3
  111. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1 -1
  112. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +2 -1
  113. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +1 -1
  114. package/node_modules/@types/retry/LICENSE +21 -21
  115. package/node_modules/@types/retry/README.md +4 -4
  116. package/node_modules/@types/retry/index.d.ts +9 -9
  117. package/node_modules/@types/retry/package.json +5 -7
  118. package/node_modules/compress-brotli/LICENSE.md +21 -0
  119. package/node_modules/compress-brotli/README.md +125 -0
  120. package/node_modules/compress-brotli/package.json +97 -0
  121. package/node_modules/compress-brotli/src/index.d.ts +36 -0
  122. package/node_modules/compress-brotli/src/index.js +45 -0
  123. package/node_modules/compress-brotli/src/merge-options.js +18 -0
  124. package/node_modules/follow-redirects/README.md +8 -1
  125. package/node_modules/follow-redirects/index.js +102 -82
  126. package/node_modules/follow-redirects/package.json +1 -1
  127. package/node_modules/keyv/package.json +55 -46
  128. package/node_modules/keyv/src/index.d.ts +89 -0
  129. package/node_modules/keyv/src/index.js +177 -25
  130. package/node_modules/mime-db/HISTORY.md +8 -0
  131. package/node_modules/mime-db/LICENSE +19 -18
  132. package/node_modules/mime-db/README.md +1 -1
  133. package/node_modules/mime-db/db.json +54 -6
  134. package/node_modules/mime-db/index.js +1 -0
  135. package/node_modules/mime-db/package.json +5 -4
  136. package/node_modules/mime-types/HISTORY.md +9 -0
  137. package/node_modules/mime-types/README.md +1 -1
  138. package/node_modules/mime-types/package.json +5 -5
  139. package/node_modules/p-retry/package.json +2 -2
  140. package/package.json +10 -10
  141. package/releasetag.txt +1 -1
  142. package/version.txt +1 -1
  143. package/node_modules/keyv/.nyc_output/5d6b8dd1-67cf-42ee-8492-c8ae62ce826c.json +0 -1
  144. package/node_modules/keyv/.nyc_output/ce27532e-5888-46d4-ae10-5a71058d3f0c.json +0 -1
  145. package/node_modules/keyv/.nyc_output/processinfo/5d6b8dd1-67cf-42ee-8492-c8ae62ce826c.json +0 -1
  146. package/node_modules/keyv/.nyc_output/processinfo/ce27532e-5888-46d4-ae10-5a71058d3f0c.json +0 -1
  147. package/node_modules/keyv/.nyc_output/processinfo/index.json +0 -1
  148. package/node_modules/keyv/test/test.js +0 -130
  149. package/node_modules/keyv/test/testdb.sqlite +0 -0
@@ -2233,6 +2233,23 @@ declare module 'fs' {
2233
2233
  */
2234
2234
  export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
2235
2235
  export type ReadPosition = number | bigint;
2236
+ export interface ReadSyncOptions {
2237
+ /**
2238
+ * @default 0
2239
+ */
2240
+ offset?: number | undefined;
2241
+ /**
2242
+ * @default `length of buffer`
2243
+ */
2244
+ length?: number | undefined;
2245
+ /**
2246
+ * @default null
2247
+ */
2248
+ position?: ReadPosition | null | undefined;
2249
+ }
2250
+ export interface ReadAsyncOptions<TBuffer extends NodeJS.ArrayBufferView> extends ReadSyncOptions {
2251
+ buffer?: TBuffer;
2252
+ }
2236
2253
  /**
2237
2254
  * Read data from the file specified by `fd`.
2238
2255
  *
@@ -2258,6 +2275,24 @@ declare module 'fs' {
2258
2275
  position: ReadPosition | null,
2259
2276
  callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
2260
2277
  ): void;
2278
+ /**
2279
+ * Similar to the above `fs.read` function, this version takes an optional `options` object.
2280
+ * If not otherwise specified in an `options` object,
2281
+ * `buffer` defaults to `Buffer.alloc(16384)`,
2282
+ * `offset` defaults to `0`,
2283
+ * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0
2284
+ * `position` defaults to `null`
2285
+ * @since v12.17.0, 13.11.0
2286
+ */
2287
+ export function read<TBuffer extends NodeJS.ArrayBufferView>(
2288
+ fd: number,
2289
+ options: ReadAsyncOptions<TBuffer>,
2290
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void
2291
+ ): void;
2292
+ export function read(
2293
+ fd: number,
2294
+ callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NodeJS.ArrayBufferView) => void
2295
+ ): void;
2261
2296
  export namespace read {
2262
2297
  /**
2263
2298
  * @param fd A file descriptor.
@@ -2276,20 +2311,19 @@ declare module 'fs' {
2276
2311
  bytesRead: number;
2277
2312
  buffer: TBuffer;
2278
2313
  }>;
2279
- }
2280
- export interface ReadSyncOptions {
2281
- /**
2282
- * @default 0
2283
- */
2284
- offset?: number | undefined;
2285
- /**
2286
- * @default `length of buffer`
2287
- */
2288
- length?: number | undefined;
2289
- /**
2290
- * @default null
2291
- */
2292
- position?: ReadPosition | null | undefined;
2314
+ function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
2315
+ fd: number,
2316
+ options: ReadAsyncOptions<TBuffer>
2317
+ ): Promise<{
2318
+ bytesRead: number;
2319
+ buffer: TBuffer;
2320
+ }>;
2321
+ function __promisify__(
2322
+ fd: number
2323
+ ): Promise<{
2324
+ bytesRead: number;
2325
+ buffer: NodeJS.ArrayBufferView;
2326
+ }>;
2293
2327
  }
2294
2328
  /**
2295
2329
  * Returns the number of `bytesRead`.
@@ -100,6 +100,16 @@ interface BigInt64Array extends RelativeIndexable<bigint> {}
100
100
  interface BigUint64Array extends RelativeIndexable<bigint> {}
101
101
  //#endregion ArrayLike.at() end
102
102
 
103
+ /**
104
+ * @since v17.0.0
105
+ *
106
+ * Creates a deep clone of an object.
107
+ */
108
+ declare function structuredClone<T>(
109
+ value: T,
110
+ transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
111
+ ): T;
112
+
103
113
  /*----------------------------------------------*
104
114
  * *
105
115
  * GLOBAL INTERFACES *
@@ -262,11 +272,11 @@ declare namespace NodeJS {
262
272
  id: string;
263
273
  filename: string;
264
274
  loaded: boolean;
265
- /** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */
275
+ /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
266
276
  parent: Module | null | undefined;
267
277
  children: Module[];
268
278
  /**
269
- * @since 11.14.0
279
+ * @since v11.14.0
270
280
  *
271
281
  * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
272
282
  */
@@ -580,6 +580,7 @@ declare module 'http2' {
580
580
  parent?: number | undefined;
581
581
  weight?: number | undefined;
582
582
  waitForTrailers?: boolean | undefined;
583
+ signal?: AbortSignal | undefined;
583
584
  }
584
585
  export interface SessionState {
585
586
  effectiveLocalWindowSize?: number | undefined;
@@ -59,6 +59,7 @@ declare module 'net' {
59
59
  path: string;
60
60
  }
61
61
  type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
62
+ type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
62
63
  /**
63
64
  * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
64
65
  * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
@@ -262,6 +263,12 @@ declare module 'net' {
262
263
  * @since v0.9.6
263
264
  */
264
265
  readonly localPort?: number;
266
+ /**
267
+ * This property represents the state of the connection as a string.
268
+ * @see {https://nodejs.org/api/net.html#socketreadystate}
269
+ * @since v0.5.0
270
+ */
271
+ readonly readyState: SocketReadyState;
265
272
  /**
266
273
  * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
267
274
  * the socket is destroyed (for example, if the client disconnected).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "17.0.18",
3
+ "version": "17.0.31",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -215,6 +215,6 @@
215
215
  },
216
216
  "scripts": {},
217
217
  "dependencies": {},
218
- "typesPublisherContentHash": "891e843fdc636f2072ebbf447c039d97341878ad4fab638195f8fff1aa48c917",
219
- "typeScriptVersion": "3.8"
218
+ "typesPublisherContentHash": "187e51e75f3e87938751363254f337ef4fab9306b9bb5a7d36cb895b7c95c5e2",
219
+ "typeScriptVersion": "3.9"
220
220
  }
@@ -1405,7 +1405,7 @@ declare module 'process' {
1405
1405
  emit(event: 'unhandledRejection', reason: unknown, promise: Promise<unknown>): boolean;
1406
1406
  emit(event: 'warning', warning: Error): boolean;
1407
1407
  emit(event: 'message', message: unknown, sendHandle: unknown): this;
1408
- emit(event: Signals, signal: Signals): boolean;
1408
+ emit(event: Signals, signal?: Signals): boolean;
1409
1409
  emit(event: 'multipleResolves', type: MultipleResolveType, promise: Promise<unknown>, value: unknown): this;
1410
1410
  emit(event: 'worker', listener: WorkerListener): this;
1411
1411
  on(event: 'beforeExit', listener: BeforeExitListener): this;
@@ -139,7 +139,8 @@ declare module 'stream/web' {
139
139
  pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
140
140
  pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
141
141
  tee(): [ReadableStream<R>, ReadableStream<R>];
142
- [Symbol.asyncIterator](options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
142
+ values(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
143
+ [Symbol.asyncIterator](): AsyncIterableIterator<R>;
143
144
  }
144
145
  const ReadableStream: {
145
146
  prototype: ReadableStream;
@@ -723,7 +723,7 @@ declare module 'tls' {
723
723
  * object.passphrase is optional. Encrypted keys will be decrypted with
724
724
  * object.passphrase if provided, or options.passphrase if it is not.
725
725
  */
726
- key?: string | Buffer | Array<Buffer | KeyObject> | undefined;
726
+ key?: string | Buffer | Array<string | Buffer | KeyObject> | undefined;
727
727
  /**
728
728
  * Name of an OpenSSL engine to get private key from. Should be used
729
729
  * together with privateKeyIdentifier.
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation.
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:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
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 THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
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:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
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 THE
21
+ SOFTWARE
@@ -5,12 +5,12 @@
5
5
  This package contains type definitions for retry (https://github.com/tim-kos/node-retry).
6
6
 
7
7
  # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/retry.
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/retry
9
9
 
10
- ### Additional Details
11
- * Last updated: Wed, 07 Jul 2021 18:02:26 GMT
10
+ Additional Details
11
+ * Last updated: Thu, 03 Jan 2019 17:45:51 GMT
12
12
  * Dependencies: none
13
13
  * Global values: none
14
14
 
15
15
  # Credits
16
- These definitions were written by [Stan Goldmann](https://github.com/krenor), and [BendingBender](https://github.com/BendingBender).
16
+ These definitions were written by Stan Goldmann <https://github.com/krenor>, BendingBender <https://github.com/BendingBender>.
@@ -59,7 +59,7 @@ export interface AttemptTimeoutOptions {
59
59
  /**
60
60
  * A timeout in milliseconds.
61
61
  */
62
- timeout?: number | undefined;
62
+ timeout?: number;
63
63
  /**
64
64
  * Callback to execute when the operation takes longer than the timeout.
65
65
  */
@@ -85,17 +85,17 @@ export interface OperationOptions extends TimeoutsOptions {
85
85
  * Whether to retry forever.
86
86
  * @default false
87
87
  */
88
- forever?: boolean | undefined;
88
+ forever?: boolean;
89
89
  /**
90
90
  * Whether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's.
91
91
  * @default false
92
92
  */
93
- unref?: boolean | undefined;
93
+ unref?: boolean;
94
94
  /**
95
95
  * The maximum time (in milliseconds) that the retried operation is allowed to run.
96
96
  * @default Infinity
97
97
  */
98
- maxRetryTime?: number | undefined;
98
+ maxRetryTime?: number;
99
99
  }
100
100
 
101
101
  /** Get an array with timeouts and their return values in milliseconds. */
@@ -106,7 +106,7 @@ export interface TimeoutsOptions extends CreateTimeoutOptions {
106
106
  * The maximum amount of times to retry the operation.
107
107
  * @default 10
108
108
  */
109
- retries?: number | undefined;
109
+ retries?: number;
110
110
  }
111
111
 
112
112
  /**
@@ -122,22 +122,22 @@ export interface CreateTimeoutOptions {
122
122
  * The exponential factor to use.
123
123
  * @default 2
124
124
  */
125
- factor?: number | undefined;
125
+ factor?: number;
126
126
  /**
127
127
  * The number of milliseconds before starting the first retry.
128
128
  * @default 1000
129
129
  */
130
- minTimeout?: number | undefined;
130
+ minTimeout?: number;
131
131
  /**
132
132
  * The maximum number of milliseconds between two retries.
133
133
  * @default Infinity
134
134
  */
135
- maxTimeout?: number | undefined;
135
+ maxTimeout?: number;
136
136
  /**
137
137
  * Randomizes the timeouts by multiplying a factor between 1-2.
138
138
  * @default false
139
139
  */
140
- randomize?: boolean | undefined;
140
+ randomize?: boolean;
141
141
  }
142
142
 
143
143
  /**
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@types/retry",
3
- "version": "0.12.1",
3
+ "version": "0.12.0",
4
4
  "description": "TypeScript definitions for retry",
5
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/retry",
6
5
  "license": "MIT",
7
6
  "contributors": [
8
7
  {
@@ -17,14 +16,13 @@
17
16
  }
18
17
  ],
19
18
  "main": "",
20
- "types": "index.d.ts",
19
+ "types": "index",
21
20
  "repository": {
22
21
  "type": "git",
23
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
24
- "directory": "types/retry"
22
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
25
23
  },
26
24
  "scripts": {},
27
25
  "dependencies": {},
28
- "typesPublisherContentHash": "1f47bb1a205340c2ce3816cbd526a396c6abccdd0aa138a440aa244f7da840e1",
29
- "typeScriptVersion": "3.6"
26
+ "typesPublisherContentHash": "dc8156aa3c27632d2585c45d8951c4a0f7ae9122bd17190d8973018556d174f3",
27
+ "typeScriptVersion": "2.3"
30
28
  }
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2019 Kiko Beats <josefrancisco.verdu@gmail.com> (kikobeats.com)
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:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
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.
@@ -0,0 +1,125 @@
1
+ # compress-brotli
2
+
3
+ ![Last version](https://img.shields.io/github/tag/Kikobeats/compress-brotli.svg?style=flat-square)
4
+ [![Coverage Status](https://img.shields.io/coveralls/Kikobeats/compress-brotli.svg?style=flat-square)](https://coveralls.io/github/Kikobeats/compress-brotli)
5
+ [![NPM Status](https://img.shields.io/npm/dm/compress-brotli.svg?style=flat-square)](https://www.npmjs.org/package/compress-brotli)
6
+
7
+ > Compress/Decompress using Brotli in a simple way.
8
+
9
+ ## Highlights
10
+
11
+ - Handle edge cases (such as try to compress `undefined`).
12
+ - JSON serialization/deserialization with Buffer support by default.
13
+ - Easy tu customize (e.g., using [v8 serialization](https://nodejs.org/api/v8.html#v8_v8_serialize_value)).
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ $ npm install compress-brotli --save
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```js
24
+ const createCompress = require('compress-brotli')
25
+
26
+ // It exposes compress/decompress methods
27
+ const { compress, decompress } = createCompress()
28
+ ```
29
+
30
+ using [v8 serialization](https://nodejs.org/api/v8.html#v8_v8_serialize_value):
31
+
32
+ ```js
33
+ const createCompress = require('compress-brotli')
34
+ const v8 = require('v8')
35
+
36
+ const { compress, decompress } = createCompress({
37
+ serialize: v8.serialize,
38
+ deserialize: v8.deserialize
39
+ })
40
+ ```
41
+ customizing compress options:
42
+ ```js
43
+ const createCompress = require('compress-brotli')
44
+
45
+ const {
46
+ constants: {
47
+ BROTLI_MODE_TEXT,
48
+ BROTLI_PARAM_MODE,
49
+ BROTLI_PARAM_QUALITY
50
+ }
51
+ } = require('zlib')
52
+
53
+ // Provide factory level default options
54
+ const { compress, decompress } = createCompress({
55
+ compressOptions: {
56
+ chunkSize: 1024,
57
+ parameters: {
58
+ [BROTLI_PARAM_MODE]: BROTLI_MODE_TEXT
59
+ }
60
+ },
61
+ decompressOptions: {
62
+ chunkSize: 1024,
63
+ parameters: {
64
+ [BROTLI_PARAM_MODE]: BROTLI_MODE_TEXT
65
+ }
66
+ }
67
+ })
68
+ const data = 'whatever'
69
+
70
+ // Override call level options (deep merge for parameters)
71
+ const compressed = compress(data, {
72
+ parameters: {
73
+ [BROTLI_PARAM_QUALITY]: 7
74
+ }
75
+ })
76
+ decompress(compressed, {
77
+ chunkSize: 2048
78
+ })
79
+ ```
80
+
81
+ ## API
82
+
83
+ ### compressBrotli([options])
84
+
85
+ #### enable
86
+
87
+ Type: `boolean`<br>
88
+ Default: `false`
89
+
90
+ If pass disable, it will return a noop compress/decompress methods.
91
+
92
+ #### serialize
93
+
94
+ Type: `function`<br>
95
+ Default: `JSONB.stringify`
96
+
97
+ It determines the serialize method to use before compress the data.
98
+
99
+ #### deserialize
100
+
101
+ Type: `function`<br>
102
+ Default: `JSONB.parse`
103
+
104
+ It determines the deserialize method to use after decompress the data.
105
+
106
+ #### compressOptions
107
+
108
+ Type: `zlib.BrotliOptions`<br>
109
+ Default: `{}` i.e. default *zlib.brotliCompress* options will be used
110
+
111
+ It defines default options to be used in wrapped *zlib.brotliCompress* call
112
+
113
+ #### decompressOptions
114
+
115
+ Type: `zlib.BrotliOptions`<br>
116
+ Default: `{}` i.e. default *zlib.brotliDecompress* options will be used
117
+
118
+ It defines default options to be used in wrapped *zlib.brotliDecompress* call
119
+
120
+ ## License
121
+
122
+ **compress-brotli** © [Kiko Beats](https://kikobeats.com), released under the [MIT](https://github.com/Kikobeats/compress-brotli/blob/master/LICENSE.md) License.<br>
123
+ Authored and maintained by Kiko Beats with help from [contributors](https://github.com/Kikobeats/compress-brotli/contributors).
124
+
125
+ > [kikobeats.com](https://kikobeats.com) · GitHub [Kiko Beats](https://github.com/Kikobeats) · Twitter [@Kikobeats](https://twitter.com/Kikobeats)
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "compress-brotli",
3
+ "description": "Simple cross Node.js inteface for using brotli compression",
4
+ "homepage": "https://nicedoc.io/Kikobeats/compress-brotli",
5
+ "version": "1.3.8",
6
+ "main": "src/index.js",
7
+ "author": {
8
+ "email": "josefrancisco.verdu@gmail.com",
9
+ "name": "Kiko Beats",
10
+ "url": "https://kikobeats.com"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/Kikobeats/compress-brotli.git"
15
+ },
16
+ "bugs": {
17
+ "url": "https://github.com/Kikobeats/compress-brotli/issues"
18
+ },
19
+ "keywords": [
20
+ "api",
21
+ "brotli",
22
+ "compress",
23
+ "compressed",
24
+ "compression",
25
+ "decode",
26
+ "decompress",
27
+ "decompression",
28
+ "encode",
29
+ "format",
30
+ "zlib"
31
+ ],
32
+ "dependencies": {
33
+ "@types/json-buffer": "~3.0.0",
34
+ "json-buffer": "~3.0.1"
35
+ },
36
+ "devDependencies": {
37
+ "@commitlint/cli": "latest",
38
+ "@commitlint/config-conventional": "latest",
39
+ "ava": "latest",
40
+ "c8": "latest",
41
+ "ci-publish": "latest",
42
+ "conventional-github-releaser": "latest",
43
+ "finepack": "latest",
44
+ "git-authors-cli": "latest",
45
+ "git-dirty": "latest",
46
+ "nano-staged": "latest",
47
+ "npm-check-updates": "latest",
48
+ "prettier-standard": "latest",
49
+ "simple-git-hooks": "latest",
50
+ "sinon": "latest",
51
+ "standard": "latest",
52
+ "standard-markdown": "latest",
53
+ "standard-version": "latest"
54
+ },
55
+ "engines": {
56
+ "node": ">= 12"
57
+ },
58
+ "files": [
59
+ "src"
60
+ ],
61
+ "scripts": {
62
+ "clean": "rm -rf node_modules",
63
+ "contributors": "(git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
64
+ "lint": "standard-markdown README.md && standard",
65
+ "postrelease": "npm run release:tags && npm run release:github && (ci-publish || npm publish --access=public)",
66
+ "prerelease": "npm run update:check && npm run contributors",
67
+ "pretest": "npm run lint",
68
+ "release": "standard-version -a",
69
+ "release:github": "conventional-github-releaser -p angular",
70
+ "release:tags": "git push --follow-tags origin HEAD:master",
71
+ "test": "c8 ava",
72
+ "update": "ncu -u",
73
+ "update:check": "ncu -- --error-level 2"
74
+ },
75
+ "license": "MIT",
76
+ "commitlint": {
77
+ "extends": [
78
+ "@commitlint/config-conventional"
79
+ ]
80
+ },
81
+ "nano-staged": {
82
+ "*.js,!*.min.js,": [
83
+ "prettier-standard"
84
+ ],
85
+ "*.md": [
86
+ "standard-markdown"
87
+ ],
88
+ "package.json": [
89
+ "finepack"
90
+ ]
91
+ },
92
+ "simple-git-hooks": {
93
+ "commit-msg": "npx commitlint --edit",
94
+ "pre-commit": "npx nano-staged"
95
+ },
96
+ "types": "src/index.d.ts"
97
+ }
@@ -0,0 +1,36 @@
1
+ import { BrotliOptions, InputType, CompressCallback } from 'zlib'
2
+ import { stringify as JSONBstringify, parse as JSONBparse } from 'json-buffer'
3
+
4
+ declare module 'compress-brotli'
5
+
6
+ type CompressResult = Promise<Parameters<CompressCallback>[1]>
7
+ type DecompressResult = Promise<ReturnType<typeof JSONBparse>>
8
+
9
+ type Serialize<T> = (source: InputType) => T
10
+ type Deserialize<T> = (source: CompressResult) => T
11
+
12
+ declare function createCompress<
13
+ SerializeResult = ReturnType<typeof JSONBstringify>,
14
+ DeserializeResult = ReturnType<typeof JSONBparse>
15
+ >(
16
+ options?: {
17
+ enable?: boolean,
18
+ serialize?: Serialize<SerializeResult>,
19
+ deserialize?: Deserialize<DeserializeResult>,
20
+ iltorb?: any,
21
+ compressOptions?: BrotliOptions,
22
+ decompressOptions?: BrotliOptions
23
+ }
24
+ ): {
25
+ serialize: Serialize<SerializeResult>,
26
+ deserialize: Deserialize<DeserializeResult>,
27
+ compress: (data: InputType, optioins?: BrotliOptions) => CompressResult
28
+ decompress: (data: InputType, optioins?: BrotliOptions) => DecompressResult
29
+ }
30
+
31
+ declare namespace createCompress {
32
+ const stringify: typeof JSONBstringify
33
+ const parse: typeof JSONBparse
34
+ }
35
+
36
+ export default createCompress