@nordicsemiconductor/pc-nrfconnect-shared 104.0.0 → 106.0.0

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.
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
5
5
  */
6
6
 
7
+ import logger from '../../src/logging';
7
8
  import {
8
9
  DeviceTraits,
9
10
  deviceTraitsToArgs,
@@ -50,6 +51,16 @@ export default async (
50
51
 
51
52
  const onData = (data: HotplugEvent | ListEvent) => {
52
53
  if (isListEvent(data)) {
54
+ data.devices
55
+ .filter(d => !d.serialNumber)
56
+ .forEach(d => {
57
+ logger.warn(
58
+ `Device was skipped as it has no Serial number ${JSON.stringify(
59
+ d
60
+ )}`
61
+ );
62
+ });
63
+
53
64
  onEnumerated(
54
65
  data.devices.filter(
55
66
  d => d.serialNumber
@@ -63,14 +74,18 @@ export default async (
63
74
  return;
64
75
  }
65
76
 
66
- if (
67
- data.event === 'Arrived' &&
68
- data.device &&
69
- data.device.serialNumber
70
- ) {
71
- onHotplugEvent.onDeviceArrived(
72
- data.device as NrfutilDeviceWithSerialnumber
73
- );
77
+ if (data.event === 'Arrived' && data.device) {
78
+ if (data.device.serialNumber) {
79
+ onHotplugEvent.onDeviceArrived(
80
+ data.device as NrfutilDeviceWithSerialnumber
81
+ );
82
+ } else {
83
+ logger.warn(
84
+ `Device was skipped as it has no Serial number ${JSON.stringify(
85
+ data.device
86
+ )}`
87
+ );
88
+ }
74
89
  } else if (data.event === 'Left') {
75
90
  onHotplugEvent.onDeviceLeft(data.id);
76
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/pc-nrfconnect-shared",
3
- "version": "104.0.0",
3
+ "version": "106.0.0",
4
4
  "description": "Shared commodities for developing pc-nrfconnect-* packages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -118,7 +118,8 @@
118
118
  "typescript": "4.9.5",
119
119
  "util": "0.12.5",
120
120
  "uuid": "8.3.2",
121
- "winston": "3.8.2"
121
+ "winston": "3.8.2",
122
+ "xterm-headless": "^5.3.0"
122
123
  },
123
124
  "typings": "./typings/generated/src/index.d.ts",
124
125
  "eslintConfig": {
package/src/App/app.scss CHANGED
@@ -67,7 +67,7 @@
67
67
 
68
68
  .core19-side-panel-container {
69
69
  width: $side-panel-width;
70
- padding: 0 24px;
70
+ padding: 0 10px 0 24px; // 24-14(scrollbar width)=10
71
71
  background-color: $gray-50;
72
72
  height: 100%;
73
73
  margin-left: 0;
@@ -77,7 +77,8 @@
77
77
  margin-left: -$side-panel-width;
78
78
  }
79
79
 
80
- overflow-y: overlay;
80
+ overflow-y: scroll;
81
+
81
82
  @include scrollbars($gray-50);
82
83
  }
83
84
  }
@@ -335,7 +335,9 @@ export const startWatchingDevices =
335
335
  const operation = await NrfutilDeviceLib.list(
336
336
  deviceListing,
337
337
  d => d.forEach(onDeviceArrived),
338
- logger.error,
338
+ error => {
339
+ logger.error(error);
340
+ },
339
341
  { onDeviceArrived, onDeviceLeft }
340
342
  );
341
343