From a0953df4b12af00ff5e7b41de3fae5b238519cd7 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 25 Apr 2023 08:49:41 -0400 Subject: [PATCH] chore: Flatten file hierarchy Signed-off-by: Sebastian Malton --- .../update-warning-level.injectable.ts | 2 +- .../checking-for-updates-tray-icon.injectable.ts | 4 ++-- .../check-for-updates-tray-item.injectable.ts | 8 ++++---- .../install-application-update-tray-item.injectable.ts | 2 +- .../main/update-is-ready-to-be-installed.injectable.ts | 4 ++-- ...rce-update-modal-root-frame-component.injectable.ts | 2 +- .../time-since-update-was-downloaded.injectable.ts | 2 +- .../update-channel-preference-block.injectable.ts | 2 +- .../renderer/update-channel/update-channel.tsx | 4 ++-- .../selection-of-update-stability.test.ts | 2 +- .../default-update-channel.injectable.ts | 4 ++-- .../discovered-update-version.injectable.ts | 8 ++++---- .../progress-of-update-download.injectable.ts | 6 +++--- .../selected-update-channel.injectable.ts | 4 ++-- .../update-downloaded-date-time.injectable.ts | 4 ++-- .../update-is-being-downloaded.injectable.ts | 6 +++--- .../updates-are-being-discovered.injectable.ts | 6 +++--- .../downgrading-version-update.test.ts | 2 +- .../update-can-be-downgraded.injectable.ts | 2 +- .../download-platform-update.injectable.ts | 2 +- .../main/download-update/download-update.injectable.ts | 10 +++++----- .../main/process-checking-for-updates.injectable.ts | 6 +++--- .../main/quit-and-install-update.injectable.ts | 2 +- .../publish-is-configured.injectable.ts | 2 +- ...ish-is-configured.global-override-for-injectable.ts | 8 -------- .../updating-is-enabled.injectable.ts | 2 +- ...watch-if-update-should-happen-on-quit.injectable.ts | 4 ++-- .../user-preferences/common/storage.injectable.ts | 2 +- 28 files changed, 52 insertions(+), 60 deletions(-) rename packages/core/src/features/application-update/common/{selected-update-channel => }/default-update-channel.injectable.ts (74%) rename packages/core/src/features/application-update/common/{discovered-update-version => }/discovered-update-version.injectable.ts (66%) rename packages/core/src/features/application-update/common/{progress-of-update-download => }/progress-of-update-download.injectable.ts (71%) rename packages/core/src/features/application-update/common/{selected-update-channel => }/selected-update-channel.injectable.ts (90%) rename packages/core/src/features/application-update/common/{update-downloaded-date-time => }/update-downloaded-date-time.injectable.ts (74%) rename packages/core/src/features/application-update/common/{update-is-being-downloaded => }/update-is-being-downloaded.injectable.ts (67%) rename packages/core/src/features/application-update/common/{updates-are-being-discovered => }/updates-are-being-discovered.injectable.ts (68%) rename packages/core/src/features/application-update/main/updating-is-enabled/{publish-is-configured => }/publish-is-configured.injectable.ts (81%) delete mode 100644 packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured/publish-is-configured.global-override-for-injectable.ts diff --git a/packages/core/src/features/application-update/child-features/application-update-using-top-bar/renderer/update-application-top-bar-item/update-warning-level.injectable.ts b/packages/core/src/features/application-update/child-features/application-update-using-top-bar/renderer/update-application-top-bar-item/update-warning-level.injectable.ts index b6890a206d..570a4e8810 100644 --- a/packages/core/src/features/application-update/child-features/application-update-using-top-bar/renderer/update-application-top-bar-item/update-warning-level.injectable.ts +++ b/packages/core/src/features/application-update/child-features/application-update-using-top-bar/renderer/update-application-top-bar-item/update-warning-level.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; -import updateDownloadedDateTimeInjectable from "../../../../common/update-downloaded-date-time/update-downloaded-date-time.injectable"; +import updateDownloadedDateTimeInjectable from "../../../../common/update-downloaded-date-time.injectable"; import { reactiveNow } from "../../../../../../common/utils/reactive-now/reactive-now"; const updateWarningLevelInjectable = getInjectable({ diff --git a/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-icons/checking-for-updates-tray-icon.injectable.ts b/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-icons/checking-for-updates-tray-icon.injectable.ts index c955199c21..6f2c8ccc32 100644 --- a/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-icons/checking-for-updates-tray-icon.injectable.ts +++ b/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-icons/checking-for-updates-tray-icon.injectable.ts @@ -6,8 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import getTrayIconPathInjectable from "../../../../../../main/tray/menu-icon/get-tray-icon-path.injectable"; import { trayIconInjectionToken } from "../../../../../../main/tray/menu-icon/tray-icon-injection-token"; -import updatesAreBeingDiscoveredInjectable from "../../../../common/updates-are-being-discovered/updates-are-being-discovered.injectable"; -import updateIsBeingDownloadedInjectable from "../../../../common/update-is-being-downloaded/update-is-being-downloaded.injectable"; +import updatesAreBeingDiscoveredInjectable from "../../../../common/updates-are-being-discovered.injectable"; +import updateIsBeingDownloadedInjectable from "../../../../common/update-is-being-downloaded.injectable"; const checkingForUpdatesTrayIconInjectable = getInjectable({ id: "checking-for-updates-tray-icon", diff --git a/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-items/check-for-updates-tray-item.injectable.ts b/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-items/check-for-updates-tray-item.injectable.ts index dd655708a8..3b20d9bfa1 100644 --- a/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-items/check-for-updates-tray-item.injectable.ts +++ b/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-items/check-for-updates-tray-item.injectable.ts @@ -7,10 +7,10 @@ import { computed } from "mobx"; import updatingIsEnabledInjectable from "../../../../main/updating-is-enabled/updating-is-enabled.injectable"; import { trayMenuItemInjectionToken } from "../../../../../../main/tray/tray-menu-item/tray-menu-item-injection-token"; import showApplicationWindowInjectable from "../../../../../../main/start-main-application/lens-window/show-application-window.injectable"; -import discoveredUpdateVersionInjectable from "../../../../common/discovered-update-version/discovered-update-version.injectable"; -import updateIsBeingDownloadedInjectable from "../../../../common/update-is-being-downloaded/update-is-being-downloaded.injectable"; -import updatesAreBeingDiscoveredInjectable from "../../../../common/updates-are-being-discovered/updates-are-being-discovered.injectable"; -import progressOfUpdateDownloadInjectable from "../../../../common/progress-of-update-download/progress-of-update-download.injectable"; +import discoveredUpdateVersionInjectable from "../../../../common/discovered-update-version.injectable"; +import updateIsBeingDownloadedInjectable from "../../../../common/update-is-being-downloaded.injectable"; +import updatesAreBeingDiscoveredInjectable from "../../../../common/updates-are-being-discovered.injectable"; +import progressOfUpdateDownloadInjectable from "../../../../common/progress-of-update-download.injectable"; import assert from "assert"; import processCheckingForUpdatesInjectable from "../../../../main/process-checking-for-updates.injectable"; import { withErrorSuppression } from "../../../../../../common/utils/with-error-suppression/with-error-suppression"; diff --git a/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-items/install-application-update-tray-item.injectable.ts b/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-items/install-application-update-tray-item.injectable.ts index 86ae7d676f..42dc973ef7 100644 --- a/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-items/install-application-update-tray-item.injectable.ts +++ b/packages/core/src/features/application-update/child-features/application-update-using-tray/main/tray-items/install-application-update-tray-item.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import { trayMenuItemInjectionToken } from "../../../../../../main/tray/tray-menu-item/tray-menu-item-injection-token"; -import discoveredUpdateVersionInjectable from "../../../../common/discovered-update-version/discovered-update-version.injectable"; +import discoveredUpdateVersionInjectable from "../../../../common/discovered-update-version.injectable"; import { withErrorSuppression } from "../../../../../../common/utils/with-error-suppression/with-error-suppression"; import { pipeline } from "@ogre-tools/fp"; import withErrorLoggingInjectable from "../../../../../../common/utils/with-error-logging/with-error-logging.injectable"; diff --git a/packages/core/src/features/application-update/child-features/application-update-using-tray/main/update-is-ready-to-be-installed.injectable.ts b/packages/core/src/features/application-update/child-features/application-update-using-tray/main/update-is-ready-to-be-installed.injectable.ts index 39e23f51e6..fd576352ea 100644 --- a/packages/core/src/features/application-update/child-features/application-update-using-tray/main/update-is-ready-to-be-installed.injectable.ts +++ b/packages/core/src/features/application-update/child-features/application-update-using-tray/main/update-is-ready-to-be-installed.injectable.ts @@ -4,8 +4,8 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; -import discoveredUpdateVersionInjectable from "../../../common/discovered-update-version/discovered-update-version.injectable"; -import updateIsBeingDownloadedInjectable from "../../../common/update-is-being-downloaded/update-is-being-downloaded.injectable"; +import discoveredUpdateVersionInjectable from "../../../common/discovered-update-version.injectable"; +import updateIsBeingDownloadedInjectable from "../../../common/update-is-being-downloaded.injectable"; const updateIsReadyToBeInstalledInjectable = getInjectable({ id: "update-is-ready-to-be-installed", diff --git a/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts b/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts index 9109f4bfe3..b5dd601ad2 100644 --- a/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts +++ b/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/force-update-modal-root-frame-component.injectable.ts @@ -7,7 +7,7 @@ import { computed } from "mobx"; import { rootFrameChildComponentInjectionToken } from "../../../../../../renderer/frames/root-frame/root-frame-child-component-injection-token"; import { ForceUpdateModal } from "./force-update-modal"; import timeSinceUpdateWasDownloadedInjectable from "./time-since-update-was-downloaded.injectable"; -import updateDownloadedDateTimeInjectable from "../../../../common/update-downloaded-date-time/update-downloaded-date-time.injectable"; +import updateDownloadedDateTimeInjectable from "../../../../common/update-downloaded-date-time.injectable"; import timeAfterUpdateMustBeInstalledInjectable from "./time-after-update-must-be-installed.injectable"; const forceUpdateModalRootFrameComponentInjectable = getInjectable({ diff --git a/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/time-since-update-was-downloaded.injectable.ts b/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/time-since-update-was-downloaded.injectable.ts index 8ac86c80ca..c5c153311d 100644 --- a/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/time-since-update-was-downloaded.injectable.ts +++ b/packages/core/src/features/application-update/child-features/force-update/renderer/force-update-modal/time-since-update-was-downloaded.injectable.ts @@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import assert from "assert"; import { computed } from "mobx"; import moment from "moment"; -import updateDownloadedDateTimeInjectable from "../../../../common/update-downloaded-date-time/update-downloaded-date-time.injectable"; +import updateDownloadedDateTimeInjectable from "../../../../common/update-downloaded-date-time.injectable"; import { reactiveNow } from "../../../../../../common/utils/reactive-now/reactive-now"; const timeSinceUpdateWasDownloadedInjectable = getInjectable({ diff --git a/packages/core/src/features/application-update/child-features/preferences/renderer/update-channel/update-channel-preference-block.injectable.ts b/packages/core/src/features/application-update/child-features/preferences/renderer/update-channel/update-channel-preference-block.injectable.ts index aa4fe3f5fb..a429b1b0c0 100644 --- a/packages/core/src/features/application-update/child-features/preferences/renderer/update-channel/update-channel-preference-block.injectable.ts +++ b/packages/core/src/features/application-update/child-features/preferences/renderer/update-channel/update-channel-preference-block.injectable.ts @@ -9,7 +9,7 @@ import { UpdateChannel } from "./update-channel"; const updateChannelPreferenceBlockInjectable = getInjectable({ id: "update-channel-preference-item", - instantiate: () => ({ + instantiate: (di) => ({ kind: "block" as const, id: "update-channel", parentId: "application-page", diff --git a/packages/core/src/features/application-update/child-features/preferences/renderer/update-channel/update-channel.tsx b/packages/core/src/features/application-update/child-features/preferences/renderer/update-channel/update-channel.tsx index 339d54beb8..8bae4175c7 100644 --- a/packages/core/src/features/application-update/child-features/preferences/renderer/update-channel/update-channel.tsx +++ b/packages/core/src/features/application-update/child-features/preferences/renderer/update-channel/update-channel.tsx @@ -7,8 +7,8 @@ import { SubTitle } from "../../../../../../renderer/components/layout/sub-title import { withInjectables } from "@ogre-tools/injectable-react"; import { Select } from "../../../../../../renderer/components/select"; import { updateChannels } from "../../../../common/update-channels"; -import type { SelectedUpdateChannel } from "../../../../common/selected-update-channel/selected-update-channel.injectable"; -import selectedUpdateChannelInjectable from "../../../../common/selected-update-channel/selected-update-channel.injectable"; +import type { SelectedUpdateChannel } from "../../../../common/selected-update-channel.injectable"; +import selectedUpdateChannelInjectable from "../../../../common/selected-update-channel.injectable"; import { pipeline } from "@ogre-tools/fp"; import { map, toPairs } from "lodash/fp"; import { observer } from "mobx-react"; diff --git a/packages/core/src/features/application-update/child-features/selection-of-update-stability/selection-of-update-stability.test.ts b/packages/core/src/features/application-update/child-features/selection-of-update-stability/selection-of-update-stability.test.ts index 00018fdf90..51401420e9 100644 --- a/packages/core/src/features/application-update/child-features/selection-of-update-stability/selection-of-update-stability.test.ts +++ b/packages/core/src/features/application-update/child-features/selection-of-update-stability/selection-of-update-stability.test.ts @@ -16,7 +16,7 @@ import type { UpdateChannel, ReleaseChannel } from "../../common/update-channels import { updateChannels } from "../../common/update-channels"; import type { DownloadPlatformUpdate } from "../../main/download-update/download-platform-update/download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "../../main/download-update/download-platform-update/download-platform-update.injectable"; -import selectedUpdateChannelInjectable from "../../common/selected-update-channel/selected-update-channel.injectable"; +import selectedUpdateChannelInjectable from "../../common/selected-update-channel.injectable"; import type { IComputedValue } from "mobx"; import setUpdateOnQuitInjectable from "../../../../main/electron-app/features/set-update-on-quit.injectable"; import showInfoNotificationInjectable from "../../../../renderer/components/notifications/show-info-notification.injectable"; diff --git a/packages/core/src/features/application-update/common/selected-update-channel/default-update-channel.injectable.ts b/packages/core/src/features/application-update/common/default-update-channel.injectable.ts similarity index 74% rename from packages/core/src/features/application-update/common/selected-update-channel/default-update-channel.injectable.ts rename to packages/core/src/features/application-update/common/default-update-channel.injectable.ts index 48047e5ce9..13b7979024 100644 --- a/packages/core/src/features/application-update/common/selected-update-channel/default-update-channel.injectable.ts +++ b/packages/core/src/features/application-update/common/default-update-channel.injectable.ts @@ -2,8 +2,8 @@ * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ -import { updateChannels } from "../update-channels"; -import releaseChannelInjectable from "../../../vars/common/release-channel.injectable"; +import { updateChannels } from "./update-channels"; +import releaseChannelInjectable from "../../vars/common/release-channel.injectable"; import { getInjectable } from "@ogre-tools/injectable"; const defaultUpdateChannelInjectable = getInjectable({ diff --git a/packages/core/src/features/application-update/common/discovered-update-version/discovered-update-version.injectable.ts b/packages/core/src/features/application-update/common/discovered-update-version.injectable.ts similarity index 66% rename from packages/core/src/features/application-update/common/discovered-update-version/discovered-update-version.injectable.ts rename to packages/core/src/features/application-update/common/discovered-update-version.injectable.ts index 1aefbb2c97..af55db617c 100644 --- a/packages/core/src/features/application-update/common/discovered-update-version/discovered-update-version.injectable.ts +++ b/packages/core/src/features/application-update/common/discovered-update-version.injectable.ts @@ -3,10 +3,10 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable"; -import type { UpdateChannel } from "../update-channels"; -import type { SyncBox } from "../../../../common/utils/sync-box/sync-box-injection-token"; -import { syncBoxInjectionToken } from "../../../../common/utils/sync-box/sync-box-injection-token"; +import createSyncBoxInjectable from "../../../common/utils/sync-box/create-sync-box.injectable"; +import type { UpdateChannel } from "./update-channels"; +import type { SyncBox } from "../../../common/utils/sync-box/sync-box-injection-token"; +import { syncBoxInjectionToken } from "../../../common/utils/sync-box/sync-box-injection-token"; export type DiscoveredUpdateVersion = SyncBox<{ version: string; updateChannel: UpdateChannel } | null>; diff --git a/packages/core/src/features/application-update/common/progress-of-update-download/progress-of-update-download.injectable.ts b/packages/core/src/features/application-update/common/progress-of-update-download.injectable.ts similarity index 71% rename from packages/core/src/features/application-update/common/progress-of-update-download/progress-of-update-download.injectable.ts rename to packages/core/src/features/application-update/common/progress-of-update-download.injectable.ts index ff0d5dc021..f87fde506b 100644 --- a/packages/core/src/features/application-update/common/progress-of-update-download/progress-of-update-download.injectable.ts +++ b/packages/core/src/features/application-update/common/progress-of-update-download.injectable.ts @@ -3,9 +3,9 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable"; -import type { SyncBox } from "../../../../common/utils/sync-box/sync-box-injection-token"; -import { syncBoxInjectionToken } from "../../../../common/utils/sync-box/sync-box-injection-token"; +import createSyncBoxInjectable from "../../../common/utils/sync-box/create-sync-box.injectable"; +import type { SyncBox } from "../../../common/utils/sync-box/sync-box-injection-token"; +import { syncBoxInjectionToken } from "../../../common/utils/sync-box/sync-box-injection-token"; export interface ProgressOfDownload { percentage: number; diff --git a/packages/core/src/features/application-update/common/selected-update-channel/selected-update-channel.injectable.ts b/packages/core/src/features/application-update/common/selected-update-channel.injectable.ts similarity index 90% rename from packages/core/src/features/application-update/common/selected-update-channel/selected-update-channel.injectable.ts rename to packages/core/src/features/application-update/common/selected-update-channel.injectable.ts index 7d32cb9b81..00cf44611b 100644 --- a/packages/core/src/features/application-update/common/selected-update-channel/selected-update-channel.injectable.ts +++ b/packages/core/src/features/application-update/common/selected-update-channel.injectable.ts @@ -5,8 +5,8 @@ import { getInjectable } from "@ogre-tools/injectable"; import type { IComputedValue } from "mobx"; import { action, computed, observable } from "mobx"; -import type { UpdateChannel, ReleaseChannel } from "../update-channels"; -import { updateChannels } from "../update-channels"; +import type { UpdateChannel, ReleaseChannel } from "./update-channels"; +import { updateChannels } from "./update-channels"; import defaultUpdateChannelInjectable from "./default-update-channel.injectable"; export interface SelectedUpdateChannel { diff --git a/packages/core/src/features/application-update/common/update-downloaded-date-time/update-downloaded-date-time.injectable.ts b/packages/core/src/features/application-update/common/update-downloaded-date-time.injectable.ts similarity index 74% rename from packages/core/src/features/application-update/common/update-downloaded-date-time/update-downloaded-date-time.injectable.ts rename to packages/core/src/features/application-update/common/update-downloaded-date-time.injectable.ts index 4caaa6654a..391e3c5c25 100644 --- a/packages/core/src/features/application-update/common/update-downloaded-date-time/update-downloaded-date-time.injectable.ts +++ b/packages/core/src/features/application-update/common/update-downloaded-date-time.injectable.ts @@ -3,8 +3,8 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable"; -import { syncBoxInjectionToken } from "../../../../common/utils/sync-box/sync-box-injection-token"; +import createSyncBoxInjectable from "../../../common/utils/sync-box/create-sync-box.injectable"; +import { syncBoxInjectionToken } from "../../../common/utils/sync-box/sync-box-injection-token"; const updateDownloadedDateTimeInjectable = getInjectable({ id: "update-downloaded-date-time", diff --git a/packages/core/src/features/application-update/common/update-is-being-downloaded/update-is-being-downloaded.injectable.ts b/packages/core/src/features/application-update/common/update-is-being-downloaded.injectable.ts similarity index 67% rename from packages/core/src/features/application-update/common/update-is-being-downloaded/update-is-being-downloaded.injectable.ts rename to packages/core/src/features/application-update/common/update-is-being-downloaded.injectable.ts index e10e5f5046..f3bc8351fd 100644 --- a/packages/core/src/features/application-update/common/update-is-being-downloaded/update-is-being-downloaded.injectable.ts +++ b/packages/core/src/features/application-update/common/update-is-being-downloaded.injectable.ts @@ -3,9 +3,9 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable"; -import type { SyncBox } from "../../../../common/utils/sync-box/sync-box-injection-token"; -import { syncBoxInjectionToken } from "../../../../common/utils/sync-box/sync-box-injection-token"; +import createSyncBoxInjectable from "../../../common/utils/sync-box/create-sync-box.injectable"; +import type { SyncBox } from "../../../common/utils/sync-box/sync-box-injection-token"; +import { syncBoxInjectionToken } from "../../../common/utils/sync-box/sync-box-injection-token"; export type UpdateIsBeingDownloaded = SyncBox; diff --git a/packages/core/src/features/application-update/common/updates-are-being-discovered/updates-are-being-discovered.injectable.ts b/packages/core/src/features/application-update/common/updates-are-being-discovered.injectable.ts similarity index 68% rename from packages/core/src/features/application-update/common/updates-are-being-discovered/updates-are-being-discovered.injectable.ts rename to packages/core/src/features/application-update/common/updates-are-being-discovered.injectable.ts index d762771269..7ac4de3a03 100644 --- a/packages/core/src/features/application-update/common/updates-are-being-discovered/updates-are-being-discovered.injectable.ts +++ b/packages/core/src/features/application-update/common/updates-are-being-discovered.injectable.ts @@ -3,9 +3,9 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable"; -import type { SyncBox } from "../../../../common/utils/sync-box/sync-box-injection-token"; -import { syncBoxInjectionToken } from "../../../../common/utils/sync-box/sync-box-injection-token"; +import createSyncBoxInjectable from "../../../common/utils/sync-box/create-sync-box.injectable"; +import type { SyncBox } from "../../../common/utils/sync-box/sync-box-injection-token"; +import { syncBoxInjectionToken } from "../../../common/utils/sync-box/sync-box-injection-token"; export type UpdatesAreBeingDiscovered = SyncBox; diff --git a/packages/core/src/features/application-update/downgrading-version-update.test.ts b/packages/core/src/features/application-update/downgrading-version-update.test.ts index 5bbde89527..151ac09936 100644 --- a/packages/core/src/features/application-update/downgrading-version-update.test.ts +++ b/packages/core/src/features/application-update/downgrading-version-update.test.ts @@ -11,7 +11,7 @@ import asyncFn from "@async-fn/jest"; import type { CheckForPlatformUpdates } from "./main/check-for-updates/check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./main/check-for-updates/check-for-platform-updates/check-for-platform-updates.injectable"; import processCheckingForUpdatesInjectable from "./main/process-checking-for-updates.injectable"; -import selectedUpdateChannelInjectable from "./common/selected-update-channel/selected-update-channel.injectable"; +import selectedUpdateChannelInjectable from "./common/selected-update-channel.injectable"; import type { DiContainer } from "@ogre-tools/injectable"; import { updateChannels } from "./common/update-channels"; import getBuildVersionInjectable from "../../main/electron-app/features/get-build-version.injectable"; diff --git a/packages/core/src/features/application-update/main/check-for-updates/update-can-be-downgraded.injectable.ts b/packages/core/src/features/application-update/main/check-for-updates/update-can-be-downgraded.injectable.ts index dae91c6b10..3fc37490e4 100644 --- a/packages/core/src/features/application-update/main/check-for-updates/update-can-be-downgraded.injectable.ts +++ b/packages/core/src/features/application-update/main/check-for-updates/update-can-be-downgraded.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import { computed } from "mobx"; import releaseChannelInjectable from "../../../vars/common/release-channel.injectable"; -import selectedUpdateChannelInjectable from "../../common/selected-update-channel/selected-update-channel.injectable"; +import selectedUpdateChannelInjectable from "../../common/selected-update-channel.injectable"; const updateCanBeDowngradedInjectable = getInjectable({ id: "update-can-be-downgraded", diff --git a/packages/core/src/features/application-update/main/download-update/download-platform-update/download-platform-update.injectable.ts b/packages/core/src/features/application-update/main/download-update/download-platform-update/download-platform-update.injectable.ts index 14c4d2b075..94fd8b9fce 100644 --- a/packages/core/src/features/application-update/main/download-update/download-platform-update/download-platform-update.injectable.ts +++ b/packages/core/src/features/application-update/main/download-update/download-platform-update/download-platform-update.injectable.ts @@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import electronUpdaterInjectable from "../../../../../main/electron-app/features/electron-updater.injectable"; import loggerInjectable from "../../../../../common/logger.injectable"; import type { ProgressInfo } from "electron-updater"; -import type { ProgressOfDownload } from "../../../common/progress-of-update-download/progress-of-update-download.injectable"; +import type { ProgressOfDownload } from "../../../common/progress-of-update-download.injectable"; export type DownloadPlatformUpdate = ( onDownloadProgress: (arg: ProgressOfDownload) => void diff --git a/packages/core/src/features/application-update/main/download-update/download-update.injectable.ts b/packages/core/src/features/application-update/main/download-update/download-update.injectable.ts index fb1cbe0684..0628ac396b 100644 --- a/packages/core/src/features/application-update/main/download-update/download-update.injectable.ts +++ b/packages/core/src/features/application-update/main/download-update/download-update.injectable.ts @@ -4,13 +4,13 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import downloadPlatformUpdateInjectable from "./download-platform-update/download-platform-update.injectable"; -import updateIsBeingDownloadedInjectable from "../../common/update-is-being-downloaded/update-is-being-downloaded.injectable"; -import discoveredUpdateVersionInjectable from "../../common/discovered-update-version/discovered-update-version.injectable"; +import updateIsBeingDownloadedInjectable from "../../common/update-is-being-downloaded.injectable"; +import discoveredUpdateVersionInjectable from "../../common/discovered-update-version.injectable"; import { action, runInAction } from "mobx"; -import type { ProgressOfDownload } from "../../common/progress-of-update-download/progress-of-update-download.injectable"; -import progressOfUpdateDownloadInjectable from "../../common/progress-of-update-download/progress-of-update-download.injectable"; +import type { ProgressOfDownload } from "../../common/progress-of-update-download.injectable"; +import progressOfUpdateDownloadInjectable from "../../common/progress-of-update-download.injectable"; import { getCurrentDateTime } from "../../../../common/utils/date/get-current-date-time"; -import updateDownloadedDateTimeInjectable from "../../common/update-downloaded-date-time/update-downloaded-date-time.injectable"; +import updateDownloadedDateTimeInjectable from "../../common/update-downloaded-date-time.injectable"; const downloadUpdateInjectable = getInjectable({ id: "download-update", diff --git a/packages/core/src/features/application-update/main/process-checking-for-updates.injectable.ts b/packages/core/src/features/application-update/main/process-checking-for-updates.injectable.ts index 40fde375f4..e21aed614c 100644 --- a/packages/core/src/features/application-update/main/process-checking-for-updates.injectable.ts +++ b/packages/core/src/features/application-update/main/process-checking-for-updates.injectable.ts @@ -3,9 +3,9 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import selectedUpdateChannelInjectable from "../common/selected-update-channel/selected-update-channel.injectable"; -import updatesAreBeingDiscoveredInjectable from "../common/updates-are-being-discovered/updates-are-being-discovered.injectable"; -import discoveredUpdateVersionInjectable from "../common/discovered-update-version/discovered-update-version.injectable"; +import selectedUpdateChannelInjectable from "../common/selected-update-channel.injectable"; +import updatesAreBeingDiscoveredInjectable from "../common/updates-are-being-discovered.injectable"; +import discoveredUpdateVersionInjectable from "../common/discovered-update-version.injectable"; import { runInAction } from "mobx"; import downloadUpdateInjectable from "./download-update/download-update.injectable"; import checkForUpdatesStartingFromChannelInjectable from "./check-for-updates/check-for-updates-starting-from-channel.injectable"; diff --git a/packages/core/src/features/application-update/main/quit-and-install-update.injectable.ts b/packages/core/src/features/application-update/main/quit-and-install-update.injectable.ts index 3c31b0bcc2..a17ceca5ca 100644 --- a/packages/core/src/features/application-update/main/quit-and-install-update.injectable.ts +++ b/packages/core/src/features/application-update/main/quit-and-install-update.injectable.ts @@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import electronQuitAndInstallUpdateInjectable from "../../../main/electron-app/features/electron-quit-and-install-update.injectable"; import { getCurrentDateTime } from "../../../common/utils/date/get-current-date-time"; import emitAppEventInjectable from "../../../common/app-event-bus/emit-event.injectable"; -import discoveredUpdateVersionInjectable from "../common/discovered-update-version/discovered-update-version.injectable"; +import discoveredUpdateVersionInjectable from "../common/discovered-update-version.injectable"; const quitAndInstallUpdateInjectable = getInjectable({ id: "quit-and-install-update", diff --git a/packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured/publish-is-configured.injectable.ts b/packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured.injectable.ts similarity index 81% rename from packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured/publish-is-configured.injectable.ts rename to packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured.injectable.ts index de451ad5aa..4fef771e76 100644 --- a/packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured/publish-is-configured.injectable.ts +++ b/packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured.injectable.ts @@ -7,7 +7,7 @@ import { getInjectable } from "@ogre-tools/injectable"; const publishIsConfiguredInjectable = getInjectable({ id: "publish-is-configured", - instantiate: (di) => Boolean(di.inject(applicationInformationToken).updatingIsEnabled), + instantiate: (di) => di.inject(applicationInformationToken).updatingIsEnabled, }); export default publishIsConfiguredInjectable; diff --git a/packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured/publish-is-configured.global-override-for-injectable.ts b/packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured/publish-is-configured.global-override-for-injectable.ts deleted file mode 100644 index 109958838d..0000000000 --- a/packages/core/src/features/application-update/main/updating-is-enabled/publish-is-configured/publish-is-configured.global-override-for-injectable.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) OpenLens Authors. All rights reserved. - * Licensed under MIT License. See LICENSE in root directory for more information. - */ -import { getGlobalOverride } from "@k8slens/test-utils"; -import publishIsConfiguredInjectable from "./publish-is-configured.injectable"; - -export default getGlobalOverride(publishIsConfiguredInjectable, () => false); diff --git a/packages/core/src/features/application-update/main/updating-is-enabled/updating-is-enabled.injectable.ts b/packages/core/src/features/application-update/main/updating-is-enabled/updating-is-enabled.injectable.ts index 0a9af398c0..cc9f50f627 100644 --- a/packages/core/src/features/application-update/main/updating-is-enabled/updating-is-enabled.injectable.ts +++ b/packages/core/src/features/application-update/main/updating-is-enabled/updating-is-enabled.injectable.ts @@ -4,7 +4,7 @@ */ import { getInjectable } from "@ogre-tools/injectable"; import electronUpdaterIsActiveInjectable from "../../../../main/electron-app/features/electron-updater-is-active.injectable"; -import publishIsConfiguredInjectable from "./publish-is-configured/publish-is-configured.injectable"; +import publishIsConfiguredInjectable from "./publish-is-configured.injectable"; const updatingIsEnabledInjectable = getInjectable({ id: "updating-is-enabled", diff --git a/packages/core/src/features/application-update/main/watch-if-update-should-happen-on-quit/watch-if-update-should-happen-on-quit.injectable.ts b/packages/core/src/features/application-update/main/watch-if-update-should-happen-on-quit/watch-if-update-should-happen-on-quit.injectable.ts index bd949194e6..9fe959fc8d 100644 --- a/packages/core/src/features/application-update/main/watch-if-update-should-happen-on-quit/watch-if-update-should-happen-on-quit.injectable.ts +++ b/packages/core/src/features/application-update/main/watch-if-update-should-happen-on-quit/watch-if-update-should-happen-on-quit.injectable.ts @@ -6,9 +6,9 @@ import { getInjectable } from "@ogre-tools/injectable"; import { autorun } from "mobx"; import { getStartableStoppable } from "@k8slens/startable-stoppable"; import setUpdateOnQuitInjectable from "../../../../main/electron-app/features/set-update-on-quit.injectable"; -import selectedUpdateChannelInjectable from "../../common/selected-update-channel/selected-update-channel.injectable"; +import selectedUpdateChannelInjectable from "../../common/selected-update-channel.injectable"; import type { ReleaseChannel, UpdateChannel } from "../../common/update-channels"; -import discoveredUpdateVersionInjectable from "../../common/discovered-update-version/discovered-update-version.injectable"; +import discoveredUpdateVersionInjectable from "../../common/discovered-update-version.injectable"; const watchIfUpdateShouldHappenOnQuitInjectable = getInjectable({ id: "watch-if-update-should-happen-on-quit", diff --git a/packages/core/src/features/user-preferences/common/storage.injectable.ts b/packages/core/src/features/user-preferences/common/storage.injectable.ts index d736c28677..8350e57f97 100644 --- a/packages/core/src/features/user-preferences/common/storage.injectable.ts +++ b/packages/core/src/features/user-preferences/common/storage.injectable.ts @@ -10,7 +10,7 @@ import persistentStorageMigrationsInjectable from "../../../common/persistent-st import { userPreferencesMigrationInjectionToken } from "./migrations-token"; import { toJS } from "../../../common/utils"; import storeMigrationVersionInjectable from "../../../common/vars/store-migration-version.injectable"; -import selectedUpdateChannelInjectable from "../../application-update/common/selected-update-channel/selected-update-channel.injectable"; +import selectedUpdateChannelInjectable from "../../application-update/common/selected-update-channel.injectable"; import type { ReleaseChannel } from "../../application-update/common/update-channels"; import userPreferencesStateInjectable from "./state.injectable"; import userPreferenceDescriptorsInjectable from "./preference-descriptors.injectable";