bearychat-rtm-client
Advanced tools
Comparing version 0.4.1 to 0.5.0
@@ -21,2 +21,2 @@ "use strict"; | ||
module.exports = exports["default"]; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9EZWZlcnJlZC5qcyJdLCJuYW1lcyI6WyJEZWZlcnJlZCIsInByb21pc2UiLCJQcm9taXNlIiwicmVzb2x2ZSIsInJlamVjdCJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxTQUFTQSxRQUFULEdBQW9CO0FBQUE7O0FBQ2xCLE1BQUksRUFBRSxnQkFBZ0JBLFFBQWxCLENBQUosRUFBaUM7QUFDL0IsV0FBTyxJQUFJQSxRQUFKLEVBQVA7QUFDRDs7QUFFRCxPQUFLQyxPQUFMLEdBQWUsSUFBSUMsT0FBSixDQUFZLFVBQUNDLE9BQUQsRUFBVUMsTUFBVixFQUFxQjtBQUM5QyxVQUFLRCxPQUFMLEdBQWVBLE9BQWY7QUFDQSxVQUFLQyxNQUFMLEdBQWNBLE1BQWQ7QUFDRCxHQUhjLENBQWY7QUFJRDs7a0JBRWNKLFEiLCJmaWxlIjoiRGVmZXJyZWQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBEZWZlcnJlZCgpIHtcclxuICBpZiAoISh0aGlzIGluc3RhbmNlb2YgRGVmZXJyZWQpKSB7XHJcbiAgICByZXR1cm4gbmV3IERlZmVycmVkKCk7XHJcbiAgfVxyXG5cclxuICB0aGlzLnByb21pc2UgPSBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICB0aGlzLnJlc29sdmUgPSByZXNvbHZlO1xyXG4gICAgdGhpcy5yZWplY3QgPSByZWplY3Q7XHJcbiAgfSk7XHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IERlZmVycmVkO1xyXG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9EZWZlcnJlZC5qcyJdLCJuYW1lcyI6WyJEZWZlcnJlZCIsInByb21pc2UiLCJQcm9taXNlIiwicmVzb2x2ZSIsInJlamVjdCJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxTQUFTQSxRQUFULEdBQW9CO0FBQUE7O0FBQ2xCLE1BQUksRUFBRSxnQkFBZ0JBLFFBQWxCLENBQUosRUFBaUM7QUFDL0IsV0FBTyxJQUFJQSxRQUFKLEVBQVA7QUFDRDs7QUFFRCxPQUFLQyxPQUFMLEdBQWUsSUFBSUMsT0FBSixDQUFZLFVBQUNDLE9BQUQsRUFBVUMsTUFBVixFQUFxQjtBQUM5QyxVQUFLRCxPQUFMLEdBQWVBLE9BQWY7QUFDQSxVQUFLQyxNQUFMLEdBQWNBLE1BQWQ7QUFDRCxHQUhjLENBQWY7QUFJRDs7a0JBRWNKLFEiLCJmaWxlIjoiRGVmZXJyZWQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBEZWZlcnJlZCgpIHtcbiAgaWYgKCEodGhpcyBpbnN0YW5jZW9mIERlZmVycmVkKSkge1xuICAgIHJldHVybiBuZXcgRGVmZXJyZWQoKTtcbiAgfVxuXG4gIHRoaXMucHJvbWlzZSA9IG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICB0aGlzLnJlc29sdmUgPSByZXNvbHZlO1xuICAgIHRoaXMucmVqZWN0ID0gcmVqZWN0O1xuICB9KTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgRGVmZXJyZWQ7XG4iXX0= |
@@ -68,2 +68,2 @@ 'use strict'; | ||
module.exports.CancelError = CancelError; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9kZWxheS5qcyJdLCJuYW1lcyI6WyJEZWZlcnJlZCIsInJlcXVpcmUiLCJDYW5jZWxF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VsdCk7XG4gIH0sIG1zKTtcblxuICBjb25zdCB0aHVuayA9IHRodW5rUmVzdWx0ID0+IHtcbiAgICBpZiAoIXVzZVZhbHVlKSB7XG4gICAgICByZXN1bHQgPSB0aHVua1Jlc3VsdDtcbiAgICB9XG4gICAgcmV0dXJuIHByb21pc2U7XG4gIH07XG5cbiAgdGh1bmsudGhlbiA9IHByb21pc2UudGhlbi5iaW5kKHByb21pc2UpO1xuICB0aHVuay5jYXRjaCA9IHByb21pc2UuY2F0Y2guYmluZChwcm9taXNlKTtcbiAgdGh1bmsuX2FjdHVhbFByb21pc2UgPSBwcm9taXNlO1xuXG4gIHRodW5rLmNhbmNlbCA9ICgpID0+IHtcbiAgICBpZiAodGltZW91dCkge1xuICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXQpO1xuICAgICAgdGltZW91dCA9IG51bGw7XG4gICAgICBkZWxheWluZy5yZWplY3QobmV3IENhbmNlbEVycm9yKCdEZWxheSBjYW5jZWxlZCcpKTtcbiAgICB9XG4gIH07XG5cbiAgcmV0dXJuIHRodW5rO1xufTtcblxubW9kdWxlLmV4cG9ydHMgPSBnZW5lcmF0ZSh0cnVlKTtcbm1vZHVsZS5leHBvcnRzLnJlamVjdCA9IGdlbmVyYXRlKGZhbHNlKTtcbm1vZHVsZS5leHBvcnRzLkNhbmNlbEVycm9yID0gQ2FuY2VsRXJyb3I7XG4iXX0= |
{ | ||
"name": "bearychat-rtm-client", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "RTM client for BearyChat", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
156
RTMClient.js
@@ -25,2 +25,6 @@ 'use strict'; | ||
var _withTimeout = require('./withTimeout'); | ||
var _withTimeout2 = _interopRequireDefault(_withTimeout); | ||
var _RTMClientEvents = require('./RTMClientEvents'); | ||
@@ -56,10 +60,12 @@ | ||
var RTMTimeoutError = function (_Error) { | ||
_inherits(RTMTimeoutError, _Error); | ||
var ONE_MINUTE = 60 * 1000; | ||
function RTMTimeoutError(errorMessage, rtmMessage) { | ||
_classCallCheck(this, RTMTimeoutError); | ||
var RTMSendTimeoutError = function (_Error) { | ||
_inherits(RTMSendTimeoutError, _Error); | ||
var _this = _possibleConstructorReturn(this, (RTMTimeoutError.__proto__ || Object.getPrototypeOf(RTMTimeoutError)).call(this, errorMessage)); | ||
function RTMSendTimeoutError(errorMessage, rtmMessage) { | ||
_classCallCheck(this, RTMSendTimeoutError); | ||
var _this = _possibleConstructorReturn(this, (RTMSendTimeoutError.__proto__ || Object.getPrototypeOf(RTMSendTimeoutError)).call(this, errorMessage)); | ||
_this.rtmMessage = rtmMessage; | ||
@@ -69,3 +75,3 @@ return _this; | ||
return RTMTimeoutError; | ||
return RTMSendTimeoutError; | ||
}(Error); | ||
@@ -88,2 +94,20 @@ | ||
var RTMReconnectTimeoutError = function (_Error3) { | ||
_inherits(RTMReconnectTimeoutError, _Error3); | ||
function RTMReconnectTimeoutError(errorMessage) { | ||
_classCallCheck(this, RTMReconnectTimeoutError); | ||
var _this3 = _possibleConstructorReturn(this, (RTMReconnectTimeoutError.__proto__ || Object.getPrototypeOf(RTMReconnectTimeoutError)).call(this, errorMessage)); | ||
_this3.constructor = RTMReconnectTimeoutError; | ||
_this3.__proto__ = RTMReconnectTimeoutError.prototype; | ||
return _this3; | ||
} | ||
return RTMReconnectTimeoutError; | ||
}(Error); | ||
; | ||
/** | ||
@@ -114,3 +138,2 @@ * Keep an RTM client running with multiple. | ||
var RTMClient = function (_EventEmitter) { | ||
@@ -120,10 +143,10 @@ _inherits(RTMClient, _EventEmitter); | ||
function RTMClient(options) { | ||
var _this4 = this; | ||
var _this5 = this; | ||
_classCallCheck(this, RTMClient); | ||
var _this3 = _possibleConstructorReturn(this, (RTMClient.__proto__ || Object.getPrototypeOf(RTMClient)).call(this)); | ||
var _this4 = _possibleConstructorReturn(this, (RTMClient.__proto__ || Object.getPrototypeOf(RTMClient)).call(this)); | ||
_this3._doConnect = _asyncToGenerator(_regenerator2.default.mark(function _callee() { | ||
var wsUrl; | ||
_this4._doConnect = _asyncToGenerator(_regenerator2.default.mark(function _callee() { | ||
var wsUrl, timeoutMessage; | ||
return _regenerator2.default.wrap(function _callee$(_context) { | ||
@@ -133,32 +156,33 @@ while (1) { | ||
case 0: | ||
_this3._state = _RTMClientState2.default.CONNECTING; | ||
_this4._state = _RTMClientState2.default.CONNECTING; | ||
wsUrl = void 0; | ||
_context.prev = 2; | ||
_context.next = 5; | ||
return _this3._getUrl(); | ||
timeoutMessage = new RTMReconnectTimeoutError('Reget websocket url error'); | ||
_context.prev = 3; | ||
_context.next = 6; | ||
return (0, _withTimeout2.default)(_this4._reconnectTimeout, timeoutMessage, _this4._getUrl()); | ||
case 5: | ||
case 6: | ||
wsUrl = _context.sent; | ||
_context.next = 13; | ||
_context.next = 14; | ||
break; | ||
case 8: | ||
_context.prev = 8; | ||
_context.t0 = _context['catch'](2); | ||
case 9: | ||
_context.prev = 9; | ||
_context.t0 = _context['catch'](3); | ||
_this3._reconnect(); // intentionally ignore "await" | ||
_this3.emit(_RTMClientEvents2.default.ERROR, _context.t0); | ||
_this4._reconnect(); // intentionally ignore "await" | ||
_this4.emit(_RTMClientEvents2.default.ERROR, _context.t0); | ||
return _context.abrupt('return'); | ||
case 13: | ||
case 14: | ||
_this3._reconnectAttempts = 1; | ||
_this3._setConnection(new _RTMConnection2.default({ | ||
_this4._reconnectAttempts = 1; | ||
_this4._setConnection(new _RTMConnection2.default({ | ||
url: wsUrl, | ||
WebSocket: _this3.WebSocket, | ||
pingInterval: _this3._pingInterval | ||
WebSocket: _this4.WebSocket, | ||
pingInterval: _this4._pingInterval | ||
})); | ||
case 15: | ||
case 16: | ||
case 'end': | ||
@@ -168,31 +192,31 @@ return _context.stop(); | ||
} | ||
}, _callee, _this4, [[2, 8]]); | ||
}, _callee, _this5, [[3, 9]]); | ||
})); | ||
_this3._handleConnectionOpen = function () { | ||
_this3._state = _RTMClientState2.default.CONNECTED; | ||
_this3.emit(_RTMClientEvents2.default.ONLINE); | ||
_this4._handleConnectionOpen = function () { | ||
_this4._state = _RTMClientState2.default.CONNECTED; | ||
_this4.emit(_RTMClientEvents2.default.ONLINE); | ||
}; | ||
_this3._handleConnectionClose = function () { | ||
_this3._removeConnection(); | ||
if (_this3._forceClose) { | ||
_this4._handleConnectionClose = function () { | ||
_this4._removeConnection(); | ||
if (_this4._forceClose) { | ||
// client close, close normally | ||
_this3._state = _RTMClientState2.default.CLOSED; | ||
_this3.emit(_RTMClientEvents2.default.OFFLINE); | ||
_this3.emit(_RTMClientEvents2.default.CLOSE); | ||
_this3._forceClose = false; | ||
_this4._state = _RTMClientState2.default.CLOSED; | ||
_this4.emit(_RTMClientEvents2.default.OFFLINE); | ||
_this4.emit(_RTMClientEvents2.default.CLOSE); | ||
_this4._forceClose = false; | ||
} else { | ||
// server close or error, re-connect | ||
_this3._reconnect(); | ||
_this3.emit(_RTMClientEvents2.default.OFFLINE); | ||
_this4._reconnect(); | ||
_this4.emit(_RTMClientEvents2.default.OFFLINE); | ||
} | ||
}; | ||
_this3._handleConnectionError = function (error) { | ||
_this3.emit(_RTMClientEvents2.default.ERROR, error); | ||
_this4._handleConnectionError = function (error) { | ||
_this4.emit(_RTMClientEvents2.default.ERROR, error); | ||
}; | ||
_this3._handleConnectionMessage = function (message) { | ||
_this3.emit(_RTMClientEvents2.default.EVENT, message); | ||
_this4._handleConnectionMessage = function (message) { | ||
_this4.emit(_RTMClientEvents2.default.EVENT, message); | ||
}; | ||
@@ -216,18 +240,20 @@ | ||
_this3._url = url; | ||
_this3.WebSocket = WebSocket; | ||
_this4._url = url; | ||
_this4.WebSocket = WebSocket; | ||
// following options are internal to speed up testing. | ||
_this3._pingInterval = options.pingInterval || 5000; | ||
_this3._backoffMultiplier = options.backoffMultiplier || 1000; | ||
_this4._pingInterval = options.pingInterval || 5000; | ||
_this4._backoffMultiplier = options.backoffMultiplier || 1000; | ||
_this3._connectionEvents = [[_RTMConnectionEvents2.default.OPEN, _this3._handleConnectionOpen], [_RTMConnectionEvents2.default.CLOSE, _this3._handleConnectionClose], [_RTMConnectionEvents2.default.ERROR, _this3._handleConnectionError], [_RTMConnectionEvents2.default.MESSAGE, _this3._handleConnectionMessage]]; | ||
_this4._reconnectTimeout = options.reconnectTimeout || ONE_MINUTE; | ||
_this3._state = _RTMClientState2.default.INITIAL; | ||
_this3._connection = null; | ||
_this3._forceClose = false; | ||
_this3._reconnectAttempts = 1; | ||
_this4._connectionEvents = [[_RTMConnectionEvents2.default.OPEN, _this4._handleConnectionOpen], [_RTMConnectionEvents2.default.CLOSE, _this4._handleConnectionClose], [_RTMConnectionEvents2.default.ERROR, _this4._handleConnectionError], [_RTMConnectionEvents2.default.MESSAGE, _this4._handleConnectionMessage]]; | ||
_this3.connect(); | ||
return _this3; | ||
_this4._state = _RTMClientState2.default.INITIAL; | ||
_this4._connection = null; | ||
_this4._forceClose = false; | ||
_this4._reconnectAttempts = 1; | ||
_this4.connect(); | ||
return _this4; | ||
} | ||
@@ -363,3 +389,3 @@ | ||
var _ref5 = _asyncToGenerator(_regenerator2.default.mark(function _callee5(message, timeout) { | ||
var sendPromise, timeoutPromise, sendResult; | ||
var sendPromise, timeoutMessage; | ||
return _regenerator2.default.wrap(function _callee5$(_context5) { | ||
@@ -386,13 +412,6 @@ while (1) { | ||
sendPromise = this._send(message); | ||
timeoutPromise = _delay2.default.reject(timeout, new RTMTimeoutError('RTM message send timeout.', message)); | ||
_context5.next = 9; | ||
return Promise.race([sendPromise, timeoutPromise]); | ||
timeoutMessage = new RTMSendTimeoutError('RTM message send timeout.', message); | ||
return _context5.abrupt('return', (0, _withTimeout2.default)(timeout, timeoutMessage, sendPromise)); | ||
case 9: | ||
sendResult = _context5.sent; | ||
timeoutPromise.cancel(); | ||
return _context5.abrupt('return', sendResult); | ||
case 12: | ||
case 8: | ||
case 'end': | ||
@@ -463,2 +482,3 @@ return _context5.stop(); | ||
RTMClient.RTMMessageTypes = _RTMMessageTypes2.default; | ||
RTMClient.RTMReconnectTimeoutError = RTMReconnectTimeoutError; | ||
exports.default = RTMClient; | ||
@@ -472,2 +492,2 @@ function generateInterval(attempts) { | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9SVE1DbGllbnQuanMiXSwibmFtZXMiOlsiUlRNVGltZW91dEVycm9yIiwiZXJyb3JNZXNzYWdlIiwicnRtTWVzc2FnZSIsIkVycm9yIiwiUlRNTm90Q29ubmVjdGVkRXJyb3IiLCJSVE1DbGllbnQiLCJvcHRpb25zIiwiX2RvQ29ubmVjdCIsIl9zdGF0ZSIsIkNPTk5FQ1RJTkciLCJ3c1VybCIsIl9nZXRVcmwiLCJfcmVjb25uZWN0IiwiZW1pdCIsIkVSUk9SIiwiX3JlY29ubmVjdEF0dGVtcHRzIiwiX3NldENvbm5lY3Rpb24iLCJ1cmwiLCJXZWJTb2NrZXQiLCJwaW5nSW50ZXJ2YWwiLCJfcGluZ0ludGVydmFsIiwiX2hhbmRsZUNvbm5lY3Rpb25PcGVuIiwiQ09OTkVDVEVEIiwiT05MSU5FIiwiX2hhbmRsZUNvbm5lY3Rpb25DbG9zZSIsIl9yZW1vdmVDb25uZWN0aW9uIiwiX2ZvcmNlQ2xvc2UiLCJDTE9TRUQiLCJPRkZMSU5FIiwiQ0xPU0UiLCJfaGFuZGxlQ29ubmVjdGlvbkVycm9yIiwiZXJyb3IiLCJfaGFuZGxlQ29ubmVjdGlvbk1lc3NhZ2UiLCJtZXNzYWdlIiwiRVZFTlQiLCJ3aW5kb3ciLCJfdXJsIiwiX2JhY2tvZmZNdWx0aXBsaWVyIiwiYmFja29mZk11bHRpcGxpZXIiLCJfY29ubmVjdGlvbkV2ZW50cyIsIk9QRU4iLCJNRVNTQUdFIiwiSU5JVElBTCIsIl9jb25uZWN0aW9uIiwiY29ubmVjdCIsIlJFQ09OTkVDVCIsImdlbmVyYXRlSW50ZXJ2YWwiLCJDT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sYXNzIFJUTVRpbWVvdXRFcnJvciBleHRlbmRzIEVycm9yIHtcbiAgY29uc3RydWN0b3IoZXJyb3JNZXNzYWdlLCBydG1NZXNzYWdlKSB7XG4gICAgc3VwZXIoZXJyb3JNZXNzYWdlKTtcbiAgICB0aGlzLnJ0bU1lc3NhZ2UgPSBydG1NZXNzYWdlO1xuICB9XG59XG5cbmNsYXNzIFJUTU5vdENvbm5lY3RlZEVycm9yIGV4dGVuZHMgRXJyb3Ige1xuICBjb25zdHJ1Y3RvcihlcnJvck1lc3NhZ2UsIHJ0bU1lc3NhZ2UpIHtcbiAgICBzdXBlcihlcnJvck1lc3NhZ2UpO1xuICAgIHRoaXMucnRtTWVzc2FnZSA9IHJ0bU1lc3NhZ2U7XG4gIH1cbn1cblxuLyoqXG4gKiBLZWVwIGFuIFJUTSBjbGllbnQgcnVubmluZyB3aXRoIG11bHRpcGxlLlxuICpcbiAqIFN0YXRlIGRpYWdyYW06XG4gKlxuICogICAgICAgICAgICAgICAgICAgIElOSVRJQUxcbiAqICAgICAgICAgICAgICAgICAgICAgICArXG4gKiAgICAgICAgICBlcnJvciAgICAgICAgfFxuICogICAgICArLS0tLS0tLS0tLS0tLSsgIHxcbiAqICAgICAgdiAgICAgICAgICAgICArICB2ICAgICAgICBjb25uZWN0XG4gKiAgUkVDT05ORUNUKy0tLS0tLS0+Q09OTkVDVElORzwtLS0tLS0tLS0rQ0xPU0VEXG4gKiAgICAgIF4gICAgICAgICAgICAgICAgKyAgICAgICAgICAgICAgICAgICAgXlxuICogICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHxcbiAqICAgICAgfCAgICBzZXJ2ZXIgICAgICB8ICAgICAgICAgICAgICAgICAgICB8XG4gKiAgICAgIHwgICAgY2xvc2UvICAgICAgdiAgICAgICAgY2xvc2UgICAgICAgK1xuICogICAgICArLS0tLS0tLS0tLS0tK0NPTk5FQ1RFRCstLS0tLS0tLS0tPkNMT1NJTkdcbiAqICAgIC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zdHJ1Y3RvcihlcnJvck1lc3NhZ2UsIHJ0bU1lc3NhZ2UpIHtcbiAgICBzdXBlcihlcnJvck1lc3NhZ2UpO1xuICAgIHRoaXMucnRtTWVzc2FnZSA9IHJ0bU1lc3NhZ2U7XG4gIH1cbn1cblxuY2xhc3MgUlRNUmVjb25uZWN0VGltZW91dEVycm9yIGV4dGVuZHMgRXJyb3Ige1xuICBjb25zdHJ1Y3RvcihlcnJvck1lc3NhZ2UpIHtcbiAgICBzdXBlcihlcnJvck1lc3NhZ2UpO1xuICAgIHRoaXMuY29uc3RydWN0b3IgPSBSVE1SZWNvbm5lY3RUaW1lb3V0RXJyb3I7XG4gICAgdGhpcy5fX3Byb3RvX18gPSBSVE1SZWNvbm5lY3RUaW1lb3V0RXJyb3IucHJvdG90eXBlO1xuICB9XG59O1xuXG4vKipcbiAqIEtlZXAgYW4gUlRNIGNsaWVudCBydW5uaW5nIHdpdGggbXVsdGlwbGUuXG4gKlxuICogU3RhdGUgZGlhZ3JhbTpcbiAqXG4gKiAgICAgICAgICAgICAgICAgICAgSU5JVElBTFxuICogICAgICAgICAgICAgICAgICAgICAgICtcbiAqICAgICAgICAgIGVycm9yICAgICAgICB8XG4gKiAgICAgICstLS0tLS0tLS0tLS0tKyAgfFxuICogICAgICB2ICAgICAgICAgICAgICsgIHYgICAgICAgIGNvbm5lY3RcbiAqICBSRUNPTk5FQ1QrLS0tLS0tLT5DT05ORUNUSU5HPC0tLS0tLS0tLStDTE9TRURcbiAqICAgICAgXiAgICAgICAgICAgICAgICArICAgICAgICAgICAgICAgICAgICBeXG4gKiAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfFxuICogICAgICB8ICAgIHNlcnZlciAgICAgIHwgICAgICAgICAgICAgICAgICAgIHxcbiAqICAgICAgfCAgICBjbG9zZS8gICAgICB2ICAgICAgICBjbG9zZSAgICAgICArXG4gKiAgICAgICstLS0tLS0tLS0tLS0rQ09OTkVDVEVEKy0tLS0t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AgICBpbnZhcmlhbnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICdDb25uZWN0aW9uIG5vdCBzZXQgb3IgYWxyZWFkeSByZW1vdmVkLidcbiAgICAgICk7XG4gICAgfVxuXG4gICAgdGhpcy5fY29ubmVjdGlvbkV2ZW50cy5mb3JFYWNoKChbbmFtZSwgaGFuZGxlcl0pID0+IHtcbiAgICAgIGNvbm5lY3Rpb24ucmVtb3ZlTGlzdGVuZXIobmFtZSwgaGFuZGxlcik7XG4gICAgfSk7XG5cbiAgICB0aGlzLl9jb25uZWN0aW9uID0gbnVsbDtcbiAgfVxufVxuXG4vLyBleHBvbmVudGlhbCBiYWNrb2ZmLCAzMCBzZWNvbmRzIG1heFxuZnVuY3Rpb24gZ2VuZXJhdGVJbnRlcnZhbChhdHRlbXB0cywgbXVsdGlwbGllciA9IDEwMDApIHtcbiAgY29uc3QgbWF4SW50ZXJ2YWwgPSBNYXRoLm1pbigzMCwgKE1hdGgucG93KDIsIGF0dGVtcHRzKSAtIDEpKSAqIG11bHRpcGxpZXI7XG4gIHJldHVybiBNYXRoLnJhbmRvbSgpICogbWF4SW50ZXJ2YWw7XG59XG4iXX0= |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
130537
21
1334
1