@rpcbase/api 0.76.0 → 0.77.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/dist/index.js +40 -40
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9595,6 +9595,7 @@ function requireStreams() {
|
|
|
9595
9595
|
};
|
|
9596
9596
|
return streams;
|
|
9597
9597
|
}
|
|
9598
|
+
lib$1.exports;
|
|
9598
9599
|
var hasRequiredLib$1;
|
|
9599
9600
|
function requireLib$1() {
|
|
9600
9601
|
if (hasRequiredLib$1) return lib$1.exports;
|
|
@@ -9603,55 +9604,54 @@ function requireLib$1() {
|
|
|
9603
9604
|
var Buffer2 = requireSafer().Buffer;
|
|
9604
9605
|
var bomHandling2 = requireBomHandling();
|
|
9605
9606
|
var mergeModules = requireMergeExports();
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
iconv.encode = function encode(str, encoding2, options) {
|
|
9607
|
+
module.exports.encodings = null;
|
|
9608
|
+
module.exports.defaultCharUnicode = "�";
|
|
9609
|
+
module.exports.defaultCharSingleByte = "?";
|
|
9610
|
+
module.exports.encode = function encode(str, encoding2, options) {
|
|
9611
9611
|
str = "" + (str || "");
|
|
9612
|
-
var encoder =
|
|
9612
|
+
var encoder = module.exports.getEncoder(encoding2, options);
|
|
9613
9613
|
var res = encoder.write(str);
|
|
9614
9614
|
var trail = encoder.end();
|
|
9615
9615
|
return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res;
|
|
9616
9616
|
};
|
|
9617
|
-
|
|
9617
|
+
module.exports.decode = function decode(buf, encoding2, options) {
|
|
9618
9618
|
if (typeof buf === "string") {
|
|
9619
|
-
if (!
|
|
9619
|
+
if (!module.exports.skipDecodeWarning) {
|
|
9620
9620
|
console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");
|
|
9621
|
-
|
|
9621
|
+
module.exports.skipDecodeWarning = true;
|
|
9622
9622
|
}
|
|
9623
9623
|
buf = Buffer2.from("" + (buf || ""), "binary");
|
|
9624
9624
|
}
|
|
9625
|
-
var decoder =
|
|
9625
|
+
var decoder = module.exports.getDecoder(encoding2, options);
|
|
9626
9626
|
var res = decoder.write(buf);
|
|
9627
9627
|
var trail = decoder.end();
|
|
9628
9628
|
return trail ? res + trail : res;
|
|
9629
9629
|
};
|
|
9630
|
-
|
|
9630
|
+
module.exports.encodingExists = function encodingExists(enc) {
|
|
9631
9631
|
try {
|
|
9632
|
-
|
|
9632
|
+
module.exports.getCodec(enc);
|
|
9633
9633
|
return true;
|
|
9634
9634
|
} catch (e) {
|
|
9635
9635
|
return false;
|
|
9636
9636
|
}
|
|
9637
9637
|
};
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
if (!
|
|
9638
|
+
module.exports.toEncoding = module.exports.encode;
|
|
9639
|
+
module.exports.fromEncoding = module.exports.decode;
|
|
9640
|
+
module.exports._codecDataCache = { __proto__: null };
|
|
9641
|
+
module.exports.getCodec = function getCodec(encoding2) {
|
|
9642
|
+
if (!module.exports.encodings) {
|
|
9643
9643
|
var raw = requireEncodings();
|
|
9644
|
-
|
|
9645
|
-
mergeModules(
|
|
9644
|
+
module.exports.encodings = { __proto__: null };
|
|
9645
|
+
mergeModules(module.exports.encodings, raw);
|
|
9646
9646
|
}
|
|
9647
|
-
var enc =
|
|
9647
|
+
var enc = module.exports._canonicalizeEncoding(encoding2);
|
|
9648
9648
|
var codecOptions = {};
|
|
9649
9649
|
while (true) {
|
|
9650
|
-
var codec =
|
|
9650
|
+
var codec = module.exports._codecDataCache[enc];
|
|
9651
9651
|
if (codec) {
|
|
9652
9652
|
return codec;
|
|
9653
9653
|
}
|
|
9654
|
-
var codecDef =
|
|
9654
|
+
var codecDef = module.exports.encodings[enc];
|
|
9655
9655
|
switch (typeof codecDef) {
|
|
9656
9656
|
case "string":
|
|
9657
9657
|
enc = codecDef;
|
|
@@ -9669,47 +9669,47 @@ function requireLib$1() {
|
|
|
9669
9669
|
if (!codecOptions.encodingName) {
|
|
9670
9670
|
codecOptions.encodingName = enc;
|
|
9671
9671
|
}
|
|
9672
|
-
codec = new codecDef(codecOptions,
|
|
9673
|
-
|
|
9672
|
+
codec = new codecDef(codecOptions, module.exports);
|
|
9673
|
+
module.exports._codecDataCache[codecOptions.encodingName] = codec;
|
|
9674
9674
|
return codec;
|
|
9675
9675
|
default:
|
|
9676
9676
|
throw new Error("Encoding not recognized: '" + encoding2 + "' (searched as: '" + enc + "')");
|
|
9677
9677
|
}
|
|
9678
9678
|
}
|
|
9679
9679
|
};
|
|
9680
|
-
|
|
9680
|
+
module.exports._canonicalizeEncoding = function(encoding2) {
|
|
9681
9681
|
return ("" + encoding2).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "");
|
|
9682
9682
|
};
|
|
9683
|
-
|
|
9684
|
-
var codec =
|
|
9683
|
+
module.exports.getEncoder = function getEncoder(encoding2, options) {
|
|
9684
|
+
var codec = module.exports.getCodec(encoding2);
|
|
9685
9685
|
var encoder = new codec.encoder(options, codec);
|
|
9686
9686
|
if (codec.bomAware && options && options.addBOM) {
|
|
9687
9687
|
encoder = new bomHandling2.PrependBOM(encoder, options);
|
|
9688
9688
|
}
|
|
9689
9689
|
return encoder;
|
|
9690
9690
|
};
|
|
9691
|
-
|
|
9692
|
-
var codec =
|
|
9691
|
+
module.exports.getDecoder = function getDecoder(encoding2, options) {
|
|
9692
|
+
var codec = module.exports.getCodec(encoding2);
|
|
9693
9693
|
var decoder = new codec.decoder(options, codec);
|
|
9694
9694
|
if (codec.bomAware && !(options && options.stripBOM === false)) {
|
|
9695
9695
|
decoder = new bomHandling2.StripBOM(decoder, options);
|
|
9696
9696
|
}
|
|
9697
9697
|
return decoder;
|
|
9698
9698
|
};
|
|
9699
|
-
|
|
9700
|
-
if (
|
|
9699
|
+
module.exports.enableStreamingAPI = function enableStreamingAPI(streamModule2) {
|
|
9700
|
+
if (module.exports.supportsStreams) {
|
|
9701
9701
|
return;
|
|
9702
9702
|
}
|
|
9703
9703
|
var streams2 = requireStreams()(streamModule2);
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
return new
|
|
9704
|
+
module.exports.IconvLiteEncoderStream = streams2.IconvLiteEncoderStream;
|
|
9705
|
+
module.exports.IconvLiteDecoderStream = streams2.IconvLiteDecoderStream;
|
|
9706
|
+
module.exports.encodeStream = function encodeStream(encoding2, options) {
|
|
9707
|
+
return new module.exports.IconvLiteEncoderStream(module.exports.getEncoder(encoding2, options), options);
|
|
9708
9708
|
};
|
|
9709
|
-
|
|
9710
|
-
return new
|
|
9709
|
+
module.exports.decodeStream = function decodeStream(encoding2, options) {
|
|
9710
|
+
return new module.exports.IconvLiteDecoderStream(module.exports.getDecoder(encoding2, options), options);
|
|
9711
9711
|
};
|
|
9712
|
-
|
|
9712
|
+
module.exports.supportsStreams = true;
|
|
9713
9713
|
};
|
|
9714
9714
|
var streamModule;
|
|
9715
9715
|
try {
|
|
@@ -9717,9 +9717,9 @@ function requireLib$1() {
|
|
|
9717
9717
|
} catch (e) {
|
|
9718
9718
|
}
|
|
9719
9719
|
if (streamModule && streamModule.Transform) {
|
|
9720
|
-
|
|
9720
|
+
module.exports.enableStreamingAPI(streamModule);
|
|
9721
9721
|
} else {
|
|
9722
|
-
|
|
9722
|
+
module.exports.encodeStream = module.exports.decodeStream = function() {
|
|
9723
9723
|
throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.");
|
|
9724
9724
|
};
|
|
9725
9725
|
}
|