@uipath/integrationservice-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 +262 -155
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -22381,11 +22381,11 @@ var require_methods = __commonJS((exports) => {
22381
22381
  // ../../node_modules/adm-zip/zipEntry.js
22382
22382
  var require_zipEntry = __commonJS((exports, module) => {
22383
22383
  var Utils = require_util();
22384
- var Headers = require_headers();
22384
+ var Headers2 = require_headers();
22385
22385
  var Constants2 = Utils.Constants;
22386
22386
  var Methods = require_methods();
22387
22387
  module.exports = function(options, input) {
22388
- 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;
22388
+ 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;
22389
22389
  const opts = options;
22390
22390
  const decoder = typeof opts.decoder === "object" ? opts.decoder : Utils.decoder;
22391
22391
  _efs = decoder.hasOwnProperty("efs") ? decoder.efs : false;
@@ -22689,10 +22689,10 @@ var require_zipEntry = __commonJS((exports, module) => {
22689
22689
  // ../../node_modules/adm-zip/zipFile.js
22690
22690
  var require_zipFile = __commonJS((exports, module) => {
22691
22691
  var ZipEntry = require_zipEntry();
22692
- var Headers = require_headers();
22692
+ var Headers2 = require_headers();
22693
22693
  var Utils = require_util();
22694
22694
  module.exports = function(inBuffer, options) {
22695
- var entryList = [], entryTable = Object.create(null), _comment = Buffer.alloc(0), mainHeader = new Headers.MainHeader, loadedEntries = false;
22695
+ var entryList = [], entryTable = Object.create(null), _comment = Buffer.alloc(0), mainHeader = new Headers2.MainHeader, loadedEntries = false;
22696
22696
  var password = null;
22697
22697
  const temporary = new Set;
22698
22698
  const opts = options;
@@ -23588,7 +23588,7 @@ var require_adm_zip = __commonJS((exports, module) => {
23588
23588
  var package_default = {
23589
23589
  name: "@uipath/integrationservice-tool",
23590
23590
  license: "MIT",
23591
- version: "1.199.0-preview.91",
23591
+ version: "1.199.0-preview.97",
23592
23592
  description: "Manage Integration Service connectors, connections, and triggers.",
23593
23593
  private: false,
23594
23594
  repository: {
@@ -29778,11 +29778,36 @@ class NodeContextStorage {
29778
29778
  return this.storage.getStore();
29779
29779
  }
29780
29780
  }
29781
+ // ../common/src/telemetry/trace-context.ts
29782
+ var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
29783
+ var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
29784
+ function getProcessEnv() {
29785
+ return globalThis.process?.env;
29786
+ }
29787
+ function parseInboundTraceparent(value) {
29788
+ if (!value) {
29789
+ return;
29790
+ }
29791
+ const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
29792
+ if (!match) {
29793
+ return;
29794
+ }
29795
+ const [, traceId, parentSpanId] = match;
29796
+ if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
29797
+ return;
29798
+ }
29799
+ return { traceId, parentSpanId };
29800
+ }
29801
+ function getInboundTraceContext() {
29802
+ return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
29803
+ }
29804
+
29781
29805
  // ../common/src/telemetry/session-id.ts
29782
29806
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
29783
29807
  var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
29784
29808
  var telemetrySessionIdSlot = singleton("TelemetrySessionId");
29785
- function getProcessEnv() {
29809
+ var telemetryOperationIdSlot = singleton("TelemetryOperationId");
29810
+ function getProcessEnv2() {
29786
29811
  return globalThis.process?.env;
29787
29812
  }
29788
29813
  function normalizeSessionId(value) {
@@ -29793,18 +29818,165 @@ function normalizeSessionId(value) {
29793
29818
  return trimmed || undefined;
29794
29819
  }
29795
29820
  function getConfiguredTelemetrySessionId() {
29796
- return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
29821
+ return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
29797
29822
  }
29798
29823
  function resolveTelemetrySessionId(existingSessionId) {
29799
29824
  return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
29800
29825
  }
29826
+ function getTelemetryOperationId() {
29827
+ const existing = telemetryOperationIdSlot.get();
29828
+ if (existing) {
29829
+ return existing;
29830
+ }
29831
+ const inboundTraceId = getInboundTraceContext()?.traceId;
29832
+ const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
29833
+ telemetryOperationIdSlot.set(generated);
29834
+ return generated;
29835
+ }
29801
29836
  // ../common/src/telemetry/global-telemetry-properties.ts
29802
29837
  var telemetryPropsSlot = singleton("TelemetryDefaultProps");
29803
29838
  function getGlobalTelemetryProperties() {
29804
29839
  return telemetryPropsSlot.get();
29805
29840
  }
29806
29841
 
29842
+ // ../common/src/telemetry/pii-redactor.ts
29843
+ var REDACTED = "[REDACTED]";
29844
+ var MAX_VALUE_LENGTH = 200;
29845
+ var SENSITIVE_NAME_TOKENS = new Set([
29846
+ "token",
29847
+ "tokens",
29848
+ "secret",
29849
+ "secrets",
29850
+ "password",
29851
+ "passwords",
29852
+ "pwd",
29853
+ "credential",
29854
+ "credentials",
29855
+ "auth",
29856
+ "authentication",
29857
+ "authorization",
29858
+ "authority",
29859
+ "cert",
29860
+ "certificate",
29861
+ "certificates"
29862
+ ]);
29863
+ var SENSITIVE_KEY_PREFIXES = new Set([
29864
+ "api",
29865
+ "access",
29866
+ "client",
29867
+ "private",
29868
+ "public",
29869
+ "signing",
29870
+ "encryption",
29871
+ "session",
29872
+ "master",
29873
+ "shared",
29874
+ "root",
29875
+ "ssh",
29876
+ "rsa",
29877
+ "aes",
29878
+ "hmac",
29879
+ "oauth"
29880
+ ]);
29881
+ 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;
29882
+ var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
29883
+ var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
29884
+ var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
29885
+ var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
29886
+ var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
29887
+ var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
29888
+ function shortHash(input) {
29889
+ let hash = 2166136261;
29890
+ for (let i = 0;i < input.length; i++) {
29891
+ hash ^= input.charCodeAt(i);
29892
+ hash = Math.imul(hash, 16777619);
29893
+ }
29894
+ return (hash >>> 0).toString(16).padStart(8, "0");
29895
+ }
29896
+ function redactUrl(raw) {
29897
+ try {
29898
+ const url = new URL(raw);
29899
+ return `${url.protocol}//${url.host}`;
29900
+ } catch {
29901
+ return `url#${shortHash(raw)}`;
29902
+ }
29903
+ }
29904
+ function redactValueDetectors(value) {
29905
+ let out = value;
29906
+ out = out.replace(JWT_PATTERN, () => REDACTED);
29907
+ out = out.replace(URL_PATTERN, (match) => {
29908
+ const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
29909
+ const core2 = trailing ? match.slice(0, -trailing.length) : match;
29910
+ return `${redactUrl(core2)}${trailing}`;
29911
+ });
29912
+ out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
29913
+ out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
29914
+ out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
29915
+ out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
29916
+ if (out.length > MAX_VALUE_LENGTH) {
29917
+ out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
29918
+ }
29919
+ return out;
29920
+ }
29921
+ function redactValue(value) {
29922
+ return redactValueDetectors(value);
29923
+ }
29924
+ function redactError(error) {
29925
+ const safe = new Error(redactValueDetectors(error.message ?? ""));
29926
+ safe.name = error.name;
29927
+ safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
29928
+ return safe;
29929
+ }
29930
+ function nameTokens(name) {
29931
+ 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);
29932
+ }
29933
+ function isSensitiveName(name) {
29934
+ const tokens = nameTokens(name);
29935
+ for (let i = 0;i < tokens.length; i++) {
29936
+ const token = tokens[i];
29937
+ if (SENSITIVE_NAME_TOKENS.has(token)) {
29938
+ return true;
29939
+ }
29940
+ if (token === "key" || token === "keys") {
29941
+ const prev = tokens[i - 1];
29942
+ if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
29943
+ return true;
29944
+ }
29945
+ }
29946
+ }
29947
+ return false;
29948
+ }
29949
+ function redactProperty(name, value) {
29950
+ if (value === undefined || value === null) {
29951
+ return;
29952
+ }
29953
+ if (isSensitiveName(name)) {
29954
+ return REDACTED;
29955
+ }
29956
+ if (typeof value === "boolean" || typeof value === "number") {
29957
+ return value;
29958
+ }
29959
+ if (typeof value !== "string") {
29960
+ return "[OBJECT]";
29961
+ }
29962
+ return redactValueDetectors(value);
29963
+ }
29964
+ function redactProperties(properties) {
29965
+ const out = {};
29966
+ for (const [name, value] of Object.entries(properties)) {
29967
+ const redacted = redactProperty(name, value);
29968
+ if (redacted !== undefined) {
29969
+ out[name] = redacted;
29970
+ }
29971
+ }
29972
+ return out;
29973
+ }
29974
+
29807
29975
  // ../common/src/telemetry/telemetry-service.ts
29976
+ var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
29977
+ var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
29978
+ var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
29979
+
29808
29980
  class TelemetryService {
29809
29981
  telemetryProvider;
29810
29982
  contextStorage;
@@ -29831,11 +30003,15 @@ class TelemetryService {
29831
30003
  trackException(error, properties) {
29832
30004
  const context = this.getCurrentContext();
29833
30005
  const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
29834
- this.telemetryProvider.trackException(error, enrichedProperties);
30006
+ this.telemetryProvider.trackException(redactError(error), enrichedProperties);
29835
30007
  }
29836
30008
  async trackRequest(name, fn, properties) {
30009
+ const parentContext = this.getCurrentContext();
30010
+ const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
30011
+ const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
29837
30012
  const context = {
29838
- operationId: this.operationId ?? this.generateId(),
30013
+ operationId,
30014
+ ...parentId !== undefined ? { parentId } : {},
29839
30015
  id: this.generateId()
29840
30016
  };
29841
30017
  const startTime = performance.now();
@@ -29853,6 +30029,45 @@ class TelemetryService {
29853
30029
  throw error;
29854
30030
  }
29855
30031
  }
30032
+ trackRequestResult(name, durationMs, success, properties, context) {
30033
+ const requestContext = context ?? {
30034
+ operationId: this.operationId ?? getTelemetryOperationId(),
30035
+ id: this.generateId()
30036
+ };
30037
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
30038
+ this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
30039
+ }
30040
+ createRequestContext() {
30041
+ const operationId = this.operationId ?? getTelemetryOperationId();
30042
+ const parentId = this.inboundParentIdFor(operationId);
30043
+ return {
30044
+ operationId,
30045
+ ...parentId !== undefined ? { parentId } : {},
30046
+ id: this.generateId()
30047
+ };
30048
+ }
30049
+ inboundParentIdFor(operationId) {
30050
+ const inbound = getInboundTraceContext();
30051
+ return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
30052
+ }
30053
+ runWithContext(context, fn) {
30054
+ return this.contextStorage.run(context, fn);
30055
+ }
30056
+ createDependencyContext() {
30057
+ const parentContext = this.getCurrentContext();
30058
+ if (!parentContext) {
30059
+ return;
30060
+ }
30061
+ return {
30062
+ operationId: parentContext.operationId,
30063
+ parentId: parentContext.id,
30064
+ id: this.generateId()
30065
+ };
30066
+ }
30067
+ trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
30068
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
30069
+ this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
30070
+ }
29856
30071
  async trackDependencyOperation(name, type2, fn, properties) {
29857
30072
  const parentContext = this.getCurrentContext();
29858
30073
  if (!parentContext) {
@@ -29889,8 +30104,12 @@ class TelemetryService {
29889
30104
  ...getExecutionContextTelemetryProperties(),
29890
30105
  ...globalProperties,
29891
30106
  ...this.defaultProperties,
29892
- ...properties,
29893
- ...context
30107
+ ...redactProperties(properties ?? {}),
30108
+ ...context ? {
30109
+ [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
30110
+ ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
30111
+ [TELEMETRY_SPAN_ID_PROPERTY]: context.id
30112
+ } : {}
29894
30113
  };
29895
30114
  if (sessionId === undefined) {
29896
30115
  delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
@@ -29900,7 +30119,16 @@ class TelemetryService {
29900
30119
  return enriched;
29901
30120
  }
29902
30121
  generateId() {
29903
- return crypto.randomUUID().replaceAll("-", "");
30122
+ const bytes = new Uint8Array(8);
30123
+ let hex = "";
30124
+ do {
30125
+ crypto.getRandomValues(bytes);
30126
+ hex = "";
30127
+ for (const byte of bytes) {
30128
+ hex += byte.toString(16).padStart(2, "0");
30129
+ }
30130
+ } while (/^0+$/.test(hex));
30131
+ return hex;
29904
30132
  }
29905
30133
  }
29906
30134
  // ../common/src/telemetry/node-appinsights-telemetry-provider.ts
@@ -30603,134 +30831,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
30603
30831
  };
30604
30832
  }
30605
30833
 
30606
- // ../common/src/telemetry/pii-redactor.ts
30607
- var REDACTED = "[REDACTED]";
30608
- var MAX_VALUE_LENGTH = 200;
30609
- var SENSITIVE_NAME_TOKENS = new Set([
30610
- "token",
30611
- "tokens",
30612
- "secret",
30613
- "secrets",
30614
- "password",
30615
- "passwords",
30616
- "pwd",
30617
- "credential",
30618
- "credentials",
30619
- "auth",
30620
- "authentication",
30621
- "authorization",
30622
- "authority",
30623
- "cert",
30624
- "certificate",
30625
- "certificates"
30626
- ]);
30627
- var SENSITIVE_KEY_PREFIXES = new Set([
30628
- "api",
30629
- "access",
30630
- "client",
30631
- "private",
30632
- "public",
30633
- "signing",
30634
- "encryption",
30635
- "session",
30636
- "master",
30637
- "shared",
30638
- "root",
30639
- "ssh",
30640
- "rsa",
30641
- "aes",
30642
- "hmac",
30643
- "oauth"
30644
- ]);
30645
- 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;
30646
- var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
30647
- var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
30648
- var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
30649
- var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
30650
- var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
30651
- var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
30652
- function shortHash(input) {
30653
- let hash = 2166136261;
30654
- for (let i = 0;i < input.length; i++) {
30655
- hash ^= input.charCodeAt(i);
30656
- hash = Math.imul(hash, 16777619);
30657
- }
30658
- return (hash >>> 0).toString(16).padStart(8, "0");
30659
- }
30660
- function redactUrl(raw) {
30661
- try {
30662
- const url = new URL(raw);
30663
- return `${url.protocol}//${url.host}`;
30664
- } catch {
30665
- return `url#${shortHash(raw)}`;
30666
- }
30667
- }
30668
- function redactValueDetectors(value) {
30669
- let out = value;
30670
- out = out.replace(JWT_PATTERN, () => REDACTED);
30671
- out = out.replace(URL_PATTERN, (match) => {
30672
- const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
30673
- const core2 = trailing ? match.slice(0, -trailing.length) : match;
30674
- return `${redactUrl(core2)}${trailing}`;
30675
- });
30676
- out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
30677
- out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
30678
- out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
30679
- out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
30680
- if (out.length > MAX_VALUE_LENGTH) {
30681
- out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
30682
- }
30683
- return out;
30684
- }
30685
- function nameTokens(name) {
30686
- 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);
30687
- }
30688
- function isSensitiveName(name) {
30689
- const tokens = nameTokens(name);
30690
- for (let i = 0;i < tokens.length; i++) {
30691
- const token = tokens[i];
30692
- if (SENSITIVE_NAME_TOKENS.has(token)) {
30693
- return true;
30694
- }
30695
- if (token === "key" || token === "keys") {
30696
- const prev = tokens[i - 1];
30697
- if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
30698
- return true;
30699
- }
30700
- }
30701
- }
30702
- return false;
30703
- }
30704
- function redactProperty(name, value) {
30705
- if (value === undefined || value === null) {
30706
- return;
30707
- }
30708
- if (isSensitiveName(name)) {
30709
- return REDACTED;
30710
- }
30711
- if (typeof value === "boolean" || typeof value === "number") {
30712
- return value;
30713
- }
30714
- if (typeof value !== "string") {
30715
- return "[OBJECT]";
30716
- }
30717
- return redactValueDetectors(value);
30718
- }
30719
- function redactProperties(properties) {
30720
- const out = {};
30721
- for (const [name, value] of Object.entries(properties)) {
30722
- const redacted = redactProperty(name, value);
30723
- if (redacted !== undefined) {
30724
- out[name] = redacted;
30725
- }
30726
- }
30727
- return out;
30728
- }
30729
-
30730
30834
  // ../common/src/trackedAction.ts
30731
30835
  var pollSignalSlot = singleton("PollSignal");
30732
30836
  var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
30733
30837
  var retryHintValues = new Set(RETRY_HINTS);
30838
+ var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
30734
30839
  var processContext = {
30735
30840
  exit: (code) => {
30736
30841
  process.exitCode = code;
@@ -30741,22 +30846,18 @@ var processContext = {
30741
30846
  };
30742
30847
  function extractCommandParams(cmd) {
30743
30848
  const params = {};
30849
+ const add2 = (name, value) => {
30850
+ if (name && value !== undefined) {
30851
+ params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
30852
+ }
30853
+ };
30744
30854
  const registered = cmd.registeredArguments ?? [];
30745
30855
  const processed = cmd.processedArgs ?? [];
30746
30856
  for (let i = 0;i < registered.length; i++) {
30747
- const value = processed[i];
30748
- if (value === undefined) {
30749
- continue;
30750
- }
30751
- const name = registered[i].name();
30752
- if (name) {
30753
- params[name] = value;
30754
- }
30857
+ add2(registered[i].name(), processed[i]);
30755
30858
  }
30756
30859
  for (const [key, value] of Object.entries(cmd.opts())) {
30757
- if (value !== undefined) {
30758
- params[key] = value;
30759
- }
30860
+ add2(key, value);
30760
30861
  }
30761
30862
  return params;
30762
30863
  }
@@ -30799,11 +30900,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
30799
30900
  return this.action(async (...args) => {
30800
30901
  const telemetryName = deriveCommandPath(command);
30801
30902
  const props = typeof properties === "function" ? properties(...args) : properties;
30903
+ const requestContext = telemetry.createRequestContext();
30802
30904
  const startTime = performance.now();
30803
30905
  let errorMessage;
30804
30906
  let fallbackExitCode = EXIT_CODES.Success;
30805
30907
  clearRecordedCommandFailureTelemetry();
30806
- const [error] = await catchError(fn(...args));
30908
+ const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
30807
30909
  if (error) {
30808
30910
  errorMessage = error instanceof Error ? error.message : String(error);
30809
30911
  logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
@@ -30839,16 +30941,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
30839
30941
  recordedFailure,
30840
30942
  pollSignal: context.pollSignal
30841
30943
  });
30842
- telemetry.trackEvent(telemetryName, redactProperties({
30843
- ...extractCommandParams(command),
30944
+ const commandParams = extractCommandParams(command);
30945
+ if (props) {
30946
+ for (const key of Object.keys(props)) {
30947
+ delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
30948
+ }
30949
+ }
30950
+ const baseProperties = redactProperties({
30951
+ ...commandParams,
30844
30952
  ...props,
30845
30953
  ...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
30846
30954
  command: "true",
30847
- duration: String(durationMs),
30848
- success: String(success),
30849
30955
  ...terminalTelemetry,
30850
30956
  ...errorMessage ? { errorMessage } : {}
30851
- }));
30957
+ });
30958
+ telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
30852
30959
  });
30853
30960
  };
30854
30961
 
@@ -31999,7 +32106,7 @@ class TextApiResponse {
31999
32106
  var package_default2 = {
32000
32107
  name: "@uipath/integrationservice-sdk",
32001
32108
  license: "MIT",
32002
- version: "1.199.0-preview.91",
32109
+ version: "1.199.0-preview.97",
32003
32110
  repository: {
32004
32111
  type: "git",
32005
32112
  url: "https://github.com/UiPath/cli.git",
@@ -54672,4 +54779,4 @@ export {
54672
54779
  metadata
54673
54780
  };
54674
54781
 
54675
- //# debugId=83EE43E85080E9AF64756E2164756E21
54782
+ //# debugId=0F9A73445524E34264756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/integrationservice-tool",
3
3
  "license": "MIT",
4
- "version": "1.199.0-preview.91",
4
+ "version": "1.199.0-preview.97",
5
5
  "description": "Manage Integration Service connectors, connections, and triggers.",
6
6
  "private": false,
7
7
  "repository": {
@@ -26,5 +26,5 @@
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
- "gitHead": "f428cb1e61ba89ad18394b0c6106784055699f02"
29
+ "gitHead": "087ae21e842f27bde5eb0013892c9487bfe60568"
30
30
  }