@uipath/common 1.202.1 → 1.203.0-preview.180

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/timings.d.ts CHANGED
@@ -9,6 +9,9 @@
9
9
  * sum inside `command`, not a fourth slice, so parallel calls can push `http`
10
10
  * past `command`.
11
11
  *
12
+ * The report goes to stderr, or to the file named by `UIP_TIMINGS_FILE` when a
13
+ * caller cannot afford to write on the stream something else is reading.
14
+ *
12
15
  * State is reached through `Symbol.for()` slots (each tool bundles its own copy
13
16
  * of this package) and bound to the invocation's async context, so the MCP
14
17
  * bridge's concurrent in-process commands can't overwrite each other's numbers.
@@ -18,6 +21,8 @@
18
21
  */
19
22
  /** Environment variable that turns the report on (`1` or `true`). */
20
23
  export declare const TIMINGS_ENV_VAR = "UIP_TIMINGS";
24
+ /** Environment variable naming a file to append the report to. */
25
+ export declare const TIMINGS_FILE_ENV_VAR = "UIP_TIMINGS_FILE";
21
26
  /** Prefix every report line carries, so a pipeline can grep them out. */
22
27
  export declare const TIMINGS_LINE_PREFIX = "[timing]";
23
28
  /**
@@ -41,6 +46,20 @@ export declare function markLongLivedHost(): void;
41
46
  export declare function runWithTimings<T>(fallbackCommand: string, fn: () => Promise<T>): Promise<T>;
42
47
  /** Only `1` and `true` count, matching how the logger reads `DEBUG`. */
43
48
  export declare function timingsEnabled(): boolean;
49
+ /**
50
+ * File the report is appended to, when one is named. Read only once the report
51
+ * is already on.
52
+ *
53
+ * Its own variable rather than a path value on {@link TIMINGS_ENV_VAR}, whose
54
+ * contract is that only `1` and `true` count: overloading it would turn a stray
55
+ * `UIP_TIMINGS=yes` from "off" into a relative file named `yes`.
56
+ *
57
+ * For a caller whose stderr is not free to write on: a harness timing the CLI
58
+ * while the process under measurement reads that same stream, or a wrapper that
59
+ * reads any stderr as failure. `--log-file` does not serve them, since it moves
60
+ * every log line and the caller stops seeing the diagnostics it had before.
61
+ */
62
+ export declare function timingsFile(): string | undefined;
44
63
  /** Name the command being timed, once the parser has resolved it. */
45
64
  export declare function setTimingCommand(command: string): void;
46
65
  /**
package/dist/zip.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { type IFileSystem } from "@uipath/filesystem";
2
+ /**
3
+ * Extract an in-memory zip archive into `destinationDir`.
4
+ *
5
+ * Rejects entries that escape the destination, both lexically and through a
6
+ * symlink already present at the destination. One residual gap: a *dangling*
7
+ * symlink as the final path component is not detectable through
8
+ * `IFileSystem`, which exposes `realpath` but no `lstat`. Callers extracting
9
+ * into a directory other processes can write to should hand this a freshly
10
+ * created destination rather than a reused one.
11
+ */
12
+ export declare function extractZipDataToDir(fs: IFileSystem, zipData: Uint8Array, destinationDir: string): Promise<void>;
13
+ /** Extract the zip archive at `archivePath` into `destinationDir`. */
14
+ export declare function extractArchive(archivePath: string, destinationDir: string): Promise<void>;