@uipath/test-manager-tool 1.199.0-preview.92 → 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.
- package/dist/tool.js +257 -150
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -30309,7 +30309,7 @@ var require_lib3 = __commonJS((exports, module) => {
|
|
|
30309
30309
|
var package_default = {
|
|
30310
30310
|
name: "@uipath/test-manager-tool",
|
|
30311
30311
|
license: "MIT",
|
|
30312
|
-
version: "1.199.0-preview.
|
|
30312
|
+
version: "1.199.0-preview.97",
|
|
30313
30313
|
description: "Manage test cases, test sets, executions, and results.",
|
|
30314
30314
|
private: false,
|
|
30315
30315
|
repository: {
|
|
@@ -36521,11 +36521,36 @@ class NodeContextStorage {
|
|
|
36521
36521
|
return this.storage.getStore();
|
|
36522
36522
|
}
|
|
36523
36523
|
}
|
|
36524
|
+
// ../common/src/telemetry/trace-context.ts
|
|
36525
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
36526
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
36527
|
+
function getProcessEnv() {
|
|
36528
|
+
return globalThis.process?.env;
|
|
36529
|
+
}
|
|
36530
|
+
function parseInboundTraceparent(value) {
|
|
36531
|
+
if (!value) {
|
|
36532
|
+
return;
|
|
36533
|
+
}
|
|
36534
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
36535
|
+
if (!match) {
|
|
36536
|
+
return;
|
|
36537
|
+
}
|
|
36538
|
+
const [, traceId, parentSpanId] = match;
|
|
36539
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
36540
|
+
return;
|
|
36541
|
+
}
|
|
36542
|
+
return { traceId, parentSpanId };
|
|
36543
|
+
}
|
|
36544
|
+
function getInboundTraceContext() {
|
|
36545
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
36546
|
+
}
|
|
36547
|
+
|
|
36524
36548
|
// ../common/src/telemetry/session-id.ts
|
|
36525
36549
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
36526
36550
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
36527
36551
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
36528
|
-
|
|
36552
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
36553
|
+
function getProcessEnv2() {
|
|
36529
36554
|
return globalThis.process?.env;
|
|
36530
36555
|
}
|
|
36531
36556
|
function normalizeSessionId(value) {
|
|
@@ -36536,18 +36561,165 @@ function normalizeSessionId(value) {
|
|
|
36536
36561
|
return trimmed || undefined;
|
|
36537
36562
|
}
|
|
36538
36563
|
function getConfiguredTelemetrySessionId() {
|
|
36539
|
-
return normalizeSessionId(
|
|
36564
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
36540
36565
|
}
|
|
36541
36566
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
36542
36567
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
36543
36568
|
}
|
|
36569
|
+
function getTelemetryOperationId() {
|
|
36570
|
+
const existing = telemetryOperationIdSlot.get();
|
|
36571
|
+
if (existing) {
|
|
36572
|
+
return existing;
|
|
36573
|
+
}
|
|
36574
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
36575
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
36576
|
+
telemetryOperationIdSlot.set(generated);
|
|
36577
|
+
return generated;
|
|
36578
|
+
}
|
|
36544
36579
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
36545
36580
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
36546
36581
|
function getGlobalTelemetryProperties() {
|
|
36547
36582
|
return telemetryPropsSlot.get();
|
|
36548
36583
|
}
|
|
36549
36584
|
|
|
36585
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
36586
|
+
var REDACTED = "[REDACTED]";
|
|
36587
|
+
var MAX_VALUE_LENGTH = 200;
|
|
36588
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
36589
|
+
"token",
|
|
36590
|
+
"tokens",
|
|
36591
|
+
"secret",
|
|
36592
|
+
"secrets",
|
|
36593
|
+
"password",
|
|
36594
|
+
"passwords",
|
|
36595
|
+
"pwd",
|
|
36596
|
+
"credential",
|
|
36597
|
+
"credentials",
|
|
36598
|
+
"auth",
|
|
36599
|
+
"authentication",
|
|
36600
|
+
"authorization",
|
|
36601
|
+
"authority",
|
|
36602
|
+
"cert",
|
|
36603
|
+
"certificate",
|
|
36604
|
+
"certificates"
|
|
36605
|
+
]);
|
|
36606
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
36607
|
+
"api",
|
|
36608
|
+
"access",
|
|
36609
|
+
"client",
|
|
36610
|
+
"private",
|
|
36611
|
+
"public",
|
|
36612
|
+
"signing",
|
|
36613
|
+
"encryption",
|
|
36614
|
+
"session",
|
|
36615
|
+
"master",
|
|
36616
|
+
"shared",
|
|
36617
|
+
"root",
|
|
36618
|
+
"ssh",
|
|
36619
|
+
"rsa",
|
|
36620
|
+
"aes",
|
|
36621
|
+
"hmac",
|
|
36622
|
+
"oauth"
|
|
36623
|
+
]);
|
|
36624
|
+
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;
|
|
36625
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
36626
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
36627
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
36628
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
36629
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
36630
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
36631
|
+
function shortHash(input) {
|
|
36632
|
+
let hash = 2166136261;
|
|
36633
|
+
for (let i = 0;i < input.length; i++) {
|
|
36634
|
+
hash ^= input.charCodeAt(i);
|
|
36635
|
+
hash = Math.imul(hash, 16777619);
|
|
36636
|
+
}
|
|
36637
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
36638
|
+
}
|
|
36639
|
+
function redactUrl(raw) {
|
|
36640
|
+
try {
|
|
36641
|
+
const url = new URL(raw);
|
|
36642
|
+
return `${url.protocol}//${url.host}`;
|
|
36643
|
+
} catch {
|
|
36644
|
+
return `url#${shortHash(raw)}`;
|
|
36645
|
+
}
|
|
36646
|
+
}
|
|
36647
|
+
function redactValueDetectors(value) {
|
|
36648
|
+
let out = value;
|
|
36649
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
36650
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
36651
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
36652
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
36653
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
36654
|
+
});
|
|
36655
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
36656
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
36657
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
36658
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
36659
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
36660
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
36661
|
+
}
|
|
36662
|
+
return out;
|
|
36663
|
+
}
|
|
36664
|
+
function redactValue(value) {
|
|
36665
|
+
return redactValueDetectors(value);
|
|
36666
|
+
}
|
|
36667
|
+
function redactError(error) {
|
|
36668
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
36669
|
+
safe.name = error.name;
|
|
36670
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
36671
|
+
return safe;
|
|
36672
|
+
}
|
|
36673
|
+
function nameTokens(name) {
|
|
36674
|
+
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);
|
|
36675
|
+
}
|
|
36676
|
+
function isSensitiveName(name) {
|
|
36677
|
+
const tokens = nameTokens(name);
|
|
36678
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
36679
|
+
const token = tokens[i];
|
|
36680
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
36681
|
+
return true;
|
|
36682
|
+
}
|
|
36683
|
+
if (token === "key" || token === "keys") {
|
|
36684
|
+
const prev = tokens[i - 1];
|
|
36685
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
36686
|
+
return true;
|
|
36687
|
+
}
|
|
36688
|
+
}
|
|
36689
|
+
}
|
|
36690
|
+
return false;
|
|
36691
|
+
}
|
|
36692
|
+
function redactProperty(name, value) {
|
|
36693
|
+
if (value === undefined || value === null) {
|
|
36694
|
+
return;
|
|
36695
|
+
}
|
|
36696
|
+
if (isSensitiveName(name)) {
|
|
36697
|
+
return REDACTED;
|
|
36698
|
+
}
|
|
36699
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
36700
|
+
return value;
|
|
36701
|
+
}
|
|
36702
|
+
if (typeof value !== "string") {
|
|
36703
|
+
return "[OBJECT]";
|
|
36704
|
+
}
|
|
36705
|
+
return redactValueDetectors(value);
|
|
36706
|
+
}
|
|
36707
|
+
function redactProperties(properties) {
|
|
36708
|
+
const out = {};
|
|
36709
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
36710
|
+
const redacted = redactProperty(name, value);
|
|
36711
|
+
if (redacted !== undefined) {
|
|
36712
|
+
out[name] = redacted;
|
|
36713
|
+
}
|
|
36714
|
+
}
|
|
36715
|
+
return out;
|
|
36716
|
+
}
|
|
36717
|
+
|
|
36550
36718
|
// ../common/src/telemetry/telemetry-service.ts
|
|
36719
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
36720
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
36721
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
36722
|
+
|
|
36551
36723
|
class TelemetryService {
|
|
36552
36724
|
telemetryProvider;
|
|
36553
36725
|
contextStorage;
|
|
@@ -36574,11 +36746,15 @@ class TelemetryService {
|
|
|
36574
36746
|
trackException(error, properties) {
|
|
36575
36747
|
const context = this.getCurrentContext();
|
|
36576
36748
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
36577
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
36749
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
36578
36750
|
}
|
|
36579
36751
|
async trackRequest(name, fn, properties) {
|
|
36752
|
+
const parentContext = this.getCurrentContext();
|
|
36753
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
36754
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
36580
36755
|
const context = {
|
|
36581
|
-
operationId
|
|
36756
|
+
operationId,
|
|
36757
|
+
...parentId !== undefined ? { parentId } : {},
|
|
36582
36758
|
id: this.generateId()
|
|
36583
36759
|
};
|
|
36584
36760
|
const startTime = performance.now();
|
|
@@ -36596,6 +36772,45 @@ class TelemetryService {
|
|
|
36596
36772
|
throw error;
|
|
36597
36773
|
}
|
|
36598
36774
|
}
|
|
36775
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
36776
|
+
const requestContext = context ?? {
|
|
36777
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
36778
|
+
id: this.generateId()
|
|
36779
|
+
};
|
|
36780
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
36781
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
36782
|
+
}
|
|
36783
|
+
createRequestContext() {
|
|
36784
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
36785
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
36786
|
+
return {
|
|
36787
|
+
operationId,
|
|
36788
|
+
...parentId !== undefined ? { parentId } : {},
|
|
36789
|
+
id: this.generateId()
|
|
36790
|
+
};
|
|
36791
|
+
}
|
|
36792
|
+
inboundParentIdFor(operationId) {
|
|
36793
|
+
const inbound = getInboundTraceContext();
|
|
36794
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
36795
|
+
}
|
|
36796
|
+
runWithContext(context, fn) {
|
|
36797
|
+
return this.contextStorage.run(context, fn);
|
|
36798
|
+
}
|
|
36799
|
+
createDependencyContext() {
|
|
36800
|
+
const parentContext = this.getCurrentContext();
|
|
36801
|
+
if (!parentContext) {
|
|
36802
|
+
return;
|
|
36803
|
+
}
|
|
36804
|
+
return {
|
|
36805
|
+
operationId: parentContext.operationId,
|
|
36806
|
+
parentId: parentContext.id,
|
|
36807
|
+
id: this.generateId()
|
|
36808
|
+
};
|
|
36809
|
+
}
|
|
36810
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
36811
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
36812
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
36813
|
+
}
|
|
36599
36814
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
36600
36815
|
const parentContext = this.getCurrentContext();
|
|
36601
36816
|
if (!parentContext) {
|
|
@@ -36632,8 +36847,12 @@ class TelemetryService {
|
|
|
36632
36847
|
...getExecutionContextTelemetryProperties(),
|
|
36633
36848
|
...globalProperties,
|
|
36634
36849
|
...this.defaultProperties,
|
|
36635
|
-
...properties,
|
|
36636
|
-
...context
|
|
36850
|
+
...redactProperties(properties ?? {}),
|
|
36851
|
+
...context ? {
|
|
36852
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
36853
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
36854
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
36855
|
+
} : {}
|
|
36637
36856
|
};
|
|
36638
36857
|
if (sessionId === undefined) {
|
|
36639
36858
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -36643,7 +36862,16 @@ class TelemetryService {
|
|
|
36643
36862
|
return enriched;
|
|
36644
36863
|
}
|
|
36645
36864
|
generateId() {
|
|
36646
|
-
|
|
36865
|
+
const bytes = new Uint8Array(8);
|
|
36866
|
+
let hex = "";
|
|
36867
|
+
do {
|
|
36868
|
+
crypto.getRandomValues(bytes);
|
|
36869
|
+
hex = "";
|
|
36870
|
+
for (const byte of bytes) {
|
|
36871
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
36872
|
+
}
|
|
36873
|
+
} while (/^0+$/.test(hex));
|
|
36874
|
+
return hex;
|
|
36647
36875
|
}
|
|
36648
36876
|
}
|
|
36649
36877
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -37352,134 +37580,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
37352
37580
|
};
|
|
37353
37581
|
}
|
|
37354
37582
|
|
|
37355
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
37356
|
-
var REDACTED = "[REDACTED]";
|
|
37357
|
-
var MAX_VALUE_LENGTH = 200;
|
|
37358
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
37359
|
-
"token",
|
|
37360
|
-
"tokens",
|
|
37361
|
-
"secret",
|
|
37362
|
-
"secrets",
|
|
37363
|
-
"password",
|
|
37364
|
-
"passwords",
|
|
37365
|
-
"pwd",
|
|
37366
|
-
"credential",
|
|
37367
|
-
"credentials",
|
|
37368
|
-
"auth",
|
|
37369
|
-
"authentication",
|
|
37370
|
-
"authorization",
|
|
37371
|
-
"authority",
|
|
37372
|
-
"cert",
|
|
37373
|
-
"certificate",
|
|
37374
|
-
"certificates"
|
|
37375
|
-
]);
|
|
37376
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
37377
|
-
"api",
|
|
37378
|
-
"access",
|
|
37379
|
-
"client",
|
|
37380
|
-
"private",
|
|
37381
|
-
"public",
|
|
37382
|
-
"signing",
|
|
37383
|
-
"encryption",
|
|
37384
|
-
"session",
|
|
37385
|
-
"master",
|
|
37386
|
-
"shared",
|
|
37387
|
-
"root",
|
|
37388
|
-
"ssh",
|
|
37389
|
-
"rsa",
|
|
37390
|
-
"aes",
|
|
37391
|
-
"hmac",
|
|
37392
|
-
"oauth"
|
|
37393
|
-
]);
|
|
37394
|
-
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;
|
|
37395
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
37396
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
37397
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
37398
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
37399
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
37400
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
37401
|
-
function shortHash(input) {
|
|
37402
|
-
let hash = 2166136261;
|
|
37403
|
-
for (let i = 0;i < input.length; i++) {
|
|
37404
|
-
hash ^= input.charCodeAt(i);
|
|
37405
|
-
hash = Math.imul(hash, 16777619);
|
|
37406
|
-
}
|
|
37407
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
37408
|
-
}
|
|
37409
|
-
function redactUrl(raw) {
|
|
37410
|
-
try {
|
|
37411
|
-
const url = new URL(raw);
|
|
37412
|
-
return `${url.protocol}//${url.host}`;
|
|
37413
|
-
} catch {
|
|
37414
|
-
return `url#${shortHash(raw)}`;
|
|
37415
|
-
}
|
|
37416
|
-
}
|
|
37417
|
-
function redactValueDetectors(value) {
|
|
37418
|
-
let out = value;
|
|
37419
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
37420
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
37421
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
37422
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
37423
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
37424
|
-
});
|
|
37425
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
37426
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
37427
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
37428
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
37429
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
37430
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
37431
|
-
}
|
|
37432
|
-
return out;
|
|
37433
|
-
}
|
|
37434
|
-
function nameTokens(name) {
|
|
37435
|
-
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);
|
|
37436
|
-
}
|
|
37437
|
-
function isSensitiveName(name) {
|
|
37438
|
-
const tokens = nameTokens(name);
|
|
37439
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
37440
|
-
const token = tokens[i];
|
|
37441
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
37442
|
-
return true;
|
|
37443
|
-
}
|
|
37444
|
-
if (token === "key" || token === "keys") {
|
|
37445
|
-
const prev = tokens[i - 1];
|
|
37446
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
37447
|
-
return true;
|
|
37448
|
-
}
|
|
37449
|
-
}
|
|
37450
|
-
}
|
|
37451
|
-
return false;
|
|
37452
|
-
}
|
|
37453
|
-
function redactProperty(name, value) {
|
|
37454
|
-
if (value === undefined || value === null) {
|
|
37455
|
-
return;
|
|
37456
|
-
}
|
|
37457
|
-
if (isSensitiveName(name)) {
|
|
37458
|
-
return REDACTED;
|
|
37459
|
-
}
|
|
37460
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
37461
|
-
return value;
|
|
37462
|
-
}
|
|
37463
|
-
if (typeof value !== "string") {
|
|
37464
|
-
return "[OBJECT]";
|
|
37465
|
-
}
|
|
37466
|
-
return redactValueDetectors(value);
|
|
37467
|
-
}
|
|
37468
|
-
function redactProperties(properties) {
|
|
37469
|
-
const out = {};
|
|
37470
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
37471
|
-
const redacted = redactProperty(name, value);
|
|
37472
|
-
if (redacted !== undefined) {
|
|
37473
|
-
out[name] = redacted;
|
|
37474
|
-
}
|
|
37475
|
-
}
|
|
37476
|
-
return out;
|
|
37477
|
-
}
|
|
37478
|
-
|
|
37479
37583
|
// ../common/src/trackedAction.ts
|
|
37480
37584
|
var pollSignalSlot = singleton("PollSignal");
|
|
37481
37585
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
37482
37586
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
37587
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
37483
37588
|
var processContext = {
|
|
37484
37589
|
exit: (code) => {
|
|
37485
37590
|
process.exitCode = code;
|
|
@@ -37490,22 +37595,18 @@ var processContext = {
|
|
|
37490
37595
|
};
|
|
37491
37596
|
function extractCommandParams(cmd) {
|
|
37492
37597
|
const params = {};
|
|
37598
|
+
const add2 = (name, value) => {
|
|
37599
|
+
if (name && value !== undefined) {
|
|
37600
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
37601
|
+
}
|
|
37602
|
+
};
|
|
37493
37603
|
const registered = cmd.registeredArguments ?? [];
|
|
37494
37604
|
const processed = cmd.processedArgs ?? [];
|
|
37495
37605
|
for (let i = 0;i < registered.length; i++) {
|
|
37496
|
-
|
|
37497
|
-
if (value === undefined) {
|
|
37498
|
-
continue;
|
|
37499
|
-
}
|
|
37500
|
-
const name = registered[i].name();
|
|
37501
|
-
if (name) {
|
|
37502
|
-
params[name] = value;
|
|
37503
|
-
}
|
|
37606
|
+
add2(registered[i].name(), processed[i]);
|
|
37504
37607
|
}
|
|
37505
37608
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
37506
|
-
|
|
37507
|
-
params[key] = value;
|
|
37508
|
-
}
|
|
37609
|
+
add2(key, value);
|
|
37509
37610
|
}
|
|
37510
37611
|
return params;
|
|
37511
37612
|
}
|
|
@@ -37548,11 +37649,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
37548
37649
|
return this.action(async (...args) => {
|
|
37549
37650
|
const telemetryName = deriveCommandPath(command);
|
|
37550
37651
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
37652
|
+
const requestContext = telemetry.createRequestContext();
|
|
37551
37653
|
const startTime = performance.now();
|
|
37552
37654
|
let errorMessage;
|
|
37553
37655
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
37554
37656
|
clearRecordedCommandFailureTelemetry();
|
|
37555
|
-
const [error] = await catchError(fn(...args));
|
|
37657
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
37556
37658
|
if (error) {
|
|
37557
37659
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
37558
37660
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -37588,16 +37690,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
37588
37690
|
recordedFailure,
|
|
37589
37691
|
pollSignal: context.pollSignal
|
|
37590
37692
|
});
|
|
37591
|
-
|
|
37592
|
-
|
|
37693
|
+
const commandParams = extractCommandParams(command);
|
|
37694
|
+
if (props) {
|
|
37695
|
+
for (const key of Object.keys(props)) {
|
|
37696
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
37697
|
+
}
|
|
37698
|
+
}
|
|
37699
|
+
const baseProperties = redactProperties({
|
|
37700
|
+
...commandParams,
|
|
37593
37701
|
...props,
|
|
37594
37702
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
37595
37703
|
command: "true",
|
|
37596
|
-
duration: String(durationMs),
|
|
37597
|
-
success: String(success),
|
|
37598
37704
|
...terminalTelemetry,
|
|
37599
37705
|
...errorMessage ? { errorMessage } : {}
|
|
37600
|
-
})
|
|
37706
|
+
});
|
|
37707
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
37601
37708
|
});
|
|
37602
37709
|
};
|
|
37603
37710
|
|
|
@@ -57962,4 +58069,4 @@ export {
|
|
|
57962
58069
|
metadata
|
|
57963
58070
|
};
|
|
57964
58071
|
|
|
57965
|
-
//# debugId=
|
|
58072
|
+
//# debugId=F86AD42FBB0109B064756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/test-manager-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0-preview.
|
|
4
|
+
"version": "1.199.0-preview.97",
|
|
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": "087ae21e842f27bde5eb0013892c9487bfe60568"
|
|
30
30
|
}
|