@microtronics/studio-cli 1.2.0-alpha.3 → 1.2.0-alpha.5
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/dist/main.js +165 -162
- package/dist/studio-cli.d.ts +29 -6
- package/out/api.js +163 -160
- package/out/studio-cli.d.ts +29 -6
- package/package.json +1 -1
package/dist/studio-cli.d.ts
CHANGED
|
@@ -2126,7 +2126,7 @@ export declare const DeviceProfiles: any;
|
|
|
2126
2126
|
* The pair of transports (UTO data + AT debug) needed to talk to a connected device,
|
|
2127
2127
|
* plus a way to release the underlying link.
|
|
2128
2128
|
*/
|
|
2129
|
-
declare interface DeviceTransports {
|
|
2129
|
+
export declare interface DeviceTransports {
|
|
2130
2130
|
uto: ITransport;
|
|
2131
2131
|
/** Absent when the caller asked for the UTO interface only (`needDebug: false`). */
|
|
2132
2132
|
debug?: ITransport;
|
|
@@ -2273,8 +2273,13 @@ export declare class DevSession extends EventEmitter {
|
|
|
2273
2273
|
* can change with a new app, so DEVINFO is re-read before the poller resumes.
|
|
2274
2274
|
*/
|
|
2275
2275
|
flash(file?: string): Promise<UploadResult>;
|
|
2276
|
-
/**
|
|
2276
|
+
/**
|
|
2277
|
+
* Reopen the USB link after a flash. The device is rebooting — and some devices don't even
|
|
2278
|
+
* drop the USB connection — so a failure here is expected and retried for a while rather
|
|
2279
|
+
* than reported immediately; a final failure is logged and leaves `connected: false`.
|
|
2280
|
+
*/
|
|
2277
2281
|
private reconnect;
|
|
2282
|
+
private reportReconnectFailure;
|
|
2278
2283
|
/** Full `OfflineSyncManager` sync, or a targeted pull of the given tags. */
|
|
2279
2284
|
sync(tags?: number[]): Promise<{
|
|
2280
2285
|
tags: number[];
|
|
@@ -2897,7 +2902,8 @@ export declare namespace Log {
|
|
|
2897
2902
|
done = 1,
|
|
2898
2903
|
info = 2,
|
|
2899
2904
|
warning = 3,
|
|
2900
|
-
error = 4
|
|
2905
|
+
error = 4,
|
|
2906
|
+
debug = 5
|
|
2901
2907
|
}
|
|
2902
2908
|
export const LOG_PREFIX: {
|
|
2903
2909
|
1: string;
|
|
@@ -2905,17 +2911,25 @@ export declare namespace Log {
|
|
|
2905
2911
|
2: string;
|
|
2906
2912
|
3: string;
|
|
2907
2913
|
4: string;
|
|
2914
|
+
5: string;
|
|
2908
2915
|
};
|
|
2909
2916
|
export class Logger {
|
|
2910
2917
|
private _logHandler;
|
|
2911
2918
|
private _silent;
|
|
2919
|
+
private _debugEnabled;
|
|
2912
2920
|
constructor(logOutput?: {
|
|
2913
2921
|
log: (...args: any[]) => void;
|
|
2914
2922
|
});
|
|
2915
2923
|
_log(type: LogMessageType, msg: any, ...args: any[]): void;
|
|
2916
2924
|
set silent(value: boolean);
|
|
2925
|
+
/** Redirect where log lines go (e.g. stderr while stdout carries machine-readable output). */
|
|
2926
|
+
set output(logOutput: {
|
|
2927
|
+
log: (...args: any[]) => void;
|
|
2928
|
+
});
|
|
2917
2929
|
log(msg: any, ...args: any[]): void;
|
|
2930
|
+
/** Only prints when {@link debugEnabled} is set (the `--debug` flag). */
|
|
2918
2931
|
debug(msg: any, ...args: any[]): void;
|
|
2932
|
+
set debugEnabled(value: boolean);
|
|
2919
2933
|
error(msg: any, ...args: any[]): void;
|
|
2920
2934
|
info(msg: any, ...args: any[]): void;
|
|
2921
2935
|
warn(msg: any, ...args: any[]): void;
|
|
@@ -2962,7 +2976,12 @@ declare class LogStream extends EventEmitter {
|
|
|
2962
2976
|
get lastSeq(): number;
|
|
2963
2977
|
/** Tap rm2mlog frames off the UTO channel. */
|
|
2964
2978
|
attachUtoMaster(utoMaster: UtoMaster): void;
|
|
2965
|
-
/**
|
|
2979
|
+
/**
|
|
2980
|
+
* Tap the AT/debug channel RX, where a DLO's live `printf` output arrives.
|
|
2981
|
+
*
|
|
2982
|
+
* A `DebugMaster` parses the raw byte stream (console frames, the `!`/`?`/`~`/`$`
|
|
2983
|
+
* level prefixes and the DLO file/line tags) instead of dumping unformatted chunks.
|
|
2984
|
+
*/
|
|
2966
2985
|
attachAtHandler(atHandler: AtCommandHandler): void;
|
|
2967
2986
|
/** Decode a device payload best-effort; keep the bytes when it is not text. */
|
|
2968
2987
|
private pushDecoded;
|
|
@@ -5708,7 +5727,7 @@ export declare interface StampPollerStatus {
|
|
|
5708
5727
|
* Opens the transports for a device given its serial number. The default (WebUSB) factory
|
|
5709
5728
|
* is used by {@link openDevice} unless a test/consumer supplies its own.
|
|
5710
5729
|
*/
|
|
5711
|
-
declare type TransportFactory = (serial: string, needDebug?: boolean) => Promise<DeviceTransports>;
|
|
5730
|
+
export declare type TransportFactory = (serial: string, needDebug?: boolean) => Promise<DeviceTransports>;
|
|
5712
5731
|
|
|
5713
5732
|
/**
|
|
5714
5733
|
* Upload result interface
|
|
@@ -5725,9 +5744,13 @@ declare interface UploadResult {
|
|
|
5725
5744
|
* @param fs - The filesystem interface for file operations
|
|
5726
5745
|
* @param logger - The logger instance for output
|
|
5727
5746
|
* @param debugLog - Enable debug logging
|
|
5747
|
+
* @param retryMs - Total ms budget to retry a transient device-open failure (see
|
|
5748
|
+
* {@link isTransientUsbOpenError}); `0` (the default) attempts once.
|
|
5749
|
+
* @param transportFactory - Overrides how the transports are obtained (used by tests and by
|
|
5750
|
+
* consumers, e.g. the VS Code extension, running on their own injected transport).
|
|
5728
5751
|
* @returns Promise resolving to an UploadResult
|
|
5729
5752
|
*/
|
|
5730
|
-
declare function uploadToDevice(serialNumber: string, fileUri: URI, fs: LocalFS, logger: Log.Logger, debugLog?: boolean): Promise<UploadResult>;
|
|
5753
|
+
declare function uploadToDevice(serialNumber: string, fileUri: URI, fs: LocalFS, logger: Log.Logger, debugLog?: boolean, retryMs?: number, transportFactory?: TransportFactory): Promise<UploadResult>;
|
|
5731
5754
|
|
|
5732
5755
|
declare function uriToMemFsPath(path: URI): string;
|
|
5733
5756
|
|