@uipath/common 1.201.0-preview.133 → 1.202.0-preview.134

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 (37) hide show
  1. package/dist/catch-error.d.ts +14 -0
  2. package/dist/catch-error.js +259 -10
  3. package/dist/classified-failure.d.ts +28 -0
  4. package/dist/entity-name-rules.d.ts +18 -0
  5. package/dist/entity-name-rules.js +241 -0
  6. package/dist/error-handler.d.ts +13 -0
  7. package/dist/exit-code.d.ts +42 -0
  8. package/dist/formatter.d.ts +34 -5
  9. package/dist/index.browser.d.ts +3 -0
  10. package/dist/index.browser.js +11328 -10486
  11. package/dist/index.d.ts +10 -1
  12. package/dist/index.js +9299 -8195
  13. package/dist/logger.d.ts +15 -0
  14. package/dist/package-metadata-options.js +3 -3
  15. package/dist/polling/poll-failure-mapping.d.ts +15 -1
  16. package/dist/sdk-user-agent.js +6 -6
  17. package/dist/telemetry/command-name.d.ts +60 -0
  18. package/dist/telemetry/console-telemetry-provider.d.ts +5 -6
  19. package/dist/telemetry/debug-telemetry-provider.d.ts +5 -6
  20. package/dist/telemetry/index.d.ts +3 -3
  21. package/dist/telemetry/index.js +18581 -105
  22. package/dist/telemetry/invocation-request.d.ts +38 -0
  23. package/dist/telemetry/logger-telemetry-provider.d.ts +5 -6
  24. package/dist/telemetry/node-appinsights-telemetry-provider.d.ts +17 -29
  25. package/dist/telemetry/node.d.ts +2 -2
  26. package/dist/telemetry/packaged-name.d.ts +22 -0
  27. package/dist/telemetry/pii-redactor.d.ts +110 -13
  28. package/dist/telemetry/pseudonymize.d.ts +57 -0
  29. package/dist/telemetry/span-clock.d.ts +27 -0
  30. package/dist/telemetry/supplied-values.d.ts +59 -0
  31. package/dist/telemetry/telemetry-init.d.ts +27 -0
  32. package/dist/telemetry/telemetry-provider.d.ts +84 -16
  33. package/dist/telemetry/telemetry-service.d.ts +71 -41
  34. package/dist/telemetry/telemetry-spool.d.ts +17 -0
  35. package/dist/timings.d.ts +99 -0
  36. package/dist/trackedAction.d.ts +25 -2
  37. package/package.json +6 -2
@@ -1,5 +1,13 @@
1
1
  import { type CommandErrorClass, type TerminalOutcome } from "./telemetry/command-terminal.js";
2
2
  export type OutputFormat = "table" | "json" | "yaml" | "plain";
3
+ /**
4
+ * Per-row highlight for interactive TABLE output only. Applied line-level
5
+ * AFTER column padding, so width math never sees escape bytes; json/yaml/plain
6
+ * and piped output never receive it (the gate lives in `logOutput`).
7
+ */
8
+ export type TableRowStyle = "red" | "dim";
9
+ /** Chooses a highlight for a (PascalCase-normalized) table row, or none. */
10
+ export type TableRowStyleFn = (row: Record<string, unknown>) => TableRowStyle | undefined;
3
11
  export type ResultType = "Success" | "Failure" | "ConfigError" | "AuthenticationError" | "ValidationError" | "TimeoutError";
4
12
  export type FailureResultType = Exclude<ResultType, "Success">;
5
13
  export declare const CLI_ERROR_CODES: readonly ["invalid_argument", "authentication_required", "permission_denied", "local_permission_denied", "not_found", "rate_limited", "network_error", "timeout", "server_error", "method_not_allowed", "configuration_error", "unknown_error"];
@@ -87,6 +95,11 @@ export interface ErrorContext {
87
95
  method?: string;
88
96
  /** Distributed-tracing id parsed from the backend error body when present. */
89
97
  traceId?: string;
98
+ /** How many times the CLI tried the failing request before giving up
99
+ * (1 = single attempt). Set by commands that retry internally, so a caller
100
+ * can tell a one-off blip from a sustained outage without re-running the
101
+ * command N times itself. UV-15707. */
102
+ attempts?: number;
90
103
  /** Local filesystem path the OS refused access to. Set only for
91
104
  * `local_permission_denied` failures — it is the one datum a caller
92
105
  * needs to decide which permission to grant. */
@@ -219,16 +232,32 @@ export declare namespace OutputFormatter {
219
232
  * receives `InputString` while its schema requires `inputString`). With
220
233
  * this flag the `Data` payload keeps its original casing; the envelope
221
234
  * keys (`Result`/`Code`/`Data`/`Log`/…) are still PascalCased.
235
+ *
236
+ * Pass an **array of field names** instead when only part of the payload is
237
+ * user data — `{ preserveDataKeys: ["arguments"] }` PascalCases the DTO's
238
+ * own field names as usual but copies the contents of every `arguments`
239
+ * field through untouched, at any depth and whatever the caller's casing.
240
+ * Use it for maps whose keys the user chose (pipeline argument names):
241
+ * those are values that happen to sit in key position, so renaming them
242
+ * corrupts data rather than tidying a field name. Preserved subtrees survive
243
+ * `--output-filter` too, including a projection that lifts one out of the
244
+ * field that named it (`--output-filter Arguments`).
245
+ *
246
+ * Pass `{ tableRowStyle }` to highlight rows in interactive TABLE output
247
+ * (e.g. `uip tools list` marking off-line tools). The hook receives each
248
+ * normalized (PascalCase) row; it is ignored for json/yaml/plain and
249
+ * whenever output is piped, so structured output stays byte-clean.
222
250
  */
223
251
  function success(data: SuccessOutput, options?: {
224
- preserveDataKeys?: boolean;
252
+ preserveDataKeys?: boolean | readonly string[];
253
+ tableRowStyle?: TableRowStyleFn;
225
254
  }): void;
226
255
  /**
227
- * Format and display an error, then set {@link process.exitCode} to the
228
- * value from {@link EXIT_CODES} for `data.Result` (falls back to 1).
256
+ * Format and display an error, then record the exit code from
257
+ * {@link EXIT_CODES} for `data.Result` (falls back to 1).
229
258
  *
230
- * **Side-effect:** sets `process.exitCode` so the process exits with a
231
- * non-zero status even if no explicit `process.exit()` call follows.
259
+ * **Side-effect:** records the exit code through {@link setExitCode}, so a
260
+ * printed failure exits non-zero even when no `context.exit()` follows.
232
261
  */
233
262
  function error(data: FailureOutput): void;
234
263
  /** Emit a list result. Always uses `Result: "Success"` — an empty list is not an error. */
@@ -6,9 +6,11 @@ export * from "./completer";
6
6
  export { installConsoleGuard, restoreConsole } from "./console-guard";
7
7
  export * from "./constants";
8
8
  export * from "./content-hash";
9
+ export * from "./entity-name-rules";
9
10
  export * from "./env-reference";
10
11
  export * from "./error-handler";
11
12
  export * from "./error-instructions";
13
+ export * from "./exit-code";
12
14
  export * from "./guid";
13
15
  export * from "./logger";
14
16
  export * from "./option-validators";
@@ -31,4 +33,5 @@ export * from "./telemetry/telemetry-events.js";
31
33
  export type { ITelemetryProvider } from "./telemetry/telemetry-provider.js";
32
34
  export type { ITelemetryService, TelemetryContext, TelemetryProperties, } from "./telemetry/telemetry-service.js";
33
35
  export { TelemetryService } from "./telemetry/telemetry-service.js";
36
+ export * from "./timings";
34
37
  export * from "./tool-provider";