@uipath/flow-tool 1.199.0-preview.92 → 1.199.0-preview.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/init.js +510 -299
- package/dist/packager-tool.js +2 -2
- package/dist/tool.js +757 -447
- package/dist/validation.js +259 -152
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -200630,7 +200630,27 @@ class NodeContextStorage3 {
|
|
|
200630
200630
|
return this.storage.getStore();
|
|
200631
200631
|
}
|
|
200632
200632
|
}
|
|
200633
|
-
function
|
|
200633
|
+
function getProcessEnv4() {
|
|
200634
|
+
return globalThis.process?.env;
|
|
200635
|
+
}
|
|
200636
|
+
function parseInboundTraceparent3(value) {
|
|
200637
|
+
if (!value) {
|
|
200638
|
+
return;
|
|
200639
|
+
}
|
|
200640
|
+
const match = TRACEPARENT_PATTERN3.exec(value.trim().toLowerCase());
|
|
200641
|
+
if (!match) {
|
|
200642
|
+
return;
|
|
200643
|
+
}
|
|
200644
|
+
const [, traceId, parentSpanId] = match;
|
|
200645
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
200646
|
+
return;
|
|
200647
|
+
}
|
|
200648
|
+
return { traceId, parentSpanId };
|
|
200649
|
+
}
|
|
200650
|
+
function getInboundTraceContext3() {
|
|
200651
|
+
return parseInboundTraceparent3(getProcessEnv4()?.[TELEMETRY_TRACEPARENT_ENV3]);
|
|
200652
|
+
}
|
|
200653
|
+
function getProcessEnv23() {
|
|
200634
200654
|
return globalThis.process?.env;
|
|
200635
200655
|
}
|
|
200636
200656
|
function normalizeSessionId3(value) {
|
|
@@ -200641,14 +200661,110 @@ function normalizeSessionId3(value) {
|
|
|
200641
200661
|
return trimmed || undefined;
|
|
200642
200662
|
}
|
|
200643
200663
|
function getConfiguredTelemetrySessionId3() {
|
|
200644
|
-
return normalizeSessionId3(
|
|
200664
|
+
return normalizeSessionId3(getProcessEnv23()?.[TELEMETRY_SESSION_ID_ENV3]);
|
|
200645
200665
|
}
|
|
200646
200666
|
function resolveTelemetrySessionId3(existingSessionId) {
|
|
200647
200667
|
return getConfiguredTelemetrySessionId3() ?? normalizeSessionId3(existingSessionId);
|
|
200648
200668
|
}
|
|
200669
|
+
function getTelemetryOperationId3() {
|
|
200670
|
+
const existing = telemetryOperationIdSlot3.get();
|
|
200671
|
+
if (existing) {
|
|
200672
|
+
return existing;
|
|
200673
|
+
}
|
|
200674
|
+
const inboundTraceId = getInboundTraceContext3()?.traceId;
|
|
200675
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
200676
|
+
telemetryOperationIdSlot3.set(generated);
|
|
200677
|
+
return generated;
|
|
200678
|
+
}
|
|
200649
200679
|
function getGlobalTelemetryProperties3() {
|
|
200650
200680
|
return telemetryPropsSlot3.get();
|
|
200651
200681
|
}
|
|
200682
|
+
function shortHash3(input2) {
|
|
200683
|
+
let hash3 = 2166136261;
|
|
200684
|
+
for (let i3 = 0;i3 < input2.length; i3++) {
|
|
200685
|
+
hash3 ^= input2.charCodeAt(i3);
|
|
200686
|
+
hash3 = Math.imul(hash3, 16777619);
|
|
200687
|
+
}
|
|
200688
|
+
return (hash3 >>> 0).toString(16).padStart(8, "0");
|
|
200689
|
+
}
|
|
200690
|
+
function redactUrl3(raw) {
|
|
200691
|
+
try {
|
|
200692
|
+
const url5 = new URL(raw);
|
|
200693
|
+
return `${url5.protocol}//${url5.host}`;
|
|
200694
|
+
} catch {
|
|
200695
|
+
return `url#${shortHash3(raw)}`;
|
|
200696
|
+
}
|
|
200697
|
+
}
|
|
200698
|
+
function redactValueDetectors3(value) {
|
|
200699
|
+
let out = value;
|
|
200700
|
+
out = out.replace(JWT_PATTERN3, () => REDACTED3);
|
|
200701
|
+
out = out.replace(URL_PATTERN3, (match) => {
|
|
200702
|
+
const trailing = match.match(URL_TRAILING_PUNCT3)?.[0] ?? "";
|
|
200703
|
+
const core22 = trailing ? match.slice(0, -trailing.length) : match;
|
|
200704
|
+
return `${redactUrl3(core22)}${trailing}`;
|
|
200705
|
+
});
|
|
200706
|
+
out = out.replace(USER_HOME_PATTERN3, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
200707
|
+
out = out.replace(EMAIL_PATTERN3, (match) => `email#${shortHash3(match)}`);
|
|
200708
|
+
out = out.replace(UUID_PATTERN4, (match) => `uuid#${shortHash3(match)}`);
|
|
200709
|
+
out = out.replace(LONG_TOKEN_PATTERN3, () => REDACTED3);
|
|
200710
|
+
if (out.length > MAX_VALUE_LENGTH3) {
|
|
200711
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH3)}…`;
|
|
200712
|
+
}
|
|
200713
|
+
return out;
|
|
200714
|
+
}
|
|
200715
|
+
function redactValue3(value) {
|
|
200716
|
+
return redactValueDetectors3(value);
|
|
200717
|
+
}
|
|
200718
|
+
function redactError3(error95) {
|
|
200719
|
+
const safe = new Error(redactValueDetectors3(error95.message ?? ""));
|
|
200720
|
+
safe.name = error95.name;
|
|
200721
|
+
safe.stack = typeof error95.stack === "string" ? redactValueDetectors3(error95.stack) : undefined;
|
|
200722
|
+
return safe;
|
|
200723
|
+
}
|
|
200724
|
+
function nameTokens3(name2) {
|
|
200725
|
+
return name2.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t13) => t13.toLowerCase()).filter(Boolean);
|
|
200726
|
+
}
|
|
200727
|
+
function isSensitiveName3(name2) {
|
|
200728
|
+
const tokens = nameTokens3(name2);
|
|
200729
|
+
for (let i3 = 0;i3 < tokens.length; i3++) {
|
|
200730
|
+
const token = tokens[i3];
|
|
200731
|
+
if (SENSITIVE_NAME_TOKENS3.has(token)) {
|
|
200732
|
+
return true;
|
|
200733
|
+
}
|
|
200734
|
+
if (token === "key" || token === "keys") {
|
|
200735
|
+
const prev = tokens[i3 - 1];
|
|
200736
|
+
if (prev && SENSITIVE_KEY_PREFIXES3.has(prev)) {
|
|
200737
|
+
return true;
|
|
200738
|
+
}
|
|
200739
|
+
}
|
|
200740
|
+
}
|
|
200741
|
+
return false;
|
|
200742
|
+
}
|
|
200743
|
+
function redactProperty3(name2, value) {
|
|
200744
|
+
if (value === undefined || value === null) {
|
|
200745
|
+
return;
|
|
200746
|
+
}
|
|
200747
|
+
if (isSensitiveName3(name2)) {
|
|
200748
|
+
return REDACTED3;
|
|
200749
|
+
}
|
|
200750
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
200751
|
+
return value;
|
|
200752
|
+
}
|
|
200753
|
+
if (typeof value !== "string") {
|
|
200754
|
+
return "[OBJECT]";
|
|
200755
|
+
}
|
|
200756
|
+
return redactValueDetectors3(value);
|
|
200757
|
+
}
|
|
200758
|
+
function redactProperties3(properties) {
|
|
200759
|
+
const out = {};
|
|
200760
|
+
for (const [name2, value] of Object.entries(properties)) {
|
|
200761
|
+
const redacted = redactProperty3(name2, value);
|
|
200762
|
+
if (redacted !== undefined) {
|
|
200763
|
+
out[name2] = redacted;
|
|
200764
|
+
}
|
|
200765
|
+
}
|
|
200766
|
+
return out;
|
|
200767
|
+
}
|
|
200652
200768
|
|
|
200653
200769
|
class TelemetryService3 {
|
|
200654
200770
|
telemetryProvider;
|
|
@@ -200676,11 +200792,15 @@ class TelemetryService3 {
|
|
|
200676
200792
|
trackException(error95, properties) {
|
|
200677
200793
|
const context = this.getCurrentContext();
|
|
200678
200794
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
200679
|
-
this.telemetryProvider.trackException(error95, enrichedProperties);
|
|
200795
|
+
this.telemetryProvider.trackException(redactError3(error95), enrichedProperties);
|
|
200680
200796
|
}
|
|
200681
200797
|
async trackRequest(name2, fn2, properties) {
|
|
200798
|
+
const parentContext = this.getCurrentContext();
|
|
200799
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId3();
|
|
200800
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
200682
200801
|
const context = {
|
|
200683
|
-
operationId
|
|
200802
|
+
operationId,
|
|
200803
|
+
...parentId !== undefined ? { parentId } : {},
|
|
200684
200804
|
id: this.generateId()
|
|
200685
200805
|
};
|
|
200686
200806
|
const startTime = performance.now();
|
|
@@ -200698,6 +200818,45 @@ class TelemetryService3 {
|
|
|
200698
200818
|
throw error95;
|
|
200699
200819
|
}
|
|
200700
200820
|
}
|
|
200821
|
+
trackRequestResult(name2, durationMs, success5, properties, context) {
|
|
200822
|
+
const requestContext = context ?? {
|
|
200823
|
+
operationId: this.operationId ?? getTelemetryOperationId3(),
|
|
200824
|
+
id: this.generateId()
|
|
200825
|
+
};
|
|
200826
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
200827
|
+
this.telemetryProvider.trackRequest(name2, durationMs, success5, enrichedProperties);
|
|
200828
|
+
}
|
|
200829
|
+
createRequestContext() {
|
|
200830
|
+
const operationId = this.operationId ?? getTelemetryOperationId3();
|
|
200831
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
200832
|
+
return {
|
|
200833
|
+
operationId,
|
|
200834
|
+
...parentId !== undefined ? { parentId } : {},
|
|
200835
|
+
id: this.generateId()
|
|
200836
|
+
};
|
|
200837
|
+
}
|
|
200838
|
+
inboundParentIdFor(operationId) {
|
|
200839
|
+
const inbound = getInboundTraceContext3();
|
|
200840
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
200841
|
+
}
|
|
200842
|
+
runWithContext(context, fn2) {
|
|
200843
|
+
return this.contextStorage.run(context, fn2);
|
|
200844
|
+
}
|
|
200845
|
+
createDependencyContext() {
|
|
200846
|
+
const parentContext = this.getCurrentContext();
|
|
200847
|
+
if (!parentContext) {
|
|
200848
|
+
return;
|
|
200849
|
+
}
|
|
200850
|
+
return {
|
|
200851
|
+
operationId: parentContext.operationId,
|
|
200852
|
+
parentId: parentContext.id,
|
|
200853
|
+
id: this.generateId()
|
|
200854
|
+
};
|
|
200855
|
+
}
|
|
200856
|
+
trackDependencyResult(name2, type22, durationMs, success5, properties, context, resultCode) {
|
|
200857
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
200858
|
+
this.telemetryProvider.trackDependency(redactValue3(name2), type22, durationMs, success5, enrichedProperties, resultCode);
|
|
200859
|
+
}
|
|
200701
200860
|
async trackDependencyOperation(name2, type22, fn2, properties) {
|
|
200702
200861
|
const parentContext = this.getCurrentContext();
|
|
200703
200862
|
if (!parentContext) {
|
|
@@ -200734,8 +200893,12 @@ class TelemetryService3 {
|
|
|
200734
200893
|
...getExecutionContextTelemetryProperties3(),
|
|
200735
200894
|
...globalProperties,
|
|
200736
200895
|
...this.defaultProperties,
|
|
200737
|
-
...properties,
|
|
200738
|
-
...context
|
|
200896
|
+
...redactProperties3(properties ?? {}),
|
|
200897
|
+
...context ? {
|
|
200898
|
+
[TELEMETRY_OPERATION_ID_PROPERTY3]: context.operationId,
|
|
200899
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY3]: context.parentId } : {},
|
|
200900
|
+
[TELEMETRY_SPAN_ID_PROPERTY3]: context.id
|
|
200901
|
+
} : {}
|
|
200739
200902
|
};
|
|
200740
200903
|
if (sessionId === undefined) {
|
|
200741
200904
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY3];
|
|
@@ -200745,7 +200908,16 @@ class TelemetryService3 {
|
|
|
200745
200908
|
return enriched;
|
|
200746
200909
|
}
|
|
200747
200910
|
generateId() {
|
|
200748
|
-
|
|
200911
|
+
const bytes = new Uint8Array(8);
|
|
200912
|
+
let hex4 = "";
|
|
200913
|
+
do {
|
|
200914
|
+
crypto.getRandomValues(bytes);
|
|
200915
|
+
hex4 = "";
|
|
200916
|
+
for (const byte of bytes) {
|
|
200917
|
+
hex4 += byte.toString(16).padStart(2, "0");
|
|
200918
|
+
}
|
|
200919
|
+
} while (/^0+$/.test(hex4));
|
|
200920
|
+
return hex4;
|
|
200749
200921
|
}
|
|
200750
200922
|
}
|
|
200751
200923
|
function getGlobalTelemetryInstance3() {
|
|
@@ -201199,101 +201371,20 @@ function buildCommandTelemetryAttribution3(commandPath, skillSource) {
|
|
|
201199
201371
|
...getCommandProductModeAttribution3(commandPath)
|
|
201200
201372
|
};
|
|
201201
201373
|
}
|
|
201202
|
-
function shortHash3(input2) {
|
|
201203
|
-
let hash3 = 2166136261;
|
|
201204
|
-
for (let i3 = 0;i3 < input2.length; i3++) {
|
|
201205
|
-
hash3 ^= input2.charCodeAt(i3);
|
|
201206
|
-
hash3 = Math.imul(hash3, 16777619);
|
|
201207
|
-
}
|
|
201208
|
-
return (hash3 >>> 0).toString(16).padStart(8, "0");
|
|
201209
|
-
}
|
|
201210
|
-
function redactUrl3(raw) {
|
|
201211
|
-
try {
|
|
201212
|
-
const url5 = new URL(raw);
|
|
201213
|
-
return `${url5.protocol}//${url5.host}`;
|
|
201214
|
-
} catch {
|
|
201215
|
-
return `url#${shortHash3(raw)}`;
|
|
201216
|
-
}
|
|
201217
|
-
}
|
|
201218
|
-
function redactValueDetectors3(value) {
|
|
201219
|
-
let out = value;
|
|
201220
|
-
out = out.replace(JWT_PATTERN3, () => REDACTED3);
|
|
201221
|
-
out = out.replace(URL_PATTERN3, (match) => {
|
|
201222
|
-
const trailing = match.match(URL_TRAILING_PUNCT3)?.[0] ?? "";
|
|
201223
|
-
const core22 = trailing ? match.slice(0, -trailing.length) : match;
|
|
201224
|
-
return `${redactUrl3(core22)}${trailing}`;
|
|
201225
|
-
});
|
|
201226
|
-
out = out.replace(USER_HOME_PATTERN3, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
201227
|
-
out = out.replace(EMAIL_PATTERN3, (match) => `email#${shortHash3(match)}`);
|
|
201228
|
-
out = out.replace(UUID_PATTERN4, (match) => `uuid#${shortHash3(match)}`);
|
|
201229
|
-
out = out.replace(LONG_TOKEN_PATTERN3, () => REDACTED3);
|
|
201230
|
-
if (out.length > MAX_VALUE_LENGTH3) {
|
|
201231
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH3)}…`;
|
|
201232
|
-
}
|
|
201233
|
-
return out;
|
|
201234
|
-
}
|
|
201235
|
-
function nameTokens3(name2) {
|
|
201236
|
-
return name2.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t13) => t13.toLowerCase()).filter(Boolean);
|
|
201237
|
-
}
|
|
201238
|
-
function isSensitiveName3(name2) {
|
|
201239
|
-
const tokens = nameTokens3(name2);
|
|
201240
|
-
for (let i3 = 0;i3 < tokens.length; i3++) {
|
|
201241
|
-
const token = tokens[i3];
|
|
201242
|
-
if (SENSITIVE_NAME_TOKENS3.has(token)) {
|
|
201243
|
-
return true;
|
|
201244
|
-
}
|
|
201245
|
-
if (token === "key" || token === "keys") {
|
|
201246
|
-
const prev = tokens[i3 - 1];
|
|
201247
|
-
if (prev && SENSITIVE_KEY_PREFIXES3.has(prev)) {
|
|
201248
|
-
return true;
|
|
201249
|
-
}
|
|
201250
|
-
}
|
|
201251
|
-
}
|
|
201252
|
-
return false;
|
|
201253
|
-
}
|
|
201254
|
-
function redactProperty3(name2, value) {
|
|
201255
|
-
if (value === undefined || value === null) {
|
|
201256
|
-
return;
|
|
201257
|
-
}
|
|
201258
|
-
if (isSensitiveName3(name2)) {
|
|
201259
|
-
return REDACTED3;
|
|
201260
|
-
}
|
|
201261
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
201262
|
-
return value;
|
|
201263
|
-
}
|
|
201264
|
-
if (typeof value !== "string") {
|
|
201265
|
-
return "[OBJECT]";
|
|
201266
|
-
}
|
|
201267
|
-
return redactValueDetectors3(value);
|
|
201268
|
-
}
|
|
201269
|
-
function redactProperties3(properties) {
|
|
201270
|
-
const out = {};
|
|
201271
|
-
for (const [name2, value] of Object.entries(properties)) {
|
|
201272
|
-
const redacted = redactProperty3(name2, value);
|
|
201273
|
-
if (redacted !== undefined) {
|
|
201274
|
-
out[name2] = redacted;
|
|
201275
|
-
}
|
|
201276
|
-
}
|
|
201277
|
-
return out;
|
|
201278
|
-
}
|
|
201279
201374
|
function extractCommandParams3(cmd) {
|
|
201280
201375
|
const params = {};
|
|
201376
|
+
const add22 = (name2, value) => {
|
|
201377
|
+
if (name2 && value !== undefined) {
|
|
201378
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX3}${name2}`] = value;
|
|
201379
|
+
}
|
|
201380
|
+
};
|
|
201281
201381
|
const registered = cmd.registeredArguments ?? [];
|
|
201282
201382
|
const processed = cmd.processedArgs ?? [];
|
|
201283
201383
|
for (let i3 = 0;i3 < registered.length; i3++) {
|
|
201284
|
-
|
|
201285
|
-
if (value === undefined) {
|
|
201286
|
-
continue;
|
|
201287
|
-
}
|
|
201288
|
-
const name2 = registered[i3].name();
|
|
201289
|
-
if (name2) {
|
|
201290
|
-
params[name2] = value;
|
|
201291
|
-
}
|
|
201384
|
+
add22(registered[i3].name(), processed[i3]);
|
|
201292
201385
|
}
|
|
201293
201386
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
201294
|
-
|
|
201295
|
-
params[key] = value;
|
|
201296
|
-
}
|
|
201387
|
+
add22(key, value);
|
|
201297
201388
|
}
|
|
201298
201389
|
return params;
|
|
201299
201390
|
}
|
|
@@ -204928,7 +205019,7 @@ var de_default10, en5, es_default10, es_MX_default6, fr_default10, ja_default10,
|
|
|
204928
205019
|
}
|
|
204929
205020
|
return result;
|
|
204930
205021
|
}
|
|
204931
|
-
}, TreeInterpreterInstance3, TreeInterpreter_default3, jsYaml3, loader3, common3, hasRequiredCommon3, exception3, hasRequiredException3, snippet3, hasRequiredSnippet3, type3, hasRequiredType3, schema88, 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, LogLevel3, 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,
|
|
205022
|
+
}, TreeInterpreterInstance3, TreeInterpreter_default3, jsYaml3, loader3, common3, hasRequiredCommon3, exception3, hasRequiredException3, snippet3, hasRequiredSnippet3, type3, hasRequiredType3, schema88, 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, LogLevel3, 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.", guardInstalledSlot3, savedOriginalsSlot3, DEFAULT_AUTH_TIMEOUT_MS4, modeSlot3, interactiveFlagSlot3, PollOutcome3, REASON_BY_OUTCOME3, TERMINAL_STATUSES4, FAILURE_STATUSES3, previewSlot3, ScreenLogger3, sdkUserAgentHostToken3, shippedKeysSlot3, factorySlot3, globalLogHandler = (logMessage) => {
|
|
204932
205023
|
const formattedMessage = logMessage.toFormattedString();
|
|
204933
205024
|
switch (logMessage.logLevel) {
|
|
204934
205025
|
case LogLevel.Debug:
|
|
@@ -208880,8 +208971,53 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
208880
208971
|
matches: (env) => isTruthy3(env.CI)
|
|
208881
208972
|
}
|
|
208882
208973
|
];
|
|
208974
|
+
TRACEPARENT_PATTERN3 = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
208883
208975
|
telemetrySessionIdSlot3 = singleton4("TelemetrySessionId");
|
|
208976
|
+
telemetryOperationIdSlot3 = singleton4("TelemetryOperationId");
|
|
208884
208977
|
telemetryPropsSlot3 = singleton4("TelemetryDefaultProps");
|
|
208978
|
+
SENSITIVE_NAME_TOKENS3 = new Set([
|
|
208979
|
+
"token",
|
|
208980
|
+
"tokens",
|
|
208981
|
+
"secret",
|
|
208982
|
+
"secrets",
|
|
208983
|
+
"password",
|
|
208984
|
+
"passwords",
|
|
208985
|
+
"pwd",
|
|
208986
|
+
"credential",
|
|
208987
|
+
"credentials",
|
|
208988
|
+
"auth",
|
|
208989
|
+
"authentication",
|
|
208990
|
+
"authorization",
|
|
208991
|
+
"authority",
|
|
208992
|
+
"cert",
|
|
208993
|
+
"certificate",
|
|
208994
|
+
"certificates"
|
|
208995
|
+
]);
|
|
208996
|
+
SENSITIVE_KEY_PREFIXES3 = new Set([
|
|
208997
|
+
"api",
|
|
208998
|
+
"access",
|
|
208999
|
+
"client",
|
|
209000
|
+
"private",
|
|
209001
|
+
"public",
|
|
209002
|
+
"signing",
|
|
209003
|
+
"encryption",
|
|
209004
|
+
"session",
|
|
209005
|
+
"master",
|
|
209006
|
+
"shared",
|
|
209007
|
+
"root",
|
|
209008
|
+
"ssh",
|
|
209009
|
+
"rsa",
|
|
209010
|
+
"aes",
|
|
209011
|
+
"hmac",
|
|
209012
|
+
"oauth"
|
|
209013
|
+
]);
|
|
209014
|
+
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;
|
|
209015
|
+
EMAIL_PATTERN3 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
209016
|
+
JWT_PATTERN3 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
209017
|
+
LONG_TOKEN_PATTERN3 = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
209018
|
+
USER_HOME_PATTERN3 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
209019
|
+
URL_PATTERN3 = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
209020
|
+
URL_TRAILING_PUNCT3 = /[.,;:!?)\]}>'"]+$/;
|
|
208885
209021
|
providerSlot3 = singleton4("TelemetryProvider");
|
|
208886
209022
|
telemetryInstanceSlot3 = singleton4("TelemetryService");
|
|
208887
209023
|
DEFAULT_AI_CONNECTION_STRING3 = atob("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj");
|
|
@@ -209120,49 +209256,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
209120
209256
|
]
|
|
209121
209257
|
]
|
|
209122
209258
|
]).sort((a2, b3) => b3.prefix.length - a2.prefix.length);
|
|
209123
|
-
SENSITIVE_NAME_TOKENS3 = new Set([
|
|
209124
|
-
"token",
|
|
209125
|
-
"tokens",
|
|
209126
|
-
"secret",
|
|
209127
|
-
"secrets",
|
|
209128
|
-
"password",
|
|
209129
|
-
"passwords",
|
|
209130
|
-
"pwd",
|
|
209131
|
-
"credential",
|
|
209132
|
-
"credentials",
|
|
209133
|
-
"auth",
|
|
209134
|
-
"authentication",
|
|
209135
|
-
"authorization",
|
|
209136
|
-
"authority",
|
|
209137
|
-
"cert",
|
|
209138
|
-
"certificate",
|
|
209139
|
-
"certificates"
|
|
209140
|
-
]);
|
|
209141
|
-
SENSITIVE_KEY_PREFIXES3 = new Set([
|
|
209142
|
-
"api",
|
|
209143
|
-
"access",
|
|
209144
|
-
"client",
|
|
209145
|
-
"private",
|
|
209146
|
-
"public",
|
|
209147
|
-
"signing",
|
|
209148
|
-
"encryption",
|
|
209149
|
-
"session",
|
|
209150
|
-
"master",
|
|
209151
|
-
"shared",
|
|
209152
|
-
"root",
|
|
209153
|
-
"ssh",
|
|
209154
|
-
"rsa",
|
|
209155
|
-
"aes",
|
|
209156
|
-
"hmac",
|
|
209157
|
-
"oauth"
|
|
209158
|
-
]);
|
|
209159
|
-
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;
|
|
209160
|
-
EMAIL_PATTERN3 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
209161
|
-
JWT_PATTERN3 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
209162
|
-
LONG_TOKEN_PATTERN3 = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
209163
|
-
USER_HOME_PATTERN3 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
209164
|
-
URL_PATTERN3 = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
209165
|
-
URL_TRAILING_PUNCT3 = /[.,;:!?)\]}>'"]+$/;
|
|
209166
209259
|
pollSignalSlot3 = singleton4("PollSignal");
|
|
209167
209260
|
cliErrorCodeValues3 = new Set(CLI_ERROR_CODES3);
|
|
209168
209261
|
retryHintValues3 = new Set(RETRY_HINTS3);
|
|
@@ -209171,11 +209264,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
209171
209264
|
return this.action(async (...args) => {
|
|
209172
209265
|
const telemetryName = deriveCommandPath3(command);
|
|
209173
209266
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
209267
|
+
const requestContext = telemetry3.createRequestContext();
|
|
209174
209268
|
const startTime = performance.now();
|
|
209175
209269
|
let errorMessage3;
|
|
209176
209270
|
let fallbackExitCode = EXIT_CODES3.Success;
|
|
209177
209271
|
clearRecordedCommandFailureTelemetry3();
|
|
209178
|
-
const [error95] = await catchError4(fn2(...args));
|
|
209272
|
+
const [error95] = await catchError4(telemetry3.runWithContext(requestContext, () => fn2(...args)));
|
|
209179
209273
|
if (error95) {
|
|
209180
209274
|
errorMessage3 = error95 instanceof Error ? error95.message : String(error95);
|
|
209181
209275
|
logger4.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage3}`);
|
|
@@ -209211,16 +209305,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
209211
209305
|
recordedFailure,
|
|
209212
209306
|
pollSignal: context.pollSignal
|
|
209213
209307
|
});
|
|
209214
|
-
|
|
209215
|
-
|
|
209308
|
+
const commandParams = extractCommandParams3(command);
|
|
209309
|
+
if (props) {
|
|
209310
|
+
for (const key of Object.keys(props)) {
|
|
209311
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX3}${key}`];
|
|
209312
|
+
}
|
|
209313
|
+
}
|
|
209314
|
+
const baseProperties = redactProperties3({
|
|
209315
|
+
...commandParams,
|
|
209216
209316
|
...props,
|
|
209217
209317
|
...buildCommandTelemetryAttribution3(telemetryName, process.env.UIPATH_SKILL),
|
|
209218
209318
|
command: "true",
|
|
209219
|
-
duration: String(durationMs),
|
|
209220
|
-
success: String(success5),
|
|
209221
209319
|
...terminalTelemetry,
|
|
209222
209320
|
...errorMessage3 ? { errorMessage: errorMessage3 } : {}
|
|
209223
|
-
})
|
|
209321
|
+
});
|
|
209322
|
+
telemetry3.trackRequestResult(telemetryName, durationMs, success5, baseProperties, requestContext);
|
|
209224
209323
|
});
|
|
209225
209324
|
};
|
|
209226
209325
|
guardInstalledSlot3 = singleton4("ConsoleGuardInstalled");
|
|
@@ -209397,7 +209496,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
209397
209496
|
package_default7 = {
|
|
209398
209497
|
name: "@uipath/project-packager",
|
|
209399
209498
|
license: "MIT",
|
|
209400
|
-
version: "1.199.0-preview.
|
|
209499
|
+
version: "1.199.0-preview.97",
|
|
209401
209500
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
209402
209501
|
type: "module",
|
|
209403
209502
|
main: "./dist/index.js",
|
|
@@ -301273,7 +301372,7 @@ import"./packager-tool.js";
|
|
|
301273
301372
|
var package_default = {
|
|
301274
301373
|
name: "@uipath/flow-tool",
|
|
301275
301374
|
license: "MIT",
|
|
301276
|
-
version: "1.199.0-preview.
|
|
301375
|
+
version: "1.199.0-preview.97",
|
|
301277
301376
|
description: "Create, debug, and run UiPath Flow projects and jobs.",
|
|
301278
301377
|
private: false,
|
|
301279
301378
|
repository: {
|
|
@@ -307540,11 +307639,36 @@ class NodeContextStorage {
|
|
|
307540
307639
|
return this.storage.getStore();
|
|
307541
307640
|
}
|
|
307542
307641
|
}
|
|
307642
|
+
// ../common/src/telemetry/trace-context.ts
|
|
307643
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
307644
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
307645
|
+
function getProcessEnv() {
|
|
307646
|
+
return globalThis.process?.env;
|
|
307647
|
+
}
|
|
307648
|
+
function parseInboundTraceparent(value) {
|
|
307649
|
+
if (!value) {
|
|
307650
|
+
return;
|
|
307651
|
+
}
|
|
307652
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
307653
|
+
if (!match) {
|
|
307654
|
+
return;
|
|
307655
|
+
}
|
|
307656
|
+
const [, traceId, parentSpanId] = match;
|
|
307657
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
307658
|
+
return;
|
|
307659
|
+
}
|
|
307660
|
+
return { traceId, parentSpanId };
|
|
307661
|
+
}
|
|
307662
|
+
function getInboundTraceContext() {
|
|
307663
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
307664
|
+
}
|
|
307665
|
+
|
|
307543
307666
|
// ../common/src/telemetry/session-id.ts
|
|
307544
307667
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
307545
307668
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
307546
307669
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
307547
|
-
|
|
307670
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
307671
|
+
function getProcessEnv2() {
|
|
307548
307672
|
return globalThis.process?.env;
|
|
307549
307673
|
}
|
|
307550
307674
|
function normalizeSessionId(value) {
|
|
@@ -307555,18 +307679,165 @@ function normalizeSessionId(value) {
|
|
|
307555
307679
|
return trimmed || undefined;
|
|
307556
307680
|
}
|
|
307557
307681
|
function getConfiguredTelemetrySessionId() {
|
|
307558
|
-
return normalizeSessionId(
|
|
307682
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
307559
307683
|
}
|
|
307560
307684
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
307561
307685
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
307562
307686
|
}
|
|
307687
|
+
function getTelemetryOperationId() {
|
|
307688
|
+
const existing = telemetryOperationIdSlot.get();
|
|
307689
|
+
if (existing) {
|
|
307690
|
+
return existing;
|
|
307691
|
+
}
|
|
307692
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
307693
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
307694
|
+
telemetryOperationIdSlot.set(generated);
|
|
307695
|
+
return generated;
|
|
307696
|
+
}
|
|
307563
307697
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
307564
307698
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
307565
307699
|
function getGlobalTelemetryProperties() {
|
|
307566
307700
|
return telemetryPropsSlot.get();
|
|
307567
307701
|
}
|
|
307568
307702
|
|
|
307703
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
307704
|
+
var REDACTED = "[REDACTED]";
|
|
307705
|
+
var MAX_VALUE_LENGTH = 200;
|
|
307706
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
307707
|
+
"token",
|
|
307708
|
+
"tokens",
|
|
307709
|
+
"secret",
|
|
307710
|
+
"secrets",
|
|
307711
|
+
"password",
|
|
307712
|
+
"passwords",
|
|
307713
|
+
"pwd",
|
|
307714
|
+
"credential",
|
|
307715
|
+
"credentials",
|
|
307716
|
+
"auth",
|
|
307717
|
+
"authentication",
|
|
307718
|
+
"authorization",
|
|
307719
|
+
"authority",
|
|
307720
|
+
"cert",
|
|
307721
|
+
"certificate",
|
|
307722
|
+
"certificates"
|
|
307723
|
+
]);
|
|
307724
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
307725
|
+
"api",
|
|
307726
|
+
"access",
|
|
307727
|
+
"client",
|
|
307728
|
+
"private",
|
|
307729
|
+
"public",
|
|
307730
|
+
"signing",
|
|
307731
|
+
"encryption",
|
|
307732
|
+
"session",
|
|
307733
|
+
"master",
|
|
307734
|
+
"shared",
|
|
307735
|
+
"root",
|
|
307736
|
+
"ssh",
|
|
307737
|
+
"rsa",
|
|
307738
|
+
"aes",
|
|
307739
|
+
"hmac",
|
|
307740
|
+
"oauth"
|
|
307741
|
+
]);
|
|
307742
|
+
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;
|
|
307743
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
307744
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
307745
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
307746
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
307747
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
307748
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
307749
|
+
function shortHash(input) {
|
|
307750
|
+
let hash = 2166136261;
|
|
307751
|
+
for (let i = 0;i < input.length; i++) {
|
|
307752
|
+
hash ^= input.charCodeAt(i);
|
|
307753
|
+
hash = Math.imul(hash, 16777619);
|
|
307754
|
+
}
|
|
307755
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
307756
|
+
}
|
|
307757
|
+
function redactUrl(raw) {
|
|
307758
|
+
try {
|
|
307759
|
+
const url = new URL(raw);
|
|
307760
|
+
return `${url.protocol}//${url.host}`;
|
|
307761
|
+
} catch {
|
|
307762
|
+
return `url#${shortHash(raw)}`;
|
|
307763
|
+
}
|
|
307764
|
+
}
|
|
307765
|
+
function redactValueDetectors(value) {
|
|
307766
|
+
let out = value;
|
|
307767
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
307768
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
307769
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
307770
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
307771
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
307772
|
+
});
|
|
307773
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
307774
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
307775
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
307776
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
307777
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
307778
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
307779
|
+
}
|
|
307780
|
+
return out;
|
|
307781
|
+
}
|
|
307782
|
+
function redactValue(value) {
|
|
307783
|
+
return redactValueDetectors(value);
|
|
307784
|
+
}
|
|
307785
|
+
function redactError(error) {
|
|
307786
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
307787
|
+
safe.name = error.name;
|
|
307788
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
307789
|
+
return safe;
|
|
307790
|
+
}
|
|
307791
|
+
function nameTokens(name) {
|
|
307792
|
+
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);
|
|
307793
|
+
}
|
|
307794
|
+
function isSensitiveName(name) {
|
|
307795
|
+
const tokens = nameTokens(name);
|
|
307796
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
307797
|
+
const token = tokens[i];
|
|
307798
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
307799
|
+
return true;
|
|
307800
|
+
}
|
|
307801
|
+
if (token === "key" || token === "keys") {
|
|
307802
|
+
const prev = tokens[i - 1];
|
|
307803
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
307804
|
+
return true;
|
|
307805
|
+
}
|
|
307806
|
+
}
|
|
307807
|
+
}
|
|
307808
|
+
return false;
|
|
307809
|
+
}
|
|
307810
|
+
function redactProperty(name, value) {
|
|
307811
|
+
if (value === undefined || value === null) {
|
|
307812
|
+
return;
|
|
307813
|
+
}
|
|
307814
|
+
if (isSensitiveName(name)) {
|
|
307815
|
+
return REDACTED;
|
|
307816
|
+
}
|
|
307817
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
307818
|
+
return value;
|
|
307819
|
+
}
|
|
307820
|
+
if (typeof value !== "string") {
|
|
307821
|
+
return "[OBJECT]";
|
|
307822
|
+
}
|
|
307823
|
+
return redactValueDetectors(value);
|
|
307824
|
+
}
|
|
307825
|
+
function redactProperties(properties) {
|
|
307826
|
+
const out = {};
|
|
307827
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
307828
|
+
const redacted = redactProperty(name, value);
|
|
307829
|
+
if (redacted !== undefined) {
|
|
307830
|
+
out[name] = redacted;
|
|
307831
|
+
}
|
|
307832
|
+
}
|
|
307833
|
+
return out;
|
|
307834
|
+
}
|
|
307835
|
+
|
|
307569
307836
|
// ../common/src/telemetry/telemetry-service.ts
|
|
307837
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
307838
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
307839
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
307840
|
+
|
|
307570
307841
|
class TelemetryService {
|
|
307571
307842
|
telemetryProvider;
|
|
307572
307843
|
contextStorage;
|
|
@@ -307593,11 +307864,15 @@ class TelemetryService {
|
|
|
307593
307864
|
trackException(error, properties) {
|
|
307594
307865
|
const context = this.getCurrentContext();
|
|
307595
307866
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
307596
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
307867
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
307597
307868
|
}
|
|
307598
307869
|
async trackRequest(name, fn, properties) {
|
|
307870
|
+
const parentContext = this.getCurrentContext();
|
|
307871
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
307872
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
307599
307873
|
const context = {
|
|
307600
|
-
operationId
|
|
307874
|
+
operationId,
|
|
307875
|
+
...parentId !== undefined ? { parentId } : {},
|
|
307601
307876
|
id: this.generateId()
|
|
307602
307877
|
};
|
|
307603
307878
|
const startTime = performance.now();
|
|
@@ -307615,6 +307890,45 @@ class TelemetryService {
|
|
|
307615
307890
|
throw error;
|
|
307616
307891
|
}
|
|
307617
307892
|
}
|
|
307893
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
307894
|
+
const requestContext = context ?? {
|
|
307895
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
307896
|
+
id: this.generateId()
|
|
307897
|
+
};
|
|
307898
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
307899
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
307900
|
+
}
|
|
307901
|
+
createRequestContext() {
|
|
307902
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
307903
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
307904
|
+
return {
|
|
307905
|
+
operationId,
|
|
307906
|
+
...parentId !== undefined ? { parentId } : {},
|
|
307907
|
+
id: this.generateId()
|
|
307908
|
+
};
|
|
307909
|
+
}
|
|
307910
|
+
inboundParentIdFor(operationId) {
|
|
307911
|
+
const inbound = getInboundTraceContext();
|
|
307912
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
307913
|
+
}
|
|
307914
|
+
runWithContext(context, fn) {
|
|
307915
|
+
return this.contextStorage.run(context, fn);
|
|
307916
|
+
}
|
|
307917
|
+
createDependencyContext() {
|
|
307918
|
+
const parentContext = this.getCurrentContext();
|
|
307919
|
+
if (!parentContext) {
|
|
307920
|
+
return;
|
|
307921
|
+
}
|
|
307922
|
+
return {
|
|
307923
|
+
operationId: parentContext.operationId,
|
|
307924
|
+
parentId: parentContext.id,
|
|
307925
|
+
id: this.generateId()
|
|
307926
|
+
};
|
|
307927
|
+
}
|
|
307928
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
307929
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
307930
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
307931
|
+
}
|
|
307618
307932
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
307619
307933
|
const parentContext = this.getCurrentContext();
|
|
307620
307934
|
if (!parentContext) {
|
|
@@ -307651,8 +307965,12 @@ class TelemetryService {
|
|
|
307651
307965
|
...getExecutionContextTelemetryProperties(),
|
|
307652
307966
|
...globalProperties,
|
|
307653
307967
|
...this.defaultProperties,
|
|
307654
|
-
...properties,
|
|
307655
|
-
...context
|
|
307968
|
+
...redactProperties(properties ?? {}),
|
|
307969
|
+
...context ? {
|
|
307970
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
307971
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
307972
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
307973
|
+
} : {}
|
|
307656
307974
|
};
|
|
307657
307975
|
if (sessionId === undefined) {
|
|
307658
307976
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -307662,7 +307980,16 @@ class TelemetryService {
|
|
|
307662
307980
|
return enriched;
|
|
307663
307981
|
}
|
|
307664
307982
|
generateId() {
|
|
307665
|
-
|
|
307983
|
+
const bytes = new Uint8Array(8);
|
|
307984
|
+
let hex = "";
|
|
307985
|
+
do {
|
|
307986
|
+
crypto.getRandomValues(bytes);
|
|
307987
|
+
hex = "";
|
|
307988
|
+
for (const byte of bytes) {
|
|
307989
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
307990
|
+
}
|
|
307991
|
+
} while (/^0+$/.test(hex));
|
|
307992
|
+
return hex;
|
|
307666
307993
|
}
|
|
307667
307994
|
}
|
|
307668
307995
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -308365,134 +308692,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
308365
308692
|
};
|
|
308366
308693
|
}
|
|
308367
308694
|
|
|
308368
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
308369
|
-
var REDACTED = "[REDACTED]";
|
|
308370
|
-
var MAX_VALUE_LENGTH = 200;
|
|
308371
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
308372
|
-
"token",
|
|
308373
|
-
"tokens",
|
|
308374
|
-
"secret",
|
|
308375
|
-
"secrets",
|
|
308376
|
-
"password",
|
|
308377
|
-
"passwords",
|
|
308378
|
-
"pwd",
|
|
308379
|
-
"credential",
|
|
308380
|
-
"credentials",
|
|
308381
|
-
"auth",
|
|
308382
|
-
"authentication",
|
|
308383
|
-
"authorization",
|
|
308384
|
-
"authority",
|
|
308385
|
-
"cert",
|
|
308386
|
-
"certificate",
|
|
308387
|
-
"certificates"
|
|
308388
|
-
]);
|
|
308389
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
308390
|
-
"api",
|
|
308391
|
-
"access",
|
|
308392
|
-
"client",
|
|
308393
|
-
"private",
|
|
308394
|
-
"public",
|
|
308395
|
-
"signing",
|
|
308396
|
-
"encryption",
|
|
308397
|
-
"session",
|
|
308398
|
-
"master",
|
|
308399
|
-
"shared",
|
|
308400
|
-
"root",
|
|
308401
|
-
"ssh",
|
|
308402
|
-
"rsa",
|
|
308403
|
-
"aes",
|
|
308404
|
-
"hmac",
|
|
308405
|
-
"oauth"
|
|
308406
|
-
]);
|
|
308407
|
-
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;
|
|
308408
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
308409
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
308410
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
308411
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
308412
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
308413
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
308414
|
-
function shortHash(input) {
|
|
308415
|
-
let hash = 2166136261;
|
|
308416
|
-
for (let i = 0;i < input.length; i++) {
|
|
308417
|
-
hash ^= input.charCodeAt(i);
|
|
308418
|
-
hash = Math.imul(hash, 16777619);
|
|
308419
|
-
}
|
|
308420
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
308421
|
-
}
|
|
308422
|
-
function redactUrl(raw) {
|
|
308423
|
-
try {
|
|
308424
|
-
const url = new URL(raw);
|
|
308425
|
-
return `${url.protocol}//${url.host}`;
|
|
308426
|
-
} catch {
|
|
308427
|
-
return `url#${shortHash(raw)}`;
|
|
308428
|
-
}
|
|
308429
|
-
}
|
|
308430
|
-
function redactValueDetectors(value) {
|
|
308431
|
-
let out = value;
|
|
308432
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
308433
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
308434
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
308435
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
308436
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
308437
|
-
});
|
|
308438
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
308439
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
308440
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
308441
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
308442
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
308443
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
308444
|
-
}
|
|
308445
|
-
return out;
|
|
308446
|
-
}
|
|
308447
|
-
function nameTokens(name) {
|
|
308448
|
-
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);
|
|
308449
|
-
}
|
|
308450
|
-
function isSensitiveName(name) {
|
|
308451
|
-
const tokens = nameTokens(name);
|
|
308452
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
308453
|
-
const token = tokens[i];
|
|
308454
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
308455
|
-
return true;
|
|
308456
|
-
}
|
|
308457
|
-
if (token === "key" || token === "keys") {
|
|
308458
|
-
const prev = tokens[i - 1];
|
|
308459
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
308460
|
-
return true;
|
|
308461
|
-
}
|
|
308462
|
-
}
|
|
308463
|
-
}
|
|
308464
|
-
return false;
|
|
308465
|
-
}
|
|
308466
|
-
function redactProperty(name, value) {
|
|
308467
|
-
if (value === undefined || value === null) {
|
|
308468
|
-
return;
|
|
308469
|
-
}
|
|
308470
|
-
if (isSensitiveName(name)) {
|
|
308471
|
-
return REDACTED;
|
|
308472
|
-
}
|
|
308473
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
308474
|
-
return value;
|
|
308475
|
-
}
|
|
308476
|
-
if (typeof value !== "string") {
|
|
308477
|
-
return "[OBJECT]";
|
|
308478
|
-
}
|
|
308479
|
-
return redactValueDetectors(value);
|
|
308480
|
-
}
|
|
308481
|
-
function redactProperties(properties) {
|
|
308482
|
-
const out = {};
|
|
308483
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
308484
|
-
const redacted = redactProperty(name, value);
|
|
308485
|
-
if (redacted !== undefined) {
|
|
308486
|
-
out[name] = redacted;
|
|
308487
|
-
}
|
|
308488
|
-
}
|
|
308489
|
-
return out;
|
|
308490
|
-
}
|
|
308491
|
-
|
|
308492
308695
|
// ../common/src/trackedAction.ts
|
|
308493
308696
|
var pollSignalSlot = singleton("PollSignal");
|
|
308494
308697
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
308495
308698
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
308699
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
308496
308700
|
var processContext = {
|
|
308497
308701
|
exit: (code) => {
|
|
308498
308702
|
process.exitCode = code;
|
|
@@ -308503,22 +308707,18 @@ var processContext = {
|
|
|
308503
308707
|
};
|
|
308504
308708
|
function extractCommandParams(cmd) {
|
|
308505
308709
|
const params = {};
|
|
308710
|
+
const add2 = (name, value) => {
|
|
308711
|
+
if (name && value !== undefined) {
|
|
308712
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
308713
|
+
}
|
|
308714
|
+
};
|
|
308506
308715
|
const registered = cmd.registeredArguments ?? [];
|
|
308507
308716
|
const processed = cmd.processedArgs ?? [];
|
|
308508
308717
|
for (let i = 0;i < registered.length; i++) {
|
|
308509
|
-
|
|
308510
|
-
if (value === undefined) {
|
|
308511
|
-
continue;
|
|
308512
|
-
}
|
|
308513
|
-
const name = registered[i].name();
|
|
308514
|
-
if (name) {
|
|
308515
|
-
params[name] = value;
|
|
308516
|
-
}
|
|
308718
|
+
add2(registered[i].name(), processed[i]);
|
|
308517
308719
|
}
|
|
308518
308720
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
308519
|
-
|
|
308520
|
-
params[key] = value;
|
|
308521
|
-
}
|
|
308721
|
+
add2(key, value);
|
|
308522
308722
|
}
|
|
308523
308723
|
return params;
|
|
308524
308724
|
}
|
|
@@ -308561,11 +308761,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
308561
308761
|
return this.action(async (...args) => {
|
|
308562
308762
|
const telemetryName = deriveCommandPath(command);
|
|
308563
308763
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
308764
|
+
const requestContext = telemetry.createRequestContext();
|
|
308564
308765
|
const startTime = performance.now();
|
|
308565
308766
|
let errorMessage;
|
|
308566
308767
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
308567
308768
|
clearRecordedCommandFailureTelemetry();
|
|
308568
|
-
const [error] = await catchError(fn(...args));
|
|
308769
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
308569
308770
|
if (error) {
|
|
308570
308771
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
308571
308772
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -308601,16 +308802,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
308601
308802
|
recordedFailure,
|
|
308602
308803
|
pollSignal: context.pollSignal
|
|
308603
308804
|
});
|
|
308604
|
-
|
|
308605
|
-
|
|
308805
|
+
const commandParams = extractCommandParams(command);
|
|
308806
|
+
if (props) {
|
|
308807
|
+
for (const key of Object.keys(props)) {
|
|
308808
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
308809
|
+
}
|
|
308810
|
+
}
|
|
308811
|
+
const baseProperties = redactProperties({
|
|
308812
|
+
...commandParams,
|
|
308606
308813
|
...props,
|
|
308607
308814
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
308608
308815
|
command: "true",
|
|
308609
|
-
duration: String(durationMs),
|
|
308610
|
-
success: String(success),
|
|
308611
308816
|
...terminalTelemetry,
|
|
308612
308817
|
...errorMessage ? { errorMessage } : {}
|
|
308613
|
-
})
|
|
308818
|
+
});
|
|
308819
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
308614
308820
|
});
|
|
308615
308821
|
};
|
|
308616
308822
|
// ../common/src/console-guard.ts
|
|
@@ -309808,7 +310014,7 @@ init_dist3();
|
|
|
309808
310014
|
// ../packager/packager-tool-flow/package.json
|
|
309809
310015
|
var package_default2 = {
|
|
309810
310016
|
name: "@uipath/packager-tool-flow",
|
|
309811
|
-
version: "1.199.0-preview.
|
|
310017
|
+
version: "1.199.0-preview.97",
|
|
309812
310018
|
description: "UiPath Flow tool implementation",
|
|
309813
310019
|
type: "module",
|
|
309814
310020
|
exports: {
|
|
@@ -358967,7 +359173,7 @@ class TextApiResponse {
|
|
|
358967
359173
|
var package_default3 = {
|
|
358968
359174
|
name: "@uipath/integrationservice-sdk",
|
|
358969
359175
|
license: "MIT",
|
|
358970
|
-
version: "1.199.0-preview.
|
|
359176
|
+
version: "1.199.0-preview.97",
|
|
358971
359177
|
repository: {
|
|
358972
359178
|
type: "git",
|
|
358973
359179
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -378288,7 +378494,7 @@ function querystringSingleKey4(key, value, keyPrefix = "") {
|
|
|
378288
378494
|
var package_default5 = {
|
|
378289
378495
|
name: "@uipath/solution-sdk",
|
|
378290
378496
|
license: "MIT",
|
|
378291
|
-
version: "1.199.0-preview.
|
|
378497
|
+
version: "1.199.0-preview.97",
|
|
378292
378498
|
repository: {
|
|
378293
378499
|
type: "git",
|
|
378294
378500
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -414017,10 +414223,33 @@ class NodeContextStorage2 {
|
|
|
414017
414223
|
return this.storage.getStore();
|
|
414018
414224
|
}
|
|
414019
414225
|
}
|
|
414226
|
+
var TELEMETRY_TRACEPARENT_ENV2 = "TRACEPARENT";
|
|
414227
|
+
var TRACEPARENT_PATTERN2 = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
414228
|
+
function getProcessEnv3() {
|
|
414229
|
+
return globalThis.process?.env;
|
|
414230
|
+
}
|
|
414231
|
+
function parseInboundTraceparent2(value) {
|
|
414232
|
+
if (!value) {
|
|
414233
|
+
return;
|
|
414234
|
+
}
|
|
414235
|
+
const match = TRACEPARENT_PATTERN2.exec(value.trim().toLowerCase());
|
|
414236
|
+
if (!match) {
|
|
414237
|
+
return;
|
|
414238
|
+
}
|
|
414239
|
+
const [, traceId, parentSpanId] = match;
|
|
414240
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
414241
|
+
return;
|
|
414242
|
+
}
|
|
414243
|
+
return { traceId, parentSpanId };
|
|
414244
|
+
}
|
|
414245
|
+
function getInboundTraceContext2() {
|
|
414246
|
+
return parseInboundTraceparent2(getProcessEnv3()?.[TELEMETRY_TRACEPARENT_ENV2]);
|
|
414247
|
+
}
|
|
414020
414248
|
var TELEMETRY_SESSION_ID_ENV2 = "UIPATH_SESSION_ID";
|
|
414021
414249
|
var TELEMETRY_SESSION_ID_PROPERTY2 = "session_id";
|
|
414022
414250
|
var telemetrySessionIdSlot2 = singleton3("TelemetrySessionId");
|
|
414023
|
-
|
|
414251
|
+
var telemetryOperationIdSlot2 = singleton3("TelemetryOperationId");
|
|
414252
|
+
function getProcessEnv22() {
|
|
414024
414253
|
return globalThis.process?.env;
|
|
414025
414254
|
}
|
|
414026
414255
|
function normalizeSessionId2(value) {
|
|
@@ -414031,15 +414260,159 @@ function normalizeSessionId2(value) {
|
|
|
414031
414260
|
return trimmed || undefined;
|
|
414032
414261
|
}
|
|
414033
414262
|
function getConfiguredTelemetrySessionId2() {
|
|
414034
|
-
return normalizeSessionId2(
|
|
414263
|
+
return normalizeSessionId2(getProcessEnv22()?.[TELEMETRY_SESSION_ID_ENV2]);
|
|
414035
414264
|
}
|
|
414036
414265
|
function resolveTelemetrySessionId2(existingSessionId) {
|
|
414037
414266
|
return getConfiguredTelemetrySessionId2() ?? normalizeSessionId2(existingSessionId);
|
|
414038
414267
|
}
|
|
414268
|
+
function getTelemetryOperationId2() {
|
|
414269
|
+
const existing = telemetryOperationIdSlot2.get();
|
|
414270
|
+
if (existing) {
|
|
414271
|
+
return existing;
|
|
414272
|
+
}
|
|
414273
|
+
const inboundTraceId = getInboundTraceContext2()?.traceId;
|
|
414274
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
414275
|
+
telemetryOperationIdSlot2.set(generated);
|
|
414276
|
+
return generated;
|
|
414277
|
+
}
|
|
414039
414278
|
var telemetryPropsSlot2 = singleton3("TelemetryDefaultProps");
|
|
414040
414279
|
function getGlobalTelemetryProperties2() {
|
|
414041
414280
|
return telemetryPropsSlot2.get();
|
|
414042
414281
|
}
|
|
414282
|
+
var REDACTED2 = "[REDACTED]";
|
|
414283
|
+
var MAX_VALUE_LENGTH2 = 200;
|
|
414284
|
+
var SENSITIVE_NAME_TOKENS2 = new Set([
|
|
414285
|
+
"token",
|
|
414286
|
+
"tokens",
|
|
414287
|
+
"secret",
|
|
414288
|
+
"secrets",
|
|
414289
|
+
"password",
|
|
414290
|
+
"passwords",
|
|
414291
|
+
"pwd",
|
|
414292
|
+
"credential",
|
|
414293
|
+
"credentials",
|
|
414294
|
+
"auth",
|
|
414295
|
+
"authentication",
|
|
414296
|
+
"authorization",
|
|
414297
|
+
"authority",
|
|
414298
|
+
"cert",
|
|
414299
|
+
"certificate",
|
|
414300
|
+
"certificates"
|
|
414301
|
+
]);
|
|
414302
|
+
var SENSITIVE_KEY_PREFIXES2 = new Set([
|
|
414303
|
+
"api",
|
|
414304
|
+
"access",
|
|
414305
|
+
"client",
|
|
414306
|
+
"private",
|
|
414307
|
+
"public",
|
|
414308
|
+
"signing",
|
|
414309
|
+
"encryption",
|
|
414310
|
+
"session",
|
|
414311
|
+
"master",
|
|
414312
|
+
"shared",
|
|
414313
|
+
"root",
|
|
414314
|
+
"ssh",
|
|
414315
|
+
"rsa",
|
|
414316
|
+
"aes",
|
|
414317
|
+
"hmac",
|
|
414318
|
+
"oauth"
|
|
414319
|
+
]);
|
|
414320
|
+
var 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;
|
|
414321
|
+
var EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
414322
|
+
var JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
414323
|
+
var LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
414324
|
+
var USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
414325
|
+
var URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
414326
|
+
var URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
|
|
414327
|
+
function shortHash2(input2) {
|
|
414328
|
+
let hash3 = 2166136261;
|
|
414329
|
+
for (let i3 = 0;i3 < input2.length; i3++) {
|
|
414330
|
+
hash3 ^= input2.charCodeAt(i3);
|
|
414331
|
+
hash3 = Math.imul(hash3, 16777619);
|
|
414332
|
+
}
|
|
414333
|
+
return (hash3 >>> 0).toString(16).padStart(8, "0");
|
|
414334
|
+
}
|
|
414335
|
+
function redactUrl2(raw) {
|
|
414336
|
+
try {
|
|
414337
|
+
const url5 = new URL(raw);
|
|
414338
|
+
return `${url5.protocol}//${url5.host}`;
|
|
414339
|
+
} catch {
|
|
414340
|
+
return `url#${shortHash2(raw)}`;
|
|
414341
|
+
}
|
|
414342
|
+
}
|
|
414343
|
+
function redactValueDetectors2(value) {
|
|
414344
|
+
let out = value;
|
|
414345
|
+
out = out.replace(JWT_PATTERN2, () => REDACTED2);
|
|
414346
|
+
out = out.replace(URL_PATTERN2, (match) => {
|
|
414347
|
+
const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
|
|
414348
|
+
const core22 = trailing ? match.slice(0, -trailing.length) : match;
|
|
414349
|
+
return `${redactUrl2(core22)}${trailing}`;
|
|
414350
|
+
});
|
|
414351
|
+
out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
414352
|
+
out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
|
|
414353
|
+
out = out.replace(UUID_PATTERN3, (match) => `uuid#${shortHash2(match)}`);
|
|
414354
|
+
out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
|
|
414355
|
+
if (out.length > MAX_VALUE_LENGTH2) {
|
|
414356
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
|
|
414357
|
+
}
|
|
414358
|
+
return out;
|
|
414359
|
+
}
|
|
414360
|
+
function redactValue2(value) {
|
|
414361
|
+
return redactValueDetectors2(value);
|
|
414362
|
+
}
|
|
414363
|
+
function redactError2(error95) {
|
|
414364
|
+
const safe = new Error(redactValueDetectors2(error95.message ?? ""));
|
|
414365
|
+
safe.name = error95.name;
|
|
414366
|
+
safe.stack = typeof error95.stack === "string" ? redactValueDetectors2(error95.stack) : undefined;
|
|
414367
|
+
return safe;
|
|
414368
|
+
}
|
|
414369
|
+
function nameTokens2(name2) {
|
|
414370
|
+
return name2.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t13) => t13.toLowerCase()).filter(Boolean);
|
|
414371
|
+
}
|
|
414372
|
+
function isSensitiveName2(name2) {
|
|
414373
|
+
const tokens = nameTokens2(name2);
|
|
414374
|
+
for (let i3 = 0;i3 < tokens.length; i3++) {
|
|
414375
|
+
const token = tokens[i3];
|
|
414376
|
+
if (SENSITIVE_NAME_TOKENS2.has(token)) {
|
|
414377
|
+
return true;
|
|
414378
|
+
}
|
|
414379
|
+
if (token === "key" || token === "keys") {
|
|
414380
|
+
const prev = tokens[i3 - 1];
|
|
414381
|
+
if (prev && SENSITIVE_KEY_PREFIXES2.has(prev)) {
|
|
414382
|
+
return true;
|
|
414383
|
+
}
|
|
414384
|
+
}
|
|
414385
|
+
}
|
|
414386
|
+
return false;
|
|
414387
|
+
}
|
|
414388
|
+
function redactProperty2(name2, value) {
|
|
414389
|
+
if (value === undefined || value === null) {
|
|
414390
|
+
return;
|
|
414391
|
+
}
|
|
414392
|
+
if (isSensitiveName2(name2)) {
|
|
414393
|
+
return REDACTED2;
|
|
414394
|
+
}
|
|
414395
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
414396
|
+
return value;
|
|
414397
|
+
}
|
|
414398
|
+
if (typeof value !== "string") {
|
|
414399
|
+
return "[OBJECT]";
|
|
414400
|
+
}
|
|
414401
|
+
return redactValueDetectors2(value);
|
|
414402
|
+
}
|
|
414403
|
+
function redactProperties2(properties) {
|
|
414404
|
+
const out = {};
|
|
414405
|
+
for (const [name2, value] of Object.entries(properties)) {
|
|
414406
|
+
const redacted = redactProperty2(name2, value);
|
|
414407
|
+
if (redacted !== undefined) {
|
|
414408
|
+
out[name2] = redacted;
|
|
414409
|
+
}
|
|
414410
|
+
}
|
|
414411
|
+
return out;
|
|
414412
|
+
}
|
|
414413
|
+
var TELEMETRY_OPERATION_ID_PROPERTY2 = "uip.trace.operation_id";
|
|
414414
|
+
var TELEMETRY_PARENT_ID_PROPERTY2 = "uip.trace.parent_id";
|
|
414415
|
+
var TELEMETRY_SPAN_ID_PROPERTY2 = "uip.trace.span_id";
|
|
414043
414416
|
|
|
414044
414417
|
class TelemetryService2 {
|
|
414045
414418
|
telemetryProvider;
|
|
@@ -414067,11 +414440,15 @@ class TelemetryService2 {
|
|
|
414067
414440
|
trackException(error95, properties) {
|
|
414068
414441
|
const context = this.getCurrentContext();
|
|
414069
414442
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
414070
|
-
this.telemetryProvider.trackException(error95, enrichedProperties);
|
|
414443
|
+
this.telemetryProvider.trackException(redactError2(error95), enrichedProperties);
|
|
414071
414444
|
}
|
|
414072
414445
|
async trackRequest(name2, fn2, properties) {
|
|
414446
|
+
const parentContext = this.getCurrentContext();
|
|
414447
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId2();
|
|
414448
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
414073
414449
|
const context = {
|
|
414074
|
-
operationId
|
|
414450
|
+
operationId,
|
|
414451
|
+
...parentId !== undefined ? { parentId } : {},
|
|
414075
414452
|
id: this.generateId()
|
|
414076
414453
|
};
|
|
414077
414454
|
const startTime = performance.now();
|
|
@@ -414089,6 +414466,45 @@ class TelemetryService2 {
|
|
|
414089
414466
|
throw error95;
|
|
414090
414467
|
}
|
|
414091
414468
|
}
|
|
414469
|
+
trackRequestResult(name2, durationMs, success5, properties, context) {
|
|
414470
|
+
const requestContext = context ?? {
|
|
414471
|
+
operationId: this.operationId ?? getTelemetryOperationId2(),
|
|
414472
|
+
id: this.generateId()
|
|
414473
|
+
};
|
|
414474
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
414475
|
+
this.telemetryProvider.trackRequest(name2, durationMs, success5, enrichedProperties);
|
|
414476
|
+
}
|
|
414477
|
+
createRequestContext() {
|
|
414478
|
+
const operationId = this.operationId ?? getTelemetryOperationId2();
|
|
414479
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
414480
|
+
return {
|
|
414481
|
+
operationId,
|
|
414482
|
+
...parentId !== undefined ? { parentId } : {},
|
|
414483
|
+
id: this.generateId()
|
|
414484
|
+
};
|
|
414485
|
+
}
|
|
414486
|
+
inboundParentIdFor(operationId) {
|
|
414487
|
+
const inbound = getInboundTraceContext2();
|
|
414488
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
414489
|
+
}
|
|
414490
|
+
runWithContext(context, fn2) {
|
|
414491
|
+
return this.contextStorage.run(context, fn2);
|
|
414492
|
+
}
|
|
414493
|
+
createDependencyContext() {
|
|
414494
|
+
const parentContext = this.getCurrentContext();
|
|
414495
|
+
if (!parentContext) {
|
|
414496
|
+
return;
|
|
414497
|
+
}
|
|
414498
|
+
return {
|
|
414499
|
+
operationId: parentContext.operationId,
|
|
414500
|
+
parentId: parentContext.id,
|
|
414501
|
+
id: this.generateId()
|
|
414502
|
+
};
|
|
414503
|
+
}
|
|
414504
|
+
trackDependencyResult(name2, type22, durationMs, success5, properties, context, resultCode) {
|
|
414505
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
414506
|
+
this.telemetryProvider.trackDependency(redactValue2(name2), type22, durationMs, success5, enrichedProperties, resultCode);
|
|
414507
|
+
}
|
|
414092
414508
|
async trackDependencyOperation(name2, type22, fn2, properties) {
|
|
414093
414509
|
const parentContext = this.getCurrentContext();
|
|
414094
414510
|
if (!parentContext) {
|
|
@@ -414125,8 +414541,12 @@ class TelemetryService2 {
|
|
|
414125
414541
|
...getExecutionContextTelemetryProperties2(),
|
|
414126
414542
|
...globalProperties,
|
|
414127
414543
|
...this.defaultProperties,
|
|
414128
|
-
...properties,
|
|
414129
|
-
...context
|
|
414544
|
+
...redactProperties2(properties ?? {}),
|
|
414545
|
+
...context ? {
|
|
414546
|
+
[TELEMETRY_OPERATION_ID_PROPERTY2]: context.operationId,
|
|
414547
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY2]: context.parentId } : {},
|
|
414548
|
+
[TELEMETRY_SPAN_ID_PROPERTY2]: context.id
|
|
414549
|
+
} : {}
|
|
414130
414550
|
};
|
|
414131
414551
|
if (sessionId === undefined) {
|
|
414132
414552
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY2];
|
|
@@ -414136,7 +414556,16 @@ class TelemetryService2 {
|
|
|
414136
414556
|
return enriched;
|
|
414137
414557
|
}
|
|
414138
414558
|
generateId() {
|
|
414139
|
-
|
|
414559
|
+
const bytes = new Uint8Array(8);
|
|
414560
|
+
let hex4 = "";
|
|
414561
|
+
do {
|
|
414562
|
+
crypto.getRandomValues(bytes);
|
|
414563
|
+
hex4 = "";
|
|
414564
|
+
for (const byte of bytes) {
|
|
414565
|
+
hex4 += byte.toString(16).padStart(2, "0");
|
|
414566
|
+
}
|
|
414567
|
+
} while (/^0+$/.test(hex4));
|
|
414568
|
+
return hex4;
|
|
414140
414569
|
}
|
|
414141
414570
|
}
|
|
414142
414571
|
var providerSlot2 = singleton3("TelemetryProvider");
|
|
@@ -414833,149 +415262,24 @@ function buildCommandTelemetryAttribution2(commandPath, skillSource) {
|
|
|
414833
415262
|
...getCommandProductModeAttribution2(commandPath)
|
|
414834
415263
|
};
|
|
414835
415264
|
}
|
|
414836
|
-
var REDACTED2 = "[REDACTED]";
|
|
414837
|
-
var MAX_VALUE_LENGTH2 = 200;
|
|
414838
|
-
var SENSITIVE_NAME_TOKENS2 = new Set([
|
|
414839
|
-
"token",
|
|
414840
|
-
"tokens",
|
|
414841
|
-
"secret",
|
|
414842
|
-
"secrets",
|
|
414843
|
-
"password",
|
|
414844
|
-
"passwords",
|
|
414845
|
-
"pwd",
|
|
414846
|
-
"credential",
|
|
414847
|
-
"credentials",
|
|
414848
|
-
"auth",
|
|
414849
|
-
"authentication",
|
|
414850
|
-
"authorization",
|
|
414851
|
-
"authority",
|
|
414852
|
-
"cert",
|
|
414853
|
-
"certificate",
|
|
414854
|
-
"certificates"
|
|
414855
|
-
]);
|
|
414856
|
-
var SENSITIVE_KEY_PREFIXES2 = new Set([
|
|
414857
|
-
"api",
|
|
414858
|
-
"access",
|
|
414859
|
-
"client",
|
|
414860
|
-
"private",
|
|
414861
|
-
"public",
|
|
414862
|
-
"signing",
|
|
414863
|
-
"encryption",
|
|
414864
|
-
"session",
|
|
414865
|
-
"master",
|
|
414866
|
-
"shared",
|
|
414867
|
-
"root",
|
|
414868
|
-
"ssh",
|
|
414869
|
-
"rsa",
|
|
414870
|
-
"aes",
|
|
414871
|
-
"hmac",
|
|
414872
|
-
"oauth"
|
|
414873
|
-
]);
|
|
414874
|
-
var 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;
|
|
414875
|
-
var EMAIL_PATTERN2 = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
414876
|
-
var JWT_PATTERN2 = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
414877
|
-
var LONG_TOKEN_PATTERN2 = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
414878
|
-
var USER_HOME_PATTERN2 = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
414879
|
-
var URL_PATTERN2 = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
414880
|
-
var URL_TRAILING_PUNCT2 = /[.,;:!?)\]}>'"]+$/;
|
|
414881
|
-
function shortHash2(input2) {
|
|
414882
|
-
let hash3 = 2166136261;
|
|
414883
|
-
for (let i3 = 0;i3 < input2.length; i3++) {
|
|
414884
|
-
hash3 ^= input2.charCodeAt(i3);
|
|
414885
|
-
hash3 = Math.imul(hash3, 16777619);
|
|
414886
|
-
}
|
|
414887
|
-
return (hash3 >>> 0).toString(16).padStart(8, "0");
|
|
414888
|
-
}
|
|
414889
|
-
function redactUrl2(raw) {
|
|
414890
|
-
try {
|
|
414891
|
-
const url5 = new URL(raw);
|
|
414892
|
-
return `${url5.protocol}//${url5.host}`;
|
|
414893
|
-
} catch {
|
|
414894
|
-
return `url#${shortHash2(raw)}`;
|
|
414895
|
-
}
|
|
414896
|
-
}
|
|
414897
|
-
function redactValueDetectors2(value) {
|
|
414898
|
-
let out = value;
|
|
414899
|
-
out = out.replace(JWT_PATTERN2, () => REDACTED2);
|
|
414900
|
-
out = out.replace(URL_PATTERN2, (match) => {
|
|
414901
|
-
const trailing = match.match(URL_TRAILING_PUNCT2)?.[0] ?? "";
|
|
414902
|
-
const core22 = trailing ? match.slice(0, -trailing.length) : match;
|
|
414903
|
-
return `${redactUrl2(core22)}${trailing}`;
|
|
414904
|
-
});
|
|
414905
|
-
out = out.replace(USER_HOME_PATTERN2, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
414906
|
-
out = out.replace(EMAIL_PATTERN2, (match) => `email#${shortHash2(match)}`);
|
|
414907
|
-
out = out.replace(UUID_PATTERN3, (match) => `uuid#${shortHash2(match)}`);
|
|
414908
|
-
out = out.replace(LONG_TOKEN_PATTERN2, () => REDACTED2);
|
|
414909
|
-
if (out.length > MAX_VALUE_LENGTH2) {
|
|
414910
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH2)}…`;
|
|
414911
|
-
}
|
|
414912
|
-
return out;
|
|
414913
|
-
}
|
|
414914
|
-
function nameTokens2(name2) {
|
|
414915
|
-
return name2.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t13) => t13.toLowerCase()).filter(Boolean);
|
|
414916
|
-
}
|
|
414917
|
-
function isSensitiveName2(name2) {
|
|
414918
|
-
const tokens = nameTokens2(name2);
|
|
414919
|
-
for (let i3 = 0;i3 < tokens.length; i3++) {
|
|
414920
|
-
const token = tokens[i3];
|
|
414921
|
-
if (SENSITIVE_NAME_TOKENS2.has(token)) {
|
|
414922
|
-
return true;
|
|
414923
|
-
}
|
|
414924
|
-
if (token === "key" || token === "keys") {
|
|
414925
|
-
const prev = tokens[i3 - 1];
|
|
414926
|
-
if (prev && SENSITIVE_KEY_PREFIXES2.has(prev)) {
|
|
414927
|
-
return true;
|
|
414928
|
-
}
|
|
414929
|
-
}
|
|
414930
|
-
}
|
|
414931
|
-
return false;
|
|
414932
|
-
}
|
|
414933
|
-
function redactProperty2(name2, value) {
|
|
414934
|
-
if (value === undefined || value === null) {
|
|
414935
|
-
return;
|
|
414936
|
-
}
|
|
414937
|
-
if (isSensitiveName2(name2)) {
|
|
414938
|
-
return REDACTED2;
|
|
414939
|
-
}
|
|
414940
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
414941
|
-
return value;
|
|
414942
|
-
}
|
|
414943
|
-
if (typeof value !== "string") {
|
|
414944
|
-
return "[OBJECT]";
|
|
414945
|
-
}
|
|
414946
|
-
return redactValueDetectors2(value);
|
|
414947
|
-
}
|
|
414948
|
-
function redactProperties2(properties) {
|
|
414949
|
-
const out = {};
|
|
414950
|
-
for (const [name2, value] of Object.entries(properties)) {
|
|
414951
|
-
const redacted = redactProperty2(name2, value);
|
|
414952
|
-
if (redacted !== undefined) {
|
|
414953
|
-
out[name2] = redacted;
|
|
414954
|
-
}
|
|
414955
|
-
}
|
|
414956
|
-
return out;
|
|
414957
|
-
}
|
|
414958
415265
|
var pollSignalSlot2 = singleton3("PollSignal");
|
|
414959
415266
|
var cliErrorCodeValues2 = new Set(CLI_ERROR_CODES2);
|
|
414960
415267
|
var retryHintValues2 = new Set(RETRY_HINTS2);
|
|
415268
|
+
var TELEMETRY_COMMAND_ARG_PREFIX2 = "uip.cmd.arg.";
|
|
414961
415269
|
function extractCommandParams2(cmd) {
|
|
414962
415270
|
const params = {};
|
|
415271
|
+
const add22 = (name2, value) => {
|
|
415272
|
+
if (name2 && value !== undefined) {
|
|
415273
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX2}${name2}`] = value;
|
|
415274
|
+
}
|
|
415275
|
+
};
|
|
414963
415276
|
const registered = cmd.registeredArguments ?? [];
|
|
414964
415277
|
const processed = cmd.processedArgs ?? [];
|
|
414965
415278
|
for (let i3 = 0;i3 < registered.length; i3++) {
|
|
414966
|
-
|
|
414967
|
-
if (value === undefined) {
|
|
414968
|
-
continue;
|
|
414969
|
-
}
|
|
414970
|
-
const name2 = registered[i3].name();
|
|
414971
|
-
if (name2) {
|
|
414972
|
-
params[name2] = value;
|
|
414973
|
-
}
|
|
415279
|
+
add22(registered[i3].name(), processed[i3]);
|
|
414974
415280
|
}
|
|
414975
415281
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
414976
|
-
|
|
414977
|
-
params[key] = value;
|
|
414978
|
-
}
|
|
415282
|
+
add22(key, value);
|
|
414979
415283
|
}
|
|
414980
415284
|
return params;
|
|
414981
415285
|
}
|
|
@@ -415018,11 +415322,12 @@ Command3.prototype.trackedAction = function(context, fn2, properties) {
|
|
|
415018
415322
|
return this.action(async (...args) => {
|
|
415019
415323
|
const telemetryName = deriveCommandPath2(command);
|
|
415020
415324
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
415325
|
+
const requestContext = telemetry2.createRequestContext();
|
|
415021
415326
|
const startTime = performance.now();
|
|
415022
415327
|
let errorMessage2;
|
|
415023
415328
|
let fallbackExitCode = EXIT_CODES2.Success;
|
|
415024
415329
|
clearRecordedCommandFailureTelemetry2();
|
|
415025
|
-
const [error95] = await catchError3(fn2(...args));
|
|
415330
|
+
const [error95] = await catchError3(telemetry2.runWithContext(requestContext, () => fn2(...args)));
|
|
415026
415331
|
if (error95) {
|
|
415027
415332
|
errorMessage2 = error95 instanceof Error ? error95.message : String(error95);
|
|
415028
415333
|
logger3.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage2}`);
|
|
@@ -415058,16 +415363,21 @@ Command3.prototype.trackedAction = function(context, fn2, properties) {
|
|
|
415058
415363
|
recordedFailure,
|
|
415059
415364
|
pollSignal: context.pollSignal
|
|
415060
415365
|
});
|
|
415061
|
-
|
|
415062
|
-
|
|
415366
|
+
const commandParams = extractCommandParams2(command);
|
|
415367
|
+
if (props) {
|
|
415368
|
+
for (const key of Object.keys(props)) {
|
|
415369
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX2}${key}`];
|
|
415370
|
+
}
|
|
415371
|
+
}
|
|
415372
|
+
const baseProperties = redactProperties2({
|
|
415373
|
+
...commandParams,
|
|
415063
415374
|
...props,
|
|
415064
415375
|
...buildCommandTelemetryAttribution2(telemetryName, process.env.UIPATH_SKILL),
|
|
415065
415376
|
command: "true",
|
|
415066
|
-
duration: String(durationMs),
|
|
415067
|
-
success: String(success5),
|
|
415068
415377
|
...terminalTelemetry,
|
|
415069
415378
|
...errorMessage2 ? { errorMessage: errorMessage2 } : {}
|
|
415070
|
-
})
|
|
415379
|
+
});
|
|
415380
|
+
telemetry2.trackRequestResult(telemetryName, durationMs, success5, baseProperties, requestContext);
|
|
415071
415381
|
});
|
|
415072
415382
|
};
|
|
415073
415383
|
var guardInstalledSlot2 = singleton3("ConsoleGuardInstalled");
|
|
@@ -415423,7 +415733,7 @@ function querystringSingleKey6(key, value, keyPrefix = "") {
|
|
|
415423
415733
|
var package_default6 = {
|
|
415424
415734
|
name: "@uipath/solution-sdk",
|
|
415425
415735
|
license: "MIT",
|
|
415426
|
-
version: "1.199.0-preview.
|
|
415736
|
+
version: "1.199.0-preview.97",
|
|
415427
415737
|
repository: {
|
|
415428
415738
|
type: "git",
|
|
415429
415739
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -438739,7 +439049,7 @@ function querystringSingleKey7(key, value, keyPrefix = "") {
|
|
|
438739
439049
|
var package_default8 = {
|
|
438740
439050
|
name: "@uipath/agent-sdk",
|
|
438741
439051
|
license: "MIT",
|
|
438742
|
-
version: "1.199.0-preview.
|
|
439052
|
+
version: "1.199.0-preview.97",
|
|
438743
439053
|
description: "SDK for the UiPath Agent Runtime API — evaluation execution and debug sessions.",
|
|
438744
439054
|
repository: {
|
|
438745
439055
|
type: "git",
|
|
@@ -439487,4 +439797,4 @@ export {
|
|
|
439487
439797
|
metadata
|
|
439488
439798
|
};
|
|
439489
439799
|
|
|
439490
|
-
//# debugId=
|
|
439800
|
+
//# debugId=11D61AA774E2A21264756E2164756E21
|