about-system 0.10.8 → 0.10.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 (50) hide show
  1. package/dist/about-system-cli.d.ts.map +1 -0
  2. package/dist/about-system-cli.js +1 -1
  3. package/dist/cache/cache-config.d.ts +62 -0
  4. package/dist/cache/cache-config.d.ts.map +1 -0
  5. package/dist/cache/cache.d.ts +53 -0
  6. package/dist/cache/cache.d.ts.map +1 -0
  7. package/dist/index.d.ts +18 -52
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +1 -1
  10. package/dist/info/hardware.d.ts +76 -0
  11. package/dist/info/hardware.d.ts.map +1 -0
  12. package/dist/info/memory.d.ts +59 -0
  13. package/dist/info/memory.d.ts.map +1 -0
  14. package/dist/info/network.d.ts +54 -0
  15. package/dist/info/network.d.ts.map +1 -0
  16. package/dist/info/platform.d.ts +36 -0
  17. package/dist/info/platform.d.ts.map +1 -0
  18. package/dist/info/process.d.ts +23 -0
  19. package/dist/info/process.d.ts.map +1 -0
  20. package/dist/info/settings.d.ts +185 -0
  21. package/dist/info/settings.d.ts.map +1 -0
  22. package/dist/info/software.d.ts +33 -0
  23. package/dist/info/software.d.ts.map +1 -0
  24. package/dist/info/system-status.d.ts +36 -0
  25. package/dist/info/system-status.d.ts.map +1 -0
  26. package/dist/{system-info-api-NgTm8Gzo.js → system-info-api-ByXoHI0m.js} +314 -278
  27. package/dist/system-info-api-ByXoHI0m.js.map +1 -0
  28. package/dist/system-info-api.d.ts +62 -442
  29. package/dist/system-info-api.d.ts.map +1 -0
  30. package/dist/system-info-api.js +4 -5
  31. package/dist/system-info-api.js.map +1 -1
  32. package/dist/types/internal-types.d.ts +14 -0
  33. package/dist/types/internal-types.d.ts.map +1 -0
  34. package/dist/utils/command.d.ts +18 -0
  35. package/dist/utils/command.d.ts.map +1 -0
  36. package/dist/utils/network.d.ts +27 -0
  37. package/dist/utils/network.d.ts.map +1 -0
  38. package/dist/utils/platform.d.ts +11 -0
  39. package/dist/utils/platform.d.ts.map +1 -0
  40. package/dist/web-server.d.ts +21 -0
  41. package/dist/web-server.d.ts.map +1 -0
  42. package/package.json +1 -1
  43. package/src/cache/cache-config.ts +2 -2
  44. package/src/system-info-api.ts +2 -67
  45. package/src/utils/network.ts +104 -4
  46. package/src/utils/utils.test.ts +105 -38
  47. package/dist/system-info-api-NgTm8Gzo.js.map +0 -1
  48. package/dist/web/assets/index--HOsj3jw.js +0 -14
  49. package/dist/web/assets/index-BU_blZyu.css +0 -1
  50. package/dist/web/index.html +0 -13
@@ -1,442 +1,62 @@
1
- import { SystemInfo } from './systeminfo-types';
2
- import { SystemInfoOptions } from './systeminfo-types';
3
-
4
- /**
5
- * Gets battery charge level and charging status
6
- * Reads from /sys/class/power_supply/BAT0 (Linux laptops only)
7
- * @param context - Info context with cache
8
- * @returns Battery percentage with optional + for charging, or empty string
9
- * @example "85%", "42%+", "100%"
10
- */
11
- declare function battery(context: InfoContext): string;
12
-
13
- /**
14
- * Gets CPU benchmark score and rank from Geekbench 6 data
15
- * Uses fuzzy matching to find similar CPU models
16
- * @param context - Info context with cache
17
- * @returns Benchmark info with score and rank, or empty string
18
- * @example "38k #1 top 1%", "21k #68 top 7%"
19
- */
20
- declare function bench(context: InfoContext): string;
21
-
22
- /**
23
- * Cache storage structure
24
- * @interface Cache
25
- */
26
- declare interface Cache {
27
- [key: string]: CacheEntry;
28
- }
29
-
30
- /**
31
- * Cache storage structure
32
- */
33
- declare interface Cache_2 {
34
- [key: string]: CacheEntry_2;
35
- }
36
-
37
- /**
38
- * Cache management utilities
39
- * @module cache
40
- */
41
- /**
42
- * Represents a cached value with timestamp
43
- * @interface CacheEntry
44
- */
45
- declare interface CacheEntry {
46
- /** The cached value */
47
- value: any;
48
- /** Unix timestamp when the value was cached */
49
- timestamp: number;
50
- }
51
-
52
- /**
53
- * Represents a cached value with timestamp
54
- */
55
- declare interface CacheEntry_2 {
56
- value: any;
57
- timestamp: number;
58
- }
59
-
60
- /**
61
- * Gets geographic city based on public IP
62
- * @param context - Info context with IP geolocation data
63
- * @returns City name or empty string
64
- * @example "San Francisco", "New York", "London"
65
- */
66
- declare function city(context: InfoContext): Promise<string>;
67
-
68
- /**
69
- * Gets running Docker container names
70
- * Lists active Docker containers with their names
71
- * @param context - Info context with cache
72
- * @returns Space-separated container names or empty string
73
- * @example "nginx redis postgres", "web-app db-server"
74
- */
75
- declare function containers(context: InfoContext): string;
76
-
77
- /**
78
- * Gets CPU model name and specifications
79
- * Uses platform-specific commands (wmic/lscpu/cpuinfo)
80
- * Automatically strips "with Radeon Graphics" and similar suffixes
81
- * @param context - Info context with cache
82
- * @returns CPU model string or empty string
83
- * @example "Intel Core i7-12700K", "AMD Ryzen 9 5900HX", "Apple M2 Pro"
84
- */
85
- declare function cpu(context: InfoContext): string;
86
-
87
- /**
88
- * Gets detailed CPU benchmark information from Geekbench 6 data
89
- * Includes score, rank, and architecture type (ARM/Intel/AMD)
90
- * @param context - Info context with cache
91
- * @returns Detailed benchmark info with architecture, or empty string
92
- * @example "Geekbench 6: 38k (Rank #1, top 1%) - ARM", "Geekbench 6: 21k (Rank #68, top 7%) - Intel"
93
- */
94
- declare function cpu_bench_info(context: InfoContext): string;
95
-
96
- /**
97
- * Gets device or computer model name
98
- * Uses WMI on Windows, DMI on Linux, getprop on Android
99
- * @param context - Info context with cache
100
- * @returns Device model name or empty string
101
- * @example "Dell OptiPlex 7090", "MacBook Pro 16-inch", "Valve Steam Deck"
102
- */
103
- declare function device(context: InfoContext): string;
104
-
105
- /**
106
- * Gets disk size (used/total) for each real disk
107
- * Uses `df -k` on Linux/macOS, filtering out pseudo filesystems, system/boot
108
- * partitions (e.g. /boot, /System/Volumes/*), and anything under 10GB, since
109
- * those aren't disks a user would care about. When exactly one real disk is
110
- * found (the common case) the result omits the mount point; when multiple
111
- * real disks are found (e.g. a data drive or external volume), each is
112
- * labeled by its mount point.
113
- * @param context - Info context with cache
114
- * @returns Disk size as "used/total GB" or "mount(used/total GB) ..." or empty string
115
- * @example "256/512GB", "/(100/500GB) /Volumes/Backup(900/2000GB)"
116
- */
117
- declare function disk_size(context: InfoContext): string;
118
-
119
- /**
120
- * Gets root filesystem disk usage percentage
121
- * Uses df command on Linux/Android/macOS
122
- * @param context - Info context with cache
123
- * @returns Percentage string or empty string
124
- * @example "45%", "78%"
125
- */
126
- declare function disk_used(context: InfoContext): string;
127
-
128
- /**
129
- * Gets reverse DNS hostname with HTTP prefix
130
- * @param context - Info context with IP info
131
- * @returns Domain with http:// prefix or empty string
132
- * @example "http://example.com", "http://host-203-0-113-42.example.net"
133
- */
134
- declare function domain(context: InfoContext): Promise<string>;
135
-
136
- /**
137
- * Get all system information as a clean JSON object
138
- */
139
- export declare function getSystemInfo(options?: SystemInfoOptions): Promise<SystemInfo>;
140
-
141
- /**
142
- * Gets graphics card model name
143
- * Extracts GPU info from lspci (Linux) or WMI (Windows)
144
- * Filters out basic/generic display adapters
145
- * @param context - Info context with cache
146
- * @returns GPU model string or empty string
147
- * @example "NVIDIA GeForce RTX 4070", "AMD Radeon RX 6800 XT"
148
- */
149
- declare function gpu(context: InfoContext): string;
150
-
151
- /**
152
- * Gets GPU benchmark score and rank from Geekbench 6 data
153
- * Uses fuzzy matching to find similar GPU models
154
- * @param context - Info context with cache
155
- * @returns Benchmark info with score and rank, or empty string
156
- * @example "38k #1 top 1%", "21k #68 top 7%"
157
- */
158
- declare function gpu_bench(context: InfoContext): string;
159
-
160
- /**
161
- * Gets detailed GPU benchmark information from Geekbench 6 data
162
- * Includes score, rank, and vendor detection
163
- * @param context - Info context with cache
164
- * @returns Detailed benchmark info with vendor, or empty string
165
- * @example "Geekbench 6: 38k (Rank #1, top 1%) - NVIDIA", "Geekbench 6: 21k (Rank #68, top 7%) - AMD"
166
- */
167
- declare function gpu_bench_info(context: InfoContext): string;
168
-
169
- /**
170
- * Gets the system hostname
171
- * @returns Computer hostname/network name
172
- */
173
- declare function hostname(): string;
174
-
175
- /**
176
- * Context object passed to info collection functions
177
- * @interface InfoContext
178
- */
179
- declare interface InfoContext {
180
- /** Cache storage */
181
- cache: Cache;
182
- /** IP information from external API */
183
- ipInfo?: IPInfo;
184
- }
185
-
186
- /**
187
- * System information collection functions map
188
- */
189
- export declare const infoFunctions: {
190
- user: typeof user;
191
- hostname: typeof hostname;
192
- ip: typeof ip;
193
- iplocal: typeof iplocal;
194
- city: typeof city;
195
- domain: typeof domain;
196
- isp: typeof isp;
197
- os: typeof os_info;
198
- cpu: typeof cpu;
199
- gpu: typeof gpu;
200
- bench: typeof bench;
201
- cpu_bench_info: typeof cpu_bench_info;
202
- gpu_bench: typeof gpu_bench;
203
- gpu_bench_info: typeof gpu_bench_info;
204
- disk_used: typeof disk_used;
205
- disk_size: typeof disk_size;
206
- ram_used: typeof ram_used;
207
- top_process: typeof top_process;
208
- uptime: typeof uptime;
209
- device: typeof device;
210
- kernel: typeof kernel;
211
- shell: typeof shell;
212
- pacman: typeof packages;
213
- ports: typeof ports;
214
- containers: typeof containers;
215
- memory_available: typeof memory_available;
216
- swap_used: typeof swap_used;
217
- load_average: typeof load_average;
218
- users_logged_in: typeof users_logged_in;
219
- network_interfaces: typeof network_interfaces;
220
- mount_points: typeof mount_points;
221
- services_running: typeof services_running;
222
- temperature: typeof temperature;
223
- battery: typeof battery;
224
- screen_resolution: typeof screen_resolution;
225
- };
226
-
227
- /**
228
- * Gets public IP address from ipinfo.io
229
- * @param context - Info context with cache and IP info
230
- * @returns Public IPv4 address or empty string
231
- * @example "203.0.113.42"
232
- */
233
- declare function ip(context: InfoContext): Promise<string>;
234
-
235
- /**
236
- * Network utilities for IP information fetching
237
- * @module network
238
- */
239
- /**
240
- * IP information from ipinfo.io API
241
- * @interface IPInfo
242
- */
243
- declare interface IPInfo {
244
- /** Public IP address */
245
- ip?: string;
246
- /** City location */
247
- city?: string;
248
- /** Reverse DNS hostname */
249
- hostname?: string;
250
- /** ISP organization string (includes AS number) */
251
- org?: string;
252
- }
253
-
254
- /**
255
- * Gets local/private IP address(es)
256
- * Tries ifconfig and ip commands on Linux, falls back to Node.js API
257
- * @returns Space-separated local IP addresses (RFC 1918 ranges)
258
- * @example "192.168.1.100" or "10.0.0.50 192.168.1.100"
259
- */
260
- declare function iplocal(): string;
261
-
262
- /**
263
- * Gets Internet Service Provider name
264
- * Strips AS number prefix from organization string
265
- * @param context - Info context with IP info
266
- * @returns ISP name or empty string
267
- * @example "Comcast Cable", "Verizon Business", "Cloudflare Inc"
268
- */
269
- declare function isp(context: InfoContext): Promise<string>;
270
-
271
- /**
272
- * Gets kernel version string
273
- * Returns the operating system kernel version from os.release()
274
- * @param context - Info context with cache
275
- * @returns Kernel version string
276
- * @example "5.15.0-56-generic", "6.11.11-valve12-1-neptune"
277
- */
278
- declare function kernel(context: InfoContext): string;
279
-
280
- /**
281
- * Gets system load averages
282
- * Reads 1, 5, and 15 minute load averages from /proc/loadavg (Linux) or
283
- * os.loadavg() (macOS)
284
- * @returns Space-separated load averages (1m 5m 15m) or empty string
285
- * @example "0.52 0.58 0.59", "2.10 1.95 1.88"
286
- */
287
- declare function load_average(context: InfoContext): string;
288
-
289
- /**
290
- * Loads cache from disk
291
- */
292
- export declare function loadCache(): Cache_2;
293
-
294
- /**
295
- * Gets available memory in gigabytes
296
- * Reads MemAvailable from /proc/meminfo (Linux) or derives it from
297
- * vm_stat's free+inactive pages (macOS)
298
- * @returns Available memory with "GB available" suffix or empty string
299
- * @example "12GB available", "4GB available"
300
- */
301
- declare function memory_available(): string;
302
-
303
- /**
304
- * Gets mounted filesystem information
305
- * Lists non-system mount points with usage from df (Linux/macOS)
306
- * On Linux, excludes /, /dev, /proc, /sys and internal /System/Volumes mounts.
307
- * On macOS, APFS internal volumes (Data, VM, Preboot, Update, ...) all live
308
- * under /System/Volumes and are not user-relevant, so only /Volumes (external
309
- * disks, network shares, disk images) are reported.
310
- * @param context - Info context with cache
311
- * @returns Space-separated mount points with usage or empty string
312
- * @example "/home(45%) /mnt/data(78%)", "/Volumes/Backup(78%)"
313
- */
314
- declare function mount_points(context: InfoContext): string;
315
-
316
- /**
317
- * Gets active network interface names
318
- * Lists non-loopback interfaces with IPv4 addresses (Linux/macOS only)
319
- * @param context - Info context with cache
320
- * @returns Space-separated interface names or empty string
321
- * @example "eth0 wlan0", "en0 en1"
322
- */
323
- declare function network_interfaces(context: InfoContext): string;
324
-
325
- /**
326
- * Gets operating system name and version
327
- * Platform-specific detection for Windows, macOS, and Linux
328
- * @param context - Info context with cache
329
- * @returns OS name and version string
330
- * @example "Windows 11 Pro", "macOS Ventura 13.2.1", "Ubuntu 22.04.3 LTS"
331
- */
332
- declare function os_info(context: InfoContext): string;
333
-
334
- /**
335
- * Gets available package managers and development tools
336
- * Checks for package managers (apt, yum, npm, etc.) and editors (nvim, hx)
337
- * @param context - Info context with cache
338
- * @returns Space-separated list of available commands
339
- * @example "apt npm docker nvim", "yay pacman bun hx"
340
- */
341
- declare function packages(context: InfoContext): string;
342
-
343
- /**
344
- * Gets open TCP ports with service names
345
- * Uses lsof to find listening TCP ports (Linux/macOS only)
346
- * @param context - Info context with cache
347
- * @returns Space-separated port+process pairs or empty string
348
- * @example "80http 443http 22ssh", "3000node 5432post"
349
- */
350
- declare function ports(context: InfoContext): string;
351
-
352
- /**
353
- * Gets memory usage in gigabytes
354
- * Reads from /proc/meminfo on Linux, falls back to os.totalmem()
355
- * @param context - Info context with cache
356
- * @returns Memory usage as "used/total GB"
357
- * @example "12/32GB", "6/16GB"
358
- */
359
- declare function ram_used(context: InfoContext): string;
360
-
361
- /**
362
- * Saves cache to disk
363
- */
364
- export declare function saveCache(cache: Cache_2): void;
365
-
366
- /**
367
- * Gets screen resolution
368
- * Uses xrandr on Linux (X11/Xorg only) or system_profiler on macOS
369
- * @returns Resolution in WIDTHxHEIGHT format or empty string
370
- * @example "1920x1080", "2560x1440", "3840x2160"
371
- */
372
- declare function screen_resolution(): string;
373
-
374
- /**
375
- * Gets count of running system services
376
- * Uses systemctl or service command (Linux only)
377
- * @param context - Info context with cache
378
- * @returns Service count with "services" suffix or empty string
379
- * @example "125 services", "89 services"
380
- */
381
- declare function services_running(context: InfoContext): string;
382
-
383
- /**
384
- * Gets the current shell name
385
- * Uses the user's login shell (macOS/Linux), falls back to ps for the
386
- * parent process shell
387
- * @returns Shell name or empty string on Windows
388
- * @example "bash", "zsh", "fish", "nu"
389
- */
390
- declare function shell(context: InfoContext): string;
391
-
392
- /**
393
- * Gets swap memory usage
394
- * Calculates swap usage from /proc/meminfo (Linux) or `sysctl vm.swapusage`
395
- * (macOS)
396
- * @returns Swap usage as "percentage (size MB) swap" or empty string
397
- * @example "15% (512MB) swap", "0% (0MB) swap"
398
- */
399
- declare function swap_used(): string;
400
-
401
- /**
402
- * Gets system temperature in Celsius
403
- * Reads from thermal zone or hwmon sensors (Linux), or from the
404
- * `osx-cpu-temp` CLI (macOS, if installed via `brew install osx-cpu-temp`) -
405
- * macOS has no unprivileged API for this, so nothing is reported without it
406
- * @param context - Info context with cache
407
- * @returns Temperature with °C suffix or empty string
408
- * @example "45°C", "62°C"
409
- */
410
- declare function temperature(context: InfoContext): string;
411
-
412
- /**
413
- * Gets the highest CPU-consuming process
414
- * Uses ps command to find top process by CPU usage (Linux/macOS only)
415
- * @param context - Info context with cache
416
- * @returns Process info as "percentage processname" or empty string
417
- * @example "8% firefox", "15% chrome", "3% systemd"
418
- */
419
- declare function top_process(context: InfoContext): string;
420
-
421
- /**
422
- * Gets system uptime since last boot
423
- * @returns Uptime formatted as "Xd Yh Zm"
424
- * @example "2d 14h 23m", "0d 3h 45m"
425
- */
426
- declare function uptime(): string;
427
-
428
- /**
429
- * Gets the current username
430
- * @returns Current system username
431
- */
432
- declare function user(): string;
433
-
434
- /**
435
- * Gets number of logged in users
436
- * Uses who command to count active user sessions (Linux/macOS only)
437
- * @returns User count with "users" suffix or empty string
438
- * @example "3 users", "1 users"
439
- */
440
- declare function users_logged_in(): string;
441
-
442
- export { }
1
+ import { SystemInfo, SystemInfoOptions } from './systeminfo-types';
2
+ import { user, hostname, os_info, kernel, device } from './info/platform';
3
+ import { cpu, gpu, screen_resolution, bench, cpu_bench_info, gpu_bench, gpu_bench_info } from './info/hardware';
4
+ import { disk_used, disk_size, ram_used, memory_available, swap_used, mount_points } from './info/memory';
5
+ import { top_process, uptime, users_logged_in } from './info/process';
6
+ import { ip, iplocal, city, domain, isp, network_interfaces, ports } from './info/network';
7
+ import { services_running, temperature, battery, load_average } from './info/system-status';
8
+ import { shell, packages, containers } from './info/software';
9
+ /**
10
+ * Loads cache from disk
11
+ */
12
+ declare function loadCache(): Cache;
13
+ /**
14
+ * Saves cache to disk
15
+ */
16
+ declare function saveCache(cache: Cache): void;
17
+ /**
18
+ * System information collection functions map
19
+ */
20
+ export declare const infoFunctions: {
21
+ user: typeof user;
22
+ hostname: typeof hostname;
23
+ ip: typeof ip;
24
+ iplocal: typeof iplocal;
25
+ city: typeof city;
26
+ domain: typeof domain;
27
+ isp: typeof isp;
28
+ os: typeof os_info;
29
+ cpu: typeof cpu;
30
+ gpu: typeof gpu;
31
+ bench: typeof bench;
32
+ cpu_bench_info: typeof cpu_bench_info;
33
+ gpu_bench: typeof gpu_bench;
34
+ gpu_bench_info: typeof gpu_bench_info;
35
+ disk_used: typeof disk_used;
36
+ disk_size: typeof disk_size;
37
+ ram_used: typeof ram_used;
38
+ top_process: typeof top_process;
39
+ uptime: typeof uptime;
40
+ device: typeof device;
41
+ kernel: typeof kernel;
42
+ shell: typeof shell;
43
+ pacman: typeof packages;
44
+ ports: typeof ports;
45
+ containers: typeof containers;
46
+ memory_available: typeof memory_available;
47
+ swap_used: typeof swap_used;
48
+ load_average: typeof load_average;
49
+ users_logged_in: typeof users_logged_in;
50
+ network_interfaces: typeof network_interfaces;
51
+ mount_points: typeof mount_points;
52
+ services_running: typeof services_running;
53
+ temperature: typeof temperature;
54
+ battery: typeof battery;
55
+ screen_resolution: typeof screen_resolution;
56
+ };
57
+ /**
58
+ * Get all system information as a clean JSON object
59
+ */
60
+ export declare function getSystemInfo(options?: SystemInfoOptions): Promise<SystemInfo>;
61
+ export { loadCache, saveCache };
62
+ //# sourceMappingURL=system-info-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-info-api.d.ts","sourceRoot":"","sources":["../src/system-info-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAIxE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChH,OAAO,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EACL,EAAE,EACF,OAAO,EACP,IAAI,EACJ,MAAM,EACN,GAAG,EACH,kBAAkB,EAClB,KAAK,EACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,OAAO,EACP,YAAY,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA8C9D;;GAEG;AACH,iBAAS,SAAS,IAAI,KAAK,CAS1B;AAED;;GAEG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAUrC;AAED;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCzB,CAAC;AAEF;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,UAAU,CAAC,CAgDrB;AAED,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
@@ -1,12 +1,11 @@
1
1
  import "os";
2
2
  import "fs";
3
- import "https";
3
+ import { g as i, i as m, l as r, s as n } from "./system-info-api-ByXoHI0m.js";
4
4
  import "path";
5
- import { g as m, i as r, l as p, s as n } from "./system-info-api-NgTm8Gzo.js";
6
5
  export {
7
- m as getSystemInfo,
8
- r as infoFunctions,
9
- p as loadCache,
6
+ i as getSystemInfo,
7
+ m as infoFunctions,
8
+ r as loadCache,
10
9
  n as saveCache
11
10
  };
12
11
  //# sourceMappingURL=system-info-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"system-info-api.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"system-info-api.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,14 @@
1
+ import { Cache, CacheEntry } from '../cache/cache';
2
+ import { IPInfo } from '../utils/network';
3
+ /**
4
+ * Context object passed to info collection functions
5
+ * @interface InfoContext
6
+ */
7
+ export interface InfoContext {
8
+ /** Cache storage */
9
+ cache: Cache;
10
+ /** IP information from external API */
11
+ ipInfo?: IPInfo;
12
+ }
13
+ export type { Cache, CacheEntry };
14
+ //# sourceMappingURL=internal-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-types.d.ts","sourceRoot":"","sources":["../../src/types/internal-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,oBAAoB;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAGD,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Command execution utilities
3
+ * @module command
4
+ */
5
+ /**
6
+ * Executes a shell command safely with timeout
7
+ * @param {string} command - Command to execute
8
+ * @param {object} options - Additional options for execSync
9
+ * @returns {string} Command output or empty string on error
10
+ */
11
+ export declare function execCommand(command: string, options?: {}): string;
12
+ /**
13
+ * Checks if a command exists in the system PATH
14
+ * @param {string} command - Command name to check
15
+ * @returns {boolean} True if command exists
16
+ */
17
+ export declare function commandExists(command: string): boolean;
18
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/utils/command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,KAAK,GAAG,MAAM,CAcjE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAWtD"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Network utilities for IP information fetching
3
+ * @module network
4
+ */
5
+ /**
6
+ * IP information from ipinfo.io API
7
+ * @interface IPInfo
8
+ */
9
+ export interface IPInfo {
10
+ /** Public IP address */
11
+ ip?: string;
12
+ /** City location */
13
+ city?: string;
14
+ /** Reverse DNS hostname */
15
+ hostname?: string;
16
+ /** ISP organization string (includes AS number) */
17
+ org?: string;
18
+ }
19
+ /**
20
+ * Fetches IP geolocation information using race between ipinfo.io and ip-api.com
21
+ * Uses ipinfo.io lite endpoint first, falls back to ip-api.com if slower or fails
22
+ * @param {string} token - IPInfo.io API token
23
+ * @param {number} timeout - Request timeout in milliseconds
24
+ * @returns {Promise<IPInfo>} IP information object or empty object on error
25
+ */
26
+ export declare function fetchIPInfo(token?: string, timeout?: number): Promise<IPInfo>;
27
+ //# sourceMappingURL=network.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/utils/network.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,wBAAwB;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAiGD;;;;;;GAMG;AACH,wBAAsB,WAAW,CAC/B,KAAK,GAAE,MAA6B,EACpC,OAAO,GAAE,MAAgC,GACxC,OAAO,CAAC,MAAM,CAAC,CA0BjB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Platform detection utilities
3
+ * @module platform
4
+ */
5
+ /**
6
+ * Platform detection constants
7
+ */
8
+ export declare const IS_WINDOWS: boolean;
9
+ export declare const IS_MAC: boolean;
10
+ export declare const IS_LINUX: boolean;
11
+ //# sourceMappingURL=platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,eAAO,MAAM,UAAU,SAA4B,CAAC;AACpD,eAAO,MAAM,MAAM,SAA6B,CAAC;AACjD,eAAO,MAAM,QAAQ,SAA4B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { default as http } from 'http';
2
+ export interface WebServerOptions {
3
+ port?: number;
4
+ host?: string;
5
+ /** Directory holding the built dashboard. Defaults to dist/web next to this file. */
6
+ webRoot?: string;
7
+ }
8
+ export declare const DEFAULT_WEB_PORT = 3777;
9
+ export declare const DEFAULT_WEB_HOST = "127.0.0.1";
10
+ /**
11
+ * Resolves a request path to a file inside webRoot, or null if it escapes the
12
+ * root or does not exist. Unknown paths fall back to index.html (SPA routing).
13
+ */
14
+ export declare function resolveStaticFile(webRoot: string, urlPath: string): string | null;
15
+ export declare function createWebServer(options?: WebServerOptions): http.Server;
16
+ /** Starts the dashboard server and resolves with the URL it is listening on. */
17
+ export declare function startWebServer(options?: WebServerOptions): Promise<{
18
+ server: http.Server;
19
+ url: string;
20
+ }>;
21
+ //# sourceMappingURL=web-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-server.d.ts","sourceRoot":"","sources":["../src/web-server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAMxB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAiB5C;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAcjF;AAWD,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,IAAI,CAAC,MAAM,CAkC3E;AAED,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAc5G"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "about-system",
3
- "version": "0.10.8",
3
+ "version": "0.10.10",
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": "dist/index.js",
6
6
  "types": "dist/index.d.ts",