plugin-data-source-mssql 2.0.0 → 2.0.1

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 (408) hide show
  1. package/README.md +31 -10
  2. package/dist/node_modules/tedious/245.index.js +741 -0
  3. package/dist/node_modules/tedious/LICENSE +21 -0
  4. package/dist/node_modules/tedious/appveyor.yml +67 -0
  5. package/dist/node_modules/tedious/benchmarks/bulk-load/iterable.js +61 -0
  6. package/dist/node_modules/tedious/benchmarks/common.js +287 -0
  7. package/dist/node_modules/tedious/benchmarks/connection/open.js +26 -0
  8. package/dist/node_modules/tedious/benchmarks/package-lock.json +21173 -0
  9. package/dist/node_modules/tedious/benchmarks/package.json +11 -0
  10. package/dist/node_modules/tedious/benchmarks/query/call-tvp.js +105 -0
  11. package/dist/node_modules/tedious/benchmarks/query/insert-varbinary.js +46 -0
  12. package/dist/node_modules/tedious/benchmarks/query/select-many-rows.js +63 -0
  13. package/dist/node_modules/tedious/benchmarks/query/select-nvarchar.js +50 -0
  14. package/dist/node_modules/tedious/benchmarks/query/select-varbinary.js +50 -0
  15. package/dist/node_modules/tedious/benchmarks/request/rpcrequest-payload-tvp.js +45 -0
  16. package/dist/node_modules/tedious/benchmarks/request/rpcrequest-payload-varbinary.js +37 -0
  17. package/dist/node_modules/tedious/benchmarks/token-parser/colmetadata-token.js +27 -0
  18. package/dist/node_modules/tedious/benchmarks/token-parser/done-token.js +28 -0
  19. package/dist/node_modules/tedious/benchmarks/token-parser/simple-tokens.js +363 -0
  20. package/dist/node_modules/tedious/lib/all-headers.d.ts +2 -0
  21. package/dist/node_modules/tedious/lib/all-headers.js +24 -0
  22. package/dist/node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-algorithm.js +82 -0
  23. package/dist/node_modules/tedious/lib/always-encrypted/aead-aes-256-cbc-hmac-encryption-key.js +55 -0
  24. package/dist/node_modules/tedious/lib/always-encrypted/cek-entry.d.ts +11 -0
  25. package/dist/node_modules/tedious/lib/always-encrypted/cek-entry.js +42 -0
  26. package/dist/node_modules/tedious/lib/always-encrypted/get-parameter-encryption-metadata.js +90 -0
  27. package/dist/node_modules/tedious/lib/always-encrypted/key-crypto.js +94 -0
  28. package/dist/node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.d.ts +21 -0
  29. package/dist/node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.js +247 -0
  30. package/dist/node_modules/tedious/lib/always-encrypted/symmetric-key-cache.js +36 -0
  31. package/dist/node_modules/tedious/lib/always-encrypted/symmetric-key.js +25 -0
  32. package/dist/node_modules/tedious/lib/always-encrypted/types.d.ts +73 -0
  33. package/dist/node_modules/tedious/lib/always-encrypted/types.js +48 -0
  34. package/dist/node_modules/tedious/lib/always-encrypted/utils.js +23 -0
  35. package/dist/node_modules/tedious/lib/bulk-load-payload.d.ts +8 -0
  36. package/dist/node_modules/tedious/lib/bulk-load-payload.js +23 -0
  37. package/dist/node_modules/tedious/lib/bulk-load.d.ts +275 -0
  38. package/dist/node_modules/tedious/lib/bulk-load.js +516 -0
  39. package/dist/node_modules/tedious/lib/collation.d.ts +28 -0
  40. package/dist/node_modules/tedious/lib/collation.js +348 -0
  41. package/dist/node_modules/tedious/lib/connection.d.ts +1310 -0
  42. package/dist/node_modules/tedious/lib/connection.js +2730 -0
  43. package/dist/node_modules/tedious/lib/connector.d.ts +18 -0
  44. package/dist/node_modules/tedious/lib/connector.js +150 -0
  45. package/dist/node_modules/tedious/lib/data-type.d.ts +455 -0
  46. package/dist/node_modules/tedious/lib/data-type.js +428 -0
  47. package/dist/node_modules/tedious/lib/data-types/bigint.d.ts +3 -0
  48. package/dist/node_modules/tedious/lib/data-types/bigint.js +53 -0
  49. package/dist/node_modules/tedious/lib/data-types/binary.d.ts +5 -0
  50. package/dist/node_modules/tedious/lib/data-types/binary.js +67 -0
  51. package/dist/node_modules/tedious/lib/data-types/bit.d.ts +3 -0
  52. package/dist/node_modules/tedious/lib/data-types/bit.js +46 -0
  53. package/dist/node_modules/tedious/lib/data-types/bitn.d.ts +3 -0
  54. package/dist/node_modules/tedious/lib/data-types/bitn.js +29 -0
  55. package/dist/node_modules/tedious/lib/data-types/char.d.ts +5 -0
  56. package/dist/node_modules/tedious/lib/data-types/char.js +86 -0
  57. package/dist/node_modules/tedious/lib/data-types/date.d.ts +3 -0
  58. package/dist/node_modules/tedious/lib/data-types/date.js +72 -0
  59. package/dist/node_modules/tedious/lib/data-types/datetime.d.ts +3 -0
  60. package/dist/node_modules/tedious/lib/data-types/datetime.js +93 -0
  61. package/dist/node_modules/tedious/lib/data-types/datetime2.d.ts +5 -0
  62. package/dist/node_modules/tedious/lib/data-types/datetime2.js +118 -0
  63. package/dist/node_modules/tedious/lib/data-types/datetimen.d.ts +3 -0
  64. package/dist/node_modules/tedious/lib/data-types/datetimen.js +29 -0
  65. package/dist/node_modules/tedious/lib/data-types/datetimeoffset.d.ts +5 -0
  66. package/dist/node_modules/tedious/lib/data-types/datetimeoffset.js +111 -0
  67. package/dist/node_modules/tedious/lib/data-types/decimal.d.ts +6 -0
  68. package/dist/node_modules/tedious/lib/data-types/decimal.js +107 -0
  69. package/dist/node_modules/tedious/lib/data-types/decimaln.d.ts +3 -0
  70. package/dist/node_modules/tedious/lib/data-types/decimaln.js +29 -0
  71. package/dist/node_modules/tedious/lib/data-types/float.d.ts +3 -0
  72. package/dist/node_modules/tedious/lib/data-types/float.js +47 -0
  73. package/dist/node_modules/tedious/lib/data-types/floatn.d.ts +3 -0
  74. package/dist/node_modules/tedious/lib/data-types/floatn.js +29 -0
  75. package/dist/node_modules/tedious/lib/data-types/image.d.ts +3 -0
  76. package/dist/node_modules/tedious/lib/data-types/image.js +56 -0
  77. package/dist/node_modules/tedious/lib/data-types/int.d.ts +3 -0
  78. package/dist/node_modules/tedious/lib/data-types/int.js +53 -0
  79. package/dist/node_modules/tedious/lib/data-types/intn.d.ts +3 -0
  80. package/dist/node_modules/tedious/lib/data-types/intn.js +29 -0
  81. package/dist/node_modules/tedious/lib/data-types/money.d.ts +3 -0
  82. package/dist/node_modules/tedious/lib/data-types/money.js +59 -0
  83. package/dist/node_modules/tedious/lib/data-types/moneyn.d.ts +3 -0
  84. package/dist/node_modules/tedious/lib/data-types/moneyn.js +29 -0
  85. package/dist/node_modules/tedious/lib/data-types/nchar.d.ts +5 -0
  86. package/dist/node_modules/tedious/lib/data-types/nchar.js +100 -0
  87. package/dist/node_modules/tedious/lib/data-types/ntext.d.ts +3 -0
  88. package/dist/node_modules/tedious/lib/data-types/ntext.js +60 -0
  89. package/dist/node_modules/tedious/lib/data-types/null.d.ts +3 -0
  90. package/dist/node_modules/tedious/lib/data-types/null.js +29 -0
  91. package/dist/node_modules/tedious/lib/data-types/numeric.d.ts +6 -0
  92. package/dist/node_modules/tedious/lib/data-types/numeric.js +106 -0
  93. package/dist/node_modules/tedious/lib/data-types/numericn.d.ts +3 -0
  94. package/dist/node_modules/tedious/lib/data-types/numericn.js +29 -0
  95. package/dist/node_modules/tedious/lib/data-types/nvarchar.d.ts +5 -0
  96. package/dist/node_modules/tedious/lib/data-types/nvarchar.js +133 -0
  97. package/dist/node_modules/tedious/lib/data-types/real.d.ts +3 -0
  98. package/dist/node_modules/tedious/lib/data-types/real.js +48 -0
  99. package/dist/node_modules/tedious/lib/data-types/smalldatetime.d.ts +3 -0
  100. package/dist/node_modules/tedious/lib/data-types/smalldatetime.js +83 -0
  101. package/dist/node_modules/tedious/lib/data-types/smallint.d.ts +3 -0
  102. package/dist/node_modules/tedious/lib/data-types/smallint.js +53 -0
  103. package/dist/node_modules/tedious/lib/data-types/smallmoney.d.ts +3 -0
  104. package/dist/node_modules/tedious/lib/data-types/smallmoney.js +51 -0
  105. package/dist/node_modules/tedious/lib/data-types/sql-variant.d.ts +3 -0
  106. package/dist/node_modules/tedious/lib/data-types/sql-variant.js +29 -0
  107. package/dist/node_modules/tedious/lib/data-types/text.d.ts +3 -0
  108. package/dist/node_modules/tedious/lib/data-types/text.js +69 -0
  109. package/dist/node_modules/tedious/lib/data-types/time.d.ts +3 -0
  110. package/dist/node_modules/tedious/lib/data-types/time.js +96 -0
  111. package/dist/node_modules/tedious/lib/data-types/tinyint.d.ts +3 -0
  112. package/dist/node_modules/tedious/lib/data-types/tinyint.js +53 -0
  113. package/dist/node_modules/tedious/lib/data-types/tvp.d.ts +3 -0
  114. package/dist/node_modules/tedious/lib/data-types/tvp.js +117 -0
  115. package/dist/node_modules/tedious/lib/data-types/udt.d.ts +3 -0
  116. package/dist/node_modules/tedious/lib/data-types/udt.js +29 -0
  117. package/dist/node_modules/tedious/lib/data-types/uniqueidentifier.d.ts +3 -0
  118. package/dist/node_modules/tedious/lib/data-types/uniqueidentifier.js +50 -0
  119. package/dist/node_modules/tedious/lib/data-types/varbinary.d.ts +5 -0
  120. package/dist/node_modules/tedious/lib/data-types/varbinary.js +119 -0
  121. package/dist/node_modules/tedious/lib/data-types/varchar.d.ts +5 -0
  122. package/dist/node_modules/tedious/lib/data-types/varchar.js +112 -0
  123. package/dist/node_modules/tedious/lib/data-types/xml.d.ts +3 -0
  124. package/dist/node_modules/tedious/lib/data-types/xml.js +29 -0
  125. package/dist/node_modules/tedious/lib/debug.d.ts +25 -0
  126. package/dist/node_modules/tedious/lib/debug.js +67 -0
  127. package/dist/node_modules/tedious/lib/errors/abort-error.d.ts +4 -0
  128. package/dist/node_modules/tedious/lib/errors/abort-error.js +15 -0
  129. package/dist/node_modules/tedious/lib/errors/timeout-error.d.ts +4 -0
  130. package/dist/node_modules/tedious/lib/errors/timeout-error.js +15 -0
  131. package/dist/node_modules/tedious/lib/errors.d.ts +17 -0
  132. package/dist/node_modules/tedious/lib/errors.js +23 -0
  133. package/dist/node_modules/tedious/lib/guid-parser.d.ts +3 -0
  134. package/dist/node_modules/tedious/lib/guid-parser.js +30 -0
  135. package/dist/node_modules/tedious/lib/incoming-message-stream.d.ts +19 -0
  136. package/dist/node_modules/tedious/lib/incoming-message-stream.js +97 -0
  137. package/dist/node_modules/tedious/lib/instance-lookup.d.ts +13 -0
  138. package/dist/node_modules/tedious/lib/instance-lookup.js +96 -0
  139. package/dist/node_modules/tedious/lib/library.d.ts +1 -0
  140. package/dist/node_modules/tedious/lib/library.js +8 -0
  141. package/dist/node_modules/tedious/lib/login7-payload.d.ts +51 -0
  142. package/dist/node_modules/tedious/lib/login7-payload.js +402 -0
  143. package/dist/node_modules/tedious/lib/message-io.d.ts +28 -0
  144. package/dist/node_modules/tedious/lib/message-io.js +153 -0
  145. package/dist/node_modules/tedious/lib/message.d.ts +11 -0
  146. package/dist/node_modules/tedious/lib/message.js +21 -0
  147. package/dist/node_modules/tedious/lib/metadata-parser.d.ts +48 -0
  148. package/dist/node_modules/tedious/lib/metadata-parser.js +380 -0
  149. package/dist/node_modules/tedious/lib/ntlm-payload.d.ts +23 -0
  150. package/dist/node_modules/tedious/lib/ntlm-payload.js +136 -0
  151. package/dist/node_modules/tedious/lib/ntlm.d.ts +4 -0
  152. package/dist/node_modules/tedious/lib/ntlm.js +72 -0
  153. package/dist/node_modules/tedious/lib/outgoing-message-stream.d.ts +15 -0
  154. package/dist/node_modules/tedious/lib/outgoing-message-stream.js +81 -0
  155. package/dist/node_modules/tedious/lib/packet.d.ts +33 -0
  156. package/dist/node_modules/tedious/lib/packet.js +191 -0
  157. package/dist/node_modules/tedious/lib/prelogin-payload.d.ts +61 -0
  158. package/dist/node_modules/tedious/lib/prelogin-payload.js +209 -0
  159. package/dist/node_modules/tedious/lib/request.d.ts +370 -0
  160. package/dist/node_modules/tedious/lib/request.js +387 -0
  161. package/dist/node_modules/tedious/lib/rpcrequest-payload.d.ts +16 -0
  162. package/dist/node_modules/tedious/lib/rpcrequest-payload.js +109 -0
  163. package/dist/node_modules/tedious/lib/sender.d.ts +5 -0
  164. package/dist/node_modules/tedious/lib/sender.js +83 -0
  165. package/dist/node_modules/tedious/lib/special-stored-procedure.d.ts +18 -0
  166. package/dist/node_modules/tedious/lib/special-stored-procedure.js +26 -0
  167. package/dist/node_modules/tedious/lib/sqlbatch-payload.d.ts +13 -0
  168. package/dist/node_modules/tedious/lib/sqlbatch-payload.js +34 -0
  169. package/dist/node_modules/tedious/lib/tds-versions.d.ts +6 -0
  170. package/dist/node_modules/tedious/lib/tds-versions.js +19 -0
  171. package/dist/node_modules/tedious/lib/tedious.d.ts +13 -0
  172. package/dist/node_modules/tedious/lib/tedious.js +249 -0
  173. package/dist/node_modules/tedious/lib/token/colmetadata-token-parser.d.ts +12 -0
  174. package/dist/node_modules/tedious/lib/token/colmetadata-token-parser.js +124 -0
  175. package/dist/node_modules/tedious/lib/token/done-token-parser.d.ts +6 -0
  176. package/dist/node_modules/tedious/lib/token/done-token-parser.js +76 -0
  177. package/dist/node_modules/tedious/lib/token/env-change-token-parser.d.ts +5 -0
  178. package/dist/node_modules/tedious/lib/token/env-change-token-parser.js +190 -0
  179. package/dist/node_modules/tedious/lib/token/feature-ext-ack-parser.d.ts +5 -0
  180. package/dist/node_modules/tedious/lib/token/feature-ext-ack-parser.js +52 -0
  181. package/dist/node_modules/tedious/lib/token/fedauth-info-parser.d.ts +5 -0
  182. package/dist/node_modules/tedious/lib/token/fedauth-info-parser.js +62 -0
  183. package/dist/node_modules/tedious/lib/token/handler.d.ts +135 -0
  184. package/dist/node_modules/tedious/lib/token/handler.js +444 -0
  185. package/dist/node_modules/tedious/lib/token/helpers.d.ts +28 -0
  186. package/dist/node_modules/tedious/lib/token/helpers.js +205 -0
  187. package/dist/node_modules/tedious/lib/token/infoerror-token-parser.d.ts +5 -0
  188. package/dist/node_modules/tedious/lib/token/infoerror-token-parser.js +80 -0
  189. package/dist/node_modules/tedious/lib/token/loginack-token-parser.d.ts +5 -0
  190. package/dist/node_modules/tedious/lib/token/loginack-token-parser.js +75 -0
  191. package/dist/node_modules/tedious/lib/token/nbcrow-token-parser.d.ts +4 -0
  192. package/dist/node_modules/tedious/lib/token/nbcrow-token-parser.js +104 -0
  193. package/dist/node_modules/tedious/lib/token/order-token-parser.d.ts +5 -0
  194. package/dist/node_modules/tedious/lib/token/order-token-parser.js +34 -0
  195. package/dist/node_modules/tedious/lib/token/returnstatus-token-parser.d.ts +5 -0
  196. package/dist/node_modules/tedious/lib/token/returnstatus-token-parser.js +21 -0
  197. package/dist/node_modules/tedious/lib/token/returnvalue-token-parser.d.ts +4 -0
  198. package/dist/node_modules/tedious/lib/token/returnvalue-token-parser.js +94 -0
  199. package/dist/node_modules/tedious/lib/token/row-token-parser.d.ts +4 -0
  200. package/dist/node_modules/tedious/lib/token/row-token-parser.js +77 -0
  201. package/dist/node_modules/tedious/lib/token/sspi-token-parser.d.ts +5 -0
  202. package/dist/node_modules/tedious/lib/token/sspi-token-parser.js +42 -0
  203. package/dist/node_modules/tedious/lib/token/stream-parser.d.ts +34 -0
  204. package/dist/node_modules/tedious/lib/token/stream-parser.js +341 -0
  205. package/dist/node_modules/tedious/lib/token/token-stream-parser.d.ts +15 -0
  206. package/dist/node_modules/tedious/lib/token/token-stream-parser.js +36 -0
  207. package/dist/node_modules/tedious/lib/token/token.d.ts +312 -0
  208. package/dist/node_modules/tedious/lib/token/token.js +328 -0
  209. package/dist/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.d.ts +47 -0
  210. package/dist/node_modules/tedious/lib/tracking-buffer/writable-tracking-buffer.js +249 -0
  211. package/dist/node_modules/tedious/lib/transaction.d.ts +39 -0
  212. package/dist/node_modules/tedious/lib/transaction.js +137 -0
  213. package/dist/node_modules/tedious/lib/transient-error-lookup.d.ts +3 -0
  214. package/dist/node_modules/tedious/lib/transient-error-lookup.js +19 -0
  215. package/dist/node_modules/tedious/lib/utils/with-timeout.d.ts +7 -0
  216. package/dist/node_modules/tedious/lib/utils/with-timeout.js +36 -0
  217. package/dist/node_modules/tedious/lib/value-parser.d.ts +7 -0
  218. package/dist/node_modules/tedious/lib/value-parser.js +813 -0
  219. package/dist/node_modules/tedious/node_modules/@types/node/assert/strict.d.ts +105 -0
  220. package/dist/node_modules/tedious/node_modules/@types/node/assert.d.ts +955 -0
  221. package/dist/node_modules/tedious/node_modules/@types/node/async_hooks.d.ts +623 -0
  222. package/dist/node_modules/tedious/node_modules/@types/node/buffer.buffer.d.ts +466 -0
  223. package/dist/node_modules/tedious/node_modules/@types/node/buffer.d.ts +1810 -0
  224. package/dist/node_modules/tedious/node_modules/@types/node/child_process.d.ts +1428 -0
  225. package/dist/node_modules/tedious/node_modules/@types/node/cluster.d.ts +486 -0
  226. package/dist/node_modules/tedious/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  227. package/dist/node_modules/tedious/node_modules/@types/node/console.d.ts +151 -0
  228. package/dist/node_modules/tedious/node_modules/@types/node/constants.d.ts +20 -0
  229. package/dist/node_modules/tedious/node_modules/@types/node/crypto.d.ts +4065 -0
  230. package/dist/node_modules/tedious/node_modules/@types/node/dgram.d.ts +564 -0
  231. package/dist/node_modules/tedious/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
  232. package/dist/node_modules/tedious/node_modules/@types/node/dns/promises.d.ts +503 -0
  233. package/dist/node_modules/tedious/node_modules/@types/node/dns.d.ts +922 -0
  234. package/dist/node_modules/tedious/node_modules/@types/node/domain.d.ts +166 -0
  235. package/dist/node_modules/tedious/node_modules/@types/node/events.d.ts +1054 -0
  236. package/dist/node_modules/tedious/node_modules/@types/node/fs/promises.d.ts +1329 -0
  237. package/dist/node_modules/tedious/node_modules/@types/node/fs.d.ts +4676 -0
  238. package/dist/node_modules/tedious/node_modules/@types/node/globals.d.ts +150 -0
  239. package/dist/node_modules/tedious/node_modules/@types/node/globals.typedarray.d.ts +101 -0
  240. package/dist/node_modules/tedious/node_modules/@types/node/http.d.ts +2167 -0
  241. package/dist/node_modules/tedious/node_modules/@types/node/http2.d.ts +2480 -0
  242. package/dist/node_modules/tedious/node_modules/@types/node/https.d.ts +405 -0
  243. package/dist/node_modules/tedious/node_modules/@types/node/index.d.ts +115 -0
  244. package/dist/node_modules/tedious/node_modules/@types/node/inspector/promises.d.ts +41 -0
  245. package/dist/node_modules/tedious/node_modules/@types/node/inspector.d.ts +224 -0
  246. package/dist/node_modules/tedious/node_modules/@types/node/inspector.generated.d.ts +4226 -0
  247. package/dist/node_modules/tedious/node_modules/@types/node/module.d.ts +819 -0
  248. package/dist/node_modules/tedious/node_modules/@types/node/net.d.ts +933 -0
  249. package/dist/node_modules/tedious/node_modules/@types/node/os.d.ts +507 -0
  250. package/dist/node_modules/tedious/node_modules/@types/node/package.json +155 -0
  251. package/dist/node_modules/tedious/node_modules/@types/node/path/posix.d.ts +8 -0
  252. package/dist/node_modules/tedious/node_modules/@types/node/path/win32.d.ts +8 -0
  253. package/dist/node_modules/tedious/node_modules/@types/node/path.d.ts +187 -0
  254. package/dist/node_modules/tedious/node_modules/@types/node/perf_hooks.d.ts +643 -0
  255. package/dist/node_modules/tedious/node_modules/@types/node/process.d.ts +2161 -0
  256. package/dist/node_modules/tedious/node_modules/@types/node/punycode.d.ts +117 -0
  257. package/dist/node_modules/tedious/node_modules/@types/node/querystring.d.ts +152 -0
  258. package/dist/node_modules/tedious/node_modules/@types/node/quic.d.ts +910 -0
  259. package/dist/node_modules/tedious/node_modules/@types/node/readline/promises.d.ts +161 -0
  260. package/dist/node_modules/tedious/node_modules/@types/node/readline.d.ts +541 -0
  261. package/dist/node_modules/tedious/node_modules/@types/node/repl.d.ts +415 -0
  262. package/dist/node_modules/tedious/node_modules/@types/node/sea.d.ts +162 -0
  263. package/dist/node_modules/tedious/node_modules/@types/node/sqlite.d.ts +955 -0
  264. package/dist/node_modules/tedious/node_modules/@types/node/stream/consumers.d.ts +38 -0
  265. package/dist/node_modules/tedious/node_modules/@types/node/stream/promises.d.ts +211 -0
  266. package/dist/node_modules/tedious/node_modules/@types/node/stream/web.d.ts +296 -0
  267. package/dist/node_modules/tedious/node_modules/@types/node/stream.d.ts +1760 -0
  268. package/dist/node_modules/tedious/node_modules/@types/node/string_decoder.d.ts +67 -0
  269. package/dist/node_modules/tedious/node_modules/@types/node/test/reporters.d.ts +96 -0
  270. package/dist/node_modules/tedious/node_modules/@types/node/test.d.ts +2240 -0
  271. package/dist/node_modules/tedious/node_modules/@types/node/timers/promises.d.ts +108 -0
  272. package/dist/node_modules/tedious/node_modules/@types/node/timers.d.ts +159 -0
  273. package/dist/node_modules/tedious/node_modules/@types/node/tls.d.ts +1198 -0
  274. package/dist/node_modules/tedious/node_modules/@types/node/trace_events.d.ts +197 -0
  275. package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
  276. package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  277. package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  278. package/dist/node_modules/tedious/node_modules/@types/node/ts5.6/index.d.ts +117 -0
  279. package/dist/node_modules/tedious/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  280. package/dist/node_modules/tedious/node_modules/@types/node/ts5.7/index.d.ts +117 -0
  281. package/dist/node_modules/tedious/node_modules/@types/node/tty.d.ts +250 -0
  282. package/dist/node_modules/tedious/node_modules/@types/node/url.d.ts +519 -0
  283. package/dist/node_modules/tedious/node_modules/@types/node/util/types.d.ts +558 -0
  284. package/dist/node_modules/tedious/node_modules/@types/node/util.d.ts +1662 -0
  285. package/dist/node_modules/tedious/node_modules/@types/node/v8.d.ts +983 -0
  286. package/dist/node_modules/tedious/node_modules/@types/node/vm.d.ts +1208 -0
  287. package/dist/node_modules/tedious/node_modules/@types/node/wasi.d.ts +202 -0
  288. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
  289. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  290. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/console.d.ts +9 -0
  291. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  292. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  293. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  294. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/events.d.ts +106 -0
  295. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
  296. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  297. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  298. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  299. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  300. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  301. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/streams.d.ts +115 -0
  302. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  303. package/dist/node_modules/tedious/node_modules/@types/node/web-globals/url.d.ts +24 -0
  304. package/dist/node_modules/tedious/node_modules/@types/node/worker_threads.d.ts +717 -0
  305. package/dist/node_modules/tedious/node_modules/@types/node/zlib.d.ts +618 -0
  306. package/dist/node_modules/tedious/node_modules/bl/.github/dependabot.yml +16 -0
  307. package/dist/node_modules/tedious/node_modules/bl/.github/workflows/test-and-release.yml +61 -0
  308. package/dist/node_modules/tedious/node_modules/bl/BufferList.d.ts +431 -0
  309. package/dist/node_modules/tedious/node_modules/bl/BufferList.js +421 -0
  310. package/dist/node_modules/tedious/node_modules/bl/bl.js +84 -0
  311. package/dist/node_modules/tedious/node_modules/bl/index.d.ts +88 -0
  312. package/dist/node_modules/tedious/node_modules/bl/package.json +123 -0
  313. package/dist/node_modules/tedious/node_modules/bl/test/convert.js +21 -0
  314. package/dist/node_modules/tedious/node_modules/bl/test/indexOf.js +492 -0
  315. package/dist/node_modules/tedious/node_modules/bl/test/isBufferList.js +32 -0
  316. package/dist/node_modules/tedious/node_modules/bl/test/test.js +1032 -0
  317. package/dist/node_modules/tedious/node_modules/buffer/index.d.ts +194 -0
  318. package/dist/node_modules/tedious/node_modules/buffer/index.js +2106 -0
  319. package/dist/node_modules/tedious/node_modules/buffer/package.json +93 -0
  320. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
  321. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
  322. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_readable.js +4 -0
  323. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_transform.js +4 -0
  324. package/dist/node_modules/tedious/node_modules/readable-stream/lib/_stream_writable.js +4 -0
  325. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
  326. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
  327. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
  328. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
  329. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
  330. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
  331. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +286 -0
  332. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
  333. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
  334. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/legacy.js +89 -0
  335. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
  336. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
  337. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
  338. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/readable.js +1290 -0
  339. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
  340. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
  341. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/utils.js +327 -0
  342. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/streams/writable.js +819 -0
  343. package/dist/node_modules/tedious/node_modules/readable-stream/lib/internal/validators.js +530 -0
  344. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/browser.js +35 -0
  345. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/errors.js +343 -0
  346. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/index.js +65 -0
  347. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/primordials.js +124 -0
  348. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/util/inspect.js +55 -0
  349. package/dist/node_modules/tedious/node_modules/readable-stream/lib/ours/util.js +148 -0
  350. package/dist/node_modules/tedious/node_modules/readable-stream/lib/stream/promises.js +43 -0
  351. package/dist/node_modules/tedious/node_modules/readable-stream/lib/stream.js +143 -0
  352. package/dist/node_modules/tedious/node_modules/readable-stream/package.json +88 -0
  353. package/dist/node_modules/tedious/node_modules/sprintf-js/dist/.gitattributes +4 -0
  354. package/dist/node_modules/tedious/node_modules/sprintf-js/dist/angular-sprintf.min.js +3 -0
  355. package/dist/node_modules/tedious/node_modules/sprintf-js/dist/sprintf.min.js +3 -0
  356. package/dist/node_modules/tedious/node_modules/sprintf-js/package.json +35 -0
  357. package/dist/node_modules/tedious/node_modules/sprintf-js/src/angular-sprintf.js +24 -0
  358. package/dist/node_modules/tedious/node_modules/sprintf-js/src/sprintf.js +231 -0
  359. package/dist/node_modules/tedious/node_modules/undici-types/agent.d.ts +32 -0
  360. package/dist/node_modules/tedious/node_modules/undici-types/api.d.ts +43 -0
  361. package/dist/node_modules/tedious/node_modules/undici-types/balanced-pool.d.ts +29 -0
  362. package/dist/node_modules/tedious/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  363. package/dist/node_modules/tedious/node_modules/undici-types/cache.d.ts +36 -0
  364. package/dist/node_modules/tedious/node_modules/undici-types/client-stats.d.ts +15 -0
  365. package/dist/node_modules/tedious/node_modules/undici-types/client.d.ts +108 -0
  366. package/dist/node_modules/tedious/node_modules/undici-types/connector.d.ts +34 -0
  367. package/dist/node_modules/tedious/node_modules/undici-types/content-type.d.ts +21 -0
  368. package/dist/node_modules/tedious/node_modules/undici-types/cookies.d.ts +30 -0
  369. package/dist/node_modules/tedious/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
  370. package/dist/node_modules/tedious/node_modules/undici-types/dispatcher.d.ts +276 -0
  371. package/dist/node_modules/tedious/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  372. package/dist/node_modules/tedious/node_modules/undici-types/errors.d.ts +161 -0
  373. package/dist/node_modules/tedious/node_modules/undici-types/eventsource.d.ts +66 -0
  374. package/dist/node_modules/tedious/node_modules/undici-types/fetch.d.ts +211 -0
  375. package/dist/node_modules/tedious/node_modules/undici-types/formdata.d.ts +108 -0
  376. package/dist/node_modules/tedious/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  377. package/dist/node_modules/tedious/node_modules/undici-types/global-origin.d.ts +7 -0
  378. package/dist/node_modules/tedious/node_modules/undici-types/h2c-client.d.ts +73 -0
  379. package/dist/node_modules/tedious/node_modules/undici-types/handlers.d.ts +15 -0
  380. package/dist/node_modules/tedious/node_modules/undici-types/header.d.ts +160 -0
  381. package/dist/node_modules/tedious/node_modules/undici-types/index.d.ts +80 -0
  382. package/dist/node_modules/tedious/node_modules/undici-types/interceptors.d.ts +39 -0
  383. package/dist/node_modules/tedious/node_modules/undici-types/mock-agent.d.ts +68 -0
  384. package/dist/node_modules/tedious/node_modules/undici-types/mock-call-history.d.ts +111 -0
  385. package/dist/node_modules/tedious/node_modules/undici-types/mock-client.d.ts +27 -0
  386. package/dist/node_modules/tedious/node_modules/undici-types/mock-errors.d.ts +12 -0
  387. package/dist/node_modules/tedious/node_modules/undici-types/mock-interceptor.d.ts +94 -0
  388. package/dist/node_modules/tedious/node_modules/undici-types/mock-pool.d.ts +27 -0
  389. package/dist/node_modules/tedious/node_modules/undici-types/package.json +55 -0
  390. package/dist/node_modules/tedious/node_modules/undici-types/patch.d.ts +29 -0
  391. package/dist/node_modules/tedious/node_modules/undici-types/pool-stats.d.ts +19 -0
  392. package/dist/node_modules/tedious/node_modules/undici-types/pool.d.ts +41 -0
  393. package/dist/node_modules/tedious/node_modules/undici-types/proxy-agent.d.ts +29 -0
  394. package/dist/node_modules/tedious/node_modules/undici-types/readable.d.ts +68 -0
  395. package/dist/node_modules/tedious/node_modules/undici-types/retry-agent.d.ts +8 -0
  396. package/dist/node_modules/tedious/node_modules/undici-types/retry-handler.d.ts +125 -0
  397. package/dist/node_modules/tedious/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  398. package/dist/node_modules/tedious/node_modules/undici-types/util.d.ts +18 -0
  399. package/dist/node_modules/tedious/node_modules/undici-types/utility.d.ts +7 -0
  400. package/dist/node_modules/tedious/node_modules/undici-types/webidl.d.ts +341 -0
  401. package/dist/node_modules/tedious/node_modules/undici-types/websocket.d.ts +186 -0
  402. package/dist/node_modules/tedious/package.json +1 -0
  403. package/dist/node_modules/tedious/tsconfig.build-types.json +15 -0
  404. package/dist/node_modules/tedious/tsconfig.json +29 -0
  405. package/dist/node_modules/tedious/types/js-md4.d.ts +7 -0
  406. package/dist/node_modules/tedious/types/native-duplexpair.d.ts +12 -0
  407. package/dist/server/data-source/MssqlExternalDataSource.js +33 -2
  408. package/package.json +1 -1
@@ -0,0 +1,231 @@
1
+ /* global window, exports, define */
2
+
3
+ !function() {
4
+ 'use strict'
5
+
6
+ var re = {
7
+ not_string: /[^s]/,
8
+ not_bool: /[^t]/,
9
+ not_type: /[^T]/,
10
+ not_primitive: /[^v]/,
11
+ number: /[diefg]/,
12
+ numeric_arg: /[bcdiefguxX]/,
13
+ json: /[j]/,
14
+ not_json: /[^j]/,
15
+ text: /^[^\x25]+/,
16
+ modulo: /^\x25{2}/,
17
+ placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
18
+ key: /^([a-z_][a-z_\d]*)/i,
19
+ key_access: /^\.([a-z_][a-z_\d]*)/i,
20
+ index_access: /^\[(\d+)\]/,
21
+ sign: /^[+-]/
22
+ }
23
+
24
+ function sprintf(key) {
25
+ // `arguments` is not an array, but should be fine for this call
26
+ return sprintf_format(sprintf_parse(key), arguments)
27
+ }
28
+
29
+ function vsprintf(fmt, argv) {
30
+ return sprintf.apply(null, [fmt].concat(argv || []))
31
+ }
32
+
33
+ function sprintf_format(parse_tree, argv) {
34
+ var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign
35
+ for (i = 0; i < tree_length; i++) {
36
+ if (typeof parse_tree[i] === 'string') {
37
+ output += parse_tree[i]
38
+ }
39
+ else if (typeof parse_tree[i] === 'object') {
40
+ ph = parse_tree[i] // convenience purposes only
41
+ if (ph.keys) { // keyword argument
42
+ arg = argv[cursor]
43
+ for (k = 0; k < ph.keys.length; k++) {
44
+ if (arg == undefined) {
45
+ throw new Error(sprintf('[sprintf] Cannot access property "%s" of undefined value "%s"', ph.keys[k], ph.keys[k-1]))
46
+ }
47
+ arg = arg[ph.keys[k]]
48
+ }
49
+ }
50
+ else if (ph.param_no) { // positional argument (explicit)
51
+ arg = argv[ph.param_no]
52
+ }
53
+ else { // positional argument (implicit)
54
+ arg = argv[cursor++]
55
+ }
56
+
57
+ if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
58
+ arg = arg()
59
+ }
60
+
61
+ if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {
62
+ throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))
63
+ }
64
+
65
+ if (re.number.test(ph.type)) {
66
+ is_positive = arg >= 0
67
+ }
68
+
69
+ switch (ph.type) {
70
+ case 'b':
71
+ arg = parseInt(arg, 10).toString(2)
72
+ break
73
+ case 'c':
74
+ arg = String.fromCharCode(parseInt(arg, 10))
75
+ break
76
+ case 'd':
77
+ case 'i':
78
+ arg = parseInt(arg, 10)
79
+ break
80
+ case 'j':
81
+ arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)
82
+ break
83
+ case 'e':
84
+ arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()
85
+ break
86
+ case 'f':
87
+ arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)
88
+ break
89
+ case 'g':
90
+ arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)
91
+ break
92
+ case 'o':
93
+ arg = (parseInt(arg, 10) >>> 0).toString(8)
94
+ break
95
+ case 's':
96
+ arg = String(arg)
97
+ arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
98
+ break
99
+ case 't':
100
+ arg = String(!!arg)
101
+ arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
102
+ break
103
+ case 'T':
104
+ arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()
105
+ arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
106
+ break
107
+ case 'u':
108
+ arg = parseInt(arg, 10) >>> 0
109
+ break
110
+ case 'v':
111
+ arg = arg.valueOf()
112
+ arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
113
+ break
114
+ case 'x':
115
+ arg = (parseInt(arg, 10) >>> 0).toString(16)
116
+ break
117
+ case 'X':
118
+ arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()
119
+ break
120
+ }
121
+ if (re.json.test(ph.type)) {
122
+ output += arg
123
+ }
124
+ else {
125
+ if (re.number.test(ph.type) && (!is_positive || ph.sign)) {
126
+ sign = is_positive ? '+' : '-'
127
+ arg = arg.toString().replace(re.sign, '')
128
+ }
129
+ else {
130
+ sign = ''
131
+ }
132
+ pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '
133
+ pad_length = ph.width - (sign + arg).length
134
+ pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''
135
+ output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)
136
+ }
137
+ }
138
+ }
139
+ return output
140
+ }
141
+
142
+ var sprintf_cache = Object.create(null)
143
+
144
+ function sprintf_parse(fmt) {
145
+ if (sprintf_cache[fmt]) {
146
+ return sprintf_cache[fmt]
147
+ }
148
+
149
+ var _fmt = fmt, match, parse_tree = [], arg_names = 0
150
+ while (_fmt) {
151
+ if ((match = re.text.exec(_fmt)) !== null) {
152
+ parse_tree.push(match[0])
153
+ }
154
+ else if ((match = re.modulo.exec(_fmt)) !== null) {
155
+ parse_tree.push('%')
156
+ }
157
+ else if ((match = re.placeholder.exec(_fmt)) !== null) {
158
+ if (match[2]) {
159
+ arg_names |= 1
160
+ var field_list = [], replacement_field = match[2], field_match = []
161
+ if ((field_match = re.key.exec(replacement_field)) !== null) {
162
+ field_list.push(field_match[1])
163
+ while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
164
+ if ((field_match = re.key_access.exec(replacement_field)) !== null) {
165
+ field_list.push(field_match[1])
166
+ }
167
+ else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
168
+ field_list.push(field_match[1])
169
+ }
170
+ else {
171
+ throw new SyntaxError('[sprintf] failed to parse named argument key')
172
+ }
173
+ }
174
+ }
175
+ else {
176
+ throw new SyntaxError('[sprintf] failed to parse named argument key')
177
+ }
178
+ match[2] = field_list
179
+ }
180
+ else {
181
+ arg_names |= 2
182
+ }
183
+ if (arg_names === 3) {
184
+ throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')
185
+ }
186
+
187
+ parse_tree.push(
188
+ {
189
+ placeholder: match[0],
190
+ param_no: match[1],
191
+ keys: match[2],
192
+ sign: match[3],
193
+ pad_char: match[4],
194
+ align: match[5],
195
+ width: match[6],
196
+ precision: match[7],
197
+ type: match[8]
198
+ }
199
+ )
200
+ }
201
+ else {
202
+ throw new SyntaxError('[sprintf] unexpected placeholder')
203
+ }
204
+ _fmt = _fmt.substring(match[0].length)
205
+ }
206
+ return sprintf_cache[fmt] = parse_tree
207
+ }
208
+
209
+ /**
210
+ * export to either browser or node.js
211
+ */
212
+ /* eslint-disable quote-props */
213
+ if (typeof exports !== 'undefined') {
214
+ exports['sprintf'] = sprintf
215
+ exports['vsprintf'] = vsprintf
216
+ }
217
+ if (typeof window !== 'undefined') {
218
+ window['sprintf'] = sprintf
219
+ window['vsprintf'] = vsprintf
220
+
221
+ if (typeof define === 'function' && define['amd']) {
222
+ define(function() {
223
+ return {
224
+ 'sprintf': sprintf,
225
+ 'vsprintf': vsprintf
226
+ }
227
+ })
228
+ }
229
+ }
230
+ /* eslint-enable quote-props */
231
+ }(); // eslint-disable-line
@@ -0,0 +1,32 @@
1
+ import { URL } from 'url'
2
+ import Pool from './pool'
3
+ import Dispatcher from './dispatcher'
4
+ import TClientStats from './client-stats'
5
+ import TPoolStats from './pool-stats'
6
+
7
+ export default Agent
8
+
9
+ declare class Agent extends Dispatcher {
10
+ constructor (opts?: Agent.Options)
11
+ /** `true` after `dispatcher.close()` has been called. */
12
+ closed: boolean
13
+ /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
14
+ destroyed: boolean
15
+ /** Dispatches a request. */
16
+ dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
17
+ /** Aggregate stats for a Agent by origin. */
18
+ readonly stats: Record<string, TClientStats | TPoolStats>
19
+ }
20
+
21
+ declare namespace Agent {
22
+ export interface Options extends Pool.Options {
23
+ /** Default: `(origin, opts) => new Pool(origin, opts)`. */
24
+ factory?(origin: string | URL, opts: Object): Dispatcher;
25
+
26
+ interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options['interceptors']
27
+ maxOrigins?: number
28
+ }
29
+
30
+ export interface DispatchOptions extends Dispatcher.DispatchOptions {
31
+ }
32
+ }
@@ -0,0 +1,43 @@
1
+ import { URL, UrlObject } from 'url'
2
+ import { Duplex } from 'stream'
3
+ import Dispatcher from './dispatcher'
4
+
5
+ /** Performs an HTTP request. */
6
+ declare function request<TOpaque = null> (
7
+ url: string | URL | UrlObject,
8
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
9
+ ): Promise<Dispatcher.ResponseData<TOpaque>>
10
+
11
+ /** A faster version of `request`. */
12
+ declare function stream<TOpaque = null> (
13
+ url: string | URL | UrlObject,
14
+ options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions<TOpaque>, 'origin' | 'path'>,
15
+ factory: Dispatcher.StreamFactory<TOpaque>
16
+ ): Promise<Dispatcher.StreamData<TOpaque>>
17
+
18
+ /** For easy use with `stream.pipeline`. */
19
+ declare function pipeline<TOpaque = null> (
20
+ url: string | URL | UrlObject,
21
+ options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions<TOpaque>, 'origin' | 'path'>,
22
+ handler: Dispatcher.PipelineHandler<TOpaque>
23
+ ): Duplex
24
+
25
+ /** Starts two-way communications with the requested resource. */
26
+ declare function connect<TOpaque = null> (
27
+ url: string | URL | UrlObject,
28
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin' | 'path'>
29
+ ): Promise<Dispatcher.ConnectData<TOpaque>>
30
+
31
+ /** Upgrade to a different protocol. */
32
+ declare function upgrade (
33
+ url: string | URL | UrlObject,
34
+ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
35
+ ): Promise<Dispatcher.UpgradeData>
36
+
37
+ export {
38
+ request,
39
+ stream,
40
+ pipeline,
41
+ connect,
42
+ upgrade
43
+ }
@@ -0,0 +1,29 @@
1
+ import Pool from './pool'
2
+ import Dispatcher from './dispatcher'
3
+ import { URL } from 'url'
4
+
5
+ export default BalancedPool
6
+
7
+ type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
8
+
9
+ declare class BalancedPool extends Dispatcher {
10
+ constructor (url: string | string[] | URL | URL[], options?: Pool.Options)
11
+
12
+ addUpstream (upstream: string | URL): BalancedPool
13
+ removeUpstream (upstream: string | URL): BalancedPool
14
+ upstreams: Array<string>
15
+
16
+ /** `true` after `pool.close()` has been called. */
17
+ closed: boolean
18
+ /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
19
+ destroyed: boolean
20
+
21
+ // Override dispatcher APIs.
22
+ override connect (
23
+ options: BalancedPoolConnectOptions
24
+ ): Promise<Dispatcher.ConnectData>
25
+ override connect (
26
+ options: BalancedPoolConnectOptions,
27
+ callback: (err: Error | null, data: Dispatcher.ConnectData) => void
28
+ ): void
29
+ }
@@ -0,0 +1,172 @@
1
+ import { Readable, Writable } from 'node:stream'
2
+
3
+ export default CacheHandler
4
+
5
+ declare namespace CacheHandler {
6
+ export type CacheMethods = 'GET' | 'HEAD' | 'OPTIONS' | 'TRACE'
7
+
8
+ export interface CacheHandlerOptions {
9
+ store: CacheStore
10
+
11
+ cacheByDefault?: number
12
+
13
+ type?: CacheOptions['type']
14
+ }
15
+
16
+ export interface CacheOptions {
17
+ store?: CacheStore
18
+
19
+ /**
20
+ * The methods to cache
21
+ * Note we can only cache safe methods. Unsafe methods (i.e. PUT, POST)
22
+ * invalidate the cache for a origin.
23
+ * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-invalidating-stored-respons
24
+ * @see https://www.rfc-editor.org/rfc/rfc9110#section-9.2.1
25
+ */
26
+ methods?: CacheMethods[]
27
+
28
+ /**
29
+ * RFC9111 allows for caching responses that we aren't explicitly told to
30
+ * cache or to not cache.
31
+ * @see https://www.rfc-editor.org/rfc/rfc9111.html#section-3-5
32
+ * @default undefined
33
+ */
34
+ cacheByDefault?: number
35
+
36
+ /**
37
+ * TODO docs
38
+ * @default 'shared'
39
+ */
40
+ type?: 'shared' | 'private'
41
+ }
42
+
43
+ export interface CacheControlDirectives {
44
+ 'max-stale'?: number;
45
+ 'min-fresh'?: number;
46
+ 'max-age'?: number;
47
+ 's-maxage'?: number;
48
+ 'stale-while-revalidate'?: number;
49
+ 'stale-if-error'?: number;
50
+ public?: true;
51
+ private?: true | string[];
52
+ 'no-store'?: true;
53
+ 'no-cache'?: true | string[];
54
+ 'must-revalidate'?: true;
55
+ 'proxy-revalidate'?: true;
56
+ immutable?: true;
57
+ 'no-transform'?: true;
58
+ 'must-understand'?: true;
59
+ 'only-if-cached'?: true;
60
+ }
61
+
62
+ export interface CacheKey {
63
+ origin: string
64
+ method: string
65
+ path: string
66
+ headers?: Record<string, string | string[]>
67
+ }
68
+
69
+ export interface CacheValue {
70
+ statusCode: number
71
+ statusMessage: string
72
+ headers: Record<string, string | string[]>
73
+ vary?: Record<string, string | string[] | null>
74
+ etag?: string
75
+ cacheControlDirectives?: CacheControlDirectives
76
+ cachedAt: number
77
+ staleAt: number
78
+ deleteAt: number
79
+ }
80
+
81
+ export interface DeleteByUri {
82
+ origin: string
83
+ method: string
84
+ path: string
85
+ }
86
+
87
+ type GetResult = {
88
+ statusCode: number
89
+ statusMessage: string
90
+ headers: Record<string, string | string[]>
91
+ vary?: Record<string, string | string[] | null>
92
+ etag?: string
93
+ body?: Readable | Iterable<Buffer> | AsyncIterable<Buffer> | Buffer | Iterable<string> | AsyncIterable<string> | string
94
+ cacheControlDirectives: CacheControlDirectives,
95
+ cachedAt: number
96
+ staleAt: number
97
+ deleteAt: number
98
+ }
99
+
100
+ /**
101
+ * Underlying storage provider for cached responses
102
+ */
103
+ export interface CacheStore {
104
+ get(key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
105
+
106
+ createWriteStream(key: CacheKey, val: CacheValue): Writable | undefined
107
+
108
+ delete(key: CacheKey): void | Promise<void>
109
+ }
110
+
111
+ export interface MemoryCacheStoreOpts {
112
+ /**
113
+ * @default Infinity
114
+ */
115
+ maxCount?: number
116
+
117
+ /**
118
+ * @default Infinity
119
+ */
120
+ maxSize?: number
121
+
122
+ /**
123
+ * @default Infinity
124
+ */
125
+ maxEntrySize?: number
126
+
127
+ errorCallback?: (err: Error) => void
128
+ }
129
+
130
+ export class MemoryCacheStore implements CacheStore {
131
+ constructor (opts?: MemoryCacheStoreOpts)
132
+
133
+ get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
134
+
135
+ createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined
136
+
137
+ delete (key: CacheKey): void | Promise<void>
138
+ }
139
+
140
+ export interface SqliteCacheStoreOpts {
141
+ /**
142
+ * Location of the database
143
+ * @default ':memory:'
144
+ */
145
+ location?: string
146
+
147
+ /**
148
+ * @default Infinity
149
+ */
150
+ maxCount?: number
151
+
152
+ /**
153
+ * @default Infinity
154
+ */
155
+ maxEntrySize?: number
156
+ }
157
+
158
+ export class SqliteCacheStore implements CacheStore {
159
+ constructor (opts?: SqliteCacheStoreOpts)
160
+
161
+ /**
162
+ * Closes the connection to the database
163
+ */
164
+ close (): void
165
+
166
+ get (key: CacheKey): GetResult | Promise<GetResult | undefined> | undefined
167
+
168
+ createWriteStream (key: CacheKey, value: CacheValue): Writable | undefined
169
+
170
+ delete (key: CacheKey): void | Promise<void>
171
+ }
172
+ }
@@ -0,0 +1,36 @@
1
+ import type { RequestInfo, Response, Request } from './fetch'
2
+
3
+ export interface CacheStorage {
4
+ match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
5
+ has (cacheName: string): Promise<boolean>,
6
+ open (cacheName: string): Promise<Cache>,
7
+ delete (cacheName: string): Promise<boolean>,
8
+ keys (): Promise<string[]>
9
+ }
10
+
11
+ declare const CacheStorage: {
12
+ prototype: CacheStorage
13
+ new(): CacheStorage
14
+ }
15
+
16
+ export interface Cache {
17
+ match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
18
+ matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
19
+ add (request: RequestInfo): Promise<undefined>,
20
+ addAll (requests: RequestInfo[]): Promise<undefined>,
21
+ put (request: RequestInfo, response: Response): Promise<undefined>,
22
+ delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
23
+ keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
24
+ }
25
+
26
+ export interface CacheQueryOptions {
27
+ ignoreSearch?: boolean,
28
+ ignoreMethod?: boolean,
29
+ ignoreVary?: boolean
30
+ }
31
+
32
+ export interface MultiCacheQueryOptions extends CacheQueryOptions {
33
+ cacheName?: string
34
+ }
35
+
36
+ export declare const caches: CacheStorage
@@ -0,0 +1,15 @@
1
+ import Client from './client'
2
+
3
+ export default ClientStats
4
+
5
+ declare class ClientStats {
6
+ constructor (pool: Client)
7
+ /** If socket has open connection. */
8
+ connected: boolean
9
+ /** Number of open socket connections in this client that do not have an active request. */
10
+ pending: number
11
+ /** Number of currently active requests of this client. */
12
+ running: number
13
+ /** Number of active, pending, or queued requests of this client. */
14
+ size: number
15
+ }
@@ -0,0 +1,108 @@
1
+ import { URL } from 'url'
2
+ import Dispatcher from './dispatcher'
3
+ import buildConnector from './connector'
4
+ import TClientStats from './client-stats'
5
+
6
+ type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>
7
+
8
+ /**
9
+ * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
10
+ */
11
+ export class Client extends Dispatcher {
12
+ constructor (url: string | URL, options?: Client.Options)
13
+ /** Property to get and set the pipelining factor. */
14
+ pipelining: number
15
+ /** `true` after `client.close()` has been called. */
16
+ closed: boolean
17
+ /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
18
+ destroyed: boolean
19
+ /** Aggregate stats for a Client. */
20
+ readonly stats: TClientStats
21
+
22
+ // Override dispatcher APIs.
23
+ override connect (
24
+ options: ClientConnectOptions
25
+ ): Promise<Dispatcher.ConnectData>
26
+ override connect (
27
+ options: ClientConnectOptions,
28
+ callback: (err: Error | null, data: Dispatcher.ConnectData) => void
29
+ ): void
30
+ }
31
+
32
+ export declare namespace Client {
33
+ export interface OptionsInterceptors {
34
+ Client: readonly Dispatcher.DispatchInterceptor[];
35
+ }
36
+ export interface Options {
37
+ /** TODO */
38
+ interceptors?: OptionsInterceptors;
39
+ /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
40
+ maxHeaderSize?: number;
41
+ /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
42
+ headersTimeout?: number;
43
+ /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
44
+ socketTimeout?: never;
45
+ /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
46
+ requestTimeout?: never;
47
+ /** TODO */
48
+ connectTimeout?: number;
49
+ /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
50
+ bodyTimeout?: number;
51
+ /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
52
+ idleTimeout?: never;
53
+ /** @deprecated unsupported keepAlive, use pipelining=0 instead */
54
+ keepAlive?: never;
55
+ /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
56
+ keepAliveTimeout?: number;
57
+ /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
58
+ maxKeepAliveTimeout?: never;
59
+ /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
60
+ keepAliveMaxTimeout?: number;
61
+ /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
62
+ keepAliveTimeoutThreshold?: number;
63
+ /** TODO */
64
+ socketPath?: string;
65
+ /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
66
+ pipelining?: number;
67
+ /** @deprecated use the connect option instead */
68
+ tls?: never;
69
+ /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
70
+ strictContentLength?: boolean;
71
+ /** TODO */
72
+ maxCachedSessions?: number;
73
+ /** TODO */
74
+ connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
75
+ /** TODO */
76
+ maxRequestsPerClient?: number;
77
+ /** TODO */
78
+ localAddress?: string;
79
+ /** Max response body size in bytes, -1 is disabled */
80
+ maxResponseSize?: number;
81
+ /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
82
+ autoSelectFamily?: boolean;
83
+ /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
84
+ autoSelectFamilyAttemptTimeout?: number;
85
+ /**
86
+ * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
87
+ * @default false
88
+ */
89
+ allowH2?: boolean;
90
+ /**
91
+ * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
92
+ * @default 100
93
+ */
94
+ maxConcurrentStreams?: number;
95
+ }
96
+ export interface SocketInfo {
97
+ localAddress?: string
98
+ localPort?: number
99
+ remoteAddress?: string
100
+ remotePort?: number
101
+ remoteFamily?: string
102
+ timeout?: number
103
+ bytesWritten?: number
104
+ bytesRead?: number
105
+ }
106
+ }
107
+
108
+ export default Client