@nordicsemiconductor/pc-nrfconnect-shared 136.0.0 → 137.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,13 @@ 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
+ ## 137.0.0 - 2023-12-04
11
+
12
+ ### Added
13
+
14
+ - `jprogDeviceSetup` take in aan optional boolean to skip the device setup if
15
+ device is protected. Default remain to show dialog. Apps will need to opt-in
16
+
10
17
  ## 136.0.0 - 2023-12-01
11
18
 
12
19
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/pc-nrfconnect-shared",
3
- "version": "136.0.0",
3
+ "version": "137.0.0",
4
4
  "description": "Shared commodities for developing pc-nrfconnect-* packages",
5
5
  "repository": {
6
6
  "type": "git",
@@ -135,7 +135,8 @@ const firmwareOptions = (
135
135
 
136
136
  export const jprogDeviceSetup = (
137
137
  firmware: JprogEntry[],
138
- needSerialport = false
138
+ needSerialport = false,
139
+ hideDeviceSetupWhenProtected = false
139
140
  ): DeviceSetup => ({
140
141
  supportsProgrammingMode: device =>
141
142
  (needSerialport === !!device.traits.serialPorts || !needSerialport) &&
@@ -176,6 +177,16 @@ export const jprogDeviceSetup = (
176
177
  });
177
178
  }
178
179
 
180
+ if (
181
+ hideDeviceSetupWhenProtected &&
182
+ readbackProtection === 'protected'
183
+ ) {
184
+ return Promise.resolve({
185
+ device,
186
+ validFirmware: true,
187
+ });
188
+ }
189
+
179
190
  return Promise.resolve({
180
191
  device,
181
192
  validFirmware: false,
@@ -1,3 +1,3 @@
1
1
  import { DeviceSetup, JprogEntry } from './deviceSetup';
2
- export declare const jprogDeviceSetup: (firmware: JprogEntry[], needSerialport?: boolean) => DeviceSetup;
2
+ export declare const jprogDeviceSetup: (firmware: JprogEntry[], needSerialport?: boolean, hideDeviceSetupWhenProtected?: boolean) => DeviceSetup;
3
3
  //# sourceMappingURL=jprogOperations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jprogOperations.d.ts","sourceRoot":"","sources":["../../../../src/Device/jprogOperations.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA4HxD,eAAO,MAAM,gBAAgB,aACf,UAAU,EAAE,+BAEvB,WAgDD,CAAC"}
1
+ {"version":3,"file":"jprogOperations.d.ts","sourceRoot":"","sources":["../../../../src/Device/jprogOperations.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA4HxD,eAAO,MAAM,gBAAgB,aACf,UAAU,EAAE,uEAGvB,WA0DD,CAAC"}