1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

chore: Flatten file hierarchy

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-04-25 08:49:41 -04:00
parent 161cfa7d2a
commit a0953df4b1
28 changed files with 52 additions and 60 deletions

View File

@ -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({

View File

@ -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",

View File

@ -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";

View File

@ -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";

View File

@ -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",

View File

@ -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({

View File

@ -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({

View File

@ -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",

View File

@ -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";

View File

@ -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";

View File

@ -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({

View File

@ -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>;

View File

@ -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;

View File

@ -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 {

View File

@ -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",

View File

@ -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<boolean>;

View File

@ -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<boolean>;

View File

@ -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";

View File

@ -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",

View File

@ -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

View File

@ -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",

View File

@ -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";

View File

@ -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",

View File

@ -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;

View File

@ -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);

View File

@ -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",

View File

@ -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",

View File

@ -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";