Files
moxytool/ts/index.ts

30 lines
664 B
TypeScript
Raw Permalink Normal View History

#!/usr/bin/env node
/**
* MOXYTOOL - Proxmox Administration Tool
* Node.js entry point for library usage
*/
import * as cli from './moxytool.cli.ts';
import { logger } from './moxytool.logging.ts';
import process from 'node:process';
/**
* Main entry point for MOXYTOOL
* Initializes the CLI and executes the given command
*/
async function main() {
await cli.runCli();
}
// Run the main function and handle any errors
// Note: This file is only used as the Node.js entry point
main().catch((error) => {
logger.log('error', `Error: ${error}`);
process.exit(1);
});
// Export for library usage
export { logger };
export * from './moxytool.cli.ts';