29 lines
598 B
JavaScript
29 lines
598 B
JavaScript
#!/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
|
|
main().catch((error) => {
|
|
logger.error(`Error: ${error}`);
|
|
process.exit(1);
|
|
});
|
|
|
|
// Export for library usage
|
|
export { logger };
|
|
export * from './moxytool.cli.ts';
|