@microtronics/studio-cli 1.2.0-alpha.3 → 1.2.0-alpha.4

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.
@@ -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
- /** Reopen the USB link after a flash; a failure is logged and leaves `connected: false`. */
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
- /** Tap the AT/debug channel RX, where a DLO's live `printf` output arrives. */
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;
@@ -5725,9 +5744,11 @@ 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.
5728
5749
  * @returns Promise resolving to an UploadResult
5729
5750
  */
5730
- declare function uploadToDevice(serialNumber: string, fileUri: URI, fs: LocalFS, logger: Log.Logger, debugLog?: boolean): Promise<UploadResult>;
5751
+ declare function uploadToDevice(serialNumber: string, fileUri: URI, fs: LocalFS, logger: Log.Logger, debugLog?: boolean, retryMs?: number): Promise<UploadResult>;
5731
5752
 
5732
5753
  declare function uriToMemFsPath(path: URI): string;
5733
5754