@windrun-huaiin/backend-core 15.0.0 → 16.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.
- package/LICENSE +1 -1
- package/dist/app/api/stripe/checkout/route.js +2 -2
- package/dist/app/api/stripe/checkout/route.mjs +1 -1
- package/dist/app/api/stripe/customer-portal/route.js +2 -2
- package/dist/app/api/stripe/customer-portal/route.mjs +1 -1
- package/dist/app/api/user/anonymous/init/route.js +6 -6
- package/dist/app/api/user/anonymous/init/route.mjs +1 -1
- package/dist/app/api/webhook/clerk/user/route.js +4 -4
- package/dist/app/api/webhook/clerk/user/route.mjs +1 -1
- package/dist/app/api/webhook/stripe/route.js +2 -2
- package/dist/app/api/webhook/stripe/route.mjs +1 -1
- package/dist/auth/auth-middleware.js +3 -3
- package/dist/auth/auth-middleware.mjs +1 -1
- package/dist/auth/auth-utils.js +10 -10
- package/dist/auth/auth-utils.mjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -0
- package/dist/index.mjs +8 -1
- package/dist/lib/index.js +19 -0
- package/dist/lib/index.mjs +1 -1
- package/dist/lib/money-price-helper.js +3 -3
- package/dist/lib/money-price-helper.mjs +1 -1
- package/dist/lib/stripe-config.js +8 -8
- package/dist/lib/stripe-config.mjs +1 -1
- package/dist/lib/upstash/qstash.d.ts +20 -7
- package/dist/lib/upstash/qstash.d.ts.map +1 -1
- package/dist/lib/upstash/qstash.js +45 -19
- package/dist/lib/upstash/qstash.mjs +35 -9
- package/dist/lib/upstash/redis-counter.js +7 -7
- package/dist/lib/upstash/redis-counter.mjs +1 -1
- package/dist/lib/upstash/redis-favorite.js +9 -9
- package/dist/lib/upstash/redis-favorite.mjs +1 -1
- package/dist/lib/upstash/redis-like.js +9 -9
- package/dist/lib/upstash/redis-like.mjs +1 -1
- package/dist/lib/upstash/redis-lock.js +6 -6
- package/dist/lib/upstash/redis-lock.mjs +1 -1
- package/dist/lib/upstash/redis-structures.d.ts +83 -0
- package/dist/lib/upstash/redis-structures.d.ts.map +1 -1
- package/dist/lib/upstash/redis-structures.js +245 -25
- package/dist/lib/upstash/redis-structures.mjs +203 -2
- package/dist/lib/upstash-config.d.ts.map +1 -1
- package/dist/lib/upstash-config.js +90 -18
- package/dist/lib/upstash-config.mjs +80 -8
- package/dist/prisma/prisma-transaction-util.js +2 -2
- package/dist/prisma/prisma-transaction-util.mjs +1 -1
- package/dist/services/aggregate/anonymous.aggregate.service.js +6 -6
- package/dist/services/aggregate/anonymous.aggregate.service.mjs +1 -1
- package/dist/services/aggregate/billing.aggregate.service.js +21 -21
- package/dist/services/aggregate/billing.aggregate.service.mjs +1 -1
- package/dist/services/aggregate/user.aggregate.service.js +10 -10
- package/dist/services/aggregate/user.aggregate.service.mjs +1 -1
- package/dist/services/ai/abort.d.ts +2 -0
- package/dist/services/ai/abort.d.ts.map +1 -0
- package/dist/services/ai/abort.js +24 -0
- package/dist/services/ai/abort.mjs +22 -0
- package/dist/services/ai/env.d.ts +21 -0
- package/dist/services/ai/env.d.ts.map +1 -0
- package/dist/services/ai/env.js +85 -0
- package/dist/services/ai/env.mjs +80 -0
- package/dist/services/ai/error.d.ts +3 -0
- package/dist/services/ai/error.d.ts.map +1 -0
- package/dist/services/ai/error.js +54 -0
- package/dist/services/ai/error.mjs +52 -0
- package/dist/services/ai/index.d.ts +9 -0
- package/dist/services/ai/index.d.ts.map +1 -0
- package/dist/services/ai/index.js +30 -0
- package/dist/services/ai/index.mjs +7 -0
- package/dist/services/ai/message-builder.d.ts +4 -0
- package/dist/services/ai/message-builder.d.ts.map +1 -0
- package/dist/services/ai/message-builder.js +15 -0
- package/dist/services/ai/message-builder.mjs +13 -0
- package/dist/services/ai/mock.d.ts +30 -0
- package/dist/services/ai/mock.d.ts.map +1 -0
- package/dist/services/ai/mock.js +314 -0
- package/dist/services/ai/mock.mjs +308 -0
- package/dist/services/ai/openrouter-client.d.ts +12 -0
- package/dist/services/ai/openrouter-client.d.ts.map +1 -0
- package/dist/services/ai/openrouter-client.js +81 -0
- package/dist/services/ai/openrouter-client.mjs +78 -0
- package/dist/services/ai/route.d.ts +6 -0
- package/dist/services/ai/route.d.ts.map +1 -0
- package/dist/services/ai/route.js +178 -0
- package/dist/services/ai/route.mjs +173 -0
- package/dist/services/ai/types.d.ts +98 -0
- package/dist/services/ai/types.d.ts.map +1 -0
- package/dist/services/context/user-context-service.js +3 -3
- package/dist/services/context/user-context-service.mjs +1 -1
- package/dist/services/database/apilog.service.js +14 -14
- package/dist/services/database/apilog.service.mjs +1 -1
- package/dist/services/database/credit.service.js +20 -20
- package/dist/services/database/credit.service.mjs +1 -1
- package/dist/services/database/creditAuditLog.service.js +13 -13
- package/dist/services/database/creditAuditLog.service.mjs +1 -1
- package/dist/services/database/subscription.service.js +16 -16
- package/dist/services/database/subscription.service.mjs +1 -1
- package/dist/services/database/transaction.service.js +18 -18
- package/dist/services/database/transaction.service.mjs +1 -1
- package/dist/services/database/user.service.js +14 -14
- package/dist/services/database/user.service.mjs +1 -1
- package/dist/services/database/userBackup.service.js +15 -15
- package/dist/services/database/userBackup.service.mjs +1 -1
- package/dist/services/stripe/webhook-handler.js +13 -13
- package/dist/services/stripe/webhook-handler.mjs +3 -3
- package/package.json +14 -4
- package/src/index.ts +1 -0
- package/src/lib/upstash/qstash.ts +55 -15
- package/src/lib/upstash/redis-structures.ts +248 -0
- package/src/lib/upstash-config.ts +106 -4
- package/src/services/ai/abort.ts +26 -0
- package/src/services/ai/env.ts +120 -0
- package/src/services/ai/error.ts +64 -0
- package/src/services/ai/index.ts +8 -0
- package/src/services/ai/message-builder.ts +17 -0
- package/src/services/ai/mock.ts +378 -0
- package/src/services/ai/openrouter-client.ts +94 -0
- package/src/services/ai/route.ts +218 -0
- package/src/services/ai/types.ts +131 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +0 -7
- package/dist/_virtual/_commonjs-dynamic-modules.mjs +0 -5
- package/dist/_virtual/_commonjsHelpers.js +0 -10
- package/dist/_virtual/_commonjsHelpers.mjs +0 -7
- package/dist/_virtual/aes.js +0 -5
- package/dist/_virtual/aes.mjs +0 -3
- package/dist/_virtual/blowfish.js +0 -5
- package/dist/_virtual/blowfish.mjs +0 -3
- package/dist/_virtual/cipher-core.js +0 -5
- package/dist/_virtual/cipher-core.mjs +0 -3
- package/dist/_virtual/core.js +0 -5
- package/dist/_virtual/core.mjs +0 -3
- package/dist/_virtual/enc-base64.js +0 -5
- package/dist/_virtual/enc-base64.mjs +0 -3
- package/dist/_virtual/enc-base64url.js +0 -5
- package/dist/_virtual/enc-base64url.mjs +0 -3
- package/dist/_virtual/enc-utf16.js +0 -5
- package/dist/_virtual/enc-utf16.mjs +0 -3
- package/dist/_virtual/evpkdf.js +0 -5
- package/dist/_virtual/evpkdf.mjs +0 -3
- package/dist/_virtual/format-hex.js +0 -5
- package/dist/_virtual/format-hex.mjs +0 -3
- package/dist/_virtual/hmac.js +0 -5
- package/dist/_virtual/hmac.mjs +0 -3
- package/dist/_virtual/index.js +0 -11
- package/dist/_virtual/index.mjs +0 -7
- package/dist/_virtual/index2.js +0 -5
- package/dist/_virtual/index2.mjs +0 -3
- package/dist/_virtual/lib-typedarrays.js +0 -5
- package/dist/_virtual/lib-typedarrays.mjs +0 -3
- package/dist/_virtual/md5.js +0 -5
- package/dist/_virtual/md5.mjs +0 -3
- package/dist/_virtual/mode-cfb.js +0 -5
- package/dist/_virtual/mode-cfb.mjs +0 -3
- package/dist/_virtual/mode-ctr-gladman.js +0 -5
- package/dist/_virtual/mode-ctr-gladman.mjs +0 -3
- package/dist/_virtual/mode-ctr.js +0 -5
- package/dist/_virtual/mode-ctr.mjs +0 -3
- package/dist/_virtual/mode-ecb.js +0 -5
- package/dist/_virtual/mode-ecb.mjs +0 -3
- package/dist/_virtual/mode-ofb.js +0 -5
- package/dist/_virtual/mode-ofb.mjs +0 -3
- package/dist/_virtual/pad-ansix923.js +0 -5
- package/dist/_virtual/pad-ansix923.mjs +0 -3
- package/dist/_virtual/pad-iso10126.js +0 -5
- package/dist/_virtual/pad-iso10126.mjs +0 -3
- package/dist/_virtual/pad-iso97971.js +0 -5
- package/dist/_virtual/pad-iso97971.mjs +0 -3
- package/dist/_virtual/pad-nopadding.js +0 -5
- package/dist/_virtual/pad-nopadding.mjs +0 -3
- package/dist/_virtual/pad-zeropadding.js +0 -5
- package/dist/_virtual/pad-zeropadding.mjs +0 -3
- package/dist/_virtual/pbkdf2.js +0 -5
- package/dist/_virtual/pbkdf2.mjs +0 -3
- package/dist/_virtual/rabbit-legacy.js +0 -5
- package/dist/_virtual/rabbit-legacy.mjs +0 -3
- package/dist/_virtual/rabbit.js +0 -5
- package/dist/_virtual/rabbit.mjs +0 -3
- package/dist/_virtual/rc4.js +0 -5
- package/dist/_virtual/rc4.mjs +0 -3
- package/dist/_virtual/ripemd160.js +0 -5
- package/dist/_virtual/ripemd160.mjs +0 -3
- package/dist/_virtual/sha1.js +0 -5
- package/dist/_virtual/sha1.mjs +0 -3
- package/dist/_virtual/sha224.js +0 -5
- package/dist/_virtual/sha224.mjs +0 -3
- package/dist/_virtual/sha256.js +0 -5
- package/dist/_virtual/sha256.mjs +0 -3
- package/dist/_virtual/sha3.js +0 -5
- package/dist/_virtual/sha3.mjs +0 -3
- package/dist/_virtual/sha384.js +0 -5
- package/dist/_virtual/sha384.mjs +0 -3
- package/dist/_virtual/sha512.js +0 -5
- package/dist/_virtual/sha512.mjs +0 -3
- package/dist/_virtual/tripledes.js +0 -5
- package/dist/_virtual/tripledes.mjs +0 -3
- package/dist/_virtual/x64-core.js +0 -5
- package/dist/_virtual/x64-core.mjs +0 -3
- 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
- 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
- package/dist/node_modules/.pnpm/@upstash_qstash@2.10.1/node_modules/@upstash/qstash/chunk-35B33QW3.js +0 -1848
- package/dist/node_modules/.pnpm/@upstash_qstash@2.10.1/node_modules/@upstash/qstash/chunk-35B33QW3.mjs +0 -1830
- package/dist/node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/chunk-IH7W44G6.js +0 -5308
- package/dist/node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/chunk-IH7W44G6.mjs +0 -5302
- package/dist/node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/nodejs.js +0 -116
- package/dist/node_modules/.pnpm/@upstash_redis@1.37.0/node_modules/@upstash/redis/nodejs.mjs +0 -113
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js +0 -248
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.mjs +0 -246
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.js +0 -485
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.mjs +0 -483
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.js +0 -906
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.mjs +0 -904
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js +0 -818
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.mjs +0 -816
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.js +0 -146
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.mjs +0 -144
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.js +0 -158
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.mjs +0 -156
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.js +0 -159
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.mjs +0 -157
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.js +0 -146
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.mjs +0 -144
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.js +0 -77
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.mjs +0 -75
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.js +0 -153
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.mjs +0 -151
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.js +0 -62
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.mjs +0 -60
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.js +0 -86
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.mjs +0 -84
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js +0 -278
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.mjs +0 -276
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.js +0 -91
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.mjs +0 -89
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.js +0 -127
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.mjs +0 -125
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.js +0 -69
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.mjs +0 -67
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js +0 -51
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.mjs +0 -49
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.js +0 -65
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.mjs +0 -63
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.js +0 -60
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.mjs +0 -58
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.js +0 -55
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.mjs +0 -53
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.js +0 -51
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.mjs +0 -49
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.js +0 -41
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.mjs +0 -39
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.js +0 -58
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.mjs +0 -56
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.js +0 -157
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.mjs +0 -155
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.js +0 -204
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.mjs +0 -202
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.js +0 -206
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.mjs +0 -204
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.js +0 -153
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.mjs +0 -151
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.js +0 -277
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.mjs +0 -275
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.js +0 -160
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.mjs +0 -158
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.js +0 -91
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.mjs +0 -89
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.js +0 -209
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.mjs +0 -207
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.js +0 -337
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.mjs +0 -335
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.js +0 -95
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.mjs +0 -93
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.js +0 -337
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.mjs +0 -335
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.js +0 -793
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.mjs +0 -791
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.js +0 -314
- package/dist/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.mjs +0 -312
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/compact/verify.js +0 -26
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/compact/verify.mjs +0 -24
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/flattened/verify.js +0 -127
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jws/flattened/verify.mjs +0 -125
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jwt/verify.js +0 -20
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/jwt/verify.mjs +0 -18
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/key/import.js +0 -31
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/key/import.mjs +0 -29
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/buffer_utils.js +0 -18
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/buffer_utils.mjs +0 -14
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/check_key_type.js +0 -82
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/check_key_type.mjs +0 -80
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/crypto_key.js +0 -103
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/crypto_key.mjs +0 -101
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/epoch.js +0 -7
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/epoch.mjs +0 -3
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/invalid_key_input.js +0 -38
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/invalid_key_input.mjs +0 -33
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_disjoint.js +0 -27
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_disjoint.mjs +0 -23
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_jwk.js +0 -21
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_jwk.mjs +0 -16
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_object.js +0 -22
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/is_object.mjs +0 -18
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/jwt_claims_set.js +0 -111
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/jwt_claims_set.mjs +0 -107
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/secs.js +0 -61
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/secs.mjs +0 -57
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_algorithms.js +0 -16
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_algorithms.mjs +0 -12
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_crit.js +0 -40
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/lib/validate_crit.mjs +0 -36
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/base64url.js +0 -15
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/base64url.mjs +0 -13
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/check_key_length.js +0 -23
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/check_key_length.mjs +0 -19
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/dsa_digest.js +0 -30
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/dsa_digest.mjs +0 -26
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_named_curve.js +0 -60
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_named_curve.mjs +0 -56
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_sign_verify_key.js +0 -35
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/get_sign_verify_key.mjs +0 -31
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/hmac_digest.js +0 -20
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/hmac_digest.mjs +0 -16
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_like.js +0 -15
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_like.mjs +0 -10
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_object.js +0 -28
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/is_key_object.mjs +0 -5
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/jwk_to_key.js +0 -14
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/jwk_to_key.mjs +0 -10
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/node_key.js +0 -115
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/node_key.mjs +0 -111
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/sign.js +0 -42
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/sign.mjs +0 -19
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/verify.js +0 -54
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/verify.mjs +0 -31
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/webcrypto.js +0 -32
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/runtime/webcrypto.mjs +0 -7
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/util/errors.js +0 -69
- package/dist/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/esm/util/errors.mjs +0 -60
- package/dist/node_modules/.pnpm/neverthrow@7.2.0/node_modules/neverthrow/dist/index.es.js +0 -422
- package/dist/node_modules/.pnpm/neverthrow@7.2.0/node_modules/neverthrow/dist/index.es.mjs +0 -415
- package/dist/node_modules/.pnpm/uncrypto@0.1.3/node_modules/uncrypto/dist/crypto.web.js +0 -6
- package/dist/node_modules/.pnpm/uncrypto@0.1.3/node_modules/uncrypto/dist/crypto.web.mjs +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qstash.d.ts","sourceRoot":"","sources":["../../../src/lib/upstash/qstash.ts"],"names":[],"mappings":"AA8CA,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,MA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AK,SAAS,WAAW,EAC7D,SAAS,sBAAsB,CAAC,KAAK,CAAC,KACrC,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;CAAE,GAAG,IAAI,CAsB9E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAU,YAAY,MAAM,KAAG,OAAO,CAAC,OAAO,CAexE,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAU,SAAS,mBAAmB,KAAG,OAAO,CAAC,OAAO,CAqBzF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var qstash = require('@upstash/qstash');
|
|
5
5
|
var upstashConfig = require('../upstash-config.js');
|
|
6
6
|
|
|
7
7
|
let cachedReceiver = null;
|
|
@@ -23,7 +23,7 @@ const getReceiver = () => {
|
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
25
|
try {
|
|
26
|
-
cachedReceiver = new
|
|
26
|
+
cachedReceiver = new qstash.Receiver({
|
|
27
27
|
currentSigningKey,
|
|
28
28
|
nextSigningKey,
|
|
29
29
|
});
|
|
@@ -38,57 +38,83 @@ const getReceiver = () => {
|
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
+
const generateSourceMessageId = () => {
|
|
42
|
+
try {
|
|
43
|
+
return crypto.randomUUID();
|
|
44
|
+
}
|
|
45
|
+
catch (_a) {
|
|
46
|
+
return `${Date.now()}_${Math.random().toString(16).slice(2)}`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const createEnvelope = (body) => {
|
|
50
|
+
return {
|
|
51
|
+
source_msg_id: generateSourceMessageId(),
|
|
52
|
+
payload: body,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
41
55
|
/**
|
|
42
56
|
* Publish a message. Returns message id or null if QStash is unavailable.
|
|
43
57
|
*/
|
|
44
|
-
const publishMessage = (options) =>
|
|
45
|
-
|
|
58
|
+
const publishMessage = (options) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
+
const message = createEnvelope(options.body);
|
|
60
|
+
return upstashConfig.withQstash((client) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
46
61
|
var _a;
|
|
47
62
|
const result = yield client.publishJSON({
|
|
48
63
|
url: options.url,
|
|
49
|
-
body:
|
|
64
|
+
body: message,
|
|
50
65
|
});
|
|
51
|
-
return
|
|
66
|
+
return {
|
|
67
|
+
messageId: typeof result === 'string' ? result : (_a = result === null || result === void 0 ? void 0 : result.messageId) !== null && _a !== void 0 ? _a : null,
|
|
68
|
+
message,
|
|
69
|
+
};
|
|
52
70
|
}));
|
|
53
71
|
});
|
|
54
72
|
/**
|
|
55
73
|
* Publish a delayed message. Returns message id or null if QStash is unavailable.
|
|
56
74
|
*/
|
|
57
|
-
const publishDelayedMessage = (options) =>
|
|
58
|
-
|
|
75
|
+
const publishDelayedMessage = (options) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
76
|
+
const message = createEnvelope(options.body);
|
|
77
|
+
return upstashConfig.withQstash((client) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
59
78
|
var _a;
|
|
60
79
|
const result = yield client.publishJSON({
|
|
61
80
|
url: options.url,
|
|
62
|
-
body:
|
|
81
|
+
body: message,
|
|
63
82
|
delay: options.delaySec,
|
|
64
83
|
});
|
|
65
|
-
return
|
|
84
|
+
return {
|
|
85
|
+
messageId: typeof result === 'string' ? result : (_a = result === null || result === void 0 ? void 0 : result.messageId) !== null && _a !== void 0 ? _a : null,
|
|
86
|
+
message,
|
|
87
|
+
};
|
|
66
88
|
}));
|
|
67
89
|
});
|
|
68
90
|
/**
|
|
69
91
|
* Schedule a recurring message. Returns schedule id or null if QStash is unavailable.
|
|
70
92
|
*/
|
|
71
|
-
const scheduleMessage = (options) =>
|
|
72
|
-
|
|
93
|
+
const scheduleMessage = (options) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
94
|
+
const message = createEnvelope(options.body);
|
|
95
|
+
return upstashConfig.withQstash((client) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
73
96
|
var _a, _b, _c, _d, _e, _f;
|
|
74
97
|
const anyClient = client;
|
|
75
98
|
const result = (_c = (yield ((_b = (_a = anyClient.schedules) === null || _a === void 0 ? void 0 : _a.create) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
76
99
|
url: options.url,
|
|
77
|
-
body:
|
|
100
|
+
body: message,
|
|
78
101
|
cron: options.cron,
|
|
79
102
|
})))) !== null && _c !== void 0 ? _c : (yield ((_d = anyClient.publishJSON) === null || _d === void 0 ? void 0 : _d.call(anyClient, {
|
|
80
103
|
url: options.url,
|
|
81
|
-
body:
|
|
104
|
+
body: message,
|
|
82
105
|
cron: options.cron,
|
|
83
106
|
})));
|
|
84
|
-
return
|
|
107
|
+
return {
|
|
108
|
+
scheduleId: typeof result === 'string' ? result : (_f = (_e = result === null || result === void 0 ? void 0 : result.scheduleId) !== null && _e !== void 0 ? _e : result === null || result === void 0 ? void 0 : result.id) !== null && _f !== void 0 ? _f : null,
|
|
109
|
+
message,
|
|
110
|
+
};
|
|
85
111
|
}));
|
|
86
112
|
});
|
|
87
113
|
/**
|
|
88
114
|
* Cancel a scheduled message. Returns false if QStash is unavailable.
|
|
89
115
|
*/
|
|
90
|
-
const cancelSchedule = (scheduleId) =>
|
|
91
|
-
const result = yield upstashConfig.withQstash((client) =>
|
|
116
|
+
const cancelSchedule = (scheduleId) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
117
|
+
const result = yield upstashConfig.withQstash((client) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
92
118
|
var _a, _b;
|
|
93
119
|
const anyClient = client;
|
|
94
120
|
if ((_a = anyClient.schedules) === null || _a === void 0 ? void 0 : _a.delete) {
|
|
@@ -106,7 +132,7 @@ const cancelSchedule = (scheduleId) => tslib_es6.__awaiter(void 0, void 0, void
|
|
|
106
132
|
/**
|
|
107
133
|
* Verify QStash signature. Throws on failure in non-dev environments.
|
|
108
134
|
*/
|
|
109
|
-
const verifyQstashSignature = (options) =>
|
|
135
|
+
const verifyQstashSignature = (options) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
110
136
|
var _a;
|
|
111
137
|
if (shouldSkipVerify()) {
|
|
112
138
|
return true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __awaiter } from '
|
|
2
|
-
import { Receiver } from '
|
|
1
|
+
import { __awaiter } from 'tslib';
|
|
2
|
+
import { Receiver } from '@upstash/qstash';
|
|
3
3
|
import { withQstash } from '../upstash-config.mjs';
|
|
4
4
|
|
|
5
5
|
let cachedReceiver = null;
|
|
@@ -36,50 +36,76 @@ const getReceiver = () => {
|
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
+
const generateSourceMessageId = () => {
|
|
40
|
+
try {
|
|
41
|
+
return crypto.randomUUID();
|
|
42
|
+
}
|
|
43
|
+
catch (_a) {
|
|
44
|
+
return `${Date.now()}_${Math.random().toString(16).slice(2)}`;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const createEnvelope = (body) => {
|
|
48
|
+
return {
|
|
49
|
+
source_msg_id: generateSourceMessageId(),
|
|
50
|
+
payload: body,
|
|
51
|
+
};
|
|
52
|
+
};
|
|
39
53
|
/**
|
|
40
54
|
* Publish a message. Returns message id or null if QStash is unavailable.
|
|
41
55
|
*/
|
|
42
56
|
const publishMessage = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
+
const message = createEnvelope(options.body);
|
|
43
58
|
return withQstash((client) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
59
|
var _a;
|
|
45
60
|
const result = yield client.publishJSON({
|
|
46
61
|
url: options.url,
|
|
47
|
-
body:
|
|
62
|
+
body: message,
|
|
48
63
|
});
|
|
49
|
-
return
|
|
64
|
+
return {
|
|
65
|
+
messageId: typeof result === 'string' ? result : (_a = result === null || result === void 0 ? void 0 : result.messageId) !== null && _a !== void 0 ? _a : null,
|
|
66
|
+
message,
|
|
67
|
+
};
|
|
50
68
|
}));
|
|
51
69
|
});
|
|
52
70
|
/**
|
|
53
71
|
* Publish a delayed message. Returns message id or null if QStash is unavailable.
|
|
54
72
|
*/
|
|
55
73
|
const publishDelayedMessage = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
74
|
+
const message = createEnvelope(options.body);
|
|
56
75
|
return withQstash((client) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
76
|
var _a;
|
|
58
77
|
const result = yield client.publishJSON({
|
|
59
78
|
url: options.url,
|
|
60
|
-
body:
|
|
79
|
+
body: message,
|
|
61
80
|
delay: options.delaySec,
|
|
62
81
|
});
|
|
63
|
-
return
|
|
82
|
+
return {
|
|
83
|
+
messageId: typeof result === 'string' ? result : (_a = result === null || result === void 0 ? void 0 : result.messageId) !== null && _a !== void 0 ? _a : null,
|
|
84
|
+
message,
|
|
85
|
+
};
|
|
64
86
|
}));
|
|
65
87
|
});
|
|
66
88
|
/**
|
|
67
89
|
* Schedule a recurring message. Returns schedule id or null if QStash is unavailable.
|
|
68
90
|
*/
|
|
69
91
|
const scheduleMessage = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
92
|
+
const message = createEnvelope(options.body);
|
|
70
93
|
return withQstash((client) => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
94
|
var _a, _b, _c, _d, _e, _f;
|
|
72
95
|
const anyClient = client;
|
|
73
96
|
const result = (_c = (yield ((_b = (_a = anyClient.schedules) === null || _a === void 0 ? void 0 : _a.create) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
74
97
|
url: options.url,
|
|
75
|
-
body:
|
|
98
|
+
body: message,
|
|
76
99
|
cron: options.cron,
|
|
77
100
|
})))) !== null && _c !== void 0 ? _c : (yield ((_d = anyClient.publishJSON) === null || _d === void 0 ? void 0 : _d.call(anyClient, {
|
|
78
101
|
url: options.url,
|
|
79
|
-
body:
|
|
102
|
+
body: message,
|
|
80
103
|
cron: options.cron,
|
|
81
104
|
})));
|
|
82
|
-
return
|
|
105
|
+
return {
|
|
106
|
+
scheduleId: typeof result === 'string' ? result : (_f = (_e = result === null || result === void 0 ? void 0 : result.scheduleId) !== null && _e !== void 0 ? _e : result === null || result === void 0 ? void 0 : result.id) !== null && _f !== void 0 ? _f : null,
|
|
107
|
+
message,
|
|
108
|
+
};
|
|
83
109
|
}));
|
|
84
110
|
});
|
|
85
111
|
/**
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var upstashConfig = require('../upstash-config.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Increment a counter (e.g. views, forwards). Returns null if Redis is unavailable.
|
|
8
8
|
*/
|
|
9
|
-
const incrCounter = (key_1, ...args_1) =>
|
|
9
|
+
const incrCounter = (key_1, ...args_1) => tslib.__awaiter(void 0, [key_1, ...args_1], void 0, function* (key, delta = 1) {
|
|
10
10
|
return upstashConfig.withRedis((redis) => redis.incrby(key, delta));
|
|
11
11
|
});
|
|
12
12
|
/**
|
|
13
13
|
* Get a counter value. Returns null if Redis is unavailable.
|
|
14
14
|
*/
|
|
15
|
-
const getCounter = (key) =>
|
|
16
|
-
return upstashConfig.withRedis((redis) =>
|
|
15
|
+
const getCounter = (key) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
return upstashConfig.withRedis((redis) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
17
17
|
const value = yield redis.get(key);
|
|
18
18
|
return value !== null && value !== void 0 ? value : 0;
|
|
19
19
|
}));
|
|
@@ -21,8 +21,8 @@ const getCounter = (key) => tslib_es6.__awaiter(void 0, void 0, void 0, function
|
|
|
21
21
|
/**
|
|
22
22
|
* Increment a unique counter via SET (e.g. unique views). Returns null if Redis is unavailable.
|
|
23
23
|
*/
|
|
24
|
-
const incrUniqueCounter = (setKey, memberId) =>
|
|
25
|
-
return upstashConfig.withRedis((redis) =>
|
|
24
|
+
const incrUniqueCounter = (setKey, memberId) => 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
|
yield redis.sadd(setKey, memberId);
|
|
27
27
|
return redis.scard(setKey);
|
|
28
28
|
}));
|
|
@@ -30,7 +30,7 @@ const incrUniqueCounter = (setKey, memberId) => tslib_es6.__awaiter(void 0, void
|
|
|
30
30
|
/**
|
|
31
31
|
* Get unique counter value (SET cardinality). Returns null if Redis is unavailable.
|
|
32
32
|
*/
|
|
33
|
-
const getUniqueCounter = (setKey) =>
|
|
33
|
+
const getUniqueCounter = (setKey) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
34
34
|
return upstashConfig.withRedis((redis) => redis.scard(setKey));
|
|
35
35
|
});
|
|
36
36
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var upstashConfig = require('../upstash-config.js');
|
|
5
5
|
|
|
6
6
|
const favoriteTargetKey = (targetId) => `favorite:target:${targetId}`;
|
|
@@ -8,8 +8,8 @@ const favoriteUserKey = (userId) => `favorite:user:${userId}`;
|
|
|
8
8
|
/**
|
|
9
9
|
* Favorite a target. Returns true if added, false if already favorited, null if Redis is unavailable.
|
|
10
10
|
*/
|
|
11
|
-
const addFavorite = (targetId, userId) =>
|
|
12
|
-
return upstashConfig.withRedis((redis) =>
|
|
11
|
+
const addFavorite = (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(favoriteTargetKey(targetId), userId);
|
|
14
14
|
if (added === 1) {
|
|
15
15
|
yield redis.sadd(favoriteUserKey(userId), targetId);
|
|
@@ -21,8 +21,8 @@ const addFavorite = (targetId, userId) => tslib_es6.__awaiter(void 0, void 0, vo
|
|
|
21
21
|
/**
|
|
22
22
|
* Remove a favorite. Returns true if removed, false if not found, null if Redis is unavailable.
|
|
23
23
|
*/
|
|
24
|
-
const removeFavorite = (targetId, userId) =>
|
|
25
|
-
return upstashConfig.withRedis((redis) =>
|
|
24
|
+
const removeFavorite = (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(favoriteTargetKey(targetId), userId);
|
|
27
27
|
if (removed === 1) {
|
|
28
28
|
yield redis.srem(favoriteUserKey(userId), targetId);
|
|
@@ -34,8 +34,8 @@ const removeFavorite = (targetId, userId) => tslib_es6.__awaiter(void 0, void 0,
|
|
|
34
34
|
/**
|
|
35
35
|
* Check whether a user has favorited a target. Returns null if Redis is unavailable.
|
|
36
36
|
*/
|
|
37
|
-
const isFavorited = (targetId, userId) =>
|
|
38
|
-
return upstashConfig.withRedis((redis) =>
|
|
37
|
+
const isFavorited = (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(favoriteTargetKey(targetId), userId);
|
|
40
40
|
return result === 1;
|
|
41
41
|
}));
|
|
@@ -43,13 +43,13 @@ const isFavorited = (targetId, userId) => tslib_es6.__awaiter(void 0, void 0, vo
|
|
|
43
43
|
/**
|
|
44
44
|
* Get favorite count for a target. Returns null if Redis is unavailable.
|
|
45
45
|
*/
|
|
46
|
-
const getFavoriteCount = (targetId) =>
|
|
46
|
+
const getFavoriteCount = (targetId) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
47
47
|
return upstashConfig.withRedis((redis) => redis.scard(favoriteTargetKey(targetId)));
|
|
48
48
|
});
|
|
49
49
|
/**
|
|
50
50
|
* Get target ids favorited by a user. Returns null if Redis is unavailable.
|
|
51
51
|
*/
|
|
52
|
-
const getUserFavorites = (userId) =>
|
|
52
|
+
const getUserFavorites = (userId) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
53
53
|
return upstashConfig.withRedis((redis) => redis.smembers(favoriteUserKey(userId)));
|
|
54
54
|
});
|
|
55
55
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __awaiter } from '
|
|
1
|
+
import { __awaiter } from 'tslib';
|
|
2
2
|
import { withRedis } from '../upstash-config.mjs';
|
|
3
3
|
|
|
4
4
|
const favoriteTargetKey = (targetId) => `favorite:target:${targetId}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
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) =>
|
|
12
|
-
return upstashConfig.withRedis((redis) =>
|
|
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) =>
|
|
25
|
-
return upstashConfig.withRedis((redis) =>
|
|
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) =>
|
|
38
|
-
return upstashConfig.withRedis((redis) =>
|
|
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) =>
|
|
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) =>
|
|
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 '
|
|
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
|
|
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) =>
|
|
25
|
-
return upstashConfig.withRedis((redis) =>
|
|
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) =>
|
|
35
|
-
const result = yield upstashConfig.withRedis((redis) =>
|
|
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) =>
|
|
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 '
|
|
1
|
+
import { __awaiter } from 'tslib';
|
|
2
2
|
import { withRedis } from '../upstash-config.mjs';
|
|
3
3
|
|
|
4
4
|
const unlockScript = `
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type { Redis } from '@upstash/redis';
|
|
2
|
+
export type RedisStringKeyValue = Record<string, string>;
|
|
3
|
+
export type RedisJsonKeyValue<T> = Record<string, T>;
|
|
4
|
+
export type RedisHashStringValue = Record<string, string>;
|
|
5
|
+
export type RedisPipelineBuilder<TResult> = (pipeline: ReturnType<Redis['pipeline']>) => {
|
|
6
|
+
exec: () => Promise<TResult>;
|
|
7
|
+
};
|
|
1
8
|
/**
|
|
2
9
|
* Set a plain string value with optional TTL (seconds).
|
|
3
10
|
*/
|
|
@@ -6,6 +13,14 @@ export declare const setString: (key: string, value: string, ttlSec?: number) =>
|
|
|
6
13
|
* Get a plain string value. Returns null if Redis is unavailable or key missing.
|
|
7
14
|
*/
|
|
8
15
|
export declare const getString: (key: string) => Promise<string | null>;
|
|
16
|
+
/**
|
|
17
|
+
* MGET plain string values. Missing keys are returned as null.
|
|
18
|
+
*/
|
|
19
|
+
export declare const mget: (keys: string[]) => Promise<(string | null)[] | null>;
|
|
20
|
+
/**
|
|
21
|
+
* MSET plain string values.
|
|
22
|
+
*/
|
|
23
|
+
export declare const mset: (entries: RedisStringKeyValue) => Promise<boolean>;
|
|
9
24
|
/**
|
|
10
25
|
* Store an object as JSON string with optional TTL (seconds).
|
|
11
26
|
*/
|
|
@@ -14,10 +29,34 @@ export declare const setJson: <T>(key: string, value: T, ttlSec?: number) => Pro
|
|
|
14
29
|
* Get an object stored as JSON string. Returns null if missing or invalid JSON.
|
|
15
30
|
*/
|
|
16
31
|
export declare const getJson: <T>(key: string) => Promise<T | null>;
|
|
32
|
+
/**
|
|
33
|
+
* MGET JSON values stored as strings. Missing or invalid values are returned as null.
|
|
34
|
+
*/
|
|
35
|
+
export declare const mgetJson: <T>(keys: string[]) => Promise<(T | null)[] | null>;
|
|
36
|
+
/**
|
|
37
|
+
* MSET JSON values as strings.
|
|
38
|
+
*/
|
|
39
|
+
export declare const msetJson: <T>(entries: RedisJsonKeyValue<T>) => Promise<boolean>;
|
|
17
40
|
/**
|
|
18
41
|
* Delete a key. Returns false if Redis is unavailable.
|
|
19
42
|
*/
|
|
20
43
|
export declare const deleteKey: (key: string) => Promise<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* DEL multiple keys. Returns deleted count, or null if Redis is unavailable.
|
|
46
|
+
*/
|
|
47
|
+
export declare const del: (keys: string[]) => Promise<number | null>;
|
|
48
|
+
/**
|
|
49
|
+
* EXISTS a key.
|
|
50
|
+
*/
|
|
51
|
+
export declare const exists: (key: string) => Promise<boolean | null>;
|
|
52
|
+
/**
|
|
53
|
+
* EXPIRE a key in seconds.
|
|
54
|
+
*/
|
|
55
|
+
export declare const expire: (key: string, ttlSec: number) => Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* TTL for a key in seconds. Returns null if Redis is unavailable.
|
|
58
|
+
*/
|
|
59
|
+
export declare const ttl: (key: string) => Promise<number | null>;
|
|
21
60
|
/**
|
|
22
61
|
* Set a hash field value.
|
|
23
62
|
*/
|
|
@@ -26,6 +65,14 @@ export declare const setHashField: (key: string, field: string, value: string) =
|
|
|
26
65
|
* Get a hash field value.
|
|
27
66
|
*/
|
|
28
67
|
export declare const getHashField: (key: string, field: string) => Promise<string | null>;
|
|
68
|
+
/**
|
|
69
|
+
* HMSET hash fields.
|
|
70
|
+
*/
|
|
71
|
+
export declare const hmset: (key: string, values: RedisHashStringValue) => Promise<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* HMGET hash fields.
|
|
74
|
+
*/
|
|
75
|
+
export declare const hmget: (key: string, fields: string[]) => Promise<Record<string, string | null> | null>;
|
|
29
76
|
/**
|
|
30
77
|
* Store a hash field as JSON string.
|
|
31
78
|
*/
|
|
@@ -38,10 +85,42 @@ export declare const getHashJson: <T>(key: string, field: string) => Promise<T |
|
|
|
38
85
|
* Get all hash fields.
|
|
39
86
|
*/
|
|
40
87
|
export declare const getHashAll: (key: string) => Promise<Record<string, string> | null>;
|
|
88
|
+
/**
|
|
89
|
+
* HEXISTS a hash field.
|
|
90
|
+
*/
|
|
91
|
+
export declare const hexists: (key: string, field: string) => Promise<boolean | null>;
|
|
92
|
+
/**
|
|
93
|
+
* HKEYS for a hash.
|
|
94
|
+
*/
|
|
95
|
+
export declare const hkeys: (key: string) => Promise<string[] | null>;
|
|
96
|
+
/**
|
|
97
|
+
* HLEN for a hash.
|
|
98
|
+
*/
|
|
99
|
+
export declare const hlen: (key: string) => Promise<number | null>;
|
|
41
100
|
/**
|
|
42
101
|
* Remove a hash field.
|
|
43
102
|
*/
|
|
44
103
|
export declare const deleteHashField: (key: string, field: string) => Promise<boolean>;
|
|
104
|
+
/**
|
|
105
|
+
* SADD members to a set. Returns count of newly added members, or null if Redis is unavailable.
|
|
106
|
+
*/
|
|
107
|
+
export declare const sadd: (key: string, members: string[]) => Promise<number | null>;
|
|
108
|
+
/**
|
|
109
|
+
* SREM members from a set. Returns count of removed members, or null if Redis is unavailable.
|
|
110
|
+
*/
|
|
111
|
+
export declare const srem: (key: string, members: string[]) => Promise<number | null>;
|
|
112
|
+
/**
|
|
113
|
+
* SISMEMBER for a set member.
|
|
114
|
+
*/
|
|
115
|
+
export declare const sismember: (key: string, member: string) => Promise<boolean | null>;
|
|
116
|
+
/**
|
|
117
|
+
* SMEMBERS for a set.
|
|
118
|
+
*/
|
|
119
|
+
export declare const smembers: (key: string) => Promise<string[] | null>;
|
|
120
|
+
/**
|
|
121
|
+
* SCARD for a set.
|
|
122
|
+
*/
|
|
123
|
+
export declare const scard: (key: string) => Promise<number | null>;
|
|
45
124
|
type ListDirection = 'left' | 'right';
|
|
46
125
|
/**
|
|
47
126
|
* Push values to a list. Returns list length or null if Redis is unavailable.
|
|
@@ -59,5 +138,9 @@ export declare const rangeList: (key: string, start?: number, stop?: number) =>
|
|
|
59
138
|
* Get list length.
|
|
60
139
|
*/
|
|
61
140
|
export declare const listLength: (key: string) => Promise<number | null>;
|
|
141
|
+
/**
|
|
142
|
+
* Execute a Redis pipeline and return the result array from exec().
|
|
143
|
+
*/
|
|
144
|
+
export declare const pipeline: <TResult>(build: RedisPipelineBuilder<TResult>) => Promise<TResult | null>;
|
|
62
145
|
export {};
|
|
63
146
|
//# sourceMappingURL=redis-structures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-structures.d.ts","sourceRoot":"","sources":["../../../src/lib/upstash/redis-structures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"redis-structures.d.ts","sourceRoot":"","sources":["../../../src/lib/upstash/redis-structures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAI5C,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MA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