mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add new NormalizedPlatform type
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
7cbf59dc86
commit
1aef332a7c
@ -5,10 +5,12 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import platformInjectable from "./platform.injectable";
|
||||
|
||||
export type NormalizedPlatform = "darwin" | "linux" | "windows";
|
||||
|
||||
const normalizedPlatformInjectable = getInjectable({
|
||||
id: "normalized-platform",
|
||||
|
||||
instantiate: (di) => {
|
||||
instantiate: (di): NormalizedPlatform => {
|
||||
const platform = di.inject(platformInjectable);
|
||||
|
||||
switch (platform) {
|
||||
|
||||
@ -17,12 +17,13 @@ import { noop } from "lodash/fp";
|
||||
import type { JoinPaths } from "../../common/path/join-paths.injectable";
|
||||
import type { GetDirnameOfPath } from "../../common/path/get-dirname.injectable";
|
||||
import type { GetBasenameOfPath } from "../../common/path/get-basename.injectable";
|
||||
import type { NormalizedPlatform } from "../../common/vars/normalized-platform.injectable";
|
||||
|
||||
const initScriptVersionString = "# lens-initscript v3";
|
||||
|
||||
export interface KubectlDependencies {
|
||||
readonly directoryForKubectlBinaries: string;
|
||||
readonly normalizedDownloadPlatform: "darwin" | "linux" | "windows";
|
||||
readonly normalizedDownloadPlatform: NormalizedPlatform;
|
||||
readonly normalizedDownloadArch: "amd64" | "arm64" | "386";
|
||||
readonly kubectlBinaryName: string;
|
||||
readonly bundledKubectlBinaryPath: string;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user