Skip to content
Français

relocateTranscript

Supporting contract not directly exported; use TypeScript inference or the public type that references it.

Return transcript text in which every cwd value equal to source becomes destination; without source, the first cwd recorded in the text is replaced. Lines that are not JSON are kept as they are, and no file is read or written.

  • textRequired
    string
    Native transcript contents to rewrite.
  • destinationRequired
    string
    Path written in place of each matching cwd value.
  • sourceOptional
    string | undefined
    Recorded cwd value to replace; defaults to the first cwd recorded in text.

string

export declare function relocateTranscript(
  text: string,
  destination: string,
  source?: string,
): string;