about-system 0.0.4 → 0.0.5

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/about-system.js +1 -11
  2. package/package.json +1 -1
package/about-system.js CHANGED
@@ -106,17 +106,7 @@ const DEFAULT_SETTINGS = {
106
106
  multiline: true,
107
107
  group_similar: true,
108
108
  single_line: false,
109
- line_wrap_length: (() => {
110
- try {
111
- const { execSync } = require('child_process');
112
- const size = execSync('stty size', { encoding: 'utf8' }).trim();
113
- const cols = parseInt(size.split(' ')[1]);
114
- console.log(cols)
115
- return cols > 0 ? cols : 100; // fallback to 100 if stty fails
116
- } catch (error) {
117
- return 100; // fallback to 100 if stty is not available
118
- }
119
- })()
109
+ line_wrap_length: process?.stdout?.columns || 100, // fallback to 80 if tput fails
120
110
  },
121
111
  advanced: {
122
112
  debug: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "about-system",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "A Node.js script to display key system information with emojis. Cross-platform support for Windows, macOS, and Linux with customizable output and caching.",
5
5
  "main": "about-system.js",
6
6
  "bin": {