@uipath/test-manager-tool 1.198.0-preview.94 → 1.198.0-preview.96
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 +257 -150
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -21230,7 +21230,7 @@ var init_server = __esm(() => {
|
|
|
21230
21230
|
var package_default = {
|
|
21231
21231
|
name: "@uipath/test-manager-tool",
|
|
21232
21232
|
license: "MIT",
|
|
21233
|
-
version: "1.198.0-preview.
|
|
21233
|
+
version: "1.198.0-preview.96",
|
|
21234
21234
|
description: "Manage test cases, test sets, executions, and results.",
|
|
21235
21235
|
private: false,
|
|
21236
21236
|
repository: {
|
|
@@ -27434,11 +27434,36 @@ class NodeContextStorage {
|
|
|
27434
27434
|
return this.storage.getStore();
|
|
27435
27435
|
}
|
|
27436
27436
|
}
|
|
27437
|
+
// ../common/src/telemetry/trace-context.ts
|
|
27438
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
27439
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
27440
|
+
function getProcessEnv() {
|
|
27441
|
+
return globalThis.process?.env;
|
|
27442
|
+
}
|
|
27443
|
+
function parseInboundTraceparent(value) {
|
|
27444
|
+
if (!value) {
|
|
27445
|
+
return;
|
|
27446
|
+
}
|
|
27447
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
27448
|
+
if (!match) {
|
|
27449
|
+
return;
|
|
27450
|
+
}
|
|
27451
|
+
const [, traceId, parentSpanId] = match;
|
|
27452
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
27453
|
+
return;
|
|
27454
|
+
}
|
|
27455
|
+
return { traceId, parentSpanId };
|
|
27456
|
+
}
|
|
27457
|
+
function getInboundTraceContext() {
|
|
27458
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
27459
|
+
}
|
|
27460
|
+
|
|
27437
27461
|
// ../common/src/telemetry/session-id.ts
|
|
27438
27462
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
27439
27463
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
27440
27464
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
27441
|
-
|
|
27465
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
27466
|
+
function getProcessEnv2() {
|
|
27442
27467
|
return globalThis.process?.env;
|
|
27443
27468
|
}
|
|
27444
27469
|
function normalizeSessionId(value) {
|
|
@@ -27449,18 +27474,165 @@ function normalizeSessionId(value) {
|
|
|
27449
27474
|
return trimmed || undefined;
|
|
27450
27475
|
}
|
|
27451
27476
|
function getConfiguredTelemetrySessionId() {
|
|
27452
|
-
return normalizeSessionId(
|
|
27477
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
27453
27478
|
}
|
|
27454
27479
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
27455
27480
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
27456
27481
|
}
|
|
27482
|
+
function getTelemetryOperationId() {
|
|
27483
|
+
const existing = telemetryOperationIdSlot.get();
|
|
27484
|
+
if (existing) {
|
|
27485
|
+
return existing;
|
|
27486
|
+
}
|
|
27487
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
27488
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
27489
|
+
telemetryOperationIdSlot.set(generated);
|
|
27490
|
+
return generated;
|
|
27491
|
+
}
|
|
27457
27492
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
27458
27493
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
27459
27494
|
function getGlobalTelemetryProperties() {
|
|
27460
27495
|
return telemetryPropsSlot.get();
|
|
27461
27496
|
}
|
|
27462
27497
|
|
|
27498
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
27499
|
+
var REDACTED = "[REDACTED]";
|
|
27500
|
+
var MAX_VALUE_LENGTH = 200;
|
|
27501
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
27502
|
+
"token",
|
|
27503
|
+
"tokens",
|
|
27504
|
+
"secret",
|
|
27505
|
+
"secrets",
|
|
27506
|
+
"password",
|
|
27507
|
+
"passwords",
|
|
27508
|
+
"pwd",
|
|
27509
|
+
"credential",
|
|
27510
|
+
"credentials",
|
|
27511
|
+
"auth",
|
|
27512
|
+
"authentication",
|
|
27513
|
+
"authorization",
|
|
27514
|
+
"authority",
|
|
27515
|
+
"cert",
|
|
27516
|
+
"certificate",
|
|
27517
|
+
"certificates"
|
|
27518
|
+
]);
|
|
27519
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
27520
|
+
"api",
|
|
27521
|
+
"access",
|
|
27522
|
+
"client",
|
|
27523
|
+
"private",
|
|
27524
|
+
"public",
|
|
27525
|
+
"signing",
|
|
27526
|
+
"encryption",
|
|
27527
|
+
"session",
|
|
27528
|
+
"master",
|
|
27529
|
+
"shared",
|
|
27530
|
+
"root",
|
|
27531
|
+
"ssh",
|
|
27532
|
+
"rsa",
|
|
27533
|
+
"aes",
|
|
27534
|
+
"hmac",
|
|
27535
|
+
"oauth"
|
|
27536
|
+
]);
|
|
27537
|
+
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;
|
|
27538
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
27539
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
27540
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
27541
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
27542
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
27543
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
27544
|
+
function shortHash(input) {
|
|
27545
|
+
let hash = 2166136261;
|
|
27546
|
+
for (let i = 0;i < input.length; i++) {
|
|
27547
|
+
hash ^= input.charCodeAt(i);
|
|
27548
|
+
hash = Math.imul(hash, 16777619);
|
|
27549
|
+
}
|
|
27550
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
27551
|
+
}
|
|
27552
|
+
function redactUrl(raw) {
|
|
27553
|
+
try {
|
|
27554
|
+
const url = new URL(raw);
|
|
27555
|
+
return `${url.protocol}//${url.host}`;
|
|
27556
|
+
} catch {
|
|
27557
|
+
return `url#${shortHash(raw)}`;
|
|
27558
|
+
}
|
|
27559
|
+
}
|
|
27560
|
+
function redactValueDetectors(value) {
|
|
27561
|
+
let out = value;
|
|
27562
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
27563
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
27564
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
27565
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
27566
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
27567
|
+
});
|
|
27568
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
27569
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
27570
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
27571
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
27572
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
27573
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
27574
|
+
}
|
|
27575
|
+
return out;
|
|
27576
|
+
}
|
|
27577
|
+
function redactValue(value) {
|
|
27578
|
+
return redactValueDetectors(value);
|
|
27579
|
+
}
|
|
27580
|
+
function redactError(error) {
|
|
27581
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
27582
|
+
safe.name = error.name;
|
|
27583
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
27584
|
+
return safe;
|
|
27585
|
+
}
|
|
27586
|
+
function nameTokens(name) {
|
|
27587
|
+
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);
|
|
27588
|
+
}
|
|
27589
|
+
function isSensitiveName(name) {
|
|
27590
|
+
const tokens = nameTokens(name);
|
|
27591
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
27592
|
+
const token = tokens[i];
|
|
27593
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
27594
|
+
return true;
|
|
27595
|
+
}
|
|
27596
|
+
if (token === "key" || token === "keys") {
|
|
27597
|
+
const prev = tokens[i - 1];
|
|
27598
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
27599
|
+
return true;
|
|
27600
|
+
}
|
|
27601
|
+
}
|
|
27602
|
+
}
|
|
27603
|
+
return false;
|
|
27604
|
+
}
|
|
27605
|
+
function redactProperty(name, value) {
|
|
27606
|
+
if (value === undefined || value === null) {
|
|
27607
|
+
return;
|
|
27608
|
+
}
|
|
27609
|
+
if (isSensitiveName(name)) {
|
|
27610
|
+
return REDACTED;
|
|
27611
|
+
}
|
|
27612
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
27613
|
+
return value;
|
|
27614
|
+
}
|
|
27615
|
+
if (typeof value !== "string") {
|
|
27616
|
+
return "[OBJECT]";
|
|
27617
|
+
}
|
|
27618
|
+
return redactValueDetectors(value);
|
|
27619
|
+
}
|
|
27620
|
+
function redactProperties(properties) {
|
|
27621
|
+
const out = {};
|
|
27622
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
27623
|
+
const redacted = redactProperty(name, value);
|
|
27624
|
+
if (redacted !== undefined) {
|
|
27625
|
+
out[name] = redacted;
|
|
27626
|
+
}
|
|
27627
|
+
}
|
|
27628
|
+
return out;
|
|
27629
|
+
}
|
|
27630
|
+
|
|
27463
27631
|
// ../common/src/telemetry/telemetry-service.ts
|
|
27632
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
27633
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
27634
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
27635
|
+
|
|
27464
27636
|
class TelemetryService {
|
|
27465
27637
|
telemetryProvider;
|
|
27466
27638
|
contextStorage;
|
|
@@ -27487,11 +27659,15 @@ class TelemetryService {
|
|
|
27487
27659
|
trackException(error, properties) {
|
|
27488
27660
|
const context = this.getCurrentContext();
|
|
27489
27661
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
27490
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
27662
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
27491
27663
|
}
|
|
27492
27664
|
async trackRequest(name, fn, properties) {
|
|
27665
|
+
const parentContext = this.getCurrentContext();
|
|
27666
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
27667
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
27493
27668
|
const context = {
|
|
27494
|
-
operationId
|
|
27669
|
+
operationId,
|
|
27670
|
+
...parentId !== undefined ? { parentId } : {},
|
|
27495
27671
|
id: this.generateId()
|
|
27496
27672
|
};
|
|
27497
27673
|
const startTime = performance.now();
|
|
@@ -27509,6 +27685,45 @@ class TelemetryService {
|
|
|
27509
27685
|
throw error;
|
|
27510
27686
|
}
|
|
27511
27687
|
}
|
|
27688
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
27689
|
+
const requestContext = context ?? {
|
|
27690
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
27691
|
+
id: this.generateId()
|
|
27692
|
+
};
|
|
27693
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
27694
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
27695
|
+
}
|
|
27696
|
+
createRequestContext() {
|
|
27697
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
27698
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
27699
|
+
return {
|
|
27700
|
+
operationId,
|
|
27701
|
+
...parentId !== undefined ? { parentId } : {},
|
|
27702
|
+
id: this.generateId()
|
|
27703
|
+
};
|
|
27704
|
+
}
|
|
27705
|
+
inboundParentIdFor(operationId) {
|
|
27706
|
+
const inbound = getInboundTraceContext();
|
|
27707
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
27708
|
+
}
|
|
27709
|
+
runWithContext(context, fn) {
|
|
27710
|
+
return this.contextStorage.run(context, fn);
|
|
27711
|
+
}
|
|
27712
|
+
createDependencyContext() {
|
|
27713
|
+
const parentContext = this.getCurrentContext();
|
|
27714
|
+
if (!parentContext) {
|
|
27715
|
+
return;
|
|
27716
|
+
}
|
|
27717
|
+
return {
|
|
27718
|
+
operationId: parentContext.operationId,
|
|
27719
|
+
parentId: parentContext.id,
|
|
27720
|
+
id: this.generateId()
|
|
27721
|
+
};
|
|
27722
|
+
}
|
|
27723
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
27724
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
27725
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
27726
|
+
}
|
|
27512
27727
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
27513
27728
|
const parentContext = this.getCurrentContext();
|
|
27514
27729
|
if (!parentContext) {
|
|
@@ -27545,8 +27760,12 @@ class TelemetryService {
|
|
|
27545
27760
|
...getExecutionContextTelemetryProperties(),
|
|
27546
27761
|
...globalProperties,
|
|
27547
27762
|
...this.defaultProperties,
|
|
27548
|
-
...properties,
|
|
27549
|
-
...context
|
|
27763
|
+
...redactProperties(properties ?? {}),
|
|
27764
|
+
...context ? {
|
|
27765
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
27766
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
27767
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
27768
|
+
} : {}
|
|
27550
27769
|
};
|
|
27551
27770
|
if (sessionId === undefined) {
|
|
27552
27771
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -27556,7 +27775,16 @@ class TelemetryService {
|
|
|
27556
27775
|
return enriched;
|
|
27557
27776
|
}
|
|
27558
27777
|
generateId() {
|
|
27559
|
-
|
|
27778
|
+
const bytes = new Uint8Array(8);
|
|
27779
|
+
let hex = "";
|
|
27780
|
+
do {
|
|
27781
|
+
crypto.getRandomValues(bytes);
|
|
27782
|
+
hex = "";
|
|
27783
|
+
for (const byte of bytes) {
|
|
27784
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
27785
|
+
}
|
|
27786
|
+
} while (/^0+$/.test(hex));
|
|
27787
|
+
return hex;
|
|
27560
27788
|
}
|
|
27561
27789
|
}
|
|
27562
27790
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -28264,134 +28492,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
28264
28492
|
};
|
|
28265
28493
|
}
|
|
28266
28494
|
|
|
28267
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
28268
|
-
var REDACTED = "[REDACTED]";
|
|
28269
|
-
var MAX_VALUE_LENGTH = 200;
|
|
28270
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
28271
|
-
"token",
|
|
28272
|
-
"tokens",
|
|
28273
|
-
"secret",
|
|
28274
|
-
"secrets",
|
|
28275
|
-
"password",
|
|
28276
|
-
"passwords",
|
|
28277
|
-
"pwd",
|
|
28278
|
-
"credential",
|
|
28279
|
-
"credentials",
|
|
28280
|
-
"auth",
|
|
28281
|
-
"authentication",
|
|
28282
|
-
"authorization",
|
|
28283
|
-
"authority",
|
|
28284
|
-
"cert",
|
|
28285
|
-
"certificate",
|
|
28286
|
-
"certificates"
|
|
28287
|
-
]);
|
|
28288
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
28289
|
-
"api",
|
|
28290
|
-
"access",
|
|
28291
|
-
"client",
|
|
28292
|
-
"private",
|
|
28293
|
-
"public",
|
|
28294
|
-
"signing",
|
|
28295
|
-
"encryption",
|
|
28296
|
-
"session",
|
|
28297
|
-
"master",
|
|
28298
|
-
"shared",
|
|
28299
|
-
"root",
|
|
28300
|
-
"ssh",
|
|
28301
|
-
"rsa",
|
|
28302
|
-
"aes",
|
|
28303
|
-
"hmac",
|
|
28304
|
-
"oauth"
|
|
28305
|
-
]);
|
|
28306
|
-
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;
|
|
28307
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
28308
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
28309
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
28310
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
28311
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
28312
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
28313
|
-
function shortHash(input) {
|
|
28314
|
-
let hash = 2166136261;
|
|
28315
|
-
for (let i = 0;i < input.length; i++) {
|
|
28316
|
-
hash ^= input.charCodeAt(i);
|
|
28317
|
-
hash = Math.imul(hash, 16777619);
|
|
28318
|
-
}
|
|
28319
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
28320
|
-
}
|
|
28321
|
-
function redactUrl(raw) {
|
|
28322
|
-
try {
|
|
28323
|
-
const url = new URL(raw);
|
|
28324
|
-
return `${url.protocol}//${url.host}`;
|
|
28325
|
-
} catch {
|
|
28326
|
-
return `url#${shortHash(raw)}`;
|
|
28327
|
-
}
|
|
28328
|
-
}
|
|
28329
|
-
function redactValueDetectors(value) {
|
|
28330
|
-
let out = value;
|
|
28331
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
28332
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
28333
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
28334
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
28335
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
28336
|
-
});
|
|
28337
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
28338
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
28339
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
28340
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
28341
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
28342
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
28343
|
-
}
|
|
28344
|
-
return out;
|
|
28345
|
-
}
|
|
28346
|
-
function nameTokens(name) {
|
|
28347
|
-
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);
|
|
28348
|
-
}
|
|
28349
|
-
function isSensitiveName(name) {
|
|
28350
|
-
const tokens = nameTokens(name);
|
|
28351
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
28352
|
-
const token = tokens[i];
|
|
28353
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
28354
|
-
return true;
|
|
28355
|
-
}
|
|
28356
|
-
if (token === "key" || token === "keys") {
|
|
28357
|
-
const prev = tokens[i - 1];
|
|
28358
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
28359
|
-
return true;
|
|
28360
|
-
}
|
|
28361
|
-
}
|
|
28362
|
-
}
|
|
28363
|
-
return false;
|
|
28364
|
-
}
|
|
28365
|
-
function redactProperty(name, value) {
|
|
28366
|
-
if (value === undefined || value === null) {
|
|
28367
|
-
return;
|
|
28368
|
-
}
|
|
28369
|
-
if (isSensitiveName(name)) {
|
|
28370
|
-
return REDACTED;
|
|
28371
|
-
}
|
|
28372
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
28373
|
-
return value;
|
|
28374
|
-
}
|
|
28375
|
-
if (typeof value !== "string") {
|
|
28376
|
-
return "[OBJECT]";
|
|
28377
|
-
}
|
|
28378
|
-
return redactValueDetectors(value);
|
|
28379
|
-
}
|
|
28380
|
-
function redactProperties(properties) {
|
|
28381
|
-
const out = {};
|
|
28382
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
28383
|
-
const redacted = redactProperty(name, value);
|
|
28384
|
-
if (redacted !== undefined) {
|
|
28385
|
-
out[name] = redacted;
|
|
28386
|
-
}
|
|
28387
|
-
}
|
|
28388
|
-
return out;
|
|
28389
|
-
}
|
|
28390
|
-
|
|
28391
28495
|
// ../common/src/trackedAction.ts
|
|
28392
28496
|
var pollSignalSlot = singleton("PollSignal");
|
|
28393
28497
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
28394
28498
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
28499
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
28395
28500
|
var processContext = {
|
|
28396
28501
|
exit: (code) => {
|
|
28397
28502
|
process.exitCode = code;
|
|
@@ -28402,22 +28507,18 @@ var processContext = {
|
|
|
28402
28507
|
};
|
|
28403
28508
|
function extractCommandParams(cmd) {
|
|
28404
28509
|
const params = {};
|
|
28510
|
+
const add2 = (name, value) => {
|
|
28511
|
+
if (name && value !== undefined) {
|
|
28512
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
28513
|
+
}
|
|
28514
|
+
};
|
|
28405
28515
|
const registered = cmd.registeredArguments ?? [];
|
|
28406
28516
|
const processed = cmd.processedArgs ?? [];
|
|
28407
28517
|
for (let i = 0;i < registered.length; i++) {
|
|
28408
|
-
|
|
28409
|
-
if (value === undefined) {
|
|
28410
|
-
continue;
|
|
28411
|
-
}
|
|
28412
|
-
const name = registered[i].name();
|
|
28413
|
-
if (name) {
|
|
28414
|
-
params[name] = value;
|
|
28415
|
-
}
|
|
28518
|
+
add2(registered[i].name(), processed[i]);
|
|
28416
28519
|
}
|
|
28417
28520
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
28418
|
-
|
|
28419
|
-
params[key] = value;
|
|
28420
|
-
}
|
|
28521
|
+
add2(key, value);
|
|
28421
28522
|
}
|
|
28422
28523
|
return params;
|
|
28423
28524
|
}
|
|
@@ -28460,11 +28561,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
28460
28561
|
return this.action(async (...args) => {
|
|
28461
28562
|
const telemetryName = deriveCommandPath(command);
|
|
28462
28563
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
28564
|
+
const requestContext = telemetry.createRequestContext();
|
|
28463
28565
|
const startTime = performance.now();
|
|
28464
28566
|
let errorMessage;
|
|
28465
28567
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
28466
28568
|
clearRecordedCommandFailureTelemetry();
|
|
28467
|
-
const [error] = await catchError(fn(...args));
|
|
28569
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
28468
28570
|
if (error) {
|
|
28469
28571
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
28470
28572
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -28500,16 +28602,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
28500
28602
|
recordedFailure,
|
|
28501
28603
|
pollSignal: context.pollSignal
|
|
28502
28604
|
});
|
|
28503
|
-
|
|
28504
|
-
|
|
28605
|
+
const commandParams = extractCommandParams(command);
|
|
28606
|
+
if (props) {
|
|
28607
|
+
for (const key of Object.keys(props)) {
|
|
28608
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
28609
|
+
}
|
|
28610
|
+
}
|
|
28611
|
+
const baseProperties = redactProperties({
|
|
28612
|
+
...commandParams,
|
|
28505
28613
|
...props,
|
|
28506
28614
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
28507
28615
|
command: "true",
|
|
28508
|
-
duration: String(durationMs),
|
|
28509
|
-
success: String(success),
|
|
28510
28616
|
...terminalTelemetry,
|
|
28511
28617
|
...errorMessage ? { errorMessage } : {}
|
|
28512
|
-
})
|
|
28618
|
+
});
|
|
28619
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
28513
28620
|
});
|
|
28514
28621
|
};
|
|
28515
28622
|
|
|
@@ -47766,4 +47873,4 @@ export {
|
|
|
47766
47873
|
metadata
|
|
47767
47874
|
};
|
|
47768
47875
|
|
|
47769
|
-
//# debugId=
|
|
47876
|
+
//# debugId=95AF26B5BB846B4364756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/test-manager-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.198.0-preview.
|
|
4
|
+
"version": "1.198.0-preview.96",
|
|
5
5
|
"description": "Manage test cases, test sets, executions, and results.",
|
|
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
|
}
|