Added typescript, test and feature for comma seperated packages

This commit is contained in:
2024-12-10 20:31:14 +02:00
parent 9851a91bb3
commit e522e73b7a
12 changed files with 1274 additions and 691 deletions

View File

@@ -3,10 +3,13 @@
import { createRequire } from 'module';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
import { pathToFileURL } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const require = createRequire(import.meta.url);
const { default: run } = await import(join(__dirname, '../dist/index.js'));
run().catch(console.error);
// Convert the file path to a proper file:// URL
const modulePath = pathToFileURL(join(__dirname, '../dist/index.js')).href;
const { default: run } = await import(modulePath);
run().catch(console.error);