@upstash/redis 1.12.0-rc.1 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +1 -0
- package/esm/deps/{denopkg.com/chiefbiiko/sha1@master → deno.land/x/sha1@v1.0.3}/mod.js +0 -0
- package/esm/deps/denopkg.com/chiefbiiko/{std-encoding@v1.1.1 → std-encoding@v1.0.0}/mod.js +4 -8
- package/esm/pkg/script.js +1 -1
- package/package.json +1 -1
- package/script/deps/{denopkg.com/chiefbiiko/sha1@master → deno.land/x/sha1@v1.0.3}/deps.js +1 -1
- package/script/deps/{denopkg.com/chiefbiiko/sha1@master → deno.land/x/sha1@v1.0.3}/mod.js +0 -0
- package/script/deps/denopkg.com/chiefbiiko/{std-encoding@v1.1.1 → std-encoding@v1.0.0}/mod.js +4 -31
- package/script/pkg/script.js +1 -1
- package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +1 -0
- package/types/deps/{denopkg.com/chiefbiiko/sha1@master → deno.land/x/sha1@v1.0.3}/mod.d.ts +0 -0
- package/types/deps/denopkg.com/chiefbiiko/{std-encoding@v1.1.1 → std-encoding@v1.0.0}/mod.d.ts +0 -0
- package/types/pkg/pipeline.d.ts +1 -1
- package/types/pkg/redis.d.ts +1 -1
- package/esm/deps/deno.land/x/base64@v0.2.1/mod.js +0 -13
- package/esm/deps/denopkg.com/chiefbiiko/sha1@master/deps.js +0 -1
- package/script/deps/deno.land/x/base64@v0.2.1/mod.js +0 -17
- package/types/deps/deno.land/x/base64@v0.2.1/mod.d.ts +0 -1
- package/types/deps/denopkg.com/chiefbiiko/sha1@master/deps.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { encode, decode } from "../../../denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js";
|
|
File without changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as base64url from "../../../deno.land/x/base64@v0.2.1/base64url.js";
|
|
1
|
+
import { toUint8Array, fromUint8Array } from "../../../deno.land/x/base64@v0.2.1/base64url.js";
|
|
3
2
|
const decoder = new TextDecoder();
|
|
4
3
|
const encoder = new TextEncoder();
|
|
5
4
|
/** Serializes a Uint8Array to a hexadecimal string. */
|
|
@@ -26,10 +25,7 @@ export function decode(buf, encoding = "utf8") {
|
|
|
26
25
|
return decoder.decode(buf);
|
|
27
26
|
}
|
|
28
27
|
else if (/^base64$/i.test(encoding)) {
|
|
29
|
-
return
|
|
30
|
-
}
|
|
31
|
-
else if (/^base64url$/i.test(encoding)) {
|
|
32
|
-
return base64url.fromUint8Array(buf);
|
|
28
|
+
return fromUint8Array(buf);
|
|
33
29
|
}
|
|
34
30
|
else if (/^hex(?:adecimal)?$/i.test(encoding)) {
|
|
35
31
|
return toHexString(buf);
|
|
@@ -42,8 +38,8 @@ export function encode(str, encoding = "utf8") {
|
|
|
42
38
|
if (/^utf-?8$/i.test(encoding)) {
|
|
43
39
|
return encoder.encode(str);
|
|
44
40
|
}
|
|
45
|
-
else if (/^base64
|
|
46
|
-
return
|
|
41
|
+
else if (/^base64$/i.test(encoding)) {
|
|
42
|
+
return toUint8Array(str);
|
|
47
43
|
}
|
|
48
44
|
else if (/^hex(?:adecimal)?$/i.test(encoding)) {
|
|
49
45
|
return fromHexString(str);
|
package/esm/pkg/script.js
CHANGED
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.12.0
|
|
6
|
+
"version": "v1.12.0",
|
|
7
7
|
"description": "An HTTP/REST based Redis client built on top of Upstash REST API.",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.decode = exports.encode = void 0;
|
|
4
|
-
var mod_js_1 = require("
|
|
4
|
+
var mod_js_1 = require("../../../denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js");
|
|
5
5
|
Object.defineProperty(exports, "encode", { enumerable: true, get: function () { return mod_js_1.encode; } });
|
|
6
6
|
Object.defineProperty(exports, "decode", { enumerable: true, get: function () { return mod_js_1.decode; } });
|
|
File without changes
|
package/script/deps/denopkg.com/chiefbiiko/{std-encoding@v1.1.1 → std-encoding@v1.0.0}/mod.js
RENAMED
|
@@ -1,31 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.encode = exports.decode = void 0;
|
|
27
|
-
const
|
|
28
|
-
const base64url = __importStar(require("../../../deno.land/x/base64@v0.2.1/base64url.js"));
|
|
4
|
+
const base64url_js_1 = require("../../../deno.land/x/base64@v0.2.1/base64url.js");
|
|
29
5
|
const decoder = new TextDecoder();
|
|
30
6
|
const encoder = new TextEncoder();
|
|
31
7
|
/** Serializes a Uint8Array to a hexadecimal string. */
|
|
@@ -52,10 +28,7 @@ function decode(buf, encoding = "utf8") {
|
|
|
52
28
|
return decoder.decode(buf);
|
|
53
29
|
}
|
|
54
30
|
else if (/^base64$/i.test(encoding)) {
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
else if (/^base64url$/i.test(encoding)) {
|
|
58
|
-
return base64url.fromUint8Array(buf);
|
|
31
|
+
return (0, base64url_js_1.fromUint8Array)(buf);
|
|
59
32
|
}
|
|
60
33
|
else if (/^hex(?:adecimal)?$/i.test(encoding)) {
|
|
61
34
|
return toHexString(buf);
|
|
@@ -69,8 +42,8 @@ function encode(str, encoding = "utf8") {
|
|
|
69
42
|
if (/^utf-?8$/i.test(encoding)) {
|
|
70
43
|
return encoder.encode(str);
|
|
71
44
|
}
|
|
72
|
-
else if (/^base64
|
|
73
|
-
return
|
|
45
|
+
else if (/^base64$/i.test(encoding)) {
|
|
46
|
+
return (0, base64url_js_1.toUint8Array)(str);
|
|
74
47
|
}
|
|
75
48
|
else if (/^hex(?:adecimal)?$/i.test(encoding)) {
|
|
76
49
|
return fromHexString(str);
|
package/script/pkg/script.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Script = void 0;
|
|
4
|
-
const mod_js_1 = require("../deps/
|
|
4
|
+
const mod_js_1 = require("../deps/deno.land/x/sha1@v1.0.3/mod.js");
|
|
5
5
|
/**
|
|
6
6
|
* Creates a new script.
|
|
7
7
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { encode, decode } from "../../../denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js";
|
|
File without changes
|
package/types/deps/denopkg.com/chiefbiiko/{std-encoding@v1.1.1 → std-encoding@v1.0.0}/mod.d.ts
RENAMED
|
File without changes
|
package/types/pkg/pipeline.d.ts
CHANGED
|
@@ -374,7 +374,7 @@ export declare class Pipeline {
|
|
|
374
374
|
/**
|
|
375
375
|
* @see https://redis.io/commands/set
|
|
376
376
|
*/
|
|
377
|
-
set: <TData>(key: string, value: TData, opts?: SetCommandOptions
|
|
377
|
+
set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => this;
|
|
378
378
|
/**
|
|
379
379
|
* @see https://redis.io/commands/setbit
|
|
380
380
|
*/
|
package/types/pkg/redis.d.ts
CHANGED
|
@@ -356,7 +356,7 @@ export declare class Redis {
|
|
|
356
356
|
/**
|
|
357
357
|
* @see https://redis.io/commands/set
|
|
358
358
|
*/
|
|
359
|
-
set: <TData>(key: string, value: TData, opts?: SetCommandOptions
|
|
359
|
+
set: <TData>(key: string, value: TData, opts?: SetCommandOptions) => Promise<"OK" | TData | null>;
|
|
360
360
|
/**
|
|
361
361
|
* @see https://redis.io/commands/setbit
|
|
362
362
|
*/
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { init } from "./base.js";
|
|
2
|
-
const lookup = [];
|
|
3
|
-
const revLookup = [];
|
|
4
|
-
const code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
5
|
-
for (let i = 0, l = code.length; i < l; ++i) {
|
|
6
|
-
lookup[i] = code[i];
|
|
7
|
-
revLookup[code.charCodeAt(i)] = i;
|
|
8
|
-
}
|
|
9
|
-
// Support decoding URL-safe base64 strings, as Node.js does.
|
|
10
|
-
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
|
11
|
-
revLookup["-".charCodeAt(0)] = 62;
|
|
12
|
-
revLookup["_".charCodeAt(0)] = 63;
|
|
13
|
-
export const { byteLength, toUint8Array, fromUint8Array } = init(lookup, revLookup);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { encode, decode } from "../std-encoding@v1.1.1/mod.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.fromUint8Array = exports.toUint8Array = exports.byteLength = void 0;
|
|
5
|
-
const base_js_1 = require("./base.js");
|
|
6
|
-
const lookup = [];
|
|
7
|
-
const revLookup = [];
|
|
8
|
-
const code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
9
|
-
for (let i = 0, l = code.length; i < l; ++i) {
|
|
10
|
-
lookup[i] = code[i];
|
|
11
|
-
revLookup[code.charCodeAt(i)] = i;
|
|
12
|
-
}
|
|
13
|
-
// Support decoding URL-safe base64 strings, as Node.js does.
|
|
14
|
-
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
|
15
|
-
revLookup["-".charCodeAt(0)] = 62;
|
|
16
|
-
revLookup["_".charCodeAt(0)] = 63;
|
|
17
|
-
_a = (0, base_js_1.init)(lookup, revLookup), exports.byteLength = _a.byteLength, exports.toUint8Array = _a.toUint8Array, exports.fromUint8Array = _a.fromUint8Array;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const byteLength: (b64: string) => number, toUint8Array: (b64: string) => Uint8Array, fromUint8Array: (buf: Uint8Array) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { encode, decode } from "../std-encoding@v1.1.1/mod.js";
|