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