@windrun-huaiin/backend-core 14.6.0 → 15.1.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 (281) hide show
  1. package/dist/app/api/stripe/checkout/route.js +2 -2
  2. package/dist/app/api/stripe/checkout/route.mjs +1 -1
  3. package/dist/app/api/stripe/customer-portal/route.js +2 -2
  4. package/dist/app/api/stripe/customer-portal/route.mjs +1 -1
  5. package/dist/app/api/user/anonymous/init/route.js +6 -6
  6. package/dist/app/api/user/anonymous/init/route.mjs +1 -1
  7. package/dist/app/api/webhook/clerk/user/route.js +4 -4
  8. package/dist/app/api/webhook/clerk/user/route.mjs +1 -1
  9. package/dist/app/api/webhook/stripe/route.js +2 -2
  10. package/dist/app/api/webhook/stripe/route.mjs +1 -1
  11. package/dist/auth/auth-middleware.js +3 -3
  12. package/dist/auth/auth-middleware.mjs +1 -1
  13. package/dist/auth/auth-utils.js +10 -10
  14. package/dist/auth/auth-utils.mjs +1 -1
  15. package/dist/lib/money-price-helper.js +3 -3
  16. package/dist/lib/money-price-helper.mjs +1 -1
  17. package/dist/lib/stripe-config.js +8 -8
  18. package/dist/lib/stripe-config.mjs +1 -1
  19. package/dist/lib/upstash/qstash.js +12 -12
  20. package/dist/lib/upstash/qstash.mjs +2 -2
  21. package/dist/lib/upstash/redis-counter.js +7 -7
  22. package/dist/lib/upstash/redis-counter.mjs +1 -1
  23. package/dist/lib/upstash/redis-favorite.js +9 -9
  24. package/dist/lib/upstash/redis-favorite.mjs +1 -1
  25. package/dist/lib/upstash/redis-like.js +9 -9
  26. package/dist/lib/upstash/redis-like.mjs +1 -1
  27. package/dist/lib/upstash/redis-lock.js +6 -6
  28. package/dist/lib/upstash/redis-lock.mjs +1 -1
  29. package/dist/lib/upstash/redis-structures.js +25 -25
  30. package/dist/lib/upstash/redis-structures.mjs +1 -1
  31. package/dist/lib/upstash-config.js +14 -14
  32. package/dist/lib/upstash-config.mjs +4 -4
  33. package/dist/prisma/prisma-transaction-util.js +2 -2
  34. package/dist/prisma/prisma-transaction-util.mjs +1 -1
  35. package/dist/services/aggregate/anonymous.aggregate.service.js +6 -6
  36. package/dist/services/aggregate/anonymous.aggregate.service.mjs +1 -1
  37. package/dist/services/aggregate/billing.aggregate.service.js +21 -21
  38. package/dist/services/aggregate/billing.aggregate.service.mjs +1 -1
  39. package/dist/services/aggregate/user.aggregate.service.js +10 -10
  40. package/dist/services/aggregate/user.aggregate.service.mjs +1 -1
  41. package/dist/services/context/user-context-service.js +3 -3
  42. package/dist/services/context/user-context-service.mjs +1 -1
  43. package/dist/services/database/apilog.service.js +14 -14
  44. package/dist/services/database/apilog.service.mjs +1 -1
  45. package/dist/services/database/credit.service.js +20 -20
  46. package/dist/services/database/credit.service.mjs +1 -1
  47. package/dist/services/database/creditAuditLog.service.js +13 -13
  48. package/dist/services/database/creditAuditLog.service.mjs +1 -1
  49. package/dist/services/database/subscription.service.js +16 -16
  50. package/dist/services/database/subscription.service.mjs +1 -1
  51. package/dist/services/database/transaction.service.js +18 -18
  52. package/dist/services/database/transaction.service.mjs +1 -1
  53. package/dist/services/database/user.service.js +14 -14
  54. package/dist/services/database/user.service.mjs +1 -1
  55. package/dist/services/database/userBackup.service.js +15 -15
  56. package/dist/services/database/userBackup.service.mjs +1 -1
  57. package/dist/services/stripe/webhook-handler.js +13 -13
  58. package/dist/services/stripe/webhook-handler.mjs +3 -3
  59. package/package.json +6 -3
  60. package/dist/_virtual/_commonjs-dynamic-modules.js +0 -7
  61. package/dist/_virtual/_commonjs-dynamic-modules.mjs +0 -5
  62. package/dist/_virtual/_commonjsHelpers.js +0 -10
  63. package/dist/_virtual/_commonjsHelpers.mjs +0 -7
  64. package/dist/_virtual/aes.js +0 -5
  65. package/dist/_virtual/aes.mjs +0 -3
  66. package/dist/_virtual/blowfish.js +0 -5
  67. package/dist/_virtual/blowfish.mjs +0 -3
  68. package/dist/_virtual/cipher-core.js +0 -5
  69. package/dist/_virtual/cipher-core.mjs +0 -3
  70. package/dist/_virtual/core.js +0 -5
  71. package/dist/_virtual/core.mjs +0 -3
  72. package/dist/_virtual/enc-base64.js +0 -5
  73. package/dist/_virtual/enc-base64.mjs +0 -3
  74. package/dist/_virtual/enc-base64url.js +0 -5
  75. package/dist/_virtual/enc-base64url.mjs +0 -3
  76. package/dist/_virtual/enc-utf16.js +0 -5
  77. package/dist/_virtual/enc-utf16.mjs +0 -3
  78. package/dist/_virtual/evpkdf.js +0 -5
  79. package/dist/_virtual/evpkdf.mjs +0 -3
  80. package/dist/_virtual/format-hex.js +0 -5
  81. package/dist/_virtual/format-hex.mjs +0 -3
  82. package/dist/_virtual/hmac.js +0 -5
  83. package/dist/_virtual/hmac.mjs +0 -3
  84. package/dist/_virtual/index.js +0 -11
  85. package/dist/_virtual/index.mjs +0 -7
  86. package/dist/_virtual/index2.js +0 -5
  87. package/dist/_virtual/index2.mjs +0 -3
  88. package/dist/_virtual/lib-typedarrays.js +0 -5
  89. package/dist/_virtual/lib-typedarrays.mjs +0 -3
  90. package/dist/_virtual/md5.js +0 -5
  91. package/dist/_virtual/md5.mjs +0 -3
  92. package/dist/_virtual/mode-cfb.js +0 -5
  93. package/dist/_virtual/mode-cfb.mjs +0 -3
  94. package/dist/_virtual/mode-ctr-gladman.js +0 -5
  95. package/dist/_virtual/mode-ctr-gladman.mjs +0 -3
  96. package/dist/_virtual/mode-ctr.js +0 -5
  97. package/dist/_virtual/mode-ctr.mjs +0 -3
  98. package/dist/_virtual/mode-ecb.js +0 -5
  99. package/dist/_virtual/mode-ecb.mjs +0 -3
  100. package/dist/_virtual/mode-ofb.js +0 -5
  101. package/dist/_virtual/mode-ofb.mjs +0 -3
  102. package/dist/_virtual/pad-ansix923.js +0 -5
  103. package/dist/_virtual/pad-ansix923.mjs +0 -3
  104. package/dist/_virtual/pad-iso10126.js +0 -5
  105. package/dist/_virtual/pad-iso10126.mjs +0 -3
  106. package/dist/_virtual/pad-iso97971.js +0 -5
  107. package/dist/_virtual/pad-iso97971.mjs +0 -3
  108. package/dist/_virtual/pad-nopadding.js +0 -5
  109. package/dist/_virtual/pad-nopadding.mjs +0 -3
  110. package/dist/_virtual/pad-zeropadding.js +0 -5
  111. package/dist/_virtual/pad-zeropadding.mjs +0 -3
  112. package/dist/_virtual/pbkdf2.js +0 -5
  113. package/dist/_virtual/pbkdf2.mjs +0 -3
  114. package/dist/_virtual/rabbit-legacy.js +0 -5
  115. package/dist/_virtual/rabbit-legacy.mjs +0 -3
  116. package/dist/_virtual/rabbit.js +0 -5
  117. package/dist/_virtual/rabbit.mjs +0 -3
  118. package/dist/_virtual/rc4.js +0 -5
  119. package/dist/_virtual/rc4.mjs +0 -3
  120. package/dist/_virtual/ripemd160.js +0 -5
  121. package/dist/_virtual/ripemd160.mjs +0 -3
  122. package/dist/_virtual/sha1.js +0 -5
  123. package/dist/_virtual/sha1.mjs +0 -3
  124. package/dist/_virtual/sha224.js +0 -5
  125. package/dist/_virtual/sha224.mjs +0 -3
  126. package/dist/_virtual/sha256.js +0 -5
  127. package/dist/_virtual/sha256.mjs +0 -3
  128. package/dist/_virtual/sha3.js +0 -5
  129. package/dist/_virtual/sha3.mjs +0 -3
  130. package/dist/_virtual/sha384.js +0 -5
  131. package/dist/_virtual/sha384.mjs +0 -3
  132. package/dist/_virtual/sha512.js +0 -5
  133. package/dist/_virtual/sha512.mjs +0 -3
  134. package/dist/_virtual/tripledes.js +0 -5
  135. package/dist/_virtual/tripledes.mjs +0 -3
  136. package/dist/_virtual/x64-core.js +0 -5
  137. package/dist/_virtual/x64-core.mjs +0 -3
  138. package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js +0 -48
  139. package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs +0 -45
  140. package/dist/node_modules/.pnpm/@upstash_qstash@2.10.1/node_modules/@upstash/qstash/chunk-35B33QW3.js +0 -1848
  141. package/dist/node_modules/.pnpm/@upstash_qstash@2.10.1/node_modules/@upstash/qstash/chunk-35B33QW3.mjs +0 -1830
  142. package/dist/node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/chunk-IH7W44G6.js +0 -5308
  143. package/dist/node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/chunk-IH7W44G6.mjs +0 -5302
  144. package/dist/node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/nodejs.js +0 -116
  145. package/dist/node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/nodejs.mjs +0 -113
  146. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +0 -248
  147. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.mjs +0 -246
  148. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.js +0 -485
  149. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.mjs +0 -483
  150. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +0 -906
  151. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.mjs +0 -904
  152. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +0 -818
  153. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.mjs +0 -816
  154. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +0 -146
  155. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.mjs +0 -144
  156. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.js +0 -158
  157. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.mjs +0 -156
  158. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.js +0 -159
  159. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.mjs +0 -157
  160. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +0 -146
  161. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.mjs +0 -144
  162. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.js +0 -77
  163. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.mjs +0 -75
  164. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +0 -153
  165. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.mjs +0 -151
  166. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.js +0 -62
  167. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.mjs +0 -60
  168. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.js +0 -86
  169. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.mjs +0 -84
  170. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +0 -278
  171. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.mjs +0 -276
  172. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.js +0 -91
  173. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.mjs +0 -89
  174. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.js +0 -127
  175. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.mjs +0 -125
  176. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.js +0 -69
  177. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.mjs +0 -67
  178. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +0 -51
  179. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.mjs +0 -49
  180. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.js +0 -65
  181. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.mjs +0 -63
  182. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.js +0 -60
  183. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.mjs +0 -58
  184. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.js +0 -55
  185. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.mjs +0 -53
  186. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.js +0 -51
  187. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.mjs +0 -49
  188. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.js +0 -41
  189. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.mjs +0 -39
  190. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.js +0 -58
  191. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.mjs +0 -56
  192. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.js +0 -157
  193. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.mjs +0 -155
  194. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.js +0 -204
  195. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.mjs +0 -202
  196. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.js +0 -206
  197. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.mjs +0 -204
  198. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.js +0 -153
  199. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.mjs +0 -151
  200. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.js +0 -277
  201. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.mjs +0 -275
  202. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +0 -160
  203. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.mjs +0 -158
  204. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.js +0 -91
  205. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.mjs +0 -89
  206. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.js +0 -209
  207. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.mjs +0 -207
  208. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.js +0 -337
  209. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.mjs +0 -335
  210. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.js +0 -95
  211. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.mjs +0 -93
  212. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.js +0 -337
  213. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.mjs +0 -335
  214. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.js +0 -793
  215. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.mjs +0 -791
  216. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.js +0 -314
  217. package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.mjs +0 -312
  218. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/compact/verify.js +0 -26
  219. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/compact/verify.mjs +0 -24
  220. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/flattened/verify.js +0 -127
  221. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/flattened/verify.mjs +0 -125
  222. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jwt/verify.js +0 -20
  223. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jwt/verify.mjs +0 -18
  224. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/key/import.js +0 -31
  225. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/key/import.mjs +0 -29
  226. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/buffer_utils.js +0 -18
  227. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/buffer_utils.mjs +0 -14
  228. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/check_key_type.js +0 -82
  229. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/check_key_type.mjs +0 -80
  230. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/crypto_key.js +0 -103
  231. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/crypto_key.mjs +0 -101
  232. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/epoch.js +0 -7
  233. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/epoch.mjs +0 -3
  234. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/invalid_key_input.js +0 -38
  235. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/invalid_key_input.mjs +0 -33
  236. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_disjoint.js +0 -27
  237. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_disjoint.mjs +0 -23
  238. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_jwk.js +0 -21
  239. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_jwk.mjs +0 -16
  240. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_object.js +0 -22
  241. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_object.mjs +0 -18
  242. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/jwt_claims_set.js +0 -111
  243. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/jwt_claims_set.mjs +0 -107
  244. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/secs.js +0 -61
  245. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/secs.mjs +0 -57
  246. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_algorithms.js +0 -16
  247. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_algorithms.mjs +0 -12
  248. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_crit.js +0 -40
  249. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_crit.mjs +0 -36
  250. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/base64url.js +0 -15
  251. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/base64url.mjs +0 -13
  252. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/check_key_length.js +0 -23
  253. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/check_key_length.mjs +0 -19
  254. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/dsa_digest.js +0 -30
  255. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/dsa_digest.mjs +0 -26
  256. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_named_curve.js +0 -60
  257. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_named_curve.mjs +0 -56
  258. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_sign_verify_key.js +0 -35
  259. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_sign_verify_key.mjs +0 -31
  260. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/hmac_digest.js +0 -20
  261. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/hmac_digest.mjs +0 -16
  262. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_like.js +0 -15
  263. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_like.mjs +0 -10
  264. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_object.js +0 -28
  265. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_object.mjs +0 -5
  266. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/jwk_to_key.js +0 -14
  267. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/jwk_to_key.mjs +0 -10
  268. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/node_key.js +0 -115
  269. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/node_key.mjs +0 -111
  270. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/sign.js +0 -42
  271. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/sign.mjs +0 -19
  272. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/verify.js +0 -54
  273. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/verify.mjs +0 -31
  274. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/webcrypto.js +0 -32
  275. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/webcrypto.mjs +0 -7
  276. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/util/errors.js +0 -69
  277. package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/util/errors.mjs +0 -60
  278. package/dist/node_modules/.pnpm/neverthrow@7.2.0/node_modules/neverthrow/dist/index.es.js +0 -422
  279. package/dist/node_modules/.pnpm/neverthrow@7.2.0/node_modules/neverthrow/dist/index.es.mjs +0 -415
  280. package/dist/node_modules/.pnpm/uncrypto@0.1.3/node_modules/uncrypto/dist/crypto.web.js +0 -6
  281. package/dist/node_modules/.pnpm/uncrypto@0.1.3/node_modules/uncrypto/dist/crypto.web.mjs +0 -4
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
3
+ var tslib = require('tslib');
4
4
  var upstashConfig = require('../upstash-config.js');
5
5
 
6
6
  const likeTargetKey = (targetId) => `like:target:${targetId}`;
@@ -8,8 +8,8 @@ const likeUserKey = (userId) => `like:user:${userId}`;
8
8
  /**
9
9
  * Like a target. Returns true if the like was added, false if it already existed, null if Redis is unavailable.
10
10
  */
11
- const likeTarget = (targetId, userId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
12
- return upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
11
+ const likeTarget = (targetId, userId) => tslib.__awaiter(void 0, void 0, void 0, function* () {
12
+ return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
13
13
  const added = yield redis.sadd(likeTargetKey(targetId), userId);
14
14
  if (added === 1) {
15
15
  yield redis.sadd(likeUserKey(userId), targetId);
@@ -21,8 +21,8 @@ const likeTarget = (targetId, userId) => tslib_es6.__awaiter(void 0, void 0, voi
21
21
  /**
22
22
  * Unlike a target. Returns true if removed, false if it didn't exist, null if Redis is unavailable.
23
23
  */
24
- const unlikeTarget = (targetId, userId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
25
- return upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
24
+ const unlikeTarget = (targetId, userId) => tslib.__awaiter(void 0, void 0, void 0, function* () {
25
+ return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
26
26
  const removed = yield redis.srem(likeTargetKey(targetId), userId);
27
27
  if (removed === 1) {
28
28
  yield redis.srem(likeUserKey(userId), targetId);
@@ -34,8 +34,8 @@ const unlikeTarget = (targetId, userId) => tslib_es6.__awaiter(void 0, void 0, v
34
34
  /**
35
35
  * Check whether a user liked a target. Returns null if Redis is unavailable.
36
36
  */
37
- const isTargetLiked = (targetId, userId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
38
- return upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
37
+ const isTargetLiked = (targetId, userId) => tslib.__awaiter(void 0, void 0, void 0, function* () {
38
+ return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
39
39
  const result = yield redis.sismember(likeTargetKey(targetId), userId);
40
40
  return result === 1;
41
41
  }));
@@ -43,13 +43,13 @@ const isTargetLiked = (targetId, userId) => tslib_es6.__awaiter(void 0, void 0,
43
43
  /**
44
44
  * Get like count for a target (unique by user). Returns null if Redis is unavailable.
45
45
  */
46
- const getTargetLikeCount = (targetId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
46
+ const getTargetLikeCount = (targetId) => tslib.__awaiter(void 0, void 0, void 0, function* () {
47
47
  return upstashConfig.withRedis((redis) => redis.scard(likeTargetKey(targetId)));
48
48
  });
49
49
  /**
50
50
  * Get target ids liked by a user. Returns null if Redis is unavailable.
51
51
  */
52
- const getUserLikedTargets = (userId) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
52
+ const getUserLikedTargets = (userId) => tslib.__awaiter(void 0, void 0, void 0, function* () {
53
53
  return upstashConfig.withRedis((redis) => redis.smembers(likeUserKey(userId)));
54
54
  });
55
55
 
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs';
1
+ import { __awaiter } from 'tslib';
2
2
  import { withRedis } from '../upstash-config.mjs';
3
3
 
4
4
  const likeTargetKey = (targetId) => `like:target:${targetId}`;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
3
+ var tslib = require('tslib');
4
4
  var upstashConfig = require('../upstash-config.js');
5
5
 
6
6
  const unlockScript = `
@@ -21,8 +21,8 @@ const generateToken = () => {
21
21
  /**
22
22
  * Acquire a distributed lock. Returns the lock token or null when unavailable.
23
23
  */
24
- const acquireLock = (key, ttlMs) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
25
- return upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
24
+ const acquireLock = (key, ttlMs) => tslib.__awaiter(void 0, void 0, void 0, function* () {
25
+ return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
26
26
  const token = generateToken();
27
27
  const result = yield redis.set(key, token, { nx: true, px: ttlMs });
28
28
  return result === 'OK' ? token : null;
@@ -31,8 +31,8 @@ const acquireLock = (key, ttlMs) => tslib_es6.__awaiter(void 0, void 0, void 0,
31
31
  /**
32
32
  * Release a distributed lock. Returns false when the lock client is unavailable.
33
33
  */
34
- const releaseLock = (key, token) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
35
- const result = yield upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
34
+ const releaseLock = (key, token) => tslib.__awaiter(void 0, void 0, void 0, function* () {
35
+ const result = yield upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
36
36
  const released = yield redis.eval(unlockScript, [key], [token]);
37
37
  return Number(released) === 1;
38
38
  }));
@@ -41,7 +41,7 @@ const releaseLock = (key, token) => tslib_es6.__awaiter(void 0, void 0, void 0,
41
41
  /**
42
42
  * Run a function under a distributed lock. Returns null when the lock is unavailable.
43
43
  */
44
- const withLock = (key, ttlMs, fn) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
44
+ const withLock = (key, ttlMs, fn) => tslib.__awaiter(void 0, void 0, void 0, function* () {
45
45
  const token = yield acquireLock(key, ttlMs);
46
46
  if (!token) {
47
47
  return null;
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs';
1
+ import { __awaiter } from 'tslib';
2
2
  import { withRedis } from '../upstash-config.mjs';
3
3
 
4
4
  const unlockScript = `
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
3
+ var tslib = require('tslib');
4
4
  var upstashConfig = require('../upstash-config.js');
5
5
 
6
6
  /**
7
7
  * Set a plain string value with optional TTL (seconds).
8
8
  */
9
- const setString = (key, value, ttlSec) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
10
- return upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
9
+ const setString = (key, value, ttlSec) => tslib.__awaiter(void 0, void 0, void 0, function* () {
10
+ return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
11
11
  if (ttlSec && ttlSec > 0) {
12
12
  yield redis.set(key, value, { ex: ttlSec });
13
13
  return true;
@@ -19,14 +19,14 @@ const setString = (key, value, ttlSec) => tslib_es6.__awaiter(void 0, void 0, vo
19
19
  /**
20
20
  * Get a plain string value. Returns null if Redis is unavailable or key missing.
21
21
  */
22
- const getString = (key) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
22
+ const getString = (key) => tslib.__awaiter(void 0, void 0, void 0, function* () {
23
23
  return upstashConfig.withRedis((redis) => redis.get(key));
24
24
  });
25
25
  /**
26
26
  * Store an object as JSON string with optional TTL (seconds).
27
27
  */
28
- const setJson = (key, value, ttlSec) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
29
- return upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
28
+ const setJson = (key, value, ttlSec) => tslib.__awaiter(void 0, void 0, void 0, function* () {
29
+ return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
30
30
  const payload = JSON.stringify(value);
31
31
  if (ttlSec && ttlSec > 0) {
32
32
  yield redis.set(key, payload, { ex: ttlSec });
@@ -39,8 +39,8 @@ const setJson = (key, value, ttlSec) => tslib_es6.__awaiter(void 0, void 0, void
39
39
  /**
40
40
  * Get an object stored as JSON string. Returns null if missing or invalid JSON.
41
41
  */
42
- const getJson = (key) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
43
- return upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
42
+ const getJson = (key) => tslib.__awaiter(void 0, void 0, void 0, function* () {
43
+ return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
44
44
  const payload = yield redis.get(key);
45
45
  if (!payload) {
46
46
  return null;
@@ -56,8 +56,8 @@ const getJson = (key) => tslib_es6.__awaiter(void 0, void 0, void 0, function* (
56
56
  /**
57
57
  * Delete a key. Returns false if Redis is unavailable.
58
58
  */
59
- const deleteKey = (key) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
60
- const result = yield upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
59
+ const deleteKey = (key) => tslib.__awaiter(void 0, void 0, void 0, function* () {
60
+ const result = yield upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
61
61
  const deleted = yield redis.del(key);
62
62
  return deleted > 0;
63
63
  }));
@@ -66,8 +66,8 @@ const deleteKey = (key) => tslib_es6.__awaiter(void 0, void 0, void 0, function*
66
66
  /**
67
67
  * Set a hash field value.
68
68
  */
69
- const setHashField = (key, field, value) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
70
- const result = yield upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
69
+ const setHashField = (key, field, value) => tslib.__awaiter(void 0, void 0, void 0, function* () {
70
+ const result = yield upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
71
71
  const changed = yield redis.hset(key, { [field]: value });
72
72
  return changed > 0;
73
73
  }));
@@ -76,14 +76,14 @@ const setHashField = (key, field, value) => tslib_es6.__awaiter(void 0, void 0,
76
76
  /**
77
77
  * Get a hash field value.
78
78
  */
79
- const getHashField = (key, field) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
79
+ const getHashField = (key, field) => tslib.__awaiter(void 0, void 0, void 0, function* () {
80
80
  return upstashConfig.withRedis((redis) => redis.hget(key, field));
81
81
  });
82
82
  /**
83
83
  * Store a hash field as JSON string.
84
84
  */
85
- const setHashJson = (key, field, value) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
86
- const result = yield upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
85
+ const setHashJson = (key, field, value) => tslib.__awaiter(void 0, void 0, void 0, function* () {
86
+ const result = yield upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
87
87
  const payload = JSON.stringify(value);
88
88
  const changed = yield redis.hset(key, { [field]: payload });
89
89
  return changed > 0;
@@ -93,8 +93,8 @@ const setHashJson = (key, field, value) => tslib_es6.__awaiter(void 0, void 0, v
93
93
  /**
94
94
  * Get a hash field stored as JSON string.
95
95
  */
96
- const getHashJson = (key, field) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
97
- return upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
96
+ const getHashJson = (key, field) => tslib.__awaiter(void 0, void 0, void 0, function* () {
97
+ return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
98
98
  const payload = yield redis.hget(key, field);
99
99
  if (!payload) {
100
100
  return null;
@@ -110,8 +110,8 @@ const getHashJson = (key, field) => tslib_es6.__awaiter(void 0, void 0, void 0,
110
110
  /**
111
111
  * Get all hash fields.
112
112
  */
113
- const getHashAll = (key) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
114
- return upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
113
+ const getHashAll = (key) => tslib.__awaiter(void 0, void 0, void 0, function* () {
114
+ return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
115
115
  const result = yield redis.hgetall(key);
116
116
  return result !== null && result !== void 0 ? result : {};
117
117
  }));
@@ -119,8 +119,8 @@ const getHashAll = (key) => tslib_es6.__awaiter(void 0, void 0, void 0, function
119
119
  /**
120
120
  * Remove a hash field.
121
121
  */
122
- const deleteHashField = (key, field) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
123
- const result = yield upstashConfig.withRedis((redis) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
122
+ const deleteHashField = (key, field) => tslib.__awaiter(void 0, void 0, void 0, function* () {
123
+ const result = yield upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
124
124
  const removed = yield redis.hdel(key, field);
125
125
  return removed > 0;
126
126
  }));
@@ -129,7 +129,7 @@ const deleteHashField = (key, field) => tslib_es6.__awaiter(void 0, void 0, void
129
129
  /**
130
130
  * Push values to a list. Returns list length or null if Redis is unavailable.
131
131
  */
132
- const pushList = (key_1, values_1, ...args_1) => tslib_es6.__awaiter(void 0, [key_1, values_1, ...args_1], void 0, function* (key, values, direction = 'right') {
132
+ const pushList = (key_1, values_1, ...args_1) => tslib.__awaiter(void 0, [key_1, values_1, ...args_1], void 0, function* (key, values, direction = 'right') {
133
133
  return upstashConfig.withRedis((redis) => {
134
134
  if (values.length === 0) {
135
135
  return redis.llen(key);
@@ -142,19 +142,19 @@ const pushList = (key_1, values_1, ...args_1) => tslib_es6.__awaiter(void 0, [ke
142
142
  /**
143
143
  * Pop a value from a list.
144
144
  */
145
- const popList = (key_1, ...args_1) => tslib_es6.__awaiter(void 0, [key_1, ...args_1], void 0, function* (key, direction = 'right') {
145
+ const popList = (key_1, ...args_1) => tslib.__awaiter(void 0, [key_1, ...args_1], void 0, function* (key, direction = 'right') {
146
146
  return upstashConfig.withRedis((redis) => direction === 'left' ? redis.lpop(key) : redis.rpop(key));
147
147
  });
148
148
  /**
149
149
  * Get a range from a list.
150
150
  */
151
- const rangeList = (key_1, ...args_1) => tslib_es6.__awaiter(void 0, [key_1, ...args_1], void 0, function* (key, start = 0, stop = -1) {
151
+ const rangeList = (key_1, ...args_1) => tslib.__awaiter(void 0, [key_1, ...args_1], void 0, function* (key, start = 0, stop = -1) {
152
152
  return upstashConfig.withRedis((redis) => redis.lrange(key, start, stop));
153
153
  });
154
154
  /**
155
155
  * Get list length.
156
156
  */
157
- const listLength = (key) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
157
+ const listLength = (key) => tslib.__awaiter(void 0, void 0, void 0, function* () {
158
158
  return upstashConfig.withRedis((redis) => redis.llen(key));
159
159
  });
160
160
 
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs';
1
+ import { __awaiter } from 'tslib';
2
2
  import { withRedis } from '../upstash-config.mjs';
3
3
 
4
4
  /**
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
4
- var nodejs = require('../node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/nodejs.js');
5
- var chunk35B33QW3 = require('../node_modules/.pnpm/@upstash_qstash@2.10.1/node_modules/@upstash/qstash/chunk-35B33QW3.js');
3
+ var tslib = require('tslib');
4
+ var redis = require('@upstash/redis');
5
+ var qstash = require('@upstash/qstash');
6
6
 
7
7
  let cachedRedis = null;
8
8
  let cachedQstash = null;
@@ -47,7 +47,7 @@ const scheduleRedisHealthCheck = () => {
47
47
  return;
48
48
  }
49
49
  const delayMs = getRedisHealthIntervalMinutes() * 60000;
50
- redisHealthTimer = setTimeout(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
50
+ redisHealthTimer = setTimeout(() => tslib.__awaiter(void 0, void 0, void 0, function* () {
51
51
  redisHealthTimer = null;
52
52
  if (!cachedRedis) {
53
53
  return;
@@ -77,7 +77,7 @@ const scheduleRedisHealthCheck = () => {
77
77
  }
78
78
  }), delayMs);
79
79
  };
80
- const checkQstashHealth = (token) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
80
+ const checkQstashHealth = (token) => tslib.__awaiter(void 0, void 0, void 0, function* () {
81
81
  const response = yield fetch(getQstashHealthcheckUrl(), {
82
82
  method: 'GET',
83
83
  headers: {
@@ -94,7 +94,7 @@ const scheduleQstashHealthCheck = (token) => {
94
94
  return;
95
95
  }
96
96
  const delayMs = getQstashHealthIntervalMinutes() * 60000;
97
- qstashHealthTimer = setTimeout(() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
97
+ qstashHealthTimer = setTimeout(() => tslib.__awaiter(void 0, void 0, void 0, function* () {
98
98
  qstashHealthTimer = null;
99
99
  if (!cachedQstash) {
100
100
  return;
@@ -133,14 +133,14 @@ const scheduleQstashHealthCheck = (token) => {
133
133
  const getRedis = () => {
134
134
  return cachedRedis;
135
135
  };
136
- const ensureRedis = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
136
+ const ensureRedis = () => tslib.__awaiter(void 0, void 0, void 0, function* () {
137
137
  if (cachedRedis) {
138
138
  return cachedRedis;
139
139
  }
140
140
  if (redisInitPromise) {
141
141
  return redisInitPromise;
142
142
  }
143
- redisInitPromise = (() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
143
+ redisInitPromise = (() => tslib.__awaiter(void 0, void 0, void 0, function* () {
144
144
  const { UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN } = process.env;
145
145
  if (!isNonEmpty(UPSTASH_REDIS_REST_URL) || !isNonEmpty(UPSTASH_REDIS_REST_TOKEN)) {
146
146
  if (!redisWarnedMissingEnv) {
@@ -157,7 +157,7 @@ const ensureRedis = () => tslib_es6.__awaiter(void 0, void 0, void 0, function*
157
157
  return null;
158
158
  }
159
159
  try {
160
- const client = new nodejs.Redis({
160
+ const client = new redis.Redis({
161
161
  url: UPSTASH_REDIS_REST_URL,
162
162
  token: UPSTASH_REDIS_REST_TOKEN,
163
163
  });
@@ -189,14 +189,14 @@ const ensureRedis = () => tslib_es6.__awaiter(void 0, void 0, void 0, function*
189
189
  const getQstash = () => {
190
190
  return cachedQstash;
191
191
  };
192
- const ensureQstash = () => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
192
+ const ensureQstash = () => tslib.__awaiter(void 0, void 0, void 0, function* () {
193
193
  if (cachedQstash) {
194
194
  return cachedQstash;
195
195
  }
196
196
  if (qstashInitPromise) {
197
197
  return qstashInitPromise;
198
198
  }
199
- qstashInitPromise = (() => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
199
+ qstashInitPromise = (() => tslib.__awaiter(void 0, void 0, void 0, function* () {
200
200
  const { QSTASH_TOKEN } = process.env;
201
201
  if (!isNonEmpty(QSTASH_TOKEN)) {
202
202
  if (!qstashWarnedMissingEnv) {
@@ -206,7 +206,7 @@ const ensureQstash = () => tslib_es6.__awaiter(void 0, void 0, void 0, function*
206
206
  return null;
207
207
  }
208
208
  try {
209
- const client = new chunk35B33QW3.Client({ token: QSTASH_TOKEN });
209
+ const client = new qstash.Client({ token: QSTASH_TOKEN });
210
210
  yield checkQstashHealth(QSTASH_TOKEN);
211
211
  cachedQstash = client;
212
212
  scheduleQstashHealthCheck(QSTASH_TOKEN);
@@ -226,14 +226,14 @@ const ensureQstash = () => tslib_es6.__awaiter(void 0, void 0, void 0, function*
226
226
  }))();
227
227
  return qstashInitPromise;
228
228
  });
229
- const withRedis = (fn) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
229
+ const withRedis = (fn) => tslib.__awaiter(void 0, void 0, void 0, function* () {
230
230
  const redis = yield ensureRedis();
231
231
  if (!redis) {
232
232
  return null;
233
233
  }
234
234
  return fn(redis);
235
235
  });
236
- const withQstash = (fn) => tslib_es6.__awaiter(void 0, void 0, void 0, function* () {
236
+ const withQstash = (fn) => tslib.__awaiter(void 0, void 0, void 0, function* () {
237
237
  const qstash = yield ensureQstash();
238
238
  if (!qstash) {
239
239
  return null;
@@ -1,6 +1,6 @@
1
- import { __awaiter } from '../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs';
2
- import { Redis as Redis2 } from '../node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/nodejs.mjs';
3
- import { Client } from '../node_modules/.pnpm/@upstash_qstash@2.10.1/node_modules/@upstash/qstash/chunk-35B33QW3.mjs';
1
+ import { __awaiter } from 'tslib';
2
+ import { Redis } from '@upstash/redis';
3
+ import { Client } from '@upstash/qstash';
4
4
 
5
5
  let cachedRedis = null;
6
6
  let cachedQstash = null;
@@ -155,7 +155,7 @@ const ensureRedis = () => __awaiter(void 0, void 0, void 0, function* () {
155
155
  return null;
156
156
  }
157
157
  try {
158
- const client = new Redis2({
158
+ const client = new Redis({
159
159
  url: UPSTASH_REDIS_REST_URL,
160
160
  token: UPSTASH_REDIS_REST_TOKEN,
161
161
  });
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
3
+ var tslib = require('tslib');
4
4
  var prisma = require('./prisma.js');
5
5
 
6
6
  // 事务工具类,回滚时打印回滚日志
7
7
  function runInTransaction(fn, operationName) {
8
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
8
+ return tslib.__awaiter(this, void 0, void 0, function* () {
9
9
  const start = Date.now();
10
10
  try {
11
11
  return yield prisma.prisma.$transaction(fn);
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs';
1
+ import { __awaiter } from 'tslib';
2
2
  import { prisma } from './prisma.mjs';
3
3
 
4
4
  // 事务工具类,回滚时打印回滚日志
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
3
+ var tslib = require('tslib');
4
4
  var user_service = require('../database/user.service.js');
5
5
  var subscription_service = require('../database/subscription.service.js');
6
6
  var credit_service = require('../database/credit.service.js');
@@ -13,7 +13,7 @@ var creditInit = require('../../lib/credit-init.js');
13
13
  const ANONYMOUS_INIT_LOCK_NAMESPACE = 92831;
14
14
  class AnonymousAggregateService {
15
15
  lockFingerprintInit(tx, fingerprintId) {
16
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
16
+ return tslib.__awaiter(this, void 0, void 0, function* () {
17
17
  yield tx.$executeRaw `
18
18
  SELECT pg_advisory_xact_lock(
19
19
  ${client.Prisma.raw(String(ANONYMOUS_INIT_LOCK_NAMESPACE))},
@@ -23,7 +23,7 @@ class AnonymousAggregateService {
23
23
  });
24
24
  }
25
25
  findLatestUserContextByFingerprintId(fingerprintId, tx) {
26
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
26
+ return tslib.__awaiter(this, void 0, void 0, function* () {
27
27
  const existingUsers = yield user_service.userService.findListByFingerprintId(fingerprintId, tx);
28
28
  if (existingUsers.length === 0) {
29
29
  return null;
@@ -44,7 +44,7 @@ class AnonymousAggregateService {
44
44
  });
45
45
  }
46
46
  createAnonymousUser(fingerprintId, tx, options) {
47
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
47
+ return tslib.__awaiter(this, void 0, void 0, function* () {
48
48
  const newUser = yield user_service.userService.createUser({
49
49
  fingerprintId,
50
50
  sourceRef: options === null || options === void 0 ? void 0 : options.sourceRef,
@@ -70,8 +70,8 @@ class AnonymousAggregateService {
70
70
  });
71
71
  }
72
72
  getOrCreateByFingerprintId(fingerprintId, options) {
73
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
74
- return prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
73
+ return tslib.__awaiter(this, void 0, void 0, function* () {
74
+ return prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
75
75
  yield this.lockFingerprintInit(tx, fingerprintId);
76
76
  const existingContext = yield this.findLatestUserContextByFingerprintId(fingerprintId, tx);
77
77
  if (existingContext) {
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs';
1
+ import { __awaiter } from 'tslib';
2
2
  import { userService } from '../database/user.service.mjs';
3
3
  import { subscriptionService } from '../database/subscription.service.mjs';
4
4
  import { creditService } from '../database/credit.service.mjs';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
3
+ var tslib = require('tslib');
4
4
  var constants = require('../database/constants.js');
5
5
  require('../../prisma/prisma.js');
6
6
  var prismaTransactionUtil = require('../../prisma/prisma-transaction-util.js');
@@ -11,8 +11,8 @@ require('@prisma/client');
11
11
 
12
12
  class BillingAggregateService {
13
13
  recordSubscriptionInitPayment(context) {
14
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
15
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
14
+ return tslib.__awaiter(this, void 0, void 0, function* () {
15
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
16
16
  var _a, _b, _c, _d, _e, _f, _g, _h;
17
17
  const now = new Date();
18
18
  // 订阅截止时间统一为到期日最后1s
@@ -62,8 +62,8 @@ class BillingAggregateService {
62
62
  });
63
63
  }
64
64
  completeOneTimeCheckout(params) {
65
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
66
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
65
+ return tslib.__awaiter(this, void 0, void 0, function* () {
66
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
67
67
  var _a;
68
68
  const now = new Date();
69
69
  yield transaction_service.transactionService.update(params.orderId, {
@@ -91,8 +91,8 @@ class BillingAggregateService {
91
91
  });
92
92
  }
93
93
  recordInitialInvoiceDetails(params) {
94
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
95
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
94
+ return tslib.__awaiter(this, void 0, void 0, function* () {
95
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
96
96
  var _a, _b, _c;
97
97
  yield transaction_service.transactionService.update(params.orderId, {
98
98
  payInvoiceId: params.invoiceId,
@@ -106,8 +106,8 @@ class BillingAggregateService {
106
106
  });
107
107
  }
108
108
  recordSubscriptionRenewalPayment(context) {
109
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
110
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
109
+ return tslib.__awaiter(this, void 0, void 0, function* () {
110
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
111
111
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
112
112
  yield transaction_service.transactionService.createTransaction({
113
113
  userId: context.userId,
@@ -160,8 +160,8 @@ class BillingAggregateService {
160
160
  });
161
161
  }
162
162
  recordInitialPaymentFailure(params) {
163
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
164
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
163
+ return tslib.__awaiter(this, void 0, void 0, function* () {
164
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
165
165
  var _a, _b;
166
166
  yield transaction_service.transactionService.updateStatus(params.orderId, constants.OrderStatus.FAILED, {
167
167
  paymentStatus: constants.PaymentStatus.UN_PAID,
@@ -175,8 +175,8 @@ class BillingAggregateService {
175
175
  });
176
176
  }
177
177
  recordRenewalPaymentFailure(context) {
178
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
179
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
178
+ return tslib.__awaiter(this, void 0, void 0, function* () {
179
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
180
180
  var _a, _b, _c, _d, _e, _f;
181
181
  yield transaction_service.transactionService.createTransaction({
182
182
  userId: context.userId,
@@ -216,8 +216,8 @@ class BillingAggregateService {
216
216
  });
217
217
  }
218
218
  syncSubscriptionFromStripe(params) {
219
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
220
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
219
+ return tslib.__awaiter(this, void 0, void 0, function* () {
220
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
221
221
  if (params.isUserCancel) {
222
222
  // 记录用户取消订阅的时间信息
223
223
  yield transaction_service.transactionService.update(params.orderId, {
@@ -234,8 +234,8 @@ class BillingAggregateService {
234
234
  });
235
235
  }
236
236
  processSubscriptionCancel(context) {
237
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
238
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
237
+ return tslib.__awaiter(this, void 0, void 0, function* () {
238
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
239
239
  var _a;
240
240
  // 更新订单, 记录取消信息
241
241
  yield transaction_service.transactionService.update(context.orderId, {
@@ -250,8 +250,8 @@ class BillingAggregateService {
250
250
  });
251
251
  }
252
252
  processSubscriptionRefund(context) {
253
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
254
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
253
+ return tslib.__awaiter(this, void 0, void 0, function* () {
254
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
255
255
  var _a, _b;
256
256
  const now = new Date();
257
257
  yield transaction_service.transactionService.update(context.transaction.orderId, {
@@ -280,8 +280,8 @@ class BillingAggregateService {
280
280
  });
281
281
  }
282
282
  processOneTimeRefund(context) {
283
- return tslib_es6.__awaiter(this, void 0, void 0, function* () {
284
- yield prismaTransactionUtil.runInTransaction((tx) => tslib_es6.__awaiter(this, void 0, void 0, function* () {
283
+ return tslib.__awaiter(this, void 0, void 0, function* () {
284
+ yield prismaTransactionUtil.runInTransaction((tx) => tslib.__awaiter(this, void 0, void 0, function* () {
285
285
  var _a, _b;
286
286
  const now = new Date();
287
287
  yield transaction_service.transactionService.update(context.transaction.orderId, {
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.mjs';
1
+ import { __awaiter } from 'tslib';
2
2
  import { SubscriptionStatus, PaymentStatus, OrderStatus, TransactionType, PaySupplier, OperationType, CreditType } from '../database/constants.mjs';
3
3
  import '../../prisma/prisma.mjs';
4
4
  import { runInTransaction } from '../../prisma/prisma-transaction-util.mjs';