@machhub-dev/node-red-nodes 1.0.5

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 (1283) hide show
  1. package/LICENSE +373 -0
  2. package/dist/lib/config/machhub-env-loader.js +93 -0
  3. package/dist/lib/enums/data.enums.js +12 -0
  4. package/dist/lib/errors/errors.js +15 -0
  5. package/dist/lib/models/collections.model.js +2 -0
  6. package/dist/lib/models/machine.models.js +2 -0
  7. package/dist/lib/models/product.models.js +2 -0
  8. package/dist/lib/models/recordId.models.js +11 -0
  9. package/dist/lib/services/http.api.services.js +152 -0
  10. package/dist/lib/services/http.service.js +188 -0
  11. package/dist/lib/services/mqtt.service.js +234 -0
  12. package/dist/nodes/bulk-tag-write.html +91 -0
  13. package/dist/nodes/bulk-tag-write.js +118 -0
  14. package/dist/nodes/collections.html +508 -0
  15. package/dist/nodes/collections.js +241 -0
  16. package/dist/nodes/dbquery.html +131 -0
  17. package/dist/nodes/dbquery.js +83 -0
  18. package/dist/nodes/machhub-config.html +39 -0
  19. package/dist/nodes/machhub-config.js +15 -0
  20. package/dist/nodes/tag-read.html +194 -0
  21. package/dist/nodes/tag-read.js +133 -0
  22. package/dist/nodes/tag-write.html +162 -0
  23. package/dist/nodes/tag-write.js +110 -0
  24. package/node_modules/@babel/runtime/LICENSE +22 -0
  25. package/node_modules/@babel/runtime/README.md +19 -0
  26. package/node_modules/@babel/runtime/helpers/AwaitValue.js +4 -0
  27. package/node_modules/@babel/runtime/helpers/OverloadYield.js +4 -0
  28. package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +9 -0
  29. package/node_modules/@babel/runtime/helpers/applyDecs.js +236 -0
  30. package/node_modules/@babel/runtime/helpers/applyDecs2203.js +184 -0
  31. package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +191 -0
  32. package/node_modules/@babel/runtime/helpers/applyDecs2301.js +222 -0
  33. package/node_modules/@babel/runtime/helpers/applyDecs2305.js +133 -0
  34. package/node_modules/@babel/runtime/helpers/applyDecs2311.js +124 -0
  35. package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +6 -0
  36. package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +4 -0
  37. package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +5 -0
  38. package/node_modules/@babel/runtime/helpers/assertClassBrand.js +5 -0
  39. package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +5 -0
  40. package/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +24 -0
  41. package/node_modules/@babel/runtime/helpers/asyncIterator.js +45 -0
  42. package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +26 -0
  43. package/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +5 -0
  44. package/node_modules/@babel/runtime/helpers/callSuper.js +7 -0
  45. package/node_modules/@babel/runtime/helpers/checkInRHS.js +6 -0
  46. package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +4 -0
  47. package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +10 -0
  48. package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +4 -0
  49. package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +7 -0
  50. package/node_modules/@babel/runtime/helpers/classCallCheck.js +4 -0
  51. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +5 -0
  52. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +4 -0
  53. package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +5 -0
  54. package/node_modules/@babel/runtime/helpers/classNameTDZError.js +4 -0
  55. package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +7 -0
  56. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +7 -0
  57. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +5 -0
  58. package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +5 -0
  59. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +5 -0
  60. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +5 -0
  61. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +7 -0
  62. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +5 -0
  63. package/node_modules/@babel/runtime/helpers/classPrivateGetter.js +5 -0
  64. package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +5 -0
  65. package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +5 -0
  66. package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +4 -0
  67. package/node_modules/@babel/runtime/helpers/classPrivateSetter.js +5 -0
  68. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +7 -0
  69. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +7 -0
  70. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +7 -0
  71. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +5 -0
  72. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +4 -0
  73. package/node_modules/@babel/runtime/helpers/construct.js +10 -0
  74. package/node_modules/@babel/runtime/helpers/createClass.js +13 -0
  75. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +50 -0
  76. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +19 -0
  77. package/node_modules/@babel/runtime/helpers/createSuper.js +16 -0
  78. package/node_modules/@babel/runtime/helpers/decorate.js +250 -0
  79. package/node_modules/@babel/runtime/helpers/defaults.js +9 -0
  80. package/node_modules/@babel/runtime/helpers/defineAccessor.js +8 -0
  81. package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +12 -0
  82. package/node_modules/@babel/runtime/helpers/defineProperty.js +10 -0
  83. package/node_modules/@babel/runtime/helpers/dispose.js +28 -0
  84. package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +4 -0
  85. package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +4 -0
  86. package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +9 -0
  87. package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +236 -0
  88. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +184 -0
  89. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +191 -0
  90. package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +222 -0
  91. package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +133 -0
  92. package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +124 -0
  93. package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +6 -0
  94. package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +4 -0
  95. package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +5 -0
  96. package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +5 -0
  97. package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +5 -0
  98. package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +24 -0
  99. package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +45 -0
  100. package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +26 -0
  101. package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +5 -0
  102. package/node_modules/@babel/runtime/helpers/esm/callSuper.js +7 -0
  103. package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +6 -0
  104. package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +4 -0
  105. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +10 -0
  106. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +4 -0
  107. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +7 -0
  108. package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +4 -0
  109. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
  110. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +4 -0
  111. package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +5 -0
  112. package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +4 -0
  113. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +7 -0
  114. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +7 -0
  115. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +5 -0
  116. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +5 -0
  117. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +5 -0
  118. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +5 -0
  119. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +7 -0
  120. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +5 -0
  121. package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +5 -0
  122. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +5 -0
  123. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +5 -0
  124. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +4 -0
  125. package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +5 -0
  126. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +7 -0
  127. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +7 -0
  128. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +7 -0
  129. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +5 -0
  130. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +4 -0
  131. package/node_modules/@babel/runtime/helpers/esm/construct.js +10 -0
  132. package/node_modules/@babel/runtime/helpers/esm/createClass.js +13 -0
  133. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +50 -0
  134. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
  135. package/node_modules/@babel/runtime/helpers/esm/createSuper.js +16 -0
  136. package/node_modules/@babel/runtime/helpers/esm/decorate.js +250 -0
  137. package/node_modules/@babel/runtime/helpers/esm/defaults.js +9 -0
  138. package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +8 -0
  139. package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +12 -0
  140. package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +10 -0
  141. package/node_modules/@babel/runtime/helpers/esm/dispose.js +28 -0
  142. package/node_modules/@babel/runtime/helpers/esm/extends.js +10 -0
  143. package/node_modules/@babel/runtime/helpers/esm/get.js +11 -0
  144. package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +6 -0
  145. package/node_modules/@babel/runtime/helpers/esm/identity.js +4 -0
  146. package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +27 -0
  147. package/node_modules/@babel/runtime/helpers/esm/inherits.js +14 -0
  148. package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +5 -0
  149. package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +9 -0
  150. package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +4 -0
  151. package/node_modules/@babel/runtime/helpers/esm/instanceof.js +4 -0
  152. package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +6 -0
  153. package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +27 -0
  154. package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +8 -0
  155. package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +9 -0
  156. package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +4 -0
  157. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +28 -0
  158. package/node_modules/@babel/runtime/helpers/esm/jsx.js +22 -0
  159. package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +9 -0
  160. package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +4 -0
  161. package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +4 -0
  162. package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +4 -0
  163. package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +4 -0
  164. package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +4 -0
  165. package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +14 -0
  166. package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +23 -0
  167. package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +13 -0
  168. package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
  169. package/node_modules/@babel/runtime/helpers/esm/package.json +3 -0
  170. package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +8 -0
  171. package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +4 -0
  172. package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +304 -0
  173. package/node_modules/@babel/runtime/helpers/esm/set.js +22 -0
  174. package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +12 -0
  175. package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +6 -0
  176. package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +7 -0
  177. package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +8 -0
  178. package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +6 -0
  179. package/node_modules/@babel/runtime/helpers/esm/superPropGet.js +9 -0
  180. package/node_modules/@babel/runtime/helpers/esm/superPropSet.js +6 -0
  181. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +8 -0
  182. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +4 -0
  183. package/node_modules/@babel/runtime/helpers/esm/tdz.js +4 -0
  184. package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +6 -0
  185. package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +2 -0
  186. package/node_modules/@babel/runtime/helpers/esm/toArray.js +8 -0
  187. package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +8 -0
  188. package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +12 -0
  189. package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +7 -0
  190. package/node_modules/@babel/runtime/helpers/esm/toSetter.js +10 -0
  191. package/node_modules/@babel/runtime/helpers/esm/typeof.js +10 -0
  192. package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +9 -0
  193. package/node_modules/@babel/runtime/helpers/esm/using.js +12 -0
  194. package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +59 -0
  195. package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +69 -0
  196. package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +27 -0
  197. package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +51 -0
  198. package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +4 -0
  199. package/node_modules/@babel/runtime/helpers/extends.js +10 -0
  200. package/node_modules/@babel/runtime/helpers/get.js +11 -0
  201. package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +6 -0
  202. package/node_modules/@babel/runtime/helpers/identity.js +4 -0
  203. package/node_modules/@babel/runtime/helpers/importDeferProxy.js +27 -0
  204. package/node_modules/@babel/runtime/helpers/inherits.js +14 -0
  205. package/node_modules/@babel/runtime/helpers/inheritsLoose.js +5 -0
  206. package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +9 -0
  207. package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +4 -0
  208. package/node_modules/@babel/runtime/helpers/instanceof.js +4 -0
  209. package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +6 -0
  210. package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +27 -0
  211. package/node_modules/@babel/runtime/helpers/isNativeFunction.js +8 -0
  212. package/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +9 -0
  213. package/node_modules/@babel/runtime/helpers/iterableToArray.js +4 -0
  214. package/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +28 -0
  215. package/node_modules/@babel/runtime/helpers/jsx.js +22 -0
  216. package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +9 -0
  217. package/node_modules/@babel/runtime/helpers/newArrowCheck.js +4 -0
  218. package/node_modules/@babel/runtime/helpers/nonIterableRest.js +4 -0
  219. package/node_modules/@babel/runtime/helpers/nonIterableSpread.js +4 -0
  220. package/node_modules/@babel/runtime/helpers/nullishReceiverError.js +4 -0
  221. package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +4 -0
  222. package/node_modules/@babel/runtime/helpers/objectSpread.js +14 -0
  223. package/node_modules/@babel/runtime/helpers/objectSpread2.js +23 -0
  224. package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +13 -0
  225. package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +10 -0
  226. package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +8 -0
  227. package/node_modules/@babel/runtime/helpers/readOnlyError.js +4 -0
  228. package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +304 -0
  229. package/node_modules/@babel/runtime/helpers/set.js +22 -0
  230. package/node_modules/@babel/runtime/helpers/setFunctionName.js +12 -0
  231. package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +6 -0
  232. package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +7 -0
  233. package/node_modules/@babel/runtime/helpers/slicedToArray.js +8 -0
  234. package/node_modules/@babel/runtime/helpers/superPropBase.js +6 -0
  235. package/node_modules/@babel/runtime/helpers/superPropGet.js +9 -0
  236. package/node_modules/@babel/runtime/helpers/superPropSet.js +6 -0
  237. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +8 -0
  238. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +4 -0
  239. package/node_modules/@babel/runtime/helpers/tdz.js +4 -0
  240. package/node_modules/@babel/runtime/helpers/temporalRef.js +6 -0
  241. package/node_modules/@babel/runtime/helpers/temporalUndefined.js +2 -0
  242. package/node_modules/@babel/runtime/helpers/toArray.js +8 -0
  243. package/node_modules/@babel/runtime/helpers/toConsumableArray.js +8 -0
  244. package/node_modules/@babel/runtime/helpers/toPrimitive.js +12 -0
  245. package/node_modules/@babel/runtime/helpers/toPropertyKey.js +7 -0
  246. package/node_modules/@babel/runtime/helpers/toSetter.js +10 -0
  247. package/node_modules/@babel/runtime/helpers/typeof.js +10 -0
  248. package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +9 -0
  249. package/node_modules/@babel/runtime/helpers/using.js +12 -0
  250. package/node_modules/@babel/runtime/helpers/usingCtx.js +59 -0
  251. package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +69 -0
  252. package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +27 -0
  253. package/node_modules/@babel/runtime/helpers/wrapRegExp.js +51 -0
  254. package/node_modules/@babel/runtime/helpers/writeOnlyError.js +4 -0
  255. package/node_modules/@babel/runtime/package.json +1056 -0
  256. package/node_modules/@babel/runtime/regenerator/index.js +15 -0
  257. package/node_modules/@types/ace/LICENSE +21 -0
  258. package/node_modules/@types/ace/README.md +15 -0
  259. package/node_modules/@types/ace/index.d.ts +3135 -0
  260. package/node_modules/@types/ace/package.json +30 -0
  261. package/node_modules/@types/body-parser/LICENSE +21 -0
  262. package/node_modules/@types/body-parser/README.md +15 -0
  263. package/node_modules/@types/body-parser/index.d.ts +95 -0
  264. package/node_modules/@types/body-parser/package.json +58 -0
  265. package/node_modules/@types/connect/LICENSE +21 -0
  266. package/node_modules/@types/connect/README.md +15 -0
  267. package/node_modules/@types/connect/index.d.ts +91 -0
  268. package/node_modules/@types/connect/package.json +32 -0
  269. package/node_modules/@types/cors/LICENSE +21 -0
  270. package/node_modules/@types/cors/README.md +75 -0
  271. package/node_modules/@types/cors/index.d.ts +56 -0
  272. package/node_modules/@types/cors/package.json +32 -0
  273. package/node_modules/@types/express/LICENSE +21 -0
  274. package/node_modules/@types/express/README.md +15 -0
  275. package/node_modules/@types/express/index.d.ts +128 -0
  276. package/node_modules/@types/express/package.json +45 -0
  277. package/node_modules/@types/express-serve-static-core/LICENSE +21 -0
  278. package/node_modules/@types/express-serve-static-core/README.md +15 -0
  279. package/node_modules/@types/express-serve-static-core/index.d.ts +1295 -0
  280. package/node_modules/@types/express-serve-static-core/package.json +50 -0
  281. package/node_modules/@types/http-errors/LICENSE +21 -0
  282. package/node_modules/@types/http-errors/README.md +15 -0
  283. package/node_modules/@types/http-errors/index.d.ts +77 -0
  284. package/node_modules/@types/http-errors/package.json +30 -0
  285. package/node_modules/@types/jquery/JQuery.d.ts +13372 -0
  286. package/node_modules/@types/jquery/JQueryStatic.d.ts +13944 -0
  287. package/node_modules/@types/jquery/LICENSE +21 -0
  288. package/node_modules/@types/jquery/README.md +15 -0
  289. package/node_modules/@types/jquery/dist/jquery.slim.d.ts +3 -0
  290. package/node_modules/@types/jquery/index.d.ts +7 -0
  291. package/node_modules/@types/jquery/legacy.d.ts +204 -0
  292. package/node_modules/@types/jquery/misc.d.ts +7364 -0
  293. package/node_modules/@types/jquery/package.json +132 -0
  294. package/node_modules/@types/mime/LICENSE +21 -0
  295. package/node_modules/@types/mime/Mime.d.ts +10 -0
  296. package/node_modules/@types/mime/README.md +15 -0
  297. package/node_modules/@types/mime/index.d.ts +31 -0
  298. package/node_modules/@types/mime/lite.d.ts +7 -0
  299. package/node_modules/@types/mime/package.json +30 -0
  300. package/node_modules/@types/node/LICENSE +21 -0
  301. package/node_modules/@types/node/README.md +15 -0
  302. package/node_modules/@types/node/assert/strict.d.ts +8 -0
  303. package/node_modules/@types/node/assert.d.ts +1040 -0
  304. package/node_modules/@types/node/async_hooks.d.ts +541 -0
  305. package/node_modules/@types/node/buffer.d.ts +2293 -0
  306. package/node_modules/@types/node/child_process.d.ts +1544 -0
  307. package/node_modules/@types/node/cluster.d.ts +578 -0
  308. package/node_modules/@types/node/console.d.ts +452 -0
  309. package/node_modules/@types/node/constants.d.ts +19 -0
  310. package/node_modules/@types/node/crypto.d.ts +4451 -0
  311. package/node_modules/@types/node/dgram.d.ts +596 -0
  312. package/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
  313. package/node_modules/@types/node/dns/promises.d.ts +476 -0
  314. package/node_modules/@types/node/dns.d.ts +865 -0
  315. package/node_modules/@types/node/dom-events.d.ts +124 -0
  316. package/node_modules/@types/node/domain.d.ts +170 -0
  317. package/node_modules/@types/node/events.d.ts +931 -0
  318. package/node_modules/@types/node/fs/promises.d.ts +1264 -0
  319. package/node_modules/@types/node/fs.d.ts +4390 -0
  320. package/node_modules/@types/node/globals.d.ts +510 -0
  321. package/node_modules/@types/node/globals.global.d.ts +1 -0
  322. package/node_modules/@types/node/http.d.ts +1921 -0
  323. package/node_modules/@types/node/http2.d.ts +2418 -0
  324. package/node_modules/@types/node/https.d.ts +550 -0
  325. package/node_modules/@types/node/index.d.ts +90 -0
  326. package/node_modules/@types/node/inspector.d.ts +2746 -0
  327. package/node_modules/@types/node/module.d.ts +301 -0
  328. package/node_modules/@types/node/net.d.ts +999 -0
  329. package/node_modules/@types/node/os.d.ts +495 -0
  330. package/node_modules/@types/node/package.json +217 -0
  331. package/node_modules/@types/node/path.d.ts +200 -0
  332. package/node_modules/@types/node/perf_hooks.d.ts +941 -0
  333. package/node_modules/@types/node/process.d.ts +1913 -0
  334. package/node_modules/@types/node/punycode.d.ts +117 -0
  335. package/node_modules/@types/node/querystring.d.ts +153 -0
  336. package/node_modules/@types/node/readline/promises.d.ts +150 -0
  337. package/node_modules/@types/node/readline.d.ts +540 -0
  338. package/node_modules/@types/node/repl.d.ts +430 -0
  339. package/node_modules/@types/node/sea.d.ts +153 -0
  340. package/node_modules/@types/node/sqlite.d.ts +213 -0
  341. package/node_modules/@types/node/stream/consumers.d.ts +12 -0
  342. package/node_modules/@types/node/stream/promises.d.ts +83 -0
  343. package/node_modules/@types/node/stream/web.d.ts +367 -0
  344. package/node_modules/@types/node/stream.d.ts +1707 -0
  345. package/node_modules/@types/node/string_decoder.d.ts +67 -0
  346. package/node_modules/@types/node/test.d.ts +2006 -0
  347. package/node_modules/@types/node/timers/promises.d.ts +97 -0
  348. package/node_modules/@types/node/timers.d.ts +240 -0
  349. package/node_modules/@types/node/tls.d.ts +1220 -0
  350. package/node_modules/@types/node/trace_events.d.ts +197 -0
  351. package/node_modules/@types/node/tty.d.ts +208 -0
  352. package/node_modules/@types/node/url.d.ts +969 -0
  353. package/node_modules/@types/node/util.d.ts +2298 -0
  354. package/node_modules/@types/node/v8.d.ts +808 -0
  355. package/node_modules/@types/node/vm.d.ts +922 -0
  356. package/node_modules/@types/node/wasi.d.ts +181 -0
  357. package/node_modules/@types/node/worker_threads.d.ts +712 -0
  358. package/node_modules/@types/node/zlib.d.ts +539 -0
  359. package/node_modules/@types/node-red/LICENSE +21 -0
  360. package/node_modules/@types/node-red/README.md +15 -0
  361. package/node_modules/@types/node-red/index.d.ts +241 -0
  362. package/node_modules/@types/node-red/package.json +52 -0
  363. package/node_modules/@types/node-red__editor-api/LICENSE +21 -0
  364. package/node_modules/@types/node-red__editor-api/README.md +65 -0
  365. package/node_modules/@types/node-red__editor-api/index.d.ts +46 -0
  366. package/node_modules/@types/node-red__editor-api/package.json +33 -0
  367. package/node_modules/@types/node-red__editor-client/LICENSE +21 -0
  368. package/node_modules/@types/node-red__editor-client/README.md +15 -0
  369. package/node_modules/@types/node-red__editor-client/index.d.ts +1738 -0
  370. package/node_modules/@types/node-red__editor-client/package.json +36 -0
  371. package/node_modules/@types/node-red__registry/LICENSE +21 -0
  372. package/node_modules/@types/node-red__registry/README.md +15 -0
  373. package/node_modules/@types/node-red__registry/index.d.ts +452 -0
  374. package/node_modules/@types/node-red__registry/package.json +34 -0
  375. package/node_modules/@types/node-red__runtime/LICENSE +21 -0
  376. package/node_modules/@types/node-red__runtime/README.md +15 -0
  377. package/node_modules/@types/node-red__runtime/index.d.ts +1458 -0
  378. package/node_modules/@types/node-red__runtime/package.json +36 -0
  379. package/node_modules/@types/node-red__util/LICENSE +21 -0
  380. package/node_modules/@types/node-red__util/README.md +15 -0
  381. package/node_modules/@types/node-red__util/index.d.ts +557 -0
  382. package/node_modules/@types/node-red__util/package.json +34 -0
  383. package/node_modules/@types/passport/LICENSE +21 -0
  384. package/node_modules/@types/passport/README.md +15 -0
  385. package/node_modules/@types/passport/index.d.ts +921 -0
  386. package/node_modules/@types/passport/package.json +57 -0
  387. package/node_modules/@types/qs/LICENSE +21 -0
  388. package/node_modules/@types/qs/README.md +15 -0
  389. package/node_modules/@types/qs/index.d.ts +80 -0
  390. package/node_modules/@types/qs/package.json +65 -0
  391. package/node_modules/@types/range-parser/LICENSE +21 -0
  392. package/node_modules/@types/range-parser/README.md +53 -0
  393. package/node_modules/@types/range-parser/index.d.ts +34 -0
  394. package/node_modules/@types/range-parser/package.json +25 -0
  395. package/node_modules/@types/readable-stream/LICENSE +21 -0
  396. package/node_modules/@types/readable-stream/README.md +15 -0
  397. package/node_modules/@types/readable-stream/index.d.ts +677 -0
  398. package/node_modules/@types/readable-stream/package.json +38 -0
  399. package/node_modules/@types/send/LICENSE +21 -0
  400. package/node_modules/@types/send/README.md +15 -0
  401. package/node_modules/@types/send/index.d.ts +225 -0
  402. package/node_modules/@types/send/package.json +33 -0
  403. package/node_modules/@types/serve-static/LICENSE +21 -0
  404. package/node_modules/@types/serve-static/README.md +15 -0
  405. package/node_modules/@types/serve-static/index.d.ts +107 -0
  406. package/node_modules/@types/serve-static/package.json +39 -0
  407. package/node_modules/@types/sizzle/LICENSE +21 -0
  408. package/node_modules/@types/sizzle/README.md +15 -0
  409. package/node_modules/@types/sizzle/index.d.ts +91 -0
  410. package/node_modules/@types/sizzle/package.json +25 -0
  411. package/node_modules/@types/ws/LICENSE +21 -0
  412. package/node_modules/@types/ws/README.md +15 -0
  413. package/node_modules/@types/ws/index.d.mts +21 -0
  414. package/node_modules/@types/ws/index.d.ts +401 -0
  415. package/node_modules/@types/ws/package.json +71 -0
  416. package/node_modules/abort-controller/LICENSE +21 -0
  417. package/node_modules/abort-controller/README.md +98 -0
  418. package/node_modules/abort-controller/browser.js +13 -0
  419. package/node_modules/abort-controller/browser.mjs +11 -0
  420. package/node_modules/abort-controller/dist/abort-controller.d.ts +43 -0
  421. package/node_modules/abort-controller/dist/abort-controller.js +127 -0
  422. package/node_modules/abort-controller/dist/abort-controller.js.map +1 -0
  423. package/node_modules/abort-controller/dist/abort-controller.mjs +118 -0
  424. package/node_modules/abort-controller/dist/abort-controller.mjs.map +1 -0
  425. package/node_modules/abort-controller/dist/abort-controller.umd.js +5 -0
  426. package/node_modules/abort-controller/dist/abort-controller.umd.js.map +1 -0
  427. package/node_modules/abort-controller/package.json +97 -0
  428. package/node_modules/abort-controller/polyfill.js +21 -0
  429. package/node_modules/abort-controller/polyfill.mjs +19 -0
  430. package/node_modules/base64-js/LICENSE +21 -0
  431. package/node_modules/base64-js/README.md +34 -0
  432. package/node_modules/base64-js/base64js.min.js +1 -0
  433. package/node_modules/base64-js/index.d.ts +3 -0
  434. package/node_modules/base64-js/index.js +150 -0
  435. package/node_modules/base64-js/package.json +47 -0
  436. package/node_modules/bl/.github/dependabot.yml +16 -0
  437. package/node_modules/bl/.github/workflows/test-and-release.yml +61 -0
  438. package/node_modules/bl/BufferList.d.ts +418 -0
  439. package/node_modules/bl/BufferList.js +400 -0
  440. package/node_modules/bl/CHANGELOG.md +142 -0
  441. package/node_modules/bl/LICENSE.md +13 -0
  442. package/node_modules/bl/README.md +247 -0
  443. package/node_modules/bl/bl.js +84 -0
  444. package/node_modules/bl/index.d.ts +88 -0
  445. package/node_modules/bl/package.json +123 -0
  446. package/node_modules/bl/test/convert.js +21 -0
  447. package/node_modules/bl/test/indexOf.js +492 -0
  448. package/node_modules/bl/test/isBufferList.js +32 -0
  449. package/node_modules/bl/test/test.js +948 -0
  450. package/node_modules/buffer/AUTHORS.md +73 -0
  451. package/node_modules/buffer/LICENSE +21 -0
  452. package/node_modules/buffer/README.md +410 -0
  453. package/node_modules/buffer/index.d.ts +194 -0
  454. package/node_modules/buffer/index.js +2106 -0
  455. package/node_modules/buffer/package.json +93 -0
  456. package/node_modules/buffer-from/LICENSE +21 -0
  457. package/node_modules/buffer-from/index.js +72 -0
  458. package/node_modules/buffer-from/package.json +19 -0
  459. package/node_modules/buffer-from/readme.md +69 -0
  460. package/node_modules/commist/.github/workflows/ci.yml +27 -0
  461. package/node_modules/commist/LICENSE +21 -0
  462. package/node_modules/commist/README.md +113 -0
  463. package/node_modules/commist/example.js +26 -0
  464. package/node_modules/commist/index.js +155 -0
  465. package/node_modules/commist/leven.js +91 -0
  466. package/node_modules/commist/package.json +28 -0
  467. package/node_modules/commist/test.js +368 -0
  468. package/node_modules/concat-stream/LICENSE +24 -0
  469. package/node_modules/concat-stream/index.js +144 -0
  470. package/node_modules/concat-stream/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  471. package/node_modules/concat-stream/node_modules/readable-stream/GOVERNANCE.md +136 -0
  472. package/node_modules/concat-stream/node_modules/readable-stream/LICENSE +47 -0
  473. package/node_modules/concat-stream/node_modules/readable-stream/README.md +106 -0
  474. package/node_modules/concat-stream/node_modules/readable-stream/errors-browser.js +127 -0
  475. package/node_modules/concat-stream/node_modules/readable-stream/errors.js +116 -0
  476. package/node_modules/concat-stream/node_modules/readable-stream/experimentalWarning.js +17 -0
  477. package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
  478. package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
  479. package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
  480. package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js +190 -0
  481. package/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js +641 -0
  482. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
  483. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
  484. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
  485. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
  486. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
  487. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
  488. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
  489. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
  490. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  491. package/node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  492. package/node_modules/concat-stream/node_modules/readable-stream/package.json +68 -0
  493. package/node_modules/concat-stream/node_modules/readable-stream/readable-browser.js +9 -0
  494. package/node_modules/concat-stream/node_modules/readable-stream/readable.js +16 -0
  495. package/node_modules/concat-stream/package.json +55 -0
  496. package/node_modules/concat-stream/readme.md +102 -0
  497. package/node_modules/debug/LICENSE +20 -0
  498. package/node_modules/debug/README.md +481 -0
  499. package/node_modules/debug/package.json +60 -0
  500. package/node_modules/debug/src/browser.js +271 -0
  501. package/node_modules/debug/src/common.js +274 -0
  502. package/node_modules/debug/src/index.js +10 -0
  503. package/node_modules/debug/src/node.js +263 -0
  504. package/node_modules/event-target-shim/LICENSE +22 -0
  505. package/node_modules/event-target-shim/README.md +293 -0
  506. package/node_modules/event-target-shim/dist/event-target-shim.js +871 -0
  507. package/node_modules/event-target-shim/dist/event-target-shim.js.map +1 -0
  508. package/node_modules/event-target-shim/dist/event-target-shim.mjs +862 -0
  509. package/node_modules/event-target-shim/dist/event-target-shim.mjs.map +1 -0
  510. package/node_modules/event-target-shim/dist/event-target-shim.umd.js +6 -0
  511. package/node_modules/event-target-shim/dist/event-target-shim.umd.js.map +1 -0
  512. package/node_modules/event-target-shim/index.d.ts +399 -0
  513. package/node_modules/event-target-shim/package.json +82 -0
  514. package/node_modules/events/.airtap.yml +15 -0
  515. package/node_modules/events/.github/FUNDING.yml +12 -0
  516. package/node_modules/events/.travis.yml +18 -0
  517. package/node_modules/events/History.md +118 -0
  518. package/node_modules/events/LICENSE +22 -0
  519. package/node_modules/events/Readme.md +50 -0
  520. package/node_modules/events/events.js +497 -0
  521. package/node_modules/events/package.json +37 -0
  522. package/node_modules/events/security.md +10 -0
  523. package/node_modules/events/tests/add-listeners.js +111 -0
  524. package/node_modules/events/tests/check-listener-leaks.js +101 -0
  525. package/node_modules/events/tests/common.js +104 -0
  526. package/node_modules/events/tests/errors.js +13 -0
  527. package/node_modules/events/tests/events-list.js +28 -0
  528. package/node_modules/events/tests/events-once.js +234 -0
  529. package/node_modules/events/tests/index.js +64 -0
  530. package/node_modules/events/tests/legacy-compat.js +16 -0
  531. package/node_modules/events/tests/listener-count.js +37 -0
  532. package/node_modules/events/tests/listeners-side-effects.js +56 -0
  533. package/node_modules/events/tests/listeners.js +168 -0
  534. package/node_modules/events/tests/max-listeners.js +47 -0
  535. package/node_modules/events/tests/method-names.js +35 -0
  536. package/node_modules/events/tests/modify-in-emit.js +90 -0
  537. package/node_modules/events/tests/num-args.js +60 -0
  538. package/node_modules/events/tests/once.js +83 -0
  539. package/node_modules/events/tests/prepend.js +31 -0
  540. package/node_modules/events/tests/remove-all-listeners.js +133 -0
  541. package/node_modules/events/tests/remove-listeners.js +212 -0
  542. package/node_modules/events/tests/set-max-listeners-side-effects.js +31 -0
  543. package/node_modules/events/tests/special-event-names.js +45 -0
  544. package/node_modules/events/tests/subclass.js +66 -0
  545. package/node_modules/events/tests/symbols.js +25 -0
  546. package/node_modules/fast-unique-numbers/LICENSE +21 -0
  547. package/node_modules/fast-unique-numbers/README.md +51 -0
  548. package/node_modules/fast-unique-numbers/build/es2019/factories/add-unique-number.d.ts +3 -0
  549. package/node_modules/fast-unique-numbers/build/es2019/factories/add-unique-number.d.ts.map +1 -0
  550. package/node_modules/fast-unique-numbers/build/es2019/factories/add-unique-number.js +8 -0
  551. package/node_modules/fast-unique-numbers/build/es2019/factories/add-unique-number.js.map +1 -0
  552. package/node_modules/fast-unique-numbers/build/es2019/factories/cache.d.ts +3 -0
  553. package/node_modules/fast-unique-numbers/build/es2019/factories/cache.d.ts.map +1 -0
  554. package/node_modules/fast-unique-numbers/build/es2019/factories/cache.js +7 -0
  555. package/node_modules/fast-unique-numbers/build/es2019/factories/cache.js.map +1 -0
  556. package/node_modules/fast-unique-numbers/build/es2019/factories/generate-unique-number.d.ts +3 -0
  557. package/node_modules/fast-unique-numbers/build/es2019/factories/generate-unique-number.d.ts.map +1 -0
  558. package/node_modules/fast-unique-numbers/build/es2019/factories/generate-unique-number.js +46 -0
  559. package/node_modules/fast-unique-numbers/build/es2019/factories/generate-unique-number.js.map +1 -0
  560. package/node_modules/fast-unique-numbers/build/es2019/module.d.ts +5 -0
  561. package/node_modules/fast-unique-numbers/build/es2019/module.d.ts.map +1 -0
  562. package/node_modules/fast-unique-numbers/build/es2019/module.js +14 -0
  563. package/node_modules/fast-unique-numbers/build/es2019/module.js.map +1 -0
  564. package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-factory.d.ts +4 -0
  565. package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-factory.d.ts.map +1 -0
  566. package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-factory.js +2 -0
  567. package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-factory.js.map +1 -0
  568. package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-function.d.ts +2 -0
  569. package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-function.d.ts.map +1 -0
  570. package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-function.js +2 -0
  571. package/node_modules/fast-unique-numbers/build/es2019/types/add-unique-number-function.js.map +1 -0
  572. package/node_modules/fast-unique-numbers/build/es2019/types/cache-factory.d.ts +3 -0
  573. package/node_modules/fast-unique-numbers/build/es2019/types/cache-factory.d.ts.map +1 -0
  574. package/node_modules/fast-unique-numbers/build/es2019/types/cache-factory.js +2 -0
  575. package/node_modules/fast-unique-numbers/build/es2019/types/cache-factory.js.map +1 -0
  576. package/node_modules/fast-unique-numbers/build/es2019/types/cache-function.d.ts +2 -0
  577. package/node_modules/fast-unique-numbers/build/es2019/types/cache-function.d.ts.map +1 -0
  578. package/node_modules/fast-unique-numbers/build/es2019/types/cache-function.js +2 -0
  579. package/node_modules/fast-unique-numbers/build/es2019/types/cache-function.js.map +1 -0
  580. package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-factory.d.ts +4 -0
  581. package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-factory.d.ts.map +1 -0
  582. package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-factory.js +2 -0
  583. package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-factory.js.map +1 -0
  584. package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-function.d.ts +2 -0
  585. package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-function.d.ts.map +1 -0
  586. package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-function.js +2 -0
  587. package/node_modules/fast-unique-numbers/build/es2019/types/generate-unique-number-function.js.map +1 -0
  588. package/node_modules/fast-unique-numbers/build/es2019/types/index.d.ts +7 -0
  589. package/node_modules/fast-unique-numbers/build/es2019/types/index.d.ts.map +1 -0
  590. package/node_modules/fast-unique-numbers/build/es2019/types/index.js +7 -0
  591. package/node_modules/fast-unique-numbers/build/es2019/types/index.js.map +1 -0
  592. package/node_modules/fast-unique-numbers/build/es5/bundle.js +76 -0
  593. package/node_modules/fast-unique-numbers/build/node/factories/add-unique-number.js +14 -0
  594. package/node_modules/fast-unique-numbers/build/node/factories/cache.js +13 -0
  595. package/node_modules/fast-unique-numbers/build/node/factories/generate-unique-number.js +52 -0
  596. package/node_modules/fast-unique-numbers/build/node/module.js +34 -0
  597. package/node_modules/fast-unique-numbers/build/node/types/add-unique-number-factory.js +5 -0
  598. package/node_modules/fast-unique-numbers/build/node/types/add-unique-number-function.js +5 -0
  599. package/node_modules/fast-unique-numbers/build/node/types/cache-factory.js +5 -0
  600. package/node_modules/fast-unique-numbers/build/node/types/cache-function.js +5 -0
  601. package/node_modules/fast-unique-numbers/build/node/types/generate-unique-number-factory.js +5 -0
  602. package/node_modules/fast-unique-numbers/build/node/types/generate-unique-number-function.js +5 -0
  603. package/node_modules/fast-unique-numbers/build/node/types/index.js +71 -0
  604. package/node_modules/fast-unique-numbers/package.json +94 -0
  605. package/node_modules/fast-unique-numbers/src/factories/add-unique-number.ts +11 -0
  606. package/node_modules/fast-unique-numbers/src/factories/cache.ts +9 -0
  607. package/node_modules/fast-unique-numbers/src/factories/generate-unique-number.ts +55 -0
  608. package/node_modules/fast-unique-numbers/src/module.ts +17 -0
  609. package/node_modules/fast-unique-numbers/src/tsconfig.json +6 -0
  610. package/node_modules/fast-unique-numbers/src/types/add-unique-number-factory.ts +4 -0
  611. package/node_modules/fast-unique-numbers/src/types/add-unique-number-function.ts +1 -0
  612. package/node_modules/fast-unique-numbers/src/types/cache-factory.ts +3 -0
  613. package/node_modules/fast-unique-numbers/src/types/cache-function.ts +1 -0
  614. package/node_modules/fast-unique-numbers/src/types/generate-unique-number-factory.ts +7 -0
  615. package/node_modules/fast-unique-numbers/src/types/generate-unique-number-function.ts +1 -0
  616. package/node_modules/fast-unique-numbers/src/types/index.ts +6 -0
  617. package/node_modules/help-me/.github/workflows/ci.yml +28 -0
  618. package/node_modules/help-me/LICENSE +22 -0
  619. package/node_modules/help-me/README.md +66 -0
  620. package/node_modules/help-me/doc/hello.txt +1 -0
  621. package/node_modules/help-me/doc/help.txt +5 -0
  622. package/node_modules/help-me/example.js +18 -0
  623. package/node_modules/help-me/fixture/basic/hello.txt +1 -0
  624. package/node_modules/help-me/fixture/basic/help.txt +1 -0
  625. package/node_modules/help-me/fixture/dir/a/b.txt +0 -0
  626. package/node_modules/help-me/fixture/no-ext/hello +1 -0
  627. package/node_modules/help-me/fixture/sameprefix/hello world.txt +1 -0
  628. package/node_modules/help-me/fixture/sameprefix/hello.txt +1 -0
  629. package/node_modules/help-me/fixture/shortnames/abcde fghi lmno.txt +1 -0
  630. package/node_modules/help-me/fixture/shortnames/abcde hello.txt +1 -0
  631. package/node_modules/help-me/fixture/shortnames/hello world.txt +1 -0
  632. package/node_modules/help-me/help-me.js +134 -0
  633. package/node_modules/help-me/package.json +36 -0
  634. package/node_modules/help-me/test.js +316 -0
  635. package/node_modules/ieee754/LICENSE +11 -0
  636. package/node_modules/ieee754/README.md +51 -0
  637. package/node_modules/ieee754/index.d.ts +10 -0
  638. package/node_modules/ieee754/index.js +85 -0
  639. package/node_modules/ieee754/package.json +52 -0
  640. package/node_modules/inherits/LICENSE +16 -0
  641. package/node_modules/inherits/README.md +42 -0
  642. package/node_modules/inherits/inherits.js +9 -0
  643. package/node_modules/inherits/inherits_browser.js +27 -0
  644. package/node_modules/inherits/package.json +29 -0
  645. package/node_modules/js-sdsl/CHANGELOG.md +211 -0
  646. package/node_modules/js-sdsl/LICENSE +21 -0
  647. package/node_modules/js-sdsl/README.md +296 -0
  648. package/node_modules/js-sdsl/README.zh-CN.md +298 -0
  649. package/node_modules/js-sdsl/dist/cjs/container/ContainerBase/index.d.ts +206 -0
  650. package/node_modules/js-sdsl/dist/cjs/container/ContainerBase/index.js +40 -0
  651. package/node_modules/js-sdsl/dist/cjs/container/ContainerBase/index.js.map +1 -0
  652. package/node_modules/js-sdsl/dist/cjs/container/HashContainer/Base/index.d.ts +29 -0
  653. package/node_modules/js-sdsl/dist/cjs/container/HashContainer/Base/index.js +188 -0
  654. package/node_modules/js-sdsl/dist/cjs/container/HashContainer/Base/index.js.map +1 -0
  655. package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashMap.d.ts +49 -0
  656. package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashMap.js +125 -0
  657. package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashMap.js.map +1 -0
  658. package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashSet.d.ts +39 -0
  659. package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashSet.js +94 -0
  660. package/node_modules/js-sdsl/dist/cjs/container/HashContainer/HashSet.js.map +1 -0
  661. package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/PriorityQueue.d.ts +79 -0
  662. package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/PriorityQueue.js +118 -0
  663. package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/PriorityQueue.js.map +1 -0
  664. package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Queue.d.ts +22 -0
  665. package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Queue.js +52 -0
  666. package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Queue.js.map +1 -0
  667. package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Stack.d.ts +22 -0
  668. package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Stack.js +42 -0
  669. package/node_modules/js-sdsl/dist/cjs/container/OtherContainer/Stack.js.map +1 -0
  670. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/RandomIterator.d.ts +9 -0
  671. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/RandomIterator.js +58 -0
  672. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/RandomIterator.js.map +1 -0
  673. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/index.d.ts +67 -0
  674. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/index.js +16 -0
  675. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Base/index.js.map +1 -0
  676. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Deque.d.ts +58 -0
  677. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Deque.js +338 -0
  678. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Deque.js.map +1 -0
  679. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/LinkList.d.ts +58 -0
  680. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/LinkList.js +330 -0
  681. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/LinkList.js.map +1 -0
  682. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Vector.d.ts +40 -0
  683. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Vector.js +158 -0
  684. package/node_modules/js-sdsl/dist/cjs/container/SequentialContainer/Vector.js.map +1 -0
  685. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeIterator.d.ts +18 -0
  686. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeIterator.js +80 -0
  687. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeIterator.js.map +1 -0
  688. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeNode.d.ts +47 -0
  689. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeNode.js +115 -0
  690. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/TreeNode.js.map +1 -0
  691. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/index.d.ts +58 -0
  692. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/index.js +514 -0
  693. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/Base/index.js.map +1 -0
  694. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedMap.d.ts +62 -0
  695. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedMap.js +127 -0
  696. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedMap.js.map +1 -0
  697. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedSet.d.ts +54 -0
  698. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedSet.js +107 -0
  699. package/node_modules/js-sdsl/dist/cjs/container/TreeContainer/OrderedSet.js.map +1 -0
  700. package/node_modules/js-sdsl/dist/cjs/index.d.ts +21 -0
  701. package/node_modules/js-sdsl/dist/cjs/index.js +102 -0
  702. package/node_modules/js-sdsl/dist/cjs/index.js.map +1 -0
  703. package/node_modules/js-sdsl/dist/cjs/utils/checkObject.d.ts +1 -0
  704. package/node_modules/js-sdsl/dist/cjs/utils/checkObject.js +13 -0
  705. package/node_modules/js-sdsl/dist/cjs/utils/checkObject.js.map +1 -0
  706. package/node_modules/js-sdsl/dist/cjs/utils/throwError.d.ts +1 -0
  707. package/node_modules/js-sdsl/dist/cjs/utils/throwError.js +12 -0
  708. package/node_modules/js-sdsl/dist/cjs/utils/throwError.js.map +1 -0
  709. package/node_modules/js-sdsl/dist/esm/container/ContainerBase/index.d.ts +206 -0
  710. package/node_modules/js-sdsl/dist/esm/container/ContainerBase/index.js +68 -0
  711. package/node_modules/js-sdsl/dist/esm/container/ContainerBase/index.js.map +1 -0
  712. package/node_modules/js-sdsl/dist/esm/container/HashContainer/Base/index.d.ts +29 -0
  713. package/node_modules/js-sdsl/dist/esm/container/HashContainer/Base/index.js +201 -0
  714. package/node_modules/js-sdsl/dist/esm/container/HashContainer/Base/index.js.map +1 -0
  715. package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashMap.d.ts +49 -0
  716. package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashMap.js +248 -0
  717. package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashMap.js.map +1 -0
  718. package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashSet.d.ts +39 -0
  719. package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashSet.js +223 -0
  720. package/node_modules/js-sdsl/dist/esm/container/HashContainer/HashSet.js.map +1 -0
  721. package/node_modules/js-sdsl/dist/esm/container/OtherContainer/PriorityQueue.d.ts +79 -0
  722. package/node_modules/js-sdsl/dist/esm/container/OtherContainer/PriorityQueue.js +171 -0
  723. package/node_modules/js-sdsl/dist/esm/container/OtherContainer/PriorityQueue.js.map +1 -0
  724. package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Queue.d.ts +22 -0
  725. package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Queue.js +69 -0
  726. package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Queue.js.map +1 -0
  727. package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Stack.d.ts +22 -0
  728. package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Stack.js +59 -0
  729. package/node_modules/js-sdsl/dist/esm/container/OtherContainer/Stack.js.map +1 -0
  730. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/RandomIterator.d.ts +9 -0
  731. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/RandomIterator.js +78 -0
  732. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/RandomIterator.js.map +1 -0
  733. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/index.d.ts +67 -0
  734. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/index.js +33 -0
  735. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Base/index.js.map +1 -0
  736. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Deque.d.ts +58 -0
  737. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Deque.js +498 -0
  738. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Deque.js.map +1 -0
  739. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/LinkList.d.ts +58 -0
  740. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/LinkList.js +456 -0
  741. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/LinkList.js.map +1 -0
  742. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Vector.d.ts +40 -0
  743. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Vector.js +323 -0
  744. package/node_modules/js-sdsl/dist/esm/container/SequentialContainer/Vector.js.map +1 -0
  745. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeIterator.d.ts +18 -0
  746. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeIterator.js +98 -0
  747. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeIterator.js.map +1 -0
  748. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeNode.d.ts +47 -0
  749. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeNode.js +132 -0
  750. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/TreeNode.js.map +1 -0
  751. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/index.d.ts +58 -0
  752. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/index.js +600 -0
  753. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/Base/index.js.map +1 -0
  754. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedMap.d.ts +62 -0
  755. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedMap.js +265 -0
  756. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedMap.js.map +1 -0
  757. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedSet.d.ts +54 -0
  758. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedSet.js +245 -0
  759. package/node_modules/js-sdsl/dist/esm/container/TreeContainer/OrderedSet.js.map +1 -0
  760. package/node_modules/js-sdsl/dist/esm/index.d.ts +21 -0
  761. package/node_modules/js-sdsl/dist/esm/index.js +20 -0
  762. package/node_modules/js-sdsl/dist/esm/index.js.map +1 -0
  763. package/node_modules/js-sdsl/dist/esm/utils/checkObject.d.ts +1 -0
  764. package/node_modules/js-sdsl/dist/esm/utils/checkObject.js +5 -0
  765. package/node_modules/js-sdsl/dist/esm/utils/checkObject.js.map +1 -0
  766. package/node_modules/js-sdsl/dist/esm/utils/throwError.d.ts +1 -0
  767. package/node_modules/js-sdsl/dist/esm/utils/throwError.js +4 -0
  768. package/node_modules/js-sdsl/dist/esm/utils/throwError.js.map +1 -0
  769. package/node_modules/js-sdsl/dist/umd/js-sdsl.js +3154 -0
  770. package/node_modules/js-sdsl/dist/umd/js-sdsl.min.js +8 -0
  771. package/node_modules/js-sdsl/dist/umd/js-sdsl.min.js.map +1 -0
  772. package/node_modules/js-sdsl/package.json +166 -0
  773. package/node_modules/jsonata/LICENSE +19 -0
  774. package/node_modules/jsonata/README.md +70 -0
  775. package/node_modules/jsonata/jsonata-es5.js +9867 -0
  776. package/node_modules/jsonata/jsonata-es5.min.js +1 -0
  777. package/node_modules/jsonata/jsonata.d.ts +53 -0
  778. package/node_modules/jsonata/jsonata.js +7541 -0
  779. package/node_modules/jsonata/jsonata.min.js +1 -0
  780. package/node_modules/jsonata/package.json +62 -0
  781. package/node_modules/lru-cache/LICENSE +15 -0
  782. package/node_modules/lru-cache/README.md +331 -0
  783. package/node_modules/lru-cache/dist/commonjs/index.d.ts +1277 -0
  784. package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
  785. package/node_modules/lru-cache/dist/commonjs/index.js +1546 -0
  786. package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
  787. package/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
  788. package/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
  789. package/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  790. package/node_modules/lru-cache/dist/esm/index.d.ts +1277 -0
  791. package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
  792. package/node_modules/lru-cache/dist/esm/index.js +1542 -0
  793. package/node_modules/lru-cache/dist/esm/index.js.map +1 -0
  794. package/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  795. package/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
  796. package/node_modules/lru-cache/dist/esm/package.json +3 -0
  797. package/node_modules/lru-cache/package.json +116 -0
  798. package/node_modules/minimist/.eslintrc +29 -0
  799. package/node_modules/minimist/.github/FUNDING.yml +12 -0
  800. package/node_modules/minimist/.nycrc +14 -0
  801. package/node_modules/minimist/CHANGELOG.md +298 -0
  802. package/node_modules/minimist/LICENSE +18 -0
  803. package/node_modules/minimist/README.md +121 -0
  804. package/node_modules/minimist/example/parse.js +4 -0
  805. package/node_modules/minimist/index.js +263 -0
  806. package/node_modules/minimist/package.json +75 -0
  807. package/node_modules/minimist/test/all_bool.js +34 -0
  808. package/node_modules/minimist/test/bool.js +177 -0
  809. package/node_modules/minimist/test/dash.js +43 -0
  810. package/node_modules/minimist/test/default_bool.js +37 -0
  811. package/node_modules/minimist/test/dotted.js +24 -0
  812. package/node_modules/minimist/test/kv_short.js +32 -0
  813. package/node_modules/minimist/test/long.js +33 -0
  814. package/node_modules/minimist/test/num.js +38 -0
  815. package/node_modules/minimist/test/parse.js +209 -0
  816. package/node_modules/minimist/test/parse_modified.js +11 -0
  817. package/node_modules/minimist/test/proto.js +64 -0
  818. package/node_modules/minimist/test/short.js +69 -0
  819. package/node_modules/minimist/test/stop_early.js +17 -0
  820. package/node_modules/minimist/test/unknown.js +104 -0
  821. package/node_modules/minimist/test/whitespace.js +10 -0
  822. package/node_modules/mqtt/CONTRIBUTING.md +27 -0
  823. package/node_modules/mqtt/LICENSE.md +15 -0
  824. package/node_modules/mqtt/README.md +960 -0
  825. package/node_modules/mqtt/build/bin/mqtt.d.ts +2 -0
  826. package/node_modules/mqtt/build/bin/mqtt.js +30 -0
  827. package/node_modules/mqtt/build/bin/mqtt.js.map +1 -0
  828. package/node_modules/mqtt/build/bin/pub.d.ts +2 -0
  829. package/node_modules/mqtt/build/bin/pub.js +147 -0
  830. package/node_modules/mqtt/build/bin/pub.js.map +1 -0
  831. package/node_modules/mqtt/build/bin/sub.d.ts +2 -0
  832. package/node_modules/mqtt/build/bin/sub.js +121 -0
  833. package/node_modules/mqtt/build/bin/sub.js.map +1 -0
  834. package/node_modules/mqtt/build/index.d.ts +3 -0
  835. package/node_modules/mqtt/build/index.js +32 -0
  836. package/node_modules/mqtt/build/index.js.map +1 -0
  837. package/node_modules/mqtt/build/lib/BufferedDuplex.d.ts +20 -0
  838. package/node_modules/mqtt/build/lib/BufferedDuplex.js +78 -0
  839. package/node_modules/mqtt/build/lib/BufferedDuplex.js.map +1 -0
  840. package/node_modules/mqtt/build/lib/KeepaliveManager.d.ts +21 -0
  841. package/node_modules/mqtt/build/lib/KeepaliveManager.js +73 -0
  842. package/node_modules/mqtt/build/lib/KeepaliveManager.js.map +1 -0
  843. package/node_modules/mqtt/build/lib/TypedEmitter.d.ts +19 -0
  844. package/node_modules/mqtt/build/lib/TypedEmitter.js +13 -0
  845. package/node_modules/mqtt/build/lib/TypedEmitter.js.map +1 -0
  846. package/node_modules/mqtt/build/lib/client.d.ts +235 -0
  847. package/node_modules/mqtt/build/lib/client.js +1211 -0
  848. package/node_modules/mqtt/build/lib/client.js.map +1 -0
  849. package/node_modules/mqtt/build/lib/connect/ali.d.ts +3 -0
  850. package/node_modules/mqtt/build/lib/connect/ali.js +108 -0
  851. package/node_modules/mqtt/build/lib/connect/ali.js.map +1 -0
  852. package/node_modules/mqtt/build/lib/connect/index.d.ts +10 -0
  853. package/node_modules/mqtt/build/lib/connect/index.js +192 -0
  854. package/node_modules/mqtt/build/lib/connect/index.js.map +1 -0
  855. package/node_modules/mqtt/build/lib/connect/tcp.d.ts +3 -0
  856. package/node_modules/mqtt/build/lib/connect/tcp.js +18 -0
  857. package/node_modules/mqtt/build/lib/connect/tcp.js.map +1 -0
  858. package/node_modules/mqtt/build/lib/connect/tls.d.ts +3 -0
  859. package/node_modules/mqtt/build/lib/connect/tls.js +38 -0
  860. package/node_modules/mqtt/build/lib/connect/tls.js.map +1 -0
  861. package/node_modules/mqtt/build/lib/connect/ws.d.ts +4 -0
  862. package/node_modules/mqtt/build/lib/connect/ws.js +217 -0
  863. package/node_modules/mqtt/build/lib/connect/ws.js.map +1 -0
  864. package/node_modules/mqtt/build/lib/connect/wx.d.ts +6 -0
  865. package/node_modules/mqtt/build/lib/connect/wx.js +115 -0
  866. package/node_modules/mqtt/build/lib/connect/wx.js.map +1 -0
  867. package/node_modules/mqtt/build/lib/default-message-id-provider.d.ts +16 -0
  868. package/node_modules/mqtt/build/lib/default-message-id-provider.js +24 -0
  869. package/node_modules/mqtt/build/lib/default-message-id-provider.js.map +1 -0
  870. package/node_modules/mqtt/build/lib/get-timer.d.ts +8 -0
  871. package/node_modules/mqtt/build/lib/get-timer.js +53 -0
  872. package/node_modules/mqtt/build/lib/get-timer.js.map +1 -0
  873. package/node_modules/mqtt/build/lib/handlers/ack.d.ts +48 -0
  874. package/node_modules/mqtt/build/lib/handlers/ack.js +131 -0
  875. package/node_modules/mqtt/build/lib/handlers/ack.js.map +1 -0
  876. package/node_modules/mqtt/build/lib/handlers/auth.d.ts +3 -0
  877. package/node_modules/mqtt/build/lib/handlers/auth.js +30 -0
  878. package/node_modules/mqtt/build/lib/handlers/auth.js.map +1 -0
  879. package/node_modules/mqtt/build/lib/handlers/connack.d.ts +3 -0
  880. package/node_modules/mqtt/build/lib/handlers/connack.js +47 -0
  881. package/node_modules/mqtt/build/lib/handlers/connack.js.map +1 -0
  882. package/node_modules/mqtt/build/lib/handlers/index.d.ts +3 -0
  883. package/node_modules/mqtt/build/lib/handlers/index.js +68 -0
  884. package/node_modules/mqtt/build/lib/handlers/index.js.map +1 -0
  885. package/node_modules/mqtt/build/lib/handlers/publish.d.ts +3 -0
  886. package/node_modules/mqtt/build/lib/handlers/publish.js +106 -0
  887. package/node_modules/mqtt/build/lib/handlers/publish.js.map +1 -0
  888. package/node_modules/mqtt/build/lib/handlers/pubrel.d.ts +3 -0
  889. package/node_modules/mqtt/build/lib/handlers/pubrel.js +25 -0
  890. package/node_modules/mqtt/build/lib/handlers/pubrel.js.map +1 -0
  891. package/node_modules/mqtt/build/lib/is-browser.d.ts +4 -0
  892. package/node_modules/mqtt/build/lib/is-browser.js +27 -0
  893. package/node_modules/mqtt/build/lib/is-browser.js.map +1 -0
  894. package/node_modules/mqtt/build/lib/shared.d.ts +23 -0
  895. package/node_modules/mqtt/build/lib/shared.js +41 -0
  896. package/node_modules/mqtt/build/lib/shared.js.map +1 -0
  897. package/node_modules/mqtt/build/lib/store.d.ts +24 -0
  898. package/node_modules/mqtt/build/lib/store.js +80 -0
  899. package/node_modules/mqtt/build/lib/store.js.map +1 -0
  900. package/node_modules/mqtt/build/lib/topic-alias-recv.d.ts +9 -0
  901. package/node_modules/mqtt/build/lib/topic-alias-recv.js +24 -0
  902. package/node_modules/mqtt/build/lib/topic-alias-recv.js.map +1 -0
  903. package/node_modules/mqtt/build/lib/topic-alias-send.d.ts +13 -0
  904. package/node_modules/mqtt/build/lib/topic-alias-send.js +53 -0
  905. package/node_modules/mqtt/build/lib/topic-alias-send.js.map +1 -0
  906. package/node_modules/mqtt/build/lib/unique-message-id-provider.d.ts +11 -0
  907. package/node_modules/mqtt/build/lib/unique-message-id-provider.js +26 -0
  908. package/node_modules/mqtt/build/lib/unique-message-id-provider.js.map +1 -0
  909. package/node_modules/mqtt/build/lib/validations.d.ts +2 -0
  910. package/node_modules/mqtt/build/lib/validations.js +32 -0
  911. package/node_modules/mqtt/build/lib/validations.js.map +1 -0
  912. package/node_modules/mqtt/build/mqtt.d.ts +12 -0
  913. package/node_modules/mqtt/build/mqtt.js +51 -0
  914. package/node_modules/mqtt/build/mqtt.js.map +1 -0
  915. package/node_modules/mqtt/build/tsconfig.build.tsbuildinfo +1 -0
  916. package/node_modules/mqtt/dist/mqtt.esm.js +10 -0
  917. package/node_modules/mqtt/dist/mqtt.js +21678 -0
  918. package/node_modules/mqtt/dist/mqtt.min.js +10 -0
  919. package/node_modules/mqtt/help/help.txt +8 -0
  920. package/node_modules/mqtt/help/publish.txt +26 -0
  921. package/node_modules/mqtt/help/subscribe.txt +26 -0
  922. package/node_modules/mqtt/package.json +171 -0
  923. package/node_modules/mqtt/src/bin/mqtt.ts +39 -0
  924. package/node_modules/mqtt/src/bin/pub.ts +174 -0
  925. package/node_modules/mqtt/src/bin/sub.ts +146 -0
  926. package/node_modules/mqtt/src/index.ts +4 -0
  927. package/node_modules/mqtt/src/lib/BufferedDuplex.ts +115 -0
  928. package/node_modules/mqtt/src/lib/KeepaliveManager.ts +112 -0
  929. package/node_modules/mqtt/src/lib/TypedEmitter.ts +71 -0
  930. package/node_modules/mqtt/src/lib/client.ts +2371 -0
  931. package/node_modules/mqtt/src/lib/connect/ali.ts +127 -0
  932. package/node_modules/mqtt/src/lib/connect/index.ts +288 -0
  933. package/node_modules/mqtt/src/lib/connect/tcp.ts +22 -0
  934. package/node_modules/mqtt/src/lib/connect/tls.ts +54 -0
  935. package/node_modules/mqtt/src/lib/connect/ws.ts +303 -0
  936. package/node_modules/mqtt/src/lib/connect/wx.ts +142 -0
  937. package/node_modules/mqtt/src/lib/default-message-id-provider.ts +99 -0
  938. package/node_modules/mqtt/src/lib/get-timer.ts +40 -0
  939. package/node_modules/mqtt/src/lib/handlers/ack.ts +159 -0
  940. package/node_modules/mqtt/src/lib/handlers/auth.ts +44 -0
  941. package/node_modules/mqtt/src/lib/handlers/connack.ts +55 -0
  942. package/node_modules/mqtt/src/lib/handlers/index.ts +74 -0
  943. package/node_modules/mqtt/src/lib/handlers/publish.ts +183 -0
  944. package/node_modules/mqtt/src/lib/handlers/pubrel.ts +27 -0
  945. package/node_modules/mqtt/src/lib/is-browser.ts +46 -0
  946. package/node_modules/mqtt/src/lib/shared.ts +87 -0
  947. package/node_modules/mqtt/src/lib/store.ts +166 -0
  948. package/node_modules/mqtt/src/lib/topic-alias-recv.ts +48 -0
  949. package/node_modules/mqtt/src/lib/topic-alias-send.ts +96 -0
  950. package/node_modules/mqtt/src/lib/unique-message-id-provider.ts +64 -0
  951. package/node_modules/mqtt/src/lib/validations.ts +46 -0
  952. package/node_modules/mqtt/src/mqtt.ts +28 -0
  953. package/node_modules/mqtt-packet/.github/workflows/ci.yml +27 -0
  954. package/node_modules/mqtt-packet/CONTRIBUTING.md +27 -0
  955. package/node_modules/mqtt-packet/LICENSE.md +13 -0
  956. package/node_modules/mqtt-packet/README.md +491 -0
  957. package/node_modules/mqtt-packet/benchmarks/generate.js +26 -0
  958. package/node_modules/mqtt-packet/benchmarks/generateNet.js +50 -0
  959. package/node_modules/mqtt-packet/benchmarks/parse.js +19 -0
  960. package/node_modules/mqtt-packet/benchmarks/writeToStream.js +48 -0
  961. package/node_modules/mqtt-packet/constants.js +291 -0
  962. package/node_modules/mqtt-packet/generate.js +57 -0
  963. package/node_modules/mqtt-packet/mqtt.js +3 -0
  964. package/node_modules/mqtt-packet/numbers.js +59 -0
  965. package/node_modules/mqtt-packet/package.json +48 -0
  966. package/node_modules/mqtt-packet/packet.js +13 -0
  967. package/node_modules/mqtt-packet/parser.js +809 -0
  968. package/node_modules/mqtt-packet/test.js +3177 -0
  969. package/node_modules/mqtt-packet/testRandom.js +86 -0
  970. package/node_modules/mqtt-packet/types/index.d.ts +257 -0
  971. package/node_modules/mqtt-packet/writeToStream.js +1127 -0
  972. package/node_modules/ms/index.js +162 -0
  973. package/node_modules/ms/license.md +21 -0
  974. package/node_modules/ms/package.json +37 -0
  975. package/node_modules/ms/readme.md +60 -0
  976. package/node_modules/number-allocator/.github/workflows/nodejs.yml +33 -0
  977. package/node_modules/number-allocator/CHANGELOG.md +47 -0
  978. package/node_modules/number-allocator/LICENSE +21 -0
  979. package/node_modules/number-allocator/README.md +203 -0
  980. package/node_modules/number-allocator/index.js +7 -0
  981. package/node_modules/number-allocator/karma.conf.js +63 -0
  982. package/node_modules/number-allocator/lib/number-allocator.js +249 -0
  983. package/node_modules/number-allocator/package.json +69 -0
  984. package/node_modules/number-allocator/test/test.js +337 -0
  985. package/node_modules/number-allocator/test/typescript/test.ts +24 -0
  986. package/node_modules/number-allocator/test/typescript/tsconfig.json +14 -0
  987. package/node_modules/number-allocator/types/index.d.ts +1 -0
  988. package/node_modules/number-allocator/types/lib/number-allocator.d.ts +65 -0
  989. package/node_modules/process/.eslintrc +21 -0
  990. package/node_modules/process/LICENSE +22 -0
  991. package/node_modules/process/README.md +26 -0
  992. package/node_modules/process/browser.js +184 -0
  993. package/node_modules/process/index.js +2 -0
  994. package/node_modules/process/package.json +27 -0
  995. package/node_modules/process/test.js +199 -0
  996. package/node_modules/process-nextick-args/index.js +45 -0
  997. package/node_modules/process-nextick-args/license.md +19 -0
  998. package/node_modules/process-nextick-args/package.json +25 -0
  999. package/node_modules/process-nextick-args/readme.md +18 -0
  1000. package/node_modules/readable-stream/LICENSE +47 -0
  1001. package/node_modules/readable-stream/README.md +116 -0
  1002. package/node_modules/readable-stream/lib/_stream_duplex.js +4 -0
  1003. package/node_modules/readable-stream/lib/_stream_passthrough.js +4 -0
  1004. package/node_modules/readable-stream/lib/_stream_readable.js +4 -0
  1005. package/node_modules/readable-stream/lib/_stream_transform.js +4 -0
  1006. package/node_modules/readable-stream/lib/_stream_writable.js +4 -0
  1007. package/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +52 -0
  1008. package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +157 -0
  1009. package/node_modules/readable-stream/lib/internal/streams/compose.js +194 -0
  1010. package/node_modules/readable-stream/lib/internal/streams/destroy.js +290 -0
  1011. package/node_modules/readable-stream/lib/internal/streams/duplex.js +143 -0
  1012. package/node_modules/readable-stream/lib/internal/streams/duplexify.js +378 -0
  1013. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +284 -0
  1014. package/node_modules/readable-stream/lib/internal/streams/from.js +98 -0
  1015. package/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +51 -0
  1016. package/node_modules/readable-stream/lib/internal/streams/legacy.js +89 -0
  1017. package/node_modules/readable-stream/lib/internal/streams/operators.js +457 -0
  1018. package/node_modules/readable-stream/lib/internal/streams/passthrough.js +39 -0
  1019. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +471 -0
  1020. package/node_modules/readable-stream/lib/internal/streams/readable.js +1288 -0
  1021. package/node_modules/readable-stream/lib/internal/streams/state.js +39 -0
  1022. package/node_modules/readable-stream/lib/internal/streams/transform.js +180 -0
  1023. package/node_modules/readable-stream/lib/internal/streams/utils.js +329 -0
  1024. package/node_modules/readable-stream/lib/internal/streams/writable.js +817 -0
  1025. package/node_modules/readable-stream/lib/internal/validators.js +530 -0
  1026. package/node_modules/readable-stream/lib/ours/browser.js +35 -0
  1027. package/node_modules/readable-stream/lib/ours/errors.js +341 -0
  1028. package/node_modules/readable-stream/lib/ours/index.js +65 -0
  1029. package/node_modules/readable-stream/lib/ours/primordials.js +107 -0
  1030. package/node_modules/readable-stream/lib/ours/util.js +200 -0
  1031. package/node_modules/readable-stream/lib/stream/promises.js +43 -0
  1032. package/node_modules/readable-stream/lib/stream.js +141 -0
  1033. package/node_modules/readable-stream/package.json +86 -0
  1034. package/node_modules/regenerator-runtime/LICENSE +21 -0
  1035. package/node_modules/regenerator-runtime/README.md +31 -0
  1036. package/node_modules/regenerator-runtime/package.json +19 -0
  1037. package/node_modules/regenerator-runtime/path.js +11 -0
  1038. package/node_modules/regenerator-runtime/runtime.js +761 -0
  1039. package/node_modules/reinterval/.npmignore +27 -0
  1040. package/node_modules/reinterval/.travis.yml +20 -0
  1041. package/node_modules/reinterval/LICENSE +22 -0
  1042. package/node_modules/reinterval/README.md +60 -0
  1043. package/node_modules/reinterval/index.js +57 -0
  1044. package/node_modules/reinterval/package.json +32 -0
  1045. package/node_modules/reinterval/tests/test.js +52 -0
  1046. package/node_modules/rfdc/.github/workflows/ci.yml +21 -0
  1047. package/node_modules/rfdc/LICENSE +15 -0
  1048. package/node_modules/rfdc/default.js +3 -0
  1049. package/node_modules/rfdc/index.d.ts +13 -0
  1050. package/node_modules/rfdc/index.js +198 -0
  1051. package/node_modules/rfdc/index.test-d.ts +13 -0
  1052. package/node_modules/rfdc/package.json +73 -0
  1053. package/node_modules/rfdc/readme.md +181 -0
  1054. package/node_modules/rfdc/test/index.js +306 -0
  1055. package/node_modules/safe-buffer/LICENSE +21 -0
  1056. package/node_modules/safe-buffer/README.md +584 -0
  1057. package/node_modules/safe-buffer/index.d.ts +187 -0
  1058. package/node_modules/safe-buffer/index.js +62 -0
  1059. package/node_modules/safe-buffer/package.json +37 -0
  1060. package/node_modules/split2/LICENSE +13 -0
  1061. package/node_modules/split2/README.md +85 -0
  1062. package/node_modules/split2/bench.js +27 -0
  1063. package/node_modules/split2/index.js +141 -0
  1064. package/node_modules/split2/package.json +39 -0
  1065. package/node_modules/split2/test.js +409 -0
  1066. package/node_modules/string_decoder/LICENSE +48 -0
  1067. package/node_modules/string_decoder/README.md +47 -0
  1068. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  1069. package/node_modules/string_decoder/node_modules/safe-buffer/LICENSE +21 -0
  1070. package/node_modules/string_decoder/node_modules/safe-buffer/README.md +584 -0
  1071. package/node_modules/string_decoder/node_modules/safe-buffer/index.d.ts +187 -0
  1072. package/node_modules/string_decoder/node_modules/safe-buffer/index.js +65 -0
  1073. package/node_modules/string_decoder/node_modules/safe-buffer/package.json +51 -0
  1074. package/node_modules/string_decoder/package.json +34 -0
  1075. package/node_modules/tslib/CopyrightNotice.txt +15 -0
  1076. package/node_modules/tslib/LICENSE.txt +12 -0
  1077. package/node_modules/tslib/README.md +164 -0
  1078. package/node_modules/tslib/SECURITY.md +41 -0
  1079. package/node_modules/tslib/modules/index.d.ts +37 -0
  1080. package/node_modules/tslib/modules/index.js +68 -0
  1081. package/node_modules/tslib/modules/package.json +3 -0
  1082. package/node_modules/tslib/package.json +47 -0
  1083. package/node_modules/tslib/tslib.d.ts +453 -0
  1084. package/node_modules/tslib/tslib.es6.html +1 -0
  1085. package/node_modules/tslib/tslib.es6.js +379 -0
  1086. package/node_modules/tslib/tslib.es6.mjs +378 -0
  1087. package/node_modules/tslib/tslib.html +1 -0
  1088. package/node_modules/tslib/tslib.js +429 -0
  1089. package/node_modules/typedarray/.travis.yml +4 -0
  1090. package/node_modules/typedarray/LICENSE +35 -0
  1091. package/node_modules/typedarray/example/tarray.js +4 -0
  1092. package/node_modules/typedarray/index.js +630 -0
  1093. package/node_modules/typedarray/package.json +55 -0
  1094. package/node_modules/typedarray/readme.markdown +61 -0
  1095. package/node_modules/typedarray/test/server/undef_globals.js +19 -0
  1096. package/node_modules/typedarray/test/tarray.js +10 -0
  1097. package/node_modules/undici-types/LICENSE +21 -0
  1098. package/node_modules/undici-types/README.md +6 -0
  1099. package/node_modules/undici-types/agent.d.ts +31 -0
  1100. package/node_modules/undici-types/api.d.ts +43 -0
  1101. package/node_modules/undici-types/balanced-pool.d.ts +29 -0
  1102. package/node_modules/undici-types/cache.d.ts +36 -0
  1103. package/node_modules/undici-types/client.d.ts +108 -0
  1104. package/node_modules/undici-types/connector.d.ts +34 -0
  1105. package/node_modules/undici-types/content-type.d.ts +21 -0
  1106. package/node_modules/undici-types/cookies.d.ts +28 -0
  1107. package/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  1108. package/node_modules/undici-types/dispatcher.d.ts +255 -0
  1109. package/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  1110. package/node_modules/undici-types/errors.d.ts +149 -0
  1111. package/node_modules/undici-types/eventsource.d.ts +63 -0
  1112. package/node_modules/undici-types/fetch.d.ts +209 -0
  1113. package/node_modules/undici-types/file.d.ts +39 -0
  1114. package/node_modules/undici-types/filereader.d.ts +54 -0
  1115. package/node_modules/undici-types/formdata.d.ts +108 -0
  1116. package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  1117. package/node_modules/undici-types/global-origin.d.ts +7 -0
  1118. package/node_modules/undici-types/handlers.d.ts +15 -0
  1119. package/node_modules/undici-types/header.d.ts +4 -0
  1120. package/node_modules/undici-types/index.d.ts +71 -0
  1121. package/node_modules/undici-types/interceptors.d.ts +15 -0
  1122. package/node_modules/undici-types/mock-agent.d.ts +50 -0
  1123. package/node_modules/undici-types/mock-client.d.ts +25 -0
  1124. package/node_modules/undici-types/mock-errors.d.ts +12 -0
  1125. package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  1126. package/node_modules/undici-types/mock-pool.d.ts +25 -0
  1127. package/node_modules/undici-types/package.json +55 -0
  1128. package/node_modules/undici-types/patch.d.ts +71 -0
  1129. package/node_modules/undici-types/pool-stats.d.ts +19 -0
  1130. package/node_modules/undici-types/pool.d.ts +39 -0
  1131. package/node_modules/undici-types/proxy-agent.d.ts +28 -0
  1132. package/node_modules/undici-types/readable.d.ts +60 -0
  1133. package/node_modules/undici-types/retry-agent.d.ts +8 -0
  1134. package/node_modules/undici-types/retry-handler.d.ts +116 -0
  1135. package/node_modules/undici-types/util.d.ts +18 -0
  1136. package/node_modules/undici-types/webidl.d.ts +222 -0
  1137. package/node_modules/undici-types/websocket.d.ts +152 -0
  1138. package/node_modules/util-deprecate/History.md +16 -0
  1139. package/node_modules/util-deprecate/LICENSE +24 -0
  1140. package/node_modules/util-deprecate/README.md +53 -0
  1141. package/node_modules/util-deprecate/browser.js +67 -0
  1142. package/node_modules/util-deprecate/node.js +6 -0
  1143. package/node_modules/util-deprecate/package.json +27 -0
  1144. package/node_modules/worker-timers/LICENSE +21 -0
  1145. package/node_modules/worker-timers/README.md +79 -0
  1146. package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.d.ts +2 -0
  1147. package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.d.ts.map +1 -0
  1148. package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.js +15 -0
  1149. package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.js.map +1 -0
  1150. package/node_modules/worker-timers/build/es2019/module.d.ts +6 -0
  1151. package/node_modules/worker-timers/build/es2019/module.d.ts.map +1 -0
  1152. package/node_modules/worker-timers/build/es2019/module.js +9 -0
  1153. package/node_modules/worker-timers/build/es2019/module.js.map +1 -0
  1154. package/node_modules/worker-timers/build/es2019/worker/worker.d.ts +2 -0
  1155. package/node_modules/worker-timers/build/es2019/worker/worker.d.ts.map +1 -0
  1156. package/node_modules/worker-timers/build/es2019/worker/worker.js +3 -0
  1157. package/node_modules/worker-timers/build/es2019/worker/worker.js.map +1 -0
  1158. package/node_modules/worker-timers/build/es5/bundle.js +50 -0
  1159. package/node_modules/worker-timers/package.json +106 -0
  1160. package/node_modules/worker-timers/src/factories/load-or-return-broker.ts +19 -0
  1161. package/node_modules/worker-timers/src/module.ts +13 -0
  1162. package/node_modules/worker-timers/src/tsconfig.json +6 -0
  1163. package/node_modules/worker-timers/src/worker/worker.ts +2 -0
  1164. package/node_modules/worker-timers-broker/LICENSE +21 -0
  1165. package/node_modules/worker-timers-broker/README.md +5 -0
  1166. package/node_modules/worker-timers-broker/build/es2019/guards/call-notification.d.ts +3 -0
  1167. package/node_modules/worker-timers-broker/build/es2019/guards/call-notification.d.ts.map +1 -0
  1168. package/node_modules/worker-timers-broker/build/es2019/guards/call-notification.js +4 -0
  1169. package/node_modules/worker-timers-broker/build/es2019/guards/call-notification.js.map +1 -0
  1170. package/node_modules/worker-timers-broker/build/es2019/guards/clear-response.d.ts +3 -0
  1171. package/node_modules/worker-timers-broker/build/es2019/guards/clear-response.d.ts.map +1 -0
  1172. package/node_modules/worker-timers-broker/build/es2019/guards/clear-response.js +4 -0
  1173. package/node_modules/worker-timers-broker/build/es2019/guards/clear-response.js.map +1 -0
  1174. package/node_modules/worker-timers-broker/build/es2019/module.d.ts +7 -0
  1175. package/node_modules/worker-timers-broker/build/es2019/module.d.ts.map +1 -0
  1176. package/node_modules/worker-timers-broker/build/es2019/module.js +142 -0
  1177. package/node_modules/worker-timers-broker/build/es2019/module.js.map +1 -0
  1178. package/node_modules/worker-timers-broker/build/es5/bundle.js +162 -0
  1179. package/node_modules/worker-timers-broker/package.json +84 -0
  1180. package/node_modules/worker-timers-broker/src/guards/call-notification.ts +5 -0
  1181. package/node_modules/worker-timers-broker/src/guards/clear-response.ts +5 -0
  1182. package/node_modules/worker-timers-broker/src/module.ts +173 -0
  1183. package/node_modules/worker-timers-broker/src/tsconfig.json +6 -0
  1184. package/node_modules/worker-timers-worker/LICENSE +21 -0
  1185. package/node_modules/worker-timers-worker/README.md +5 -0
  1186. package/node_modules/worker-timers-worker/build/es2019/helpers/timer.d.ts +5 -0
  1187. package/node_modules/worker-timers-worker/build/es2019/helpers/timer.d.ts.map +1 -0
  1188. package/node_modules/worker-timers-worker/build/es2019/helpers/timer.js +50 -0
  1189. package/node_modules/worker-timers-worker/build/es2019/helpers/timer.js.map +1 -0
  1190. package/node_modules/worker-timers-worker/build/es2019/interfaces/broker-event.d.ts +5 -0
  1191. package/node_modules/worker-timers-worker/build/es2019/interfaces/broker-event.d.ts.map +1 -0
  1192. package/node_modules/worker-timers-worker/build/es2019/interfaces/broker-event.js +2 -0
  1193. package/node_modules/worker-timers-worker/build/es2019/interfaces/broker-event.js.map +1 -0
  1194. package/node_modules/worker-timers-worker/build/es2019/interfaces/call-notification.d.ts +10 -0
  1195. package/node_modules/worker-timers-worker/build/es2019/interfaces/call-notification.d.ts.map +1 -0
  1196. package/node_modules/worker-timers-worker/build/es2019/interfaces/call-notification.js +2 -0
  1197. package/node_modules/worker-timers-worker/build/es2019/interfaces/call-notification.js.map +1 -0
  1198. package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-request.d.ts +10 -0
  1199. package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-request.d.ts.map +1 -0
  1200. package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-request.js +2 -0
  1201. package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-request.js.map +1 -0
  1202. package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-response.d.ts +5 -0
  1203. package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-response.d.ts.map +1 -0
  1204. package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-response.js +2 -0
  1205. package/node_modules/worker-timers-worker/build/es2019/interfaces/clear-response.js.map +1 -0
  1206. package/node_modules/worker-timers-worker/build/es2019/interfaces/error-notification.d.ts +8 -0
  1207. package/node_modules/worker-timers-worker/build/es2019/interfaces/error-notification.d.ts.map +1 -0
  1208. package/node_modules/worker-timers-worker/build/es2019/interfaces/error-notification.js +2 -0
  1209. package/node_modules/worker-timers-worker/build/es2019/interfaces/error-notification.js.map +1 -0
  1210. package/node_modules/worker-timers-worker/build/es2019/interfaces/error-response.d.ts +8 -0
  1211. package/node_modules/worker-timers-worker/build/es2019/interfaces/error-response.d.ts.map +1 -0
  1212. package/node_modules/worker-timers-worker/build/es2019/interfaces/error-response.js +2 -0
  1213. package/node_modules/worker-timers-worker/build/es2019/interfaces/error-response.js.map +1 -0
  1214. package/node_modules/worker-timers-worker/build/es2019/interfaces/index.d.ts +9 -0
  1215. package/node_modules/worker-timers-worker/build/es2019/interfaces/index.d.ts.map +1 -0
  1216. package/node_modules/worker-timers-worker/build/es2019/interfaces/index.js +9 -0
  1217. package/node_modules/worker-timers-worker/build/es2019/interfaces/index.js.map +1 -0
  1218. package/node_modules/worker-timers-worker/build/es2019/interfaces/set-notification.d.ts +12 -0
  1219. package/node_modules/worker-timers-worker/build/es2019/interfaces/set-notification.d.ts.map +1 -0
  1220. package/node_modules/worker-timers-worker/build/es2019/interfaces/set-notification.js +2 -0
  1221. package/node_modules/worker-timers-worker/build/es2019/interfaces/set-notification.js.map +1 -0
  1222. package/node_modules/worker-timers-worker/build/es2019/interfaces/worker-event.d.ts +5 -0
  1223. package/node_modules/worker-timers-worker/build/es2019/interfaces/worker-event.d.ts.map +1 -0
  1224. package/node_modules/worker-timers-worker/build/es2019/interfaces/worker-event.js +2 -0
  1225. package/node_modules/worker-timers-worker/build/es2019/interfaces/worker-event.js.map +1 -0
  1226. package/node_modules/worker-timers-worker/build/es2019/module.d.ts +3 -0
  1227. package/node_modules/worker-timers-worker/build/es2019/module.d.ts.map +1 -0
  1228. package/node_modules/worker-timers-worker/build/es2019/module.js +50 -0
  1229. package/node_modules/worker-timers-worker/build/es2019/module.js.map +1 -0
  1230. package/node_modules/worker-timers-worker/build/es2019/types/broker-message.d.ts +3 -0
  1231. package/node_modules/worker-timers-worker/build/es2019/types/broker-message.d.ts.map +1 -0
  1232. package/node_modules/worker-timers-worker/build/es2019/types/broker-message.js +2 -0
  1233. package/node_modules/worker-timers-worker/build/es2019/types/broker-message.js.map +1 -0
  1234. package/node_modules/worker-timers-worker/build/es2019/types/index.d.ts +4 -0
  1235. package/node_modules/worker-timers-worker/build/es2019/types/index.d.ts.map +1 -0
  1236. package/node_modules/worker-timers-worker/build/es2019/types/index.js +4 -0
  1237. package/node_modules/worker-timers-worker/build/es2019/types/index.js.map +1 -0
  1238. package/node_modules/worker-timers-worker/build/es2019/types/timer-type.d.ts +2 -0
  1239. package/node_modules/worker-timers-worker/build/es2019/types/timer-type.d.ts.map +1 -0
  1240. package/node_modules/worker-timers-worker/build/es2019/types/timer-type.js +2 -0
  1241. package/node_modules/worker-timers-worker/build/es2019/types/timer-type.js.map +1 -0
  1242. package/node_modules/worker-timers-worker/build/es2019/types/worker-message.d.ts +3 -0
  1243. package/node_modules/worker-timers-worker/build/es2019/types/worker-message.d.ts.map +1 -0
  1244. package/node_modules/worker-timers-worker/build/es2019/types/worker-message.js +2 -0
  1245. package/node_modules/worker-timers-worker/build/es2019/types/worker-message.js.map +1 -0
  1246. package/node_modules/worker-timers-worker/build/es5/bundle.js +117 -0
  1247. package/node_modules/worker-timers-worker/package.json +91 -0
  1248. package/node_modules/worker-timers-worker/src/helpers/timer.ts +68 -0
  1249. package/node_modules/worker-timers-worker/src/interfaces/broker-event.ts +5 -0
  1250. package/node_modules/worker-timers-worker/src/interfaces/call-notification.ts +13 -0
  1251. package/node_modules/worker-timers-worker/src/interfaces/clear-request.ts +13 -0
  1252. package/node_modules/worker-timers-worker/src/interfaces/clear-response.ts +5 -0
  1253. package/node_modules/worker-timers-worker/src/interfaces/error-notification.ts +9 -0
  1254. package/node_modules/worker-timers-worker/src/interfaces/error-response.ts +9 -0
  1255. package/node_modules/worker-timers-worker/src/interfaces/index.ts +8 -0
  1256. package/node_modules/worker-timers-worker/src/interfaces/set-notification.ts +17 -0
  1257. package/node_modules/worker-timers-worker/src/interfaces/worker-event.ts +5 -0
  1258. package/node_modules/worker-timers-worker/src/module.ts +54 -0
  1259. package/node_modules/worker-timers-worker/src/tsconfig.json +6 -0
  1260. package/node_modules/worker-timers-worker/src/types/broker-message.ts +3 -0
  1261. package/node_modules/worker-timers-worker/src/types/index.ts +3 -0
  1262. package/node_modules/worker-timers-worker/src/types/timer-type.ts +1 -0
  1263. package/node_modules/worker-timers-worker/src/types/worker-message.ts +3 -0
  1264. package/node_modules/ws/LICENSE +20 -0
  1265. package/node_modules/ws/README.md +548 -0
  1266. package/node_modules/ws/browser.js +8 -0
  1267. package/node_modules/ws/index.js +13 -0
  1268. package/node_modules/ws/lib/buffer-util.js +131 -0
  1269. package/node_modules/ws/lib/constants.js +18 -0
  1270. package/node_modules/ws/lib/event-target.js +292 -0
  1271. package/node_modules/ws/lib/extension.js +203 -0
  1272. package/node_modules/ws/lib/limiter.js +55 -0
  1273. package/node_modules/ws/lib/permessage-deflate.js +514 -0
  1274. package/node_modules/ws/lib/receiver.js +706 -0
  1275. package/node_modules/ws/lib/sender.js +602 -0
  1276. package/node_modules/ws/lib/stream.js +159 -0
  1277. package/node_modules/ws/lib/subprotocol.js +62 -0
  1278. package/node_modules/ws/lib/validation.js +152 -0
  1279. package/node_modules/ws/lib/websocket-server.js +540 -0
  1280. package/node_modules/ws/lib/websocket.js +1388 -0
  1281. package/node_modules/ws/package.json +69 -0
  1282. package/node_modules/ws/wrapper.mjs +8 -0
  1283. package/package.json +51 -0
@@ -0,0 +1,1542 @@
1
+ /**
2
+ * @module LRUCache
3
+ */
4
+ const perf = typeof performance === 'object' &&
5
+ performance &&
6
+ typeof performance.now === 'function'
7
+ ? performance
8
+ : Date;
9
+ const warned = new Set();
10
+ /* c8 ignore start */
11
+ const PROCESS = (typeof process === 'object' && !!process ? process : {});
12
+ /* c8 ignore start */
13
+ const emitWarning = (msg, type, code, fn) => {
14
+ typeof PROCESS.emitWarning === 'function'
15
+ ? PROCESS.emitWarning(msg, type, code, fn)
16
+ : console.error(`[${code}] ${type}: ${msg}`);
17
+ };
18
+ let AC = globalThis.AbortController;
19
+ let AS = globalThis.AbortSignal;
20
+ /* c8 ignore start */
21
+ if (typeof AC === 'undefined') {
22
+ //@ts-ignore
23
+ AS = class AbortSignal {
24
+ onabort;
25
+ _onabort = [];
26
+ reason;
27
+ aborted = false;
28
+ addEventListener(_, fn) {
29
+ this._onabort.push(fn);
30
+ }
31
+ };
32
+ //@ts-ignore
33
+ AC = class AbortController {
34
+ constructor() {
35
+ warnACPolyfill();
36
+ }
37
+ signal = new AS();
38
+ abort(reason) {
39
+ if (this.signal.aborted)
40
+ return;
41
+ //@ts-ignore
42
+ this.signal.reason = reason;
43
+ //@ts-ignore
44
+ this.signal.aborted = true;
45
+ //@ts-ignore
46
+ for (const fn of this.signal._onabort) {
47
+ fn(reason);
48
+ }
49
+ this.signal.onabort?.(reason);
50
+ }
51
+ };
52
+ let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1';
53
+ const warnACPolyfill = () => {
54
+ if (!printACPolyfillWarning)
55
+ return;
56
+ printACPolyfillWarning = false;
57
+ emitWarning('AbortController is not defined. If using lru-cache in ' +
58
+ 'node 14, load an AbortController polyfill from the ' +
59
+ '`node-abort-controller` package. A minimal polyfill is ' +
60
+ 'provided for use by LRUCache.fetch(), but it should not be ' +
61
+ 'relied upon in other contexts (eg, passing it to other APIs that ' +
62
+ 'use AbortController/AbortSignal might have undesirable effects). ' +
63
+ 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill);
64
+ };
65
+ }
66
+ /* c8 ignore stop */
67
+ const shouldWarn = (code) => !warned.has(code);
68
+ const TYPE = Symbol('type');
69
+ const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
70
+ /* c8 ignore start */
71
+ // This is a little bit ridiculous, tbh.
72
+ // The maximum array length is 2^32-1 or thereabouts on most JS impls.
73
+ // And well before that point, you're caching the entire world, I mean,
74
+ // that's ~32GB of just integers for the next/prev links, plus whatever
75
+ // else to hold that many keys and values. Just filling the memory with
76
+ // zeroes at init time is brutal when you get that big.
77
+ // But why not be complete?
78
+ // Maybe in the future, these limits will have expanded.
79
+ const getUintArray = (max) => !isPosInt(max)
80
+ ? null
81
+ : max <= Math.pow(2, 8)
82
+ ? Uint8Array
83
+ : max <= Math.pow(2, 16)
84
+ ? Uint16Array
85
+ : max <= Math.pow(2, 32)
86
+ ? Uint32Array
87
+ : max <= Number.MAX_SAFE_INTEGER
88
+ ? ZeroArray
89
+ : null;
90
+ /* c8 ignore stop */
91
+ class ZeroArray extends Array {
92
+ constructor(size) {
93
+ super(size);
94
+ this.fill(0);
95
+ }
96
+ }
97
+ class Stack {
98
+ heap;
99
+ length;
100
+ // private constructor
101
+ static #constructing = false;
102
+ static create(max) {
103
+ const HeapCls = getUintArray(max);
104
+ if (!HeapCls)
105
+ return [];
106
+ Stack.#constructing = true;
107
+ const s = new Stack(max, HeapCls);
108
+ Stack.#constructing = false;
109
+ return s;
110
+ }
111
+ constructor(max, HeapCls) {
112
+ /* c8 ignore start */
113
+ if (!Stack.#constructing) {
114
+ throw new TypeError('instantiate Stack using Stack.create(n)');
115
+ }
116
+ /* c8 ignore stop */
117
+ this.heap = new HeapCls(max);
118
+ this.length = 0;
119
+ }
120
+ push(n) {
121
+ this.heap[this.length++] = n;
122
+ }
123
+ pop() {
124
+ return this.heap[--this.length];
125
+ }
126
+ }
127
+ /**
128
+ * Default export, the thing you're using this module to get.
129
+ *
130
+ * The `K` and `V` types define the key and value types, respectively. The
131
+ * optional `FC` type defines the type of the `context` object passed to
132
+ * `cache.fetch()` and `cache.memo()`.
133
+ *
134
+ * Keys and values **must not** be `null` or `undefined`.
135
+ *
136
+ * All properties from the options object (with the exception of `max`,
137
+ * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are
138
+ * added as normal public members. (The listed options are read-only getters.)
139
+ *
140
+ * Changing any of these will alter the defaults for subsequent method calls.
141
+ */
142
+ export class LRUCache {
143
+ // options that cannot be changed without disaster
144
+ #max;
145
+ #maxSize;
146
+ #dispose;
147
+ #disposeAfter;
148
+ #fetchMethod;
149
+ #memoMethod;
150
+ /**
151
+ * {@link LRUCache.OptionsBase.ttl}
152
+ */
153
+ ttl;
154
+ /**
155
+ * {@link LRUCache.OptionsBase.ttlResolution}
156
+ */
157
+ ttlResolution;
158
+ /**
159
+ * {@link LRUCache.OptionsBase.ttlAutopurge}
160
+ */
161
+ ttlAutopurge;
162
+ /**
163
+ * {@link LRUCache.OptionsBase.updateAgeOnGet}
164
+ */
165
+ updateAgeOnGet;
166
+ /**
167
+ * {@link LRUCache.OptionsBase.updateAgeOnHas}
168
+ */
169
+ updateAgeOnHas;
170
+ /**
171
+ * {@link LRUCache.OptionsBase.allowStale}
172
+ */
173
+ allowStale;
174
+ /**
175
+ * {@link LRUCache.OptionsBase.noDisposeOnSet}
176
+ */
177
+ noDisposeOnSet;
178
+ /**
179
+ * {@link LRUCache.OptionsBase.noUpdateTTL}
180
+ */
181
+ noUpdateTTL;
182
+ /**
183
+ * {@link LRUCache.OptionsBase.maxEntrySize}
184
+ */
185
+ maxEntrySize;
186
+ /**
187
+ * {@link LRUCache.OptionsBase.sizeCalculation}
188
+ */
189
+ sizeCalculation;
190
+ /**
191
+ * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
192
+ */
193
+ noDeleteOnFetchRejection;
194
+ /**
195
+ * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
196
+ */
197
+ noDeleteOnStaleGet;
198
+ /**
199
+ * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
200
+ */
201
+ allowStaleOnFetchAbort;
202
+ /**
203
+ * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
204
+ */
205
+ allowStaleOnFetchRejection;
206
+ /**
207
+ * {@link LRUCache.OptionsBase.ignoreFetchAbort}
208
+ */
209
+ ignoreFetchAbort;
210
+ // computed properties
211
+ #size;
212
+ #calculatedSize;
213
+ #keyMap;
214
+ #keyList;
215
+ #valList;
216
+ #next;
217
+ #prev;
218
+ #head;
219
+ #tail;
220
+ #free;
221
+ #disposed;
222
+ #sizes;
223
+ #starts;
224
+ #ttls;
225
+ #hasDispose;
226
+ #hasFetchMethod;
227
+ #hasDisposeAfter;
228
+ /**
229
+ * Do not call this method unless you need to inspect the
230
+ * inner workings of the cache. If anything returned by this
231
+ * object is modified in any way, strange breakage may occur.
232
+ *
233
+ * These fields are private for a reason!
234
+ *
235
+ * @internal
236
+ */
237
+ static unsafeExposeInternals(c) {
238
+ return {
239
+ // properties
240
+ starts: c.#starts,
241
+ ttls: c.#ttls,
242
+ sizes: c.#sizes,
243
+ keyMap: c.#keyMap,
244
+ keyList: c.#keyList,
245
+ valList: c.#valList,
246
+ next: c.#next,
247
+ prev: c.#prev,
248
+ get head() {
249
+ return c.#head;
250
+ },
251
+ get tail() {
252
+ return c.#tail;
253
+ },
254
+ free: c.#free,
255
+ // methods
256
+ isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
257
+ backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
258
+ moveToTail: (index) => c.#moveToTail(index),
259
+ indexes: (options) => c.#indexes(options),
260
+ rindexes: (options) => c.#rindexes(options),
261
+ isStale: (index) => c.#isStale(index),
262
+ };
263
+ }
264
+ // Protected read-only members
265
+ /**
266
+ * {@link LRUCache.OptionsBase.max} (read-only)
267
+ */
268
+ get max() {
269
+ return this.#max;
270
+ }
271
+ /**
272
+ * {@link LRUCache.OptionsBase.maxSize} (read-only)
273
+ */
274
+ get maxSize() {
275
+ return this.#maxSize;
276
+ }
277
+ /**
278
+ * The total computed size of items in the cache (read-only)
279
+ */
280
+ get calculatedSize() {
281
+ return this.#calculatedSize;
282
+ }
283
+ /**
284
+ * The number of items stored in the cache (read-only)
285
+ */
286
+ get size() {
287
+ return this.#size;
288
+ }
289
+ /**
290
+ * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
291
+ */
292
+ get fetchMethod() {
293
+ return this.#fetchMethod;
294
+ }
295
+ get memoMethod() {
296
+ return this.#memoMethod;
297
+ }
298
+ /**
299
+ * {@link LRUCache.OptionsBase.dispose} (read-only)
300
+ */
301
+ get dispose() {
302
+ return this.#dispose;
303
+ }
304
+ /**
305
+ * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
306
+ */
307
+ get disposeAfter() {
308
+ return this.#disposeAfter;
309
+ }
310
+ constructor(options) {
311
+ const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options;
312
+ if (max !== 0 && !isPosInt(max)) {
313
+ throw new TypeError('max option must be a nonnegative integer');
314
+ }
315
+ const UintArray = max ? getUintArray(max) : Array;
316
+ if (!UintArray) {
317
+ throw new Error('invalid max value: ' + max);
318
+ }
319
+ this.#max = max;
320
+ this.#maxSize = maxSize;
321
+ this.maxEntrySize = maxEntrySize || this.#maxSize;
322
+ this.sizeCalculation = sizeCalculation;
323
+ if (this.sizeCalculation) {
324
+ if (!this.#maxSize && !this.maxEntrySize) {
325
+ throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize');
326
+ }
327
+ if (typeof this.sizeCalculation !== 'function') {
328
+ throw new TypeError('sizeCalculation set to non-function');
329
+ }
330
+ }
331
+ if (memoMethod !== undefined &&
332
+ typeof memoMethod !== 'function') {
333
+ throw new TypeError('memoMethod must be a function if defined');
334
+ }
335
+ this.#memoMethod = memoMethod;
336
+ if (fetchMethod !== undefined &&
337
+ typeof fetchMethod !== 'function') {
338
+ throw new TypeError('fetchMethod must be a function if specified');
339
+ }
340
+ this.#fetchMethod = fetchMethod;
341
+ this.#hasFetchMethod = !!fetchMethod;
342
+ this.#keyMap = new Map();
343
+ this.#keyList = new Array(max).fill(undefined);
344
+ this.#valList = new Array(max).fill(undefined);
345
+ this.#next = new UintArray(max);
346
+ this.#prev = new UintArray(max);
347
+ this.#head = 0;
348
+ this.#tail = 0;
349
+ this.#free = Stack.create(max);
350
+ this.#size = 0;
351
+ this.#calculatedSize = 0;
352
+ if (typeof dispose === 'function') {
353
+ this.#dispose = dispose;
354
+ }
355
+ if (typeof disposeAfter === 'function') {
356
+ this.#disposeAfter = disposeAfter;
357
+ this.#disposed = [];
358
+ }
359
+ else {
360
+ this.#disposeAfter = undefined;
361
+ this.#disposed = undefined;
362
+ }
363
+ this.#hasDispose = !!this.#dispose;
364
+ this.#hasDisposeAfter = !!this.#disposeAfter;
365
+ this.noDisposeOnSet = !!noDisposeOnSet;
366
+ this.noUpdateTTL = !!noUpdateTTL;
367
+ this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
368
+ this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
369
+ this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
370
+ this.ignoreFetchAbort = !!ignoreFetchAbort;
371
+ // NB: maxEntrySize is set to maxSize if it's set
372
+ if (this.maxEntrySize !== 0) {
373
+ if (this.#maxSize !== 0) {
374
+ if (!isPosInt(this.#maxSize)) {
375
+ throw new TypeError('maxSize must be a positive integer if specified');
376
+ }
377
+ }
378
+ if (!isPosInt(this.maxEntrySize)) {
379
+ throw new TypeError('maxEntrySize must be a positive integer if specified');
380
+ }
381
+ this.#initializeSizeTracking();
382
+ }
383
+ this.allowStale = !!allowStale;
384
+ this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
385
+ this.updateAgeOnGet = !!updateAgeOnGet;
386
+ this.updateAgeOnHas = !!updateAgeOnHas;
387
+ this.ttlResolution =
388
+ isPosInt(ttlResolution) || ttlResolution === 0
389
+ ? ttlResolution
390
+ : 1;
391
+ this.ttlAutopurge = !!ttlAutopurge;
392
+ this.ttl = ttl || 0;
393
+ if (this.ttl) {
394
+ if (!isPosInt(this.ttl)) {
395
+ throw new TypeError('ttl must be a positive integer if specified');
396
+ }
397
+ this.#initializeTTLTracking();
398
+ }
399
+ // do not allow completely unbounded caches
400
+ if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
401
+ throw new TypeError('At least one of max, maxSize, or ttl is required');
402
+ }
403
+ if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
404
+ const code = 'LRU_CACHE_UNBOUNDED';
405
+ if (shouldWarn(code)) {
406
+ warned.add(code);
407
+ const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' +
408
+ 'result in unbounded memory consumption.';
409
+ emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache);
410
+ }
411
+ }
412
+ }
413
+ /**
414
+ * Return the number of ms left in the item's TTL. If item is not in cache,
415
+ * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
416
+ */
417
+ getRemainingTTL(key) {
418
+ return this.#keyMap.has(key) ? Infinity : 0;
419
+ }
420
+ #initializeTTLTracking() {
421
+ const ttls = new ZeroArray(this.#max);
422
+ const starts = new ZeroArray(this.#max);
423
+ this.#ttls = ttls;
424
+ this.#starts = starts;
425
+ this.#setItemTTL = (index, ttl, start = perf.now()) => {
426
+ starts[index] = ttl !== 0 ? start : 0;
427
+ ttls[index] = ttl;
428
+ if (ttl !== 0 && this.ttlAutopurge) {
429
+ const t = setTimeout(() => {
430
+ if (this.#isStale(index)) {
431
+ this.#delete(this.#keyList[index], 'expire');
432
+ }
433
+ }, ttl + 1);
434
+ // unref() not supported on all platforms
435
+ /* c8 ignore start */
436
+ if (t.unref) {
437
+ t.unref();
438
+ }
439
+ /* c8 ignore stop */
440
+ }
441
+ };
442
+ this.#updateItemAge = index => {
443
+ starts[index] = ttls[index] !== 0 ? perf.now() : 0;
444
+ };
445
+ this.#statusTTL = (status, index) => {
446
+ if (ttls[index]) {
447
+ const ttl = ttls[index];
448
+ const start = starts[index];
449
+ /* c8 ignore next */
450
+ if (!ttl || !start)
451
+ return;
452
+ status.ttl = ttl;
453
+ status.start = start;
454
+ status.now = cachedNow || getNow();
455
+ const age = status.now - start;
456
+ status.remainingTTL = ttl - age;
457
+ }
458
+ };
459
+ // debounce calls to perf.now() to 1s so we're not hitting
460
+ // that costly call repeatedly.
461
+ let cachedNow = 0;
462
+ const getNow = () => {
463
+ const n = perf.now();
464
+ if (this.ttlResolution > 0) {
465
+ cachedNow = n;
466
+ const t = setTimeout(() => (cachedNow = 0), this.ttlResolution);
467
+ // not available on all platforms
468
+ /* c8 ignore start */
469
+ if (t.unref) {
470
+ t.unref();
471
+ }
472
+ /* c8 ignore stop */
473
+ }
474
+ return n;
475
+ };
476
+ this.getRemainingTTL = key => {
477
+ const index = this.#keyMap.get(key);
478
+ if (index === undefined) {
479
+ return 0;
480
+ }
481
+ const ttl = ttls[index];
482
+ const start = starts[index];
483
+ if (!ttl || !start) {
484
+ return Infinity;
485
+ }
486
+ const age = (cachedNow || getNow()) - start;
487
+ return ttl - age;
488
+ };
489
+ this.#isStale = index => {
490
+ const s = starts[index];
491
+ const t = ttls[index];
492
+ return !!t && !!s && (cachedNow || getNow()) - s > t;
493
+ };
494
+ }
495
+ // conditionally set private methods related to TTL
496
+ #updateItemAge = () => { };
497
+ #statusTTL = () => { };
498
+ #setItemTTL = () => { };
499
+ /* c8 ignore stop */
500
+ #isStale = () => false;
501
+ #initializeSizeTracking() {
502
+ const sizes = new ZeroArray(this.#max);
503
+ this.#calculatedSize = 0;
504
+ this.#sizes = sizes;
505
+ this.#removeItemSize = index => {
506
+ this.#calculatedSize -= sizes[index];
507
+ sizes[index] = 0;
508
+ };
509
+ this.#requireSize = (k, v, size, sizeCalculation) => {
510
+ // provisionally accept background fetches.
511
+ // actual value size will be checked when they return.
512
+ if (this.#isBackgroundFetch(v)) {
513
+ return 0;
514
+ }
515
+ if (!isPosInt(size)) {
516
+ if (sizeCalculation) {
517
+ if (typeof sizeCalculation !== 'function') {
518
+ throw new TypeError('sizeCalculation must be a function');
519
+ }
520
+ size = sizeCalculation(v, k);
521
+ if (!isPosInt(size)) {
522
+ throw new TypeError('sizeCalculation return invalid (expect positive integer)');
523
+ }
524
+ }
525
+ else {
526
+ throw new TypeError('invalid size value (must be positive integer). ' +
527
+ 'When maxSize or maxEntrySize is used, sizeCalculation ' +
528
+ 'or size must be set.');
529
+ }
530
+ }
531
+ return size;
532
+ };
533
+ this.#addItemSize = (index, size, status) => {
534
+ sizes[index] = size;
535
+ if (this.#maxSize) {
536
+ const maxSize = this.#maxSize - sizes[index];
537
+ while (this.#calculatedSize > maxSize) {
538
+ this.#evict(true);
539
+ }
540
+ }
541
+ this.#calculatedSize += sizes[index];
542
+ if (status) {
543
+ status.entrySize = size;
544
+ status.totalCalculatedSize = this.#calculatedSize;
545
+ }
546
+ };
547
+ }
548
+ #removeItemSize = _i => { };
549
+ #addItemSize = (_i, _s, _st) => { };
550
+ #requireSize = (_k, _v, size, sizeCalculation) => {
551
+ if (size || sizeCalculation) {
552
+ throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache');
553
+ }
554
+ return 0;
555
+ };
556
+ *#indexes({ allowStale = this.allowStale } = {}) {
557
+ if (this.#size) {
558
+ for (let i = this.#tail; true;) {
559
+ if (!this.#isValidIndex(i)) {
560
+ break;
561
+ }
562
+ if (allowStale || !this.#isStale(i)) {
563
+ yield i;
564
+ }
565
+ if (i === this.#head) {
566
+ break;
567
+ }
568
+ else {
569
+ i = this.#prev[i];
570
+ }
571
+ }
572
+ }
573
+ }
574
+ *#rindexes({ allowStale = this.allowStale } = {}) {
575
+ if (this.#size) {
576
+ for (let i = this.#head; true;) {
577
+ if (!this.#isValidIndex(i)) {
578
+ break;
579
+ }
580
+ if (allowStale || !this.#isStale(i)) {
581
+ yield i;
582
+ }
583
+ if (i === this.#tail) {
584
+ break;
585
+ }
586
+ else {
587
+ i = this.#next[i];
588
+ }
589
+ }
590
+ }
591
+ }
592
+ #isValidIndex(index) {
593
+ return (index !== undefined &&
594
+ this.#keyMap.get(this.#keyList[index]) === index);
595
+ }
596
+ /**
597
+ * Return a generator yielding `[key, value]` pairs,
598
+ * in order from most recently used to least recently used.
599
+ */
600
+ *entries() {
601
+ for (const i of this.#indexes()) {
602
+ if (this.#valList[i] !== undefined &&
603
+ this.#keyList[i] !== undefined &&
604
+ !this.#isBackgroundFetch(this.#valList[i])) {
605
+ yield [this.#keyList[i], this.#valList[i]];
606
+ }
607
+ }
608
+ }
609
+ /**
610
+ * Inverse order version of {@link LRUCache.entries}
611
+ *
612
+ * Return a generator yielding `[key, value]` pairs,
613
+ * in order from least recently used to most recently used.
614
+ */
615
+ *rentries() {
616
+ for (const i of this.#rindexes()) {
617
+ if (this.#valList[i] !== undefined &&
618
+ this.#keyList[i] !== undefined &&
619
+ !this.#isBackgroundFetch(this.#valList[i])) {
620
+ yield [this.#keyList[i], this.#valList[i]];
621
+ }
622
+ }
623
+ }
624
+ /**
625
+ * Return a generator yielding the keys in the cache,
626
+ * in order from most recently used to least recently used.
627
+ */
628
+ *keys() {
629
+ for (const i of this.#indexes()) {
630
+ const k = this.#keyList[i];
631
+ if (k !== undefined &&
632
+ !this.#isBackgroundFetch(this.#valList[i])) {
633
+ yield k;
634
+ }
635
+ }
636
+ }
637
+ /**
638
+ * Inverse order version of {@link LRUCache.keys}
639
+ *
640
+ * Return a generator yielding the keys in the cache,
641
+ * in order from least recently used to most recently used.
642
+ */
643
+ *rkeys() {
644
+ for (const i of this.#rindexes()) {
645
+ const k = this.#keyList[i];
646
+ if (k !== undefined &&
647
+ !this.#isBackgroundFetch(this.#valList[i])) {
648
+ yield k;
649
+ }
650
+ }
651
+ }
652
+ /**
653
+ * Return a generator yielding the values in the cache,
654
+ * in order from most recently used to least recently used.
655
+ */
656
+ *values() {
657
+ for (const i of this.#indexes()) {
658
+ const v = this.#valList[i];
659
+ if (v !== undefined &&
660
+ !this.#isBackgroundFetch(this.#valList[i])) {
661
+ yield this.#valList[i];
662
+ }
663
+ }
664
+ }
665
+ /**
666
+ * Inverse order version of {@link LRUCache.values}
667
+ *
668
+ * Return a generator yielding the values in the cache,
669
+ * in order from least recently used to most recently used.
670
+ */
671
+ *rvalues() {
672
+ for (const i of this.#rindexes()) {
673
+ const v = this.#valList[i];
674
+ if (v !== undefined &&
675
+ !this.#isBackgroundFetch(this.#valList[i])) {
676
+ yield this.#valList[i];
677
+ }
678
+ }
679
+ }
680
+ /**
681
+ * Iterating over the cache itself yields the same results as
682
+ * {@link LRUCache.entries}
683
+ */
684
+ [Symbol.iterator]() {
685
+ return this.entries();
686
+ }
687
+ /**
688
+ * A String value that is used in the creation of the default string
689
+ * description of an object. Called by the built-in method
690
+ * `Object.prototype.toString`.
691
+ */
692
+ [Symbol.toStringTag] = 'LRUCache';
693
+ /**
694
+ * Find a value for which the supplied fn method returns a truthy value,
695
+ * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
696
+ */
697
+ find(fn, getOptions = {}) {
698
+ for (const i of this.#indexes()) {
699
+ const v = this.#valList[i];
700
+ const value = this.#isBackgroundFetch(v)
701
+ ? v.__staleWhileFetching
702
+ : v;
703
+ if (value === undefined)
704
+ continue;
705
+ if (fn(value, this.#keyList[i], this)) {
706
+ return this.get(this.#keyList[i], getOptions);
707
+ }
708
+ }
709
+ }
710
+ /**
711
+ * Call the supplied function on each item in the cache, in order from most
712
+ * recently used to least recently used.
713
+ *
714
+ * `fn` is called as `fn(value, key, cache)`.
715
+ *
716
+ * If `thisp` is provided, function will be called in the `this`-context of
717
+ * the provided object, or the cache if no `thisp` object is provided.
718
+ *
719
+ * Does not update age or recenty of use, or iterate over stale values.
720
+ */
721
+ forEach(fn, thisp = this) {
722
+ for (const i of this.#indexes()) {
723
+ const v = this.#valList[i];
724
+ const value = this.#isBackgroundFetch(v)
725
+ ? v.__staleWhileFetching
726
+ : v;
727
+ if (value === undefined)
728
+ continue;
729
+ fn.call(thisp, value, this.#keyList[i], this);
730
+ }
731
+ }
732
+ /**
733
+ * The same as {@link LRUCache.forEach} but items are iterated over in
734
+ * reverse order. (ie, less recently used items are iterated over first.)
735
+ */
736
+ rforEach(fn, thisp = this) {
737
+ for (const i of this.#rindexes()) {
738
+ const v = this.#valList[i];
739
+ const value = this.#isBackgroundFetch(v)
740
+ ? v.__staleWhileFetching
741
+ : v;
742
+ if (value === undefined)
743
+ continue;
744
+ fn.call(thisp, value, this.#keyList[i], this);
745
+ }
746
+ }
747
+ /**
748
+ * Delete any stale entries. Returns true if anything was removed,
749
+ * false otherwise.
750
+ */
751
+ purgeStale() {
752
+ let deleted = false;
753
+ for (const i of this.#rindexes({ allowStale: true })) {
754
+ if (this.#isStale(i)) {
755
+ this.#delete(this.#keyList[i], 'expire');
756
+ deleted = true;
757
+ }
758
+ }
759
+ return deleted;
760
+ }
761
+ /**
762
+ * Get the extended info about a given entry, to get its value, size, and
763
+ * TTL info simultaneously. Returns `undefined` if the key is not present.
764
+ *
765
+ * Unlike {@link LRUCache#dump}, which is designed to be portable and survive
766
+ * serialization, the `start` value is always the current timestamp, and the
767
+ * `ttl` is a calculated remaining time to live (negative if expired).
768
+ *
769
+ * Always returns stale values, if their info is found in the cache, so be
770
+ * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
771
+ * if relevant.
772
+ */
773
+ info(key) {
774
+ const i = this.#keyMap.get(key);
775
+ if (i === undefined)
776
+ return undefined;
777
+ const v = this.#valList[i];
778
+ const value = this.#isBackgroundFetch(v)
779
+ ? v.__staleWhileFetching
780
+ : v;
781
+ if (value === undefined)
782
+ return undefined;
783
+ const entry = { value };
784
+ if (this.#ttls && this.#starts) {
785
+ const ttl = this.#ttls[i];
786
+ const start = this.#starts[i];
787
+ if (ttl && start) {
788
+ const remain = ttl - (perf.now() - start);
789
+ entry.ttl = remain;
790
+ entry.start = Date.now();
791
+ }
792
+ }
793
+ if (this.#sizes) {
794
+ entry.size = this.#sizes[i];
795
+ }
796
+ return entry;
797
+ }
798
+ /**
799
+ * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
800
+ * passed to {@link LRLUCache#load}.
801
+ *
802
+ * The `start` fields are calculated relative to a portable `Date.now()`
803
+ * timestamp, even if `performance.now()` is available.
804
+ *
805
+ * Stale entries are always included in the `dump`, even if
806
+ * {@link LRUCache.OptionsBase.allowStale} is false.
807
+ *
808
+ * Note: this returns an actual array, not a generator, so it can be more
809
+ * easily passed around.
810
+ */
811
+ dump() {
812
+ const arr = [];
813
+ for (const i of this.#indexes({ allowStale: true })) {
814
+ const key = this.#keyList[i];
815
+ const v = this.#valList[i];
816
+ const value = this.#isBackgroundFetch(v)
817
+ ? v.__staleWhileFetching
818
+ : v;
819
+ if (value === undefined || key === undefined)
820
+ continue;
821
+ const entry = { value };
822
+ if (this.#ttls && this.#starts) {
823
+ entry.ttl = this.#ttls[i];
824
+ // always dump the start relative to a portable timestamp
825
+ // it's ok for this to be a bit slow, it's a rare operation.
826
+ const age = perf.now() - this.#starts[i];
827
+ entry.start = Math.floor(Date.now() - age);
828
+ }
829
+ if (this.#sizes) {
830
+ entry.size = this.#sizes[i];
831
+ }
832
+ arr.unshift([key, entry]);
833
+ }
834
+ return arr;
835
+ }
836
+ /**
837
+ * Reset the cache and load in the items in entries in the order listed.
838
+ *
839
+ * The shape of the resulting cache may be different if the same options are
840
+ * not used in both caches.
841
+ *
842
+ * The `start` fields are assumed to be calculated relative to a portable
843
+ * `Date.now()` timestamp, even if `performance.now()` is available.
844
+ */
845
+ load(arr) {
846
+ this.clear();
847
+ for (const [key, entry] of arr) {
848
+ if (entry.start) {
849
+ // entry.start is a portable timestamp, but we may be using
850
+ // node's performance.now(), so calculate the offset, so that
851
+ // we get the intended remaining TTL, no matter how long it's
852
+ // been on ice.
853
+ //
854
+ // it's ok for this to be a bit slow, it's a rare operation.
855
+ const age = Date.now() - entry.start;
856
+ entry.start = perf.now() - age;
857
+ }
858
+ this.set(key, entry.value, entry);
859
+ }
860
+ }
861
+ /**
862
+ * Add a value to the cache.
863
+ *
864
+ * Note: if `undefined` is specified as a value, this is an alias for
865
+ * {@link LRUCache#delete}
866
+ *
867
+ * Fields on the {@link LRUCache.SetOptions} options param will override
868
+ * their corresponding values in the constructor options for the scope
869
+ * of this single `set()` operation.
870
+ *
871
+ * If `start` is provided, then that will set the effective start
872
+ * time for the TTL calculation. Note that this must be a previous
873
+ * value of `performance.now()` if supported, or a previous value of
874
+ * `Date.now()` if not.
875
+ *
876
+ * Options object may also include `size`, which will prevent
877
+ * calling the `sizeCalculation` function and just use the specified
878
+ * number if it is a positive integer, and `noDisposeOnSet` which
879
+ * will prevent calling a `dispose` function in the case of
880
+ * overwrites.
881
+ *
882
+ * If the `size` (or return value of `sizeCalculation`) for a given
883
+ * entry is greater than `maxEntrySize`, then the item will not be
884
+ * added to the cache.
885
+ *
886
+ * Will update the recency of the entry.
887
+ *
888
+ * If the value is `undefined`, then this is an alias for
889
+ * `cache.delete(key)`. `undefined` is never stored in the cache.
890
+ */
891
+ set(k, v, setOptions = {}) {
892
+ if (v === undefined) {
893
+ this.delete(k);
894
+ return this;
895
+ }
896
+ const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions;
897
+ let { noUpdateTTL = this.noUpdateTTL } = setOptions;
898
+ const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
899
+ // if the item doesn't fit, don't do anything
900
+ // NB: maxEntrySize set to maxSize by default
901
+ if (this.maxEntrySize && size > this.maxEntrySize) {
902
+ if (status) {
903
+ status.set = 'miss';
904
+ status.maxEntrySizeExceeded = true;
905
+ }
906
+ // have to delete, in case something is there already.
907
+ this.#delete(k, 'set');
908
+ return this;
909
+ }
910
+ let index = this.#size === 0 ? undefined : this.#keyMap.get(k);
911
+ if (index === undefined) {
912
+ // addition
913
+ index = (this.#size === 0
914
+ ? this.#tail
915
+ : this.#free.length !== 0
916
+ ? this.#free.pop()
917
+ : this.#size === this.#max
918
+ ? this.#evict(false)
919
+ : this.#size);
920
+ this.#keyList[index] = k;
921
+ this.#valList[index] = v;
922
+ this.#keyMap.set(k, index);
923
+ this.#next[this.#tail] = index;
924
+ this.#prev[index] = this.#tail;
925
+ this.#tail = index;
926
+ this.#size++;
927
+ this.#addItemSize(index, size, status);
928
+ if (status)
929
+ status.set = 'add';
930
+ noUpdateTTL = false;
931
+ }
932
+ else {
933
+ // update
934
+ this.#moveToTail(index);
935
+ const oldVal = this.#valList[index];
936
+ if (v !== oldVal) {
937
+ if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
938
+ oldVal.__abortController.abort(new Error('replaced'));
939
+ const { __staleWhileFetching: s } = oldVal;
940
+ if (s !== undefined && !noDisposeOnSet) {
941
+ if (this.#hasDispose) {
942
+ this.#dispose?.(s, k, 'set');
943
+ }
944
+ if (this.#hasDisposeAfter) {
945
+ this.#disposed?.push([s, k, 'set']);
946
+ }
947
+ }
948
+ }
949
+ else if (!noDisposeOnSet) {
950
+ if (this.#hasDispose) {
951
+ this.#dispose?.(oldVal, k, 'set');
952
+ }
953
+ if (this.#hasDisposeAfter) {
954
+ this.#disposed?.push([oldVal, k, 'set']);
955
+ }
956
+ }
957
+ this.#removeItemSize(index);
958
+ this.#addItemSize(index, size, status);
959
+ this.#valList[index] = v;
960
+ if (status) {
961
+ status.set = 'replace';
962
+ const oldValue = oldVal && this.#isBackgroundFetch(oldVal)
963
+ ? oldVal.__staleWhileFetching
964
+ : oldVal;
965
+ if (oldValue !== undefined)
966
+ status.oldValue = oldValue;
967
+ }
968
+ }
969
+ else if (status) {
970
+ status.set = 'update';
971
+ }
972
+ }
973
+ if (ttl !== 0 && !this.#ttls) {
974
+ this.#initializeTTLTracking();
975
+ }
976
+ if (this.#ttls) {
977
+ if (!noUpdateTTL) {
978
+ this.#setItemTTL(index, ttl, start);
979
+ }
980
+ if (status)
981
+ this.#statusTTL(status, index);
982
+ }
983
+ if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
984
+ const dt = this.#disposed;
985
+ let task;
986
+ while ((task = dt?.shift())) {
987
+ this.#disposeAfter?.(...task);
988
+ }
989
+ }
990
+ return this;
991
+ }
992
+ /**
993
+ * Evict the least recently used item, returning its value or
994
+ * `undefined` if cache is empty.
995
+ */
996
+ pop() {
997
+ try {
998
+ while (this.#size) {
999
+ const val = this.#valList[this.#head];
1000
+ this.#evict(true);
1001
+ if (this.#isBackgroundFetch(val)) {
1002
+ if (val.__staleWhileFetching) {
1003
+ return val.__staleWhileFetching;
1004
+ }
1005
+ }
1006
+ else if (val !== undefined) {
1007
+ return val;
1008
+ }
1009
+ }
1010
+ }
1011
+ finally {
1012
+ if (this.#hasDisposeAfter && this.#disposed) {
1013
+ const dt = this.#disposed;
1014
+ let task;
1015
+ while ((task = dt?.shift())) {
1016
+ this.#disposeAfter?.(...task);
1017
+ }
1018
+ }
1019
+ }
1020
+ }
1021
+ #evict(free) {
1022
+ const head = this.#head;
1023
+ const k = this.#keyList[head];
1024
+ const v = this.#valList[head];
1025
+ if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
1026
+ v.__abortController.abort(new Error('evicted'));
1027
+ }
1028
+ else if (this.#hasDispose || this.#hasDisposeAfter) {
1029
+ if (this.#hasDispose) {
1030
+ this.#dispose?.(v, k, 'evict');
1031
+ }
1032
+ if (this.#hasDisposeAfter) {
1033
+ this.#disposed?.push([v, k, 'evict']);
1034
+ }
1035
+ }
1036
+ this.#removeItemSize(head);
1037
+ // if we aren't about to use the index, then null these out
1038
+ if (free) {
1039
+ this.#keyList[head] = undefined;
1040
+ this.#valList[head] = undefined;
1041
+ this.#free.push(head);
1042
+ }
1043
+ if (this.#size === 1) {
1044
+ this.#head = this.#tail = 0;
1045
+ this.#free.length = 0;
1046
+ }
1047
+ else {
1048
+ this.#head = this.#next[head];
1049
+ }
1050
+ this.#keyMap.delete(k);
1051
+ this.#size--;
1052
+ return head;
1053
+ }
1054
+ /**
1055
+ * Check if a key is in the cache, without updating the recency of use.
1056
+ * Will return false if the item is stale, even though it is technically
1057
+ * in the cache.
1058
+ *
1059
+ * Check if a key is in the cache, without updating the recency of
1060
+ * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
1061
+ * to `true` in either the options or the constructor.
1062
+ *
1063
+ * Will return `false` if the item is stale, even though it is technically in
1064
+ * the cache. The difference can be determined (if it matters) by using a
1065
+ * `status` argument, and inspecting the `has` field.
1066
+ *
1067
+ * Will not update item age unless
1068
+ * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
1069
+ */
1070
+ has(k, hasOptions = {}) {
1071
+ const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
1072
+ const index = this.#keyMap.get(k);
1073
+ if (index !== undefined) {
1074
+ const v = this.#valList[index];
1075
+ if (this.#isBackgroundFetch(v) &&
1076
+ v.__staleWhileFetching === undefined) {
1077
+ return false;
1078
+ }
1079
+ if (!this.#isStale(index)) {
1080
+ if (updateAgeOnHas) {
1081
+ this.#updateItemAge(index);
1082
+ }
1083
+ if (status) {
1084
+ status.has = 'hit';
1085
+ this.#statusTTL(status, index);
1086
+ }
1087
+ return true;
1088
+ }
1089
+ else if (status) {
1090
+ status.has = 'stale';
1091
+ this.#statusTTL(status, index);
1092
+ }
1093
+ }
1094
+ else if (status) {
1095
+ status.has = 'miss';
1096
+ }
1097
+ return false;
1098
+ }
1099
+ /**
1100
+ * Like {@link LRUCache#get} but doesn't update recency or delete stale
1101
+ * items.
1102
+ *
1103
+ * Returns `undefined` if the item is stale, unless
1104
+ * {@link LRUCache.OptionsBase.allowStale} is set.
1105
+ */
1106
+ peek(k, peekOptions = {}) {
1107
+ const { allowStale = this.allowStale } = peekOptions;
1108
+ const index = this.#keyMap.get(k);
1109
+ if (index === undefined ||
1110
+ (!allowStale && this.#isStale(index))) {
1111
+ return;
1112
+ }
1113
+ const v = this.#valList[index];
1114
+ // either stale and allowed, or forcing a refresh of non-stale value
1115
+ return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
1116
+ }
1117
+ #backgroundFetch(k, index, options, context) {
1118
+ const v = index === undefined ? undefined : this.#valList[index];
1119
+ if (this.#isBackgroundFetch(v)) {
1120
+ return v;
1121
+ }
1122
+ const ac = new AC();
1123
+ const { signal } = options;
1124
+ // when/if our AC signals, then stop listening to theirs.
1125
+ signal?.addEventListener('abort', () => ac.abort(signal.reason), {
1126
+ signal: ac.signal,
1127
+ });
1128
+ const fetchOpts = {
1129
+ signal: ac.signal,
1130
+ options,
1131
+ context,
1132
+ };
1133
+ const cb = (v, updateCache = false) => {
1134
+ const { aborted } = ac.signal;
1135
+ const ignoreAbort = options.ignoreFetchAbort && v !== undefined;
1136
+ if (options.status) {
1137
+ if (aborted && !updateCache) {
1138
+ options.status.fetchAborted = true;
1139
+ options.status.fetchError = ac.signal.reason;
1140
+ if (ignoreAbort)
1141
+ options.status.fetchAbortIgnored = true;
1142
+ }
1143
+ else {
1144
+ options.status.fetchResolved = true;
1145
+ }
1146
+ }
1147
+ if (aborted && !ignoreAbort && !updateCache) {
1148
+ return fetchFail(ac.signal.reason);
1149
+ }
1150
+ // either we didn't abort, and are still here, or we did, and ignored
1151
+ const bf = p;
1152
+ if (this.#valList[index] === p) {
1153
+ if (v === undefined) {
1154
+ if (bf.__staleWhileFetching) {
1155
+ this.#valList[index] = bf.__staleWhileFetching;
1156
+ }
1157
+ else {
1158
+ this.#delete(k, 'fetch');
1159
+ }
1160
+ }
1161
+ else {
1162
+ if (options.status)
1163
+ options.status.fetchUpdated = true;
1164
+ this.set(k, v, fetchOpts.options);
1165
+ }
1166
+ }
1167
+ return v;
1168
+ };
1169
+ const eb = (er) => {
1170
+ if (options.status) {
1171
+ options.status.fetchRejected = true;
1172
+ options.status.fetchError = er;
1173
+ }
1174
+ return fetchFail(er);
1175
+ };
1176
+ const fetchFail = (er) => {
1177
+ const { aborted } = ac.signal;
1178
+ const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
1179
+ const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
1180
+ const noDelete = allowStale || options.noDeleteOnFetchRejection;
1181
+ const bf = p;
1182
+ if (this.#valList[index] === p) {
1183
+ // if we allow stale on fetch rejections, then we need to ensure that
1184
+ // the stale value is not removed from the cache when the fetch fails.
1185
+ const del = !noDelete || bf.__staleWhileFetching === undefined;
1186
+ if (del) {
1187
+ this.#delete(k, 'fetch');
1188
+ }
1189
+ else if (!allowStaleAborted) {
1190
+ // still replace the *promise* with the stale value,
1191
+ // since we are done with the promise at this point.
1192
+ // leave it untouched if we're still waiting for an
1193
+ // aborted background fetch that hasn't yet returned.
1194
+ this.#valList[index] = bf.__staleWhileFetching;
1195
+ }
1196
+ }
1197
+ if (allowStale) {
1198
+ if (options.status && bf.__staleWhileFetching !== undefined) {
1199
+ options.status.returnedStale = true;
1200
+ }
1201
+ return bf.__staleWhileFetching;
1202
+ }
1203
+ else if (bf.__returned === bf) {
1204
+ throw er;
1205
+ }
1206
+ };
1207
+ const pcall = (res, rej) => {
1208
+ const fmp = this.#fetchMethod?.(k, v, fetchOpts);
1209
+ if (fmp && fmp instanceof Promise) {
1210
+ fmp.then(v => res(v === undefined ? undefined : v), rej);
1211
+ }
1212
+ // ignored, we go until we finish, regardless.
1213
+ // defer check until we are actually aborting,
1214
+ // so fetchMethod can override.
1215
+ ac.signal.addEventListener('abort', () => {
1216
+ if (!options.ignoreFetchAbort ||
1217
+ options.allowStaleOnFetchAbort) {
1218
+ res(undefined);
1219
+ // when it eventually resolves, update the cache.
1220
+ if (options.allowStaleOnFetchAbort) {
1221
+ res = v => cb(v, true);
1222
+ }
1223
+ }
1224
+ });
1225
+ };
1226
+ if (options.status)
1227
+ options.status.fetchDispatched = true;
1228
+ const p = new Promise(pcall).then(cb, eb);
1229
+ const bf = Object.assign(p, {
1230
+ __abortController: ac,
1231
+ __staleWhileFetching: v,
1232
+ __returned: undefined,
1233
+ });
1234
+ if (index === undefined) {
1235
+ // internal, don't expose status.
1236
+ this.set(k, bf, { ...fetchOpts.options, status: undefined });
1237
+ index = this.#keyMap.get(k);
1238
+ }
1239
+ else {
1240
+ this.#valList[index] = bf;
1241
+ }
1242
+ return bf;
1243
+ }
1244
+ #isBackgroundFetch(p) {
1245
+ if (!this.#hasFetchMethod)
1246
+ return false;
1247
+ const b = p;
1248
+ return (!!b &&
1249
+ b instanceof Promise &&
1250
+ b.hasOwnProperty('__staleWhileFetching') &&
1251
+ b.__abortController instanceof AC);
1252
+ }
1253
+ async fetch(k, fetchOptions = {}) {
1254
+ const {
1255
+ // get options
1256
+ allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet,
1257
+ // set options
1258
+ ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL,
1259
+ // fetch exclusive options
1260
+ noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions;
1261
+ if (!this.#hasFetchMethod) {
1262
+ if (status)
1263
+ status.fetch = 'get';
1264
+ return this.get(k, {
1265
+ allowStale,
1266
+ updateAgeOnGet,
1267
+ noDeleteOnStaleGet,
1268
+ status,
1269
+ });
1270
+ }
1271
+ const options = {
1272
+ allowStale,
1273
+ updateAgeOnGet,
1274
+ noDeleteOnStaleGet,
1275
+ ttl,
1276
+ noDisposeOnSet,
1277
+ size,
1278
+ sizeCalculation,
1279
+ noUpdateTTL,
1280
+ noDeleteOnFetchRejection,
1281
+ allowStaleOnFetchRejection,
1282
+ allowStaleOnFetchAbort,
1283
+ ignoreFetchAbort,
1284
+ status,
1285
+ signal,
1286
+ };
1287
+ let index = this.#keyMap.get(k);
1288
+ if (index === undefined) {
1289
+ if (status)
1290
+ status.fetch = 'miss';
1291
+ const p = this.#backgroundFetch(k, index, options, context);
1292
+ return (p.__returned = p);
1293
+ }
1294
+ else {
1295
+ // in cache, maybe already fetching
1296
+ const v = this.#valList[index];
1297
+ if (this.#isBackgroundFetch(v)) {
1298
+ const stale = allowStale && v.__staleWhileFetching !== undefined;
1299
+ if (status) {
1300
+ status.fetch = 'inflight';
1301
+ if (stale)
1302
+ status.returnedStale = true;
1303
+ }
1304
+ return stale ? v.__staleWhileFetching : (v.__returned = v);
1305
+ }
1306
+ // if we force a refresh, that means do NOT serve the cached value,
1307
+ // unless we are already in the process of refreshing the cache.
1308
+ const isStale = this.#isStale(index);
1309
+ if (!forceRefresh && !isStale) {
1310
+ if (status)
1311
+ status.fetch = 'hit';
1312
+ this.#moveToTail(index);
1313
+ if (updateAgeOnGet) {
1314
+ this.#updateItemAge(index);
1315
+ }
1316
+ if (status)
1317
+ this.#statusTTL(status, index);
1318
+ return v;
1319
+ }
1320
+ // ok, it is stale or a forced refresh, and not already fetching.
1321
+ // refresh the cache.
1322
+ const p = this.#backgroundFetch(k, index, options, context);
1323
+ const hasStale = p.__staleWhileFetching !== undefined;
1324
+ const staleVal = hasStale && allowStale;
1325
+ if (status) {
1326
+ status.fetch = isStale ? 'stale' : 'refresh';
1327
+ if (staleVal && isStale)
1328
+ status.returnedStale = true;
1329
+ }
1330
+ return staleVal ? p.__staleWhileFetching : (p.__returned = p);
1331
+ }
1332
+ }
1333
+ async forceFetch(k, fetchOptions = {}) {
1334
+ const v = await this.fetch(k, fetchOptions);
1335
+ if (v === undefined)
1336
+ throw new Error('fetch() returned undefined');
1337
+ return v;
1338
+ }
1339
+ memo(k, memoOptions = {}) {
1340
+ const memoMethod = this.#memoMethod;
1341
+ if (!memoMethod) {
1342
+ throw new Error('no memoMethod provided to constructor');
1343
+ }
1344
+ const { context, forceRefresh, ...options } = memoOptions;
1345
+ const v = this.get(k, options);
1346
+ if (!forceRefresh && v !== undefined)
1347
+ return v;
1348
+ const vv = memoMethod(k, v, {
1349
+ options,
1350
+ context,
1351
+ });
1352
+ this.set(k, vv, options);
1353
+ return vv;
1354
+ }
1355
+ /**
1356
+ * Return a value from the cache. Will update the recency of the cache
1357
+ * entry found.
1358
+ *
1359
+ * If the key is not found, get() will return `undefined`.
1360
+ */
1361
+ get(k, getOptions = {}) {
1362
+ const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions;
1363
+ const index = this.#keyMap.get(k);
1364
+ if (index !== undefined) {
1365
+ const value = this.#valList[index];
1366
+ const fetching = this.#isBackgroundFetch(value);
1367
+ if (status)
1368
+ this.#statusTTL(status, index);
1369
+ if (this.#isStale(index)) {
1370
+ if (status)
1371
+ status.get = 'stale';
1372
+ // delete only if not an in-flight background fetch
1373
+ if (!fetching) {
1374
+ if (!noDeleteOnStaleGet) {
1375
+ this.#delete(k, 'expire');
1376
+ }
1377
+ if (status && allowStale)
1378
+ status.returnedStale = true;
1379
+ return allowStale ? value : undefined;
1380
+ }
1381
+ else {
1382
+ if (status &&
1383
+ allowStale &&
1384
+ value.__staleWhileFetching !== undefined) {
1385
+ status.returnedStale = true;
1386
+ }
1387
+ return allowStale ? value.__staleWhileFetching : undefined;
1388
+ }
1389
+ }
1390
+ else {
1391
+ if (status)
1392
+ status.get = 'hit';
1393
+ // if we're currently fetching it, we don't actually have it yet
1394
+ // it's not stale, which means this isn't a staleWhileRefetching.
1395
+ // If it's not stale, and fetching, AND has a __staleWhileFetching
1396
+ // value, then that means the user fetched with {forceRefresh:true},
1397
+ // so it's safe to return that value.
1398
+ if (fetching) {
1399
+ return value.__staleWhileFetching;
1400
+ }
1401
+ this.#moveToTail(index);
1402
+ if (updateAgeOnGet) {
1403
+ this.#updateItemAge(index);
1404
+ }
1405
+ return value;
1406
+ }
1407
+ }
1408
+ else if (status) {
1409
+ status.get = 'miss';
1410
+ }
1411
+ }
1412
+ #connect(p, n) {
1413
+ this.#prev[n] = p;
1414
+ this.#next[p] = n;
1415
+ }
1416
+ #moveToTail(index) {
1417
+ // if tail already, nothing to do
1418
+ // if head, move head to next[index]
1419
+ // else
1420
+ // move next[prev[index]] to next[index] (head has no prev)
1421
+ // move prev[next[index]] to prev[index]
1422
+ // prev[index] = tail
1423
+ // next[tail] = index
1424
+ // tail = index
1425
+ if (index !== this.#tail) {
1426
+ if (index === this.#head) {
1427
+ this.#head = this.#next[index];
1428
+ }
1429
+ else {
1430
+ this.#connect(this.#prev[index], this.#next[index]);
1431
+ }
1432
+ this.#connect(this.#tail, index);
1433
+ this.#tail = index;
1434
+ }
1435
+ }
1436
+ /**
1437
+ * Deletes a key out of the cache.
1438
+ *
1439
+ * Returns true if the key was deleted, false otherwise.
1440
+ */
1441
+ delete(k) {
1442
+ return this.#delete(k, 'delete');
1443
+ }
1444
+ #delete(k, reason) {
1445
+ let deleted = false;
1446
+ if (this.#size !== 0) {
1447
+ const index = this.#keyMap.get(k);
1448
+ if (index !== undefined) {
1449
+ deleted = true;
1450
+ if (this.#size === 1) {
1451
+ this.#clear(reason);
1452
+ }
1453
+ else {
1454
+ this.#removeItemSize(index);
1455
+ const v = this.#valList[index];
1456
+ if (this.#isBackgroundFetch(v)) {
1457
+ v.__abortController.abort(new Error('deleted'));
1458
+ }
1459
+ else if (this.#hasDispose || this.#hasDisposeAfter) {
1460
+ if (this.#hasDispose) {
1461
+ this.#dispose?.(v, k, reason);
1462
+ }
1463
+ if (this.#hasDisposeAfter) {
1464
+ this.#disposed?.push([v, k, reason]);
1465
+ }
1466
+ }
1467
+ this.#keyMap.delete(k);
1468
+ this.#keyList[index] = undefined;
1469
+ this.#valList[index] = undefined;
1470
+ if (index === this.#tail) {
1471
+ this.#tail = this.#prev[index];
1472
+ }
1473
+ else if (index === this.#head) {
1474
+ this.#head = this.#next[index];
1475
+ }
1476
+ else {
1477
+ const pi = this.#prev[index];
1478
+ this.#next[pi] = this.#next[index];
1479
+ const ni = this.#next[index];
1480
+ this.#prev[ni] = this.#prev[index];
1481
+ }
1482
+ this.#size--;
1483
+ this.#free.push(index);
1484
+ }
1485
+ }
1486
+ }
1487
+ if (this.#hasDisposeAfter && this.#disposed?.length) {
1488
+ const dt = this.#disposed;
1489
+ let task;
1490
+ while ((task = dt?.shift())) {
1491
+ this.#disposeAfter?.(...task);
1492
+ }
1493
+ }
1494
+ return deleted;
1495
+ }
1496
+ /**
1497
+ * Clear the cache entirely, throwing away all values.
1498
+ */
1499
+ clear() {
1500
+ return this.#clear('delete');
1501
+ }
1502
+ #clear(reason) {
1503
+ for (const index of this.#rindexes({ allowStale: true })) {
1504
+ const v = this.#valList[index];
1505
+ if (this.#isBackgroundFetch(v)) {
1506
+ v.__abortController.abort(new Error('deleted'));
1507
+ }
1508
+ else {
1509
+ const k = this.#keyList[index];
1510
+ if (this.#hasDispose) {
1511
+ this.#dispose?.(v, k, reason);
1512
+ }
1513
+ if (this.#hasDisposeAfter) {
1514
+ this.#disposed?.push([v, k, reason]);
1515
+ }
1516
+ }
1517
+ }
1518
+ this.#keyMap.clear();
1519
+ this.#valList.fill(undefined);
1520
+ this.#keyList.fill(undefined);
1521
+ if (this.#ttls && this.#starts) {
1522
+ this.#ttls.fill(0);
1523
+ this.#starts.fill(0);
1524
+ }
1525
+ if (this.#sizes) {
1526
+ this.#sizes.fill(0);
1527
+ }
1528
+ this.#head = 0;
1529
+ this.#tail = 0;
1530
+ this.#free.length = 0;
1531
+ this.#calculatedSize = 0;
1532
+ this.#size = 0;
1533
+ if (this.#hasDisposeAfter && this.#disposed) {
1534
+ const dt = this.#disposed;
1535
+ let task;
1536
+ while ((task = dt?.shift())) {
1537
+ this.#disposeAfter?.(...task);
1538
+ }
1539
+ }
1540
+ }
1541
+ }
1542
+ //# sourceMappingURL=index.js.map