mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixup type errors due to new Runnable requirements
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
effa43eb76
commit
87d4952179
110 files changed
+828
-1055
No files matched your search
@@ -18,38 +18,35 @@ import { beforeAnythingInjectionToken } from "@k8slens/application-for-electron-
|
||||
const setupAppPathsInjectable = getInjectable({
|
||||
id: "setup-app-paths",
|
||||
|
||||
instantiate: (di) => {
|
||||
const setElectronAppPath = di.inject(setElectronAppPathInjectable);
|
||||
const appName = di.inject(appNameInjectable);
|
||||
const getElectronAppPath = di.inject(getElectronAppPathInjectable);
|
||||
const appPathsState = di.inject(appPathsStateInjectable);
|
||||
const directoryForIntegrationTesting = di.inject(directoryForIntegrationTestingInjectable);
|
||||
const joinPaths = di.inject(joinPathsInjectable);
|
||||
instantiate: (di) => ({
|
||||
run: () => {
|
||||
const setElectronAppPath = di.inject(setElectronAppPathInjectable);
|
||||
const appName = di.inject(appNameInjectable);
|
||||
const getElectronAppPath = di.inject(getElectronAppPathInjectable);
|
||||
const appPathsState = di.inject(appPathsStateInjectable);
|
||||
const directoryForIntegrationTesting = di.inject(directoryForIntegrationTestingInjectable);
|
||||
const joinPaths = di.inject(joinPathsInjectable);
|
||||
|
||||
return {
|
||||
id: "setup-app-paths",
|
||||
run: () => {
|
||||
if (directoryForIntegrationTesting) {
|
||||
setElectronAppPath("appData", directoryForIntegrationTesting);
|
||||
}
|
||||
if (directoryForIntegrationTesting) {
|
||||
setElectronAppPath("appData", directoryForIntegrationTesting);
|
||||
}
|
||||
|
||||
const appDataPath = getElectronAppPath("appData");
|
||||
const appDataPath = getElectronAppPath("appData");
|
||||
|
||||
setElectronAppPath("userData", joinPaths(appDataPath, appName));
|
||||
setElectronAppPath("userData", joinPaths(appDataPath, appName));
|
||||
|
||||
const appPaths = pipeline(
|
||||
pathNames,
|
||||
map(name => [name, getElectronAppPath(name)]),
|
||||
fromPairs,
|
||||
) as AppPaths;
|
||||
const appPaths = pipeline(
|
||||
pathNames,
|
||||
map(name => [name, getElectronAppPath(name)]),
|
||||
fromPairs,
|
||||
) as AppPaths;
|
||||
|
||||
appPathsState.set(appPaths);
|
||||
appPathsState.set(appPaths);
|
||||
|
||||
// NOTE: this is the worse of two evils. This makes sure that `RunnableSync` always is sync
|
||||
return undefined;
|
||||
},
|
||||
};
|
||||
},
|
||||
// NOTE: this is the worse of two evils. This makes sure that `RunnableSync` always is sync
|
||||
return undefined;
|
||||
},
|
||||
}),
|
||||
|
||||
injectionToken: beforeAnythingInjectionToken,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user