mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
15 lines
552 B
TypeScript
15 lines
552 B
TypeScript
/**
|
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
|
*/
|
|
import { fromPairs } from "lodash/fp";
|
|
import { pathNames, PathName } from "../../common/app-paths/app-path-names";
|
|
import type { AppPaths } from "../../common/app-paths/app-path-injection-token";
|
|
|
|
interface Dependencies {
|
|
getAppPath: (name: PathName) => string;
|
|
}
|
|
|
|
export const getAppPaths = ({ getAppPath }: Dependencies) =>
|
|
fromPairs(pathNames.map((name) => [name, getAppPath(name)])) as AppPaths;
|