@awsless/cli 0.1.46 → 0.1.48
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/dist/bin.js +38304 -47797
- package/dist/handlers/bundle.js +17 -17
- package/dist/handlers/icon.js +3216 -3216
- package/dist/handlers/on-error-log.js +17 -20
- package/dist/handlers/on-failure.js +1 -1
- package/dist/handlers/pubsub-publisher.js +146 -146
- package/dist/handlers/pubsub-server.js +6315 -6366
- package/dist/handlers/rolldown-worker.js +376 -376
- package/dist/test-global-setup.js +12 -105
- package/package.json +29 -29
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -4787,9 +4787,9 @@ var require_built = __commonJS(function(exports) {
|
|
|
4787
4787
|
exports.list = Object.keys(commandMetadata);
|
|
4788
4788
|
var flags = {};
|
|
4789
4789
|
exports.list.forEach((commandName) => {
|
|
4790
|
-
flags[commandName] = commandMetadata[commandName].flags.reduce(function(
|
|
4791
|
-
|
|
4792
|
-
return
|
|
4790
|
+
flags[commandName] = commandMetadata[commandName].flags.reduce(function(flags, flag) {
|
|
4791
|
+
flags[flag] = true;
|
|
4792
|
+
return flags;
|
|
4793
4793
|
}, {});
|
|
4794
4794
|
});
|
|
4795
4795
|
function exists(commandName, options) {
|
|
@@ -4824,17 +4824,17 @@ var require_built = __commonJS(function(exports) {
|
|
|
4824
4824
|
}
|
|
4825
4825
|
const keys = [];
|
|
4826
4826
|
const parseExternalKey = Boolean(options && options.parseExternalKey);
|
|
4827
|
-
const takeDynamicKeys = (
|
|
4828
|
-
const
|
|
4829
|
-
const keyStop = Number(
|
|
4827
|
+
const takeDynamicKeys = (args, startIndex) => {
|
|
4828
|
+
const keys = [];
|
|
4829
|
+
const keyStop = Number(args[startIndex]);
|
|
4830
4830
|
for (let i = 0;i < keyStop; i++) {
|
|
4831
|
-
|
|
4831
|
+
keys.push(i + startIndex + 1);
|
|
4832
4832
|
}
|
|
4833
|
-
return
|
|
4833
|
+
return keys;
|
|
4834
4834
|
};
|
|
4835
|
-
const takeKeyAfterToken = (
|
|
4836
|
-
for (let i = startIndex;i <
|
|
4837
|
-
if (String(
|
|
4835
|
+
const takeKeyAfterToken = (args, startIndex, token) => {
|
|
4836
|
+
for (let i = startIndex;i < args.length - 1; i += 1) {
|
|
4837
|
+
if (String(args[i]).toLowerCase() === token.toLowerCase()) {
|
|
4838
4838
|
return i + 1;
|
|
4839
4839
|
}
|
|
4840
4840
|
}
|
|
@@ -5453,7 +5453,7 @@ var require_lib = __commonJS(function(exports, module) {
|
|
|
5453
5453
|
3793,
|
|
5454
5454
|
7920
|
|
5455
5455
|
];
|
|
5456
|
-
var toUTF8Array = function
|
|
5456
|
+
var toUTF8Array = function toUTF8Array(str) {
|
|
5457
5457
|
var char;
|
|
5458
5458
|
var i = 0;
|
|
5459
5459
|
var p = 0;
|
|
@@ -5480,7 +5480,7 @@ var require_lib = __commonJS(function(exports, module) {
|
|
|
5480
5480
|
}
|
|
5481
5481
|
return utf8;
|
|
5482
5482
|
};
|
|
5483
|
-
var generate = module.exports = function
|
|
5483
|
+
var generate = module.exports = function generate(str) {
|
|
5484
5484
|
var char;
|
|
5485
5485
|
var i = 0;
|
|
5486
5486
|
var start = -1;
|
|
@@ -6309,8 +6309,8 @@ var require_node = __commonJS(function(exports, module) {
|
|
|
6309
6309
|
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
6310
6310
|
}
|
|
6311
6311
|
function formatArgs(args) {
|
|
6312
|
-
const { namespace: name, useColors
|
|
6313
|
-
if (
|
|
6312
|
+
const { namespace: name, useColors } = this;
|
|
6313
|
+
if (useColors) {
|
|
6314
6314
|
const c = this.color;
|
|
6315
6315
|
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
6316
6316
|
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
@@ -6692,7 +6692,7 @@ var require_utils2 = __commonJS(function(exports) {
|
|
|
6692
6692
|
return result;
|
|
6693
6693
|
}
|
|
6694
6694
|
exports.packObject = packObject;
|
|
6695
|
-
function timeout(callback,
|
|
6695
|
+
function timeout(callback, timeout) {
|
|
6696
6696
|
let timer = null;
|
|
6697
6697
|
const run = function() {
|
|
6698
6698
|
if (timer) {
|
|
@@ -6701,7 +6701,7 @@ var require_utils2 = __commonJS(function(exports) {
|
|
|
6701
6701
|
callback.apply(this, arguments);
|
|
6702
6702
|
}
|
|
6703
6703
|
};
|
|
6704
|
-
timer = setTimeout(run,
|
|
6704
|
+
timer = setTimeout(run, timeout, new Error("timeout"));
|
|
6705
6705
|
return run;
|
|
6706
6706
|
}
|
|
6707
6707
|
exports.timeout = timeout;
|
|
@@ -6766,18 +6766,18 @@ var require_utils2 = __commonJS(function(exports) {
|
|
|
6766
6766
|
const isProtocolRelative = rawUrl.startsWith("//");
|
|
6767
6767
|
if (rawUrl[0] === "/" && !isProtocolRelative) {
|
|
6768
6768
|
const qIdx = rawUrl.indexOf("?");
|
|
6769
|
-
const
|
|
6769
|
+
const result = {
|
|
6770
6770
|
path: qIdx === -1 ? rawUrl : rawUrl.slice(0, qIdx)
|
|
6771
6771
|
};
|
|
6772
6772
|
if (qIdx !== -1) {
|
|
6773
|
-
const
|
|
6773
|
+
const options = {};
|
|
6774
6774
|
const params = new URLSearchParams(rawUrl.slice(qIdx + 1));
|
|
6775
6775
|
params.forEach((value, key) => {
|
|
6776
|
-
|
|
6776
|
+
options[key] = parseURLQueryItem(key, value);
|
|
6777
6777
|
});
|
|
6778
|
-
(0, lodash_1.defaults)(
|
|
6778
|
+
(0, lodash_1.defaults)(result, options);
|
|
6779
6779
|
}
|
|
6780
|
-
return
|
|
6780
|
+
return result;
|
|
6781
6781
|
}
|
|
6782
6782
|
let parsed;
|
|
6783
6783
|
if (hasProtocol) {
|
|
@@ -7022,7 +7022,7 @@ var require_replyTransformers = __commonJS(function(exports) {
|
|
|
7022
7022
|
|
|
7023
7023
|
// ../../node_modules/.pnpm/ioredis@6.0.0_supports-color@8.1.1/node_modules/ioredis/built/Command.js
|
|
7024
7024
|
var require_Command = __commonJS(function(exports) {
|
|
7025
|
-
var __dirname = "/Users/
|
|
7025
|
+
var __dirname = "/Users/work/Code/awsless/node_modules/.pnpm/ioredis@6.0.0_supports-color@8.1.1/node_modules/ioredis/built";
|
|
7026
7026
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7027
7027
|
var commands_1 = require_built();
|
|
7028
7028
|
var calculateSlot = require_lib();
|
|
@@ -7600,10 +7600,10 @@ var require_autoPipelining = __commonJS(function(exports) {
|
|
|
7600
7600
|
slotKey += isReadOnly ? ":read" : ":write";
|
|
7601
7601
|
}
|
|
7602
7602
|
if (!client._autoPipelines.has(slotKey)) {
|
|
7603
|
-
const
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
client._autoPipelines.set(slotKey,
|
|
7603
|
+
const pipeline = client.pipeline();
|
|
7604
|
+
pipeline[exports.kExec] = false;
|
|
7605
|
+
pipeline[exports.kCallbacks] = [];
|
|
7606
|
+
client._autoPipelines.set(slotKey, pipeline);
|
|
7607
7607
|
}
|
|
7608
7608
|
const pipeline = client._autoPipelines.get(slotKey);
|
|
7609
7609
|
if (!pipeline[exports.kExec]) {
|
|
@@ -8632,7 +8632,7 @@ var require_transaction = __commonJS(function(exports) {
|
|
|
8632
8632
|
if (Array.isArray(commands)) {
|
|
8633
8633
|
pipeline.addBatch(commands);
|
|
8634
8634
|
}
|
|
8635
|
-
const
|
|
8635
|
+
const exec = pipeline.exec;
|
|
8636
8636
|
pipeline.exec = function(callback) {
|
|
8637
8637
|
if (this.isCluster && !this.redis.slots.length) {
|
|
8638
8638
|
if (this.redis.status === "wait")
|
|
@@ -8648,13 +8648,13 @@ var require_transaction = __commonJS(function(exports) {
|
|
|
8648
8648
|
}), callback);
|
|
8649
8649
|
}
|
|
8650
8650
|
if (this._transactions > 0) {
|
|
8651
|
-
|
|
8651
|
+
exec.call(pipeline);
|
|
8652
8652
|
}
|
|
8653
8653
|
if (this.nodeifiedPromise) {
|
|
8654
|
-
return
|
|
8654
|
+
return exec.call(pipeline);
|
|
8655
8655
|
}
|
|
8656
8656
|
const batchSize = Math.max(pipeline.length - 2, 0);
|
|
8657
|
-
const execAndUnwrap = () =>
|
|
8657
|
+
const execAndUnwrap = () => exec.call(pipeline).then(function(result) {
|
|
8658
8658
|
const execResult = result[result.length - 1];
|
|
8659
8659
|
if (typeof execResult === "undefined") {
|
|
8660
8660
|
throw new Error("Pipeline cannot be used to send any commands when the `exec()` has been called on it.");
|
|
@@ -10240,8 +10240,8 @@ var require_cluster = __commonJS(function(exports) {
|
|
|
10240
10240
|
const _this = this;
|
|
10241
10241
|
const wrapper = (error) => {
|
|
10242
10242
|
this.isRefreshing = false;
|
|
10243
|
-
for (const
|
|
10244
|
-
|
|
10243
|
+
for (const callback of this._refreshSlotsCacheCallbacks) {
|
|
10244
|
+
callback(error);
|
|
10245
10245
|
}
|
|
10246
10246
|
this._refreshSlotsCacheCallbacks = [];
|
|
10247
10247
|
};
|
|
@@ -10642,15 +10642,15 @@ var require_cluster = __commonJS(function(exports) {
|
|
|
10642
10642
|
const slotRangeStart = items[0];
|
|
10643
10643
|
const slotRangeEnd = items[1];
|
|
10644
10644
|
const keys = [];
|
|
10645
|
-
for (let
|
|
10646
|
-
if (!items[
|
|
10645
|
+
for (let j = 2;j < items.length; j++) {
|
|
10646
|
+
if (!items[j][0]) {
|
|
10647
10647
|
continue;
|
|
10648
10648
|
}
|
|
10649
10649
|
const node = this.natMapper({
|
|
10650
|
-
host: items[
|
|
10651
|
-
port: items[
|
|
10650
|
+
host: items[j][0],
|
|
10651
|
+
port: items[j][1]
|
|
10652
10652
|
});
|
|
10653
|
-
node.readOnly =
|
|
10653
|
+
node.readOnly = j !== 2;
|
|
10654
10654
|
nodes.push(node);
|
|
10655
10655
|
keys.push(node.host + ":" + node.port);
|
|
10656
10656
|
}
|
|
@@ -10674,8 +10674,8 @@ var require_cluster = __commonJS(function(exports) {
|
|
|
10674
10674
|
}
|
|
10675
10675
|
this.connectionPool.reset(nodes);
|
|
10676
10676
|
if (this.options.shardedSubscribers) {
|
|
10677
|
-
this.shardedSubscribers.reset(this.slots, this.connectionPool.getNodes("all")).catch((
|
|
10678
|
-
debug("Error while starting subscribers: %s",
|
|
10677
|
+
this.shardedSubscribers.reset(this.slots, this.connectionPool.getNodes("all")).catch((err) => {
|
|
10678
|
+
debug("Error while starting subscribers: %s", err);
|
|
10679
10679
|
});
|
|
10680
10680
|
}
|
|
10681
10681
|
callback();
|
|
@@ -10720,9 +10720,9 @@ var require_cluster = __commonJS(function(exports) {
|
|
|
10720
10720
|
return reject(err);
|
|
10721
10721
|
}
|
|
10722
10722
|
const self = this, groupedRecords = (0, util_1.groupSrvRecords)(records), sortedKeys = Object.keys(groupedRecords).sort((a, b) => parseInt(a) - parseInt(b));
|
|
10723
|
-
function tryFirstOne(
|
|
10723
|
+
function tryFirstOne(err) {
|
|
10724
10724
|
if (!sortedKeys.length) {
|
|
10725
|
-
return reject(
|
|
10725
|
+
return reject(err);
|
|
10726
10726
|
}
|
|
10727
10727
|
const key = sortedKeys[0], group = groupedRecords[key], record = (0, util_1.weightSrvRecords)(group);
|
|
10728
10728
|
if (!group.records.length) {
|
|
@@ -11090,8 +11090,8 @@ var require_SentinelConnector = __commonJS(function(exports) {
|
|
|
11090
11090
|
this.stream = (0, net_1.createConnection)(resolved);
|
|
11091
11091
|
this.stream.once("connect", this.initFailoverDetector.bind(this));
|
|
11092
11092
|
}
|
|
11093
|
-
this.stream.once("error", (
|
|
11094
|
-
this.firstError =
|
|
11093
|
+
this.stream.once("error", (err) => {
|
|
11094
|
+
this.firstError = err;
|
|
11095
11095
|
});
|
|
11096
11096
|
return this.stream;
|
|
11097
11097
|
} else {
|
|
@@ -11545,10 +11545,10 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11545
11545
|
}
|
|
11546
11546
|
}
|
|
11547
11547
|
exports.Decoder = Decoder;
|
|
11548
|
-
_a = Decoder, _Decoder_cursor = new WeakMap, _Decoder_next = new WeakMap, _Decoder_pushTypeMapping = new WeakMap, _Decoder_instances = new WeakSet, _Decoder_continueDecodeTypeValue = function
|
|
11548
|
+
_a = Decoder, _Decoder_cursor = new WeakMap, _Decoder_next = new WeakMap, _Decoder_pushTypeMapping = new WeakMap, _Decoder_instances = new WeakSet, _Decoder_continueDecodeTypeValue = function _Decoder_continueDecodeTypeValue(type, chunk) {
|
|
11549
11549
|
__classPrivateFieldSet(this, _Decoder_next, undefined, "f");
|
|
11550
11550
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeTypeValue).call(this, type, chunk);
|
|
11551
|
-
}, _Decoder_decodeTypeValue = function
|
|
11551
|
+
}, _Decoder_decodeTypeValue = function _Decoder_decodeTypeValue(type, chunk) {
|
|
11552
11552
|
switch (type) {
|
|
11553
11553
|
case exports.RESP_TYPES.NULL:
|
|
11554
11554
|
this.onReply(__classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNull).call(this));
|
|
@@ -11582,24 +11582,24 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11582
11582
|
default:
|
|
11583
11583
|
throw new Error(`Unknown RESP type ${type} "${String.fromCharCode(type)}"`);
|
|
11584
11584
|
}
|
|
11585
|
-
}, _Decoder_handleDecodedValue = function
|
|
11585
|
+
}, _Decoder_handleDecodedValue = function _Decoder_handleDecodedValue(cb, value) {
|
|
11586
11586
|
if (typeof value === "function") {
|
|
11587
11587
|
__classPrivateFieldSet(this, _Decoder_next, __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeValue).bind(this, cb, value), "f");
|
|
11588
11588
|
return true;
|
|
11589
11589
|
}
|
|
11590
11590
|
cb(value);
|
|
11591
11591
|
return false;
|
|
11592
|
-
}, _Decoder_continueDecodeValue = function
|
|
11592
|
+
}, _Decoder_continueDecodeValue = function _Decoder_continueDecodeValue(cb, next, chunk) {
|
|
11593
11593
|
__classPrivateFieldSet(this, _Decoder_next, undefined, "f");
|
|
11594
11594
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_handleDecodedValue).call(this, cb, next(chunk));
|
|
11595
|
-
}, _Decoder_decodeNull = function
|
|
11595
|
+
}, _Decoder_decodeNull = function _Decoder_decodeNull() {
|
|
11596
11596
|
__classPrivateFieldSet(this, _Decoder_cursor, __classPrivateFieldGet(this, _Decoder_cursor, "f") + 2, "f");
|
|
11597
11597
|
return null;
|
|
11598
|
-
}, _Decoder_decodeBoolean = function
|
|
11598
|
+
}, _Decoder_decodeBoolean = function _Decoder_decodeBoolean(type, chunk) {
|
|
11599
11599
|
const boolean = chunk[__classPrivateFieldGet(this, _Decoder_cursor, "f")] === ASCII.t;
|
|
11600
11600
|
__classPrivateFieldSet(this, _Decoder_cursor, __classPrivateFieldGet(this, _Decoder_cursor, "f") + 3, "f");
|
|
11601
11601
|
return type === Number ? boolean ? 1 : 0 : boolean;
|
|
11602
|
-
}, _Decoder_decodeNumber = function
|
|
11602
|
+
}, _Decoder_decodeNumber = function _Decoder_decodeNumber(type, chunk) {
|
|
11603
11603
|
if (type === String) {
|
|
11604
11604
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSimpleString).call(this, String, chunk);
|
|
11605
11605
|
}
|
|
@@ -11611,14 +11611,14 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11611
11611
|
default:
|
|
11612
11612
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNumberValue).call(this, false, __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedNumber).bind(this, 0), chunk);
|
|
11613
11613
|
}
|
|
11614
|
-
}, _Decoder_maybeDecodeNumberValue = function
|
|
11614
|
+
}, _Decoder_maybeDecodeNumberValue = function _Decoder_maybeDecodeNumberValue(isNegative, chunk) {
|
|
11615
11615
|
var _b;
|
|
11616
11616
|
const cb = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedNumber).bind(this, 0);
|
|
11617
11617
|
return __classPrivateFieldSet(this, _Decoder_cursor, (_b = __classPrivateFieldGet(this, _Decoder_cursor, "f"), ++_b), "f") === chunk.length ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNumberValue).bind(this, isNegative, cb) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNumberValue).call(this, isNegative, cb, chunk);
|
|
11618
|
-
}, _Decoder_decodeNumberValue = function
|
|
11618
|
+
}, _Decoder_decodeNumberValue = function _Decoder_decodeNumberValue(isNegative, numberCb, chunk) {
|
|
11619
11619
|
const number = numberCb(chunk);
|
|
11620
|
-
return typeof number === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11621
|
-
}, _Decoder_decodeUnsingedNumber = function
|
|
11620
|
+
return typeof number === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNumberValue).bind(this, isNegative, number) : isNegative ? -number : number;
|
|
11621
|
+
}, _Decoder_decodeUnsingedNumber = function _Decoder_decodeUnsingedNumber(number, chunk) {
|
|
11622
11622
|
let cursor = __classPrivateFieldGet(this, _Decoder_cursor, "f");
|
|
11623
11623
|
do {
|
|
11624
11624
|
const byte = chunk[cursor];
|
|
@@ -11629,8 +11629,8 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11629
11629
|
number = number * 10 + byte - ASCII["0"];
|
|
11630
11630
|
} while (++cursor < chunk.length);
|
|
11631
11631
|
__classPrivateFieldSet(this, _Decoder_cursor, cursor, "f");
|
|
11632
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11633
|
-
}, _Decoder_decodeBigNumber = function
|
|
11632
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedNumber).bind(this, number);
|
|
11633
|
+
}, _Decoder_decodeBigNumber = function _Decoder_decodeBigNumber(type, chunk) {
|
|
11634
11634
|
if (type === String) {
|
|
11635
11635
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSimpleString).call(this, String, chunk);
|
|
11636
11636
|
}
|
|
@@ -11642,14 +11642,14 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11642
11642
|
default:
|
|
11643
11643
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBigNumberValue).call(this, false, __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedBigNumber).bind(this, 0n), chunk);
|
|
11644
11644
|
}
|
|
11645
|
-
}, _Decoder_maybeDecodeBigNumberValue = function
|
|
11645
|
+
}, _Decoder_maybeDecodeBigNumberValue = function _Decoder_maybeDecodeBigNumberValue(isNegative, chunk) {
|
|
11646
11646
|
var _b;
|
|
11647
11647
|
const cb = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedBigNumber).bind(this, 0n);
|
|
11648
11648
|
return __classPrivateFieldSet(this, _Decoder_cursor, (_b = __classPrivateFieldGet(this, _Decoder_cursor, "f"), ++_b), "f") === chunk.length ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBigNumberValue).bind(this, isNegative, cb) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBigNumberValue).call(this, isNegative, cb, chunk);
|
|
11649
|
-
}, _Decoder_decodeBigNumberValue = function
|
|
11649
|
+
}, _Decoder_decodeBigNumberValue = function _Decoder_decodeBigNumberValue(isNegative, bigNumberCb, chunk) {
|
|
11650
11650
|
const bigNumber = bigNumberCb(chunk);
|
|
11651
|
-
return typeof bigNumber === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11652
|
-
}, _Decoder_decodeUnsingedBigNumber = function
|
|
11651
|
+
return typeof bigNumber === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBigNumberValue).bind(this, isNegative, bigNumber) : isNegative ? -bigNumber : bigNumber;
|
|
11652
|
+
}, _Decoder_decodeUnsingedBigNumber = function _Decoder_decodeUnsingedBigNumber(bigNumber, chunk) {
|
|
11653
11653
|
let cursor = __classPrivateFieldGet(this, _Decoder_cursor, "f");
|
|
11654
11654
|
do {
|
|
11655
11655
|
const byte = chunk[cursor];
|
|
@@ -11660,8 +11660,8 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11660
11660
|
bigNumber = bigNumber * 10n + BigInt(byte - ASCII["0"]);
|
|
11661
11661
|
} while (++cursor < chunk.length);
|
|
11662
11662
|
__classPrivateFieldSet(this, _Decoder_cursor, cursor, "f");
|
|
11663
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11664
|
-
}, _Decoder_decodeDouble = function
|
|
11663
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedBigNumber).bind(this, bigNumber);
|
|
11664
|
+
}, _Decoder_decodeDouble = function _Decoder_decodeDouble(type, chunk) {
|
|
11665
11665
|
if (type === String || type === Buffer) {
|
|
11666
11666
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSimpleString).call(this, type, chunk);
|
|
11667
11667
|
}
|
|
@@ -11676,16 +11676,16 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11676
11676
|
default:
|
|
11677
11677
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeDoubleInteger).call(this, false, 0, chunk);
|
|
11678
11678
|
}
|
|
11679
|
-
}, _Decoder_maybeDecodeDoubleInteger = function
|
|
11679
|
+
}, _Decoder_maybeDecodeDoubleInteger = function _Decoder_maybeDecodeDoubleInteger(isNegative, chunk) {
|
|
11680
11680
|
var _b;
|
|
11681
11681
|
return __classPrivateFieldSet(this, _Decoder_cursor, (_b = __classPrivateFieldGet(this, _Decoder_cursor, "f"), ++_b), "f") === chunk.length ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeDoubleInteger).bind(this, isNegative, 0) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeDoubleInteger).call(this, isNegative, 0, chunk);
|
|
11682
|
-
}, _Decoder_decodeDoubleInteger = function
|
|
11682
|
+
}, _Decoder_decodeDoubleInteger = function _Decoder_decodeDoubleInteger(isNegative, integer, chunk) {
|
|
11683
11683
|
if (chunk[__classPrivateFieldGet(this, _Decoder_cursor, "f")] === ASCII.i) {
|
|
11684
11684
|
__classPrivateFieldSet(this, _Decoder_cursor, __classPrivateFieldGet(this, _Decoder_cursor, "f") + 5, "f");
|
|
11685
11685
|
return isNegative ? -Infinity : Infinity;
|
|
11686
11686
|
}
|
|
11687
11687
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeDoubleInteger).call(this, isNegative, integer, chunk);
|
|
11688
|
-
}, _Decoder_continueDecodeDoubleInteger = function
|
|
11688
|
+
}, _Decoder_continueDecodeDoubleInteger = function _Decoder_continueDecodeDoubleInteger(isNegative, integer, chunk) {
|
|
11689
11689
|
let cursor = __classPrivateFieldGet(this, _Decoder_cursor, "f");
|
|
11690
11690
|
do {
|
|
11691
11691
|
const byte = chunk[cursor];
|
|
@@ -11707,8 +11707,8 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11707
11707
|
}
|
|
11708
11708
|
} while (++cursor < chunk.length);
|
|
11709
11709
|
__classPrivateFieldSet(this, _Decoder_cursor, cursor, "f");
|
|
11710
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11711
|
-
}, _Decoder_decodeDoubleDecimal = function
|
|
11710
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeDoubleInteger).bind(this, isNegative, integer);
|
|
11711
|
+
}, _Decoder_decodeDoubleDecimal = function _Decoder_decodeDoubleDecimal(isNegative, decimalIndex, double, chunk) {
|
|
11712
11712
|
let cursor = __classPrivateFieldGet(this, _Decoder_cursor, "f");
|
|
11713
11713
|
do {
|
|
11714
11714
|
const byte = chunk[cursor];
|
|
@@ -11728,8 +11728,8 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11728
11728
|
}
|
|
11729
11729
|
} while (++cursor < chunk.length);
|
|
11730
11730
|
__classPrivateFieldSet(this, _Decoder_cursor, cursor, "f");
|
|
11731
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11732
|
-
}, _Decoder_decodeDoubleExponent = function
|
|
11731
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeDoubleDecimal).bind(this, isNegative, decimalIndex, double);
|
|
11732
|
+
}, _Decoder_decodeDoubleExponent = function _Decoder_decodeDoubleExponent(double, chunk) {
|
|
11733
11733
|
var _b, _c;
|
|
11734
11734
|
switch (chunk[__classPrivateFieldGet(this, _Decoder_cursor, "f")]) {
|
|
11735
11735
|
case ASCII["+"]:
|
|
@@ -11738,7 +11738,7 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11738
11738
|
return __classPrivateFieldSet(this, _Decoder_cursor, (_c = __classPrivateFieldGet(this, _Decoder_cursor, "f"), ++_c), "f") === chunk.length ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeDoubleExponent).bind(this, true, double, 0) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeDoubleExponent).call(this, true, double, 0, chunk);
|
|
11739
11739
|
}
|
|
11740
11740
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeDoubleExponent).call(this, false, double, 0, chunk);
|
|
11741
|
-
}, _Decoder_continueDecodeDoubleExponent = function
|
|
11741
|
+
}, _Decoder_continueDecodeDoubleExponent = function _Decoder_continueDecodeDoubleExponent(isNegative, double, exponent, chunk) {
|
|
11742
11742
|
let cursor = __classPrivateFieldGet(this, _Decoder_cursor, "f");
|
|
11743
11743
|
do {
|
|
11744
11744
|
const byte = chunk[cursor];
|
|
@@ -11749,8 +11749,8 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11749
11749
|
exponent = exponent * 10 + byte - ASCII["0"];
|
|
11750
11750
|
} while (++cursor < chunk.length);
|
|
11751
11751
|
__classPrivateFieldSet(this, _Decoder_cursor, cursor, "f");
|
|
11752
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11753
|
-
}, _Decoder_findCRLF = function
|
|
11752
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeDoubleExponent).bind(this, isNegative, double, exponent);
|
|
11753
|
+
}, _Decoder_findCRLF = function _Decoder_findCRLF(chunk, cursor) {
|
|
11754
11754
|
while (chunk[cursor] !== ASCII["\r"]) {
|
|
11755
11755
|
if (++cursor === chunk.length) {
|
|
11756
11756
|
__classPrivateFieldSet(this, _Decoder_cursor, chunk.length, "f");
|
|
@@ -11759,23 +11759,23 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11759
11759
|
}
|
|
11760
11760
|
__classPrivateFieldSet(this, _Decoder_cursor, cursor + 2, "f");
|
|
11761
11761
|
return cursor;
|
|
11762
|
-
}, _Decoder_decodeSimpleString = function
|
|
11762
|
+
}, _Decoder_decodeSimpleString = function _Decoder_decodeSimpleString(type, chunk) {
|
|
11763
11763
|
const start = __classPrivateFieldGet(this, _Decoder_cursor, "f"), crlfIndex = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_findCRLF).call(this, chunk, start);
|
|
11764
11764
|
if (crlfIndex === -1) {
|
|
11765
11765
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeSimpleString).bind(this, [chunk.subarray(start)], type);
|
|
11766
11766
|
}
|
|
11767
11767
|
const slice = chunk.subarray(start, crlfIndex);
|
|
11768
11768
|
return type === Buffer ? slice : slice.toString();
|
|
11769
|
-
}, _Decoder_continueDecodeSimpleString = function
|
|
11769
|
+
}, _Decoder_continueDecodeSimpleString = function _Decoder_continueDecodeSimpleString(chunks, type, chunk) {
|
|
11770
11770
|
const start = __classPrivateFieldGet(this, _Decoder_cursor, "f"), crlfIndex = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_findCRLF).call(this, chunk, start);
|
|
11771
11771
|
if (crlfIndex === -1) {
|
|
11772
11772
|
chunks.push(chunk.subarray(start));
|
|
11773
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11773
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeSimpleString).bind(this, chunks, type);
|
|
11774
11774
|
}
|
|
11775
11775
|
chunks.push(chunk.subarray(start, crlfIndex));
|
|
11776
11776
|
const buffer = Buffer.concat(chunks);
|
|
11777
11777
|
return type === Buffer ? buffer : buffer.toString();
|
|
11778
|
-
}, _Decoder_decodeBlobString = function
|
|
11778
|
+
}, _Decoder_decodeBlobString = function _Decoder_decodeBlobString(type, chunk) {
|
|
11779
11779
|
if (chunk[__classPrivateFieldGet(this, _Decoder_cursor, "f")] === ASCII["-"]) {
|
|
11780
11780
|
__classPrivateFieldSet(this, _Decoder_cursor, __classPrivateFieldGet(this, _Decoder_cursor, "f") + 4, "f");
|
|
11781
11781
|
return null;
|
|
@@ -11787,78 +11787,78 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11787
11787
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBlobStringWithLength).bind(this, length, type);
|
|
11788
11788
|
}
|
|
11789
11789
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBlobStringWithLength).call(this, length, type, chunk);
|
|
11790
|
-
}, _Decoder_continueDecodeBlobStringLength = function
|
|
11790
|
+
}, _Decoder_continueDecodeBlobStringLength = function _Decoder_continueDecodeBlobStringLength(lengthCb, type, chunk) {
|
|
11791
11791
|
const length = lengthCb(chunk);
|
|
11792
11792
|
if (typeof length === "function") {
|
|
11793
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11793
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeBlobStringLength).bind(this, length, type);
|
|
11794
11794
|
} else if (__classPrivateFieldGet(this, _Decoder_cursor, "f") >= chunk.length) {
|
|
11795
11795
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBlobStringWithLength).bind(this, length, type);
|
|
11796
11796
|
}
|
|
11797
11797
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBlobStringWithLength).call(this, length, type, chunk);
|
|
11798
|
-
}, _Decoder_decodeStringWithLength = function
|
|
11798
|
+
}, _Decoder_decodeStringWithLength = function _Decoder_decodeStringWithLength(length, skip, type, chunk) {
|
|
11799
11799
|
const end = __classPrivateFieldGet(this, _Decoder_cursor, "f") + length;
|
|
11800
11800
|
if (end >= chunk.length) {
|
|
11801
|
-
const
|
|
11801
|
+
const slice = chunk.subarray(__classPrivateFieldGet(this, _Decoder_cursor, "f"));
|
|
11802
11802
|
__classPrivateFieldSet(this, _Decoder_cursor, chunk.length, "f");
|
|
11803
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeStringWithLength).bind(this, length -
|
|
11803
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeStringWithLength).bind(this, length - slice.length, [slice], skip, type);
|
|
11804
11804
|
}
|
|
11805
11805
|
const slice = chunk.subarray(__classPrivateFieldGet(this, _Decoder_cursor, "f"), end);
|
|
11806
11806
|
__classPrivateFieldSet(this, _Decoder_cursor, end + skip, "f");
|
|
11807
11807
|
return type === Buffer ? slice : slice.toString();
|
|
11808
|
-
}, _Decoder_continueDecodeStringWithLength = function
|
|
11808
|
+
}, _Decoder_continueDecodeStringWithLength = function _Decoder_continueDecodeStringWithLength(length, chunks, skip, type, chunk) {
|
|
11809
11809
|
const end = __classPrivateFieldGet(this, _Decoder_cursor, "f") + length;
|
|
11810
11810
|
if (end >= chunk.length) {
|
|
11811
11811
|
const slice = chunk.subarray(__classPrivateFieldGet(this, _Decoder_cursor, "f"));
|
|
11812
11812
|
chunks.push(slice);
|
|
11813
11813
|
__classPrivateFieldSet(this, _Decoder_cursor, chunk.length, "f");
|
|
11814
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11814
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeStringWithLength).bind(this, length - slice.length, chunks, skip, type);
|
|
11815
11815
|
}
|
|
11816
11816
|
chunks.push(chunk.subarray(__classPrivateFieldGet(this, _Decoder_cursor, "f"), end));
|
|
11817
11817
|
__classPrivateFieldSet(this, _Decoder_cursor, end + skip, "f");
|
|
11818
11818
|
const buffer = Buffer.concat(chunks);
|
|
11819
11819
|
return type === Buffer ? buffer : buffer.toString();
|
|
11820
|
-
}, _Decoder_decodeBlobStringWithLength = function
|
|
11820
|
+
}, _Decoder_decodeBlobStringWithLength = function _Decoder_decodeBlobStringWithLength(length, type, chunk) {
|
|
11821
11821
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeStringWithLength).call(this, length, 2, type, chunk);
|
|
11822
|
-
}, _Decoder_decodeVerbatimString = function
|
|
11822
|
+
}, _Decoder_decodeVerbatimString = function _Decoder_decodeVerbatimString(type, chunk) {
|
|
11823
11823
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeVerbatimStringLength).call(this, __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedNumber).bind(this, 0), type, chunk);
|
|
11824
|
-
}, _Decoder_continueDecodeVerbatimStringLength = function
|
|
11824
|
+
}, _Decoder_continueDecodeVerbatimStringLength = function _Decoder_continueDecodeVerbatimStringLength(lengthCb, type, chunk) {
|
|
11825
11825
|
const length = lengthCb(chunk);
|
|
11826
|
-
return typeof length === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11827
|
-
}, _Decoder_decodeVerbatimStringWithLength = function
|
|
11826
|
+
return typeof length === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeVerbatimStringLength).bind(this, length, type) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeVerbatimStringWithLength).call(this, length, type, chunk);
|
|
11827
|
+
}, _Decoder_decodeVerbatimStringWithLength = function _Decoder_decodeVerbatimStringWithLength(length, type, chunk) {
|
|
11828
11828
|
const stringLength = length - 4;
|
|
11829
11829
|
if (type === verbatim_string_1.VerbatimString) {
|
|
11830
11830
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeVerbatimStringFormat).call(this, stringLength, chunk);
|
|
11831
11831
|
}
|
|
11832
11832
|
__classPrivateFieldSet(this, _Decoder_cursor, __classPrivateFieldGet(this, _Decoder_cursor, "f") + 4, "f");
|
|
11833
11833
|
return __classPrivateFieldGet(this, _Decoder_cursor, "f") >= chunk.length ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBlobStringWithLength).bind(this, stringLength, type) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBlobStringWithLength).call(this, stringLength, type, chunk);
|
|
11834
|
-
}, _Decoder_decodeVerbatimStringFormat = function
|
|
11834
|
+
}, _Decoder_decodeVerbatimStringFormat = function _Decoder_decodeVerbatimStringFormat(stringLength, chunk) {
|
|
11835
11835
|
const formatCb = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeStringWithLength).bind(this, 3, 1, String);
|
|
11836
11836
|
return __classPrivateFieldGet(this, _Decoder_cursor, "f") >= chunk.length ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeVerbatimStringFormat).bind(this, stringLength, formatCb) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeVerbatimStringFormat).call(this, stringLength, formatCb, chunk);
|
|
11837
|
-
}, _Decoder_continueDecodeVerbatimStringFormat = function
|
|
11837
|
+
}, _Decoder_continueDecodeVerbatimStringFormat = function _Decoder_continueDecodeVerbatimStringFormat(stringLength, formatCb, chunk) {
|
|
11838
11838
|
const format = formatCb(chunk);
|
|
11839
|
-
return typeof format === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11840
|
-
}, _Decoder_decodeVerbatimStringWithFormat = function
|
|
11839
|
+
return typeof format === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeVerbatimStringFormat).bind(this, stringLength, format) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeVerbatimStringWithFormat).call(this, stringLength, format, chunk);
|
|
11840
|
+
}, _Decoder_decodeVerbatimStringWithFormat = function _Decoder_decodeVerbatimStringWithFormat(stringLength, format, chunk) {
|
|
11841
11841
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeVerbatimStringWithFormat).call(this, format, __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBlobStringWithLength).bind(this, stringLength, String), chunk);
|
|
11842
|
-
}, _Decoder_continueDecodeVerbatimStringWithFormat = function
|
|
11842
|
+
}, _Decoder_continueDecodeVerbatimStringWithFormat = function _Decoder_continueDecodeVerbatimStringWithFormat(format, stringCb, chunk) {
|
|
11843
11843
|
const string = stringCb(chunk);
|
|
11844
|
-
return typeof string === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11845
|
-
}, _Decoder_decodeSimpleError = function
|
|
11844
|
+
return typeof string === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeVerbatimStringWithFormat).bind(this, format, string) : new verbatim_string_1.VerbatimString(format, string);
|
|
11845
|
+
}, _Decoder_decodeSimpleError = function _Decoder_decodeSimpleError(chunk) {
|
|
11846
11846
|
const string = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSimpleString).call(this, String, chunk);
|
|
11847
11847
|
return typeof string === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeSimpleError).bind(this, string) : new errors_1.SimpleError(string);
|
|
11848
|
-
}, _Decoder_continueDecodeSimpleError = function
|
|
11848
|
+
}, _Decoder_continueDecodeSimpleError = function _Decoder_continueDecodeSimpleError(stringCb, chunk) {
|
|
11849
11849
|
const string = stringCb(chunk);
|
|
11850
|
-
return typeof string === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11851
|
-
}, _Decoder_decodeBlobError = function
|
|
11850
|
+
return typeof string === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeSimpleError).bind(this, string) : new errors_1.SimpleError(string);
|
|
11851
|
+
}, _Decoder_decodeBlobError = function _Decoder_decodeBlobError(chunk) {
|
|
11852
11852
|
const string = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeBlobString).call(this, String, chunk);
|
|
11853
11853
|
return typeof string === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeBlobError).bind(this, string) : new errors_1.BlobError(string);
|
|
11854
|
-
}, _Decoder_continueDecodeBlobError = function
|
|
11854
|
+
}, _Decoder_continueDecodeBlobError = function _Decoder_continueDecodeBlobError(stringCb, chunk) {
|
|
11855
11855
|
const string = stringCb(chunk);
|
|
11856
|
-
return typeof string === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11857
|
-
}, _Decoder_decodeNestedType = function
|
|
11856
|
+
return typeof string === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeBlobError).bind(this, string) : new errors_1.BlobError(string);
|
|
11857
|
+
}, _Decoder_decodeNestedType = function _Decoder_decodeNestedType(typeMapping, chunk) {
|
|
11858
11858
|
var _b;
|
|
11859
11859
|
const type = chunk[__classPrivateFieldGet(this, _Decoder_cursor, "f")];
|
|
11860
11860
|
return __classPrivateFieldSet(this, _Decoder_cursor, (_b = __classPrivateFieldGet(this, _Decoder_cursor, "f"), ++_b), "f") === chunk.length ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNestedTypeValue).bind(this, type, typeMapping) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNestedTypeValue).call(this, type, typeMapping, chunk);
|
|
11861
|
-
}, _Decoder_decodeNestedTypeValue = function
|
|
11861
|
+
}, _Decoder_decodeNestedTypeValue = function _Decoder_decodeNestedTypeValue(type, typeMapping, chunk) {
|
|
11862
11862
|
switch (type) {
|
|
11863
11863
|
case exports.RESP_TYPES.NULL:
|
|
11864
11864
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNull).call(this);
|
|
@@ -11889,20 +11889,20 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11889
11889
|
default:
|
|
11890
11890
|
throw new Error(`Unknown RESP type ${type} "${String.fromCharCode(type)}"`);
|
|
11891
11891
|
}
|
|
11892
|
-
}, _Decoder_decodeArray = function
|
|
11892
|
+
}, _Decoder_decodeArray = function _Decoder_decodeArray(typeMapping, chunk) {
|
|
11893
11893
|
if (chunk[__classPrivateFieldGet(this, _Decoder_cursor, "f")] === ASCII["-"]) {
|
|
11894
11894
|
__classPrivateFieldSet(this, _Decoder_cursor, __classPrivateFieldGet(this, _Decoder_cursor, "f") + 4, "f");
|
|
11895
11895
|
return null;
|
|
11896
11896
|
}
|
|
11897
11897
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeArrayWithLength).call(this, __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedNumber).call(this, 0, chunk), typeMapping, chunk);
|
|
11898
|
-
}, _Decoder_decodeArrayWithLength = function
|
|
11898
|
+
}, _Decoder_decodeArrayWithLength = function _Decoder_decodeArrayWithLength(length, typeMapping, chunk) {
|
|
11899
11899
|
return typeof length === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeArrayLength).bind(this, length, typeMapping) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeArrayItems).call(this, new Array(length), 0, typeMapping, chunk);
|
|
11900
|
-
}, _Decoder_continueDecodeArrayLength = function
|
|
11900
|
+
}, _Decoder_continueDecodeArrayLength = function _Decoder_continueDecodeArrayLength(lengthCb, typeMapping, chunk) {
|
|
11901
11901
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeArrayWithLength).call(this, lengthCb(chunk), typeMapping, chunk);
|
|
11902
|
-
}, _Decoder_decodeArrayItems = function
|
|
11902
|
+
}, _Decoder_decodeArrayItems = function _Decoder_decodeArrayItems(array, filled, typeMapping, chunk) {
|
|
11903
11903
|
for (let i = filled;i < array.length; i++) {
|
|
11904
11904
|
if (__classPrivateFieldGet(this, _Decoder_cursor, "f") >= chunk.length) {
|
|
11905
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11905
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeArrayItems).bind(this, array, i, typeMapping);
|
|
11906
11906
|
}
|
|
11907
11907
|
const item = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNestedType).call(this, typeMapping, chunk);
|
|
11908
11908
|
if (typeof item === "function") {
|
|
@@ -11911,28 +11911,28 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11911
11911
|
array[i] = item;
|
|
11912
11912
|
}
|
|
11913
11913
|
return array;
|
|
11914
|
-
}, _Decoder_continueDecodeArrayItems = function
|
|
11914
|
+
}, _Decoder_continueDecodeArrayItems = function _Decoder_continueDecodeArrayItems(array, filled, itemCb, typeMapping, chunk) {
|
|
11915
11915
|
const item = itemCb(chunk);
|
|
11916
11916
|
if (typeof item === "function") {
|
|
11917
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11917
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeArrayItems).bind(this, array, filled, item, typeMapping);
|
|
11918
11918
|
}
|
|
11919
11919
|
array[filled++] = item;
|
|
11920
11920
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeArrayItems).call(this, array, filled, typeMapping, chunk);
|
|
11921
|
-
}, _Decoder_decodeSet = function
|
|
11921
|
+
}, _Decoder_decodeSet = function _Decoder_decodeSet(typeMapping, chunk) {
|
|
11922
11922
|
const length = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedNumber).call(this, 0, chunk);
|
|
11923
11923
|
if (typeof length === "function") {
|
|
11924
11924
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeSetLength).bind(this, length, typeMapping);
|
|
11925
11925
|
}
|
|
11926
11926
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSetItems).call(this, length, typeMapping, chunk);
|
|
11927
|
-
}, _Decoder_continueDecodeSetLength = function
|
|
11927
|
+
}, _Decoder_continueDecodeSetLength = function _Decoder_continueDecodeSetLength(lengthCb, typeMapping, chunk) {
|
|
11928
11928
|
const length = lengthCb(chunk);
|
|
11929
|
-
return typeof length === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11930
|
-
}, _Decoder_decodeSetItems = function
|
|
11929
|
+
return typeof length === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeSetLength).bind(this, length, typeMapping) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSetItems).call(this, length, typeMapping, chunk);
|
|
11930
|
+
}, _Decoder_decodeSetItems = function _Decoder_decodeSetItems(length, typeMapping, chunk) {
|
|
11931
11931
|
return typeMapping[exports.RESP_TYPES.SET] === Set ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSetAsSet).call(this, new Set, length, typeMapping, chunk) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeArrayItems).call(this, new Array(length), 0, typeMapping, chunk);
|
|
11932
|
-
}, _Decoder_decodeSetAsSet = function
|
|
11932
|
+
}, _Decoder_decodeSetAsSet = function _Decoder_decodeSetAsSet(set, remaining, typeMapping, chunk) {
|
|
11933
11933
|
while (remaining > 0) {
|
|
11934
11934
|
if (__classPrivateFieldGet(this, _Decoder_cursor, "f") >= chunk.length) {
|
|
11935
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11935
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSetAsSet).bind(this, set, remaining, typeMapping);
|
|
11936
11936
|
}
|
|
11937
11937
|
const item = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNestedType).call(this, typeMapping, chunk);
|
|
11938
11938
|
if (typeof item === "function") {
|
|
@@ -11942,23 +11942,23 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11942
11942
|
--remaining;
|
|
11943
11943
|
}
|
|
11944
11944
|
return set;
|
|
11945
|
-
}, _Decoder_continueDecodeSetAsSet = function
|
|
11945
|
+
}, _Decoder_continueDecodeSetAsSet = function _Decoder_continueDecodeSetAsSet(set, remaining, itemCb, typeMapping, chunk) {
|
|
11946
11946
|
const item = itemCb(chunk);
|
|
11947
11947
|
if (typeof item === "function") {
|
|
11948
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11948
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeSetAsSet).bind(this, set, remaining, item, typeMapping);
|
|
11949
11949
|
}
|
|
11950
11950
|
set.add(item);
|
|
11951
11951
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSetAsSet).call(this, set, remaining - 1, typeMapping, chunk);
|
|
11952
|
-
}, _Decoder_decodeMap = function
|
|
11952
|
+
}, _Decoder_decodeMap = function _Decoder_decodeMap(typeMapping, chunk) {
|
|
11953
11953
|
const length = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeUnsingedNumber).call(this, 0, chunk);
|
|
11954
11954
|
if (typeof length === "function") {
|
|
11955
11955
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeMapLength).bind(this, length, typeMapping);
|
|
11956
11956
|
}
|
|
11957
11957
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapItems).call(this, length, typeMapping, chunk);
|
|
11958
|
-
}, _Decoder_continueDecodeMapLength = function
|
|
11958
|
+
}, _Decoder_continueDecodeMapLength = function _Decoder_continueDecodeMapLength(lengthCb, typeMapping, chunk) {
|
|
11959
11959
|
const length = lengthCb(chunk);
|
|
11960
|
-
return typeof length === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11961
|
-
}, _Decoder_decodeMapItems = function
|
|
11960
|
+
return typeof length === "function" ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeMapLength).bind(this, length, typeMapping) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapItems).call(this, length, typeMapping, chunk);
|
|
11961
|
+
}, _Decoder_decodeMapItems = function _Decoder_decodeMapItems(length, typeMapping, chunk) {
|
|
11962
11962
|
switch (typeMapping[exports.RESP_TYPES.MAP]) {
|
|
11963
11963
|
case Map:
|
|
11964
11964
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapAsMap).call(this, new Map, length, typeMapping, chunk);
|
|
@@ -11967,10 +11967,10 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11967
11967
|
default:
|
|
11968
11968
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapAsObject).call(this, {}, length, typeMapping, chunk);
|
|
11969
11969
|
}
|
|
11970
|
-
}, _Decoder_decodeMapAsMap = function
|
|
11970
|
+
}, _Decoder_decodeMapAsMap = function _Decoder_decodeMapAsMap(map, remaining, typeMapping, chunk) {
|
|
11971
11971
|
while (remaining > 0) {
|
|
11972
11972
|
if (__classPrivateFieldGet(this, _Decoder_cursor, "f") >= chunk.length) {
|
|
11973
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
11973
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapAsMap).bind(this, map, remaining, typeMapping);
|
|
11974
11974
|
}
|
|
11975
11975
|
const key = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapKey).call(this, typeMapping, chunk);
|
|
11976
11976
|
if (typeof key === "function") {
|
|
@@ -11987,11 +11987,11 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
11987
11987
|
--remaining;
|
|
11988
11988
|
}
|
|
11989
11989
|
return map;
|
|
11990
|
-
}, _Decoder_decodeMapKey = function
|
|
11990
|
+
}, _Decoder_decodeMapKey = function _Decoder_decodeMapKey(typeMapping, chunk) {
|
|
11991
11991
|
var _b;
|
|
11992
11992
|
const type = chunk[__classPrivateFieldGet(this, _Decoder_cursor, "f")];
|
|
11993
11993
|
return __classPrivateFieldSet(this, _Decoder_cursor, (_b = __classPrivateFieldGet(this, _Decoder_cursor, "f"), ++_b), "f") === chunk.length ? __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapKeyValue).bind(this, type, typeMapping) : __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapKeyValue).call(this, type, typeMapping, chunk);
|
|
11994
|
-
}, _Decoder_decodeMapKeyValue = function
|
|
11994
|
+
}, _Decoder_decodeMapKeyValue = function _Decoder_decodeMapKeyValue(type, typeMapping, chunk) {
|
|
11995
11995
|
switch (type) {
|
|
11996
11996
|
case exports.RESP_TYPES.SIMPLE_STRING:
|
|
11997
11997
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeSimpleString).call(this, String, chunk);
|
|
@@ -12000,10 +12000,10 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
12000
12000
|
default:
|
|
12001
12001
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNestedTypeValue).call(this, type, typeMapping, chunk);
|
|
12002
12002
|
}
|
|
12003
|
-
}, _Decoder_continueDecodeMapKey = function
|
|
12003
|
+
}, _Decoder_continueDecodeMapKey = function _Decoder_continueDecodeMapKey(map, remaining, keyCb, typeMapping, chunk) {
|
|
12004
12004
|
const key = keyCb(chunk);
|
|
12005
12005
|
if (typeof key === "function") {
|
|
12006
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
12006
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeMapKey).bind(this, map, remaining, key, typeMapping);
|
|
12007
12007
|
}
|
|
12008
12008
|
if (__classPrivateFieldGet(this, _Decoder_cursor, "f") >= chunk.length) {
|
|
12009
12009
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeMapValue).bind(this, map, remaining, key, __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNestedType).bind(this, typeMapping), typeMapping);
|
|
@@ -12014,17 +12014,17 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
12014
12014
|
}
|
|
12015
12015
|
map.set(key, value);
|
|
12016
12016
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapAsMap).call(this, map, remaining - 1, typeMapping, chunk);
|
|
12017
|
-
}, _Decoder_continueDecodeMapValue = function
|
|
12017
|
+
}, _Decoder_continueDecodeMapValue = function _Decoder_continueDecodeMapValue(map, remaining, key, valueCb, typeMapping, chunk) {
|
|
12018
12018
|
const value = valueCb(chunk);
|
|
12019
12019
|
if (typeof value === "function") {
|
|
12020
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
12020
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeMapValue).bind(this, map, remaining, key, value, typeMapping);
|
|
12021
12021
|
}
|
|
12022
12022
|
map.set(key, value);
|
|
12023
12023
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapAsMap).call(this, map, remaining - 1, typeMapping, chunk);
|
|
12024
|
-
}, _Decoder_decodeMapAsObject = function
|
|
12024
|
+
}, _Decoder_decodeMapAsObject = function _Decoder_decodeMapAsObject(object, remaining, typeMapping, chunk) {
|
|
12025
12025
|
while (remaining > 0) {
|
|
12026
12026
|
if (__classPrivateFieldGet(this, _Decoder_cursor, "f") >= chunk.length) {
|
|
12027
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
12027
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapAsObject).bind(this, object, remaining, typeMapping);
|
|
12028
12028
|
}
|
|
12029
12029
|
const key = __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapKey).call(this, typeMapping, chunk);
|
|
12030
12030
|
if (typeof key === "function") {
|
|
@@ -12050,10 +12050,10 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
12050
12050
|
--remaining;
|
|
12051
12051
|
}
|
|
12052
12052
|
return object;
|
|
12053
|
-
}, _Decoder_continueDecodeMapAsObjectKey = function
|
|
12053
|
+
}, _Decoder_continueDecodeMapAsObjectKey = function _Decoder_continueDecodeMapAsObjectKey(object, remaining, keyCb, typeMapping, chunk) {
|
|
12054
12054
|
const key = keyCb(chunk);
|
|
12055
12055
|
if (typeof key === "function") {
|
|
12056
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
12056
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeMapAsObjectKey).bind(this, object, remaining, key, typeMapping);
|
|
12057
12057
|
}
|
|
12058
12058
|
if (__classPrivateFieldGet(this, _Decoder_cursor, "f") >= chunk.length) {
|
|
12059
12059
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeMapAsObjectValue).bind(this, object, remaining, key, __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeNestedType).bind(this, typeMapping), typeMapping);
|
|
@@ -12073,10 +12073,10 @@ var require_decoder = __commonJS(function(exports) {
|
|
|
12073
12073
|
object[key] = value;
|
|
12074
12074
|
}
|
|
12075
12075
|
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_decodeMapAsObject).call(this, object, remaining - 1, typeMapping, chunk);
|
|
12076
|
-
}, _Decoder_continueDecodeMapAsObjectValue = function
|
|
12076
|
+
}, _Decoder_continueDecodeMapAsObjectValue = function _Decoder_continueDecodeMapAsObjectValue(object, remaining, key, valueCb, typeMapping, chunk) {
|
|
12077
12077
|
const value = valueCb(chunk);
|
|
12078
12078
|
if (typeof value === "function") {
|
|
12079
|
-
return __classPrivateFieldGet(this, _Decoder_instances, "m",
|
|
12079
|
+
return __classPrivateFieldGet(this, _Decoder_instances, "m", _Decoder_continueDecodeMapAsObjectValue).bind(this, object, remaining, key, value, typeMapping);
|
|
12080
12080
|
}
|
|
12081
12081
|
if (key === "__proto__" || key === "constructor") {
|
|
12082
12082
|
Object.defineProperty(object, key, {
|
|
@@ -12506,7 +12506,7 @@ var require_event_handler = __commonJS(function(exports) {
|
|
|
12506
12506
|
}
|
|
12507
12507
|
async function sendHandshake(commands, protocol) {
|
|
12508
12508
|
if (protocol !== 3) {
|
|
12509
|
-
await Promise.all(commands.map(({ send, errorHandler
|
|
12509
|
+
await Promise.all(commands.map(({ send, errorHandler }) => errorHandler ? send().catch(errorHandler) : send()));
|
|
12510
12510
|
return;
|
|
12511
12511
|
}
|
|
12512
12512
|
const results = await Promise.allSettled(commands.map(({ send }) => send()));
|
|
@@ -12518,9 +12518,9 @@ var require_event_handler = __commonJS(function(exports) {
|
|
|
12518
12518
|
for (let i = 0;i < results.length; i++) {
|
|
12519
12519
|
const result = results[i];
|
|
12520
12520
|
if (result.status === "rejected") {
|
|
12521
|
-
const { errorHandler
|
|
12522
|
-
if (
|
|
12523
|
-
|
|
12521
|
+
const { errorHandler } = commands[i];
|
|
12522
|
+
if (errorHandler) {
|
|
12523
|
+
errorHandler(result.reason);
|
|
12524
12524
|
continue;
|
|
12525
12525
|
}
|
|
12526
12526
|
throw result.reason;
|
|
@@ -13012,11 +13012,11 @@ var require_Redis = __commonJS(function(exports) {
|
|
|
13012
13012
|
}
|
|
13013
13013
|
stream.setTimeout(0);
|
|
13014
13014
|
stream.destroy();
|
|
13015
|
-
const
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
eventHandler.errorHandler(_this)(
|
|
13015
|
+
const err = new Error("connect ETIMEDOUT");
|
|
13016
|
+
err.errorno = "ETIMEDOUT";
|
|
13017
|
+
err.code = "ETIMEDOUT";
|
|
13018
|
+
err.syscall = "connect";
|
|
13019
|
+
eventHandler.errorHandler(_this)(err);
|
|
13020
13020
|
});
|
|
13021
13021
|
stream.once(CONNECT_EVENT, function() {
|
|
13022
13022
|
connectTimeoutCleared = true;
|