@k8slens/extensions 5.3.1-git.bb30bdc750.0 → 5.3.1-git.cfa21deece.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/update-available.ipc.d.ts +2 -0
- package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +6 -6
- package/dist/src/common/k8s-api/kube-api.d.ts +26 -25
- package/dist/src/extensions/extension-api.js +16 -16
- package/dist/src/main/cluster.d.ts +3 -7
- package/dist/src/main/context-handler.d.ts +8 -1
- package/dist/src/main/kube-auth-proxy.d.ts +5 -7
- package/dist/src/main/kubeconfig-manager.d.ts +16 -4
- package/dist/src/renderer/components/+nodes/nodes.d.ts +2 -1
- package/dist/src/renderer/components/drawer/drawer.d.ts +14 -3
- package/dist/src/renderer/components/resizing-anchor/resizing-anchor.d.ts +3 -1
- package/package.json +1 -1
|
@@ -13620,7 +13620,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
13620
13620
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13621
13621
|
|
|
13622
13622
|
"use strict";
|
|
13623
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Drawer {\\n --size: 50%;\\n --full-size: 75%;\\n --spacing: 24px;\\n --icon-focus-color: white;\\n position: absolute;\\n background: var(--contentColor);\\n box-shadow: 0 0 16px var(--boxShadow);\\n z-index: 100;\\n height: 100%;\\n}\\n.Drawer.left {\\n left: 0;\\n}\\n.Drawer.right {\\n right: 0;\\n}\\n.Drawer.top {\\n top: 0;\\n}\\n.Drawer.bottom {\\n bottom: 0;\\n}\\n.Drawer.left, .Drawer.right {\\n top: 0;\\n width: var(--size);\\n}\\n.Drawer.top, .Drawer.bottom {\\n left: 0;\\n width: 100%;\\n height: var(--size);\\n}\\n.Drawer .drawer-wrapper {\\n height: 100%;\\n min-height: 100%;\\n}\\n.Drawer .drawer-title {\\n background: var(--blue);\\n color: var(--drawerTitleText);\\n padding: 8px 20px;\\n word-break: break-all;\\n position: relative;\\n min-height: 54px;\\n}\\n.Drawer .drawer-title .drawer-title-text {\\n font-weight: bold;\\n flex-grow: 2;\\n padding-right: 8px;\\n}\\n.Drawer .drawer-title .drawer-title-text .Icon {\\n opacity: 0;\\n font-weight: normal;\\n margin-left: 8px;\\n}\\n.Drawer .drawer-title .drawer-title-text:hover .Icon {\\n opacity: 1;\\n transition: opacity 250ms;\\n}\\n.Drawer .drawer-title .MenuActions.toolbar .Icon {\\n color: var(--drawerTitleText);\\n}\\n.Drawer .drawer-title .Menu {\\n box-shadow: none;\\n}\\n.Drawer .drawer-content {\\n overflow: auto;\\n padding: var(--spacing);\\n}\\n.Drawer .drawer-content .Table .TableHead {\\n border-bottom: 1px solid var(--borderFaintColor);\\n}\\n@media (max-width: 900px) {\\n .Drawer.left, .Drawer.right {\\n width: var(--full-size);\\n }\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/drawer/drawer.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
|
|
13623
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Drawer {\\n --spacing: 24px;\\n --icon-focus-color: white;\\n position: absolute;\\n background: var(--contentColor);\\n box-shadow: 0 0 16px var(--boxShadow);\\n z-index: 100;\\n height: 100%;\\n}\\n.Drawer.left {\\n left: 0;\\n}\\n.Drawer.right {\\n right: 0;\\n}\\n.Drawer.top {\\n top: 0;\\n}\\n.Drawer.bottom {\\n bottom: 0;\\n}\\n.Drawer.left, .Drawer.right {\\n top: 0;\\n width: var(--size);\\n max-width: 95vw;\\n /* Prevent drawer to be bigger than viewport */\\n}\\n.Drawer.top, .Drawer.bottom {\\n left: 0;\\n width: 100%;\\n height: var(--size);\\n}\\n.Drawer .drawer-wrapper {\\n height: 100%;\\n min-height: 100%;\\n}\\n.Drawer .drawer-title {\\n background: var(--blue);\\n color: var(--drawerTitleText);\\n padding: 8px 20px;\\n word-break: break-all;\\n position: relative;\\n min-height: 54px;\\n}\\n.Drawer .drawer-title .drawer-title-text {\\n font-weight: bold;\\n flex-grow: 2;\\n padding-right: 8px;\\n}\\n.Drawer .drawer-title .drawer-title-text .Icon {\\n opacity: 0;\\n font-weight: normal;\\n margin-left: 8px;\\n}\\n.Drawer .drawer-title .drawer-title-text:hover .Icon {\\n opacity: 1;\\n transition: opacity 250ms;\\n}\\n.Drawer .drawer-title .MenuActions.toolbar .Icon {\\n color: var(--drawerTitleText);\\n}\\n.Drawer .drawer-title .Menu {\\n box-shadow: none;\\n}\\n.Drawer .drawer-content {\\n overflow: auto;\\n padding: var(--spacing);\\n}\\n.Drawer .drawer-content .Table .TableHead {\\n border-bottom: 1px solid var(--borderFaintColor);\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/drawer/drawer.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
|
|
13624
13624
|
|
|
13625
13625
|
/***/ }),
|
|
13626
13626
|
|
|
@@ -13872,7 +13872,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
13872
13872
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13873
13873
|
|
|
13874
13874
|
"use strict";
|
|
13875
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Notifications {\\n overflow: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n padding: 16px;\\n max-height: 100vh;\\n z-index: 100000;\\n height: min-content !important;\\n}\\n.Notifications::-webkit-scrollbar {\\n width: 0;\\n height: 0;\\n background: transparent;\\n}\\n.Notifications:empty {\\n display: none;\\n}\\n.Notifications .notification {\\n flex: 0 0;\\n padding: 12px;\\n border-radius: 3px;\\n min-width: 350px;\\n max-width: 35vw;\\n word-break: break-word;\\n}\\n.Notifications .notification:not(:last-child) {\\n margin-bottom: 16px;\\n}\\n.Notifications .notification > .message {\\n white-space: pre-line;\\n padding-left: 8px;\\n padding-right: 16px;\\n}\\n.Notifications .notification > .message a {\\n color: inherit;\\n}\\n.Notifications .notification.ok {\\n background: var(--colorOk);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification.error {\\n background: var(--colorError);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification.info {\\n background: var(--colorInfo);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification .close {\\n margin-top: -2px;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/notifications/notifications.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
|
|
13875
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Notifications {\\n overflow: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n padding: 16px;\\n max-height: 100vh;\\n z-index: 100000;\\n height: min-content !important;\\n}\\n.Notifications::-webkit-scrollbar {\\n width: 0;\\n height: 0;\\n background: transparent;\\n}\\n.Notifications:empty {\\n display: none;\\n}\\n.Notifications .notification {\\n flex: 0 0;\\n padding: 12px;\\n border-radius: 3px;\\n min-width: 350px;\\n max-width: 35vw;\\n word-break: break-word;\\n}\\n.Notifications .notification:not(:last-child) {\\n margin-bottom: 16px;\\n}\\n.Notifications .notification > .message {\\n white-space: pre-line;\\n padding-left: 8px;\\n padding-right: 16px;\\n align-self: center;\\n}\\n.Notifications .notification > .message a {\\n color: inherit;\\n}\\n.Notifications .notification.ok {\\n background: var(--colorOk);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification.error {\\n background: var(--colorError);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\\n.Notifications .notification.info {\\n background: var(--colorInfo);\\n color: white;\\n box-shadow: 0 0 20px var(--boxShadow);\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/notifications/notifications.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
|
|
13876
13876
|
|
|
13877
13877
|
/***/ }),
|
|
13878
13878
|
|
|
@@ -13896,7 +13896,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
13896
13896
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13897
13897
|
|
|
13898
13898
|
"use strict";
|
|
13899
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\nbody.resizing {\\n user-select: none;\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n}\\n\\n.ResizingAnchor {\\n position: absolute;\\n z-index: 10;\\n}\\n.ResizingAnchor::after {\\n content: \\\" \\\";\\n display: block;\\n width: 3px;\\n height: 100%;\\n margin-left: 50%;\\n background: transparent;\\n transition: background 0.2s 0s;\\n}\\n.ResizingAnchor:hover::after {\\n background: var(--blue);\\n transition: background 0.2s 0.5s;\\n}\\n.ResizingAnchor.disabled {\\n display: none;\\n}\\n.ResizingAnchor.vertical {\\n left: 0;\\n right: 0;\\n cursor: row-resize;\\n height: 12px;\\n}\\n.ResizingAnchor.vertical::after {\\n height: 3px;\\n width: 100%;\\n margin-left: 0;\\n}\\n.resizing .ResizingAnchor.vertical {\\n height: 200px;\\n margin-top: -100px;\\n}\\n.resizing .ResizingAnchor.vertical::after {\\n margin-top: 100px;\\n}\\n.ResizingAnchor.vertical.trailing {\\n bottom: -6px;\\n}\\n.ResizingAnchor.horizontal {\\n top: 0;\\n bottom: 0;\\n cursor: col-resize;\\n width: 12px;\\n}\\n.resizing .ResizingAnchor.horizontal {\\n width: 200px;\\n}\\n.resizing .ResizingAnchor.horizontal.trailing {\\n right: -100px;\\n}\\n.ResizingAnchor.horizontal.leading {\\n left: -6px;\\n}\\n.ResizingAnchor.horizontal.trailing {\\n right: -6px;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/resizing-anchor/resizing-anchor.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
|
|
13899
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\nbody.resizing {\\n user-select: none;\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n}\\n\\n.ResizingAnchor {\\n position: absolute;\\n z-index: 10;\\n}\\n.ResizingAnchor::after {\\n content: \\\" \\\";\\n display: block;\\n width: 3px;\\n height: 100%;\\n margin-left: 50%;\\n background: transparent;\\n transition: background 0.2s 0s;\\n}\\n.ResizingAnchor:hover::after, .ResizingAnchor.resizing::after {\\n background: var(--blue);\\n transition: background 0.2s 0.5s;\\n}\\n.ResizingAnchor:hover.wasDragging::after {\\n background: transparent;\\n transition: background 0.2s 0s;\\n}\\n.ResizingAnchor.disabled {\\n display: none;\\n}\\n.ResizingAnchor.vertical {\\n left: 0;\\n right: 0;\\n cursor: row-resize;\\n height: 12px;\\n}\\n.ResizingAnchor.vertical::after {\\n height: 3px;\\n width: 100%;\\n margin-left: 0;\\n}\\n.ResizingAnchor.vertical.trailing {\\n bottom: -6px;\\n}\\n.ResizingAnchor.horizontal {\\n top: 0;\\n bottom: 0;\\n cursor: col-resize;\\n width: 12px;\\n}\\n.ResizingAnchor.horizontal.leading {\\n left: -6px;\\n}\\n.ResizingAnchor.horizontal.trailing {\\n right: -6px;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/resizing-anchor/resizing-anchor.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
|
|
13900
13900
|
|
|
13901
13901
|
/***/ }),
|
|
13902
13902
|
|
|
@@ -38330,7 +38330,7 @@ eval("class Node {\n\t/// value;\n\t/// next;\n\n\tconstructor(value) {\n\t\tthi
|
|
|
38330
38330
|
/*! exports provided: name, productName, description, homepage, version, main, copyright, license, author, scripts, config, engines, jest, build, dependencies, devDependencies, default */
|
|
38331
38331
|
/***/ (function(module) {
|
|
38332
38332
|
|
|
38333
|
-
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.3.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\\\",\\\"dev:renderer\\\":\\\"yarn run webpack-dev-server --config webpack.renderer.ts\\\",\\\"dev:extension-types\\\":\\\"yarn run compile:extension-types --watch\\\",\\\"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\\\",\\\"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\\\":{\\\"bundledKubectlVersion\\\":\\\"1.21.2\\\",\\\"bundledHelmVersion\\\":\\\"3.6.3\\\",\\\"sentryDsn\\\":\\\"\\\"},\\\"engines\\\":{\\\"node\\\":\\\">=14 <15\\\"},\\\"jest\\\":{\\\"collectCoverage\\\":false,\\\"verbose\\\":true,\\\"transform\\\":{\\\"^.+\\\\\\\\.tsx?$\\\":\\\"ts-jest\\\"},\\\"moduleNameMapper\\\":{\\\"\\\\\\\\.(css|scss)$\\\":\\\"<rootDir>/__mocks__/styleMock.ts\\\",\\\"\\\\\\\\.(svg)$\\\":\\\"<rootDir>/__mocks__/imageMock.ts\\\",\\\"src/(.*)\\\":\\\"<rootDir>/__mocks__/windowMock.ts\\\"},\\\"modulePathIgnorePatterns\\\":[\\\"<rootDir>/dist\\\",\\\"<rootDir>/src/extensions/npm\\\"],\\\"setupFiles\\\":[\\\"<rootDir>/src/jest.setup.ts\\\",\\\"jest-canvas-mock\\\"]},\\\"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/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"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/${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/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\\\":{\\\"@electron/remote\\\":\\\"^1.2.2\\\",\\\"@hapi/call\\\":\\\"^8.0.1\\\",\\\"@hapi/subtext\\\":\\\"^7.0.3\\\",\\\"@kubernetes/client-node\\\":\\\"^0.16.1\\\",\\\"@sentry/electron\\\":\\\"^2.5.4\\\",\\\"@sentry/integrations\\\":\\\"^6.15.0\\\",\\\"@ogre-tools/injectable\\\":\\\"^1.2.1\\\",\\\"@ogre-tools/injectable-react\\\":\\\"^1.2.1\\\",\\\"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.2\\\",\\\"grapheme-splitter\\\":\\\"^1.0.4\\\",\\\"handlebars\\\":\\\"^4.7.7\\\",\\\"http-proxy\\\":\\\"^1.18.1\\\",\\\"immer\\\":\\\"^9.0.6\\\",\\\"joi\\\":\\\"^17.4.2\\\",\\\"js-yaml\\\":\\\"^4.1.0\\\",\\\"jsdom\\\":\\\"^16.7.0\\\",\\\"jsonpath\\\":\\\"^1.1.1\\\",\\\"lodash\\\":\\\"^4.17.15\\\",\\\"mac-ca\\\":\\\"^1.0.6\\\",\\\"marked\\\":\\\"^2.1.3\\\",\\\"md5-file\\\":\\\"^5.0.0\\\",\\\"mobx\\\":\\\"^6.3.7\\\",\\\"mobx-observable-history\\\":\\\"^2.0.3\\\",\\\"mobx-react\\\":\\\"^7.2.1\\\",\\\"mock-fs\\\":\\\"^4.14.0\\\",\\\"moment\\\":\\\"^2.29.1\\\",\\\"moment-timezone\\\":\\\"^0.5.33\\\",\\\"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.5\\\",\\\"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\\\":{\\\"@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.4.3\\\",\\\"@sentry/types\\\":\\\"^6.14.1\\\",\\\"@testing-library/jest-dom\\\":\\\"^5.15.0\\\",\\\"@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.1\\\",\\\"@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.4\\\",\\\"@types/jsdom\\\":\\\"^16.2.13\\\",\\\"@types/jsonpath\\\":\\\"^0.2.0\\\",\\\"@types/lodash\\\":\\\"^4.14.176\\\",\\\"@types/marked\\\":\\\"^2.0.5\\\",\\\"@types/md5-file\\\":\\\"^4.0.2\\\",\\\"@types/mini-css-extract-plugin\\\":\\\"^0.9.1\\\",\\\"@types/mock-fs\\\":\\\"^4.13.1\\\",\\\"@types/node\\\":\\\"14.17.33\\\",\\\"@types/node-fetch\\\":\\\"^2.5.12\\\",\\\"@types/npm\\\":\\\"^2.0.32\\\",\\\"@types/progress-bar-webpack-plugin\\\":\\\"^2.1.2\\\",\\\"@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.7\\\",\\\"@types/react-virtualized-auto-sizer\\\":\\\"^1.0.1\\\",\\\"@types/react-window\\\":\\\"^1.8.5\\\",\\\"@types/readable-stream\\\":\\\"^2.3.11\\\",\\\"@types/request\\\":\\\"^2.48.7\\\",\\\"@types/request-promise-native\\\":\\\"^1.0.18\\\",\\\"@types/semver\\\":\\\"^7.3.9\\\",\\\"@types/sharp\\\":\\\"^0.29.2\\\",\\\"@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.4\\\",\\\"@types/uuid\\\":\\\"^8.3.3\\\",\\\"@types/webpack\\\":\\\"^4.41.31\\\",\\\"@types/webpack-dev-server\\\":\\\"^3.11.6\\\",\\\"@types/webpack-env\\\":\\\"^1.16.3\\\",\\\"@types/webpack-node-externals\\\":\\\"^1.7.1\\\",\\\"@typescript-eslint/eslint-plugin\\\":\\\"^4.33.0\\\",\\\"@typescript-eslint/parser\\\":\\\"^4.33.0\\\",\\\"ansi_up\\\":\\\"^5.1.0\\\",\\\"chart.js\\\":\\\"^2.9.4\\\",\\\"circular-dependency-plugin\\\":\\\"^5.2.2\\\",\\\"color\\\":\\\"^3.2.1\\\",\\\"concurrently\\\":\\\"^5.3.0\\\",\\\"css-loader\\\":\\\"^5.2.7\\\",\\\"deepdash\\\":\\\"^5.3.9\\\",\\\"dompurify\\\":\\\"^2.3.3\\\",\\\"electron\\\":\\\"^13.6.1\\\",\\\"electron-builder\\\":\\\"^22.11.11\\\",\\\"electron-notarize\\\":\\\"^0.3.0\\\",\\\"esbuild\\\":\\\"^0.13.15\\\",\\\"esbuild-loader\\\":\\\"^2.16.0\\\",\\\"eslint\\\":\\\"^7.32.0\\\",\\\"eslint-plugin-header\\\":\\\"^3.1.1\\\",\\\"eslint-plugin-react\\\":\\\"^7.26.1\\\",\\\"eslint-plugin-react-hooks\\\":\\\"^4.2.0\\\",\\\"eslint-plugin-unused-imports\\\":\\\"^1.1.5\\\",\\\"file-loader\\\":\\\"^6.2.0\\\",\\\"flex.box\\\":\\\"^3.4.4\\\",\\\"fork-ts-checker-webpack-plugin\\\":\\\"^5.2.1\\\",\\\"hoist-non-react-statics\\\":\\\"^3.3.2\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.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\\\":\\\"^1.6.2\\\",\\\"node-gyp\\\":\\\"7.1.2\\\",\\\"node-loader\\\":\\\"^1.0.3\\\",\\\"nodemon\\\":\\\"^2.0.14\\\",\\\"playwright\\\":\\\"^1.15.2\\\",\\\"postcss\\\":\\\"^8.3.11\\\",\\\"postcss-loader\\\":\\\"4.3.0\\\",\\\"postinstall-postinstall\\\":\\\"^2.1.0\\\",\\\"progress-bar-webpack-plugin\\\":\\\"^2.1.0\\\",\\\"randomcolor\\\":\\\"^0.6.2\\\",\\\"raw-loader\\\":\\\"^4.0.2\\\",\\\"react-beautiful-dnd\\\":\\\"^13.1.0\\\",\\\"react-refresh\\\":\\\"^0.9.0\\\",\\\"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.43.4\\\",\\\"sass-loader\\\":\\\"^8.0.2\\\",\\\"sharp\\\":\\\"^0.29.2\\\",\\\"style-loader\\\":\\\"^2.0.0\\\",\\\"tailwindcss\\\":\\\"^2.2.19\\\",\\\"ts-jest\\\":\\\"26.5.6\\\",\\\"ts-loader\\\":\\\"^7.0.5\\\",\\\"ts-node\\\":\\\"^10.4.0\\\",\\\"type-fest\\\":\\\"^1.0.2\\\",\\\"typed-emitter\\\":\\\"^1.4.0\\\",\\\"typedoc\\\":\\\"0.22.7\\\",\\\"typedoc-plugin-markdown\\\":\\\"^3.11.3\\\",\\\"typeface-roboto\\\":\\\"^1.1.13\\\",\\\"typescript\\\":\\\"^4.5.2\\\",\\\"typescript-plugin-css-modules\\\":\\\"^3.4.0\\\",\\\"url-loader\\\":\\\"^4.1.1\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\",\\\"what-input\\\":\\\"^5.2.10\\\",\\\"xterm\\\":\\\"^4.14.1\\\",\\\"xterm-addon-fit\\\":\\\"^0.5.0\\\"}}\");\n\n//# sourceURL=webpack:///./package.json?");
|
|
38333
|
+
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.3.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\\\",\\\"dev:renderer\\\":\\\"yarn run webpack-dev-server --config webpack.renderer.ts\\\",\\\"dev:extension-types\\\":\\\"yarn run compile:extension-types --watch\\\",\\\"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\\\",\\\"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\\\":{\\\"bundledKubectlVersion\\\":\\\"1.21.2\\\",\\\"bundledHelmVersion\\\":\\\"3.6.3\\\",\\\"sentryDsn\\\":\\\"\\\"},\\\"engines\\\":{\\\"node\\\":\\\">=14 <15\\\"},\\\"jest\\\":{\\\"collectCoverage\\\":false,\\\"verbose\\\":true,\\\"transform\\\":{\\\"^.+\\\\\\\\.tsx?$\\\":\\\"ts-jest\\\"},\\\"moduleNameMapper\\\":{\\\"\\\\\\\\.(css|scss)$\\\":\\\"<rootDir>/__mocks__/styleMock.ts\\\",\\\"\\\\\\\\.(svg)$\\\":\\\"<rootDir>/__mocks__/imageMock.ts\\\",\\\"src/(.*)\\\":\\\"<rootDir>/__mocks__/windowMock.ts\\\"},\\\"modulePathIgnorePatterns\\\":[\\\"<rootDir>/dist\\\",\\\"<rootDir>/src/extensions/npm\\\"],\\\"setupFiles\\\":[\\\"<rootDir>/src/jest.setup.ts\\\",\\\"jest-canvas-mock\\\"]},\\\"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/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"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/${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/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\\\":{\\\"@electron/remote\\\":\\\"^1.2.2\\\",\\\"@hapi/call\\\":\\\"^8.0.1\\\",\\\"@hapi/subtext\\\":\\\"^7.0.3\\\",\\\"@kubernetes/client-node\\\":\\\"^0.16.1\\\",\\\"@sentry/electron\\\":\\\"^2.5.4\\\",\\\"@sentry/integrations\\\":\\\"^6.15.0\\\",\\\"@ogre-tools/injectable\\\":\\\"^1.2.1\\\",\\\"@ogre-tools/injectable-react\\\":\\\"^1.2.1\\\",\\\"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.2\\\",\\\"grapheme-splitter\\\":\\\"^1.0.4\\\",\\\"handlebars\\\":\\\"^4.7.7\\\",\\\"http-proxy\\\":\\\"^1.18.1\\\",\\\"immer\\\":\\\"^9.0.6\\\",\\\"joi\\\":\\\"^17.4.2\\\",\\\"js-yaml\\\":\\\"^4.1.0\\\",\\\"jsdom\\\":\\\"^16.7.0\\\",\\\"jsonpath\\\":\\\"^1.1.1\\\",\\\"lodash\\\":\\\"^4.17.15\\\",\\\"mac-ca\\\":\\\"^1.0.6\\\",\\\"marked\\\":\\\"^2.1.3\\\",\\\"md5-file\\\":\\\"^5.0.0\\\",\\\"mobx\\\":\\\"^6.3.7\\\",\\\"mobx-observable-history\\\":\\\"^2.0.3\\\",\\\"mobx-react\\\":\\\"^7.2.1\\\",\\\"mock-fs\\\":\\\"^4.14.0\\\",\\\"moment\\\":\\\"^2.29.1\\\",\\\"moment-timezone\\\":\\\"^0.5.33\\\",\\\"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.5\\\",\\\"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\\\":{\\\"@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.4.3\\\",\\\"@sentry/types\\\":\\\"^6.14.1\\\",\\\"@testing-library/jest-dom\\\":\\\"^5.15.0\\\",\\\"@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.1\\\",\\\"@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.4\\\",\\\"@types/jsdom\\\":\\\"^16.2.13\\\",\\\"@types/jsonpath\\\":\\\"^0.2.0\\\",\\\"@types/lodash\\\":\\\"^4.14.176\\\",\\\"@types/marked\\\":\\\"^2.0.5\\\",\\\"@types/md5-file\\\":\\\"^4.0.2\\\",\\\"@types/mini-css-extract-plugin\\\":\\\"^0.9.1\\\",\\\"@types/mock-fs\\\":\\\"^4.13.1\\\",\\\"@types/node\\\":\\\"14.17.33\\\",\\\"@types/node-fetch\\\":\\\"^2.5.12\\\",\\\"@types/npm\\\":\\\"^2.0.32\\\",\\\"@types/progress-bar-webpack-plugin\\\":\\\"^2.1.2\\\",\\\"@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.7\\\",\\\"@types/react-virtualized-auto-sizer\\\":\\\"^1.0.1\\\",\\\"@types/react-window\\\":\\\"^1.8.5\\\",\\\"@types/readable-stream\\\":\\\"^2.3.11\\\",\\\"@types/request\\\":\\\"^2.48.7\\\",\\\"@types/request-promise-native\\\":\\\"^1.0.18\\\",\\\"@types/semver\\\":\\\"^7.3.9\\\",\\\"@types/sharp\\\":\\\"^0.29.2\\\",\\\"@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.4\\\",\\\"@types/uuid\\\":\\\"^8.3.3\\\",\\\"@types/webpack\\\":\\\"^4.41.31\\\",\\\"@types/webpack-dev-server\\\":\\\"^3.11.6\\\",\\\"@types/webpack-env\\\":\\\"^1.16.3\\\",\\\"@types/webpack-node-externals\\\":\\\"^1.7.1\\\",\\\"@typescript-eslint/eslint-plugin\\\":\\\"^4.33.0\\\",\\\"@typescript-eslint/parser\\\":\\\"^4.33.0\\\",\\\"ansi_up\\\":\\\"^5.1.0\\\",\\\"chart.js\\\":\\\"^2.9.4\\\",\\\"circular-dependency-plugin\\\":\\\"^5.2.2\\\",\\\"color\\\":\\\"^3.2.1\\\",\\\"concurrently\\\":\\\"^5.3.0\\\",\\\"css-loader\\\":\\\"^5.2.7\\\",\\\"deepdash\\\":\\\"^5.3.9\\\",\\\"dompurify\\\":\\\"^2.3.3\\\",\\\"electron\\\":\\\"^13.6.1\\\",\\\"electron-builder\\\":\\\"^22.14.5\\\",\\\"electron-notarize\\\":\\\"^0.3.0\\\",\\\"esbuild\\\":\\\"^0.13.15\\\",\\\"esbuild-loader\\\":\\\"^2.16.0\\\",\\\"eslint\\\":\\\"^7.32.0\\\",\\\"eslint-plugin-header\\\":\\\"^3.1.1\\\",\\\"eslint-plugin-react\\\":\\\"^7.27.1\\\",\\\"eslint-plugin-react-hooks\\\":\\\"^4.2.0\\\",\\\"eslint-plugin-unused-imports\\\":\\\"^1.1.5\\\",\\\"file-loader\\\":\\\"^6.2.0\\\",\\\"flex.box\\\":\\\"^3.4.4\\\",\\\"fork-ts-checker-webpack-plugin\\\":\\\"^5.2.1\\\",\\\"hoist-non-react-statics\\\":\\\"^3.3.2\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.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\\\":\\\"^1.6.2\\\",\\\"node-gyp\\\":\\\"7.1.2\\\",\\\"node-loader\\\":\\\"^1.0.3\\\",\\\"nodemon\\\":\\\"^2.0.14\\\",\\\"playwright\\\":\\\"^1.15.2\\\",\\\"postcss\\\":\\\"^8.3.11\\\",\\\"postcss-loader\\\":\\\"4.3.0\\\",\\\"postinstall-postinstall\\\":\\\"^2.1.0\\\",\\\"progress-bar-webpack-plugin\\\":\\\"^2.1.0\\\",\\\"randomcolor\\\":\\\"^0.6.2\\\",\\\"raw-loader\\\":\\\"^4.0.2\\\",\\\"react-beautiful-dnd\\\":\\\"^13.1.0\\\",\\\"react-refresh\\\":\\\"^0.9.0\\\",\\\"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.43.4\\\",\\\"sass-loader\\\":\\\"^8.0.2\\\",\\\"sharp\\\":\\\"^0.29.2\\\",\\\"style-loader\\\":\\\"^2.0.0\\\",\\\"tailwindcss\\\":\\\"^2.2.19\\\",\\\"ts-jest\\\":\\\"26.5.6\\\",\\\"ts-loader\\\":\\\"^7.0.5\\\",\\\"ts-node\\\":\\\"^10.4.0\\\",\\\"type-fest\\\":\\\"^1.0.2\\\",\\\"typed-emitter\\\":\\\"^1.4.0\\\",\\\"typedoc\\\":\\\"0.22.7\\\",\\\"typedoc-plugin-markdown\\\":\\\"^3.11.3\\\",\\\"typeface-roboto\\\":\\\"^1.1.13\\\",\\\"typescript\\\":\\\"^4.5.2\\\",\\\"typescript-plugin-css-modules\\\":\\\"^3.4.0\\\",\\\"url-loader\\\":\\\"^4.1.1\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\",\\\"what-input\\\":\\\"^5.2.10\\\",\\\"xterm\\\":\\\"^4.14.1\\\",\\\"xterm-addon-fit\\\":\\\"^0.5.0\\\"}}\");\n\n//# sourceURL=webpack:///./package.json?");
|
|
38334
38334
|
|
|
38335
38335
|
/***/ }),
|
|
38336
38336
|
|
|
@@ -38554,11 +38554,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
38554
38554
|
/*!*********************************!*\
|
|
38555
38555
|
!*** ./src/common/ipc/index.ts ***!
|
|
38556
38556
|
\*********************************/
|
|
38557
|
-
/*! exports provided: dialogShowOpenDialogHandler, requestMain, ipcMainHandle, broadcastMessage, ipcMainOn, ipcRendererOn, bindBroadcastHandlers, InvalidKubeconfigChannel, UpdateAvailableChannel, AutoUpdateLogPrefix, areArgsUpdateAvailableFromMain, areArgsUpdateAvailableToBackchannel, ClusterListNamespaceForbiddenChannel, isListNamespaceForbiddenArgs, onceCorrect, onCorrect, handleCorrect, HotbarTooManyItems */
|
|
38557
|
+
/*! exports provided: dialogShowOpenDialogHandler, requestMain, ipcMainHandle, broadcastMessage, ipcMainOn, ipcRendererOn, bindBroadcastHandlers, InvalidKubeconfigChannel, UpdateAvailableChannel, AutoUpdateChecking, AutoUpdateNoUpdateAvailable, AutoUpdateLogPrefix, areArgsUpdateAvailableFromMain, areArgsUpdateAvailableToBackchannel, ClusterListNamespaceForbiddenChannel, isListNamespaceForbiddenArgs, onceCorrect, onCorrect, handleCorrect, HotbarTooManyItems */
|
|
38558
38558
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
38559
38559
|
|
|
38560
38560
|
"use strict";
|
|
38561
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dialogShowOpenDialogHandler\", function() { return dialogShowOpenDialogHandler; });\n/* harmony import */ var _ipc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ipc */ \"./src/common/ipc/ipc.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"requestMain\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"requestMain\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ipcMainHandle\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"ipcMainHandle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"broadcastMessage\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"broadcastMessage\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ipcMainOn\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"ipcMainOn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ipcRendererOn\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"ipcRendererOn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bindBroadcastHandlers\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"bindBroadcastHandlers\"]; });\n\n/* harmony import */ var _invalid_kubeconfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./invalid-kubeconfig */ \"./src/common/ipc/invalid-kubeconfig/index.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InvalidKubeconfigChannel\", function() { return _invalid_kubeconfig__WEBPACK_IMPORTED_MODULE_1__[\"InvalidKubeconfigChannel\"]; });\n\n/* harmony import */ var _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./update-available.ipc */ \"./src/common/ipc/update-available.ipc.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"UpdateAvailableChannel\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"UpdateAvailableChannel\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AutoUpdateLogPrefix\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"AutoUpdateLogPrefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areArgsUpdateAvailableFromMain\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"areArgsUpdateAvailableFromMain\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areArgsUpdateAvailableToBackchannel\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"areArgsUpdateAvailableToBackchannel\"]; });\n\n/* harmony import */ var _cluster_ipc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cluster.ipc */ \"./src/common/ipc/cluster.ipc.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ClusterListNamespaceForbiddenChannel\", function() { return _cluster_ipc__WEBPACK_IMPORTED_MODULE_3__[\"ClusterListNamespaceForbiddenChannel\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isListNamespaceForbiddenArgs\", function() { return _cluster_ipc__WEBPACK_IMPORTED_MODULE_3__[\"isListNamespaceForbiddenArgs\"]; });\n\n/* harmony import */ var _type_enforced_ipc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./type-enforced-ipc */ \"./src/common/ipc/type-enforced-ipc.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"onceCorrect\", function() { return _type_enforced_ipc__WEBPACK_IMPORTED_MODULE_4__[\"onceCorrect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"onCorrect\", function() { return _type_enforced_ipc__WEBPACK_IMPORTED_MODULE_4__[\"onCorrect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"handleCorrect\", function() { return _type_enforced_ipc__WEBPACK_IMPORTED_MODULE_4__[\"handleCorrect\"]; });\n\n/* harmony import */ var _hotbar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hotbar */ \"./src/common/ipc/hotbar.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"HotbarTooManyItems\", function() { return _hotbar__WEBPACK_IMPORTED_MODULE_5__[\"HotbarTooManyItems\"]; });\n\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nconst dialogShowOpenDialogHandler = \"dialog:show-open-dialog\";\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/common/ipc/index.ts?");
|
|
38561
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dialogShowOpenDialogHandler\", function() { return dialogShowOpenDialogHandler; });\n/* harmony import */ var _ipc__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ipc */ \"./src/common/ipc/ipc.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"requestMain\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"requestMain\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ipcMainHandle\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"ipcMainHandle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"broadcastMessage\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"broadcastMessage\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ipcMainOn\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"ipcMainOn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ipcRendererOn\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"ipcRendererOn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bindBroadcastHandlers\", function() { return _ipc__WEBPACK_IMPORTED_MODULE_0__[\"bindBroadcastHandlers\"]; });\n\n/* harmony import */ var _invalid_kubeconfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./invalid-kubeconfig */ \"./src/common/ipc/invalid-kubeconfig/index.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InvalidKubeconfigChannel\", function() { return _invalid_kubeconfig__WEBPACK_IMPORTED_MODULE_1__[\"InvalidKubeconfigChannel\"]; });\n\n/* harmony import */ var _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./update-available.ipc */ \"./src/common/ipc/update-available.ipc.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"UpdateAvailableChannel\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"UpdateAvailableChannel\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AutoUpdateChecking\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"AutoUpdateChecking\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AutoUpdateNoUpdateAvailable\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"AutoUpdateNoUpdateAvailable\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AutoUpdateLogPrefix\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"AutoUpdateLogPrefix\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areArgsUpdateAvailableFromMain\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"areArgsUpdateAvailableFromMain\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"areArgsUpdateAvailableToBackchannel\", function() { return _update_available_ipc__WEBPACK_IMPORTED_MODULE_2__[\"areArgsUpdateAvailableToBackchannel\"]; });\n\n/* harmony import */ var _cluster_ipc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cluster.ipc */ \"./src/common/ipc/cluster.ipc.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ClusterListNamespaceForbiddenChannel\", function() { return _cluster_ipc__WEBPACK_IMPORTED_MODULE_3__[\"ClusterListNamespaceForbiddenChannel\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isListNamespaceForbiddenArgs\", function() { return _cluster_ipc__WEBPACK_IMPORTED_MODULE_3__[\"isListNamespaceForbiddenArgs\"]; });\n\n/* harmony import */ var _type_enforced_ipc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./type-enforced-ipc */ \"./src/common/ipc/type-enforced-ipc.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"onceCorrect\", function() { return _type_enforced_ipc__WEBPACK_IMPORTED_MODULE_4__[\"onceCorrect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"onCorrect\", function() { return _type_enforced_ipc__WEBPACK_IMPORTED_MODULE_4__[\"onCorrect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"handleCorrect\", function() { return _type_enforced_ipc__WEBPACK_IMPORTED_MODULE_4__[\"handleCorrect\"]; });\n\n/* harmony import */ var _hotbar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hotbar */ \"./src/common/ipc/hotbar.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"HotbarTooManyItems\", function() { return _hotbar__WEBPACK_IMPORTED_MODULE_5__[\"HotbarTooManyItems\"]; });\n\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nconst dialogShowOpenDialogHandler = \"dialog:show-open-dialog\";\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/common/ipc/index.ts?");
|
|
38562
38562
|
|
|
38563
38563
|
/***/ }),
|
|
38564
38564
|
|
|
@@ -38602,11 +38602,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
38602
38602
|
/*!************************************************!*\
|
|
38603
38603
|
!*** ./src/common/ipc/update-available.ipc.ts ***!
|
|
38604
38604
|
\************************************************/
|
|
38605
|
-
/*! exports provided: UpdateAvailableChannel, AutoUpdateLogPrefix, areArgsUpdateAvailableFromMain, areArgsUpdateAvailableToBackchannel */
|
|
38605
|
+
/*! exports provided: UpdateAvailableChannel, AutoUpdateChecking, AutoUpdateNoUpdateAvailable, AutoUpdateLogPrefix, areArgsUpdateAvailableFromMain, areArgsUpdateAvailableToBackchannel */
|
|
38606
38606
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
38607
38607
|
|
|
38608
38608
|
"use strict";
|
|
38609
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"UpdateAvailableChannel\", function() { return UpdateAvailableChannel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AutoUpdateLogPrefix\", function() { return AutoUpdateLogPrefix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areArgsUpdateAvailableFromMain\", function() { return areArgsUpdateAvailableFromMain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areArgsUpdateAvailableToBackchannel\", function() { return areArgsUpdateAvailableToBackchannel; });\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nconst UpdateAvailableChannel = \"update-available\";\nconst AutoUpdateLogPrefix = \"[UPDATE-CHECKER]\";\nfunction areArgsUpdateAvailableFromMain(args) {\n if (args.length !== 2) {\n return false;\n }\n if (typeof args[0] !== \"string\") {\n return false;\n }\n if (typeof args[1] !== \"object\" || args[1] === null) {\n // TODO: improve this checking\n return false;\n }\n return true;\n}\nfunction areArgsUpdateAvailableToBackchannel(args) {\n if (args.length !== 1) {\n return false;\n }\n if (typeof args[0] !== \"object\" || args[0] === null) {\n // TODO: improve this checking\n return false;\n }\n return true;\n}\n\n\n//# sourceURL=webpack:///./src/common/ipc/update-available.ipc.ts?");
|
|
38609
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"UpdateAvailableChannel\", function() { return UpdateAvailableChannel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AutoUpdateChecking\", function() { return AutoUpdateChecking; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AutoUpdateNoUpdateAvailable\", function() { return AutoUpdateNoUpdateAvailable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"AutoUpdateLogPrefix\", function() { return AutoUpdateLogPrefix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areArgsUpdateAvailableFromMain\", function() { return areArgsUpdateAvailableFromMain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"areArgsUpdateAvailableToBackchannel\", function() { return areArgsUpdateAvailableToBackchannel; });\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nconst UpdateAvailableChannel = \"update-available\";\nconst AutoUpdateChecking = \"auto-update:checking\";\nconst AutoUpdateNoUpdateAvailable = \"auto-update:no-update\";\nconst AutoUpdateLogPrefix = \"[UPDATE-CHECKER]\";\nfunction areArgsUpdateAvailableFromMain(args) {\n if (args.length !== 2) {\n return false;\n }\n if (typeof args[0] !== \"string\") {\n return false;\n }\n if (typeof args[1] !== \"object\" || args[1] === null) {\n // TODO: improve this checking\n return false;\n }\n return true;\n}\nfunction areArgsUpdateAvailableToBackchannel(args) {\n if (args.length !== 1) {\n return false;\n }\n if (typeof args[0] !== \"object\" || args[0] === null) {\n // TODO: improve this checking\n return false;\n }\n return true;\n}\n\n\n//# sourceURL=webpack:///./src/common/ipc/update-available.ipc.ts?");
|
|
38610
38610
|
|
|
38611
38611
|
/***/ }),
|
|
38612
38612
|
|
|
@@ -39110,7 +39110,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
39110
39110
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
39111
39111
|
|
|
39112
39112
|
"use strict";
|
|
39113
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forCluster\", function() { return forCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forRemoteCluster\", function() { return forRemoteCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ensureObjectSelfLink\", function() { return ensureObjectSelfLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeApi\", function() { return KubeApi; });\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! querystring */ \"querystring\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _api_manager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! byline */ \"./node_modules/byline/lib/byline.js\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(byline__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _kube_json_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./kube-json-api */ \"./src/common/k8s-api/kube-json-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! https */ \"https\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_13__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Base class for building all kubernetes apis\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction forCluster(cluster, kubeClass, apiClass = null) {\n const url = new URL(_index__WEBPACK_IMPORTED_MODULE_6__[\"apiBase\"].config.serverAddress);\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_10__[\"KubeJsonApi\"]({\n serverAddress: _index__WEBPACK_IMPORTED_MODULE_6__[\"apiBase\"].config.serverAddress,\n apiBase: _common_vars__WEBPACK_IMPORTED_MODULE_3__[\"apiKubePrefix\"],\n debug: _common_vars__WEBPACK_IMPORTED_MODULE_3__[\"isDevelopment\"],\n }, {\n headers: {\n \"Host\": `${cluster.metadata.uid}.localhost:${url.port}`,\n },\n });\n if (!apiClass) {\n apiClass = KubeApi;\n }\n return new apiClass({\n objectConstructor: kubeClass,\n request,\n });\n}\nfunction forRemoteCluster(config, kubeClass, apiClass = null) {\n const reqInit = {};\n const agentOptions = {};\n if (config.cluster.skipTLSVerify === true) {\n agentOptions.rejectUnauthorized = false;\n }\n if (config.user.clientCertificateData) {\n agentOptions.cert = config.user.clientCertificateData;\n }\n if (config.user.clientKeyData) {\n agentOptions.key = config.user.clientKeyData;\n }\n if (config.cluster.caData) {\n agentOptions.ca = config.cluster.caData;\n }\n if (Object.keys(agentOptions).length > 0) {\n reqInit.agent = new https__WEBPACK_IMPORTED_MODULE_13__[\"Agent\"](agentOptions);\n }\n const token = config.user.token;\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_10__[\"KubeJsonApi\"](Object.assign({ serverAddress: config.cluster.server, apiBase: \"\", debug: _common_vars__WEBPACK_IMPORTED_MODULE_3__[\"isDevelopment\"] }, (token ? {\n getRequestOptions: async () => ({\n headers: {\n \"Authorization\": `Bearer ${Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isFunction\"])(token) ? await token() : token}`,\n },\n }),\n } : {})), reqInit);\n if (!apiClass) {\n apiClass = KubeApi;\n }\n return new apiClass({\n objectConstructor: kubeClass,\n request,\n });\n}\nfunction ensureObjectSelfLink(api, object) {\n if (!object.metadata.selfLink) {\n object.metadata.selfLink = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"createKubeApiURL\"])({\n apiPrefix: api.apiPrefix,\n apiVersion: api.apiVersionWithGroup,\n resource: api.apiResource,\n namespace: api.isNamespaced ? object.metadata.namespace : undefined,\n name: object.metadata.name,\n });\n }\n}\nconst patchTypeHeaders = {\n \"merge\": \"application/merge-patch+json\",\n \"json\": \"application/json-patch+json\",\n \"strategic\": \"application/strategic-merge-patch+json\",\n};\nclass KubeApi {\n constructor(options) {\n var _a, _b;\n Object.defineProperty(this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiGroup\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersionPreferred\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiResource\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"isNamespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"objectConstructor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"resourceVersions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"watchDisposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"watchId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 1\n });\n const { objectConstructor, request = _index__WEBPACK_IMPORTED_MODULE_6__[\"apiKube\"], kind = (_a = options.objectConstructor) === null || _a === void 0 ? void 0 : _a.kind, isNamespaced = (_b = options.objectConstructor) === null || _b === void 0 ? void 0 : _b.namespaced, } = options || {};\n const { apiBase, apiPrefix, apiGroup, apiVersion, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"parseKubeApi\"])(options.apiBase || objectConstructor.apiBase);\n this.kind = kind;\n this.isNamespaced = isNamespaced;\n this.apiBase = apiBase;\n this.apiPrefix = apiPrefix;\n this.apiGroup = apiGroup;\n this.apiVersion = apiVersion;\n this.apiResource = resource;\n this.request = request;\n this.objectConstructor = objectConstructor;\n this.parseResponse = this.parseResponse.bind(this);\n _api_manager__WEBPACK_IMPORTED_MODULE_5__[\"apiManager\"].registerApi(apiBase, this);\n }\n get apiVersionWithGroup() {\n var _a;\n return [this.apiGroup, (_a = this.apiVersionPreferred) !== null && _a !== void 0 ? _a : this.apiVersion]\n .filter(Boolean)\n .join(\"/\");\n }\n /**\n * Returns the latest API prefix/group that contains the required resource.\n * First tries options.apiBase, then urls in order from options.fallbackApiBases.\n */\n async getLatestApiPrefixGroup() {\n var _a;\n // Note that this.options.apiBase is the \"full\" url, whereas this.apiBase is parsed\n const apiBases = [this.options.apiBase, ...this.options.fallbackApiBases];\n for (const apiUrl of apiBases) {\n // Split e.g. \"/apis/extensions/v1beta1/ingresses\" to parts\n const { apiPrefix, apiGroup, apiVersionWithGroup, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"parseKubeApi\"])(apiUrl);\n // Request available resources\n try {\n const response = await this.request.get(`${apiPrefix}/${apiVersionWithGroup}`);\n // If the resource is found in the group, use this apiUrl\n if ((_a = response.resources) === null || _a === void 0 ? void 0 : _a.find(kubeResource => kubeResource.name === resource)) {\n return { apiPrefix, apiGroup };\n }\n }\n catch (error) {\n // Exception is ignored as we can try the next url\n }\n }\n throw new Error(`Can't find working API for the Kubernetes resource ${this.apiResource}`);\n }\n /**\n * Get the apiPrefix and apiGroup to be used for fetching the preferred version.\n */\n async getPreferredVersionPrefixGroup() {\n if (this.options.fallbackApiBases) {\n try {\n return await this.getLatestApiPrefixGroup();\n }\n catch (error) {\n // If valid API wasn't found, log the error and return defaults below\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].error(error);\n }\n }\n return {\n apiPrefix: this.apiPrefix,\n apiGroup: this.apiGroup,\n };\n }\n async checkPreferredVersion() {\n var _a, _b;\n if (this.options.fallbackApiBases && !this.options.checkPreferredVersion) {\n throw new Error(\"checkPreferredVersion must be enabled if fallbackApiBases is set in KubeApi\");\n }\n if (this.options.checkPreferredVersion && this.apiVersionPreferred === undefined) {\n const { apiPrefix, apiGroup } = await this.getPreferredVersionPrefixGroup();\n // The apiPrefix and apiGroup might change due to fallbackApiBases, so we must override them\n Object.defineProperty(this, \"apiPrefix\", {\n value: apiPrefix,\n });\n Object.defineProperty(this, \"apiGroup\", {\n value: apiGroup,\n });\n const res = await this.request.get(`${this.apiPrefix}/${this.apiGroup}`);\n Object.defineProperty(this, \"apiVersionPreferred\", {\n value: (_b = (_a = res === null || res === void 0 ? void 0 : res.preferredVersion) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : null,\n });\n if (this.apiVersionPreferred) {\n Object.defineProperty(this, \"apiBase\", { value: this.getUrl() });\n _api_manager__WEBPACK_IMPORTED_MODULE_5__[\"apiManager\"].registerApi(this.apiBase, this);\n }\n }\n }\n setResourceVersion(namespace = \"\", newVersion) {\n this.resourceVersions.set(namespace, newVersion);\n }\n getResourceVersion(namespace = \"\") {\n return this.resourceVersions.get(namespace);\n }\n async refreshResourceVersion(params) {\n return this.list(params, { limit: 1 });\n }\n getUrl({ name = \"\", namespace = \"\" } = {}, query) {\n const resourcePath = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"createKubeApiURL\"])({\n apiPrefix: this.apiPrefix,\n apiVersion: this.apiVersionWithGroup,\n resource: this.apiResource,\n namespace: this.isNamespaced ? namespace : undefined,\n name,\n });\n return resourcePath + (query ? `?${Object(querystring__WEBPACK_IMPORTED_MODULE_2__[\"stringify\"])(this.normalizeQuery(query))}` : \"\");\n }\n normalizeQuery(query = {}) {\n if (query.labelSelector) {\n query.labelSelector = [query.labelSelector].flat().join(\",\");\n }\n if (query.fieldSelector) {\n query.fieldSelector = [query.fieldSelector].flat().join(\",\");\n }\n return query;\n }\n parseResponse(data, namespace) {\n if (!data)\n return null;\n const KubeObjectConstructor = this.objectConstructor;\n // process items list response, check before single item since there is overlap\n if (_kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeObject\"].isJsonApiDataList(data, _kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeObject\"].isPartialJsonApiData)) {\n const { apiVersion, items, metadata } = data;\n this.setResourceVersion(namespace, metadata.resourceVersion);\n this.setResourceVersion(\"\", metadata.resourceVersion);\n return items.map((item) => {\n const object = new KubeObjectConstructor(Object.assign({ kind: this.kind, apiVersion }, item));\n ensureObjectSelfLink(this, object);\n return object;\n });\n }\n // process a single item\n if (_kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeObject\"].isJsonApiData(data)) {\n const object = new KubeObjectConstructor(data);\n ensureObjectSelfLink(this, object);\n return object;\n }\n // custom apis might return array for list response, e.g. users, groups, etc.\n if (Array.isArray(data)) {\n return data.map(data => new KubeObjectConstructor(data));\n }\n return null;\n }\n async list({ namespace = \"\", reqInit } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace });\n const res = await this.request.get(url, { query }, reqInit);\n const parsed = this.parseResponse(res, namespace);\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (!parsed) {\n return null;\n }\n throw new Error(`GET multiple request to ${url} returned not an array: ${JSON.stringify(parsed)}`);\n }\n async get({ name = \"\", namespace = \"default\" } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace, name });\n const res = await this.request.get(url, { query });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`GET single request to ${url} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async create({ name = \"\", namespace = \"default\" } = {}, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace });\n const res = await this.request.post(apiUrl, {\n data: lodash_merge__WEBPACK_IMPORTED_MODULE_0___default()({\n kind: this.kind,\n apiVersion: this.apiVersionWithGroup,\n metadata: {\n name,\n namespace,\n },\n }, data),\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`POST request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async update({ name = \"\", namespace = \"default\" } = {}, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const res = await this.request.put(apiUrl, { data });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PUT request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async patch({ name = \"\", namespace = \"default\" } = {}, data, strategy = \"strategic\") {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const res = await this.request.patch(apiUrl, { data }, {\n headers: {\n \"content-type\": patchTypeHeaders[strategy],\n },\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PATCH request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async delete({ name = \"\", namespace = \"default\", propagationPolicy = \"Background\" }) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const reqInit = {\n query: {\n propagationPolicy,\n },\n };\n return this.request.del(apiUrl, reqInit);\n }\n getWatchUrl(namespace = \"\", query = {}) {\n return this.getUrl({ namespace }, Object.assign({ watch: 1, resourceVersion: this.getResourceVersion(namespace) }, query));\n }\n watch(opts = { namespace: \"\", retry: false }) {\n let errorReceived = false;\n let timedRetry;\n const { namespace, callback = _utils__WEBPACK_IMPORTED_MODULE_11__[\"noop\"], retry, timeout } = opts;\n const { watchId = `${this.kind.toLowerCase()}-${this.watchId++}` } = opts;\n // Create AbortController for this request\n const abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_12___default.a();\n // If caller aborts, abort using request's abortController\n if (opts.abortController) {\n opts.abortController.signal.addEventListener(\"abort\", () => {\n abortController.abort();\n });\n }\n abortController.signal.addEventListener(\"abort\", () => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] watch (${watchId}) aborted ${watchUrl}`);\n clearTimeout(timedRetry);\n });\n const requestParams = timeout ? { query: { timeoutSeconds: timeout } } : {};\n const watchUrl = this.getWatchUrl(namespace);\n const responsePromise = this.request.getResponse(watchUrl, requestParams, {\n signal: abortController.signal,\n timeout: 600000,\n });\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${retry === true ? \"retried\" : \"started\"} ${watchUrl}`);\n responsePromise\n .then(response => {\n // True if the current watch request was retried\n let requestRetried = false;\n if (!response.ok) {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].warn(`[KUBE-API] watch (${watchId}) error response ${watchUrl}`, { status: response.status });\n return callback(null, response);\n }\n // Add mechanism to retry in case timeoutSeconds is set but the watch wasn't timed out.\n // This can happen if e.g. network is offline and AWS NLB is used.\n if (timeout) {\n setTimeout(() => {\n // We only retry if we haven't retried, haven't aborted and haven't received k8s error\n if (requestRetried || abortController.signal.aborted || errorReceived) {\n return;\n }\n // Close current request\n abortController.abort();\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] Watch timeout set, but not retried, retrying now`);\n requestRetried = true;\n // Clearing out any possible timeout, although we don't expect this to be set\n clearTimeout(timedRetry);\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n // We wait longer than the timeout, as we expect the request to be retried with timeoutSeconds\n }, timeout * 1000 * 1.1);\n }\n [\"end\", \"close\", \"error\"].forEach((eventName) => {\n response.body.on(eventName, () => {\n // We only retry if we haven't retried, haven't aborted and haven't received k8s error\n // kubernetes errors (=errorReceived set) should be handled in a callback\n if (requestRetried || abortController.signal.aborted || errorReceived) {\n return;\n }\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${eventName} ${watchUrl}`);\n requestRetried = true;\n clearTimeout(timedRetry);\n timedRetry = setTimeout(() => {\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n }, 1000);\n });\n });\n byline__WEBPACK_IMPORTED_MODULE_9___default()(response.body).on(\"data\", (line) => {\n try {\n const event = JSON.parse(line);\n if (event.type === \"ERROR\" && event.object.kind === \"Status\") {\n errorReceived = true;\n return callback(null, new _kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeStatus\"](event.object));\n }\n this.modifyWatchEvent(event);\n callback(event, null);\n }\n catch (ignore) {\n // ignore parse errors\n }\n });\n })\n .catch(error => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].error(`[KUBE-API] watch (${watchId}) throwed ${watchUrl}`, error);\n callback(null, error);\n });\n return abortController.abort;\n }\n modifyWatchEvent(event) {\n switch (event.type) {\n case \"ADDED\":\n case \"DELETED\":\n case \"MODIFIED\": {\n ensureObjectSelfLink(this, event.object);\n const { namespace, resourceVersion } = event.object.metadata;\n this.setResourceVersion(namespace, resourceVersion);\n this.setResourceVersion(\"\", resourceVersion);\n break;\n }\n }\n }\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-api.ts?");
|
|
39113
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forCluster\", function() { return forCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forRemoteCluster\", function() { return forRemoteCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ensureObjectSelfLink\", function() { return ensureObjectSelfLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeApi\", function() { return KubeApi; });\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 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 _common_vars__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _api_manager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! byline */ \"./node_modules/byline/lib/byline.js\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(byline__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _kube_json_api__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./kube-json-api */ \"./src/common/k8s-api/kube-json-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! https */ \"https\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_12__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n// Base class for building all kubernetes apis\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction forCluster(cluster, kubeClass, apiClass = null) {\n const url = new URL(_index__WEBPACK_IMPORTED_MODULE_5__[\"apiBase\"].config.serverAddress);\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_9__[\"KubeJsonApi\"]({\n serverAddress: _index__WEBPACK_IMPORTED_MODULE_5__[\"apiBase\"].config.serverAddress,\n apiBase: _common_vars__WEBPACK_IMPORTED_MODULE_2__[\"apiKubePrefix\"],\n debug: _common_vars__WEBPACK_IMPORTED_MODULE_2__[\"isDevelopment\"],\n }, {\n headers: {\n \"Host\": `${cluster.metadata.uid}.localhost:${url.port}`,\n },\n });\n if (!apiClass) {\n apiClass = KubeApi;\n }\n return new apiClass({\n objectConstructor: kubeClass,\n request,\n });\n}\nfunction forRemoteCluster(config, kubeClass, apiClass = null) {\n const reqInit = {};\n const agentOptions = {};\n if (config.cluster.skipTLSVerify === true) {\n agentOptions.rejectUnauthorized = false;\n }\n if (config.user.clientCertificateData) {\n agentOptions.cert = config.user.clientCertificateData;\n }\n if (config.user.clientKeyData) {\n agentOptions.key = config.user.clientKeyData;\n }\n if (config.cluster.caData) {\n agentOptions.ca = config.cluster.caData;\n }\n if (Object.keys(agentOptions).length > 0) {\n reqInit.agent = new https__WEBPACK_IMPORTED_MODULE_12__[\"Agent\"](agentOptions);\n }\n const token = config.user.token;\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_9__[\"KubeJsonApi\"](Object.assign({ serverAddress: config.cluster.server, apiBase: \"\", debug: _common_vars__WEBPACK_IMPORTED_MODULE_2__[\"isDevelopment\"] }, (token ? {\n getRequestOptions: async () => ({\n headers: {\n \"Authorization\": `Bearer ${Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isFunction\"])(token) ? await token() : token}`,\n },\n }),\n } : {})), reqInit);\n if (!apiClass) {\n apiClass = KubeApi;\n }\n return new apiClass({\n objectConstructor: kubeClass,\n request,\n });\n}\nfunction ensureObjectSelfLink(api, object) {\n if (!object.metadata.selfLink) {\n object.metadata.selfLink = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"createKubeApiURL\"])({\n apiPrefix: api.apiPrefix,\n apiVersion: api.apiVersionWithGroup,\n resource: api.apiResource,\n namespace: api.isNamespaced ? object.metadata.namespace : undefined,\n name: object.metadata.name,\n });\n }\n}\nconst patchTypeHeaders = {\n \"merge\": \"application/merge-patch+json\",\n \"json\": \"application/json-patch+json\",\n \"strategic\": \"application/strategic-merge-patch+json\",\n};\nclass KubeApi {\n constructor(options) {\n var _a, _b;\n Object.defineProperty(this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiGroup\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersionPreferred\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiResource\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"isNamespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"objectConstructor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"resourceVersions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"watchDisposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"watchId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 1\n });\n const { objectConstructor, request = _index__WEBPACK_IMPORTED_MODULE_5__[\"apiKube\"], kind = (_a = options.objectConstructor) === null || _a === void 0 ? void 0 : _a.kind, isNamespaced = (_b = options.objectConstructor) === null || _b === void 0 ? void 0 : _b.namespaced, } = options || {};\n const { apiBase, apiPrefix, apiGroup, apiVersion, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"parseKubeApi\"])(options.apiBase || objectConstructor.apiBase);\n this.kind = kind;\n this.isNamespaced = isNamespaced;\n this.apiBase = apiBase;\n this.apiPrefix = apiPrefix;\n this.apiGroup = apiGroup;\n this.apiVersion = apiVersion;\n this.apiResource = resource;\n this.request = request;\n this.objectConstructor = objectConstructor;\n this.parseResponse = this.parseResponse.bind(this);\n _api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerApi(apiBase, this);\n }\n get apiVersionWithGroup() {\n var _a;\n return [this.apiGroup, (_a = this.apiVersionPreferred) !== null && _a !== void 0 ? _a : this.apiVersion]\n .filter(Boolean)\n .join(\"/\");\n }\n /**\n * Returns the latest API prefix/group that contains the required resource.\n * First tries options.apiBase, then urls in order from options.fallbackApiBases.\n */\n async getLatestApiPrefixGroup() {\n var _a;\n // Note that this.options.apiBase is the \"full\" url, whereas this.apiBase is parsed\n const apiBases = [this.options.apiBase, this.objectConstructor.apiBase, ...this.options.fallbackApiBases];\n for (const apiUrl of apiBases) {\n if (!apiUrl) {\n continue;\n }\n try {\n // Split e.g. \"/apis/extensions/v1beta1/ingresses\" to parts\n const { apiPrefix, apiGroup, apiVersionWithGroup, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"parseKubeApi\"])(apiUrl);\n // Request available resources\n const response = await this.request.get(`${apiPrefix}/${apiVersionWithGroup}`);\n // If the resource is found in the group, use this apiUrl\n if ((_a = response.resources) === null || _a === void 0 ? void 0 : _a.find(kubeResource => kubeResource.name === resource)) {\n return { apiPrefix, apiGroup };\n }\n }\n catch (error) {\n // Exception is ignored as we can try the next url\n }\n }\n throw new Error(`Can't find working API for the Kubernetes resource ${this.apiResource}`);\n }\n /**\n * Get the apiPrefix and apiGroup to be used for fetching the preferred version.\n */\n async getPreferredVersionPrefixGroup() {\n if (this.options.fallbackApiBases) {\n try {\n return await this.getLatestApiPrefixGroup();\n }\n catch (error) {\n // If valid API wasn't found, log the error and return defaults below\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[KUBE-API]: ${error}`);\n }\n }\n return {\n apiPrefix: this.apiPrefix,\n apiGroup: this.apiGroup,\n };\n }\n async checkPreferredVersion() {\n var _a, _b;\n if (this.options.fallbackApiBases && !this.options.checkPreferredVersion) {\n throw new Error(\"checkPreferredVersion must be enabled if fallbackApiBases is set in KubeApi\");\n }\n if (this.options.checkPreferredVersion && this.apiVersionPreferred === undefined) {\n const { apiPrefix, apiGroup } = await this.getPreferredVersionPrefixGroup();\n // The apiPrefix and apiGroup might change due to fallbackApiBases, so we must override them\n Object.defineProperty(this, \"apiPrefix\", {\n value: apiPrefix,\n });\n Object.defineProperty(this, \"apiGroup\", {\n value: apiGroup,\n });\n const res = await this.request.get(`${this.apiPrefix}/${this.apiGroup}`);\n Object.defineProperty(this, \"apiVersionPreferred\", {\n value: (_b = (_a = res === null || res === void 0 ? void 0 : res.preferredVersion) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : null,\n });\n if (this.apiVersionPreferred) {\n Object.defineProperty(this, \"apiBase\", { value: this.getUrl() });\n _api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerApi(this.apiBase, this);\n }\n }\n }\n setResourceVersion(namespace = \"\", newVersion) {\n this.resourceVersions.set(namespace, newVersion);\n }\n getResourceVersion(namespace = \"\") {\n return this.resourceVersions.get(namespace);\n }\n async refreshResourceVersion(params) {\n return this.list(params, { limit: 1 });\n }\n getUrl({ name, namespace = \"default\" } = {}, query) {\n const resourcePath = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"createKubeApiURL\"])({\n apiPrefix: this.apiPrefix,\n apiVersion: this.apiVersionWithGroup,\n resource: this.apiResource,\n namespace: this.isNamespaced ? namespace !== null && namespace !== void 0 ? namespace : \"default\" : undefined,\n name,\n });\n return resourcePath + (query ? `?${Object(querystring__WEBPACK_IMPORTED_MODULE_1__[\"stringify\"])(this.normalizeQuery(query))}` : \"\");\n }\n normalizeQuery(query = {}) {\n if (query.labelSelector) {\n query.labelSelector = [query.labelSelector].flat().join(\",\");\n }\n if (query.fieldSelector) {\n query.fieldSelector = [query.fieldSelector].flat().join(\",\");\n }\n return query;\n }\n parseResponse(data, namespace) {\n if (!data)\n return null;\n const KubeObjectConstructor = this.objectConstructor;\n // process items list response, check before single item since there is overlap\n if (_kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"].isJsonApiDataList(data, _kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"].isPartialJsonApiData)) {\n const { apiVersion, items, metadata } = data;\n this.setResourceVersion(namespace, metadata.resourceVersion);\n this.setResourceVersion(\"\", metadata.resourceVersion);\n return items.map((item) => {\n const object = new KubeObjectConstructor(Object.assign({ kind: this.kind, apiVersion }, item));\n ensureObjectSelfLink(this, object);\n return object;\n });\n }\n // process a single item\n if (_kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"].isJsonApiData(data)) {\n const object = new KubeObjectConstructor(data);\n ensureObjectSelfLink(this, object);\n return object;\n }\n // custom apis might return array for list response, e.g. users, groups, etc.\n if (Array.isArray(data)) {\n return data.map(data => new KubeObjectConstructor(data));\n }\n return null;\n }\n async list({ namespace = \"\", reqInit } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace });\n const res = await this.request.get(url, { query }, reqInit);\n const parsed = this.parseResponse(res, namespace);\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (!parsed) {\n return null;\n }\n throw new Error(`GET multiple request to ${url} returned not an array: ${JSON.stringify(parsed)}`);\n }\n async get(desc, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl(desc);\n const res = await this.request.get(url, { query });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`GET single request to ${url} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async create({ name, namespace }, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace });\n const res = await this.request.post(apiUrl, {\n data: Object.assign(Object.assign({}, data), { metadata: {\n name,\n namespace,\n } }),\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`POST request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async update({ name, namespace }, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const res = await this.request.put(apiUrl, {\n data: Object.assign(Object.assign({}, data), { metadata: {\n name,\n namespace,\n } }),\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PUT request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async patch(desc, data, strategy = \"strategic\") {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl(desc);\n const res = await this.request.patch(apiUrl, { data }, {\n headers: {\n \"content-type\": patchTypeHeaders[strategy],\n },\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PATCH request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async delete(_a) {\n var { propagationPolicy = \"Background\" } = _a, desc = __rest(_a, [\"propagationPolicy\"]);\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl(desc);\n return this.request.del(apiUrl, {\n query: {\n propagationPolicy,\n },\n });\n }\n getWatchUrl(namespace = \"\", query = {}) {\n return this.getUrl({ namespace }, Object.assign({ watch: 1, resourceVersion: this.getResourceVersion(namespace) }, query));\n }\n watch(opts = { namespace: \"\", retry: false }) {\n let errorReceived = false;\n let timedRetry;\n const { namespace, callback = _utils__WEBPACK_IMPORTED_MODULE_10__[\"noop\"], retry, timeout } = opts;\n const { watchId = `${this.kind.toLowerCase()}-${this.watchId++}` } = opts;\n // Create AbortController for this request\n const abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_11___default.a();\n // If caller aborts, abort using request's abortController\n if (opts.abortController) {\n opts.abortController.signal.addEventListener(\"abort\", () => {\n abortController.abort();\n });\n }\n abortController.signal.addEventListener(\"abort\", () => {\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] watch (${watchId}) aborted ${watchUrl}`);\n clearTimeout(timedRetry);\n });\n const requestParams = timeout ? { query: { timeoutSeconds: timeout } } : {};\n const watchUrl = this.getWatchUrl(namespace);\n const responsePromise = this.request.getResponse(watchUrl, requestParams, {\n signal: abortController.signal,\n timeout: 600000,\n });\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${retry === true ? \"retried\" : \"started\"} ${watchUrl}`);\n responsePromise\n .then(response => {\n // True if the current watch request was retried\n let requestRetried = false;\n if (!response.ok) {\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].warn(`[KUBE-API] watch (${watchId}) error response ${watchUrl}`, { status: response.status });\n return callback(null, response);\n }\n // Add mechanism to retry in case timeoutSeconds is set but the watch wasn't timed out.\n // This can happen if e.g. network is offline and AWS NLB is used.\n if (timeout) {\n setTimeout(() => {\n // We only retry if we haven't retried, haven't aborted and haven't received k8s error\n if (requestRetried || abortController.signal.aborted || errorReceived) {\n return;\n }\n // Close current request\n abortController.abort();\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] Watch timeout set, but not retried, retrying now`);\n requestRetried = true;\n // Clearing out any possible timeout, although we don't expect this to be set\n clearTimeout(timedRetry);\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n // We wait longer than the timeout, as we expect the request to be retried with timeoutSeconds\n }, timeout * 1000 * 1.1);\n }\n [\"end\", \"close\", \"error\"].forEach((eventName) => {\n response.body.on(eventName, () => {\n // We only retry if we haven't retried, haven't aborted and haven't received k8s error\n // kubernetes errors (=errorReceived set) should be handled in a callback\n if (requestRetried || abortController.signal.aborted || errorReceived) {\n return;\n }\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${eventName} ${watchUrl}`);\n requestRetried = true;\n clearTimeout(timedRetry);\n timedRetry = setTimeout(() => {\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n }, 1000);\n });\n });\n byline__WEBPACK_IMPORTED_MODULE_8___default()(response.body).on(\"data\", (line) => {\n try {\n const event = JSON.parse(line);\n if (event.type === \"ERROR\" && event.object.kind === \"Status\") {\n errorReceived = true;\n return callback(null, new _kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeStatus\"](event.object));\n }\n this.modifyWatchEvent(event);\n callback(event, null);\n }\n catch (ignore) {\n // ignore parse errors\n }\n });\n })\n .catch(error => {\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[KUBE-API] watch (${watchId}) throwed ${watchUrl}`, error);\n callback(null, error);\n });\n return abortController.abort;\n }\n modifyWatchEvent(event) {\n switch (event.type) {\n case \"ADDED\":\n case \"DELETED\":\n case \"MODIFIED\": {\n ensureObjectSelfLink(this, event.object);\n const { namespace, resourceVersion } = event.object.metadata;\n this.setResourceVersion(namespace, resourceVersion);\n this.setResourceVersion(\"\", resourceVersion);\n break;\n }\n }\n }\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-api.ts?");
|
|
39114
39114
|
|
|
39115
39115
|
/***/ }),
|
|
39116
39116
|
|
|
@@ -39134,7 +39134,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
39134
39134
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
39135
39135
|
|
|
39136
39136
|
"use strict";
|
|
39137
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeObjectStore\", function() { return KubeObjectStore; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _item_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../item.store */ \"./src/common/item.store.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_6__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\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 __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\nclass KubeObjectStore extends _item_store__WEBPACK_IMPORTED_MODULE_3__[\"ItemStore\"] {\n constructor(api) {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"bufferSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 50000\n });\n Object.defineProperty(this, \"loadedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // collect items from watch-api events to avoid UI blowing up with huge streams of data\n Object.defineProperty(this, \"eventsBuffer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].array([], { deep: false })\n });\n if (api)\n this.api = api;\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n this.bindWatchEventsUpdater();\n }\n get contextReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.context));\n }\n get namespacesReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.loadedNamespaces));\n }\n get context() {\n return KubeObjectStore.defaultContext.get();\n }\n get contextItems() {\n var _a, _b;\n const namespaces = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces) !== null && _b !== void 0 ? _b : [];\n return this.items.filter(item => {\n const itemNamespace = item.getNs();\n return !itemNamespace /* cluster-wide */ || namespaces.includes(itemNamespace);\n });\n }\n getTotalCount() {\n return this.contextItems.length;\n }\n get query() {\n const { limit } = this;\n if (!limit) {\n return {};\n }\n return { limit };\n }\n getAllByNs(namespace, strict = false) {\n const namespaces = [].concat(namespace);\n if (namespaces.length) {\n return this.items.filter(item => namespaces.includes(item.getNs()));\n }\n if (!strict) {\n return this.items;\n }\n return [];\n }\n getById(id) {\n return this.items.find(item => item.getId() === id);\n }\n getByName(name, namespace) {\n return this.items.find(item => {\n return item.getName() === name && (namespace ? item.getNs() === namespace : true);\n });\n }\n getByPath(path) {\n return this.items.find(item => item.selfLink === path);\n }\n getByLabel(labels) {\n if (Array.isArray(labels)) {\n return this.items.filter((item) => {\n const itemLabels = item.getLabels();\n return labels.every(label => itemLabels.includes(label));\n });\n }\n else {\n return this.items.filter((item) => {\n const itemLabels = item.metadata.labels || {};\n return Object.entries(labels)\n .every(([key, value]) => itemLabels[key] === value);\n });\n }\n }\n async loadItems({ namespaces, reqInit, onLoadFailure }) {\n var _a, _b;\n if (!((_a = this.context) === null || _a === void 0 ? void 0 : _a.cluster.isAllowedResource(this.api.kind))) {\n return [];\n }\n const isLoadingAll = ((_b = this.context.allNamespaces) === null || _b === void 0 ? void 0 : _b.length) > 1\n && this.context.cluster.accessibleNamespaces.length === 0\n && this.context.allNamespaces.every(ns => namespaces.includes(ns));\n if (!this.api.isNamespaced || isLoadingAll) {\n if (this.api.isNamespaced) {\n this.loadedNamespaces = [];\n }\n const res = this.api.list({ reqInit }, this.query);\n if (onLoadFailure) {\n try {\n return await res;\n }\n catch (error) {\n onLoadFailure((error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.toString()) || \"Unknown error\");\n // reset the store because we are loading all, so that nothing is displayed\n this.items.clear();\n this.selectedItemsIds.clear();\n return [];\n }\n }\n return res;\n }\n this.loadedNamespaces = namespaces;\n const results = await Promise.allSettled(namespaces.map(namespace => this.api.list({ namespace, reqInit }, this.query)));\n const res = [];\n for (const result of results) {\n switch (result.status) {\n case \"fulfilled\":\n res.push(...result.value);\n break;\n case \"rejected\":\n if (onLoadFailure) {\n onLoadFailure(result.reason.message);\n }\n else {\n // if onLoadFailure is not provided then preserve old behaviour\n throw result.reason;\n }\n }\n }\n return res;\n }\n filterItemsOnLoad(items) {\n return items;\n }\n async loadAll({ namespaces = this.context.contextNamespaces, merge = true, reqInit, onLoadFailure } = {}) {\n await this.contextReady;\n this.isLoading = true;\n try {\n const items = await this.loadItems({ namespaces, reqInit, onLoadFailure });\n this.mergeItems(items, { merge });\n this.isLoaded = true;\n this.failedLoading = false;\n return items;\n }\n catch (error) {\n console.warn(\"[KubeObjectStore] loadAll failed\", this.api.apiBase, error);\n this.resetOnError(error);\n this.failedLoading = true;\n }\n finally {\n this.isLoading = false;\n }\n }\n async reloadAll(opts = {}) {\n const { force = false } = opts, loadingOptions = __rest(opts, [\"force\"]);\n if (this.isLoading || (this.isLoaded && !force)) {\n return;\n }\n return this.loadAll(loadingOptions);\n }\n mergeItems(partialItems, { merge = true, updateStore = true, sort = true, filter = true } = {}) {\n let items = partialItems;\n // update existing items\n if (merge) {\n const namespaces = partialItems.map(item => item.getNs());\n items = [\n ...this.items.filter(existingItem => !namespaces.includes(existingItem.getNs())),\n ...partialItems,\n ];\n }\n if (filter)\n items = this.filterItemsOnLoad(items);\n if (sort)\n items = this.sortItems(items);\n if (updateStore)\n this.items.replace(items);\n return items;\n }\n resetOnError(error) {\n if (error)\n this.reset();\n }\n async loadItem(params) {\n return this.api.get(params);\n }\n async load(params) {\n const { name, namespace } = params;\n let item = this.getByName(name, namespace);\n if (!item) {\n item = await this.loadItem(params);\n const newItems = this.sortItems([...this.items, item]);\n this.items.replace(newItems);\n }\n return item;\n }\n async loadFromPath(resourcePath) {\n const { namespace, name } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_5__[\"parseKubeApi\"])(resourcePath);\n return this.load({ name, namespace });\n }\n async createItem(params, data) {\n return this.api.create(params, data);\n }\n async create(params, data) {\n const newItem = await this.createItem(params, data);\n const items = this.sortItems([...this.items, newItem]);\n this.items.replace(items);\n return newItem;\n }\n postUpdate(rawItem) {\n const newItem = new this.api.objectConstructor(rawItem);\n const index = this.items.findIndex(item => item.getId() === newItem.getId());\n Object(_kube_api__WEBPACK_IMPORTED_MODULE_4__[\"ensureObjectSelfLink\"])(this.api, newItem);\n if (index < 0) {\n this.items.push(newItem);\n }\n else {\n this.items[index] = newItem;\n }\n return newItem;\n }\n async patch(item, patch) {\n return this.postUpdate(await this.api.patch({\n name: item.getName(), namespace: item.getNs(),\n }, patch, \"json\"));\n }\n async update(item, data) {\n return this.postUpdate(await this.api.update({\n name: item.getName(), namespace: item.getNs(),\n }, data));\n }\n async remove(item) {\n await this.api.delete({ name: item.getName(), namespace: item.getNs() });\n this.selectedItemsIds.delete(item.getId());\n }\n async removeSelectedItems() {\n return Promise.all(this.selectedItems.map(this.remove));\n }\n bindWatchEventsUpdater(delay = 1000) {\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"reaction\"])(() => this.eventsBuffer.length, this.updateFromEventsBuffer, {\n delay,\n });\n }\n subscribe({ onLoadFailure, abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_6___default.a() } = {}) {\n if (this.api.isNamespaced) {\n Promise.race([Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"rejectPromiseBy\"])(abortController.signal), Promise.all([this.contextReady, this.namespacesReady])])\n .then(() => {\n if (this.context.cluster.isGlobalWatchEnabled && this.loadedNamespaces.length === 0) {\n return this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n for (const namespace of this.loadedNamespaces) {\n this.watchNamespace(namespace, abortController, { onLoadFailure });\n }\n })\n .catch(_utils__WEBPACK_IMPORTED_MODULE_1__[\"noop\"]); // ignore DOMExceptions\n }\n else {\n this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n return () => abortController.abort();\n }\n watchNamespace(namespace, abortController, opts) {\n if (!this.api.getResourceVersion(namespace)) {\n return;\n }\n let timedRetry;\n const watch = () => this.api.watch({\n namespace,\n abortController,\n callback,\n });\n const { signal } = abortController;\n const callback = (data, error) => {\n if (!this.isLoaded || (error === null || error === void 0 ? void 0 : error.type) === \"aborted\")\n return;\n if (error instanceof Response) {\n if (error.status === 404 || error.status === 401) {\n // api has gone, or credentials are not permitted, let's not retry\n return;\n }\n // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n else if (error instanceof _kube_object__WEBPACK_IMPORTED_MODULE_2__[\"KubeStatus\"] && error.code === 410) {\n clearTimeout(timedRetry);\n // resourceVersion has gone, let's try to reload\n timedRetry = setTimeout(() => {\n (namespace\n ? this.loadAll(Object.assign({ namespaces: [namespace], reqInit: { signal } }, opts))\n : this.loadAll(Object.assign({ merge: false, reqInit: { signal } }, opts))).then(watch);\n }, 1000);\n }\n else if (error) { // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n if (data) {\n this.eventsBuffer.push(data);\n }\n };\n signal.addEventListener(\"abort\", () => clearTimeout(timedRetry));\n watch();\n }\n updateFromEventsBuffer() {\n const items = this.getItems();\n for (const { type, object } of this.eventsBuffer.clear()) {\n const index = items.findIndex(item => { var _a; return item.getId() === ((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.uid); });\n const item = items[index];\n switch (type) {\n case \"ADDED\":\n case \"MODIFIED\":\n const newItem = new this.api.objectConstructor(object);\n if (!item) {\n items.push(newItem);\n }\n else {\n items[index] = newItem;\n }\n break;\n case \"DELETED\":\n if (item) {\n items.splice(index, 1);\n }\n break;\n }\n }\n // update items\n this.items.replace(this.sortItems(items.slice(-this.bufferSize)));\n }\n}\nObject.defineProperty(KubeObjectStore, \"defaultContext\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].box()\n}); // TODO: support multiple cluster contexts\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"],\n __metadata(\"design:type\", Array)\n], KubeObjectStore.prototype, \"loadedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectStore.prototype, \"contextItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"reloadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array, Object]),\n __metadata(\"design:returntype\", Array)\n], KubeObjectStore.prototype, \"mergeItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"load\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadFromPath\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], KubeObjectStore.prototype, \"updateFromEventsBuffer\", null);\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-object.store.ts?");
|
|
39137
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeObjectStore\", function() { return KubeObjectStore; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _item_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../item.store */ \"./src/common/item.store.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_6__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\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 __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\nclass KubeObjectStore extends _item_store__WEBPACK_IMPORTED_MODULE_3__[\"ItemStore\"] {\n constructor(api) {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"bufferSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 50000\n });\n Object.defineProperty(this, \"loadedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // collect items from watch-api events to avoid UI blowing up with huge streams of data\n Object.defineProperty(this, \"eventsBuffer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].array([], { deep: false })\n });\n if (api)\n this.api = api;\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n this.bindWatchEventsUpdater();\n }\n get contextReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.context));\n }\n get namespacesReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.loadedNamespaces));\n }\n get context() {\n return KubeObjectStore.defaultContext.get();\n }\n get contextItems() {\n var _a, _b;\n const namespaces = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces) !== null && _b !== void 0 ? _b : [];\n return this.items.filter(item => {\n const itemNamespace = item.getNs();\n return !itemNamespace /* cluster-wide */ || namespaces.includes(itemNamespace);\n });\n }\n getTotalCount() {\n return this.contextItems.length;\n }\n get query() {\n const { limit } = this;\n if (!limit) {\n return {};\n }\n return { limit };\n }\n getAllByNs(namespace, strict = false) {\n const namespaces = [].concat(namespace);\n if (namespaces.length) {\n return this.items.filter(item => namespaces.includes(item.getNs()));\n }\n if (!strict) {\n return this.items;\n }\n return [];\n }\n getById(id) {\n return this.items.find(item => item.getId() === id);\n }\n getByName(name, namespace) {\n return this.items.find(item => {\n return item.getName() === name && (namespace ? item.getNs() === namespace : true);\n });\n }\n getByPath(path) {\n return this.items.find(item => item.selfLink === path);\n }\n getByLabel(labels) {\n if (Array.isArray(labels)) {\n return this.items.filter((item) => {\n const itemLabels = item.getLabels();\n return labels.every(label => itemLabels.includes(label));\n });\n }\n else {\n return this.items.filter((item) => {\n const itemLabels = item.metadata.labels || {};\n return Object.entries(labels)\n .every(([key, value]) => itemLabels[key] === value);\n });\n }\n }\n async loadItems({ namespaces, reqInit, onLoadFailure }) {\n var _a, _b;\n if (!((_a = this.context) === null || _a === void 0 ? void 0 : _a.cluster.isAllowedResource(this.api.kind))) {\n return [];\n }\n const isLoadingAll = ((_b = this.context.allNamespaces) === null || _b === void 0 ? void 0 : _b.length) > 1\n && this.context.cluster.accessibleNamespaces.length === 0\n && this.context.allNamespaces.every(ns => namespaces.includes(ns));\n if (!this.api.isNamespaced || isLoadingAll) {\n if (this.api.isNamespaced) {\n this.loadedNamespaces = [];\n }\n const res = this.api.list({ reqInit }, this.query);\n if (onLoadFailure) {\n try {\n return await res;\n }\n catch (error) {\n onLoadFailure((error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.toString()) || \"Unknown error\");\n // reset the store because we are loading all, so that nothing is displayed\n this.items.clear();\n this.selectedItemsIds.clear();\n return [];\n }\n }\n return res;\n }\n this.loadedNamespaces = namespaces;\n const results = await Promise.allSettled(namespaces.map(namespace => this.api.list({ namespace, reqInit }, this.query)));\n const res = [];\n for (const result of results) {\n switch (result.status) {\n case \"fulfilled\":\n res.push(...result.value);\n break;\n case \"rejected\":\n if (onLoadFailure) {\n onLoadFailure(result.reason.message || result.reason);\n }\n else {\n // if onLoadFailure is not provided then preserve old behaviour\n throw result.reason;\n }\n }\n }\n return res;\n }\n filterItemsOnLoad(items) {\n return items;\n }\n async loadAll({ namespaces = this.context.contextNamespaces, merge = true, reqInit, onLoadFailure } = {}) {\n await this.contextReady;\n this.isLoading = true;\n try {\n const items = await this.loadItems({ namespaces, reqInit, onLoadFailure });\n this.mergeItems(items, { merge });\n this.isLoaded = true;\n this.failedLoading = false;\n return items;\n }\n catch (error) {\n console.warn(\"[KubeObjectStore] loadAll failed\", this.api.apiBase, error);\n this.resetOnError(error);\n this.failedLoading = true;\n }\n finally {\n this.isLoading = false;\n }\n }\n async reloadAll(opts = {}) {\n const { force = false } = opts, loadingOptions = __rest(opts, [\"force\"]);\n if (this.isLoading || (this.isLoaded && !force)) {\n return;\n }\n return this.loadAll(loadingOptions);\n }\n mergeItems(partialItems, { merge = true, updateStore = true, sort = true, filter = true } = {}) {\n let items = partialItems;\n // update existing items\n if (merge) {\n const namespaces = partialItems.map(item => item.getNs());\n items = [\n ...this.items.filter(existingItem => !namespaces.includes(existingItem.getNs())),\n ...partialItems,\n ];\n }\n if (filter)\n items = this.filterItemsOnLoad(items);\n if (sort)\n items = this.sortItems(items);\n if (updateStore)\n this.items.replace(items);\n return items;\n }\n resetOnError(error) {\n if (error)\n this.reset();\n }\n async loadItem(params) {\n return this.api.get(params);\n }\n async load(params) {\n const { name, namespace } = params;\n let item = this.getByName(name, namespace);\n if (!item) {\n item = await this.loadItem(params);\n const newItems = this.sortItems([...this.items, item]);\n this.items.replace(newItems);\n }\n return item;\n }\n async loadFromPath(resourcePath) {\n const { namespace, name } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_5__[\"parseKubeApi\"])(resourcePath);\n return this.load({ name, namespace });\n }\n async createItem(params, data) {\n return this.api.create(params, data);\n }\n async create(params, data) {\n const newItem = await this.createItem(params, data);\n const items = this.sortItems([...this.items, newItem]);\n this.items.replace(items);\n return newItem;\n }\n postUpdate(rawItem) {\n const newItem = new this.api.objectConstructor(rawItem);\n const index = this.items.findIndex(item => item.getId() === newItem.getId());\n Object(_kube_api__WEBPACK_IMPORTED_MODULE_4__[\"ensureObjectSelfLink\"])(this.api, newItem);\n if (index < 0) {\n this.items.push(newItem);\n }\n else {\n this.items[index] = newItem;\n }\n return newItem;\n }\n async patch(item, patch) {\n return this.postUpdate(await this.api.patch({\n name: item.getName(), namespace: item.getNs(),\n }, patch, \"json\"));\n }\n async update(item, data) {\n return this.postUpdate(await this.api.update({\n name: item.getName(),\n namespace: item.getNs(),\n }, data));\n }\n async remove(item) {\n await this.api.delete({ name: item.getName(), namespace: item.getNs() });\n this.selectedItemsIds.delete(item.getId());\n }\n async removeSelectedItems() {\n return Promise.all(this.selectedItems.map(this.remove));\n }\n bindWatchEventsUpdater(delay = 1000) {\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"reaction\"])(() => this.eventsBuffer.length, this.updateFromEventsBuffer, {\n delay,\n });\n }\n subscribe({ onLoadFailure, abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_6___default.a() } = {}) {\n if (this.api.isNamespaced) {\n Promise.race([Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"rejectPromiseBy\"])(abortController.signal), Promise.all([this.contextReady, this.namespacesReady])])\n .then(() => {\n if (this.context.cluster.isGlobalWatchEnabled && this.loadedNamespaces.length === 0) {\n return this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n for (const namespace of this.loadedNamespaces) {\n this.watchNamespace(namespace, abortController, { onLoadFailure });\n }\n })\n .catch(_utils__WEBPACK_IMPORTED_MODULE_1__[\"noop\"]); // ignore DOMExceptions\n }\n else {\n this.watchNamespace(\"\", abortController, { onLoadFailure });\n }\n return () => abortController.abort();\n }\n watchNamespace(namespace, abortController, opts) {\n if (!this.api.getResourceVersion(namespace)) {\n return;\n }\n let timedRetry;\n const watch = () => this.api.watch({\n namespace,\n abortController,\n callback,\n });\n const { signal } = abortController;\n const callback = (data, error) => {\n if (!this.isLoaded || (error === null || error === void 0 ? void 0 : error.type) === \"aborted\")\n return;\n if (error instanceof Response) {\n if (error.status === 404 || error.status === 401) {\n // api has gone, or credentials are not permitted, let's not retry\n return;\n }\n // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n else if (error instanceof _kube_object__WEBPACK_IMPORTED_MODULE_2__[\"KubeStatus\"] && error.code === 410) {\n clearTimeout(timedRetry);\n // resourceVersion has gone, let's try to reload\n timedRetry = setTimeout(() => {\n (namespace\n ? this.loadAll(Object.assign({ namespaces: [namespace], reqInit: { signal } }, opts))\n : this.loadAll(Object.assign({ merge: false, reqInit: { signal } }, opts))).then(watch);\n }, 1000);\n }\n else if (error) { // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n if (data) {\n this.eventsBuffer.push(data);\n }\n };\n signal.addEventListener(\"abort\", () => clearTimeout(timedRetry));\n watch();\n }\n updateFromEventsBuffer() {\n const items = this.getItems();\n for (const { type, object } of this.eventsBuffer.clear()) {\n const index = items.findIndex(item => { var _a; return item.getId() === ((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.uid); });\n const item = items[index];\n switch (type) {\n case \"ADDED\":\n case \"MODIFIED\":\n const newItem = new this.api.objectConstructor(object);\n if (!item) {\n items.push(newItem);\n }\n else {\n items[index] = newItem;\n }\n break;\n case \"DELETED\":\n if (item) {\n items.splice(index, 1);\n }\n break;\n }\n }\n // update items\n this.items.replace(this.sortItems(items.slice(-this.bufferSize)));\n }\n}\nObject.defineProperty(KubeObjectStore, \"defaultContext\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].box()\n}); // TODO: support multiple cluster contexts\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"],\n __metadata(\"design:type\", Array)\n], KubeObjectStore.prototype, \"loadedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectStore.prototype, \"contextItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"reloadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array, Object]),\n __metadata(\"design:returntype\", Array)\n], KubeObjectStore.prototype, \"mergeItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"load\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadFromPath\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], KubeObjectStore.prototype, \"updateFromEventsBuffer\", null);\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-object.store.ts?");
|
|
39138
39138
|
|
|
39139
39139
|
/***/ }),
|
|
39140
39140
|
|
|
@@ -40814,7 +40814,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
40814
40814
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
40815
40815
|
|
|
40816
40816
|
"use strict";
|
|
40817
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cluster\", function() { return Cluster; });\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 mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _context_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./context-handler */ \"./src/main/context-handler.ts\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @kubernetes/client-node */ \"./node_modules/@kubernetes/client-node/dist/index.js\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _kubectl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kubectl */ \"./src/main/kubectl.ts\");\n/* harmony import */ var _kubeconfig_manager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./kubeconfig-manager */ \"./src/main/kubeconfig-manager.ts\");\n/* harmony import */ var _common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _common_rbac__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/rbac */ \"./src/common/rbac.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _cluster_detectors_version_detector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./cluster-detectors/version-detector */ \"./src/main/cluster-detectors/version-detector.ts\");\n/* harmony import */ var _cluster_detectors_detector_registry__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./cluster-detectors/detector-registry */ \"./src/main/cluster-detectors/detector-registry.ts\");\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! p-limit */ \"./node_modules/p-limit/index.js\");\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(p_limit__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/cluster-types */ \"./src/common/cluster-types.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../common/utils */ \"./src/common/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\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/**\n * Cluster\n *\n * @beta\n */\nclass Cluster {\n constructor(model) {\n /** Unique id for a cluster */\n Object.defineProperty(this, \"id\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeCtl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Context handler\n *\n * @internal\n */\n Object.defineProperty(this, \"contextHandler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeconfigManager\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"eventDisposers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object.defineProperty(this, \"activated\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"resourceAccessStatuses\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n /**\n * Kubeconfig context name\n *\n * @observable\n */\n Object.defineProperty(this, \"contextName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Path to kubeconfig\n *\n * @observable\n */\n Object.defineProperty(this, \"kubeConfigPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @deprecated\n */\n Object.defineProperty(this, \"workspace\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @deprecated\n */\n Object.defineProperty(this, \"workspaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Kubernetes API server URL\n *\n * @observable\n */\n Object.defineProperty(this, \"apiUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n }); // cluster server url\n /**\n * Is cluster online\n *\n * @observable\n */\n Object.defineProperty(this, \"online\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // describes if we can detect that cluster is online\n /**\n * Can user access cluster resources\n *\n * @observable\n */\n Object.defineProperty(this, \"accessible\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // if user is able to access cluster resources\n /**\n * Is cluster instance in usable state\n *\n * @observable\n */\n Object.defineProperty(this, \"ready\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // cluster is in usable state\n /**\n * Is cluster currently reconnecting\n *\n * @observable\n */\n Object.defineProperty(this, \"reconnecting\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Is cluster disconnected. False if user has selected to connect.\n *\n * @observable\n */\n Object.defineProperty(this, \"disconnected\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n /**\n * Does user have admin like access\n *\n * @observable\n */\n Object.defineProperty(this, \"isAdmin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Global watch-api accessibility , e.g. \"/api/v1/services?watch=1\"\n *\n * @observable\n */\n Object.defineProperty(this, \"isGlobalWatchEnabled\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Preferences\n *\n * @observable\n */\n Object.defineProperty(this, \"preferences\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n /**\n * Metadata\n *\n * @observable\n */\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n /**\n * List of allowed namespaces verified via K8S::SelfSubjectAccessReview api\n *\n * @observable\n */\n Object.defineProperty(this, \"allowedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * List of allowed resources\n *\n * @observable\n * @internal\n */\n Object.defineProperty(this, \"allowedResources\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * List of accessible namespaces provided by user in the Cluster Settings\n *\n * @observable\n */\n Object.defineProperty(this, \"accessibleNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * Labels for the catalog entity\n */\n Object.defineProperty(this, \"labels\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"makeObservable\"])(this);\n this.id = model.id;\n this.updateModel(model);\n const { config } = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFileSync\"])(this.kubeConfigPath);\n const validationError = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"validateKubeConfig\"])(config, this.contextName);\n if (validationError) {\n throw validationError;\n }\n this.apiUrl = config.getCluster(config.getContextObject(this.contextName).cluster).server;\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n // for the time being, until renderer gets its own cluster type\n this.contextHandler = new _context_handler__WEBPACK_IMPORTED_MODULE_3__[\"ContextHandler\"](this);\n this.kubeconfigManager = new _kubeconfig_manager__WEBPACK_IMPORTED_MODULE_6__[\"KubeconfigManager\"](this, this.contextHandler);\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(`[CLUSTER]: Cluster init success`, {\n id: this.id,\n context: this.contextName,\n apiUrl: this.apiUrl,\n });\n }\n }\n get whenReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"when\"])(() => this.ready);\n }\n /**\n * Is cluster available\n *\n * @computed\n */\n get available() {\n return this.accessible && !this.disconnected;\n }\n /**\n * Cluster name\n *\n * @computed\n */\n get name() {\n return this.preferences.clusterName || this.contextName;\n }\n /**\n * The detected kubernetes distribution\n */\n get distribution() {\n var _a;\n return ((_a = this.metadata[_common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterMetadataKey\"].DISTRIBUTION]) === null || _a === void 0 ? void 0 : _a.toString()) || \"unknown\";\n }\n /**\n * The detected kubernetes version\n */\n get version() {\n var _a;\n return ((_a = this.metadata[_common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterMetadataKey\"].VERSION]) === null || _a === void 0 ? void 0 : _a.toString()) || \"unknown\";\n }\n /**\n * Prometheus preferences\n *\n * @computed\n * @internal\n */\n get prometheusPreferences() {\n const { prometheus, prometheusProvider } = this.preferences;\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({ prometheus, prometheusProvider });\n }\n /**\n * defaultNamespace preference\n *\n * @computed\n * @internal\n */\n get defaultNamespace() {\n const { defaultNamespace } = this.preferences;\n return defaultNamespace;\n }\n /**\n * Update cluster data model\n *\n * @param model\n */\n updateModel(model) {\n // Note: do not assign ID as that should never be updated\n this.kubeConfigPath = model.kubeConfigPath;\n if (model.workspace) {\n this.workspace = model.workspace;\n }\n if (model.workspaces) {\n this.workspaces = model.workspaces;\n }\n if (model.contextName) {\n this.contextName = model.contextName;\n }\n if (model.preferences) {\n this.preferences = model.preferences;\n }\n if (model.metadata) {\n this.metadata = model.metadata;\n }\n if (model.accessibleNamespaces) {\n this.accessibleNamespaces = model.accessibleNamespaces;\n }\n if (model.labels) {\n this.labels = model.labels;\n }\n }\n /**\n * @internal\n */\n bindEvents() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: bind events`, this.getMeta());\n const refreshTimer = setInterval(() => !this.disconnected && this.refresh(), 30000); // every 30s\n const refreshMetadataTimer = setInterval(() => !this.disconnected && this.refreshMetadata(), 900000); // every 15 minutes\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n this.eventDisposers.push(Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.getState(), () => this.pushState()), Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.prometheusPreferences, (prefs) => this.contextHandler.setupPrometheus(prefs), { equals: mobx__WEBPACK_IMPORTED_MODULE_1__[\"comparer\"].structural }), () => {\n clearInterval(refreshTimer);\n clearInterval(refreshMetadataTimer);\n }, Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.defaultNamespace, () => this.recreateProxyKubeconfig()));\n }\n }\n /**\n * @internal\n */\n async recreateProxyKubeconfig() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(\"Recreate proxy kubeconfig\");\n try {\n this.kubeconfigManager.clear();\n }\n catch (_a) {\n // do nothing\n }\n this.getProxyKubeconfig();\n }\n /**\n * internal\n */\n unbindEvents() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: unbind events`, this.getMeta());\n this.eventDisposers.forEach(dispose => dispose());\n this.eventDisposers.length = 0;\n }\n /**\n * @param force force activation\n * @internal\n */\n async activate(force = false) {\n if (this.activated && !force) {\n return this.pushState();\n }\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: activate`, this.getMeta());\n if (!this.eventDisposers.length) {\n this.bindEvents();\n }\n if (this.disconnected || !this.accessible) {\n await this.reconnect();\n }\n this.broadcastConnectUpdate(\"Refreshing connection status ...\");\n await this.refreshConnectionStatus();\n if (this.accessible) {\n this.broadcastConnectUpdate(\"Refreshing cluster accessibility ...\");\n await this.refreshAccessibility();\n // download kubectl in background, so it's not blocking dashboard\n this.ensureKubectl()\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].warn(`[CLUSTER]: failed to download kubectl for clusterId=${this.id}`, error));\n this.broadcastConnectUpdate(\"Connected, waiting for view to load ...\");\n }\n this.activated = true;\n this.pushState();\n }\n /**\n * @internal\n */\n async ensureKubectl() {\n var _a;\n (_a = this.kubeCtl) !== null && _a !== void 0 ? _a : (this.kubeCtl = new _kubectl__WEBPACK_IMPORTED_MODULE_5__[\"Kubectl\"](this.version));\n await this.kubeCtl.ensureKubectl();\n return this.kubeCtl;\n }\n /**\n * @internal\n */\n async reconnect() {\n var _a, _b;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: reconnect`, this.getMeta());\n (_a = this.contextHandler) === null || _a === void 0 ? void 0 : _a.stopServer();\n await ((_b = this.contextHandler) === null || _b === void 0 ? void 0 : _b.ensureServer());\n this.disconnected = false;\n }\n /**\n * @internal\n */\n disconnect() {\n var _a;\n this.unbindEvents();\n (_a = this.contextHandler) === null || _a === void 0 ? void 0 : _a.stopServer();\n this.disconnected = true;\n this.online = false;\n this.accessible = false;\n this.ready = false;\n this.activated = false;\n this.allowedNamespaces = [];\n this.resourceAccessStatuses.clear();\n this.pushState();\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: disconnect`, this.getMeta());\n }\n /**\n * @internal\n * @param opts refresh options\n */\n async refresh(opts = {}) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: refresh`, this.getMeta());\n await this.refreshConnectionStatus();\n if (this.accessible) {\n await this.refreshAccessibility();\n if (opts.refreshMetadata) {\n this.refreshMetadata();\n }\n }\n this.pushState();\n }\n /**\n * @internal\n */\n async refreshMetadata() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: refreshMetadata`, this.getMeta());\n const metadata = await _cluster_detectors_detector_registry__WEBPACK_IMPORTED_MODULE_11__[\"DetectorRegistry\"].getInstance().detectForCluster(this);\n const existingMetadata = this.metadata;\n this.metadata = Object.assign(existingMetadata, metadata);\n }\n /**\n * @internal\n */\n async refreshAccessibility() {\n this.isAdmin = await this.isClusterAdmin();\n this.isGlobalWatchEnabled = await this.canUseWatchApi({ resource: \"*\" });\n this.allowedNamespaces = await this.getAllowedNamespaces();\n this.allowedResources = await this.getAllowedResources();\n this.ready = true;\n }\n /**\n * @internal\n */\n async refreshConnectionStatus() {\n const connectionStatus = await this.getConnectionStatus();\n this.online = connectionStatus > _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n this.accessible = connectionStatus == _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessGranted;\n }\n async getKubeconfig() {\n const { config } = await Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFile\"])(this.kubeConfigPath);\n return config;\n }\n /**\n * @internal\n */\n async getProxyKubeconfig() {\n const proxyKCPath = await this.getProxyKubeconfigPath();\n const { config } = await Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFile\"])(proxyKCPath);\n return config;\n }\n /**\n * @internal\n */\n async getProxyKubeconfigPath() {\n return this.kubeconfigManager.getPath();\n }\n async getConnectionStatus() {\n try {\n const versionDetector = new _cluster_detectors_version_detector__WEBPACK_IMPORTED_MODULE_10__[\"VersionDetector\"](this);\n const versionData = await versionDetector.detect();\n this.metadata.version = versionData.value;\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessGranted;\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`[CLUSTER]: Failed to connect to \"${this.contextName}\": ${error}`);\n if (error.statusCode) {\n if (error.statusCode >= 400 && error.statusCode < 500) {\n this.broadcastConnectUpdate(\"Invalid credentials\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessDenied;\n }\n this.broadcastConnectUpdate(error.error || error.message, true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n if (error.failed === true) {\n if (error.timedOut === true) {\n this.broadcastConnectUpdate(\"Connection timed out\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n this.broadcastConnectUpdate(\"Failed to fetch credentials\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessDenied;\n }\n this.broadcastConnectUpdate(error.message, true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n }\n /**\n * @internal\n * @param resourceAttributes resource attributes\n */\n async canI(resourceAttributes) {\n const authApi = (await this.getProxyKubeconfig()).makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"AuthorizationV1Api\"]);\n try {\n const accessReview = await authApi.createSelfSubjectAccessReview({\n apiVersion: \"authorization.k8s.io/v1\",\n kind: \"SelfSubjectAccessReview\",\n spec: { resourceAttributes },\n });\n return accessReview.body.status.allowed;\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`failed to request selfSubjectAccessReview: ${error}`);\n return false;\n }\n }\n /**\n * @internal\n */\n async isClusterAdmin() {\n return this.canI({\n namespace: \"kube-system\",\n resource: \"*\",\n verb: \"create\",\n });\n }\n /**\n * @internal\n */\n async canUseWatchApi(customizeResource = {}) {\n return this.canI(Object.assign({ verb: \"watch\", resource: \"*\" }, customizeResource));\n }\n toJSON() {\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({\n id: this.id,\n contextName: this.contextName,\n kubeConfigPath: this.kubeConfigPath,\n workspace: this.workspace,\n workspaces: this.workspaces,\n preferences: this.preferences,\n metadata: this.metadata,\n accessibleNamespaces: this.accessibleNamespaces,\n labels: this.labels,\n });\n }\n /**\n * Serializable cluster-state used for sync btw main <-> renderer\n */\n getState() {\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({\n apiUrl: this.apiUrl,\n online: this.online,\n ready: this.ready,\n disconnected: this.disconnected,\n accessible: this.accessible,\n isAdmin: this.isAdmin,\n allowedNamespaces: this.allowedNamespaces,\n allowedResources: this.allowedResources,\n isGlobalWatchEnabled: this.isGlobalWatchEnabled,\n });\n }\n /**\n * @internal\n * @param state cluster state\n */\n setState(state) {\n Object.assign(this, state);\n }\n /**\n * @internal\n * @param state cluster state\n */\n pushState(state = this.getState()) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].silly(`[CLUSTER]: push-state`, state);\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(\"cluster:state\", this.id, state);\n }\n // get cluster system meta, e.g. use in \"logger\"\n getMeta() {\n return {\n id: this.id,\n name: this.contextName,\n ready: this.ready,\n online: this.online,\n accessible: this.accessible,\n disconnected: this.disconnected,\n };\n }\n /**\n * broadcast an authentication update concerning this cluster\n * @internal\n */\n broadcastConnectUpdate(message, isError = false) {\n const update = { message, isError };\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(`[CLUSTER]: broadcasting connection update`, Object.assign(Object.assign({}, update), { meta: this.getMeta() }));\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(`cluster:${this.id}:connection-update`, update);\n }\n async getAllowedNamespaces() {\n if (this.accessibleNamespaces.length) {\n return this.accessibleNamespaces;\n }\n const api = (await this.getProxyKubeconfig()).makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"CoreV1Api\"]);\n try {\n const { body: { items } } = await api.listNamespace();\n const namespaces = items.map(ns => ns.metadata.name);\n return namespaces;\n }\n catch (error) {\n const ctx = (await this.getProxyKubeconfig()).getContextObject(this.contextName);\n const namespaceList = [ctx.namespace].filter(Boolean);\n if (namespaceList.length === 0 && error instanceof _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"HttpError\"] && error.statusCode === 403) {\n const { response } = error;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(\"[CLUSTER]: listing namespaces is forbidden, broadcasting\", { clusterId: this.id, error: response.body });\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"ClusterListNamespaceForbiddenChannel\"], this.id);\n }\n return namespaceList;\n }\n }\n async getAllowedResources() {\n try {\n if (!this.allowedNamespaces.length) {\n return [];\n }\n const resources = _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"].filter((resource) => this.resourceAccessStatuses.get(resource) === undefined);\n const apiLimit = p_limit__WEBPACK_IMPORTED_MODULE_12___default()(5); // 5 concurrent api requests\n const requests = [];\n for (const apiResource of resources) {\n requests.push(apiLimit(async () => {\n for (const namespace of this.allowedNamespaces.slice(0, 10)) {\n if (!this.resourceAccessStatuses.get(apiResource)) {\n const result = await this.canI({\n resource: apiResource.apiName,\n group: apiResource.group,\n verb: \"list\",\n namespace,\n });\n this.resourceAccessStatuses.set(apiResource, result);\n }\n }\n }));\n }\n await Promise.all(requests);\n return _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"]\n .filter((resource) => this.resourceAccessStatuses.get(resource))\n .map(apiResource => apiResource.apiName);\n }\n catch (error) {\n return [];\n }\n }\n isAllowedResource(kind) {\n if (kind in _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResourceRecord\"]) {\n return this.allowedResources.includes(kind);\n }\n const apiResource = _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"].find(resource => resource.kind === kind);\n if (apiResource) {\n return this.allowedResources.includes(apiResource.apiName);\n }\n return true; // allowed by default for other resources\n }\n isMetricHidden(resource) {\n var _a;\n return Boolean((_a = this.preferences.hiddenMetrics) === null || _a === void 0 ? void 0 : _a.includes(resource));\n }\n get nodeShellImage() {\n var _a;\n return ((_a = this.preferences) === null || _a === void 0 ? void 0 : _a.nodeShellImage) || _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"initialNodeShellImage\"];\n }\n get imagePullSecret() {\n var _a;\n return (_a = this.preferences) === null || _a === void 0 ? void 0 : _a.imagePullSecret;\n }\n isInLocalKubeconfig() {\n return this.kubeConfigPath.startsWith(Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"storedKubeConfigFolder\"])());\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"contextName\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"kubeConfigPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"workspace\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"workspaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"apiUrl\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"online\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"accessible\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"ready\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"reconnecting\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"disconnected\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"isAdmin\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"isGlobalWatchEnabled\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"preferences\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"metadata\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"allowedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"allowedResources\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"accessibleNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"labels\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"available\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"name\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"distribution\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"version\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"prometheusPreferences\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"defaultNamespace\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"updateModel\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"activate\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"reconnect\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"disconnect\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refresh\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refreshMetadata\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refreshConnectionStatus\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"setState\", null);\n\n\n//# sourceURL=webpack:///./src/main/cluster.ts?");
|
|
40817
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Cluster\", function() { return Cluster; });\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 mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _context_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./context-handler */ \"./src/main/context-handler.ts\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @kubernetes/client-node */ \"./node_modules/@kubernetes/client-node/dist/index.js\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _kubectl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kubectl */ \"./src/main/kubectl.ts\");\n/* harmony import */ var _kubeconfig_manager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./kubeconfig-manager */ \"./src/main/kubeconfig-manager.ts\");\n/* harmony import */ var _common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _common_rbac__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/rbac */ \"./src/common/rbac.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _cluster_detectors_version_detector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./cluster-detectors/version-detector */ \"./src/main/cluster-detectors/version-detector.ts\");\n/* harmony import */ var _cluster_detectors_detector_registry__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./cluster-detectors/detector-registry */ \"./src/main/cluster-detectors/detector-registry.ts\");\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! p-limit */ \"./node_modules/p-limit/index.js\");\n/* harmony import */ var p_limit__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(p_limit__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/cluster-types */ \"./src/common/cluster-types.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../common/utils */ \"./src/common/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\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/**\n * Cluster\n *\n * @beta\n */\nclass Cluster {\n constructor(model) {\n /** Unique id for a cluster */\n Object.defineProperty(this, \"id\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeCtl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Context handler\n *\n * @internal\n */\n Object.defineProperty(this, \"contextHandler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"proxyKubeconfigManager\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"eventsDisposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"disposer\"])()\n });\n Object.defineProperty(this, \"activated\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"resourceAccessStatuses\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n /**\n * Kubeconfig context name\n *\n * @observable\n */\n Object.defineProperty(this, \"contextName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Path to kubeconfig\n *\n * @observable\n */\n Object.defineProperty(this, \"kubeConfigPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @deprecated\n */\n Object.defineProperty(this, \"workspace\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @deprecated\n */\n Object.defineProperty(this, \"workspaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Kubernetes API server URL\n *\n * @observable\n */\n Object.defineProperty(this, \"apiUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n }); // cluster server url\n /**\n * Is cluster online\n *\n * @observable\n */\n Object.defineProperty(this, \"online\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // describes if we can detect that cluster is online\n /**\n * Can user access cluster resources\n *\n * @observable\n */\n Object.defineProperty(this, \"accessible\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // if user is able to access cluster resources\n /**\n * Is cluster instance in usable state\n *\n * @observable\n */\n Object.defineProperty(this, \"ready\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // cluster is in usable state\n /**\n * Is cluster currently reconnecting\n *\n * @observable\n */\n Object.defineProperty(this, \"reconnecting\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Is cluster disconnected. False if user has selected to connect.\n *\n * @observable\n */\n Object.defineProperty(this, \"disconnected\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n /**\n * Does user have admin like access\n *\n * @observable\n */\n Object.defineProperty(this, \"isAdmin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Global watch-api accessibility , e.g. \"/api/v1/services?watch=1\"\n *\n * @observable\n */\n Object.defineProperty(this, \"isGlobalWatchEnabled\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n /**\n * Preferences\n *\n * @observable\n */\n Object.defineProperty(this, \"preferences\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n /**\n * Metadata\n *\n * @observable\n */\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n /**\n * List of allowed namespaces verified via K8S::SelfSubjectAccessReview api\n *\n * @observable\n */\n Object.defineProperty(this, \"allowedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * List of allowed resources\n *\n * @observable\n * @internal\n */\n Object.defineProperty(this, \"allowedResources\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * List of accessible namespaces provided by user in the Cluster Settings\n *\n * @observable\n */\n Object.defineProperty(this, \"accessibleNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n /**\n * Labels for the catalog entity\n */\n Object.defineProperty(this, \"labels\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {}\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"makeObservable\"])(this);\n this.id = model.id;\n this.updateModel(model);\n const { config } = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFileSync\"])(this.kubeConfigPath);\n const validationError = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"validateKubeConfig\"])(config, this.contextName);\n if (validationError) {\n throw validationError;\n }\n this.apiUrl = config.getCluster(config.getContextObject(this.contextName).cluster).server;\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n // for the time being, until renderer gets its own cluster type\n this.contextHandler = new _context_handler__WEBPACK_IMPORTED_MODULE_3__[\"ContextHandler\"](this);\n this.proxyKubeconfigManager = new _kubeconfig_manager__WEBPACK_IMPORTED_MODULE_6__[\"KubeconfigManager\"](this, this.contextHandler);\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(`[CLUSTER]: Cluster init success`, {\n id: this.id,\n context: this.contextName,\n apiUrl: this.apiUrl,\n });\n }\n }\n get whenReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"when\"])(() => this.ready);\n }\n /**\n * Is cluster available\n *\n * @computed\n */\n get available() {\n return this.accessible && !this.disconnected;\n }\n /**\n * Cluster name\n *\n * @computed\n */\n get name() {\n return this.preferences.clusterName || this.contextName;\n }\n /**\n * The detected kubernetes distribution\n */\n get distribution() {\n var _a;\n return ((_a = this.metadata[_common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterMetadataKey\"].DISTRIBUTION]) === null || _a === void 0 ? void 0 : _a.toString()) || \"unknown\";\n }\n /**\n * The detected kubernetes version\n */\n get version() {\n var _a;\n return ((_a = this.metadata[_common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterMetadataKey\"].VERSION]) === null || _a === void 0 ? void 0 : _a.toString()) || \"unknown\";\n }\n /**\n * Prometheus preferences\n *\n * @computed\n * @internal\n */\n get prometheusPreferences() {\n const { prometheus, prometheusProvider } = this.preferences;\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({ prometheus, prometheusProvider });\n }\n /**\n * defaultNamespace preference\n *\n * @computed\n * @internal\n */\n get defaultNamespace() {\n return this.preferences.defaultNamespace;\n }\n /**\n * Update cluster data model\n *\n * @param model\n */\n updateModel(model) {\n // Note: do not assign ID as that should never be updated\n this.kubeConfigPath = model.kubeConfigPath;\n if (model.workspace) {\n this.workspace = model.workspace;\n }\n if (model.workspaces) {\n this.workspaces = model.workspaces;\n }\n if (model.contextName) {\n this.contextName = model.contextName;\n }\n if (model.preferences) {\n this.preferences = model.preferences;\n }\n if (model.metadata) {\n this.metadata = model.metadata;\n }\n if (model.accessibleNamespaces) {\n this.accessibleNamespaces = model.accessibleNamespaces;\n }\n if (model.labels) {\n this.labels = model.labels;\n }\n }\n /**\n * @internal\n */\n bindEvents() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: bind events`, this.getMeta());\n const refreshTimer = setInterval(() => !this.disconnected && this.refresh(), 30000); // every 30s\n const refreshMetadataTimer = setInterval(() => !this.disconnected && this.refreshMetadata(), 900000); // every 15 minutes\n this.eventsDisposer.push(Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.getState(), state => this.pushState(state)), Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.prometheusPreferences, prefs => this.contextHandler.setupPrometheus(prefs), { equals: mobx__WEBPACK_IMPORTED_MODULE_1__[\"comparer\"].structural }), () => clearInterval(refreshTimer), () => clearInterval(refreshMetadataTimer), Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.defaultNamespace, () => this.recreateProxyKubeconfig()));\n }\n /**\n * @internal\n */\n async recreateProxyKubeconfig() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(\"[CLUSTER]: Recreating proxy kubeconfig\");\n try {\n await this.proxyKubeconfigManager.clear();\n await this.getProxyKubeconfig();\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`[CLUSTER]: failed to recreate proxy kubeconfig`, error);\n }\n }\n /**\n * @param force force activation\n * @internal\n */\n async activate(force = false) {\n if (this.activated && !force) {\n return this.pushState();\n }\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: activate`, this.getMeta());\n if (!this.eventsDisposer.length) {\n this.bindEvents();\n }\n if (this.disconnected || !this.accessible) {\n await this.reconnect();\n }\n this.broadcastConnectUpdate(\"Refreshing connection status ...\");\n await this.refreshConnectionStatus();\n if (this.accessible) {\n this.broadcastConnectUpdate(\"Refreshing cluster accessibility ...\");\n await this.refreshAccessibility();\n // download kubectl in background, so it's not blocking dashboard\n this.ensureKubectl()\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].warn(`[CLUSTER]: failed to download kubectl for clusterId=${this.id}`, error));\n this.broadcastConnectUpdate(\"Connected, waiting for view to load ...\");\n }\n this.activated = true;\n this.pushState();\n }\n /**\n * @internal\n */\n async ensureKubectl() {\n var _a;\n (_a = this.kubeCtl) !== null && _a !== void 0 ? _a : (this.kubeCtl = new _kubectl__WEBPACK_IMPORTED_MODULE_5__[\"Kubectl\"](this.version));\n await this.kubeCtl.ensureKubectl();\n return this.kubeCtl;\n }\n /**\n * @internal\n */\n async reconnect() {\n var _a, _b;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: reconnect`, this.getMeta());\n (_a = this.contextHandler) === null || _a === void 0 ? void 0 : _a.stopServer();\n await ((_b = this.contextHandler) === null || _b === void 0 ? void 0 : _b.ensureServer());\n this.disconnected = false;\n }\n /**\n * @internal\n */\n disconnect() {\n var _a;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: disconnecting`, { id: this.id });\n this.eventsDisposer();\n (_a = this.contextHandler) === null || _a === void 0 ? void 0 : _a.stopServer();\n this.disconnected = true;\n this.online = false;\n this.accessible = false;\n this.ready = false;\n this.activated = false;\n this.allowedNamespaces = [];\n this.resourceAccessStatuses.clear();\n this.pushState();\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: disconnected`, { id: this.id });\n }\n /**\n * @internal\n * @param opts refresh options\n */\n async refresh(opts = {}) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: refresh`, this.getMeta());\n await this.refreshConnectionStatus();\n if (this.accessible) {\n await this.refreshAccessibility();\n if (opts.refreshMetadata) {\n this.refreshMetadata();\n }\n }\n this.pushState();\n }\n /**\n * @internal\n */\n async refreshMetadata() {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(`[CLUSTER]: refreshMetadata`, this.getMeta());\n const metadata = await _cluster_detectors_detector_registry__WEBPACK_IMPORTED_MODULE_11__[\"DetectorRegistry\"].getInstance().detectForCluster(this);\n const existingMetadata = this.metadata;\n this.metadata = Object.assign(existingMetadata, metadata);\n }\n /**\n * @internal\n */\n async refreshAccessibility() {\n this.isAdmin = await this.isClusterAdmin();\n this.isGlobalWatchEnabled = await this.canUseWatchApi({ resource: \"*\" });\n this.allowedNamespaces = await this.getAllowedNamespaces();\n this.allowedResources = await this.getAllowedResources();\n this.ready = true;\n }\n /**\n * @internal\n */\n async refreshConnectionStatus() {\n const connectionStatus = await this.getConnectionStatus();\n this.online = connectionStatus > _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n this.accessible = connectionStatus == _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessGranted;\n }\n async getKubeconfig() {\n const { config } = await Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFile\"])(this.kubeConfigPath);\n return config;\n }\n /**\n * @internal\n */\n async getProxyKubeconfig() {\n const proxyKCPath = await this.getProxyKubeconfigPath();\n const { config } = await Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_7__[\"loadConfigFromFile\"])(proxyKCPath);\n return config;\n }\n /**\n * @internal\n */\n async getProxyKubeconfigPath() {\n return this.proxyKubeconfigManager.getPath();\n }\n async getConnectionStatus() {\n try {\n const versionDetector = new _cluster_detectors_version_detector__WEBPACK_IMPORTED_MODULE_10__[\"VersionDetector\"](this);\n const versionData = await versionDetector.detect();\n this.metadata.version = versionData.value;\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessGranted;\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`[CLUSTER]: Failed to connect to \"${this.contextName}\": ${error}`);\n if (error.statusCode) {\n if (error.statusCode >= 400 && error.statusCode < 500) {\n this.broadcastConnectUpdate(\"Invalid credentials\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessDenied;\n }\n this.broadcastConnectUpdate(error.error || error.message, true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n if (error.failed === true) {\n if (error.timedOut === true) {\n this.broadcastConnectUpdate(\"Connection timed out\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n this.broadcastConnectUpdate(\"Failed to fetch credentials\", true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].AccessDenied;\n }\n this.broadcastConnectUpdate(error.message, true);\n return _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"ClusterStatus\"].Offline;\n }\n }\n /**\n * @internal\n * @param resourceAttributes resource attributes\n */\n async canI(resourceAttributes) {\n const authApi = (await this.getProxyKubeconfig()).makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"AuthorizationV1Api\"]);\n try {\n const accessReview = await authApi.createSelfSubjectAccessReview({\n apiVersion: \"authorization.k8s.io/v1\",\n kind: \"SelfSubjectAccessReview\",\n spec: { resourceAttributes },\n });\n return accessReview.body.status.allowed;\n }\n catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].error(`failed to request selfSubjectAccessReview: ${error}`);\n return false;\n }\n }\n /**\n * @internal\n */\n async isClusterAdmin() {\n return this.canI({\n namespace: \"kube-system\",\n resource: \"*\",\n verb: \"create\",\n });\n }\n /**\n * @internal\n */\n async canUseWatchApi(customizeResource = {}) {\n return this.canI(Object.assign({ verb: \"watch\", resource: \"*\" }, customizeResource));\n }\n toJSON() {\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({\n id: this.id,\n contextName: this.contextName,\n kubeConfigPath: this.kubeConfigPath,\n workspace: this.workspace,\n workspaces: this.workspaces,\n preferences: this.preferences,\n metadata: this.metadata,\n accessibleNamespaces: this.accessibleNamespaces,\n labels: this.labels,\n });\n }\n /**\n * Serializable cluster-state used for sync btw main <-> renderer\n */\n getState() {\n return Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"toJS\"])({\n apiUrl: this.apiUrl,\n online: this.online,\n ready: this.ready,\n disconnected: this.disconnected,\n accessible: this.accessible,\n isAdmin: this.isAdmin,\n allowedNamespaces: this.allowedNamespaces,\n allowedResources: this.allowedResources,\n isGlobalWatchEnabled: this.isGlobalWatchEnabled,\n });\n }\n /**\n * @internal\n * @param state cluster state\n */\n setState(state) {\n Object.assign(this, state);\n }\n /**\n * @internal\n * @param state cluster state\n */\n pushState(state = this.getState()) {\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].silly(`[CLUSTER]: push-state`, state);\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(\"cluster:state\", this.id, state);\n }\n // get cluster system meta, e.g. use in \"logger\"\n getMeta() {\n return {\n id: this.id,\n name: this.contextName,\n ready: this.ready,\n online: this.online,\n accessible: this.accessible,\n disconnected: this.disconnected,\n };\n }\n /**\n * broadcast an authentication update concerning this cluster\n * @internal\n */\n broadcastConnectUpdate(message, isError = false) {\n const update = { message, isError };\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(`[CLUSTER]: broadcasting connection update`, Object.assign(Object.assign({}, update), { meta: this.getMeta() }));\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(`cluster:${this.id}:connection-update`, update);\n }\n async getAllowedNamespaces() {\n if (this.accessibleNamespaces.length) {\n return this.accessibleNamespaces;\n }\n const api = (await this.getProxyKubeconfig()).makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"CoreV1Api\"]);\n try {\n const { body: { items } } = await api.listNamespace();\n const namespaces = items.map(ns => ns.metadata.name);\n return namespaces;\n }\n catch (error) {\n const ctx = (await this.getProxyKubeconfig()).getContextObject(this.contextName);\n const namespaceList = [ctx.namespace].filter(Boolean);\n if (namespaceList.length === 0 && error instanceof _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_4__[\"HttpError\"] && error.statusCode === 403) {\n const { response } = error;\n _logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].info(\"[CLUSTER]: listing namespaces is forbidden, broadcasting\", { clusterId: this.id, error: response.body });\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"broadcastMessage\"])(_common_ipc__WEBPACK_IMPORTED_MODULE_2__[\"ClusterListNamespaceForbiddenChannel\"], this.id);\n }\n return namespaceList;\n }\n }\n async getAllowedResources() {\n try {\n if (!this.allowedNamespaces.length) {\n return [];\n }\n const resources = _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"].filter((resource) => this.resourceAccessStatuses.get(resource) === undefined);\n const apiLimit = p_limit__WEBPACK_IMPORTED_MODULE_12___default()(5); // 5 concurrent api requests\n const requests = [];\n for (const apiResource of resources) {\n requests.push(apiLimit(async () => {\n for (const namespace of this.allowedNamespaces.slice(0, 10)) {\n if (!this.resourceAccessStatuses.get(apiResource)) {\n const result = await this.canI({\n resource: apiResource.apiName,\n group: apiResource.group,\n verb: \"list\",\n namespace,\n });\n this.resourceAccessStatuses.set(apiResource, result);\n }\n }\n }));\n }\n await Promise.all(requests);\n return _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"]\n .filter((resource) => this.resourceAccessStatuses.get(resource))\n .map(apiResource => apiResource.apiName);\n }\n catch (error) {\n return [];\n }\n }\n isAllowedResource(kind) {\n if (kind in _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResourceRecord\"]) {\n return this.allowedResources.includes(kind);\n }\n const apiResource = _common_rbac__WEBPACK_IMPORTED_MODULE_8__[\"apiResources\"].find(resource => resource.kind === kind);\n if (apiResource) {\n return this.allowedResources.includes(apiResource.apiName);\n }\n return true; // allowed by default for other resources\n }\n isMetricHidden(resource) {\n var _a;\n return Boolean((_a = this.preferences.hiddenMetrics) === null || _a === void 0 ? void 0 : _a.includes(resource));\n }\n get nodeShellImage() {\n var _a;\n return ((_a = this.preferences) === null || _a === void 0 ? void 0 : _a.nodeShellImage) || _common_cluster_types__WEBPACK_IMPORTED_MODULE_13__[\"initialNodeShellImage\"];\n }\n get imagePullSecret() {\n var _a;\n return (_a = this.preferences) === null || _a === void 0 ? void 0 : _a.imagePullSecret;\n }\n isInLocalKubeconfig() {\n return this.kubeConfigPath.startsWith(Object(_common_utils__WEBPACK_IMPORTED_MODULE_14__[\"storedKubeConfigFolder\"])());\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"contextName\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"kubeConfigPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"workspace\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"workspaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", String)\n], Cluster.prototype, \"apiUrl\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"online\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"accessible\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"ready\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"reconnecting\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"disconnected\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"isAdmin\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"isGlobalWatchEnabled\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"preferences\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"metadata\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"allowedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"allowedResources\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Array)\n], Cluster.prototype, \"accessibleNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], Cluster.prototype, \"labels\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"available\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"name\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"distribution\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"version\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"prometheusPreferences\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], Cluster.prototype, \"defaultNamespace\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"updateModel\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"activate\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"reconnect\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"disconnect\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refresh\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refreshMetadata\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Promise)\n], Cluster.prototype, \"refreshConnectionStatus\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Cluster.prototype, \"setState\", null);\n\n\n//# sourceURL=webpack:///./src/main/cluster.ts?");
|
|
40818
40818
|
|
|
40819
40819
|
/***/ }),
|
|
40820
40820
|
|
|
@@ -40826,7 +40826,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
40826
40826
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
40827
40827
|
|
|
40828
40828
|
"use strict";
|
|
40829
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ContextHandler\", function() { return ContextHandler; });\n/* harmony import */ var _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prometheus/provider-registry */ \"./src/main/prometheus/provider-registry.ts\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! url */ \"url\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @kubernetes/client-node */ \"./node_modules/@kubernetes/client-node/dist/index.js\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _kube_auth_proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./kube-auth-proxy */ \"./src/main/kube-auth-proxy.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\nclass ContextHandler {\n constructor(cluster) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"clusterUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeAuthProxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiTarget\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"prometheusProvider\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"
|
|
40829
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ContextHandler\", function() { return ContextHandler; });\n/* harmony import */ var _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prometheus/provider-registry */ \"./src/main/prometheus/provider-registry.ts\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! url */ \"url\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @kubernetes/client-node */ \"./node_modules/@kubernetes/client-node/dist/index.js\");\n/* harmony import */ var _kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _kube_auth_proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./kube-auth-proxy */ \"./src/main/kube-auth-proxy.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\nclass ContextHandler {\n constructor(cluster) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"clusterUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubeAuthProxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiTarget\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"prometheusProvider\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"prometheus\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.clusterUrl = url__WEBPACK_IMPORTED_MODULE_1___default.a.parse(cluster.apiUrl);\n this.setupPrometheus(cluster.preferences);\n }\n setupPrometheus(preferences = {}) {\n var _a;\n this.prometheusProvider = (_a = preferences.prometheusProvider) === null || _a === void 0 ? void 0 : _a.type;\n this.prometheus = preferences.prometheus || null;\n }\n async getPrometheusDetails() {\n const service = await this.getPrometheusService();\n const prometheusPath = this.ensurePrometheusPath(service);\n const provider = this.ensurePrometheusProvider(service);\n return { prometheusPath, provider };\n }\n ensurePrometheusPath({ service, namespace, port }) {\n return `${namespace}/services/${service}:${port}`;\n }\n ensurePrometheusProvider(service) {\n if (!this.prometheusProvider) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[CONTEXT-HANDLER]: using ${service.id} as prometheus provider for clusterId=${this.cluster.id}`);\n this.prometheusProvider = service.id;\n }\n return _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__[\"PrometheusProviderRegistry\"].getInstance().getByKind(this.prometheusProvider);\n }\n listPotentialProviders() {\n const registry = _prometheus_provider_registry__WEBPACK_IMPORTED_MODULE_0__[\"PrometheusProviderRegistry\"].getInstance();\n const provider = this.prometheusProvider && registry.getByKind(this.prometheusProvider);\n if (provider) {\n return [provider];\n }\n return Array.from(registry.providers.values());\n }\n async getPrometheusService() {\n if (this.prometheus !== null && this.prometheusProvider !== null) {\n return {\n id: this.prometheusProvider,\n namespace: this.prometheus.namespace,\n service: this.prometheus.service,\n port: this.prometheus.port,\n };\n }\n const providers = this.listPotentialProviders();\n const proxyConfig = await this.cluster.getProxyKubeconfig();\n const apiClient = proxyConfig.makeApiClient(_kubernetes_client_node__WEBPACK_IMPORTED_MODULE_2__[\"CoreV1Api\"]);\n const potentialServices = await Promise.allSettled(providers.map(provider => provider.getPrometheusService(apiClient)));\n const errors = [];\n for (const res of potentialServices) {\n switch (res.status) {\n case \"rejected\":\n if (res.reason) {\n errors.push(String(res.reason));\n }\n break;\n case \"fulfilled\":\n if (res.value) {\n return res.value;\n }\n }\n }\n throw Object.assign(new Error(\"No Prometheus service found\"), { cause: errors });\n }\n async resolveAuthProxyUrl() {\n await this.ensureServer();\n const path = this.clusterUrl.path !== \"/\" ? this.clusterUrl.path : \"\";\n return `http://127.0.0.1:${this.kubeAuthProxy.port}${this.kubeAuthProxy.apiPrefix}${path}`;\n }\n async getApiTarget(isLongRunningRequest = false) {\n var _a;\n const timeout = isLongRunningRequest ? 4 * 60 * 60000 : 30000; // 4 hours for long running request, 30 seconds for the rest\n if (isLongRunningRequest) {\n return this.newApiTarget(timeout);\n }\n return (_a = this.apiTarget) !== null && _a !== void 0 ? _a : (this.apiTarget = await this.newApiTarget(timeout));\n }\n async newApiTarget(timeout) {\n return {\n target: await this.resolveAuthProxyUrl(),\n changeOrigin: true,\n timeout,\n headers: {\n \"Host\": this.clusterUrl.hostname,\n },\n };\n }\n async ensureServer() {\n if (!this.kubeAuthProxy) {\n const proxyEnv = Object.assign({}, process.env);\n if (this.cluster.preferences.httpsProxy) {\n proxyEnv.HTTPS_PROXY = this.cluster.preferences.httpsProxy;\n }\n this.kubeAuthProxy = new _kube_auth_proxy__WEBPACK_IMPORTED_MODULE_4__[\"KubeAuthProxy\"](this.cluster, proxyEnv);\n await this.kubeAuthProxy.run();\n }\n await this.kubeAuthProxy.whenReady;\n }\n stopServer() {\n var _a;\n (_a = this.kubeAuthProxy) === null || _a === void 0 ? void 0 : _a.exit();\n this.kubeAuthProxy = undefined;\n this.apiTarget = undefined;\n }\n}\n\n\n//# sourceURL=webpack:///./src/main/context-handler.ts?");
|
|
40830
40830
|
|
|
40831
40831
|
/***/ }),
|
|
40832
40832
|
|
|
@@ -40874,7 +40874,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
40874
40874
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
40875
40875
|
|
|
40876
40876
|
"use strict";
|
|
40877
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeAuthProxy\", function() { return KubeAuthProxy; });\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ \"child_process\");\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var tcp_port_used__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tcp-port-used */ \"./node_modules/tcp-port-used/index.js\");\n/* harmony import */ var tcp_port_used__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tcp_port_used__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! crypto */ \"crypto\");\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _kubectl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kubectl */ \"./src/main/kubectl.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! url */ \"url\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_get_port__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/get-port */ \"./src/main/utils/get-port.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\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\nconst startingServeRegex = /^starting to serve on (?<address>.+)/i;\nclass KubeAuthProxy {\n constructor(cluster, env) {\n Object.defineProperty(this, \"
|
|
40877
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeAuthProxy\", function() { return KubeAuthProxy; });\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ \"child_process\");\n/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var tcp_port_used__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tcp-port-used */ \"./node_modules/tcp-port-used/index.js\");\n/* harmony import */ var tcp_port_used__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(tcp_port_used__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! crypto */ \"crypto\");\n/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _kubectl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kubectl */ \"./src/main/kubectl.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! url */ \"url\");\n/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_get_port__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/get-port */ \"./src/main/utils/get-port.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\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\nconst startingServeRegex = /^starting to serve on (?<address>.+)/i;\nclass KubeAuthProxy {\n constructor(cluster, env) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"env\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: env\n });\n Object.defineProperty(this, \"apiPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: `/${Object(crypto__WEBPACK_IMPORTED_MODULE_2__[\"randomBytes\"])(8).toString(\"hex\")}`\n });\n Object.defineProperty(this, \"_port\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"proxyProcess\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"acceptHosts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"ready\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_7__[\"makeObservable\"])(this);\n this.acceptHosts = url__WEBPACK_IMPORTED_MODULE_5__[\"parse\"](this.cluster.apiUrl).hostname;\n }\n get port() {\n return this._port;\n }\n get whenReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_7__[\"when\"])(() => this.ready);\n }\n async run() {\n if (this.proxyProcess) {\n return this.whenReady;\n }\n const proxyBin = await _kubectl__WEBPACK_IMPORTED_MODULE_3__[\"Kubectl\"].bundled().getPath();\n const args = [\n \"proxy\",\n \"-p\", \"0\",\n \"--kubeconfig\", `${this.cluster.kubeConfigPath}`,\n \"--context\", `${this.cluster.contextName}`,\n \"--accept-hosts\", this.acceptHosts,\n \"--reject-paths\", \"^[^/]\",\n \"--api-prefix\", this.apiPrefix,\n ];\n if (process.env.DEBUG_PROXY === \"true\") {\n args.push(\"-v\", \"9\");\n }\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].debug(`spawning kubectl proxy with args: ${args}`);\n this.proxyProcess = Object(child_process__WEBPACK_IMPORTED_MODULE_0__[\"spawn\"])(proxyBin, args, { env: this.env });\n this.proxyProcess.on(\"error\", (error) => {\n this.cluster.broadcastConnectUpdate(error.message, true);\n this.exit();\n });\n this.proxyProcess.on(\"exit\", (code) => {\n this.cluster.broadcastConnectUpdate(`proxy exited with code: ${code}`, code > 0);\n this.exit();\n });\n this.proxyProcess.on(\"disconnect\", () => {\n this.cluster.broadcastConnectUpdate(\"Proxy disconnected communications\", true);\n this.exit();\n });\n this.proxyProcess.stderr.on(\"data\", (data) => {\n this.cluster.broadcastConnectUpdate(data.toString(), true);\n });\n this.proxyProcess.stdout.on(\"data\", (data) => {\n if (typeof this._port === \"number\") {\n this.cluster.broadcastConnectUpdate(data.toString());\n }\n });\n this._port = await Object(_utils_get_port__WEBPACK_IMPORTED_MODULE_6__[\"getPortFrom\"])(this.proxyProcess.stdout, {\n lineRegex: startingServeRegex,\n onFind: () => this.cluster.broadcastConnectUpdate(\"Authentication proxy started\"),\n });\n try {\n await Object(tcp_port_used__WEBPACK_IMPORTED_MODULE_1__[\"waitUntilUsed\"])(this.port, 500, 10000);\n this.ready = true;\n }\n catch (error) {\n this.cluster.broadcastConnectUpdate(\"Proxy port failed to be used within timelimit, restarting...\", true);\n this.exit();\n return this.run();\n }\n }\n exit() {\n this.ready = false;\n if (this.proxyProcess) {\n _logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].debug(\"[KUBE-AUTH]: stopping local proxy\", this.cluster.getMeta());\n this.proxyProcess.removeAllListeners();\n this.proxyProcess.stderr.removeAllListeners();\n this.proxyProcess.stdout.removeAllListeners();\n this.proxyProcess.kill();\n this.proxyProcess = null;\n }\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_7__[\"observable\"],\n __metadata(\"design:type\", Object)\n], KubeAuthProxy.prototype, \"ready\", void 0);\n\n\n//# sourceURL=webpack:///./src/main/kube-auth-proxy.ts?");
|
|
40878
40878
|
|
|
40879
40879
|
/***/ }),
|
|
40880
40880
|
|
|
@@ -40886,7 +40886,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
40886
40886
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
40887
40887
|
|
|
40888
40888
|
"use strict";
|
|
40889
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeconfigManager\", function() { return KubeconfigManager; });\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 fs_extra__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_kube_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _lens_proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lens-proxy */ \"./src/main/lens-proxy.ts\");\n/* harmony import */ var _common_app_paths__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/app-paths */ \"./src/common/app-paths.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\nclass KubeconfigManager {\n constructor(cluster, contextHandler) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"contextHandler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: contextHandler\n });\n
|
|
40889
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeconfigManager\", function() { return KubeconfigManager; });\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 fs_extra__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_kube_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _lens_proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lens-proxy */ \"./src/main/lens-proxy.ts\");\n/* harmony import */ var _common_app_paths__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/app-paths */ \"./src/common/app-paths.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\nclass KubeconfigManager {\n constructor(cluster, contextHandler) {\n Object.defineProperty(this, \"cluster\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: cluster\n });\n Object.defineProperty(this, \"contextHandler\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: contextHandler\n });\n /**\n * The path to the temp config file\n *\n * - if `string` then path\n * - if `null` then not yet created\n * - if `undefined` then unlinked by calling `clear()`\n */\n Object.defineProperty(this, \"tempFilePath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: null\n });\n }\n /**\n *\n * @returns The path to the temporary kubeconfig\n */\n async getPath() {\n if (this.tempFilePath === undefined) {\n throw new Error(\"kubeconfig is already unlinked\");\n }\n if (this.tempFilePath === null || !(await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.pathExists(this.tempFilePath))) {\n await this.ensureFile();\n }\n return this.tempFilePath;\n }\n /**\n * Deletes the temporary kubeconfig file\n */\n async clear() {\n if (!this.tempFilePath) {\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBECONFIG-MANAGER]: Deleting temporary kubeconfig: ${this.tempFilePath}`);\n try {\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.unlink(this.tempFilePath);\n }\n catch (error) {\n if (error.code !== \"ENOENT\") {\n throw error;\n }\n }\n finally {\n this.tempFilePath = undefined;\n }\n }\n async ensureFile() {\n try {\n await this.contextHandler.ensureServer();\n this.tempFilePath = await this.createProxyKubeconfig();\n }\n catch (error) {\n throw Object.assign(new Error(\"Failed to creat temp config for auth-proxy\"), { cause: error });\n }\n }\n get resolveProxyUrl() {\n return `http://127.0.0.1:${_lens_proxy__WEBPACK_IMPORTED_MODULE_4__[\"LensProxy\"].getInstance().port}/${this.cluster.id}`;\n }\n /**\n * Creates new \"temporary\" kubeconfig that point to the kubectl-proxy.\n * This way any user of the config does not need to know anything about the auth etc. details.\n */\n async createProxyKubeconfig() {\n const { cluster } = this;\n const { contextName, id } = cluster;\n const tempFile = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(_common_app_paths__WEBPACK_IMPORTED_MODULE_5__[\"AppPaths\"].get(\"temp\"), `kubeconfig-${id}`);\n const kubeConfig = await cluster.getKubeconfig();\n const proxyConfig = {\n currentContext: contextName,\n clusters: [\n {\n name: contextName,\n server: this.resolveProxyUrl,\n skipTLSVerify: undefined,\n },\n ],\n users: [\n { name: \"proxy\" },\n ],\n contexts: [\n {\n user: \"proxy\",\n name: contextName,\n cluster: contextName,\n namespace: cluster.defaultNamespace || kubeConfig.getContextObject(contextName).namespace,\n },\n ],\n };\n // write\n const configYaml = Object(_common_kube_helpers__WEBPACK_IMPORTED_MODULE_2__[\"dumpConfigYaml\"])(proxyConfig);\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.ensureDir(path__WEBPACK_IMPORTED_MODULE_0___default.a.dirname(tempFile));\n await fs_extra__WEBPACK_IMPORTED_MODULE_1___default.a.writeFile(tempFile, configYaml, { mode: 0o600 });\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`[KUBECONFIG-MANAGER]: Created temp kubeconfig \"${contextName}\" at \"${tempFile}\": \\n${configYaml}`);\n return tempFile;\n }\n}\n\n\n//# sourceURL=webpack:///./src/main/kubeconfig-manager.ts?");
|
|
40890
40890
|
|
|
40891
40891
|
/***/ }),
|
|
40892
40892
|
|
|
@@ -42134,7 +42134,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
42134
42134
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
42135
42135
|
|
|
42136
42136
|
"use strict";
|
|
42137
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Drawer\", function() { return Drawer; });\n/* harmony import */ var _drawer_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drawer.scss */ \"./src/renderer/components/drawer/drawer.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/* harmony import */ var _animate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../animate */ \"./src/renderer/components/animate/index.ts\");\n/* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../navigation */ \"./src/renderer/navigation/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\n\n\nconst defaultProps = {\n position: \"right\",\n animation: \"slide-right\",\n usePortal: false,\n onClose: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n};\nclass Drawer extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"mouseDownTarget\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contentElem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"scrollElem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"scrollPos\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"stopListenLocation\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _navigation__WEBPACK_IMPORTED_MODULE_7__[\"history\"].listen(() => {\n this.restoreScrollPos();\n })\n });\n Object.defineProperty(this, \"state\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n isCopied: false,\n }\n });\n Object.defineProperty(this, \"fixUpTripleClick\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (ev) => {\n var _a;\n // detail: A count of consecutive clicks that happened in a short amount of time\n if (ev.detail === 3) {\n const selection = window.getSelection();\n selection.selectAllChildren((_a = selection.anchorNode) === null || _a === void 0 ? void 0 : _a.parentNode);\n }\n }\n });\n Object.defineProperty(this, \"saveScrollPos\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n if (!this.scrollElem)\n return;\n const key = _navigation__WEBPACK_IMPORTED_MODULE_7__[\"history\"].location.key;\n this.scrollPos.set(key, this.scrollElem.scrollTop);\n }\n });\n Object.defineProperty(this, \"restoreScrollPos\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n if (!this.scrollElem)\n return;\n const key = _navigation__WEBPACK_IMPORTED_MODULE_7__[\"history\"].location.key;\n this.scrollElem.scrollTop = this.scrollPos.get(key) || 0;\n }\n });\n Object.defineProperty(this, \"onEscapeKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (evt) => {\n if (!this.props.open) {\n return;\n }\n if (evt.code === \"Escape\") {\n this.close();\n }\n }\n });\n Object.defineProperty(this, \"onClickOutside\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (evt) => {\n const { contentElem, mouseDownTarget, close, props: { open } } = this;\n if (!open || evt.defaultPrevented || contentElem.contains(mouseDownTarget)) {\n return;\n }\n const clickedElem = evt.target;\n const isOutsideAnyDrawer = !clickedElem.closest(\".Drawer\");\n if (isOutsideAnyDrawer) {\n close();\n }\n this.mouseDownTarget = null;\n }\n });\n Object.defineProperty(this, \"onMouseDown\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (evt) => {\n if (this.props.open) {\n this.mouseDownTarget = evt.target;\n }\n }\n });\n Object.defineProperty(this, \"close\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n const { open, onClose } = this.props;\n if (open)\n onClose();\n }\n });\n Object.defineProperty(this, \"copyTitle\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (title) => {\n const itemName = title.split(\":\").splice(1).join(\":\") || title; // copy whole if no :\n electron__WEBPACK_IMPORTED_MODULE_2__[\"clipboard\"].writeText(itemName.trim());\n this.setState({ isCopied: true });\n setTimeout(() => {\n this.setState({ isCopied: false });\n }, 3000);\n }\n });\n }\n componentDidMount() {\n // Using window target for events to make sure they will be catched after other places (e.g. Dialog)\n window.addEventListener(\"mousedown\", this.onMouseDown);\n window.addEventListener(\"click\", this.onClickOutside);\n window.addEventListener(\"keydown\", this.onEscapeKey);\n window.addEventListener(\"click\", this.fixUpTripleClick);\n }\n componentWillUnmount() {\n this.stopListenLocation();\n window.removeEventListener(\"mousedown\", this.onMouseDown);\n window.removeEventListener(\"click\", this.onClickOutside);\n window.removeEventListener(\"click\", this.fixUpTripleClick);\n window.removeEventListener(\"keydown\", this.onEscapeKey);\n }\n render() {\n const { open, position, title, animation, children, toolbar, size, usePortal } = this.props;\n let { className, contentClass } = this.props;\n const { isCopied } = this.state;\n const copyTooltip = isCopied ? \"Copied!\" : \"Copy\";\n const copyIcon = isCopied ? \"done\" : \"content_copy\";\n className = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"Drawer\", className, position);\n contentClass = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"drawer-content flex column box grow\", contentClass);\n const style = size ? { \"--size\": size } : undefined;\n const drawer = (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_animate__WEBPACK_IMPORTED_MODULE_6__[\"Animate\"], { name: animation, enter: open },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: className, style: style, ref: e => this.contentElem = e },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"drawer-wrapper flex column\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"drawer-title flex align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"drawer-title-text flex gaps align-center\" },\n title,\n title && typeof title == \"string\" && (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"], { material: copyIcon, tooltip: copyTooltip, onClick: () => this.copyTitle(title) }))),\n toolbar,\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"], { material: \"close\", onClick: this.close })),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: contentClass, onScroll: this.saveScrollPos, ref: e => this.scrollElem = e }, children)))));\n return usePortal ? Object(react_dom__WEBPACK_IMPORTED_MODULE_3__[\"createPortal\"])(drawer, document.body) : drawer;\n }\n}\nObject.defineProperty(Drawer, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: defaultProps\n});\n\n\n//# sourceURL=webpack:///./src/renderer/components/drawer/drawer.tsx?");
|
|
42137
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Drawer\", function() { return Drawer; });\n/* harmony import */ var _drawer_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drawer.scss */ \"./src/renderer/components/drawer/drawer.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/* harmony import */ var _animate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../animate */ \"./src/renderer/components/animate/index.ts\");\n/* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../navigation */ \"./src/renderer/navigation/index.ts\");\n/* harmony import */ var _resizing_anchor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../resizing-anchor */ \"./src/renderer/components/resizing-anchor/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\n\n\n\nconst defaultProps = {\n position: \"right\",\n animation: \"slide-right\",\n usePortal: false,\n onClose: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n};\nconst resizingAnchorProps = new Map();\nresizingAnchorProps.set(\"right\", [_resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeDirection\"].HORIZONTAL, _resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeSide\"].LEADING, _resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeGrowthDirection\"].RIGHT_TO_LEFT]);\nresizingAnchorProps.set(\"left\", [_resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeDirection\"].HORIZONTAL, _resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeSide\"].TRAILING, _resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeGrowthDirection\"].LEFT_TO_RIGHT]);\nresizingAnchorProps.set(\"top\", [_resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeDirection\"].VERTICAL, _resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeSide\"].TRAILING, _resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeGrowthDirection\"].TOP_TO_BOTTOM]);\nresizingAnchorProps.set(\"bottom\", [_resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeDirection\"].VERTICAL, _resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeSide\"].LEADING, _resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizeGrowthDirection\"].BOTTOM_TO_TOP]);\nconst defaultDrawerWidth = 725;\nconst drawerStorage = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"createStorage\"])(\"drawer\", {\n width: defaultDrawerWidth,\n});\nclass Drawer extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"mouseDownTarget\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contentElem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"scrollElem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"scrollPos\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"stopListenLocation\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _navigation__WEBPACK_IMPORTED_MODULE_7__[\"history\"].listen(() => {\n this.restoreScrollPos();\n })\n });\n Object.defineProperty(this, \"state\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n isCopied: false,\n width: drawerStorage.get().width,\n }\n });\n Object.defineProperty(this, \"resizeWidth\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (width) => {\n this.setState({ width });\n drawerStorage.merge({ width });\n }\n });\n Object.defineProperty(this, \"fixUpTripleClick\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (ev) => {\n var _a;\n // detail: A count of consecutive clicks that happened in a short amount of time\n if (ev.detail === 3) {\n const selection = window.getSelection();\n selection.selectAllChildren((_a = selection.anchorNode) === null || _a === void 0 ? void 0 : _a.parentNode);\n }\n }\n });\n Object.defineProperty(this, \"saveScrollPos\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n if (!this.scrollElem)\n return;\n const key = _navigation__WEBPACK_IMPORTED_MODULE_7__[\"history\"].location.key;\n this.scrollPos.set(key, this.scrollElem.scrollTop);\n }\n });\n Object.defineProperty(this, \"restoreScrollPos\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n if (!this.scrollElem)\n return;\n const key = _navigation__WEBPACK_IMPORTED_MODULE_7__[\"history\"].location.key;\n this.scrollElem.scrollTop = this.scrollPos.get(key) || 0;\n }\n });\n Object.defineProperty(this, \"onEscapeKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (evt) => {\n if (!this.props.open) {\n return;\n }\n if (evt.code === \"Escape\") {\n this.close();\n }\n }\n });\n Object.defineProperty(this, \"onClickOutside\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (evt) => {\n const { contentElem, mouseDownTarget, close, props: { open } } = this;\n if (!open || evt.defaultPrevented || contentElem.contains(mouseDownTarget)) {\n return;\n }\n const clickedElem = evt.target;\n const isOutsideAnyDrawer = !clickedElem.closest(\".Drawer\");\n if (isOutsideAnyDrawer) {\n close();\n }\n this.mouseDownTarget = null;\n }\n });\n Object.defineProperty(this, \"onMouseDown\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (evt) => {\n if (this.props.open) {\n this.mouseDownTarget = evt.target;\n }\n }\n });\n Object.defineProperty(this, \"close\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n const { open, onClose } = this.props;\n if (open)\n onClose();\n }\n });\n Object.defineProperty(this, \"copyTitle\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (title) => {\n const itemName = title.split(\":\").splice(1).join(\":\") || title; // copy whole if no :\n electron__WEBPACK_IMPORTED_MODULE_2__[\"clipboard\"].writeText(itemName.trim());\n this.setState({ isCopied: true });\n setTimeout(() => {\n this.setState({ isCopied: false });\n }, 3000);\n }\n });\n }\n componentDidMount() {\n // Using window target for events to make sure they will be catched after other places (e.g. Dialog)\n window.addEventListener(\"mousedown\", this.onMouseDown);\n window.addEventListener(\"click\", this.onClickOutside);\n window.addEventListener(\"keydown\", this.onEscapeKey);\n window.addEventListener(\"click\", this.fixUpTripleClick);\n }\n componentWillUnmount() {\n this.stopListenLocation();\n window.removeEventListener(\"mousedown\", this.onMouseDown);\n window.removeEventListener(\"click\", this.onClickOutside);\n window.removeEventListener(\"click\", this.fixUpTripleClick);\n window.removeEventListener(\"keydown\", this.onEscapeKey);\n }\n render() {\n const { className, contentClass, animation, open, position, title, children, toolbar, size, usePortal } = this.props;\n const { isCopied, width } = this.state;\n const copyTooltip = isCopied ? \"Copied!\" : \"Copy\";\n const copyIcon = isCopied ? \"done\" : \"content_copy\";\n const canCopyTitle = typeof title === \"string\" && title.length > 0;\n const [direction, placement, growthDirection] = resizingAnchorProps.get(position);\n const drawerSize = size || `${width}px`;\n const drawer = (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_animate__WEBPACK_IMPORTED_MODULE_6__[\"Animate\"], { name: animation, enter: open },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"Drawer\", className, position), style: { \"--size\": drawerSize }, ref: e => this.contentElem = e },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"drawer-wrapper flex column\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"drawer-title flex align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"drawer-title-text flex gaps align-center\" },\n title,\n canCopyTitle && (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"], { material: copyIcon, tooltip: copyTooltip, onClick: () => this.copyTitle(title) }))),\n toolbar,\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"], { material: \"close\", onClick: this.close })),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"drawer-content flex column box grow\", contentClass), onScroll: this.saveScrollPos, ref: e => this.scrollElem = e }, children)),\n !size && (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_resizing_anchor__WEBPACK_IMPORTED_MODULE_8__[\"ResizingAnchor\"], { direction: direction, placement: placement, growthDirection: growthDirection, getCurrentExtent: () => width, onDrag: this.resizeWidth, onDoubleClick: () => this.resizeWidth(defaultDrawerWidth), minExtent: 300, maxExtent: window.innerWidth * 0.9 })))));\n return usePortal ? Object(react_dom__WEBPACK_IMPORTED_MODULE_3__[\"createPortal\"])(drawer, document.body) : drawer;\n }\n}\nObject.defineProperty(Drawer, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: defaultProps\n});\n\n\n//# sourceURL=webpack:///./src/renderer/components/drawer/drawer.tsx?");
|
|
42138
42138
|
|
|
42139
42139
|
/***/ }),
|
|
42140
42140
|
|
|
@@ -43127,7 +43127,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
43127
43127
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
43128
43128
|
|
|
43129
43129
|
"use strict";
|
|
43130
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResizeDirection\", function() { return ResizeDirection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResizeSide\", function() { return ResizeSide; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResizeGrowthDirection\", function() { return ResizeGrowthDirection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResizingAnchor\", function() { return ResizingAnchor; });\n/* harmony import */ var _resizing_anchor_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./resizing-anchor.scss */ \"./src/renderer/components/resizing-anchor/resizing-anchor.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\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\nvar ResizeDirection;\n(function (ResizeDirection) {\n ResizeDirection[\"HORIZONTAL\"] = \"horizontal\";\n ResizeDirection[\"VERTICAL\"] = \"vertical\";\n})(ResizeDirection || (ResizeDirection = {}));\n/**\n * ResizeSide is for customizing where the area should be rendered.\n * That location is determined in conjunction with the `ResizeDirection` using the following table:\n *\n * +----------+------------+----------+\n * | | HORIZONTAL | VERTICAL |\n * +----------+------------+----------+\n * | LEADING | left | top |\n * +----------+------------+----------+\n * | TRAILING | right | bottom |\n * +----------+------------+----------+\n */\nvar ResizeSide;\n(function (ResizeSide) {\n ResizeSide[\"LEADING\"] = \"leading\";\n ResizeSide[\"TRAILING\"] = \"trailing\";\n})(ResizeSide || (ResizeSide = {}));\n/**\n * ResizeGrowthDirection determines how the anchor interprets the drag.\n *\n * Because the origin of the screen is top left a drag from bottom to top\n * results in a negative directional delta. However, if the component being\n * dragged grows in the opposite direction, this needs to be compensated for.\n */\nvar ResizeGrowthDirection;\n(function (ResizeGrowthDirection) {\n ResizeGrowthDirection[ResizeGrowthDirection[\"TOP_TO_BOTTOM\"] = 1] = \"TOP_TO_BOTTOM\";\n ResizeGrowthDirection[ResizeGrowthDirection[\"BOTTOM_TO_TOP\"] = -1] = \"BOTTOM_TO_TOP\";\n ResizeGrowthDirection[ResizeGrowthDirection[\"LEFT_TO_RIGHT\"] = 1] = \"LEFT_TO_RIGHT\";\n ResizeGrowthDirection[ResizeGrowthDirection[\"RIGHT_TO_LEFT\"] = -1] = \"RIGHT_TO_LEFT\";\n})(ResizeGrowthDirection || (ResizeGrowthDirection = {}));\n/**\n * Return the direction delta, but ignore drags leading up to a moved item\n * 1. `->|` => return `false`\n * 2. `<-|` => return `directed length (M, P2)` (negative)\n * 3. `-|>` => return `directed length (M, P2)` (positive)\n * 4. `<|-` => return `directed length (M, P2)` (negative)\n * 5. `|->` => return `directed length (M, P2)` (positive)\n * 6. `|<-` => return `false`\n * @param P1 the starting position on the number line\n * @param P2 the ending position on the number line\n * @param M a third point that determines if the delta is meaningful\n * @returns the directional difference between including appropriate sign.\n */\nfunction directionDelta(P1, P2, M) {\n const delta = Math.abs(M - P2);\n if (P1 < M) {\n if (P2 >= M) {\n // case 3\n return delta;\n }\n if (P2 < P1) {\n // case 2\n return -delta;\n }\n // case 1\n return false;\n }\n if (P2 < M) {\n // case 4\n return -delta;\n }\n if (P1 < P2) {\n // case 5\n return delta;\n }\n // case 6\n return false;\n}\nclass ResizingAnchor extends react__WEBPACK_IMPORTED_MODULE_1___default.a.PureComponent {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"lastMouseEvent\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"ref\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"onDragInit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (event) => {\n const { onStart, onlyButtons } = this.props;\n if (typeof onlyButtons === \"number\" && onlyButtons !== event.buttons) {\n return;\n }\n document.addEventListener(\"mousemove\", this.onDrag);\n document.addEventListener(\"mouseup\", this.onDragEnd);\n document.body.classList.add(ResizingAnchor.IS_RESIZING);\n this.lastMouseEvent = undefined;\n onStart();\n }\n });\n Object.defineProperty(this, \"onDrag\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: lodash__WEBPACK_IMPORTED_MODULE_3___default.a.throttle((event) => {\n /**\n * Some notes to help understand the following:\n * - A browser's origin point is in the top left of the screen\n * - X increases going from left to right\n * - Y increases going from top to bottom\n * - Since the resize bar should always be a rectangle, use its centre\n * line (in the resizing direction) as the line for determining if\n * the bar has \"jumped around\"\n *\n * Desire:\n * - Always ignore movement in the non-resizing direction\n * - Figure out how much the user has \"dragged\" the resize bar\n * - If the resize bar has jumped around, compensate by ignoring movement\n * in the resizing direction if it is moving \"towards\" the resize bar's\n * new location.\n */\n if (!this.lastMouseEvent) {\n this.lastMouseEvent = event;\n return;\n }\n const { maxExtent, minExtent, getCurrentExtent, growthDirection } = this.props;\n const { onDrag, onMaxExtentExceed, onMinExtentSubceed, onMaxExtentSubceed, onMinExtentExceed } = this.props;\n const delta = this.calculateDelta(this.lastMouseEvent, event);\n // always update the last mouse event\n this.lastMouseEvent = event;\n if (delta === false) {\n return;\n }\n const previousExtent = getCurrentExtent();\n const unboundedExtent = previousExtent + (delta * growthDirection);\n const boundedExtent = Math.round(Math.max(minExtent, Math.min(maxExtent, unboundedExtent)));\n onDrag(boundedExtent);\n if (previousExtent <= minExtent && minExtent <= unboundedExtent) {\n onMinExtentExceed();\n }\n else if (previousExtent >= minExtent && minExtent >= unboundedExtent) {\n onMinExtentSubceed();\n }\n if (previousExtent <= maxExtent && maxExtent <= unboundedExtent) {\n onMaxExtentExceed();\n }\n else if (previousExtent >= maxExtent && maxExtent >= unboundedExtent) {\n onMaxExtentSubceed();\n }\n }, 100)\n });\n Object.defineProperty(this, \"onDragEnd\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n this.props.onEnd();\n document.removeEventListener(\"mousemove\", this.onDrag);\n document.removeEventListener(\"mouseup\", this.onDragEnd);\n document.body.classList.remove(ResizingAnchor.IS_RESIZING);\n }\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"makeObservable\"])(this);\n if (props.maxExtent < props.minExtent) {\n throw new Error(\"maxExtent must be >= minExtent\");\n }\n this.ref = react__WEBPACK_IMPORTED_MODULE_1___default.a.createRef();\n }\n componentWillUnmount() {\n document.removeEventListener(\"mousemove\", this.onDrag);\n document.removeEventListener(\"mouseup\", this.onDragEnd);\n }\n calculateDelta(from, to) {\n const node = this.ref.current;\n if (!node) {\n return false;\n }\n const boundingBox = node.getBoundingClientRect();\n if (this.props.direction === ResizeDirection.HORIZONTAL) {\n const barX = Math.round(boundingBox.x + (boundingBox.width / 2));\n return directionDelta(from.pageX, to.pageX, barX);\n }\n else { // direction === ResizeDirection.VERTICAL\n const barY = Math.round(boundingBox.y + (boundingBox.height / 2));\n return directionDelta(from.pageY, to.pageY, barY);\n }\n }\n render() {\n const { disabled, direction, placement, onDoubleClick } = this.props;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { ref: this.ref, className: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"ResizingAnchor\", direction, placement, { disabled }), onMouseDown: this.onDragInit, onDoubleClick: onDoubleClick });\n }\n}\nObject.defineProperty(ResizingAnchor, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n onStart: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onDrag: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onEnd: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onMaxExtentExceed: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onMinExtentExceed: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onMinExtentSubceed: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onMaxExtentSubceed: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onDoubleClick: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n disabled: false,\n growthDirection: ResizeGrowthDirection.BOTTOM_TO_TOP,\n maxExtent: Number.POSITIVE_INFINITY,\n minExtent: 0,\n placement: ResizeSide.LEADING,\n }\n});\nObject.defineProperty(ResizingAnchor, \"IS_RESIZING\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"resizing\"\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"observable\"],\n __metadata(\"design:type\", MouseEvent)\n], ResizingAnchor.prototype, \"lastMouseEvent\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"observable\"].ref,\n __metadata(\"design:type\", Object)\n], ResizingAnchor.prototype, \"ref\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"action\"],\n __metadata(\"design:type\", Object)\n], ResizingAnchor.prototype, \"onDragInit\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"action\"],\n __metadata(\"design:type\", Object)\n], ResizingAnchor.prototype, \"onDragEnd\", void 0);\n\n\n//# sourceURL=webpack:///./src/renderer/components/resizing-anchor/resizing-anchor.tsx?");
|
|
43130
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResizeDirection\", function() { return ResizeDirection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResizeSide\", function() { return ResizeSide; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResizeGrowthDirection\", function() { return ResizeGrowthDirection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ResizingAnchor\", function() { return ResizingAnchor; });\n/* harmony import */ var _resizing_anchor_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./resizing-anchor.scss */ \"./src/renderer/components/resizing-anchor/resizing-anchor.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\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 ResizingAnchor_1;\n\n\n\n\n\n\nvar ResizeDirection;\n(function (ResizeDirection) {\n ResizeDirection[\"HORIZONTAL\"] = \"horizontal\";\n ResizeDirection[\"VERTICAL\"] = \"vertical\";\n})(ResizeDirection || (ResizeDirection = {}));\n/**\n * ResizeSide is for customizing where the area should be rendered.\n * That location is determined in conjunction with the `ResizeDirection` using the following table:\n *\n * +----------+------------+----------+\n * | | HORIZONTAL | VERTICAL |\n * +----------+------------+----------+\n * | LEADING | left | top |\n * +----------+------------+----------+\n * | TRAILING | right | bottom |\n * +----------+------------+----------+\n */\nvar ResizeSide;\n(function (ResizeSide) {\n ResizeSide[\"LEADING\"] = \"leading\";\n ResizeSide[\"TRAILING\"] = \"trailing\";\n})(ResizeSide || (ResizeSide = {}));\n/**\n * ResizeGrowthDirection determines how the anchor interprets the drag.\n *\n * Because the origin of the screen is top left a drag from bottom to top\n * results in a negative directional delta. However, if the component being\n * dragged grows in the opposite direction, this needs to be compensated for.\n */\nvar ResizeGrowthDirection;\n(function (ResizeGrowthDirection) {\n ResizeGrowthDirection[ResizeGrowthDirection[\"TOP_TO_BOTTOM\"] = 1] = \"TOP_TO_BOTTOM\";\n ResizeGrowthDirection[ResizeGrowthDirection[\"BOTTOM_TO_TOP\"] = -1] = \"BOTTOM_TO_TOP\";\n ResizeGrowthDirection[ResizeGrowthDirection[\"LEFT_TO_RIGHT\"] = 1] = \"LEFT_TO_RIGHT\";\n ResizeGrowthDirection[ResizeGrowthDirection[\"RIGHT_TO_LEFT\"] = -1] = \"RIGHT_TO_LEFT\";\n})(ResizeGrowthDirection || (ResizeGrowthDirection = {}));\n/**\n * Return the direction delta, but ignore drags leading up to a moved item\n * 1. `->|` => return `false`\n * 2. `<-|` => return `directed length (M, P2)` (negative)\n * 3. `-|>` => return `directed length (M, P2)` (positive)\n * 4. `<|-` => return `directed length (M, P2)` (negative)\n * 5. `|->` => return `directed length (M, P2)` (positive)\n * 6. `|<-` => return `false`\n * @param P1 the starting position on the number line\n * @param P2 the ending position on the number line\n * @param M a third point that determines if the delta is meaningful\n * @returns the directional difference between including appropriate sign.\n */\nfunction directionDelta(P1, P2, M) {\n const delta = Math.abs(M - P2);\n if (P1 < M) {\n if (P2 >= M) {\n // case 3\n return delta;\n }\n if (P2 < P1) {\n // case 2\n return -delta;\n }\n // case 1\n return false;\n }\n if (P2 < M) {\n // case 4\n return -delta;\n }\n if (P1 < P2) {\n // case 5\n return delta;\n }\n // case 6\n return false;\n}\nlet ResizingAnchor = ResizingAnchor_1 = class ResizingAnchor extends react__WEBPACK_IMPORTED_MODULE_1___default.a.PureComponent {\n constructor(props) {\n super(props);\n Object.defineProperty(this, \"lastMouseEvent\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"ref\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: react__WEBPACK_IMPORTED_MODULE_1___default.a.createRef()\n });\n Object.defineProperty(this, \"isDragging\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"wasDragging\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"onDragInit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (event) => {\n const { onStart, onlyButtons } = this.props;\n if (typeof onlyButtons === \"number\" && onlyButtons !== event.buttons) {\n return;\n }\n document.addEventListener(\"mousemove\", this.onDrag);\n document.addEventListener(\"mouseup\", this.onDragEnd);\n document.body.classList.add(ResizingAnchor_1.IS_RESIZING);\n this.isDragging = true;\n this.lastMouseEvent = undefined;\n onStart();\n }\n });\n Object.defineProperty(this, \"onDrag\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: lodash__WEBPACK_IMPORTED_MODULE_3___default.a.throttle((event) => {\n /**\n * Some notes to help understand the following:\n * - A browser's origin point is in the top left of the screen\n * - X increases going from left to right\n * - Y increases going from top to bottom\n * - Since the resize bar should always be a rectangle, use its centre\n * line (in the resizing direction) as the line for determining if\n * the bar has \"jumped around\"\n *\n * Desire:\n * - Always ignore movement in the non-resizing direction\n * - Figure out how much the user has \"dragged\" the resize bar\n * - If the resize bar has jumped around, compensate by ignoring movement\n * in the resizing direction if it is moving \"towards\" the resize bar's\n * new location.\n */\n if (!this.lastMouseEvent) {\n this.lastMouseEvent = event;\n return;\n }\n const { maxExtent, minExtent, getCurrentExtent, growthDirection } = this.props;\n const { onDrag, onMaxExtentExceed, onMinExtentSubceed, onMaxExtentSubceed, onMinExtentExceed } = this.props;\n const delta = this.calculateDelta(this.lastMouseEvent, event);\n // always update the last mouse event\n this.lastMouseEvent = event;\n if (delta === false) {\n return;\n }\n const previousExtent = getCurrentExtent();\n const unboundedExtent = previousExtent + (delta * growthDirection);\n const boundedExtent = Math.round(Math.max(minExtent, Math.min(maxExtent, unboundedExtent)));\n onDrag(boundedExtent);\n if (previousExtent <= minExtent && minExtent <= unboundedExtent) {\n onMinExtentExceed();\n }\n else if (previousExtent >= minExtent && minExtent >= unboundedExtent) {\n onMinExtentSubceed();\n }\n if (previousExtent <= maxExtent && maxExtent <= unboundedExtent) {\n onMaxExtentExceed();\n }\n else if (previousExtent >= maxExtent && maxExtent >= unboundedExtent) {\n onMaxExtentSubceed();\n }\n }, 100)\n });\n Object.defineProperty(this, \"onDragEnd\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: () => {\n this.props.onEnd();\n document.removeEventListener(\"mousemove\", this.onDrag);\n document.removeEventListener(\"mouseup\", this.onDragEnd);\n document.body.classList.remove(ResizingAnchor_1.IS_RESIZING);\n this.isDragging = false;\n this.wasDragging = true;\n setTimeout(() => this.wasDragging = false, 200);\n }\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_2__[\"makeObservable\"])(this);\n if (props.maxExtent < props.minExtent) {\n throw new Error(\"maxExtent must be >= minExtent\");\n }\n const cur = props.getCurrentExtent();\n if (cur > props.maxExtent) {\n props.onDrag(props.maxExtent);\n }\n else if (cur < props.minExtent) {\n props.onDrag(props.minExtent);\n }\n }\n componentWillUnmount() {\n document.removeEventListener(\"mousemove\", this.onDrag);\n document.removeEventListener(\"mouseup\", this.onDragEnd);\n }\n calculateDelta(from, to) {\n const node = this.ref.current;\n if (!node) {\n return false;\n }\n const boundingBox = node.getBoundingClientRect();\n if (this.props.direction === ResizeDirection.HORIZONTAL) {\n const barX = Math.round(boundingBox.x + (boundingBox.width / 2));\n return directionDelta(from.pageX, to.pageX, barX);\n }\n else { // direction === ResizeDirection.VERTICAL\n const barY = Math.round(boundingBox.y + (boundingBox.height / 2));\n return directionDelta(from.pageY, to.pageY, barY);\n }\n }\n render() {\n const { disabled, direction, placement, onDoubleClick } = this.props;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { ref: this.ref, className: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"ResizingAnchor\", direction, placement, { disabled, resizing: this.isDragging, wasDragging: this.wasDragging }), onMouseDown: this.onDragInit, onDoubleClick: onDoubleClick });\n }\n};\nObject.defineProperty(ResizingAnchor, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n onStart: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onDrag: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onEnd: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onMaxExtentExceed: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onMinExtentExceed: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onMinExtentSubceed: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onMaxExtentSubceed: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n onDoubleClick: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"],\n disabled: false,\n growthDirection: ResizeGrowthDirection.BOTTOM_TO_TOP,\n maxExtent: Number.POSITIVE_INFINITY,\n minExtent: 0,\n placement: ResizeSide.LEADING,\n }\n});\nObject.defineProperty(ResizingAnchor, \"IS_RESIZING\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"resizing\"\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"observable\"],\n __metadata(\"design:type\", MouseEvent)\n], ResizingAnchor.prototype, \"lastMouseEvent\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"observable\"],\n __metadata(\"design:type\", Object)\n], ResizingAnchor.prototype, \"isDragging\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"observable\"],\n __metadata(\"design:type\", Object)\n], ResizingAnchor.prototype, \"wasDragging\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"action\"],\n __metadata(\"design:type\", Object)\n], ResizingAnchor.prototype, \"onDragInit\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__[\"action\"],\n __metadata(\"design:type\", Object)\n], ResizingAnchor.prototype, \"onDragEnd\", void 0);\nResizingAnchor = ResizingAnchor_1 = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_5__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], ResizingAnchor);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/resizing-anchor/resizing-anchor.tsx?");
|
|
43131
43131
|
|
|
43132
43132
|
/***/ }),
|
|
43133
43133
|
|