' + body + '\n' + - '\n' + - '\n' -} - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -function decode (path) { - try { - return decodeURIComponent(path) - } catch (err) { - return -1 - } -} - -/** - * Get the header names on a respnse. - * - * @param {object} res - * @returns {array[string]} - * @private - */ - -function getHeaderNames (res) { - return typeof res.getHeaderNames !== 'function' - ? Object.keys(res._headers || {}) - : res.getHeaderNames() -} - -/** - * Determine if emitter has listeners of a given type. - * - * The way to do this check is done three different ways in Node.js >= 0.8 - * so this consolidates them into a minimal set using instance methods. - * - * @param {EventEmitter} emitter - * @param {string} type - * @returns {boolean} - * @private - */ - -function hasListeners (emitter, type) { - var count = typeof emitter.listenerCount !== 'function' - ? emitter.listeners(type).length - : emitter.listenerCount(type) - - return count > 0 -} - -/** - * Determine if the response headers have been sent. - * - * @param {object} res - * @returns {boolean} - * @private - */ - -function headersSent (res) { - return typeof res.headersSent !== 'boolean' - ? Boolean(res._header) - : res.headersSent -} - -/** - * Normalize the index option into an array. - * - * @param {boolean|string|array} val - * @param {string} name - * @private - */ - -function normalizeList (val, name) { - var list = [].concat(val || []) - - for (var i = 0; i < list.length; i++) { - if (typeof list[i] !== 'string') { - throw new TypeError(name + ' must be array of strings or false') + exports2.addContextToFrame = addContextToFrame; + function stripUrlQueryAndFragment(urlPath) { + return urlPath.split(/[\?#]/, 1)[0]; + } + exports2.stripUrlQueryAndFragment = stripUrlQueryAndFragment; + function checkOrSetAlreadyCaught(exception) { + if (exception && exception.__sentry_captured__) { + return true; + } + try { + object_1.addNonEnumerableProperty(exception, "__sentry_captured__", true); + } catch (err) { + } + return false; } + exports2.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught; } +}); - return list -} - -/** - * Parse an HTTP Date into a number. - * - * @param {string} date - * @private - */ - -function parseHttpDate (date) { - var timestamp = date && Date.parse(date) - - return typeof timestamp === 'number' - ? timestamp - : NaN -} - -/** - * Parse a HTTP token list. - * - * @param {string} str - * @private - */ - -function parseTokenList (str) { - var end = 0 - var list = [] - var start = 0 - - // gather tokens - for (var i = 0, len = str.length; i < len; i++) { - switch (str.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i + 1 +// node_modules/@sentry/utils/dist/normalize.js +var require_normalize = __commonJS({ + "node_modules/@sentry/utils/dist/normalize.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var is_1 = require_is(); + var memo_1 = require_memo(); + var object_1 = require_object(); + var stacktrace_1 = require_stacktrace(); + function normalize(input, depth, maxProperties) { + if (depth === void 0) { + depth = Infinity; + } + if (maxProperties === void 0) { + maxProperties = Infinity; + } + try { + return visit("", input, depth, maxProperties); + } catch (err) { + return { ERROR: "**non-serializable** (" + err + ")" }; + } + } + exports2.normalize = normalize; + function normalizeToSize(object, depth, maxSize) { + if (depth === void 0) { + depth = 3; + } + if (maxSize === void 0) { + maxSize = 100 * 1024; + } + var normalized = normalize(object, depth); + if (jsonSize(normalized) > maxSize) { + return normalizeToSize(object, depth - 1, maxSize); + } + return normalized; + } + exports2.normalizeToSize = normalizeToSize; + function visit(key, value, depth, maxProperties, memo) { + if (depth === void 0) { + depth = Infinity; + } + if (maxProperties === void 0) { + maxProperties = Infinity; + } + if (memo === void 0) { + memo = memo_1.memoBuilder(); + } + var _a = tslib_1.__read(memo, 2), memoize = _a[0], unmemoize = _a[1]; + var valueWithToJSON = value; + if (valueWithToJSON && typeof valueWithToJSON.toJSON === "function") { + try { + return valueWithToJSON.toJSON(); + } catch (err) { + } + } + if (value === null || ["number", "boolean", "string"].includes(typeof value) && !is_1.isNaN(value)) { + return value; + } + var stringified = stringifyValue(key, value); + if (!stringified.startsWith("[object ")) { + return stringified; + } + if (depth === 0) { + return stringified.replace("object ", ""); + } + if (memoize(value)) { + return "[Circular ~]"; + } + var normalized = Array.isArray(value) ? [] : {}; + var numAdded = 0; + var visitable = is_1.isError(value) || is_1.isEvent(value) ? object_1.convertToPlainObject(value) : value; + for (var visitKey in visitable) { + if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) { + continue; } - break - case 0x2c: /* , */ - if (start !== end) { - list.push(str.substring(start, end)) + if (numAdded >= maxProperties) { + normalized[visitKey] = "[MaxProperties ~]"; + break; } - start = end = i + 1 - break - default: - end = i + 1 - break + var visitValue = visitable[visitKey]; + normalized[visitKey] = visit(visitKey, visitValue, depth - 1, maxProperties, memo); + numAdded += 1; + } + unmemoize(value); + return normalized; } - } - - // final token - if (start !== end) { - list.push(str.substring(start, end)) - } - - return list -} - -/** - * Set an object of headers on a response. - * - * @param {object} res - * @param {object} headers - * @private - */ - -function setHeaders (res, headers) { - var keys = Object.keys(headers) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - res.setHeader(key, headers[key]) - } -} - - -/***/ }), -/* 382 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -/* eslint no-prototype-builtins: 0 */ - -const format = __webpack_require__(321) -const { mapHttpRequest, mapHttpResponse } = __webpack_require__(329) -const SonicBoom = __webpack_require__(450) -const stringifySafe = __webpack_require__(97) -const { - lsCacheSym, - chindingsSym, - parsedChindingsSym, - writeSym, - serializersSym, - formatOptsSym, - endSym, - stringifiersSym, - stringifySym, - wildcardFirstSym, - needsMetadataGsym, - redactFmtSym, - streamSym, - nestedKeySym, - formattersSym, - messageKeySym -} = __webpack_require__(230) - -function noop () {} - -function genLog (level, hook) { - if (!hook) return LOG - - return function hookWrappedLog (...args) { - hook.call(this, args, LOG, level) - } - - function LOG (o, ...n) { - if (typeof o === 'object') { - let msg = o - if (o !== null) { - if (o.method && o.headers && o.socket) { - o = mapHttpRequest(o) - } else if (typeof o.setHeader === 'function') { - o = mapHttpResponse(o) - } - } - if (this[nestedKeySym]) o = { [this[nestedKeySym]]: o } - let formatParams - if (msg === null && n.length === 0) { - formatParams = [null] - } else { - msg = n.shift() - formatParams = n + exports2.walk = visit; + function stringifyValue(key, value) { + try { + if (key === "domain" && value && typeof value === "object" && value._events) { + return "[Domain]"; + } + if (key === "domainEmitter") { + return "[DomainEmitter]"; + } + if (typeof global !== "undefined" && value === global) { + return "[Global]"; + } + if (typeof window !== "undefined" && value === window) { + return "[Window]"; + } + if (typeof document !== "undefined" && value === document) { + return "[Document]"; + } + if (is_1.isSyntheticEvent(value)) { + return "[SyntheticEvent]"; + } + if (typeof value === "number" && value !== value) { + return "[NaN]"; + } + if (value === void 0) { + return "[undefined]"; + } + if (typeof value === "function") { + return "[Function: " + stacktrace_1.getFunctionName(value) + "]"; + } + if (typeof value === "symbol") { + return "[" + String(value) + "]"; + } + if (typeof value === "bigint") { + return "[BigInt: " + String(value) + "]"; + } + return "[object " + Object.getPrototypeOf(value).constructor.name + "]"; + } catch (err) { + return "**non-serializable** (" + err + ")"; } - this[writeSym](o, format(msg, formatParams, this[formatOptsSym]), level) - } else { - this[writeSym](null, format(o, n, this[formatOptsSym]), level) + } + function utf8Length(value) { + return ~-encodeURI(value).split(/%..|./).length; + } + function jsonSize(value) { + return utf8Length(JSON.stringify(value)); } } -} - -// magically escape strings for json -// relying on their charCodeAt -// everything below 32 needs JSON.stringify() -// 34 and 92 happens all the time, so we -// have a fast case for them -function asString (str) { - let result = '' - let last = 0 - let found = false - let point = 255 - const l = str.length - if (l > 100) { - return JSON.stringify(str) - } - for (var i = 0; i < l && point >= 32; i++) { - point = str.charCodeAt(i) - if (point === 34 || point === 92) { - result += str.slice(last, i) + '\\' - last = i - found = true - } - } - if (!found) { - result = str - } else { - result += str.slice(last) - } - return point < 32 ? JSON.stringify(str) : '"' + result + '"' -} +}); -function asJson (obj, msg, num, time) { - const stringify = this[stringifySym] - const stringifiers = this[stringifiersSym] - const end = this[endSym] - const chindings = this[chindingsSym] - const serializers = this[serializersSym] - const formatters = this[formattersSym] - const messageKey = this[messageKeySym] - let data = this[lsCacheSym][num] + time - - // we need the child bindings added to the output first so instance logged - // objects can take precedence when JSON.parse-ing the resulting log line - data = data + chindings - - let value - const notHasOwnProperty = obj.hasOwnProperty === undefined - if (formatters.log) { - obj = formatters.log(obj) - } - if (msg !== undefined) { - obj[messageKey] = msg - } - const wildcardStringifier = stringifiers[wildcardFirstSym] - for (const key in obj) { - value = obj[key] - if ((notHasOwnProperty || obj.hasOwnProperty(key)) && value !== undefined) { - value = serializers[key] ? serializers[key](value) : value - - const stringifier = stringifiers[key] || wildcardStringifier - - switch (typeof value) { - case 'undefined': - case 'function': - continue - case 'number': - /* eslint no-fallthrough: "off" */ - if (Number.isFinite(value) === false) { - value = null - } - // this case explicitly falls through to the next one - case 'boolean': - if (stringifier) value = stringifier(value) - break - case 'string': - value = (stringifier || asString)(value) - break - default: - value = (stringifier || stringify)(value) +// node_modules/@sentry/utils/dist/path.js +var require_path = __commonJS({ + "node_modules/@sentry/utils/dist/path.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + function normalizeArray(parts, allowAboveRoot) { + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === ".") { + parts.splice(i, 1); + } else if (last === "..") { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift(".."); + } } - if (value === undefined) continue - data += ',"' + key + '":' + value + return parts; } - } - - return data + end -} - -function asChindings (instance, bindings) { - let value - let data = instance[chindingsSym] - const stringify = instance[stringifySym] - const stringifiers = instance[stringifiersSym] - const wildcardStringifier = stringifiers[wildcardFirstSym] - const serializers = instance[serializersSym] - const formatter = instance[formattersSym].bindings - bindings = formatter(bindings) - - for (const key in bindings) { - value = bindings[key] - const valid = key !== 'level' && - key !== 'serializers' && - key !== 'formatters' && - key !== 'customLevels' && - bindings.hasOwnProperty(key) && - value !== undefined - if (valid === true) { - value = serializers[key] ? serializers[key](value) : value - value = (stringifiers[key] || wildcardStringifier || stringify)(value) - if (value === undefined) continue - data += ',"' + key + '":' + value - } - } - return data -} - -function getPrettyStream (opts, prettifier, dest, instance) { - if (prettifier && typeof prettifier === 'function') { - prettifier = prettifier.bind(instance) - return prettifierMetaWrapper(prettifier(opts), dest, opts) - } - try { - const prettyFactory = __webpack_require__(123).prettyFactory || __webpack_require__(123) - prettyFactory.asMetaWrapper = prettifierMetaWrapper - return prettifierMetaWrapper(prettyFactory(opts), dest, opts) - } catch (e) { - if (e.message.startsWith("Cannot find module 'pino-pretty'")) { - throw Error('Missing `pino-pretty` module: `pino-pretty` must be installed separately') - }; - throw e - } -} - -function prettifierMetaWrapper (pretty, dest, opts) { - opts = Object.assign({ suppressFlushSyncWarning: false }, opts) - let warned = false - return { - [needsMetadataGsym]: true, - lastLevel: 0, - lastMsg: null, - lastObj: null, - lastLogger: null, - flushSync () { - if (opts.suppressFlushSyncWarning || warned) { - return - } - warned = true - setMetadataProps(dest, this) - dest.write(pretty(Object.assign({ - level: 40, // warn - msg: 'pino.final with prettyPrint does not support flushing', - time: Date.now() - }, this.chindings()))) - }, - chindings () { - const lastLogger = this.lastLogger - let chindings = null - - // protection against flushSync being called before logging - // anything - if (!lastLogger) { - return null - } - - if (lastLogger.hasOwnProperty(parsedChindingsSym)) { - chindings = lastLogger[parsedChindingsSym] - } else { - chindings = JSON.parse('{' + lastLogger[chindingsSym].substr(1) + '}') - lastLogger[parsedChindingsSym] = chindings + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/; + function splitPath(filename) { + var parts = splitPathRe.exec(filename); + return parts ? parts.slice(1) : []; + } + function resolve() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; } - - return chindings - }, - write (chunk) { - const lastLogger = this.lastLogger - const chindings = this.chindings() - - let time = this.lastTime - - if (time.match(/^\d+/)) { - time = parseInt(time) - } else { - time = time.slice(1, -1) + var resolvedPath = ""; + var resolvedAbsolute = false; + for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = i >= 0 ? args[i] : "/"; + if (!path) { + continue; + } + resolvedPath = path + "/" + resolvedPath; + resolvedAbsolute = path.charAt(0) === "/"; } - - const lastObj = this.lastObj - const lastMsg = this.lastMsg - const errorProps = null - - const formatters = lastLogger[formattersSym] - const formattedObj = formatters.log ? formatters.log(lastObj) : lastObj - - const messageKey = lastLogger[messageKeySym] - if (lastMsg && formattedObj && !formattedObj.hasOwnProperty(messageKey)) { - formattedObj[messageKey] = lastMsg + resolvedPath = normalizeArray(resolvedPath.split("/").filter(function(p) { + return !!p; + }), !resolvedAbsolute).join("/"); + return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; + } + exports2.resolve = resolve; + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== "") { + break; + } } - - const obj = Object.assign({ - level: this.lastLevel, - time - }, formattedObj, errorProps) - - const serializers = lastLogger[serializersSym] - const keys = Object.keys(serializers) - - for (var i = 0; i < keys.length; i++) { - const key = keys[i] - if (obj[key] !== undefined) { - obj[key] = serializers[key](obj[key]) + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== "") { + break; } } - - for (const key in chindings) { - if (!obj.hasOwnProperty(key)) { - obj[key] = chindings[key] + if (start > end) { + return []; + } + return arr.slice(start, end - start + 1); + } + function relative(from, to) { + from = resolve(from).substr(1); + to = resolve(to).substr(1); + var fromParts = trim(from.split("/")); + var toParts = trim(to.split("/")); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; } } - - const stringifiers = lastLogger[stringifiersSym] - const redact = stringifiers[redactFmtSym] - - const formatted = pretty(typeof redact === 'function' ? redact(obj) : obj) - if (formatted === undefined) return - - setMetadataProps(dest, this) - dest.write(formatted) + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push(".."); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join("/"); + } + exports2.relative = relative; + function normalizePath(path) { + var isPathAbsolute = isAbsolute(path); + var trailingSlash = path.substr(-1) === "/"; + var normalizedPath = normalizeArray(path.split("/").filter(function(p) { + return !!p; + }), !isPathAbsolute).join("/"); + if (!normalizedPath && !isPathAbsolute) { + normalizedPath = "."; + } + if (normalizedPath && trailingSlash) { + normalizedPath += "/"; + } + return (isPathAbsolute ? "/" : "") + normalizedPath; } - } -} - -function hasBeenTampered (stream) { - return stream.write !== stream.constructor.prototype.write -} - -function buildSafeSonicBoom (opts) { - const stream = new SonicBoom(opts) - stream.on('error', filterBrokenPipe) - return stream - - function filterBrokenPipe (err) { - // TODO verify on Windows - if (err.code === 'EPIPE') { - // If we get EPIPE, we should stop logging here - // however we have no control to the consumer of - // SonicBoom, so we just overwrite the write method - stream.write = noop - stream.end = noop - stream.flushSync = noop - stream.destroy = noop - return - } - stream.removeListener('error', filterBrokenPipe) - stream.emit('error', err) - } -} - -function createArgsNormalizer (defaultOptions) { - return function normalizeArgs (instance, opts = {}, stream) { - // support stream as a string - if (typeof opts === 'string') { - stream = buildSafeSonicBoom({ dest: opts, sync: true }) - opts = {} - } else if (typeof stream === 'string') { - stream = buildSafeSonicBoom({ dest: stream, sync: true }) - } else if (opts instanceof SonicBoom || opts.writable || opts._writableState) { - stream = opts - opts = null - } - opts = Object.assign({}, defaultOptions, opts) - if ('extreme' in opts) { - throw Error('The extreme option has been removed, use pino.destination({ sync: false }) instead') - } - if ('onTerminated' in opts) { - throw Error('The onTerminated option has been removed, use pino.final instead') - } - if ('changeLevelName' in opts) { - process.emitWarning( - 'The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.', - { code: 'changeLevelName_deprecation' } - ) - opts.levelKey = opts.changeLevelName - delete opts.changeLevelName - } - const { enabled, prettyPrint, prettifier, messageKey } = opts - if (enabled === false) opts.level = 'silent' - stream = stream || process.stdout - if (stream === process.stdout && stream.fd >= 0 && !hasBeenTampered(stream)) { - stream = buildSafeSonicBoom({ fd: stream.fd, sync: true }) - } - if (prettyPrint) { - const prettyOpts = Object.assign({ messageKey }, prettyPrint) - stream = getPrettyStream(prettyOpts, prettifier, stream, instance) - } - return { opts, stream } - } -} - -function final (logger, handler) { - if (typeof logger === 'undefined' || typeof logger.child !== 'function') { - throw Error('expected a pino logger instance') - } - const hasHandler = (typeof handler !== 'undefined') - if (hasHandler && typeof handler !== 'function') { - throw Error('if supplied, the handler parameter should be a function') - } - const stream = logger[streamSym] - if (typeof stream.flushSync !== 'function') { - throw Error('final requires a stream that has a flushSync method, such as pino.destination') - } - - const finalLogger = new Proxy(logger, { - get: (logger, key) => { - if (key in logger.levels.values) { - return (...args) => { - logger[key](...args) - stream.flushSync() - } + exports2.normalizePath = normalizePath; + function isAbsolute(path) { + return path.charAt(0) === "/"; + } + exports2.isAbsolute = isAbsolute; + function join() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return normalizePath(args.join("/")); + } + exports2.join = join; + function dirname(path) { + var result = splitPath(path); + var root = result[0]; + var dir = result[1]; + if (!root && !dir) { + return "."; } - return logger[key] + if (dir) { + dir = dir.substr(0, dir.length - 1); + } + return root + dir; } - }) - - if (!hasHandler) { - return finalLogger - } - - return (err = null, ...args) => { - try { - stream.flushSync() - } catch (e) { - // it's too late to wait for the stream to be ready - // because this is a final tick scenario. - // in practice there shouldn't be a situation where it isn't - // however, swallow the error just in case (and for easier testing) + exports2.dirname = dirname; + function basename(path, ext) { + var f = splitPath(path)[2]; + if (ext && f.substr(ext.length * -1) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; } - return handler(err, finalLogger, ...args) - } -} - -function stringify (obj) { - try { - return JSON.stringify(obj) - } catch (_) { - return stringifySafe(obj) - } -} - -function buildFormatters (level, bindings, log) { - return { - level, - bindings, - log + exports2.basename = basename; } -} - -function setMetadataProps (dest, that) { - if (dest[needsMetadataGsym] === true) { - dest.lastLevel = that.lastLevel - dest.lastMsg = that.lastMsg - dest.lastObj = that.lastObj - dest.lastTime = that.lastTime - dest.lastLogger = that.lastLogger - } -} - -module.exports = { - noop, - buildSafeSonicBoom, - getPrettyStream, - asChindings, - asJson, - genLog, - createArgsNormalizer, - final, - stringify, - buildFormatters -} - - -/***/ }), -/* 383 */, -/* 384 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true }); -exports.default = void 0; - -var _v = _interopRequireDefault(__webpack_require__(212)); -var _sha = _interopRequireDefault(__webpack_require__(498)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports.default = _default; - -/***/ }), -/* 385 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, '__esModule', { value: true }); - -var isPlainObject = __webpack_require__(356); -var universalUserAgent = __webpack_require__(796); - -function lowercaseKeys(object) { - if (!object) { - return {}; - } - - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach(key => { - if (isPlainObject.isPlainObject(options[key])) { - if (!(key in defaults)) Object.assign(result, { - [key]: options[key] - });else result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { - [key]: options[key] +// node_modules/@sentry/utils/dist/syncpromise.js +var require_syncpromise = __commonJS({ + "node_modules/@sentry/utils/dist/syncpromise.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var is_1 = require_is(); + function resolvedSyncPromise(value) { + return new SyncPromise(function(resolve) { + resolve(value); }); } - }); - return result; -} - -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === undefined) { - delete obj[key]; - } - } - - return obj; -} - -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { - method, - url - } : { - url: method - }, options); - } else { - options = Object.assign({}, route); - } // lowercase header names before merging with defaults to avoid duplicates - - - options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging - - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten - - if (defaults && defaults.mediaType.previews.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); - } - - mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); - return mergedOptions; -} - -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - - if (names.length === 0) { - return url; - } - - return url + separator + names.map(name => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + exports2.resolvedSyncPromise = resolvedSyncPromise; + function rejectedSyncPromise(reason) { + return new SyncPromise(function(_, reject) { + reject(reason); + }); } - - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} - -const urlVariableRegex = /\{[^}]+\}/g; - -function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); -} - -function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); - - if (!matches) { - return []; - } - - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); -} - -function omit(object, keysToOmit) { - return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { - obj[key] = object[key]; - return obj; - }, {}); -} - -// Based on https://github.com/bramstein/url-template, licensed under BSD -// TODO: create separate package. -// -// Copyright (c) 2012-2014, Bram Stein -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* istanbul ignore file */ -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - - return part; - }).join(""); -} - -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} - -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; + exports2.rejectedSyncPromise = rejectedSyncPromise; + var SyncPromise = ( + /** @class */ + function() { + function SyncPromise2(executor) { + var _this = this; + this._state = 0; + this._handlers = []; + this._resolve = function(value) { + _this._setResult(1, value); + }; + this._reject = function(reason) { + _this._setResult(2, reason); + }; + this._setResult = function(state, value) { + if (_this._state !== 0) { + return; + } + if (is_1.isThenable(value)) { + void value.then(_this._resolve, _this._reject); + return; + } + _this._state = state; + _this._value = value; + _this._executeHandlers(); + }; + this._executeHandlers = function() { + if (_this._state === 0) { + return; + } + var cachedHandlers = _this._handlers.slice(); + _this._handlers = []; + cachedHandlers.forEach(function(handler) { + if (handler[0]) { + return; + } + if (_this._state === 1) { + handler[1](_this._value); + } + if (_this._state === 2) { + handler[2](_this._value); + } + handler[0] = true; + }); + }; + try { + executor(this._resolve, this._reject); + } catch (e) { + this._reject(e); + } + } + SyncPromise2.prototype.then = function(onfulfilled, onrejected) { + var _this = this; + return new SyncPromise2(function(resolve, reject) { + _this._handlers.push([ + false, + function(result) { + if (!onfulfilled) { + resolve(result); + } else { + try { + resolve(onfulfilled(result)); + } catch (e) { + reject(e); + } + } + }, + function(reason) { + if (!onrejected) { + reject(reason); + } else { + try { + resolve(onrejected(reason)); + } catch (e) { + reject(e); + } + } + } + ]); + _this._executeHandlers(); + }); + }; + SyncPromise2.prototype.catch = function(onrejected) { + return this.then(function(val) { + return val; + }, onrejected); + }; + SyncPromise2.prototype.finally = function(onfinally) { + var _this = this; + return new SyncPromise2(function(resolve, reject) { + var val; + var isRejected; + return _this.then(function(value) { + isRejected = false; + val = value; + if (onfinally) { + onfinally(); + } + }, function(reason) { + isRejected = true; + val = reason; + if (onfinally) { + onfinally(); + } + }).then(function() { + if (isRejected) { + reject(val); + return; + } + resolve(val); + }); + }); + }; + return SyncPromise2; + }() + ); + exports2.SyncPromise = SyncPromise; } -} - -function isDefined(value) { - return value !== undefined && value !== null; -} - -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} - -function getValues(context, operator, key, modifier) { - var value = context[key], - result = []; - - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { - value = value.toString(); +}); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); +// node_modules/@sentry/utils/dist/promisebuffer.js +var require_promisebuffer = __commonJS({ + "node_modules/@sentry/utils/dist/promisebuffer.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var error_1 = require_error(); + var syncpromise_1 = require_syncpromise(); + function makePromiseBuffer(limit) { + var buffer = []; + function isReady() { + return limit === void 0 || buffer.length < limit; } - - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); + function remove(task) { + return buffer.splice(buffer.indexOf(task), 1)[0]; + } + function add(taskProducer) { + if (!isReady()) { + return syncpromise_1.rejectedSyncPromise(new error_1.SentryError("Not adding Promise due to buffer limit reached.")); } - } else { - const tmp = []; - - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); + var task = taskProducer(); + if (buffer.indexOf(task) === -1) { + buffer.push(task); + } + void task.then(function() { + return remove(task); + }).then(null, function() { + return remove(task).then(null, function() { }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); + }); + return task; + } + function drain(timeout) { + return new syncpromise_1.SyncPromise(function(resolve, reject) { + var counter = buffer.length; + if (!counter) { + return resolve(true); + } + var capturedSetTimeout = setTimeout(function() { + if (timeout && timeout > 0) { + resolve(false); } + }, timeout); + buffer.forEach(function(item) { + void syncpromise_1.resolvedSyncPromise(item).then(function() { + if (!--counter) { + clearTimeout(capturedSetTimeout); + resolve(true); + } + }, reject); }); - } - - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } + }); } + return { + $: buffer, + add, + drain + }; } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); + exports2.makePromiseBuffer = makePromiseBuffer; + } +}); + +// node_modules/@sentry/utils/dist/severity.js +var require_severity2 = __commonJS({ + "node_modules/@sentry/utils/dist/severity.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var types_1 = require_dist(); + var enums_1 = require_enums(); + function isSupportedSeverity(level) { + return enums_1.SeverityLevels.indexOf(level) !== -1; + } + function severityFromString(level) { + if (level === "warn") + return types_1.Severity.Warning; + if (isSupportedSeverity(level)) { + return level; } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); + return types_1.Severity.Log; } + exports2.severityFromString = severityFromString; } +}); - return result; -} - -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} - -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); +// node_modules/@sentry/utils/dist/status.js +var require_status = __commonJS({ + "node_modules/@sentry/utils/dist/status.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + function eventStatusFromHttpCode(code) { + if (code >= 200 && code < 300) { + return "success"; } + if (code === 429) { + return "rate_limit"; + } + if (code >= 400 && code < 500) { + return "invalid"; + } + if (code >= 500) { + return "failed"; + } + return "unknown"; + } + exports2.eventStatusFromHttpCode = eventStatusFromHttpCode; + } +}); - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - - if (operator && operator !== "+") { - var separator = ","; - - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; +// node_modules/@sentry/utils/dist/time.js +var require_time2 = __commonJS({ + "node_modules/@sentry/utils/dist/time.js"(exports2, module2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var global_1 = require_global(); + var node_1 = require_node2(); + var dateTimestampSource = { + nowSeconds: function() { + return Date.now() / 1e3; + } + }; + function getBrowserPerformance() { + var performance2 = global_1.getGlobalObject().performance; + if (!performance2 || !performance2.now) { + return void 0; + } + var timeOrigin = Date.now() - performance2.now(); + return { + now: function() { + return performance2.now(); + }, + timeOrigin + }; + } + function getNodePerformance() { + try { + var perfHooks = node_1.dynamicRequire(module2, "perf_hooks"); + return perfHooks.performance; + } catch (_) { + return void 0; + } + } + var platformPerformance = node_1.isNodeEnv() ? getNodePerformance() : getBrowserPerformance(); + var timestampSource = platformPerformance === void 0 ? dateTimestampSource : { + nowSeconds: function() { + return (platformPerformance.timeOrigin + platformPerformance.now()) / 1e3; + } + }; + exports2.dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource); + exports2.timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource); + exports2.timestampWithMs = exports2.timestampInSeconds; + exports2.usingPerformanceAPI = platformPerformance !== void 0; + exports2.browserPerformanceTimeOrigin = function() { + var performance2 = global_1.getGlobalObject().performance; + if (!performance2 || !performance2.now) { + exports2._browserPerformanceTimeOriginMode = "none"; + return void 0; + } + var threshold = 3600 * 1e3; + var performanceNow = performance2.now(); + var dateNow = Date.now(); + var timeOriginDelta = performance2.timeOrigin ? Math.abs(performance2.timeOrigin + performanceNow - dateNow) : threshold; + var timeOriginIsReliable = timeOriginDelta < threshold; + var navigationStart = performance2.timing && performance2.timing.navigationStart; + var hasNavigationStart = typeof navigationStart === "number"; + var navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold; + var navigationStartIsReliable = navigationStartDelta < threshold; + if (timeOriginIsReliable || navigationStartIsReliable) { + if (timeOriginDelta <= navigationStartDelta) { + exports2._browserPerformanceTimeOriginMode = "timeOrigin"; + return performance2.timeOrigin; + } else { + exports2._browserPerformanceTimeOriginMode = "navigationStart"; + return navigationStart; } + } + exports2._browserPerformanceTimeOriginMode = "dateNow"; + return dateNow; + }(); + } +}); - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); +// node_modules/@sentry/utils/dist/tracing.js +var require_tracing = __commonJS({ + "node_modules/@sentry/utils/dist/tracing.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TRACEPARENT_REGEXP = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$"); + function extractTraceparentData(traceparent) { + var matches = traceparent.match(exports2.TRACEPARENT_REGEXP); + if (matches) { + var parentSampled = void 0; + if (matches[3] === "1") { + parentSampled = true; + } else if (matches[3] === "0") { + parentSampled = false; + } + return { + traceId: matches[1], + parentSampled, + parentSpanId: matches[2] + }; } - } else { - return encodeReserved(literal); + return void 0; } - }); -} - -function parse(options) { - // https://fetch.spec.whatwg.org/#methods - let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible - - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later - - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); + exports2.extractTraceparentData = extractTraceparentData; + } +}); - if (!/^http/.test(url)) { - url = options.baseUrl + url; +// node_modules/@sentry/utils/dist/envelope.js +var require_envelope = __commonJS({ + "node_modules/@sentry/utils/dist/envelope.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var is_1 = require_is(); + function createEnvelope(headers, items) { + if (items === void 0) { + items = []; + } + return [headers, items]; + } + exports2.createEnvelope = createEnvelope; + function addItemToEnvelope(envelope, newItem) { + var _a = tslib_1.__read(envelope, 2), headers = _a[0], items = _a[1]; + return [headers, tslib_1.__spread(items, [newItem])]; + } + exports2.addItemToEnvelope = addItemToEnvelope; + function getEnvelopeType(envelope) { + var _a = tslib_1.__read(envelope, 2), _b = tslib_1.__read(_a[1], 1), _c = tslib_1.__read(_b[0], 1), firstItemHeader = _c[0]; + return firstItemHeader.type; + } + exports2.getEnvelopeType = getEnvelopeType; + function serializeEnvelope(envelope) { + var _a = tslib_1.__read(envelope, 2), headers = _a[0], items = _a[1]; + var serializedHeaders = JSON.stringify(headers); + return items.reduce(function(acc, item) { + var _a2 = tslib_1.__read(item, 2), itemHeaders = _a2[0], payload = _a2[1]; + var serializedPayload = is_1.isPrimitive(payload) ? String(payload) : JSON.stringify(payload); + return acc + "\n" + JSON.stringify(itemHeaders) + "\n" + serializedPayload; + }, serializedHeaders); + } + exports2.serializeEnvelope = serializeEnvelope; } +}); - const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - - if (!isBinaryRequest) { - if (options.mediaType.format) { - // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw - headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); +// node_modules/@sentry/utils/dist/clientreport.js +var require_clientreport = __commonJS({ + "node_modules/@sentry/utils/dist/clientreport.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var envelope_1 = require_envelope(); + var time_1 = require_time2(); + function createClientReportEnvelope(discarded_events, dsn, timestamp) { + var clientReportItem = [ + { type: "client_report" }, + { + timestamp: timestamp || time_1.dateTimestampInSeconds(), + discarded_events + } + ]; + return envelope_1.createEnvelope(dsn ? { dsn } : {}, [clientReportItem]); } + exports2.createClientReportEnvelope = createClientReportEnvelope; + } +}); - if (options.mediaType.previews.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); +// node_modules/@sentry/utils/dist/ratelimit.js +var require_ratelimit = __commonJS({ + "node_modules/@sentry/utils/dist/ratelimit.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + exports2.DEFAULT_RETRY_AFTER = 60 * 1e3; + function parseRetryAfterHeader(header, now) { + if (now === void 0) { + now = Date.now(); + } + var headerDelay = parseInt("" + header, 10); + if (!isNaN(headerDelay)) { + return headerDelay * 1e3; + } + var headerDate = Date.parse("" + header); + if (!isNaN(headerDate)) { + return headerDate - now; + } + return exports2.DEFAULT_RETRY_AFTER; } - } // for GET/HEAD requests, set URL query parameters from remaining parameters - // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters - - - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } else { - headers["content-length"] = 0; + exports2.parseRetryAfterHeader = parseRetryAfterHeader; + function disabledUntil(limits, category) { + return limits[category] || limits.all || 0; + } + exports2.disabledUntil = disabledUntil; + function isRateLimited(limits, category, now) { + if (now === void 0) { + now = Date.now(); } + return disabledUntil(limits, category) > now; } - } // default content-type for JSON if body is set - - - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. - // fetch does not allow to set `content-length` header, but we can set body to an empty string - - - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } // Only return body/request keys if present - - - return Object.assign({ - method, - url, - headers - }, typeof body !== "undefined" ? { - body - } : null, options.request ? { - request: options.request - } : null); -} - -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} + exports2.isRateLimited = isRateLimited; + function updateRateLimits(limits, headers, now) { + var e_1, _a, e_2, _b; + if (now === void 0) { + now = Date.now(); + } + var updatedRateLimits = tslib_1.__assign({}, limits); + var rateLimitHeader = headers["x-sentry-rate-limits"]; + var retryAfterHeader = headers["retry-after"]; + if (rateLimitHeader) { + try { + for (var _c = tslib_1.__values(rateLimitHeader.trim().split(",")), _d = _c.next(); !_d.done; _d = _c.next()) { + var limit = _d.value; + var parameters = limit.split(":", 2); + var headerDelay = parseInt(parameters[0], 10); + var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1e3; + if (!parameters[1]) { + updatedRateLimits.all = now + delay; + } else { + try { + for (var _e = (e_2 = void 0, tslib_1.__values(parameters[1].split(";"))), _f = _e.next(); !_f.done; _f = _e.next()) { + var category = _f.value; + updatedRateLimits[category] = now + delay; + } + } catch (e_2_1) { + e_2 = { error: e_2_1 }; + } finally { + try { + if (_f && !_f.done && (_b = _e.return)) + _b.call(_e); + } finally { + if (e_2) + throw e_2.error; + } + } + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_d && !_d.done && (_a = _c.return)) + _a.call(_c); + } finally { + if (e_1) + throw e_1.error; + } + } + } else if (retryAfterHeader) { + updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now); + } + return updatedRateLimits; + } + exports2.updateRateLimits = updateRateLimits; + } +}); -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS = merge(oldDefaults, newDefaults); - const endpoint = endpointWithDefaults.bind(null, DEFAULTS); - return Object.assign(endpoint, { - DEFAULTS, - defaults: withDefaults.bind(null, DEFAULTS), - merge: merge.bind(null, DEFAULTS), - parse - }); -} +// node_modules/@sentry/utils/dist/index.js +var require_dist2 = __commonJS({ + "node_modules/@sentry/utils/dist/index.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + tslib_1.__exportStar(require_async(), exports2); + tslib_1.__exportStar(require_browser(), exports2); + tslib_1.__exportStar(require_dsn(), exports2); + tslib_1.__exportStar(require_enums(), exports2); + tslib_1.__exportStar(require_error(), exports2); + tslib_1.__exportStar(require_global(), exports2); + tslib_1.__exportStar(require_instrument(), exports2); + tslib_1.__exportStar(require_is(), exports2); + tslib_1.__exportStar(require_logger(), exports2); + tslib_1.__exportStar(require_memo(), exports2); + tslib_1.__exportStar(require_misc(), exports2); + tslib_1.__exportStar(require_node2(), exports2); + tslib_1.__exportStar(require_normalize(), exports2); + tslib_1.__exportStar(require_object(), exports2); + tslib_1.__exportStar(require_path(), exports2); + tslib_1.__exportStar(require_promisebuffer(), exports2); + tslib_1.__exportStar(require_severity2(), exports2); + tslib_1.__exportStar(require_stacktrace(), exports2); + tslib_1.__exportStar(require_status(), exports2); + tslib_1.__exportStar(require_string(), exports2); + tslib_1.__exportStar(require_supports(), exports2); + tslib_1.__exportStar(require_syncpromise(), exports2); + tslib_1.__exportStar(require_time2(), exports2); + tslib_1.__exportStar(require_tracing(), exports2); + tslib_1.__exportStar(require_env(), exports2); + tslib_1.__exportStar(require_envelope(), exports2); + tslib_1.__exportStar(require_clientreport(), exports2); + tslib_1.__exportStar(require_ratelimit(), exports2); + } +}); -const VERSION = "6.0.11"; +// node_modules/@sentry/hub/dist/scope.js +var require_scope = __commonJS({ + "node_modules/@sentry/hub/dist/scope.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var utils_1 = require_dist2(); + var MAX_BREADCRUMBS = 100; + var Scope = ( + /** @class */ + function() { + function Scope2() { + this._notifyingListeners = false; + this._scopeListeners = []; + this._eventProcessors = []; + this._breadcrumbs = []; + this._user = {}; + this._tags = {}; + this._extra = {}; + this._contexts = {}; + this._sdkProcessingMetadata = {}; + } + Scope2.clone = function(scope) { + var newScope = new Scope2(); + if (scope) { + newScope._breadcrumbs = tslib_1.__spread(scope._breadcrumbs); + newScope._tags = tslib_1.__assign({}, scope._tags); + newScope._extra = tslib_1.__assign({}, scope._extra); + newScope._contexts = tslib_1.__assign({}, scope._contexts); + newScope._user = scope._user; + newScope._level = scope._level; + newScope._span = scope._span; + newScope._session = scope._session; + newScope._transactionName = scope._transactionName; + newScope._fingerprint = scope._fingerprint; + newScope._eventProcessors = tslib_1.__spread(scope._eventProcessors); + newScope._requestSession = scope._requestSession; + } + return newScope; + }; + Scope2.prototype.addScopeListener = function(callback) { + this._scopeListeners.push(callback); + }; + Scope2.prototype.addEventProcessor = function(callback) { + this._eventProcessors.push(callback); + return this; + }; + Scope2.prototype.setUser = function(user) { + this._user = user || {}; + if (this._session) { + this._session.update({ user }); + } + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.getUser = function() { + return this._user; + }; + Scope2.prototype.getRequestSession = function() { + return this._requestSession; + }; + Scope2.prototype.setRequestSession = function(requestSession) { + this._requestSession = requestSession; + return this; + }; + Scope2.prototype.setTags = function(tags) { + this._tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), tags); + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.setTag = function(key, value) { + var _a; + this._tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), (_a = {}, _a[key] = value, _a)); + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.setExtras = function(extras) { + this._extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), extras); + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.setExtra = function(key, extra) { + var _a; + this._extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), (_a = {}, _a[key] = extra, _a)); + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.setFingerprint = function(fingerprint) { + this._fingerprint = fingerprint; + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.setLevel = function(level) { + this._level = level; + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.setTransactionName = function(name) { + this._transactionName = name; + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.setTransaction = function(name) { + return this.setTransactionName(name); + }; + Scope2.prototype.setContext = function(key, context) { + var _a; + if (context === null) { + delete this._contexts[key]; + } else { + this._contexts = tslib_1.__assign(tslib_1.__assign({}, this._contexts), (_a = {}, _a[key] = context, _a)); + } + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.setSpan = function(span) { + this._span = span; + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.getSpan = function() { + return this._span; + }; + Scope2.prototype.getTransaction = function() { + var span = this.getSpan(); + return span && span.transaction; + }; + Scope2.prototype.setSession = function(session) { + if (!session) { + delete this._session; + } else { + this._session = session; + } + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.getSession = function() { + return this._session; + }; + Scope2.prototype.update = function(captureContext) { + if (!captureContext) { + return this; + } + if (typeof captureContext === "function") { + var updatedScope = captureContext(this); + return updatedScope instanceof Scope2 ? updatedScope : this; + } + if (captureContext instanceof Scope2) { + this._tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), captureContext._tags); + this._extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), captureContext._extra); + this._contexts = tslib_1.__assign(tslib_1.__assign({}, this._contexts), captureContext._contexts); + if (captureContext._user && Object.keys(captureContext._user).length) { + this._user = captureContext._user; + } + if (captureContext._level) { + this._level = captureContext._level; + } + if (captureContext._fingerprint) { + this._fingerprint = captureContext._fingerprint; + } + if (captureContext._requestSession) { + this._requestSession = captureContext._requestSession; + } + } else if (utils_1.isPlainObject(captureContext)) { + captureContext = captureContext; + this._tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), captureContext.tags); + this._extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), captureContext.extra); + this._contexts = tslib_1.__assign(tslib_1.__assign({}, this._contexts), captureContext.contexts); + if (captureContext.user) { + this._user = captureContext.user; + } + if (captureContext.level) { + this._level = captureContext.level; + } + if (captureContext.fingerprint) { + this._fingerprint = captureContext.fingerprint; + } + if (captureContext.requestSession) { + this._requestSession = captureContext.requestSession; + } + } + return this; + }; + Scope2.prototype.clear = function() { + this._breadcrumbs = []; + this._tags = {}; + this._extra = {}; + this._user = {}; + this._contexts = {}; + this._level = void 0; + this._transactionName = void 0; + this._fingerprint = void 0; + this._requestSession = void 0; + this._span = void 0; + this._session = void 0; + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.addBreadcrumb = function(breadcrumb, maxBreadcrumbs) { + var maxCrumbs = typeof maxBreadcrumbs === "number" ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS; + if (maxCrumbs <= 0) { + return this; + } + var mergedBreadcrumb = tslib_1.__assign({ timestamp: utils_1.dateTimestampInSeconds() }, breadcrumb); + this._breadcrumbs = tslib_1.__spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxCrumbs); + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.clearBreadcrumbs = function() { + this._breadcrumbs = []; + this._notifyScopeListeners(); + return this; + }; + Scope2.prototype.applyToEvent = function(event, hint) { + if (this._extra && Object.keys(this._extra).length) { + event.extra = tslib_1.__assign(tslib_1.__assign({}, this._extra), event.extra); + } + if (this._tags && Object.keys(this._tags).length) { + event.tags = tslib_1.__assign(tslib_1.__assign({}, this._tags), event.tags); + } + if (this._user && Object.keys(this._user).length) { + event.user = tslib_1.__assign(tslib_1.__assign({}, this._user), event.user); + } + if (this._contexts && Object.keys(this._contexts).length) { + event.contexts = tslib_1.__assign(tslib_1.__assign({}, this._contexts), event.contexts); + } + if (this._level) { + event.level = this._level; + } + if (this._transactionName) { + event.transaction = this._transactionName; + } + if (this._span) { + event.contexts = tslib_1.__assign({ trace: this._span.getTraceContext() }, event.contexts); + var transactionName = this._span.transaction && this._span.transaction.name; + if (transactionName) { + event.tags = tslib_1.__assign({ transaction: transactionName }, event.tags); + } + } + this._applyFingerprint(event); + event.breadcrumbs = tslib_1.__spread(event.breadcrumbs || [], this._breadcrumbs); + event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : void 0; + event.sdkProcessingMetadata = this._sdkProcessingMetadata; + return this._notifyEventProcessors(tslib_1.__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint); + }; + Scope2.prototype.setSDKProcessingMetadata = function(newData) { + this._sdkProcessingMetadata = tslib_1.__assign(tslib_1.__assign({}, this._sdkProcessingMetadata), newData); + return this; + }; + Scope2.prototype._notifyEventProcessors = function(processors, event, hint, index) { + var _this = this; + if (index === void 0) { + index = 0; + } + return new utils_1.SyncPromise(function(resolve, reject) { + var processor = processors[index]; + if (event === null || typeof processor !== "function") { + resolve(event); + } else { + var result = processor(tslib_1.__assign({}, event), hint); + if (utils_1.isThenable(result)) { + void result.then(function(final) { + return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); + }).then(null, reject); + } else { + void _this._notifyEventProcessors(processors, result, hint, index + 1).then(resolve).then(null, reject); + } + } + }); + }; + Scope2.prototype._notifyScopeListeners = function() { + var _this = this; + if (!this._notifyingListeners) { + this._notifyingListeners = true; + this._scopeListeners.forEach(function(callback) { + callback(_this); + }); + this._notifyingListeners = false; + } + }; + Scope2.prototype._applyFingerprint = function(event) { + event.fingerprint = event.fingerprint ? Array.isArray(event.fingerprint) ? event.fingerprint : [event.fingerprint] : []; + if (this._fingerprint) { + event.fingerprint = event.fingerprint.concat(this._fingerprint); + } + if (event.fingerprint && !event.fingerprint.length) { + delete event.fingerprint; + } + }; + return Scope2; + }() + ); + exports2.Scope = Scope; + function getGlobalEventProcessors() { + return utils_1.getGlobalSingleton("globalEventProcessors", function() { + return []; + }); + } + function addGlobalEventProcessor(callback) { + getGlobalEventProcessors().push(callback); + } + exports2.addGlobalEventProcessor = addGlobalEventProcessor; + } +}); -const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. -// So we use RequestParameters and add method as additional required property. +// node_modules/@sentry/hub/dist/session.js +var require_session = __commonJS({ + "node_modules/@sentry/hub/dist/session.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_dist2(); + var Session = ( + /** @class */ + function() { + function Session2(context) { + this.errors = 0; + this.sid = utils_1.uuid4(); + this.duration = 0; + this.status = "ok"; + this.init = true; + this.ignoreDuration = false; + var startingTime = utils_1.timestampInSeconds(); + this.timestamp = startingTime; + this.started = startingTime; + if (context) { + this.update(context); + } + } + Session2.prototype.update = function(context) { + if (context === void 0) { + context = {}; + } + if (context.user) { + if (!this.ipAddress && context.user.ip_address) { + this.ipAddress = context.user.ip_address; + } + if (!this.did && !context.did) { + this.did = context.user.id || context.user.email || context.user.username; + } + } + this.timestamp = context.timestamp || utils_1.timestampInSeconds(); + if (context.ignoreDuration) { + this.ignoreDuration = context.ignoreDuration; + } + if (context.sid) { + this.sid = context.sid.length === 32 ? context.sid : utils_1.uuid4(); + } + if (context.init !== void 0) { + this.init = context.init; + } + if (!this.did && context.did) { + this.did = "" + context.did; + } + if (typeof context.started === "number") { + this.started = context.started; + } + if (this.ignoreDuration) { + this.duration = void 0; + } else if (typeof context.duration === "number") { + this.duration = context.duration; + } else { + var duration = this.timestamp - this.started; + this.duration = duration >= 0 ? duration : 0; + } + if (context.release) { + this.release = context.release; + } + if (context.environment) { + this.environment = context.environment; + } + if (!this.ipAddress && context.ipAddress) { + this.ipAddress = context.ipAddress; + } + if (!this.userAgent && context.userAgent) { + this.userAgent = context.userAgent; + } + if (typeof context.errors === "number") { + this.errors = context.errors; + } + if (context.status) { + this.status = context.status; + } + }; + Session2.prototype.close = function(status) { + if (status) { + this.update({ status }); + } else if (this.status === "ok") { + this.update({ status: "exited" }); + } else { + this.update(); + } + }; + Session2.prototype.toJSON = function() { + return utils_1.dropUndefinedKeys({ + sid: "" + this.sid, + init: this.init, + // Make sure that sec is converted to ms for date constructor + started: new Date(this.started * 1e3).toISOString(), + timestamp: new Date(this.timestamp * 1e3).toISOString(), + status: this.status, + errors: this.errors, + did: typeof this.did === "number" || typeof this.did === "string" ? "" + this.did : void 0, + duration: this.duration, + attrs: { + release: this.release, + environment: this.environment, + ip_address: this.ipAddress, + user_agent: this.userAgent + } + }); + }; + return Session2; + }() + ); + exports2.Session = Session; + } +}); -const DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "", - previews: [] +// node_modules/@sentry/hub/dist/flags.js +var require_flags2 = __commonJS({ + "node_modules/@sentry/hub/dist/flags.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" ? true : __SENTRY_DEBUG__; } -}; +}); -const endpoint = withDefaults(null, DEFAULTS); - -exports.endpoint = endpoint; -//# sourceMappingURL=index.js.map - - -/***/ }), -/* 386 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(422); -var utils_1 = __webpack_require__(657); -var OPERATIONS = [ - 'aggregate', - 'bulkWrite', - 'countDocuments', - 'createIndex', - 'createIndexes', - 'deleteMany', - 'deleteOne', - 'distinct', - 'drop', - 'dropIndex', - 'dropIndexes', - 'estimatedDocumentCount', - 'find', - 'findOne', - 'findOneAndDelete', - 'findOneAndReplace', - 'findOneAndUpdate', - 'indexes', - 'indexExists', - 'indexInformation', - 'initializeOrderedBulkOp', - 'insertMany', - 'insertOne', - 'isCapped', - 'mapReduce', - 'options', - 'parallelCollectionScan', - 'rename', - 'replaceOne', - 'stats', - 'updateMany', - 'updateOne', -]; -// All of the operations above take `options` and `callback` as their final parameters, but some of them -// take additional parameters as well. For those operations, this is a map of -// {
' + body + '\n' + - '\n' + - '\n' -} - -/** - * Module exports. - * @public - */ - -module.exports = finalhandler - -/** - * Create a function to handle the final response. - * - * @param {Request} req - * @param {Response} res - * @param {Object} [options] - * @return {Function} - * @public - */ - -function finalhandler (req, res, options) { - var opts = options || {} - - // get environment - var env = opts.env || process.env.NODE_ENV || 'development' - - // get error callback - var onerror = opts.onerror - - return function (err) { - var headers - var msg - var status - - // ignore 404 on in-flight response - if (!err && headersSent(res)) { - debug('cannot 404 after headers sent') - return - } - - // unhandled error - if (err) { - // respect status code from error - status = getErrorStatusCode(err) - - if (status === undefined) { - // fallback to status code on response - status = getResponseStatusCode(res) - } else { - // respect headers from error - headers = getErrorHeaders(err) + if (!opts) { + throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!"); + } + debug("creating new HttpsProxyAgent instance: %o", opts); + super(opts); + const proxy = Object.assign({}, opts); + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === "string") { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + if (this.secureProxy && !("ALPNProtocols" in proxy)) { + proxy.ALPNProtocols = ["http 1.1"]; + } + if (proxy.host && proxy.path) { + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; } - - // get error message - msg = getErrorMessage(err, status, env) - } else { - // not found - status = 404 - msg = 'Cannot ' + req.method + ' ' + encodeUrl(getResourceName(req)) + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req, opts) { + return __awaiter2(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + let socket; + if (secureProxy) { + debug("Creating `tls.Socket`: %o", proxy); + socket = tls_1.default.connect(proxy); + } else { + debug("Creating `net.Socket`: %o", proxy); + socket = net_1.default.connect(proxy); + } + const headers = Object.assign({}, proxy.headers); + const hostname = `${opts.host}:${opts.port}`; + let payload = `CONNECT ${hostname} HTTP/1.1\r +`; + if (proxy.auth) { + headers["Proxy-Authorization"] = `Basic ${Buffer.from(proxy.auth).toString("base64")}`; + } + let { host, port, secureEndpoint } = opts; + if (!isDefaultPort(port, secureEndpoint)) { + host += `:${port}`; + } + headers.Host = host; + headers.Connection = "close"; + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r +`; + } + const proxyResponsePromise = parse_proxy_response_1.default(socket); + socket.write(`${payload}\r +`); + const { statusCode, buffered } = yield proxyResponsePromise; + if (statusCode === 200) { + req.once("socket", resume); + if (opts.secureEndpoint) { + debug("Upgrading socket connection to TLS"); + const servername = opts.servername || opts.host; + return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, "host", "hostname", "path", "port")), { + socket, + servername + })); + } + return socket; + } + socket.destroy(); + const fakeSocket = new net_1.default.Socket({ writable: false }); + fakeSocket.readable = true; + req.once("socket", (s) => { + debug("replaying proxy buffer for failed request"); + assert_1.default(s.listenerCount("data") > 0); + s.push(buffered); + s.push(null); + }); + return fakeSocket; + }); + } + }; + exports2.default = HttpsProxyAgent; + function resume(socket) { + socket.resume(); } - - debug('default %s', status) - - // schedule onerror callback - if (err && onerror) { - defer(onerror, err, req, res) + function isDefaultPort(port, secure) { + return Boolean(!secure && port === 80 || secure && port === 443); } - - // cannot actually respond - if (headersSent(res)) { - debug('cannot %d after headers sent', status) - req.socket.destroy() - return + function isHTTPS(protocol) { + return typeof protocol === "string" ? /^https:?$/i.test(protocol) : false; + } + function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; } - - // send response - send(req, res, status, headers, msg) - } -} - -/** - * Get headers from Error object. - * - * @param {Error} err - * @return {object} - * @private - */ - -function getErrorHeaders (err) { - if (!err.headers || typeof err.headers !== 'object') { - return undefined - } - - var headers = Object.create(null) - var keys = Object.keys(err.headers) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - headers[key] = err.headers[key] } +}); - return headers -} - -/** - * Get message from Error object, fallback to status message. - * - * @param {Error} err - * @param {number} status - * @param {string} env - * @return {string} - * @private - */ - -function getErrorMessage (err, status, env) { - var msg - - if (env !== 'production') { - // use err.stack, which typically includes err.message - msg = err.stack - - // fallback to err.toString() when possible - if (!msg && typeof err.toString === 'function') { - msg = err.toString() +// node_modules/https-proxy-agent/dist/index.js +var require_dist6 = __commonJS({ + "node_modules/https-proxy-agent/dist/index.js"(exports2, module2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var agent_1 = __importDefault2(require_agent()); + function createHttpsProxyAgent(opts) { + return new agent_1.default(opts); } + (function(createHttpsProxyAgent2) { + createHttpsProxyAgent2.HttpsProxyAgent = agent_1.default; + createHttpsProxyAgent2.prototype = agent_1.default.prototype; + })(createHttpsProxyAgent || (createHttpsProxyAgent = {})); + module2.exports = createHttpsProxyAgent; } +}); - return msg || statuses[status] -} - -/** - * Get status code from Error object. - * - * @param {Error} err - * @return {number} - * @private - */ - -function getErrorStatusCode (err) { - // check err.status - if (typeof err.status === 'number' && err.status >= 400 && err.status < 600) { - return err.status +// node_modules/@sentry/node/dist/transports/http.js +var require_http = __commonJS({ + "node_modules/@sentry/node/dist/transports/http.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_1 = require_dist5(); + var http = require("http"); + var base_1 = require_base2(); + var HTTPTransport = ( + /** @class */ + function(_super) { + tslib_1.__extends(HTTPTransport2, _super); + function HTTPTransport2(options2) { + var _this = _super.call(this, options2) || this; + _this.options = options2; + var proxy = _this._getProxy("http"); + _this.module = http; + _this.client = proxy ? new (require_dist6())(proxy) : new http.Agent({ keepAlive: false, maxSockets: 30, timeout: 2e3 }); + return _this; + } + HTTPTransport2.prototype.sendEvent = function(event) { + return this._send(core_1.eventToSentryRequest(event, this._api), event); + }; + HTTPTransport2.prototype.sendSession = function(session) { + return this._send(core_1.sessionToSentryRequest(session, this._api), session); + }; + return HTTPTransport2; + }(base_1.BaseTransport) + ); + exports2.HTTPTransport = HTTPTransport; } +}); - // check err.statusCode - if (typeof err.statusCode === 'number' && err.statusCode >= 400 && err.statusCode < 600) { - return err.statusCode +// node_modules/@sentry/node/dist/transports/https.js +var require_https = __commonJS({ + "node_modules/@sentry/node/dist/transports/https.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_1 = require_dist5(); + var https = require("https"); + var base_1 = require_base2(); + var HTTPSTransport = ( + /** @class */ + function(_super) { + tslib_1.__extends(HTTPSTransport2, _super); + function HTTPSTransport2(options2) { + var _this = _super.call(this, options2) || this; + _this.options = options2; + var proxy = _this._getProxy("https"); + _this.module = https; + _this.client = proxy ? new (require_dist6())(proxy) : new https.Agent({ keepAlive: false, maxSockets: 30, timeout: 2e3 }); + return _this; + } + HTTPSTransport2.prototype.sendEvent = function(event) { + return this._send(core_1.eventToSentryRequest(event, this._api), event); + }; + HTTPSTransport2.prototype.sendSession = function(session) { + return this._send(core_1.sessionToSentryRequest(session, this._api), session); + }; + return HTTPSTransport2; + }(base_1.BaseTransport) + ); + exports2.HTTPSTransport = HTTPSTransport; } +}); - return undefined -} - -/** - * Get resource name for the request. - * - * This is typically just the original pathname of the request - * but will fallback to "resource" is that cannot be determined. - * - * @param {IncomingMessage} req - * @return {string} - * @private - */ - -function getResourceName (req) { - try { - return parseUrl.original(req).pathname - } catch (e) { - return 'resource' +// node_modules/@sentry/node/dist/transports/new.js +var require_new = __commonJS({ + "node_modules/@sentry/node/dist/transports/new.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_1 = require_dist5(); + var utils_1 = require_dist2(); + var http = require("http"); + var https = require("https"); + var url_1 = require("url"); + function makeNodeTransport(options2) { + var _a; + var urlSegments = new url_1.URL(options2.url); + var isHttps = urlSegments.protocol === "https:"; + var proxy = applyNoProxyOption(urlSegments, options2.proxy || (isHttps ? process.env.https_proxy : void 0) || process.env.http_proxy); + var nativeHttpModule = isHttps ? https : http; + var agent = proxy ? new (require_dist6())(proxy) : new nativeHttpModule.Agent({ keepAlive: false, maxSockets: 30, timeout: 2e3 }); + var requestExecutor = createRequestExecutor(options2, (_a = options2.httpModule, _a !== null && _a !== void 0 ? _a : nativeHttpModule), agent); + return core_1.createTransport({ bufferSize: options2.bufferSize }, requestExecutor); + } + exports2.makeNodeTransport = makeNodeTransport; + function applyNoProxyOption(transportUrlSegments, proxy) { + var no_proxy = process.env.no_proxy; + var urlIsExemptFromProxy = no_proxy && no_proxy.split(",").some(function(exemption) { + return transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption); + }); + if (urlIsExemptFromProxy) { + return void 0; + } else { + return proxy; + } + } + function createRequestExecutor(options2, httpModule, agent) { + var _a = new url_1.URL(options2.url), hostname = _a.hostname, pathname = _a.pathname, port = _a.port, protocol = _a.protocol, search = _a.search; + return function makeRequest(request) { + return new Promise(function(resolve, reject) { + var req = httpModule.request({ + method: "POST", + agent, + headers: options2.headers, + hostname, + path: "" + pathname + search, + port, + protocol, + ca: options2.caCerts + }, function(res) { + var _a2, _b, _c; + res.on("data", function() { + }); + res.on("end", function() { + }); + var statusCode = (_a2 = res.statusCode, _a2 !== null && _a2 !== void 0 ? _a2 : 500); + var status = utils_1.eventStatusFromHttpCode(statusCode); + res.setEncoding("utf8"); + var retryAfterHeader = (_b = res.headers["retry-after"], _b !== null && _b !== void 0 ? _b : null); + var rateLimitsHeader = (_c = res.headers["x-sentry-rate-limits"], _c !== null && _c !== void 0 ? _c : null); + resolve({ + headers: { + "retry-after": retryAfterHeader, + "x-sentry-rate-limits": Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] : rateLimitsHeader + }, + reason: status, + statusCode + }); + }); + req.on("error", reject); + req.end(request.body); + }); + }; + } } -} - -/** - * Get status code from response. - * - * @param {OutgoingMessage} res - * @return {number} - * @private - */ - -function getResponseStatusCode (res) { - var status = res.statusCode +}); - // default status code to 500 if outside valid range - if (typeof status !== 'number' || status < 400 || status > 599) { - status = 500 +// node_modules/@sentry/node/dist/transports/index.js +var require_transports = __commonJS({ + "node_modules/@sentry/node/dist/transports/index.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var base_1 = require_base2(); + exports2.BaseTransport = base_1.BaseTransport; + var http_1 = require_http(); + exports2.HTTPTransport = http_1.HTTPTransport; + var https_1 = require_https(); + exports2.HTTPSTransport = https_1.HTTPSTransport; + var new_1 = require_new(); + exports2.makeNodeTransport = new_1.makeNodeTransport; } +}); - return status -} - -/** - * Determine if the response headers have been sent. - * - * @param {object} res - * @returns {boolean} - * @private - */ - -function headersSent (res) { - return typeof res.headersSent !== 'boolean' - ? Boolean(res._header) - : res.headersSent -} - -/** - * Send response. - * - * @param {IncomingMessage} req - * @param {OutgoingMessage} res - * @param {number} status - * @param {object} headers - * @param {string} message - * @private - */ - -function send (req, res, status, headers, message) { - function write () { - // response body - var body = createHtmlDocument(message) - - // response status - res.statusCode = status - res.statusMessage = statuses[status] - - // response headers - setHeaders(res, headers) - - // security headers - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - - // standard headers - res.setHeader('Content-Type', 'text/html; charset=utf-8') - res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8')) - - if (req.method === 'HEAD') { - res.end() - return - } - - res.end(body, 'utf8') +// node_modules/@sentry/node/dist/backend.js +var require_backend = __commonJS({ + "node_modules/@sentry/node/dist/backend.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_1 = require_dist5(); + var types_1 = require_dist(); + var utils_1 = require_dist2(); + var eventbuilder_1 = require_eventbuilder(); + var transports_1 = require_transports(); + var NodeBackend = ( + /** @class */ + function(_super) { + tslib_1.__extends(NodeBackend2, _super); + function NodeBackend2() { + return _super !== null && _super.apply(this, arguments) || this; + } + NodeBackend2.prototype.eventFromException = function(exception, hint) { + return utils_1.resolvedSyncPromise(eventbuilder_1.eventFromUnknownInput(exception, hint)); + }; + NodeBackend2.prototype.eventFromMessage = function(message, level, hint) { + if (level === void 0) { + level = types_1.Severity.Info; + } + return utils_1.resolvedSyncPromise(eventbuilder_1.eventFromMessage(message, level, hint, this._options.attachStacktrace)); + }; + NodeBackend2.prototype._setupTransport = function() { + if (!this._options.dsn) { + return _super.prototype._setupTransport.call(this); + } + var dsn = utils_1.makeDsn(this._options.dsn); + var transportOptions = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, this._options.transportOptions), this._options.httpProxy && { httpProxy: this._options.httpProxy }), this._options.httpsProxy && { httpsProxy: this._options.httpsProxy }), this._options.caCerts && { caCerts: this._options.caCerts }), { dsn: this._options.dsn, tunnel: this._options.tunnel, _metadata: this._options._metadata }); + if (this._options.transport) { + return new this._options.transport(transportOptions); + } + var api = core_1.initAPIDetails(transportOptions.dsn, transportOptions._metadata, transportOptions.tunnel); + var url = core_1.getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel); + this._newTransport = transports_1.makeNodeTransport({ + url, + headers: transportOptions.headers, + proxy: transportOptions.httpProxy, + caCerts: transportOptions.caCerts + }); + if (dsn.protocol === "http") { + return new transports_1.HTTPTransport(transportOptions); + } + return new transports_1.HTTPSTransport(transportOptions); + }; + return NodeBackend2; + }(core_1.BaseBackend) + ); + exports2.NodeBackend = NodeBackend; } +}); - if (isFinished(req)) { - write() - return +// node_modules/@sentry/node/dist/client.js +var require_client = __commonJS({ + "node_modules/@sentry/node/dist/client.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_1 = require_dist5(); + var hub_1 = require_dist3(); + var utils_1 = require_dist2(); + var backend_1 = require_backend(); + var flags_1 = require_flags4(); + var NodeClient = ( + /** @class */ + function(_super) { + tslib_1.__extends(NodeClient2, _super); + function NodeClient2(options2) { + var _this = this; + options2._metadata = options2._metadata || {}; + options2._metadata.sdk = options2._metadata.sdk || { + name: "sentry.javascript.node", + packages: [ + { + name: "npm:@sentry/node", + version: core_1.SDK_VERSION + } + ], + version: core_1.SDK_VERSION + }; + _this = _super.call(this, backend_1.NodeBackend, options2) || this; + return _this; + } + NodeClient2.prototype.captureException = function(exception, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher && scope) { + var requestSession = scope.getRequestSession(); + if (requestSession && requestSession.status === "ok") { + requestSession.status = "errored"; + } + } + return _super.prototype.captureException.call(this, exception, hint, scope); + }; + NodeClient2.prototype.captureEvent = function(event, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher && scope) { + var eventType = event.type || "exception"; + var isException = eventType === "exception" && event.exception && event.exception.values && event.exception.values.length > 0; + if (isException) { + var requestSession = scope.getRequestSession(); + if (requestSession && requestSession.status === "ok") { + requestSession.status = "errored"; + } + } + } + return _super.prototype.captureEvent.call(this, event, hint, scope); + }; + NodeClient2.prototype.close = function(timeout) { + var _a; + (_a = this._sessionFlusher) === null || _a === void 0 ? void 0 : _a.close(); + return _super.prototype.close.call(this, timeout); + }; + NodeClient2.prototype.initSessionFlusher = function() { + var _a = this._options, release = _a.release, environment = _a.environment; + if (!release) { + flags_1.IS_DEBUG_BUILD && utils_1.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!"); + } else { + this._sessionFlusher = new hub_1.SessionFlusher(this.getTransport(), { + release, + environment + }); + } + }; + NodeClient2.prototype._prepareEvent = function(event, scope, hint) { + event.platform = event.platform || "node"; + if (this.getOptions().serverName) { + event.server_name = this.getOptions().serverName; + } + return _super.prototype._prepareEvent.call(this, event, scope, hint); + }; + NodeClient2.prototype._captureRequestSession = function() { + if (!this._sessionFlusher) { + flags_1.IS_DEBUG_BUILD && utils_1.logger.warn("Discarded request mode session because autoSessionTracking option was disabled"); + } else { + this._sessionFlusher.incrementSessionStatusCount(); + } + }; + return NodeClient2; + }(core_1.BaseClient) + ); + exports2.NodeClient = NodeClient; } +}); - // unpipe everything from the request - unpipe(req) - - // flush the request - onFinished(req, write) - req.resume() -} - -/** - * Set response headers from an object. - * - * @param {OutgoingMessage} res - * @param {object} headers - * @private - */ - -function setHeaders (res, headers) { - if (!headers) { - return +// node_modules/@sentry/node/dist/integrations/console.js +var require_console = __commonJS({ + "node_modules/@sentry/node/dist/integrations/console.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_1 = require_dist5(); + var utils_1 = require_dist2(); + var util = require("util"); + var Console = ( + /** @class */ + function() { + function Console2() { + this.name = Console2.id; + } + Console2.prototype.setupOnce = function() { + var e_1, _a; + try { + for (var _b = tslib_1.__values(["debug", "info", "warn", "error", "log"]), _c = _b.next(); !_c.done; _c = _b.next()) { + var level = _c.value; + utils_1.fill(console, level, createConsoleWrapper(level)); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) + _a.call(_b); + } finally { + if (e_1) + throw e_1.error; + } + } + }; + Console2.id = "Console"; + return Console2; + }() + ); + exports2.Console = Console; + function createConsoleWrapper(level) { + return function consoleWrapper(originalConsoleMethod) { + var sentryLevel = utils_1.severityFromString(level); + return function() { + if (core_1.getCurrentHub().getIntegration(Console)) { + core_1.getCurrentHub().addBreadcrumb({ + category: "console", + level: sentryLevel, + message: util.format.apply(void 0, arguments) + }, { + input: tslib_1.__spread(arguments), + level + }); + } + originalConsoleMethod.apply(this, arguments); + }; + }; + } } +}); - var keys = Object.keys(headers) - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - res.setHeader(key, headers[key]) +// node_modules/@sentry/node/dist/integrations/utils/http.js +var require_http2 = __commonJS({ + "node_modules/@sentry/node/dist/integrations/utils/http.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_1 = require_dist5(); + var utils_1 = require_dist2(); + var url_1 = require("url"); + var NODE_VERSION = utils_1.parseSemver(process.versions.node); + function isSentryRequest(url) { + var _a; + var dsn = (_a = core_1.getCurrentHub().getClient()) === null || _a === void 0 ? void 0 : _a.getDsn(); + return dsn ? url.includes(dsn.host) : false; + } + exports2.isSentryRequest = isSentryRequest; + function extractUrl(requestOptions) { + var protocol = requestOptions.protocol || ""; + var hostname = requestOptions.hostname || requestOptions.host || ""; + var port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 ? "" : ":" + requestOptions.port; + var path = requestOptions.path ? requestOptions.path : "/"; + return protocol + "//" + hostname + port + path; + } + exports2.extractUrl = extractUrl; + function cleanSpanDescription(description, requestOptions, request) { + var _a, _b, _c; + if (!description) { + return description; + } + var _d = tslib_1.__read(description.split(" "), 2), method = _d[0], requestUrl = _d[1]; + if (requestOptions.host && !requestOptions.protocol) { + requestOptions.protocol = (_b = (_a = request) === null || _a === void 0 ? void 0 : _a.agent) === null || _b === void 0 ? void 0 : _b.protocol; + requestUrl = extractUrl(requestOptions); + } + if ((_c = requestUrl) === null || _c === void 0 ? void 0 : _c.startsWith("///")) { + requestUrl = requestUrl.slice(2); + } + return method + " " + requestUrl; + } + exports2.cleanSpanDescription = cleanSpanDescription; + function urlToOptions(url) { + var options2 = { + protocol: url.protocol, + hostname: typeof url.hostname === "string" && url.hostname.startsWith("[") ? url.hostname.slice(1, -1) : url.hostname, + hash: url.hash, + search: url.search, + pathname: url.pathname, + path: "" + (url.pathname || "") + (url.search || ""), + href: url.href + }; + if (url.port !== "") { + options2.port = Number(url.port); + } + if (url.username || url.password) { + options2.auth = url.username + ":" + url.password; + } + return options2; + } + exports2.urlToOptions = urlToOptions; + function normalizeRequestArgs(httpModule, requestArgs) { + var _a, _b, _c, _d, _e, _f, _g, _h; + var callback, requestOptions; + if (typeof requestArgs[requestArgs.length - 1] === "function") { + callback = requestArgs.pop(); + } + if (typeof requestArgs[0] === "string") { + requestOptions = urlToOptions(new url_1.URL(requestArgs[0])); + } else if (requestArgs[0] instanceof url_1.URL) { + requestOptions = urlToOptions(requestArgs[0]); + } else { + requestOptions = requestArgs[0]; + } + if (requestArgs.length === 2) { + requestOptions = tslib_1.__assign(tslib_1.__assign({}, requestOptions), requestArgs[1]); + } + if (requestOptions.protocol === void 0) { + if (NODE_VERSION.major && NODE_VERSION.major > 8) { + requestOptions.protocol = ((_b = (_a = httpModule) === null || _a === void 0 ? void 0 : _a.globalAgent) === null || _b === void 0 ? void 0 : _b.protocol) || ((_c = requestOptions.agent) === null || _c === void 0 ? void 0 : _c.protocol) || ((_d = requestOptions._defaultAgent) === null || _d === void 0 ? void 0 : _d.protocol); + } else { + requestOptions.protocol = ((_e = requestOptions.agent) === null || _e === void 0 ? void 0 : _e.protocol) || ((_f = requestOptions._defaultAgent) === null || _f === void 0 ? void 0 : _f.protocol) || ((_h = (_g = httpModule) === null || _g === void 0 ? void 0 : _g.globalAgent) === null || _h === void 0 ? void 0 : _h.protocol); + } + } + if (callback) { + return [requestOptions, callback]; + } else { + return [requestOptions]; + } + } + exports2.normalizeRequestArgs = normalizeRequestArgs; } -} - +}); -/***/ }), -/* 431 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.issue = exports.issueCommand = void 0; -const os = __importStar(__webpack_require__(87)); -const utils_1 = __webpack_require__(469); -/** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ -function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); -} -exports.issueCommand = issueCommand; -function issue(name, message = '') { - issueCommand(name, {}, message); -} -exports.issue = issue; -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; +// node_modules/@sentry/node/dist/integrations/http.js +var require_http3 = __commonJS({ + "node_modules/@sentry/node/dist/integrations/http.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); + var core_1 = require_dist5(); + var utils_1 = require_dist2(); + var flags_1 = require_flags4(); + var http_1 = require_http2(); + var NODE_VERSION = utils_1.parseSemver(process.versions.node); + var Http = ( + /** @class */ + function() { + function Http2(options2) { + if (options2 === void 0) { + options2 = {}; + } + this.name = Http2.id; + this._breadcrumbs = typeof options2.breadcrumbs === "undefined" ? true : options2.breadcrumbs; + this._tracing = typeof options2.tracing === "undefined" ? false : options2.tracing; } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } + Http2.prototype.setupOnce = function() { + if (!this._breadcrumbs && !this._tracing) { + return; + } + var wrappedHandlerMaker = _createWrappedRequestMethodFactory(this._breadcrumbs, this._tracing); + var httpModule = require("http"); + utils_1.fill(httpModule, "get", wrappedHandlerMaker); + utils_1.fill(httpModule, "request", wrappedHandlerMaker); + if (NODE_VERSION.major && NODE_VERSION.major > 8) { + var httpsModule = require("https"); + utils_1.fill(httpsModule, "get", wrappedHandlerMaker); + utils_1.fill(httpsModule, "request", wrappedHandlerMaker); + } + }; + Http2.id = "Http"; + return Http2; + }() + ); + exports2.Http = Http; + function _createWrappedRequestMethodFactory(breadcrumbsEnabled, tracingEnabled) { + return function wrappedRequestMethodFactory(originalRequestMethod) { + return function wrappedMethod() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var httpModule = this; + var requestArgs = http_1.normalizeRequestArgs(this, args); + var requestOptions = requestArgs[0]; + var requestUrl = http_1.extractUrl(requestOptions); + if (http_1.isSentryRequest(requestUrl)) { + return originalRequestMethod.apply(httpModule, requestArgs); + } + var span; + var parentSpan; + var scope = core_1.getCurrentHub().getScope(); + if (scope && tracingEnabled) { + parentSpan = scope.getSpan(); + if (parentSpan) { + span = parentSpan.startChild({ + description: (requestOptions.method || "GET") + " " + requestUrl, + op: "http.client" + }); + var sentryTraceHeader = span.toTraceparent(); + flags_1.IS_DEBUG_BUILD && utils_1.logger.log("[Tracing] Adding sentry-trace header " + sentryTraceHeader + " to outgoing request to " + requestUrl + ": "); + requestOptions.headers = tslib_1.__assign(tslib_1.__assign({}, requestOptions.headers), { "sentry-trace": sentryTraceHeader }); } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; + } + return originalRequestMethod.apply(httpModule, requestArgs).once("response", function(res) { + var req = this; + if (breadcrumbsEnabled) { + addRequestBreadcrumb("response", requestUrl, req, res); + } + if (tracingEnabled && span) { + if (res.statusCode) { + span.setHttpStatus(res.statusCode); + } + span.description = http_1.cleanSpanDescription(span.description, requestOptions, req); + span.finish(); + } + }).once("error", function() { + var req = this; + if (breadcrumbsEnabled) { + addRequestBreadcrumb("error", requestUrl, req); + } + if (tracingEnabled && span) { + span.setHttpStatus(500); + span.description = http_1.cleanSpanDescription(span.description, requestOptions, req); + span.finish(); + } + }); + }; + }; } -} -function escapeData(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map - -/***/ }), -/* 432 */, -/* 433 */ -/***/ (function(module) { - -module.exports = {"acl":{"arity":-2,"flags":["admin","noscript","loading","stale","skip_slowlog"],"keyStart":0,"keyStop":0,"step":0},"append":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"asking":{"arity":1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"auth":{"arity":-2,"flags":["noscript","loading","stale","skip_monitor","skip_slowlog","fast","no_auth"],"keyStart":0,"keyStop":0,"step":0},"bgrewriteaof":{"arity":1,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"bgsave":{"arity":-1,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"bitcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"bitfield":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"bitfield_ro":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"bitop":{"arity":-4,"flags":["write","denyoom"],"keyStart":2,"keyStop":-1,"step":1},"bitpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"blmove":{"arity":6,"flags":["write","denyoom","noscript"],"keyStart":1,"keyStop":2,"step":1},"blpop":{"arity":-3,"flags":["write","noscript"],"keyStart":1,"keyStop":-2,"step":1},"brpop":{"arity":-3,"flags":["write","noscript"],"keyStart":1,"keyStop":-2,"step":1},"brpoplpush":{"arity":4,"flags":["write","denyoom","noscript"],"keyStart":1,"keyStop":2,"step":1},"bzpopmax":{"arity":-3,"flags":["write","noscript","fast"],"keyStart":1,"keyStop":-2,"step":1},"bzpopmin":{"arity":-3,"flags":["write","noscript","fast"],"keyStart":1,"keyStop":-2,"step":1},"client":{"arity":-2,"flags":["admin","noscript","random","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"cluster":{"arity":-2,"flags":["admin","random","stale"],"keyStart":0,"keyStop":0,"step":0},"command":{"arity":-1,"flags":["random","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"config":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"copy":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"dbsize":{"arity":1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"debug":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"decr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"decrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"del":{"arity":-2,"flags":["write"],"keyStart":1,"keyStop":-1,"step":1},"discard":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"dump":{"arity":2,"flags":["readonly","random"],"keyStart":1,"keyStop":1,"step":1},"echo":{"arity":2,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"eval":{"arity":-3,"flags":["noscript","may_replicate","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"evalsha":{"arity":-3,"flags":["noscript","may_replicate","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"exec":{"arity":1,"flags":["noscript","loading","stale","skip_monitor","skip_slowlog"],"keyStart":0,"keyStop":0,"step":0},"exists":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"expire":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expireat":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"failover":{"arity":-1,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"flushall":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"flushdb":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"geoadd":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"geodist":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geohash":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geopos":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadius":{"arity":-6,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadius_ro":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember":{"arity":-5,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember_ro":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearch":{"arity":-7,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearchstore":{"arity":-8,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"get":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getbit":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getdel":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getex":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"getset":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hello":{"arity":-1,"flags":["noscript","loading","stale","skip_monitor","skip_slowlog","fast","no_auth"],"keyStart":0,"keyStop":0,"step":0},"hexists":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetall":{"arity":2,"flags":["readonly","random"],"keyStart":1,"keyStop":1,"step":1},"hincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hincrbyfloat":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hkeys":{"arity":2,"flags":["readonly","sort_for_script"],"keyStart":1,"keyStop":1,"step":1},"hlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"host:":{"arity":-1,"flags":["readonly","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"hrandfield":{"arity":-2,"flags":["readonly","random"],"keyStart":1,"keyStop":1,"step":1},"hscan":{"arity":-3,"flags":["readonly","random"],"keyStart":1,"keyStop":1,"step":1},"hset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetnx":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hstrlen":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hvals":{"arity":2,"flags":["readonly","sort_for_script"],"keyStart":1,"keyStop":1,"step":1},"incr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrbyfloat":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"info":{"arity":-1,"flags":["random","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"keys":{"arity":2,"flags":["readonly","sort_for_script"],"keyStart":0,"keyStop":0,"step":0},"lastsave":{"arity":1,"flags":["random","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"latency":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"lindex":{"arity":3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"linsert":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"llen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"lmove":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"lolwut":{"arity":-1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"lpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"lpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lrem":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"lset":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"ltrim":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"memory":{"arity":-2,"flags":["readonly","random","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"mget":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"migrate":{"arity":-6,"flags":["write","random","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"module":{"arity":-2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"monitor":{"arity":1,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"move":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"mset":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"msetnx":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"multi":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"object":{"arity":-2,"flags":["readonly","random"],"keyStart":2,"keyStop":2,"step":1},"persist":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpire":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpireat":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pfadd":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"pfcount":{"arity":-2,"flags":["readonly","may_replicate"],"keyStart":1,"keyStop":-1,"step":1},"pfdebug":{"arity":-3,"flags":["write","denyoom","admin"],"keyStart":2,"keyStop":2,"step":1},"pfmerge":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"pfselftest":{"arity":1,"flags":["admin"],"keyStart":0,"keyStop":0,"step":0},"ping":{"arity":-1,"flags":["stale","fast"],"keyStart":0,"keyStop":0,"step":0},"post":{"arity":-1,"flags":["readonly","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"psetex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"psubscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"psync":{"arity":-3,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"pttl":{"arity":2,"flags":["readonly","random","fast"],"keyStart":1,"keyStop":1,"step":1},"publish":{"arity":3,"flags":["pubsub","loading","stale","fast","may_replicate"],"keyStart":0,"keyStop":0,"step":0},"pubsub":{"arity":-2,"flags":["pubsub","random","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"punsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"quit":{"arity":1,"flags":["loading","stale","readonly"],"keyStart":0,"keyStop":0,"step":0},"randomkey":{"arity":1,"flags":["readonly","random"],"keyStart":0,"keyStop":0,"step":0},"readonly":{"arity":1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"readwrite":{"arity":1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"rename":{"arity":3,"flags":["write"],"keyStart":1,"keyStop":2,"step":1},"renamenx":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"replconf":{"arity":-1,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"replicaof":{"arity":3,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"restore":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"restore-asking":{"arity":-4,"flags":["write","denyoom","asking"],"keyStart":1,"keyStop":1,"step":1},"role":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"rpoplpush":{"arity":3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"rpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"rpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"sadd":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"save":{"arity":1,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"scan":{"arity":-2,"flags":["readonly","random"],"keyStart":0,"keyStop":0,"step":0},"scard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"script":{"arity":-2,"flags":["noscript","may_replicate"],"keyStart":0,"keyStop":0,"step":0},"sdiff":{"arity":-2,"flags":["readonly","sort_for_script"],"keyStart":1,"keyStop":-1,"step":1},"sdiffstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"select":{"arity":2,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"set":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setbit":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setnx":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"setrange":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"shutdown":{"arity":-1,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"sinter":{"arity":-2,"flags":["readonly","sort_for_script"],"keyStart":1,"keyStop":-1,"step":1},"sinterstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sismember":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"slaveof":{"arity":3,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"slowlog":{"arity":-2,"flags":["admin","random","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"smembers":{"arity":2,"flags":["readonly","sort_for_script"],"keyStart":1,"keyStop":1,"step":1},"smismember":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"smove":{"arity":4,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"sort":{"arity":-2,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"spop":{"arity":-2,"flags":["write","random","fast"],"keyStart":1,"keyStop":1,"step":1},"srandmember":{"arity":-2,"flags":["readonly","random"],"keyStart":1,"keyStop":1,"step":1},"srem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"sscan":{"arity":-3,"flags":["readonly","random"],"keyStart":1,"keyStop":1,"step":1},"stralgo":{"arity":-2,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"strlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"subscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"substr":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"sunion":{"arity":-2,"flags":["readonly","sort_for_script"],"keyStart":1,"keyStop":-1,"step":1},"sunionstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"swapdb":{"arity":3,"flags":["write","fast"],"keyStart":0,"keyStop":0,"step":0},"sync":{"arity":1,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"time":{"arity":1,"flags":["random","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"touch":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"ttl":{"arity":2,"flags":["readonly","random","fast"],"keyStart":1,"keyStop":1,"step":1},"type":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"unlink":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":-1,"step":1},"unsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unwatch":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"wait":{"arity":3,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"watch":{"arity":-2,"flags":["noscript","loading","stale","fast"],"keyStart":1,"keyStop":-1,"step":1},"xack":{"arity":-4,"flags":["write","random","fast"],"keyStart":1,"keyStop":1,"step":1},"xadd":{"arity":-5,"flags":["write","denyoom","random","fast"],"keyStart":1,"keyStop":1,"step":1},"xautoclaim":{"arity":-6,"flags":["write","random","fast"],"keyStart":1,"keyStop":1,"step":1},"xclaim":{"arity":-6,"flags":["write","random","fast"],"keyStart":1,"keyStop":1,"step":1},"xdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xgroup":{"arity":-2,"flags":["write","denyoom"],"keyStart":2,"keyStop":2,"step":1},"xinfo":{"arity":-2,"flags":["readonly","random"],"keyStart":2,"keyStop":2,"step":1},"xlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"xpending":{"arity":-3,"flags":["readonly","random"],"keyStart":1,"keyStop":1,"step":1},"xrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xread":{"arity":-4,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xreadgroup":{"arity":-7,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xsetid":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xtrim":{"arity":-2,"flags":["write","random"],"keyStart":1,"keyStop":1,"step":1},"zadd":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zcard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zdiff":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zdiffstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zinter":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zinterstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zlexcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zmscore":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmax":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmin":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zrandmember":{"arity":-2,"flags":["readonly","random"],"keyStart":1,"keyStop":1,"step":1},"zrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangestore":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"zrank":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zrem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zremrangebylex":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyrank":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyscore":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrank":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zscan":{"arity":-3,"flags":["readonly","random"],"keyStart":1,"keyStop":1,"step":1},"zscore":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zunion":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zunionstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1}}; - -/***/ }), -/* 434 */, -/* 435 */, -/* 436 */, -/* 437 */, -/* 438 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - - -var Type = __webpack_require__(945); - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; + function addRequestBreadcrumb(event, url, req, res) { + if (!core_1.getCurrentHub().getIntegration(Http)) { + return; + } + core_1.getCurrentHub().addBreadcrumb({ + category: "http", + data: { + method: req.method, + status_code: res && res.statusCode, + url + }, + type: "http" + }, { + event, + request: req, + response: res + }); } - fraction = +fraction; } +}); - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; +// node_modules/@sentry/node/dist/integrations/utils/errorhandling.js +var require_errorhandling = __commonJS({ + "node_modules/@sentry/node/dist/integrations/utils/errorhandling.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_1 = require_dist5(); + var utils_1 = require_dist2(); + var flags_1 = require_flags4(); + var DEFAULT_SHUTDOWN_TIMEOUT = 2e3; + function logAndExitProcess(error) { + console.error(error && error.stack ? error.stack : error); + var client = core_1.getCurrentHub().getClient(); + if (client === void 0) { + flags_1.IS_DEBUG_BUILD && utils_1.logger.warn("No NodeClient was defined, we are exiting the process now."); + global.process.exit(1); + } + var options2 = client.getOptions(); + var timeout = options2 && options2.shutdownTimeout && options2.shutdownTimeout > 0 && options2.shutdownTimeout || DEFAULT_SHUTDOWN_TIMEOUT; + utils_1.forget(client.close(timeout).then(function(result) { + if (!result) { + flags_1.IS_DEBUG_BUILD && utils_1.logger.warn("We reached the timeout for emptying the request buffer, still exiting now!"); + } + global.process.exit(1); + })); + } + exports2.logAndExitProcess = logAndExitProcess; } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp }); - -/***/ }), -/* 439 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -module.exports = { - decode: __webpack_require__(884), - verify: __webpack_require__(504), - sign: __webpack_require__(343), - JsonWebTokenError: __webpack_require__(416), - NotBeforeError: __webpack_require__(322), - TokenExpiredError: __webpack_require__(262), -}; - - -/***/ }), -/* 440 */ -/***/ (function(__unusedmodule, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createProbot = void 0; -const get_private_key_1 = __webpack_require__(885); -const get_log_1 = __webpack_require__(769); -const probot_1 = __webpack_require__(581); -const DEFAULTS = { - APP_ID: "", - WEBHOOK_SECRET: "", - GHE_HOST: "", - GHE_PROTOCOL: "", - LOG_FORMAT: "", - LOG_LEVEL: "warn", - LOG_LEVEL_IN_STRING: "", - LOG_MESSAGE_KEY: "msg", - REDIS_URL: "", - SENTRY_DSN: "", -}; -/** - * Merges configuration from defaults/environment variables/overrides and returns - * a Probot instance. Finds private key using [`@probot/get-private-key`](https://github.com/probot/get-private-key). - * - * @see https://probot.github.io/docs/configuration/ - * @param defaults default Options, will be overwritten if according environment variable is set - * @param overrides overwrites defaults and according environment variables - * @param env defaults to process.env - */ -function createProbot({ overrides = {}, defaults = {}, env = process.env, } = {}) { - const privateKey = get_private_key_1.getPrivateKey({ env }); - const envWithDefaults = { ...DEFAULTS, ...env }; - const envOptions = { - logLevel: envWithDefaults.LOG_LEVEL, - appId: Number(envWithDefaults.APP_ID), - privateKey: (privateKey && privateKey.toString()) || undefined, - secret: envWithDefaults.WEBHOOK_SECRET, - redisConfig: envWithDefaults.REDIS_URL, - baseUrl: envWithDefaults.GHE_HOST - ? `${envWithDefaults.GHE_PROTOCOL || "https"}://${envWithDefaults.GHE_HOST}/api/v3` - : "https://api.github.com", - }; - const probotOptions = { - ...defaults, - ...envOptions, - ...overrides, - }; - const logOptions = { - level: probotOptions.logLevel, - logFormat: envWithDefaults.LOG_FORMAT, - logLevelInString: envWithDefaults.LOG_LEVEL_IN_STRING === "true", - logMessageKey: envWithDefaults.LOG_MESSAGE_KEY, - sentryDsn: envWithDefaults.SENTRY_DSN, - }; - const log = get_log_1.getLog(logOptions).child({ name: "server" }); - return new probot_1.Probot({ - log: log.child({ name: "probot" }), - ...probotOptions, - }); -} -exports.createProbot = createProbot; -//# sourceMappingURL=create-probot.js.map - -/***/ }), -/* 441 */, -/* 442 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - */ - -var bodyParser = __webpack_require__(408) -var EventEmitter = __webpack_require__(614).EventEmitter; -var mixin = __webpack_require__(243); -var proto = __webpack_require__(128); -var Route = __webpack_require__(12); -var Router = __webpack_require__(987); -var req = __webpack_require__(668); -var res = __webpack_require__(801); - -/** - * Expose `createApplication()`. - */ - -exports = module.exports = createApplication; - -/** - * Create an express application. - * - * @return {Function} - * @api public - */ - -function createApplication() { - var app = function(req, res, next) { - app.handle(req, res, next); - }; - - mixin(app, EventEmitter.prototype, false); - mixin(app, proto, false); - - // expose the prototype that will get set on requests - app.request = Object.create(req, { - app: { configurable: true, enumerable: true, writable: true, value: app } - }) - - // expose the prototype that will get set on responses - app.response = Object.create(res, { - app: { configurable: true, enumerable: true, writable: true, value: app } - }) - - app.init(); - return app; -} - -/** - * Expose the prototypes. - */ - -exports.application = proto; -exports.request = req; -exports.response = res; - -/** - * Expose constructors. - */ - -exports.Route = Route; -exports.Router = Router; - -/** - * Expose middleware - */ - -exports.json = bodyParser.json -exports.query = __webpack_require__(210); -exports.raw = bodyParser.raw -exports.static = __webpack_require__(457); -exports.text = bodyParser.text -exports.urlencoded = bodyParser.urlencoded - -/** - * Replace removed middleware with an appropriate error message. - */ - -var removedMiddlewares = [ - 'bodyParser', - 'compress', - 'cookieSession', - 'session', - 'logger', - 'cookieParser', - 'favicon', - 'responseTime', - 'errorHandler', - 'timeout', - 'methodOverride', - 'vhost', - 'csrf', - 'directory', - 'limit', - 'multipart', - 'staticCache' -] - -removedMiddlewares.forEach(function (name) { - Object.defineProperty(exports, name, { - get: function () { - throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.'); - }, - configurable: true - }); +// node_modules/@sentry/node/dist/integrations/onuncaughtexception.js +var require_onuncaughtexception = __commonJS({ + "node_modules/@sentry/node/dist/integrations/onuncaughtexception.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_1 = require_dist5(); + var types_1 = require_dist(); + var utils_1 = require_dist2(); + var flags_1 = require_flags4(); + var errorhandling_1 = require_errorhandling(); + var OnUncaughtException = ( + /** @class */ + function() { + function OnUncaughtException2(_options) { + if (_options === void 0) { + _options = {}; + } + this._options = _options; + this.name = OnUncaughtException2.id; + this.handler = this._makeErrorHandler(); + } + OnUncaughtException2.prototype.setupOnce = function() { + global.process.on("uncaughtException", this.handler.bind(this)); + }; + OnUncaughtException2.prototype._makeErrorHandler = function() { + var _this = this; + var timeout = 2e3; + var caughtFirstError = false; + var caughtSecondError = false; + var calledFatalError = false; + var firstError; + return function(error) { + var onFatalError = errorhandling_1.logAndExitProcess; + var client = core_1.getCurrentHub().getClient(); + if (_this._options.onFatalError) { + onFatalError = _this._options.onFatalError; + } else if (client && client.getOptions().onFatalError) { + onFatalError = client.getOptions().onFatalError; + } + if (!caughtFirstError) { + var hub_1 = core_1.getCurrentHub(); + firstError = error; + caughtFirstError = true; + if (hub_1.getIntegration(OnUncaughtException2)) { + hub_1.withScope(function(scope) { + scope.setLevel(types_1.Severity.Fatal); + hub_1.captureException(error, { + originalException: error, + data: { mechanism: { handled: false, type: "onuncaughtexception" } } + }); + if (!calledFatalError) { + calledFatalError = true; + onFatalError(error); + } + }); + } else { + if (!calledFatalError) { + calledFatalError = true; + onFatalError(error); + } + } + } else if (calledFatalError) { + flags_1.IS_DEBUG_BUILD && utils_1.logger.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"); + errorhandling_1.logAndExitProcess(error); + } else if (!caughtSecondError) { + caughtSecondError = true; + setTimeout(function() { + if (!calledFatalError) { + calledFatalError = true; + onFatalError(firstError, error); + } else { + } + }, timeout); + } + }; + }; + OnUncaughtException2.id = "OnUncaughtException"; + return OnUncaughtException2; + }() + ); + exports2.OnUncaughtException = OnUncaughtException; + } }); - -/***/ }), -/* 443 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -const events_1 = __webpack_require__(614); -const debug_1 = __importDefault(__webpack_require__(784)); -const promisify_1 = __importDefault(__webpack_require__(537)); -const debug = debug_1.default('agent-base'); -function isAgent(v) { - return Boolean(v) && typeof v.addRequest === 'function'; -} -function isSecureEndpoint() { - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); -} -function createAgent(callback, opts) { - return new createAgent.Agent(callback, opts); -} -(function (createAgent) { - /** - * Base `http.Agent` implementation. - * No pooling/keep-alive is implemented by default. - * - * @param {Function} callback - * @api public - */ - class Agent extends events_1.EventEmitter { - constructor(callback, _opts) { - super(); - let opts = _opts; - if (typeof callback === 'function') { - this.callback = callback; +// node_modules/@sentry/node/dist/integrations/onunhandledrejection.js +var require_onunhandledrejection = __commonJS({ + "node_modules/@sentry/node/dist/integrations/onunhandledrejection.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_1 = require_dist5(); + var utils_1 = require_dist2(); + var errorhandling_1 = require_errorhandling(); + var OnUnhandledRejection = ( + /** @class */ + function() { + function OnUnhandledRejection2(_options) { + if (_options === void 0) { + _options = { mode: "warn" }; + } + this._options = _options; + this.name = OnUnhandledRejection2.id; + } + OnUnhandledRejection2.prototype.setupOnce = function() { + global.process.on("unhandledRejection", this.sendUnhandledPromise.bind(this)); + }; + OnUnhandledRejection2.prototype.sendUnhandledPromise = function(reason, promise) { + var hub = core_1.getCurrentHub(); + if (!hub.getIntegration(OnUnhandledRejection2)) { + this._handleRejection(reason); + return; + } + var context = promise.domain && promise.domain.sentryContext || {}; + hub.withScope(function(scope) { + scope.setExtra("unhandledPromiseRejection", true); + if (context.user) { + scope.setUser(context.user); } - else if (callback) { - opts = callback; + if (context.tags) { + scope.setTags(context.tags); } - // Timeout for the socket to be returned from the callback - this.timeout = null; - if (opts && typeof opts.timeout === 'number') { - this.timeout = opts.timeout; - } - // These aren't actually used by `agent-base`, but are required - // for the TypeScript definition files in `@types/node` :/ - this.maxFreeSockets = 1; - this.maxSockets = 1; - this.maxTotalSockets = Infinity; - this.sockets = {}; - this.freeSockets = {}; - this.requests = {}; - this.options = {}; - } - get defaultPort() { - if (typeof this.explicitDefaultPort === 'number') { - return this.explicitDefaultPort; + if (context.extra) { + scope.setExtras(context.extra); } - return isSecureEndpoint() ? 443 : 80; + hub.captureException(reason, { + originalException: promise, + data: { mechanism: { handled: false, type: "onunhandledrejection" } } + }); + }); + this._handleRejection(reason); + }; + OnUnhandledRejection2.prototype._handleRejection = function(reason) { + var rejectionWarning = "This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:"; + if (this._options.mode === "warn") { + utils_1.consoleSandbox(function() { + console.warn(rejectionWarning); + console.error(reason && reason.stack ? reason.stack : reason); + }); + } else if (this._options.mode === "strict") { + utils_1.consoleSandbox(function() { + console.warn(rejectionWarning); + }); + errorhandling_1.logAndExitProcess(reason); + } + }; + OnUnhandledRejection2.id = "OnUnhandledRejection"; + return OnUnhandledRejection2; + }() + ); + exports2.OnUnhandledRejection = OnUnhandledRejection; + } +}); + +// node_modules/lru_map/lru.js +var require_lru = __commonJS({ + "node_modules/lru_map/lru.js"(exports2) { + (function(g, f) { + const e = typeof exports2 == "object" ? exports2 : typeof g == "object" ? g : {}; + f(e); + if (typeof define == "function" && define.amd) { + define("lru", e); + } + })(exports2, function(exports3) { + const NEWER = Symbol("newer"); + const OLDER = Symbol("older"); + function LRUMap(limit, entries) { + if (typeof limit !== "number") { + entries = limit; + limit = 0; + } + this.size = 0; + this.limit = limit; + this.oldest = this.newest = void 0; + this._keymap = /* @__PURE__ */ new Map(); + if (entries) { + this.assign(entries); + if (limit < 1) { + this.limit = this.size; + } } - set defaultPort(v) { - this.explicitDefaultPort = v; + } + exports3.LRUMap = LRUMap; + function Entry(key, value) { + this.key = key; + this.value = value; + this[NEWER] = void 0; + this[OLDER] = void 0; + } + LRUMap.prototype._markEntryAsUsed = function(entry) { + if (entry === this.newest) { + return; } - get protocol() { - if (typeof this.explicitProtocol === 'string') { - return this.explicitProtocol; - } - return isSecureEndpoint() ? 'https:' : 'http:'; + if (entry[NEWER]) { + if (entry === this.oldest) { + this.oldest = entry[NEWER]; + } + entry[NEWER][OLDER] = entry[OLDER]; } - set protocol(v) { - this.explicitProtocol = v; + if (entry[OLDER]) { + entry[OLDER][NEWER] = entry[NEWER]; } - callback(req, opts, fn) { - throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); + entry[NEWER] = void 0; + entry[OLDER] = this.newest; + if (this.newest) { + this.newest[NEWER] = entry; } - /** - * Called by node-core's "_http_client.js" module when creating - * a new HTTP request with this Agent instance. - * - * @api public - */ - addRequest(req, _opts) { - const opts = Object.assign({}, _opts); - if (typeof opts.secureEndpoint !== 'boolean') { - opts.secureEndpoint = isSecureEndpoint(); - } - if (opts.host == null) { - opts.host = 'localhost'; - } - if (opts.port == null) { - opts.port = opts.secureEndpoint ? 443 : 80; - } - if (opts.protocol == null) { - opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; - } - if (opts.host && opts.path) { - // If both a `host` and `path` are specified then it's most - // likely the result of a `url.parse()` call... we need to - // remove the `path` portion so that `net.connect()` doesn't - // attempt to open that as a unix socket file. - delete opts.path; - } - delete opts.agent; - delete opts.hostname; - delete opts._defaultAgent; - delete opts.defaultPort; - delete opts.createConnection; - // Hint to use "Connection: close" - // XXX: non-documented `http` module API :( - req._last = true; - req.shouldKeepAlive = false; - let timedOut = false; - let timeoutId = null; - const timeoutMs = opts.timeout || this.timeout; - const onerror = (err) => { - if (req._hadError) - return; - req.emit('error', err); - // For Safety. Some additional errors might fire later on - // and we need to make sure we don't double-fire the error event. - req._hadError = true; - }; - const ontimeout = () => { - timeoutId = null; - timedOut = true; - const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); - err.code = 'ETIMEOUT'; - onerror(err); - }; - const callbackError = (err) => { - if (timedOut) - return; - if (timeoutId !== null) { - clearTimeout(timeoutId); - timeoutId = null; - } - onerror(err); - }; - const onsocket = (socket) => { - if (timedOut) - return; - if (timeoutId != null) { - clearTimeout(timeoutId); - timeoutId = null; - } - if (isAgent(socket)) { - // `socket` is actually an `http.Agent` instance, so - // relinquish responsibility for this `req` to the Agent - // from here on - debug('Callback returned another Agent instance %o', socket.constructor.name); - socket.addRequest(req, opts); - return; - } - if (socket) { - socket.once('free', () => { - this.freeSocket(socket, opts); - }); - req.onSocket(socket); - return; - } - const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); - onerror(err); - }; - if (typeof this.callback !== 'function') { - onerror(new Error('`callback` is not defined')); - return; - } - if (!this.promisifiedCallback) { - if (this.callback.length >= 3) { - debug('Converting legacy callback function to promise'); - this.promisifiedCallback = promisify_1.default(this.callback); - } - else { - this.promisifiedCallback = this.callback; - } - } - if (typeof timeoutMs === 'number' && timeoutMs > 0) { - timeoutId = setTimeout(ontimeout, timeoutMs); - } - if ('port' in opts && typeof opts.port !== 'number') { - opts.port = Number(opts.port); - } - try { - debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); - Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); - } - catch (err) { - Promise.reject(err).catch(callbackError); - } + this.newest = entry; + }; + LRUMap.prototype.assign = function(entries) { + let entry, limit = this.limit || Number.MAX_VALUE; + this._keymap.clear(); + let it = entries[Symbol.iterator](); + for (let itv = it.next(); !itv.done; itv = it.next()) { + let e = new Entry(itv.value[0], itv.value[1]); + this._keymap.set(e.key, e); + if (!entry) { + this.oldest = e; + } else { + entry[NEWER] = e; + e[OLDER] = entry; + } + entry = e; + if (limit-- == 0) { + throw new Error("overflow"); + } } - freeSocket(socket, opts) { - debug('Freeing socket %o %o', socket.constructor.name, opts); - socket.destroy(); + this.newest = entry; + this.size = this._keymap.size; + }; + LRUMap.prototype.get = function(key) { + var entry = this._keymap.get(key); + if (!entry) + return; + this._markEntryAsUsed(entry); + return entry.value; + }; + LRUMap.prototype.set = function(key, value) { + var entry = this._keymap.get(key); + if (entry) { + entry.value = value; + this._markEntryAsUsed(entry); + return this; + } + this._keymap.set(key, entry = new Entry(key, value)); + if (this.newest) { + this.newest[NEWER] = entry; + entry[OLDER] = this.newest; + } else { + this.oldest = entry; + } + this.newest = entry; + ++this.size; + if (this.size > this.limit) { + this.shift(); + } + return this; + }; + LRUMap.prototype.shift = function() { + var entry = this.oldest; + if (entry) { + if (this.oldest[NEWER]) { + this.oldest = this.oldest[NEWER]; + this.oldest[OLDER] = void 0; + } else { + this.oldest = void 0; + this.newest = void 0; + } + entry[NEWER] = entry[OLDER] = void 0; + this._keymap.delete(entry.key); + --this.size; + return [entry.key, entry.value]; } - destroy() { - debug('Destroying agent %o', this.constructor.name); - } - } - createAgent.Agent = Agent; - // So that `instanceof` works correctly - createAgent.prototype = createAgent.Agent.prototype; -})(createAgent || (createAgent = {})); -module.exports = createAgent; -//# sourceMappingURL=index.js.map - -/***/ }), -/* 444 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Module dependencies. - */ - -const EventEmitter = __webpack_require__(614).EventEmitter; -const spawn = __webpack_require__(129).spawn; -const path = __webpack_require__(622); -const fs = __webpack_require__(747); - -// @ts-check - -class Option { - /** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {string} flags - * @param {string} description - * @api public - */ - - constructor(flags, description) { - this.flags = flags; - this.required = flags.includes('<'); // A value must be supplied when the option is specified. - this.optional = flags.includes('['); // A value is optional when the option is specified. - // variadic test ignores