@uipath/test-manager-tool 1.1.0 → 1.195.0

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 (2) hide show
  1. package/dist/tool.js +1602 -195
  2. package/package.json +28 -37
package/dist/tool.js CHANGED
@@ -667,6 +667,7 @@ var init_open = __esm(() => {
667
667
  });
668
668
 
669
669
  // ../filesystem/src/node.ts
670
+ import { randomUUID } from "node:crypto";
670
671
  import { existsSync } from "node:fs";
671
672
  import * as fs6 from "node:fs/promises";
672
673
  import * as os2 from "node:os";
@@ -748,6 +749,90 @@ class NodeFileSystem {
748
749
  async mkdir(dirPath) {
749
750
  await fs6.mkdir(dirPath, { recursive: true });
750
751
  }
752
+ async acquireLock(lockPath) {
753
+ const canonicalPath = await this.canonicalizeLockTarget(lockPath);
754
+ const lockFile = `${canonicalPath}.lock`;
755
+ const ownerId = randomUUID();
756
+ const start = Date.now();
757
+ while (true) {
758
+ try {
759
+ await fs6.writeFile(lockFile, ownerId, { flag: "wx" });
760
+ return this.createLockRelease(lockFile, ownerId);
761
+ } catch (error) {
762
+ if (!this.hasErrnoCode(error, "EEXIST")) {
763
+ throw error;
764
+ }
765
+ const stats = await fs6.stat(lockFile).catch(() => null);
766
+ if (stats && Date.now() - stats.mtimeMs > LOCK_STALE_MS) {
767
+ const reclaimed = await fs6.rm(lockFile, { force: true }).then(() => true).catch(() => false);
768
+ if (reclaimed)
769
+ continue;
770
+ }
771
+ if (Date.now() - start > LOCK_MAX_WAIT_MS) {
772
+ throw new Error(`ELOCKED: timed out waiting for lock on ${canonicalPath}`);
773
+ }
774
+ await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MIN_MS + Math.random() * LOCK_RETRY_JITTER_MS));
775
+ }
776
+ }
777
+ }
778
+ async canonicalizeLockTarget(lockPath) {
779
+ const absolute = path2.resolve(lockPath);
780
+ const fullReal = await fs6.realpath(absolute).catch(() => null);
781
+ if (fullReal)
782
+ return fullReal;
783
+ const parent = path2.dirname(absolute);
784
+ const base = path2.basename(absolute);
785
+ const canonicalParent = await fs6.realpath(parent).catch(() => parent);
786
+ return path2.join(canonicalParent, base);
787
+ }
788
+ createLockRelease(lockFile, ownerId) {
789
+ const heartbeatStart = Date.now();
790
+ let heartbeatTimer;
791
+ let stopped = false;
792
+ const stopHeartbeat = () => {
793
+ stopped = true;
794
+ if (heartbeatTimer)
795
+ clearTimeout(heartbeatTimer);
796
+ };
797
+ const scheduleNextHeartbeat = () => {
798
+ if (stopped)
799
+ return;
800
+ if (Date.now() - heartbeatStart >= LOCK_MAX_HOLD_MS) {
801
+ stopped = true;
802
+ return;
803
+ }
804
+ heartbeatTimer = setTimeout(() => {
805
+ runHeartbeat();
806
+ }, LOCK_HEARTBEAT_MS);
807
+ heartbeatTimer.unref?.();
808
+ };
809
+ const runHeartbeat = async () => {
810
+ if (stopped)
811
+ return;
812
+ const current = await fs6.readFile(lockFile, "utf-8").catch(() => null);
813
+ if (stopped)
814
+ return;
815
+ if (current !== ownerId) {
816
+ stopped = true;
817
+ return;
818
+ }
819
+ const now = Date.now() / 1000;
820
+ await fs6.utimes(lockFile, now, now).catch(() => {});
821
+ scheduleNextHeartbeat();
822
+ };
823
+ scheduleNextHeartbeat();
824
+ let released = false;
825
+ return async () => {
826
+ if (released)
827
+ return;
828
+ released = true;
829
+ stopHeartbeat();
830
+ const current = await fs6.readFile(lockFile, "utf-8").catch(() => null);
831
+ if (current === ownerId) {
832
+ await fs6.rm(lockFile, { force: true });
833
+ }
834
+ };
835
+ }
751
836
  async rm(filePath) {
752
837
  await fs6.rm(filePath, { recursive: true, force: true });
753
838
  }
@@ -793,9 +878,13 @@ class NodeFileSystem {
793
878
  }
794
879
  }
795
880
  isEnoent(error) {
796
- return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
881
+ return this.hasErrnoCode(error, "ENOENT");
882
+ }
883
+ hasErrnoCode(error, code) {
884
+ return typeof error === "object" && error !== null && "code" in error && error.code === code;
797
885
  }
798
886
  }
887
+ var LOCK_HEARTBEAT_MS = 5000, LOCK_STALE_MS = 15000, LOCK_MAX_WAIT_MS = 20000, LOCK_MAX_HOLD_MS = 60000, LOCK_RETRY_MIN_MS = 100, LOCK_RETRY_JITTER_MS = 200;
799
888
  var init_node = __esm(() => {
800
889
  init_open();
801
890
  });
@@ -2941,7 +3030,7 @@ function isBrowser() {
2941
3030
 
2942
3031
  // ../../node_modules/@uipath/coreipc/index.js
2943
3032
  var require_coreipc = __commonJS((exports, module) => {
2944
- var __dirname = "/Users/alexandru.oltean/github/cli/node_modules/@uipath/coreipc";
3033
+ var __dirname = "/home/runner/work/cli/cli/node_modules/@uipath/coreipc";
2945
3034
  /*! For license information please see index.js.LICENSE.txt */
2946
3035
  (function(e, t) {
2947
3036
  typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.ipc = t() : e.ipc = t();
@@ -21133,10 +21222,15 @@ var require_dist = __commonJS((exports) => {
21133
21222
  exports.RobotProxyConstructor = RobotProxyConstructor;
21134
21223
  __exportStar(require_agent(), exports);
21135
21224
  });
21225
+ // ../auth/src/server.ts
21226
+ var init_server = __esm(() => {
21227
+ init_constants();
21228
+ });
21136
21229
  // package.json
21137
21230
  var package_default = {
21138
21231
  name: "@uipath/test-manager-tool",
21139
- version: "1.1.0",
21232
+ license: "MIT",
21233
+ version: "1.195.0",
21140
21234
  description: "Manage test cases, test sets, executions, and results.",
21141
21235
  private: false,
21142
21236
  repository: {
@@ -21318,10 +21412,15 @@ async function extractErrorDetails(error, options) {
21318
21412
  }
21319
21413
  if (parsedBody?.errorCode && typeof parsedBody.errorCode === "string") {
21320
21414
  context.errorCode = parsedBody.errorCode;
21415
+ } else if (parsedBody?.code && typeof parsedBody.code === "string") {
21416
+ context.errorCode = parsedBody.code;
21321
21417
  }
21322
21418
  if (parsedBody?.requestId && typeof parsedBody.requestId === "string") {
21323
21419
  context.requestId = parsedBody.requestId;
21324
21420
  }
21421
+ if (parsedBody?.traceId && typeof parsedBody.traceId === "string") {
21422
+ context.traceId = parsedBody.traceId;
21423
+ }
21325
21424
  if (status === 429) {
21326
21425
  const resp = response;
21327
21426
  const headersObj = resp?.headers;
@@ -21341,7 +21440,35 @@ async function extractErrorDetails(error, options) {
21341
21440
  }
21342
21441
  }
21343
21442
  const hasContext = Object.keys(context).length > 0;
21344
- return { result, message, details, ...hasContext ? { context } : {} };
21443
+ let parsedErrors;
21444
+ if (parsedBody?.errors && typeof parsedBody.errors === "object") {
21445
+ const errors = {};
21446
+ for (const [field, raw] of Object.entries(parsedBody.errors)) {
21447
+ if (Array.isArray(raw)) {
21448
+ const messages = raw.map((entry) => {
21449
+ if (typeof entry === "string")
21450
+ return entry;
21451
+ if (entry && typeof entry === "object" && typeof entry.message === "string") {
21452
+ return entry.message;
21453
+ }
21454
+ return String(entry);
21455
+ }).filter(Boolean);
21456
+ if (messages.length > 0)
21457
+ errors[field] = messages;
21458
+ } else if (typeof raw === "string") {
21459
+ errors[field] = [raw];
21460
+ }
21461
+ }
21462
+ if (Object.keys(errors).length > 0)
21463
+ parsedErrors = errors;
21464
+ }
21465
+ return {
21466
+ result,
21467
+ message,
21468
+ details,
21469
+ ...hasContext ? { context } : {},
21470
+ ...parsedErrors ? { parsedErrors } : {}
21471
+ };
21345
21472
  }
21346
21473
  // ../../node_modules/commander/esm.mjs
21347
21474
  var import__ = __toESM(require_commander(), 1);
@@ -26551,6 +26678,60 @@ function escapeNonAscii(jsonText) {
26551
26678
  function needsAsciiSafeJson(sink) {
26552
26679
  return process.platform === "win32" && !sink.capabilities.isInteractive;
26553
26680
  }
26681
+ function isPlainRecord(value) {
26682
+ if (value === null || typeof value !== "object")
26683
+ return false;
26684
+ const prototype = Object.getPrototypeOf(value);
26685
+ return prototype === Object.prototype || prototype === null;
26686
+ }
26687
+ function toLowerCamelCaseKey(key) {
26688
+ if (!key)
26689
+ return key;
26690
+ if (/[_\-\s]/.test(key)) {
26691
+ const [firstPart, ...restParts] = key.split(/[_\-\s]+/).filter(Boolean);
26692
+ if (!firstPart)
26693
+ return key;
26694
+ return [
26695
+ toLowerCamelCaseSimpleKey(firstPart),
26696
+ ...restParts.map((part) => {
26697
+ const normalized = toLowerCamelCaseSimpleKey(part);
26698
+ return normalized.charAt(0).toUpperCase() + normalized.slice(1);
26699
+ })
26700
+ ].join("");
26701
+ }
26702
+ return toLowerCamelCaseSimpleKey(key);
26703
+ }
26704
+ function toLowerCamelCaseSimpleKey(key) {
26705
+ if (/^[A-Z0-9]+$/.test(key))
26706
+ return key.toLowerCase();
26707
+ return key.replace(/^[A-Z]+(?=[A-Z][a-z]|\d|$)|^[A-Z]/, (match) => match.toLowerCase());
26708
+ }
26709
+ function toPascalCaseKey(key) {
26710
+ const lowerCamelKey = toLowerCamelCaseKey(key);
26711
+ return lowerCamelKey ? lowerCamelKey.charAt(0).toUpperCase() + lowerCamelKey.slice(1) : lowerCamelKey;
26712
+ }
26713
+ function toPascalCaseData(value) {
26714
+ if (Array.isArray(value))
26715
+ return value.map(toPascalCaseData);
26716
+ if (!isPlainRecord(value))
26717
+ return value;
26718
+ const result = {};
26719
+ for (const [key, nestedValue] of Object.entries(value)) {
26720
+ result[toPascalCaseKey(key)] = toPascalCaseData(nestedValue);
26721
+ }
26722
+ return result;
26723
+ }
26724
+ function normalizeDataKeys(data) {
26725
+ return toPascalCaseData(data);
26726
+ }
26727
+ function normalizeOutputKeys(data) {
26728
+ const result = {};
26729
+ for (const [key, value] of Object.entries(data)) {
26730
+ const pascalKey = toPascalCaseKey(key);
26731
+ result[pascalKey] = pascalKey === "Data" ? value : toPascalCaseData(value);
26732
+ }
26733
+ return result;
26734
+ }
26554
26735
  function printOutput(data, format = "json", logFn, asciiSafe = false) {
26555
26736
  if (!data) {
26556
26737
  logFn("Empty response object. No data to display.");
@@ -26613,7 +26794,7 @@ function wrapText(text, width) {
26613
26794
  function printTable(data, logFn, externalLogValue) {
26614
26795
  if (data.length === 0)
26615
26796
  return;
26616
- const keys = Object.keys(data[0]).filter((key) => key !== "Code" && key !== "Log");
26797
+ const keys = Object.keys(data[0]).filter((key) => !["code", "log"].includes(key.toLowerCase()));
26617
26798
  const maxWidths = keys.map((key) => Math.max(key.length, ...data.map((item) => cellToString(item[key]).length)));
26618
26799
  const header = keys.map((key, i2) => key.padEnd(maxWidths[i2])).join(" | ");
26619
26800
  logFn(header);
@@ -26628,7 +26809,7 @@ function printTable(data, logFn, externalLogValue) {
26628
26809
  }
26629
26810
  }
26630
26811
  function printVerticalTable(data, logFn = console.log, externalLogValue) {
26631
- const keys = Object.keys(data).filter((key) => key !== "Code" && key !== "Log");
26812
+ const keys = Object.keys(data).filter((key) => !["code", "log"].includes(key.toLowerCase()));
26632
26813
  if (keys.length === 0)
26633
26814
  return;
26634
26815
  const maxKeyWidth = Math.max(...keys.map((key) => key.length));
@@ -26644,7 +26825,7 @@ function printVerticalTable(data, logFn = console.log, externalLogValue) {
26644
26825
  function printResizableTable(data, logFn = console.log, externalLogValue) {
26645
26826
  if (data.length === 0)
26646
26827
  return;
26647
- const keys = Object.keys(data[0]).filter((key) => key !== "Code" && key !== "Log");
26828
+ const keys = Object.keys(data[0]).filter((key) => !["code", "log"].includes(key.toLowerCase()));
26648
26829
  if (keys.length === 0)
26649
26830
  return;
26650
26831
  if (!process.stdout.isTTY) {
@@ -26720,8 +26901,26 @@ function printResizableTable(data, logFn = console.log, externalLogValue) {
26720
26901
  function toYaml(data) {
26721
26902
  return dump(data);
26722
26903
  }
26904
+ class FilterEvaluationError extends Error {
26905
+ __brand = "FilterEvaluationError";
26906
+ filter;
26907
+ instructions;
26908
+ result = RESULTS.ValidationError;
26909
+ constructor(filter, cause) {
26910
+ const underlying = cause instanceof Error ? cause.message : String(cause);
26911
+ super(`Filter '${filter}' failed to evaluate: ${underlying}`);
26912
+ this.name = "FilterEvaluationError";
26913
+ this.filter = filter;
26914
+ this.instructions = `The --output-filter expression '${filter}' failed at evaluation time. ` + "Note that --output-filter operates on the 'Data' field of the envelope, not the full object. " + "For example, on a list result use 'length(@)' instead of 'Data | length(@)'.";
26915
+ }
26916
+ }
26723
26917
  function applyFilter(data, filter) {
26724
- const result = search(data, filter);
26918
+ let result;
26919
+ try {
26920
+ result = search(data, filter);
26921
+ } catch (err) {
26922
+ throw new FilterEvaluationError(filter, err);
26923
+ }
26725
26924
  if (result == null)
26726
26925
  return [];
26727
26926
  if (Array.isArray(result)) {
@@ -26738,13 +26937,18 @@ function applyFilter(data, filter) {
26738
26937
  }
26739
26938
  var OutputFormatter;
26740
26939
  ((OutputFormatter) => {
26741
- function success(data) {
26940
+ function success(data, options) {
26742
26941
  data.Log ??= getLogFilePath() || undefined;
26942
+ const normalize = !options?.preserveDataKeys;
26943
+ if (normalize) {
26944
+ data.Data = normalizeDataKeys(data.Data);
26945
+ }
26743
26946
  const filter = getOutputFilter();
26744
26947
  if (filter) {
26745
- data.Data = applyFilter(data.Data, filter);
26948
+ const filtered = applyFilter(data.Data, filter);
26949
+ data.Data = normalize ? normalizeDataKeys(filtered) : filtered;
26746
26950
  }
26747
- logOutput(data, getOutputFormat());
26951
+ logOutput(normalizeOutputKeys(data), getOutputFormat());
26748
26952
  }
26749
26953
  OutputFormatter.success = success;
26750
26954
  function error(data) {
@@ -26754,7 +26958,7 @@ var OutputFormatter;
26754
26958
  result: data.Result,
26755
26959
  message: data.Message
26756
26960
  });
26757
- logOutput(data, getOutputFormat());
26961
+ logOutput(normalizeOutputKeys(data), getOutputFormat());
26758
26962
  }
26759
26963
  OutputFormatter.error = error;
26760
26964
  function emitList(code, items, opts) {
@@ -26775,13 +26979,14 @@ var OutputFormatter;
26775
26979
  function log(data) {
26776
26980
  const format = getOutputFormat();
26777
26981
  const sink = getOutputSink();
26982
+ const normalized = toPascalCaseData(data);
26778
26983
  if (format === "json") {
26779
- const json2 = JSON.stringify(data);
26984
+ const json2 = JSON.stringify(normalized);
26780
26985
  const safe = needsAsciiSafeJson(sink) ? escapeNonAscii(json2) : json2;
26781
26986
  sink.writeErr(`${safe}
26782
26987
  `);
26783
26988
  } else {
26784
- for (const [key, value] of Object.entries(data)) {
26989
+ for (const [key, value] of Object.entries(normalized)) {
26785
26990
  sink.writeErr(`${key}: ${value}
26786
26991
  `);
26787
26992
  }
@@ -26790,12 +26995,16 @@ var OutputFormatter;
26790
26995
  OutputFormatter.log = log;
26791
26996
  function formatToString(data) {
26792
26997
  const filter = getOutputFilter();
26793
- if (filter && "Data" in data && data.Data != null) {
26794
- data.Data = applyFilter(data.Data, filter);
26998
+ if ("Data" in data && data.Data != null) {
26999
+ data.Data = normalizeDataKeys(data.Data);
27000
+ if (filter) {
27001
+ data.Data = normalizeDataKeys(applyFilter(data.Data, filter));
27002
+ }
26795
27003
  }
27004
+ const output = normalizeOutputKeys(data);
26796
27005
  const lines = [];
26797
27006
  const sink = getOutputSink();
26798
- printOutput(data, getOutputFormat(), (msg) => {
27007
+ printOutput(output, getOutputFormat(), (msg) => {
26799
27008
  lines.push(msg);
26800
27009
  }, needsAsciiSafeJson(sink));
26801
27010
  return lines.join(`
@@ -28283,6 +28492,13 @@ var BACKOFF_DEFAULTS = {
28283
28492
  };
28284
28493
  var MIN_INTERVAL_MS = 100;
28285
28494
 
28495
+ // ../common/src/polling/poll-failure-mapping.ts
28496
+ var REASON_BY_OUTCOME = {
28497
+ [PollOutcome.Timeout]: "poll_timeout",
28498
+ [PollOutcome.Failed]: "poll_failed",
28499
+ [PollOutcome.Interrupted]: "poll_failed",
28500
+ [PollOutcome.Aborted]: "poll_aborted"
28501
+ };
28286
28502
  // ../common/src/polling/poll-until.ts
28287
28503
  function resolveIntervalFn(options) {
28288
28504
  if (typeof options.intervalMs === "function") {
@@ -28690,6 +28906,105 @@ var ScreenLogger;
28690
28906
  }
28691
28907
  ScreenLogger.progress = progress;
28692
28908
  })(ScreenLogger ||= {});
28909
+ // ../common/src/sdk-user-agent.ts
28910
+ var USER_AGENT_HEADER = "User-Agent";
28911
+ var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
28912
+ function userAgentPatchKey(userAgent) {
28913
+ return Symbol.for(`@uipath/common/sdk-user-agent/${userAgent}`);
28914
+ }
28915
+ function splitUserAgentTokens(value) {
28916
+ return value?.trim().split(/\s+/).filter(Boolean) ?? [];
28917
+ }
28918
+ function appendUserAgentToken(value, userAgent) {
28919
+ const tokens = splitUserAgentTokens(value);
28920
+ const seen = new Set(tokens);
28921
+ for (const token of splitUserAgentTokens(userAgent)) {
28922
+ if (!seen.has(token)) {
28923
+ tokens.push(token);
28924
+ seen.add(token);
28925
+ }
28926
+ }
28927
+ return tokens.join(" ");
28928
+ }
28929
+ function getEffectiveUserAgent(userAgent) {
28930
+ return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
28931
+ }
28932
+ function isHeadersLike(headers) {
28933
+ return typeof headers === "object" && headers !== null && "get" in headers && typeof headers.get === "function" && "set" in headers && typeof headers.set === "function";
28934
+ }
28935
+ function getSdkUserAgentToken(pkg) {
28936
+ const packageName = pkg.name.replace(/^@uipath\//, "");
28937
+ return getEffectiveUserAgent(`${packageName}/${pkg.version}`);
28938
+ }
28939
+ function addSdkUserAgentHeader(headers, userAgent) {
28940
+ const result = { ...headers ?? {} };
28941
+ const effectiveUserAgent = getEffectiveUserAgent(userAgent);
28942
+ const headerName = Object.keys(result).find((key) => key.toLowerCase() === USER_AGENT_HEADER.toLowerCase());
28943
+ if (headerName) {
28944
+ result[headerName] = appendUserAgentToken(result[headerName], effectiveUserAgent);
28945
+ } else {
28946
+ result[USER_AGENT_HEADER] = effectiveUserAgent;
28947
+ }
28948
+ return result;
28949
+ }
28950
+ function withSdkUserAgentHeader(headers, userAgent) {
28951
+ const effectiveUserAgent = getEffectiveUserAgent(userAgent);
28952
+ if (isHeadersLike(headers)) {
28953
+ headers.set(USER_AGENT_HEADER, appendUserAgentToken(headers.get(USER_AGENT_HEADER), effectiveUserAgent));
28954
+ return headers;
28955
+ }
28956
+ if (Array.isArray(headers)) {
28957
+ const result = headers.map((entry) => {
28958
+ const [key, value] = entry;
28959
+ return [key, value];
28960
+ });
28961
+ const headerIndex = result.findIndex(([key]) => key.toLowerCase() === USER_AGENT_HEADER.toLowerCase());
28962
+ if (headerIndex >= 0) {
28963
+ const [key, value] = result[headerIndex];
28964
+ result[headerIndex] = [
28965
+ key,
28966
+ appendUserAgentToken(value, effectiveUserAgent)
28967
+ ];
28968
+ } else {
28969
+ result.push([USER_AGENT_HEADER, effectiveUserAgent]);
28970
+ }
28971
+ return result;
28972
+ }
28973
+ return addSdkUserAgentHeader(typeof headers === "object" && headers !== null ? { ...headers } : {}, effectiveUserAgent);
28974
+ }
28975
+ function withUserAgentInitOverride(initOverrides, userAgent) {
28976
+ return async (requestContext) => {
28977
+ const initWithUserAgent = {
28978
+ ...requestContext.init,
28979
+ headers: withSdkUserAgentHeader(requestContext.init.headers, userAgent)
28980
+ };
28981
+ const override = typeof initOverrides === "function" ? await initOverrides({
28982
+ ...requestContext,
28983
+ init: initWithUserAgent
28984
+ }) : initOverrides;
28985
+ return {
28986
+ ...override ?? {},
28987
+ headers: withSdkUserAgentHeader(override?.headers ?? initWithUserAgent.headers, userAgent)
28988
+ };
28989
+ };
28990
+ }
28991
+ function installSdkUserAgentHeader(BaseApiClass, userAgent) {
28992
+ const prototype = BaseApiClass.prototype;
28993
+ const patchKey = userAgentPatchKey(userAgent);
28994
+ if (prototype[patchKey]) {
28995
+ return;
28996
+ }
28997
+ if (typeof prototype.request !== "function") {
28998
+ throw new Error("Generated BaseAPI request function not found.");
28999
+ }
29000
+ const originalRequest = prototype.request;
29001
+ prototype.request = function requestWithUserAgent(context, initOverrides) {
29002
+ return originalRequest.call(this, context, withUserAgentInitOverride(initOverrides, userAgent));
29003
+ };
29004
+ Object.defineProperty(prototype, patchKey, {
29005
+ value: true
29006
+ });
29007
+ }
28693
29008
  // ../common/src/tool-provider.ts
28694
29009
  var factorySlot = singleton("PackagerFactoryProvider");
28695
29010
  // ../common/src/telemetry/pii-redactor.ts
@@ -28872,13 +29187,17 @@ Command.prototype.trackedAction = function(context, fn, properties) {
28872
29187
  const [error] = await catchError(fn(...args));
28873
29188
  if (error) {
28874
29189
  errorMessage = error instanceof Error ? error.message : String(error);
28875
- logger.error(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
29190
+ logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
29191
+ const typed = error;
29192
+ const customInstructions = typeof typed.instructions === "string" ? typed.instructions : undefined;
29193
+ const customResult = typeof typed.result === "string" && typed.result !== RESULTS.Success && Object.values(RESULTS).includes(typed.result) ? typed.result : undefined;
29194
+ const finalResult = customResult ?? RESULTS.Failure;
28876
29195
  OutputFormatter.error({
28877
- Result: RESULTS.Failure,
29196
+ Result: finalResult,
28878
29197
  Message: errorMessage,
28879
- Instructions: "An unexpected error occurred. Run with --log-level debug for details."
29198
+ Instructions: customInstructions ?? "An unexpected error occurred. Run with --log-level debug for details."
28880
29199
  });
28881
- context.exit(1);
29200
+ context.exit(EXIT_CODES[finalResult]);
28882
29201
  }
28883
29202
  const durationMs = performance.now() - startTime;
28884
29203
  const success = !error && (process.exitCode === undefined || process.exitCode === 0);
@@ -29172,6 +29491,55 @@ class TextApiResponse {
29172
29491
  return await this.raw.text();
29173
29492
  }
29174
29493
  }
29494
+ // ../test-manager-sdk/package.json
29495
+ var package_default2 = {
29496
+ name: "@uipath/test-manager-sdk",
29497
+ license: "MIT",
29498
+ version: "1.2.0",
29499
+ repository: {
29500
+ type: "git",
29501
+ url: "https://github.com/UiPath/cli.git",
29502
+ directory: "packages/test-manager-sdk"
29503
+ },
29504
+ publishConfig: {
29505
+ registry: "https://npm.pkg.github.com/@uipath"
29506
+ },
29507
+ keywords: [
29508
+ "uipath",
29509
+ "test-manager",
29510
+ "sdk"
29511
+ ],
29512
+ type: "module",
29513
+ main: "./dist/index.js",
29514
+ types: "./dist/src/index.d.ts",
29515
+ exports: {
29516
+ ".": {
29517
+ types: "./dist/src/index.d.ts",
29518
+ default: "./dist/index.js"
29519
+ }
29520
+ },
29521
+ files: [
29522
+ "dist"
29523
+ ],
29524
+ private: true,
29525
+ scripts: {
29526
+ build: "bun build ./src/index.ts --outdir dist --format esm --target node && tsc -p tsconfig.build.json --noCheck",
29527
+ generate: "bun run src/scripts/generate-sdk.ts",
29528
+ lint: "biome check .",
29529
+ test: "vitest run",
29530
+ "test:coverage": "vitest run --coverage"
29531
+ },
29532
+ devDependencies: {
29533
+ "@openapitools/openapi-generator-cli": "^2.31.1",
29534
+ "@types/node": "^25.5.2",
29535
+ "@uipath/common": "workspace:*",
29536
+ typescript: "^6.0.2"
29537
+ }
29538
+ };
29539
+
29540
+ // ../test-manager-sdk/src/user-agent.ts
29541
+ var SDK_USER_AGENT = getSdkUserAgentToken(package_default2);
29542
+ installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
29175
29543
  // ../test-manager-sdk/generated/src/models/MicrosoftAspNetCoreJsonPatchOperationsOperation.ts
29176
29544
  function MicrosoftAspNetCoreJsonPatchOperationsOperationToJSON(json2) {
29177
29545
  return MicrosoftAspNetCoreJsonPatchOperationsOperationToJSONTyped(json2, false);
@@ -29831,6 +30199,9 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseLogWithTes
29831
30199
  updated: json2["updated"] == null ? undefined : new Date(json2["updated"]),
29832
30200
  executionOrder: json2["executionOrder"] == null ? undefined : json2["executionOrder"],
29833
30201
  governanceInfo: json2["governanceInfo"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDtoFromJSON(json2["governanceInfo"]),
30202
+ isGoverned: json2["isGoverned"] == null ? undefined : json2["isGoverned"],
30203
+ approvalStatus: json2["approvalStatus"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2["approvalStatus"]),
30204
+ totalApproversRequired: json2["totalApproversRequired"] == null ? undefined : json2["totalApproversRequired"],
29834
30205
  originalResult: json2["originalResult"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsResultFromJSON(json2["originalResult"]),
29835
30206
  preCondition: json2["preCondition"] == null ? undefined : json2["preCondition"],
29836
30207
  postCondition: json2["postCondition"] == null ? undefined : json2["postCondition"],
@@ -29996,6 +30367,9 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseLogWithTes
29996
30367
  updated: json2["updated"] == null ? undefined : new Date(json2["updated"]),
29997
30368
  executionOrder: json2["executionOrder"] == null ? undefined : json2["executionOrder"],
29998
30369
  governanceInfo: json2["governanceInfo"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDtoFromJSON(json2["governanceInfo"]),
30370
+ isGoverned: json2["isGoverned"] == null ? undefined : json2["isGoverned"],
30371
+ approvalStatus: json2["approvalStatus"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2["approvalStatus"]),
30372
+ totalApproversRequired: json2["totalApproversRequired"] == null ? undefined : json2["totalApproversRequired"],
29999
30373
  originalResult: json2["originalResult"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsResultFromJSON(json2["originalResult"]),
30000
30374
  preCondition: json2["preCondition"] == null ? undefined : json2["preCondition"],
30001
30375
  postCondition: json2["postCondition"] == null ? undefined : json2["postCondition"],
@@ -30130,6 +30504,16 @@ function UiPathTestManagementHubCommonDTOsPagingModelDto1UiPathTestManagementHub
30130
30504
  paging: json2["paging"] == null ? undefined : UiPathTestManagementHubCommonDTOsPagingModelDto1PagingDtoUiPathTestManagementHubTestManagementAbstractionsDTOsTestSetDtoFromJSON(json2["paging"])
30131
30505
  };
30132
30506
  }
30507
+ // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubCommonEnumsLabelType.ts
30508
+ function UiPathTestManagementHubCommonEnumsLabelTypeFromJSON(json2) {
30509
+ return UiPathTestManagementHubCommonEnumsLabelTypeFromJSONTyped(json2, false);
30510
+ }
30511
+ function UiPathTestManagementHubCommonEnumsLabelTypeFromJSONTyped(json2, ignoreDiscriminator) {
30512
+ return json2;
30513
+ }
30514
+ function UiPathTestManagementHubCommonEnumsLabelTypeToJSON(value) {
30515
+ return value;
30516
+ }
30133
30517
  // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsCloneRequirementRequest.ts
30134
30518
  function UiPathTestManagementHubTestManagementAbstractionsDTOsCloneRequirementRequestToJSON(json2) {
30135
30519
  return UiPathTestManagementHubTestManagementAbstractionsDTOsCloneRequirementRequestToJSONTyped(json2, false);
@@ -30208,6 +30592,22 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsBulkAddCustomField
30208
30592
  values: value["values"]
30209
30593
  };
30210
30594
  }
30595
+ // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsBulkAddLabelsRequestDto.ts
30596
+ function UiPathTestManagementHubTestManagementAbstractionsDTOsBulkAddLabelsRequestDtoToJSON(json2) {
30597
+ return UiPathTestManagementHubTestManagementAbstractionsDTOsBulkAddLabelsRequestDtoToJSONTyped(json2, false);
30598
+ }
30599
+ function UiPathTestManagementHubTestManagementAbstractionsDTOsBulkAddLabelsRequestDtoToJSONTyped(value, ignoreDiscriminator = false) {
30600
+ if (value == null) {
30601
+ return value;
30602
+ }
30603
+ return {
30604
+ removeOtherLabels: value["removeOtherLabels"],
30605
+ objectIds: value["objectIds"],
30606
+ labels: value["labels"],
30607
+ projectId: value["projectId"],
30608
+ objectType: UiPathTestManagementHubCommonEnumsObjectTypeToJSON(value["objectType"])
30609
+ };
30610
+ }
30211
30611
  // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsBulkDeleteRequestDto.ts
30212
30612
  function UiPathTestManagementHubTestManagementAbstractionsDTOsBulkDeleteRequestDtoToJSON(json2) {
30213
30613
  return UiPathTestManagementHubTestManagementAbstractionsDTOsBulkDeleteRequestDtoToJSONTyped(json2, false);
@@ -30248,6 +30648,22 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsBulkRemoveCustomFi
30248
30648
  values: value["values"]
30249
30649
  };
30250
30650
  }
30651
+ // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsBulkRemoveLabelsRequestDto.ts
30652
+ function UiPathTestManagementHubTestManagementAbstractionsDTOsBulkRemoveLabelsRequestDtoToJSON(json2) {
30653
+ return UiPathTestManagementHubTestManagementAbstractionsDTOsBulkRemoveLabelsRequestDtoToJSONTyped(json2, false);
30654
+ }
30655
+ function UiPathTestManagementHubTestManagementAbstractionsDTOsBulkRemoveLabelsRequestDtoToJSONTyped(value, ignoreDiscriminator = false) {
30656
+ if (value == null) {
30657
+ return value;
30658
+ }
30659
+ return {
30660
+ removeAllLabels: value["removeAllLabels"],
30661
+ objectIds: value["objectIds"],
30662
+ labels: value["labels"],
30663
+ projectId: value["projectId"],
30664
+ objectType: UiPathTestManagementHubCommonEnumsObjectTypeToJSON(value["objectType"])
30665
+ };
30666
+ }
30251
30667
  // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsCreateCustomFieldDefinitionRequest.ts
30252
30668
  function UiPathTestManagementHubTestManagementAbstractionsDTOsCreateCustomFieldDefinitionRequestToJSON(json2) {
30253
30669
  return UiPathTestManagementHubTestManagementAbstractionsDTOsCreateCustomFieldDefinitionRequestToJSONTyped(json2, false);
@@ -30502,6 +30918,24 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsFinishTestCaseExec
30502
30918
  isPostConditionMet: value["isPostConditionMet"]
30503
30919
  };
30504
30920
  }
30921
+ // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsObjectLabelDto.ts
30922
+ function UiPathTestManagementHubTestManagementAbstractionsDTOsObjectLabelDtoFromJSON(json2) {
30923
+ return UiPathTestManagementHubTestManagementAbstractionsDTOsObjectLabelDtoFromJSONTyped(json2, false);
30924
+ }
30925
+ function UiPathTestManagementHubTestManagementAbstractionsDTOsObjectLabelDtoFromJSONTyped(json2, ignoreDiscriminator) {
30926
+ if (json2 == null) {
30927
+ return json2;
30928
+ }
30929
+ return {
30930
+ id: json2["id"] == null ? undefined : json2["id"],
30931
+ objectId: json2["objectId"] == null ? undefined : json2["objectId"],
30932
+ objectType: json2["objectType"] == null ? undefined : UiPathTestManagementHubCommonEnumsObjectTypeFromJSON(json2["objectType"]),
30933
+ projectId: json2["projectId"] == null ? undefined : json2["projectId"],
30934
+ name: json2["name"] == null ? undefined : json2["name"],
30935
+ description: json2["description"] == null ? undefined : json2["description"],
30936
+ labelType: json2["labelType"] == null ? undefined : UiPathTestManagementHubCommonEnumsLabelTypeFromJSON(json2["labelType"])
30937
+ };
30938
+ }
30505
30939
  // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsDTOsOverrideParameterDto.ts
30506
30940
  function UiPathTestManagementHubTestManagementAbstractionsDTOsOverrideParameterDtoFromJSON(json2) {
30507
30941
  return UiPathTestManagementHubTestManagementAbstractionsDTOsOverrideParameterDtoFromJSONTyped(json2, false);
@@ -30625,6 +31059,9 @@ function UiPathTestManagementHubTestManagementAbstractionsDTOsTestCaseLogDtoFrom
30625
31059
  updated: json2["updated"] == null ? undefined : new Date(json2["updated"]),
30626
31060
  executionOrder: json2["executionOrder"] == null ? undefined : json2["executionOrder"],
30627
31061
  governanceInfo: json2["governanceInfo"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsObjectGovernanceDtoFromJSON(json2["governanceInfo"]),
31062
+ isGoverned: json2["isGoverned"] == null ? undefined : json2["isGoverned"],
31063
+ approvalStatus: json2["approvalStatus"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsEnumsObjectGovernanceStateFromJSON(json2["approvalStatus"]),
31064
+ totalApproversRequired: json2["totalApproversRequired"] == null ? undefined : json2["totalApproversRequired"],
30628
31065
  originalResult: json2["originalResult"] == null ? undefined : UiPathTestManagementHubTestManagementAbstractionsDTOsResultFromJSON(json2["originalResult"]),
30629
31066
  preCondition: json2["preCondition"] == null ? undefined : json2["preCondition"],
30630
31067
  postCondition: json2["postCondition"] == null ? undefined : json2["postCondition"],
@@ -30827,6 +31264,25 @@ function UiPathTestManagementHubTestManagementAbstractionsRequestModelsCustomFie
30827
31264
  skip: value["skip"]
30828
31265
  };
30829
31266
  }
31267
+ // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsRequestModelsObjectLabelsRequestModel.ts
31268
+ function UiPathTestManagementHubTestManagementAbstractionsRequestModelsObjectLabelsRequestModelToJSON(json2) {
31269
+ return UiPathTestManagementHubTestManagementAbstractionsRequestModelsObjectLabelsRequestModelToJSONTyped(json2, false);
31270
+ }
31271
+ function UiPathTestManagementHubTestManagementAbstractionsRequestModelsObjectLabelsRequestModelToJSONTyped(value, ignoreDiscriminator = false) {
31272
+ if (value == null) {
31273
+ return value;
31274
+ }
31275
+ return {
31276
+ projectId: value["projectId"],
31277
+ objType: UiPathTestManagementHubCommonEnumsObjectTypeToJSON(value["objType"]),
31278
+ labelTypes: value["labelTypes"] == null ? undefined : value["labelTypes"].map(UiPathTestManagementHubCommonEnumsLabelTypeToJSON),
31279
+ objectIds: value["objectIds"],
31280
+ search: value["search"],
31281
+ orderBy: value["orderBy"],
31282
+ top: value["top"],
31283
+ skip: value["skip"]
31284
+ };
31285
+ }
30830
31286
  // ../test-manager-sdk/generated/src/models/UiPathTestManagementHubTestManagementAbstractionsRequestModelsRequirementsByTestExecutionRequestModel.ts
30831
31287
  function UiPathTestManagementHubTestManagementAbstractionsRequestModelsRequirementsByTestExecutionRequestModelToJSON(json2) {
30832
31288
  return UiPathTestManagementHubTestManagementAbstractionsRequestModelsRequirementsByTestExecutionRequestModelToJSONTyped(json2, false);
@@ -31611,6 +32067,156 @@ class CustomFieldValuesApi extends BaseAPI {
31611
32067
  await this.customFieldValuesUpdateRaw(requestParameters, initOverrides);
31612
32068
  }
31613
32069
  }
32070
+ // ../test-manager-sdk/generated/src/apis/ObjectLabelsApi.ts
32071
+ class ObjectLabelsApi extends BaseAPI {
32072
+ async objectLabelsAddLabelsForObjectIdsRequestOpts(requestParameters) {
32073
+ if (requestParameters["objectType"] == null) {
32074
+ throw new RequiredError("objectType", 'Required parameter "objectType" was null or undefined when calling objectLabelsAddLabelsForObjectIds().');
32075
+ }
32076
+ if (requestParameters["projectId"] == null) {
32077
+ throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling objectLabelsAddLabelsForObjectIds().');
32078
+ }
32079
+ const queryParameters = {};
32080
+ const headerParameters = {};
32081
+ headerParameters["Content-Type"] = "application/json";
32082
+ if (this.configuration && this.configuration.accessToken) {
32083
+ const token = this.configuration.accessToken;
32084
+ const tokenString = await token("Bearer", []);
32085
+ if (tokenString) {
32086
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
32087
+ }
32088
+ }
32089
+ let urlPath = `/api/v2/{projectId}/objectlabels/{objectType}/addlabels`;
32090
+ urlPath = urlPath.replace(`{${"objectType"}}`, encodeURIComponent(String(requestParameters["objectType"])));
32091
+ urlPath = urlPath.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters["projectId"])));
32092
+ return {
32093
+ path: urlPath,
32094
+ method: "POST",
32095
+ headers: headerParameters,
32096
+ query: queryParameters,
32097
+ body: UiPathTestManagementHubTestManagementAbstractionsDTOsBulkAddLabelsRequestDtoToJSON(requestParameters["uiPathTestManagementHubTestManagementAbstractionsDTOsBulkAddLabelsRequestDto"])
32098
+ };
32099
+ }
32100
+ async objectLabelsAddLabelsForObjectIdsRaw(requestParameters, initOverrides) {
32101
+ const requestOptions = await this.objectLabelsAddLabelsForObjectIdsRequestOpts(requestParameters);
32102
+ const response = await this.request(requestOptions, initOverrides);
32103
+ return new VoidApiResponse(response);
32104
+ }
32105
+ async objectLabelsAddLabelsForObjectIds(requestParameters, initOverrides) {
32106
+ await this.objectLabelsAddLabelsForObjectIdsRaw(requestParameters, initOverrides);
32107
+ }
32108
+ async objectLabelsGetAllObjectLabelsFilteredRequestOpts(requestParameters) {
32109
+ if (requestParameters["objectType"] == null) {
32110
+ throw new RequiredError("objectType", 'Required parameter "objectType" was null or undefined when calling objectLabelsGetAllObjectLabelsFiltered().');
32111
+ }
32112
+ if (requestParameters["projectId"] == null) {
32113
+ throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling objectLabelsGetAllObjectLabelsFiltered().');
32114
+ }
32115
+ const queryParameters = {};
32116
+ const headerParameters = {};
32117
+ headerParameters["Content-Type"] = "application/json-patch+json";
32118
+ if (this.configuration && this.configuration.accessToken) {
32119
+ const token = this.configuration.accessToken;
32120
+ const tokenString = await token("Bearer", []);
32121
+ if (tokenString) {
32122
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
32123
+ }
32124
+ }
32125
+ let urlPath = `/api/v2/{projectId}/objectlabels/{objectType}/filtered`;
32126
+ urlPath = urlPath.replace(`{${"objectType"}}`, encodeURIComponent(String(requestParameters["objectType"])));
32127
+ urlPath = urlPath.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters["projectId"])));
32128
+ return {
32129
+ path: urlPath,
32130
+ method: "POST",
32131
+ headers: headerParameters,
32132
+ query: queryParameters,
32133
+ body: UiPathTestManagementHubTestManagementAbstractionsRequestModelsObjectLabelsRequestModelToJSON(requestParameters["uiPathTestManagementHubTestManagementAbstractionsRequestModelsObjectLabelsRequestModel"])
32134
+ };
32135
+ }
32136
+ async objectLabelsGetAllObjectLabelsFilteredRaw(requestParameters, initOverrides) {
32137
+ const requestOptions = await this.objectLabelsGetAllObjectLabelsFilteredRequestOpts(requestParameters);
32138
+ const response = await this.request(requestOptions, initOverrides);
32139
+ return new VoidApiResponse(response);
32140
+ }
32141
+ async objectLabelsGetAllObjectLabelsFiltered(requestParameters, initOverrides) {
32142
+ await this.objectLabelsGetAllObjectLabelsFilteredRaw(requestParameters, initOverrides);
32143
+ }
32144
+ async objectLabelsGetByIdRequestOpts(requestParameters) {
32145
+ if (requestParameters["id"] == null) {
32146
+ throw new RequiredError("id", 'Required parameter "id" was null or undefined when calling objectLabelsGetById().');
32147
+ }
32148
+ if (requestParameters["objectType"] == null) {
32149
+ throw new RequiredError("objectType", 'Required parameter "objectType" was null or undefined when calling objectLabelsGetById().');
32150
+ }
32151
+ if (requestParameters["projectId"] == null) {
32152
+ throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling objectLabelsGetById().');
32153
+ }
32154
+ const queryParameters = {};
32155
+ const headerParameters = {};
32156
+ if (this.configuration && this.configuration.accessToken) {
32157
+ const token = this.configuration.accessToken;
32158
+ const tokenString = await token("Bearer", []);
32159
+ if (tokenString) {
32160
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
32161
+ }
32162
+ }
32163
+ let urlPath = `/api/v2/{projectId}/objectlabels/{objectType}/{id}`;
32164
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters["id"])));
32165
+ urlPath = urlPath.replace(`{${"objectType"}}`, encodeURIComponent(String(requestParameters["objectType"])));
32166
+ urlPath = urlPath.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters["projectId"])));
32167
+ return {
32168
+ path: urlPath,
32169
+ method: "GET",
32170
+ headers: headerParameters,
32171
+ query: queryParameters
32172
+ };
32173
+ }
32174
+ async objectLabelsGetByIdRaw(requestParameters, initOverrides) {
32175
+ const requestOptions = await this.objectLabelsGetByIdRequestOpts(requestParameters);
32176
+ const response = await this.request(requestOptions, initOverrides);
32177
+ return new JSONApiResponse(response, (jsonValue) => UiPathTestManagementHubTestManagementAbstractionsDTOsObjectLabelDtoFromJSON(jsonValue));
32178
+ }
32179
+ async objectLabelsGetById(requestParameters, initOverrides) {
32180
+ const response = await this.objectLabelsGetByIdRaw(requestParameters, initOverrides);
32181
+ return await response.value();
32182
+ }
32183
+ async objectLabelsRemoveLabelsForObjectIdsRequestOpts(requestParameters) {
32184
+ if (requestParameters["objectType"] == null) {
32185
+ throw new RequiredError("objectType", 'Required parameter "objectType" was null or undefined when calling objectLabelsRemoveLabelsForObjectIds().');
32186
+ }
32187
+ if (requestParameters["projectId"] == null) {
32188
+ throw new RequiredError("projectId", 'Required parameter "projectId" was null or undefined when calling objectLabelsRemoveLabelsForObjectIds().');
32189
+ }
32190
+ const queryParameters = {};
32191
+ const headerParameters = {};
32192
+ headerParameters["Content-Type"] = "application/json";
32193
+ if (this.configuration && this.configuration.accessToken) {
32194
+ const token = this.configuration.accessToken;
32195
+ const tokenString = await token("Bearer", []);
32196
+ if (tokenString) {
32197
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
32198
+ }
32199
+ }
32200
+ let urlPath = `/api/v2/{projectId}/objectlabels/{objectType}/removelabels`;
32201
+ urlPath = urlPath.replace(`{${"objectType"}}`, encodeURIComponent(String(requestParameters["objectType"])));
32202
+ urlPath = urlPath.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters["projectId"])));
32203
+ return {
32204
+ path: urlPath,
32205
+ method: "POST",
32206
+ headers: headerParameters,
32207
+ query: queryParameters,
32208
+ body: UiPathTestManagementHubTestManagementAbstractionsDTOsBulkRemoveLabelsRequestDtoToJSON(requestParameters["uiPathTestManagementHubTestManagementAbstractionsDTOsBulkRemoveLabelsRequestDto"])
32209
+ };
32210
+ }
32211
+ async objectLabelsRemoveLabelsForObjectIdsRaw(requestParameters, initOverrides) {
32212
+ const requestOptions = await this.objectLabelsRemoveLabelsForObjectIdsRequestOpts(requestParameters);
32213
+ const response = await this.request(requestOptions, initOverrides);
32214
+ return new VoidApiResponse(response);
32215
+ }
32216
+ async objectLabelsRemoveLabelsForObjectIds(requestParameters, initOverrides) {
32217
+ await this.objectLabelsRemoveLabelsForObjectIdsRaw(requestParameters, initOverrides);
32218
+ }
32219
+ }
31614
32220
  // ../test-manager-sdk/generated/src/apis/ProjectsApi.ts
31615
32221
  class ProjectsApi extends BaseAPI {
31616
32222
  async projectsCreateRequestOpts(requestParameters) {
@@ -32666,6 +33272,12 @@ class TestCaseLogsApi extends BaseAPI {
32666
33272
  if (requestParameters["labels"] != null) {
32667
33273
  queryParameters["labels"] = requestParameters["labels"];
32668
33274
  }
33275
+ if (requestParameters["governed"] != null) {
33276
+ queryParameters["governed"] = requestParameters["governed"];
33277
+ }
33278
+ if (requestParameters["approvalStatus"] != null) {
33279
+ queryParameters["approvalStatus"] = requestParameters["approvalStatus"];
33280
+ }
32669
33281
  if (requestParameters["search"] != null) {
32670
33282
  queryParameters["search"] = requestParameters["search"];
32671
33283
  }
@@ -32779,6 +33391,12 @@ class TestCaseLogsApi extends BaseAPI {
32779
33391
  if (requestParameters["labels"] != null) {
32780
33392
  queryParameters["labels"] = requestParameters["labels"];
32781
33393
  }
33394
+ if (requestParameters["governed"] != null) {
33395
+ queryParameters["governed"] = requestParameters["governed"];
33396
+ }
33397
+ if (requestParameters["approvalStatus"] != null) {
33398
+ queryParameters["approvalStatus"] = requestParameters["approvalStatus"];
33399
+ }
32782
33400
  if (requestParameters["search"] != null) {
32783
33401
  queryParameters["search"] = requestParameters["search"];
32784
33402
  }
@@ -32856,6 +33474,12 @@ class TestCaseLogsApi extends BaseAPI {
32856
33474
  if (requestParameters["labels"] != null) {
32857
33475
  queryParameters["labels"] = requestParameters["labels"];
32858
33476
  }
33477
+ if (requestParameters["governed"] != null) {
33478
+ queryParameters["governed"] = requestParameters["governed"];
33479
+ }
33480
+ if (requestParameters["approvalStatus"] != null) {
33481
+ queryParameters["approvalStatus"] = requestParameters["approvalStatus"];
33482
+ }
32859
33483
  if (requestParameters["search"] != null) {
32860
33484
  queryParameters["search"] = requestParameters["search"];
32861
33485
  }
@@ -33934,32 +34558,7 @@ class InvalidBaseUrlError extends Error {
33934
34558
  this.name = "InvalidBaseUrlError";
33935
34559
  }
33936
34560
  }
33937
- var DEFAULT_SCOPES = [
33938
- "offline_access",
33939
- "ProcessMining",
33940
- "OrchestratorApiUserAccess",
33941
- "StudioWebBackend",
33942
- "IdentityServerApi",
33943
- "ConnectionService",
33944
- "DataService",
33945
- "DataServiceApiUserAccess",
33946
- "DocumentUnderstanding",
33947
- "EnterpriseContextService",
33948
- "Directory",
33949
- "JamJamApi",
33950
- "LLMGateway",
33951
- "LLMOps",
33952
- "OMS",
33953
- "RCS.FolderAuthorization",
33954
- "RCS.TagsManagement",
33955
- "TestmanagerApiUserAccess",
33956
- "AutomationSolutions",
33957
- "StudioWebTypeCacheService",
33958
- "Docs.GPT.Search",
33959
- "Insights",
33960
- "ReferenceToken",
33961
- "Audit.Read"
33962
- ];
34561
+ var DEFAULT_SCOPES = ["openid", "profile", "offline_access"];
33963
34562
  var normalizeAndValidateBaseUrl = (rawUrl) => {
33964
34563
  let baseUrl = rawUrl;
33965
34564
  if (baseUrl.endsWith("/identity_/")) {
@@ -34009,7 +34608,8 @@ var resolveConfigAsync = async ({
34009
34608
  if (!clientSecret && fileAuth.clientSecret) {
34010
34609
  clientSecret = fileAuth.clientSecret;
34011
34610
  }
34012
- const scopes = customScopes && customScopes.length > 0 ? customScopes : fileAuth.scopes && fileAuth.scopes.length > 0 ? fileAuth.scopes : DEFAULT_SCOPES;
34611
+ const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && Boolean(clientSecret);
34612
+ const scopes = customScopes && customScopes.length > 0 ? customScopes : fileAuth.scopes && fileAuth.scopes.length > 0 ? fileAuth.scopes : isExternalAppAuth ? [] : DEFAULT_SCOPES;
34013
34613
  return {
34014
34614
  clientId,
34015
34615
  clientSecret,
@@ -34509,6 +35109,129 @@ function normalizeTokenRefreshFailure() {
34509
35109
  function normalizeTokenRefreshUnavailableFailure() {
34510
35110
  return "token refresh failed before authentication completed";
34511
35111
  }
35112
+ function errorMessage(error) {
35113
+ return error instanceof Error ? error.message : String(error);
35114
+ }
35115
+ function computeExpirationThreshold(ensureTokenValidityMinutes) {
35116
+ return new Date(Date.now() + (ensureTokenValidityMinutes ?? 0) * 60 * 1000);
35117
+ }
35118
+ async function runRefreshLocked(inputs) {
35119
+ const {
35120
+ absolutePath,
35121
+ refreshToken: callerRefreshToken,
35122
+ customAuthority,
35123
+ ensureTokenValidityMinutes,
35124
+ loadEnvFile,
35125
+ saveEnvFile,
35126
+ refreshFn,
35127
+ resolveConfig: resolveConfig2
35128
+ } = inputs;
35129
+ const expirationThreshold = computeExpirationThreshold(ensureTokenValidityMinutes);
35130
+ let fresh;
35131
+ try {
35132
+ fresh = await loadEnvFile({ envPath: absolutePath });
35133
+ } catch (error) {
35134
+ return {
35135
+ kind: "fail",
35136
+ status: {
35137
+ loginStatus: "Refresh Failed",
35138
+ hint: "Could not read the auth file while refreshing. Retry, or run 'uip login' to re-authenticate.",
35139
+ tokenRefresh: {
35140
+ attempted: false,
35141
+ success: false,
35142
+ errorMessage: `auth file read failed: ${errorMessage(error)}`
35143
+ }
35144
+ }
35145
+ };
35146
+ }
35147
+ const freshAccess = fresh.UIPATH_ACCESS_TOKEN;
35148
+ const freshExp = freshAccess ? getTokenExpiration(freshAccess) : undefined;
35149
+ if (freshAccess && freshExp && freshExp > expirationThreshold) {
35150
+ return {
35151
+ kind: "ok",
35152
+ accessToken: freshAccess,
35153
+ refreshToken: fresh.UIPATH_REFRESH_TOKEN ?? callerRefreshToken,
35154
+ expiration: freshExp,
35155
+ tokenRefresh: { attempted: false, success: true }
35156
+ };
35157
+ }
35158
+ const tokenForIdP = fresh.UIPATH_REFRESH_TOKEN ?? callerRefreshToken;
35159
+ let refreshedAccess;
35160
+ let refreshedRefresh;
35161
+ try {
35162
+ const config = await resolveConfig2({ customAuthority });
35163
+ const refreshed = await refreshFn({
35164
+ refreshToken: tokenForIdP,
35165
+ tokenEndpoint: config.tokenEndpoint,
35166
+ clientId: config.clientId,
35167
+ expectedAuthority: customAuthority
35168
+ });
35169
+ refreshedAccess = refreshed.accessToken;
35170
+ refreshedRefresh = refreshed.refreshToken;
35171
+ } catch (error) {
35172
+ const isOAuthFailure = isTokenRefreshOAuthFailure(error);
35173
+ const hint = isOAuthFailure ? "Run 'uip login' to re-authenticate — the stored refresh token is invalid or expired." : "Token refresh failed. Check your network connection, then retry or run 'uip login' to re-authenticate.";
35174
+ const message = isOAuthFailure ? normalizeTokenRefreshFailure() : normalizeTokenRefreshUnavailableFailure();
35175
+ return {
35176
+ kind: "fail",
35177
+ status: {
35178
+ loginStatus: "Refresh Failed",
35179
+ hint,
35180
+ tokenRefresh: {
35181
+ attempted: true,
35182
+ success: false,
35183
+ errorMessage: message
35184
+ }
35185
+ }
35186
+ };
35187
+ }
35188
+ const refreshedExp = getTokenExpiration(refreshedAccess);
35189
+ if (!refreshedExp || refreshedExp <= new Date) {
35190
+ return {
35191
+ kind: "fail",
35192
+ status: {
35193
+ loginStatus: "Refresh Failed",
35194
+ hint: "The identity server returned an unusable token. Run 'uip login' to re-authenticate.",
35195
+ tokenRefresh: {
35196
+ attempted: true,
35197
+ success: false,
35198
+ errorMessage: "refreshed token has no valid expiration claim"
35199
+ }
35200
+ }
35201
+ };
35202
+ }
35203
+ try {
35204
+ await saveEnvFile({
35205
+ envPath: absolutePath,
35206
+ data: {
35207
+ UIPATH_ACCESS_TOKEN: refreshedAccess,
35208
+ UIPATH_REFRESH_TOKEN: refreshedRefresh
35209
+ },
35210
+ merge: true
35211
+ });
35212
+ return {
35213
+ kind: "ok",
35214
+ accessToken: refreshedAccess,
35215
+ refreshToken: refreshedRefresh,
35216
+ expiration: refreshedExp,
35217
+ tokenRefresh: { attempted: true, success: true }
35218
+ };
35219
+ } catch (error) {
35220
+ const msg = errorMessage(error);
35221
+ return {
35222
+ kind: "ok",
35223
+ accessToken: refreshedAccess,
35224
+ refreshToken: refreshedRefresh,
35225
+ expiration: refreshedExp,
35226
+ persistenceWarning: `Access token refreshed in memory but could not be written to ${absolutePath}: ${msg}. The next CLI invocation will fail until the file can be updated — run 'uip login' to re-authenticate.`,
35227
+ tokenRefresh: {
35228
+ attempted: true,
35229
+ success: true,
35230
+ errorMessage: `persistence failed: ${msg}`
35231
+ }
35232
+ };
35233
+ }
35234
+ }
34512
35235
  var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
34513
35236
  const {
34514
35237
  resolveEnvFilePath = resolveEnvFilePathAsync,
@@ -34583,73 +35306,103 @@ var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
34583
35306
  let refreshToken = credentials.UIPATH_REFRESH_TOKEN;
34584
35307
  let expiration = getTokenExpiration(accessToken);
34585
35308
  let persistenceWarning;
35309
+ let lockReleaseFailed = false;
34586
35310
  let tokenRefresh;
34587
- const expirationThreshold = new Date(Date.now() + (ensureTokenValidityMinutes ?? 0) * 60 * 1000);
34588
- if (expiration && expiration <= expirationThreshold && refreshToken) {
34589
- let refreshedAccess;
34590
- let refreshedRefresh;
35311
+ const outerThreshold = computeExpirationThreshold(ensureTokenValidityMinutes);
35312
+ const tryGlobalCredsHint = async () => {
35313
+ const fs7 = getFs();
35314
+ const globalPath = fs7.path.join(fs7.env.homedir(), envFilePath);
35315
+ if (absolutePath === globalPath)
35316
+ return;
35317
+ if (!await fs7.exists(globalPath))
35318
+ return;
34591
35319
  try {
34592
- const config = await resolveConfig2({
34593
- customAuthority: credentials.UIPATH_URL
34594
- });
34595
- const refreshed = await refreshTokenFn({
34596
- refreshToken,
34597
- tokenEndpoint: config.tokenEndpoint,
34598
- clientId: config.clientId,
34599
- expectedAuthority: credentials.UIPATH_URL
34600
- });
34601
- refreshedAccess = refreshed.accessToken;
34602
- refreshedRefresh = refreshed.refreshToken;
35320
+ const globalCreds = await loadEnvFile({ envPath: globalPath });
35321
+ if (!globalCreds.UIPATH_ACCESS_TOKEN)
35322
+ return;
35323
+ const globalExp = getTokenExpiration(globalCreds.UIPATH_ACCESS_TOKEN);
35324
+ if (globalExp && globalExp <= new Date)
35325
+ return;
35326
+ return `Local credentials file at ${absolutePath} has expired credentials. Valid credentials exist in ${globalPath}. Remove the local file or run 'uip login' to re-authenticate.`;
35327
+ } catch {
35328
+ return;
35329
+ }
35330
+ };
35331
+ if (expiration && expiration <= outerThreshold && refreshToken) {
35332
+ let release;
35333
+ try {
35334
+ release = await getFs().acquireLock(absolutePath);
34603
35335
  } catch (error) {
34604
- const isOAuthFailure = isTokenRefreshOAuthFailure(error);
34605
- const hint = isOAuthFailure ? "Run 'uip login' to re-authenticate — the stored refresh token is invalid or expired." : "Token refresh failed. Check your network connection, then retry or run 'uip login' to re-authenticate.";
34606
- const errorMessage = isOAuthFailure ? normalizeTokenRefreshFailure() : normalizeTokenRefreshUnavailableFailure();
35336
+ const msg = errorMessage(error);
35337
+ const globalHint = await tryGlobalCredsHint();
35338
+ if (globalHint) {
35339
+ return {
35340
+ loginStatus: "Expired",
35341
+ accessToken,
35342
+ refreshToken,
35343
+ baseUrl: credentials.UIPATH_URL,
35344
+ organizationName: credentials.UIPATH_ORGANIZATION_NAME,
35345
+ organizationId: credentials.UIPATH_ORGANIZATION_ID,
35346
+ tenantName: credentials.UIPATH_TENANT_NAME,
35347
+ tenantId: credentials.UIPATH_TENANT_ID,
35348
+ expiration,
35349
+ source: "file" /* File */,
35350
+ hint: globalHint,
35351
+ tokenRefresh: {
35352
+ attempted: false,
35353
+ success: false,
35354
+ errorMessage: `lock acquisition failed: ${msg}`
35355
+ }
35356
+ };
35357
+ }
34607
35358
  return {
34608
35359
  loginStatus: "Refresh Failed",
34609
- hint,
35360
+ hint: "Could not acquire the auth-file lock — too many concurrent `uip` processes, or a permission issue on the auth directory. Retry, or run 'uip login' to re-authenticate.",
34610
35361
  tokenRefresh: {
34611
- attempted: true,
35362
+ attempted: false,
34612
35363
  success: false,
34613
- errorMessage
35364
+ errorMessage: `lock acquisition failed: ${msg}`
34614
35365
  }
34615
35366
  };
34616
35367
  }
34617
- const refreshedExp = getTokenExpiration(refreshedAccess);
34618
- if (!refreshedExp || refreshedExp <= new Date) {
34619
- return {
34620
- loginStatus: "Refresh Failed",
34621
- hint: "The identity server returned an unusable token. Run 'uip login' to re-authenticate.",
34622
- tokenRefresh: {
34623
- attempted: true,
34624
- success: false,
34625
- errorMessage: "refreshed token has no valid expiration claim"
35368
+ let lockedFailure;
35369
+ try {
35370
+ const outcome = await runRefreshLocked({
35371
+ absolutePath,
35372
+ refreshToken,
35373
+ customAuthority: credentials.UIPATH_URL,
35374
+ ensureTokenValidityMinutes,
35375
+ loadEnvFile,
35376
+ saveEnvFile,
35377
+ refreshFn: refreshTokenFn,
35378
+ resolveConfig: resolveConfig2
35379
+ });
35380
+ if (outcome.kind === "fail") {
35381
+ lockedFailure = outcome.status;
35382
+ } else {
35383
+ accessToken = outcome.accessToken;
35384
+ refreshToken = outcome.refreshToken;
35385
+ expiration = outcome.expiration;
35386
+ tokenRefresh = outcome.tokenRefresh;
35387
+ if (outcome.persistenceWarning) {
35388
+ persistenceWarning = outcome.persistenceWarning;
34626
35389
  }
34627
- };
35390
+ }
35391
+ } finally {
35392
+ try {
35393
+ await release();
35394
+ } catch {
35395
+ lockReleaseFailed = true;
35396
+ }
34628
35397
  }
34629
- accessToken = refreshedAccess;
34630
- refreshToken = refreshedRefresh;
34631
- expiration = refreshedExp;
34632
- try {
34633
- await saveEnvFile({
34634
- envPath: absolutePath,
34635
- data: {
34636
- UIPATH_ACCESS_TOKEN: accessToken,
34637
- UIPATH_REFRESH_TOKEN: refreshToken
34638
- },
34639
- merge: true
34640
- });
34641
- tokenRefresh = {
34642
- attempted: true,
34643
- success: true
34644
- };
34645
- } catch (error) {
34646
- const msg = error instanceof Error ? error.message : String(error);
34647
- persistenceWarning = `Access token refreshed in memory but could not be written to ${absolutePath}: ${msg}. The next CLI invocation will fail until the file can be updated — run 'uip login' to re-authenticate.`;
34648
- tokenRefresh = {
34649
- attempted: true,
34650
- success: true,
34651
- errorMessage: `persistence failed: ${msg}`
34652
- };
35398
+ if (lockedFailure) {
35399
+ const globalHint = await tryGlobalCredsHint();
35400
+ const base = globalHint ? {
35401
+ ...lockedFailure,
35402
+ loginStatus: "Expired",
35403
+ hint: globalHint
35404
+ } : lockedFailure;
35405
+ return lockReleaseFailed ? { ...base, lockReleaseFailed: true } : base;
34653
35406
  }
34654
35407
  }
34655
35408
  const result = {
@@ -34664,23 +35417,13 @@ var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
34664
35417
  expiration,
34665
35418
  source: "file" /* File */,
34666
35419
  ...persistenceWarning ? { hint: persistenceWarning, persistenceFailed: true } : {},
35420
+ ...lockReleaseFailed ? { lockReleaseFailed: true } : {},
34667
35421
  ...tokenRefresh ? { tokenRefresh } : {}
34668
35422
  };
34669
35423
  if (result.loginStatus === "Expired") {
34670
- const fs7 = getFs();
34671
- const globalPath = fs7.path.join(fs7.env.homedir(), envFilePath);
34672
- if (absolutePath !== globalPath && await fs7.exists(globalPath)) {
34673
- try {
34674
- const globalCreds = await loadEnvFile({
34675
- envPath: globalPath
34676
- });
34677
- if (globalCreds.UIPATH_ACCESS_TOKEN) {
34678
- const globalExp = getTokenExpiration(globalCreds.UIPATH_ACCESS_TOKEN);
34679
- if (!globalExp || globalExp > new Date) {
34680
- result.hint = `Local credentials file at ${absolutePath} has expired credentials. Valid credentials exist in ${globalPath}. Remove the local file or run 'uip login' to re-authenticate.`;
34681
- }
34682
- }
34683
- } catch {}
35424
+ const globalHint = await tryGlobalCredsHint();
35425
+ if (globalHint) {
35426
+ result.hint = globalHint;
34684
35427
  }
34685
35428
  }
34686
35429
  return result;
@@ -34728,6 +35471,10 @@ var getAuthContext = async (options = {}) => {
34728
35471
  init_src();
34729
35472
  // ../auth/src/logout.ts
34730
35473
  init_src();
35474
+
35475
+ // ../auth/src/index.ts
35476
+ init_server();
35477
+
34731
35478
  // src/utils/shared.ts
34732
35479
  var ENCODING_MARKERS = [
34733
35480
  "\uFEFF",
@@ -37466,24 +38213,386 @@ var registerExecutionCommand = (program2) => {
37466
38213
  processContext.exit(1);
37467
38214
  return;
37468
38215
  }
37469
- const { top, skip } = pagination;
37470
- logger.debug(`Fetching filtered executions for project ${projectId}`);
37471
- const executionsApi = new TestExecutionsApi(tmConfig);
37472
- const [error, page] = await catchError(executionsApi.testExecutionsGetFilteredTestExecutions({
37473
- projectId,
37474
- uiPathTestManagementHubTestManagementAbstractionsRequestModelsTestExecutionsFilterRequestModel: toFilteredRequestBody(projectId, {
37475
- testSetId: options.testSetId,
37476
- updatedBy: options.updatedBy,
37477
- status: options.status,
37478
- executionType: options.executionType,
37479
- executionFinishedInterval: options.executionFinishedInterval,
37480
- labels: options.labels,
37481
- testExecutionIds: options.testExecutionIds,
37482
- search: options.search,
37483
- orderBy: options.sortBy,
37484
- top,
37485
- skip
37486
- })
38216
+ const { top, skip } = pagination;
38217
+ logger.debug(`Fetching filtered executions for project ${projectId}`);
38218
+ const executionsApi = new TestExecutionsApi(tmConfig);
38219
+ const [error, page] = await catchError(executionsApi.testExecutionsGetFilteredTestExecutions({
38220
+ projectId,
38221
+ uiPathTestManagementHubTestManagementAbstractionsRequestModelsTestExecutionsFilterRequestModel: toFilteredRequestBody(projectId, {
38222
+ testSetId: options.testSetId,
38223
+ updatedBy: options.updatedBy,
38224
+ status: options.status,
38225
+ executionType: options.executionType,
38226
+ executionFinishedInterval: options.executionFinishedInterval,
38227
+ labels: options.labels,
38228
+ testExecutionIds: options.testExecutionIds,
38229
+ search: options.search,
38230
+ orderBy: options.sortBy,
38231
+ top,
38232
+ skip
38233
+ })
38234
+ }));
38235
+ if (error) {
38236
+ const { message, details } = await extractErrorDetails2(error, {
38237
+ forbiddenMessage: TM_FORBIDDEN_MESSAGE
38238
+ });
38239
+ OutputFormatter.error({
38240
+ Result: RESULTS.Failure,
38241
+ Message: message,
38242
+ Instructions: details
38243
+ });
38244
+ processContext.exit(1);
38245
+ return;
38246
+ }
38247
+ const items = page.data ?? [];
38248
+ const rows = items.map(toOutput2);
38249
+ OutputFormatter.success(new SuccessOutput("ExecutionsListFiltered", rows));
38250
+ });
38251
+ const testcaselogs = executionCmd.command("testcaselogs").description("Inspect test case logs produced by a test execution.");
38252
+ testcaselogs.command("list").description("List test case logs for a test execution.").requiredOption("--execution-id <uuid>", "Test execution UUID").requiredOption("--project-key <key>", "Test Manager project key (e.g. DEMO)").option("--only-failed", "Show only failed test case logs").option("--filter <text>", "Search test case logs by name").addOption(new Option("--results <results...>", `Filter by results (space-separated: ${Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult).join(" ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult))).addOption(new Option("--statuses <statuses...>", `Filter by execution statuses (space-separated: ${Object.values(UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus).join(" ")})`).choices(Object.values(UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus))).addOption(new Option("--duration-period <period>", `Filter by duration period (${Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsDurationPeriod).join(", ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsDurationPeriod))).option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(EXECUTION_LIST_TESTCASELOGS_EXAMPLES).trackedAction(processContext, async (options) => {
38253
+ const [authError, ctx] = await catchError(initializeContextWithProject(options));
38254
+ if (authError) {
38255
+ OutputFormatter.error({
38256
+ Result: RESULTS.Failure,
38257
+ Message: authError.message,
38258
+ Instructions: instructionsFor("auth")
38259
+ });
38260
+ processContext.exit(1);
38261
+ return;
38262
+ }
38263
+ if (!ctx)
38264
+ return;
38265
+ const { tmConfig, projectId } = ctx;
38266
+ const executionId = options.executionId;
38267
+ const pagination = resolvePaginationOptions(options);
38268
+ if (pagination.error) {
38269
+ OutputFormatter.error({
38270
+ Result: RESULTS.Failure,
38271
+ Message: pagination.error.message,
38272
+ Instructions: pagination.error.instructions
38273
+ });
38274
+ processContext.exit(1);
38275
+ return;
38276
+ }
38277
+ const { top, skip } = pagination;
38278
+ logger.debug(`Fetching test case logs for execution ${executionId}`);
38279
+ const testCaseLogsApi = new TestCaseLogsApi(tmConfig);
38280
+ const [error, page] = await catchError(testCaseLogsApi.testCaseLogsGetTestCaseLogsByTestExecutionId(toRequestBodyByExecutionId(executionId, projectId, {
38281
+ onlyFailed: options.onlyFailed,
38282
+ filter: options.filter,
38283
+ results: options.results,
38284
+ statuses: options.statuses,
38285
+ durationPeriod: options.durationPeriod,
38286
+ top,
38287
+ skip
38288
+ })));
38289
+ if (error) {
38290
+ const { message, details } = await extractErrorDetails2(error, {
38291
+ forbiddenMessage: TM_FORBIDDEN_MESSAGE
38292
+ });
38293
+ OutputFormatter.error({
38294
+ Result: RESULTS.Failure,
38295
+ Message: message,
38296
+ Instructions: details
38297
+ });
38298
+ processContext.exit(1);
38299
+ return;
38300
+ }
38301
+ OutputFormatter.success(new SuccessOutput("ExecutionTestCaseLogs", toOutput3(page.data ?? [])));
38302
+ });
38303
+ };
38304
+ async function fetchAllFailedLogIds(api, projectId, testExecutionId) {
38305
+ const ids = [];
38306
+ const top = 50;
38307
+ let skip = 0;
38308
+ while (true) {
38309
+ const page = await api.testCaseLogsGetTestCaseLogsByTestExecutionId({
38310
+ testExecutionId,
38311
+ projectId,
38312
+ onlyFailed: true,
38313
+ top,
38314
+ skip
38315
+ });
38316
+ const typedPage = page;
38317
+ const items = typedPage.data ?? [];
38318
+ for (const item of items) {
38319
+ if (typeof item.id === "string" && item.id.length > 0) {
38320
+ ids.push(item.id);
38321
+ }
38322
+ }
38323
+ const hasNextPage = typedPage.paging?.nextPage === true;
38324
+ if (!hasNextPage || items.length < top)
38325
+ break;
38326
+ skip += top;
38327
+ }
38328
+ return ids;
38329
+ }
38330
+
38331
+ // src/mappers/input/objectlabel.input.ts
38332
+ function toGetByIdRequest4(projectId, objectType, id) {
38333
+ return { projectId, objectType, id };
38334
+ }
38335
+ function toFilteredRequest3(projectId, objectType, options) {
38336
+ return {
38337
+ projectId,
38338
+ objectType,
38339
+ uiPathTestManagementHubTestManagementAbstractionsRequestModelsObjectLabelsRequestModel: {
38340
+ projectId,
38341
+ objType: objectType,
38342
+ ...options.objectIds && options.objectIds.length > 0 && {
38343
+ objectIds: options.objectIds
38344
+ },
38345
+ ...options.labelTypes && options.labelTypes.length > 0 && {
38346
+ labelTypes: options.labelTypes
38347
+ },
38348
+ ...options.search && { search: options.search },
38349
+ ...options.orderBy && { orderBy: options.orderBy },
38350
+ top: options.top,
38351
+ skip: options.skip
38352
+ }
38353
+ };
38354
+ }
38355
+ function toBulkAddRequest2(projectId, objectType, options) {
38356
+ return {
38357
+ projectId,
38358
+ objectType,
38359
+ uiPathTestManagementHubTestManagementAbstractionsDTOsBulkAddLabelsRequestDto: {
38360
+ projectId,
38361
+ objectType,
38362
+ objectIds: options.objectIds,
38363
+ labels: options.labels,
38364
+ ...options.removeOtherLabels !== undefined && {
38365
+ removeOtherLabels: options.removeOtherLabels
38366
+ }
38367
+ }
38368
+ };
38369
+ }
38370
+ function toBulkRemoveRequest2(projectId, objectType, options) {
38371
+ return {
38372
+ projectId,
38373
+ objectType,
38374
+ uiPathTestManagementHubTestManagementAbstractionsDTOsBulkRemoveLabelsRequestDto: {
38375
+ projectId,
38376
+ objectType,
38377
+ objectIds: options.objectIds,
38378
+ ...options.labels && options.labels.length > 0 && {
38379
+ labels: options.labels
38380
+ },
38381
+ ...options.removeAllLabels !== undefined && {
38382
+ removeAllLabels: options.removeAllLabels
38383
+ }
38384
+ }
38385
+ };
38386
+ }
38387
+
38388
+ // src/mappers/output/objectlabel.output.ts
38389
+ var OBJECT_TYPE_BY_NUM2 = {
38390
+ 1: "Project",
38391
+ 2: "Requirement",
38392
+ 3: "TestCase",
38393
+ 4: "TestSet",
38394
+ 5: "TestExecution",
38395
+ 6: "TestStepLog",
38396
+ 7: "TestCaseLog",
38397
+ 8: "Defect",
38398
+ 9: "TestCaseLogAssertion",
38399
+ 20: "ExplorationResult"
38400
+ };
38401
+ var OBJECT_TYPE_CAMEL_TO_PASCAL = {
38402
+ project: "Project",
38403
+ requirement: "Requirement",
38404
+ testCase: "TestCase",
38405
+ testSet: "TestSet",
38406
+ testExecution: "TestExecution",
38407
+ testStepLog: "TestStepLog",
38408
+ testCaseLog: "TestCaseLog",
38409
+ defect: "Defect",
38410
+ testCaseLogAssertion: "TestCaseLogAssertion",
38411
+ explorationResult: "ExplorationResult"
38412
+ };
38413
+ function objectTypeToString2(value) {
38414
+ if (value == null)
38415
+ return "";
38416
+ if (typeof value === "number")
38417
+ return OBJECT_TYPE_BY_NUM2[value] ?? "";
38418
+ const str2 = String(value);
38419
+ return OBJECT_TYPE_CAMEL_TO_PASCAL[str2] ?? str2;
38420
+ }
38421
+ var LABEL_TYPE_BY_NUM = {
38422
+ 0: "UserLabel",
38423
+ 1: "SystemLabel",
38424
+ 2: "InternalLabel"
38425
+ };
38426
+ var LABEL_TYPE_CAMEL_TO_PASCAL = {
38427
+ userLabel: "UserLabel",
38428
+ systemLabel: "SystemLabel",
38429
+ internalLabel: "InternalLabel"
38430
+ };
38431
+ function labelTypeToString(value) {
38432
+ if (value == null)
38433
+ return "";
38434
+ if (typeof value === "number")
38435
+ return LABEL_TYPE_BY_NUM[value] ?? "";
38436
+ const str2 = String(value);
38437
+ return LABEL_TYPE_CAMEL_TO_PASCAL[str2] ?? str2;
38438
+ }
38439
+ function toObjectLabelOutput(dto) {
38440
+ return {
38441
+ Id: dto.id ?? "",
38442
+ ProjectId: dto.projectId ?? "",
38443
+ ObjectId: dto.objectId ?? "",
38444
+ ObjectType: objectTypeToString2(dto.objectType),
38445
+ Name: dto.name ?? "",
38446
+ Description: dto.description ?? "",
38447
+ LabelType: labelTypeToString(dto.labelType)
38448
+ };
38449
+ }
38450
+
38451
+ // src/commands/objectlabel.ts
38452
+ var OBJECT_LABEL_OBJECT_TYPE_MAP = {
38453
+ Requirement: "requirement",
38454
+ TestCase: "testCase",
38455
+ TestSet: "testSet",
38456
+ TestExecution: "testExecution",
38457
+ TestCaseLog: "testCaseLog"
38458
+ };
38459
+ var OBJECT_LABEL_OBJECT_TYPES = Object.keys(OBJECT_LABEL_OBJECT_TYPE_MAP);
38460
+ function parseObjectLabelObjectType(raw) {
38461
+ if (!Object.hasOwn(OBJECT_LABEL_OBJECT_TYPE_MAP, raw)) {
38462
+ throw new InvalidArgumentError(`Invalid value "${raw}". Must be one of: ${OBJECT_LABEL_OBJECT_TYPES.join(", ")}.`);
38463
+ }
38464
+ return OBJECT_LABEL_OBJECT_TYPE_MAP[raw];
38465
+ }
38466
+ var OBJECT_LABEL_LABEL_TYPE_MAP = {
38467
+ UserLabel: "userLabel",
38468
+ SystemLabel: "systemLabel",
38469
+ InternalLabel: "internalLabel"
38470
+ };
38471
+ var OBJECT_LABEL_LABEL_TYPES = Object.keys(OBJECT_LABEL_LABEL_TYPE_MAP);
38472
+ function parseObjectLabelLabelType(raw) {
38473
+ if (!Object.hasOwn(OBJECT_LABEL_LABEL_TYPE_MAP, raw)) {
38474
+ throw new InvalidArgumentError(`Invalid value "${raw}". Must be one of: ${OBJECT_LABEL_LABEL_TYPES.join(", ")}.`);
38475
+ }
38476
+ return OBJECT_LABEL_LABEL_TYPE_MAP[raw];
38477
+ }
38478
+ var LABEL_EXAMPLE_RECORD2 = {
38479
+ Id: "a1b2c3d4-0000-0000-0000-000000000001",
38480
+ ProjectId: "p1",
38481
+ ObjectId: "f9e8d7c6-0000-0000-0000-000000000001",
38482
+ ObjectType: "TestCase",
38483
+ Name: "smoke",
38484
+ Description: "",
38485
+ LabelType: "UserLabel"
38486
+ };
38487
+ var LIST_EXAMPLES = [
38488
+ {
38489
+ Description: "Paginated label names for one object type, with optional prefix filter",
38490
+ Command: "uip tm objectlabel list --project-key DEMO --object-type TestCase --filter smo --limit 50",
38491
+ Output: {
38492
+ Code: "ObjectLabelsList",
38493
+ Data: [{ Name: "smoke" }, { Name: "smoke-test" }]
38494
+ }
38495
+ },
38496
+ {
38497
+ Description: "Narrow by label-types and target object UUIDs",
38498
+ Command: "uip tm objectlabel list --project-key DEMO --object-type TestCase --label-types UserLabel --object-ids id1 id2",
38499
+ Output: {
38500
+ Code: "ObjectLabelsList",
38501
+ Data: [{ Name: "smoke" }, { Name: "regression" }]
38502
+ }
38503
+ }
38504
+ ];
38505
+ var GET_EXAMPLES = [
38506
+ {
38507
+ Description: "Get a label assignment row by id",
38508
+ Command: "uip tm objectlabel get --project-key DEMO --object-type TestCase --label-id a1b2c3d4-...",
38509
+ Output: { Code: "ObjectLabelGet", Data: LABEL_EXAMPLE_RECORD2 }
38510
+ }
38511
+ ];
38512
+ var ADD_EXAMPLES = [
38513
+ {
38514
+ Description: "Add multiple labels to multiple objects in one call",
38515
+ Command: "uip tm objectlabel add --project-key DEMO --object-type TestCase --object-ids id1 id2 --labels smoke regression",
38516
+ Output: {
38517
+ Code: "ObjectLabelsAdd",
38518
+ Data: { ObjectCount: 2, LabelCount: 2, Result: "Added" }
38519
+ }
38520
+ }
38521
+ ];
38522
+ var REMOVE_EXAMPLES = [
38523
+ {
38524
+ Description: "Remove specific labels from multiple objects (LabelCount echoes the supplied --labels count)",
38525
+ Command: "uip tm objectlabel remove --project-key DEMO --object-type TestCase --object-ids id1 id2 --labels regression",
38526
+ Output: {
38527
+ Code: "ObjectLabelsRemove",
38528
+ Data: { ObjectCount: 2, LabelCount: 1, Result: "Removed" }
38529
+ }
38530
+ },
38531
+ {
38532
+ Description: "Clear every non-system label on the listed objects (use without --labels — the two flags are mutually exclusive)",
38533
+ Command: "uip tm objectlabel remove --project-key DEMO --object-type TestCase --object-ids id1 id2 --remove-all-labels",
38534
+ Output: {
38535
+ Code: "ObjectLabelsRemove",
38536
+ Data: {
38537
+ ObjectCount: 2,
38538
+ RemoveAllLabels: true,
38539
+ Result: "AllRemoved"
38540
+ }
38541
+ }
38542
+ }
38543
+ ];
38544
+ var registerObjectLabelCommand = (program2) => {
38545
+ const cmd = program2.command("objectlabel").description("Manage Test Manager object labels (tags applied to requirements, test cases, test sets, executions, and case logs).");
38546
+ cmd.command("list").description("List distinct label names for one object type (paginated). Use --limit/--offset to page; --filter to narrow by name prefix.").requiredOption("--project-key <key>", "Test Manager project key").requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet, TestExecution, TestCaseLog", parseObjectLabelObjectType).option("--object-ids <uuid...>", "Restrict to labels assigned to these objects (space-separated)").option("--label-types <type...>", "Filter by label types: UserLabel, SystemLabel, InternalLabel (defaults to UserLabel + SystemLabel)", (value, acc) => [
38547
+ ...acc,
38548
+ parseObjectLabelLabelType(value)
38549
+ ], []).option("--filter <text>", "Prefix to match label names against (server-side StartsWith)").option("--sort-by <expr>", "Sort results (e.g. 'name asc')").option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(LIST_EXAMPLES).trackedAction(processContext, async (options) => {
38550
+ const [authError, ctx] = await catchError(initializeContextWithProject(options));
38551
+ if (authError) {
38552
+ OutputFormatter.error({
38553
+ Result: RESULTS.Failure,
38554
+ Message: authError.message,
38555
+ Instructions: instructionsFor("auth")
38556
+ });
38557
+ processContext.exit(1);
38558
+ return;
38559
+ }
38560
+ if (!ctx)
38561
+ return;
38562
+ const { tmConfig, projectId } = ctx;
38563
+ const pagination = resolvePaginationOptions(options);
38564
+ if (pagination.error) {
38565
+ OutputFormatter.error({
38566
+ Result: RESULTS.Failure,
38567
+ Message: pagination.error.message,
38568
+ Instructions: pagination.error.instructions
38569
+ });
38570
+ processContext.exit(1);
38571
+ return;
38572
+ }
38573
+ const top = pagination.top;
38574
+ const skip = pagination.skip;
38575
+ const objectIds = Array.isArray(options.objectIds) ? options.objectIds : [];
38576
+ const labelTypes = Array.isArray(options.labelTypes) ? options.labelTypes : [];
38577
+ const api = new ObjectLabelsApi(tmConfig);
38578
+ const [error, envelope] = await catchError(api.objectLabelsGetAllObjectLabelsFilteredRaw(toFilteredRequest3(projectId, options.objectType, {
38579
+ ...objectIds.length > 0 && { objectIds },
38580
+ ...labelTypes.length > 0 && { labelTypes },
38581
+ ...options.filter && {
38582
+ search: options.filter
38583
+ },
38584
+ ...options.sortBy && {
38585
+ orderBy: options.sortBy
38586
+ },
38587
+ top,
38588
+ skip
38589
+ })).then(async (r) => {
38590
+ const rawForError = r.raw.clone();
38591
+ try {
38592
+ return await r.raw.json();
38593
+ } catch (parseError) {
38594
+ throw new ResponseError(rawForError, `Expected a JSON API response but received: ${parseError instanceof Error ? parseError.message : String(parseError)}`);
38595
+ }
37487
38596
  }));
37488
38597
  if (error) {
37489
38598
  const { message, details } = await extractErrorDetails2(error, {
@@ -37497,12 +38606,10 @@ var registerExecutionCommand = (program2) => {
37497
38606
  processContext.exit(1);
37498
38607
  return;
37499
38608
  }
37500
- const items = page.data ?? [];
37501
- const rows = items.map(toOutput2);
37502
- OutputFormatter.success(new SuccessOutput("ExecutionsListFiltered", rows));
38609
+ const labels = Array.isArray(envelope?.data) ? envelope.data : [];
38610
+ OutputFormatter.success(new SuccessOutput("ObjectLabelsList", labels.map((Name) => ({ Name }))));
37503
38611
  });
37504
- const testcaselogs = executionCmd.command("testcaselogs").description("Inspect test case logs produced by a test execution.");
37505
- testcaselogs.command("list").description("List test case logs for a test execution.").requiredOption("--execution-id <uuid>", "Test execution UUID").requiredOption("--project-key <key>", "Test Manager project key (e.g. DEMO)").option("--only-failed", "Show only failed test case logs").option("--filter <text>", "Search test case logs by name").addOption(new Option("--results <results...>", `Filter by results (space-separated: ${Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult).join(" ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsDTOsResult))).addOption(new Option("--statuses <statuses...>", `Filter by execution statuses (space-separated: ${Object.values(UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus).join(" ")})`).choices(Object.values(UiPathTestManagementHubCommonEnumsTestCaseLogExecutionStatus))).addOption(new Option("--duration-period <period>", `Filter by duration period (${Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsDurationPeriod).join(", ")})`).choices(Object.values(UiPathTestManagementHubTestManagementAbstractionsEnumsDurationPeriod))).option("--limit <number>", "Number of results per page (default: 50)").option("--offset <number>", "Number of results to skip (default: 0)").addOption(new Option("--top <number>").hideHelp()).addOption(new Option("--skip <number>").hideHelp()).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(EXECUTION_LIST_TESTCASELOGS_EXAMPLES).trackedAction(processContext, async (options) => {
38612
+ cmd.command("get").description("Get a single label assignment row by its label id.").requiredOption("--project-key <key>", "Test Manager project key").requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet, TestExecution, TestCaseLog", parseObjectLabelObjectType).requiredOption("--label-id <uuid>", "Label assignment UUID").option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(GET_EXAMPLES).trackedAction(processContext, async (options) => {
37506
38613
  const [authError, ctx] = await catchError(initializeContextWithProject(options));
37507
38614
  if (authError) {
37508
38615
  OutputFormatter.error({
@@ -37516,28 +38623,45 @@ var registerExecutionCommand = (program2) => {
37516
38623
  if (!ctx)
37517
38624
  return;
37518
38625
  const { tmConfig, projectId } = ctx;
37519
- const executionId = options.executionId;
37520
- const pagination = resolvePaginationOptions(options);
37521
- if (pagination.error) {
38626
+ const api = new ObjectLabelsApi(tmConfig);
38627
+ const [error, dto] = await catchError(api.objectLabelsGetById(toGetByIdRequest4(projectId, options.objectType, options.labelId)));
38628
+ if (error) {
38629
+ const { message, details } = await extractErrorDetails2(error, {
38630
+ forbiddenMessage: TM_FORBIDDEN_MESSAGE
38631
+ });
37522
38632
  OutputFormatter.error({
37523
38633
  Result: RESULTS.Failure,
37524
- Message: pagination.error.message,
37525
- Instructions: pagination.error.instructions
38634
+ Message: message,
38635
+ Instructions: details
37526
38636
  });
37527
38637
  processContext.exit(1);
37528
38638
  return;
37529
38639
  }
37530
- const { top, skip } = pagination;
37531
- logger.debug(`Fetching test case logs for execution ${executionId}`);
37532
- const testCaseLogsApi = new TestCaseLogsApi(tmConfig);
37533
- const [error, page] = await catchError(testCaseLogsApi.testCaseLogsGetTestCaseLogsByTestExecutionId(toRequestBodyByExecutionId(executionId, projectId, {
37534
- onlyFailed: options.onlyFailed,
37535
- filter: options.filter,
37536
- results: options.results,
37537
- statuses: options.statuses,
37538
- durationPeriod: options.durationPeriod,
37539
- top,
37540
- skip
38640
+ OutputFormatter.success(new SuccessOutput("ObjectLabelGet", toObjectLabelOutput(dto)));
38641
+ });
38642
+ cmd.command("add").description("Add multiple labels to multiple objects in one call. " + "Use --remove-other-labels to make this an authoritative set " + "(deletes any non-system labels not present in --labels).").requiredOption("--project-key <key>", "Test Manager project key").requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet, TestExecution, TestCaseLog", parseObjectLabelObjectType).requiredOption("--object-ids <uuid...>", "Target object UUIDs (space-separated)").requiredOption("--labels <name...>", "Label names to add (space-separated)").option("--remove-other-labels", "After adding, delete any non-system labels on these objects that are not in --labels", false).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(ADD_EXAMPLES).trackedAction(processContext, async (options) => {
38643
+ const objectIds = options.objectIds;
38644
+ const labels = options.labels;
38645
+ const [authError, ctx] = await catchError(initializeContextWithProject(options));
38646
+ if (authError) {
38647
+ OutputFormatter.error({
38648
+ Result: RESULTS.Failure,
38649
+ Message: authError.message,
38650
+ Instructions: instructionsFor("auth")
38651
+ });
38652
+ processContext.exit(1);
38653
+ return;
38654
+ }
38655
+ if (!ctx)
38656
+ return;
38657
+ const { tmConfig, projectId } = ctx;
38658
+ const api = new ObjectLabelsApi(tmConfig);
38659
+ const [error] = await catchError(api.objectLabelsAddLabelsForObjectIds(toBulkAddRequest2(projectId, options.objectType, {
38660
+ objectIds,
38661
+ labels,
38662
+ ...options.removeOtherLabels && {
38663
+ removeOtherLabels: true
38664
+ }
37541
38665
  })));
37542
38666
  if (error) {
37543
38667
  const { message, details } = await extractErrorDetails2(error, {
@@ -37551,35 +38675,70 @@ var registerExecutionCommand = (program2) => {
37551
38675
  processContext.exit(1);
37552
38676
  return;
37553
38677
  }
37554
- OutputFormatter.success(new SuccessOutput("ExecutionTestCaseLogs", toOutput3(page.data ?? [])));
38678
+ OutputFormatter.success(new SuccessOutput("ObjectLabelsAdd", {
38679
+ ObjectCount: objectIds.length,
38680
+ LabelCount: labels.length,
38681
+ Result: "Added"
38682
+ }));
37555
38683
  });
37556
- };
37557
- async function fetchAllFailedLogIds(api, projectId, testExecutionId) {
37558
- const ids = [];
37559
- const top = 50;
37560
- let skip = 0;
37561
- while (true) {
37562
- const page = await api.testCaseLogsGetTestCaseLogsByTestExecutionId({
37563
- testExecutionId,
37564
- projectId,
37565
- onlyFailed: true,
37566
- top,
37567
- skip
37568
- });
37569
- const typedPage = page;
37570
- const items = typedPage.data ?? [];
37571
- for (const item of items) {
37572
- if (typeof item.id === "string" && item.id.length > 0) {
37573
- ids.push(item.id);
37574
- }
38684
+ cmd.command("remove").description("Remove labels from multiple objects. " + "Pass --labels <name...> to remove specific labels, or --remove-all-labels to clear every non-system label on the listed objects. The two flags are mutually exclusive.").requiredOption("--project-key <key>", "Test Manager project key").requiredOption("--object-type <type>", "Object type: Requirement, TestCase, TestSet, TestExecution, TestCaseLog", parseObjectLabelObjectType).requiredOption("--object-ids <uuid...>", "Target object UUIDs (space-separated)").option("--labels <name...>", "Label names to remove (space-separated). Mutually exclusive with --remove-all-labels; pass exactly one.").option("--remove-all-labels", "Clear every non-system label on the listed objects. Mutually exclusive with --labels.", false).option("-t, --tenant <name>", "Tenant name (defaults to authenticated tenant)").option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(REMOVE_EXAMPLES).trackedAction(processContext, async (options) => {
38685
+ const objectIds = options.objectIds;
38686
+ const labels = Array.isArray(options.labels) ? options.labels : [];
38687
+ if (labels.length === 0 && !options.removeAllLabels) {
38688
+ OutputFormatter.error({
38689
+ Result: RESULTS.ValidationError,
38690
+ Message: "Provide at least one --labels entry, or pass --remove-all-labels.",
38691
+ Instructions: "Either pass --labels <label1> [label2 ...] to target specific labels, or --remove-all-labels to detach every non-system label from the listed objects."
38692
+ });
38693
+ processContext.exit(1);
38694
+ return;
37575
38695
  }
37576
- const hasNextPage = typedPage.paging?.nextPage === true;
37577
- if (!hasNextPage || items.length < top)
37578
- break;
37579
- skip += top;
37580
- }
37581
- return ids;
37582
- }
38696
+ if (labels.length > 0 && options.removeAllLabels) {
38697
+ OutputFormatter.error({
38698
+ Result: RESULTS.ValidationError,
38699
+ Message: "--labels and --remove-all-labels are mutually exclusive.",
38700
+ Instructions: "Pass --labels for targeted removal, or --remove-all-labels for a full strip — not both."
38701
+ });
38702
+ processContext.exit(1);
38703
+ return;
38704
+ }
38705
+ const [authError, ctx] = await catchError(initializeContextWithProject(options));
38706
+ if (authError) {
38707
+ OutputFormatter.error({
38708
+ Result: RESULTS.Failure,
38709
+ Message: authError.message,
38710
+ Instructions: instructionsFor("auth")
38711
+ });
38712
+ processContext.exit(1);
38713
+ return;
38714
+ }
38715
+ if (!ctx)
38716
+ return;
38717
+ const { tmConfig, projectId } = ctx;
38718
+ const api = new ObjectLabelsApi(tmConfig);
38719
+ const [error] = await catchError(api.objectLabelsRemoveLabelsForObjectIds(toBulkRemoveRequest2(projectId, options.objectType, {
38720
+ objectIds,
38721
+ ...options.removeAllLabels ? { removeAllLabels: true } : labels.length > 0 && { labels }
38722
+ })));
38723
+ if (error) {
38724
+ const { message, details } = await extractErrorDetails2(error, {
38725
+ forbiddenMessage: TM_FORBIDDEN_MESSAGE
38726
+ });
38727
+ OutputFormatter.error({
38728
+ Result: RESULTS.Failure,
38729
+ Message: message,
38730
+ Instructions: details
38731
+ });
38732
+ processContext.exit(1);
38733
+ return;
38734
+ }
38735
+ OutputFormatter.success(new SuccessOutput("ObjectLabelsRemove", {
38736
+ ObjectCount: objectIds.length,
38737
+ ...options.removeAllLabels ? { RemoveAllLabels: true } : { LabelCount: labels.length },
38738
+ Result: options.removeAllLabels ? "AllRemoved" : "Removed"
38739
+ }));
38740
+ });
38741
+ };
37583
38742
 
37584
38743
  // src/mappers/input/project.input.ts
37585
38744
  function toListParams(options) {
@@ -38332,7 +39491,7 @@ async function fetchAllFailedLogs(api, projectId, testExecutionId) {
38332
39491
  init_src();
38333
39492
 
38334
39493
  // src/mappers/input/requirement.input.ts
38335
- function toGetByIdRequest4(id, projectId) {
39494
+ function toGetByIdRequest5(id, projectId) {
38336
39495
  return { id, projectId };
38337
39496
  }
38338
39497
  function toGetByKeyRequest(requirementKey, projectId) {
@@ -38851,7 +40010,7 @@ var registerRequirementCommand = (program2) => {
38851
40010
  return;
38852
40011
  const { tmConfig, projectId } = ctx;
38853
40012
  const api = new RequirementsApi(tmConfig);
38854
- const [error, requirement] = await catchError(api.requirementsGetByIdRaw(toGetByIdRequest4(options.requirementId, projectId)).then((r) => r.value()));
40013
+ const [error, requirement] = await catchError(api.requirementsGetByIdRaw(toGetByIdRequest5(options.requirementId, projectId)).then((r) => r.value()));
38855
40014
  if (error) {
38856
40015
  const { message, details } = await extractErrorDetails2(error, {
38857
40016
  forbiddenMessage: TM_FORBIDDEN_MESSAGE
@@ -40099,6 +41258,62 @@ class TextApiResponse2 {
40099
41258
  return await this.raw.text();
40100
41259
  }
40101
41260
  }
41261
+ // ../orchestrator-sdk/package.json
41262
+ var package_default3 = {
41263
+ name: "@uipath/orchestrator-sdk",
41264
+ license: "MIT",
41265
+ version: "1.2.0",
41266
+ repository: {
41267
+ type: "git",
41268
+ url: "https://github.com/UiPath/cli.git",
41269
+ directory: "packages/orchestrator-sdk"
41270
+ },
41271
+ publishConfig: {
41272
+ registry: "https://npm.pkg.github.com/@uipath"
41273
+ },
41274
+ keywords: [
41275
+ "uipath",
41276
+ "orchestrator",
41277
+ "sdk"
41278
+ ],
41279
+ type: "module",
41280
+ main: "./dist/index.js",
41281
+ types: "./dist/src/index.d.ts",
41282
+ exports: {
41283
+ ".": {
41284
+ browser: {
41285
+ types: "./dist/src/index.browser.d.ts",
41286
+ default: "./dist/index.browser.js"
41287
+ },
41288
+ default: {
41289
+ types: "./dist/src/index.d.ts",
41290
+ default: "./dist/index.js"
41291
+ }
41292
+ }
41293
+ },
41294
+ files: [
41295
+ "dist"
41296
+ ],
41297
+ private: true,
41298
+ scripts: {
41299
+ build: "bun build ./src/index.ts --outdir dist --format esm --target node && bun build ./src/index.browser.ts --outdir dist --format esm --target browser --external @uipath/auth --external @uipath/common && tsc -p tsconfig.build.json --noCheck",
41300
+ generate: "bun run src/scripts/generate-sdk.ts",
41301
+ lint: "biome check .",
41302
+ test: "vitest run",
41303
+ "test:coverage": "vitest run --coverage"
41304
+ },
41305
+ devDependencies: {
41306
+ "@uipath/auth": "workspace:*",
41307
+ "@uipath/common": "workspace:*",
41308
+ "@openapitools/openapi-generator-cli": "^2.31.1",
41309
+ "@types/node": "^25.5.2",
41310
+ typescript: "^6.0.2"
41311
+ }
41312
+ };
41313
+
41314
+ // ../orchestrator-sdk/src/user-agent.ts
41315
+ var SDK_USER_AGENT2 = getSdkUserAgentToken(package_default3);
41316
+ installSdkUserAgentHeader(BaseAPI2, SDK_USER_AGENT2);
40102
41317
  // ../orchestrator-sdk/generated/src/models/SimpleFolderDto.ts
40103
41318
  function SimpleFolderDtoFromJSON(json2) {
40104
41319
  return SimpleFolderDtoFromJSONTyped(json2, false);
@@ -40859,6 +42074,20 @@ function PageResultDtoOfCurrentUserFolderDtoFromJSONTyped(json2, ignoreDiscrimin
40859
42074
  count: json2["Count"] == null ? undefined : json2["Count"]
40860
42075
  };
40861
42076
  }
42077
+ // ../orchestrator-sdk/generated/src/models/PersonalWorkspaceFolder.ts
42078
+ function PersonalWorkspaceFolderFromJSON(json2) {
42079
+ return PersonalWorkspaceFolderFromJSONTyped(json2, false);
42080
+ }
42081
+ function PersonalWorkspaceFolderFromJSONTyped(json2, ignoreDiscriminator) {
42082
+ if (json2 == null) {
42083
+ return json2;
42084
+ }
42085
+ return {
42086
+ id: json2["id"] == null ? undefined : json2["id"],
42087
+ key: json2["key"] == null ? undefined : json2["key"],
42088
+ fullyQualifiedName: json2["fullyQualifiedName"] == null ? undefined : json2["fullyQualifiedName"]
42089
+ };
42090
+ }
40862
42091
  // ../orchestrator-sdk/generated/src/models/RemoveMachinesFromFolderRequest.ts
40863
42092
  function RemoveMachinesFromFolderRequestToJSON(json2) {
40864
42093
  return RemoveMachinesFromFolderRequestToJSONTyped(json2, false);
@@ -40909,6 +42138,20 @@ function ResourcePaginationResultOfFolderFromJSONTyped(json2, ignoreDiscriminato
40909
42138
  cursor: json2["cursor"] == null ? undefined : json2["cursor"]
40910
42139
  };
40911
42140
  }
42141
+ // ../orchestrator-sdk/generated/src/models/ResourcePaginationResultOfPersonalWorkspaceFolder.ts
42142
+ function ResourcePaginationResultOfPersonalWorkspaceFolderFromJSON(json2) {
42143
+ return ResourcePaginationResultOfPersonalWorkspaceFolderFromJSONTyped(json2, false);
42144
+ }
42145
+ function ResourcePaginationResultOfPersonalWorkspaceFolderFromJSONTyped(json2, ignoreDiscriminator) {
42146
+ if (json2 == null) {
42147
+ return json2;
42148
+ }
42149
+ return {
42150
+ count: json2["count"] == null ? undefined : json2["count"],
42151
+ data: json2["data"] == null ? undefined : json2["data"].map(PersonalWorkspaceFolderFromJSON),
42152
+ cursor: json2["cursor"] == null ? undefined : json2["cursor"]
42153
+ };
42154
+ }
40912
42155
  // ../orchestrator-sdk/generated/src/models/RootFolderDto.ts
40913
42156
  function RootFolderDtoFromJSON(json2) {
40914
42157
  return RootFolderDtoFromJSONTyped(json2, false);
@@ -41198,6 +42441,31 @@ class FoldersApi extends BaseAPI2 {
41198
42441
  const response = await this.foldersGetAllForCurrentUserRaw(requestParameters, initOverrides);
41199
42442
  return await response.value();
41200
42443
  }
42444
+ async foldersGetAllPersonalWorkspaceFoldersRaw(requestParameters, initOverrides) {
42445
+ const queryParameters = {};
42446
+ if (requestParameters["limit"] != null) {
42447
+ queryParameters["limit"] = requestParameters["limit"];
42448
+ }
42449
+ if (requestParameters["cursor"] != null) {
42450
+ queryParameters["cursor"] = requestParameters["cursor"];
42451
+ }
42452
+ const headerParameters = {};
42453
+ if (this.configuration && this.configuration.accessToken) {
42454
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
42455
+ }
42456
+ let urlPath = `/api/Folders/GetAllPersonalWorkspaceFolders`;
42457
+ const response = await this.request({
42458
+ path: urlPath,
42459
+ method: "GET",
42460
+ headers: headerParameters,
42461
+ query: queryParameters
42462
+ }, initOverrides);
42463
+ return new JSONApiResponse2(response, (jsonValue) => ResourcePaginationResultOfPersonalWorkspaceFolderFromJSON(jsonValue));
42464
+ }
42465
+ async foldersGetAllPersonalWorkspaceFolders(requestParameters = {}, initOverrides) {
42466
+ const response = await this.foldersGetAllPersonalWorkspaceFoldersRaw(requestParameters, initOverrides);
42467
+ return await response.value();
42468
+ }
41201
42469
  async foldersGetAllRolesForUserByUsernameAndSkipAndTakeRaw(requestParameters, initOverrides) {
41202
42470
  if (requestParameters["username"] == null) {
41203
42471
  throw new RequiredError2("username", 'Required parameter "username" was null or undefined when calling foldersGetAllRolesForUserByUsernameAndSkipAndTake().');
@@ -42102,9 +43370,9 @@ async function createOrchestratorConfig(options) {
42102
43370
  requireTenantName: true
42103
43371
  });
42104
43372
  const orchestratorBasePath = `${ctx.baseUrl}/${ctx.organizationId}/${ctx.tenantName}/orchestrator_`;
42105
- const headers = {
43373
+ const headers = addSdkUserAgentHeader({
42106
43374
  Authorization: `Bearer ${ctx.accessToken}`
42107
- };
43375
+ }, SDK_USER_AGENT2);
42108
43376
  if (options?.folderId) {
42109
43377
  headers["X-UIPATH-OrganizationUnitId"] = options.folderId;
42110
43378
  } else if (options?.folderKey && options?.folderPath) {
@@ -43753,6 +45021,94 @@ async function parseJsonResponse(response) {
43753
45021
  return parsed;
43754
45022
  }
43755
45023
 
45024
+ // src/utils/wait-for-execution.ts
45025
+ var DEFAULT_TIMEOUT_MS2 = 1800000;
45026
+ var DEFAULT_INTERVAL_MS = 60000;
45027
+ async function handleExecutionWait(executionId, options) {
45028
+ const intervalMs = options.intervalMs ?? DEFAULT_INTERVAL_MS;
45029
+ const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS2;
45030
+ const executionsApi = new TestExecutionsApi(options.tmConfig);
45031
+ const [pollError, result] = await catchError(pollUntil({
45032
+ fn: () => executionsApi.testExecutionsGetByIdWithStats({
45033
+ id: executionId,
45034
+ projectId: options.projectId
45035
+ }),
45036
+ until: (stats) => TERMINAL_STATUSES2.has((stats.status ?? "pending").toLowerCase()),
45037
+ getStatus: (stats) => stats.status ?? "pending",
45038
+ label: `execution ${executionId}`,
45039
+ logPrefix: "wait",
45040
+ intervalMs,
45041
+ timeoutMs,
45042
+ logIntervalMs: intervalMs,
45043
+ maxConsecutiveErrors: 3,
45044
+ signal: processContext.pollSignal
45045
+ }));
45046
+ if (pollError) {
45047
+ const { message, details } = await extractErrorDetails(pollError, {
45048
+ forbiddenMessage: TM_FORBIDDEN_MESSAGE
45049
+ });
45050
+ OutputFormatter.error({
45051
+ Result: "Failure",
45052
+ Message: message,
45053
+ Instructions: details
45054
+ });
45055
+ processContext.exit(1);
45056
+ return;
45057
+ }
45058
+ if (result.outcome === PollOutcome.Completed) {
45059
+ if (!result.data) {
45060
+ OutputFormatter.error({
45061
+ Result: "Failure",
45062
+ Message: `Execution '${executionId}' completed but returned no data.`,
45063
+ Instructions: "Check execution status manually."
45064
+ });
45065
+ processContext.exit(1);
45066
+ return;
45067
+ }
45068
+ const stats = result.data;
45069
+ const status = stats.status ?? "pending";
45070
+ const endTime = stats.executionFinished?.toISOString() ?? new Date().toISOString();
45071
+ const durationMs = stats.duration ?? 0;
45072
+ const isCancelled = status.toLowerCase() === "cancelled";
45073
+ if (isCancelled) {
45074
+ OutputFormatter.error({
45075
+ Result: "Failure",
45076
+ Message: `Execution '${executionId}' was cancelled.`,
45077
+ Instructions: "Check execution details in Test Manager."
45078
+ });
45079
+ processContext.exit(1);
45080
+ return;
45081
+ }
45082
+ OutputFormatter.success(new SuccessOutput("ExecutionWaitComplete", {
45083
+ ExecutionId: executionId,
45084
+ Status: status,
45085
+ EndTime: endTime,
45086
+ Duration: msToDuration2(durationMs)
45087
+ }));
45088
+ processContext.exit(0);
45089
+ return;
45090
+ }
45091
+ const lastStatus = result.data?.status ?? "unknown";
45092
+ const EXIT_CODES2 = {
45093
+ [PollOutcome.Timeout]: 2,
45094
+ [PollOutcome.Failed]: 1,
45095
+ [PollOutcome.Interrupted]: 1,
45096
+ [PollOutcome.Aborted]: 1
45097
+ };
45098
+ const messages = {
45099
+ [PollOutcome.Timeout]: `Timed out after ${Math.round(result.elapsedMs / 1000)}s. Last status: ${lastStatus}`,
45100
+ [PollOutcome.Failed]: `Polling failed: ${result.error?.message ?? "too many consecutive errors"}`,
45101
+ [PollOutcome.Interrupted]: `Interrupted. Last status: ${lastStatus}`,
45102
+ [PollOutcome.Aborted]: `Polling aborted for execution '${executionId}'.`
45103
+ };
45104
+ OutputFormatter.error({
45105
+ Result: "Failure",
45106
+ Message: messages[result.outcome] ?? `Polling failed for execution '${executionId}'.`,
45107
+ Instructions: result.outcome === PollOutcome.Timeout ? "Increase --timeout or check the execution status manually." : "Check execution status manually."
45108
+ });
45109
+ processContext.exit(EXIT_CODES2[result.outcome] ?? 1);
45110
+ }
45111
+
43756
45112
  // src/commands/testset.ts
43757
45113
  var TESTSET_CREATE_EXAMPLES = [
43758
45114
  {
@@ -44127,7 +45483,7 @@ var registerTestsetCommand = (program2) => {
44127
45483
  " mixed - run both automated and manual test cases",
44128
45484
  " none - no specific type filter"
44129
45485
  ].join(`
44130
- `), "automated").option("--input-path <file>", 'JSON file with parameter overrides: [{"name":"Param","type":"String","value":"v"}]').addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTSET_EXECUTE_EXAMPLES).trackedAction(processContext, async (options) => {
45486
+ `), "automated").option("--input-path <file>", 'JSON file with parameter overrides: [{"name":"Param","type":"String","value":"v"}]').addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").option("--wait", "Block until the execution reaches a terminal state (finished, cancelled)").option("--timeout <seconds>", "Maximum seconds to wait (0 = no timeout). Requires --wait.", String(DEFAULT_TIMEOUT_MS2 / 1000)).option("--poll-interval <seconds>", "Seconds between status checks. Requires --wait.", String(DEFAULT_INTERVAL_MS / 1000)).examples(TESTSET_EXECUTE_EXAMPLES).trackedAction(processContext, async (options) => {
44131
45487
  const [authError, ctx] = await catchError(initializeContextWithProject(options));
44132
45488
  if (authError) {
44133
45489
  OutputFormatter.error({
@@ -44141,6 +45497,37 @@ var registerTestsetCommand = (program2) => {
44141
45497
  if (!ctx)
44142
45498
  return;
44143
45499
  const { tmConfig, projectId } = ctx;
45500
+ const defaultTimeoutStr = String(DEFAULT_TIMEOUT_MS2 / 1000);
45501
+ const defaultIntervalStr = String(DEFAULT_INTERVAL_MS / 1000);
45502
+ if (!options.wait && (options.timeout !== defaultTimeoutStr || options.pollInterval !== defaultIntervalStr)) {
45503
+ logger.warn("--timeout and --poll-interval have no effect without --wait");
45504
+ }
45505
+ let timeoutMs;
45506
+ let intervalMs;
45507
+ if (options.wait) {
45508
+ const timeoutS = Number(options.timeout);
45509
+ const intervalS = Number(options.pollInterval);
45510
+ if (!Number.isFinite(timeoutS) || timeoutS < 0) {
45511
+ OutputFormatter.error({
45512
+ Result: "Failure",
45513
+ Message: `Invalid --timeout value: '${options.timeout}'. Must be a non-negative number.`,
45514
+ Instructions: "Pass seconds, e.g. --timeout 300"
45515
+ });
45516
+ processContext.exit(1);
45517
+ return;
45518
+ }
45519
+ if (!Number.isFinite(intervalS) || intervalS <= 0) {
45520
+ OutputFormatter.error({
45521
+ Result: "Failure",
45522
+ Message: `Invalid --poll-interval value: '${options.pollInterval}'. Must be a positive number.`,
45523
+ Instructions: "Pass seconds, e.g. --poll-interval 60"
45524
+ });
45525
+ processContext.exit(1);
45526
+ return;
45527
+ }
45528
+ timeoutMs = timeoutS * 1000;
45529
+ intervalMs = intervalS * 1000;
45530
+ }
44144
45531
  const testSetKey = options.testSetKey;
44145
45532
  const testSetsApi = new TestSetsApi(tmConfig);
44146
45533
  logger.info(`Resolving test set '${testSetKey}'`);
@@ -44197,12 +45584,31 @@ var registerTestsetCommand = (program2) => {
44197
45584
  processContext.exit(1);
44198
45585
  return;
44199
45586
  }
44200
- OutputFormatter.success(new SuccessOutput("TestSetRun", {
44201
- ExecutionId: execution.id ?? "",
44202
- TestSetKey: testSetKey,
44203
- Status: execution.status ?? "Running",
44204
- StartTime: execution.created?.toISOString() ?? ""
44205
- }));
45587
+ if (!options.wait) {
45588
+ OutputFormatter.success(new SuccessOutput("TestSetRun", {
45589
+ ExecutionId: execution.id ?? "",
45590
+ TestSetKey: testSetKey,
45591
+ Status: execution.status ?? "Running",
45592
+ StartTime: execution.created?.toISOString() ?? ""
45593
+ }));
45594
+ return;
45595
+ }
45596
+ logger.info(`Execution started: ${execution.id ?? "(no id)"} (${execution.status ?? "Running"})`);
45597
+ if (!execution.id) {
45598
+ OutputFormatter.error({
45599
+ Result: "Failure",
45600
+ Message: "Execution started but no ID returned — cannot wait",
45601
+ Instructions: "Check the execution in Test Manager or retry without --wait."
45602
+ });
45603
+ processContext.exit(1);
45604
+ return;
45605
+ }
45606
+ await handleExecutionWait(execution.id, {
45607
+ tmConfig,
45608
+ projectId,
45609
+ timeoutMs,
45610
+ intervalMs
45611
+ });
44206
45612
  });
44207
45613
  testsetCmd.command("list").description("List test sets in a Test Manager project.").requiredOption("--project-key <key>", "Test Manager project key (e.g. DEMO)").option("--folder-key <uuid>", "Filter by Orchestrator folder key (UUID, from 'or folders list')").option("--filter <text>", "Filter test sets by name").option("--include-last-execution", "Include the latest execution status and timestamp for each test set").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--log-level <level>", "Log verbosity: debug, info, warn, error", "Information").examples(TESTSET_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
44208
45614
  const [authError, ctx] = await catchError(initializeContextWithProject(options));
@@ -44598,8 +46004,9 @@ var metadata = {
44598
46004
  var registerCommands = async (program2) => {
44599
46005
  registerAttachmentCommand(program2);
44600
46006
  registerCustomFieldCommand(program2);
44601
- registerProjectCommand(program2);
44602
46007
  registerExecutionCommand(program2);
46008
+ registerObjectLabelCommand(program2);
46009
+ registerProjectCommand(program2);
44603
46010
  registerReportCommand(program2);
44604
46011
  registerRequirementCommand(program2);
44605
46012
  registerResultCommand(program2);