adminforth 1.1.78 → 1.1.80

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 (206) hide show
  1. package/dist/modules/codeInjector.js +51 -23
  2. package/dist/plugins/AuditLog/index.js +13 -0
  3. package/dist/plugins/AuditLog/types.js +1 -0
  4. package/dist/plugins/S3UploadPlugin/custom/s3uploader.vue +4 -1
  5. package/dist/spa/index.html +1 -1
  6. package/dist/spa/package-lock.json +0 -111
  7. package/dist/spa/package.json +0 -1
  8. package/dist/spa/src/App.vue +133 -178
  9. package/dist/spa/src/components/MenuLink.vue +3 -3
  10. package/dist/spa/src/components/ResourceForm.vue +96 -96
  11. package/dist/spa/src/components/ResourceListTable.vue +84 -69
  12. package/dist/spa/src/components/ValueRenderer.vue +3 -2
  13. package/dist/spa/src/composables/useStores.ts +11 -24
  14. package/dist/spa/src/main.ts +1 -1
  15. package/dist/spa/src/router/index.ts +1 -0
  16. package/dist/spa/src/utils.ts +1 -1
  17. package/dist/spa/src/views/CreateView.vue +9 -1
  18. package/dist/spa/src/views/EditView.vue +9 -1
  19. package/dist/spa/src/views/ListView.vue +3 -12
  20. package/dist/spa/src/views/LoginView.vue +1 -6
  21. package/dist/spa/src/views/ResourceParent.vue +2 -1
  22. package/dist/spa/src/views/ShowView.vue +14 -6
  23. package/dist/spa/tailwind.config.js +1 -3
  24. package/modules/codeInjector.ts +56 -26
  25. package/package.json +1 -1
  26. package/plugins/S3UploadPlugin/custom/s3uploader.vue +4 -1
  27. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/.package-lock.json +0 -61
  28. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/LICENSE +0 -21
  29. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/README.md +0 -15
  30. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/package.json +0 -217
  31. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/LICENSE +0 -21
  32. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/README.md +0 -15
  33. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/package.json +0 -21
  34. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/LICENSE +0 -201
  35. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/README.md +0 -68
  36. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/index.js +0 -51
  37. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/interfaces.js +0 -2
  38. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/package.json +0 -58
  39. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/.travis.yml +0 -6
  40. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/LICENSE +0 -22
  41. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/Readme.md +0 -135
  42. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/examples/TOTP-verify.js +0 -33
  43. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/examples/TOTP.js +0 -15
  44. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/index.js +0 -221
  45. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/package.json +0 -22
  46. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/test/mocha.opts +0 -1
  47. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/notp/test/notp.js +0 -217
  48. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/LICENSE.txt +0 -19
  49. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/Makefile +0 -24
  50. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/README.md +0 -15
  51. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/index.js +0 -23
  52. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/lib/thirty-two/index.js +0 -26
  53. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/lib/thirty-two/thirty-two.js +0 -128
  54. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/package.json +0 -15
  55. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/spec/thirty-two_spec.js +0 -63
  56. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/CopyrightNotice.txt +0 -15
  57. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/LICENSE.txt +0 -12
  58. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/README.md +0 -164
  59. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/SECURITY.md +0 -41
  60. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/index.js +0 -68
  61. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/package.json +0 -3
  62. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/package.json +0 -47
  63. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.html +0 -1
  64. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.js +0 -374
  65. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.mjs +0 -373
  66. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.html +0 -1
  67. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.js +0 -424
  68. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/README.md +0 -6
  69. package/dist/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/package.json +0 -55
  70. package/dist/spa/src/components/SkeleteLoader.vue +0 -23
  71. package/plugins/TwoFactorsAuthPlugin/node_modules/.package-lock.json +0 -61
  72. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/LICENSE +0 -21
  73. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/README.md +0 -15
  74. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/assert/strict.d.ts +0 -8
  75. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/assert.d.ts +0 -1040
  76. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/async_hooks.d.ts +0 -541
  77. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/buffer.d.ts +0 -2363
  78. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/child_process.d.ts +0 -1544
  79. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/cluster.d.ts +0 -578
  80. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/console.d.ts +0 -452
  81. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/constants.d.ts +0 -19
  82. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/crypto.d.ts +0 -4523
  83. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/dgram.d.ts +0 -596
  84. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  85. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/dns/promises.d.ts +0 -476
  86. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/dns.d.ts +0 -864
  87. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/dom-events.d.ts +0 -124
  88. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/domain.d.ts +0 -170
  89. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/events.d.ts +0 -931
  90. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/fs/promises.d.ts +0 -1245
  91. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/fs.d.ts +0 -4317
  92. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/globals.d.ts +0 -412
  93. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/globals.global.d.ts +0 -1
  94. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/http.d.ts +0 -1908
  95. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/http2.d.ts +0 -2418
  96. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/https.d.ts +0 -550
  97. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/index.d.ts +0 -89
  98. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/inspector.d.ts +0 -2746
  99. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/module.d.ts +0 -315
  100. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/net.d.ts +0 -999
  101. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/os.d.ts +0 -495
  102. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/package.json +0 -217
  103. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/path.d.ts +0 -191
  104. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/perf_hooks.d.ts +0 -905
  105. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/process.d.ts +0 -1754
  106. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/punycode.d.ts +0 -117
  107. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/querystring.d.ts +0 -153
  108. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/readline/promises.d.ts +0 -150
  109. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/readline.d.ts +0 -540
  110. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/repl.d.ts +0 -430
  111. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/sea.d.ts +0 -153
  112. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/stream/consumers.d.ts +0 -12
  113. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/stream/promises.d.ts +0 -83
  114. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/stream/web.d.ts +0 -367
  115. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/stream.d.ts +0 -1707
  116. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/string_decoder.d.ts +0 -67
  117. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/test.d.ts +0 -1718
  118. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/timers/promises.d.ts +0 -97
  119. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/timers.d.ts +0 -240
  120. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/tls.d.ts +0 -1217
  121. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/trace_events.d.ts +0 -197
  122. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/tty.d.ts +0 -208
  123. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/url.d.ts +0 -952
  124. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/util.d.ts +0 -2292
  125. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/v8.d.ts +0 -808
  126. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/vm.d.ts +0 -924
  127. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/wasi.d.ts +0 -181
  128. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/worker_threads.d.ts +0 -694
  129. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/node/zlib.d.ts +0 -530
  130. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/LICENSE +0 -21
  131. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/README.md +0 -15
  132. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/index.d.ts +0 -127
  133. package/plugins/TwoFactorsAuthPlugin/node_modules/@types/notp/package.json +0 -21
  134. package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/LICENSE +0 -201
  135. package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/README.md +0 -68
  136. package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/index.d.ts +0 -11
  137. package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/index.js +0 -51
  138. package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/interfaces.d.ts +0 -4
  139. package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/dist/interfaces.js +0 -2
  140. package/plugins/TwoFactorsAuthPlugin/node_modules/node-2fa/package.json +0 -58
  141. package/plugins/TwoFactorsAuthPlugin/node_modules/notp/.travis.yml +0 -6
  142. package/plugins/TwoFactorsAuthPlugin/node_modules/notp/LICENSE +0 -22
  143. package/plugins/TwoFactorsAuthPlugin/node_modules/notp/Readme.md +0 -135
  144. package/plugins/TwoFactorsAuthPlugin/node_modules/notp/examples/TOTP-verify.js +0 -33
  145. package/plugins/TwoFactorsAuthPlugin/node_modules/notp/examples/TOTP.js +0 -15
  146. package/plugins/TwoFactorsAuthPlugin/node_modules/notp/index.js +0 -221
  147. package/plugins/TwoFactorsAuthPlugin/node_modules/notp/package.json +0 -22
  148. package/plugins/TwoFactorsAuthPlugin/node_modules/notp/test/mocha.opts +0 -1
  149. package/plugins/TwoFactorsAuthPlugin/node_modules/notp/test/notp.js +0 -217
  150. package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/LICENSE.txt +0 -19
  151. package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/Makefile +0 -24
  152. package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/README.md +0 -15
  153. package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/index.js +0 -23
  154. package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/lib/thirty-two/index.js +0 -26
  155. package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/lib/thirty-two/thirty-two.js +0 -128
  156. package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/package.json +0 -15
  157. package/plugins/TwoFactorsAuthPlugin/node_modules/thirty-two/spec/thirty-two_spec.js +0 -63
  158. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/CopyrightNotice.txt +0 -15
  159. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/LICENSE.txt +0 -12
  160. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/README.md +0 -164
  161. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/SECURITY.md +0 -41
  162. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/index.d.ts +0 -37
  163. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/index.js +0 -68
  164. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/modules/package.json +0 -3
  165. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/package.json +0 -47
  166. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.d.ts +0 -453
  167. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.html +0 -1
  168. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.js +0 -374
  169. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.es6.mjs +0 -373
  170. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.html +0 -1
  171. package/plugins/TwoFactorsAuthPlugin/node_modules/tslib/tslib.js +0 -424
  172. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/README.md +0 -6
  173. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/agent.d.ts +0 -31
  174. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/api.d.ts +0 -43
  175. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/balanced-pool.d.ts +0 -18
  176. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/cache.d.ts +0 -36
  177. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/client.d.ts +0 -97
  178. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/connector.d.ts +0 -34
  179. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/content-type.d.ts +0 -21
  180. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/cookies.d.ts +0 -28
  181. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/diagnostics-channel.d.ts +0 -67
  182. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/dispatcher.d.ts +0 -241
  183. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/errors.d.ts +0 -128
  184. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/fetch.d.ts +0 -209
  185. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/file.d.ts +0 -39
  186. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/filereader.d.ts +0 -54
  187. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/formdata.d.ts +0 -108
  188. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  189. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/global-origin.d.ts +0 -7
  190. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/handlers.d.ts +0 -9
  191. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/header.d.ts +0 -4
  192. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/index.d.ts +0 -63
  193. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/interceptors.d.ts +0 -5
  194. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-agent.d.ts +0 -50
  195. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-client.d.ts +0 -25
  196. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-errors.d.ts +0 -12
  197. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  198. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/mock-pool.d.ts +0 -25
  199. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/package.json +0 -55
  200. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/patch.d.ts +0 -71
  201. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/pool-stats.d.ts +0 -19
  202. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/pool.d.ts +0 -28
  203. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/proxy-agent.d.ts +0 -30
  204. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/readable.d.ts +0 -61
  205. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/webidl.d.ts +0 -220
  206. package/plugins/TwoFactorsAuthPlugin/node_modules/undici-types/websocket.d.ts +0 -131
@@ -1,424 +0,0 @@
1
- /******************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
- /* global global, define, Symbol, Reflect, Promise, SuppressedError */
16
- var __extends;
17
- var __assign;
18
- var __rest;
19
- var __decorate;
20
- var __param;
21
- var __esDecorate;
22
- var __runInitializers;
23
- var __propKey;
24
- var __setFunctionName;
25
- var __metadata;
26
- var __awaiter;
27
- var __generator;
28
- var __exportStar;
29
- var __values;
30
- var __read;
31
- var __spread;
32
- var __spreadArrays;
33
- var __spreadArray;
34
- var __await;
35
- var __asyncGenerator;
36
- var __asyncDelegator;
37
- var __asyncValues;
38
- var __makeTemplateObject;
39
- var __importStar;
40
- var __importDefault;
41
- var __classPrivateFieldGet;
42
- var __classPrivateFieldSet;
43
- var __classPrivateFieldIn;
44
- var __createBinding;
45
- var __addDisposableResource;
46
- var __disposeResources;
47
- (function (factory) {
48
- var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
49
- if (typeof define === "function" && define.amd) {
50
- define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
51
- }
52
- else if (typeof module === "object" && typeof module.exports === "object") {
53
- factory(createExporter(root, createExporter(module.exports)));
54
- }
55
- else {
56
- factory(createExporter(root));
57
- }
58
- function createExporter(exports, previous) {
59
- if (exports !== root) {
60
- if (typeof Object.create === "function") {
61
- Object.defineProperty(exports, "__esModule", { value: true });
62
- }
63
- else {
64
- exports.__esModule = true;
65
- }
66
- }
67
- return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
68
- }
69
- })
70
- (function (exporter) {
71
- var extendStatics = Object.setPrototypeOf ||
72
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
73
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
74
-
75
- __extends = function (d, b) {
76
- if (typeof b !== "function" && b !== null)
77
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
78
- extendStatics(d, b);
79
- function __() { this.constructor = d; }
80
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
81
- };
82
-
83
- __assign = Object.assign || function (t) {
84
- for (var s, i = 1, n = arguments.length; i < n; i++) {
85
- s = arguments[i];
86
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
87
- }
88
- return t;
89
- };
90
-
91
- __rest = function (s, e) {
92
- var t = {};
93
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
94
- t[p] = s[p];
95
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
96
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
97
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
98
- t[p[i]] = s[p[i]];
99
- }
100
- return t;
101
- };
102
-
103
- __decorate = function (decorators, target, key, desc) {
104
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
105
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
106
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
107
- return c > 3 && r && Object.defineProperty(target, key, r), r;
108
- };
109
-
110
- __param = function (paramIndex, decorator) {
111
- return function (target, key) { decorator(target, key, paramIndex); }
112
- };
113
-
114
- __esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
115
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
116
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
117
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
118
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
119
- var _, done = false;
120
- for (var i = decorators.length - 1; i >= 0; i--) {
121
- var context = {};
122
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
123
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
124
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
125
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
126
- if (kind === "accessor") {
127
- if (result === void 0) continue;
128
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
129
- if (_ = accept(result.get)) descriptor.get = _;
130
- if (_ = accept(result.set)) descriptor.set = _;
131
- if (_ = accept(result.init)) initializers.unshift(_);
132
- }
133
- else if (_ = accept(result)) {
134
- if (kind === "field") initializers.unshift(_);
135
- else descriptor[key] = _;
136
- }
137
- }
138
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
139
- done = true;
140
- };
141
-
142
- __runInitializers = function (thisArg, initializers, value) {
143
- var useValue = arguments.length > 2;
144
- for (var i = 0; i < initializers.length; i++) {
145
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
146
- }
147
- return useValue ? value : void 0;
148
- };
149
-
150
- __propKey = function (x) {
151
- return typeof x === "symbol" ? x : "".concat(x);
152
- };
153
-
154
- __setFunctionName = function (f, name, prefix) {
155
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
156
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
157
- };
158
-
159
- __metadata = function (metadataKey, metadataValue) {
160
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
161
- };
162
-
163
- __awaiter = function (thisArg, _arguments, P, generator) {
164
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
165
- return new (P || (P = Promise))(function (resolve, reject) {
166
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
167
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
168
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
169
- step((generator = generator.apply(thisArg, _arguments || [])).next());
170
- });
171
- };
172
-
173
- __generator = function (thisArg, body) {
174
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
175
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
176
- function verb(n) { return function (v) { return step([n, v]); }; }
177
- function step(op) {
178
- if (f) throw new TypeError("Generator is already executing.");
179
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
180
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
181
- if (y = 0, t) op = [op[0] & 2, t.value];
182
- switch (op[0]) {
183
- case 0: case 1: t = op; break;
184
- case 4: _.label++; return { value: op[1], done: false };
185
- case 5: _.label++; y = op[1]; op = [0]; continue;
186
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
187
- default:
188
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
189
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
190
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
191
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
192
- if (t[2]) _.ops.pop();
193
- _.trys.pop(); continue;
194
- }
195
- op = body.call(thisArg, _);
196
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
197
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
198
- }
199
- };
200
-
201
- __exportStar = function(m, o) {
202
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
203
- };
204
-
205
- __createBinding = Object.create ? (function(o, m, k, k2) {
206
- if (k2 === undefined) k2 = k;
207
- var desc = Object.getOwnPropertyDescriptor(m, k);
208
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
209
- desc = { enumerable: true, get: function() { return m[k]; } };
210
- }
211
- Object.defineProperty(o, k2, desc);
212
- }) : (function(o, m, k, k2) {
213
- if (k2 === undefined) k2 = k;
214
- o[k2] = m[k];
215
- });
216
-
217
- __values = function (o) {
218
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
219
- if (m) return m.call(o);
220
- if (o && typeof o.length === "number") return {
221
- next: function () {
222
- if (o && i >= o.length) o = void 0;
223
- return { value: o && o[i++], done: !o };
224
- }
225
- };
226
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
227
- };
228
-
229
- __read = function (o, n) {
230
- var m = typeof Symbol === "function" && o[Symbol.iterator];
231
- if (!m) return o;
232
- var i = m.call(o), r, ar = [], e;
233
- try {
234
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
235
- }
236
- catch (error) { e = { error: error }; }
237
- finally {
238
- try {
239
- if (r && !r.done && (m = i["return"])) m.call(i);
240
- }
241
- finally { if (e) throw e.error; }
242
- }
243
- return ar;
244
- };
245
-
246
- /** @deprecated */
247
- __spread = function () {
248
- for (var ar = [], i = 0; i < arguments.length; i++)
249
- ar = ar.concat(__read(arguments[i]));
250
- return ar;
251
- };
252
-
253
- /** @deprecated */
254
- __spreadArrays = function () {
255
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
256
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
257
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
258
- r[k] = a[j];
259
- return r;
260
- };
261
-
262
- __spreadArray = function (to, from, pack) {
263
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
264
- if (ar || !(i in from)) {
265
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
266
- ar[i] = from[i];
267
- }
268
- }
269
- return to.concat(ar || Array.prototype.slice.call(from));
270
- };
271
-
272
- __await = function (v) {
273
- return this instanceof __await ? (this.v = v, this) : new __await(v);
274
- };
275
-
276
- __asyncGenerator = function (thisArg, _arguments, generator) {
277
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
278
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
279
- return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
280
- function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
281
- function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
282
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
283
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
284
- function fulfill(value) { resume("next", value); }
285
- function reject(value) { resume("throw", value); }
286
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
287
- };
288
-
289
- __asyncDelegator = function (o) {
290
- var i, p;
291
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
292
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
293
- };
294
-
295
- __asyncValues = function (o) {
296
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
297
- var m = o[Symbol.asyncIterator], i;
298
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
299
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
300
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
301
- };
302
-
303
- __makeTemplateObject = function (cooked, raw) {
304
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
305
- return cooked;
306
- };
307
-
308
- var __setModuleDefault = Object.create ? (function(o, v) {
309
- Object.defineProperty(o, "default", { enumerable: true, value: v });
310
- }) : function(o, v) {
311
- o["default"] = v;
312
- };
313
-
314
- __importStar = function (mod) {
315
- if (mod && mod.__esModule) return mod;
316
- var result = {};
317
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
318
- __setModuleDefault(result, mod);
319
- return result;
320
- };
321
-
322
- __importDefault = function (mod) {
323
- return (mod && mod.__esModule) ? mod : { "default": mod };
324
- };
325
-
326
- __classPrivateFieldGet = function (receiver, state, kind, f) {
327
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
328
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
329
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
330
- };
331
-
332
- __classPrivateFieldSet = function (receiver, state, value, kind, f) {
333
- if (kind === "m") throw new TypeError("Private method is not writable");
334
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
335
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
336
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
337
- };
338
-
339
- __classPrivateFieldIn = function (state, receiver) {
340
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
341
- return typeof state === "function" ? receiver === state : state.has(receiver);
342
- };
343
-
344
- __addDisposableResource = function (env, value, async) {
345
- if (value !== null && value !== void 0) {
346
- if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
347
- var dispose, inner;
348
- if (async) {
349
- if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
350
- dispose = value[Symbol.asyncDispose];
351
- }
352
- if (dispose === void 0) {
353
- if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
354
- dispose = value[Symbol.dispose];
355
- if (async) inner = dispose;
356
- }
357
- if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
358
- if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
359
- env.stack.push({ value: value, dispose: dispose, async: async });
360
- }
361
- else if (async) {
362
- env.stack.push({ async: true });
363
- }
364
- return value;
365
- };
366
-
367
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
368
- var e = new Error(message);
369
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
370
- };
371
-
372
- __disposeResources = function (env) {
373
- function fail(e) {
374
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
375
- env.hasError = true;
376
- }
377
- function next() {
378
- while (env.stack.length) {
379
- var rec = env.stack.pop();
380
- try {
381
- var result = rec.dispose && rec.dispose.call(rec.value);
382
- if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
383
- }
384
- catch (e) {
385
- fail(e);
386
- }
387
- }
388
- if (env.hasError) throw env.error;
389
- }
390
- return next();
391
- };
392
-
393
- exporter("__extends", __extends);
394
- exporter("__assign", __assign);
395
- exporter("__rest", __rest);
396
- exporter("__decorate", __decorate);
397
- exporter("__param", __param);
398
- exporter("__esDecorate", __esDecorate);
399
- exporter("__runInitializers", __runInitializers);
400
- exporter("__propKey", __propKey);
401
- exporter("__setFunctionName", __setFunctionName);
402
- exporter("__metadata", __metadata);
403
- exporter("__awaiter", __awaiter);
404
- exporter("__generator", __generator);
405
- exporter("__exportStar", __exportStar);
406
- exporter("__createBinding", __createBinding);
407
- exporter("__values", __values);
408
- exporter("__read", __read);
409
- exporter("__spread", __spread);
410
- exporter("__spreadArrays", __spreadArrays);
411
- exporter("__spreadArray", __spreadArray);
412
- exporter("__await", __await);
413
- exporter("__asyncGenerator", __asyncGenerator);
414
- exporter("__asyncDelegator", __asyncDelegator);
415
- exporter("__asyncValues", __asyncValues);
416
- exporter("__makeTemplateObject", __makeTemplateObject);
417
- exporter("__importStar", __importStar);
418
- exporter("__importDefault", __importDefault);
419
- exporter("__classPrivateFieldGet", __classPrivateFieldGet);
420
- exporter("__classPrivateFieldSet", __classPrivateFieldSet);
421
- exporter("__classPrivateFieldIn", __classPrivateFieldIn);
422
- exporter("__addDisposableResource", __addDisposableResource);
423
- exporter("__disposeResources", __disposeResources);
424
- });
@@ -1,6 +0,0 @@
1
- # undici-types
2
-
3
- This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version.
4
-
5
- - [GitHub nodejs/undici](https://github.com/nodejs/undici)
6
- - [Undici Documentation](https://undici.nodejs.org/#/)
@@ -1,31 +0,0 @@
1
- import { URL } from 'url'
2
- import Pool from './pool'
3
- import Dispatcher from "./dispatcher";
4
-
5
- export default Agent
6
-
7
- declare class Agent extends Dispatcher{
8
- constructor(opts?: Agent.Options)
9
- /** `true` after `dispatcher.close()` has been called. */
10
- closed: boolean;
11
- /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
12
- destroyed: boolean;
13
- /** Dispatches a request. */
14
- dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
15
- }
16
-
17
- declare namespace Agent {
18
- export interface Options extends Pool.Options {
19
- /** Default: `(origin, opts) => new Pool(origin, opts)`. */
20
- factory?(origin: string | URL, opts: Object): Dispatcher;
21
- /** Integer. Default: `0` */
22
- maxRedirections?: number;
23
-
24
- interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"]
25
- }
26
-
27
- export interface DispatchOptions extends Dispatcher.DispatchOptions {
28
- /** Integer. */
29
- maxRedirections?: number;
30
- }
31
- }
@@ -1,43 +0,0 @@
1
- import { URL, UrlObject } from 'url'
2
- import { Duplex } from 'stream'
3
- import Dispatcher from './dispatcher'
4
-
5
- export {
6
- request,
7
- stream,
8
- pipeline,
9
- connect,
10
- upgrade,
11
- }
12
-
13
- /** Performs an HTTP request. */
14
- declare function request(
15
- url: string | URL | UrlObject,
16
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
17
- ): Promise<Dispatcher.ResponseData>;
18
-
19
- /** A faster version of `request`. */
20
- declare function stream(
21
- url: string | URL | UrlObject,
22
- options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path'>,
23
- factory: Dispatcher.StreamFactory
24
- ): Promise<Dispatcher.StreamData>;
25
-
26
- /** For easy use with `stream.pipeline`. */
27
- declare function pipeline(
28
- url: string | URL | UrlObject,
29
- options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions, 'origin' | 'path'>,
30
- handler: Dispatcher.PipelineHandler
31
- ): Duplex;
32
-
33
- /** Starts two-way communications with the requested resource. */
34
- declare function connect(
35
- url: string | URL | UrlObject,
36
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
37
- ): Promise<Dispatcher.ConnectData>;
38
-
39
- /** Upgrade to a different protocol. */
40
- declare function upgrade(
41
- url: string | URL | UrlObject,
42
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
43
- ): Promise<Dispatcher.UpgradeData>;
@@ -1,18 +0,0 @@
1
- import Pool from './pool'
2
- import Dispatcher from './dispatcher'
3
- import { URL } from 'url'
4
-
5
- export default BalancedPool
6
-
7
- declare class BalancedPool extends Dispatcher {
8
- constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
9
-
10
- addUpstream(upstream: string | URL): BalancedPool;
11
- removeUpstream(upstream: string | URL): BalancedPool;
12
- upstreams: Array<string>;
13
-
14
- /** `true` after `pool.close()` has been called. */
15
- closed: boolean;
16
- /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
17
- destroyed: boolean;
18
- }
@@ -1,36 +0,0 @@
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
@@ -1,97 +0,0 @@
1
- import { URL } from 'url'
2
- import { TlsOptions } from 'tls'
3
- import Dispatcher from './dispatcher'
4
- import buildConnector from "./connector";
5
-
6
- /**
7
- * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
8
- */
9
- export class Client extends Dispatcher {
10
- constructor(url: string | URL, options?: Client.Options);
11
- /** Property to get and set the pipelining factor. */
12
- pipelining: number;
13
- /** `true` after `client.close()` has been called. */
14
- closed: boolean;
15
- /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
16
- destroyed: boolean;
17
- }
18
-
19
- export declare namespace Client {
20
- export interface OptionsInterceptors {
21
- Client: readonly Dispatcher.DispatchInterceptor[];
22
- }
23
- export interface Options {
24
- /** TODO */
25
- interceptors?: OptionsInterceptors;
26
- /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
27
- maxHeaderSize?: number;
28
- /** 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). */
29
- headersTimeout?: number;
30
- /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
31
- socketTimeout?: never;
32
- /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
33
- requestTimeout?: never;
34
- /** TODO */
35
- connectTimeout?: number;
36
- /** 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). */
37
- bodyTimeout?: number;
38
- /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
39
- idleTimeout?: never;
40
- /** @deprecated unsupported keepAlive, use pipelining=0 instead */
41
- keepAlive?: never;
42
- /** 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). */
43
- keepAliveTimeout?: number;
44
- /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
45
- maxKeepAliveTimeout?: never;
46
- /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
47
- keepAliveMaxTimeout?: number;
48
- /** 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). */
49
- keepAliveTimeoutThreshold?: number;
50
- /** TODO */
51
- socketPath?: string;
52
- /** 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`. */
53
- pipelining?: number;
54
- /** @deprecated use the connect option instead */
55
- tls?: never;
56
- /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
57
- strictContentLength?: boolean;
58
- /** TODO */
59
- maxCachedSessions?: number;
60
- /** TODO */
61
- maxRedirections?: number;
62
- /** TODO */
63
- connect?: buildConnector.BuildOptions | buildConnector.connector;
64
- /** TODO */
65
- maxRequestsPerClient?: number;
66
- /** TODO */
67
- localAddress?: string;
68
- /** Max response body size in bytes, -1 is disabled */
69
- maxResponseSize?: number;
70
- /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
71
- autoSelectFamily?: boolean;
72
- /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
73
- autoSelectFamilyAttemptTimeout?: number;
74
- /**
75
- * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
76
- * @default false
77
- */
78
- allowH2?: boolean;
79
- /**
80
- * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overriden by a SETTINGS remote frame.
81
- * @default 100
82
- */
83
- maxConcurrentStreams?: number
84
- }
85
- export interface SocketInfo {
86
- localAddress?: string
87
- localPort?: number
88
- remoteAddress?: string
89
- remotePort?: number
90
- remoteFamily?: string
91
- timeout?: number
92
- bytesWritten?: number
93
- bytesRead?: number
94
- }
95
- }
96
-
97
- export default Client;