@openclaw/msteams 2026.5.27 → 2026.5.28-beta.2

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 (701) hide show
  1. package/dist/api.js +2 -2
  2. package/dist/{channel-c7nnGfMx.js → channel-C_AMaSpi.js} +5 -5
  3. package/dist/channel-config-api.js +1 -1
  4. package/dist/channel-plugin-api.js +1 -1
  5. package/dist/{channel.runtime-Boha-kk1.js → channel.runtime-BJJ1R1iY.js} +3 -3
  6. package/dist/{config-schema-CuksCQKC.js → config-schema-BL4qQZiA.js} +8 -0
  7. package/dist/{graph-users-uPAE6-KQ.js → errors-B4snzfP5.js} +378 -624
  8. package/dist/{oauth-C5ObhLG6.js → oauth-BrKjrCNK.js} +1 -1
  9. package/dist/{oauth.token-BNbWziwM.js → oauth.token-5ygi8ycy.js} +8 -6
  10. package/dist/{probe-istgFnuw.js → probe-DRwI-ZqW.js} +221 -120
  11. package/dist/setup-plugin-api.js +3 -3
  12. package/dist/{setup-surface-evwYex71.js → setup-surface-C-uCiIKh.js} +2 -2
  13. package/dist/{src-ui0zJEZI.js → src-Cc3f8Zi2.js} +786 -994
  14. package/node_modules/@microsoft/teams.api/dist/activities/activity.d.mts +0 -1
  15. package/node_modules/@microsoft/teams.api/dist/activities/activity.d.ts +0 -1
  16. package/node_modules/@microsoft/teams.api/dist/activities/activity.js +0 -4
  17. package/node_modules/@microsoft/teams.api/dist/activities/activity.js.map +1 -1
  18. package/node_modules/@microsoft/teams.api/dist/activities/activity.mjs +0 -4
  19. package/node_modules/@microsoft/teams.api/dist/activities/activity.mjs.map +1 -1
  20. package/node_modules/@microsoft/teams.api/dist/activities/index.d.mts +3 -2
  21. package/node_modules/@microsoft/teams.api/dist/activities/index.d.ts +3 -2
  22. package/node_modules/@microsoft/teams.api/dist/activities/invoke/index.d.mts +3 -2
  23. package/node_modules/@microsoft/teams.api/dist/activities/invoke/index.d.ts +3 -2
  24. package/node_modules/@microsoft/teams.api/dist/activities/invoke/index.js +7 -0
  25. package/node_modules/@microsoft/teams.api/dist/activities/invoke/index.mjs +1 -0
  26. package/node_modules/@microsoft/teams.api/dist/activities/invoke/message-extension/fetch-task.d.mts +3 -2
  27. package/node_modules/@microsoft/teams.api/dist/activities/invoke/message-extension/fetch-task.d.ts +3 -2
  28. package/node_modules/@microsoft/teams.api/dist/activities/invoke/message-extension/index.d.mts +3 -2
  29. package/node_modules/@microsoft/teams.api/dist/activities/invoke/message-extension/index.d.ts +3 -2
  30. package/node_modules/@microsoft/teams.api/dist/activities/invoke/message-extension/submit-action.d.mts +3 -2
  31. package/node_modules/@microsoft/teams.api/dist/activities/invoke/message-extension/submit-action.d.ts +3 -2
  32. package/node_modules/@microsoft/teams.api/dist/activities/invoke/suggested-action-submit.d.mts +48 -0
  33. package/node_modules/@microsoft/teams.api/dist/activities/invoke/suggested-action-submit.d.ts +48 -0
  34. package/node_modules/@microsoft/teams.api/dist/activities/invoke/suggested-action-submit.js +4 -0
  35. package/node_modules/@microsoft/teams.api/dist/activities/invoke/suggested-action-submit.js.map +1 -0
  36. package/node_modules/@microsoft/teams.api/dist/activities/invoke/suggested-action-submit.mjs +3 -0
  37. package/node_modules/@microsoft/teams.api/dist/activities/invoke/suggested-action-submit.mjs.map +1 -0
  38. package/node_modules/@microsoft/teams.api/dist/activities/message/index.d.mts +3 -3
  39. package/node_modules/@microsoft/teams.api/dist/activities/message/index.d.ts +3 -3
  40. package/node_modules/@microsoft/teams.api/dist/activities/message/message.d.mts +2 -2
  41. package/node_modules/@microsoft/teams.api/dist/activities/message/message.d.ts +2 -2
  42. package/node_modules/@microsoft/teams.api/dist/activities/message/message.js +60 -2
  43. package/node_modules/@microsoft/teams.api/dist/activities/message/message.js.map +1 -1
  44. package/node_modules/@microsoft/teams.api/dist/activities/message/message.mjs +60 -2
  45. package/node_modules/@microsoft/teams.api/dist/activities/message/message.mjs.map +1 -1
  46. package/node_modules/@microsoft/teams.api/dist/activities/utils/index.d.mts +4 -3
  47. package/node_modules/@microsoft/teams.api/dist/activities/utils/index.d.ts +4 -3
  48. package/node_modules/@microsoft/teams.api/dist/activities/utils/strip-mentions-text.d.mts +2 -2
  49. package/node_modules/@microsoft/teams.api/dist/activities/utils/strip-mentions-text.d.ts +2 -2
  50. package/node_modules/@microsoft/teams.api/dist/activities/utils/to-activity-params.d.mts +4 -3
  51. package/node_modules/@microsoft/teams.api/dist/activities/utils/to-activity-params.d.ts +4 -3
  52. package/node_modules/@microsoft/teams.api/dist/{activity-Be6r1tJJ.d.ts → activity-DzKP6phL.d.ts} +3 -2
  53. package/node_modules/@microsoft/teams.api/dist/{activity-CJery-zL.d.mts → activity-KJJs2q-W.d.mts} +3 -2
  54. package/node_modules/@microsoft/teams.api/dist/auth/json-web-token.d.mts +14 -0
  55. package/node_modules/@microsoft/teams.api/dist/auth/json-web-token.d.ts +14 -0
  56. package/node_modules/@microsoft/teams.api/dist/auth/json-web-token.js +14 -0
  57. package/node_modules/@microsoft/teams.api/dist/auth/json-web-token.js.map +1 -1
  58. package/node_modules/@microsoft/teams.api/dist/auth/json-web-token.mjs +14 -0
  59. package/node_modules/@microsoft/teams.api/dist/auth/json-web-token.mjs.map +1 -1
  60. package/node_modules/@microsoft/teams.api/dist/clients/conversation/activity.d.mts +4 -3
  61. package/node_modules/@microsoft/teams.api/dist/clients/conversation/activity.d.ts +4 -3
  62. package/node_modules/@microsoft/teams.api/dist/clients/conversation/index.d.mts +4 -3
  63. package/node_modules/@microsoft/teams.api/dist/clients/conversation/index.d.ts +4 -3
  64. package/node_modules/@microsoft/teams.api/dist/clients/index.d.mts +4 -3
  65. package/node_modules/@microsoft/teams.api/dist/clients/index.d.ts +4 -3
  66. package/node_modules/@microsoft/teams.api/dist/index.d.mts +3 -2
  67. package/node_modules/@microsoft/teams.api/dist/index.d.ts +3 -2
  68. package/node_modules/@microsoft/teams.api/dist/{message-BwI6kmCe.d.ts → message-D0n_F-cL.d.ts} +37 -1
  69. package/node_modules/@microsoft/teams.api/dist/{message-Bd75JRjv.d.mts → message-DTEe5v6q.d.mts} +37 -1
  70. package/node_modules/@microsoft/teams.api/dist/models/activity-like.d.mts +4 -3
  71. package/node_modules/@microsoft/teams.api/dist/models/activity-like.d.ts +4 -3
  72. package/node_modules/@microsoft/teams.api/dist/models/card/card-action.d.mts +8 -1
  73. package/node_modules/@microsoft/teams.api/dist/models/card/card-action.d.ts +8 -1
  74. package/node_modules/@microsoft/teams.api/dist/models/index.d.mts +3 -2
  75. package/node_modules/@microsoft/teams.api/dist/models/index.d.ts +3 -2
  76. package/node_modules/@microsoft/teams.api/dist/models/invoke-response.d.mts +5 -3
  77. package/node_modules/@microsoft/teams.api/dist/models/invoke-response.d.ts +5 -3
  78. package/node_modules/@microsoft/teams.api/dist/models/invoke-response.js.map +1 -1
  79. package/node_modules/@microsoft/teams.api/dist/models/invoke-response.mjs.map +1 -1
  80. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/index.d.mts +4 -3
  81. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/index.d.ts +4 -3
  82. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/messaging-extension-action-response.d.mts +4 -3
  83. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/messaging-extension-action-response.d.ts +4 -3
  84. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/messaging-extension-action.d.mts +4 -3
  85. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/messaging-extension-action.d.ts +4 -3
  86. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/messaging-extension-response.d.mts +4 -3
  87. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/messaging-extension-response.d.ts +4 -3
  88. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/messaging-extension-result.d.mts +4 -3
  89. package/node_modules/@microsoft/teams.api/dist/models/messaging-extension/messaging-extension-result.d.ts +4 -3
  90. package/node_modules/@microsoft/teams.api/package.json +5 -5
  91. package/node_modules/@microsoft/teams.apps/dist/contexts/activity.d.ts +27 -2
  92. package/node_modules/@microsoft/teams.apps/dist/contexts/activity.js +119 -58
  93. package/node_modules/@microsoft/teams.apps/dist/contexts/activity.test.js +235 -33
  94. package/node_modules/@microsoft/teams.apps/dist/http/express-adapter.d.ts +8 -1
  95. package/node_modules/@microsoft/teams.apps/dist/http/express-adapter.js +10 -4
  96. package/node_modules/@microsoft/teams.apps/dist/http/http-server.js +14 -1
  97. package/node_modules/@microsoft/teams.apps/dist/http/http-stream.d.ts +77 -46
  98. package/node_modules/@microsoft/teams.apps/dist/http/http-stream.js +31 -16
  99. package/node_modules/@microsoft/teams.apps/dist/routes/invoke/index.d.ts +1 -0
  100. package/node_modules/@microsoft/teams.apps/dist/routes/invoke/index.js +2 -1
  101. package/node_modules/@microsoft/teams.apps/dist/types/app-routing.d.ts +2 -2
  102. package/node_modules/@microsoft/teams.apps/dist/types/streamer.d.ts +9 -0
  103. package/node_modules/@microsoft/teams.apps/package.json +5 -5
  104. package/node_modules/@microsoft/teams.cards/dist/actions/submit/collab-stage.js.map +1 -1
  105. package/node_modules/@microsoft/teams.cards/dist/actions/submit/collab-stage.mjs.map +1 -1
  106. package/node_modules/@microsoft/teams.cards/dist/actions/submit/im-back.js.map +1 -1
  107. package/node_modules/@microsoft/teams.cards/dist/actions/submit/im-back.mjs.map +1 -1
  108. package/node_modules/@microsoft/teams.cards/dist/actions/submit/invoke.js.map +1 -1
  109. package/node_modules/@microsoft/teams.cards/dist/actions/submit/invoke.mjs.map +1 -1
  110. package/node_modules/@microsoft/teams.cards/dist/actions/submit/message-back.d.mts +1 -1
  111. package/node_modules/@microsoft/teams.cards/dist/actions/submit/message-back.d.ts +1 -1
  112. package/node_modules/@microsoft/teams.cards/dist/actions/submit/message-back.js.map +1 -1
  113. package/node_modules/@microsoft/teams.cards/dist/actions/submit/message-back.mjs.map +1 -1
  114. package/node_modules/@microsoft/teams.cards/dist/actions/submit/sign-in.js.map +1 -1
  115. package/node_modules/@microsoft/teams.cards/dist/actions/submit/sign-in.mjs.map +1 -1
  116. package/node_modules/@microsoft/teams.cards/dist/actions/submit/task-fetch.js.map +1 -1
  117. package/node_modules/@microsoft/teams.cards/dist/actions/submit/task-fetch.mjs.map +1 -1
  118. package/node_modules/@microsoft/teams.cards/package.json +2 -2
  119. package/node_modules/@microsoft/teams.common/dist/events/event-emitter.d.mts +2 -2
  120. package/node_modules/@microsoft/teams.common/dist/events/event-emitter.d.ts +2 -2
  121. package/node_modules/@microsoft/teams.common/dist/events/event-emitter.js.map +1 -1
  122. package/node_modules/@microsoft/teams.common/dist/events/event-emitter.mjs.map +1 -1
  123. package/node_modules/@microsoft/teams.common/dist/http/client.d.mts +1 -1
  124. package/node_modules/@microsoft/teams.common/dist/http/client.d.ts +1 -1
  125. package/node_modules/@microsoft/teams.common/dist/http/client.js +3 -1
  126. package/node_modules/@microsoft/teams.common/dist/http/client.js.map +1 -1
  127. package/node_modules/@microsoft/teams.common/dist/http/client.mjs +3 -1
  128. package/node_modules/@microsoft/teams.common/dist/http/client.mjs.map +1 -1
  129. package/node_modules/@microsoft/teams.common/dist/logging/console.d.mts +1 -1
  130. package/node_modules/@microsoft/teams.common/dist/logging/console.d.ts +1 -1
  131. package/node_modules/@microsoft/teams.common/dist/logging/console.js +3 -1
  132. package/node_modules/@microsoft/teams.common/dist/logging/console.js.map +1 -1
  133. package/node_modules/@microsoft/teams.common/dist/logging/console.mjs +3 -1
  134. package/node_modules/@microsoft/teams.common/dist/logging/console.mjs.map +1 -1
  135. package/node_modules/@microsoft/teams.common/dist/logging/string.js.map +1 -1
  136. package/node_modules/@microsoft/teams.common/dist/logging/string.mjs.map +1 -1
  137. package/node_modules/@microsoft/teams.common/dist/storage/list-local-storage.js.map +1 -1
  138. package/node_modules/@microsoft/teams.common/dist/storage/list-local-storage.mjs.map +1 -1
  139. package/node_modules/@microsoft/teams.common/dist/storage/local-storage.js.map +1 -1
  140. package/node_modules/@microsoft/teams.common/dist/storage/local-storage.mjs.map +1 -1
  141. package/node_modules/@microsoft/teams.common/package.json +2 -2
  142. package/node_modules/@microsoft/teams.graph/dist/index.js +2 -2
  143. package/node_modules/@microsoft/teams.graph/dist/index.mjs +2 -2
  144. package/node_modules/@microsoft/teams.graph/package.json +4 -4
  145. package/node_modules/jose/README.md +62 -83
  146. package/node_modules/jose/dist/types/index.d.ts +48 -55
  147. package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +4 -12
  148. package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +9 -22
  149. package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +4 -12
  150. package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +21 -24
  151. package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +4 -19
  152. package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +21 -35
  153. package/node_modules/jose/dist/types/jwk/embedded.d.ts +2 -10
  154. package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +5 -16
  155. package/node_modules/jose/dist/types/jwks/local.d.ts +13 -16
  156. package/node_modules/jose/dist/types/jwks/remote.d.ts +16 -204
  157. package/node_modules/jose/dist/types/jws/compact/sign.d.ts +6 -18
  158. package/node_modules/jose/dist/types/jws/compact/verify.d.ts +5 -13
  159. package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +8 -18
  160. package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +5 -13
  161. package/node_modules/jose/dist/types/jws/general/sign.d.ts +12 -24
  162. package/node_modules/jose/dist/types/jws/general/verify.d.ts +5 -21
  163. package/node_modules/jose/dist/types/jwt/decrypt.d.ts +5 -13
  164. package/node_modules/jose/dist/types/jwt/encrypt.d.ts +17 -31
  165. package/node_modules/jose/dist/types/jwt/sign.d.ts +6 -26
  166. package/node_modules/jose/dist/types/jwt/unsecured.d.ts +7 -29
  167. package/node_modules/jose/dist/types/jwt/verify.d.ts +6 -14
  168. package/node_modules/jose/dist/types/key/export.d.ts +12 -24
  169. package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +11 -22
  170. package/node_modules/jose/dist/types/key/generate_secret.d.ts +8 -24
  171. package/node_modules/jose/dist/types/key/import.d.ts +33 -62
  172. package/node_modules/jose/dist/types/types.d.ts +165 -407
  173. package/node_modules/jose/dist/types/util/base64url.d.ts +16 -6
  174. package/node_modules/jose/dist/types/util/decode_jwt.d.ts +2 -10
  175. package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +2 -11
  176. package/node_modules/jose/dist/types/util/errors.d.ts +36 -98
  177. package/node_modules/jose/package.json +17 -127
  178. package/node_modules/jwks-rsa/package.json +4 -4
  179. package/node_modules/jwks-rsa/src/integrations/config.js +1 -0
  180. package/node_modules/jwks-rsa/src/utils.js +2 -0
  181. package/node_modules/jwks-rsa/src/wrappers/cache.js +1 -1
  182. package/node_modules/lru-cache/README.md +117 -420
  183. package/node_modules/lru-cache/package.json +12 -132
  184. package/node_modules/lru-memoizer/README.md +21 -22
  185. package/node_modules/lru-memoizer/lib/async.d.ts +32 -15
  186. package/node_modules/lru-memoizer/lib/async.js +113 -55
  187. package/node_modules/lru-memoizer/lib/freeze.d.ts +0 -1
  188. package/node_modules/lru-memoizer/lib/freeze.js +1 -1
  189. package/node_modules/lru-memoizer/lib/index.d.ts +0 -1
  190. package/node_modules/lru-memoizer/lib/index.js +2 -2
  191. package/node_modules/lru-memoizer/lib/sync.d.ts +16 -17
  192. package/node_modules/lru-memoizer/lib/sync.js +62 -34
  193. package/node_modules/lru-memoizer/lib/util.d.ts +40 -41
  194. package/node_modules/lru-memoizer/lib/util.js +1 -1
  195. package/node_modules/lru-memoizer/package.json +4 -3
  196. package/node_modules/lru-memoizer/test/lru-memoizer.clone.test.js +1 -2
  197. package/node_modules/lru-memoizer/test/lru-memoizer.freeze.test.js +0 -1
  198. package/node_modules/lru-memoizer/test/lru-memoizer.itemmaxage.test.js +26 -26
  199. package/node_modules/lru-memoizer/test/lru-memoizer.nokey.test.js +0 -1
  200. package/node_modules/lru-memoizer/test/lru-memoizer.queumaxage.test.js +3 -4
  201. package/node_modules/lru-memoizer/test/lru-memoizer.sync.clone.test.js +2 -4
  202. package/node_modules/lru-memoizer/test/lru-memoizer.sync.freeze.js +2 -4
  203. package/node_modules/lru-memoizer/tsconfig.json +56 -16
  204. package/node_modules/semver/classes/range.js +7 -0
  205. package/node_modules/semver/package.json +1 -1
  206. package/node_modules/semver/ranges/subset.js +2 -2
  207. package/npm-shrinkwrap.json +52 -98
  208. package/openclaw.plugin.json +21 -0
  209. package/package.json +6 -10
  210. package/dist/test-api.js +0 -2
  211. package/node_modules/@microsoft/teams.apps/node_modules/jose/LICENSE.md +0 -21
  212. package/node_modules/@microsoft/teams.apps/node_modules/jose/README.md +0 -132
  213. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/index.d.ts +0 -48
  214. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +0 -23
  215. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +0 -52
  216. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +0 -23
  217. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +0 -80
  218. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +0 -23
  219. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +0 -60
  220. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwk/embedded.d.ts +0 -9
  221. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwk/thumbprint.d.ts +0 -21
  222. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwks/local.d.ts +0 -26
  223. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwks/remote.d.ts +0 -49
  224. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jws/compact/sign.d.ts +0 -24
  225. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jws/compact/verify.d.ts +0 -25
  226. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jws/flattened/sign.d.ts +0 -32
  227. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jws/flattened/verify.d.ts +0 -25
  228. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jws/general/sign.d.ts +0 -41
  229. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jws/general/verify.d.ts +0 -25
  230. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwt/decrypt.d.ts +0 -27
  231. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwt/encrypt.d.ts +0 -77
  232. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwt/sign.d.ts +0 -23
  233. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwt/unsecured.d.ts +0 -21
  234. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/jwt/verify.d.ts +0 -29
  235. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/key/export.d.ts +0 -21
  236. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/key/generate_key_pair.d.ts +0 -36
  237. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/key/generate_secret.d.ts +0 -19
  238. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/key/import.d.ts +0 -54
  239. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/types.d.ts +0 -610
  240. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/util/base64url.d.ts +0 -19
  241. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/util/decode_jwt.d.ts +0 -10
  242. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/util/decode_protected_header.d.ts +0 -8
  243. package/node_modules/@microsoft/teams.apps/node_modules/jose/dist/types/util/errors.d.ts +0 -151
  244. package/node_modules/@microsoft/teams.apps/node_modules/jose/package.json +0 -90
  245. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/LICENSE +0 -21
  246. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/README.md +0 -84
  247. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/index.d.ts +0 -139
  248. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/package.json +0 -74
  249. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/JwksClient.js +0 -91
  250. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/errors/ArgumentError.js +0 -10
  251. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/errors/JwksError.js +0 -10
  252. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/errors/JwksRateLimitError.js +0 -10
  253. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/errors/SigningKeyNotFoundError.js +0 -10
  254. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/errors/index.js +0 -6
  255. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/index.js +0 -22
  256. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/integrations/config.js +0 -15
  257. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/integrations/express.js +0 -60
  258. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/integrations/hapi.js +0 -59
  259. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/integrations/koa.js +0 -30
  260. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/integrations/passport.js +0 -52
  261. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/utils.js +0 -80
  262. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/wrappers/cache.js +0 -15
  263. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/wrappers/callbackSupport.js +0 -16
  264. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/wrappers/index.js +0 -7
  265. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/wrappers/interceptor.js +0 -30
  266. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/wrappers/rateLimit.js +0 -34
  267. package/node_modules/@microsoft/teams.apps/node_modules/jwks-rsa/src/wrappers/request.js +0 -54
  268. package/node_modules/@microsoft/teams.apps/node_modules/lru-cache/README.md +0 -166
  269. package/node_modules/@microsoft/teams.apps/node_modules/lru-cache/package.json +0 -34
  270. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/.jshintrc +0 -41
  271. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/LICENSE +0 -21
  272. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/README.md +0 -88
  273. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/async.d.ts +0 -85
  274. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/async.js +0 -178
  275. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/freeze.d.ts +0 -1
  276. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/freeze.js +0 -23
  277. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/index.d.ts +0 -2
  278. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/index.js +0 -4
  279. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/sync.d.ts +0 -65
  280. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/sync.js +0 -114
  281. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/util.d.ts +0 -162
  282. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/lib/util.js +0 -3
  283. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/package.json +0 -34
  284. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.bypass.test.js +0 -39
  285. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.clone.test.js +0 -44
  286. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.disable.test.js +0 -49
  287. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.events.test.js +0 -132
  288. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.freeze.test.js +0 -43
  289. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.itemmaxage.test.js +0 -204
  290. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.lock.test.js +0 -36
  291. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.nokey.test.js +0 -43
  292. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.queumaxage.test.js +0 -110
  293. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.sync.clone.test.js +0 -76
  294. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.sync.events.test.js +0 -95
  295. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.sync.freeze.js +0 -74
  296. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.sync.test.js +0 -47
  297. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/test/lru-memoizer.test.js +0 -88
  298. package/node_modules/@microsoft/teams.apps/node_modules/lru-memoizer/tsconfig.json +0 -59
  299. package/node_modules/jose/dist/webapi/index.js +0 -32
  300. package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +0 -27
  301. package/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +0 -27
  302. package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +0 -159
  303. package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +0 -167
  304. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +0 -31
  305. package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +0 -182
  306. package/node_modules/jose/dist/webapi/jwk/embedded.js +0 -17
  307. package/node_modules/jose/dist/webapi/jwk/thumbprint.js +0 -68
  308. package/node_modules/jose/dist/webapi/jwks/local.js +0 -119
  309. package/node_modules/jose/dist/webapi/jwks/remote.js +0 -179
  310. package/node_modules/jose/dist/webapi/jws/compact/sign.js +0 -18
  311. package/node_modules/jose/dist/webapi/jws/compact/verify.js +0 -21
  312. package/node_modules/jose/dist/webapi/jws/flattened/sign.js +0 -89
  313. package/node_modules/jose/dist/webapi/jws/flattened/verify.js +0 -110
  314. package/node_modules/jose/dist/webapi/jws/general/sign.js +0 -70
  315. package/node_modules/jose/dist/webapi/jws/general/verify.js +0 -24
  316. package/node_modules/jose/dist/webapi/jwt/decrypt.js +0 -23
  317. package/node_modules/jose/dist/webapi/jwt/encrypt.js +0 -101
  318. package/node_modules/jose/dist/webapi/jwt/sign.js +0 -52
  319. package/node_modules/jose/dist/webapi/jwt/unsecured.js +0 -63
  320. package/node_modules/jose/dist/webapi/jwt/verify.js +0 -15
  321. package/node_modules/jose/dist/webapi/key/export.js +0 -11
  322. package/node_modules/jose/dist/webapi/key/generate_key_pair.js +0 -97
  323. package/node_modules/jose/dist/webapi/key/generate_secret.js +0 -40
  324. package/node_modules/jose/dist/webapi/key/import.js +0 -57
  325. package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +0 -15
  326. package/node_modules/jose/dist/webapi/lib/aeskw.js +0 -25
  327. package/node_modules/jose/dist/webapi/lib/asn1.js +0 -243
  328. package/node_modules/jose/dist/webapi/lib/base64.js +0 -22
  329. package/node_modules/jose/dist/webapi/lib/buffer_utils.js +0 -43
  330. package/node_modules/jose/dist/webapi/lib/check_key_type.js +0 -122
  331. package/node_modules/jose/dist/webapi/lib/content_encryption.js +0 -217
  332. package/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -136
  333. package/node_modules/jose/dist/webapi/lib/deflate.js +0 -44
  334. package/node_modules/jose/dist/webapi/lib/ecdhes.js +0 -52
  335. package/node_modules/jose/dist/webapi/lib/helpers.js +0 -19
  336. package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -27
  337. package/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -17
  338. package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -107
  339. package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +0 -238
  340. package/node_modules/jose/dist/webapi/lib/key_management.js +0 -186
  341. package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +0 -31
  342. package/node_modules/jose/dist/webapi/lib/normalize_key.js +0 -166
  343. package/node_modules/jose/dist/webapi/lib/pbes2kw.js +0 -42
  344. package/node_modules/jose/dist/webapi/lib/rsaes.js +0 -24
  345. package/node_modules/jose/dist/webapi/lib/signing.js +0 -68
  346. package/node_modules/jose/dist/webapi/lib/type_checks.js +0 -40
  347. package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +0 -10
  348. package/node_modules/jose/dist/webapi/lib/validate_crit.js +0 -33
  349. package/node_modules/jose/dist/webapi/util/base64url.js +0 -30
  350. package/node_modules/jose/dist/webapi/util/decode_jwt.js +0 -32
  351. package/node_modules/jose/dist/webapi/util/decode_protected_header.js +0 -34
  352. package/node_modules/jose/dist/webapi/util/errors.js +0 -99
  353. package/node_modules/lru-cache/LICENSE.md +0 -55
  354. package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +0 -1
  355. package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +0 -1
  356. package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +0 -5
  357. package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +0 -7
  358. package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +0 -1400
  359. package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +0 -1
  360. package/node_modules/lru-cache/dist/commonjs/browser/index.js +0 -1726
  361. package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +0 -1
  362. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +0 -2
  363. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +0 -7
  364. package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +0 -12
  365. package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +0 -1
  366. package/node_modules/lru-cache/dist/commonjs/browser/perf.js +0 -10
  367. package/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +0 -1
  368. package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +0 -1
  369. package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +0 -1
  370. package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +0 -5
  371. package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +0 -7
  372. package/node_modules/lru-cache/dist/commonjs/index.d.ts +0 -1400
  373. package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +0 -1
  374. package/node_modules/lru-cache/dist/commonjs/index.js +0 -1726
  375. package/node_modules/lru-cache/dist/commonjs/index.js.map +0 -1
  376. package/node_modules/lru-cache/dist/commonjs/index.min.js +0 -2
  377. package/node_modules/lru-cache/dist/commonjs/index.min.js.map +0 -7
  378. package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +0 -1
  379. package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +0 -1
  380. package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +0 -5
  381. package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +0 -9
  382. package/node_modules/lru-cache/dist/commonjs/node/index.d.ts +0 -1400
  383. package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +0 -1
  384. package/node_modules/lru-cache/dist/commonjs/node/index.js +0 -1726
  385. package/node_modules/lru-cache/dist/commonjs/node/index.js.map +0 -1
  386. package/node_modules/lru-cache/dist/commonjs/node/index.min.js +0 -2
  387. package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +0 -7
  388. package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +0 -12
  389. package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +0 -1
  390. package/node_modules/lru-cache/dist/commonjs/node/perf.js +0 -10
  391. package/node_modules/lru-cache/dist/commonjs/node/perf.js.map +0 -1
  392. package/node_modules/lru-cache/dist/commonjs/package.json +0 -3
  393. package/node_modules/lru-cache/dist/commonjs/perf.d.ts +0 -12
  394. package/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +0 -1
  395. package/node_modules/lru-cache/dist/commonjs/perf.js +0 -10
  396. package/node_modules/lru-cache/dist/commonjs/perf.js.map +0 -1
  397. package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +0 -1
  398. package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +0 -1
  399. package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +0 -5
  400. package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +0 -4
  401. package/node_modules/lru-cache/dist/esm/browser/index.d.ts +0 -1400
  402. package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +0 -1
  403. package/node_modules/lru-cache/dist/esm/browser/index.js +0 -1722
  404. package/node_modules/lru-cache/dist/esm/browser/index.js.map +0 -1
  405. package/node_modules/lru-cache/dist/esm/browser/index.min.js +0 -2
  406. package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +0 -7
  407. package/node_modules/lru-cache/dist/esm/browser/perf.d.ts +0 -12
  408. package/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +0 -1
  409. package/node_modules/lru-cache/dist/esm/browser/perf.js +0 -7
  410. package/node_modules/lru-cache/dist/esm/browser/perf.js.map +0 -1
  411. package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +0 -1
  412. package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +0 -1
  413. package/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +0 -5
  414. package/node_modules/lru-cache/dist/esm/diagnostics-channel.js +0 -19
  415. package/node_modules/lru-cache/dist/esm/index.d.ts +0 -1400
  416. package/node_modules/lru-cache/dist/esm/index.d.ts.map +0 -1
  417. package/node_modules/lru-cache/dist/esm/index.js +0 -1722
  418. package/node_modules/lru-cache/dist/esm/index.js.map +0 -1
  419. package/node_modules/lru-cache/dist/esm/index.min.js +0 -2
  420. package/node_modules/lru-cache/dist/esm/index.min.js.map +0 -7
  421. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +0 -1
  422. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +0 -1
  423. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +0 -5
  424. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +0 -6
  425. package/node_modules/lru-cache/dist/esm/node/index.d.ts +0 -1400
  426. package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +0 -1
  427. package/node_modules/lru-cache/dist/esm/node/index.js +0 -1722
  428. package/node_modules/lru-cache/dist/esm/node/index.js.map +0 -1
  429. package/node_modules/lru-cache/dist/esm/node/index.min.js +0 -2
  430. package/node_modules/lru-cache/dist/esm/node/index.min.js.map +0 -7
  431. package/node_modules/lru-cache/dist/esm/node/perf.d.ts +0 -12
  432. package/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +0 -1
  433. package/node_modules/lru-cache/dist/esm/node/perf.js +0 -7
  434. package/node_modules/lru-cache/dist/esm/node/perf.js.map +0 -1
  435. package/node_modules/lru-cache/dist/esm/package.json +0 -3
  436. package/node_modules/lru-cache/dist/esm/perf.d.ts +0 -12
  437. package/node_modules/lru-cache/dist/esm/perf.d.ts.map +0 -1
  438. package/node_modules/lru-cache/dist/esm/perf.js +0 -7
  439. package/node_modules/lru-cache/dist/esm/perf.js.map +0 -1
  440. package/node_modules/lru-memoizer/lib/async.d.ts.map +0 -1
  441. package/node_modules/lru-memoizer/lib/async.js.map +0 -1
  442. package/node_modules/lru-memoizer/lib/freeze.d.ts.map +0 -1
  443. package/node_modules/lru-memoizer/lib/freeze.js.map +0 -1
  444. package/node_modules/lru-memoizer/lib/index.d.ts.map +0 -1
  445. package/node_modules/lru-memoizer/lib/index.js.map +0 -1
  446. package/node_modules/lru-memoizer/lib/sync.d.ts.map +0 -1
  447. package/node_modules/lru-memoizer/lib/sync.js.map +0 -1
  448. package/node_modules/lru-memoizer/lib/util.d.ts.map +0 -1
  449. package/node_modules/lru-memoizer/lib/util.js.map +0 -1
  450. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/index.js +0 -0
  451. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwe/compact/decrypt.js +0 -0
  452. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwe/compact/encrypt.js +0 -0
  453. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwe/flattened/decrypt.js +0 -0
  454. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwe/flattened/encrypt.js +0 -0
  455. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwe/general/decrypt.js +0 -0
  456. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwe/general/encrypt.js +0 -0
  457. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwk/embedded.js +0 -0
  458. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwk/thumbprint.js +0 -0
  459. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwks/local.js +0 -0
  460. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwks/remote.js +0 -0
  461. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jws/compact/sign.js +0 -0
  462. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jws/compact/verify.js +0 -0
  463. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jws/flattened/sign.js +0 -0
  464. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jws/flattened/verify.js +0 -0
  465. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jws/general/sign.js +0 -0
  466. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jws/general/verify.js +0 -0
  467. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwt/decrypt.js +0 -0
  468. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwt/encrypt.js +0 -0
  469. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwt/produce.js +0 -0
  470. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwt/sign.js +0 -0
  471. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwt/unsecured.js +0 -0
  472. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/jwt/verify.js +0 -0
  473. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/key/export.js +0 -0
  474. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/key/generate_key_pair.js +0 -0
  475. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/key/generate_secret.js +0 -0
  476. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/key/import.js +0 -0
  477. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/aesgcmkw.js +0 -0
  478. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/buffer_utils.js +0 -0
  479. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/cek.js +0 -0
  480. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/check_iv_length.js +0 -0
  481. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/check_key_type.js +0 -0
  482. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/check_p2s.js +0 -0
  483. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/crypto_key.js +0 -0
  484. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/decrypt_key_management.js +0 -0
  485. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/encrypt_key_management.js +0 -0
  486. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/epoch.js +0 -0
  487. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/format_pem.js +0 -0
  488. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/invalid_key_input.js +0 -0
  489. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/is_disjoint.js +0 -0
  490. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/is_object.js +0 -0
  491. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/iv.js +0 -0
  492. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/jwt_claims_set.js +0 -0
  493. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/secs.js +0 -0
  494. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/validate_algorithms.js +0 -0
  495. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/lib/validate_crit.js +0 -0
  496. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/package.json +0 -0
  497. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/aeskw.js +0 -0
  498. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/asn1.js +0 -0
  499. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/base64url.js +0 -0
  500. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/bogus.js +0 -0
  501. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/check_cek_length.js +0 -0
  502. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/check_key_length.js +0 -0
  503. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/decrypt.js +0 -0
  504. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/digest.js +0 -0
  505. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/ecdhes.js +0 -0
  506. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/encrypt.js +0 -0
  507. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/fetch_jwks.js +0 -0
  508. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/generate.js +0 -0
  509. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/get_sign_verify_key.js +0 -0
  510. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/is_key_like.js +0 -0
  511. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/jwk_to_key.js +0 -0
  512. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/key_to_jwk.js +0 -0
  513. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/pbes2kw.js +0 -0
  514. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/random.js +0 -0
  515. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/rsaes.js +0 -0
  516. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/runtime.js +0 -0
  517. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/sign.js +0 -0
  518. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/subtle_dsa.js +0 -0
  519. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/subtle_rsaes.js +0 -0
  520. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/timing_safe_equal.js +0 -0
  521. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/verify.js +0 -0
  522. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/webcrypto.js +0 -0
  523. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/runtime/zlib.js +0 -0
  524. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/util/base64url.js +0 -0
  525. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/util/decode_jwt.js +0 -0
  526. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/util/decode_protected_header.js +0 -0
  527. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/util/errors.js +0 -0
  528. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/browser/util/runtime.js +0 -0
  529. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/index.js +0 -0
  530. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwe/compact/decrypt.js +0 -0
  531. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwe/compact/encrypt.js +0 -0
  532. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwe/flattened/decrypt.js +0 -0
  533. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwe/flattened/encrypt.js +0 -0
  534. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwe/general/decrypt.js +0 -0
  535. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwe/general/encrypt.js +0 -0
  536. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwk/embedded.js +0 -0
  537. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwk/thumbprint.js +0 -0
  538. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwks/local.js +0 -0
  539. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwks/remote.js +0 -0
  540. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jws/compact/sign.js +0 -0
  541. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jws/compact/verify.js +0 -0
  542. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jws/flattened/sign.js +0 -0
  543. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jws/flattened/verify.js +0 -0
  544. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jws/general/sign.js +0 -0
  545. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jws/general/verify.js +0 -0
  546. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwt/decrypt.js +0 -0
  547. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwt/encrypt.js +0 -0
  548. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwt/produce.js +0 -0
  549. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwt/sign.js +0 -0
  550. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwt/unsecured.js +0 -0
  551. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/jwt/verify.js +0 -0
  552. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/key/export.js +0 -0
  553. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/key/generate_key_pair.js +0 -0
  554. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/key/generate_secret.js +0 -0
  555. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/key/import.js +0 -0
  556. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/aesgcmkw.js +0 -0
  557. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/buffer_utils.js +0 -0
  558. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/cek.js +0 -0
  559. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/check_iv_length.js +0 -0
  560. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/check_key_type.js +0 -0
  561. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/check_p2s.js +0 -0
  562. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/crypto_key.js +0 -0
  563. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/decrypt_key_management.js +0 -0
  564. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/encrypt_key_management.js +0 -0
  565. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/epoch.js +0 -0
  566. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/invalid_key_input.js +0 -0
  567. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/is_disjoint.js +0 -0
  568. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/is_object.js +0 -0
  569. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/iv.js +0 -0
  570. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/jwt_claims_set.js +0 -0
  571. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/secs.js +0 -0
  572. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/validate_algorithms.js +0 -0
  573. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/lib/validate_crit.js +0 -0
  574. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/aeskw.js +0 -0
  575. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/asn1.js +0 -0
  576. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/asn1_sequence_decoder.js +0 -0
  577. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/asn1_sequence_encoder.js +0 -0
  578. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/base64url.js +0 -0
  579. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/cbc_tag.js +0 -0
  580. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/check_cek_length.js +0 -0
  581. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/check_modulus_length.js +0 -0
  582. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/ciphers.js +0 -0
  583. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/decrypt.js +0 -0
  584. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/digest.js +0 -0
  585. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/dsa_digest.js +0 -0
  586. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/ecdhes.js +0 -0
  587. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/encrypt.js +0 -0
  588. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/fetch_jwks.js +0 -0
  589. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/flags.js +0 -0
  590. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/generate.js +0 -0
  591. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/get_named_curve.js +0 -0
  592. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/get_sign_verify_key.js +0 -0
  593. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/hmac_digest.js +0 -0
  594. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/is_key_like.js +0 -0
  595. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/is_key_object.js +0 -0
  596. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/jwk_to_key.js +0 -0
  597. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/key_to_jwk.js +0 -0
  598. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/node_key.js +0 -0
  599. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/pbes2kw.js +0 -0
  600. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/random.js +0 -0
  601. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/rsaes.js +0 -0
  602. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/runtime.js +0 -0
  603. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/sign.js +0 -0
  604. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/timing_safe_equal.js +0 -0
  605. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/verify.js +0 -0
  606. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/webcrypto.js +0 -0
  607. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/runtime/zlib.js +0 -0
  608. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/util/base64url.js +0 -0
  609. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/util/decode_jwt.js +0 -0
  610. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/util/decode_protected_header.js +0 -0
  611. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/util/errors.js +0 -0
  612. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/cjs/util/runtime.js +0 -0
  613. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/index.js +0 -0
  614. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwe/compact/decrypt.js +0 -0
  615. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwe/compact/encrypt.js +0 -0
  616. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwe/flattened/decrypt.js +0 -0
  617. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwe/flattened/encrypt.js +0 -0
  618. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwe/general/decrypt.js +0 -0
  619. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwe/general/encrypt.js +0 -0
  620. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwk/embedded.js +0 -0
  621. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwk/thumbprint.js +0 -0
  622. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwks/local.js +0 -0
  623. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwks/remote.js +0 -0
  624. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jws/compact/sign.js +0 -0
  625. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jws/compact/verify.js +0 -0
  626. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jws/flattened/sign.js +0 -0
  627. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jws/flattened/verify.js +0 -0
  628. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jws/general/sign.js +0 -0
  629. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jws/general/verify.js +0 -0
  630. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwt/decrypt.js +0 -0
  631. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwt/encrypt.js +0 -0
  632. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwt/produce.js +0 -0
  633. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwt/sign.js +0 -0
  634. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwt/unsecured.js +0 -0
  635. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/jwt/verify.js +0 -0
  636. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/key/export.js +0 -0
  637. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/key/generate_key_pair.js +0 -0
  638. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/key/generate_secret.js +0 -0
  639. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/key/import.js +0 -0
  640. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/aesgcmkw.js +0 -0
  641. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/buffer_utils.js +0 -0
  642. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/cek.js +0 -0
  643. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/check_iv_length.js +0 -0
  644. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/check_key_type.js +0 -0
  645. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/check_p2s.js +0 -0
  646. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/crypto_key.js +0 -0
  647. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/decrypt_key_management.js +0 -0
  648. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/encrypt_key_management.js +0 -0
  649. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/epoch.js +0 -0
  650. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/invalid_key_input.js +0 -0
  651. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/is_disjoint.js +0 -0
  652. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/is_object.js +0 -0
  653. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/iv.js +0 -0
  654. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/jwt_claims_set.js +0 -0
  655. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/secs.js +0 -0
  656. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/validate_algorithms.js +0 -0
  657. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/lib/validate_crit.js +0 -0
  658. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/package.json +0 -0
  659. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/aeskw.js +0 -0
  660. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/asn1.js +0 -0
  661. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/asn1_sequence_decoder.js +0 -0
  662. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/asn1_sequence_encoder.js +0 -0
  663. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/base64url.js +0 -0
  664. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/cbc_tag.js +0 -0
  665. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/check_cek_length.js +0 -0
  666. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/check_modulus_length.js +0 -0
  667. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/ciphers.js +0 -0
  668. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/decrypt.js +0 -0
  669. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/digest.js +0 -0
  670. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/dsa_digest.js +0 -0
  671. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/ecdhes.js +0 -0
  672. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/encrypt.js +0 -0
  673. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/fetch_jwks.js +0 -0
  674. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/flags.js +0 -0
  675. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/generate.js +0 -0
  676. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/get_named_curve.js +0 -0
  677. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/get_sign_verify_key.js +0 -0
  678. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/hmac_digest.js +0 -0
  679. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/is_key_like.js +0 -0
  680. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/is_key_object.js +0 -0
  681. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/jwk_to_key.js +0 -0
  682. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/key_to_jwk.js +0 -0
  683. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/node_key.js +0 -0
  684. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/pbes2kw.js +0 -0
  685. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/random.js +0 -0
  686. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/rsaes.js +0 -0
  687. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/runtime.js +0 -0
  688. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/sign.js +0 -0
  689. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/timing_safe_equal.js +0 -0
  690. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/verify.js +0 -0
  691. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/webcrypto.js +0 -0
  692. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/runtime/zlib.js +0 -0
  693. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/util/base64url.js +0 -0
  694. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/util/decode_jwt.js +0 -0
  695. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/util/decode_protected_header.js +0 -0
  696. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/util/errors.js +0 -0
  697. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/node/esm/util/runtime.js +0 -0
  698. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/types/jwt/produce.d.ts +0 -0
  699. /package/node_modules/{@microsoft/teams.apps/node_modules/jose → jose}/dist/types/util/runtime.d.ts +0 -0
  700. /package/node_modules/{@microsoft/teams.apps/node_modules/lru-cache → lru-cache}/LICENSE +0 -0
  701. /package/node_modules/{@microsoft/teams.apps/node_modules/lru-cache → lru-cache}/index.js +0 -0
@@ -1,1722 +0,0 @@
1
- /**
2
- * @module LRUCache
3
- */
4
- import { metrics, tracing } from './diagnostics-channel.js';
5
- import { defaultPerf } from './perf.js';
6
- const hasSubscribers = () => metrics.hasSubscribers || tracing.hasSubscribers;
7
- const warned = new Set();
8
- /* c8 ignore start */
9
- const PROCESS = (typeof process === 'object' && !!process ?
10
- process
11
- : {});
12
- /* c8 ignore stop */
13
- const emitWarning = (msg, type, code, fn) => {
14
- if (typeof PROCESS.emitWarning === 'function') {
15
- PROCESS.emitWarning(msg, type, code, fn);
16
- }
17
- else {
18
- //oxlint-disable-next-line no-console
19
- console.error(`[${code}] ${type}: ${msg}`);
20
- }
21
- };
22
- const shouldWarn = (code) => !warned.has(code);
23
- const TYPE = Symbol('type');
24
- const isPosInt = (n) => !!n && n === Math.floor(n) && n > 0 && isFinite(n);
25
- // This is a little bit ridiculous, tbh.
26
- // The maximum array length is 2^32-1 or thereabouts on most JS impls.
27
- // And well before that point, you're caching the entire world, I mean,
28
- // that's ~32GB of just integers for the next/prev links, plus whatever
29
- // else to hold that many keys and values. Just filling the memory with
30
- // zeroes at init time is brutal when you get that big.
31
- // But why not be complete?
32
- // Maybe in the future, these limits will have expanded.
33
- /* c8 ignore start */
34
- const getUintArray = (max) => !isPosInt(max) ? null
35
- : max <= Math.pow(2, 8) ? Uint8Array
36
- : max <= Math.pow(2, 16) ? Uint16Array
37
- : max <= Math.pow(2, 32) ? Uint32Array
38
- : max <= Number.MAX_SAFE_INTEGER ? ZeroArray
39
- : null;
40
- /* c8 ignore stop */
41
- class ZeroArray extends Array {
42
- constructor(size) {
43
- super(size);
44
- this.fill(0);
45
- }
46
- }
47
- class Stack {
48
- /* c8 ignore start - not sure why this is showing up uncovered?? */
49
- heap;
50
- /* c8 ignore stop */
51
- length;
52
- // private constructor
53
- static #constructing = false;
54
- static create(max) {
55
- const HeapCls = getUintArray(max);
56
- if (!HeapCls)
57
- return [];
58
- Stack.#constructing = true;
59
- const s = new Stack(max, HeapCls);
60
- Stack.#constructing = false;
61
- return s;
62
- }
63
- constructor(max, HeapCls) {
64
- /* c8 ignore start */
65
- if (!Stack.#constructing) {
66
- throw new TypeError('instantiate Stack using Stack.create(n)');
67
- }
68
- /* c8 ignore stop */
69
- this.heap = new HeapCls(max);
70
- this.length = 0;
71
- }
72
- push(n) {
73
- this.heap[this.length++] = n;
74
- }
75
- pop() {
76
- return this.heap[--this.length];
77
- }
78
- }
79
- /**
80
- * Default export, the thing you're using this module to get.
81
- *
82
- * The `K` and `V` types define the key and value types, respectively. The
83
- * optional `FC` type defines the type of the `context` object passed to
84
- * `cache.fetch()` and `cache.memo()`.
85
- *
86
- * Keys and values **must not** be `null` or `undefined`.
87
- *
88
- * All properties from the options object (with the exception of `max`,
89
- * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are
90
- * added as normal public members. (The listed options are read-only getters.)
91
- *
92
- * Changing any of these will alter the defaults for subsequent method calls.
93
- */
94
- export class LRUCache {
95
- // options that cannot be changed without disaster
96
- #max;
97
- #maxSize;
98
- #dispose;
99
- #onInsert;
100
- #disposeAfter;
101
- #fetchMethod;
102
- #memoMethod;
103
- #perf;
104
- /**
105
- * {@link LRUCache.OptionsBase.perf}
106
- */
107
- get perf() {
108
- return this.#perf;
109
- }
110
- /**
111
- * {@link LRUCache.OptionsBase.ttl}
112
- */
113
- ttl;
114
- /**
115
- * {@link LRUCache.OptionsBase.ttlResolution}
116
- */
117
- ttlResolution;
118
- /**
119
- * {@link LRUCache.OptionsBase.ttlAutopurge}
120
- */
121
- ttlAutopurge;
122
- /**
123
- * {@link LRUCache.OptionsBase.updateAgeOnGet}
124
- */
125
- updateAgeOnGet;
126
- /**
127
- * {@link LRUCache.OptionsBase.updateAgeOnHas}
128
- */
129
- updateAgeOnHas;
130
- /**
131
- * {@link LRUCache.OptionsBase.allowStale}
132
- */
133
- allowStale;
134
- /**
135
- * {@link LRUCache.OptionsBase.noDisposeOnSet}
136
- */
137
- noDisposeOnSet;
138
- /**
139
- * {@link LRUCache.OptionsBase.noUpdateTTL}
140
- */
141
- noUpdateTTL;
142
- /**
143
- * {@link LRUCache.OptionsBase.maxEntrySize}
144
- */
145
- maxEntrySize;
146
- /**
147
- * {@link LRUCache.OptionsBase.sizeCalculation}
148
- */
149
- sizeCalculation;
150
- /**
151
- * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
152
- */
153
- noDeleteOnFetchRejection;
154
- /**
155
- * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
156
- */
157
- noDeleteOnStaleGet;
158
- /**
159
- * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
160
- */
161
- allowStaleOnFetchAbort;
162
- /**
163
- * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
164
- */
165
- allowStaleOnFetchRejection;
166
- /**
167
- * {@link LRUCache.OptionsBase.ignoreFetchAbort}
168
- */
169
- ignoreFetchAbort;
170
- /** {@link LRUCache.OptionsBase.backgroundFetchSize} */
171
- backgroundFetchSize;
172
- // computed properties
173
- #size;
174
- #calculatedSize;
175
- #keyMap;
176
- #keyList;
177
- #valList;
178
- #next;
179
- #prev;
180
- #head;
181
- #tail;
182
- #free;
183
- #disposed;
184
- #sizes;
185
- #starts;
186
- #ttls;
187
- #autopurgeTimers;
188
- #hasDispose;
189
- #hasFetchMethod;
190
- #hasDisposeAfter;
191
- #hasOnInsert;
192
- /**
193
- * Do not call this method unless you need to inspect the
194
- * inner workings of the cache. If anything returned by this
195
- * object is modified in any way, strange breakage may occur.
196
- *
197
- * These fields are private for a reason!
198
- *
199
- * @internal
200
- */
201
- static unsafeExposeInternals(c) {
202
- return {
203
- // properties
204
- starts: c.#starts,
205
- ttls: c.#ttls,
206
- autopurgeTimers: c.#autopurgeTimers,
207
- sizes: c.#sizes,
208
- keyMap: c.#keyMap,
209
- keyList: c.#keyList,
210
- valList: c.#valList,
211
- next: c.#next,
212
- prev: c.#prev,
213
- get head() {
214
- return c.#head;
215
- },
216
- get tail() {
217
- return c.#tail;
218
- },
219
- free: c.#free,
220
- // methods
221
- isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
222
- backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
223
- moveToTail: (index) => c.#moveToTail(index),
224
- indexes: (options) => c.#indexes(options),
225
- rindexes: (options) => c.#rindexes(options),
226
- isStale: (index) => c.#isStale(index),
227
- };
228
- }
229
- // Protected read-only members
230
- /**
231
- * {@link LRUCache.OptionsBase.max} (read-only)
232
- */
233
- get max() {
234
- return this.#max;
235
- }
236
- /**
237
- * {@link LRUCache.OptionsBase.maxSize} (read-only)
238
- */
239
- get maxSize() {
240
- return this.#maxSize;
241
- }
242
- /**
243
- * The total computed size of items in the cache (read-only)
244
- */
245
- get calculatedSize() {
246
- return this.#calculatedSize;
247
- }
248
- /**
249
- * The number of items stored in the cache (read-only)
250
- */
251
- get size() {
252
- return this.#size;
253
- }
254
- /**
255
- * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
256
- */
257
- get fetchMethod() {
258
- return this.#fetchMethod;
259
- }
260
- get memoMethod() {
261
- return this.#memoMethod;
262
- }
263
- /**
264
- * {@link LRUCache.OptionsBase.dispose} (read-only)
265
- */
266
- get dispose() {
267
- return this.#dispose;
268
- }
269
- /**
270
- * {@link LRUCache.OptionsBase.onInsert} (read-only)
271
- */
272
- get onInsert() {
273
- return this.#onInsert;
274
- }
275
- /**
276
- * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
277
- */
278
- get disposeAfter() {
279
- return this.#disposeAfter;
280
- }
281
- constructor(options) {
282
- const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, onInsert, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, backgroundFetchSize = 1, perf, } = options;
283
- this.backgroundFetchSize = backgroundFetchSize;
284
- if (perf !== undefined) {
285
- if (typeof perf?.now !== 'function') {
286
- throw new TypeError('perf option must have a now() method if specified');
287
- }
288
- }
289
- this.#perf = perf ?? defaultPerf;
290
- if (max !== 0 && !isPosInt(max)) {
291
- throw new TypeError('max option must be a nonnegative integer');
292
- }
293
- const UintArray = max ? getUintArray(max) : Array;
294
- if (!UintArray) {
295
- throw new Error('invalid max value: ' + max);
296
- }
297
- this.#max = max;
298
- this.#maxSize = maxSize;
299
- this.maxEntrySize = maxEntrySize || this.#maxSize;
300
- this.sizeCalculation = sizeCalculation;
301
- if (this.sizeCalculation) {
302
- if (!this.#maxSize && !this.maxEntrySize) {
303
- throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize');
304
- }
305
- if (typeof this.sizeCalculation !== 'function') {
306
- throw new TypeError('sizeCalculation set to non-function');
307
- }
308
- }
309
- if (memoMethod !== undefined && typeof memoMethod !== 'function') {
310
- throw new TypeError('memoMethod must be a function if defined');
311
- }
312
- this.#memoMethod = memoMethod;
313
- if (fetchMethod !== undefined && typeof fetchMethod !== 'function') {
314
- throw new TypeError('fetchMethod must be a function if specified');
315
- }
316
- this.#fetchMethod = fetchMethod;
317
- this.#hasFetchMethod = !!fetchMethod;
318
- this.#keyMap = new Map();
319
- this.#keyList = Array.from({ length: max }).fill(undefined);
320
- this.#valList = Array.from({ length: max }).fill(undefined);
321
- this.#next = new UintArray(max);
322
- this.#prev = new UintArray(max);
323
- this.#head = 0;
324
- this.#tail = 0;
325
- this.#free = Stack.create(max);
326
- this.#size = 0;
327
- this.#calculatedSize = 0;
328
- if (typeof dispose === 'function') {
329
- this.#dispose = dispose;
330
- }
331
- if (typeof onInsert === 'function') {
332
- this.#onInsert = onInsert;
333
- }
334
- if (typeof disposeAfter === 'function') {
335
- this.#disposeAfter = disposeAfter;
336
- this.#disposed = [];
337
- }
338
- else {
339
- this.#disposeAfter = undefined;
340
- this.#disposed = undefined;
341
- }
342
- this.#hasDispose = !!this.#dispose;
343
- this.#hasOnInsert = !!this.#onInsert;
344
- this.#hasDisposeAfter = !!this.#disposeAfter;
345
- this.noDisposeOnSet = !!noDisposeOnSet;
346
- this.noUpdateTTL = !!noUpdateTTL;
347
- this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
348
- this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
349
- this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
350
- this.ignoreFetchAbort = !!ignoreFetchAbort;
351
- // NB: maxEntrySize is set to maxSize if it's set
352
- if (this.maxEntrySize !== 0) {
353
- if (this.#maxSize !== 0) {
354
- if (!isPosInt(this.#maxSize)) {
355
- throw new TypeError('maxSize must be a positive integer if specified');
356
- }
357
- }
358
- if (!isPosInt(this.maxEntrySize)) {
359
- throw new TypeError('maxEntrySize must be a positive integer if specified');
360
- }
361
- this.#initializeSizeTracking();
362
- }
363
- this.allowStale = !!allowStale;
364
- this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
365
- this.updateAgeOnGet = !!updateAgeOnGet;
366
- this.updateAgeOnHas = !!updateAgeOnHas;
367
- this.ttlResolution =
368
- isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1;
369
- this.ttlAutopurge = !!ttlAutopurge;
370
- this.ttl = ttl || 0;
371
- if (this.ttl) {
372
- if (!isPosInt(this.ttl)) {
373
- throw new TypeError('ttl must be a positive integer if specified');
374
- }
375
- this.#initializeTTLTracking();
376
- }
377
- // do not allow completely unbounded caches
378
- if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
379
- throw new TypeError('At least one of max, maxSize, or ttl is required');
380
- }
381
- if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
382
- const code = 'LRU_CACHE_UNBOUNDED';
383
- if (shouldWarn(code)) {
384
- warned.add(code);
385
- const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' +
386
- 'result in unbounded memory consumption.';
387
- emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache);
388
- }
389
- }
390
- }
391
- /**
392
- * Return the number of ms left in the item's TTL. If item is not in cache,
393
- * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
394
- */
395
- getRemainingTTL(key) {
396
- return this.#keyMap.has(key) ? Infinity : 0;
397
- }
398
- #initializeTTLTracking() {
399
- const ttls = new ZeroArray(this.#max);
400
- const starts = new ZeroArray(this.#max);
401
- this.#ttls = ttls;
402
- this.#starts = starts;
403
- const purgeTimers = this.ttlAutopurge ?
404
- Array.from({
405
- length: this.#max,
406
- })
407
- : undefined;
408
- this.#autopurgeTimers = purgeTimers;
409
- this.#setItemTTL = (index, ttl, start = this.#perf.now()) => {
410
- starts[index] = ttl !== 0 ? start : 0;
411
- ttls[index] = ttl;
412
- setPurgetTimer(index, ttl);
413
- };
414
- this.#updateItemAge = index => {
415
- starts[index] = ttls[index] !== 0 ? this.#perf.now() : 0;
416
- setPurgetTimer(index, ttls[index]);
417
- };
418
- // clear out the purge timer if we're setting TTL to 0, and
419
- // previously had a ttl purge timer running, so it doesn't
420
- // fire unnecessarily. Don't need to do this if we're not doing
421
- // autopurge.
422
- const setPurgetTimer = !this.ttlAutopurge ?
423
- () => { }
424
- : (index, ttl) => {
425
- if (purgeTimers?.[index]) {
426
- clearTimeout(purgeTimers[index]);
427
- purgeTimers[index] = undefined;
428
- }
429
- if (ttl && ttl !== 0 && purgeTimers) {
430
- const t = setTimeout(() => {
431
- if (this.#isStale(index)) {
432
- this.#delete(this.#keyList[index], 'expire');
433
- }
434
- }, ttl + 1);
435
- // unref() not supported on all platforms
436
- /* c8 ignore start */
437
- if (t.unref) {
438
- t.unref();
439
- }
440
- /* c8 ignore stop */
441
- purgeTimers[index] = t;
442
- }
443
- };
444
- this.#statusTTL = (status, index) => {
445
- if (ttls[index]) {
446
- const ttl = ttls[index];
447
- const start = starts[index];
448
- /* c8 ignore start */
449
- if (!ttl || !start) {
450
- return;
451
- }
452
- /* c8 ignore stop */
453
- status.ttl = ttl;
454
- status.start = start;
455
- status.now = cachedNow || getNow();
456
- const age = status.now - start;
457
- status.remainingTTL = ttl - age;
458
- }
459
- };
460
- // debounce calls to perf.now() to 1s so we're not hitting
461
- // that costly call repeatedly.
462
- let cachedNow = 0;
463
- const getNow = () => {
464
- const n = this.#perf.now();
465
- if (this.ttlResolution > 0) {
466
- cachedNow = n;
467
- const t = setTimeout(() => (cachedNow = 0), this.ttlResolution);
468
- // not available on all platforms
469
- /* c8 ignore start */
470
- if (t.unref) {
471
- t.unref();
472
- }
473
- /* c8 ignore stop */
474
- }
475
- return n;
476
- };
477
- this.getRemainingTTL = key => {
478
- const index = this.#keyMap.get(key);
479
- if (index === undefined) {
480
- return 0;
481
- }
482
- const ttl = ttls[index];
483
- const start = starts[index];
484
- if (!ttl || !start) {
485
- return Infinity;
486
- }
487
- const age = (cachedNow || getNow()) - start;
488
- return ttl - age;
489
- };
490
- this.#isStale = index => {
491
- const s = starts[index];
492
- const t = ttls[index];
493
- return !!t && !!s && (cachedNow || getNow()) - s > t;
494
- };
495
- }
496
- // conditionally set private methods related to TTL
497
- #updateItemAge = () => { };
498
- #statusTTL = () => { };
499
- #setItemTTL = () => { };
500
- /* c8 ignore stop */
501
- #isStale = () => false;
502
- #initializeSizeTracking() {
503
- const sizes = new ZeroArray(this.#max);
504
- this.#calculatedSize = 0;
505
- this.#sizes = sizes;
506
- this.#removeItemSize = index => {
507
- this.#calculatedSize -= sizes[index];
508
- sizes[index] = 0;
509
- };
510
- this.#requireSize = (k, v, size, sizeCalculation) => {
511
- if (!isPosInt(size)) {
512
- // provisionally accept background fetches.
513
- // actual value size will be checked when they return.
514
- if (this.#isBackgroundFetch(v)) {
515
- // NB: this cannot occur if v.__staleWhileFetching is set,
516
- // because in that case, it would take on the size of the
517
- // existing entry that it temporarily replaces.
518
- return this.backgroundFetchSize;
519
- }
520
- if (sizeCalculation) {
521
- if (typeof sizeCalculation !== 'function') {
522
- throw new TypeError('sizeCalculation must be a function');
523
- }
524
- size = sizeCalculation(v, k);
525
- if (!isPosInt(size)) {
526
- throw new TypeError('sizeCalculation return invalid (expect positive integer)');
527
- }
528
- }
529
- else {
530
- throw new TypeError('invalid size value (must be positive integer). ' +
531
- 'When maxSize or maxEntrySize is used, sizeCalculation ' +
532
- 'or size must be set.');
533
- }
534
- }
535
- return size;
536
- };
537
- this.#addItemSize = (index, size, status) => {
538
- sizes[index] = size;
539
- if (this.#maxSize) {
540
- const maxSize = this.#maxSize - sizes[index];
541
- while (this.#calculatedSize > maxSize) {
542
- this.#evict(true);
543
- }
544
- }
545
- this.#calculatedSize += sizes[index];
546
- if (status) {
547
- status.entrySize = size;
548
- status.totalCalculatedSize = this.#calculatedSize;
549
- }
550
- };
551
- }
552
- #removeItemSize = _i => { };
553
- #addItemSize = (_i, _s, _st) => { };
554
- #requireSize = (_k, _v, size, sizeCalculation) => {
555
- if (size || sizeCalculation) {
556
- throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache');
557
- }
558
- return 0;
559
- };
560
- *#indexes({ allowStale = this.allowStale } = {}) {
561
- if (this.#size) {
562
- for (let i = this.#tail; this.#isValidIndex(i);) {
563
- if (allowStale || !this.#isStale(i)) {
564
- yield i;
565
- }
566
- if (i === this.#head) {
567
- break;
568
- }
569
- else {
570
- i = this.#prev[i];
571
- }
572
- }
573
- }
574
- }
575
- *#rindexes({ allowStale = this.allowStale } = {}) {
576
- if (this.#size) {
577
- for (let i = this.#head; this.#isValidIndex(i);) {
578
- if (allowStale || !this.#isStale(i)) {
579
- yield i;
580
- }
581
- if (i === this.#tail) {
582
- break;
583
- }
584
- else {
585
- i = this.#next[i];
586
- }
587
- }
588
- }
589
- }
590
- #isValidIndex(index) {
591
- return (index !== undefined &&
592
- this.#keyMap.get(this.#keyList[index]) === index);
593
- }
594
- /**
595
- * Return a generator yielding `[key, value]` pairs,
596
- * in order from most recently used to least recently used.
597
- */
598
- *entries() {
599
- for (const i of this.#indexes()) {
600
- if (this.#valList[i] !== undefined &&
601
- this.#keyList[i] !== undefined &&
602
- !this.#isBackgroundFetch(this.#valList[i])) {
603
- yield [this.#keyList[i], this.#valList[i]];
604
- }
605
- }
606
- }
607
- /**
608
- * Inverse order version of {@link LRUCache.entries}
609
- *
610
- * Return a generator yielding `[key, value]` pairs,
611
- * in order from least recently used to most recently used.
612
- */
613
- *rentries() {
614
- for (const i of this.#rindexes()) {
615
- if (this.#valList[i] !== undefined &&
616
- this.#keyList[i] !== undefined &&
617
- !this.#isBackgroundFetch(this.#valList[i])) {
618
- yield [this.#keyList[i], this.#valList[i]];
619
- }
620
- }
621
- }
622
- /**
623
- * Return a generator yielding the keys in the cache,
624
- * in order from most recently used to least recently used.
625
- */
626
- *keys() {
627
- for (const i of this.#indexes()) {
628
- const k = this.#keyList[i];
629
- if (k !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
630
- yield k;
631
- }
632
- }
633
- }
634
- /**
635
- * Inverse order version of {@link LRUCache.keys}
636
- *
637
- * Return a generator yielding the keys in the cache,
638
- * in order from least recently used to most recently used.
639
- */
640
- *rkeys() {
641
- for (const i of this.#rindexes()) {
642
- const k = this.#keyList[i];
643
- if (k !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
644
- yield k;
645
- }
646
- }
647
- }
648
- /**
649
- * Return a generator yielding the values in the cache,
650
- * in order from most recently used to least recently used.
651
- */
652
- *values() {
653
- for (const i of this.#indexes()) {
654
- const v = this.#valList[i];
655
- if (v !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
656
- yield this.#valList[i];
657
- }
658
- }
659
- }
660
- /**
661
- * Inverse order version of {@link LRUCache.values}
662
- *
663
- * Return a generator yielding the values in the cache,
664
- * in order from least recently used to most recently used.
665
- */
666
- *rvalues() {
667
- for (const i of this.#rindexes()) {
668
- const v = this.#valList[i];
669
- if (v !== undefined && !this.#isBackgroundFetch(this.#valList[i])) {
670
- yield this.#valList[i];
671
- }
672
- }
673
- }
674
- /**
675
- * Iterating over the cache itself yields the same results as
676
- * {@link LRUCache.entries}
677
- */
678
- [Symbol.iterator]() {
679
- return this.entries();
680
- }
681
- /**
682
- * A String value that is used in the creation of the default string
683
- * description of an object. Called by the built-in method
684
- * `Object.prototype.toString`.
685
- */
686
- [Symbol.toStringTag] = 'LRUCache';
687
- /**
688
- * Find a value for which the supplied fn method returns a truthy value,
689
- * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
690
- */
691
- find(fn, getOptions = {}) {
692
- for (const i of this.#indexes()) {
693
- const v = this.#valList[i];
694
- const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
695
- if (value === undefined)
696
- continue;
697
- if (fn(value, this.#keyList[i], this)) {
698
- return this.#get(this.#keyList[i], getOptions);
699
- }
700
- }
701
- }
702
- /**
703
- * Call the supplied function on each item in the cache, in order from most
704
- * recently used to least recently used.
705
- *
706
- * `fn` is called as `fn(value, key, cache)`.
707
- *
708
- * If `thisp` is provided, function will be called in the `this`-context of
709
- * the provided object, or the cache if no `thisp` object is provided.
710
- *
711
- * Does not update age or recenty of use, or iterate over stale values.
712
- */
713
- forEach(fn, thisp = this) {
714
- for (const i of this.#indexes()) {
715
- const v = this.#valList[i];
716
- const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
717
- if (value === undefined)
718
- continue;
719
- fn.call(thisp, value, this.#keyList[i], this);
720
- }
721
- }
722
- /**
723
- * The same as {@link LRUCache.forEach} but items are iterated over in
724
- * reverse order. (ie, less recently used items are iterated over first.)
725
- */
726
- rforEach(fn, thisp = this) {
727
- for (const i of this.#rindexes()) {
728
- const v = this.#valList[i];
729
- const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
730
- if (value === undefined)
731
- continue;
732
- fn.call(thisp, value, this.#keyList[i], this);
733
- }
734
- }
735
- /**
736
- * Delete any stale entries. Returns true if anything was removed,
737
- * false otherwise.
738
- */
739
- purgeStale() {
740
- let deleted = false;
741
- for (const i of this.#rindexes({ allowStale: true })) {
742
- if (this.#isStale(i)) {
743
- this.#delete(this.#keyList[i], 'expire');
744
- deleted = true;
745
- }
746
- }
747
- return deleted;
748
- }
749
- /**
750
- * Get the extended info about a given entry, to get its value, size, and
751
- * TTL info simultaneously. Returns `undefined` if the key is not present.
752
- *
753
- * Unlike {@link LRUCache#dump}, which is designed to be portable and survive
754
- * serialization, the `start` value is always the current timestamp, and the
755
- * `ttl` is a calculated remaining time to live (negative if expired).
756
- *
757
- * Always returns stale values, if their info is found in the cache, so be
758
- * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
759
- * if relevant.
760
- */
761
- info(key) {
762
- const i = this.#keyMap.get(key);
763
- if (i === undefined)
764
- return undefined;
765
- const v = this.#valList[i];
766
- /* c8 ignore start - this isn't tested for the info function,
767
- * but it's the same logic as found in other places. */
768
- const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
769
- if (value === undefined)
770
- return undefined;
771
- /* c8 ignore stop */
772
- const entry = { value };
773
- if (this.#ttls && this.#starts) {
774
- const ttl = this.#ttls[i];
775
- const start = this.#starts[i];
776
- if (ttl && start) {
777
- const remain = ttl - (this.#perf.now() - start);
778
- entry.ttl = remain;
779
- entry.start = Date.now();
780
- }
781
- }
782
- if (this.#sizes) {
783
- entry.size = this.#sizes[i];
784
- }
785
- return entry;
786
- }
787
- /**
788
- * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
789
- * passed to {@link LRUCache#load}.
790
- *
791
- * The `start` fields are calculated relative to a portable `Date.now()`
792
- * timestamp, even if `performance.now()` is available.
793
- *
794
- * Stale entries are always included in the `dump`, even if
795
- * {@link LRUCache.OptionsBase.allowStale} is false.
796
- *
797
- * Note: this returns an actual array, not a generator, so it can be more
798
- * easily passed around.
799
- */
800
- dump() {
801
- const arr = [];
802
- for (const i of this.#indexes({ allowStale: true })) {
803
- const key = this.#keyList[i];
804
- const v = this.#valList[i];
805
- const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
806
- if (value === undefined || key === undefined)
807
- continue;
808
- const entry = { value };
809
- if (this.#ttls && this.#starts) {
810
- entry.ttl = this.#ttls[i];
811
- // always dump the start relative to a portable timestamp
812
- // it's ok for this to be a bit slow, it's a rare operation.
813
- const age = this.#perf.now() - this.#starts[i];
814
- entry.start = Math.floor(Date.now() - age);
815
- }
816
- if (this.#sizes) {
817
- entry.size = this.#sizes[i];
818
- }
819
- arr.unshift([key, entry]);
820
- }
821
- return arr;
822
- }
823
- /**
824
- * Reset the cache and load in the items in entries in the order listed.
825
- *
826
- * The shape of the resulting cache may be different if the same options are
827
- * not used in both caches.
828
- *
829
- * The `start` fields are assumed to be calculated relative to a portable
830
- * `Date.now()` timestamp, even if `performance.now()` is available.
831
- */
832
- load(arr) {
833
- this.clear();
834
- for (const [key, entry] of arr) {
835
- if (entry.start) {
836
- // entry.start is a portable timestamp, but we may be using
837
- // node's performance.now(), so calculate the offset, so that
838
- // we get the intended remaining TTL, no matter how long it's
839
- // been on ice.
840
- //
841
- // it's ok for this to be a bit slow, it's a rare operation.
842
- const age = Date.now() - entry.start;
843
- entry.start = this.#perf.now() - age;
844
- }
845
- this.#set(key, entry.value, entry);
846
- }
847
- }
848
- /**
849
- * Add a value to the cache.
850
- *
851
- * Note: if `undefined` is specified as a value, this is an alias for
852
- * {@link LRUCache#delete}
853
- *
854
- * Fields on the {@link LRUCache.SetOptions} options param will override
855
- * their corresponding values in the constructor options for the scope
856
- * of this single `set()` operation.
857
- *
858
- * If `start` is provided, then that will set the effective start
859
- * time for the TTL calculation. Note that this must be a previous
860
- * value of `performance.now()` if supported, or a previous value of
861
- * `Date.now()` if not.
862
- *
863
- * Options object may also include `size`, which will prevent
864
- * calling the `sizeCalculation` function and just use the specified
865
- * number if it is a positive integer, and `noDisposeOnSet` which
866
- * will prevent calling a `dispose` function in the case of
867
- * overwrites.
868
- *
869
- * If the `size` (or return value of `sizeCalculation`) for a given
870
- * entry is greater than `maxEntrySize`, then the item will not be
871
- * added to the cache.
872
- *
873
- * Will update the recency of the entry.
874
- *
875
- * If the value is `undefined`, then this is an alias for
876
- * `cache.delete(key)`. `undefined` is never stored in the cache.
877
- */
878
- set(k, v, setOptions = {}) {
879
- const { status = metrics.hasSubscribers ? {} : undefined } = setOptions;
880
- setOptions.status = status;
881
- if (status) {
882
- status.op = 'set';
883
- status.key = k;
884
- if (v !== undefined)
885
- status.value = v;
886
- status.cache = this;
887
- }
888
- const result = this.#set(k, v, setOptions);
889
- if (status && metrics.hasSubscribers) {
890
- metrics.publish(status);
891
- }
892
- return result;
893
- }
894
- #set(k, v, setOptions, bf) {
895
- const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions;
896
- const isBF = this.#isBackgroundFetch(v);
897
- if (v === undefined) {
898
- if (status)
899
- status.set = 'deleted';
900
- this.delete(k);
901
- return this;
902
- }
903
- let { noUpdateTTL = this.noUpdateTTL } = setOptions;
904
- if (status && !isBF)
905
- status.value = v;
906
- const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation, status);
907
- // if the item doesn't fit, don't do anything
908
- // NB: maxEntrySize set to maxSize by default
909
- if (this.maxEntrySize && size > this.maxEntrySize) {
910
- // have to delete, in case something is there already.
911
- this.#delete(k, 'set');
912
- if (status) {
913
- status.set = 'miss';
914
- status.maxEntrySizeExceeded = true;
915
- }
916
- return this;
917
- }
918
- let index = this.#size === 0 ? undefined : this.#keyMap.get(k);
919
- if (index === undefined) {
920
- // addition
921
- index = (this.#size === 0 ? this.#tail
922
- : this.#free.length !== 0 ? this.#free.pop()
923
- : this.#size === this.#max ? this.#evict(false)
924
- : this.#size);
925
- this.#keyList[index] = k;
926
- this.#valList[index] = v;
927
- this.#keyMap.set(k, index);
928
- this.#next[this.#tail] = index;
929
- this.#prev[index] = this.#tail;
930
- this.#tail = index;
931
- this.#size++;
932
- this.#addItemSize(index, size, status);
933
- if (status)
934
- status.set = 'add';
935
- noUpdateTTL = false;
936
- if (this.#hasOnInsert && !isBF) {
937
- this.#onInsert?.(v, k, 'add');
938
- }
939
- }
940
- else {
941
- // update
942
- // might be updating a background fetch!
943
- this.#moveToTail(index);
944
- const oldVal = this.#valList[index];
945
- if (v !== oldVal) {
946
- if (!noDisposeOnSet) {
947
- if (this.#isBackgroundFetch(oldVal)) {
948
- if (oldVal !== bf) {
949
- // setting over a background fetch, not merely resolving it.
950
- oldVal.__abortController.abort(new Error('replaced'));
951
- }
952
- const { __staleWhileFetching: s } = oldVal;
953
- if (s !== undefined && s !== v) {
954
- if (this.#hasDispose) {
955
- this.#dispose?.(s, k, 'set');
956
- }
957
- if (this.#hasDisposeAfter) {
958
- this.#disposed?.push([s, k, 'set']);
959
- }
960
- }
961
- }
962
- else {
963
- if (this.#hasDispose) {
964
- this.#dispose?.(oldVal, k, 'set');
965
- }
966
- if (this.#hasDisposeAfter) {
967
- this.#disposed?.push([oldVal, k, 'set']);
968
- }
969
- }
970
- }
971
- this.#removeItemSize(index);
972
- this.#addItemSize(index, size, status);
973
- this.#valList[index] = v;
974
- if (!isBF) {
975
- const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ?
976
- oldVal.__staleWhileFetching
977
- : oldVal;
978
- const setType = oldValue === undefined ? 'add'
979
- : v !== oldValue ? 'replace'
980
- : 'update';
981
- if (status) {
982
- status.set = setType;
983
- if (oldValue !== undefined)
984
- status.oldValue = oldValue;
985
- }
986
- if (this.#hasOnInsert) {
987
- this.onInsert?.(v, k, setType);
988
- }
989
- }
990
- }
991
- else if (!isBF) {
992
- if (status) {
993
- status.set = 'update';
994
- }
995
- if (this.#hasOnInsert) {
996
- this.onInsert?.(v, k, 'update');
997
- }
998
- }
999
- }
1000
- if (ttl !== 0 && !this.#ttls) {
1001
- this.#initializeTTLTracking();
1002
- }
1003
- if (this.#ttls) {
1004
- if (!noUpdateTTL) {
1005
- this.#setItemTTL(index, ttl, start);
1006
- }
1007
- if (status)
1008
- this.#statusTTL(status, index);
1009
- }
1010
- if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
1011
- const dt = this.#disposed;
1012
- let task;
1013
- while ((task = dt?.shift())) {
1014
- this.#disposeAfter?.(...task);
1015
- }
1016
- }
1017
- return this;
1018
- }
1019
- /**
1020
- * Evict the least recently used item, returning its value or
1021
- * `undefined` if cache is empty.
1022
- */
1023
- pop() {
1024
- try {
1025
- while (this.#size) {
1026
- const val = this.#valList[this.#head];
1027
- this.#evict(true);
1028
- if (this.#isBackgroundFetch(val)) {
1029
- if (val.__staleWhileFetching) {
1030
- return val.__staleWhileFetching;
1031
- }
1032
- }
1033
- else if (val !== undefined) {
1034
- return val;
1035
- }
1036
- }
1037
- }
1038
- finally {
1039
- if (this.#hasDisposeAfter && this.#disposed) {
1040
- const dt = this.#disposed;
1041
- let task;
1042
- while ((task = dt?.shift())) {
1043
- this.#disposeAfter?.(...task);
1044
- }
1045
- }
1046
- }
1047
- }
1048
- #evict(free) {
1049
- const head = this.#head;
1050
- const k = this.#keyList[head];
1051
- const v = this.#valList[head];
1052
- const isBF = this.#isBackgroundFetch(v);
1053
- if (isBF) {
1054
- v.__abortController.abort(new Error('evicted'));
1055
- }
1056
- const oldValue = isBF ? v.__staleWhileFetching : v;
1057
- if ((this.#hasDispose || this.#hasDisposeAfter) &&
1058
- oldValue !== undefined) {
1059
- if (this.#hasDispose) {
1060
- this.#dispose?.(oldValue, k, 'evict');
1061
- }
1062
- if (this.#hasDisposeAfter) {
1063
- this.#disposed?.push([oldValue, k, 'evict']);
1064
- }
1065
- }
1066
- this.#removeItemSize(head);
1067
- if (this.#autopurgeTimers?.[head]) {
1068
- clearTimeout(this.#autopurgeTimers[head]);
1069
- this.#autopurgeTimers[head] = undefined;
1070
- }
1071
- // if we aren't about to use the index, then null these out
1072
- if (free) {
1073
- this.#keyList[head] = undefined;
1074
- this.#valList[head] = undefined;
1075
- this.#free.push(head);
1076
- }
1077
- if (this.#size === 1) {
1078
- this.#head = this.#tail = 0;
1079
- this.#free.length = 0;
1080
- }
1081
- else {
1082
- this.#head = this.#next[head];
1083
- }
1084
- this.#keyMap.delete(k);
1085
- this.#size--;
1086
- return head;
1087
- }
1088
- /**
1089
- * Check if a key is in the cache, without updating the recency of use.
1090
- * Will return false if the item is stale, even though it is technically
1091
- * in the cache.
1092
- *
1093
- * Check if a key is in the cache, without updating the recency of
1094
- * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
1095
- * to `true` in either the options or the constructor.
1096
- *
1097
- * Will return `false` if the item is stale, even though it is technically in
1098
- * the cache. The difference can be determined (if it matters) by using a
1099
- * `status` argument, and inspecting the `has` field.
1100
- *
1101
- * Will not update item age unless
1102
- * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
1103
- */
1104
- has(k, hasOptions = {}) {
1105
- const { status = metrics.hasSubscribers ? {} : undefined } = hasOptions;
1106
- hasOptions.status = status;
1107
- if (status) {
1108
- status.op = 'has';
1109
- status.key = k;
1110
- status.cache = this;
1111
- }
1112
- const result = this.#has(k, hasOptions);
1113
- if (metrics.hasSubscribers)
1114
- metrics.publish(status);
1115
- return result;
1116
- }
1117
- #has(k, hasOptions = {}) {
1118
- const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
1119
- const index = this.#keyMap.get(k);
1120
- if (index !== undefined) {
1121
- const v = this.#valList[index];
1122
- if (this.#isBackgroundFetch(v) &&
1123
- v.__staleWhileFetching === undefined) {
1124
- return false;
1125
- }
1126
- if (!this.#isStale(index)) {
1127
- if (updateAgeOnHas) {
1128
- this.#updateItemAge(index);
1129
- }
1130
- if (status) {
1131
- status.has = 'hit';
1132
- this.#statusTTL(status, index);
1133
- }
1134
- return true;
1135
- }
1136
- else if (status) {
1137
- status.has = 'stale';
1138
- this.#statusTTL(status, index);
1139
- }
1140
- }
1141
- else if (status) {
1142
- status.has = 'miss';
1143
- }
1144
- return false;
1145
- }
1146
- /**
1147
- * Like {@link LRUCache#get} but doesn't update recency or delete stale
1148
- * items.
1149
- *
1150
- * Returns `undefined` if the item is stale, unless
1151
- * {@link LRUCache.OptionsBase.allowStale} is set.
1152
- */
1153
- peek(k, peekOptions = {}) {
1154
- const { status = hasSubscribers() ? {} : undefined } = peekOptions;
1155
- if (status) {
1156
- status.op = 'peek';
1157
- status.key = k;
1158
- status.cache = this;
1159
- }
1160
- peekOptions.status = status;
1161
- const result = this.#peek(k, peekOptions);
1162
- if (metrics.hasSubscribers) {
1163
- metrics.publish(status);
1164
- }
1165
- return result;
1166
- }
1167
- #peek(k, peekOptions) {
1168
- const { status, allowStale = this.allowStale } = peekOptions;
1169
- const index = this.#keyMap.get(k);
1170
- if (index === undefined || (!allowStale && this.#isStale(index))) {
1171
- if (status)
1172
- status.peek = index === undefined ? 'miss' : 'stale';
1173
- return undefined;
1174
- }
1175
- const v = this.#valList[index];
1176
- const val = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
1177
- if (status) {
1178
- if (val !== undefined) {
1179
- status.peek = 'hit';
1180
- status.value = val;
1181
- }
1182
- else {
1183
- status.peek = 'miss';
1184
- }
1185
- }
1186
- return val;
1187
- }
1188
- #backgroundFetch(k, index, options, context) {
1189
- const v = index === undefined ? undefined : this.#valList[index];
1190
- if (this.#isBackgroundFetch(v)) {
1191
- return v;
1192
- }
1193
- const ac = new AbortController();
1194
- const { signal } = options;
1195
- // when/if our AC signals, then stop listening to theirs.
1196
- signal?.addEventListener('abort', () => ac.abort(signal.reason), {
1197
- signal: ac.signal,
1198
- });
1199
- const fetchOpts = {
1200
- signal: ac.signal,
1201
- options,
1202
- context,
1203
- };
1204
- const cb = (v, updateCache = false) => {
1205
- const { aborted } = ac.signal;
1206
- const ignoreAbort = options.ignoreFetchAbort && v !== undefined;
1207
- const proceed = options.ignoreFetchAbort ||
1208
- !!(options.allowStaleOnFetchAbort && v !== undefined);
1209
- if (options.status) {
1210
- if (aborted && !updateCache) {
1211
- options.status.fetchAborted = true;
1212
- options.status.fetchError = ac.signal.reason;
1213
- if (ignoreAbort)
1214
- options.status.fetchAbortIgnored = true;
1215
- }
1216
- else {
1217
- options.status.fetchResolved = true;
1218
- }
1219
- }
1220
- if (aborted && !ignoreAbort && !updateCache) {
1221
- return fetchFail(ac.signal.reason, proceed);
1222
- }
1223
- // either we didn't abort, and are still here, or we did, and ignored
1224
- const bf = p;
1225
- // if nothing else has been written there but we're set to update the
1226
- // cache and ignore the abort, or if it's still pending on this specific
1227
- // background request, then write it to the cache.
1228
- const vl = this.#valList[index];
1229
- if (vl === p || (vl === undefined && ignoreAbort && updateCache)) {
1230
- if (v === undefined) {
1231
- if (bf.__staleWhileFetching !== undefined) {
1232
- this.#valList[index] = bf.__staleWhileFetching;
1233
- }
1234
- else {
1235
- this.#delete(k, 'fetch');
1236
- }
1237
- }
1238
- else {
1239
- if (options.status)
1240
- options.status.fetchUpdated = true;
1241
- this.#set(k, v, fetchOpts.options, bf);
1242
- }
1243
- }
1244
- return v;
1245
- };
1246
- const eb = (er) => {
1247
- if (options.status) {
1248
- options.status.fetchRejected = true;
1249
- options.status.fetchError = er;
1250
- }
1251
- // do not pass go, do not collect $200
1252
- return fetchFail(er, false);
1253
- };
1254
- const fetchFail = (er, proceed) => {
1255
- const { aborted } = ac.signal;
1256
- const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
1257
- const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
1258
- const noDelete = allowStale || options.noDeleteOnFetchRejection;
1259
- const bf = p;
1260
- if (this.#valList[index] === p) {
1261
- // if we allow stale on fetch rejections, then we need to ensure that
1262
- // the stale value is not removed from the cache when the fetch fails.
1263
- const del = !noDelete || (!proceed && bf.__staleWhileFetching === undefined);
1264
- if (del) {
1265
- this.#delete(k, 'fetch');
1266
- }
1267
- else if (!allowStaleAborted) {
1268
- // still replace the *promise* with the stale value,
1269
- // since we are done with the promise at this point.
1270
- // leave it untouched if we're still waiting for an
1271
- // aborted background fetch that hasn't yet returned.
1272
- this.#valList[index] = bf.__staleWhileFetching;
1273
- }
1274
- }
1275
- if (allowStale) {
1276
- if (options.status && bf.__staleWhileFetching !== undefined) {
1277
- options.status.returnedStale = true;
1278
- }
1279
- return bf.__staleWhileFetching;
1280
- }
1281
- else if (bf.__returned === bf) {
1282
- throw er;
1283
- }
1284
- };
1285
- const pcall = (res, rej) => {
1286
- const fmp = this.#fetchMethod?.(k, v, fetchOpts);
1287
- // ignored, we go until we finish, regardless.
1288
- // defer check until we are actually aborting,
1289
- // so fetchMethod can override.
1290
- ac.signal.addEventListener('abort', () => {
1291
- if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
1292
- res(undefined);
1293
- // when it eventually resolves, update the cache.
1294
- if (options.allowStaleOnFetchAbort) {
1295
- res = v => cb(v, true);
1296
- }
1297
- }
1298
- });
1299
- if (fmp && fmp instanceof Promise) {
1300
- fmp.then(v => res(v === undefined ? undefined : v), rej);
1301
- }
1302
- else if (fmp !== undefined) {
1303
- res(fmp);
1304
- }
1305
- };
1306
- if (options.status)
1307
- options.status.fetchDispatched = true;
1308
- const p = new Promise(pcall).then(cb, eb);
1309
- const bf = Object.assign(p, {
1310
- __abortController: ac,
1311
- __staleWhileFetching: v,
1312
- __returned: undefined,
1313
- });
1314
- if (index === undefined) {
1315
- // internal, don't expose status.
1316
- this.#set(k, bf, { ...fetchOpts.options, status: undefined });
1317
- index = this.#keyMap.get(k);
1318
- }
1319
- else {
1320
- // do not call #set, because we do not want to adjust its place
1321
- // in the lru queue, as it has not yet been "used". Also, we don't
1322
- // need to worry about evicting for size, because a background fetch
1323
- // over a stale value is treated as the same size as its stale value.
1324
- this.#valList[index] = bf;
1325
- }
1326
- return bf;
1327
- }
1328
- #isBackgroundFetch(p) {
1329
- if (!this.#hasFetchMethod)
1330
- return false;
1331
- const b = p;
1332
- return (!!b &&
1333
- b instanceof Promise &&
1334
- b.hasOwnProperty('__staleWhileFetching') &&
1335
- b.__abortController instanceof AbortController);
1336
- }
1337
- fetch(k, fetchOptions = {}) {
1338
- const ths = tracing.hasSubscribers;
1339
- const { status = hasSubscribers() ? {} : undefined } = fetchOptions;
1340
- fetchOptions.status = status;
1341
- if (status && fetchOptions.context) {
1342
- status.context = fetchOptions.context;
1343
- }
1344
- const p = this.#fetch(k, fetchOptions);
1345
- if (status && ths) {
1346
- status.trace = true;
1347
- tracing.tracePromise(() => p, status).catch(() => { });
1348
- }
1349
- return p;
1350
- }
1351
- async #fetch(k, fetchOptions = {}) {
1352
- const {
1353
- // get options
1354
- allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet,
1355
- // set options
1356
- ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL,
1357
- // fetch exclusive options
1358
- noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions;
1359
- if (status) {
1360
- status.op = 'fetch';
1361
- status.key = k;
1362
- if (forceRefresh)
1363
- status.forceRefresh = true;
1364
- status.cache = this;
1365
- }
1366
- if (!this.#hasFetchMethod) {
1367
- if (status)
1368
- status.fetch = 'get';
1369
- return this.#get(k, {
1370
- allowStale,
1371
- updateAgeOnGet,
1372
- noDeleteOnStaleGet,
1373
- status,
1374
- });
1375
- }
1376
- const options = {
1377
- allowStale,
1378
- updateAgeOnGet,
1379
- noDeleteOnStaleGet,
1380
- ttl,
1381
- noDisposeOnSet,
1382
- size,
1383
- sizeCalculation,
1384
- noUpdateTTL,
1385
- noDeleteOnFetchRejection,
1386
- allowStaleOnFetchRejection,
1387
- allowStaleOnFetchAbort,
1388
- ignoreFetchAbort,
1389
- status,
1390
- signal,
1391
- };
1392
- let index = this.#keyMap.get(k);
1393
- if (index === undefined) {
1394
- if (status)
1395
- status.fetch = 'miss';
1396
- const p = this.#backgroundFetch(k, index, options, context);
1397
- return (p.__returned = p);
1398
- }
1399
- else {
1400
- // in cache, maybe already fetching
1401
- const v = this.#valList[index];
1402
- if (this.#isBackgroundFetch(v)) {
1403
- const stale = allowStale && v.__staleWhileFetching !== undefined;
1404
- if (status) {
1405
- status.fetch = 'inflight';
1406
- if (stale)
1407
- status.returnedStale = true;
1408
- }
1409
- return stale ? v.__staleWhileFetching : (v.__returned = v);
1410
- }
1411
- // if we force a refresh, that means do NOT serve the cached value,
1412
- // unless we are already in the process of refreshing the cache.
1413
- const isStale = this.#isStale(index);
1414
- if (!forceRefresh && !isStale) {
1415
- if (status)
1416
- status.fetch = 'hit';
1417
- this.#moveToTail(index);
1418
- if (updateAgeOnGet) {
1419
- this.#updateItemAge(index);
1420
- }
1421
- if (status)
1422
- this.#statusTTL(status, index);
1423
- return v;
1424
- }
1425
- // ok, it is stale or a forced refresh, and not already fetching.
1426
- // refresh the cache.
1427
- const p = this.#backgroundFetch(k, index, options, context);
1428
- const hasStale = p.__staleWhileFetching !== undefined;
1429
- const staleVal = hasStale && allowStale;
1430
- if (status) {
1431
- status.fetch = isStale ? 'stale' : 'refresh';
1432
- if (staleVal && isStale)
1433
- status.returnedStale = true;
1434
- }
1435
- return staleVal ? p.__staleWhileFetching : (p.__returned = p);
1436
- }
1437
- }
1438
- forceFetch(k, fetchOptions = {}) {
1439
- const ths = tracing.hasSubscribers;
1440
- const { status = hasSubscribers() ? {} : undefined } = fetchOptions;
1441
- fetchOptions.status = status;
1442
- if (status && fetchOptions.context) {
1443
- status.context = fetchOptions.context;
1444
- }
1445
- const p = this.#forceFetch(k, fetchOptions);
1446
- if (status && ths) {
1447
- status.trace = true;
1448
- tracing.tracePromise(() => p, status).catch(() => { });
1449
- }
1450
- return p;
1451
- }
1452
- async #forceFetch(k, fetchOptions = {}) {
1453
- const v = await this.#fetch(k, fetchOptions);
1454
- if (v === undefined)
1455
- throw new Error('fetch() returned undefined');
1456
- return v;
1457
- }
1458
- memo(k, memoOptions = {}) {
1459
- const { status = metrics.hasSubscribers ? {} : undefined } = memoOptions;
1460
- memoOptions.status = status;
1461
- if (status) {
1462
- status.op = 'memo';
1463
- status.key = k;
1464
- if (memoOptions.context) {
1465
- status.context = memoOptions.context;
1466
- }
1467
- status.cache = this;
1468
- }
1469
- const result = this.#memo(k, memoOptions);
1470
- if (status)
1471
- status.value = result;
1472
- if (metrics.hasSubscribers)
1473
- metrics.publish(status);
1474
- return result;
1475
- }
1476
- #memo(k, memoOptions = {}) {
1477
- const memoMethod = this.#memoMethod;
1478
- if (!memoMethod) {
1479
- throw new Error('no memoMethod provided to constructor');
1480
- }
1481
- const { context, status, forceRefresh, ...options } = memoOptions;
1482
- if (status && forceRefresh)
1483
- status.forceRefresh = true;
1484
- const v = this.#get(k, options);
1485
- const refresh = forceRefresh || v === undefined;
1486
- if (status) {
1487
- status.memo = refresh ? 'miss' : 'hit';
1488
- if (!refresh)
1489
- status.value = v;
1490
- }
1491
- if (!refresh)
1492
- return v;
1493
- const vv = memoMethod(k, v, {
1494
- options,
1495
- context,
1496
- });
1497
- if (status)
1498
- status.value = vv;
1499
- this.#set(k, vv, options);
1500
- return vv;
1501
- }
1502
- /**
1503
- * Return a value from the cache. Will update the recency of the cache
1504
- * entry found.
1505
- *
1506
- * If the key is not found, get() will return `undefined`.
1507
- */
1508
- get(k, getOptions = {}) {
1509
- const { status = metrics.hasSubscribers ? {} : undefined } = getOptions;
1510
- getOptions.status = status;
1511
- if (status) {
1512
- status.op = 'get';
1513
- status.key = k;
1514
- status.cache = this;
1515
- }
1516
- const result = this.#get(k, getOptions);
1517
- if (status) {
1518
- if (result !== undefined)
1519
- status.value = result;
1520
- if (metrics.hasSubscribers)
1521
- metrics.publish(status);
1522
- }
1523
- return result;
1524
- }
1525
- #get(k, getOptions = {}) {
1526
- const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions;
1527
- const index = this.#keyMap.get(k);
1528
- if (index === undefined) {
1529
- if (status)
1530
- status.get = 'miss';
1531
- return undefined;
1532
- }
1533
- const value = this.#valList[index];
1534
- const fetching = this.#isBackgroundFetch(value);
1535
- if (status)
1536
- this.#statusTTL(status, index);
1537
- if (this.#isStale(index)) {
1538
- // delete only if not an in-flight background fetch
1539
- if (!fetching) {
1540
- if (!noDeleteOnStaleGet) {
1541
- this.#delete(k, 'expire');
1542
- }
1543
- if (status)
1544
- status.get = 'stale';
1545
- if (allowStale) {
1546
- if (status)
1547
- status.returnedStale = true;
1548
- return value;
1549
- }
1550
- return undefined;
1551
- }
1552
- if (status)
1553
- status.get = 'stale-fetching';
1554
- if (allowStale && value.__staleWhileFetching !== undefined) {
1555
- if (status)
1556
- status.returnedStale = true;
1557
- return value.__staleWhileFetching;
1558
- }
1559
- return undefined;
1560
- }
1561
- // not stale
1562
- if (status)
1563
- status.get = fetching ? 'fetching' : 'hit';
1564
- // if we're currently fetching it, we don't actually have it yet
1565
- // it's not stale, which means this isn't a staleWhileRefetching.
1566
- // If it's not stale, and fetching, AND has a __staleWhileFetching
1567
- // value, then that means the user fetched with {forceRefresh:true},
1568
- // so it's safe to return that value.
1569
- this.#moveToTail(index);
1570
- if (updateAgeOnGet) {
1571
- this.#updateItemAge(index);
1572
- }
1573
- return fetching ? value.__staleWhileFetching : value;
1574
- }
1575
- #connect(p, n) {
1576
- this.#prev[n] = p;
1577
- this.#next[p] = n;
1578
- }
1579
- #moveToTail(index) {
1580
- // if tail already, nothing to do
1581
- // if head, move head to next[index]
1582
- // else
1583
- // move next[prev[index]] to next[index] (head has no prev)
1584
- // move prev[next[index]] to prev[index]
1585
- // prev[index] = tail
1586
- // next[tail] = index
1587
- // tail = index
1588
- if (index !== this.#tail) {
1589
- if (index === this.#head) {
1590
- this.#head = this.#next[index];
1591
- }
1592
- else {
1593
- this.#connect(this.#prev[index], this.#next[index]);
1594
- }
1595
- this.#connect(this.#tail, index);
1596
- this.#tail = index;
1597
- }
1598
- }
1599
- /**
1600
- * Deletes a key out of the cache.
1601
- *
1602
- * Returns true if the key was deleted, false otherwise.
1603
- */
1604
- delete(k) {
1605
- return this.#delete(k, 'delete');
1606
- }
1607
- #delete(k, reason) {
1608
- if (metrics.hasSubscribers) {
1609
- metrics.publish({
1610
- op: 'delete',
1611
- delete: reason,
1612
- key: k,
1613
- cache: this,
1614
- });
1615
- }
1616
- let deleted = false;
1617
- if (this.#size !== 0) {
1618
- const index = this.#keyMap.get(k);
1619
- if (index !== undefined) {
1620
- if (this.#autopurgeTimers?.[index]) {
1621
- clearTimeout(this.#autopurgeTimers?.[index]);
1622
- this.#autopurgeTimers[index] = undefined;
1623
- }
1624
- deleted = true;
1625
- if (this.#size === 1) {
1626
- this.#clear(reason);
1627
- }
1628
- else {
1629
- this.#removeItemSize(index);
1630
- const v = this.#valList[index];
1631
- if (this.#isBackgroundFetch(v)) {
1632
- v.__abortController.abort(new Error('deleted'));
1633
- }
1634
- else if (this.#hasDispose || this.#hasDisposeAfter) {
1635
- if (this.#hasDispose) {
1636
- this.#dispose?.(v, k, reason);
1637
- }
1638
- if (this.#hasDisposeAfter) {
1639
- this.#disposed?.push([v, k, reason]);
1640
- }
1641
- }
1642
- this.#keyMap.delete(k);
1643
- this.#keyList[index] = undefined;
1644
- this.#valList[index] = undefined;
1645
- if (index === this.#tail) {
1646
- this.#tail = this.#prev[index];
1647
- }
1648
- else if (index === this.#head) {
1649
- this.#head = this.#next[index];
1650
- }
1651
- else {
1652
- const pi = this.#prev[index];
1653
- this.#next[pi] = this.#next[index];
1654
- const ni = this.#next[index];
1655
- this.#prev[ni] = this.#prev[index];
1656
- }
1657
- this.#size--;
1658
- this.#free.push(index);
1659
- }
1660
- }
1661
- }
1662
- if (this.#hasDisposeAfter && this.#disposed?.length) {
1663
- const dt = this.#disposed;
1664
- let task;
1665
- while ((task = dt?.shift())) {
1666
- this.#disposeAfter?.(...task);
1667
- }
1668
- }
1669
- return deleted;
1670
- }
1671
- /**
1672
- * Clear the cache entirely, throwing away all values.
1673
- */
1674
- clear() {
1675
- return this.#clear('delete');
1676
- }
1677
- #clear(reason) {
1678
- for (const index of this.#rindexes({ allowStale: true })) {
1679
- const v = this.#valList[index];
1680
- if (this.#isBackgroundFetch(v)) {
1681
- v.__abortController.abort(new Error('deleted'));
1682
- }
1683
- else {
1684
- const k = this.#keyList[index];
1685
- if (this.#hasDispose) {
1686
- this.#dispose?.(v, k, reason);
1687
- }
1688
- if (this.#hasDisposeAfter) {
1689
- this.#disposed?.push([v, k, reason]);
1690
- }
1691
- }
1692
- }
1693
- this.#keyMap.clear();
1694
- void this.#valList.fill(undefined);
1695
- this.#keyList.fill(undefined);
1696
- if (this.#ttls && this.#starts) {
1697
- this.#ttls.fill(0);
1698
- this.#starts.fill(0);
1699
- for (const t of this.#autopurgeTimers ?? []) {
1700
- if (t !== undefined)
1701
- clearTimeout(t);
1702
- }
1703
- this.#autopurgeTimers?.fill(undefined);
1704
- }
1705
- if (this.#sizes) {
1706
- this.#sizes.fill(0);
1707
- }
1708
- this.#head = 0;
1709
- this.#tail = 0;
1710
- this.#free.length = 0;
1711
- this.#calculatedSize = 0;
1712
- this.#size = 0;
1713
- if (this.#hasDisposeAfter && this.#disposed) {
1714
- const dt = this.#disposed;
1715
- let task;
1716
- while ((task = dt?.shift())) {
1717
- this.#disposeAfter?.(...task);
1718
- }
1719
- }
1720
- }
1721
- }
1722
- //# sourceMappingURL=index.js.map