mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
29 lines
1010 B
TypeScript
29 lines
1010 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
import { getInjectable } from "@ogre-tools/injectable";
|
|
import createSyncBoxInjectable from "../../utils/sync-box/create-sync-box.injectable";
|
|
import type { UpdateChannel } from "../update-channels";
|
|
import type { SyncBox } from "../../utils/sync-box/sync-box-injection-token";
|
|
import { syncBoxInjectionToken } from "../../utils/sync-box/sync-box-injection-token";
|
|
|
|
export type DiscoveredUpdateVersion = SyncBox<{ version: string; updateChannel: UpdateChannel } | null>;
|
|
|
|
const discoveredUpdateVersionInjectable = getInjectable({
|
|
id: "discovered-update-version",
|
|
|
|
instantiate: (di) => {
|
|
const createSyncBox = di.inject(createSyncBoxInjectable);
|
|
|
|
return createSyncBox(
|
|
"discovered-update-version",
|
|
null,
|
|
) as DiscoveredUpdateVersion;
|
|
},
|
|
|
|
injectionToken: syncBoxInjectionToken,
|
|
});
|
|
|
|
export default discoveredUpdateVersionInjectable;
|