@uipath/maestro-tool 1.198.0-preview.95 → 1.198.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/packager-tool.js +2 -2
- package/dist/tool.js +766 -452
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -28670,10 +28670,36 @@ class NodeContextStorage {
|
|
|
28670
28670
|
}
|
|
28671
28671
|
var init_node_context_storage = () => {};
|
|
28672
28672
|
|
|
28673
|
-
// ../common/src/telemetry/
|
|
28673
|
+
// ../common/src/telemetry/trace-context.ts
|
|
28674
28674
|
function getProcessEnv() {
|
|
28675
28675
|
return globalThis.process?.env;
|
|
28676
28676
|
}
|
|
28677
|
+
function parseInboundTraceparent(value) {
|
|
28678
|
+
if (!value) {
|
|
28679
|
+
return;
|
|
28680
|
+
}
|
|
28681
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
28682
|
+
if (!match) {
|
|
28683
|
+
return;
|
|
28684
|
+
}
|
|
28685
|
+
const [, traceId, parentSpanId] = match;
|
|
28686
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
28687
|
+
return;
|
|
28688
|
+
}
|
|
28689
|
+
return { traceId, parentSpanId };
|
|
28690
|
+
}
|
|
28691
|
+
function getInboundTraceContext() {
|
|
28692
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
28693
|
+
}
|
|
28694
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT", TRACEPARENT_PATTERN;
|
|
28695
|
+
var init_trace_context = __esm(() => {
|
|
28696
|
+
TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
28697
|
+
});
|
|
28698
|
+
|
|
28699
|
+
// ../common/src/telemetry/session-id.ts
|
|
28700
|
+
function getProcessEnv2() {
|
|
28701
|
+
return globalThis.process?.env;
|
|
28702
|
+
}
|
|
28677
28703
|
function normalizeSessionId(value) {
|
|
28678
28704
|
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
28679
28705
|
return;
|
|
@@ -28682,15 +28708,27 @@ function normalizeSessionId(value) {
|
|
|
28682
28708
|
return trimmed || undefined;
|
|
28683
28709
|
}
|
|
28684
28710
|
function getConfiguredTelemetrySessionId() {
|
|
28685
|
-
return normalizeSessionId(
|
|
28711
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
28686
28712
|
}
|
|
28687
28713
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
28688
28714
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
28689
28715
|
}
|
|
28690
|
-
|
|
28716
|
+
function getTelemetryOperationId() {
|
|
28717
|
+
const existing = telemetryOperationIdSlot.get();
|
|
28718
|
+
if (existing) {
|
|
28719
|
+
return existing;
|
|
28720
|
+
}
|
|
28721
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
28722
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
28723
|
+
telemetryOperationIdSlot.set(generated);
|
|
28724
|
+
return generated;
|
|
28725
|
+
}
|
|
28726
|
+
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY = "session_id", telemetrySessionIdSlot, telemetryOperationIdSlot;
|
|
28691
28727
|
var init_session_id = __esm(() => {
|
|
28692
28728
|
init_singleton();
|
|
28729
|
+
init_trace_context();
|
|
28693
28730
|
telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
28731
|
+
telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
28694
28732
|
});
|
|
28695
28733
|
|
|
28696
28734
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
@@ -28703,6 +28741,140 @@ var init_global_telemetry_properties = __esm(() => {
|
|
|
28703
28741
|
telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
28704
28742
|
});
|
|
28705
28743
|
|
|
28744
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
28745
|
+
function shortHash(input) {
|
|
28746
|
+
let hash = 2166136261;
|
|
28747
|
+
for (let i = 0;i < input.length; i++) {
|
|
28748
|
+
hash ^= input.charCodeAt(i);
|
|
28749
|
+
hash = Math.imul(hash, 16777619);
|
|
28750
|
+
}
|
|
28751
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
28752
|
+
}
|
|
28753
|
+
function redactUrl(raw) {
|
|
28754
|
+
try {
|
|
28755
|
+
const url = new URL(raw);
|
|
28756
|
+
return `${url.protocol}//${url.host}`;
|
|
28757
|
+
} catch {
|
|
28758
|
+
return `url#${shortHash(raw)}`;
|
|
28759
|
+
}
|
|
28760
|
+
}
|
|
28761
|
+
function redactValueDetectors(value) {
|
|
28762
|
+
let out = value;
|
|
28763
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
28764
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
28765
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
28766
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
28767
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
28768
|
+
});
|
|
28769
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
28770
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
28771
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
28772
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
28773
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
28774
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
28775
|
+
}
|
|
28776
|
+
return out;
|
|
28777
|
+
}
|
|
28778
|
+
function redactValue(value) {
|
|
28779
|
+
return redactValueDetectors(value);
|
|
28780
|
+
}
|
|
28781
|
+
function redactError(error) {
|
|
28782
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
28783
|
+
safe.name = error.name;
|
|
28784
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
28785
|
+
return safe;
|
|
28786
|
+
}
|
|
28787
|
+
function nameTokens(name2) {
|
|
28788
|
+
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);
|
|
28789
|
+
}
|
|
28790
|
+
function isSensitiveName(name2) {
|
|
28791
|
+
const tokens = nameTokens(name2);
|
|
28792
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
28793
|
+
const token = tokens[i];
|
|
28794
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
28795
|
+
return true;
|
|
28796
|
+
}
|
|
28797
|
+
if (token === "key" || token === "keys") {
|
|
28798
|
+
const prev = tokens[i - 1];
|
|
28799
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
28800
|
+
return true;
|
|
28801
|
+
}
|
|
28802
|
+
}
|
|
28803
|
+
}
|
|
28804
|
+
return false;
|
|
28805
|
+
}
|
|
28806
|
+
function redactProperty(name2, value) {
|
|
28807
|
+
if (value === undefined || value === null) {
|
|
28808
|
+
return;
|
|
28809
|
+
}
|
|
28810
|
+
if (isSensitiveName(name2)) {
|
|
28811
|
+
return REDACTED;
|
|
28812
|
+
}
|
|
28813
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
28814
|
+
return value;
|
|
28815
|
+
}
|
|
28816
|
+
if (typeof value !== "string") {
|
|
28817
|
+
return "[OBJECT]";
|
|
28818
|
+
}
|
|
28819
|
+
return redactValueDetectors(value);
|
|
28820
|
+
}
|
|
28821
|
+
function redactProperties(properties) {
|
|
28822
|
+
const out = {};
|
|
28823
|
+
for (const [name2, value] of Object.entries(properties)) {
|
|
28824
|
+
const redacted = redactProperty(name2, value);
|
|
28825
|
+
if (redacted !== undefined) {
|
|
28826
|
+
out[name2] = redacted;
|
|
28827
|
+
}
|
|
28828
|
+
}
|
|
28829
|
+
return out;
|
|
28830
|
+
}
|
|
28831
|
+
var REDACTED = "[REDACTED]", MAX_VALUE_LENGTH = 200, SENSITIVE_NAME_TOKENS, SENSITIVE_KEY_PREFIXES, UUID_PATTERN, EMAIL_PATTERN, JWT_PATTERN, LONG_TOKEN_PATTERN, USER_HOME_PATTERN, URL_PATTERN, URL_TRAILING_PUNCT;
|
|
28832
|
+
var init_pii_redactor = __esm(() => {
|
|
28833
|
+
SENSITIVE_NAME_TOKENS = new Set([
|
|
28834
|
+
"token",
|
|
28835
|
+
"tokens",
|
|
28836
|
+
"secret",
|
|
28837
|
+
"secrets",
|
|
28838
|
+
"password",
|
|
28839
|
+
"passwords",
|
|
28840
|
+
"pwd",
|
|
28841
|
+
"credential",
|
|
28842
|
+
"credentials",
|
|
28843
|
+
"auth",
|
|
28844
|
+
"authentication",
|
|
28845
|
+
"authorization",
|
|
28846
|
+
"authority",
|
|
28847
|
+
"cert",
|
|
28848
|
+
"certificate",
|
|
28849
|
+
"certificates"
|
|
28850
|
+
]);
|
|
28851
|
+
SENSITIVE_KEY_PREFIXES = new Set([
|
|
28852
|
+
"api",
|
|
28853
|
+
"access",
|
|
28854
|
+
"client",
|
|
28855
|
+
"private",
|
|
28856
|
+
"public",
|
|
28857
|
+
"signing",
|
|
28858
|
+
"encryption",
|
|
28859
|
+
"session",
|
|
28860
|
+
"master",
|
|
28861
|
+
"shared",
|
|
28862
|
+
"root",
|
|
28863
|
+
"ssh",
|
|
28864
|
+
"rsa",
|
|
28865
|
+
"aes",
|
|
28866
|
+
"hmac",
|
|
28867
|
+
"oauth"
|
|
28868
|
+
]);
|
|
28869
|
+
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;
|
|
28870
|
+
EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
28871
|
+
JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
28872
|
+
LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
28873
|
+
USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
28874
|
+
URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
28875
|
+
URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
28876
|
+
});
|
|
28877
|
+
|
|
28706
28878
|
// ../common/src/telemetry/telemetry-service.ts
|
|
28707
28879
|
class TelemetryService {
|
|
28708
28880
|
telemetryProvider;
|
|
@@ -28730,11 +28902,15 @@ class TelemetryService {
|
|
|
28730
28902
|
trackException(error, properties) {
|
|
28731
28903
|
const context = this.getCurrentContext();
|
|
28732
28904
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
28733
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
28905
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
28734
28906
|
}
|
|
28735
28907
|
async trackRequest(name2, fn, properties) {
|
|
28908
|
+
const parentContext = this.getCurrentContext();
|
|
28909
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
28910
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
28736
28911
|
const context = {
|
|
28737
|
-
operationId
|
|
28912
|
+
operationId,
|
|
28913
|
+
...parentId !== undefined ? { parentId } : {},
|
|
28738
28914
|
id: this.generateId()
|
|
28739
28915
|
};
|
|
28740
28916
|
const startTime = performance.now();
|
|
@@ -28752,6 +28928,45 @@ class TelemetryService {
|
|
|
28752
28928
|
throw error;
|
|
28753
28929
|
}
|
|
28754
28930
|
}
|
|
28931
|
+
trackRequestResult(name2, durationMs, success, properties, context) {
|
|
28932
|
+
const requestContext = context ?? {
|
|
28933
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
28934
|
+
id: this.generateId()
|
|
28935
|
+
};
|
|
28936
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
28937
|
+
this.telemetryProvider.trackRequest(name2, durationMs, success, enrichedProperties);
|
|
28938
|
+
}
|
|
28939
|
+
createRequestContext() {
|
|
28940
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
28941
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
28942
|
+
return {
|
|
28943
|
+
operationId,
|
|
28944
|
+
...parentId !== undefined ? { parentId } : {},
|
|
28945
|
+
id: this.generateId()
|
|
28946
|
+
};
|
|
28947
|
+
}
|
|
28948
|
+
inboundParentIdFor(operationId) {
|
|
28949
|
+
const inbound = getInboundTraceContext();
|
|
28950
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
28951
|
+
}
|
|
28952
|
+
runWithContext(context, fn) {
|
|
28953
|
+
return this.contextStorage.run(context, fn);
|
|
28954
|
+
}
|
|
28955
|
+
createDependencyContext() {
|
|
28956
|
+
const parentContext = this.getCurrentContext();
|
|
28957
|
+
if (!parentContext) {
|
|
28958
|
+
return;
|
|
28959
|
+
}
|
|
28960
|
+
return {
|
|
28961
|
+
operationId: parentContext.operationId,
|
|
28962
|
+
parentId: parentContext.id,
|
|
28963
|
+
id: this.generateId()
|
|
28964
|
+
};
|
|
28965
|
+
}
|
|
28966
|
+
trackDependencyResult(name2, type2, durationMs, success, properties, context, resultCode) {
|
|
28967
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
28968
|
+
this.telemetryProvider.trackDependency(redactValue(name2), type2, durationMs, success, enrichedProperties, resultCode);
|
|
28969
|
+
}
|
|
28755
28970
|
async trackDependencyOperation(name2, type2, fn, properties) {
|
|
28756
28971
|
const parentContext = this.getCurrentContext();
|
|
28757
28972
|
if (!parentContext) {
|
|
@@ -28788,8 +29003,12 @@ class TelemetryService {
|
|
|
28788
29003
|
...getExecutionContextTelemetryProperties(),
|
|
28789
29004
|
...globalProperties,
|
|
28790
29005
|
...this.defaultProperties,
|
|
28791
|
-
...properties,
|
|
28792
|
-
...context
|
|
29006
|
+
...redactProperties(properties ?? {}),
|
|
29007
|
+
...context ? {
|
|
29008
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
29009
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
29010
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
29011
|
+
} : {}
|
|
28793
29012
|
};
|
|
28794
29013
|
if (sessionId === undefined) {
|
|
28795
29014
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -28799,13 +29018,30 @@ class TelemetryService {
|
|
|
28799
29018
|
return enriched;
|
|
28800
29019
|
}
|
|
28801
29020
|
generateId() {
|
|
28802
|
-
|
|
29021
|
+
const bytes = new Uint8Array(8);
|
|
29022
|
+
let hex = "";
|
|
29023
|
+
do {
|
|
29024
|
+
crypto.getRandomValues(bytes);
|
|
29025
|
+
hex = "";
|
|
29026
|
+
for (const byte of bytes) {
|
|
29027
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
29028
|
+
}
|
|
29029
|
+
} while (/^0+$/.test(hex));
|
|
29030
|
+
return hex;
|
|
28803
29031
|
}
|
|
28804
29032
|
}
|
|
29033
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id", TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id", TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
28805
29034
|
var init_telemetry_service = __esm(() => {
|
|
28806
29035
|
init_execution_context();
|
|
28807
29036
|
init_global_telemetry_properties();
|
|
29037
|
+
init_pii_redactor();
|
|
28808
29038
|
init_session_id();
|
|
29039
|
+
init_trace_context();
|
|
29040
|
+
});
|
|
29041
|
+
|
|
29042
|
+
// ../common/src/telemetry/tracked-fetch.ts
|
|
29043
|
+
var init_tracked_fetch = __esm(() => {
|
|
29044
|
+
init_telemetry_init();
|
|
28809
29045
|
});
|
|
28810
29046
|
|
|
28811
29047
|
// ../common/src/telemetry/node.ts
|
|
@@ -28817,6 +29053,8 @@ var init_node2 = __esm(() => {
|
|
|
28817
29053
|
init_node_context_storage();
|
|
28818
29054
|
init_session_id();
|
|
28819
29055
|
init_telemetry_service();
|
|
29056
|
+
init_trace_context();
|
|
29057
|
+
init_tracked_fetch();
|
|
28820
29058
|
});
|
|
28821
29059
|
|
|
28822
29060
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -28826,6 +29064,7 @@ var init_node_appinsights_telemetry_provider = __esm(() => {
|
|
|
28826
29064
|
init_singleton();
|
|
28827
29065
|
init_global_telemetry_properties();
|
|
28828
29066
|
init_session_id();
|
|
29067
|
+
init_telemetry_service();
|
|
28829
29068
|
init_global_telemetry_properties();
|
|
28830
29069
|
providerSlot = singleton("TelemetryProvider");
|
|
28831
29070
|
});
|
|
@@ -29543,150 +29782,21 @@ var init_command_attribution = __esm(() => {
|
|
|
29543
29782
|
]).sort((a, b) => b.prefix.length - a.prefix.length);
|
|
29544
29783
|
});
|
|
29545
29784
|
|
|
29546
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
29547
|
-
function shortHash(input) {
|
|
29548
|
-
let hash = 2166136261;
|
|
29549
|
-
for (let i = 0;i < input.length; i++) {
|
|
29550
|
-
hash ^= input.charCodeAt(i);
|
|
29551
|
-
hash = Math.imul(hash, 16777619);
|
|
29552
|
-
}
|
|
29553
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
29554
|
-
}
|
|
29555
|
-
function redactUrl(raw) {
|
|
29556
|
-
try {
|
|
29557
|
-
const url = new URL(raw);
|
|
29558
|
-
return `${url.protocol}//${url.host}`;
|
|
29559
|
-
} catch {
|
|
29560
|
-
return `url#${shortHash(raw)}`;
|
|
29561
|
-
}
|
|
29562
|
-
}
|
|
29563
|
-
function redactValueDetectors(value) {
|
|
29564
|
-
let out = value;
|
|
29565
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
29566
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
29567
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
29568
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
29569
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
29570
|
-
});
|
|
29571
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
29572
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
29573
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
29574
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
29575
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
29576
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
29577
|
-
}
|
|
29578
|
-
return out;
|
|
29579
|
-
}
|
|
29580
|
-
function nameTokens(name2) {
|
|
29581
|
-
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);
|
|
29582
|
-
}
|
|
29583
|
-
function isSensitiveName(name2) {
|
|
29584
|
-
const tokens = nameTokens(name2);
|
|
29585
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
29586
|
-
const token = tokens[i];
|
|
29587
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
29588
|
-
return true;
|
|
29589
|
-
}
|
|
29590
|
-
if (token === "key" || token === "keys") {
|
|
29591
|
-
const prev = tokens[i - 1];
|
|
29592
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
29593
|
-
return true;
|
|
29594
|
-
}
|
|
29595
|
-
}
|
|
29596
|
-
}
|
|
29597
|
-
return false;
|
|
29598
|
-
}
|
|
29599
|
-
function redactProperty(name2, value) {
|
|
29600
|
-
if (value === undefined || value === null) {
|
|
29601
|
-
return;
|
|
29602
|
-
}
|
|
29603
|
-
if (isSensitiveName(name2)) {
|
|
29604
|
-
return REDACTED;
|
|
29605
|
-
}
|
|
29606
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
29607
|
-
return value;
|
|
29608
|
-
}
|
|
29609
|
-
if (typeof value !== "string") {
|
|
29610
|
-
return "[OBJECT]";
|
|
29611
|
-
}
|
|
29612
|
-
return redactValueDetectors(value);
|
|
29613
|
-
}
|
|
29614
|
-
function redactProperties(properties) {
|
|
29615
|
-
const out = {};
|
|
29616
|
-
for (const [name2, value] of Object.entries(properties)) {
|
|
29617
|
-
const redacted = redactProperty(name2, value);
|
|
29618
|
-
if (redacted !== undefined) {
|
|
29619
|
-
out[name2] = redacted;
|
|
29620
|
-
}
|
|
29621
|
-
}
|
|
29622
|
-
return out;
|
|
29623
|
-
}
|
|
29624
|
-
var REDACTED = "[REDACTED]", MAX_VALUE_LENGTH = 200, SENSITIVE_NAME_TOKENS, SENSITIVE_KEY_PREFIXES, UUID_PATTERN, EMAIL_PATTERN, JWT_PATTERN, LONG_TOKEN_PATTERN, USER_HOME_PATTERN, URL_PATTERN, URL_TRAILING_PUNCT;
|
|
29625
|
-
var init_pii_redactor = __esm(() => {
|
|
29626
|
-
SENSITIVE_NAME_TOKENS = new Set([
|
|
29627
|
-
"token",
|
|
29628
|
-
"tokens",
|
|
29629
|
-
"secret",
|
|
29630
|
-
"secrets",
|
|
29631
|
-
"password",
|
|
29632
|
-
"passwords",
|
|
29633
|
-
"pwd",
|
|
29634
|
-
"credential",
|
|
29635
|
-
"credentials",
|
|
29636
|
-
"auth",
|
|
29637
|
-
"authentication",
|
|
29638
|
-
"authorization",
|
|
29639
|
-
"authority",
|
|
29640
|
-
"cert",
|
|
29641
|
-
"certificate",
|
|
29642
|
-
"certificates"
|
|
29643
|
-
]);
|
|
29644
|
-
SENSITIVE_KEY_PREFIXES = new Set([
|
|
29645
|
-
"api",
|
|
29646
|
-
"access",
|
|
29647
|
-
"client",
|
|
29648
|
-
"private",
|
|
29649
|
-
"public",
|
|
29650
|
-
"signing",
|
|
29651
|
-
"encryption",
|
|
29652
|
-
"session",
|
|
29653
|
-
"master",
|
|
29654
|
-
"shared",
|
|
29655
|
-
"root",
|
|
29656
|
-
"ssh",
|
|
29657
|
-
"rsa",
|
|
29658
|
-
"aes",
|
|
29659
|
-
"hmac",
|
|
29660
|
-
"oauth"
|
|
29661
|
-
]);
|
|
29662
|
-
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;
|
|
29663
|
-
EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
29664
|
-
JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
29665
|
-
LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
29666
|
-
USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
29667
|
-
URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
29668
|
-
URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
29669
|
-
});
|
|
29670
|
-
|
|
29671
29785
|
// ../common/src/trackedAction.ts
|
|
29672
29786
|
function extractCommandParams(cmd) {
|
|
29673
29787
|
const params = {};
|
|
29788
|
+
const add2 = (name2, value) => {
|
|
29789
|
+
if (name2 && value !== undefined) {
|
|
29790
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name2}`] = value;
|
|
29791
|
+
}
|
|
29792
|
+
};
|
|
29674
29793
|
const registered = cmd.registeredArguments ?? [];
|
|
29675
29794
|
const processed = cmd.processedArgs ?? [];
|
|
29676
29795
|
for (let i = 0;i < registered.length; i++) {
|
|
29677
|
-
|
|
29678
|
-
if (value === undefined) {
|
|
29679
|
-
continue;
|
|
29680
|
-
}
|
|
29681
|
-
const name2 = registered[i].name();
|
|
29682
|
-
if (name2) {
|
|
29683
|
-
params[name2] = value;
|
|
29684
|
-
}
|
|
29796
|
+
add2(registered[i].name(), processed[i]);
|
|
29685
29797
|
}
|
|
29686
29798
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
29687
|
-
|
|
29688
|
-
params[key] = value;
|
|
29689
|
-
}
|
|
29799
|
+
add2(key, value);
|
|
29690
29800
|
}
|
|
29691
29801
|
return params;
|
|
29692
29802
|
}
|
|
@@ -29724,7 +29834,7 @@ function isPromptCancellation(error) {
|
|
|
29724
29834
|
function exitCodeFromProcess(fallback) {
|
|
29725
29835
|
return typeof process.exitCode === "number" ? process.exitCode : fallback;
|
|
29726
29836
|
}
|
|
29727
|
-
var pollSignalSlot, cliErrorCodeValues, retryHintValues, processContext;
|
|
29837
|
+
var pollSignalSlot, cliErrorCodeValues, retryHintValues, TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.", processContext;
|
|
29728
29838
|
var init_trackedAction = __esm(() => {
|
|
29729
29839
|
init_esm();
|
|
29730
29840
|
init_formatter();
|
|
@@ -29750,11 +29860,12 @@ var init_trackedAction = __esm(() => {
|
|
|
29750
29860
|
return this.action(async (...args) => {
|
|
29751
29861
|
const telemetryName = deriveCommandPath(command);
|
|
29752
29862
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
29863
|
+
const requestContext = telemetry.createRequestContext();
|
|
29753
29864
|
const startTime = performance.now();
|
|
29754
29865
|
let errorMessage2;
|
|
29755
29866
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
29756
29867
|
clearRecordedCommandFailureTelemetry();
|
|
29757
|
-
const [error] = await catchError2(fn(...args));
|
|
29868
|
+
const [error] = await catchError2(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
29758
29869
|
if (error) {
|
|
29759
29870
|
errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
29760
29871
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage2}`);
|
|
@@ -29790,16 +29901,21 @@ var init_trackedAction = __esm(() => {
|
|
|
29790
29901
|
recordedFailure,
|
|
29791
29902
|
pollSignal: context.pollSignal
|
|
29792
29903
|
});
|
|
29793
|
-
|
|
29794
|
-
|
|
29904
|
+
const commandParams = extractCommandParams(command);
|
|
29905
|
+
if (props) {
|
|
29906
|
+
for (const key of Object.keys(props)) {
|
|
29907
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
29908
|
+
}
|
|
29909
|
+
}
|
|
29910
|
+
const baseProperties = redactProperties({
|
|
29911
|
+
...commandParams,
|
|
29795
29912
|
...props,
|
|
29796
29913
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
29797
29914
|
command: "true",
|
|
29798
|
-
duration: String(durationMs),
|
|
29799
|
-
success: String(success),
|
|
29800
29915
|
...terminalTelemetry,
|
|
29801
29916
|
...errorMessage2 ? { errorMessage: errorMessage2 } : {}
|
|
29802
|
-
})
|
|
29917
|
+
});
|
|
29918
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
29803
29919
|
});
|
|
29804
29920
|
};
|
|
29805
29921
|
});
|
|
@@ -125455,7 +125571,7 @@ var init_package = __esm(() => {
|
|
|
125455
125571
|
package_default2 = {
|
|
125456
125572
|
name: "@uipath/integrationservice-sdk",
|
|
125457
125573
|
license: "MIT",
|
|
125458
|
-
version: "1.198.0
|
|
125574
|
+
version: "1.198.0",
|
|
125459
125575
|
repository: {
|
|
125460
125576
|
type: "git",
|
|
125461
125577
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -146230,7 +146346,7 @@ var init_package3 = __esm(() => {
|
|
|
146230
146346
|
package_default4 = {
|
|
146231
146347
|
name: "@uipath/solution-sdk",
|
|
146232
146348
|
license: "MIT",
|
|
146233
|
-
version: "1.198.0
|
|
146349
|
+
version: "1.198.0",
|
|
146234
146350
|
repository: {
|
|
146235
146351
|
type: "git",
|
|
146236
146352
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -156678,7 +156794,7 @@ var init_package4 = __esm(() => {
|
|
|
156678
156794
|
package_default5 = {
|
|
156679
156795
|
name: "@uipath/flow-tool",
|
|
156680
156796
|
license: "MIT",
|
|
156681
|
-
version: "1.198.0
|
|
156797
|
+
version: "1.198.0",
|
|
156682
156798
|
description: "Create, debug, and run UiPath Flow projects and jobs.",
|
|
156683
156799
|
private: false,
|
|
156684
156800
|
repository: {
|
|
@@ -243890,7 +244006,7 @@ var package_default6;
|
|
|
243890
244006
|
var init_package5 = __esm(() => {
|
|
243891
244007
|
package_default6 = {
|
|
243892
244008
|
name: "@uipath/packager-tool-flow",
|
|
243893
|
-
version: "1.198.0
|
|
244009
|
+
version: "1.198.0",
|
|
243894
244010
|
description: "UiPath Flow tool implementation",
|
|
243895
244011
|
type: "module",
|
|
243896
244012
|
exports: {
|
|
@@ -270577,7 +270693,27 @@ class NodeContextStorage2 {
|
|
|
270577
270693
|
return this.storage.getStore();
|
|
270578
270694
|
}
|
|
270579
270695
|
}
|
|
270580
|
-
function
|
|
270696
|
+
function getProcessEnv3() {
|
|
270697
|
+
return globalThis.process?.env;
|
|
270698
|
+
}
|
|
270699
|
+
function parseInboundTraceparent2(value) {
|
|
270700
|
+
if (!value) {
|
|
270701
|
+
return;
|
|
270702
|
+
}
|
|
270703
|
+
const match = TRACEPARENT_PATTERN2.exec(value.trim().toLowerCase());
|
|
270704
|
+
if (!match) {
|
|
270705
|
+
return;
|
|
270706
|
+
}
|
|
270707
|
+
const [, traceId, parentSpanId] = match;
|
|
270708
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
270709
|
+
return;
|
|
270710
|
+
}
|
|
270711
|
+
return { traceId, parentSpanId };
|
|
270712
|
+
}
|
|
270713
|
+
function getInboundTraceContext2() {
|
|
270714
|
+
return parseInboundTraceparent2(getProcessEnv3()?.[TELEMETRY_TRACEPARENT_ENV2]);
|
|
270715
|
+
}
|
|
270716
|
+
function getProcessEnv22() {
|
|
270581
270717
|
return globalThis.process?.env;
|
|
270582
270718
|
}
|
|
270583
270719
|
function normalizeSessionId2(value) {
|
|
@@ -270588,14 +270724,110 @@ function normalizeSessionId2(value) {
|
|
|
270588
270724
|
return trimmed || undefined;
|
|
270589
270725
|
}
|
|
270590
270726
|
function getConfiguredTelemetrySessionId2() {
|
|
270591
|
-
return normalizeSessionId2(
|
|
270727
|
+
return normalizeSessionId2(getProcessEnv22()?.[TELEMETRY_SESSION_ID_ENV2]);
|
|
270592
270728
|
}
|
|
270593
270729
|
function resolveTelemetrySessionId2(existingSessionId) {
|
|
270594
270730
|
return getConfiguredTelemetrySessionId2() ?? normalizeSessionId2(existingSessionId);
|
|
270595
270731
|
}
|
|
270732
|
+
function getTelemetryOperationId2() {
|
|
270733
|
+
const existing = telemetryOperationIdSlot2.get();
|
|
270734
|
+
if (existing) {
|
|
270735
|
+
return existing;
|
|
270736
|
+
}
|
|
270737
|
+
const inboundTraceId = getInboundTraceContext2()?.traceId;
|
|
270738
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
270739
|
+
telemetryOperationIdSlot2.set(generated);
|
|
270740
|
+
return generated;
|
|
270741
|
+
}
|
|
270596
270742
|
function getGlobalTelemetryProperties2() {
|
|
270597
270743
|
return telemetryPropsSlot2.get();
|
|
270598
270744
|
}
|
|
270745
|
+
function shortHash2(input2) {
|
|
270746
|
+
let hash3 = 2166136261;
|
|
270747
|
+
for (let i3 = 0;i3 < input2.length; i3++) {
|
|
270748
|
+
hash3 ^= input2.charCodeAt(i3);
|
|
270749
|
+
hash3 = Math.imul(hash3, 16777619);
|
|
270750
|
+
}
|
|
270751
|
+
return (hash3 >>> 0).toString(16).padStart(8, "0");
|
|
270752
|
+
}
|
|
270753
|
+
function redactUrl2(raw) {
|
|
270754
|
+
try {
|
|
270755
|
+
const url5 = new URL(raw);
|
|
270756
|
+
return `${url5.protocol}//${url5.host}`;
|
|
270757
|
+
} catch {
|
|
270758
|
+
return `url#${shortHash2(raw)}`;
|
|
270759
|
+
}
|
|
270760
|
+
}
|
|
270761
|
+
function redactValueDetectors2(value) {
|
|
270762
|
+
let out = value;
|
|
270763
|
+
out = out.replace(JWT_PATTERN2, () => REDACTED2);
|
|
270764
|
+
out = out.replace(URL_PATTERN2, (match) => {
|
|
270765
|
+
const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
|
|
270766
|
+
const core22 = trailing ? match.slice(0, -trailing.length) : match;
|
|
270767
|
+
return `${redactUrl2(core22)}${trailing}`;
|
|
270768
|
+
});
|
|
270769
|
+
out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
270770
|
+
out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
|
|
270771
|
+
out = out.replace(UUID_PATTERN3, (match) => `uuid#${shortHash2(match)}`);
|
|
270772
|
+
out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
|
|
270773
|
+
if (out.length > MAX_VALUE_LENGTH2) {
|
|
270774
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
|
|
270775
|
+
}
|
|
270776
|
+
return out;
|
|
270777
|
+
}
|
|
270778
|
+
function redactValue2(value) {
|
|
270779
|
+
return redactValueDetectors2(value);
|
|
270780
|
+
}
|
|
270781
|
+
function redactError2(error95) {
|
|
270782
|
+
const safe = new Error(redactValueDetectors2(error95.message ?? ""));
|
|
270783
|
+
safe.name = error95.name;
|
|
270784
|
+
safe.stack = typeof error95.stack === "string" ? redactValueDetectors2(error95.stack) : undefined;
|
|
270785
|
+
return safe;
|
|
270786
|
+
}
|
|
270787
|
+
function nameTokens2(name3) {
|
|
270788
|
+
return name3.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t11) => t11.toLowerCase()).filter(Boolean);
|
|
270789
|
+
}
|
|
270790
|
+
function isSensitiveName2(name3) {
|
|
270791
|
+
const tokens = nameTokens2(name3);
|
|
270792
|
+
for (let i3 = 0;i3 < tokens.length; i3++) {
|
|
270793
|
+
const token = tokens[i3];
|
|
270794
|
+
if (SENSITIVE_NAME_TOKENS2.has(token)) {
|
|
270795
|
+
return true;
|
|
270796
|
+
}
|
|
270797
|
+
if (token === "key" || token === "keys") {
|
|
270798
|
+
const prev = tokens[i3 - 1];
|
|
270799
|
+
if (prev && SENSITIVE_KEY_PREFIXES2.has(prev)) {
|
|
270800
|
+
return true;
|
|
270801
|
+
}
|
|
270802
|
+
}
|
|
270803
|
+
}
|
|
270804
|
+
return false;
|
|
270805
|
+
}
|
|
270806
|
+
function redactProperty2(name3, value) {
|
|
270807
|
+
if (value === undefined || value === null) {
|
|
270808
|
+
return;
|
|
270809
|
+
}
|
|
270810
|
+
if (isSensitiveName2(name3)) {
|
|
270811
|
+
return REDACTED2;
|
|
270812
|
+
}
|
|
270813
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
270814
|
+
return value;
|
|
270815
|
+
}
|
|
270816
|
+
if (typeof value !== "string") {
|
|
270817
|
+
return "[OBJECT]";
|
|
270818
|
+
}
|
|
270819
|
+
return redactValueDetectors2(value);
|
|
270820
|
+
}
|
|
270821
|
+
function redactProperties2(properties) {
|
|
270822
|
+
const out = {};
|
|
270823
|
+
for (const [name3, value] of Object.entries(properties)) {
|
|
270824
|
+
const redacted = redactProperty2(name3, value);
|
|
270825
|
+
if (redacted !== undefined) {
|
|
270826
|
+
out[name3] = redacted;
|
|
270827
|
+
}
|
|
270828
|
+
}
|
|
270829
|
+
return out;
|
|
270830
|
+
}
|
|
270599
270831
|
|
|
270600
270832
|
class TelemetryService2 {
|
|
270601
270833
|
telemetryProvider;
|
|
@@ -270623,11 +270855,15 @@ class TelemetryService2 {
|
|
|
270623
270855
|
trackException(error95, properties) {
|
|
270624
270856
|
const context = this.getCurrentContext();
|
|
270625
270857
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
270626
|
-
this.telemetryProvider.trackException(error95, enrichedProperties);
|
|
270858
|
+
this.telemetryProvider.trackException(redactError2(error95), enrichedProperties);
|
|
270627
270859
|
}
|
|
270628
270860
|
async trackRequest(name3, fn2, properties) {
|
|
270861
|
+
const parentContext = this.getCurrentContext();
|
|
270862
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId2();
|
|
270863
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
270629
270864
|
const context = {
|
|
270630
|
-
operationId
|
|
270865
|
+
operationId,
|
|
270866
|
+
...parentId !== undefined ? { parentId } : {},
|
|
270631
270867
|
id: this.generateId()
|
|
270632
270868
|
};
|
|
270633
270869
|
const startTime = performance.now();
|
|
@@ -270645,6 +270881,45 @@ class TelemetryService2 {
|
|
|
270645
270881
|
throw error95;
|
|
270646
270882
|
}
|
|
270647
270883
|
}
|
|
270884
|
+
trackRequestResult(name3, durationMs, success5, properties, context) {
|
|
270885
|
+
const requestContext = context ?? {
|
|
270886
|
+
operationId: this.operationId ?? getTelemetryOperationId2(),
|
|
270887
|
+
id: this.generateId()
|
|
270888
|
+
};
|
|
270889
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
270890
|
+
this.telemetryProvider.trackRequest(name3, durationMs, success5, enrichedProperties);
|
|
270891
|
+
}
|
|
270892
|
+
createRequestContext() {
|
|
270893
|
+
const operationId = this.operationId ?? getTelemetryOperationId2();
|
|
270894
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
270895
|
+
return {
|
|
270896
|
+
operationId,
|
|
270897
|
+
...parentId !== undefined ? { parentId } : {},
|
|
270898
|
+
id: this.generateId()
|
|
270899
|
+
};
|
|
270900
|
+
}
|
|
270901
|
+
inboundParentIdFor(operationId) {
|
|
270902
|
+
const inbound = getInboundTraceContext2();
|
|
270903
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
270904
|
+
}
|
|
270905
|
+
runWithContext(context, fn2) {
|
|
270906
|
+
return this.contextStorage.run(context, fn2);
|
|
270907
|
+
}
|
|
270908
|
+
createDependencyContext() {
|
|
270909
|
+
const parentContext = this.getCurrentContext();
|
|
270910
|
+
if (!parentContext) {
|
|
270911
|
+
return;
|
|
270912
|
+
}
|
|
270913
|
+
return {
|
|
270914
|
+
operationId: parentContext.operationId,
|
|
270915
|
+
parentId: parentContext.id,
|
|
270916
|
+
id: this.generateId()
|
|
270917
|
+
};
|
|
270918
|
+
}
|
|
270919
|
+
trackDependencyResult(name3, type22, durationMs, success5, properties, context, resultCode) {
|
|
270920
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
270921
|
+
this.telemetryProvider.trackDependency(redactValue2(name3), type22, durationMs, success5, enrichedProperties, resultCode);
|
|
270922
|
+
}
|
|
270648
270923
|
async trackDependencyOperation(name3, type22, fn2, properties) {
|
|
270649
270924
|
const parentContext = this.getCurrentContext();
|
|
270650
270925
|
if (!parentContext) {
|
|
@@ -270681,8 +270956,12 @@ class TelemetryService2 {
|
|
|
270681
270956
|
...getExecutionContextTelemetryProperties2(),
|
|
270682
270957
|
...globalProperties,
|
|
270683
270958
|
...this.defaultProperties,
|
|
270684
|
-
...properties,
|
|
270685
|
-
...context
|
|
270959
|
+
...redactProperties2(properties ?? {}),
|
|
270960
|
+
...context ? {
|
|
270961
|
+
[TELEMETRY_OPERATION_ID_PROPERTY2]: context.operationId,
|
|
270962
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY2]: context.parentId } : {},
|
|
270963
|
+
[TELEMETRY_SPAN_ID_PROPERTY2]: context.id
|
|
270964
|
+
} : {}
|
|
270686
270965
|
};
|
|
270687
270966
|
if (sessionId === undefined) {
|
|
270688
270967
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY2];
|
|
@@ -270692,7 +270971,16 @@ class TelemetryService2 {
|
|
|
270692
270971
|
return enriched;
|
|
270693
270972
|
}
|
|
270694
270973
|
generateId() {
|
|
270695
|
-
|
|
270974
|
+
const bytes = new Uint8Array(8);
|
|
270975
|
+
let hex4 = "";
|
|
270976
|
+
do {
|
|
270977
|
+
crypto.getRandomValues(bytes);
|
|
270978
|
+
hex4 = "";
|
|
270979
|
+
for (const byte of bytes) {
|
|
270980
|
+
hex4 += byte.toString(16).padStart(2, "0");
|
|
270981
|
+
}
|
|
270982
|
+
} while (/^0+$/.test(hex4));
|
|
270983
|
+
return hex4;
|
|
270696
270984
|
}
|
|
270697
270985
|
}
|
|
270698
270986
|
function getGlobalTelemetryInstance2() {
|
|
@@ -271146,101 +271434,20 @@ function buildCommandTelemetryAttribution2(commandPath, skillSource) {
|
|
|
271146
271434
|
...getCommandProductModeAttribution2(commandPath)
|
|
271147
271435
|
};
|
|
271148
271436
|
}
|
|
271149
|
-
function shortHash2(input2) {
|
|
271150
|
-
let hash3 = 2166136261;
|
|
271151
|
-
for (let i3 = 0;i3 < input2.length; i3++) {
|
|
271152
|
-
hash3 ^= input2.charCodeAt(i3);
|
|
271153
|
-
hash3 = Math.imul(hash3, 16777619);
|
|
271154
|
-
}
|
|
271155
|
-
return (hash3 >>> 0).toString(16).padStart(8, "0");
|
|
271156
|
-
}
|
|
271157
|
-
function redactUrl2(raw) {
|
|
271158
|
-
try {
|
|
271159
|
-
const url5 = new URL(raw);
|
|
271160
|
-
return `${url5.protocol}//${url5.host}`;
|
|
271161
|
-
} catch {
|
|
271162
|
-
return `url#${shortHash2(raw)}`;
|
|
271163
|
-
}
|
|
271164
|
-
}
|
|
271165
|
-
function redactValueDetectors2(value) {
|
|
271166
|
-
let out = value;
|
|
271167
|
-
out = out.replace(JWT_PATTERN2, () => REDACTED2);
|
|
271168
|
-
out = out.replace(URL_PATTERN2, (match) => {
|
|
271169
|
-
const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
|
|
271170
|
-
const core22 = trailing ? match.slice(0, -trailing.length) : match;
|
|
271171
|
-
return `${redactUrl2(core22)}${trailing}`;
|
|
271172
|
-
});
|
|
271173
|
-
out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
271174
|
-
out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
|
|
271175
|
-
out = out.replace(UUID_PATTERN3, (match) => `uuid#${shortHash2(match)}`);
|
|
271176
|
-
out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
|
|
271177
|
-
if (out.length > MAX_VALUE_LENGTH2) {
|
|
271178
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
|
|
271179
|
-
}
|
|
271180
|
-
return out;
|
|
271181
|
-
}
|
|
271182
|
-
function nameTokens2(name3) {
|
|
271183
|
-
return name3.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t11) => t11.toLowerCase()).filter(Boolean);
|
|
271184
|
-
}
|
|
271185
|
-
function isSensitiveName2(name3) {
|
|
271186
|
-
const tokens = nameTokens2(name3);
|
|
271187
|
-
for (let i3 = 0;i3 < tokens.length; i3++) {
|
|
271188
|
-
const token = tokens[i3];
|
|
271189
|
-
if (SENSITIVE_NAME_TOKENS2.has(token)) {
|
|
271190
|
-
return true;
|
|
271191
|
-
}
|
|
271192
|
-
if (token === "key" || token === "keys") {
|
|
271193
|
-
const prev = tokens[i3 - 1];
|
|
271194
|
-
if (prev && SENSITIVE_KEY_PREFIXES2.has(prev)) {
|
|
271195
|
-
return true;
|
|
271196
|
-
}
|
|
271197
|
-
}
|
|
271198
|
-
}
|
|
271199
|
-
return false;
|
|
271200
|
-
}
|
|
271201
|
-
function redactProperty2(name3, value) {
|
|
271202
|
-
if (value === undefined || value === null) {
|
|
271203
|
-
return;
|
|
271204
|
-
}
|
|
271205
|
-
if (isSensitiveName2(name3)) {
|
|
271206
|
-
return REDACTED2;
|
|
271207
|
-
}
|
|
271208
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
271209
|
-
return value;
|
|
271210
|
-
}
|
|
271211
|
-
if (typeof value !== "string") {
|
|
271212
|
-
return "[OBJECT]";
|
|
271213
|
-
}
|
|
271214
|
-
return redactValueDetectors2(value);
|
|
271215
|
-
}
|
|
271216
|
-
function redactProperties2(properties) {
|
|
271217
|
-
const out = {};
|
|
271218
|
-
for (const [name3, value] of Object.entries(properties)) {
|
|
271219
|
-
const redacted = redactProperty2(name3, value);
|
|
271220
|
-
if (redacted !== undefined) {
|
|
271221
|
-
out[name3] = redacted;
|
|
271222
|
-
}
|
|
271223
|
-
}
|
|
271224
|
-
return out;
|
|
271225
|
-
}
|
|
271226
271437
|
function extractCommandParams2(cmd) {
|
|
271227
271438
|
const params = {};
|
|
271439
|
+
const add22 = (name3, value) => {
|
|
271440
|
+
if (name3 && value !== undefined) {
|
|
271441
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX2}${name3}`] = value;
|
|
271442
|
+
}
|
|
271443
|
+
};
|
|
271228
271444
|
const registered = cmd.registeredArguments ?? [];
|
|
271229
271445
|
const processed = cmd.processedArgs ?? [];
|
|
271230
271446
|
for (let i3 = 0;i3 < registered.length; i3++) {
|
|
271231
|
-
|
|
271232
|
-
if (value === undefined) {
|
|
271233
|
-
continue;
|
|
271234
|
-
}
|
|
271235
|
-
const name3 = registered[i3].name();
|
|
271236
|
-
if (name3) {
|
|
271237
|
-
params[name3] = value;
|
|
271238
|
-
}
|
|
271447
|
+
add22(registered[i3].name(), processed[i3]);
|
|
271239
271448
|
}
|
|
271240
271449
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
271241
|
-
|
|
271242
|
-
params[key] = value;
|
|
271243
|
-
}
|
|
271450
|
+
add22(key, value);
|
|
271244
271451
|
}
|
|
271245
271452
|
return params;
|
|
271246
271453
|
}
|
|
@@ -274833,7 +275040,7 @@ var de_default10, en4, es_default10, es_MX_default6, fr_default10, ja_default10,
|
|
|
274833
275040
|
}
|
|
274834
275041
|
return result;
|
|
274835
275042
|
}
|
|
274836
|
-
}, TreeInterpreterInstance2, TreeInterpreter_default2, jsYaml2, loader2, common2, hasRequiredCommon2, exception2, hasRequiredException2, snippet2, hasRequiredSnippet2, type2, hasRequiredType2, schema71, hasRequiredSchema2, str2, hasRequiredStr2, seq2, hasRequiredSeq2, map7, hasRequiredMap2, failsafe2, hasRequiredFailsafe2, _null12, hasRequired_null2, bool2, hasRequiredBool2, int6, hasRequiredInt2, float2, hasRequiredFloat2, json6, hasRequiredJson2, core5, hasRequiredCore2, timestamp2, hasRequiredTimestamp2, merge6, hasRequiredMerge2, binary2, hasRequiredBinary2, omap2, hasRequiredOmap2, pairs2, hasRequiredPairs2, set7, hasRequiredSet2, _default9, hasRequired_default2, hasRequiredLoader2, dumper2, hasRequiredDumper2, hasRequiredJsYaml2, jsYamlExports2, yaml2, Type2, Schema2, FAILSAFE_SCHEMA2, JSON_SCHEMA2, CORE_SCHEMA2, DEFAULT_SCHEMA2, load2, loadAll2, dump2, YAMLException2, types4, safeLoad2, safeLoadAll2, safeDump2, logFilePathSlot2, LogLevel3, DEFAULT_LOG_LEVEL2 = 3, SimpleLogger2, loggerSingleton2, logger3, formatSlot2, formatExplicitSlot2, helpRequestedSlot2, filterSlot2, recordedFailureSlot2, AUTH_ERROR_CODES2, VALIDATION_ERROR_CODES2, NETWORK_HTTP_ERROR_CODES2, TIMEOUT_ERROR_CODES2, NETWORK_OS_ERROR_CODES2, TIMEOUT_OS_ERROR_CODES2, TLS_ERROR_CODES22, MISSING_DEPENDENCY_CODES2, INTERNAL_ERROR_NAMES2, CommonTelemetryEvents2, KNOWN_AGENTS2, LOCAL_HOSTS2, authSignalSlot2, isTruthy2 = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false", isEqual2 = (value, expected) => value?.toLowerCase() === expected, CI_SIGNATURES2, TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY2 = "session_id", telemetrySessionIdSlot2, telemetryPropsSlot2,
|
|
275043
|
+
}, TreeInterpreterInstance2, TreeInterpreter_default2, jsYaml2, loader2, common2, hasRequiredCommon2, exception2, hasRequiredException2, snippet2, hasRequiredSnippet2, type2, hasRequiredType2, schema71, hasRequiredSchema2, str2, hasRequiredStr2, seq2, hasRequiredSeq2, map7, hasRequiredMap2, failsafe2, hasRequiredFailsafe2, _null12, hasRequired_null2, bool2, hasRequiredBool2, int6, hasRequiredInt2, float2, hasRequiredFloat2, json6, hasRequiredJson2, core5, hasRequiredCore2, timestamp2, hasRequiredTimestamp2, merge6, hasRequiredMerge2, binary2, hasRequiredBinary2, omap2, hasRequiredOmap2, pairs2, hasRequiredPairs2, set7, hasRequiredSet2, _default9, hasRequired_default2, hasRequiredLoader2, dumper2, hasRequiredDumper2, hasRequiredJsYaml2, jsYamlExports2, yaml2, Type2, Schema2, FAILSAFE_SCHEMA2, JSON_SCHEMA2, CORE_SCHEMA2, DEFAULT_SCHEMA2, load2, loadAll2, dump2, YAMLException2, types4, safeLoad2, safeLoadAll2, safeDump2, logFilePathSlot2, LogLevel3, DEFAULT_LOG_LEVEL2 = 3, SimpleLogger2, loggerSingleton2, logger3, formatSlot2, formatExplicitSlot2, helpRequestedSlot2, filterSlot2, recordedFailureSlot2, AUTH_ERROR_CODES2, VALIDATION_ERROR_CODES2, NETWORK_HTTP_ERROR_CODES2, TIMEOUT_ERROR_CODES2, NETWORK_OS_ERROR_CODES2, TIMEOUT_OS_ERROR_CODES2, TLS_ERROR_CODES22, MISSING_DEPENDENCY_CODES2, INTERNAL_ERROR_NAMES2, CommonTelemetryEvents2, KNOWN_AGENTS2, LOCAL_HOSTS2, authSignalSlot2, isTruthy2 = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false", isEqual2 = (value, expected) => value?.toLowerCase() === expected, CI_SIGNATURES2, TELEMETRY_TRACEPARENT_ENV2 = "TRACEPARENT", TRACEPARENT_PATTERN2, TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY2 = "session_id", telemetrySessionIdSlot2, telemetryOperationIdSlot2, telemetryPropsSlot2, REDACTED2 = "[REDACTED]", MAX_VALUE_LENGTH2 = 200, SENSITIVE_NAME_TOKENS2, SENSITIVE_KEY_PREFIXES2, UUID_PATTERN3, EMAIL_PATTERN2, JWT_PATTERN2, LONG_TOKEN_PATTERN2, USER_HOME_PATTERN2, URL_PATTERN2, URL_TRAILING_PUNCT2, TELEMETRY_OPERATION_ID_PROPERTY2 = "uip.trace.operation_id", TELEMETRY_PARENT_ID_PROPERTY2 = "uip.trace.parent_id", TELEMETRY_SPAN_ID_PROPERTY2 = "uip.trace.span_id", providerSlot2, telemetryInstanceSlot2, DEFAULT_AI_CONNECTION_STRING2, _localTelemetryInstance2, telemetry2, CLI_ERROR_CODES2, RETRY_HINTS2, RESULTS2, EXIT_CODES2, FilterEvaluationError2, OutputFormatter2, LEGACY_SKILL_NAMESPACE2 = "uipath:", MAX_SKILL_NAME_LENGTH2 = 80, SKILL_NAME_PATTERN2, SKILL_ATTRIBUTION2, KNOWN_SKILL_NAMES2, COMMAND_ATTRIBUTION2, pollSignalSlot2, cliErrorCodeValues2, retryHintValues2, TELEMETRY_COMMAND_ARG_PREFIX2 = "uip.cmd.arg.", guardInstalledSlot2, savedOriginalsSlot2, DEFAULT_AUTH_TIMEOUT_MS3, modeSlot2, interactiveFlagSlot2, PollOutcome2, REASON_BY_OUTCOME2, TERMINAL_STATUSES2, FAILURE_STATUSES2, previewSlot2, ScreenLogger2, sdkUserAgentHostToken2, shippedKeysSlot2, factorySlot2, globalLogHandler = (logMessage) => {
|
|
274837
275044
|
const formattedMessage = logMessage.toFormattedString();
|
|
274838
275045
|
switch (logMessage.logLevel) {
|
|
274839
275046
|
case LogLevel2.Debug:
|
|
@@ -278755,8 +278962,53 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
278755
278962
|
matches: (env) => isTruthy2(env.CI)
|
|
278756
278963
|
}
|
|
278757
278964
|
];
|
|
278965
|
+
TRACEPARENT_PATTERN2 = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
278758
278966
|
telemetrySessionIdSlot2 = singleton3("TelemetrySessionId");
|
|
278967
|
+
telemetryOperationIdSlot2 = singleton3("TelemetryOperationId");
|
|
278759
278968
|
telemetryPropsSlot2 = singleton3("TelemetryDefaultProps");
|
|
278969
|
+
SENSITIVE_NAME_TOKENS2 = new Set([
|
|
278970
|
+
"token",
|
|
278971
|
+
"tokens",
|
|
278972
|
+
"secret",
|
|
278973
|
+
"secrets",
|
|
278974
|
+
"password",
|
|
278975
|
+
"passwords",
|
|
278976
|
+
"pwd",
|
|
278977
|
+
"credential",
|
|
278978
|
+
"credentials",
|
|
278979
|
+
"auth",
|
|
278980
|
+
"authentication",
|
|
278981
|
+
"authorization",
|
|
278982
|
+
"authority",
|
|
278983
|
+
"cert",
|
|
278984
|
+
"certificate",
|
|
278985
|
+
"certificates"
|
|
278986
|
+
]);
|
|
278987
|
+
SENSITIVE_KEY_PREFIXES2 = new Set([
|
|
278988
|
+
"api",
|
|
278989
|
+
"access",
|
|
278990
|
+
"client",
|
|
278991
|
+
"private",
|
|
278992
|
+
"public",
|
|
278993
|
+
"signing",
|
|
278994
|
+
"encryption",
|
|
278995
|
+
"session",
|
|
278996
|
+
"master",
|
|
278997
|
+
"shared",
|
|
278998
|
+
"root",
|
|
278999
|
+
"ssh",
|
|
279000
|
+
"rsa",
|
|
279001
|
+
"aes",
|
|
279002
|
+
"hmac",
|
|
279003
|
+
"oauth"
|
|
279004
|
+
]);
|
|
279005
|
+
UUID_PATTERN3 = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
279006
|
+
EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
279007
|
+
JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
279008
|
+
LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
279009
|
+
USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
279010
|
+
URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
279011
|
+
URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
|
|
278760
279012
|
providerSlot2 = singleton3("TelemetryProvider");
|
|
278761
279013
|
telemetryInstanceSlot2 = singleton3("TelemetryService");
|
|
278762
279014
|
DEFAULT_AI_CONNECTION_STRING2 = atob("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj");
|
|
@@ -278994,49 +279246,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
278994
279246
|
]
|
|
278995
279247
|
]
|
|
278996
279248
|
]).sort((a2, b3) => b3.prefix.length - a2.prefix.length);
|
|
278997
|
-
SENSITIVE_NAME_TOKENS2 = new Set([
|
|
278998
|
-
"token",
|
|
278999
|
-
"tokens",
|
|
279000
|
-
"secret",
|
|
279001
|
-
"secrets",
|
|
279002
|
-
"password",
|
|
279003
|
-
"passwords",
|
|
279004
|
-
"pwd",
|
|
279005
|
-
"credential",
|
|
279006
|
-
"credentials",
|
|
279007
|
-
"auth",
|
|
279008
|
-
"authentication",
|
|
279009
|
-
"authorization",
|
|
279010
|
-
"authority",
|
|
279011
|
-
"cert",
|
|
279012
|
-
"certificate",
|
|
279013
|
-
"certificates"
|
|
279014
|
-
]);
|
|
279015
|
-
SENSITIVE_KEY_PREFIXES2 = new Set([
|
|
279016
|
-
"api",
|
|
279017
|
-
"access",
|
|
279018
|
-
"client",
|
|
279019
|
-
"private",
|
|
279020
|
-
"public",
|
|
279021
|
-
"signing",
|
|
279022
|
-
"encryption",
|
|
279023
|
-
"session",
|
|
279024
|
-
"master",
|
|
279025
|
-
"shared",
|
|
279026
|
-
"root",
|
|
279027
|
-
"ssh",
|
|
279028
|
-
"rsa",
|
|
279029
|
-
"aes",
|
|
279030
|
-
"hmac",
|
|
279031
|
-
"oauth"
|
|
279032
|
-
]);
|
|
279033
|
-
UUID_PATTERN3 = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
279034
|
-
EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
279035
|
-
JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
279036
|
-
LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
279037
|
-
USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
279038
|
-
URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
279039
|
-
URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
|
|
279040
279249
|
pollSignalSlot2 = singleton3("PollSignal");
|
|
279041
279250
|
cliErrorCodeValues2 = new Set(CLI_ERROR_CODES2);
|
|
279042
279251
|
retryHintValues2 = new Set(RETRY_HINTS2);
|
|
@@ -279045,11 +279254,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
279045
279254
|
return this.action(async (...args) => {
|
|
279046
279255
|
const telemetryName = deriveCommandPath2(command);
|
|
279047
279256
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
279257
|
+
const requestContext = telemetry2.createRequestContext();
|
|
279048
279258
|
const startTime = performance.now();
|
|
279049
279259
|
let errorMessage2;
|
|
279050
279260
|
let fallbackExitCode = EXIT_CODES2.Success;
|
|
279051
279261
|
clearRecordedCommandFailureTelemetry2();
|
|
279052
|
-
const [error95] = await catchError3(fn2(...args));
|
|
279262
|
+
const [error95] = await catchError3(telemetry2.runWithContext(requestContext, () => fn2(...args)));
|
|
279053
279263
|
if (error95) {
|
|
279054
279264
|
errorMessage2 = error95 instanceof Error ? error95.message : String(error95);
|
|
279055
279265
|
logger3.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage2}`);
|
|
@@ -279085,16 +279295,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
279085
279295
|
recordedFailure,
|
|
279086
279296
|
pollSignal: context.pollSignal
|
|
279087
279297
|
});
|
|
279088
|
-
|
|
279089
|
-
|
|
279298
|
+
const commandParams = extractCommandParams2(command);
|
|
279299
|
+
if (props) {
|
|
279300
|
+
for (const key of Object.keys(props)) {
|
|
279301
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX2}${key}`];
|
|
279302
|
+
}
|
|
279303
|
+
}
|
|
279304
|
+
const baseProperties = redactProperties2({
|
|
279305
|
+
...commandParams,
|
|
279090
279306
|
...props,
|
|
279091
279307
|
...buildCommandTelemetryAttribution2(telemetryName, process.env.UIPATH_SKILL),
|
|
279092
279308
|
command: "true",
|
|
279093
|
-
duration: String(durationMs),
|
|
279094
|
-
success: String(success5),
|
|
279095
279309
|
...terminalTelemetry,
|
|
279096
279310
|
...errorMessage2 ? { errorMessage: errorMessage2 } : {}
|
|
279097
|
-
})
|
|
279311
|
+
});
|
|
279312
|
+
telemetry2.trackRequestResult(telemetryName, durationMs, success5, baseProperties, requestContext);
|
|
279098
279313
|
});
|
|
279099
279314
|
};
|
|
279100
279315
|
guardInstalledSlot2 = singleton3("ConsoleGuardInstalled");
|
|
@@ -279266,7 +279481,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
279266
279481
|
package_default7 = {
|
|
279267
279482
|
name: "@uipath/project-packager",
|
|
279268
279483
|
license: "MIT",
|
|
279269
|
-
version: "1.198.0
|
|
279484
|
+
version: "1.198.0",
|
|
279270
279485
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
279271
279486
|
type: "module",
|
|
279272
279487
|
main: "./dist/index.js",
|
|
@@ -374993,7 +375208,7 @@ var init_package6 = __esm(() => {
|
|
|
374993
375208
|
package_default8 = {
|
|
374994
375209
|
name: "@uipath/agent-sdk",
|
|
374995
375210
|
license: "MIT",
|
|
374996
|
-
version: "1.198.0
|
|
375211
|
+
version: "1.198.0",
|
|
374997
375212
|
description: "SDK for the UiPath Agent Runtime API — evaluation execution and debug sessions.",
|
|
374998
375213
|
repository: {
|
|
374999
375214
|
type: "git",
|
|
@@ -380285,7 +380500,27 @@ class NodeContextStorage3 {
|
|
|
380285
380500
|
return this.storage.getStore();
|
|
380286
380501
|
}
|
|
380287
380502
|
}
|
|
380288
|
-
function
|
|
380503
|
+
function getProcessEnv4() {
|
|
380504
|
+
return globalThis.process?.env;
|
|
380505
|
+
}
|
|
380506
|
+
function parseInboundTraceparent3(value) {
|
|
380507
|
+
if (!value) {
|
|
380508
|
+
return;
|
|
380509
|
+
}
|
|
380510
|
+
const match = TRACEPARENT_PATTERN3.exec(value.trim().toLowerCase());
|
|
380511
|
+
if (!match) {
|
|
380512
|
+
return;
|
|
380513
|
+
}
|
|
380514
|
+
const [, traceId, parentSpanId] = match;
|
|
380515
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
380516
|
+
return;
|
|
380517
|
+
}
|
|
380518
|
+
return { traceId, parentSpanId };
|
|
380519
|
+
}
|
|
380520
|
+
function getInboundTraceContext3() {
|
|
380521
|
+
return parseInboundTraceparent3(getProcessEnv4()?.[TELEMETRY_TRACEPARENT_ENV3]);
|
|
380522
|
+
}
|
|
380523
|
+
function getProcessEnv23() {
|
|
380289
380524
|
return globalThis.process?.env;
|
|
380290
380525
|
}
|
|
380291
380526
|
function normalizeSessionId3(value) {
|
|
@@ -380296,14 +380531,110 @@ function normalizeSessionId3(value) {
|
|
|
380296
380531
|
return trimmed || undefined;
|
|
380297
380532
|
}
|
|
380298
380533
|
function getConfiguredTelemetrySessionId3() {
|
|
380299
|
-
return normalizeSessionId3(
|
|
380534
|
+
return normalizeSessionId3(getProcessEnv23()?.[TELEMETRY_SESSION_ID_ENV3]);
|
|
380300
380535
|
}
|
|
380301
380536
|
function resolveTelemetrySessionId3(existingSessionId) {
|
|
380302
380537
|
return getConfiguredTelemetrySessionId3() ?? normalizeSessionId3(existingSessionId);
|
|
380303
380538
|
}
|
|
380539
|
+
function getTelemetryOperationId3() {
|
|
380540
|
+
const existing = telemetryOperationIdSlot3.get();
|
|
380541
|
+
if (existing) {
|
|
380542
|
+
return existing;
|
|
380543
|
+
}
|
|
380544
|
+
const inboundTraceId = getInboundTraceContext3()?.traceId;
|
|
380545
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
380546
|
+
telemetryOperationIdSlot3.set(generated);
|
|
380547
|
+
return generated;
|
|
380548
|
+
}
|
|
380304
380549
|
function getGlobalTelemetryProperties3() {
|
|
380305
380550
|
return telemetryPropsSlot3.get();
|
|
380306
380551
|
}
|
|
380552
|
+
function shortHash3(input2) {
|
|
380553
|
+
let hash3 = 2166136261;
|
|
380554
|
+
for (let i3 = 0;i3 < input2.length; i3++) {
|
|
380555
|
+
hash3 ^= input2.charCodeAt(i3);
|
|
380556
|
+
hash3 = Math.imul(hash3, 16777619);
|
|
380557
|
+
}
|
|
380558
|
+
return (hash3 >>> 0).toString(16).padStart(8, "0");
|
|
380559
|
+
}
|
|
380560
|
+
function redactUrl3(raw) {
|
|
380561
|
+
try {
|
|
380562
|
+
const url5 = new URL(raw);
|
|
380563
|
+
return `${url5.protocol}//${url5.host}`;
|
|
380564
|
+
} catch {
|
|
380565
|
+
return `url#${shortHash3(raw)}`;
|
|
380566
|
+
}
|
|
380567
|
+
}
|
|
380568
|
+
function redactValueDetectors3(value) {
|
|
380569
|
+
let out = value;
|
|
380570
|
+
out = out.replace(JWT_PATTERN3, () => REDACTED3);
|
|
380571
|
+
out = out.replace(URL_PATTERN3, (match) => {
|
|
380572
|
+
const trailing = match.match(URL_TRAILING_PUNCT3)?.[0] ?? "";
|
|
380573
|
+
const core22 = trailing ? match.slice(0, -trailing.length) : match;
|
|
380574
|
+
return `${redactUrl3(core22)}${trailing}`;
|
|
380575
|
+
});
|
|
380576
|
+
out = out.replace(USER_HOME_PATTERN3, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
380577
|
+
out = out.replace(EMAIL_PATTERN3, (match) => `email#${shortHash3(match)}`);
|
|
380578
|
+
out = out.replace(UUID_PATTERN4, (match) => `uuid#${shortHash3(match)}`);
|
|
380579
|
+
out = out.replace(LONG_TOKEN_PATTERN3, () => REDACTED3);
|
|
380580
|
+
if (out.length > MAX_VALUE_LENGTH3) {
|
|
380581
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH3)}…`;
|
|
380582
|
+
}
|
|
380583
|
+
return out;
|
|
380584
|
+
}
|
|
380585
|
+
function redactValue3(value) {
|
|
380586
|
+
return redactValueDetectors3(value);
|
|
380587
|
+
}
|
|
380588
|
+
function redactError3(error95) {
|
|
380589
|
+
const safe = new Error(redactValueDetectors3(error95.message ?? ""));
|
|
380590
|
+
safe.name = error95.name;
|
|
380591
|
+
safe.stack = typeof error95.stack === "string" ? redactValueDetectors3(error95.stack) : undefined;
|
|
380592
|
+
return safe;
|
|
380593
|
+
}
|
|
380594
|
+
function nameTokens3(name22) {
|
|
380595
|
+
return name22.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t11) => t11.toLowerCase()).filter(Boolean);
|
|
380596
|
+
}
|
|
380597
|
+
function isSensitiveName3(name22) {
|
|
380598
|
+
const tokens = nameTokens3(name22);
|
|
380599
|
+
for (let i3 = 0;i3 < tokens.length; i3++) {
|
|
380600
|
+
const token = tokens[i3];
|
|
380601
|
+
if (SENSITIVE_NAME_TOKENS3.has(token)) {
|
|
380602
|
+
return true;
|
|
380603
|
+
}
|
|
380604
|
+
if (token === "key" || token === "keys") {
|
|
380605
|
+
const prev = tokens[i3 - 1];
|
|
380606
|
+
if (prev && SENSITIVE_KEY_PREFIXES3.has(prev)) {
|
|
380607
|
+
return true;
|
|
380608
|
+
}
|
|
380609
|
+
}
|
|
380610
|
+
}
|
|
380611
|
+
return false;
|
|
380612
|
+
}
|
|
380613
|
+
function redactProperty3(name22, value) {
|
|
380614
|
+
if (value === undefined || value === null) {
|
|
380615
|
+
return;
|
|
380616
|
+
}
|
|
380617
|
+
if (isSensitiveName3(name22)) {
|
|
380618
|
+
return REDACTED3;
|
|
380619
|
+
}
|
|
380620
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
380621
|
+
return value;
|
|
380622
|
+
}
|
|
380623
|
+
if (typeof value !== "string") {
|
|
380624
|
+
return "[OBJECT]";
|
|
380625
|
+
}
|
|
380626
|
+
return redactValueDetectors3(value);
|
|
380627
|
+
}
|
|
380628
|
+
function redactProperties3(properties) {
|
|
380629
|
+
const out = {};
|
|
380630
|
+
for (const [name22, value] of Object.entries(properties)) {
|
|
380631
|
+
const redacted = redactProperty3(name22, value);
|
|
380632
|
+
if (redacted !== undefined) {
|
|
380633
|
+
out[name22] = redacted;
|
|
380634
|
+
}
|
|
380635
|
+
}
|
|
380636
|
+
return out;
|
|
380637
|
+
}
|
|
380307
380638
|
|
|
380308
380639
|
class TelemetryService3 {
|
|
380309
380640
|
telemetryProvider;
|
|
@@ -380331,11 +380662,15 @@ class TelemetryService3 {
|
|
|
380331
380662
|
trackException(error95, properties) {
|
|
380332
380663
|
const context = this.getCurrentContext();
|
|
380333
380664
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
380334
|
-
this.telemetryProvider.trackException(error95, enrichedProperties);
|
|
380665
|
+
this.telemetryProvider.trackException(redactError3(error95), enrichedProperties);
|
|
380335
380666
|
}
|
|
380336
380667
|
async trackRequest(name22, fn2, properties) {
|
|
380668
|
+
const parentContext = this.getCurrentContext();
|
|
380669
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId3();
|
|
380670
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
380337
380671
|
const context = {
|
|
380338
|
-
operationId
|
|
380672
|
+
operationId,
|
|
380673
|
+
...parentId !== undefined ? { parentId } : {},
|
|
380339
380674
|
id: this.generateId()
|
|
380340
380675
|
};
|
|
380341
380676
|
const startTime = performance.now();
|
|
@@ -380353,6 +380688,45 @@ class TelemetryService3 {
|
|
|
380353
380688
|
throw error95;
|
|
380354
380689
|
}
|
|
380355
380690
|
}
|
|
380691
|
+
trackRequestResult(name22, durationMs, success5, properties, context) {
|
|
380692
|
+
const requestContext = context ?? {
|
|
380693
|
+
operationId: this.operationId ?? getTelemetryOperationId3(),
|
|
380694
|
+
id: this.generateId()
|
|
380695
|
+
};
|
|
380696
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
380697
|
+
this.telemetryProvider.trackRequest(name22, durationMs, success5, enrichedProperties);
|
|
380698
|
+
}
|
|
380699
|
+
createRequestContext() {
|
|
380700
|
+
const operationId = this.operationId ?? getTelemetryOperationId3();
|
|
380701
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
380702
|
+
return {
|
|
380703
|
+
operationId,
|
|
380704
|
+
...parentId !== undefined ? { parentId } : {},
|
|
380705
|
+
id: this.generateId()
|
|
380706
|
+
};
|
|
380707
|
+
}
|
|
380708
|
+
inboundParentIdFor(operationId) {
|
|
380709
|
+
const inbound = getInboundTraceContext3();
|
|
380710
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
380711
|
+
}
|
|
380712
|
+
runWithContext(context, fn2) {
|
|
380713
|
+
return this.contextStorage.run(context, fn2);
|
|
380714
|
+
}
|
|
380715
|
+
createDependencyContext() {
|
|
380716
|
+
const parentContext = this.getCurrentContext();
|
|
380717
|
+
if (!parentContext) {
|
|
380718
|
+
return;
|
|
380719
|
+
}
|
|
380720
|
+
return {
|
|
380721
|
+
operationId: parentContext.operationId,
|
|
380722
|
+
parentId: parentContext.id,
|
|
380723
|
+
id: this.generateId()
|
|
380724
|
+
};
|
|
380725
|
+
}
|
|
380726
|
+
trackDependencyResult(name22, type22, durationMs, success5, properties, context, resultCode) {
|
|
380727
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
380728
|
+
this.telemetryProvider.trackDependency(redactValue3(name22), type22, durationMs, success5, enrichedProperties, resultCode);
|
|
380729
|
+
}
|
|
380356
380730
|
async trackDependencyOperation(name22, type22, fn2, properties) {
|
|
380357
380731
|
const parentContext = this.getCurrentContext();
|
|
380358
380732
|
if (!parentContext) {
|
|
@@ -380389,8 +380763,12 @@ class TelemetryService3 {
|
|
|
380389
380763
|
...getExecutionContextTelemetryProperties3(),
|
|
380390
380764
|
...globalProperties,
|
|
380391
380765
|
...this.defaultProperties,
|
|
380392
|
-
...properties,
|
|
380393
|
-
...context
|
|
380766
|
+
...redactProperties3(properties ?? {}),
|
|
380767
|
+
...context ? {
|
|
380768
|
+
[TELEMETRY_OPERATION_ID_PROPERTY3]: context.operationId,
|
|
380769
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY3]: context.parentId } : {},
|
|
380770
|
+
[TELEMETRY_SPAN_ID_PROPERTY3]: context.id
|
|
380771
|
+
} : {}
|
|
380394
380772
|
};
|
|
380395
380773
|
if (sessionId === undefined) {
|
|
380396
380774
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY3];
|
|
@@ -380400,7 +380778,16 @@ class TelemetryService3 {
|
|
|
380400
380778
|
return enriched;
|
|
380401
380779
|
}
|
|
380402
380780
|
generateId() {
|
|
380403
|
-
|
|
380781
|
+
const bytes = new Uint8Array(8);
|
|
380782
|
+
let hex4 = "";
|
|
380783
|
+
do {
|
|
380784
|
+
crypto.getRandomValues(bytes);
|
|
380785
|
+
hex4 = "";
|
|
380786
|
+
for (const byte of bytes) {
|
|
380787
|
+
hex4 += byte.toString(16).padStart(2, "0");
|
|
380788
|
+
}
|
|
380789
|
+
} while (/^0+$/.test(hex4));
|
|
380790
|
+
return hex4;
|
|
380404
380791
|
}
|
|
380405
380792
|
}
|
|
380406
380793
|
function getGlobalTelemetryInstance3() {
|
|
@@ -380854,101 +381241,20 @@ function buildCommandTelemetryAttribution3(commandPath, skillSource) {
|
|
|
380854
381241
|
...getCommandProductModeAttribution3(commandPath)
|
|
380855
381242
|
};
|
|
380856
381243
|
}
|
|
380857
|
-
function shortHash3(input2) {
|
|
380858
|
-
let hash3 = 2166136261;
|
|
380859
|
-
for (let i3 = 0;i3 < input2.length; i3++) {
|
|
380860
|
-
hash3 ^= input2.charCodeAt(i3);
|
|
380861
|
-
hash3 = Math.imul(hash3, 16777619);
|
|
380862
|
-
}
|
|
380863
|
-
return (hash3 >>> 0).toString(16).padStart(8, "0");
|
|
380864
|
-
}
|
|
380865
|
-
function redactUrl3(raw) {
|
|
380866
|
-
try {
|
|
380867
|
-
const url5 = new URL(raw);
|
|
380868
|
-
return `${url5.protocol}//${url5.host}`;
|
|
380869
|
-
} catch {
|
|
380870
|
-
return `url#${shortHash3(raw)}`;
|
|
380871
|
-
}
|
|
380872
|
-
}
|
|
380873
|
-
function redactValueDetectors3(value) {
|
|
380874
|
-
let out = value;
|
|
380875
|
-
out = out.replace(JWT_PATTERN3, () => REDACTED3);
|
|
380876
|
-
out = out.replace(URL_PATTERN3, (match) => {
|
|
380877
|
-
const trailing = match.match(URL_TRAILING_PUNCT3)?.[0] ?? "";
|
|
380878
|
-
const core22 = trailing ? match.slice(0, -trailing.length) : match;
|
|
380879
|
-
return `${redactUrl3(core22)}${trailing}`;
|
|
380880
|
-
});
|
|
380881
|
-
out = out.replace(USER_HOME_PATTERN3, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
380882
|
-
out = out.replace(EMAIL_PATTERN3, (match) => `email#${shortHash3(match)}`);
|
|
380883
|
-
out = out.replace(UUID_PATTERN4, (match) => `uuid#${shortHash3(match)}`);
|
|
380884
|
-
out = out.replace(LONG_TOKEN_PATTERN3, () => REDACTED3);
|
|
380885
|
-
if (out.length > MAX_VALUE_LENGTH3) {
|
|
380886
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH3)}…`;
|
|
380887
|
-
}
|
|
380888
|
-
return out;
|
|
380889
|
-
}
|
|
380890
|
-
function nameTokens3(name22) {
|
|
380891
|
-
return name22.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t11) => t11.toLowerCase()).filter(Boolean);
|
|
380892
|
-
}
|
|
380893
|
-
function isSensitiveName3(name22) {
|
|
380894
|
-
const tokens = nameTokens3(name22);
|
|
380895
|
-
for (let i3 = 0;i3 < tokens.length; i3++) {
|
|
380896
|
-
const token = tokens[i3];
|
|
380897
|
-
if (SENSITIVE_NAME_TOKENS3.has(token)) {
|
|
380898
|
-
return true;
|
|
380899
|
-
}
|
|
380900
|
-
if (token === "key" || token === "keys") {
|
|
380901
|
-
const prev = tokens[i3 - 1];
|
|
380902
|
-
if (prev && SENSITIVE_KEY_PREFIXES3.has(prev)) {
|
|
380903
|
-
return true;
|
|
380904
|
-
}
|
|
380905
|
-
}
|
|
380906
|
-
}
|
|
380907
|
-
return false;
|
|
380908
|
-
}
|
|
380909
|
-
function redactProperty3(name22, value) {
|
|
380910
|
-
if (value === undefined || value === null) {
|
|
380911
|
-
return;
|
|
380912
|
-
}
|
|
380913
|
-
if (isSensitiveName3(name22)) {
|
|
380914
|
-
return REDACTED3;
|
|
380915
|
-
}
|
|
380916
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
380917
|
-
return value;
|
|
380918
|
-
}
|
|
380919
|
-
if (typeof value !== "string") {
|
|
380920
|
-
return "[OBJECT]";
|
|
380921
|
-
}
|
|
380922
|
-
return redactValueDetectors3(value);
|
|
380923
|
-
}
|
|
380924
|
-
function redactProperties3(properties) {
|
|
380925
|
-
const out = {};
|
|
380926
|
-
for (const [name22, value] of Object.entries(properties)) {
|
|
380927
|
-
const redacted = redactProperty3(name22, value);
|
|
380928
|
-
if (redacted !== undefined) {
|
|
380929
|
-
out[name22] = redacted;
|
|
380930
|
-
}
|
|
380931
|
-
}
|
|
380932
|
-
return out;
|
|
380933
|
-
}
|
|
380934
381244
|
function extractCommandParams3(cmd) {
|
|
380935
381245
|
const params = {};
|
|
381246
|
+
const add22 = (name22, value) => {
|
|
381247
|
+
if (name22 && value !== undefined) {
|
|
381248
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX3}${name22}`] = value;
|
|
381249
|
+
}
|
|
381250
|
+
};
|
|
380936
381251
|
const registered = cmd.registeredArguments ?? [];
|
|
380937
381252
|
const processed = cmd.processedArgs ?? [];
|
|
380938
381253
|
for (let i3 = 0;i3 < registered.length; i3++) {
|
|
380939
|
-
|
|
380940
|
-
if (value === undefined) {
|
|
380941
|
-
continue;
|
|
380942
|
-
}
|
|
380943
|
-
const name22 = registered[i3].name();
|
|
380944
|
-
if (name22) {
|
|
380945
|
-
params[name22] = value;
|
|
380946
|
-
}
|
|
381254
|
+
add22(registered[i3].name(), processed[i3]);
|
|
380947
381255
|
}
|
|
380948
381256
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
380949
|
-
|
|
380950
|
-
params[key] = value;
|
|
380951
|
-
}
|
|
381257
|
+
add22(key, value);
|
|
380952
381258
|
}
|
|
380953
381259
|
return params;
|
|
380954
381260
|
}
|
|
@@ -411036,7 +411342,7 @@ return {
|
|
|
411036
411342
|
}
|
|
411037
411343
|
return result;
|
|
411038
411344
|
}
|
|
411039
|
-
}, TreeInterpreterInstance3, TreeInterpreter_default3, jsYaml3, loader3, common3, hasRequiredCommon3, exception3, hasRequiredException3, snippet3, hasRequiredSnippet3, type3, hasRequiredType3, schema73, hasRequiredSchema3, str3, hasRequiredStr3, seq3, hasRequiredSeq3, map8, hasRequiredMap3, failsafe3, hasRequiredFailsafe3, _null13, hasRequired_null3, bool3, hasRequiredBool3, int7, hasRequiredInt3, float3, hasRequiredFloat3, json7, hasRequiredJson3, core6, hasRequiredCore3, timestamp3, hasRequiredTimestamp3, merge7, hasRequiredMerge3, binary3, hasRequiredBinary3, omap3, hasRequiredOmap3, pairs3, hasRequiredPairs3, set8, hasRequiredSet3, _default10, hasRequired_default3, hasRequiredLoader3, dumper3, hasRequiredDumper3, hasRequiredJsYaml3, jsYamlExports3, yaml3, Type3, Schema3, FAILSAFE_SCHEMA3, JSON_SCHEMA3, CORE_SCHEMA3, DEFAULT_SCHEMA3, load3, loadAll3, dump3, YAMLException3, types5, safeLoad3, safeLoadAll3, safeDump3, logFilePathSlot3, DEFAULT_LOG_LEVEL3 = 3, SimpleLogger3, loggerSingleton3, logger4, formatSlot3, formatExplicitSlot3, helpRequestedSlot3, filterSlot3, recordedFailureSlot3, AUTH_ERROR_CODES3, VALIDATION_ERROR_CODES3, NETWORK_HTTP_ERROR_CODES3, TIMEOUT_ERROR_CODES3, NETWORK_OS_ERROR_CODES3, TIMEOUT_OS_ERROR_CODES3, TLS_ERROR_CODES23, MISSING_DEPENDENCY_CODES3, INTERNAL_ERROR_NAMES3, CommonTelemetryEvents3, KNOWN_AGENTS3, LOCAL_HOSTS3, authSignalSlot3, isTruthy3 = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false", isEqual3 = (value, expected) => value?.toLowerCase() === expected, CI_SIGNATURES3, TELEMETRY_SESSION_ID_ENV3 = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY3 = "session_id", telemetrySessionIdSlot3, telemetryPropsSlot3,
|
|
411345
|
+
}, TreeInterpreterInstance3, TreeInterpreter_default3, jsYaml3, loader3, common3, hasRequiredCommon3, exception3, hasRequiredException3, snippet3, hasRequiredSnippet3, type3, hasRequiredType3, schema73, hasRequiredSchema3, str3, hasRequiredStr3, seq3, hasRequiredSeq3, map8, hasRequiredMap3, failsafe3, hasRequiredFailsafe3, _null13, hasRequired_null3, bool3, hasRequiredBool3, int7, hasRequiredInt3, float3, hasRequiredFloat3, json7, hasRequiredJson3, core6, hasRequiredCore3, timestamp3, hasRequiredTimestamp3, merge7, hasRequiredMerge3, binary3, hasRequiredBinary3, omap3, hasRequiredOmap3, pairs3, hasRequiredPairs3, set8, hasRequiredSet3, _default10, hasRequired_default3, hasRequiredLoader3, dumper3, hasRequiredDumper3, hasRequiredJsYaml3, jsYamlExports3, yaml3, Type3, Schema3, FAILSAFE_SCHEMA3, JSON_SCHEMA3, CORE_SCHEMA3, DEFAULT_SCHEMA3, load3, loadAll3, dump3, YAMLException3, types5, safeLoad3, safeLoadAll3, safeDump3, logFilePathSlot3, DEFAULT_LOG_LEVEL3 = 3, SimpleLogger3, loggerSingleton3, logger4, formatSlot3, formatExplicitSlot3, helpRequestedSlot3, filterSlot3, recordedFailureSlot3, AUTH_ERROR_CODES3, VALIDATION_ERROR_CODES3, NETWORK_HTTP_ERROR_CODES3, TIMEOUT_ERROR_CODES3, NETWORK_OS_ERROR_CODES3, TIMEOUT_OS_ERROR_CODES3, TLS_ERROR_CODES23, MISSING_DEPENDENCY_CODES3, INTERNAL_ERROR_NAMES3, CommonTelemetryEvents3, KNOWN_AGENTS3, LOCAL_HOSTS3, authSignalSlot3, isTruthy3 = (value) => value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false", isEqual3 = (value, expected) => value?.toLowerCase() === expected, CI_SIGNATURES3, TELEMETRY_TRACEPARENT_ENV3 = "TRACEPARENT", TRACEPARENT_PATTERN3, TELEMETRY_SESSION_ID_ENV3 = "UIPATH_SESSION_ID", TELEMETRY_SESSION_ID_PROPERTY3 = "session_id", telemetrySessionIdSlot3, telemetryOperationIdSlot3, telemetryPropsSlot3, REDACTED3 = "[REDACTED]", MAX_VALUE_LENGTH3 = 200, SENSITIVE_NAME_TOKENS3, SENSITIVE_KEY_PREFIXES3, UUID_PATTERN4, EMAIL_PATTERN3, JWT_PATTERN3, LONG_TOKEN_PATTERN3, USER_HOME_PATTERN3, URL_PATTERN3, URL_TRAILING_PUNCT3, TELEMETRY_OPERATION_ID_PROPERTY3 = "uip.trace.operation_id", TELEMETRY_PARENT_ID_PROPERTY3 = "uip.trace.parent_id", TELEMETRY_SPAN_ID_PROPERTY3 = "uip.trace.span_id", providerSlot3, telemetryInstanceSlot3, DEFAULT_AI_CONNECTION_STRING3, _localTelemetryInstance3, telemetry3, CLI_ERROR_CODES3, RETRY_HINTS3, RESULTS3, EXIT_CODES3, FilterEvaluationError3, OutputFormatter3, LEGACY_SKILL_NAMESPACE3 = "uipath:", MAX_SKILL_NAME_LENGTH3 = 80, SKILL_NAME_PATTERN3, SKILL_ATTRIBUTION3, KNOWN_SKILL_NAMES3, COMMAND_ATTRIBUTION3, pollSignalSlot3, cliErrorCodeValues3, retryHintValues3, TELEMETRY_COMMAND_ARG_PREFIX3 = "uip.cmd.arg.", processContext2, guardInstalledSlot3, savedOriginalsSlot3, DEFAULT_PAGE_SIZE2 = 50, DEFAULT_AUTH_TIMEOUT_MS4, GENERIC2 = "Check authentication and parameters", modeSlot3, interactiveFlagSlot3, TENANT_SWITCH_COMMAND2 = "uip login tenant set <tenant>", PollOutcome3, REASON_BY_OUTCOME3, TERMINAL_STATUSES3, FAILURE_STATUSES3, previewSlot3, ScreenLogger3, USER_AGENT_HEADER3 = "User-Agent", sdkUserAgentHostToken3, shippedKeysSlot3, factorySlot3, VALID_TASK_ENTRY_RULE_TYPES, VALID_STAGE_ENTRY_RULE_TYPES, VALID_STAGE_COMPLETION_RULE_TYPES, VALID_STAGE_EXIT_RULE_TYPES, VALID_CASE_COMPLETION_RULE_TYPES, VALID_CASE_EXIT_RULE_TYPES, DEFAULT_TRIGGER_ID = "trigger_1", DEFAULT_TRIGGER_LABEL = "Trigger 1", ALPHANUMERIC = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", getRandomBytes = (n) => globalThis.crypto.getRandomValues(new Uint8Array(n)), CASE_EXIT_CONDITIONS_ADD_EXAMPLES, CASE_EXIT_CONDITIONS_EDIT_EXAMPLES, CASE_EXIT_CONDITIONS_GET_EXAMPLES, CASE_EXIT_CONDITIONS_REMOVE_EXAMPLES, registerCaseExitConditionsCommand = (program22) => {
|
|
411040
411346
|
const caseExitConditions = program22.command("case-exit-conditions").description("Manage exit conditions on a case within a case management definition JSON file");
|
|
411041
411347
|
caseExitConditions.command("add").description("Add an exit condition to a case").argument("<file>", "Path to the case management JSON file").option("-d, --display-name <name>", "Display name for the condition").option("--marks-case-complete <bool>", "Whether this condition marks the case complete (true or false)").option("--rule-type <type>", `Initial rule type: For completion: ${VALID_CASE_COMPLETION_RULE_TYPES.join(", ")}, For exit: ${VALID_CASE_EXIT_RULE_TYPES.join(", ")}`).option("--condition-expression <expr>", "Condition expression for the initial rule").option("--selected-stage-id <id>", "Stage ID for selected-stage-* initial rules").examples(CASE_EXIT_CONDITIONS_ADD_EXAMPLES).trackedAction(processContext2, async (file5, options) => {
|
|
411042
411348
|
if (options.ruleType !== undefined && (options.marksCaseComplete === "false" || options.marksCaseComplete === undefined) && !VALID_CASE_EXIT_RULE_TYPES.includes(options.ruleType)) {
|
|
@@ -706720,7 +707026,7 @@ return { upsertKeys: allEventsUpdatedKeys, deleteKeys: [...exitedStageKeysToDele
|
|
|
706720
707026
|
package_default9 = {
|
|
706721
707027
|
name: "@uipath/case-tool",
|
|
706722
707028
|
license: "MIT",
|
|
706723
|
-
version: "1.198.1
|
|
707029
|
+
version: "1.198.1",
|
|
706724
707030
|
description: "Manage Case Management instances, processes, and incidents.",
|
|
706725
707031
|
private: false,
|
|
706726
707032
|
repository: {
|
|
@@ -707224,8 +707530,53 @@ return { upsertKeys: allEventsUpdatedKeys, deleteKeys: [...exitedStageKeysToDele
|
|
|
707224
707530
|
matches: (env) => isTruthy3(env.CI)
|
|
707225
707531
|
}
|
|
707226
707532
|
];
|
|
707533
|
+
TRACEPARENT_PATTERN3 = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
707227
707534
|
telemetrySessionIdSlot3 = singleton4("TelemetrySessionId");
|
|
707535
|
+
telemetryOperationIdSlot3 = singleton4("TelemetryOperationId");
|
|
707228
707536
|
telemetryPropsSlot3 = singleton4("TelemetryDefaultProps");
|
|
707537
|
+
SENSITIVE_NAME_TOKENS3 = new Set([
|
|
707538
|
+
"token",
|
|
707539
|
+
"tokens",
|
|
707540
|
+
"secret",
|
|
707541
|
+
"secrets",
|
|
707542
|
+
"password",
|
|
707543
|
+
"passwords",
|
|
707544
|
+
"pwd",
|
|
707545
|
+
"credential",
|
|
707546
|
+
"credentials",
|
|
707547
|
+
"auth",
|
|
707548
|
+
"authentication",
|
|
707549
|
+
"authorization",
|
|
707550
|
+
"authority",
|
|
707551
|
+
"cert",
|
|
707552
|
+
"certificate",
|
|
707553
|
+
"certificates"
|
|
707554
|
+
]);
|
|
707555
|
+
SENSITIVE_KEY_PREFIXES3 = new Set([
|
|
707556
|
+
"api",
|
|
707557
|
+
"access",
|
|
707558
|
+
"client",
|
|
707559
|
+
"private",
|
|
707560
|
+
"public",
|
|
707561
|
+
"signing",
|
|
707562
|
+
"encryption",
|
|
707563
|
+
"session",
|
|
707564
|
+
"master",
|
|
707565
|
+
"shared",
|
|
707566
|
+
"root",
|
|
707567
|
+
"ssh",
|
|
707568
|
+
"rsa",
|
|
707569
|
+
"aes",
|
|
707570
|
+
"hmac",
|
|
707571
|
+
"oauth"
|
|
707572
|
+
]);
|
|
707573
|
+
UUID_PATTERN4 = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
707574
|
+
EMAIL_PATTERN3 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
707575
|
+
JWT_PATTERN3 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
707576
|
+
LONG_TOKEN_PATTERN3 = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
707577
|
+
USER_HOME_PATTERN3 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
707578
|
+
URL_PATTERN3 = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
707579
|
+
URL_TRAILING_PUNCT3 = /[.,;:!?)\]}>'"]+$/;
|
|
707229
707580
|
providerSlot3 = singleton4("TelemetryProvider");
|
|
707230
707581
|
telemetryInstanceSlot3 = singleton4("TelemetryService");
|
|
707231
707582
|
DEFAULT_AI_CONNECTION_STRING3 = atob("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj");
|
|
@@ -707463,49 +707814,6 @@ return { upsertKeys: allEventsUpdatedKeys, deleteKeys: [...exitedStageKeysToDele
|
|
|
707463
707814
|
]
|
|
707464
707815
|
]
|
|
707465
707816
|
]).sort((a2, b3) => b3.prefix.length - a2.prefix.length);
|
|
707466
|
-
SENSITIVE_NAME_TOKENS3 = new Set([
|
|
707467
|
-
"token",
|
|
707468
|
-
"tokens",
|
|
707469
|
-
"secret",
|
|
707470
|
-
"secrets",
|
|
707471
|
-
"password",
|
|
707472
|
-
"passwords",
|
|
707473
|
-
"pwd",
|
|
707474
|
-
"credential",
|
|
707475
|
-
"credentials",
|
|
707476
|
-
"auth",
|
|
707477
|
-
"authentication",
|
|
707478
|
-
"authorization",
|
|
707479
|
-
"authority",
|
|
707480
|
-
"cert",
|
|
707481
|
-
"certificate",
|
|
707482
|
-
"certificates"
|
|
707483
|
-
]);
|
|
707484
|
-
SENSITIVE_KEY_PREFIXES3 = new Set([
|
|
707485
|
-
"api",
|
|
707486
|
-
"access",
|
|
707487
|
-
"client",
|
|
707488
|
-
"private",
|
|
707489
|
-
"public",
|
|
707490
|
-
"signing",
|
|
707491
|
-
"encryption",
|
|
707492
|
-
"session",
|
|
707493
|
-
"master",
|
|
707494
|
-
"shared",
|
|
707495
|
-
"root",
|
|
707496
|
-
"ssh",
|
|
707497
|
-
"rsa",
|
|
707498
|
-
"aes",
|
|
707499
|
-
"hmac",
|
|
707500
|
-
"oauth"
|
|
707501
|
-
]);
|
|
707502
|
-
UUID_PATTERN4 = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
707503
|
-
EMAIL_PATTERN3 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
707504
|
-
JWT_PATTERN3 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
707505
|
-
LONG_TOKEN_PATTERN3 = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
707506
|
-
USER_HOME_PATTERN3 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
707507
|
-
URL_PATTERN3 = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
707508
|
-
URL_TRAILING_PUNCT3 = /[.,;:!?)\]}>'"]+$/;
|
|
707509
707817
|
pollSignalSlot3 = singleton4("PollSignal");
|
|
707510
707818
|
cliErrorCodeValues3 = new Set(CLI_ERROR_CODES3);
|
|
707511
707819
|
retryHintValues3 = new Set(RETRY_HINTS3);
|
|
@@ -707522,11 +707830,12 @@ return { upsertKeys: allEventsUpdatedKeys, deleteKeys: [...exitedStageKeysToDele
|
|
|
707522
707830
|
return this.action(async (...args) => {
|
|
707523
707831
|
const telemetryName = deriveCommandPath3(command);
|
|
707524
707832
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
707833
|
+
const requestContext = telemetry3.createRequestContext();
|
|
707525
707834
|
const startTime = performance.now();
|
|
707526
707835
|
let errorMessage3;
|
|
707527
707836
|
let fallbackExitCode = EXIT_CODES3.Success;
|
|
707528
707837
|
clearRecordedCommandFailureTelemetry3();
|
|
707529
|
-
const [error95] = await catchError4(fn2(...args));
|
|
707838
|
+
const [error95] = await catchError4(telemetry3.runWithContext(requestContext, () => fn2(...args)));
|
|
707530
707839
|
if (error95) {
|
|
707531
707840
|
errorMessage3 = error95 instanceof Error ? error95.message : String(error95);
|
|
707532
707841
|
logger4.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage3}`);
|
|
@@ -707562,16 +707871,21 @@ return { upsertKeys: allEventsUpdatedKeys, deleteKeys: [...exitedStageKeysToDele
|
|
|
707562
707871
|
recordedFailure,
|
|
707563
707872
|
pollSignal: context.pollSignal
|
|
707564
707873
|
});
|
|
707565
|
-
|
|
707566
|
-
|
|
707874
|
+
const commandParams = extractCommandParams3(command);
|
|
707875
|
+
if (props) {
|
|
707876
|
+
for (const key of Object.keys(props)) {
|
|
707877
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX3}${key}`];
|
|
707878
|
+
}
|
|
707879
|
+
}
|
|
707880
|
+
const baseProperties = redactProperties3({
|
|
707881
|
+
...commandParams,
|
|
707567
707882
|
...props,
|
|
707568
707883
|
...buildCommandTelemetryAttribution3(telemetryName, process.env.UIPATH_SKILL),
|
|
707569
707884
|
command: "true",
|
|
707570
|
-
duration: String(durationMs),
|
|
707571
|
-
success: String(success5),
|
|
707572
707885
|
...terminalTelemetry,
|
|
707573
707886
|
...errorMessage3 ? { errorMessage: errorMessage3 } : {}
|
|
707574
|
-
})
|
|
707887
|
+
});
|
|
707888
|
+
telemetry3.trackRequestResult(telemetryName, durationMs, success5, baseProperties, requestContext);
|
|
707575
707889
|
});
|
|
707576
707890
|
};
|
|
707577
707891
|
guardInstalledSlot3 = singleton4("ConsoleGuardInstalled");
|
|
@@ -752029,7 +752343,7 @@ return {
|
|
|
752029
752343
|
package_default22 = {
|
|
752030
752344
|
name: "@uipath/integrationservice-sdk",
|
|
752031
752345
|
license: "MIT",
|
|
752032
|
-
version: "1.198.0
|
|
752346
|
+
version: "1.198.0",
|
|
752033
752347
|
repository: {
|
|
752034
752348
|
type: "git",
|
|
752035
752349
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -757925,7 +758239,7 @@ return {
|
|
|
757925
758239
|
package_default42 = {
|
|
757926
758240
|
name: "@uipath/solution-sdk",
|
|
757927
758241
|
license: "MIT",
|
|
757928
|
-
version: "1.198.0
|
|
758242
|
+
version: "1.198.0",
|
|
757929
758243
|
repository: {
|
|
757930
758244
|
type: "git",
|
|
757931
758245
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -760537,7 +760851,7 @@ import"./packager-tool.js";
|
|
|
760537
760851
|
var package_default = {
|
|
760538
760852
|
name: "@uipath/maestro-tool",
|
|
760539
760853
|
license: "MIT",
|
|
760540
|
-
version: "1.198.0
|
|
760854
|
+
version: "1.198.0",
|
|
760541
760855
|
description: "Create, debug, and run Maestro projects and jobs.",
|
|
760542
760856
|
private: false,
|
|
760543
760857
|
repository: {
|
|
@@ -763610,4 +763924,4 @@ export {
|
|
|
763610
763924
|
metadata3 as metadata
|
|
763611
763925
|
};
|
|
763612
763926
|
|
|
763613
|
-
//# debugId=
|
|
763927
|
+
//# debugId=2EDB58129145030E64756E2164756E21
|