diff --git a/clients/js/packages/cli/src/index.ts b/clients/js/packages/cli/src/index.ts index 3e5920bb..a5af779e 100755 --- a/clients/js/packages/cli/src/index.ts +++ b/clients/js/packages/cli/src/index.ts @@ -29,7 +29,7 @@ const questions: Question[] = params.map(name => ({ name, type: 'text' })); // Filter questions based on the command function getQuestionsForCommand(command: string): Question[] { const commonQuestions = questions.filter(q => q.name !== 'config'); - if (['start', 'deploy', 'start-ports', 'wait-for-pods'].includes(command)) { + if (['start', 'deploy', 'start-ports', 'wait-for-pods', 'check'].includes(command)) { return questions; // Include all questions, including config } else { return commonQuestions; // Exclude config @@ -103,6 +103,9 @@ async function main() { case 'undeploy': client.deleteHelm(); break; + case 'check': + client.check(); + break; default: console.log(`Unknown command: ${command}`); displayUsage(); diff --git a/clients/js/packages/client/src/client.ts b/clients/js/packages/client/src/client.ts index 0d7186f4..2aca37af 100644 --- a/clients/js/packages/client/src/client.ts +++ b/clients/js/packages/client/src/client.ts @@ -595,4 +595,10 @@ export class StarshipClient implements StarshipClientI { console.log(pid); }); } + + public check(): void { + this.checkDependencies(); + this.exec(['helm', 'version']); + this.exec(['kubectl', 'version', '--short']); + } }