cdk-ecr-deployment 0.0.76 → 0.0.79

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 (356) hide show
  1. package/.jsii +28 -25
  2. package/lambda/Dockerfile +25 -0
  3. package/lambda/install.js +64 -0
  4. package/lib/index.js +40 -23
  5. package/node_modules/@sindresorhus/is/dist/index.d.ts +225 -0
  6. package/node_modules/@sindresorhus/is/dist/index.js +427 -0
  7. package/node_modules/@sindresorhus/is/dist/types.d.ts +24 -0
  8. package/node_modules/@sindresorhus/is/dist/types.js +3 -0
  9. package/node_modules/@sindresorhus/is/license +9 -0
  10. package/node_modules/@sindresorhus/is/package.json +96 -0
  11. package/node_modules/@sindresorhus/is/readme.md +628 -0
  12. package/node_modules/@szmarczak/http-timer/LICENSE +21 -0
  13. package/node_modules/@szmarczak/http-timer/README.md +93 -0
  14. package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +32 -0
  15. package/node_modules/@szmarczak/http-timer/dist/source/index.js +126 -0
  16. package/node_modules/@szmarczak/http-timer/package.json +72 -0
  17. package/node_modules/@types/cacheable-request/LICENSE +21 -0
  18. package/node_modules/@types/cacheable-request/README.md +16 -0
  19. package/node_modules/@types/cacheable-request/index.d.ts +137 -0
  20. package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +21 -0
  21. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +16 -0
  22. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +8 -0
  23. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +912 -0
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +497 -0
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +2142 -0
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +1365 -0
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +414 -0
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +412 -0
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +18 -0
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +3307 -0
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +545 -0
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +357 -0
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +643 -0
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +169 -0
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +623 -0
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +1004 -0
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +3748 -0
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +284 -0
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.global.d.ts +1 -0
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +1368 -0
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +2100 -0
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +391 -0
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +131 -0
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +2738 -0
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +114 -0
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +783 -0
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +455 -0
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +230 -0
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +172 -0
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +555 -0
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +1477 -0
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +117 -0
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +131 -0
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +542 -0
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +424 -0
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +24 -0
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +42 -0
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +6 -0
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +1249 -0
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +67 -0
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +68 -0
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +94 -0
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +1019 -0
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +161 -0
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +204 -0
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +798 -0
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +1563 -0
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +378 -0
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +507 -0
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +158 -0
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +649 -0
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +517 -0
  74. package/node_modules/@types/cacheable-request/package.json +35 -0
  75. package/node_modules/@types/http-cache-semantics/LICENSE +21 -0
  76. package/node_modules/@types/http-cache-semantics/README.md +16 -0
  77. package/node_modules/@types/http-cache-semantics/index.d.ts +170 -0
  78. package/node_modules/@types/http-cache-semantics/package.json +25 -0
  79. package/node_modules/@types/keyv/LICENSE +21 -0
  80. package/node_modules/@types/keyv/README.md +16 -0
  81. package/node_modules/@types/keyv/index.d.ts +77 -0
  82. package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +21 -0
  83. package/node_modules/@types/keyv/node_modules/@types/node/README.md +16 -0
  84. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +8 -0
  85. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +912 -0
  86. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +497 -0
  87. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +2142 -0
  88. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +1365 -0
  89. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +414 -0
  90. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +412 -0
  91. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +18 -0
  92. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +3307 -0
  93. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +545 -0
  94. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  95. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +357 -0
  96. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +643 -0
  97. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +169 -0
  98. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +623 -0
  99. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +1004 -0
  100. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +3748 -0
  101. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +284 -0
  102. package/node_modules/@types/keyv/node_modules/@types/node/globals.global.d.ts +1 -0
  103. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +1368 -0
  104. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +2100 -0
  105. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +391 -0
  106. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +131 -0
  107. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +2738 -0
  108. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +114 -0
  109. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +783 -0
  110. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +455 -0
  111. package/node_modules/@types/keyv/node_modules/@types/node/package.json +230 -0
  112. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +172 -0
  113. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +555 -0
  114. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +1477 -0
  115. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +117 -0
  116. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +131 -0
  117. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +542 -0
  118. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +424 -0
  119. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +24 -0
  120. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +42 -0
  121. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +6 -0
  122. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +1249 -0
  123. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +67 -0
  124. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +68 -0
  125. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +94 -0
  126. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +1019 -0
  127. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +161 -0
  128. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +204 -0
  129. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +798 -0
  130. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +1563 -0
  131. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +378 -0
  132. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +507 -0
  133. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +158 -0
  134. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +649 -0
  135. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +517 -0
  136. package/node_modules/@types/keyv/package.json +32 -0
  137. package/node_modules/@types/responselike/LICENSE +21 -0
  138. package/node_modules/@types/responselike/README.md +16 -0
  139. package/node_modules/@types/responselike/index.d.ts +34 -0
  140. package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +21 -0
  141. package/node_modules/@types/responselike/node_modules/@types/node/README.md +16 -0
  142. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +8 -0
  143. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +912 -0
  144. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +497 -0
  145. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +2142 -0
  146. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +1365 -0
  147. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +414 -0
  148. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +412 -0
  149. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +18 -0
  150. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +3307 -0
  151. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +545 -0
  152. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
  153. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +357 -0
  154. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +643 -0
  155. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +169 -0
  156. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +623 -0
  157. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +1004 -0
  158. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +3748 -0
  159. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +284 -0
  160. package/node_modules/@types/responselike/node_modules/@types/node/globals.global.d.ts +1 -0
  161. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +1368 -0
  162. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +2100 -0
  163. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +391 -0
  164. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +131 -0
  165. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +2738 -0
  166. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +114 -0
  167. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +783 -0
  168. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +455 -0
  169. package/node_modules/@types/responselike/node_modules/@types/node/package.json +230 -0
  170. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +172 -0
  171. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +555 -0
  172. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +1477 -0
  173. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +117 -0
  174. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +131 -0
  175. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +542 -0
  176. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +424 -0
  177. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +24 -0
  178. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +42 -0
  179. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +6 -0
  180. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +1249 -0
  181. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +67 -0
  182. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +68 -0
  183. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +94 -0
  184. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +1019 -0
  185. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +161 -0
  186. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +204 -0
  187. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +798 -0
  188. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +1563 -0
  189. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +378 -0
  190. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +507 -0
  191. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +158 -0
  192. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +649 -0
  193. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +517 -0
  194. package/node_modules/@types/responselike/package.json +25 -0
  195. package/node_modules/cacheable-lookup/LICENSE +21 -0
  196. package/node_modules/cacheable-lookup/README.md +240 -0
  197. package/node_modules/cacheable-lookup/index.d.ts +139 -0
  198. package/node_modules/cacheable-lookup/package.json +45 -0
  199. package/node_modules/cacheable-lookup/source/index.js +436 -0
  200. package/node_modules/cacheable-request/LICENSE +21 -0
  201. package/node_modules/cacheable-request/README.md +206 -0
  202. package/node_modules/cacheable-request/package.json +56 -0
  203. package/node_modules/cacheable-request/src/index.js +251 -0
  204. package/node_modules/clone-response/LICENSE +21 -0
  205. package/node_modules/clone-response/README.md +62 -0
  206. package/node_modules/clone-response/package.json +44 -0
  207. package/node_modules/clone-response/src/index.js +17 -0
  208. package/node_modules/decompress-response/index.d.ts +22 -0
  209. package/node_modules/decompress-response/index.js +58 -0
  210. package/node_modules/decompress-response/license +9 -0
  211. package/node_modules/decompress-response/node_modules/mimic-response/index.d.ts +17 -0
  212. package/node_modules/decompress-response/node_modules/mimic-response/index.js +77 -0
  213. package/node_modules/decompress-response/node_modules/mimic-response/license +9 -0
  214. package/node_modules/decompress-response/node_modules/mimic-response/package.json +42 -0
  215. package/node_modules/decompress-response/node_modules/mimic-response/readme.md +78 -0
  216. package/node_modules/decompress-response/package.json +56 -0
  217. package/node_modules/decompress-response/readme.md +48 -0
  218. package/node_modules/defer-to-connect/LICENSE +21 -0
  219. package/node_modules/defer-to-connect/README.md +38 -0
  220. package/node_modules/defer-to-connect/dist/source/index.d.ts +10 -0
  221. package/node_modules/defer-to-connect/dist/source/index.js +47 -0
  222. package/node_modules/defer-to-connect/package.json +71 -0
  223. package/node_modules/end-of-stream/LICENSE +21 -0
  224. package/node_modules/end-of-stream/README.md +54 -0
  225. package/node_modules/end-of-stream/index.js +94 -0
  226. package/node_modules/end-of-stream/package.json +37 -0
  227. package/node_modules/get-stream/buffer-stream.js +52 -0
  228. package/node_modules/get-stream/index.d.ts +108 -0
  229. package/node_modules/get-stream/index.js +60 -0
  230. package/node_modules/get-stream/license +9 -0
  231. package/node_modules/get-stream/package.json +50 -0
  232. package/node_modules/get-stream/readme.md +124 -0
  233. package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +2 -0
  234. package/node_modules/got/dist/source/as-promise/create-rejection.js +30 -0
  235. package/node_modules/got/dist/source/as-promise/index.d.ts +3 -0
  236. package/node_modules/got/dist/source/as-promise/index.js +175 -0
  237. package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +3 -0
  238. package/node_modules/got/dist/source/as-promise/normalize-arguments.js +78 -0
  239. package/node_modules/got/dist/source/as-promise/parse-body.d.ts +3 -0
  240. package/node_modules/got/dist/source/as-promise/parse-body.js +25 -0
  241. package/node_modules/got/dist/source/as-promise/types.d.ts +256 -0
  242. package/node_modules/got/dist/source/as-promise/types.js +40 -0
  243. package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +5 -0
  244. package/node_modules/got/dist/source/core/calculate-retry-delay.js +29 -0
  245. package/node_modules/got/dist/source/core/index.d.ts +1124 -0
  246. package/node_modules/got/dist/source/core/index.js +1491 -0
  247. package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +5 -0
  248. package/node_modules/got/dist/source/core/utils/dns-ip-version.js +17 -0
  249. package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +3 -0
  250. package/node_modules/got/dist/source/core/utils/get-body-size.js +32 -0
  251. package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +4 -0
  252. package/node_modules/got/dist/source/core/utils/get-buffer.js +16 -0
  253. package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +8 -0
  254. package/node_modules/got/dist/source/core/utils/is-form-data.js +4 -0
  255. package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +2 -0
  256. package/node_modules/got/dist/source/core/utils/is-response-ok.js +8 -0
  257. package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +14 -0
  258. package/node_modules/got/dist/source/core/utils/options-to-url.js +53 -0
  259. package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +3 -0
  260. package/node_modules/got/dist/source/core/utils/proxy-events.js +17 -0
  261. package/node_modules/got/dist/source/core/utils/timed-out.d.ts +29 -0
  262. package/node_modules/got/dist/source/core/utils/timed-out.js +121 -0
  263. package/node_modules/got/dist/source/core/utils/unhandle.d.ts +11 -0
  264. package/node_modules/got/dist/source/core/utils/unhandle.js +22 -0
  265. package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +15 -0
  266. package/node_modules/got/dist/source/core/utils/url-to-options.js +24 -0
  267. package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +8 -0
  268. package/node_modules/got/dist/source/core/utils/weakable-map.js +29 -0
  269. package/node_modules/got/dist/source/create.d.ts +5 -0
  270. package/node_modules/got/dist/source/create.js +240 -0
  271. package/node_modules/got/dist/source/index.d.ts +4 -0
  272. package/node_modules/got/dist/source/index.js +132 -0
  273. package/node_modules/got/dist/source/types.d.ts +342 -0
  274. package/node_modules/got/dist/source/types.js +2 -0
  275. package/node_modules/got/dist/source/utils/deep-freeze.d.ts +1 -0
  276. package/node_modules/got/dist/source/utils/deep-freeze.js +12 -0
  277. package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +2 -0
  278. package/node_modules/got/dist/source/utils/deprecation-warning.js +13 -0
  279. package/node_modules/got/license +9 -0
  280. package/node_modules/got/package.json +130 -0
  281. package/node_modules/got/readme.md +2476 -0
  282. package/node_modules/http-cache-semantics/LICENSE +9 -0
  283. package/node_modules/http-cache-semantics/README.md +203 -0
  284. package/node_modules/http-cache-semantics/index.js +673 -0
  285. package/node_modules/http-cache-semantics/package.json +24 -0
  286. package/node_modules/http2-wrapper/LICENSE +21 -0
  287. package/node_modules/http2-wrapper/README.md +470 -0
  288. package/node_modules/http2-wrapper/package.json +54 -0
  289. package/node_modules/http2-wrapper/source/agent.js +670 -0
  290. package/node_modules/http2-wrapper/source/auto.js +149 -0
  291. package/node_modules/http2-wrapper/source/client-request.js +445 -0
  292. package/node_modules/http2-wrapper/source/incoming-message.js +58 -0
  293. package/node_modules/http2-wrapper/source/index.js +28 -0
  294. package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +27 -0
  295. package/node_modules/http2-wrapper/source/utils/errors.js +45 -0
  296. package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +13 -0
  297. package/node_modules/http2-wrapper/source/utils/proxy-events.js +7 -0
  298. package/node_modules/http2-wrapper/source/utils/url-to-options.js +25 -0
  299. package/node_modules/json-buffer/.travis.yml +3 -0
  300. package/node_modules/json-buffer/LICENSE +22 -0
  301. package/node_modules/json-buffer/README.md +24 -0
  302. package/node_modules/json-buffer/index.js +58 -0
  303. package/node_modules/json-buffer/package.json +34 -0
  304. package/node_modules/json-buffer/test/index.js +63 -0
  305. package/node_modules/keyv/LICENSE +21 -0
  306. package/node_modules/keyv/README.md +288 -0
  307. package/node_modules/keyv/package.json +49 -0
  308. package/node_modules/keyv/src/index.js +111 -0
  309. package/node_modules/lowercase-keys/index.d.ts +16 -0
  310. package/node_modules/lowercase-keys/index.js +10 -0
  311. package/node_modules/lowercase-keys/license +9 -0
  312. package/node_modules/lowercase-keys/package.json +38 -0
  313. package/node_modules/lowercase-keys/readme.md +32 -0
  314. package/node_modules/mimic-response/index.js +32 -0
  315. package/node_modules/mimic-response/license +9 -0
  316. package/node_modules/mimic-response/package.json +37 -0
  317. package/node_modules/mimic-response/readme.md +54 -0
  318. package/node_modules/normalize-url/index.d.ts +267 -0
  319. package/node_modules/normalize-url/index.js +216 -0
  320. package/node_modules/normalize-url/license +9 -0
  321. package/node_modules/normalize-url/package.json +50 -0
  322. package/node_modules/normalize-url/readme.md +286 -0
  323. package/node_modules/once/LICENSE +15 -0
  324. package/node_modules/once/README.md +79 -0
  325. package/node_modules/once/once.js +42 -0
  326. package/node_modules/once/package.json +33 -0
  327. package/node_modules/p-cancelable/index.d.ts +176 -0
  328. package/node_modules/p-cancelable/index.js +111 -0
  329. package/node_modules/p-cancelable/license +9 -0
  330. package/node_modules/p-cancelable/package.json +49 -0
  331. package/node_modules/p-cancelable/readme.md +153 -0
  332. package/node_modules/pump/.travis.yml +5 -0
  333. package/node_modules/pump/LICENSE +21 -0
  334. package/node_modules/pump/README.md +65 -0
  335. package/node_modules/pump/index.js +82 -0
  336. package/node_modules/pump/package.json +24 -0
  337. package/node_modules/pump/test-browser.js +66 -0
  338. package/node_modules/pump/test-node.js +53 -0
  339. package/node_modules/quick-lru/index.d.ts +97 -0
  340. package/node_modules/quick-lru/index.js +123 -0
  341. package/node_modules/quick-lru/license +9 -0
  342. package/node_modules/quick-lru/package.json +43 -0
  343. package/node_modules/quick-lru/readme.md +111 -0
  344. package/node_modules/resolve-alpn/LICENSE +22 -0
  345. package/node_modules/resolve-alpn/README.md +60 -0
  346. package/node_modules/resolve-alpn/index.js +43 -0
  347. package/node_modules/resolve-alpn/package.json +34 -0
  348. package/node_modules/responselike/LICENSE +19 -0
  349. package/node_modules/responselike/README.md +77 -0
  350. package/node_modules/responselike/package.json +38 -0
  351. package/node_modules/responselike/src/index.js +34 -0
  352. package/node_modules/wrappy/LICENSE +15 -0
  353. package/node_modules/wrappy/README.md +36 -0
  354. package/node_modules/wrappy/package.json +29 -0
  355. package/node_modules/wrappy/wrappy.js +33 -0
  356. package/package.json +7 -4
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+ /* istanbul ignore file: https://github.com/nodejs/node/blob/master/lib/internal/errors.js */
3
+
4
+ const makeError = (Base, key, getMessage) => {
5
+ module.exports[key] = class NodeError extends Base {
6
+ constructor(...args) {
7
+ super(typeof getMessage === 'string' ? getMessage : getMessage(args));
8
+ this.name = `${super.name} [${key}]`;
9
+ this.code = key;
10
+ }
11
+ };
12
+ };
13
+
14
+ makeError(TypeError, 'ERR_INVALID_ARG_TYPE', args => {
15
+ const type = args[0].includes('.') ? 'property' : 'argument';
16
+
17
+ let valid = args[1];
18
+ const isManyTypes = Array.isArray(valid);
19
+
20
+ if (isManyTypes) {
21
+ valid = `${valid.slice(0, -1).join(', ')} or ${valid.slice(-1)}`;
22
+ }
23
+
24
+ return `The "${args[0]}" ${type} must be ${isManyTypes ? 'one of' : 'of'} type ${valid}. Received ${typeof args[2]}`;
25
+ });
26
+
27
+ makeError(TypeError, 'ERR_INVALID_PROTOCOL', args => {
28
+ return `Protocol "${args[0]}" not supported. Expected "${args[1]}"`;
29
+ });
30
+
31
+ makeError(Error, 'ERR_HTTP_HEADERS_SENT', args => {
32
+ return `Cannot ${args[0]} headers after they are sent to the client`;
33
+ });
34
+
35
+ makeError(TypeError, 'ERR_INVALID_HTTP_TOKEN', args => {
36
+ return `${args[0]} must be a valid HTTP token [${args[1]}]`;
37
+ });
38
+
39
+ makeError(TypeError, 'ERR_HTTP_INVALID_HEADER_VALUE', args => {
40
+ return `Invalid value "${args[0]} for header "${args[1]}"`;
41
+ });
42
+
43
+ makeError(TypeError, 'ERR_INVALID_CHAR', args => {
44
+ return `Invalid character in ${args[0]} [${args[1]}]`;
45
+ });
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ module.exports = header => {
4
+ switch (header) {
5
+ case ':method':
6
+ case ':scheme':
7
+ case ':authority':
8
+ case ':path':
9
+ return true;
10
+ default:
11
+ return false;
12
+ }
13
+ };
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ module.exports = (from, to, events) => {
4
+ for (const event of events) {
5
+ from.on(event, (...args) => to.emit(event, ...args));
6
+ }
7
+ };
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+ /* istanbul ignore file: https://github.com/nodejs/node/blob/a91293d4d9ab403046ab5eb022332e4e3d249bd3/lib/internal/url.js#L1257 */
3
+
4
+ module.exports = url => {
5
+ const options = {
6
+ protocol: url.protocol,
7
+ hostname: typeof url.hostname === 'string' && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname,
8
+ host: url.host,
9
+ hash: url.hash,
10
+ search: url.search,
11
+ pathname: url.pathname,
12
+ href: url.href,
13
+ path: `${url.pathname || ''}${url.search || ''}`
14
+ };
15
+
16
+ if (typeof url.port === 'string' && url.port.length !== 0) {
17
+ options.port = Number(url.port);
18
+ }
19
+
20
+ if (url.username || url.password) {
21
+ options.auth = `${url.username || ''}:${url.password || ''}`;
22
+ }
23
+
24
+ return options;
25
+ };
@@ -0,0 +1,3 @@
1
+ language: node_js
2
+ node_js:
3
+ - '0.10'
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Dominic Tarr
2
+
3
+ Permission is hereby granted, free of charge,
4
+ to any person obtaining a copy of this software and
5
+ associated documentation files (the "Software"), to
6
+ deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify,
8
+ merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom
10
+ the Software is furnished to do so,
11
+ subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice
14
+ shall be included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
20
+ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,24 @@
1
+ # json-buffer
2
+
3
+ JSON functions that can convert buffers!
4
+
5
+ [![build status](https://secure.travis-ci.org/dominictarr/json-buffer.png)](http://travis-ci.org/dominictarr/json-buffer)
6
+
7
+ [![testling badge](https://ci.testling.com/dominictarr/json-buffer.png)](https://ci.testling.com/dominictarr/json-buffer)
8
+
9
+ JSON mangles buffers by converting to an array...
10
+ which isn't helpful. json-buffers converts to base64 instead,
11
+ and deconverts base64 to a buffer.
12
+
13
+ ``` js
14
+ var JSONB = require('json-buffer')
15
+ var Buffer = require('buffer').Buffer
16
+
17
+ var str = JSONB.stringify(Buffer.from('hello there!'))
18
+
19
+ console.log(JSONB.parse(str)) //GET a BUFFER back
20
+ ```
21
+
22
+ ## License
23
+
24
+ MIT
@@ -0,0 +1,58 @@
1
+ //TODO: handle reviver/dehydrate function like normal
2
+ //and handle indentation, like normal.
3
+ //if anyone needs this... please send pull request.
4
+
5
+ exports.stringify = function stringify (o) {
6
+ if('undefined' == typeof o) return o
7
+
8
+ if(o && Buffer.isBuffer(o))
9
+ return JSON.stringify(':base64:' + o.toString('base64'))
10
+
11
+ if(o && o.toJSON)
12
+ o = o.toJSON()
13
+
14
+ if(o && 'object' === typeof o) {
15
+ var s = ''
16
+ var array = Array.isArray(o)
17
+ s = array ? '[' : '{'
18
+ var first = true
19
+
20
+ for(var k in o) {
21
+ var ignore = 'function' == typeof o[k] || (!array && 'undefined' === typeof o[k])
22
+ if(Object.hasOwnProperty.call(o, k) && !ignore) {
23
+ if(!first)
24
+ s += ','
25
+ first = false
26
+ if (array) {
27
+ if(o[k] == undefined)
28
+ s += 'null'
29
+ else
30
+ s += stringify(o[k])
31
+ } else if (o[k] !== void(0)) {
32
+ s += stringify(k) + ':' + stringify(o[k])
33
+ }
34
+ }
35
+ }
36
+
37
+ s += array ? ']' : '}'
38
+
39
+ return s
40
+ } else if ('string' === typeof o) {
41
+ return JSON.stringify(/^:/.test(o) ? ':' + o : o)
42
+ } else if ('undefined' === typeof o) {
43
+ return 'null';
44
+ } else
45
+ return JSON.stringify(o)
46
+ }
47
+
48
+ exports.parse = function (s) {
49
+ return JSON.parse(s, function (key, value) {
50
+ if('string' === typeof value) {
51
+ if(/^:base64:/.test(value))
52
+ return Buffer.from(value.substring(8), 'base64')
53
+ else
54
+ return /^:/.test(value) ? value.substring(1) : value
55
+ }
56
+ return value
57
+ })
58
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "json-buffer",
3
+ "description": "JSON parse & stringify that supports binary via bops & base64",
4
+ "version": "3.0.1",
5
+ "homepage": "https://github.com/dominictarr/json-buffer",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git://github.com/dominictarr/json-buffer.git"
9
+ },
10
+ "devDependencies": {
11
+ "tape": "^4.6.3"
12
+ },
13
+ "scripts": {
14
+ "test": "set -e; for t in test/*.js; do node $t; done"
15
+ },
16
+ "author": "Dominic Tarr <dominic.tarr@gmail.com> (http://dominictarr.com)",
17
+ "license": "MIT",
18
+ "testling": {
19
+ "files": "test/*.js",
20
+ "browsers": [
21
+ "ie/8..latest",
22
+ "firefox/17..latest",
23
+ "firefox/nightly",
24
+ "chrome/22..latest",
25
+ "chrome/canary",
26
+ "opera/12..latest",
27
+ "opera/next",
28
+ "safari/5.1..latest",
29
+ "ipad/6.0..latest",
30
+ "iphone/6.0..latest",
31
+ "android-browser/4.2..latest"
32
+ ]
33
+ }
34
+ }
@@ -0,0 +1,63 @@
1
+
2
+ var test = require('tape')
3
+ var _JSON = require('../')
4
+
5
+ function clone (o) {
6
+ return JSON.parse(JSON.stringify(o))
7
+ }
8
+
9
+ var examples = {
10
+ simple: { foo: [], bar: {}, baz: Buffer.from('some binary data') },
11
+ just_buffer: Buffer.from('JUST A BUFFER'),
12
+ all_types: {
13
+ string:'hello',
14
+ number: 3145,
15
+ null: null,
16
+ object: {},
17
+ array: [],
18
+ boolean: true,
19
+ boolean2: false
20
+ },
21
+ foo: Buffer.from('foo'),
22
+ foo2: Buffer.from('foo2'),
23
+ escape: {
24
+ buffer: Buffer.from('x'),
25
+ string: _JSON.stringify(Buffer.from('x'))
26
+ },
27
+ escape2: {
28
+ buffer: Buffer.from('x'),
29
+ string: ':base64:'+ Buffer.from('x').toString('base64')
30
+ },
31
+ undefined: {
32
+ empty: undefined, test: true
33
+ },
34
+ undefined2: {
35
+ first: 1, empty: undefined, test: true
36
+ },
37
+ undefinedArray: {
38
+ array: [undefined, 1, 'two']
39
+ },
40
+ fn: {
41
+ fn: function () {}
42
+ },
43
+ undefined: undefined
44
+ }
45
+
46
+ for(k in examples)
47
+ (function (value, k) {
48
+ test(k, function (t) {
49
+ var s = _JSON.stringify(value)
50
+ console.log('parse', s)
51
+ if(JSON.stringify(value) !== undefined) {
52
+ console.log(s)
53
+ var _value = _JSON.parse(s)
54
+ t.deepEqual(clone(_value), clone(value))
55
+ }
56
+ else
57
+ t.equal(s, undefined)
58
+ t.end()
59
+ })
60
+ })(examples[k], k)
61
+
62
+
63
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Luke Childs
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.
@@ -0,0 +1,288 @@
1
+ <h1 align="center">
2
+ <img width="250" src="https://rawgit.com/lukechilds/keyv/master/media/logo.svg" alt="keyv">
3
+ <br>
4
+ <br>
5
+ </h1>
6
+
7
+ > Simple key-value storage with support for multiple backends
8
+
9
+ [![Build Status](https://travis-ci.org/lukechilds/keyv.svg?branch=master)](https://travis-ci.org/lukechilds/keyv)
10
+ [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv?branch=master)
11
+ [![npm](https://img.shields.io/npm/dm/keyv.svg)](https://www.npmjs.com/package/keyv)
12
+ [![npm](https://img.shields.io/npm/v/keyv.svg)](https://www.npmjs.com/package/keyv)
13
+
14
+ Keyv provides a consistent interface for key-value storage across multiple backends via storage adapters. It supports TTL based expiry, making it suitable as a cache or a persistent key-value store.
15
+
16
+ ## Features
17
+
18
+ There are a few existing modules similar to Keyv, however Keyv is different because it:
19
+
20
+ - Isn't bloated
21
+ - Has a simple Promise based API
22
+ - Suitable as a TTL based cache or persistent key-value store
23
+ - [Easily embeddable](#add-cache-support-to-your-module) inside another module
24
+ - Works with any storage that implements the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) API
25
+ - Handles all JSON types plus `Buffer`
26
+ - Supports namespaces
27
+ - Wide range of [**efficient, well tested**](#official-storage-adapters) storage adapters
28
+ - Connection errors are passed through (db failures won't kill your app)
29
+ - Supports the current active LTS version of Node.js or higher
30
+
31
+ ## Usage
32
+
33
+ Install Keyv.
34
+
35
+ ```
36
+ npm install --save keyv
37
+ ```
38
+
39
+ By default everything is stored in memory, you can optionally also install a storage adapter.
40
+
41
+ ```
42
+ npm install --save @keyv/redis
43
+ npm install --save @keyv/mongo
44
+ npm install --save @keyv/sqlite
45
+ npm install --save @keyv/postgres
46
+ npm install --save @keyv/mysql
47
+ ```
48
+
49
+ Create a new Keyv instance, passing your connection string if applicable. Keyv will automatically load the correct storage adapter.
50
+
51
+ ```js
52
+ const Keyv = require('keyv');
53
+
54
+ // One of the following
55
+ const keyv = new Keyv();
56
+ const keyv = new Keyv('redis://user:pass@localhost:6379');
57
+ const keyv = new Keyv('mongodb://user:pass@localhost:27017/dbname');
58
+ const keyv = new Keyv('sqlite://path/to/database.sqlite');
59
+ const keyv = new Keyv('postgresql://user:pass@localhost:5432/dbname');
60
+ const keyv = new Keyv('mysql://user:pass@localhost:3306/dbname');
61
+
62
+ // Handle DB connection errors
63
+ keyv.on('error', err => console.log('Connection Error', err));
64
+
65
+ await keyv.set('foo', 'expires in 1 second', 1000); // true
66
+ await keyv.set('foo', 'never expires'); // true
67
+ await keyv.get('foo'); // 'never expires'
68
+ await keyv.delete('foo'); // true
69
+ await keyv.clear(); // undefined
70
+ ```
71
+
72
+ ### Namespaces
73
+
74
+ You can namespace your Keyv instance to avoid key collisions and allow you to clear only a certain namespace while using the same database.
75
+
76
+ ```js
77
+ const users = new Keyv('redis://user:pass@localhost:6379', { namespace: 'users' });
78
+ const cache = new Keyv('redis://user:pass@localhost:6379', { namespace: 'cache' });
79
+
80
+ await users.set('foo', 'users'); // true
81
+ await cache.set('foo', 'cache'); // true
82
+ await users.get('foo'); // 'users'
83
+ await cache.get('foo'); // 'cache'
84
+ await users.clear(); // undefined
85
+ await users.get('foo'); // undefined
86
+ await cache.get('foo'); // 'cache'
87
+ ```
88
+
89
+ ### Custom Serializers
90
+
91
+ Keyv uses [`json-buffer`](https://github.com/dominictarr/json-buffer) for data serialization to ensure consistency across different backends.
92
+
93
+ You can optionally provide your own serialization functions to support extra data types or to serialize to something other than JSON.
94
+
95
+ ```js
96
+ const keyv = new Keyv({ serialize: JSON.stringify, deserialize: JSON.parse });
97
+ ```
98
+
99
+ **Warning:** Using custom serializers means you lose any guarantee of data consistency. You should do extensive testing with your serialisation functions and chosen storage engine.
100
+
101
+ ## Official Storage Adapters
102
+
103
+ The official storage adapters are covered by [over 150 integration tests](https://travis-ci.org/lukechilds/keyv/jobs/260418145) to guarantee consistent behaviour. They are lightweight, efficient wrappers over the DB clients making use of indexes and native TTLs where available.
104
+
105
+ Database | Adapter | Native TTL | Status
106
+ ---|---|---|---
107
+ Redis | [@keyv/redis](https://github.com/lukechilds/keyv-redis) | Yes | [![Build Status](https://travis-ci.org/lukechilds/keyv-redis.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-redis) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-redis/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-redis?branch=master)
108
+ MongoDB | [@keyv/mongo](https://github.com/lukechilds/keyv-mongo) | Yes | [![Build Status](https://travis-ci.org/lukechilds/keyv-mongo.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-mongo) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-mongo/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-mongo?branch=master)
109
+ SQLite | [@keyv/sqlite](https://github.com/lukechilds/keyv-sqlite) | No | [![Build Status](https://travis-ci.org/lukechilds/keyv-sqlite.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-sqlite) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-sqlite/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-sqlite?branch=master)
110
+ PostgreSQL | [@keyv/postgres](https://github.com/lukechilds/keyv-postgres) | No | [![Build Status](https://travis-ci.org/lukechilds/keyv-postgres.svg?branch=master)](https://travis-ci.org/lukechildskeyv-postgreskeyv) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-postgres/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-postgres?branch=master)
111
+ MySQL | [@keyv/mysql](https://github.com/lukechilds/keyv-mysql) | No | [![Build Status](https://travis-ci.org/lukechilds/keyv-mysql.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-mysql) [![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-mysql/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-mysql?branch=master)
112
+
113
+ ## Third-party Storage Adapters
114
+
115
+ You can also use third-party storage adapters or build your own. Keyv will wrap these storage adapters in TTL functionality and handle complex types internally.
116
+
117
+ ```js
118
+ const Keyv = require('keyv');
119
+ const myAdapter = require('./my-storage-adapter');
120
+
121
+ const keyv = new Keyv({ store: myAdapter });
122
+ ```
123
+
124
+ Any store that follows the [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) api will work.
125
+
126
+ ```js
127
+ new Keyv({ store: new Map() });
128
+ ```
129
+
130
+ For example, [`quick-lru`](https://github.com/sindresorhus/quick-lru) is a completely unrelated module that implements the Map API.
131
+
132
+ ```js
133
+ const Keyv = require('keyv');
134
+ const QuickLRU = require('quick-lru');
135
+
136
+ const lru = new QuickLRU({ maxSize: 1000 });
137
+ const keyv = new Keyv({ store: lru });
138
+ ```
139
+
140
+ The following are third-party storage adapters compatible with Keyv:
141
+
142
+ - [quick-lru](https://github.com/sindresorhus/quick-lru) - Simple "Least Recently Used" (LRU) cache
143
+ - [keyv-file](https://github.com/zaaack/keyv-file) - File system storage adapter for Keyv
144
+ - [keyv-dynamodb](https://www.npmjs.com/package/keyv-dynamodb) - DynamoDB storage adapter for Keyv
145
+ - [keyv-firestore ](https://github.com/goto-bus-stop/keyv-firestore) – Firebase Cloud Firestore adapter for Keyv
146
+ - [keyv-mssql](https://github.com/pmorgan3/keyv-mssql) - Microsoft Sql Server adapter for Keyv
147
+ - [keyv-memcache](https://github.com/jaredwray/keyv-memcache) - Memcache storage adapter for Keyv
148
+
149
+ ## Add Cache Support to your Module
150
+
151
+ Keyv is designed to be easily embedded into other modules to add cache support. The recommended pattern is to expose a `cache` option in your modules options which is passed through to Keyv. Caching will work in memory by default and users have the option to also install a Keyv storage adapter and pass in a connection string, or any other storage that implements the `Map` API.
152
+
153
+ You should also set a namespace for your module so you can safely call `.clear()` without clearing unrelated app data.
154
+
155
+ Inside your module:
156
+
157
+ ```js
158
+ class AwesomeModule {
159
+ constructor(opts) {
160
+ this.cache = new Keyv({
161
+ uri: typeof opts.cache === 'string' && opts.cache,
162
+ store: typeof opts.cache !== 'string' && opts.cache,
163
+ namespace: 'awesome-module'
164
+ });
165
+ }
166
+ }
167
+ ```
168
+
169
+ Now it can be consumed like this:
170
+
171
+ ```js
172
+ const AwesomeModule = require('awesome-module');
173
+
174
+ // Caches stuff in memory by default
175
+ const awesomeModule = new AwesomeModule();
176
+
177
+ // After npm install --save keyv-redis
178
+ const awesomeModule = new AwesomeModule({ cache: 'redis://localhost' });
179
+
180
+ // Some third-party module that implements the Map API
181
+ const awesomeModule = new AwesomeModule({ cache: some3rdPartyStore });
182
+ ```
183
+
184
+ ## API
185
+
186
+ ### new Keyv([uri], [options])
187
+
188
+ Returns a new Keyv instance.
189
+
190
+ The Keyv instance is also an `EventEmitter` that will emit an `'error'` event if the storage adapter connection fails.
191
+
192
+ ### uri
193
+
194
+ Type: `String`<br>
195
+ Default: `undefined`
196
+
197
+ The connection string URI.
198
+
199
+ Merged into the options object as options.uri.
200
+
201
+ ### options
202
+
203
+ Type: `Object`
204
+
205
+ The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
206
+
207
+ #### options.namespace
208
+
209
+ Type: `String`<br>
210
+ Default: `'keyv'`
211
+
212
+ Namespace for the current instance.
213
+
214
+ #### options.ttl
215
+
216
+ Type: `Number`<br>
217
+ Default: `undefined`
218
+
219
+ Default TTL. Can be overridden by specififying a TTL on `.set()`.
220
+
221
+ #### options.serialize
222
+
223
+ Type: `Function`<br>
224
+ Default: `JSONB.stringify`
225
+
226
+ A custom serialization function.
227
+
228
+ #### options.deserialize
229
+
230
+ Type: `Function`<br>
231
+ Default: `JSONB.parse`
232
+
233
+ A custom deserialization function.
234
+
235
+ #### options.store
236
+
237
+ Type: `Storage adapter instance`<br>
238
+ Default: `new Map()`
239
+
240
+ The storage adapter instance to be used by Keyv.
241
+
242
+ #### options.adapter
243
+
244
+ Type: `String`<br>
245
+ Default: `undefined`
246
+
247
+ Specify an adapter to use. e.g `'redis'` or `'mongodb'`.
248
+
249
+ ### Instance
250
+
251
+ Keys must always be strings. Values can be of any type.
252
+
253
+ #### .set(key, value, [ttl])
254
+
255
+ Set a value.
256
+
257
+ By default keys are persistent. You can set an expiry TTL in milliseconds.
258
+
259
+ Returns a promise which resolves to `true`.
260
+
261
+ #### .get(key, [options])
262
+
263
+ Returns a promise which resolves to the retrieved value.
264
+
265
+ ##### options.raw
266
+
267
+ Type: `Boolean`<br>
268
+ Default: `false`
269
+
270
+ If set to true the raw DB object Keyv stores internally will be returned instead of just the value.
271
+
272
+ This contains the TTL timestamp.
273
+
274
+ #### .delete(key)
275
+
276
+ Deletes an entry.
277
+
278
+ Returns a promise which resolves to `true` if the key existed, `false` if not.
279
+
280
+ #### .clear()
281
+
282
+ Delete all entries in the current namespace.
283
+
284
+ Returns a promise which is resolved when the entries have been cleared.
285
+
286
+ ## License
287
+
288
+ MIT © Luke Childs
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "keyv",
3
+ "version": "4.0.3",
4
+ "description": "Simple key-value storage with support for multiple backends",
5
+ "main": "src/index.js",
6
+ "scripts": {
7
+ "test": "xo && nyc ava test/keyv.js",
8
+ "test:full": "xo && nyc ava --serial",
9
+ "coverage": "nyc report --reporter=text-lcov | coveralls"
10
+ },
11
+ "xo": {
12
+ "extends": "xo-lukechilds"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/lukechilds/keyv.git"
17
+ },
18
+ "keywords": [
19
+ "key",
20
+ "value",
21
+ "store",
22
+ "cache",
23
+ "ttl"
24
+ ],
25
+ "author": "Luke Childs <lukechilds123@gmail.com> (http://lukechilds.co.uk)",
26
+ "license": "MIT",
27
+ "bugs": {
28
+ "url": "https://github.com/lukechilds/keyv/issues"
29
+ },
30
+ "homepage": "https://github.com/lukechilds/keyv",
31
+ "dependencies": {
32
+ "json-buffer": "3.0.1"
33
+ },
34
+ "devDependencies": {
35
+ "ava": "^2.2.0",
36
+ "coveralls": "^3.0.0",
37
+ "eslint-config-xo-lukechilds": "^1.0.0",
38
+ "@keyv/mongo": "*",
39
+ "@keyv/mysql": "*",
40
+ "@keyv/postgres": "*",
41
+ "@keyv/redis": "*",
42
+ "@keyv/sqlite": "*",
43
+ "@keyv/test-suite": "*",
44
+ "nyc": "^14.1.1",
45
+ "this": "^1.0.2",
46
+ "timekeeper": "^2.0.0",
47
+ "xo": "^0.25.3"
48
+ }
49
+ }