diff --git a/src/main/start-main-application/runnables/sentry/setup.injectable.ts b/src/main/start-main-application/runnables/sentry/setup.injectable.ts index 59eacc4199..9db6991fea 100644 --- a/src/main/start-main-application/runnables/sentry/setup.injectable.ts +++ b/src/main/start-main-application/runnables/sentry/setup.injectable.ts @@ -14,6 +14,7 @@ const setupSentryInjectable = getInjectable({ const initializeSentryOnMain = di.inject(initializeSentryOnMainInjectable); return { + id: "setup-sentry", run: () => initializeSentryReportingWith(initializeSentryOnMain), }; }, diff --git a/src/main/stores/init-user-store.injectable.ts b/src/main/stores/init-user-store.injectable.ts index 572c0154e4..c8d7ec9fe0 100644 --- a/src/main/stores/init-user-store.injectable.ts +++ b/src/main/stores/init-user-store.injectable.ts @@ -6,7 +6,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import userStoreFileNameMigrationInjectable from "../../common/user-store/file-name-migration.injectable"; import userStoreInjectable from "../../common/user-store/user-store.injectable"; import { beforeApplicationIsLoadingInjectionToken } from "../start-main-application/runnable-tokens/before-application-is-loading-injection-token"; -import initDefaultUpdateChannelInjectableInjectable from "../vars/default-update-channel/init.injectable"; +import initDefaultUpdateChannelInjectable from "../vars/default-update-channel/init.injectable"; const initUserStoreInjectable = getInjectable({ id: "init-user-store", @@ -15,11 +15,12 @@ const initUserStoreInjectable = getInjectable({ const userStoreFileNameMigration = di.inject(userStoreFileNameMigrationInjectable); return { + id: "init-user-store", run: async () => { await userStoreFileNameMigration(); userStore.load(); }, - runAfter: di.inject(initDefaultUpdateChannelInjectableInjectable), + runAfter: di.inject(initDefaultUpdateChannelInjectable), }; }, injectionToken: beforeApplicationIsLoadingInjectionToken, diff --git a/src/main/vars/build-version/init.injectable.ts b/src/main/vars/build-version/init.injectable.ts index 0d879715a4..f53e735a47 100644 --- a/src/main/vars/build-version/init.injectable.ts +++ b/src/main/vars/build-version/init.injectable.ts @@ -6,16 +6,17 @@ import { getInjectable } from "@ogre-tools/injectable"; import { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token"; import buildVersionInjectable from "./build-version.injectable"; -const initializeBuildVersionAsyncSyncBoxInjectable = getInjectable({ - id: "initialize-build-version-async-sync-box", +const initializeBuildVersionInjectable = getInjectable({ + id: "initialize-build-version", instantiate: (di) => { const buildVersion = di.inject(buildVersionInjectable); return { + id: "initialize-build-version", run: () => buildVersion.init(), }; }, injectionToken: beforeApplicationIsLoadingInjectionToken, }); -export default initializeBuildVersionAsyncSyncBoxInjectable; +export default initializeBuildVersionInjectable; diff --git a/src/main/vars/default-update-channel/init.injectable.ts b/src/main/vars/default-update-channel/init.injectable.ts index e1680efa39..be588780af 100644 --- a/src/main/vars/default-update-channel/init.injectable.ts +++ b/src/main/vars/default-update-channel/init.injectable.ts @@ -7,12 +7,13 @@ import defaultUpdateChannelInjectable from "../../../common/application-update/s import { beforeApplicationIsLoadingInjectionToken } from "../../start-main-application/runnable-tokens/before-application-is-loading-injection-token"; import initReleaseChannelInjectable from "../release-channel/init.injectable"; -const initDefaultUpdateChannelInjectableInjectable = getInjectable({ - id: "init-default-update-channel-injectable", +const initDefaultUpdateChannelInjectable = getInjectable({ + id: "init-default-update-channel", instantiate: (di) => { const defaultUpdateChannel = di.inject(defaultUpdateChannelInjectable); return { + id: "init-default-update-channel", run: () => defaultUpdateChannel.init(), runAfter: di.inject(initReleaseChannelInjectable), }; @@ -20,4 +21,4 @@ const initDefaultUpdateChannelInjectableInjectable = getInjectable({ injectionToken: beforeApplicationIsLoadingInjectionToken, }); -export default initDefaultUpdateChannelInjectableInjectable; +export default initDefaultUpdateChannelInjectable; diff --git a/src/main/vars/release-channel/init.injectable.ts b/src/main/vars/release-channel/init.injectable.ts index ed358af550..59527d2194 100644 --- a/src/main/vars/release-channel/init.injectable.ts +++ b/src/main/vars/release-channel/init.injectable.ts @@ -13,6 +13,7 @@ const initReleaseChannelInjectable = getInjectable({ const releaseChannel = di.inject(releaseChannelInjectable); return { + id: "init-release-channel", run: () => releaseChannel.init(), runAfter: di.inject(initSemanticBuildVersionInjectable), }; diff --git a/src/main/vars/semantic-build-version/init.injectable.ts b/src/main/vars/semantic-build-version/init.injectable.ts index 8b33e27576..ee822a8796 100644 --- a/src/main/vars/semantic-build-version/init.injectable.ts +++ b/src/main/vars/semantic-build-version/init.injectable.ts @@ -13,6 +13,7 @@ const initSemanticBuildVersionInjectable = getInjectable({ const buildSemanticVersion = di.inject(buildSemanticVersionInjectable); return { + id: "init-semantic-build-version", run: () => buildSemanticVersion.init(), runAfter: di.inject(initializeBuildVersionInjectable), }; diff --git a/src/renderer/stores/init-user-store.injectable.ts b/src/renderer/stores/init-user-store.injectable.ts index 36f2caf015..2c5b15dd1b 100644 --- a/src/renderer/stores/init-user-store.injectable.ts +++ b/src/renderer/stores/init-user-store.injectable.ts @@ -5,7 +5,7 @@ import { getInjectable } from "@ogre-tools/injectable"; import userStoreInjectable from "../../common/user-store/user-store.injectable"; import { beforeFrameStartsInjectionToken } from "../before-frame-starts/before-frame-starts-injection-token"; -import initDefaultUpdateChannelInjectableInjectable from "../vars/default-update-channel/init.injectable"; +import initDefaultUpdateChannelInjectable from "../vars/default-update-channel/init.injectable"; const initUserStoreInjectable = getInjectable({ id: "init-user-store", @@ -13,8 +13,9 @@ const initUserStoreInjectable = getInjectable({ const userStore = di.inject(userStoreInjectable); return { + id: "init-user-store", run: () => userStore.load(), - runAfter: di.inject(initDefaultUpdateChannelInjectableInjectable), + runAfter: di.inject(initDefaultUpdateChannelInjectable), }; }, injectionToken: beforeFrameStartsInjectionToken, diff --git a/src/renderer/vars/build-version/init.injectable.ts b/src/renderer/vars/build-version/init.injectable.ts index 0dc867f0ca..25aeb8d2bc 100644 --- a/src/renderer/vars/build-version/init.injectable.ts +++ b/src/renderer/vars/build-version/init.injectable.ts @@ -12,6 +12,7 @@ const initializeBuildVersionInjectable = getInjectable({ const buildVersion = di.inject(buildVersionInjectable); return { + id: "initialize-build-version", run: () => buildVersion.init(), }; }, diff --git a/src/renderer/vars/default-update-channel/init.injectable.ts b/src/renderer/vars/default-update-channel/init.injectable.ts index e486be0aaf..36bbec8157 100644 --- a/src/renderer/vars/default-update-channel/init.injectable.ts +++ b/src/renderer/vars/default-update-channel/init.injectable.ts @@ -7,12 +7,13 @@ import defaultUpdateChannelInjectable from "../../../common/application-update/s import { beforeFrameStartsInjectionToken } from "../../before-frame-starts/before-frame-starts-injection-token"; import initReleaseChannelInjectable from "../release-channel/init.injectable"; -const initDefaultUpdateChannelInjectableInjectable = getInjectable({ - id: "init-default-update-channel-injectable", +const initDefaultUpdateChannelInjectable = getInjectable({ + id: "init-default-update-channel", instantiate: (di) => { const defaultUpdateChannel = di.inject(defaultUpdateChannelInjectable); return { + id: "init-default-update-channel", run: () => defaultUpdateChannel.init(), runAfter: di.inject(initReleaseChannelInjectable), }; @@ -20,4 +21,4 @@ const initDefaultUpdateChannelInjectableInjectable = getInjectable({ injectionToken: beforeFrameStartsInjectionToken, }); -export default initDefaultUpdateChannelInjectableInjectable; +export default initDefaultUpdateChannelInjectable; diff --git a/src/renderer/vars/release-channel/init.injectable.ts b/src/renderer/vars/release-channel/init.injectable.ts index f384fd2716..14e92fccda 100644 --- a/src/renderer/vars/release-channel/init.injectable.ts +++ b/src/renderer/vars/release-channel/init.injectable.ts @@ -13,6 +13,7 @@ const initReleaseChannelInjectable = getInjectable({ const releaseChannel = di.inject(releaseChannelInjectable); return { + id: "init-release-channel", run: () => releaseChannel.init(), runAfter: di.inject(initSemanticBuildVersionInjectable), }; diff --git a/src/renderer/vars/semantic-build-version/init.injectable.ts b/src/renderer/vars/semantic-build-version/init.injectable.ts index 572ccc63ac..393143219f 100644 --- a/src/renderer/vars/semantic-build-version/init.injectable.ts +++ b/src/renderer/vars/semantic-build-version/init.injectable.ts @@ -13,6 +13,7 @@ const initSemanticBuildVersionInjectable = getInjectable({ const buildSemanticVersion = di.inject(buildSemanticVersionInjectable); return { + id: "init-semantic-build-version", run: () => buildSemanticVersion.init(), runAfter: di.inject(initializeBuildVersionInjectable), };