From 717b62d2e635eaad58b4168043cc4bcc3268369f Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Tue, 7 Dec 2021 19:41:03 +0200 Subject: [PATCH] Remove obsolete code Signed-off-by: Janne Savolainen --- src/extensions/registries/index.ts | 1 - src/extensions/registries/menu-registry.ts | 32 ---------------------- src/main/index.ts | 1 - src/main/initializers/index.ts | 2 -- src/main/initializers/registries.ts | 26 ------------------ 5 files changed, 62 deletions(-) delete mode 100644 src/extensions/registries/menu-registry.ts delete mode 100644 src/main/initializers/registries.ts diff --git a/src/extensions/registries/index.ts b/src/extensions/registries/index.ts index 99809265a2..4dd64a9c82 100644 --- a/src/extensions/registries/index.ts +++ b/src/extensions/registries/index.ts @@ -23,7 +23,6 @@ export * from "./page-registry"; export * from "./page-menu-registry"; -export * from "./menu-registry"; export * from "./app-preference-registry"; export * from "./status-bar-registry"; export * from "./kube-object-detail-registry"; diff --git a/src/extensions/registries/menu-registry.ts b/src/extensions/registries/menu-registry.ts deleted file mode 100644 index 99267adac5..0000000000 --- a/src/extensions/registries/menu-registry.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (c) 2021 OpenLens Authors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -// Extensions API -> Global menu customizations - -import type { MenuItemConstructorOptions } from "electron"; -import { BaseRegistry } from "./base-registry"; - -export interface MenuRegistration extends MenuItemConstructorOptions { - parentId: string; -} - -export class MenuRegistry extends BaseRegistry { -} diff --git a/src/main/index.ts b/src/main/index.ts index a697f2c63e..d58d0ca931 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -227,7 +227,6 @@ app.on("ready", async () => { return app.exit(); } - initializers.initRegistries(); const extensionDiscovery = ExtensionDiscovery.createInstance(); ExtensionLoader.createInstance().init(); diff --git a/src/main/initializers/index.ts b/src/main/initializers/index.ts index 34a5c32e34..44c994789a 100644 --- a/src/main/initializers/index.ts +++ b/src/main/initializers/index.ts @@ -18,8 +18,6 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -export * from "./registries"; export * from "./metrics-providers"; export * from "./ipc"; export * from "./cluster-metadata-detectors"; diff --git a/src/main/initializers/registries.ts b/src/main/initializers/registries.ts deleted file mode 100644 index 28fcdff1a1..0000000000 --- a/src/main/initializers/registries.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) 2021 OpenLens Authors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -import * as registries from "../../extensions/registries"; - -export function initRegistries() { - registries.MenuRegistry.createInstance(); -}