2025-10-27 11:27:44 +00:00
|
|
|
#!/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
|
2025-10-27 17:29:52 +00:00
|
|
|
// Note: This file is only used as the Node.js entry point
|
2025-10-27 11:27:44 +00:00
|
|
|
main().catch((error) => {
|
2025-10-27 17:29:52 +00:00
|
|
|
logger.log('error', `Error: ${error}`);
|
2025-10-27 11:27:44 +00:00
|
|
|
process.exit(1);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Export for library usage
|
|
|
|
|
export { logger };
|
|
|
|
|
export * from './moxytool.cli.ts';
|