#!/usr/bin/env node
import { Command } from 'commander';
import { buildCommand } from './src/commands/apim/build.js';
import { deployCommand } from './src/commands/apim/deploy.js';
import { testCommand } from './src/commands/apim/test.js';
import { validateNodeVersion } from './src/validators/version-validator.js';

validateNodeVersion(process.version);

// Main program
const program = new Command();

const VERSION = '12.1.0.1'; // keep in sync with package.json

program
  .name('apic') // 👈 this sets the CLI name shown in help
  .description('Command Line Interface for apic')
  .version(VERSION, '-v, --version', 'display version number');

// Attach commands directly
program.addCommand(buildCommand);
program.addCommand(deployCommand);
program.addCommand(testCommand);

program.parse(process.argv);
