From 74ce17769146fdf2acfacb673204f5cd3db428db Mon Sep 17 00:00:00 2001 From: David Schontzler <2080286+schontz@users.noreply.github.com> Date: Fri, 10 Mar 2023 13:45:17 -0800 Subject: [PATCH 001/123] Parse Bluetooth vendor IDs --- lib/bluetooth.js | 8 +- lib/bluetoothVendors.js | 540 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 547 insertions(+), 1 deletion(-) create mode 100644 lib/bluetoothVendors.js diff --git a/lib/bluetooth.js b/lib/bluetooth.js index 1c1326f9..1becdd9b 100644 --- a/lib/bluetooth.js +++ b/lib/bluetooth.js @@ -17,6 +17,7 @@ const exec = require('child_process').exec; const execSync = require('child_process').execSync; const path = require('path'); const util = require('./util'); +const bluetoothVendors = require('./bluetoothVendors'); const fs = require('fs'); let _platform = process.platform; @@ -61,6 +62,11 @@ function parseBluetoothManufacturer(str) { return result; } +function parseBluetoothVendor(str) { + const id = parseInt(id); + if (!isNaN(id)) return bluetoothVendors[id]; +} + function parseLinuxBluetoothInfo(lines, macAddr1, macAddr2) { const result = {}; @@ -82,7 +88,7 @@ function parseDarwinBluetoothDevices(bluetoothObject, macAddr2) { result.device = bluetoothObject.device_services || ''; result.name = bluetoothObject.device_name || ''; - result.manufacturer = bluetoothObject.device_manufacturer || parseBluetoothManufacturer(bluetoothObject.device_name || '') || ''; + result.manufacturer = bluetoothObject.device_manufacturer || parseBluetoothVendor(bluetoothObject.device_vendorID) || parseBluetoothManufacturer(bluetoothObject.device_name || '') || ''; result.macDevice = (bluetoothObject.device_addr || bluetoothObject.device_address || '').toLowerCase().replace(/-/g, ':'); result.macHost = macAddr2; result.batteryPercent = bluetoothObject.device_batteryPercent || null; diff --git a/lib/bluetoothVendors.js b/lib/bluetoothVendors.js new file mode 100644 index 00000000..9b7ea8fa --- /dev/null +++ b/lib/bluetoothVendors.js @@ -0,0 +1,540 @@ +'use strict'; +// @ts-check +module.exports = { + 0x0000: 'Ericsson Technology Licensing', + 0x0001: 'Nokia Mobile Phones', + 0x0002: 'Intel Corp.', + 0x0003: 'IBM Corp.', + 0x0004: 'Toshiba Corp.', + 0x0005: '3Com', + 0x0006: 'Microsoft', + 0x0007: 'Lucent', + 0x0008: 'Motorola', + 0x0009: 'Infineon Technologies AG', + 0x000a: 'Cambridge Silicon Radio', + 0x000b: 'Silicon Wave', + 0x000c: 'Digianswer A/S', + 0x000d: 'Texas Instruments Inc.', + 0x000e: 'Ceva, Inc. (formerly Parthus Technologies, Inc.)', + 0x000f: 'Broadcom Corporation', + 0x0010: 'Mitel Semiconductor', + 0x0011: 'Widcomm, Inc', + 0x0012: 'Zeevo, Inc.', + 0x0013: 'Atmel Corporation', + 0x0014: 'Mitsubishi Electric Corporation', + 0x0015: 'RTX Telecom A/S', + 0x0016: 'KC Technology Inc.', + 0x0017: 'NewLogic', + 0x0018: 'Transilica, Inc.', + 0x0019: 'Rohde & Schwarz GmbH & Co. KG', + 0x001a: 'TTPCom Limited', + 0x001b: 'Signia Technologies, Inc.', + 0x001c: 'Conexant Systems Inc.', + 0x001d: 'Qualcomm', + 0x001e: 'Inventel', + 0x001f: 'AVM Berlin', + 0x0020: 'BandSpeed, Inc.', + 0x0021: 'Mansella Ltd', + 0x0022: 'NEC Corporation', + 0x0023: 'WavePlus Technology Co., Ltd.', + 0x0024: 'Alcatel', + 0x0025: 'NXP Semiconductors (formerly Philips Semiconductors)', + 0x0026: 'C Technologies', + 0x0027: 'Open Interface', + 0x0028: 'R F Micro Devices', + 0x0029: 'Hitachi Ltd', + 0x002a: 'Symbol Technologies, Inc.', + 0x002b: 'Tenovis', + 0x002c: 'Macronix International Co. Ltd.', + 0x002d: 'GCT Semiconductor', + 0x002e: 'Norwood Systems', + 0x002f: 'MewTel Technology Inc.', + 0x0030: 'ST Microelectronics', + 0x0031: 'Synopsis', + 0x0032: 'Red-M (Communications) Ltd', + 0x0033: 'Commil Ltd', + 0x0034: 'Computer Access Technology Corporation (CATC)', + 0x0035: 'Eclipse (HQ Espana) S.L.', + 0x0036: 'Renesas Electronics Corporation', + 0x0037: 'Mobilian Corporation', + 0x0038: 'Terax', + 0x0039: 'Integrated System Solution Corp.', + 0x003a: 'Matsushita Electric Industrial Co., Ltd.', + 0x003b: 'Gennum Corporation', + 0x003c: 'BlackBerry Limited (formerly Research In Motion)', + 0x003d: 'IPextreme, Inc.', + 0x003e: 'Systems and Chips, Inc.', + 0x003f: 'Bluetooth SIG, Inc.', + 0x0040: 'Seiko Epson Corporation', + 0x0041: 'Integrated Silicon Solution Taiwan, Inc.', + 0x0042: 'CONWISE Technology Corporation Ltd', + 0x0043: 'PARROT SA', + 0x0044: 'Socket Mobile', + 0x0045: 'Atheros Communications, Inc.', + 0x0046: 'MediaTek, Inc.', + 0x0047: 'Bluegiga', + 0x0048: 'Marvell Technology Group Ltd.', + 0x0049: '3DSP Corporation', + 0x004a: 'Accel Semiconductor Ltd.', + 0x004b: 'Continental Automotive Systems', + 0x004c: 'Apple, Inc.', + 0x004d: 'Staccato Communications, Inc.', + 0x004e: 'Avago Technologies', + 0x004f: 'APT Licensing Ltd.', + 0x0050: 'SiRF Technology', + 0x0051: 'Tzero Technologies, Inc.', + 0x0052: 'J&M Corporation', + 0x0053: 'Free2move AB', + 0x0054: '3DiJoy Corporation', + 0x0055: 'Plantronics, Inc.', + 0x0056: 'Sony Ericsson Mobile Communications', + 0x0057: 'Harman International Industries, Inc.', + 0x0058: 'Vizio, Inc.', + 0x0059: 'Nordic Semiconductor ASA', + 0x005a: 'EM Microelectronic-Marin SA', + 0x005b: 'Ralink Technology Corporation', + 0x005c: 'Belkin International, Inc.', + 0x005d: 'Realtek Semiconductor Corporation', + 0x005e: 'Stonestreet One, LLC', + 0x005f: 'Wicentric, Inc.', + 0x0060: 'RivieraWaves S.A.S', + 0x0061: 'RDA Microelectronics', + 0x0062: 'Gibson Guitars', + 0x0063: 'MiCommand Inc.', + 0x0064: 'Band XI International, LLC', + 0x0065: 'Hewlett-Packard Company', + 0x0066: '9Solutions Oy', + 0x0067: 'GN Netcom A/S', + 0x0068: 'General Motors', + 0x0069: 'A&D Engineering, Inc.', + 0x006a: 'MindTree Ltd.', + 0x006b: 'Polar Electro OY', + 0x006c: 'Beautiful Enterprise Co., Ltd.', + 0x006d: 'BriarTek, Inc.', + 0x006e: 'Summit Data Communications, Inc.', + 0x006f: 'Sound ID', + 0x0070: 'Monster, LLC', + 0x0071: 'connectBlue AB', + 0x0072: 'ShangHai Super Smart Electronics Co. Ltd.', + 0x0073: 'Group Sense Ltd.', + 0x0074: 'Zomm, LLC', + 0x0075: 'Samsung Electronics Co. Ltd.', + 0x0076: 'Creative Technology Ltd.', + 0x0077: 'Laird Technologies', + 0x0078: 'Nike, Inc.', + 0x0079: 'lesswire AG', + 0x007a: 'MStar Semiconductor, Inc.', + 0x007b: 'Hanlynn Technologies', + 0x007c: 'A & R Cambridge', + 0x007d: 'Seers Technology Co. Ltd', + 0x007e: 'Sports Tracking Technologies Ltd.', + 0x007f: 'Autonet Mobile', + 0x0080: 'DeLorme Publishing Company, Inc.', + 0x0081: 'WuXi Vimicro', + 0x0082: 'Sennheiser Communications A/S', + 0x0083: 'TimeKeeping Systems, Inc.', + 0x0084: 'Ludus Helsinki Ltd.', + 0x0085: 'BlueRadios, Inc.', + 0x0086: 'equinox AG', + 0x0087: 'Garmin International, Inc.', + 0x0088: 'Ecotest', + 0x0089: 'GN ReSound A/S', + 0x008a: 'Jawbone', + 0x008b: 'Topcorn Positioning Systems, LLC', + 0x008c: 'Gimbal Inc. (formerly Qualcomm Labs, Inc. and Qualcomm Retail Solutions, Inc.)', + 0x008d: 'Zscan Software', + 0x008e: 'Quintic Corp.', + 0x008f: 'Stollman E+V GmbH', + 0x0090: 'Funai Electric Co., Ltd.', + 0x0091: 'Advanced PANMOBIL Systems GmbH & Co. KG', + 0x0092: 'ThinkOptics, Inc.', + 0x0093: 'Universal Electronics, Inc.', + 0x0094: 'Airoha Technology Corp.', + 0x0095: 'NEC Lighting, Ltd.', + 0x0096: 'ODM Technology, Inc.', + 0x0097: 'ConnecteDevice Ltd.', + 0x0098: 'zer01.tv GmbH', + 0x0099: 'i.Tech Dynamic Global Distribution Ltd.', + 0x009a: 'Alpwise', + 0x009b: 'Jiangsu Toppower Automotive Electronics Co., Ltd.', + 0x009c: 'Colorfy, Inc.', + 0x009d: 'Geoforce Inc.', + 0x009e: 'Bose Corporation', + 0x009f: 'Suunto Oy', + 0x00a0: 'Kensington Computer Products Group', + 0x00a1: 'SR-Medizinelektronik', + 0x00a2: 'Vertu Corporation Limited', + 0x00a3: 'Meta Watch Ltd.', + 0x00a4: 'LINAK A/S', + 0x00a5: 'OTL Dynamics LLC', + 0x00a6: 'Panda Ocean Inc.', + 0x00a7: 'Visteon Corporation', + 0x00a8: 'ARP Devices Limited', + 0x00a9: 'Magneti Marelli S.p.A', + 0x00aa: 'CAEN RFID srl', + 0x00ab: 'Ingenieur-Systemgruppe Zahn GmbH', + 0x00ac: 'Green Throttle Games', + 0x00ad: 'Peter Systemtechnik GmbH', + 0x00ae: 'Omegawave Oy', + 0x00af: 'Cinetix', + 0x00b0: 'Passif Semiconductor Corp', + 0x00b1: 'Saris Cycling Group, Inc', + 0x00b2: 'Bekey A/S', + 0x00b3: 'Clarinox Technologies Pty. Ltd.', + 0x00b4: 'BDE Technology Co., Ltd.', + 0x00b5: 'Swirl Networks', + 0x00b6: 'Meso international', + 0x00b7: 'TreLab Ltd', + 0x00b8: 'Qualcomm Innovation Center, Inc. (QuIC)', + 0x00b9: 'Johnson Controls, Inc.', + 0x00ba: 'Starkey Laboratories Inc.', + 0x00bb: 'S-Power Electronics Limited', + 0x00bc: 'Ace Sensor Inc', + 0x00bd: 'Aplix Corporation', + 0x00be: 'AAMP of America', + 0x00bf: 'Stalmart Technology Limited', + 0x00c0: 'AMICCOM Electronics Corporation', + 0x00c1: 'Shenzhen Excelsecu Data Technology Co.,Ltd', + 0x00c2: 'Geneq Inc.', + 0x00c3: 'adidas AG', + 0x00c4: 'LG Electronics', + 0x00c5: 'Onset Computer Corporation', + 0x00c6: 'Selfly BV', + 0x00C7: 'Quuppa Oy.', + 0x00C8: 'GeLo Inc', + 0x00C9: 'Evluma', + 0x00CA: 'MC10', + 0x00CB: 'Binauric SE', + 0x00CC: 'Beats Electronics', + 0x00CD: 'Microchip Technology Inc.', + 0x00CE: 'Elgato Systems GmbH', + 0x00CF: 'ARCHOS SA', + 0x00D0: 'Dexcom, Inc.', + 0x00D1: 'Polar Electro Europe B.V.', + 0x00D2: 'Dialog Semiconductor B.V.', + 0x00D3: 'Taixingbang Technology (HK) Co,. LTD.', + 0x00D4: 'Kawantech', + 0x00D5: 'Austco Communication Systems', + 0x00D6: 'Timex Group USA, Inc.', + 0x00D7: 'Qualcomm Technologies, Inc.', + 0x00D8: 'Qualcomm Connected Experiences, Inc.', + 0x00D9: 'Voyetra Turtle Beach', + 0x00DA: 'txtr GmbH', + 0x00DB: 'Biosentronics', + 0x00DC: 'Procter & Gamble', + 0x00DD: 'Hosiden Corporation', + 0x00DE: 'Muzik LLC', + 0x00DF: 'Misfit Wearables Corp', + 0x00E0: 'Google', + 0x00E1: 'Danlers Ltd', + 0x00E2: 'Semilink Inc', + 0x00E3: 'inMusic Brands, Inc', + 0x00E4: 'L.S. Research Inc.', + 0x00E5: 'Eden Software Consultants Ltd.', + 0x00E6: 'Freshtemp', + 0x00e7: 'KS Technologies', + 0x00e8: 'ACTS Technologies', + 0x00e9: 'Vtrack Systems', + 0x00ea: 'Nielsen-Kellerman Company', + 0x00eb: 'Server Technology, Inc.', + 0x00ec: 'BioResearch Associates', + 0x00ed: 'Jolly Logic, LLC', + 0x00ee: 'Above Average Outcomes, Inc.', + 0x00ef: 'Bitsplitters GmbH', + 0x00f0: 'PayPal, Inc.', + 0x00f1: 'Witron Technology Limited', + 0x00f2: 'Aether Things Inc. (formerly Morse Project Inc.)', + 0x00f3: 'Kent Displays Inc.', + 0x00f4: 'Nautilus Inc.', + 0x00f5: 'Smartifier Oy', + 0x00f6: 'Elcometer Limited', + 0x00f7: 'VSN Technologies Inc.', + 0x00f8: 'AceUni Corp., Ltd.', + 0x00f9: 'StickNFind', + 0x00fa: 'Crystal Code AB', + 0x00fb: 'KOUKAAM a.s.', + 0x00fc: 'Delphi Corporation', + 0x00fd: 'ValenceTech Limited', + 0x00fe: 'Reserved', + 0x00ff: 'Typo Products, LLC', + 0x0100: 'TomTom International BV', + 0x0101: 'Fugoo, Inc', + 0x0102: 'Keiser Corporation', + 0x0103: 'Bang & Olufsen A/S', + 0x0104: 'PLUS Locations Systems Pty Ltd', + 0x0105: 'Ubiquitous Computing Technology Corporation', + 0x0106: 'Innovative Yachtter Solutions', + 0x0107: 'William Demant Holding A/S', + 0x0108: 'Chicony Electronics Co., Ltd.', + 0x0109: 'Atus BV', + 0x010a: 'Codegate Ltd.', + 0x010b: 'ERi, Inc.', + 0x010c: 'Transducers Direct, LLC', + 0x010d: 'Fujitsu Ten Limited', + 0x010e: 'Audi AG', + 0x010f: 'HiSilicon Technologies Co., Ltd.', + 0x0110: 'Nippon Seiki Co., Ltd.', + 0x0111: 'Steelseries ApS', + 0x0112: 'vyzybl Inc.', + 0x0113: 'Openbrain Technologies, Co., Ltd.', + 0x0114: 'Xensr', + 0x0115: 'e.solutions', + 0x0116: '1OAK Technologies', + 0x0117: 'Wimoto Technologies Inc', + 0x0118: 'Radius Networks, Inc.', + 0x0119: 'Wize Technology Co., Ltd.', + 0x011a: 'Qualcomm Labs, Inc.', + 0x011b: 'Aruba Networks', + 0x011c: 'Baidu', + 0x011d: 'Arendi AG', + 0x011e: 'Skoda Auto a.s.', + 0x011f: 'Volkswagon AG', + 0x0120: 'Porsche AG', + 0x0121: 'Sino Wealth Electronic Ltd.', + 0x0122: 'AirTurn, Inc.', + 0x0123: 'Kinsa, Inc.', + 0x0124: 'HID Global', + 0x0125: 'SEAT es', + 0x0126: 'Promethean Ltd.', + 0x0127: 'Salutica Allied Solutions', + 0x0128: 'GPSI Group Pty Ltd', + 0x0129: 'Nimble Devices Oy', + 0x012a: 'Changzhou Yongse Infotech Co., Ltd', + 0x012b: 'SportIQ', + 0x012c: 'TEMEC Instruments B.V.', + 0x012d: 'Sony Corporation', + 0x012e: 'ASSA ABLOY', + 0x012f: 'Clarion Co., Ltd.', + 0x0130: 'Warehouse Innovations', + 0x0131: 'Cypress Semiconductor Corporation', + 0x0132: 'MADS Inc', + 0x0133: 'Blue Maestro Limited', + 0x0134: 'Resolution Products, Inc.', + 0x0135: 'Airewear LLC', + 0x0136: 'Seed Labs, Inc. (formerly ETC sp. z.o.o.)', + 0x0137: 'Prestigio Plaza Ltd.', + 0x0138: 'NTEO Inc.', + 0x0139: 'Focus Systems Corporation', + 0x013a: 'Tencent Holdings Limited', + 0x013b: 'Allegion', + 0x013c: 'Murata Manufacuring Co., Ltd.', + 0x013e: 'Nod, Inc.', + 0x013f: 'B&B Manufacturing Company', + 0x0140: 'Alpine Electronics (China) Co., Ltd', + 0x0141: 'FedEx Services', + 0x0142: 'Grape Systems Inc.', + 0x0143: 'Bkon Connect', + 0x0144: 'Lintech GmbH', + 0x0145: 'Novatel Wireless', + 0x0146: 'Ciright', + 0x0147: 'Mighty Cast, Inc.', + 0x0148: 'Ambimat Electronics', + 0x0149: 'Perytons Ltd.', + 0x014a: 'Tivoli Audio, LLC', + 0x014b: 'Master Lock', + 0x014c: 'Mesh-Net Ltd', + 0x014d: 'Huizhou Desay SV Automotive CO., LTD.', + 0x014e: 'Tangerine, Inc.', + 0x014f: 'B&W Group Ltd.', + 0x0150: 'Pioneer Corporation', + 0x0151: 'OnBeep', + 0x0152: 'Vernier Software & Technology', + 0x0153: 'ROL Ergo', + 0x0154: 'Pebble Technology', + 0x0155: 'NETATMO', + 0x0156: 'Accumulate AB', + 0x0157: 'Anhui Huami Information Technology Co., Ltd.', + 0x0158: 'Inmite s.r.o.', + 0x0159: 'ChefSteps, Inc.', + 0x015a: 'micas AG', + 0x015b: 'Biomedical Research Ltd.', + 0x015c: 'Pitius Tec S.L.', + 0x015d: 'Estimote, Inc.', + 0x015e: 'Unikey Technologies, Inc.', + 0x015f: 'Timer Cap Co.', + 0x0160: 'AwoX', + 0x0161: 'yikes', + 0x0162: 'MADSGlobal NZ Ltd.', + 0x0163: 'PCH International', + 0x0164: 'Qingdao Yeelink Information Technology Co., Ltd.', + 0x0165: 'Milwaukee Tool (formerly Milwaukee Electric Tools)', + 0x0166: 'MISHIK Pte Ltd', + 0x0167: 'Bayer HealthCare', + 0x0168: 'Spicebox LLC', + 0x0169: 'emberlight', + 0x016a: 'Cooper-Atkins Corporation', + 0x016b: 'Qblinks', + 0x016c: 'MYSPHERA', + 0x016d: 'LifeScan Inc', + 0x016e: 'Volantic AB', + 0x016f: 'Podo Labs, Inc', + 0x0170: 'Roche Diabetes Care AG', + 0x0171: 'Amazon Fulfillment Service', + 0x0172: 'Connovate Technology Private Limited', + 0x0173: 'Kocomojo, LLC', + 0x0174: 'Everykey LLC', + 0x0175: 'Dynamic Controls', + 0x0176: 'SentriLock', + 0x0177: 'I-SYST inc.', + 0x0178: 'CASIO COMPUTER CO., LTD.', + 0x0179: 'LAPIS Semiconductor Co., Ltd.', + 0x017a: 'Telemonitor, Inc.', + 0x017b: 'taskit GmbH', + 0x017c: 'Daimler AG', + 0x017d: 'BatAndCat', + 0x017e: 'BluDotz Ltd', + 0x017f: 'XTel ApS', + 0x0180: 'Gigaset Communications GmbH', + 0x0181: 'Gecko Health Innovations, Inc.', + 0x0182: 'HOP Ubiquitous', + 0x0183: 'To Be Assigned', + 0x0184: 'Nectar', + 0x0185: 'bel’apps LLC', + 0x0186: 'CORE Lighting Ltd', + 0x0187: 'Seraphim Sense Ltd', + 0x0188: 'Unico RBC', + 0x0189: 'Physical Enterprises Inc.', + 0x018a: 'Able Trend Technology Limited', + 0x018b: 'Konica Minolta, Inc.', + 0x018c: 'Wilo SE', + 0x018d: 'Extron Design Services', + 0x018e: 'Fitbit, Inc.', + 0x018f: 'Fireflies Systems', + 0x0190: 'Intelletto Technologies Inc.', + 0x0191: 'FDK CORPORATION', + 0x0192: 'Cloudleaf, Inc', + 0x0193: 'Maveric Automation LLC', + 0x0194: 'Acoustic Stream Corporation', + 0x0195: 'Zuli', + 0x0196: 'Paxton Access Ltd', + 0x0197: 'WiSilica Inc', + 0x0198: 'Vengit Limited', + 0x0199: 'SALTO SYSTEMS S.L.', + 0x019a: 'TRON Forum (formerly T-Engine Forum)', + 0x019b: 'CUBETECH s.r.o.', + 0x019c: 'Cokiya Incorporated', + 0x019d: 'CVS Health', + 0x019e: 'Ceruus', + 0x019f: 'Strainstall Ltd', + 0x01a0: 'Channel Enterprises (HK) Ltd.', + 0x01a1: 'FIAMM', + 0x01a2: 'GIGALANE.CO.,LTD', + 0x01a3: 'EROAD', + 0x01a4: 'Mine Safety Appliances', + 0x01a5: 'Icon Health and Fitness', + 0x01a6: 'Asandoo GmbH', + 0x01a7: 'ENERGOUS CORPORATION', + 0x01a8: 'Taobao', + 0x01a9: 'Canon Inc.', + 0x01aa: 'Geophysical Technology Inc.', + 0x01ab: 'Facebook, Inc.', + 0x01ac: 'Nipro Diagnostics, Inc.', + 0x01ad: 'FlightSafety International', + 0x01ae: 'Earlens Corporation', + 0x01af: 'Sunrise Micro Devices, Inc.', + 0x01b0: 'Star Micronics Co., Ltd.', + 0x01b1: 'Netizens Sp. z o.o.', + 0x01b2: 'Nymi Inc.', + 0x01b3: 'Nytec, Inc.', + 0x01b4: 'Trineo Sp. z o.o.', + 0x01b5: 'Nest Labs Inc.', + 0x01b6: 'LM Technologies Ltd', + 0x01b7: 'General Electric Company', + 0x01b8: 'i+D3 S.L.', + 0x01b9: 'HANA Micron', + 0x01ba: 'Stages Cycling LLC', + 0x01bb: 'Cochlear Bone Anchored Solutions AB', + 0x01bc: 'SenionLab AB', + 0x01bd: 'Syszone Co., Ltd', + 0x01be: 'Pulsate Mobile Ltd.', + 0x01bf: 'Hong Kong HunterSun Electronic Limited', + 0x01c0: 'pironex GmbH', + 0x01c1: 'BRADATECH Corp.', + 0x01c2: 'Transenergooil AG', + 0x01c3: 'Bunch', + 0x01c4: 'DME Microelectronics', + 0x01c5: 'Bitcraze AB', + 0x01c6: 'HASWARE Inc.', + 0x01c7: 'Abiogenix Inc.', + 0x01c8: 'Poly-Control ApS', + 0x01c9: 'Avi-on', + 0x01ca: 'Laerdal Medical AS', + 0x01cb: 'Fetch My Pet', + 0x01cc: 'Sam Labs Ltd.', + 0x01cd: 'Chengdu Synwing Technology Ltd', + 0x01ce: 'HOUWA SYSTEM DESIGN, k.k.', + 0x01cf: 'BSH', + 0x01d0: 'Primus Inter Pares Ltd', + 0x01d1: 'August', + 0x01d2: 'Gill Electronics', + 0x01d3: 'Sky Wave Design', + 0x01d4: 'Newlab S.r.l.', + 0x01d5: 'ELAD srl', + 0x01d6: 'G-wearables inc.', + 0x01d7: 'Squadrone Systems Inc.', + 0x01d8: 'Code Corporation', + 0x01d9: 'Savant Systems LLC', + 0x01da: 'Logitech International SA', + 0x01db: 'Innblue Consulting', + 0x01dc: 'iParking Ltd.', + 0x01dd: 'Koninklijke Philips Electronics N.V.', + 0x01de: 'Minelab Electronics Pty Limited', + 0x01df: 'Bison Group Ltd.', + 0x01e0: 'Widex A/S', + 0x01e1: 'Jolla Ltd', + 0x01e2: 'Lectronix, Inc.', + 0x01e3: 'Caterpillar Inc', + 0x01e4: 'Freedom Innovations', + 0x01e5: 'Dynamic Devices Ltd', + 0x01e6: 'Technology Solutions (UK) Ltd', + 0x01e7: 'IPS Group Inc.', + 0x01e8: 'STIR', + 0x01e9: 'Sano, Inc', + 0x01ea: 'Advanced Application Design, Inc.', + 0x01eb: 'AutoMap LLC', + 0x01ec: 'Spreadtrum Communications Shanghai Ltd', + 0x01ed: 'CuteCircuit LTD', + 0x01ee: 'Valeo Service', + 0x01ef: 'Fullpower Technologies, Inc.', + 0x01f0: 'KloudNation', + 0x01f1: 'Zebra Technologies Corporation', + 0x01f2: 'Itron, Inc.', + 0x01f3: 'The University of Tokyo', + 0x01f4: 'UTC Fire and Security', + 0x01f5: 'Cool Webthings Limited', + 0x01f6: 'DJO Global', + 0x01f7: 'Gelliner Limited', + 0x01f8: 'Anyka (Guangzhou) Microelectronics Technology Co, LTD', + 0x01f9: 'Medtronic, Inc.', + 0x01fa: 'Gozio, Inc.', + 0x01fb: 'Form Lifting, LLC', + 0x01fc: 'Wahoo Fitness, LLC', + 0x01fd: 'Kontakt Micro-Location Sp. z o.o.', + 0x01fe: 'Radio System Corporation', + 0x01ff: 'Freescale Semiconductor, Inc.', + 0x0200: 'Verifone Systems PTe Ltd. Taiwan Branch', + 0x0201: 'AR Timing', + 0x0202: 'Rigado LLC', + 0x0203: 'Kemppi Oy', + 0x0204: 'Tapcentive Inc.', + 0x0205: 'Smartbotics Inc.', + 0x0206: 'Otter Products, LLC', + 0x0207: 'STEMP Inc.', + 0x0208: 'LumiGeek LLC', + 0x0209: 'InvisionHeart Inc.', + 0x020A: 'Macnica Inc. ', + 0x020b: 'Jaguar Land Rover Limited', + 0x020c: 'CoroWare Technologies, Inc', + 0x020d: 'Simplo Technology Co., LTD', + 0x020e: 'Omron Healthcare Co., LTD', + 0x020f: 'Comodule GMBH', + 0x0210: 'ikeGPS', + 0x0211: 'Telink Semiconductor Co. Ltd', + 0x0212: 'Interplan Co., Ltd', + 0x0213: 'Wyler AG', + 0x0214: 'IK Multimedia Production srl', + 0x0215: 'Lukoton Experience Oy', + 0x0216: 'MTI Ltd', + 0x0217: 'Tech4home, Lda', + 0x0216: 'Hiotech AB', +}; From d4d00f0828bea6601e4a0d7d3ff997b979239316 Mon Sep 17 00:00:00 2001 From: David Schontzler <2080286+schontz@users.noreply.github.com> Date: Fri, 10 Mar 2023 14:06:36 -0800 Subject: [PATCH 002/123] Fix typo --- lib/bluetooth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bluetooth.js b/lib/bluetooth.js index 1becdd9b..9347c044 100644 --- a/lib/bluetooth.js +++ b/lib/bluetooth.js @@ -63,7 +63,7 @@ function parseBluetoothManufacturer(str) { } function parseBluetoothVendor(str) { - const id = parseInt(id); + const id = parseInt(str); if (!isNaN(id)) return bluetoothVendors[id]; } From 62e07052bd072135e9cdc6b6b8ec9ee1615653d6 Mon Sep 17 00:00:00 2001 From: Roger Hardiman Date: Tue, 16 Apr 2024 12:09:46 +0000 Subject: [PATCH 003/123] Handle RISC-V CPU Manufacturer and Brand using uarch in /proc/cpuinfo In the RISC-V world, CPUs are often designed by companies like SiFive, T-Head and Andes. Use the /proc/cpuinfo 'uarch' values to get the CPU designer and CPU model. These designs are then licensed to SoC manufacturers who add I/O and GPU features. For example Allwinner (D1) and StarFive (JH7110), and Sophgo (SG2000) --- lib/cpu.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/cpu.js b/lib/cpu.js index dfe25d5c..786a584a 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -605,6 +605,9 @@ function cpuManufacturer(str) { if (str.indexOf('Xen') >= 0) { result = 'Xen Hypervisor'; } if (str.indexOf('tcg') >= 0) { result = 'QEMU'; } if (str.indexOf('apple') >= 0) { result = 'Apple'; } + if (str.indexOf('sifive') >= 0) { result = 'SiFive'; } + if (str.indexOf('thead') >= 0) { result = 'T-Head'; } + if (str.indexOf('andestech') >= 0) { result = 'Andes Technology'; } return result; } @@ -788,6 +791,17 @@ function getCpu() { } } + // Test RISC-V + if (util.getValue(lines, 'architecture') === 'riscv64') { + const linesRiscV = fs.readFileSync('/proc/cpuinfo').toString().split('\n'); + const uarch = util.getValue(linesRiscV, 'uarch') || ''; + if (uarch.indexOf(',') > -1) { + const split = uarch.split(','); + result.manufacturer = cpuManufacturer(split[0]); + result.brand = split[1]; + } + } + // socket type let lines2 = []; exec('export LC_ALL=C; dmidecode –t 4 2>/dev/null | grep "Upgrade: Socket"; unset LC_ALL', function (error2, stdout2) { From 56032602df58d4b34d1b7743eae2a77fe2979bba Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 8 Dec 2024 12:19:52 +0100 Subject: [PATCH 004/123] system() added Raspberry CM5 detection --- CHANGELOG.md | 148 +++++++++++++++++++++++++++++++--------------- docs/history.html | 5 ++ docs/index.html | 4 +- lib/util.js | 4 ++ 4 files changed, 112 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f9fd1ca..d72c45c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,9 +15,13 @@ #### Breaking Changes -**Be aware**, that the new version 5.x **is NOT fully backward compatible** to version 4.x ... +**Be aware**, that the new version 5.x **is NOT fully backward compatible** to +version 4.x ... -We had to make **several interface changes** to keep systeminformation as consistent as possible. We highly [recommend to go through the complete list](https://systeminformation.io/changes.html) and adapt your own code to be again compatible to the new version 5. +We had to make **several interface changes** to keep systeminformation as +consistent as possible. We highly +[recommend to go through the complete list](https://systeminformation.io/changes.html) +and adapt your own code to be again compatible to the new version 5. | Function | Old | New (V5) | Comments | | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | @@ -54,7 +58,8 @@ We had to make **several interface changes** to keep systeminformation as consis - `diskLayout()`: added S.M.R.R.T. (win) - `fsSize()`: added available - `fsSize()`: improved calculation of used -- `getData()`: support for passing parameters and filters (see section General / getData) +- `getData()`: support for passing parameters and filters (see section General / + getData) - `graphics()`: extended properties (mac OS) - `graphics()`: extended nvidia-smi parsing - `networkInterfaces()`: type detection improved (win - wireless) @@ -74,8 +79,10 @@ We had to make **several interface changes** to keep systeminformation as consis #### Test Full Version 5 Functionality -If you want to see all function results on your machine, please head over to [Testing section](https://systeminformation.io/tests.html). We implemented a tiny test suite where you can easily go through all functions and test resuls on your machine without coding. - +If you want to see all function results on your machine, please head over to +[Testing section](https://systeminformation.io/tests.html). We implemented a +tiny test suite where you can easily go through all functions and test resuls on +your machine without coding. For major (breaking) changes - **version 4, 3 and 2** - see end of page. @@ -83,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.6 | 2024-12-08 | `system()` added Raspberry CM5 detection | | 5.23.5 | 2024-08-21 | `processLoad()` fixed * process list (linux) | | 5.23.4 | 2024-08-06 | `baseboard()` `chassis()` cleaned defaults (linux) | | 5.23.3 | 2024-08-02 | `usb()` fixed duplicate entries (windows) | @@ -254,7 +262,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | 5.9.5 | 2021-10-08 | `battery()` fixed isCharging (windows) | | 5.9.4 | 2021-09-23 | `processes()` fixed memVsz, Memrss (macOS M1) | | 5.9.3 | 2021-09-17 | `cpuTemperature()` improved tdie detection (linux) | -| 5.9.2 | 2021-09-16 | `graohics()` (macOS), `memLayout()` (win) improvements | +| 5.9.2 | 2021-09-16 | `graohics()` (macOS), `memLayout()` (win) improvements | | 5.9.1 | 2021-09-15 | `diskLayout()` fix size (macOS) | | 5.9.0 | 2021-09-15 | `graphics()` new XML parser, added properties (macOS) | | 5.8.9 | 2021-09-13 | `battery()` fix linux | @@ -735,35 +743,57 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. **Breaking Changes** -- `networkStats()`: will provide an **array** of stats for all given interfaces. In previous versions only one interface was provided as a parameter. Pass '*' for all interfaces +- `networkStats()`: will provide an **array** of stats for all given interfaces. + In previous versions only one interface was provided as a parameter. Pass '*' + for all interfaces - `networkStats()`: `rx` and `tx` changed to `rx_bytes` and `tx_bytes` -- `dockerContainerStats()`: will provide an **array** of stats for all given docker containers. In previous versions only one interface was provided as a parameter. Pass '*' for all docker containers +- `dockerContainerStats()`: will provide an **array** of stats for all given + docker containers. In previous versions only one interface was provided as a + parameter. Pass '*' for all docker containers **Other Changes** -- `system()` optimized system detection (e.g. new Raspberry Pi models, ...), additional flags +- `system()` optimized system detection (e.g. new Raspberry Pi models, ...), + additional flags - `system()`, `bios()`, `baseboard()` information also as non-root (linux) - `graphics()` better controller and display detection, fixes - `versions()` optimization, fixes -- `networkInterfaces()` added `operstate`, `type`, `duplex`, `mtu`, `speed`, `carrierChanges` +- `networkInterfaces()` added `operstate`, `type`, `duplex`, `mtu`, `speed`, + `carrierChanges` - `networkStats()` added stats for `errors`, `dropped` - added TypeScript definitions -**Be aware**, that the new version 4.x is **NOT fully backward compatible** to version 3.x ... +**Be aware**, that the new version 4.x is **NOT fully backward compatible** to +version 3.x ... + ### Major (breaking) Changes - Version 3 -- works only with [node.js][nodejs-url] **v4.0.0** and above (using now internal ES6 promise function, arrow functions, ...) -- **Promises**. As you can see in the documentation, you can now also use it in a promise oriented way. But callbacks are still supported. -- **Async/Await**. Due to the promises support, systeminformation also works perfectly with the `async/await` pattern (available in [node.js][nodejs-url] **v7.6.0** and above). See example in the docs. -- `cpuCurrentspeed`: now returns an object with current minimal, maximal and average CPU frequencies of all cores. -- `mem`: now supports also newer versions of `free` (Version 3.3.10 and above); extended information `avaliable` (potentially available memory) -- `fsStats`: added information sum bytes read + write (tx) and sum transfer rate/sec (tx_sec) -- `networkInterfaces`: now providing one more detail: internal - true if this is an internal interface like "lo" -- `networkConnections`: instead of only counting sockets, you now get an array of objects with connection details for each socket (protocol, local and peer address, state) -- `users`: now provides an array of objects with users online including detailed session information (login date/time, ip address, terminal, command) -- `inetLatency`: now you can provide a host against which you want to test latency (default is 8.8.8.8) -- `getDynamicData`: changed order of parameters (callback - if provided - is now the last one): `getDynamicData(srv, network, callback)` -- `getAllData`: changed order of parameters (callback - if provided - is now the last one): `getAllData(srv, network, callback)` +- works only with [node.js][nodejs-url] **v4.0.0** and above (using now internal + ES6 promise function, arrow functions, ...) +- **Promises**. As you can see in the documentation, you can now also use it in + a promise oriented way. But callbacks are still supported. +- **Async/Await**. Due to the promises support, systeminformation also works + perfectly with the `async/await` pattern (available in [node.js][nodejs-url] + **v7.6.0** and above). See example in the docs. +- `cpuCurrentspeed`: now returns an object with current minimal, maximal and + average CPU frequencies of all cores. +- `mem`: now supports also newer versions of `free` (Version 3.3.10 and above); + extended information `avaliable` (potentially available memory) +- `fsStats`: added information sum bytes read + write (tx) and sum transfer + rate/sec (tx_sec) +- `networkInterfaces`: now providing one more detail: internal - true if this is + an internal interface like "lo" +- `networkConnections`: instead of only counting sockets, you now get an array + of objects with connection details for each socket (protocol, local and peer + address, state) +- `users`: now provides an array of objects with users online including detailed + session information (login date/time, ip address, terminal, command) +- `inetLatency`: now you can provide a host against which you want to test + latency (default is 8.8.8.8) +- `getDynamicData`: changed order of parameters (callback - if provided - is now + the last one): `getDynamicData(srv, network, callback)` +- `getAllData`: changed order of parameters (callback - if provided - is now the + last one): `getAllData(srv, network, callback)` New Functions @@ -773,42 +803,60 @@ New Functions - Windows support: for some basic functions (new in version 3.17 ff) - `cpuCache`: returns CPU cache (L1, L2, L3) sizes (new in version 3.14) - `cpuFlags`: returns CPU flags (new in version 3.14) -- `currentLoad.cpus`: returns current load per cpu/core in an array (new in version 3.14) +- `currentLoad.cpus`: returns current load per cpu/core in an array (new in + version 3.14) - `shell`: returns standard shell e.g. /bin/bash (new in version 3.13) -- `blockDevices`: returns array of block devices like disks, partitions, raids, roms (new in version 3.10) -- `dockerContainerProcesses`: returns processes for a specific docker container (new in version 3.8) -- `versions`: returns object of versions - kernel, ssl, node, npm, ...(new in version 3.6) -- `graphics`: returns arrays of graphics controllers and displays (new in version 3.5) -- `networkInterfaceDefault`: returns default network interface (new in version 3.4) -- `processes`: now returns also a process list with all process details (new in version 3.3) +- `blockDevices`: returns array of block devices like disks, partitions, raids, + roms (new in version 3.10) +- `dockerContainerProcesses`: returns processes for a specific docker container + (new in version 3.8) +- `versions`: returns object of versions - kernel, ssl, node, npm, ...(new in + version 3.6) +- `graphics`: returns arrays of graphics controllers and displays (new in + version 3.5) +- `networkInterfaceDefault`: returns default network interface (new in version + 3.4) +- `processes`: now returns also a process list with all process details (new in + version 3.3) - `battery`: retrieves battery status and charging level (new in version 3.2) -- `dockerContainers`: returns a list of all docker containers (new in version 3.1) -- `dockerContainerStats`: returns statistics for a specific docker container (new in version 3.1) -- `dockerAll`: returns a list of all docker containers including their stats (new in version 3.1) -- `disksIO`: returns overall diskIO and IOPS values for all mounted volumes (new in version 3.0) +- `dockerContainers`: returns a list of all docker containers (new in version + 3.1) +- `dockerContainerStats`: returns statistics for a specific docker container + (new in version 3.1) +- `dockerAll`: returns a list of all docker containers including their stats + (new in version 3.1) +- `disksIO`: returns overall diskIO and IOPS values for all mounted volumes (new + in version 3.0) Bug Fixes / improvements - improvement `cpuTemperature` - works now also on Raspberry Pi - bugfix `disksIO` - on OSX read and write got mixed up -- several bug fixes (like assess errors in `cpuCurrentspeed`, potentially incorrect results in `users`, ...) +- several bug fixes (like assess errors in `cpuCurrentspeed`, potentially + incorrect results in `users`, ...) - testet on even more platforms and linux distributions -**Be aware**, that the new version 3.x is **NOT fully backward compatible** to version 2.x ... +**Be aware**, that the new version 3.x is **NOT fully backward compatible** to +version 2.x ... ### Major (breaking) Changes - Version 2 -There had been a lot of changes in version 2 of systeminformation! Here is a quick overview (for those who come from version 1): +There had been a lot of changes in version 2 of systeminformation! Here is a +quick overview (for those who come from version 1): New Functions - `version`: returns systeminformation version (semver) of this library -- `system`: hardware info (manufacturer, product/model name, version, serial, uuid) +- `system`: hardware info (manufacturer, product/model name, version, serial, + uuid) - `networkConnections`: number of active connections - `inetLatency`: latency in ms to external resource (internet) -- `getStaticData`: returns on json object with static data at once (OS, CPU, Network Interfaces - they should not change until restarted) -- `getDynamicData`: returns on json object with all dynamic data at once (e.g. for monitoring agents) -- `getAllData`: returns on json object with all data (static and dynamic) at once +- `getStaticData`: returns on json object with static data at once (OS, CPU, + Network Interfaces - they should not change until restarted) +- `getDynamicData`: returns on json object with all dynamic data at once (e.g. + for monitoring agents) +- `getAllData`: returns on json object with all data (static and dynamic) at + once Renamed Functions (now all camelCase) @@ -827,13 +875,18 @@ Renamed Functions (now all camelCase) Function Changes -- `cpu_temperature`/`cpuTemperature`: -1 is new default (and indicates that non sensors are installed) -- `cpu_temperature`/`cpuTemperature`: new result `max` which returns max temperature of all cores +- `cpu_temperature`/`cpuTemperature`: -1 is new default (and indicates that non + sensors are installed) +- `cpu_temperature`/`cpuTemperature`: new result `max` which returns max + temperature of all cores - `cpu_currentspeed`/`cpuCurrentspeed`: now in GHz - `cpu`: splitted `manufacturer` (e.g. Intel) and `brand` (e.g. Core 2 Duo) -- `network_speed`/`networkStats`: now better support for OS X (also support for `operstate`) -- `network_speed`/`networkStats`: overall received and transferred bytes (rx, tx) -- `mem`: now better support for OS X (also support for `swaptotal`, `swapused`, `swapfree`) +- `network_speed`/`networkStats`: now better support for OS X (also support for + `operstate`) +- `network_speed`/`networkStats`: overall received and transferred bytes (rx, + tx) +- `mem`: now better support for OS X (also support for `swaptotal`, `swapused`, + `swapfree`) - `fs_size`/`fsSize`: use-values now in % (0 - 100% instead of 0 - 1) - `fs_speed`/`fsStats`: now also full support for OS X - `checksite`/`inetChecksite`: new result structure - see command reference @@ -843,6 +896,7 @@ Other changes - osx-temperature-sensor: now added as an optional dependency - no more external dependencies: `request` is not longer needed -- where possible results are now integer or float values (instead of strings) because it is easier to calculate with numbers ;-) +- where possible results are now integer or float values (instead of strings) + because it is easier to calculate with numbers ;-) [nodejs-url]: https://nodejs.org/en/ diff --git a/docs/history.html b/docs/history.html index 1bd5abb9..48e4ad40 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.6 + 2024-12-08 + system() added Raspberry CM5 detection + 5.23.5 2024-08-21 diff --git a/docs/index.html b/docs/index.html index 30856288..ef2acd13 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.5
+
New Version: 5.23.6
@@ -212,7 +212,7 @@
Downloads last month
-
722
+
782
Dependents
diff --git a/lib/util.js b/lib/util.js index 3c59d0de..672071c5 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1018,7 +1018,11 @@ function decodePiCpuinfo(lines) { '13': '400', '14': 'CM4', '15': 'CM4S', + '16': 'Internal use only', '17': '5', + '18': 'CM5 (EMMC)', + '19': 'Internal use only', + '1a': 'CM5 (Lite)', }; const revisionCode = getValue(lines, 'revision', ':', true); From 51c7698b91789e00d2308c9f95249ca3bb27a176 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 8 Dec 2024 12:20:05 +0100 Subject: [PATCH 005/123] 5.23.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e9a7cbd2..ced20ff0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.5", + "version": "5.23.6", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From f7af0a67b78e7894335a6cad510566a25e06ae41 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 9 Dec 2024 09:54:15 +0100 Subject: [PATCH 006/123] networkInterfaces() sanitizing SSID names (windows) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/network.js | 16 +++++++++++++--- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d72c45c0..3038d269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.7 | 2024-12-09 | `networkInterfaces()` sanitizing SSID names (windows) | | 5.23.6 | 2024-12-08 | `system()` added Raspberry CM5 detection | | 5.23.5 | 2024-08-21 | `processLoad()` fixed * process list (linux) | | 5.23.4 | 2024-08-06 | `baseboard()` `chassis()` cleaned defaults (linux) | diff --git a/docs/history.html b/docs/history.html index 48e4ad40..929c6e99 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.7 + 2024-12-09 + networkInterfaces() sanitizing SSID names (windows) + 5.23.6 2024-12-08 diff --git a/docs/index.html b/docs/index.html index ef2acd13..d29acd24 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.6
+
New Version: 5.23.7
diff --git a/lib/network.js b/lib/network.js index 86c45131..4071aef1 100644 --- a/lib/network.js +++ b/lib/network.js @@ -348,7 +348,7 @@ function getWindowsWirelessIfaceSSID(interfaceName) { try { const result = execSync(`netsh wlan show interface name="${interfaceName}" | findstr "SSID"`, util.execOptsWin); const SSID = result.split('\r\n').shift(); - const parseSSID = SSID.split(':').pop(); + const parseSSID = SSID.split(':').pop().trim(); return parseSSID; } catch (error) { return 'Unknown'; @@ -400,8 +400,18 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) { try { const SSID = getWindowsWirelessIfaceSSID(iface); if (SSID !== 'Unknown') { - i8021xState = execSync(`netsh wlan show profiles "${SSID}" | findstr "802.1X"`, util.execOptsWin); - i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin); + + let ifaceSanitized = ''; + const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(SSID); + const l = util.mathMin(s.length, 2000); + + for (let i = 0; i <= l; i++) { + if (s[i] !== undefined) { + ifaceSanitized = ifaceSanitized + s[i]; + } + } + i8021xState = execSync(`netsh wlan show profiles "${ifaceSanitized}" | findstr "802.1X"`, util.execOptsWin); + i8021xProtocol = execSync(`netsh wlan show profiles "${ifaceSanitized}" | findstr "EAP"`, util.execOptsWin); } if (i8021xState.includes(':') && i8021xProtocol.includes(':')) { From efcb478420c3336944690d2f2cffd8ad8270e416 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 9 Dec 2024 09:54:22 +0100 Subject: [PATCH 007/123] 5.23.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ced20ff0..9bdee7c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.6", + "version": "5.23.7", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From dc6474fe846a59fd2d1b67360237229b6072fe5c Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 10 Dec 2024 05:52:04 +0100 Subject: [PATCH 008/123] system() added Raspberry 500 detection --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/util.js | 6 +++--- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3038d269..aaa5167b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.8 | 2024-12-10 | `system()` added Raspberry 500 detection | | 5.23.7 | 2024-12-09 | `networkInterfaces()` sanitizing SSID names (windows) | | 5.23.6 | 2024-12-08 | `system()` added Raspberry CM5 detection | | 5.23.5 | 2024-08-21 | `processLoad()` fixed * process list (linux) | diff --git a/docs/history.html b/docs/history.html index 929c6e99..d7da78d5 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.8 + 2024-12-10 + system() added Raspberry 500 detection + 5.23.7 2024-12-09 diff --git a/docs/index.html b/docs/index.html index d29acd24..b9480de7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.7
+
New Version: 5.23.8
diff --git a/lib/util.js b/lib/util.js index 672071c5..ab85f624 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1020,9 +1020,9 @@ function decodePiCpuinfo(lines) { '15': 'CM4S', '16': 'Internal use only', '17': '5', - '18': 'CM5 (EMMC)', - '19': 'Internal use only', - '1a': 'CM5 (Lite)', + '18': 'CM5', + '19': '500', + '1a': 'CM5 Lite', }; const revisionCode = getValue(lines, 'revision', ':', true); From 5a1bdd7e83e27e2d5f16cee2640355dc91bbed79 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 10 Dec 2024 05:52:09 +0100 Subject: [PATCH 009/123] 5.23.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9bdee7c4..ff600553 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.7", + "version": "5.23.8", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From ca49cd102b5d8733a54c1dd5547bc7367ce26a41 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 11 Dec 2024 06:34:59 +0100 Subject: [PATCH 010/123] typings: added definitions with overload --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/index.d.ts | 8 ++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaa5167b..a7331bc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.9 | 2024-12-11 | `typings` added definitions with overload | | 5.23.8 | 2024-12-10 | `system()` added Raspberry 500 detection | | 5.23.7 | 2024-12-09 | `networkInterfaces()` sanitizing SSID names (windows) | | 5.23.6 | 2024-12-08 | `system()` added Raspberry CM5 detection | diff --git a/docs/history.html b/docs/history.html index d7da78d5..fcd2ea19 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.9 + 2024-12-11 + typings added definitions with overload + 5.23.8 2024-12-10 diff --git a/docs/index.html b/docs/index.html index b9480de7..798a69be 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.8
+
New Version: 5.23.9
diff --git a/lib/index.d.ts b/lib/index.d.ts index 72a21c08..74ce82f1 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -963,6 +963,7 @@ export function chassis(cb?: (data: Systeminformation.ChassisData) => any): Prom export function time(): Systeminformation.TimeData; export function osInfo(cb?: (data: Systeminformation.OsData) => any): Promise; export function versions(apps?: string, cb?: (data: Systeminformation.VersionData) => any): Promise; +export function versions(cb?: (data: Systeminformation.VersionData) => any): Promise; export function shell(cb?: (data: string) => any): Promise; export function uuid(cb?: (data: Systeminformation.UuidData) => any): Promise; @@ -981,6 +982,7 @@ export function battery(cb?: (data: Systeminformation.BatteryData) => any): Prom export function graphics(cb?: (data: Systeminformation.GraphicsData) => any): Promise; export function fsSize(drive?: string, cb?: (data: Systeminformation.FsSizeData[]) => any): Promise; +export function fsSize(cb?: (data: Systeminformation.FsSizeData[]) => any): Promise; export function fsOpenFiles(cb?: (data: Systeminformation.FsOpenFilesData[]) => any): Promise; export function blockDevices(cb?: (data: Systeminformation.BlockDevicesData[]) => any): Promise; export function fsStats(cb?: (data: Systeminformation.FsStatsData) => any): Promise; @@ -999,9 +1001,11 @@ export function networkInterfaces( ): Promise; export function networkStats(ifaces?: string, cb?: (data: Systeminformation.NetworkStatsData[]) => any): Promise; +export function networkStats(cb?: (data: Systeminformation.NetworkStatsData[]) => any): Promise; export function networkConnections(cb?: (data: Systeminformation.NetworkConnectionsData[]) => any): Promise; export function inetChecksite(url: string, cb?: (data: Systeminformation.InetChecksiteData) => any): Promise; export function inetLatency(host?: string, cb?: (data: number) => any): Promise; +export function inetLatency(cb?: (data: number) => any): Promise; export function wifiNetworks(cb?: (data: Systeminformation.WifiNetworkData[]) => any): Promise; export function wifiInterfaces(cb?: (data: Systeminformation.WifiInterfaceData[]) => any): Promise; @@ -1015,9 +1019,13 @@ export function services(serviceName: string, cb?: (data: Systeminformation.Serv export function dockerInfo(cb?: (data: Systeminformation.DockerInfoData) => any): Promise; export function dockerImages(all?: boolean, cb?: (data: Systeminformation.DockerImageData[]) => any): Promise; +export function dockerImages(cb?: (data: Systeminformation.DockerImageData[]) => any): Promise; export function dockerContainers(all?: boolean, cb?: (data: Systeminformation.DockerContainerData[]) => any): Promise; +export function dockerContainers(cb?: (data: Systeminformation.DockerContainerData[]) => any): Promise; export function dockerContainerStats(id?: string, cb?: (data: Systeminformation.DockerContainerStatsData[]) => any): Promise; +export function dockerContainerStats(cb?: (data: Systeminformation.DockerContainerStatsData[]) => any): Promise; export function dockerContainerProcesses(id?: string, cb?: (data: any) => any): Promise; +export function dockerContainerProcesses(cb?: (data: any) => any): Promise; export function dockerVolumes(cb?: (data: Systeminformation.DockerVolumeData[]) => any): Promise; export function dockerAll(cb?: (data: any) => any): Promise; From 97c79625ad23dfd7d5ec035f7b0e7a7073f635b7 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 11 Dec 2024 06:35:06 +0100 Subject: [PATCH 011/123] 5.23.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ff600553..116286ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.8", + "version": "5.23.9", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 5993adeb796651c5865632136d021aac91a3b935 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 12 Dec 2024 08:02:18 +0100 Subject: [PATCH 012/123] time() changed retrieval of timezones (linux, macOS) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/osinfo.js | 24 +++++++++++++++++++----- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7331bc2..c6087062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.10 | 2024-12-12 | `time()` changed retrieval of timezones (linux, macOS) | | 5.23.9 | 2024-12-11 | `typings` added definitions with overload | | 5.23.8 | 2024-12-10 | `system()` added Raspberry 500 detection | | 5.23.7 | 2024-12-09 | `networkInterfaces()` sanitizing SSID names (windows) | diff --git a/docs/history.html b/docs/history.html index fcd2ea19..c6c96d91 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.10 + 2024-12-12 + time() changes retrieval of timezones (linux, macOS) + 5.23.9 2024-12-11 diff --git a/docs/index.html b/docs/index.html index 798a69be..11fe7c1f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.9
+
New Version: 5.23.10
diff --git a/lib/osinfo.js b/lib/osinfo.js index 33aa0c15..16eb8074 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -34,11 +34,25 @@ const _sunos = (_platform === 'sunos'); function time() { let t = new Date().toString().split(' '); - return { - current: Date.now(), - uptime: os.uptime(), - timezone: (t.length >= 7) ? t[5] : '', - timezoneName: Intl ? Intl.DateTimeFormat().resolvedOptions().timeZone : (t.length >= 7) ? t.slice(6).join(' ').replace(/\(/g, '').replace(/\)/g, '') : '' + if (_darwin || _linux) { + const stdout = execSync('date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null', util.execOptsLinux); + const lines = stdout.toString().split(os.EOL); + if (lines.length > 3 && !lines[0]) { + lines.shift(); + } + return { + current: Date.now(), + uptime: os.uptime(), + timezone: lines[0] && lines[1] ? lines[0] + lines[1] : '', + timezoneName: lines[2] && lines[2].indexOf('/zoneinfo/') > 0 ? (lines[2].split('/zoneinfo/')[1] || '') : '' + }; + } else { + return { + current: Date.now(), + uptime: os.uptime(), + timezone: (t.length >= 7) ? t[5] : '', + timezoneName: Intl ? Intl.DateTimeFormat().resolvedOptions().timeZone : (t.length >= 7) ? t.slice(6).join(' ').replace(/\(/g, '').replace(/\)/g, '') : '' + }; }; } From edba2b3023c82a688da5949af1340ef17b9e6a14 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 12 Dec 2024 08:02:27 +0100 Subject: [PATCH 013/123] 5.23.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 116286ac..076d9608 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.9", + "version": "5.23.10", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 7fd3e4cbb10a40dc58249baa50030ec232985713 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 13 Dec 2024 00:24:26 +0100 Subject: [PATCH 014/123] fix time(), networkConnections() fixed wrond PID parsing (macOS) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/network.js | 2 +- lib/osinfo.js | 44 ++++++++++++++++++++++++++------------------ 5 files changed, 34 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6087062..df176b91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.11 | 2024-12-13 | `networkConnections()` fixed wrond PID parsing (macOS) | | 5.23.10 | 2024-12-12 | `time()` changed retrieval of timezones (linux, macOS) | | 5.23.9 | 2024-12-11 | `typings` added definitions with overload | | 5.23.8 | 2024-12-10 | `system()` added Raspberry 500 detection | diff --git a/docs/history.html b/docs/history.html index c6c96d91..812fea2c 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.11 + 2024-12-13 + networkConnections() fixed wrong PID parsing (macOS) + 5.23.10 2024-12-12 diff --git a/docs/index.html b/docs/index.html index 11fe7c1f..88c76fa2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.10
+
New Version: 5.23.11
diff --git a/lib/network.js b/lib/network.js index 4071aef1..160bd343 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1536,7 +1536,7 @@ function networkConnections(callback) { if (_darwin) { // let cmd = 'netstat -natv | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"'; let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; - const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; + const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) { if (!error) { exec('ps -axo pid,command', { maxBuffer: 1024 * 20000 }, function (err2, stdout2) { diff --git a/lib/osinfo.js b/lib/osinfo.js index 16eb8074..cf645172 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -34,26 +34,34 @@ const _sunos = (_platform === 'sunos'); function time() { let t = new Date().toString().split(' '); + const result = { + current: Date.now(), + uptime: os.uptime(), + timezone: (t.length >= 7) ? t[5] : '', + timezoneName: Intl ? Intl.DateTimeFormat().resolvedOptions().timeZone : (t.length >= 7) ? t.slice(6).join(' ').replace(/\(/g, '').replace(/\)/g, '') : '' + }; if (_darwin || _linux) { - const stdout = execSync('date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null', util.execOptsLinux); - const lines = stdout.toString().split(os.EOL); - if (lines.length > 3 && !lines[0]) { - lines.shift(); + try { + const stdout = execSync('date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null', util.execOptsLinux); + const lines = stdout.toString().split(os.EOL); + if (lines.length > 3 && !lines[0]) { + lines.shift(); + } + let timezone = lines[0] || ''; + if (timezone.startsWith('+') || timezone.startsWith('-')) { + timezone = 'GMT'; + } + return { + current: Date.now(), + uptime: os.uptime(), + timezone: lines[1] ? timezone + lines[1] : timezone, + timezoneName: lines[2] && lines[2].indexOf('/zoneinfo/') > 0 ? (lines[2].split('/zoneinfo/')[1] || '') : '' + }; + } catch (e) { + util.noop(); } - return { - current: Date.now(), - uptime: os.uptime(), - timezone: lines[0] && lines[1] ? lines[0] + lines[1] : '', - timezoneName: lines[2] && lines[2].indexOf('/zoneinfo/') > 0 ? (lines[2].split('/zoneinfo/')[1] || '') : '' - }; - } else { - return { - current: Date.now(), - uptime: os.uptime(), - timezone: (t.length >= 7) ? t[5] : '', - timezoneName: Intl ? Intl.DateTimeFormat().resolvedOptions().timeZone : (t.length >= 7) ? t.slice(6).join(' ').replace(/\(/g, '').replace(/\)/g, '') : '' - }; - }; + } + return result; } exports.time = time; From 81d816769c4d794e7791b5e3f6c5d901457cdaf9 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 13 Dec 2024 00:25:16 +0100 Subject: [PATCH 015/123] 5.23.11 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 076d9608..cc3d4a10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.10", + "version": "5.23.11", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From e91f61dd17c30d13b0d9868e40e26b4c59765313 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 13 Dec 2024 07:33:20 +0100 Subject: [PATCH 016/123] networkConnections: improved parsing (macOS) --- lib/network.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/network.js b/lib/network.js index 160bd343..d33cf81c 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1534,8 +1534,7 @@ function networkConnections(callback) { }); } if (_darwin) { - // let cmd = 'netstat -natv | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"'; - let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; + let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6\\|Recv-Q"'; const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) { if (!error) { @@ -1543,6 +1542,9 @@ function networkConnections(callback) { let processes = stdout2.toString().split('\n'); processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); })); let lines = stdout.toString().split('\n'); + const header = lines[0]; + const hasTransferred = header.indexOf('rxbytes') > -1; + lines.shift(); lines.forEach(function (line) { line = line.replace(/ +/g, ' ').split(' '); @@ -1565,7 +1567,7 @@ function networkConnections(callback) { } const hasState = states.indexOf(line[5]) >= 0; let connstate = hasState ? line[5] : 'UNKNOWN'; - let pid = parseInt(line[8 + (hasState ? 0 : -1)], 10); + let pid = parseInt(line[8 + (hasState ? 0 : -1) + (hasTransferred ? 2 : 0)], 10); if (connstate) { result.push({ protocol: line[0], From e8732d42b947bcfcbc530ace178c8eae9d34f247 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 13 Dec 2024 07:53:01 +0100 Subject: [PATCH 017/123] networkConnections: improved parsing (macOS) --- lib/network.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/network.js b/lib/network.js index d33cf81c..2b865adb 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1534,7 +1534,7 @@ function networkConnections(callback) { }); } if (_darwin) { - let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6\\|Recv-Q"'; + let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) { if (!error) { @@ -1542,12 +1542,11 @@ function networkConnections(callback) { let processes = stdout2.toString().split('\n'); processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); })); let lines = stdout.toString().split('\n'); - const header = lines[0]; - const hasTransferred = header.indexOf('rxbytes') > -1; - lines.shift(); + lines.forEach(function (line) { line = line.replace(/ +/g, ' ').split(' '); + const hasTransferred = line.length >= 19; if (line.length >= 8) { let localip = line[3]; let localport = ''; From ac467eee0d9418512cfb0820563335fbb1e9da4a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 13 Dec 2024 07:55:41 +0100 Subject: [PATCH 018/123] networkConnections: improved parsing (macOS) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df176b91..7b5ca3ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.12 | 2024-12-13 | `networkConnections()` fixed wrond PID parsing (macOS) | | 5.23.11 | 2024-12-13 | `networkConnections()` fixed wrond PID parsing (macOS) | | 5.23.10 | 2024-12-12 | `time()` changed retrieval of timezones (linux, macOS) | | 5.23.9 | 2024-12-11 | `typings` added definitions with overload | diff --git a/docs/history.html b/docs/history.html index 812fea2c..76ba248a 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.21 + 2024-12-13 + networkConnections() fixed PID parsing macOS >= version 15 (macOS) + 5.23.11 2024-12-13 diff --git a/docs/index.html b/docs/index.html index 88c76fa2..e04b2fa7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.11
+
New Version: 5.23.12
From c4b99a515eb54c3d719413dd041e3271ee02f11f Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 13 Dec 2024 07:55:50 +0100 Subject: [PATCH 019/123] 5.23.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cc3d4a10..ea20af69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.11", + "version": "5.23.12", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 6d1141bf7a34600c2e8185480ac596e50bde894f Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 14 Dec 2024 08:36:25 +0100 Subject: [PATCH 020/123] wifiConnections() improved BSSID parsing (windows) --- CHANGELOG.md | 5 +++-- docs/history.html | 7 ++++++- docs/index.html | 2 +- lib/wifi.js | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b5ca3ac..0ecadc28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,8 +90,9 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | -| 5.23.12 | 2024-12-13 | `networkConnections()` fixed wrond PID parsing (macOS) | -| 5.23.11 | 2024-12-13 | `networkConnections()` fixed wrond PID parsing (macOS) | +| 5.23.13 | 2024-12-14 | `wifiConnections()` improved BSSID parsing (windows) | +| 5.23.12 | 2024-12-13 | `networkConnections()` fixed wrong PID parsing (macOS) | +| 5.23.11 | 2024-12-13 | `networkConnections()` fixed wrong PID parsing (macOS) | | 5.23.10 | 2024-12-12 | `time()` changed retrieval of timezones (linux, macOS) | | 5.23.9 | 2024-12-11 | `typings` added definitions with overload | | 5.23.8 | 2024-12-10 | `system()` added Raspberry 500 detection | diff --git a/docs/history.html b/docs/history.html index 76ba248a..1ff3f4f7 100644 --- a/docs/history.html +++ b/docs/history.html @@ -58,7 +58,12 @@

Full version history

- 5.23.21 + 5.23.13 + 2024-12-14 + wifiConnections() improved BSSID parsing (windows) + + + 5.23.12 2024-12-13 networkConnections() fixed PID parsing macOS >= version 15 (macOS) diff --git a/docs/index.html b/docs/index.html index e04b2fa7..6360fbd8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.12
+
New Version: 5.23.13
diff --git a/lib/wifi.js b/lib/wifi.js index 40764f79..ea3250b2 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -700,7 +700,7 @@ function wifiConnections(callback) { const model = lines[1].indexOf(':') >= 0 ? lines[1].split(':')[1].trim() : ''; const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : ''; const ssid = util.getValue(lines, 'SSID', ':', true); - const bssid = util.getValue(lines, 'BSSID', ':', true); + const bssid = util.getValue(lines, 'BSSID', ':', true) || util.getValue(lines, 'AP BSSID', ':', true);; const quality = util.getValue(lines, 'Signal', ':', true); const signalLevel = wifiDBFromQuality(quality); const type = util.getValue(lines, 'Radio type', ':', true) || util.getValue(lines, 'Type de radio', ':', true) || util.getValue(lines, 'Funktyp', ':', true) || null; From 30b13d74b17016cb6c52fca8d5983076d320175a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 14 Dec 2024 08:36:30 +0100 Subject: [PATCH 021/123] 5.23.13 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea20af69..98f1e5c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.12", + "version": "5.23.13", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 823503d876a1d90384a1667ddcc092c4f9665cc1 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 17 Dec 2024 22:30:49 +0100 Subject: [PATCH 022/123] chassis(): new chassis detection (macOS) --- lib/system.js | 12 +- lib/util.js | 1161 +++++++++++++++++++++++++++++++++++++++++++++++++ lib/wifi.js | 2 +- 3 files changed, 1168 insertions(+), 7 deletions(-) diff --git a/lib/system.js b/lib/system.js index a4f9677b..c310a974 100644 --- a/lib/system.js +++ b/lib/system.js @@ -688,13 +688,13 @@ function chassis(callback) { exec('ioreg -c IOPlatformExpertDevice -d 2', function (error, stdout) { if (!error) { let lines = stdout.toString().replace(/[<>"]/g, '').split('\n'); - const model = util.getValue(lines, 'model', '=', true); - const modelParts = util.splitByNumber(model); - const version = util.getValue(lines, 'version', '=', true); + const model = util.getAppleModel(util.getValue(lines, 'model', '=', true)); + // const modelParts = util.splitByNumber(model); + // const version = util.getValue(lines, 'version', '=', true); result.manufacturer = util.getValue(lines, 'manufacturer', '=', true); - result.model = version ? util.getValue(lines, 'model', '=', true) : modelParts[0]; - result.type = macOsChassisType(result.model); - result.version = version || model; + result.model = model.model; + result.type = macOsChassisType(model.model); + result.version = model.version; result.serial = util.getValue(lines, 'ioplatformserialnumber', '=', true); result.assetTag = util.getValue(lines, 'board-id', '=', true) || util.getValue(lines, 'target-type', '=', true); result.sku = util.getValue(lines, 'target-sub-type', '=', true); diff --git a/lib/util.js b/lib/util.js index ab85f624..8a3ce5e3 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1323,6 +1323,1166 @@ function semverCompare(v1, v2) { return res; } +function getAppleModel(key) { + const appleModelIds = [ + { + key: 'Mac15,12', + name: 'MacBook Air', + size: '13-inch', + processor: 'M3', + year: '2024', + additional: '' + }, + { + key: 'Mac14,15', + name: 'MacBook Air', + size: '15-inch', + processor: 'M2', + year: '2024', + additional: '' + }, + { + key: 'Mac14,2', + name: 'MacBook Air', + size: '13-inch', + processor: 'M2', + year: '2022', + additional: '' + }, + { + key: 'MacBookAir10,1', + name: 'MacBook Air', + size: '13-inch', + processor: 'M1', + year: '2020', + additional: '' + }, + { + key: 'MacBookAir9,1', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: '2020', + additional: '' + }, + { + key: 'MacBookAir8,2', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: '2019', + additional: '' + }, + { + key: 'MacBookAir8,1', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: '2018', + additional: '' + }, + { + key: 'MacBookAir7,2', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: '2017', + additional: '' + }, + { + key: 'MacBookAir7,2', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: 'Early 2015', + additional: '' + }, + { + key: 'MacBookAir7,1', + name: 'MacBook Air', + size: '11-inch', + processor: '', + year: 'Early 2015', + additional: '' + }, + { + key: 'MacBookAir6,2', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: 'Early 2014', + additional: '' + }, + { + key: 'MacBookAir6,1', + name: 'MacBook Air', + size: '11-inch', + processor: '', + year: 'Early 2014', + additional: '' + }, + { + key: 'MacBookAir6,2', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: 'Mid 2013', + additional: '' + }, + { + key: 'MacBookAir6,1', + name: 'MacBook Air', + size: '11-inch', + processor: '', + year: 'Mid 2013', + additional: '' + }, + { + key: 'MacBookAir5,2', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: 'Mid 2012', + additional: '' + }, + { + key: 'MacBookAir5,1', + name: 'MacBook Air', + size: '11-inch', + processor: '', + year: 'Mid 2012', + additional: '' + }, + { + key: 'MacBookAir4,2', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: 'Mid 2011', + additional: '' + }, + { + key: 'MacBookAir4,1', + name: 'MacBook Air', + size: '11-inch', + processor: '', + year: 'Mid 2011', + additional: '' + }, + { + key: 'MacBookAir3,2', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: 'Late 2010', + additional: '' + }, + { + key: 'MacBookAir3,1', + name: 'MacBook Air', + size: '11-inch', + processor: '', + year: 'Late 2010', + additional: '' + }, + { + key: 'MacBookAir2,1', + name: 'MacBook Air', + size: '13-inch', + processor: '', + year: 'Mid 2009', + additional: '' + }, + { + key: 'Mac16,1', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M4', + year: '2024', + additional: '' + }, + { + key: 'Mac16,6', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M4 Pro', + year: '2024', + additional: '' + }, + { + key: 'Mac16,8', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M4 Max', + year: '2024', + additional: '' + }, + { + key: 'Mac16,5', + name: 'MacBook Pro', + size: '16-inch', + processor: 'M4 Pro', + year: '2024', + additional: '' + }, + { + key: 'Mac16,6', + name: 'MacBook Pro', + size: '16-inch', + processor: 'M4 Max', + year: '2024', + additional: '' + }, + { + key: 'Mac15,3', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M3', + year: 'Nov 2023', + additional: '' + }, + { + key: 'Mac15,6', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M3 Pro', + year: 'Nov 2023', + additional: '' + }, + { + key: 'Mac15,8', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M3 Pro', + year: 'Nov 2023', + additional: '' + }, + { + key: 'Mac15,10', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M3 Max', + year: 'Nov 2023', + additional: '' + }, + { + key: 'Mac15,7', + name: 'MacBook Pro', + size: '16-inch', + processor: 'M3 Pro', + year: 'Nov 2023', + additional: '' + }, + { + key: 'Mac15,9', + name: 'MacBook Pro', + size: '16-inch', + processor: 'M3 Pro', + year: 'Nov 2023', + additional: '' + }, + { + key: 'Mac15,11', + name: 'MacBook Pro', + size: '16-inch', + processor: 'M3 Max', + year: 'Nov 2023', + additional: '' + }, + { + key: 'Mac14,5', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M2 Max', + year: '2023', + additional: '' + }, + { + key: 'Mac14,9', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M2 Max', + year: '2023', + additional: '' + }, + { + key: 'Mac14,6', + name: 'MacBook Pro', + size: '16-inch', + processor: 'M2 Max', + year: '2023', + additional: '' + }, + { + key: 'Mac14,10', + name: 'MacBook Pro', + size: '16-inch', + processor: 'M2 Max', + year: '2023', + additional: '' + }, + { + key: 'Mac14,7', + name: 'MacBook Pro', + size: '13-inch', + processor: 'M2', + year: '2022', + additional: '' + }, + { + key: 'MacBookPro18,3', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M1 Pro', + year: '2021', + additional: '' + }, + { + key: 'MacBookPro18,4', + name: 'MacBook Pro', + size: '14-inch', + processor: 'M1 Max', + year: '2021', + additional: '' + }, + { + key: 'MacBookPro18,1', + name: 'MacBook Pro', + size: '16-inch', + processor: 'M1 Pro', + year: '2021', + additional: '' + }, + { + key: 'MacBookPro18,2', + name: 'MacBook Pro', + size: '16-inch', + processor: 'M1 Max', + year: '2021', + additional: '' + }, + { + key: 'MacBookPro17,1', + name: 'MacBook Pro', + size: '13-inch', + processor: 'M1', + year: '2020', + additional: '' + }, + { + key: 'MacBookPro16,3', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: '2020', + additional: 'Two Thunderbolt 3 ports' + }, + { + key: 'MacBookPro16,2', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: '2020', + additional: 'Four Thunderbolt 3 ports' + }, + { + key: 'MacBookPro16,1', + name: 'MacBook Pro', + size: '16-inch', + processor: '', + year: '2019', + additional: '' + }, + { + key: 'MacBookPro16,4', + name: 'MacBook Pro', + size: '16-inch', + processor: '', + year: '2019', + additional: '' + }, + { + key: 'MacBookPro15,3', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: '2019', + additional: '' + }, + { + key: 'MacBookPro15,2', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: '2019', + additional: '' + }, + { + key: 'MacBookPro15,1', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: '2019', + additional: '' + }, + { + key: 'MacBookPro15,4', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: '2019', + additional: 'Two Thunderbolt 3 ports' + }, + { + key: 'MacBookPro15,1', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: '2018', + additional: '' + }, + { + key: 'MacBookPro15,2', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: '2018', + additional: 'Four Thunderbolt 3 ports' + }, + { + key: 'MacBookPro14,1', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: '2017', + additional: 'Two Thunderbolt 3 ports' + }, + { + key: 'MacBookPro14,2', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: '2017', + additional: 'Four Thunderbolt 3 ports' + }, + { + key: 'MacBookPro14,3', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: '2017', + additional: '' + }, + { + key: 'MacBookPro13,1', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: '2016', + additional: 'Two Thunderbolt 3 ports' + }, + { + key: 'MacBookPro13,2', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: '2016', + additional: 'Four Thunderbolt 3 ports' + }, + { + key: 'MacBookPro13,3', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: '2016', + additional: '' + }, + { + key: 'MacBookPro11,4', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Mid 2015', + additional: '' + }, + { + key: 'MacBookPro11,5', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Mid 2015', + additional: '' + }, + { + key: 'MacBookPro12,1', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: 'Early 2015', + additional: '' + }, + { + key: 'MacBookPro11,2', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Late 2013', + additional: '' + }, + { + key: 'MacBookPro11,3', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Late 2013', + additional: '' + }, + { + key: 'MacBookPro11,1', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: 'Late 2013', + additional: '' + }, + { + key: 'MacBookPro10,1', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Mid 2012', + additional: '' + }, + { + key: 'MacBookPro10,2', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: 'Late 2012', + additional: '' + }, + { + key: 'MacBookPro9,1', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Mid 2012', + additional: '' + }, + { + key: 'MacBookPro9,2', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: 'Mid 2012', + additional: '' + }, + { + key: 'MacBookPro8,3', + name: 'MacBook Pro', + size: '17-inch', + processor: '', + year: 'Early 2011', + additional: '' + }, + { + key: 'MacBookPro8,2', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Early 2011', + additional: '' + }, + { + key: 'MacBookPro8,1', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: 'Early 2011', + additional: '' + }, + { + key: 'MacBookPro6,1', + name: 'MacBook Pro', + size: '17-inch', + processor: '', + year: 'Mid 2010', + additional: '' + }, + { + key: 'MacBookPro6,2', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Mid 2010', + additional: '' + }, + { + key: 'MacBookPro7,1', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: 'Mid 2010', + additional: '' + }, + { + key: 'MacBookPro5,2', + name: 'MacBook Pro', + size: '17-inch', + processor: '', + year: 'Early 2009', + additional: '' + }, + { + key: 'MacBookPro5,3', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Mid 2009', + additional: '' + }, + { + key: 'MacBookPro5,5', + name: 'MacBook Pro', + size: '13-inch', + processor: '', + year: 'Mid 2009', + additional: '' + }, + { + key: 'MacBookPro5,1', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Late 2008', + additional: '' + }, + { + key: 'MacBookPro4,1', + name: 'MacBook Pro', + size: '15-inch', + processor: '', + year: 'Early 2008', + additional: '' + }, + { + key: 'MacBook10,1', + name: 'MacBook', + size: '12-inch', + processor: '', + year: '2017', + additional: '' + }, + { + key: 'MacBook9,1', + name: 'MacBook', + size: '12-inch', + processor: '', + year: 'Early 2016', + additional: '' + }, + { + key: 'MacBook8,1', + name: 'MacBook', + size: '12-inch', + processor: '', + year: 'Early 2015', + additional: '' + }, + { + key: 'MacBook7,1', + name: 'MacBook', + size: '13-inch', + processor: '', + year: 'Mid 2010', + additional: '' + }, + { + key: 'MacBook6,1', + name: 'MacBook', + size: '13-inch', + processor: '', + year: 'Late 2009', + additional: '' + }, + { + key: 'MacBook5,2', + name: 'MacBook', + size: '13-inch', + processor: '', + year: 'Early 2009', + additional: '' + }, + { + key: 'Mac14,13', + name: 'Mac Studio', + size: '', + processor: '', + year: '2023', + additional: '' + }, + { + key: 'Mac14,14', + name: 'Mac Studio', + size: '', + processor: '', + year: '2023', + additional: '' + }, + { + key: 'Mac13,1', + name: 'Mac Studio', + size: '', + processor: '', + year: '2022', + additional: '' + }, + { + key: 'Mac13,2', + name: 'Mac Studio', + size: '', + processor: '', + year: '2022', + additional: '' + }, + { + key: 'Mac16,11', + name: 'Mac mini', + size: '', + processor: 'M4 Pro', + year: '2024', + additional: '' + }, + { + key: 'Mac16,10', + name: 'Mac mini', + size: '', + processor: 'M4', + year: '2024', + additional: '' + }, + { + key: 'Mac14,3', + name: 'Mac mini', + size: '', + processor: 'M2', + year: '2023', + additional: '' + }, + { + key: 'Mac14,12', + name: 'Mac mini', + size: '', + processor: 'M2 Pro', + year: '2023', + additional: '' + }, + { + key: 'Macmini9,1', + name: 'Mac mini', + size: '', + processor: 'M1', + year: '2020', + additional: '' + }, + { + key: 'Macmini8,1', + name: 'Mac mini', + size: '', + processor: '', + year: 'Late 2018', + additional: '' + }, + { + key: 'Macmini7,1', + name: 'Mac mini', + size: '', + processor: '', + year: 'Late 2014', + additional: '' + }, + { + key: 'Macmini6,1', + name: 'Mac mini', + size: '', + processor: '', + year: 'Late 2012', + additional: '' + }, + { + key: 'Macmini6,2', + name: 'Mac mini', + size: '', + processor: '', + year: 'Late 2012', + additional: '' + }, + { + key: 'Macmini5,1', + name: 'Mac mini', + size: '', + processor: '', + year: 'Mid 2011', + additional: '' + }, + { + key: 'Macmini5,2', + name: 'Mac mini', + size: '', + processor: '', + year: 'Mid 2011', + additional: '' + }, + { + key: 'Macmini4,1', + name: 'Mac mini', + size: '', + processor: '', + year: 'Mid 2010', + additional: '' + }, + { + key: 'Macmini3,1', + name: 'Mac mini', + size: '', + processor: '', + year: 'Early 2009', + additional: '' + }, + { + key: 'Mac16,3', + name: 'iMac', + size: '24-inch', + processor: 'M4', + year: '2024', + additional: 'Four ports' + }, + { + key: 'Mac16,2', + name: 'iMac', + size: '24-inch', + processor: 'M4', + year: '2024', + additional: 'Two ports' + }, + { + key: 'Mac15,5', + name: 'iMac', + size: '24-inch', + processor: 'M3', + year: '2023', + additional: 'Four ports' + }, + { + key: 'Mac15,4', + name: 'iMac', + size: '24-inch', + processor: 'M3', + year: '2023', + additional: 'Two ports' + }, + { + key: 'iMac21,1', + name: 'iMac', + size: '24-inch', + processor: 'M1', + year: '2021', + additional: '' + }, + { + key: 'iMac21,2', + name: 'iMac', + size: '24-inch', + processor: 'M1', + year: '2021', + additional: '' + }, + { + key: 'iMac20,1', + name: 'iMac', + size: '27-inch', + processor: '', + year: '2020', + additional: 'Retina 5K' + }, + { + key: 'iMac20,2', + name: 'iMac', + size: '27-inch', + processor: '', + year: '2020', + additional: 'Retina 5K' + }, + { + key: 'iMac19,1', + name: 'iMac', + size: '27-inch', + processor: '', + year: '2019', + additional: 'Retina 5K' + }, + { + key: 'iMac19,2', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: '2019', + additional: 'Retina 4K' + }, + { + key: 'iMacPro1,1', + name: 'iMac Pro', + size: '', + processor: '', + year: '2017', + additional: '' + }, + { + key: 'iMac18,3', + name: 'iMac', + size: '27-inch', + processor: '', + year: '2017', + additional: 'Retina 5K' + }, + { + key: 'iMac18,2', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: '2017', + additional: 'Retina 4K' + }, + { + key: 'iMac18,1', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: '2017', + additional: '' + }, + { + key: 'iMac17,1', + name: 'iMac', + size: '27-inch', + processor: '', + year: 'Late 2015', + additional: 'Retina 5K' + }, + { + key: 'iMac16,2', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: 'Late 2015', + additional: 'Retina 4K' + }, + { + key: 'iMac16,1', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: 'Late 2015', + additional: '' + }, + { + key: 'iMac15,1', + name: 'iMac', + size: '27-inch', + processor: '', + year: 'Late 2014', + additional: 'Retina 5K' + }, + { + key: 'iMac14,4', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: 'Mid 2014', + additional: '' + }, + { + key: 'iMac14,2', + name: 'iMac', + size: '27-inch', + processor: '', + year: 'Late 2013', + additional: '' + }, + { + key: 'iMac14,1', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: 'Late 2013', + additional: '' + }, + { + key: 'iMac13,2', + name: 'iMac', + size: '27-inch', + processor: '', + year: 'Late 2012', + additional: '' + }, + { + key: 'iMac13,1', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: 'Late 2012', + additional: '' + }, + { + key: 'iMac12,2', + name: 'iMac', + size: '27-inch', + processor: '', + year: 'Mid 2011', + additional: '' + }, + { + key: 'iMac12,1', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: 'Mid 2011', + additional: '' + }, + { + key: 'iMac11,3', + name: 'iMac', + size: '27-inch', + processor: '', + year: 'Mid 2010', + additional: '' + }, + { + key: 'iMac11,2', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: 'Mid 2010', + additional: '' + }, + { + key: 'iMac10,1', + name: 'iMac', + size: '21.5-inch', + processor: '', + year: 'Late 2009', + additional: '' + }, + { + key: 'iMac9,1', + name: 'iMac', + size: '20-inch', + processor: '', + year: 'Early 2009', + additional: '' + }, + { + key: 'Mac14,8', + name: 'Mac Pro', + size: '', + processor: '', + year: '2023', + additional: '' + }, + { + key: 'Mac14,8', + name: 'Mac Pro', + size: '', + processor: '', + year: '2023', + additional: 'Rack' + }, + { + key: 'MacPro7,1', + name: 'Mac Pro', + size: '', + processor: '', + year: '2019', + additional: '' + }, + { + key: 'MacPro7,1', + name: 'Mac Pro', + size: '', + processor: '', + year: '2019', + additional: 'Rack' + }, + { + key: 'MacPro6,1', + name: 'Mac Pro', + size: '', + processor: '', + year: 'Late 2013', + additional: '' + }, + { + key: 'MacPro5,1', + name: 'Mac Pro', + size: '', + processor: '', + year: 'Mid 2012', + additional: '' + }, + { + key: 'MacPro5,1', + name: 'Mac Pro Server', + size: '', + processor: '', + year: 'Mid 2012', + additional: 'Server' + }, + { + key: 'MacPro5,1', + name: 'Mac Pro', + size: '', + processor: '', + year: 'Mid 2010', + additional: '' + }, + { + key: 'MacPro5,1', + name: 'Mac Pro Server', + size: '', + processor: '', + year: 'Mid 2010', + additional: 'Server' + }, + { + key: 'MacPro4,1', + name: 'Mac Pro', + size: '', + processor: '', + year: 'Early 2009', + additional: '' + } + ]; + + const list = appleModelIds.filter((model) => model.key === key); + if (list.length === 0) { + return { + key: key, + model: 'Apple', + version: 'Unknown' + }; + } + const features = []; + if (list[0].size) { features.push(list[0].size); } + if (list[0].processor) { features.push(list[0].processor); } + if (list[0].year) { features.push(list[0].year); } + if (list[0].additional) { features.push(list[0].additional); } + return { + key: key, + model: list[0].name, + version: list[0].name + ' (' + features.join(', ') + ')' + }; +} + function noop() { } exports.toInt = toInt; @@ -1375,3 +2535,4 @@ exports.mathMin = mathMin; exports.WINDIR = WINDIR; exports.getFilesInPath = getFilesInPath; exports.semverCompare = semverCompare; +exports.getAppleModel = getAppleModel; diff --git a/lib/wifi.js b/lib/wifi.js index ea3250b2..c287b140 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -700,7 +700,7 @@ function wifiConnections(callback) { const model = lines[1].indexOf(':') >= 0 ? lines[1].split(':')[1].trim() : ''; const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : ''; const ssid = util.getValue(lines, 'SSID', ':', true); - const bssid = util.getValue(lines, 'BSSID', ':', true) || util.getValue(lines, 'AP BSSID', ':', true);; + const bssid = util.getValue(lines, 'BSSID', ':', true) || util.getValue(lines, 'AP BSSID', ':', true); const quality = util.getValue(lines, 'Signal', ':', true); const signalLevel = wifiDBFromQuality(quality); const type = util.getValue(lines, 'Radio type', ':', true) || util.getValue(lines, 'Type de radio', ':', true) || util.getValue(lines, 'Funktyp', ':', true) || null; From 26b5cd24e342aaee6ffa1a507426c8ce5c02407a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 18 Dec 2024 15:00:24 +0100 Subject: [PATCH 023/123] chassis() new chassis detection (macOS) --- CHANGELOG.md | 1 + README.md | 355 ++++++++++++++++++++++++++++------------------ docs/history.html | 5 + docs/index.html | 4 +- lib/system.js | 2 +- 5 files changed, 225 insertions(+), 142 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ecadc28..036ab6c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.14 | 2024-12-18 | `chassis()` new chassis detection (macOS) | | 5.23.13 | 2024-12-14 | `wifiConnections()` improved BSSID parsing (windows) | | 5.23.12 | 2024-12-13 | `networkConnections()` fixed wrong PID parsing (macOS) | | 5.23.11 | 2024-12-13 | `networkConnections()` fixed wrong PID parsing (macOS) | diff --git a/README.md b/README.md index 406ef742..0c4a9861 100644 --- a/README.md +++ b/README.md @@ -19,31 +19,64 @@ Changelog

- [![NPM Version][npm-image]][npm-url] - [![NPM Downloads][downloads-image]][downloads-url] - [![Git Issues][issues-img]][issues-url] - [![Closed Issues][closed-issues-img]][closed-issues-url] - no dependencies - [![Sponsoring][sponsor-badge]][sponsor-url] - [![Caretaker][caretaker-image]][caretaker-url] - [![MIT license][license-img]][license-url] +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Git Issues][issues-img]][issues-url] +[![Closed Issues][closed-issues-img]][closed-issues-url] +no dependencies +[![Sponsoring][sponsor-badge]][sponsor-url] +[![Caretaker][caretaker-image]][caretaker-url] +[![MIT license][license-img]][license-url] ## The Systeminformation Project -This is amazing. Started as a small project just for myself, it now has > 15,000 lines of code, > 600 versions published, up to 8 mio downloads per month, > 300 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who contributed to this project! + +``` + .''. + .''. . *''* :_\/_: + :_\/_: _\(/_ .:.*_\/_* : /\ : + .''.: /\ : ./)\ ':'* /\ * : '..'. + :_\/_:'.:::. ' *''* * '.\'/.' _\(/_ + : /\ : ::::: *_\/_* -= o =- /)\ + '..' ':::' * /\ * .'/.\'. ' + *..* : + * + * /.\ * * . * + . /..'\ . . * . + */'.'\* . . . * * + * /.''.'\ * . . . * + . */.'.'.\* +.........".""""/'.''.'.\""."."........"."."....................... + ^^^[_]^^^* +``` + +I wish you all a Merry Christmas and a peaceful New Year 2025. + +This is amazing. Started as a small project just for myself, it now has > 15,000 +lines of code, > 650 versions published, up to 8 mio downloads per month, > 330 +mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who +contributed to this project! ## Please support this project ... ☕️ -Over the past few years I spent **more than 2.000 hours** working on this project and invested in hardware to be able to test on different platforms. Currently I am working very hard on the next **new version 6.0** completely rewritten in TypeScript and with a lot of new features. Any support is highly appreciated - [Buy me a coffee](https://www.buymeacoffee.com/systeminfo). +Over the past few years I spent **more than 3.000 hours** working on this +project and invested in hardware to be able to test on different platforms. +Currently I am working very hard on the next **new version 6.0** completely +rewritten in TypeScript and with a lot of new features. Any support is highly +appreciated - [Buy me a coffee](https://www.buymeacoffee.com/systeminfo). -**Your contribution** make it possible for me to keep working on this project, add new features and support more platforms. Thank you in advance! +**Your contribution** make it possible for me to keep working on this project, +add new features and support more platforms. Thank you in advance! ## New Version 5.0 -The new Version 5 is here - this next major version release 5.0 comes with new functionality and several improvements and changes (some of them are breaking changes!): +The new Version 5 is here - this next major version release 5.0 comes with new +functionality and several improvements and changes (some of them are breaking +changes!): - added audio: get detailed audio device information - added bluetooth: get detailed bluetooth device information -- added dockerImages, dockerVolumes: get detailed information about docker images and volumes +- added dockerImages, dockerVolumes: get detailed information about docker + images and volumes - added printer: get information from detected printers - added usb: get detailed usb controller and device information - added wifi interfaces and connections: extended wifi information @@ -52,23 +85,32 @@ The new Version 5 is here - this next major version release 5.0 comes with new f - better/extended system info detection - Apple Silicon M1/M2/M3 support - better Raspberry-PI detection -- systeminformation website updated and extended with full documentation and examples [systeminformation.io][systeminformation-url] +- systeminformation website updated and extended with full documentation and + examples [systeminformation.io][systeminformation-url] - lot of minor improvements -Breaking Changes in version 5: you will see several breaking changes for the sake of a more consistent API interface and to be future proof. Read the [detailed version 5 changes][changes5-url]. +Breaking Changes in version 5: you will see several breaking changes for the +sake of a more consistent API interface and to be future proof. Read the +[detailed version 5 changes][changes5-url]. -I did a lot of testing on different platforms and machines but of course there might be some issues that I am not aware of. I would be happy if you inform me when you discover any issues. Issues can be [opened here][new-issue]. +I did a lot of testing on different platforms and machines but of course there +might be some issues that I am not aware of. I would be happy if you inform me +when you discover any issues. Issues can be [opened here][new-issue]. ## Quick Start -Lightweight collection of 50+ functions to retrieve detailed hardware, system and OS information. +Lightweight collection of 50+ functions to retrieve detailed hardware, system +and OS information. - simple to use -- get detailed information about system, cpu, baseboard, battery, memory, disks/filesystem, network, docker, software, services and processes -- supports Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support +- get detailed information about system, cpu, baseboard, battery, memory, + disks/filesystem, network, docker, software, services and processes +- supports Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and + Android support - no npm dependencies -**Attention**: this is a `node.js` library. It is supposed to be used as a backend/server-side library and will definitely not work within a browser. +**Attention**: this is a `node.js` library. It is supposed to be used as a +backend/server-side library and will definitely not work within a browser. ### Installation @@ -84,7 +126,8 @@ npm i systeminformation ### Give it a try with `npx`? -You just want to give it a try - right from your command line without installing it? Here is how you can call it with `npx`: +You just want to give it a try - right from your command line without installing +it? Here is how you can call it with `npx`: ``` # get basic system info (System, OS, CPU) @@ -94,10 +137,10 @@ npx systeminformation info npx systeminformation ``` - #### Still need Version 4? -If you need version 4 (for compatibility reasons), you can install version 4 (latest release) like this +If you need version 4 (for compatibility reasons), you can install version 4 +(latest release) like this ```bash npm install systeminformation@4 —save @@ -111,15 +154,16 @@ npm install systeminformation@4 ### Usage -All functions (except `version` and `time`) are implemented as asynchronous functions. Here a small example how to use them: +All functions (except `version` and `time`) are implemented as asynchronous +functions. Here a small example how to use them: ```js -const si = require('systeminformation'); +const si = require("systeminformation"); // promises style - new since version 3 si.cpu() - .then(data => console.log(data)) - .catch(error => console.error(error)); + .then((data) => console.log(data)) + .catch((error) => console.error(error)); ``` ## News and Changes @@ -140,7 +184,8 @@ si.cpu() - Version 5.14.0: `blockDevices()` added raid group member (linux) - Version 5.13.0: `networkConnections()` added process name (macOS) - Version 5.12.0: `cpu()` added performance and efficiency cores -- Version 5.11.0: `networkInterfaces()` added default property and default parameter +- Version 5.11.0: `networkInterfaces()` added default property and default + parameter - Version 5.10.0: basic `android` support - Version 5.9.0: `graphics()` added properties (macOS) - Version 5.8.0: `disksIO()` added waitTime, waitPercent (linux) @@ -150,29 +195,41 @@ si.cpu() - Version 5.4.0: `dockerImages()` added - Version 5.3.0: `osInfo()` added remoteSession (win only) - Version 5.2.0: `wifiInterfaces()` and `wifiConnections()` added -- Version 5.1.0: `memLayout()` added ECC flag, `bios()` added language, features (linux) -- Version 5.0.0: new version 5 - attention there are some breaking changes. See [detailed version 5 changes here][changes5-url]. +- Version 5.1.0: `memLayout()` added ECC flag, `bios()` added language, features + (linux) +- Version 5.0.0: new version 5 - attention there are some breaking changes. See + [detailed version 5 changes here][changes5-url]. - ... You can find all changes here: [detailed changelog][changelog-url] ## Core concept -[Node.js][nodejs-url] comes with some basic OS information, but I always wanted a little more. So I came up to write this little library. This library is still a work in progress. It is supposed to be used as a backend/server-side library (it will definitely not work within a browser). It requires node.js version 4.0 and above. +[Node.js][nodejs-url] comes with some basic OS information, but I always wanted +a little more. So I came up to write this little library. This library is still +a work in progress. It is supposed to be used as a backend/server-side library +(it will definitely not work within a browser). It requires node.js version 4.0 +and above. -I was able to test it on several Debian, Raspbian, Ubuntu distributions as well as macOS (Mavericks, Yosemite, El Captain, Sierra, High Sierra, Mojave, Catalina, Big Sur) and some Windows 7, Windows 8, Windows 10, FreeBSD, OpenBSD, NetBSD and SunOS machines. Not all functions are supported on all operating systems. Have a look at the function reference in the docs to get further details. +I was able to test it on several Debian, Raspbian, Ubuntu distributions as well +as macOS (Mavericks, Yosemite, El Captain, Sierra, High Sierra, Mojave, +Catalina, Big Sur) and some Windows 7, Windows 8, Windows 10, FreeBSD, OpenBSD, +NetBSD and SunOS machines. Not all functions are supported on all operating +systems. Have a look at the function reference in the docs to get further +details. If you have comments, suggestions & reports, please feel free to contact me! - -I also created a nice little command line tool called [mmon][mmon-github-url] (micro-monitor) for Linux and macOS, also available via [github][mmon-github-url] and [npm][mmon-npm-url] - +I also created a nice little command line tool called [mmon][mmon-github-url] +(micro-monitor) for Linux and macOS, also available via +[github][mmon-github-url] and [npm][mmon-npm-url] ## Reference ### Function Reference and OS Support -Full function reference with examples can be found at [https://systeminformation.io][systeminformation-url]. +Full function reference with examples can be found at +[https://systeminformation.io][systeminformation-url]. #### 1. General @@ -323,7 +380,8 @@ Full function reference with examples can be found at [https://systeminformation | | manufacturer | X | | X | | | manufacturer | | | serial | X | | X | | | battery serial | -* See known issues if you have a problem with macOS temperature or windows temperature +- See known issues if you have a problem with macOS temperature or windows + temperature #### 6. Graphics @@ -800,7 +858,7 @@ Full function reference with examples can be found at [https://systeminformation | | [0].rss | X | X | X | X | X | resident set size | | | [0].vsz | X | X | X | X | X | virtual size in Kbytes | | | [0].command | X | X | X | X | X | command and arguments | -| si.dockerVolumes(cb) | [{...}] | returns array of all docker volumes | +| si.dockerVolumes(cb) | [{...}] | returns array of all docker volumes | | | | | | | | [0].name | X | X | X | X | X | volume name | | | [0].driver | X | X | X | X | X | driver | | | [0].labels | X | X | X | X | X | labels object | @@ -857,74 +915,78 @@ Full function reference with examples can be found at [https://systeminformation | Function | Result object | Linux | BSD | Mac | Win | Sun | Comments | | ----------------------------------- | ------------- | ----- | --- | --- | --- | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | si.getStaticData(cb) | {...} | X | X | X | X | X | all static data at once | -| si.getDynamicData(srv,iface,cb) | {...} | X | X | X | X | X | all dynamic data at once
Specify services and interfaces to monitor
Defaults to first external network interface
Pass "*" for ALL services (linux/win only)
Pass "*" for ALL network interfaces | -| si.getAllData(srv,iface,cb) | {...} | X | X | X | X | X | all data at once
Specify services and interfaces to monitor
Defaults to first external network interface
Pass "*" for ALL services (linux/win only)
Pass "*" for ALL network interfaces | +| si.getDynamicData(srv,iface,cb) | {...} | X | X | X | X | X | all dynamic data at once
Specify services and interfaces to monitor
Defaults to first external network interface
Pass "_" for ALL services (linux/win only)
Pass "_" for ALL network interfaces | +| si.getAllData(srv,iface,cb) | {...} | X | X | X | X | X | all data at once
Specify services and interfaces to monitor
Defaults to first external network interface
Pass "_" for ALL services (linux/win only)
Pass "_" for ALL network interfaces | | si.get(valueObject,cb) | {...} | X | X | X | X | X | get partial system info data at once
In valueObject you can define
all values, you want to get back
(see documentation for details) | | si.observe(valueObject,interval,cb) | - | X | X | X | X | X | Observe a defined value object
call callback on changes
polling interval in milliseconds | ### cb: Asynchronous Function Calls (callback) -Remember: all functions (except `version` and `time`) are implemented as asynchronous functions! There are now three ways to consume them: +Remember: all functions (except `version` and `time`) are implemented as +asynchronous functions! There are now three ways to consume them: **Callback Style** ```js -const si = require('systeminformation'); - -si.cpu(function(data) { - console.log('CPU Information:'); - console.log('- manufacturer: ' + data.manufacturer); - console.log('- brand: ' + data.brand); - console.log('- speed: ' + data.speed); - console.log('- cores: ' + data.cores); - console.log('- physical cores: ' + data.physicalCores); - console.log('...'); -}) +const si = require("systeminformation"); + +si.cpu(function (data) { + console.log("CPU Information:"); + console.log("- manufacturer: " + data.manufacturer); + console.log("- brand: " + data.brand); + console.log("- speed: " + data.speed); + console.log("- cores: " + data.cores); + console.log("- physical cores: " + data.physicalCores); + console.log("..."); +}); ``` ### Promises **Promises Style** is new in version 3.0. -When omitting callback parameter (cb), then you can use all function in a promise oriented way. All functions (except of `version` and `time`) are returning a promise, that you can consume: +When omitting callback parameter (cb), then you can use all function in a +promise oriented way. All functions (except of `version` and `time`) are +returning a promise, that you can consume: ```js -const si = require('systeminformation'); +const si = require("systeminformation"); si.cpu() - .then(data => { - console.log('CPU Information:'); - console.log('- manufacturer: ' + data.manufacturer); - console.log('- brand: ' + data.brand); - console.log('- speed: ' + data.speed); - console.log('- cores: ' + data.cores); - console.log('- physical cores: ' + data.physicalCores); - console.log('...'); + .then((data) => { + console.log("CPU Information:"); + console.log("- manufacturer: " + data.manufacturer); + console.log("- brand: " + data.brand); + console.log("- speed: " + data.speed); + console.log("- cores: " + data.cores); + console.log("- physical cores: " + data.physicalCores); + console.log("..."); }) - .catch(error => console.error(error)); + .catch((error) => console.error(error)); ``` ### Async / Await **Using async / await** (available since node v7.6) -Since node v7.6 you can also use the `async` / `await` pattern. The above example would then look like this: +Since node v7.6 you can also use the `async` / `await` pattern. The above +example would then look like this: ```js -const si = require('systeminformation'); +const si = require("systeminformation"); async function cpuData() { try { const data = await si.cpu(); - console.log('CPU Information:'); - console.log('- manufacturer: ' + data.manufacturer); - console.log('- brand: ' + data.brand); - console.log('- speed: ' + data.speed); - console.log('- cores: ' + data.cores); - console.log('- physical cores: ' + data.physicalCores); - console.log('...'); + console.log("CPU Information:"); + console.log("- manufacturer: " + data.manufacturer); + console.log("- brand: " + data.brand); + console.log("- speed: " + data.speed); + console.log("- cores: " + data.cores); + console.log("- physical cores: " + data.physicalCores); + console.log("..."); } catch (e) { - console.log(e) + console.log(e); } } ``` @@ -933,9 +995,11 @@ async function cpuData() { #### macOS - Temperature Sensor -To be able to measure temperature on macOS I created a little additional package. Due to some difficulties -in NPM with `optionalDependencies` I unfortunately was getting unexpected warnings on other platforms. -So I decided to drop this optional dependency for macOS - so by default, you will not get correct values. +To be able to measure temperature on macOS I created a little additional +package. Due to some difficulties in NPM with `optionalDependencies` I +unfortunately was getting unexpected warnings on other platforms. So I decided +to drop this optional dependency for macOS - so by default, you will not get +correct values. This additional package is now also supporting Apple Silicon M1/M2/M3 machines. @@ -946,58 +1010,72 @@ installation command: $ npm install osx-temperature-sensor --save ``` -`systeminformation` will then detect this additional library and return the temperature when calling systeminformations standard function `cpuTemperature()` +`systeminformation` will then detect this additional library and return the +temperature when calling systeminformations standard function `cpuTemperature()` #### Windows Temperature, Battery, ... -`get-WmiObject` - which is used to determine temperature and battery sometimes needs to be run with admin -privileges. So if you do not get any values, try to run it again with according -privileges. If you still do not get any values, your system might not support this feature. -In some cases we also discovered that `get-WmiObject` returned incorrect temperature values. +`get-WmiObject` - which is used to determine temperature and battery sometimes +needs to be run with admin privileges. So if you do not get any values, try to +run it again with according privileges. If you still do not get any values, your +system might not support this feature. In some cases we also discovered that +`get-WmiObject` returned incorrect temperature values. #### Linux Temperature -In some cases you need to install the Linux `sensors` package to be able to measure temperature -e.g. on DEBIAN based systems by running `sudo apt-get install lm-sensors` +In some cases you need to install the Linux `sensors` package to be able to +measure temperature e.g. on DEBIAN based systems by running +`sudo apt-get install lm-sensors` #### Linux S.M.A.R.T. Status -To be able to detect S.M.A.R.T. status on Linux you need to install `smartmontools`. On DEBIAN based Linux distributions you can install it by running `sudo apt-get install smartmontools` +To be able to detect S.M.A.R.T. status on Linux you need to install +`smartmontools`. On DEBIAN based Linux distributions you can install it by +running `sudo apt-get install smartmontools` #### Windows Encoding Issues -I now reimplemented all windows functions to avoid encoding problems (special chacarters). And as Windows 11 now dropped `wmic` support, I had to move completely to `powershell`. Be sure that powershell version 5+ is installed on your machine. On older Windows versions (7, 8) you might still see encoding problems due to the old powershell version. + +I now reimplemented all windows functions to avoid encoding problems (special +chacarters). And as Windows 11 now dropped `wmic` support, I had to move +completely to `powershell`. Be sure that powershell version 5+ is installed on +your machine. On older Windows versions (7, 8) you might still see encoding +problems due to the old powershell version. + ## *: Additional Notes -In `fsStats()`, `disksIO()` and `networkStats()` the results / sec. values (rx_sec, IOPS, ...) are calculated correctly beginning -with the second call of the function. It is determined by calculating the difference of transferred bytes / IOs -divided by the time between two calls of the function. +In `fsStats()`, `disksIO()` and `networkStats()` the results / sec. values +(rx_sec, IOPS, ...) are calculated correctly beginning with the second call of +the function. It is determined by calculating the difference of transferred +bytes / IOs divided by the time between two calls of the function. -The first time you are calling one of these functions, you will get `null` for transfer rates. The second time, you should then get statistics based on the time between the two calls ... +The first time you are calling one of these functions, you will get `null` for +transfer rates. The second time, you should then get statistics based on the +time between the two calls ... -So basically, if you e.g. need a value for network stats every second, your code should look like this: +So basically, if you e.g. need a value for network stats every second, your code +should look like this: ```js -const si = require('systeminformation'); +const si = require("systeminformation"); -setInterval(function() { - si.networkStats().then(data => { +setInterval(function () { + si.networkStats().then((data) => { console.log(data); - }) -}, 1000) + }); +}, 1000); ``` Beginning with the second call, you get network transfer values per second. ## Finding new issues -I am happy to discuss any comments and suggestions. Please feel free to contact me if you see any possibility of improvement! - +I am happy to discuss any comments and suggestions. Please feel free to contact +me if you see any possibility of improvement! ## Comments If you have ideas or comments, please do not hesitate to contact me. - Happy monitoring! Sincerely, @@ -1006,7 +1084,8 @@ Sebastian Hildebrandt, [+innovations](http://www.plus-innovations.com) ## Credits -Written by Sebastian Hildebrandt [sebhildebrandt](https://github.com/sebhildebrandt) +Written by Sebastian Hildebrandt +[sebhildebrandt](https://github.com/sebhildebrandt) #### Contributors @@ -1028,66 +1107,70 @@ Written by Sebastian Hildebrandt [sebhildebrandt](https://github.com/sebhildebra - Ricardo Polo [ricardopolo](https://github.com/ricardopolo) - Miłosz Dźwigała [mily20001](https://github.com/mily20001) - cconley717 [cconley717](https://github.com/cconley717) -- Maria Camila Cubides [MariaCamilaCubides](https://github.com/MariaCamilaCubides) +- Maria Camila Cubides + [MariaCamilaCubides](https://github.com/MariaCamilaCubides) - Aleksander Krasnicki [plakak](https://github.com/plakak) - Alexis Tyler [OmgImAlexis](https://github.com/OmgImAlexis) - Simon Smith [si458](https://github.com/si458) OSX Temperature: credits here are going to: -- Frank Stock [pcafstockf](https://github.com/pcafstockf) - for his work on [smc-code][smc-code-url] +- Frank Stock [pcafstockf](https://github.com/pcafstockf) - for his work on + [smc-code][smc-code-url] ## Copyright Information -Linux is a registered trademark of Linus Torvalds. Apple, macOS, OS X are registered trademarks of Apple Inc., -Windows is a registered trademark of Microsoft Corporation. Node.js is a trademark of Joyent Inc., -Intel is a trademark of Intel Corporation, AMD is a trademark of Advanced Micro Devices Inc., -Raspberry Pi is a trademark of the Raspberry Pi Foundation, Debian is a trademark owned by Software in the Public Interest, Inc., -Ubuntu is a trademark of Canonical Ltd., FreeBSD is a registered trademark of The FreeBSD Foundation, -NetBSD is a registered trademark of The NetBSD Foundation, Docker is a trademark of Docker, Inc., Sun, -Solaris, OpenSolaris and registered trademarks of Sun Microsystems, VMware is a trademark of VMware Inc, -Virtual Box is a trademark of Oracle Corporation, Xen is a registered trademark of Xen Project, -QEMU is a trademark of Fabrice Bellard, bochs is a trademark of The Bochs Project, USB and USB Logo -are trademarks of USB Implementation Forum, Bluetooth and Bluetooth Logo are trademarks of Bluetooth SIG, -Android is a trademark of Google LLC, Parallels is a trademarks of Parallels International GmbH. +Linux is a registered trademark of Linus Torvalds. Apple, macOS, OS X are +registered trademarks of Apple Inc., Windows is a registered trademark of +Microsoft Corporation. Node.js is a trademark of Joyent Inc., Intel is a +trademark of Intel Corporation, AMD is a trademark of Advanced Micro Devices +Inc., Raspberry Pi is a trademark of the Raspberry Pi Foundation, Debian is a +trademark owned by Software in the Public Interest, Inc., Ubuntu is a trademark +of Canonical Ltd., FreeBSD is a registered trademark of The FreeBSD Foundation, +NetBSD is a registered trademark of The NetBSD Foundation, Docker is a trademark +of Docker, Inc., Sun, Solaris, OpenSolaris and registered trademarks of Sun +Microsystems, VMware is a trademark of VMware Inc, Virtual Box is a trademark of +Oracle Corporation, Xen is a registered trademark of Xen Project, QEMU is a +trademark of Fabrice Bellard, bochs is a trademark of The Bochs Project, USB and +USB Logo are trademarks of USB Implementation Forum, Bluetooth and Bluetooth +Logo are trademarks of Bluetooth SIG, Android is a trademark of Google LLC, +Parallels is a trademarks of Parallels International GmbH. All other trademarks are the property of their respective owners. ## License [![MIT license][license-img]][license-url] ->The [`MIT`][license-url] License (MIT) +> The [`MIT`][license-url] License (MIT) > ->Copyright © 2014-2024 Sebastian Hildebrandt, [+innovations](http://www.plus-innovations.com). +> Copyright © 2014-2024 Sebastian Hildebrandt, +> [+innovations](http://www.plus-innovations.com). > ->Permission is hereby granted, free of charge, to any person obtaining a copy ->of this software and associated documentation files (the "Software"), to deal ->in the Software without restriction, including without limitation the rights ->to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ->copies of the Software, and to permit persons to whom the Software is ->furnished to do so, subject to the following conditions: +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: > ->The above copyright notice and this permission notice shall be included in ->all copies or substantial portions of the Software. +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. > ->THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ->IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ->FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ->AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ->LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ->OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ->THE SOFTWARE. +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. > ->Further details see [LICENSE](LICENSE) file. - +> Further details see [LICENSE](LICENSE) file. [npm-image]: https://img.shields.io/npm/v/systeminformation.svg?style=flat-square [npm-url]: https://npmjs.org/package/systeminformation [downloads-image]: https://img.shields.io/npm/dm/systeminformation.svg?style=flat-square [downloads-url]: https://npmjs.org/package/systeminformation - [sponsor-badge]: https://img.shields.io/badge/Support-Buy%20me%20a%20coffee-brightgreen?style=flat-square [sponsor-url]: https://www.buymeacoffee.com/systeminfo - [license-url]: https://github.com/sebhildebrandt/systeminformation/blob/master/LICENSE [license-img]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square [npmjs-license]: https://img.shields.io/npm/l/systeminformation.svg?style=flat-square @@ -1095,22 +1178,16 @@ All other trademarks are the property of their respective owners. [changes5-url]: https://systeminformation.io/changes.html [caretaker-url]: https://github.com/sebhildebrandt [caretaker-image]: https://img.shields.io/badge/caretaker-sebhildebrandt-blue.svg?style=flat-square - [nodejs-url]: https://nodejs.org/en/ [docker-url]: https://www.docker.com/ [systeminformation-url]: https://systeminformation.io - [daviddm-img]: https://img.shields.io/david/sebhildebrandt/systeminformation.svg?style=flat-square [daviddm-url]: https://david-dm.org/sebhildebrandt/systeminformation - [issues-img]: https://img.shields.io/github/issues/sebhildebrandt/systeminformation.svg?style=flat-square [issues-url]: https://github.com/sebhildebrandt/systeminformation/issues [closed-issues-img]: https://img.shields.io/github/issues-closed-raw/sebhildebrandt/systeminformation.svg?style=flat-square&color=brightgreen [closed-issues-url]: https://github.com/sebhildebrandt/systeminformation/issues?q=is%3Aissue+is%3Aclosed - [new-issue]: https://github.com/sebhildebrandt/systeminformation/issues/new/choose - [mmon-npm-url]: https://npmjs.org/package/mmon [mmon-github-url]: https://github.com/sebhildebrandt/mmon - [smc-code-url]: https://github.com/pcafstockf/smc-reader diff --git a/docs/history.html b/docs/history.html index 1ff3f4f7..b7ae40ee 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.14 + 2024-12-18 + chassis() new chassis detection (macOS) + 5.23.13 2024-12-14 diff --git a/docs/index.html b/docs/index.html index 6360fbd8..f56234dc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -204,7 +204,7 @@
-
15,884
+
17,089
Lines of code
@@ -212,7 +212,7 @@
Downloads last month
-
782
+
786
Dependents
diff --git a/lib/system.js b/lib/system.js index c310a974..c1e28f25 100644 --- a/lib/system.js +++ b/lib/system.js @@ -692,7 +692,7 @@ function chassis(callback) { // const modelParts = util.splitByNumber(model); // const version = util.getValue(lines, 'version', '=', true); result.manufacturer = util.getValue(lines, 'manufacturer', '=', true); - result.model = model.model; + result.model = model.key; result.type = macOsChassisType(model.model); result.version = model.version; result.serial = util.getValue(lines, 'ioplatformserialnumber', '=', true); From d32376c6882eac581595ff42012f925d79d7572b Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 18 Dec 2024 15:00:32 +0100 Subject: [PATCH 024/123] 5.23.14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 98f1e5c8..d95111a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.13", + "version": "5.23.14", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 195177bc039490b9a0510e2c764e85878a5ce817 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 21 Dec 2024 15:46:53 +0100 Subject: [PATCH 025/123] users(), wifiNetworks() fixed parsing (macOS Seguoia) --- 2 | 2 ++ CHANGELOG.md | 1 + README.md | 2 +- docs/history.html | 5 +++++ docs/index.html | 6 +++--- docs/security.html | 17 ++++++++++++++++ lib/users.js | 2 +- lib/wifi.js | 50 ++++++++++++++++++++++++++++++++++++++++++++-- 8 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 2 diff --git a/2 b/2 new file mode 100644 index 00000000..5d8b2f0a --- /dev/null +++ b/2 @@ -0,0 +1,2 @@ +WARNING: The airport command line tool is deprecated and will be removed in a future release. +For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool. diff --git a/CHANGELOG.md b/CHANGELOG.md index 036ab6c5..3f05990b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.15 | 2024-12-21 | `users()` fixed parsing (macOS Seguoia) | | 5.23.14 | 2024-12-18 | `chassis()` new chassis detection (macOS) | | 5.23.13 | 2024-12-14 | `wifiConnections()` improved BSSID parsing (windows) | | 5.23.12 | 2024-12-13 | `networkConnections()` fixed wrong PID parsing (macOS) | diff --git a/README.md b/README.md index 0c4a9861..0d6c964b 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ I wish you all a Merry Christmas and a peaceful New Year 2025. -This is amazing. Started as a small project just for myself, it now has > 15,000 +This is amazing. Started as a small project just for myself, it now has > 17,000 lines of code, > 650 versions published, up to 8 mio downloads per month, > 330 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who contributed to this project! diff --git a/docs/history.html b/docs/history.html index b7ae40ee..0c2ff41f 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.15 + 2024-12-21 + users(), wifiNetworks() fixed parsing (macOS Seguoia) + 5.23.14 2024-12-18 diff --git a/docs/index.html b/docs/index.html index f56234dc..4520f7fc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -166,11 +166,11 @@
- Security advisory:
Update to v5.21.8
+ Security advisory:
Update to v5.23.7
systeminformation
 
-
New Version: 5.23.13
+
New Version: 5.23.15
@@ -204,7 +204,7 @@
-
17,089
+
17,135
Lines of code
diff --git a/docs/security.html b/docs/security.html index 4f4404f5..9245321b 100644 --- a/docs/security.html +++ b/docs/security.html @@ -44,10 +44,27 @@
Security Advisories
+

SSID Command Injection Vulnerability

+

Affected versions: + < 5.23.7
+ Date: 2024-11-11
+ CVE indentifier CVE-2024-56334 +

+ +

Impact

+

We had an issue that there was a possibility to perform a potential command injection possibility by crafting detected SSIDs in networkInterfaces() on windows machines.

+ +

Patch

+

Problem was fixed with parameter checking. If you are using version 5, please upgrade to version >= 5.23.7.

+
+
+

Passing User Paramters to Systeminformation

For most of the applications that are using systeminformation, there is no reason to worry. But be aware! If you are using inetLatency(), inetChecksite(), services(), processLoad(), versions() with arbitrary untrusted user input, you should pay extra attention! We are doing a lot of input sanitation for those functions inside this package but we cannot handle all cases!

This can lead to serious impact on your servers!

We highly recommend to always upgrade to the latest version of our package. We maintain security updates for version 5 AND also version 4. For version 4 you can install latest version by placing "systeminformation": "^4" in your package.json (dependencies) and run npm install

+
+

SSID Command Injection Vulnerability

Affected versions: diff --git a/lib/users.js b/lib/users.js index 8d877a2d..e6ffc3b0 100644 --- a/lib/users.js +++ b/lib/users.js @@ -120,7 +120,7 @@ function parseUsersDarwin(lines) { result_w.command = l.slice(5, 1000).join(' '); // find corresponding 'who' line who_line = result_who.filter(function (obj) { - return (obj.user === result_w.user && (obj.tty.substring(3, 1000) === result_w.tty || obj.tty === result_w.tty)); + return (obj.user.substring(0, 10) === result_w.user.substring(0, 10) && (obj.tty.substring(3, 1000) === result_w.tty || obj.tty === result_w.tty)); }); if (who_line.length === 1) { result.push({ diff --git a/lib/wifi.js b/lib/wifi.js index c287b140..72624c00 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -396,6 +396,47 @@ function parseWifiDarwin(wifiObj) { } return result; } + +function parseWifi2Darwin(wifiStr) { + const result = []; + try { + let wifiObj = JSON.parse(wifiStr); + wifiObj = wifiObj.SPAirPortDataType[0].spairport_airport_interfaces[0].spairport_airport_other_local_wireless_networks; + wifiObj.forEach(function (wifiItem) { + + let security = []; + const sm = wifiItem.spairport_security_mode; + if (sm === 'spairport_security_mode_wep') { + security.push('WEP'); + } else if (sm === 'spairport_security_mode_wpa2_personal') { + security.push('WPA2'); + } else if (sm.startsWith('spairport_security_mode_wpa2_enterprise')) { + security.push('WPA2 EAP'); + } else if (sm.startsWith('pairport_security_mode_wpa3_transition')) { + security.push('WPA2/WPA3'); + } else if (sm.startsWith('pairport_security_mode_wpa3')) { + security.push('WPA3'); + } + const channelInfo = new RegExp(/(\d+) \((\d)GHz, (\d+)MHz\)/g).exec(wifiItem.spairport_network_channel); + + result.push({ + ssid: wifiItem._name || '', + bssid: '', + mode: wifiItem.spairport_network_phymode, + channel: parseInt(channelInfo[0].split(' ')[0]), + frequency: wifiFrequencyFromChannel(channelInfo[1]), + signalLevel: null, + quality: null, + security, + wpaFlags: [], + rsnFlags: [] + }); + }); + return result; + } catch (e) { + return result; + } +}; function wifiNetworks(callback) { return new Promise((resolve) => { process.nextTick(() => { @@ -459,10 +500,15 @@ function wifiNetworks(callback) { resolve(result); } } else if (_darwin) { - let cmd = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s -x'; + let cmd = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s -x >2 /dev/bull; echo "######"; system_profiler -json SPAirPortDataType'; exec(cmd, { maxBuffer: 1024 * 40000 }, function (error, stdout) { const output = stdout.toString(); - result = parseWifiDarwin(util.plistParser(output)); + const parts = output.split('######'); + if (parts[0]) { + result = parseWifiDarwin(util.plistParser(parts[0])); + } else { + result = parseWifi2Darwin(parts[1]); + } if (callback) { callback(result); } From 5dbfab01cae01a93f5c23453b9268bf05af8d570 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 21 Dec 2024 15:47:11 +0100 Subject: [PATCH 026/123] users(), wifiNetworks() fixed parsing (macOS Seguoia) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f05990b..99efb6a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,7 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | -| 5.23.15 | 2024-12-21 | `users()` fixed parsing (macOS Seguoia) | +| 5.23.15 | 2024-12-21 | `users()`, `wifiNetworks()` fixed parsing (macOS Seguoia) | | 5.23.14 | 2024-12-18 | `chassis()` new chassis detection (macOS) | | 5.23.13 | 2024-12-14 | `wifiConnections()` improved BSSID parsing (windows) | | 5.23.12 | 2024-12-13 | `networkConnections()` fixed wrong PID parsing (macOS) | From 93ccfdf3dbc5adcf8b92997d9ed9138ef6deabae Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 21 Dec 2024 15:47:18 +0100 Subject: [PATCH 027/123] 5.23.15 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d95111a6..cdb0197a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.14", + "version": "5.23.15", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 1dd534d4cd37e9259242c1a19027d85209bccadd Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 21 Dec 2024 17:47:49 +0100 Subject: [PATCH 028/123] networkConnections() refactored PID parsing (macOS) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/network.js | 11 ++++++----- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99efb6a5..15d9aa4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.16 | 2024-12-13 | `networkConnections()` refactored PID parsing (macOS) | | 5.23.15 | 2024-12-21 | `users()`, `wifiNetworks()` fixed parsing (macOS Seguoia) | | 5.23.14 | 2024-12-18 | `chassis()` new chassis detection (macOS) | | 5.23.13 | 2024-12-14 | `wifiConnections()` improved BSSID parsing (windows) | diff --git a/docs/history.html b/docs/history.html index 0c2ff41f..29c43ead 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.16 + 2024-12-22 + networkConnections() refactored PID parsing (macOS) + 5.23.15 2024-12-21 diff --git a/docs/index.html b/docs/index.html index 4520f7fc..a4192ee8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.15
+
New Version: 5.23.16
diff --git a/lib/network.js b/lib/network.js index 2b865adb..f9305558 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1417,9 +1417,10 @@ function getProcessName(processes, pid) { } }); cmd = cmd.split(' -')[0]; - // return cmd; - const cmdParts = cmd.split('/'); - return cmdParts[cmdParts.length - 1]; + cmd = cmd.split(' /')[0]; + return cmd; + // const cmdParts = cmd.split('/'); + // return cmdParts[cmdParts.length - 1]; } function networkConnections(callback) { @@ -1546,7 +1547,7 @@ function networkConnections(callback) { lines.forEach(function (line) { line = line.replace(/ +/g, ' ').split(' '); - const hasTransferred = line.length >= 19; + const hasTransferred = line.length >= 17; if (line.length >= 8) { let localip = line[3]; let localport = ''; @@ -1566,7 +1567,7 @@ function networkConnections(callback) { } const hasState = states.indexOf(line[5]) >= 0; let connstate = hasState ? line[5] : 'UNKNOWN'; - let pid = parseInt(line[8 + (hasState ? 0 : -1) + (hasTransferred ? 2 : 0)], 10); + let pid = parseInt(line[6 + (hasState ? 0 : -1) + (hasTransferred ? 2 : 0)], 10); if (connstate) { result.push({ protocol: line[0], From cea12c50b6d01fa4f6527f4cff852db7f7e1dfe6 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 21 Dec 2024 18:07:16 +0100 Subject: [PATCH 029/123] networkConnections() refactored PID parsing (macOS) --- lib/network.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/network.js b/lib/network.js index f9305558..bce8694a 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1536,18 +1536,24 @@ function networkConnections(callback) { } if (_darwin) { let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; - const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; + const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'.split('|'); exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) { if (!error) { exec('ps -axo pid,command', { maxBuffer: 1024 * 20000 }, function (err2, stdout2) { let processes = stdout2.toString().split('\n'); processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); })); let lines = stdout.toString().split('\n'); - - + let pidPos = 8; + if (lines[0] !== '') { + const lineParts = lines[0].replace(/ +/g, ' ').split(' '); + for (let i = 0; i < lineParts.length; i++) { + if (states.indexOf(lineParts[i]) >= 0) { + pidPos = i + 3; + } + }; + } lines.forEach(function (line) { line = line.replace(/ +/g, ' ').split(' '); - const hasTransferred = line.length >= 17; if (line.length >= 8) { let localip = line[3]; let localport = ''; @@ -1567,7 +1573,7 @@ function networkConnections(callback) { } const hasState = states.indexOf(line[5]) >= 0; let connstate = hasState ? line[5] : 'UNKNOWN'; - let pid = parseInt(line[6 + (hasState ? 0 : -1) + (hasTransferred ? 2 : 0)], 10); + let pid = parseInt(line[pidPos + (hasState ? 0 : -1)], 10); if (connstate) { result.push({ protocol: line[0], From 51c89c1f1c74f269fc07f29c445c02ba0e5ac3c8 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 21 Dec 2024 18:25:44 +0100 Subject: [PATCH 030/123] wifiNetworks() refactored parsing (macOS) --- lib/wifi.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/wifi.js b/lib/wifi.js index 72624c00..74ab488e 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -345,7 +345,7 @@ function getWifiNetworkListIw(iface) { } } -function parseWifiDarwin(wifiObj) { +function parseWifiDarwinXX(wifiObj) { const result = []; if (wifiObj) { wifiObj.forEach(function (wifiItem) { @@ -397,7 +397,7 @@ function parseWifiDarwin(wifiObj) { return result; } -function parseWifi2Darwin(wifiStr) { +function parseWifiDarwin(wifiStr) { const result = []; try { let wifiObj = JSON.parse(wifiStr); @@ -418,15 +418,16 @@ function parseWifi2Darwin(wifiStr) { security.push('WPA3'); } const channelInfo = new RegExp(/(\d+) \((\d)GHz, (\d+)MHz\)/g).exec(wifiItem.spairport_network_channel); + const signalLevel = wifiItem.spairport_signal_noise || null; result.push({ ssid: wifiItem._name || '', - bssid: '', + bssid: wifiItem.spairport_network_bssid || '', mode: wifiItem.spairport_network_phymode, channel: parseInt(channelInfo[0].split(' ')[0]), frequency: wifiFrequencyFromChannel(channelInfo[1]), - signalLevel: null, - quality: null, + signalLevel: signalLevel ? parseInt(signalLevel, 10) : null, + quality: wifiQualityFromDB(signalLevel), security, wpaFlags: [], rsnFlags: [] @@ -500,15 +501,9 @@ function wifiNetworks(callback) { resolve(result); } } else if (_darwin) { - let cmd = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s -x >2 /dev/bull; echo "######"; system_profiler -json SPAirPortDataType'; + let cmd = 'system_profiler SPAirPortDataType -json 2>/dev/null'; exec(cmd, { maxBuffer: 1024 * 40000 }, function (error, stdout) { - const output = stdout.toString(); - const parts = output.split('######'); - if (parts[0]) { - result = parseWifiDarwin(util.plistParser(parts[0])); - } else { - result = parseWifi2Darwin(parts[1]); - } + result = parseWifiDarwin(stdout.toString()); if (callback) { callback(result); } From 473f63916c492bcfbfccd1b93db1dac0af9d0f28 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 21 Dec 2024 18:37:29 +0100 Subject: [PATCH 031/123] wifiNetworks() refactored parsing (macOS) --- lib/wifi.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/wifi.js b/lib/wifi.js index 74ab488e..1adf4dce 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -417,15 +417,15 @@ function parseWifiDarwin(wifiStr) { } else if (sm.startsWith('pairport_security_mode_wpa3')) { security.push('WPA3'); } - const channelInfo = new RegExp(/(\d+) \((\d)GHz, (\d+)MHz\)/g).exec(wifiItem.spairport_network_channel); + const channel = parseInt((wifiItem.spairport_network_channel).split(' ')[0]) || 0; const signalLevel = wifiItem.spairport_signal_noise || null; result.push({ ssid: wifiItem._name || '', bssid: wifiItem.spairport_network_bssid || '', mode: wifiItem.spairport_network_phymode, - channel: parseInt(channelInfo[0].split(' ')[0]), - frequency: wifiFrequencyFromChannel(channelInfo[1]), + channel, + frequency: wifiFrequencyFromChannel(channel), signalLevel: signalLevel ? parseInt(signalLevel, 10) : null, quality: wifiQualityFromDB(signalLevel), security, From c490c6ee9e3394922569ec705cf7a50984b0e8bc Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 21 Dec 2024 18:47:43 +0100 Subject: [PATCH 032/123] wifiNetworks() refactored parsing (macOS) --- lib/wifi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wifi.js b/lib/wifi.js index 1adf4dce..dea6d388 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -417,12 +417,12 @@ function parseWifiDarwin(wifiStr) { } else if (sm.startsWith('pairport_security_mode_wpa3')) { security.push('WPA3'); } - const channel = parseInt((wifiItem.spairport_network_channel).split(' ')[0]) || 0; + const channel = parseInt(('' + wifiItem.spairport_network_channel).split(' ')[0]) || 0; const signalLevel = wifiItem.spairport_signal_noise || null; result.push({ ssid: wifiItem._name || '', - bssid: wifiItem.spairport_network_bssid || '', + bssid: wifiItem.spairport_network_bssid || null, mode: wifiItem.spairport_network_phymode, channel, frequency: wifiFrequencyFromChannel(channel), From 8acbce7126ee650578b7607de50feeeeb42df4d0 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 22 Dec 2024 09:05:32 +0100 Subject: [PATCH 033/123] 5.23.16 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cdb0197a..295b4dc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.15", + "version": "5.23.16", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 8a801aec95f3aec6e4fe19c105211af6f6a0879f Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 22 Dec 2024 13:21:54 +0100 Subject: [PATCH 034/123] refactored wifiConections() (macOS) --- lib/wifi.js | 129 +++++++++++++++++++++------------------------------- 1 file changed, 53 insertions(+), 76 deletions(-) diff --git a/lib/wifi.js b/lib/wifi.js index dea6d388..715aa6f4 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -645,85 +645,62 @@ function wifiConnections(callback) { } resolve(result); } else if (_darwin) { - let cmd = 'system_profiler SPNetworkDataType'; + let cmd = 'system_profiler SPNetworkDataType SPAirPortDataType -xml 2>/dev/null; echo "######" ; ioreg -n AppleBCMWLANSkywalkInterface -r 2>/dev/null'; exec(cmd, function (error, stdout) { - const parts1 = stdout.toString().split('\n\n Wi-Fi:\n\n'); - if (parts1.length > 1) { - const lines = parts1[1].split('\n\n')[0].split('\n'); - const iface = util.getValue(lines, 'BSD Device Name', ':', true); - const model = util.getValue(lines, 'hardware', ':', true); - cmd = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I 2>/dev/null; echo "######" ; ioreg -n AppleBCMWLANSkywalkInterface -r 2>/dev/null'; - exec(cmd, function (error, stdout) { - const parts = stdout.toString().split('######'); - const lines2 = parts[0].split('\n'); - let lines3 = []; - if (parts[1].indexOf(' | {') > 0 && parts[1].indexOf(' | }') > parts[1].indexOf(' | {')) { - lines3 = parts[1].split(' | {')[1].split(' | }')[0].replace(/ \| /g, '').replace(/"/g, '').split('\n'); - } - if (lines2.length > 10) { - const ssid = util.getValue(lines2, 'ssid', ':', true); - const bssid = util.getValue(lines2, 'bssid', ':', true) || formatBssid(util.getValue(lines3, 'IO80211BSSID', '=', true)); - const security = util.getValue(lines2, 'link auth', ':', true); - const txRate = util.getValue(lines2, 'lastTxRate', ':', true); - const channel = util.getValue(lines2, 'channel', ':', true).split(',')[0]; - const type = '802.11'; - const rssi = util.toInt(util.getValue(lines2, 'agrCtlRSSI', ':', true)); - /// const noise = util.toInt(util.getValue(lines2, 'agrCtlNoise', ':', true)); - const signalLevel = rssi; - if (ssid || bssid) { - result.push({ - id: 'Wi-Fi', - iface, - model, - ssid, - bssid, - channel: util.toInt(channel), - frequency: channel ? wifiFrequencyFromChannel(channel) : null, - type, - security, - signalLevel, - quality: wifiQualityFromDB(signalLevel), - txRate - }); - } - } - if (lines3.length > 10) { - const ssid = util.getValue(lines3, 'IO80211SSID', '=', true); - const bssid = formatBssid(util.getValue(lines3, 'IO80211BSSID', '=', true)); - const security = ''; - const txRate = -1; - const signalLevel = -1; - const quality = -1; - const channel = util.getValue(lines3, 'IO80211Channel', '=', true); - const type = '802.11'; - if ((ssid || bssid) && !result.length) { - result.push({ - id: 'Wi-Fi', - iface, - model, - ssid, - bssid, - channel: util.toInt(channel), - frequency: channel ? wifiFrequencyFromChannel(channel) : null, - type, - security, - signalLevel, - quality, - txRate - }); - } - } - if (callback) { - callback(result); - } - resolve(result); - }); - } else { - if (callback) { - callback(result); + try { + const parts = stdout.toString().split('######'); + const profilerObj = util.plistParser(parts[0]); + const networkObj = profilerObj[0]._SPCommandLineArguments.indexOf('SPNetworkDataType') >= 0 ? profilerObj[0]._items : profilerObj[1]._items; + const airportObj = profilerObj[0]._SPCommandLineArguments.indexOf('SPAirPortDataType') >= 0 ? profilerObj[0]._items[0].spairport_airport_interfaces : profilerObj[1]._items[0].spairport_airport_interfaces; + + // parts[1] : ioreg + let lines3 = []; + if (parts[1].indexOf(' | {') > 0 && parts[1].indexOf(' | }') > parts[1].indexOf(' | {')) { + lines3 = parts[1].split(' | {')[1].split(' | }')[0].replace(/ \| /g, '').replace(/"/g, '').split('\n'); } - resolve(result); + + const networkWifiObj = networkObj.find((item) => { return item._name === 'Wi-Fi'; }); + const airportWifiObj = airportObj[0].spairport_current_network_information; + + const channel = parseInt(('' + airportWifiObj.spairport_network_channel).split(' ')[0]) || 0; + const signalLevel = airportWifiObj.spairport_signal_noise || null; + + let security = []; + const sm = airportWifiObj.spairport_security_mode; + if (sm === 'spairport_security_mode_wep') { + security.push('WEP'); + } else if (sm === 'spairport_security_mode_wpa2_personal') { + security.push('WPA2'); + } else if (sm.startsWith('spairport_security_mode_wpa2_enterprise')) { + security.push('WPA2 EAP'); + } else if (sm.startsWith('pairport_security_mode_wpa3_transition')) { + security.push('WPA2/WPA3'); + } else if (sm.startsWith('pairport_security_mode_wpa3')) { + security.push('WPA3'); + } + + result.push({ + id: networkWifiObj._name || 'Wi-Fi', + iface: networkWifiObj.interface || '', + model: networkWifiObj.hardware || '', + ssid: airportWifiObj._name || '', + bssid: airportWifiObj.spairport_network_bssid || '', + channel, + frequency: channel ? wifiFrequencyFromChannel(channel) : null, + type: airportWifiObj.spairport_network_phymode || '802.11', + security, + signalLevel: signalLevel ? parseInt(signalLevel, 10) : null, + quality: wifiQualityFromDB(signalLevel), + txRate: airportWifiObj.spairport_network_rate || null, + }); + + } catch (e) { + util.noop(); } + if (callback) { + callback(result); + } + resolve(result); }); } else if (_windows) { let cmd = 'netsh wlan show interfaces'; From 7eb83e256543037a4a3835dd6daf66cfd555e206 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 23 Dec 2024 09:39:58 +0100 Subject: [PATCH 035/123] fix networkConnections() --- 2 | 2 -- CHANGELOG.md | 3 ++- docs/history.html | 5 +++++ docs/index.html | 2 +- lib/network.js | 14 ++++---------- lib/wifi.js | 2 +- 6 files changed, 13 insertions(+), 15 deletions(-) delete mode 100644 2 diff --git a/2 b/2 deleted file mode 100644 index 5d8b2f0a..00000000 --- a/2 +++ /dev/null @@ -1,2 +0,0 @@ -WARNING: The airport command line tool is deprecated and will be removed in a future release. -For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool. diff --git a/CHANGELOG.md b/CHANGELOG.md index 15d9aa4e..fd25a0f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,7 +90,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | -| 5.23.16 | 2024-12-13 | `networkConnections()` refactored PID parsing (macOS) | +| 5.23.17 | 2024-12-23 | `wifiConnections()` refactored - Sequoia compatibel (macOS) | +| 5.23.16 | 2024-12-22 | `networkConnections()` refactored PID parsing (macOS) | | 5.23.15 | 2024-12-21 | `users()`, `wifiNetworks()` fixed parsing (macOS Seguoia) | | 5.23.14 | 2024-12-18 | `chassis()` new chassis detection (macOS) | | 5.23.13 | 2024-12-14 | `wifiConnections()` improved BSSID parsing (windows) | diff --git a/docs/history.html b/docs/history.html index 29c43ead..b24d46d9 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.17 + 2024-12-23 + wifiConnections() refactored - Sequoia compatibel (macOS) + 5.23.16 2024-12-22 diff --git a/docs/index.html b/docs/index.html index a4192ee8..70155b94 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.16
+
New Version: 5.23.17
diff --git a/lib/network.js b/lib/network.js index bce8694a..084adb3a 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1535,7 +1535,7 @@ function networkConnections(callback) { }); } if (_darwin) { - let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; + let cmd = 'netstat -natvln | head -n2; netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'.split('|'); exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) { if (!error) { @@ -1543,15 +1543,9 @@ function networkConnections(callback) { let processes = stdout2.toString().split('\n'); processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); })); let lines = stdout.toString().split('\n'); - let pidPos = 8; - if (lines[0] !== '') { - const lineParts = lines[0].replace(/ +/g, ' ').split(' '); - for (let i = 0; i < lineParts.length; i++) { - if (states.indexOf(lineParts[i]) >= 0) { - pidPos = i + 3; - } - }; - } + lines.shift(); + const header = lines.shift().replace(/ Address/g, '_Address').replace(/ +/g, ' ').split(' '); + let pidPos = header.indexOf('pid'); lines.forEach(function (line) { line = line.replace(/ +/g, ' ').split(' '); if (line.length >= 8) { diff --git a/lib/wifi.js b/lib/wifi.js index 715aa6f4..ee8492ee 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -176,7 +176,7 @@ function ifaceListLinux() { } function nmiDeviceLinux(iface) { - const cmd = `nmcli -t -f general,wifi-properties,capabilities,ip4,ip6 device show ${iface} 2>/dev/null`; + const cmd = `nmcli -t -f general,wifi-properties,capabilities,ip4,ip6 device show ${iface} 2> /dev/null`; try { const lines = execSync(cmd, util.execOptsLinux).toString().split('\n'); const ssid = util.getValue(lines, 'GENERAL.CONNECTION'); From 799ad2fe8ee0522091f447ff4327595631651a23 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 23 Dec 2024 09:41:16 +0100 Subject: [PATCH 036/123] 5.23.17 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 295b4dc5..da31289b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.16", + "version": "5.23.17", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 778c179dc257324f3af046a4ea45a298125deb15 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 23 Dec 2024 10:26:28 +0100 Subject: [PATCH 037/123] cpu() Handle RISC-V CPU Manufacturer and Brand --- CHANGELOG.md | 1 + docs/history.html | 6 ++++++ docs/index.html | 2 +- lib/network.js | 7 +++++-- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd25a0f4..1ed0531b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.18 | 2024-12-24 | `cpu()` Handle RISC-V CPU Manufacturer and Brand | | 5.23.17 | 2024-12-23 | `wifiConnections()` refactored - Sequoia compatibel (macOS) | | 5.23.16 | 2024-12-22 | `networkConnections()` refactored PID parsing (macOS) | | 5.23.15 | 2024-12-21 | `users()`, `wifiNetworks()` fixed parsing (macOS Seguoia) | diff --git a/docs/history.html b/docs/history.html index b24d46d9..5fc51e1f 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,12 @@

Full version history

+ + + 5.23.18 + 2024-12-24 + cpu() Handle RISC-V CPU Manufacturer and Brand + 5.23.17 2024-12-23 diff --git a/docs/index.html b/docs/index.html index 70155b94..61b6a159 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.17
+
New Version: 5.23.18
diff --git a/lib/network.js b/lib/network.js index 084adb3a..a843196f 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1544,8 +1544,11 @@ function networkConnections(callback) { processes = processes.map((line => { return line.trim().replace(/ +/g, ' '); })); let lines = stdout.toString().split('\n'); lines.shift(); - const header = lines.shift().replace(/ Address/g, '_Address').replace(/ +/g, ' ').split(' '); - let pidPos = header.indexOf('pid'); + let pidPos = 8; + if (lines.length > 1 && lines[0].indexOf('pid') > 0) { + const header = (lines.shift() || '').replace(/ Address/g, '_Address').replace(/ +/g, ' ').split(' '); + pidPos = header.indexOf('pid'); + } lines.forEach(function (line) { line = line.replace(/ +/g, ' ').split(' '); if (line.length >= 8) { From a74b30162f5e198cb73b93602a602f724edd60e8 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 24 Dec 2024 06:29:53 +0100 Subject: [PATCH 038/123] 5.23.18 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da31289b..33eefbab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.17", + "version": "5.23.18", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 321408a93d5a057850bffc4075ee2a3985ed7c9c Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 24 Dec 2024 12:58:21 +0100 Subject: [PATCH 039/123] cpu() refactored using internal node functions --- CHANGELOG.md | 1 + docs/history.html | 6 +++++- docs/index.html | 2 +- lib/internet.js | 52 +++++++---------------------------------------- lib/util.js | 37 +++++++++++++++++++++++++++++++++ 5 files changed, 51 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ed0531b..cb8795a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.19 | 2024-12-24 | `cpu()` refactored using internal node functions | | 5.23.18 | 2024-12-24 | `cpu()` Handle RISC-V CPU Manufacturer and Brand | | 5.23.17 | 2024-12-23 | `wifiConnections()` refactored - Sequoia compatibel (macOS) | | 5.23.16 | 2024-12-22 | `networkConnections()` refactored PID parsing (macOS) | diff --git a/docs/history.html b/docs/history.html index 5fc51e1f..7d7498cf 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,7 +57,11 @@

Full version history

- + + 5.23.19 + 2024-12-24 + inetChecksite() refactored using internal node functions + 5.23.18 2024-12-24 diff --git a/docs/index.html b/docs/index.html index 61b6a159..28e26db4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.18
+
New Version: 5.23.19
diff --git a/lib/internet.js b/lib/internet.js index 8e8685b0..ffa6e672 100644 --- a/lib/internet.js +++ b/lib/internet.js @@ -62,52 +62,14 @@ function inetChecksite(url, callback) { if (callback) { callback(result); } return resolve(result); } - let t = Date.now(); - if (_linux || _freebsd || _openbsd || _netbsd || _darwin || _sunos) { - let args = ['-I', '--connect-timeout', '5', '-m', '5']; - args.push(urlSanitized); - let cmd = 'curl'; - util.execSafe(cmd, args).then((stdout) => { - const lines = stdout.split('\n'); - let statusCode = lines[0] && lines[0].indexOf(' ') >= 0 ? parseInt(lines[0].split(' ')[1], 10) : 404; - result.status = statusCode || 404; - result.ok = (statusCode === 200 || statusCode === 301 || statusCode === 302 || statusCode === 304); - result.ms = (result.ok ? Date.now() - t : null); - if (callback) { callback(result); } - resolve(result); - }); - } - if (_windows) { // if this is stable, this can be used for all OS types - const http = (urlSanitized.startsWith('https:') ? require('https') : require('http')); - try { - http.get(urlSanitized, (res) => { - const statusCode = res.statusCode; - - result.status = statusCode || 404; - result.ok = (statusCode === 200 || statusCode === 301 || statusCode === 302 || statusCode === 304); - if (statusCode !== 200) { - res.resume(); - result.ms = (result.ok ? Date.now() - t : null); - if (callback) { callback(result); } - resolve(result); - } else { - res.on('data', () => { }); - res.on('end', () => { - result.ms = (result.ok ? Date.now() - t : null); - if (callback) { callback(result); } - resolve(result); - }); - } - }).on('error', () => { - if (callback) { callback(result); } - resolve(result); - }); - } catch (err) { - if (callback) { callback(result); } - resolve(result); - } - } + util.checkWebsite(urlSanitized).then((res) => { + result.status = res.statusCode; + result.ok = res.statusCode >= 200 && res.statusCode <= 399;; + result.ms = (result.ok ? res.time : null); + if (callback) { callback(result); } + resolve(result); + }); } else { if (callback) { callback(result); } resolve(result); diff --git a/lib/util.js b/lib/util.js index 8a3ce5e3..bd819f0b 100644 --- a/lib/util.js +++ b/lib/util.js @@ -2483,6 +2483,42 @@ function getAppleModel(key) { }; } +function checkWebsite(url, timeout = 5000) { + const http = ((url.startsWith('https:') || url.indexOf(':443/') > 0 || url.indexOf(':8443/') > 0) ? require('https') : require('http')); + const t = Date.now(); + return new Promise((resolve) => { + http + .get(url, { rejectUnauthorized: false }, function (res) { + res.on('data', () => { }); + res.on('end', () => { + resolve({ + url, + statusCode: res.statusCode, + message: res.statusMessage, + time: Date.now() - t + }); + }); + }) + .on("error", function (e) { + resolve({ + url, + statusCode: 404, + message: e.message, + time: Date.now() - t + }); + }) + .setTimeout(timeout, () => { + request.close(); + resolve({ + url, + statusCode: 408, + message: 'Request Timeout', + time: Date.now() - t + }); + }); + }); +}; + function noop() { } exports.toInt = toInt; @@ -2536,3 +2572,4 @@ exports.WINDIR = WINDIR; exports.getFilesInPath = getFilesInPath; exports.semverCompare = semverCompare; exports.getAppleModel = getAppleModel; +exports.checkWebsite = checkWebsite; From 93d914100044e7cc330cbfce3da50af1b7f06291 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 24 Dec 2024 12:58:32 +0100 Subject: [PATCH 040/123] 5.23.19 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33eefbab..4f55323f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.18", + "version": "5.23.19", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From c2ffa57a146cf8a9b3733185043265559ee78342 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 24 Dec 2024 13:17:34 +0100 Subject: [PATCH 041/123] inetChecksite() fix timeout --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/util.js | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb8795a5..18ad8c3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.20 | 2024-12-24 | `cpu()` fix timeout | | 5.23.19 | 2024-12-24 | `cpu()` refactored using internal node functions | | 5.23.18 | 2024-12-24 | `cpu()` Handle RISC-V CPU Manufacturer and Brand | | 5.23.17 | 2024-12-23 | `wifiConnections()` refactored - Sequoia compatibel (macOS) | diff --git a/docs/history.html b/docs/history.html index 7d7498cf..402db4e1 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.19 + 2024-12-24 + inetChecksite() fix timeout + 5.23.19 2024-12-24 diff --git a/docs/index.html b/docs/index.html index 28e26db4..a84b89ec 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.19
+
New Version: 5.23.20
diff --git a/lib/util.js b/lib/util.js index bd819f0b..e5956139 100644 --- a/lib/util.js +++ b/lib/util.js @@ -2487,7 +2487,7 @@ function checkWebsite(url, timeout = 5000) { const http = ((url.startsWith('https:') || url.indexOf(':443/') > 0 || url.indexOf(':8443/') > 0) ? require('https') : require('http')); const t = Date.now(); return new Promise((resolve) => { - http + const request = http .get(url, { rejectUnauthorized: false }, function (res) { res.on('data', () => { }); res.on('end', () => { From a9dbc36ba684912374ad75a1c30c8666678e7fdb Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 24 Dec 2024 13:17:42 +0100 Subject: [PATCH 042/123] 5.23.20 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f55323f..fff6aab0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.19", + "version": "5.23.20", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 7809278b356775374a0c42a11c0aba7603f2d1f0 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 24 Dec 2024 13:27:20 +0100 Subject: [PATCH 043/123] osInfo() fix fqdn --- CHANGELOG.md | 1 + docs/history.html | 7 ++++++- docs/index.html | 2 +- lib/osinfo.js | 13 +++---------- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18ad8c3e..b2220dd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.21 | 2024-12-24 | `osInfo()` fix fqdn | | 5.23.20 | 2024-12-24 | `cpu()` fix timeout | | 5.23.19 | 2024-12-24 | `cpu()` refactored using internal node functions | | 5.23.18 | 2024-12-24 | `cpu()` Handle RISC-V CPU Manufacturer and Brand | diff --git a/docs/history.html b/docs/history.html index 402db4e1..aa3fb198 100644 --- a/docs/history.html +++ b/docs/history.html @@ -58,7 +58,12 @@

Full version history

- 5.23.19 + 5.23.21 + 2024-12-24 + osInfo() fix fqdn (linux) + + + 5.23.20 2024-12-24 inetChecksite() fix timeout diff --git a/docs/index.html b/docs/index.html index a84b89ec..db8ade0e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.20
+
New Version: 5.23.21
diff --git a/lib/osinfo.js b/lib/osinfo.js index cf645172..bac305c5 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -190,17 +190,10 @@ function getFQDN() { let fqdn = os.hostname; if (_linux || _darwin) { try { - const stdout = execSync('hostnamectl --json short 2>/dev/null', util.execOptsLinux); - const json = JSON.parse(stdout.toString()); - - fqdn = json['StaticHostname']; + const stdout = execSync('hostname -f 2>/dev/null', util.execOptsLinux); + fqdn = stdout.toString().split(os.EOL)[0]; } catch (e) { - try { - const stdout = execSync('hostname -f 2>/dev/null', util.execOptsLinux); - fqdn = stdout.toString().split(os.EOL)[0]; - } catch (e) { - util.noop(); - } + util.noop(); } } if (_freebsd || _openbsd || _netbsd) { From a6317311c536ff45da1d2a88f7abfb9e61ec2bb0 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 24 Dec 2024 13:30:59 +0100 Subject: [PATCH 044/123] 5.23.21 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fff6aab0..0efda4a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.20", + "version": "5.23.21", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From c114c51ea5966db6d3ff3afcaa4c2815cf9bb771 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 25 Dec 2024 08:35:25 +0100 Subject: [PATCH 045/123] osInfo() fix manufacturer Apple Silicon (macOS) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/memory.js | 7 ++++--- lib/network.js | 2 +- lib/wifi.js | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2220dd0..bde4d380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.22 | 2024-12-25 | `osInfo()` fix manufacturer Apple Silicon (macOS) | | 5.23.21 | 2024-12-24 | `osInfo()` fix fqdn | | 5.23.20 | 2024-12-24 | `cpu()` fix timeout | | 5.23.19 | 2024-12-24 | `cpu()` refactored using internal node functions | diff --git a/docs/history.html b/docs/history.html index aa3fb198..2d8eeefb 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.22 + 2024-12-25 + memLayout() fix manufacturer Apple Silicon (macOS) + 5.23.21 2024-12-24 diff --git a/docs/index.html b/docs/index.html index db8ade0e..8bb8437d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.21
+
New Version: 5.23.22
diff --git a/lib/memory.js b/lib/memory.js index d70a44f7..ebf9683b 100644 --- a/lib/memory.js +++ b/lib/memory.js @@ -498,15 +498,16 @@ function memLayout(callback) { const lines = stdout.toString().split('\n'); const size = parseInt(util.getValue(lines, ' Memory:')); const type = util.getValue(lines, ' Type:'); + const manufacturerId = util.getValue(lines, ' Manufacturer:'); if (size && type) { result.push({ size: size * 1024 * 1024 * 1024, bank: '0', type, ecc: false, - clockSpeed: 0, - formFactor: '', - manufacturer: 'Apple', + clockSpeed: null, + formFactor: 'SOC', + manufacturer: getManufacturerDarwin(manufacturerId), partNum: '', serialNum: '', voltageConfigured: null, diff --git a/lib/network.js b/lib/network.js index a843196f..69d23cc0 100644 --- a/lib/network.js +++ b/lib/network.js @@ -403,7 +403,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) { let ifaceSanitized = ''; const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(SSID); - const l = util.mathMin(s.length, 2000); + const l = util.mathMin(s.length, 32); for (let i = 0; i <= l; i++) { if (s[i] !== undefined) { diff --git a/lib/wifi.js b/lib/wifi.js index ee8492ee..9735094a 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -612,7 +612,7 @@ function wifiConnections(callback) { const network = networkList.filter(nw => nw.ssid === ssid); let ssidSanitized = ''; const t = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(ssid, true); - const l = util.mathMin(t.length, 2000); + const l = util.mathMin(t.length, 32); for (let i = 0; i <= l; i++) { if (t[i] !== undefined) { ssidSanitized = ssidSanitized + t[i]; From 126077873d0bd00c008a8d51349ee9acd0bdfcff Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 25 Dec 2024 08:35:30 +0100 Subject: [PATCH 046/123] 5.23.22 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0efda4a0..200ab5ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.21", + "version": "5.23.22", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From fe8f5936cb1230e14e2af700fd2dc00f6484f4ee Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 25 Dec 2024 15:30:42 +0100 Subject: [PATCH 047/123] minor fixes --- lib/network.js | 59 +++++++++++++++++++++++++++++--------------------- lib/util.js | 4 ++-- 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/lib/network.js b/lib/network.js index 69d23cc0..17be9474 100644 --- a/lib/network.js +++ b/lib/network.js @@ -212,33 +212,42 @@ exports.networkInterfaceDefault = networkInterfaceDefault; function parseLinesWindowsNics(sections, nconfigsections) { let nics = []; for (let i in sections) { - if ({}.hasOwnProperty.call(sections, i)) { - - if (sections[i].trim() !== '') { - - let lines = sections[i].trim().split('\r\n'); - let linesNicConfig = nconfigsections && nconfigsections[i] ? nconfigsections[i].trim().split('\r\n') : []; - let netEnabled = util.getValue(lines, 'NetEnabled', ':'); - let adapterType = util.getValue(lines, 'AdapterTypeID', ':') === '9' ? 'wireless' : 'wired'; - let ifacename = util.getValue(lines, 'Name', ':').replace(/\]/g, ')').replace(/\[/g, '('); - let iface = util.getValue(lines, 'NetConnectionID', ':').replace(/\]/g, ')').replace(/\[/g, '('); - if (ifacename.toLowerCase().indexOf('wi-fi') >= 0 || ifacename.toLowerCase().indexOf('wireless') >= 0) { - adapterType = 'wireless'; - } - if (netEnabled !== '') { - const speed = parseInt(util.getValue(lines, 'speed', ':').trim(), 10) / 1000000; - nics.push({ - mac: util.getValue(lines, 'MACAddress', ':').toLowerCase(), - dhcp: util.getValue(linesNicConfig, 'dhcpEnabled', ':').toLowerCase() === 'true', - name: ifacename, - iface, - netEnabled: netEnabled === 'TRUE', - speed: isNaN(speed) ? null : speed, - operstate: util.getValue(lines, 'NetConnectionStatus', ':') === '2' ? 'up' : 'down', - type: adapterType - }); + try { + if ({}.hasOwnProperty.call(sections, i)) { + + if (sections[i].trim() !== '') { + + let lines = sections[i].trim().split('\r\n'); + let linesNicConfig = null; + try { + linesNicConfig = nconfigsections && nconfigsections[i] ? nconfigsections[i].trim().split('\r\n') : []; + } catch (e) { + util.noop(); + } + let netEnabled = util.getValue(lines, 'NetEnabled', ':'); + let adapterType = util.getValue(lines, 'AdapterTypeID', ':') === '9' ? 'wireless' : 'wired'; + let ifacename = util.getValue(lines, 'Name', ':').replace(/\]/g, ')').replace(/\[/g, '('); + let iface = util.getValue(lines, 'NetConnectionID', ':').replace(/\]/g, ')').replace(/\[/g, '('); + if (ifacename.toLowerCase().indexOf('wi-fi') >= 0 || ifacename.toLowerCase().indexOf('wireless') >= 0) { + adapterType = 'wireless'; + } + if (netEnabled !== '') { + const speed = parseInt(util.getValue(lines, 'speed', ':').trim(), 10) / 1000000; + nics.push({ + mac: util.getValue(lines, 'MACAddress', ':').toLowerCase(), + dhcp: util.getValue(linesNicConfig, 'dhcpEnabled', ':').toLowerCase() === 'true', + name: ifacename, + iface, + netEnabled: netEnabled === 'TRUE', + speed: isNaN(speed) ? null : speed, + operstate: util.getValue(lines, 'NetConnectionStatus', ':') === '2' ? 'up' : 'down', + type: adapterType + }); + } } } + } catch (e) { + util.noop(); } } return nics; diff --git a/lib/util.js b/lib/util.js index e5956139..c76bf058 100644 --- a/lib/util.js +++ b/lib/util.js @@ -579,7 +579,7 @@ function getCodepage() { if (_linux || _darwin || _freebsd || _openbsd || _netbsd) { if (!codepage) { try { - const stdout = execSync('echo $LANG', util.execOptsLinux); + const stdout = execSync('echo $LANG', execOptsLinux); const lines = stdout.toString().split('\r\n'); const parts = lines[0].split('.'); codepage = parts.length > 1 ? parts[1].trim() : ''; @@ -1156,7 +1156,7 @@ function linuxVersion() { let result = ''; if (_linux) { try { - result = execSync('uname -v', util.execOptsLinux).toString(); + result = execSync('uname -v', execOptsLinux).toString(); } catch (e) { result = ''; } From b8c5bac650b91c0d83e0a464c634419fbb508a8b Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 25 Dec 2024 15:57:49 +0100 Subject: [PATCH 048/123] bluetoothDevices() added parsing vendor ID (macOS) --- CHANGELOG.md | 1 + docs/history.html | 5 + docs/index.html | 2 +- lib/bluetoothVendors.js | 600 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 606 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bde4d380..25620c2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.23 | 2024-12-25 | `bluetoothDevices()` added parsing vendor ID (macOS) | | 5.23.22 | 2024-12-25 | `osInfo()` fix manufacturer Apple Silicon (macOS) | | 5.23.21 | 2024-12-24 | `osInfo()` fix fqdn | | 5.23.20 | 2024-12-24 | `cpu()` fix timeout | diff --git a/docs/history.html b/docs/history.html index 2d8eeefb..e6bad068 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.23 + 2024-12-25 + bluetoothDevices() added parsing vendor ID (macOS) + 5.23.22 2024-12-25 diff --git a/docs/index.html b/docs/index.html index 8bb8437d..8e79478b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.22
+
New Version: 5.23.23
diff --git a/lib/bluetoothVendors.js b/lib/bluetoothVendors.js index 9b7ea8fa..ce381e5e 100644 --- a/lib/bluetoothVendors.js +++ b/lib/bluetoothVendors.js @@ -536,5 +536,603 @@ module.exports = { 0x0215: 'Lukoton Experience Oy', 0x0216: 'MTI Ltd', 0x0217: 'Tech4home, Lda', - 0x0216: 'Hiotech AB', + 0x0218: 'Hiotech AB', + 0x0219: 'DOTT Limited', + 0x021A: 'Blue Speck Labs, LLC', + 0x021B: 'Cisco Systems, Inc', + 0x021C: 'Mobicomm Inc', + 0x021D: 'Edamic', + 0x021E: 'Goodnet, Ltd', + 0x021F: 'Luster Leaf Products Inc', + 0x0220: 'Manus Machina BV', + 0x0221: 'Mobiquity Networks Inc', + 0x0222: 'Praxis Dynamics', + 0x0223: 'Philip Morris Products S.A.', + 0x0224: 'Comarch SA', + 0x0225: 'Nestl Nespresso S.A.', + 0x0226: 'Merlinia A/S', + 0x0227: 'LifeBEAM Technologies', + 0x0228: 'Twocanoes Labs, LLC', + 0x0229: 'Muoverti Limited', + 0x022A: 'Stamer Musikanlagen GMBH', + 0x022B: 'Tesla Motors', + 0x022C: 'Pharynks Corporation', + 0x022D: 'Lupine', + 0x022E: 'Siemens AG', + 0x022F: 'Huami (Shanghai) Culture Communication CO., LTD', + 0x0230: 'Foster Electric Company, Ltd', + 0x0231: 'ETA SA', + 0x0232: 'x-Senso Solutions Kft', + 0x0233: 'Shenzhen SuLong Communication Ltd', + 0x0234: 'FengFan (BeiJing) Technology Co, Ltd', + 0x0235: 'Qrio Inc', + 0x0236: 'Pitpatpet Ltd', + 0x0237: 'MSHeli s.r.l.', + 0x0238: 'Trakm8 Ltd', + 0x0239: 'JIN CO, Ltd', + 0x023A: 'Alatech Tehnology', + 0x023B: 'Beijing CarePulse Electronic Technology Co, Ltd', + 0x023C: 'Awarepoint', + 0x023D: 'ViCentra B.V.', + 0x023E: 'Raven Industries', + 0x023F: 'WaveWare Technologies Inc.', + 0x0240: 'Argenox Technologies', + 0x0241: 'Bragi GmbH', + 0x0242: '16Lab Inc', + 0x0243: 'Masimo Corp', + 0x0244: 'Iotera Inc', + 0x0245: 'Endress+Hauser', + 0x0246: 'ACKme Networks, Inc.', + 0x0247: 'FiftyThree Inc.', + 0x0248: 'Parker Hannifin Corp', + 0x0249: 'Transcranial Ltd', + 0x024A: 'Uwatec AG', + 0x024B: 'Orlan LLC', + 0x024C: 'Blue Clover Devices', + 0x024D: 'M-Way Solutions GmbH', + 0x024E: 'Microtronics Engineering GmbH', + 0x024F: 'Schneider Schreibgerte GmbH', + 0x0250: 'Sapphire Circuits LLC', + 0x0251: 'Lumo Bodytech Inc.', + 0x0252: 'UKC Technosolution', + 0x0253: 'Xicato Inc.', + 0x0254: 'Playbrush', + 0x0255: 'Dai Nippon Printing Co., Ltd.', + 0x0256: 'G24 Power Limited', + 0x0257: 'AdBabble Local Commerce Inc.', + 0x0258: 'Devialet SA', + 0x0259: 'ALTYOR', + 0x025A: 'University of Applied Sciences Valais/Haute Ecole Valaisanne', + 0x025B: 'Five Interactive, LLC dba Zendo', + 0x025C: 'NetEaseHangzhouNetwork co.Ltd.', + 0x025D: 'Lexmark International Inc.', + 0x025E: 'Fluke Corporation', + 0x025F: 'Yardarm Technologies', + 0x0260: 'SensaRx', + 0x0261: 'SECVRE GmbH', + 0x0262: 'Glacial Ridge Technologies', + 0x0263: 'Identiv, Inc.', + 0x0264: 'DDS, Inc.', + 0x0265: 'SMK Corporation', + 0x0266: 'Schawbel Technologies LLC', + 0x0267: 'XMI Systems SA', + 0x0268: 'Cerevo', + 0x0269: 'Torrox GmbH & Co KG', + 0x026A: 'Gemalto', + 0x026B: 'DEKA Research & Development Corp.', + 0x026C: 'Domster Tadeusz Szydlowski', + 0x026D: 'Technogym SPA', + 0x026E: 'FLEURBAEY BVBA', + 0x026F: 'Aptcode Solutions', + 0x0270: 'LSI ADL Technology', + 0x0271: 'Animas Corp', + 0x0272: 'Alps Electric Co., Ltd.', + 0x0273: 'OCEASOFT', + 0x0274: 'Motsai Research', + 0x0275: 'Geotab', + 0x0276: 'E.G.O. Elektro-Gertebau GmbH', + 0x0277: 'bewhere inc', + 0x0278: 'Johnson Outdoors Inc', + 0x0279: 'steute Schaltgerate GmbH & Co. KG', + 0x027A: 'Ekomini inc.', + 0x027B: 'DEFA AS', + 0x027C: 'Aseptika Ltd', + 0x027D: 'HUAWEI Technologies Co., Ltd. ( )', + 0x027E: 'HabitAware, LLC', + 0x027F: 'ruwido austria gmbh', + 0x0280: 'ITEC corporation', + 0x0281: 'StoneL', + 0x0282: 'Sonova AG', + 0x0283: 'Maven Machines, Inc.', + 0x0284: 'Synapse Electronics', + 0x0285: 'Standard Innovation Inc.', + 0x0286: 'RF Code, Inc.', + 0x0287: 'Wally Ventures S.L.', + 0x0288: 'Willowbank Electronics Ltd', + 0x0289: 'SK Telecom', + 0x028A: 'Jetro AS', + 0x028B: 'Code Gears LTD', + 0x028C: 'NANOLINK APS', + 0x028D: 'IF, LLC', + 0x028E: 'RF Digital Corp', + 0x028F: 'Church & Dwight Co., Inc', + 0x0290: 'Multibit Oy', + 0x0291: 'CliniCloud Inc', + 0x0292: 'SwiftSensors', + 0x0293: 'Blue Bite', + 0x0294: 'ELIAS GmbH', + 0x0295: 'Sivantos GmbH', + 0x0296: 'Petzl', + 0x0297: 'storm power ltd', + 0x0298: 'EISST Ltd', + 0x0299: 'Inexess Technology Simma KG', + 0x029A: 'Currant, Inc.', + 0x029B: 'C2 Development, Inc.', + 0x029C: 'Blue Sky Scientific, LLC', + 0x029D: 'ALOTTAZS LABS, LLC', + 0x029E: 'Kupson spol. s r.o.', + 0x029F: 'Areus Engineering GmbH', + 0x02A0: 'Impossible Camera GmbH', + 0x02A1: 'InventureTrack Systems', + 0x02A2: 'LockedUp', + 0x02A3: 'Itude', + 0x02A4: 'Pacific Lock Company', + 0x02A5: 'Tendyron Corporation ( )', + 0x02A6: 'Robert Bosch GmbH', + 0x02A7: 'Illuxtron international B.V.', + 0x02A8: 'miSport Ltd.', + 0x02A9: 'Chargelib', + 0x02AA: 'Doppler Lab', + 0x02AB: 'BBPOS Limited', + 0x02AC: 'RTB Elektronik GmbH & Co. KG', + 0x02AD: 'Rx Networks, Inc.', + 0x02AE: 'WeatherFlow, Inc.', + 0x02AF: 'Technicolor USA Inc.', + 0x02B0: 'Bestechnic(Shanghai),Ltd', + 0x02B1: 'Raden Inc', + 0x02B2: 'JouZen Oy', + 0x02B3: 'CLABER S.P.A.', + 0x02B4: 'Hyginex, Inc.', + 0x02B5: 'HANSHIN ELECTRIC RAILWAY CO.,LTD.', + 0x02B6: 'Schneider Electric', + 0x02B7: 'Oort Technologies LLC', + 0x02B8: 'Chrono Therapeutics', + 0x02B9: 'Rinnai Corporation', + 0x02BA: 'Swissprime Technologies AG', + 0x02BB: 'Koha.,Co.Ltd', + 0x02BC: 'Genevac Ltd', + 0x02BD: 'Chemtronics', + 0x02BE: 'Seguro Technology Sp. z o.o.', + 0x02BF: 'Redbird Flight Simulations', + 0x02C0: 'Dash Robotics', + 0x02C1: 'LINE Corporation', + 0x02C2: 'Guillemot Corporation', + 0x02C3: 'Techtronic Power Tools Technology Limited', + 0x02C4: 'Wilson Sporting Goods', + 0x02C5: 'Lenovo (Singapore) Pte Ltd. ( )', + 0x02C6: 'Ayatan Sensors', + 0x02C7: 'Electronics Tomorrow Limited', + 0x02C8: 'VASCO Data Security International, Inc.', + 0x02C9: 'PayRange Inc.', + 0x02CA: 'ABOV Semiconductor', + 0x02CB: 'AINA-Wireless Inc.', + 0x02CC: 'Eijkelkamp Soil & Water', + 0x02CD: 'BMA ergonomics b.v.', + 0x02CE: 'Teva Branded Pharmaceutical Products R&D, Inc.', + 0x02CF: 'Anima', + 0x02D0: '3M', + 0x02D1: 'Empatica Srl', + 0x02D2: 'Afero, Inc.', + 0x02D3: 'Powercast Corporation', + 0x02D4: 'Secuyou ApS', + 0x02D5: 'OMRON Corporation', + 0x02D6: 'Send Solutions', + 0x02D7: 'NIPPON SYSTEMWARE CO.,LTD.', + 0x02D8: 'Neosfar', + 0x02D9: 'Fliegl Agrartechnik GmbH', + 0x02DA: 'Gilvader', + 0x02DB: 'Digi International Inc (R)', + 0x02DC: 'DeWalch Technologies, Inc.', + 0x02DD: 'Flint Rehabilitation Devices, LLC', + 0x02DE: 'Samsung SDS Co., Ltd.', + 0x02DF: 'Blur Product Development', + 0x02E0: 'University of Michigan', + 0x02E1: 'Victron Energy BV', + 0x02E2: 'NTT docomo', + 0x02E3: 'Carmanah Technologies Corp.', + 0x02E4: 'Bytestorm Ltd.', + 0x02E5: 'Espressif Incorporated ( () )', + 0x02E6: 'Unwire', + 0x02E7: 'Connected Yard, Inc.', + 0x02E8: 'American Music Environments', + 0x02E9: 'Sensogram Technologies, Inc.', + 0x02EA: 'Fujitsu Limited', + 0x02EB: 'Ardic Technology', + 0x02EC: 'Delta Systems, Inc', + 0x02ED: 'HTC Corporation', + 0x02EE: 'Citizen Holdings Co., Ltd.', + 0x02EF: 'SMART-INNOVATION.inc', + 0x02F0: 'Blackrat Software', + 0x02F1: 'The Idea Cave, LLC', + 0x02F2: 'GoPro, Inc.', + 0x02F3: 'AuthAir, Inc', + 0x02F4: 'Vensi, Inc.', + 0x02F5: 'Indagem Tech LLC', + 0x02F6: 'Intemo Technologies', + 0x02F7: 'DreamVisions co., Ltd.', + 0x02F8: 'Runteq Oy Ltd', + 0x02F9: 'IMAGINATION TECHNOLOGIES LTD', + 0x02FA: 'CoSTAR TEchnologies', + 0x02FB: 'Clarius Mobile Health Corp.', + 0x02FC: 'Shanghai Frequen Microelectronics Co., Ltd.', + 0x02FD: 'Uwanna, Inc.', + 0x02FE: 'Lierda Science & Technology Group Co., Ltd.', + 0x02FF: 'Silicon Laboratories', + 0x0300: 'World Moto Inc.', + 0x0301: 'Giatec Scientific Inc.', + 0x0302: 'Loop Devices, Inc', + 0x0303: 'IACA electronique', + 0x0304: 'Martians Inc', + 0x0305: 'Swipp ApS', + 0x0306: 'Life Laboratory Inc.', + 0x0307: 'FUJI INDUSTRIAL CO.,LTD.', + 0x0308: 'Surefire, LLC', + 0x0309: 'Dolby Labs', + 0x030A: 'Ellisys', + 0x030B: 'Magnitude Lighting Converters', + 0x030C: 'Hilti AG', + 0x030D: 'Devdata S.r.l.', + 0x030E: 'Deviceworx', + 0x030F: 'Shortcut Labs', + 0x0310: 'SGL Italia S.r.l.', + 0x0311: 'PEEQ DATA', + 0x0312: 'Ducere Technologies Pvt Ltd', + 0x0313: 'DiveNav, Inc.', + 0x0314: 'RIIG AI Sp. z o.o.', + 0x0315: 'Thermo Fisher Scientific', + 0x0316: 'AG Measurematics Pvt. Ltd.', + 0x0317: 'CHUO Electronics CO., LTD.', + 0x0318: 'Aspenta International', + 0x0319: 'Eugster Frismag AG', + 0x031A: 'Amber wireless GmbH', + 0x031B: 'HQ Inc', + 0x031C: 'Lab Sensor Solutions', + 0x031D: 'Enterlab ApS', + 0x031E: 'Eyefi, Inc.', + 0x031F: 'MetaSystem S.p.A.', + 0x0320: 'SONO ELECTRONICS. CO., LTD', + 0x0321: 'Jewelbots', + 0x0322: 'Compumedics Limited', + 0x0323: 'Rotor Bike Components', + 0x0324: 'Astro, Inc.', + 0x0325: 'Amotus Solutions', + 0x0326: 'Healthwear Technologies (Changzhou)Ltd', + 0x0327: 'Essex Electronics', + 0x0328: 'Grundfos A/S', + 0x0329: 'Eargo, Inc.', + 0x032A: 'Electronic Design Lab', + 0x032B: 'ESYLUX', + 0x032C: 'NIPPON SMT.CO.,Ltd', + 0x032D: 'BM innovations GmbH', + 0x032E: 'indoormap', + 0x032F: 'OttoQ Inc', + 0x0330: 'North Pole Engineering', + 0x0331: '3flares Technologies Inc.', + 0x0332: 'Electrocompaniet A.S.', + 0x0333: 'Mul-T-Lock', + 0x0334: 'Corentium AS', + 0x0335: 'Enlighted Inc', + 0x0336: 'GISTIC', + 0x0337: 'AJP2 Holdings, LLC', + 0x0338: 'COBI GmbH', + 0x0339: 'Blue Sky Scientific, LLC', + 0x033A: 'Appception, Inc.', + 0x033B: 'Courtney Thorne Limited', + 0x033C: 'Virtuosys', + 0x033D: 'TPV Technology Limited', + 0x033E: 'Monitra SA', + 0x033F: 'Automation Components, Inc.', + 0x0340: 'Letsense s.r.l.', + 0x0341: 'Etesian Technologies LLC', + 0x0342: 'GERTEC BRASIL LTDA.', + 0x0343: 'Drekker Development Pty. Ltd.', + 0x0344: 'Whirl Inc', + 0x0345: 'Locus Positioning', + 0x0346: 'Acuity Brands Lighting, Inc', + 0x0347: 'Prevent Biometrics', + 0x0348: 'Arioneo', + 0x0349: 'VersaMe', + 0x034A: 'Vaddio', + 0x034B: 'Libratone A/S', + 0x034C: 'HM Electronics, Inc.', + 0x034D: 'TASER International, Inc.', + 0x034E: 'SafeTrust Inc.', + 0x034F: 'Heartland Payment Systems', + 0x0350: 'Bitstrata Systems Inc.', + 0x0351: 'Pieps GmbH', + 0x0352: 'iRiding(Xiamen)Technology Co.,Ltd.', + 0x0353: 'Alpha Audiotronics, Inc.', + 0x0354: 'TOPPAN FORMS CO.,LTD.', + 0x0355: 'Sigma Designs, Inc.', + 0x0356: 'Spectrum Brands, Inc.', + 0x0357: 'Polymap Wireless', + 0x0358: 'MagniWare Ltd.', + 0x0359: 'Novotec Medical GmbH', + 0x035A: 'Medicom Innovation Partner a/s', + 0x035B: 'Matrix Inc.', + 0x035C: 'Eaton Corporation', + 0x035D: 'KYS', + 0x035E: 'Naya Health, Inc.', + 0x035F: 'Acromag', + 0x0360: 'Insulet Corporation', + 0x0361: 'Wellinks Inc.', + 0x0362: 'ON Semiconductor', + 0x0363: 'FREELAP SA', + 0x0364: 'Favero Electronics Srl', + 0x0365: 'BioMech Sensor LLC', + 0x0366: 'BOLTT Sports technologies Private limited', + 0x0367: 'Saphe International', + 0x0368: 'Metormote AB', + 0x0369: 'littleBits', + 0x036A: 'SetPoint Medical', + 0x036B: 'BRControls Products BV', + 0x036C: 'Zipcar', + 0x036D: 'AirBolt Pty Ltd', + 0x036E: 'KeepTruckin Inc', + 0x036F: 'Motiv, Inc.', + 0x0370: 'Wazombi Labs O', + 0x0371: 'ORBCOMM', + 0x0372: 'Nixie Labs, Inc.', + 0x0373: 'AppNearMe Ltd', + 0x0374: 'Holman Industries', + 0x0375: 'Expain AS', + 0x0376: 'Electronic Temperature Instruments Ltd', + 0x0377: 'Plejd AB', + 0x0378: 'Propeller Health', + 0x0379: 'Shenzhen iMCO Electronic Technology Co.,Ltd', + 0x037A: 'Algoria', + 0x037B: 'Apption Labs Inc.', + 0x037C: 'Cronologics Corporation', + 0x037D: 'MICRODIA Ltd.', + 0x037E: 'lulabytes S.L.', + 0x037F: 'Nestec S.A.', + 0x0380: 'LLC MEGA - F service', + 0x0381: 'Sharp Corporation', + 0x0382: 'Precision Outcomes Ltd', + 0x0383: 'Kronos Incorporated', + 0x0384: 'OCOSMOS Co., Ltd.', + 0x0385: 'Embedded Electronic Solutions Ltd. dba e2Solutions', + 0x0386: 'Aterica Inc.', + 0x0387: 'BluStor PMC, Inc.', + 0x0388: 'Kapsch TrafficCom AB', + 0x0389: 'ActiveBlu Corporation', + 0x038A: 'Kohler Mira Limited', + 0x038B: 'Noke', + 0x038C: 'Appion Inc.', + 0x038D: 'Resmed Ltd', + 0x038E: 'Crownstone B.V.', + 0x038F: 'Xiaomi Inc.', + 0x0390: 'INFOTECH s.r.o.', + 0x0391: 'Thingsquare AB', + 0x0392: 'T&D', + 0x0393: 'LAVAZZA S.p.A.', + 0x0394: 'Netclearance Systems, Inc.', + 0x0395: 'SDATAWAY', + 0x0396: 'BLOKS GmbH', + 0x0397: 'LEGO System A/S', + 0x0398: 'Thetatronics Ltd', + 0x0399: 'Nikon Corporation', + 0x039A: 'NeST', + 0x039B: 'South Silicon Valley Microelectronics', + 0x039C: 'ALE International', + 0x039D: 'CareView Communications, Inc.', + 0x039E: 'SchoolBoard Limited', + 0x039F: 'Molex Corporation', + 0x03A0: 'IVT Wireless Limited', + 0x03A1: 'Alpine Labs LLC', + 0x03A2: 'Candura Instruments', + 0x03A3: 'SmartMovt Technology Co., Ltd', + 0x03A4: 'Token Zero Ltd', + 0x03A5: 'ACE CAD Enterprise Co., Ltd. (ACECAD)', + 0x03A6: 'Medela, Inc', + 0x03A7: 'AeroScout', + 0x03A8: 'Esrille Inc.', + 0x03A9: 'THINKERLY SRL', + 0x03AA: 'Exon Sp. z o.o.', + 0x03AB: 'Meizu Technology Co., Ltd.', + 0x03AC: 'Smablo LTD', + 0x03AD: 'XiQ', + 0x03AE: 'Allswell Inc.', + 0x03AF: 'Comm-N-Sense Corp DBA Verigo', + 0x03B0: 'VIBRADORM GmbH', + 0x03B1: 'Otodata Wireless Network Inc.', + 0x03B2: 'Propagation Systems Limited', + 0x03B3: 'Midwest Instruments & Controls', + 0x03B4: 'Alpha Nodus, inc.', + 0x03B5: 'petPOMM, Inc', + 0x03B6: 'Mattel', + 0x03B7: 'Airbly Inc.', + 0x03B8: 'A-Safe Limited', + 0x03B9: 'FREDERIQUE CONSTANT SA', + 0x03BA: 'Maxscend Microelectronics Company Limited', + 0x03BB: 'Abbott Diabetes Care', + 0x03BC: 'ASB Bank Ltd', + 0x03BD: 'amadas', + 0x03BE: 'Applied Science, Inc.', + 0x03BF: 'iLumi Solutions Inc.', + 0x03C0: 'Arch Systems Inc.', + 0x03C1: 'Ember Technologies, Inc.', + 0x03C2: 'Snapchat Inc', + 0x03C3: 'Casambi Technologies Oy', + 0x03C4: 'Pico Technology Inc.', + 0x03C5: 'St. Jude Medical, Inc.', + 0x03C6: 'Intricon', + 0x03C7: 'Structural Health Systems, Inc.', + 0x03C8: 'Avvel International', + 0x03C9: 'Gallagher Group', + 0x03CA: 'In2things Automation Pvt. Ltd.', + 0x03CB: 'SYSDEV Srl', + 0x03CC: 'Vonkil Technologies Ltd', + 0x03CD: 'Wynd Technologies, Inc.', + 0x03CE: 'CONTRINEX S.A.', + 0x03CF: 'MIRA, Inc.', + 0x03D0: 'Watteam Ltd', + 0x03D1: 'Density Inc.', + 0x03D2: 'IOT Pot India Private Limited', + 0x03D3: 'Sigma Connectivity AB', + 0x03D4: 'PEG PEREGO SPA', + 0x03D5: 'Wyzelink Systems Inc.', + 0x03D6: 'Yota Devices LTD', + 0x03D7: 'FINSECUR', + 0x03D8: 'Zen-Me Labs Ltd', + 0x03D9: '3IWare Co., Ltd.', + 0x03DA: 'EnOcean GmbH', + 0x03DB: 'Instabeat, Inc', + 0x03DC: 'Nima Labs', + 0x03DD: 'Andreas Stihl AG & Co. KG', + 0x03DE: 'Nathan Rhoades LLC', + 0x03DF: 'Grob Technologies, LLC', + 0x03E0: 'Actions (Zhuhai) Technology Co., Limited', + 0x03E1: 'SPD Development Company Ltd', + 0x03E2: 'Sensoan Oy', + 0x03E3: 'Qualcomm Life Inc', + 0x03E4: 'Chip-ing AG', + 0x03E5: 'ffly4u', + 0x03E6: 'IoT Instruments Oy', + 0x03E7: 'TRUE Fitness Technology', + 0x03E8: 'Reiner Kartengeraete GmbH & Co. KG.', + 0x03E9: 'SHENZHEN LEMONJOY TECHNOLOGY CO., LTD.', + 0x03EA: 'Hello Inc.', + 0x03EB: 'Evollve Inc.', + 0x03EC: 'Jigowatts Inc.', + 0x03ED: 'BASIC MICRO.COM,INC.', + 0x03EE: 'CUBE TECHNOLOGIES', + 0x03EF: 'foolography GmbH', + 0x03F0: 'CLINK', + 0x03F1: 'Hestan Smart Cooking Inc.', + 0x03F2: 'WindowMaster A/S', + 0x03F3: 'Flowscape AB', + 0x03F4: 'PAL Technologies Ltd', + 0x03F5: 'WHERE, Inc.', + 0x03F6: 'Iton Technology Corp.', + 0x03F7: 'Owl Labs Inc.', + 0x03F8: 'Rockford Corp.', + 0x03F9: 'Becon Technologies Co.,Ltd.', + 0x03FA: 'Vyassoft Technologies Inc', + 0x03FB: 'Nox Medical', + 0x03FC: 'Kimberly-Clark', + 0x03FD: 'Trimble Navigation Ltd.', + 0x03FE: 'Littelfuse', + 0x03FF: 'Withings', + 0x0400: 'i-developer IT Beratung UG', + 0x0402: 'Sears Holdings Corporation', + 0x0403: 'Gantner Electronic GmbH', + 0x0404: 'Authomate Inc', + 0x0405: 'Vertex International, Inc.', + 0x0406: 'Airtago', + 0x0407: 'Swiss Audio SA', + 0x0408: 'ToGetHome Inc.', + 0x0409: 'AXIS', + 0x040A: 'Openmatics', + 0x040B: 'Jana Care Inc.', + 0x040C: 'Senix Corporation', + 0x040D: 'NorthStar Battery Company, LLC', + 0x040E: 'SKF (U.K.) Limited', + 0x040F: 'CO-AX Technology, Inc.', + 0x0410: 'Fender Musical Instruments', + 0x0411: 'Luidia Inc', + 0x0412: 'SEFAM', + 0x0413: 'Wireless Cables Inc', + 0x0414: 'Lightning Protection International Pty Ltd', + 0x0415: 'Uber Technologies Inc', + 0x0416: 'SODA GmbH', + 0x0417: 'Fatigue Science', + 0x0418: 'Alpine Electronics Inc.', + 0x0419: 'Novalogy LTD', + 0x041A: 'Friday Labs Limited', + 0x041B: 'OrthoAccel Technologies', + 0x041C: 'WaterGuru, Inc.', + 0x041D: 'Benning Elektrotechnik und Elektronik GmbH & Co. KG', + 0x041E: 'Dell Computer Corporation', + 0x041F: 'Kopin Corporation', + 0x0420: 'TecBakery GmbH', + 0x0421: 'Backbone Labs, Inc.', + 0x0422: 'DELSEY SA', + 0x0423: 'Chargifi Limited', + 0x0424: 'Trainesense Ltd.', + 0x0425: 'Unify Software and Solutions GmbH & Co. KG', + 0x0426: 'Husqvarna AB', + 0x0427: 'Focus fleet and fuel management inc', + 0x0428: 'SmallLoop, LLC', + 0x0429: 'Prolon Inc.', + 0x042A: 'BD Medical', + 0x042B: 'iMicroMed Incorporated', + 0x042C: 'Ticto N.V.', + 0x042D: 'Meshtech AS', + 0x042E: 'MemCachier Inc.', + 0x042F: 'Danfoss A/S', + 0x0430: 'SnapStyk Inc.', + 0x0431: 'Amyway Corporation', + 0x0432: 'Silk Labs, Inc.', + 0x0433: 'Pillsy Inc.', + 0x0434: 'Hatch Baby, Inc.', + 0x0435: 'Blocks Wearables Ltd.', + 0x0436: 'Drayson Technologies (Europe) Limited', + 0x0437: 'eBest IOT Inc.', + 0x0438: 'Helvar Ltd', + 0x0439: 'Radiance Technologies', + 0x043A: 'Nuheara Limited', + 0x043B: 'Appside co., ltd.', + 0x043C: 'DeLaval', + 0x043D: 'Coiler Corporation', + 0x043E: 'Thermomedics, Inc.', + 0x043F: 'Tentacle Sync GmbH', + 0x0440: 'Valencell, Inc.', + 0x0441: 'iProtoXi Oy', + 0x0442: 'SECOM CO., LTD.', + 0x0443: 'Tucker International LLC', + 0x0444: 'Metanate Limited', + 0x0445: 'Kobian Canada Inc.', + 0x0446: 'NETGEAR, Inc.', + 0x0447: 'Fabtronics Australia Pty Ltd', + 0x0448: 'Grand Centrix GmbH', + 0x0449: '1UP USA.com llc', + 0x044A: 'SHIMANO INC.', + 0x044B: 'Nain Inc.', + 0x044C: 'LifeStyle Lock, LLC', + 0x044D: 'VEGA Grieshaber KG', + 0x044E: 'Xtrava Inc.', + 0x044F: 'TTS Tooltechnic Systems AG & Co. KG', + 0x0450: 'Teenage Engineering AB', + 0x0451: 'Tunstall Nordic AB', + 0x0452: 'Svep Design Center AB', + 0x0453: 'GreenPeak Technologies BV', + 0x0454: 'Sphinx Electronics GmbH & Co KG', + 0x0455: 'Atomation', + 0x0456: 'Nemik Consulting Inc', + 0x0457: 'RF INNOVATION', + 0x0458: 'Mini Solution Co., Ltd.', + 0x0459: 'Lumenetix, Inc', + 0x045A: '2048450 Ontario Inc', + 0x045B: 'SPACEEK LTD', + 0x045C: 'Delta T Corporation', + 0x045D: 'Boston Scientific Corporation', + 0x045E: 'Nuviz, Inc.', + 0x045F: 'Real Time Automation, Inc.', + 0x0460: 'Kolibree', + 0x0461: 'vhf elektronik GmbH', + 0x0462: 'Bonsai Systems GmbH', + 0x0463: 'Fathom Systems Inc.', + 0x0464: 'Bellman & Symfon', + 0x0465: 'International Forte Group LLC', + 0x0466: 'CycleLabs Solutions inc.', + 0x0467: 'Codenex Oy', + 0x0468: 'Kynesim Ltd', + 0x0469: 'Palago AB', + 0x046A: 'INSIGMA INC.', + 0x046B: 'PMD Solutions', + 0x046C: 'Qingdao Realtime Technology Co., Ltd.', + 0x046D: 'BEGA Gantenbrink-Leuchten KG', + 0x046E: 'Pambor Ltd.', + 0xFFFF: 'SPECIAL USE/DEFAULT' }; From d8a499ee3462131e31ce417b7142ea197079f7eb Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 25 Dec 2024 15:57:53 +0100 Subject: [PATCH 049/123] 5.23.23 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 200ab5ef..93b16596 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.22", + "version": "5.23.23", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 1a5ff39e1010416a53aea94a8558ee6b1bdafc53 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 29 Dec 2024 23:06:41 +0100 Subject: [PATCH 050/123] osInfo() improved logofile detection --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 4 ++-- lib/osinfo.js | 11 ++++++++++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25620c2c..4146cbbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.24 | 2024-12-29 | `osInfo()` improved logofile detection | | 5.23.23 | 2024-12-25 | `bluetoothDevices()` added parsing vendor ID (macOS) | | 5.23.22 | 2024-12-25 | `osInfo()` fix manufacturer Apple Silicon (macOS) | | 5.23.21 | 2024-12-24 | `osInfo()` fix fqdn | diff --git a/docs/history.html b/docs/history.html index e6bad068..08408d01 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.24 + 2024-12-29 + osInfo() improved logo file detection + 5.23.23 2024-12-25 diff --git a/docs/index.html b/docs/index.html index 8e79478b..841845b5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.23
+
New Version: 5.23.24
@@ -204,7 +204,7 @@
-
17,135
+
18,271
Lines of code
diff --git a/lib/osinfo.js b/lib/osinfo.js index bac305c5..3f016e73 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -76,12 +76,15 @@ function getLogoFile(distro) { if (_windows) { result = 'windows'; } - else if (distro.indexOf('mac os') !== -1) { + else if (distro.indexOf('mac os') !== -1 || distro.indexOf('macos') !== -1) { result = 'apple'; } else if (distro.indexOf('arch') !== -1) { result = 'arch'; } + else if (distro.indexOf('cachy') !== -1) { + result = 'cachy'; + } else if (distro.indexOf('centos') !== -1) { result = 'centos'; } @@ -97,6 +100,9 @@ function getLogoFile(distro) { else if (distro.indexOf('elementary') !== -1) { result = 'elementary'; } + else if (distro.indexOf('endeavour') !== -1) { + result = 'endeavour'; + } else if (distro.indexOf('fedora') !== -1) { result = 'fedora'; } @@ -133,6 +139,9 @@ function getLogoFile(distro) { else if (distro.indexOf('puppy') !== -1) { result = 'puppy'; } + else if (distro.indexOf('popos') !== -1) { + result = 'popos'; + } else if (distro.indexOf('raspbian') !== -1) { result = 'raspbian'; } From 5b17d8416c33038b195a45a13b10d51ca12b35f7 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 29 Dec 2024 23:06:45 +0100 Subject: [PATCH 051/123] 5.23.24 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93b16596..db7b2831 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.23", + "version": "5.23.24", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 9a95fd00c8c902583c93b52c929265d8809f603e Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 30 Dec 2024 14:51:00 +0100 Subject: [PATCH 052/123] system() adapted model and version (macOS) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/system.js | 11 +++++++---- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4146cbbe..37ab3eb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.23.25 | 2024-12-30 | `system()` adapted model and version (macOS) | | 5.23.24 | 2024-12-29 | `osInfo()` improved logofile detection | | 5.23.23 | 2024-12-25 | `bluetoothDevices()` added parsing vendor ID (macOS) | | 5.23.22 | 2024-12-25 | `osInfo()` fix manufacturer Apple Silicon (macOS) | diff --git a/docs/history.html b/docs/history.html index 08408d01..711900a1 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.23.25 + 2024-12-30 + system() adapted model and version (macOS) + 5.23.24 2024-12-29 diff --git a/docs/index.html b/docs/index.html index 841845b5..53061315 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.24
+
New Version: 5.23.25
diff --git a/lib/system.js b/lib/system.js index c1e28f25..4c8b0003 100644 --- a/lib/system.js +++ b/lib/system.js @@ -215,11 +215,14 @@ function system(callback) { exec('ioreg -c IOPlatformExpertDevice -d 2', function (error, stdout) { if (!error) { let lines = stdout.toString().replace(/[<>"]/g, '').split('\n'); - const model = util.splitByNumber(util.getValue(lines, 'model', '=', true)); - const version = util.getValue(lines, 'version', '=', true); + + const model = util.getAppleModel(util.getValue(lines, 'model', '=', true)); + // const modelParts = util.splitByNumber(model); + // const version = util.getValue(lines, 'version', '=', true); result.manufacturer = util.getValue(lines, 'manufacturer', '=', true); - result.model = version ? util.getValue(lines, 'model', '=', true) : model[0]; - result.version = version || model[1]; + result.model = model.key; + result.type = macOsChassisType(model.model); + result.version = model.version; result.serial = util.getValue(lines, 'ioplatformserialnumber', '=', true); result.uuid = util.getValue(lines, 'ioplatformuuid', '=', true).toLowerCase(); result.sku = util.getValue(lines, 'board-id', '=', true) || util.getValue(lines, 'target-sub-type', '=', true); From f5d308f302c74f3e989400f444f99700d5758aff Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 30 Dec 2024 14:51:04 +0100 Subject: [PATCH 053/123] 5.23.25 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db7b2831..b70bc265 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.24", + "version": "5.23.25", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 3a8b3b640e8a4cb12811dbe76f8df9ce9d4607b1 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 31 Dec 2024 12:52:29 +0100 Subject: [PATCH 054/123] versions() added deno and bun --- lib/osinfo.js | 77 +++++++++++++++++++++++++++++++++------------------ lib/system.js | 24 ++++++++-------- 2 files changed, 62 insertions(+), 39 deletions(-) diff --git a/lib/osinfo.js b/lib/osinfo.js index 3f016e73..443344de 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -452,47 +452,49 @@ function isUefiWindows() { function versions(apps, callback) { let versionObject = { kernel: os.release(), - openssl: '', - systemOpenssl: '', - systemOpensslLib: '', - node: process.versions.node, - v8: process.versions.v8, - npm: '', - yarn: '', - pm2: '', - gulp: '', - grunt: '', + apache: '', + bash: '', + bun: '', + deno: '', + docker: '', + dotnet: '', + fish: '', + gcc: '', git: '', - tsc: '', - mysql: '', - redis: '', + grunt: '', + gulp: '', + java: '', mongodb: '', - apache: '', + mysql: '', nginx: '', + node: process.versions.node, + npm: '', + openssl: '', + perl: '', php: '', - docker: '', + pip3: '', + pip: '', + pm2: '', postfix: '', postgresql: '', - perl: '', - python: '', + powershell: '', python3: '', - pip: '', - pip3: '', - java: '', - gcc: '', + python: '', + redis: '', + systemOpenssl: '', + systemOpensslLib: '', + tsc: '', + v8: process.versions.v8, virtualbox: '', - bash: '', - zsh: '', - fish: '', - powershell: '', - dotnet: '' + yarn: '', + zsh: '' }; function checkVersionParam(apps) { if (apps === '*') { return { versions: versionObject, - counter: 30 + counter: 32 }; } if (!Array.isArray(apps)) { @@ -1027,6 +1029,27 @@ function versions(apps, callback) { functionProcessed(); }); } + if ({}.hasOwnProperty.call(appsObj.versions, 'bun')) { + exec('bun -v', function (error, stdout) { + if (!error) { + const line = stdout.toString().split('\n')[0].trim(); + appsObj.versions.fish = line; + } + functionProcessed(); + }); + } + if ({}.hasOwnProperty.call(appsObj.versions, 'deno')) { + exec('deno -v', function (error, stdout) { + if (!error) { + const line = stdout.toString().split('\n')[0].trim(); + const parts = line.split(' '); + if (parts.length > 1) { + appsObj.versions.fish = parts[1]; + } + } + functionProcessed(); + }); + } if ({}.hasOwnProperty.call(appsObj.versions, 'powershell')) { if (_windows) { util.powerShell('$PSVersionTable').then(stdout => { diff --git a/lib/system.js b/lib/system.js index 4c8b0003..9777d53b 100644 --- a/lib/system.js +++ b/lib/system.js @@ -50,10 +50,10 @@ function system(callback) { let lines = stdout.toString().split('\n'); result.manufacturer = util.getValue(lines, 'manufacturer'); result.model = util.getValue(lines, 'product name'); - result.version = util.getValue(lines, 'version'); - result.serial = util.getValue(lines, 'serial number'); - result.uuid = util.getValue(lines, 'uuid').toLowerCase(); - result.sku = util.getValue(lines, 'sku number'); + result.version = cleanDefaults(util.getValue(lines, 'version')); + result.serial = cleanDefaults(util.getValue(lines, 'serial number')); + result.uuid = cleanDefaults((util.getValue(lines, 'uuid').toLowerCase())); + result.sku = cleanDefaults(util.getValue(lines, 'sku number')); // Non-Root values const cmd = `echo -n "product_name: "; cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null; echo; echo -n "product_serial: "; cat /sys/devices/virtual/dmi/id/product_serial 2>/dev/null; echo; @@ -64,17 +64,17 @@ function system(callback) { lines = execSync(cmd, util.execOptsLinux).toString().split('\n'); result.manufacturer = result.manufacturer === '' ? util.getValue(lines, 'sys_vendor') : result.manufacturer; result.model = result.model === '' ? util.getValue(lines, 'product_name') : result.model; - result.version = result.version === '' ? util.getValue(lines, 'product_version') : result.version; - result.serial = result.serial === '' ? util.getValue(lines, 'product_serial') : result.serial; - result.uuid = result.uuid === '' ? util.getValue(lines, 'product_uuid').toLowerCase() : result.uuid; + result.version = cleanDefaults(result.version === '' ? util.getValue(lines, 'product_version') : result.version); + result.serial = cleanDefaults(result.serial === '' ? util.getValue(lines, 'product_serial') : result.serial); + result.uuid = cleanDefaults(result.uuid === '' ? util.getValue(lines, 'product_uuid').toLowerCase() : result.uuid); } catch (e) { util.noop(); } - if (!result.serial || result.serial.toLowerCase().indexOf('o.e.m.') !== -1) { result.serial = '-'; } - if (!result.manufacturer || result.manufacturer.toLowerCase().indexOf('o.e.m.') !== -1) { result.manufacturer = ''; } - if (!result.model || result.model.toLowerCase().indexOf('o.e.m.') !== -1) { result.model = 'Computer'; } - if (!result.version || result.version.toLowerCase().indexOf('o.e.m.') !== -1) { result.version = ''; } - if (!result.sku || result.sku.toLowerCase().indexOf('o.e.m.') !== -1) { result.sku = '-'; } + if (!result.serial) { result.serial = '-'; } + if (!result.manufacturer) { result.manufacturer = ''; } + if (!result.model) { result.model = 'Computer'; } + if (!result.version) { result.version = ''; } + if (!result.sku) { result.sku = '-'; } // detect virtual (1) if (result.model.toLowerCase() === 'virtualbox' || result.model.toLowerCase() === 'kvm' || result.model.toLowerCase() === 'virtual machine' || result.model.toLowerCase() === 'bochs' || result.model.toLowerCase().startsWith('vmware') || result.model.toLowerCase().startsWith('droplet')) { From 233d5aec062423a48bf59605b9c3e2d779caa0c3 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 31 Dec 2024 12:56:49 +0100 Subject: [PATCH 055/123] versions() added bun and deno --- CHANGELOG.md | 1 + README.md | 1 + docs/history.html | 5 +++++ docs/index.html | 6 +++--- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37ab3eb0..9359291f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.0 | 2024-12-31 | `versions()` added deno and bun | | 5.23.25 | 2024-12-30 | `system()` adapted model and version (macOS) | | 5.23.24 | 2024-12-29 | `osInfo()` improved logofile detection | | 5.23.23 | 2024-12-25 | `bluetoothDevices()` added parsing vendor ID (macOS) | diff --git a/README.md b/README.md index 0d6c964b..05872468 100644 --- a/README.md +++ b/README.md @@ -172,6 +172,7 @@ si.cpu() (last 7 major and minor version releases) +- Version 5.24.0: `versions()` added bun and deno - Version 5.23.0: `usb()` added serial number (linux) - Version 5.22.0: `wifiConnections()` added signal quality - Version 5.21.0: `graphics()` added subVendor (linux) diff --git a/docs/history.html b/docs/history.html index 711900a1..0a287ab7 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.24.0 + 2024-12-31 + versions() added deno and bun + 5.23.25 2024-12-30 diff --git a/docs/index.html b/docs/index.html index 53061315..c7728ea1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.23.25
+
New Version: 5.24.0
@@ -204,7 +204,7 @@
-
18,271
+
18,306
Lines of code
@@ -212,7 +212,7 @@
Downloads last month
-
786
+
792
Dependents
From f97cd5de1c644e9603b405d7818584d96c939763 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 31 Dec 2024 12:56:52 +0100 Subject: [PATCH 056/123] 5.24.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b70bc265..b407c0c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.23.25", + "version": "5.24.0", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 67148f076f96288f5ff149f558e7eff068592568 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 31 Dec 2024 13:02:53 +0100 Subject: [PATCH 057/123] versions() fixed bun and deno --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/osinfo.js | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9359291f..28ff10cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.1 | 2024-12-31 | `versions()` fixed deno and bun | | 5.24.0 | 2024-12-31 | `versions()` added deno and bun | | 5.23.25 | 2024-12-30 | `system()` adapted model and version (macOS) | | 5.23.24 | 2024-12-29 | `osInfo()` improved logofile detection | diff --git a/docs/history.html b/docs/history.html index 0a287ab7..03ef5c4c 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.24.1 + 2024-12-31 + versions() fixed deno and bun + 5.24.0 2024-12-31 diff --git a/docs/index.html b/docs/index.html index c7728ea1..7eb02b38 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.24.0
+
New Version: 5.24.1
diff --git a/lib/osinfo.js b/lib/osinfo.js index 443344de..ddb804ab 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -1033,7 +1033,7 @@ function versions(apps, callback) { exec('bun -v', function (error, stdout) { if (!error) { const line = stdout.toString().split('\n')[0].trim(); - appsObj.versions.fish = line; + appsObj.versions.bun = line; } functionProcessed(); }); @@ -1044,7 +1044,7 @@ function versions(apps, callback) { const line = stdout.toString().split('\n')[0].trim(); const parts = line.split(' '); if (parts.length > 1) { - appsObj.versions.fish = parts[1]; + appsObj.versions.deno = parts[1]; } } functionProcessed(); From 6d850386b70c5a9f29407537c88eb71762054c46 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 31 Dec 2024 13:02:59 +0100 Subject: [PATCH 058/123] 5.24.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b407c0c8..70326120 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.24.0", + "version": "5.24.1", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From dc714977c3209af773cc484417c15f6b11e0328d Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 1 Jan 2025 08:26:13 +0100 Subject: [PATCH 059/123] versions() fixed node version --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/osinfo.js | 45 +++++++++++++++++++++++++++++++-------------- 4 files changed, 38 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28ff10cf..a3aef179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.2 | 2025-01-01 | `versions()` fixed node version | | 5.24.1 | 2024-12-31 | `versions()` fixed deno and bun | | 5.24.0 | 2024-12-31 | `versions()` added deno and bun | | 5.23.25 | 2024-12-30 | `system()` adapted model and version (macOS) | diff --git a/docs/history.html b/docs/history.html index 03ef5c4c..b0bfac83 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.24.2 + 2025-01-01 + versions() fixed node version + 5.24.1 2024-12-31 diff --git a/docs/index.html b/docs/index.html index 7eb02b38..bd801ba3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.24.1
+
New Version: 5.24.2
diff --git a/lib/osinfo.js b/lib/osinfo.js index ddb804ab..eefedc31 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -328,23 +328,23 @@ function osInfo(callback) { result.build = util.getValue(lines, 'BuildVersion'); result.logofile = getLogoFile(result.distro); result.codename = 'macOS'; - result.codename = (result.release.indexOf('10.4') > -1 ? 'Mac OS X Tiger' : result.codename); - result.codename = (result.release.indexOf('10.5') > -1 ? 'Mac OS X Leopard' : result.codename); - result.codename = (result.release.indexOf('10.6') > -1 ? 'Mac OS X Snow Leopard' : result.codename); - result.codename = (result.release.indexOf('10.7') > -1 ? 'Mac OS X Lion' : result.codename); + result.codename = (result.release.indexOf('10.4') > -1 ? 'OS X Tiger' : result.codename); + result.codename = (result.release.indexOf('10.5') > -1 ? 'OS X Leopard' : result.codename); + result.codename = (result.release.indexOf('10.6') > -1 ? 'OS X Snow Leopard' : result.codename); + result.codename = (result.release.indexOf('10.7') > -1 ? 'OS X Lion' : result.codename); result.codename = (result.release.indexOf('10.8') > -1 ? 'OS X Mountain Lion' : result.codename); result.codename = (result.release.indexOf('10.9') > -1 ? 'OS X Mavericks' : result.codename); result.codename = (result.release.indexOf('10.10') > -1 ? 'OS X Yosemite' : result.codename); result.codename = (result.release.indexOf('10.11') > -1 ? 'OS X El Capitan' : result.codename); - result.codename = (result.release.indexOf('10.12') > -1 ? 'macOS Sierra' : result.codename); - result.codename = (result.release.indexOf('10.13') > -1 ? 'macOS High Sierra' : result.codename); - result.codename = (result.release.indexOf('10.14') > -1 ? 'macOS Mojave' : result.codename); - result.codename = (result.release.indexOf('10.15') > -1 ? 'macOS Catalina' : result.codename); - result.codename = (result.release.startsWith('11.') ? 'macOS Big Sur' : result.codename); - result.codename = (result.release.startsWith('12.') ? 'macOS Monterey' : result.codename); - result.codename = (result.release.startsWith('13.') ? 'macOS Ventura' : result.codename); - result.codename = (result.release.startsWith('14.') ? 'macOS Sonoma' : result.codename); - result.codename = (result.release.startsWith('15.') ? 'macOS Sequoia' : result.codename); + result.codename = (result.release.indexOf('10.12') > -1 ? 'Sierra' : result.codename); + result.codename = (result.release.indexOf('10.13') > -1 ? 'High Sierra' : result.codename); + result.codename = (result.release.indexOf('10.14') > -1 ? 'Mojave' : result.codename); + result.codename = (result.release.indexOf('10.15') > -1 ? 'Catalina' : result.codename); + result.codename = (result.release.startsWith('11.') ? 'Big Sur' : result.codename); + result.codename = (result.release.startsWith('12.') ? 'Monterey' : result.codename); + result.codename = (result.release.startsWith('13.') ? 'Ventura' : result.codename); + result.codename = (result.release.startsWith('14.') ? 'Sonoma' : result.codename); + result.codename = (result.release.startsWith('15.') ? 'Sequoia' : result.codename); result.uefi = true; result.codepage = util.getCodepage(); if (callback) { @@ -467,7 +467,7 @@ function versions(apps, callback) { mongodb: '', mysql: '', nginx: '', - node: process.versions.node, + node: '', //process.versions.node, npm: '', openssl: '', perl: '', @@ -799,6 +799,13 @@ function versions(apps, callback) { if (!error) { const postgresql = stdout.toString().split('\n')[0].split(' ') || []; appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : ''; + } else { + exec('pg_config --version', function (error, stdout) { + if (!error) { + const postgresql = stdout.toString().split('\n')[0].split(' ') || []; + appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : ''; + } + }); } functionProcessed(); }); @@ -1050,6 +1057,16 @@ function versions(apps, callback) { functionProcessed(); }); } + if ({}.hasOwnProperty.call(appsObj.versions, 'node')) { + exec('node -v', function (error, stdout) { + if (!error) { + let line = stdout.toString().split('\n')[0].trim(); + if (line.startsWith('v')) { line = line.slice(1); } + appsObj.versions.node = line; + } + functionProcessed(); + }); + } if ({}.hasOwnProperty.call(appsObj.versions, 'powershell')) { if (_windows) { util.powerShell('$PSVersionTable').then(stdout => { From 897e1813c2d0dd38b15e3b9fa104b57e1321ead1 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 1 Jan 2025 08:26:22 +0100 Subject: [PATCH 060/123] 5.24.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 70326120..1fd986ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.24.1", + "version": "5.24.2", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From ae99a911a6e4129440a9cab7cfd424de9cb59f5c Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 1 Jan 2025 09:10:49 +0100 Subject: [PATCH 061/123] __proto__ deno compatibility --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- docs/os.html | 22 ++++++++++++++++++++++ lib/docker.js | 10 +++++++--- lib/internet.js | 28 ++++++++++++++++++++++++---- lib/network.js | 10 +++++++--- lib/processes.js | 20 ++++++++++++++------ lib/util.js | 27 ++++++++++++++++++++------- 9 files changed, 101 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3aef179..91fbdf19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.3 | 2025-01-01 | `__proto__` deno compatibility | | 5.24.2 | 2025-01-01 | `versions()` fixed node version | | 5.24.1 | 2024-12-31 | `versions()` fixed deno and bun | | 5.24.0 | 2024-12-31 | `versions()` added deno and bun | diff --git a/docs/history.html b/docs/history.html index b0bfac83..49a71386 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.24.3 + 2025-01-01 + prototype pollution() deno compatibility + 5.24.2 2025-01-01 diff --git a/docs/index.html b/docs/index.html index bd801ba3..fd4f8650 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.24.2
+ 3
New Version: 5.24.2
diff --git a/docs/os.html b/docs/os.html index 7d917347..0300a0c5 100644 --- a/docs/os.html +++ b/docs/os.html @@ -331,6 +331,26 @@
Example
X node version + + + deno + X + X + X + X + X + deno version + + + + bun + X + X + X + X + X + bun version + v8 @@ -624,6 +644,8 @@
Example
systemOpenssl: '2.8.3', systemOpensslLib: 'LibreSSL', node: '13.8.0', + bun: '1.1.21', + deno: '2.1.4', v8: '7.9.317.25-node.28', npm: '6.13.6', yarn: '', diff --git a/lib/docker.js b/lib/docker.js index 51afb0c9..2f4b17d0 100644 --- a/lib/docker.js +++ b/lib/docker.js @@ -453,9 +453,13 @@ function dockerContainerStats(containerIDs, callback) { return resolve([]); } let containerIDsSanitized = ''; - containerIDsSanitized.__proto__.toLowerCase = util.stringToLower; - containerIDsSanitized.__proto__.replace = util.stringReplace; - containerIDsSanitized.__proto__.trim = util.stringTrim; + try { + containerIDsSanitized.__proto__.toLowerCase = util.stringToLower; + containerIDsSanitized.__proto__.replace = util.stringReplace; + containerIDsSanitized.__proto__.trim = util.stringTrim; + } catch (e) { + Object.setPrototypeOf(containerIDsSanitized, util.stringObj); + } containerIDsSanitized = containerIDs; containerIDsSanitized = containerIDsSanitized.trim(); diff --git a/lib/internet.js b/lib/internet.js index ffa6e672..ac59d83d 100644 --- a/lib/internet.js +++ b/lib/internet.js @@ -47,7 +47,12 @@ function inetChecksite(url, callback) { const l = util.mathMin(s.length, 2000); for (let i = 0; i <= l; i++) { if (s[i] !== undefined) { - s[i].__proto__.toLowerCase = util.stringToLower; + try { + s[i].__proto__.toLowerCase = util.stringToLower; + } catch (e) { + Object.setPrototypeOf(s[i], util.stringObj); + } + const sl = s[i].toLowerCase(); if (sl && sl[0] && !sl[1] && sl[0].length === 1) { urlSanitized = urlSanitized + sl[0]; @@ -57,7 +62,12 @@ function inetChecksite(url, callback) { result.url = urlSanitized; try { if (urlSanitized && !util.isPrototypePolluted()) { - urlSanitized.__proto__.startsWith = util.stringStartWith; + try { + urlSanitized.__proto__.startsWith = util.stringStartWith; + } catch (e) { + Object.setPrototypeOf(urlSanitized, util.stringObj); + } + if (urlSanitized.startsWith('file:') || urlSanitized.startsWith('gopher:') || urlSanitized.startsWith('telnet:') || urlSanitized.startsWith('mailto:') || urlSanitized.startsWith('news:') || urlSanitized.startsWith('nntp:')) { if (callback) { callback(result); } return resolve(result); @@ -108,14 +118,24 @@ function inetLatency(host, callback) { const l = util.mathMin(s.length, 2000); for (let i = 0; i <= l; i++) { if (!(s[i] === undefined)) { - s[i].__proto__.toLowerCase = util.stringToLower; + try { + s[i].__proto__.toLowerCase = util.stringToLower; + } catch (e) { + Object.setPrototypeOf(s[i], util.stringObj); + } + const sl = s[i].toLowerCase(); if (sl && sl[0] && !sl[1]) { hostSanitized = hostSanitized + sl[0]; } } } - hostSanitized.__proto__.startsWith = util.stringStartWith; + try { + hostSanitized.__proto__.startsWith = util.stringStartWith; + } catch (e) { + Object.setPrototypeOf(hostSanitized, util.stringObj); + } + if (hostSanitized.startsWith('file:') || hostSanitized.startsWith('gopher:') || hostSanitized.startsWith('telnet:') || hostSanitized.startsWith('mailto:') || hostSanitized.startsWith('news:') || hostSanitized.startsWith('nntp:')) { if (callback) { callback(null); } return resolve(null); diff --git a/lib/network.js b/lib/network.js index 17be9474..25db882c 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1174,9 +1174,13 @@ function networkStats(ifaces, callback) { } ifaces = ifaces || getDefaultNetworkInterface(); - ifaces.__proto__.toLowerCase = util.stringToLower; - ifaces.__proto__.replace = util.stringReplace; - ifaces.__proto__.trim = util.stringTrim; + try { + ifaces.__proto__.toLowerCase = util.stringToLower; + ifaces.__proto__.replace = util.stringReplace; + ifaces.__proto__.trim = util.stringTrim; + } catch (e) { + Object.setPrototypeOf(ifaces, util.stringObj); + } ifaces = ifaces.trim().toLowerCase().replace(/,+/g, '|'); ifacesArray = ifaces.split('|'); diff --git a/lib/processes.js b/lib/processes.js index 3ee5a60d..a657eff2 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -126,9 +126,13 @@ function services(srv, callback) { if (srv) { let srvString = ''; - srvString.__proto__.toLowerCase = util.stringToLower; - srvString.__proto__.replace = util.stringReplace; - srvString.__proto__.trim = util.stringTrim; + try { + srvString.__proto__.toLowerCase = util.stringToLower; + srvString.__proto__.replace = util.stringReplace; + srvString.__proto__.trim = util.stringTrim; + } catch (e) { + Object.setPrototypeOf(srvString, util.stringObj); + } const s = util.sanitizeShellString(srv); const l = util.mathMin(s.length, 2000); @@ -982,9 +986,13 @@ function processLoad(proc, callback) { } let processesString = ''; - processesString.__proto__.toLowerCase = util.stringToLower; - processesString.__proto__.replace = util.stringReplace; - processesString.__proto__.trim = util.stringTrim; + try { + processesString.__proto__.toLowerCase = util.stringToLower; + processesString.__proto__.replace = util.stringReplace; + processesString.__proto__.trim = util.stringTrim; + } catch (e) { + Object.setPrototypeOf(processesString, util.stringObj); + } const s = util.sanitizeShellString(proc); const l = util.mathMin(s.length, 2000); diff --git a/lib/util.js b/lib/util.js index c76bf058..6719d952 100644 --- a/lib/util.js +++ b/lib/util.js @@ -84,6 +84,7 @@ function splitByNumber(str) { return [cpart, num]; } +const stringObj = new String(); const stringReplace = new String().replace; const stringToLower = new String().toLowerCase; const stringToString = new String().toString; @@ -758,11 +759,14 @@ function isPrototypePolluted() { let notPolluted = true; let st = ''; - st.__proto__.replace = stringReplace; - st.__proto__.toLowerCase = stringToLower; - st.__proto__.toString = stringToString; - st.__proto__.substr = stringSubstr; - + try { + st.__proto__.replace = stringReplace; + st.__proto__.toLowerCase = stringToLower; + st.__proto__.toString = stringToString; + st.__proto__.substr = stringSubstr; + } catch (e) { + Object.setPrototypeOf(st, stringObj); + } notPolluted = notPolluted || (s.length !== 62); const ms = Date.now(); if (typeof ms === 'number' && ms > 1600000000000) { @@ -782,7 +786,11 @@ function isPrototypePolluted() { // string manipulation let p = Math.random() * l * 0.9999999999; let stm = st.substr(0, p) + ' ' + st.substr(p, 2000); - stm.__proto__.replace = stringReplace; + try { + stm.__proto__.replace = stringReplace; + } catch (e) { + Object.setPrototypeOf(stm, stringObj); + } let sto = stm.replace(/ /g, ''); notPolluted = notPolluted && st === sto; p = Math.random() * l * 0.9999999999; @@ -803,7 +811,11 @@ function isPrototypePolluted() { notPolluted = notPolluted && (stl.length === l) && stl[l - 1] && !(stl[l]); for (let i = 0; i < l; i++) { const s1 = st[i]; - s1.__proto__.toLowerCase = stringToLower; + try { + s1.__proto__.toLowerCase = stringToLower; + } catch (e) { + Object.setPrototypeOf(st, stringObj); + } const s2 = stl ? stl[i] : ''; const s1l = s1.toLowerCase(); notPolluted = notPolluted && s1l[0] === s2 && s1l[0] && !(s1l[1]); @@ -2561,6 +2573,7 @@ exports.smartMonToolsInstalled = smartMonToolsInstalled; exports.linuxVersion = linuxVersion; exports.plistParser = plistParser; exports.plistReader = plistReader; +exports.stringObj = stringObj; exports.stringReplace = stringReplace; exports.stringToLower = stringToLower; exports.stringToString = stringToString; From 77fd59cdf5b217c821990607e8a54f1cb152c39b Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 1 Jan 2025 09:10:57 +0100 Subject: [PATCH 062/123] 5.24.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fd986ca..383d42df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.24.2", + "version": "5.24.3", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 52194beb6bea984bcd370944212041b0502cd4ef Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 1 Jan 2025 18:57:41 +0100 Subject: [PATCH 063/123] added denoTest script --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 383d42df..bbd5427a 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,14 @@ "author": "Sebastian Hildebrandt (https://plus-innovations.com)", "homepage": "https://systeminformation.io", "main": "./lib/index.js", + "type": "commonjs", "bin": { "systeminformation": "lib/cli.js" }, "types": "./lib/index.d.ts", "scripts": { - "test": "node ./test/test.js" + "test": "node ./test/test.js", + "testDeno": "deno run -A ./test/test.js" }, "files": [ "lib/" From 48517047c0de157a251fa6785c9b18a1823d5e92 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 2 Jan 2025 09:06:40 +0100 Subject: [PATCH 064/123] __proto__ added prototypes --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/docker.js | 4 ++++ lib/network.js | 4 ++++ lib/processes.js | 9 +++++++++ lib/util.js | 5 +++++ 7 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91fbdf19..f9d70c21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.4 | 2025-01-02 | `__proto__` added prototypes | | 5.24.3 | 2025-01-01 | `__proto__` deno compatibility | | 5.24.2 | 2025-01-01 | `versions()` fixed node version | | 5.24.1 | 2024-12-31 | `versions()` fixed deno and bun | diff --git a/docs/history.html b/docs/history.html index 49a71386..ef44483d 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.24.4 + 2025-01-02 + prototype pollution() added prototypes + 5.24.3 2025-01-01 diff --git a/docs/index.html b/docs/index.html index fd4f8650..94fa8a80 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
- 3
New Version: 5.24.2
+ 3
New Version: 5.24.4
diff --git a/lib/docker.js b/lib/docker.js index 2f4b17d0..61f63185 100644 --- a/lib/docker.js +++ b/lib/docker.js @@ -456,7 +456,11 @@ function dockerContainerStats(containerIDs, callback) { try { containerIDsSanitized.__proto__.toLowerCase = util.stringToLower; containerIDsSanitized.__proto__.replace = util.stringReplace; + containerIDsSanitized.__proto__.toString = util.stringToString; + containerIDsSanitized.__proto__.substr = util.stringSubstr; + containerIDsSanitized.__proto__.substring = util.stringSubstring; containerIDsSanitized.__proto__.trim = util.stringTrim; + containerIDsSanitized.__proto__.startsWith = util.stringStartWith; } catch (e) { Object.setPrototypeOf(containerIDsSanitized, util.stringObj); } diff --git a/lib/network.js b/lib/network.js index 25db882c..baa869e6 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1177,7 +1177,11 @@ function networkStats(ifaces, callback) { try { ifaces.__proto__.toLowerCase = util.stringToLower; ifaces.__proto__.replace = util.stringReplace; + ifaces.__proto__.toString = util.stringToString; + ifaces.__proto__.substr = util.stringSubstr; + ifaces.__proto__.substring = util.stringSubstring; ifaces.__proto__.trim = util.stringTrim; + ifaces.__proto__.startsWith = util.stringStartWith; } catch (e) { Object.setPrototypeOf(ifaces, util.stringObj); } diff --git a/lib/processes.js b/lib/processes.js index a657eff2..d2e1227a 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -129,7 +129,11 @@ function services(srv, callback) { try { srvString.__proto__.toLowerCase = util.stringToLower; srvString.__proto__.replace = util.stringReplace; + srvString.__proto__.toString = util.stringToString; + srvString.__proto__.substr = util.stringSubstr; + srvString.__proto__.substring = util.stringSubstring; srvString.__proto__.trim = util.stringTrim; + srvString.__proto__.startsWith = util.stringStartWith; } catch (e) { Object.setPrototypeOf(srvString, util.stringObj); } @@ -989,7 +993,12 @@ function processLoad(proc, callback) { try { processesString.__proto__.toLowerCase = util.stringToLower; processesString.__proto__.replace = util.stringReplace; + processesString.__proto__.toString = util.stringToString; + processesString.__proto__.substr = util.stringSubstr; + processesString.__proto__.substring = util.stringSubstring; processesString.__proto__.trim = util.stringTrim; + processesString.__proto__.startsWith = util.stringStartWith; + } catch (e) { Object.setPrototypeOf(processesString, util.stringObj); } diff --git a/lib/util.js b/lib/util.js index 6719d952..09c60e5b 100644 --- a/lib/util.js +++ b/lib/util.js @@ -89,6 +89,7 @@ const stringReplace = new String().replace; const stringToLower = new String().toLowerCase; const stringToString = new String().toString; const stringSubstr = new String().substr; +const stringSubstring = new String().substring; const stringTrim = new String().trim; const stringStartWith = new String().startsWith; const mathMin = Math.min; @@ -764,6 +765,9 @@ function isPrototypePolluted() { st.__proto__.toLowerCase = stringToLower; st.__proto__.toString = stringToString; st.__proto__.substr = stringSubstr; + st.__proto__.substring = stringSubstring; + st.__proto__.trim = stringTrim; + st.__proto__.startsWith = stringStartWith; } catch (e) { Object.setPrototypeOf(st, stringObj); } @@ -2578,6 +2582,7 @@ exports.stringReplace = stringReplace; exports.stringToLower = stringToLower; exports.stringToString = stringToString; exports.stringSubstr = stringSubstr; +exports.stringSubstring = stringSubstring; exports.stringTrim = stringTrim; exports.stringStartWith = stringStartWith; exports.mathMin = mathMin; From 8d1e037342ad4d8cc7f423f80c1a682523bbb2a4 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 2 Jan 2025 09:06:45 +0100 Subject: [PATCH 065/123] 5.24.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bbd5427a..c8da9e1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.24.3", + "version": "5.24.4", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 0cc50fcac5c579fbfbab2c65267be0357cd25bcd Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 2 Jan 2025 13:40:42 +0100 Subject: [PATCH 066/123] users() improved date parsing (macOS) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/users.js | 14 +++++++++++--- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9d70c21..17d30d3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.5 | 2025-01-02 | `users()` improved date parsing (macOS) | | 5.24.4 | 2025-01-02 | `__proto__` added prototypes | | 5.24.3 | 2025-01-01 | `__proto__` deno compatibility | | 5.24.2 | 2025-01-01 | `versions()` fixed node version | diff --git a/docs/history.html b/docs/history.html index ef44483d..957cc765 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.24.5 + 2025-01-02 + users() improved date parsing (macOS) + 5.24.4 2025-01-02 diff --git a/docs/index.html b/docs/index.html index 94fa8a80..1969bec3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
- 3
New Version: 5.24.4
+ 3
New Version: 5.24.5
diff --git a/lib/users.js b/lib/users.js index e6ffc3b0..960f438d 100644 --- a/lib/users.js +++ b/lib/users.js @@ -105,10 +105,18 @@ function parseUsersDarwin(lines) { // who part if (is_whopart) { + let dt = ('' + new Date().getFullYear()) + '-' + ('0' + ('JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC'.indexOf(l[2].toUpperCase()) / 3 + 1)).slice(-2) + '-' + ('0' + l[3]).slice(-2); + try { + if (new Date(dt) > new Date) { + dt = ('' + (new Date().getFullYear() - 1)) + '-' + ('0' + ('JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC'.indexOf(l[2].toUpperCase()) / 3 + 1)).slice(-2) + '-' + ('0' + l[3]).slice(-2); + } + } catch { + util.noop(); + } result_who.push({ user: l[0], tty: l[1], - date: ('' + new Date().getFullYear()) + '-' + ('0' + ('JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC'.indexOf(l[2].toUpperCase()) / 3 + 1)).slice(-2) + '-' + ('0' + l[3]).slice(-2), + date: dt, time: l[4], }); } else { @@ -146,7 +154,7 @@ function users(callback) { // linux if (_linux) { - exec('who --ips; echo "---"; w | tail -n +2', function (error, stdout) { + exec('export LC_ALL=C; who --ips; echo "---"; w; unset LC_ALL | tail -n +2', function (error, stdout) { if (!error) { // lines / split let lines = stdout.toString().split('\n'); @@ -195,7 +203,7 @@ function users(callback) { } if (_darwin) { - exec('who; echo "---"; w -ih', function (error, stdout) { + exec('export LC_ALL=C; who; echo "---"; w -ih; unset LC_ALL', function (error, stdout) { if (!error) { // lines / split let lines = stdout.toString().split('\n'); From 3da32409623b90c13b9836f3e6a602f86cbad798 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 2 Jan 2025 13:40:48 +0100 Subject: [PATCH 067/123] 5.24.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c8da9e1b..485041fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.24.4", + "version": "5.24.5", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 133b557eb6199ec3fc17e41c11a19952ad74c8ac Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 2 Jan 2025 15:42:16 +0100 Subject: [PATCH 068/123] cpu() clean brand string --- README.md | 2 +- lib/cpu.js | 1 + lib/util.js | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 05872468..e517669b 100644 --- a/README.md +++ b/README.md @@ -1186,7 +1186,7 @@ All other trademarks are the property of their respective owners. [daviddm-url]: https://david-dm.org/sebhildebrandt/systeminformation [issues-img]: https://img.shields.io/github/issues/sebhildebrandt/systeminformation.svg?style=flat-square [issues-url]: https://github.com/sebhildebrandt/systeminformation/issues -[closed-issues-img]: https://img.shields.io/github/issues-closed-raw/sebhildebrandt/systeminformation.svg?style=flat-square&color=brightgreen +[closed-issues-img]: https://img.shields.io/github/issues-search?query=repo%3Asebhildebrandt/systeminformation+is%3Aclosed&style=flat-square&color=brightgreen&label=Issues+closed [closed-issues-url]: https://github.com/sebhildebrandt/systeminformation/issues?q=is%3Aissue+is%3Aclosed [new-issue]: https://github.com/sebhildebrandt/systeminformation/issues/new/choose [mmon-npm-url]: https://npmjs.org/package/mmon diff --git a/lib/cpu.js b/lib/cpu.js index dfe2c7bd..8ce0ab97 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -737,6 +737,7 @@ function getCpu() { } modelline = util.getValue(lines, 'model name') || modelline; modelline = util.getValue(lines, 'bios model name') || modelline; + modelline = util.cleanString(modelline); const modellineParts = modelline.split('@'); result.brand = modellineParts[0].trim(); result.speed = modellineParts[1] ? parseFloat(modellineParts[1].trim()) : 0; diff --git a/lib/util.js b/lib/util.js index 09c60e5b..dbbe09e1 100644 --- a/lib/util.js +++ b/lib/util.js @@ -2535,6 +2535,9 @@ function checkWebsite(url, timeout = 5000) { }); }; +function cleanString(str) { + return str.replace(/To Be Filled By O.E.M./g, ''); +} function noop() { } exports.toInt = toInt; @@ -2591,3 +2594,4 @@ exports.getFilesInPath = getFilesInPath; exports.semverCompare = semverCompare; exports.getAppleModel = getAppleModel; exports.checkWebsite = checkWebsite; +exports.cleanString = cleanString; From c26fa98124cea03d82ae3a32dd30e4b09d02118e Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 2 Jan 2025 15:49:10 +0100 Subject: [PATCH 069/123] cpu() clean brand string --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17d30d3a..7219bcd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.6 | 2025-01-02 | `cpu()` clean brand string (linux) | | 5.24.5 | 2025-01-02 | `users()` improved date parsing (macOS) | | 5.24.4 | 2025-01-02 | `__proto__` added prototypes | | 5.24.3 | 2025-01-01 | `__proto__` deno compatibility | diff --git a/docs/history.html b/docs/history.html index 957cc765..82c9cc3c 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.24.6 + 2025-01-02 + cpu() clean brand string (linux) + 5.24.5 2025-01-02 diff --git a/docs/index.html b/docs/index.html index 1969bec3..90a0477d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
- 3
New Version: 5.24.5
+ 3
New Version: 5.24.6
From ca8c8c1c47d8578c45a22d4dece195f4b84dfc2c Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 2 Jan 2025 15:49:15 +0100 Subject: [PATCH 070/123] 5.24.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 485041fc..3ea79af8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.24.5", + "version": "5.24.6", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 392473e431a306bedbf7de107fadd02bd398803e Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 2 Jan 2025 18:42:43 +0100 Subject: [PATCH 071/123] system() chassis type parsing improved --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/system.js | 16 ++++++++-------- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7219bcd8..b3d6cecf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.7 | 2025-01-03 | `system()` chassis type parsing improved (macOS) | | 5.24.6 | 2025-01-02 | `cpu()` clean brand string (linux) | | 5.24.5 | 2025-01-02 | `users()` improved date parsing (macOS) | | 5.24.4 | 2025-01-02 | `__proto__` added prototypes | diff --git a/docs/history.html b/docs/history.html index 82c9cc3c..cd557d2c 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.24.7 + 2025-01-03 + system() chassis type detection improved (macOS) + 5.24.6 2025-01-02 diff --git a/docs/index.html b/docs/index.html index 90a0477d..67ce5188 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
- 3
New Version: 5.24.6
+ 3
New Version: 5.24.7
diff --git a/lib/system.js b/lib/system.js index 9777d53b..375992d6 100644 --- a/lib/system.js +++ b/lib/system.js @@ -221,7 +221,7 @@ function system(callback) { // const version = util.getValue(lines, 'version', '=', true); result.manufacturer = util.getValue(lines, 'manufacturer', '=', true); result.model = model.key; - result.type = macOsChassisType(model.model); + result.type = macOsChassisType(model.version); result.version = model.version; result.serial = util.getValue(lines, 'ioplatformserialnumber', '=', true); result.uuid = util.getValue(lines, 'ioplatformuuid', '=', true).toLowerCase(); @@ -607,13 +607,13 @@ exports.baseboard = baseboard; function macOsChassisType(model) { model = model.toLowerCase(); - if (model.startsWith('macbookair')) { return 'Notebook'; } - if (model.startsWith('macbookpro')) { return 'Laptop'; } - if (model.startsWith('macbook')) { return 'Notebook'; } - if (model.startsWith('macmini')) { return 'Desktop'; } - if (model.startsWith('imac')) { return 'Desktop'; } - if (model.startsWith('macstudio')) { return 'Desktop'; } - if (model.startsWith('macpro')) { return 'Tower'; } + if (model.indexOf('macbookair') >= 0 || model.indexOf('macbook air') >= 0) { return 'Notebook'; } + if (model.indexOf('macbookpro') >= 0 || model.indexOf('macbook pro') >= 0) { return 'Notebook'; } + if (model.indexOf('macbook') >= 0) { return 'Notebook'; } + if (model.indexOf('macmini') >= 0 || model.indexOf('mac mini') >= 0) { return 'Desktop'; } + if (model.indexOf('imac') >= 0) { return 'Desktop'; } + if (model.indexOf('macstudio') >= 0 || model.indexOf('mac studio') >= 0) { return 'Desktop'; } + if (model.indexOf('macpro') >= 0 || model.indexOf('mac pro') >= 0) { return 'Tower'; } return 'Other'; } From aff943cbe4f37d98a3068846eb37dcc42ea8e51c Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 3 Jan 2025 08:07:26 +0100 Subject: [PATCH 072/123] powerShell added default path --- lib/index.js | 1 + lib/util.js | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 296b708e..a414cef9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -55,6 +55,7 @@ const _sunos = (_platform === 'sunos'); if (_windows) { util.getCodepage(); + util.getPowershell(); } // ---------------------------------------------------------------------------------- diff --git a/lib/util.js b/lib/util.js index dbbe09e1..1b3d779b 100644 --- a/lib/util.js +++ b/lib/util.js @@ -42,6 +42,7 @@ let _psChild; let _psResult = ''; let _psCmds = []; let _psPersistent = false; +let _powerShell = ''; const _psToUTF8 = '$OutputEncoding = [System.Console]::OutputEncoding = [System.Console]::InputEncoding = [System.Text.Encoding]::UTF8 ; '; const _psCmdStart = '--###START###--'; const _psError = '--ERROR--'; @@ -332,6 +333,16 @@ function findObjectByKey(array, key, value) { return -1; } +function getPowershell() { + _powerShell = 'powershell.exe'; + if (_windows) { + defaultPath = `${WINDIR}\\WindowsPowerShell\\v1.0\\powershell.exe`; + if (fs.existsSync(defaultPath)) { + _powerShell = defaultPath; + } + } +} + function getWmic() { if (os.type() === 'Windows_NT' && !wmicPath) { wmicPath = WINDIR + '\\system32\\wbem\\wmic.exe'; @@ -401,7 +412,7 @@ function powerShellProceedResults(data) { function powerShellStart() { if (!_psChild) { - _psChild = spawn('powershell.exe', ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-Command', '-'], { + _psChild = spawn(_powerShell, ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-Command', '-'], { stdio: 'pipe', windowsHide: true, maxBuffer: 1024 * 20000, @@ -479,7 +490,7 @@ function powerShell(cmd) { return new Promise((resolve) => { process.nextTick(() => { try { - const child = spawn('powershell.exe', ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-ExecutionPolicy', 'Unrestricted', '-Command', '-'], { + const child = spawn(_powerShell, ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-ExecutionPolicy', 'Unrestricted', '-Command', '-'], { stdio: 'pipe', windowsHide: true, maxBuffer: 1024 * 20000, @@ -2595,3 +2606,4 @@ exports.semverCompare = semverCompare; exports.getAppleModel = getAppleModel; exports.checkWebsite = checkWebsite; exports.cleanString = cleanString; +exports.getPowershell = getPowershell; From e6a40d94bced4d6741e984ee1b905a5e202fdc01 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 3 Jan 2025 08:24:48 +0100 Subject: [PATCH 073/123] powerShell added default path --- lib/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.js b/lib/util.js index 1b3d779b..a71f48b6 100644 --- a/lib/util.js +++ b/lib/util.js @@ -336,7 +336,7 @@ function findObjectByKey(array, key, value) { function getPowershell() { _powerShell = 'powershell.exe'; if (_windows) { - defaultPath = `${WINDIR}\\WindowsPowerShell\\v1.0\\powershell.exe`; + const defaultPath = `${WINDIR}\\system32\\WindowsPowerShell\\v1.0\\powershell.exe`; if (fs.existsSync(defaultPath)) { _powerShell = defaultPath; } From 65847b8918d187a3e6d6d1c98529ee4557520a9b Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 3 Jan 2025 08:26:05 +0100 Subject: [PATCH 074/123] 5.24.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ea79af8..86ed3c1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.24.6", + "version": "5.24.7", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 2a6cdf19418572e984086d88dba7e8f17d77765a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 3 Jan 2025 08:29:24 +0100 Subject: [PATCH 075/123] powershell() detect default installation path --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d6cecf..7710342f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.8 | 2025-01-03 | `powerShell()` detect default installation path (windows) | | 5.24.7 | 2025-01-03 | `system()` chassis type parsing improved (macOS) | | 5.24.6 | 2025-01-02 | `cpu()` clean brand string (linux) | | 5.24.5 | 2025-01-02 | `users()` improved date parsing (macOS) | diff --git a/docs/history.html b/docs/history.html index cd557d2c..54796d2e 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.24.8 + 2025-01-03 + powerShell() detect default ppowerShell path (windows) + 5.24.7 2025-01-03 diff --git a/docs/index.html b/docs/index.html index 67ce5188..56e11563 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
- 3
New Version: 5.24.7
+ 3
New Version: 5.24.8
From 61e7dc2ada756bc53a7fe1f7471a662b5507a923 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 3 Jan 2025 08:29:55 +0100 Subject: [PATCH 076/123] 5.24.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 86ed3c1b..651324d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.24.7", + "version": "5.24.8", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From aac258fa137debeefe57a3eacb46779ce49bc592 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 3 Jan 2025 11:14:01 +0100 Subject: [PATCH 077/123] updated docs --- README.md | 12 +++++++++--- docs/gettingstarted.html | 3 ++- docs/index.html | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e517669b..f33295b4 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,15 @@ appreciated - [Buy me a coffee](https://www.buymeacoffee.com/systeminfo). **Your contribution** make it possible for me to keep working on this project, add new features and support more platforms. Thank you in advance! +## Node.js ✅, Bun ✅ and Deno ✅ + +I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There is +currently only one problem on Denos side: os.freemem() pollyfill is currently +not correct (version 2.1.4) bus there is already a fix (not yet published). + +**Attention**: This library is supposed to be used as a backend/server-side +library and **will definitely not work within a browser**. + ## New Version 5.0 The new Version 5 is here - this next major version release 5.0 comes with new @@ -109,9 +118,6 @@ and OS information. Android support - no npm dependencies -**Attention**: this is a `node.js` library. It is supposed to be used as a -backend/server-side library and will definitely not work within a browser. - ### Installation ```bash diff --git a/docs/gettingstarted.html b/docs/gettingstarted.html index d2fe473e..24eb898d 100644 --- a/docs/gettingstarted.html +++ b/docs/gettingstarted.html @@ -54,6 +54,7 @@
  • get detailed information about system, cpu, baseboard, battery, memory, disks/filesystem, network, docker, software, services and processes
  • supports Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support
  • no npm dependencies
  • +
  • for Node.js ✅, Bun ✅and Deno ✅
  • Core Concept

    @@ -66,7 +67,7 @@

    Core Concept

    I also created a nice little command line tool called mmon (micro-monitor) for Linux and macOS, also available via github and npm

    Attention:

    -

    This library is supposed to be used as a node.js backend/server-side library and will definitely not work within a browser.

    +

    This library is supposed to be used as a node.js, Bun or Deno backend/server-side library and will definitely not work within a browser.

    Installation

    $ npm install systeminformation --save
    diff --git a/docs/index.html b/docs/index.html index 56e11563..b7316f55 100644 --- a/docs/index.html +++ b/docs/index.html @@ -186,7 +186,7 @@
    Overview
    -
    Node.js system information package. Lightweight collection of 50+ functions to retrieve detailed hardware, system and OS information. For Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support. Dependency free.
    +
    Node.js system information package. Lightweight collection of 50+ functions to retrieve detailed hardware, system and OS information. For Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support. Dependency free. Works with Node.js, Bun and Deno
    #1 NPM ranking for backend packages
    NPM Version From a03054adcb1e66fc544723ae30e4eca593bbce73 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 3 Jan 2025 11:57:08 +0100 Subject: [PATCH 078/123] updated docs --- LICENSE | 2 +- README.md | 7 ++++--- docs/audio.html | 2 +- docs/battery.html | 2 +- docs/bluetooth.html | 2 +- docs/changes.html | 2 +- docs/contributors.html | 2 +- docs/copyright.html | 2 +- docs/cpu.html | 2 +- docs/docker.html | 2 +- docs/filesystem.html | 2 +- docs/general.html | 2 +- docs/gettingstarted.html | 2 +- docs/graphics.html | 2 +- docs/history.html | 2 +- docs/index.html | 2 +- docs/issues.html | 2 +- docs/memory.html | 2 +- docs/network.html | 2 +- docs/os.html | 2 +- docs/printer.html | 2 +- docs/processes.html | 2 +- docs/security.html | 2 +- docs/statsfunctions.html | 2 +- docs/system.html | 2 +- docs/tests.html | 2 +- docs/trademarks.html | 6 ++++-- docs/usb.html | 2 +- docs/v4/battery.html | 2 +- docs/v4/contributors.html | 2 +- docs/v4/copyright.html | 2 +- docs/v4/cpu.html | 2 +- docs/v4/docker.html | 2 +- docs/v4/filesystem.html | 2 +- docs/v4/general.html | 2 +- docs/v4/gettingstarted.html | 2 +- docs/v4/graphics.html | 2 +- docs/v4/history.html | 2 +- docs/v4/index.html | 2 +- docs/v4/issues.html | 2 +- docs/v4/memory.html | 2 +- docs/v4/network.html | 2 +- docs/v4/os.html | 2 +- docs/v4/processes.html | 2 +- docs/v4/security.html | 2 +- docs/v4/statsfunctions.html | 2 +- docs/v4/system.html | 2 +- docs/v4/trademarks.html | 2 +- docs/v4/vbox.html | 2 +- docs/v4/wifi.html | 2 +- docs/vbox.html | 2 +- docs/wifi.html | 2 +- lib/audio.js | 2 +- lib/battery.js | 2 +- lib/bluetooth.js | 2 +- lib/cli.js | 2 +- lib/cpu.js | 2 +- lib/docker.js | 2 +- lib/dockerSocket.js | 2 +- lib/filesystem.js | 2 +- lib/graphics.js | 2 +- lib/index.js | 2 +- lib/internet.js | 2 +- lib/memory.js | 2 +- lib/network.js | 2 +- lib/osinfo.js | 2 +- lib/printer.js | 2 +- lib/processes.js | 2 +- lib/system.js | 2 +- lib/usb.js | 2 +- lib/users.js | 2 +- lib/util.js | 2 +- lib/virtualbox.js | 2 +- lib/wifi.js | 2 +- 74 files changed, 80 insertions(+), 77 deletions(-) diff --git a/LICENSE b/LICENSE index bcffe57c..0dbbfc8b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2024 Sebastian Hildebrandt +Copyright (c) 2014-2025 Sebastian Hildebrandt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index f33295b4..ddfda61d 100644 --- a/README.md +++ b/README.md @@ -1129,7 +1129,7 @@ OSX Temperature: credits here are going to: Linux is a registered trademark of Linus Torvalds. Apple, macOS, OS X are registered trademarks of Apple Inc., Windows is a registered trademark of -Microsoft Corporation. Node.js is a trademark of Joyent Inc., Intel is a +Microsoft Corporation. Node.js is a trademark of OpenJS Foundation, Intel is a trademark of Intel Corporation, AMD is a trademark of Advanced Micro Devices Inc., Raspberry Pi is a trademark of the Raspberry Pi Foundation, Debian is a trademark owned by Software in the Public Interest, Inc., Ubuntu is a trademark @@ -1141,7 +1141,8 @@ Oracle Corporation, Xen is a registered trademark of Xen Project, QEMU is a trademark of Fabrice Bellard, bochs is a trademark of The Bochs Project, USB and USB Logo are trademarks of USB Implementation Forum, Bluetooth and Bluetooth Logo are trademarks of Bluetooth SIG, Android is a trademark of Google LLC, -Parallels is a trademarks of Parallels International GmbH. +Parallels is a trademarks of Parallels International GmbH. Bun is a trademark of +Codeblog Corp. Deno is a trademark of Deno Land Inc. All other trademarks are the property of their respective owners. @@ -1149,7 +1150,7 @@ All other trademarks are the property of their respective owners. > The [`MIT`][license-url] License (MIT) > -> Copyright © 2014-2024 Sebastian Hildebrandt, +> Copyright © 2014-2025 Sebastian Hildebrandt, > [+innovations](http://www.plus-innovations.com). > > Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/docs/audio.html b/docs/audio.html index cd026259..148ccf36 100644 --- a/docs/audio.html +++ b/docs/audio.html @@ -262,7 +262,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/battery.html b/docs/battery.html index 26281080..bc586ade 100644 --- a/docs/battery.html +++ b/docs/battery.html @@ -308,7 +308,7 @@

    Windows Battery

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/bluetooth.html b/docs/bluetooth.html index 5a855334..c3916192 100644 --- a/docs/bluetooth.html +++ b/docs/bluetooth.html @@ -226,7 +226,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/changes.html b/docs/changes.html index 28f5e370..6b7134b9 100644 --- a/docs/changes.html +++ b/docs/changes.html @@ -272,7 +272,7 @@

    Full Version History

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/contributors.html b/docs/contributors.html index 88d9d187..a3380cd0 100644 --- a/docs/contributors.html +++ b/docs/contributors.html @@ -111,7 +111,7 @@
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/copyright.html b/docs/copyright.html index 240d1df3..a233a9f4 100644 --- a/docs/copyright.html +++ b/docs/copyright.html @@ -123,7 +123,7 @@

    Photos:

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/cpu.html b/docs/cpu.html index 873256ab..86f150cf 100644 --- a/docs/cpu.html +++ b/docs/cpu.html @@ -643,7 +643,7 @@

    Windows Temperature

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/docker.html b/docs/docker.html index 48712e51..d582ea58 100644 --- a/docs/docker.html +++ b/docs/docker.html @@ -1347,7 +1347,7 @@

    Container, Stats, Processes

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/filesystem.html b/docs/filesystem.html index 128b672d..4cbf7684 100644 --- a/docs/filesystem.html +++ b/docs/filesystem.html @@ -996,7 +996,7 @@

    Getting correct stats values

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/general.html b/docs/general.html index 7aaa99e0..d3aeb4a7 100644 --- a/docs/general.html +++ b/docs/general.html @@ -402,7 +402,7 @@

    Get All At Once

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/gettingstarted.html b/docs/gettingstarted.html index 24eb898d..27e0c795 100644 --- a/docs/gettingstarted.html +++ b/docs/gettingstarted.html @@ -169,7 +169,7 @@

    Issues

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/graphics.html b/docs/graphics.html index 02663cd0..92c6a32d 100644 --- a/docs/graphics.html +++ b/docs/graphics.html @@ -647,7 +647,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/history.html b/docs/history.html index 54796d2e..b48e9dfe 100644 --- a/docs/history.html +++ b/docs/history.html @@ -3453,7 +3453,7 @@

    Full version history

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/index.html b/docs/index.html index b7316f55..414919c2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -384,7 +384,7 @@
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/issues.html b/docs/issues.html index f9f9d0d2..aee82e44 100644 --- a/docs/issues.html +++ b/docs/issues.html @@ -127,7 +127,7 @@

    Finding New Issues

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/memory.html b/docs/memory.html index 87e27f4b..6176911c 100644 --- a/docs/memory.html +++ b/docs/memory.html @@ -450,7 +450,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/network.html b/docs/network.html index 8ebbd3ad..d3be95f6 100644 --- a/docs/network.html +++ b/docs/network.html @@ -842,7 +842,7 @@

    Getting correct stats values

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/os.html b/docs/os.html index 0300a0c5..6bd57e30 100644 --- a/docs/os.html +++ b/docs/os.html @@ -822,7 +822,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/printer.html b/docs/printer.html index ff8e80fc..59d6ce9f 100644 --- a/docs/printer.html +++ b/docs/printer.html @@ -239,7 +239,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/processes.html b/docs/processes.html index 546d10ac..4459d75e 100644 --- a/docs/processes.html +++ b/docs/processes.html @@ -780,7 +780,7 @@

    Getting correct stats values

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/security.html b/docs/security.html index 9245321b..fe1fb0d2 100644 --- a/docs/security.html +++ b/docs/security.html @@ -275,7 +275,7 @@

    Workaround

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/statsfunctions.html b/docs/statsfunctions.html index b155df59..1ffc6c77 100644 --- a/docs/statsfunctions.html +++ b/docs/statsfunctions.html @@ -157,7 +157,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/system.html b/docs/system.html index a3f6c0a7..9f986ee7 100644 --- a/docs/system.html +++ b/docs/system.html @@ -583,7 +583,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/tests.html b/docs/tests.html index df6bcbf6..7d00db80 100644 --- a/docs/tests.html +++ b/docs/tests.html @@ -143,7 +143,7 @@

    Testing on your platform

  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/trademarks.html b/docs/trademarks.html index ceffca41..001f44b4 100644 --- a/docs/trademarks.html +++ b/docs/trademarks.html @@ -54,16 +54,18 @@
  • Bluetooth and Bluetooth Logo are trademarks of Bluetooth SIG..
  • bochs is a trademark of The Bochs Project
  • BSD is a registered trademark of UUnet Technologies, Inc.
  • +
  • Bun is a registered trademark of Codeblog Corp.
  • CentOS is a trademark of Read Hat Inc.
  • Debian is a trademark owned by Software in the Public Interest, Inc.
  • DELL is a registered trademark of Dell Inc.
  • +
  • Deno is a trademark of Deno Land Inc.
  • Docker is a trademark of Docker, Inc.
  • FreeBSD is a registered trademark of The FreeBSD Foundation
  • Intel is a trademark of Intel Corporation
  • Linux is a registered trademark of Linus Torvalds
  • MSI is a registered trademark Micro-Star International Co.
  • NetBSD is a registered trademark of The NetBSD Foundation
  • -
  • Node.js is a trademark of Joyent Inc.
  • +
  • Node.js is a trademark of OpenJS Foundation
  • NVIDIA is a registered trademark of NVIDIA Corporation.
  • Parallels is a trademarks of Parallels International GmbH.
  • QEMU is a trademark of Fabrice Bellard.
  • @@ -117,7 +119,7 @@
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/usb.html b/docs/usb.html index 5223d773..121edc58 100644 --- a/docs/usb.html +++ b/docs/usb.html @@ -274,7 +274,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/docs/v4/battery.html b/docs/v4/battery.html index 23e66533..cc5e5f83 100644 --- a/docs/v4/battery.html +++ b/docs/v4/battery.html @@ -291,7 +291,7 @@

    Windows Battery

    diff --git a/docs/wifi.html b/docs/wifi.html index aa6b29f1..25b6b3cf 100644 --- a/docs/wifi.html +++ b/docs/wifi.html @@ -524,7 +524,7 @@
    Example
  • Trademarks
  •  
  • Copyright & License  MIT license
  • -
  • © 2024 Sebastian Hildebrandt
  • +
  • © 2025 Sebastian Hildebrandt
  • +innovations GmbH
  • diff --git a/lib/audio.js b/lib/audio.js index 4d80aaeb..dd930bcd 100644 --- a/lib/audio.js +++ b/lib/audio.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/battery.js b/lib/battery.js index b11318d1..c61ec3b6 100644 --- a/lib/battery.js +++ b/lib/battery.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/bluetooth.js b/lib/bluetooth.js index 58814074..a6236db8 100644 --- a/lib/bluetooth.js +++ b/lib/bluetooth.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/cli.js b/lib/cli.js index 65f625e0..cfccb95a 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -7,7 +7,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/cpu.js b/lib/cpu.js index 8ce0ab97..160e0c08 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/docker.js b/lib/docker.js index 61f63185..9dee5933 100644 --- a/lib/docker.js +++ b/lib/docker.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/dockerSocket.js b/lib/dockerSocket.js index e36e6139..02b4acef 100644 --- a/lib/dockerSocket.js +++ b/lib/dockerSocket.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/filesystem.js b/lib/filesystem.js index 15e6a87e..6107e280 100644 --- a/lib/filesystem.js +++ b/lib/filesystem.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/graphics.js b/lib/graphics.js index 07904668..39c01164 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/index.js b/lib/index.js index a414cef9..07e89198 100644 --- a/lib/index.js +++ b/lib/index.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // Contributors: Guillaume Legrain (https://github.com/glegrain) diff --git a/lib/internet.js b/lib/internet.js index ac59d83d..4b6d61aa 100644 --- a/lib/internet.js +++ b/lib/internet.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/memory.js b/lib/memory.js index ebf9683b..423cb3f3 100644 --- a/lib/memory.js +++ b/lib/memory.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/network.js b/lib/network.js index baa869e6..f47ccadf 100644 --- a/lib/network.js +++ b/lib/network.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/osinfo.js b/lib/osinfo.js index eefedc31..afafdb9e 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/printer.js b/lib/printer.js index 8fc7f28e..c7eab2de 100644 --- a/lib/printer.js +++ b/lib/printer.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/processes.js b/lib/processes.js index d2e1227a..bc6225be 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/system.js b/lib/system.js index 375992d6..f982ea8d 100644 --- a/lib/system.js +++ b/lib/system.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/usb.js b/lib/usb.js index 0a6edba9..2504d1a0 100644 --- a/lib/usb.js +++ b/lib/usb.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/users.js b/lib/users.js index 960f438d..3140ea27 100644 --- a/lib/users.js +++ b/lib/users.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/util.js b/lib/util.js index a71f48b6..c03ddad0 100644 --- a/lib/util.js +++ b/lib/util.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/virtualbox.js b/lib/virtualbox.js index 51fbaf49..489b8db6 100644 --- a/lib/virtualbox.js +++ b/lib/virtualbox.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT diff --git a/lib/wifi.js b/lib/wifi.js index 9735094a..f2505852 100644 --- a/lib/wifi.js +++ b/lib/wifi.js @@ -5,7 +5,7 @@ // ---------------------------------------------------------------------------------- // Description: System Information - library // for Node.js -// Copyright: (c) 2014 - 2024 +// Copyright: (c) 2014 - 2025 // Author: Sebastian Hildebrandt // ---------------------------------------------------------------------------------- // License: MIT From d8bf91e5644f272f92229e44696bf176246d986a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 4 Jan 2025 11:08:49 +0100 Subject: [PATCH 079/123] checkWebsite() reestablished certificate validation --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 4 ++-- lib/util.js | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7710342f..bb84c3a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.24.9 | 2025-01-04 | `checkWebsite()` reestablished certificate validation | | 5.24.8 | 2025-01-03 | `powerShell()` detect default installation path (windows) | | 5.24.7 | 2025-01-03 | `system()` chassis type parsing improved (macOS) | | 5.24.6 | 2025-01-02 | `cpu()` clean brand string (linux) | diff --git a/docs/history.html b/docs/history.html index b48e9dfe..14a9f622 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.24.9 + 2025-01-04 + checkWebsite() reestablished certificate validation + 5.24.8 2025-01-03 diff --git a/docs/index.html b/docs/index.html index 414919c2..87530fa1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.24.8
    + 3
    New Version: 5.24.9
    @@ -212,7 +212,7 @@
    Downloads last month
    -
    792
    +
    793
    Dependents
    diff --git a/lib/util.js b/lib/util.js index c03ddad0..50d68b96 100644 --- a/lib/util.js +++ b/lib/util.js @@ -2515,7 +2515,7 @@ function checkWebsite(url, timeout = 5000) { const t = Date.now(); return new Promise((resolve) => { const request = http - .get(url, { rejectUnauthorized: false }, function (res) { + .get(url, function (res) { res.on('data', () => { }); res.on('end', () => { resolve({ From 8aa3119629d2ea4522429e0ce67b5a7d75a8b0d0 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 4 Jan 2025 11:08:54 +0100 Subject: [PATCH 080/123] 5.24.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 651324d5..02c76829 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.24.8", + "version": "5.24.9", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 0c25994c8598d872bdbe8980b1a98cc9584600e6 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 4 Jan 2025 16:26:20 +0100 Subject: [PATCH 081/123] versions() added homebrew --- CHANGELOG.md | 2 + README.md | 1 + docs/history.html | 5 ++ docs/index.html | 2 +- docs/os.html | 225 ++++++++++++++++++++++++++-------------------- lib/osinfo.js | 13 ++- 6 files changed, 149 insertions(+), 99 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb84c3a3..5cb8b9f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.0 | 2025-01-05 | `versions()` added homebrew | +| 5.24.9 | 2025-01-04 | `checkWebsite()` reestablished certificate validation | | 5.24.9 | 2025-01-04 | `checkWebsite()` reestablished certificate validation | | 5.24.8 | 2025-01-03 | `powerShell()` detect default installation path (windows) | | 5.24.7 | 2025-01-03 | `system()` chassis type parsing improved (macOS) | diff --git a/README.md b/README.md index ddfda61d..1d494c03 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,7 @@ si.cpu() (last 7 major and minor version releases) +- Version 5.24.0: `versions()` added homebrew - Version 5.24.0: `versions()` added bun and deno - Version 5.23.0: `usb()` added serial number (linux) - Version 5.22.0: `wifiConnections()` added signal quality diff --git a/docs/history.html b/docs/history.html index 14a9f622..89994237 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.0 + 2024-01-05 + versions() added homebrew + 5.24.9 2025-01-04 diff --git a/docs/index.html b/docs/index.html index 87530fa1..b99e2bf2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.24.9
    + 3
    New Version: 5.24.10
    diff --git a/docs/os.html b/docs/os.html index 6bd57e30..007a5ba5 100644 --- a/docs/os.html +++ b/docs/os.html @@ -289,107 +289,107 @@
    Example
    X X X - os kernel version + kernel version - openssl + apache X X X X X - node openssl version + apache version - systemOpenssl + bash X X X X X - os openssl version + bash version - systemOpensslLib + bun X X X X X - openSSL, LibreSSL, ... + bun version - node + deno X X X X X - node version + deno version - deno + docker X X X X X - deno version + docker version - bun + dotnet X X X X X - bun version + dotnet version - v8 + fish X X X X X - v8 version + fish version - npm + gcc X X X X X - npm version + gcc version - yarn + git X X X X X - yarn version + git version - pm2 + grunt X X X X X - pm2 version + grunt version @@ -403,33 +403,33 @@
    Example
    - grunt + homebrew X X X X X - grunt version + homebrew version - git + java X X X X X - git version + java version - tsc + mongodb X X X X X - typescript version + mongodb version @@ -443,43 +443,53 @@
    Example
    - redis + nginx X X X X X - redis version + nginx version - mongodb + node X X X X X - mongodb version + node version - apache + npm X X X X X - apache version + npm version - nginx + openssl X X X X X - nginx version + openssl version + + + + perl + X + X + X + X + X + perl version @@ -493,13 +503,33 @@
    Example
    - docker + pip3 X X X X X - docker version + pip3 version + + + + pip + X + X + X + X + X + pip version + + + + pm2 + X + X + X + X + X + pm2 version @@ -523,113 +553,113 @@
    Example
    - perl + powershell X X X X X - perl version + powershell version - python + python3 X X X X X - python version + python3 version - python3 + python X X X X X - python3 version + python version - java + redis X X X X X - java version + redis version - gcc + systemOpenssl X X X X X - gcc version + systemOpenssl version - virtualbox + systemOpensslLib X X X X X - virtualbox version + systemOpensslLib version - bash + tsc X X X X X - bash version + tsc version - zsh + v8 X X X X X - zsh version + v8 version - fish + virtualbox X X X X X - fish version + virtualbox version - powershell - - - + yarn X - - powershell version + X + X + X + X + yarn version - dotnet - - - + zsh X - - dotnet version + X + X + X + X + zsh version @@ -639,43 +669,44 @@
    Example
    si.versions().then(data => console.log(data));
     {
    -  kernel: '19.3.0',
    -  openssl: '1.1.1d',
    -  systemOpenssl: '2.8.3',
    -  systemOpensslLib: 'LibreSSL',
    -  node: '13.8.0',
    +  kernel: '23.6.0',
    +  apache: '2.4.62',
    +  bash: '3.2.57',
       bun: '1.1.21',
       deno: '2.1.4',
    -  v8: '7.9.317.25-node.28',
    -  npm: '6.13.6',
    -  yarn: '',
    -  pm2: '',
    -  gulp: '',
    +  docker: '26.1.1',
    +  dotnet: '',
    +  fish: '',
    +  gcc: '15.0.0',
    +  git: '2.39.3',
       grunt: '',
    -  git: '2.21.1',
    -  tsc: '3.7.5',
    -  mysql: 'gpl)',
    -  redis: '',
    +  gulp: '',
    +  homebrew: '4.4.14',
    +  java: '17.0.2',
       mongodb: '',
    -  apache: '2.4.41 (Unix)',
    +  mysql: '9.0.1',
       nginx: '',
    -  php: '7.3.11',
    -  docker: '19.03.5',
    +  node: '22.12.0',
    +  npm: '10.9.0',
    +  openssl: '3.0.15+quic',
    +  perl: '5.34.1',
    +  php: '8.3.6',
    +  pip3: '24.2',
    +  pip: '20.3.4',
    +  pm2: '5.1.2',
       postfix: '3.2.2',
    -  postgresql: '12.1',
    -  perl: '5.18.4',
    -  python: '2.7.16',
    -  python3: '3.7.3',
    -  pip: '',
    -  pip3: '19.0.3',
    -  java: '',
    -  gcc: '4.2.1',
    -  virtualbox: '',
    -  bash: '3.2.57',
    -  zsh: '5.8',
    -  fish: '',
    +  postgresql: '16.4',
       powershell: '',
    -  dotnet: ''
    +  python3: '3.12.5',
    +  python: '',
    +  redis: '',
    +  systemOpenssl: '3.3.1',
    +  systemOpensslLib: 'OpenSSL',
    +  tsc: '5.2.2',
    +  v8: '12.4.254.21-node.21',
    +  virtualbox: '',
    +  yarn: '1.22.17',
    +  zsh: '5.9''
     }
    Example 2
    const si = require('systeminformation');
    diff --git a/lib/osinfo.js b/lib/osinfo.js
    index afafdb9e..e07488ff 100644
    --- a/lib/osinfo.js
    +++ b/lib/osinfo.js
    @@ -463,6 +463,7 @@ function versions(apps, callback) {
         git: '',
         grunt: '',
         gulp: '',
    +    homebrew: '',
         java: '',
         mongodb: '',
         mysql: '',
    @@ -494,7 +495,7 @@ function versions(apps, callback) {
         if (apps === '*') {
           return {
             versions: versionObject,
    -        counter: 32
    +        counter: 34
           };
         }
         if (!Array.isArray(apps)) {
    @@ -609,6 +610,16 @@ function versions(apps, callback) {
                 functionProcessed();
               });
             }
    +        if ({}.hasOwnProperty.call(appsObj.versions, 'homebrew')) {
    +          cmd = 'brew';
    +          exec(`${cmd} --version`, function (error, stdout) {
    +            if (!error) {
    +              const brew = stdout.toString().split('\n')[0] || '';
    +              appsObj.versions.homebrew = (brew.toLowerCase().split(' ')[1] || '').trim();
    +            }
    +            functionProcessed();
    +          });
    +        }
             if ({}.hasOwnProperty.call(appsObj.versions, 'tsc')) {
               cmd = 'tsc';
               if (_windows) {
    
    From cf4e8119afdb8061b917d1030a552d85ef2043b1 Mon Sep 17 00:00:00 2001
    From: Sebastian Hildebrandt 
    Date: Sat, 4 Jan 2025 16:29:43 +0100
    Subject: [PATCH 082/123] 5.25.0
    
    ---
     package.json | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/package.json b/package.json
    index 02c76829..2506404a 100644
    --- a/package.json
    +++ b/package.json
    @@ -1,6 +1,6 @@
     {
       "name": "systeminformation",
    -  "version": "5.24.9",
    +  "version": "5.25.0",
       "description": "Advanced, lightweight system and OS information library",
       "license": "MIT",
       "author": "Sebastian Hildebrandt  (https://plus-innovations.com)",
    
    From 34dd408e5453ba5da22a2e87655c2b92549d1632 Mon Sep 17 00:00:00 2001
    From: Sebastian Hildebrandt 
    Date: Sat, 4 Jan 2025 18:05:44 +0100
    Subject: [PATCH 083/123] updated README
    
    ---
     README.md | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/README.md b/README.md
    index 1d494c03..a1bde067 100644
    --- a/README.md
    +++ b/README.md
    @@ -71,7 +71,7 @@ add new features and support more platforms. Thank you in advance!
     
     I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There is
     currently only one problem on Denos side: os.freemem() pollyfill is currently
    -not correct (version 2.1.4) bus there is already a fix (not yet published).
    +not correct (version 2.1.4) but there is already a fix (not yet published).
     
     **Attention**: This library is supposed to be used as a backend/server-side
     library and **will definitely not work within a browser**.
    
    From eb57e2fae4863ce728e57c26f6092afb1affefb9 Mon Sep 17 00:00:00 2001
    From: Sebastian Hildebrandt 
    Date: Sat, 4 Jan 2025 21:02:02 +0100
    Subject: [PATCH 084/123] cpuCurrentSpeed() deno compatibility
    
    ---
     lib/cpu.js | 25 +++++++++++++++++--------
     1 file changed, 17 insertions(+), 8 deletions(-)
    
    diff --git a/lib/cpu.js b/lib/cpu.js
    index 160e0c08..118caf73 100644
    --- a/lib/cpu.js
    +++ b/lib/cpu.js
    @@ -995,16 +995,25 @@ function getCpuCurrentSpeedSync() {
       let maxFreq = 0;
       let avgFreq = 0;
       let cores = [];
    +  let speeds = [];
     
    -  if (cpus && cpus.length) {
    +  if (cpus && cpus.length && cpus[0].speed) {
         for (let i in cpus) {
    -      if ({}.hasOwnProperty.call(cpus, i)) {
    -        let freq = cpus[i].speed > 100 ? (cpus[i].speed + 1) / 1000 : cpus[i].speed / 10;
    -        avgFreq = avgFreq + freq;
    -        if (freq > maxFreq) { maxFreq = freq; }
    -        if (freq < minFreq) { minFreq = freq; }
    -        cores.push(parseFloat(freq.toFixed(2)));
    -      }
    +      speeds.push(cpus[i].speed > 100 ? (cpus[i].speed + 1) / 1000 : cpus[i].speed / 10);
    +    }
    +  } else {
    +    speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n');
    +    for (let i in speedStrings) {
    +      speeds.push(parseInt(speedStrings, 10));
    +    }
    +  }
    +
    +  if (speeds && speeds.length) {
    +    for (let i in speeds) {
    +      avgFreq = avgFreq + speeds[i];
    +      if (speeds[i] > maxFreq) { maxFreq = speeds[i]; }
    +      if (speeds[i] < minFreq) { minFreq = speeds[i]; }
    +      cores.push(parseFloat(speeds[i].toFixed(2)));
         }
         avgFreq = avgFreq / cpus.length;
         return {
    
    From ce17a4ecda164eb495c820ae5b682ca23761b0c0 Mon Sep 17 00:00:00 2001
    From: Sebastian Hildebrandt 
    Date: Sat, 4 Jan 2025 21:57:31 +0100
    Subject: [PATCH 085/123] updated docs
    
    ---
     docs/index.html | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/docs/index.html b/docs/index.html
    index b99e2bf2..7bfa6005 100644
    --- a/docs/index.html
    +++ b/docs/index.html
    @@ -170,7 +170,7 @@
           
           
    systeminformation
     
    - 3
    New Version: 5.24.10
    + 3
    New Version: 5.25.0
    @@ -204,7 +204,7 @@
    -
    18,306
    +
    18,440
    Lines of code
    From 4bfd0c3ea50ea16ee59c64c8f116c04d932df44d Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 07:43:53 +0100 Subject: [PATCH 086/123] currentSpeed() added try catch --- lib/cpu.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/cpu.js b/lib/cpu.js index 118caf73..a7942d8b 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -1001,10 +1001,14 @@ function getCpuCurrentSpeedSync() { for (let i in cpus) { speeds.push(cpus[i].speed > 100 ? (cpus[i].speed + 1) / 1000 : cpus[i].speed / 10); } - } else { - speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n'); - for (let i in speedStrings) { - speeds.push(parseInt(speedStrings, 10)); + } else if (_linux) { + try { + speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n'); + for (let i in speedStrings) { + speeds.push(parseInt(speedStrings, 10)); + } + } catch { + util.noop(); } } From 01e7f401e7c4e7bdd0a69cb15ff06f258433647b Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 08:02:12 +0100 Subject: [PATCH 087/123] cpuCurrentSpeed() fix deno workarround --- lib/cpu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cpu.js b/lib/cpu.js index a7942d8b..42a21681 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -1003,9 +1003,9 @@ function getCpuCurrentSpeedSync() { } } else if (_linux) { try { - speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n'); + const speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n'); for (let i in speedStrings) { - speeds.push(parseInt(speedStrings, 10)); + speeds.push(Math.floor(parseInt(speedStrings, 10) / 10) / 100); } } catch { util.noop(); From 938b1925890d80742845573ff8d30194ea4ff341 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 08:13:26 +0100 Subject: [PATCH 088/123] cpuCurrentSpeed() fix deno workarround --- lib/cpu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cpu.js b/lib/cpu.js index 42a21681..bd060d9c 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -1003,9 +1003,9 @@ function getCpuCurrentSpeedSync() { } } else if (_linux) { try { - const speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n'); + const speedStrings = execSync('cat /proc/cpuinfo | grep "cpu MHz" | cut -d " " -f 3', util.execOptsLinux).toString().split('\n').filter((line) => line.length > 0); for (let i in speedStrings) { - speeds.push(Math.floor(parseInt(speedStrings, 10) / 10) / 100); + speeds.push(Math.floor(parseInt(speedStrings[i], 10) / 10) / 100); } } catch { util.noop(); From 987080b9b8db242ed0a32c3f1c3f45203655289a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 08:20:32 +0100 Subject: [PATCH 089/123] cpuCurrentSpeed() denno speed workarround --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cb8b9f2..4f78f491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.1 | 2025-01-05 | `cpuCurrentSpeed()` denno speed workarround | | 5.25.0 | 2025-01-05 | `versions()` added homebrew | | 5.24.9 | 2025-01-04 | `checkWebsite()` reestablished certificate validation | | 5.24.9 | 2025-01-04 | `checkWebsite()` reestablished certificate validation | diff --git a/docs/history.html b/docs/history.html index 89994237..876b0864 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.1 + 2024-01-05 + cpuCurrentSpeed() Deno workarround + 5.25.0 2024-01-05 diff --git a/docs/index.html b/docs/index.html index 7bfa6005..ff9e2d5b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.0
    + 3
    New Version: 5.25.1
    From ae3128cc5118f8d6f069d454f9c3a5c19e624b78 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 08:20:44 +0100 Subject: [PATCH 090/123] 5.25.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2506404a..b9daa9a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.0", + "version": "5.25.1", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 85add8ec09302b9e4d613cddd078ea84a6e590fe Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 15:12:52 +0100 Subject: [PATCH 091/123] battery() improved serial and model parsing --- CHANGELOG.md | 3 ++- README.md | 2 +- docs/history.html | 5 +++++ docs/index.html | 2 +- lib/battery.js | 5 +++-- lib/cpu.js | 2 +- lib/system.js | 6 +++--- 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f78f491..c4bd7372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,7 +90,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | -| 5.25.1 | 2025-01-05 | `cpuCurrentSpeed()` denno speed workarround | +| 5.25.2 | 2025-01-05 | `battery()` improved serial and model parsing | +| 5.25.1 | 2025-01-05 | `cpuCurrentSpeed()` Deno CPU speed workarround (linux) | | 5.25.0 | 2025-01-05 | `versions()` added homebrew | | 5.24.9 | 2025-01-04 | `checkWebsite()` reestablished certificate validation | | 5.24.9 | 2025-01-04 | `checkWebsite()` reestablished certificate validation | diff --git a/README.md b/README.md index a1bde067..6472ff15 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ si.cpu() (last 7 major and minor version releases) -- Version 5.24.0: `versions()` added homebrew +- Version 5.25.0: `versions()` added homebrew - Version 5.24.0: `versions()` added bun and deno - Version 5.23.0: `usb()` added serial number (linux) - Version 5.22.0: `wifiConnections()` added signal quality diff --git a/docs/history.html b/docs/history.html index 876b0864..9e2eaaef 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.2 + 2024-01-05 + battery() improved model and serial parsing (macOS) + 5.25.1 2024-01-05 diff --git a/docs/index.html b/docs/index.html index ff9e2d5b..f5141e95 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.1
    + 3
    New Version: 5.25.2
    diff --git a/lib/battery.js b/lib/battery.js index c61ec3b6..eced1435 100644 --- a/lib/battery.js +++ b/lib/battery.js @@ -181,7 +181,7 @@ module.exports = function (callback) { } if (_darwin) { - exec('ioreg -n AppleSmartBattery -r | egrep "CycleCount|IsCharging|DesignCapacity|MaxCapacity|CurrentCapacity|BatterySerialNumber|TimeRemaining|Voltage"; pmset -g batt | grep %', function (error, stdout) { + exec('ioreg -n AppleSmartBattery -r | egrep "CycleCount|IsCharging|DesignCapacity|MaxCapacity|CurrentCapacity|DeviceName|BatterySerialNumber|Serial|TimeRemaining|Voltage"; pmset -g batt | grep %', function (error, stdout) { if (stdout) { let lines = stdout.toString().replace(/ +/g, '').replace(/"+/g, '').replace(/-/g, '').split('\n'); result.cycleCount = parseInt('0' + util.getValue(lines, 'cyclecount', '='), 10); @@ -191,7 +191,8 @@ module.exports = function (callback) { result.currentCapacity = Math.round(parseInt('0' + util.getValue(lines, 'applerawcurrentcapacity', '='), 10) * (result.voltage || 1)); result.designedCapacity = Math.round(parseInt('0' + util.getValue(lines, 'DesignCapacity', '='), 10) * (result.voltage || 1)); result.manufacturer = 'Apple'; - result.serial = util.getValue(lines, 'BatterySerialNumber', '='); + result.serial = util.getValue(lines, 'BatterySerialNumber', '=') || util.getValue(lines, 'Serial', '='); + result.model = util.getValue(lines, 'DeviceName', '='); let percent = null; const line = util.getValue(lines, 'internal', 'Battery'); let parts = line.split(';'); diff --git a/lib/cpu.js b/lib/cpu.js index bd060d9c..27ca7287 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -1019,7 +1019,7 @@ function getCpuCurrentSpeedSync() { if (speeds[i] < minFreq) { minFreq = speeds[i]; } cores.push(parseFloat(speeds[i].toFixed(2))); } - avgFreq = avgFreq / cpus.length; + avgFreq = avgFreq / speeds.length; return { min: parseFloat(minFreq.toFixed(2)), max: parseFloat(maxFreq.toFixed(2)), diff --git a/lib/system.js b/lib/system.js index f982ea8d..4abc9387 100644 --- a/lib/system.js +++ b/lib/system.js @@ -48,11 +48,11 @@ function system(callback) { if (_linux || _freebsd || _openbsd || _netbsd) { exec('export LC_ALL=C; dmidecode -t system 2>/dev/null; unset LC_ALL', function (error, stdout) { let lines = stdout.toString().split('\n'); - result.manufacturer = util.getValue(lines, 'manufacturer'); - result.model = util.getValue(lines, 'product name'); + result.manufacturer = cleanDefaults(util.getValue(lines, 'manufacturer')); + result.model = cleanDefaults(util.getValue(lines, 'product name')); result.version = cleanDefaults(util.getValue(lines, 'version')); result.serial = cleanDefaults(util.getValue(lines, 'serial number')); - result.uuid = cleanDefaults((util.getValue(lines, 'uuid').toLowerCase())); + result.uuid = cleanDefaults((util.getValue(lines, 'uuid'))).toLowerCase(); result.sku = cleanDefaults(util.getValue(lines, 'sku number')); // Non-Root values const cmd = `echo -n "product_name: "; cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null; echo; From fbc1dfa66b9f60b91cfecc4e150eddfd07e09401 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 15:25:18 +0100 Subject: [PATCH 092/123] system() clean defaults --- lib/system.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/system.js b/lib/system.js index 4abc9387..70b634ee 100644 --- a/lib/system.js +++ b/lib/system.js @@ -62,8 +62,8 @@ function system(callback) { echo -n "sys_vendor: "; cat /sys/devices/virtual/dmi/id/sys_vendor 2>/dev/null; echo;`; try { lines = execSync(cmd, util.execOptsLinux).toString().split('\n'); - result.manufacturer = result.manufacturer === '' ? util.getValue(lines, 'sys_vendor') : result.manufacturer; - result.model = result.model === '' ? util.getValue(lines, 'product_name') : result.model; + result.manufacturer = cleanDefaults(result.manufacturer === '' ? util.getValue(lines, 'sys_vendor') : result.manufacturer); + result.model = cleanDefaults(result.model === '' ? util.getValue(lines, 'product_name') : result.model); result.version = cleanDefaults(result.version === '' ? util.getValue(lines, 'product_version') : result.version); result.serial = cleanDefaults(result.serial === '' ? util.getValue(lines, 'product_serial') : result.serial); result.uuid = cleanDefaults(result.uuid === '' ? util.getValue(lines, 'product_uuid').toLowerCase() : result.uuid); From a6cb1f58997a35e586bf5275b6edc691270ff0fd Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 15:25:44 +0100 Subject: [PATCH 093/123] 5.25.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9daa9a6..e4f9b830 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.1", + "version": "5.25.2", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From d9e9c0bb0905cfbe8131eee6aa724333637b27f7 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 17:23:42 +0100 Subject: [PATCH 094/123] memLayout() improved speed parsing (windows) --- CHANGELOG.md | 3 ++- docs/history.html | 5 +++++ docs/index.html | 2 +- lib/memory.js | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4bd7372..4cc92095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,7 +90,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | -| 5.25.2 | 2025-01-05 | `battery()` improved serial and model parsing | +| 5.25.3 | 2025-01-05 | `memLayout()` improved speed parsing (windows) | +| 5.25.2 | 2025-01-05 | `battery()` improved serial and model parsing (macOS) | | 5.25.1 | 2025-01-05 | `cpuCurrentSpeed()` Deno CPU speed workarround (linux) | | 5.25.0 | 2025-01-05 | `versions()` added homebrew | | 5.24.9 | 2025-01-04 | `checkWebsite()` reestablished certificate validation | diff --git a/docs/history.html b/docs/history.html index 9e2eaaef..8931a881 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.3 + 2024-01-05 + memLayout() improved speed parsing (windows) + 5.25.2 2024-01-05 diff --git a/docs/index.html b/docs/index.html index f5141e95..b99a8cc2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.2
    + 3
    New Version: 5.25.3
    diff --git a/lib/memory.js b/lib/memory.js index 423cb3f3..83cbbeb3 100644 --- a/lib/memory.js +++ b/lib/memory.js @@ -531,7 +531,7 @@ function memLayout(callback) { const FormFactors = 'Unknown|Other|SIP|DIP|ZIP|SOJ|Proprietary|SIMM|DIMM|TSOP|PGA|RIMM|SODIMM|SRIMM|SMD|SSMP|QFP|TQFP|SOIC|LCC|PLCC|BGA|FPBGA|LGA'.split('|'); try { - util.powerShell('Get-CimInstance Win32_PhysicalMemory | select DataWidth,TotalWidth,Capacity,BankLabel,MemoryType,SMBIOSMemoryType,ConfiguredClockSpeed,FormFactor,Manufacturer,PartNumber,SerialNumber,ConfiguredVoltage,MinVoltage,MaxVoltage,Tag | fl').then((stdout, error) => { + util.powerShell('Get-CimInstance Win32_PhysicalMemory | select DataWidth,TotalWidth,Capacity,BankLabel,MemoryType,SMBIOSMemoryType,ConfiguredClockSpeed,Speed,FormFactor,Manufacturer,PartNumber,SerialNumber,ConfiguredVoltage,MinVoltage,MaxVoltage,Tag | fl').then((stdout, error) => { if (!error) { let devices = stdout.toString().split(/\n\s*\n/); devices.shift(); From 976b4df6e5127812cf2631a5abecf219a60b4dec Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 5 Jan 2025 17:23:50 +0100 Subject: [PATCH 095/123] 5.25.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e4f9b830..8964bf1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.2", + "version": "5.25.3", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From befa5375a1a9135292a498ff1df936ce9801aa66 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 6 Jan 2025 22:22:51 +0100 Subject: [PATCH 096/123] versions() improved powerShell parsing (windows) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/osinfo.js | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cc92095..e26bfa6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.4 | 2025-01-06 | `versions()` improved powerShell parsing (windows) | | 5.25.3 | 2025-01-05 | `memLayout()` improved speed parsing (windows) | | 5.25.2 | 2025-01-05 | `battery()` improved serial and model parsing (macOS) | | 5.25.1 | 2025-01-05 | `cpuCurrentSpeed()` Deno CPU speed workarround (linux) | diff --git a/docs/history.html b/docs/history.html index 8931a881..bba7c527 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.4 + 2024-01-06 + versions() powerShell parsing (windows) + 5.25.3 2024-01-05 diff --git a/docs/index.html b/docs/index.html index b99a8cc2..cd97e889 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.3
    + 3
    New Version: 5.25.4
    diff --git a/lib/osinfo.js b/lib/osinfo.js index e07488ff..3d196233 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -1081,7 +1081,7 @@ function versions(apps, callback) { if ({}.hasOwnProperty.call(appsObj.versions, 'powershell')) { if (_windows) { util.powerShell('$PSVersionTable').then(stdout => { - const lines = stdout.toString().split('\n').map(line => line.replace(/ +/g, ' ').replace(/ +/g, ':')); + const lines = stdout.toString().toLowerCase().split('\n').map(line => line.replace(/ +/g, ' ').replace(/ +/g, ':')); appsObj.versions.powershell = util.getValue(lines, 'psversion'); functionProcessed(); }); From f77172d99311215484598d832a19db337660a156 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 6 Jan 2025 22:22:55 +0100 Subject: [PATCH 097/123] 5.25.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8964bf1d..361a9746 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.3", + "version": "5.25.4", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From c7d4751518643d3705a3369af330292bd3096ea6 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 7 Jan 2025 16:20:27 +0100 Subject: [PATCH 098/123] shell() added pawershell detection --- lib/osinfo.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/osinfo.js b/lib/osinfo.js index 3d196233..f2252ff0 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -1120,7 +1120,28 @@ function shell(callback) { return new Promise((resolve) => { process.nextTick(() => { if (_windows) { - resolve('cmd'); + try { + const result = 'CMD'; + util.powerShell('$PSVersionTable').then(stdout => { + if (stdout) { + const lines = stdout.toString().toLowerCase().split('\n').map(line => line.replace(/ +/g, ' ').replace(/ +/g, ':')); + const ps = getValue(lines, 'psversion'); + let result = 'CMD'; + if (ps) { + result = `PowerShell ${ps.split('.')[0] + (ps.split('.')[1] ? '.' + ps.split('.')[1] : '')}`; + } + }; + if (callback) { + callback(result); + } + resolve(result); + }); + } catch { + if (callback) { + callback(result); + } + resolve(result); + } } else { let result = ''; exec('echo $SHELL', function (error, stdout) { From f3c402248ef178488e6a5039e89b9fb1312d831c Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 7 Jan 2025 16:52:52 +0100 Subject: [PATCH 099/123] shell() added pawershell detection --- lib/osinfo.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/osinfo.js b/lib/osinfo.js index f2252ff0..e73ece8a 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -1122,15 +1122,13 @@ function shell(callback) { if (_windows) { try { const result = 'CMD'; - util.powerShell('$PSVersionTable').then(stdout => { + util.powerShell(`Get-CimInstance -className win32_process | where-object {$_.ProcessId -eq ${process.ppid} } | select Name`).then(stdout => { + let result = 'CMD'; if (stdout) { - const lines = stdout.toString().toLowerCase().split('\n').map(line => line.replace(/ +/g, ' ').replace(/ +/g, ':')); - const ps = getValue(lines, 'psversion'); - let result = 'CMD'; - if (ps) { - result = `PowerShell ${ps.split('.')[0] + (ps.split('.')[1] ? '.' + ps.split('.')[1] : '')}`; + if (stdout.toString().toLowerCase().indexOf('powershell') >= 0) { + result = 'PowerShell'; } - }; + } if (callback) { callback(result); } From c8e5d9a6d0f2cac6251de4e621beb70e1b119e4b Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 7 Jan 2025 16:55:37 +0100 Subject: [PATCH 100/123] shell() added pawershell detection --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e26bfa6d..23cb57fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.5 | 2025-01-07 | `shell()` detect powerShell (windows) | | 5.25.4 | 2025-01-06 | `versions()` improved powerShell parsing (windows) | | 5.25.3 | 2025-01-05 | `memLayout()` improved speed parsing (windows) | | 5.25.2 | 2025-01-05 | `battery()` improved serial and model parsing (macOS) | diff --git a/docs/history.html b/docs/history.html index bba7c527..0056d039 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.5 + 2024-01-07 + shell() detect powerShell (windows) + 5.25.4 2024-01-06 diff --git a/docs/index.html b/docs/index.html index cd97e889..f89c92fe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.4
    + 3
    New Version: 5.25.5
    From 0845e034f0a66850b5fcc4e6544d55bbe327e8f7 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Tue, 7 Jan 2025 16:55:42 +0100 Subject: [PATCH 101/123] 5.25.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 361a9746..543e17aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.4", + "version": "5.25.5", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 348c6cf77e33582b2c5ac02b21d7ee20b4ad92df Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 8 Jan 2025 22:11:27 +0100 Subject: [PATCH 102/123] system() raspberry PI detection improved --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/system.js | 2 +- lib/util.js | 3 ++- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23cb57fb..e58e0ac9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.6 | 2025-01-08 | `system()` raspberry PI detection improved | | 5.25.5 | 2025-01-07 | `shell()` detect powerShell (windows) | | 5.25.4 | 2025-01-06 | `versions()` improved powerShell parsing (windows) | | 5.25.3 | 2025-01-05 | `memLayout()` improved speed parsing (windows) | diff --git a/docs/history.html b/docs/history.html index 0056d039..d45ba24e 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.6 + 2024-01-08 + system() raspberry pi detection improved + 5.25.5 2024-01-07 diff --git a/docs/index.html b/docs/index.html index f89c92fe..7bac7f58 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.5
    + 3
    New Version: 5.25.6
    diff --git a/lib/system.js b/lib/system.js index 70b634ee..14cfacde 100644 --- a/lib/system.js +++ b/lib/system.js @@ -189,7 +189,7 @@ function system(callback) { const model = util.getValue(lines, 'model:', ':', true); // reference values: https://elinux.org/RPi_HardwareHistory // https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md - if ((result.model === 'BCM2835' || result.model === 'BCM2708' || result.model === 'BCM2709' || result.model === 'BCM2710' || result.model === 'BCM2711' || result.model === 'BCM2836' || result.model === 'BCM2837') && model.toLowerCase().indexOf('raspberry') >= 0) { + if ((result.model === 'BCM2835' || result.model === 'BCM2708' || result.model === 'BCM2709' || result.model === 'BCM2710' || result.model === 'BCM2711' || result.model === 'BCM2836' || result.model === 'BCM2837' || result.model === '') && model.toLowerCase().indexOf('raspberry') >= 0) { const rPIRevision = util.decodePiCpuinfo(lines); result.model = rPIRevision.model; result.version = rPIRevision.revisionCode; diff --git a/lib/util.js b/lib/util.js index 50d68b96..230d2158 100644 --- a/lib/util.js +++ b/lib/util.js @@ -661,7 +661,8 @@ function isRaspberry() { } const hardware = getValue(cpuinfo, 'hardware'); - return (hardware && PI_MODEL_NO.indexOf(hardware) > -1); + const model = getValue(cpuinfo, 'model'); + return ((hardware && PI_MODEL_NO.indexOf(hardware) > -1) || (model && model.indexOf('Raspberry Pi') > -1)); } function isRaspbian() { From 13793c29bf82677957ec572325fe0da01f0106d7 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 8 Jan 2025 22:11:39 +0100 Subject: [PATCH 103/123] 5.25.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 543e17aa..87157236 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.5", + "version": "5.25.6", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 0be9e22f4cd0869e0ae469f44873a2da2e613128 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 15:52:00 +0100 Subject: [PATCH 104/123] memory(), chassis() optimized for raspberry --- lib/cpu.js | 17 +-- lib/memory.js | 3 +- lib/system.js | 27 ++-- lib/util.js | 415 +++++++++++++++++++++++++------------------------- 4 files changed, 225 insertions(+), 237 deletions(-) diff --git a/lib/cpu.js b/lib/cpu.js index 27ca7287..16d821e3 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -780,16 +780,13 @@ function getCpu() { result.governor = util.getValue(lines, 'governor') || ''; // Test Raspberry - if (result.vendor === 'ARM') { - const linesRpi = fs.readFileSync('/proc/cpuinfo').toString().split('\n'); - const rPIRevision = util.decodePiCpuinfo(linesRpi); - if (rPIRevision.model.toLowerCase().indexOf('raspberry') >= 0) { - result.family = result.manufacturer; - result.manufacturer = rPIRevision.manufacturer; - result.brand = rPIRevision.processor; - result.revision = rPIRevision.revisionCode; - result.socket = 'SOC'; - } + if (result.vendor === 'ARM' && util.isRaspberry()) { + const rPIRevision = util.decodePiCpuinfo(); + result.family = result.manufacturer; + result.manufacturer = rPIRevision.manufacturer; + result.brand = rPIRevision.processor; + result.revision = rPIRevision.revisionCode; + result.socket = 'SOC'; } // Test RISC-V diff --git a/lib/memory.js b/lib/memory.js index 83cbbeb3..e02687e4 100644 --- a/lib/memory.js +++ b/lib/memory.js @@ -401,10 +401,9 @@ function memLayout(callback) { try { let stdout = execSync('cat /proc/cpuinfo 2>/dev/null', util.execOptsLinux); let lines = stdout.toString().split('\n'); - let model = util.getValue(lines, 'hardware', ':', true).toUpperCase(); let version = util.getValue(lines, 'revision', ':', true).toLowerCase(); - if (model === 'BCM2835' || model === 'BCM2708' || model === 'BCM2709' || model === 'BCM2835' || model === 'BCM2837') { + if (util.isRaspberry(lines)) { const clockSpeed = { '0': 400, diff --git a/lib/system.js b/lib/system.js index 14cfacde..78e8ff46 100644 --- a/lib/system.js +++ b/lib/system.js @@ -189,7 +189,7 @@ function system(callback) { const model = util.getValue(lines, 'model:', ':', true); // reference values: https://elinux.org/RPi_HardwareHistory // https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md - if ((result.model === 'BCM2835' || result.model === 'BCM2708' || result.model === 'BCM2709' || result.model === 'BCM2710' || result.model === 'BCM2711' || result.model === 'BCM2836' || result.model === 'BCM2837' || result.model === '') && model.toLowerCase().indexOf('raspberry') >= 0) { + if (util.isRaspberry(lines)) { const rPIRevision = util.decodePiCpuinfo(lines); result.model = rPIRevision.model; result.version = rPIRevision.revisionCode; @@ -504,23 +504,14 @@ function baseboard(callback) { result.memSlots = util.toInt(util.getValue(lines, 'Number Of Devices')) || null; // raspberry - let linesRpi = ''; - try { - linesRpi = fs.readFileSync('/proc/cpuinfo').toString().split('\n'); - } catch (e) { - util.noop(); - } - if (linesRpi) { - const hardware = util.getValue(linesRpi, 'hardware'); - if (hardware.startsWith('BCM')) { - const rpi = util.decodePiCpuinfo(linesRpi); - result.manufacturer = rpi.manufacturer; - result.model = 'Raspberry Pi'; - result.serial = rpi.serial; - result.version = rpi.type + ' - ' + rpi.revision; - result.memMax = os.totalmem(); - result.memSlots = 0; - } + if (util.isRaspberry()) { + const rpi = util.decodePiCpuinfo(); + result.manufacturer = rpi.manufacturer; + result.model = 'Raspberry Pi'; + result.serial = rpi.serial; + result.version = rpi.type + ' - ' + rpi.revision; + result.memMax = os.totalmem(); + result.memSlots = 0; } if (callback) { callback(result); } diff --git a/lib/util.js b/lib/util.js index 230d2158..f5b901dc 100644 --- a/lib/util.js +++ b/lib/util.js @@ -635,7 +635,7 @@ function smartMonToolsInstalled() { return _smartMonToolsInstalled; } -function isRaspberry() { +function isRaspberry(cpuinfo) { const PI_MODEL_NO = [ 'BCM2708', 'BCM2709', @@ -647,11 +647,9 @@ function isRaspberry() { 'BCM2837', 'BCM2837B0' ]; - let cpuinfo = []; - if (_rpi_cpuinfo !== null) { cpuinfo = _rpi_cpuinfo; - } else { + } else if (cpuinfo === null) { try { cpuinfo = fs.readFileSync('/proc/cpuinfo', { encoding: 'utf8' }).toString().split('\n'); _rpi_cpuinfo = cpuinfo; @@ -884,214 +882,217 @@ function decodePiCpuinfo(lines) { if (_rpi_cpuinfo === null) { _rpi_cpuinfo = lines; + } else if (lines === null) { + lines = _rpi_cpuinfo; } +} - // https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md - - const oldRevisionCodes = { - '0002': { - type: 'B', - revision: '1.0', - memory: 256, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0003': { - type: 'B', - revision: '1.0', - memory: 256, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0004': { - type: 'B', - revision: '2.0', - memory: 256, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0005': { - type: 'B', - revision: '2.0', - memory: 256, - manufacturer: 'Qisda', - processor: 'BCM2835' - }, - '0006': { - type: 'B', - revision: '2.0', - memory: 256, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0007': { - type: 'A', - revision: '2.0', - memory: 256, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0008': { - type: 'A', - revision: '2.0', - memory: 256, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0009': { - type: 'A', - revision: '2.0', - memory: 256, - manufacturer: 'Qisda', - processor: 'BCM2835' - }, - '000d': { - type: 'B', - revision: '2.0', - memory: 512, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '000e': { - type: 'B', - revision: '2.0', - memory: 512, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '000f': { - type: 'B', - revision: '2.0', - memory: 512, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0010': { - type: 'B+', - revision: '1.2', - memory: 512, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0011': { - type: 'CM1', - revision: '1.0', - memory: 512, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0012': { - type: 'A+', - revision: '1.1', - memory: 256, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0013': { - type: 'B+', - revision: '1.2', - memory: 512, - manufacturer: 'Embest', - processor: 'BCM2835' - }, - '0014': { - type: 'CM1', - revision: '1.0', - memory: 512, - manufacturer: 'Embest', - processor: 'BCM2835' - }, - '0015': { - type: 'A+', - revision: '1.1', - memory: 256, - manufacturer: '512MB Embest', - processor: 'BCM2835' - } - }; +// https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md + +const oldRevisionCodes = { + '0002': { + type: 'B', + revision: '1.0', + memory: 256, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0003': { + type: 'B', + revision: '1.0', + memory: 256, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0004': { + type: 'B', + revision: '2.0', + memory: 256, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0005': { + type: 'B', + revision: '2.0', + memory: 256, + manufacturer: 'Qisda', + processor: 'BCM2835' + }, + '0006': { + type: 'B', + revision: '2.0', + memory: 256, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0007': { + type: 'A', + revision: '2.0', + memory: 256, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0008': { + type: 'A', + revision: '2.0', + memory: 256, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0009': { + type: 'A', + revision: '2.0', + memory: 256, + manufacturer: 'Qisda', + processor: 'BCM2835' + }, + '000d': { + type: 'B', + revision: '2.0', + memory: 512, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '000e': { + type: 'B', + revision: '2.0', + memory: 512, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '000f': { + type: 'B', + revision: '2.0', + memory: 512, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0010': { + type: 'B+', + revision: '1.2', + memory: 512, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0011': { + type: 'CM1', + revision: '1.0', + memory: 512, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0012': { + type: 'A+', + revision: '1.1', + memory: 256, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0013': { + type: 'B+', + revision: '1.2', + memory: 512, + manufacturer: 'Embest', + processor: 'BCM2835' + }, + '0014': { + type: 'CM1', + revision: '1.0', + memory: 512, + manufacturer: 'Embest', + processor: 'BCM2835' + }, + '0015': { + type: 'A+', + revision: '1.1', + memory: 256, + manufacturer: '512MB Embest', + processor: 'BCM2835' + } +}; - const processorList = [ - 'BCM2835', - 'BCM2836', - 'BCM2837', - 'BCM2711', - 'BCM2712', - ]; - const manufacturerList = [ - 'Sony UK', - 'Egoman', - 'Embest', - 'Sony Japan', - 'Embest', - 'Stadium' - ]; - const typeList = { - '00': 'A', - '01': 'B', - '02': 'A+', - '03': 'B+', - '04': '2B', - '05': 'Alpha (early prototype)', - '06': 'CM1', - '08': '3B', - '09': 'Zero', - '0a': 'CM3', - '0c': 'Zero W', - '0d': '3B+', - '0e': '3A+', - '0f': 'Internal use only', - '10': 'CM3+', - '11': '4B', - '12': 'Zero 2 W', - '13': '400', - '14': 'CM4', - '15': 'CM4S', - '16': 'Internal use only', - '17': '5', - '18': 'CM5', - '19': '500', - '1a': 'CM5 Lite', - }; +const processorList = [ + 'BCM2835', + 'BCM2836', + 'BCM2837', + 'BCM2711', + 'BCM2712', +]; +const manufacturerList = [ + 'Sony UK', + 'Egoman', + 'Embest', + 'Sony Japan', + 'Embest', + 'Stadium' +]; +const typeList = { + '00': 'A', + '01': 'B', + '02': 'A+', + '03': 'B+', + '04': '2B', + '05': 'Alpha (early prototype)', + '06': 'CM1', + '08': '3B', + '09': 'Zero', + '0a': 'CM3', + '0c': 'Zero W', + '0d': '3B+', + '0e': '3A+', + '0f': 'Internal use only', + '10': 'CM3+', + '11': '4B', + '12': 'Zero 2 W', + '13': '400', + '14': 'CM4', + '15': 'CM4S', + '16': 'Internal use only', + '17': '5', + '18': 'CM5', + '19': '500', + '1a': 'CM5 Lite', +}; - const revisionCode = getValue(lines, 'revision', ':', true); - const model = getValue(lines, 'model:', ':', true); - const serial = getValue(lines, 'serial', ':', true); - - let result = {}; - if ({}.hasOwnProperty.call(oldRevisionCodes, revisionCode)) { - // old revision codes - result = { - model, - serial, - revisionCode, - memory: oldRevisionCodes[revisionCode].memory, - manufacturer: oldRevisionCodes[revisionCode].manufacturer, - processor: oldRevisionCodes[revisionCode].processor, - type: oldRevisionCodes[revisionCode].type, - revision: oldRevisionCodes[revisionCode].revision, - }; +const revisionCode = getValue(lines, 'revision', ':', true); +const model = getValue(lines, 'model:', ':', true); +const serial = getValue(lines, 'serial', ':', true); + +let result = {}; +if ({}.hasOwnProperty.call(oldRevisionCodes, revisionCode)) { + // old revision codes + result = { + model, + serial, + revisionCode, + memory: oldRevisionCodes[revisionCode].memory, + manufacturer: oldRevisionCodes[revisionCode].manufacturer, + processor: oldRevisionCodes[revisionCode].processor, + type: oldRevisionCodes[revisionCode].type, + revision: oldRevisionCodes[revisionCode].revision, + }; - } else { - // new revision code - const revision = ('00000000' + getValue(lines, 'revision', ':', true).toLowerCase()).substr(-8); - const memSizeCode = parseInt(hex2bin(revision.substr(2, 1)).substr(5, 3), 2) || 0; - const manufacturer = manufacturerList[parseInt(revision.substr(3, 1), 10)]; - const processor = processorList[parseInt(revision.substr(4, 1), 10)]; - const typeCode = revision.substr(5, 2); - - - result = { - model, - serial, - revisionCode, - memory: 256 * Math.pow(2, memSizeCode), - manufacturer, - processor, - type: {}.hasOwnProperty.call(typeList, typeCode) ? typeList[typeCode] : '', - revision: '1.' + revision.substr(7, 1), - }; - } - return result; +} else { + // new revision code + const revision = ('00000000' + getValue(lines, 'revision', ':', true).toLowerCase()).substr(-8); + const memSizeCode = parseInt(hex2bin(revision.substr(2, 1)).substr(5, 3), 2) || 0; + const manufacturer = manufacturerList[parseInt(revision.substr(3, 1), 10)]; + const processor = processorList[parseInt(revision.substr(4, 1), 10)]; + const typeCode = revision.substr(5, 2); + + + result = { + model, + serial, + revisionCode, + memory: 256 * Math.pow(2, memSizeCode), + manufacturer, + processor, + type: {}.hasOwnProperty.call(typeList, typeCode) ? typeList[typeCode] : '', + revision: '1.' + revision.substr(7, 1), + }; +} +return result; } function getRpiGpu() { From daa8419057096c7a3f5989f091ca6127dc57f9b3 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 15:53:28 +0100 Subject: [PATCH 105/123] memory(), chassis() optimized for raspberry --- lib/util.js | 407 ++++++++++++++++++++++++++-------------------------- 1 file changed, 203 insertions(+), 204 deletions(-) diff --git a/lib/util.js b/lib/util.js index f5b901dc..6c7a4bf0 100644 --- a/lib/util.js +++ b/lib/util.js @@ -885,214 +885,213 @@ function decodePiCpuinfo(lines) { } else if (lines === null) { lines = _rpi_cpuinfo; } -} - -// https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md - -const oldRevisionCodes = { - '0002': { - type: 'B', - revision: '1.0', - memory: 256, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0003': { - type: 'B', - revision: '1.0', - memory: 256, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0004': { - type: 'B', - revision: '2.0', - memory: 256, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0005': { - type: 'B', - revision: '2.0', - memory: 256, - manufacturer: 'Qisda', - processor: 'BCM2835' - }, - '0006': { - type: 'B', - revision: '2.0', - memory: 256, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0007': { - type: 'A', - revision: '2.0', - memory: 256, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0008': { - type: 'A', - revision: '2.0', - memory: 256, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0009': { - type: 'A', - revision: '2.0', - memory: 256, - manufacturer: 'Qisda', - processor: 'BCM2835' - }, - '000d': { - type: 'B', - revision: '2.0', - memory: 512, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '000e': { - type: 'B', - revision: '2.0', - memory: 512, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '000f': { - type: 'B', - revision: '2.0', - memory: 512, - manufacturer: 'Egoman', - processor: 'BCM2835' - }, - '0010': { - type: 'B+', - revision: '1.2', - memory: 512, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0011': { - type: 'CM1', - revision: '1.0', - memory: 512, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0012': { - type: 'A+', - revision: '1.1', - memory: 256, - manufacturer: 'Sony UK', - processor: 'BCM2835' - }, - '0013': { - type: 'B+', - revision: '1.2', - memory: 512, - manufacturer: 'Embest', - processor: 'BCM2835' - }, - '0014': { - type: 'CM1', - revision: '1.0', - memory: 512, - manufacturer: 'Embest', - processor: 'BCM2835' - }, - '0015': { - type: 'A+', - revision: '1.1', - memory: 256, - manufacturer: '512MB Embest', - processor: 'BCM2835' - } -}; - -const processorList = [ - 'BCM2835', - 'BCM2836', - 'BCM2837', - 'BCM2711', - 'BCM2712', -]; -const manufacturerList = [ - 'Sony UK', - 'Egoman', - 'Embest', - 'Sony Japan', - 'Embest', - 'Stadium' -]; -const typeList = { - '00': 'A', - '01': 'B', - '02': 'A+', - '03': 'B+', - '04': '2B', - '05': 'Alpha (early prototype)', - '06': 'CM1', - '08': '3B', - '09': 'Zero', - '0a': 'CM3', - '0c': 'Zero W', - '0d': '3B+', - '0e': '3A+', - '0f': 'Internal use only', - '10': 'CM3+', - '11': '4B', - '12': 'Zero 2 W', - '13': '400', - '14': 'CM4', - '15': 'CM4S', - '16': 'Internal use only', - '17': '5', - '18': 'CM5', - '19': '500', - '1a': 'CM5 Lite', -}; -const revisionCode = getValue(lines, 'revision', ':', true); -const model = getValue(lines, 'model:', ':', true); -const serial = getValue(lines, 'serial', ':', true); - -let result = {}; -if ({}.hasOwnProperty.call(oldRevisionCodes, revisionCode)) { - // old revision codes - result = { - model, - serial, - revisionCode, - memory: oldRevisionCodes[revisionCode].memory, - manufacturer: oldRevisionCodes[revisionCode].manufacturer, - processor: oldRevisionCodes[revisionCode].processor, - type: oldRevisionCodes[revisionCode].type, - revision: oldRevisionCodes[revisionCode].revision, + // https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md + + const oldRevisionCodes = { + '0002': { + type: 'B', + revision: '1.0', + memory: 256, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0003': { + type: 'B', + revision: '1.0', + memory: 256, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0004': { + type: 'B', + revision: '2.0', + memory: 256, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0005': { + type: 'B', + revision: '2.0', + memory: 256, + manufacturer: 'Qisda', + processor: 'BCM2835' + }, + '0006': { + type: 'B', + revision: '2.0', + memory: 256, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0007': { + type: 'A', + revision: '2.0', + memory: 256, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0008': { + type: 'A', + revision: '2.0', + memory: 256, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0009': { + type: 'A', + revision: '2.0', + memory: 256, + manufacturer: 'Qisda', + processor: 'BCM2835' + }, + '000d': { + type: 'B', + revision: '2.0', + memory: 512, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '000e': { + type: 'B', + revision: '2.0', + memory: 512, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '000f': { + type: 'B', + revision: '2.0', + memory: 512, + manufacturer: 'Egoman', + processor: 'BCM2835' + }, + '0010': { + type: 'B+', + revision: '1.2', + memory: 512, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0011': { + type: 'CM1', + revision: '1.0', + memory: 512, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0012': { + type: 'A+', + revision: '1.1', + memory: 256, + manufacturer: 'Sony UK', + processor: 'BCM2835' + }, + '0013': { + type: 'B+', + revision: '1.2', + memory: 512, + manufacturer: 'Embest', + processor: 'BCM2835' + }, + '0014': { + type: 'CM1', + revision: '1.0', + memory: 512, + manufacturer: 'Embest', + processor: 'BCM2835' + }, + '0015': { + type: 'A+', + revision: '1.1', + memory: 256, + manufacturer: '512MB Embest', + processor: 'BCM2835' + } }; -} else { - // new revision code - const revision = ('00000000' + getValue(lines, 'revision', ':', true).toLowerCase()).substr(-8); - const memSizeCode = parseInt(hex2bin(revision.substr(2, 1)).substr(5, 3), 2) || 0; - const manufacturer = manufacturerList[parseInt(revision.substr(3, 1), 10)]; - const processor = processorList[parseInt(revision.substr(4, 1), 10)]; - const typeCode = revision.substr(5, 2); - - - result = { - model, - serial, - revisionCode, - memory: 256 * Math.pow(2, memSizeCode), - manufacturer, - processor, - type: {}.hasOwnProperty.call(typeList, typeCode) ? typeList[typeCode] : '', - revision: '1.' + revision.substr(7, 1), + const processorList = [ + 'BCM2835', + 'BCM2836', + 'BCM2837', + 'BCM2711', + 'BCM2712', + ]; + const manufacturerList = [ + 'Sony UK', + 'Egoman', + 'Embest', + 'Sony Japan', + 'Embest', + 'Stadium' + ]; + const typeList = { + '00': 'A', + '01': 'B', + '02': 'A+', + '03': 'B+', + '04': '2B', + '05': 'Alpha (early prototype)', + '06': 'CM1', + '08': '3B', + '09': 'Zero', + '0a': 'CM3', + '0c': 'Zero W', + '0d': '3B+', + '0e': '3A+', + '0f': 'Internal use only', + '10': 'CM3+', + '11': '4B', + '12': 'Zero 2 W', + '13': '400', + '14': 'CM4', + '15': 'CM4S', + '16': 'Internal use only', + '17': '5', + '18': 'CM5', + '19': '500', + '1a': 'CM5 Lite', }; -} -return result; + + const revisionCode = getValue(lines, 'revision', ':', true); + const model = getValue(lines, 'model:', ':', true); + const serial = getValue(lines, 'serial', ':', true); + + let result = {}; + if ({}.hasOwnProperty.call(oldRevisionCodes, revisionCode)) { + // old revision codes + result = { + model, + serial, + revisionCode, + memory: oldRevisionCodes[revisionCode].memory, + manufacturer: oldRevisionCodes[revisionCode].manufacturer, + processor: oldRevisionCodes[revisionCode].processor, + type: oldRevisionCodes[revisionCode].type, + revision: oldRevisionCodes[revisionCode].revision, + }; + + } else { + // new revision code + const revision = ('00000000' + getValue(lines, 'revision', ':', true).toLowerCase()).substr(-8); + const memSizeCode = parseInt(hex2bin(revision.substr(2, 1)).substr(5, 3), 2) || 0; + const manufacturer = manufacturerList[parseInt(revision.substr(3, 1), 10)]; + const processor = processorList[parseInt(revision.substr(4, 1), 10)]; + const typeCode = revision.substr(5, 2); + + + result = { + model, + serial, + revisionCode, + memory: 256 * Math.pow(2, memSizeCode), + manufacturer, + processor, + type: {}.hasOwnProperty.call(typeList, typeCode) ? typeList[typeCode] : '', + revision: '1.' + revision.substr(7, 1), + }; + } + return result; } function getRpiGpu() { From 92caee038d33dd43834b10c8c3bd703a6aff49bb Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 16:14:07 +0100 Subject: [PATCH 106/123] memory(), chassis() optimized for raspberry --- lib/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util.js b/lib/util.js index 6c7a4bf0..10e513fe 100644 --- a/lib/util.js +++ b/lib/util.js @@ -649,7 +649,7 @@ function isRaspberry(cpuinfo) { ]; if (_rpi_cpuinfo !== null) { cpuinfo = _rpi_cpuinfo; - } else if (cpuinfo === null) { + } else if (cpuinfo === undefined) { try { cpuinfo = fs.readFileSync('/proc/cpuinfo', { encoding: 'utf8' }).toString().split('\n'); _rpi_cpuinfo = cpuinfo; @@ -882,7 +882,7 @@ function decodePiCpuinfo(lines) { if (_rpi_cpuinfo === null) { _rpi_cpuinfo = lines; - } else if (lines === null) { + } else if (lines === undefined) { lines = _rpi_cpuinfo; } From 1c16056f29866176b08ca401a741fd82b922ea8a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 16:22:32 +0100 Subject: [PATCH 107/123] baseboard(), memLayout() improved for raspberry --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e58e0ac9..f50b3a27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.7 | 2025-01-09 | `baseboard()`, `memLayout()` improved for Raspberry PI | | 5.25.6 | 2025-01-08 | `system()` raspberry PI detection improved | | 5.25.5 | 2025-01-07 | `shell()` detect powerShell (windows) | | 5.25.4 | 2025-01-06 | `versions()` improved powerShell parsing (windows) | diff --git a/docs/history.html b/docs/history.html index d45ba24e..5af7632b 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.7 + 2024-01-09 + baseboard(), memLayout() improved for Raspberry PI + 5.25.6 2024-01-08 diff --git a/docs/index.html b/docs/index.html index 7bac7f58..a2edb91f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.6
    + 3
    New Version: 5.25.7
    From a2b0906e025841517155ceb0169b1cbe50c1ab56 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 16:22:42 +0100 Subject: [PATCH 108/123] 5.25.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 87157236..025afb3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.6", + "version": "5.25.7", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From a06c23ae2ce3d758545b3d5f5a1cafb7695aebb8 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 16:25:06 +0100 Subject: [PATCH 109/123] graphics() improved for Raspberry PI --- lib/graphics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/graphics.js b/lib/graphics.js index 39c01164..3a520cc8 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -733,8 +733,8 @@ function graphics(callback) { } if (_linux) { // Raspberry: https://elinux.org/RPI_vcgencmd_usage - if (util.isRaspberry() && util.isRaspbian()) { - let cmd = 'fbset -s | grep \'mode "\'; vcgencmd get_mem gpu; tvservice -s; tvservice -n;'; + if (util.isRaspberry()) { + let cmd = 'fbset -s 2> /dev/null | grep \'mode "\' ; vcgencmd get_mem gpu 2> /dev/null; tvservice -s 2> /dev/null; tvservice -n 2> /dev/null;'; exec(cmd, function (error, stdout) { let lines = stdout.toString().split('\n'); if (lines.length > 3 && lines[0].indexOf('mode "') >= -1 && lines[2].indexOf('0x12000a') > -1) { From d5a28d5f1f14ab515562232565e576244bfeabf5 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 16:30:21 +0100 Subject: [PATCH 110/123] graphics() improved for Raspberry PI --- lib/graphics.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/graphics.js b/lib/graphics.js index 3a520cc8..4c04df35 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -759,7 +759,7 @@ function graphics(callback) { }); } } - if (lines.length > 1 && stdout.toString().indexOf('gpu=') >= -1) { + if (lines.length >= 1 && stdout.toString().indexOf('gpu=') >= -1) { result.controllers.push({ vendor: 'Broadcom', model: util.getRpiGpu(), From fca17e1bd341003e86d6ca06649185d4844416ed Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 16:32:09 +0100 Subject: [PATCH 111/123] graphics() improved for Raspberry PI --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f50b3a27..aa020b34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.8 | 2025-01-09 | `graphics()` improved for Raspberry PI | | 5.25.7 | 2025-01-09 | `baseboard()`, `memLayout()` improved for Raspberry PI | | 5.25.6 | 2025-01-08 | `system()` raspberry PI detection improved | | 5.25.5 | 2025-01-07 | `shell()` detect powerShell (windows) | diff --git a/docs/history.html b/docs/history.html index 5af7632b..242069ce 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.8 + 2024-01-09 + graphics() improved for Raspberry PI + 5.25.7 2024-01-09 diff --git a/docs/index.html b/docs/index.html index a2edb91f..74169f31 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.7
    + 3
    New Version: 5.25.8
    From e6f4fd889914cd75b46dfeb692701bdbe76a088e Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 9 Jan 2025 16:32:14 +0100 Subject: [PATCH 112/123] 5.25.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 025afb3d..b8ba222f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.7", + "version": "5.25.8", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 153d584cf3cd8dc67ce81acc45ea634f9dbb8226 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 10 Jan 2025 06:22:39 +0100 Subject: [PATCH 113/123] memLayout() improvement Raspberry PI 5 --- CHANGELOG.md | 1 + README.md | 21 --------------------- docs/history.html | 5 +++++ docs/index.html | 6 +++--- lib/memory.js | 6 ++++-- lib/util.js | 10 ++++++---- 6 files changed, 19 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa020b34..cc4ca5c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.9 | 2025-01-10 | `memLayout()` improvement Raspberry PI 5 | | 5.25.8 | 2025-01-09 | `graphics()` improved for Raspberry PI | | 5.25.7 | 2025-01-09 | `baseboard()`, `memLayout()` improved for Raspberry PI | | 5.25.6 | 2025-01-08 | `system()` raspberry PI detection improved | diff --git a/README.md b/README.md index 6472ff15..0f8c1155 100644 --- a/README.md +++ b/README.md @@ -30,27 +30,6 @@ ## The Systeminformation Project -``` - .''. - .''. . *''* :_\/_: - :_\/_: _\(/_ .:.*_\/_* : /\ : - .''.: /\ : ./)\ ':'* /\ * : '..'. - :_\/_:'.:::. ' *''* * '.\'/.' _\(/_ - : /\ : ::::: *_\/_* -= o =- /)\ - '..' ':::' * /\ * .'/.\'. ' - *..* : - * - * /.\ * * . * - . /..'\ . . * . - */'.'\* . . . * * - * /.''.'\ * . . . * - . */.'.'.\* -.........".""""/'.''.'.\""."."........"."."....................... - ^^^[_]^^^* -``` - -I wish you all a Merry Christmas and a peaceful New Year 2025. - This is amazing. Started as a small project just for myself, it now has > 17,000 lines of code, > 650 versions published, up to 8 mio downloads per month, > 330 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who diff --git a/docs/history.html b/docs/history.html index 242069ce..18ffd067 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.9 + 2024-01-10 + memLayout() improvements Raspberry PI 5 + 5.25.8 2024-01-09 diff --git a/docs/index.html b/docs/index.html index 74169f31..2c1c9ea3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.8
    + 3
    New Version: 5.25.9
    @@ -204,7 +204,7 @@
    -
    18,440
    +
    18,452
    Lines of code
    @@ -212,7 +212,7 @@
    Downloads last month
    -
    793
    +
    795
    Dependents
    diff --git a/lib/memory.js b/lib/memory.js index e02687e4..f7eb84d0 100644 --- a/lib/memory.js +++ b/lib/memory.js @@ -409,10 +409,12 @@ function memLayout(callback) { '0': 400, '1': 450, '2': 450, - '3': 3200 + '3': 3200, + '4': 4267 }; result[0].type = 'LPDDR2'; - result[0].type = version && version[2] && version[2] === '3' ? 'LPDDR4' : result[0].type; + result[0].type = version && version[2] && (version[2] === '3') ? 'LPDDR4' : result[0].type; + result[0].type = version && version[2] && (version[2] === '4') ? 'LPDDR4X' : result[0].type; result[0].ecc = false; result[0].clockSpeed = version && version[2] && clockSpeed[version[2]] || 400; result[0].clockSpeed = version && version[4] && version[4] === 'd' ? 500 : result[0].clockSpeed; diff --git a/lib/util.js b/lib/util.js index 10e513fe..d1cc412d 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1094,9 +1094,11 @@ function decodePiCpuinfo(lines) { return result; } -function getRpiGpu() { - let cpuinfo = null; - if (_rpi_cpuinfo !== null) { +function getRpiGpu(cpuinfo) { + + if (_rpi_cpuinfo === null && cpuinfo !== undefined) { + _rpi_cpuinfo = cpuinfo; + } else if (cpuinfo === undefined && _rpi_cpuinfo !== null) { cpuinfo = _rpi_cpuinfo; } else { try { @@ -1109,7 +1111,7 @@ function getRpiGpu() { const rpi = decodePiCpuinfo(cpuinfo); if (rpi.type === '4B' || rpi.type === 'CM4' || rpi.type === 'CM4S' || rpi.type === '400') { return 'VideoCore VI'; } - if (rpi.type === '5') { return 'VideoCore VII'; } + if (rpi.type === '5' || rpi.type === '500') { return 'VideoCore VII'; } return 'VideoCore IV'; } From 36379825c3041f9ddbddaf7354d734e34587fdaf Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 10 Jan 2025 06:24:48 +0100 Subject: [PATCH 114/123] 5.25.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8ba222f..0b87e953 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.8", + "version": "5.25.9", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From e8deda9fd336c23780861d0718fad3741b28fdea Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 10 Jan 2025 21:50:34 +0100 Subject: [PATCH 115/123] graphics() raspberry ubuntu displays --- README.md | 6 +++--- lib/graphics.js | 56 ++++++++++++++++++++++++++----------------------- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 0f8c1155..7bc423b5 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,9 @@ add new features and support more platforms. Thank you in advance! ## Node.js ✅, Bun ✅ and Deno ✅ -I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There is -currently only one problem on Denos side: os.freemem() pollyfill is currently -not correct (version 2.1.4) but there is already a fix (not yet published). +I tested this library with Node.js, Bun and Deno (V2.x) with no issues. There +was only one problem on Denos side in version <= 2.1.4: os.freemem() pollyfill +was not correct but this is now fixed with Deno >= 2.1.5. **Attention**: This library is supposed to be used as a backend/server-side library and **will definitely not work within a browser**. diff --git a/lib/graphics.js b/lib/graphics.js index 4c04df35..e93d3c55 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -768,51 +768,55 @@ function graphics(callback) { vramDynamic: true }); } - if (callback) { - callback(result); - } - resolve(result); + // if (callback) { + // callback(result); + // } + // resolve(result); }); - } else { - let cmd = 'lspci -vvv 2>/dev/null'; - exec(cmd, function (error, stdout) { - if (!error) { - let lines = stdout.toString().split('\n'); + } + // } else { + let cmd = 'lspci -vvv 2>/dev/null'; + exec(cmd, function (error, stdout) { + if (!error) { + let lines = stdout.toString().split('\n'); + if (result.controllers.length === 0) { result.controllers = parseLinesLinuxControllers(lines); + const nvidiaData = nvidiaDevices(); // needs to be rewritten ... using no spread operators result.controllers = result.controllers.map((controller) => { // match by busAddress return mergeControllerNvidia(controller, nvidiaData.find((contr) => contr.pciBus.toLowerCase().endsWith(controller.busAddress.toLowerCase())) || {}); }); } - let cmd = 'clinfo --raw'; + } + let cmd = 'clinfo --raw'; + exec(cmd, function (error, stdout) { + if (!error) { + let lines = stdout.toString().split('\n'); + result.controllers = parseLinesLinuxClinfo(result.controllers, lines); + } + let cmd = 'xdpyinfo 2>/dev/null | grep \'depth of root window\' | awk \'{ print $5 }\''; exec(cmd, function (error, stdout) { + let depth = 0; if (!error) { let lines = stdout.toString().split('\n'); - result.controllers = parseLinesLinuxClinfo(result.controllers, lines); + depth = parseInt(lines[0]) || 0; } - let cmd = 'xdpyinfo 2>/dev/null | grep \'depth of root window\' | awk \'{ print $5 }\''; + let cmd = 'xrandr --verbose 2>/dev/null'; exec(cmd, function (error, stdout) { - let depth = 0; if (!error) { let lines = stdout.toString().split('\n'); - depth = parseInt(lines[0]) || 0; + result.displays = parseLinesLinuxDisplays(lines, depth); } - let cmd = 'xrandr --verbose 2>/dev/null'; - exec(cmd, function (error, stdout) { - if (!error) { - let lines = stdout.toString().split('\n'); - result.displays = parseLinesLinuxDisplays(lines, depth); - } - if (callback) { - callback(result); - } - resolve(result); - }); + if (callback) { + callback(result); + } + resolve(result); }); }); }); - } + }); + // } } if (_freebsd || _openbsd || _netbsd) { if (callback) { callback(null); } From 3ce04281396dddfc4635ee3152bb643e5207ab7a Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 11 Jan 2025 06:28:28 +0100 Subject: [PATCH 116/123] graphics() raspberry ubuntu displays --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc4ca5c4..83c8e467 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.10 | 2025-01-10 | `graphics()` improvement Raspberry Ubuntu | | 5.25.9 | 2025-01-10 | `memLayout()` improvement Raspberry PI 5 | | 5.25.8 | 2025-01-09 | `graphics()` improved for Raspberry PI | | 5.25.7 | 2025-01-09 | `baseboard()`, `memLayout()` improved for Raspberry PI | diff --git a/docs/history.html b/docs/history.html index 18ffd067..b71dd92e 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.10 + 2024-01-10 + graphics() improvements Raspberry Ubuntu + 5.25.9 2024-01-10 diff --git a/docs/index.html b/docs/index.html index 2c1c9ea3..20b4d4d3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.9
    + 3
    New Version: 5.25.10
    @@ -212,7 +212,7 @@
    Downloads last month
    -
    795
    +
    796
    Dependents
    From 7b8ae2dd199639d517ca13cd72f34a5768ce8d10 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 11 Jan 2025 06:28:34 +0100 Subject: [PATCH 117/123] 5.25.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0b87e953..1abceb4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.9", + "version": "5.25.10", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 15951d002d22d3d00338e214031ba80ebece7455 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 12 Jan 2025 14:02:07 +0100 Subject: [PATCH 118/123] updated docs --- CHANGELOG.md | 1 + README.md | 5 +++++ docs/history.html | 5 +++++ docs/index.html | 6 +++--- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83c8e467..cbd0e382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.25.11 | 2025-01-11 | `docs` updated | | 5.25.10 | 2025-01-10 | `graphics()` improvement Raspberry Ubuntu | | 5.25.9 | 2025-01-10 | `memLayout()` improvement Raspberry PI 5 | | 5.25.8 | 2025-01-09 | `graphics()` improved for Raspberry PI | diff --git a/README.md b/README.md index 7bc423b5..2e475ef7 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,11 @@ lines of code, > 650 versions published, up to 8 mio downloads per month, > 330 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who contributed to this project! +> **Upcoming Version 6** +> +> With a lot of new features, improvements and a cleaned up API where will also +> be some breaking changes. We will release the first beta soon. + ## Please support this project ... ☕️ Over the past few years I spent **more than 3.000 hours** working on this diff --git a/docs/history.html b/docs/history.html index b71dd92e..f4972cf8 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

    Full version history

    + + 5.25.11 + 2024-01-11 + docs updated docs + 5.25.10 2024-01-10 diff --git a/docs/index.html b/docs/index.html index 20b4d4d3..0e9c5883 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    - 3
    New Version: 5.25.10
    + 3
    New Version: 5.25.11
    @@ -187,7 +187,7 @@
    Overview
    Node.js system information package. Lightweight collection of 50+ functions to retrieve detailed hardware, system and OS information. For Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support. Dependency free. Works with Node.js, Bun and Deno
    -
    #1 NPM ranking for backend packages
    +
    Version 6 will arrive soon with a lot of new features but also some breaking changes (more consistent API)
    NPM Version no dependencies @@ -212,7 +212,7 @@
    Downloads last month
    -
    796
    +
    797
    Dependents
    From 2fa4e4f2d8e451d025d7bcf83948870a060ccda7 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 12 Jan 2025 14:02:12 +0100 Subject: [PATCH 119/123] 5.25.11 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1abceb4c..15e08e25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.25.10", + "version": "5.25.11", "description": "Advanced, lightweight system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)", From 22f6046197ebf309a6278b041e302dc2d97c96b5 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 12 Jan 2025 14:13:54 +0100 Subject: [PATCH 120/123] updated docs --- docs/index.html | 2 +- docs/styles.css | 13 +++++++++++++ docs/styles.css.map | 2 +- docs/styles.scss | 12 ++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/index.html b/docs/index.html index 0e9c5883..ce89e2d3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -187,7 +187,7 @@
    Overview
    Node.js system information package. Lightweight collection of 50+ functions to retrieve detailed hardware, system and OS information. For Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support. Dependency free. Works with Node.js, Bun and Deno
    -
    Version 6 will arrive soon with a lot of new features but also some breaking changes (more consistent API)
    +
    NPM Version no dependencies diff --git a/docs/styles.css b/docs/styles.css index 354a7a43..59137d76 100644 --- a/docs/styles.css +++ b/docs/styles.css @@ -22,11 +22,24 @@ h4 { font-weight: 500; } +.banner { + background-color: rgb(242, 244, 246) !important; + padding: 10px 20px; + margin-bottom: 10px; + text-align: center; + font-size: 1.2rem; +} + .warning { font-weight: 500; color: rgb(156, 1, 1); } +.success { + font-weight: 500; + color: rgb(1, 156, 1); +} + .larger { margin-top: 10px; font-size: 1.5rem !important; diff --git a/docs/styles.css.map b/docs/styles.css.map index 8e37ca78..84ee1b96 100644 --- a/docs/styles.css.map +++ b/docs/styles.css.map @@ -1 +1 @@ -{"version":3,"sources":["styles.scss","styles.css"],"names":[],"mappings":"AAAA;EACE,oHAAA;EACA,iCAAA;EACA,gBAAA;EACA,gBAAA;ACCF;;ADCA;;;;EAIE,oHAAA;EACA,gBAAA;EACA,uBAAA;ACEF;;ADAA;EACE,kBAAA;ACGF;;ADDA;EACE,gBAAA;ACIF;;ADFA;EACE,gBAAA;EACA,qBAAA;ACKF;;ADHA;EACE,gBAAA;EACA,4BAAA;ACMF;;ADJA;EACE,gBAAA;ACOF;;ADLA;EACE,uBAAA;ACQF;;ADLA;EACE,oCAAA;EACA,oBAAA;ACQF;;ADNA;EACE,yBAAA,EAAA,+CAAA;EACA,2DAAA,EAAA,mCAAA;EACA,uCAAA;EACA,2BAAA;EACA,4BAAA;EACA,sBAAA;EAEA,8BAAA;EACA,2BAAA;EACA,yBAAA;EACA,cAAA;EAUA,aAAA;EACA,aAAA;EACA,uBAAA;EACA,kBAAA;EACA,sBAAA;EACA,sBAAA;ACDF;ADZE;EAbF;IAcI,iBAAA;ECeF;AACF;ADbE;EAjBF;IAkBI,kBAAA;ECgBF;AACF;ADRE;EACE,kBAAA;EACA,kBAAA;EACA,aAAA;EACA,uBAAA;EACA,sBAAA;EACA,mBAAA;EACA,YAAA;EACA,gBAAA;EACA,kBAAA;EACA,sBAAA;ACUJ;ADRE;EACE,kBAAA;EACA,SAAA;EACA,UAAA;EACA,mBAAA;EACA,WAAA;EACA,qBAAA;EACA,YAAA;EACA,kBAAA;EACA,iBAAA;EACA,YAAA;EACA,wBAAA;EACA,4BAAA;EACA,iBAAA;ACUJ;ADTI;EAdF;IAeI,eAAA;ECYJ;AACF;ADXI;EAjBF;IAkBI,iBAAA;IACA,SAAA;IACA,mBAAA;IACA,YAAA;ECcJ;AACF;ADbI;EAvBF;IAwBI,YAAA;IACA,SAAA;IACA,UAAA;IACA,mBAAA;IACA,iBAAA;ECgBJ;AACF;ADfI;EACE,qBAAA;ACiBN;ADdE;EACE,WAAA;EACA,iBAAA;EACA,iBAAA;EACA,mBAAA;EACA,gBAAA;ACgBJ;ADfI;EANF;IAOI,iBAAA;ECkBJ;AACF;ADjBI;EATF;IAUI,iBAAA;ECoBJ;AACF;ADnBI;EAZF;IAaI,iBAAA;ECsBJ;AACF;ADrBI;EAfF;IAgBI,eAAA;ECwBJ;AACF;ADvBI;EAlBF;IAmBI,eAAA;EC0BJ;AACF;ADzBI;EArBF;IAsBI,eAAA;EC4BJ;AACF;AD1BE;EACE,YAAA;AC4BJ;AD3BI;EAFF;IAGI,YAAA;EC8BJ;AACF;AD7BI;EALF;IAMI,YAAA;ECgCJ;AACF;AD/BI;EARF;IASI,YAAA;ECkCJ;AACF;ADjCI;EAXF;IAYI,YAAA;ECoCJ;AACF;ADlCE;EACE,kBAAA;EACA,WAAA;EACA,kBAAA;ACoCJ;ADnCI;EAJF;IAKI,iBAAA;ECsCJ;AACF;ADrCI;EAPF;IAQI,eAAA;ECwCJ;AACF;ADvCI;EAVF;IAWI,iBAAA;EC0CJ;AACF;ADzCI;EAbF;IAcI,iBAAA;EC4CJ;AACF;AD3CI;EAhBF;IAiBI,iBAAA;EC8CJ;AACF;AD7CI;EAnBF;IAoBI,iBAAA;ECgDJ;AACF;AD9CE;EACE,kBAAA;EACA,WAAA;EACA,iBAAA;ACgDJ;AD/CI;EACE,WAAA;EACA,qBAAA;ACiDN;AD/CI;EARF;IASI,iBAAA;ECkDJ;AACF;ADjDI;EAXF;IAYI,eAAA;ECoDJ;AACF;ADnDI;EAdF;IAeI,eAAA;ECsDJ;AACF;ADrDI;EAjBF;IAkBI,iBAAA;ECwDJ;AACF;ADvDI;EApBF;IAqBI,iBAAA;EC0DJ;AACF;ADzDI;EAvBF;IAwBI,iBAAA;EC4DJ;AACF;AD1DE;EACE,kBAAA;EACA,mBAAA;EACA,WAAA;EACA,iBAAA;AC4DJ;AD3DI;EALF;IAMI,iBAAA;EC8DJ;AACF;AD7DI;EARF;IASI,eAAA;ECgEJ;AACF;AD/DI;EAXF;IAYI,iBAAA;ECkEJ;AACF;ADjEI;EAdF;IAeI,iBAAA;ECoEJ;AACF;ADnEI;EAjBF;IAkBI,iBAAA;ECsEJ;AACF;ADpEE;EACE,kBAAA;EACA,WAAA;EACA,iBAAA;EACA,cAAA;EACA,mBAAA;EACA,eAAA;ACsEJ;ADrEI;EACE,eAAA;ACuEN;;ADlEA;EACE,0CAAA;EACA,yBAAA,EAAA,+CAAA;EACA,2DAAA,EAAA,mCAAA;EAGA,sBAAA;EACA,yBAAA;EACA,YAAA;EACA,kBAAA;ACqEF;ADpEE;EACE,WAAA;EACA,gBAAA;ACsEJ;ADpEE;EACE,aAAA;EACA,WAAA;EACA,iBAAA;EACA,iBAAA;EACA,gBAAA;EACA,gBAAA;ACsEJ;ADrEI;EAPF;IAQI,qBAAA;ECwEJ;AACF;ADvEI;EAVF;IAWI,iBAAA;EC0EJ;AACF;ADxEE;EACE,gBAAA;AC0EJ;ADxEI;EACE,WAAA;EACA,gBAAA;EACA,eAAA;AC0EN;ADzEM;EAJF;IAKI,gBAAA;IACA,iBAAA;EC4EN;AACF;AD3EM;EACE,WAAA;EACA,qBAAA;AC6ER;ADzEE;EACE,aAAA;AC2EJ;AD1EI;EAFF;IAGI,qBAAA;EC6EJ;AACF;AD3EE;EACE,qBAAA;AC6EJ;AD5EI;EAFF;IAGI,aAAA;EC+EJ;AACF;;AD5EA;EACE,kBAAA;EACA,WAAA;AC+EF;AD9EE;EACE,iBAAA;ACgFJ;AD/EI;EAFF;IAGI,kBAAA;ECkFJ;AACF;ADjFI;EACE,cAAA;EACA,eAAA;EACA,gBAAA;EACA,WAAA;ACmFN;ADlFM;EALF;IAMI,iBAAA;ECqFN;AACF;ADpFM;EARF;IASI,eAAA;ECuFN;AACF;ADtFM;EAXF;IAYI,eAAA;ECyFN;AACF;ADvFI;EACE,iBAAA;ACyFN;ADtFI;EACE,mBAAA;EACA,wBAAA;ACwFN;ADvFM;EACE,wBAAA;ACyFR;;ADnFE;EACE,kBAAA;EACA,iBAAA;EACA,eAAA;EACA,gBAAA;EACA,uBAAA;ACsFJ;ADrFI;EANF;IAOI,iBAAA;ECwFJ;AACF;ADvFI;EATF;IAUI,gBAAA;IACA,iBAAA;IACA,iBAAA;EC0FJ;AACF;ADzFI;EAdF;IAeI,iBAAA;IACA,eAAA;EC4FJ;AACF;AD1FE;EACE,kBAAA;EACA,iBAAA;EACA,gBAAA;EACA,uBAAA;AC4FJ;AD3FI;EALF;IAMI,iBAAA;EC8FJ;AACF;AD7FI;EARF;IASI,gBAAA;IACA,iBAAA;IACA,iBAAA;ECgGJ;AACF;AD/FI;EAbF;IAcI,iBAAA;IACA,eAAA;ECkGJ;AACF;ADhGE;EACE,kBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;ACkGJ;ADjGI;EALF;IAMI,eAAA;ECoGJ;AACF;ADnGI;EARF;IASI,gBAAA;IACA,iBAAA;ECsGJ;AACF;ADrGI;EAZF;IAaI,iBAAA;ECwGJ;AACF;ADtGE;EACE,kBAAA;ACwGJ;ADtGE;EACE,kBAAA;EACA,iBAAA;ACwGJ;ADvGI;EAHF;IAII,gBAAA;EC0GJ;AACF;ADxGE;EACE,gBAAA;EACA,kBAAA;EACA,sBAAA;AC0GJ;;ADvGA;EACE,kBAAA;AC0GF;ADzGE;;;;;EAKE,kBAAA;AC2GJ;ADzGE;EACE,iBAAA;AC2GJ;ADxGE;EACE,qBAAA;AC0GJ;ADzGI;EACE,qBAAA;EACA,wBAAA;AC2GN;;ADtGE;;;;EAIE,gBAAA;ACyGJ;;ADtGA;EACE,gBAAA;EACA,sBAAA;ACyGF;;ADvGA;EACE,gBAAA;AC0GF;;ADxGA;EACE,gBAAA;EACA,kBAAA;AC2GF;AD1GE;EACE,eAAA;AC4GJ;AD3GI;EAFF;IAGI,iBAAA;EC8GJ;AACF;AD7GI;EALF;IAMI,iBAAA;ECgHJ;AACF;AD9GE;EACE,WAAA;EACA,eAAA;ACgHJ;AD/GI;EAHF;IAII,iBAAA;ECkHJ;AACF;ADjHI;EANF;IAOI,iBAAA;ECoHJ;AACF;;ADjHA;EACE,aAAA;ACoHF;ADnHE;EAFF;IAGI,gBAAA;IACA,qBAAA;ECsHF;AACF;ADrHE;EACE,oBAAA;EACA,WAAA;ACuHJ;ADtHI;EACE,WAAA;EACA,WAAA;EACA,qBAAA;ACwHN;ADvHM;EACE,wBAAA;ACyHR;ADtHI;EACE,iBAAA;EACA,kBAAA;EACA,qBAAA;EACA,uBAAA;ACwHN;ADrHE;EACE,aAAA;ACuHJ;ADrHE;EACE,qBAAA;EACA,SAAA;EACA,UAAA;ACuHJ;ADtHI;EACE,oBAAA;ACwHN;ADvHM;EACE,WAAA;EACA,WAAA;EACA,qBAAA;ACyHR;ADxHQ;EACE,wBAAA;AC0HV;ADvHM;EACE,wBAAA;EACA,gBAAA;ACyHR;;ADpHA;EACE,mEAAA;EACA,mCAAA;EACA,eAAA;EACA,kBAAA;EACA,oBAAA;EACA,gBAAA;EACA,qBAAA;EACA,sBAAA;EACA,SAAA;EACA,cAAA;ACuHF;;ADrHA;EACE,0BAAA;EACA,mEAAA;EACA,mCAAA;EACA,eAAA;EACA,kBAAA;EACA,oBAAA;EACA,gBAAA;EACA,iBAAA;EACA,sBAAA;EACA,WAAA;EACA,gBAAA;ACwHF;;ADrHE;EACE,iCAAA;ACwHJ;ADtHE;EACE,oCAAA;ACwHJ;ADtHE;EACE,gBAAA;EACA,kBAAA;ACwHJ;ADtHE;EACE,uBAAA;ACwHJ;ADvHI;EACE,yBAAA;ACyHN;;ADrHA;EACE,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,kBAAA;ACwHF;ADvHE;EACE,uBAAA;EACA,iBAAA;ACyHJ;ADvHE;EACE,WAAA;ACyHJ;ADxHI;EACE,qBAAA;AC0HN;ADvHE;EACE,WAAA;EACA,iBAAA;ACyHJ","file":"styles.css"} \ No newline at end of file +{"version":3,"sources":["styles.scss","styles.css"],"names":[],"mappings":"AAAA;EACE,oHAAA;EACA,iCAAA;EACA,gBAAA;EACA,gBAAA;ACCF;;ADCA;;;;EAIE,oHAAA;EACA,gBAAA;EACA,uBAAA;ACEF;;ADAA;EACE,kBAAA;ACGF;;ADDA;EACE,gBAAA;ACIF;;ADFA;EACE,+CAAA;EACA,kBAAA;EACA,mBAAA;EACA,kBAAA;EACA,iBAAA;ACKF;;ADFA;EACE,gBAAA;EACA,qBAAA;ACKF;;ADHA;EACE,gBAAA;EACA,qBAAA;ACMF;;ADJA;EACE,gBAAA;EACA,4BAAA;ACOF;;ADLA;EACE,gBAAA;ACQF;;ADNA;EACE,uBAAA;ACSF;;ADNA;EACE,oCAAA;EACA,oBAAA;ACSF;;ADPA;EACE,yBAAA,EAAA,+CAAA;EACA,2DAAA,EAAA,mCAAA;EACA,uCAAA;EACA,2BAAA;EACA,4BAAA;EACA,sBAAA;EAEA,8BAAA;EACA,2BAAA;EACA,yBAAA;EACA,cAAA;EAUA,aAAA;EACA,aAAA;EACA,uBAAA;EACA,kBAAA;EACA,sBAAA;EACA,sBAAA;ACAF;ADbE;EAbF;IAcI,iBAAA;ECgBF;AACF;ADdE;EAjBF;IAkBI,kBAAA;ECiBF;AACF;ADTE;EACE,kBAAA;EACA,kBAAA;EACA,aAAA;EACA,uBAAA;EACA,sBAAA;EACA,mBAAA;EACA,YAAA;EACA,gBAAA;EACA,kBAAA;EACA,sBAAA;ACWJ;ADTE;EACE,kBAAA;EACA,SAAA;EACA,UAAA;EACA,mBAAA;EACA,WAAA;EACA,qBAAA;EACA,YAAA;EACA,kBAAA;EACA,iBAAA;EACA,YAAA;EACA,wBAAA;EACA,4BAAA;EACA,iBAAA;ACWJ;ADVI;EAdF;IAeI,eAAA;ECaJ;AACF;ADZI;EAjBF;IAkBI,iBAAA;IACA,SAAA;IACA,mBAAA;IACA,YAAA;ECeJ;AACF;ADdI;EAvBF;IAwBI,YAAA;IACA,SAAA;IACA,UAAA;IACA,mBAAA;IACA,iBAAA;ECiBJ;AACF;ADhBI;EACE,qBAAA;ACkBN;ADfE;EACE,WAAA;EACA,iBAAA;EACA,iBAAA;EACA,mBAAA;EACA,gBAAA;ACiBJ;ADhBI;EANF;IAOI,iBAAA;ECmBJ;AACF;ADlBI;EATF;IAUI,iBAAA;ECqBJ;AACF;ADpBI;EAZF;IAaI,iBAAA;ECuBJ;AACF;ADtBI;EAfF;IAgBI,eAAA;ECyBJ;AACF;ADxBI;EAlBF;IAmBI,eAAA;EC2BJ;AACF;AD1BI;EArBF;IAsBI,eAAA;EC6BJ;AACF;AD3BE;EACE,YAAA;AC6BJ;AD5BI;EAFF;IAGI,YAAA;EC+BJ;AACF;AD9BI;EALF;IAMI,YAAA;ECiCJ;AACF;ADhCI;EARF;IASI,YAAA;ECmCJ;AACF;ADlCI;EAXF;IAYI,YAAA;ECqCJ;AACF;ADnCE;EACE,kBAAA;EACA,WAAA;EACA,kBAAA;ACqCJ;ADpCI;EAJF;IAKI,iBAAA;ECuCJ;AACF;ADtCI;EAPF;IAQI,eAAA;ECyCJ;AACF;ADxCI;EAVF;IAWI,iBAAA;EC2CJ;AACF;AD1CI;EAbF;IAcI,iBAAA;EC6CJ;AACF;AD5CI;EAhBF;IAiBI,iBAAA;EC+CJ;AACF;AD9CI;EAnBF;IAoBI,iBAAA;ECiDJ;AACF;AD/CE;EACE,kBAAA;EACA,WAAA;EACA,iBAAA;ACiDJ;ADhDI;EACE,WAAA;EACA,qBAAA;ACkDN;ADhDI;EARF;IASI,iBAAA;ECmDJ;AACF;ADlDI;EAXF;IAYI,eAAA;ECqDJ;AACF;ADpDI;EAdF;IAeI,eAAA;ECuDJ;AACF;ADtDI;EAjBF;IAkBI,iBAAA;ECyDJ;AACF;ADxDI;EApBF;IAqBI,iBAAA;EC2DJ;AACF;AD1DI;EAvBF;IAwBI,iBAAA;EC6DJ;AACF;AD3DE;EACE,kBAAA;EACA,mBAAA;EACA,WAAA;EACA,iBAAA;AC6DJ;AD5DI;EALF;IAMI,iBAAA;EC+DJ;AACF;AD9DI;EARF;IASI,eAAA;ECiEJ;AACF;ADhEI;EAXF;IAYI,iBAAA;ECmEJ;AACF;ADlEI;EAdF;IAeI,iBAAA;ECqEJ;AACF;ADpEI;EAjBF;IAkBI,iBAAA;ECuEJ;AACF;ADrEE;EACE,kBAAA;EACA,WAAA;EACA,iBAAA;EACA,cAAA;EACA,mBAAA;EACA,eAAA;ACuEJ;ADtEI;EACE,eAAA;ACwEN;;ADnEA;EACE,0CAAA;EACA,yBAAA,EAAA,+CAAA;EACA,2DAAA,EAAA,mCAAA;EAGA,sBAAA;EACA,yBAAA;EACA,YAAA;EACA,kBAAA;ACsEF;ADrEE;EACE,WAAA;EACA,gBAAA;ACuEJ;ADrEE;EACE,aAAA;EACA,WAAA;EACA,iBAAA;EACA,iBAAA;EACA,gBAAA;EACA,gBAAA;ACuEJ;ADtEI;EAPF;IAQI,qBAAA;ECyEJ;AACF;ADxEI;EAVF;IAWI,iBAAA;EC2EJ;AACF;ADzEE;EACE,gBAAA;AC2EJ;ADzEI;EACE,WAAA;EACA,gBAAA;EACA,eAAA;AC2EN;AD1EM;EAJF;IAKI,gBAAA;IACA,iBAAA;EC6EN;AACF;AD5EM;EACE,WAAA;EACA,qBAAA;AC8ER;AD1EE;EACE,aAAA;AC4EJ;AD3EI;EAFF;IAGI,qBAAA;EC8EJ;AACF;AD5EE;EACE,qBAAA;AC8EJ;AD7EI;EAFF;IAGI,aAAA;ECgFJ;AACF;;AD7EA;EACE,kBAAA;EACA,WAAA;ACgFF;AD/EE;EACE,iBAAA;ACiFJ;ADhFI;EAFF;IAGI,kBAAA;ECmFJ;AACF;ADlFI;EACE,cAAA;EACA,eAAA;EACA,gBAAA;EACA,WAAA;ACoFN;ADnFM;EALF;IAMI,iBAAA;ECsFN;AACF;ADrFM;EARF;IASI,eAAA;ECwFN;AACF;ADvFM;EAXF;IAYI,eAAA;EC0FN;AACF;ADxFI;EACE,iBAAA;AC0FN;ADvFI;EACE,mBAAA;EACA,wBAAA;ACyFN;ADxFM;EACE,wBAAA;AC0FR;;ADpFE;EACE,kBAAA;EACA,iBAAA;EACA,eAAA;EACA,gBAAA;EACA,uBAAA;ACuFJ;ADtFI;EANF;IAOI,iBAAA;ECyFJ;AACF;ADxFI;EATF;IAUI,gBAAA;IACA,iBAAA;IACA,iBAAA;EC2FJ;AACF;AD1FI;EAdF;IAeI,iBAAA;IACA,eAAA;EC6FJ;AACF;AD3FE;EACE,kBAAA;EACA,iBAAA;EACA,gBAAA;EACA,uBAAA;AC6FJ;AD5FI;EALF;IAMI,iBAAA;EC+FJ;AACF;AD9FI;EARF;IASI,gBAAA;IACA,iBAAA;IACA,iBAAA;ECiGJ;AACF;ADhGI;EAbF;IAcI,iBAAA;IACA,eAAA;ECmGJ;AACF;ADjGE;EACE,kBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;ACmGJ;ADlGI;EALF;IAMI,eAAA;ECqGJ;AACF;ADpGI;EARF;IASI,gBAAA;IACA,iBAAA;ECuGJ;AACF;ADtGI;EAZF;IAaI,iBAAA;ECyGJ;AACF;ADvGE;EACE,kBAAA;ACyGJ;ADvGE;EACE,kBAAA;EACA,iBAAA;ACyGJ;ADxGI;EAHF;IAII,gBAAA;EC2GJ;AACF;ADzGE;EACE,gBAAA;EACA,kBAAA;EACA,sBAAA;AC2GJ;;ADxGA;EACE,kBAAA;AC2GF;AD1GE;;;;;EAKE,kBAAA;AC4GJ;AD1GE;EACE,iBAAA;AC4GJ;ADzGE;EACE,qBAAA;AC2GJ;AD1GI;EACE,qBAAA;EACA,wBAAA;AC4GN;;ADvGE;;;;EAIE,gBAAA;AC0GJ;;ADvGA;EACE,gBAAA;EACA,sBAAA;AC0GF;;ADxGA;EACE,gBAAA;AC2GF;;ADzGA;EACE,gBAAA;EACA,kBAAA;AC4GF;AD3GE;EACE,eAAA;AC6GJ;AD5GI;EAFF;IAGI,iBAAA;EC+GJ;AACF;AD9GI;EALF;IAMI,iBAAA;ECiHJ;AACF;AD/GE;EACE,WAAA;EACA,eAAA;ACiHJ;ADhHI;EAHF;IAII,iBAAA;ECmHJ;AACF;ADlHI;EANF;IAOI,iBAAA;ECqHJ;AACF;;ADlHA;EACE,aAAA;ACqHF;ADpHE;EAFF;IAGI,gBAAA;IACA,qBAAA;ECuHF;AACF;ADtHE;EACE,oBAAA;EACA,WAAA;ACwHJ;ADvHI;EACE,WAAA;EACA,WAAA;EACA,qBAAA;ACyHN;ADxHM;EACE,wBAAA;AC0HR;ADvHI;EACE,iBAAA;EACA,kBAAA;EACA,qBAAA;EACA,uBAAA;ACyHN;ADtHE;EACE,aAAA;ACwHJ;ADtHE;EACE,qBAAA;EACA,SAAA;EACA,UAAA;ACwHJ;ADvHI;EACE,oBAAA;ACyHN;ADxHM;EACE,WAAA;EACA,WAAA;EACA,qBAAA;AC0HR;ADzHQ;EACE,wBAAA;AC2HV;ADxHM;EACE,wBAAA;EACA,gBAAA;AC0HR;;ADrHA;EACE,mEAAA;EACA,mCAAA;EACA,eAAA;EACA,kBAAA;EACA,oBAAA;EACA,gBAAA;EACA,qBAAA;EACA,sBAAA;EACA,SAAA;EACA,cAAA;ACwHF;;ADtHA;EACE,0BAAA;EACA,mEAAA;EACA,mCAAA;EACA,eAAA;EACA,kBAAA;EACA,oBAAA;EACA,gBAAA;EACA,iBAAA;EACA,sBAAA;EACA,WAAA;EACA,gBAAA;ACyHF;;ADtHE;EACE,iCAAA;ACyHJ;ADvHE;EACE,oCAAA;ACyHJ;ADvHE;EACE,gBAAA;EACA,kBAAA;ACyHJ;ADvHE;EACE,uBAAA;ACyHJ;ADxHI;EACE,yBAAA;AC0HN;;ADtHA;EACE,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,kBAAA;ACyHF;ADxHE;EACE,uBAAA;EACA,iBAAA;AC0HJ;ADxHE;EACE,WAAA;AC0HJ;ADzHI;EACE,qBAAA;AC2HN;ADxHE;EACE,WAAA;EACA,iBAAA;AC0HJ","file":"styles.css"} \ No newline at end of file diff --git a/docs/styles.scss b/docs/styles.scss index 6921ba5f..df8f7bc0 100644 --- a/docs/styles.scss +++ b/docs/styles.scss @@ -18,10 +18,22 @@ h4 { .bold { font-weight: 500; } +.banner { + background-color: rgb(242, 244, 246) !important; + padding: 10px 20px; + margin-bottom: 10px; + text-align: center; + font-size: 1.2rem; +} + .warning { font-weight: 500; color: rgb(156, 1, 1); } +.success { + font-weight: 500; + color: rgb(1, 156, 1); +} .larger { margin-top: 10px; font-size: 1.5rem !important; From d1dbdcae971652b0bd7ab41bc80abb584c855467 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 12 Jan 2025 18:27:19 +0100 Subject: [PATCH 121/123] updated docs --- README.md | 5 +++-- docs/index.html | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2e475ef7..ac83fe2d 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,9 @@ contributed to this project! > **Upcoming Version 6** > -> With a lot of new features, improvements and a cleaned up API where will also -> be some breaking changes. We will release the first beta soon. +> The upcoming version 6 of this package (written completely in typescript) will +> come with a lot of new features and improvements. I also cleaned up the API so +> there will also be some breaking changes. I will release the first beta soon. ## Please support this project ... ☕️ diff --git a/docs/index.html b/docs/index.html index ce89e2d3..2f002d60 100644 --- a/docs/index.html +++ b/docs/index.html @@ -10,7 +10,7 @@ - + @@ -187,7 +187,7 @@
    Overview
    Node.js system information package. Lightweight collection of 50+ functions to retrieve detailed hardware, system and OS information. For Linux, macOS, partial Windows, FreeBSD, OpenBSD, NetBSD, SunOS and Android support. Dependency free. Works with Node.js, Bun and Deno
    - +
    NPM Version no dependencies From c76402ed1beb862a1fa0f651c21c6b6913a4fc56 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 12 Jan 2025 18:33:25 +0100 Subject: [PATCH 122/123] updated docs --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ac83fe2d..d7c14413 100644 --- a/README.md +++ b/README.md @@ -35,19 +35,19 @@ lines of code, > 650 versions published, up to 8 mio downloads per month, > 330 mio downloads overall. #1 NPM ranking for backend packages. Thank you to all who contributed to this project! -> **Upcoming Version 6** +> **Upcoming Version 6** ⭐️⭐️⭐️ > -> The upcoming version 6 of this package (written completely in typescript) will +> The upcoming version 6 of this package (written completely in TypeScript) will > come with a lot of new features and improvements. I also cleaned up the API so > there will also be some breaking changes. I will release the first beta soon. ## Please support this project ... ☕️ -Over the past few years I spent **more than 3.000 hours** working on this -project and invested in hardware to be able to test on different platforms. +Over the past few years I spent **more than 3.000 hours** working 💻 😓 ☕️ on +this project and invested in hardware to be able to test on different platforms. Currently I am working very hard on the next **new version 6.0** completely rewritten in TypeScript and with a lot of new features. Any support is highly -appreciated - [Buy me a coffee](https://www.buymeacoffee.com/systeminfo). +appreciated - [Buy me a coffee](https://www.buymeacoffee.com/systeminfo)... ☕️ **Your contribution** make it possible for me to keep working on this project, add new features and support more platforms. Thank you in advance! From cdb346f38504c8495269e5816136338011ceeadb Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 13 Jan 2025 11:45:11 +0100 Subject: [PATCH 123/123] updated docs --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d7c14413..e66f1ab5 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,9 @@ was not correct but this is now fixed with Deno >= 2.1.5. **Attention**: This library is supposed to be used as a backend/server-side library and **will definitely not work within a browser**. -## New Version 5.0 +## Current Version 5.0 -The new Version 5 is here - this next major version release 5.0 comes with new +The current Version 5 - this major version release 5.0 - came with new functionality and several improvements and changes (some of them are breaking changes!): @@ -83,9 +83,9 @@ changes!): examples [systeminformation.io][systeminformation-url] - lot of minor improvements -Breaking Changes in version 5: you will see several breaking changes for the -sake of a more consistent API interface and to be future proof. Read the -[detailed version 5 changes][changes5-url]. +Breaking Changes in version 5 (compared to version 4.x): you will see several +breaking changes for the sake of a more consistent API interface and to be +future proof. Read the [detailed version 5 changes][changes5-url]. I did a lot of testing on different platforms and machines but of course there might be some issues that I am not aware of. I would be happy if you inform me