@uipath/admin-tool 1.199.0-preview.91 → 1.199.0-preview.97

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 +518 -307
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -22394,11 +22394,11 @@ var require_methods = __commonJS((exports) => {
22394
22394
  // ../../../node_modules/adm-zip/zipEntry.js
22395
22395
  var require_zipEntry = __commonJS((exports, module) => {
22396
22396
  var Utils = require_util();
22397
- var Headers = require_headers();
22397
+ var Headers2 = require_headers();
22398
22398
  var Constants = Utils.Constants;
22399
22399
  var Methods = require_methods();
22400
22400
  module.exports = function(options, input) {
22401
- var _centralHeader = new Headers.EntryHeader, _entryName = Buffer.alloc(0), _comment = Buffer.alloc(0), _isDirectory = false, uncompressedData = null, _extra = Buffer.alloc(0), _extralocal = Buffer.alloc(0), _efs = true;
22401
+ var _centralHeader = new Headers2.EntryHeader, _entryName = Buffer.alloc(0), _comment = Buffer.alloc(0), _isDirectory = false, uncompressedData = null, _extra = Buffer.alloc(0), _extralocal = Buffer.alloc(0), _efs = true;
22402
22402
  const opts = options;
22403
22403
  const decoder = typeof opts.decoder === "object" ? opts.decoder : Utils.decoder;
22404
22404
  _efs = decoder.hasOwnProperty("efs") ? decoder.efs : false;
@@ -22702,10 +22702,10 @@ var require_zipEntry = __commonJS((exports, module) => {
22702
22702
  // ../../../node_modules/adm-zip/zipFile.js
22703
22703
  var require_zipFile = __commonJS((exports, module) => {
22704
22704
  var ZipEntry = require_zipEntry();
22705
- var Headers = require_headers();
22705
+ var Headers2 = require_headers();
22706
22706
  var Utils = require_util();
22707
22707
  module.exports = function(inBuffer, options) {
22708
- var entryList = [], entryTable = Object.create(null), _comment = Buffer.alloc(0), mainHeader = new Headers.MainHeader, loadedEntries = false;
22708
+ var entryList = [], entryTable = Object.create(null), _comment = Buffer.alloc(0), mainHeader = new Headers2.MainHeader, loadedEntries = false;
22709
22709
  var password = null;
22710
22710
  const temporary = new Set;
22711
22711
  const opts = options;
@@ -23693,7 +23693,7 @@ var __require2 = /* @__PURE__ */ createRequire2(import.meta.url);
23693
23693
  var package_default = {
23694
23694
  name: "@uipath/admin-vpngateway-tool",
23695
23695
  license: "MIT",
23696
- version: "1.199.0-preview.91",
23696
+ version: "1.199.0-preview.97",
23697
23697
  description: "CLI plugin for UiPath VPN Gateway management (Hypervisor service).",
23698
23698
  private: false,
23699
23699
  repository: {
@@ -51554,10 +51554,33 @@ class NodeContextStorage {
51554
51554
  return this.storage.getStore();
51555
51555
  }
51556
51556
  }
51557
+ var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
51558
+ var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
51559
+ function getProcessEnv() {
51560
+ return globalThis.process?.env;
51561
+ }
51562
+ function parseInboundTraceparent(value) {
51563
+ if (!value) {
51564
+ return;
51565
+ }
51566
+ const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
51567
+ if (!match) {
51568
+ return;
51569
+ }
51570
+ const [, traceId, parentSpanId] = match;
51571
+ if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
51572
+ return;
51573
+ }
51574
+ return { traceId, parentSpanId };
51575
+ }
51576
+ function getInboundTraceContext() {
51577
+ return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
51578
+ }
51557
51579
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
51558
51580
  var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
51559
51581
  var telemetrySessionIdSlot = singleton2("TelemetrySessionId");
51560
- function getProcessEnv() {
51582
+ var telemetryOperationIdSlot = singleton2("TelemetryOperationId");
51583
+ function getProcessEnv2() {
51561
51584
  return globalThis.process?.env;
51562
51585
  }
51563
51586
  function normalizeSessionId(value) {
@@ -51568,15 +51591,159 @@ function normalizeSessionId(value) {
51568
51591
  return trimmed || undefined;
51569
51592
  }
51570
51593
  function getConfiguredTelemetrySessionId() {
51571
- return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
51594
+ return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
51572
51595
  }
51573
51596
  function resolveTelemetrySessionId(existingSessionId) {
51574
51597
  return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
51575
51598
  }
51599
+ function getTelemetryOperationId() {
51600
+ const existing = telemetryOperationIdSlot.get();
51601
+ if (existing) {
51602
+ return existing;
51603
+ }
51604
+ const inboundTraceId = getInboundTraceContext()?.traceId;
51605
+ const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
51606
+ telemetryOperationIdSlot.set(generated);
51607
+ return generated;
51608
+ }
51576
51609
  var telemetryPropsSlot2 = singleton2("TelemetryDefaultProps");
51577
51610
  function getGlobalTelemetryProperties() {
51578
51611
  return telemetryPropsSlot2.get();
51579
51612
  }
51613
+ var REDACTED = "[REDACTED]";
51614
+ var MAX_VALUE_LENGTH = 200;
51615
+ var SENSITIVE_NAME_TOKENS = new Set([
51616
+ "token",
51617
+ "tokens",
51618
+ "secret",
51619
+ "secrets",
51620
+ "password",
51621
+ "passwords",
51622
+ "pwd",
51623
+ "credential",
51624
+ "credentials",
51625
+ "auth",
51626
+ "authentication",
51627
+ "authorization",
51628
+ "authority",
51629
+ "cert",
51630
+ "certificate",
51631
+ "certificates"
51632
+ ]);
51633
+ var SENSITIVE_KEY_PREFIXES = new Set([
51634
+ "api",
51635
+ "access",
51636
+ "client",
51637
+ "private",
51638
+ "public",
51639
+ "signing",
51640
+ "encryption",
51641
+ "session",
51642
+ "master",
51643
+ "shared",
51644
+ "root",
51645
+ "ssh",
51646
+ "rsa",
51647
+ "aes",
51648
+ "hmac",
51649
+ "oauth"
51650
+ ]);
51651
+ var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
51652
+ var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
51653
+ var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
51654
+ var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
51655
+ var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
51656
+ var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
51657
+ var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
51658
+ function shortHash(input) {
51659
+ let hash = 2166136261;
51660
+ for (let i = 0;i < input.length; i++) {
51661
+ hash ^= input.charCodeAt(i);
51662
+ hash = Math.imul(hash, 16777619);
51663
+ }
51664
+ return (hash >>> 0).toString(16).padStart(8, "0");
51665
+ }
51666
+ function redactUrl(raw) {
51667
+ try {
51668
+ const url = new URL(raw);
51669
+ return `${url.protocol}//${url.host}`;
51670
+ } catch {
51671
+ return `url#${shortHash(raw)}`;
51672
+ }
51673
+ }
51674
+ function redactValueDetectors(value) {
51675
+ let out = value;
51676
+ out = out.replace(JWT_PATTERN, () => REDACTED);
51677
+ out = out.replace(URL_PATTERN, (match) => {
51678
+ const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
51679
+ const core2 = trailing ? match.slice(0, -trailing.length) : match;
51680
+ return `${redactUrl(core2)}${trailing}`;
51681
+ });
51682
+ out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
51683
+ out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
51684
+ out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
51685
+ out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
51686
+ if (out.length > MAX_VALUE_LENGTH) {
51687
+ out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
51688
+ }
51689
+ return out;
51690
+ }
51691
+ function redactValue(value) {
51692
+ return redactValueDetectors(value);
51693
+ }
51694
+ function redactError(error) {
51695
+ const safe = new Error(redactValueDetectors(error.message ?? ""));
51696
+ safe.name = error.name;
51697
+ safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
51698
+ return safe;
51699
+ }
51700
+ function nameTokens(name) {
51701
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t) => t.toLowerCase()).filter(Boolean);
51702
+ }
51703
+ function isSensitiveName(name) {
51704
+ const tokens = nameTokens(name);
51705
+ for (let i = 0;i < tokens.length; i++) {
51706
+ const token = tokens[i];
51707
+ if (SENSITIVE_NAME_TOKENS.has(token)) {
51708
+ return true;
51709
+ }
51710
+ if (token === "key" || token === "keys") {
51711
+ const prev = tokens[i - 1];
51712
+ if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
51713
+ return true;
51714
+ }
51715
+ }
51716
+ }
51717
+ return false;
51718
+ }
51719
+ function redactProperty(name, value) {
51720
+ if (value === undefined || value === null) {
51721
+ return;
51722
+ }
51723
+ if (isSensitiveName(name)) {
51724
+ return REDACTED;
51725
+ }
51726
+ if (typeof value === "boolean" || typeof value === "number") {
51727
+ return value;
51728
+ }
51729
+ if (typeof value !== "string") {
51730
+ return "[OBJECT]";
51731
+ }
51732
+ return redactValueDetectors(value);
51733
+ }
51734
+ function redactProperties(properties) {
51735
+ const out = {};
51736
+ for (const [name, value] of Object.entries(properties)) {
51737
+ const redacted = redactProperty(name, value);
51738
+ if (redacted !== undefined) {
51739
+ out[name] = redacted;
51740
+ }
51741
+ }
51742
+ return out;
51743
+ }
51744
+ var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
51745
+ var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
51746
+ var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
51580
51747
 
51581
51748
  class TelemetryService {
51582
51749
  telemetryProvider;
@@ -51604,11 +51771,15 @@ class TelemetryService {
51604
51771
  trackException(error, properties) {
51605
51772
  const context = this.getCurrentContext();
51606
51773
  const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
51607
- this.telemetryProvider.trackException(error, enrichedProperties);
51774
+ this.telemetryProvider.trackException(redactError(error), enrichedProperties);
51608
51775
  }
51609
51776
  async trackRequest(name, fn, properties) {
51777
+ const parentContext = this.getCurrentContext();
51778
+ const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
51779
+ const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
51610
51780
  const context = {
51611
- operationId: this.operationId ?? this.generateId(),
51781
+ operationId,
51782
+ ...parentId !== undefined ? { parentId } : {},
51612
51783
  id: this.generateId()
51613
51784
  };
51614
51785
  const startTime = performance.now();
@@ -51626,6 +51797,45 @@ class TelemetryService {
51626
51797
  throw error;
51627
51798
  }
51628
51799
  }
51800
+ trackRequestResult(name, durationMs, success, properties, context) {
51801
+ const requestContext = context ?? {
51802
+ operationId: this.operationId ?? getTelemetryOperationId(),
51803
+ id: this.generateId()
51804
+ };
51805
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
51806
+ this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
51807
+ }
51808
+ createRequestContext() {
51809
+ const operationId = this.operationId ?? getTelemetryOperationId();
51810
+ const parentId = this.inboundParentIdFor(operationId);
51811
+ return {
51812
+ operationId,
51813
+ ...parentId !== undefined ? { parentId } : {},
51814
+ id: this.generateId()
51815
+ };
51816
+ }
51817
+ inboundParentIdFor(operationId) {
51818
+ const inbound = getInboundTraceContext();
51819
+ return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
51820
+ }
51821
+ runWithContext(context, fn) {
51822
+ return this.contextStorage.run(context, fn);
51823
+ }
51824
+ createDependencyContext() {
51825
+ const parentContext = this.getCurrentContext();
51826
+ if (!parentContext) {
51827
+ return;
51828
+ }
51829
+ return {
51830
+ operationId: parentContext.operationId,
51831
+ parentId: parentContext.id,
51832
+ id: this.generateId()
51833
+ };
51834
+ }
51835
+ trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
51836
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
51837
+ this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
51838
+ }
51629
51839
  async trackDependencyOperation(name, type2, fn, properties) {
51630
51840
  const parentContext = this.getCurrentContext();
51631
51841
  if (!parentContext) {
@@ -51662,8 +51872,12 @@ class TelemetryService {
51662
51872
  ...getExecutionContextTelemetryProperties(),
51663
51873
  ...globalProperties,
51664
51874
  ...this.defaultProperties,
51665
- ...properties,
51666
- ...context
51875
+ ...redactProperties(properties ?? {}),
51876
+ ...context ? {
51877
+ [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
51878
+ ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
51879
+ [TELEMETRY_SPAN_ID_PROPERTY]: context.id
51880
+ } : {}
51667
51881
  };
51668
51882
  if (sessionId === undefined) {
51669
51883
  delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
@@ -51673,7 +51887,16 @@ class TelemetryService {
51673
51887
  return enriched;
51674
51888
  }
51675
51889
  generateId() {
51676
- return crypto.randomUUID().replaceAll("-", "");
51890
+ const bytes = new Uint8Array(8);
51891
+ let hex = "";
51892
+ do {
51893
+ crypto.getRandomValues(bytes);
51894
+ hex = "";
51895
+ for (const byte of bytes) {
51896
+ hex += byte.toString(16).padStart(2, "0");
51897
+ }
51898
+ } while (/^0+$/.test(hex));
51899
+ return hex;
51677
51900
  }
51678
51901
  }
51679
51902
  var providerSlot = singleton2("TelemetryProvider");
@@ -52370,131 +52593,10 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
52370
52593
  ...getCommandProductModeAttribution(commandPath)
52371
52594
  };
52372
52595
  }
52373
- var REDACTED = "[REDACTED]";
52374
- var MAX_VALUE_LENGTH = 200;
52375
- var SENSITIVE_NAME_TOKENS = new Set([
52376
- "token",
52377
- "tokens",
52378
- "secret",
52379
- "secrets",
52380
- "password",
52381
- "passwords",
52382
- "pwd",
52383
- "credential",
52384
- "credentials",
52385
- "auth",
52386
- "authentication",
52387
- "authorization",
52388
- "authority",
52389
- "cert",
52390
- "certificate",
52391
- "certificates"
52392
- ]);
52393
- var SENSITIVE_KEY_PREFIXES = new Set([
52394
- "api",
52395
- "access",
52396
- "client",
52397
- "private",
52398
- "public",
52399
- "signing",
52400
- "encryption",
52401
- "session",
52402
- "master",
52403
- "shared",
52404
- "root",
52405
- "ssh",
52406
- "rsa",
52407
- "aes",
52408
- "hmac",
52409
- "oauth"
52410
- ]);
52411
- var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
52412
- var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
52413
- var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
52414
- var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
52415
- var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
52416
- var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
52417
- var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
52418
- function shortHash(input) {
52419
- let hash = 2166136261;
52420
- for (let i = 0;i < input.length; i++) {
52421
- hash ^= input.charCodeAt(i);
52422
- hash = Math.imul(hash, 16777619);
52423
- }
52424
- return (hash >>> 0).toString(16).padStart(8, "0");
52425
- }
52426
- function redactUrl(raw) {
52427
- try {
52428
- const url = new URL(raw);
52429
- return `${url.protocol}//${url.host}`;
52430
- } catch {
52431
- return `url#${shortHash(raw)}`;
52432
- }
52433
- }
52434
- function redactValueDetectors(value) {
52435
- let out = value;
52436
- out = out.replace(JWT_PATTERN, () => REDACTED);
52437
- out = out.replace(URL_PATTERN, (match) => {
52438
- const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
52439
- const core2 = trailing ? match.slice(0, -trailing.length) : match;
52440
- return `${redactUrl(core2)}${trailing}`;
52441
- });
52442
- out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
52443
- out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
52444
- out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
52445
- out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
52446
- if (out.length > MAX_VALUE_LENGTH) {
52447
- out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
52448
- }
52449
- return out;
52450
- }
52451
- function nameTokens(name) {
52452
- return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t) => t.toLowerCase()).filter(Boolean);
52453
- }
52454
- function isSensitiveName(name) {
52455
- const tokens = nameTokens(name);
52456
- for (let i = 0;i < tokens.length; i++) {
52457
- const token = tokens[i];
52458
- if (SENSITIVE_NAME_TOKENS.has(token)) {
52459
- return true;
52460
- }
52461
- if (token === "key" || token === "keys") {
52462
- const prev = tokens[i - 1];
52463
- if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
52464
- return true;
52465
- }
52466
- }
52467
- }
52468
- return false;
52469
- }
52470
- function redactProperty(name, value) {
52471
- if (value === undefined || value === null) {
52472
- return;
52473
- }
52474
- if (isSensitiveName(name)) {
52475
- return REDACTED;
52476
- }
52477
- if (typeof value === "boolean" || typeof value === "number") {
52478
- return value;
52479
- }
52480
- if (typeof value !== "string") {
52481
- return "[OBJECT]";
52482
- }
52483
- return redactValueDetectors(value);
52484
- }
52485
- function redactProperties(properties) {
52486
- const out = {};
52487
- for (const [name, value] of Object.entries(properties)) {
52488
- const redacted = redactProperty(name, value);
52489
- if (redacted !== undefined) {
52490
- out[name] = redacted;
52491
- }
52492
- }
52493
- return out;
52494
- }
52495
52596
  var pollSignalSlot = singleton2("PollSignal");
52496
52597
  var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
52497
52598
  var retryHintValues = new Set(RETRY_HINTS);
52599
+ var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
52498
52600
  var processContext = {
52499
52601
  exit: (code) => {
52500
52602
  process.exitCode = code;
@@ -52505,22 +52607,18 @@ var processContext = {
52505
52607
  };
52506
52608
  function extractCommandParams(cmd) {
52507
52609
  const params = {};
52610
+ const add2 = (name, value) => {
52611
+ if (name && value !== undefined) {
52612
+ params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
52613
+ }
52614
+ };
52508
52615
  const registered = cmd.registeredArguments ?? [];
52509
52616
  const processed = cmd.processedArgs ?? [];
52510
52617
  for (let i = 0;i < registered.length; i++) {
52511
- const value = processed[i];
52512
- if (value === undefined) {
52513
- continue;
52514
- }
52515
- const name = registered[i].name();
52516
- if (name) {
52517
- params[name] = value;
52518
- }
52618
+ add2(registered[i].name(), processed[i]);
52519
52619
  }
52520
52620
  for (const [key, value] of Object.entries(cmd.opts())) {
52521
- if (value !== undefined) {
52522
- params[key] = value;
52523
- }
52621
+ add2(key, value);
52524
52622
  }
52525
52623
  return params;
52526
52624
  }
@@ -52563,11 +52661,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
52563
52661
  return this.action(async (...args) => {
52564
52662
  const telemetryName = deriveCommandPath(command);
52565
52663
  const props = typeof properties === "function" ? properties(...args) : properties;
52664
+ const requestContext = telemetry.createRequestContext();
52566
52665
  const startTime = performance.now();
52567
52666
  let errorMessage2;
52568
52667
  let fallbackExitCode = EXIT_CODES.Success;
52569
52668
  clearRecordedCommandFailureTelemetry();
52570
- const [error] = await catchError2(fn(...args));
52669
+ const [error] = await catchError2(telemetry.runWithContext(requestContext, () => fn(...args)));
52571
52670
  if (error) {
52572
52671
  errorMessage2 = error instanceof Error ? error.message : String(error);
52573
52672
  logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage2}`);
@@ -52603,16 +52702,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
52603
52702
  recordedFailure,
52604
52703
  pollSignal: context.pollSignal
52605
52704
  });
52606
- telemetry.trackEvent(telemetryName, redactProperties({
52607
- ...extractCommandParams(command),
52705
+ const commandParams = extractCommandParams(command);
52706
+ if (props) {
52707
+ for (const key of Object.keys(props)) {
52708
+ delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
52709
+ }
52710
+ }
52711
+ const baseProperties = redactProperties({
52712
+ ...commandParams,
52608
52713
  ...props,
52609
52714
  ...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
52610
52715
  command: "true",
52611
- duration: String(durationMs),
52612
- success: String(success),
52613
52716
  ...terminalTelemetry,
52614
52717
  ...errorMessage2 ? { errorMessage: errorMessage2 } : {}
52615
- }));
52718
+ });
52719
+ telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
52616
52720
  });
52617
52721
  };
52618
52722
  var guardInstalledSlot = singleton2("ConsoleGuardInstalled");
@@ -53903,7 +54007,7 @@ var registerCommands = async (program2) => {
53903
54007
  var package_default3 = {
53904
54008
  name: "@uipath/apms-tool",
53905
54009
  license: "MIT",
53906
- version: "1.199.0-preview.91",
54010
+ version: "1.199.0-preview.97",
53907
54011
  description: "CLI plugin for the UiPath Access Policy Management Service.",
53908
54012
  private: false,
53909
54013
  repository: {
@@ -62697,11 +62801,36 @@ class NodeContextStorage2 {
62697
62801
  return this.storage.getStore();
62698
62802
  }
62699
62803
  }
62804
+ // ../../common/src/telemetry/trace-context.ts
62805
+ var TELEMETRY_TRACEPARENT_ENV2 = "TRACEPARENT";
62806
+ var TRACEPARENT_PATTERN2 = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
62807
+ function getProcessEnv3() {
62808
+ return globalThis.process?.env;
62809
+ }
62810
+ function parseInboundTraceparent2(value) {
62811
+ if (!value) {
62812
+ return;
62813
+ }
62814
+ const match = TRACEPARENT_PATTERN2.exec(value.trim().toLowerCase());
62815
+ if (!match) {
62816
+ return;
62817
+ }
62818
+ const [, traceId, parentSpanId] = match;
62819
+ if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
62820
+ return;
62821
+ }
62822
+ return { traceId, parentSpanId };
62823
+ }
62824
+ function getInboundTraceContext2() {
62825
+ return parseInboundTraceparent2(getProcessEnv3()?.[TELEMETRY_TRACEPARENT_ENV2]);
62826
+ }
62827
+
62700
62828
  // ../../common/src/telemetry/session-id.ts
62701
62829
  var TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID";
62702
62830
  var TELEMETRY_SESSION_ID_PROPERTY2 = "session_id";
62703
62831
  var telemetrySessionIdSlot2 = singleton3("TelemetrySessionId");
62704
- function getProcessEnv2() {
62832
+ var telemetryOperationIdSlot2 = singleton3("TelemetryOperationId");
62833
+ function getProcessEnv5() {
62705
62834
  return globalThis.process?.env;
62706
62835
  }
62707
62836
  function normalizeSessionId2(value) {
@@ -62712,12 +62841,159 @@ function normalizeSessionId2(value) {
62712
62841
  return trimmed || undefined;
62713
62842
  }
62714
62843
  function getConfiguredTelemetrySessionId2() {
62715
- return normalizeSessionId2(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV2]);
62844
+ return normalizeSessionId2(getProcessEnv5()?.[TELEMETRY_SESSION_ID_ENV2]);
62716
62845
  }
62717
62846
  function resolveTelemetrySessionId2(existingSessionId) {
62718
62847
  return getConfiguredTelemetrySessionId2() ?? normalizeSessionId2(existingSessionId);
62719
62848
  }
62849
+ function getTelemetryOperationId2() {
62850
+ const existing = telemetryOperationIdSlot2.get();
62851
+ if (existing) {
62852
+ return existing;
62853
+ }
62854
+ const inboundTraceId = getInboundTraceContext2()?.traceId;
62855
+ const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
62856
+ telemetryOperationIdSlot2.set(generated);
62857
+ return generated;
62858
+ }
62859
+ // ../../common/src/telemetry/pii-redactor.ts
62860
+ var REDACTED2 = "[REDACTED]";
62861
+ var MAX_VALUE_LENGTH2 = 200;
62862
+ var SENSITIVE_NAME_TOKENS2 = new Set([
62863
+ "token",
62864
+ "tokens",
62865
+ "secret",
62866
+ "secrets",
62867
+ "password",
62868
+ "passwords",
62869
+ "pwd",
62870
+ "credential",
62871
+ "credentials",
62872
+ "auth",
62873
+ "authentication",
62874
+ "authorization",
62875
+ "authority",
62876
+ "cert",
62877
+ "certificate",
62878
+ "certificates"
62879
+ ]);
62880
+ var SENSITIVE_KEY_PREFIXES2 = new Set([
62881
+ "api",
62882
+ "access",
62883
+ "client",
62884
+ "private",
62885
+ "public",
62886
+ "signing",
62887
+ "encryption",
62888
+ "session",
62889
+ "master",
62890
+ "shared",
62891
+ "root",
62892
+ "ssh",
62893
+ "rsa",
62894
+ "aes",
62895
+ "hmac",
62896
+ "oauth"
62897
+ ]);
62898
+ var UUID_PATTERN2 = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
62899
+ var EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
62900
+ var JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
62901
+ var LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
62902
+ var USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
62903
+ var URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
62904
+ var URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
62905
+ function shortHash2(input) {
62906
+ let hash = 2166136261;
62907
+ for (let i = 0;i < input.length; i++) {
62908
+ hash ^= input.charCodeAt(i);
62909
+ hash = Math.imul(hash, 16777619);
62910
+ }
62911
+ return (hash >>> 0).toString(16).padStart(8, "0");
62912
+ }
62913
+ function redactUrl2(raw) {
62914
+ try {
62915
+ const url = new URL(raw);
62916
+ return `${url.protocol}//${url.host}`;
62917
+ } catch {
62918
+ return `url#${shortHash2(raw)}`;
62919
+ }
62920
+ }
62921
+ function redactValueDetectors2(value) {
62922
+ let out = value;
62923
+ out = out.replace(JWT_PATTERN2, () => REDACTED2);
62924
+ out = out.replace(URL_PATTERN2, (match) => {
62925
+ const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
62926
+ const core3 = trailing ? match.slice(0, -trailing.length) : match;
62927
+ return `${redactUrl2(core3)}${trailing}`;
62928
+ });
62929
+ out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
62930
+ out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
62931
+ out = out.replace(UUID_PATTERN2, (match) => `uuid#${shortHash2(match)}`);
62932
+ out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
62933
+ if (out.length > MAX_VALUE_LENGTH2) {
62934
+ out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
62935
+ }
62936
+ return out;
62937
+ }
62938
+ function redactValue2(value) {
62939
+ return redactValueDetectors2(value);
62940
+ }
62941
+ function redactError2(error) {
62942
+ const safe = new Error(redactValueDetectors2(error.message ?? ""));
62943
+ safe.name = error.name;
62944
+ safe.stack = typeof error.stack === "string" ? redactValueDetectors2(error.stack) : undefined;
62945
+ return safe;
62946
+ }
62947
+ function nameTokens2(name) {
62948
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t) => t.toLowerCase()).filter(Boolean);
62949
+ }
62950
+ function isSensitiveName2(name) {
62951
+ const tokens = nameTokens2(name);
62952
+ for (let i = 0;i < tokens.length; i++) {
62953
+ const token = tokens[i];
62954
+ if (SENSITIVE_NAME_TOKENS2.has(token)) {
62955
+ return true;
62956
+ }
62957
+ if (token === "key" || token === "keys") {
62958
+ const prev = tokens[i - 1];
62959
+ if (prev && SENSITIVE_KEY_PREFIXES2.has(prev)) {
62960
+ return true;
62961
+ }
62962
+ }
62963
+ }
62964
+ return false;
62965
+ }
62966
+ function redactProperty2(name, value) {
62967
+ if (value === undefined || value === null) {
62968
+ return;
62969
+ }
62970
+ if (isSensitiveName2(name)) {
62971
+ return REDACTED2;
62972
+ }
62973
+ if (typeof value === "boolean" || typeof value === "number") {
62974
+ return value;
62975
+ }
62976
+ if (typeof value !== "string") {
62977
+ return "[OBJECT]";
62978
+ }
62979
+ return redactValueDetectors2(value);
62980
+ }
62981
+ function redactProperties2(properties) {
62982
+ const out = {};
62983
+ for (const [name, value] of Object.entries(properties)) {
62984
+ const redacted = redactProperty2(name, value);
62985
+ if (redacted !== undefined) {
62986
+ out[name] = redacted;
62987
+ }
62988
+ }
62989
+ return out;
62990
+ }
62991
+
62720
62992
  // ../../common/src/telemetry/telemetry-service.ts
62993
+ var TELEMETRY_OPERATION_ID_PROPERTY2 = "uip.trace.operation_id";
62994
+ var TELEMETRY_PARENT_ID_PROPERTY2 = "uip.trace.parent_id";
62995
+ var TELEMETRY_SPAN_ID_PROPERTY2 = "uip.trace.span_id";
62996
+
62721
62997
  class TelemetryService2 {
62722
62998
  telemetryProvider;
62723
62999
  contextStorage;
@@ -62744,11 +63020,15 @@ class TelemetryService2 {
62744
63020
  trackException(error, properties) {
62745
63021
  const context = this.getCurrentContext();
62746
63022
  const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
62747
- this.telemetryProvider.trackException(error, enrichedProperties);
63023
+ this.telemetryProvider.trackException(redactError2(error), enrichedProperties);
62748
63024
  }
62749
63025
  async trackRequest(name, fn, properties) {
63026
+ const parentContext = this.getCurrentContext();
63027
+ const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId2();
63028
+ const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
62750
63029
  const context = {
62751
- operationId: this.operationId ?? this.generateId(),
63030
+ operationId,
63031
+ ...parentId !== undefined ? { parentId } : {},
62752
63032
  id: this.generateId()
62753
63033
  };
62754
63034
  const startTime = performance.now();
@@ -62766,6 +63046,45 @@ class TelemetryService2 {
62766
63046
  throw error;
62767
63047
  }
62768
63048
  }
63049
+ trackRequestResult(name, durationMs, success, properties, context) {
63050
+ const requestContext = context ?? {
63051
+ operationId: this.operationId ?? getTelemetryOperationId2(),
63052
+ id: this.generateId()
63053
+ };
63054
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
63055
+ this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
63056
+ }
63057
+ createRequestContext() {
63058
+ const operationId = this.operationId ?? getTelemetryOperationId2();
63059
+ const parentId = this.inboundParentIdFor(operationId);
63060
+ return {
63061
+ operationId,
63062
+ ...parentId !== undefined ? { parentId } : {},
63063
+ id: this.generateId()
63064
+ };
63065
+ }
63066
+ inboundParentIdFor(operationId) {
63067
+ const inbound = getInboundTraceContext2();
63068
+ return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
63069
+ }
63070
+ runWithContext(context, fn) {
63071
+ return this.contextStorage.run(context, fn);
63072
+ }
63073
+ createDependencyContext() {
63074
+ const parentContext = this.getCurrentContext();
63075
+ if (!parentContext) {
63076
+ return;
63077
+ }
63078
+ return {
63079
+ operationId: parentContext.operationId,
63080
+ parentId: parentContext.id,
63081
+ id: this.generateId()
63082
+ };
63083
+ }
63084
+ trackDependencyResult(name, type3, durationMs, success, properties, context, resultCode) {
63085
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
63086
+ this.telemetryProvider.trackDependency(redactValue2(name), type3, durationMs, success, enrichedProperties, resultCode);
63087
+ }
62769
63088
  async trackDependencyOperation(name, type3, fn, properties) {
62770
63089
  const parentContext = this.getCurrentContext();
62771
63090
  if (!parentContext) {
@@ -62802,8 +63121,12 @@ class TelemetryService2 {
62802
63121
  ...getExecutionContextTelemetryProperties2(),
62803
63122
  ...globalProperties,
62804
63123
  ...this.defaultProperties,
62805
- ...properties,
62806
- ...context
63124
+ ...redactProperties2(properties ?? {}),
63125
+ ...context ? {
63126
+ [TELEMETRY_OPERATION_ID_PROPERTY2]: context.operationId,
63127
+ ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY2]: context.parentId } : {},
63128
+ [TELEMETRY_SPAN_ID_PROPERTY2]: context.id
63129
+ } : {}
62807
63130
  };
62808
63131
  if (sessionId === undefined) {
62809
63132
  delete enriched[TELEMETRY_SESSION_ID_PROPERTY2];
@@ -62813,7 +63136,16 @@ class TelemetryService2 {
62813
63136
  return enriched;
62814
63137
  }
62815
63138
  generateId() {
62816
- return crypto.randomUUID().replaceAll("-", "");
63139
+ const bytes = new Uint8Array(8);
63140
+ let hex = "";
63141
+ do {
63142
+ crypto.getRandomValues(bytes);
63143
+ hex = "";
63144
+ for (const byte of bytes) {
63145
+ hex += byte.toString(16).padStart(2, "0");
63146
+ }
63147
+ } while (/^0+$/.test(hex));
63148
+ return hex;
62817
63149
  }
62818
63150
  }
62819
63151
  // ../../common/src/telemetry/node-appinsights-telemetry-provider.ts
@@ -63516,134 +63848,11 @@ function buildCommandTelemetryAttribution2(commandPath, skillSource) {
63516
63848
  };
63517
63849
  }
63518
63850
 
63519
- // ../../common/src/telemetry/pii-redactor.ts
63520
- var REDACTED2 = "[REDACTED]";
63521
- var MAX_VALUE_LENGTH2 = 200;
63522
- var SENSITIVE_NAME_TOKENS2 = new Set([
63523
- "token",
63524
- "tokens",
63525
- "secret",
63526
- "secrets",
63527
- "password",
63528
- "passwords",
63529
- "pwd",
63530
- "credential",
63531
- "credentials",
63532
- "auth",
63533
- "authentication",
63534
- "authorization",
63535
- "authority",
63536
- "cert",
63537
- "certificate",
63538
- "certificates"
63539
- ]);
63540
- var SENSITIVE_KEY_PREFIXES2 = new Set([
63541
- "api",
63542
- "access",
63543
- "client",
63544
- "private",
63545
- "public",
63546
- "signing",
63547
- "encryption",
63548
- "session",
63549
- "master",
63550
- "shared",
63551
- "root",
63552
- "ssh",
63553
- "rsa",
63554
- "aes",
63555
- "hmac",
63556
- "oauth"
63557
- ]);
63558
- var UUID_PATTERN2 = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
63559
- var EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
63560
- var JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
63561
- var LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
63562
- var USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
63563
- var URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
63564
- var URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
63565
- function shortHash2(input) {
63566
- let hash = 2166136261;
63567
- for (let i = 0;i < input.length; i++) {
63568
- hash ^= input.charCodeAt(i);
63569
- hash = Math.imul(hash, 16777619);
63570
- }
63571
- return (hash >>> 0).toString(16).padStart(8, "0");
63572
- }
63573
- function redactUrl2(raw) {
63574
- try {
63575
- const url = new URL(raw);
63576
- return `${url.protocol}//${url.host}`;
63577
- } catch {
63578
- return `url#${shortHash2(raw)}`;
63579
- }
63580
- }
63581
- function redactValueDetectors2(value) {
63582
- let out = value;
63583
- out = out.replace(JWT_PATTERN2, () => REDACTED2);
63584
- out = out.replace(URL_PATTERN2, (match) => {
63585
- const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
63586
- const core3 = trailing ? match.slice(0, -trailing.length) : match;
63587
- return `${redactUrl2(core3)}${trailing}`;
63588
- });
63589
- out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
63590
- out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
63591
- out = out.replace(UUID_PATTERN2, (match) => `uuid#${shortHash2(match)}`);
63592
- out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
63593
- if (out.length > MAX_VALUE_LENGTH2) {
63594
- out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
63595
- }
63596
- return out;
63597
- }
63598
- function nameTokens2(name) {
63599
- return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t) => t.toLowerCase()).filter(Boolean);
63600
- }
63601
- function isSensitiveName2(name) {
63602
- const tokens = nameTokens2(name);
63603
- for (let i = 0;i < tokens.length; i++) {
63604
- const token = tokens[i];
63605
- if (SENSITIVE_NAME_TOKENS2.has(token)) {
63606
- return true;
63607
- }
63608
- if (token === "key" || token === "keys") {
63609
- const prev = tokens[i - 1];
63610
- if (prev && SENSITIVE_KEY_PREFIXES2.has(prev)) {
63611
- return true;
63612
- }
63613
- }
63614
- }
63615
- return false;
63616
- }
63617
- function redactProperty2(name, value) {
63618
- if (value === undefined || value === null) {
63619
- return;
63620
- }
63621
- if (isSensitiveName2(name)) {
63622
- return REDACTED2;
63623
- }
63624
- if (typeof value === "boolean" || typeof value === "number") {
63625
- return value;
63626
- }
63627
- if (typeof value !== "string") {
63628
- return "[OBJECT]";
63629
- }
63630
- return redactValueDetectors2(value);
63631
- }
63632
- function redactProperties2(properties) {
63633
- const out = {};
63634
- for (const [name, value] of Object.entries(properties)) {
63635
- const redacted = redactProperty2(name, value);
63636
- if (redacted !== undefined) {
63637
- out[name] = redacted;
63638
- }
63639
- }
63640
- return out;
63641
- }
63642
-
63643
63851
  // ../../common/src/trackedAction.ts
63644
63852
  var pollSignalSlot2 = singleton3("PollSignal");
63645
63853
  var cliErrorCodeValues2 = new Set(CLI_ERROR_CODES2);
63646
63854
  var retryHintValues2 = new Set(RETRY_HINTS2);
63855
+ var TELEMETRY_COMMAND_ARG_PREFIX2 = "uip.cmd.arg.";
63647
63856
  var processContext2 = {
63648
63857
  exit: (code) => {
63649
63858
  process.exitCode = code;
@@ -63654,22 +63863,18 @@ var processContext2 = {
63654
63863
  };
63655
63864
  function extractCommandParams2(cmd) {
63656
63865
  const params = {};
63866
+ const add3 = (name, value) => {
63867
+ if (name && value !== undefined) {
63868
+ params[`${TELEMETRY_COMMAND_ARG_PREFIX2}${name}`] = value;
63869
+ }
63870
+ };
63657
63871
  const registered = cmd.registeredArguments ?? [];
63658
63872
  const processed = cmd.processedArgs ?? [];
63659
63873
  for (let i = 0;i < registered.length; i++) {
63660
- const value = processed[i];
63661
- if (value === undefined) {
63662
- continue;
63663
- }
63664
- const name = registered[i].name();
63665
- if (name) {
63666
- params[name] = value;
63667
- }
63874
+ add3(registered[i].name(), processed[i]);
63668
63875
  }
63669
63876
  for (const [key, value] of Object.entries(cmd.opts())) {
63670
- if (value !== undefined) {
63671
- params[key] = value;
63672
- }
63877
+ add3(key, value);
63673
63878
  }
63674
63879
  return params;
63675
63880
  }
@@ -63712,11 +63917,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
63712
63917
  return this.action(async (...args) => {
63713
63918
  const telemetryName = deriveCommandPath2(command);
63714
63919
  const props = typeof properties === "function" ? properties(...args) : properties;
63920
+ const requestContext = telemetry2.createRequestContext();
63715
63921
  const startTime = performance.now();
63716
63922
  let errorMessage4;
63717
63923
  let fallbackExitCode = EXIT_CODES2.Success;
63718
63924
  clearRecordedCommandFailureTelemetry2();
63719
- const [error] = await catchError5(fn(...args));
63925
+ const [error] = await catchError5(telemetry2.runWithContext(requestContext, () => fn(...args)));
63720
63926
  if (error) {
63721
63927
  errorMessage4 = error instanceof Error ? error.message : String(error);
63722
63928
  logger2.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage4}`);
@@ -63752,16 +63958,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
63752
63958
  recordedFailure,
63753
63959
  pollSignal: context.pollSignal
63754
63960
  });
63755
- telemetry2.trackEvent(telemetryName, redactProperties2({
63756
- ...extractCommandParams2(command),
63961
+ const commandParams = extractCommandParams2(command);
63962
+ if (props) {
63963
+ for (const key of Object.keys(props)) {
63964
+ delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX2}${key}`];
63965
+ }
63966
+ }
63967
+ const baseProperties = redactProperties2({
63968
+ ...commandParams,
63757
63969
  ...props,
63758
63970
  ...buildCommandTelemetryAttribution2(telemetryName, process.env.UIPATH_SKILL),
63759
63971
  command: "true",
63760
- duration: String(durationMs),
63761
- success: String(success),
63762
63972
  ...terminalTelemetry,
63763
63973
  ...errorMessage4 ? { errorMessage: errorMessage4 } : {}
63764
- }));
63974
+ });
63975
+ telemetry2.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
63765
63976
  });
63766
63977
  };
63767
63978
  // ../../common/src/console-guard.ts
@@ -65032,7 +65243,7 @@ var registerCommands2 = async (program2) => {
65032
65243
  var package_default6 = {
65033
65244
  name: "@uipath/audit-tool",
65034
65245
  license: "MIT",
65035
- version: "1.199.0-preview.91",
65246
+ version: "1.199.0-preview.97",
65036
65247
  description: "CLI plugin for the UiPath Audit Service — query event sources, paginate events, and export ZIPs from the long-term store.",
65037
65248
  private: false,
65038
65249
  repository: {
@@ -66288,7 +66499,7 @@ var registerCommands3 = async (program2) => {
66288
66499
  var package_default8 = {
66289
66500
  name: "@uipath/authz-tool",
66290
66501
  license: "MIT",
66291
- version: "1.199.0-preview.91",
66502
+ version: "1.199.0-preview.97",
66292
66503
  description: "CLI plugin for the UiPath Authorization service.",
66293
66504
  private: false,
66294
66505
  repository: {
@@ -71899,7 +72110,7 @@ var registerCommands4 = async (program2) => {
71899
72110
  var package_default11 = {
71900
72111
  name: "@uipath/identity-tool",
71901
72112
  license: "MIT",
71902
- version: "1.199.0-preview.91",
72113
+ version: "1.199.0-preview.97",
71903
72114
  description: "Manage Identity Server users, groups, robot accounts, and external apps.",
71904
72115
  private: false,
71905
72116
  repository: {
@@ -74268,7 +74479,7 @@ var registerCommands5 = async (program2) => {
74268
74479
  var package_default12 = {
74269
74480
  name: "@uipath/oms-tool",
74270
74481
  license: "MIT",
74271
- version: "1.199.0-preview.91",
74482
+ version: "1.199.0-preview.97",
74272
74483
  description: "CLI plugin for the UiPath Organization Management Service.",
74273
74484
  private: false,
74274
74485
  repository: {
@@ -80799,7 +81010,7 @@ var registerCommands6 = async (program2) => {
80799
81010
  var package_default14 = {
80800
81011
  name: "@uipath/resourcecatalog-tool",
80801
81012
  license: "MIT",
80802
- version: "1.199.0-preview.91",
81013
+ version: "1.199.0-preview.97",
80803
81014
  description: "CLI plugin for the UiPath Resource Catalog Service.",
80804
81015
  private: false,
80805
81016
  repository: {
@@ -82747,7 +82958,7 @@ var registerCommands7 = async (program2) => {
82747
82958
  var package_default16 = {
82748
82959
  name: "@uipath/admin-tool",
82749
82960
  license: "MIT",
82750
- version: "1.199.0-preview.91",
82961
+ version: "1.199.0-preview.97",
82751
82962
  description: "Manage UiPath admin resources — Identity Server, Resource Catalog Service, Audit Service, VPN Gateway.",
82752
82963
  private: false,
82753
82964
  repository: {
@@ -82812,4 +83023,4 @@ export {
82812
83023
  metadata8 as metadata
82813
83024
  };
82814
83025
 
82815
- //# debugId=C7BC7F6F21C2DB7B64756E2164756E21
83026
+ //# debugId=493C560B98683D5D64756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/admin-tool",
3
3
  "license": "MIT",
4
- "version": "1.199.0-preview.91",
4
+ "version": "1.199.0-preview.97",
5
5
  "description": "Manage UiPath admin resources — Identity Server, Resource Catalog Service, Audit Service, VPN Gateway.",
6
6
  "private": false,
7
7
  "repository": {
@@ -23,5 +23,5 @@
23
23
  "files": [
24
24
  "dist"
25
25
  ],
26
- "gitHead": "f428cb1e61ba89ad18394b0c6106784055699f02"
26
+ "gitHead": "087ae21e842f27bde5eb0013892c9487bfe60568"
27
27
  }