startall 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -46
  2. package/package.json +3 -2
package/index.js CHANGED
@@ -1825,58 +1825,15 @@ class ProcessManager {
1825
1825
  const outputHeight = Math.max(3, height - 2);
1826
1826
  let linesToShow = this.isPaused ? lines : lines.slice(-outputHeight);
1827
1827
 
1828
- // Use full terminal width for padding - simpler and ensures complete clearing
1829
- // Each pane will pad to full width, excess will be clipped by container
1830
- const approxPaneWidth = this.renderer.width;
1831
-
1832
1828
  // Add lines in reverse order (newest first)
1833
1829
  for (let i = linesToShow.length - 1; i >= 0; i--) {
1834
1830
  const line = linesToShow[i];
1835
1831
  const processColor = this.processColors.get(line.process) || COLORS.text;
1836
1832
 
1837
- const maxWidth = Math.max(20, this.renderer.width / 2 - line.process.length - 10);
1838
- const visibleLength = stripAnsi(line.text).length;
1839
- let truncatedText = line.text;
1840
- if (visibleLength > maxWidth) {
1841
- let visible = 0;
1842
- const ansiRegex = /\x1b\[[0-9;]*m/g;
1843
- let lastIndex = 0;
1844
- let result = '';
1845
- let match;
1846
- const text = line.text;
1847
- while ((match = ansiRegex.exec(text)) !== null) {
1848
- const before = text.slice(lastIndex, match.index);
1849
- for (const char of before) {
1850
- if (visible >= maxWidth - 3) break;
1851
- result += char;
1852
- visible++;
1853
- }
1854
- if (visible >= maxWidth - 3) break;
1855
- result += match[0];
1856
- lastIndex = ansiRegex.lastIndex;
1857
- }
1858
- if (visible < maxWidth - 3) {
1859
- const remaining = text.slice(lastIndex);
1860
- for (const char of remaining) {
1861
- if (visible >= maxWidth - 3) break;
1862
- result += char;
1863
- visible++;
1864
- }
1865
- }
1866
- truncatedText = result + '\x1b[0m...';
1867
- }
1868
-
1869
- // Get visible length of current line and pad to fill width
1870
- const linePrefix = `[${line.process}] `;
1871
- const currentLength = linePrefix.length + stripAnsi(truncatedText).length;
1872
-
1873
- // Pad with spaces to fill the width
1874
- const paddingNeeded = Math.max(0, approxPaneWidth - currentLength);
1875
- const padding = ' '.repeat(paddingNeeded);
1876
-
1833
+ // No truncation - let OpenTUI handle text wrapping naturally
1877
1834
  const outputLine = new TextRenderable(this.renderer, {
1878
1835
  id: `output-${pane.id}-${i}`,
1879
- content: t`${fg(processColor)(`[${line.process}]`)} ${truncatedText}${padding}`,
1836
+ content: t`${fg(processColor)(`[${line.process}]`)} ${line.text}`,
1880
1837
  bg: '#000000', // Black background for pane content
1881
1838
  });
1882
1839
 
@@ -1888,7 +1845,7 @@ class ProcessManager {
1888
1845
  for (let j = 0; j < emptyLinesNeeded; j++) {
1889
1846
  const emptyLine = new TextRenderable(this.renderer, {
1890
1847
  id: `empty-${pane.id}-${j}`,
1891
- content: ' '.repeat(approxPaneWidth), // Fill entire width with spaces
1848
+ content: ' ',
1892
1849
  bg: '#000000', // Black background for empty lines
1893
1850
  });
1894
1851
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "startall",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -14,7 +14,8 @@
14
14
  "demo:worker": "node -e \"setInterval(() => console.log('Processing jobs...'), 500)\"",
15
15
  "demo:worker2": "node -e \"setInterval(() => console.log('Processing jobs...'), 100)\"",
16
16
  "demo:errors": "node -e \"setInterval(() => { console.log('\\x1b[32mOK: All good\\x1b[0m'); console.log('\\x1b[33mWARN: Deprecated API used\\x1b[0m'); console.log('\\x1b[31mERROR: Connection failed\\x1b[0m'); console.log('Normal log message'); }, 2000)\"",
17
- "demo:build": "node -e \"let i=0; setInterval(() => { i++; if(i%5===0) console.log('\\x1b[31mError: Type mismatch in file.ts:42\\x1b[0m'); else if(i%3===0) console.log('\\x1b[33mWarning: Unused variable\\x1b[0m'); else console.log('\\x1b[36mCompiling module ' + i + '...\\x1b[0m'); }, 800)\""
17
+ "demo:build": "node -e \"let i=0; setInterval(() => { i++; if(i%5===0) console.log('\\x1b[31mError: Type mismatch in file.ts:42\\x1b[0m'); else if(i%3===0) console.log('\\x1b[33mWarning: Unused variable\\x1b[0m'); else console.log('\\x1b[36mCompiling module ' + i + '...\\x1b[0m'); }, 800)\"",
18
+ "demo:longtext": "node -e \"setInterval(() => { console.log('\\x1b[36m[2024-01-20T12:34:56.789Z] Executing SQL query: SELECT users.id, users.name, users.email, orders.order_id, orders.total, products.name FROM users INNER JOIN orders ON users.id = orders.user_id LEFT JOIN products ON orders.product_id = products.id WHERE users.created_at > NOW() - INTERVAL 30 DAY AND orders.status = \\'completed\\' ORDER BY orders.total DESC LIMIT 100\\x1b[0m'); console.log('Fetched 42 records in 127ms'); }, 1500)\""
18
19
  },
19
20
  "keywords": [],
20
21
  "author": "",