@uipath/maestro-sdk 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/index.js +257 -150
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -54526,11 +54526,36 @@ class NodeContextStorage {
|
|
|
54526
54526
|
return this.storage.getStore();
|
|
54527
54527
|
}
|
|
54528
54528
|
}
|
|
54529
|
+
// ../common/src/telemetry/trace-context.ts
|
|
54530
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
54531
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
54532
|
+
function getProcessEnv() {
|
|
54533
|
+
return globalThis.process?.env;
|
|
54534
|
+
}
|
|
54535
|
+
function parseInboundTraceparent(value) {
|
|
54536
|
+
if (!value) {
|
|
54537
|
+
return;
|
|
54538
|
+
}
|
|
54539
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
54540
|
+
if (!match) {
|
|
54541
|
+
return;
|
|
54542
|
+
}
|
|
54543
|
+
const [, traceId, parentSpanId] = match;
|
|
54544
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
54545
|
+
return;
|
|
54546
|
+
}
|
|
54547
|
+
return { traceId, parentSpanId };
|
|
54548
|
+
}
|
|
54549
|
+
function getInboundTraceContext() {
|
|
54550
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
54551
|
+
}
|
|
54552
|
+
|
|
54529
54553
|
// ../common/src/telemetry/session-id.ts
|
|
54530
54554
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
54531
54555
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
54532
54556
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
54533
|
-
|
|
54557
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
54558
|
+
function getProcessEnv2() {
|
|
54534
54559
|
return globalThis.process?.env;
|
|
54535
54560
|
}
|
|
54536
54561
|
function normalizeSessionId(value) {
|
|
@@ -54541,18 +54566,165 @@ function normalizeSessionId(value) {
|
|
|
54541
54566
|
return trimmed || undefined;
|
|
54542
54567
|
}
|
|
54543
54568
|
function getConfiguredTelemetrySessionId() {
|
|
54544
|
-
return normalizeSessionId(
|
|
54569
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
54545
54570
|
}
|
|
54546
54571
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
54547
54572
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
54548
54573
|
}
|
|
54574
|
+
function getTelemetryOperationId() {
|
|
54575
|
+
const existing = telemetryOperationIdSlot.get();
|
|
54576
|
+
if (existing) {
|
|
54577
|
+
return existing;
|
|
54578
|
+
}
|
|
54579
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
54580
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
54581
|
+
telemetryOperationIdSlot.set(generated);
|
|
54582
|
+
return generated;
|
|
54583
|
+
}
|
|
54549
54584
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
54550
54585
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
54551
54586
|
function getGlobalTelemetryProperties() {
|
|
54552
54587
|
return telemetryPropsSlot.get();
|
|
54553
54588
|
}
|
|
54554
54589
|
|
|
54590
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
54591
|
+
var REDACTED = "[REDACTED]";
|
|
54592
|
+
var MAX_VALUE_LENGTH = 200;
|
|
54593
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
54594
|
+
"token",
|
|
54595
|
+
"tokens",
|
|
54596
|
+
"secret",
|
|
54597
|
+
"secrets",
|
|
54598
|
+
"password",
|
|
54599
|
+
"passwords",
|
|
54600
|
+
"pwd",
|
|
54601
|
+
"credential",
|
|
54602
|
+
"credentials",
|
|
54603
|
+
"auth",
|
|
54604
|
+
"authentication",
|
|
54605
|
+
"authorization",
|
|
54606
|
+
"authority",
|
|
54607
|
+
"cert",
|
|
54608
|
+
"certificate",
|
|
54609
|
+
"certificates"
|
|
54610
|
+
]);
|
|
54611
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
54612
|
+
"api",
|
|
54613
|
+
"access",
|
|
54614
|
+
"client",
|
|
54615
|
+
"private",
|
|
54616
|
+
"public",
|
|
54617
|
+
"signing",
|
|
54618
|
+
"encryption",
|
|
54619
|
+
"session",
|
|
54620
|
+
"master",
|
|
54621
|
+
"shared",
|
|
54622
|
+
"root",
|
|
54623
|
+
"ssh",
|
|
54624
|
+
"rsa",
|
|
54625
|
+
"aes",
|
|
54626
|
+
"hmac",
|
|
54627
|
+
"oauth"
|
|
54628
|
+
]);
|
|
54629
|
+
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;
|
|
54630
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
54631
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
54632
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
54633
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
54634
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
54635
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
54636
|
+
function shortHash(input) {
|
|
54637
|
+
let hash = 2166136261;
|
|
54638
|
+
for (let i = 0;i < input.length; i++) {
|
|
54639
|
+
hash ^= input.charCodeAt(i);
|
|
54640
|
+
hash = Math.imul(hash, 16777619);
|
|
54641
|
+
}
|
|
54642
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
54643
|
+
}
|
|
54644
|
+
function redactUrl(raw) {
|
|
54645
|
+
try {
|
|
54646
|
+
const url = new URL(raw);
|
|
54647
|
+
return `${url.protocol}//${url.host}`;
|
|
54648
|
+
} catch {
|
|
54649
|
+
return `url#${shortHash(raw)}`;
|
|
54650
|
+
}
|
|
54651
|
+
}
|
|
54652
|
+
function redactValueDetectors(value) {
|
|
54653
|
+
let out = value;
|
|
54654
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
54655
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
54656
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
54657
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
54658
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
54659
|
+
});
|
|
54660
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
54661
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
54662
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
54663
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
54664
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
54665
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
54666
|
+
}
|
|
54667
|
+
return out;
|
|
54668
|
+
}
|
|
54669
|
+
function redactValue(value) {
|
|
54670
|
+
return redactValueDetectors(value);
|
|
54671
|
+
}
|
|
54672
|
+
function redactError(error) {
|
|
54673
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
54674
|
+
safe.name = error.name;
|
|
54675
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
54676
|
+
return safe;
|
|
54677
|
+
}
|
|
54678
|
+
function nameTokens(name) {
|
|
54679
|
+
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);
|
|
54680
|
+
}
|
|
54681
|
+
function isSensitiveName(name) {
|
|
54682
|
+
const tokens = nameTokens(name);
|
|
54683
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
54684
|
+
const token = tokens[i];
|
|
54685
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
54686
|
+
return true;
|
|
54687
|
+
}
|
|
54688
|
+
if (token === "key" || token === "keys") {
|
|
54689
|
+
const prev = tokens[i - 1];
|
|
54690
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
54691
|
+
return true;
|
|
54692
|
+
}
|
|
54693
|
+
}
|
|
54694
|
+
}
|
|
54695
|
+
return false;
|
|
54696
|
+
}
|
|
54697
|
+
function redactProperty(name, value) {
|
|
54698
|
+
if (value === undefined || value === null) {
|
|
54699
|
+
return;
|
|
54700
|
+
}
|
|
54701
|
+
if (isSensitiveName(name)) {
|
|
54702
|
+
return REDACTED;
|
|
54703
|
+
}
|
|
54704
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
54705
|
+
return value;
|
|
54706
|
+
}
|
|
54707
|
+
if (typeof value !== "string") {
|
|
54708
|
+
return "[OBJECT]";
|
|
54709
|
+
}
|
|
54710
|
+
return redactValueDetectors(value);
|
|
54711
|
+
}
|
|
54712
|
+
function redactProperties(properties) {
|
|
54713
|
+
const out = {};
|
|
54714
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
54715
|
+
const redacted = redactProperty(name, value);
|
|
54716
|
+
if (redacted !== undefined) {
|
|
54717
|
+
out[name] = redacted;
|
|
54718
|
+
}
|
|
54719
|
+
}
|
|
54720
|
+
return out;
|
|
54721
|
+
}
|
|
54722
|
+
|
|
54555
54723
|
// ../common/src/telemetry/telemetry-service.ts
|
|
54724
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
54725
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
54726
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
54727
|
+
|
|
54556
54728
|
class TelemetryService {
|
|
54557
54729
|
telemetryProvider;
|
|
54558
54730
|
contextStorage;
|
|
@@ -54579,11 +54751,15 @@ class TelemetryService {
|
|
|
54579
54751
|
trackException(error, properties) {
|
|
54580
54752
|
const context = this.getCurrentContext();
|
|
54581
54753
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
54582
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
54754
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
54583
54755
|
}
|
|
54584
54756
|
async trackRequest(name, fn, properties) {
|
|
54757
|
+
const parentContext = this.getCurrentContext();
|
|
54758
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
54759
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
54585
54760
|
const context = {
|
|
54586
|
-
operationId
|
|
54761
|
+
operationId,
|
|
54762
|
+
...parentId !== undefined ? { parentId } : {},
|
|
54587
54763
|
id: this.generateId()
|
|
54588
54764
|
};
|
|
54589
54765
|
const startTime = performance.now();
|
|
@@ -54601,6 +54777,45 @@ class TelemetryService {
|
|
|
54601
54777
|
throw error;
|
|
54602
54778
|
}
|
|
54603
54779
|
}
|
|
54780
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
54781
|
+
const requestContext = context ?? {
|
|
54782
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
54783
|
+
id: this.generateId()
|
|
54784
|
+
};
|
|
54785
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
54786
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
54787
|
+
}
|
|
54788
|
+
createRequestContext() {
|
|
54789
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
54790
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
54791
|
+
return {
|
|
54792
|
+
operationId,
|
|
54793
|
+
...parentId !== undefined ? { parentId } : {},
|
|
54794
|
+
id: this.generateId()
|
|
54795
|
+
};
|
|
54796
|
+
}
|
|
54797
|
+
inboundParentIdFor(operationId) {
|
|
54798
|
+
const inbound = getInboundTraceContext();
|
|
54799
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
54800
|
+
}
|
|
54801
|
+
runWithContext(context, fn) {
|
|
54802
|
+
return this.contextStorage.run(context, fn);
|
|
54803
|
+
}
|
|
54804
|
+
createDependencyContext() {
|
|
54805
|
+
const parentContext = this.getCurrentContext();
|
|
54806
|
+
if (!parentContext) {
|
|
54807
|
+
return;
|
|
54808
|
+
}
|
|
54809
|
+
return {
|
|
54810
|
+
operationId: parentContext.operationId,
|
|
54811
|
+
parentId: parentContext.id,
|
|
54812
|
+
id: this.generateId()
|
|
54813
|
+
};
|
|
54814
|
+
}
|
|
54815
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
54816
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
54817
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
54818
|
+
}
|
|
54604
54819
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
54605
54820
|
const parentContext = this.getCurrentContext();
|
|
54606
54821
|
if (!parentContext) {
|
|
@@ -54637,8 +54852,12 @@ class TelemetryService {
|
|
|
54637
54852
|
...getExecutionContextTelemetryProperties(),
|
|
54638
54853
|
...globalProperties,
|
|
54639
54854
|
...this.defaultProperties,
|
|
54640
|
-
...properties,
|
|
54641
|
-
...context
|
|
54855
|
+
...redactProperties(properties ?? {}),
|
|
54856
|
+
...context ? {
|
|
54857
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
54858
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
54859
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
54860
|
+
} : {}
|
|
54642
54861
|
};
|
|
54643
54862
|
if (sessionId === undefined) {
|
|
54644
54863
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -54648,7 +54867,16 @@ class TelemetryService {
|
|
|
54648
54867
|
return enriched;
|
|
54649
54868
|
}
|
|
54650
54869
|
generateId() {
|
|
54651
|
-
|
|
54870
|
+
const bytes = new Uint8Array(8);
|
|
54871
|
+
let hex = "";
|
|
54872
|
+
do {
|
|
54873
|
+
crypto.getRandomValues(bytes);
|
|
54874
|
+
hex = "";
|
|
54875
|
+
for (const byte of bytes) {
|
|
54876
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
54877
|
+
}
|
|
54878
|
+
} while (/^0+$/.test(hex));
|
|
54879
|
+
return hex;
|
|
54652
54880
|
}
|
|
54653
54881
|
}
|
|
54654
54882
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -55350,134 +55578,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
55350
55578
|
};
|
|
55351
55579
|
}
|
|
55352
55580
|
|
|
55353
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
55354
|
-
var REDACTED = "[REDACTED]";
|
|
55355
|
-
var MAX_VALUE_LENGTH = 200;
|
|
55356
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
55357
|
-
"token",
|
|
55358
|
-
"tokens",
|
|
55359
|
-
"secret",
|
|
55360
|
-
"secrets",
|
|
55361
|
-
"password",
|
|
55362
|
-
"passwords",
|
|
55363
|
-
"pwd",
|
|
55364
|
-
"credential",
|
|
55365
|
-
"credentials",
|
|
55366
|
-
"auth",
|
|
55367
|
-
"authentication",
|
|
55368
|
-
"authorization",
|
|
55369
|
-
"authority",
|
|
55370
|
-
"cert",
|
|
55371
|
-
"certificate",
|
|
55372
|
-
"certificates"
|
|
55373
|
-
]);
|
|
55374
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
55375
|
-
"api",
|
|
55376
|
-
"access",
|
|
55377
|
-
"client",
|
|
55378
|
-
"private",
|
|
55379
|
-
"public",
|
|
55380
|
-
"signing",
|
|
55381
|
-
"encryption",
|
|
55382
|
-
"session",
|
|
55383
|
-
"master",
|
|
55384
|
-
"shared",
|
|
55385
|
-
"root",
|
|
55386
|
-
"ssh",
|
|
55387
|
-
"rsa",
|
|
55388
|
-
"aes",
|
|
55389
|
-
"hmac",
|
|
55390
|
-
"oauth"
|
|
55391
|
-
]);
|
|
55392
|
-
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;
|
|
55393
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
55394
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
55395
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
55396
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
55397
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
55398
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
55399
|
-
function shortHash(input) {
|
|
55400
|
-
let hash = 2166136261;
|
|
55401
|
-
for (let i = 0;i < input.length; i++) {
|
|
55402
|
-
hash ^= input.charCodeAt(i);
|
|
55403
|
-
hash = Math.imul(hash, 16777619);
|
|
55404
|
-
}
|
|
55405
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
55406
|
-
}
|
|
55407
|
-
function redactUrl(raw) {
|
|
55408
|
-
try {
|
|
55409
|
-
const url = new URL(raw);
|
|
55410
|
-
return `${url.protocol}//${url.host}`;
|
|
55411
|
-
} catch {
|
|
55412
|
-
return `url#${shortHash(raw)}`;
|
|
55413
|
-
}
|
|
55414
|
-
}
|
|
55415
|
-
function redactValueDetectors(value) {
|
|
55416
|
-
let out = value;
|
|
55417
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
55418
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
55419
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
55420
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
55421
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
55422
|
-
});
|
|
55423
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
55424
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
55425
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
55426
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
55427
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
55428
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
55429
|
-
}
|
|
55430
|
-
return out;
|
|
55431
|
-
}
|
|
55432
|
-
function nameTokens(name) {
|
|
55433
|
-
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);
|
|
55434
|
-
}
|
|
55435
|
-
function isSensitiveName(name) {
|
|
55436
|
-
const tokens = nameTokens(name);
|
|
55437
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
55438
|
-
const token = tokens[i];
|
|
55439
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
55440
|
-
return true;
|
|
55441
|
-
}
|
|
55442
|
-
if (token === "key" || token === "keys") {
|
|
55443
|
-
const prev = tokens[i - 1];
|
|
55444
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
55445
|
-
return true;
|
|
55446
|
-
}
|
|
55447
|
-
}
|
|
55448
|
-
}
|
|
55449
|
-
return false;
|
|
55450
|
-
}
|
|
55451
|
-
function redactProperty(name, value) {
|
|
55452
|
-
if (value === undefined || value === null) {
|
|
55453
|
-
return;
|
|
55454
|
-
}
|
|
55455
|
-
if (isSensitiveName(name)) {
|
|
55456
|
-
return REDACTED;
|
|
55457
|
-
}
|
|
55458
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
55459
|
-
return value;
|
|
55460
|
-
}
|
|
55461
|
-
if (typeof value !== "string") {
|
|
55462
|
-
return "[OBJECT]";
|
|
55463
|
-
}
|
|
55464
|
-
return redactValueDetectors(value);
|
|
55465
|
-
}
|
|
55466
|
-
function redactProperties(properties) {
|
|
55467
|
-
const out = {};
|
|
55468
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
55469
|
-
const redacted = redactProperty(name, value);
|
|
55470
|
-
if (redacted !== undefined) {
|
|
55471
|
-
out[name] = redacted;
|
|
55472
|
-
}
|
|
55473
|
-
}
|
|
55474
|
-
return out;
|
|
55475
|
-
}
|
|
55476
|
-
|
|
55477
55581
|
// ../common/src/trackedAction.ts
|
|
55478
55582
|
var pollSignalSlot = singleton("PollSignal");
|
|
55479
55583
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
55480
55584
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
55585
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
55481
55586
|
var processContext = {
|
|
55482
55587
|
exit: (code) => {
|
|
55483
55588
|
process.exitCode = code;
|
|
@@ -55488,22 +55593,18 @@ var processContext = {
|
|
|
55488
55593
|
};
|
|
55489
55594
|
function extractCommandParams(cmd) {
|
|
55490
55595
|
const params = {};
|
|
55596
|
+
const add2 = (name, value) => {
|
|
55597
|
+
if (name && value !== undefined) {
|
|
55598
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
55599
|
+
}
|
|
55600
|
+
};
|
|
55491
55601
|
const registered = cmd.registeredArguments ?? [];
|
|
55492
55602
|
const processed = cmd.processedArgs ?? [];
|
|
55493
55603
|
for (let i = 0;i < registered.length; i++) {
|
|
55494
|
-
|
|
55495
|
-
if (value === undefined) {
|
|
55496
|
-
continue;
|
|
55497
|
-
}
|
|
55498
|
-
const name = registered[i].name();
|
|
55499
|
-
if (name) {
|
|
55500
|
-
params[name] = value;
|
|
55501
|
-
}
|
|
55604
|
+
add2(registered[i].name(), processed[i]);
|
|
55502
55605
|
}
|
|
55503
55606
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
55504
|
-
|
|
55505
|
-
params[key] = value;
|
|
55506
|
-
}
|
|
55607
|
+
add2(key, value);
|
|
55507
55608
|
}
|
|
55508
55609
|
return params;
|
|
55509
55610
|
}
|
|
@@ -55546,11 +55647,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
55546
55647
|
return this.action(async (...args) => {
|
|
55547
55648
|
const telemetryName = deriveCommandPath(command);
|
|
55548
55649
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
55650
|
+
const requestContext = telemetry.createRequestContext();
|
|
55549
55651
|
const startTime = performance.now();
|
|
55550
55652
|
let errorMessage;
|
|
55551
55653
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
55552
55654
|
clearRecordedCommandFailureTelemetry();
|
|
55553
|
-
const [error] = await catchError(fn(...args));
|
|
55655
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
55554
55656
|
if (error) {
|
|
55555
55657
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
55556
55658
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -55586,16 +55688,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
55586
55688
|
recordedFailure,
|
|
55587
55689
|
pollSignal: context.pollSignal
|
|
55588
55690
|
});
|
|
55589
|
-
|
|
55590
|
-
|
|
55691
|
+
const commandParams = extractCommandParams(command);
|
|
55692
|
+
if (props) {
|
|
55693
|
+
for (const key of Object.keys(props)) {
|
|
55694
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
55695
|
+
}
|
|
55696
|
+
}
|
|
55697
|
+
const baseProperties = redactProperties({
|
|
55698
|
+
...commandParams,
|
|
55591
55699
|
...props,
|
|
55592
55700
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
55593
55701
|
command: "true",
|
|
55594
|
-
duration: String(durationMs),
|
|
55595
|
-
success: String(success),
|
|
55596
55702
|
...terminalTelemetry,
|
|
55597
55703
|
...errorMessage ? { errorMessage } : {}
|
|
55598
|
-
})
|
|
55704
|
+
});
|
|
55705
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
55599
55706
|
});
|
|
55600
55707
|
};
|
|
55601
55708
|
// ../common/src/console-guard.ts
|
|
@@ -122289,7 +122396,7 @@ class TextApiResponse {
|
|
|
122289
122396
|
var package_default = {
|
|
122290
122397
|
name: "@uipath/integrationservice-sdk",
|
|
122291
122398
|
license: "MIT",
|
|
122292
|
-
version: "1.198.0
|
|
122399
|
+
version: "1.198.0",
|
|
122293
122400
|
repository: {
|
|
122294
122401
|
type: "git",
|
|
122295
122402
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -134024,4 +134131,4 @@ export {
|
|
|
134024
134131
|
BPMN_SPEC
|
|
134025
134132
|
};
|
|
134026
134133
|
|
|
134027
|
-
//# debugId=
|
|
134134
|
+
//# debugId=DEB192BB8D6EEE4664756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-sdk",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.198.0
|
|
4
|
+
"version": "1.198.0",
|
|
5
5
|
"description": "SDK for the UiPath Maestro (PIMS) API — process instance management.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"files": [
|
|
43
43
|
"dist"
|
|
44
44
|
],
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "1fadf03d7a8dd102742571dff569fdac11808afb"
|
|
46
46
|
}
|