@uipath/solution-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.
package/dist/tool.js CHANGED
@@ -30536,7 +30536,7 @@ import"./packager-tool.js";
30536
30536
  var package_default = {
30537
30537
  name: "@uipath/solution-tool",
30538
30538
  license: "MIT",
30539
- version: "1.198.0-preview.95",
30539
+ version: "1.198.0",
30540
30540
  description: "Create, pack, publish, and deploy UiPath Automation Solutions.",
30541
30541
  repository: {
30542
30542
  type: "git",
@@ -37978,11 +37978,36 @@ class NodeContextStorage {
37978
37978
  return this.storage.getStore();
37979
37979
  }
37980
37980
  }
37981
+ // ../common/src/telemetry/trace-context.ts
37982
+ var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
37983
+ var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
37984
+ function getProcessEnv() {
37985
+ return globalThis.process?.env;
37986
+ }
37987
+ function parseInboundTraceparent(value) {
37988
+ if (!value) {
37989
+ return;
37990
+ }
37991
+ const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
37992
+ if (!match) {
37993
+ return;
37994
+ }
37995
+ const [, traceId, parentSpanId] = match;
37996
+ if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
37997
+ return;
37998
+ }
37999
+ return { traceId, parentSpanId };
38000
+ }
38001
+ function getInboundTraceContext() {
38002
+ return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
38003
+ }
38004
+
37981
38005
  // ../common/src/telemetry/session-id.ts
37982
38006
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
37983
38007
  var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
37984
38008
  var telemetrySessionIdSlot = singleton("TelemetrySessionId");
37985
- function getProcessEnv() {
38009
+ var telemetryOperationIdSlot = singleton("TelemetryOperationId");
38010
+ function getProcessEnv2() {
37986
38011
  return globalThis.process?.env;
37987
38012
  }
37988
38013
  function normalizeSessionId(value) {
@@ -37993,18 +38018,165 @@ function normalizeSessionId(value) {
37993
38018
  return trimmed || undefined;
37994
38019
  }
37995
38020
  function getConfiguredTelemetrySessionId() {
37996
- return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
38021
+ return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
37997
38022
  }
37998
38023
  function resolveTelemetrySessionId(existingSessionId) {
37999
38024
  return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
38000
38025
  }
38026
+ function getTelemetryOperationId() {
38027
+ const existing = telemetryOperationIdSlot.get();
38028
+ if (existing) {
38029
+ return existing;
38030
+ }
38031
+ const inboundTraceId = getInboundTraceContext()?.traceId;
38032
+ const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
38033
+ telemetryOperationIdSlot.set(generated);
38034
+ return generated;
38035
+ }
38001
38036
  // ../common/src/telemetry/global-telemetry-properties.ts
38002
38037
  var telemetryPropsSlot = singleton("TelemetryDefaultProps");
38003
38038
  function getGlobalTelemetryProperties() {
38004
38039
  return telemetryPropsSlot.get();
38005
38040
  }
38006
38041
 
38042
+ // ../common/src/telemetry/pii-redactor.ts
38043
+ var REDACTED = "[REDACTED]";
38044
+ var MAX_VALUE_LENGTH = 200;
38045
+ var SENSITIVE_NAME_TOKENS = new Set([
38046
+ "token",
38047
+ "tokens",
38048
+ "secret",
38049
+ "secrets",
38050
+ "password",
38051
+ "passwords",
38052
+ "pwd",
38053
+ "credential",
38054
+ "credentials",
38055
+ "auth",
38056
+ "authentication",
38057
+ "authorization",
38058
+ "authority",
38059
+ "cert",
38060
+ "certificate",
38061
+ "certificates"
38062
+ ]);
38063
+ var SENSITIVE_KEY_PREFIXES = new Set([
38064
+ "api",
38065
+ "access",
38066
+ "client",
38067
+ "private",
38068
+ "public",
38069
+ "signing",
38070
+ "encryption",
38071
+ "session",
38072
+ "master",
38073
+ "shared",
38074
+ "root",
38075
+ "ssh",
38076
+ "rsa",
38077
+ "aes",
38078
+ "hmac",
38079
+ "oauth"
38080
+ ]);
38081
+ 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;
38082
+ var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
38083
+ var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
38084
+ var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
38085
+ var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
38086
+ var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
38087
+ var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
38088
+ function shortHash(input) {
38089
+ let hash = 2166136261;
38090
+ for (let i = 0;i < input.length; i++) {
38091
+ hash ^= input.charCodeAt(i);
38092
+ hash = Math.imul(hash, 16777619);
38093
+ }
38094
+ return (hash >>> 0).toString(16).padStart(8, "0");
38095
+ }
38096
+ function redactUrl(raw) {
38097
+ try {
38098
+ const url = new URL(raw);
38099
+ return `${url.protocol}//${url.host}`;
38100
+ } catch {
38101
+ return `url#${shortHash(raw)}`;
38102
+ }
38103
+ }
38104
+ function redactValueDetectors(value) {
38105
+ let out = value;
38106
+ out = out.replace(JWT_PATTERN, () => REDACTED);
38107
+ out = out.replace(URL_PATTERN, (match) => {
38108
+ const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
38109
+ const core2 = trailing ? match.slice(0, -trailing.length) : match;
38110
+ return `${redactUrl(core2)}${trailing}`;
38111
+ });
38112
+ out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
38113
+ out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
38114
+ out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
38115
+ out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
38116
+ if (out.length > MAX_VALUE_LENGTH) {
38117
+ out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
38118
+ }
38119
+ return out;
38120
+ }
38121
+ function redactValue(value) {
38122
+ return redactValueDetectors(value);
38123
+ }
38124
+ function redactError(error) {
38125
+ const safe = new Error(redactValueDetectors(error.message ?? ""));
38126
+ safe.name = error.name;
38127
+ safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
38128
+ return safe;
38129
+ }
38130
+ function nameTokens(name) {
38131
+ 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);
38132
+ }
38133
+ function isSensitiveName(name) {
38134
+ const tokens = nameTokens(name);
38135
+ for (let i = 0;i < tokens.length; i++) {
38136
+ const token = tokens[i];
38137
+ if (SENSITIVE_NAME_TOKENS.has(token)) {
38138
+ return true;
38139
+ }
38140
+ if (token === "key" || token === "keys") {
38141
+ const prev = tokens[i - 1];
38142
+ if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
38143
+ return true;
38144
+ }
38145
+ }
38146
+ }
38147
+ return false;
38148
+ }
38149
+ function redactProperty(name, value) {
38150
+ if (value === undefined || value === null) {
38151
+ return;
38152
+ }
38153
+ if (isSensitiveName(name)) {
38154
+ return REDACTED;
38155
+ }
38156
+ if (typeof value === "boolean" || typeof value === "number") {
38157
+ return value;
38158
+ }
38159
+ if (typeof value !== "string") {
38160
+ return "[OBJECT]";
38161
+ }
38162
+ return redactValueDetectors(value);
38163
+ }
38164
+ function redactProperties(properties) {
38165
+ const out = {};
38166
+ for (const [name, value] of Object.entries(properties)) {
38167
+ const redacted = redactProperty(name, value);
38168
+ if (redacted !== undefined) {
38169
+ out[name] = redacted;
38170
+ }
38171
+ }
38172
+ return out;
38173
+ }
38174
+
38007
38175
  // ../common/src/telemetry/telemetry-service.ts
38176
+ var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
38177
+ var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
38178
+ var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
38179
+
38008
38180
  class TelemetryService {
38009
38181
  telemetryProvider;
38010
38182
  contextStorage;
@@ -38031,11 +38203,15 @@ class TelemetryService {
38031
38203
  trackException(error, properties) {
38032
38204
  const context = this.getCurrentContext();
38033
38205
  const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
38034
- this.telemetryProvider.trackException(error, enrichedProperties);
38206
+ this.telemetryProvider.trackException(redactError(error), enrichedProperties);
38035
38207
  }
38036
38208
  async trackRequest(name, fn, properties) {
38209
+ const parentContext = this.getCurrentContext();
38210
+ const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
38211
+ const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
38037
38212
  const context = {
38038
- operationId: this.operationId ?? this.generateId(),
38213
+ operationId,
38214
+ ...parentId !== undefined ? { parentId } : {},
38039
38215
  id: this.generateId()
38040
38216
  };
38041
38217
  const startTime = performance.now();
@@ -38053,6 +38229,45 @@ class TelemetryService {
38053
38229
  throw error;
38054
38230
  }
38055
38231
  }
38232
+ trackRequestResult(name, durationMs, success, properties, context) {
38233
+ const requestContext = context ?? {
38234
+ operationId: this.operationId ?? getTelemetryOperationId(),
38235
+ id: this.generateId()
38236
+ };
38237
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
38238
+ this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
38239
+ }
38240
+ createRequestContext() {
38241
+ const operationId = this.operationId ?? getTelemetryOperationId();
38242
+ const parentId = this.inboundParentIdFor(operationId);
38243
+ return {
38244
+ operationId,
38245
+ ...parentId !== undefined ? { parentId } : {},
38246
+ id: this.generateId()
38247
+ };
38248
+ }
38249
+ inboundParentIdFor(operationId) {
38250
+ const inbound = getInboundTraceContext();
38251
+ return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
38252
+ }
38253
+ runWithContext(context, fn) {
38254
+ return this.contextStorage.run(context, fn);
38255
+ }
38256
+ createDependencyContext() {
38257
+ const parentContext = this.getCurrentContext();
38258
+ if (!parentContext) {
38259
+ return;
38260
+ }
38261
+ return {
38262
+ operationId: parentContext.operationId,
38263
+ parentId: parentContext.id,
38264
+ id: this.generateId()
38265
+ };
38266
+ }
38267
+ trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
38268
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
38269
+ this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
38270
+ }
38056
38271
  async trackDependencyOperation(name, type2, fn, properties) {
38057
38272
  const parentContext = this.getCurrentContext();
38058
38273
  if (!parentContext) {
@@ -38089,8 +38304,12 @@ class TelemetryService {
38089
38304
  ...getExecutionContextTelemetryProperties(),
38090
38305
  ...globalProperties,
38091
38306
  ...this.defaultProperties,
38092
- ...properties,
38093
- ...context
38307
+ ...redactProperties(properties ?? {}),
38308
+ ...context ? {
38309
+ [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
38310
+ ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
38311
+ [TELEMETRY_SPAN_ID_PROPERTY]: context.id
38312
+ } : {}
38094
38313
  };
38095
38314
  if (sessionId === undefined) {
38096
38315
  delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
@@ -38100,7 +38319,16 @@ class TelemetryService {
38100
38319
  return enriched;
38101
38320
  }
38102
38321
  generateId() {
38103
- return crypto.randomUUID().replaceAll("-", "");
38322
+ const bytes = new Uint8Array(8);
38323
+ let hex = "";
38324
+ do {
38325
+ crypto.getRandomValues(bytes);
38326
+ hex = "";
38327
+ for (const byte of bytes) {
38328
+ hex += byte.toString(16).padStart(2, "0");
38329
+ }
38330
+ } while (/^0+$/.test(hex));
38331
+ return hex;
38104
38332
  }
38105
38333
  }
38106
38334
  // ../common/src/telemetry/node-appinsights-telemetry-provider.ts
@@ -38823,134 +39051,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
38823
39051
  };
38824
39052
  }
38825
39053
 
38826
- // ../common/src/telemetry/pii-redactor.ts
38827
- var REDACTED = "[REDACTED]";
38828
- var MAX_VALUE_LENGTH = 200;
38829
- var SENSITIVE_NAME_TOKENS = new Set([
38830
- "token",
38831
- "tokens",
38832
- "secret",
38833
- "secrets",
38834
- "password",
38835
- "passwords",
38836
- "pwd",
38837
- "credential",
38838
- "credentials",
38839
- "auth",
38840
- "authentication",
38841
- "authorization",
38842
- "authority",
38843
- "cert",
38844
- "certificate",
38845
- "certificates"
38846
- ]);
38847
- var SENSITIVE_KEY_PREFIXES = new Set([
38848
- "api",
38849
- "access",
38850
- "client",
38851
- "private",
38852
- "public",
38853
- "signing",
38854
- "encryption",
38855
- "session",
38856
- "master",
38857
- "shared",
38858
- "root",
38859
- "ssh",
38860
- "rsa",
38861
- "aes",
38862
- "hmac",
38863
- "oauth"
38864
- ]);
38865
- 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;
38866
- var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
38867
- var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
38868
- var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
38869
- var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
38870
- var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
38871
- var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
38872
- function shortHash(input) {
38873
- let hash = 2166136261;
38874
- for (let i = 0;i < input.length; i++) {
38875
- hash ^= input.charCodeAt(i);
38876
- hash = Math.imul(hash, 16777619);
38877
- }
38878
- return (hash >>> 0).toString(16).padStart(8, "0");
38879
- }
38880
- function redactUrl(raw) {
38881
- try {
38882
- const url = new URL(raw);
38883
- return `${url.protocol}//${url.host}`;
38884
- } catch {
38885
- return `url#${shortHash(raw)}`;
38886
- }
38887
- }
38888
- function redactValueDetectors(value) {
38889
- let out = value;
38890
- out = out.replace(JWT_PATTERN, () => REDACTED);
38891
- out = out.replace(URL_PATTERN, (match) => {
38892
- const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
38893
- const core2 = trailing ? match.slice(0, -trailing.length) : match;
38894
- return `${redactUrl(core2)}${trailing}`;
38895
- });
38896
- out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
38897
- out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
38898
- out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
38899
- out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
38900
- if (out.length > MAX_VALUE_LENGTH) {
38901
- out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
38902
- }
38903
- return out;
38904
- }
38905
- function nameTokens(name) {
38906
- 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);
38907
- }
38908
- function isSensitiveName(name) {
38909
- const tokens = nameTokens(name);
38910
- for (let i = 0;i < tokens.length; i++) {
38911
- const token = tokens[i];
38912
- if (SENSITIVE_NAME_TOKENS.has(token)) {
38913
- return true;
38914
- }
38915
- if (token === "key" || token === "keys") {
38916
- const prev = tokens[i - 1];
38917
- if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
38918
- return true;
38919
- }
38920
- }
38921
- }
38922
- return false;
38923
- }
38924
- function redactProperty(name, value) {
38925
- if (value === undefined || value === null) {
38926
- return;
38927
- }
38928
- if (isSensitiveName(name)) {
38929
- return REDACTED;
38930
- }
38931
- if (typeof value === "boolean" || typeof value === "number") {
38932
- return value;
38933
- }
38934
- if (typeof value !== "string") {
38935
- return "[OBJECT]";
38936
- }
38937
- return redactValueDetectors(value);
38938
- }
38939
- function redactProperties(properties) {
38940
- const out = {};
38941
- for (const [name, value] of Object.entries(properties)) {
38942
- const redacted = redactProperty(name, value);
38943
- if (redacted !== undefined) {
38944
- out[name] = redacted;
38945
- }
38946
- }
38947
- return out;
38948
- }
38949
-
38950
39054
  // ../common/src/trackedAction.ts
38951
39055
  var pollSignalSlot = singleton("PollSignal");
38952
39056
  var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
38953
39057
  var retryHintValues = new Set(RETRY_HINTS);
39058
+ var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
38954
39059
  var processContext = {
38955
39060
  exit: (code) => {
38956
39061
  process.exitCode = code;
@@ -38961,22 +39066,18 @@ var processContext = {
38961
39066
  };
38962
39067
  function extractCommandParams(cmd) {
38963
39068
  const params = {};
39069
+ const add2 = (name, value) => {
39070
+ if (name && value !== undefined) {
39071
+ params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
39072
+ }
39073
+ };
38964
39074
  const registered = cmd.registeredArguments ?? [];
38965
39075
  const processed = cmd.processedArgs ?? [];
38966
39076
  for (let i = 0;i < registered.length; i++) {
38967
- const value = processed[i];
38968
- if (value === undefined) {
38969
- continue;
38970
- }
38971
- const name = registered[i].name();
38972
- if (name) {
38973
- params[name] = value;
38974
- }
39077
+ add2(registered[i].name(), processed[i]);
38975
39078
  }
38976
39079
  for (const [key, value] of Object.entries(cmd.opts())) {
38977
- if (value !== undefined) {
38978
- params[key] = value;
38979
- }
39080
+ add2(key, value);
38980
39081
  }
38981
39082
  return params;
38982
39083
  }
@@ -39019,11 +39120,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
39019
39120
  return this.action(async (...args) => {
39020
39121
  const telemetryName = deriveCommandPath(command);
39021
39122
  const props = typeof properties === "function" ? properties(...args) : properties;
39123
+ const requestContext = telemetry.createRequestContext();
39022
39124
  const startTime = performance.now();
39023
39125
  let errorMessage2;
39024
39126
  let fallbackExitCode = EXIT_CODES.Success;
39025
39127
  clearRecordedCommandFailureTelemetry();
39026
- const [error] = await catchError2(fn(...args));
39128
+ const [error] = await catchError2(telemetry.runWithContext(requestContext, () => fn(...args)));
39027
39129
  if (error) {
39028
39130
  errorMessage2 = error instanceof Error ? error.message : String(error);
39029
39131
  logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage2}`);
@@ -39059,16 +39161,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
39059
39161
  recordedFailure,
39060
39162
  pollSignal: context.pollSignal
39061
39163
  });
39062
- telemetry.trackEvent(telemetryName, redactProperties({
39063
- ...extractCommandParams(command),
39164
+ const commandParams = extractCommandParams(command);
39165
+ if (props) {
39166
+ for (const key of Object.keys(props)) {
39167
+ delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
39168
+ }
39169
+ }
39170
+ const baseProperties = redactProperties({
39171
+ ...commandParams,
39064
39172
  ...props,
39065
39173
  ...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
39066
39174
  command: "true",
39067
- duration: String(durationMs),
39068
- success: String(success),
39069
39175
  ...terminalTelemetry,
39070
39176
  ...errorMessage2 ? { errorMessage: errorMessage2 } : {}
39071
- }));
39177
+ });
39178
+ telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
39072
39179
  });
39073
39180
  };
39074
39181
 
@@ -41608,7 +41715,7 @@ class TextApiResponse2 {
41608
41715
  var package_default3 = {
41609
41716
  name: "@uipath/solution-sdk",
41610
41717
  license: "MIT",
41611
- version: "1.198.0-preview.95",
41718
+ version: "1.198.0",
41612
41719
  repository: {
41613
41720
  type: "git",
41614
41721
  url: "https://github.com/UiPath/cli.git",
@@ -75808,7 +75915,44 @@ var INTERNAL_ERROR_NAMES2 = new Set([
75808
75915
  "RangeError"
75809
75916
  ]);
75810
75917
  var telemetrySessionIdSlot2 = singleton3("TelemetrySessionId");
75918
+ var telemetryOperationIdSlot2 = singleton3("TelemetryOperationId");
75811
75919
  var authSignalSlot2 = singleton3("TelemetryExecutionContextAuthSignal");
75920
+ var SENSITIVE_NAME_TOKENS2 = new Set([
75921
+ "token",
75922
+ "tokens",
75923
+ "secret",
75924
+ "secrets",
75925
+ "password",
75926
+ "passwords",
75927
+ "pwd",
75928
+ "credential",
75929
+ "credentials",
75930
+ "auth",
75931
+ "authentication",
75932
+ "authorization",
75933
+ "authority",
75934
+ "cert",
75935
+ "certificate",
75936
+ "certificates"
75937
+ ]);
75938
+ var SENSITIVE_KEY_PREFIXES2 = new Set([
75939
+ "api",
75940
+ "access",
75941
+ "client",
75942
+ "private",
75943
+ "public",
75944
+ "signing",
75945
+ "encryption",
75946
+ "session",
75947
+ "master",
75948
+ "shared",
75949
+ "root",
75950
+ "ssh",
75951
+ "rsa",
75952
+ "aes",
75953
+ "hmac",
75954
+ "oauth"
75955
+ ]);
75812
75956
  var factorySlot2 = singleton3("PackagerFactoryProvider");
75813
75957
  var RulesConfigFileType;
75814
75958
  ((RulesConfigFileType2) => {
@@ -75948,7 +76092,7 @@ var sdkUserAgentHostToken22 = singleton22("SdkUserAgentHostToken");
75948
76092
  var package_default5 = {
75949
76093
  name: "@uipath/project-packager",
75950
76094
  license: "MIT",
75951
- version: "1.198.0-preview.95",
76095
+ version: "1.198.0",
75952
76096
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
75953
76097
  type: "module",
75954
76098
  main: "./dist/index.js",
@@ -86364,10 +86508,33 @@ class NodeContextStorage2 {
86364
86508
  return this.storage.getStore();
86365
86509
  }
86366
86510
  }
86511
+ var TELEMETRY_TRACEPARENT_ENV2 = "TRACEPARENT";
86512
+ var TRACEPARENT_PATTERN2 = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
86513
+ function getProcessEnv3() {
86514
+ return globalThis.process?.env;
86515
+ }
86516
+ function parseInboundTraceparent2(value) {
86517
+ if (!value) {
86518
+ return;
86519
+ }
86520
+ const match = TRACEPARENT_PATTERN2.exec(value.trim().toLowerCase());
86521
+ if (!match) {
86522
+ return;
86523
+ }
86524
+ const [, traceId, parentSpanId] = match;
86525
+ if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
86526
+ return;
86527
+ }
86528
+ return { traceId, parentSpanId };
86529
+ }
86530
+ function getInboundTraceContext2() {
86531
+ return parseInboundTraceparent2(getProcessEnv3()?.[TELEMETRY_TRACEPARENT_ENV2]);
86532
+ }
86367
86533
  var TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID";
86368
86534
  var TELEMETRY_SESSION_ID_PROPERTY2 = "session_id";
86369
86535
  var telemetrySessionIdSlot3 = singleton4("TelemetrySessionId");
86370
- function getProcessEnv2() {
86536
+ var telemetryOperationIdSlot3 = singleton4("TelemetryOperationId");
86537
+ function getProcessEnv22() {
86371
86538
  return globalThis.process?.env;
86372
86539
  }
86373
86540
  function normalizeSessionId2(value) {
@@ -86378,15 +86545,159 @@ function normalizeSessionId2(value) {
86378
86545
  return trimmed || undefined;
86379
86546
  }
86380
86547
  function getConfiguredTelemetrySessionId2() {
86381
- return normalizeSessionId2(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV2]);
86548
+ return normalizeSessionId2(getProcessEnv22()?.[TELEMETRY_SESSION_ID_ENV2]);
86382
86549
  }
86383
86550
  function resolveTelemetrySessionId2(existingSessionId) {
86384
86551
  return getConfiguredTelemetrySessionId2() ?? normalizeSessionId2(existingSessionId);
86385
86552
  }
86553
+ function getTelemetryOperationId2() {
86554
+ const existing = telemetryOperationIdSlot3.get();
86555
+ if (existing) {
86556
+ return existing;
86557
+ }
86558
+ const inboundTraceId = getInboundTraceContext2()?.traceId;
86559
+ const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
86560
+ telemetryOperationIdSlot3.set(generated);
86561
+ return generated;
86562
+ }
86386
86563
  var telemetryPropsSlot3 = singleton4("TelemetryDefaultProps");
86387
86564
  function getGlobalTelemetryProperties2() {
86388
86565
  return telemetryPropsSlot3.get();
86389
86566
  }
86567
+ var REDACTED2 = "[REDACTED]";
86568
+ var MAX_VALUE_LENGTH2 = 200;
86569
+ var SENSITIVE_NAME_TOKENS3 = new Set([
86570
+ "token",
86571
+ "tokens",
86572
+ "secret",
86573
+ "secrets",
86574
+ "password",
86575
+ "passwords",
86576
+ "pwd",
86577
+ "credential",
86578
+ "credentials",
86579
+ "auth",
86580
+ "authentication",
86581
+ "authorization",
86582
+ "authority",
86583
+ "cert",
86584
+ "certificate",
86585
+ "certificates"
86586
+ ]);
86587
+ var SENSITIVE_KEY_PREFIXES3 = new Set([
86588
+ "api",
86589
+ "access",
86590
+ "client",
86591
+ "private",
86592
+ "public",
86593
+ "signing",
86594
+ "encryption",
86595
+ "session",
86596
+ "master",
86597
+ "shared",
86598
+ "root",
86599
+ "ssh",
86600
+ "rsa",
86601
+ "aes",
86602
+ "hmac",
86603
+ "oauth"
86604
+ ]);
86605
+ 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;
86606
+ var EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
86607
+ var JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
86608
+ var LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
86609
+ var USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
86610
+ var URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
86611
+ var URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
86612
+ function shortHash2(input) {
86613
+ let hash = 2166136261;
86614
+ for (let i3 = 0;i3 < input.length; i3++) {
86615
+ hash ^= input.charCodeAt(i3);
86616
+ hash = Math.imul(hash, 16777619);
86617
+ }
86618
+ return (hash >>> 0).toString(16).padStart(8, "0");
86619
+ }
86620
+ function redactUrl2(raw) {
86621
+ try {
86622
+ const url = new URL(raw);
86623
+ return `${url.protocol}//${url.host}`;
86624
+ } catch {
86625
+ return `url#${shortHash2(raw)}`;
86626
+ }
86627
+ }
86628
+ function redactValueDetectors2(value) {
86629
+ let out = value;
86630
+ out = out.replace(JWT_PATTERN2, () => REDACTED2);
86631
+ out = out.replace(URL_PATTERN2, (match) => {
86632
+ const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
86633
+ const core22 = trailing ? match.slice(0, -trailing.length) : match;
86634
+ return `${redactUrl2(core22)}${trailing}`;
86635
+ });
86636
+ out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
86637
+ out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
86638
+ out = out.replace(UUID_PATTERN2, (match) => `uuid#${shortHash2(match)}`);
86639
+ out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
86640
+ if (out.length > MAX_VALUE_LENGTH2) {
86641
+ out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
86642
+ }
86643
+ return out;
86644
+ }
86645
+ function redactValue2(value) {
86646
+ return redactValueDetectors2(value);
86647
+ }
86648
+ function redactError2(error) {
86649
+ const safe = new Error(redactValueDetectors2(error.message ?? ""));
86650
+ safe.name = error.name;
86651
+ safe.stack = typeof error.stack === "string" ? redactValueDetectors2(error.stack) : undefined;
86652
+ return safe;
86653
+ }
86654
+ function nameTokens2(name) {
86655
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t2) => t2.toLowerCase()).filter(Boolean);
86656
+ }
86657
+ function isSensitiveName2(name) {
86658
+ const tokens = nameTokens2(name);
86659
+ for (let i3 = 0;i3 < tokens.length; i3++) {
86660
+ const token = tokens[i3];
86661
+ if (SENSITIVE_NAME_TOKENS3.has(token)) {
86662
+ return true;
86663
+ }
86664
+ if (token === "key" || token === "keys") {
86665
+ const prev = tokens[i3 - 1];
86666
+ if (prev && SENSITIVE_KEY_PREFIXES3.has(prev)) {
86667
+ return true;
86668
+ }
86669
+ }
86670
+ }
86671
+ return false;
86672
+ }
86673
+ function redactProperty2(name, value) {
86674
+ if (value === undefined || value === null) {
86675
+ return;
86676
+ }
86677
+ if (isSensitiveName2(name)) {
86678
+ return REDACTED2;
86679
+ }
86680
+ if (typeof value === "boolean" || typeof value === "number") {
86681
+ return value;
86682
+ }
86683
+ if (typeof value !== "string") {
86684
+ return "[OBJECT]";
86685
+ }
86686
+ return redactValueDetectors2(value);
86687
+ }
86688
+ function redactProperties2(properties) {
86689
+ const out = {};
86690
+ for (const [name, value] of Object.entries(properties)) {
86691
+ const redacted = redactProperty2(name, value);
86692
+ if (redacted !== undefined) {
86693
+ out[name] = redacted;
86694
+ }
86695
+ }
86696
+ return out;
86697
+ }
86698
+ var TELEMETRY_OPERATION_ID_PROPERTY2 = "uip.trace.operation_id";
86699
+ var TELEMETRY_PARENT_ID_PROPERTY2 = "uip.trace.parent_id";
86700
+ var TELEMETRY_SPAN_ID_PROPERTY2 = "uip.trace.span_id";
86390
86701
 
86391
86702
  class TelemetryService2 {
86392
86703
  telemetryProvider;
@@ -86414,11 +86725,15 @@ class TelemetryService2 {
86414
86725
  trackException(error, properties) {
86415
86726
  const context = this.getCurrentContext();
86416
86727
  const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
86417
- this.telemetryProvider.trackException(error, enrichedProperties);
86728
+ this.telemetryProvider.trackException(redactError2(error), enrichedProperties);
86418
86729
  }
86419
86730
  async trackRequest(name, fn, properties) {
86731
+ const parentContext = this.getCurrentContext();
86732
+ const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId2();
86733
+ const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
86420
86734
  const context = {
86421
- operationId: this.operationId ?? this.generateId(),
86735
+ operationId,
86736
+ ...parentId !== undefined ? { parentId } : {},
86422
86737
  id: this.generateId()
86423
86738
  };
86424
86739
  const startTime = performance.now();
@@ -86436,6 +86751,45 @@ class TelemetryService2 {
86436
86751
  throw error;
86437
86752
  }
86438
86753
  }
86754
+ trackRequestResult(name, durationMs, success, properties, context) {
86755
+ const requestContext = context ?? {
86756
+ operationId: this.operationId ?? getTelemetryOperationId2(),
86757
+ id: this.generateId()
86758
+ };
86759
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
86760
+ this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
86761
+ }
86762
+ createRequestContext() {
86763
+ const operationId = this.operationId ?? getTelemetryOperationId2();
86764
+ const parentId = this.inboundParentIdFor(operationId);
86765
+ return {
86766
+ operationId,
86767
+ ...parentId !== undefined ? { parentId } : {},
86768
+ id: this.generateId()
86769
+ };
86770
+ }
86771
+ inboundParentIdFor(operationId) {
86772
+ const inbound = getInboundTraceContext2();
86773
+ return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
86774
+ }
86775
+ runWithContext(context, fn) {
86776
+ return this.contextStorage.run(context, fn);
86777
+ }
86778
+ createDependencyContext() {
86779
+ const parentContext = this.getCurrentContext();
86780
+ if (!parentContext) {
86781
+ return;
86782
+ }
86783
+ return {
86784
+ operationId: parentContext.operationId,
86785
+ parentId: parentContext.id,
86786
+ id: this.generateId()
86787
+ };
86788
+ }
86789
+ trackDependencyResult(name, type22, durationMs, success, properties, context, resultCode) {
86790
+ const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
86791
+ this.telemetryProvider.trackDependency(redactValue2(name), type22, durationMs, success, enrichedProperties, resultCode);
86792
+ }
86439
86793
  async trackDependencyOperation(name, type22, fn, properties) {
86440
86794
  const parentContext = this.getCurrentContext();
86441
86795
  if (!parentContext) {
@@ -86472,8 +86826,12 @@ class TelemetryService2 {
86472
86826
  ...getExecutionContextTelemetryProperties2(),
86473
86827
  ...globalProperties,
86474
86828
  ...this.defaultProperties,
86475
- ...properties,
86476
- ...context
86829
+ ...redactProperties2(properties ?? {}),
86830
+ ...context ? {
86831
+ [TELEMETRY_OPERATION_ID_PROPERTY2]: context.operationId,
86832
+ ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY2]: context.parentId } : {},
86833
+ [TELEMETRY_SPAN_ID_PROPERTY2]: context.id
86834
+ } : {}
86477
86835
  };
86478
86836
  if (sessionId === undefined) {
86479
86837
  delete enriched[TELEMETRY_SESSION_ID_PROPERTY2];
@@ -86483,7 +86841,16 @@ class TelemetryService2 {
86483
86841
  return enriched;
86484
86842
  }
86485
86843
  generateId() {
86486
- return crypto.randomUUID().replaceAll("-", "");
86844
+ const bytes = new Uint8Array(8);
86845
+ let hex = "";
86846
+ do {
86847
+ crypto.getRandomValues(bytes);
86848
+ hex = "";
86849
+ for (const byte of bytes) {
86850
+ hex += byte.toString(16).padStart(2, "0");
86851
+ }
86852
+ } while (/^0+$/.test(hex));
86853
+ return hex;
86487
86854
  }
86488
86855
  }
86489
86856
  var providerSlot2 = singleton4("TelemetryProvider");
@@ -87179,149 +87546,24 @@ function buildCommandTelemetryAttribution2(commandPath, skillSource) {
87179
87546
  ...getCommandProductModeAttribution2(commandPath)
87180
87547
  };
87181
87548
  }
87182
- var REDACTED2 = "[REDACTED]";
87183
- var MAX_VALUE_LENGTH2 = 200;
87184
- var SENSITIVE_NAME_TOKENS2 = new Set([
87185
- "token",
87186
- "tokens",
87187
- "secret",
87188
- "secrets",
87189
- "password",
87190
- "passwords",
87191
- "pwd",
87192
- "credential",
87193
- "credentials",
87194
- "auth",
87195
- "authentication",
87196
- "authorization",
87197
- "authority",
87198
- "cert",
87199
- "certificate",
87200
- "certificates"
87201
- ]);
87202
- var SENSITIVE_KEY_PREFIXES2 = new Set([
87203
- "api",
87204
- "access",
87205
- "client",
87206
- "private",
87207
- "public",
87208
- "signing",
87209
- "encryption",
87210
- "session",
87211
- "master",
87212
- "shared",
87213
- "root",
87214
- "ssh",
87215
- "rsa",
87216
- "aes",
87217
- "hmac",
87218
- "oauth"
87219
- ]);
87220
- 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;
87221
- var EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
87222
- var JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
87223
- var LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
87224
- var USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
87225
- var URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
87226
- var URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
87227
- function shortHash2(input) {
87228
- let hash = 2166136261;
87229
- for (let i3 = 0;i3 < input.length; i3++) {
87230
- hash ^= input.charCodeAt(i3);
87231
- hash = Math.imul(hash, 16777619);
87232
- }
87233
- return (hash >>> 0).toString(16).padStart(8, "0");
87234
- }
87235
- function redactUrl2(raw) {
87236
- try {
87237
- const url = new URL(raw);
87238
- return `${url.protocol}//${url.host}`;
87239
- } catch {
87240
- return `url#${shortHash2(raw)}`;
87241
- }
87242
- }
87243
- function redactValueDetectors2(value) {
87244
- let out = value;
87245
- out = out.replace(JWT_PATTERN2, () => REDACTED2);
87246
- out = out.replace(URL_PATTERN2, (match) => {
87247
- const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
87248
- const core22 = trailing ? match.slice(0, -trailing.length) : match;
87249
- return `${redactUrl2(core22)}${trailing}`;
87250
- });
87251
- out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
87252
- out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
87253
- out = out.replace(UUID_PATTERN2, (match) => `uuid#${shortHash2(match)}`);
87254
- out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
87255
- if (out.length > MAX_VALUE_LENGTH2) {
87256
- out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
87257
- }
87258
- return out;
87259
- }
87260
- function nameTokens2(name) {
87261
- return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t2) => t2.toLowerCase()).filter(Boolean);
87262
- }
87263
- function isSensitiveName2(name) {
87264
- const tokens = nameTokens2(name);
87265
- for (let i3 = 0;i3 < tokens.length; i3++) {
87266
- const token = tokens[i3];
87267
- if (SENSITIVE_NAME_TOKENS2.has(token)) {
87268
- return true;
87269
- }
87270
- if (token === "key" || token === "keys") {
87271
- const prev = tokens[i3 - 1];
87272
- if (prev && SENSITIVE_KEY_PREFIXES2.has(prev)) {
87273
- return true;
87274
- }
87275
- }
87276
- }
87277
- return false;
87278
- }
87279
- function redactProperty2(name, value) {
87280
- if (value === undefined || value === null) {
87281
- return;
87282
- }
87283
- if (isSensitiveName2(name)) {
87284
- return REDACTED2;
87285
- }
87286
- if (typeof value === "boolean" || typeof value === "number") {
87287
- return value;
87288
- }
87289
- if (typeof value !== "string") {
87290
- return "[OBJECT]";
87291
- }
87292
- return redactValueDetectors2(value);
87293
- }
87294
- function redactProperties2(properties) {
87295
- const out = {};
87296
- for (const [name, value] of Object.entries(properties)) {
87297
- const redacted = redactProperty2(name, value);
87298
- if (redacted !== undefined) {
87299
- out[name] = redacted;
87300
- }
87301
- }
87302
- return out;
87303
- }
87304
87549
  var pollSignalSlot2 = singleton4("PollSignal");
87305
87550
  var cliErrorCodeValues2 = new Set(CLI_ERROR_CODES2);
87306
87551
  var retryHintValues2 = new Set(RETRY_HINTS2);
87552
+ var TELEMETRY_COMMAND_ARG_PREFIX2 = "uip.cmd.arg.";
87307
87553
  function extractCommandParams2(cmd) {
87308
87554
  const params = {};
87555
+ const add22 = (name, value) => {
87556
+ if (name && value !== undefined) {
87557
+ params[`${TELEMETRY_COMMAND_ARG_PREFIX2}${name}`] = value;
87558
+ }
87559
+ };
87309
87560
  const registered = cmd.registeredArguments ?? [];
87310
87561
  const processed = cmd.processedArgs ?? [];
87311
87562
  for (let i3 = 0;i3 < registered.length; i3++) {
87312
- const value = processed[i3];
87313
- if (value === undefined) {
87314
- continue;
87315
- }
87316
- const name = registered[i3].name();
87317
- if (name) {
87318
- params[name] = value;
87319
- }
87563
+ add22(registered[i3].name(), processed[i3]);
87320
87564
  }
87321
87565
  for (const [key, value] of Object.entries(cmd.opts())) {
87322
- if (value !== undefined) {
87323
- params[key] = value;
87324
- }
87566
+ add22(key, value);
87325
87567
  }
87326
87568
  return params;
87327
87569
  }
@@ -87364,11 +87606,12 @@ Command4.prototype.trackedAction = function(context, fn, properties) {
87364
87606
  return this.action(async (...args) => {
87365
87607
  const telemetryName = deriveCommandPath2(command);
87366
87608
  const props = typeof properties === "function" ? properties(...args) : properties;
87609
+ const requestContext = telemetry2.createRequestContext();
87367
87610
  const startTime = performance.now();
87368
87611
  let errorMessage3;
87369
87612
  let fallbackExitCode = EXIT_CODES2.Success;
87370
87613
  clearRecordedCommandFailureTelemetry2();
87371
- const [error] = await catchError4(fn(...args));
87614
+ const [error] = await catchError4(telemetry2.runWithContext(requestContext, () => fn(...args)));
87372
87615
  if (error) {
87373
87616
  errorMessage3 = error instanceof Error ? error.message : String(error);
87374
87617
  logger4.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage3}`);
@@ -87404,16 +87647,21 @@ Command4.prototype.trackedAction = function(context, fn, properties) {
87404
87647
  recordedFailure,
87405
87648
  pollSignal: context.pollSignal
87406
87649
  });
87407
- telemetry2.trackEvent(telemetryName, redactProperties2({
87408
- ...extractCommandParams2(command),
87650
+ const commandParams = extractCommandParams2(command);
87651
+ if (props) {
87652
+ for (const key of Object.keys(props)) {
87653
+ delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX2}${key}`];
87654
+ }
87655
+ }
87656
+ const baseProperties = redactProperties2({
87657
+ ...commandParams,
87409
87658
  ...props,
87410
87659
  ...buildCommandTelemetryAttribution2(telemetryName, process.env.UIPATH_SKILL),
87411
87660
  command: "true",
87412
- duration: String(durationMs),
87413
- success: String(success),
87414
87661
  ...terminalTelemetry,
87415
87662
  ...errorMessage3 ? { errorMessage: errorMessage3 } : {}
87416
- }));
87663
+ });
87664
+ telemetry2.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
87417
87665
  });
87418
87666
  };
87419
87667
  var guardInstalledSlot3 = singleton4("ConsoleGuardInstalled");
@@ -87890,7 +88138,7 @@ var sdkUserAgentHostToken23 = singleton23("SdkUserAgentHostToken");
87890
88138
  var package_default6 = {
87891
88139
  name: "@uipath/project-packager",
87892
88140
  license: "MIT",
87893
- version: "1.198.0-preview.95",
88141
+ version: "1.198.0",
87894
88142
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
87895
88143
  type: "module",
87896
88144
  main: "./dist/index.js",
@@ -107477,4 +107725,4 @@ export {
107477
107725
  metadata
107478
107726
  };
107479
107727
 
107480
- //# debugId=A4C4E0A069A519E064756E2164756E21
107728
+ //# debugId=EF3D4EFFFA93716B64756E2164756E21