@k8slens/extensions 5.4.1-git.e6d4b05e42.0 → 5.4.1-git.ee82abce14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/ipc/native-theme.d.ts +6 -0
- package/dist/src/common/k8s-api/api-manager.d.ts +3 -3
- package/dist/src/common/k8s-api/endpoints/helm-charts.api.d.ts +5 -5
- package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +1 -1
- package/dist/src/common/utils/lazy-initialized.d.ts +17 -0
- package/dist/src/common/vars.d.ts +11 -0
- package/dist/src/extensions/common-api/registrations.d.ts +1 -1
- package/dist/src/extensions/extension-api.js +239 -300
- package/dist/src/extensions/lens-renderer-extension.d.ts +4 -2
- package/dist/src/extensions/registries/index.d.ts +0 -2
- package/dist/src/main/__test__/{router.test.d.ts → static-file-route.test.d.ts} +0 -0
- package/dist/src/main/helm/exec.d.ts +12 -0
- package/dist/src/main/helm/helm-release-manager.d.ts +1 -1
- package/dist/src/main/helm/helm-service.d.ts +1 -1
- package/dist/src/main/kube-auth-proxy/kube-auth-proxy.d.ts +2 -3
- package/dist/src/main/kubectl/kubectl.d.ts +0 -1
- package/dist/src/main/lens-proxy.d.ts +5 -5
- package/dist/src/main/native-theme.d.ts +6 -0
- package/dist/src/main/router/parse-request.injectable.d.ts +3 -0
- package/dist/src/main/router/router-content-types.d.ts +14 -0
- package/dist/src/main/{router.d.ts → router/router.d.ts} +28 -6
- package/dist/src/main/router/router.injectable.d.ts +2 -1
- package/dist/src/{renderer/initializers/workloads-overview-detail-registry.d.ts → main/router/router.test.d.ts} +1 -1
- package/dist/src/main/routes/helm/charts/get-chart-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/charts/get-chart-values-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/charts/list-charts-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/releases/delete-release-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/releases/get-release-history-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/releases/get-release-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/releases/get-release-values-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/releases/install-chart-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/releases/list-releases-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/releases/rollback-release-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/helm/releases/update-release-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/kubeconfig-route/get-service-account-route.injectable.d.ts +8 -0
- package/dist/src/main/routes/metrics/add-metrics-route.injectable.d.ts +8 -0
- package/dist/src/main/routes/metrics/get-metric-providers-route.injectable.d.ts +8 -0
- package/dist/src/main/routes/metrics/metrics-query.d.ts +7 -0
- package/dist/src/main/routes/port-forward/{create-port-forward.injectable.d.ts → functionality/create-port-forward.injectable.d.ts} +0 -0
- package/dist/src/main/routes/port-forward/{port-forward.d.ts → functionality/port-forward.d.ts} +0 -0
- package/dist/src/main/routes/port-forward/get-current-port-forward-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/port-forward/start-port-forward-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/port-forward/stop-current-port-forward-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/resource-applier/apply-resource-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/resource-applier/patch-resource-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/static-file-route.injectable.d.ts +4 -0
- package/dist/src/main/routes/versions/get-version-route.injectable.d.ts +4 -0
- package/dist/src/renderer/components/+workloads-overview/detail-components.injectable.d.ts +4 -0
- package/dist/src/renderer/components/+workloads-overview/workloads-overview-detail-registration.d.ts +13 -0
- package/dist/src/renderer/components/item-object-list/content.d.ts +2 -0
- package/dist/src/renderer/components/kube-object-status-icon/kube-object-status-icon.d.ts +4 -5
- package/dist/src/renderer/components/kube-object-status-icon/kube-object-status-icon.test.d.ts +1 -0
- package/dist/src/renderer/components/kube-object-status-icon/kube-object-status-registration.d.ts +11 -0
- package/dist/src/renderer/components/kube-object-status-icon/status-registrations.injectable.d.ts +3 -0
- package/dist/src/renderer/components/kube-object-status-icon/statuses-for-kube-object.injectable.d.ts +4 -0
- package/dist/src/renderer/components/select/select.test.d.ts +1 -0
- package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
- package/dist/src/renderer/initializers/index.d.ts +0 -1
- package/dist/src/renderer/theme.store.d.ts +5 -0
- package/package.json +1 -1
- package/dist/src/extensions/registries/kube-object-status-registry.d.ts +0 -15
- package/dist/src/extensions/registries/workloads-overview-detail-registry.d.ts +0 -19
- package/dist/src/main/helm/helm-cli.d.ts +0 -13
- package/dist/src/main/lens-binary.d.ts +0 -42
- package/dist/src/main/routes/helm-route.d.ts +0 -18
- package/dist/src/main/routes/index.d.ts +0 -10
- package/dist/src/main/routes/kubeconfig-route.d.ts +0 -8
- package/dist/src/main/routes/metrics-route.d.ts +0 -12
- package/dist/src/main/routes/port-forward/route-port-forward/route-port-forward.d.ts +0 -11
- package/dist/src/main/routes/port-forward/route-port-forward/route-port-forward.injectable.d.ts +0 -3
- package/dist/src/main/routes/port-forward-route.d.ts +0 -9
- package/dist/src/main/routes/resource-applier-route.d.ts +0 -9
- package/dist/src/main/routes/version-route.d.ts +0 -8
- package/dist/webpack.dev-server.d.ts +0 -14
- package/dist/webpack.renderer.d.ts +0 -25
|
@@ -199,6 +199,118 @@ eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"
|
|
|
199
199
|
|
|
200
200
|
/***/ }),
|
|
201
201
|
|
|
202
|
+
/***/ "./node_modules/@colors/colors/lib/colors.js":
|
|
203
|
+
/*!***************************************************!*\
|
|
204
|
+
!*** ./node_modules/@colors/colors/lib/colors.js ***!
|
|
205
|
+
\***************************************************/
|
|
206
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
207
|
+
|
|
208
|
+
eval("/*\n\nThe MIT License (MIT)\n\nOriginal Library\n - Copyright (c) Marak Squires\n\nAdditional functionality\n - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\nvar colors = {};\nmodule['exports'] = colors;\n\ncolors.themes = {};\n\nvar util = __webpack_require__(/*! util */ \"util\");\nvar ansiStyles = colors.styles = __webpack_require__(/*! ./styles */ \"./node_modules/@colors/colors/lib/styles.js\");\nvar defineProps = Object.defineProperties;\nvar newLineRegex = new RegExp(/[\\r\\n]+/g);\n\ncolors.supportsColor = (__webpack_require__(/*! ./system/supports-colors */ \"./node_modules/@colors/colors/lib/system/supports-colors.js\").supportsColor);\n\nif (typeof colors.enabled === 'undefined') {\n colors.enabled = colors.supportsColor() !== false;\n}\n\ncolors.enable = function() {\n colors.enabled = true;\n};\n\ncolors.disable = function() {\n colors.enabled = false;\n};\n\ncolors.stripColors = colors.strip = function(str) {\n return ('' + str).replace(/\\x1B\\[\\d+m/g, '');\n};\n\n// eslint-disable-next-line no-unused-vars\nvar stylize = colors.stylize = function stylize(str, style) {\n if (!colors.enabled) {\n return str+'';\n }\n\n var styleMap = ansiStyles[style];\n\n // Stylize should work for non-ANSI styles, too\n if (!styleMap && style in colors) {\n // Style maps like trap operate as functions on strings;\n // they don't have properties like open or close.\n return colors[style](str);\n }\n\n return styleMap.open + str + styleMap.close;\n};\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\nvar escapeStringRegexp = function(str) {\n if (typeof str !== 'string') {\n throw new TypeError('Expected a string');\n }\n return str.replace(matchOperatorsRe, '\\\\$&');\n};\n\nfunction build(_styles) {\n var builder = function builder() {\n return applyStyle.apply(builder, arguments);\n };\n builder._styles = _styles;\n // __proto__ is used because we must return a function, but there is\n // no way to create a function with a different prototype.\n builder.__proto__ = proto;\n return builder;\n}\n\nvar styles = (function() {\n var ret = {};\n ansiStyles.grey = ansiStyles.gray;\n Object.keys(ansiStyles).forEach(function(key) {\n ansiStyles[key].closeRe =\n new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n ret[key] = {\n get: function() {\n return build(this._styles.concat(key));\n },\n };\n });\n return ret;\n})();\n\nvar proto = defineProps(function colors() {}, styles);\n\nfunction applyStyle() {\n var args = Array.prototype.slice.call(arguments);\n\n var str = args.map(function(arg) {\n // Use weak equality check so we can colorize null/undefined in safe mode\n if (arg != null && arg.constructor === String) {\n return arg;\n } else {\n return util.inspect(arg);\n }\n }).join(' ');\n\n if (!colors.enabled || !str) {\n return str;\n }\n\n var newLinesPresent = str.indexOf('\\n') != -1;\n\n var nestedStyles = this._styles;\n\n var i = nestedStyles.length;\n while (i--) {\n var code = ansiStyles[nestedStyles[i]];\n str = code.open + str.replace(code.closeRe, code.open) + code.close;\n if (newLinesPresent) {\n str = str.replace(newLineRegex, function(match) {\n return code.close + match + code.open;\n });\n }\n }\n\n return str;\n}\n\ncolors.setTheme = function(theme) {\n if (typeof theme === 'string') {\n console.log('colors.setTheme now only accepts an object, not a string. ' +\n 'If you are trying to set a theme from a file, it is now your (the ' +\n 'caller\\'s) responsibility to require the file. The old syntax ' +\n 'looked like colors.setTheme(__dirname + ' +\n '\\'/../themes/generic-logging.js\\'); The new syntax looks like '+\n 'colors.setTheme(require(__dirname + ' +\n '\\'/../themes/generic-logging.js\\'));');\n return;\n }\n for (var style in theme) {\n (function(style) {\n colors[style] = function(str) {\n if (typeof theme[style] === 'object') {\n var out = str;\n for (var i in theme[style]) {\n out = colors[theme[style][i]](out);\n }\n return out;\n }\n return colors[theme[style]](str);\n };\n })(style);\n }\n};\n\nfunction init() {\n var ret = {};\n Object.keys(styles).forEach(function(name) {\n ret[name] = {\n get: function() {\n return build([name]);\n },\n };\n });\n return ret;\n}\n\nvar sequencer = function sequencer(map, str) {\n var exploded = str.split('');\n exploded = exploded.map(map);\n return exploded.join('');\n};\n\n// custom formatter methods\ncolors.trap = __webpack_require__(/*! ./custom/trap */ \"./node_modules/@colors/colors/lib/custom/trap.js\");\ncolors.zalgo = __webpack_require__(/*! ./custom/zalgo */ \"./node_modules/@colors/colors/lib/custom/zalgo.js\");\n\n// maps\ncolors.maps = {};\ncolors.maps.america = __webpack_require__(/*! ./maps/america */ \"./node_modules/@colors/colors/lib/maps/america.js\")(colors);\ncolors.maps.zebra = __webpack_require__(/*! ./maps/zebra */ \"./node_modules/@colors/colors/lib/maps/zebra.js\")(colors);\ncolors.maps.rainbow = __webpack_require__(/*! ./maps/rainbow */ \"./node_modules/@colors/colors/lib/maps/rainbow.js\")(colors);\ncolors.maps.random = __webpack_require__(/*! ./maps/random */ \"./node_modules/@colors/colors/lib/maps/random.js\")(colors);\n\nfor (var map in colors.maps) {\n (function(map) {\n colors[map] = function(str) {\n return sequencer(colors.maps[map], str);\n };\n })(map);\n}\n\ndefineProps(colors, init());\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/colors.js?");
|
|
209
|
+
|
|
210
|
+
/***/ }),
|
|
211
|
+
|
|
212
|
+
/***/ "./node_modules/@colors/colors/lib/custom/trap.js":
|
|
213
|
+
/*!********************************************************!*\
|
|
214
|
+
!*** ./node_modules/@colors/colors/lib/custom/trap.js ***!
|
|
215
|
+
\********************************************************/
|
|
216
|
+
/***/ ((module) => {
|
|
217
|
+
|
|
218
|
+
eval("module['exports'] = function runTheTrap(text, options) {\n var result = '';\n text = text || 'Run the trap, drop the bass';\n text = text.split('');\n var trap = {\n a: ['\\u0040', '\\u0104', '\\u023a', '\\u0245', '\\u0394', '\\u039b', '\\u0414'],\n b: ['\\u00df', '\\u0181', '\\u0243', '\\u026e', '\\u03b2', '\\u0e3f'],\n c: ['\\u00a9', '\\u023b', '\\u03fe'],\n d: ['\\u00d0', '\\u018a', '\\u0500', '\\u0501', '\\u0502', '\\u0503'],\n e: ['\\u00cb', '\\u0115', '\\u018e', '\\u0258', '\\u03a3', '\\u03be', '\\u04bc',\n '\\u0a6c'],\n f: ['\\u04fa'],\n g: ['\\u0262'],\n h: ['\\u0126', '\\u0195', '\\u04a2', '\\u04ba', '\\u04c7', '\\u050a'],\n i: ['\\u0f0f'],\n j: ['\\u0134'],\n k: ['\\u0138', '\\u04a0', '\\u04c3', '\\u051e'],\n l: ['\\u0139'],\n m: ['\\u028d', '\\u04cd', '\\u04ce', '\\u0520', '\\u0521', '\\u0d69'],\n n: ['\\u00d1', '\\u014b', '\\u019d', '\\u0376', '\\u03a0', '\\u048a'],\n o: ['\\u00d8', '\\u00f5', '\\u00f8', '\\u01fe', '\\u0298', '\\u047a', '\\u05dd',\n '\\u06dd', '\\u0e4f'],\n p: ['\\u01f7', '\\u048e'],\n q: ['\\u09cd'],\n r: ['\\u00ae', '\\u01a6', '\\u0210', '\\u024c', '\\u0280', '\\u042f'],\n s: ['\\u00a7', '\\u03de', '\\u03df', '\\u03e8'],\n t: ['\\u0141', '\\u0166', '\\u0373'],\n u: ['\\u01b1', '\\u054d'],\n v: ['\\u05d8'],\n w: ['\\u0428', '\\u0460', '\\u047c', '\\u0d70'],\n x: ['\\u04b2', '\\u04fe', '\\u04fc', '\\u04fd'],\n y: ['\\u00a5', '\\u04b0', '\\u04cb'],\n z: ['\\u01b5', '\\u0240'],\n };\n text.forEach(function(c) {\n c = c.toLowerCase();\n var chars = trap[c] || [' '];\n var rand = Math.floor(Math.random() * chars.length);\n if (typeof trap[c] !== 'undefined') {\n result += trap[c][rand];\n } else {\n result += c;\n }\n });\n return result;\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/custom/trap.js?");
|
|
219
|
+
|
|
220
|
+
/***/ }),
|
|
221
|
+
|
|
222
|
+
/***/ "./node_modules/@colors/colors/lib/custom/zalgo.js":
|
|
223
|
+
/*!*********************************************************!*\
|
|
224
|
+
!*** ./node_modules/@colors/colors/lib/custom/zalgo.js ***!
|
|
225
|
+
\*********************************************************/
|
|
226
|
+
/***/ ((module) => {
|
|
227
|
+
|
|
228
|
+
eval("// please no\nmodule['exports'] = function zalgo(text, options) {\n text = text || ' he is here ';\n var soul = {\n 'up': [\n '̍', '̎', '̄', '̅',\n '̿', '̑', '̆', '̐',\n '͒', '͗', '͑', '̇',\n '̈', '̊', '͂', '̓',\n '̈', '͊', '͋', '͌',\n '̃', '̂', '̌', '͐',\n '̀', '́', '̋', '̏',\n '̒', '̓', '̔', '̽',\n '̉', 'ͣ', 'ͤ', 'ͥ',\n 'ͦ', 'ͧ', 'ͨ', 'ͩ',\n 'ͪ', 'ͫ', 'ͬ', 'ͭ',\n 'ͮ', 'ͯ', '̾', '͛',\n '͆', '̚',\n ],\n 'down': [\n '̖', '̗', '̘', '̙',\n '̜', '̝', '̞', '̟',\n '̠', '̤', '̥', '̦',\n '̩', '̪', '̫', '̬',\n '̭', '̮', '̯', '̰',\n '̱', '̲', '̳', '̹',\n '̺', '̻', '̼', 'ͅ',\n '͇', '͈', '͉', '͍',\n '͎', '͓', '͔', '͕',\n '͖', '͙', '͚', '̣',\n ],\n 'mid': [\n '̕', '̛', '̀', '́',\n '͘', '̡', '̢', '̧',\n '̨', '̴', '̵', '̶',\n '͜', '͝', '͞',\n '͟', '͠', '͢', '̸',\n '̷', '͡', ' ҉',\n ],\n };\n var all = [].concat(soul.up, soul.down, soul.mid);\n\n function randomNumber(range) {\n var r = Math.floor(Math.random() * range);\n return r;\n }\n\n function isChar(character) {\n var bool = false;\n all.filter(function(i) {\n bool = (i === character);\n });\n return bool;\n }\n\n\n function heComes(text, options) {\n var result = '';\n var counts;\n var l;\n options = options || {};\n options['up'] =\n typeof options['up'] !== 'undefined' ? options['up'] : true;\n options['mid'] =\n typeof options['mid'] !== 'undefined' ? options['mid'] : true;\n options['down'] =\n typeof options['down'] !== 'undefined' ? options['down'] : true;\n options['size'] =\n typeof options['size'] !== 'undefined' ? options['size'] : 'maxi';\n text = text.split('');\n for (l in text) {\n if (isChar(l)) {\n continue;\n }\n result = result + text[l];\n counts = {'up': 0, 'down': 0, 'mid': 0};\n switch (options.size) {\n case 'mini':\n counts.up = randomNumber(8);\n counts.mid = randomNumber(2);\n counts.down = randomNumber(8);\n break;\n case 'maxi':\n counts.up = randomNumber(16) + 3;\n counts.mid = randomNumber(4) + 1;\n counts.down = randomNumber(64) + 3;\n break;\n default:\n counts.up = randomNumber(8) + 1;\n counts.mid = randomNumber(6) / 2;\n counts.down = randomNumber(8) + 1;\n break;\n }\n\n var arr = ['up', 'mid', 'down'];\n for (var d in arr) {\n var index = arr[d];\n for (var i = 0; i <= counts[index]; i++) {\n if (options[index]) {\n result = result + soul[index][randomNumber(soul[index].length)];\n }\n }\n }\n }\n return result;\n }\n // don't summon him\n return heComes(text, options);\n};\n\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/custom/zalgo.js?");
|
|
229
|
+
|
|
230
|
+
/***/ }),
|
|
231
|
+
|
|
232
|
+
/***/ "./node_modules/@colors/colors/lib/maps/america.js":
|
|
233
|
+
/*!*********************************************************!*\
|
|
234
|
+
!*** ./node_modules/@colors/colors/lib/maps/america.js ***!
|
|
235
|
+
\*********************************************************/
|
|
236
|
+
/***/ ((module) => {
|
|
237
|
+
|
|
238
|
+
eval("module['exports'] = function(colors) {\n return function(letter, i, exploded) {\n if (letter === ' ') return letter;\n switch (i%3) {\n case 0: return colors.red(letter);\n case 1: return colors.white(letter);\n case 2: return colors.blue(letter);\n }\n };\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/maps/america.js?");
|
|
239
|
+
|
|
240
|
+
/***/ }),
|
|
241
|
+
|
|
242
|
+
/***/ "./node_modules/@colors/colors/lib/maps/rainbow.js":
|
|
243
|
+
/*!*********************************************************!*\
|
|
244
|
+
!*** ./node_modules/@colors/colors/lib/maps/rainbow.js ***!
|
|
245
|
+
\*********************************************************/
|
|
246
|
+
/***/ ((module) => {
|
|
247
|
+
|
|
248
|
+
eval("module['exports'] = function(colors) {\n // RoY G BiV\n var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta'];\n return function(letter, i, exploded) {\n if (letter === ' ') {\n return letter;\n } else {\n return colors[rainbowColors[i++ % rainbowColors.length]](letter);\n }\n };\n};\n\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/maps/rainbow.js?");
|
|
249
|
+
|
|
250
|
+
/***/ }),
|
|
251
|
+
|
|
252
|
+
/***/ "./node_modules/@colors/colors/lib/maps/random.js":
|
|
253
|
+
/*!********************************************************!*\
|
|
254
|
+
!*** ./node_modules/@colors/colors/lib/maps/random.js ***!
|
|
255
|
+
\********************************************************/
|
|
256
|
+
/***/ ((module) => {
|
|
257
|
+
|
|
258
|
+
eval("module['exports'] = function(colors) {\n var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green',\n 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed',\n 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta'];\n return function(letter, i, exploded) {\n return letter === ' ' ? letter :\n colors[\n available[Math.round(Math.random() * (available.length - 2))]\n ](letter);\n };\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/maps/random.js?");
|
|
259
|
+
|
|
260
|
+
/***/ }),
|
|
261
|
+
|
|
262
|
+
/***/ "./node_modules/@colors/colors/lib/maps/zebra.js":
|
|
263
|
+
/*!*******************************************************!*\
|
|
264
|
+
!*** ./node_modules/@colors/colors/lib/maps/zebra.js ***!
|
|
265
|
+
\*******************************************************/
|
|
266
|
+
/***/ ((module) => {
|
|
267
|
+
|
|
268
|
+
eval("module['exports'] = function(colors) {\n return function(letter, i, exploded) {\n return i % 2 === 0 ? letter : colors.inverse(letter);\n };\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/maps/zebra.js?");
|
|
269
|
+
|
|
270
|
+
/***/ }),
|
|
271
|
+
|
|
272
|
+
/***/ "./node_modules/@colors/colors/lib/styles.js":
|
|
273
|
+
/*!***************************************************!*\
|
|
274
|
+
!*** ./node_modules/@colors/colors/lib/styles.js ***!
|
|
275
|
+
\***************************************************/
|
|
276
|
+
/***/ ((module) => {
|
|
277
|
+
|
|
278
|
+
eval("/*\nThe MIT License (MIT)\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\nvar styles = {};\nmodule['exports'] = styles;\n\nvar codes = {\n reset: [0, 0],\n\n bold: [1, 22],\n dim: [2, 22],\n italic: [3, 23],\n underline: [4, 24],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29],\n\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n gray: [90, 39],\n grey: [90, 39],\n\n brightRed: [91, 39],\n brightGreen: [92, 39],\n brightYellow: [93, 39],\n brightBlue: [94, 39],\n brightMagenta: [95, 39],\n brightCyan: [96, 39],\n brightWhite: [97, 39],\n\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49],\n bgGray: [100, 49],\n bgGrey: [100, 49],\n\n bgBrightRed: [101, 49],\n bgBrightGreen: [102, 49],\n bgBrightYellow: [103, 49],\n bgBrightBlue: [104, 49],\n bgBrightMagenta: [105, 49],\n bgBrightCyan: [106, 49],\n bgBrightWhite: [107, 49],\n\n // legacy styles for colors pre v1.0.0\n blackBG: [40, 49],\n redBG: [41, 49],\n greenBG: [42, 49],\n yellowBG: [43, 49],\n blueBG: [44, 49],\n magentaBG: [45, 49],\n cyanBG: [46, 49],\n whiteBG: [47, 49],\n\n};\n\nObject.keys(codes).forEach(function(key) {\n var val = codes[key];\n var style = styles[key] = [];\n style.open = '\\u001b[' + val[0] + 'm';\n style.close = '\\u001b[' + val[1] + 'm';\n});\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/styles.js?");
|
|
279
|
+
|
|
280
|
+
/***/ }),
|
|
281
|
+
|
|
282
|
+
/***/ "./node_modules/@colors/colors/lib/system/has-flag.js":
|
|
283
|
+
/*!************************************************************!*\
|
|
284
|
+
!*** ./node_modules/@colors/colors/lib/system/has-flag.js ***!
|
|
285
|
+
\************************************************************/
|
|
286
|
+
/***/ ((module) => {
|
|
287
|
+
|
|
288
|
+
"use strict";
|
|
289
|
+
eval("/*\nMIT License\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\n\n\nmodule.exports = function(flag, argv) {\n argv = argv || process.argv;\n\n var terminatorPos = argv.indexOf('--');\n var prefix = /^-{1,2}/.test(flag) ? '' : '--';\n var pos = argv.indexOf(prefix + flag);\n\n return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/system/has-flag.js?");
|
|
290
|
+
|
|
291
|
+
/***/ }),
|
|
292
|
+
|
|
293
|
+
/***/ "./node_modules/@colors/colors/lib/system/supports-colors.js":
|
|
294
|
+
/*!*******************************************************************!*\
|
|
295
|
+
!*** ./node_modules/@colors/colors/lib/system/supports-colors.js ***!
|
|
296
|
+
\*******************************************************************/
|
|
297
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
298
|
+
|
|
299
|
+
"use strict";
|
|
300
|
+
eval("/*\nThe MIT License (MIT)\n\nCopyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\n\n\nvar os = __webpack_require__(/*! os */ \"os\");\nvar hasFlag = __webpack_require__(/*! ./has-flag.js */ \"./node_modules/@colors/colors/lib/system/has-flag.js\");\n\nvar env = process.env;\n\nvar forceColor = void 0;\nif (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {\n forceColor = false;\n} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true')\n || hasFlag('color=always')) {\n forceColor = true;\n}\nif ('FORCE_COLOR' in env) {\n forceColor = env.FORCE_COLOR.length === 0\n || parseInt(env.FORCE_COLOR, 10) !== 0;\n}\n\nfunction translateLevel(level) {\n if (level === 0) {\n return false;\n }\n\n return {\n level: level,\n hasBasic: true,\n has256: level >= 2,\n has16m: level >= 3,\n };\n}\n\nfunction supportsColor(stream) {\n if (forceColor === false) {\n return 0;\n }\n\n if (hasFlag('color=16m') || hasFlag('color=full')\n || hasFlag('color=truecolor')) {\n return 3;\n }\n\n if (hasFlag('color=256')) {\n return 2;\n }\n\n if (stream && !stream.isTTY && forceColor !== true) {\n return 0;\n }\n\n var min = forceColor ? 1 : 0;\n\n if (process.platform === 'win32') {\n // Node.js 7.5.0 is the first version of Node.js to include a patch to\n // libuv that enables 256 color output on Windows. Anything earlier and it\n // won't work. However, here we target Node.js 8 at minimum as it is an LTS\n // release, and Node.js 7 is not. Windows 10 build 10586 is the first\n // Windows release that supports 256 colors. Windows 10 build 14931 is the\n // first release that supports 16m/TrueColor.\n var osRelease = os.release().split('.');\n if (Number(process.versions.node.split('.')[0]) >= 8\n && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {\n return Number(osRelease[2]) >= 14931 ? 3 : 2;\n }\n\n return 1;\n }\n\n if ('CI' in env) {\n if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) {\n return sign in env;\n }) || env.CI_NAME === 'codeship') {\n return 1;\n }\n\n return min;\n }\n\n if ('TEAMCITY_VERSION' in env) {\n return (/^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0\n );\n }\n\n if ('TERM_PROGRAM' in env) {\n var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n switch (env.TERM_PROGRAM) {\n case 'iTerm.app':\n return version >= 3 ? 3 : 2;\n case 'Hyper':\n return 3;\n case 'Apple_Terminal':\n return 2;\n // No default\n }\n }\n\n if (/-256(color)?$/i.test(env.TERM)) {\n return 2;\n }\n\n if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n return 1;\n }\n\n if ('COLORTERM' in env) {\n return 1;\n }\n\n if (env.TERM === 'dumb') {\n return min;\n }\n\n return min;\n}\n\nfunction getSupportLevel(stream) {\n var level = supportsColor(stream);\n return translateLevel(level);\n}\n\nmodule.exports = {\n supportsColor: getSupportLevel,\n stdout: getSupportLevel(process.stdout),\n stderr: getSupportLevel(process.stderr),\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/lib/system/supports-colors.js?");
|
|
301
|
+
|
|
302
|
+
/***/ }),
|
|
303
|
+
|
|
304
|
+
/***/ "./node_modules/@colors/colors/safe.js":
|
|
305
|
+
/*!*********************************************!*\
|
|
306
|
+
!*** ./node_modules/@colors/colors/safe.js ***!
|
|
307
|
+
\*********************************************/
|
|
308
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
309
|
+
|
|
310
|
+
eval("//\n// Remark: Requiring this file will use the \"safe\" colors API,\n// which will not touch String.prototype.\n//\n// var colors = require('colors/safe');\n// colors.red(\"foo\")\n//\n//\nvar colors = __webpack_require__(/*! ./lib/colors */ \"./node_modules/@colors/colors/lib/colors.js\");\nmodule['exports'] = colors;\n\n\n//# sourceURL=webpack://open-lens/./node_modules/@colors/colors/safe.js?");
|
|
311
|
+
|
|
312
|
+
/***/ }),
|
|
313
|
+
|
|
202
314
|
/***/ "./node_modules/@dabh/diagnostics/adapters/hash.js":
|
|
203
315
|
/*!*********************************************************!*\
|
|
204
316
|
!*** ./node_modules/@dabh/diagnostics/adapters/hash.js ***!
|
|
@@ -9019,7 +9131,7 @@ eval("// Copyright (c) 2012, Mark Cavage. All rights reserved.\n// Copyright 201
|
|
|
9019
9131
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9020
9132
|
|
|
9021
9133
|
"use strict";
|
|
9022
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = asyncify;\n\nvar _initialParams = __webpack_require__(/*! ./internal/initialParams */ \"./node_modules/async/internal/initialParams.js\");\n\nvar _initialParams2 = _interopRequireDefault(_initialParams);\n\nvar _setImmediate = __webpack_require__(/*! ./internal/setImmediate */ \"./node_modules/async/internal/setImmediate.js\");\n\nvar _setImmediate2 = _interopRequireDefault(_setImmediate);\n\nvar _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync */ \"./node_modules/async/internal/wrapAsync.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Take a sync function and make it async, passing its return value to a\n * callback. This is useful for plugging sync functions into a waterfall,\n * series, or other async functions. Any arguments passed to the generated\n * function will be passed to the wrapped function (except for the final\n * callback argument). Errors thrown will be passed to the callback.\n *\n * If the function passed to `asyncify` returns a Promise, that promises's\n * resolved/rejected state will be used to call the callback, rather than simply\n * the synchronous return value.\n *\n * This also means you can asyncify ES2017 `async` functions.\n *\n * @name asyncify\n * @static\n * @memberOf module:Utils\n * @method\n * @alias wrapSync\n * @category Util\n * @param {Function} func - The synchronous function, or Promise-returning\n * function to convert to an {@link AsyncFunction}.\n * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be\n * invoked with `(args..., callback)`.\n * @example\n *\n * // passing a regular synchronous function\n * async.waterfall([\n * async.apply(fs.readFile, filename, \"utf8\"),\n * async.asyncify(JSON.parse),\n * function (data, next) {\n * // data is the result of parsing the text.\n * // If there was a parsing error, it would have been caught.\n * }\n * ], callback);\n *\n * // passing a function returning a promise\n * async.waterfall([\n * async.apply(fs.readFile, filename, \"utf8\"),\n * async.asyncify(function (contents) {\n * return db.model.create(contents);\n * }),\n * function (model, next) {\n * // `model` is the instantiated model object.\n * // If there was an error, this function would be skipped.\n * }\n * ], callback);\n *\n * // es2017 example, though `asyncify` is not needed if your JS environment\n * // supports async functions out of the box\n * var q = async.queue(async.asyncify(async function(file) {\n * var intermediateStep = await processFile(file);\n * return await somePromise(intermediateStep)\n * }));\n *\n * q.push(files);\n */\nfunction asyncify(func) {\n if ((0, _wrapAsync.isAsync)(func)) {\n return function (...args /*, callback*/) {\n const callback = args.pop();\n const promise = func.apply(this, args);\n return handlePromise(promise, callback);\n };\n }\n\n return (0, _initialParams2.default)(function (args, callback) {\n var result;\n try {\n result = func.apply(this, args);\n } catch (e) {\n return callback(e);\n }\n // if result is Promise object\n if (result && typeof result.then === 'function') {\n return handlePromise(result, callback);\n } else {\n callback(null, result);\n }\n });\n}\n\nfunction handlePromise(promise, callback) {\n return promise.then(value => {\n invokeCallback(callback, null, value);\n }, err => {\n invokeCallback(callback, err && err.message ? err : new Error(err));\n });\n}\n\nfunction invokeCallback(callback, error, value) {\n try {\n callback(error, value);\n } catch (err) {\n (0, _setImmediate2.default)(e => {\n throw e;\n }, err);\n }\n}\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/asyncify.js?");
|
|
9134
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = asyncify;\n\nvar _initialParams = __webpack_require__(/*! ./internal/initialParams.js */ \"./node_modules/async/internal/initialParams.js\");\n\nvar _initialParams2 = _interopRequireDefault(_initialParams);\n\nvar _setImmediate = __webpack_require__(/*! ./internal/setImmediate.js */ \"./node_modules/async/internal/setImmediate.js\");\n\nvar _setImmediate2 = _interopRequireDefault(_setImmediate);\n\nvar _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync.js */ \"./node_modules/async/internal/wrapAsync.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Take a sync function and make it async, passing its return value to a\n * callback. This is useful for plugging sync functions into a waterfall,\n * series, or other async functions. Any arguments passed to the generated\n * function will be passed to the wrapped function (except for the final\n * callback argument). Errors thrown will be passed to the callback.\n *\n * If the function passed to `asyncify` returns a Promise, that promises's\n * resolved/rejected state will be used to call the callback, rather than simply\n * the synchronous return value.\n *\n * This also means you can asyncify ES2017 `async` functions.\n *\n * @name asyncify\n * @static\n * @memberOf module:Utils\n * @method\n * @alias wrapSync\n * @category Util\n * @param {Function} func - The synchronous function, or Promise-returning\n * function to convert to an {@link AsyncFunction}.\n * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be\n * invoked with `(args..., callback)`.\n * @example\n *\n * // passing a regular synchronous function\n * async.waterfall([\n * async.apply(fs.readFile, filename, \"utf8\"),\n * async.asyncify(JSON.parse),\n * function (data, next) {\n * // data is the result of parsing the text.\n * // If there was a parsing error, it would have been caught.\n * }\n * ], callback);\n *\n * // passing a function returning a promise\n * async.waterfall([\n * async.apply(fs.readFile, filename, \"utf8\"),\n * async.asyncify(function (contents) {\n * return db.model.create(contents);\n * }),\n * function (model, next) {\n * // `model` is the instantiated model object.\n * // If there was an error, this function would be skipped.\n * }\n * ], callback);\n *\n * // es2017 example, though `asyncify` is not needed if your JS environment\n * // supports async functions out of the box\n * var q = async.queue(async.asyncify(async function(file) {\n * var intermediateStep = await processFile(file);\n * return await somePromise(intermediateStep)\n * }));\n *\n * q.push(files);\n */\nfunction asyncify(func) {\n if ((0, _wrapAsync.isAsync)(func)) {\n return function (...args /*, callback*/) {\n const callback = args.pop();\n const promise = func.apply(this, args);\n return handlePromise(promise, callback);\n };\n }\n\n return (0, _initialParams2.default)(function (args, callback) {\n var result;\n try {\n result = func.apply(this, args);\n } catch (e) {\n return callback(e);\n }\n // if result is Promise object\n if (result && typeof result.then === 'function') {\n return handlePromise(result, callback);\n } else {\n callback(null, result);\n }\n });\n}\n\nfunction handlePromise(promise, callback) {\n return promise.then(value => {\n invokeCallback(callback, null, value);\n }, err => {\n invokeCallback(callback, err && err.message ? err : new Error(err));\n });\n}\n\nfunction invokeCallback(callback, error, value) {\n try {\n callback(error, value);\n } catch (err) {\n (0, _setImmediate2.default)(e => {\n throw e;\n }, err);\n }\n}\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/asyncify.js?");
|
|
9023
9135
|
|
|
9024
9136
|
/***/ }),
|
|
9025
9137
|
|
|
@@ -9030,7 +9142,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})
|
|
|
9030
9142
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9031
9143
|
|
|
9032
9144
|
"use strict";
|
|
9033
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _isArrayLike = __webpack_require__(/*! ./internal/isArrayLike */ \"./node_modules/async/internal/isArrayLike.js\");\n\nvar _isArrayLike2 = _interopRequireDefault(_isArrayLike);\n\nvar _breakLoop = __webpack_require__(/*! ./internal/breakLoop */ \"./node_modules/async/internal/breakLoop.js\");\n\nvar _breakLoop2 = _interopRequireDefault(_breakLoop);\n\nvar _eachOfLimit = __webpack_require__(/*! ./eachOfLimit */ \"./node_modules/async/eachOfLimit.js\");\n\nvar _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);\n\nvar _once = __webpack_require__(/*! ./internal/once */ \"./node_modules/async/internal/once.js\");\n\nvar _once2 = _interopRequireDefault(_once);\n\nvar _onlyOnce = __webpack_require__(/*! ./internal/onlyOnce */ \"./node_modules/async/internal/onlyOnce.js\");\n\nvar _onlyOnce2 = _interopRequireDefault(_onlyOnce);\n\nvar _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nvar _awaitify = __webpack_require__(/*! ./internal/awaitify */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// eachOf implementation optimized for array-likes\nfunction eachOfArrayLike(coll, iteratee, callback) {\n callback = (0, _once2.default)(callback);\n var index = 0,\n completed = 0,\n { length } = coll,\n canceled = false;\n if (length === 0) {\n callback(null);\n }\n\n function iteratorCallback(err, value) {\n if (err === false) {\n canceled = true;\n }\n if (canceled === true) return;\n if (err) {\n callback(err);\n } else if (++completed === length || value === _breakLoop2.default) {\n callback(null);\n }\n }\n\n for (; index < length; index++) {\n iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback));\n }\n}\n\n// a generic version of eachOf which can handle array, object, and iterator cases.\nfunction eachOfGeneric(coll, iteratee, callback) {\n return (0, _eachOfLimit2.default)(coll, Infinity, iteratee, callback);\n}\n\n/**\n * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument\n * to the iteratee.\n *\n * @name eachOf\n * @static\n * @memberOf module:Collections\n * @method\n * @alias forEachOf\n * @category Collection\n * @see [async.each]{@link module:Collections.each}\n * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n * @param {AsyncFunction} iteratee - A function to apply to each\n * item in `coll`.\n * The `key` is the item's key, or index in the case of an array.\n * Invoked with (item, key, callback).\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n * @returns {Promise} a promise, if a callback is omitted\n * @example\n *\n *
|
|
9145
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _isArrayLike = __webpack_require__(/*! ./internal/isArrayLike.js */ \"./node_modules/async/internal/isArrayLike.js\");\n\nvar _isArrayLike2 = _interopRequireDefault(_isArrayLike);\n\nvar _breakLoop = __webpack_require__(/*! ./internal/breakLoop.js */ \"./node_modules/async/internal/breakLoop.js\");\n\nvar _breakLoop2 = _interopRequireDefault(_breakLoop);\n\nvar _eachOfLimit = __webpack_require__(/*! ./eachOfLimit.js */ \"./node_modules/async/eachOfLimit.js\");\n\nvar _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);\n\nvar _once = __webpack_require__(/*! ./internal/once.js */ \"./node_modules/async/internal/once.js\");\n\nvar _once2 = _interopRequireDefault(_once);\n\nvar _onlyOnce = __webpack_require__(/*! ./internal/onlyOnce.js */ \"./node_modules/async/internal/onlyOnce.js\");\n\nvar _onlyOnce2 = _interopRequireDefault(_onlyOnce);\n\nvar _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync.js */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nvar _awaitify = __webpack_require__(/*! ./internal/awaitify.js */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// eachOf implementation optimized for array-likes\nfunction eachOfArrayLike(coll, iteratee, callback) {\n callback = (0, _once2.default)(callback);\n var index = 0,\n completed = 0,\n { length } = coll,\n canceled = false;\n if (length === 0) {\n callback(null);\n }\n\n function iteratorCallback(err, value) {\n if (err === false) {\n canceled = true;\n }\n if (canceled === true) return;\n if (err) {\n callback(err);\n } else if (++completed === length || value === _breakLoop2.default) {\n callback(null);\n }\n }\n\n for (; index < length; index++) {\n iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback));\n }\n}\n\n// a generic version of eachOf which can handle array, object, and iterator cases.\nfunction eachOfGeneric(coll, iteratee, callback) {\n return (0, _eachOfLimit2.default)(coll, Infinity, iteratee, callback);\n}\n\n/**\n * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument\n * to the iteratee.\n *\n * @name eachOf\n * @static\n * @memberOf module:Collections\n * @method\n * @alias forEachOf\n * @category Collection\n * @see [async.each]{@link module:Collections.each}\n * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n * @param {AsyncFunction} iteratee - A function to apply to each\n * item in `coll`.\n * The `key` is the item's key, or index in the case of an array.\n * Invoked with (item, key, callback).\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n * @returns {Promise} a promise, if a callback is omitted\n * @example\n *\n * // dev.json is a file containing a valid json object config for dev environment\n * // dev.json is a file containing a valid json object config for test environment\n * // prod.json is a file containing a valid json object config for prod environment\n * // invalid.json is a file with a malformed json object\n *\n * let configs = {}; //global variable\n * let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'};\n * let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'};\n *\n * // asynchronous function that reads a json file and parses the contents as json object\n * function parseFile(file, key, callback) {\n * fs.readFile(file, \"utf8\", function(err, data) {\n * if (err) return calback(err);\n * try {\n * configs[key] = JSON.parse(data);\n * } catch (e) {\n * return callback(e);\n * }\n * callback();\n * });\n * }\n *\n * // Using callbacks\n * async.forEachOf(validConfigFileMap, parseFile, function (err) {\n * if (err) {\n * console.error(err);\n * } else {\n * console.log(configs);\n * // configs is now a map of JSON data, e.g.\n * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}\n * }\n * });\n *\n * //Error handing\n * async.forEachOf(invalidConfigFileMap, parseFile, function (err) {\n * if (err) {\n * console.error(err);\n * // JSON parse error exception\n * } else {\n * console.log(configs);\n * }\n * });\n *\n * // Using Promises\n * async.forEachOf(validConfigFileMap, parseFile)\n * .then( () => {\n * console.log(configs);\n * // configs is now a map of JSON data, e.g.\n * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}\n * }).catch( err => {\n * console.error(err);\n * });\n *\n * //Error handing\n * async.forEachOf(invalidConfigFileMap, parseFile)\n * .then( () => {\n * console.log(configs);\n * }).catch( err => {\n * console.error(err);\n * // JSON parse error exception\n * });\n *\n * // Using async/await\n * async () => {\n * try {\n * let result = await async.forEachOf(validConfigFileMap, parseFile);\n * console.log(configs);\n * // configs is now a map of JSON data, e.g.\n * // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}\n * }\n * catch (err) {\n * console.log(err);\n * }\n * }\n *\n * //Error handing\n * async () => {\n * try {\n * let result = await async.forEachOf(invalidConfigFileMap, parseFile);\n * console.log(configs);\n * }\n * catch (err) {\n * console.log(err);\n * // JSON parse error exception\n * }\n * }\n *\n */\nfunction eachOf(coll, iteratee, callback) {\n var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric;\n return eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback);\n}\n\nexports[\"default\"] = (0, _awaitify2.default)(eachOf, 3);\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/eachOf.js?");
|
|
9034
9146
|
|
|
9035
9147
|
/***/ }),
|
|
9036
9148
|
|
|
@@ -9041,7 +9153,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})
|
|
|
9041
9153
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9042
9154
|
|
|
9043
9155
|
"use strict";
|
|
9044
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _eachOfLimit2 = __webpack_require__(/*! ./internal/eachOfLimit */ \"./node_modules/async/internal/eachOfLimit.js\");\n\nvar _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2);\n\nvar _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nvar _awaitify = __webpack_require__(/*! ./internal/awaitify */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a\n * time.\n *\n * @name eachOfLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.eachOf]{@link module:Collections.eachOf}\n * @alias forEachOfLimit\n * @category Collection\n * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {AsyncFunction} iteratee - An async function to apply to each\n * item in `coll`. The `key` is the item's key, or index in the case of an\n * array.\n * Invoked with (item, key, callback).\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n * @returns {Promise} a promise, if a callback is omitted\n */\nfunction eachOfLimit(coll, limit, iteratee, callback) {\n return (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback);\n}\n\nexports[\"default\"] = (0, _awaitify2.default)(eachOfLimit, 4);\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/eachOfLimit.js?");
|
|
9156
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _eachOfLimit2 = __webpack_require__(/*! ./internal/eachOfLimit.js */ \"./node_modules/async/internal/eachOfLimit.js\");\n\nvar _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2);\n\nvar _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync.js */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nvar _awaitify = __webpack_require__(/*! ./internal/awaitify.js */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a\n * time.\n *\n * @name eachOfLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.eachOf]{@link module:Collections.eachOf}\n * @alias forEachOfLimit\n * @category Collection\n * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {AsyncFunction} iteratee - An async function to apply to each\n * item in `coll`. The `key` is the item's key, or index in the case of an\n * array.\n * Invoked with (item, key, callback).\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n * @returns {Promise} a promise, if a callback is omitted\n */\nfunction eachOfLimit(coll, limit, iteratee, callback) {\n return (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback);\n}\n\nexports[\"default\"] = (0, _awaitify2.default)(eachOfLimit, 4);\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/eachOfLimit.js?");
|
|
9045
9157
|
|
|
9046
9158
|
/***/ }),
|
|
9047
9159
|
|
|
@@ -9052,7 +9164,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
9052
9164
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9053
9165
|
|
|
9054
9166
|
"use strict";
|
|
9055
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _eachOfLimit = __webpack_require__(/*! ./eachOfLimit */ \"./node_modules/async/eachOfLimit.js\");\n\nvar _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);\n\nvar _awaitify = __webpack_require__(/*! ./internal/awaitify */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.\n *\n * @name eachOfSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.eachOf]{@link module:Collections.eachOf}\n * @alias forEachOfSeries\n * @category Collection\n * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n * @param {AsyncFunction} iteratee - An async function to apply to each item in\n * `coll`.\n * Invoked with (item, key, callback).\n * @param {Function} [callback] - A callback which is called when all `iteratee`\n * functions have finished, or an error occurs. Invoked with (err).\n * @returns {Promise} a promise, if a callback is omitted\n */\nfunction eachOfSeries(coll, iteratee, callback) {\n return (0, _eachOfLimit2.default)(coll, 1, iteratee, callback);\n}\nexports[\"default\"] = (0, _awaitify2.default)(eachOfSeries, 3);\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/eachOfSeries.js?");
|
|
9167
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _eachOfLimit = __webpack_require__(/*! ./eachOfLimit.js */ \"./node_modules/async/eachOfLimit.js\");\n\nvar _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);\n\nvar _awaitify = __webpack_require__(/*! ./internal/awaitify.js */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.\n *\n * @name eachOfSeries\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.eachOf]{@link module:Collections.eachOf}\n * @alias forEachOfSeries\n * @category Collection\n * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n * @param {AsyncFunction} iteratee - An async function to apply to each item in\n * `coll`.\n * Invoked with (item, key, callback).\n * @param {Function} [callback] - A callback which is called when all `iteratee`\n * functions have finished, or an error occurs. Invoked with (err).\n * @returns {Promise} a promise, if a callback is omitted\n */\nfunction eachOfSeries(coll, iteratee, callback) {\n return (0, _eachOfLimit2.default)(coll, 1, iteratee, callback);\n}\nexports[\"default\"] = (0, _awaitify2.default)(eachOfSeries, 3);\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/eachOfSeries.js?");
|
|
9056
9168
|
|
|
9057
9169
|
/***/ }),
|
|
9058
9170
|
|
|
@@ -9063,7 +9175,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
9063
9175
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9064
9176
|
|
|
9065
9177
|
"use strict";
|
|
9066
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _eachOf = __webpack_require__(/*! ./eachOf */ \"./node_modules/async/eachOf.js\");\n\nvar _eachOf2 = _interopRequireDefault(_eachOf);\n\nvar _withoutIndex = __webpack_require__(/*! ./internal/withoutIndex */ \"./node_modules/async/internal/withoutIndex.js\");\n\nvar _withoutIndex2 = _interopRequireDefault(_withoutIndex);\n\nvar _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nvar _awaitify = __webpack_require__(/*! ./internal/awaitify */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Applies the function `iteratee` to each item in `coll`, in parallel.\n * The `iteratee` is called with an item from the list, and a callback for when\n * it has finished. If the `iteratee` passes an error to its `callback`, the\n * main `callback` (for the `each` function) is immediately called with the\n * error.\n *\n * Note, that since this function applies `iteratee` to each item in parallel,\n * there is no guarantee that the iteratee functions will complete in order.\n *\n * @name each\n * @static\n * @memberOf module:Collections\n * @method\n * @alias forEach\n * @category Collection\n * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n * @param {AsyncFunction} iteratee - An async function to apply to\n * each item in `coll`. Invoked with (item, callback).\n * The array index is not passed to the iteratee.\n * If you need the index, use `eachOf`.\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n * @returns {Promise} a promise, if a callback is omitted\n * @example\n *\n * //
|
|
9178
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _eachOf = __webpack_require__(/*! ./eachOf.js */ \"./node_modules/async/eachOf.js\");\n\nvar _eachOf2 = _interopRequireDefault(_eachOf);\n\nvar _withoutIndex = __webpack_require__(/*! ./internal/withoutIndex.js */ \"./node_modules/async/internal/withoutIndex.js\");\n\nvar _withoutIndex2 = _interopRequireDefault(_withoutIndex);\n\nvar _wrapAsync = __webpack_require__(/*! ./internal/wrapAsync.js */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nvar _awaitify = __webpack_require__(/*! ./internal/awaitify.js */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Applies the function `iteratee` to each item in `coll`, in parallel.\n * The `iteratee` is called with an item from the list, and a callback for when\n * it has finished. If the `iteratee` passes an error to its `callback`, the\n * main `callback` (for the `each` function) is immediately called with the\n * error.\n *\n * Note, that since this function applies `iteratee` to each item in parallel,\n * there is no guarantee that the iteratee functions will complete in order.\n *\n * @name each\n * @static\n * @memberOf module:Collections\n * @method\n * @alias forEach\n * @category Collection\n * @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.\n * @param {AsyncFunction} iteratee - An async function to apply to\n * each item in `coll`. Invoked with (item, callback).\n * The array index is not passed to the iteratee.\n * If you need the index, use `eachOf`.\n * @param {Function} [callback] - A callback which is called when all\n * `iteratee` functions have finished, or an error occurs. Invoked with (err).\n * @returns {Promise} a promise, if a callback is omitted\n * @example\n *\n * // dir1 is a directory that contains file1.txt, file2.txt\n * // dir2 is a directory that contains file3.txt, file4.txt\n * // dir3 is a directory that contains file5.txt\n * // dir4 does not exist\n *\n * const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt'];\n * const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt'];\n *\n * // asynchronous function that deletes a file\n * const deleteFile = function(file, callback) {\n * fs.unlink(file, callback);\n * };\n *\n * // Using callbacks\n * async.each(fileList, deleteFile, function(err) {\n * if( err ) {\n * console.log(err);\n * } else {\n * console.log('All files have been deleted successfully');\n * }\n * });\n *\n * // Error Handling\n * async.each(withMissingFileList, deleteFile, function(err){\n * console.log(err);\n * // [ Error: ENOENT: no such file or directory ]\n * // since dir4/file2.txt does not exist\n * // dir1/file1.txt could have been deleted\n * });\n *\n * // Using Promises\n * async.each(fileList, deleteFile)\n * .then( () => {\n * console.log('All files have been deleted successfully');\n * }).catch( err => {\n * console.log(err);\n * });\n *\n * // Error Handling\n * async.each(fileList, deleteFile)\n * .then( () => {\n * console.log('All files have been deleted successfully');\n * }).catch( err => {\n * console.log(err);\n * // [ Error: ENOENT: no such file or directory ]\n * // since dir4/file2.txt does not exist\n * // dir1/file1.txt could have been deleted\n * });\n *\n * // Using async/await\n * async () => {\n * try {\n * await async.each(files, deleteFile);\n * }\n * catch (err) {\n * console.log(err);\n * }\n * }\n *\n * // Error Handling\n * async () => {\n * try {\n * await async.each(withMissingFileList, deleteFile);\n * }\n * catch (err) {\n * console.log(err);\n * // [ Error: ENOENT: no such file or directory ]\n * // since dir4/file2.txt does not exist\n * // dir1/file1.txt could have been deleted\n * }\n * }\n *\n */\nfunction eachLimit(coll, iteratee, callback) {\n return (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback);\n}\n\nexports[\"default\"] = (0, _awaitify2.default)(eachLimit, 3);\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/forEach.js?");
|
|
9067
9179
|
|
|
9068
9180
|
/***/ }),
|
|
9069
9181
|
|
|
@@ -9074,7 +9186,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
9074
9186
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9075
9187
|
|
|
9076
9188
|
"use strict";
|
|
9077
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = asyncEachOfLimit;\n\nvar _breakLoop = __webpack_require__(/*! ./breakLoop */ \"./node_modules/async/internal/breakLoop.js\");\n\nvar _breakLoop2 = _interopRequireDefault(_breakLoop);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// for async generators\nfunction asyncEachOfLimit(generator, limit, iteratee, callback) {\n let done = false;\n let canceled = false;\n let awaiting = false;\n let running = 0;\n let idx = 0;\n\n function replenish() {\n //console.log('replenish')\n if (running >= limit || awaiting || done) return;\n //console.log('replenish awaiting')\n awaiting = true;\n generator.next().then(({ value, done: iterDone }) => {\n //console.log('got value', value)\n if (canceled || done) return;\n awaiting = false;\n if (iterDone) {\n done = true;\n if (running <= 0) {\n //console.log('done nextCb')\n callback(null);\n }\n return;\n }\n running++;\n iteratee(value, idx, iterateeCallback);\n idx++;\n replenish();\n }).catch(handleError);\n }\n\n function iterateeCallback(err, result) {\n //console.log('iterateeCallback')\n running -= 1;\n if (canceled) return;\n if (err) return handleError(err);\n\n if (err === false) {\n done = true;\n canceled = true;\n return;\n }\n\n if (result === _breakLoop2.default || done && running <= 0) {\n done = true;\n //console.log('done iterCb')\n return callback(null);\n }\n replenish();\n }\n\n function handleError(err) {\n if (canceled) return;\n awaiting = false;\n done = true;\n callback(err);\n }\n\n replenish();\n}\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/asyncEachOfLimit.js?");
|
|
9189
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = asyncEachOfLimit;\n\nvar _breakLoop = __webpack_require__(/*! ./breakLoop.js */ \"./node_modules/async/internal/breakLoop.js\");\n\nvar _breakLoop2 = _interopRequireDefault(_breakLoop);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// for async generators\nfunction asyncEachOfLimit(generator, limit, iteratee, callback) {\n let done = false;\n let canceled = false;\n let awaiting = false;\n let running = 0;\n let idx = 0;\n\n function replenish() {\n //console.log('replenish')\n if (running >= limit || awaiting || done) return;\n //console.log('replenish awaiting')\n awaiting = true;\n generator.next().then(({ value, done: iterDone }) => {\n //console.log('got value', value)\n if (canceled || done) return;\n awaiting = false;\n if (iterDone) {\n done = true;\n if (running <= 0) {\n //console.log('done nextCb')\n callback(null);\n }\n return;\n }\n running++;\n iteratee(value, idx, iterateeCallback);\n idx++;\n replenish();\n }).catch(handleError);\n }\n\n function iterateeCallback(err, result) {\n //console.log('iterateeCallback')\n running -= 1;\n if (canceled) return;\n if (err) return handleError(err);\n\n if (err === false) {\n done = true;\n canceled = true;\n return;\n }\n\n if (result === _breakLoop2.default || done && running <= 0) {\n done = true;\n //console.log('done iterCb')\n return callback(null);\n }\n replenish();\n }\n\n function handleError(err) {\n if (canceled) return;\n awaiting = false;\n done = true;\n callback(err);\n }\n\n replenish();\n}\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/asyncEachOfLimit.js?");
|
|
9078
9190
|
|
|
9079
9191
|
/***/ }),
|
|
9080
9192
|
|
|
@@ -9107,7 +9219,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));
|
|
|
9107
9219
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9108
9220
|
|
|
9109
9221
|
"use strict";
|
|
9110
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _once = __webpack_require__(/*! ./once */ \"./node_modules/async/internal/once.js\");\n\nvar _once2 = _interopRequireDefault(_once);\n\nvar _iterator = __webpack_require__(/*! ./iterator */ \"./node_modules/async/internal/iterator.js\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _onlyOnce = __webpack_require__(/*! ./onlyOnce */ \"./node_modules/async/internal/onlyOnce.js\");\n\nvar _onlyOnce2 = _interopRequireDefault(_onlyOnce);\n\nvar _wrapAsync = __webpack_require__(/*! ./wrapAsync */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _asyncEachOfLimit = __webpack_require__(/*! ./asyncEachOfLimit */ \"./node_modules/async/internal/asyncEachOfLimit.js\");\n\nvar _asyncEachOfLimit2 = _interopRequireDefault(_asyncEachOfLimit);\n\nvar _breakLoop = __webpack_require__(/*! ./breakLoop */ \"./node_modules/async/internal/breakLoop.js\");\n\nvar _breakLoop2 = _interopRequireDefault(_breakLoop);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports[\"default\"] = limit => {\n return (obj, iteratee, callback) => {\n callback = (0, _once2.default)(callback);\n if (limit <= 0) {\n throw new RangeError('concurrency limit cannot be less than 1');\n }\n if (!obj) {\n return callback(null);\n }\n if ((0, _wrapAsync.isAsyncGenerator)(obj)) {\n return (0, _asyncEachOfLimit2.default)(obj, limit, iteratee, callback);\n }\n if ((0, _wrapAsync.isAsyncIterable)(obj)) {\n return (0, _asyncEachOfLimit2.default)(obj[Symbol.asyncIterator](), limit, iteratee, callback);\n }\n var nextElem = (0, _iterator2.default)(obj);\n var done = false;\n var canceled = false;\n var running = 0;\n var looping = false;\n\n function iterateeCallback(err, value) {\n if (canceled) return;\n running -= 1;\n if (err) {\n done = true;\n callback(err);\n } else if (err === false) {\n done = true;\n canceled = true;\n } else if (value === _breakLoop2.default || done && running <= 0) {\n done = true;\n return callback(null);\n } else if (!looping) {\n replenish();\n }\n }\n\n function replenish() {\n looping = true;\n while (running < limit && !done) {\n var elem = nextElem();\n if (elem === null) {\n done = true;\n if (running <= 0) {\n callback(null);\n }\n return;\n }\n running += 1;\n iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback));\n }\n looping = false;\n }\n\n replenish();\n };\n};\n\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/eachOfLimit.js?");
|
|
9222
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _once = __webpack_require__(/*! ./once.js */ \"./node_modules/async/internal/once.js\");\n\nvar _once2 = _interopRequireDefault(_once);\n\nvar _iterator = __webpack_require__(/*! ./iterator.js */ \"./node_modules/async/internal/iterator.js\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _onlyOnce = __webpack_require__(/*! ./onlyOnce.js */ \"./node_modules/async/internal/onlyOnce.js\");\n\nvar _onlyOnce2 = _interopRequireDefault(_onlyOnce);\n\nvar _wrapAsync = __webpack_require__(/*! ./wrapAsync.js */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _asyncEachOfLimit = __webpack_require__(/*! ./asyncEachOfLimit.js */ \"./node_modules/async/internal/asyncEachOfLimit.js\");\n\nvar _asyncEachOfLimit2 = _interopRequireDefault(_asyncEachOfLimit);\n\nvar _breakLoop = __webpack_require__(/*! ./breakLoop.js */ \"./node_modules/async/internal/breakLoop.js\");\n\nvar _breakLoop2 = _interopRequireDefault(_breakLoop);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports[\"default\"] = limit => {\n return (obj, iteratee, callback) => {\n callback = (0, _once2.default)(callback);\n if (limit <= 0) {\n throw new RangeError('concurrency limit cannot be less than 1');\n }\n if (!obj) {\n return callback(null);\n }\n if ((0, _wrapAsync.isAsyncGenerator)(obj)) {\n return (0, _asyncEachOfLimit2.default)(obj, limit, iteratee, callback);\n }\n if ((0, _wrapAsync.isAsyncIterable)(obj)) {\n return (0, _asyncEachOfLimit2.default)(obj[Symbol.asyncIterator](), limit, iteratee, callback);\n }\n var nextElem = (0, _iterator2.default)(obj);\n var done = false;\n var canceled = false;\n var running = 0;\n var looping = false;\n\n function iterateeCallback(err, value) {\n if (canceled) return;\n running -= 1;\n if (err) {\n done = true;\n callback(err);\n } else if (err === false) {\n done = true;\n canceled = true;\n } else if (value === _breakLoop2.default || done && running <= 0) {\n done = true;\n return callback(null);\n } else if (!looping) {\n replenish();\n }\n }\n\n function replenish() {\n looping = true;\n while (running < limit && !done) {\n var elem = nextElem();\n if (elem === null) {\n done = true;\n if (running <= 0) {\n callback(null);\n }\n return;\n }\n running += 1;\n iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback));\n }\n looping = false;\n }\n\n replenish();\n };\n};\n\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/eachOfLimit.js?");
|
|
9111
9223
|
|
|
9112
9224
|
/***/ }),
|
|
9113
9225
|
|
|
@@ -9151,7 +9263,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})
|
|
|
9151
9263
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9152
9264
|
|
|
9153
9265
|
"use strict";
|
|
9154
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = createIterator;\n\nvar _isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/async/internal/isArrayLike.js\");\n\nvar _isArrayLike2 = _interopRequireDefault(_isArrayLike);\n\nvar _getIterator = __webpack_require__(/*! ./getIterator */ \"./node_modules/async/internal/getIterator.js\");\n\nvar _getIterator2 = _interopRequireDefault(_getIterator);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createArrayIterator(coll) {\n var i = -1;\n var len = coll.length;\n return function next() {\n return ++i < len ? { value: coll[i], key: i } : null;\n };\n}\n\nfunction createES2015Iterator(iterator) {\n var i = -1;\n return function next() {\n var item = iterator.next();\n if (item.done) return null;\n i++;\n return { value: item.value, key: i };\n };\n}\n\nfunction createObjectIterator(obj) {\n var okeys = obj ? Object.keys(obj) : [];\n var i = -1;\n var len = okeys.length;\n return function next() {\n var key = okeys[++i];\n return i < len ? { value: obj[key], key } : null;\n };\n}\n\nfunction createIterator(coll) {\n if ((0, _isArrayLike2.default)(coll)) {\n return createArrayIterator(coll);\n }\n\n var iterator = (0, _getIterator2.default)(coll);\n return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);\n}\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/iterator.js?");
|
|
9266
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = createIterator;\n\nvar _isArrayLike = __webpack_require__(/*! ./isArrayLike.js */ \"./node_modules/async/internal/isArrayLike.js\");\n\nvar _isArrayLike2 = _interopRequireDefault(_isArrayLike);\n\nvar _getIterator = __webpack_require__(/*! ./getIterator.js */ \"./node_modules/async/internal/getIterator.js\");\n\nvar _getIterator2 = _interopRequireDefault(_getIterator);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createArrayIterator(coll) {\n var i = -1;\n var len = coll.length;\n return function next() {\n return ++i < len ? { value: coll[i], key: i } : null;\n };\n}\n\nfunction createES2015Iterator(iterator) {\n var i = -1;\n return function next() {\n var item = iterator.next();\n if (item.done) return null;\n i++;\n return { value: item.value, key: i };\n };\n}\n\nfunction createObjectIterator(obj) {\n var okeys = obj ? Object.keys(obj) : [];\n var i = -1;\n var len = okeys.length;\n return function next() {\n var key = okeys[++i];\n if (key === '__proto__') {\n return next();\n }\n return i < len ? { value: obj[key], key } : null;\n };\n}\n\nfunction createIterator(coll) {\n if ((0, _isArrayLike2.default)(coll)) {\n return createArrayIterator(coll);\n }\n\n var iterator = (0, _getIterator2.default)(coll);\n return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);\n}\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/iterator.js?");
|
|
9155
9267
|
|
|
9156
9268
|
/***/ }),
|
|
9157
9269
|
|
|
@@ -9184,7 +9296,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})
|
|
|
9184
9296
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9185
9297
|
|
|
9186
9298
|
"use strict";
|
|
9187
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _isArrayLike = __webpack_require__(/*! ./isArrayLike */ \"./node_modules/async/internal/isArrayLike.js\");\n\nvar _isArrayLike2 = _interopRequireDefault(_isArrayLike);\n\nvar _wrapAsync = __webpack_require__(/*! ./wrapAsync */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nvar _awaitify = __webpack_require__(/*! ./awaitify */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports[\"default\"] = (0, _awaitify2.default)((eachfn, tasks, callback) => {\n var results = (0, _isArrayLike2.default)(tasks) ? [] : {};\n\n eachfn(tasks, (task, key, taskCb) => {\n (0, _wrapAsync2.default)(task)((err, ...result) => {\n if (result.length < 2) {\n [result] = result;\n }\n results[key] = result;\n taskCb(err);\n });\n }, err => callback(err, results));\n}, 3);\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/parallel.js?");
|
|
9299
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\nvar _isArrayLike = __webpack_require__(/*! ./isArrayLike.js */ \"./node_modules/async/internal/isArrayLike.js\");\n\nvar _isArrayLike2 = _interopRequireDefault(_isArrayLike);\n\nvar _wrapAsync = __webpack_require__(/*! ./wrapAsync.js */ \"./node_modules/async/internal/wrapAsync.js\");\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nvar _awaitify = __webpack_require__(/*! ./awaitify.js */ \"./node_modules/async/internal/awaitify.js\");\n\nvar _awaitify2 = _interopRequireDefault(_awaitify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports[\"default\"] = (0, _awaitify2.default)((eachfn, tasks, callback) => {\n var results = (0, _isArrayLike2.default)(tasks) ? [] : {};\n\n eachfn(tasks, (task, key, taskCb) => {\n (0, _wrapAsync2.default)(task)((err, ...result) => {\n if (result.length < 2) {\n [result] = result;\n }\n results[key] = result;\n taskCb(err);\n });\n }, err => callback(err, results));\n}, 3);\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/parallel.js?");
|
|
9188
9300
|
|
|
9189
9301
|
/***/ }),
|
|
9190
9302
|
|
|
@@ -9195,7 +9307,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})
|
|
|
9195
9307
|
/***/ ((__unused_webpack_module, exports) => {
|
|
9196
9308
|
|
|
9197
9309
|
"use strict";
|
|
9198
|
-
eval("\n
|
|
9310
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.fallback = fallback;\nexports.wrap = wrap;\n/* istanbul ignore file */\n\nvar hasQueueMicrotask = exports.hasQueueMicrotask = typeof queueMicrotask === 'function' && queueMicrotask;\nvar hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate;\nvar hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';\n\nfunction fallback(fn) {\n setTimeout(fn, 0);\n}\n\nfunction wrap(defer) {\n return (fn, ...args) => defer(() => fn(...args));\n}\n\nvar _defer;\n\nif (hasQueueMicrotask) {\n _defer = queueMicrotask;\n} else if (hasSetImmediate) {\n _defer = setImmediate;\n} else if (hasNextTick) {\n _defer = process.nextTick;\n} else {\n _defer = fallback;\n}\n\nexports[\"default\"] = wrap(_defer);\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/setImmediate.js?");
|
|
9199
9311
|
|
|
9200
9312
|
/***/ }),
|
|
9201
9313
|
|
|
@@ -9217,7 +9329,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})
|
|
|
9217
9329
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9218
9330
|
|
|
9219
9331
|
"use strict";
|
|
9220
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.isAsyncIterable = exports.isAsyncGenerator = exports.isAsync = undefined;\n\nvar _asyncify = __webpack_require__(/*! ../asyncify */ \"./node_modules/async/asyncify.js\");\n\nvar _asyncify2 = _interopRequireDefault(_asyncify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction isAsync(fn) {\n return fn[Symbol.toStringTag] === 'AsyncFunction';\n}\n\nfunction isAsyncGenerator(fn) {\n return fn[Symbol.toStringTag] === 'AsyncGenerator';\n}\n\nfunction isAsyncIterable(obj) {\n return typeof obj[Symbol.asyncIterator] === 'function';\n}\n\nfunction wrapAsync(asyncFn) {\n if (typeof asyncFn !== 'function') throw new Error('expected a function');\n return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn;\n}\n\nexports[\"default\"] = wrapAsync;\nexports.isAsync = isAsync;\nexports.isAsyncGenerator = isAsyncGenerator;\nexports.isAsyncIterable = isAsyncIterable;\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/wrapAsync.js?");
|
|
9332
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.isAsyncIterable = exports.isAsyncGenerator = exports.isAsync = undefined;\n\nvar _asyncify = __webpack_require__(/*! ../asyncify.js */ \"./node_modules/async/asyncify.js\");\n\nvar _asyncify2 = _interopRequireDefault(_asyncify);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction isAsync(fn) {\n return fn[Symbol.toStringTag] === 'AsyncFunction';\n}\n\nfunction isAsyncGenerator(fn) {\n return fn[Symbol.toStringTag] === 'AsyncGenerator';\n}\n\nfunction isAsyncIterable(obj) {\n return typeof obj[Symbol.asyncIterator] === 'function';\n}\n\nfunction wrapAsync(asyncFn) {\n if (typeof asyncFn !== 'function') throw new Error('expected a function');\n return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn;\n}\n\nexports[\"default\"] = wrapAsync;\nexports.isAsync = isAsync;\nexports.isAsyncGenerator = isAsyncGenerator;\nexports.isAsyncIterable = isAsyncIterable;\n\n//# sourceURL=webpack://open-lens/./node_modules/async/internal/wrapAsync.js?");
|
|
9221
9333
|
|
|
9222
9334
|
/***/ }),
|
|
9223
9335
|
|
|
@@ -9228,7 +9340,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})
|
|
|
9228
9340
|
/***/ ((module, exports, __webpack_require__) => {
|
|
9229
9341
|
|
|
9230
9342
|
"use strict";
|
|
9231
|
-
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = series;\n\nvar _parallel2 = __webpack_require__(/*! ./internal/parallel */ \"./node_modules/async/internal/parallel.js\");\n\nvar _parallel3 = _interopRequireDefault(_parallel2);\n\nvar _eachOfSeries = __webpack_require__(/*! ./eachOfSeries */ \"./node_modules/async/eachOfSeries.js\");\n\nvar _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Run the functions in the `tasks` collection in series, each one running once\n * the previous function has completed. If any functions in the series pass an\n * error to its callback, no more functions are run, and `callback` is\n * immediately called with the value of the error. Otherwise, `callback`\n * receives an array of results when `tasks` have completed.\n *\n * It is also possible to use an object instead of an array. Each property will\n * be run as a function, and the results will be passed to the final `callback`\n * as an object instead of an array. This can be a more readable way of handling\n * results from {@link async.series}.\n *\n * **Note** that while many implementations preserve the order of object\n * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)\n * explicitly states that\n *\n * > The mechanics and order of enumerating the properties is not specified.\n *\n * So if you rely on the order in which your series of functions are executed,\n * and want this to work on all platforms, consider using an array.\n *\n * @name series\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @category Control Flow\n * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing\n * [async functions]{@link AsyncFunction} to run in series.\n * Each function can complete with any number of optional `result` values.\n * @param {Function} [callback] - An optional callback to run once all the\n * functions have completed. This function gets a results array (or object)\n * containing all the result arguments passed to the `task` callbacks. Invoked\n * with (err, result).\n * @return {Promise} a promise, if no callback is passed\n * @example\n * async.series([\n * function(callback) {\n * // do some
|
|
9343
|
+
eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = series;\n\nvar _parallel2 = __webpack_require__(/*! ./internal/parallel.js */ \"./node_modules/async/internal/parallel.js\");\n\nvar _parallel3 = _interopRequireDefault(_parallel2);\n\nvar _eachOfSeries = __webpack_require__(/*! ./eachOfSeries.js */ \"./node_modules/async/eachOfSeries.js\");\n\nvar _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Run the functions in the `tasks` collection in series, each one running once\n * the previous function has completed. If any functions in the series pass an\n * error to its callback, no more functions are run, and `callback` is\n * immediately called with the value of the error. Otherwise, `callback`\n * receives an array of results when `tasks` have completed.\n *\n * It is also possible to use an object instead of an array. Each property will\n * be run as a function, and the results will be passed to the final `callback`\n * as an object instead of an array. This can be a more readable way of handling\n * results from {@link async.series}.\n *\n * **Note** that while many implementations preserve the order of object\n * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6)\n * explicitly states that\n *\n * > The mechanics and order of enumerating the properties is not specified.\n *\n * So if you rely on the order in which your series of functions are executed,\n * and want this to work on all platforms, consider using an array.\n *\n * @name series\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @category Control Flow\n * @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing\n * [async functions]{@link AsyncFunction} to run in series.\n * Each function can complete with any number of optional `result` values.\n * @param {Function} [callback] - An optional callback to run once all the\n * functions have completed. This function gets a results array (or object)\n * containing all the result arguments passed to the `task` callbacks. Invoked\n * with (err, result).\n * @return {Promise} a promise, if no callback is passed\n * @example\n *\n * //Using Callbacks\n * async.series([\n * function(callback) {\n * setTimeout(function() {\n * // do some async task\n * callback(null, 'one');\n * }, 200);\n * },\n * function(callback) {\n * setTimeout(function() {\n * // then do another async task\n * callback(null, 'two');\n * }, 100);\n * }\n * ], function(err, results) {\n * console.log(results);\n * // results is equal to ['one','two']\n * });\n *\n * // an example using objects instead of arrays\n * async.series({\n * one: function(callback) {\n * setTimeout(function() {\n * // do some async task\n * callback(null, 1);\n * }, 200);\n * },\n * two: function(callback) {\n * setTimeout(function() {\n * // then do another async task\n * callback(null, 2);\n * }, 100);\n * }\n * }, function(err, results) {\n * console.log(results);\n * // results is equal to: { one: 1, two: 2 }\n * });\n *\n * //Using Promises\n * async.series([\n * function(callback) {\n * setTimeout(function() {\n * callback(null, 'one');\n * }, 200);\n * },\n * function(callback) {\n * setTimeout(function() {\n * callback(null, 'two');\n * }, 100);\n * }\n * ]).then(results => {\n * console.log(results);\n * // results is equal to ['one','two']\n * }).catch(err => {\n * console.log(err);\n * });\n *\n * // an example using an object instead of an array\n * async.series({\n * one: function(callback) {\n * setTimeout(function() {\n * // do some async task\n * callback(null, 1);\n * }, 200);\n * },\n * two: function(callback) {\n * setTimeout(function() {\n * // then do another async task\n * callback(null, 2);\n * }, 100);\n * }\n * }).then(results => {\n * console.log(results);\n * // results is equal to: { one: 1, two: 2 }\n * }).catch(err => {\n * console.log(err);\n * });\n *\n * //Using async/await\n * async () => {\n * try {\n * let results = await async.series([\n * function(callback) {\n * setTimeout(function() {\n * // do some async task\n * callback(null, 'one');\n * }, 200);\n * },\n * function(callback) {\n * setTimeout(function() {\n * // then do another async task\n * callback(null, 'two');\n * }, 100);\n * }\n * ]);\n * console.log(results);\n * // results is equal to ['one','two']\n * }\n * catch (err) {\n * console.log(err);\n * }\n * }\n *\n * // an example using an object instead of an array\n * async () => {\n * try {\n * let results = await async.parallel({\n * one: function(callback) {\n * setTimeout(function() {\n * // do some async task\n * callback(null, 1);\n * }, 200);\n * },\n * two: function(callback) {\n * setTimeout(function() {\n * // then do another async task\n * callback(null, 2);\n * }, 100);\n * }\n * });\n * console.log(results);\n * // results is equal to: { one: 1, two: 2 }\n * }\n * catch (err) {\n * console.log(err);\n * }\n * }\n *\n */\nfunction series(tasks, callback) {\n return (0, _parallel3.default)(_eachOfSeries2.default, tasks, callback);\n}\nmodule.exports = exports['default'];\n\n//# sourceURL=webpack://open-lens/./node_modules/async/series.js?");
|
|
9232
9344
|
|
|
9233
9345
|
/***/ }),
|
|
9234
9346
|
|
|
@@ -12131,17 +12243,6 @@ eval("/**\n * @author Toru Nagashima <https://github.com/mysticatea>\n * @copyri
|
|
|
12131
12243
|
|
|
12132
12244
|
/***/ }),
|
|
12133
12245
|
|
|
12134
|
-
/***/ "./node_modules/eventemitter3/index.js":
|
|
12135
|
-
/*!*********************************************!*\
|
|
12136
|
-
!*** ./node_modules/eventemitter3/index.js ***!
|
|
12137
|
-
\*********************************************/
|
|
12138
|
-
/***/ ((module) => {
|
|
12139
|
-
|
|
12140
|
-
"use strict";
|
|
12141
|
-
eval("\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif (true) {\n module.exports = EventEmitter;\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/eventemitter3/index.js?");
|
|
12142
|
-
|
|
12143
|
-
/***/ }),
|
|
12144
|
-
|
|
12145
12246
|
/***/ "./node_modules/extend/index.js":
|
|
12146
12247
|
/*!**************************************!*\
|
|
12147
12248
|
!*** ./node_modules/extend/index.js ***!
|
|
@@ -12526,16 +12627,6 @@ eval("\n\nmodule.exports = function (data, opts) {\n if (!opts) opts = {};\n
|
|
|
12526
12627
|
|
|
12527
12628
|
/***/ }),
|
|
12528
12629
|
|
|
12529
|
-
/***/ "./node_modules/fast-safe-stringify/index.js":
|
|
12530
|
-
/*!***************************************************!*\
|
|
12531
|
-
!*** ./node_modules/fast-safe-stringify/index.js ***!
|
|
12532
|
-
\***************************************************/
|
|
12533
|
-
/***/ ((module) => {
|
|
12534
|
-
|
|
12535
|
-
eval("module.exports = stringify\nstringify.default = stringify\nstringify.stable = deterministicStringify\nstringify.stableStringify = deterministicStringify\n\nvar arr = []\nvar replacerStack = []\n\n// Regular stringify\nfunction stringify (obj, replacer, spacer) {\n decirc(obj, '', [], undefined)\n var res\n if (replacerStack.length === 0) {\n res = JSON.stringify(obj, replacer, spacer)\n } else {\n res = JSON.stringify(obj, replaceGetterValues(replacer), spacer)\n }\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n return res\n}\nfunction decirc (val, k, stack, parent) {\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k)\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: '[Circular]' })\n arr.push([parent, k, val, propertyDescriptor])\n } else {\n replacerStack.push([val, k])\n }\n } else {\n parent[k] = '[Circular]'\n arr.push([parent, k, val])\n }\n return\n }\n }\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n decirc(val[i], i, stack, val)\n }\n } else {\n var keys = Object.keys(val)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n decirc(val[key], key, stack, val)\n }\n }\n stack.pop()\n }\n}\n\n// Stable-stringify\nfunction compareFunction (a, b) {\n if (a < b) {\n return -1\n }\n if (a > b) {\n return 1\n }\n return 0\n}\n\nfunction deterministicStringify (obj, replacer, spacer) {\n var tmp = deterministicDecirc(obj, '', [], undefined) || obj\n var res\n if (replacerStack.length === 0) {\n res = JSON.stringify(tmp, replacer, spacer)\n } else {\n res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer)\n }\n while (arr.length !== 0) {\n var part = arr.pop()\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3])\n } else {\n part[0][part[1]] = part[2]\n }\n }\n return res\n}\n\nfunction deterministicDecirc (val, k, stack, parent) {\n var i\n if (typeof val === 'object' && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k)\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: '[Circular]' })\n arr.push([parent, k, val, propertyDescriptor])\n } else {\n replacerStack.push([val, k])\n }\n } else {\n parent[k] = '[Circular]'\n arr.push([parent, k, val])\n }\n return\n }\n }\n if (typeof val.toJSON === 'function') {\n return\n }\n stack.push(val)\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n deterministicDecirc(val[i], i, stack, val)\n }\n } else {\n // Create a temporary object in the required way\n var tmp = {}\n var keys = Object.keys(val).sort(compareFunction)\n for (i = 0; i < keys.length; i++) {\n var key = keys[i]\n deterministicDecirc(val[key], key, stack, val)\n tmp[key] = val[key]\n }\n if (parent !== undefined) {\n arr.push([parent, k, val])\n parent[k] = tmp\n } else {\n return tmp\n }\n }\n stack.pop()\n }\n}\n\n// wraps replacer function to handle values we couldn't replace\n// and mark them as [Circular]\nfunction replaceGetterValues (replacer) {\n replacer = replacer !== undefined ? replacer : function (k, v) { return v }\n return function (key, val) {\n if (replacerStack.length > 0) {\n for (var i = 0; i < replacerStack.length; i++) {\n var part = replacerStack[i]\n if (part[1] === key && part[0] === val) {\n val = '[Circular]'\n replacerStack.splice(i, 1)\n break\n }\n }\n }\n return replacer.call(this, key, val)\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/fast-safe-stringify/index.js?");
|
|
12536
|
-
|
|
12537
|
-
/***/ }),
|
|
12538
|
-
|
|
12539
12630
|
/***/ "./node_modules/fastq/queue.js":
|
|
12540
12631
|
/*!*************************************!*\
|
|
12541
12632
|
!*** ./node_modules/fastq/queue.js ***!
|
|
@@ -12580,26 +12671,6 @@ eval("\n\nvar toString = Object.prototype.toString;\n\n/**\n * Extract names fro
|
|
|
12580
12671
|
|
|
12581
12672
|
/***/ }),
|
|
12582
12673
|
|
|
12583
|
-
/***/ "./node_modules/follow-redirects/debug.js":
|
|
12584
|
-
/*!************************************************!*\
|
|
12585
|
-
!*** ./node_modules/follow-redirects/debug.js ***!
|
|
12586
|
-
\************************************************/
|
|
12587
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12588
|
-
|
|
12589
|
-
eval("var debug;\n\nmodule.exports = function () {\n if (!debug) {\n try {\n /* eslint global-require: off */\n debug = __webpack_require__(/*! debug */ \"./node_modules/debug/src/browser.js\")(\"follow-redirects\");\n }\n catch (error) { /* */ }\n if (typeof debug !== \"function\") {\n debug = function () { /* */ };\n }\n }\n debug.apply(null, arguments);\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/follow-redirects/debug.js?");
|
|
12590
|
-
|
|
12591
|
-
/***/ }),
|
|
12592
|
-
|
|
12593
|
-
/***/ "./node_modules/follow-redirects/index.js":
|
|
12594
|
-
/*!************************************************!*\
|
|
12595
|
-
!*** ./node_modules/follow-redirects/index.js ***!
|
|
12596
|
-
\************************************************/
|
|
12597
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12598
|
-
|
|
12599
|
-
eval("var url = __webpack_require__(/*! url */ \"url\");\nvar URL = url.URL;\nvar http = __webpack_require__(/*! http */ \"http\");\nvar https = __webpack_require__(/*! https */ \"https\");\nvar Writable = (__webpack_require__(/*! stream */ \"stream\").Writable);\nvar assert = __webpack_require__(/*! assert */ \"assert\");\nvar debug = __webpack_require__(/*! ./debug */ \"./node_modules/follow-redirects/debug.js\");\n\n// Create handlers that pass events from native requests\nvar events = [\"abort\", \"aborted\", \"connect\", \"error\", \"socket\", \"timeout\"];\nvar eventHandlers = Object.create(null);\nevents.forEach(function (event) {\n eventHandlers[event] = function (arg1, arg2, arg3) {\n this._redirectable.emit(event, arg1, arg2, arg3);\n };\n});\n\n// Error types with codes\nvar RedirectionError = createErrorType(\n \"ERR_FR_REDIRECTION_FAILURE\",\n \"Redirected request failed\"\n);\nvar TooManyRedirectsError = createErrorType(\n \"ERR_FR_TOO_MANY_REDIRECTS\",\n \"Maximum number of redirects exceeded\"\n);\nvar MaxBodyLengthExceededError = createErrorType(\n \"ERR_FR_MAX_BODY_LENGTH_EXCEEDED\",\n \"Request body larger than maxBodyLength limit\"\n);\nvar WriteAfterEndError = createErrorType(\n \"ERR_STREAM_WRITE_AFTER_END\",\n \"write after end\"\n);\n\n// An HTTP(S) request that can be redirected\nfunction RedirectableRequest(options, responseCallback) {\n // Initialize the request\n Writable.call(this);\n this._sanitizeOptions(options);\n this._options = options;\n this._ended = false;\n this._ending = false;\n this._redirectCount = 0;\n this._redirects = [];\n this._requestBodyLength = 0;\n this._requestBodyBuffers = [];\n\n // Attach a callback if passed\n if (responseCallback) {\n this.on(\"response\", responseCallback);\n }\n\n // React to responses of native requests\n var self = this;\n this._onNativeResponse = function (response) {\n self._processResponse(response);\n };\n\n // Perform the first request\n this._performRequest();\n}\nRedirectableRequest.prototype = Object.create(Writable.prototype);\n\nRedirectableRequest.prototype.abort = function () {\n abortRequest(this._currentRequest);\n this.emit(\"abort\");\n};\n\n// Writes buffered data to the current native request\nRedirectableRequest.prototype.write = function (data, encoding, callback) {\n // Writing is not allowed if end has been called\n if (this._ending) {\n throw new WriteAfterEndError();\n }\n\n // Validate input and shift parameters if necessary\n if (!(typeof data === \"string\" || typeof data === \"object\" && (\"length\" in data))) {\n throw new TypeError(\"data should be a string, Buffer or Uint8Array\");\n }\n if (typeof encoding === \"function\") {\n callback = encoding;\n encoding = null;\n }\n\n // Ignore empty buffers, since writing them doesn't invoke the callback\n // https://github.com/nodejs/node/issues/22066\n if (data.length === 0) {\n if (callback) {\n callback();\n }\n return;\n }\n // Only write when we don't exceed the maximum body length\n if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {\n this._requestBodyLength += data.length;\n this._requestBodyBuffers.push({ data: data, encoding: encoding });\n this._currentRequest.write(data, encoding, callback);\n }\n // Error when we exceed the maximum body length\n else {\n this.emit(\"error\", new MaxBodyLengthExceededError());\n this.abort();\n }\n};\n\n// Ends the current native request\nRedirectableRequest.prototype.end = function (data, encoding, callback) {\n // Shift parameters if necessary\n if (typeof data === \"function\") {\n callback = data;\n data = encoding = null;\n }\n else if (typeof encoding === \"function\") {\n callback = encoding;\n encoding = null;\n }\n\n // Write data if needed and end\n if (!data) {\n this._ended = this._ending = true;\n this._currentRequest.end(null, null, callback);\n }\n else {\n var self = this;\n var currentRequest = this._currentRequest;\n this.write(data, encoding, function () {\n self._ended = true;\n currentRequest.end(null, null, callback);\n });\n this._ending = true;\n }\n};\n\n// Sets a header value on the current native request\nRedirectableRequest.prototype.setHeader = function (name, value) {\n this._options.headers[name] = value;\n this._currentRequest.setHeader(name, value);\n};\n\n// Clears a header value on the current native request\nRedirectableRequest.prototype.removeHeader = function (name) {\n delete this._options.headers[name];\n this._currentRequest.removeHeader(name);\n};\n\n// Global timeout for all underlying requests\nRedirectableRequest.prototype.setTimeout = function (msecs, callback) {\n var self = this;\n\n // Destroys the socket on timeout\n function destroyOnTimeout(socket) {\n socket.setTimeout(msecs);\n socket.removeListener(\"timeout\", socket.destroy);\n socket.addListener(\"timeout\", socket.destroy);\n }\n\n // Sets up a timer to trigger a timeout event\n function startTimer(socket) {\n if (self._timeout) {\n clearTimeout(self._timeout);\n }\n self._timeout = setTimeout(function () {\n self.emit(\"timeout\");\n clearTimer();\n }, msecs);\n destroyOnTimeout(socket);\n }\n\n // Stops a timeout from triggering\n function clearTimer() {\n // Clear the timeout\n if (self._timeout) {\n clearTimeout(self._timeout);\n self._timeout = null;\n }\n\n // Clean up all attached listeners\n self.removeListener(\"abort\", clearTimer);\n self.removeListener(\"error\", clearTimer);\n self.removeListener(\"response\", clearTimer);\n if (callback) {\n self.removeListener(\"timeout\", callback);\n }\n if (!self.socket) {\n self._currentRequest.removeListener(\"socket\", startTimer);\n }\n }\n\n // Attach callback if passed\n if (callback) {\n this.on(\"timeout\", callback);\n }\n\n // Start the timer if or when the socket is opened\n if (this.socket) {\n startTimer(this.socket);\n }\n else {\n this._currentRequest.once(\"socket\", startTimer);\n }\n\n // Clean up on events\n this.on(\"socket\", destroyOnTimeout);\n this.on(\"abort\", clearTimer);\n this.on(\"error\", clearTimer);\n this.on(\"response\", clearTimer);\n\n return this;\n};\n\n// Proxy all other public ClientRequest methods\n[\n \"flushHeaders\", \"getHeader\",\n \"setNoDelay\", \"setSocketKeepAlive\",\n].forEach(function (method) {\n RedirectableRequest.prototype[method] = function (a, b) {\n return this._currentRequest[method](a, b);\n };\n});\n\n// Proxy all public ClientRequest properties\n[\"aborted\", \"connection\", \"socket\"].forEach(function (property) {\n Object.defineProperty(RedirectableRequest.prototype, property, {\n get: function () { return this._currentRequest[property]; },\n });\n});\n\nRedirectableRequest.prototype._sanitizeOptions = function (options) {\n // Ensure headers are always present\n if (!options.headers) {\n options.headers = {};\n }\n\n // Since http.request treats host as an alias of hostname,\n // but the url module interprets host as hostname plus port,\n // eliminate the host property to avoid confusion.\n if (options.host) {\n // Use hostname if set, because it has precedence\n if (!options.hostname) {\n options.hostname = options.host;\n }\n delete options.host;\n }\n\n // Complete the URL object when necessary\n if (!options.pathname && options.path) {\n var searchPos = options.path.indexOf(\"?\");\n if (searchPos < 0) {\n options.pathname = options.path;\n }\n else {\n options.pathname = options.path.substring(0, searchPos);\n options.search = options.path.substring(searchPos);\n }\n }\n};\n\n\n// Executes the next native request (initial or redirect)\nRedirectableRequest.prototype._performRequest = function () {\n // Load the native protocol\n var protocol = this._options.protocol;\n var nativeProtocol = this._options.nativeProtocols[protocol];\n if (!nativeProtocol) {\n this.emit(\"error\", new TypeError(\"Unsupported protocol \" + protocol));\n return;\n }\n\n // If specified, use the agent corresponding to the protocol\n // (HTTP and HTTPS use different types of agents)\n if (this._options.agents) {\n var scheme = protocol.substr(0, protocol.length - 1);\n this._options.agent = this._options.agents[scheme];\n }\n\n // Create the native request\n var request = this._currentRequest =\n nativeProtocol.request(this._options, this._onNativeResponse);\n this._currentUrl = url.format(this._options);\n\n // Set up event handlers\n request._redirectable = this;\n for (var e = 0; e < events.length; e++) {\n request.on(events[e], eventHandlers[events[e]]);\n }\n\n // End a redirected request\n // (The first request must be ended explicitly with RedirectableRequest#end)\n if (this._isRedirect) {\n // Write the request entity and end.\n var i = 0;\n var self = this;\n var buffers = this._requestBodyBuffers;\n (function writeNext(error) {\n // Only write if this request has not been redirected yet\n /* istanbul ignore else */\n if (request === self._currentRequest) {\n // Report any write errors\n /* istanbul ignore if */\n if (error) {\n self.emit(\"error\", error);\n }\n // Write the next buffer if there are still left\n else if (i < buffers.length) {\n var buffer = buffers[i++];\n /* istanbul ignore else */\n if (!request.finished) {\n request.write(buffer.data, buffer.encoding, writeNext);\n }\n }\n // End the request if `end` has been called on us\n else if (self._ended) {\n request.end();\n }\n }\n }());\n }\n};\n\n// Processes a response from the current native request\nRedirectableRequest.prototype._processResponse = function (response) {\n // Store the redirected response\n var statusCode = response.statusCode;\n if (this._options.trackRedirects) {\n this._redirects.push({\n url: this._currentUrl,\n headers: response.headers,\n statusCode: statusCode,\n });\n }\n\n // RFC7231§6.4: The 3xx (Redirection) class of status code indicates\n // that further action needs to be taken by the user agent in order to\n // fulfill the request. If a Location header field is provided,\n // the user agent MAY automatically redirect its request to the URI\n // referenced by the Location field value,\n // even if the specific status code is not understood.\n var location = response.headers.location;\n if (location && this._options.followRedirects !== false &&\n statusCode >= 300 && statusCode < 400) {\n // Abort the current request\n abortRequest(this._currentRequest);\n // Discard the remainder of the response to avoid waiting for data\n response.destroy();\n\n // RFC7231§6.4: A client SHOULD detect and intervene\n // in cyclical redirections (i.e., \"infinite\" redirection loops).\n if (++this._redirectCount > this._options.maxRedirects) {\n this.emit(\"error\", new TooManyRedirectsError());\n return;\n }\n\n // RFC7231§6.4: Automatic redirection needs to done with\n // care for methods not known to be safe, […]\n // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change\n // the request method from POST to GET for the subsequent request.\n if ((statusCode === 301 || statusCode === 302) && this._options.method === \"POST\" ||\n // RFC7231§6.4.4: The 303 (See Other) status code indicates that\n // the server is redirecting the user agent to a different resource […]\n // A user agent can perform a retrieval request targeting that URI\n // (a GET or HEAD request if using HTTP) […]\n (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {\n this._options.method = \"GET\";\n // Drop a possible entity and headers related to it\n this._requestBodyBuffers = [];\n removeMatchingHeaders(/^content-/i, this._options.headers);\n }\n\n // Drop the Host header, as the redirect might lead to a different host\n var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);\n\n // If the redirect is relative, carry over the host of the last request\n var currentUrlParts = url.parse(this._currentUrl);\n var currentHost = currentHostHeader || currentUrlParts.host;\n var currentUrl = /^\\w+:/.test(location) ? this._currentUrl :\n url.format(Object.assign(currentUrlParts, { host: currentHost }));\n\n // Determine the URL of the redirection\n var redirectUrl;\n try {\n redirectUrl = url.resolve(currentUrl, location);\n }\n catch (cause) {\n this.emit(\"error\", new RedirectionError(cause));\n return;\n }\n\n // Create the redirected request\n debug(\"redirecting to\", redirectUrl);\n this._isRedirect = true;\n var redirectUrlParts = url.parse(redirectUrl);\n Object.assign(this._options, redirectUrlParts);\n\n // Drop the confidential headers when redirecting to another domain\n if (!(redirectUrlParts.host === currentHost || isSubdomainOf(redirectUrlParts.host, currentHost))) {\n removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);\n }\n\n // Evaluate the beforeRedirect callback\n if (typeof this._options.beforeRedirect === \"function\") {\n var responseDetails = { headers: response.headers };\n try {\n this._options.beforeRedirect.call(null, this._options, responseDetails);\n }\n catch (err) {\n this.emit(\"error\", err);\n return;\n }\n this._sanitizeOptions(this._options);\n }\n\n // Perform the redirected request\n try {\n this._performRequest();\n }\n catch (cause) {\n this.emit(\"error\", new RedirectionError(cause));\n }\n }\n else {\n // The response is not a redirect; return it as-is\n response.responseUrl = this._currentUrl;\n response.redirects = this._redirects;\n this.emit(\"response\", response);\n\n // Clean up\n this._requestBodyBuffers = [];\n }\n};\n\n// Wraps the key/value object of protocols with redirect functionality\nfunction wrap(protocols) {\n // Default settings\n var exports = {\n maxRedirects: 21,\n maxBodyLength: 10 * 1024 * 1024,\n };\n\n // Wrap each protocol\n var nativeProtocols = {};\n Object.keys(protocols).forEach(function (scheme) {\n var protocol = scheme + \":\";\n var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];\n var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);\n\n // Executes a request, following redirects\n function request(input, options, callback) {\n // Parse parameters\n if (typeof input === \"string\") {\n var urlStr = input;\n try {\n input = urlToOptions(new URL(urlStr));\n }\n catch (err) {\n /* istanbul ignore next */\n input = url.parse(urlStr);\n }\n }\n else if (URL && (input instanceof URL)) {\n input = urlToOptions(input);\n }\n else {\n callback = options;\n options = input;\n input = { protocol: protocol };\n }\n if (typeof options === \"function\") {\n callback = options;\n options = null;\n }\n\n // Set defaults\n options = Object.assign({\n maxRedirects: exports.maxRedirects,\n maxBodyLength: exports.maxBodyLength,\n }, input, options);\n options.nativeProtocols = nativeProtocols;\n\n assert.equal(options.protocol, protocol, \"protocol mismatch\");\n debug(\"options\", options);\n return new RedirectableRequest(options, callback);\n }\n\n // Executes a GET request, following redirects\n function get(input, options, callback) {\n var wrappedRequest = wrappedProtocol.request(input, options, callback);\n wrappedRequest.end();\n return wrappedRequest;\n }\n\n // Expose the properties on the wrapped protocol\n Object.defineProperties(wrappedProtocol, {\n request: { value: request, configurable: true, enumerable: true, writable: true },\n get: { value: get, configurable: true, enumerable: true, writable: true },\n });\n });\n return exports;\n}\n\n/* istanbul ignore next */\nfunction noop() { /* empty */ }\n\n// from https://github.com/nodejs/node/blob/master/lib/internal/url.js\nfunction urlToOptions(urlObject) {\n var options = {\n protocol: urlObject.protocol,\n hostname: urlObject.hostname.startsWith(\"[\") ?\n /* istanbul ignore next */\n urlObject.hostname.slice(1, -1) :\n urlObject.hostname,\n hash: urlObject.hash,\n search: urlObject.search,\n pathname: urlObject.pathname,\n path: urlObject.pathname + urlObject.search,\n href: urlObject.href,\n };\n if (urlObject.port !== \"\") {\n options.port = Number(urlObject.port);\n }\n return options;\n}\n\nfunction removeMatchingHeaders(regex, headers) {\n var lastValue;\n for (var header in headers) {\n if (regex.test(header)) {\n lastValue = headers[header];\n delete headers[header];\n }\n }\n return (lastValue === null || typeof lastValue === \"undefined\") ?\n undefined : String(lastValue).trim();\n}\n\nfunction createErrorType(code, defaultMessage) {\n function CustomError(cause) {\n Error.captureStackTrace(this, this.constructor);\n if (!cause) {\n this.message = defaultMessage;\n }\n else {\n this.message = defaultMessage + \": \" + cause.message;\n this.cause = cause;\n }\n }\n CustomError.prototype = new Error();\n CustomError.prototype.constructor = CustomError;\n CustomError.prototype.name = \"Error [\" + code + \"]\";\n CustomError.prototype.code = code;\n return CustomError;\n}\n\nfunction abortRequest(request) {\n for (var e = 0; e < events.length; e++) {\n request.removeListener(events[e], eventHandlers[events[e]]);\n }\n request.on(\"error\", noop);\n request.abort();\n}\n\nfunction isSubdomainOf(subdomain, domain) {\n const dot = subdomain.length - domain.length - 1;\n return dot > 0 && subdomain[dot] === \".\" && subdomain.endsWith(domain);\n}\n\n// Exports\nmodule.exports = wrap({ http: http, https: https });\nmodule.exports.wrap = wrap;\n\n\n//# sourceURL=webpack://open-lens/./node_modules/follow-redirects/index.js?");
|
|
12600
|
-
|
|
12601
|
-
/***/ }),
|
|
12602
|
-
|
|
12603
12674
|
/***/ "./node_modules/forever-agent/index.js":
|
|
12604
12675
|
/*!*********************************************!*\
|
|
12605
12676
|
!*** ./node_modules/forever-agent/index.js ***!
|
|
@@ -14055,76 +14126,6 @@ eval("var assert = __webpack_require__(/*! assert */ \"assert\");\nvar util = __
|
|
|
14055
14126
|
|
|
14056
14127
|
/***/ }),
|
|
14057
14128
|
|
|
14058
|
-
/***/ "./node_modules/http-proxy/index.js":
|
|
14059
|
-
/*!******************************************!*\
|
|
14060
|
-
!*** ./node_modules/http-proxy/index.js ***!
|
|
14061
|
-
\******************************************/
|
|
14062
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14063
|
-
|
|
14064
|
-
eval("/*!\n * Caron dimonio, con occhi di bragia\n * loro accennando, tutte le raccoglie;\n * batte col remo qualunque s’adagia \n *\n * Charon the demon, with the eyes of glede,\n * Beckoning to them, collects them all together,\n * Beats with his oar whoever lags behind\n * \n * Dante - The Divine Comedy (Canto III)\n */\n\nmodule.exports = __webpack_require__(/*! ./lib/http-proxy */ \"./node_modules/http-proxy/lib/http-proxy.js\");\n\n//# sourceURL=webpack://open-lens/./node_modules/http-proxy/index.js?");
|
|
14065
|
-
|
|
14066
|
-
/***/ }),
|
|
14067
|
-
|
|
14068
|
-
/***/ "./node_modules/http-proxy/lib/http-proxy.js":
|
|
14069
|
-
/*!***************************************************!*\
|
|
14070
|
-
!*** ./node_modules/http-proxy/lib/http-proxy.js ***!
|
|
14071
|
-
\***************************************************/
|
|
14072
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14073
|
-
|
|
14074
|
-
eval(" // Use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!)\nvar ProxyServer = (__webpack_require__(/*! ./http-proxy/index.js */ \"./node_modules/http-proxy/lib/http-proxy/index.js\").Server);\n\n\n/**\n * Creates the proxy server.\n *\n * Examples:\n *\n * httpProxy.createProxyServer({ .. }, 8000)\n * // => '{ web: [Function], ws: [Function] ... }'\n *\n * @param {Object} Options Config object passed to the proxy\n *\n * @return {Object} Proxy Proxy object with handlers for `ws` and `web` requests\n *\n * @api public\n */\n\n\nfunction createProxyServer(options) {\n /*\n * `options` is needed and it must have the following layout:\n *\n * {\n * target : <url string to be parsed with the url module>\n * forward: <url string to be parsed with the url module>\n * agent : <object to be passed to http(s).request>\n * ssl : <object to be passed to https.createServer()>\n * ws : <true/false, if you want to proxy websockets>\n * xfwd : <true/false, adds x-forward headers>\n * secure : <true/false, verify SSL certificate>\n * toProxy: <true/false, explicitly specify if we are proxying to another proxy>\n * prependPath: <true/false, Default: true - specify whether you want to prepend the target's path to the proxy path>\n * ignorePath: <true/false, Default: false - specify whether you want to ignore the proxy path of the incoming request>\n * localAddress : <Local interface string to bind for outgoing connections>\n * changeOrigin: <true/false, Default: false - changes the origin of the host header to the target URL>\n * preserveHeaderKeyCase: <true/false, Default: false - specify whether you want to keep letter case of response header key >\n * auth : Basic authentication i.e. 'user:password' to compute an Authorization header.\n * hostRewrite: rewrites the location hostname on (201/301/302/307/308) redirects, Default: null.\n * autoRewrite: rewrites the location host/port on (201/301/302/307/308) redirects based on requested host/port. Default: false.\n * protocolRewrite: rewrites the location protocol on (201/301/302/307/308) redirects to 'http' or 'https'. Default: null.\n * }\n *\n * NOTE: `options.ws` and `options.ssl` are optional.\n * `options.target and `options.forward` cannot be\n * both missing\n * }\n */\n\n return new ProxyServer(options);\n}\n\n\nProxyServer.createProxyServer = createProxyServer;\nProxyServer.createServer = createProxyServer;\nProxyServer.createProxy = createProxyServer;\n\n\n\n\n/**\n * Export the proxy \"Server\" as the main export.\n */\nmodule.exports = ProxyServer;\n\n\n\n//# sourceURL=webpack://open-lens/./node_modules/http-proxy/lib/http-proxy.js?");
|
|
14075
|
-
|
|
14076
|
-
/***/ }),
|
|
14077
|
-
|
|
14078
|
-
/***/ "./node_modules/http-proxy/lib/http-proxy/common.js":
|
|
14079
|
-
/*!**********************************************************!*\
|
|
14080
|
-
!*** ./node_modules/http-proxy/lib/http-proxy/common.js ***!
|
|
14081
|
-
\**********************************************************/
|
|
14082
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
14083
|
-
|
|
14084
|
-
eval("var common = exports,\n url = __webpack_require__(/*! url */ \"url\"),\n extend = (__webpack_require__(/*! util */ \"util\")._extend),\n required = __webpack_require__(/*! requires-port */ \"./node_modules/requires-port/index.js\");\n\nvar upgradeHeader = /(^|,)\\s*upgrade\\s*($|,)/i,\n isSSL = /^https|wss/;\n\n/**\n * Simple Regex for testing if protocol is https\n */\ncommon.isSSL = isSSL;\n/**\n * Copies the right headers from `options` and `req` to\n * `outgoing` which is then used to fire the proxied\n * request.\n *\n * Examples:\n *\n * common.setupOutgoing(outgoing, options, req)\n * // => { host: ..., hostname: ...}\n *\n * @param {Object} Outgoing Base object to be filled with required properties\n * @param {Object} Options Config object passed to the proxy\n * @param {ClientRequest} Req Request Object\n * @param {String} Forward String to select forward or target\n * \n * @return {Object} Outgoing Object with all required properties set\n *\n * @api private\n */\n\ncommon.setupOutgoing = function(outgoing, options, req, forward) {\n outgoing.port = options[forward || 'target'].port ||\n (isSSL.test(options[forward || 'target'].protocol) ? 443 : 80);\n\n ['host', 'hostname', 'socketPath', 'pfx', 'key',\n 'passphrase', 'cert', 'ca', 'ciphers', 'secureProtocol'].forEach(\n function(e) { outgoing[e] = options[forward || 'target'][e]; }\n );\n\n outgoing.method = options.method || req.method;\n outgoing.headers = extend({}, req.headers);\n\n if (options.headers){\n extend(outgoing.headers, options.headers);\n }\n\n if (options.auth) {\n outgoing.auth = options.auth;\n }\n \n if (options.ca) {\n outgoing.ca = options.ca;\n }\n\n if (isSSL.test(options[forward || 'target'].protocol)) {\n outgoing.rejectUnauthorized = (typeof options.secure === \"undefined\") ? true : options.secure;\n }\n\n\n outgoing.agent = options.agent || false;\n outgoing.localAddress = options.localAddress;\n\n //\n // Remark: If we are false and not upgrading, set the connection: close. This is the right thing to do\n // as node core doesn't handle this COMPLETELY properly yet.\n //\n if (!outgoing.agent) {\n outgoing.headers = outgoing.headers || {};\n if (typeof outgoing.headers.connection !== 'string'\n || !upgradeHeader.test(outgoing.headers.connection)\n ) { outgoing.headers.connection = 'close'; }\n }\n\n\n // the final path is target path + relative path requested by user:\n var target = options[forward || 'target'];\n var targetPath = target && options.prependPath !== false\n ? (target.path || '')\n : '';\n\n //\n // Remark: Can we somehow not use url.parse as a perf optimization?\n //\n var outgoingPath = !options.toProxy\n ? (url.parse(req.url).path || '')\n : req.url;\n\n //\n // Remark: ignorePath will just straight up ignore whatever the request's\n // path is. This can be labeled as FOOT-GUN material if you do not know what\n // you are doing and are using conflicting options.\n //\n outgoingPath = !options.ignorePath ? outgoingPath : '';\n\n outgoing.path = common.urlJoin(targetPath, outgoingPath);\n\n if (options.changeOrigin) {\n outgoing.headers.host =\n required(outgoing.port, options[forward || 'target'].protocol) && !hasPort(outgoing.host)\n ? outgoing.host + ':' + outgoing.port\n : outgoing.host;\n }\n return outgoing;\n};\n\n/**\n * Set the proper configuration for sockets,\n * set no delay and set keep alive, also set\n * the timeout to 0.\n *\n * Examples:\n *\n * common.setupSocket(socket)\n * // => Socket\n *\n * @param {Socket} Socket instance to setup\n * \n * @return {Socket} Return the configured socket.\n *\n * @api private\n */\n\ncommon.setupSocket = function(socket) {\n socket.setTimeout(0);\n socket.setNoDelay(true);\n\n socket.setKeepAlive(true, 0);\n\n return socket;\n};\n\n/**\n * Get the port number from the host. Or guess it based on the connection type.\n *\n * @param {Request} req Incoming HTTP request.\n *\n * @return {String} The port number.\n *\n * @api private\n */\ncommon.getPort = function(req) {\n var res = req.headers.host ? req.headers.host.match(/:(\\d+)/) : '';\n\n return res ?\n res[1] :\n common.hasEncryptedConnection(req) ? '443' : '80';\n};\n\n/**\n * Check if the request has an encrypted connection.\n *\n * @param {Request} req Incoming HTTP request.\n *\n * @return {Boolean} Whether the connection is encrypted or not.\n *\n * @api private\n */\ncommon.hasEncryptedConnection = function(req) {\n return Boolean(req.connection.encrypted || req.connection.pair);\n};\n\n/**\n * OS-agnostic join (doesn't break on URLs like path.join does on Windows)>\n *\n * @return {String} The generated path.\n *\n * @api private\n */\n\ncommon.urlJoin = function() {\n //\n // We do not want to mess with the query string. All we want to touch is the path.\n //\n var args = Array.prototype.slice.call(arguments),\n lastIndex = args.length - 1,\n last = args[lastIndex],\n lastSegs = last.split('?'),\n retSegs;\n\n args[lastIndex] = lastSegs.shift();\n\n //\n // Join all strings, but remove empty strings so we don't get extra slashes from\n // joining e.g. ['', 'am']\n //\n retSegs = [\n args.filter(Boolean).join('/')\n .replace(/\\/+/g, '/')\n .replace('http:/', 'http://')\n .replace('https:/', 'https://')\n ];\n\n // Only join the query string if it exists so we don't have trailing a '?'\n // on every request\n\n // Handle case where there could be multiple ? in the URL.\n retSegs.push.apply(retSegs, lastSegs);\n\n return retSegs.join('?')\n};\n\n/**\n * Rewrites or removes the domain of a cookie header\n *\n * @param {String|Array} Header\n * @param {Object} Config, mapping of domain to rewritten domain.\n * '*' key to match any domain, null value to remove the domain.\n *\n * @api private\n */\ncommon.rewriteCookieProperty = function rewriteCookieProperty(header, config, property) {\n if (Array.isArray(header)) {\n return header.map(function (headerElement) {\n return rewriteCookieProperty(headerElement, config, property);\n });\n }\n return header.replace(new RegExp(\"(;\\\\s*\" + property + \"=)([^;]+)\", 'i'), function(match, prefix, previousValue) {\n var newValue;\n if (previousValue in config) {\n newValue = config[previousValue];\n } else if ('*' in config) {\n newValue = config['*'];\n } else {\n //no match, return previous value\n return match;\n }\n if (newValue) {\n //replace value\n return prefix + newValue;\n } else {\n //remove value\n return '';\n }\n });\n};\n\n/**\n * Check the host and see if it potentially has a port in it (keep it simple)\n *\n * @returns {Boolean} Whether we have one or not\n *\n * @api private\n */\nfunction hasPort(host) {\n return !!~host.indexOf(':');\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/http-proxy/lib/http-proxy/common.js?");
|
|
14085
|
-
|
|
14086
|
-
/***/ }),
|
|
14087
|
-
|
|
14088
|
-
/***/ "./node_modules/http-proxy/lib/http-proxy/index.js":
|
|
14089
|
-
/*!*********************************************************!*\
|
|
14090
|
-
!*** ./node_modules/http-proxy/lib/http-proxy/index.js ***!
|
|
14091
|
-
\*********************************************************/
|
|
14092
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14093
|
-
|
|
14094
|
-
eval("var httpProxy = module.exports,\n extend = (__webpack_require__(/*! util */ \"util\")._extend),\n parse_url = (__webpack_require__(/*! url */ \"url\").parse),\n EE3 = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\"),\n http = __webpack_require__(/*! http */ \"http\"),\n https = __webpack_require__(/*! https */ \"https\"),\n web = __webpack_require__(/*! ./passes/web-incoming */ \"./node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js\"),\n ws = __webpack_require__(/*! ./passes/ws-incoming */ \"./node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js\");\n\nhttpProxy.Server = ProxyServer;\n\n/**\n * Returns a function that creates the loader for\n * either `ws` or `web`'s passes.\n *\n * Examples:\n *\n * httpProxy.createRightProxy('ws')\n * // => [Function]\n *\n * @param {String} Type Either 'ws' or 'web'\n * \n * @return {Function} Loader Function that when called returns an iterator for the right passes\n *\n * @api private\n */\n\nfunction createRightProxy(type) {\n\n return function(options) {\n return function(req, res /*, [head], [opts] */) {\n var passes = (type === 'ws') ? this.wsPasses : this.webPasses,\n args = [].slice.call(arguments),\n cntr = args.length - 1,\n head, cbl;\n\n /* optional args parse begin */\n if(typeof args[cntr] === 'function') {\n cbl = args[cntr];\n\n cntr--;\n }\n\n var requestOptions = options;\n if(\n !(args[cntr] instanceof Buffer) &&\n args[cntr] !== res\n ) {\n //Copy global options\n requestOptions = extend({}, options);\n //Overwrite with request options\n extend(requestOptions, args[cntr]);\n\n cntr--;\n }\n\n if(args[cntr] instanceof Buffer) {\n head = args[cntr];\n }\n\n /* optional args parse end */\n\n ['target', 'forward'].forEach(function(e) {\n if (typeof requestOptions[e] === 'string')\n requestOptions[e] = parse_url(requestOptions[e]);\n });\n\n if (!requestOptions.target && !requestOptions.forward) {\n return this.emit('error', new Error('Must provide a proper URL as target'));\n }\n\n for(var i=0; i < passes.length; i++) {\n /**\n * Call of passes functions\n * pass(req, res, options, head)\n *\n * In WebSockets case the `res` variable\n * refer to the connection socket\n * pass(req, socket, options, head)\n */\n if(passes[i](req, res, requestOptions, head, this, cbl)) { // passes can return a truthy value to halt the loop\n break;\n }\n }\n };\n };\n}\nhttpProxy.createRightProxy = createRightProxy;\n\nfunction ProxyServer(options) {\n EE3.call(this);\n\n options = options || {};\n options.prependPath = options.prependPath === false ? false : true;\n\n this.web = this.proxyRequest = createRightProxy('web')(options);\n this.ws = this.proxyWebsocketRequest = createRightProxy('ws')(options);\n this.options = options;\n\n this.webPasses = Object.keys(web).map(function(pass) {\n return web[pass];\n });\n\n this.wsPasses = Object.keys(ws).map(function(pass) {\n return ws[pass];\n });\n\n this.on('error', this.onError, this);\n\n}\n\n(__webpack_require__(/*! util */ \"util\").inherits)(ProxyServer, EE3);\n\nProxyServer.prototype.onError = function (err) {\n //\n // Remark: Replicate node core behavior using EE3\n // so we force people to handle their own errors\n //\n if(this.listeners('error').length === 1) {\n throw err;\n }\n};\n\nProxyServer.prototype.listen = function(port, hostname) {\n var self = this,\n closure = function(req, res) { self.web(req, res); };\n\n this._server = this.options.ssl ?\n https.createServer(this.options.ssl, closure) :\n http.createServer(closure);\n\n if(this.options.ws) {\n this._server.on('upgrade', function(req, socket, head) { self.ws(req, socket, head); });\n }\n\n this._server.listen(port, hostname);\n\n return this;\n};\n\nProxyServer.prototype.close = function(callback) {\n var self = this;\n if (this._server) {\n this._server.close(done);\n }\n\n // Wrap callback to nullify server after all open connections are closed.\n function done() {\n self._server = null;\n if (callback) {\n callback.apply(null, arguments);\n }\n };\n};\n\nProxyServer.prototype.before = function(type, passName, callback) {\n if (type !== 'ws' && type !== 'web') {\n throw new Error('type must be `web` or `ws`');\n }\n var passes = (type === 'ws') ? this.wsPasses : this.webPasses,\n i = false;\n\n passes.forEach(function(v, idx) {\n if(v.name === passName) i = idx;\n })\n\n if(i === false) throw new Error('No such pass');\n\n passes.splice(i, 0, callback);\n};\nProxyServer.prototype.after = function(type, passName, callback) {\n if (type !== 'ws' && type !== 'web') {\n throw new Error('type must be `web` or `ws`');\n }\n var passes = (type === 'ws') ? this.wsPasses : this.webPasses,\n i = false;\n\n passes.forEach(function(v, idx) {\n if(v.name === passName) i = idx;\n })\n\n if(i === false) throw new Error('No such pass');\n\n passes.splice(i++, 0, callback);\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/http-proxy/lib/http-proxy/index.js?");
|
|
14095
|
-
|
|
14096
|
-
/***/ }),
|
|
14097
|
-
|
|
14098
|
-
/***/ "./node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js":
|
|
14099
|
-
/*!***********************************************************************!*\
|
|
14100
|
-
!*** ./node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js ***!
|
|
14101
|
-
\***********************************************************************/
|
|
14102
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14103
|
-
|
|
14104
|
-
eval("var httpNative = __webpack_require__(/*! http */ \"http\"),\n httpsNative = __webpack_require__(/*! https */ \"https\"),\n web_o = __webpack_require__(/*! ./web-outgoing */ \"./node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js\"),\n common = __webpack_require__(/*! ../common */ \"./node_modules/http-proxy/lib/http-proxy/common.js\"),\n followRedirects = __webpack_require__(/*! follow-redirects */ \"./node_modules/follow-redirects/index.js\");\n\nweb_o = Object.keys(web_o).map(function(pass) {\n return web_o[pass];\n});\n\nvar nativeAgents = { http: httpNative, https: httpsNative };\n\n/*!\n * Array of passes.\n *\n * A `pass` is just a function that is executed on `req, res, options`\n * so that you can easily add new checks while still keeping the base\n * flexible.\n */\n\n\nmodule.exports = {\n\n /**\n * Sets `content-length` to '0' if request is of DELETE type.\n *\n * @param {ClientRequest} Req Request object\n * @param {IncomingMessage} Res Response object\n * @param {Object} Options Config object passed to the proxy\n *\n * @api private\n */\n\n deleteLength: function deleteLength(req, res, options) {\n if((req.method === 'DELETE' || req.method === 'OPTIONS')\n && !req.headers['content-length']) {\n req.headers['content-length'] = '0';\n delete req.headers['transfer-encoding'];\n }\n },\n\n /**\n * Sets timeout in request socket if it was specified in options.\n *\n * @param {ClientRequest} Req Request object\n * @param {IncomingMessage} Res Response object\n * @param {Object} Options Config object passed to the proxy\n *\n * @api private\n */\n\n timeout: function timeout(req, res, options) {\n if(options.timeout) {\n req.socket.setTimeout(options.timeout);\n }\n },\n\n /**\n * Sets `x-forwarded-*` headers if specified in config.\n *\n * @param {ClientRequest} Req Request object\n * @param {IncomingMessage} Res Response object\n * @param {Object} Options Config object passed to the proxy\n *\n * @api private\n */\n\n XHeaders: function XHeaders(req, res, options) {\n if(!options.xfwd) return;\n\n var encrypted = req.isSpdy || common.hasEncryptedConnection(req);\n var values = {\n for : req.connection.remoteAddress || req.socket.remoteAddress,\n port : common.getPort(req),\n proto: encrypted ? 'https' : 'http'\n };\n\n ['for', 'port', 'proto'].forEach(function(header) {\n req.headers['x-forwarded-' + header] =\n (req.headers['x-forwarded-' + header] || '') +\n (req.headers['x-forwarded-' + header] ? ',' : '') +\n values[header];\n });\n\n req.headers['x-forwarded-host'] = req.headers['x-forwarded-host'] || req.headers['host'] || '';\n },\n\n /**\n * Does the actual proxying. If `forward` is enabled fires up\n * a ForwardStream, same happens for ProxyStream. The request\n * just dies otherwise.\n *\n * @param {ClientRequest} Req Request object\n * @param {IncomingMessage} Res Response object\n * @param {Object} Options Config object passed to the proxy\n *\n * @api private\n */\n\n stream: function stream(req, res, options, _, server, clb) {\n\n // And we begin!\n server.emit('start', req, res, options.target || options.forward);\n\n var agents = options.followRedirects ? followRedirects : nativeAgents;\n var http = agents.http;\n var https = agents.https;\n\n if(options.forward) {\n // If forward enable, so just pipe the request\n var forwardReq = (options.forward.protocol === 'https:' ? https : http).request(\n common.setupOutgoing(options.ssl || {}, options, req, 'forward')\n );\n\n // error handler (e.g. ECONNRESET, ECONNREFUSED)\n // Handle errors on incoming request as well as it makes sense to\n var forwardError = createErrorHandler(forwardReq, options.forward);\n req.on('error', forwardError);\n forwardReq.on('error', forwardError);\n\n (options.buffer || req).pipe(forwardReq);\n if(!options.target) { return res.end(); }\n }\n\n // Request initalization\n var proxyReq = (options.target.protocol === 'https:' ? https : http).request(\n common.setupOutgoing(options.ssl || {}, options, req)\n );\n\n // Enable developers to modify the proxyReq before headers are sent\n proxyReq.on('socket', function(socket) {\n if(server && !proxyReq.getHeader('expect')) {\n server.emit('proxyReq', proxyReq, req, res, options);\n }\n });\n\n // allow outgoing socket to timeout so that we could\n // show an error page at the initial request\n if(options.proxyTimeout) {\n proxyReq.setTimeout(options.proxyTimeout, function() {\n proxyReq.abort();\n });\n }\n\n // Ensure we abort proxy if request is aborted\n req.on('aborted', function () {\n proxyReq.abort();\n });\n\n // handle errors in proxy and incoming request, just like for forward proxy\n var proxyError = createErrorHandler(proxyReq, options.target);\n req.on('error', proxyError);\n proxyReq.on('error', proxyError);\n\n function createErrorHandler(proxyReq, url) {\n return function proxyError(err) {\n if (req.socket.destroyed && err.code === 'ECONNRESET') {\n server.emit('econnreset', err, req, res, url);\n return proxyReq.abort();\n }\n\n if (clb) {\n clb(err, req, res, url);\n } else {\n server.emit('error', err, req, res, url);\n }\n }\n }\n\n (options.buffer || req).pipe(proxyReq);\n\n proxyReq.on('response', function(proxyRes) {\n if(server) { server.emit('proxyRes', proxyRes, req, res); }\n\n if(!res.headersSent && !options.selfHandleResponse) {\n for(var i=0; i < web_o.length; i++) {\n if(web_o[i](req, res, proxyRes, options)) { break; }\n }\n }\n\n if (!res.finished) {\n // Allow us to listen when the proxy has completed\n proxyRes.on('end', function () {\n if (server) server.emit('end', req, res, proxyRes);\n });\n // We pipe to the response unless its expected to be handled by the user\n if (!options.selfHandleResponse) proxyRes.pipe(res);\n } else {\n if (server) server.emit('end', req, res, proxyRes);\n }\n });\n }\n\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js?");
|
|
14105
|
-
|
|
14106
|
-
/***/ }),
|
|
14107
|
-
|
|
14108
|
-
/***/ "./node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js":
|
|
14109
|
-
/*!***********************************************************************!*\
|
|
14110
|
-
!*** ./node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js ***!
|
|
14111
|
-
\***********************************************************************/
|
|
14112
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14113
|
-
|
|
14114
|
-
eval("var url = __webpack_require__(/*! url */ \"url\"),\n common = __webpack_require__(/*! ../common */ \"./node_modules/http-proxy/lib/http-proxy/common.js\");\n\n\nvar redirectRegex = /^201|30(1|2|7|8)$/;\n\n/*!\n * Array of passes.\n *\n * A `pass` is just a function that is executed on `req, res, options`\n * so that you can easily add new checks while still keeping the base\n * flexible.\n */\n\nmodule.exports = { // <--\n\n /**\n * If is a HTTP 1.0 request, remove chunk headers\n *\n * @param {ClientRequest} Req Request object\n * @param {IncomingMessage} Res Response object\n * @param {proxyResponse} Res Response object from the proxy request\n *\n * @api private\n */\n removeChunked: function removeChunked(req, res, proxyRes) {\n if (req.httpVersion === '1.0') {\n delete proxyRes.headers['transfer-encoding'];\n }\n },\n\n /**\n * If is a HTTP 1.0 request, set the correct connection header\n * or if connection header not present, then use `keep-alive`\n *\n * @param {ClientRequest} Req Request object\n * @param {IncomingMessage} Res Response object\n * @param {proxyResponse} Res Response object from the proxy request\n *\n * @api private\n */\n setConnection: function setConnection(req, res, proxyRes) {\n if (req.httpVersion === '1.0') {\n proxyRes.headers.connection = req.headers.connection || 'close';\n } else if (req.httpVersion !== '2.0' && !proxyRes.headers.connection) {\n proxyRes.headers.connection = req.headers.connection || 'keep-alive';\n }\n },\n\n setRedirectHostRewrite: function setRedirectHostRewrite(req, res, proxyRes, options) {\n if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite)\n && proxyRes.headers['location']\n && redirectRegex.test(proxyRes.statusCode)) {\n var target = url.parse(options.target);\n var u = url.parse(proxyRes.headers['location']);\n\n // make sure the redirected host matches the target host before rewriting\n if (target.host != u.host) {\n return;\n }\n\n if (options.hostRewrite) {\n u.host = options.hostRewrite;\n } else if (options.autoRewrite) {\n u.host = req.headers['host'];\n }\n if (options.protocolRewrite) {\n u.protocol = options.protocolRewrite;\n }\n\n proxyRes.headers['location'] = u.format();\n }\n },\n /**\n * Copy headers from proxyResponse to response\n * set each header in response object.\n *\n * @param {ClientRequest} Req Request object\n * @param {IncomingMessage} Res Response object\n * @param {proxyResponse} Res Response object from the proxy request\n * @param {Object} Options options.cookieDomainRewrite: Config to rewrite cookie domain\n *\n * @api private\n */\n writeHeaders: function writeHeaders(req, res, proxyRes, options) {\n var rewriteCookieDomainConfig = options.cookieDomainRewrite,\n rewriteCookiePathConfig = options.cookiePathRewrite,\n preserveHeaderKeyCase = options.preserveHeaderKeyCase,\n rawHeaderKeyMap,\n setHeader = function(key, header) {\n if (header == undefined) return;\n if (rewriteCookieDomainConfig && key.toLowerCase() === 'set-cookie') {\n header = common.rewriteCookieProperty(header, rewriteCookieDomainConfig, 'domain');\n }\n if (rewriteCookiePathConfig && key.toLowerCase() === 'set-cookie') {\n header = common.rewriteCookieProperty(header, rewriteCookiePathConfig, 'path');\n }\n res.setHeader(String(key).trim(), header);\n };\n\n if (typeof rewriteCookieDomainConfig === 'string') { //also test for ''\n rewriteCookieDomainConfig = { '*': rewriteCookieDomainConfig };\n }\n\n if (typeof rewriteCookiePathConfig === 'string') { //also test for ''\n rewriteCookiePathConfig = { '*': rewriteCookiePathConfig };\n }\n\n // message.rawHeaders is added in: v0.11.6\n // https://nodejs.org/api/http.html#http_message_rawheaders\n if (preserveHeaderKeyCase && proxyRes.rawHeaders != undefined) {\n rawHeaderKeyMap = {};\n for (var i = 0; i < proxyRes.rawHeaders.length; i += 2) {\n var key = proxyRes.rawHeaders[i];\n rawHeaderKeyMap[key.toLowerCase()] = key;\n }\n }\n\n Object.keys(proxyRes.headers).forEach(function(key) {\n var header = proxyRes.headers[key];\n if (preserveHeaderKeyCase && rawHeaderKeyMap) {\n key = rawHeaderKeyMap[key] || key;\n }\n setHeader(key, header);\n });\n },\n\n /**\n * Set the statusCode from the proxyResponse\n *\n * @param {ClientRequest} Req Request object\n * @param {IncomingMessage} Res Response object\n * @param {proxyResponse} Res Response object from the proxy request\n *\n * @api private\n */\n writeStatusCode: function writeStatusCode(req, res, proxyRes) {\n // From Node.js docs: response.writeHead(statusCode[, statusMessage][, headers])\n if(proxyRes.statusMessage) {\n res.statusCode = proxyRes.statusCode;\n res.statusMessage = proxyRes.statusMessage;\n } else {\n res.statusCode = proxyRes.statusCode;\n }\n }\n\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js?");
|
|
14115
|
-
|
|
14116
|
-
/***/ }),
|
|
14117
|
-
|
|
14118
|
-
/***/ "./node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js":
|
|
14119
|
-
/*!**********************************************************************!*\
|
|
14120
|
-
!*** ./node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js ***!
|
|
14121
|
-
\**********************************************************************/
|
|
14122
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14123
|
-
|
|
14124
|
-
eval("var http = __webpack_require__(/*! http */ \"http\"),\n https = __webpack_require__(/*! https */ \"https\"),\n common = __webpack_require__(/*! ../common */ \"./node_modules/http-proxy/lib/http-proxy/common.js\");\n\n/*!\n * Array of passes.\n *\n * A `pass` is just a function that is executed on `req, socket, options`\n * so that you can easily add new checks while still keeping the base\n * flexible.\n */\n\n/*\n * Websockets Passes\n *\n */\n\n\nmodule.exports = {\n /**\n * WebSocket requests must have the `GET` method and\n * the `upgrade:websocket` header\n *\n * @param {ClientRequest} Req Request object\n * @param {Socket} Websocket\n *\n * @api private\n */\n\n checkMethodAndHeader : function checkMethodAndHeader(req, socket) {\n if (req.method !== 'GET' || !req.headers.upgrade) {\n socket.destroy();\n return true;\n }\n\n if (req.headers.upgrade.toLowerCase() !== 'websocket') {\n socket.destroy();\n return true;\n }\n },\n\n /**\n * Sets `x-forwarded-*` headers if specified in config.\n *\n * @param {ClientRequest} Req Request object\n * @param {Socket} Websocket\n * @param {Object} Options Config object passed to the proxy\n *\n * @api private\n */\n\n XHeaders : function XHeaders(req, socket, options) {\n if(!options.xfwd) return;\n\n var values = {\n for : req.connection.remoteAddress || req.socket.remoteAddress,\n port : common.getPort(req),\n proto: common.hasEncryptedConnection(req) ? 'wss' : 'ws'\n };\n\n ['for', 'port', 'proto'].forEach(function(header) {\n req.headers['x-forwarded-' + header] =\n (req.headers['x-forwarded-' + header] || '') +\n (req.headers['x-forwarded-' + header] ? ',' : '') +\n values[header];\n });\n },\n\n /**\n * Does the actual proxying. Make the request and upgrade it\n * send the Switching Protocols request and pipe the sockets.\n *\n * @param {ClientRequest} Req Request object\n * @param {Socket} Websocket\n * @param {Object} Options Config object passed to the proxy\n *\n * @api private\n */\n stream : function stream(req, socket, options, head, server, clb) {\n\n var createHttpHeader = function(line, headers) {\n return Object.keys(headers).reduce(function (head, key) {\n var value = headers[key];\n\n if (!Array.isArray(value)) {\n head.push(key + ': ' + value);\n return head;\n }\n\n for (var i = 0; i < value.length; i++) {\n head.push(key + ': ' + value[i]);\n }\n return head;\n }, [line])\n .join('\\r\\n') + '\\r\\n\\r\\n';\n }\n\n common.setupSocket(socket);\n\n if (head && head.length) socket.unshift(head);\n\n\n var proxyReq = (common.isSSL.test(options.target.protocol) ? https : http).request(\n common.setupOutgoing(options.ssl || {}, options, req)\n );\n\n // Enable developers to modify the proxyReq before headers are sent\n if (server) { server.emit('proxyReqWs', proxyReq, req, socket, options, head); }\n\n // Error Handler\n proxyReq.on('error', onOutgoingError);\n proxyReq.on('response', function (res) {\n // if upgrade event isn't going to happen, close the socket\n if (!res.upgrade) {\n socket.write(createHttpHeader('HTTP/' + res.httpVersion + ' ' + res.statusCode + ' ' + res.statusMessage, res.headers));\n res.pipe(socket);\n }\n });\n\n proxyReq.on('upgrade', function(proxyRes, proxySocket, proxyHead) {\n proxySocket.on('error', onOutgoingError);\n\n // Allow us to listen when the websocket has completed\n proxySocket.on('end', function () {\n server.emit('close', proxyRes, proxySocket, proxyHead);\n });\n\n // The pipe below will end proxySocket if socket closes cleanly, but not\n // if it errors (eg, vanishes from the net and starts returning\n // EHOSTUNREACH). We need to do that explicitly.\n socket.on('error', function () {\n proxySocket.end();\n });\n\n common.setupSocket(proxySocket);\n\n if (proxyHead && proxyHead.length) proxySocket.unshift(proxyHead);\n\n //\n // Remark: Handle writing the headers to the socket when switching protocols\n // Also handles when a header is an array\n //\n socket.write(createHttpHeader('HTTP/1.1 101 Switching Protocols', proxyRes.headers));\n\n proxySocket.pipe(socket).pipe(proxySocket);\n\n server.emit('open', proxySocket);\n server.emit('proxySocket', proxySocket); //DEPRECATED.\n });\n\n return proxyReq.end(); // XXX: CHECK IF THIS IS THIS CORRECT\n\n function onOutgoingError(err) {\n if (clb) {\n clb(err, req, socket);\n } else {\n server.emit('error', err, req, socket);\n }\n socket.end();\n }\n }\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js?");
|
|
14125
|
-
|
|
14126
|
-
/***/ }),
|
|
14127
|
-
|
|
14128
14129
|
/***/ "./node_modules/http-signature/lib/index.js":
|
|
14129
14130
|
/*!**************************************************!*\
|
|
14130
14131
|
!*** ./node_modules/http-signature/lib/index.js ***!
|
|
@@ -14346,7 +14347,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
14346
14347
|
\**************************************/
|
|
14347
14348
|
/***/ ((module) => {
|
|
14348
14349
|
|
|
14349
|
-
eval("// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\nconst KEY_IGNORE = typeof Symbol !== 'undefined'\n ? Symbol.for('node-ignore')\n /* istanbul ignore next */\n : 'node-ignore'\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /\\\\?\\s+$/,\n match => match.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n ],\n\n // replace (\\ ) with ' '\n [\n /\\\\\\s/g,\n () => SPACE\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule\n /(^|[^\\\\]+)\\\\\\*(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1) => `${p1}[^\\\\/]*`\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, negative, ignorecase) => {\n const r = regexCache[pattern]\n if (r) {\n return r\n }\n\n // const replacers = negative\n // ? NEGATIVE_REPLACERS\n // : POSITIVE_REPLACERS\n\n const source = REPLACERS.reduce(\n (prev, current) => prev.replace(current[0], current[1].bind(pattern)),\n pattern\n )\n\n return regexCache[pattern] = ignorecase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignorecase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, negative, ignorecase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\ncheckPath.convert = p => p\n\nclass Ignore {\n constructor ({\n ignorecase = true\n } = {}) {\n this._rules = []\n this._ignorecase = ignorecase\n define(this, KEY_IGNORE, true)\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignorecase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(path, originalPath, throwError)\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n _t (path, cache, checkUnignored, slices) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst returnFalse = () => false\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, returnFalse)\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/ignore/index.js?");
|
|
14350
|
+
eval("// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\nconst KEY_IGNORE = typeof Symbol !== 'undefined'\n ? Symbol.for('node-ignore')\n /* istanbul ignore next */\n : 'node-ignore'\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\nconst RETURN_FALSE = () => false\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /\\\\?\\s+$/,\n match => match.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n ],\n\n // replace (\\ ) with ' '\n [\n /\\\\\\s/g,\n () => SPACE\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule\n /(^|[^\\\\]+)\\\\\\*(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1) => `${p1}[^\\\\/]*`\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, ignoreCase) => {\n let source = regexCache[pattern]\n\n if (!source) {\n source = REPLACERS.reduce(\n (prev, current) => prev.replace(current[0], current[1].bind(pattern)),\n pattern\n )\n regexCache[pattern] = source\n }\n\n return ignoreCase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignoreCase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, ignoreCase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\ncheckPath.convert = p => p\n\nclass Ignore {\n constructor ({\n ignorecase = true,\n ignoreCase = ignorecase,\n allowRelativePaths = false\n } = {}) {\n define(this, KEY_IGNORE, true)\n\n this._rules = []\n this._ignoreCase = ignoreCase\n this._allowRelativePaths = allowRelativePaths\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignoreCase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(\n path,\n originalPath,\n this._allowRelativePaths\n ? RETURN_FALSE\n : throwError\n )\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n _t (path, cache, checkUnignored, slices) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, RETURN_FALSE)\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/ignore/index.js?");
|
|
14350
14351
|
|
|
14351
14352
|
/***/ }),
|
|
14352
14353
|
|
|
@@ -17922,7 +17923,7 @@ eval("\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logf
|
|
|
17922
17923
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
17923
17924
|
|
|
17924
17925
|
"use strict";
|
|
17925
|
-
eval("\n/*\n * @api public\n * @property {function} format\n * Both the construction method and set of exposed\n * formats.\n */\n\nvar format = exports.format = __webpack_require__(/*! ././format */ \"./node_modules/logform/dist/format.js\");\n/*\n * @api public\n * @method {function} levels\n * Registers the specified levels with logform.\n */\n\n\nexports.levels = __webpack_require__(/*! ././levels */ \"./node_modules/logform/dist/levels.js\"); //\n// Setup all transports as eager-loaded exports\n// so that they are static for the bundlers.\n//\n\nObject.defineProperty(format, 'align', {\n value: __webpack_require__(/*! ./align */ \"./node_modules/logform/dist/align.js\")\n});\nObject.defineProperty(format, 'cli', {\n value: __webpack_require__(/*! ./cli */ \"./node_modules/logform/dist/cli.js\")\n});\nObject.defineProperty(format, 'combine', {\n value: __webpack_require__(/*! ./combine */ \"./node_modules/logform/dist/combine.js\")\n});\nObject.defineProperty(format, '
|
|
17926
|
+
eval("\n/*\n * @api public\n * @property {function} format\n * Both the construction method and set of exposed\n * formats.\n */\n\nvar format = exports.format = __webpack_require__(/*! ././format */ \"./node_modules/logform/dist/format.js\");\n/*\n * @api public\n * @method {function} levels\n * Registers the specified levels with logform.\n */\n\n\nexports.levels = __webpack_require__(/*! ././levels */ \"./node_modules/logform/dist/levels.js\"); //\n// Setup all transports as eager-loaded exports\n// so that they are static for the bundlers.\n//\n\nObject.defineProperty(format, 'align', {\n value: __webpack_require__(/*! ./align */ \"./node_modules/logform/dist/align.js\")\n});\nObject.defineProperty(format, 'cli', {\n value: __webpack_require__(/*! ./cli */ \"./node_modules/logform/dist/cli.js\")\n});\nObject.defineProperty(format, 'colorize', {\n value: __webpack_require__(/*! ./colorize */ \"./node_modules/logform/dist/colorize.js\")\n});\nObject.defineProperty(format, 'combine', {\n value: __webpack_require__(/*! ./combine */ \"./node_modules/logform/dist/combine.js\")\n});\nObject.defineProperty(format, 'errors', {\n value: __webpack_require__(/*! ./errors */ \"./node_modules/logform/dist/errors.js\")\n});\nObject.defineProperty(format, 'json', {\n value: __webpack_require__(/*! ./json */ \"./node_modules/logform/dist/json.js\")\n});\nObject.defineProperty(format, 'label', {\n value: __webpack_require__(/*! ./label */ \"./node_modules/logform/dist/label.js\")\n});\nObject.defineProperty(format, 'logstash', {\n value: __webpack_require__(/*! ./logstash */ \"./node_modules/logform/dist/logstash.js\")\n});\nObject.defineProperty(format, 'metadata', {\n value: __webpack_require__(/*! ./metadata */ \"./node_modules/logform/dist/metadata.js\")\n});\nObject.defineProperty(format, 'ms', {\n value: __webpack_require__(/*! ./ms */ \"./node_modules/logform/dist/ms.js\")\n});\nObject.defineProperty(format, 'padLevels', {\n value: __webpack_require__(/*! ./pad-levels */ \"./node_modules/logform/dist/pad-levels.js\")\n});\nObject.defineProperty(format, 'prettyPrint', {\n value: __webpack_require__(/*! ./pretty-print */ \"./node_modules/logform/dist/pretty-print.js\")\n});\nObject.defineProperty(format, 'printf', {\n value: __webpack_require__(/*! ./printf */ \"./node_modules/logform/dist/printf.js\")\n});\nObject.defineProperty(format, 'simple', {\n value: __webpack_require__(/*! ./simple */ \"./node_modules/logform/dist/simple.js\")\n});\nObject.defineProperty(format, 'splat', {\n value: __webpack_require__(/*! ./splat */ \"./node_modules/logform/dist/splat.js\")\n});\nObject.defineProperty(format, 'timestamp', {\n value: __webpack_require__(/*! ./timestamp */ \"./node_modules/logform/dist/timestamp.js\")\n});\nObject.defineProperty(format, 'uncolorize', {\n value: __webpack_require__(/*! ./uncolorize */ \"./node_modules/logform/dist/uncolorize.js\")\n});\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/browser.js?");
|
|
17926
17927
|
|
|
17927
17928
|
/***/ }),
|
|
17928
17929
|
|
|
@@ -17933,7 +17934,7 @@ eval("\n/*\n * @api public\n * @property {function} format\n * Both the construc
|
|
|
17933
17934
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
17934
17935
|
|
|
17935
17936
|
"use strict";
|
|
17936
|
-
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar _require = __webpack_require__(/*! ./colorize */ \"./node_modules/logform/dist/colorize.js\"),\n Colorizer = _require.Colorizer;\n\nvar _require2 = __webpack_require__(/*! ./pad-levels */ \"./node_modules/logform/dist/pad-levels.js\"),\n Padder = _require2.Padder;\n\nvar _require3 = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n configs = _require3.configs,\n MESSAGE = _require3.MESSAGE;\n/**\n * Cli format class that handles initial state for a a separate\n * Colorizer and Padder instance.\n */\n\n\nvar CliFormat = /*#__PURE__*/function () {\n function CliFormat() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, CliFormat);\n\n if (!opts.levels) {\n opts.levels = configs.
|
|
17937
|
+
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar _require = __webpack_require__(/*! ./colorize */ \"./node_modules/logform/dist/colorize.js\"),\n Colorizer = _require.Colorizer;\n\nvar _require2 = __webpack_require__(/*! ./pad-levels */ \"./node_modules/logform/dist/pad-levels.js\"),\n Padder = _require2.Padder;\n\nvar _require3 = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n configs = _require3.configs,\n MESSAGE = _require3.MESSAGE;\n/**\n * Cli format class that handles initial state for a a separate\n * Colorizer and Padder instance.\n */\n\n\nvar CliFormat = /*#__PURE__*/function () {\n function CliFormat() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, CliFormat);\n\n if (!opts.levels) {\n opts.levels = configs.cli.levels;\n }\n\n this.colorizer = new Colorizer(opts);\n this.padder = new Padder(opts);\n this.options = opts;\n }\n /*\n * function transform (info, opts)\n * Attempts to both:\n * 1. Pad the { level }\n * 2. Colorize the { level, message }\n * of the given `logform` info object depending on the `opts`.\n */\n\n\n _createClass(CliFormat, [{\n key: \"transform\",\n value: function transform(info, opts) {\n this.colorizer.transform(this.padder.transform(info, opts), opts);\n info[MESSAGE] = \"\".concat(info.level, \":\").concat(info.message);\n return info;\n }\n }]);\n\n return CliFormat;\n}();\n/*\n * function cli (opts)\n * Returns a new instance of the CLI format that turns a log\n * `info` object into the same format previously available\n * in `winston.cli()` in `winston < 3.0.0`.\n */\n\n\nmodule.exports = function (opts) {\n return new CliFormat(opts);\n}; //\n// Attach the CliFormat for registration purposes\n//\n\n\nmodule.exports.Format = CliFormat;\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/cli.js?");
|
|
17937
17938
|
|
|
17938
17939
|
/***/ }),
|
|
17939
17940
|
|
|
@@ -17944,7 +17945,7 @@ eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance insta
|
|
|
17944
17945
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
17945
17946
|
|
|
17946
17947
|
"use strict";
|
|
17947
|
-
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar colors = __webpack_require__(/*! colors/safe */ \"./node_modules/colors/safe.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n LEVEL = _require.LEVEL,\n MESSAGE = _require.MESSAGE; //\n// Fix colors not appearing in non-tty environments\n//\n\n\ncolors.enabled = true;\n/**\n * @property {RegExp} hasSpace\n * Simple regex to check for presence of spaces.\n */\n\nvar hasSpace = /\\s+/;\n/*\n * Colorizer format. Wraps the `level` and/or `message` properties\n * of the `info` objects with ANSI color codes based on a few options.\n */\n\nvar Colorizer = /*#__PURE__*/function () {\n function Colorizer() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Colorizer);\n\n if (opts.colors) {\n this.addColors(opts.colors);\n }\n\n this.options = opts;\n }\n /*\n * Adds the colors Object to the set of allColors\n * known by the Colorizer\n *\n * @param {Object} colors Set of color mappings to add.\n */\n\n\n _createClass(Colorizer, [{\n key: \"addColors\",\n
|
|
17948
|
+
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar colors = __webpack_require__(/*! @colors/colors/safe */ \"./node_modules/@colors/colors/safe.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n LEVEL = _require.LEVEL,\n MESSAGE = _require.MESSAGE; //\n// Fix colors not appearing in non-tty environments\n//\n\n\ncolors.enabled = true;\n/**\n * @property {RegExp} hasSpace\n * Simple regex to check for presence of spaces.\n */\n\nvar hasSpace = /\\s+/;\n/*\n * Colorizer format. Wraps the `level` and/or `message` properties\n * of the `info` objects with ANSI color codes based on a few options.\n */\n\nvar Colorizer = /*#__PURE__*/function () {\n function Colorizer() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Colorizer);\n\n if (opts.colors) {\n this.addColors(opts.colors);\n }\n\n this.options = opts;\n }\n /*\n * Adds the colors Object to the set of allColors\n * known by the Colorizer\n *\n * @param {Object} colors Set of color mappings to add.\n */\n\n\n _createClass(Colorizer, [{\n key: \"addColors\",\n value:\n /*\n * Adds the colors Object to the set of allColors\n * known by the Colorizer\n *\n * @param {Object} colors Set of color mappings to add.\n */\n function addColors(clrs) {\n return Colorizer.addColors(clrs);\n }\n /*\n * function colorize (lookup, level, message)\n * Performs multi-step colorization using @colors/colors/safe\n */\n\n }, {\n key: \"colorize\",\n value: function colorize(lookup, level, message) {\n if (typeof message === 'undefined') {\n message = level;\n } //\n // If the color for the level is just a string\n // then attempt to colorize the message with it.\n //\n\n\n if (!Array.isArray(Colorizer.allColors[lookup])) {\n return colors[Colorizer.allColors[lookup]](message);\n } //\n // If it is an Array then iterate over that Array, applying\n // the colors function for each item.\n //\n\n\n for (var i = 0, len = Colorizer.allColors[lookup].length; i < len; i++) {\n message = colors[Colorizer.allColors[lookup][i]](message);\n }\n\n return message;\n }\n /*\n * function transform (info, opts)\n * Attempts to colorize the { level, message } of the given\n * `logform` info object.\n */\n\n }, {\n key: \"transform\",\n value: function transform(info, opts) {\n if (opts.all && typeof info[MESSAGE] === 'string') {\n info[MESSAGE] = this.colorize(info[LEVEL], info.level, info[MESSAGE]);\n }\n\n if (opts.level || opts.all || !opts.message) {\n info.level = this.colorize(info[LEVEL], info.level);\n }\n\n if (opts.all || opts.message) {\n info.message = this.colorize(info[LEVEL], info.level, info.message);\n }\n\n return info;\n }\n }], [{\n key: \"addColors\",\n value: function addColors(clrs) {\n var nextColors = Object.keys(clrs).reduce(function (acc, level) {\n acc[level] = hasSpace.test(clrs[level]) ? clrs[level].split(hasSpace) : clrs[level];\n return acc;\n }, {});\n Colorizer.allColors = Object.assign({}, Colorizer.allColors || {}, nextColors);\n return Colorizer.allColors;\n }\n }]);\n\n return Colorizer;\n}();\n/*\n * function colorize (info)\n * Returns a new instance of the colorize Format that applies\n * level colors to `info` objects. This was previously exposed\n * as { colorize: true } to transports in `winston < 3.0.0`.\n */\n\n\nmodule.exports = function (opts) {\n return new Colorizer(opts);\n}; //\n// Attach the Colorizer for registration purposes\n//\n\n\nmodule.exports.Colorizer = module.exports.Format = Colorizer;\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/colorize.js?");
|
|
17948
17949
|
|
|
17949
17950
|
/***/ }),
|
|
17950
17951
|
|
|
@@ -17959,6 +17960,17 @@ eval("\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logf
|
|
|
17959
17960
|
|
|
17960
17961
|
/***/ }),
|
|
17961
17962
|
|
|
17963
|
+
/***/ "./node_modules/logform/dist/errors.js":
|
|
17964
|
+
/*!*********************************************!*\
|
|
17965
|
+
!*** ./node_modules/logform/dist/errors.js ***!
|
|
17966
|
+
\*********************************************/
|
|
17967
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
17968
|
+
|
|
17969
|
+
"use strict";
|
|
17970
|
+
eval("/* eslint no-undefined: 0 */\n\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n LEVEL = _require.LEVEL,\n MESSAGE = _require.MESSAGE;\n/*\n * function errors (info)\n * If the `message` property of the `info` object is an instance of `Error`,\n * replace the `Error` object its own `message` property.\n *\n * Optionally, the Error's `stack` property can also be appended to the `info` object.\n */\n\n\nmodule.exports = format(function (einfo, _ref) {\n var stack = _ref.stack;\n\n if (einfo instanceof Error) {\n var _Object$assign;\n\n var info = Object.assign({}, einfo, (_Object$assign = {\n level: einfo.level\n }, _defineProperty(_Object$assign, LEVEL, einfo[LEVEL] || einfo.level), _defineProperty(_Object$assign, \"message\", einfo.message), _defineProperty(_Object$assign, MESSAGE, einfo[MESSAGE] || einfo.message), _Object$assign));\n if (stack) info.stack = einfo.stack;\n return info;\n }\n\n if (!(einfo.message instanceof Error)) return einfo; // Assign all enumerable properties and the\n // message property from the error provided.\n\n var err = einfo.message;\n Object.assign(einfo, err);\n einfo.message = err.message;\n einfo[MESSAGE] = err.message; // Assign the stack if requested.\n\n if (stack) einfo.stack = err.stack;\n return einfo;\n});\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/errors.js?");
|
|
17971
|
+
|
|
17972
|
+
/***/ }),
|
|
17973
|
+
|
|
17962
17974
|
/***/ "./node_modules/logform/dist/format.js":
|
|
17963
17975
|
/*!*********************************************!*\
|
|
17964
17976
|
!*** ./node_modules/logform/dist/format.js ***!
|
|
@@ -17966,7 +17978,7 @@ eval("\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logf
|
|
|
17966
17978
|
/***/ ((module) => {
|
|
17967
17979
|
|
|
17968
17980
|
"use strict";
|
|
17969
|
-
eval("\n/*\n * Displays a helpful message and the source of\n * the format when it is invalid.\n */\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\";
|
|
17981
|
+
eval("\n/*\n * Displays a helpful message and the source of\n * the format when it is invalid.\n */\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar InvalidFormatError = /*#__PURE__*/function (_Error) {\n _inherits(InvalidFormatError, _Error);\n\n var _super = _createSuper(InvalidFormatError);\n\n function InvalidFormatError(formatFn) {\n var _this;\n\n _classCallCheck(this, InvalidFormatError);\n\n _this = _super.call(this, \"Format functions must be synchronous taking a two arguments: (info, opts)\\nFound: \".concat(formatFn.toString().split('\\n')[0], \"\\n\"));\n Error.captureStackTrace(_assertThisInitialized(_this), InvalidFormatError);\n return _this;\n }\n\n return _createClass(InvalidFormatError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n/*\n * function format (formatFn)\n * Returns a create function for the `formatFn`.\n */\n\n\nmodule.exports = function (formatFn) {\n if (formatFn.length > 2) {\n throw new InvalidFormatError(formatFn);\n }\n /*\n * function Format (options)\n * Base prototype which calls a `_format`\n * function and pushes the result.\n */\n\n\n function Format() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.options = options;\n }\n\n Format.prototype.transform = formatFn; //\n // Create a function which returns new instances of\n // FormatWrap for simple syntax like:\n //\n // require('winston').formats.json();\n //\n\n function createFormatWrap(opts) {\n return new Format(opts);\n } //\n // Expose the FormatWrap through the create function\n // for testability.\n //\n\n\n createFormatWrap.Format = Format;\n return createFormatWrap;\n};\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/format.js?");
|
|
17970
17982
|
|
|
17971
17983
|
/***/ }),
|
|
17972
17984
|
|
|
@@ -17977,7 +17989,7 @@ eval("\n/*\n * Displays a helpful message and the source of\n * the format when
|
|
|
17977
17989
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
17978
17990
|
|
|
17979
17991
|
"use strict";
|
|
17980
|
-
eval("\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar
|
|
17992
|
+
eval("\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar stringify = __webpack_require__(/*! safe-stable-stringify */ \"./node_modules/safe-stable-stringify/index.js\");\n/*\n * function replacer (key, value)\n * Handles proper stringification of Buffer and bigint output.\n */\n\n\nfunction replacer(key, value) {\n // safe-stable-stringify does support BigInt, however, it doesn't wrap the value in quotes.\n // Leading to a loss in fidelity if the resulting string is parsed.\n // It would also be a breaking change for logform.\n if (typeof value === 'bigint') return value.toString();\n return value;\n}\n/*\n * function json (info)\n * Returns a new instance of the JSON format that turns a log `info`\n * object into pure JSON. This was previously exposed as { json: true }\n * to transports in `winston < 3.0.0`.\n */\n\n\nmodule.exports = format(function (info, opts) {\n var jsonStringify = stringify.configure(opts);\n info[MESSAGE] = jsonStringify(info, opts.replacer || replacer, opts.space);\n return info;\n});\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/json.js?");
|
|
17981
17993
|
|
|
17982
17994
|
/***/ }),
|
|
17983
17995
|
|
|
@@ -18010,7 +18022,7 @@ eval("\n\nvar _require = __webpack_require__(/*! ./colorize */ \"./node_modules/
|
|
|
18010
18022
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
18011
18023
|
|
|
18012
18024
|
"use strict";
|
|
18013
|
-
eval("\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar jsonStringify = __webpack_require__(/*!
|
|
18025
|
+
eval("\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar jsonStringify = __webpack_require__(/*! safe-stable-stringify */ \"./node_modules/safe-stable-stringify/index.js\");\n/*\n * function logstash (info)\n * Returns a new instance of the LogStash Format that turns a\n * log `info` object into pure JSON with the appropriate logstash\n * options. This was previously exposed as { logstash: true }\n * to transports in `winston < 3.0.0`.\n */\n\n\nmodule.exports = format(function (info) {\n var logstash = {};\n\n if (info.message) {\n logstash['@message'] = info.message;\n delete info.message;\n }\n\n if (info.timestamp) {\n logstash['@timestamp'] = info.timestamp;\n delete info.timestamp;\n }\n\n logstash['@fields'] = info;\n info[MESSAGE] = jsonStringify(logstash);\n return info;\n});\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/logstash.js?");
|
|
18014
18026
|
|
|
18015
18027
|
/***/ }),
|
|
18016
18028
|
|
|
@@ -18025,6 +18037,17 @@ eval("\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.d
|
|
|
18025
18037
|
|
|
18026
18038
|
/***/ }),
|
|
18027
18039
|
|
|
18040
|
+
/***/ "./node_modules/logform/dist/ms.js":
|
|
18041
|
+
/*!*****************************************!*\
|
|
18042
|
+
!*** ./node_modules/logform/dist/ms.js ***!
|
|
18043
|
+
\*****************************************/
|
|
18044
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
18045
|
+
|
|
18046
|
+
"use strict";
|
|
18047
|
+
eval("\n\nvar _this = void 0;\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar ms = __webpack_require__(/*! ms */ \"./node_modules/ms/index.js\");\n/*\n * function ms (info)\n * Returns an `info` with a `ms` property. The `ms` property holds the Value\n * of the time difference between two calls in milliseconds.\n */\n\n\nmodule.exports = format(function (info) {\n var curr = +new Date();\n _this.diff = curr - (_this.prevTime || curr);\n _this.prevTime = curr;\n info.ms = \"+\".concat(ms(_this.diff));\n return info;\n});\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/ms.js?");
|
|
18048
|
+
|
|
18049
|
+
/***/ }),
|
|
18050
|
+
|
|
18028
18051
|
/***/ "./node_modules/logform/dist/pad-levels.js":
|
|
18029
18052
|
/*!*************************************************!*\
|
|
18030
18053
|
!*** ./node_modules/logform/dist/pad-levels.js ***!
|
|
@@ -18032,7 +18055,7 @@ eval("\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.d
|
|
|
18032
18055
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
18033
18056
|
|
|
18034
18057
|
"use strict";
|
|
18035
|
-
eval("/* eslint no-unused-vars: 0 */\n\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator
|
|
18058
|
+
eval("/* eslint no-unused-vars: 0 */\n\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n configs = _require.configs,\n LEVEL = _require.LEVEL,\n MESSAGE = _require.MESSAGE;\n\nvar Padder = /*#__PURE__*/function () {\n function Padder() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n levels: configs.npm.levels\n };\n\n _classCallCheck(this, Padder);\n\n this.paddings = Padder.paddingForLevels(opts.levels, opts.filler);\n this.options = opts;\n }\n /**\n * Returns the maximum length of keys in the specified `levels` Object.\n * @param {Object} levels Set of all levels to calculate longest level against.\n * @returns {Number} Maximum length of the longest level string.\n */\n\n\n _createClass(Padder, [{\n key: \"transform\",\n value:\n /**\n * Prepends the padding onto the `message` based on the `LEVEL` of\n * the `info`. This is based on the behavior of `winston@2` which also\n * prepended the level onto the message.\n *\n * See: https://github.com/winstonjs/winston/blob/2.x/lib/winston/logger.js#L198-L201\n *\n * @param {Info} info Logform info object\n * @param {Object} opts Options passed along to this instance.\n * @returns {Info} Modified logform info object.\n */\n function transform(info, opts) {\n info.message = \"\".concat(this.paddings[info[LEVEL]]).concat(info.message);\n\n if (info[MESSAGE]) {\n info[MESSAGE] = \"\".concat(this.paddings[info[LEVEL]]).concat(info[MESSAGE]);\n }\n\n return info;\n }\n }], [{\n key: \"getLongestLevel\",\n value: function getLongestLevel(levels) {\n var lvls = Object.keys(levels).map(function (level) {\n return level.length;\n });\n return Math.max.apply(Math, _toConsumableArray(lvls));\n }\n /**\n * Returns the padding for the specified `level` assuming that the\n * maximum length of all levels it's associated with is `maxLength`.\n * @param {String} level Level to calculate padding for.\n * @param {String} filler Repeatable text to use for padding.\n * @param {Number} maxLength Length of the longest level\n * @returns {String} Padding string for the `level`\n */\n\n }, {\n key: \"paddingForLevel\",\n value: function paddingForLevel(level, filler, maxLength) {\n var targetLen = maxLength + 1 - level.length;\n var rep = Math.floor(targetLen / filler.length);\n var padding = \"\".concat(filler).concat(filler.repeat(rep));\n return padding.slice(0, targetLen);\n }\n /**\n * Returns an object with the string paddings for the given `levels`\n * using the specified `filler`.\n * @param {Object} levels Set of all levels to calculate padding for.\n * @param {String} filler Repeatable text to use for padding.\n * @returns {Object} Mapping of level to desired padding.\n */\n\n }, {\n key: \"paddingForLevels\",\n value: function paddingForLevels(levels) {\n var filler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';\n var maxLength = Padder.getLongestLevel(levels);\n return Object.keys(levels).reduce(function (acc, level) {\n acc[level] = Padder.paddingForLevel(level, filler, maxLength);\n return acc;\n }, {});\n }\n }]);\n\n return Padder;\n}();\n/*\n * function padLevels (info)\n * Returns a new instance of the padLevels Format which pads\n * levels to be the same length. This was previously exposed as\n * { padLevels: true } to transports in `winston < 3.0.0`.\n */\n\n\nmodule.exports = function (opts) {\n return new Padder(opts);\n};\n\nmodule.exports.Padder = module.exports.Format = Padder;\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/pad-levels.js?");
|
|
18036
18059
|
|
|
18037
18060
|
/***/ }),
|
|
18038
18061
|
|
|
@@ -18054,7 +18077,7 @@ eval("\n\nvar inspect = (__webpack_require__(/*! util */ \"util\").inspect);\n\n
|
|
|
18054
18077
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
18055
18078
|
|
|
18056
18079
|
"use strict";
|
|
18057
|
-
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar Printf = /*#__PURE__*/function () {\n function Printf(templateFn) {\n _classCallCheck(this, Printf);\n\n this.template = templateFn;\n }\n\n _createClass(Printf, [{\n key: \"transform\",\n value: function transform(info) {\n info[MESSAGE] = this.template(info);\n return info;\n }\n }]);\n\n return Printf;\n}();\n/*\n * function printf (templateFn)\n * Returns a new instance of the printf Format that creates an\n * intermediate prototype to store the template string-based formatter\n * function.\n */\n\n\nmodule.exports = function (opts) {\n return new Printf(opts);\n};\n\nmodule.exports.Printf = module.exports.Format = Printf;\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/printf.js?");
|
|
18080
|
+
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar Printf = /*#__PURE__*/function () {\n function Printf(templateFn) {\n _classCallCheck(this, Printf);\n\n this.template = templateFn;\n }\n\n _createClass(Printf, [{\n key: \"transform\",\n value: function transform(info) {\n info[MESSAGE] = this.template(info);\n return info;\n }\n }]);\n\n return Printf;\n}();\n/*\n * function printf (templateFn)\n * Returns a new instance of the printf Format that creates an\n * intermediate prototype to store the template string-based formatter\n * function.\n */\n\n\nmodule.exports = function (opts) {\n return new Printf(opts);\n};\n\nmodule.exports.Printf = module.exports.Format = Printf;\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/printf.js?");
|
|
18058
18081
|
|
|
18059
18082
|
/***/ }),
|
|
18060
18083
|
|
|
@@ -18065,7 +18088,7 @@ eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance insta
|
|
|
18065
18088
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
18066
18089
|
|
|
18067
18090
|
"use strict";
|
|
18068
|
-
eval("/* eslint no-undefined: 0 */\n\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar jsonStringify = __webpack_require__(/*!
|
|
18091
|
+
eval("/* eslint no-undefined: 0 */\n\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar jsonStringify = __webpack_require__(/*! safe-stable-stringify */ \"./node_modules/safe-stable-stringify/index.js\");\n/*\n * function simple (info)\n * Returns a new instance of the simple format TransformStream\n * which writes a simple representation of logs.\n *\n * const { level, message, splat, ...rest } = info;\n *\n * ${level}: ${message} if rest is empty\n * ${level}: ${message} ${JSON.stringify(rest)} otherwise\n */\n\n\nmodule.exports = format(function (info) {\n var stringifiedRest = jsonStringify(Object.assign({}, info, {\n level: undefined,\n message: undefined,\n splat: undefined\n }));\n var padding = info.padding && info.padding[info.level] || '';\n\n if (stringifiedRest !== '{}') {\n info[MESSAGE] = \"\".concat(info.level, \":\").concat(padding, \" \").concat(info.message, \" \").concat(stringifiedRest);\n } else {\n info[MESSAGE] = \"\".concat(info.level, \":\").concat(padding, \" \").concat(info.message);\n }\n\n return info;\n});\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/simple.js?");
|
|
18069
18092
|
|
|
18070
18093
|
/***/ }),
|
|
18071
18094
|
|
|
@@ -18076,7 +18099,7 @@ eval("/* eslint no-undefined: 0 */\n\n\nvar format = __webpack_require__(/*! ./f
|
|
|
18076
18099
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
18077
18100
|
|
|
18078
18101
|
"use strict";
|
|
18079
|
-
eval("\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator
|
|
18102
|
+
eval("\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar util = __webpack_require__(/*! util */ \"util\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n SPLAT = _require.SPLAT;\n/**\n * Captures the number of format (i.e. %s strings) in a given string.\n * Based on `util.format`, see Node.js source:\n * https://github.com/nodejs/node/blob/b1c8f15c5f169e021f7c46eb7b219de95fe97603/lib/util.js#L201-L230\n * @type {RegExp}\n */\n\n\nvar formatRegExp = /%[scdjifoO%]/g;\n/**\n * Captures the number of escaped % signs in a format string (i.e. %s strings).\n * @type {RegExp}\n */\n\nvar escapedPercent = /%%/g;\n\nvar Splatter = /*#__PURE__*/function () {\n function Splatter(opts) {\n _classCallCheck(this, Splatter);\n\n this.options = opts;\n }\n /**\n * Check to see if tokens <= splat.length, assign { splat, meta } into the\n * `info` accordingly, and write to this instance.\n *\n * @param {Info} info Logform info message.\n * @param {String[]} tokens Set of string interpolation tokens.\n * @returns {Info} Modified info message\n * @private\n */\n\n\n _createClass(Splatter, [{\n key: \"_splat\",\n value: function _splat(info, tokens) {\n var msg = info.message;\n var splat = info[SPLAT] || info.splat || [];\n var percents = msg.match(escapedPercent);\n var escapes = percents && percents.length || 0; // The expected splat is the number of tokens minus the number of escapes\n // e.g.\n // - { expectedSplat: 3 } '%d %s %j'\n // - { expectedSplat: 5 } '[%s] %d%% %d%% %s %j'\n //\n // Any \"meta\" will be arugments in addition to the expected splat size\n // regardless of type. e.g.\n //\n // logger.log('info', '%d%% %s %j', 100, 'wow', { such: 'js' }, { thisIsMeta: true });\n // would result in splat of four (4), but only three (3) are expected. Therefore:\n //\n // extraSplat = 3 - 4 = -1\n // metas = [100, 'wow', { such: 'js' }, { thisIsMeta: true }].splice(-1, -1 * -1);\n // splat = [100, 'wow', { such: 'js' }]\n\n var expectedSplat = tokens.length - escapes;\n var extraSplat = expectedSplat - splat.length;\n var metas = extraSplat < 0 ? splat.splice(extraSplat, -1 * extraSplat) : []; // Now that { splat } has been separated from any potential { meta }. we\n // can assign this to the `info` object and write it to our format stream.\n // If the additional metas are **NOT** objects or **LACK** enumerable properties\n // you are going to have a bad time.\n\n var metalen = metas.length;\n\n if (metalen) {\n for (var i = 0; i < metalen; i++) {\n Object.assign(info, metas[i]);\n }\n }\n\n info.message = util.format.apply(util, [msg].concat(_toConsumableArray(splat)));\n return info;\n }\n /**\n * Transforms the `info` message by using `util.format` to complete\n * any `info.message` provided it has string interpolation tokens.\n * If no tokens exist then `info` is immutable.\n *\n * @param {Info} info Logform info message.\n * @param {Object} opts Options for this instance.\n * @returns {Info} Modified info message\n */\n\n }, {\n key: \"transform\",\n value: function transform(info) {\n var msg = info.message;\n var splat = info[SPLAT] || info.splat; // No need to process anything if splat is undefined\n\n if (!splat || !splat.length) {\n return info;\n } // Extract tokens, if none available default to empty array to\n // ensure consistancy in expected results\n\n\n var tokens = msg && msg.match && msg.match(formatRegExp); // This condition will take care of inputs with info[SPLAT]\n // but no tokens present\n\n if (!tokens && (splat || splat.length)) {\n var metas = splat.length > 1 ? splat.splice(0) : splat; // Now that { splat } has been separated from any potential { meta }. we\n // can assign this to the `info` object and write it to our format stream.\n // If the additional metas are **NOT** objects or **LACK** enumerable properties\n // you are going to have a bad time.\n\n var metalen = metas.length;\n\n if (metalen) {\n for (var i = 0; i < metalen; i++) {\n Object.assign(info, metas[i]);\n }\n }\n\n return info;\n }\n\n if (tokens) {\n return this._splat(info, tokens);\n }\n\n return info;\n }\n }]);\n\n return Splatter;\n}();\n/*\n * function splat (info)\n * Returns a new instance of the splat format TransformStream\n * which performs string interpolation from `info` objects. This was\n * previously exposed implicitly in `winston < 3.0.0`.\n */\n\n\nmodule.exports = function (opts) {\n return new Splatter(opts);\n};\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/splat.js?");
|
|
18080
18103
|
|
|
18081
18104
|
/***/ }),
|
|
18082
18105
|
|
|
@@ -18098,7 +18121,7 @@ eval("\n\nvar fecha = __webpack_require__(/*! fecha */ \"./node_modules/fecha/li
|
|
|
18098
18121
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
18099
18122
|
|
|
18100
18123
|
"use strict";
|
|
18101
|
-
eval("\n\nvar colors = __webpack_require__(/*! colors/safe */ \"./node_modules/colors/safe.js\");\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n/*\n * function uncolorize (info)\n * Returns a new instance of the uncolorize Format that strips colors\n * from `info` objects. This was previously exposed as { stripColors: true }\n * to transports in `winston < 3.0.0`.\n */\n\n\nmodule.exports = format(function (info, opts) {\n if (opts.level !== false) {\n info.level = colors.strip(info.level);\n }\n\n if (opts.message !== false) {\n info.message = colors.strip(info.message);\n }\n\n if (opts.raw !== false && info[MESSAGE]) {\n info[MESSAGE] = colors.strip(info[MESSAGE]);\n }\n\n return info;\n});\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/uncolorize.js?");
|
|
18124
|
+
eval("\n\nvar colors = __webpack_require__(/*! @colors/colors/safe */ \"./node_modules/@colors/colors/safe.js\");\n\nvar format = __webpack_require__(/*! ./format */ \"./node_modules/logform/dist/format.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n/*\n * function uncolorize (info)\n * Returns a new instance of the uncolorize Format that strips colors\n * from `info` objects. This was previously exposed as { stripColors: true }\n * to transports in `winston < 3.0.0`.\n */\n\n\nmodule.exports = format(function (info, opts) {\n if (opts.level !== false) {\n info.level = colors.strip(info.level);\n }\n\n if (opts.message !== false) {\n info.message = colors.strip(info.message);\n }\n\n if (opts.raw !== false && info[MESSAGE]) {\n info[MESSAGE] = colors.strip(info[MESSAGE]);\n }\n\n return info;\n});\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/dist/uncolorize.js?");
|
|
18102
18125
|
|
|
18103
18126
|
/***/ }),
|
|
18104
18127
|
|
|
@@ -18120,7 +18143,7 @@ eval("\n\n/*\n * Displays a helpful message and the source of\n * the format whe
|
|
|
18120
18143
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
18121
18144
|
|
|
18122
18145
|
"use strict";
|
|
18123
|
-
eval("\n\nconst format = __webpack_require__(/*! ./format */ \"./node_modules/logform/format.js\");\nconst { MESSAGE } = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\");\nconst
|
|
18146
|
+
eval("\n\nconst format = __webpack_require__(/*! ./format */ \"./node_modules/logform/format.js\");\nconst { MESSAGE } = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\");\nconst stringify = __webpack_require__(/*! safe-stable-stringify */ \"./node_modules/safe-stable-stringify/index.js\");\n\n/*\n * function replacer (key, value)\n * Handles proper stringification of Buffer and bigint output.\n */\nfunction replacer(key, value) {\n // safe-stable-stringify does support BigInt, however, it doesn't wrap the value in quotes.\n // Leading to a loss in fidelity if the resulting string is parsed.\n // It would also be a breaking change for logform.\n if (typeof value === 'bigint')\n return value.toString();\n return value;\n}\n\n/*\n * function json (info)\n * Returns a new instance of the JSON format that turns a log `info`\n * object into pure JSON. This was previously exposed as { json: true }\n * to transports in `winston < 3.0.0`.\n */\nmodule.exports = format((info, opts) => {\n const jsonStringify = stringify.configure(opts);\n info[MESSAGE] = jsonStringify(info, opts.replacer || replacer, opts.space);\n return info;\n});\n\n\n//# sourceURL=webpack://open-lens/./node_modules/logform/json.js?");
|
|
18124
18147
|
|
|
18125
18148
|
/***/ }),
|
|
18126
18149
|
|
|
@@ -28342,17 +28365,6 @@ eval("\n\nvar http = __webpack_require__(/*! http */ \"http\")\nvar https = __we
|
|
|
28342
28365
|
|
|
28343
28366
|
/***/ }),
|
|
28344
28367
|
|
|
28345
|
-
/***/ "./node_modules/requires-port/index.js":
|
|
28346
|
-
/*!*********************************************!*\
|
|
28347
|
-
!*** ./node_modules/requires-port/index.js ***!
|
|
28348
|
-
\*********************************************/
|
|
28349
|
-
/***/ ((module) => {
|
|
28350
|
-
|
|
28351
|
-
"use strict";
|
|
28352
|
-
eval("\n\n/**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\nmodule.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n\n if (!port) return false;\n\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n\n case 'https':\n case 'wss':\n return port !== 443;\n\n case 'ftp':\n return port !== 21;\n\n case 'gopher':\n return port !== 70;\n\n case 'file':\n return false;\n }\n\n return port !== 0;\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/requires-port/index.js?");
|
|
28353
|
-
|
|
28354
|
-
/***/ }),
|
|
28355
|
-
|
|
28356
28368
|
/***/ "./node_modules/resolve-alpn/index.js":
|
|
28357
28369
|
/*!********************************************!*\
|
|
28358
28370
|
!*** ./node_modules/resolve-alpn/index.js ***!
|
|
@@ -28428,6 +28440,17 @@ eval("/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/open
|
|
|
28428
28440
|
|
|
28429
28441
|
/***/ }),
|
|
28430
28442
|
|
|
28443
|
+
/***/ "./node_modules/safe-stable-stringify/index.js":
|
|
28444
|
+
/*!*****************************************************!*\
|
|
28445
|
+
!*** ./node_modules/safe-stable-stringify/index.js ***!
|
|
28446
|
+
\*****************************************************/
|
|
28447
|
+
/***/ ((module, exports) => {
|
|
28448
|
+
|
|
28449
|
+
"use strict";
|
|
28450
|
+
eval("\n\nconst stringify = configure()\n\n// @ts-expect-error\nstringify.configure = configure\n// @ts-expect-error\nstringify.stringify = stringify\n\n// @ts-expect-error\nstringify.default = stringify\n\n// @ts-expect-error used for named export\nexports.stringify = stringify\n// @ts-expect-error used for named export\nexports.configure = configure\n\nmodule.exports = stringify\n\n// eslint-disable-next-line\nconst strEscapeSequencesRegExp = /[\\u0000-\\u001f\\u0022\\u005c\\ud800-\\udfff]|[\\ud800-\\udbff](?![\\udc00-\\udfff])|(?:[^\\ud800-\\udbff]|^)[\\udc00-\\udfff]/\n// eslint-disable-next-line\nconst strEscapeSequencesReplacer = /[\\u0000-\\u001f\\u0022\\u005c\\ud800-\\udfff]|[\\ud800-\\udbff](?![\\udc00-\\udfff])|(?:[^\\ud800-\\udbff]|^)[\\udc00-\\udfff]/g\n\n// Escaped special characters. Use empty strings to fill up unused entries.\nconst meta = [\n '\\\\u0000', '\\\\u0001', '\\\\u0002', '\\\\u0003', '\\\\u0004',\n '\\\\u0005', '\\\\u0006', '\\\\u0007', '\\\\b', '\\\\t',\n '\\\\n', '\\\\u000b', '\\\\f', '\\\\r', '\\\\u000e',\n '\\\\u000f', '\\\\u0010', '\\\\u0011', '\\\\u0012', '\\\\u0013',\n '\\\\u0014', '\\\\u0015', '\\\\u0016', '\\\\u0017', '\\\\u0018',\n '\\\\u0019', '\\\\u001a', '\\\\u001b', '\\\\u001c', '\\\\u001d',\n '\\\\u001e', '\\\\u001f', '', '', '\\\\\"',\n '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '\\\\\\\\'\n]\n\nfunction escapeFn (str) {\n if (str.length === 2) {\n const charCode = str.charCodeAt(1)\n return `${str[0]}\\\\u${charCode.toString(16)}`\n }\n const charCode = str.charCodeAt(0)\n return meta.length > charCode\n ? meta[charCode]\n : `\\\\u${charCode.toString(16)}`\n}\n\n// Escape C0 control characters, double quotes, the backslash and every code\n// unit with a numeric value in the inclusive range 0xD800 to 0xDFFF.\nfunction strEscape (str) {\n // Some magic numbers that worked out fine while benchmarking with v8 8.0\n if (str.length < 5000 && !strEscapeSequencesRegExp.test(str)) {\n return str\n }\n if (str.length > 100) {\n return str.replace(strEscapeSequencesReplacer, escapeFn)\n }\n let result = ''\n let last = 0\n for (let i = 0; i < str.length; i++) {\n const point = str.charCodeAt(i)\n if (point === 34 || point === 92 || point < 32) {\n result += `${str.slice(last, i)}${meta[point]}`\n last = i + 1\n } else if (point >= 0xd800 && point <= 0xdfff) {\n if (point <= 0xdbff && i + 1 < str.length) {\n const point = str.charCodeAt(i + 1)\n if (point >= 0xdc00 && point <= 0xdfff) {\n i++\n continue\n }\n }\n result += `${str.slice(last, i)}${`\\\\u${point.toString(16)}`}`\n last = i + 1\n }\n }\n result += str.slice(last)\n return result\n}\n\nfunction insertSort (array) {\n // Insertion sort is very efficient for small input sizes but it has a bad\n // worst case complexity. Thus, use native array sort for bigger values.\n if (array.length > 2e2) {\n return array.sort()\n }\n for (let i = 1; i < array.length; i++) {\n const currentValue = array[i]\n let position = i\n while (position !== 0 && array[position - 1] > currentValue) {\n array[position] = array[position - 1]\n position--\n }\n array[position] = currentValue\n }\n return array\n}\n\nconst typedArrayPrototypeGetSymbolToStringTag =\n Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(\n Object.getPrototypeOf(\n new Uint8Array()\n )\n ),\n Symbol.toStringTag\n ).get\n\nfunction isTypedArrayWithEntries (value) {\n return typedArrayPrototypeGetSymbolToStringTag.call(value) !== undefined && value.length !== 0\n}\n\nfunction stringifyTypedArray (array, separator, maximumBreadth) {\n if (array.length < maximumBreadth) {\n maximumBreadth = array.length\n }\n const whitespace = separator === ',' ? '' : ' '\n let res = `\"0\":${whitespace}${array[0]}`\n for (let i = 1; i < maximumBreadth; i++) {\n res += `${separator}\"${i}\":${whitespace}${array[i]}`\n }\n return res\n}\n\nfunction getCircularValueOption (options) {\n if (options && Object.prototype.hasOwnProperty.call(options, 'circularValue')) {\n var circularValue = options.circularValue\n if (typeof circularValue === 'string') {\n return `\"${circularValue}\"`\n }\n if (circularValue == null) {\n return circularValue\n }\n if (circularValue === Error || circularValue === TypeError) {\n return {\n toString () {\n throw new TypeError('Converting circular structure to JSON')\n }\n }\n }\n throw new TypeError('The \"circularValue\" argument must be of type string or the value null or undefined')\n }\n return '\"[Circular]\"'\n}\n\nfunction getBooleanOption (options, key) {\n if (options && Object.prototype.hasOwnProperty.call(options, key)) {\n var value = options[key]\n if (typeof value !== 'boolean') {\n throw new TypeError(`The \"${key}\" argument must be of type boolean`)\n }\n }\n return value === undefined ? true : value\n}\n\nfunction getPositiveIntegerOption (options, key) {\n if (options && Object.prototype.hasOwnProperty.call(options, key)) {\n var value = options[key]\n if (typeof value !== 'number') {\n throw new TypeError(`The \"${key}\" argument must be of type number`)\n }\n if (!Number.isInteger(value)) {\n throw new TypeError(`The \"${key}\" argument must be an integer`)\n }\n if (value < 1) {\n throw new RangeError(`The \"${key}\" argument must be >= 1`)\n }\n }\n return value === undefined ? Infinity : value\n}\n\nfunction getItemCount (number) {\n if (number === 1) {\n return '1 item'\n }\n return `${number} items`\n}\n\nfunction getUniqueReplacerSet (replacerArray) {\n const replacerSet = new Set()\n for (const value of replacerArray) {\n if (typeof value === 'string') {\n replacerSet.add(value)\n } else if (typeof value === 'number') {\n replacerSet.add(String(value))\n }\n }\n return replacerSet\n}\n\nfunction configure (options) {\n const circularValue = getCircularValueOption(options)\n const bigint = getBooleanOption(options, 'bigint')\n const deterministic = getBooleanOption(options, 'deterministic')\n const maximumDepth = getPositiveIntegerOption(options, 'maximumDepth')\n const maximumBreadth = getPositiveIntegerOption(options, 'maximumBreadth')\n\n function stringifyFnReplacer (key, parent, stack, replacer, spacer, indentation) {\n let value = parent[key]\n\n if (typeof value === 'object' && value !== null && typeof value.toJSON === 'function') {\n value = value.toJSON(key)\n }\n value = replacer.call(parent, key, value)\n\n switch (typeof value) {\n case 'string':\n return `\"${strEscape(value)}\"`\n case 'object': {\n if (value === null) {\n return 'null'\n }\n if (stack.indexOf(value) !== -1) {\n return circularValue\n }\n\n let res = ''\n let join = ','\n const originalIndentation = indentation\n\n if (Array.isArray(value)) {\n if (value.length === 0) {\n return '[]'\n }\n if (maximumDepth < stack.length + 1) {\n return '\"[Array]\"'\n }\n stack.push(value)\n if (spacer !== '') {\n indentation += spacer\n res += `\\n${indentation}`\n join = `,\\n${indentation}`\n }\n const maximumValuesToStringify = Math.min(value.length, maximumBreadth)\n let i = 0\n for (; i < maximumValuesToStringify - 1; i++) {\n const tmp = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation)\n res += tmp !== undefined ? tmp : 'null'\n res += join\n }\n const tmp = stringifyFnReplacer(i, value, stack, replacer, spacer, indentation)\n res += tmp !== undefined ? tmp : 'null'\n if (value.length - 1 > maximumBreadth) {\n const removedKeys = value.length - maximumBreadth - 1\n res += `${join}\"... ${getItemCount(removedKeys)} not stringified\"`\n }\n if (spacer !== '') {\n res += `\\n${originalIndentation}`\n }\n stack.pop()\n return `[${res}]`\n }\n\n let keys = Object.keys(value)\n const keyLength = keys.length\n if (keyLength === 0) {\n return '{}'\n }\n if (maximumDepth < stack.length + 1) {\n return '\"[Object]\"'\n }\n let whitespace = ''\n let separator = ''\n if (spacer !== '') {\n indentation += spacer\n join = `,\\n${indentation}`\n whitespace = ' '\n }\n let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth)\n if (isTypedArrayWithEntries(value)) {\n res += stringifyTypedArray(value, join, maximumBreadth)\n keys = keys.slice(value.length)\n maximumPropertiesToStringify -= value.length\n separator = join\n }\n if (deterministic) {\n keys = insertSort(keys)\n }\n stack.push(value)\n for (let i = 0; i < maximumPropertiesToStringify; i++) {\n const key = keys[i]\n const tmp = stringifyFnReplacer(key, value, stack, replacer, spacer, indentation)\n if (tmp !== undefined) {\n res += `${separator}\"${strEscape(key)}\":${whitespace}${tmp}`\n separator = join\n }\n }\n if (keyLength > maximumBreadth) {\n const removedKeys = keyLength - maximumBreadth\n res += `${separator}\"...\":${whitespace}\"${getItemCount(removedKeys)} not stringified\"`\n separator = join\n }\n if (spacer !== '' && separator.length > 1) {\n res = `\\n${indentation}${res}\\n${originalIndentation}`\n }\n stack.pop()\n return `{${res}}`\n }\n case 'number':\n return isFinite(value) ? String(value) : 'null'\n case 'boolean':\n return value === true ? 'true' : 'false'\n case 'bigint':\n return bigint ? String(value) : undefined\n }\n }\n\n function stringifyArrayReplacer (key, value, stack, replacer, spacer, indentation) {\n if (typeof value === 'object' && value !== null && typeof value.toJSON === 'function') {\n value = value.toJSON(key)\n }\n\n switch (typeof value) {\n case 'string':\n return `\"${strEscape(value)}\"`\n case 'object': {\n if (value === null) {\n return 'null'\n }\n if (stack.indexOf(value) !== -1) {\n return circularValue\n }\n\n const originalIndentation = indentation\n let res = ''\n let join = ','\n\n if (Array.isArray(value)) {\n if (value.length === 0) {\n return '[]'\n }\n if (maximumDepth < stack.length + 1) {\n return '\"[Array]\"'\n }\n stack.push(value)\n if (spacer !== '') {\n indentation += spacer\n res += `\\n${indentation}`\n join = `,\\n${indentation}`\n }\n const maximumValuesToStringify = Math.min(value.length, maximumBreadth)\n let i = 0\n for (; i < maximumValuesToStringify - 1; i++) {\n const tmp = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation)\n res += tmp !== undefined ? tmp : 'null'\n res += join\n }\n const tmp = stringifyArrayReplacer(i, value[i], stack, replacer, spacer, indentation)\n res += tmp !== undefined ? tmp : 'null'\n if (value.length - 1 > maximumBreadth) {\n const removedKeys = value.length - maximumBreadth - 1\n res += `${join}\"... ${getItemCount(removedKeys)} not stringified\"`\n }\n if (spacer !== '') {\n res += `\\n${originalIndentation}`\n }\n stack.pop()\n return `[${res}]`\n }\n if (replacer.size === 0) {\n return '{}'\n }\n stack.push(value)\n let whitespace = ''\n if (spacer !== '') {\n indentation += spacer\n join = `,\\n${indentation}`\n whitespace = ' '\n }\n let separator = ''\n for (const key of replacer) {\n const tmp = stringifyArrayReplacer(key, value[key], stack, replacer, spacer, indentation)\n if (tmp !== undefined) {\n res += `${separator}\"${strEscape(key)}\":${whitespace}${tmp}`\n separator = join\n }\n }\n if (spacer !== '' && separator.length > 1) {\n res = `\\n${indentation}${res}\\n${originalIndentation}`\n }\n stack.pop()\n return `{${res}}`\n }\n case 'number':\n return isFinite(value) ? String(value) : 'null'\n case 'boolean':\n return value === true ? 'true' : 'false'\n case 'bigint':\n return bigint ? String(value) : undefined\n }\n }\n\n function stringifyIndent (key, value, stack, spacer, indentation) {\n switch (typeof value) {\n case 'string':\n return `\"${strEscape(value)}\"`\n case 'object': {\n if (value === null) {\n return 'null'\n }\n if (typeof value.toJSON === 'function') {\n value = value.toJSON(key)\n // Prevent calling `toJSON` again.\n if (typeof value !== 'object') {\n return stringifyIndent(key, value, stack, spacer, indentation)\n }\n if (value === null) {\n return 'null'\n }\n }\n if (stack.indexOf(value) !== -1) {\n return circularValue\n }\n const originalIndentation = indentation\n\n if (Array.isArray(value)) {\n if (value.length === 0) {\n return '[]'\n }\n if (maximumDepth < stack.length + 1) {\n return '\"[Array]\"'\n }\n stack.push(value)\n indentation += spacer\n let res = `\\n${indentation}`\n const join = `,\\n${indentation}`\n const maximumValuesToStringify = Math.min(value.length, maximumBreadth)\n let i = 0\n for (; i < maximumValuesToStringify - 1; i++) {\n const tmp = stringifyIndent(i, value[i], stack, spacer, indentation)\n res += tmp !== undefined ? tmp : 'null'\n res += join\n }\n const tmp = stringifyIndent(i, value[i], stack, spacer, indentation)\n res += tmp !== undefined ? tmp : 'null'\n if (value.length - 1 > maximumBreadth) {\n const removedKeys = value.length - maximumBreadth - 1\n res += `${join}\"... ${getItemCount(removedKeys)} not stringified\"`\n }\n res += `\\n${originalIndentation}`\n stack.pop()\n return `[${res}]`\n }\n\n let keys = Object.keys(value)\n const keyLength = keys.length\n if (keyLength === 0) {\n return '{}'\n }\n if (maximumDepth < stack.length + 1) {\n return '\"[Object]\"'\n }\n indentation += spacer\n const join = `,\\n${indentation}`\n let res = ''\n let separator = ''\n let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth)\n if (isTypedArrayWithEntries(value)) {\n res += stringifyTypedArray(value, join, maximumBreadth)\n keys = keys.slice(value.length)\n maximumPropertiesToStringify -= value.length\n separator = join\n }\n if (deterministic) {\n keys = insertSort(keys)\n }\n stack.push(value)\n for (let i = 0; i < maximumPropertiesToStringify; i++) {\n const key = keys[i]\n const tmp = stringifyIndent(key, value[key], stack, spacer, indentation)\n if (tmp !== undefined) {\n res += `${separator}\"${strEscape(key)}\": ${tmp}`\n separator = join\n }\n }\n if (keyLength > maximumBreadth) {\n const removedKeys = keyLength - maximumBreadth\n res += `${separator}\"...\": \"${getItemCount(removedKeys)} not stringified\"`\n separator = join\n }\n if (separator !== '') {\n res = `\\n${indentation}${res}\\n${originalIndentation}`\n }\n stack.pop()\n return `{${res}}`\n }\n case 'number':\n return isFinite(value) ? String(value) : 'null'\n case 'boolean':\n return value === true ? 'true' : 'false'\n case 'bigint':\n return bigint ? String(value) : undefined\n }\n }\n\n function stringifySimple (key, value, stack) {\n switch (typeof value) {\n case 'string':\n return `\"${strEscape(value)}\"`\n case 'object': {\n if (value === null) {\n return 'null'\n }\n if (typeof value.toJSON === 'function') {\n value = value.toJSON(key)\n // Prevent calling `toJSON` again\n if (typeof value !== 'object') {\n return stringifySimple(key, value, stack)\n }\n if (value === null) {\n return 'null'\n }\n }\n if (stack.indexOf(value) !== -1) {\n return circularValue\n }\n\n let res = ''\n\n if (Array.isArray(value)) {\n if (value.length === 0) {\n return '[]'\n }\n if (maximumDepth < stack.length + 1) {\n return '\"[Array]\"'\n }\n stack.push(value)\n const maximumValuesToStringify = Math.min(value.length, maximumBreadth)\n let i = 0\n for (; i < maximumValuesToStringify - 1; i++) {\n const tmp = stringifySimple(i, value[i], stack)\n res += tmp !== undefined ? tmp : 'null'\n res += ','\n }\n const tmp = stringifySimple(i, value[i], stack)\n res += tmp !== undefined ? tmp : 'null'\n if (value.length - 1 > maximumBreadth) {\n const removedKeys = value.length - maximumBreadth - 1\n res += `,\"... ${getItemCount(removedKeys)} not stringified\"`\n }\n stack.pop()\n return `[${res}]`\n }\n\n let keys = Object.keys(value)\n const keyLength = keys.length\n if (keyLength === 0) {\n return '{}'\n }\n if (maximumDepth < stack.length + 1) {\n return '\"[Object]\"'\n }\n let separator = ''\n let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth)\n if (isTypedArrayWithEntries(value)) {\n res += stringifyTypedArray(value, ',', maximumBreadth)\n keys = keys.slice(value.length)\n maximumPropertiesToStringify -= value.length\n separator = ','\n }\n if (deterministic) {\n keys = insertSort(keys)\n }\n stack.push(value)\n for (let i = 0; i < maximumPropertiesToStringify; i++) {\n const key = keys[i]\n const tmp = stringifySimple(key, value[key], stack)\n if (tmp !== undefined) {\n res += `${separator}\"${strEscape(key)}\":${tmp}`\n separator = ','\n }\n }\n if (keyLength > maximumBreadth) {\n const removedKeys = keyLength - maximumBreadth\n res += `${separator}\"...\":\"${getItemCount(removedKeys)} not stringified\"`\n }\n stack.pop()\n return `{${res}}`\n }\n case 'number':\n return isFinite(value) ? String(value) : 'null'\n case 'boolean':\n return value === true ? 'true' : 'false'\n case 'bigint':\n return bigint ? String(value) : undefined\n }\n }\n\n function stringify (value, replacer, space) {\n if (arguments.length > 1) {\n let spacer = ''\n if (typeof space === 'number') {\n spacer = ' '.repeat(Math.min(space, 10))\n } else if (typeof space === 'string') {\n spacer = space.slice(0, 10)\n }\n if (replacer != null) {\n if (typeof replacer === 'function') {\n return stringifyFnReplacer('', { '': value }, [], replacer, spacer, '')\n }\n if (Array.isArray(replacer)) {\n return stringifyArrayReplacer('', value, [], getUniqueReplacerSet(replacer), spacer, '')\n }\n }\n if (spacer.length !== 0) {\n return stringifyIndent('', value, [], spacer, '')\n }\n }\n return stringifySimple('', value, [])\n }\n\n return stringify\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/safe-stable-stringify/index.js?");
|
|
28451
|
+
|
|
28452
|
+
/***/ }),
|
|
28453
|
+
|
|
28431
28454
|
/***/ "./node_modules/safer-buffer/safer.js":
|
|
28432
28455
|
/*!********************************************!*\
|
|
28433
28456
|
!*** ./node_modules/safer-buffer/safer.js ***!
|
|
@@ -32528,6 +32551,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
32528
32551
|
|
|
32529
32552
|
/***/ }),
|
|
32530
32553
|
|
|
32554
|
+
/***/ "./src/common/ipc/native-theme.ts":
|
|
32555
|
+
/*!****************************************!*\
|
|
32556
|
+
!*** ./src/common/ipc/native-theme.ts ***!
|
|
32557
|
+
\****************************************/
|
|
32558
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
32559
|
+
|
|
32560
|
+
"use strict";
|
|
32561
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"setNativeThemeChannel\": () => (/* binding */ setNativeThemeChannel),\n/* harmony export */ \"getNativeThemeChannel\": () => (/* binding */ getNativeThemeChannel)\n/* harmony export */ });\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nconst setNativeThemeChannel = \"theme:set-native-theme\";\nconst getNativeThemeChannel = \"theme:get-native-theme\";\n\n\n//# sourceURL=webpack://open-lens/./src/common/ipc/native-theme.ts?");
|
|
32562
|
+
|
|
32563
|
+
/***/ }),
|
|
32564
|
+
|
|
32531
32565
|
/***/ "./src/common/ipc/type-enforced-ipc.ts":
|
|
32532
32566
|
/*!*********************************************!*\
|
|
32533
32567
|
!*** ./src/common/ipc/type-enforced-ipc.ts ***!
|
|
@@ -32700,7 +32734,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
32700
32734
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
32701
32735
|
|
|
32702
32736
|
"use strict";
|
|
32703
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"listCharts\": () => (/* binding */ listCharts),\n/* harmony export */ \"getChartDetails\": () => (/* binding */ getChartDetails),\n/* harmony export */ \"getChartValues\": () => (/* binding */ getChartValues),\n/* harmony export */ \"HelmChart\": () => (/* binding */ HelmChart)\n/* harmony export */ });\n/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! path-to-regexp */ \"./node_modules/path-to-regexp/dist.es2015/index.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! querystring */ \"querystring\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var joi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! joi */ \"./node_modules/joi/dist/joi-browser.min.js\");\n/* harmony import */ var joi__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(joi__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\nconst endpoint = (0,path_to_regexp__WEBPACK_IMPORTED_MODULE_4__.compile)(`/v2/charts/:repo?/:name?`);\n/**\n * Get a list of all helm charts from all saved helm repos\n */\nasync function listCharts() {\n const data = await _index__WEBPACK_IMPORTED_MODULE_0__.apiBase.get(endpoint());\n return Object\n .values(data)\n .reduce((allCharts, repoCharts) => allCharts.concat(Object.values(repoCharts)), [])\n .map(([chart]) => HelmChart.create(chart, { onError: \"log\" }))\n .filter(Boolean);\n}\n/**\n * Get the readme and all versions of a chart\n * @param repo The repo to get from\n * @param name The name of the chart to request the data of\n * @param options.version The version of the chart's readme to get, default latest\n * @param options.reqInit A way for passing in an abort controller or other browser request options\n */\nasync function getChartDetails(repo, name, { version, reqInit } = {}) {\n const path = endpoint({ repo, name });\n const { readme, ...data } = await _index__WEBPACK_IMPORTED_MODULE_0__.apiBase.get(`${path}?${(0,querystring__WEBPACK_IMPORTED_MODULE_1__.stringify)({ version })}`, undefined, reqInit);\n const versions = data.versions.map(version => HelmChart.create(version, { onError: \"log\" })).filter(Boolean);\n return {\n readme,\n versions,\n };\n}\n/**\n * Get chart values related to a specific repos' version of a chart\n * @param repo The repo to get from\n * @param name The name of the chart to request the data of\n * @param version The version to get the values from\n */\nasync function getChartValues(repo, name, version) {\n return _index__WEBPACK_IMPORTED_MODULE_0__.apiBase.get(`/v2/charts/${repo}/${name}/values?${(0,querystring__WEBPACK_IMPORTED_MODULE_1__.stringify)({ version })}`);\n}\nconst helmChartMaintainerValidator = joi__WEBPACK_IMPORTED_MODULE_3___default().object({\n name: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n email: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n url: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n});\nconst helmChartDependencyValidator = joi__WEBPACK_IMPORTED_MODULE_3___default().object({\n name: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n repository: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n condition: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n version: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n tags: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .default(() => ([])),\n});\nconst helmChartValidator = joi__WEBPACK_IMPORTED_MODULE_3___default().object({\n apiVersion: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n name: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n version: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n repo: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n created: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n digest: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n kubeVersion: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n description: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .default(\"\"),\n home: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n engine: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n icon: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n appVersion: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n tillerVersion: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n type: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n deprecated: joi__WEBPACK_IMPORTED_MODULE_3___default().boolean()\n .default(false),\n keywords: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n sources: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n urls: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n maintainers: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(helmChartMaintainerValidator)\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n dependencies: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(helmChartDependencyValidator)\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n annotations: joi__WEBPACK_IMPORTED_MODULE_3___default().object({})\n .pattern(/.*/, joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .default(() => ({})),\n});\nclass HelmChart {\n constructor(value) {\n this.apiVersion = value.apiVersion;\n this.name = value.name;\n this.version = value.version;\n this.repo = value.repo;\n this.kubeVersion = value.kubeVersion;\n this.created = value.created;\n this.description = value.description;\n this.digest = value.digest;\n this.keywords = value.keywords;\n this.home = value.home;\n this.sources = value.sources;\n this.maintainers = value.maintainers;\n this.engine = value.engine;\n this.icon = value.icon;\n this.apiVersion = value.apiVersion;\n this.deprecated = value.deprecated;\n this.tillerVersion = value.tillerVersion;\n this.annotations = value.annotations;\n this.urls = value.urls;\n this.dependencies = value.dependencies;\n this.type = value.type;\n (0,_utils__WEBPACK_IMPORTED_MODULE_2__.autoBind)(this);\n }\n static create(data, { onError = \"throw\" } = {}) {\n const { value, error } = helmChartValidator.validate(data, {\n abortEarly: false,\n });\n if (!error) {\n return new HelmChart(value);\n }\n const [actualErrors, unknownDetails] = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.bifurcateArray)(error.details, ({ type }) => type === \"object.unknown\");\n if (unknownDetails.length > 0) {\n console.warn(\"HelmChart data has unexpected fields\", { original: data, unknownFields: unknownDetails.flatMap(d => d.path) });\n }\n if (actualErrors.length === 0) {\n return new HelmChart(value);\n }\n const validationError = new (joi__WEBPACK_IMPORTED_MODULE_3___default().ValidationError)(actualErrors.map(er => er.message).join(\". \"), actualErrors, error._original);\n if (onError === \"throw\") {\n throw validationError;\n }\n console.warn(\"[HELM-CHART]: failed to validate data\", data, validationError);\n return undefined;\n }\n getId() {\n return `${this.repo}:${this.apiVersion}/${this.name}@${this.getAppVersion()}+${this.digest}`;\n }\n getName() {\n return this.name;\n }\n getFullName(seperator = \"/\") {\n return [this.getRepository(), this.getName()].join(seperator);\n }\n getDescription() {\n return this.description;\n }\n getIcon() {\n return this.icon;\n }\n getHome() {\n return this.home;\n }\n getMaintainers() {\n return this.maintainers;\n }\n getVersion() {\n return this.version;\n }\n getRepository() {\n return this.repo;\n }\n getAppVersion() {\n return this.appVersion;\n }\n getKeywords() {\n return this.keywords;\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s-api/endpoints/helm-charts.api.ts?");
|
|
32737
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"listCharts\": () => (/* binding */ listCharts),\n/* harmony export */ \"getChartDetails\": () => (/* binding */ getChartDetails),\n/* harmony export */ \"getChartValues\": () => (/* binding */ getChartValues),\n/* harmony export */ \"HelmChart\": () => (/* binding */ HelmChart)\n/* harmony export */ });\n/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! path-to-regexp */ \"./node_modules/path-to-regexp/dist.es2015/index.js\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! querystring */ \"querystring\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var joi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! joi */ \"./node_modules/joi/dist/joi-browser.min.js\");\n/* harmony import */ var joi__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(joi__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\nconst endpoint = (0,path_to_regexp__WEBPACK_IMPORTED_MODULE_4__.compile)(`/v2/charts/:repo?/:name?`);\n/**\n * Get a list of all helm charts from all saved helm repos\n */\nasync function listCharts() {\n const data = await _index__WEBPACK_IMPORTED_MODULE_0__.apiBase.get(endpoint());\n return Object\n .values(data)\n .reduce((allCharts, repoCharts) => allCharts.concat(Object.values(repoCharts)), [])\n .map(([chart]) => HelmChart.create(chart, { onError: \"log\" }))\n .filter(Boolean);\n}\n/**\n * Get the readme and all versions of a chart\n * @param repo The repo to get from\n * @param name The name of the chart to request the data of\n * @param options.version The version of the chart's readme to get, default latest\n * @param options.reqInit A way for passing in an abort controller or other browser request options\n */\nasync function getChartDetails(repo, name, { version, reqInit } = {}) {\n const path = endpoint({ repo, name });\n const { readme, ...data } = await _index__WEBPACK_IMPORTED_MODULE_0__.apiBase.get(`${path}?${(0,querystring__WEBPACK_IMPORTED_MODULE_1__.stringify)({ version })}`, undefined, reqInit);\n const versions = data.versions.map(version => HelmChart.create(version, { onError: \"log\" })).filter(Boolean);\n return {\n readme,\n versions,\n };\n}\n/**\n * Get chart values related to a specific repos' version of a chart\n * @param repo The repo to get from\n * @param name The name of the chart to request the data of\n * @param version The version to get the values from\n */\nasync function getChartValues(repo, name, version) {\n return _index__WEBPACK_IMPORTED_MODULE_0__.apiBase.get(`/v2/charts/${repo}/${name}/values?${(0,querystring__WEBPACK_IMPORTED_MODULE_1__.stringify)({ version })}`);\n}\nconst helmChartMaintainerValidator = joi__WEBPACK_IMPORTED_MODULE_3___default().object({\n name: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n email: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n url: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n});\nconst helmChartDependencyValidator = joi__WEBPACK_IMPORTED_MODULE_3___default().object({\n name: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n repository: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n condition: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n version: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n tags: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .default(() => ([])),\n});\nconst helmChartValidator = joi__WEBPACK_IMPORTED_MODULE_3___default().object({\n apiVersion: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n name: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n version: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n repo: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n created: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .required(),\n digest: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n kubeVersion: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n description: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .default(\"\"),\n home: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n engine: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n icon: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n appVersion: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n tillerVersion: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n type: joi__WEBPACK_IMPORTED_MODULE_3___default().string()\n .optional(),\n deprecated: joi__WEBPACK_IMPORTED_MODULE_3___default().boolean()\n .default(false),\n keywords: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n sources: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n urls: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n maintainers: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(helmChartMaintainerValidator)\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n dependencies: joi__WEBPACK_IMPORTED_MODULE_3___default().array()\n .items(helmChartDependencyValidator)\n .options({\n stripUnknown: {\n arrays: true,\n },\n })\n .default(() => ([])),\n annotations: joi__WEBPACK_IMPORTED_MODULE_3___default().object({})\n .pattern(/.*/, joi__WEBPACK_IMPORTED_MODULE_3___default().string())\n .default(() => ({})),\n});\nclass HelmChart {\n constructor(value) {\n this.apiVersion = value.apiVersion;\n this.name = value.name;\n this.version = value.version;\n this.repo = value.repo;\n this.kubeVersion = value.kubeVersion;\n this.created = value.created;\n this.description = value.description;\n this.digest = value.digest;\n this.keywords = value.keywords;\n this.home = value.home;\n this.sources = value.sources;\n this.maintainers = value.maintainers;\n this.engine = value.engine;\n this.icon = value.icon;\n this.apiVersion = value.apiVersion;\n this.deprecated = value.deprecated;\n this.tillerVersion = value.tillerVersion;\n this.annotations = value.annotations;\n this.urls = value.urls;\n this.dependencies = value.dependencies;\n this.type = value.type;\n (0,_utils__WEBPACK_IMPORTED_MODULE_2__.autoBind)(this);\n }\n static create(data, { onError = \"throw\" } = {}) {\n const { value, error } = helmChartValidator.validate(data, {\n abortEarly: false,\n });\n if (!error) {\n return new HelmChart(value);\n }\n const [actualErrors, unknownDetails] = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.bifurcateArray)(error.details, ({ type }) => type === \"object.unknown\");\n if (unknownDetails.length > 0) {\n console.warn(\"HelmChart data has unexpected fields\", { original: data, unknownFields: unknownDetails.flatMap(d => d.path) });\n }\n if (actualErrors.length === 0) {\n return new HelmChart(value);\n }\n const validationError = new (joi__WEBPACK_IMPORTED_MODULE_3___default().ValidationError)(actualErrors.map(er => er.message).join(\". \"), actualErrors, error._original);\n if (onError === \"throw\") {\n throw validationError;\n }\n console.warn(\"[HELM-CHART]: failed to validate data\", data, validationError);\n return undefined;\n }\n getId() {\n const digestPart = this.digest\n ? `+${this.digest}`\n : \"\";\n return `${this.repo}:${this.apiVersion}/${this.name}@${this.getAppVersion()}${digestPart}`;\n }\n getName() {\n return this.name;\n }\n getFullName(seperator = \"/\") {\n return [this.getRepository(), this.getName()].join(seperator);\n }\n getDescription() {\n return this.description;\n }\n getIcon() {\n return this.icon;\n }\n getHome() {\n return this.home;\n }\n getMaintainers() {\n return this.maintainers;\n }\n getVersion() {\n return this.version;\n }\n getRepository() {\n return this.repo;\n }\n getAppVersion() {\n return this.appVersion;\n }\n getKeywords() {\n return this.keywords;\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s-api/endpoints/helm-charts.api.ts?");
|
|
32704
32738
|
|
|
32705
32739
|
/***/ }),
|
|
32706
32740
|
|
|
@@ -33815,6 +33849,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
33815
33849
|
|
|
33816
33850
|
/***/ }),
|
|
33817
33851
|
|
|
33852
|
+
/***/ "./src/common/utils/lazy-initialized.ts":
|
|
33853
|
+
/*!**********************************************!*\
|
|
33854
|
+
!*** ./src/common/utils/lazy-initialized.ts ***!
|
|
33855
|
+
\**********************************************/
|
|
33856
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
33857
|
+
|
|
33858
|
+
"use strict";
|
|
33859
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"lazyInitialized\": () => (/* binding */ lazyInitialized)\n/* harmony export */ });\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n/**\n * A function to make a `OnceCell<T>`\n */\nfunction lazyInitialized(builder) {\n let value;\n let called = false;\n return {\n get() {\n if (called) {\n return value;\n }\n value = builder();\n called = true;\n return value;\n },\n };\n}\n\n\n//# sourceURL=webpack://open-lens/./src/common/utils/lazy-initialized.ts?");
|
|
33860
|
+
|
|
33861
|
+
/***/ }),
|
|
33862
|
+
|
|
33818
33863
|
/***/ "./src/common/utils/n-fircate.ts":
|
|
33819
33864
|
/*!***************************************!*\
|
|
33820
33865
|
!*** ./src/common/utils/n-fircate.ts ***!
|
|
@@ -33976,7 +34021,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
33976
34021
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
33977
34022
|
|
|
33978
34023
|
"use strict";
|
|
33979
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isMac\": () => (/* binding */ isMac),\n/* harmony export */ \"isWindows\": () => (/* binding */ isWindows),\n/* harmony export */ \"isLinux\": () => (/* binding */ isLinux),\n/* harmony export */ \"isDebugging\": () => (/* binding */ isDebugging),\n/* harmony export */ \"isSnap\": () => (/* binding */ isSnap),\n/* harmony export */ \"isProduction\": () => (/* binding */ isProduction),\n/* harmony export */ \"isTestEnv\": () => (/* binding */ isTestEnv),\n/* harmony export */ \"isDevelopment\": () => (/* binding */ isDevelopment),\n/* harmony export */ \"isPublishConfigured\": () => (/* binding */ isPublishConfigured),\n/* harmony export */ \"integrationTestingArg\": () => (/* binding */ integrationTestingArg),\n/* harmony export */ \"isIntegrationTesting\": () => (/* binding */ isIntegrationTesting),\n/* harmony export */ \"productName\": () => (/* binding */ productName),\n/* harmony export */ \"appName\": () => (/* binding */ appName),\n/* harmony export */ \"publicPath\": () => (/* binding */ publicPath),\n/* harmony export */ \"defaultTheme\": () => (/* binding */ defaultTheme),\n/* harmony export */ \"defaultFontSize\": () => (/* binding */ defaultFontSize),\n/* harmony export */ \"defaultTerminalFontFamily\": () => (/* binding */ defaultTerminalFontFamily),\n/* harmony export */ \"defaultEditorFontFamily\": () => (/* binding */ defaultEditorFontFamily),\n/* harmony export */ \"contextDir\": () => (/* binding */ contextDir),\n/* harmony export */ \"buildDir\": () => (/* binding */ buildDir),\n/* harmony export */ \"preloadEntrypoint\": () => (/* binding */ preloadEntrypoint),\n/* harmony export */ \"mainDir\": () => (/* binding */ mainDir),\n/* harmony export */ \"rendererDir\": () => (/* binding */ rendererDir),\n/* harmony export */ \"htmlTemplate\": () => (/* binding */ htmlTemplate),\n/* harmony export */ \"sassCommonVars\": () => (/* binding */ sassCommonVars),\n/* harmony export */ \"apiPrefix\": () => (/* binding */ apiPrefix),\n/* harmony export */ \"apiKubePrefix\": () => (/* binding */ apiKubePrefix),\n/* harmony export */ \"issuesTrackerUrl\": () => (/* binding */ issuesTrackerUrl),\n/* harmony export */ \"slackUrl\": () => (/* binding */ slackUrl),\n/* harmony export */ \"supportUrl\": () => (/* binding */ supportUrl),\n/* harmony export */ \"appSemVer\": () => (/* binding */ appSemVer),\n/* harmony export */ \"docsUrl\": () => (/* binding */ docsUrl),\n/* harmony export */ \"sentryDsn\": () => (/* binding */ sentryDsn)\n/* harmony export */ });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../package.json */ \"./package.json\");\n/* harmony import */ var _utils_defineGlobal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/defineGlobal */ \"./src/common/utils/defineGlobal.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar _a, _b, _c;\n// App's common configuration for any process (main, renderer, build pipeline, etc.)\n\n\n\n\nconst isMac = process.platform === \"darwin\";\nconst isWindows = process.platform === \"win32\";\nconst isLinux = process.platform === \"linux\";\nconst isDebugging = [\"true\", \"1\", \"yes\", \"y\", \"on\"].includes(((_a = process.env.DEBUG) !== null && _a !== void 0 ? _a : \"\").toLowerCase());\nconst isSnap = !!process.env.SNAP;\nconst isProduction = \"development\" === \"production\";\nconst isTestEnv = !!process.env.JEST_WORKER_ID;\nconst isDevelopment = !isTestEnv && !isProduction;\nconst isPublishConfigured = Object.keys(_package_json__WEBPACK_IMPORTED_MODULE_2__.build).includes(\"publish\");\nconst integrationTestingArg = \"--integration-testing\";\nconst isIntegrationTesting = process.argv.includes(integrationTestingArg);\nconst productName = _package_json__WEBPACK_IMPORTED_MODULE_2__.productName;\nconst appName = `${_package_json__WEBPACK_IMPORTED_MODULE_2__.productName}${isDevelopment ? \"Dev\" : \"\"}`;\nconst publicPath = \"/build/\";\nconst defaultTheme = \"lens-dark\";\nconst defaultFontSize = 12;\nconst defaultTerminalFontFamily = \"RobotoMono\";\nconst defaultEditorFontFamily = \"RobotoMono\";\n// Webpack build paths\nconst contextDir = process.cwd();\nconst buildDir = path__WEBPACK_IMPORTED_MODULE_0___default().join(contextDir, \"static\", publicPath);\nconst preloadEntrypoint = path__WEBPACK_IMPORTED_MODULE_0___default().join(contextDir, \"src/preload.ts\");\nconst mainDir = path__WEBPACK_IMPORTED_MODULE_0___default().join(contextDir, \"src/main\");\nconst rendererDir = path__WEBPACK_IMPORTED_MODULE_0___default().join(contextDir, \"src/renderer\");\nconst htmlTemplate = path__WEBPACK_IMPORTED_MODULE_0___default().resolve(rendererDir, \"template.html\");\nconst sassCommonVars = path__WEBPACK_IMPORTED_MODULE_0___default().resolve(rendererDir, \"components/vars.scss\");\n// Special runtime paths\n(0,_utils_defineGlobal__WEBPACK_IMPORTED_MODULE_3__.defineGlobal)(\"__static\", {\n get() {\n var _a;\n const root = isDevelopment\n ? contextDir\n : ((_a = process.resourcesPath) !== null && _a !== void 0 ? _a : contextDir);\n return path__WEBPACK_IMPORTED_MODULE_0___default().resolve(root, \"static\");\n },\n});\n// Apis\nconst apiPrefix = \"/api\"; // local router apis\nconst apiKubePrefix = \"/api-kube\"; // k8s cluster apis\n// Links\nconst issuesTrackerUrl = \"https://github.com/lensapp/lens/issues\";\nconst slackUrl = \"https://join.slack.com/t/k8slens/shared_invite/zt-wcl8jq3k-68R5Wcmk1o95MLBE5igUDQ\";\nconst supportUrl = \"https://docs.k8slens.dev/latest/support/\";\nconst appSemVer = new semver__WEBPACK_IMPORTED_MODULE_1__.SemVer(_package_json__WEBPACK_IMPORTED_MODULE_2__.version);\nconst docsUrl = \"https://docs.k8slens.dev/main/\";\nconst sentryDsn = (_c = (_b = _package_json__WEBPACK_IMPORTED_MODULE_2__.config) === null || _b === void 0 ? void 0 : _b.sentryDsn) !== null && _c !== void 0 ? _c : \"\";\n\n\n//# sourceURL=webpack://open-lens/./src/common/vars.ts?");
|
|
34024
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isMac\": () => (/* binding */ isMac),\n/* harmony export */ \"isWindows\": () => (/* binding */ isWindows),\n/* harmony export */ \"isLinux\": () => (/* binding */ isLinux),\n/* harmony export */ \"isDebugging\": () => (/* binding */ isDebugging),\n/* harmony export */ \"isSnap\": () => (/* binding */ isSnap),\n/* harmony export */ \"isProduction\": () => (/* binding */ isProduction),\n/* harmony export */ \"isTestEnv\": () => (/* binding */ isTestEnv),\n/* harmony export */ \"isDevelopment\": () => (/* binding */ isDevelopment),\n/* harmony export */ \"isPublishConfigured\": () => (/* binding */ isPublishConfigured),\n/* harmony export */ \"integrationTestingArg\": () => (/* binding */ integrationTestingArg),\n/* harmony export */ \"isIntegrationTesting\": () => (/* binding */ isIntegrationTesting),\n/* harmony export */ \"productName\": () => (/* binding */ productName),\n/* harmony export */ \"appName\": () => (/* binding */ appName),\n/* harmony export */ \"publicPath\": () => (/* binding */ publicPath),\n/* harmony export */ \"defaultTheme\": () => (/* binding */ defaultTheme),\n/* harmony export */ \"defaultFontSize\": () => (/* binding */ defaultFontSize),\n/* harmony export */ \"defaultTerminalFontFamily\": () => (/* binding */ defaultTerminalFontFamily),\n/* harmony export */ \"defaultEditorFontFamily\": () => (/* binding */ defaultEditorFontFamily),\n/* harmony export */ \"normalizedPlatform\": () => (/* binding */ normalizedPlatform),\n/* harmony export */ \"normalizedArch\": () => (/* binding */ normalizedArch),\n/* harmony export */ \"getBinaryName\": () => (/* binding */ getBinaryName),\n/* harmony export */ \"baseBinariesDir\": () => (/* binding */ baseBinariesDir),\n/* harmony export */ \"kubeAuthProxyBinaryName\": () => (/* binding */ kubeAuthProxyBinaryName),\n/* harmony export */ \"helmBinaryName\": () => (/* binding */ helmBinaryName),\n/* harmony export */ \"helmBinaryPath\": () => (/* binding */ helmBinaryPath),\n/* harmony export */ \"kubectlBinaryName\": () => (/* binding */ kubectlBinaryName),\n/* harmony export */ \"kubectlBinaryPath\": () => (/* binding */ kubectlBinaryPath),\n/* harmony export */ \"contextDir\": () => (/* binding */ contextDir),\n/* harmony export */ \"buildDir\": () => (/* binding */ buildDir),\n/* harmony export */ \"preloadEntrypoint\": () => (/* binding */ preloadEntrypoint),\n/* harmony export */ \"mainDir\": () => (/* binding */ mainDir),\n/* harmony export */ \"rendererDir\": () => (/* binding */ rendererDir),\n/* harmony export */ \"htmlTemplate\": () => (/* binding */ htmlTemplate),\n/* harmony export */ \"sassCommonVars\": () => (/* binding */ sassCommonVars),\n/* harmony export */ \"apiPrefix\": () => (/* binding */ apiPrefix),\n/* harmony export */ \"apiKubePrefix\": () => (/* binding */ apiKubePrefix),\n/* harmony export */ \"issuesTrackerUrl\": () => (/* binding */ issuesTrackerUrl),\n/* harmony export */ \"slackUrl\": () => (/* binding */ slackUrl),\n/* harmony export */ \"supportUrl\": () => (/* binding */ supportUrl),\n/* harmony export */ \"appSemVer\": () => (/* binding */ appSemVer),\n/* harmony export */ \"docsUrl\": () => (/* binding */ docsUrl),\n/* harmony export */ \"sentryDsn\": () => (/* binding */ sentryDsn)\n/* harmony export */ });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../package.json */ \"./package.json\");\n/* harmony import */ var _utils_defineGlobal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/defineGlobal */ \"./src/common/utils/defineGlobal.ts\");\n/* harmony import */ var _utils_lazy_initialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/lazy-initialized */ \"./src/common/utils/lazy-initialized.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar _a, _b, _c;\n// App's common configuration for any process (main, renderer, build pipeline, etc.)\n\n\n\n\n\nconst isMac = process.platform === \"darwin\";\nconst isWindows = process.platform === \"win32\";\nconst isLinux = process.platform === \"linux\";\nconst isDebugging = [\"true\", \"1\", \"yes\", \"y\", \"on\"].includes(((_a = process.env.DEBUG) !== null && _a !== void 0 ? _a : \"\").toLowerCase());\nconst isSnap = !!process.env.SNAP;\nconst isProduction = \"development\" === \"production\";\nconst isTestEnv = !!process.env.JEST_WORKER_ID;\nconst isDevelopment = !isTestEnv && !isProduction;\nconst isPublishConfigured = Object.keys(_package_json__WEBPACK_IMPORTED_MODULE_2__.build).includes(\"publish\");\nconst integrationTestingArg = \"--integration-testing\";\nconst isIntegrationTesting = process.argv.includes(integrationTestingArg);\nconst productName = _package_json__WEBPACK_IMPORTED_MODULE_2__.productName;\nconst appName = `${_package_json__WEBPACK_IMPORTED_MODULE_2__.productName}${isDevelopment ? \"Dev\" : \"\"}`;\nconst publicPath = \"/build/\";\nconst defaultTheme = \"lens-dark\";\nconst defaultFontSize = 12;\nconst defaultTerminalFontFamily = \"RobotoMono\";\nconst defaultEditorFontFamily = \"RobotoMono\";\nconst normalizedPlatform = (() => {\n switch (process.platform) {\n case \"darwin\":\n return \"darwin\";\n case \"linux\":\n return \"linux\";\n case \"win32\":\n return \"windows\";\n default:\n throw new Error(`platform=${process.platform} is unsupported`);\n }\n})();\nconst normalizedArch = (() => {\n switch (process.arch) {\n case \"arm64\":\n return \"arm64\";\n case \"x64\":\n case \"amd64\":\n return \"x64\";\n case \"386\":\n case \"x32\":\n case \"ia32\":\n return \"ia32\";\n default:\n throw new Error(`arch=${process.arch} is unsupported`);\n }\n})();\nfunction getBinaryName(name, { forPlatform = normalizedPlatform } = {}) {\n if (forPlatform === \"windows\") {\n return `${name}.exe`;\n }\n return name;\n}\nconst resourcesDir = (0,_utils_lazy_initialized__WEBPACK_IMPORTED_MODULE_4__.lazyInitialized)(() => (isProduction\n ? process.resourcesPath\n : path__WEBPACK_IMPORTED_MODULE_0___default().join(process.cwd(), \"binaries\", \"client\", normalizedPlatform)));\nconst baseBinariesDir = (0,_utils_lazy_initialized__WEBPACK_IMPORTED_MODULE_4__.lazyInitialized)(() => path__WEBPACK_IMPORTED_MODULE_0___default().join(resourcesDir.get(), normalizedArch));\nconst kubeAuthProxyBinaryName = getBinaryName(\"lens-k8s-proxy\");\nconst helmBinaryName = getBinaryName(\"helm\");\nconst helmBinaryPath = (0,_utils_lazy_initialized__WEBPACK_IMPORTED_MODULE_4__.lazyInitialized)(() => path__WEBPACK_IMPORTED_MODULE_0___default().join(baseBinariesDir.get(), helmBinaryName));\nconst kubectlBinaryName = getBinaryName(\"kubectl\");\nconst kubectlBinaryPath = (0,_utils_lazy_initialized__WEBPACK_IMPORTED_MODULE_4__.lazyInitialized)(() => path__WEBPACK_IMPORTED_MODULE_0___default().join(baseBinariesDir.get(), kubectlBinaryName));\n// Webpack build paths\nconst contextDir = process.cwd();\nconst buildDir = path__WEBPACK_IMPORTED_MODULE_0___default().join(contextDir, \"static\", publicPath);\nconst preloadEntrypoint = path__WEBPACK_IMPORTED_MODULE_0___default().join(contextDir, \"src/preload.ts\");\nconst mainDir = path__WEBPACK_IMPORTED_MODULE_0___default().join(contextDir, \"src/main\");\nconst rendererDir = path__WEBPACK_IMPORTED_MODULE_0___default().join(contextDir, \"src/renderer\");\nconst htmlTemplate = path__WEBPACK_IMPORTED_MODULE_0___default().resolve(rendererDir, \"template.html\");\nconst sassCommonVars = path__WEBPACK_IMPORTED_MODULE_0___default().resolve(rendererDir, \"components/vars.scss\");\n// Special runtime paths\n(0,_utils_defineGlobal__WEBPACK_IMPORTED_MODULE_3__.defineGlobal)(\"__static\", {\n get() {\n var _a;\n const root = isDevelopment\n ? contextDir\n : ((_a = process.resourcesPath) !== null && _a !== void 0 ? _a : contextDir);\n return path__WEBPACK_IMPORTED_MODULE_0___default().resolve(root, \"static\");\n },\n});\n// Apis\nconst apiPrefix = \"/api\"; // local router apis\nconst apiKubePrefix = \"/api-kube\"; // k8s cluster apis\n// Links\nconst issuesTrackerUrl = \"https://github.com/lensapp/lens/issues\";\nconst slackUrl = \"https://join.slack.com/t/k8slens/shared_invite/zt-wcl8jq3k-68R5Wcmk1o95MLBE5igUDQ\";\nconst supportUrl = \"https://docs.k8slens.dev/latest/support/\";\nconst appSemVer = new semver__WEBPACK_IMPORTED_MODULE_1__.SemVer(_package_json__WEBPACK_IMPORTED_MODULE_2__.version);\nconst docsUrl = \"https://docs.k8slens.dev/main/\";\nconst sentryDsn = (_c = (_b = _package_json__WEBPACK_IMPORTED_MODULE_2__.config) === null || _b === void 0 ? void 0 : _b.sentryDsn) !== null && _c !== void 0 ? _c : \"\";\n\n\n//# sourceURL=webpack://open-lens/./src/common/vars.ts?");
|
|
33980
34025
|
|
|
33981
34026
|
/***/ }),
|
|
33982
34027
|
|
|
@@ -34229,7 +34274,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
34229
34274
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
34230
34275
|
|
|
34231
34276
|
"use strict";
|
|
34232
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExtensionLoader\": () => (/* binding */ ExtensionLoader)\n/* harmony export */ });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! events */ \"events\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _registries__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../registries */ \"./src/extensions/registries/index.ts\");\n/* harmony import */ var _common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/ipc/extension-handling */ \"./src/common/ipc/extension-handling.ts\");\n/* harmony import */ var _renderer_ipc__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../renderer/ipc */ \"./src/renderer/ipc/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\nconst logModule = \"[EXTENSIONS-LOADER]\";\n/**\n * Loads installed extensions to the Lens application\n */\nclass ExtensionLoader {\n constructor(dependencies) {\n Object.defineProperty(this, \"dependencies\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: dependencies\n });\n Object.defineProperty(this, \"extensions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n Object.defineProperty(this, \"instances\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n /**\n * This is the set of extensions that don't come with either\n * - Main.LensExtension when running in the main process\n * - Renderer.LensExtension when running in the renderer process\n */\n Object.defineProperty(this, \"nonInstancesByName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.set()\n });\n /**\n * This is updated by the `observe` in the constructor. DO NOT write directly to it\n */\n Object.defineProperty(this, \"instancesByName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n // emits event \"remove\" of type LensExtension when the extension is removed\n Object.defineProperty(this, \"events\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new events__WEBPACK_IMPORTED_MODULE_1__.EventEmitter()\n });\n Object.defineProperty(this, \"isLoaded\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"loadOnClusterManagerRenderer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].debug(`${logModule}: load on main renderer (cluster manager)`);\n return this.autoInitExtensions(async (extension) => {\n const removeItems = [\n _registries__WEBPACK_IMPORTED_MODULE_7__.GlobalPageRegistry.getInstance().add(extension.globalPages, extension),\n _registries__WEBPACK_IMPORTED_MODULE_7__.EntitySettingRegistry.getInstance().add(extension.entitySettings),\n _registries__WEBPACK_IMPORTED_MODULE_7__.CatalogEntityDetailRegistry.getInstance().add(extension.catalogEntityDetailItems),\n ];\n this.events.on(\"remove\", (removedExtension) => {\n if (removedExtension.id === extension.id) {\n removeItems.forEach(remove => {\n remove();\n });\n }\n });\n return removeItems;\n });\n }\n });\n Object.defineProperty(this, \"loadOnClusterRenderer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (getCluster) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].debug(`${logModule}: load on cluster renderer (dashboard)`);\n this.autoInitExtensions(async (extension) => {\n // getCluster must be a callback, as the entity might be available only after an extension has been loaded\n if ((await extension.isEnabledForCluster(getCluster())) === false) {\n return [];\n }\n const removeItems = [\n _registries__WEBPACK_IMPORTED_MODULE_7__.ClusterPageRegistry.getInstance().add(extension.clusterPages, extension),\n _registries__WEBPACK_IMPORTED_MODULE_7__.ClusterPageMenuRegistry.getInstance().add(extension.clusterPageMenus, extension),\n _registries__WEBPACK_IMPORTED_MODULE_7__.KubeObjectDetailRegistry.getInstance().add(extension.kubeObjectDetailItems),\n _registries__WEBPACK_IMPORTED_MODULE_7__.KubeObjectStatusRegistry.getInstance().add(extension.kubeObjectStatusTexts),\n _registries__WEBPACK_IMPORTED_MODULE_7__.WorkloadsOverviewDetailRegistry.getInstance().add(extension.kubeWorkloadsOverviewItems),\n ];\n this.events.on(\"remove\", (removedExtension) => {\n if (removedExtension.id === extension.id) {\n removeItems.forEach(remove => {\n remove();\n });\n }\n });\n return removeItems;\n });\n }\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.makeObservable)(this);\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.observe)(this.instances, change => {\n switch (change.type) {\n case \"add\":\n if (this.instancesByName.has(change.newValue.name)) {\n throw new TypeError(\"Extension names must be unique\");\n }\n this.instancesByName.set(change.newValue.name, change.newValue);\n break;\n case \"delete\":\n this.instancesByName.delete(change.oldValue.name);\n break;\n case \"update\":\n throw new Error(\"Extension instances shouldn't be updated\");\n }\n });\n }\n get whenLoaded() {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_10__.when)(() => this.isLoaded);\n }\n get enabledExtensionInstances() {\n return [...this.instances.values()].filter(extension => extension.isEnabled);\n }\n get userExtensions() {\n const extensions = this.toJSON();\n extensions.forEach((ext, extId) => {\n if (ext.isBundled) {\n extensions.delete(extId);\n }\n });\n return extensions;\n }\n /**\n * Get the extension instance by its manifest name\n * @param name The name of the extension\n * @returns one of the following:\n * - the instance of `Main.LensExtension` on the main process if created\n * - the instance of `Renderer.LensExtension` on the renderer process if created\n * - `null` if no class definition is provided for the current process\n * - `undefined` if the name is not known about\n */\n getInstanceByName(name) {\n if (this.nonInstancesByName.has(name)) {\n return null;\n }\n return this.instancesByName.get(name);\n }\n // Transform userExtensions to a state object for storing into ExtensionsStore\n get storeState() {\n return Object.fromEntries(Array.from(this.userExtensions)\n .map(([extId, extension]) => [extId, {\n enabled: extension.isEnabled,\n name: extension.manifest.name,\n }]));\n }\n async init() {\n if (electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer) {\n await this.initRenderer();\n }\n else {\n await this.initMain();\n }\n await Promise.all([this.whenLoaded]);\n // broadcasting extensions between main/renderer processes\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.toJSON(), () => this.broadcastExtensions(), {\n fireImmediately: true,\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.storeState, (state) => {\n this.dependencies.updateExtensionsState(state);\n });\n }\n initExtensions(extensions) {\n this.extensions.replace(extensions);\n }\n addExtension(extension) {\n this.extensions.set(extension.id, extension);\n }\n removeInstance(lensExtensionId) {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].info(`${logModule} deleting extension instance ${lensExtensionId}`);\n const instance = this.instances.get(lensExtensionId);\n if (!instance) {\n return;\n }\n try {\n instance.disable();\n this.events.emit(\"remove\", instance);\n this.instances.delete(lensExtensionId);\n this.nonInstancesByName.delete(instance.name);\n }\n catch (error) {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: deactivation extension error`, { lensExtensionId, error });\n }\n }\n removeExtension(lensExtensionId) {\n this.removeInstance(lensExtensionId);\n if (!this.extensions.delete(lensExtensionId)) {\n throw new Error(`Can't remove extension ${lensExtensionId}, doesn't exist.`);\n }\n }\n setIsEnabled(lensExtensionId, isEnabled) {\n this.extensions.get(lensExtensionId).isEnabled = isEnabled;\n }\n async initMain() {\n this.isLoaded = true;\n this.loadOnMain();\n (0,_common_ipc__WEBPACK_IMPORTED_MODULE_4__.ipcMainHandle)(_common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromMainChannel, () => {\n return Array.from(this.toJSON());\n });\n (0,_common_ipc__WEBPACK_IMPORTED_MODULE_4__.ipcMainOn)(_common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromRendererChannel, (event, extensions) => {\n this.syncExtensions(extensions);\n });\n }\n async initRenderer() {\n const extensionListHandler = (extensions) => {\n this.isLoaded = true;\n this.syncExtensions(extensions);\n const receivedExtensionIds = extensions.map(([lensExtensionId]) => lensExtensionId);\n // Remove deleted extensions in renderer side only\n this.extensions.forEach((_, lensExtensionId) => {\n if (!receivedExtensionIds.includes(lensExtensionId)) {\n this.removeExtension(lensExtensionId);\n }\n });\n };\n (0,_renderer_ipc__WEBPACK_IMPORTED_MODULE_9__.requestExtensionLoaderInitialState)().then(extensionListHandler);\n (0,_common_ipc__WEBPACK_IMPORTED_MODULE_4__.ipcRendererOn)(_common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromMainChannel, (event, extensions) => {\n extensionListHandler(extensions);\n });\n }\n broadcastExtensions() {\n const channel = electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer\n ? _common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromRendererChannel\n : _common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromMainChannel;\n (0,_common_ipc__WEBPACK_IMPORTED_MODULE_4__.broadcastMessage)(channel, Array.from(this.extensions));\n }\n syncExtensions(extensions) {\n extensions.forEach(([lensExtensionId, extension]) => {\n if (!(0,lodash__WEBPACK_IMPORTED_MODULE_2__.isEqual)(this.extensions.get(lensExtensionId), extension)) {\n this.extensions.set(lensExtensionId, extension);\n }\n });\n }\n loadOnMain() {\n this.autoInitExtensions(() => Promise.resolve([]));\n }\n async loadExtensions(installedExtensions, register) {\n // Steps of the function:\n // 1. require and call .activate for each Extension\n // 2. Wait until every extension's onActivate has been resolved\n // 3. Call .enable for each extension\n // 4. Return ExtensionLoading[]\n const extensions = [...installedExtensions.entries()]\n .map(([extId, extension]) => {\n const alreadyInit = this.instances.has(extId) || this.nonInstancesByName.has(extension.manifest.name);\n if (extension.isCompatible && extension.isEnabled && !alreadyInit) {\n try {\n const LensExtensionClass = this.requireExtension(extension);\n if (!LensExtensionClass) {\n this.nonInstancesByName.add(extension.manifest.name);\n return null;\n }\n const instance = this.dependencies.createExtensionInstance(LensExtensionClass, extension);\n this.instances.set(extId, instance);\n return {\n instance,\n installedExtension: extension,\n activated: instance.activate(),\n };\n }\n catch (err) {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: error loading extension`, { ext: extension, err });\n }\n }\n else if (!extension.isEnabled && alreadyInit) {\n this.removeInstance(extId);\n }\n return null;\n })\n // Remove null values\n .filter(extension => Boolean(extension));\n // We first need to wait until each extension's `onActivate` is resolved or rejected,\n // as this might register new catalog categories. Afterwards we can safely .enable the extension.\n await Promise.all(extensions.map(extension => \n // If extension activation fails, log error\n extension.activated.catch((error) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: activation extension error`, { ext: extension.installedExtension, error });\n })));\n // Return ExtensionLoading[]\n return extensions.map(extension => {\n const loaded = extension.instance.enable(register).catch((err) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: failed to enable`, { ext: extension, err });\n });\n return {\n isBundled: extension.installedExtension.isBundled,\n loaded,\n };\n });\n }\n autoInitExtensions(register) {\n // Setup reaction to load extensions on JSON changes\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.toJSON(), installedExtensions => this.loadExtensions(installedExtensions, register));\n // Load initial extensions\n return this.loadExtensions(this.toJSON(), register);\n }\n requireExtension(extension) {\n const entryPointName = electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer ? \"renderer\" : \"main\";\n const extRelativePath = extension.manifest[entryPointName];\n if (!extRelativePath) {\n return null;\n }\n const extAbsolutePath = path__WEBPACK_IMPORTED_MODULE_3___default().resolve(path__WEBPACK_IMPORTED_MODULE_3___default().join(path__WEBPACK_IMPORTED_MODULE_3___default().dirname(extension.manifestPath), extRelativePath));\n try {\n return require(extAbsolutePath).default;\n }\n catch (error) {\n if (electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer) {\n console.error(`${logModule}: can't load ${entryPointName} for \"${extension.manifest.name}\": ${error.stack || error}`, extension);\n }\n else {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: can't load ${entryPointName} for \"${extension.manifest.name}\": ${error}`, { extension });\n }\n }\n return null;\n }\n getExtension(extId) {\n return this.extensions.get(extId);\n }\n getInstanceById(extId) {\n return this.instances.get(extId);\n }\n toJSON() {\n return (0,_common_utils__WEBPACK_IMPORTED_MODULE_5__.toJS)(this.extensions);\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], ExtensionLoader.prototype, \"isLoaded\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ExtensionLoader.prototype, \"enabledExtensionInstances\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Map),\n __metadata(\"design:paramtypes\", [])\n], ExtensionLoader.prototype, \"userExtensions\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], ExtensionLoader.prototype, \"storeState\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], ExtensionLoader.prototype, \"init\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], ExtensionLoader.prototype, \"removeInstance\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/extensions/extension-loader/extension-loader.ts?");
|
|
34277
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ExtensionLoader\": () => (/* binding */ ExtensionLoader)\n/* harmony export */ });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! events */ \"events\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _registries__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../registries */ \"./src/extensions/registries/index.ts\");\n/* harmony import */ var _common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../common/ipc/extension-handling */ \"./src/common/ipc/extension-handling.ts\");\n/* harmony import */ var _renderer_ipc__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../renderer/ipc */ \"./src/renderer/ipc/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\nconst logModule = \"[EXTENSIONS-LOADER]\";\n/**\n * Loads installed extensions to the Lens application\n */\nclass ExtensionLoader {\n constructor(dependencies) {\n Object.defineProperty(this, \"dependencies\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: dependencies\n });\n Object.defineProperty(this, \"extensions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n Object.defineProperty(this, \"instances\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n /**\n * This is the set of extensions that don't come with either\n * - Main.LensExtension when running in the main process\n * - Renderer.LensExtension when running in the renderer process\n */\n Object.defineProperty(this, \"nonInstancesByName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.set()\n });\n /**\n * This is updated by the `observe` in the constructor. DO NOT write directly to it\n */\n Object.defineProperty(this, \"instancesByName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n // emits event \"remove\" of type LensExtension when the extension is removed\n Object.defineProperty(this, \"events\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new events__WEBPACK_IMPORTED_MODULE_1__.EventEmitter()\n });\n Object.defineProperty(this, \"isLoaded\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"loadOnClusterManagerRenderer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].debug(`${logModule}: load on main renderer (cluster manager)`);\n return this.autoInitExtensions(async (extension) => {\n const removeItems = [\n _registries__WEBPACK_IMPORTED_MODULE_7__.GlobalPageRegistry.getInstance().add(extension.globalPages, extension),\n _registries__WEBPACK_IMPORTED_MODULE_7__.EntitySettingRegistry.getInstance().add(extension.entitySettings),\n _registries__WEBPACK_IMPORTED_MODULE_7__.CatalogEntityDetailRegistry.getInstance().add(extension.catalogEntityDetailItems),\n ];\n this.events.on(\"remove\", (removedExtension) => {\n if (removedExtension.id === extension.id) {\n removeItems.forEach(remove => {\n remove();\n });\n }\n });\n return removeItems;\n });\n }\n });\n Object.defineProperty(this, \"loadOnClusterRenderer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (getCluster) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].debug(`${logModule}: load on cluster renderer (dashboard)`);\n this.autoInitExtensions(async (extension) => {\n // getCluster must be a callback, as the entity might be available only after an extension has been loaded\n if ((await extension.isEnabledForCluster(getCluster())) === false) {\n return [];\n }\n const removeItems = [\n _registries__WEBPACK_IMPORTED_MODULE_7__.ClusterPageRegistry.getInstance().add(extension.clusterPages, extension),\n _registries__WEBPACK_IMPORTED_MODULE_7__.ClusterPageMenuRegistry.getInstance().add(extension.clusterPageMenus, extension),\n _registries__WEBPACK_IMPORTED_MODULE_7__.KubeObjectDetailRegistry.getInstance().add(extension.kubeObjectDetailItems),\n ];\n this.events.on(\"remove\", (removedExtension) => {\n if (removedExtension.id === extension.id) {\n removeItems.forEach(remove => {\n remove();\n });\n }\n });\n return removeItems;\n });\n }\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.makeObservable)(this);\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.observe)(this.instances, change => {\n switch (change.type) {\n case \"add\":\n if (this.instancesByName.has(change.newValue.name)) {\n throw new TypeError(\"Extension names must be unique\");\n }\n this.instancesByName.set(change.newValue.name, change.newValue);\n break;\n case \"delete\":\n this.instancesByName.delete(change.oldValue.name);\n break;\n case \"update\":\n throw new Error(\"Extension instances shouldn't be updated\");\n }\n });\n }\n get whenLoaded() {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_10__.when)(() => this.isLoaded);\n }\n get enabledExtensionInstances() {\n return [...this.instances.values()].filter(extension => extension.isEnabled);\n }\n get userExtensions() {\n const extensions = this.toJSON();\n extensions.forEach((ext, extId) => {\n if (ext.isBundled) {\n extensions.delete(extId);\n }\n });\n return extensions;\n }\n /**\n * Get the extension instance by its manifest name\n * @param name The name of the extension\n * @returns one of the following:\n * - the instance of `Main.LensExtension` on the main process if created\n * - the instance of `Renderer.LensExtension` on the renderer process if created\n * - `null` if no class definition is provided for the current process\n * - `undefined` if the name is not known about\n */\n getInstanceByName(name) {\n if (this.nonInstancesByName.has(name)) {\n return null;\n }\n return this.instancesByName.get(name);\n }\n // Transform userExtensions to a state object for storing into ExtensionsStore\n get storeState() {\n return Object.fromEntries(Array.from(this.userExtensions)\n .map(([extId, extension]) => [extId, {\n enabled: extension.isEnabled,\n name: extension.manifest.name,\n }]));\n }\n async init() {\n if (electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer) {\n await this.initRenderer();\n }\n else {\n await this.initMain();\n }\n await Promise.all([this.whenLoaded]);\n // broadcasting extensions between main/renderer processes\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.toJSON(), () => this.broadcastExtensions(), {\n fireImmediately: true,\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.storeState, (state) => {\n this.dependencies.updateExtensionsState(state);\n });\n }\n initExtensions(extensions) {\n this.extensions.replace(extensions);\n }\n addExtension(extension) {\n this.extensions.set(extension.id, extension);\n }\n removeInstance(lensExtensionId) {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].info(`${logModule} deleting extension instance ${lensExtensionId}`);\n const instance = this.instances.get(lensExtensionId);\n if (!instance) {\n return;\n }\n try {\n instance.disable();\n this.events.emit(\"remove\", instance);\n this.instances.delete(lensExtensionId);\n this.nonInstancesByName.delete(instance.name);\n }\n catch (error) {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: deactivation extension error`, { lensExtensionId, error });\n }\n }\n removeExtension(lensExtensionId) {\n this.removeInstance(lensExtensionId);\n if (!this.extensions.delete(lensExtensionId)) {\n throw new Error(`Can't remove extension ${lensExtensionId}, doesn't exist.`);\n }\n }\n setIsEnabled(lensExtensionId, isEnabled) {\n this.extensions.get(lensExtensionId).isEnabled = isEnabled;\n }\n async initMain() {\n this.isLoaded = true;\n this.loadOnMain();\n (0,_common_ipc__WEBPACK_IMPORTED_MODULE_4__.ipcMainHandle)(_common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromMainChannel, () => {\n return Array.from(this.toJSON());\n });\n (0,_common_ipc__WEBPACK_IMPORTED_MODULE_4__.ipcMainOn)(_common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromRendererChannel, (event, extensions) => {\n this.syncExtensions(extensions);\n });\n }\n async initRenderer() {\n const extensionListHandler = (extensions) => {\n this.isLoaded = true;\n this.syncExtensions(extensions);\n const receivedExtensionIds = extensions.map(([lensExtensionId]) => lensExtensionId);\n // Remove deleted extensions in renderer side only\n this.extensions.forEach((_, lensExtensionId) => {\n if (!receivedExtensionIds.includes(lensExtensionId)) {\n this.removeExtension(lensExtensionId);\n }\n });\n };\n (0,_renderer_ipc__WEBPACK_IMPORTED_MODULE_9__.requestExtensionLoaderInitialState)().then(extensionListHandler);\n (0,_common_ipc__WEBPACK_IMPORTED_MODULE_4__.ipcRendererOn)(_common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromMainChannel, (event, extensions) => {\n extensionListHandler(extensions);\n });\n }\n broadcastExtensions() {\n const channel = electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer\n ? _common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromRendererChannel\n : _common_ipc_extension_handling__WEBPACK_IMPORTED_MODULE_8__.extensionLoaderFromMainChannel;\n (0,_common_ipc__WEBPACK_IMPORTED_MODULE_4__.broadcastMessage)(channel, Array.from(this.extensions));\n }\n syncExtensions(extensions) {\n extensions.forEach(([lensExtensionId, extension]) => {\n if (!(0,lodash__WEBPACK_IMPORTED_MODULE_2__.isEqual)(this.extensions.get(lensExtensionId), extension)) {\n this.extensions.set(lensExtensionId, extension);\n }\n });\n }\n loadOnMain() {\n this.autoInitExtensions(() => Promise.resolve([]));\n }\n async loadExtensions(installedExtensions, register) {\n // Steps of the function:\n // 1. require and call .activate for each Extension\n // 2. Wait until every extension's onActivate has been resolved\n // 3. Call .enable for each extension\n // 4. Return ExtensionLoading[]\n const extensions = [...installedExtensions.entries()]\n .map(([extId, extension]) => {\n const alreadyInit = this.instances.has(extId) || this.nonInstancesByName.has(extension.manifest.name);\n if (extension.isCompatible && extension.isEnabled && !alreadyInit) {\n try {\n const LensExtensionClass = this.requireExtension(extension);\n if (!LensExtensionClass) {\n this.nonInstancesByName.add(extension.manifest.name);\n return null;\n }\n const instance = this.dependencies.createExtensionInstance(LensExtensionClass, extension);\n this.instances.set(extId, instance);\n return {\n instance,\n installedExtension: extension,\n activated: instance.activate(),\n };\n }\n catch (err) {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: error loading extension`, { ext: extension, err });\n }\n }\n else if (!extension.isEnabled && alreadyInit) {\n this.removeInstance(extId);\n }\n return null;\n })\n // Remove null values\n .filter(extension => Boolean(extension));\n // We first need to wait until each extension's `onActivate` is resolved or rejected,\n // as this might register new catalog categories. Afterwards we can safely .enable the extension.\n await Promise.all(extensions.map(extension => \n // If extension activation fails, log error\n extension.activated.catch((error) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: activation extension error`, { ext: extension.installedExtension, error });\n })));\n // Return ExtensionLoading[]\n return extensions.map(extension => {\n const loaded = extension.instance.enable(register).catch((err) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: failed to enable`, { ext: extension, err });\n });\n return {\n isBundled: extension.installedExtension.isBundled,\n loaded,\n };\n });\n }\n autoInitExtensions(register) {\n // Setup reaction to load extensions on JSON changes\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.toJSON(), installedExtensions => this.loadExtensions(installedExtensions, register));\n // Load initial extensions\n return this.loadExtensions(this.toJSON(), register);\n }\n requireExtension(extension) {\n const entryPointName = electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer ? \"renderer\" : \"main\";\n const extRelativePath = extension.manifest[entryPointName];\n if (!extRelativePath) {\n return null;\n }\n const extAbsolutePath = path__WEBPACK_IMPORTED_MODULE_3___default().resolve(path__WEBPACK_IMPORTED_MODULE_3___default().join(path__WEBPACK_IMPORTED_MODULE_3___default().dirname(extension.manifestPath), extRelativePath));\n try {\n return require(extAbsolutePath).default;\n }\n catch (error) {\n if (electron__WEBPACK_IMPORTED_MODULE_0__.ipcRenderer) {\n console.error(`${logModule}: can't load ${entryPointName} for \"${extension.manifest.name}\": ${error.stack || error}`, extension);\n }\n else {\n _main_logger__WEBPACK_IMPORTED_MODULE_6__[\"default\"].error(`${logModule}: can't load ${entryPointName} for \"${extension.manifest.name}\": ${error}`, { extension });\n }\n }\n return null;\n }\n getExtension(extId) {\n return this.extensions.get(extId);\n }\n getInstanceById(extId) {\n return this.instances.get(extId);\n }\n toJSON() {\n return (0,_common_utils__WEBPACK_IMPORTED_MODULE_5__.toJS)(this.extensions);\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], ExtensionLoader.prototype, \"isLoaded\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ExtensionLoader.prototype, \"enabledExtensionInstances\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Map),\n __metadata(\"design:paramtypes\", [])\n], ExtensionLoader.prototype, \"userExtensions\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], ExtensionLoader.prototype, \"storeState\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], ExtensionLoader.prototype, \"init\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], ExtensionLoader.prototype, \"removeInstance\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/extensions/extension-loader/extension-loader.ts?");
|
|
34233
34278
|
|
|
34234
34279
|
/***/ }),
|
|
34235
34280
|
|
|
@@ -34460,7 +34505,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
34460
34505
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
34461
34506
|
|
|
34462
34507
|
"use strict";
|
|
34463
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ClusterPageRegistry\": () => (/* reexport safe */ _page_registry__WEBPACK_IMPORTED_MODULE_0__.ClusterPageRegistry),\n/* harmony export */ \"GlobalPageRegistry\": () => (/* reexport safe */ _page_registry__WEBPACK_IMPORTED_MODULE_0__.GlobalPageRegistry),\n/* harmony export */ \"getExtensionPageUrl\": () => (/* reexport safe */ _page_registry__WEBPACK_IMPORTED_MODULE_0__.getExtensionPageUrl),\n/* harmony export */ \"ClusterPageMenuRegistry\": () => (/* reexport safe */ _page_menu_registry__WEBPACK_IMPORTED_MODULE_1__.ClusterPageMenuRegistry),\n/* harmony export */ \"KubeObjectDetailRegistry\": () => (/* reexport safe */ _kube_object_detail_registry__WEBPACK_IMPORTED_MODULE_2__.KubeObjectDetailRegistry),\n/* harmony export */ \"
|
|
34508
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ClusterPageRegistry\": () => (/* reexport safe */ _page_registry__WEBPACK_IMPORTED_MODULE_0__.ClusterPageRegistry),\n/* harmony export */ \"GlobalPageRegistry\": () => (/* reexport safe */ _page_registry__WEBPACK_IMPORTED_MODULE_0__.GlobalPageRegistry),\n/* harmony export */ \"getExtensionPageUrl\": () => (/* reexport safe */ _page_registry__WEBPACK_IMPORTED_MODULE_0__.getExtensionPageUrl),\n/* harmony export */ \"ClusterPageMenuRegistry\": () => (/* reexport safe */ _page_menu_registry__WEBPACK_IMPORTED_MODULE_1__.ClusterPageMenuRegistry),\n/* harmony export */ \"KubeObjectDetailRegistry\": () => (/* reexport safe */ _kube_object_detail_registry__WEBPACK_IMPORTED_MODULE_2__.KubeObjectDetailRegistry),\n/* harmony export */ \"EntitySettingRegistry\": () => (/* reexport safe */ _entity_setting_registry__WEBPACK_IMPORTED_MODULE_3__.EntitySettingRegistry),\n/* harmony export */ \"CatalogEntityDetailRegistry\": () => (/* reexport safe */ _catalog_entity_detail_registry__WEBPACK_IMPORTED_MODULE_4__.CatalogEntityDetailRegistry)\n/* harmony export */ });\n/* harmony import */ var _page_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./page-registry */ \"./src/extensions/registries/page-registry.ts\");\n/* harmony import */ var _page_menu_registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./page-menu-registry */ \"./src/extensions/registries/page-menu-registry.ts\");\n/* harmony import */ var _kube_object_detail_registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kube-object-detail-registry */ \"./src/extensions/registries/kube-object-detail-registry.ts\");\n/* harmony import */ var _entity_setting_registry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./entity-setting-registry */ \"./src/extensions/registries/entity-setting-registry.ts\");\n/* harmony import */ var _catalog_entity_detail_registry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./catalog-entity-detail-registry */ \"./src/extensions/registries/catalog-entity-detail-registry.ts\");\n/* harmony import */ var _protocol_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./protocol-handler */ \"./src/extensions/registries/protocol-handler.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n// All registries managed by extensions api\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://open-lens/./src/extensions/registries/index.ts?");
|
|
34464
34509
|
|
|
34465
34510
|
/***/ }),
|
|
34466
34511
|
|
|
@@ -34475,17 +34520,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
34475
34520
|
|
|
34476
34521
|
/***/ }),
|
|
34477
34522
|
|
|
34478
|
-
/***/ "./src/extensions/registries/kube-object-status-registry.ts":
|
|
34479
|
-
/*!******************************************************************!*\
|
|
34480
|
-
!*** ./src/extensions/registries/kube-object-status-registry.ts ***!
|
|
34481
|
-
\******************************************************************/
|
|
34482
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
34483
|
-
|
|
34484
|
-
"use strict";
|
|
34485
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeObjectStatusRegistry\": () => (/* binding */ KubeObjectStatusRegistry)\n/* harmony export */ });\n/* harmony import */ var _base_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base-registry */ \"./src/extensions/registries/base-registry.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\nclass KubeObjectStatusRegistry extends _base_registry__WEBPACK_IMPORTED_MODULE_0__.BaseRegistry {\n getItemsForKind(kind, apiVersion) {\n return this.getItems()\n .filter((item) => (item.kind === kind\n && item.apiVersions.includes(apiVersion)));\n }\n getItemsForObject(src) {\n return this.getItemsForKind(src.kind, src.apiVersion)\n .map(item => item.resolve(src))\n .filter(Boolean);\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/extensions/registries/kube-object-status-registry.ts?");
|
|
34486
|
-
|
|
34487
|
-
/***/ }),
|
|
34488
|
-
|
|
34489
34523
|
/***/ "./src/extensions/registries/page-menu-registry.ts":
|
|
34490
34524
|
/*!*********************************************************!*\
|
|
34491
34525
|
!*** ./src/extensions/registries/page-menu-registry.ts ***!
|
|
@@ -34519,17 +34553,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Copyright (c) OpenLen
|
|
|
34519
34553
|
|
|
34520
34554
|
/***/ }),
|
|
34521
34555
|
|
|
34522
|
-
/***/ "./src/extensions/registries/workloads-overview-detail-registry.ts":
|
|
34523
|
-
/*!*************************************************************************!*\
|
|
34524
|
-
!*** ./src/extensions/registries/workloads-overview-detail-registry.ts ***!
|
|
34525
|
-
\*************************************************************************/
|
|
34526
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
34527
|
-
|
|
34528
|
-
"use strict";
|
|
34529
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"WorkloadsOverviewDetailRegistry\": () => (/* binding */ WorkloadsOverviewDetailRegistry)\n/* harmony export */ });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base_registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base-registry */ \"./src/extensions/registries/base-registry.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\nclass WorkloadsOverviewDetailRegistry extends _base_registry__WEBPACK_IMPORTED_MODULE_1__.BaseRegistry {\n getItems() {\n return (0,lodash__WEBPACK_IMPORTED_MODULE_0__.orderBy)(super.getItems(), \"priority\", \"desc\");\n }\n getRegisteredItem(item) {\n const { priority = 50, ...rest } = item;\n return { priority, ...rest };\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/extensions/registries/workloads-overview-detail-registry.ts?");
|
|
34530
|
-
|
|
34531
|
-
/***/ }),
|
|
34532
|
-
|
|
34533
34556
|
/***/ "./src/extensions/renderer-api/catalog.ts":
|
|
34534
34557
|
/*!************************************************!*\
|
|
34535
34558
|
!*** ./src/extensions/renderer-api/catalog.ts ***!
|
|
@@ -34691,7 +34714,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
34691
34714
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
34692
34715
|
|
|
34693
34716
|
"use strict";
|
|
34694
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isLongRunningRequest\": () => (/* binding */ isLongRunningRequest),\n/* harmony export */ \"LensProxy\": () => (/* binding */ LensProxy)\n/* harmony export */ });\n/* harmony import */ var spdy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! spdy */ \"./node_modules/spdy/lib/spdy.js\");\n/* harmony import */ var spdy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(spdy__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var http_proxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! http-proxy */ \"./node_modules/http-proxy/index.js\");\n/* harmony import */ var http_proxy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(http_proxy__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/app-event-bus/event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/* harmony import */ var _utils_parse_query__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/parse-query */ \"./src/main/utils/parse-query.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\nconst watchParam = \"watch\";\nconst followParam = \"follow\";\nfunction isLongRunningRequest(reqUrl) {\n const url = new URL(reqUrl, \"http://localhost\");\n return (0,_utils_parse_query__WEBPACK_IMPORTED_MODULE_6__.getBoolean)(url.searchParams, watchParam) || (0,_utils_parse_query__WEBPACK_IMPORTED_MODULE_6__.getBoolean)(url.searchParams, followParam);\n}\n/**\n * This is the list of ports that chrome considers unsafe to allow HTTP\n * conntections to. Because they are the standard ports for processes that are\n * too forgiving in the connection types they accept.\n *\n * If we get one of these ports, the easiest thing to do is to just try again.\n *\n * Source: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc\n */\nconst disallowedPorts = new Set([\n 1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42, 43, 53, 69, 77, 79,\n 87, 95, 101, 102, 103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 137,\n 139, 143, 161, 179, 389, 427, 465, 512, 513, 514, 515, 526, 530, 531, 532,\n 540, 548, 554, 556, 563, 587, 601, 636, 989, 990, 993, 995, 1719, 1720, 1723,\n 2049, 3659, 4045, 5060, 5061, 6000, 6566, 6665, 6666, 6667, 6668, 6669, 6697,\n 10080,\n]);\nclass LensProxy extends _common_utils__WEBPACK_IMPORTED_MODULE_4__.Singleton {\n constructor(router, { shellApiRequest, kubeApiRequest, getClusterForRequest }) {\n super();\n Object.defineProperty(this, \"router\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: router\n });\n Object.defineProperty(this, \"origin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"proxyServer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"closed\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"retryCounters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"proxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: this.createProxy()\n });\n Object.defineProperty(this, \"getClusterForRequest\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"port\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.getClusterForRequest = getClusterForRequest;\n this.proxyServer = spdy__WEBPACK_IMPORTED_MODULE_0___default().createServer({\n spdy: {\n plain: true,\n protocols: [\"http/1.1\", \"spdy/3.1\"],\n },\n }, (req, res) => {\n this.handleRequest(req, res);\n });\n this.proxyServer\n .on(\"upgrade\", (req, socket, head) => {\n const isInternal = req.url.startsWith(`${_common_vars__WEBPACK_IMPORTED_MODULE_2__.apiPrefix}?`);\n const cluster = getClusterForRequest(req);\n if (!cluster) {\n return void _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[LENS-PROXY]: Could not find cluster for upgrade request from url=${req.url}`);\n }\n const reqHandler = isInternal ? shellApiRequest : kubeApiRequest;\n (async () => reqHandler({ req, socket, head, cluster }))()\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(\"[LENS-PROXY]: failed to handle proxy upgrade\", error));\n });\n }\n /**\n * Starts to listen on an OS provided port. Will reject if the server throws\n * an error.\n *\n * Resolves with the port number that was picked\n */\n attemptToListen() {\n return new Promise((resolve, reject) => {\n this.proxyServer.listen(0, \"127.0.0.1\");\n this.proxyServer\n .once(\"listening\", () => {\n this.proxyServer.removeAllListeners(\"error\"); // don't reject the promise\n const { address, port } = this.proxyServer.address();\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[LENS-PROXY]: Proxy server has started at ${address}:${port}`);\n this.proxyServer.on(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[LENS-PROXY]: Subsequent error: ${error}`);\n });\n this.port = port;\n _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_5__.appEventBus.emit({ name: \"lens-proxy\", action: \"listen\", params: { port } });\n resolve(port);\n })\n .once(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[LENS-PROXY]: Proxy server failed to start: ${error}`);\n reject(error);\n });\n });\n }\n /**\n * Starts the lens proxy.\n * @resolves After the server is listening on a good port\n * @rejects if there is an error before that happens\n */\n async listen() {\n var _a;\n const seenPorts = new Set();\n while (true) {\n (_a = this.proxyServer) === null || _a === void 0 ? void 0 : _a.close();\n const port = await this.attemptToListen();\n if (!disallowedPorts.has(port)) {\n // We didn't get a port that would result in an ERR_UNSAFE_PORT error, use it\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].warn(`[LENS-PROXY]: Proxy server has with port known to be considered unsafe to connect to by chrome, restarting...`);\n if (seenPorts.has(port)) {\n /**\n * Assume that if we have seen the port before, then the OS has looped\n * through all the ports possible and we will not be able to get a safe\n * port.\n */\n throw new Error(\"Failed to start LensProxy due to seeing too many unsafe ports. Please restart Lens.\");\n }\n else {\n seenPorts.add(port);\n }\n }\n }\n close() {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(\"[LENS-PROXY]: Closing server\");\n this.proxyServer.close();\n this.closed = true;\n }\n createProxy() {\n const proxy = http_proxy__WEBPACK_IMPORTED_MODULE_1___default().createProxyServer();\n proxy.on(\"proxyRes\", (proxyRes, req, res) => {\n const retryCounterId = this.getRequestId(req);\n if (this.retryCounters.has(retryCounterId)) {\n this.retryCounters.delete(retryCounterId);\n }\n if (!res.headersSent && req.url) {\n const url = new URL(req.url, \"http://localhost\");\n if (url.searchParams.has(\"watch\")) {\n res.statusCode = proxyRes.statusCode;\n res.flushHeaders();\n }\n }\n proxyRes.on(\"aborted\", () => {\n res.end();\n });\n });\n proxy.on(\"error\", (error, req, res, target) => {\n if (this.closed) {\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[LENS-PROXY]: http proxy errored for cluster: ${error}`, { url: req.url });\n if (target) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Failed proxy to target: ${JSON.stringify(target, null, 2)}`);\n if (req.method === \"GET\" && (!res.statusCode || res.statusCode >= 500)) {\n const reqId = this.getRequestId(req);\n const retryCount = this.retryCounters.get(reqId) || 0;\n const timeoutMs = retryCount * 250;\n if (retryCount < 20) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Retrying proxy request to url: ${reqId}`);\n setTimeout(() => {\n this.retryCounters.set(reqId, retryCount + 1);\n this.handleRequest(req, res)\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[LENS-PROXY]: failed to handle request on proxy error: ${error}`));\n }, timeoutMs);\n }\n }\n }\n try {\n res.writeHead(500).end(`Oops, something went wrong.\\n${error}`);\n }\n catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[LENS-PROXY]: Failed to write headers: `, e);\n }\n });\n return proxy;\n }\n async getProxyTarget(req, contextHandler) {\n if (req.url.startsWith(_common_vars__WEBPACK_IMPORTED_MODULE_2__.apiKubePrefix)) {\n delete req.headers.authorization;\n req.url = req.url.replace(_common_vars__WEBPACK_IMPORTED_MODULE_2__.apiKubePrefix, \"\");\n return contextHandler.getApiTarget(isLongRunningRequest(req.url));\n }\n }\n getRequestId(req) {\n return req.headers.host + req.url;\n }\n async handleRequest(req, res) {\n const cluster = this.getClusterForRequest(req);\n if (cluster) {\n const proxyTarget = await this.getProxyTarget(req, cluster.contextHandler);\n if (proxyTarget) {\n return this.proxy.web(req, res, proxyTarget);\n }\n }\n this.router.route(cluster, req, res);\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/main/lens-proxy.ts?");
|
|
34717
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"isLongRunningRequest\": () => (/* binding */ isLongRunningRequest),\n/* harmony export */ \"LensProxy\": () => (/* binding */ LensProxy)\n/* harmony export */ });\n/* harmony import */ var spdy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! spdy */ \"./node_modules/spdy/lib/spdy.js\");\n/* harmony import */ var spdy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(spdy__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/app-event-bus/event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/* harmony import */ var _utils_parse_query__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/parse-query */ \"./src/main/utils/parse-query.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\nconst watchParam = \"watch\";\nconst followParam = \"follow\";\nfunction isLongRunningRequest(reqUrl) {\n const url = new URL(reqUrl, \"http://localhost\");\n return (0,_utils_parse_query__WEBPACK_IMPORTED_MODULE_5__.getBoolean)(url.searchParams, watchParam) || (0,_utils_parse_query__WEBPACK_IMPORTED_MODULE_5__.getBoolean)(url.searchParams, followParam);\n}\n/**\n * This is the list of ports that chrome considers unsafe to allow HTTP\n * conntections to. Because they are the standard ports for processes that are\n * too forgiving in the connection types they accept.\n *\n * If we get one of these ports, the easiest thing to do is to just try again.\n *\n * Source: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc\n */\nconst disallowedPorts = new Set([\n 1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42, 43, 53, 69, 77, 79,\n 87, 95, 101, 102, 103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 137,\n 139, 143, 161, 179, 389, 427, 465, 512, 513, 514, 515, 526, 530, 531, 532,\n 540, 548, 554, 556, 563, 587, 601, 636, 989, 990, 993, 995, 1719, 1720, 1723,\n 2049, 3659, 4045, 5060, 5061, 6000, 6566, 6665, 6666, 6667, 6668, 6669, 6697,\n 10080,\n]);\nclass LensProxy extends _common_utils__WEBPACK_IMPORTED_MODULE_3__.Singleton {\n constructor(router, proxy, { shellApiRequest, kubeApiRequest, getClusterForRequest }) {\n super();\n Object.defineProperty(this, \"router\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: router\n });\n Object.defineProperty(this, \"proxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: proxy\n });\n Object.defineProperty(this, \"origin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"proxyServer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"closed\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"retryCounters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"getClusterForRequest\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"port\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.configureProxy(proxy);\n this.getClusterForRequest = getClusterForRequest;\n this.proxyServer = spdy__WEBPACK_IMPORTED_MODULE_0___default().createServer({\n spdy: {\n plain: true,\n protocols: [\"http/1.1\", \"spdy/3.1\"],\n },\n }, (req, res) => {\n this.handleRequest(req, res);\n });\n this.proxyServer\n .on(\"upgrade\", (req, socket, head) => {\n const isInternal = req.url.startsWith(`${_common_vars__WEBPACK_IMPORTED_MODULE_1__.apiPrefix}?`);\n const cluster = getClusterForRequest(req);\n if (!cluster) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: Could not find cluster for upgrade request from url=${req.url}`);\n return socket.destroy();\n }\n const reqHandler = isInternal ? shellApiRequest : kubeApiRequest;\n (async () => reqHandler({ req, socket, head, cluster }))()\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(\"[LENS-PROXY]: failed to handle proxy upgrade\", error));\n });\n }\n /**\n * Starts to listen on an OS provided port. Will reject if the server throws\n * an error.\n *\n * Resolves with the port number that was picked\n */\n attemptToListen() {\n return new Promise((resolve, reject) => {\n this.proxyServer.listen(0, \"127.0.0.1\");\n this.proxyServer\n .once(\"listening\", () => {\n this.proxyServer.removeAllListeners(\"error\"); // don't reject the promise\n const { address, port } = this.proxyServer.address();\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(`[LENS-PROXY]: Proxy server has started at ${address}:${port}`);\n this.proxyServer.on(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(`[LENS-PROXY]: Subsequent error: ${error}`);\n });\n this.port = port;\n _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_4__.appEventBus.emit({ name: \"lens-proxy\", action: \"listen\", params: { port } });\n resolve(port);\n })\n .once(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(`[LENS-PROXY]: Proxy server failed to start: ${error}`);\n reject(error);\n });\n });\n }\n /**\n * Starts the lens proxy.\n * @resolves After the server is listening on a good port\n * @rejects if there is an error before that happens\n */\n async listen() {\n var _a;\n const seenPorts = new Set();\n while (true) {\n (_a = this.proxyServer) === null || _a === void 0 ? void 0 : _a.close();\n const port = await this.attemptToListen();\n if (!disallowedPorts.has(port)) {\n // We didn't get a port that would result in an ERR_UNSAFE_PORT error, use it\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].warn(`[LENS-PROXY]: Proxy server has with port known to be considered unsafe to connect to by chrome, restarting...`);\n if (seenPorts.has(port)) {\n /**\n * Assume that if we have seen the port before, then the OS has looped\n * through all the ports possible and we will not be able to get a safe\n * port.\n */\n throw new Error(\"Failed to start LensProxy due to seeing too many unsafe ports. Please restart Lens.\");\n }\n else {\n seenPorts.add(port);\n }\n }\n }\n close() {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(\"[LENS-PROXY]: Closing server\");\n this.proxyServer.close();\n this.closed = true;\n }\n configureProxy(proxy) {\n proxy.on(\"proxyRes\", (proxyRes, req, res) => {\n const retryCounterId = this.getRequestId(req);\n if (this.retryCounters.has(retryCounterId)) {\n this.retryCounters.delete(retryCounterId);\n }\n if (!res.headersSent && req.url) {\n const url = new URL(req.url, \"http://localhost\");\n if (url.searchParams.has(\"watch\")) {\n res.statusCode = proxyRes.statusCode;\n res.flushHeaders();\n }\n }\n proxyRes.on(\"aborted\", () => {\n res.end();\n });\n });\n proxy.on(\"error\", (error, req, res, target) => {\n if (this.closed) {\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: http proxy errored for cluster: ${error}`, { url: req.url });\n if (target) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`Failed proxy to target: ${JSON.stringify(target, null, 2)}`);\n if (req.method === \"GET\" && (!res.statusCode || res.statusCode >= 500)) {\n const reqId = this.getRequestId(req);\n const retryCount = this.retryCounters.get(reqId) || 0;\n const timeoutMs = retryCount * 250;\n if (retryCount < 20) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`Retrying proxy request to url: ${reqId}`);\n setTimeout(() => {\n this.retryCounters.set(reqId, retryCount + 1);\n this.handleRequest(req, res)\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: failed to handle request on proxy error: ${error}`));\n }, timeoutMs);\n }\n }\n }\n try {\n res.writeHead(500).end(`Oops, something went wrong.\\n${error}`);\n }\n catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: Failed to write headers: `, e);\n }\n });\n return proxy;\n }\n async getProxyTarget(req, contextHandler) {\n if (req.url.startsWith(_common_vars__WEBPACK_IMPORTED_MODULE_1__.apiKubePrefix)) {\n delete req.headers.authorization;\n req.url = req.url.replace(_common_vars__WEBPACK_IMPORTED_MODULE_1__.apiKubePrefix, \"\");\n return contextHandler.getApiTarget(isLongRunningRequest(req.url));\n }\n }\n getRequestId(req) {\n return req.headers.host + req.url;\n }\n async handleRequest(req, res) {\n const cluster = this.getClusterForRequest(req);\n if (cluster) {\n const proxyTarget = await this.getProxyTarget(req, cluster.contextHandler);\n if (proxyTarget) {\n return this.proxy.web(req, res, proxyTarget);\n }\n }\n this.router.route(cluster, req, res);\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/main/lens-proxy.ts?");
|
|
34695
34718
|
|
|
34696
34719
|
/***/ }),
|
|
34697
34720
|
|
|
@@ -35186,7 +35209,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
35186
35209
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35187
35210
|
|
|
35188
35211
|
"use strict";
|
|
35189
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CronJobTriggerDialog\": () => (/* binding */ CronJobTriggerDialog)\n/* harmony export */ });\n/* harmony import */ var _cronjob_trigger_dialog_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cronjob-trigger-dialog.scss */ \"./src/renderer/components/+workloads-cronjobs/cronjob-trigger-dialog.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dialog */ \"./src/renderer/components/dialog/index.ts\");\n/* harmony import */ var _wizard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../wizard */ \"./src/renderer/components/wizard/index.ts\");\n/* harmony import */ var _common_k8s_api_endpoints__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/k8s-api/endpoints */ \"./src/common/k8s-api/endpoints/index.ts\");\n/* harmony import */ var _notifications__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../notifications */ \"./src/renderer/components/notifications/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../input */ \"./src/renderer/components/input/index.ts\");\n/* harmony import */ var _input_input_validators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../input/input_validators */ \"./src/renderer/components/input/input_validators.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar CronJobTriggerDialog_1;\n\n\n\n\n\n\n\n\n\n\n\nconst dialogState = mobx__WEBPACK_IMPORTED_MODULE_9__.observable.object({\n isOpen: false,\n data: null,\n});\nlet CronJobTriggerDialog = CronJobTriggerDialog_1 = class CronJobTriggerDialog extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"jobName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"\"\n });\n Object.defineProperty(this, \"ready\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"close\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n CronJobTriggerDialog_1.close();\n }\n });\n Object.defineProperty(this, \"onOpen\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n const { cronjob } = this;\n this.jobName = cronjob ? `${cronjob.getName()}-manual-${Math.random().toString(36).slice(2, 7)}` : \"\";\n this.jobName = this.jobName.slice(0, 63);\n this.ready = true;\n }\n });\n Object.defineProperty(this, \"onClose\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n this.ready = false;\n }\n });\n Object.defineProperty(this, \"trigger\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n const { cronjob } = this;\n const { close } = this;\n try {\n const cronjobDefinition = await _common_k8s_api_endpoints__WEBPACK_IMPORTED_MODULE_4__.cronJobApi.get({\n name: cronjob.getName(),\n namespace: cronjob.getNs(),\n });\n await _common_k8s_api_endpoints__WEBPACK_IMPORTED_MODULE_4__.jobApi.create({\n name: this.jobName,\n namespace: cronjob.getNs(),\n }, {\n spec: cronjobDefinition.spec.jobTemplate.spec,\n metadata: {\n ownerReferences: [{\n apiVersion: cronjob.apiVersion,\n blockOwnerDeletion: true,\n controller: true,\n kind: cronjob.kind,\n name: cronjob.metadata.name,\n uid: cronjob.metadata.uid,\n }],\n },\n });\n close();\n }\n catch (err) {\n _notifications__WEBPACK_IMPORTED_MODULE_5__.Notifications.error(err);\n }\n }\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_9__.makeObservable)(this);\n }\n static open(cronjob) {\n dialogState.isOpen = true;\n dialogState.data = cronjob;\n }\n static close() {\n dialogState.isOpen = false;\n }\n get cronjob() {\n return dialogState.data;\n }\n renderContents() {\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"flex gaps\" }, \"Job name:\"),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"flex gaps\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_input__WEBPACK_IMPORTED_MODULE_7__.Input, { required: true, autoFocus: true, placeholder: this.jobName, trim: true, validators: [_input_input_validators__WEBPACK_IMPORTED_MODULE_8__.systemName, _input_input_validators__WEBPACK_IMPORTED_MODULE_8__.maxLength], maxLength: 63, value: this.jobName, onChange: v => this.jobName = v.toLowerCase(), className: \"box grow\" }))));\n }\n render() {\n const { className, ...dialogProps } = this.props;\n const cronjobName = this.cronjob ? this.cronjob.getName() : \"\";\n const header = (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"h5\", null,\n \"Trigger CronJob \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", null, cronjobName)));\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_dialog__WEBPACK_IMPORTED_MODULE_2__.Dialog, { ...dialogProps, isOpen: dialogState.isOpen, className: (0,_utils__WEBPACK_IMPORTED_MODULE_6__.cssNames)(\"CronJobTriggerDialog\", className), onOpen: this.onOpen, onClose: this.onClose, close: this.close },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_wizard__WEBPACK_IMPORTED_MODULE_3__.Wizard, { header: header, done: this.close },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_wizard__WEBPACK_IMPORTED_MODULE_3__.WizardStep, { contentClass: \"flex gaps column\", next: this.trigger, nextLabel: \"Trigger\", disabledNext: !this.ready }, this.renderContents()))));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.observable,\n __metadata(\"design:type\", Object)\n], CronJobTriggerDialog.prototype, \"jobName\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.observable,\n __metadata(\"design:type\", Object)\n], CronJobTriggerDialog.prototype, \"ready\", void 0);\nCronJobTriggerDialog = CronJobTriggerDialog_1 = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], CronJobTriggerDialog);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+workloads-cronjobs/cronjob-trigger-dialog.tsx?");
|
|
35212
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CronJobTriggerDialog\": () => (/* binding */ CronJobTriggerDialog)\n/* harmony export */ });\n/* harmony import */ var _cronjob_trigger_dialog_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cronjob-trigger-dialog.scss */ \"./src/renderer/components/+workloads-cronjobs/cronjob-trigger-dialog.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dialog */ \"./src/renderer/components/dialog/index.ts\");\n/* harmony import */ var _wizard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../wizard */ \"./src/renderer/components/wizard/index.ts\");\n/* harmony import */ var _common_k8s_api_endpoints__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/k8s-api/endpoints */ \"./src/common/k8s-api/endpoints/index.ts\");\n/* harmony import */ var _notifications__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../notifications */ \"./src/renderer/components/notifications/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../input */ \"./src/renderer/components/input/index.ts\");\n/* harmony import */ var _input_input_validators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../input/input_validators */ \"./src/renderer/components/input/input_validators.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar CronJobTriggerDialog_1;\n\n\n\n\n\n\n\n\n\n\n\nconst dialogState = mobx__WEBPACK_IMPORTED_MODULE_9__.observable.object({\n isOpen: false,\n data: null,\n});\nlet CronJobTriggerDialog = CronJobTriggerDialog_1 = class CronJobTriggerDialog extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"jobName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"\"\n });\n Object.defineProperty(this, \"ready\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"close\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n CronJobTriggerDialog_1.close();\n }\n });\n Object.defineProperty(this, \"onOpen\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n const { cronjob } = this;\n this.jobName = cronjob ? `${cronjob.getName()}-manual-${Math.random().toString(36).slice(2, 7)}` : \"\";\n this.jobName = this.jobName.slice(0, 63);\n this.ready = true;\n }\n });\n Object.defineProperty(this, \"onClose\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n this.ready = false;\n }\n });\n Object.defineProperty(this, \"trigger\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: async () => {\n const { cronjob } = this;\n const { close } = this;\n try {\n const cronjobDefinition = await _common_k8s_api_endpoints__WEBPACK_IMPORTED_MODULE_4__.cronJobApi.get({\n name: cronjob.getName(),\n namespace: cronjob.getNs(),\n });\n await _common_k8s_api_endpoints__WEBPACK_IMPORTED_MODULE_4__.jobApi.create({\n name: this.jobName,\n namespace: cronjob.getNs(),\n }, {\n spec: cronjobDefinition.spec.jobTemplate.spec,\n metadata: {\n annotations: { \"cronjob.kubernetes.io/instantiate\": \"manual\" },\n ownerReferences: [{\n apiVersion: cronjob.apiVersion,\n blockOwnerDeletion: true,\n controller: true,\n kind: cronjob.kind,\n name: cronjob.metadata.name,\n uid: cronjob.metadata.uid,\n }],\n },\n });\n close();\n }\n catch (err) {\n _notifications__WEBPACK_IMPORTED_MODULE_5__.Notifications.error(err);\n }\n }\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_9__.makeObservable)(this);\n }\n static open(cronjob) {\n dialogState.isOpen = true;\n dialogState.data = cronjob;\n }\n static close() {\n dialogState.isOpen = false;\n }\n get cronjob() {\n return dialogState.data;\n }\n renderContents() {\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"flex gaps\" }, \"Job name:\"),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"flex gaps\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_input__WEBPACK_IMPORTED_MODULE_7__.Input, { required: true, autoFocus: true, placeholder: this.jobName, trim: true, validators: [_input_input_validators__WEBPACK_IMPORTED_MODULE_8__.systemName, _input_input_validators__WEBPACK_IMPORTED_MODULE_8__.maxLength], maxLength: 63, value: this.jobName, onChange: v => this.jobName = v.toLowerCase(), className: \"box grow\" }))));\n }\n render() {\n const { className, ...dialogProps } = this.props;\n const cronjobName = this.cronjob ? this.cronjob.getName() : \"\";\n const header = (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"h5\", null,\n \"Trigger CronJob \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", null, cronjobName)));\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_dialog__WEBPACK_IMPORTED_MODULE_2__.Dialog, { ...dialogProps, isOpen: dialogState.isOpen, className: (0,_utils__WEBPACK_IMPORTED_MODULE_6__.cssNames)(\"CronJobTriggerDialog\", className), onOpen: this.onOpen, onClose: this.onClose, close: this.close },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_wizard__WEBPACK_IMPORTED_MODULE_3__.Wizard, { header: header, done: this.close },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_wizard__WEBPACK_IMPORTED_MODULE_3__.WizardStep, { contentClass: \"flex gaps column\", next: this.trigger, nextLabel: \"Trigger\", disabledNext: !this.ready }, this.renderContents()))));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.observable,\n __metadata(\"design:type\", Object)\n], CronJobTriggerDialog.prototype, \"jobName\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.observable,\n __metadata(\"design:type\", Object)\n], CronJobTriggerDialog.prototype, \"ready\", void 0);\nCronJobTriggerDialog = CronJobTriggerDialog_1 = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], CronJobTriggerDialog);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+workloads-cronjobs/cronjob-trigger-dialog.tsx?");
|
|
35190
35213
|
|
|
35191
35214
|
/***/ }),
|
|
35192
35215
|
|
|
@@ -36110,7 +36133,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
36110
36133
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
36111
36134
|
|
|
36112
36135
|
"use strict";
|
|
36113
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ItemListLayoutContent\": () => (/* binding */ ItemListLayoutContent)\n/* harmony export */ });\n/* harmony import */ var _item_list_layout_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./item-list-layout.scss */ \"./src/renderer/components/item-object-list/item-list-layout.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react-lite/es/index.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _confirm_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../confirm-dialog */ \"./src/renderer/components/confirm-dialog/index.ts\");\n/* harmony import */ var _table__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../table */ \"./src/renderer/components/table/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _add_remove_buttons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../add-remove-buttons */ \"./src/renderer/components/add-remove-buttons/index.ts\");\n/* harmony import */ var _no_items__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../no-items */ \"./src/renderer/components/no-items/index.ts\");\n/* harmony import */ var _spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../spinner */ \"./src/renderer/components/spinner/index.ts\");\n/* harmony import */ var _page_filters_store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./page-filters.store */ \"./src/renderer/components/item-object-list/page-filters.store.ts\");\n/* harmony import */ var _theme_store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../theme.store */ \"./src/renderer/theme.store.ts\");\n/* harmony import */ var _menu_menu_actions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../menu/menu-actions */ \"./src/renderer/components/menu/menu-actions.tsx\");\n/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../menu */ \"./src/renderer/components/menu/index.ts\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../checkbox */ \"./src/renderer/components/checkbox/index.ts\");\n/* harmony import */ var _common_user_store__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/user-store */ \"./src/common/user-store/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet ItemListLayoutContent = class ItemListLayoutContent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n (0,mobx__WEBPACK_IMPORTED_MODULE_14__.makeObservable)(this);\n }\n get failedToLoad() {\n return this.props.store.failedLoading;\n }\n getRow(uid) {\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { key: uid },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(mobx_react__WEBPACK_IMPORTED_MODULE_15__.Observer, null, () => {\n const { isSelectable, renderTableHeader, renderTableContents, renderItemMenu, store, hasDetailsView, onDetails, copyClassNameFromHeadCells, customizeTableRowProps, detailsItem, } = this.props;\n const { isSelected } = store;\n const item = this.props.getItems().find(item => item.getId() == uid);\n if (!item)\n return null;\n const itemId = item.getId();\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableRow, { nowrap: true, searchItem: item, sortItem: item, selected: detailsItem && detailsItem.getId() === itemId, onClick: hasDetailsView ? (0,_utils__WEBPACK_IMPORTED_MODULE_4__.prevDefault)(() => onDetails(item)) : undefined, ...customizeTableRowProps(item) },\n isSelectable && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { checkbox: true, isChecked: isSelected(item), onClick: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.prevDefault)(() => store.toggleSelection(item)) })),\n renderTableContents(item).map((content, index) => {\n const cellProps = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.isReactNode)(content)\n ? { children: content }\n : content;\n const headCell = renderTableHeader === null || renderTableHeader === void 0 ? void 0 : renderTableHeader[index];\n if (copyClassNameFromHeadCells && headCell) {\n cellProps.className = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(cellProps.className, headCell.className);\n }\n if (!headCell || this.showColumn(headCell)) {\n return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { key: index, ...cellProps });\n }\n return null;\n }),\n renderItemMenu && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { className: \"menu\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { onClick: _utils__WEBPACK_IMPORTED_MODULE_4__.stopPropagation }, renderItemMenu(item, store))))));\n })));\n }\n removeItemsDialog(selectedItems) {\n const { customizeRemoveDialog, store } = this.props;\n const visibleMaxNamesCount = 5;\n const selectedNames = selectedItems.map(ns => ns.getName()).slice(0, visibleMaxNamesCount).join(\", \");\n const dialogCustomProps = customizeRemoveDialog ? customizeRemoveDialog(selectedItems) : {};\n const selectedCount = selectedItems.length;\n const tailCount = selectedCount > visibleMaxNamesCount\n ? selectedCount - visibleMaxNamesCount\n : 0;\n const tail = tailCount > 0\n ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n \", and \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"b\", null, tailCount),\n \" more\")\n : null;\n const message = selectedCount <= 1\n ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n \"Remove item \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"b\", null, selectedNames),\n \"?\")\n : react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n \"Remove \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"b\", null, selectedCount),\n \" items \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"b\", null, selectedNames),\n tail,\n \"?\");\n const onConfirm = store.removeItems\n ? () => store.removeItems(selectedItems)\n : store.removeSelectedItems;\n _confirm_dialog__WEBPACK_IMPORTED_MODULE_2__.ConfirmDialog.open({\n ok: onConfirm,\n labelOk: \"Remove\",\n message,\n ...dialogCustomProps,\n });\n }\n renderNoItems() {\n if (this.failedToLoad) {\n return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_no_items__WEBPACK_IMPORTED_MODULE_6__.NoItems, null, this.props.failedToLoadMessage);\n }\n if (!this.props.getIsReady()) {\n return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_spinner__WEBPACK_IMPORTED_MODULE_7__.Spinner, { center: true });\n }\n if (this.props.getFilters().length > 0) {\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_no_items__WEBPACK_IMPORTED_MODULE_6__.NoItems, null,\n \"No items found.\",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"a\", { onClick: () => _page_filters_store__WEBPACK_IMPORTED_MODULE_8__.pageFilters.reset(), className: \"contrast\" }, \"Reset filters?\"))));\n }\n return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_no_items__WEBPACK_IMPORTED_MODULE_6__.NoItems, null);\n }\n renderItems() {\n if (this.props.virtual) {\n return null;\n }\n return this.props.getItems().map(item => this.getRow(item.getId()));\n }\n renderTableHeader() {\n const { customizeTableRowProps, renderTableHeader, isSelectable, isConfigurable, store } = this.props;\n if (!renderTableHeader) {\n return null;\n }\n const enabledItems = this.props.getItems().filter(item => !customizeTableRowProps(item).disabled);\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableHead, { showTopLine: true, nowrap: true },\n isSelectable && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(mobx_react__WEBPACK_IMPORTED_MODULE_15__.Observer, null, () => (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { checkbox: true, isChecked: store.isSelectedAll(enabledItems), onClick: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.prevDefault)(() => store.toggleSelectionAll(enabledItems)) })))),\n renderTableHeader.map((cellProps, index) => {\n var _a;\n return (this.showColumn(cellProps) && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { key: (_a = cellProps.id) !== null && _a !== void 0 ? _a : index, ...cellProps })));\n }),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { className: \"menu\" }, isConfigurable && this.renderColumnVisibilityMenu())));\n }\n render() {\n const { store, hasDetailsView, addRemoveButtons = {}, virtual, sortingCallbacks, detailsItem, className, tableProps = {}, tableId, getItems, } = this.props;\n const selectedItemId = detailsItem && detailsItem.getId();\n const classNames = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(className, \"box\", \"grow\", _theme_store__WEBPACK_IMPORTED_MODULE_9__.ThemeStore.getInstance().activeTheme.type);\n const items = getItems();\n const selectedItems = store.pickOnlySelected(items);\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"items box grow flex column\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.Table, { tableId: tableId, virtual: virtual, selectable: hasDetailsView, sortable: sortingCallbacks, getTableRow: this.getRow, items: items, selectedItemId: selectedItemId, noItems: this.renderNoItems(), className: classNames, ...tableProps },\n this.renderTableHeader(),\n this.renderItems()),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(mobx_react__WEBPACK_IMPORTED_MODULE_15__.Observer, null, () => (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_add_remove_buttons__WEBPACK_IMPORTED_MODULE_5__.AddRemoveButtons, { onRemove: (store.removeItems || store.removeSelectedItems) && selectedItems.length > 0\n ? () => this.removeItemsDialog(selectedItems)\n : null, removeTooltip: `Remove selected items (${selectedItems.length})`, ...addRemoveButtons })))));\n }\n showColumn({ id: columnId, showWithColumn }) {\n const { tableId, isConfigurable } = this.props;\n return !isConfigurable || !_common_user_store__WEBPACK_IMPORTED_MODULE_13__.UserStore.getInstance().isTableColumnHidden(tableId, columnId, showWithColumn);\n }\n renderColumnVisibilityMenu() {\n const { renderTableHeader, tableId } = this.props;\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_menu_menu_actions__WEBPACK_IMPORTED_MODULE_10__.MenuActions, { className: \"ItemListLayoutVisibilityMenu\", toolbar: false, autoCloseOnSelect: false }, renderTableHeader.map((cellProps, index) => {\n var _a;\n return (!cellProps.showWithColumn && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_menu__WEBPACK_IMPORTED_MODULE_11__.MenuItem, { key: index, className: \"input\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_checkbox__WEBPACK_IMPORTED_MODULE_12__.Checkbox, { label: (_a = cellProps.title) !== null && _a !== void 0 ? _a : `<${cellProps.className}>`, value: this.showColumn(cellProps), onChange: () => _common_user_store__WEBPACK_IMPORTED_MODULE_13__.UserStore.getInstance().toggleTableColumnVisibility(tableId, cellProps.id) }))));\n })));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_14__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], ItemListLayoutContent.prototype, \"failedToLoad\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], ItemListLayoutContent.prototype, \"getRow\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array]),\n __metadata(\"design:returntype\", void 0)\n], ItemListLayoutContent.prototype, \"removeItemsDialog\", null);\nItemListLayoutContent = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_16__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], ItemListLayoutContent);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/item-object-list/content.tsx?");
|
|
36136
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ItemListLayoutContent\": () => (/* binding */ ItemListLayoutContent)\n/* harmony export */ });\n/* harmony import */ var _item_list_layout_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./item-list-layout.scss */ \"./src/renderer/components/item-object-list/item-list-layout.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react-lite/es/index.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _confirm_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../confirm-dialog */ \"./src/renderer/components/confirm-dialog/index.ts\");\n/* harmony import */ var _table__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../table */ \"./src/renderer/components/table/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _add_remove_buttons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../add-remove-buttons */ \"./src/renderer/components/add-remove-buttons/index.ts\");\n/* harmony import */ var _no_items__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../no-items */ \"./src/renderer/components/no-items/index.ts\");\n/* harmony import */ var _spinner__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../spinner */ \"./src/renderer/components/spinner/index.ts\");\n/* harmony import */ var _page_filters_store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./page-filters.store */ \"./src/renderer/components/item-object-list/page-filters.store.ts\");\n/* harmony import */ var _theme_store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../theme.store */ \"./src/renderer/theme.store.ts\");\n/* harmony import */ var _menu_menu_actions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../menu/menu-actions */ \"./src/renderer/components/menu/menu-actions.tsx\");\n/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../menu */ \"./src/renderer/components/menu/index.ts\");\n/* harmony import */ var _checkbox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../checkbox */ \"./src/renderer/components/checkbox/index.ts\");\n/* harmony import */ var _common_user_store__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common/user-store */ \"./src/common/user-store/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet ItemListLayoutContent = class ItemListLayoutContent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n (0,mobx__WEBPACK_IMPORTED_MODULE_14__.makeObservable)(this);\n }\n get failedToLoad() {\n return this.props.store.failedLoading;\n }\n renderRow(item) {\n return this.getTableRow(item);\n }\n getTableRow(item) {\n const { isSelectable, renderTableHeader, renderTableContents, renderItemMenu, store, hasDetailsView, onDetails, copyClassNameFromHeadCells, customizeTableRowProps, detailsItem, } = this.props;\n const { isSelected } = store;\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableRow, { nowrap: true, searchItem: item, sortItem: item, selected: detailsItem && detailsItem.getId() === item.getId(), onClick: hasDetailsView ? (0,_utils__WEBPACK_IMPORTED_MODULE_4__.prevDefault)(() => onDetails(item)) : undefined, ...customizeTableRowProps(item) },\n isSelectable && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { checkbox: true, isChecked: isSelected(item), onClick: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.prevDefault)(() => store.toggleSelection(item)) })),\n renderTableContents(item).map((content, index) => {\n const cellProps = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.isReactNode)(content)\n ? { children: content }\n : content;\n const headCell = renderTableHeader === null || renderTableHeader === void 0 ? void 0 : renderTableHeader[index];\n if (copyClassNameFromHeadCells && headCell) {\n cellProps.className = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(cellProps.className, headCell.className);\n }\n if (!headCell || this.showColumn(headCell)) {\n return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { key: index, ...cellProps });\n }\n return null;\n }),\n renderItemMenu && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { className: \"menu\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { onClick: _utils__WEBPACK_IMPORTED_MODULE_4__.stopPropagation }, renderItemMenu(item, store))))));\n }\n getRow(uid) {\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { key: uid },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(mobx_react__WEBPACK_IMPORTED_MODULE_15__.Observer, null, () => {\n const item = this.props.getItems().find(item => item.getId() === uid);\n if (!item)\n return null;\n return this.getTableRow(item);\n })));\n }\n removeItemsDialog(selectedItems) {\n const { customizeRemoveDialog, store } = this.props;\n const visibleMaxNamesCount = 5;\n const selectedNames = selectedItems.map(ns => ns.getName()).slice(0, visibleMaxNamesCount).join(\", \");\n const dialogCustomProps = customizeRemoveDialog ? customizeRemoveDialog(selectedItems) : {};\n const selectedCount = selectedItems.length;\n const tailCount = selectedCount > visibleMaxNamesCount\n ? selectedCount - visibleMaxNamesCount\n : 0;\n const tail = tailCount > 0\n ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n \", and \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"b\", null, tailCount),\n \" more\")\n : null;\n const message = selectedCount <= 1\n ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n \"Remove item \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"b\", null, selectedNames),\n \"?\")\n : react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n \"Remove \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"b\", null, selectedCount),\n \" items \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"b\", null, selectedNames),\n tail,\n \"?\");\n const onConfirm = store.removeItems\n ? () => store.removeItems(selectedItems)\n : store.removeSelectedItems;\n _confirm_dialog__WEBPACK_IMPORTED_MODULE_2__.ConfirmDialog.open({\n ok: onConfirm,\n labelOk: \"Remove\",\n message,\n ...dialogCustomProps,\n });\n }\n renderNoItems() {\n if (this.failedToLoad) {\n return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_no_items__WEBPACK_IMPORTED_MODULE_6__.NoItems, null, this.props.failedToLoadMessage);\n }\n if (!this.props.getIsReady()) {\n return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_spinner__WEBPACK_IMPORTED_MODULE_7__.Spinner, { center: true });\n }\n if (this.props.getFilters().length > 0) {\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_no_items__WEBPACK_IMPORTED_MODULE_6__.NoItems, null,\n \"No items found.\",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"a\", { onClick: () => _page_filters_store__WEBPACK_IMPORTED_MODULE_8__.pageFilters.reset(), className: \"contrast\" }, \"Reset filters?\"))));\n }\n return react__WEBPACK_IMPORTED_MODULE_1__.createElement(_no_items__WEBPACK_IMPORTED_MODULE_6__.NoItems, null);\n }\n renderItems() {\n if (this.props.virtual) {\n return null;\n }\n return this.props.getItems().map(item => this.getRow(item.getId()));\n }\n renderTableHeader() {\n const { customizeTableRowProps, renderTableHeader, isSelectable, isConfigurable, store } = this.props;\n if (!renderTableHeader) {\n return null;\n }\n const enabledItems = this.props.getItems().filter(item => !customizeTableRowProps(item).disabled);\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableHead, { showTopLine: true, nowrap: true },\n isSelectable && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(mobx_react__WEBPACK_IMPORTED_MODULE_15__.Observer, null, () => (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { checkbox: true, isChecked: store.isSelectedAll(enabledItems), onClick: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.prevDefault)(() => store.toggleSelectionAll(enabledItems)) })))),\n renderTableHeader.map((cellProps, index) => {\n var _a;\n return (this.showColumn(cellProps) && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { key: (_a = cellProps.id) !== null && _a !== void 0 ? _a : index, ...cellProps })));\n }),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.TableCell, { className: \"menu\" }, isConfigurable && this.renderColumnVisibilityMenu())));\n }\n render() {\n const { store, hasDetailsView, addRemoveButtons = {}, virtual, sortingCallbacks, detailsItem, className, tableProps = {}, tableId, getItems, } = this.props;\n const selectedItemId = detailsItem && detailsItem.getId();\n const classNames = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(className, \"box\", \"grow\", _theme_store__WEBPACK_IMPORTED_MODULE_9__.ThemeStore.getInstance().activeTheme.type);\n const items = getItems();\n const selectedItems = store.pickOnlySelected(items);\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"items box grow flex column\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_table__WEBPACK_IMPORTED_MODULE_3__.Table, { tableId: tableId, virtual: virtual, selectable: hasDetailsView, sortable: sortingCallbacks, getTableRow: this.getRow, renderRow: virtual ? undefined : this.renderRow, items: items, selectedItemId: selectedItemId, noItems: this.renderNoItems(), className: classNames, ...tableProps },\n this.renderTableHeader(),\n this.renderItems()),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(mobx_react__WEBPACK_IMPORTED_MODULE_15__.Observer, null, () => (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_add_remove_buttons__WEBPACK_IMPORTED_MODULE_5__.AddRemoveButtons, { onRemove: (store.removeItems || store.removeSelectedItems) && selectedItems.length > 0\n ? () => this.removeItemsDialog(selectedItems)\n : null, removeTooltip: `Remove selected items (${selectedItems.length})`, ...addRemoveButtons })))));\n }\n showColumn({ id: columnId, showWithColumn }) {\n const { tableId, isConfigurable } = this.props;\n return !isConfigurable || !_common_user_store__WEBPACK_IMPORTED_MODULE_13__.UserStore.getInstance().isTableColumnHidden(tableId, columnId, showWithColumn);\n }\n renderColumnVisibilityMenu() {\n const { renderTableHeader, tableId } = this.props;\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_menu_menu_actions__WEBPACK_IMPORTED_MODULE_10__.MenuActions, { className: \"ItemListLayoutVisibilityMenu\", toolbar: false, autoCloseOnSelect: false }, renderTableHeader.map((cellProps, index) => {\n var _a;\n return (!cellProps.showWithColumn && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_menu__WEBPACK_IMPORTED_MODULE_11__.MenuItem, { key: index, className: \"input\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_checkbox__WEBPACK_IMPORTED_MODULE_12__.Checkbox, { label: (_a = cellProps.title) !== null && _a !== void 0 ? _a : `<${cellProps.className}>`, value: this.showColumn(cellProps), onChange: () => _common_user_store__WEBPACK_IMPORTED_MODULE_13__.UserStore.getInstance().toggleTableColumnVisibility(tableId, cellProps.id) }))));\n })));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_14__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], ItemListLayoutContent.prototype, \"failedToLoad\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], ItemListLayoutContent.prototype, \"renderRow\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], ItemListLayoutContent.prototype, \"getRow\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array]),\n __metadata(\"design:returntype\", void 0)\n], ItemListLayoutContent.prototype, \"removeItemsDialog\", null);\nItemListLayoutContent = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_16__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], ItemListLayoutContent);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/item-object-list/content.tsx?");
|
|
36114
36137
|
|
|
36115
36138
|
/***/ }),
|
|
36116
36139
|
|
|
@@ -36396,7 +36419,29 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
36396
36419
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
36397
36420
|
|
|
36398
36421
|
"use strict";
|
|
36399
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeObjectStatusIcon\": () => (/* binding */ KubeObjectStatusIcon)\n/* harmony export */ });\n/* harmony import */ var _kube_object_status_icon_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./kube-object-status-icon.scss */ \"./src/renderer/components/kube-object-status-icon/kube-object-status-icon.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../..//extensions/renderer-api/k8s-api */ \"./src/extensions/renderer-api/k8s-api.ts\");\n/* harmony import */ var
|
|
36422
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeObjectStatusIcon\": () => (/* binding */ KubeObjectStatusIcon)\n/* harmony export */ });\n/* harmony import */ var _kube_object_status_icon_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./kube-object-status-icon.scss */ \"./src/renderer/components/kube-object-status-icon/kube-object-status-icon.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../..//extensions/renderer-api/k8s-api */ \"./src/extensions/renderer-api/k8s-api.ts\");\n/* harmony import */ var _ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ogre-tools/injectable-react */ \"./node_modules/@ogre-tools/injectable-react/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _statuses_for_kube_object_injectable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./statuses-for-kube-object.injectable */ \"./src/renderer/components/kube-object-status-icon/statuses-for-kube-object.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\nfunction statusClassName(level) {\n switch (level) {\n case _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.INFO:\n return \"info\";\n case _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.WARNING:\n return \"warning\";\n case _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.CRITICAL:\n return \"error\";\n }\n}\nfunction statusTitle(level) {\n switch (level) {\n case _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.INFO:\n return \"Info\";\n case _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.WARNING:\n return \"Warning\";\n case _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.CRITICAL:\n return \"Critical\";\n }\n}\nfunction getAge(timestamp) {\n return timestamp\n ? (0,_utils__WEBPACK_IMPORTED_MODULE_3__.formatDuration)(Date.now() - new Date(timestamp).getTime(), true)\n : \"\";\n}\n/**\n * This function returns the class level for corresponding to the highest status level\n * and the statuses split by their levels.\n * @param src a list of status items\n */\nfunction splitByLevel(src) {\n var _a, _b, _c, _d;\n const parts = new Map(Object.values(_extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel).map(v => [v, []]));\n src.forEach(status => parts.get(status.level).push(status));\n const criticals = parts.get(_extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.CRITICAL);\n const warnings = parts.get(_extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.WARNING);\n const infos = parts.get(_extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.INFO);\n const maxLevel = statusClassName((_d = (_b = (_a = criticals[0]) === null || _a === void 0 ? void 0 : _a.level) !== null && _b !== void 0 ? _b : (_c = warnings[0]) === null || _c === void 0 ? void 0 : _c.level) !== null && _d !== void 0 ? _d : infos[0].level);\n return { maxLevel, criticals, warnings, infos };\n}\nclass NonInjectedKubeObjectStatusIcon extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n renderStatuses(statuses, level) {\n const filteredStatuses = statuses.filter((item) => item.level == level);\n return filteredStatuses.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.cssNames)(\"level\", statusClassName(level)) },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", { className: \"title\" }, statusTitle(level)),\n filteredStatuses.map((status, index) => (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { key: `kube-resource-status-${level}-${index}`, className: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.cssNames)(\"status\", \"msg\") },\n \"- \",\n status.text,\n \" \",\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", { className: \"age\" },\n \" \\u00B7 \",\n getAge(status.timestamp)))))));\n }\n render() {\n const statuses = this.props.statuses;\n if (statuses.length === 0) {\n return null;\n }\n const { maxLevel, criticals, warnings, infos } = splitByLevel(statuses);\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_icon__WEBPACK_IMPORTED_MODULE_2__.Icon, { material: maxLevel, className: (0,_utils__WEBPACK_IMPORTED_MODULE_3__.cssNames)(\"KubeObjectStatusIcon\", maxLevel), tooltip: {\n children: (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"KubeObjectStatusTooltip\" },\n this.renderStatuses(criticals, _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.CRITICAL),\n this.renderStatuses(warnings, _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.WARNING),\n this.renderStatuses(infos, _extensions_renderer_api_k8s_api__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusLevel.INFO))),\n } }));\n }\n}\nconst KubeObjectStatusIcon = (0,_ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_5__.withInjectables)(NonInjectedKubeObjectStatusIcon, {\n getProps: (di, props) => ({\n statuses: di.inject(_statuses_for_kube_object_injectable__WEBPACK_IMPORTED_MODULE_6__[\"default\"], props.object),\n ...props,\n }),\n});\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/kube-object-status-icon/kube-object-status-icon.tsx?");
|
|
36423
|
+
|
|
36424
|
+
/***/ }),
|
|
36425
|
+
|
|
36426
|
+
/***/ "./src/renderer/components/kube-object-status-icon/status-registrations.injectable.ts":
|
|
36427
|
+
/*!********************************************************************************************!*\
|
|
36428
|
+
!*** ./src/renderer/components/kube-object-status-icon/status-registrations.injectable.ts ***!
|
|
36429
|
+
\********************************************************************************************/
|
|
36430
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
36431
|
+
|
|
36432
|
+
"use strict";
|
|
36433
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _extensions_renderer_extensions_injectable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../extensions/renderer-extensions.injectable */ \"./src/extensions/renderer-extensions.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\nconst statusRegistrationsInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"status-registrations\",\n instantiate: (di) => {\n const extensions = di.inject(_extensions_renderer_extensions_injectable__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.computed)(() => extensions.get().flatMap((extension) => extension.kubeObjectStatusTexts));\n },\n lifecycle: _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.lifecycleEnum.singleton,\n});\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (statusRegistrationsInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/kube-object-status-icon/status-registrations.injectable.ts?");
|
|
36434
|
+
|
|
36435
|
+
/***/ }),
|
|
36436
|
+
|
|
36437
|
+
/***/ "./src/renderer/components/kube-object-status-icon/statuses-for-kube-object.injectable.ts":
|
|
36438
|
+
/*!************************************************************************************************!*\
|
|
36439
|
+
!*** ./src/renderer/components/kube-object-status-icon/statuses-for-kube-object.injectable.ts ***!
|
|
36440
|
+
\************************************************************************************************/
|
|
36441
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
36442
|
+
|
|
36443
|
+
"use strict";
|
|
36444
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ogre-tools/injectable */ \"./node_modules/@ogre-tools/injectable/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _status_registrations_injectable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./status-registrations.injectable */ \"./src/renderer/components/kube-object-status-icon/status-registrations.injectable.ts\");\n/* harmony import */ var lodash_fp__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/fp */ \"./node_modules/lodash/fp.js\");\n/* harmony import */ var lodash_fp__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_fp__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\nconst statusesForKubeObjectInjectable = (0,_ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.getInjectable)({\n id: \"statuses-for-kube-object\",\n instantiate: (di, kubeObject) => di\n .inject(_status_registrations_injectable__WEBPACK_IMPORTED_MODULE_1__[\"default\"])\n .get()\n .filter(toKubeObjectRelated(kubeObject))\n .map(toStatus(kubeObject))\n .filter(Boolean),\n lifecycle: _ogre_tools_injectable__WEBPACK_IMPORTED_MODULE_0__.lifecycleEnum.transient,\n});\nconst toKubeObjectRelated = (kubeObject) => (0,lodash_fp__WEBPACK_IMPORTED_MODULE_2__.conforms)({\n kind: (0,lodash_fp__WEBPACK_IMPORTED_MODULE_2__.eq)(kubeObject.kind),\n apiVersions: (0,lodash_fp__WEBPACK_IMPORTED_MODULE_2__.includes)(kubeObject.apiVersion),\n});\nconst toStatus = (kubeObject) => (item) => item.resolve(kubeObject);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (statusesForKubeObjectInjectable);\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/kube-object-status-icon/statuses-for-kube-object.injectable.ts?");
|
|
36400
36445
|
|
|
36401
36446
|
/***/ }),
|
|
36402
36447
|
|
|
@@ -36759,7 +36804,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
36759
36804
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
36760
36805
|
|
|
36761
36806
|
"use strict";
|
|
36762
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Select\": () => (/* binding */ Select)\n/* harmony export */ });\n/* harmony import */ var _select_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select.scss */ \"./src/renderer/components/select/select.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/index-75b02bac.browser.esm.js\");\n/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/react-select.browser.esm.js\");\n/* harmony import */ var react_select_creatable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-select/creatable */ \"./node_modules/react-select/creatable/dist/react-select.browser.esm.js\");\n/* harmony import */ var _theme_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme.store */ \"./src/renderer/theme.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n// Wrapper for \"react-select\" component\n// API docs: https://react-select.com/\n\n\n\n\n\n\n\n\nconst { Menu } = react_select__WEBPACK_IMPORTED_MODULE_5__.F;\nlet Select = class Select extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"styles\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n menuPortal: styles => ({\n ...styles,\n zIndex: \"auto\",\n }),\n }\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_6__.makeObservable)(this);\n }\n get themeClass() {\n const themeName = this.props.themeName || _theme_store__WEBPACK_IMPORTED_MODULE_3__.ThemeStore.getInstance().activeTheme.type;\n return `theme-${themeName}`;\n }\n isValidOption(opt) {\n return typeof opt === \"object\" && opt.value !== undefined;\n }\n get selectedOption() {\n const { value, isMulti } = this.props;\n if (isMulti) {\n return this.options.filter(opt => {\n const values = value ? [].concat(value) : [];\n return values.includes(opt) || values.includes(opt.value);\n });\n }\n return this.options.find(opt => opt === value || opt.value === value);\n }\n get options() {\n const { autoConvertOptions, options } = this.props;\n if (autoConvertOptions && Array.isArray(options)) {\n return options.map(opt => {\n return this.isValidOption(opt) ? opt : { value: opt, label: String(opt) };\n });\n }\n return options;\n }\n onChange(value, meta) {\n if (this.props.onChange) {\n this.props.onChange(value, meta);\n }\n }\n onKeyDown(evt) {\n if (this.props.onKeyDown) {\n this.props.onKeyDown(evt);\n }\n const escapeKey = evt.nativeEvent.code === \"Escape\";\n if (escapeKey)\n evt.stopPropagation(); // don't close the <Dialog/>\n }\n render() {\n var _a;\n const { className, menuClass, isCreatable, autoConvertOptions, value, options, components = {}, ...props } = this.props;\n const WrappedMenu = (_a = components.Menu) !== null && _a !== void 0 ? _a : Menu;\n const selectProps = {\n ...props,\n styles: this.styles,\n value: autoConvertOptions ? this.selectedOption : value,\n options: autoConvertOptions ? this.options : options,\n onChange: this.onChange,\n onKeyDown: this.onKeyDown,\n className: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(\"Select\", this.themeClass, className),\n classNamePrefix: \"Select\",\n components: {\n ...components,\n Menu: props => (react__WEBPACK_IMPORTED_MODULE_1__.createElement(WrappedMenu, { ...props, className: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(menuClass, this.themeClass, props.className) })),\n },\n };\n return isCreatable\n ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_select_creatable__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { ...selectProps })\n : react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_select__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { ...selectProps });\n }\n};\nObject.defineProperty(Select, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n autoConvertOptions: true,\n menuPortalTarget: document.body,\n menuPlacement: \"auto\",\n }\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_6__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Select.prototype, \"themeClass\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_6__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Select.prototype, \"selectedOption\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_6__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], Select.prototype, \"options\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object, Object]),\n __metadata(\"design:returntype\", void 0)\n], Select.prototype, \"onChange\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Select.prototype, \"onKeyDown\", null);\nSelect = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], Select);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/select/select.tsx?");
|
|
36807
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Select\": () => (/* binding */ Select)\n/* harmony export */ });\n/* harmony import */ var _select_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select.scss */ \"./src/renderer/components/select/select.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/index-75b02bac.browser.esm.js\");\n/* harmony import */ var react_select__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-select */ \"./node_modules/react-select/dist/react-select.browser.esm.js\");\n/* harmony import */ var react_select_creatable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-select/creatable */ \"./node_modules/react-select/creatable/dist/react-select.browser.esm.js\");\n/* harmony import */ var _theme_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme.store */ \"./src/renderer/theme.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n// Wrapper for \"react-select\" component\n// API docs: https://react-select.com/\n\n\n\n\n\n\n\n\nconst { Menu } = react_select__WEBPACK_IMPORTED_MODULE_5__.F;\nlet Select = class Select extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"styles\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n menuPortal: styles => ({\n ...styles,\n zIndex: \"auto\",\n }),\n }\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_6__.makeObservable)(this);\n }\n get themeClass() {\n const themeName = this.props.themeName || _theme_store__WEBPACK_IMPORTED_MODULE_3__.ThemeStore.getInstance().activeTheme.type;\n return `theme-${themeName}`;\n }\n isValidOption(opt) {\n return typeof opt === \"object\" && opt.value !== undefined;\n }\n get selectedOption() {\n const { value, isMulti } = this.props;\n if (isMulti) {\n return this.options.filter(opt => {\n const values = value ? [].concat(value) : [];\n return values.includes(opt) || values.includes(opt.value);\n });\n }\n return this.options.find(opt => opt === value || opt.value === value) || null;\n }\n get options() {\n const { autoConvertOptions, options } = this.props;\n if (autoConvertOptions && Array.isArray(options)) {\n return options.map(opt => {\n return this.isValidOption(opt) ? opt : { value: opt, label: String(opt) };\n });\n }\n return options;\n }\n onChange(value, meta) {\n if (this.props.onChange) {\n this.props.onChange(value, meta);\n }\n }\n onKeyDown(evt) {\n if (this.props.onKeyDown) {\n this.props.onKeyDown(evt);\n }\n const escapeKey = evt.nativeEvent.code === \"Escape\";\n if (escapeKey)\n evt.stopPropagation(); // don't close the <Dialog/>\n }\n render() {\n var _a;\n const { className, menuClass, isCreatable, autoConvertOptions, value, options, components = {}, ...props } = this.props;\n const WrappedMenu = (_a = components.Menu) !== null && _a !== void 0 ? _a : Menu;\n const selectProps = {\n ...props,\n styles: this.styles,\n value: autoConvertOptions ? this.selectedOption : value,\n options: autoConvertOptions ? this.options : options,\n onChange: this.onChange,\n onKeyDown: this.onKeyDown,\n className: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(\"Select\", this.themeClass, className),\n classNamePrefix: \"Select\",\n components: {\n ...components,\n Menu: props => (react__WEBPACK_IMPORTED_MODULE_1__.createElement(WrappedMenu, { ...props, className: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(menuClass, this.themeClass, props.className) })),\n },\n };\n return isCreatable\n ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_select_creatable__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { ...selectProps })\n : react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_select__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { ...selectProps });\n }\n};\nObject.defineProperty(Select, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n autoConvertOptions: true,\n menuPortalTarget: document.body,\n menuPlacement: \"auto\",\n }\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_6__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Select.prototype, \"themeClass\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_6__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Select.prototype, \"selectedOption\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_6__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], Select.prototype, \"options\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object, Object]),\n __metadata(\"design:returntype\", void 0)\n], Select.prototype, \"onChange\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Select.prototype, \"onKeyDown\", null);\nSelect = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], Select);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/select/select.tsx?");
|
|
36763
36808
|
|
|
36764
36809
|
/***/ }),
|
|
36765
36810
|
|
|
@@ -37188,7 +37233,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
37188
37233
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
37189
37234
|
|
|
37190
37235
|
"use strict";
|
|
37191
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ThemeStore\": () => (/* binding */ ThemeStore)\n/* harmony export */ });\n/* harmony import */ var
|
|
37236
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ThemeStore\": () => (/* binding */ ThemeStore)\n/* harmony export */ });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _common_user_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/user-store */ \"./src/common/user-store/index.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _themes_lens_dark_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./themes/lens-dark.json */ \"./src/renderer/themes/lens-dark.json\");\n/* harmony import */ var _themes_lens_light_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./themes/lens-light.json */ \"./src/renderer/themes/lens-light.json\");\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _common_ipc_native_theme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/ipc/native-theme */ \"./src/common/ipc/native-theme.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\nclass ThemeStore extends _utils__WEBPACK_IMPORTED_MODULE_0__.Singleton {\n constructor() {\n super();\n Object.defineProperty(this, \"terminalColorPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"terminal\"\n });\n // bundled themes from `themes/${themeId}.json`\n Object.defineProperty(this, \"themes\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_9__.observable.map({\n \"lens-dark\": _themes_lens_dark_json__WEBPACK_IMPORTED_MODULE_3__,\n \"lens-light\": _themes_lens_light_json__WEBPACK_IMPORTED_MODULE_4__,\n })\n });\n Object.defineProperty(this, \"osNativeTheme\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_9__.makeObservable)(this);\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__.autoBind)(this);\n this.init();\n }\n get activeThemeId() {\n return _common_user_store__WEBPACK_IMPORTED_MODULE_1__.UserStore.getInstance().colorTheme;\n }\n get terminalThemeId() {\n return _common_user_store__WEBPACK_IMPORTED_MODULE_1__.UserStore.getInstance().terminalTheme;\n }\n get activeTheme() {\n var _a, _b;\n return (_b = (_a = this.systemTheme) !== null && _a !== void 0 ? _a : this.themes.get(this.activeThemeId)) !== null && _b !== void 0 ? _b : this.themes.get(_common_vars__WEBPACK_IMPORTED_MODULE_5__.defaultTheme);\n }\n get terminalColors() {\n var _a;\n const theme = (_a = this.themes.get(this.terminalThemeId)) !== null && _a !== void 0 ? _a : this.activeTheme;\n return Object\n .entries(theme.colors)\n .filter(([name]) => name.startsWith(this.terminalColorPrefix));\n }\n // Replacing keys stored in styles to format accepted by terminal\n // E.g. terminalBrightBlack -> brightBlack\n get xtermColors() {\n return Object.fromEntries(this.terminalColors.map(([name, color]) => [\n (0,lodash__WEBPACK_IMPORTED_MODULE_6__.camelCase)(name.replace(this.terminalColorPrefix, \"\")),\n color,\n ]));\n }\n get themeOptions() {\n return Array.from(this.themes).map(([themeId, theme]) => ({\n label: theme.name,\n value: themeId,\n }));\n }\n get systemTheme() {\n if (this.activeThemeId == \"system\" && this.osNativeTheme) {\n return this.themes.get(`lens-${this.osNativeTheme}`);\n }\n return null;\n }\n async init() {\n await this.setNativeTheme();\n this.bindNativeThemeUpdateEvent();\n // auto-apply active theme\n (0,mobx__WEBPACK_IMPORTED_MODULE_9__.reaction)(() => ({\n themeId: this.activeThemeId,\n terminalThemeId: this.terminalThemeId,\n }), ({ themeId }) => {\n try {\n this.applyTheme(themeId);\n }\n catch (err) {\n _main_logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(err);\n _common_user_store__WEBPACK_IMPORTED_MODULE_1__.UserStore.getInstance().resetTheme();\n }\n }, {\n fireImmediately: true,\n equals: mobx__WEBPACK_IMPORTED_MODULE_9__.comparer.shallow,\n });\n }\n bindNativeThemeUpdateEvent() {\n electron__WEBPACK_IMPORTED_MODULE_7__.ipcRenderer.on(_common_ipc_native_theme__WEBPACK_IMPORTED_MODULE_8__.setNativeThemeChannel, (event, theme) => {\n this.osNativeTheme = theme;\n this.applyTheme(theme);\n });\n }\n async setNativeTheme() {\n const theme = await electron__WEBPACK_IMPORTED_MODULE_7__.ipcRenderer.invoke(_common_ipc_native_theme__WEBPACK_IMPORTED_MODULE_8__.getNativeThemeChannel);\n this.osNativeTheme = theme;\n }\n getThemeById(themeId) {\n return this.themes.get(themeId);\n }\n applyTheme(themeId) {\n var _a;\n const theme = (_a = this.systemTheme) !== null && _a !== void 0 ? _a : this.getThemeById(themeId);\n const colors = Object.entries({\n ...theme.colors,\n ...Object.fromEntries(this.terminalColors),\n });\n colors.forEach(([name, value]) => {\n document.documentElement.style.setProperty(`--${name}`, value);\n });\n // Adding universal theme flag which can be used in component styles\n document.body.classList.toggle(\"theme-light\", theme.type === \"light\");\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.observable,\n __metadata(\"design:type\", String)\n], ThemeStore.prototype, \"osNativeTheme\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], ThemeStore.prototype, \"activeThemeId\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], ThemeStore.prototype, \"terminalThemeId\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], ThemeStore.prototype, \"activeTheme\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ThemeStore.prototype, \"terminalColors\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], ThemeStore.prototype, \"xtermColors\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ThemeStore.prototype, \"themeOptions\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], ThemeStore.prototype, \"systemTheme\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/theme.store.ts?");
|
|
37192
37237
|
|
|
37193
37238
|
/***/ }),
|
|
37194
37239
|
|
|
@@ -39348,7 +39393,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte
|
|
|
39348
39393
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39349
39394
|
|
|
39350
39395
|
"use strict";
|
|
39351
|
-
eval("\n\nvar util = __webpack_require__(/*! util */ \"util\");\nvar Writable = __webpack_require__(/*! readable-stream/
|
|
39396
|
+
eval("\n\nvar util = __webpack_require__(/*! util */ \"util\");\nvar Writable = __webpack_require__(/*! readable-stream/lib/_stream_writable.js */ \"./node_modules/readable-stream/lib/_stream_writable.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n LEVEL = _require.LEVEL;\n\n/**\n * Constructor function for the TransportStream. This is the base prototype\n * that all `winston >= 3` transports should inherit from.\n * @param {Object} options - Options for this TransportStream instance\n * @param {String} options.level - Highest level according to RFC5424.\n * @param {Boolean} options.handleExceptions - If true, info with\n * { exception: true } will be written.\n * @param {Function} options.log - Custom log function for simple Transport\n * creation\n * @param {Function} options.close - Called on \"unpipe\" from parent.\n */\n\n\nvar TransportStream = module.exports = function TransportStream() {\n var _this = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n Writable.call(this, { objectMode: true, highWaterMark: options.highWaterMark });\n\n this.format = options.format;\n this.level = options.level;\n this.handleExceptions = options.handleExceptions;\n this.handleRejections = options.handleRejections;\n this.silent = options.silent;\n\n if (options.log) this.log = options.log;\n if (options.logv) this.logv = options.logv;\n if (options.close) this.close = options.close;\n\n // Get the levels from the source we are piped from.\n this.once('pipe', function (logger) {\n // Remark (indexzero): this bookkeeping can only support multiple\n // Logger parents with the same `levels`. This comes into play in\n // the `winston.Container` code in which `container.add` takes\n // a fully realized set of options with pre-constructed TransportStreams.\n _this.levels = logger.levels;\n _this.parent = logger;\n });\n\n // If and/or when the transport is removed from this instance\n this.once('unpipe', function (src) {\n // Remark (indexzero): this bookkeeping can only support multiple\n // Logger parents with the same `levels`. This comes into play in\n // the `winston.Container` code in which `container.add` takes\n // a fully realized set of options with pre-constructed TransportStreams.\n if (src === _this.parent) {\n _this.parent = null;\n if (_this.close) {\n _this.close();\n }\n }\n });\n};\n\n/*\n * Inherit from Writeable using Node.js built-ins\n */\nutil.inherits(TransportStream, Writable);\n\n/**\n * Writes the info object to our transport instance.\n * @param {mixed} info - TODO: add param description.\n * @param {mixed} enc - TODO: add param description.\n * @param {function} callback - TODO: add param description.\n * @returns {undefined}\n * @private\n */\nTransportStream.prototype._write = function _write(info, enc, callback) {\n if (this.silent || info.exception === true && !this.handleExceptions) {\n return callback(null);\n }\n\n // Remark: This has to be handled in the base transport now because we\n // cannot conditionally write to our pipe targets as stream. We always\n // prefer any explicit level set on the Transport itself falling back to\n // any level set on the parent.\n var level = this.level || this.parent && this.parent.level;\n\n if (!level || this.levels[level] >= this.levels[info[LEVEL]]) {\n if (info && !this.format) {\n return this.log(info, callback);\n }\n\n var errState = void 0;\n var transformed = void 0;\n\n // We trap(and re-throw) any errors generated by the user-provided format, but also\n // guarantee that the streams callback is invoked so that we can continue flowing.\n try {\n transformed = this.format.transform(Object.assign({}, info), this.format.options);\n } catch (err) {\n errState = err;\n }\n\n if (errState || !transformed) {\n // eslint-disable-next-line callback-return\n callback();\n if (errState) throw errState;\n return;\n }\n\n return this.log(transformed, callback);\n }\n this._writableState.sync = false;\n return callback(null);\n};\n\n/**\n * Writes the batch of info objects (i.e. \"object chunks\") to our transport\n * instance after performing any necessary filtering.\n * @param {mixed} chunks - TODO: add params description.\n * @param {function} callback - TODO: add params description.\n * @returns {mixed} - TODO: add returns description.\n * @private\n */\nTransportStream.prototype._writev = function _writev(chunks, callback) {\n if (this.logv) {\n var infos = chunks.filter(this._accept, this);\n if (!infos.length) {\n return callback(null);\n }\n\n // Remark (indexzero): from a performance perspective if Transport\n // implementers do choose to implement logv should we make it their\n // responsibility to invoke their format?\n return this.logv(infos, callback);\n }\n\n for (var i = 0; i < chunks.length; i++) {\n if (!this._accept(chunks[i])) continue;\n\n if (chunks[i].chunk && !this.format) {\n this.log(chunks[i].chunk, chunks[i].callback);\n continue;\n }\n\n var errState = void 0;\n var transformed = void 0;\n\n // We trap(and re-throw) any errors generated by the user-provided format, but also\n // guarantee that the streams callback is invoked so that we can continue flowing.\n try {\n transformed = this.format.transform(Object.assign({}, chunks[i].chunk), this.format.options);\n } catch (err) {\n errState = err;\n }\n\n if (errState || !transformed) {\n // eslint-disable-next-line callback-return\n chunks[i].callback();\n if (errState) {\n // eslint-disable-next-line callback-return\n callback(null);\n throw errState;\n }\n } else {\n this.log(transformed, chunks[i].callback);\n }\n }\n\n return callback(null);\n};\n\n/**\n * Predicate function that returns true if the specfied `info` on the\n * WriteReq, `write`, should be passed down into the derived\n * TransportStream's I/O via `.log(info, callback)`.\n * @param {WriteReq} write - winston@3 Node.js WriteReq for the `info` object\n * representing the log message.\n * @returns {Boolean} - Value indicating if the `write` should be accepted &\n * logged.\n */\nTransportStream.prototype._accept = function _accept(write) {\n var info = write.chunk;\n if (this.silent) {\n return false;\n }\n\n // We always prefer any explicit level set on the Transport itself\n // falling back to any level set on the parent.\n var level = this.level || this.parent && this.parent.level;\n\n // Immediately check the average case: log level filtering.\n if (info.exception === true || !level || this.levels[level] >= this.levels[info[LEVEL]]) {\n // Ensure the info object is valid based on `{ exception }`:\n // 1. { handleExceptions: true }: all `info` objects are valid\n // 2. { exception: false }: accepted by all transports.\n if (this.handleExceptions || info.exception !== true) {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * _nop is short for \"No operation\"\n * @returns {Boolean} Intentionally false.\n */\nTransportStream.prototype._nop = function _nop() {\n // eslint-disable-next-line no-undefined\n return void undefined;\n};\n\n// Expose legacy stream\nmodule.exports.LegacyTransportStream = __webpack_require__(/*! ./legacy */ \"./node_modules/winston-transport/dist/legacy.js\");\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/dist/index.js?");
|
|
39352
39397
|
|
|
39353
39398
|
/***/ }),
|
|
39354
39399
|
|
|
@@ -39374,112 +39419,6 @@ eval("\n\nconst util = __webpack_require__(/*! util */ \"util\");\nconst { LEVEL
|
|
|
39374
39419
|
|
|
39375
39420
|
/***/ }),
|
|
39376
39421
|
|
|
39377
|
-
/***/ "./node_modules/winston-transport/node_modules/isarray/index.js":
|
|
39378
|
-
/*!**********************************************************************!*\
|
|
39379
|
-
!*** ./node_modules/winston-transport/node_modules/isarray/index.js ***!
|
|
39380
|
-
\**********************************************************************/
|
|
39381
|
-
/***/ ((module) => {
|
|
39382
|
-
|
|
39383
|
-
eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/isarray/index.js?");
|
|
39384
|
-
|
|
39385
|
-
/***/ }),
|
|
39386
|
-
|
|
39387
|
-
/***/ "./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js":
|
|
39388
|
-
/*!*******************************************************************************************!*\
|
|
39389
|
-
!*** ./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js ***!
|
|
39390
|
-
\*******************************************************************************************/
|
|
39391
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39392
|
-
|
|
39393
|
-
"use strict";
|
|
39394
|
-
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n\n\n/*<replacement>*/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n keys.push(key);\n }return keys;\n};\n/*</replacement>*/\n\nmodule.exports = Duplex;\n\n/*<replacement>*/\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\"));\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/*</replacement>*/\n\nvar Readable = __webpack_require__(/*! ./_stream_readable */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_readable.js\");\nvar Writable = __webpack_require__(/*! ./_stream_writable */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js\");\n\nutil.inherits(Duplex, Readable);\n\n{\n // avoid scope creep, the keys array can then be collected\n var keys = objectKeys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n this.push(null);\n this.end();\n\n pna.nextTick(cb, err);\n};\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js?");
|
|
39395
|
-
|
|
39396
|
-
/***/ }),
|
|
39397
|
-
|
|
39398
|
-
/***/ "./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_readable.js":
|
|
39399
|
-
/*!*********************************************************************************************!*\
|
|
39400
|
-
!*** ./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_readable.js ***!
|
|
39401
|
-
\*********************************************************************************************/
|
|
39402
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39403
|
-
|
|
39404
|
-
"use strict";
|
|
39405
|
-
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n/*<replacement>*/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/*</replacement>*/\n\nmodule.exports = Readable;\n\n/*<replacement>*/\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/winston-transport/node_modules/isarray/index.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n\n/*<replacement>*/\nvar EE = (__webpack_require__(/*! events */ \"events\").EventEmitter);\n\nvar EElistenerCount = function (emitter, type) {\n return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = (__webpack_require__(/*! safe-buffer */ \"./node_modules/winston-transport/node_modules/safe-buffer/index.js\").Buffer);\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\n/*<replacement>*/\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\"));\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar debugUtil = __webpack_require__(/*! util */ \"util\");\nvar debug = void 0;\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function () {};\n}\n/*</replacement>*/\n\nvar BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/BufferList.js\");\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js\");\nvar StringDecoder;\n\nutil.inherits(Readable, Stream);\n\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);\n\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = (__webpack_require__(/*! string_decoder/ */ \"./node_modules/winston-transport/node_modules/string_decoder/lib/string_decoder.js\").StringDecoder);\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js\");\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function () {\n if (this._readableState === undefined) {\n return false;\n }\n return this._readableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._readableState.destroyed = value;\n }\n});\n\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n};\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n};\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = (__webpack_require__(/*! string_decoder/ */ \"./node_modules/winston-transport/node_modules/string_decoder/lib/string_decoder.js\").StringDecoder);\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 8MB\nvar MAX_HWM = 0x800000;\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n}\n\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n pna.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = { hasUnpiped: false };\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }return this;\n }\n\n // try to find the right one.\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this, unpipeInfo);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n pna.nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n}\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n pna.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n }\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n this._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._readableState.highWaterMark;\n }\n});\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n}\n\n// Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n}\n\n// Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\n// Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n pna.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_readable.js?");
|
|
39406
|
-
|
|
39407
|
-
/***/ }),
|
|
39408
|
-
|
|
39409
|
-
/***/ "./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js":
|
|
39410
|
-
/*!*********************************************************************************************!*\
|
|
39411
|
-
!*** ./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js ***!
|
|
39412
|
-
\*********************************************************************************************/
|
|
39413
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39414
|
-
|
|
39415
|
-
"use strict";
|
|
39416
|
-
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\n\n/*<replacement>*/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/*</replacement>*/\n\nmodule.exports = Writable;\n\n/* <replacement> */\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n}\n\n// It seems a linked list but it is not\n// there will be only 2 of these for each stream\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* </replacement> */\n\n/*<replacement>*/\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/*</replacement>*/\n\n/*<replacement>*/\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n\n/*<replacement>*/\nvar util = Object.create(__webpack_require__(/*! core-util-is */ \"./node_modules/core-util-is/lib/util.js\"));\nutil.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\nvar internalUtil = {\n deprecate: __webpack_require__(/*! util-deprecate */ \"./node_modules/util-deprecate/browser.js\")\n};\n/*</replacement>*/\n\n/*<replacement>*/\nvar Stream = __webpack_require__(/*! ./internal/streams/stream */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream-browser.js\");\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Buffer = (__webpack_require__(/*! safe-buffer */ \"./node_modules/winston-transport/node_modules/safe-buffer/index.js\").Buffer);\nvar OurUint8Array = global.Uint8Array || function () {};\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\n/*</replacement>*/\n\nvar destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js\");\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js\");\n\n options = options || {};\n\n // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n var isDuplex = stream instanceof Duplex;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;\n\n // cast to ints.\n this.highWaterMark = Math.floor(this.highWaterMark);\n\n // if _final has been called\n this.finalCalled = false;\n\n // drain event flag.\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // has it been destroyed\n this.destroyed = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})();\n\n// Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\nvar realHasInstance;\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function (object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function (object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js\");\n\n // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n\n if (typeof options.final === 'function') this._final = options.final;\n }\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n pna.nextTick(cb, er);\n}\n\n// Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n pna.nextTick(cb, er);\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function () {\n return this._writableState.highWaterMark;\n }\n});\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n pna.nextTick(cb, er);\n // this can emit finish, and it will always happen\n // after error\n pna.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n // this can emit finish, but finish must\n // always follow error\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /*<replacement>*/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /*</replacement>*/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n var allBuffers = true;\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n buffer.allBuffers = allBuffers;\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n if (err) {\n stream.emit('error', err);\n }\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n pna.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n prefinish(stream, state);\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function () {\n if (this._writableState === undefined) {\n return false;\n }\n return this._writableState.destroyed;\n },\n set: function (value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n }\n\n // backward compatibility, the user is explicitly\n // managing destroyed\n this._writableState.destroyed = value;\n }\n});\n\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js?");
|
|
39417
|
-
|
|
39418
|
-
/***/ }),
|
|
39419
|
-
|
|
39420
|
-
/***/ "./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/BufferList.js":
|
|
39421
|
-
/*!********************************************************************************************************!*\
|
|
39422
|
-
!*** ./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/BufferList.js ***!
|
|
39423
|
-
\********************************************************************************************************/
|
|
39424
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39425
|
-
|
|
39426
|
-
"use strict";
|
|
39427
|
-
eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Buffer = (__webpack_require__(/*! safe-buffer */ \"./node_modules/winston-transport/node_modules/safe-buffer/index.js\").Buffer);\nvar util = __webpack_require__(/*! util */ \"util\");\n\nfunction copyBuffer(src, target, offset) {\n src.copy(target, offset);\n}\n\nmodule.exports = function () {\n function BufferList() {\n _classCallCheck(this, BufferList);\n\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function push(v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function unshift(v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function shift() {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function clear() {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function join(s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function concat(n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n copyBuffer(p.data, ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n return BufferList;\n}();\n\nif (util && util.inspect && util.inspect.custom) {\n module.exports.prototype[util.inspect.custom] = function () {\n var obj = util.inspect({ length: this.length });\n return this.constructor.name + ' ' + obj;\n };\n}\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/BufferList.js?");
|
|
39428
|
-
|
|
39429
|
-
/***/ }),
|
|
39430
|
-
|
|
39431
|
-
/***/ "./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js":
|
|
39432
|
-
/*!*****************************************************************************************************!*\
|
|
39433
|
-
!*** ./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js ***!
|
|
39434
|
-
\*****************************************************************************************************/
|
|
39435
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39436
|
-
|
|
39437
|
-
"use strict";
|
|
39438
|
-
eval("\n\n/*<replacement>*/\n\nvar pna = __webpack_require__(/*! process-nextick-args */ \"./node_modules/process-nextick-args/index.js\");\n/*</replacement>*/\n\n// undocumented cb() API, needed for core, not for public API\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n pna.nextTick(emitErrorNT, this, err);\n }\n return this;\n }\n\n // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n }\n\n // if this is a duplex stream mark the writable part as destroyed as well\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n pna.nextTick(emitErrorNT, _this, err);\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js?");
|
|
39439
|
-
|
|
39440
|
-
/***/ }),
|
|
39441
|
-
|
|
39442
|
-
/***/ "./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream-browser.js":
|
|
39443
|
-
/*!************************************************************************************************************!*\
|
|
39444
|
-
!*** ./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream-browser.js ***!
|
|
39445
|
-
\************************************************************************************************************/
|
|
39446
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39447
|
-
|
|
39448
|
-
eval("module.exports = __webpack_require__(/*! events */ \"events\").EventEmitter;\n\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream-browser.js?");
|
|
39449
|
-
|
|
39450
|
-
/***/ }),
|
|
39451
|
-
|
|
39452
|
-
/***/ "./node_modules/winston-transport/node_modules/readable-stream/writable-browser.js":
|
|
39453
|
-
/*!*****************************************************************************************!*\
|
|
39454
|
-
!*** ./node_modules/winston-transport/node_modules/readable-stream/writable-browser.js ***!
|
|
39455
|
-
\*****************************************************************************************/
|
|
39456
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39457
|
-
|
|
39458
|
-
eval("module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ \"./node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js\");\n\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/readable-stream/writable-browser.js?");
|
|
39459
|
-
|
|
39460
|
-
/***/ }),
|
|
39461
|
-
|
|
39462
|
-
/***/ "./node_modules/winston-transport/node_modules/safe-buffer/index.js":
|
|
39463
|
-
/*!**************************************************************************!*\
|
|
39464
|
-
!*** ./node_modules/winston-transport/node_modules/safe-buffer/index.js ***!
|
|
39465
|
-
\**************************************************************************/
|
|
39466
|
-
/***/ ((module, exports, __webpack_require__) => {
|
|
39467
|
-
|
|
39468
|
-
eval("/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(/*! buffer */ \"buffer\")\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/safe-buffer/index.js?");
|
|
39469
|
-
|
|
39470
|
-
/***/ }),
|
|
39471
|
-
|
|
39472
|
-
/***/ "./node_modules/winston-transport/node_modules/string_decoder/lib/string_decoder.js":
|
|
39473
|
-
/*!******************************************************************************************!*\
|
|
39474
|
-
!*** ./node_modules/winston-transport/node_modules/string_decoder/lib/string_decoder.js ***!
|
|
39475
|
-
\******************************************************************************************/
|
|
39476
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
39477
|
-
|
|
39478
|
-
"use strict";
|
|
39479
|
-
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n/*<replacement>*/\n\nvar Buffer = (__webpack_require__(/*! safe-buffer */ \"./node_modules/winston-transport/node_modules/safe-buffer/index.js\").Buffer);\n/*</replacement>*/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n return true;\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n case 'latin1':\n case 'binary':\n return 'latin1';\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n default:\n if (retried) return; // undefined\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n return nb;\n }\n return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return '\\ufffd';\n }\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return '\\ufffd';\n }\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return '\\ufffd';\n }\n }\n }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + '\\ufffd';\n return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n return r;\n }\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}\n\n//# sourceURL=webpack://open-lens/./node_modules/winston-transport/node_modules/string_decoder/lib/string_decoder.js?");
|
|
39480
|
-
|
|
39481
|
-
/***/ }),
|
|
39482
|
-
|
|
39483
39422
|
/***/ "./node_modules/winston/dist/winston.js":
|
|
39484
39423
|
/*!**********************************************!*\
|
|
39485
39424
|
!*** ./node_modules/winston/dist/winston.js ***!
|
|
@@ -39487,7 +39426,7 @@ eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission
|
|
|
39487
39426
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
39488
39427
|
|
|
39489
39428
|
"use strict";
|
|
39490
|
-
eval("/**\n * winston.js: Top-level include defining Winston.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nvar logform = __webpack_require__(/*! logform */ \"./node_modules/logform/dist/browser.js\");\n\nvar _require = __webpack_require__(/*! ./winston/common */ \"./node_modules/winston/dist/winston/common.js\"),\n warn = _require.warn;\n/**\n *
|
|
39429
|
+
eval("/**\n * winston.js: Top-level include defining Winston.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nvar logform = __webpack_require__(/*! logform */ \"./node_modules/logform/dist/browser.js\");\n\nvar _require = __webpack_require__(/*! ./winston/common */ \"./node_modules/winston/dist/winston/common.js\"),\n warn = _require.warn;\n/**\n * Expose version. Use `require` method for `webpack` support.\n * @type {string}\n */\n\n\nexports.version = __webpack_require__(/*! ../package.json */ \"./node_modules/winston/package.json\").version;\n/**\n * Include transports defined by default by winston\n * @type {Array}\n */\n\nexports.transports = __webpack_require__(/*! ./winston/transports */ \"./node_modules/winston/dist/winston/transports/index.js\");\n/**\n * Expose utility methods\n * @type {Object}\n */\n\nexports.config = __webpack_require__(/*! ./winston/config */ \"./node_modules/winston/dist/winston/config/index.js\");\n/**\n * Hoist format-related functionality from logform.\n * @type {Object}\n */\n\nexports.addColors = logform.levels;\n/**\n * Hoist format-related functionality from logform.\n * @type {Object}\n */\n\nexports.format = logform.format;\n/**\n * Expose core Logging-related prototypes.\n * @type {function}\n */\n\nexports.createLogger = __webpack_require__(/*! ./winston/create-logger */ \"./node_modules/winston/dist/winston/create-logger.js\");\n/**\n * Expose core Logging-related prototypes.\n * @type {Object}\n */\n\nexports.ExceptionHandler = __webpack_require__(/*! ./winston/exception-handler */ \"./node_modules/winston/dist/winston/exception-handler.js\");\n/**\n * Expose core Logging-related prototypes.\n * @type {Object}\n */\n\nexports.RejectionHandler = __webpack_require__(/*! ./winston/rejection-handler */ \"./node_modules/winston/dist/winston/rejection-handler.js\");\n/**\n * Expose core Logging-related prototypes.\n * @type {Container}\n */\n\nexports.Container = __webpack_require__(/*! ./winston/container */ \"./node_modules/winston/dist/winston/container.js\");\n/**\n * Expose core Logging-related prototypes.\n * @type {Object}\n */\n\nexports.Transport = __webpack_require__(/*! winston-transport */ \"./node_modules/winston-transport/dist/index.js\");\n/**\n * We create and expose a default `Container` to `winston.loggers` so that the\n * programmer may manage multiple `winston.Logger` instances without any\n * additional overhead.\n * @example\n * // some-file1.js\n * const logger = require('winston').loggers.get('something');\n *\n * // some-file2.js\n * const logger = require('winston').loggers.get('something');\n */\n\nexports.loggers = new exports.Container();\n/**\n * We create and expose a 'defaultLogger' so that the programmer may do the\n * following without the need to create an instance of winston.Logger directly:\n * @example\n * const winston = require('winston');\n * winston.log('info', 'some message');\n * winston.error('some error');\n */\n\nvar defaultLogger = exports.createLogger(); // Pass through the target methods onto `winston.\n\nObject.keys(exports.config.npm.levels).concat(['log', 'query', 'stream', 'add', 'remove', 'clear', 'profile', 'startTimer', 'handleExceptions', 'unhandleExceptions', 'handleRejections', 'unhandleRejections', 'configure', 'child']).forEach(function (method) {\n return exports[method] = function () {\n return defaultLogger[method].apply(defaultLogger, arguments);\n };\n});\n/**\n * Define getter / setter for the default logger level which need to be exposed\n * by winston.\n * @type {string}\n */\n\nObject.defineProperty(exports, \"level\", ({\n get: function get() {\n return defaultLogger.level;\n },\n set: function set(val) {\n defaultLogger.level = val;\n }\n}));\n/**\n * Define getter for `exceptions` which replaces `handleExceptions` and\n * `unhandleExceptions`.\n * @type {Object}\n */\n\nObject.defineProperty(exports, \"exceptions\", ({\n get: function get() {\n return defaultLogger.exceptions;\n }\n}));\n/**\n * Define getters / setters for appropriate properties of the default logger\n * which need to be exposed by winston.\n * @type {Logger}\n */\n\n['exitOnError'].forEach(function (prop) {\n Object.defineProperty(exports, prop, {\n get: function get() {\n return defaultLogger[prop];\n },\n set: function set(val) {\n defaultLogger[prop] = val;\n }\n });\n});\n/**\n * The default transports and exceptionHandlers for the default winston logger.\n * @type {Object}\n */\n\nObject.defineProperty(exports, \"default\", ({\n get: function get() {\n return {\n exceptionHandlers: defaultLogger.exceptionHandlers,\n rejectionHandlers: defaultLogger.rejectionHandlers,\n transports: defaultLogger.transports\n };\n }\n})); // Have friendlier breakage notices for properties that were exposed by default\n// on winston < 3.0.\n\nwarn.deprecated(exports, 'setLevels');\nwarn.forFunctions(exports, 'useFormat', ['cli']);\nwarn.forProperties(exports, 'useFormat', ['padLevels', 'stripColors']);\nwarn.forFunctions(exports, 'deprecated', ['addRewriter', 'addFilter', 'clone', 'extend']);\nwarn.forProperties(exports, 'deprecated', ['emitErrs', 'levelLength']); // Throw a useful error when users attempt to run `new winston.Logger`.\n\nwarn.moved(exports, 'createLogger', 'Logger');\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston.js?");
|
|
39491
39430
|
|
|
39492
39431
|
/***/ }),
|
|
39493
39432
|
|
|
@@ -39520,7 +39459,7 @@ eval("/**\n * index.js: Default settings for all levels that winston knows about
|
|
|
39520
39459
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39521
39460
|
|
|
39522
39461
|
"use strict";
|
|
39523
|
-
eval("/**\n * container.js: Inversion of control container for winston logger instances.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar createLogger = __webpack_require__(/*! ./create-logger */ \"./node_modules/winston/dist/winston/create-logger.js\");\n/**\n * Inversion of control container for winston logger instances.\n * @type {Container}\n */\n\n\nmodule.exports = /*#__PURE__*/function () {\n /**\n * Constructor function for the Container object responsible for managing a\n * set of `winston.Logger` instances based on string ids.\n * @param {!Object} [options={}] - Default pass-thru options for Loggers.\n */\n function Container() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Container);\n\n this.loggers = new Map();\n this.options = options;\n }\n /**\n *
|
|
39462
|
+
eval("/**\n * container.js: Inversion of control container for winston logger instances.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar createLogger = __webpack_require__(/*! ./create-logger */ \"./node_modules/winston/dist/winston/create-logger.js\");\n/**\n * Inversion of control container for winston logger instances.\n * @type {Container}\n */\n\n\nmodule.exports = /*#__PURE__*/function () {\n /**\n * Constructor function for the Container object responsible for managing a\n * set of `winston.Logger` instances based on string ids.\n * @param {!Object} [options={}] - Default pass-thru options for Loggers.\n */\n function Container() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Container);\n\n this.loggers = new Map();\n this.options = options;\n }\n /**\n * Retrieves a `winston.Logger` instance for the specified `id`. If an\n * instance does not exist, one is created.\n * @param {!string} id - The id of the Logger to get.\n * @param {?Object} [options] - Options for the Logger instance.\n * @returns {Logger} - A configured Logger instance with a specified id.\n */\n\n\n _createClass(Container, [{\n key: \"add\",\n value: function add(id, options) {\n var _this = this;\n\n if (!this.loggers.has(id)) {\n // Remark: Simple shallow clone for configuration options in case we pass\n // in instantiated protoypal objects\n options = Object.assign({}, options || this.options);\n var existing = options.transports || this.options.transports; // Remark: Make sure if we have an array of transports we slice it to\n // make copies of those references.\n\n options.transports = existing ? existing.slice() : [];\n var logger = createLogger(options);\n logger.on('close', function () {\n return _this._delete(id);\n });\n this.loggers.set(id, logger);\n }\n\n return this.loggers.get(id);\n }\n /**\n * Retreives a `winston.Logger` instance for the specified `id`. If\n * an instance does not exist, one is created.\n * @param {!string} id - The id of the Logger to get.\n * @param {?Object} [options] - Options for the Logger instance.\n * @returns {Logger} - A configured Logger instance with a specified id.\n */\n\n }, {\n key: \"get\",\n value: function get(id, options) {\n return this.add(id, options);\n }\n /**\n * Check if the container has a logger with the id.\n * @param {?string} id - The id of the Logger instance to find.\n * @returns {boolean} - Boolean value indicating if this instance has a\n * logger with the specified `id`.\n */\n\n }, {\n key: \"has\",\n value: function has(id) {\n return !!this.loggers.has(id);\n }\n /**\n * Closes a `Logger` instance with the specified `id` if it exists.\n * If no `id` is supplied then all Loggers are closed.\n * @param {?string} id - The id of the Logger instance to close.\n * @returns {undefined}\n */\n\n }, {\n key: \"close\",\n value: function close(id) {\n var _this2 = this;\n\n if (id) {\n return this._removeLogger(id);\n }\n\n this.loggers.forEach(function (val, key) {\n return _this2._removeLogger(key);\n });\n }\n /**\n * Remove a logger based on the id.\n * @param {!string} id - The id of the logger to remove.\n * @returns {undefined}\n * @private\n */\n\n }, {\n key: \"_removeLogger\",\n value: function _removeLogger(id) {\n if (!this.loggers.has(id)) {\n return;\n }\n\n var logger = this.loggers.get(id);\n logger.close();\n\n this._delete(id);\n }\n /**\n * Deletes a `Logger` instance with the specified `id`.\n * @param {!string} id - The id of the Logger instance to delete from\n * container.\n * @returns {undefined}\n * @private\n */\n\n }, {\n key: \"_delete\",\n value: function _delete(id) {\n this.loggers[\"delete\"](id);\n }\n }]);\n\n return Container;\n}();\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/container.js?");
|
|
39524
39463
|
|
|
39525
39464
|
/***/ }),
|
|
39526
39465
|
|
|
@@ -39531,7 +39470,7 @@ eval("/**\n * container.js: Inversion of control container for winston logger in
|
|
|
39531
39470
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39532
39471
|
|
|
39533
39472
|
"use strict";
|
|
39534
|
-
eval("/**\n * create-logger.js: Logger factory for winston logger instances.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\";
|
|
39473
|
+
eval("/**\n * create-logger.js: Logger factory for winston logger instances.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n LEVEL = _require.LEVEL;\n\nvar config = __webpack_require__(/*! ./config */ \"./node_modules/winston/dist/winston/config/index.js\");\n\nvar Logger = __webpack_require__(/*! ./logger */ \"./node_modules/winston/dist/winston/logger.js\");\n\nvar debug = __webpack_require__(/*! @dabh/diagnostics */ \"./node_modules/@dabh/diagnostics/browser/index.js\")('winston:create-logger');\n\nfunction isLevelEnabledFunctionName(level) {\n return 'is' + level.charAt(0).toUpperCase() + level.slice(1) + 'Enabled';\n}\n/**\n * Create a new instance of a winston Logger. Creates a new\n * prototype for each instance.\n * @param {!Object} opts - Options for the created logger.\n * @returns {Logger} - A newly created logger instance.\n */\n\n\nmodule.exports = function () {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n //\n // Default levels: npm\n //\n opts.levels = opts.levels || config.npm.levels;\n /**\n * DerivedLogger to attach the logs level methods.\n * @type {DerivedLogger}\n * @extends {Logger}\n */\n\n var DerivedLogger = /*#__PURE__*/function (_Logger) {\n _inherits(DerivedLogger, _Logger);\n\n var _super = _createSuper(DerivedLogger);\n\n /**\n * Create a new class derived logger for which the levels can be attached to\n * the prototype of. This is a V8 optimization that is well know to increase\n * performance of prototype functions.\n * @param {!Object} options - Options for the created logger.\n */\n function DerivedLogger(options) {\n _classCallCheck(this, DerivedLogger);\n\n return _super.call(this, options);\n }\n\n return _createClass(DerivedLogger);\n }(Logger);\n\n var logger = new DerivedLogger(opts); //\n // Create the log level methods for the derived logger.\n //\n\n Object.keys(opts.levels).forEach(function (level) {\n debug('Define prototype method for \"%s\"', level);\n\n if (level === 'log') {\n // eslint-disable-next-line no-console\n console.warn('Level \"log\" not defined: conflicts with the method \"log\". Use a different level name.');\n return;\n } //\n // Define prototype methods for each log level e.g.:\n // logger.log('info', msg) implies these methods are defined:\n // - logger.info(msg)\n // - logger.isInfoEnabled()\n //\n // Remark: to support logger.child this **MUST** be a function\n // so it'll always be called on the instance instead of a fixed\n // place in the prototype chain.\n //\n\n\n DerivedLogger.prototype[level] = function () {\n // Prefer any instance scope, but default to \"root\" logger\n var self = this || logger; // Optimize the hot-path which is the single object.\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (args.length === 1) {\n var msg = args[0];\n var info = msg && msg.message && msg || {\n message: msg\n };\n info.level = info[LEVEL] = level;\n\n self._addDefaultMeta(info);\n\n self.write(info);\n return this || logger;\n } // When provided nothing assume the empty string\n\n\n if (args.length === 0) {\n self.log(level, '');\n return self;\n } // Otherwise build argument list which could potentially conform to\n // either:\n // . v3 API: log(obj)\n // 2. v1/v2 API: log(level, msg, ... [string interpolate], [{metadata}], [callback])\n\n\n return self.log.apply(self, [level].concat(args));\n };\n\n DerivedLogger.prototype[isLevelEnabledFunctionName(level)] = function () {\n return (this || logger).isLevelEnabled(level);\n };\n });\n return logger;\n};\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/create-logger.js?");
|
|
39535
39474
|
|
|
39536
39475
|
/***/ }),
|
|
39537
39476
|
|
|
@@ -39542,7 +39481,7 @@ eval("/**\n * create-logger.js: Logger factory for winston logger instances.\n *
|
|
|
39542
39481
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39543
39482
|
|
|
39544
39483
|
"use strict";
|
|
39545
|
-
eval("/**\n * exception-handler.js: Object for handling uncaughtException events.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar os = __webpack_require__(/*! os */ \"os\");\n\nvar asyncForEach = __webpack_require__(/*! async/forEach */ \"./node_modules/async/forEach.js\");\n\nvar debug = __webpack_require__(/*! @dabh/diagnostics */ \"./node_modules/@dabh/diagnostics/browser/index.js\")('winston:exception');\n\nvar once = __webpack_require__(/*! one-time */ \"./node_modules/one-time/index.js\");\n\nvar stackTrace = __webpack_require__(/*! stack-trace */ \"./node_modules/stack-trace/lib/stack-trace.js\");\n\nvar ExceptionStream = __webpack_require__(/*! ./exception-stream */ \"./node_modules/winston/dist/winston/exception-stream.js\");\n/**\n * Object for handling uncaughtException events.\n * @type {ExceptionHandler}\n */\n\n\nmodule.exports = /*#__PURE__*/function () {\n /**\n * TODO: add contructor description\n * @param {!Logger} logger - TODO: add param description\n */\n function ExceptionHandler(logger) {\n _classCallCheck(this, ExceptionHandler);\n\n if (!logger) {\n throw new Error('Logger is required to handle exceptions');\n }\n\n this.logger = logger;\n this.handlers = new Map();\n }\n /**\n * Handles `uncaughtException` events for the current process by adding any\n * handlers passed in.\n * @returns {undefined}\n */\n\n\n _createClass(ExceptionHandler, [{\n key: \"handle\",\n value: function handle() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n args.forEach(function (arg) {\n if (Array.isArray(arg)) {\n return arg.forEach(function (handler) {\n return _this._addHandler(handler);\n });\n }\n\n _this._addHandler(arg);\n });\n\n if (!this.catcher) {\n this.catcher = this._uncaughtException.bind(this);\n process.on('uncaughtException', this.catcher);\n }\n }\n /**\n * Removes any handlers to `uncaughtException` events for the current\n * process. This does not modify the state of the `this.handlers` set.\n * @returns {undefined}\n */\n\n }, {\n key: \"unhandle\",\n value: function unhandle() {\n var _this2 = this;\n\n if (this.catcher) {\n process.removeListener('uncaughtException', this.catcher);\n this.catcher = false;\n Array.from(this.handlers.values()).forEach(function (wrapper) {\n return _this2.logger.unpipe(wrapper);\n });\n }\n }\n /**\n * TODO: add method description\n * @param {Error} err - Error to get information about.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getAllInfo\",\n value: function getAllInfo(err) {\n var message = err.message;\n\n if (!message && typeof err === 'string') {\n message = err;\n }\n\n return {\n error: err,\n // TODO (indexzero): how do we configure this?\n level: 'error',\n message: [\"uncaughtException: \".concat(message || '(no error message)'), err.stack || ' No stack trace'].join('\\n'),\n stack: err.stack,\n exception: true,\n date: new Date().toString(),\n process: this.getProcessInfo(),\n os: this.getOsInfo(),\n trace: this.getTrace(err)\n };\n }\n /**\n * Gets all relevant process information for the currently running process.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getProcessInfo\",\n value: function getProcessInfo() {\n return {\n pid: process.pid,\n uid: process.getuid ? process.getuid() : null,\n gid: process.getgid ? process.getgid() : null,\n cwd: process.cwd(),\n execPath: process.execPath,\n version: process.version,\n argv: process.argv,\n memoryUsage: process.memoryUsage()\n };\n }\n /**\n * Gets all relevant OS information for the currently running process.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getOsInfo\",\n value: function getOsInfo() {\n return {\n loadavg: os.loadavg(),\n uptime: os.uptime()\n };\n }\n /**\n * Gets a stack trace for the specified error.\n * @param {mixed} err - TODO: add param description.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getTrace\",\n value: function getTrace(err) {\n var trace = err ? stackTrace.parse(err) : stackTrace.get();\n return trace.map(function (site) {\n return {\n column: site.getColumnNumber(),\n file: site.getFileName(),\n \"function\": site.getFunctionName(),\n line: site.getLineNumber(),\n method: site.getMethodName(),\n \"native\": site.isNative()\n };\n });\n }\n /**\n * Helper method to add a transport as an exception handler.\n * @param {Transport} handler - The transport to add as an exception handler.\n * @returns {void}\n */\n\n }, {\n key: \"_addHandler\",\n value: function _addHandler(handler) {\n if (!this.handlers.has(handler)) {\n handler.handleExceptions = true;\n var wrapper = new ExceptionStream(handler);\n this.handlers.set(handler, wrapper);\n this.logger.pipe(wrapper);\n }\n }\n /**\n * Logs all relevant information around the `err` and exits the current\n * process.\n * @param {Error} err - Error to handle\n * @returns {mixed} - TODO: add return description.\n * @private\n */\n\n }, {\n key: \"_uncaughtException\",\n value: function _uncaughtException(err) {\n var info = this.getAllInfo(err);\n\n var handlers = this._getExceptionHandlers(); // Calculate if we should exit on this error\n\n\n var doExit = typeof this.logger.exitOnError === 'function' ? this.logger.exitOnError(err) : this.logger.exitOnError;\n var timeout;\n\n if (!handlers.length && doExit) {\n // eslint-disable-next-line no-console\n console.warn('winston: exitOnError cannot be true with no exception handlers.'); // eslint-disable-next-line no-console\n\n console.warn('winston: not exiting process.');\n doExit = false;\n }\n\n function gracefulExit() {\n debug('doExit', doExit);\n debug('process._exiting', process._exiting);\n\n if (doExit && !process._exiting) {\n // Remark: Currently ignoring any exceptions from transports when\n // catching uncaught exceptions.\n if (timeout) {\n clearTimeout(timeout);\n } // eslint-disable-next-line no-process-exit\n\n\n process.exit(1);\n }\n }\n\n if (!handlers || handlers.length === 0) {\n return process.nextTick(gracefulExit);\n } // Log to all transports attempting to listen for when they are completed.\n\n\n asyncForEach(handlers, function (handler, next) {\n var done = once(next);\n var transport = handler.transport || handler; // Debug wrapping so that we can inspect what's going on under the covers.\n\n function onDone(event) {\n return function () {\n debug(event);\n done();\n };\n }\n\n transport._ending = true;\n transport.once('finish', onDone('finished'));\n transport.once('error', onDone('error'));\n }, function () {\n return doExit && gracefulExit();\n });\n this.logger.log(info); // If exitOnError is true, then only allow the logging of exceptions to\n // take up to `3000ms`.\n\n if (doExit) {\n timeout = setTimeout(gracefulExit, 3000);\n }\n }\n /**\n * Returns the list of transports and exceptionHandlers for this instance.\n * @returns {Array} - List of transports and exceptionHandlers for this\n * instance.\n * @private\n */\n\n }, {\n key: \"_getExceptionHandlers\",\n value: function _getExceptionHandlers() {\n // Remark (indexzero): since `logger.transports` returns all of the pipes\n // from the _readableState of the stream we actually get the join of the\n // explicit handlers and the implicit transports with\n // `handleExceptions: true`\n return this.logger.transports.filter(function (wrap) {\n var transport = wrap.transport || wrap;\n return transport.handleExceptions;\n });\n }\n }]);\n\n return ExceptionHandler;\n}();\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/exception-handler.js?");
|
|
39484
|
+
eval("/**\n * exception-handler.js: Object for handling uncaughtException events.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar os = __webpack_require__(/*! os */ \"os\");\n\nvar asyncForEach = __webpack_require__(/*! async/forEach */ \"./node_modules/async/forEach.js\");\n\nvar debug = __webpack_require__(/*! @dabh/diagnostics */ \"./node_modules/@dabh/diagnostics/browser/index.js\")('winston:exception');\n\nvar once = __webpack_require__(/*! one-time */ \"./node_modules/one-time/index.js\");\n\nvar stackTrace = __webpack_require__(/*! stack-trace */ \"./node_modules/stack-trace/lib/stack-trace.js\");\n\nvar ExceptionStream = __webpack_require__(/*! ./exception-stream */ \"./node_modules/winston/dist/winston/exception-stream.js\");\n/**\n * Object for handling uncaughtException events.\n * @type {ExceptionHandler}\n */\n\n\nmodule.exports = /*#__PURE__*/function () {\n /**\n * TODO: add contructor description\n * @param {!Logger} logger - TODO: add param description\n */\n function ExceptionHandler(logger) {\n _classCallCheck(this, ExceptionHandler);\n\n if (!logger) {\n throw new Error('Logger is required to handle exceptions');\n }\n\n this.logger = logger;\n this.handlers = new Map();\n }\n /**\n * Handles `uncaughtException` events for the current process by adding any\n * handlers passed in.\n * @returns {undefined}\n */\n\n\n _createClass(ExceptionHandler, [{\n key: \"handle\",\n value: function handle() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n args.forEach(function (arg) {\n if (Array.isArray(arg)) {\n return arg.forEach(function (handler) {\n return _this._addHandler(handler);\n });\n }\n\n _this._addHandler(arg);\n });\n\n if (!this.catcher) {\n this.catcher = this._uncaughtException.bind(this);\n process.on('uncaughtException', this.catcher);\n }\n }\n /**\n * Removes any handlers to `uncaughtException` events for the current\n * process. This does not modify the state of the `this.handlers` set.\n * @returns {undefined}\n */\n\n }, {\n key: \"unhandle\",\n value: function unhandle() {\n var _this2 = this;\n\n if (this.catcher) {\n process.removeListener('uncaughtException', this.catcher);\n this.catcher = false;\n Array.from(this.handlers.values()).forEach(function (wrapper) {\n return _this2.logger.unpipe(wrapper);\n });\n }\n }\n /**\n * TODO: add method description\n * @param {Error} err - Error to get information about.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getAllInfo\",\n value: function getAllInfo(err) {\n var message = err.message;\n\n if (!message && typeof err === 'string') {\n message = err;\n }\n\n return {\n error: err,\n // TODO (indexzero): how do we configure this?\n level: 'error',\n message: [\"uncaughtException: \".concat(message || '(no error message)'), err.stack || ' No stack trace'].join('\\n'),\n stack: err.stack,\n exception: true,\n date: new Date().toString(),\n process: this.getProcessInfo(),\n os: this.getOsInfo(),\n trace: this.getTrace(err)\n };\n }\n /**\n * Gets all relevant process information for the currently running process.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getProcessInfo\",\n value: function getProcessInfo() {\n return {\n pid: process.pid,\n uid: process.getuid ? process.getuid() : null,\n gid: process.getgid ? process.getgid() : null,\n cwd: process.cwd(),\n execPath: process.execPath,\n version: process.version,\n argv: process.argv,\n memoryUsage: process.memoryUsage()\n };\n }\n /**\n * Gets all relevant OS information for the currently running process.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getOsInfo\",\n value: function getOsInfo() {\n return {\n loadavg: os.loadavg(),\n uptime: os.uptime()\n };\n }\n /**\n * Gets a stack trace for the specified error.\n * @param {mixed} err - TODO: add param description.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getTrace\",\n value: function getTrace(err) {\n var trace = err ? stackTrace.parse(err) : stackTrace.get();\n return trace.map(function (site) {\n return {\n column: site.getColumnNumber(),\n file: site.getFileName(),\n \"function\": site.getFunctionName(),\n line: site.getLineNumber(),\n method: site.getMethodName(),\n \"native\": site.isNative()\n };\n });\n }\n /**\n * Helper method to add a transport as an exception handler.\n * @param {Transport} handler - The transport to add as an exception handler.\n * @returns {void}\n */\n\n }, {\n key: \"_addHandler\",\n value: function _addHandler(handler) {\n if (!this.handlers.has(handler)) {\n handler.handleExceptions = true;\n var wrapper = new ExceptionStream(handler);\n this.handlers.set(handler, wrapper);\n this.logger.pipe(wrapper);\n }\n }\n /**\n * Logs all relevant information around the `err` and exits the current\n * process.\n * @param {Error} err - Error to handle\n * @returns {mixed} - TODO: add return description.\n * @private\n */\n\n }, {\n key: \"_uncaughtException\",\n value: function _uncaughtException(err) {\n var info = this.getAllInfo(err);\n\n var handlers = this._getExceptionHandlers(); // Calculate if we should exit on this error\n\n\n var doExit = typeof this.logger.exitOnError === 'function' ? this.logger.exitOnError(err) : this.logger.exitOnError;\n var timeout;\n\n if (!handlers.length && doExit) {\n // eslint-disable-next-line no-console\n console.warn('winston: exitOnError cannot be true with no exception handlers.'); // eslint-disable-next-line no-console\n\n console.warn('winston: not exiting process.');\n doExit = false;\n }\n\n function gracefulExit() {\n debug('doExit', doExit);\n debug('process._exiting', process._exiting);\n\n if (doExit && !process._exiting) {\n // Remark: Currently ignoring any exceptions from transports when\n // catching uncaught exceptions.\n if (timeout) {\n clearTimeout(timeout);\n } // eslint-disable-next-line no-process-exit\n\n\n process.exit(1);\n }\n }\n\n if (!handlers || handlers.length === 0) {\n return process.nextTick(gracefulExit);\n } // Log to all transports attempting to listen for when they are completed.\n\n\n asyncForEach(handlers, function (handler, next) {\n var done = once(next);\n var transport = handler.transport || handler; // Debug wrapping so that we can inspect what's going on under the covers.\n\n function onDone(event) {\n return function () {\n debug(event);\n done();\n };\n }\n\n transport._ending = true;\n transport.once('finish', onDone('finished'));\n transport.once('error', onDone('error'));\n }, function () {\n return doExit && gracefulExit();\n });\n this.logger.log(info); // If exitOnError is true, then only allow the logging of exceptions to\n // take up to `3000ms`.\n\n if (doExit) {\n timeout = setTimeout(gracefulExit, 3000);\n }\n }\n /**\n * Returns the list of transports and exceptionHandlers for this instance.\n * @returns {Array} - List of transports and exceptionHandlers for this\n * instance.\n * @private\n */\n\n }, {\n key: \"_getExceptionHandlers\",\n value: function _getExceptionHandlers() {\n // Remark (indexzero): since `logger.transports` returns all of the pipes\n // from the _readableState of the stream we actually get the join of the\n // explicit handlers and the implicit transports with\n // `handleExceptions: true`\n return this.logger.transports.filter(function (wrap) {\n var transport = wrap.transport || wrap;\n return transport.handleExceptions;\n });\n }\n }]);\n\n return ExceptionHandler;\n}();\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/exception-handler.js?");
|
|
39546
39485
|
|
|
39547
39486
|
/***/ }),
|
|
39548
39487
|
|
|
@@ -39553,7 +39492,7 @@ eval("/**\n * exception-handler.js: Object for handling uncaughtException events
|
|
|
39553
39492
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39554
39493
|
|
|
39555
39494
|
"use strict";
|
|
39556
|
-
eval("/**\n * exception-stream.js: TODO: add file header handler.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\";
|
|
39495
|
+
eval("/**\n * exception-stream.js: TODO: add file header handler.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar _require = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\"),\n Writable = _require.Writable;\n/**\n * TODO: add class description.\n * @type {ExceptionStream}\n * @extends {Writable}\n */\n\n\nmodule.exports = /*#__PURE__*/function (_Writable) {\n _inherits(ExceptionStream, _Writable);\n\n var _super = _createSuper(ExceptionStream);\n\n /**\n * Constructor function for the ExceptionStream responsible for wrapping a\n * TransportStream; only allowing writes of `info` objects with\n * `info.exception` set to true.\n * @param {!TransportStream} transport - Stream to filter to exceptions\n */\n function ExceptionStream(transport) {\n var _this;\n\n _classCallCheck(this, ExceptionStream);\n\n _this = _super.call(this, {\n objectMode: true\n });\n\n if (!transport) {\n throw new Error('ExceptionStream requires a TransportStream instance.');\n } // Remark (indexzero): we set `handleExceptions` here because it's the\n // predicate checked in ExceptionHandler.prototype.__getExceptionHandlers\n\n\n _this.handleExceptions = true;\n _this.transport = transport;\n return _this;\n }\n /**\n * Writes the info object to our transport instance if (and only if) the\n * `exception` property is set on the info.\n * @param {mixed} info - TODO: add param description.\n * @param {mixed} enc - TODO: add param description.\n * @param {mixed} callback - TODO: add param description.\n * @returns {mixed} - TODO: add return description.\n * @private\n */\n\n\n _createClass(ExceptionStream, [{\n key: \"_write\",\n value: function _write(info, enc, callback) {\n if (info.exception) {\n return this.transport.log(info, callback);\n }\n\n callback();\n return true;\n }\n }]);\n\n return ExceptionStream;\n}(Writable);\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/exception-stream.js?");
|
|
39557
39496
|
|
|
39558
39497
|
/***/ }),
|
|
39559
39498
|
|
|
@@ -39564,7 +39503,7 @@ eval("/**\n * exception-stream.js: TODO: add file header handler.\n *\n * (C) 20
|
|
|
39564
39503
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39565
39504
|
|
|
39566
39505
|
"use strict";
|
|
39567
|
-
eval("/**\n * logger.js: TODO: add file header description.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar _require = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\"),\n Stream = _require.Stream,\n Transform = _require.Transform;\n\nvar asyncForEach = __webpack_require__(/*! async/forEach */ \"./node_modules/async/forEach.js\");\n\nvar _require2 = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n LEVEL = _require2.LEVEL,\n SPLAT = _require2.SPLAT;\n\nvar isStream = __webpack_require__(/*! is-stream */ \"./node_modules/is-stream/index.js\");\n\nvar ExceptionHandler = __webpack_require__(/*! ./exception-handler */ \"./node_modules/winston/dist/winston/exception-handler.js\");\n\nvar RejectionHandler = __webpack_require__(/*! ./rejection-handler */ \"./node_modules/winston/dist/winston/rejection-handler.js\");\n\nvar LegacyTransportStream = __webpack_require__(/*! winston-transport/legacy */ \"./node_modules/winston-transport/legacy.js\");\n\nvar Profiler = __webpack_require__(/*! ./profiler */ \"./node_modules/winston/dist/winston/profiler.js\");\n\nvar _require3 = __webpack_require__(/*! ./common */ \"./node_modules/winston/dist/winston/common.js\"),\n warn = _require3.warn;\n\nvar config = __webpack_require__(/*! ./config */ \"./node_modules/winston/dist/winston/config/index.js\");\n/**\n * Captures the number of format (i.e. %s strings) in a given string.\n * Based on `util.format`, see Node.js source:\n * https://github.com/nodejs/node/blob/b1c8f15c5f169e021f7c46eb7b219de95fe97603/lib/util.js#L201-L230\n * @type {RegExp}\n */\n\n\nvar formatRegExp = /%[scdjifoO%]/g;\n/**\n * TODO: add class description.\n * @type {Logger}\n * @extends {Transform}\n */\n\nvar Logger = /*#__PURE__*/function (_Transform) {\n _inherits(Logger, _Transform);\n\n var _super = _createSuper(Logger);\n\n /**\n * Constructor function for the Logger object responsible for persisting log\n * messages and metadata to one or more transports.\n * @param {!Object} options - foo\n */\n function Logger(options) {\n var _this;\n\n _classCallCheck(this, Logger);\n\n _this = _super.call(this, {\n objectMode: true\n });\n\n _this.configure(options);\n\n return _this;\n }\n\n _createClass(Logger, [{\n key: \"child\",\n value: function child(defaultRequestMetadata) {\n var logger = this;\n return Object.create(logger, {\n write: {\n value: function value(info) {\n var infoClone = Object.assign({}, defaultRequestMetadata, info); // Object.assign doesn't copy inherited Error\n // properties so we have to do that explicitly\n //\n // Remark (indexzero): we should remove this\n // since the errors format will handle this case.\n //\n\n if (info instanceof Error) {\n infoClone.stack = info.stack;\n infoClone.message = info.message;\n }\n\n logger.write(infoClone);\n }\n }\n });\n }\n /**\n * This will wholesale reconfigure this instance by:\n * 1. Resetting all transports. Older transports will be removed implicitly.\n * 2. Set all other options including levels, colors, rewriters, filters,\n * exceptionHandlers, etc.\n * @param {!Object} options - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"configure\",\n value: function configure() {\n var _this2 = this;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n silent = _ref.silent,\n format = _ref.format,\n defaultMeta = _ref.defaultMeta,\n levels = _ref.levels,\n _ref$level = _ref.level,\n level = _ref$level === void 0 ? 'info' : _ref$level,\n _ref$exitOnError = _ref.exitOnError,\n exitOnError = _ref$exitOnError === void 0 ? true : _ref$exitOnError,\n transports = _ref.transports,\n colors = _ref.colors,\n emitErrs = _ref.emitErrs,\n formatters = _ref.formatters,\n padLevels = _ref.padLevels,\n rewriters = _ref.rewriters,\n stripColors = _ref.stripColors,\n exceptionHandlers = _ref.exceptionHandlers,\n rejectionHandlers = _ref.rejectionHandlers;\n\n // Reset transports if we already have them\n if (this.transports.length) {\n this.clear();\n }\n\n this.silent = silent;\n this.format = format || this.format || __webpack_require__(/*! logform/json */ \"./node_modules/logform/json.js\")();\n this.defaultMeta = defaultMeta || null; // Hoist other options onto this instance.\n\n this.levels = levels || this.levels || config.npm.levels;\n this.level = level;\n this.exceptions = new ExceptionHandler(this);\n this.rejections = new RejectionHandler(this);\n this.profilers = {};\n this.exitOnError = exitOnError; // Add all transports we have been provided.\n\n if (transports) {\n transports = Array.isArray(transports) ? transports : [transports];\n transports.forEach(function (transport) {\n return _this2.add(transport);\n });\n }\n\n if (colors || emitErrs || formatters || padLevels || rewriters || stripColors) {\n throw new Error(['{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.', 'Use a custom winston.format(function) instead.', 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md'].join('\\n'));\n }\n\n if (exceptionHandlers) {\n this.exceptions.handle(exceptionHandlers);\n }\n\n if (rejectionHandlers) {\n this.rejections.handle(rejectionHandlers);\n }\n }\n }, {\n key: \"isLevelEnabled\",\n value: function isLevelEnabled(level) {\n var _this3 = this;\n\n var givenLevelValue = getLevelValue(this.levels, level);\n\n if (givenLevelValue === null) {\n return false;\n }\n\n var configuredLevelValue = getLevelValue(this.levels, this.level);\n\n if (configuredLevelValue === null) {\n return false;\n }\n\n if (!this.transports || this.transports.length === 0) {\n return configuredLevelValue >= givenLevelValue;\n }\n\n var index = this.transports.findIndex(function (transport) {\n var transportLevelValue = getLevelValue(_this3.levels, transport.level);\n\n if (transportLevelValue === null) {\n transportLevelValue = configuredLevelValue;\n }\n\n return transportLevelValue >= givenLevelValue;\n });\n return index !== -1;\n }\n /* eslint-disable valid-jsdoc */\n\n /**\n * Ensure backwards compatibility with a `log` method\n * @param {mixed} level - Level the log message is written at.\n * @param {mixed} msg - TODO: add param description.\n * @param {mixed} meta - TODO: add param description.\n * @returns {Logger} - TODO: add return description.\n *\n * @example\n * // Supports the existing API:\n * logger.log('info', 'Hello world', { custom: true });\n * logger.log('info', new Error('Yo, it\\'s on fire'));\n *\n * // Requires winston.format.splat()\n * logger.log('info', '%s %d%%', 'A string', 50, { thisIsMeta: true });\n *\n * // And the new API with a single JSON literal:\n * logger.log({ level: 'info', message: 'Hello world', custom: true });\n * logger.log({ level: 'info', message: new Error('Yo, it\\'s on fire') });\n *\n * // Also requires winston.format.splat()\n * logger.log({\n * level: 'info',\n * message: '%s %d%%',\n * [SPLAT]: ['A string', 50],\n * meta: { thisIsMeta: true }\n * });\n *\n */\n\n /* eslint-enable valid-jsdoc */\n\n }, {\n key: \"log\",\n value: function log(level, msg) {\n var _Object$assign2;\n\n for (var _len = arguments.length, splat = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n splat[_key - 2] = arguments[_key];\n }\n\n // eslint-disable-line max-params\n // Optimize for the hotpath of logging JSON literals\n if (arguments.length === 1) {\n // Yo dawg, I heard you like levels ... seriously ...\n // In this context the LHS `level` here is actually the `info` so read\n // this as: info[LEVEL] = info.level;\n level[LEVEL] = level.level;\n\n this._addDefaultMeta(level);\n\n this.write(level);\n return this;\n } // Slightly less hotpath, but worth optimizing for.\n\n\n if (arguments.length === 2) {\n var _this$write;\n\n if (msg && _typeof(msg) === 'object') {\n msg[LEVEL] = msg.level = level;\n\n this._addDefaultMeta(msg);\n\n this.write(msg);\n return this;\n }\n\n this.write((_this$write = {}, _defineProperty(_this$write, LEVEL, level), _defineProperty(_this$write, \"level\", level), _defineProperty(_this$write, \"message\", msg), _this$write));\n return this;\n }\n\n var meta = splat[0];\n\n if (_typeof(meta) === 'object' && meta !== null) {\n // Extract tokens, if none available default to empty array to\n // ensure consistancy in expected results\n var tokens = msg && msg.match && msg.match(formatRegExp);\n\n if (!tokens) {\n var _Object$assign;\n\n var info = Object.assign({}, this.defaultMeta, meta, (_Object$assign = {}, _defineProperty(_Object$assign, LEVEL, level), _defineProperty(_Object$assign, SPLAT, splat), _defineProperty(_Object$assign, \"level\", level), _defineProperty(_Object$assign, \"message\", msg), _Object$assign));\n if (meta.message) info.message = \"\".concat(info.message, \" \").concat(meta.message);\n if (meta.stack) info.stack = meta.stack;\n this.write(info);\n return this;\n }\n }\n\n this.write(Object.assign({}, this.defaultMeta, (_Object$assign2 = {}, _defineProperty(_Object$assign2, LEVEL, level), _defineProperty(_Object$assign2, SPLAT, splat), _defineProperty(_Object$assign2, \"level\", level), _defineProperty(_Object$assign2, \"message\", msg), _Object$assign2)));\n return this;\n }\n /**\n * Pushes data so that it can be picked up by all of our pipe targets.\n * @param {mixed} info - TODO: add param description.\n * @param {mixed} enc - TODO: add param description.\n * @param {mixed} callback - Continues stream processing.\n * @returns {undefined}\n * @private\n */\n\n }, {\n key: \"_transform\",\n value: function _transform(info, enc, callback) {\n if (this.silent) {\n return callback();\n } // [LEVEL] is only soft guaranteed to be set here since we are a proper\n // stream. It is likely that `info` came in through `.log(info)` or\n // `.info(info)`. If it is not defined, however, define it.\n // This LEVEL symbol is provided by `triple-beam` and also used in:\n // - logform\n // - winston-transport\n // - abstract-winston-transport\n\n\n if (!info[LEVEL]) {\n info[LEVEL] = info.level;\n } // Remark: really not sure what to do here, but this has been reported as\n // very confusing by pre winston@2.0.0 users as quite confusing when using\n // custom levels.\n\n\n if (!this.levels[info[LEVEL]] && this.levels[info[LEVEL]] !== 0) {\n // eslint-disable-next-line no-console\n console.error('[winston] Unknown logger level: %s', info[LEVEL]);\n } // Remark: not sure if we should simply error here.\n\n\n if (!this._readableState.pipes) {\n // eslint-disable-next-line no-console\n console.error('[winston] Attempt to write logs with no transports %j', info);\n } // Here we write to the `format` pipe-chain, which on `readable` above will\n // push the formatted `info` Object onto the buffer for this instance. We trap\n // (and re-throw) any errors generated by the user-provided format, but also\n // guarantee that the streams callback is invoked so that we can continue flowing.\n\n\n try {\n this.push(this.format.transform(info, this.format.options));\n } catch (ex) {\n throw ex;\n } finally {\n // eslint-disable-next-line callback-return\n callback();\n }\n }\n /**\n * Delays the 'finish' event until all transport pipe targets have\n * also emitted 'finish' or are already finished.\n * @param {mixed} callback - Continues stream processing.\n */\n\n }, {\n key: \"_final\",\n value: function _final(callback) {\n var transports = this.transports.slice();\n asyncForEach(transports, function (transport, next) {\n if (!transport || transport.finished) return setImmediate(next);\n transport.once('finish', next);\n transport.end();\n }, callback);\n }\n /**\n * Adds the transport to this logger instance by piping to it.\n * @param {mixed} transport - TODO: add param description.\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"add\",\n value: function add(transport) {\n // Support backwards compatibility with all existing `winston < 3.x.x`\n // transports which meet one of two criteria:\n // 1. They inherit from winston.Transport in < 3.x.x which is NOT a stream.\n // 2. They expose a log method which has a length greater than 2 (i.e. more then\n // just `log(info, callback)`.\n var target = !isStream(transport) || transport.log.length > 2 ? new LegacyTransportStream({\n transport: transport\n }) : transport;\n\n if (!target._writableState || !target._writableState.objectMode) {\n throw new Error('Transports must WritableStreams in objectMode. Set { objectMode: true }.');\n } // Listen for the `error` event and the `warn` event on the new Transport.\n\n\n this._onEvent('error', target);\n\n this._onEvent('warn', target);\n\n this.pipe(target);\n\n if (transport.handleExceptions) {\n this.exceptions.handle();\n }\n\n if (transport.handleRejections) {\n this.rejections.handle();\n }\n\n return this;\n }\n /**\n * Removes the transport from this logger instance by unpiping from it.\n * @param {mixed} transport - TODO: add param description.\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"remove\",\n value: function remove(transport) {\n if (!transport) return this;\n var target = transport;\n\n if (!isStream(transport) || transport.log.length > 2) {\n target = this.transports.filter(function (match) {\n return match.transport === transport;\n })[0];\n }\n\n if (target) {\n this.unpipe(target);\n }\n\n return this;\n }\n /**\n * Removes all transports from this logger instance.\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.unpipe();\n return this;\n }\n /**\n * Cleans up resources (streams, event listeners) for all transports\n * associated with this instance (if necessary).\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n this.clear();\n this.emit('close');\n return this;\n }\n /**\n * Sets the `target` levels specified on this instance.\n * @param {Object} Target levels to use on this instance.\n */\n\n }, {\n key: \"setLevels\",\n value: function setLevels() {\n warn.deprecated('setLevels');\n }\n /**\n * Queries the all transports for this instance with the specified `options`.\n * This will aggregate each transport's results into one object containing\n * a property per transport.\n * @param {Object} options - Query options for this instance.\n * @param {function} callback - Continuation to respond to when complete.\n */\n\n }, {\n key: \"query\",\n value: function query(options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n options = options || {};\n var results = {};\n var queryObject = Object.assign({}, options.query || {}); // Helper function to query a single transport\n\n function queryTransport(transport, next) {\n if (options.query && typeof transport.formatQuery === 'function') {\n options.query = transport.formatQuery(queryObject);\n }\n\n transport.query(options, function (err, res) {\n if (err) {\n return next(err);\n }\n\n if (typeof transport.formatResults === 'function') {\n res = transport.formatResults(res, options.format);\n }\n\n next(null, res);\n });\n } // Helper function to accumulate the results from `queryTransport` into\n // the `results`.\n\n\n function addResults(transport, next) {\n queryTransport(transport, function (err, result) {\n // queryTransport could potentially invoke the callback multiple times\n // since Transport code can be unpredictable.\n if (next) {\n result = err || result;\n\n if (result) {\n results[transport.name] = result;\n } // eslint-disable-next-line callback-return\n\n\n next();\n }\n\n next = null;\n });\n } // Iterate over the transports in parallel setting the appropriate key in\n // the `results`.\n\n\n asyncForEach(this.transports.filter(function (transport) {\n return !!transport.query;\n }), addResults, function () {\n return callback(null, results);\n });\n }\n /**\n * Returns a log stream for all transports. Options object is optional.\n * @param{Object} options={} - Stream options for this instance.\n * @returns {Stream} - TODO: add return description.\n */\n\n }, {\n key: \"stream\",\n value: function stream() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var out = new Stream();\n var streams = [];\n out._streams = streams;\n\n out.destroy = function () {\n var i = streams.length;\n\n while (i--) {\n streams[i].destroy();\n }\n }; // Create a list of all transports for this instance.\n\n\n this.transports.filter(function (transport) {\n return !!transport.stream;\n }).forEach(function (transport) {\n var str = transport.stream(options);\n\n if (!str) {\n return;\n }\n\n streams.push(str);\n str.on('log', function (log) {\n log.transport = log.transport || [];\n log.transport.push(transport.name);\n out.emit('log', log);\n });\n str.on('error', function (err) {\n err.transport = err.transport || [];\n err.transport.push(transport.name);\n out.emit('error', err);\n });\n });\n return out;\n }\n /**\n * Returns an object corresponding to a specific timing. When done is called\n * the timer will finish and log the duration. e.g.:\n * @returns {Profile} - TODO: add return description.\n * @example\n * const timer = winston.startTimer()\n * setTimeout(() => {\n * timer.done({\n * message: 'Logging message'\n * });\n * }, 1000);\n */\n\n }, {\n key: \"startTimer\",\n value: function startTimer() {\n return new Profiler(this);\n }\n /**\n * Tracks the time inbetween subsequent calls to this method with the same\n * `id` parameter. The second call to this method will log the difference in\n * milliseconds along with the message.\n * @param {string} id Unique id of the profiler\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"profile\",\n value: function profile(id) {\n var time = Date.now();\n\n if (this.profilers[id]) {\n var timeEnd = this.profilers[id];\n delete this.profilers[id]; // Attempt to be kind to users if they are still using older APIs.\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n if (typeof args[args.length - 2] === 'function') {\n // eslint-disable-next-line no-console\n console.warn('Callback function no longer supported as of winston@3.0.0');\n args.pop();\n } // Set the duration property of the metadata\n\n\n var info = _typeof(args[args.length - 1]) === 'object' ? args.pop() : {};\n info.level = info.level || 'info';\n info.durationMs = time - timeEnd;\n info.message = info.message || id;\n return this.write(info);\n }\n\n this.profilers[id] = time;\n return this;\n }\n /**\n * Backwards compatibility to `exceptions.handle` in winston < 3.0.0.\n * @returns {undefined}\n * @deprecated\n */\n\n }, {\n key: \"handleExceptions\",\n value: function handleExceptions() {\n var _this$exceptions;\n\n // eslint-disable-next-line no-console\n console.warn('Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()');\n\n (_this$exceptions = this.exceptions).handle.apply(_this$exceptions, arguments);\n }\n /**\n * Backwards compatibility to `exceptions.handle` in winston < 3.0.0.\n * @returns {undefined}\n * @deprecated\n */\n\n }, {\n key: \"unhandleExceptions\",\n value: function unhandleExceptions() {\n var _this$exceptions2;\n\n // eslint-disable-next-line no-console\n console.warn('Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()');\n\n (_this$exceptions2 = this.exceptions).unhandle.apply(_this$exceptions2, arguments);\n }\n /**\n * Throw a more meaningful deprecation notice\n * @throws {Error} - TODO: add throws description.\n */\n\n }, {\n key: \"cli\",\n value: function cli() {\n throw new Error(['Logger.cli() was removed in winston@3.0.0', 'Use a custom winston.formats.cli() instead.', 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md'].join('\\n'));\n }\n /**\n * Bubbles the `event` that occured on the specified `transport` up\n * from this instance.\n * @param {string} event - The event that occured\n * @param {Object} transport - Transport on which the event occured\n * @private\n */\n\n }, {\n key: \"_onEvent\",\n value: function _onEvent(event, transport) {\n function transportEvent(err) {\n // https://github.com/winstonjs/winston/issues/1364\n if (event === 'error' && !this.transports.includes(transport)) {\n this.add(transport);\n }\n\n this.emit(event, err, transport);\n }\n\n if (!transport['__winston' + event]) {\n transport['__winston' + event] = transportEvent.bind(this);\n transport.on(event, transport['__winston' + event]);\n }\n }\n }, {\n key: \"_addDefaultMeta\",\n value: function _addDefaultMeta(msg) {\n if (this.defaultMeta) {\n Object.assign(msg, this.defaultMeta);\n }\n }\n }]);\n\n return Logger;\n}(Transform);\n\nfunction getLevelValue(levels, level) {\n var value = levels[level];\n\n if (!value && value !== 0) {\n return null;\n }\n\n return value;\n}\n/**\n * Represents the current readableState pipe targets for this Logger instance.\n * @type {Array|Object}\n */\n\n\nObject.defineProperty(Logger.prototype, 'transports', {\n configurable: false,\n enumerable: true,\n get: function get() {\n var pipes = this._readableState.pipes;\n return !Array.isArray(pipes) ? [pipes].filter(Boolean) : pipes;\n }\n});\nmodule.exports = Logger;\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/logger.js?");
|
|
39506
|
+
eval("/**\n * logger.js: TODO: add file header description.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar _require = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\"),\n Stream = _require.Stream,\n Transform = _require.Transform;\n\nvar asyncForEach = __webpack_require__(/*! async/forEach */ \"./node_modules/async/forEach.js\");\n\nvar _require2 = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n LEVEL = _require2.LEVEL,\n SPLAT = _require2.SPLAT;\n\nvar isStream = __webpack_require__(/*! is-stream */ \"./node_modules/is-stream/index.js\");\n\nvar ExceptionHandler = __webpack_require__(/*! ./exception-handler */ \"./node_modules/winston/dist/winston/exception-handler.js\");\n\nvar RejectionHandler = __webpack_require__(/*! ./rejection-handler */ \"./node_modules/winston/dist/winston/rejection-handler.js\");\n\nvar LegacyTransportStream = __webpack_require__(/*! winston-transport/legacy */ \"./node_modules/winston-transport/legacy.js\");\n\nvar Profiler = __webpack_require__(/*! ./profiler */ \"./node_modules/winston/dist/winston/profiler.js\");\n\nvar _require3 = __webpack_require__(/*! ./common */ \"./node_modules/winston/dist/winston/common.js\"),\n warn = _require3.warn;\n\nvar config = __webpack_require__(/*! ./config */ \"./node_modules/winston/dist/winston/config/index.js\");\n/**\n * Captures the number of format (i.e. %s strings) in a given string.\n * Based on `util.format`, see Node.js source:\n * https://github.com/nodejs/node/blob/b1c8f15c5f169e021f7c46eb7b219de95fe97603/lib/util.js#L201-L230\n * @type {RegExp}\n */\n\n\nvar formatRegExp = /%[scdjifoO%]/g;\n/**\n * TODO: add class description.\n * @type {Logger}\n * @extends {Transform}\n */\n\nvar Logger = /*#__PURE__*/function (_Transform) {\n _inherits(Logger, _Transform);\n\n var _super = _createSuper(Logger);\n\n /**\n * Constructor function for the Logger object responsible for persisting log\n * messages and metadata to one or more transports.\n * @param {!Object} options - foo\n */\n function Logger(options) {\n var _this;\n\n _classCallCheck(this, Logger);\n\n _this = _super.call(this, {\n objectMode: true\n });\n\n _this.configure(options);\n\n return _this;\n }\n\n _createClass(Logger, [{\n key: \"child\",\n value: function child(defaultRequestMetadata) {\n var logger = this;\n return Object.create(logger, {\n write: {\n value: function value(info) {\n var infoClone = Object.assign({}, defaultRequestMetadata, info); // Object.assign doesn't copy inherited Error\n // properties so we have to do that explicitly\n //\n // Remark (indexzero): we should remove this\n // since the errors format will handle this case.\n //\n\n if (info instanceof Error) {\n infoClone.stack = info.stack;\n infoClone.message = info.message;\n }\n\n logger.write(infoClone);\n }\n }\n });\n }\n /**\n * This will wholesale reconfigure this instance by:\n * 1. Resetting all transports. Older transports will be removed implicitly.\n * 2. Set all other options including levels, colors, rewriters, filters,\n * exceptionHandlers, etc.\n * @param {!Object} options - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"configure\",\n value: function configure() {\n var _this2 = this;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n silent = _ref.silent,\n format = _ref.format,\n defaultMeta = _ref.defaultMeta,\n levels = _ref.levels,\n _ref$level = _ref.level,\n level = _ref$level === void 0 ? 'info' : _ref$level,\n _ref$exitOnError = _ref.exitOnError,\n exitOnError = _ref$exitOnError === void 0 ? true : _ref$exitOnError,\n transports = _ref.transports,\n colors = _ref.colors,\n emitErrs = _ref.emitErrs,\n formatters = _ref.formatters,\n padLevels = _ref.padLevels,\n rewriters = _ref.rewriters,\n stripColors = _ref.stripColors,\n exceptionHandlers = _ref.exceptionHandlers,\n rejectionHandlers = _ref.rejectionHandlers;\n\n // Reset transports if we already have them\n if (this.transports.length) {\n this.clear();\n }\n\n this.silent = silent;\n this.format = format || this.format || __webpack_require__(/*! logform/json */ \"./node_modules/logform/json.js\")();\n this.defaultMeta = defaultMeta || null; // Hoist other options onto this instance.\n\n this.levels = levels || this.levels || config.npm.levels;\n this.level = level;\n\n if (this.exceptions) {\n this.exceptions.unhandle();\n }\n\n if (this.rejections) {\n this.rejections.unhandle();\n }\n\n this.exceptions = new ExceptionHandler(this);\n this.rejections = new RejectionHandler(this);\n this.profilers = {};\n this.exitOnError = exitOnError; // Add all transports we have been provided.\n\n if (transports) {\n transports = Array.isArray(transports) ? transports : [transports];\n transports.forEach(function (transport) {\n return _this2.add(transport);\n });\n }\n\n if (colors || emitErrs || formatters || padLevels || rewriters || stripColors) {\n throw new Error(['{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.', 'Use a custom winston.format(function) instead.', 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md'].join('\\n'));\n }\n\n if (exceptionHandlers) {\n this.exceptions.handle(exceptionHandlers);\n }\n\n if (rejectionHandlers) {\n this.rejections.handle(rejectionHandlers);\n }\n }\n }, {\n key: \"isLevelEnabled\",\n value: function isLevelEnabled(level) {\n var _this3 = this;\n\n var givenLevelValue = getLevelValue(this.levels, level);\n\n if (givenLevelValue === null) {\n return false;\n }\n\n var configuredLevelValue = getLevelValue(this.levels, this.level);\n\n if (configuredLevelValue === null) {\n return false;\n }\n\n if (!this.transports || this.transports.length === 0) {\n return configuredLevelValue >= givenLevelValue;\n }\n\n var index = this.transports.findIndex(function (transport) {\n var transportLevelValue = getLevelValue(_this3.levels, transport.level);\n\n if (transportLevelValue === null) {\n transportLevelValue = configuredLevelValue;\n }\n\n return transportLevelValue >= givenLevelValue;\n });\n return index !== -1;\n }\n /* eslint-disable valid-jsdoc */\n\n /**\n * Ensure backwards compatibility with a `log` method\n * @param {mixed} level - Level the log message is written at.\n * @param {mixed} msg - TODO: add param description.\n * @param {mixed} meta - TODO: add param description.\n * @returns {Logger} - TODO: add return description.\n *\n * @example\n * // Supports the existing API:\n * logger.log('info', 'Hello world', { custom: true });\n * logger.log('info', new Error('Yo, it\\'s on fire'));\n *\n * // Requires winston.format.splat()\n * logger.log('info', '%s %d%%', 'A string', 50, { thisIsMeta: true });\n *\n * // And the new API with a single JSON literal:\n * logger.log({ level: 'info', message: 'Hello world', custom: true });\n * logger.log({ level: 'info', message: new Error('Yo, it\\'s on fire') });\n *\n * // Also requires winston.format.splat()\n * logger.log({\n * level: 'info',\n * message: '%s %d%%',\n * [SPLAT]: ['A string', 50],\n * meta: { thisIsMeta: true }\n * });\n *\n */\n\n /* eslint-enable valid-jsdoc */\n\n }, {\n key: \"log\",\n value: function log(level, msg) {\n var _Object$assign2;\n\n for (var _len = arguments.length, splat = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n splat[_key - 2] = arguments[_key];\n }\n\n // eslint-disable-line max-params\n // Optimize for the hotpath of logging JSON literals\n if (arguments.length === 1) {\n // Yo dawg, I heard you like levels ... seriously ...\n // In this context the LHS `level` here is actually the `info` so read\n // this as: info[LEVEL] = info.level;\n level[LEVEL] = level.level;\n\n this._addDefaultMeta(level);\n\n this.write(level);\n return this;\n } // Slightly less hotpath, but worth optimizing for.\n\n\n if (arguments.length === 2) {\n var _msg;\n\n if (msg && _typeof(msg) === 'object') {\n msg[LEVEL] = msg.level = level;\n\n this._addDefaultMeta(msg);\n\n this.write(msg);\n return this;\n }\n\n msg = (_msg = {}, _defineProperty(_msg, LEVEL, level), _defineProperty(_msg, \"level\", level), _defineProperty(_msg, \"message\", msg), _msg);\n\n this._addDefaultMeta(msg);\n\n this.write(msg);\n return this;\n }\n\n var meta = splat[0];\n\n if (_typeof(meta) === 'object' && meta !== null) {\n // Extract tokens, if none available default to empty array to\n // ensure consistancy in expected results\n var tokens = msg && msg.match && msg.match(formatRegExp);\n\n if (!tokens) {\n var _Object$assign;\n\n var info = Object.assign({}, this.defaultMeta, meta, (_Object$assign = {}, _defineProperty(_Object$assign, LEVEL, level), _defineProperty(_Object$assign, SPLAT, splat), _defineProperty(_Object$assign, \"level\", level), _defineProperty(_Object$assign, \"message\", msg), _Object$assign));\n if (meta.message) info.message = \"\".concat(info.message, \" \").concat(meta.message);\n if (meta.stack) info.stack = meta.stack;\n this.write(info);\n return this;\n }\n }\n\n this.write(Object.assign({}, this.defaultMeta, (_Object$assign2 = {}, _defineProperty(_Object$assign2, LEVEL, level), _defineProperty(_Object$assign2, SPLAT, splat), _defineProperty(_Object$assign2, \"level\", level), _defineProperty(_Object$assign2, \"message\", msg), _Object$assign2)));\n return this;\n }\n /**\n * Pushes data so that it can be picked up by all of our pipe targets.\n * @param {mixed} info - TODO: add param description.\n * @param {mixed} enc - TODO: add param description.\n * @param {mixed} callback - Continues stream processing.\n * @returns {undefined}\n * @private\n */\n\n }, {\n key: \"_transform\",\n value: function _transform(info, enc, callback) {\n if (this.silent) {\n return callback();\n } // [LEVEL] is only soft guaranteed to be set here since we are a proper\n // stream. It is likely that `info` came in through `.log(info)` or\n // `.info(info)`. If it is not defined, however, define it.\n // This LEVEL symbol is provided by `triple-beam` and also used in:\n // - logform\n // - winston-transport\n // - abstract-winston-transport\n\n\n if (!info[LEVEL]) {\n info[LEVEL] = info.level;\n } // Remark: really not sure what to do here, but this has been reported as\n // very confusing by pre winston@2.0.0 users as quite confusing when using\n // custom levels.\n\n\n if (!this.levels[info[LEVEL]] && this.levels[info[LEVEL]] !== 0) {\n // eslint-disable-next-line no-console\n console.error('[winston] Unknown logger level: %s', info[LEVEL]);\n } // Remark: not sure if we should simply error here.\n\n\n if (!this._readableState.pipes) {\n // eslint-disable-next-line no-console\n console.error('[winston] Attempt to write logs with no transports %j', info);\n } // Here we write to the `format` pipe-chain, which on `readable` above will\n // push the formatted `info` Object onto the buffer for this instance. We trap\n // (and re-throw) any errors generated by the user-provided format, but also\n // guarantee that the streams callback is invoked so that we can continue flowing.\n\n\n try {\n this.push(this.format.transform(info, this.format.options));\n } finally {\n this._writableState.sync = false; // eslint-disable-next-line callback-return\n\n callback();\n }\n }\n /**\n * Delays the 'finish' event until all transport pipe targets have\n * also emitted 'finish' or are already finished.\n * @param {mixed} callback - Continues stream processing.\n */\n\n }, {\n key: \"_final\",\n value: function _final(callback) {\n var transports = this.transports.slice();\n asyncForEach(transports, function (transport, next) {\n if (!transport || transport.finished) return setImmediate(next);\n transport.once('finish', next);\n transport.end();\n }, callback);\n }\n /**\n * Adds the transport to this logger instance by piping to it.\n * @param {mixed} transport - TODO: add param description.\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"add\",\n value: function add(transport) {\n // Support backwards compatibility with all existing `winston < 3.x.x`\n // transports which meet one of two criteria:\n // 1. They inherit from winston.Transport in < 3.x.x which is NOT a stream.\n // 2. They expose a log method which has a length greater than 2 (i.e. more then\n // just `log(info, callback)`.\n var target = !isStream(transport) || transport.log.length > 2 ? new LegacyTransportStream({\n transport: transport\n }) : transport;\n\n if (!target._writableState || !target._writableState.objectMode) {\n throw new Error('Transports must WritableStreams in objectMode. Set { objectMode: true }.');\n } // Listen for the `error` event and the `warn` event on the new Transport.\n\n\n this._onEvent('error', target);\n\n this._onEvent('warn', target);\n\n this.pipe(target);\n\n if (transport.handleExceptions) {\n this.exceptions.handle();\n }\n\n if (transport.handleRejections) {\n this.rejections.handle();\n }\n\n return this;\n }\n /**\n * Removes the transport from this logger instance by unpiping from it.\n * @param {mixed} transport - TODO: add param description.\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"remove\",\n value: function remove(transport) {\n if (!transport) return this;\n var target = transport;\n\n if (!isStream(transport) || transport.log.length > 2) {\n target = this.transports.filter(function (match) {\n return match.transport === transport;\n })[0];\n }\n\n if (target) {\n this.unpipe(target);\n }\n\n return this;\n }\n /**\n * Removes all transports from this logger instance.\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"clear\",\n value: function clear() {\n this.unpipe();\n return this;\n }\n /**\n * Cleans up resources (streams, event listeners) for all transports\n * associated with this instance (if necessary).\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"close\",\n value: function close() {\n this.exceptions.unhandle();\n this.rejections.unhandle();\n this.clear();\n this.emit('close');\n return this;\n }\n /**\n * Sets the `target` levels specified on this instance.\n * @param {Object} Target levels to use on this instance.\n */\n\n }, {\n key: \"setLevels\",\n value: function setLevels() {\n warn.deprecated('setLevels');\n }\n /**\n * Queries the all transports for this instance with the specified `options`.\n * This will aggregate each transport's results into one object containing\n * a property per transport.\n * @param {Object} options - Query options for this instance.\n * @param {function} callback - Continuation to respond to when complete.\n */\n\n }, {\n key: \"query\",\n value: function query(options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n options = options || {};\n var results = {};\n var queryObject = Object.assign({}, options.query || {}); // Helper function to query a single transport\n\n function queryTransport(transport, next) {\n if (options.query && typeof transport.formatQuery === 'function') {\n options.query = transport.formatQuery(queryObject);\n }\n\n transport.query(options, function (err, res) {\n if (err) {\n return next(err);\n }\n\n if (typeof transport.formatResults === 'function') {\n res = transport.formatResults(res, options.format);\n }\n\n next(null, res);\n });\n } // Helper function to accumulate the results from `queryTransport` into\n // the `results`.\n\n\n function addResults(transport, next) {\n queryTransport(transport, function (err, result) {\n // queryTransport could potentially invoke the callback multiple times\n // since Transport code can be unpredictable.\n if (next) {\n result = err || result;\n\n if (result) {\n results[transport.name] = result;\n } // eslint-disable-next-line callback-return\n\n\n next();\n }\n\n next = null;\n });\n } // Iterate over the transports in parallel setting the appropriate key in\n // the `results`.\n\n\n asyncForEach(this.transports.filter(function (transport) {\n return !!transport.query;\n }), addResults, function () {\n return callback(null, results);\n });\n }\n /**\n * Returns a log stream for all transports. Options object is optional.\n * @param{Object} options={} - Stream options for this instance.\n * @returns {Stream} - TODO: add return description.\n */\n\n }, {\n key: \"stream\",\n value: function stream() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var out = new Stream();\n var streams = [];\n out._streams = streams;\n\n out.destroy = function () {\n var i = streams.length;\n\n while (i--) {\n streams[i].destroy();\n }\n }; // Create a list of all transports for this instance.\n\n\n this.transports.filter(function (transport) {\n return !!transport.stream;\n }).forEach(function (transport) {\n var str = transport.stream(options);\n\n if (!str) {\n return;\n }\n\n streams.push(str);\n str.on('log', function (log) {\n log.transport = log.transport || [];\n log.transport.push(transport.name);\n out.emit('log', log);\n });\n str.on('error', function (err) {\n err.transport = err.transport || [];\n err.transport.push(transport.name);\n out.emit('error', err);\n });\n });\n return out;\n }\n /**\n * Returns an object corresponding to a specific timing. When done is called\n * the timer will finish and log the duration. e.g.:\n * @returns {Profile} - TODO: add return description.\n * @example\n * const timer = winston.startTimer()\n * setTimeout(() => {\n * timer.done({\n * message: 'Logging message'\n * });\n * }, 1000);\n */\n\n }, {\n key: \"startTimer\",\n value: function startTimer() {\n return new Profiler(this);\n }\n /**\n * Tracks the time inbetween subsequent calls to this method with the same\n * `id` parameter. The second call to this method will log the difference in\n * milliseconds along with the message.\n * @param {string} id Unique id of the profiler\n * @returns {Logger} - TODO: add return description.\n */\n\n }, {\n key: \"profile\",\n value: function profile(id) {\n var time = Date.now();\n\n if (this.profilers[id]) {\n var timeEnd = this.profilers[id];\n delete this.profilers[id]; // Attempt to be kind to users if they are still using older APIs.\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n if (typeof args[args.length - 2] === 'function') {\n // eslint-disable-next-line no-console\n console.warn('Callback function no longer supported as of winston@3.0.0');\n args.pop();\n } // Set the duration property of the metadata\n\n\n var info = _typeof(args[args.length - 1]) === 'object' ? args.pop() : {};\n info.level = info.level || 'info';\n info.durationMs = time - timeEnd;\n info.message = info.message || id;\n return this.write(info);\n }\n\n this.profilers[id] = time;\n return this;\n }\n /**\n * Backwards compatibility to `exceptions.handle` in winston < 3.0.0.\n * @returns {undefined}\n * @deprecated\n */\n\n }, {\n key: \"handleExceptions\",\n value: function handleExceptions() {\n var _this$exceptions;\n\n // eslint-disable-next-line no-console\n console.warn('Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()');\n\n (_this$exceptions = this.exceptions).handle.apply(_this$exceptions, arguments);\n }\n /**\n * Backwards compatibility to `exceptions.handle` in winston < 3.0.0.\n * @returns {undefined}\n * @deprecated\n */\n\n }, {\n key: \"unhandleExceptions\",\n value: function unhandleExceptions() {\n var _this$exceptions2;\n\n // eslint-disable-next-line no-console\n console.warn('Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()');\n\n (_this$exceptions2 = this.exceptions).unhandle.apply(_this$exceptions2, arguments);\n }\n /**\n * Throw a more meaningful deprecation notice\n * @throws {Error} - TODO: add throws description.\n */\n\n }, {\n key: \"cli\",\n value: function cli() {\n throw new Error(['Logger.cli() was removed in winston@3.0.0', 'Use a custom winston.formats.cli() instead.', 'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md'].join('\\n'));\n }\n /**\n * Bubbles the `event` that occured on the specified `transport` up\n * from this instance.\n * @param {string} event - The event that occured\n * @param {Object} transport - Transport on which the event occured\n * @private\n */\n\n }, {\n key: \"_onEvent\",\n value: function _onEvent(event, transport) {\n function transportEvent(err) {\n // https://github.com/winstonjs/winston/issues/1364\n if (event === 'error' && !this.transports.includes(transport)) {\n this.add(transport);\n }\n\n this.emit(event, err, transport);\n }\n\n if (!transport['__winston' + event]) {\n transport['__winston' + event] = transportEvent.bind(this);\n transport.on(event, transport['__winston' + event]);\n }\n }\n }, {\n key: \"_addDefaultMeta\",\n value: function _addDefaultMeta(msg) {\n if (this.defaultMeta) {\n Object.assign(msg, this.defaultMeta);\n }\n }\n }]);\n\n return Logger;\n}(Transform);\n\nfunction getLevelValue(levels, level) {\n var value = levels[level];\n\n if (!value && value !== 0) {\n return null;\n }\n\n return value;\n}\n/**\n * Represents the current readableState pipe targets for this Logger instance.\n * @type {Array|Object}\n */\n\n\nObject.defineProperty(Logger.prototype, 'transports', {\n configurable: false,\n enumerable: true,\n get: function get() {\n var pipes = this._readableState.pipes;\n return !Array.isArray(pipes) ? [pipes].filter(Boolean) : pipes;\n }\n});\nmodule.exports = Logger;\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/logger.js?");
|
|
39568
39507
|
|
|
39569
39508
|
/***/ }),
|
|
39570
39509
|
|
|
@@ -39575,7 +39514,7 @@ eval("/**\n * logger.js: TODO: add file header description.\n *\n * (C) 2010 Cha
|
|
|
39575
39514
|
/***/ ((module) => {
|
|
39576
39515
|
|
|
39577
39516
|
"use strict";
|
|
39578
|
-
eval("/**\n * profiler.js: TODO: add file header description.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n/**\n * TODO: add class description.\n * @type {Profiler}\n * @private\n */\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\";
|
|
39517
|
+
eval("/**\n * profiler.js: TODO: add file header description.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n/**\n * TODO: add class description.\n * @type {Profiler}\n * @private\n */\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nmodule.exports = /*#__PURE__*/function () {\n /**\n * Constructor function for the Profiler instance used by\n * `Logger.prototype.startTimer`. When done is called the timer will finish\n * and log the duration.\n * @param {!Logger} logger - TODO: add param description.\n * @private\n */\n function Profiler(logger) {\n _classCallCheck(this, Profiler);\n\n if (!logger) {\n throw new Error('Logger is required for profiling.');\n }\n\n this.logger = logger;\n this.start = Date.now();\n }\n /**\n * Ends the current timer (i.e. Profiler) instance and logs the `msg` along\n * with the duration since creation.\n * @returns {mixed} - TODO: add return description.\n * @private\n */\n\n\n _createClass(Profiler, [{\n key: \"done\",\n value: function done() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (typeof args[args.length - 1] === 'function') {\n // eslint-disable-next-line no-console\n console.warn('Callback function no longer supported as of winston@3.0.0');\n args.pop();\n }\n\n var info = _typeof(args[args.length - 1]) === 'object' ? args.pop() : {};\n info.level = info.level || 'info';\n info.durationMs = Date.now() - this.start;\n return this.logger.write(info);\n }\n }]);\n\n return Profiler;\n}();\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/profiler.js?");
|
|
39579
39518
|
|
|
39580
39519
|
/***/ }),
|
|
39581
39520
|
|
|
@@ -39586,7 +39525,7 @@ eval("/**\n * profiler.js: TODO: add file header description.\n *\n * (C) 2010 C
|
|
|
39586
39525
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39587
39526
|
|
|
39588
39527
|
"use strict";
|
|
39589
|
-
eval("/**\n * exception-handler.js: Object for handling uncaughtException events.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar os = __webpack_require__(/*! os */ \"os\");\n\nvar asyncForEach = __webpack_require__(/*! async/forEach */ \"./node_modules/async/forEach.js\");\n\nvar debug = __webpack_require__(/*! @dabh/diagnostics */ \"./node_modules/@dabh/diagnostics/browser/index.js\")('winston:rejection');\n\nvar once = __webpack_require__(/*! one-time */ \"./node_modules/one-time/index.js\");\n\nvar stackTrace = __webpack_require__(/*! stack-trace */ \"./node_modules/stack-trace/lib/stack-trace.js\");\n\nvar ExceptionStream = __webpack_require__(/*! ./exception-stream */ \"./node_modules/winston/dist/winston/exception-stream.js\");\n/**\n * Object for handling unhandledRejection events.\n * @type {RejectionHandler}\n */\n\n\nmodule.exports = /*#__PURE__*/function () {\n /**\n * TODO: add contructor description\n * @param {!Logger} logger - TODO: add param description\n */\n function RejectionHandler(logger) {\n _classCallCheck(this, RejectionHandler);\n\n if (!logger) {\n throw new Error('Logger is required to handle rejections');\n }\n\n this.logger = logger;\n this.handlers = new Map();\n }\n /**\n * Handles `unhandledRejection` events for the current process by adding any\n * handlers passed in.\n * @returns {undefined}\n */\n\n\n _createClass(RejectionHandler, [{\n key: \"handle\",\n value: function handle() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n args.forEach(function (arg) {\n if (Array.isArray(arg)) {\n return arg.forEach(function (handler) {\n return _this._addHandler(handler);\n });\n }\n\n _this._addHandler(arg);\n });\n\n if (!this.catcher) {\n this.catcher = this._unhandledRejection.bind(this);\n process.on('unhandledRejection', this.catcher);\n }\n }\n /**\n * Removes any handlers to `unhandledRejection` events for the current\n * process. This does not modify the state of the `this.handlers` set.\n * @returns {undefined}\n */\n\n }, {\n key: \"unhandle\",\n value: function unhandle() {\n var _this2 = this;\n\n if (this.catcher) {\n process.removeListener('unhandledRejection', this.catcher);\n this.catcher = false;\n Array.from(this.handlers.values()).forEach(function (wrapper) {\n return _this2.logger.unpipe(wrapper);\n });\n }\n }\n /**\n * TODO: add method description\n * @param {Error} err - Error to get information about.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getAllInfo\",\n value: function getAllInfo(err) {\n var message =
|
|
39528
|
+
eval("/**\n * exception-handler.js: Object for handling uncaughtException events.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar os = __webpack_require__(/*! os */ \"os\");\n\nvar asyncForEach = __webpack_require__(/*! async/forEach */ \"./node_modules/async/forEach.js\");\n\nvar debug = __webpack_require__(/*! @dabh/diagnostics */ \"./node_modules/@dabh/diagnostics/browser/index.js\")('winston:rejection');\n\nvar once = __webpack_require__(/*! one-time */ \"./node_modules/one-time/index.js\");\n\nvar stackTrace = __webpack_require__(/*! stack-trace */ \"./node_modules/stack-trace/lib/stack-trace.js\");\n\nvar ExceptionStream = __webpack_require__(/*! ./exception-stream */ \"./node_modules/winston/dist/winston/exception-stream.js\");\n/**\n * Object for handling unhandledRejection events.\n * @type {RejectionHandler}\n */\n\n\nmodule.exports = /*#__PURE__*/function () {\n /**\n * TODO: add contructor description\n * @param {!Logger} logger - TODO: add param description\n */\n function RejectionHandler(logger) {\n _classCallCheck(this, RejectionHandler);\n\n if (!logger) {\n throw new Error('Logger is required to handle rejections');\n }\n\n this.logger = logger;\n this.handlers = new Map();\n }\n /**\n * Handles `unhandledRejection` events for the current process by adding any\n * handlers passed in.\n * @returns {undefined}\n */\n\n\n _createClass(RejectionHandler, [{\n key: \"handle\",\n value: function handle() {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n args.forEach(function (arg) {\n if (Array.isArray(arg)) {\n return arg.forEach(function (handler) {\n return _this._addHandler(handler);\n });\n }\n\n _this._addHandler(arg);\n });\n\n if (!this.catcher) {\n this.catcher = this._unhandledRejection.bind(this);\n process.on('unhandledRejection', this.catcher);\n }\n }\n /**\n * Removes any handlers to `unhandledRejection` events for the current\n * process. This does not modify the state of the `this.handlers` set.\n * @returns {undefined}\n */\n\n }, {\n key: \"unhandle\",\n value: function unhandle() {\n var _this2 = this;\n\n if (this.catcher) {\n process.removeListener('unhandledRejection', this.catcher);\n this.catcher = false;\n Array.from(this.handlers.values()).forEach(function (wrapper) {\n return _this2.logger.unpipe(wrapper);\n });\n }\n }\n /**\n * TODO: add method description\n * @param {Error} err - Error to get information about.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getAllInfo\",\n value: function getAllInfo(err) {\n var message = null;\n\n if (err) {\n message = typeof err === 'string' ? err : err.message;\n }\n\n return {\n error: err,\n // TODO (indexzero): how do we configure this?\n level: 'error',\n message: [\"unhandledRejection: \".concat(message || '(no error message)'), err && err.stack || ' No stack trace'].join('\\n'),\n stack: err && err.stack,\n exception: true,\n date: new Date().toString(),\n process: this.getProcessInfo(),\n os: this.getOsInfo(),\n trace: this.getTrace(err)\n };\n }\n /**\n * Gets all relevant process information for the currently running process.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getProcessInfo\",\n value: function getProcessInfo() {\n return {\n pid: process.pid,\n uid: process.getuid ? process.getuid() : null,\n gid: process.getgid ? process.getgid() : null,\n cwd: process.cwd(),\n execPath: process.execPath,\n version: process.version,\n argv: process.argv,\n memoryUsage: process.memoryUsage()\n };\n }\n /**\n * Gets all relevant OS information for the currently running process.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getOsInfo\",\n value: function getOsInfo() {\n return {\n loadavg: os.loadavg(),\n uptime: os.uptime()\n };\n }\n /**\n * Gets a stack trace for the specified error.\n * @param {mixed} err - TODO: add param description.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"getTrace\",\n value: function getTrace(err) {\n var trace = err ? stackTrace.parse(err) : stackTrace.get();\n return trace.map(function (site) {\n return {\n column: site.getColumnNumber(),\n file: site.getFileName(),\n \"function\": site.getFunctionName(),\n line: site.getLineNumber(),\n method: site.getMethodName(),\n \"native\": site.isNative()\n };\n });\n }\n /**\n * Helper method to add a transport as an exception handler.\n * @param {Transport} handler - The transport to add as an exception handler.\n * @returns {void}\n */\n\n }, {\n key: \"_addHandler\",\n value: function _addHandler(handler) {\n if (!this.handlers.has(handler)) {\n handler.handleRejections = true;\n var wrapper = new ExceptionStream(handler);\n this.handlers.set(handler, wrapper);\n this.logger.pipe(wrapper);\n }\n }\n /**\n * Logs all relevant information around the `err` and exits the current\n * process.\n * @param {Error} err - Error to handle\n * @returns {mixed} - TODO: add return description.\n * @private\n */\n\n }, {\n key: \"_unhandledRejection\",\n value: function _unhandledRejection(err) {\n var info = this.getAllInfo(err);\n\n var handlers = this._getRejectionHandlers(); // Calculate if we should exit on this error\n\n\n var doExit = typeof this.logger.exitOnError === 'function' ? this.logger.exitOnError(err) : this.logger.exitOnError;\n var timeout;\n\n if (!handlers.length && doExit) {\n // eslint-disable-next-line no-console\n console.warn('winston: exitOnError cannot be true with no rejection handlers.'); // eslint-disable-next-line no-console\n\n console.warn('winston: not exiting process.');\n doExit = false;\n }\n\n function gracefulExit() {\n debug('doExit', doExit);\n debug('process._exiting', process._exiting);\n\n if (doExit && !process._exiting) {\n // Remark: Currently ignoring any rejections from transports when\n // catching unhandled rejections.\n if (timeout) {\n clearTimeout(timeout);\n } // eslint-disable-next-line no-process-exit\n\n\n process.exit(1);\n }\n }\n\n if (!handlers || handlers.length === 0) {\n return process.nextTick(gracefulExit);\n } // Log to all transports attempting to listen for when they are completed.\n\n\n asyncForEach(handlers, function (handler, next) {\n var done = once(next);\n var transport = handler.transport || handler; // Debug wrapping so that we can inspect what's going on under the covers.\n\n function onDone(event) {\n return function () {\n debug(event);\n done();\n };\n }\n\n transport._ending = true;\n transport.once('finish', onDone('finished'));\n transport.once('error', onDone('error'));\n }, function () {\n return doExit && gracefulExit();\n });\n this.logger.log(info); // If exitOnError is true, then only allow the logging of exceptions to\n // take up to `3000ms`.\n\n if (doExit) {\n timeout = setTimeout(gracefulExit, 3000);\n }\n }\n /**\n * Returns the list of transports and exceptionHandlers for this instance.\n * @returns {Array} - List of transports and exceptionHandlers for this\n * instance.\n * @private\n */\n\n }, {\n key: \"_getRejectionHandlers\",\n value: function _getRejectionHandlers() {\n // Remark (indexzero): since `logger.transports` returns all of the pipes\n // from the _readableState of the stream we actually get the join of the\n // explicit handlers and the implicit transports with\n // `handleRejections: true`\n return this.logger.transports.filter(function (wrap) {\n var transport = wrap.transport || wrap;\n return transport.handleRejections;\n });\n }\n }]);\n\n return RejectionHandler;\n}();\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/rejection-handler.js?");
|
|
39590
39529
|
|
|
39591
39530
|
/***/ }),
|
|
39592
39531
|
|
|
@@ -39608,7 +39547,7 @@ eval("/**\n * tail-file.js: TODO: add file header description.\n *\n * (C) 2010
|
|
|
39608
39547
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39609
39548
|
|
|
39610
39549
|
"use strict";
|
|
39611
|
-
eval("/* eslint-disable no-console */\n\n/*\n * console.js: Transport for outputting to the console.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\";
|
|
39550
|
+
eval("/* eslint-disable no-console */\n\n/*\n * console.js: Transport for outputting to the console.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar os = __webpack_require__(/*! os */ \"os\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n LEVEL = _require.LEVEL,\n MESSAGE = _require.MESSAGE;\n\nvar TransportStream = __webpack_require__(/*! winston-transport */ \"./node_modules/winston-transport/dist/index.js\");\n/**\n * Transport for outputting to the console.\n * @type {Console}\n * @extends {TransportStream}\n */\n\n\nmodule.exports = /*#__PURE__*/function (_TransportStream) {\n _inherits(Console, _TransportStream);\n\n var _super = _createSuper(Console);\n\n /**\n * Constructor function for the Console transport object responsible for\n * persisting log messages and metadata to a terminal or TTY.\n * @param {!Object} [options={}] - Options for this instance.\n */\n function Console() {\n var _this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Console);\n\n _this = _super.call(this, options); // Expose the name of this Transport on the prototype\n\n _this.name = options.name || 'console';\n _this.stderrLevels = _this._stringArrayToSet(options.stderrLevels);\n _this.consoleWarnLevels = _this._stringArrayToSet(options.consoleWarnLevels);\n _this.eol = typeof options.eol === 'string' ? options.eol : os.EOL;\n\n _this.setMaxListeners(30);\n\n return _this;\n }\n /**\n * Core logging method exposed to Winston.\n * @param {Object} info - TODO: add param description.\n * @param {Function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n\n _createClass(Console, [{\n key: \"log\",\n value: function log(info, callback) {\n var _this2 = this;\n\n setImmediate(function () {\n return _this2.emit('logged', info);\n }); // Remark: what if there is no raw...?\n\n if (this.stderrLevels[info[LEVEL]]) {\n if (console._stderr) {\n // Node.js maps `process.stderr` to `console._stderr`.\n console._stderr.write(\"\".concat(info[MESSAGE]).concat(this.eol));\n } else {\n // console.error adds a newline\n console.error(info[MESSAGE]);\n }\n\n if (callback) {\n callback(); // eslint-disable-line callback-return\n }\n\n return;\n } else if (this.consoleWarnLevels[info[LEVEL]]) {\n if (console._stderr) {\n // Node.js maps `process.stderr` to `console._stderr`.\n // in Node.js console.warn is an alias for console.error\n console._stderr.write(\"\".concat(info[MESSAGE]).concat(this.eol));\n } else {\n // console.warn adds a newline\n console.warn(info[MESSAGE]);\n }\n\n if (callback) {\n callback(); // eslint-disable-line callback-return\n }\n\n return;\n }\n\n if (console._stdout) {\n // Node.js maps `process.stdout` to `console._stdout`.\n console._stdout.write(\"\".concat(info[MESSAGE]).concat(this.eol));\n } else {\n // console.log adds a newline.\n console.log(info[MESSAGE]);\n }\n\n if (callback) {\n callback(); // eslint-disable-line callback-return\n }\n }\n /**\n * Returns a Set-like object with strArray's elements as keys (each with the\n * value true).\n * @param {Array} strArray - Array of Set-elements as strings.\n * @param {?string} [errMsg] - Custom error message thrown on invalid input.\n * @returns {Object} - TODO: add return description.\n * @private\n */\n\n }, {\n key: \"_stringArrayToSet\",\n value: function _stringArrayToSet(strArray, errMsg) {\n if (!strArray) return {};\n errMsg = errMsg || 'Cannot make set from type other than Array of string elements';\n\n if (!Array.isArray(strArray)) {\n throw new Error(errMsg);\n }\n\n return strArray.reduce(function (set, el) {\n if (typeof el !== 'string') {\n throw new Error(errMsg);\n }\n\n set[el] = true;\n return set;\n }, {});\n }\n }]);\n\n return Console;\n}(TransportStream);\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/transports/console.js?");
|
|
39612
39551
|
|
|
39613
39552
|
/***/ }),
|
|
39614
39553
|
|
|
@@ -39619,7 +39558,7 @@ eval("/* eslint-disable no-console */\n\n/*\n * console.js: Transport for output
|
|
|
39619
39558
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39620
39559
|
|
|
39621
39560
|
"use strict";
|
|
39622
|
-
eval("/* eslint-disable complexity,max-statements */\n\n/**\n * file.js: Transport for outputting to a local log file.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar fs = __webpack_require__(/*! fs */ \"fs\");\n\nvar path = __webpack_require__(/*! path */ \"path\");\n\nvar asyncSeries = __webpack_require__(/*! async/series */ \"./node_modules/async/series.js\");\n\nvar zlib = __webpack_require__(/*! zlib */ \"zlib\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar _require2 = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\"),\n Stream = _require2.Stream,\n PassThrough = _require2.PassThrough;\n\nvar TransportStream = __webpack_require__(/*! winston-transport */ \"./node_modules/winston-transport/dist/index.js\");\n\nvar debug = __webpack_require__(/*! @dabh/diagnostics */ \"./node_modules/@dabh/diagnostics/browser/index.js\")('winston:file');\n\nvar os = __webpack_require__(/*! os */ \"os\");\n\nvar tailFile = __webpack_require__(/*! ../tail-file */ \"./node_modules/winston/dist/winston/tail-file.js\");\n/**\n * Transport for outputting to a local log file.\n * @type {File}\n * @extends {TransportStream}\n */\n\n\nmodule.exports = /*#__PURE__*/function (_TransportStream) {\n _inherits(File, _TransportStream);\n\n var _super = _createSuper(File);\n\n /**\n * Constructor function for the File transport object responsible for\n * persisting log messages and metadata to one or more files.\n * @param {Object} options - Options for this instance.\n */\n function File() {\n var _this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, File);\n\n _this = _super.call(this, options); // Expose the name of this Transport on the prototype.\n\n _this.name = options.name || 'file'; // Helper function which throws an `Error` in the event that any of the\n // rest of the arguments is present in `options`.\n\n function throwIf(target) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n args.slice(1).forEach(function (name) {\n if (options[name]) {\n throw new Error(\"Cannot set \".concat(name, \" and \").concat(target, \" together\"));\n }\n });\n } // Setup the base stream that always gets piped to to handle buffering.\n\n\n _this._stream = new PassThrough();\n\n _this._stream.setMaxListeners(30); // Bind this context for listener methods.\n\n\n _this._onError = _this._onError.bind(_assertThisInitialized(_this));\n\n if (options.filename || options.dirname) {\n throwIf('filename or dirname', 'stream');\n _this._basename = _this.filename = options.filename ? path.basename(options.filename) : 'winston.log';\n _this.dirname = options.dirname || path.dirname(options.filename);\n _this.options = options.options || {\n flags: 'a'\n };\n } else if (options.stream) {\n // eslint-disable-next-line no-console\n console.warn('options.stream will be removed in winston@4. Use winston.transports.Stream');\n throwIf('stream', 'filename', 'maxsize');\n _this._dest = _this._stream.pipe(_this._setupStream(options.stream));\n _this.dirname = path.dirname(_this._dest.path); // We need to listen for drain events when write() returns false. This\n // can make node mad at times.\n } else {\n throw new Error('Cannot log to file without filename or stream.');\n }\n\n _this.maxsize = options.maxsize || null;\n _this.rotationFormat = options.rotationFormat || false;\n _this.zippedArchive = options.zippedArchive || false;\n _this.maxFiles = options.maxFiles || null;\n _this.eol = options.eol || os.EOL;\n _this.tailable = options.tailable || false; // Internal state variables representing the number of files this instance\n // has created and the current size (in bytes) of the current logfile.\n\n _this._size = 0;\n _this._pendingSize = 0;\n _this._created = 0;\n _this._drain = false;\n _this._opening = false;\n _this._ending = false;\n if (_this.dirname) _this._createLogDirIfNotExist(_this.dirname);\n\n _this.open();\n\n return _this;\n }\n\n _createClass(File, [{\n key: \"finishIfEnding\",\n value: function finishIfEnding() {\n var _this2 = this;\n\n if (this._ending) {\n if (this._opening) {\n this.once('open', function () {\n _this2._stream.once('finish', function () {\n return _this2.emit('finish');\n });\n\n setImmediate(function () {\n return _this2._stream.end();\n });\n });\n } else {\n this._stream.once('finish', function () {\n return _this2.emit('finish');\n });\n\n setImmediate(function () {\n return _this2._stream.end();\n });\n }\n }\n }\n /**\n * Core logging method exposed to Winston. Metadata is optional.\n * @param {Object} info - TODO: add param description.\n * @param {Function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"log\",\n value: function log(info) {\n var _this3 = this;\n\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\n // Remark: (jcrugzz) What is necessary about this callback(null, true) now\n // when thinking about 3.x? Should silent be handled in the base\n // TransportStream _write method?\n if (this.silent) {\n callback();\n return true;\n } // Output stream buffer is full and has asked us to wait for the drain event\n\n\n if (this._drain) {\n this._stream.once('drain', function () {\n _this3._drain = false;\n\n _this3.log(info, callback);\n });\n\n return;\n }\n\n if (this._rotate) {\n this._stream.once('rotate', function () {\n _this3._rotate = false;\n\n _this3.log(info, callback);\n });\n\n return;\n } // Grab the raw string and append the expected EOL.\n\n\n var output = \"\".concat(info[MESSAGE]).concat(this.eol);\n var bytes = Buffer.byteLength(output); // After we have written to the PassThrough check to see if we need\n // to rotate to the next file.\n //\n // Remark: This gets called too early and does not depict when data\n // has been actually flushed to disk.\n\n function logged() {\n var _this4 = this;\n\n this._size += bytes;\n this._pendingSize -= bytes;\n debug('logged %s %s', this._size, output);\n this.emit('logged', info); // Do not attempt to rotate files while opening\n\n if (this._opening) {\n return;\n } // Check to see if we need to end the stream and create a new one.\n\n\n if (!this._needsNewFile()) {\n return;\n } // End the current stream, ensure it flushes and create a new one.\n // This could potentially be optimized to not run a stat call but its\n // the safest way since we are supporting `maxFiles`.\n\n\n this._rotate = true;\n\n this._endStream(function () {\n return _this4._rotateFile();\n });\n } // Keep track of the pending bytes being written while files are opening\n // in order to properly rotate the PassThrough this._stream when the file\n // eventually does open.\n\n\n this._pendingSize += bytes;\n\n if (this._opening && !this.rotatedWhileOpening && this._needsNewFile(this._size + this._pendingSize)) {\n this.rotatedWhileOpening = true;\n }\n\n var written = this._stream.write(output, logged.bind(this));\n\n if (!written) {\n this._drain = true;\n\n this._stream.once('drain', function () {\n _this3._drain = false;\n callback();\n });\n } else {\n callback(); // eslint-disable-line callback-return\n }\n\n debug('written', written, this._drain);\n this.finishIfEnding();\n return written;\n }\n /**\n * Query the transport. Options object is optional.\n * @param {Object} options - Loggly-like query options for this instance.\n * @param {function} callback - Continuation to respond to when complete.\n * TODO: Refactor me.\n */\n\n }, {\n key: \"query\",\n value: function query(options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n options = normalizeQuery(options);\n var file = path.join(this.dirname, this.filename);\n var buff = '';\n var results = [];\n var row = 0;\n var stream = fs.createReadStream(file, {\n encoding: 'utf8'\n });\n stream.on('error', function (err) {\n if (stream.readable) {\n stream.destroy();\n }\n\n if (!callback) {\n return;\n }\n\n return err.code !== 'ENOENT' ? callback(err) : callback(null, results);\n });\n stream.on('data', function (data) {\n data = (buff + data).split(/\\n+/);\n var l = data.length - 1;\n var i = 0;\n\n for (; i < l; i++) {\n if (!options.start || row >= options.start) {\n add(data[i]);\n }\n\n row++;\n }\n\n buff = data[l];\n });\n stream.on('close', function () {\n if (buff) {\n add(buff, true);\n }\n\n if (options.order === 'desc') {\n results = results.reverse();\n } // eslint-disable-next-line callback-return\n\n\n if (callback) callback(null, results);\n });\n\n function add(buff, attempt) {\n try {\n var log = JSON.parse(buff);\n\n if (check(log)) {\n push(log);\n }\n } catch (e) {\n if (!attempt) {\n stream.emit('error', e);\n }\n }\n }\n\n function push(log) {\n if (options.rows && results.length >= options.rows && options.order !== 'desc') {\n if (stream.readable) {\n stream.destroy();\n }\n\n return;\n }\n\n if (options.fields) {\n log = options.fields.reduce(function (obj, key) {\n obj[key] = log[key];\n return obj;\n }, {});\n }\n\n if (options.order === 'desc') {\n if (results.length >= options.rows) {\n results.shift();\n }\n }\n\n results.push(log);\n }\n\n function check(log) {\n if (!log) {\n return;\n }\n\n if (_typeof(log) !== 'object') {\n return;\n }\n\n var time = new Date(log.timestamp);\n\n if (options.from && time < options.from || options.until && time > options.until || options.level && options.level !== log.level) {\n return;\n }\n\n return true;\n }\n\n function normalizeQuery(options) {\n options = options || {}; // limit\n\n options.rows = options.rows || options.limit || 10; // starting row offset\n\n options.start = options.start || 0; // now\n\n options.until = options.until || new Date();\n\n if (_typeof(options.until) !== 'object') {\n options.until = new Date(options.until);\n } // now - 24\n\n\n options.from = options.from || options.until - 24 * 60 * 60 * 1000;\n\n if (_typeof(options.from) !== 'object') {\n options.from = new Date(options.from);\n } // 'asc' or 'desc'\n\n\n options.order = options.order || 'desc';\n return options;\n }\n }\n /**\n * Returns a log stream for this transport. Options object is optional.\n * @param {Object} options - Stream options for this instance.\n * @returns {Stream} - TODO: add return description.\n * TODO: Refactor me.\n */\n\n }, {\n key: \"stream\",\n value: function stream() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var file = path.join(this.dirname, this.filename);\n var stream = new Stream();\n var tail = {\n file: file,\n start: options.start\n };\n stream.destroy = tailFile(tail, function (err, line) {\n if (err) {\n return stream.emit('error', err);\n }\n\n try {\n stream.emit('data', line);\n line = JSON.parse(line);\n stream.emit('log', line);\n } catch (e) {\n stream.emit('error', e);\n }\n });\n return stream;\n }\n /**\n * Checks to see the filesize of.\n * @returns {undefined}\n */\n\n }, {\n key: \"open\",\n value: function open() {\n var _this5 = this;\n\n // If we do not have a filename then we were passed a stream and\n // don't need to keep track of size.\n if (!this.filename) return;\n if (this._opening) return;\n this._opening = true; // Stat the target file to get the size and create the stream.\n\n this.stat(function (err, size) {\n if (err) {\n return _this5.emit('error', err);\n }\n\n debug('stat done: %s { size: %s }', _this5.filename, size);\n _this5._size = size;\n _this5._dest = _this5._createStream(_this5._stream);\n _this5._opening = false;\n\n _this5.once('open', function () {\n if (_this5._stream.eventNames().includes('rotate')) {\n _this5._stream.emit('rotate');\n } else {\n _this5._rotate = false;\n }\n });\n });\n }\n /**\n * Stat the file and assess information in order to create the proper stream.\n * @param {function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"stat\",\n value: function stat(callback) {\n var _this6 = this;\n\n var target = this._getFile();\n\n var fullpath = path.join(this.dirname, target);\n fs.stat(fullpath, function (err, stat) {\n if (err && err.code === 'ENOENT') {\n debug('ENOENT ok', fullpath); // Update internally tracked filename with the new target name.\n\n _this6.filename = target;\n return callback(null, 0);\n }\n\n if (err) {\n debug(\"err \".concat(err.code, \" \").concat(fullpath));\n return callback(err);\n }\n\n if (!stat || _this6._needsNewFile(stat.size)) {\n // If `stats.size` is greater than the `maxsize` for this\n // instance then try again.\n return _this6._incFile(function () {\n return _this6.stat(callback);\n });\n } // Once we have figured out what the filename is, set it\n // and return the size.\n\n\n _this6.filename = target;\n callback(null, stat.size);\n });\n }\n /**\n * Closes the stream associated with this instance.\n * @param {function} cb - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"close\",\n value: function close(cb) {\n var _this7 = this;\n\n if (!this._stream) {\n return;\n }\n\n this._stream.end(function () {\n if (cb) {\n cb(); // eslint-disable-line callback-return\n }\n\n _this7.emit('flush');\n\n _this7.emit('closed');\n });\n }\n /**\n * TODO: add method description.\n * @param {number} size - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"_needsNewFile\",\n value: function _needsNewFile(size) {\n size = size || this._size;\n return this.maxsize && size >= this.maxsize;\n }\n /**\n * TODO: add method description.\n * @param {Error} err - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"_onError\",\n value: function _onError(err) {\n this.emit('error', err);\n }\n /**\n * TODO: add method description.\n * @param {Stream} stream - TODO: add param description.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"_setupStream\",\n value: function _setupStream(stream) {\n stream.on('error', this._onError);\n return stream;\n }\n /**\n * TODO: add method description.\n * @param {Stream} stream - TODO: add param description.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"_cleanupStream\",\n value: function _cleanupStream(stream) {\n stream.removeListener('error', this._onError);\n return stream;\n }\n /**\n * TODO: add method description.\n */\n\n }, {\n key: \"_rotateFile\",\n value: function _rotateFile() {\n var _this8 = this;\n\n this._incFile(function () {\n return _this8.open();\n });\n }\n /**\n * Unpipe from the stream that has been marked as full and end it so it\n * flushes to disk.\n *\n * @param {function} callback - Callback for when the current file has closed.\n * @private\n */\n\n }, {\n key: \"_endStream\",\n value: function _endStream() {\n var _this9 = this;\n\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\n\n if (this._dest) {\n this._stream.unpipe(this._dest);\n\n this._dest.end(function () {\n _this9._cleanupStream(_this9._dest);\n\n callback();\n });\n } else {\n callback(); // eslint-disable-line callback-return\n }\n }\n /**\n * Returns the WritableStream for the active file on this instance. If we\n * should gzip the file then a zlib stream is returned.\n *\n * @param {ReadableStream} source – PassThrough to pipe to the file when open.\n * @returns {WritableStream} Stream that writes to disk for the active file.\n */\n\n }, {\n key: \"_createStream\",\n value: function _createStream(source) {\n var _this10 = this;\n\n var fullpath = path.join(this.dirname, this.filename);\n debug('create stream start', fullpath, this.options);\n var dest = fs.createWriteStream(fullpath, this.options) // TODO: What should we do with errors here?\n .on('error', function (err) {\n return debug(err);\n }).on('close', function () {\n return debug('close', dest.path, dest.bytesWritten);\n }).on('open', function () {\n debug('file open ok', fullpath);\n\n _this10.emit('open', fullpath);\n\n source.pipe(dest); // If rotation occured during the open operation then we immediately\n // start writing to a new PassThrough, begin opening the next file\n // and cleanup the previous source and dest once the source has drained.\n\n if (_this10.rotatedWhileOpening) {\n _this10._stream = new PassThrough();\n\n _this10._stream.setMaxListeners(30);\n\n _this10._rotateFile();\n\n _this10.rotatedWhileOpening = false;\n\n _this10._cleanupStream(dest);\n\n source.end();\n }\n });\n debug('create stream ok', fullpath);\n\n if (this.zippedArchive) {\n var gzip = zlib.createGzip();\n gzip.pipe(dest);\n return gzip;\n }\n\n return dest;\n }\n /**\n * TODO: add method description.\n * @param {function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"_incFile\",\n value: function _incFile(callback) {\n debug('_incFile', this.filename);\n var ext = path.extname(this._basename);\n var basename = path.basename(this._basename, ext);\n\n if (!this.tailable) {\n this._created += 1;\n\n this._checkMaxFilesIncrementing(ext, basename, callback);\n } else {\n this._checkMaxFilesTailable(ext, basename, callback);\n }\n }\n /**\n * Gets the next filename to use for this instance in the case that log\n * filesizes are being capped.\n * @returns {string} - TODO: add return description.\n * @private\n */\n\n }, {\n key: \"_getFile\",\n value: function _getFile() {\n var ext = path.extname(this._basename);\n var basename = path.basename(this._basename, ext);\n var isRotation = this.rotationFormat ? this.rotationFormat() : this._created; // Caveat emptor (indexzero): rotationFormat() was broken by design When\n // combined with max files because the set of files to unlink is never\n // stored.\n\n var target = !this.tailable && this._created ? \"\".concat(basename).concat(isRotation).concat(ext) : \"\".concat(basename).concat(ext);\n return this.zippedArchive && !this.tailable ? \"\".concat(target, \".gz\") : target;\n }\n /**\n * Increment the number of files created or checked by this instance.\n * @param {mixed} ext - TODO: add param description.\n * @param {mixed} basename - TODO: add param description.\n * @param {mixed} callback - TODO: add param description.\n * @returns {undefined}\n * @private\n */\n\n }, {\n key: \"_checkMaxFilesIncrementing\",\n value: function _checkMaxFilesIncrementing(ext, basename, callback) {\n // Check for maxFiles option and delete file.\n if (!this.maxFiles || this._created < this.maxFiles) {\n return setImmediate(callback);\n }\n\n var oldest = this._created - this.maxFiles;\n var isOldest = oldest !== 0 ? oldest : '';\n var isZipped = this.zippedArchive ? '.gz' : '';\n var filePath = \"\".concat(basename).concat(isOldest).concat(ext).concat(isZipped);\n var target = path.join(this.dirname, filePath);\n fs.unlink(target, callback);\n }\n /**\n * Roll files forward based on integer, up to maxFiles. e.g. if base if\n * file.log and it becomes oversized, roll to file1.log, and allow file.log\n * to be re-used. If file is oversized again, roll file1.log to file2.log,\n * roll file.log to file1.log, and so on.\n * @param {mixed} ext - TODO: add param description.\n * @param {mixed} basename - TODO: add param description.\n * @param {mixed} callback - TODO: add param description.\n * @returns {undefined}\n * @private\n */\n\n }, {\n key: \"_checkMaxFilesTailable\",\n value: function _checkMaxFilesTailable(ext, basename, callback) {\n var _this12 = this;\n\n var tasks = [];\n\n if (!this.maxFiles) {\n return;\n } // const isZipped = this.zippedArchive ? '.gz' : '';\n\n\n var isZipped = this.zippedArchive ? '.gz' : '';\n\n for (var x = this.maxFiles - 1; x > 1; x--) {\n tasks.push(function (i, cb) {\n var _this11 = this;\n\n var fileName = \"\".concat(basename).concat(i - 1).concat(ext).concat(isZipped);\n var tmppath = path.join(this.dirname, fileName);\n fs.exists(tmppath, function (exists) {\n if (!exists) {\n return cb(null);\n }\n\n fileName = \"\".concat(basename).concat(i).concat(ext).concat(isZipped);\n fs.rename(tmppath, path.join(_this11.dirname, fileName), cb);\n });\n }.bind(this, x));\n }\n\n asyncSeries(tasks, function () {\n fs.rename(path.join(_this12.dirname, \"\".concat(basename).concat(ext)), path.join(_this12.dirname, \"\".concat(basename, \"1\").concat(ext).concat(isZipped)), callback);\n });\n }\n }, {\n key: \"_createLogDirIfNotExist\",\n value: function _createLogDirIfNotExist(dirPath) {\n /* eslint-disable no-sync */\n if (!fs.existsSync(dirPath)) {\n fs.mkdirSync(dirPath, {\n recursive: true\n });\n }\n /* eslint-enable no-sync */\n\n }\n }]);\n\n return File;\n}(TransportStream);\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/transports/file.js?");
|
|
39561
|
+
eval("/* eslint-disable complexity,max-statements */\n\n/**\n * file.js: Transport for outputting to a local log file.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar fs = __webpack_require__(/*! fs */ \"fs\");\n\nvar path = __webpack_require__(/*! path */ \"path\");\n\nvar asyncSeries = __webpack_require__(/*! async/series */ \"./node_modules/async/series.js\");\n\nvar zlib = __webpack_require__(/*! zlib */ \"zlib\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar _require2 = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\"),\n Stream = _require2.Stream,\n PassThrough = _require2.PassThrough;\n\nvar TransportStream = __webpack_require__(/*! winston-transport */ \"./node_modules/winston-transport/dist/index.js\");\n\nvar debug = __webpack_require__(/*! @dabh/diagnostics */ \"./node_modules/@dabh/diagnostics/browser/index.js\")('winston:file');\n\nvar os = __webpack_require__(/*! os */ \"os\");\n\nvar tailFile = __webpack_require__(/*! ../tail-file */ \"./node_modules/winston/dist/winston/tail-file.js\");\n/**\n * Transport for outputting to a local log file.\n * @type {File}\n * @extends {TransportStream}\n */\n\n\nmodule.exports = /*#__PURE__*/function (_TransportStream) {\n _inherits(File, _TransportStream);\n\n var _super = _createSuper(File);\n\n /**\n * Constructor function for the File transport object responsible for\n * persisting log messages and metadata to one or more files.\n * @param {Object} options - Options for this instance.\n */\n function File() {\n var _this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, File);\n\n _this = _super.call(this, options); // Expose the name of this Transport on the prototype.\n\n _this.name = options.name || 'file'; // Helper function which throws an `Error` in the event that any of the\n // rest of the arguments is present in `options`.\n\n function throwIf(target) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n args.slice(1).forEach(function (name) {\n if (options[name]) {\n throw new Error(\"Cannot set \".concat(name, \" and \").concat(target, \" together\"));\n }\n });\n } // Setup the base stream that always gets piped to to handle buffering.\n\n\n _this._stream = new PassThrough();\n\n _this._stream.setMaxListeners(30); // Bind this context for listener methods.\n\n\n _this._onError = _this._onError.bind(_assertThisInitialized(_this));\n\n if (options.filename || options.dirname) {\n throwIf('filename or dirname', 'stream');\n _this._basename = _this.filename = options.filename ? path.basename(options.filename) : 'winston.log';\n _this.dirname = options.dirname || path.dirname(options.filename);\n _this.options = options.options || {\n flags: 'a'\n };\n } else if (options.stream) {\n // eslint-disable-next-line no-console\n console.warn('options.stream will be removed in winston@4. Use winston.transports.Stream');\n throwIf('stream', 'filename', 'maxsize');\n _this._dest = _this._stream.pipe(_this._setupStream(options.stream));\n _this.dirname = path.dirname(_this._dest.path); // We need to listen for drain events when write() returns false. This\n // can make node mad at times.\n } else {\n throw new Error('Cannot log to file without filename or stream.');\n }\n\n _this.maxsize = options.maxsize || null;\n _this.rotationFormat = options.rotationFormat || false;\n _this.zippedArchive = options.zippedArchive || false;\n _this.maxFiles = options.maxFiles || null;\n _this.eol = typeof options.eol === 'string' ? options.eol : os.EOL;\n _this.tailable = options.tailable || false; // Internal state variables representing the number of files this instance\n // has created and the current size (in bytes) of the current logfile.\n\n _this._size = 0;\n _this._pendingSize = 0;\n _this._created = 0;\n _this._drain = false;\n _this._opening = false;\n _this._ending = false;\n if (_this.dirname) _this._createLogDirIfNotExist(_this.dirname);\n\n _this.open();\n\n return _this;\n }\n\n _createClass(File, [{\n key: \"finishIfEnding\",\n value: function finishIfEnding() {\n var _this2 = this;\n\n if (this._ending) {\n if (this._opening) {\n this.once('open', function () {\n _this2._stream.once('finish', function () {\n return _this2.emit('finish');\n });\n\n setImmediate(function () {\n return _this2._stream.end();\n });\n });\n } else {\n this._stream.once('finish', function () {\n return _this2.emit('finish');\n });\n\n setImmediate(function () {\n return _this2._stream.end();\n });\n }\n }\n }\n /**\n * Core logging method exposed to Winston. Metadata is optional.\n * @param {Object} info - TODO: add param description.\n * @param {Function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"log\",\n value: function log(info) {\n var _this3 = this;\n\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\n // Remark: (jcrugzz) What is necessary about this callback(null, true) now\n // when thinking about 3.x? Should silent be handled in the base\n // TransportStream _write method?\n if (this.silent) {\n callback();\n return true;\n } // Output stream buffer is full and has asked us to wait for the drain event\n\n\n if (this._drain) {\n this._stream.once('drain', function () {\n _this3._drain = false;\n\n _this3.log(info, callback);\n });\n\n return;\n }\n\n if (this._rotate) {\n this._stream.once('rotate', function () {\n _this3._rotate = false;\n\n _this3.log(info, callback);\n });\n\n return;\n } // Grab the raw string and append the expected EOL.\n\n\n var output = \"\".concat(info[MESSAGE]).concat(this.eol);\n var bytes = Buffer.byteLength(output); // After we have written to the PassThrough check to see if we need\n // to rotate to the next file.\n //\n // Remark: This gets called too early and does not depict when data\n // has been actually flushed to disk.\n\n function logged() {\n var _this4 = this;\n\n this._size += bytes;\n this._pendingSize -= bytes;\n debug('logged %s %s', this._size, output);\n this.emit('logged', info); // Do not attempt to rotate files while opening\n\n if (this._opening) {\n return;\n } // Check to see if we need to end the stream and create a new one.\n\n\n if (!this._needsNewFile()) {\n return;\n } // End the current stream, ensure it flushes and create a new one.\n // This could potentially be optimized to not run a stat call but its\n // the safest way since we are supporting `maxFiles`.\n\n\n this._rotate = true;\n\n this._endStream(function () {\n return _this4._rotateFile();\n });\n } // Keep track of the pending bytes being written while files are opening\n // in order to properly rotate the PassThrough this._stream when the file\n // eventually does open.\n\n\n this._pendingSize += bytes;\n\n if (this._opening && !this.rotatedWhileOpening && this._needsNewFile(this._size + this._pendingSize)) {\n this.rotatedWhileOpening = true;\n }\n\n var written = this._stream.write(output, logged.bind(this));\n\n if (!written) {\n this._drain = true;\n\n this._stream.once('drain', function () {\n _this3._drain = false;\n callback();\n });\n } else {\n callback(); // eslint-disable-line callback-return\n }\n\n debug('written', written, this._drain);\n this.finishIfEnding();\n return written;\n }\n /**\n * Query the transport. Options object is optional.\n * @param {Object} options - Loggly-like query options for this instance.\n * @param {function} callback - Continuation to respond to when complete.\n * TODO: Refactor me.\n */\n\n }, {\n key: \"query\",\n value: function query(options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n options = normalizeQuery(options);\n var file = path.join(this.dirname, this.filename);\n var buff = '';\n var results = [];\n var row = 0;\n var stream = fs.createReadStream(file, {\n encoding: 'utf8'\n });\n stream.on('error', function (err) {\n if (stream.readable) {\n stream.destroy();\n }\n\n if (!callback) {\n return;\n }\n\n return err.code !== 'ENOENT' ? callback(err) : callback(null, results);\n });\n stream.on('data', function (data) {\n data = (buff + data).split(/\\n+/);\n var l = data.length - 1;\n var i = 0;\n\n for (; i < l; i++) {\n if (!options.start || row >= options.start) {\n add(data[i]);\n }\n\n row++;\n }\n\n buff = data[l];\n });\n stream.on('close', function () {\n if (buff) {\n add(buff, true);\n }\n\n if (options.order === 'desc') {\n results = results.reverse();\n } // eslint-disable-next-line callback-return\n\n\n if (callback) callback(null, results);\n });\n\n function add(buff, attempt) {\n try {\n var log = JSON.parse(buff);\n\n if (check(log)) {\n push(log);\n }\n } catch (e) {\n if (!attempt) {\n stream.emit('error', e);\n }\n }\n }\n\n function push(log) {\n if (options.rows && results.length >= options.rows && options.order !== 'desc') {\n if (stream.readable) {\n stream.destroy();\n }\n\n return;\n }\n\n if (options.fields) {\n log = options.fields.reduce(function (obj, key) {\n obj[key] = log[key];\n return obj;\n }, {});\n }\n\n if (options.order === 'desc') {\n if (results.length >= options.rows) {\n results.shift();\n }\n }\n\n results.push(log);\n }\n\n function check(log) {\n if (!log) {\n return;\n }\n\n if (_typeof(log) !== 'object') {\n return;\n }\n\n var time = new Date(log.timestamp);\n\n if (options.from && time < options.from || options.until && time > options.until || options.level && options.level !== log.level) {\n return;\n }\n\n return true;\n }\n\n function normalizeQuery(options) {\n options = options || {}; // limit\n\n options.rows = options.rows || options.limit || 10; // starting row offset\n\n options.start = options.start || 0; // now\n\n options.until = options.until || new Date();\n\n if (_typeof(options.until) !== 'object') {\n options.until = new Date(options.until);\n } // now - 24\n\n\n options.from = options.from || options.until - 24 * 60 * 60 * 1000;\n\n if (_typeof(options.from) !== 'object') {\n options.from = new Date(options.from);\n } // 'asc' or 'desc'\n\n\n options.order = options.order || 'desc';\n return options;\n }\n }\n /**\n * Returns a log stream for this transport. Options object is optional.\n * @param {Object} options - Stream options for this instance.\n * @returns {Stream} - TODO: add return description.\n * TODO: Refactor me.\n */\n\n }, {\n key: \"stream\",\n value: function stream() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var file = path.join(this.dirname, this.filename);\n var stream = new Stream();\n var tail = {\n file: file,\n start: options.start\n };\n stream.destroy = tailFile(tail, function (err, line) {\n if (err) {\n return stream.emit('error', err);\n }\n\n try {\n stream.emit('data', line);\n line = JSON.parse(line);\n stream.emit('log', line);\n } catch (e) {\n stream.emit('error', e);\n }\n });\n return stream;\n }\n /**\n * Checks to see the filesize of.\n * @returns {undefined}\n */\n\n }, {\n key: \"open\",\n value: function open() {\n var _this5 = this;\n\n // If we do not have a filename then we were passed a stream and\n // don't need to keep track of size.\n if (!this.filename) return;\n if (this._opening) return;\n this._opening = true; // Stat the target file to get the size and create the stream.\n\n this.stat(function (err, size) {\n if (err) {\n return _this5.emit('error', err);\n }\n\n debug('stat done: %s { size: %s }', _this5.filename, size);\n _this5._size = size;\n _this5._dest = _this5._createStream(_this5._stream);\n _this5._opening = false;\n\n _this5.once('open', function () {\n if (_this5._stream.eventNames().includes('rotate')) {\n _this5._stream.emit('rotate');\n } else {\n _this5._rotate = false;\n }\n });\n });\n }\n /**\n * Stat the file and assess information in order to create the proper stream.\n * @param {function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"stat\",\n value: function stat(callback) {\n var _this6 = this;\n\n var target = this._getFile();\n\n var fullpath = path.join(this.dirname, target);\n fs.stat(fullpath, function (err, stat) {\n if (err && err.code === 'ENOENT') {\n debug('ENOENT ok', fullpath); // Update internally tracked filename with the new target name.\n\n _this6.filename = target;\n return callback(null, 0);\n }\n\n if (err) {\n debug(\"err \".concat(err.code, \" \").concat(fullpath));\n return callback(err);\n }\n\n if (!stat || _this6._needsNewFile(stat.size)) {\n // If `stats.size` is greater than the `maxsize` for this\n // instance then try again.\n return _this6._incFile(function () {\n return _this6.stat(callback);\n });\n } // Once we have figured out what the filename is, set it\n // and return the size.\n\n\n _this6.filename = target;\n callback(null, stat.size);\n });\n }\n /**\n * Closes the stream associated with this instance.\n * @param {function} cb - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"close\",\n value: function close(cb) {\n var _this7 = this;\n\n if (!this._stream) {\n return;\n }\n\n this._stream.end(function () {\n if (cb) {\n cb(); // eslint-disable-line callback-return\n }\n\n _this7.emit('flush');\n\n _this7.emit('closed');\n });\n }\n /**\n * TODO: add method description.\n * @param {number} size - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"_needsNewFile\",\n value: function _needsNewFile(size) {\n size = size || this._size;\n return this.maxsize && size >= this.maxsize;\n }\n /**\n * TODO: add method description.\n * @param {Error} err - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"_onError\",\n value: function _onError(err) {\n this.emit('error', err);\n }\n /**\n * TODO: add method description.\n * @param {Stream} stream - TODO: add param description.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"_setupStream\",\n value: function _setupStream(stream) {\n stream.on('error', this._onError);\n return stream;\n }\n /**\n * TODO: add method description.\n * @param {Stream} stream - TODO: add param description.\n * @returns {mixed} - TODO: add return description.\n */\n\n }, {\n key: \"_cleanupStream\",\n value: function _cleanupStream(stream) {\n stream.removeListener('error', this._onError);\n return stream;\n }\n /**\n * TODO: add method description.\n */\n\n }, {\n key: \"_rotateFile\",\n value: function _rotateFile() {\n var _this8 = this;\n\n this._incFile(function () {\n return _this8.open();\n });\n }\n /**\n * Unpipe from the stream that has been marked as full and end it so it\n * flushes to disk.\n *\n * @param {function} callback - Callback for when the current file has closed.\n * @private\n */\n\n }, {\n key: \"_endStream\",\n value: function _endStream() {\n var _this9 = this;\n\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\n\n if (this._dest) {\n this._stream.unpipe(this._dest);\n\n this._dest.end(function () {\n _this9._cleanupStream(_this9._dest);\n\n callback();\n });\n } else {\n callback(); // eslint-disable-line callback-return\n }\n }\n /**\n * Returns the WritableStream for the active file on this instance. If we\n * should gzip the file then a zlib stream is returned.\n *\n * @param {ReadableStream} source – PassThrough to pipe to the file when open.\n * @returns {WritableStream} Stream that writes to disk for the active file.\n */\n\n }, {\n key: \"_createStream\",\n value: function _createStream(source) {\n var _this10 = this;\n\n var fullpath = path.join(this.dirname, this.filename);\n debug('create stream start', fullpath, this.options);\n var dest = fs.createWriteStream(fullpath, this.options) // TODO: What should we do with errors here?\n .on('error', function (err) {\n return debug(err);\n }).on('close', function () {\n return debug('close', dest.path, dest.bytesWritten);\n }).on('open', function () {\n debug('file open ok', fullpath);\n\n _this10.emit('open', fullpath);\n\n source.pipe(dest); // If rotation occured during the open operation then we immediately\n // start writing to a new PassThrough, begin opening the next file\n // and cleanup the previous source and dest once the source has drained.\n\n if (_this10.rotatedWhileOpening) {\n _this10._stream = new PassThrough();\n\n _this10._stream.setMaxListeners(30);\n\n _this10._rotateFile();\n\n _this10.rotatedWhileOpening = false;\n\n _this10._cleanupStream(dest);\n\n source.end();\n }\n });\n debug('create stream ok', fullpath);\n\n if (this.zippedArchive) {\n var gzip = zlib.createGzip();\n gzip.pipe(dest);\n return gzip;\n }\n\n return dest;\n }\n /**\n * TODO: add method description.\n * @param {function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n }, {\n key: \"_incFile\",\n value: function _incFile(callback) {\n debug('_incFile', this.filename);\n var ext = path.extname(this._basename);\n var basename = path.basename(this._basename, ext);\n\n if (!this.tailable) {\n this._created += 1;\n\n this._checkMaxFilesIncrementing(ext, basename, callback);\n } else {\n this._checkMaxFilesTailable(ext, basename, callback);\n }\n }\n /**\n * Gets the next filename to use for this instance in the case that log\n * filesizes are being capped.\n * @returns {string} - TODO: add return description.\n * @private\n */\n\n }, {\n key: \"_getFile\",\n value: function _getFile() {\n var ext = path.extname(this._basename);\n var basename = path.basename(this._basename, ext);\n var isRotation = this.rotationFormat ? this.rotationFormat() : this._created; // Caveat emptor (indexzero): rotationFormat() was broken by design When\n // combined with max files because the set of files to unlink is never\n // stored.\n\n var target = !this.tailable && this._created ? \"\".concat(basename).concat(isRotation).concat(ext) : \"\".concat(basename).concat(ext);\n return this.zippedArchive && !this.tailable ? \"\".concat(target, \".gz\") : target;\n }\n /**\n * Increment the number of files created or checked by this instance.\n * @param {mixed} ext - TODO: add param description.\n * @param {mixed} basename - TODO: add param description.\n * @param {mixed} callback - TODO: add param description.\n * @returns {undefined}\n * @private\n */\n\n }, {\n key: \"_checkMaxFilesIncrementing\",\n value: function _checkMaxFilesIncrementing(ext, basename, callback) {\n // Check for maxFiles option and delete file.\n if (!this.maxFiles || this._created < this.maxFiles) {\n return setImmediate(callback);\n }\n\n var oldest = this._created - this.maxFiles;\n var isOldest = oldest !== 0 ? oldest : '';\n var isZipped = this.zippedArchive ? '.gz' : '';\n var filePath = \"\".concat(basename).concat(isOldest).concat(ext).concat(isZipped);\n var target = path.join(this.dirname, filePath);\n fs.unlink(target, callback);\n }\n /**\n * Roll files forward based on integer, up to maxFiles. e.g. if base if\n * file.log and it becomes oversized, roll to file1.log, and allow file.log\n * to be re-used. If file is oversized again, roll file1.log to file2.log,\n * roll file.log to file1.log, and so on.\n * @param {mixed} ext - TODO: add param description.\n * @param {mixed} basename - TODO: add param description.\n * @param {mixed} callback - TODO: add param description.\n * @returns {undefined}\n * @private\n */\n\n }, {\n key: \"_checkMaxFilesTailable\",\n value: function _checkMaxFilesTailable(ext, basename, callback) {\n var _this12 = this;\n\n var tasks = [];\n\n if (!this.maxFiles) {\n return;\n } // const isZipped = this.zippedArchive ? '.gz' : '';\n\n\n var isZipped = this.zippedArchive ? '.gz' : '';\n\n for (var x = this.maxFiles - 1; x > 1; x--) {\n tasks.push(function (i, cb) {\n var _this11 = this;\n\n var fileName = \"\".concat(basename).concat(i - 1).concat(ext).concat(isZipped);\n var tmppath = path.join(this.dirname, fileName);\n fs.exists(tmppath, function (exists) {\n if (!exists) {\n return cb(null);\n }\n\n fileName = \"\".concat(basename).concat(i).concat(ext).concat(isZipped);\n fs.rename(tmppath, path.join(_this11.dirname, fileName), cb);\n });\n }.bind(this, x));\n }\n\n asyncSeries(tasks, function () {\n fs.rename(path.join(_this12.dirname, \"\".concat(basename).concat(ext)), path.join(_this12.dirname, \"\".concat(basename, \"1\").concat(ext).concat(isZipped)), callback);\n });\n }\n }, {\n key: \"_createLogDirIfNotExist\",\n value: function _createLogDirIfNotExist(dirPath) {\n /* eslint-disable no-sync */\n if (!fs.existsSync(dirPath)) {\n fs.mkdirSync(dirPath, {\n recursive: true\n });\n }\n /* eslint-enable no-sync */\n\n }\n }]);\n\n return File;\n}(TransportStream);\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/transports/file.js?");
|
|
39623
39562
|
|
|
39624
39563
|
/***/ }),
|
|
39625
39564
|
|
|
@@ -39630,7 +39569,7 @@ eval("/* eslint-disable complexity,max-statements */\n\n/**\n * file.js: Transpo
|
|
|
39630
39569
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39631
39570
|
|
|
39632
39571
|
"use strict";
|
|
39633
|
-
eval("/**\n * http.js: Transport for outputting to a json-rpcserver.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar http = __webpack_require__(/*! http */ \"http\");\n\nvar https = __webpack_require__(/*! https */ \"https\");\n\nvar _require = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\"),\n Stream = _require.Stream;\n\nvar TransportStream = __webpack_require__(/*! winston-transport */ \"./node_modules/winston-transport/dist/index.js\");\n/**\n * Transport for outputting to a json-rpc server.\n * @type {Stream}\n * @extends {TransportStream}\n */\n\n\nmodule.exports = /*#__PURE__*/function (_TransportStream) {\n _inherits(Http, _TransportStream);\n\n var _super = _createSuper(Http);\n\n /**\n * Constructor function for the Http transport object responsible for\n * persisting log messages and metadata to a terminal or TTY.\n * @param {!Object} [options={}] - Options for this instance.\n */\n function Http() {\n var _this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Http);\n\n _this = _super.call(this, options);\n _this.options = options;\n _this.name = options.name || 'http';\n _this.ssl = !!options.ssl;\n _this.host = options.host || 'localhost';\n _this.port = options.port;\n _this.auth = options.auth;\n _this.path = options.path || '';\n _this.agent = options.agent;\n _this.headers = options.headers || {};\n _this.headers['content-type'] = 'application/json';\n\n if (!_this.port) {\n _this.port = _this.ssl ? 443 : 80;\n }\n\n return _this;\n }\n /**\n * Core logging method exposed to Winston.\n * @param {Object} info - TODO: add param description.\n * @param {function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n\n _createClass(Http, [{\n key: \"log\",\n value: function log(info, callback) {\n var _this2 = this;\n\n this._request(info, function (err, res) {\n if (res && res.statusCode !== 200) {\n err = new Error(\"Invalid HTTP Status Code: \".concat(res.statusCode));\n }\n\n if (err) {\n _this2.emit('warn', err);\n } else {\n _this2.emit('logged', info);\n }\n }); // Remark: (jcrugzz) Fire and forget here so requests dont cause buffering\n // and block more requests from happening?\n\n\n if (callback) {\n setImmediate(callback);\n }\n }\n /**\n * Query the transport. Options object is optional.\n * @param {Object} options - Loggly-like query options for this instance.\n * @param {function} callback - Continuation to respond to when complete.\n * @returns {undefined}\n */\n\n }, {\n key: \"query\",\n value: function query(options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n options = {\n method: 'query',\n params: this.normalizeQuery(options)\n };\n\n if (options.params.path) {\n options.path = options.params.path;\n delete options.params.path;\n }\n\n if (options.params.auth) {\n options.auth = options.params.auth;\n delete options.params.auth;\n }\n\n this._request(options, function (err, res, body) {\n if (res && res.statusCode !== 200) {\n err = new Error(\"Invalid HTTP Status Code: \".concat(res.statusCode));\n }\n\n if (err) {\n return callback(err);\n }\n\n if (typeof body === 'string') {\n try {\n body = JSON.parse(body);\n } catch (e) {\n return callback(e);\n }\n }\n\n callback(null, body);\n });\n }\n /**\n * Returns a log stream for this transport. Options object is optional.\n * @param {Object} options - Stream options for this instance.\n * @returns {Stream} - TODO: add return description\n */\n\n }, {\n key: \"stream\",\n value: function stream() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var stream = new Stream();\n options = {\n method: 'stream',\n params: options\n };\n\n if (options.params.path) {\n options.path = options.params.path;\n delete options.params.path;\n }\n\n if (options.params.auth) {\n options.auth = options.params.auth;\n delete options.params.auth;\n }\n\n var buff = '';\n\n var req = this._request(options);\n\n stream.destroy = function () {\n return req.destroy();\n };\n\n req.on('data', function (data) {\n data = (buff + data).split(/\\n+/);\n var l = data.length - 1;\n var i = 0;\n\n for (; i < l; i++) {\n try {\n stream.emit('log', JSON.parse(data[i]));\n } catch (e) {\n stream.emit('error', e);\n }\n }\n\n buff = data[l];\n });\n req.on('error', function (err) {\n return stream.emit('error', err);\n });\n return stream;\n }\n /**\n * Make a request to a winstond server or any http server which can\n * handle json-rpc.\n * @param {function} options - Options to sent the request.\n * @param {function} callback - Continuation to respond to when complete.\n */\n\n }, {\n key: \"_request\",\n value: function _request(options, callback) {\n options = options || {};\n var auth = options.auth || this.auth;\n var path = options.path || this.path || '';\n delete options.auth;\n delete options.path; // Prepare options for outgoing HTTP request\n\n var headers = Object.assign({}, this.headers);\n\n if (auth && auth.bearer) {\n headers.Authorization = \"Bearer \".concat(auth.bearer);\n }\n\n var req = (this.ssl ? https : http).request(_objectSpread(_objectSpread({}, this.options), {}, {\n method: 'POST',\n host: this.host,\n port: this.port,\n path: \"/\".concat(path.replace(/^\\//, '')),\n headers: headers,\n auth: auth && auth.username && auth.password ? \"\".concat(auth.username, \":\").concat(auth.password) : '',\n agent: this.agent\n }));\n req.on('error', callback);\n req.on('response', function (res) {\n return res.on('end', function () {\n return callback(null, res);\n }).resume();\n });\n req.end(Buffer.from(JSON.stringify(options), 'utf8'));\n }\n }]);\n\n return Http;\n}(TransportStream);\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/transports/http.js?");
|
|
39572
|
+
eval("/**\n * http.js: Transport for outputting to a json-rpcserver.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar http = __webpack_require__(/*! http */ \"http\");\n\nvar https = __webpack_require__(/*! https */ \"https\");\n\nvar _require = __webpack_require__(/*! readable-stream */ \"./node_modules/readable-stream/readable-browser.js\"),\n Stream = _require.Stream;\n\nvar TransportStream = __webpack_require__(/*! winston-transport */ \"./node_modules/winston-transport/dist/index.js\");\n\nvar jsonStringify = __webpack_require__(/*! safe-stable-stringify */ \"./node_modules/safe-stable-stringify/index.js\");\n/**\n * Transport for outputting to a json-rpc server.\n * @type {Stream}\n * @extends {TransportStream}\n */\n\n\nmodule.exports = /*#__PURE__*/function (_TransportStream) {\n _inherits(Http, _TransportStream);\n\n var _super = _createSuper(Http);\n\n /**\n * Constructor function for the Http transport object responsible for\n * persisting log messages and metadata to a terminal or TTY.\n * @param {!Object} [options={}] - Options for this instance.\n */\n // eslint-disable-next-line max-statements\n function Http() {\n var _this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Http);\n\n _this = _super.call(this, options);\n _this.options = options;\n _this.name = options.name || 'http';\n _this.ssl = !!options.ssl;\n _this.host = options.host || 'localhost';\n _this.port = options.port;\n _this.auth = options.auth;\n _this.path = options.path || '';\n _this.agent = options.agent;\n _this.headers = options.headers || {};\n _this.headers['content-type'] = 'application/json';\n _this.batch = options.batch || false;\n _this.batchInterval = options.batchInterval || 5000;\n _this.batchCount = options.batchCount || 10;\n _this.batchOptions = [];\n _this.batchTimeoutID = -1;\n _this.batchCallback = {};\n\n if (!_this.port) {\n _this.port = _this.ssl ? 443 : 80;\n }\n\n return _this;\n }\n /**\n * Core logging method exposed to Winston.\n * @param {Object} info - TODO: add param description.\n * @param {function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n\n _createClass(Http, [{\n key: \"log\",\n value: function log(info, callback) {\n var _this2 = this;\n\n this._request(info, function (err, res) {\n if (res && res.statusCode !== 200) {\n err = new Error(\"Invalid HTTP Status Code: \".concat(res.statusCode));\n }\n\n if (err) {\n _this2.emit('warn', err);\n } else {\n _this2.emit('logged', info);\n }\n }); // Remark: (jcrugzz) Fire and forget here so requests dont cause buffering\n // and block more requests from happening?\n\n\n if (callback) {\n setImmediate(callback);\n }\n }\n /**\n * Query the transport. Options object is optional.\n * @param {Object} options - Loggly-like query options for this instance.\n * @param {function} callback - Continuation to respond to when complete.\n * @returns {undefined}\n */\n\n }, {\n key: \"query\",\n value: function query(options, callback) {\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n options = {\n method: 'query',\n params: this.normalizeQuery(options)\n };\n\n if (options.params.path) {\n options.path = options.params.path;\n delete options.params.path;\n }\n\n if (options.params.auth) {\n options.auth = options.params.auth;\n delete options.params.auth;\n }\n\n this._request(options, function (err, res, body) {\n if (res && res.statusCode !== 200) {\n err = new Error(\"Invalid HTTP Status Code: \".concat(res.statusCode));\n }\n\n if (err) {\n return callback(err);\n }\n\n if (typeof body === 'string') {\n try {\n body = JSON.parse(body);\n } catch (e) {\n return callback(e);\n }\n }\n\n callback(null, body);\n });\n }\n /**\n * Returns a log stream for this transport. Options object is optional.\n * @param {Object} options - Stream options for this instance.\n * @returns {Stream} - TODO: add return description\n */\n\n }, {\n key: \"stream\",\n value: function stream() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var stream = new Stream();\n options = {\n method: 'stream',\n params: options\n };\n\n if (options.params.path) {\n options.path = options.params.path;\n delete options.params.path;\n }\n\n if (options.params.auth) {\n options.auth = options.params.auth;\n delete options.params.auth;\n }\n\n var buff = '';\n\n var req = this._request(options);\n\n stream.destroy = function () {\n return req.destroy();\n };\n\n req.on('data', function (data) {\n data = (buff + data).split(/\\n+/);\n var l = data.length - 1;\n var i = 0;\n\n for (; i < l; i++) {\n try {\n stream.emit('log', JSON.parse(data[i]));\n } catch (e) {\n stream.emit('error', e);\n }\n }\n\n buff = data[l];\n });\n req.on('error', function (err) {\n return stream.emit('error', err);\n });\n return stream;\n }\n /**\n * Make a request to a winstond server or any http server which can\n * handle json-rpc.\n * @param {function} options - Options to sent the request.\n * @param {function} callback - Continuation to respond to when complete.\n */\n\n }, {\n key: \"_request\",\n value: function _request(options, callback) {\n options = options || {};\n var auth = options.auth || this.auth;\n var path = options.path || this.path || '';\n delete options.auth;\n delete options.path;\n\n if (this.batch) {\n this._doBatch(options, callback, auth, path);\n } else {\n this._doRequest(options, callback, auth, path);\n }\n }\n /**\n * Send or memorize the options according to batch configuration\n * @param {function} options - Options to sent the request.\n * @param {function} callback - Continuation to respond to when complete.\n * @param {Object?} auth - authentication options\n * @param {string} path - request path\n */\n\n }, {\n key: \"_doBatch\",\n value: function _doBatch(options, callback, auth, path) {\n this.batchOptions.push(options);\n\n if (this.batchOptions.length === 1) {\n // First message stored, it's time to start the timeout!\n var me = this;\n this.batchCallback = callback;\n this.batchTimeoutID = setTimeout(function () {\n // timeout is reached, send all messages to endpoint\n me.batchTimeoutID = -1;\n\n me._doBatchRequest(me.batchCallback, auth, path);\n }, this.batchInterval);\n }\n\n if (this.batchOptions.length === this.batchCount) {\n // max batch count is reached, send all messages to endpoint\n this._doBatchRequest(this.batchCallback, auth, path);\n }\n }\n /**\n * Initiate a request with the memorized batch options, stop the batch timeout\n * @param {function} callback - Continuation to respond to when complete.\n * @param {Object?} auth - authentication options\n * @param {string} path - request path\n */\n\n }, {\n key: \"_doBatchRequest\",\n value: function _doBatchRequest(callback, auth, path) {\n if (this.batchTimeoutID > 0) {\n clearTimeout(this.batchTimeoutID);\n this.batchTimeoutID = -1;\n }\n\n var batchOptionsCopy = this.batchOptions.slice();\n this.batchOptions = [];\n\n this._doRequest(batchOptionsCopy, callback, auth, path);\n }\n /**\n * Make a request to a winstond server or any http server which can\n * handle json-rpc.\n * @param {function} options - Options to sent the request.\n * @param {function} callback - Continuation to respond to when complete.\n * @param {Object?} auth - authentication options\n * @param {string} path - request path\n */\n\n }, {\n key: \"_doRequest\",\n value: function _doRequest(options, callback, auth, path) {\n // Prepare options for outgoing HTTP request\n var headers = Object.assign({}, this.headers);\n\n if (auth && auth.bearer) {\n headers.Authorization = \"Bearer \".concat(auth.bearer);\n }\n\n var req = (this.ssl ? https : http).request(_objectSpread(_objectSpread({}, this.options), {}, {\n method: 'POST',\n host: this.host,\n port: this.port,\n path: \"/\".concat(path.replace(/^\\//, '')),\n headers: headers,\n auth: auth && auth.username && auth.password ? \"\".concat(auth.username, \":\").concat(auth.password) : '',\n agent: this.agent\n }));\n req.on('error', callback);\n req.on('response', function (res) {\n return res.on('end', function () {\n return callback(null, res);\n }).resume();\n });\n req.end(Buffer.from(jsonStringify(options), 'utf8'));\n }\n }]);\n\n return Http;\n}(TransportStream);\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/transports/http.js?");
|
|
39634
39573
|
|
|
39635
39574
|
/***/ }),
|
|
39636
39575
|
|
|
@@ -39652,7 +39591,7 @@ eval("/**\n * transports.js: Set of all transports Winston knows about.\n *\n *
|
|
|
39652
39591
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
39653
39592
|
|
|
39654
39593
|
"use strict";
|
|
39655
|
-
eval("/**\n * stream.js: Transport for outputting to any arbitrary stream.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\";
|
|
39594
|
+
eval("/**\n * stream.js: Transport for outputting to any arbitrary stream.\n *\n * (C) 2010 Charlie Robbins\n * MIT LICENCE\n */\n\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar isStream = __webpack_require__(/*! is-stream */ \"./node_modules/is-stream/index.js\");\n\nvar _require = __webpack_require__(/*! triple-beam */ \"./node_modules/triple-beam/index.js\"),\n MESSAGE = _require.MESSAGE;\n\nvar os = __webpack_require__(/*! os */ \"os\");\n\nvar TransportStream = __webpack_require__(/*! winston-transport */ \"./node_modules/winston-transport/dist/index.js\");\n/**\n * Transport for outputting to any arbitrary stream.\n * @type {Stream}\n * @extends {TransportStream}\n */\n\n\nmodule.exports = /*#__PURE__*/function (_TransportStream) {\n _inherits(Stream, _TransportStream);\n\n var _super = _createSuper(Stream);\n\n /**\n * Constructor function for the Console transport object responsible for\n * persisting log messages and metadata to a terminal or TTY.\n * @param {!Object} [options={}] - Options for this instance.\n */\n function Stream() {\n var _this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Stream);\n\n _this = _super.call(this, options);\n\n if (!options.stream || !isStream(options.stream)) {\n throw new Error('options.stream is required.');\n } // We need to listen for drain events when write() returns false. This can\n // make node mad at times.\n\n\n _this._stream = options.stream;\n\n _this._stream.setMaxListeners(Infinity);\n\n _this.isObjectMode = options.stream._writableState.objectMode;\n _this.eol = typeof options.eol === 'string' ? options.eol : os.EOL;\n return _this;\n }\n /**\n * Core logging method exposed to Winston.\n * @param {Object} info - TODO: add param description.\n * @param {Function} callback - TODO: add param description.\n * @returns {undefined}\n */\n\n\n _createClass(Stream, [{\n key: \"log\",\n value: function log(info, callback) {\n var _this2 = this;\n\n setImmediate(function () {\n return _this2.emit('logged', info);\n });\n\n if (this.isObjectMode) {\n this._stream.write(info);\n\n if (callback) {\n callback(); // eslint-disable-line callback-return\n }\n\n return;\n }\n\n this._stream.write(\"\".concat(info[MESSAGE]).concat(this.eol));\n\n if (callback) {\n callback(); // eslint-disable-line callback-return\n }\n\n return;\n }\n }]);\n\n return Stream;\n}(TransportStream);\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/dist/winston/transports/stream.js?");
|
|
39656
39595
|
|
|
39657
39596
|
/***/ }),
|
|
39658
39597
|
|
|
@@ -40911,7 +40850,7 @@ eval("module.exports = JSON.parse('[\"ac\",\"com.ac\",\"edu.ac\",\"gov.ac\",\"ne
|
|
|
40911
40850
|
/***/ ((module) => {
|
|
40912
40851
|
|
|
40913
40852
|
"use strict";
|
|
40914
|
-
eval("module.exports = JSON.parse('{\"name\":\"winston\",\"description\":\"A logger for just about everything.\",\"version\":\"3.
|
|
40853
|
+
eval("module.exports = JSON.parse('{\"name\":\"winston\",\"description\":\"A logger for just about everything.\",\"version\":\"3.6.0\",\"author\":\"Charlie Robbins <charlie.robbins@gmail.com>\",\"maintainers\":[\"David Hyde <dabh@alumni.stanford.edu>\"],\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/winstonjs/winston.git\"},\"keywords\":[\"winston\",\"logger\",\"logging\",\"logs\",\"sysadmin\",\"bunyan\",\"pino\",\"loglevel\",\"tools\",\"json\",\"stream\"],\"dependencies\":{\"@dabh/diagnostics\":\"^2.0.2\",\"async\":\"^3.2.3\",\"is-stream\":\"^2.0.0\",\"logform\":\"^2.4.0\",\"one-time\":\"^1.0.0\",\"readable-stream\":\"^3.4.0\",\"safe-stable-stringify\":\"^2.3.1\",\"stack-trace\":\"0.0.x\",\"triple-beam\":\"^1.3.0\",\"winston-transport\":\"^4.5.0\"},\"devDependencies\":{\"@babel/cli\":\"^7.17.0\",\"@babel/core\":\"^7.17.2\",\"@babel/preset-env\":\"^7.16.7\",\"@colors/colors\":\"1.5.0\",\"@dabh/eslint-config-populist\":\"^5.0.0\",\"@types/node\":\"^17.0.17\",\"abstract-winston-transport\":\"^0.5.1\",\"assume\":\"^2.2.0\",\"cross-spawn-async\":\"^2.2.5\",\"eslint\":\"^8.9.0\",\"hock\":\"^1.4.1\",\"mocha\":\"8.1.3\",\"nyc\":\"^15.1.0\",\"rimraf\":\"^3.0.2\",\"split2\":\"^4.1.0\",\"std-mocks\":\"^1.0.1\",\"through2\":\"^4.0.2\",\"winston-compat\":\"^0.1.5\"},\"main\":\"./lib/winston\",\"browser\":\"./dist/winston\",\"types\":\"./index.d.ts\",\"scripts\":{\"lint\":\"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist\",\"test\":\"mocha\",\"test:coverage\":\"nyc npm run test:unit\",\"test:unit\":\"mocha test/unit\",\"test:integration\":\"mocha test/integration\",\"build\":\"rimraf dist && babel lib -d dist\",\"prepublishOnly\":\"npm run build\"},\"engines\":{\"node\":\">= 12.0.0\"},\"license\":\"MIT\"}');\n\n//# sourceURL=webpack://open-lens/./node_modules/winston/package.json?");
|
|
40915
40854
|
|
|
40916
40855
|
/***/ }),
|
|
40917
40856
|
|
|
@@ -40922,7 +40861,7 @@ eval("module.exports = JSON.parse('{\"name\":\"winston\",\"description\":\"A log
|
|
|
40922
40861
|
/***/ ((module) => {
|
|
40923
40862
|
|
|
40924
40863
|
"use strict";
|
|
40925
|
-
eval("module.exports = JSON.parse('{\"name\":\"open-lens\",\"productName\":\"OpenLens\",\"description\":\"OpenLens - Open Source IDE for Kubernetes\",\"homepage\":\"https://github.com/lensapp/lens\",\"version\":\"5.4.0\",\"main\":\"static/build/main.js\",\"copyright\":\"© 2021 OpenLens Authors\",\"license\":\"MIT\",\"author\":{\"name\":\"OpenLens Authors\",\"email\":\"info@k8slens.dev\"},\"scripts\":{\"dev\":\"concurrently -i -k \\\\\"yarn run dev-run -C\\\\\" yarn:dev:*\",\"dev-build\":\"concurrently yarn:compile:*\",\"debug-build\":\"concurrently yarn:compile:main yarn:compile:extension-types\",\"dev-run\":\"nodemon --watch static/build/main.js --exec \\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\"\",\"dev:main\":\"yarn run compile:main --watch --progress\",\"dev:renderer\":\"yarn run compile:renderer --watch --progress\",\"dev:extension-types\":\"yarn run compile:extension-types --watch --progress\",\"compile\":\"env NODE_ENV=production concurrently yarn:compile:*\",\"compile:main\":\"yarn run webpack --config webpack.main.ts\",\"compile:renderer\":\"yarn run webpack --config webpack.renderer.ts\",\"compile:extension-types\":\"yarn run webpack --config webpack.extensions.ts\",\"npm:fix-build-version\":\"yarn run ts-node build/set_build_version.ts\",\"npm:fix-package-version\":\"yarn run ts-node build/set_npm_version.ts\",\"build:linux\":\"yarn run compile && electron-builder --linux --dir\",\"build:mac\":\"yarn run compile && electron-builder --mac --dir\",\"build:win\":\"yarn run compile && electron-builder --win --dir\",\"integration\":\"jest --runInBand --detectOpenHandles --forceExit integration\",\"dist\":\"yarn run compile && electron-builder --publish onTag\",\"dist:dir\":\"yarn run dist --dir -c.compression=store -c.mac.identity=null\",\"download-bins\":\"concurrently yarn:download:*\",\"download:kubectl\":\"yarn run ts-node build/download_kubectl.ts\",\"download:helm\":\"yarn run ts-node build/download_helm.ts\",\"download:k8s-proxy\":\"yarn run ts-node build/download_k8s_proxy.ts\",\"build:tray-icons\":\"yarn run ts-node build/build_tray_icon.ts\",\"build:theme-vars\":\"yarn run ts-node build/build_theme_vars.ts\",\"lint\":\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\",\"lint:fix\":\"yarn run lint --fix\",\"mkdocs-serve-local\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\",\"verify-docs\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\",\"typedocs-extensions-api\":\"yarn run typedoc src/extensions/extension-api.ts\",\"version-checkout\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release/v%s\\\\\" | xargs git checkout -b\",\"version-commit\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release v%s\\\\\" | git commit --no-edit -s -F -\",\"version\":\"yarn run version-checkout && git add package.json && yarn run version-commit\",\"postversion\":\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\"},\"config\":{\"k8sProxyVersion\":\"0.1.2\",\"bundledKubectlVersion\":\"1.23.3\",\"bundledHelmVersion\":\"3.7.2\",\"sentryDsn\":\"\"},\"engines\":{\"node\":\">=14 <15\"},\"jest\":{\"collectCoverage\":false,\"verbose\":true,\"transform\":{\"^.+\\\\\\\\.tsx?$\":\"ts-jest\"},\"moduleNameMapper\":{\"\\\\\\\\.(css|scss)$\":\"<rootDir>/__mocks__/styleMock.ts\",\"\\\\\\\\.(svg|png|jpg|eot|woff2?|ttf)$\":\"<rootDir>/__mocks__/assetMock.ts\"},\"modulePathIgnorePatterns\":[\"<rootDir>/dist\",\"<rootDir>/src/extensions/npm\"],\"setupFiles\":[\"<rootDir>/src/jest.setup.ts\",\"jest-canvas-mock\"],\"globals\":{\"ts-jest\":{\"isolatedModules\":true}}},\"build\":{\"generateUpdatesFilesForAllChannels\":true,\"files\":[\"static/build/main.js\"],\"afterSign\":\"build/notarize.js\",\"extraResources\":[{\"from\":\"locales/\",\"to\":\"locales/\",\"filter\":\"**/*.js\"},{\"from\":\"static/\",\"to\":\"static/\",\"filter\":\"!**/main.js\"},{\"from\":\"build/tray\",\"to\":\"static/icons\",\"filter\":\"*.png\"},{\"from\":\"extensions/\",\"to\":\"./extensions/\",\"filter\":[\"**/*.tgz\",\"**/package.json\",\"!**/node_modules\"]},{\"from\":\"templates/\",\"to\":\"./templates/\",\"filter\":\"**/*.yaml\"},\"LICENSE\"],\"linux\":{\"category\":\"Network\",\"artifactName\":\"${productName}-${version}.${arch}.${ext}\",\"target\":[\"deb\",\"rpm\",\"AppImage\"],\"extraResources\":[{\"from\":\"binaries/client/linux/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/linux/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/${arch}/helm3/helm3\",\"to\":\"./helm3/helm3\"}]},\"rpm\":{\"fpm\":[\"--rpm-rpmbuild-define=%define _build_id_links none\"]},\"mac\":{\"hardenedRuntime\":true,\"gatekeeperAssess\":false,\"entitlements\":\"build/entitlements.mac.plist\",\"entitlementsInherit\":\"build/entitlements.mac.plist\",\"extraResources\":[{\"from\":\"binaries/client/darwin/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/darwin/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/${arch}/helm3/helm3\",\"to\":\"./helm3/helm3\"}]},\"win\":{\"target\":[\"nsis\"],\"extraResources\":[{\"from\":\"binaries/client/windows/x64/kubectl.exe\",\"to\":\"./x64/kubectl.exe\"},{\"from\":\"binaries/client/windows/ia32/kubectl.exe\",\"to\":\"./ia32/kubectl.exe\"},{\"from\":\"binaries/client/windows/x64/lens-k8s-proxy\",\"to\":\"./x64/lens-k8s-proxy.exe\"},{\"from\":\"binaries/client/windows/ia32/lens-k8s-proxy\",\"to\":\"./ia32/lens-k8s-proxy.exe\"},{\"from\":\"binaries/client/x64/helm3/helm3.exe\",\"to\":\"./helm3/helm3.exe\"}]},\"nsis\":{\"include\":\"build/installer.nsh\",\"oneClick\":false,\"allowElevation\":true,\"createStartMenuShortcut\":true,\"allowToChangeInstallationDirectory\":true},\"protocols\":{\"name\":\"Lens Protocol Handler\",\"schemes\":[\"lens\"],\"role\":\"Viewer\"}},\"dependencies\":{\"@hapi/call\":\"^8.0.1\",\"@hapi/subtext\":\"^7.0.3\",\"@kubernetes/client-node\":\"^0.16.1\",\"@ogre-tools/injectable\":\"5.0.1\",\"@ogre-tools/injectable-react\":\"5.0.1\",\"@sentry/electron\":\"^2.5.4\",\"@sentry/integrations\":\"^6.15.0\",\"@types/circular-dependency-plugin\":\"5.0.4\",\"abort-controller\":\"^3.0.0\",\"auto-bind\":\"^4.0.0\",\"autobind-decorator\":\"^2.4.0\",\"await-lock\":\"^2.1.0\",\"byline\":\"^5.0.0\",\"chokidar\":\"^3.4.3\",\"conf\":\"^7.1.2\",\"crypto-js\":\"^4.1.1\",\"electron-devtools-installer\":\"^3.2.0\",\"electron-updater\":\"^4.6.1\",\"electron-window-state\":\"^5.0.3\",\"filehound\":\"^1.17.5\",\"fs-extra\":\"^9.0.1\",\"glob-to-regexp\":\"^0.4.1\",\"got\":\"^11.8.3\",\"grapheme-splitter\":\"^1.0.4\",\"handlebars\":\"^4.7.7\",\"http-proxy\":\"^1.18.1\",\"immer\":\"^9.0.6\",\"joi\":\"^17.5.0\",\"js-yaml\":\"^4.1.0\",\"jsdom\":\"^16.7.0\",\"jsonpath\":\"^1.1.1\",\"lodash\":\"^4.17.15\",\"mac-ca\":\"^1.0.6\",\"marked\":\"^4.0.10\",\"md5-file\":\"^5.0.0\",\"mobx\":\"^6.3.7\",\"mobx-observable-history\":\"^2.0.3\",\"mobx-react\":\"^7.2.1\",\"mock-fs\":\"^5.1.2\",\"moment\":\"^2.29.1\",\"moment-timezone\":\"^0.5.34\",\"monaco-editor\":\"^0.29.1\",\"monaco-editor-webpack-plugin\":\"^5.0.0\",\"node-fetch\":\"lensapp/node-fetch#2.x\",\"node-pty\":\"^0.10.1\",\"npm\":\"^6.14.15\",\"p-limit\":\"^3.1.0\",\"path-to-regexp\":\"^6.2.0\",\"proper-lockfile\":\"^4.1.2\",\"react\":\"^17.0.2\",\"react-dom\":\"^17.0.2\",\"react-material-ui-carousel\":\"^2.3.8\",\"react-router\":\"^5.2.0\",\"react-virtualized-auto-sizer\":\"^1.0.6\",\"readable-stream\":\"^3.6.0\",\"request\":\"^2.88.2\",\"request-promise-native\":\"^1.0.9\",\"rfc6902\":\"^4.0.2\",\"semver\":\"^7.3.2\",\"shell-env\":\"^3.0.1\",\"spdy\":\"^4.0.2\",\"tar\":\"^6.1.11\",\"tcp-port-used\":\"^1.0.2\",\"tempy\":\"1.0.1\",\"url-parse\":\"^1.5.3\",\"uuid\":\"^8.3.2\",\"win-ca\":\"^3.4.5\",\"winston\":\"^3.3.3\",\"winston-console-format\":\"^1.0.8\",\"winston-transport-browserconsole\":\"^1.0.5\",\"ws\":\"^7.5.5\"},\"devDependencies\":{\"@async-fn/jest\":\"1.5.3\",\"@material-ui/core\":\"^4.12.3\",\"@material-ui/icons\":\"^4.11.2\",\"@material-ui/lab\":\"^4.0.0-alpha.60\",\"@pmmmwh/react-refresh-webpack-plugin\":\"^0.5.4\",\"@sentry/types\":\"^6.14.1\",\"@testing-library/jest-dom\":\"^5.16.1\",\"@testing-library/react\":\"^11.2.7\",\"@testing-library/user-event\":\"^13.5.0\",\"@types/byline\":\"^4.2.33\",\"@types/chart.js\":\"^2.9.34\",\"@types/color\":\"^3.0.2\",\"@types/crypto-js\":\"^3.1.47\",\"@types/dompurify\":\"^2.3.1\",\"@types/electron-devtools-installer\":\"^2.2.0\",\"@types/fs-extra\":\"^9.0.13\",\"@types/glob-to-regexp\":\"^0.4.1\",\"@types/hoist-non-react-statics\":\"^3.3.1\",\"@types/html-webpack-plugin\":\"^3.2.6\",\"@types/http-proxy\":\"^1.17.7\",\"@types/jest\":\"^26.0.24\",\"@types/js-yaml\":\"^4.0.5\",\"@types/jsdom\":\"^16.2.13\",\"@types/jsonpath\":\"^0.2.0\",\"@types/lodash\":\"^4.14.177\",\"@types/marked\":\"^4.0.1\",\"@types/md5-file\":\"^4.0.2\",\"@types/mini-css-extract-plugin\":\"^2.4.0\",\"@types/mock-fs\":\"^4.13.1\",\"@types/node\":\"14.17.33\",\"@types/node-fetch\":\"^2.5.12\",\"@types/npm\":\"^2.0.32\",\"@types/proper-lockfile\":\"^4.1.2\",\"@types/randomcolor\":\"^0.5.6\",\"@types/react\":\"^17.0.34\",\"@types/react-beautiful-dnd\":\"^13.1.2\",\"@types/react-dom\":\"^17.0.11\",\"@types/react-router-dom\":\"^5.3.2\",\"@types/react-select\":\"3.1.2\",\"@types/react-table\":\"^7.7.9\",\"@types/react-virtualized-auto-sizer\":\"^1.0.1\",\"@types/react-window\":\"^1.8.5\",\"@types/readable-stream\":\"^2.3.12\",\"@types/request\":\"^2.48.7\",\"@types/request-promise-native\":\"^1.0.18\",\"@types/semver\":\"^7.3.9\",\"@types/sharp\":\"^0.29.4\",\"@types/spdy\":\"^3.4.5\",\"@types/tar\":\"^4.0.5\",\"@types/tcp-port-used\":\"^1.0.0\",\"@types/tempy\":\"^0.3.0\",\"@types/triple-beam\":\"^1.3.2\",\"@types/url-parse\":\"^1.4.5\",\"@types/uuid\":\"^8.3.3\",\"@types/webpack\":\"^5.28.0\",\"@types/webpack-dev-server\":\"^4.7.2\",\"@types/webpack-env\":\"^1.16.3\",\"@types/webpack-node-externals\":\"^2.5.3\",\"@typescript-eslint/eslint-plugin\":\"^5.10.1\",\"@typescript-eslint/parser\":\"^5.10.1\",\"ansi_up\":\"^5.1.0\",\"chart.js\":\"^2.9.4\",\"circular-dependency-plugin\":\"^5.2.2\",\"color\":\"^3.2.1\",\"concurrently\":\"^7.0.0\",\"css-loader\":\"^6.5.1\",\"deepdash\":\"^5.3.9\",\"dompurify\":\"^2.3.4\",\"electron\":\"^14.2.4\",\"electron-builder\":\"^22.14.5\",\"electron-notarize\":\"^0.3.0\",\"esbuild\":\"^0.13.15\",\"esbuild-loader\":\"^2.18.0\",\"eslint\":\"^8.7.0\",\"eslint-plugin-header\":\"^3.1.1\",\"eslint-plugin-import\":\"^2.25.4\",\"eslint-plugin-react\":\"^7.28.0\",\"eslint-plugin-react-hooks\":\"^4.3.0\",\"eslint-plugin-unused-imports\":\"^2.0.0\",\"flex.box\":\"^3.4.4\",\"fork-ts-checker-webpack-plugin\":\"^6.5.0\",\"hoist-non-react-statics\":\"^3.3.2\",\"html-webpack-plugin\":\"^5.5.0\",\"ignore-loader\":\"^0.1.2\",\"include-media\":\"^1.4.9\",\"jest\":\"26.6.3\",\"jest-canvas-mock\":\"^2.3.1\",\"jest-fetch-mock\":\"^3.0.3\",\"jest-mock-extended\":\"^1.0.18\",\"make-plural\":\"^6.2.2\",\"mini-css-extract-plugin\":\"^2.5.2\",\"node-gyp\":\"7.1.2\",\"node-loader\":\"^2.0.0\",\"nodemon\":\"^2.0.15\",\"playwright\":\"^1.17.1\",\"postcss\":\"^8.4.5\",\"postcss-loader\":\"^6.2.1\",\"randomcolor\":\"^0.6.2\",\"react-beautiful-dnd\":\"^13.1.0\",\"react-refresh\":\"^0.11.0\",\"react-refresh-typescript\":\"^2.0.3\",\"react-router-dom\":\"^5.3.0\",\"react-select\":\"3.2.0\",\"react-select-event\":\"^5.1.0\",\"react-table\":\"^7.7.0\",\"react-window\":\"^1.8.6\",\"sass\":\"^1.45.1\",\"sass-loader\":\"^12.4.0\",\"sharp\":\"^0.29.3\",\"style-loader\":\"^3.3.1\",\"tailwindcss\":\"^3.0.7\",\"ts-jest\":\"26.5.6\",\"ts-loader\":\"^9.2.6\",\"ts-node\":\"^10.4.0\",\"type-fest\":\"^1.0.2\",\"typed-emitter\":\"^1.4.0\",\"typedoc\":\"0.22.10\",\"typedoc-plugin-markdown\":\"^3.11.12\",\"typeface-roboto\":\"^1.1.13\",\"typescript\":\"^4.5.2\",\"typescript-plugin-css-modules\":\"^3.4.0\",\"webpack\":\"^5.69.0\",\"webpack-cli\":\"^4.9.2\",\"webpack-dev-server\":\"^4.7.4\",\"webpack-node-externals\":\"^3.0.0\",\"xterm\":\"^4.15.0\",\"xterm-addon-fit\":\"^0.5.0\"}}');\n\n//# sourceURL=webpack://open-lens/./package.json?");
|
|
40864
|
+
eval("module.exports = JSON.parse('{\"name\":\"open-lens\",\"productName\":\"OpenLens\",\"description\":\"OpenLens - Open Source IDE for Kubernetes\",\"homepage\":\"https://github.com/lensapp/lens\",\"version\":\"5.4.0\",\"main\":\"static/build/main.js\",\"copyright\":\"© 2021 OpenLens Authors\",\"license\":\"MIT\",\"author\":{\"name\":\"OpenLens Authors\",\"email\":\"info@k8slens.dev\"},\"scripts\":{\"dev\":\"concurrently -i -k \\\\\"yarn run dev-run -C\\\\\" yarn:dev:*\",\"dev-build\":\"concurrently yarn:compile:*\",\"debug-build\":\"concurrently yarn:compile:main yarn:compile:extension-types\",\"dev-run\":\"nodemon --watch ./static/build/main.js --exec \\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\"\",\"dev:main\":\"yarn run compile:main --watch --progress\",\"dev:renderer\":\"yarn run ts-node webpack.dev-server.ts\",\"compile\":\"env NODE_ENV=production concurrently yarn:compile:*\",\"compile:main\":\"yarn run webpack --config webpack.main.ts\",\"compile:renderer\":\"yarn run webpack --config webpack.renderer.ts\",\"compile:extension-types\":\"yarn run webpack --config webpack.extensions.ts\",\"npm:fix-build-version\":\"yarn run ts-node build/set_build_version.ts\",\"npm:fix-package-version\":\"yarn run ts-node build/set_npm_version.ts\",\"build:linux\":\"yarn run compile && electron-builder --linux --dir\",\"build:mac\":\"yarn run compile && electron-builder --mac --dir\",\"build:win\":\"yarn run compile && electron-builder --win --dir\",\"integration\":\"jest --runInBand --detectOpenHandles --forceExit integration\",\"dist\":\"yarn run compile && electron-builder --publish onTag\",\"dist:dir\":\"yarn run dist --dir -c.compression=store -c.mac.identity=null\",\"download:binaries\":\"yarn run ts-node build/download_binaries.ts\",\"build:tray-icons\":\"yarn run ts-node build/build_tray_icon.ts\",\"build:theme-vars\":\"yarn run ts-node build/build_theme_vars.ts\",\"lint\":\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\",\"lint:fix\":\"yarn run lint --fix\",\"mkdocs-serve-local\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\",\"verify-docs\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\",\"typedocs-extensions-api\":\"yarn run typedoc src/extensions/extension-api.ts\",\"version-checkout\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release/v%s\\\\\" | xargs git checkout -b\",\"version-commit\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release v%s\\\\\" | git commit --no-edit -s -F -\",\"version\":\"yarn run version-checkout && git add package.json && yarn run version-commit\",\"postversion\":\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\"},\"config\":{\"k8sProxyVersion\":\"0.1.5\",\"bundledKubectlVersion\":\"1.23.3\",\"bundledHelmVersion\":\"3.7.2\",\"sentryDsn\":\"\"},\"engines\":{\"node\":\">=14 <15\"},\"jest\":{\"collectCoverage\":false,\"verbose\":true,\"transform\":{\"^.+\\\\\\\\.tsx?$\":\"ts-jest\"},\"moduleNameMapper\":{\"\\\\\\\\.(css|scss)$\":\"<rootDir>/__mocks__/styleMock.ts\",\"\\\\\\\\.(svg|png|jpg|eot|woff2?|ttf)$\":\"<rootDir>/__mocks__/assetMock.ts\"},\"modulePathIgnorePatterns\":[\"<rootDir>/dist\",\"<rootDir>/src/extensions/npm\"],\"setupFiles\":[\"<rootDir>/src/jest.setup.ts\",\"jest-canvas-mock\"],\"globals\":{\"ts-jest\":{\"isolatedModules\":true}}},\"build\":{\"generateUpdatesFilesForAllChannels\":true,\"files\":[\"static/build/main.js\"],\"afterSign\":\"build/notarize.js\",\"extraResources\":[{\"from\":\"locales/\",\"to\":\"locales/\",\"filter\":\"**/*.js\"},{\"from\":\"static/\",\"to\":\"static/\",\"filter\":\"!**/main.js\"},{\"from\":\"build/tray\",\"to\":\"static/icons\",\"filter\":\"*.png\"},{\"from\":\"extensions/\",\"to\":\"./extensions/\",\"filter\":[\"**/*.tgz\",\"**/package.json\",\"!**/node_modules\"]},{\"from\":\"templates/\",\"to\":\"./templates/\",\"filter\":\"**/*.yaml\"},\"LICENSE\"],\"linux\":{\"category\":\"Network\",\"artifactName\":\"${productName}-${version}.${arch}.${ext}\",\"target\":[\"deb\",\"rpm\",\"AppImage\"],\"extraResources\":[{\"from\":\"binaries/client/linux/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/linux/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/linux/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"rpm\":{\"fpm\":[\"--rpm-rpmbuild-define=%define _build_id_links none\"]},\"mac\":{\"hardenedRuntime\":true,\"gatekeeperAssess\":false,\"entitlements\":\"build/entitlements.mac.plist\",\"entitlementsInherit\":\"build/entitlements.mac.plist\",\"extraResources\":[{\"from\":\"binaries/client/darwin/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/darwin/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/darwin/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"win\":{\"target\":[\"nsis\"],\"extraResources\":[{\"from\":\"binaries/client/windows/${arch}/kubectl.exe\",\"to\":\"./${arch}/kubectl.exe\"},{\"from\":\"binaries/client/windows/${arch}/lens-k8s-proxy.exe\",\"to\":\"./${arch}/lens-k8s-proxy.exe\"},{\"from\":\"binaries/client/windows/${arch}/helm.exe\",\"to\":\"./${arch}/helm.exe\"}]},\"nsis\":{\"include\":\"build/installer.nsh\",\"oneClick\":false,\"allowElevation\":true,\"createStartMenuShortcut\":true,\"allowToChangeInstallationDirectory\":true},\"protocols\":{\"name\":\"Lens Protocol Handler\",\"schemes\":[\"lens\"],\"role\":\"Viewer\"}},\"dependencies\":{\"@hapi/call\":\"^8.0.1\",\"@hapi/subtext\":\"^7.0.3\",\"@kubernetes/client-node\":\"^0.16.1\",\"@ogre-tools/injectable\":\"5.0.1\",\"@ogre-tools/injectable-react\":\"5.0.1\",\"@sentry/electron\":\"^2.5.4\",\"@sentry/integrations\":\"^6.15.0\",\"@types/circular-dependency-plugin\":\"5.0.4\",\"abort-controller\":\"^3.0.0\",\"auto-bind\":\"^4.0.0\",\"autobind-decorator\":\"^2.4.0\",\"await-lock\":\"^2.1.0\",\"byline\":\"^5.0.0\",\"chokidar\":\"^3.4.3\",\"conf\":\"^7.1.2\",\"crypto-js\":\"^4.1.1\",\"electron-devtools-installer\":\"^3.2.0\",\"electron-updater\":\"^4.6.1\",\"electron-window-state\":\"^5.0.3\",\"filehound\":\"^1.17.5\",\"fs-extra\":\"^9.0.1\",\"glob-to-regexp\":\"^0.4.1\",\"got\":\"^11.8.3\",\"grapheme-splitter\":\"^1.0.4\",\"handlebars\":\"^4.7.7\",\"http-proxy\":\"^1.18.1\",\"immer\":\"^9.0.6\",\"joi\":\"^17.5.0\",\"js-yaml\":\"^4.1.0\",\"jsdom\":\"^16.7.0\",\"jsonpath\":\"^1.1.1\",\"lodash\":\"^4.17.15\",\"mac-ca\":\"^1.0.6\",\"marked\":\"^4.0.10\",\"md5-file\":\"^5.0.0\",\"mobx\":\"^6.3.7\",\"mobx-observable-history\":\"^2.0.3\",\"mobx-react\":\"^7.2.1\",\"mock-fs\":\"^5.1.2\",\"moment\":\"^2.29.1\",\"moment-timezone\":\"^0.5.34\",\"monaco-editor\":\"^0.29.1\",\"monaco-editor-webpack-plugin\":\"^5.0.0\",\"node-fetch\":\"lensapp/node-fetch#2.x\",\"node-pty\":\"^0.10.1\",\"npm\":\"^6.14.15\",\"p-limit\":\"^3.1.0\",\"path-to-regexp\":\"^6.2.0\",\"proper-lockfile\":\"^4.1.2\",\"react\":\"^17.0.2\",\"react-dom\":\"^17.0.2\",\"react-material-ui-carousel\":\"^2.3.8\",\"react-router\":\"^5.2.0\",\"react-virtualized-auto-sizer\":\"^1.0.6\",\"readable-stream\":\"^3.6.0\",\"request\":\"^2.88.2\",\"request-promise-native\":\"^1.0.9\",\"rfc6902\":\"^4.0.2\",\"semver\":\"^7.3.2\",\"shell-env\":\"^3.0.1\",\"spdy\":\"^4.0.2\",\"tar\":\"^6.1.11\",\"tcp-port-used\":\"^1.0.2\",\"tempy\":\"1.0.1\",\"url-parse\":\"^1.5.10\",\"uuid\":\"^8.3.2\",\"win-ca\":\"^3.4.5\",\"winston\":\"^3.6.0\",\"winston-console-format\":\"^1.0.8\",\"winston-transport-browserconsole\":\"^1.0.5\",\"ws\":\"^7.5.5\"},\"devDependencies\":{\"@async-fn/jest\":\"1.5.3\",\"@material-ui/core\":\"^4.12.3\",\"@material-ui/icons\":\"^4.11.2\",\"@material-ui/lab\":\"^4.0.0-alpha.60\",\"@pmmmwh/react-refresh-webpack-plugin\":\"^0.5.4\",\"@sentry/types\":\"^6.18.2\",\"@testing-library/jest-dom\":\"^5.16.1\",\"@testing-library/react\":\"^11.2.7\",\"@testing-library/user-event\":\"^13.5.0\",\"@types/byline\":\"^4.2.33\",\"@types/chart.js\":\"^2.9.34\",\"@types/cli-progress\":\"^3.9.2\",\"@types/color\":\"^3.0.2\",\"@types/crypto-js\":\"^3.1.47\",\"@types/dompurify\":\"^2.3.1\",\"@types/electron-devtools-installer\":\"^2.2.0\",\"@types/fs-extra\":\"^9.0.13\",\"@types/glob-to-regexp\":\"^0.4.1\",\"@types/gunzip-maybe\":\"^1.4.0\",\"@types/hoist-non-react-statics\":\"^3.3.1\",\"@types/html-webpack-plugin\":\"^3.2.6\",\"@types/http-proxy\":\"^1.17.7\",\"@types/jest\":\"^26.0.24\",\"@types/js-yaml\":\"^4.0.5\",\"@types/jsdom\":\"^16.2.13\",\"@types/jsonpath\":\"^0.2.0\",\"@types/lodash\":\"^4.14.177\",\"@types/marked\":\"^4.0.1\",\"@types/md5-file\":\"^4.0.2\",\"@types/mini-css-extract-plugin\":\"^2.4.0\",\"@types/mock-fs\":\"^4.13.1\",\"@types/node\":\"14.17.33\",\"@types/node-fetch\":\"^2.5.12\",\"@types/npm\":\"^2.0.32\",\"@types/proper-lockfile\":\"^4.1.2\",\"@types/randomcolor\":\"^0.5.6\",\"@types/react\":\"^17.0.34\",\"@types/react-beautiful-dnd\":\"^13.1.2\",\"@types/react-dom\":\"^17.0.11\",\"@types/react-router-dom\":\"^5.3.2\",\"@types/react-select\":\"3.1.2\",\"@types/react-table\":\"^7.7.9\",\"@types/react-virtualized-auto-sizer\":\"^1.0.1\",\"@types/react-window\":\"^1.8.5\",\"@types/readable-stream\":\"^2.3.12\",\"@types/request\":\"^2.48.7\",\"@types/request-promise-native\":\"^1.0.18\",\"@types/semver\":\"^7.3.9\",\"@types/sharp\":\"^0.29.4\",\"@types/spdy\":\"^3.4.5\",\"@types/tar\":\"^4.0.5\",\"@types/tar-stream\":\"^2.2.2\",\"@types/tcp-port-used\":\"^1.0.0\",\"@types/tempy\":\"^0.3.0\",\"@types/triple-beam\":\"^1.3.2\",\"@types/url-parse\":\"^1.4.8\",\"@types/uuid\":\"^8.3.3\",\"@types/webpack\":\"^5.28.0\",\"@types/webpack-dev-server\":\"^4.7.2\",\"@types/webpack-env\":\"^1.16.3\",\"@types/webpack-node-externals\":\"^2.5.3\",\"@typescript-eslint/eslint-plugin\":\"^5.14.0\",\"@typescript-eslint/parser\":\"^5.10.1\",\"ansi_up\":\"^5.1.0\",\"mock-http\":\"^1.1.0\",\"chart.js\":\"^2.9.4\",\"circular-dependency-plugin\":\"^5.2.2\",\"cli-progress\":\"^3.10.0\",\"color\":\"^3.2.1\",\"concurrently\":\"^7.0.0\",\"css-loader\":\"^6.7.1\",\"deepdash\":\"^5.3.9\",\"dompurify\":\"^2.3.4\",\"electron\":\"^14.2.4\",\"electron-builder\":\"^22.14.13\",\"electron-notarize\":\"^0.3.0\",\"esbuild\":\"^0.13.15\",\"esbuild-loader\":\"^2.18.0\",\"eslint\":\"^8.7.0\",\"eslint-plugin-header\":\"^3.1.1\",\"eslint-plugin-import\":\"^2.25.4\",\"eslint-plugin-react\":\"^7.28.0\",\"eslint-plugin-react-hooks\":\"^4.3.0\",\"eslint-plugin-unused-imports\":\"^2.0.0\",\"flex.box\":\"^3.4.4\",\"fork-ts-checker-webpack-plugin\":\"^6.5.0\",\"gunzip-maybe\":\"^1.4.2\",\"hoist-non-react-statics\":\"^3.3.2\",\"html-webpack-plugin\":\"^5.5.0\",\"ignore-loader\":\"^0.1.2\",\"include-media\":\"^1.4.9\",\"jest\":\"26.6.3\",\"jest-canvas-mock\":\"^2.3.1\",\"jest-fetch-mock\":\"^3.0.3\",\"jest-mock-extended\":\"^1.0.18\",\"make-plural\":\"^6.2.2\",\"mini-css-extract-plugin\":\"^2.5.2\",\"node-gyp\":\"7.1.2\",\"node-loader\":\"^2.0.0\",\"nodemon\":\"^2.0.15\",\"playwright\":\"^1.17.1\",\"postcss\":\"^8.4.5\",\"postcss-loader\":\"^6.2.1\",\"randomcolor\":\"^0.6.2\",\"react-beautiful-dnd\":\"^13.1.0\",\"react-refresh\":\"^0.11.0\",\"react-refresh-typescript\":\"^2.0.3\",\"react-router-dom\":\"^5.3.0\",\"react-select\":\"3.2.0\",\"react-select-event\":\"^5.3.0\",\"react-table\":\"^7.7.0\",\"react-window\":\"^1.8.6\",\"sass\":\"^1.45.1\",\"sass-loader\":\"^12.6.0\",\"sharp\":\"^0.29.3\",\"style-loader\":\"^3.3.1\",\"tailwindcss\":\"^3.0.7\",\"tar-stream\":\"^2.2.0\",\"ts-jest\":\"26.5.6\",\"ts-loader\":\"^9.2.6\",\"ts-node\":\"^10.4.0\",\"type-fest\":\"^1.4.0\",\"typed-emitter\":\"^1.4.0\",\"typedoc\":\"0.22.10\",\"typedoc-plugin-markdown\":\"^3.11.12\",\"typeface-roboto\":\"^1.1.13\",\"typescript\":\"^4.5.2\",\"typescript-plugin-css-modules\":\"^3.4.0\",\"webpack\":\"^5.69.0\",\"webpack-cli\":\"^4.9.2\",\"webpack-dev-server\":\"^4.7.4\",\"webpack-node-externals\":\"^3.0.0\",\"xterm\":\"^4.15.0\",\"xterm-addon-fit\":\"^0.5.0\"}}');\n\n//# sourceURL=webpack://open-lens/./package.json?");
|
|
40926
40865
|
|
|
40927
40866
|
/***/ }),
|
|
40928
40867
|
|