2025-03-25 09:06:23 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
2025-10-18 11:59:55 +00:00
|
|
|
import { NupstCli } from './cli.ts';
|
|
|
|
import { logger } from './logger.ts';
|
2025-10-19 13:14:18 +00:00
|
|
|
import process from 'node:process';
|
2025-03-25 09:06:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Main entry point for NUPST
|
|
|
|
* Initializes the CLI and executes the given command
|
|
|
|
*/
|
|
|
|
async function main() {
|
|
|
|
const cli = new NupstCli();
|
|
|
|
await cli.parseAndExecute(process.argv);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Run the main function and handle any errors
|
2025-10-19 13:14:18 +00:00
|
|
|
main().catch((error) => {
|
2025-03-26 22:28:38 +00:00
|
|
|
logger.error(`Error: ${error}`);
|
2025-03-25 09:06:23 +00:00
|
|
|
process.exit(1);
|
|
|
|
});
|