@upstash/redis 1.18.3 → 1.18.5-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ import { Command } from "./command.js";
2
+ /**
3
+ * @see https://redis.io/commands/lmove
4
+ */
5
+ export class LMoveCommand extends Command {
6
+ constructor(cmd, opts) {
7
+ super(["lmove", ...cmd], opts);
8
+ }
9
+ }
@@ -43,6 +43,7 @@ export * from "./keys.js";
43
43
  export * from "./lindex.js";
44
44
  export * from "./linsert.js";
45
45
  export * from "./llen.js";
46
+ export * from "./lmove.js";
46
47
  export * from "./lpop.js";
47
48
  export * from "./lpos.js";
48
49
  export * from "./lpush.js";
package/esm/pkg/http.js CHANGED
@@ -115,12 +115,12 @@ function base64decode(b64) {
115
115
  catch {
116
116
  dec = b64;
117
117
  }
118
- try {
119
- return decodeURIComponent(dec);
120
- }
121
- catch {
122
- return dec;
123
- }
118
+ return dec;
119
+ // try {
120
+ // return decodeURIComponent(dec);
121
+ // } catch {
122
+ // return dec;
123
+ // }
124
124
  }
125
125
  function decode(raw) {
126
126
  let result = undefined;
@@ -1,4 +1,4 @@
1
- import { AppendCommand, BitCountCommand, BitOpCommand, BitPosCommand, DBSizeCommand, DecrByCommand, DecrCommand, DelCommand, EchoCommand, EvalCommand, EvalshaCommand, ExistsCommand, ExpireAtCommand, ExpireCommand, FlushAllCommand, FlushDBCommand, GetBitCommand, GetCommand, GetDelCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HGetAllCommand, HGetCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMGetCommand, HMSetCommand, HScanCommand, HSetCommand, HSetNXCommand, HStrLenCommand, HValsCommand, IncrByCommand, IncrByFloatCommand, IncrCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LPopCommand, LPosCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PersistCommand, PExpireAtCommand, PExpireCommand, PingCommand, PSetEXCommand, PTtlCommand, PublishCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, RPopCommand, RPushCommand, RPushXCommand, SAddCommand, ScanCommand, SCardCommand, ScriptExistsCommand, ScriptFlushCommand, ScriptLoadCommand, SDiffCommand, SDiffStoreCommand, SetBitCommand, SetCommand, SetExCommand, SetNxCommand, SetRangeCommand, SInterCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, StrLenCommand, SUnionCommand, SUnionStoreCommand, TimeCommand, TouchCommand, TtlCommand, TypeCommand, UnlinkCommand, ZAddCommand, ZCardCommand, ZCountCommand, ZIncrByCommand, ZInterStoreCommand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRangeCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand, ZUnionStoreCommand, } from "./commands/mod.js";
1
+ import { AppendCommand, BitCountCommand, BitOpCommand, BitPosCommand, DBSizeCommand, DecrByCommand, DecrCommand, DelCommand, EchoCommand, EvalCommand, EvalshaCommand, ExistsCommand, ExpireAtCommand, ExpireCommand, FlushAllCommand, FlushDBCommand, GetBitCommand, GetCommand, GetDelCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HGetAllCommand, HGetCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMGetCommand, HMSetCommand, HScanCommand, HSetCommand, HSetNXCommand, HStrLenCommand, HValsCommand, IncrByCommand, IncrByFloatCommand, IncrCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LMoveCommand, LPopCommand, LPosCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PersistCommand, PExpireAtCommand, PExpireCommand, PingCommand, PSetEXCommand, PTtlCommand, PublishCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, RPopCommand, RPushCommand, RPushXCommand, SAddCommand, ScanCommand, SCardCommand, ScriptExistsCommand, ScriptFlushCommand, ScriptLoadCommand, SDiffCommand, SDiffStoreCommand, SetBitCommand, SetCommand, SetExCommand, SetNxCommand, SetRangeCommand, SInterCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, StrLenCommand, SUnionCommand, SUnionStoreCommand, TimeCommand, TouchCommand, TtlCommand, TypeCommand, UnlinkCommand, ZAddCommand, ZCardCommand, ZCountCommand, ZIncrByCommand, ZInterStoreCommand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRangeCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand, ZUnionStoreCommand, } from "./commands/mod.js";
2
2
  import { UpstashError } from "./error.js";
3
3
  import { ZMScoreCommand } from "./commands/zmscore.js";
4
4
  import { HRandFieldCommand } from "./commands/hrandfield.js";
@@ -493,6 +493,15 @@ export class Pipeline {
493
493
  writable: true,
494
494
  value: (...args) => this.chain(new LLenCommand(args, this.commandOptions))
495
495
  });
496
+ /**
497
+ * @see https://redis.io/commands/lmove
498
+ */
499
+ Object.defineProperty(this, "lmove", {
500
+ enumerable: true,
501
+ configurable: true,
502
+ writable: true,
503
+ value: (...args) => this.chain(new LMoveCommand(args, this.commandOptions))
504
+ });
496
505
  /**
497
506
  * @see https://redis.io/commands/lpop
498
507
  */
package/esm/pkg/redis.js CHANGED
@@ -1,4 +1,4 @@
1
- import { AppendCommand, BitCountCommand, BitOpCommand, BitPosCommand, DBSizeCommand, DecrByCommand, DecrCommand, DelCommand, EchoCommand, EvalCommand, EvalshaCommand, ExistsCommand, ExpireAtCommand, ExpireCommand, FlushAllCommand, FlushDBCommand, GetBitCommand, GetCommand, GetDelCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HGetAllCommand, HGetCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMGetCommand, HMSetCommand, HRandFieldCommand, HScanCommand, HSetCommand, HSetNXCommand, HStrLenCommand, HValsCommand, IncrByCommand, IncrByFloatCommand, IncrCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LPopCommand, LPosCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PersistCommand, PExpireAtCommand, PExpireCommand, PingCommand, PSetEXCommand, PTtlCommand, PublishCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, RPopCommand, RPushCommand, RPushXCommand, SAddCommand, ScanCommand, SCardCommand, ScriptExistsCommand, ScriptFlushCommand, ScriptLoadCommand, SDiffCommand, SDiffStoreCommand, SetBitCommand, SetCommand, SetExCommand, SetNxCommand, SetRangeCommand, SInterCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, StrLenCommand, SUnionCommand, SUnionStoreCommand, TimeCommand, TouchCommand, TtlCommand, TypeCommand, UnlinkCommand, ZAddCommand, ZCardCommand, ZCountCommand, ZIncrByCommand, ZInterStoreCommand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRangeCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand, ZUnionStoreCommand, } from "./commands/mod.js";
1
+ import { AppendCommand, BitCountCommand, BitOpCommand, BitPosCommand, DBSizeCommand, DecrByCommand, DecrCommand, DelCommand, EchoCommand, EvalCommand, EvalshaCommand, ExistsCommand, ExpireAtCommand, ExpireCommand, FlushAllCommand, FlushDBCommand, GetBitCommand, GetCommand, GetDelCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HGetAllCommand, HGetCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMGetCommand, HMSetCommand, HRandFieldCommand, HScanCommand, HSetCommand, HSetNXCommand, HStrLenCommand, HValsCommand, IncrByCommand, IncrByFloatCommand, IncrCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LMoveCommand, LPopCommand, LPosCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PersistCommand, PExpireAtCommand, PExpireCommand, PingCommand, PSetEXCommand, PTtlCommand, PublishCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, RPopCommand, RPushCommand, RPushXCommand, SAddCommand, ScanCommand, SCardCommand, ScriptExistsCommand, ScriptFlushCommand, ScriptLoadCommand, SDiffCommand, SDiffStoreCommand, SetBitCommand, SetCommand, SetExCommand, SetNxCommand, SetRangeCommand, SInterCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, StrLenCommand, SUnionCommand, SUnionStoreCommand, TimeCommand, TouchCommand, TtlCommand, TypeCommand, UnlinkCommand, ZAddCommand, ZCardCommand, ZCountCommand, ZIncrByCommand, ZInterStoreCommand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRangeCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand, ZUnionStoreCommand, } from "./commands/mod.js";
2
2
  import { Pipeline } from "./pipeline.js";
3
3
  import { Script } from "./script.js";
4
4
  import { ZMScoreCommand } from "./commands/zmscore.js";
@@ -473,6 +473,15 @@ export class Redis {
473
473
  writable: true,
474
474
  value: (...args) => new LLenCommand(args, this.opts).exec(this.client)
475
475
  });
476
+ /**
477
+ * @see https://redis.io/commands/lmove
478
+ */
479
+ Object.defineProperty(this, "lmove", {
480
+ enumerable: true,
481
+ configurable: true,
482
+ writable: true,
483
+ value: (...args) => new LMoveCommand(args, this.opts).exec(this.client)
484
+ });
476
485
  /**
477
486
  * @see https://redis.io/commands/lpop
478
487
  */
package/esm/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "v1.18.3";
1
+ export const VERSION = "v1.18.5-rc.0";
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/platforms/nodejs.js",
4
4
  "types": "./types/platforms/nodejs.d.ts",
5
5
  "name": "@upstash/redis",
6
- "version": "v1.18.3",
6
+ "version": "v1.18.5-rc.0",
7
7
  "description": "An HTTP/REST based Redis client built on top of Upstash REST API.",
8
8
  "repository": {
9
9
  "type": "git",
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LMoveCommand = void 0;
4
+ const command_js_1 = require("./command.js");
5
+ /**
6
+ * @see https://redis.io/commands/lmove
7
+ */
8
+ class LMoveCommand extends command_js_1.Command {
9
+ constructor(cmd, opts) {
10
+ super(["lmove", ...cmd], opts);
11
+ }
12
+ }
13
+ exports.LMoveCommand = LMoveCommand;
@@ -59,6 +59,7 @@ __exportStar(require("./keys.js"), exports);
59
59
  __exportStar(require("./lindex.js"), exports);
60
60
  __exportStar(require("./linsert.js"), exports);
61
61
  __exportStar(require("./llen.js"), exports);
62
+ __exportStar(require("./lmove.js"), exports);
62
63
  __exportStar(require("./lpop.js"), exports);
63
64
  __exportStar(require("./lpos.js"), exports);
64
65
  __exportStar(require("./lpush.js"), exports);
@@ -119,12 +119,12 @@ function base64decode(b64) {
119
119
  catch {
120
120
  dec = b64;
121
121
  }
122
- try {
123
- return decodeURIComponent(dec);
124
- }
125
- catch {
126
- return dec;
127
- }
122
+ return dec;
123
+ // try {
124
+ // return decodeURIComponent(dec);
125
+ // } catch {
126
+ // return dec;
127
+ // }
128
128
  }
129
129
  function decode(raw) {
130
130
  let result = undefined;
@@ -496,6 +496,15 @@ class Pipeline {
496
496
  writable: true,
497
497
  value: (...args) => this.chain(new mod_js_1.LLenCommand(args, this.commandOptions))
498
498
  });
499
+ /**
500
+ * @see https://redis.io/commands/lmove
501
+ */
502
+ Object.defineProperty(this, "lmove", {
503
+ enumerable: true,
504
+ configurable: true,
505
+ writable: true,
506
+ value: (...args) => this.chain(new mod_js_1.LMoveCommand(args, this.commandOptions))
507
+ });
499
508
  /**
500
509
  * @see https://redis.io/commands/lpop
501
510
  */
@@ -476,6 +476,15 @@ class Redis {
476
476
  writable: true,
477
477
  value: (...args) => new mod_js_1.LLenCommand(args, this.opts).exec(this.client)
478
478
  });
479
+ /**
480
+ * @see https://redis.io/commands/lmove
481
+ */
482
+ Object.defineProperty(this, "lmove", {
483
+ enumerable: true,
484
+ configurable: true,
485
+ writable: true,
486
+ value: (...args) => new mod_js_1.LMoveCommand(args, this.opts).exec(this.client)
487
+ });
479
488
  /**
480
489
  * @see https://redis.io/commands/lpop
481
490
  */
package/script/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = "v1.18.3";
4
+ exports.VERSION = "v1.18.5-rc.0";
@@ -0,0 +1,12 @@
1
+ import { Command, CommandOptions } from "./command.js";
2
+ /**
3
+ * @see https://redis.io/commands/lmove
4
+ */
5
+ export declare class LMoveCommand<TData = string> extends Command<TData, TData> {
6
+ constructor(cmd: [
7
+ source: string,
8
+ destination: string,
9
+ whereFrom: "left" | "right",
10
+ whereTo: "left" | "right"
11
+ ], opts?: CommandOptions<TData, TData>);
12
+ }
@@ -43,6 +43,7 @@ export * from "./keys.js";
43
43
  export * from "./lindex.js";
44
44
  export * from "./linsert.js";
45
45
  export * from "./llen.js";
46
+ export * from "./lmove.js";
46
47
  export * from "./lpop.js";
47
48
  export * from "./lpos.js";
48
49
  export * from "./lpush.js";
@@ -251,6 +251,10 @@ export declare class Pipeline {
251
251
  * @see https://redis.io/commands/llen
252
252
  */
253
253
  llen: (key: string) => this;
254
+ /**
255
+ * @see https://redis.io/commands/lmove
256
+ */
257
+ lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => this;
254
258
  /**
255
259
  * @see https://redis.io/commands/lpop
256
260
  */
@@ -239,6 +239,10 @@ export declare class Redis {
239
239
  * @see https://redis.io/commands/llen
240
240
  */
241
241
  llen: (key: string) => Promise<number>;
242
+ /**
243
+ * @see https://redis.io/commands/lmove
244
+ */
245
+ lmove: <TData = string>(source: string, destination: string, whereFrom: "left" | "right", whereTo: "left" | "right") => Promise<TData>;
242
246
  /**
243
247
  * @see https://redis.io/commands/lpop
244
248
  */
@@ -1 +1 @@
1
- export declare const VERSION = "v1.18.3";
1
+ export declare const VERSION = "v1.18.5-rc.0";