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

Relocate stuff related to application update under behaviours

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-07-08 13:30:41 +03:00
parent b7ac22b8f5
commit 1bacbc8bb4
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
53 changed files with 164 additions and 164 deletions

View File

@ -5,19 +5,19 @@
import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable"; import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable";
import publishIsConfiguredInjectable from "../../main/application-update/publish-is-configured.injectable"; import publishIsConfiguredInjectable from "./main/publish-is-configured.injectable";
import type { AsyncFnMock } from "@async-fn/jest"; import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import type { CheckForPlatformUpdates } from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import type { CheckForPlatformUpdates } from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import checkForPlatformUpdatesInjectable from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import appEventBusInjectable from "../../common/app-event-bus/app-event-bus.injectable"; import appEventBusInjectable from "../../common/app-event-bus/app-event-bus.injectable";
import type { DiContainer } from "@ogre-tools/injectable"; import type { DiContainer } from "@ogre-tools/injectable";
import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable"; import processCheckingForUpdatesInjectable from "./main/check-for-updates/process-checking-for-updates.injectable";
import type { DownloadPlatformUpdate } from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import type { DownloadPlatformUpdate } from "./main/download-platform-update/download-platform-update.injectable";
import downloadPlatformUpdateInjectable from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "./main/download-platform-update/download-platform-update.injectable";
import quitAndInstallUpdateInjectable from "../../main/application-update/quit-and-install-update.injectable"; import quitAndInstallUpdateInjectable from "./main/quit-and-install-update.injectable";
import appVersionInjectable from "../../common/get-configuration-file-model/app-version/app-version.injectable"; import appVersionInjectable from "../../common/get-configuration-file-model/app-version/app-version.injectable";
import periodicalCheckForUpdatesInjectable from "../../main/application-update/periodical-check-for-updates/periodical-check-for-updates.injectable"; import periodicalCheckForUpdatesInjectable from "./main/periodical-check-for-updates/periodical-check-for-updates.injectable";
import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time"; import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time";
describe("analytics for installing update", () => { describe("analytics for installing update", () => {

View File

@ -3,10 +3,10 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import createSyncBoxInjectable from "../../utils/sync-box/create-sync-box.injectable"; import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable";
import type { UpdateChannel } from "../update-channels"; import type { UpdateChannel } from "../update-channels";
import type { SyncBox } from "../../utils/sync-box/sync-box-injection-token"; import type { SyncBox } from "../../../../common/utils/sync-box/sync-box-injection-token";
import { syncBoxInjectionToken } from "../../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>; 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. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import createSyncBoxInjectable from "../../utils/sync-box/create-sync-box.injectable"; import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable";
import type { SyncBox } from "../../utils/sync-box/sync-box-injection-token"; import type { SyncBox } from "../../../../common/utils/sync-box/sync-box-injection-token";
import { syncBoxInjectionToken } from "../../utils/sync-box/sync-box-injection-token"; import { syncBoxInjectionToken } from "../../../../common/utils/sync-box/sync-box-injection-token";
export interface ProgressOfDownload { export interface ProgressOfDownload {
percentage: number; percentage: number;

View File

@ -3,8 +3,8 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { MessageChannel } from "../../utils/channel/message-channel-injection-token"; import type { MessageChannel } from "../../../../common/utils/channel/message-channel-injection-token";
import { messageChannelInjectionToken } from "../../utils/channel/message-channel-injection-token"; import { messageChannelInjectionToken } from "../../../../common/utils/channel/message-channel-injection-token";
export type RestartAndInstallUpdateChannel = MessageChannel; export type RestartAndInstallUpdateChannel = MessageChannel;

View File

@ -4,7 +4,7 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { SemVer } from "semver"; import { SemVer } from "semver";
import appVersionInjectable from "../../get-configuration-file-model/app-version/app-version.injectable"; import appVersionInjectable from "../../../../common/get-configuration-file-model/app-version/app-version.injectable";
import type { UpdateChannelId } from "../update-channels"; import type { UpdateChannelId } from "../update-channels";
import { updateChannels } from "../update-channels"; import { updateChannels } from "../update-channels";

View File

@ -3,8 +3,8 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import createSyncBoxInjectable from "../../utils/sync-box/create-sync-box.injectable"; import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable";
import { syncBoxInjectionToken } from "../../utils/sync-box/sync-box-injection-token"; import { syncBoxInjectionToken } from "../../../../common/utils/sync-box/sync-box-injection-token";
const updateDownloadedDateTimeInjectable = getInjectable({ const updateDownloadedDateTimeInjectable = getInjectable({
id: "update-downloaded-date-time", id: "update-downloaded-date-time",

View File

@ -3,9 +3,9 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import createSyncBoxInjectable from "../../utils/sync-box/create-sync-box.injectable"; import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable";
import type { SyncBox } from "../../utils/sync-box/sync-box-injection-token"; import type { SyncBox } from "../../../../common/utils/sync-box/sync-box-injection-token";
import { syncBoxInjectionToken } from "../../utils/sync-box/sync-box-injection-token"; import { syncBoxInjectionToken } from "../../../../common/utils/sync-box/sync-box-injection-token";
export type UpdateIsBeingDownloaded = SyncBox<boolean>; export type UpdateIsBeingDownloaded = SyncBox<boolean>;

View File

@ -3,9 +3,9 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import createSyncBoxInjectable from "../../utils/sync-box/create-sync-box.injectable"; import createSyncBoxInjectable from "../../../../common/utils/sync-box/create-sync-box.injectable";
import type { SyncBox } from "../../utils/sync-box/sync-box-injection-token"; import type { SyncBox } from "../../../../common/utils/sync-box/sync-box-injection-token";
import { syncBoxInjectionToken } from "../../utils/sync-box/sync-box-injection-token"; import { syncBoxInjectionToken } from "../../../../common/utils/sync-box/sync-box-injection-token";
export type UpdatesAreBeingDiscovered = SyncBox<boolean>; export type UpdatesAreBeingDiscovered = SyncBox<boolean>;

View File

@ -5,16 +5,16 @@
import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable"; import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable";
import publishIsConfiguredInjectable from "../../main/application-update/publish-is-configured.injectable"; import publishIsConfiguredInjectable from "./main/publish-is-configured.injectable";
import type { AsyncFnMock } from "@async-fn/jest"; import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import type { CheckForPlatformUpdates } from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import type { CheckForPlatformUpdates } from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import checkForPlatformUpdatesInjectable from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable"; import processCheckingForUpdatesInjectable from "./main/check-for-updates/process-checking-for-updates.injectable";
import selectedUpdateChannelInjectable from "../../common/application-update/selected-update-channel/selected-update-channel.injectable"; import selectedUpdateChannelInjectable from "./common/selected-update-channel/selected-update-channel.injectable";
import type { DiContainer } from "@ogre-tools/injectable"; import type { DiContainer } from "@ogre-tools/injectable";
import appVersionInjectable from "../../common/get-configuration-file-model/app-version/app-version.injectable"; import appVersionInjectable from "../../common/get-configuration-file-model/app-version/app-version.injectable";
import { updateChannels } from "../../common/application-update/update-channels"; import { updateChannels } from "./common/update-channels";
describe("downgrading version update", () => { describe("downgrading version update", () => {
let applicationBuilder: ApplicationBuilder; let applicationBuilder: ApplicationBuilder;

View File

@ -4,20 +4,20 @@
*/ */
import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import type { CheckForPlatformUpdates } from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import type { CheckForPlatformUpdates } from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import checkForPlatformUpdatesInjectable from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import type { DownloadPlatformUpdate } from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import type { DownloadPlatformUpdate } from "./main/download-platform-update/download-platform-update.injectable";
import downloadPlatformUpdateInjectable from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "./main/download-platform-update/download-platform-update.injectable";
import type { AsyncFnMock } from "@async-fn/jest"; import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import type { DiContainer } from "@ogre-tools/injectable"; import type { DiContainer } from "@ogre-tools/injectable";
import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable"; import processCheckingForUpdatesInjectable from "./main/check-for-updates/process-checking-for-updates.injectable";
import type { RenderResult } from "@testing-library/react"; import type { RenderResult } from "@testing-library/react";
import { fireEvent } from "@testing-library/react"; import { fireEvent } from "@testing-library/react";
import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time"; import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time";
import quitAndInstallUpdateInjectable from "../../main/application-update/quit-and-install-update.injectable"; import quitAndInstallUpdateInjectable from "./main/quit-and-install-update.injectable";
import timeAfterUpdateMustBeInstalledInjectable from "../../renderer/application-update/force-update-modal/time-after-update-must-be-installed.injectable"; import timeAfterUpdateMustBeInstalledInjectable from "./renderer/force-update-modal/time-after-update-must-be-installed.injectable";
import secondsAfterInstallStartsInjectable from "../../renderer/application-update/force-update-modal/seconds-after-install-starts.injectable"; import secondsAfterInstallStartsInjectable from "./renderer/force-update-modal/seconds-after-install-starts.injectable";
const TIME_AFTER_UPDATE_MUST_BE_INSTALLED = 1000; const TIME_AFTER_UPDATE_MUST_BE_INSTALLED = 1000;
const TIME_AFTER_INSTALL_STARTS = 5 * 1000; const TIME_AFTER_INSTALL_STARTS = 5 * 1000;

View File

@ -6,16 +6,16 @@ import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import type { RenderResult } from "@testing-library/react"; import type { RenderResult } from "@testing-library/react";
import { act } from "@testing-library/react"; import { act } from "@testing-library/react";
import type { CheckForPlatformUpdates } from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import type { CheckForPlatformUpdates } from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import checkForPlatformUpdatesInjectable from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import type { DownloadPlatformUpdate } from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import type { DownloadPlatformUpdate } from "./main/download-platform-update/download-platform-update.injectable";
import downloadPlatformUpdateInjectable from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "./main/download-platform-update/download-platform-update.injectable";
import publishIsConfiguredInjectable from "../../main/application-update/publish-is-configured.injectable"; import publishIsConfiguredInjectable from "./main/publish-is-configured.injectable";
import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable"; import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable";
import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable"; import processCheckingForUpdatesInjectable from "./main/check-for-updates/process-checking-for-updates.injectable";
import quitAndInstallUpdateInjectable from "../../main/application-update/quit-and-install-update.injectable"; import quitAndInstallUpdateInjectable from "./main/quit-and-install-update.injectable";
import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time"; import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time";

View File

@ -6,13 +6,13 @@ import type { ApplicationBuilder } from "../../renderer/components/test-utils/ge
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import type { RenderResult } from "@testing-library/react"; import type { RenderResult } from "@testing-library/react";
import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable"; import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable";
import publishIsConfiguredInjectable from "../../main/application-update/publish-is-configured.injectable"; import publishIsConfiguredInjectable from "./main/publish-is-configured.injectable";
import type { CheckForPlatformUpdates } from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import type { CheckForPlatformUpdates } from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import checkForPlatformUpdatesInjectable from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import type { AsyncFnMock } from "@async-fn/jest"; import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import type { DownloadPlatformUpdate } from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import type { DownloadPlatformUpdate } from "./main/download-platform-update/download-platform-update.injectable";
import downloadPlatformUpdateInjectable from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "./main/download-platform-update/download-platform-update.injectable";
import showApplicationWindowInjectable from "../../main/start-main-application/lens-window/show-application-window.injectable"; import showApplicationWindowInjectable from "../../main/start-main-application/lens-window/show-application-window.injectable";
describe("installing update using tray", () => { describe("installing update using tray", () => {

View File

@ -4,18 +4,18 @@
*/ */
import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import quitAndInstallUpdateInjectable from "../../main/application-update/quit-and-install-update.injectable"; import quitAndInstallUpdateInjectable from "./main/quit-and-install-update.injectable";
import type { RenderResult } from "@testing-library/react"; import type { RenderResult } from "@testing-library/react";
import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable"; import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable";
import publishIsConfiguredInjectable from "../../main/application-update/publish-is-configured.injectable"; import publishIsConfiguredInjectable from "./main/publish-is-configured.injectable";
import type { CheckForPlatformUpdates } from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import type { CheckForPlatformUpdates } from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import checkForPlatformUpdatesInjectable from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import type { AsyncFnMock } from "@async-fn/jest"; import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import type { DownloadPlatformUpdate } from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import type { DownloadPlatformUpdate } from "./main/download-platform-update/download-platform-update.injectable";
import downloadPlatformUpdateInjectable from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "./main/download-platform-update/download-platform-update.injectable";
import setUpdateOnQuitInjectable from "../../main/electron-app/features/set-update-on-quit.injectable"; import setUpdateOnQuitInjectable from "../../main/electron-app/features/set-update-on-quit.injectable";
import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable"; import processCheckingForUpdatesInjectable from "./main/check-for-updates/process-checking-for-updates.injectable";
import { useFakeTime } from "../../common/test-utils/use-fake-time"; import { useFakeTime } from "../../common/test-utils/use-fake-time";
import staticFilesDirectoryInjectable from "../../common/vars/static-files-directory.injectable"; import staticFilesDirectoryInjectable from "../../common/vars/static-files-directory.injectable";

View File

@ -3,9 +3,9 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import electronUpdaterInjectable from "../../electron-app/features/electron-updater.injectable"; import electronUpdaterInjectable from "../../../../main/electron-app/features/electron-updater.injectable";
import type { UpdateChannel } from "../../../common/application-update/update-channels"; import type { UpdateChannel } from "../../common/update-channels";
import loggerInjectable from "../../../common/logger.injectable"; import loggerInjectable from "../../../../common/logger.injectable";
import type { UpdateCheckResult } from "electron-updater"; import type { UpdateCheckResult } from "electron-updater";
export type CheckForUpdatesResult = { export type CheckForUpdatesResult = {

View File

@ -2,17 +2,17 @@
* Copyright (c) OpenLens Authors. All rights reserved. * Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getDiForUnitTesting } from "../../getDiForUnitTesting"; import { getDiForUnitTesting } from "../../../../main/getDiForUnitTesting";
import electronUpdaterInjectable from "../../electron-app/features/electron-updater.injectable"; import electronUpdaterInjectable from "../../../../main/electron-app/features/electron-updater.injectable";
import type { AsyncFnMock } from "@async-fn/jest"; import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import type { AppUpdater, UpdateCheckResult } from "electron-updater"; import type { AppUpdater, UpdateCheckResult } from "electron-updater";
import type { CheckForPlatformUpdates } from "./check-for-platform-updates.injectable"; import type { CheckForPlatformUpdates } from "./check-for-platform-updates.injectable";
import checkForPlatformUpdatesInjectable from "./check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./check-for-platform-updates.injectable";
import type { UpdateChannel, UpdateChannelId } from "../../../common/application-update/update-channels"; import type { UpdateChannel, UpdateChannelId } from "../../common/update-channels";
import { getPromiseStatus } from "../../../common/test-utils/get-promise-status"; import { getPromiseStatus } from "../../../../common/test-utils/get-promise-status";
import loggerInjectable from "../../../common/logger.injectable"; import loggerInjectable from "../../../../common/logger.injectable";
import type { Logger } from "../../../common/logger"; import type { Logger } from "../../../../common/logger";
describe("check-for-platform-updates", () => { describe("check-for-platform-updates", () => {
let checkForPlatformUpdates: CheckForPlatformUpdates; let checkForPlatformUpdates: CheckForPlatformUpdates;

View File

@ -5,17 +5,17 @@
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx"; import { computed } from "mobx";
import updatingIsEnabledInjectable from "./updating-is-enabled.injectable"; import updatingIsEnabledInjectable from "./updating-is-enabled.injectable";
import { trayMenuItemInjectionToken } from "../../behaviours/tray/main/tray-menu-item/tray-menu-item-injection-token"; import { trayMenuItemInjectionToken } from "../../tray/main/tray-menu-item/tray-menu-item-injection-token";
import showApplicationWindowInjectable from "../start-main-application/lens-window/show-application-window.injectable"; import showApplicationWindowInjectable from "../../../main/start-main-application/lens-window/show-application-window.injectable";
import discoveredUpdateVersionInjectable from "../../common/application-update/discovered-update-version/discovered-update-version.injectable"; import discoveredUpdateVersionInjectable from "../common/discovered-update-version/discovered-update-version.injectable";
import updateIsBeingDownloadedInjectable from "../../common/application-update/update-is-being-downloaded/update-is-being-downloaded.injectable"; import updateIsBeingDownloadedInjectable from "../common/update-is-being-downloaded/update-is-being-downloaded.injectable";
import updatesAreBeingDiscoveredInjectable from "../../common/application-update/updates-are-being-discovered/updates-are-being-discovered.injectable"; import updatesAreBeingDiscoveredInjectable from "../common/updates-are-being-discovered/updates-are-being-discovered.injectable";
import progressOfUpdateDownloadInjectable from "../../common/application-update/progress-of-update-download/progress-of-update-download.injectable"; import progressOfUpdateDownloadInjectable from "../common/progress-of-update-download/progress-of-update-download.injectable";
import assert from "assert"; import assert from "assert";
import processCheckingForUpdatesInjectable from "./check-for-updates/process-checking-for-updates.injectable"; import processCheckingForUpdatesInjectable from "./check-for-updates/process-checking-for-updates.injectable";
import { withErrorSuppression } from "../../common/utils/with-error-suppression/with-error-suppression"; import { withErrorSuppression } from "../../../common/utils/with-error-suppression/with-error-suppression";
import { pipeline } from "@ogre-tools/fp"; import { pipeline } from "@ogre-tools/fp";
import withErrorLoggingInjectable from "../../common/utils/with-error-logging/with-error-logging.injectable"; import withErrorLoggingInjectable from "../../../common/utils/with-error-logging/with-error-logging.injectable";
const checkForUpdatesTrayItemInjectable = getInjectable({ const checkForUpdatesTrayItemInjectable = getInjectable({
id: "check-for-updates-tray-item", id: "check-for-updates-tray-item",

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import type { UpdateChannel } from "../../../common/application-update/update-channels"; import type { UpdateChannel } from "../../common/update-channels";
import checkForPlatformUpdatesInjectable from "../check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "../check-for-platform-updates/check-for-platform-updates.injectable";
import updateCanBeDowngradedInjectable from "./update-can-be-downgraded.injectable"; import updateCanBeDowngradedInjectable from "./update-can-be-downgraded.injectable";

View File

@ -3,15 +3,15 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import selectedUpdateChannelInjectable from "../../../common/application-update/selected-update-channel/selected-update-channel.injectable"; import selectedUpdateChannelInjectable from "../../common/selected-update-channel/selected-update-channel.injectable";
import updatesAreBeingDiscoveredInjectable from "../../../common/application-update/updates-are-being-discovered/updates-are-being-discovered.injectable"; import updatesAreBeingDiscoveredInjectable from "../../common/updates-are-being-discovered/updates-are-being-discovered.injectable";
import discoveredUpdateVersionInjectable from "../../../common/application-update/discovered-update-version/discovered-update-version.injectable"; import discoveredUpdateVersionInjectable from "../../common/discovered-update-version/discovered-update-version.injectable";
import { runInAction } from "mobx"; import { runInAction } from "mobx";
import downloadUpdateInjectable from "../download-update/download-update.injectable"; import downloadUpdateInjectable from "../download-update/download-update.injectable";
import checkForUpdatesStartingFromChannelInjectable from "./check-for-updates-starting-from-channel.injectable"; import checkForUpdatesStartingFromChannelInjectable from "./check-for-updates-starting-from-channel.injectable";
import withOrphanPromiseInjectable from "../../../common/utils/with-orphan-promise/with-orphan-promise.injectable"; import withOrphanPromiseInjectable from "../../../../common/utils/with-orphan-promise/with-orphan-promise.injectable";
import emitEventInjectable from "../../../common/app-event-bus/emit-event.injectable"; import emitEventInjectable from "../../../../common/app-event-bus/emit-event.injectable";
import { getCurrentDateTime } from "../../../common/utils/date/get-current-date-time"; import { getCurrentDateTime } from "../../../../common/utils/date/get-current-date-time";
const processCheckingForUpdatesInjectable = getInjectable({ const processCheckingForUpdatesInjectable = getInjectable({
id: "process-checking-for-updates", id: "process-checking-for-updates",

View File

@ -4,8 +4,8 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx"; import { computed } from "mobx";
import selectedUpdateChannelInjectable from "../../../common/application-update/selected-update-channel/selected-update-channel.injectable"; import selectedUpdateChannelInjectable from "../../common/selected-update-channel/selected-update-channel.injectable";
import appVersionInjectable from "../../../common/get-configuration-file-model/app-version/app-version.injectable"; import appVersionInjectable from "../../../../common/get-configuration-file-model/app-version/app-version.injectable";
import { SemVer } from "semver"; import { SemVer } from "semver";
const updateCanBeDowngradedInjectable = getInjectable({ const updateCanBeDowngradedInjectable = getInjectable({

View File

@ -3,10 +3,10 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import electronUpdaterInjectable from "../../electron-app/features/electron-updater.injectable"; import electronUpdaterInjectable from "../../../../main/electron-app/features/electron-updater.injectable";
import loggerInjectable from "../../../common/logger.injectable"; import loggerInjectable from "../../../../common/logger.injectable";
import type { ProgressInfo } from "electron-updater"; import type { ProgressInfo } from "electron-updater";
import type { ProgressOfDownload } from "../../../common/application-update/progress-of-update-download/progress-of-update-download.injectable"; import type { ProgressOfDownload } from "../../common/progress-of-update-download/progress-of-update-download.injectable";
export type DownloadPlatformUpdate = ( export type DownloadPlatformUpdate = (
onDownloadProgress: (arg: ProgressOfDownload) => void onDownloadProgress: (arg: ProgressOfDownload) => void

View File

@ -2,17 +2,17 @@
* Copyright (c) OpenLens Authors. All rights reserved. * Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getDiForUnitTesting } from "../../getDiForUnitTesting"; import { getDiForUnitTesting } from "../../../../main/getDiForUnitTesting";
import electronUpdaterInjectable from "../../electron-app/features/electron-updater.injectable"; import electronUpdaterInjectable from "../../../../main/electron-app/features/electron-updater.injectable";
import type { DownloadPlatformUpdate } from "./download-platform-update.injectable"; import type { DownloadPlatformUpdate } from "./download-platform-update.injectable";
import downloadPlatformUpdateInjectable from "./download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "./download-platform-update.injectable";
import type { AppUpdater } from "electron-updater"; import type { AppUpdater } from "electron-updater";
import type { AsyncFnMock } from "@async-fn/jest"; import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import { getPromiseStatus } from "../../../common/test-utils/get-promise-status"; import { getPromiseStatus } from "../../../../common/test-utils/get-promise-status";
import type { DiContainer } from "@ogre-tools/injectable"; import type { DiContainer } from "@ogre-tools/injectable";
import loggerInjectable from "../../../common/logger.injectable"; import loggerInjectable from "../../../../common/logger.injectable";
import type { Logger } from "../../../common/logger"; import type { Logger } from "../../../../common/logger";
describe("download-platform-update", () => { describe("download-platform-update", () => {
let downloadPlatformUpdate: DownloadPlatformUpdate; let downloadPlatformUpdate: DownloadPlatformUpdate;

View File

@ -4,13 +4,13 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import downloadPlatformUpdateInjectable from "../download-platform-update/download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "../download-platform-update/download-platform-update.injectable";
import updateIsBeingDownloadedInjectable from "../../../common/application-update/update-is-being-downloaded/update-is-being-downloaded.injectable"; import updateIsBeingDownloadedInjectable from "../../common/update-is-being-downloaded/update-is-being-downloaded.injectable";
import discoveredUpdateVersionInjectable from "../../../common/application-update/discovered-update-version/discovered-update-version.injectable"; import discoveredUpdateVersionInjectable from "../../common/discovered-update-version/discovered-update-version.injectable";
import { action, runInAction } from "mobx"; import { action, runInAction } from "mobx";
import type { ProgressOfDownload } from "../../../common/application-update/progress-of-update-download/progress-of-update-download.injectable"; import type { ProgressOfDownload } from "../../common/progress-of-update-download/progress-of-update-download.injectable";
import progressOfUpdateDownloadInjectable from "../../../common/application-update/progress-of-update-download/progress-of-update-download.injectable"; import progressOfUpdateDownloadInjectable from "../../common/progress-of-update-download/progress-of-update-download.injectable";
import { getCurrentDateTime } from "../../../common/utils/date/get-current-date-time"; import { getCurrentDateTime } from "../../../../common/utils/date/get-current-date-time";
import updateDownloadedDateTimeInjectable from "../../../common/application-update/update-downloaded-date-time/update-downloaded-date-time.injectable"; import updateDownloadedDateTimeInjectable from "../../common/update-downloaded-date-time/update-downloaded-date-time.injectable";
const downloadUpdateInjectable = getInjectable({ const downloadUpdateInjectable = getInjectable({
id: "download-update", id: "download-update",

View File

@ -3,10 +3,10 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { afterApplicationIsLoadedInjectionToken } from "../start-main-application/runnable-tokens/after-application-is-loaded-injection-token"; import { afterApplicationIsLoadedInjectionToken } from "../../../main/start-main-application/runnable-tokens/after-application-is-loaded-injection-token";
import emitEventInjectable from "../../common/app-event-bus/emit-event.injectable"; import emitEventInjectable from "../../../common/app-event-bus/emit-event.injectable";
import { getCurrentDateTime } from "../../common/utils/date/get-current-date-time"; import { getCurrentDateTime } from "../../../common/utils/date/get-current-date-time";
import appVersionInjectable from "../../common/get-configuration-file-model/app-version/app-version.injectable"; import appVersionInjectable from "../../../common/get-configuration-file-model/app-version/app-version.injectable";
const emitCurrentVersionToAnalyticsInjectable = getInjectable({ const emitCurrentVersionToAnalyticsInjectable = getInjectable({
id: "emit-current-version-to-analytics", id: "emit-current-version-to-analytics",

View File

@ -4,11 +4,11 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx"; import { computed } from "mobx";
import { trayMenuItemInjectionToken } from "../../behaviours/tray/main/tray-menu-item/tray-menu-item-injection-token"; import { trayMenuItemInjectionToken } from "../../tray/main/tray-menu-item/tray-menu-item-injection-token";
import discoveredUpdateVersionInjectable from "../../common/application-update/discovered-update-version/discovered-update-version.injectable"; import discoveredUpdateVersionInjectable from "../common/discovered-update-version/discovered-update-version.injectable";
import { withErrorSuppression } from "../../common/utils/with-error-suppression/with-error-suppression"; import { withErrorSuppression } from "../../../common/utils/with-error-suppression/with-error-suppression";
import { pipeline } from "@ogre-tools/fp"; import { pipeline } from "@ogre-tools/fp";
import withErrorLoggingInjectable from "../../common/utils/with-error-logging/with-error-logging.injectable"; import withErrorLoggingInjectable from "../../../common/utils/with-error-logging/with-error-logging.injectable";
import quitAndInstallUpdateInjectable from "./quit-and-install-update.injectable"; import quitAndInstallUpdateInjectable from "./quit-and-install-update.injectable";
import updateIsReadyToBeInstalledInjectable from "./update-is-ready-to-be-installed.injectable"; import updateIsReadyToBeInstalledInjectable from "./update-is-ready-to-be-installed.injectable";

View File

@ -3,9 +3,9 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { getStartableStoppable } from "../../../common/utils/get-startable-stoppable"; import { getStartableStoppable } from "../../../../common/utils/get-startable-stoppable";
import processCheckingForUpdatesInjectable from "../check-for-updates/process-checking-for-updates.injectable"; import processCheckingForUpdatesInjectable from "../check-for-updates/process-checking-for-updates.injectable";
import withOrphanPromiseInjectable from "../../../common/utils/with-orphan-promise/with-orphan-promise.injectable"; import withOrphanPromiseInjectable from "../../../../common/utils/with-orphan-promise/with-orphan-promise.injectable";
const periodicalCheckForUpdatesInjectable = getInjectable({ const periodicalCheckForUpdatesInjectable = getInjectable({
id: "periodical-check-for-updates", id: "periodical-check-for-updates",

View File

@ -4,7 +4,7 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import periodicalCheckForUpdatesInjectable from "./periodical-check-for-updates.injectable"; import periodicalCheckForUpdatesInjectable from "./periodical-check-for-updates.injectable";
import { afterRootFrameIsReadyInjectionToken } from "../../start-main-application/runnable-tokens/after-root-frame-is-ready-injection-token"; import { afterRootFrameIsReadyInjectionToken } from "../../../../main/start-main-application/runnable-tokens/after-root-frame-is-ready-injection-token";
import updatingIsEnabledInjectable from "../updating-is-enabled.injectable"; import updatingIsEnabledInjectable from "../updating-is-enabled.injectable";
const startCheckingForUpdatesInjectable = getInjectable({ const startCheckingForUpdatesInjectable = getInjectable({

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { beforeQuitOfFrontEndInjectionToken } from "../../start-main-application/runnable-tokens/before-quit-of-front-end-injection-token"; import { beforeQuitOfFrontEndInjectionToken } from "../../../../main/start-main-application/runnable-tokens/before-quit-of-front-end-injection-token";
import periodicalCheckForUpdatesInjectable from "./periodical-check-for-updates.injectable"; import periodicalCheckForUpdatesInjectable from "./periodical-check-for-updates.injectable";
const stopCheckingForUpdatesInjectable = getInjectable({ const stopCheckingForUpdatesInjectable = getInjectable({

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import packageJsonInjectable from "../../common/vars/package-json.injectable"; import packageJsonInjectable from "../../../common/vars/package-json.injectable";
import { has } from "lodash/fp"; import { has } from "lodash/fp";
// TOOO: Rename to something less technical // TOOO: Rename to something less technical

View File

@ -3,10 +3,10 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import electronQuitAndInstallUpdateInjectable from "../electron-app/features/electron-quit-and-install-update.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 { getCurrentDateTime } from "../../../common/utils/date/get-current-date-time";
import emitEventInjectable from "../../common/app-event-bus/emit-event.injectable"; import emitEventInjectable from "../../../common/app-event-bus/emit-event.injectable";
import discoveredUpdateVersionInjectable from "../../common/application-update/discovered-update-version/discovered-update-version.injectable"; import discoveredUpdateVersionInjectable from "../common/discovered-update-version/discovered-update-version.injectable";
const quitAndInstallUpdateInjectable = getInjectable({ const quitAndInstallUpdateInjectable = getInjectable({
id: "quit-and-install-update", id: "quit-and-install-update",

View File

@ -3,8 +3,8 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import restartAndInstallUpdateChannel from "../../../common/application-update/restart-and-install-update-channel/restart-and-install-update-channel.injectable"; import restartAndInstallUpdateChannel from "../../common/restart-and-install-update-channel/restart-and-install-update-channel.injectable";
import { messageChannelListenerInjectionToken } from "../../../common/utils/channel/message-channel-listener-injection-token"; import { messageChannelListenerInjectionToken } from "../../../../common/utils/channel/message-channel-listener-injection-token";
import quitAndInstallUpdateInjectable from "../quit-and-install-update.injectable"; import quitAndInstallUpdateInjectable from "../quit-and-install-update.injectable";
const restartAndInstallUpdateListenerInjectable = getInjectable({ const restartAndInstallUpdateListenerInjectable = getInjectable({

View File

@ -4,10 +4,10 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx"; import { computed } from "mobx";
import getTrayIconPathInjectable from "../../../behaviours/tray/main/menu-icon/get-tray-icon-path.injectable"; import getTrayIconPathInjectable from "../../../tray/main/menu-icon/get-tray-icon-path.injectable";
import { trayIconInjectionToken } from "../../../behaviours/tray/main/menu-icon/tray-icon-injection-token"; import { trayIconInjectionToken } from "../../../tray/main/menu-icon/tray-icon-injection-token";
import updatesAreBeingDiscoveredInjectable from "../../../common/application-update/updates-are-being-discovered/updates-are-being-discovered.injectable"; import updatesAreBeingDiscoveredInjectable from "../../common/updates-are-being-discovered/updates-are-being-discovered.injectable";
import updateIsBeingDownloadedInjectable from "../../../common/application-update/update-is-being-downloaded/update-is-being-downloaded.injectable"; import updateIsBeingDownloadedInjectable from "../../common/update-is-being-downloaded/update-is-being-downloaded.injectable";
const checkingForUpdatesTrayIconInjectable = getInjectable({ const checkingForUpdatesTrayIconInjectable = getInjectable({
id: "checking-for-updates-tray-icon", id: "checking-for-updates-tray-icon",

View File

@ -3,8 +3,8 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import getTrayIconPathInjectable from "../../../behaviours/tray/main/menu-icon/get-tray-icon-path.injectable"; import getTrayIconPathInjectable from "../../../tray/main/menu-icon/get-tray-icon-path.injectable";
import { trayIconInjectionToken } from "../../../behaviours/tray/main/menu-icon/tray-icon-injection-token"; import { trayIconInjectionToken } from "../../../tray/main/menu-icon/tray-icon-injection-token";
import updateIsReadyToBeInstalledInjectable from "../update-is-ready-to-be-installed.injectable"; import updateIsReadyToBeInstalledInjectable from "../update-is-ready-to-be-installed.injectable";
const updateIsReadyToBeInstalledTrayIconInjectable = getInjectable({ const updateIsReadyToBeInstalledTrayIconInjectable = getInjectable({

View File

@ -4,8 +4,8 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx"; import { computed } from "mobx";
import discoveredUpdateVersionInjectable from "../../common/application-update/discovered-update-version/discovered-update-version.injectable"; import discoveredUpdateVersionInjectable from "../common/discovered-update-version/discovered-update-version.injectable";
import updateIsBeingDownloadedInjectable from "../../common/application-update/update-is-being-downloaded/update-is-being-downloaded.injectable"; import updateIsBeingDownloadedInjectable from "../common/update-is-being-downloaded/update-is-being-downloaded.injectable";
const updateIsReadyToBeInstalledInjectable = getInjectable({ const updateIsReadyToBeInstalledInjectable = getInjectable({
id: "update-is-ready-to-be-installed", id: "update-is-ready-to-be-installed",

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import electronUpdaterIsActiveInjectable from "../electron-app/features/electron-updater-is-active.injectable"; import electronUpdaterIsActiveInjectable from "../../../main/electron-app/features/electron-updater-is-active.injectable";
import publishIsConfiguredInjectable from "./publish-is-configured.injectable"; import publishIsConfiguredInjectable from "./publish-is-configured.injectable";
const updatingIsEnabledInjectable = getInjectable({ const updatingIsEnabledInjectable = getInjectable({

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { onLoadOfApplicationInjectionToken } from "../../start-main-application/runnable-tokens/on-load-of-application-injection-token"; import { onLoadOfApplicationInjectionToken } from "../../../../main/start-main-application/runnable-tokens/on-load-of-application-injection-token";
import watchIfUpdateShouldHappenOnQuitInjectable from "./watch-if-update-should-happen-on-quit.injectable"; import watchIfUpdateShouldHappenOnQuitInjectable from "./watch-if-update-should-happen-on-quit.injectable";
const startWatchingIfUpdateShouldHappenOnQuitInjectable = getInjectable({ const startWatchingIfUpdateShouldHappenOnQuitInjectable = getInjectable({

View File

@ -4,7 +4,7 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import watchIfUpdateShouldHappenOnQuitInjectable from "./watch-if-update-should-happen-on-quit.injectable"; import watchIfUpdateShouldHappenOnQuitInjectable from "./watch-if-update-should-happen-on-quit.injectable";
import { beforeQuitOfBackEndInjectionToken } from "../../start-main-application/runnable-tokens/before-quit-of-back-end-injection-token"; import { beforeQuitOfBackEndInjectionToken } from "../../../../main/start-main-application/runnable-tokens/before-quit-of-back-end-injection-token";
const stopWatchingIfUpdateShouldHappenOnQuitInjectable = getInjectable({ const stopWatchingIfUpdateShouldHappenOnQuitInjectable = getInjectable({
id: "stop-watching-if-update-should-happen-on-quit", id: "stop-watching-if-update-should-happen-on-quit",

View File

@ -4,11 +4,11 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { autorun } from "mobx"; import { autorun } from "mobx";
import { getStartableStoppable } from "../../../common/utils/get-startable-stoppable"; import { getStartableStoppable } from "../../../../common/utils/get-startable-stoppable";
import setUpdateOnQuitInjectable from "../../electron-app/features/set-update-on-quit.injectable"; import setUpdateOnQuitInjectable from "../../../../main/electron-app/features/set-update-on-quit.injectable";
import selectedUpdateChannelInjectable from "../../../common/application-update/selected-update-channel/selected-update-channel.injectable"; import selectedUpdateChannelInjectable from "../../common/selected-update-channel/selected-update-channel.injectable";
import type { UpdateChannel } from "../../../common/application-update/update-channels"; import type { UpdateChannel } from "../../common/update-channels";
import discoveredUpdateVersionInjectable from "../../../common/application-update/discovered-update-version/discovered-update-version.injectable"; import discoveredUpdateVersionInjectable from "../../common/discovered-update-version/discovered-update-version.injectable";
const watchIfUpdateShouldHappenOnQuitInjectable = getInjectable({ const watchIfUpdateShouldHappenOnQuitInjectable = getInjectable({
id: "watch-if-update-should-happen-on-quit", id: "watch-if-update-should-happen-on-quit",

View File

@ -6,11 +6,11 @@ import type { ApplicationBuilder } from "../../renderer/components/test-utils/ge
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import type { RenderResult } from "@testing-library/react"; import type { RenderResult } from "@testing-library/react";
import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable"; import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable";
import publishIsConfiguredInjectable from "../../main/application-update/publish-is-configured.injectable"; import publishIsConfiguredInjectable from "./main/publish-is-configured.injectable";
import type { AsyncFnMock } from "@async-fn/jest"; import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable"; import processCheckingForUpdatesInjectable from "./main/check-for-updates/process-checking-for-updates.injectable";
import periodicalCheckForUpdatesInjectable from "../../main/application-update/periodical-check-for-updates/periodical-check-for-updates.injectable"; import periodicalCheckForUpdatesInjectable from "./main/periodical-check-for-updates/periodical-check-for-updates.injectable";
import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time"; import { advanceFakeTime, useFakeTime } from "../../common/test-utils/use-fake-time";
const ENOUGH_TIME = 1000 * 60 * 60 * 2; const ENOUGH_TIME = 1000 * 60 * 60 * 2;

View File

@ -4,10 +4,10 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx"; import { computed } from "mobx";
import { rootFrameChildComponentInjectionToken } from "../../frames/root-frame/root-frame-child-component-injection-token"; import { rootFrameChildComponentInjectionToken } from "../../../../renderer/frames/root-frame/root-frame-child-component-injection-token";
import { ForceUpdateModal } from "./force-update-modal"; import { ForceUpdateModal } from "./force-update-modal";
import timeSinceUpdateWasDownloadedInjectable from "./time-since-update-was-downloaded.injectable"; import timeSinceUpdateWasDownloadedInjectable from "./time-since-update-was-downloaded.injectable";
import updateDownloadedDateTimeInjectable from "../../../common/application-update/update-downloaded-date-time/update-downloaded-date-time.injectable"; import updateDownloadedDateTimeInjectable from "../../common/update-downloaded-date-time/update-downloaded-date-time.injectable";
import timeAfterUpdateMustBeInstalledInjectable from "./time-after-update-must-be-installed.injectable"; import timeAfterUpdateMustBeInstalledInjectable from "./time-after-update-must-be-installed.injectable";
const forceUpdateModalRootFrameComponentInjectable = getInjectable({ const forceUpdateModalRootFrameComponentInjectable = getInjectable({

View File

@ -4,13 +4,13 @@
*/ */
import { withInjectables } from "@ogre-tools/injectable-react"; import { withInjectables } from "@ogre-tools/injectable-react";
import React from "react"; import React from "react";
import restartAndInstallUpdateInjectable from "../../components/update-button/restart-and-install-update.injectable"; import restartAndInstallUpdateInjectable from "../update-button/restart-and-install-update.injectable";
import { Countdown } from "../../components/countdown/countdown"; import { Countdown } from "../../../../renderer/components/countdown/countdown";
import type { IComputedValue } from "mobx"; import type { IComputedValue } from "mobx";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import installUpdateCountdownInjectable from "./install-update-countdown.injectable"; import installUpdateCountdownInjectable from "./install-update-countdown.injectable";
import { Dialog } from "../../components/dialog"; import { Dialog } from "../../../../renderer/components/dialog";
import { Button } from "../../components/button"; import { Button } from "../../../../renderer/components/button";
import styles from "./force-update-modal.module.scss"; import styles from "./force-update-modal.module.scss";
interface Dependencies { interface Dependencies {

View File

@ -3,9 +3,9 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import countdownStateInjectable from "../../components/countdown/countdown-state.injectable"; import countdownStateInjectable from "../../../../renderer/components/countdown/countdown-state.injectable";
import secondsAfterInstallStartsInjectable from "./seconds-after-install-starts.injectable"; import secondsAfterInstallStartsInjectable from "./seconds-after-install-starts.injectable";
import restartAndInstallUpdateInjectable from "../../components/update-button/restart-and-install-update.injectable"; import restartAndInstallUpdateInjectable from "../update-button/restart-and-install-update.injectable";
const installUpdateCountdownInjectable = getInjectable({ const installUpdateCountdownInjectable = getInjectable({
id: "install-update-countdown", id: "install-update-countdown",

View File

@ -6,8 +6,8 @@ import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert"; import assert from "assert";
import { computed } from "mobx"; import { computed } from "mobx";
import moment from "moment"; import moment from "moment";
import updateDownloadedDateTimeInjectable from "../../../common/application-update/update-downloaded-date-time/update-downloaded-date-time.injectable"; import updateDownloadedDateTimeInjectable from "../../common/update-downloaded-date-time/update-downloaded-date-time.injectable";
import { reactiveNow } from "../../../common/utils/reactive-now/reactive-now"; import { reactiveNow } from "../../../../common/utils/reactive-now/reactive-now";
const timeSinceUpdateWasDownloadedInjectable = getInjectable({ const timeSinceUpdateWasDownloadedInjectable = getInjectable({
id: "time-since-update-was-downloaded", id: "time-since-update-was-downloaded",

View File

@ -3,8 +3,8 @@
* Licensed under MIT License. See LICENSE in root directory for more information. * Licensed under MIT License. See LICENSE in root directory for more information.
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import restartAndInstallUpdateChannel from "../../../common/application-update/restart-and-install-update-channel/restart-and-install-update-channel.injectable"; import restartAndInstallUpdateChannel from "../../common/restart-and-install-update-channel/restart-and-install-update-channel.injectable";
import messageToChannelInjectable from "../../utils/channel/message-to-channel.injectable"; import messageToChannelInjectable from "../../../../renderer/utils/channel/message-to-channel.injectable";
const restartAndInstallUpdateInjectable = getInjectable({ const restartAndInstallUpdateInjectable = getInjectable({
id: "restart-and-install-update", id: "restart-and-install-update",

View File

@ -7,10 +7,10 @@ import styles from "./styles.module.scss";
import type { HTMLAttributes } from "react"; import type { HTMLAttributes } from "react";
import React, { useState } from "react"; import React, { useState } from "react";
import { Menu, MenuItem } from "../menu"; import { Menu, MenuItem } from "../../../../renderer/components/menu";
import { cssNames } from "../../utils"; import { cssNames } from "../../../../renderer/utils";
import type { IconProps } from "../icon"; import type { IconProps } from "../../../../renderer/components/icon";
import { Icon } from "../icon"; import { Icon } from "../../../../renderer/components/icon";
import { withInjectables } from "@ogre-tools/injectable-react"; import { withInjectables } from "@ogre-tools/injectable-react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import type { IComputedValue } from "mobx"; import type { IComputedValue } from "mobx";

View File

@ -4,8 +4,8 @@
*/ */
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx"; import { computed } from "mobx";
import updateDownloadedDateTimeInjectable from "../../../common/application-update/update-downloaded-date-time/update-downloaded-date-time.injectable"; import updateDownloadedDateTimeInjectable from "../../common/update-downloaded-date-time/update-downloaded-date-time.injectable";
import { reactiveNow } from "../../../common/utils/reactive-now/reactive-now"; import { reactiveNow } from "../../../../common/utils/reactive-now/reactive-now";
const updateWarningLevelInjectable = getInjectable({ const updateWarningLevelInjectable = getInjectable({
id: "update-warning-level", id: "update-warning-level",

View File

@ -4,23 +4,23 @@
*/ */
import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder"; import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
import quitAndInstallUpdateInjectable from "../../main/application-update/quit-and-install-update.injectable"; import quitAndInstallUpdateInjectable from "./main/quit-and-install-update.injectable";
import type { RenderResult } from "@testing-library/react"; import type { RenderResult } from "@testing-library/react";
import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable"; import electronUpdaterIsActiveInjectable from "../../main/electron-app/features/electron-updater-is-active.injectable";
import publishIsConfiguredInjectable from "../../main/application-update/publish-is-configured.injectable"; import publishIsConfiguredInjectable from "./main/publish-is-configured.injectable";
import type { CheckForPlatformUpdates } from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import type { CheckForPlatformUpdates } from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import checkForPlatformUpdatesInjectable from "../../main/application-update/check-for-platform-updates/check-for-platform-updates.injectable"; import checkForPlatformUpdatesInjectable from "./main/check-for-platform-updates/check-for-platform-updates.injectable";
import type { AsyncFnMock } from "@async-fn/jest"; import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest"; import asyncFn from "@async-fn/jest";
import type { UpdateChannel, UpdateChannelId } from "../../common/application-update/update-channels"; import type { UpdateChannel, UpdateChannelId } from "./common/update-channels";
import { updateChannels } from "../../common/application-update/update-channels"; import { updateChannels } from "./common/update-channels";
import type { DownloadPlatformUpdate } from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import type { DownloadPlatformUpdate } from "./main/download-platform-update/download-platform-update.injectable";
import downloadPlatformUpdateInjectable from "../../main/application-update/download-platform-update/download-platform-update.injectable"; import downloadPlatformUpdateInjectable from "./main/download-platform-update/download-platform-update.injectable";
import selectedUpdateChannelInjectable from "../../common/application-update/selected-update-channel/selected-update-channel.injectable"; import selectedUpdateChannelInjectable from "./common/selected-update-channel/selected-update-channel.injectable";
import type { IComputedValue } from "mobx"; import type { IComputedValue } from "mobx";
import setUpdateOnQuitInjectable from "../../main/electron-app/features/set-update-on-quit.injectable"; import setUpdateOnQuitInjectable from "../../main/electron-app/features/set-update-on-quit.injectable";
import showInfoNotificationInjectable from "../../renderer/components/notifications/show-info-notification.injectable"; import showInfoNotificationInjectable from "../../renderer/components/notifications/show-info-notification.injectable";
import processCheckingForUpdatesInjectable from "../../main/application-update/check-for-updates/process-checking-for-updates.injectable"; import processCheckingForUpdatesInjectable from "./main/check-for-updates/process-checking-for-updates.injectable";
import appVersionInjectable from "../../common/get-configuration-file-model/app-version/app-version.injectable"; import appVersionInjectable from "../../common/get-configuration-file-model/app-version/app-version.injectable";
describe("selection of update stability", () => { describe("selection of update stability", () => {