@uipath/case-tool 1.198.1-preview.95 → 1.198.1
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 +259 -152
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -280804,7 +280804,7 @@ import"./packager-tool.js";
|
|
|
280804
280804
|
var package_default = {
|
|
280805
280805
|
name: "@uipath/case-tool",
|
|
280806
280806
|
license: "MIT",
|
|
280807
|
-
version: "1.198.1
|
|
280807
|
+
version: "1.198.1",
|
|
280808
280808
|
description: "Manage Case Management instances, processes, and incidents.",
|
|
280809
280809
|
private: false,
|
|
280810
280810
|
repository: {
|
|
@@ -286994,11 +286994,36 @@ class NodeContextStorage {
|
|
|
286994
286994
|
return this.storage.getStore();
|
|
286995
286995
|
}
|
|
286996
286996
|
}
|
|
286997
|
+
// ../common/src/telemetry/trace-context.ts
|
|
286998
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
286999
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
287000
|
+
function getProcessEnv() {
|
|
287001
|
+
return globalThis.process?.env;
|
|
287002
|
+
}
|
|
287003
|
+
function parseInboundTraceparent(value) {
|
|
287004
|
+
if (!value) {
|
|
287005
|
+
return;
|
|
287006
|
+
}
|
|
287007
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
287008
|
+
if (!match) {
|
|
287009
|
+
return;
|
|
287010
|
+
}
|
|
287011
|
+
const [, traceId, parentSpanId] = match;
|
|
287012
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
287013
|
+
return;
|
|
287014
|
+
}
|
|
287015
|
+
return { traceId, parentSpanId };
|
|
287016
|
+
}
|
|
287017
|
+
function getInboundTraceContext() {
|
|
287018
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
287019
|
+
}
|
|
287020
|
+
|
|
286997
287021
|
// ../common/src/telemetry/session-id.ts
|
|
286998
287022
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
286999
287023
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
287000
287024
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
287001
|
-
|
|
287025
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
287026
|
+
function getProcessEnv2() {
|
|
287002
287027
|
return globalThis.process?.env;
|
|
287003
287028
|
}
|
|
287004
287029
|
function normalizeSessionId(value) {
|
|
@@ -287009,18 +287034,165 @@ function normalizeSessionId(value) {
|
|
|
287009
287034
|
return trimmed || undefined;
|
|
287010
287035
|
}
|
|
287011
287036
|
function getConfiguredTelemetrySessionId() {
|
|
287012
|
-
return normalizeSessionId(
|
|
287037
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
287013
287038
|
}
|
|
287014
287039
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
287015
287040
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
287016
287041
|
}
|
|
287042
|
+
function getTelemetryOperationId() {
|
|
287043
|
+
const existing = telemetryOperationIdSlot.get();
|
|
287044
|
+
if (existing) {
|
|
287045
|
+
return existing;
|
|
287046
|
+
}
|
|
287047
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
287048
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
287049
|
+
telemetryOperationIdSlot.set(generated);
|
|
287050
|
+
return generated;
|
|
287051
|
+
}
|
|
287017
287052
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
287018
287053
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
287019
287054
|
function getGlobalTelemetryProperties() {
|
|
287020
287055
|
return telemetryPropsSlot.get();
|
|
287021
287056
|
}
|
|
287022
287057
|
|
|
287058
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
287059
|
+
var REDACTED = "[REDACTED]";
|
|
287060
|
+
var MAX_VALUE_LENGTH = 200;
|
|
287061
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
287062
|
+
"token",
|
|
287063
|
+
"tokens",
|
|
287064
|
+
"secret",
|
|
287065
|
+
"secrets",
|
|
287066
|
+
"password",
|
|
287067
|
+
"passwords",
|
|
287068
|
+
"pwd",
|
|
287069
|
+
"credential",
|
|
287070
|
+
"credentials",
|
|
287071
|
+
"auth",
|
|
287072
|
+
"authentication",
|
|
287073
|
+
"authorization",
|
|
287074
|
+
"authority",
|
|
287075
|
+
"cert",
|
|
287076
|
+
"certificate",
|
|
287077
|
+
"certificates"
|
|
287078
|
+
]);
|
|
287079
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
287080
|
+
"api",
|
|
287081
|
+
"access",
|
|
287082
|
+
"client",
|
|
287083
|
+
"private",
|
|
287084
|
+
"public",
|
|
287085
|
+
"signing",
|
|
287086
|
+
"encryption",
|
|
287087
|
+
"session",
|
|
287088
|
+
"master",
|
|
287089
|
+
"shared",
|
|
287090
|
+
"root",
|
|
287091
|
+
"ssh",
|
|
287092
|
+
"rsa",
|
|
287093
|
+
"aes",
|
|
287094
|
+
"hmac",
|
|
287095
|
+
"oauth"
|
|
287096
|
+
]);
|
|
287097
|
+
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;
|
|
287098
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
287099
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
287100
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
287101
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
287102
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
287103
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
287104
|
+
function shortHash(input) {
|
|
287105
|
+
let hash = 2166136261;
|
|
287106
|
+
for (let i = 0;i < input.length; i++) {
|
|
287107
|
+
hash ^= input.charCodeAt(i);
|
|
287108
|
+
hash = Math.imul(hash, 16777619);
|
|
287109
|
+
}
|
|
287110
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
287111
|
+
}
|
|
287112
|
+
function redactUrl(raw) {
|
|
287113
|
+
try {
|
|
287114
|
+
const url = new URL(raw);
|
|
287115
|
+
return `${url.protocol}//${url.host}`;
|
|
287116
|
+
} catch {
|
|
287117
|
+
return `url#${shortHash(raw)}`;
|
|
287118
|
+
}
|
|
287119
|
+
}
|
|
287120
|
+
function redactValueDetectors(value) {
|
|
287121
|
+
let out = value;
|
|
287122
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
287123
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
287124
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
287125
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
287126
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
287127
|
+
});
|
|
287128
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
287129
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
287130
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
287131
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
287132
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
287133
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
287134
|
+
}
|
|
287135
|
+
return out;
|
|
287136
|
+
}
|
|
287137
|
+
function redactValue(value) {
|
|
287138
|
+
return redactValueDetectors(value);
|
|
287139
|
+
}
|
|
287140
|
+
function redactError(error) {
|
|
287141
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
287142
|
+
safe.name = error.name;
|
|
287143
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
287144
|
+
return safe;
|
|
287145
|
+
}
|
|
287146
|
+
function nameTokens(name2) {
|
|
287147
|
+
return name2.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);
|
|
287148
|
+
}
|
|
287149
|
+
function isSensitiveName(name2) {
|
|
287150
|
+
const tokens = nameTokens(name2);
|
|
287151
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
287152
|
+
const token = tokens[i];
|
|
287153
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
287154
|
+
return true;
|
|
287155
|
+
}
|
|
287156
|
+
if (token === "key" || token === "keys") {
|
|
287157
|
+
const prev = tokens[i - 1];
|
|
287158
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
287159
|
+
return true;
|
|
287160
|
+
}
|
|
287161
|
+
}
|
|
287162
|
+
}
|
|
287163
|
+
return false;
|
|
287164
|
+
}
|
|
287165
|
+
function redactProperty(name2, value) {
|
|
287166
|
+
if (value === undefined || value === null) {
|
|
287167
|
+
return;
|
|
287168
|
+
}
|
|
287169
|
+
if (isSensitiveName(name2)) {
|
|
287170
|
+
return REDACTED;
|
|
287171
|
+
}
|
|
287172
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
287173
|
+
return value;
|
|
287174
|
+
}
|
|
287175
|
+
if (typeof value !== "string") {
|
|
287176
|
+
return "[OBJECT]";
|
|
287177
|
+
}
|
|
287178
|
+
return redactValueDetectors(value);
|
|
287179
|
+
}
|
|
287180
|
+
function redactProperties(properties) {
|
|
287181
|
+
const out = {};
|
|
287182
|
+
for (const [name2, value] of Object.entries(properties)) {
|
|
287183
|
+
const redacted = redactProperty(name2, value);
|
|
287184
|
+
if (redacted !== undefined) {
|
|
287185
|
+
out[name2] = redacted;
|
|
287186
|
+
}
|
|
287187
|
+
}
|
|
287188
|
+
return out;
|
|
287189
|
+
}
|
|
287190
|
+
|
|
287023
287191
|
// ../common/src/telemetry/telemetry-service.ts
|
|
287192
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
287193
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
287194
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
287195
|
+
|
|
287024
287196
|
class TelemetryService {
|
|
287025
287197
|
telemetryProvider;
|
|
287026
287198
|
contextStorage;
|
|
@@ -287047,11 +287219,15 @@ class TelemetryService {
|
|
|
287047
287219
|
trackException(error, properties) {
|
|
287048
287220
|
const context = this.getCurrentContext();
|
|
287049
287221
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
287050
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
287222
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
287051
287223
|
}
|
|
287052
287224
|
async trackRequest(name2, fn, properties) {
|
|
287225
|
+
const parentContext = this.getCurrentContext();
|
|
287226
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
287227
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
287053
287228
|
const context = {
|
|
287054
|
-
operationId
|
|
287229
|
+
operationId,
|
|
287230
|
+
...parentId !== undefined ? { parentId } : {},
|
|
287055
287231
|
id: this.generateId()
|
|
287056
287232
|
};
|
|
287057
287233
|
const startTime = performance.now();
|
|
@@ -287069,6 +287245,45 @@ class TelemetryService {
|
|
|
287069
287245
|
throw error;
|
|
287070
287246
|
}
|
|
287071
287247
|
}
|
|
287248
|
+
trackRequestResult(name2, durationMs, success, properties, context) {
|
|
287249
|
+
const requestContext = context ?? {
|
|
287250
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
287251
|
+
id: this.generateId()
|
|
287252
|
+
};
|
|
287253
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
287254
|
+
this.telemetryProvider.trackRequest(name2, durationMs, success, enrichedProperties);
|
|
287255
|
+
}
|
|
287256
|
+
createRequestContext() {
|
|
287257
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
287258
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
287259
|
+
return {
|
|
287260
|
+
operationId,
|
|
287261
|
+
...parentId !== undefined ? { parentId } : {},
|
|
287262
|
+
id: this.generateId()
|
|
287263
|
+
};
|
|
287264
|
+
}
|
|
287265
|
+
inboundParentIdFor(operationId) {
|
|
287266
|
+
const inbound = getInboundTraceContext();
|
|
287267
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
287268
|
+
}
|
|
287269
|
+
runWithContext(context, fn) {
|
|
287270
|
+
return this.contextStorage.run(context, fn);
|
|
287271
|
+
}
|
|
287272
|
+
createDependencyContext() {
|
|
287273
|
+
const parentContext = this.getCurrentContext();
|
|
287274
|
+
if (!parentContext) {
|
|
287275
|
+
return;
|
|
287276
|
+
}
|
|
287277
|
+
return {
|
|
287278
|
+
operationId: parentContext.operationId,
|
|
287279
|
+
parentId: parentContext.id,
|
|
287280
|
+
id: this.generateId()
|
|
287281
|
+
};
|
|
287282
|
+
}
|
|
287283
|
+
trackDependencyResult(name2, type2, durationMs, success, properties, context, resultCode) {
|
|
287284
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
287285
|
+
this.telemetryProvider.trackDependency(redactValue(name2), type2, durationMs, success, enrichedProperties, resultCode);
|
|
287286
|
+
}
|
|
287072
287287
|
async trackDependencyOperation(name2, type2, fn, properties) {
|
|
287073
287288
|
const parentContext = this.getCurrentContext();
|
|
287074
287289
|
if (!parentContext) {
|
|
@@ -287105,8 +287320,12 @@ class TelemetryService {
|
|
|
287105
287320
|
...getExecutionContextTelemetryProperties(),
|
|
287106
287321
|
...globalProperties,
|
|
287107
287322
|
...this.defaultProperties,
|
|
287108
|
-
...properties,
|
|
287109
|
-
...context
|
|
287323
|
+
...redactProperties(properties ?? {}),
|
|
287324
|
+
...context ? {
|
|
287325
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
287326
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
287327
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
287328
|
+
} : {}
|
|
287110
287329
|
};
|
|
287111
287330
|
if (sessionId === undefined) {
|
|
287112
287331
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -287116,7 +287335,16 @@ class TelemetryService {
|
|
|
287116
287335
|
return enriched;
|
|
287117
287336
|
}
|
|
287118
287337
|
generateId() {
|
|
287119
|
-
|
|
287338
|
+
const bytes = new Uint8Array(8);
|
|
287339
|
+
let hex = "";
|
|
287340
|
+
do {
|
|
287341
|
+
crypto.getRandomValues(bytes);
|
|
287342
|
+
hex = "";
|
|
287343
|
+
for (const byte of bytes) {
|
|
287344
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
287345
|
+
}
|
|
287346
|
+
} while (/^0+$/.test(hex));
|
|
287347
|
+
return hex;
|
|
287120
287348
|
}
|
|
287121
287349
|
}
|
|
287122
287350
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -287818,134 +288046,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
287818
288046
|
};
|
|
287819
288047
|
}
|
|
287820
288048
|
|
|
287821
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
287822
|
-
var REDACTED = "[REDACTED]";
|
|
287823
|
-
var MAX_VALUE_LENGTH = 200;
|
|
287824
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
287825
|
-
"token",
|
|
287826
|
-
"tokens",
|
|
287827
|
-
"secret",
|
|
287828
|
-
"secrets",
|
|
287829
|
-
"password",
|
|
287830
|
-
"passwords",
|
|
287831
|
-
"pwd",
|
|
287832
|
-
"credential",
|
|
287833
|
-
"credentials",
|
|
287834
|
-
"auth",
|
|
287835
|
-
"authentication",
|
|
287836
|
-
"authorization",
|
|
287837
|
-
"authority",
|
|
287838
|
-
"cert",
|
|
287839
|
-
"certificate",
|
|
287840
|
-
"certificates"
|
|
287841
|
-
]);
|
|
287842
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
287843
|
-
"api",
|
|
287844
|
-
"access",
|
|
287845
|
-
"client",
|
|
287846
|
-
"private",
|
|
287847
|
-
"public",
|
|
287848
|
-
"signing",
|
|
287849
|
-
"encryption",
|
|
287850
|
-
"session",
|
|
287851
|
-
"master",
|
|
287852
|
-
"shared",
|
|
287853
|
-
"root",
|
|
287854
|
-
"ssh",
|
|
287855
|
-
"rsa",
|
|
287856
|
-
"aes",
|
|
287857
|
-
"hmac",
|
|
287858
|
-
"oauth"
|
|
287859
|
-
]);
|
|
287860
|
-
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;
|
|
287861
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
287862
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
287863
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
287864
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
287865
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
287866
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
287867
|
-
function shortHash(input) {
|
|
287868
|
-
let hash = 2166136261;
|
|
287869
|
-
for (let i = 0;i < input.length; i++) {
|
|
287870
|
-
hash ^= input.charCodeAt(i);
|
|
287871
|
-
hash = Math.imul(hash, 16777619);
|
|
287872
|
-
}
|
|
287873
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
287874
|
-
}
|
|
287875
|
-
function redactUrl(raw) {
|
|
287876
|
-
try {
|
|
287877
|
-
const url = new URL(raw);
|
|
287878
|
-
return `${url.protocol}//${url.host}`;
|
|
287879
|
-
} catch {
|
|
287880
|
-
return `url#${shortHash(raw)}`;
|
|
287881
|
-
}
|
|
287882
|
-
}
|
|
287883
|
-
function redactValueDetectors(value) {
|
|
287884
|
-
let out = value;
|
|
287885
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
287886
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
287887
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
287888
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
287889
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
287890
|
-
});
|
|
287891
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
287892
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
287893
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
287894
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
287895
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
287896
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
287897
|
-
}
|
|
287898
|
-
return out;
|
|
287899
|
-
}
|
|
287900
|
-
function nameTokens(name2) {
|
|
287901
|
-
return name2.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);
|
|
287902
|
-
}
|
|
287903
|
-
function isSensitiveName(name2) {
|
|
287904
|
-
const tokens = nameTokens(name2);
|
|
287905
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
287906
|
-
const token = tokens[i];
|
|
287907
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
287908
|
-
return true;
|
|
287909
|
-
}
|
|
287910
|
-
if (token === "key" || token === "keys") {
|
|
287911
|
-
const prev = tokens[i - 1];
|
|
287912
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
287913
|
-
return true;
|
|
287914
|
-
}
|
|
287915
|
-
}
|
|
287916
|
-
}
|
|
287917
|
-
return false;
|
|
287918
|
-
}
|
|
287919
|
-
function redactProperty(name2, value) {
|
|
287920
|
-
if (value === undefined || value === null) {
|
|
287921
|
-
return;
|
|
287922
|
-
}
|
|
287923
|
-
if (isSensitiveName(name2)) {
|
|
287924
|
-
return REDACTED;
|
|
287925
|
-
}
|
|
287926
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
287927
|
-
return value;
|
|
287928
|
-
}
|
|
287929
|
-
if (typeof value !== "string") {
|
|
287930
|
-
return "[OBJECT]";
|
|
287931
|
-
}
|
|
287932
|
-
return redactValueDetectors(value);
|
|
287933
|
-
}
|
|
287934
|
-
function redactProperties(properties) {
|
|
287935
|
-
const out = {};
|
|
287936
|
-
for (const [name2, value] of Object.entries(properties)) {
|
|
287937
|
-
const redacted = redactProperty(name2, value);
|
|
287938
|
-
if (redacted !== undefined) {
|
|
287939
|
-
out[name2] = redacted;
|
|
287940
|
-
}
|
|
287941
|
-
}
|
|
287942
|
-
return out;
|
|
287943
|
-
}
|
|
287944
|
-
|
|
287945
288049
|
// ../common/src/trackedAction.ts
|
|
287946
288050
|
var pollSignalSlot = singleton("PollSignal");
|
|
287947
288051
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
287948
288052
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
288053
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
287949
288054
|
var processContext = {
|
|
287950
288055
|
exit: (code) => {
|
|
287951
288056
|
process.exitCode = code;
|
|
@@ -287956,22 +288061,18 @@ var processContext = {
|
|
|
287956
288061
|
};
|
|
287957
288062
|
function extractCommandParams(cmd) {
|
|
287958
288063
|
const params = {};
|
|
288064
|
+
const add2 = (name2, value) => {
|
|
288065
|
+
if (name2 && value !== undefined) {
|
|
288066
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name2}`] = value;
|
|
288067
|
+
}
|
|
288068
|
+
};
|
|
287959
288069
|
const registered = cmd.registeredArguments ?? [];
|
|
287960
288070
|
const processed = cmd.processedArgs ?? [];
|
|
287961
288071
|
for (let i = 0;i < registered.length; i++) {
|
|
287962
|
-
|
|
287963
|
-
if (value === undefined) {
|
|
287964
|
-
continue;
|
|
287965
|
-
}
|
|
287966
|
-
const name2 = registered[i].name();
|
|
287967
|
-
if (name2) {
|
|
287968
|
-
params[name2] = value;
|
|
287969
|
-
}
|
|
288072
|
+
add2(registered[i].name(), processed[i]);
|
|
287970
288073
|
}
|
|
287971
288074
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
287972
|
-
|
|
287973
|
-
params[key] = value;
|
|
287974
|
-
}
|
|
288075
|
+
add2(key, value);
|
|
287975
288076
|
}
|
|
287976
288077
|
return params;
|
|
287977
288078
|
}
|
|
@@ -288014,11 +288115,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
288014
288115
|
return this.action(async (...args) => {
|
|
288015
288116
|
const telemetryName = deriveCommandPath(command);
|
|
288016
288117
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
288118
|
+
const requestContext = telemetry.createRequestContext();
|
|
288017
288119
|
const startTime = performance.now();
|
|
288018
288120
|
let errorMessage;
|
|
288019
288121
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
288020
288122
|
clearRecordedCommandFailureTelemetry();
|
|
288021
|
-
const [error] = await catchError(fn(...args));
|
|
288123
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
288022
288124
|
if (error) {
|
|
288023
288125
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
288024
288126
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -288054,16 +288156,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
288054
288156
|
recordedFailure,
|
|
288055
288157
|
pollSignal: context.pollSignal
|
|
288056
288158
|
});
|
|
288057
|
-
|
|
288058
|
-
|
|
288159
|
+
const commandParams = extractCommandParams(command);
|
|
288160
|
+
if (props) {
|
|
288161
|
+
for (const key of Object.keys(props)) {
|
|
288162
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
288163
|
+
}
|
|
288164
|
+
}
|
|
288165
|
+
const baseProperties = redactProperties({
|
|
288166
|
+
...commandParams,
|
|
288059
288167
|
...props,
|
|
288060
288168
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
288061
288169
|
command: "true",
|
|
288062
|
-
duration: String(durationMs),
|
|
288063
|
-
success: String(success),
|
|
288064
288170
|
...terminalTelemetry,
|
|
288065
288171
|
...errorMessage ? { errorMessage } : {}
|
|
288066
|
-
})
|
|
288172
|
+
});
|
|
288173
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
288067
288174
|
});
|
|
288068
288175
|
};
|
|
288069
288176
|
// ../common/src/console-guard.ts
|
|
@@ -358195,7 +358302,7 @@ class TextApiResponse {
|
|
|
358195
358302
|
var package_default2 = {
|
|
358196
358303
|
name: "@uipath/integrationservice-sdk",
|
|
358197
358304
|
license: "MIT",
|
|
358198
|
-
version: "1.198.0
|
|
358305
|
+
version: "1.198.0",
|
|
358199
358306
|
repository: {
|
|
358200
358307
|
type: "git",
|
|
358201
358308
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -372288,7 +372395,7 @@ function querystringSingleKey4(key, value, keyPrefix = "") {
|
|
|
372288
372395
|
var package_default4 = {
|
|
372289
372396
|
name: "@uipath/solution-sdk",
|
|
372290
372397
|
license: "MIT",
|
|
372291
|
-
version: "1.198.0
|
|
372398
|
+
version: "1.198.0",
|
|
372292
372399
|
repository: {
|
|
372293
372400
|
type: "git",
|
|
372294
372401
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -386652,4 +386759,4 @@ export {
|
|
|
386652
386759
|
metadata
|
|
386653
386760
|
};
|
|
386654
386761
|
|
|
386655
|
-
//# debugId=
|
|
386762
|
+
//# debugId=0DC09C702349F47F64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/case-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.198.1
|
|
4
|
+
"version": "1.198.1",
|
|
5
5
|
"description": "Manage Case Management instances, processes, and incidents.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "1fadf03d7a8dd102742571dff569fdac11808afb"
|
|
30
30
|
}
|