chore: Rename tokens to be more correct

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-04-12 15:15:36 -04:00
1 parent d991838893
commit a81b0f961e
21 files changed
+48 -48

No files matched your search

@@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { beforeQuitOfBackEndInjectionToken } from "../../start-main-application/runnable-tokens/phases";
import { onQuitOfBackEndInjectionToken } from "../../start-main-application/runnable-tokens/phases";
import lensProtocolRouterMainInjectable from "../../protocol-handler/lens-protocol-router-main/lens-protocol-router-main.injectable";
const cleanUpDeepLinkingInjectable = getInjectable({
@@ -19,7 +19,7 @@ const cleanUpDeepLinkingInjectable = getInjectable({
},
}),
injectionToken: beforeQuitOfBackEndInjectionToken,
injectionToken: onQuitOfBackEndInjectionToken,
});
export default cleanUpDeepLinkingInjectable;
@@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { beforeQuitOfFrontEndInjectionToken } from "../../../start-main-application/runnable-tokens/phases";
import { afterQuitOfFrontEndInjectionToken } from "../../../start-main-application/runnable-tokens/phases";
import electronAppInjectable from "../../electron-app.injectable";
import { isEmpty } from "lodash/fp";
import getVisibleWindowsInjectable from "../../../start-main-application/lens-window/get-visible-windows.injectable";
@@ -25,7 +25,7 @@ const hideDockForLastClosedWindowInjectable = getInjectable({
},
}),
injectionToken: beforeQuitOfFrontEndInjectionToken,
injectionToken: afterQuitOfFrontEndInjectionToken,
});
export default hideDockForLastClosedWindowInjectable;
@@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { beforeElectronIsReadyInjectionToken } from "@k8slens/application-for-electron-main";
import { beforeQuitOfFrontEndInjectionToken, beforeQuitOfBackEndInjectionToken } from "../../start-main-application/runnable-tokens/phases";
import { afterQuitOfFrontEndInjectionToken, onQuitOfBackEndInjectionToken } from "../../start-main-application/runnable-tokens/phases";
import electronAppInjectable from "../electron-app.injectable";
import isIntegrationTestingInjectable from "../../../common/vars/is-integration-testing.injectable";
import autoUpdaterInjectable from "../features/auto-updater.injectable";
@@ -17,8 +17,8 @@ const setupRunnablesBeforeClosingOfApplicationInjectable = getInjectable({
run: () => {
const runManySync = runManySyncFor(di);
const runMany = runManyFor(di);
const runRunnablesBeforeQuitOfFrontEnd = runManySync(beforeQuitOfFrontEndInjectionToken);
const runRunnablesBeforeQuitOfBackEnd = runMany(beforeQuitOfBackEndInjectionToken);
const runAfterQuitOfFrontEnd = runManySync(afterQuitOfFrontEndInjectionToken);
const runOnQuitOfBackEnd = runMany(onQuitOfBackEndInjectionToken);
const app = di.inject(electronAppInjectable);
const isIntegrationTesting = di.inject(isIntegrationTestingInjectable);
const autoUpdater = di.inject(autoUpdaterInjectable);
@@ -29,7 +29,7 @@ const setupRunnablesBeforeClosingOfApplicationInjectable = getInjectable({
});
app.on("will-quit", () => {
runRunnablesBeforeQuitOfFrontEnd();
runAfterQuitOfFrontEnd();
let isAsyncQuitting = false;
@@ -42,7 +42,7 @@ const setupRunnablesBeforeClosingOfApplicationInjectable = getInjectable({
void (async () => {
try {
await runRunnablesBeforeQuitOfBackEnd();
await runOnQuitOfBackEnd();
} catch (error) {
console.error("A beforeQuitOfBackEnd failed!!!!", error);
exitCode = 1;
@@ -53,7 +53,7 @@ const setupRunnablesBeforeClosingOfApplicationInjectable = getInjectable({
};
app.on("will-quit", (event) => {
runRunnablesBeforeQuitOfFrontEnd();
runAfterQuitOfFrontEnd();
event.preventDefault();
if (isIntegrationTesting || isAutoUpdating) {