Vidya reddy prettier (#58)

* upgraded to Node16

* Enforce Prettier

* code fix

* jest version change and prettify code

Co-authored-by: Vidya Reddy <vidyareddy@microsoft.com>
This commit is contained in:
Vidya Reddy 2022-06-27 15:31:07 -07:00 committed by GitHub
parent b474dc39ef
commit 2eb2a370ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 11418 additions and 11311 deletions

View file

@ -1,31 +1,43 @@
import * as os from 'os';
import * as util from 'util';
import * as os from 'os'
import * as util from 'util'
export function getKubectlArch(): string {
const arch = os.arch();
if (arch === 'x64') {
return 'amd64';
}
return arch;
const arch = os.arch()
if (arch === 'x64') {
return 'amd64'
}
return arch
}
export function getkubectlDownloadURL(version: string, arch: string): string {
switch (os.type()) {
case 'Linux':
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl', version, arch);
switch (os.type()) {
case 'Linux':
return util.format(
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/%s/kubectl',
version,
arch
)
case 'Darwin':
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/%s/kubectl', version, arch);
case 'Darwin':
return util.format(
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/darwin/%s/kubectl',
version,
arch
)
case 'Windows_NT':
default:
return util.format('https://storage.googleapis.com/kubernetes-release/release/%s/bin/windows/%s/kubectl.exe', version, arch);
}
case 'Windows_NT':
default:
return util.format(
'https://storage.googleapis.com/kubernetes-release/release/%s/bin/windows/%s/kubectl.exe',
version,
arch
)
}
}
export function getExecutableExtension(): string {
if (os.type().match(/^Win/)) {
return '.exe';
}
return '';
}
if (os.type().match(/^Win/)) {
return '.exe'
}
return ''
}