|
@@ -4328,7 +4328,7 @@ function coerce(version) {
|
|
|
if (match == null)
|
|
|
return null;
|
|
|
|
|
|
- return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
|
|
|
+ return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0'));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -37385,7 +37385,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
// This will be bundled directly in the .js file for production builds
|
|
|
var _require = __webpack_require__(194); /**
|
|
|
* Determines the current version of Yarn itself.
|
|
|
- *
|
|
|
+ *
|
|
|
*/
|
|
|
|
|
|
const version = _require.version,
|
|
@@ -39978,7 +39978,7 @@ ECFieldElementFp.prototype.modReduce = function(x)
|
|
|
{
|
|
|
u = u.multiply(this.getR());
|
|
|
}
|
|
|
- x = u.add(v);
|
|
|
+ x = u.add(v);
|
|
|
}
|
|
|
while (x.compareTo(q) >= 0)
|
|
|
{
|
|
@@ -40510,18 +40510,18 @@ function mkdirP (p, opts, f, made) {
|
|
|
else if (!opts || typeof opts !== 'object') {
|
|
|
opts = { mode: opts };
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
var mode = opts.mode;
|
|
|
var xfs = opts.fs || fs;
|
|
|
-
|
|
|
+
|
|
|
if (mode === undefined) {
|
|
|
mode = _0777 & (~process.umask());
|
|
|
}
|
|
|
if (!made) made = null;
|
|
|
-
|
|
|
+
|
|
|
var cb = f || function () {};
|
|
|
p = path.resolve(p);
|
|
|
-
|
|
|
+
|
|
|
xfs.mkdir(p, mode, function (er) {
|
|
|
if (!er) {
|
|
|
made = made || p;
|
|
@@ -40554,10 +40554,10 @@ mkdirP.sync = function sync (p, opts, made) {
|
|
|
if (!opts || typeof opts !== 'object') {
|
|
|
opts = { mode: opts };
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
var mode = opts.mode;
|
|
|
var xfs = opts.fs || fs;
|
|
|
-
|
|
|
+
|
|
|
if (mode === undefined) {
|
|
|
mode = _0777 & (~process.umask());
|
|
|
}
|
|
@@ -81012,11 +81012,11 @@ exports.ECKey = function(curve, key, isPublic)
|
|
|
// var y = key.slice(bytes+1);
|
|
|
// this.P = new ECPointFp(curve,
|
|
|
// curve.fromBigInteger(new BigInteger(x.toString("hex"), 16)),
|
|
|
-// curve.fromBigInteger(new BigInteger(y.toString("hex"), 16)));
|
|
|
+// curve.fromBigInteger(new BigInteger(y.toString("hex"), 16)));
|
|
|
this.P = curve.decodePointHex(key.toString("hex"));
|
|
|
}else{
|
|
|
if(key.length != bytes) return false;
|
|
|
- priv = new BigInteger(key.toString("hex"), 16);
|
|
|
+ priv = new BigInteger(key.toString("hex"), 16);
|
|
|
}
|
|
|
}else{
|
|
|
var n1 = n.subtract(BigInteger.ONE);
|
|
@@ -81038,7 +81038,7 @@ exports.ECKey = function(curve, key, isPublic)
|
|
|
if(!key || !key.P) return false;
|
|
|
var S = key.P.multiply(priv);
|
|
|
return Buffer.from(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex");
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -88481,7 +88481,7 @@ inherits(DestroyableTransform, Transform)
|
|
|
DestroyableTransform.prototype.destroy = function(err) {
|
|
|
if (this._destroyed) return
|
|
|
this._destroyed = true
|
|
|
-
|
|
|
+
|
|
|
var self = this
|
|
|
process.nextTick(function() {
|
|
|
if (err)
|
|
@@ -88602,7 +88602,7 @@ function bytesToUuid(buf, offset) {
|
|
|
var i = offset || 0;
|
|
|
var bth = byteToHex;
|
|
|
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
|
|
- return ([bth[buf[i++]], bth[buf[i++]],
|
|
|
+ return ([bth[buf[i++]], bth[buf[i++]],
|
|
|
bth[buf[i++]], bth[buf[i++]], '-',
|
|
|
bth[buf[i++]], bth[buf[i++]], '-',
|
|
|
bth[buf[i++]], bth[buf[i++]], '-',
|
|
@@ -88954,7 +88954,7 @@ threshold'), { code: 'ECOMPROMISED' }));
|
|
|
// on process exit
|
|
|
|
|
|
// We first check that `lock.updateTimeout.unref` exists because some users
|
|
|
- // may be using this module outside of NodeJS (e.g., in an electron app),
|
|
|
+ // may be using this module outside of NodeJS (e.g., in an electron app),
|
|
|
// and in those cases `setTimeout` return an integer.
|
|
|
if (lock.updateTimeout.unref) {
|
|
|
lock.updateTimeout.unref();
|
|
@@ -94800,7 +94800,7 @@ var crypto = __webpack_require__(12)
|
|
|
* Valid keys.
|
|
|
*/
|
|
|
|
|
|
-var keys =
|
|
|
+var keys =
|
|
|
[ 'acl'
|
|
|
, 'location'
|
|
|
, 'logging'
|
|
@@ -94839,7 +94839,7 @@ module.exports.authorization = authorization
|
|
|
* @param {Object} options
|
|
|
* @return {String}
|
|
|
* @api private
|
|
|
- */
|
|
|
+ */
|
|
|
|
|
|
function hmacSha1 (options) {
|
|
|
return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64')
|
|
@@ -94848,8 +94848,8 @@ function hmacSha1 (options) {
|
|
|
module.exports.hmacSha1 = hmacSha1
|
|
|
|
|
|
/**
|
|
|
- * Create a base64 sha1 HMAC for `options`.
|
|
|
- *
|
|
|
+ * Create a base64 sha1 HMAC for `options`.
|
|
|
+ *
|
|
|
* @param {Object} options
|
|
|
* @return {String}
|
|
|
* @api private
|
|
@@ -94862,10 +94862,10 @@ function sign (options) {
|
|
|
module.exports.sign = sign
|
|
|
|
|
|
/**
|
|
|
- * Create a base64 sha1 HMAC for `options`.
|
|
|
+ * Create a base64 sha1 HMAC for `options`.
|
|
|
*
|
|
|
* Specifically to be used with S3 presigned URLs
|
|
|
- *
|
|
|
+ *
|
|
|
* @param {Object} options
|
|
|
* @return {String}
|
|
|
* @api private
|
|
@@ -94881,7 +94881,7 @@ module.exports.signQuery= signQuery
|
|
|
* Return a string for sign() with the given `options`.
|
|
|
*
|
|
|
* Spec:
|
|
|
- *
|
|
|
+ *
|
|
|
* <verb>\n
|
|
|
* <md5>\n
|
|
|
* <content-type>\n
|
|
@@ -94897,7 +94897,7 @@ module.exports.signQuery= signQuery
|
|
|
function stringToSign (options) {
|
|
|
var headers = options.amazonHeaders || ''
|
|
|
if (headers) headers += '\n'
|
|
|
- var r =
|
|
|
+ var r =
|
|
|
[ options.verb
|
|
|
, options.md5
|
|
|
, options.contentType
|
|
@@ -94913,7 +94913,7 @@ module.exports.stringToSign = stringToSign
|
|
|
* for S3 presigned URLs
|
|
|
*
|
|
|
* Spec:
|
|
|
- *
|
|
|
+ *
|
|
|
* <date>\n
|
|
|
* <resource>
|
|
|
*
|
|
@@ -111095,7 +111095,7 @@ var CacheObject = function (conf) {
|
|
|
conf = conf || {};
|
|
|
conf.ttl = parseInt(conf.ttl, 10) || 300; //0 is not permissible
|
|
|
conf.cachesize = parseInt(conf.cachesize, 10) || 1000; //0 is not permissible
|
|
|
-
|
|
|
+
|
|
|
this.ttl = conf.ttl * 1000;
|
|
|
this.max = conf.cachesize;
|
|
|
|
|
@@ -111236,7 +111236,7 @@ var EnhanceDns = function (conf) {
|
|
|
//cache already exists, means this code has already execute ie method are already overwritten
|
|
|
return dns;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// original function storage
|
|
|
var backup_object = {
|
|
|
lookup : dns.lookup,
|
|
@@ -111252,7 +111252,7 @@ var EnhanceDns = function (conf) {
|
|
|
},
|
|
|
// cache storage instance
|
|
|
cache = conf.cache ? /*istanbul ignore next*/ new conf.cache(conf) : new CacheObject(conf);
|
|
|
-
|
|
|
+
|
|
|
// insert cache object to the instance
|
|
|
dns.internalCache = cache;
|
|
|
|
|
@@ -112818,8 +112818,8 @@ var util = __webpack_require__(3)
|
|
|
, net = __webpack_require__(164)
|
|
|
, tls = __webpack_require__(466)
|
|
|
, AgentSSL = __webpack_require__(195).Agent
|
|
|
-
|
|
|
-function getConnectionName(host, port) {
|
|
|
+
|
|
|
+function getConnectionName(host, port) {
|
|
|
var name = ''
|
|
|
if (typeof host === 'string') {
|
|
|
name = host + ':' + port
|
|
@@ -112828,7 +112828,7 @@ function getConnectionName(host, port) {
|
|
|
name = host.host + ':' + host.port + ':' + (host.localAddress ? (host.localAddress + ':') : ':')
|
|
|
}
|
|
|
return name
|
|
|
-}
|
|
|
+}
|
|
|
|
|
|
function ForeverAgent(options) {
|
|
|
var self = this
|
|
@@ -112846,7 +112846,7 @@ function ForeverAgent(options) {
|
|
|
} else if (self.sockets[name].length < self.minSockets) {
|
|
|
if (!self.freeSockets[name]) self.freeSockets[name] = []
|
|
|
self.freeSockets[name].push(socket)
|
|
|
-
|
|
|
+
|
|
|
// if an error happens while we don't use the socket anyway, meh, throw the socket away
|
|
|
var onIdleError = function() {
|
|
|
socket.destroy()
|
|
@@ -112872,7 +112872,7 @@ ForeverAgent.prototype.createConnection = net.createConnection
|
|
|
ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
|
|
|
ForeverAgent.prototype.addRequest = function(req, host, port) {
|
|
|
var name = getConnectionName(host, port)
|
|
|
-
|
|
|
+
|
|
|
if (typeof host !== 'string') {
|
|
|
var options = host
|
|
|
port = options.port
|
|
@@ -112901,7 +112901,7 @@ ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
|
|
|
delete this.sockets[name]
|
|
|
delete this.requests[name]
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (this.freeSockets[name]) {
|
|
|
var index = this.freeSockets[name].indexOf(s)
|
|
|
if (index !== -1) {
|
|
@@ -119628,7 +119628,7 @@ function DBCSCodec(codecOptions, iconv) {
|
|
|
this.decodeTables = [];
|
|
|
this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.
|
|
|
|
|
|
- // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
|
|
|
+ // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
|
|
|
this.decodeTableSeq = [];
|
|
|
|
|
|
// Actual mapping tables consist of chunks. Use them to fill up decode tables.
|
|
@@ -119637,7 +119637,7 @@ function DBCSCodec(codecOptions, iconv) {
|
|
|
|
|
|
this.defaultCharUnicode = iconv.defaultCharUnicode;
|
|
|
|
|
|
-
|
|
|
+
|
|
|
// Encode tables: Unicode -> DBCS.
|
|
|
|
|
|
// `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.
|
|
@@ -119646,7 +119646,7 @@ function DBCSCodec(codecOptions, iconv) {
|
|
|
// == UNASSIGNED -> no conversion found. Output a default char.
|
|
|
// <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.
|
|
|
this.encodeTable = [];
|
|
|
-
|
|
|
+
|
|
|
// `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of
|
|
|
// objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key
|
|
|
// means end of sequence (needed when one sequence is a strict subsequence of another).
|
|
@@ -119664,7 +119664,7 @@ function DBCSCodec(codecOptions, iconv) {
|
|
|
for (var j = val.from; j <= val.to; j++)
|
|
|
skipEncodeChars[j] = true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// Use decode trie to recursively fill out encode tables.
|
|
|
this._fillEncodeTable(0, 0, skipEncodeChars);
|
|
|
|
|
@@ -119701,7 +119701,7 @@ function DBCSCodec(codecOptions, iconv) {
|
|
|
thirdByteNode[i] = NODE_START - fourthByteNodeIdx;
|
|
|
for (var i = 0x30; i <= 0x39; i++)
|
|
|
fourthByteNode[i] = GB18030_CODE
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
DBCSCodec.prototype.encoder = DBCSEncoder;
|
|
@@ -119766,7 +119766,7 @@ DBCSCodec.prototype._addDecodeChunk = function(chunk) {
|
|
|
else
|
|
|
writeTable[curAddr++] = code; // Basic char
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character.
|
|
|
var charCode = writeTable[curAddr - 1] + 1;
|
|
|
for (var l = 0; l < part; l++)
|
|
@@ -119797,7 +119797,7 @@ DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
|
|
|
}
|
|
|
|
|
|
DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
|
|
|
-
|
|
|
+
|
|
|
// Get the root of character tree according to first character of the sequence.
|
|
|
var uCode = seq[0];
|
|
|
var bucket = this._getEncodeBucket(uCode);
|
|
@@ -119858,7 +119858,7 @@ function DBCSEncoder(options, codec) {
|
|
|
// Encoder state
|
|
|
this.leadSurrogate = -1;
|
|
|
this.seqObj = undefined;
|
|
|
-
|
|
|
+
|
|
|
// Static data
|
|
|
this.encodeTable = codec.encodeTable;
|
|
|
this.encodeTableSeq = codec.encodeTableSeq;
|
|
@@ -119880,7 +119880,7 @@ DBCSEncoder.prototype.write = function(str) {
|
|
|
}
|
|
|
else {
|
|
|
var uCode = nextChar;
|
|
|
- nextChar = -1;
|
|
|
+ nextChar = -1;
|
|
|
}
|
|
|
|
|
|
// 1. Handle surrogates.
|
|
@@ -119902,7 +119902,7 @@ DBCSEncoder.prototype.write = function(str) {
|
|
|
// Incomplete surrogate pair - only trail surrogate found.
|
|
|
uCode = UNASSIGNED;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
else if (leadSurrogate !== -1) {
|
|
@@ -119943,7 +119943,7 @@ DBCSEncoder.prototype.write = function(str) {
|
|
|
var subtable = this.encodeTable[uCode >> 8];
|
|
|
if (subtable !== undefined)
|
|
|
dbcsCode = subtable[uCode & 0xFF];
|
|
|
-
|
|
|
+
|
|
|
if (dbcsCode <= SEQ_START) { // Sequence start
|
|
|
seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
|
|
|
continue;
|
|
@@ -119966,7 +119966,7 @@ DBCSEncoder.prototype.write = function(str) {
|
|
|
// 3. Write dbcsCode character.
|
|
|
if (dbcsCode === UNASSIGNED)
|
|
|
dbcsCode = this.defaultCharSingleByte;
|
|
|
-
|
|
|
+
|
|
|
if (dbcsCode < 0x100) {
|
|
|
newBuf[j++] = dbcsCode;
|
|
|
}
|
|
@@ -120013,7 +120013,7 @@ DBCSEncoder.prototype.end = function() {
|
|
|
newBuf[j++] = this.defaultCharSingleByte;
|
|
|
this.leadSurrogate = -1;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return newBuf.slice(0, j);
|
|
|
}
|
|
|
|
|
@@ -120037,21 +120037,21 @@ function DBCSDecoder(options, codec) {
|
|
|
|
|
|
DBCSDecoder.prototype.write = function(buf) {
|
|
|
var newBuf = Buffer.alloc(buf.length*2),
|
|
|
- nodeIdx = this.nodeIdx,
|
|
|
+ nodeIdx = this.nodeIdx,
|
|
|
prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length,
|
|
|
seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence.
|
|
|
uCode;
|
|
|
|
|
|
if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later.
|
|
|
prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]);
|
|
|
-
|
|
|
+
|
|
|
for (var i = 0, j = 0; i < buf.length; i++) {
|
|
|
var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset];
|
|
|
|
|
|
// Lookup in current trie node.
|
|
|
var uCode = this.decodeTables[nodeIdx][curByte];
|
|
|
|
|
|
- if (uCode >= 0) {
|
|
|
+ if (uCode >= 0) {
|
|
|
// Normal character, just use it.
|
|
|
}
|
|
|
else if (uCode === UNASSIGNED) { // Unknown char.
|
|
@@ -120083,7 +120083,7 @@ DBCSDecoder.prototype.write = function(buf) {
|
|
|
throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
|
|
|
|
|
|
// Write the character to buffer, handling higher planes using surrogate pair.
|
|
|
- if (uCode > 0xFFFF) {
|
|
|
+ if (uCode > 0xFFFF) {
|
|
|
uCode -= 0x10000;
|
|
|
var uCodeLead = 0xD800 + Math.floor(uCode / 0x400);
|
|
|
newBuf[j++] = uCodeLead & 0xFF;
|
|
@@ -120153,11 +120153,11 @@ function findIdx(table, val) {
|
|
|
// require()-s are direct to support Browserify.
|
|
|
|
|
|
module.exports = {
|
|
|
-
|
|
|
+
|
|
|
// == Japanese/ShiftJIS ====================================================
|
|
|
// All japanese encodings are based on JIS X set of standards:
|
|
|
// JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
|
|
|
- // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
|
|
|
+ // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
|
|
|
// Has several variations in 1978, 1983, 1990 and 1997.
|
|
|
// JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
|
|
|
// JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
|
|
@@ -120175,7 +120175,7 @@ module.exports = {
|
|
|
// 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
|
|
|
// * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
|
|
|
// Used as-is in ISO2022 family.
|
|
|
- // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
|
|
|
+ // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
|
|
|
// 0201-1976 Roman, 0208-1978, 0208-1983.
|
|
|
// * ISO2022-JP-1: Adds esc seq for 0212-1990.
|
|
|
// * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
|
|
@@ -120287,7 +120287,7 @@ module.exports = {
|
|
|
// * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
|
|
|
// * Big5-2003 (Taiwan standard) almost superset of cp950.
|
|
|
// * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
|
|
|
- // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
|
|
|
+ // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
|
|
|
// many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
|
|
|
// Plus, it has 4 combining sequences.
|
|
|
// Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
|
|
@@ -120298,7 +120298,7 @@ module.exports = {
|
|
|
// In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
|
|
|
// Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
|
|
|
// http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
|
|
|
- //
|
|
|
+ //
|
|
|
// Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
|
|
|
// Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
|
|
|
|
|
@@ -120344,7 +120344,7 @@ var modules = [
|
|
|
__webpack_require__(711),
|
|
|
];
|
|
|
|
|
|
-// Put all encoding/alias/codec definitions to single object and export it.
|
|
|
+// Put all encoding/alias/codec definitions to single object and export it.
|
|
|
for (var i = 0; i < modules.length; i++) {
|
|
|
var module = modules[i];
|
|
|
for (var enc in module)
|
|
@@ -120496,7 +120496,7 @@ function InternalDecoderCesu8(options, codec) {
|
|
|
}
|
|
|
|
|
|
InternalDecoderCesu8.prototype.write = function(buf) {
|
|
|
- var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
|
|
|
+ var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
|
|
|
res = '';
|
|
|
for (var i = 0; i < buf.length; i++) {
|
|
|
var curByte = buf[i];
|
|
@@ -120557,17 +120557,17 @@ InternalDecoderCesu8.prototype.end = function() {
|
|
|
var Buffer = __webpack_require__(15).Buffer;
|
|
|
|
|
|
// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
|
|
|
-// correspond to encoded bytes (if 128 - then lower half is ASCII).
|
|
|
+// correspond to encoded bytes (if 128 - then lower half is ASCII).
|
|
|
|
|
|
exports._sbcs = SBCSCodec;
|
|
|
function SBCSCodec(codecOptions, iconv) {
|
|
|
if (!codecOptions)
|
|
|
throw new Error("SBCS codec is called without the data.")
|
|
|
-
|
|
|
+
|
|
|
// Prepare char buffer for decoding.
|
|
|
if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))
|
|
|
throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)");
|
|
|
-
|
|
|
+
|
|
|
if (codecOptions.chars.length === 128) {
|
|
|
var asciiString = "";
|
|
|
for (var i = 0; i < 128; i++)
|
|
@@ -120576,7 +120576,7 @@ function SBCSCodec(codecOptions, iconv) {
|
|
|
}
|
|
|
|
|
|
this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');
|
|
|
-
|
|
|
+
|
|
|
// Encoding buffer.
|
|
|
var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
|
|
|
|
|
@@ -120598,7 +120598,7 @@ SBCSEncoder.prototype.write = function(str) {
|
|
|
var buf = Buffer.alloc(str.length);
|
|
|
for (var i = 0; i < str.length; i++)
|
|
|
buf[i] = this.encodeBuf[str.charCodeAt(i)];
|
|
|
-
|
|
|
+
|
|
|
return buf;
|
|
|
}
|
|
|
|
|
@@ -121417,7 +121417,7 @@ Utf16Decoder.prototype.write = function(buf) {
|
|
|
// Codec is not chosen yet. Accumulate initial bytes.
|
|
|
this.initialBytes.push(buf);
|
|
|
this.initialBytesLen += buf.length;
|
|
|
-
|
|
|
+
|
|
|
if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below)
|
|
|
return '';
|
|
|
|
|
@@ -121513,8 +121513,8 @@ Utf7Encoder.prototype.write = function(str) {
|
|
|
// Naive implementation.
|
|
|
// Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-".
|
|
|
return Buffer.from(str.replace(nonDirectChars, function(chunk) {
|
|
|
- return "+" + (chunk === '+' ? '' :
|
|
|
- this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
|
|
|
+ return "+" + (chunk === '+' ? '' :
|
|
|
+ this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
|
|
|
+ "-";
|
|
|
}.bind(this)));
|
|
|
}
|
|
@@ -121536,7 +121536,7 @@ var base64Chars = [];
|
|
|
for (var i = 0; i < 256; i++)
|
|
|
base64Chars[i] = base64Regex.test(String.fromCharCode(i));
|
|
|
|
|
|
-var plusChar = '+'.charCodeAt(0),
|
|
|
+var plusChar = '+'.charCodeAt(0),
|
|
|
minusChar = '-'.charCodeAt(0),
|
|
|
andChar = '&'.charCodeAt(0);
|
|
|
|
|
@@ -121865,7 +121865,7 @@ module.exports = function (iconv) {
|
|
|
}
|
|
|
|
|
|
var nodeNativeEncodings = {
|
|
|
- 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true,
|
|
|
+ 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true,
|
|
|
'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true,
|
|
|
};
|
|
|
|
|
@@ -122089,7 +122089,7 @@ iconv.encode = function encode(str, encoding, options) {
|
|
|
|
|
|
var res = encoder.write(str);
|
|
|
var trail = encoder.end();
|
|
|
-
|
|
|
+
|
|
|
return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;
|
|
|
}
|
|
|
|
|
@@ -122129,7 +122129,7 @@ iconv._codecDataCache = {};
|
|
|
iconv.getCodec = function getCodec(encoding) {
|
|
|
if (!iconv.encodings)
|
|
|
iconv.encodings = __webpack_require__(712); // Lazy load all encoding definitions.
|
|
|
-
|
|
|
+
|
|
|
// Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
|
|
|
var enc = iconv._canonicalizeEncoding(encoding);
|
|
|
|
|
@@ -122153,7 +122153,7 @@ iconv.getCodec = function getCodec(encoding) {
|
|
|
|
|
|
if (!codecOptions.encodingName)
|
|
|
codecOptions.encodingName = enc;
|
|
|
-
|
|
|
+
|
|
|
enc = codecDef.type;
|
|
|
break;
|
|
|
|
|
@@ -122232,7 +122232,7 @@ var Buffer = __webpack_require__(64).Buffer,
|
|
|
|
|
|
// == Exports ==================================================================
|
|
|
module.exports = function(iconv) {
|
|
|
-
|
|
|
+
|
|
|
// Additional Public API.
|
|
|
iconv.encodeStream = function encodeStream(encoding, options) {
|
|
|
return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
|
|
@@ -122327,7 +122327,7 @@ IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
|
|
|
IconvLiteDecoderStream.prototype._flush = function(done) {
|
|
|
try {
|
|
|
var res = this.conv.end();
|
|
|
- if (res && res.length) this.push(res, this.encoding);
|
|
|
+ if (res && res.length) this.push(res, this.encoding);
|
|
|
done();
|
|
|
}
|
|
|
catch (e) {
|
|
@@ -122974,8 +122974,8 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O
|
|
|
if(typeof instance != 'object' || instance instanceof Array){
|
|
|
errors.push({property:path,message:"an object is required"});
|
|
|
}
|
|
|
-
|
|
|
- for(var i in objTypeDef){
|
|
|
+
|
|
|
+ for(var i in objTypeDef){
|
|
|
if(objTypeDef.hasOwnProperty(i)){
|
|
|
var value = instance[i];
|
|
|
// skip _not_ specified properties
|
|
@@ -128134,7 +128134,7 @@ Emoji.replace = function replace (str, replacement, cleanSpaces) {
|
|
|
|
|
|
var replaced = words.map(function(word, idx) {
|
|
|
var emoji = Emoji.findByCode(word);
|
|
|
-
|
|
|
+
|
|
|
if (emoji && cleanSpaces && words[idx + 1] === ' ') {
|
|
|
words[idx + 1] = '';
|
|
|
}
|
|
@@ -128450,7 +128450,7 @@ function compare (a, b) {
|
|
|
}
|
|
|
|
|
|
function generateBase (httpMethod, base_uri, params) {
|
|
|
- // adapted from https://dev.twitter.com/docs/auth/oauth and
|
|
|
+ // adapted from https://dev.twitter.com/docs/auth/oauth and
|
|
|
// https://dev.twitter.com/docs/auth/creating-signature
|
|
|
|
|
|
// Parameter normalization
|
|
@@ -145421,7 +145421,7 @@ function fileSync(options) {
|
|
|
const name = tmpNameSync(opts);
|
|
|
var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
|
|
|
if (opts.discardDescriptor) {
|
|
|
- fs.closeSync(fd);
|
|
|
+ fs.closeSync(fd);
|
|
|
fd = undefined;
|
|
|
}
|
|
|
|
|
@@ -147120,4 +147120,4 @@ module.exports = require("dns");
|
|
|
module.exports = require("domain");
|
|
|
|
|
|
/***/ })
|
|
|
-/******/ ]);
|
|
|
+/******/ ]);
|