added exports in all functions

This commit is contained in:
Atharva Mulmuley
2021-06-03 11:37:21 +05:30
parent 1245f455e5
commit 1efc794ed7
4 changed files with 14 additions and 7 deletions
+2 -2
View File
@@ -64,11 +64,11 @@ export async function getArcKubeconfig(): Promise<string> {
}
}
function sleep(ms) {
export function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function executeAzCliCommand(
export async function executeAzCliCommand(
command: string,
silent?: boolean,
execOptions: any = {},
+5 -5
View File
@@ -9,7 +9,7 @@ import * as jsyaml from 'js-yaml';
import * as util from 'util';
import { getArcKubeconfig } from './arc-login';
function getKubeconfig(): string {
export function getKubeconfig(): string {
const method = core.getInput('method', { required: true });
if (method == 'kubeconfig') {
const kubeconfig = core.getInput('kubeconfig', { required: true });
@@ -67,7 +67,7 @@ function getKubeconfig(): string {
}
}
function getExecutableExtension(): string {
export function getExecutableExtension(): string {
if (os.type().match(/^Win/)) {
return '.exe';
}
@@ -75,7 +75,7 @@ function getExecutableExtension(): string {
return '';
}
async function getKubectlPath() {
export async function getKubectlPath() {
let kubectlPath = await io.which('kubectl', false);
if (!kubectlPath) {
const allVersions = toolCache.findAllVersions('kubectl');
@@ -89,7 +89,7 @@ async function getKubectlPath() {
return kubectlPath;
}
async function setContext(kubeconfigPath: string) {
export async function setContext(kubeconfigPath: string) {
let context = core.getInput('context');
if (context) {
//To use kubectl commands, the environment variable KUBECONFIG needs to be set for this step
@@ -102,7 +102,7 @@ async function setContext(kubeconfigPath: string) {
}
}
async function run() {
export async function run() {
try {
let kubeconfig = '';
const cluster_type = core.getInput('cluster-type', { required: true });