@uipath/admin-tool 1.198.0-preview.95 → 1.198.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 +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.198.0-preview.95",
23696
+ version: "1.198.0",
23697
23697
  description: "CLI plugin for UiPath VPN Gateway management (Hypervisor service).",
23698
23698
  private: false,
23699
23699
  repository: {
@@ -51547,10 +51547,33 @@ class NodeContextStorage {
51547
51547
  return this.storage.getStore();
51548
51548
  }
51549
51549
  }
51550
+ var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
51551
+ var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
51552
+ function getProcessEnv() {
51553
+ return globalThis.process?.env;
51554
+ }
51555
+ function parseInboundTraceparent(value) {
51556
+ if (!value) {
51557
+ return;
51558
+ }
51559
+ const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
51560
+ if (!match) {
51561
+ return;
51562
+ }
51563
+ const [, traceId, parentSpanId] = match;
51564
+ if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
51565
+ return;
51566
+ }
51567
+ return { traceId, parentSpanId };
51568
+ }
51569
+ function getInboundTraceContext() {
51570
+ return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
51571
+ }
51550
51572
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
51551
51573
  var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
51552
51574
  var telemetrySessionIdSlot = singleton2("TelemetrySessionId");
51553
- function getProcessEnv() {
51575
+ var telemetryOperationIdSlot = singleton2("TelemetryOperationId");
51576
+ function getProcessEnv2() {
51554
51577
  return globalThis.process?.env;
51555
51578
  }
51556
51579
  function normalizeSessionId(value) {
@@ -51561,15 +51584,159 @@ function normalizeSessionId(value) {
51561
51584
  return trimmed || undefined;
51562
51585
  }
51563
51586
  function getConfiguredTelemetrySessionId() {
51564
- return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
51587
+ return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
51565
51588
  }
51566
51589
  function resolveTelemetrySessionId(existingSessionId) {
51567
51590
  return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
51568
51591
  }
51592
+ function getTelemetryOperationId() {
51593
+ const existing = telemetryOperationIdSlot.get();
51594
+ if (existing) {
51595
+ return existing;
51596
+ }
51597
+ const inboundTraceId = getInboundTraceContext()?.traceId;
51598
+ const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
51599
+ telemetryOperationIdSlot.set(generated);
51600
+ return generated;
51601
+ }
51569
51602
  var telemetryPropsSlot2 = singleton2("TelemetryDefaultProps");
51570
51603
  function getGlobalTelemetryProperties() {
51571
51604
  return telemetryPropsSlot2.get();
51572
51605
  }
51606
+ var REDACTED = "[REDACTED]";
51607
+ var MAX_VALUE_LENGTH = 200;
51608
+ var SENSITIVE_NAME_TOKENS = new Set([
51609
+ "token",
51610
+ "tokens",
51611
+ "secret",
51612
+ "secrets",
51613
+ "password",
51614
+ "passwords",
51615
+ "pwd",
51616
+ "credential",
51617
+ "credentials",
51618
+ "auth",
51619
+ "authentication",
51620
+ "authorization",
51621
+ "authority",
51622
+ "cert",
51623
+ "certificate",
51624
+ "certificates"
51625
+ ]);
51626
+ var SENSITIVE_KEY_PREFIXES = new Set([
51627
+ "api",
51628
+ "access",
51629
+ "client",
51630
+ "private",
51631
+ "public",
51632
+ "signing",
51633
+ "encryption",
51634
+ "session",
51635
+ "master",
51636
+ "shared",
51637
+ "root",
51638
+ "ssh",
51639
+ "rsa",
51640
+ "aes",
51641
+ "hmac",
51642
+ "oauth"
51643
+ ]);
51644
+ 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;
51645
+ var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
51646
+ var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
51647
+ var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
51648
+ var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
51649
+ var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
51650
+ var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
51651
+ function shortHash(input) {
51652
+ let hash = 2166136261;
51653
+ for (let i = 0;i < input.length; i++) {
51654
+ hash ^= input.charCodeAt(i);
51655
+ hash = Math.imul(hash, 16777619);
51656
+ }
51657
+ return (hash >>> 0).toString(16).padStart(8, "0");
51658
+ }
51659
+ function redactUrl(raw) {
51660
+ try {
51661
+ const url = new URL(raw);
51662
+ return `${url.protocol}//${url.host}`;
51663
+ } catch {
51664
+ return `url#${shortHash(raw)}`;
51665
+ }
51666
+ }
51667
+ function redactValueDetectors(value) {
51668
+ let out = value;
51669
+ out = out.replace(JWT_PATTERN, () => REDACTED);
51670
+ out = out.replace(URL_PATTERN, (match) => {
51671
+ const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
51672
+ const core2 = trailing ? match.slice(0, -trailing.length) : match;
51673
+ return `${redactUrl(core2)}${trailing}`;
51674
+ });
51675
+ out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
51676
+ out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
51677
+ out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
51678
+ out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
51679
+ if (out.length > MAX_VALUE_LENGTH) {
51680
+ out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
51681
+ }
51682
+ return out;
51683
+ }
51684
+ function redactValue(value) {
51685
+ return redactValueDetectors(value);
51686
+ }
51687
+ function redactError(error) {
51688
+ const safe = new Error(redactValueDetectors(error.message ?? ""));
51689
+ safe.name = error.name;
51690
+ safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
51691
+ return safe;
51692
+ }
51693
+ function nameTokens(name) {
51694
+ 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);
51695
+ }
51696
+ function isSensitiveName(name) {
51697
+ const tokens = nameTokens(name);
51698
+ for (let i = 0;i < tokens.length; i++) {
51699
+ const token = tokens[i];
51700
+ if (SENSITIVE_NAME_TOKENS.has(token)) {
51701
+ return true;
51702
+ }
51703
+ if (token === "key" || token === "keys") {
51704
+ const prev = tokens[i - 1];
51705
+ if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
51706
+ return true;
51707
+ }
51708
+ }
51709
+ }
51710
+ return false;
51711
+ }
51712
+ function redactProperty(name, value) {
51713
+ if (value === undefined || value === null) {
51714
+ return;
51715
+ }
51716
+ if (isSensitiveName(name)) {
51717
+ return REDACTED;
51718
+ }
51719
+ if (typeof value === "boolean" || typeof value === "number") {
51720
+ return value;
51721
+ }
51722
+ if (typeof value !== "string") {
51723
+ return "[OBJECT]";
51724
+ }
51725
+ return redactValueDetectors(value);
51726
+ }
51727
+ function redactProperties(properties) {
51728
+ const out = {};
51729
+ for (const [name, value] of Object.entries(properties)) {
51730
+ const redacted = redactProperty(name, value);
51731
+ if (redacted !== undefined) {
51732
+ out[name] = redacted;
51733
+ }
51734
+ }
51735
+ return out;
51736
+ }
51737
+ var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
51738
+ var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
51739
+ var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
51573
51740
 
51574
51741
  class TelemetryService {
51575
51742
  telemetryProvider;
@@ -51597,11 +51764,15 @@ class TelemetryService {
51597
51764
  trackException(error, properties) {
51598
51765
  const context = this.getCurrentContext();
51599
51766
  const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
51600
- this.telemetryProvider.trackException(error, enrichedProperties);
51767
+ this.telemetryProvider.trackException(redactError(error), enrichedProperties);
51601
51768
  }
51602
51769
  async trackRequest(name, fn, properties) {
51770
+ const parentContext = this.getCurrentContext();
51771
+ const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
51772
+ const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
51603
51773
  const context = {
51604
- operationId: this.operationId ?? this.generateId(),
51774
+ operationId,
51775
+ ...parentId !== undefined ? { parentId } : {},
51605
51776
  id: this.generateId()
51606
51777
  };
51607
51778
  const startTime = performance.now();
@@ -51619,6 +51790,45 @@ class TelemetryService {
51619
51790
  throw error;
51620
51791
  }
51621
51792
  }
51793
+ trackRequestResult(name, durationMs, success, properties, context) {
51794
+ const requestContext = context ?? {
51795
+ operationId: this.operationId ?? getTelemetryOperationId(),
51796
+ id: this.generateId()
51797
+ };
51798
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
51799
+ this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
51800
+ }
51801
+ createRequestContext() {
51802
+ const operationId = this.operationId ?? getTelemetryOperationId();
51803
+ const parentId = this.inboundParentIdFor(operationId);
51804
+ return {
51805
+ operationId,
51806
+ ...parentId !== undefined ? { parentId } : {},
51807
+ id: this.generateId()
51808
+ };
51809
+ }
51810
+ inboundParentIdFor(operationId) {
51811
+ const inbound = getInboundTraceContext();
51812
+ return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
51813
+ }
51814
+ runWithContext(context, fn) {
51815
+ return this.contextStorage.run(context, fn);
51816
+ }
51817
+ createDependencyContext() {
51818
+ const parentContext = this.getCurrentContext();
51819
+ if (!parentContext) {
51820
+ return;
51821
+ }
51822
+ return {
51823
+ operationId: parentContext.operationId,
51824
+ parentId: parentContext.id,
51825
+ id: this.generateId()
51826
+ };
51827
+ }
51828
+ trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
51829
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
51830
+ this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
51831
+ }
51622
51832
  async trackDependencyOperation(name, type2, fn, properties) {
51623
51833
  const parentContext = this.getCurrentContext();
51624
51834
  if (!parentContext) {
@@ -51655,8 +51865,12 @@ class TelemetryService {
51655
51865
  ...getExecutionContextTelemetryProperties(),
51656
51866
  ...globalProperties,
51657
51867
  ...this.defaultProperties,
51658
- ...properties,
51659
- ...context
51868
+ ...redactProperties(properties ?? {}),
51869
+ ...context ? {
51870
+ [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
51871
+ ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
51872
+ [TELEMETRY_SPAN_ID_PROPERTY]: context.id
51873
+ } : {}
51660
51874
  };
51661
51875
  if (sessionId === undefined) {
51662
51876
  delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
@@ -51666,7 +51880,16 @@ class TelemetryService {
51666
51880
  return enriched;
51667
51881
  }
51668
51882
  generateId() {
51669
- return crypto.randomUUID().replaceAll("-", "");
51883
+ const bytes = new Uint8Array(8);
51884
+ let hex = "";
51885
+ do {
51886
+ crypto.getRandomValues(bytes);
51887
+ hex = "";
51888
+ for (const byte of bytes) {
51889
+ hex += byte.toString(16).padStart(2, "0");
51890
+ }
51891
+ } while (/^0+$/.test(hex));
51892
+ return hex;
51670
51893
  }
51671
51894
  }
51672
51895
  var providerSlot = singleton2("TelemetryProvider");
@@ -52362,131 +52585,10 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
52362
52585
  ...getCommandProductModeAttribution(commandPath)
52363
52586
  };
52364
52587
  }
52365
- var REDACTED = "[REDACTED]";
52366
- var MAX_VALUE_LENGTH = 200;
52367
- var SENSITIVE_NAME_TOKENS = new Set([
52368
- "token",
52369
- "tokens",
52370
- "secret",
52371
- "secrets",
52372
- "password",
52373
- "passwords",
52374
- "pwd",
52375
- "credential",
52376
- "credentials",
52377
- "auth",
52378
- "authentication",
52379
- "authorization",
52380
- "authority",
52381
- "cert",
52382
- "certificate",
52383
- "certificates"
52384
- ]);
52385
- var SENSITIVE_KEY_PREFIXES = new Set([
52386
- "api",
52387
- "access",
52388
- "client",
52389
- "private",
52390
- "public",
52391
- "signing",
52392
- "encryption",
52393
- "session",
52394
- "master",
52395
- "shared",
52396
- "root",
52397
- "ssh",
52398
- "rsa",
52399
- "aes",
52400
- "hmac",
52401
- "oauth"
52402
- ]);
52403
- 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;
52404
- var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
52405
- var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
52406
- var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
52407
- var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
52408
- var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
52409
- var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
52410
- function shortHash(input) {
52411
- let hash = 2166136261;
52412
- for (let i = 0;i < input.length; i++) {
52413
- hash ^= input.charCodeAt(i);
52414
- hash = Math.imul(hash, 16777619);
52415
- }
52416
- return (hash >>> 0).toString(16).padStart(8, "0");
52417
- }
52418
- function redactUrl(raw) {
52419
- try {
52420
- const url = new URL(raw);
52421
- return `${url.protocol}//${url.host}`;
52422
- } catch {
52423
- return `url#${shortHash(raw)}`;
52424
- }
52425
- }
52426
- function redactValueDetectors(value) {
52427
- let out = value;
52428
- out = out.replace(JWT_PATTERN, () => REDACTED);
52429
- out = out.replace(URL_PATTERN, (match) => {
52430
- const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
52431
- const core2 = trailing ? match.slice(0, -trailing.length) : match;
52432
- return `${redactUrl(core2)}${trailing}`;
52433
- });
52434
- out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
52435
- out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
52436
- out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
52437
- out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
52438
- if (out.length > MAX_VALUE_LENGTH) {
52439
- out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
52440
- }
52441
- return out;
52442
- }
52443
- function nameTokens(name) {
52444
- 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);
52445
- }
52446
- function isSensitiveName(name) {
52447
- const tokens = nameTokens(name);
52448
- for (let i = 0;i < tokens.length; i++) {
52449
- const token = tokens[i];
52450
- if (SENSITIVE_NAME_TOKENS.has(token)) {
52451
- return true;
52452
- }
52453
- if (token === "key" || token === "keys") {
52454
- const prev = tokens[i - 1];
52455
- if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
52456
- return true;
52457
- }
52458
- }
52459
- }
52460
- return false;
52461
- }
52462
- function redactProperty(name, value) {
52463
- if (value === undefined || value === null) {
52464
- return;
52465
- }
52466
- if (isSensitiveName(name)) {
52467
- return REDACTED;
52468
- }
52469
- if (typeof value === "boolean" || typeof value === "number") {
52470
- return value;
52471
- }
52472
- if (typeof value !== "string") {
52473
- return "[OBJECT]";
52474
- }
52475
- return redactValueDetectors(value);
52476
- }
52477
- function redactProperties(properties) {
52478
- const out = {};
52479
- for (const [name, value] of Object.entries(properties)) {
52480
- const redacted = redactProperty(name, value);
52481
- if (redacted !== undefined) {
52482
- out[name] = redacted;
52483
- }
52484
- }
52485
- return out;
52486
- }
52487
52588
  var pollSignalSlot = singleton2("PollSignal");
52488
52589
  var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
52489
52590
  var retryHintValues = new Set(RETRY_HINTS);
52591
+ var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
52490
52592
  var processContext = {
52491
52593
  exit: (code) => {
52492
52594
  process.exitCode = code;
@@ -52497,22 +52599,18 @@ var processContext = {
52497
52599
  };
52498
52600
  function extractCommandParams(cmd) {
52499
52601
  const params = {};
52602
+ const add2 = (name, value) => {
52603
+ if (name && value !== undefined) {
52604
+ params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
52605
+ }
52606
+ };
52500
52607
  const registered = cmd.registeredArguments ?? [];
52501
52608
  const processed = cmd.processedArgs ?? [];
52502
52609
  for (let i = 0;i < registered.length; i++) {
52503
- const value = processed[i];
52504
- if (value === undefined) {
52505
- continue;
52506
- }
52507
- const name = registered[i].name();
52508
- if (name) {
52509
- params[name] = value;
52510
- }
52610
+ add2(registered[i].name(), processed[i]);
52511
52611
  }
52512
52612
  for (const [key, value] of Object.entries(cmd.opts())) {
52513
- if (value !== undefined) {
52514
- params[key] = value;
52515
- }
52613
+ add2(key, value);
52516
52614
  }
52517
52615
  return params;
52518
52616
  }
@@ -52555,11 +52653,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
52555
52653
  return this.action(async (...args) => {
52556
52654
  const telemetryName = deriveCommandPath(command);
52557
52655
  const props = typeof properties === "function" ? properties(...args) : properties;
52656
+ const requestContext = telemetry.createRequestContext();
52558
52657
  const startTime = performance.now();
52559
52658
  let errorMessage2;
52560
52659
  let fallbackExitCode = EXIT_CODES.Success;
52561
52660
  clearRecordedCommandFailureTelemetry();
52562
- const [error] = await catchError2(fn(...args));
52661
+ const [error] = await catchError2(telemetry.runWithContext(requestContext, () => fn(...args)));
52563
52662
  if (error) {
52564
52663
  errorMessage2 = error instanceof Error ? error.message : String(error);
52565
52664
  logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage2}`);
@@ -52595,16 +52694,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
52595
52694
  recordedFailure,
52596
52695
  pollSignal: context.pollSignal
52597
52696
  });
52598
- telemetry.trackEvent(telemetryName, redactProperties({
52599
- ...extractCommandParams(command),
52697
+ const commandParams = extractCommandParams(command);
52698
+ if (props) {
52699
+ for (const key of Object.keys(props)) {
52700
+ delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
52701
+ }
52702
+ }
52703
+ const baseProperties = redactProperties({
52704
+ ...commandParams,
52600
52705
  ...props,
52601
52706
  ...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
52602
52707
  command: "true",
52603
- duration: String(durationMs),
52604
- success: String(success),
52605
52708
  ...terminalTelemetry,
52606
52709
  ...errorMessage2 ? { errorMessage: errorMessage2 } : {}
52607
- }));
52710
+ });
52711
+ telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
52608
52712
  });
52609
52713
  };
52610
52714
  var guardInstalledSlot = singleton2("ConsoleGuardInstalled");
@@ -53895,7 +53999,7 @@ var registerCommands = async (program2) => {
53895
53999
  var package_default3 = {
53896
54000
  name: "@uipath/apms-tool",
53897
54001
  license: "MIT",
53898
- version: "1.198.0-preview.95",
54002
+ version: "1.198.0",
53899
54003
  description: "CLI plugin for the UiPath Access Policy Management Service.",
53900
54004
  private: false,
53901
54005
  repository: {
@@ -62683,11 +62787,36 @@ class NodeContextStorage2 {
62683
62787
  return this.storage.getStore();
62684
62788
  }
62685
62789
  }
62790
+ // ../../common/src/telemetry/trace-context.ts
62791
+ var TELEMETRY_TRACEPARENT_ENV2 = "TRACEPARENT";
62792
+ var TRACEPARENT_PATTERN2 = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
62793
+ function getProcessEnv3() {
62794
+ return globalThis.process?.env;
62795
+ }
62796
+ function parseInboundTraceparent2(value) {
62797
+ if (!value) {
62798
+ return;
62799
+ }
62800
+ const match = TRACEPARENT_PATTERN2.exec(value.trim().toLowerCase());
62801
+ if (!match) {
62802
+ return;
62803
+ }
62804
+ const [, traceId, parentSpanId] = match;
62805
+ if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
62806
+ return;
62807
+ }
62808
+ return { traceId, parentSpanId };
62809
+ }
62810
+ function getInboundTraceContext2() {
62811
+ return parseInboundTraceparent2(getProcessEnv3()?.[TELEMETRY_TRACEPARENT_ENV2]);
62812
+ }
62813
+
62686
62814
  // ../../common/src/telemetry/session-id.ts
62687
62815
  var TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID";
62688
62816
  var TELEMETRY_SESSION_ID_PROPERTY2 = "session_id";
62689
62817
  var telemetrySessionIdSlot2 = singleton3("TelemetrySessionId");
62690
- function getProcessEnv2() {
62818
+ var telemetryOperationIdSlot2 = singleton3("TelemetryOperationId");
62819
+ function getProcessEnv5() {
62691
62820
  return globalThis.process?.env;
62692
62821
  }
62693
62822
  function normalizeSessionId2(value) {
@@ -62698,12 +62827,159 @@ function normalizeSessionId2(value) {
62698
62827
  return trimmed || undefined;
62699
62828
  }
62700
62829
  function getConfiguredTelemetrySessionId2() {
62701
- return normalizeSessionId2(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV2]);
62830
+ return normalizeSessionId2(getProcessEnv5()?.[TELEMETRY_SESSION_ID_ENV2]);
62702
62831
  }
62703
62832
  function resolveTelemetrySessionId2(existingSessionId) {
62704
62833
  return getConfiguredTelemetrySessionId2() ?? normalizeSessionId2(existingSessionId);
62705
62834
  }
62835
+ function getTelemetryOperationId2() {
62836
+ const existing = telemetryOperationIdSlot2.get();
62837
+ if (existing) {
62838
+ return existing;
62839
+ }
62840
+ const inboundTraceId = getInboundTraceContext2()?.traceId;
62841
+ const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
62842
+ telemetryOperationIdSlot2.set(generated);
62843
+ return generated;
62844
+ }
62845
+ // ../../common/src/telemetry/pii-redactor.ts
62846
+ var REDACTED2 = "[REDACTED]";
62847
+ var MAX_VALUE_LENGTH2 = 200;
62848
+ var SENSITIVE_NAME_TOKENS2 = new Set([
62849
+ "token",
62850
+ "tokens",
62851
+ "secret",
62852
+ "secrets",
62853
+ "password",
62854
+ "passwords",
62855
+ "pwd",
62856
+ "credential",
62857
+ "credentials",
62858
+ "auth",
62859
+ "authentication",
62860
+ "authorization",
62861
+ "authority",
62862
+ "cert",
62863
+ "certificate",
62864
+ "certificates"
62865
+ ]);
62866
+ var SENSITIVE_KEY_PREFIXES2 = new Set([
62867
+ "api",
62868
+ "access",
62869
+ "client",
62870
+ "private",
62871
+ "public",
62872
+ "signing",
62873
+ "encryption",
62874
+ "session",
62875
+ "master",
62876
+ "shared",
62877
+ "root",
62878
+ "ssh",
62879
+ "rsa",
62880
+ "aes",
62881
+ "hmac",
62882
+ "oauth"
62883
+ ]);
62884
+ 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;
62885
+ var EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
62886
+ var JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
62887
+ var LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
62888
+ var USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
62889
+ var URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
62890
+ var URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
62891
+ function shortHash2(input) {
62892
+ let hash = 2166136261;
62893
+ for (let i = 0;i < input.length; i++) {
62894
+ hash ^= input.charCodeAt(i);
62895
+ hash = Math.imul(hash, 16777619);
62896
+ }
62897
+ return (hash >>> 0).toString(16).padStart(8, "0");
62898
+ }
62899
+ function redactUrl2(raw) {
62900
+ try {
62901
+ const url = new URL(raw);
62902
+ return `${url.protocol}//${url.host}`;
62903
+ } catch {
62904
+ return `url#${shortHash2(raw)}`;
62905
+ }
62906
+ }
62907
+ function redactValueDetectors2(value) {
62908
+ let out = value;
62909
+ out = out.replace(JWT_PATTERN2, () => REDACTED2);
62910
+ out = out.replace(URL_PATTERN2, (match) => {
62911
+ const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
62912
+ const core3 = trailing ? match.slice(0, -trailing.length) : match;
62913
+ return `${redactUrl2(core3)}${trailing}`;
62914
+ });
62915
+ out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
62916
+ out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
62917
+ out = out.replace(UUID_PATTERN2, (match) => `uuid#${shortHash2(match)}`);
62918
+ out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
62919
+ if (out.length > MAX_VALUE_LENGTH2) {
62920
+ out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
62921
+ }
62922
+ return out;
62923
+ }
62924
+ function redactValue2(value) {
62925
+ return redactValueDetectors2(value);
62926
+ }
62927
+ function redactError2(error) {
62928
+ const safe = new Error(redactValueDetectors2(error.message ?? ""));
62929
+ safe.name = error.name;
62930
+ safe.stack = typeof error.stack === "string" ? redactValueDetectors2(error.stack) : undefined;
62931
+ return safe;
62932
+ }
62933
+ function nameTokens2(name) {
62934
+ 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);
62935
+ }
62936
+ function isSensitiveName2(name) {
62937
+ const tokens = nameTokens2(name);
62938
+ for (let i = 0;i < tokens.length; i++) {
62939
+ const token = tokens[i];
62940
+ if (SENSITIVE_NAME_TOKENS2.has(token)) {
62941
+ return true;
62942
+ }
62943
+ if (token === "key" || token === "keys") {
62944
+ const prev = tokens[i - 1];
62945
+ if (prev && SENSITIVE_KEY_PREFIXES2.has(prev)) {
62946
+ return true;
62947
+ }
62948
+ }
62949
+ }
62950
+ return false;
62951
+ }
62952
+ function redactProperty2(name, value) {
62953
+ if (value === undefined || value === null) {
62954
+ return;
62955
+ }
62956
+ if (isSensitiveName2(name)) {
62957
+ return REDACTED2;
62958
+ }
62959
+ if (typeof value === "boolean" || typeof value === "number") {
62960
+ return value;
62961
+ }
62962
+ if (typeof value !== "string") {
62963
+ return "[OBJECT]";
62964
+ }
62965
+ return redactValueDetectors2(value);
62966
+ }
62967
+ function redactProperties2(properties) {
62968
+ const out = {};
62969
+ for (const [name, value] of Object.entries(properties)) {
62970
+ const redacted = redactProperty2(name, value);
62971
+ if (redacted !== undefined) {
62972
+ out[name] = redacted;
62973
+ }
62974
+ }
62975
+ return out;
62976
+ }
62977
+
62706
62978
  // ../../common/src/telemetry/telemetry-service.ts
62979
+ var TELEMETRY_OPERATION_ID_PROPERTY2 = "uip.trace.operation_id";
62980
+ var TELEMETRY_PARENT_ID_PROPERTY2 = "uip.trace.parent_id";
62981
+ var TELEMETRY_SPAN_ID_PROPERTY2 = "uip.trace.span_id";
62982
+
62707
62983
  class TelemetryService2 {
62708
62984
  telemetryProvider;
62709
62985
  contextStorage;
@@ -62730,11 +63006,15 @@ class TelemetryService2 {
62730
63006
  trackException(error, properties) {
62731
63007
  const context = this.getCurrentContext();
62732
63008
  const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
62733
- this.telemetryProvider.trackException(error, enrichedProperties);
63009
+ this.telemetryProvider.trackException(redactError2(error), enrichedProperties);
62734
63010
  }
62735
63011
  async trackRequest(name, fn, properties) {
63012
+ const parentContext = this.getCurrentContext();
63013
+ const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId2();
63014
+ const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
62736
63015
  const context = {
62737
- operationId: this.operationId ?? this.generateId(),
63016
+ operationId,
63017
+ ...parentId !== undefined ? { parentId } : {},
62738
63018
  id: this.generateId()
62739
63019
  };
62740
63020
  const startTime = performance.now();
@@ -62752,6 +63032,45 @@ class TelemetryService2 {
62752
63032
  throw error;
62753
63033
  }
62754
63034
  }
63035
+ trackRequestResult(name, durationMs, success, properties, context) {
63036
+ const requestContext = context ?? {
63037
+ operationId: this.operationId ?? getTelemetryOperationId2(),
63038
+ id: this.generateId()
63039
+ };
63040
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
63041
+ this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
63042
+ }
63043
+ createRequestContext() {
63044
+ const operationId = this.operationId ?? getTelemetryOperationId2();
63045
+ const parentId = this.inboundParentIdFor(operationId);
63046
+ return {
63047
+ operationId,
63048
+ ...parentId !== undefined ? { parentId } : {},
63049
+ id: this.generateId()
63050
+ };
63051
+ }
63052
+ inboundParentIdFor(operationId) {
63053
+ const inbound = getInboundTraceContext2();
63054
+ return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
63055
+ }
63056
+ runWithContext(context, fn) {
63057
+ return this.contextStorage.run(context, fn);
63058
+ }
63059
+ createDependencyContext() {
63060
+ const parentContext = this.getCurrentContext();
63061
+ if (!parentContext) {
63062
+ return;
63063
+ }
63064
+ return {
63065
+ operationId: parentContext.operationId,
63066
+ parentId: parentContext.id,
63067
+ id: this.generateId()
63068
+ };
63069
+ }
63070
+ trackDependencyResult(name, type3, durationMs, success, properties, context, resultCode) {
63071
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
63072
+ this.telemetryProvider.trackDependency(redactValue2(name), type3, durationMs, success, enrichedProperties, resultCode);
63073
+ }
62755
63074
  async trackDependencyOperation(name, type3, fn, properties) {
62756
63075
  const parentContext = this.getCurrentContext();
62757
63076
  if (!parentContext) {
@@ -62788,8 +63107,12 @@ class TelemetryService2 {
62788
63107
  ...getExecutionContextTelemetryProperties2(),
62789
63108
  ...globalProperties,
62790
63109
  ...this.defaultProperties,
62791
- ...properties,
62792
- ...context
63110
+ ...redactProperties2(properties ?? {}),
63111
+ ...context ? {
63112
+ [TELEMETRY_OPERATION_ID_PROPERTY2]: context.operationId,
63113
+ ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY2]: context.parentId } : {},
63114
+ [TELEMETRY_SPAN_ID_PROPERTY2]: context.id
63115
+ } : {}
62793
63116
  };
62794
63117
  if (sessionId === undefined) {
62795
63118
  delete enriched[TELEMETRY_SESSION_ID_PROPERTY2];
@@ -62799,7 +63122,16 @@ class TelemetryService2 {
62799
63122
  return enriched;
62800
63123
  }
62801
63124
  generateId() {
62802
- return crypto.randomUUID().replaceAll("-", "");
63125
+ const bytes = new Uint8Array(8);
63126
+ let hex = "";
63127
+ do {
63128
+ crypto.getRandomValues(bytes);
63129
+ hex = "";
63130
+ for (const byte of bytes) {
63131
+ hex += byte.toString(16).padStart(2, "0");
63132
+ }
63133
+ } while (/^0+$/.test(hex));
63134
+ return hex;
62803
63135
  }
62804
63136
  }
62805
63137
  // ../../common/src/telemetry/node-appinsights-telemetry-provider.ts
@@ -63501,134 +63833,11 @@ function buildCommandTelemetryAttribution2(commandPath, skillSource) {
63501
63833
  };
63502
63834
  }
63503
63835
 
63504
- // ../../common/src/telemetry/pii-redactor.ts
63505
- var REDACTED2 = "[REDACTED]";
63506
- var MAX_VALUE_LENGTH2 = 200;
63507
- var SENSITIVE_NAME_TOKENS2 = new Set([
63508
- "token",
63509
- "tokens",
63510
- "secret",
63511
- "secrets",
63512
- "password",
63513
- "passwords",
63514
- "pwd",
63515
- "credential",
63516
- "credentials",
63517
- "auth",
63518
- "authentication",
63519
- "authorization",
63520
- "authority",
63521
- "cert",
63522
- "certificate",
63523
- "certificates"
63524
- ]);
63525
- var SENSITIVE_KEY_PREFIXES2 = new Set([
63526
- "api",
63527
- "access",
63528
- "client",
63529
- "private",
63530
- "public",
63531
- "signing",
63532
- "encryption",
63533
- "session",
63534
- "master",
63535
- "shared",
63536
- "root",
63537
- "ssh",
63538
- "rsa",
63539
- "aes",
63540
- "hmac",
63541
- "oauth"
63542
- ]);
63543
- 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;
63544
- var EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
63545
- var JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
63546
- var LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
63547
- var USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
63548
- var URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
63549
- var URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
63550
- function shortHash2(input) {
63551
- let hash = 2166136261;
63552
- for (let i = 0;i < input.length; i++) {
63553
- hash ^= input.charCodeAt(i);
63554
- hash = Math.imul(hash, 16777619);
63555
- }
63556
- return (hash >>> 0).toString(16).padStart(8, "0");
63557
- }
63558
- function redactUrl2(raw) {
63559
- try {
63560
- const url = new URL(raw);
63561
- return `${url.protocol}//${url.host}`;
63562
- } catch {
63563
- return `url#${shortHash2(raw)}`;
63564
- }
63565
- }
63566
- function redactValueDetectors2(value) {
63567
- let out = value;
63568
- out = out.replace(JWT_PATTERN2, () => REDACTED2);
63569
- out = out.replace(URL_PATTERN2, (match) => {
63570
- const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
63571
- const core3 = trailing ? match.slice(0, -trailing.length) : match;
63572
- return `${redactUrl2(core3)}${trailing}`;
63573
- });
63574
- out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
63575
- out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
63576
- out = out.replace(UUID_PATTERN2, (match) => `uuid#${shortHash2(match)}`);
63577
- out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
63578
- if (out.length > MAX_VALUE_LENGTH2) {
63579
- out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
63580
- }
63581
- return out;
63582
- }
63583
- function nameTokens2(name) {
63584
- 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);
63585
- }
63586
- function isSensitiveName2(name) {
63587
- const tokens = nameTokens2(name);
63588
- for (let i = 0;i < tokens.length; i++) {
63589
- const token = tokens[i];
63590
- if (SENSITIVE_NAME_TOKENS2.has(token)) {
63591
- return true;
63592
- }
63593
- if (token === "key" || token === "keys") {
63594
- const prev = tokens[i - 1];
63595
- if (prev && SENSITIVE_KEY_PREFIXES2.has(prev)) {
63596
- return true;
63597
- }
63598
- }
63599
- }
63600
- return false;
63601
- }
63602
- function redactProperty2(name, value) {
63603
- if (value === undefined || value === null) {
63604
- return;
63605
- }
63606
- if (isSensitiveName2(name)) {
63607
- return REDACTED2;
63608
- }
63609
- if (typeof value === "boolean" || typeof value === "number") {
63610
- return value;
63611
- }
63612
- if (typeof value !== "string") {
63613
- return "[OBJECT]";
63614
- }
63615
- return redactValueDetectors2(value);
63616
- }
63617
- function redactProperties2(properties) {
63618
- const out = {};
63619
- for (const [name, value] of Object.entries(properties)) {
63620
- const redacted = redactProperty2(name, value);
63621
- if (redacted !== undefined) {
63622
- out[name] = redacted;
63623
- }
63624
- }
63625
- return out;
63626
- }
63627
-
63628
63836
  // ../../common/src/trackedAction.ts
63629
63837
  var pollSignalSlot2 = singleton3("PollSignal");
63630
63838
  var cliErrorCodeValues2 = new Set(CLI_ERROR_CODES2);
63631
63839
  var retryHintValues2 = new Set(RETRY_HINTS2);
63840
+ var TELEMETRY_COMMAND_ARG_PREFIX2 = "uip.cmd.arg.";
63632
63841
  var processContext2 = {
63633
63842
  exit: (code) => {
63634
63843
  process.exitCode = code;
@@ -63639,22 +63848,18 @@ var processContext2 = {
63639
63848
  };
63640
63849
  function extractCommandParams2(cmd) {
63641
63850
  const params = {};
63851
+ const add3 = (name, value) => {
63852
+ if (name && value !== undefined) {
63853
+ params[`${TELEMETRY_COMMAND_ARG_PREFIX2}${name}`] = value;
63854
+ }
63855
+ };
63642
63856
  const registered = cmd.registeredArguments ?? [];
63643
63857
  const processed = cmd.processedArgs ?? [];
63644
63858
  for (let i = 0;i < registered.length; i++) {
63645
- const value = processed[i];
63646
- if (value === undefined) {
63647
- continue;
63648
- }
63649
- const name = registered[i].name();
63650
- if (name) {
63651
- params[name] = value;
63652
- }
63859
+ add3(registered[i].name(), processed[i]);
63653
63860
  }
63654
63861
  for (const [key, value] of Object.entries(cmd.opts())) {
63655
- if (value !== undefined) {
63656
- params[key] = value;
63657
- }
63862
+ add3(key, value);
63658
63863
  }
63659
63864
  return params;
63660
63865
  }
@@ -63697,11 +63902,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
63697
63902
  return this.action(async (...args) => {
63698
63903
  const telemetryName = deriveCommandPath2(command);
63699
63904
  const props = typeof properties === "function" ? properties(...args) : properties;
63905
+ const requestContext = telemetry2.createRequestContext();
63700
63906
  const startTime = performance.now();
63701
63907
  let errorMessage4;
63702
63908
  let fallbackExitCode = EXIT_CODES2.Success;
63703
63909
  clearRecordedCommandFailureTelemetry2();
63704
- const [error] = await catchError5(fn(...args));
63910
+ const [error] = await catchError5(telemetry2.runWithContext(requestContext, () => fn(...args)));
63705
63911
  if (error) {
63706
63912
  errorMessage4 = error instanceof Error ? error.message : String(error);
63707
63913
  logger2.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage4}`);
@@ -63737,16 +63943,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
63737
63943
  recordedFailure,
63738
63944
  pollSignal: context.pollSignal
63739
63945
  });
63740
- telemetry2.trackEvent(telemetryName, redactProperties2({
63741
- ...extractCommandParams2(command),
63946
+ const commandParams = extractCommandParams2(command);
63947
+ if (props) {
63948
+ for (const key of Object.keys(props)) {
63949
+ delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX2}${key}`];
63950
+ }
63951
+ }
63952
+ const baseProperties = redactProperties2({
63953
+ ...commandParams,
63742
63954
  ...props,
63743
63955
  ...buildCommandTelemetryAttribution2(telemetryName, process.env.UIPATH_SKILL),
63744
63956
  command: "true",
63745
- duration: String(durationMs),
63746
- success: String(success),
63747
63957
  ...terminalTelemetry,
63748
63958
  ...errorMessage4 ? { errorMessage: errorMessage4 } : {}
63749
- }));
63959
+ });
63960
+ telemetry2.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
63750
63961
  });
63751
63962
  };
63752
63963
  // ../../common/src/console-guard.ts
@@ -65017,7 +65228,7 @@ var registerCommands2 = async (program2) => {
65017
65228
  var package_default6 = {
65018
65229
  name: "@uipath/audit-tool",
65019
65230
  license: "MIT",
65020
- version: "1.198.0-preview.95",
65231
+ version: "1.198.0",
65021
65232
  description: "CLI plugin for the UiPath Audit Service — query event sources, paginate events, and export ZIPs from the long-term store.",
65022
65233
  private: false,
65023
65234
  repository: {
@@ -66273,7 +66484,7 @@ var registerCommands3 = async (program2) => {
66273
66484
  var package_default8 = {
66274
66485
  name: "@uipath/authz-tool",
66275
66486
  license: "MIT",
66276
- version: "1.198.0-preview.95",
66487
+ version: "1.198.0",
66277
66488
  description: "CLI plugin for the UiPath Authorization service.",
66278
66489
  private: false,
66279
66490
  repository: {
@@ -71884,7 +72095,7 @@ var registerCommands4 = async (program2) => {
71884
72095
  var package_default11 = {
71885
72096
  name: "@uipath/identity-tool",
71886
72097
  license: "MIT",
71887
- version: "1.198.0-preview.95",
72098
+ version: "1.198.0",
71888
72099
  description: "Manage Identity Server users, groups, robot accounts, and external apps.",
71889
72100
  private: false,
71890
72101
  repository: {
@@ -74253,7 +74464,7 @@ var registerCommands5 = async (program2) => {
74253
74464
  var package_default12 = {
74254
74465
  name: "@uipath/oms-tool",
74255
74466
  license: "MIT",
74256
- version: "1.198.0-preview.95",
74467
+ version: "1.198.0",
74257
74468
  description: "CLI plugin for the UiPath Organization Management Service.",
74258
74469
  private: false,
74259
74470
  repository: {
@@ -80784,7 +80995,7 @@ var registerCommands6 = async (program2) => {
80784
80995
  var package_default14 = {
80785
80996
  name: "@uipath/resourcecatalog-tool",
80786
80997
  license: "MIT",
80787
- version: "1.198.0-preview.95",
80998
+ version: "1.198.0",
80788
80999
  description: "CLI plugin for the UiPath Resource Catalog Service.",
80789
81000
  private: false,
80790
81001
  repository: {
@@ -82732,7 +82943,7 @@ var registerCommands7 = async (program2) => {
82732
82943
  var package_default16 = {
82733
82944
  name: "@uipath/admin-tool",
82734
82945
  license: "MIT",
82735
- version: "1.198.0-preview.95",
82946
+ version: "1.198.0",
82736
82947
  description: "Manage UiPath admin resources — Identity Server, Resource Catalog Service, Audit Service, VPN Gateway.",
82737
82948
  private: false,
82738
82949
  repository: {
@@ -82797,4 +83008,4 @@ export {
82797
83008
  metadata8 as metadata
82798
83009
  };
82799
83010
 
82800
- //# debugId=016FCD6727B65E9064756E2164756E21
83011
+ //# debugId=0FE9662B1AD68CAC64756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/admin-tool",
3
3
  "license": "MIT",
4
- "version": "1.198.0-preview.95",
4
+ "version": "1.198.0",
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": "7f6f14e06688fe417ecaac94186ab795a9106caa"
26
+ "gitHead": "1fadf03d7a8dd102742571dff569fdac11808afb"
27
27
  }