@nordicsemiconductor/pc-nrfconnect-shared 207.0.0 → 209.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.
Files changed (41) hide show
  1. package/Changelog.md +20 -0
  2. package/ipc/{openWindow.ts → open.ts} +29 -1
  3. package/main/index.ts +4 -4
  4. package/nrfutil/device/__mocks__/device.ts +3 -0
  5. package/nrfutil/device/batch.ts +51 -20
  6. package/nrfutil/device/common.ts +6 -1
  7. package/nrfutil/device/device.ts +0 -2
  8. package/nrfutil/device/index.ts +1 -0
  9. package/nrfutil/device/xRead.ts +133 -0
  10. package/package.json +1 -1
  11. package/src/App/App.tsx +2 -2
  12. package/src/index.ts +1 -1
  13. package/src/logging/index.ts +5 -5
  14. package/src/utils/open.ts +4 -41
  15. package/src/utils/systemReport.ts +1 -1
  16. package/typings/generated/ipc/{openWindow.d.ts → open.d.ts} +7 -1
  17. package/typings/generated/ipc/open.d.ts.map +1 -0
  18. package/typings/generated/main/index.d.ts +7 -4
  19. package/typings/generated/main/index.d.ts.map +1 -1
  20. package/typings/generated/nrfutil/device/__mocks__/device.d.ts +3 -0
  21. package/typings/generated/nrfutil/device/__mocks__/device.d.ts.map +1 -1
  22. package/typings/generated/nrfutil/device/batch.d.ts +2 -2
  23. package/typings/generated/nrfutil/device/batch.d.ts.map +1 -1
  24. package/typings/generated/nrfutil/device/common.d.ts +1 -1
  25. package/typings/generated/nrfutil/device/common.d.ts.map +1 -1
  26. package/typings/generated/nrfutil/device/device.d.ts +0 -2
  27. package/typings/generated/nrfutil/device/device.d.ts.map +1 -1
  28. package/typings/generated/nrfutil/device/index.d.ts +1 -0
  29. package/typings/generated/nrfutil/device/index.d.ts.map +1 -1
  30. package/typings/generated/nrfutil/device/xRead.d.ts +20 -0
  31. package/typings/generated/nrfutil/device/xRead.d.ts.map +1 -0
  32. package/typings/generated/src/index.d.ts +1 -1
  33. package/typings/generated/src/index.d.ts.map +1 -1
  34. package/typings/generated/src/logging/index.d.ts +1 -1
  35. package/typings/generated/src/logging/index.d.ts.map +1 -1
  36. package/typings/generated/src/utils/open.d.ts +3 -15
  37. package/typings/generated/src/utils/open.d.ts.map +1 -1
  38. package/nrfutil/device/firmwareRead.ts +0 -34
  39. package/typings/generated/ipc/openWindow.d.ts.map +0 -1
  40. package/typings/generated/nrfutil/device/firmwareRead.d.ts +0 -10
  41. package/typings/generated/nrfutil/device/firmwareRead.d.ts.map +0 -1
package/Changelog.md CHANGED
@@ -7,6 +7,26 @@ 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
+ ## 209.0.0 - 2025-04-30
11
+
12
+ ### Changed
13
+
14
+ - Nrfutil device use of `fw-read` is replaced with `x-read`.
15
+
16
+ ### Steps to upgrade when using this package
17
+
18
+ - Any use of `firmwareRead()` must be replaced with `xRead()`.
19
+
20
+ ## 208.0.0 - 2025-04-17
21
+
22
+ ### Changed
23
+
24
+ - The functions `openFile`, `openFileLocation`, and `openUrl` are now async.
25
+
26
+ ### Steps to upgrade when using this package
27
+
28
+ - In `package.json` bump `engines.nrfconnect` to at least `>=5.2.0`.
29
+
10
30
  ## 207.0.0 - 2025-04-08
11
31
 
12
32
  ### Added
@@ -5,13 +5,17 @@
5
5
  */
6
6
 
7
7
  import type { AppSpec } from './apps';
8
- import { on, send } from './infrastructure/rendererToMain';
8
+ import { handle, invoke, on, send } from './infrastructure/rendererToMain';
9
9
 
10
10
  const channel = {
11
11
  app: 'open:app',
12
12
  launcher: 'open-app-launcher', // It would be nice to call this `open:launcher` but we have to stick to the current name, because that is used by supported apps.
13
+ file: 'open:file',
14
+ url: 'open:url',
15
+ fileLocation: 'open:file-location',
13
16
  };
14
17
 
18
+ // app
15
19
  export const isOpenAppOptionsDeviceSN = (
16
20
  device: OpenAppOptionsDevice
17
21
  ): device is OpenAppOptionsDeviceSN =>
@@ -36,16 +40,40 @@ type OpenApp = (app: AppSpec, openAppOptions?: OpenAppOptions) => void;
36
40
  const openApp = send<OpenApp>(channel.app);
37
41
  const registerOpenApp = on<OpenApp>(channel.app);
38
42
 
43
+ // launcher
39
44
  type OpenLauncher = () => void;
40
45
  const openLauncher = send<OpenLauncher>(channel.launcher);
41
46
  const registerOpenLauncher = on<OpenLauncher>(channel.launcher);
42
47
 
48
+ // file
49
+ // Open a file in the default text application, depending on the user's OS.
50
+ type OpenFile = (filePath: string) => void;
51
+ const openFile = invoke<OpenFile>(channel.file);
52
+ const registerOpenFile = handle<OpenFile>(channel.file);
53
+
54
+ // URL
55
+ // Open a URL in the user's default web browser.
56
+ type OpenUrl = (url: string) => void;
57
+ const openUrl = invoke<OpenUrl>(channel.url);
58
+ const registerOpenUrl = handle<OpenUrl>(channel.url);
59
+
60
+ // file location
61
+ type OpenFileLocation = (filePath: string) => void;
62
+ const openFileLocation = invoke<OpenFileLocation>(channel.fileLocation);
63
+ const registerOpenFileLocation = handle<OpenFileLocation>(channel.fileLocation);
64
+
43
65
  export const forRenderer = {
44
66
  registerOpenApp,
45
67
  registerOpenLauncher,
68
+ registerOpenFile,
69
+ registerOpenUrl,
70
+ registerOpenFileLocation,
46
71
  };
47
72
 
48
73
  export const inMain = {
49
74
  openApp,
50
75
  openLauncher,
76
+ openFile,
77
+ openUrl,
78
+ openFileLocation,
51
79
  };
package/main/index.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  import { forRenderer as forRendererAppDetails } from '../ipc/appDetails';
8
8
  import { forRenderer as forRendererApps } from '../ipc/apps';
9
9
  import { forRenderer as forRendererLauncherConfig } from '../ipc/launcherConfig';
10
- import { forRenderer as forRendererOpenWindow } from '../ipc/openWindow';
10
+ import { forRenderer as forRendererOpen } from '../ipc/open';
11
11
  import { forRenderer as forRendererPreventSleep } from '../ipc/preventSleep';
12
12
  import { forRenderer as forRendererSafeStorage } from '../ipc/safeStorage';
13
13
  import {
@@ -23,7 +23,7 @@ export {
23
23
  export const appDetails = { forRenderer: forRendererAppDetails };
24
24
  export const apps = { forRenderer: forRendererApps };
25
25
  export const launcherConfig = { forRenderer: forRendererLauncherConfig };
26
- export const openWindow = { forRenderer: forRendererOpenWindow };
26
+ export const open = { forRenderer: forRendererOpen };
27
27
  export const preventSleep = { forRenderer: forRendererPreventSleep };
28
28
  export const safeStorage = {
29
29
  forRenderer: forRendererSafeStorage,
@@ -51,8 +51,8 @@ export {
51
51
  } from '../ipc/schema/packageJson';
52
52
 
53
53
  export { type OverwriteOptions } from '../ipc/serialPort';
54
- export type { OpenAppOptions } from '../ipc/openWindow';
54
+ export type { OpenAppOptions } from '../ipc/open';
55
55
  export {
56
56
  isOpenAppOptionsDevicePort,
57
57
  isOpenAppOptionsDeviceSN,
58
- } from '../ipc/openWindow';
58
+ } from '../ipc/open';
@@ -4,6 +4,8 @@
4
4
  * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
5
5
  */
6
6
 
7
+ import xRead from '../xRead';
8
+
7
9
  const program = jest.fn();
8
10
  const programBuffer = jest.fn();
9
11
  const deviceInfo = jest.fn(() => Promise.resolve({}));
@@ -38,6 +40,7 @@ export default {
38
40
  getCoreInfo,
39
41
  list,
40
42
  firmwareRead,
43
+ xRead,
41
44
  onLogging,
42
45
  setLogLevel,
43
46
  setVerboseLogging,
@@ -19,7 +19,6 @@ import {
19
19
  NrfutilDevice,
20
20
  ResetKind,
21
21
  } from './common';
22
- import { DeviceBuffer } from './firmwareRead';
23
22
  import { DeviceCoreInfo } from './getCoreInfo';
24
23
  import { FWInfo } from './getFwInfo';
25
24
  import { GetProtectionStatusResult } from './getProtectionStatus';
@@ -28,6 +27,7 @@ import {
28
27
  ProgrammingOptions,
29
28
  programmingOptionsToArgs,
30
29
  } from './program';
30
+ import { MemoryReadRaw, ReadResult, toIntelHex } from './xRead';
31
31
 
32
32
  type BatchOperationWrapperUnknown = BatchOperationWrapper<unknown>;
33
33
  type CallbacksUnknown = Callbacks<unknown>;
@@ -55,7 +55,9 @@ export class Batch {
55
55
  await box.singleInfoOperationOptionalData<object>(
56
56
  command,
57
57
  undefined,
58
- ['--generate', '--core', core].concat(args)
58
+ ['--generate', ...(core ? ['--core', core] : [])].concat(
59
+ args
60
+ )
59
61
  );
60
62
 
61
63
  return {
@@ -156,25 +158,54 @@ export class Batch {
156
158
  return this;
157
159
  }
158
160
 
159
- public firmwareRead(core: DeviceCore, callbacks?: Callbacks<Buffer>) {
160
- this.enqueueBatchOperationObject('fw-read', core, {
161
- ...callbacks,
162
- onTaskEnd: (taskEnd: TaskEnd<DeviceBuffer>) => {
163
- if (taskEnd.result === 'success' && taskEnd.data) {
164
- const data = Buffer.from(taskEnd.data.buffer, 'base64');
165
- callbacks?.onTaskEnd?.({
166
- ...taskEnd,
167
- task: {
168
- ...taskEnd.task,
161
+ public xRead(
162
+ core: DeviceCore,
163
+ address: number,
164
+ bytes: number,
165
+ width?: 8 | 15 | 32,
166
+ direct?: boolean,
167
+ callbacks?: Callbacks<ReadResult>
168
+ ) {
169
+ const args: string[] = [
170
+ '--address',
171
+ address.toString(),
172
+ '--bytes',
173
+ bytes.toString(),
174
+ ];
175
+
176
+ if (direct) {
177
+ args.push('--direct');
178
+ }
179
+
180
+ if (width) {
181
+ args.push('--width');
182
+ args.push(width.toString());
183
+ }
184
+
185
+ this.enqueueBatchOperationObject(
186
+ 'x-read',
187
+ core,
188
+ {
189
+ ...callbacks,
190
+ onTaskEnd: (taskEnd: TaskEnd<MemoryReadRaw>) => {
191
+ if (taskEnd.result === 'success' && taskEnd.data) {
192
+ const data = toIntelHex(taskEnd.data.memoryData);
193
+
194
+ callbacks?.onTaskEnd?.({
195
+ ...taskEnd,
196
+ task: {
197
+ ...taskEnd.task,
198
+ data,
199
+ },
169
200
  data,
170
- },
171
- data,
172
- });
173
- } else {
174
- callbacks?.onException?.(new Error('Read failed'));
175
- }
176
- },
177
- } as CallbacksUnknown);
201
+ });
202
+ } else {
203
+ callbacks?.onException?.(new Error('Read failed'));
204
+ }
205
+ },
206
+ } as CallbacksUnknown,
207
+ args
208
+ );
178
209
 
179
210
  return this;
180
211
  }
@@ -73,7 +73,12 @@ export type VersionType =
73
73
  | 'NRFDL_VERSION_TYPE_INCREMENTAL'
74
74
  | 'NRFDL_VERSION_TYPE_STRING';
75
75
 
76
- export type DeviceCore = 'Application' | 'Modem' | 'Network';
76
+ export type DeviceCore =
77
+ | 'Application'
78
+ | 'Modem'
79
+ | 'Network'
80
+ | 'Secure'
81
+ | 'FLPR';
77
82
 
78
83
  export interface DeviceTraits {
79
84
  usb?: boolean;
@@ -10,7 +10,6 @@ import { Batch } from './batch';
10
10
  import boardController from './boardController';
11
11
  import deviceInfo from './deviceInfo';
12
12
  import erase from './erase';
13
- import firmwareRead from './firmwareRead';
14
13
  import getBoardControllerConfig from './getBoardControllerConfig';
15
14
  import getBoardControllerVersion from './getBoardControllerVersion';
16
15
  import getCoreInfo from './getCoreInfo';
@@ -57,7 +56,6 @@ export default {
57
56
  setMcuState,
58
57
  getCoreInfo,
59
58
  list,
60
- firmwareRead,
61
59
  onLogging,
62
60
  setLogLevel,
63
61
  setVerboseLogging,
@@ -14,6 +14,7 @@ export type {
14
14
  NrfutilDevice,
15
15
  } from './common';
16
16
 
17
+ export type { ReadResult } from './xRead';
17
18
  export type { DeviceInfo } from './deviceInfo';
18
19
  export type { DeviceCoreInfo } from './getCoreInfo';
19
20
  export type { ImageType } from './getFwInfo';
@@ -0,0 +1,133 @@
1
+ /*
2
+ * Copyright (c) 2023 Nordic Semiconductor ASA
3
+ *
4
+ * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
5
+ */
6
+
7
+ /* eslint-disable no-bitwise */
8
+ import { Progress } from '../sandboxTypes';
9
+ import {
10
+ DeviceCore,
11
+ deviceSingleTaskEndOperation,
12
+ NrfutilDevice,
13
+ } from './common';
14
+
15
+ export interface MemoryData {
16
+ startAddress: string;
17
+ values: number[];
18
+ }
19
+
20
+ export interface MemoryReadRaw {
21
+ name: 'memory-read';
22
+ serialNumber: string;
23
+ memoryData: MemoryData[];
24
+ }
25
+
26
+ export type ReadResult = Awaited<ReturnType<typeof xRead>>;
27
+
28
+ export function toIntelHex(memoryData: MemoryData[]) {
29
+ const sections = memoryData.map(d => ({
30
+ startAddress: Number.parseInt(d.startAddress, 16),
31
+ buffer: Buffer.from(d.values),
32
+ }));
33
+
34
+ const bytesPerLine = 16;
35
+
36
+ const checksum = (bytes: number[]): number => {
37
+ const sum = bytes.reduce((acc, b) => acc + b, 0);
38
+ return (~sum + 1) & 0xff;
39
+ };
40
+
41
+ const formatRecord = (record: number[]) =>
42
+ `:${record
43
+ .map(b => b.toString(16).padStart(2, '0').toUpperCase())
44
+ .join('')}`;
45
+
46
+ const records = sections.flatMap(({ startAddress, buffer }) => {
47
+ const totalLines = Math.ceil(buffer.length / bytesPerLine);
48
+ let currentExtAddr = -1;
49
+
50
+ return Array.from({ length: totalLines }).flatMap((_, i) => {
51
+ const offset = i * bytesPerLine;
52
+ const absoluteAddr = startAddress + offset;
53
+ const extAddr = absoluteAddr >>> 16;
54
+ const addr = absoluteAddr & 0xffff;
55
+ const lineBytes = buffer.subarray(offset, offset + bytesPerLine);
56
+ const recordList: string[] = [];
57
+
58
+ if (extAddr !== currentExtAddr) {
59
+ currentExtAddr = extAddr;
60
+ const extRecord = [
61
+ 0x02,
62
+ 0x00,
63
+ 0x00,
64
+ 0x04,
65
+ (extAddr >> 8) & 0xff,
66
+ extAddr & 0xff,
67
+ ];
68
+ extRecord.push(checksum(extRecord));
69
+ recordList.push(formatRecord(extRecord));
70
+ }
71
+
72
+ const dataRecord = [
73
+ lineBytes.length,
74
+ (addr >> 8) & 0xff,
75
+ addr & 0xff,
76
+ 0x00,
77
+ ...lineBytes,
78
+ ];
79
+ dataRecord.push(checksum(dataRecord));
80
+ recordList.push(formatRecord(dataRecord));
81
+
82
+ return recordList;
83
+ });
84
+ });
85
+
86
+ records.push(':00000001FF');
87
+
88
+ return { intelHex: records.join('\n') };
89
+ }
90
+
91
+ const xRead = async (
92
+ device: NrfutilDevice,
93
+ address: number,
94
+ bytes: number,
95
+ core?: DeviceCore,
96
+ width?: 8 | 15 | 32, // defaults to 32
97
+ direct?: boolean,
98
+ onProgress?: (progress: Progress) => void,
99
+ controller?: AbortController
100
+ ) => {
101
+ const args: string[] = [
102
+ '--address',
103
+ address.toString(),
104
+ '--bytes',
105
+ bytes.toString(),
106
+ ];
107
+
108
+ if (direct) {
109
+ args.push('--direct');
110
+ }
111
+
112
+ if (width) {
113
+ args.push('--width');
114
+ args.push(width.toString());
115
+ }
116
+
117
+ if (core) {
118
+ args.push('--core');
119
+ args.push(core);
120
+ }
121
+
122
+ const result = await deviceSingleTaskEndOperation<MemoryReadRaw>(
123
+ device,
124
+ 'x-read',
125
+ onProgress,
126
+ controller,
127
+ args
128
+ );
129
+
130
+ return toIntelHex(result.memoryData);
131
+ };
132
+
133
+ export default xRead;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordicsemiconductor/pc-nrfconnect-shared",
3
- "version": "207.0.0",
3
+ "version": "209.0.0",
4
4
  "description": "Shared commodities for developing pc-nrfconnect-* packages",
5
5
  "repository": {
6
6
  "type": "git",
package/src/App/App.tsx CHANGED
@@ -12,7 +12,7 @@ import { createRoot } from 'react-dom/client';
12
12
  import { useDispatch, useSelector } from 'react-redux';
13
13
  import { Reducer } from 'redux';
14
14
 
15
- import { inMain as openWindow } from '../../ipc/openWindow';
15
+ import { inMain as open } from '../../ipc/open';
16
16
  import { setNrfutilLogger } from '../../nrfutil/nrfutilLogger';
17
17
  import About from '../About/About';
18
18
  import ConfirmCloseDialog from '../ConfirmBeforeClose/ConfirmCloseDialog';
@@ -105,7 +105,7 @@ const ConnectedApp: FC<ConnectedAppProps> = ({
105
105
  hotKey: 'alt+l',
106
106
  title: 'Open launcher',
107
107
  isGlobal: true,
108
- action: openWindow.openLauncher,
108
+ action: open.openLauncher,
109
109
  });
110
110
 
111
111
  useEffect(() => {
package/src/index.ts CHANGED
@@ -203,6 +203,6 @@ export {
203
203
  type UninstalledDownloadableApp,
204
204
  type WithdrawnApp,
205
205
  } from '../ipc/apps';
206
- export { inMain as openWindow } from '../ipc/openWindow';
206
+ export { inMain as openWindow } from '../ipc/open';
207
207
  export { inMain as preventSleep } from '../ipc/preventSleep';
208
208
  export { inMain as safeStorage } from '../ipc/safeStorage';
@@ -47,7 +47,7 @@ interface SharedLogger extends Logger {
47
47
  initialise: () => void;
48
48
  getAndClearEntries: () => LogEntry[];
49
49
  openLogFile: () => void;
50
- openLogFileLocation: () => void;
50
+ openLogFileLocation: () => Promise<void>;
51
51
  logError: (message: string, error: unknown) => void;
52
52
  }
53
53
 
@@ -86,17 +86,17 @@ logger.initialise = () => {
86
86
 
87
87
  logger.getAndClearEntries = () => logBuffer.clear();
88
88
 
89
- logger.openLogFile = () => {
89
+ logger.openLogFile = async () => {
90
90
  try {
91
- openFile(logFilePath());
91
+ await openFile(logFilePath());
92
92
  } catch (error) {
93
93
  logger.logError('Unable to open the log file', error);
94
94
  }
95
95
  };
96
96
 
97
- logger.openLogFileLocation = () => {
97
+ logger.openLogFileLocation = async () => {
98
98
  try {
99
- openFileLocation(logFilePath());
99
+ await openFileLocation(logFilePath());
100
100
  } catch (error) {
101
101
  logger.logError('Unable to open the log file location', error);
102
102
  }
package/src/utils/open.ts CHANGED
@@ -4,47 +4,10 @@
4
4
  * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
5
5
  */
6
6
 
7
- import childProcess from 'child_process';
8
- import { shell } from 'electron';
9
- import fs from 'fs';
10
- import os from 'os';
7
+ import { inMain as open } from '../../ipc/open';
11
8
 
12
- /**
13
- * Open a file in the default text application, depending on the user's OS.
14
- *
15
- * @param {string} filePath path to the file to open.
16
- * @returns {void}
17
- */
18
- function openFile(filePath: string) {
19
- const exists = fs.existsSync(filePath);
20
- if (!exists) {
21
- throw new Error(`Could not find file at path: ${filePath}`);
22
- }
23
-
24
- const escapedPath = filePath.replace(/ /g, '\\ ');
25
-
26
- // Could not find a method that works on all three platforms:
27
- // * shell.openItem works on Windows and Linux but not on OSX
28
- // * childProcess.execSync works on OSX but not on Windows
29
- if (os.type() === 'Darwin') {
30
- childProcess.execSync(`open ${escapedPath}`);
31
- } else {
32
- shell.openPath(escapedPath);
33
- }
34
- }
35
-
36
- /**
37
- * Open a URL in the user's default web browser.
38
- *
39
- * @param {string} url The URL to open.
40
- * @returns {void}
41
- */
42
- function openUrl(url: string) {
43
- shell.openExternal(url);
44
- }
45
-
46
- function openFileLocation(filePath: string) {
47
- shell.showItemInFolder(filePath);
48
- }
9
+ const openFile = open.openFile;
10
+ const openUrl = open.openUrl;
11
+ const openFileLocation = open.openFileLocation;
49
12
 
50
13
  export { openFile, openUrl, openFileLocation };
@@ -151,7 +151,7 @@ export default async (
151
151
  try {
152
152
  fs.writeFileSync(filePath, report);
153
153
  logger.info(`System report: ${filePath}`);
154
- openFile(filePath);
154
+ await openFile(filePath);
155
155
  } catch (error) {
156
156
  logger.logError('Failed to generate system report', error);
157
157
  }
@@ -16,10 +16,16 @@ type OpenLauncher = () => void;
16
16
  export declare const forRenderer: {
17
17
  registerOpenApp: (handler: OpenApp) => Electron.IpcMain;
18
18
  registerOpenLauncher: (handler: OpenLauncher) => Electron.IpcMain;
19
+ registerOpenFile: (handler: ((filePath: string) => void) | ((filePath: string) => Promise<void>)) => void;
20
+ registerOpenUrl: (handler: ((url: string) => void) | ((url: string) => Promise<void>)) => void;
21
+ registerOpenFileLocation: (handler: ((filePath: string) => void) | ((filePath: string) => Promise<void>)) => void;
19
22
  };
20
23
  export declare const inMain: {
21
24
  openApp: (app: AppSpec, openAppOptions?: OpenAppOptions | undefined) => void;
22
25
  openLauncher: () => void;
26
+ openFile: (filePath: string) => Promise<void>;
27
+ openUrl: (url: string) => Promise<void>;
28
+ openFileLocation: (filePath: string) => Promise<void>;
23
29
  };
24
30
  export {};
25
- //# sourceMappingURL=openWindow.d.ts.map
31
+ //# sourceMappingURL=open.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../ipc/open.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAYtC,eAAO,MAAM,wBAAwB,WACzB,oBAAoB,qCAEiC,CAAC;AAElE,eAAO,MAAM,0BAA0B,WAC3B,oBAAoB,uCAEqC,CAAC;AAEtE,KAAK,sBAAsB,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,KAAK,wBAAwB,GAAG;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,KAAK,oBAAoB,GAAG,sBAAsB,GAAG,wBAAwB,CAAC;AAE9E,MAAM,WAAW,cAAc;IAC3B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED,KAAK,OAAO,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;AAKvE,KAAK,YAAY,GAAG,MAAM,IAAI,CAAC;AAqB/B,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC"}
@@ -24,10 +24,13 @@ export declare const launcherConfig: {
24
24
  registerGetConfig: (config: import("../ipc/launcherConfig").Configuration) => Electron.IpcMain;
25
25
  };
26
26
  };
27
- export declare const openWindow: {
27
+ export declare const open: {
28
28
  forRenderer: {
29
- registerOpenApp: (handler: (app: import("../ipc/apps").AppSpec, openAppOptions?: import("../ipc/openWindow").OpenAppOptions | undefined) => void) => Electron.IpcMain;
29
+ registerOpenApp: (handler: (app: import("../ipc/apps").AppSpec, openAppOptions?: import("../ipc/open").OpenAppOptions | undefined) => void) => Electron.IpcMain;
30
30
  registerOpenLauncher: (handler: () => void) => Electron.IpcMain;
31
+ registerOpenFile: (handler: ((filePath: string) => void) | ((filePath: string) => Promise<void>)) => void;
32
+ registerOpenUrl: (handler: ((url: string) => void) | ((url: string) => Promise<void>)) => void;
33
+ registerOpenFileLocation: (handler: ((filePath: string) => void) | ((filePath: string) => Promise<void>)) => void;
31
34
  };
32
35
  };
33
36
  export declare const preventSleep: {
@@ -65,6 +68,6 @@ export declare const serialPort: {
65
68
  export { sourceJsonSchema, withdrawnJsonSchema, type AppInfo, type NrfutilModuleName, type NrfutilModules, type NrfutilModuleVersion, type SourceJson, type WithdrawnJson, } from '../ipc/MetaFiles';
66
69
  export { type PackageJsonLegacyApp, type PackageJsonApp, parsePackageJsonLegacyApp, parsePackageJsonApp, } from '../ipc/schema/packageJson';
67
70
  export { type OverwriteOptions } from '../ipc/serialPort';
68
- export type { OpenAppOptions } from '../ipc/openWindow';
69
- export { isOpenAppOptionsDevicePort, isOpenAppOptionsDeviceSN, } from '../ipc/openWindow';
71
+ export type { OpenAppOptions } from '../ipc/open';
72
+ export { isOpenAppOptionsDevicePort, isOpenAppOptionsDeviceSN, } from '../ipc/open';
70
73
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../main/index.ts"],"names":[],"mappings":";AAiBA,OAAO,EACH,8BAA8B,EAC9B,4BAA4B,GAC/B,MAAM,sCAAsC,CAAC;AAE9C,eAAO,MAAM,UAAU;;;;CAAyC,CAAC;AACjE,eAAO,MAAM,IAAI;;;;;;;;;;;;;CAAmC,CAAC;AACrD,eAAO,MAAM,cAAc;;;;CAA6C,CAAC;AACzE,eAAO,MAAM,UAAU;;;;;CAAyC,CAAC;AACjE,eAAO,MAAM,YAAY;;;;;CAA2C,CAAC;AACrE,eAAO,MAAM,WAAW;;;;;;CAEvB,CAAC;AACF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;CAGtB,CAAC;AAEF,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,aAAa,GACrB,MAA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15,6 +15,9 @@ declare const _default: {
15
15
  stop: jest.Mock<any, any, any>;
16
16
  }, [], any>;
17
17
  firmwareRead: jest.Mock<any, any, any>;
18
+ xRead: (device: import("..").NrfutilDevice, address: number, bytes: number, core?: import("..").DeviceCore | undefined, width?: 8 | 15 | 32 | undefined, direct?: boolean | undefined, onProgress?: ((progress: import("../..").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<{
19
+ intelHex: string;
20
+ }>;
18
21
  onLogging: jest.Mock<any, any, any>;
19
22
  setLogLevel: jest.Mock<any, any, any>;
20
23
  setVerboseLogging: jest.Mock<any, any, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../../nrfutil/device/__mocks__/device.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA0BA,wBAkBE"}
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../../nrfutil/device/__mocks__/device.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,wBAmBE"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { TaskEnd } from '../sandboxTypes';
3
2
  import { Callbacks } from './batchTypes';
4
3
  import { DeviceCore, DeviceTraits, NrfutilDevice, ResetKind } from './common';
@@ -6,6 +5,7 @@ import { DeviceCoreInfo } from './getCoreInfo';
6
5
  import { FWInfo } from './getFwInfo';
7
6
  import { GetProtectionStatusResult } from './getProtectionStatus';
8
7
  import { FirmwareType, ProgrammingOptions } from './program';
8
+ import { ReadResult } from './xRead';
9
9
  export declare class Batch {
10
10
  private operationBatchGeneration;
11
11
  private collectOperations;
@@ -15,7 +15,7 @@ export declare class Batch {
15
15
  boardController(data: object, callbacks?: Callbacks): this;
16
16
  getBoardControllerConfig(callbacks?: Callbacks): this;
17
17
  getBoardControllerVersion(callbacks?: Callbacks): this;
18
- firmwareRead(core: DeviceCore, callbacks?: Callbacks<Buffer>): this;
18
+ xRead(core: DeviceCore, address: number, bytes: number, width?: 8 | 15 | 32, direct?: boolean, callbacks?: Callbacks<ReadResult>): this;
19
19
  getCoreInfo(core: DeviceCore, callbacks?: Callbacks<DeviceCoreInfo>): this;
20
20
  getFwInfo(core: DeviceCore, callbacks?: Callbacks<FWInfo>): this;
21
21
  getProtectionStatus(core: DeviceCore, callbacks?: Callbacks<GetProtectionStatusResult>): this;
@@ -1 +1 @@
1
- {"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/batch.ts"],"names":[],"mappings":";AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAyB,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACH,UAAU,EACV,YAAY,EAEZ,aAAa,EACb,SAAS,EACZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EACH,YAAY,EACZ,kBAAkB,EAErB,MAAM,WAAW,CAAC;AAKnB,qBAAa,KAAK;IACd,OAAO,CAAC,wBAAwB,CACzB;IAEP,OAAO,CAAC,iBAAiB,CAIhB;IAET,OAAO,CAAC,2BAA2B;IA2B5B,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC;IAU7D,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,SAAS;IAU7C,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS;IAuBnD,wBAAwB,CAAC,SAAS,CAAC,EAAE,SAAS;IAsB9C,yBAAyB,CAAC,SAAS,CAAC,EAAE,SAAS;IAsB/C,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC;IA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AE,SAAS;IAU/C,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,SAAS;IAWhE,OAAO,CACV,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,CAAC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI;IAW7C,GAAG,CACZ,MAAM,EAAE,aAAa,EACrB,UAAU,CAAC,EAAE,eAAe,GAAG,SAAS,GACzC,OAAO,CAAC,OAAO,EAAE,CAAC;CAqGxB"}
@@ -26,7 +26,7 @@ export interface NrfutilDevice {
26
26
  export type DeviceFamily = 'NRF51_FAMILY' | 'NRF52_FAMILY' | 'NRF53_FAMILY' | 'NRF91_FAMILY';
27
27
  export type ProtectionStatus = 'NRFDL_PROTECTION_STATUS_NONE' | 'NRFDL_PROTECTION_STATUS_REGION0' | 'NRFDL_PROTECTION_STATUS_REGION0_REGION1' | 'NRFDL_PROTECTION_STATUS_SECURE_REGIONS' | 'NRFDL_PROTECTION_STATUS_ALL';
28
28
  export type VersionType = 'NRFDL_VERSION_TYPE_SEMANTIC' | 'NRFDL_VERSION_TYPE_INCREMENTAL' | 'NRFDL_VERSION_TYPE_STRING';
29
- export type DeviceCore = 'Application' | 'Modem' | 'Network';
29
+ export type DeviceCore = 'Application' | 'Modem' | 'Network' | 'Secure' | 'FLPR';
30
30
  export interface DeviceTraits {
31
31
  usb?: boolean;
32
32
  nordicUsb?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/common.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,eAAO,MAAM,kBAAkB,WAAY,YAAY,aAatD,CAAC;AAEF,MAAM,MAAM,SAAS,GACf,cAAc,GACd,YAAY,GACZ,aAAa,GACb,WAAW,CAAC;AAElB,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,aAA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ejB,CAAC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { LogLevel, LogMessage } from '../sandboxTypes';
3
2
  import { Batch } from './batch';
4
3
  declare const _default: {
@@ -20,7 +19,6 @@ declare const _default: {
20
19
  isRunning: () => boolean;
21
20
  onClosed: (handler: (error?: Error | undefined) => void) => () => ((error?: Error | undefined) => void)[];
22
21
  }>;
23
- firmwareRead: (device: import("./common").NrfutilDevice, core?: import("./common").DeviceCore | undefined, onProgress?: ((progress: import("..").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<Buffer>;
24
22
  onLogging: (handler: (logging: LogMessage) => void) => Promise<() => ((logging: LogMessage, pid?: number | undefined) => void)[]>;
25
23
  setLogLevel: (level: LogLevel) => Promise<void>;
26
24
  setVerboseLogging: (verbose: boolean) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/device.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuChC,wBAqBE"}
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/device.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsChC,wBAoBE"}
@@ -1,5 +1,6 @@
1
1
  export { default as NrfutilDeviceLib } from './device';
2
2
  export type { DeviceCore, DeviceTraits, ProtectionStatus, SerialPort as DeviceSerialPort, NrfutilDevice, } from './common';
3
+ export type { ReadResult } from './xRead';
3
4
  export type { DeviceInfo } from './deviceInfo';
4
5
  export type { DeviceCoreInfo } from './getCoreInfo';
5
6
  export type { ImageType } from './getFwInfo';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEvD,YAAY,EACR,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,UAAU,IAAI,gBAAgB,EAC9B,aAAa,GAChB,MAAM,UAAU,CAAC;AAElB,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,YAAY,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,YAAY,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEvD,YAAY,EACR,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,UAAU,IAAI,gBAAgB,EAC9B,aAAa,GAChB,MAAM,UAAU,CAAC;AAElB,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,YAAY,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,YAAY,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Progress } from '../sandboxTypes';
2
+ import { DeviceCore, NrfutilDevice } from './common';
3
+ export interface MemoryData {
4
+ startAddress: string;
5
+ values: number[];
6
+ }
7
+ export interface MemoryReadRaw {
8
+ name: 'memory-read';
9
+ serialNumber: string;
10
+ memoryData: MemoryData[];
11
+ }
12
+ export type ReadResult = Awaited<ReturnType<typeof xRead>>;
13
+ export declare function toIntelHex(memoryData: MemoryData[]): {
14
+ intelHex: string;
15
+ };
16
+ declare const xRead: (device: NrfutilDevice, address: number, bytes: number, core?: DeviceCore, width?: 8 | 15 | 32, direct?: boolean, onProgress?: ((progress: Progress) => void) | undefined, controller?: AbortController) => Promise<{
17
+ intelHex: string;
18
+ }>;
19
+ export default xRead;
20
+ //# sourceMappingURL=xRead.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xRead.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/xRead.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACH,UAAU,EAEV,aAAa,EAChB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,UAAU;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,UAAU,EAAE,CAAC;CAC5B;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC;AAE3D,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE;;EA6DlD;AAED,QAAA,MAAM,KAAK,WACC,aAAa,WACZ,MAAM,SACR,MAAM,SACN,UAAU,UACT,CAAC,GAAG,EAAE,GAAG,EAAE,WACV,OAAO,2BACQ,QAAQ,KAAK,IAAI,4BAC5B,eAAe;;EAgC/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -79,7 +79,7 @@ export { shellParser, xTerminalShellParserWrapper, type Callbacks as ShellParser
79
79
  export { addNewMessage, newCopiedFlashMessage, newInfoFlashMessage, newWarningFlashMessage, newErrorFlashMessage, newSuccessFlashMessage, } from './FlashMessage/FlashMessageSlice';
80
80
  export { getSelectedDropdownItem, convertToDropDownItems, convertToNumberDropDownItems, } from './Dropdown/DropdownHelpers';
81
81
  export { inMain as apps, type App as AppType, type AppSpec, type AppWithError, type DownloadableApp, type InstalledDownloadableApp, type LaunchableApp, type LocalApp, type SourceWithError, type UninstalledDownloadableApp, type WithdrawnApp, } from '../ipc/apps';
82
- export { inMain as openWindow } from '../ipc/openWindow';
82
+ export { inMain as openWindow } from '../ipc/open';
83
83
  export { inMain as preventSleep } from '../ipc/preventSleep';
84
84
  export { inMain as safeStorage } from '../ipc/safeStorage';
85
85
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB;;;;;;;;;CAA6B,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EACH,OAAO,IAAI,cAAc,EACzB,KAAK,KAAK,IAAI,mBAAmB,GACpC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACH,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,GACf,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MA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AW,GACnB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,GACzB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACH,uBAAuB,EACvB,sBAAsB,EACtB,4BAA4B,GAC/B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACH,MAAM,IAAI,IAAI,EACd,KAAK,GAAG,IAAI,OAAO,EACnB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,0BAA0B,EAC/B,KAAK,YAAY,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
@@ -3,7 +3,7 @@ interface SharedLogger extends Logger {
3
3
  initialise: () => void;
4
4
  getAndClearEntries: () => LogEntry[];
5
5
  openLogFile: () => void;
6
- openLogFileLocation: () => void;
6
+ openLogFileLocation: () => Promise<void>;
7
7
  logError: (message: string, error: unknown) => void;
8
8
  }
9
9
  declare const logger: SharedLogger;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/logging/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAwB,QAAQ,EAAE,MAAM,EAAc,MAAM,SAAS,CAAC;AAoC7E,UAAU,YAAa,SAAQ,MAAM;IACjC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,kBAAkB,EAAE,MAAM,QAAQ,EAAE,CAAC;IACrC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACvD;AASD,QAAA,MAAM,MAAM,cAeM,CAAC;AAoCnB,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/logging/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAwB,QAAQ,EAAE,MAAM,EAAc,MAAM,SAAS,CAAC;AAoC7E,UAAU,YAAa,SAAQ,MAAM;IACjC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,kBAAkB,EAAE,MAAM,QAAQ,EAAE,CAAC;IACrC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACvD;AASD,QAAA,MAAM,MAAM,cAeM,CAAC;AAoCnB,eAAe,MAAM,CAAC"}
@@ -1,17 +1,5 @@
1
- /**
2
- * Open a file in the default text application, depending on the user's OS.
3
- *
4
- * @param {string} filePath path to the file to open.
5
- * @returns {void}
6
- */
7
- declare function openFile(filePath: string): void;
8
- /**
9
- * Open a URL in the user's default web browser.
10
- *
11
- * @param {string} url The URL to open.
12
- * @returns {void}
13
- */
14
- declare function openUrl(url: string): void;
15
- declare function openFileLocation(filePath: string): void;
1
+ declare const openFile: (filePath: string) => Promise<void>;
2
+ declare const openUrl: (url: string) => Promise<void>;
3
+ declare const openFileLocation: (filePath: string) => Promise<void>;
16
4
  export { openFile, openUrl, openFileLocation };
17
5
  //# sourceMappingURL=open.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../../src/utils/open.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,iBAAS,QAAQ,CAAC,QAAQ,EAAE,MAAM,QAgBjC;AAED;;;;;GAKG;AACH,iBAAS,OAAO,CAAC,GAAG,EAAE,MAAM,QAE3B;AAED,iBAAS,gBAAgB,CAAC,QAAQ,EAAE,MAAM,QAEzC;AAED,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../../src/utils/open.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,QAAQ,qCAAgB,CAAC;AAC/B,QAAA,MAAM,OAAO,gCAAe,CAAC;AAC7B,QAAA,MAAM,gBAAgB,qCAAwB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,34 +0,0 @@
1
- /*
2
- * Copyright (c) 2023 Nordic Semiconductor ASA
3
- *
4
- * SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
5
- */
6
-
7
- import { Progress } from '../sandboxTypes';
8
- import {
9
- DeviceCore,
10
- deviceSingleTaskEndOperation,
11
- NrfutilDevice,
12
- } from './common';
13
-
14
- export interface DeviceBuffer {
15
- serialNumber: string;
16
- buffer: string;
17
- }
18
-
19
- export default async (
20
- device: NrfutilDevice,
21
- core?: DeviceCore,
22
- onProgress?: (progress: Progress) => void,
23
- controller?: AbortController
24
- ) => {
25
- const deviceBuffer = await deviceSingleTaskEndOperation<DeviceBuffer>(
26
- device,
27
- 'fw-read',
28
- onProgress,
29
- controller,
30
- core ? ['--core', core] : []
31
- );
32
-
33
- return Buffer.from(deviceBuffer.buffer, 'base64');
34
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"openWindow.d.ts","sourceRoot":"","sources":["../../../ipc/openWindow.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAQtC,eAAO,MAAM,wBAAwB,WACzB,oBAAoB,qCAEiC,CAAC;AAElE,eAAO,MAAM,0BAA0B,WAC3B,oBAAoB,uCAEqC,CAAC;AAEtE,KAAK,sBAAsB,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,KAAK,wBAAwB,GAAG;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,KAAK,oBAAoB,GAAG,sBAAsB,GAAG,wBAAwB,CAAC;AAE9E,MAAM,WAAW,cAAc;IAC3B,MAAM,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED,KAAK,OAAO,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;AAIvE,KAAK,YAAY,GAAG,MAAM,IAAI,CAAC;AAI/B,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
@@ -1,10 +0,0 @@
1
- /// <reference types="node" />
2
- import { Progress } from '../sandboxTypes';
3
- import { DeviceCore, NrfutilDevice } from './common';
4
- export interface DeviceBuffer {
5
- serialNumber: string;
6
- buffer: string;
7
- }
8
- declare const _default: (device: NrfutilDevice, core?: DeviceCore, onProgress?: ((progress: Progress) => void) | undefined, controller?: AbortController) => Promise<Buffer>;
9
- export default _default;
10
- //# sourceMappingURL=firmwareRead.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"firmwareRead.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/firmwareRead.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACH,UAAU,EAEV,aAAa,EAChB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,YAAY;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB;iCAGW,aAAa,SACd,UAAU,2BACO,QAAQ,KAAK,IAAI,4BAC5B,eAAe;AAJhC,wBAeE"}