From cefbce1ba0c742a19e2a82d5f9676fd8517ec740 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sat, 1 Mar 2025 19:47:46 +0000 Subject: [PATCH] fix(test): Update test script to fix type references and remove private method call --- changelog.md | 6 ++++++ package.json | 3 +++ test/test.ts | 6 +++--- ts/00_commitinfo_data.ts | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index 4ea9323..8d3c765 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2025-03-01 - 1.3.1 - fix(test) +Update test script to fix type references and remove private method call + +- Corrected type references in test script for IMonitorConfig. +- Fixed test script to use console.log instead of private method monitor.log. + ## 2025-03-01 - 1.3.0 - feat(cli) Add CLI support with command parsing and version display diff --git a/package.json b/package.json index c756fa6..2b92e91 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,9 @@ "buildDocs": "(tsdoc)", "start": "(tsrun ./cli.ts -v)" }, + "bin": { + "tspm": "./cli.js" + }, "devDependencies": { "@git.zone/tsbuild": "^2.1.25", "@git.zone/tsbundle": "^2.0.5", diff --git a/test/test.ts b/test/test.ts index 572ccbd..14e8a3a 100644 --- a/test/test.ts +++ b/test/test.ts @@ -8,7 +8,7 @@ tap.test('first test', async () => { tap.start(); // Example usage: -const config: IMonitorConfig = { +const config: tspm.IMonitorConfig = { name: 'Project XYZ Monitor', // Identifier for the instance projectDir: '/path/to/your/project', // Set the project directory here command: 'npm run xyz', // Full command string (no need for args) @@ -16,12 +16,12 @@ const config: IMonitorConfig = { monitorIntervalMs: 5000, // Check memory usage every 5 seconds }; -const monitor = new ProcessMonitor(config); +const monitor = new tspm.ProcessMonitor(config); monitor.start(); // Ensure that on process exit (e.g. Ctrl+C) we clean up the child process and prevent respawns. process.on('SIGINT', () => { - monitor.log('Received SIGINT, stopping monitor...'); + console.log('Received SIGINT, stopping monitor...'); monitor.stop(); process.exit(); }); \ No newline at end of file diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 4c1779d..38ee4e6 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/tspm', - version: '1.3.0', + version: '1.3.1', description: 'a no fuzz process manager' }