systeminformation 5.23.24 → 5.23.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/system.js +7 -4
  2. package/package.json +1 -1
package/lib/system.js CHANGED
@@ -215,11 +215,14 @@ function system(callback) {
215
215
  exec('ioreg -c IOPlatformExpertDevice -d 2', function (error, stdout) {
216
216
  if (!error) {
217
217
  let lines = stdout.toString().replace(/[<>"]/g, '').split('\n');
218
- const model = util.splitByNumber(util.getValue(lines, 'model', '=', true));
219
- const version = util.getValue(lines, 'version', '=', true);
218
+
219
+ const model = util.getAppleModel(util.getValue(lines, 'model', '=', true));
220
+ // const modelParts = util.splitByNumber(model);
221
+ // const version = util.getValue(lines, 'version', '=', true);
220
222
  result.manufacturer = util.getValue(lines, 'manufacturer', '=', true);
221
- result.model = version ? util.getValue(lines, 'model', '=', true) : model[0];
222
- result.version = version || model[1];
223
+ result.model = model.key;
224
+ result.type = macOsChassisType(model.model);
225
+ result.version = model.version;
223
226
  result.serial = util.getValue(lines, 'ioplatformserialnumber', '=', true);
224
227
  result.uuid = util.getValue(lines, 'ioplatformuuid', '=', true).toLowerCase();
225
228
  result.sku = util.getValue(lines, 'board-id', '=', true) || util.getValue(lines, 'target-sub-type', '=', true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.23.24",
3
+ "version": "5.23.25",
4
4
  "description": "Advanced, lightweight system and OS information library",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",