@nordicsemiconductor/pc-nrfconnect-shared 117.0.0 → 119.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 +23 -1
- package/coverage/cobertura-coverage.xml +123 -122
- package/ipc/MetaFiles.ts +15 -43
- package/ipc/device.ts +25 -0
- package/ipc/schema/packageJson.ts +69 -0
- package/ipc/schema/parseJson.ts +27 -0
- package/main/index.ts +14 -1
- package/nrfutil/device/list.ts +5 -3
- package/package.json +5 -3
- package/scripts/check-app-properties.ts +20 -52
- package/scripts/{esbuild-renderer.js → esbuild-renderer.ts} +42 -52
- package/scripts/esbuild.ts +79 -0
- package/scripts/nordic-publish.js +28 -26
- package/scripts/nordic-publish.ts +2 -1
- package/scripts/postinstall.ts +5 -5
- package/scripts/prepare-shared-release.ts +1 -1
- package/scripts/release-shared.ts +2 -2
- package/src/Device/deviceInfo/deviceInfo.ts +5 -19
- package/src/utils/appDirs.ts +1 -1
- package/src/utils/packageJson.ts +9 -5
- package/src/utils/usageData.ts +1 -2
- package/tsconfig.json +1 -0
- package/typings/generated/ipc/MetaFiles.d.ts +8 -40
- package/typings/generated/ipc/MetaFiles.d.ts.map +1 -1
- package/typings/generated/ipc/device.d.ts +3 -0
- package/typings/generated/ipc/device.d.ts.map +1 -0
- package/typings/generated/ipc/schema/packageJson.d.ts +267 -0
- package/typings/generated/ipc/schema/packageJson.d.ts.map +1 -0
- package/typings/generated/ipc/schema/parseJson.d.ts +6 -0
- package/typings/generated/ipc/schema/parseJson.d.ts.map +1 -0
- package/typings/generated/main/index.d.ts +2 -1
- package/typings/generated/main/index.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/device.d.ts +1 -1
- package/typings/generated/nrfutil/device/list.d.ts.map +1 -1
- package/typings/generated/nrfutil/sandbox.d.ts +8 -0
- package/typings/generated/nrfutil/sandbox.d.ts.map +1 -1
- package/typings/generated/scripts/check-app-properties.d.ts +6 -0
- package/typings/generated/scripts/check-app-properties.d.ts.map +1 -0
- package/typings/generated/scripts/check-for-typescript.d.ts +3 -0
- package/typings/generated/scripts/check-for-typescript.d.ts.map +1 -0
- package/typings/generated/scripts/esbuild-renderer.d.ts +7 -0
- package/typings/generated/scripts/esbuild-renderer.d.ts.map +1 -0
- package/typings/generated/scripts/esbuild.d.ts +3 -0
- package/typings/generated/scripts/esbuild.d.ts.map +1 -0
- package/typings/generated/scripts/installHusky.d.ts +3 -0
- package/typings/generated/scripts/installHusky.d.ts.map +1 -0
- package/typings/generated/scripts/nordic-publish.d.ts +3 -0
- package/typings/generated/scripts/nordic-publish.d.ts.map +1 -0
- package/typings/generated/scripts/nrfconnect-license.d.ts +3 -0
- package/typings/generated/scripts/nrfconnect-license.d.ts.map +1 -0
- package/typings/generated/scripts/postinstall.d.ts +3 -0
- package/typings/generated/scripts/postinstall.d.ts.map +1 -0
- package/typings/generated/scripts/prepare-shared-release.d.ts +3 -0
- package/typings/generated/scripts/prepare-shared-release.d.ts.map +1 -0
- package/typings/generated/scripts/release-shared.d.ts +30 -0
- package/typings/generated/scripts/release-shared.d.ts.map +1 -0
- package/typings/generated/scripts/release-shared.test.d.ts +2 -0
- package/typings/generated/scripts/release-shared.test.d.ts.map +1 -0
- package/typings/generated/src/Device/deviceInfo/deviceInfo.d.ts +0 -1
- package/typings/generated/src/Device/deviceInfo/deviceInfo.d.ts.map +1 -1
- package/typings/generated/src/utils/packageJson.d.ts +28 -2
- package/typings/generated/src/utils/packageJson.d.ts.map +1 -1
- package/typings/generated/src/utils/usageData.d.ts +8 -3
- package/typings/generated/src/utils/usageData.d.ts.map +1 -1
- package/scripts/esbuild.js +0 -53
package/Changelog.md
CHANGED
|
@@ -7,6 +7,28 @@ 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
|
+
## 119 - 2023-10-13
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Remove default 3000ms timeout from `nrfutil device list`
|
|
15
|
+
|
|
16
|
+
## 118 - 2023-10-13
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Option to configure external React to support legacy apps in the launcher.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- Checking whether the `package.json` contains all required fields is now also
|
|
25
|
+
down before building.
|
|
26
|
+
- Use `zod` for the `package.json` schema for apps. This is used verify that
|
|
27
|
+
apps have the right fields in `package.json` and also generates the right
|
|
28
|
+
TypeScript type for it.
|
|
29
|
+
- `nrfConnectForDesktop.html` is not optional anymore, it must always be
|
|
30
|
+
specified in `package.json`.
|
|
31
|
+
|
|
10
32
|
## 117 - 2023-10-04
|
|
11
33
|
|
|
12
34
|
### Fixed
|
|
@@ -394,7 +416,7 @@ declare module '!!@svgr!*.svg' {
|
|
|
394
416
|
### Steps to upgrade when using this package
|
|
395
417
|
|
|
396
418
|
- Following this step will make the app incompatible with the currently
|
|
397
|
-
released launcher (v4.1.2): Add an `
|
|
419
|
+
released launcher (v4.1.2): Add an `html`-property to package.json. The
|
|
398
420
|
following example will use the index bundled with shared that works with our
|
|
399
421
|
apps, but apps can also make their own instead if needed.
|
|
400
422
|
|
|
@@ -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="
|
|
3
|
+
<coverage lines-valid="3211" lines-covered="1788" line-rate="0.5568" branches-valid="1531" branches-covered="448" branch-rate="0.2926" timestamp="1697204097167" complexity="0" version="0.1">
|
|
4
4
|
<sources>
|
|
5
5
|
<source>/home/vsts/work/1/s</source>
|
|
6
6
|
</sources>
|
|
@@ -932,7 +932,7 @@
|
|
|
932
932
|
</class>
|
|
933
933
|
</classes>
|
|
934
934
|
</package>
|
|
935
|
-
<package name="nrfutil.device" line-rate="0.
|
|
935
|
+
<package name="nrfutil.device" line-rate="0.2446" branch-rate="0">
|
|
936
936
|
<classes>
|
|
937
937
|
<class name="batch.ts" filename="nrfutil/device/batch.ts" line-rate="0.07139999999999999" branch-rate="0">
|
|
938
938
|
<methods>
|
|
@@ -1366,7 +1366,7 @@
|
|
|
1366
1366
|
<line number="40" hits="0" branch="false"/>
|
|
1367
1367
|
</lines>
|
|
1368
1368
|
</class>
|
|
1369
|
-
<class name="list.ts" filename="nrfutil/device/list.ts" line-rate="0.
|
|
1369
|
+
<class name="list.ts" filename="nrfutil/device/list.ts" line-rate="0.1612" branch-rate="0">
|
|
1370
1370
|
<methods>
|
|
1371
1371
|
<method name="(anonymous_2)" hits="0" signature="()V">
|
|
1372
1372
|
<lines>
|
|
@@ -1385,22 +1385,22 @@
|
|
|
1385
1385
|
</method>
|
|
1386
1386
|
<method name="(anonymous_5)" hits="0" signature="()V">
|
|
1387
1387
|
<lines>
|
|
1388
|
-
<line number="
|
|
1388
|
+
<line number="54" hits="0"/>
|
|
1389
1389
|
</lines>
|
|
1390
1390
|
</method>
|
|
1391
1391
|
<method name="(anonymous_6)" hits="0" signature="()V">
|
|
1392
1392
|
<lines>
|
|
1393
|
-
<line number="
|
|
1393
|
+
<line number="57" hits="0"/>
|
|
1394
1394
|
</lines>
|
|
1395
1395
|
</method>
|
|
1396
1396
|
<method name="(anonymous_7)" hits="0" signature="()V">
|
|
1397
1397
|
<lines>
|
|
1398
|
-
<line number="
|
|
1398
|
+
<line number="58" hits="0"/>
|
|
1399
1399
|
</lines>
|
|
1400
1400
|
</method>
|
|
1401
1401
|
<method name="(anonymous_8)" hits="0" signature="()V">
|
|
1402
1402
|
<lines>
|
|
1403
|
-
<line number="
|
|
1403
|
+
<line number="68" hits="0"/>
|
|
1404
1404
|
</lines>
|
|
1405
1405
|
</method>
|
|
1406
1406
|
</methods>
|
|
@@ -1415,26 +1415,27 @@
|
|
|
1415
1415
|
<line number="43" hits="0" branch="false"/>
|
|
1416
1416
|
<line number="45" hits="0" branch="true" condition-coverage="0% (0/1)"/>
|
|
1417
1417
|
<line number="46" hits="0" branch="false"/>
|
|
1418
|
-
<line number="49" hits="0" branch="
|
|
1418
|
+
<line number="49" hits="0" branch="true" condition-coverage="0% (0/1)"/>
|
|
1419
1419
|
<line number="50" hits="0" branch="false"/>
|
|
1420
|
-
<line number="
|
|
1421
|
-
<line number="53" hits="0" branch="true" condition-coverage="0% (0/1)"/>
|
|
1420
|
+
<line number="51" hits="0" branch="false"/>
|
|
1422
1421
|
<line number="54" hits="0" branch="false"/>
|
|
1423
|
-
<line number="55" hits="0" branch="
|
|
1422
|
+
<line number="55" hits="0" branch="true" condition-coverage="0% (0/1)"/>
|
|
1423
|
+
<line number="56" hits="0" branch="false"/>
|
|
1424
1424
|
<line number="57" hits="0" branch="false"/>
|
|
1425
|
-
<line number="
|
|
1425
|
+
<line number="59" hits="0" branch="false"/>
|
|
1426
1426
|
<line number="66" hits="0" branch="false"/>
|
|
1427
|
-
<line number="
|
|
1428
|
-
<line number="
|
|
1429
|
-
<line number="
|
|
1430
|
-
<line number="
|
|
1431
|
-
<line number="
|
|
1432
|
-
<line number="
|
|
1433
|
-
<line number="
|
|
1434
|
-
<line number="
|
|
1435
|
-
<line number="
|
|
1436
|
-
<line number="
|
|
1437
|
-
<line number="
|
|
1427
|
+
<line number="68" hits="0" branch="false"/>
|
|
1428
|
+
<line number="72" hits="0" branch="false"/>
|
|
1429
|
+
<line number="75" hits="0" branch="true" condition-coverage="0% (0/3)"/>
|
|
1430
|
+
<line number="76" hits="0" branch="false"/>
|
|
1431
|
+
<line number="79" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
1432
|
+
<line number="80" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
1433
|
+
<line number="81" hits="0" branch="false"/>
|
|
1434
|
+
<line number="85" hits="0" branch="false"/>
|
|
1435
|
+
<line number="91" hits="0" branch="true" condition-coverage="0% (0/1)"/>
|
|
1436
|
+
<line number="92" hits="0" branch="false"/>
|
|
1437
|
+
<line number="96" hits="0" branch="false"/>
|
|
1438
|
+
<line number="97" hits="0" branch="false"/>
|
|
1438
1439
|
</lines>
|
|
1439
1440
|
</class>
|
|
1440
1441
|
<class name="program.ts" filename="nrfutil/device/program.ts" line-rate="0.2407" branch-rate="0">
|
|
@@ -4816,37 +4817,36 @@
|
|
|
4816
4817
|
<methods>
|
|
4817
4818
|
<method name="(anonymous_9)" hits="56" signature="()V">
|
|
4818
4819
|
<lines>
|
|
4819
|
-
<line number="
|
|
4820
|
+
<line number="219" hits="56"/>
|
|
4820
4821
|
</lines>
|
|
4821
4822
|
</method>
|
|
4822
4823
|
<method name="(anonymous_11)" hits="56" signature="()V">
|
|
4823
4824
|
<lines>
|
|
4824
|
-
<line number="
|
|
4825
|
+
<line number="237" hits="56"/>
|
|
4825
4826
|
</lines>
|
|
4826
4827
|
</method>
|
|
4827
4828
|
<method name="(anonymous_12)" hits="28" signature="()V">
|
|
4828
4829
|
<lines>
|
|
4829
|
-
<line number="
|
|
4830
|
+
<line number="240" hits="28"/>
|
|
4830
4831
|
</lines>
|
|
4831
4832
|
</method>
|
|
4832
4833
|
<method name="(anonymous_13)" hits="28" signature="()V">
|
|
4833
4834
|
<lines>
|
|
4834
|
-
<line number="
|
|
4835
|
+
<line number="247" hits="28"/>
|
|
4835
4836
|
</lines>
|
|
4836
4837
|
</method>
|
|
4837
4838
|
<method name="(anonymous_14)" hits="0" signature="()V">
|
|
4838
4839
|
<lines>
|
|
4839
|
-
<line number="
|
|
4840
|
+
<line number="258" hits="0"/>
|
|
4840
4841
|
</lines>
|
|
4841
4842
|
</method>
|
|
4842
4843
|
<method name="(anonymous_15)" hits="0" signature="()V">
|
|
4843
4844
|
<lines>
|
|
4844
|
-
<line number="
|
|
4845
|
+
<line number="262" hits="0"/>
|
|
4845
4846
|
</lines>
|
|
4846
4847
|
</method>
|
|
4847
4848
|
</methods>
|
|
4848
4849
|
<lines>
|
|
4849
|
-
<line number="34" hits="3" branch="false"/>
|
|
4850
4850
|
<line number="35" hits="3" branch="false"/>
|
|
4851
4851
|
<line number="36" hits="3" branch="false"/>
|
|
4852
4852
|
<line number="37" hits="3" branch="false"/>
|
|
@@ -4855,31 +4855,32 @@
|
|
|
4855
4855
|
<line number="40" hits="3" branch="false"/>
|
|
4856
4856
|
<line number="41" hits="3" branch="false"/>
|
|
4857
4857
|
<line number="42" hits="3" branch="false"/>
|
|
4858
|
-
<line number="
|
|
4859
|
-
<line number="
|
|
4858
|
+
<line number="43" hits="3" branch="false"/>
|
|
4859
|
+
<line number="57" hits="3" branch="false"/>
|
|
4860
|
+
<line number="201" hits="56" branch="false"/>
|
|
4861
|
+
<line number="205" hits="3" branch="false"/>
|
|
4862
|
+
<line number="207" hits="112" branch="true" condition-coverage="83.33333333333334% (5/6)"/>
|
|
4863
|
+
<line number="209" hits="0" branch="false"/>
|
|
4860
4864
|
<line number="219" hits="3" branch="false"/>
|
|
4861
|
-
<line number="
|
|
4862
|
-
<line number="
|
|
4863
|
-
<line number="
|
|
4864
|
-
<line number="
|
|
4865
|
-
<line number="
|
|
4866
|
-
<line number="
|
|
4867
|
-
<line number="
|
|
4868
|
-
<line number="
|
|
4869
|
-
<line number="
|
|
4870
|
-
<line number="
|
|
4871
|
-
<line number="
|
|
4872
|
-
<line number="
|
|
4873
|
-
<line number="
|
|
4874
|
-
<line number="
|
|
4875
|
-
<line number="
|
|
4876
|
-
<line number="
|
|
4877
|
-
<line number="
|
|
4878
|
-
<line number="
|
|
4879
|
-
<line number="
|
|
4880
|
-
<line number="273" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
4881
|
-
<line number="276" hits="3" branch="false"/>
|
|
4882
|
-
<line number="277" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
4865
|
+
<line number="220" hits="56" branch="true" condition-coverage="0% (0/1)"/>
|
|
4866
|
+
<line number="221" hits="0" branch="true" condition-coverage="0% (0/7)"/>
|
|
4867
|
+
<line number="222" hits="0" branch="false"/>
|
|
4868
|
+
<line number="224" hits="0" branch="true" condition-coverage="0% (0/5)"/>
|
|
4869
|
+
<line number="225" hits="0" branch="false"/>
|
|
4870
|
+
<line number="228" hits="56" branch="false"/>
|
|
4871
|
+
<line number="231" hits="56" branch="false"/>
|
|
4872
|
+
<line number="237" hits="28" branch="false"/>
|
|
4873
|
+
<line number="238" hits="56" branch="true" condition-coverage="100% (3/3)"/>
|
|
4874
|
+
<line number="240" hits="3" branch="false"/>
|
|
4875
|
+
<line number="243" hits="28" branch="true" condition-coverage="100% (3/3)"/>
|
|
4876
|
+
<line number="247" hits="28" branch="false"/>
|
|
4877
|
+
<line number="251" hits="28" branch="true" condition-coverage="66.66666666666666% (2/3)"/>
|
|
4878
|
+
<line number="252" hits="0" branch="false"/>
|
|
4879
|
+
<line number="255" hits="28" branch="true" condition-coverage="14.285714285714285% (1/7)"/>
|
|
4880
|
+
<line number="258" hits="3" branch="false"/>
|
|
4881
|
+
<line number="259" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
4882
|
+
<line number="262" hits="3" branch="false"/>
|
|
4883
|
+
<line number="263" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
4883
4884
|
</lines>
|
|
4884
4885
|
</class>
|
|
4885
4886
|
</classes>
|
|
@@ -7402,9 +7403,9 @@
|
|
|
7402
7403
|
</class>
|
|
7403
7404
|
</classes>
|
|
7404
7405
|
</package>
|
|
7405
|
-
<package name="src.utils" line-rate="0.6344" branch-rate="0.
|
|
7406
|
+
<package name="src.utils" line-rate="0.6344" branch-rate="0.17350000000000002">
|
|
7406
7407
|
<classes>
|
|
7407
|
-
<class name="appDirs.ts" filename="src/utils/appDirs.ts" line-rate="0.6153" branch-rate="
|
|
7408
|
+
<class name="appDirs.ts" filename="src/utils/appDirs.ts" line-rate="0.6153" branch-rate="1">
|
|
7408
7409
|
<methods>
|
|
7409
7410
|
<method name="(anonymous_7)" hits="0" signature="()V">
|
|
7410
7411
|
<lines>
|
|
@@ -7438,7 +7439,7 @@
|
|
|
7438
7439
|
<line number="10" hits="13" branch="false"/>
|
|
7439
7440
|
<line number="12" hits="13" branch="false"/>
|
|
7440
7441
|
<line number="19" hits="13" branch="false"/>
|
|
7441
|
-
<line number="20" hits="0" branch="
|
|
7442
|
+
<line number="20" hits="0" branch="false"/>
|
|
7442
7443
|
<line number="21" hits="0" branch="false"/>
|
|
7443
7444
|
<line number="22" hits="0" branch="false"/>
|
|
7444
7445
|
<line number="31" hits="13" branch="false"/>
|
|
@@ -7773,134 +7774,134 @@
|
|
|
7773
7774
|
<methods>
|
|
7774
7775
|
<method name="(anonymous_13)" hits="3" signature="()V">
|
|
7775
7776
|
<lines>
|
|
7776
|
-
<line number="
|
|
7777
|
+
<line number="35" hits="3"/>
|
|
7777
7778
|
</lines>
|
|
7778
7779
|
</method>
|
|
7779
7780
|
<method name="(anonymous_14)" hits="0" signature="()V">
|
|
7780
7781
|
<lines>
|
|
7781
|
-
<line number="
|
|
7782
|
+
<line number="56" hits="0"/>
|
|
7782
7783
|
</lines>
|
|
7783
7784
|
</method>
|
|
7784
7785
|
<method name="(anonymous_15)" hits="0" signature="()V">
|
|
7785
7786
|
<lines>
|
|
7786
|
-
<line number="
|
|
7787
|
+
<line number="74" hits="0"/>
|
|
7787
7788
|
</lines>
|
|
7788
7789
|
</method>
|
|
7789
7790
|
<method name="(anonymous_16)" hits="3" signature="()V">
|
|
7790
7791
|
<lines>
|
|
7791
|
-
<line number="
|
|
7792
|
+
<line number="86" hits="3"/>
|
|
7792
7793
|
</lines>
|
|
7793
7794
|
</method>
|
|
7794
7795
|
<method name="(anonymous_17)" hits="0" signature="()V">
|
|
7795
7796
|
<lines>
|
|
7796
|
-
<line number="
|
|
7797
|
+
<line number="100" hits="0"/>
|
|
7797
7798
|
</lines>
|
|
7798
7799
|
</method>
|
|
7799
7800
|
<method name="(anonymous_18)" hits="0" signature="()V">
|
|
7800
7801
|
<lines>
|
|
7801
|
-
<line number="
|
|
7802
|
+
<line number="111" hits="0"/>
|
|
7802
7803
|
</lines>
|
|
7803
7804
|
</method>
|
|
7804
7805
|
<method name="(anonymous_19)" hits="0" signature="()V">
|
|
7805
7806
|
<lines>
|
|
7806
|
-
<line number="
|
|
7807
|
+
<line number="121" hits="0"/>
|
|
7807
7808
|
</lines>
|
|
7808
7809
|
</method>
|
|
7809
7810
|
<method name="(anonymous_20)" hits="0" signature="()V">
|
|
7810
7811
|
<lines>
|
|
7811
|
-
<line number="
|
|
7812
|
+
<line number="132" hits="0"/>
|
|
7812
7813
|
</lines>
|
|
7813
7814
|
</method>
|
|
7814
7815
|
<method name="(anonymous_21)" hits="0" signature="()V">
|
|
7815
7816
|
<lines>
|
|
7816
|
-
<line number="
|
|
7817
|
+
<line number="143" hits="0"/>
|
|
7817
7818
|
</lines>
|
|
7818
7819
|
</method>
|
|
7819
7820
|
<method name="(anonymous_22)" hits="0" signature="()V">
|
|
7820
7821
|
<lines>
|
|
7821
|
-
<line number="
|
|
7822
|
+
<line number="161" hits="0"/>
|
|
7822
7823
|
</lines>
|
|
7823
7824
|
</method>
|
|
7824
7825
|
<method name="(anonymous_23)" hits="0" signature="()V">
|
|
7825
7826
|
<lines>
|
|
7826
|
-
<line number="
|
|
7827
|
+
<line number="170" hits="0"/>
|
|
7827
7828
|
</lines>
|
|
7828
7829
|
</method>
|
|
7829
7830
|
<method name="(anonymous_24)" hits="0" signature="()V">
|
|
7830
7831
|
<lines>
|
|
7831
|
-
<line number="
|
|
7832
|
+
<line number="177" hits="0"/>
|
|
7832
7833
|
</lines>
|
|
7833
7834
|
</method>
|
|
7834
7835
|
<method name="(anonymous_25)" hits="0" signature="()V">
|
|
7835
7836
|
<lines>
|
|
7836
|
-
<line number="
|
|
7837
|
+
<line number="188" hits="0"/>
|
|
7837
7838
|
</lines>
|
|
7838
7839
|
</method>
|
|
7839
7840
|
<method name="(anonymous_26)" hits="1" signature="()V">
|
|
7840
7841
|
<lines>
|
|
7841
|
-
<line number="
|
|
7842
|
+
<line number="196" hits="1"/>
|
|
7842
7843
|
</lines>
|
|
7843
7844
|
</method>
|
|
7844
7845
|
</methods>
|
|
7845
7846
|
<lines>
|
|
7846
7847
|
<line number="7" hits="4" branch="false"/>
|
|
7847
|
-
<line number="
|
|
7848
|
-
<line number="
|
|
7849
|
-
<line number="
|
|
7850
|
-
<line number="
|
|
7851
|
-
<line number="
|
|
7852
|
-
<line number="
|
|
7853
|
-
<line number="
|
|
7854
|
-
<line number="
|
|
7855
|
-
<line number="
|
|
7856
|
-
<line number="
|
|
7848
|
+
<line number="11" hits="4" branch="false"/>
|
|
7849
|
+
<line number="17" hits="4" branch="false"/>
|
|
7850
|
+
<line number="19" hits="4" branch="false"/>
|
|
7851
|
+
<line number="26" hits="4" branch="false"/>
|
|
7852
|
+
<line number="35" hits="4" branch="false"/>
|
|
7853
|
+
<line number="36" hits="3" branch="true" condition-coverage="50% (1/2)"/>
|
|
7854
|
+
<line number="39" hits="3" branch="false"/>
|
|
7855
|
+
<line number="41" hits="3" branch="true" condition-coverage="100% (1/1)"/>
|
|
7856
|
+
<line number="43" hits="0" branch="false"/>
|
|
7857
|
+
<line number="45" hits="0" branch="false"/>
|
|
7858
|
+
<line number="52" hits="0" branch="false"/>
|
|
7857
7859
|
<line number="53" hits="0" branch="false"/>
|
|
7858
|
-
<line number="
|
|
7860
|
+
<line number="56" hits="0" branch="false"/>
|
|
7859
7861
|
<line number="57" hits="0" branch="false"/>
|
|
7860
|
-
<line number="
|
|
7862
|
+
<line number="61" hits="0" branch="false"/>
|
|
7861
7863
|
<line number="62" hits="0" branch="false"/>
|
|
7862
|
-
<line number="
|
|
7863
|
-
<line number="
|
|
7864
|
-
<line number="
|
|
7864
|
+
<line number="69" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7865
|
+
<line number="74" hits="0" branch="false"/>
|
|
7866
|
+
<line number="76" hits="0" branch="false"/>
|
|
7865
7867
|
<line number="77" hits="0" branch="false"/>
|
|
7866
|
-
<line number="
|
|
7867
|
-
<line number="87" hits="
|
|
7868
|
-
<line number="
|
|
7869
|
-
<line number="
|
|
7870
|
-
<line number="101" hits="
|
|
7871
|
-
<line number="102" hits="0" branch="
|
|
7872
|
-
<line number="103" hits="0" branch="
|
|
7873
|
-
<line number="
|
|
7874
|
-
<line number="112" hits="
|
|
7875
|
-
<line number="113" hits="0" branch="
|
|
7876
|
-
<line number="
|
|
7877
|
-
<line number="122" hits="
|
|
7878
|
-
<line number="123" hits="0" branch="
|
|
7879
|
-
<line number="
|
|
7880
|
-
<line number="133" hits="
|
|
7881
|
-
<line number="134" hits="0" branch="
|
|
7882
|
-
<line number="
|
|
7883
|
-
<line number="144" hits="
|
|
7884
|
-
<line number="
|
|
7885
|
-
<line number="147" hits="0" branch="true" condition-coverage="0% (0/
|
|
7886
|
-
<line number="148" hits="0" branch="
|
|
7887
|
-
<line number="
|
|
7888
|
-
<line number="162" hits="
|
|
7889
|
-
<line number="163" hits="0" branch="
|
|
7890
|
-
<line number="164" hits="0" branch="
|
|
7891
|
-
<line number="
|
|
7868
|
+
<line number="86" hits="4" branch="false"/>
|
|
7869
|
+
<line number="87" hits="3" branch="true" condition-coverage="75% (3/4)"/>
|
|
7870
|
+
<line number="92" hits="3" branch="false"/>
|
|
7871
|
+
<line number="100" hits="4" branch="false"/>
|
|
7872
|
+
<line number="101" hits="0" branch="false"/>
|
|
7873
|
+
<line number="102" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7874
|
+
<line number="103" hits="0" branch="false"/>
|
|
7875
|
+
<line number="111" hits="4" branch="false"/>
|
|
7876
|
+
<line number="112" hits="0" branch="false"/>
|
|
7877
|
+
<line number="113" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7878
|
+
<line number="121" hits="4" branch="false"/>
|
|
7879
|
+
<line number="122" hits="0" branch="false"/>
|
|
7880
|
+
<line number="123" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7881
|
+
<line number="132" hits="4" branch="false"/>
|
|
7882
|
+
<line number="133" hits="0" branch="false"/>
|
|
7883
|
+
<line number="134" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7884
|
+
<line number="143" hits="4" branch="false"/>
|
|
7885
|
+
<line number="144" hits="0" branch="false"/>
|
|
7886
|
+
<line number="146" hits="0" branch="true" condition-coverage="0% (0/3)"/>
|
|
7887
|
+
<line number="147" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7888
|
+
<line number="148" hits="0" branch="false"/>
|
|
7889
|
+
<line number="161" hits="4" branch="false"/>
|
|
7890
|
+
<line number="162" hits="0" branch="false"/>
|
|
7891
|
+
<line number="163" hits="0" branch="true" condition-coverage="0% (0/1)"/>
|
|
7892
|
+
<line number="164" hits="0" branch="false"/>
|
|
7893
|
+
<line number="166" hits="0" branch="false"/>
|
|
7892
7894
|
<line number="167" hits="0" branch="false"/>
|
|
7893
|
-
<line number="
|
|
7894
|
-
<line number="171" hits="
|
|
7895
|
-
<line number="
|
|
7896
|
-
<line number="178" hits="
|
|
7897
|
-
<line number="
|
|
7898
|
-
<line number="189" hits="
|
|
7895
|
+
<line number="170" hits="4" branch="false"/>
|
|
7896
|
+
<line number="171" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7897
|
+
<line number="177" hits="4" branch="false"/>
|
|
7898
|
+
<line number="178" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7899
|
+
<line number="188" hits="4" branch="false"/>
|
|
7900
|
+
<line number="189" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7899
7901
|
<line number="190" hits="0" branch="true" condition-coverage="0% (0/4)"/>
|
|
7900
|
-
<line number="
|
|
7901
|
-
<line number="197" hits="
|
|
7902
|
-
<line number="
|
|
7903
|
-
<line number="201" hits="4" branch="false"/>
|
|
7902
|
+
<line number="196" hits="4" branch="false"/>
|
|
7903
|
+
<line number="197" hits="1" branch="false"/>
|
|
7904
|
+
<line number="200" hits="4" branch="false"/>
|
|
7904
7905
|
</lines>
|
|
7905
7906
|
</class>
|
|
7906
7907
|
<class name="useHotKey.ts" filename="src/utils/useHotKey.ts" line-rate="0.7916" branch-rate="0.6">
|
package/ipc/MetaFiles.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { z } from 'zod';
|
|
8
8
|
|
|
9
9
|
export type UrlString = string;
|
|
10
10
|
|
|
@@ -40,49 +40,21 @@ export interface AppInfo {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
export const semver = z.string().regex(
|
|
44
|
+
// From https://semver.org
|
|
45
|
+
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,
|
|
46
|
+
'Is not a valid string for a semantic version'
|
|
47
|
+
);
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
nrfutil?: NrfutilModules;
|
|
50
|
-
html?: string;
|
|
51
|
-
}
|
|
49
|
+
const nrfutilModuleName = z.string();
|
|
50
|
+
const nrfutilModuleVersion = semver;
|
|
52
51
|
|
|
53
|
-
type
|
|
52
|
+
export type NrfutilModuleName = z.infer<typeof nrfutilModuleName>;
|
|
53
|
+
export type NrfutilModuleVersion = z.infer<typeof nrfutilModuleVersion>;
|
|
54
54
|
|
|
55
|
-
export
|
|
56
|
-
|
|
55
|
+
export const nrfModules = z.record(
|
|
56
|
+
nrfutilModuleName,
|
|
57
|
+
nrfutilModuleVersion.array().nonempty()
|
|
58
|
+
);
|
|
57
59
|
|
|
58
|
-
export
|
|
59
|
-
[name: NrfutilModuleName]: [
|
|
60
|
-
NrfutilModuleVersion,
|
|
61
|
-
...NrfutilModuleVersion[]
|
|
62
|
-
];
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface PackageJson {
|
|
66
|
-
name: string;
|
|
67
|
-
version: SemverString;
|
|
68
|
-
|
|
69
|
-
// Several optional properties
|
|
70
|
-
author?: string;
|
|
71
|
-
bin?: ObjectContainingOptionalStrings | string;
|
|
72
|
-
dependencies?: ObjectContainingOptionalStrings;
|
|
73
|
-
description?: string;
|
|
74
|
-
homepage?: UrlString;
|
|
75
|
-
devDependencies?: ObjectContainingOptionalStrings;
|
|
76
|
-
displayName?: string;
|
|
77
|
-
engines?: ObjectContainingOptionalStrings;
|
|
78
|
-
nrfConnectForDesktop?: NrfConnectForDesktop;
|
|
79
|
-
files?: readonly string[];
|
|
80
|
-
license?: string;
|
|
81
|
-
main?: string;
|
|
82
|
-
peerDependencies?: ObjectContainingOptionalStrings;
|
|
83
|
-
repository?: {
|
|
84
|
-
type: string;
|
|
85
|
-
url: UrlString;
|
|
86
|
-
};
|
|
87
|
-
scripts?: ObjectContainingOptionalStrings;
|
|
88
|
-
}
|
|
60
|
+
export type NrfutilModules = z.infer<typeof nrfModules>;
|
package/ipc/device.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023 Nordic Semiconductor ASA
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const knownDevicePcas = [
|
|
8
|
+
'PCA10028',
|
|
9
|
+
'PCA10031',
|
|
10
|
+
'PCA10040',
|
|
11
|
+
'PCA10056',
|
|
12
|
+
'PCA10059',
|
|
13
|
+
'PCA10090',
|
|
14
|
+
'PCA10095',
|
|
15
|
+
'PCA10100',
|
|
16
|
+
'PCA10121',
|
|
17
|
+
'PCA20020',
|
|
18
|
+
'PCA20035',
|
|
19
|
+
'PCA10143',
|
|
20
|
+
'PCA10152',
|
|
21
|
+
'PCA10153',
|
|
22
|
+
'PCA20049',
|
|
23
|
+
] as const;
|
|
24
|
+
|
|
25
|
+
export type KnownDevicePCA = (typeof knownDevicePcas)[number];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023 Nordic Semiconductor ASA
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
|
|
9
|
+
import { knownDevicePcas } from '../device';
|
|
10
|
+
import { nrfModules, semver } from '../MetaFiles';
|
|
11
|
+
import { parseWithPrettifiedErrorMessage } from './parseJson';
|
|
12
|
+
|
|
13
|
+
const nrfConnectForDesktop = z.object({
|
|
14
|
+
supportedDevices: z.enum(knownDevicePcas).array().nonempty().optional(),
|
|
15
|
+
nrfutil: nrfModules.optional(),
|
|
16
|
+
html: z.string(),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const recordOfOptionalStrings = z.record(z.string().optional());
|
|
20
|
+
|
|
21
|
+
const engines = recordOfOptionalStrings.and(
|
|
22
|
+
z.object({ nrfconnect: z.string() })
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const packageJson = z.object({
|
|
26
|
+
name: z.string(),
|
|
27
|
+
version: semver,
|
|
28
|
+
|
|
29
|
+
author: z.string().optional(),
|
|
30
|
+
bin: z.string().or(recordOfOptionalStrings).optional(),
|
|
31
|
+
dependencies: recordOfOptionalStrings.optional(),
|
|
32
|
+
description: z.string(),
|
|
33
|
+
homepage: z.string().url().optional(),
|
|
34
|
+
devDependencies: recordOfOptionalStrings.optional(),
|
|
35
|
+
displayName: z.string(),
|
|
36
|
+
engines,
|
|
37
|
+
nrfConnectForDesktop,
|
|
38
|
+
files: z.string().array().optional(),
|
|
39
|
+
license: z.string().optional(),
|
|
40
|
+
main: z.string().optional(),
|
|
41
|
+
peerDependencies: recordOfOptionalStrings.optional(),
|
|
42
|
+
repository: z
|
|
43
|
+
.object({
|
|
44
|
+
type: z.string(),
|
|
45
|
+
url: z.string().url(),
|
|
46
|
+
})
|
|
47
|
+
.optional(),
|
|
48
|
+
scripts: recordOfOptionalStrings.optional(),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export type PackageJson = z.infer<typeof packageJson>;
|
|
52
|
+
|
|
53
|
+
export const parsePackageJson =
|
|
54
|
+
parseWithPrettifiedErrorMessage<PackageJson>(packageJson);
|
|
55
|
+
|
|
56
|
+
// In the launcher we want to handle that the whole nrfConnectForDesktop may be missing
|
|
57
|
+
// and the html in it can also be undefined, so there we need to use this legacy variant
|
|
58
|
+
const legacyPackageJson = packageJson.merge(
|
|
59
|
+
z.object({
|
|
60
|
+
nrfConnectForDesktop: nrfConnectForDesktop
|
|
61
|
+
.partial({ html: true })
|
|
62
|
+
.optional(),
|
|
63
|
+
})
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
export type LegacyPackageJson = z.infer<typeof legacyPackageJson>;
|
|
67
|
+
|
|
68
|
+
export const parseLegacyPackageJson =
|
|
69
|
+
parseWithPrettifiedErrorMessage<LegacyPackageJson>(legacyPackageJson);
|