Add command line parsing and configuration management

* Introduced `CommandLine` class for handling command line options and arguments
* Added `TestConfiguration` class to manage application credentials and URIs
* Implemented example usage for generating command line arguments from a configuration object
* Updated `package.json` to include `commander` dependency
* Removed unused `TestRunner` class and created a new `TestRunner` for executing tests with command line options
* Adjusted logging level type to use lowercase values for consistency
This commit is contained in:
2025-08-18 17:54:04 -04:00
parent 1bc3aaa8aa
commit 4b672f231f
7 changed files with 295 additions and 14 deletions

23
test/runner/TestRunner.ts Normal file
View File

@@ -0,0 +1,23 @@
import PCastAPI from '@techniker-me/pcast-api';
import RtmpPush from '@technniker-me/rtmp-push';
import CommandLine from '../config/CommandLine';
interface CommandLineOptions {
applicationId: string;
secret: string;
logLevel: string;
}
class TestRunner {
private static readonly _commandLineOptions: CommandLineOptions = CommandLine.parse(process.argv);
public static main(): void {
// const testRunner = new TestRunner();
// testRunner.run();
console.log(TestRunner._commandLineOptions);
}
}
TestRunner.main();