@nightx.co/pulsar 0.0.0-stage → 1.0.15

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 (162) hide show
  1. package/README.md +14 -2
  2. package/dist/chunk-3sg08kqp.js +10 -0
  3. package/dist/chunk-3sg08kqp.js.map +9 -0
  4. package/dist/chunk-a9kye38b.js +54 -0
  5. package/dist/chunk-a9kye38b.js.map +12 -0
  6. package/dist/chunk-cpn1qh4e.js +10 -0
  7. package/dist/chunk-cpn1qh4e.js.map +12 -0
  8. package/dist/chunk-rrj8rm04.js +10 -0
  9. package/dist/chunk-rrj8rm04.js.map +11 -0
  10. package/dist/cluster/Nebula.d.ts +30 -0
  11. package/dist/cluster/Nebula.d.ts.map +1 -0
  12. package/dist/helpers/computeConfigDelta.d.ts +18 -0
  13. package/dist/helpers/computeConfigDelta.d.ts.map +1 -0
  14. package/dist/helpers/defineQueue.d.ts +13 -0
  15. package/dist/helpers/defineQueue.d.ts.map +1 -0
  16. package/dist/helpers/generateShaHash.d.ts +2 -0
  17. package/dist/helpers/generateShaHash.d.ts.map +1 -0
  18. package/dist/index.d.ts +6 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +8 -0
  21. package/dist/index.js.map +50 -0
  22. package/dist/integrations/PulsarEventsIntegrations.d.ts +7 -0
  23. package/dist/integrations/PulsarEventsIntegrations.d.ts.map +1 -0
  24. package/dist/integrations/PulsarLoggerIntegrations.d.ts +12 -0
  25. package/dist/integrations/PulsarLoggerIntegrations.d.ts.map +1 -0
  26. package/dist/integrations/index.d.ts +4 -0
  27. package/dist/integrations/index.d.ts.map +1 -0
  28. package/dist/integrations/index.js +8 -0
  29. package/dist/integrations/index.js.map +11 -0
  30. package/dist/modules/Queue.module.d.ts +45 -0
  31. package/dist/modules/Queue.module.d.ts.map +1 -0
  32. package/dist/modules/Scheduler.module.d.ts +42 -0
  33. package/dist/modules/Scheduler.module.d.ts.map +1 -0
  34. package/dist/modules/Tick.module.d.ts +35 -0
  35. package/dist/modules/Tick.module.d.ts.map +1 -0
  36. package/dist/modules/TickController.module.d.ts +36 -0
  37. package/dist/modules/TickController.module.d.ts.map +1 -0
  38. package/dist/monitoring/PulsarMonitoringStreamProducer.d.ts +2 -0
  39. package/dist/monitoring/PulsarMonitoringStreamProducer.d.ts.map +1 -0
  40. package/dist/monitoring/index.d.ts +2 -0
  41. package/dist/monitoring/index.d.ts.map +1 -0
  42. package/dist/monitoring/server/PulsarMonitoringStream.d.ts +2 -0
  43. package/dist/monitoring/server/PulsarMonitoringStream.d.ts.map +1 -0
  44. package/dist/network/NetworkInterface.d.ts +13 -0
  45. package/dist/network/NetworkInterface.d.ts.map +1 -0
  46. package/dist/network/UnifiedTransportManager.d.ts +21 -0
  47. package/dist/network/UnifiedTransportManager.d.ts.map +1 -0
  48. package/dist/network/abstract/BaseNetworkDriver.d.ts +17 -0
  49. package/dist/network/abstract/BaseNetworkDriver.d.ts.map +1 -0
  50. package/dist/network/auth/Authenticator.d.ts +2 -0
  51. package/dist/network/auth/Authenticator.d.ts.map +1 -0
  52. package/dist/network/drivers/HttpNetworkDriver.d.ts +31 -0
  53. package/dist/network/drivers/HttpNetworkDriver.d.ts.map +1 -0
  54. package/dist/network/drivers/WebSocketNetworkDriver.d.ts +23 -0
  55. package/dist/network/drivers/WebSocketNetworkDriver.d.ts.map +1 -0
  56. package/dist/network/helpers/httpQueueOperations.d.ts +2 -0
  57. package/dist/network/helpers/httpQueueOperations.d.ts.map +1 -0
  58. package/dist/network/interfaces/network.types.d.ts +13 -0
  59. package/dist/network/interfaces/network.types.d.ts.map +1 -0
  60. package/dist/run/Queues.d.ts +2 -0
  61. package/dist/run/Queues.d.ts.map +1 -0
  62. package/dist/run/index.d.ts +2 -0
  63. package/dist/run/index.d.ts.map +1 -0
  64. package/dist/run/index2.d.ts +2 -0
  65. package/dist/run/index2.d.ts.map +1 -0
  66. package/dist/runtimes/IsolateRuntime.d.ts +17 -0
  67. package/dist/runtimes/IsolateRuntime.d.ts.map +1 -0
  68. package/dist/runtimes/PersistentRuntime.d.ts +22 -0
  69. package/dist/runtimes/PersistentRuntime.d.ts.map +1 -0
  70. package/dist/runtimes/ServerlessRuntime.d.ts +15 -0
  71. package/dist/runtimes/ServerlessRuntime.d.ts.map +1 -0
  72. package/dist/runtimes/runtimeTypes.d.ts +15 -0
  73. package/dist/runtimes/runtimeTypes.d.ts.map +1 -0
  74. package/dist/server/PulsarRequestHandler.d.ts +41 -0
  75. package/dist/server/PulsarRequestHandler.d.ts.map +1 -0
  76. package/dist/server/helpers/acquireRedisLock.d.ts +14 -0
  77. package/dist/server/helpers/acquireRedisLock.d.ts.map +1 -0
  78. package/dist/server/helpers/checkFencingValidity.d.ts +14 -0
  79. package/dist/server/helpers/checkFencingValidity.d.ts.map +1 -0
  80. package/dist/server/helpers/performIsolateRestart.d.ts +20 -0
  81. package/dist/server/helpers/performIsolateRestart.d.ts.map +1 -0
  82. package/dist/server/index.d.ts +2 -0
  83. package/dist/server/index.d.ts.map +1 -0
  84. package/dist/server/index.js +8 -0
  85. package/dist/server/index.js.map +13 -0
  86. package/dist/server/parser/parseRequest.d.ts +10 -0
  87. package/dist/server/parser/parseRequest.d.ts.map +1 -0
  88. package/dist/server/utility/extract-headers.d.ts +14 -0
  89. package/dist/server/utility/extract-headers.d.ts.map +1 -0
  90. package/dist/service/ConfigurationStore.d.ts +23 -0
  91. package/dist/service/ConfigurationStore.d.ts.map +1 -0
  92. package/dist/service/Isolate.service.d.ts +12 -0
  93. package/dist/service/Isolate.service.d.ts.map +1 -0
  94. package/dist/service/Pulsar.service.d.ts +41 -0
  95. package/dist/service/Pulsar.service.d.ts.map +1 -0
  96. package/dist/service/PulsarBaseService.d.ts +49 -0
  97. package/dist/service/PulsarBaseService.d.ts.map +1 -0
  98. package/dist/service/PulsarEventBus.d.ts +36 -0
  99. package/dist/service/PulsarEventBus.d.ts.map +1 -0
  100. package/dist/service/SwarmBudgetTracker.d.ts +14 -0
  101. package/dist/service/SwarmBudgetTracker.d.ts.map +1 -0
  102. package/dist/service/consumers/PulsarWorker.d.ts +10 -0
  103. package/dist/service/consumers/PulsarWorker.d.ts.map +1 -0
  104. package/dist/shared/PulsarRuntimeCore.d.ts +55 -0
  105. package/dist/shared/PulsarRuntimeCore.d.ts.map +1 -0
  106. package/dist/static/TimingProfile.d.ts +9 -0
  107. package/dist/static/TimingProfile.d.ts.map +1 -0
  108. package/dist/static/static.d.ts +3 -0
  109. package/dist/static/static.d.ts.map +1 -0
  110. package/dist/storage/PulsarStorage.d.ts +42 -0
  111. package/dist/storage/PulsarStorage.d.ts.map +1 -0
  112. package/dist/storage/drivers/PostgresDriver.d.ts +20 -0
  113. package/dist/storage/drivers/PostgresDriver.d.ts.map +1 -0
  114. package/dist/storage/drivers/RedisDriver.d.ts +20 -0
  115. package/dist/storage/drivers/RedisDriver.d.ts.map +1 -0
  116. package/dist/storage/drivers/types.d.ts +27 -0
  117. package/dist/storage/drivers/types.d.ts.map +1 -0
  118. package/dist/storage/index.d.ts +4 -0
  119. package/dist/storage/index.d.ts.map +1 -0
  120. package/dist/storage/index.js +403 -0
  121. package/dist/storage/index.js.map +21 -0
  122. package/dist/storage/repositories/PostgresEngineOperationRepository.d.ts +39 -0
  123. package/dist/storage/repositories/PostgresEngineOperationRepository.d.ts.map +1 -0
  124. package/dist/storage/repositories/PostgresQueueRepository.d.ts +26 -0
  125. package/dist/storage/repositories/PostgresQueueRepository.d.ts.map +1 -0
  126. package/dist/storage/repositories/QueueRepository.d.ts +20 -0
  127. package/dist/storage/repositories/QueueRepository.d.ts.map +1 -0
  128. package/dist/storage/repositories/RedisQueueRepository.d.ts +28 -0
  129. package/dist/storage/repositories/RedisQueueRepository.d.ts.map +1 -0
  130. package/dist/subsys/DeferredTickEvaluator.d.ts +23 -0
  131. package/dist/subsys/DeferredTickEvaluator.d.ts.map +1 -0
  132. package/dist/subsys/EventBus.d.ts +13 -0
  133. package/dist/subsys/EventBus.d.ts.map +1 -0
  134. package/dist/subsys/ExecutionProfileSwitcher.d.ts +10 -0
  135. package/dist/subsys/ExecutionProfileSwitcher.d.ts.map +1 -0
  136. package/dist/subsys/LoggerService.d.ts +15 -0
  137. package/dist/subsys/LoggerService.d.ts.map +1 -0
  138. package/dist/subsys/PulsarClock.d.ts +32 -0
  139. package/dist/subsys/PulsarClock.d.ts.map +1 -0
  140. package/dist/subsys/RuntimeCacheStorage.d.ts +18 -0
  141. package/dist/subsys/RuntimeCacheStorage.d.ts.map +1 -0
  142. package/dist/subsys/RuntimeEventBridge.d.ts +16 -0
  143. package/dist/subsys/RuntimeEventBridge.d.ts.map +1 -0
  144. package/dist/types/base.types.d.ts +65 -0
  145. package/dist/types/base.types.d.ts.map +1 -0
  146. package/dist/types/config.types.d.ts +56 -0
  147. package/dist/types/config.types.d.ts.map +1 -0
  148. package/dist/types/consumer.types.d.ts +36 -0
  149. package/dist/types/consumer.types.d.ts.map +1 -0
  150. package/dist/types/engine.types.d.ts +139 -0
  151. package/dist/types/engine.types.d.ts.map +1 -0
  152. package/dist/types/eventTriggerStrategry.types.d.ts +34 -0
  153. package/dist/types/eventTriggerStrategry.types.d.ts.map +1 -0
  154. package/dist/types/integrations.types.d.ts +16 -0
  155. package/dist/types/integrations.types.d.ts.map +1 -0
  156. package/dist/types/nebula.types.d.ts +65 -0
  157. package/dist/types/nebula.types.d.ts.map +1 -0
  158. package/dist/types/queue.types.d.ts +106 -0
  159. package/dist/types/queue.types.d.ts.map +1 -0
  160. package/dist/types/runtime.types.d.ts +89 -0
  161. package/dist/types/runtime.types.d.ts.map +1 -0
  162. package/package.json +71 -5
@@ -0,0 +1,21 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["..\\src\\static\\static.ts", "..\\src\\storage\\repositories\\QueueRepository.ts", "..\\src\\storage\\repositories\\PostgresQueueRepository.ts", "..\\src\\storage\\repositories\\RedisQueueRepository.ts", "..\\src\\helpers\\computeConfigDelta.ts", "..\\src\\storage\\repositories\\PostgresEngineOperationRepository.ts", "..\\src\\storage\\PulsarStorage.ts", "..\\src\\storage\\drivers\\PostgresDriver.ts", "..\\src\\storage\\drivers\\RedisDriver.ts", "..\\..\\..\\node_modules\\.bun\\uncrypto@0.1.3\\node_modules\\uncrypto\\dist\\crypto.node.mjs", "..\\..\\..\\node_modules\\.bun\\@upstash+redis@1.41.0\\node_modules\\@upstash\\redis\\chunk-CGMWROAN.mjs", "..\\..\\..\\node_modules\\.bun\\@upstash+redis@1.41.0\\node_modules\\@upstash\\redis\\nodejs.mjs"],
4
+ "sourcesContent": [
5
+ "export type QUEUE = \"q_1\" | \"q_2\" | \"q_3\" | \"q_4\" | \"q_5\";\r\n\r\n//export const MAX_ISOLATE_LIFESPAN_MS = 180_000;\r\nexport const WORKER_TTL_MS = 90 * 1000; // 90 seconds TTL per worker\r\n",
6
+ "import type { IBatchCandidate } from \"../../modules/Tick.module\";\r\n\r\nexport abstract class BaseQueueRepository {\r\n public abstract getActiveWorkersCount(queue : string) : Promise<number>;\r\n public abstract getGlobalActiveWorkersCount () : Promise<number>;\r\n\r\n public abstract registerWorker(queue : string, candidateBatches : IBatchCandidate[], concurrency : number, globalMaxConcurrency : number) : Promise<string[]>;\r\n public abstract deregisterWorker(workerId : string, queue : string) : Promise<void>;\r\n\r\n public abstract claimGlobalJobBudget(requested : number, maxGlobalJobsPerTick : number) : Promise<{ granted : number, window : string }>;\r\n public abstract refundGlobalJobBudget(amount : number, window : string) : Promise<void>;\r\n\r\n public abstract acquireQueueLock(lockKey : string, ownerId : string, ttlMs : number) : Promise<boolean>;\r\n public abstract releaseQueueLock(lockKey : string, ownerId : string) : Promise<boolean>;\r\n\r\n public abstract evaluateDeadRun(\r\n queueName : string,\r\n poolerType : \"interval-driven-pooler\" | \"event-driven-pooler\",\r\n totalJobs : number,\r\n continuationOwnerId : string,\r\n dispatchTtlMs : number,\r\n idpLockKey? : string,\r\n edpLockPrefix? : string\r\n ) : Promise<boolean>;\r\n \r\n public abstract clearDispatchPending(lockKey : string) : Promise<void>;\r\n\r\n public abstract setFutureSchedule(queue : string, scheduleAt : string) : Promise<void>;\r\n\r\n public abstract getStopSignal(queue : string) : Promise<boolean>;\r\n}\r\n\r\nexport type IQueueRepository = BaseQueueRepository;",
7
+ "import postgres from \"postgres\";\r\nimport { WORKER_TTL_MS } from \"../../static/static.ts\";\r\n\r\nimport type { PostgresDriver } from \"../drivers/PostgresDriver.ts\";\r\nimport type { IBatchCandidate } from \"../../modules/Tick.module.ts\";\r\nimport { BaseQueueRepository } from \"./QueueRepository.ts\";\r\n\r\ntype DeadRunReason = | \"ALLOWED\" | \"NO_JOBS\" | \"IDP_LOCKED\" | \"EDP_LOCKED\" | \"EDP_DISPATCH_PENDING\" | \"UNKNOWN_POOLER\";\r\n\r\nconst NEVER_EXPIRES = \"9223372036854775807\";\r\n\r\nexport class PostgresQueueRepository extends BaseQueueRepository {\r\n constructor(private readonly driver : PostgresDriver) {\r\n super();\r\n this.driver = driver;\r\n }\r\n\r\n private get sql () : postgres.Sql {\r\n return this.driver.getNativeClient();\r\n }\r\n\r\n private get prefix () : string {\r\n if(!this.driver.prefix) {\r\n throw new Error('[PostgresQueueRepository] Driver prefix is missing. Ensure the prefix is configured by calling driver.setPrefix(string).');\r\n }\r\n return this.driver.prefix;\r\n }\r\n\r\n override async registerWorker (queue : string, candidateBatches : IBatchCandidate[], concurrency : number, globalMaxConcurrency : number = Infinity) {\r\n const registryKey = `${this.prefix}:queues:${queue}:worker_registry`;\r\n const globalRegistryKey = `${this.prefix}:global_worker_registry`;\r\n\r\n const candidateIds = candidateBatches.map(b => b.workerId);\r\n\r\n if (candidateIds.length === 0) return [];\r\n\r\n const effectiveGlobalLimit = globalMaxConcurrency === Infinity ? 2147483647 : globalMaxConcurrency;\r\n\r\n const result = await this.sql<{ granted_worker_id: string }[]>`\r\n SELECT granted_worker_id\r\n FROM register_workers(\r\n ${registryKey}::varchar,\r\n ${globalRegistryKey}::varchar,\r\n ${concurrency}::int,\r\n ${effectiveGlobalLimit}::int,\r\n ${WORKER_TTL_MS}::bigint,\r\n ${this.sql.array(candidateIds)}::varchar[]\r\n )\r\n `;\r\n\r\n return result.map(row => row.granted_worker_id);\r\n }\r\n\r\n override async deregisterWorker(workerId : string, queue : string) {\r\n if (!workerId) return;\r\n const registryKey = `${this.prefix}:queues:${queue}:worker_registry`;\r\n const globalRegistryKey = `${this.prefix}:global_worker_registry`;\r\n\r\n const globalWorkerId = `${registryKey}:${workerId}`;\r\n\r\n await this.sql`\r\n DELETE FROM pulsar.queue_cache\r\n WHERE (key = ${registryKey} AND field = ${workerId})\r\n OR (key = ${globalRegistryKey} AND field = ${globalWorkerId})\r\n `;\r\n }\r\n\r\n override async getActiveWorkersCount(queue : string) {\r\n const registryKey = `${this.prefix}:queues:${queue}:worker_registry`;\r\n\r\n const [result] = await this.sql<{ count: number }[]>`\r\n SELECT COUNT(*)::int AS count\r\n FROM pulsar.queue_cache\r\n WHERE key = ${registryKey} AND expires_at > pulsar.now_ms()\r\n `;\r\n\r\n return result?.count ?? 0;\r\n }\r\n\r\n override async setFutureSchedule(queue : string, scheduleAt : string) : Promise<void> {\r\n const registryKey = `${this.prefix}:queues:${queue}:next_ready_at`;\r\n\r\n await this.sql`\r\n INSERT INTO pulsar.queue_cache (key, field, value, expires_at)\r\n VALUES (${registryKey}, '', ${scheduleAt}, ${NEVER_EXPIRES})\r\n ON CONFLICT (key, field)\r\n DO UPDATE SET value = EXCLUDED.value\r\n `;\r\n }\r\n\r\n override async getGlobalActiveWorkersCount() {\r\n const globalRegistryKey = `${this.prefix}:global_worker_registry`;\r\n\r\n const [result] = await this.sql<{ count: number }[]>`\r\n SELECT COUNT(*)::int AS count\r\n FROM pulsar.queue_cache\r\n WHERE key = ${globalRegistryKey} AND expires_at > pulsar.now_ms()\r\n `;\r\n\r\n return result?.count ?? 0;\r\n }\r\n\r\n override async refundGlobalJobBudget(amount : number, window : string) {\r\n if (amount <= 0) return;\r\n\r\n const windowKey = `${this.budgetKeyPrefix()}${window}`;\r\n\r\n await this.sql`\r\n UPDATE pulsar.queue_cache\r\n SET value = GREATEST(0, value::int - ${amount})::text\r\n WHERE key = ${windowKey} AND field = 'count'\r\n `;\r\n }\r\n\r\n private budgetKeyPrefix() {\r\n return `${this.prefix}:global:job_budget`;\r\n }\r\n\r\n override async claimGlobalJobBudget(requested : number, maxGlobalJobsPerTick : number) {\r\n if (maxGlobalJobsPerTick === Infinity || maxGlobalJobsPerTick <= 0) {\r\n return { granted: requested, window: \"\" };\r\n }\r\n\r\n const prefix = this.budgetKeyPrefix();\r\n\r\n return await this.sql.begin(async (tx) => {\r\n // Lock first, THEN read the clock, so the window we use is the one that\r\n // is current when we actually hold the lock. The lock is per budget\r\n // (not per window) so claims stay fully serialized across a rollover.\r\n await tx`SELECT pg_advisory_xact_lock(hashtext(${prefix}))`;\r\n\r\n const [clock] = await tx<{ second: number }[]>`\r\n SELECT floor(pulsar.now_ms() / 1000)::float8 AS second\r\n `;\r\n const second = clock!.second;\r\n const windowKey = `${prefix}${second}`;\r\n const expiresAt = (second + 2) * 1000; // TTL 2s\r\n\r\n await tx`\r\n DELETE FROM pulsar.queue_cache\r\n WHERE starts_with(key, ${prefix})\r\n AND expires_at <= pulsar.now_ms()\r\n `;\r\n\r\n const [row] = await tx<{ used: number }[]>`\r\n SELECT COALESCE(\r\n (SELECT value::int FROM pulsar.queue_cache WHERE key = ${windowKey} AND field = 'count'),\r\n 0\r\n ) AS used\r\n `;\r\n\r\n const granted = Math.max(0, Math.min(requested, maxGlobalJobsPerTick - (row?.used ?? 0)));\r\n\r\n if (granted > 0) {\r\n await tx`\r\n INSERT INTO pulsar.queue_cache (key, field, value, expires_at)\r\n VALUES (${windowKey}, 'count', ${String(granted)}, ${expiresAt}::bigint)\r\n ON CONFLICT (key, field) DO UPDATE\r\n SET value = (pulsar.queue_cache.value::int + ${granted})::text\r\n `;\r\n }\r\n\r\n return { granted, window: String(second) };\r\n });\r\n }\r\n\r\n override async acquireQueueLock(lockKey : string, ownerId : string, ttlMs : number): Promise<boolean> {\r\n const now = Date.now();\r\n const expiresAt = now + ttlMs;\r\n \r\n const rows = await this.sql`\r\n INSERT INTO pulsar.queue_cache (key, field, value, expires_at)\r\n VALUES (${`${this.prefix}:${lockKey}`}, '', ${ownerId}, ${expiresAt})\r\n ON CONFLICT (key, field) DO UPDATE\r\n SET value = EXCLUDED.value, expires_at = EXCLUDED.expires_at\r\n WHERE pulsar.queue_cache.expires_at IS NULL\r\n OR pulsar.queue_cache.expires_at <= ${now}\r\n OR pulsar.queue_cache.value = EXCLUDED.value\r\n RETURNING 1\r\n `;\r\n \r\n return rows.length > 0;\r\n }\r\n\r\n override async releaseQueueLock(lockKey : string, ownerId : string): Promise<boolean> {\r\n const now = Date.now();\r\n\r\n const rows = await this.sql`\r\n DELETE FROM pulsar.queue_cache\r\n WHERE key = ${`${this.prefix}:${lockKey}`}\r\n AND field = ''\r\n AND value = ${ownerId}\r\n AND (expires_at IS NULL OR expires_at > ${now})\r\n RETURNING 1\r\n `;\r\n\r\n return rows.length === 1;\r\n }\r\n\r\n override async evaluateDeadRun(\r\n queueName : string,\r\n poolerType : \"interval-driven-pooler\" | \"event-driven-pooler\",\r\n totalJobs : number,\r\n continuationOwnerId : string,\r\n dispatchTtlMs : number = 15000,\r\n idpLockKey : string = \"lock:idp\",\r\n edpLockPrefix : string = \"lock:edp:\"\r\n ) : Promise<boolean> {\r\n const now = Date.now();\r\n\r\n const prefixedIdpLockKey = `${this.prefix}:${idpLockKey}`;\r\n const prefixedEdpLockKey = `${this.prefix}:${edpLockPrefix}`;\r\n\r\n const reason : DeadRunReason = await this.sql.begin(async (tx) => {\r\n await tx`SELECT pg_advisory_xact_lock(hashtext(${`dead_run:${queueName}`}))`;\r\n\r\n const readLive = async (key : string) => {\r\n const [row] = await tx<{ value: string }[]>`\r\n SELECT value FROM pulsar.queue_cache\r\n WHERE key = ${key} AND field = ''\r\n AND (expires_at IS NULL OR expires_at > ${now})\r\n `;\r\n return row?.value ?? null;\r\n };\r\n\r\n if (poolerType === \"interval-driven-pooler\") {\r\n const holder = await readLive(prefixedIdpLockKey!);\r\n if (holder !== null && holder !== continuationOwnerId) return \"IDP_LOCKED\";\r\n return \"ALLOWED\";\r\n }\r\n\r\n if (poolerType === \"event-driven-pooler\") {\r\n if (totalJobs <= 0) return \"NO_JOBS\";\r\n\r\n const edpLockKey = `${prefixedEdpLockKey}${queueName}`;\r\n const holder = await readLive(edpLockKey);\r\n if (holder !== null) {\r\n return holder === continuationOwnerId ? \"ALLOWED\" : \"EDP_LOCKED\";\r\n }\r\n\r\n const pending = await readLive(`${edpLockKey}:pending`);\r\n if (pending !== null) return \"EDP_DISPATCH_PENDING\";\r\n\r\n await tx`\r\n INSERT INTO pulsar.queue_cache (key, field, value, expires_at)\r\n VALUES (${`${edpLockKey}:pending`}, '', '1', ${now + dispatchTtlMs})\r\n ON CONFLICT (key, field) DO UPDATE\r\n SET value = EXCLUDED.value, expires_at = EXCLUDED.expires_at\r\n `;\r\n return \"ALLOWED\";\r\n }\r\n\r\n return \"UNKNOWN_POOLER\";\r\n });\r\n\r\n if (reason !== \"ALLOWED\") {\r\n console.log(`DEAD_RUN STOP REASON : ${reason}`);\r\n }\r\n\r\n return reason === \"ALLOWED\";\r\n }\r\n\r\n override async clearDispatchPending(lockKey : string) : Promise<void> {\r\n const dispatchKey = `${lockKey}:pending`;\r\n \r\n await this.sql`\r\n DELETE FROM pulsar.queue_cache\r\n WHERE key = ${dispatchKey} AND field = ''\r\n `;\r\n }\r\n\r\n override async getStopSignal() : Promise<boolean> {\r\n return await false\r\n }\r\n}",
8
+ "import type { Redis as RedisTCP } from \"ioredis\";\r\nimport type { Redis as RedisHTTP } from \"@upstash/redis\";\r\nimport type { RedisDriver } from \"../drivers/RedisDriver.ts\";\r\nimport type { IBatchCandidate } from \"../../modules/Tick.module.ts\";\r\n\r\nimport REGISTER_WORKERS_LUA from \"../../scripts/lua/registerWorkers.lua\";\r\nimport ACQUIRE_QUEUE_LOCK_LUA from \"../../scripts/lua/acquireQueueLock.lua\";\r\nimport RELEASE_QUEUE_LOCK_LUA from \"../../scripts/lua/releaseQueueLock.lua\";\r\nimport EVALUATE_DEAD_RUN_LUA from \"../../scripts/lua/evaluateDeadRun.lua\";\r\nimport CLAIM_GLOBAL_BUDGET_LUA from \"../../scripts/lua/claimGlobalJobBudget.lua\";\r\nimport REFUND_GLOBAL_BUDGET_LUA from \"../../scripts/lua/refundGlobalJobBudget.lua\";\r\nimport COUNT_ACTIVE_WORKERS_LUA from \"../../scripts/lua/countActiveWorkers.lua\";\r\nimport STOP_LUA from \"../../scripts/lua/stop.lua\";\r\n\r\nimport { BaseQueueRepository } from \"./QueueRepository.ts\";\r\nimport { WORKER_TTL_MS } from \"../../static/static.ts\";\r\n\r\ntype DeadRunReason = | \"ALLOWED\" | \"NO_JOBS\" | \"IDP_LOCKED\" | \"EDP_LOCKED\" | \"EDP_DISPATCH_PENDING\" | \"UNKNOWN_POOLER\";\r\n\r\nexport class RedisQueueRepository extends BaseQueueRepository {\r\n private protocol : \"tcp\" | \"http\";\r\n\r\n constructor(private readonly driver : RedisDriver) {\r\n super();\r\n this.protocol = driver.options.protocol;\r\n this.driver = driver;\r\n }\r\n\r\n private get redis() : RedisTCP | RedisHTTP {\r\n return this.driver.getNativeClient();\r\n }\r\n\r\n private get prefix () : string {\r\n if(!this.driver.prefix) {\r\n throw new Error('[RedisQueueRepository] Driver prefix is missing. Ensure the prefix is configured by calling driver.setPrefix(string).');\r\n }\r\n return this.driver.prefix;\r\n }\r\n\r\n override async registerWorker (queue : string, candidateBatches : IBatchCandidate[], concurrency : number, globalMaxConcurrency : number = Infinity) {\r\n const registryKey = `${this.prefix}:queues:${queue}:worker_registry`;\r\n const globalRegistryKey = `${this.prefix}:global_worker_registry`;\r\n const now = Date.now();\r\n\r\n const keys = [registryKey, globalRegistryKey];\r\n const args = [\r\n concurrency,\r\n globalMaxConcurrency === Infinity ? 999999999 : globalMaxConcurrency,\r\n now,\r\n WORKER_TTL_MS,\r\n ...candidateBatches.map((b) => b.workerId),\r\n ] as string[];\r\n\r\n if (this.protocol === \"http\") {\r\n const httpRedis = this.redis as RedisHTTP;\r\n\r\n const grantedWorkerIds = await httpRedis.eval<string[]>(\r\n REGISTER_WORKERS_LUA,\r\n keys,\r\n args\r\n ) as string[];\r\n return grantedWorkerIds ?? [];\r\n }\r\n else {\r\n const tcpRedis = this.redis as RedisTCP;\r\n const grantedWorkerIds = (await tcpRedis.eval(\r\n REGISTER_WORKERS_LUA,\r\n keys.length,\r\n ...keys,\r\n ...args\r\n )) as string[];\r\n return grantedWorkerIds ?? [];\r\n }\r\n }\r\n\r\n override async deregisterWorker(workerId : string, queue : string) {\r\n if (!workerId) return;\r\n const registryKey = `${this.prefix}:queues:${queue}:worker_registry`;\r\n const globalRegistryKey = `${this.prefix}:global_worker_registry`;\r\n\r\n const globalWorkerId = `${registryKey}:${workerId}`;\r\n\r\n const pipeline = this.redis.pipeline();\r\n pipeline.hdel(registryKey, workerId);\r\n pipeline.hdel(globalRegistryKey, globalWorkerId);\r\n await pipeline.exec();\r\n }\r\n\r\n override async getActiveWorkersCount(queue : string) {\r\n const registryKey = `${this.prefix}:queues:${queue}:worker_registry`;\r\n const count = await this.evalScript<number>(COUNT_ACTIVE_WORKERS_LUA, [registryKey], []);\r\n return Number(count ?? 0);\r\n }\r\n\r\n override async getGlobalActiveWorkersCount() {\r\n const globalRegistryKey = `${this.prefix}:global_worker_registry`;\r\n const count = await this.evalScript<number>(COUNT_ACTIVE_WORKERS_LUA, [globalRegistryKey], []);\r\n return Number(count ?? 0);\r\n }\r\n\r\n override async setFutureSchedule(queue : string, scheduleAt : string) {\r\n const registryKey = `${this.prefix}:queues:${queue}:next_ready_at`;\r\n await this.redis.set(registryKey, scheduleAt);\r\n }\r\n\r\n private budgetKeyPrefix() {\r\n return `${this.prefix}:global:job_budget`;\r\n }\r\n\r\n override async claimGlobalJobBudget(requested : number, maxGlobalJobsPerTick : number) {\r\n if (maxGlobalJobsPerTick === Infinity || maxGlobalJobsPerTick <= 0) {\r\n return { granted: requested, window: \"\" };\r\n }\r\n\r\n const result = await this.evalScript<[number | string, number | string]>(\r\n CLAIM_GLOBAL_BUDGET_LUA,\r\n [this.budgetKeyPrefix()],\r\n [requested, maxGlobalJobsPerTick]\r\n )\r\n\r\n const [granted, window] = result ?? [0, \"\"];\r\n return { granted: Number(granted ?? 0), window: String(window ?? \"\") };\r\n }\r\n\r\n override async refundGlobalJobBudget(amount : number, window : string) {\r\n if (amount <= 0 || !window) return;\r\n\r\n const windowKey = `${this.budgetKeyPrefix()}:${window}`;\r\n await this.evalScript<unknown>(REFUND_GLOBAL_BUDGET_LUA, [windowKey], [amount]);\r\n }\r\n\r\n override async acquireQueueLock(lockKey : string, ownerId : string, ttlMs : number) : Promise<boolean> {\r\n const result = await this.evalScript<number>(ACQUIRE_QUEUE_LOCK_LUA, [`${this.prefix}:${lockKey}`], [ownerId, ttlMs]);\r\n return Boolean(result);\r\n }\r\n\r\n override async releaseQueueLock(lockKey : string, ownerId : string) : Promise<boolean> {\r\n const result = await this.evalScript<number>(RELEASE_QUEUE_LOCK_LUA, [`${this.prefix}:${lockKey}`], [ownerId]);\r\n return result === 1;\r\n }\r\n\r\n override async clearDispatchPending(lockKey : string) : Promise<void> {\r\n const dispatchKey = `${lockKey}:pending`;\r\n await this.redis.del(dispatchKey);\r\n }\r\n\r\n override async evaluateDeadRun(\r\n queueName : string,\r\n poolerType : \"interval-driven-pooler\" | \"event-driven-pooler\",\r\n totalJobs : number,\r\n continuationOwnerId : string,\r\n dispatchTtlMs : number = 15000,\r\n idpLockKey : string = \"lock:idp\",\r\n edpLockPrefix : string = \"lock:edp:\"\r\n ) : Promise<boolean> {\r\n\r\n const prefixedIdpLockKey = `${this.prefix}:${idpLockKey}`;\r\n const prefixedEdpLockKey = `${this.prefix}:${edpLockPrefix}`;\r\n\r\n const keys = [prefixedIdpLockKey, prefixedEdpLockKey];\r\n const args = [queueName, poolerType, totalJobs, continuationOwnerId, dispatchTtlMs];\r\n \r\n const reason = await this.evalScript<DeadRunReason>(EVALUATE_DEAD_RUN_LUA, keys, args);\r\n\r\n if(reason !== \"ALLOWED\") {\r\n console.log(`DEAD_RUN STOP REASON : ${reason}`);\r\n }\r\n\r\n return reason === \"ALLOWED\";\r\n }\r\n\r\n private async evalScript<T>(script : string, keys : string[], args : (string | number)[]) : Promise<T> {\r\n if (this.protocol === \"http\") {\r\n const httpRedis = this.redis as RedisHTTP;\r\n return (await httpRedis.eval(script, keys, args)) as T;\r\n }\r\n const tcpRedis = this.redis as RedisTCP;\r\n return (await tcpRedis.eval(script, keys.length, ...keys, ...args)) as T;\r\n }\r\n\r\n override async getStopSignal(queue : string) : Promise<boolean> {\r\n const stopKey = `${this.prefix}:stops:${queue}`;\r\n\r\n const result = await this.evalScript<number>(STOP_LUA, [stopKey], []);\r\n return result === 1;\r\n }\r\n}",
9
+ "import type { IConfigurationObject } from \"../types/config.types\";\r\n\r\nexport function computeConfigDelta(oldCfg : IConfigurationObject, newCfg : IConfigurationObject) {\r\n const urlChanged = oldCfg.self_url !== newCfg.self_url;\r\n\r\n const oldQueueMap = new Map(oldCfg.queues.map(q => [q.queue, q.pooler]));\r\n const newQueueMap = new Map(newCfg.queues.map(q => [q.queue, q.pooler]));\r\n\r\n const addedQueues: Array<{ queue: string; pooler: string }> = [];\r\n const removedQueues: Array<{ queue: string; pooler: string }> = [];\r\n const modifiedQueues: Array<{ queue: string; oldPooler: string; newPooler: string }> = [];\r\n\r\n // ADDED OR MODIFIED QUEUES\r\n for (const [queue, newPooler] of newQueueMap.entries()) {\r\n if (!oldQueueMap.has(queue)) {\r\n addedQueues.push({ queue, pooler: newPooler });\r\n }\r\n else {\r\n const oldPooler = oldQueueMap.get(queue);\r\n if (oldPooler !== newPooler) {\r\n modifiedQueues.push({ queue, oldPooler: oldPooler!, newPooler });\r\n }\r\n }\r\n }\r\n\r\n // REMOVED QUEUES\r\n for (const [queue, oldPooler] of oldQueueMap.entries()) {\r\n if (!newQueueMap.has(queue)) {\r\n removedQueues.push({ queue, pooler: oldPooler });\r\n }\r\n }\r\n\r\n return {\r\n urlChanged,\r\n addedQueues,\r\n removedQueues,\r\n modifiedQueues\r\n }\r\n}",
10
+ "import postgres from \"postgres\";\r\nimport { PostgresDriver } from \"../drivers/PostgresDriver.ts\";\r\nimport { computeConfigDelta } from \"../../helpers/computeConfigDelta.ts\";\r\nimport { LoggerService, type ILogger } from \"../../subsys/LoggerService.ts\";\r\n\r\nimport { PulsarRuntime } from \"../../types/runtime.types.ts\";\r\nimport { EventTriggerStrategy } from \"../../types/eventTriggerStrategry.types.ts\";\r\nimport type { EngineQueuesConfig } from \"../../types/queue.types.ts\";\r\nimport type { IConfigurationObject, IConfigSyncResult } from \"../../types/config.types.ts\";\r\nimport type { EnginePoolingMode } from \"../../types/engine.types.ts\";\r\n\r\nexport interface IPulsarPostgresEngineOperationRepository {\r\n addRestart(queues : EngineQueuesConfig[]): Promise<void>;\r\n deleteRestart(queue: string): Promise<void>;\r\n checkFencingTokenValidity(queue : string, token : string | number) : Promise<boolean>;\r\n verifyAndSyncConfiguration(host : string, instanceId : string, url : string, configurations : IConfigurationObject) : Promise<IConfigSyncResult>;\r\n subscribeToDatabaseEvents<T extends unknown>(channel : string, onEvent : (event : T) => Promise<void>, onListen?: () => void) : Promise<void>;\r\n getPollingQueueEntries(queueName : string, limit : number) : Promise<Array<IPoolQueueEntry>>;\r\n deletePollingQueueEntry(id : number) : Promise<void>;\r\n}\r\n\r\nexport interface IPoolQueueEntry {\r\n id : number;\r\n queue : string;\r\n payload : {\r\n queue_name : string;\r\n fencing_token : number;\r\n execution_at : string;\r\n };\r\n created_at : string;\r\n}\r\n\r\nexport class PostgresEngineOperationRepository implements IPulsarPostgresEngineOperationRepository {\r\n private readonly logger : ILogger;\r\n \r\n constructor(private driver : PostgresDriver) {\r\n this.logger = new LoggerService();\r\n }\r\n\r\n private get sql () : postgres.Sql {\r\n return this.driver.getNativeClient();\r\n }\r\n\r\n async addRestart(queues : EngineQueuesConfig[]) {\r\n if(queues.length == 0) return;\r\n\r\n const hasIntervalDrivenPoolerQueues = queues.some(queue => queue.pooler == \"interval-driven-pooler\");\r\n\r\n if (hasIntervalDrivenPoolerQueues) {\r\n await this.sql`\r\n WITH clear_all AS (\r\n DELETE FROM pulsar.pulsar_restart\r\n )\r\n INSERT INTO pulsar.pulsar_restart (queue_name, type, created_at)\r\n VALUES ('__GLOBAL__', 'interval-driven-pooler', NOW())\r\n ON CONFLICT (queue_name) \r\n DO UPDATE SET type = EXCLUDED.type, created_at = NOW();\r\n `;\r\n\r\n this.logger.log(`[Storage] : Restart added for [interval-driven-pooler].`);\r\n }\r\n\r\n const eventDrivenPoolerQeues = queues.filter(q => q.pooler == \"event-driven-pooler\");\r\n\r\n for(const { queue } of eventDrivenPoolerQeues) {\r\n await this.sql`\r\n INSERT INTO pulsar.pulsar_restart (queue_name, type, created_at, owner)\r\n VALUES (${queue}, 'event-driven-pooler', NOW(), 'engine')\r\n ON CONFLICT (queue_name) \r\n DO UPDATE SET type = EXCLUDED.type, created_at = NOW();\r\n `;\r\n \r\n this.logger.log(`[Storage] : Restart added for queue (${queue}) for [event-driven-pooler]`);\r\n }\r\n }\r\n\r\n async updateRestartOwnership(queue : string | null = null, owner : string) {\r\n const target = !queue ? '__GLOBAL__' : queue;\r\n\r\n await this.sql`\r\n UPDATE pulsar.pulsar_restart\r\n SET owner = ${owner}\r\n WHERE queue_name = ${target}\r\n `;\r\n\r\n this.logger.log(`[Storage] : Ownership updated for restart [${queue}]`);\r\n }\r\n\r\n async deleteRestart(queue : string | '__GLOBAL__') {\r\n await this.sql`\r\n DELETE FROM pulsar.pulsar_restart\r\n WHERE queue_name = ${queue} OR queue_name = '__GLOBAL__'\r\n `;\r\n }\r\n\r\n async pingHealthCheck() {\r\n await this.sql`\r\n INSERT INTO pulsar.health_check (id, last_health_checked_at)\r\n OVERRIDING SYSTEM VALUE\r\n VALUES (1, NOW())\r\n ON CONFLICT (id) \r\n DO UPDATE SET last_health_checked_at = EXCLUDED.last_health_checked_at;\r\n `;\r\n }\r\n\r\n async checkFencingTokenValidity(queue : string, token : string | number) {\r\n const numericToken = typeof token === 'string' ? parseInt(token, 10) : token;\r\n\r\n if (isNaN(numericToken)) return false;\r\n\r\n const result = await this.sql<{ is_valid : boolean }[]>`\r\n UPDATE pulsar.queue_locks\r\n SET last_valid_token = ${numericToken}\r\n WHERE queue_name = ${queue}\r\n AND fencing_token = ${numericToken}\r\n AND last_valid_token <= ${numericToken}\r\n RETURNING true AS is_valid;\r\n `;\r\n \r\n const isValid = result[0]?.is_valid ?? false;\r\n \r\n return isValid;\r\n }\r\n\r\n async verifyAndSyncConfiguration (host : 'PULSAR_STANDALONE' | 'NEBULA_CLUSTER', instanceId : string, url : string, configurations : IConfigurationObject) : Promise<IConfigSyncResult> {\r\n const configJsonb = this.sql.json(configurations as any);\r\n\r\n return await this.sql.begin(async (sql) => {\r\n const result = await this.sql<any[]>`\r\n WITH existing AS (\r\n SELECT configurations, hash FROM pulsar.meta WHERE instance_id = ${instanceId}\r\n ),\r\n updated AS (\r\n INSERT INTO pulsar.meta (host, version, url, configurations, is_active, instance_id)\r\n VALUES (${host}, '1.0.0', ${url}, ${configJsonb}::jsonb, true, ${instanceId})\r\n ON CONFLICT (instance_id) \r\n DO UPDATE SET \r\n host = EXCLUDED.host,\r\n url = EXCLUDED.url,\r\n configurations = EXCLUDED.configurations,\r\n updated_at = CURRENT_TIMESTAMP\r\n WHERE pulsar.meta.hash <> pulsar.generate_sha256(${configJsonb}::text)\r\n RETURNING *\r\n )\r\n SELECT \r\n (SELECT configurations FROM existing) AS old_configurations,\r\n EXISTS (SELECT 1 FROM updated) AS is_changed,\r\n EXISTS (SELECT 1 FROM existing) AS was_existing;\r\n `;\r\n\r\n const row = result[0];\r\n const isNew = !row.was_existing;\r\n const isChanged = row.is_changed;\r\n const oldConfigurations = row.old_configurations as IConfigurationObject | undefined;\r\n \r\n let delta = undefined;\r\n\r\n if (isChanged && !isNew && oldConfigurations) {\r\n delta = computeConfigDelta(oldConfigurations, configurations);\r\n }\r\n\r\n if (isChanged || isNew) {\r\n await this.synchronizeQueueTriggers(sql, oldConfigurations, configurations, instanceId);\r\n }\r\n\r\n return {\r\n isChanged,\r\n isNew,\r\n oldConfigurations,\r\n delta\r\n }\r\n })\r\n }\r\n\r\n private async synchronizeQueueTriggers(sql : postgres.TransactionSql, oldCfg : IConfigurationObject | undefined, newCfg : IConfigurationObject, instanceId : string) {\r\n const EVENT_DRIVEN_POOLER : EnginePoolingMode = 'event-driven-pooler';\r\n\r\n const oldEdQueues = new Map((oldCfg?.queues || []).filter(q => q.pooler === EVENT_DRIVEN_POOLER).map(q => [q.queue, q.pooler]));\r\n const newEdQueues = new Map(newCfg.queues.filter(q => q.pooler === EVENT_DRIVEN_POOLER).map(q => [q.queue, q.pooler]));\r\n\r\n if(newCfg.runtime === PulsarRuntime['PERSISTENT']) {\r\n const triggerStrategy = newCfg.event_trigger_strategy;\r\n\r\n if(triggerStrategy === EventTriggerStrategy['POSTGRES_NOTIFY'] || triggerStrategy === EventTriggerStrategy['WEBHOOK']) {\r\n const edpQueues = newCfg.queues.filter(q => q.pooler === \"event-driven-pooler\");\r\n\r\n for (const { queue } of edpQueues) {\r\n const triggerName = `pulsar_edp_trigger_${queue}_on_pgmq`;\r\n const tableName = `pgmq.q_${queue}`;\r\n\r\n this.logger.log(`[Configuration] : Dropping trigger ${triggerName} on ${tableName} due to runtime config changes`);\r\n\r\n await sql.unsafe(`DROP TRIGGER IF EXISTS ${triggerName} ON ${tableName};`);\r\n }\r\n }\r\n }\r\n\r\n for (const [queueName] of oldEdQueues.entries()) {\r\n if (!newEdQueues.has(queueName)) {\r\n const triggerName = `pulsar_edp_trigger_${queueName}_on_pgmq`;\r\n const tableName = `pgmq.q_${queueName}`;\r\n \r\n await sql.unsafe(`DROP TRIGGER IF EXISTS ${triggerName} ON ${tableName};`);\r\n }\r\n }\r\n\r\n for (const [queueName] of newEdQueues.entries()) {\r\n const triggerName = `pulsar_edp_trigger_${queueName}_on_pgmq`;\r\n const tableName = `pgmq.q_${queueName}`;\r\n\r\n await sql.unsafe(`DROP TRIGGER IF EXISTS ${triggerName} ON ${tableName};`);\r\n\r\n await sql.unsafe(`\r\n CREATE TRIGGER ${triggerName}\r\n AFTER INSERT ON ${tableName}\r\n REFERENCING NEW TABLE AS new_table \r\n FOR EACH STATEMENT\r\n EXECUTE FUNCTION pulsar.handle_edp_queue_dispatch('${queueName}', '${instanceId}');\r\n `);\r\n }\r\n }\r\n\r\n async subscribeToDatabaseEvents<T extends unknown>(channel : string, onEvent : (event : T) => Promise<void>, onListen?: () => void) {\r\n await this.sql.listen(channel, async (payload) => {\r\n try {\r\n const data = JSON.parse(payload);\r\n await onEvent(data as T);\r\n }\r\n catch (err) {\r\n this.logger.error(\"[TcpListenTransport] : Failed to parse payload:\", err);\r\n }\r\n }, onListen)\r\n }\r\n\r\n async getPollingQueueEntries(queueName : string, limit : number = 10) : Promise<Array<IPoolQueueEntry>> {\r\n const result = await this.sql`\r\n SELECT *\r\n FROM pulsar.pool_queue_entries\r\n WHERE queue = ${queueName}\r\n ORDER BY created_at ASC\r\n LIMIT ${limit}\r\n FOR UPDATE SKIP LOCKED;\r\n `;\r\n \r\n return result.map((row : any) => row as IPoolQueueEntry);\r\n }\r\n\r\n async deletePollingQueueEntry(id : number) : Promise<void> {\r\n await this.sql`\r\n DELETE FROM pulsar.pool_queue_entries\r\n WHERE id = ${id}\r\n `;\r\n }\r\n}",
11
+ "import type { PostgresDriver } from \"./drivers/PostgresDriver.ts\";\r\nimport type { RedisDriver } from \"./drivers/RedisDriver.ts\";\r\nimport type { IQueueRepository } from \"./repositories/QueueRepository.ts\";\r\n\r\nimport { PostgresQueueRepository } from \"./repositories/PostgresQueueRepository.ts\";\r\nimport { RedisQueueRepository } from \"./repositories/RedisQueueRepository.ts\";\r\n\r\nimport { PostgresEngineOperationRepository } from \"./repositories/PostgresEngineOperationRepository.ts\";\r\nimport { LoggerService, type ILogger } from \"../subsys/LoggerService.ts\";\r\n\r\nexport type StorageStrategy = \"AUTO\" | \"REDIS_CACHE\" | \"PG_UNLOGGED\";\r\n\r\nexport interface PulsarStorageOptions {\r\n cache?: RedisDriver;\r\n db: PostgresDriver;\r\n /**\r\n * Storage Pooling Strategies:\r\n * - \"AUTO\" : Uses Redis if `cache` is defined; otherwise falls back to PG_UNLOGGED.\r\n * - \"REDIS_CACHE\" : Forces in-memory Redis buffers for maximum speed (Requires Redis).\r\n * - \"PG_UNLOGGED\" : Uses Postgres Unlogged tables for fast volatile queueing (No Redis needed).\r\n */\r\n strategy?: StorageStrategy;\r\n syncIntervalMs?: number;\r\n}\r\n\r\n/**\r\n * Unified storage orchestrator for Pulsar queueing mechanics.\r\n * \r\n * Manages the initialization, strategy resolution, and connection lifecycles of underlying\r\n * storage drivers (Postgres and optional Redis). Depending on the selected `StorageStrategy`,\r\n * it dynamically delegates queue operations to a high-throughput Redis memory store or\r\n * an optimized PostgreSQL repository (such as unlogged tables) while guaranteeing core \r\n * database mechanics for engine orchestration.\r\n */\r\nexport class PulsarUnifiedStorage {\r\n public readonly repository : IQueueRepository;\r\n\r\n public readonly cache? : RedisDriver;\r\n public readonly db : PostgresDriver;\r\n public readonly ops : PostgresEngineOperationRepository;\r\n private readonly logger : ILogger;\r\n\r\n public readonly strategy : StorageStrategy;\r\n public readonly syncIntervalMs : number;\r\n private isConnected : boolean = false;\r\n\r\n constructor(options : PulsarStorageOptions) {\r\n this.logger = new LoggerService();\r\n\r\n if (!options.db) {\r\n throw new Error(\"[PulsarUnifiedStorage] PostgresDriver is required for core engine to operate.\");\r\n }\r\n\r\n this.cache = options.cache;\r\n this.db = options.db;\r\n this.syncIntervalMs = options.syncIntervalMs ?? 500;\r\n \r\n this.ops = new PostgresEngineOperationRepository(this.db);\r\n\r\n let resolvedStrategy = options.strategy ?? \"AUTO\";\r\n if (resolvedStrategy === \"AUTO\") {\r\n resolvedStrategy = this.cache ? \"REDIS_CACHE\" : \"PG_UNLOGGED\";\r\n }\r\n\r\n this.strategy = resolvedStrategy;\r\n\r\n switch (this.strategy) {\r\n case \"REDIS_CACHE\":\r\n if (!this.cache) {\r\n throw new Error(\"[PulsarUnifiedStorage] Strategy 'REDIS_CACHE' requires a valid Redis cache driver.\");\r\n }\r\n this.repository = new RedisQueueRepository(this.cache);\r\n break;\r\n\r\n case \"PG_UNLOGGED\":\r\n this.repository = new PostgresQueueRepository(this.db);\r\n break;\r\n\r\n default:\r\n throw new Error(`[PulsarUnifiedStorage] Unsupported storage strategy: '${this.strategy}'`);\r\n }\r\n }\r\n\r\n public bindInstanceId(instanceId: string) {\r\n if (this.cache) {\r\n this.cache.setKeyPrefix(instanceId);\r\n }\r\n if (this.db) {\r\n this.db.setKeyPrefix(instanceId);\r\n }\r\n }\r\n\r\n public async connect() {\r\n if(this.isConnected) return;\r\n const tasks : Promise<void>[] = [];\r\n\r\n if (this.cache) tasks.push(this.cache.connect());\r\n if (this.db) tasks.push(this.db.connect());\r\n\r\n await Promise.all(tasks);\r\n this.logger.log(`[PulsarStorage] Storage layer active [Strategy: ${this.strategy}]`);\r\n this.isConnected = true;\r\n }\r\n\r\n public async disconnect() {\r\n this.isConnected = false;\r\n\r\n const tasks : Promise<void>[] = [];\r\n if (this.cache) tasks.push(this.cache.disconnect());\r\n if (this.db) tasks.push(this.db.disconnect());\r\n\r\n await Promise.all(tasks);\r\n }\r\n\r\n public async healthCheck() {\r\n const health : Record<string, any> = {};\r\n if (this.db) health.db = await this.db.healthCheck();\r\n return health;\r\n }\r\n}",
12
+ "import postgres from \"postgres\";\r\nimport { LoggerService } from \"../../subsys/LoggerService.ts\";\r\n\r\nimport type { IPulsarDriver, PostgresDriverOptions, StorageHealth } from \"./types.ts\";\r\nimport type { ILogger } from \"../../integrations/index.ts\";\r\n\r\nexport class PostgresDriver implements IPulsarDriver {\r\n public readonly type = \"database\";\r\n public readonly name = \"PostgresDriver\";\r\n private sql!: postgres.Sql;\r\n private isConnected = false;\r\n\r\n public prefix? : string;\r\n private readonly logger : ILogger;\r\n\r\n constructor(public readonly options: PostgresDriverOptions) {\r\n this.logger = new LoggerService();\r\n }\r\n\r\n private initClient() {\r\n if(this.isConnected) return;\r\n this.sql = postgres(this.options.connectionString, { prepare : false });\r\n this.isConnected = true;\r\n }\r\n\r\n public setKeyPrefix(instanceId : string) {\r\n this.prefix = instanceId;\r\n }\r\n\r\n public async connect() {\r\n if (!this.isConnected) {\r\n this.initClient();\r\n\r\n try {\r\n await this.sql`SELECT 1`;\r\n this.logger.log(`[PostgresDriver] : Pool connected with : ${this.options.connectionProtocol ?? \"TCP\"}`);\r\n }\r\n catch (error) {\r\n this.logger.log(\"[PostgresDriver] : Health check failed:\", error);\r\n throw error;\r\n }\r\n }\r\n }\r\n\r\n public async disconnect() {\r\n if (this.isConnected) {\r\n await this.sql.end();\r\n this.isConnected = false;\r\n this.logger.log(\"[PostgresDriver] : Pool disconnected.\");\r\n }\r\n }\r\n\r\n public async healthCheck() : Promise<StorageHealth> {\r\n const start = Date.now();\r\n try {\r\n if (!this.isConnected) throw new Error(\"Connection pool is closed.\");\r\n await this.sql`SELECT 1`;\r\n return { status: \"up\", latencyMs: Date.now() - start };\r\n }\r\n catch (err : any) {\r\n return { status: \"down\", latencyMs: Date.now() - start, details: { error: err.message } };\r\n }\r\n }\r\n\r\n public getNativeClient<T = postgres.Sql>() : T {\r\n if (!this.sql) throw new Error(\"[PostgresDriver] : Client is not initialized. Call connect() first.\");\r\n return this.sql as T;\r\n }\r\n\r\n async close() {\r\n await this.disconnect();\r\n }\r\n}",
13
+ "import { Redis as RedisTCP } from \"ioredis\";\r\nimport { Redis as RedisHTTP } from \"@upstash/redis\";\r\n\r\nimport type { IPulsarDriver, RedisDriverOptions, StorageHealth } from \"./types.ts\";\r\nimport type { ILogger } from \"../../integrations/index.ts\";\r\nimport { LoggerService } from \"../../subsys/LoggerService.ts\";\r\n\r\nexport class RedisDriver implements IPulsarDriver {\r\n public readonly type = \"cache\";\r\n public readonly name = \"RedisDriver\";\r\n\r\n private tcpClient?: RedisTCP;\r\n private httpClient?: RedisHTTP;\r\n\r\n public prefix? : string;\r\n private readonly logger : ILogger;\r\n\r\n constructor(public readonly options : RedisDriverOptions) {\r\n this.logger = new LoggerService();\r\n }\r\n\r\n private initClients() {\r\n if (this.options.protocol === \"http\") {\r\n this.httpClient = new RedisHTTP({\r\n url: this.options.url!,\r\n token: this.options.token!,\r\n })\r\n }\r\n else {\r\n this.tcpClient = new RedisTCP(this.options.connectionString!, {\r\n lazyConnect: true,\r\n maxRetriesPerRequest: 3,\r\n })\r\n }\r\n }\r\n\r\n public setKeyPrefix(instanceId : string) {\r\n this.prefix = instanceId;\r\n }\r\n\r\n public async connect() {\r\n if (this.options.protocol == \"tcp\") {\r\n if (!this.tcpClient) {\r\n this.initClients();\r\n }\r\n \r\n if(!this.tcpClient) throw new Error('TCP Client could not found');\r\n\r\n const status = this.tcpClient.status;\r\n\r\n if (status === \"end\" || status === \"close\") {\r\n this.initClients();\r\n }\r\n\r\n if (this.tcpClient.status === \"wait\") {\r\n await this.tcpClient.connect();\r\n this.logger.log(`[RedisDriver] : TCP Connected to ${this.options.connectionString}`);\r\n }\r\n }\r\n else if(this.options.protocol == \"http\") {\r\n if (!this.httpClient) {\r\n this.initClients();\r\n }\r\n\r\n const status = await this.httpClient!.ping();\r\n if(status.toLowerCase() === \"pong\") {\r\n this.logger.log(`[RedisDriver] : HTTP REST client initialized.`);\r\n }\r\n else {\r\n this.logger.warn(`[RedisDriver] : HTTP REST client initialized, but ping failed with unexpected response:`, status);\r\n }\r\n }\r\n }\r\n\r\n public async disconnect() {\r\n if (this.options.protocol == \"tcp\" && this.tcpClient) {\r\n const status = this.tcpClient.status;\r\n if (status !== \"end\" && status !== \"close\") {\r\n try {\r\n await this.tcpClient.quit();\r\n this.logger.log(\"[RedisDriver] : TCP Disconnected.\");\r\n }\r\n catch (_err) {\r\n this.tcpClient.disconnect();\r\n }\r\n }\r\n }\r\n }\r\n\r\n public async healthCheck() : Promise<StorageHealth> {\r\n const start = Date.now();\r\n try {\r\n if (this.options.protocol === \"tcp\") {\r\n await this.tcpClient!.ping();\r\n }\r\n else {\r\n await this.httpClient!.ping();\r\n }\r\n return { status: \"up\", latencyMs: Date.now() - start };\r\n }\r\n catch (err : any) {\r\n return { status: \"down\", latencyMs: Date.now() - start, details: { error: err.message } };\r\n }\r\n }\r\n\r\n public getNativeClient<T = RedisTCP | RedisHTTP>(protocol?: \"tcp\" | \"http\") {\r\n const targetProtocol = protocol ?? this.options.protocol;\r\n\r\n if (targetProtocol === \"tcp\") {\r\n if (!this.tcpClient) throw new Error(\"[RedisDriver] : TCP client is not initialized.\");\r\n return this.tcpClient as T;\r\n }\r\n\r\n if (!this.httpClient) throw new Error(\"[RedisDriver] : REST client is not initialized.\");\r\n return this.httpClient as T;\r\n }\r\n}",
14
+ "import nodeCrypto from 'node:crypto';\n\nconst subtle = nodeCrypto.webcrypto?.subtle || {};\nconst randomUUID = () => {\n return nodeCrypto.randomUUID();\n};\nconst getRandomValues = (array) => {\n return nodeCrypto.webcrypto.getRandomValues(array);\n};\nconst _crypto = {\n randomUUID,\n getRandomValues,\n subtle\n};\n\nexport { _crypto as default, getRandomValues, randomUUID, subtle };\n",
15
+ "var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\n\n// pkg/error.ts\nvar error_exports = {};\n__export(error_exports, {\n UpstashError: () => UpstashError,\n UpstashJSONParseError: () => UpstashJSONParseError,\n UrlError: () => UrlError\n});\nvar UpstashError = class extends Error {\n constructor(message, options) {\n super(message, options);\n this.name = \"UpstashError\";\n }\n};\nvar UrlError = class extends Error {\n constructor(url) {\n super(\n `Upstash Redis client was passed an invalid URL. You should pass a URL starting with https. Received: \"${url}\". `\n );\n this.name = \"UrlError\";\n }\n};\nvar UpstashJSONParseError = class extends UpstashError {\n constructor(body, options) {\n const truncatedBody = body.length > 200 ? body.slice(0, 200) + \"...\" : body;\n super(`Unable to parse response body: ${truncatedBody}`, options);\n this.name = \"UpstashJSONParseError\";\n }\n};\n\n// pkg/util.ts\nfunction parseJSON(value) {\n return JSON.parse(stripBOM(value));\n}\nfunction stripBOM(value) {\n return typeof value === \"string\" && value.startsWith(\"\\uFEFF\") ? value.slice(1) : value;\n}\nfunction parseRecursive(obj) {\n const parsed = Array.isArray(obj) ? obj.map((o) => {\n try {\n return parseRecursive(o);\n } catch {\n return o;\n }\n }) : parseJSON(obj);\n if (typeof parsed === \"number\" && parsed.toString() !== stripBOM(obj)) {\n return obj;\n }\n return parsed;\n}\nfunction parseResponse(result) {\n try {\n return parseRecursive(result);\n } catch {\n return result;\n }\n}\nfunction deserializeScanResponse(result) {\n return [result[0], ...parseResponse(result.slice(1))];\n}\nfunction deserializeScanWithTypesResponse(result) {\n const [cursor, keys] = result;\n const parsedKeys = [];\n for (let i = 0; i < keys.length; i += 2) {\n parsedKeys.push({ key: keys[i], type: keys[i + 1] });\n }\n return [cursor, parsedKeys];\n}\nfunction mergeHeaders(...headers) {\n const merged = {};\n for (const header of headers) {\n if (!header) continue;\n for (const [key, value] of Object.entries(header)) {\n if (value !== void 0 && value !== null) {\n merged[key] = value;\n }\n }\n }\n return merged;\n}\nfunction kvArrayToObject(v) {\n if (typeof v === \"object\" && v !== null && !Array.isArray(v)) return v;\n if (!Array.isArray(v)) return {};\n const obj = {};\n for (let i = 0; i < v.length; i += 2) {\n if (typeof v[i] === \"string\") obj[v[i]] = v[i + 1];\n }\n return obj;\n}\n\n// pkg/http.ts\nvar MAX_BUFFER_SIZE = 1024 * 1024;\nvar HttpClient = class {\n baseUrl;\n headers;\n options;\n readYourWrites;\n upstashSyncToken = \"\";\n hasCredentials;\n retry;\n constructor(config) {\n this.options = {\n backend: config.options?.backend,\n agent: config.agent,\n responseEncoding: config.responseEncoding ?? false,\n cache: config.cache,\n signal: config.signal,\n keepAlive: config.keepAlive ?? true\n };\n this.upstashSyncToken = \"\";\n this.readYourWrites = config.readYourWrites ?? true;\n this.baseUrl = (config.baseUrl || \"\").replace(/\\/$/, \"\");\n const urlRegex = /^https?:\\/\\/[^\\s#$./?].\\S*$/;\n if (this.baseUrl && !urlRegex.test(this.baseUrl)) {\n throw new UrlError(this.baseUrl);\n }\n this.headers = {\n \"Content-Type\": \"application/json\",\n ...config.headers\n };\n this.hasCredentials = Boolean(this.baseUrl && this.headers.authorization.split(\" \")[1]);\n if (this.options.responseEncoding === \"base64\") {\n this.headers[\"Upstash-Encoding\"] = \"base64\";\n }\n this.retry = typeof config.retry === \"boolean\" && !config.retry ? {\n attempts: 1,\n backoff: () => 0\n } : {\n attempts: config.retry?.retries ?? 5,\n backoff: config.retry?.backoff ?? ((retryCount) => Math.exp(retryCount) * 50)\n };\n }\n mergeTelemetry(telemetry) {\n this.headers = merge(this.headers, \"Upstash-Telemetry-Runtime\", telemetry.runtime);\n this.headers = merge(this.headers, \"Upstash-Telemetry-Platform\", telemetry.platform);\n this.headers = merge(this.headers, \"Upstash-Telemetry-Sdk\", telemetry.sdk);\n }\n async request(req) {\n if (this.readYourWrites) {\n this.headers[\"upstash-sync-token\"] = this.upstashSyncToken;\n }\n const requestHeaders = mergeHeaders(this.headers, req.headers ?? {});\n const requestUrl = [this.baseUrl, ...req.path ?? []].join(\"/\");\n const isEventStream = requestHeaders.Accept === \"text/event-stream\";\n const signal = req.signal ?? this.options.signal;\n const isSignalFunction = typeof signal === \"function\";\n const requestOptions = {\n cache: this.options.cache,\n method: \"POST\",\n headers: requestHeaders,\n body: JSON.stringify(req.body),\n keepalive: this.options.keepAlive,\n agent: this.options.agent,\n signal: isSignalFunction ? signal() : signal,\n /**\n * Fastly specific\n */\n backend: this.options.backend\n };\n if (!this.hasCredentials) {\n console.warn(\n \"[Upstash Redis] Redis client was initialized without url or token. Failed to execute command.\"\n );\n }\n let res = null;\n let error = null;\n for (let i = 0; i <= this.retry.attempts; i++) {\n if (i > 0 && requestHeaders[\"Upstash-Telemetry-Sdk\"]) {\n requestHeaders[\"Upstash-Telemetry-Retry\"] = String(i);\n }\n try {\n res = await fetch(requestUrl, requestOptions);\n break;\n } catch (error_) {\n if (requestOptions.signal?.aborted && isSignalFunction) {\n throw error_;\n } else if (requestOptions.signal?.aborted) {\n const reason = requestOptions.signal.reason;\n const myBlob = new Blob([\n // Error reasons (e.g. the default DOMException) would serialize to an empty object\n JSON.stringify({ result: reason instanceof Error ? null : reason ?? null })\n ]);\n const myOptions = {\n status: 200,\n statusText: \"Aborted\"\n };\n res = new Response(myBlob, myOptions);\n break;\n }\n error = error_;\n if (i < this.retry.attempts) {\n await new Promise((r) => setTimeout(r, this.retry.backoff(i)));\n }\n }\n }\n if (!res) {\n throw error ?? new Error(\"Exhausted all retries\");\n }\n if (!res.ok) {\n let body2;\n const rawBody2 = await res.text();\n try {\n body2 = JSON.parse(rawBody2);\n } catch (error2) {\n throw new UpstashJSONParseError(rawBody2, { cause: error2 });\n }\n throw new UpstashError(`${body2.error}, command was: ${JSON.stringify(req.body)}`);\n }\n if (this.readYourWrites) {\n const headers = res.headers;\n this.upstashSyncToken = headers.get(\"upstash-sync-token\") ?? \"\";\n }\n if (isEventStream && req && req.onMessage && res.body) {\n const reader = res.body.getReader();\n const decoder = new TextDecoder();\n (async () => {\n try {\n let buffer = \"\";\n while (true) {\n const { value, done } = await reader.read();\n if (done) break;\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split(\"\\n\");\n buffer = lines.pop() || \"\";\n if (buffer.length > MAX_BUFFER_SIZE) {\n throw new Error(\"Buffer size exceeded (1MB)\");\n }\n for (const line of lines) {\n if (line.startsWith(\"data: \")) {\n const data = line.slice(6);\n req.onMessage?.(data);\n }\n }\n }\n } catch (error2) {\n if (error2 instanceof Error && error2.name === \"AbortError\") {\n } else {\n console.error(\"Stream reading error:\", error2);\n }\n } finally {\n try {\n await reader.cancel();\n } catch {\n }\n }\n })();\n return { result: 1 };\n }\n let body;\n const rawBody = await res.text();\n try {\n body = JSON.parse(rawBody);\n } catch (error2) {\n throw new UpstashJSONParseError(rawBody, { cause: error2 });\n }\n if (this.readYourWrites) {\n const headers = res.headers;\n this.upstashSyncToken = headers.get(\"upstash-sync-token\") ?? \"\";\n }\n if (this.options.responseEncoding === \"base64\") {\n if (Array.isArray(body)) {\n return body.map(({ result: result2, error: error2 }) => ({\n result: decode(result2),\n error: error2\n }));\n }\n const result = decode(body.result);\n return { result, error: body.error };\n }\n return body;\n }\n};\nfunction base64decode(b64) {\n let dec = \"\";\n try {\n const binString = atob(b64);\n const size = binString.length;\n const bytes = new Uint8Array(size);\n for (let i = 0; i < size; i++) {\n bytes[i] = binString.charCodeAt(i);\n }\n dec = new TextDecoder().decode(bytes);\n } catch {\n dec = b64;\n }\n return dec;\n}\nfunction decode(raw) {\n let result = void 0;\n switch (typeof raw) {\n case \"undefined\": {\n return raw;\n }\n case \"number\": {\n result = raw;\n break;\n }\n case \"object\": {\n if (Array.isArray(raw)) {\n result = raw.map(\n (v) => typeof v === \"string\" ? base64decode(v) : Array.isArray(v) ? v.map((element) => decode(element)) : v\n );\n } else {\n result = null;\n }\n break;\n }\n case \"string\": {\n result = raw === \"OK\" ? \"OK\" : base64decode(raw);\n break;\n }\n default: {\n break;\n }\n }\n return result;\n}\nfunction merge(obj, key, value) {\n if (!value) {\n return obj;\n }\n if (!obj[key]) {\n obj[key] = value;\n return obj;\n }\n const values = obj[key].split(\",\").map((v) => v.trim());\n if (!values.includes(value.trim())) {\n obj[key] = [obj[key], value].join(\",\");\n }\n return obj;\n}\n\n// pkg/commands/command.ts\nvar defaultSerializer = (c) => {\n switch (typeof c) {\n case \"string\":\n case \"number\":\n case \"boolean\": {\n return c;\n }\n default: {\n return JSON.stringify(c);\n }\n }\n};\nvar Command = class {\n command;\n serialize;\n deserialize;\n headers;\n path;\n onMessage;\n isStreaming;\n signal;\n /**\n * Create a new command instance.\n *\n * You can define a custom `deserialize` function. By default we try to deserialize as json.\n */\n constructor(command, opts) {\n this.serialize = defaultSerializer;\n this.deserialize = opts?.automaticDeserialization === void 0 || opts.automaticDeserialization ? opts?.deserialize ?? parseResponse : (x) => x;\n this.command = command.map((c) => this.serialize(c));\n this.headers = opts?.headers;\n this.path = opts?.path;\n this.onMessage = opts?.streamOptions?.onMessage;\n this.isStreaming = opts?.streamOptions?.isStreaming ?? false;\n this.signal = opts?.streamOptions?.signal;\n if (opts?.latencyLogging) {\n const originalExec = this.exec.bind(this);\n this.exec = async (client) => {\n const start = performance.now();\n const result = await originalExec(client);\n const end = performance.now();\n const loggerResult = (end - start).toFixed(2);\n console.log(\n `Latency for \\x1B[38;2;19;185;39m${this.command[0].toString().toUpperCase()}\\x1B[0m: \\x1B[38;2;0;255;255m${loggerResult} ms\\x1B[0m`\n );\n return result;\n };\n }\n }\n /**\n * Execute the command using a client.\n */\n async exec(client) {\n const { result, error } = await client.request({\n body: this.command,\n path: this.path,\n upstashSyncToken: client.upstashSyncToken,\n headers: this.headers,\n onMessage: this.onMessage,\n isStreaming: this.isStreaming,\n signal: this.signal\n });\n if (error) {\n throw new UpstashError(error);\n }\n if (result === void 0) {\n throw new TypeError(\"Request did not return a result\");\n }\n return this.deserialize(result);\n }\n};\n\n// pkg/commands/exec.ts\nvar ExecCommand = class extends Command {\n constructor(cmd, opts) {\n const normalizedCmd = cmd.map((arg) => typeof arg === \"string\" ? arg : String(arg));\n super(normalizedCmd, opts);\n }\n};\n\n// pkg/commands/search/types.ts\nvar FIELD_TYPES = [\n \"TEXT\",\n \"U64\",\n \"I64\",\n \"F64\",\n \"BOOL\",\n \"DATE\",\n \"KEYWORD\",\n \"FACET\",\n \"HYBRID\"\n];\n\n// pkg/commands/search/utils.ts\nfunction isFieldType(value) {\n return typeof value === \"string\" && FIELD_TYPES.includes(value);\n}\nfunction isDetailedField(value) {\n return typeof value === \"object\" && value !== null && \"type\" in value && isFieldType(value.type);\n}\nfunction isNestedSchema(value) {\n return typeof value === \"object\" && value !== null && !isDetailedField(value);\n}\nfunction flattenSchema(schema, pathPrefix = []) {\n const fields = [];\n for (const [key, value] of Object.entries(schema)) {\n const currentPath = [...pathPrefix, key];\n const pathString = currentPath.join(\".\");\n if (isFieldType(value)) {\n fields.push({\n path: pathString,\n type: value\n });\n } else if (isDetailedField(value)) {\n fields.push({\n path: pathString,\n type: value.type,\n fast: \"fast\" in value ? value.fast : void 0,\n noTokenize: \"noTokenize\" in value ? value.noTokenize : void 0,\n noStem: \"noStem\" in value ? value.noStem : void 0,\n from: \"from\" in value ? value.from : void 0\n });\n } else if (isNestedSchema(value)) {\n const nestedFields = flattenSchema(value, currentPath);\n fields.push(...nestedFields);\n }\n }\n return fields;\n}\nfunction deserializeQueryResponse(rawResponse) {\n return rawResponse.map((itemRaw) => {\n const raw = itemRaw;\n const key = raw[0];\n const score = Number(raw[1]);\n const rawFields = raw[2];\n if (rawFields === void 0) {\n return { key, score };\n }\n if (!Array.isArray(rawFields) || rawFields.length === 0) {\n return { key, score, data: {} };\n }\n let data = {};\n for (const fieldRaw of rawFields) {\n const key2 = fieldRaw[0];\n const value = fieldRaw[1];\n const pathParts = key2.split(\".\");\n if (pathParts.length === 1) {\n data[key2] = value;\n } else {\n let currentObj = data;\n for (let i = 0; i < pathParts.length - 1; i++) {\n const pathPart = pathParts[i];\n if (!(pathPart in currentObj)) {\n currentObj[pathPart] = {};\n }\n currentObj = currentObj[pathPart];\n }\n currentObj[pathParts.at(-1)] = value;\n }\n }\n if (\"$\" in data) {\n data = data[\"$\"];\n }\n return { key, score, data };\n });\n}\nfunction deserializeDescribeResponse(rawResponse) {\n const description = {};\n for (let i = 0; i < rawResponse.length; i += 2) {\n const descriptor = rawResponse[i];\n switch (descriptor) {\n case \"name\": {\n description[\"name\"] = rawResponse[i + 1];\n break;\n }\n case \"type\": {\n description[\"dataType\"] = rawResponse[i + 1].toLowerCase();\n break;\n }\n case \"prefixes\": {\n description[\"prefixes\"] = rawResponse[i + 1];\n break;\n }\n case \"language\": {\n description[\"language\"] = rawResponse[i + 1];\n break;\n }\n case \"schema\": {\n const schema = {};\n for (const fieldDescription of rawResponse[i + 1]) {\n const fieldName = fieldDescription[0];\n const fieldInfo = { type: fieldDescription[1] };\n if (fieldDescription.length > 2) {\n for (let j = 2; j < fieldDescription.length; j++) {\n const fieldOption = fieldDescription[j];\n switch (fieldOption) {\n case \"NOSTEM\": {\n fieldInfo.noStem = true;\n break;\n }\n case \"NOTOKENIZE\": {\n fieldInfo.noTokenize = true;\n break;\n }\n case \"FAST\": {\n fieldInfo.fast = true;\n break;\n }\n case \"FROM\": {\n fieldInfo.from = fieldDescription[++j];\n break;\n }\n }\n }\n }\n schema[fieldName] = fieldInfo;\n }\n description[\"schema\"] = schema;\n break;\n }\n }\n }\n return description;\n}\nfunction parseCountResponse(rawResponse) {\n return typeof rawResponse === \"number\" ? rawResponse : Number.parseInt(rawResponse, 10);\n}\nfunction deserializeAggregateResponse(rawResponse) {\n return parseAggregationArray(rawResponse);\n}\nfunction parseAggregationArray(arr) {\n const result = {};\n for (let i = 0; i < arr.length; i += 2) {\n const key = arr[i];\n const value = arr[i + 1];\n if (Array.isArray(value)) {\n if (value.length > 0 && typeof value[0] === \"string\") {\n result[key] = value[0] === \"buckets\" ? parseBucketsValue(value) : parseStatsValue(value);\n } else {\n result[key] = parseAggregationArray(value);\n }\n } else {\n result[key] = value;\n }\n }\n return result;\n}\nfunction coerceNumericString(value) {\n if (typeof value === \"string\" && value !== \"\" && !Number.isNaN(Number(value))) {\n return Number(value);\n }\n return value;\n}\nfunction parseStatsValue(arr) {\n const result = {};\n for (let i = 0; i < arr.length; i += 2) {\n const key = arr[i];\n const value = arr[i + 1];\n if (Array.isArray(value) && value.length > 0) {\n if (typeof value[0] === \"string\") {\n result[key] = parseStatsValue(value);\n } else if (Array.isArray(value[0]) && typeof value[0][0] === \"string\") {\n result[key] = value.map((item) => parseStatsValue(item));\n } else {\n result[key] = value;\n }\n } else {\n result[key] = coerceNumericString(value);\n }\n }\n return result;\n}\nfunction parseBucketsValue(arr) {\n if (arr[0] === \"buckets\" && Array.isArray(arr[1])) {\n const result = {\n buckets: arr[1].map((bucket) => {\n const bucketObj = {};\n for (let i = 0; i < bucket.length; i += 2) {\n const key = bucket[i];\n const value = bucket[i + 1];\n bucketObj[key] = Array.isArray(value) && value.length > 0 && typeof value[0] === \"string\" ? parseStatsValue(value) : value;\n }\n return bucketObj;\n })\n };\n for (let i = 2; i < arr.length; i += 2) {\n result[arr[i]] = arr[i + 1];\n }\n return result;\n }\n return arr;\n}\n\n// pkg/commands/search/command-builder.ts\nfunction buildQueryCommand(redisCommand, name, options) {\n const query = JSON.stringify(options?.filter ?? {});\n const command = [redisCommand, name, query];\n if (options?.limit !== void 0) {\n command.push(\"LIMIT\", options.limit.toString());\n }\n if (options?.offset !== void 0) {\n command.push(\"OFFSET\", options.offset.toString());\n }\n if (options?.select && Object.keys(options.select).length === 0) {\n command.push(\"NOCONTENT\");\n }\n if (options) {\n if (\"orderBy\" in options && options.orderBy) {\n command.push(\"ORDERBY\");\n for (const [field, direction] of Object.entries(options.orderBy)) {\n command.push(field, direction);\n }\n } else if (\"scoreFunc\" in options && options.scoreFunc) {\n command.push(\"SCOREFUNC\", ...buildScoreFunc(options.scoreFunc));\n }\n }\n if (options?.highlight) {\n command.push(\n \"HIGHLIGHT\",\n \"FIELDS\",\n options.highlight.fields.length.toString(),\n ...options.highlight.fields\n );\n if (options.highlight.preTag && options.highlight.postTag) {\n command.push(\"TAGS\", options.highlight.preTag, options.highlight.postTag);\n }\n }\n if (options?.select && Object.keys(options.select).length > 0) {\n command.push(\n \"SELECT\",\n Object.keys(options.select).length.toString(),\n ...Object.keys(options.select)\n );\n }\n return command;\n}\nfunction buildScoreFunc(scoreBy) {\n const result = [];\n if (typeof scoreBy === \"string\") {\n result.push(\"FIELDVALUE\", scoreBy);\n } else if (\"fields\" in scoreBy) {\n if (scoreBy.combineMode) {\n result.push(\"COMBINEMODE\", scoreBy.combineMode.toUpperCase());\n }\n if (scoreBy.scoreMode) {\n result.push(\"SCOREMODE\", scoreBy.scoreMode.toUpperCase());\n }\n for (const field of scoreBy.fields) {\n result.push(...buildScoreFuncField(field));\n }\n } else {\n result.push(...buildScoreFuncField(scoreBy));\n }\n return result;\n}\nfunction buildScoreFuncField(field) {\n const result = [];\n if (typeof field === \"string\") {\n result.push(\"FIELDVALUE\", field);\n } else {\n if (field.scoreMode) {\n result.push(\"SCOREMODE\", field.scoreMode.toUpperCase());\n }\n result.push(\"FIELDVALUE\", field.field);\n if (field.modifier) {\n result.push(\"MODIFIER\", field.modifier.toUpperCase());\n }\n if (field.factor !== void 0) {\n result.push(\"FACTOR\", field.factor.toString());\n }\n if (field.missing !== void 0) {\n result.push(\"MISSING\", field.missing.toString());\n }\n }\n return result;\n}\nfunction buildCreateIndexCommand(params) {\n const { name, schema, dataType, language, skipInitialScan, existsOk } = params;\n let source;\n if (params.dataType === \"stream\") {\n source = [\"ON\", \"STREAM\", params.stream];\n } else {\n const prefixArray = Array.isArray(params.prefix) ? params.prefix : [params.prefix];\n source = [\n \"ON\",\n dataType.toUpperCase(),\n \"PREFIX\",\n prefixArray.length.toString(),\n ...prefixArray\n ];\n }\n const payload = [\n name,\n ...skipInitialScan ? [\"SKIPINITIALSCAN\"] : [],\n ...existsOk ? [\"EXISTSOK\"] : [],\n ...source,\n ...language ? [\"LANGUAGE\", language] : [],\n \"SCHEMA\"\n ];\n const fields = flattenSchema(schema);\n for (const field of fields) {\n payload.push(field.path, field.type);\n if (field.fast) {\n payload.push(\"FAST\");\n }\n if (field.noTokenize) {\n payload.push(\"NOTOKENIZE\");\n }\n if (field.noStem) {\n payload.push(\"NOSTEM\");\n }\n if (field.from) {\n payload.push(\"FROM\", field.from);\n }\n }\n return [\"SEARCH.CREATE\", ...payload];\n}\nfunction buildAggregateCommand(name, options) {\n const query = JSON.stringify(options?.filter ?? {});\n const aggregations = JSON.stringify(options.aggregations);\n return [\"SEARCH.AGGREGATE\", name, query, aggregations];\n}\n\n// pkg/commands/search/search.ts\nvar SearchIndex = class {\n name;\n schema;\n client;\n constructor({ name, schema, client }) {\n this.name = name;\n this.schema = schema;\n this.client = client;\n }\n async waitIndexing() {\n const command = [\"SEARCH.WAITINDEXING\", this.name];\n return await new ExecCommand(command).exec(this.client);\n }\n async describe() {\n const command = [\"SEARCH.DESCRIBE\", this.name];\n const rawResult = await new ExecCommand(command).exec(\n this.client\n );\n if (!rawResult) return null;\n return deserializeDescribeResponse(rawResult);\n }\n async query(options) {\n const command = buildQueryCommand(\"SEARCH.QUERY\", this.name, options);\n const rawResult = await new ExecCommand(command).exec(\n this.client\n );\n if (!rawResult) return rawResult;\n return deserializeQueryResponse(rawResult);\n }\n async aggregate(options) {\n const command = buildAggregateCommand(this.name, options);\n const rawResult = await new ExecCommand(\n command\n ).exec(this.client);\n return deserializeAggregateResponse(rawResult);\n }\n async count({\n filter\n }) {\n const command = buildQueryCommand(\"SEARCH.COUNT\", this.name, {\n filter\n });\n const rawResult = await new ExecCommand(command).exec(\n this.client\n );\n return { count: parseCountResponse(rawResult) };\n }\n async drop() {\n const command = [\"SEARCH.DROP\", this.name];\n const result = await new ExecCommand(command).exec(this.client);\n return result;\n }\n async addAlias({ alias }) {\n const command = [\"SEARCH.ALIASADD\", alias, this.name];\n const result = await new ExecCommand(command).exec(this.client);\n return result;\n }\n};\nasync function createIndex(client, params) {\n const { name, schema } = params;\n const createIndexCommand = buildCreateIndexCommand(params);\n await new ExecCommand(createIndexCommand).exec(client);\n return initIndex(client, { name, schema });\n}\nfunction initIndex(client, params) {\n const { name, schema } = params;\n return new SearchIndex({ name, schema, client });\n}\nasync function listAliases(client) {\n const command = [\"SEARCH.LISTALIASES\"];\n const rawResult = await new ExecCommand(command).exec(client);\n if (rawResult === 0 || Array.isArray(rawResult) && rawResult.length === 0) {\n return {};\n }\n if (!Array.isArray(rawResult)) {\n return {};\n }\n const aliases = {};\n for (const pair of rawResult) {\n if (Array.isArray(pair) && pair.length === 2) {\n const [alias, index] = pair;\n aliases[alias] = index;\n }\n }\n return aliases;\n}\nasync function addAlias(client, { indexName, alias }) {\n const command = [\"SEARCH.ALIASADD\", alias, indexName];\n const result = await new ExecCommand(command).exec(client);\n return result;\n}\nasync function delAlias(client, { alias }) {\n const command = [\"SEARCH.ALIASDEL\", alias];\n const result = await new ExecCommand(command).exec(client);\n return result;\n}\n\n// pkg/commands/vector/utils.ts\nfunction float32ToBase64(vector) {\n const bytes = new Uint8Array(vector.length * 4);\n const view = new DataView(bytes.buffer);\n for (const [i, value] of vector.entries()) {\n view.setFloat32(i * 4, value, true);\n }\n let binary = \"\";\n const chunkSize = 32768;\n for (let i = 0; i < bytes.length; i += chunkSize) {\n binary += String.fromCodePoint(...bytes.subarray(i, i + chunkSize));\n }\n return btoa(binary);\n}\nfunction serializeVector(vector) {\n if (Array.isArray(vector)) {\n return [\"VALUES\", vector.length, ...vector];\n }\n if (vector instanceof Float32Array) {\n return [\"BASE64-FP32\", float32ToBase64(vector)];\n }\n return [\"BASE64-FP32\", vector.base64];\n}\nfunction deserializeVectorValues(result) {\n if (result === null) {\n return null;\n }\n return result.map(Number);\n}\nfunction deserializeVectorQueryResponse(result) {\n return result.map(([id, score]) => ({ id: String(id), score: Number(score) }));\n}\nfunction deserializeVectorInfoResponse(result) {\n if (result === null) {\n return null;\n }\n const fields = Array.isArray(result) ? Object.fromEntries(\n Array.from({ length: Math.floor(result.length / 2) }, (_, i) => [\n String(result[i * 2]),\n result[i * 2 + 1]\n ])\n ) : result;\n return {\n dimension: Number(fields.dimension),\n metric: String(fields.metric).toUpperCase()\n };\n}\n\n// pkg/commands/vector_add.ts\nvar VectorAddCommand = class extends Command {\n constructor([index, id, vector], cmdOpts) {\n super([\"VECTOR.ADD\", index, id, ...serializeVector(vector)], cmdOpts);\n }\n};\n\n// pkg/commands/vector_count.ts\nvar VectorCountCommand = class extends Command {\n constructor([index], cmdOpts) {\n super([\"VECTOR.COUNT\", index], cmdOpts);\n }\n};\n\n// pkg/commands/vector_create.ts\nvar VectorCreateCommand = class extends Command {\n constructor([index, opts], cmdOpts) {\n const command = [\n \"VECTOR.CREATE\",\n index,\n \"DIM\",\n opts.dimension,\n \"METRIC\",\n opts.metric\n ];\n if (opts.existsOk) {\n command.push(\"EXISTSOK\");\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/vector_del.ts\nvar VectorDelCommand = class extends Command {\n constructor([index, id], cmdOpts) {\n super([\"VECTOR.DEL\", index, id], cmdOpts);\n }\n};\n\n// pkg/commands/vector_drop.ts\nvar VectorDropCommand = class extends Command {\n constructor([index], cmdOpts) {\n super([\"VECTOR.DROP\", index], cmdOpts);\n }\n};\n\n// pkg/commands/vector_get.ts\nvar VectorGetCommand = class extends Command {\n constructor([index, id], cmdOpts) {\n super([\"VECTOR.GET\", index, id], {\n deserialize: deserializeVectorValues,\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/vector_info.ts\nvar VectorInfoCommand = class extends Command {\n constructor([index], cmdOpts) {\n super([\"VECTOR.INFO\", index], {\n deserialize: deserializeVectorInfoResponse,\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/vector_query.ts\nvar VectorQueryCommand = class extends Command {\n constructor([index, opts], cmdOpts) {\n const command = [\"VECTOR.QUERY\", index, \"TOPK\", opts.topK];\n if (opts.profile) {\n command.push(\"PROFILE\", opts.profile);\n }\n command.push(...serializeVector(opts.vector));\n super(command, {\n deserialize: deserializeVectorQueryResponse,\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/vector/vector.ts\nvar VectorIndex = class {\n name;\n client;\n commandOptions;\n constructor({ name, client, commandOptions }) {\n this.name = name;\n this.client = client;\n this.commandOptions = commandOptions;\n }\n /**\n * Adds a vector to the index, or overwrites the vector stored under `id`.\n *\n * @returns `1` if a new vector was inserted, `0` if an existing one was overwritten.\n */\n add(id, vector) {\n return new VectorAddCommand([this.name, id, vector], this.commandOptions).exec(this.client);\n }\n /**\n * Returns the vector stored under `id`, or `null` if it does not exist.\n */\n get(id) {\n return new VectorGetCommand([this.name, id], this.commandOptions).exec(this.client);\n }\n /**\n * Returns the `topK` nearest neighbours of the query vector.\n */\n query(options) {\n return new VectorQueryCommand([this.name, options], this.commandOptions).exec(this.client);\n }\n /**\n * Deletes the vector stored under `id`.\n *\n * @returns `1` if the vector existed and was removed, `0` otherwise.\n */\n delete(id) {\n return new VectorDelCommand([this.name, id], this.commandOptions).exec(this.client);\n }\n /**\n * Returns the number of vectors in the index.\n */\n count() {\n return new VectorCountCommand([this.name], this.commandOptions).exec(this.client);\n }\n /**\n * Returns the dimension and metric of the index, or `null` if it does not exist.\n */\n info() {\n return new VectorInfoCommand([this.name], this.commandOptions).exec(this.client);\n }\n /**\n * Drops the index and all vectors in it.\n *\n * @returns `1` if the index existed and was dropped, `0` otherwise.\n */\n drop() {\n return new VectorDropCommand([this.name], this.commandOptions).exec(this.client);\n }\n};\nasync function createVectorIndex(client, { name, ...opts }, commandOptions) {\n await new VectorCreateCommand([name, opts], commandOptions).exec(client);\n return new VectorIndex({ name, client, commandOptions });\n}\nfunction initVectorIndex(client, name, commandOptions) {\n return new VectorIndex({ name, client, commandOptions });\n}\n\n// pkg/commands/hrandfield.ts\nfunction deserialize(result) {\n if (result.length === 0) {\n return null;\n }\n const obj = {};\n for (let i = 0; i < result.length; i += 2) {\n const key = result[i];\n const value = result[i + 1];\n try {\n obj[key] = parseJSON(value);\n } catch {\n obj[key] = value;\n }\n }\n return obj;\n}\nvar HRandFieldCommand = class extends Command {\n constructor(cmd, opts) {\n const command = [\"hrandfield\", cmd[0]];\n if (typeof cmd[1] === \"number\") {\n command.push(cmd[1]);\n }\n if (cmd[2]) {\n command.push(\"WITHVALUES\");\n }\n super(command, {\n // @ts-expect-error to silence compiler\n deserialize: cmd[2] ? (result) => deserialize(result) : opts?.deserialize,\n ...opts\n });\n }\n};\n\n// pkg/commands/append.ts\nvar AppendCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"append\", ...cmd], opts);\n }\n};\n\n// pkg/commands/arcount.ts\nvar ArCountCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARCOUNT\", ...cmd], opts);\n }\n};\n\n// pkg/commands/ardel.ts\nvar ArDelCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARDEL\", ...cmd], opts);\n }\n};\n\n// pkg/commands/ardelrange.ts\nvar ArDelRangeCommand = class extends Command {\n constructor([key, ...ranges], opts) {\n super([\"ARDELRANGE\", key, ...ranges.flat()], opts);\n }\n};\n\n// pkg/commands/arget.ts\nvar ArGetCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARGET\", ...cmd], opts);\n }\n};\n\n// pkg/commands/argetrange.ts\nvar ArGetRangeCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARGETRANGE\", ...cmd], opts);\n }\n};\n\n// pkg/commands/argrep.ts\nvar ArGrepCommand = class extends Command {\n constructor([key, start, end, opts], cmdOpts) {\n const command = [\"ARGREP\", key, start, end];\n for (const predicate of opts.predicates) {\n if (\"exact\" in predicate) {\n command.push(\"EXACT\", predicate.exact);\n } else if (\"match\" in predicate) {\n command.push(\"MATCH\", predicate.match);\n } else if (\"glob\" in predicate) {\n command.push(\"GLOB\", predicate.glob);\n } else {\n command.push(\"RE\", predicate.re);\n }\n }\n if (opts.combine) {\n command.push(opts.combine.toUpperCase());\n }\n if (opts.noCase) {\n command.push(\"NOCASE\");\n }\n if (opts.withValues) {\n command.push(\"WITHVALUES\");\n }\n if (opts.limit !== void 0) {\n command.push(\"LIMIT\", opts.limit);\n }\n super(command, {\n deserialize: (result) => parseResponse(result).map(\n (item) => Array.isArray(item) ? [String(item[0]), item[1]] : String(item)\n ),\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/arinfo.ts\nfunction toCamelCase(field) {\n return field.replaceAll(/-([a-z])/g, (_, char) => char.toUpperCase());\n}\nfunction deserializeArInfoResponse(result) {\n const entries = Array.isArray(result) ? Array.from({ length: Math.floor(result.length / 2) }, (_, i) => [\n result[i * 2],\n result[i * 2 + 1]\n ]) : Object.entries(result);\n const indexFields = /* @__PURE__ */ new Set([\"len\", \"nextInsertIndex\"]);\n const info = {};\n for (const [field, value] of entries) {\n const name = toCamelCase(String(field));\n if (indexFields.has(name)) {\n info[name] = String(value);\n continue;\n }\n const numeric = typeof value === \"number\" ? value : Number(value);\n info[name] = Number.isNaN(numeric) ? value : numeric;\n }\n return info;\n}\nvar ArInfoCommand = class extends Command {\n constructor([key, opts], cmdOpts) {\n const command = [\"ARINFO\", key];\n if (opts?.full) {\n command.push(\"FULL\");\n }\n super(command, {\n deserialize: deserializeArInfoResponse,\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/arinsert.ts\nvar ArInsertCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARINSERT\", ...cmd], {\n deserialize: String,\n ...opts\n });\n }\n};\n\n// pkg/commands/arlastitems.ts\nvar ArLastItemsCommand = class extends Command {\n constructor([key, count, opts], cmdOpts) {\n const command = [\"ARLASTITEMS\", key, count];\n if (opts?.rev) {\n command.push(\"REV\");\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/arlen.ts\nvar ArLenCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARLEN\", ...cmd], {\n deserialize: String,\n ...opts\n });\n }\n};\n\n// pkg/commands/armget.ts\nvar ArMGetCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARMGET\", ...cmd], opts);\n }\n};\n\n// pkg/commands/armset.ts\nvar ArMSetCommand = class extends Command {\n constructor([key, values], opts) {\n const pairs = Array.isArray(values) ? values : Object.entries(values);\n super([\"ARMSET\", key, ...pairs.flatMap(([index, value]) => [index, value])], opts);\n }\n};\n\n// pkg/commands/arnext.ts\nvar ArNextCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARNEXT\", ...cmd], {\n deserialize: (result) => result === null ? null : String(result),\n ...opts\n });\n }\n};\n\n// pkg/commands/arop.ts\nvar ArOpCommand = class extends Command {\n constructor([key, start, end, operation], opts) {\n const command = [\"AROP\", key, start, end];\n if (typeof operation === \"string\") {\n command.push(operation.toUpperCase());\n } else {\n command.push(\"MATCH\", operation.match);\n }\n super(command, {\n deserialize: (result) => result === null ? null : Number(result),\n ...opts\n });\n }\n};\n\n// pkg/commands/arring.ts\nvar ArRingCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARRING\", ...cmd], {\n deserialize: String,\n ...opts\n });\n }\n};\n\n// pkg/commands/arscan.ts\nvar ArScanCommand = class extends Command {\n constructor([key, start, end, opts], cmdOpts) {\n const command = [\"ARSCAN\", key, start, end];\n if (opts?.limit !== void 0) {\n command.push(\"LIMIT\", opts.limit);\n }\n super(command, {\n deserialize: (result) => parseResponse(result).map(([index, value]) => [\n String(index),\n value\n ]),\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/arseek.ts\nvar ArSeekCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARSEEK\", ...cmd], opts);\n }\n};\n\n// pkg/commands/arset.ts\nvar ArSetCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ARSET\", ...cmd], opts);\n }\n};\n\n// pkg/commands/bitcount.ts\nvar BitCountCommand = class extends Command {\n constructor([key, start, end], opts) {\n const command = [\"bitcount\", key];\n if (typeof start === \"number\") {\n command.push(start);\n }\n if (typeof end === \"number\") {\n command.push(end);\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/bitfield.ts\nvar BitFieldCommand = class {\n constructor(args, client, opts, execOperation = (command) => command.exec(this.client)) {\n this.client = client;\n this.opts = opts;\n this.execOperation = execOperation;\n this.command = [\"bitfield\", ...args];\n }\n command;\n chain(...args) {\n this.command.push(...args);\n return this;\n }\n get(...args) {\n return this.chain(\"get\", ...args);\n }\n set(...args) {\n return this.chain(\"set\", ...args);\n }\n incrby(...args) {\n return this.chain(\"incrby\", ...args);\n }\n overflow(overflow) {\n return this.chain(\"overflow\", overflow);\n }\n exec() {\n const command = new Command(this.command, this.opts);\n return this.execOperation(command);\n }\n};\n\n// pkg/commands/bitop.ts\nvar BitOpCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"bitop\", ...cmd], opts);\n }\n};\n\n// pkg/commands/bitpos.ts\nvar BitPosCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"bitpos\", ...cmd], opts);\n }\n};\n\n// pkg/commands/client_setinfo.ts\nvar ClientSetInfoCommand = class extends Command {\n constructor([attribute, value], opts) {\n super([\"CLIENT\", \"SETINFO\", attribute.toUpperCase(), value], opts);\n }\n};\n\n// pkg/commands/copy.ts\nvar CopyCommand = class extends Command {\n constructor([key, destinationKey, opts], commandOptions) {\n super([\"COPY\", key, destinationKey, ...opts?.replace ? [\"REPLACE\"] : []], {\n ...commandOptions,\n deserialize(result) {\n if (result > 0) {\n return \"COPIED\";\n }\n return \"NOT_COPIED\";\n }\n });\n }\n};\n\n// pkg/commands/dbsize.ts\nvar DBSizeCommand = class extends Command {\n constructor(opts) {\n super([\"dbsize\"], opts);\n }\n};\n\n// pkg/commands/decr.ts\nvar DecrCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"decr\", ...cmd], opts);\n }\n};\n\n// pkg/commands/decrby.ts\nvar DecrByCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"decrby\", ...cmd], opts);\n }\n};\n\n// pkg/commands/del.ts\nvar DelCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"del\", ...cmd], opts);\n }\n};\n\n// pkg/commands/echo.ts\nvar EchoCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"echo\", ...cmd], opts);\n }\n};\n\n// pkg/commands/evalRo.ts\nvar EvalROCommand = class extends Command {\n constructor([script, keys, args], opts) {\n super([\"eval_ro\", script, keys.length, ...keys, ...args ?? []], opts);\n }\n};\n\n// pkg/commands/eval.ts\nvar EvalCommand = class extends Command {\n constructor([script, keys, args], opts) {\n super([\"eval\", script, keys.length, ...keys, ...args ?? []], opts);\n }\n};\n\n// pkg/commands/evalshaRo.ts\nvar EvalshaROCommand = class extends Command {\n constructor([sha, keys, args], opts) {\n super([\"evalsha_ro\", sha, keys.length, ...keys, ...args ?? []], opts);\n }\n};\n\n// pkg/commands/evalsha.ts\nvar EvalshaCommand = class extends Command {\n constructor([sha, keys, args], opts) {\n super([\"evalsha\", sha, keys.length, ...keys, ...args ?? []], opts);\n }\n};\n\n// pkg/commands/exists.ts\nvar ExistsCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"exists\", ...cmd], opts);\n }\n};\n\n// pkg/commands/expire.ts\nvar ExpireCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"expire\", ...cmd.filter(Boolean)], opts);\n }\n};\n\n// pkg/commands/expireat.ts\nvar ExpireAtCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"expireat\", ...cmd], opts);\n }\n};\n\n// pkg/commands/fcall.ts\nvar FCallCommand = class extends Command {\n constructor([functionName, keys, args], opts) {\n super([\"fcall\", functionName, ...keys ? [keys.length, ...keys] : [0], ...args ?? []], opts);\n }\n};\n\n// pkg/commands/fcall_ro.ts\nvar FCallRoCommand = class extends Command {\n constructor([functionName, keys, args], opts) {\n super(\n [\"fcall_ro\", functionName, ...keys ? [keys.length, ...keys] : [0], ...args ?? []],\n opts\n );\n }\n};\n\n// pkg/commands/flushall.ts\nvar FlushAllCommand = class extends Command {\n constructor(args, opts) {\n const command = [\"flushall\"];\n if (args && args.length > 0 && args[0].async) {\n command.push(\"async\");\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/flushdb.ts\nvar FlushDBCommand = class extends Command {\n constructor([opts], cmdOpts) {\n const command = [\"flushdb\"];\n if (opts?.async) {\n command.push(\"async\");\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/function_delete.ts\nvar FunctionDeleteCommand = class extends Command {\n constructor([libraryName], opts) {\n super([\"function\", \"delete\", libraryName], opts);\n }\n};\n\n// pkg/commands/function_flush.ts\nvar FunctionFlushCommand = class extends Command {\n constructor(opts) {\n super([\"function\", \"flush\"], opts);\n }\n};\n\n// pkg/commands/function_list.ts\nvar FunctionListCommand = class extends Command {\n constructor([args], opts) {\n const command = [\"function\", \"list\"];\n if (args?.libraryName) {\n command.push(\"libraryname\", args.libraryName);\n }\n if (args?.withCode) {\n command.push(\"withcode\");\n }\n super(command, { deserialize: deserialize2, ...opts });\n }\n};\nfunction deserialize2(result) {\n if (!Array.isArray(result)) return [];\n return result.map((libRaw) => {\n const lib = kvArrayToObject(libRaw);\n const functionsParsed = lib.functions.map(\n (fnRaw) => kvArrayToObject(fnRaw)\n );\n return {\n libraryName: lib.library_name,\n engine: lib.engine,\n functions: functionsParsed.map((fn) => ({\n name: fn.name,\n description: fn.description ?? void 0,\n flags: fn.flags\n })),\n libraryCode: lib.library_code\n };\n });\n}\n\n// pkg/commands/function_load.ts\nvar FunctionLoadCommand = class extends Command {\n constructor([args], opts) {\n super([\"function\", \"load\", ...args.replace ? [\"replace\"] : [], args.code], opts);\n }\n};\n\n// pkg/commands/function_stats.ts\nvar FunctionStatsCommand = class extends Command {\n constructor(opts) {\n super([\"function\", \"stats\"], { deserialize: deserialize3, ...opts });\n }\n};\nfunction deserialize3(result) {\n const rawEngines = kvArrayToObject(kvArrayToObject(result).engines);\n const parsedEngines = Object.fromEntries(\n Object.entries(rawEngines).map(([key, value]) => [key, kvArrayToObject(value)])\n );\n const final = {\n engines: Object.fromEntries(\n Object.entries(parsedEngines).map(([key, value]) => [\n key,\n {\n librariesCount: value.libraries_count,\n functionsCount: value.functions_count\n }\n ])\n )\n };\n return final;\n}\n\n// pkg/commands/geo_add.ts\nvar GeoAddCommand = class extends Command {\n constructor([key, arg1, ...arg2], opts) {\n const command = [\"geoadd\", key];\n if (\"nx\" in arg1 && arg1.nx) {\n command.push(\"nx\");\n } else if (\"xx\" in arg1 && arg1.xx) {\n command.push(\"xx\");\n }\n if (\"ch\" in arg1 && arg1.ch) {\n command.push(\"ch\");\n }\n if (\"latitude\" in arg1 && arg1.latitude) {\n command.push(arg1.longitude, arg1.latitude, arg1.member);\n }\n command.push(\n ...arg2.flatMap(({ latitude, longitude, member }) => [longitude, latitude, member])\n );\n super(command, opts);\n }\n};\n\n// pkg/commands/geo_dist.ts\nvar GeoDistCommand = class extends Command {\n constructor([key, member1, member2, unit = \"M\"], opts) {\n super([\"GEODIST\", key, member1, member2, unit], opts);\n }\n};\n\n// pkg/commands/geo_hash.ts\nvar GeoHashCommand = class extends Command {\n constructor(cmd, opts) {\n const [key] = cmd;\n const members = Array.isArray(cmd[1]) ? cmd[1] : cmd.slice(1);\n super([\"GEOHASH\", key, ...members], opts);\n }\n};\n\n// pkg/commands/geo_pos.ts\nvar GeoPosCommand = class extends Command {\n constructor(cmd, opts) {\n const [key] = cmd;\n const members = Array.isArray(cmd[1]) ? cmd[1] : cmd.slice(1);\n super([\"GEOPOS\", key, ...members], {\n deserialize: (result) => transform(result),\n ...opts\n });\n }\n};\nfunction transform(result) {\n const final = [];\n for (const pos of result) {\n if (!pos?.[0] || !pos?.[1]) {\n continue;\n }\n final.push({ lng: Number.parseFloat(pos[0]), lat: Number.parseFloat(pos[1]) });\n }\n return final;\n}\n\n// pkg/commands/geo_search.ts\nvar GeoSearchCommand = class extends Command {\n constructor([key, centerPoint, shape, order, opts], commandOptions) {\n const command = [\"GEOSEARCH\", key];\n if (centerPoint.type === \"FROMMEMBER\" || centerPoint.type === \"frommember\") {\n command.push(centerPoint.type, centerPoint.member);\n }\n if (centerPoint.type === \"FROMLONLAT\" || centerPoint.type === \"fromlonlat\") {\n command.push(centerPoint.type, centerPoint.coordinate.lon, centerPoint.coordinate.lat);\n }\n if (shape.type === \"BYRADIUS\" || shape.type === \"byradius\") {\n command.push(shape.type, shape.radius, shape.radiusType);\n }\n if (shape.type === \"BYBOX\" || shape.type === \"bybox\") {\n command.push(shape.type, shape.rect.width, shape.rect.height, shape.rectType);\n }\n command.push(order);\n if (opts?.count) {\n command.push(\"COUNT\", opts.count.limit, ...opts.count.any ? [\"ANY\"] : []);\n }\n const transform2 = (result) => {\n if (!opts?.withCoord && !opts?.withDist && !opts?.withHash) {\n return result.map((member) => {\n try {\n return { member: parseJSON(member) };\n } catch {\n return { member };\n }\n });\n }\n return result.map((members) => {\n let counter = 1;\n const obj = {};\n try {\n obj.member = parseJSON(members[0]);\n } catch {\n obj.member = members[0];\n }\n if (opts.withDist) {\n obj.dist = Number.parseFloat(members[counter++]);\n }\n if (opts.withHash) {\n obj.hash = members[counter++].toString();\n }\n if (opts.withCoord) {\n obj.coord = {\n long: Number.parseFloat(members[counter][0]),\n lat: Number.parseFloat(members[counter][1])\n };\n }\n return obj;\n });\n };\n super(\n [\n ...command,\n ...opts?.withCoord ? [\"WITHCOORD\"] : [],\n ...opts?.withDist ? [\"WITHDIST\"] : [],\n ...opts?.withHash ? [\"WITHHASH\"] : []\n ],\n {\n deserialize: transform2,\n ...commandOptions\n }\n );\n }\n};\n\n// pkg/commands/geo_search_store.ts\nvar GeoSearchStoreCommand = class extends Command {\n constructor([destination, key, centerPoint, shape, order, opts], commandOptions) {\n const command = [\"GEOSEARCHSTORE\", destination, key];\n if (centerPoint.type === \"FROMMEMBER\" || centerPoint.type === \"frommember\") {\n command.push(centerPoint.type, centerPoint.member);\n }\n if (centerPoint.type === \"FROMLONLAT\" || centerPoint.type === \"fromlonlat\") {\n command.push(centerPoint.type, centerPoint.coordinate.lon, centerPoint.coordinate.lat);\n }\n if (shape.type === \"BYRADIUS\" || shape.type === \"byradius\") {\n command.push(shape.type, shape.radius, shape.radiusType);\n }\n if (shape.type === \"BYBOX\" || shape.type === \"bybox\") {\n command.push(shape.type, shape.rect.width, shape.rect.height, shape.rectType);\n }\n command.push(order);\n if (opts?.count) {\n command.push(\"COUNT\", opts.count.limit, ...opts.count.any ? [\"ANY\"] : []);\n }\n super([...command, ...opts?.storeDist ? [\"STOREDIST\"] : []], commandOptions);\n }\n};\n\n// pkg/commands/get.ts\nvar GetCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"get\", ...cmd], opts);\n }\n};\n\n// pkg/commands/getbit.ts\nvar GetBitCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"getbit\", ...cmd], opts);\n }\n};\n\n// pkg/commands/getdel.ts\nvar GetDelCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"getdel\", ...cmd], opts);\n }\n};\n\n// pkg/commands/getex.ts\nvar GetExCommand = class extends Command {\n constructor([key, opts], cmdOpts) {\n const command = [\"getex\", key];\n if (opts) {\n if (\"ex\" in opts && typeof opts.ex === \"number\") {\n command.push(\"ex\", opts.ex);\n } else if (\"px\" in opts && typeof opts.px === \"number\") {\n command.push(\"px\", opts.px);\n } else if (\"exat\" in opts && typeof opts.exat === \"number\") {\n command.push(\"exat\", opts.exat);\n } else if (\"pxat\" in opts && typeof opts.pxat === \"number\") {\n command.push(\"pxat\", opts.pxat);\n } else if (\"persist\" in opts && opts.persist) {\n command.push(\"persist\");\n }\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/getrange.ts\nvar GetRangeCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"getrange\", ...cmd], opts);\n }\n};\n\n// pkg/commands/getset.ts\nvar GetSetCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"getset\", ...cmd], opts);\n }\n};\n\n// pkg/commands/hdel.ts\nvar HDelCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hdel\", ...cmd], opts);\n }\n};\n\n// pkg/commands/hexists.ts\nvar HExistsCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hexists\", ...cmd], opts);\n }\n};\n\n// pkg/commands/hexpire.ts\nvar HExpireCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, fields, seconds, option] = cmd;\n const fieldArray = Array.isArray(fields) ? fields : [fields];\n super(\n [\n \"hexpire\",\n key,\n seconds,\n ...option ? [option] : [],\n \"FIELDS\",\n fieldArray.length,\n ...fieldArray\n ],\n opts\n );\n }\n};\n\n// pkg/commands/hexpireat.ts\nvar HExpireAtCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, fields, timestamp, option] = cmd;\n const fieldArray = Array.isArray(fields) ? fields : [fields];\n super(\n [\n \"hexpireat\",\n key,\n timestamp,\n ...option ? [option] : [],\n \"FIELDS\",\n fieldArray.length,\n ...fieldArray\n ],\n opts\n );\n }\n};\n\n// pkg/commands/hexpiretime.ts\nvar HExpireTimeCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, fields] = cmd;\n const fieldArray = Array.isArray(fields) ? fields : [fields];\n super([\"hexpiretime\", key, \"FIELDS\", fieldArray.length, ...fieldArray], opts);\n }\n};\n\n// pkg/commands/hpersist.ts\nvar HPersistCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, fields] = cmd;\n const fieldArray = Array.isArray(fields) ? fields : [fields];\n super([\"hpersist\", key, \"FIELDS\", fieldArray.length, ...fieldArray], opts);\n }\n};\n\n// pkg/commands/hpexpire.ts\nvar HPExpireCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, fields, milliseconds, option] = cmd;\n const fieldArray = Array.isArray(fields) ? fields : [fields];\n super(\n [\n \"hpexpire\",\n key,\n milliseconds,\n ...option ? [option] : [],\n \"FIELDS\",\n fieldArray.length,\n ...fieldArray\n ],\n opts\n );\n }\n};\n\n// pkg/commands/hpexpireat.ts\nvar HPExpireAtCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, fields, timestamp, option] = cmd;\n const fieldArray = Array.isArray(fields) ? fields : [fields];\n super(\n [\n \"hpexpireat\",\n key,\n timestamp,\n ...option ? [option] : [],\n \"FIELDS\",\n fieldArray.length,\n ...fieldArray\n ],\n opts\n );\n }\n};\n\n// pkg/commands/hpexpiretime.ts\nvar HPExpireTimeCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, fields] = cmd;\n const fieldArray = Array.isArray(fields) ? fields : [fields];\n super([\"hpexpiretime\", key, \"FIELDS\", fieldArray.length, ...fieldArray], opts);\n }\n};\n\n// pkg/commands/hpttl.ts\nvar HPTtlCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, fields] = cmd;\n const fieldArray = Array.isArray(fields) ? fields : [fields];\n super([\"hpttl\", key, \"FIELDS\", fieldArray.length, ...fieldArray], opts);\n }\n};\n\n// pkg/commands/hget.ts\nvar HGetCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hget\", ...cmd], opts);\n }\n};\n\n// pkg/commands/hgetall.ts\nfunction deserialize4(result) {\n if (result.length === 0) {\n return null;\n }\n const obj = {};\n for (let i = 0; i < result.length; i += 2) {\n const key = result[i];\n const value = result[i + 1];\n try {\n const valueIsNumberAndNotSafeInteger = !Number.isNaN(Number(value)) && !Number.isSafeInteger(Number(value));\n obj[key] = valueIsNumberAndNotSafeInteger ? value : parseJSON(value);\n } catch {\n obj[key] = value;\n }\n }\n return obj;\n}\nvar HGetAllCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hgetall\", ...cmd], {\n deserialize: (result) => deserialize4(result),\n ...opts\n });\n }\n};\n\n// pkg/commands/hmget.ts\nfunction deserialize5(fields, result) {\n if (result.every((field) => field === null)) {\n return null;\n }\n const obj = {};\n for (const [i, field] of fields.entries()) {\n try {\n obj[field] = parseJSON(result[i]);\n } catch {\n obj[field] = result[i];\n }\n }\n return obj;\n}\nvar HMGetCommand = class extends Command {\n constructor([key, ...fields], opts) {\n super([\"hmget\", key, ...fields], {\n deserialize: (result) => deserialize5(fields, result),\n ...opts\n });\n }\n};\n\n// pkg/commands/hgetdel.ts\nvar HGetDelCommand = class extends Command {\n constructor([key, ...fields], opts) {\n super([\"hgetdel\", key, \"FIELDS\", fields.length, ...fields], {\n deserialize: (result) => deserialize5(fields.map(String), result),\n ...opts\n });\n }\n};\n\n// pkg/commands/hgetex.ts\nvar HGetExCommand = class extends Command {\n constructor([key, opts, ...fields], cmdOpts) {\n const command = [\"hgetex\", key];\n if (\"ex\" in opts && typeof opts.ex === \"number\") {\n command.push(\"EX\", opts.ex);\n } else if (\"px\" in opts && typeof opts.px === \"number\") {\n command.push(\"PX\", opts.px);\n } else if (\"exat\" in opts && typeof opts.exat === \"number\") {\n command.push(\"EXAT\", opts.exat);\n } else if (\"pxat\" in opts && typeof opts.pxat === \"number\") {\n command.push(\"PXAT\", opts.pxat);\n } else if (\"persist\" in opts && opts.persist) {\n command.push(\"PERSIST\");\n }\n command.push(\"FIELDS\", fields.length, ...fields);\n super(command, {\n deserialize: (result) => deserialize5(fields.map(String), result),\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/hincrby.ts\nvar HIncrByCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hincrby\", ...cmd], opts);\n }\n};\n\n// pkg/commands/hincrbyfloat.ts\nvar HIncrByFloatCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hincrbyfloat\", ...cmd], opts);\n }\n};\n\n// pkg/commands/hkeys.ts\nvar HKeysCommand = class extends Command {\n constructor([key], opts) {\n super([\"hkeys\", key], opts);\n }\n};\n\n// pkg/commands/hlen.ts\nvar HLenCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hlen\", ...cmd], opts);\n }\n};\n\n// pkg/commands/hmset.ts\nvar HMSetCommand = class extends Command {\n constructor([key, kv], opts) {\n super([\"hmset\", key, ...Object.entries(kv).flatMap(([field, value]) => [field, value])], opts);\n }\n};\n\n// pkg/commands/hscan.ts\nvar HScanCommand = class extends Command {\n constructor([key, cursor, cmdOpts], opts) {\n const command = [\"hscan\", key, cursor];\n if (cmdOpts?.match) {\n command.push(\"match\", cmdOpts.match);\n }\n if (typeof cmdOpts?.count === \"number\") {\n command.push(\"count\", cmdOpts.count);\n }\n super(command, {\n deserialize: deserializeScanResponse,\n ...opts\n });\n }\n};\n\n// pkg/commands/hset.ts\nvar HSetCommand = class extends Command {\n constructor([key, kv], opts) {\n super([\"hset\", key, ...Object.entries(kv).flatMap(([field, value]) => [field, value])], opts);\n }\n};\n\n// pkg/commands/hsetex.ts\nvar HSetExCommand = class extends Command {\n constructor([key, opts, kv], cmdOpts) {\n const command = [\"hsetex\", key];\n if (opts.conditional) {\n command.push(opts.conditional.toUpperCase());\n }\n if (opts.expiration) {\n if (\"ex\" in opts.expiration && typeof opts.expiration.ex === \"number\") {\n command.push(\"EX\", opts.expiration.ex);\n } else if (\"px\" in opts.expiration && typeof opts.expiration.px === \"number\") {\n command.push(\"PX\", opts.expiration.px);\n } else if (\"exat\" in opts.expiration && typeof opts.expiration.exat === \"number\") {\n command.push(\"EXAT\", opts.expiration.exat);\n } else if (\"pxat\" in opts.expiration && typeof opts.expiration.pxat === \"number\") {\n command.push(\"PXAT\", opts.expiration.pxat);\n } else if (\"keepttl\" in opts.expiration && opts.expiration.keepttl) {\n command.push(\"KEEPTTL\");\n }\n }\n const entries = Object.entries(kv);\n command.push(\"FIELDS\", entries.length);\n for (const [field, value] of entries) {\n command.push(field, value);\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/hsetnx.ts\nvar HSetNXCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hsetnx\", ...cmd], opts);\n }\n};\n\n// pkg/commands/hstrlen.ts\nvar HStrLenCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hstrlen\", ...cmd], opts);\n }\n};\n\n// pkg/commands/httl.ts\nvar HTtlCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, fields] = cmd;\n const fieldArray = Array.isArray(fields) ? fields : [fields];\n super([\"httl\", key, \"FIELDS\", fieldArray.length, ...fieldArray], opts);\n }\n};\n\n// pkg/commands/hvals.ts\nvar HValsCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"hvals\", ...cmd], opts);\n }\n};\n\n// pkg/commands/incr.ts\nvar IncrCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"incr\", ...cmd], opts);\n }\n};\n\n// pkg/commands/incrby.ts\nvar IncrByCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"incrby\", ...cmd], opts);\n }\n};\n\n// pkg/commands/incrbyfloat.ts\nvar IncrByFloatCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"incrbyfloat\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_arrappend.ts\nvar JsonArrAppendCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.ARRAPPEND\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_arrindex.ts\nvar JsonArrIndexCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.ARRINDEX\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_arrinsert.ts\nvar JsonArrInsertCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.ARRINSERT\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_arrlen.ts\nvar JsonArrLenCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.ARRLEN\", cmd[0], cmd[1] ?? \"$\"], opts);\n }\n};\n\n// pkg/commands/json_arrpop.ts\nvar JsonArrPopCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.ARRPOP\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_arrtrim.ts\nvar JsonArrTrimCommand = class extends Command {\n constructor(cmd, opts) {\n const path = cmd[1] ?? \"$\";\n const start = cmd[2] ?? 0;\n const stop = cmd[3] ?? 0;\n super([\"JSON.ARRTRIM\", cmd[0], path, start, stop], opts);\n }\n};\n\n// pkg/commands/json_clear.ts\nvar JsonClearCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.CLEAR\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_del.ts\nvar JsonDelCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.DEL\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_forget.ts\nvar JsonForgetCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.FORGET\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_get.ts\nvar JsonGetCommand = class extends Command {\n constructor(cmd, opts) {\n const command = [\"JSON.GET\"];\n if (typeof cmd[1] === \"string\") {\n command.push(...cmd);\n } else {\n command.push(cmd[0]);\n if (cmd[1]) {\n if (cmd[1].indent) {\n command.push(\"INDENT\", cmd[1].indent);\n }\n if (cmd[1].newline) {\n command.push(\"NEWLINE\", cmd[1].newline);\n }\n if (cmd[1].space) {\n command.push(\"SPACE\", cmd[1].space);\n }\n }\n command.push(...cmd.slice(2));\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/json_merge.ts\nvar JsonMergeCommand = class extends Command {\n constructor(cmd, opts) {\n const command = [\"JSON.MERGE\", ...cmd];\n super(command, opts);\n }\n};\n\n// pkg/commands/json_mget.ts\nvar JsonMGetCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.MGET\", ...cmd[0], cmd[1]], opts);\n }\n};\n\n// pkg/commands/json_mset.ts\nvar JsonMSetCommand = class extends Command {\n constructor(cmd, opts) {\n const command = [\"JSON.MSET\"];\n for (const c of cmd) {\n command.push(c.key, c.path, c.value);\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/json_numincrby.ts\nvar JsonNumIncrByCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.NUMINCRBY\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_nummultby.ts\nvar JsonNumMultByCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.NUMMULTBY\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_objkeys.ts\nvar JsonObjKeysCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.OBJKEYS\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_objlen.ts\nvar JsonObjLenCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.OBJLEN\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_resp.ts\nvar JsonRespCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.RESP\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_set.ts\nvar JsonSetCommand = class extends Command {\n constructor(cmd, opts) {\n const command = [\"JSON.SET\", cmd[0], cmd[1], cmd[2]];\n if (cmd[3]) {\n if (cmd[3].nx) {\n command.push(\"NX\");\n } else if (cmd[3].xx) {\n command.push(\"XX\");\n }\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/json_strappend.ts\nvar JsonStrAppendCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.STRAPPEND\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_strlen.ts\nvar JsonStrLenCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.STRLEN\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_toggle.ts\nvar JsonToggleCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.TOGGLE\", ...cmd], opts);\n }\n};\n\n// pkg/commands/json_type.ts\nvar JsonTypeCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"JSON.TYPE\", ...cmd], opts);\n }\n};\n\n// pkg/commands/keys.ts\nvar KeysCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"keys\", ...cmd], opts);\n }\n};\n\n// pkg/commands/lindex.ts\nvar LIndexCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"lindex\", ...cmd], opts);\n }\n};\n\n// pkg/commands/linsert.ts\nvar LInsertCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"linsert\", ...cmd], opts);\n }\n};\n\n// pkg/commands/llen.ts\nvar LLenCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"llen\", ...cmd], opts);\n }\n};\n\n// pkg/commands/lmove.ts\nvar LMoveCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"lmove\", ...cmd], opts);\n }\n};\n\n// pkg/commands/lmpop.ts\nvar LmPopCommand = class extends Command {\n constructor(cmd, opts) {\n const [numkeys, keys, direction, count] = cmd;\n super([\"LMPOP\", numkeys, ...keys, direction, ...count ? [\"COUNT\", count] : []], opts);\n }\n};\n\n// pkg/commands/lpop.ts\nvar LPopCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"lpop\", ...cmd], opts);\n }\n};\n\n// pkg/commands/lpos.ts\nvar LPosCommand = class extends Command {\n constructor(cmd, opts) {\n const args = [\"lpos\", cmd[0], cmd[1]];\n if (typeof cmd[2]?.rank === \"number\") {\n args.push(\"rank\", cmd[2].rank);\n }\n if (typeof cmd[2]?.count === \"number\") {\n args.push(\"count\", cmd[2].count);\n }\n if (typeof cmd[2]?.maxLen === \"number\") {\n args.push(\"maxLen\", cmd[2].maxLen);\n }\n super(args, opts);\n }\n};\n\n// pkg/commands/lpush.ts\nvar LPushCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"lpush\", ...cmd], opts);\n }\n};\n\n// pkg/commands/lpushx.ts\nvar LPushXCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"lpushx\", ...cmd], opts);\n }\n};\n\n// pkg/commands/lrange.ts\nvar LRangeCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"lrange\", ...cmd], opts);\n }\n};\n\n// pkg/commands/lrem.ts\nvar LRemCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"lrem\", ...cmd], opts);\n }\n};\n\n// pkg/commands/lset.ts\nvar LSetCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"lset\", ...cmd], opts);\n }\n};\n\n// pkg/commands/ltrim.ts\nvar LTrimCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ltrim\", ...cmd], opts);\n }\n};\n\n// pkg/commands/mget.ts\nvar MGetCommand = class extends Command {\n constructor(cmd, opts) {\n const keys = Array.isArray(cmd[0]) ? cmd[0] : cmd;\n super([\"mget\", ...keys], opts);\n }\n};\n\n// pkg/commands/mset.ts\nvar MSetCommand = class extends Command {\n constructor([kv], opts) {\n super([\"mset\", ...Object.entries(kv).flatMap(([key, value]) => [key, value])], opts);\n }\n};\n\n// pkg/commands/msetnx.ts\nvar MSetNXCommand = class extends Command {\n constructor([kv], opts) {\n super([\"msetnx\", ...Object.entries(kv).flat()], opts);\n }\n};\n\n// pkg/commands/persist.ts\nvar PersistCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"persist\", ...cmd], opts);\n }\n};\n\n// pkg/commands/pexpire.ts\nvar PExpireCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"pexpire\", ...cmd], opts);\n }\n};\n\n// pkg/commands/pexpireat.ts\nvar PExpireAtCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"pexpireat\", ...cmd], opts);\n }\n};\n\n// pkg/commands/pfadd.ts\nvar PfAddCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"pfadd\", ...cmd], opts);\n }\n};\n\n// pkg/commands/pfcount.ts\nvar PfCountCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"pfcount\", ...cmd], opts);\n }\n};\n\n// pkg/commands/pfmerge.ts\nvar PfMergeCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"pfmerge\", ...cmd], opts);\n }\n};\n\n// pkg/commands/ping.ts\nvar PingCommand = class extends Command {\n constructor(cmd, opts) {\n const command = [\"ping\"];\n if (cmd?.[0] !== void 0) {\n command.push(cmd[0]);\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/psetex.ts\nvar PSetEXCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"psetex\", ...cmd], opts);\n }\n};\n\n// pkg/commands/pttl.ts\nvar PTtlCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"pttl\", ...cmd], opts);\n }\n};\n\n// pkg/commands/publish.ts\nvar PublishCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"publish\", ...cmd], opts);\n }\n};\n\n// pkg/commands/randomkey.ts\nvar RandomKeyCommand = class extends Command {\n constructor(opts) {\n super([\"randomkey\"], opts);\n }\n};\n\n// pkg/commands/rename.ts\nvar RenameCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"rename\", ...cmd], opts);\n }\n};\n\n// pkg/commands/renamenx.ts\nvar RenameNXCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"renamenx\", ...cmd], opts);\n }\n};\n\n// pkg/commands/rpop.ts\nvar RPopCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"rpop\", ...cmd], opts);\n }\n};\n\n// pkg/commands/rpush.ts\nvar RPushCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"rpush\", ...cmd], opts);\n }\n};\n\n// pkg/commands/rpushx.ts\nvar RPushXCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"rpushx\", ...cmd], opts);\n }\n};\n\n// pkg/commands/sadd.ts\nvar SAddCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"sadd\", ...cmd], opts);\n }\n};\n\n// pkg/commands/scan.ts\nvar ScanCommand = class extends Command {\n constructor([cursor, opts], cmdOpts) {\n const command = [\"scan\", cursor];\n if (opts?.match) {\n command.push(\"match\", opts.match);\n }\n if (typeof opts?.count === \"number\") {\n command.push(\"count\", opts.count);\n }\n if (opts && \"withType\" in opts && opts.withType === true) {\n command.push(\"withtype\");\n } else if (opts && \"type\" in opts && opts.type && opts.type.length > 0) {\n command.push(\"type\", opts.type);\n }\n super(command, {\n // @ts-expect-error ignore types here\n deserialize: opts?.withType ? deserializeScanWithTypesResponse : deserializeScanResponse,\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/scard.ts\nvar SCardCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"scard\", ...cmd], opts);\n }\n};\n\n// pkg/commands/script_exists.ts\nvar ScriptExistsCommand = class extends Command {\n constructor(hashes, opts) {\n super([\"script\", \"exists\", ...hashes], {\n deserialize: (result) => result,\n ...opts\n });\n }\n};\n\n// pkg/commands/script_flush.ts\nvar ScriptFlushCommand = class extends Command {\n constructor([opts], cmdOpts) {\n const cmd = [\"script\", \"flush\"];\n if (opts?.sync) {\n cmd.push(\"sync\");\n } else if (opts?.async) {\n cmd.push(\"async\");\n }\n super(cmd, cmdOpts);\n }\n};\n\n// pkg/commands/script_load.ts\nvar ScriptLoadCommand = class extends Command {\n constructor(args, opts) {\n super([\"script\", \"load\", ...args], opts);\n }\n};\n\n// pkg/commands/sdiff.ts\nvar SDiffCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"sdiff\", ...cmd], opts);\n }\n};\n\n// pkg/commands/sdiffstore.ts\nvar SDiffStoreCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"sdiffstore\", ...cmd], opts);\n }\n};\n\n// pkg/commands/set.ts\nvar SetCommand = class extends Command {\n constructor([key, value, opts], cmdOpts) {\n const command = [\"set\", key, value];\n if (opts) {\n if (\"nx\" in opts && opts.nx) {\n command.push(\"nx\");\n } else if (\"xx\" in opts && opts.xx) {\n command.push(\"xx\");\n }\n if (\"get\" in opts && opts.get) {\n command.push(\"get\");\n }\n if (\"ex\" in opts && typeof opts.ex === \"number\") {\n command.push(\"ex\", opts.ex);\n } else if (\"px\" in opts && typeof opts.px === \"number\") {\n command.push(\"px\", opts.px);\n } else if (\"exat\" in opts && typeof opts.exat === \"number\") {\n command.push(\"exat\", opts.exat);\n } else if (\"pxat\" in opts && typeof opts.pxat === \"number\") {\n command.push(\"pxat\", opts.pxat);\n } else if (\"keepTtl\" in opts && opts.keepTtl) {\n command.push(\"keepTtl\");\n }\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/setbit.ts\nvar SetBitCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"setbit\", ...cmd], opts);\n }\n};\n\n// pkg/commands/setex.ts\nvar SetExCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"setex\", ...cmd], opts);\n }\n};\n\n// pkg/commands/setnx.ts\nvar SetNxCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"setnx\", ...cmd], opts);\n }\n};\n\n// pkg/commands/setrange.ts\nvar SetRangeCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"setrange\", ...cmd], opts);\n }\n};\n\n// pkg/commands/sinter.ts\nvar SInterCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"sinter\", ...cmd], opts);\n }\n};\n\n// pkg/commands/sintercard.ts\nvar SInterCardCommand = class extends Command {\n constructor(cmd, cmdOpts) {\n const [keys, opts] = cmd;\n const command = [\"sintercard\", keys.length, ...keys];\n if (opts?.limit !== void 0) {\n command.push(\"LIMIT\", opts.limit);\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/sinterstore.ts\nvar SInterStoreCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"sinterstore\", ...cmd], opts);\n }\n};\n\n// pkg/commands/sismember.ts\nvar SIsMemberCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"sismember\", ...cmd], opts);\n }\n};\n\n// pkg/commands/smembers.ts\nvar SMembersCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"smembers\", ...cmd], opts);\n }\n};\n\n// pkg/commands/smismember.ts\nvar SMIsMemberCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"smismember\", cmd[0], ...cmd[1]], opts);\n }\n};\n\n// pkg/commands/smove.ts\nvar SMoveCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"smove\", ...cmd], opts);\n }\n};\n\n// pkg/commands/spop.ts\nvar SPopCommand = class extends Command {\n constructor([key, count], opts) {\n const command = [\"spop\", key];\n if (typeof count === \"number\") {\n command.push(count);\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/srandmember.ts\nvar SRandMemberCommand = class extends Command {\n constructor([key, count], opts) {\n const command = [\"srandmember\", key];\n if (typeof count === \"number\") {\n command.push(count);\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/srem.ts\nvar SRemCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"srem\", ...cmd], opts);\n }\n};\n\n// pkg/commands/sscan.ts\nvar SScanCommand = class extends Command {\n constructor([key, cursor, opts], cmdOpts) {\n const command = [\"sscan\", key, cursor];\n if (opts?.match) {\n command.push(\"match\", opts.match);\n }\n if (typeof opts?.count === \"number\") {\n command.push(\"count\", opts.count);\n }\n super(command, {\n deserialize: deserializeScanResponse,\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/strlen.ts\nvar StrLenCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"strlen\", ...cmd], opts);\n }\n};\n\n// pkg/commands/sunion.ts\nvar SUnionCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"sunion\", ...cmd], opts);\n }\n};\n\n// pkg/commands/sunionstore.ts\nvar SUnionStoreCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"sunionstore\", ...cmd], opts);\n }\n};\n\n// pkg/commands/time.ts\nvar TimeCommand = class extends Command {\n constructor(opts) {\n super([\"time\"], opts);\n }\n};\n\n// pkg/commands/touch.ts\nvar TouchCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"touch\", ...cmd], opts);\n }\n};\n\n// pkg/commands/ttl.ts\nvar TtlCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"ttl\", ...cmd], opts);\n }\n};\n\n// pkg/commands/type.ts\nvar TypeCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"type\", ...cmd], opts);\n }\n};\n\n// pkg/commands/unlink.ts\nvar UnlinkCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"unlink\", ...cmd], opts);\n }\n};\n\n// pkg/commands/xack.ts\nvar XAckCommand = class extends Command {\n constructor([key, group, id], opts) {\n const ids = Array.isArray(id) ? [...id] : [id];\n super([\"XACK\", key, group, ...ids], opts);\n }\n};\n\n// pkg/commands/xackdel.ts\nvar XAckDelCommand = class extends Command {\n constructor([key, group, opts, ...ids], cmdOpts) {\n const command = [\"XACKDEL\", key, group];\n command.push(opts.toUpperCase(), \"IDS\", ids.length, ...ids);\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/xadd.ts\nvar XAddCommand = class extends Command {\n constructor([key, id, entries, opts], commandOptions) {\n const command = [\"XADD\", key];\n if (opts) {\n if (opts.nomkStream) {\n command.push(\"NOMKSTREAM\");\n }\n if (opts.trim) {\n command.push(opts.trim.type, opts.trim.comparison, opts.trim.threshold);\n if (opts.trim.limit !== void 0) {\n command.push(\"LIMIT\", opts.trim.limit);\n }\n }\n }\n command.push(id);\n for (const [k, v] of Object.entries(entries)) {\n command.push(k, v);\n }\n super(command, commandOptions);\n }\n};\n\n// pkg/commands/xautoclaim.ts\nvar XAutoClaim = class extends Command {\n constructor([key, group, consumer, minIdleTime, start, options], opts) {\n const commands = [];\n if (options?.count) {\n commands.push(\"COUNT\", options.count);\n }\n if (options?.justId) {\n commands.push(\"JUSTID\");\n }\n super([\"XAUTOCLAIM\", key, group, consumer, minIdleTime, start, ...commands], opts);\n }\n};\n\n// pkg/commands/xclaim.ts\nvar XClaimCommand = class extends Command {\n constructor([key, group, consumer, minIdleTime, id, options], opts) {\n const ids = Array.isArray(id) ? [...id] : [id];\n const commands = [];\n if (options?.idleMS) {\n commands.push(\"IDLE\", options.idleMS);\n }\n if (options?.idleMS) {\n commands.push(\"TIME\", options.timeMS);\n }\n if (options?.retryCount) {\n commands.push(\"RETRYCOUNT\", options.retryCount);\n }\n if (options?.force) {\n commands.push(\"FORCE\");\n }\n if (options?.justId) {\n commands.push(\"JUSTID\");\n }\n if (options?.lastId) {\n commands.push(\"LASTID\", options.lastId);\n }\n super([\"XCLAIM\", key, group, consumer, minIdleTime, ...ids, ...commands], opts);\n }\n};\n\n// pkg/commands/xdel.ts\nvar XDelCommand = class extends Command {\n constructor([key, ids], opts) {\n const cmds = Array.isArray(ids) ? [...ids] : [ids];\n super([\"XDEL\", key, ...cmds], opts);\n }\n};\n\n// pkg/commands/xdelex.ts\nvar XDelExCommand = class extends Command {\n constructor([key, opts, ...ids], cmdOpts) {\n const command = [\"XDELEX\", key];\n if (opts) {\n command.push(opts.toUpperCase());\n }\n command.push(\"IDS\", ids.length, ...ids);\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/xgroup.ts\nvar XGroupCommand = class extends Command {\n constructor([key, opts], commandOptions) {\n const command = [\"XGROUP\"];\n switch (opts.type) {\n case \"CREATE\": {\n command.push(\"CREATE\", key, opts.group, opts.id);\n if (opts.options) {\n if (opts.options.MKSTREAM) {\n command.push(\"MKSTREAM\");\n }\n if (opts.options.ENTRIESREAD !== void 0) {\n command.push(\"ENTRIESREAD\", opts.options.ENTRIESREAD.toString());\n }\n }\n break;\n }\n case \"CREATECONSUMER\": {\n command.push(\"CREATECONSUMER\", key, opts.group, opts.consumer);\n break;\n }\n case \"DELCONSUMER\": {\n command.push(\"DELCONSUMER\", key, opts.group, opts.consumer);\n break;\n }\n case \"DESTROY\": {\n command.push(\"DESTROY\", key, opts.group);\n break;\n }\n case \"SETID\": {\n command.push(\"SETID\", key, opts.group, opts.id);\n if (opts.options?.ENTRIESREAD !== void 0) {\n command.push(\"ENTRIESREAD\", opts.options.ENTRIESREAD.toString());\n }\n break;\n }\n default: {\n throw new Error(\"Invalid XGROUP\");\n }\n }\n super(command, commandOptions);\n }\n};\n\n// pkg/commands/xinfo.ts\nvar XInfoCommand = class extends Command {\n constructor([key, options], opts) {\n const cmds = [];\n if (options.type === \"CONSUMERS\") {\n cmds.push(\"CONSUMERS\", key, options.group);\n } else {\n cmds.push(\"GROUPS\", key);\n }\n super([\"XINFO\", ...cmds], opts);\n }\n};\n\n// pkg/commands/xlen.ts\nvar XLenCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"XLEN\", ...cmd], opts);\n }\n};\n\n// pkg/commands/xpending.ts\nvar XPendingCommand = class extends Command {\n constructor([key, group, start, end, count, options], opts) {\n const consumers = options?.consumer === void 0 ? [] : Array.isArray(options.consumer) ? [...options.consumer] : [options.consumer];\n super(\n [\n \"XPENDING\",\n key,\n group,\n ...options?.idleTime ? [\"IDLE\", options.idleTime] : [],\n start,\n end,\n count,\n ...consumers\n ],\n opts\n );\n }\n};\n\n// pkg/commands/xrange.ts\nfunction deserialize6(result) {\n const obj = {};\n for (const e of result) {\n for (let i = 0; i < e.length; i += 2) {\n const streamId = e[i];\n const entries = e[i + 1];\n if (!(streamId in obj)) {\n obj[streamId] = {};\n }\n for (let j = 0; j < entries.length; j += 2) {\n const field = entries[j];\n const value = entries[j + 1];\n try {\n obj[streamId][field] = parseJSON(value);\n } catch {\n obj[streamId][field] = value;\n }\n }\n }\n }\n return obj;\n}\nvar XRangeCommand = class extends Command {\n constructor([key, start, end, count], opts) {\n const command = [\"XRANGE\", key, start, end];\n if (typeof count === \"number\") {\n command.push(\"COUNT\", count);\n }\n super(command, {\n deserialize: (result) => deserialize6(result),\n ...opts\n });\n }\n};\n\n// pkg/commands/xread.ts\nvar UNBALANCED_XREAD_ERR = \"ERR Unbalanced XREAD list of streams: for each stream key an ID or '$' must be specified\";\nvar XReadCommand = class extends Command {\n constructor([key, id, options], opts) {\n if (Array.isArray(key) && Array.isArray(id) && key.length !== id.length) {\n throw new Error(UNBALANCED_XREAD_ERR);\n }\n const commands = [];\n if (typeof options?.count === \"number\") {\n commands.push(\"COUNT\", options.count);\n }\n if (typeof options?.blockMS === \"number\") {\n commands.push(\"BLOCK\", options.blockMS);\n }\n commands.push(\n \"STREAMS\",\n ...Array.isArray(key) ? [...key] : [key],\n ...Array.isArray(id) ? [...id] : [id]\n );\n super([\"XREAD\", ...commands], opts);\n }\n};\n\n// pkg/commands/xreadgroup.ts\nvar UNBALANCED_XREADGROUP_ERR = \"ERR Unbalanced XREADGROUP list of streams: for each stream key an ID or '$' must be specified\";\nvar XReadGroupCommand = class extends Command {\n constructor([group, consumer, key, id, options], opts) {\n if (Array.isArray(key) && Array.isArray(id) && key.length !== id.length) {\n throw new Error(UNBALANCED_XREADGROUP_ERR);\n }\n const commands = [];\n if (typeof options?.count === \"number\") {\n commands.push(\"COUNT\", options.count);\n }\n if (typeof options?.blockMS === \"number\") {\n commands.push(\"BLOCK\", options.blockMS);\n }\n if (typeof options?.NOACK === \"boolean\" && options.NOACK) {\n commands.push(\"NOACK\");\n }\n commands.push(\n \"STREAMS\",\n ...Array.isArray(key) ? [...key] : [key],\n ...Array.isArray(id) ? [...id] : [id]\n );\n super([\"XREADGROUP\", \"GROUP\", group, consumer, ...commands], opts);\n }\n};\n\n// pkg/commands/xrevrange.ts\nvar XRevRangeCommand = class extends Command {\n constructor([key, end, start, count], opts) {\n const command = [\"XREVRANGE\", key, end, start];\n if (typeof count === \"number\") {\n command.push(\"COUNT\", count);\n }\n super(command, {\n deserialize: (result) => deserialize7(result),\n ...opts\n });\n }\n};\nfunction deserialize7(result) {\n const obj = {};\n for (const e of result) {\n for (let i = 0; i < e.length; i += 2) {\n const streamId = e[i];\n const entries = e[i + 1];\n if (!(streamId in obj)) {\n obj[streamId] = {};\n }\n for (let j = 0; j < entries.length; j += 2) {\n const field = entries[j];\n const value = entries[j + 1];\n try {\n obj[streamId][field] = parseJSON(value);\n } catch {\n obj[streamId][field] = value;\n }\n }\n }\n }\n return obj;\n}\n\n// pkg/commands/xtrim.ts\nvar XTrimCommand = class extends Command {\n constructor([key, options], opts) {\n const { limit, strategy, threshold, exactness = \"~\" } = options;\n super([\"XTRIM\", key, strategy, exactness, threshold, ...limit ? [\"LIMIT\", limit] : []], opts);\n }\n};\n\n// pkg/commands/zadd.ts\nvar ZAddCommand = class extends Command {\n constructor([key, arg1, ...arg2], opts) {\n const command = [\"zadd\", key];\n if (\"nx\" in arg1 && arg1.nx) {\n command.push(\"nx\");\n } else if (\"xx\" in arg1 && arg1.xx) {\n command.push(\"xx\");\n }\n if (\"ch\" in arg1 && arg1.ch) {\n command.push(\"ch\");\n }\n if (\"incr\" in arg1 && arg1.incr) {\n command.push(\"incr\");\n }\n if (\"lt\" in arg1 && arg1.lt) {\n command.push(\"lt\");\n } else if (\"gt\" in arg1 && arg1.gt) {\n command.push(\"gt\");\n }\n if (\"score\" in arg1 && \"member\" in arg1) {\n command.push(arg1.score, arg1.member);\n }\n command.push(...arg2.flatMap(({ score, member }) => [score, member]));\n super(command, opts);\n }\n};\n\n// pkg/commands/zcard.ts\nvar ZCardCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zcard\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zcount.ts\nvar ZCountCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zcount\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zincrby.ts\nvar ZIncrByCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zincrby\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zinterstore.ts\nvar ZInterStoreCommand = class extends Command {\n constructor([destination, numKeys, keyOrKeys, opts], cmdOpts) {\n const command = [\"zinterstore\", destination, numKeys];\n if (Array.isArray(keyOrKeys)) {\n command.push(...keyOrKeys);\n } else {\n command.push(keyOrKeys);\n }\n if (opts) {\n if (\"weights\" in opts && opts.weights) {\n command.push(\"weights\", ...opts.weights);\n } else if (\"weight\" in opts && typeof opts.weight === \"number\") {\n command.push(\"weights\", opts.weight);\n }\n if (\"aggregate\" in opts) {\n command.push(\"aggregate\", opts.aggregate);\n }\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/zlexcount.ts\nvar ZLexCountCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zlexcount\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zpopmax.ts\nvar ZPopMaxCommand = class extends Command {\n constructor([key, count], opts) {\n const command = [\"zpopmax\", key];\n if (typeof count === \"number\") {\n command.push(count);\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/zpopmin.ts\nvar ZPopMinCommand = class extends Command {\n constructor([key, count], opts) {\n const command = [\"zpopmin\", key];\n if (typeof count === \"number\") {\n command.push(count);\n }\n super(command, opts);\n }\n};\n\n// pkg/commands/zrange.ts\nvar ZRangeCommand = class extends Command {\n constructor([key, min, max, opts], cmdOpts) {\n const command = [\"zrange\", key, min, max];\n if (opts?.byScore) {\n command.push(\"byscore\");\n }\n if (opts?.byLex) {\n command.push(\"bylex\");\n }\n if (opts?.rev) {\n command.push(\"rev\");\n }\n if (opts?.count !== void 0 && opts.offset !== void 0) {\n command.push(\"limit\", opts.offset, opts.count);\n }\n if (opts?.withScores) {\n command.push(\"withscores\");\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/zrank.ts\nvar ZRankCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zrank\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zrem.ts\nvar ZRemCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zrem\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zremrangebylex.ts\nvar ZRemRangeByLexCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zremrangebylex\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zremrangebyrank.ts\nvar ZRemRangeByRankCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zremrangebyrank\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zremrangebyscore.ts\nvar ZRemRangeByScoreCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zremrangebyscore\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zrevrank.ts\nvar ZRevRankCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zrevrank\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zscan.ts\nvar ZScanCommand = class extends Command {\n constructor([key, cursor, opts], cmdOpts) {\n const command = [\"zscan\", key, cursor];\n if (opts?.match) {\n command.push(\"match\", opts.match);\n }\n if (typeof opts?.count === \"number\") {\n command.push(\"count\", opts.count);\n }\n super(command, {\n deserialize: deserializeScanResponse,\n ...cmdOpts\n });\n }\n};\n\n// pkg/commands/zscore.ts\nvar ZScoreCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zscore\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zunion.ts\nvar ZUnionCommand = class extends Command {\n constructor([numKeys, keyOrKeys, opts], cmdOpts) {\n const command = [\"zunion\", numKeys];\n if (Array.isArray(keyOrKeys)) {\n command.push(...keyOrKeys);\n } else {\n command.push(keyOrKeys);\n }\n if (opts) {\n if (\"weights\" in opts && opts.weights) {\n command.push(\"weights\", ...opts.weights);\n } else if (\"weight\" in opts && typeof opts.weight === \"number\") {\n command.push(\"weights\", opts.weight);\n }\n if (\"aggregate\" in opts) {\n command.push(\"aggregate\", opts.aggregate);\n }\n if (opts.withScores) {\n command.push(\"withscores\");\n }\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/zunionstore.ts\nvar ZUnionStoreCommand = class extends Command {\n constructor([destination, numKeys, keyOrKeys, opts], cmdOpts) {\n const command = [\"zunionstore\", destination, numKeys];\n if (Array.isArray(keyOrKeys)) {\n command.push(...keyOrKeys);\n } else {\n command.push(keyOrKeys);\n }\n if (opts) {\n if (\"weights\" in opts && opts.weights) {\n command.push(\"weights\", ...opts.weights);\n } else if (\"weight\" in opts && typeof opts.weight === \"number\") {\n command.push(\"weights\", opts.weight);\n }\n if (\"aggregate\" in opts) {\n command.push(\"aggregate\", opts.aggregate);\n }\n }\n super(command, cmdOpts);\n }\n};\n\n// pkg/commands/zdiffstore.ts\nvar ZDiffStoreCommand = class extends Command {\n constructor(cmd, opts) {\n super([\"zdiffstore\", ...cmd], opts);\n }\n};\n\n// pkg/commands/zmscore.ts\nvar ZMScoreCommand = class extends Command {\n constructor(cmd, opts) {\n const [key, members] = cmd;\n super([\"zmscore\", key, ...members], opts);\n }\n};\n\n// pkg/pipeline.ts\nvar Pipeline = class {\n client;\n commands;\n commandOptions;\n multiExec;\n constructor(opts) {\n this.client = opts.client;\n this.commands = [];\n this.commandOptions = opts.commandOptions;\n this.multiExec = opts.multiExec ?? false;\n if (this.commandOptions?.latencyLogging) {\n const originalExec = this.exec.bind(this);\n this.exec = async (options) => {\n const start = performance.now();\n const result = await (options ? originalExec(options) : originalExec());\n const end = performance.now();\n const loggerResult = (end - start).toFixed(2);\n console.log(\n `Latency for \\x1B[38;2;19;185;39m${this.multiExec ? [\"MULTI-EXEC\"] : [\"PIPELINE\"].toString().toUpperCase()}\\x1B[0m: \\x1B[38;2;0;255;255m${loggerResult} ms\\x1B[0m`\n );\n return result;\n };\n }\n }\n exec = async (options) => {\n if (this.commands.length === 0) {\n throw new Error(\"Pipeline is empty\");\n }\n const path = this.multiExec ? [\"multi-exec\"] : [\"pipeline\"];\n const res = await this.client.request({\n path,\n body: Object.values(this.commands).map((c) => c.command)\n });\n return options?.keepErrors ? res.map(({ error, result }, i) => {\n return {\n error,\n result: this.commands[i].deserialize(result)\n };\n }) : res.map(({ error, result }, i) => {\n if (error) {\n throw new UpstashError(\n `Command ${i + 1} [ ${this.commands[i].command[0]} ] failed: ${error}`\n );\n }\n return this.commands[i].deserialize(result);\n });\n };\n /**\n * Returns the length of pipeline before the execution\n */\n length() {\n return this.commands.length;\n }\n /**\n * Pushes a command into the pipeline and returns a chainable instance of the\n * pipeline\n */\n chain(command) {\n this.commands.push(command);\n return this;\n }\n /**\n * @see https://redis.io/commands/append\n * @see node_modules/@upstash/redis/docs/commands/string/append.mdx\n */\n append = (...args) => this.chain(new AppendCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arcount\n * @see node_modules/@upstash/redis/docs/commands/array/arcount.mdx\n */\n arcount = (...args) => this.chain(new ArCountCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/ardel\n * @see node_modules/@upstash/redis/docs/commands/array/ardel.mdx\n */\n ardel = (...args) => this.chain(new ArDelCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/ardelrange\n * @see node_modules/@upstash/redis/docs/commands/array/ardelrange.mdx\n */\n ardelrange = (...args) => this.chain(new ArDelRangeCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arget\n * @see node_modules/@upstash/redis/docs/commands/array/arget.mdx\n */\n arget = (...args) => this.chain(new ArGetCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/argetrange\n * @see node_modules/@upstash/redis/docs/commands/array/argetrange.mdx\n */\n argetrange = (...args) => this.chain(new ArGetRangeCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/argrep\n * @see node_modules/@upstash/redis/docs/commands/array/argrep.mdx\n */\n argrep = (key, start, end, opts) => this.chain(new ArGrepCommand([key, start, end, opts], this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arinfo\n * @see node_modules/@upstash/redis/docs/commands/array/arinfo.mdx\n */\n arinfo = (...args) => this.chain(new ArInfoCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arinsert\n * @see node_modules/@upstash/redis/docs/commands/array/arinsert.mdx\n */\n arinsert = (key, ...values) => this.chain(new ArInsertCommand([key, ...values], this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arlastitems\n * @see node_modules/@upstash/redis/docs/commands/array/arlastitems.mdx\n */\n arlastitems = (...args) => this.chain(new ArLastItemsCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arlen\n * @see node_modules/@upstash/redis/docs/commands/array/arlen.mdx\n */\n arlen = (...args) => this.chain(new ArLenCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/armget\n * @see node_modules/@upstash/redis/docs/commands/array/armget.mdx\n */\n armget = (...args) => this.chain(new ArMGetCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/armset\n * @see node_modules/@upstash/redis/docs/commands/array/armset.mdx\n */\n armset = (key, values) => this.chain(new ArMSetCommand([key, values], this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arnext\n * @see node_modules/@upstash/redis/docs/commands/array/arnext.mdx\n */\n arnext = (...args) => this.chain(new ArNextCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arop\n * @see node_modules/@upstash/redis/docs/commands/array/arop.mdx\n */\n arop = (key, start, end, operation) => this.chain(new ArOpCommand([key, start, end, operation], this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arring\n * @see node_modules/@upstash/redis/docs/commands/array/arring.mdx\n */\n arring = (key, size, ...values) => this.chain(new ArRingCommand([key, size, ...values], this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arscan\n * @see node_modules/@upstash/redis/docs/commands/array/arscan.mdx\n */\n arscan = (...args) => this.chain(new ArScanCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arseek\n * @see node_modules/@upstash/redis/docs/commands/array/arseek.mdx\n */\n arseek = (...args) => this.chain(new ArSeekCommand(args, this.commandOptions));\n /**\n * @see https://upstash.com/docs/redis/commands/array/arset\n * @see node_modules/@upstash/redis/docs/commands/array/arset.mdx\n */\n arset = (key, index, ...values) => this.chain(new ArSetCommand([key, index, ...values], this.commandOptions));\n /**\n * @see https://redis.io/commands/bitcount\n * @see node_modules/@upstash/redis/docs/commands/bitmap/bitcount.mdx\n */\n bitcount = (...args) => this.chain(new BitCountCommand(args, this.commandOptions));\n /**\n * Returns an instance that can be used to execute `BITFIELD` commands on one key.\n *\n * @example\n * ```typescript\n * redis.set(\"mykey\", 0);\n * const result = await redis.pipeline()\n * .bitfield(\"mykey\")\n * .set(\"u4\", 0, 16)\n * .incr(\"u4\", \"#1\", 1)\n * .exec();\n * console.log(result); // [[0, 1]]\n * ```\n *\n * @see https://redis.io/commands/bitfield\n */\n bitfield = (...args) => new BitFieldCommand(args, this.client, this.commandOptions, this.chain.bind(this));\n /**\n * @see https://redis.io/commands/bitop\n * @see node_modules/@upstash/redis/docs/commands/bitmap/bitop.mdx\n */\n bitop = (op, destinationKey, sourceKey, ...sourceKeys) => this.chain(\n new BitOpCommand([op, destinationKey, sourceKey, ...sourceKeys], this.commandOptions)\n );\n /**\n * @see https://redis.io/commands/bitpos\n * @see node_modules/@upstash/redis/docs/commands/bitmap/bitpos.mdx\n */\n bitpos = (...args) => this.chain(new BitPosCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/client-setinfo\n * @see node_modules/@upstash/redis/docs/commands/connection/client_setinfo.mdx\n */\n clientSetinfo = (...args) => this.chain(new ClientSetInfoCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/copy\n */\n copy = (...args) => this.chain(new CopyCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zdiffstore\n * @see node_modules/@upstash/redis/docs/commands/zset/zdiffstore.mdx\n */\n zdiffstore = (...args) => this.chain(new ZDiffStoreCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/dbsize\n * @see node_modules/@upstash/redis/docs/commands/server/dbsize.mdx\n */\n dbsize = () => this.chain(new DBSizeCommand(this.commandOptions));\n /**\n * @see https://redis.io/commands/decr\n * @see node_modules/@upstash/redis/docs/commands/string/decr.mdx\n */\n decr = (...args) => this.chain(new DecrCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/decrby\n * @see node_modules/@upstash/redis/docs/commands/string/decrby.mdx\n */\n decrby = (...args) => this.chain(new DecrByCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/del\n * @see node_modules/@upstash/redis/docs/commands/generic/del.mdx\n */\n del = (...args) => this.chain(new DelCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/echo\n * @see node_modules/@upstash/redis/docs/commands/auth/echo.mdx\n */\n echo = (...args) => this.chain(new EchoCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/eval_ro\n * @see node_modules/@upstash/redis/docs/commands/scripts/eval_ro.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n evalRo = (...args) => this.chain(new EvalROCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/eval\n * @see node_modules/@upstash/redis/docs/commands/scripts/eval.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n eval = (...args) => this.chain(new EvalCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/evalsha_ro\n * @see node_modules/@upstash/redis/docs/commands/scripts/evalsha_ro.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n evalshaRo = (...args) => this.chain(new EvalshaROCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/evalsha\n * @see node_modules/@upstash/redis/docs/commands/scripts/evalsha.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n evalsha = (...args) => this.chain(new EvalshaCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/exists\n * @see node_modules/@upstash/redis/docs/commands/generic/exists.mdx\n */\n exists = (...args) => this.chain(new ExistsCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/expire\n * @see node_modules/@upstash/redis/docs/commands/generic/expire.mdx\n */\n expire = (...args) => this.chain(new ExpireCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/expireat\n * @see node_modules/@upstash/redis/docs/commands/generic/expireat.mdx\n */\n expireat = (...args) => this.chain(new ExpireAtCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/flushall\n * @see node_modules/@upstash/redis/docs/commands/server/flushall.mdx\n */\n flushall = (args) => this.chain(new FlushAllCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/flushdb\n * @see node_modules/@upstash/redis/docs/commands/server/flushdb.mdx\n */\n flushdb = (...args) => this.chain(new FlushDBCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/geoadd\n */\n geoadd = (...args) => this.chain(new GeoAddCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/geodist\n */\n geodist = (...args) => this.chain(new GeoDistCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/geopos\n */\n geopos = (...args) => this.chain(new GeoPosCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/geohash\n */\n geohash = (...args) => this.chain(new GeoHashCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/geosearch\n */\n geosearch = (...args) => this.chain(new GeoSearchCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/geosearchstore\n */\n geosearchstore = (...args) => this.chain(new GeoSearchStoreCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/get\n * @see node_modules/@upstash/redis/docs/commands/string/get.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n get = (...args) => this.chain(new GetCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/getbit\n * @see node_modules/@upstash/redis/docs/commands/bitmap/getbit.mdx\n */\n getbit = (...args) => this.chain(new GetBitCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/getdel\n * @see node_modules/@upstash/redis/docs/commands/string/getdel.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n getdel = (...args) => this.chain(new GetDelCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/getex\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n getex = (...args) => this.chain(new GetExCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/getrange\n * @see node_modules/@upstash/redis/docs/commands/string/getrange.mdx\n */\n getrange = (...args) => this.chain(new GetRangeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/getset\n * @see node_modules/@upstash/redis/docs/commands/string/getset.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n getset = (key, value) => this.chain(new GetSetCommand([key, value], this.commandOptions));\n /**\n * @see https://redis.io/commands/hdel\n * @see node_modules/@upstash/redis/docs/commands/hash/hdel.mdx\n */\n hdel = (...args) => this.chain(new HDelCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hexists\n * @see node_modules/@upstash/redis/docs/commands/hash/hexists.mdx\n */\n hexists = (...args) => this.chain(new HExistsCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hexpire\n * @see node_modules/@upstash/redis/docs/commands/hash/hexpire.mdx\n */\n hexpire = (...args) => this.chain(new HExpireCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hexpireat\n * @see node_modules/@upstash/redis/docs/commands/hash/hexpireat.mdx\n */\n hexpireat = (...args) => this.chain(new HExpireAtCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hexpiretime\n * @see node_modules/@upstash/redis/docs/commands/hash/hexpiretime.mdx\n */\n hexpiretime = (...args) => this.chain(new HExpireTimeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/httl\n * @see node_modules/@upstash/redis/docs/commands/hash/httl.mdx\n */\n httl = (...args) => this.chain(new HTtlCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hpexpire\n * @see node_modules/@upstash/redis/docs/commands/hash/hpexpire.mdx\n */\n hpexpire = (...args) => this.chain(new HPExpireCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hpexpireat\n * @see node_modules/@upstash/redis/docs/commands/hash/hpexpireat.mdx\n */\n hpexpireat = (...args) => this.chain(new HPExpireAtCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hpexpiretime\n * @see node_modules/@upstash/redis/docs/commands/hash/hpexpiretime.mdx\n */\n hpexpiretime = (...args) => this.chain(new HPExpireTimeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hpttl\n * @see node_modules/@upstash/redis/docs/commands/hash/hpttl.mdx\n */\n hpttl = (...args) => this.chain(new HPTtlCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hpersist\n * @see node_modules/@upstash/redis/docs/commands/hash/hpersist.mdx\n */\n hpersist = (...args) => this.chain(new HPersistCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hget\n * @see node_modules/@upstash/redis/docs/commands/hash/hget.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n hget = (...args) => this.chain(new HGetCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hgetall\n * @see node_modules/@upstash/redis/docs/commands/hash/hgetall.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, hgetall returns a flat array instead, such as\n * [\"text\", \"123\", \"version\", \"1\"], and [] for a missing key.\n */\n hgetall = (...args) => this.chain(new HGetAllCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hgetdel\n * @see node_modules/@upstash/redis/docs/commands/hash/hgetdel.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, hgetdel returns an array of values in field order instead,\n * such as [\"123\", null], with null for each field when the key is missing.\n */\n hgetdel = (...args) => this.chain(new HGetDelCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hgetex\n * @see node_modules/@upstash/redis/docs/commands/hash/hgetex.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, hgetex returns an array of values in field order instead,\n * such as [\"123\", null], with null for each field when the key is missing.\n */\n hgetex = (...args) => this.chain(new HGetExCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hincrby\n * @see node_modules/@upstash/redis/docs/commands/hash/hincrby.mdx\n */\n hincrby = (...args) => this.chain(new HIncrByCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hincrbyfloat\n * @see node_modules/@upstash/redis/docs/commands/hash/hincrbyfloat.mdx\n */\n hincrbyfloat = (...args) => this.chain(new HIncrByFloatCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hkeys\n * @see node_modules/@upstash/redis/docs/commands/hash/hkeys.mdx\n */\n hkeys = (...args) => this.chain(new HKeysCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hlen\n * @see node_modules/@upstash/redis/docs/commands/hash/hlen.mdx\n */\n hlen = (...args) => this.chain(new HLenCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hmget\n * @see node_modules/@upstash/redis/docs/commands/hash/hmget.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, hmget returns an array of values in field order instead,\n * such as [\"123\", null], with null for each field when the key is missing.\n */\n hmget = (...args) => this.chain(new HMGetCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hmset\n */\n hmset = (key, kv) => this.chain(new HMSetCommand([key, kv], this.commandOptions));\n /**\n * @see https://redis.io/commands/hrandfield\n * @see node_modules/@upstash/redis/docs/commands/hash/hrandfield.mdx\n */\n hrandfield = (key, count, withValues) => this.chain(new HRandFieldCommand([key, count, withValues], this.commandOptions));\n /**\n * @see https://redis.io/commands/hscan\n * @see node_modules/@upstash/redis/docs/commands/hash/hscan.mdx\n */\n hscan = (...args) => this.chain(new HScanCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hset\n * @see node_modules/@upstash/redis/docs/commands/hash/hset.mdx\n */\n hset = (key, kv) => this.chain(new HSetCommand([key, kv], this.commandOptions));\n /**\n * @see https://redis.io/commands/hsetex\n * @see node_modules/@upstash/redis/docs/commands/hash/hsetex.mdx\n */\n hsetex = (...args) => this.chain(new HSetExCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hsetnx\n * @see node_modules/@upstash/redis/docs/commands/hash/hsetnx.mdx\n */\n hsetnx = (key, field, value) => this.chain(new HSetNXCommand([key, field, value], this.commandOptions));\n /**\n * @see https://redis.io/commands/hstrlen\n * @see node_modules/@upstash/redis/docs/commands/hash/hstrlen.mdx\n */\n hstrlen = (...args) => this.chain(new HStrLenCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/hvals\n * @see node_modules/@upstash/redis/docs/commands/hash/hvals.mdx\n */\n hvals = (...args) => this.chain(new HValsCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/incr\n * @see node_modules/@upstash/redis/docs/commands/string/incr.mdx\n */\n incr = (...args) => this.chain(new IncrCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/incrby\n * @see node_modules/@upstash/redis/docs/commands/string/incrby.mdx\n */\n incrby = (...args) => this.chain(new IncrByCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/incrbyfloat\n * @see node_modules/@upstash/redis/docs/commands/string/incrbyfloat.mdx\n */\n incrbyfloat = (...args) => this.chain(new IncrByFloatCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/keys\n * @see node_modules/@upstash/redis/docs/commands/generic/keys.mdx\n */\n keys = (...args) => this.chain(new KeysCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/lindex\n * @see node_modules/@upstash/redis/docs/commands/list/lindex.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n lindex = (...args) => this.chain(new LIndexCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/linsert\n * @see node_modules/@upstash/redis/docs/commands/list/linsert.mdx\n */\n linsert = (key, direction, pivot, value) => this.chain(new LInsertCommand([key, direction, pivot, value], this.commandOptions));\n /**\n * @see https://redis.io/commands/llen\n * @see node_modules/@upstash/redis/docs/commands/list/llen.mdx\n */\n llen = (...args) => this.chain(new LLenCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/lmove\n * @see node_modules/@upstash/redis/docs/commands/list/lmove.mdx\n */\n lmove = (...args) => this.chain(new LMoveCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/lpop\n * @see node_modules/@upstash/redis/docs/commands/list/lpop.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n lpop = (...args) => this.chain(new LPopCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/lmpop\n */\n lmpop = (...args) => this.chain(new LmPopCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/lpos\n * @see node_modules/@upstash/redis/docs/commands/list/lpos.mdx\n */\n lpos = (...args) => this.chain(new LPosCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/lpush\n * @see node_modules/@upstash/redis/docs/commands/list/lpush.mdx\n */\n lpush = (key, ...elements) => this.chain(new LPushCommand([key, ...elements], this.commandOptions));\n /**\n * @see https://redis.io/commands/lpushx\n * @see node_modules/@upstash/redis/docs/commands/list/lpushx.mdx\n */\n lpushx = (key, ...elements) => this.chain(new LPushXCommand([key, ...elements], this.commandOptions));\n /**\n * @see https://redis.io/commands/lrange\n * @see node_modules/@upstash/redis/docs/commands/list/lrange.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n lrange = (...args) => this.chain(new LRangeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/lrem\n * @see node_modules/@upstash/redis/docs/commands/list/lrem.mdx\n */\n lrem = (key, count, value) => this.chain(new LRemCommand([key, count, value], this.commandOptions));\n /**\n * @see https://redis.io/commands/lset\n * @see node_modules/@upstash/redis/docs/commands/list/lset.mdx\n */\n lset = (key, index, value) => this.chain(new LSetCommand([key, index, value], this.commandOptions));\n /**\n * @see https://redis.io/commands/ltrim\n * @see node_modules/@upstash/redis/docs/commands/list/ltrim.mdx\n */\n ltrim = (...args) => this.chain(new LTrimCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/mget\n * @see node_modules/@upstash/redis/docs/commands/string/mget.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n mget = (...args) => this.chain(new MGetCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/mset\n * @see node_modules/@upstash/redis/docs/commands/string/mset.mdx\n */\n mset = (kv) => this.chain(new MSetCommand([kv], this.commandOptions));\n /**\n * @see https://redis.io/commands/msetnx\n * @see node_modules/@upstash/redis/docs/commands/string/msetnx.mdx\n */\n msetnx = (kv) => this.chain(new MSetNXCommand([kv], this.commandOptions));\n /**\n * @see https://redis.io/commands/persist\n * @see node_modules/@upstash/redis/docs/commands/generic/persist.mdx\n */\n persist = (...args) => this.chain(new PersistCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/pexpire\n * @see node_modules/@upstash/redis/docs/commands/generic/pexpire.mdx\n */\n pexpire = (...args) => this.chain(new PExpireCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/pexpireat\n * @see node_modules/@upstash/redis/docs/commands/generic/pexpireat.mdx\n */\n pexpireat = (...args) => this.chain(new PExpireAtCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/pfadd\n */\n pfadd = (...args) => this.chain(new PfAddCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/pfcount\n */\n pfcount = (...args) => this.chain(new PfCountCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/pfmerge\n */\n pfmerge = (...args) => this.chain(new PfMergeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/ping\n * @see node_modules/@upstash/redis/docs/commands/auth/ping.mdx\n */\n ping = (args) => this.chain(new PingCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/psetex\n */\n psetex = (key, ttl, value) => this.chain(new PSetEXCommand([key, ttl, value], this.commandOptions));\n /**\n * @see https://redis.io/commands/pttl\n * @see node_modules/@upstash/redis/docs/commands/generic/pttl.mdx\n */\n pttl = (...args) => this.chain(new PTtlCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/publish\n * @see node_modules/@upstash/redis/docs/commands/pubsub/publish.mdx\n */\n publish = (...args) => this.chain(new PublishCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/randomkey\n * @see node_modules/@upstash/redis/docs/commands/generic/randomkey.mdx\n */\n randomkey = () => this.chain(new RandomKeyCommand(this.commandOptions));\n /**\n * @see https://redis.io/commands/rename\n * @see node_modules/@upstash/redis/docs/commands/generic/rename.mdx\n */\n rename = (...args) => this.chain(new RenameCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/renamenx\n * @see node_modules/@upstash/redis/docs/commands/generic/renamenx.mdx\n */\n renamenx = (...args) => this.chain(new RenameNXCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/rpop\n * @see node_modules/@upstash/redis/docs/commands/list/rpop.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n rpop = (...args) => this.chain(new RPopCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/rpush\n * @see node_modules/@upstash/redis/docs/commands/list/rpush.mdx\n */\n rpush = (key, ...elements) => this.chain(new RPushCommand([key, ...elements], this.commandOptions));\n /**\n * @see https://redis.io/commands/rpushx\n * @see node_modules/@upstash/redis/docs/commands/list/rpushx.mdx\n */\n rpushx = (key, ...elements) => this.chain(new RPushXCommand([key, ...elements], this.commandOptions));\n /**\n * @see https://redis.io/commands/sadd\n * @see node_modules/@upstash/redis/docs/commands/set/sadd.mdx\n */\n sadd = (key, member, ...members) => this.chain(new SAddCommand([key, member, ...members], this.commandOptions));\n /**\n * @see https://redis.io/commands/scan\n * @see node_modules/@upstash/redis/docs/commands/generic/scan.mdx\n */\n scan = (...args) => this.chain(new ScanCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/scard\n * @see node_modules/@upstash/redis/docs/commands/set/scard.mdx\n */\n scard = (...args) => this.chain(new SCardCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/script-exists\n * @see node_modules/@upstash/redis/docs/commands/scripts/script_exists.mdx\n */\n scriptExists = (...args) => this.chain(new ScriptExistsCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/script-flush\n * @see node_modules/@upstash/redis/docs/commands/scripts/script_flush.mdx\n */\n scriptFlush = (...args) => this.chain(new ScriptFlushCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/script-load\n * @see node_modules/@upstash/redis/docs/commands/scripts/script_load.mdx\n */\n scriptLoad = (...args) => this.chain(new ScriptLoadCommand(args, this.commandOptions));\n /*)*\n * @see https://redis.io/commands/sdiff\n * @see node_modules/@upstash/redis/docs/commands/set/sdiff.mdx\n */\n sdiff = (...args) => this.chain(new SDiffCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/sdiffstore\n * @see node_modules/@upstash/redis/docs/commands/set/sdiffstore.mdx\n */\n sdiffstore = (...args) => this.chain(new SDiffStoreCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/set\n * @see node_modules/@upstash/redis/docs/commands/string/set.mdx\n */\n set = (key, value, opts) => this.chain(new SetCommand([key, value, opts], this.commandOptions));\n /**\n * @see https://redis.io/commands/setbit\n * @see node_modules/@upstash/redis/docs/commands/bitmap/setbit.mdx\n */\n setbit = (...args) => this.chain(new SetBitCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/setex\n */\n setex = (key, ttl, value) => this.chain(new SetExCommand([key, ttl, value], this.commandOptions));\n /**\n * @see https://redis.io/commands/setnx\n */\n setnx = (key, value) => this.chain(new SetNxCommand([key, value], this.commandOptions));\n /**\n * @see https://redis.io/commands/setrange\n * @see node_modules/@upstash/redis/docs/commands/string/setrange.mdx\n */\n setrange = (...args) => this.chain(new SetRangeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/sinter\n * @see node_modules/@upstash/redis/docs/commands/set/sinter.mdx\n */\n sinter = (...args) => this.chain(new SInterCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/sintercard\n */\n sintercard = (...args) => this.chain(new SInterCardCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/sinterstore\n * @see node_modules/@upstash/redis/docs/commands/set/sinterstore.mdx\n */\n sinterstore = (...args) => this.chain(new SInterStoreCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/sismember\n * @see node_modules/@upstash/redis/docs/commands/set/sismember.mdx\n */\n sismember = (key, member) => this.chain(new SIsMemberCommand([key, member], this.commandOptions));\n /**\n * @see https://redis.io/commands/smembers\n * @see node_modules/@upstash/redis/docs/commands/set/smembers.mdx\n */\n smembers = (...args) => this.chain(new SMembersCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/smismember\n * @see node_modules/@upstash/redis/docs/commands/set/smismember.mdx\n */\n smismember = (key, members) => this.chain(new SMIsMemberCommand([key, members], this.commandOptions));\n /**\n * @see https://redis.io/commands/smove\n * @see node_modules/@upstash/redis/docs/commands/set/smove.mdx\n */\n smove = (source, destination, member) => this.chain(new SMoveCommand([source, destination, member], this.commandOptions));\n /**\n * @see https://redis.io/commands/spop\n * @see node_modules/@upstash/redis/docs/commands/set/spop.mdx\n */\n spop = (...args) => this.chain(new SPopCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/srandmember\n * @see node_modules/@upstash/redis/docs/commands/set/srandmember.mdx\n */\n srandmember = (...args) => this.chain(new SRandMemberCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/srem\n * @see node_modules/@upstash/redis/docs/commands/set/srem.mdx\n */\n srem = (key, ...members) => this.chain(new SRemCommand([key, ...members], this.commandOptions));\n /**\n * @see https://redis.io/commands/sscan\n * @see node_modules/@upstash/redis/docs/commands/set/sscan.mdx\n */\n sscan = (...args) => this.chain(new SScanCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/strlen\n * @see node_modules/@upstash/redis/docs/commands/string/strlen.mdx\n */\n strlen = (...args) => this.chain(new StrLenCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/sunion\n * @see node_modules/@upstash/redis/docs/commands/set/sunion.mdx\n */\n sunion = (...args) => this.chain(new SUnionCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/sunionstore\n * @see node_modules/@upstash/redis/docs/commands/set/sunionstore.mdx\n */\n sunionstore = (...args) => this.chain(new SUnionStoreCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/time\n */\n time = () => this.chain(new TimeCommand(this.commandOptions));\n /**\n * @see https://redis.io/commands/touch\n * @see node_modules/@upstash/redis/docs/commands/generic/touch.mdx\n */\n touch = (...args) => this.chain(new TouchCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/ttl\n * @see node_modules/@upstash/redis/docs/commands/generic/ttl.mdx\n */\n ttl = (...args) => this.chain(new TtlCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/type\n * @see node_modules/@upstash/redis/docs/commands/generic/type.mdx\n */\n type = (...args) => this.chain(new TypeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/unlink\n * @see node_modules/@upstash/redis/docs/commands/generic/unlink.mdx\n */\n unlink = (...args) => this.chain(new UnlinkCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zadd\n * @see node_modules/@upstash/redis/docs/commands/zset/zadd.mdx\n */\n zadd = (...args) => {\n if (\"score\" in args[1]) {\n return this.chain(\n new ZAddCommand([args[0], args[1], ...args.slice(2)], this.commandOptions)\n );\n }\n return this.chain(\n new ZAddCommand(\n [args[0], args[1], ...args.slice(2)],\n this.commandOptions\n )\n );\n };\n /**\n * @see https://redis.io/commands/xadd\n * @see node_modules/@upstash/redis/docs/commands/stream/xadd.mdx\n */\n xadd = (...args) => this.chain(new XAddCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xack\n * @see node_modules/@upstash/redis/docs/commands/stream/xack.mdx\n */\n xack = (...args) => this.chain(new XAckCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xackdel\n * @see node_modules/@upstash/redis/docs/commands/stream/xackdel.mdx\n */\n xackdel = (...args) => this.chain(new XAckDelCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xdel\n * @see node_modules/@upstash/redis/docs/commands/stream/xdel.mdx\n */\n xdel = (...args) => this.chain(new XDelCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xdelex\n * @see node_modules/@upstash/redis/docs/commands/stream/xdelex.mdx\n */\n xdelex = (...args) => this.chain(new XDelExCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xgroup\n * @see node_modules/@upstash/redis/docs/commands/stream/xgroup.mdx\n */\n xgroup = (...args) => this.chain(new XGroupCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xread\n * @see node_modules/@upstash/redis/docs/commands/stream/xread.mdx\n */\n xread = (...args) => this.chain(new XReadCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xreadgroup\n * @see node_modules/@upstash/redis/docs/commands/stream/xreadgroup.mdx\n */\n xreadgroup = (...args) => this.chain(new XReadGroupCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xinfo\n * @see node_modules/@upstash/redis/docs/commands/stream/xinfo.mdx\n */\n xinfo = (...args) => this.chain(new XInfoCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xlen\n * @see node_modules/@upstash/redis/docs/commands/stream/xlen.mdx\n */\n xlen = (...args) => this.chain(new XLenCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xpending\n * @see node_modules/@upstash/redis/docs/commands/stream/xpending.mdx\n */\n xpending = (...args) => this.chain(new XPendingCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xclaim\n * @see node_modules/@upstash/redis/docs/commands/stream/xclaim.mdx\n */\n xclaim = (...args) => this.chain(new XClaimCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xautoclaim\n * @see node_modules/@upstash/redis/docs/commands/stream/xautoclaim.mdx\n */\n xautoclaim = (...args) => this.chain(new XAutoClaim(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xtrim\n * @see node_modules/@upstash/redis/docs/commands/stream/xtrim.mdx\n */\n xtrim = (...args) => this.chain(new XTrimCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xrange\n * @see node_modules/@upstash/redis/docs/commands/stream/xrange.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, xrange returns [id, [field, value, ...]] entries instead,\n * such as [[\"1790341484470-0\", [\"text\", \"123\"]]], and [] for a missing key.\n */\n xrange = (...args) => this.chain(new XRangeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/xrevrange\n * @see node_modules/@upstash/redis/docs/commands/stream/xrevrange.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, xrevrange returns [id, [field, value, ...]] entries instead,\n * such as [[\"1790341484470-0\", [\"text\", \"123\"]]], and [] for a missing key.\n */\n xrevrange = (...args) => this.chain(new XRevRangeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zcard\n * @see node_modules/@upstash/redis/docs/commands/zset/zcard.mdx\n */\n zcard = (...args) => this.chain(new ZCardCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zcount\n * @see node_modules/@upstash/redis/docs/commands/zset/zcount.mdx\n */\n zcount = (...args) => this.chain(new ZCountCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zincrby\n * @see node_modules/@upstash/redis/docs/commands/zset/zincrby.mdx\n */\n zincrby = (key, increment, member) => this.chain(new ZIncrByCommand([key, increment, member], this.commandOptions));\n /**\n * @see https://redis.io/commands/zinterstore\n * @see node_modules/@upstash/redis/docs/commands/zset/zinterstore.mdx\n */\n zinterstore = (...args) => this.chain(new ZInterStoreCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zlexcount\n * @see node_modules/@upstash/redis/docs/commands/zset/zlexcount.mdx\n */\n zlexcount = (...args) => this.chain(new ZLexCountCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zmscore\n * @see node_modules/@upstash/redis/docs/commands/zset/zmscore.mdx\n */\n zmscore = (...args) => this.chain(new ZMScoreCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zpopmax\n * @see node_modules/@upstash/redis/docs/commands/zset/zpopmax.mdx\n */\n zpopmax = (...args) => this.chain(new ZPopMaxCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zpopmin\n * @see node_modules/@upstash/redis/docs/commands/zset/zpopmin.mdx\n */\n zpopmin = (...args) => this.chain(new ZPopMinCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zrange\n * @see node_modules/@upstash/redis/docs/commands/zset/zrange.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n zrange = (...args) => this.chain(new ZRangeCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zrank\n * @see node_modules/@upstash/redis/docs/commands/zset/zrank.mdx\n */\n zrank = (key, member) => this.chain(new ZRankCommand([key, member], this.commandOptions));\n /**\n * @see https://redis.io/commands/zrem\n * @see node_modules/@upstash/redis/docs/commands/zset/zrem.mdx\n */\n zrem = (key, ...members) => this.chain(new ZRemCommand([key, ...members], this.commandOptions));\n /**\n * @see https://redis.io/commands/zremrangebylex\n * @see node_modules/@upstash/redis/docs/commands/zset/zremrangebylex.mdx\n */\n zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zremrangebyrank\n * @see node_modules/@upstash/redis/docs/commands/zset/zremrangebyrank.mdx\n */\n zremrangebyrank = (...args) => this.chain(new ZRemRangeByRankCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zremrangebyscore\n * @see node_modules/@upstash/redis/docs/commands/zset/zremrangebyscore.mdx\n */\n zremrangebyscore = (...args) => this.chain(new ZRemRangeByScoreCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zrevrank\n * @see node_modules/@upstash/redis/docs/commands/zset/zrevrank.mdx\n */\n zrevrank = (key, member) => this.chain(new ZRevRankCommand([key, member], this.commandOptions));\n /**\n * @see https://redis.io/commands/zscan\n * @see node_modules/@upstash/redis/docs/commands/zset/zscan.mdx\n */\n zscan = (...args) => this.chain(new ZScanCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zscore\n * @see node_modules/@upstash/redis/docs/commands/zset/zscore.mdx\n */\n zscore = (key, member) => this.chain(new ZScoreCommand([key, member], this.commandOptions));\n /**\n * @see https://redis.io/commands/zunionstore\n * @see node_modules/@upstash/redis/docs/commands/zset/zunionstore.mdx\n */\n zunionstore = (...args) => this.chain(new ZUnionStoreCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/zunion\n */\n zunion = (...args) => this.chain(new ZUnionCommand(args, this.commandOptions));\n /**\n * @see https://redis.io/commands/?group=json\n */\n get json() {\n return {\n /**\n * @see https://redis.io/commands/json.arrappend\n * @see node_modules/@upstash/redis/docs/commands/json/arrappend.mdx\n */\n arrappend: (...args) => this.chain(new JsonArrAppendCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.arrindex\n * @see node_modules/@upstash/redis/docs/commands/json/arrindex.mdx\n */\n arrindex: (...args) => this.chain(new JsonArrIndexCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.arrinsert\n * @see node_modules/@upstash/redis/docs/commands/json/arrinsert.mdx\n */\n arrinsert: (...args) => this.chain(new JsonArrInsertCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.arrlen\n * @see node_modules/@upstash/redis/docs/commands/json/arrlen.mdx\n */\n arrlen: (...args) => this.chain(new JsonArrLenCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.arrpop\n * @see node_modules/@upstash/redis/docs/commands/json/arrpop.mdx\n */\n arrpop: (...args) => this.chain(new JsonArrPopCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.arrtrim\n * @see node_modules/@upstash/redis/docs/commands/json/arrtrim.mdx\n */\n arrtrim: (...args) => this.chain(new JsonArrTrimCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.clear\n * @see node_modules/@upstash/redis/docs/commands/json/clear.mdx\n */\n clear: (...args) => this.chain(new JsonClearCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.del\n * @see node_modules/@upstash/redis/docs/commands/json/del.mdx\n */\n del: (...args) => this.chain(new JsonDelCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.forget\n * @see node_modules/@upstash/redis/docs/commands/json/forget.mdx\n */\n forget: (...args) => this.chain(new JsonForgetCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.get\n * @see node_modules/@upstash/redis/docs/commands/json/get.mdx\n */\n get: (...args) => this.chain(new JsonGetCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.merge\n * @see node_modules/@upstash/redis/docs/commands/json/merge.mdx\n */\n merge: (...args) => this.chain(new JsonMergeCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.mget\n * @see node_modules/@upstash/redis/docs/commands/json/mget.mdx\n */\n mget: (...args) => this.chain(new JsonMGetCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.mset\n * @see node_modules/@upstash/redis/docs/commands/json/mset.mdx\n */\n mset: (...args) => this.chain(new JsonMSetCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.numincrby\n * @see node_modules/@upstash/redis/docs/commands/json/numincrby.mdx\n */\n numincrby: (...args) => this.chain(new JsonNumIncrByCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.nummultby\n * @see node_modules/@upstash/redis/docs/commands/json/nummultby.mdx\n */\n nummultby: (...args) => this.chain(new JsonNumMultByCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.objkeys\n * @see node_modules/@upstash/redis/docs/commands/json/objkeys.mdx\n */\n objkeys: (...args) => this.chain(new JsonObjKeysCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.objlen\n * @see node_modules/@upstash/redis/docs/commands/json/objlen.mdx\n */\n objlen: (...args) => this.chain(new JsonObjLenCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.resp\n */\n resp: (...args) => this.chain(new JsonRespCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.set\n * @see node_modules/@upstash/redis/docs/commands/json/set.mdx\n */\n set: (...args) => this.chain(new JsonSetCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.strappend\n * @see node_modules/@upstash/redis/docs/commands/json/strappend.mdx\n */\n strappend: (...args) => this.chain(new JsonStrAppendCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.strlen\n * @see node_modules/@upstash/redis/docs/commands/json/strlen.mdx\n */\n strlen: (...args) => this.chain(new JsonStrLenCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.toggle\n * @see node_modules/@upstash/redis/docs/commands/json/toggle.mdx\n */\n toggle: (...args) => this.chain(new JsonToggleCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/commands/json.type\n * @see node_modules/@upstash/redis/docs/commands/json/type.mdx\n */\n type: (...args) => this.chain(new JsonTypeCommand(args, this.commandOptions))\n };\n }\n get functions() {\n return {\n /**\n * @see https://redis.io/docs/latest/commands/function-load/\n * @see node_modules/@upstash/redis/docs/commands/functions/load.mdx\n */\n load: (...args) => this.chain(new FunctionLoadCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/docs/latest/commands/function-list/\n * @see node_modules/@upstash/redis/docs/commands/functions/list.mdx\n */\n list: (...args) => this.chain(new FunctionListCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/docs/latest/commands/function-delete/\n * @see node_modules/@upstash/redis/docs/commands/functions/delete.mdx\n */\n delete: (...args) => this.chain(new FunctionDeleteCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/docs/latest/commands/function-flush/\n * @see node_modules/@upstash/redis/docs/commands/functions/flush.mdx\n */\n flush: () => this.chain(new FunctionFlushCommand(this.commandOptions)),\n /**\n * @see https://redis.io/docs/latest/commands/function-stats/\n * @see node_modules/@upstash/redis/docs/commands/functions/stats.mdx\n */\n stats: () => this.chain(new FunctionStatsCommand(this.commandOptions)),\n /**\n * @see https://redis.io/docs/latest/commands/fcall/\n * @see node_modules/@upstash/redis/docs/commands/functions/call.mdx\n */\n call: (...args) => this.chain(new FCallCommand(args, this.commandOptions)),\n /**\n * @see https://redis.io/docs/latest/commands/fcall_ro/\n * @see node_modules/@upstash/redis/docs/commands/functions/call_ro.mdx\n */\n callRo: (...args) => this.chain(new FCallRoCommand(args, this.commandOptions))\n };\n }\n};\n\n// pkg/auto-pipeline.ts\nvar MAX_PIPELINE_SIZE = 1e3;\nvar READ_COMMANDS = /* @__PURE__ */ new Set([\n // Array\n \"arcount\",\n \"arget\",\n \"argetrange\",\n \"argrep\",\n \"arinfo\",\n \"arlastitems\",\n \"arlen\",\n \"armget\",\n \"arnext\",\n \"arop\",\n \"arscan\",\n // String\n \"get\",\n \"getrange\",\n \"mget\",\n \"strlen\",\n // Bit\n \"bitcount\",\n \"bitpos\",\n \"getbit\",\n // Hash\n \"hexists\",\n \"hget\",\n \"hgetall\",\n \"hkeys\",\n \"hlen\",\n \"hmget\",\n \"hrandfield\",\n \"hscan\",\n \"hstrlen\",\n \"httl\",\n \"hvals\",\n \"hexpiretime\",\n \"hpexpiretime\",\n \"hpttl\",\n // List\n \"lindex\",\n \"llen\",\n \"lpos\",\n \"lrange\",\n // Set\n \"scard\",\n \"sdiff\",\n \"sinter\",\n \"sintercard\",\n \"sismember\",\n \"smembers\",\n \"smismember\",\n \"srandmember\",\n \"sscan\",\n \"sunion\",\n // Sorted set\n \"zcard\",\n \"zcount\",\n \"zlexcount\",\n \"zmscore\",\n \"zrange\",\n \"zrank\",\n \"zrevrank\",\n \"zscan\",\n \"zscore\",\n \"zunion\",\n // Key metadata\n \"exists\",\n \"type\",\n \"ttl\",\n \"pttl\",\n \"randomkey\",\n \"touch\",\n // HyperLogLog\n \"pfcount\",\n // Stream\n \"xinfo\",\n \"xlen\",\n \"xpending\",\n \"xrange\",\n \"xread\",\n \"xrevrange\",\n // Geo\n \"geodist\",\n \"geohash\",\n \"geopos\",\n \"geosearch\",\n // Script / eval\n \"scriptExists\",\n \"evalRo\",\n \"evalshaRo\",\n // Utility\n \"dbsize\",\n \"echo\",\n \"ping\",\n \"time\",\n \"scan\",\n \"keys\",\n // JSON namespace\n \"arrindex\",\n \"arrlen\",\n \"objkeys\",\n \"objlen\",\n \"resp\",\n // Functions namespace\n \"list\",\n \"stats\",\n \"callRo\"\n]);\nvar EXCLUDE_COMMANDS = /* @__PURE__ */ new Set([\n \"scan\",\n \"keys\",\n \"flushdb\",\n \"flushall\",\n \"dbsize\",\n \"hscan\",\n \"hgetall\",\n \"hkeys\",\n \"lrange\",\n \"sscan\",\n \"smembers\",\n \"xrange\",\n \"xrevrange\",\n \"zscan\",\n \"zrange\",\n \"exec\"\n]);\nfunction createAutoPipelineProxy(_redis, namespace = \"root\") {\n const redis = _redis;\n if (!redis.autoPipelineExecutor) {\n redis.autoPipelineExecutor = new AutoPipelineExecutor(redis);\n }\n return new Proxy(redis, {\n get: (redis2, command) => {\n if (command === \"pipelineCounter\") {\n return redis2.autoPipelineExecutor.pipelineCounter;\n }\n if (namespace === \"root\" && command === \"json\") {\n return createAutoPipelineProxy(redis2, \"json\");\n }\n if (namespace === \"root\" && command === \"functions\") {\n return createAutoPipelineProxy(redis2, \"functions\");\n }\n if (namespace === \"root\") {\n const commandInRedisButNotPipeline = command in redis2 && !(command in redis2.autoPipelineExecutor.pipeline);\n const isCommandExcluded = EXCLUDE_COMMANDS.has(command);\n if (commandInRedisButNotPipeline || isCommandExcluded) {\n return redis2[command];\n }\n }\n const pipeline = redis2.autoPipelineExecutor.pipeline;\n const targetFunction = namespace === \"json\" ? pipeline.json[command] : namespace === \"functions\" ? pipeline.functions[command] : pipeline[command];\n const isFunction = typeof targetFunction === \"function\";\n if (isFunction) {\n return (...args) => {\n const commandMode = READ_COMMANDS.has(command) ? \"read\" : \"write\";\n return redis2.autoPipelineExecutor.withAutoPipeline(commandMode, (pipeline2) => {\n const targetFunction2 = namespace === \"json\" ? pipeline2.json[command] : namespace === \"functions\" ? pipeline2.functions[command] : pipeline2[command];\n targetFunction2(...args);\n });\n };\n }\n return targetFunction;\n }\n });\n}\nvar AutoPipelineExecutor = class {\n pipelinePromises = /* @__PURE__ */ new WeakMap();\n activeReadPipeline = null;\n activeWritePipeline = null;\n readIndex = 0;\n writeIndex = 0;\n redis;\n pipeline;\n // only to make sure that proxy can work\n pipelineCounter = 0;\n // to keep track of how many times a pipeline was executed\n constructor(redis) {\n this.redis = redis;\n this.pipeline = redis.pipeline();\n }\n async withAutoPipeline(commandMode, executeWithPipeline) {\n const isRead = commandMode === \"read\";\n const activePipeline = isRead ? this.activeReadPipeline : this.activeWritePipeline;\n const pipeline = activePipeline ?? this.redis.pipeline();\n if (!activePipeline) {\n if (isRead) {\n this.activeReadPipeline = pipeline;\n this.readIndex = 0;\n } else {\n this.activeWritePipeline = pipeline;\n this.writeIndex = 0;\n }\n }\n const index = isRead ? this.readIndex++ : this.writeIndex++;\n executeWithPipeline(pipeline);\n if (isRead && this.readIndex >= MAX_PIPELINE_SIZE) {\n this.activeReadPipeline = null;\n } else if (!isRead && this.writeIndex >= MAX_PIPELINE_SIZE) {\n this.activeWritePipeline = null;\n }\n const pipelineDone = this.deferExecution().then(() => {\n if (!this.pipelinePromises.has(pipeline)) {\n const pipelinePromise = pipeline.exec({ keepErrors: true });\n this.pipelineCounter += 1;\n this.pipelinePromises.set(pipeline, pipelinePromise);\n if (this.activeReadPipeline === pipeline) {\n this.activeReadPipeline = null;\n }\n if (this.activeWritePipeline === pipeline) {\n this.activeWritePipeline = null;\n }\n }\n return this.pipelinePromises.get(pipeline);\n });\n const results = await pipelineDone;\n const commandResult = results[index];\n if (commandResult.error) {\n throw new UpstashError(`Command failed: ${commandResult.error}`);\n }\n return commandResult.result;\n }\n async deferExecution() {\n await Promise.resolve();\n await Promise.resolve();\n }\n};\n\n// pkg/commands/psubscribe.ts\nvar PSubscribeCommand = class extends Command {\n constructor(cmd, opts) {\n const sseHeaders = {\n Accept: \"text/event-stream\",\n \"Cache-Control\": \"no-cache\",\n Connection: \"keep-alive\"\n };\n super([], {\n ...opts,\n headers: sseHeaders,\n path: [\"psubscribe\", ...cmd],\n streamOptions: {\n isStreaming: true,\n onMessage: opts?.streamOptions?.onMessage,\n signal: opts?.streamOptions?.signal\n }\n });\n }\n};\n\n// pkg/commands/subscribe.ts\nvar Subscriber = class extends EventTarget {\n subscriptions;\n client;\n listeners;\n opts;\n constructor(client, channels, isPattern = false, opts) {\n super();\n this.client = client;\n this.subscriptions = /* @__PURE__ */ new Map();\n this.listeners = /* @__PURE__ */ new Map();\n this.opts = opts;\n for (const channel of channels) {\n if (isPattern) {\n this.subscribeToPattern(channel);\n } else {\n this.subscribeToChannel(channel);\n }\n }\n }\n subscribeToChannel(channel) {\n const controller = new AbortController();\n const command = new SubscribeCommand([channel], {\n streamOptions: {\n signal: controller.signal,\n onMessage: (data) => this.handleMessage(data, false)\n }\n });\n command.exec(this.client).catch((error) => {\n if (error.name !== \"AbortError\") {\n this.dispatchToListeners(\"error\", error);\n }\n });\n this.subscriptions.set(channel, {\n command,\n controller,\n isPattern: false\n });\n }\n subscribeToPattern(pattern) {\n const controller = new AbortController();\n const command = new PSubscribeCommand([pattern], {\n streamOptions: {\n signal: controller.signal,\n onMessage: (data) => this.handleMessage(data, true)\n }\n });\n command.exec(this.client).catch((error) => {\n if (error.name !== \"AbortError\") {\n this.dispatchToListeners(\"error\", error);\n }\n });\n this.subscriptions.set(pattern, {\n command,\n controller,\n isPattern: true\n });\n }\n handleMessage(data, isPattern) {\n const messageData = data.replace(/^data:\\s*/, \"\");\n const firstCommaIndex = messageData.indexOf(\",\");\n const secondCommaIndex = messageData.indexOf(\",\", firstCommaIndex + 1);\n const thirdCommaIndex = isPattern ? messageData.indexOf(\",\", secondCommaIndex + 1) : -1;\n if (firstCommaIndex !== -1 && secondCommaIndex !== -1) {\n const type = messageData.slice(0, firstCommaIndex);\n if (isPattern && type === \"pmessage\" && thirdCommaIndex !== -1) {\n const pattern = messageData.slice(firstCommaIndex + 1, secondCommaIndex);\n const channel = messageData.slice(secondCommaIndex + 1, thirdCommaIndex);\n const messageStr = messageData.slice(thirdCommaIndex + 1);\n try {\n const message = this.opts?.automaticDeserialization === false ? messageStr : JSON.parse(messageStr);\n this.dispatchToListeners(\"pmessage\", { pattern, channel, message });\n this.dispatchToListeners(`pmessage:${pattern}`, { pattern, channel, message });\n } catch (error) {\n this.dispatchToListeners(\"error\", new Error(`Failed to parse message: ${error}`));\n }\n } else {\n const channel = messageData.slice(firstCommaIndex + 1, secondCommaIndex);\n const messageStr = messageData.slice(secondCommaIndex + 1);\n try {\n if (type === \"subscribe\" || type === \"psubscribe\" || type === \"unsubscribe\" || type === \"punsubscribe\") {\n const count = Number.parseInt(messageStr);\n this.dispatchToListeners(type, count);\n } else {\n const message = this.opts?.automaticDeserialization === false ? messageStr : parseWithTryCatch(messageStr);\n this.dispatchToListeners(type, { channel, message });\n this.dispatchToListeners(`${type}:${channel}`, { channel, message });\n }\n } catch (error) {\n this.dispatchToListeners(\"error\", new Error(`Failed to parse message: ${error}`));\n }\n }\n }\n }\n dispatchToListeners(type, data) {\n const listeners = this.listeners.get(type);\n if (listeners) {\n for (const listener of listeners) {\n listener(data);\n }\n }\n }\n on(type, listener) {\n if (!this.listeners.has(type)) {\n this.listeners.set(type, /* @__PURE__ */ new Set());\n }\n this.listeners.get(type)?.add(listener);\n }\n removeAllListeners() {\n this.listeners.clear();\n }\n async unsubscribe(channels) {\n if (channels) {\n for (const channel of channels) {\n const subscription = this.subscriptions.get(channel);\n if (subscription) {\n try {\n subscription.controller.abort();\n } catch {\n }\n this.subscriptions.delete(channel);\n }\n }\n } else {\n for (const subscription of this.subscriptions.values()) {\n try {\n subscription.controller.abort();\n } catch {\n }\n }\n this.subscriptions.clear();\n this.removeAllListeners();\n }\n }\n getSubscribedChannels() {\n return [...this.subscriptions.keys()];\n }\n};\nvar SubscribeCommand = class extends Command {\n constructor(cmd, opts) {\n const sseHeaders = {\n Accept: \"text/event-stream\",\n \"Cache-Control\": \"no-cache\",\n Connection: \"keep-alive\"\n };\n super([], {\n ...opts,\n headers: sseHeaders,\n path: [\"subscribe\", ...cmd],\n streamOptions: {\n isStreaming: true,\n onMessage: opts?.streamOptions?.onMessage,\n signal: opts?.streamOptions?.signal\n }\n });\n }\n};\nvar parseWithTryCatch = (str) => {\n try {\n return JSON.parse(str);\n } catch {\n return str;\n }\n};\n\n// pkg/script.ts\nimport { subtle } from \"uncrypto\";\nvar Script = class {\n script;\n /**\n * @deprecated This property is initialized to an empty string and will be set in the init method\n * asynchronously. Do not use this property immidiately after the constructor.\n *\n * This property is only exposed for backwards compatibility and will be removed in the\n * future major release.\n */\n sha1;\n initPromise;\n redis;\n constructor(redis, script) {\n this.redis = redis;\n this.script = script;\n this.sha1 = \"\";\n void this.init(script);\n }\n /**\n * Initialize the script by computing its SHA-1 hash.\n */\n init(script) {\n if (!this.initPromise) {\n this.initPromise = this.digest(script).then((sha1) => {\n this.sha1 = sha1;\n });\n }\n return this.initPromise;\n }\n /**\n * Send an `EVAL` command to redis.\n */\n async eval(keys, args) {\n await this.init(this.script);\n return await this.redis.eval(this.script, keys, args);\n }\n /**\n * Calculates the sha1 hash of the script and then calls `EVALSHA`.\n */\n async evalsha(keys, args) {\n await this.init(this.script);\n return await this.redis.evalsha(this.sha1, keys, args);\n }\n /**\n * Optimistically try to run `EVALSHA` first.\n * If the script is not loaded in redis, it will fall back and try again with `EVAL`.\n *\n * Following calls will be able to use the cached script\n */\n async exec(keys, args) {\n await this.init(this.script);\n const res = await this.redis.evalsha(this.sha1, keys, args).catch(async (error) => {\n if (error instanceof Error && error.message.toLowerCase().includes(\"noscript\")) {\n return await this.redis.eval(this.script, keys, args);\n }\n throw error;\n });\n return res;\n }\n /**\n * Compute the sha1 hash of the script and return its hex representation.\n */\n async digest(s) {\n const data = new TextEncoder().encode(s);\n const hashBuffer = await subtle.digest(\"SHA-1\", data);\n const hashArray = [...new Uint8Array(hashBuffer)];\n return hashArray.map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n }\n};\n\n// pkg/scriptRo.ts\nimport { subtle as subtle2 } from \"uncrypto\";\nvar ScriptRO = class {\n script;\n /**\n * @deprecated This property is initialized to an empty string and will be set in the init method\n * asynchronously. Do not use this property immidiately after the constructor.\n *\n * This property is only exposed for backwards compatibility and will be removed in the\n * future major release.\n */\n sha1;\n initPromise;\n redis;\n constructor(redis, script) {\n this.redis = redis;\n this.sha1 = \"\";\n this.script = script;\n void this.init(script);\n }\n init(script) {\n if (!this.initPromise) {\n this.initPromise = this.digest(script).then((sha1) => {\n this.sha1 = sha1;\n });\n }\n return this.initPromise;\n }\n /**\n * Send an `EVAL_RO` command to redis.\n */\n async evalRo(keys, args) {\n await this.init(this.script);\n return await this.redis.evalRo(this.script, keys, args);\n }\n /**\n * Calculates the sha1 hash of the script and then calls `EVALSHA_RO`.\n */\n async evalshaRo(keys, args) {\n await this.init(this.script);\n return await this.redis.evalshaRo(this.sha1, keys, args);\n }\n /**\n * Optimistically try to run `EVALSHA_RO` first.\n * If the script is not loaded in redis, it will fall back and try again with `EVAL_RO`.\n *\n * Following calls will be able to use the cached script\n */\n async exec(keys, args) {\n await this.init(this.script);\n const res = await this.redis.evalshaRo(this.sha1, keys, args).catch(async (error) => {\n if (error instanceof Error && error.message.toLowerCase().includes(\"noscript\")) {\n return await this.redis.evalRo(this.script, keys, args);\n }\n throw error;\n });\n return res;\n }\n /**\n * Compute the sha1 hash of the script and return its hex representation.\n */\n async digest(s) {\n const data = new TextEncoder().encode(s);\n const hashBuffer = await subtle2.digest(\"SHA-1\", data);\n const hashArray = [...new Uint8Array(hashBuffer)];\n return hashArray.map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n }\n};\n\n// pkg/redis.ts\nvar Redis = class {\n client;\n opts;\n enableTelemetry;\n enableAutoPipelining;\n /**\n * Create a new redis client\n *\n * @example\n * ```typescript\n * const redis = new Redis({\n * url: \"<UPSTASH_REDIS_REST_URL>\",\n * token: \"<UPSTASH_REDIS_REST_TOKEN>\",\n * });\n * ```\n */\n constructor(client, opts) {\n this.client = client;\n this.opts = opts;\n this.enableTelemetry = opts?.enableTelemetry ?? true;\n if (opts?.readYourWrites === false) {\n this.client.readYourWrites = false;\n }\n this.enableAutoPipelining = opts?.enableAutoPipelining ?? true;\n }\n get readYourWritesSyncToken() {\n return this.client.upstashSyncToken;\n }\n set readYourWritesSyncToken(session) {\n this.client.upstashSyncToken = session;\n }\n get json() {\n return {\n /**\n * @see https://redis.io/commands/json.arrappend\n * @see node_modules/@upstash/redis/docs/commands/json/arrappend.mdx\n */\n arrappend: (...args) => new JsonArrAppendCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.arrindex\n * @see node_modules/@upstash/redis/docs/commands/json/arrindex.mdx\n */\n arrindex: (...args) => new JsonArrIndexCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.arrinsert\n * @see node_modules/@upstash/redis/docs/commands/json/arrinsert.mdx\n */\n arrinsert: (...args) => new JsonArrInsertCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.arrlen\n * @see node_modules/@upstash/redis/docs/commands/json/arrlen.mdx\n */\n arrlen: (...args) => new JsonArrLenCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.arrpop\n * @see node_modules/@upstash/redis/docs/commands/json/arrpop.mdx\n */\n arrpop: (...args) => new JsonArrPopCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.arrtrim\n * @see node_modules/@upstash/redis/docs/commands/json/arrtrim.mdx\n */\n arrtrim: (...args) => new JsonArrTrimCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.clear\n * @see node_modules/@upstash/redis/docs/commands/json/clear.mdx\n */\n clear: (...args) => new JsonClearCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.del\n * @see node_modules/@upstash/redis/docs/commands/json/del.mdx\n */\n del: (...args) => new JsonDelCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.forget\n * @see node_modules/@upstash/redis/docs/commands/json/forget.mdx\n */\n forget: (...args) => new JsonForgetCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.get\n * @see node_modules/@upstash/redis/docs/commands/json/get.mdx\n */\n get: (...args) => new JsonGetCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.merge\n * @see node_modules/@upstash/redis/docs/commands/json/merge.mdx\n */\n merge: (...args) => new JsonMergeCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.mget\n * @see node_modules/@upstash/redis/docs/commands/json/mget.mdx\n */\n mget: (...args) => new JsonMGetCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.mset\n * @see node_modules/@upstash/redis/docs/commands/json/mset.mdx\n */\n mset: (...args) => new JsonMSetCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.numincrby\n * @see node_modules/@upstash/redis/docs/commands/json/numincrby.mdx\n */\n numincrby: (...args) => new JsonNumIncrByCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.nummultby\n * @see node_modules/@upstash/redis/docs/commands/json/nummultby.mdx\n */\n nummultby: (...args) => new JsonNumMultByCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.objkeys\n * @see node_modules/@upstash/redis/docs/commands/json/objkeys.mdx\n */\n objkeys: (...args) => new JsonObjKeysCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.objlen\n * @see node_modules/@upstash/redis/docs/commands/json/objlen.mdx\n */\n objlen: (...args) => new JsonObjLenCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.resp\n */\n resp: (...args) => new JsonRespCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.set\n * @see node_modules/@upstash/redis/docs/commands/json/set.mdx\n */\n set: (...args) => new JsonSetCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.strappend\n * @see node_modules/@upstash/redis/docs/commands/json/strappend.mdx\n */\n strappend: (...args) => new JsonStrAppendCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.strlen\n * @see node_modules/@upstash/redis/docs/commands/json/strlen.mdx\n */\n strlen: (...args) => new JsonStrLenCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.toggle\n * @see node_modules/@upstash/redis/docs/commands/json/toggle.mdx\n */\n toggle: (...args) => new JsonToggleCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/commands/json.type\n * @see node_modules/@upstash/redis/docs/commands/json/type.mdx\n */\n type: (...args) => new JsonTypeCommand(args, this.opts).exec(this.client)\n };\n }\n get functions() {\n return {\n /**\n * @see https://redis.io/docs/latest/commands/function-load/\n * @see node_modules/@upstash/redis/docs/commands/functions/load.mdx\n */\n load: (...args) => new FunctionLoadCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/docs/latest/commands/function-list/\n * @see node_modules/@upstash/redis/docs/commands/functions/list.mdx\n */\n list: (...args) => new FunctionListCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/docs/latest/commands/function-delete/\n * @see node_modules/@upstash/redis/docs/commands/functions/delete.mdx\n */\n delete: (...args) => new FunctionDeleteCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/docs/latest/commands/function-flush/\n * @see node_modules/@upstash/redis/docs/commands/functions/flush.mdx\n */\n flush: () => new FunctionFlushCommand(this.opts).exec(this.client),\n /**\n * @see https://redis.io/docs/latest/commands/function-stats/\n * @see node_modules/@upstash/redis/docs/commands/functions/stats.mdx\n *\n * Note: `running_script` field is not supported and therefore not included in the type.\n */\n stats: () => new FunctionStatsCommand(this.opts).exec(this.client),\n /**\n * @see https://redis.io/docs/latest/commands/fcall/\n * @see node_modules/@upstash/redis/docs/commands/functions/call.mdx\n */\n call: (...args) => new FCallCommand(args, this.opts).exec(this.client),\n /**\n * @see https://redis.io/docs/latest/commands/fcall_ro/\n * @see node_modules/@upstash/redis/docs/commands/functions/call_ro.mdx\n */\n callRo: (...args) => new FCallRoCommand(args, this.opts).exec(this.client)\n };\n }\n /**\n * Wrap a new middleware around the HTTP client.\n */\n use = (middleware) => {\n const makeRequest = this.client.request.bind(this.client);\n this.client.request = (req) => middleware(req, makeRequest);\n };\n /**\n * Technically this is not private, we can hide it from intellisense by doing this\n */\n addTelemetry = (telemetry) => {\n if (!this.enableTelemetry) {\n return;\n }\n try {\n this.client.mergeTelemetry(telemetry);\n } catch {\n }\n };\n /**\n * Creates a new script.\n *\n * Scripts offer the ability to optimistically try to execute a script without having to send the\n * entire script to the server. If the script is loaded on the server, it tries again by sending\n * the entire script. Afterwards, the script is cached on the server.\n *\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n *\n * @param script - The script to create\n * @param opts - Optional options to pass to the script `{ readonly?: boolean }`\n * @returns A new script\n *\n * @example\n * ```ts\n * const redis = new Redis({...})\n *\n * const script = redis.createScript<string>(\"return ARGV[1];\")\n * const arg1 = await script.eval([], [\"Hello World\"])\n * expect(arg1, \"Hello World\")\n * ```\n * @example\n * ```ts\n * const redis = new Redis({...})\n *\n * const script = redis.createScript<string>(\"return ARGV[1];\", { readonly: true })\n * const arg1 = await script.evalRo([], [\"Hello World\"])\n * expect(arg1, \"Hello World\")\n * ```\n */\n createScript(script, opts) {\n return opts?.readonly ? new ScriptRO(this, script) : new Script(this, script);\n }\n get search() {\n return {\n createIndex: (params) => {\n return createIndex(this.client, params);\n },\n index: (params) => {\n return initIndex(this.client, params);\n },\n alias: {\n list: () => {\n return listAliases(this.client);\n },\n add: ({ indexName, alias }) => {\n return addAlias(this.client, { indexName, alias });\n },\n delete: ({ alias }) => {\n return delAlias(this.client, { alias });\n }\n }\n };\n }\n /**\n * Vector index commands.\n *\n * @example\n * ```typescript\n * const index = await redis.vector.createIndex({ name: \"docs\", dimension: 3, metric: \"COSINE\" });\n * await index.add(\"doc-1\", [0.1, 0.2, 0.3]);\n * const hits = await index.query({ vector: [0.1, 0.2, 0.3], topK: 5 });\n * ```\n */\n get vector() {\n return {\n /**\n * Creates a vector index and returns a handle to it.\n */\n createIndex: (params) => {\n return createVectorIndex(this.client, params, this.opts);\n },\n /**\n * Returns a handle to an existing vector index without sending any command.\n */\n index: (name) => {\n return initVectorIndex(this.client, name, this.opts);\n }\n };\n }\n /**\n * Create a new pipeline that allows you to send requests in bulk.\n *\n * @see {@link Pipeline}\n */\n pipeline = () => new Pipeline({\n client: this.client,\n commandOptions: this.opts,\n multiExec: false\n });\n autoPipeline = () => {\n return createAutoPipelineProxy(this);\n };\n /**\n * Create a new transaction to allow executing multiple steps atomically.\n *\n * All the commands in a transaction are serialized and executed sequentially. A request sent by\n * another client will never be served in the middle of the execution of a Redis Transaction. This\n * guarantees that the commands are executed as a single isolated operation.\n *\n * @see {@link Pipeline}\n */\n multi = () => new Pipeline({\n client: this.client,\n commandOptions: this.opts,\n multiExec: true\n });\n /**\n * Returns an instance that can be used to execute `BITFIELD` commands on one key.\n *\n * @example\n * ```typescript\n * redis.set(\"mykey\", 0);\n * const result = await redis.bitfield(\"mykey\")\n * .set(\"u4\", 0, 16)\n * .incr(\"u4\", \"#1\", 1)\n * .exec();\n * console.log(result); // [0, 1]\n * ```\n *\n * @see https://redis.io/commands/bitfield\n */\n bitfield = (...args) => new BitFieldCommand(args, this.client, this.opts);\n /**\n * @see https://redis.io/commands/append\n * @see node_modules/@upstash/redis/docs/commands/string/append.mdx\n */\n append = (...args) => new AppendCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arcount\n * @see node_modules/@upstash/redis/docs/commands/array/arcount.mdx\n */\n arcount = (...args) => new ArCountCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/ardel\n * @see node_modules/@upstash/redis/docs/commands/array/ardel.mdx\n */\n ardel = (...args) => new ArDelCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/ardelrange\n * @see node_modules/@upstash/redis/docs/commands/array/ardelrange.mdx\n */\n ardelrange = (...args) => new ArDelRangeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arget\n * @see node_modules/@upstash/redis/docs/commands/array/arget.mdx\n */\n arget = (...args) => new ArGetCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/argetrange\n * @see node_modules/@upstash/redis/docs/commands/array/argetrange.mdx\n */\n argetrange = (...args) => new ArGetRangeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/argrep\n * @see node_modules/@upstash/redis/docs/commands/array/argrep.mdx\n */\n argrep = (key, start, end, opts) => new ArGrepCommand([key, start, end, opts], this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arinfo\n * @see node_modules/@upstash/redis/docs/commands/array/arinfo.mdx\n */\n arinfo = (...args) => new ArInfoCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arinsert\n * @see node_modules/@upstash/redis/docs/commands/array/arinsert.mdx\n */\n arinsert = (key, ...values) => new ArInsertCommand([key, ...values], this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arlastitems\n * @see node_modules/@upstash/redis/docs/commands/array/arlastitems.mdx\n */\n arlastitems = (...args) => new ArLastItemsCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arlen\n * @see node_modules/@upstash/redis/docs/commands/array/arlen.mdx\n */\n arlen = (...args) => new ArLenCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/armget\n * @see node_modules/@upstash/redis/docs/commands/array/armget.mdx\n */\n armget = (...args) => new ArMGetCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/armset\n * @see node_modules/@upstash/redis/docs/commands/array/armset.mdx\n */\n armset = (key, values) => new ArMSetCommand([key, values], this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arnext\n * @see node_modules/@upstash/redis/docs/commands/array/arnext.mdx\n */\n arnext = (...args) => new ArNextCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arop\n * @see node_modules/@upstash/redis/docs/commands/array/arop.mdx\n */\n arop = (key, start, end, operation) => new ArOpCommand([key, start, end, operation], this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arring\n * @see node_modules/@upstash/redis/docs/commands/array/arring.mdx\n */\n arring = (key, size, ...values) => new ArRingCommand([key, size, ...values], this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arscan\n * @see node_modules/@upstash/redis/docs/commands/array/arscan.mdx\n */\n arscan = (...args) => new ArScanCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arseek\n * @see node_modules/@upstash/redis/docs/commands/array/arseek.mdx\n */\n arseek = (...args) => new ArSeekCommand(args, this.opts).exec(this.client);\n /**\n * @see https://upstash.com/docs/redis/commands/array/arset\n * @see node_modules/@upstash/redis/docs/commands/array/arset.mdx\n */\n arset = (key, index, ...values) => new ArSetCommand([key, index, ...values], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/bitcount\n * @see node_modules/@upstash/redis/docs/commands/bitmap/bitcount.mdx\n */\n bitcount = (...args) => new BitCountCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/bitop\n * @see node_modules/@upstash/redis/docs/commands/bitmap/bitop.mdx\n */\n bitop = (op, destinationKey, sourceKey, ...sourceKeys) => new BitOpCommand([op, destinationKey, sourceKey, ...sourceKeys], this.opts).exec(\n this.client\n );\n /**\n * @see https://redis.io/commands/bitpos\n * @see node_modules/@upstash/redis/docs/commands/bitmap/bitpos.mdx\n */\n bitpos = (...args) => new BitPosCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/client-setinfo\n * @see node_modules/@upstash/redis/docs/commands/connection/client_setinfo.mdx\n */\n clientSetinfo = (...args) => new ClientSetInfoCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/copy\n */\n copy = (...args) => new CopyCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/dbsize\n * @see node_modules/@upstash/redis/docs/commands/server/dbsize.mdx\n */\n dbsize = () => new DBSizeCommand(this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/decr\n * @see node_modules/@upstash/redis/docs/commands/string/decr.mdx\n */\n decr = (...args) => new DecrCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/decrby\n * @see node_modules/@upstash/redis/docs/commands/string/decrby.mdx\n */\n decrby = (...args) => new DecrByCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/del\n * @see node_modules/@upstash/redis/docs/commands/generic/del.mdx\n */\n del = (...args) => new DelCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/echo\n * @see node_modules/@upstash/redis/docs/commands/auth/echo.mdx\n */\n echo = (...args) => new EchoCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/eval_ro\n * @see node_modules/@upstash/redis/docs/commands/scripts/eval_ro.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n evalRo = (...args) => new EvalROCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/eval\n * @see node_modules/@upstash/redis/docs/commands/scripts/eval.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n eval = (...args) => new EvalCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/evalsha_ro\n * @see node_modules/@upstash/redis/docs/commands/scripts/evalsha_ro.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n evalshaRo = (...args) => new EvalshaROCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/evalsha\n * @see node_modules/@upstash/redis/docs/commands/scripts/evalsha.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n evalsha = (...args) => new EvalshaCommand(args, this.opts).exec(this.client);\n /**\n * Generic method to execute any Redis command.\n */\n exec = (args) => new ExecCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/exists\n * @see node_modules/@upstash/redis/docs/commands/generic/exists.mdx\n */\n exists = (...args) => new ExistsCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/expire\n * @see node_modules/@upstash/redis/docs/commands/generic/expire.mdx\n */\n expire = (...args) => new ExpireCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/expireat\n * @see node_modules/@upstash/redis/docs/commands/generic/expireat.mdx\n */\n expireat = (...args) => new ExpireAtCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/flushall\n * @see node_modules/@upstash/redis/docs/commands/server/flushall.mdx\n */\n flushall = (args) => new FlushAllCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/flushdb\n * @see node_modules/@upstash/redis/docs/commands/server/flushdb.mdx\n */\n flushdb = (...args) => new FlushDBCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/geoadd\n */\n geoadd = (...args) => new GeoAddCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/geopos\n */\n geopos = (...args) => new GeoPosCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/geodist\n */\n geodist = (...args) => new GeoDistCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/geohash\n */\n geohash = (...args) => new GeoHashCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/geosearch\n */\n geosearch = (...args) => new GeoSearchCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/geosearchstore\n */\n geosearchstore = (...args) => new GeoSearchStoreCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/get\n * @see node_modules/@upstash/redis/docs/commands/string/get.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n get = (...args) => new GetCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/getbit\n * @see node_modules/@upstash/redis/docs/commands/bitmap/getbit.mdx\n */\n getbit = (...args) => new GetBitCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/getdel\n * @see node_modules/@upstash/redis/docs/commands/string/getdel.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n getdel = (...args) => new GetDelCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/getex\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n getex = (...args) => new GetExCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/getrange\n * @see node_modules/@upstash/redis/docs/commands/string/getrange.mdx\n */\n getrange = (...args) => new GetRangeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/getset\n * @see node_modules/@upstash/redis/docs/commands/string/getset.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n getset = (key, value) => new GetSetCommand([key, value], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hdel\n * @see node_modules/@upstash/redis/docs/commands/hash/hdel.mdx\n */\n hdel = (...args) => new HDelCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hexists\n * @see node_modules/@upstash/redis/docs/commands/hash/hexists.mdx\n */\n hexists = (...args) => new HExistsCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hexpire\n * @see node_modules/@upstash/redis/docs/commands/hash/hexpire.mdx\n */\n hexpire = (...args) => new HExpireCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hexpireat\n * @see node_modules/@upstash/redis/docs/commands/hash/hexpireat.mdx\n */\n hexpireat = (...args) => new HExpireAtCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hexpiretime\n * @see node_modules/@upstash/redis/docs/commands/hash/hexpiretime.mdx\n */\n hexpiretime = (...args) => new HExpireTimeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/httl\n * @see node_modules/@upstash/redis/docs/commands/hash/httl.mdx\n */\n httl = (...args) => new HTtlCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hpexpire\n * @see node_modules/@upstash/redis/docs/commands/hash/hpexpire.mdx\n */\n hpexpire = (...args) => new HPExpireCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hpexpireat\n * @see node_modules/@upstash/redis/docs/commands/hash/hpexpireat.mdx\n */\n hpexpireat = (...args) => new HPExpireAtCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hpexpiretime\n * @see node_modules/@upstash/redis/docs/commands/hash/hpexpiretime.mdx\n */\n hpexpiretime = (...args) => new HPExpireTimeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hpttl\n * @see node_modules/@upstash/redis/docs/commands/hash/hpttl.mdx\n */\n hpttl = (...args) => new HPTtlCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hpersist\n * @see node_modules/@upstash/redis/docs/commands/hash/hpersist.mdx\n */\n hpersist = (...args) => new HPersistCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hget\n * @see node_modules/@upstash/redis/docs/commands/hash/hget.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n hget = (...args) => new HGetCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hgetall\n * @see node_modules/@upstash/redis/docs/commands/hash/hgetall.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, hgetall returns a flat array instead, such as\n * [\"text\", \"123\", \"version\", \"1\"], and [] for a missing key.\n */\n hgetall = (...args) => new HGetAllCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hgetdel\n * @see node_modules/@upstash/redis/docs/commands/hash/hgetdel.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, hgetdel returns an array of values in field order instead,\n * such as [\"123\", null], with null for each field when the key is missing.\n */\n hgetdel = (...args) => new HGetDelCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hgetex\n * @see node_modules/@upstash/redis/docs/commands/hash/hgetex.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, hgetex returns an array of values in field order instead,\n * such as [\"123\", null], with null for each field when the key is missing.\n */\n hgetex = (...args) => new HGetExCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hincrby\n * @see node_modules/@upstash/redis/docs/commands/hash/hincrby.mdx\n */\n hincrby = (...args) => new HIncrByCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hincrbyfloat\n * @see node_modules/@upstash/redis/docs/commands/hash/hincrbyfloat.mdx\n */\n hincrbyfloat = (...args) => new HIncrByFloatCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hkeys\n * @see node_modules/@upstash/redis/docs/commands/hash/hkeys.mdx\n */\n hkeys = (...args) => new HKeysCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hlen\n * @see node_modules/@upstash/redis/docs/commands/hash/hlen.mdx\n */\n hlen = (...args) => new HLenCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hmget\n * @see node_modules/@upstash/redis/docs/commands/hash/hmget.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, hmget returns an array of values in field order instead,\n * such as [\"123\", null], with null for each field when the key is missing.\n */\n hmget = (...args) => new HMGetCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hmset\n */\n hmset = (key, kv) => new HMSetCommand([key, kv], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hrandfield\n * @see node_modules/@upstash/redis/docs/commands/hash/hrandfield.mdx\n */\n hrandfield = (key, count, withValues) => new HRandFieldCommand([key, count, withValues], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hscan\n * @see node_modules/@upstash/redis/docs/commands/hash/hscan.mdx\n */\n hscan = (...args) => new HScanCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hset\n * @see node_modules/@upstash/redis/docs/commands/hash/hset.mdx\n */\n hset = (key, kv) => new HSetCommand([key, kv], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hsetex\n * @see node_modules/@upstash/redis/docs/commands/hash/hsetex.mdx\n */\n hsetex = (...args) => new HSetExCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hsetnx\n * @see node_modules/@upstash/redis/docs/commands/hash/hsetnx.mdx\n */\n hsetnx = (key, field, value) => new HSetNXCommand([key, field, value], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hstrlen\n * @see node_modules/@upstash/redis/docs/commands/hash/hstrlen.mdx\n */\n hstrlen = (...args) => new HStrLenCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/hvals\n * @see node_modules/@upstash/redis/docs/commands/hash/hvals.mdx\n */\n hvals = (...args) => new HValsCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/incr\n * @see node_modules/@upstash/redis/docs/commands/string/incr.mdx\n */\n incr = (...args) => new IncrCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/incrby\n * @see node_modules/@upstash/redis/docs/commands/string/incrby.mdx\n */\n incrby = (...args) => new IncrByCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/incrbyfloat\n * @see node_modules/@upstash/redis/docs/commands/string/incrbyfloat.mdx\n */\n incrbyfloat = (...args) => new IncrByFloatCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/keys\n * @see node_modules/@upstash/redis/docs/commands/generic/keys.mdx\n */\n keys = (...args) => new KeysCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lindex\n * @see node_modules/@upstash/redis/docs/commands/list/lindex.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n lindex = (...args) => new LIndexCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/linsert\n * @see node_modules/@upstash/redis/docs/commands/list/linsert.mdx\n */\n linsert = (key, direction, pivot, value) => new LInsertCommand([key, direction, pivot, value], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/llen\n * @see node_modules/@upstash/redis/docs/commands/list/llen.mdx\n */\n llen = (...args) => new LLenCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lmove\n * @see node_modules/@upstash/redis/docs/commands/list/lmove.mdx\n */\n lmove = (...args) => new LMoveCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lpop\n * @see node_modules/@upstash/redis/docs/commands/list/lpop.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n lpop = (...args) => new LPopCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lmpop\n */\n lmpop = (...args) => new LmPopCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lpos\n * @see node_modules/@upstash/redis/docs/commands/list/lpos.mdx\n */\n lpos = (...args) => new LPosCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lpush\n * @see node_modules/@upstash/redis/docs/commands/list/lpush.mdx\n */\n lpush = (key, ...elements) => new LPushCommand([key, ...elements], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lpushx\n * @see node_modules/@upstash/redis/docs/commands/list/lpushx.mdx\n */\n lpushx = (key, ...elements) => new LPushXCommand([key, ...elements], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lrange\n * @see node_modules/@upstash/redis/docs/commands/list/lrange.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n lrange = (...args) => new LRangeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lrem\n * @see node_modules/@upstash/redis/docs/commands/list/lrem.mdx\n */\n lrem = (key, count, value) => new LRemCommand([key, count, value], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/lset\n * @see node_modules/@upstash/redis/docs/commands/list/lset.mdx\n */\n lset = (key, index, value) => new LSetCommand([key, index, value], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/ltrim\n * @see node_modules/@upstash/redis/docs/commands/list/ltrim.mdx\n */\n ltrim = (...args) => new LTrimCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/mget\n * @see node_modules/@upstash/redis/docs/commands/string/mget.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n mget = (...args) => new MGetCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/mset\n * @see node_modules/@upstash/redis/docs/commands/string/mset.mdx\n */\n mset = (kv) => new MSetCommand([kv], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/msetnx\n * @see node_modules/@upstash/redis/docs/commands/string/msetnx.mdx\n */\n msetnx = (kv) => new MSetNXCommand([kv], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/persist\n * @see node_modules/@upstash/redis/docs/commands/generic/persist.mdx\n */\n persist = (...args) => new PersistCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/pexpire\n * @see node_modules/@upstash/redis/docs/commands/generic/pexpire.mdx\n */\n pexpire = (...args) => new PExpireCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/pexpireat\n * @see node_modules/@upstash/redis/docs/commands/generic/pexpireat.mdx\n */\n pexpireat = (...args) => new PExpireAtCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/pfadd\n */\n pfadd = (...args) => new PfAddCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/pfcount\n */\n pfcount = (...args) => new PfCountCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/pfmerge\n */\n pfmerge = (...args) => new PfMergeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/ping\n * @see node_modules/@upstash/redis/docs/commands/auth/ping.mdx\n */\n ping = (args) => new PingCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/psetex\n */\n psetex = (key, ttl, value) => new PSetEXCommand([key, ttl, value], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/psubscribe\n * @see node_modules/@upstash/redis/docs/commands/pubsub/psubscribe.mdx\n * Messages are JSON-parsed automatically: a published \"123\" arrives as the number 123. Unlike\n * subscribe, a message that is not valid JSON (such as \"hello\") never reaches the listener and\n * emits an \"error\" event instead. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n psubscribe = (patterns) => {\n const patternArray = Array.isArray(patterns) ? patterns : [patterns];\n return new Subscriber(this.client, patternArray, true, this.opts);\n };\n /**\n * @see https://redis.io/commands/pttl\n * @see node_modules/@upstash/redis/docs/commands/generic/pttl.mdx\n */\n pttl = (...args) => new PTtlCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/publish\n * @see node_modules/@upstash/redis/docs/commands/pubsub/publish.mdx\n */\n publish = (...args) => new PublishCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/randomkey\n * @see node_modules/@upstash/redis/docs/commands/generic/randomkey.mdx\n */\n randomkey = () => new RandomKeyCommand().exec(this.client);\n /**\n * @see https://redis.io/commands/rename\n * @see node_modules/@upstash/redis/docs/commands/generic/rename.mdx\n */\n rename = (...args) => new RenameCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/renamenx\n * @see node_modules/@upstash/redis/docs/commands/generic/renamenx.mdx\n */\n renamenx = (...args) => new RenameNXCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/rpop\n * @see node_modules/@upstash/redis/docs/commands/list/rpop.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n rpop = (...args) => new RPopCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/rpush\n * @see node_modules/@upstash/redis/docs/commands/list/rpush.mdx\n */\n rpush = (key, ...elements) => new RPushCommand([key, ...elements], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/rpushx\n * @see node_modules/@upstash/redis/docs/commands/list/rpushx.mdx\n */\n rpushx = (key, ...elements) => new RPushXCommand([key, ...elements], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/sadd\n * @see node_modules/@upstash/redis/docs/commands/set/sadd.mdx\n */\n sadd = (key, member, ...members) => new SAddCommand([key, member, ...members], this.opts).exec(this.client);\n scan(cursor, opts) {\n return new ScanCommand([cursor, opts], this.opts).exec(this.client);\n }\n /**\n * @see https://redis.io/commands/scard\n * @see node_modules/@upstash/redis/docs/commands/set/scard.mdx\n */\n scard = (...args) => new SCardCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/script-exists\n * @see node_modules/@upstash/redis/docs/commands/scripts/script_exists.mdx\n */\n scriptExists = (...args) => new ScriptExistsCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/script-flush\n * @see node_modules/@upstash/redis/docs/commands/scripts/script_flush.mdx\n */\n scriptFlush = (...args) => new ScriptFlushCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/script-load\n * @see node_modules/@upstash/redis/docs/commands/scripts/script_load.mdx\n */\n scriptLoad = (...args) => new ScriptLoadCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/sdiff\n * @see node_modules/@upstash/redis/docs/commands/set/sdiff.mdx\n */\n sdiff = (...args) => new SDiffCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/sdiffstore\n * @see node_modules/@upstash/redis/docs/commands/set/sdiffstore.mdx\n */\n sdiffstore = (...args) => new SDiffStoreCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/set\n * @see node_modules/@upstash/redis/docs/commands/string/set.mdx\n */\n set = (key, value, opts) => new SetCommand([key, value, opts], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/setbit\n * @see node_modules/@upstash/redis/docs/commands/bitmap/setbit.mdx\n */\n setbit = (...args) => new SetBitCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/setex\n */\n setex = (key, ttl, value) => new SetExCommand([key, ttl, value], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/setnx\n */\n setnx = (key, value) => new SetNxCommand([key, value], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/setrange\n * @see node_modules/@upstash/redis/docs/commands/string/setrange.mdx\n */\n setrange = (...args) => new SetRangeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/sinter\n * @see node_modules/@upstash/redis/docs/commands/set/sinter.mdx\n */\n sinter = (...args) => new SInterCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/sintercard\n */\n sintercard = (...args) => new SInterCardCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/sinterstore\n * @see node_modules/@upstash/redis/docs/commands/set/sinterstore.mdx\n */\n sinterstore = (...args) => new SInterStoreCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/sismember\n * @see node_modules/@upstash/redis/docs/commands/set/sismember.mdx\n */\n sismember = (key, member) => new SIsMemberCommand([key, member], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/smismember\n * @see node_modules/@upstash/redis/docs/commands/set/smismember.mdx\n */\n smismember = (key, members) => new SMIsMemberCommand([key, members], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/smembers\n * @see node_modules/@upstash/redis/docs/commands/set/smembers.mdx\n */\n smembers = (...args) => new SMembersCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/smove\n * @see node_modules/@upstash/redis/docs/commands/set/smove.mdx\n */\n smove = (source, destination, member) => new SMoveCommand([source, destination, member], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/spop\n * @see node_modules/@upstash/redis/docs/commands/set/spop.mdx\n */\n spop = (...args) => new SPopCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/srandmember\n * @see node_modules/@upstash/redis/docs/commands/set/srandmember.mdx\n */\n srandmember = (...args) => new SRandMemberCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/srem\n * @see node_modules/@upstash/redis/docs/commands/set/srem.mdx\n */\n srem = (key, ...members) => new SRemCommand([key, ...members], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/sscan\n * @see node_modules/@upstash/redis/docs/commands/set/sscan.mdx\n */\n sscan = (...args) => new SScanCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/strlen\n * @see node_modules/@upstash/redis/docs/commands/string/strlen.mdx\n */\n strlen = (...args) => new StrLenCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/subscribe\n * @see node_modules/@upstash/redis/docs/commands/pubsub/subscribe.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n subscribe = (channels) => {\n const channelArray = Array.isArray(channels) ? channels : [channels];\n return new Subscriber(this.client, channelArray, false, this.opts);\n };\n /**\n * @see https://redis.io/commands/sunion\n * @see node_modules/@upstash/redis/docs/commands/set/sunion.mdx\n */\n sunion = (...args) => new SUnionCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/sunionstore\n * @see node_modules/@upstash/redis/docs/commands/set/sunionstore.mdx\n */\n sunionstore = (...args) => new SUnionStoreCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/time\n */\n time = () => new TimeCommand().exec(this.client);\n /**\n * @see https://redis.io/commands/touch\n * @see node_modules/@upstash/redis/docs/commands/generic/touch.mdx\n */\n touch = (...args) => new TouchCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/ttl\n * @see node_modules/@upstash/redis/docs/commands/generic/ttl.mdx\n */\n ttl = (...args) => new TtlCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/type\n * @see node_modules/@upstash/redis/docs/commands/generic/type.mdx\n */\n type = (...args) => new TypeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/unlink\n * @see node_modules/@upstash/redis/docs/commands/generic/unlink.mdx\n */\n unlink = (...args) => new UnlinkCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xadd\n * @see node_modules/@upstash/redis/docs/commands/stream/xadd.mdx\n */\n xadd = (...args) => new XAddCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xack\n * @see node_modules/@upstash/redis/docs/commands/stream/xack.mdx\n */\n xack = (...args) => new XAckCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xackdel\n * @see node_modules/@upstash/redis/docs/commands/stream/xackdel.mdx\n */\n xackdel = (...args) => new XAckDelCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xdel\n * @see node_modules/@upstash/redis/docs/commands/stream/xdel.mdx\n */\n xdel = (...args) => new XDelCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xdelex\n * @see node_modules/@upstash/redis/docs/commands/stream/xdelex.mdx\n */\n xdelex = (...args) => new XDelExCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xgroup\n * @see node_modules/@upstash/redis/docs/commands/stream/xgroup.mdx\n */\n xgroup = (...args) => new XGroupCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xread\n * @see node_modules/@upstash/redis/docs/commands/stream/xread.mdx\n */\n xread = (...args) => new XReadCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xreadgroup\n * @see node_modules/@upstash/redis/docs/commands/stream/xreadgroup.mdx\n */\n xreadgroup = (...args) => new XReadGroupCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xinfo\n * @see node_modules/@upstash/redis/docs/commands/stream/xinfo.mdx\n */\n xinfo = (...args) => new XInfoCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xlen\n * @see node_modules/@upstash/redis/docs/commands/stream/xlen.mdx\n */\n xlen = (...args) => new XLenCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xpending\n * @see node_modules/@upstash/redis/docs/commands/stream/xpending.mdx\n */\n xpending = (...args) => new XPendingCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xclaim\n * @see node_modules/@upstash/redis/docs/commands/stream/xclaim.mdx\n */\n xclaim = (...args) => new XClaimCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xautoclaim\n * @see node_modules/@upstash/redis/docs/commands/stream/xautoclaim.mdx\n */\n xautoclaim = (...args) => new XAutoClaim(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xtrim\n * @see node_modules/@upstash/redis/docs/commands/stream/xtrim.mdx\n */\n xtrim = (...args) => new XTrimCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xrange\n * @see node_modules/@upstash/redis/docs/commands/stream/xrange.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, xrange returns [id, [field, value, ...]] entries instead,\n * such as [[\"1790341484470-0\", [\"text\", \"123\"]]], and [] for a missing key.\n */\n xrange = (...args) => new XRangeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/xrevrange\n * @see node_modules/@upstash/redis/docs/commands/stream/xrevrange.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n * With automaticDeserialization: false, xrevrange returns [id, [field, value, ...]] entries instead,\n * such as [[\"1790341484470-0\", [\"text\", \"123\"]]], and [] for a missing key.\n */\n xrevrange = (...args) => new XRevRangeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zadd\n * @see node_modules/@upstash/redis/docs/commands/zset/zadd.mdx\n */\n zadd = (...args) => {\n if (\"score\" in args[1]) {\n return new ZAddCommand([args[0], args[1], ...args.slice(2)], this.opts).exec(\n this.client\n );\n }\n return new ZAddCommand(\n [args[0], args[1], ...args.slice(2)],\n this.opts\n ).exec(this.client);\n };\n /**\n * @see https://redis.io/commands/zcard\n * @see node_modules/@upstash/redis/docs/commands/zset/zcard.mdx\n */\n zcard = (...args) => new ZCardCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zcount\n * @see node_modules/@upstash/redis/docs/commands/zset/zcount.mdx\n */\n zcount = (...args) => new ZCountCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zdiffstore\n * @see node_modules/@upstash/redis/docs/commands/zset/zdiffstore.mdx\n */\n zdiffstore = (...args) => new ZDiffStoreCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zincrby\n * @see node_modules/@upstash/redis/docs/commands/zset/zincrby.mdx\n */\n zincrby = (key, increment, member) => new ZIncrByCommand([key, increment, member], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zinterstore\n * @see node_modules/@upstash/redis/docs/commands/zset/zinterstore.mdx\n */\n zinterstore = (...args) => new ZInterStoreCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zlexcount\n * @see node_modules/@upstash/redis/docs/commands/zset/zlexcount.mdx\n */\n zlexcount = (...args) => new ZLexCountCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zmscore\n * @see node_modules/@upstash/redis/docs/commands/zset/zmscore.mdx\n */\n zmscore = (...args) => new ZMScoreCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zpopmax\n * @see node_modules/@upstash/redis/docs/commands/zset/zpopmax.mdx\n */\n zpopmax = (...args) => new ZPopMaxCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zpopmin\n * @see node_modules/@upstash/redis/docs/commands/zset/zpopmin.mdx\n */\n zpopmin = (...args) => new ZPopMinCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zrange\n * @see node_modules/@upstash/redis/docs/commands/zset/zrange.mdx\n * Responses are JSON-parsed automatically: a stored \"123\" comes back as the number 123, \"true\" as\n * true, and '{\"a\":1}' as an object. Pass automaticDeserialization: false to the Redis constructor\n * to receive raw strings.\n */\n zrange = (...args) => new ZRangeCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zrank\n * @see node_modules/@upstash/redis/docs/commands/zset/zrank.mdx\n */\n zrank = (key, member) => new ZRankCommand([key, member], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zrem\n * @see node_modules/@upstash/redis/docs/commands/zset/zrem.mdx\n */\n zrem = (key, ...members) => new ZRemCommand([key, ...members], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zremrangebylex\n * @see node_modules/@upstash/redis/docs/commands/zset/zremrangebylex.mdx\n */\n zremrangebylex = (...args) => new ZRemRangeByLexCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zremrangebyrank\n * @see node_modules/@upstash/redis/docs/commands/zset/zremrangebyrank.mdx\n */\n zremrangebyrank = (...args) => new ZRemRangeByRankCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zremrangebyscore\n * @see node_modules/@upstash/redis/docs/commands/zset/zremrangebyscore.mdx\n */\n zremrangebyscore = (...args) => new ZRemRangeByScoreCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zrevrank\n * @see node_modules/@upstash/redis/docs/commands/zset/zrevrank.mdx\n */\n zrevrank = (key, member) => new ZRevRankCommand([key, member], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zscan\n * @see node_modules/@upstash/redis/docs/commands/zset/zscan.mdx\n */\n zscan = (...args) => new ZScanCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zscore\n * @see node_modules/@upstash/redis/docs/commands/zset/zscore.mdx\n */\n zscore = (key, member) => new ZScoreCommand([key, member], this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zunion\n */\n zunion = (...args) => new ZUnionCommand(args, this.opts).exec(this.client);\n /**\n * @see https://redis.io/commands/zunionstore\n * @see node_modules/@upstash/redis/docs/commands/zset/zunionstore.mdx\n */\n zunionstore = (...args) => new ZUnionStoreCommand(args, this.opts).exec(this.client);\n};\n\n// version.ts\nvar VERSION = \"v1.41.0\";\n\nexport {\n error_exports,\n HttpClient,\n SearchIndex,\n VectorIndex,\n Redis,\n VERSION\n};\n",
16
+ "import {\n HttpClient,\n Redis,\n SearchIndex,\n VERSION,\n VectorIndex,\n error_exports\n} from \"./chunk-CGMWROAN.mjs\";\n\n// pkg/commands/search/schema-builder.ts\nvar BUILD = /* @__PURE__ */ Symbol(\"build\");\nvar TextFieldBuilder = class _TextFieldBuilder {\n _noTokenize;\n _noStem;\n _from;\n constructor(noTokenize = { noTokenize: false }, noStem = { noStem: false }, from = { from: null }) {\n this._noTokenize = noTokenize;\n this._noStem = noStem;\n this._from = from;\n }\n noTokenize() {\n return new _TextFieldBuilder({ noTokenize: true }, this._noStem, this._from);\n }\n noStem() {\n return new _TextFieldBuilder(this._noTokenize, { noStem: true }, this._from);\n }\n from(field) {\n return new _TextFieldBuilder(this._noTokenize, this._noStem, { from: field });\n }\n [BUILD]() {\n return {\n type: \"TEXT\",\n ...this._noTokenize.noTokenize ? { noTokenize: true } : {},\n ...this._noStem.noStem ? { noStem: true } : {},\n ...this._from.from ? { from: this._from.from } : {}\n };\n }\n};\nvar NumericFieldBuilder = class _NumericFieldBuilder {\n type;\n _from;\n constructor(type, from = { from: null }) {\n this.type = type;\n this._from = from;\n }\n from(field) {\n return new _NumericFieldBuilder(this.type, { from: field });\n }\n [BUILD]() {\n return this._from.from ? {\n type: this.type,\n fast: true,\n from: this._from.from\n } : {\n type: this.type,\n fast: true\n };\n }\n};\nvar BoolFieldBuilder = class _BoolFieldBuilder {\n _fast;\n _from;\n constructor(fast = { fast: false }, from = { from: null }) {\n this._fast = fast;\n this._from = from;\n }\n fast() {\n return new _BoolFieldBuilder({ fast: true }, this._from);\n }\n from(field) {\n return new _BoolFieldBuilder(this._fast, { from: field });\n }\n [BUILD]() {\n const hasFast = this._fast.fast;\n const hasFrom = Boolean(this._from.from);\n if (hasFast && hasFrom) {\n return {\n type: \"BOOL\",\n fast: true,\n from: this._from.from\n };\n }\n if (hasFast) {\n return {\n type: \"BOOL\",\n fast: true\n };\n }\n if (hasFrom) {\n return {\n type: \"BOOL\",\n from: this._from.from\n };\n }\n return { type: \"BOOL\" };\n }\n};\nvar DateFieldBuilder = class _DateFieldBuilder {\n _fast;\n _from;\n constructor(fast = { fast: false }, from = { from: null }) {\n this._fast = fast;\n this._from = from;\n }\n fast() {\n return new _DateFieldBuilder({ fast: true }, this._from);\n }\n from(field) {\n return new _DateFieldBuilder(this._fast, { from: field });\n }\n [BUILD]() {\n const hasFast = this._fast.fast;\n const hasFrom = Boolean(this._from.from);\n if (hasFast && hasFrom) {\n return {\n type: \"DATE\",\n fast: true,\n from: this._from.from\n };\n }\n if (hasFast) {\n return {\n type: \"DATE\",\n fast: true\n };\n }\n if (hasFrom) {\n return {\n type: \"DATE\",\n from: this._from.from\n };\n }\n return { type: \"DATE\" };\n }\n};\nvar HybridFieldBuilder = class _HybridFieldBuilder {\n _noStem;\n _from;\n constructor(noStem = { noStem: false }, from = { from: null }) {\n this._noStem = noStem;\n this._from = from;\n }\n noStem() {\n return new _HybridFieldBuilder({ noStem: true }, this._from);\n }\n from(field) {\n return new _HybridFieldBuilder(this._noStem, { from: field });\n }\n [BUILD]() {\n return {\n type: \"HYBRID\",\n ...this._noStem.noStem ? { noStem: true } : {},\n ...this._from.from ? { from: this._from.from } : {}\n };\n }\n};\nvar KeywordFieldBuilder = class {\n [BUILD]() {\n return { type: \"KEYWORD\" };\n }\n};\nvar FacetFieldBuilder = class {\n [BUILD]() {\n return { type: \"FACET\" };\n }\n};\nvar s = {\n string() {\n return new TextFieldBuilder();\n },\n number(type = \"F64\") {\n return new NumericFieldBuilder(type);\n },\n boolean() {\n return new BoolFieldBuilder();\n },\n date() {\n return new DateFieldBuilder();\n },\n /**\n * A TEXT field that is also embedded for semantic search with `$ann`.\n *\n * @see https://upstash.com/docs/redis/search/hybrid-search\n */\n hybrid() {\n return new HybridFieldBuilder();\n },\n keyword() {\n return new KeywordFieldBuilder();\n },\n facet() {\n return new FacetFieldBuilder();\n },\n object(fields) {\n const result = {};\n for (const [key, value] of Object.entries(fields)) {\n if (value && typeof value === \"object\" && BUILD in value) {\n result[key] = value[BUILD]();\n } else {\n result[key] = value;\n }\n }\n return result;\n }\n};\n\n// platforms/nodejs.ts\nif (typeof atob === \"undefined\") {\n global.atob = (b64) => Buffer.from(b64, \"base64\").toString(\"utf8\");\n}\nvar Redis2 = class _Redis extends Redis {\n /**\n * Create a new redis client by providing a custom `Requester` implementation\n *\n * @example\n * ```ts\n *\n * import { UpstashRequest, Requester, UpstashResponse, Redis } from \"@upstash/redis\"\n *\n * const requester: Requester = {\n * request: <TResult>(req: UpstashRequest): Promise<UpstashResponse<TResult>> => {\n * // ...\n * }\n * }\n *\n * const redis = new Redis(requester)\n * ```\n */\n constructor(configOrRequester) {\n if (\"request\" in configOrRequester) {\n super(configOrRequester);\n return;\n }\n if (!configOrRequester.url) {\n console.warn(\n `[Upstash Redis] The 'url' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`\n );\n } else if (configOrRequester.url.startsWith(\" \") || configOrRequester.url.endsWith(\" \") || /\\r|\\n/.test(configOrRequester.url)) {\n console.warn(\n \"[Upstash Redis] The redis url contains whitespace or newline, which can cause errors!\"\n );\n }\n if (!configOrRequester.token) {\n console.warn(\n `[Upstash Redis] The 'token' property is missing or undefined in your Redis config. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis`\n );\n } else if (configOrRequester.token.startsWith(\" \") || configOrRequester.token.endsWith(\" \") || /\\r|\\n/.test(configOrRequester.token)) {\n console.warn(\n \"[Upstash Redis] The redis token contains whitespace or newline, which can cause errors!\"\n );\n }\n const client = new HttpClient({\n baseUrl: configOrRequester.url,\n retry: configOrRequester.retry,\n headers: { authorization: `Bearer ${configOrRequester.token}` },\n agent: configOrRequester.agent,\n responseEncoding: configOrRequester.responseEncoding,\n cache: configOrRequester.cache ?? \"no-store\",\n signal: configOrRequester.signal,\n keepAlive: configOrRequester.keepAlive,\n readYourWrites: configOrRequester.readYourWrites\n });\n const safeEnv = typeof process === \"object\" && process && typeof process.env === \"object\" && process.env ? process.env : {};\n super(client, {\n automaticDeserialization: configOrRequester.automaticDeserialization,\n enableTelemetry: configOrRequester.enableTelemetry ?? !safeEnv.UPSTASH_DISABLE_TELEMETRY,\n latencyLogging: configOrRequester.latencyLogging,\n enableAutoPipelining: configOrRequester.enableAutoPipelining\n });\n const nodeVersion = typeof process === \"object\" && process ? process.version : void 0;\n this.addTelemetry({\n runtime: (\n // @ts-expect-error to silence compiler\n typeof EdgeRuntime === \"string\" ? \"edge-light\" : nodeVersion ? `node@${nodeVersion}` : \"unknown\"\n ),\n platform: safeEnv.UPSTASH_CONSOLE ? \"console\" : safeEnv.VERCEL ? \"vercel\" : safeEnv.AWS_REGION ? \"aws\" : \"unknown\",\n sdk: `@upstash/redis@${VERSION}`\n });\n if (this.enableAutoPipelining) {\n return this.autoPipeline();\n }\n }\n /**\n * Create a new Upstash Redis instance from environment variables.\n *\n * Use this to automatically load connection secrets from your environment\n * variables. For instance when using the Vercel integration.\n *\n * This tries to load connection details from your environment using `process.env`:\n * - URL: `UPSTASH_REDIS_REST_URL` or fallback to `KV_REST_API_URL`\n * - Token: `UPSTASH_REDIS_REST_TOKEN` or fallback to `KV_REST_API_TOKEN`\n *\n * The fallback variables provide compatibility with Vercel KV and other platforms\n * that may use different naming conventions.\n */\n static fromEnv(config) {\n if (typeof process !== \"object\" || !process || typeof process.env !== \"object\" || !process.env) {\n throw new TypeError(\n '[Upstash Redis] Unable to get environment variables, `process.env` is undefined. If you are deploying to cloudflare, please import from \"@upstash/redis/cloudflare\" instead'\n );\n }\n const url = process.env.UPSTASH_REDIS_REST_URL || process.env.KV_REST_API_URL;\n if (!url) {\n console.warn(\n \"[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis\"\n );\n }\n const token = process.env.UPSTASH_REDIS_REST_TOKEN || process.env.KV_REST_API_TOKEN;\n if (!token) {\n console.warn(\n \"[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. To create a database instantly (no signup needed), run: curl -X POST https://upstash.com/start-redis\"\n );\n }\n return new _Redis({ ...config, url, token });\n }\n};\nexport {\n Redis2 as Redis,\n SearchIndex,\n VectorIndex,\n error_exports as errors,\n s\n};\n"
17
+ ],
18
+ "mappings": ";;;;2EAGO,DAAM,EAAgB,MCDtB,MAAe,CAAoB,CA4B1C,CCrBA,IAAM,GAAgB,sB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