about-system 0.0.8 → 0.0.9
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.
- package/package.json +1 -1
- package/src/about-system.js +11 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "about-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
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": "src/about-system.js",
|
|
6
6
|
"bin": {
|
package/src/about-system.js
CHANGED
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
* @license: MIT
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
import os from 'os';
|
|
23
|
+
import fs from 'fs';
|
|
24
|
+
import path from 'path';
|
|
25
|
+
import { execSync } from 'child_process';
|
|
26
|
+
import https from 'https';
|
|
27
27
|
|
|
28
28
|
// Cache configuration
|
|
29
29
|
const CACHE_FILE = path.join(os.tmpdir(), 'systeminfo-cache.json');
|
|
@@ -336,9 +336,9 @@ const infoFunctions = {
|
|
|
336
336
|
const addresses = [];
|
|
337
337
|
|
|
338
338
|
for (const name of Object.keys(interfaces)) {
|
|
339
|
-
for (const
|
|
340
|
-
if (
|
|
341
|
-
addresses.push(
|
|
339
|
+
for (const device of interfaces[name]) {
|
|
340
|
+
if (device.family === 'IPv4' && !device.internal) {
|
|
341
|
+
addresses.push(device.address);
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
}
|
|
@@ -1634,11 +1634,11 @@ Linux-specific features:
|
|
|
1634
1634
|
}
|
|
1635
1635
|
|
|
1636
1636
|
// Run the script
|
|
1637
|
-
if (
|
|
1637
|
+
// if (import.meta.url === `file://${process.argv[1]}`) {
|
|
1638
1638
|
main().catch(error => {
|
|
1639
1639
|
console.error('Error:', error.message);
|
|
1640
1640
|
process.exit(1);
|
|
1641
1641
|
});
|
|
1642
|
-
}
|
|
1642
|
+
// }
|
|
1643
1643
|
|
|
1644
|
-
|
|
1644
|
+
export { displaySystemInfo, installShellGreeting };
|