From e1887980d4759594c88fb4cd6eb5f0e8b19112a7 Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Tue, 12 Aug 2025 00:28:18 +0200 Subject: [PATCH] Update example.js to replace 'top' command with 'ping' for improved functionality. Minor formatting adjustment in stat-vit-term.js to enhance code readability. --- src/example.js | 8 ++++---- src/stat-vit-term.js | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/example.js b/src/example.js index d7d8455..c26e88a 100644 --- a/src/example.js +++ b/src/example.js @@ -18,13 +18,13 @@ termSession.on('close', (code) => { termSession.on('ready', () => { console.log('Terminal ready\n'); - // Top-Befehl starten - console.log('--- Starte top ---'); - termSession.input('top\n'); + // Ping starten + console.log('--- Ping starten ---'); + termSession.input('ping 127.0.0.1\n'); // Nach 3 Sekunden abbrechen setTimeout(() => { - console.log('\n--- Top abbrechen mit ^C ---'); + console.log('\n--- Ping abbrechen mit ^C ---'); termSession.input('^C'); }, 3000); diff --git a/src/stat-vit-term.js b/src/stat-vit-term.js index 0170aac..211d684 100644 --- a/src/stat-vit-term.js +++ b/src/stat-vit-term.js @@ -2,6 +2,7 @@ import { EventEmitter } from 'events'; import { spawn } from 'child_process'; + class StatVitTerm extends EventEmitter { constructor(options = {}) { super();