@windrun-huaiin/backend-core 12.0.0 → 13.0.0

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 (270) hide show
  1. package/dist/_virtual/_commonjs-dynamic-modules.js +7 -0
  2. package/dist/_virtual/_commonjs-dynamic-modules.mjs +5 -0
  3. package/dist/_virtual/_commonjsHelpers.js +10 -0
  4. package/dist/_virtual/_commonjsHelpers.mjs +7 -0
  5. package/dist/_virtual/aes.js +5 -0
  6. package/dist/_virtual/aes.mjs +3 -0
  7. package/dist/_virtual/blowfish.js +5 -0
  8. package/dist/_virtual/blowfish.mjs +3 -0
  9. package/dist/_virtual/cipher-core.js +5 -0
  10. package/dist/_virtual/cipher-core.mjs +3 -0
  11. package/dist/_virtual/core.js +5 -0
  12. package/dist/_virtual/core.mjs +3 -0
  13. package/dist/_virtual/enc-base64.js +5 -0
  14. package/dist/_virtual/enc-base64.mjs +3 -0
  15. package/dist/_virtual/enc-base64url.js +5 -0
  16. package/dist/_virtual/enc-base64url.mjs +3 -0
  17. package/dist/_virtual/enc-utf16.js +5 -0
  18. package/dist/_virtual/enc-utf16.mjs +3 -0
  19. package/dist/_virtual/evpkdf.js +5 -0
  20. package/dist/_virtual/evpkdf.mjs +3 -0
  21. package/dist/_virtual/format-hex.js +5 -0
  22. package/dist/_virtual/format-hex.mjs +3 -0
  23. package/dist/_virtual/hmac.js +5 -0
  24. package/dist/_virtual/hmac.mjs +3 -0
  25. package/dist/_virtual/index.js +7 -0
  26. package/dist/_virtual/index.mjs +5 -0
  27. package/dist/_virtual/index2.js +9 -0
  28. package/dist/_virtual/index2.mjs +7 -0
  29. package/dist/_virtual/index3.js +5 -0
  30. package/dist/_virtual/index3.mjs +3 -0
  31. package/dist/_virtual/lib-typedarrays.js +5 -0
  32. package/dist/_virtual/lib-typedarrays.mjs +3 -0
  33. package/dist/_virtual/md5.js +5 -0
  34. package/dist/_virtual/md5.mjs +3 -0
  35. package/dist/_virtual/mode-cfb.js +5 -0
  36. package/dist/_virtual/mode-cfb.mjs +3 -0
  37. package/dist/_virtual/mode-ctr-gladman.js +5 -0
  38. package/dist/_virtual/mode-ctr-gladman.mjs +3 -0
  39. package/dist/_virtual/mode-ctr.js +5 -0
  40. package/dist/_virtual/mode-ctr.mjs +3 -0
  41. package/dist/_virtual/mode-ecb.js +5 -0
  42. package/dist/_virtual/mode-ecb.mjs +3 -0
  43. package/dist/_virtual/mode-ofb.js +5 -0
  44. package/dist/_virtual/mode-ofb.mjs +3 -0
  45. package/dist/_virtual/pad-ansix923.js +5 -0
  46. package/dist/_virtual/pad-ansix923.mjs +3 -0
  47. package/dist/_virtual/pad-iso10126.js +5 -0
  48. package/dist/_virtual/pad-iso10126.mjs +3 -0
  49. package/dist/_virtual/pad-iso97971.js +5 -0
  50. package/dist/_virtual/pad-iso97971.mjs +3 -0
  51. package/dist/_virtual/pad-nopadding.js +5 -0
  52. package/dist/_virtual/pad-nopadding.mjs +3 -0
  53. package/dist/_virtual/pad-zeropadding.js +5 -0
  54. package/dist/_virtual/pad-zeropadding.mjs +3 -0
  55. package/dist/_virtual/pbkdf2.js +5 -0
  56. package/dist/_virtual/pbkdf2.mjs +3 -0
  57. package/dist/_virtual/rabbit-legacy.js +5 -0
  58. package/dist/_virtual/rabbit-legacy.mjs +3 -0
  59. package/dist/_virtual/rabbit.js +5 -0
  60. package/dist/_virtual/rabbit.mjs +3 -0
  61. package/dist/_virtual/rc4.js +5 -0
  62. package/dist/_virtual/rc4.mjs +3 -0
  63. package/dist/_virtual/ripemd160.js +5 -0
  64. package/dist/_virtual/ripemd160.mjs +3 -0
  65. package/dist/_virtual/sha1.js +5 -0
  66. package/dist/_virtual/sha1.mjs +3 -0
  67. package/dist/_virtual/sha224.js +5 -0
  68. package/dist/_virtual/sha224.mjs +3 -0
  69. package/dist/_virtual/sha256.js +5 -0
  70. package/dist/_virtual/sha256.mjs +3 -0
  71. package/dist/_virtual/sha3.js +5 -0
  72. package/dist/_virtual/sha3.mjs +3 -0
  73. package/dist/_virtual/sha384.js +5 -0
  74. package/dist/_virtual/sha384.mjs +3 -0
  75. package/dist/_virtual/sha512.js +5 -0
  76. package/dist/_virtual/sha512.mjs +3 -0
  77. package/dist/_virtual/tripledes.js +5 -0
  78. package/dist/_virtual/tripledes.mjs +3 -0
  79. package/dist/_virtual/x64-core.js +5 -0
  80. package/dist/_virtual/x64-core.mjs +3 -0
  81. package/dist/index.js +46 -0
  82. package/dist/index.mjs +7 -0
  83. package/dist/lib/index.d.ts +2 -0
  84. package/dist/lib/index.d.ts.map +1 -1
  85. package/dist/lib/index.js +46 -0
  86. package/dist/lib/index.mjs +7 -0
  87. package/dist/lib/upstash/index.d.ts +7 -0
  88. package/dist/lib/upstash/index.d.ts.map +1 -0
  89. package/dist/lib/upstash/qstash.d.ts +36 -0
  90. package/dist/lib/upstash/qstash.d.ts.map +1 -0
  91. package/dist/lib/upstash/qstash.js +130 -0
  92. package/dist/lib/upstash/qstash.mjs +124 -0
  93. package/dist/lib/upstash/redis-counter.d.ts +17 -0
  94. package/dist/lib/upstash/redis-counter.d.ts.map +1 -0
  95. package/dist/lib/upstash/redis-counter.js +55 -0
  96. package/dist/lib/upstash/redis-counter.mjs +50 -0
  97. package/dist/lib/upstash/redis-favorite.d.ts +21 -0
  98. package/dist/lib/upstash/redis-favorite.d.ts.map +1 -0
  99. package/dist/lib/upstash/redis-favorite.js +74 -0
  100. package/dist/lib/upstash/redis-favorite.mjs +68 -0
  101. package/dist/lib/upstash/redis-like.d.ts +21 -0
  102. package/dist/lib/upstash/redis-like.d.ts.map +1 -0
  103. package/dist/lib/upstash/redis-like.js +74 -0
  104. package/dist/lib/upstash/redis-like.mjs +68 -0
  105. package/dist/lib/upstash/redis-lock.d.ts +13 -0
  106. package/dist/lib/upstash/redis-lock.d.ts.map +1 -0
  107. package/dist/lib/upstash/redis-lock.js +75 -0
  108. package/dist/lib/upstash/redis-lock.mjs +71 -0
  109. package/dist/lib/upstash/redis-structures.d.ts +63 -0
  110. package/dist/lib/upstash/redis-structures.d.ts.map +1 -0
  111. package/dist/lib/upstash/redis-structures.js +211 -0
  112. package/dist/lib/upstash/redis-structures.mjs +195 -0
  113. package/dist/lib/upstash-config.d.ts +11 -0
  114. package/dist/lib/upstash-config.d.ts.map +1 -0
  115. package/dist/lib/upstash-config.js +53 -0
  116. package/dist/lib/upstash-config.mjs +50 -0
  117. package/dist/node_modules/.pnpm/@upstash_lock@0.2.1_typescript@5.9.3/node_modules/@upstash/lock/dist/index.js +191 -0
  118. package/dist/node_modules/.pnpm/@upstash_lock@0.2.1_typescript@5.9.3/node_modules/@upstash/lock/dist/index.mjs +189 -0
  119. package/dist/node_modules/.pnpm/@upstash_qstash@2.8.4/node_modules/@upstash/qstash/chunk-RQPZUJXG.js +1419 -0
  120. package/dist/node_modules/.pnpm/@upstash_qstash@2.8.4/node_modules/@upstash/qstash/chunk-RQPZUJXG.mjs +1403 -0
  121. package/dist/node_modules/.pnpm/@upstash_redis@1.36.1/node_modules/@upstash/redis/chunk-LLI2WIYN.js +4691 -0
  122. package/dist/node_modules/.pnpm/@upstash_redis@1.36.1/node_modules/@upstash/redis/chunk-LLI2WIYN.mjs +4686 -0
  123. package/dist/node_modules/.pnpm/@upstash_redis@1.36.1/node_modules/@upstash/redis/nodejs.js +115 -0
  124. package/dist/node_modules/.pnpm/@upstash_redis@1.36.1/node_modules/@upstash/redis/nodejs.mjs +113 -0
  125. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +248 -0
  126. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.mjs +246 -0
  127. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.js +485 -0
  128. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.mjs +483 -0
  129. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +906 -0
  130. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.mjs +904 -0
  131. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +818 -0
  132. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.mjs +816 -0
  133. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +146 -0
  134. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.mjs +144 -0
  135. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.js +158 -0
  136. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.mjs +156 -0
  137. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.js +159 -0
  138. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.mjs +157 -0
  139. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +146 -0
  140. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.mjs +144 -0
  141. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.js +77 -0
  142. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.mjs +75 -0
  143. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +153 -0
  144. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.mjs +151 -0
  145. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.js +62 -0
  146. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.mjs +60 -0
  147. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.js +86 -0
  148. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.mjs +84 -0
  149. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +278 -0
  150. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.mjs +276 -0
  151. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.js +91 -0
  152. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.mjs +89 -0
  153. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.js +127 -0
  154. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.mjs +125 -0
  155. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.js +69 -0
  156. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.mjs +67 -0
  157. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +51 -0
  158. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.mjs +49 -0
  159. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.js +65 -0
  160. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.mjs +63 -0
  161. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.js +60 -0
  162. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.mjs +58 -0
  163. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.js +55 -0
  164. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.mjs +53 -0
  165. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.js +51 -0
  166. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.mjs +49 -0
  167. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.js +41 -0
  168. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.mjs +39 -0
  169. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.js +58 -0
  170. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.mjs +56 -0
  171. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.js +157 -0
  172. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.mjs +155 -0
  173. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.js +204 -0
  174. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.mjs +202 -0
  175. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.js +206 -0
  176. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.mjs +204 -0
  177. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.js +153 -0
  178. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.mjs +151 -0
  179. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.js +277 -0
  180. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.mjs +275 -0
  181. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +160 -0
  182. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.mjs +158 -0
  183. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.js +91 -0
  184. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.mjs +89 -0
  185. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.js +209 -0
  186. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.mjs +207 -0
  187. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.js +337 -0
  188. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.mjs +335 -0
  189. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.js +95 -0
  190. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.mjs +93 -0
  191. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.js +337 -0
  192. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.mjs +335 -0
  193. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.js +793 -0
  194. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.mjs +791 -0
  195. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.js +314 -0
  196. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.mjs +312 -0
  197. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/compact/verify.js +26 -0
  198. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/compact/verify.mjs +24 -0
  199. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/flattened/verify.js +127 -0
  200. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/flattened/verify.mjs +125 -0
  201. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jwt/verify.js +20 -0
  202. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jwt/verify.mjs +18 -0
  203. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/key/import.js +31 -0
  204. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/key/import.mjs +29 -0
  205. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/buffer_utils.js +18 -0
  206. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/buffer_utils.mjs +14 -0
  207. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/check_key_type.js +82 -0
  208. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/check_key_type.mjs +80 -0
  209. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/crypto_key.js +103 -0
  210. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/crypto_key.mjs +101 -0
  211. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/epoch.js +5 -0
  212. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/epoch.mjs +3 -0
  213. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/invalid_key_input.js +38 -0
  214. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/invalid_key_input.mjs +33 -0
  215. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_disjoint.js +25 -0
  216. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_disjoint.mjs +23 -0
  217. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_jwk.js +21 -0
  218. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_jwk.mjs +16 -0
  219. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_object.js +20 -0
  220. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_object.mjs +18 -0
  221. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/jwt_claims_set.js +109 -0
  222. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/jwt_claims_set.mjs +107 -0
  223. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/secs.js +59 -0
  224. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/secs.mjs +57 -0
  225. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_algorithms.js +14 -0
  226. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_algorithms.mjs +12 -0
  227. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_crit.js +38 -0
  228. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_crit.mjs +36 -0
  229. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/base64url.js +15 -0
  230. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/base64url.mjs +13 -0
  231. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/check_key_length.js +21 -0
  232. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/check_key_length.mjs +19 -0
  233. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/dsa_digest.js +28 -0
  234. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/dsa_digest.mjs +26 -0
  235. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_named_curve.js +58 -0
  236. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_named_curve.mjs +56 -0
  237. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_sign_verify_key.js +33 -0
  238. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_sign_verify_key.mjs +31 -0
  239. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/hmac_digest.js +18 -0
  240. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/hmac_digest.mjs +16 -0
  241. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_like.js +15 -0
  242. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_like.mjs +10 -0
  243. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_object.js +26 -0
  244. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_object.mjs +5 -0
  245. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/jwk_to_key.js +12 -0
  246. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/jwk_to_key.mjs +10 -0
  247. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/node_key.js +113 -0
  248. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/node_key.mjs +111 -0
  249. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/sign.js +40 -0
  250. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/sign.mjs +19 -0
  251. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/verify.js +52 -0
  252. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/verify.mjs +31 -0
  253. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/webcrypto.js +32 -0
  254. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/webcrypto.mjs +7 -0
  255. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/util/errors.js +69 -0
  256. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/util/errors.mjs +60 -0
  257. package/dist/node_modules/.pnpm/neverthrow@7.2.0/node_modules/neverthrow/dist/index.es.js +422 -0
  258. package/dist/node_modules/.pnpm/neverthrow@7.2.0/node_modules/neverthrow/dist/index.es.mjs +415 -0
  259. package/dist/node_modules/.pnpm/uncrypto@0.1.3/node_modules/uncrypto/dist/crypto.web.js +6 -0
  260. package/dist/node_modules/.pnpm/uncrypto@0.1.3/node_modules/uncrypto/dist/crypto.web.mjs +4 -0
  261. package/package.json +14 -11
  262. package/src/lib/index.ts +2 -0
  263. package/src/lib/upstash/index.ts +6 -0
  264. package/src/lib/upstash/qstash.ts +157 -0
  265. package/src/lib/upstash/redis-counter.ts +51 -0
  266. package/src/lib/upstash/redis-favorite.ts +75 -0
  267. package/src/lib/upstash/redis-like.ts +75 -0
  268. package/src/lib/upstash/redis-lock.ts +85 -0
  269. package/src/lib/upstash/redis-structures.ts +249 -0
  270. package/src/lib/upstash-config.ts +54 -0
@@ -0,0 +1,314 @@
1
+ 'use strict';
2
+
3
+ var x64Core$1 = require('../../../../../_virtual/x64-core.js');
4
+ var core = require('./core.js');
5
+
6
+ var x64Core = x64Core$1.__module.exports;
7
+
8
+ var hasRequiredX64Core;
9
+
10
+ function requireX64Core () {
11
+ if (hasRequiredX64Core) return x64Core$1.__module.exports;
12
+ hasRequiredX64Core = 1;
13
+ (function (module, exports) {
14
+ (function (root, factory) {
15
+ {
16
+ // CommonJS
17
+ module.exports = factory(core.__require());
18
+ }
19
+ }(x64Core, function (CryptoJS) {
20
+
21
+ (function (undefined$1) {
22
+ // Shortcuts
23
+ var C = CryptoJS;
24
+ var C_lib = C.lib;
25
+ var Base = C_lib.Base;
26
+ var X32WordArray = C_lib.WordArray;
27
+
28
+ /**
29
+ * x64 namespace.
30
+ */
31
+ var C_x64 = C.x64 = {};
32
+
33
+ /**
34
+ * A 64-bit word.
35
+ */
36
+ C_x64.Word = Base.extend({
37
+ /**
38
+ * Initializes a newly created 64-bit word.
39
+ *
40
+ * @param {number} high The high 32 bits.
41
+ * @param {number} low The low 32 bits.
42
+ *
43
+ * @example
44
+ *
45
+ * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
46
+ */
47
+ init: function (high, low) {
48
+ this.high = high;
49
+ this.low = low;
50
+ }
51
+
52
+ /**
53
+ * Bitwise NOTs this word.
54
+ *
55
+ * @return {X64Word} A new x64-Word object after negating.
56
+ *
57
+ * @example
58
+ *
59
+ * var negated = x64Word.not();
60
+ */
61
+ // not: function () {
62
+ // var high = ~this.high;
63
+ // var low = ~this.low;
64
+
65
+ // return X64Word.create(high, low);
66
+ // },
67
+
68
+ /**
69
+ * Bitwise ANDs this word with the passed word.
70
+ *
71
+ * @param {X64Word} word The x64-Word to AND with this word.
72
+ *
73
+ * @return {X64Word} A new x64-Word object after ANDing.
74
+ *
75
+ * @example
76
+ *
77
+ * var anded = x64Word.and(anotherX64Word);
78
+ */
79
+ // and: function (word) {
80
+ // var high = this.high & word.high;
81
+ // var low = this.low & word.low;
82
+
83
+ // return X64Word.create(high, low);
84
+ // },
85
+
86
+ /**
87
+ * Bitwise ORs this word with the passed word.
88
+ *
89
+ * @param {X64Word} word The x64-Word to OR with this word.
90
+ *
91
+ * @return {X64Word} A new x64-Word object after ORing.
92
+ *
93
+ * @example
94
+ *
95
+ * var ored = x64Word.or(anotherX64Word);
96
+ */
97
+ // or: function (word) {
98
+ // var high = this.high | word.high;
99
+ // var low = this.low | word.low;
100
+
101
+ // return X64Word.create(high, low);
102
+ // },
103
+
104
+ /**
105
+ * Bitwise XORs this word with the passed word.
106
+ *
107
+ * @param {X64Word} word The x64-Word to XOR with this word.
108
+ *
109
+ * @return {X64Word} A new x64-Word object after XORing.
110
+ *
111
+ * @example
112
+ *
113
+ * var xored = x64Word.xor(anotherX64Word);
114
+ */
115
+ // xor: function (word) {
116
+ // var high = this.high ^ word.high;
117
+ // var low = this.low ^ word.low;
118
+
119
+ // return X64Word.create(high, low);
120
+ // },
121
+
122
+ /**
123
+ * Shifts this word n bits to the left.
124
+ *
125
+ * @param {number} n The number of bits to shift.
126
+ *
127
+ * @return {X64Word} A new x64-Word object after shifting.
128
+ *
129
+ * @example
130
+ *
131
+ * var shifted = x64Word.shiftL(25);
132
+ */
133
+ // shiftL: function (n) {
134
+ // if (n < 32) {
135
+ // var high = (this.high << n) | (this.low >>> (32 - n));
136
+ // var low = this.low << n;
137
+ // } else {
138
+ // var high = this.low << (n - 32);
139
+ // var low = 0;
140
+ // }
141
+
142
+ // return X64Word.create(high, low);
143
+ // },
144
+
145
+ /**
146
+ * Shifts this word n bits to the right.
147
+ *
148
+ * @param {number} n The number of bits to shift.
149
+ *
150
+ * @return {X64Word} A new x64-Word object after shifting.
151
+ *
152
+ * @example
153
+ *
154
+ * var shifted = x64Word.shiftR(7);
155
+ */
156
+ // shiftR: function (n) {
157
+ // if (n < 32) {
158
+ // var low = (this.low >>> n) | (this.high << (32 - n));
159
+ // var high = this.high >>> n;
160
+ // } else {
161
+ // var low = this.high >>> (n - 32);
162
+ // var high = 0;
163
+ // }
164
+
165
+ // return X64Word.create(high, low);
166
+ // },
167
+
168
+ /**
169
+ * Rotates this word n bits to the left.
170
+ *
171
+ * @param {number} n The number of bits to rotate.
172
+ *
173
+ * @return {X64Word} A new x64-Word object after rotating.
174
+ *
175
+ * @example
176
+ *
177
+ * var rotated = x64Word.rotL(25);
178
+ */
179
+ // rotL: function (n) {
180
+ // return this.shiftL(n).or(this.shiftR(64 - n));
181
+ // },
182
+
183
+ /**
184
+ * Rotates this word n bits to the right.
185
+ *
186
+ * @param {number} n The number of bits to rotate.
187
+ *
188
+ * @return {X64Word} A new x64-Word object after rotating.
189
+ *
190
+ * @example
191
+ *
192
+ * var rotated = x64Word.rotR(7);
193
+ */
194
+ // rotR: function (n) {
195
+ // return this.shiftR(n).or(this.shiftL(64 - n));
196
+ // },
197
+
198
+ /**
199
+ * Adds this word with the passed word.
200
+ *
201
+ * @param {X64Word} word The x64-Word to add with this word.
202
+ *
203
+ * @return {X64Word} A new x64-Word object after adding.
204
+ *
205
+ * @example
206
+ *
207
+ * var added = x64Word.add(anotherX64Word);
208
+ */
209
+ // add: function (word) {
210
+ // var low = (this.low + word.low) | 0;
211
+ // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
212
+ // var high = (this.high + word.high + carry) | 0;
213
+
214
+ // return X64Word.create(high, low);
215
+ // }
216
+ });
217
+
218
+ /**
219
+ * An array of 64-bit words.
220
+ *
221
+ * @property {Array} words The array of CryptoJS.x64.Word objects.
222
+ * @property {number} sigBytes The number of significant bytes in this word array.
223
+ */
224
+ C_x64.WordArray = Base.extend({
225
+ /**
226
+ * Initializes a newly created word array.
227
+ *
228
+ * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
229
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
230
+ *
231
+ * @example
232
+ *
233
+ * var wordArray = CryptoJS.x64.WordArray.create();
234
+ *
235
+ * var wordArray = CryptoJS.x64.WordArray.create([
236
+ * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
237
+ * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
238
+ * ]);
239
+ *
240
+ * var wordArray = CryptoJS.x64.WordArray.create([
241
+ * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
242
+ * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
243
+ * ], 10);
244
+ */
245
+ init: function (words, sigBytes) {
246
+ words = this.words = words || [];
247
+
248
+ if (sigBytes != undefined$1) {
249
+ this.sigBytes = sigBytes;
250
+ } else {
251
+ this.sigBytes = words.length * 8;
252
+ }
253
+ },
254
+
255
+ /**
256
+ * Converts this 64-bit word array to a 32-bit word array.
257
+ *
258
+ * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
259
+ *
260
+ * @example
261
+ *
262
+ * var x32WordArray = x64WordArray.toX32();
263
+ */
264
+ toX32: function () {
265
+ // Shortcuts
266
+ var x64Words = this.words;
267
+ var x64WordsLength = x64Words.length;
268
+
269
+ // Convert
270
+ var x32Words = [];
271
+ for (var i = 0; i < x64WordsLength; i++) {
272
+ var x64Word = x64Words[i];
273
+ x32Words.push(x64Word.high);
274
+ x32Words.push(x64Word.low);
275
+ }
276
+
277
+ return X32WordArray.create(x32Words, this.sigBytes);
278
+ },
279
+
280
+ /**
281
+ * Creates a copy of this word array.
282
+ *
283
+ * @return {X64WordArray} The clone.
284
+ *
285
+ * @example
286
+ *
287
+ * var clone = x64WordArray.clone();
288
+ */
289
+ clone: function () {
290
+ var clone = Base.clone.call(this);
291
+
292
+ // Clone "words" array
293
+ var words = clone.words = this.words.slice(0);
294
+
295
+ // Clone each X64Word object
296
+ var wordsLength = words.length;
297
+ for (var i = 0; i < wordsLength; i++) {
298
+ words[i] = words[i].clone();
299
+ }
300
+
301
+ return clone;
302
+ }
303
+ });
304
+ }());
305
+
306
+
307
+ return CryptoJS;
308
+
309
+ }));
310
+ } (x64Core$1.__module));
311
+ return x64Core$1.__module.exports;
312
+ }
313
+
314
+ exports.__require = requireX64Core;
@@ -0,0 +1,312 @@
1
+ import { __module as x64Core$1 } from '../../../../../_virtual/x64-core.mjs';
2
+ import { __require as requireCore } from './core.mjs';
3
+
4
+ var x64Core = x64Core$1.exports;
5
+
6
+ var hasRequiredX64Core;
7
+
8
+ function requireX64Core () {
9
+ if (hasRequiredX64Core) return x64Core$1.exports;
10
+ hasRequiredX64Core = 1;
11
+ (function (module, exports) {
12
+ (function (root, factory) {
13
+ {
14
+ // CommonJS
15
+ module.exports = factory(requireCore());
16
+ }
17
+ }(x64Core, function (CryptoJS) {
18
+
19
+ (function (undefined$1) {
20
+ // Shortcuts
21
+ var C = CryptoJS;
22
+ var C_lib = C.lib;
23
+ var Base = C_lib.Base;
24
+ var X32WordArray = C_lib.WordArray;
25
+
26
+ /**
27
+ * x64 namespace.
28
+ */
29
+ var C_x64 = C.x64 = {};
30
+
31
+ /**
32
+ * A 64-bit word.
33
+ */
34
+ C_x64.Word = Base.extend({
35
+ /**
36
+ * Initializes a newly created 64-bit word.
37
+ *
38
+ * @param {number} high The high 32 bits.
39
+ * @param {number} low The low 32 bits.
40
+ *
41
+ * @example
42
+ *
43
+ * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
44
+ */
45
+ init: function (high, low) {
46
+ this.high = high;
47
+ this.low = low;
48
+ }
49
+
50
+ /**
51
+ * Bitwise NOTs this word.
52
+ *
53
+ * @return {X64Word} A new x64-Word object after negating.
54
+ *
55
+ * @example
56
+ *
57
+ * var negated = x64Word.not();
58
+ */
59
+ // not: function () {
60
+ // var high = ~this.high;
61
+ // var low = ~this.low;
62
+
63
+ // return X64Word.create(high, low);
64
+ // },
65
+
66
+ /**
67
+ * Bitwise ANDs this word with the passed word.
68
+ *
69
+ * @param {X64Word} word The x64-Word to AND with this word.
70
+ *
71
+ * @return {X64Word} A new x64-Word object after ANDing.
72
+ *
73
+ * @example
74
+ *
75
+ * var anded = x64Word.and(anotherX64Word);
76
+ */
77
+ // and: function (word) {
78
+ // var high = this.high & word.high;
79
+ // var low = this.low & word.low;
80
+
81
+ // return X64Word.create(high, low);
82
+ // },
83
+
84
+ /**
85
+ * Bitwise ORs this word with the passed word.
86
+ *
87
+ * @param {X64Word} word The x64-Word to OR with this word.
88
+ *
89
+ * @return {X64Word} A new x64-Word object after ORing.
90
+ *
91
+ * @example
92
+ *
93
+ * var ored = x64Word.or(anotherX64Word);
94
+ */
95
+ // or: function (word) {
96
+ // var high = this.high | word.high;
97
+ // var low = this.low | word.low;
98
+
99
+ // return X64Word.create(high, low);
100
+ // },
101
+
102
+ /**
103
+ * Bitwise XORs this word with the passed word.
104
+ *
105
+ * @param {X64Word} word The x64-Word to XOR with this word.
106
+ *
107
+ * @return {X64Word} A new x64-Word object after XORing.
108
+ *
109
+ * @example
110
+ *
111
+ * var xored = x64Word.xor(anotherX64Word);
112
+ */
113
+ // xor: function (word) {
114
+ // var high = this.high ^ word.high;
115
+ // var low = this.low ^ word.low;
116
+
117
+ // return X64Word.create(high, low);
118
+ // },
119
+
120
+ /**
121
+ * Shifts this word n bits to the left.
122
+ *
123
+ * @param {number} n The number of bits to shift.
124
+ *
125
+ * @return {X64Word} A new x64-Word object after shifting.
126
+ *
127
+ * @example
128
+ *
129
+ * var shifted = x64Word.shiftL(25);
130
+ */
131
+ // shiftL: function (n) {
132
+ // if (n < 32) {
133
+ // var high = (this.high << n) | (this.low >>> (32 - n));
134
+ // var low = this.low << n;
135
+ // } else {
136
+ // var high = this.low << (n - 32);
137
+ // var low = 0;
138
+ // }
139
+
140
+ // return X64Word.create(high, low);
141
+ // },
142
+
143
+ /**
144
+ * Shifts this word n bits to the right.
145
+ *
146
+ * @param {number} n The number of bits to shift.
147
+ *
148
+ * @return {X64Word} A new x64-Word object after shifting.
149
+ *
150
+ * @example
151
+ *
152
+ * var shifted = x64Word.shiftR(7);
153
+ */
154
+ // shiftR: function (n) {
155
+ // if (n < 32) {
156
+ // var low = (this.low >>> n) | (this.high << (32 - n));
157
+ // var high = this.high >>> n;
158
+ // } else {
159
+ // var low = this.high >>> (n - 32);
160
+ // var high = 0;
161
+ // }
162
+
163
+ // return X64Word.create(high, low);
164
+ // },
165
+
166
+ /**
167
+ * Rotates this word n bits to the left.
168
+ *
169
+ * @param {number} n The number of bits to rotate.
170
+ *
171
+ * @return {X64Word} A new x64-Word object after rotating.
172
+ *
173
+ * @example
174
+ *
175
+ * var rotated = x64Word.rotL(25);
176
+ */
177
+ // rotL: function (n) {
178
+ // return this.shiftL(n).or(this.shiftR(64 - n));
179
+ // },
180
+
181
+ /**
182
+ * Rotates this word n bits to the right.
183
+ *
184
+ * @param {number} n The number of bits to rotate.
185
+ *
186
+ * @return {X64Word} A new x64-Word object after rotating.
187
+ *
188
+ * @example
189
+ *
190
+ * var rotated = x64Word.rotR(7);
191
+ */
192
+ // rotR: function (n) {
193
+ // return this.shiftR(n).or(this.shiftL(64 - n));
194
+ // },
195
+
196
+ /**
197
+ * Adds this word with the passed word.
198
+ *
199
+ * @param {X64Word} word The x64-Word to add with this word.
200
+ *
201
+ * @return {X64Word} A new x64-Word object after adding.
202
+ *
203
+ * @example
204
+ *
205
+ * var added = x64Word.add(anotherX64Word);
206
+ */
207
+ // add: function (word) {
208
+ // var low = (this.low + word.low) | 0;
209
+ // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
210
+ // var high = (this.high + word.high + carry) | 0;
211
+
212
+ // return X64Word.create(high, low);
213
+ // }
214
+ });
215
+
216
+ /**
217
+ * An array of 64-bit words.
218
+ *
219
+ * @property {Array} words The array of CryptoJS.x64.Word objects.
220
+ * @property {number} sigBytes The number of significant bytes in this word array.
221
+ */
222
+ C_x64.WordArray = Base.extend({
223
+ /**
224
+ * Initializes a newly created word array.
225
+ *
226
+ * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
227
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
228
+ *
229
+ * @example
230
+ *
231
+ * var wordArray = CryptoJS.x64.WordArray.create();
232
+ *
233
+ * var wordArray = CryptoJS.x64.WordArray.create([
234
+ * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
235
+ * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
236
+ * ]);
237
+ *
238
+ * var wordArray = CryptoJS.x64.WordArray.create([
239
+ * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
240
+ * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
241
+ * ], 10);
242
+ */
243
+ init: function (words, sigBytes) {
244
+ words = this.words = words || [];
245
+
246
+ if (sigBytes != undefined$1) {
247
+ this.sigBytes = sigBytes;
248
+ } else {
249
+ this.sigBytes = words.length * 8;
250
+ }
251
+ },
252
+
253
+ /**
254
+ * Converts this 64-bit word array to a 32-bit word array.
255
+ *
256
+ * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
257
+ *
258
+ * @example
259
+ *
260
+ * var x32WordArray = x64WordArray.toX32();
261
+ */
262
+ toX32: function () {
263
+ // Shortcuts
264
+ var x64Words = this.words;
265
+ var x64WordsLength = x64Words.length;
266
+
267
+ // Convert
268
+ var x32Words = [];
269
+ for (var i = 0; i < x64WordsLength; i++) {
270
+ var x64Word = x64Words[i];
271
+ x32Words.push(x64Word.high);
272
+ x32Words.push(x64Word.low);
273
+ }
274
+
275
+ return X32WordArray.create(x32Words, this.sigBytes);
276
+ },
277
+
278
+ /**
279
+ * Creates a copy of this word array.
280
+ *
281
+ * @return {X64WordArray} The clone.
282
+ *
283
+ * @example
284
+ *
285
+ * var clone = x64WordArray.clone();
286
+ */
287
+ clone: function () {
288
+ var clone = Base.clone.call(this);
289
+
290
+ // Clone "words" array
291
+ var words = clone.words = this.words.slice(0);
292
+
293
+ // Clone each X64Word object
294
+ var wordsLength = words.length;
295
+ for (var i = 0; i < wordsLength; i++) {
296
+ words[i] = words[i].clone();
297
+ }
298
+
299
+ return clone;
300
+ }
301
+ });
302
+ }());
303
+
304
+
305
+ return CryptoJS;
306
+
307
+ }));
308
+ } (x64Core$1));
309
+ return x64Core$1.exports;
310
+ }
311
+
312
+ export { requireX64Core as __require };
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var verify = require('../flattened/verify.js');
4
+ var errors = require('../../util/errors.js');
5
+ var buffer_utils = require('../../lib/buffer_utils.js');
6
+
7
+ async function compactVerify(jws, key, options) {
8
+ if (jws instanceof Uint8Array) {
9
+ jws = buffer_utils.decoder.decode(jws);
10
+ }
11
+ if (typeof jws !== 'string') {
12
+ throw new errors.JWSInvalid('Compact JWS must be a string or Uint8Array');
13
+ }
14
+ const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.');
15
+ if (length !== 3) {
16
+ throw new errors.JWSInvalid('Invalid Compact JWS');
17
+ }
18
+ const verified = await verify.flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);
19
+ const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };
20
+ if (typeof key === 'function') {
21
+ return { ...result, key: verified.key };
22
+ }
23
+ return result;
24
+ }
25
+
26
+ exports.compactVerify = compactVerify;
@@ -0,0 +1,24 @@
1
+ import { flattenedVerify } from '../flattened/verify.mjs';
2
+ import { JWSInvalid } from '../../util/errors.mjs';
3
+ import { decoder } from '../../lib/buffer_utils.mjs';
4
+
5
+ async function compactVerify(jws, key, options) {
6
+ if (jws instanceof Uint8Array) {
7
+ jws = decoder.decode(jws);
8
+ }
9
+ if (typeof jws !== 'string') {
10
+ throw new JWSInvalid('Compact JWS must be a string or Uint8Array');
11
+ }
12
+ const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split('.');
13
+ if (length !== 3) {
14
+ throw new JWSInvalid('Invalid Compact JWS');
15
+ }
16
+ const verified = await flattenedVerify({ payload, protected: protectedHeader, signature }, key, options);
17
+ const result = { payload: verified.payload, protectedHeader: verified.protectedHeader };
18
+ if (typeof key === 'function') {
19
+ return { ...result, key: verified.key };
20
+ }
21
+ return result;
22
+ }
23
+
24
+ export { compactVerify };