@nordicsemiconductor/pc-nrfconnect-shared 104.0.0 → 105.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.
package/Changelog.md CHANGED
@@ -7,6 +7,16 @@ This project does _not_ adhere to
7
7
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
8
8
  every new version is a new major version.
9
9
 
10
+ ## 105 - 2023-09-11
11
+
12
+ ### Added
13
+
14
+ - Log warning for any nrfutil device that was not enumerated
15
+
16
+ ### Fixed
17
+
18
+ - Log device list errors.
19
+
10
20
  ## 104 - 2023-09-08
11
21
 
12
22
  ### Changed
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" ?>
2
2
  <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
3
- <coverage lines-valid="2977" lines-covered="1644" line-rate="0.5522" branches-valid="1436" branches-covered="385" branch-rate="0.2681" timestamp="1694177935893" complexity="0" version="0.1">
3
+ <coverage lines-valid="2984" lines-covered="1645" line-rate="0.5512" branches-valid="1437" branches-covered="385" branch-rate="0.26789999999999997" timestamp="1694455055586" complexity="0" version="0.1">
4
4
  <sources>
5
5
  <source>/home/vsts/work/1/s</source>
6
6
  </sources>
@@ -938,7 +938,7 @@
938
938
  </class>
939
939
  </classes>
940
940
  </package>
941
- <package name="nrfutil.device" line-rate="0.249" branch-rate="0">
941
+ <package name="nrfutil.device" line-rate="0.24719999999999998" branch-rate="0">
942
942
  <classes>
943
943
  <class name="batch.ts" filename="nrfutil/device/batch.ts" line-rate="0.0722" branch-rate="0">
944
944
  <methods>
@@ -1373,57 +1373,73 @@
1373
1373
  </class>
1374
1374
  <class name="list.ts" filename="nrfutil/device/list.ts" line-rate="0.1666" branch-rate="0">
1375
1375
  <methods>
1376
- <method name="(anonymous_1)" hits="0" signature="()V">
1377
- <lines>
1378
- <line number="25" hits="0"/>
1379
- </lines>
1380
- </method>
1381
1376
  <method name="(anonymous_2)" hits="0" signature="()V">
1382
1377
  <lines>
1383
- <line number="28" hits="0"/>
1378
+ <line number="26" hits="0"/>
1384
1379
  </lines>
1385
1380
  </method>
1386
1381
  <method name="(anonymous_3)" hits="0" signature="()V">
1387
1382
  <lines>
1388
- <line number="32" hits="0"/>
1383
+ <line number="29" hits="0"/>
1389
1384
  </lines>
1390
1385
  </method>
1391
1386
  <method name="(anonymous_4)" hits="0" signature="()V">
1392
1387
  <lines>
1393
- <line number="51" hits="0"/>
1388
+ <line number="33" hits="0"/>
1394
1389
  </lines>
1395
1390
  </method>
1396
1391
  <method name="(anonymous_5)" hits="0" signature="()V">
1392
+ <lines>
1393
+ <line number="52" hits="0"/>
1394
+ </lines>
1395
+ </method>
1396
+ <method name="(anonymous_6)" hits="0" signature="()V">
1397
1397
  <lines>
1398
1398
  <line number="55" hits="0"/>
1399
1399
  </lines>
1400
1400
  </method>
1401
+ <method name="(anonymous_7)" hits="0" signature="()V">
1402
+ <lines>
1403
+ <line number="56" hits="0"/>
1404
+ </lines>
1405
+ </method>
1406
+ <method name="(anonymous_8)" hits="0" signature="()V">
1407
+ <lines>
1408
+ <line number="66" hits="0"/>
1409
+ </lines>
1410
+ </method>
1401
1411
  </methods>
1402
1412
  <lines>
1403
- <line number="13" hits="3" branch="false"/>
1404
- <line number="25" hits="3" branch="false"/>
1405
- <line number="26" hits="0" branch="false"/>
1406
- <line number="28" hits="3" branch="false"/>
1407
- <line number="30" hits="0" branch="false"/>
1408
- <line number="32" hits="3" branch="false"/>
1409
- <line number="42" hits="0" branch="false"/>
1410
- <line number="44" hits="0" branch="true" condition-coverage="0% (0/1)"/>
1411
- <line number="45" hits="0" branch="false"/>
1412
- <line number="48" hits="0" branch="false"/>
1413
+ <line number="7" hits="3" branch="false"/>
1414
+ <line number="14" hits="3" branch="false"/>
1415
+ <line number="26" hits="3" branch="false"/>
1416
+ <line number="27" hits="0" branch="false"/>
1417
+ <line number="29" hits="3" branch="false"/>
1418
+ <line number="31" hits="0" branch="false"/>
1419
+ <line number="33" hits="3" branch="false"/>
1420
+ <line number="43" hits="0" branch="false"/>
1421
+ <line number="45" hits="0" branch="true" condition-coverage="0% (0/1)"/>
1422
+ <line number="46" hits="0" branch="false"/>
1413
1423
  <line number="49" hits="0" branch="false"/>
1414
- <line number="51" hits="0" branch="false"/>
1415
- <line number="52" hits="0" branch="true" condition-coverage="0% (0/1)"/>
1416
- <line number="53" hits="0" branch="false"/>
1424
+ <line number="50" hits="0" branch="false"/>
1425
+ <line number="52" hits="0" branch="false"/>
1426
+ <line number="53" hits="0" branch="true" condition-coverage="0% (0/1)"/>
1427
+ <line number="54" hits="0" branch="false"/>
1417
1428
  <line number="55" hits="0" branch="false"/>
1418
- <line number="59" hits="0" branch="false"/>
1419
- <line number="62" hits="0" branch="true" condition-coverage="0% (0/3)"/>
1420
- <line number="63" hits="0" branch="false"/>
1421
- <line number="66" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1422
- <line number="71" hits="0" branch="false"/>
1423
- <line number="74" hits="0" branch="true" condition-coverage="0% (0/1)"/>
1424
- <line number="75" hits="0" branch="false"/>
1429
+ <line number="57" hits="0" branch="false"/>
1430
+ <line number="64" hits="0" branch="false"/>
1431
+ <line number="66" hits="0" branch="false"/>
1432
+ <line number="70" hits="0" branch="false"/>
1433
+ <line number="73" hits="0" branch="true" condition-coverage="0% (0/3)"/>
1434
+ <line number="74" hits="0" branch="false"/>
1435
+ <line number="77" hits="0" branch="true" condition-coverage="0% (0/4)"/>
1436
+ <line number="78" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1425
1437
  <line number="79" hits="0" branch="false"/>
1426
- <line number="80" hits="0" branch="false"/>
1438
+ <line number="83" hits="0" branch="false"/>
1439
+ <line number="89" hits="0" branch="true" condition-coverage="0% (0/1)"/>
1440
+ <line number="90" hits="0" branch="false"/>
1441
+ <line number="94" hits="0" branch="false"/>
1442
+ <line number="95" hits="0" branch="false"/>
1427
1443
  </lines>
1428
1444
  </class>
1429
1445
  <class name="program.ts" filename="nrfutil/device/program.ts" line-rate="0.2452" branch-rate="0">
@@ -2482,7 +2498,7 @@
2482
2498
  </class>
2483
2499
  </classes>
2484
2500
  </package>
2485
- <package name="src.Device" line-rate="0.3714" branch-rate="0.16949999999999998">
2501
+ <package name="src.Device" line-rate="0.37079999999999996" branch-rate="0.16949999999999998">
2486
2502
  <classes>
2487
2503
  <class name="deviceAutoSelectSlice.ts" filename="src/Device/deviceAutoSelectSlice.ts" line-rate="0.6111" branch-rate="0.2857">
2488
2504
  <methods>
@@ -2634,7 +2650,7 @@
2634
2650
  <line number="156" hits="8" branch="false"/>
2635
2651
  </lines>
2636
2652
  </class>
2637
- <class name="deviceLister.ts" filename="src/Device/deviceLister.ts" line-rate="0.3177" branch-rate="0.09699999999999999">
2653
+ <class name="deviceLister.ts" filename="src/Device/deviceLister.ts" line-rate="0.3148" branch-rate="0.09699999999999999">
2638
2654
  <methods>
2639
2655
  <method name="(anonymous_7)" hits="0" signature="()V">
2640
2656
  <lines>
@@ -2726,29 +2742,34 @@
2726
2742
  <line number="337" hits="0"/>
2727
2743
  </lines>
2728
2744
  </method>
2729
- <method name="(anonymous_28)" hits="21" signature="()V">
2745
+ <method name="(anonymous_28)" hits="0" signature="()V">
2730
2746
  <lines>
2731
- <line number="342" hits="21"/>
2747
+ <line number="338" hits="0"/>
2732
2748
  </lines>
2733
2749
  </method>
2734
- <method name="(anonymous_29)" hits="0" signature="()V">
2750
+ <method name="(anonymous_29)" hits="21" signature="()V">
2751
+ <lines>
2752
+ <line number="344" hits="21"/>
2753
+ </lines>
2754
+ </method>
2755
+ <method name="(anonymous_30)" hits="0" signature="()V">
2735
2756
  <lines>
2736
- <line number="343" hits="0"/>
2757
+ <line number="345" hits="0"/>
2737
2758
  </lines>
2738
2759
  </method>
2739
- <method name="(anonymous_30)" hits="1" signature="()V">
2760
+ <method name="(anonymous_31)" hits="1" signature="()V">
2740
2761
  <lines>
2741
- <line number="363" hits="1"/>
2762
+ <line number="365" hits="1"/>
2742
2763
  </lines>
2743
2764
  </method>
2744
- <method name="(anonymous_31)" hits="4" signature="()V">
2765
+ <method name="(anonymous_32)" hits="4" signature="()V">
2745
2766
  <lines>
2746
- <line number="365" hits="4"/>
2767
+ <line number="367" hits="4"/>
2747
2768
  </lines>
2748
2769
  </method>
2749
- <method name="(anonymous_32)" hits="22" signature="()V">
2770
+ <method name="(anonymous_33)" hits="22" signature="()V">
2750
2771
  <lines>
2751
- <line number="369" hits="22"/>
2772
+ <line number="371" hits="22"/>
2752
2773
  </lines>
2753
2774
  </method>
2754
2775
  </methods>
@@ -2843,23 +2864,24 @@
2843
2864
  <line number="334" hits="11" branch="false"/>
2844
2865
  <line number="335" hits="1" branch="false"/>
2845
2866
  <line number="337" hits="0" branch="false"/>
2846
- <line number="342" hits="1" branch="false"/>
2847
- <line number="343" hits="21" branch="false"/>
2848
- <line number="344" hits="0" branch="true" condition-coverage="0% (0/2)"/>
2849
- <line number="348" hits="1" branch="true" condition-coverage="100% (1/1)"/>
2850
- <line number="349" hits="1" branch="false"/>
2851
- <line number="351" hits="1" branch="true" condition-coverage="0% (0/1)"/>
2852
- <line number="353" hits="0" branch="false"/>
2853
- <line number="355" hits="0" branch="true" condition-coverage="0% (0/1)"/>
2854
- <line number="356" hits="0" branch="false"/>
2855
- <line number="358" hits="1" branch="false"/>
2856
- <line number="363" hits="2" branch="false"/>
2857
- <line number="364" hits="1" branch="false"/>
2858
- <line number="365" hits="4" branch="false"/>
2859
- <line number="366" hits="1" branch="true" condition-coverage="50% (1/2)"/>
2860
- <line number="369" hits="11" branch="false"/>
2861
- <line number="370" hits="22" branch="true" condition-coverage="100% (2/2)"/>
2862
- <line number="371" hits="1" branch="true" condition-coverage="100% (2/2)"/>
2867
+ <line number="339" hits="0" branch="false"/>
2868
+ <line number="344" hits="1" branch="false"/>
2869
+ <line number="345" hits="21" branch="false"/>
2870
+ <line number="346" hits="0" branch="true" condition-coverage="0% (0/2)"/>
2871
+ <line number="350" hits="1" branch="true" condition-coverage="100% (1/1)"/>
2872
+ <line number="351" hits="1" branch="false"/>
2873
+ <line number="353" hits="1" branch="true" condition-coverage="0% (0/1)"/>
2874
+ <line number="355" hits="0" branch="false"/>
2875
+ <line number="357" hits="0" branch="true" condition-coverage="0% (0/1)"/>
2876
+ <line number="358" hits="0" branch="false"/>
2877
+ <line number="360" hits="1" branch="false"/>
2878
+ <line number="365" hits="2" branch="false"/>
2879
+ <line number="366" hits="1" branch="false"/>
2880
+ <line number="367" hits="4" branch="false"/>
2881
+ <line number="368" hits="1" branch="true" condition-coverage="50% (1/2)"/>
2882
+ <line number="371" hits="11" branch="false"/>
2883
+ <line number="372" hits="22" branch="true" condition-coverage="100% (2/2)"/>
2884
+ <line number="373" hits="1" branch="true" condition-coverage="100% (2/2)"/>
2863
2885
  </lines>
2864
2886
  </class>
2865
2887
  <class name="deviceSetup.ts" filename="src/Device/deviceSetup.ts" line-rate="0.6933" branch-rate="0.409">
@@ -6872,7 +6894,7 @@
6872
6894
  <line number="96" hits="11" branch="false"/>
6873
6895
  <line number="98" hits="0" branch="true" condition-coverage="0% (0/2)"/>
6874
6896
  <line number="100" hits="0" branch="false"/>
6875
- <line number="103" hits="21" branch="false"/>
6897
+ <line number="103" hits="20" branch="false"/>
6876
6898
  </lines>
6877
6899
  </class>
6878
6900
  <class name="logBuffer.ts" filename="src/logging/logBuffer.ts" line-rate="1" branch-rate="1">
@@ -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": "105.0.0",
4
4
  "description": "Shared commodities for developing pc-nrfconnect-* packages",
5
5
  "repository": {
6
6
  "type": "git",
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
 
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/list.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,YAAY,EAGZ,aAAa,EACb,6BAA6B,EAChC,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,aAAa,EAAE,CAAC;CAC5B;iCAUW,YAAY,0BACI,6BAA6B,EAAE,KAAK,IAAI,mBAC/C,KAAK,KAAK,IAAI;8BAED,6BAA6B,KAAK,IAAI;uBAC7C,MAAM,KAAK,IAAI;;;;;;AAN1C,wBAoDE"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/list.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,YAAY,EAGZ,aAAa,EACb,6BAA6B,EAChC,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,aAAa,EAAE,CAAC;CAC5B;iCAUW,YAAY,0BACI,6BAA6B,EAAE,KAAK,IAAI,mBAC/C,KAAK,KAAK,IAAI;8BAED,6BAA6B,KAAK,IAAI;uBAC7C,MAAM,KAAK,IAAI;;;;;;AAN1C,wBAkEE"}
@@ -1 +1 @@
1
- {"version":3,"file":"deviceLister.d.ts","sourceRoot":"","sources":["../../../../src/Device/deviceLister.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,YAAY,EACZ,aAAa,EAEhB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC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