@uipath/flow-tool 1.198.0-preview.94 → 1.198.0-preview.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/init.js +259 -152
- package/dist/packager-tool.js +2 -2
- package/dist/tool.js +506 -300
- package/dist/validation.js +259 -152
- package/package.json +2 -2
package/dist/init.js
CHANGED
|
@@ -166756,11 +166756,36 @@ class NodeContextStorage {
|
|
|
166756
166756
|
return this.storage.getStore();
|
|
166757
166757
|
}
|
|
166758
166758
|
}
|
|
166759
|
+
// ../common/src/telemetry/trace-context.ts
|
|
166760
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
166761
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
166762
|
+
function getProcessEnv() {
|
|
166763
|
+
return globalThis.process?.env;
|
|
166764
|
+
}
|
|
166765
|
+
function parseInboundTraceparent(value) {
|
|
166766
|
+
if (!value) {
|
|
166767
|
+
return;
|
|
166768
|
+
}
|
|
166769
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
166770
|
+
if (!match) {
|
|
166771
|
+
return;
|
|
166772
|
+
}
|
|
166773
|
+
const [, traceId, parentSpanId] = match;
|
|
166774
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
166775
|
+
return;
|
|
166776
|
+
}
|
|
166777
|
+
return { traceId, parentSpanId };
|
|
166778
|
+
}
|
|
166779
|
+
function getInboundTraceContext() {
|
|
166780
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
166781
|
+
}
|
|
166782
|
+
|
|
166759
166783
|
// ../common/src/telemetry/session-id.ts
|
|
166760
166784
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
166761
166785
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
166762
166786
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
166763
|
-
|
|
166787
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
166788
|
+
function getProcessEnv2() {
|
|
166764
166789
|
return globalThis.process?.env;
|
|
166765
166790
|
}
|
|
166766
166791
|
function normalizeSessionId(value) {
|
|
@@ -166771,18 +166796,165 @@ function normalizeSessionId(value) {
|
|
|
166771
166796
|
return trimmed || undefined;
|
|
166772
166797
|
}
|
|
166773
166798
|
function getConfiguredTelemetrySessionId() {
|
|
166774
|
-
return normalizeSessionId(
|
|
166799
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
166775
166800
|
}
|
|
166776
166801
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
166777
166802
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
166778
166803
|
}
|
|
166804
|
+
function getTelemetryOperationId() {
|
|
166805
|
+
const existing = telemetryOperationIdSlot.get();
|
|
166806
|
+
if (existing) {
|
|
166807
|
+
return existing;
|
|
166808
|
+
}
|
|
166809
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
166810
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
166811
|
+
telemetryOperationIdSlot.set(generated);
|
|
166812
|
+
return generated;
|
|
166813
|
+
}
|
|
166779
166814
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
166780
166815
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
166781
166816
|
function getGlobalTelemetryProperties() {
|
|
166782
166817
|
return telemetryPropsSlot.get();
|
|
166783
166818
|
}
|
|
166784
166819
|
|
|
166820
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
166821
|
+
var REDACTED = "[REDACTED]";
|
|
166822
|
+
var MAX_VALUE_LENGTH = 200;
|
|
166823
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
166824
|
+
"token",
|
|
166825
|
+
"tokens",
|
|
166826
|
+
"secret",
|
|
166827
|
+
"secrets",
|
|
166828
|
+
"password",
|
|
166829
|
+
"passwords",
|
|
166830
|
+
"pwd",
|
|
166831
|
+
"credential",
|
|
166832
|
+
"credentials",
|
|
166833
|
+
"auth",
|
|
166834
|
+
"authentication",
|
|
166835
|
+
"authorization",
|
|
166836
|
+
"authority",
|
|
166837
|
+
"cert",
|
|
166838
|
+
"certificate",
|
|
166839
|
+
"certificates"
|
|
166840
|
+
]);
|
|
166841
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
166842
|
+
"api",
|
|
166843
|
+
"access",
|
|
166844
|
+
"client",
|
|
166845
|
+
"private",
|
|
166846
|
+
"public",
|
|
166847
|
+
"signing",
|
|
166848
|
+
"encryption",
|
|
166849
|
+
"session",
|
|
166850
|
+
"master",
|
|
166851
|
+
"shared",
|
|
166852
|
+
"root",
|
|
166853
|
+
"ssh",
|
|
166854
|
+
"rsa",
|
|
166855
|
+
"aes",
|
|
166856
|
+
"hmac",
|
|
166857
|
+
"oauth"
|
|
166858
|
+
]);
|
|
166859
|
+
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;
|
|
166860
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
166861
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
166862
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
166863
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
166864
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
166865
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
166866
|
+
function shortHash(input) {
|
|
166867
|
+
let hash = 2166136261;
|
|
166868
|
+
for (let i = 0;i < input.length; i++) {
|
|
166869
|
+
hash ^= input.charCodeAt(i);
|
|
166870
|
+
hash = Math.imul(hash, 16777619);
|
|
166871
|
+
}
|
|
166872
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
166873
|
+
}
|
|
166874
|
+
function redactUrl(raw) {
|
|
166875
|
+
try {
|
|
166876
|
+
const url = new URL(raw);
|
|
166877
|
+
return `${url.protocol}//${url.host}`;
|
|
166878
|
+
} catch {
|
|
166879
|
+
return `url#${shortHash(raw)}`;
|
|
166880
|
+
}
|
|
166881
|
+
}
|
|
166882
|
+
function redactValueDetectors(value) {
|
|
166883
|
+
let out = value;
|
|
166884
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
166885
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
166886
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
166887
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
166888
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
166889
|
+
});
|
|
166890
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
166891
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
166892
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
166893
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
166894
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
166895
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
166896
|
+
}
|
|
166897
|
+
return out;
|
|
166898
|
+
}
|
|
166899
|
+
function redactValue(value) {
|
|
166900
|
+
return redactValueDetectors(value);
|
|
166901
|
+
}
|
|
166902
|
+
function redactError(error) {
|
|
166903
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
166904
|
+
safe.name = error.name;
|
|
166905
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
166906
|
+
return safe;
|
|
166907
|
+
}
|
|
166908
|
+
function nameTokens(name) {
|
|
166909
|
+
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);
|
|
166910
|
+
}
|
|
166911
|
+
function isSensitiveName(name) {
|
|
166912
|
+
const tokens = nameTokens(name);
|
|
166913
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
166914
|
+
const token = tokens[i];
|
|
166915
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
166916
|
+
return true;
|
|
166917
|
+
}
|
|
166918
|
+
if (token === "key" || token === "keys") {
|
|
166919
|
+
const prev = tokens[i - 1];
|
|
166920
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
166921
|
+
return true;
|
|
166922
|
+
}
|
|
166923
|
+
}
|
|
166924
|
+
}
|
|
166925
|
+
return false;
|
|
166926
|
+
}
|
|
166927
|
+
function redactProperty(name, value) {
|
|
166928
|
+
if (value === undefined || value === null) {
|
|
166929
|
+
return;
|
|
166930
|
+
}
|
|
166931
|
+
if (isSensitiveName(name)) {
|
|
166932
|
+
return REDACTED;
|
|
166933
|
+
}
|
|
166934
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
166935
|
+
return value;
|
|
166936
|
+
}
|
|
166937
|
+
if (typeof value !== "string") {
|
|
166938
|
+
return "[OBJECT]";
|
|
166939
|
+
}
|
|
166940
|
+
return redactValueDetectors(value);
|
|
166941
|
+
}
|
|
166942
|
+
function redactProperties(properties) {
|
|
166943
|
+
const out = {};
|
|
166944
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
166945
|
+
const redacted = redactProperty(name, value);
|
|
166946
|
+
if (redacted !== undefined) {
|
|
166947
|
+
out[name] = redacted;
|
|
166948
|
+
}
|
|
166949
|
+
}
|
|
166950
|
+
return out;
|
|
166951
|
+
}
|
|
166952
|
+
|
|
166785
166953
|
// ../common/src/telemetry/telemetry-service.ts
|
|
166954
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
166955
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
166956
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
166957
|
+
|
|
166786
166958
|
class TelemetryService {
|
|
166787
166959
|
telemetryProvider;
|
|
166788
166960
|
contextStorage;
|
|
@@ -166809,11 +166981,15 @@ class TelemetryService {
|
|
|
166809
166981
|
trackException(error, properties) {
|
|
166810
166982
|
const context = this.getCurrentContext();
|
|
166811
166983
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
166812
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
166984
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
166813
166985
|
}
|
|
166814
166986
|
async trackRequest(name, fn, properties) {
|
|
166987
|
+
const parentContext = this.getCurrentContext();
|
|
166988
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
166989
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
166815
166990
|
const context = {
|
|
166816
|
-
operationId
|
|
166991
|
+
operationId,
|
|
166992
|
+
...parentId !== undefined ? { parentId } : {},
|
|
166817
166993
|
id: this.generateId()
|
|
166818
166994
|
};
|
|
166819
166995
|
const startTime = performance.now();
|
|
@@ -166831,6 +167007,45 @@ class TelemetryService {
|
|
|
166831
167007
|
throw error;
|
|
166832
167008
|
}
|
|
166833
167009
|
}
|
|
167010
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
167011
|
+
const requestContext = context ?? {
|
|
167012
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
167013
|
+
id: this.generateId()
|
|
167014
|
+
};
|
|
167015
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
167016
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
167017
|
+
}
|
|
167018
|
+
createRequestContext() {
|
|
167019
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
167020
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
167021
|
+
return {
|
|
167022
|
+
operationId,
|
|
167023
|
+
...parentId !== undefined ? { parentId } : {},
|
|
167024
|
+
id: this.generateId()
|
|
167025
|
+
};
|
|
167026
|
+
}
|
|
167027
|
+
inboundParentIdFor(operationId) {
|
|
167028
|
+
const inbound = getInboundTraceContext();
|
|
167029
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
167030
|
+
}
|
|
167031
|
+
runWithContext(context, fn) {
|
|
167032
|
+
return this.contextStorage.run(context, fn);
|
|
167033
|
+
}
|
|
167034
|
+
createDependencyContext() {
|
|
167035
|
+
const parentContext = this.getCurrentContext();
|
|
167036
|
+
if (!parentContext) {
|
|
167037
|
+
return;
|
|
167038
|
+
}
|
|
167039
|
+
return {
|
|
167040
|
+
operationId: parentContext.operationId,
|
|
167041
|
+
parentId: parentContext.id,
|
|
167042
|
+
id: this.generateId()
|
|
167043
|
+
};
|
|
167044
|
+
}
|
|
167045
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
167046
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
167047
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
167048
|
+
}
|
|
166834
167049
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
166835
167050
|
const parentContext = this.getCurrentContext();
|
|
166836
167051
|
if (!parentContext) {
|
|
@@ -166867,8 +167082,12 @@ class TelemetryService {
|
|
|
166867
167082
|
...getExecutionContextTelemetryProperties(),
|
|
166868
167083
|
...globalProperties,
|
|
166869
167084
|
...this.defaultProperties,
|
|
166870
|
-
...properties,
|
|
166871
|
-
...context
|
|
167085
|
+
...redactProperties(properties ?? {}),
|
|
167086
|
+
...context ? {
|
|
167087
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
167088
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
167089
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
167090
|
+
} : {}
|
|
166872
167091
|
};
|
|
166873
167092
|
if (sessionId === undefined) {
|
|
166874
167093
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -166878,7 +167097,16 @@ class TelemetryService {
|
|
|
166878
167097
|
return enriched;
|
|
166879
167098
|
}
|
|
166880
167099
|
generateId() {
|
|
166881
|
-
|
|
167100
|
+
const bytes = new Uint8Array(8);
|
|
167101
|
+
let hex = "";
|
|
167102
|
+
do {
|
|
167103
|
+
crypto.getRandomValues(bytes);
|
|
167104
|
+
hex = "";
|
|
167105
|
+
for (const byte of bytes) {
|
|
167106
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
167107
|
+
}
|
|
167108
|
+
} while (/^0+$/.test(hex));
|
|
167109
|
+
return hex;
|
|
166882
167110
|
}
|
|
166883
167111
|
}
|
|
166884
167112
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -167580,152 +167808,25 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
167580
167808
|
};
|
|
167581
167809
|
}
|
|
167582
167810
|
|
|
167583
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
167584
|
-
var REDACTED = "[REDACTED]";
|
|
167585
|
-
var MAX_VALUE_LENGTH = 200;
|
|
167586
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
167587
|
-
"token",
|
|
167588
|
-
"tokens",
|
|
167589
|
-
"secret",
|
|
167590
|
-
"secrets",
|
|
167591
|
-
"password",
|
|
167592
|
-
"passwords",
|
|
167593
|
-
"pwd",
|
|
167594
|
-
"credential",
|
|
167595
|
-
"credentials",
|
|
167596
|
-
"auth",
|
|
167597
|
-
"authentication",
|
|
167598
|
-
"authorization",
|
|
167599
|
-
"authority",
|
|
167600
|
-
"cert",
|
|
167601
|
-
"certificate",
|
|
167602
|
-
"certificates"
|
|
167603
|
-
]);
|
|
167604
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
167605
|
-
"api",
|
|
167606
|
-
"access",
|
|
167607
|
-
"client",
|
|
167608
|
-
"private",
|
|
167609
|
-
"public",
|
|
167610
|
-
"signing",
|
|
167611
|
-
"encryption",
|
|
167612
|
-
"session",
|
|
167613
|
-
"master",
|
|
167614
|
-
"shared",
|
|
167615
|
-
"root",
|
|
167616
|
-
"ssh",
|
|
167617
|
-
"rsa",
|
|
167618
|
-
"aes",
|
|
167619
|
-
"hmac",
|
|
167620
|
-
"oauth"
|
|
167621
|
-
]);
|
|
167622
|
-
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;
|
|
167623
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
167624
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
167625
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
167626
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
167627
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
167628
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
167629
|
-
function shortHash(input) {
|
|
167630
|
-
let hash = 2166136261;
|
|
167631
|
-
for (let i = 0;i < input.length; i++) {
|
|
167632
|
-
hash ^= input.charCodeAt(i);
|
|
167633
|
-
hash = Math.imul(hash, 16777619);
|
|
167634
|
-
}
|
|
167635
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
167636
|
-
}
|
|
167637
|
-
function redactUrl(raw) {
|
|
167638
|
-
try {
|
|
167639
|
-
const url = new URL(raw);
|
|
167640
|
-
return `${url.protocol}//${url.host}`;
|
|
167641
|
-
} catch {
|
|
167642
|
-
return `url#${shortHash(raw)}`;
|
|
167643
|
-
}
|
|
167644
|
-
}
|
|
167645
|
-
function redactValueDetectors(value) {
|
|
167646
|
-
let out = value;
|
|
167647
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
167648
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
167649
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
167650
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
167651
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
167652
|
-
});
|
|
167653
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
167654
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
167655
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
167656
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
167657
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
167658
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
167659
|
-
}
|
|
167660
|
-
return out;
|
|
167661
|
-
}
|
|
167662
|
-
function nameTokens(name) {
|
|
167663
|
-
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);
|
|
167664
|
-
}
|
|
167665
|
-
function isSensitiveName(name) {
|
|
167666
|
-
const tokens = nameTokens(name);
|
|
167667
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
167668
|
-
const token = tokens[i];
|
|
167669
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
167670
|
-
return true;
|
|
167671
|
-
}
|
|
167672
|
-
if (token === "key" || token === "keys") {
|
|
167673
|
-
const prev = tokens[i - 1];
|
|
167674
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
167675
|
-
return true;
|
|
167676
|
-
}
|
|
167677
|
-
}
|
|
167678
|
-
}
|
|
167679
|
-
return false;
|
|
167680
|
-
}
|
|
167681
|
-
function redactProperty(name, value) {
|
|
167682
|
-
if (value === undefined || value === null) {
|
|
167683
|
-
return;
|
|
167684
|
-
}
|
|
167685
|
-
if (isSensitiveName(name)) {
|
|
167686
|
-
return REDACTED;
|
|
167687
|
-
}
|
|
167688
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
167689
|
-
return value;
|
|
167690
|
-
}
|
|
167691
|
-
if (typeof value !== "string") {
|
|
167692
|
-
return "[OBJECT]";
|
|
167693
|
-
}
|
|
167694
|
-
return redactValueDetectors(value);
|
|
167695
|
-
}
|
|
167696
|
-
function redactProperties(properties) {
|
|
167697
|
-
const out = {};
|
|
167698
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
167699
|
-
const redacted = redactProperty(name, value);
|
|
167700
|
-
if (redacted !== undefined) {
|
|
167701
|
-
out[name] = redacted;
|
|
167702
|
-
}
|
|
167703
|
-
}
|
|
167704
|
-
return out;
|
|
167705
|
-
}
|
|
167706
|
-
|
|
167707
167811
|
// ../common/src/trackedAction.ts
|
|
167708
167812
|
var pollSignalSlot = singleton("PollSignal");
|
|
167709
167813
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
167710
167814
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
167815
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
167711
167816
|
function extractCommandParams(cmd) {
|
|
167712
167817
|
const params = {};
|
|
167818
|
+
const add2 = (name, value) => {
|
|
167819
|
+
if (name && value !== undefined) {
|
|
167820
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
167821
|
+
}
|
|
167822
|
+
};
|
|
167713
167823
|
const registered = cmd.registeredArguments ?? [];
|
|
167714
167824
|
const processed = cmd.processedArgs ?? [];
|
|
167715
167825
|
for (let i = 0;i < registered.length; i++) {
|
|
167716
|
-
|
|
167717
|
-
if (value === undefined) {
|
|
167718
|
-
continue;
|
|
167719
|
-
}
|
|
167720
|
-
const name = registered[i].name();
|
|
167721
|
-
if (name) {
|
|
167722
|
-
params[name] = value;
|
|
167723
|
-
}
|
|
167826
|
+
add2(registered[i].name(), processed[i]);
|
|
167724
167827
|
}
|
|
167725
167828
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
167726
|
-
|
|
167727
|
-
params[key] = value;
|
|
167728
|
-
}
|
|
167829
|
+
add2(key, value);
|
|
167729
167830
|
}
|
|
167730
167831
|
return params;
|
|
167731
167832
|
}
|
|
@@ -167768,11 +167869,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
167768
167869
|
return this.action(async (...args) => {
|
|
167769
167870
|
const telemetryName = deriveCommandPath(command);
|
|
167770
167871
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
167872
|
+
const requestContext = telemetry.createRequestContext();
|
|
167771
167873
|
const startTime = performance.now();
|
|
167772
167874
|
let errorMessage;
|
|
167773
167875
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
167774
167876
|
clearRecordedCommandFailureTelemetry();
|
|
167775
|
-
const [error] = await catchError(fn(...args));
|
|
167877
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
167776
167878
|
if (error) {
|
|
167777
167879
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
167778
167880
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -167808,16 +167910,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
167808
167910
|
recordedFailure,
|
|
167809
167911
|
pollSignal: context.pollSignal
|
|
167810
167912
|
});
|
|
167811
|
-
|
|
167812
|
-
|
|
167913
|
+
const commandParams = extractCommandParams(command);
|
|
167914
|
+
if (props) {
|
|
167915
|
+
for (const key of Object.keys(props)) {
|
|
167916
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
167917
|
+
}
|
|
167918
|
+
}
|
|
167919
|
+
const baseProperties = redactProperties({
|
|
167920
|
+
...commandParams,
|
|
167813
167921
|
...props,
|
|
167814
167922
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
167815
167923
|
command: "true",
|
|
167816
|
-
duration: String(durationMs),
|
|
167817
|
-
success: String(success),
|
|
167818
167924
|
...terminalTelemetry,
|
|
167819
167925
|
...errorMessage ? { errorMessage } : {}
|
|
167820
|
-
})
|
|
167926
|
+
});
|
|
167927
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
167821
167928
|
});
|
|
167822
167929
|
};
|
|
167823
167930
|
// ../common/src/console-guard.ts
|
|
@@ -195586,7 +195693,7 @@ class TextApiResponse {
|
|
|
195586
195693
|
var package_default = {
|
|
195587
195694
|
name: "@uipath/integrationservice-sdk",
|
|
195588
195695
|
license: "MIT",
|
|
195589
|
-
version: "1.198.0-preview.
|
|
195696
|
+
version: "1.198.0-preview.96",
|
|
195590
195697
|
repository: {
|
|
195591
195698
|
type: "git",
|
|
195592
195699
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -202380,7 +202487,7 @@ function querystringSingleKey4(key, value, keyPrefix = "") {
|
|
|
202380
202487
|
var package_default3 = {
|
|
202381
202488
|
name: "@uipath/solution-sdk",
|
|
202382
202489
|
license: "MIT",
|
|
202383
|
-
version: "1.198.0-preview.
|
|
202490
|
+
version: "1.198.0-preview.96",
|
|
202384
202491
|
repository: {
|
|
202385
202492
|
type: "git",
|
|
202386
202493
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -204916,7 +205023,7 @@ init_dist2();
|
|
|
204916
205023
|
// ../packager/packager-tool-flow/package.json
|
|
204917
205024
|
var package_default4 = {
|
|
204918
205025
|
name: "@uipath/packager-tool-flow",
|
|
204919
|
-
version: "1.198.0-preview.
|
|
205026
|
+
version: "1.198.0-preview.96",
|
|
204920
205027
|
description: "UiPath Flow tool implementation",
|
|
204921
205028
|
type: "module",
|
|
204922
205029
|
exports: {
|
|
@@ -218779,4 +218886,4 @@ export {
|
|
|
218779
218886
|
flowInitAsync
|
|
218780
218887
|
};
|
|
218781
218888
|
|
|
218782
|
-
//# debugId=
|
|
218889
|
+
//# debugId=0729CBB9F738494664756E2164756E21
|
package/dist/packager-tool.js
CHANGED
|
@@ -159846,7 +159846,7 @@ init_dist6();
|
|
|
159846
159846
|
// ../packager/packager-tool-flow/package.json
|
|
159847
159847
|
var package_default = {
|
|
159848
159848
|
name: "@uipath/packager-tool-flow",
|
|
159849
|
-
version: "1.198.0-preview.
|
|
159849
|
+
version: "1.198.0-preview.96",
|
|
159850
159850
|
description: "UiPath Flow tool implementation",
|
|
159851
159851
|
type: "module",
|
|
159852
159852
|
exports: {
|
|
@@ -174563,4 +174563,4 @@ var toolsFactoryRepository2 = _global2[REGISTRY_KEY2];
|
|
|
174563
174563
|
// src/packager-tool.ts
|
|
174564
174564
|
toolsFactoryRepository2.registerProjectToolFactory(new FlowToolFactory);
|
|
174565
174565
|
|
|
174566
|
-
//# debugId=
|
|
174566
|
+
//# debugId=0BD24D21489666FF64756E2164756E21
|