@uipath/flow-tool 1.199.0-preview.91 → 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/validation.js
CHANGED
|
@@ -200705,11 +200705,36 @@ class NodeContextStorage {
|
|
|
200705
200705
|
return this.storage.getStore();
|
|
200706
200706
|
}
|
|
200707
200707
|
}
|
|
200708
|
+
// ../common/src/telemetry/trace-context.ts
|
|
200709
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
200710
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
200711
|
+
function getProcessEnv() {
|
|
200712
|
+
return globalThis.process?.env;
|
|
200713
|
+
}
|
|
200714
|
+
function parseInboundTraceparent(value) {
|
|
200715
|
+
if (!value) {
|
|
200716
|
+
return;
|
|
200717
|
+
}
|
|
200718
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
200719
|
+
if (!match) {
|
|
200720
|
+
return;
|
|
200721
|
+
}
|
|
200722
|
+
const [, traceId, parentSpanId] = match;
|
|
200723
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
200724
|
+
return;
|
|
200725
|
+
}
|
|
200726
|
+
return { traceId, parentSpanId };
|
|
200727
|
+
}
|
|
200728
|
+
function getInboundTraceContext() {
|
|
200729
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
200730
|
+
}
|
|
200731
|
+
|
|
200708
200732
|
// ../common/src/telemetry/session-id.ts
|
|
200709
200733
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
200710
200734
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
200711
200735
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
200712
|
-
|
|
200736
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
200737
|
+
function getProcessEnv2() {
|
|
200713
200738
|
return globalThis.process?.env;
|
|
200714
200739
|
}
|
|
200715
200740
|
function normalizeSessionId(value) {
|
|
@@ -200720,18 +200745,165 @@ function normalizeSessionId(value) {
|
|
|
200720
200745
|
return trimmed || undefined;
|
|
200721
200746
|
}
|
|
200722
200747
|
function getConfiguredTelemetrySessionId() {
|
|
200723
|
-
return normalizeSessionId(
|
|
200748
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
200724
200749
|
}
|
|
200725
200750
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
200726
200751
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
200727
200752
|
}
|
|
200753
|
+
function getTelemetryOperationId() {
|
|
200754
|
+
const existing = telemetryOperationIdSlot.get();
|
|
200755
|
+
if (existing) {
|
|
200756
|
+
return existing;
|
|
200757
|
+
}
|
|
200758
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
200759
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
200760
|
+
telemetryOperationIdSlot.set(generated);
|
|
200761
|
+
return generated;
|
|
200762
|
+
}
|
|
200728
200763
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
200729
200764
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
200730
200765
|
function getGlobalTelemetryProperties() {
|
|
200731
200766
|
return telemetryPropsSlot.get();
|
|
200732
200767
|
}
|
|
200733
200768
|
|
|
200769
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
200770
|
+
var REDACTED = "[REDACTED]";
|
|
200771
|
+
var MAX_VALUE_LENGTH = 200;
|
|
200772
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
200773
|
+
"token",
|
|
200774
|
+
"tokens",
|
|
200775
|
+
"secret",
|
|
200776
|
+
"secrets",
|
|
200777
|
+
"password",
|
|
200778
|
+
"passwords",
|
|
200779
|
+
"pwd",
|
|
200780
|
+
"credential",
|
|
200781
|
+
"credentials",
|
|
200782
|
+
"auth",
|
|
200783
|
+
"authentication",
|
|
200784
|
+
"authorization",
|
|
200785
|
+
"authority",
|
|
200786
|
+
"cert",
|
|
200787
|
+
"certificate",
|
|
200788
|
+
"certificates"
|
|
200789
|
+
]);
|
|
200790
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
200791
|
+
"api",
|
|
200792
|
+
"access",
|
|
200793
|
+
"client",
|
|
200794
|
+
"private",
|
|
200795
|
+
"public",
|
|
200796
|
+
"signing",
|
|
200797
|
+
"encryption",
|
|
200798
|
+
"session",
|
|
200799
|
+
"master",
|
|
200800
|
+
"shared",
|
|
200801
|
+
"root",
|
|
200802
|
+
"ssh",
|
|
200803
|
+
"rsa",
|
|
200804
|
+
"aes",
|
|
200805
|
+
"hmac",
|
|
200806
|
+
"oauth"
|
|
200807
|
+
]);
|
|
200808
|
+
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;
|
|
200809
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
200810
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
200811
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
200812
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
200813
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
200814
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
200815
|
+
function shortHash(input) {
|
|
200816
|
+
let hash = 2166136261;
|
|
200817
|
+
for (let i = 0;i < input.length; i++) {
|
|
200818
|
+
hash ^= input.charCodeAt(i);
|
|
200819
|
+
hash = Math.imul(hash, 16777619);
|
|
200820
|
+
}
|
|
200821
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
200822
|
+
}
|
|
200823
|
+
function redactUrl(raw) {
|
|
200824
|
+
try {
|
|
200825
|
+
const url = new URL(raw);
|
|
200826
|
+
return `${url.protocol}//${url.host}`;
|
|
200827
|
+
} catch {
|
|
200828
|
+
return `url#${shortHash(raw)}`;
|
|
200829
|
+
}
|
|
200830
|
+
}
|
|
200831
|
+
function redactValueDetectors(value) {
|
|
200832
|
+
let out = value;
|
|
200833
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
200834
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
200835
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
200836
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
200837
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
200838
|
+
});
|
|
200839
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
200840
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
200841
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
200842
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
200843
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
200844
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
200845
|
+
}
|
|
200846
|
+
return out;
|
|
200847
|
+
}
|
|
200848
|
+
function redactValue(value) {
|
|
200849
|
+
return redactValueDetectors(value);
|
|
200850
|
+
}
|
|
200851
|
+
function redactError(error) {
|
|
200852
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
200853
|
+
safe.name = error.name;
|
|
200854
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
200855
|
+
return safe;
|
|
200856
|
+
}
|
|
200857
|
+
function nameTokens(name) {
|
|
200858
|
+
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);
|
|
200859
|
+
}
|
|
200860
|
+
function isSensitiveName(name) {
|
|
200861
|
+
const tokens = nameTokens(name);
|
|
200862
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
200863
|
+
const token = tokens[i];
|
|
200864
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
200865
|
+
return true;
|
|
200866
|
+
}
|
|
200867
|
+
if (token === "key" || token === "keys") {
|
|
200868
|
+
const prev = tokens[i - 1];
|
|
200869
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
200870
|
+
return true;
|
|
200871
|
+
}
|
|
200872
|
+
}
|
|
200873
|
+
}
|
|
200874
|
+
return false;
|
|
200875
|
+
}
|
|
200876
|
+
function redactProperty(name, value) {
|
|
200877
|
+
if (value === undefined || value === null) {
|
|
200878
|
+
return;
|
|
200879
|
+
}
|
|
200880
|
+
if (isSensitiveName(name)) {
|
|
200881
|
+
return REDACTED;
|
|
200882
|
+
}
|
|
200883
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
200884
|
+
return value;
|
|
200885
|
+
}
|
|
200886
|
+
if (typeof value !== "string") {
|
|
200887
|
+
return "[OBJECT]";
|
|
200888
|
+
}
|
|
200889
|
+
return redactValueDetectors(value);
|
|
200890
|
+
}
|
|
200891
|
+
function redactProperties(properties) {
|
|
200892
|
+
const out = {};
|
|
200893
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
200894
|
+
const redacted = redactProperty(name, value);
|
|
200895
|
+
if (redacted !== undefined) {
|
|
200896
|
+
out[name] = redacted;
|
|
200897
|
+
}
|
|
200898
|
+
}
|
|
200899
|
+
return out;
|
|
200900
|
+
}
|
|
200901
|
+
|
|
200734
200902
|
// ../common/src/telemetry/telemetry-service.ts
|
|
200903
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
200904
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
200905
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
200906
|
+
|
|
200735
200907
|
class TelemetryService {
|
|
200736
200908
|
telemetryProvider;
|
|
200737
200909
|
contextStorage;
|
|
@@ -200758,11 +200930,15 @@ class TelemetryService {
|
|
|
200758
200930
|
trackException(error, properties) {
|
|
200759
200931
|
const context = this.getCurrentContext();
|
|
200760
200932
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
200761
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
200933
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
200762
200934
|
}
|
|
200763
200935
|
async trackRequest(name, fn, properties) {
|
|
200936
|
+
const parentContext = this.getCurrentContext();
|
|
200937
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
200938
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
200764
200939
|
const context = {
|
|
200765
|
-
operationId
|
|
200940
|
+
operationId,
|
|
200941
|
+
...parentId !== undefined ? { parentId } : {},
|
|
200766
200942
|
id: this.generateId()
|
|
200767
200943
|
};
|
|
200768
200944
|
const startTime = performance.now();
|
|
@@ -200780,6 +200956,45 @@ class TelemetryService {
|
|
|
200780
200956
|
throw error;
|
|
200781
200957
|
}
|
|
200782
200958
|
}
|
|
200959
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
200960
|
+
const requestContext = context ?? {
|
|
200961
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
200962
|
+
id: this.generateId()
|
|
200963
|
+
};
|
|
200964
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
200965
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
200966
|
+
}
|
|
200967
|
+
createRequestContext() {
|
|
200968
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
200969
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
200970
|
+
return {
|
|
200971
|
+
operationId,
|
|
200972
|
+
...parentId !== undefined ? { parentId } : {},
|
|
200973
|
+
id: this.generateId()
|
|
200974
|
+
};
|
|
200975
|
+
}
|
|
200976
|
+
inboundParentIdFor(operationId) {
|
|
200977
|
+
const inbound = getInboundTraceContext();
|
|
200978
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
200979
|
+
}
|
|
200980
|
+
runWithContext(context, fn) {
|
|
200981
|
+
return this.contextStorage.run(context, fn);
|
|
200982
|
+
}
|
|
200983
|
+
createDependencyContext() {
|
|
200984
|
+
const parentContext = this.getCurrentContext();
|
|
200985
|
+
if (!parentContext) {
|
|
200986
|
+
return;
|
|
200987
|
+
}
|
|
200988
|
+
return {
|
|
200989
|
+
operationId: parentContext.operationId,
|
|
200990
|
+
parentId: parentContext.id,
|
|
200991
|
+
id: this.generateId()
|
|
200992
|
+
};
|
|
200993
|
+
}
|
|
200994
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
200995
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
200996
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
200997
|
+
}
|
|
200783
200998
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
200784
200999
|
const parentContext = this.getCurrentContext();
|
|
200785
201000
|
if (!parentContext) {
|
|
@@ -200816,8 +201031,12 @@ class TelemetryService {
|
|
|
200816
201031
|
...getExecutionContextTelemetryProperties(),
|
|
200817
201032
|
...globalProperties,
|
|
200818
201033
|
...this.defaultProperties,
|
|
200819
|
-
...properties,
|
|
200820
|
-
...context
|
|
201034
|
+
...redactProperties(properties ?? {}),
|
|
201035
|
+
...context ? {
|
|
201036
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
201037
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
201038
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
201039
|
+
} : {}
|
|
200821
201040
|
};
|
|
200822
201041
|
if (sessionId === undefined) {
|
|
200823
201042
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -200827,7 +201046,16 @@ class TelemetryService {
|
|
|
200827
201046
|
return enriched;
|
|
200828
201047
|
}
|
|
200829
201048
|
generateId() {
|
|
200830
|
-
|
|
201049
|
+
const bytes = new Uint8Array(8);
|
|
201050
|
+
let hex = "";
|
|
201051
|
+
do {
|
|
201052
|
+
crypto.getRandomValues(bytes);
|
|
201053
|
+
hex = "";
|
|
201054
|
+
for (const byte of bytes) {
|
|
201055
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
201056
|
+
}
|
|
201057
|
+
} while (/^0+$/.test(hex));
|
|
201058
|
+
return hex;
|
|
200831
201059
|
}
|
|
200832
201060
|
}
|
|
200833
201061
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -201530,152 +201758,25 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
201530
201758
|
};
|
|
201531
201759
|
}
|
|
201532
201760
|
|
|
201533
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
201534
|
-
var REDACTED = "[REDACTED]";
|
|
201535
|
-
var MAX_VALUE_LENGTH = 200;
|
|
201536
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
201537
|
-
"token",
|
|
201538
|
-
"tokens",
|
|
201539
|
-
"secret",
|
|
201540
|
-
"secrets",
|
|
201541
|
-
"password",
|
|
201542
|
-
"passwords",
|
|
201543
|
-
"pwd",
|
|
201544
|
-
"credential",
|
|
201545
|
-
"credentials",
|
|
201546
|
-
"auth",
|
|
201547
|
-
"authentication",
|
|
201548
|
-
"authorization",
|
|
201549
|
-
"authority",
|
|
201550
|
-
"cert",
|
|
201551
|
-
"certificate",
|
|
201552
|
-
"certificates"
|
|
201553
|
-
]);
|
|
201554
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
201555
|
-
"api",
|
|
201556
|
-
"access",
|
|
201557
|
-
"client",
|
|
201558
|
-
"private",
|
|
201559
|
-
"public",
|
|
201560
|
-
"signing",
|
|
201561
|
-
"encryption",
|
|
201562
|
-
"session",
|
|
201563
|
-
"master",
|
|
201564
|
-
"shared",
|
|
201565
|
-
"root",
|
|
201566
|
-
"ssh",
|
|
201567
|
-
"rsa",
|
|
201568
|
-
"aes",
|
|
201569
|
-
"hmac",
|
|
201570
|
-
"oauth"
|
|
201571
|
-
]);
|
|
201572
|
-
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;
|
|
201573
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
201574
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
201575
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
201576
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
201577
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
201578
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
201579
|
-
function shortHash(input) {
|
|
201580
|
-
let hash = 2166136261;
|
|
201581
|
-
for (let i = 0;i < input.length; i++) {
|
|
201582
|
-
hash ^= input.charCodeAt(i);
|
|
201583
|
-
hash = Math.imul(hash, 16777619);
|
|
201584
|
-
}
|
|
201585
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
201586
|
-
}
|
|
201587
|
-
function redactUrl(raw) {
|
|
201588
|
-
try {
|
|
201589
|
-
const url = new URL(raw);
|
|
201590
|
-
return `${url.protocol}//${url.host}`;
|
|
201591
|
-
} catch {
|
|
201592
|
-
return `url#${shortHash(raw)}`;
|
|
201593
|
-
}
|
|
201594
|
-
}
|
|
201595
|
-
function redactValueDetectors(value) {
|
|
201596
|
-
let out = value;
|
|
201597
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
201598
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
201599
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
201600
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
201601
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
201602
|
-
});
|
|
201603
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
201604
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
201605
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
201606
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
201607
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
201608
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
201609
|
-
}
|
|
201610
|
-
return out;
|
|
201611
|
-
}
|
|
201612
|
-
function nameTokens(name) {
|
|
201613
|
-
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);
|
|
201614
|
-
}
|
|
201615
|
-
function isSensitiveName(name) {
|
|
201616
|
-
const tokens = nameTokens(name);
|
|
201617
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
201618
|
-
const token = tokens[i];
|
|
201619
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
201620
|
-
return true;
|
|
201621
|
-
}
|
|
201622
|
-
if (token === "key" || token === "keys") {
|
|
201623
|
-
const prev = tokens[i - 1];
|
|
201624
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
201625
|
-
return true;
|
|
201626
|
-
}
|
|
201627
|
-
}
|
|
201628
|
-
}
|
|
201629
|
-
return false;
|
|
201630
|
-
}
|
|
201631
|
-
function redactProperty(name, value) {
|
|
201632
|
-
if (value === undefined || value === null) {
|
|
201633
|
-
return;
|
|
201634
|
-
}
|
|
201635
|
-
if (isSensitiveName(name)) {
|
|
201636
|
-
return REDACTED;
|
|
201637
|
-
}
|
|
201638
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
201639
|
-
return value;
|
|
201640
|
-
}
|
|
201641
|
-
if (typeof value !== "string") {
|
|
201642
|
-
return "[OBJECT]";
|
|
201643
|
-
}
|
|
201644
|
-
return redactValueDetectors(value);
|
|
201645
|
-
}
|
|
201646
|
-
function redactProperties(properties) {
|
|
201647
|
-
const out = {};
|
|
201648
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
201649
|
-
const redacted = redactProperty(name, value);
|
|
201650
|
-
if (redacted !== undefined) {
|
|
201651
|
-
out[name] = redacted;
|
|
201652
|
-
}
|
|
201653
|
-
}
|
|
201654
|
-
return out;
|
|
201655
|
-
}
|
|
201656
|
-
|
|
201657
201761
|
// ../common/src/trackedAction.ts
|
|
201658
201762
|
var pollSignalSlot = singleton("PollSignal");
|
|
201659
201763
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
201660
201764
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
201765
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
201661
201766
|
function extractCommandParams(cmd) {
|
|
201662
201767
|
const params = {};
|
|
201768
|
+
const add2 = (name, value) => {
|
|
201769
|
+
if (name && value !== undefined) {
|
|
201770
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
201771
|
+
}
|
|
201772
|
+
};
|
|
201663
201773
|
const registered = cmd.registeredArguments ?? [];
|
|
201664
201774
|
const processed = cmd.processedArgs ?? [];
|
|
201665
201775
|
for (let i = 0;i < registered.length; i++) {
|
|
201666
|
-
|
|
201667
|
-
if (value === undefined) {
|
|
201668
|
-
continue;
|
|
201669
|
-
}
|
|
201670
|
-
const name = registered[i].name();
|
|
201671
|
-
if (name) {
|
|
201672
|
-
params[name] = value;
|
|
201673
|
-
}
|
|
201776
|
+
add2(registered[i].name(), processed[i]);
|
|
201674
201777
|
}
|
|
201675
201778
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
201676
|
-
|
|
201677
|
-
params[key] = value;
|
|
201678
|
-
}
|
|
201779
|
+
add2(key, value);
|
|
201679
201780
|
}
|
|
201680
201781
|
return params;
|
|
201681
201782
|
}
|
|
@@ -201718,11 +201819,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
201718
201819
|
return this.action(async (...args) => {
|
|
201719
201820
|
const telemetryName = deriveCommandPath(command);
|
|
201720
201821
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
201822
|
+
const requestContext = telemetry.createRequestContext();
|
|
201721
201823
|
const startTime = performance.now();
|
|
201722
201824
|
let errorMessage2;
|
|
201723
201825
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
201724
201826
|
clearRecordedCommandFailureTelemetry();
|
|
201725
|
-
const [error] = await catchError2(fn(...args));
|
|
201827
|
+
const [error] = await catchError2(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
201726
201828
|
if (error) {
|
|
201727
201829
|
errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
201728
201830
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage2}`);
|
|
@@ -201758,16 +201860,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
201758
201860
|
recordedFailure,
|
|
201759
201861
|
pollSignal: context.pollSignal
|
|
201760
201862
|
});
|
|
201761
|
-
|
|
201762
|
-
|
|
201863
|
+
const commandParams = extractCommandParams(command);
|
|
201864
|
+
if (props) {
|
|
201865
|
+
for (const key of Object.keys(props)) {
|
|
201866
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
201867
|
+
}
|
|
201868
|
+
}
|
|
201869
|
+
const baseProperties = redactProperties({
|
|
201870
|
+
...commandParams,
|
|
201763
201871
|
...props,
|
|
201764
201872
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
201765
201873
|
command: "true",
|
|
201766
|
-
duration: String(durationMs),
|
|
201767
|
-
success: String(success),
|
|
201768
201874
|
...terminalTelemetry,
|
|
201769
201875
|
...errorMessage2 ? { errorMessage: errorMessage2 } : {}
|
|
201770
|
-
})
|
|
201876
|
+
});
|
|
201877
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
201771
201878
|
});
|
|
201772
201879
|
};
|
|
201773
201880
|
// ../common/src/console-guard.ts
|
|
@@ -231746,7 +231853,7 @@ function querystringSingleKey(key, value, keyPrefix = "") {
|
|
|
231746
231853
|
var package_default = {
|
|
231747
231854
|
name: "@uipath/solution-sdk",
|
|
231748
231855
|
license: "MIT",
|
|
231749
|
-
version: "1.199.0-preview.
|
|
231856
|
+
version: "1.199.0-preview.97",
|
|
231750
231857
|
repository: {
|
|
231751
231858
|
type: "git",
|
|
231752
231859
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -236745,7 +236852,7 @@ class TextApiResponse2 {
|
|
|
236745
236852
|
var package_default2 = {
|
|
236746
236853
|
name: "@uipath/integrationservice-sdk",
|
|
236747
236854
|
license: "MIT",
|
|
236748
|
-
version: "1.199.0-preview.
|
|
236855
|
+
version: "1.199.0-preview.97",
|
|
236749
236856
|
repository: {
|
|
236750
236857
|
type: "git",
|
|
236751
236858
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -245886,7 +245993,7 @@ init_dist2();
|
|
|
245886
245993
|
// ../packager/packager-tool-flow/package.json
|
|
245887
245994
|
var package_default4 = {
|
|
245888
245995
|
name: "@uipath/packager-tool-flow",
|
|
245889
|
-
version: "1.199.0-preview.
|
|
245996
|
+
version: "1.199.0-preview.97",
|
|
245890
245997
|
description: "UiPath Flow tool implementation",
|
|
245891
245998
|
type: "module",
|
|
245892
245999
|
exports: {
|
|
@@ -261640,4 +261747,4 @@ export {
|
|
|
261640
261747
|
FlowValidateService
|
|
261641
261748
|
};
|
|
261642
261749
|
|
|
261643
|
-
//# debugId=
|
|
261750
|
+
//# debugId=46AB9699B559451A64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/flow-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0-preview.
|
|
4
|
+
"version": "1.199.0-preview.97",
|
|
5
5
|
"description": "Create, debug, and run UiPath Flow projects and jobs.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"files": [
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "087ae21e842f27bde5eb0013892c9487bfe60568"
|
|
38
38
|
}
|