@uipath/flow-tool 1.198.0-preview.95 → 1.198.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/validation.js
CHANGED
|
@@ -186142,11 +186142,36 @@ class NodeContextStorage {
|
|
|
186142
186142
|
return this.storage.getStore();
|
|
186143
186143
|
}
|
|
186144
186144
|
}
|
|
186145
|
+
// ../common/src/telemetry/trace-context.ts
|
|
186146
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
186147
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
186148
|
+
function getProcessEnv() {
|
|
186149
|
+
return globalThis.process?.env;
|
|
186150
|
+
}
|
|
186151
|
+
function parseInboundTraceparent(value) {
|
|
186152
|
+
if (!value) {
|
|
186153
|
+
return;
|
|
186154
|
+
}
|
|
186155
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
186156
|
+
if (!match) {
|
|
186157
|
+
return;
|
|
186158
|
+
}
|
|
186159
|
+
const [, traceId, parentSpanId] = match;
|
|
186160
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
186161
|
+
return;
|
|
186162
|
+
}
|
|
186163
|
+
return { traceId, parentSpanId };
|
|
186164
|
+
}
|
|
186165
|
+
function getInboundTraceContext() {
|
|
186166
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
186167
|
+
}
|
|
186168
|
+
|
|
186145
186169
|
// ../common/src/telemetry/session-id.ts
|
|
186146
186170
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
186147
186171
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
186148
186172
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
186149
|
-
|
|
186173
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
186174
|
+
function getProcessEnv2() {
|
|
186150
186175
|
return globalThis.process?.env;
|
|
186151
186176
|
}
|
|
186152
186177
|
function normalizeSessionId(value) {
|
|
@@ -186157,18 +186182,165 @@ function normalizeSessionId(value) {
|
|
|
186157
186182
|
return trimmed || undefined;
|
|
186158
186183
|
}
|
|
186159
186184
|
function getConfiguredTelemetrySessionId() {
|
|
186160
|
-
return normalizeSessionId(
|
|
186185
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
186161
186186
|
}
|
|
186162
186187
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
186163
186188
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
186164
186189
|
}
|
|
186190
|
+
function getTelemetryOperationId() {
|
|
186191
|
+
const existing = telemetryOperationIdSlot.get();
|
|
186192
|
+
if (existing) {
|
|
186193
|
+
return existing;
|
|
186194
|
+
}
|
|
186195
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
186196
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
186197
|
+
telemetryOperationIdSlot.set(generated);
|
|
186198
|
+
return generated;
|
|
186199
|
+
}
|
|
186165
186200
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
186166
186201
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
186167
186202
|
function getGlobalTelemetryProperties() {
|
|
186168
186203
|
return telemetryPropsSlot.get();
|
|
186169
186204
|
}
|
|
186170
186205
|
|
|
186206
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
186207
|
+
var REDACTED = "[REDACTED]";
|
|
186208
|
+
var MAX_VALUE_LENGTH = 200;
|
|
186209
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
186210
|
+
"token",
|
|
186211
|
+
"tokens",
|
|
186212
|
+
"secret",
|
|
186213
|
+
"secrets",
|
|
186214
|
+
"password",
|
|
186215
|
+
"passwords",
|
|
186216
|
+
"pwd",
|
|
186217
|
+
"credential",
|
|
186218
|
+
"credentials",
|
|
186219
|
+
"auth",
|
|
186220
|
+
"authentication",
|
|
186221
|
+
"authorization",
|
|
186222
|
+
"authority",
|
|
186223
|
+
"cert",
|
|
186224
|
+
"certificate",
|
|
186225
|
+
"certificates"
|
|
186226
|
+
]);
|
|
186227
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
186228
|
+
"api",
|
|
186229
|
+
"access",
|
|
186230
|
+
"client",
|
|
186231
|
+
"private",
|
|
186232
|
+
"public",
|
|
186233
|
+
"signing",
|
|
186234
|
+
"encryption",
|
|
186235
|
+
"session",
|
|
186236
|
+
"master",
|
|
186237
|
+
"shared",
|
|
186238
|
+
"root",
|
|
186239
|
+
"ssh",
|
|
186240
|
+
"rsa",
|
|
186241
|
+
"aes",
|
|
186242
|
+
"hmac",
|
|
186243
|
+
"oauth"
|
|
186244
|
+
]);
|
|
186245
|
+
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;
|
|
186246
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
186247
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
186248
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
186249
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
186250
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
186251
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
186252
|
+
function shortHash(input) {
|
|
186253
|
+
let hash = 2166136261;
|
|
186254
|
+
for (let i = 0;i < input.length; i++) {
|
|
186255
|
+
hash ^= input.charCodeAt(i);
|
|
186256
|
+
hash = Math.imul(hash, 16777619);
|
|
186257
|
+
}
|
|
186258
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
186259
|
+
}
|
|
186260
|
+
function redactUrl(raw) {
|
|
186261
|
+
try {
|
|
186262
|
+
const url = new URL(raw);
|
|
186263
|
+
return `${url.protocol}//${url.host}`;
|
|
186264
|
+
} catch {
|
|
186265
|
+
return `url#${shortHash(raw)}`;
|
|
186266
|
+
}
|
|
186267
|
+
}
|
|
186268
|
+
function redactValueDetectors(value) {
|
|
186269
|
+
let out = value;
|
|
186270
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
186271
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
186272
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
186273
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
186274
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
186275
|
+
});
|
|
186276
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
186277
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
186278
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
186279
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
186280
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
186281
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
186282
|
+
}
|
|
186283
|
+
return out;
|
|
186284
|
+
}
|
|
186285
|
+
function redactValue(value) {
|
|
186286
|
+
return redactValueDetectors(value);
|
|
186287
|
+
}
|
|
186288
|
+
function redactError(error) {
|
|
186289
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
186290
|
+
safe.name = error.name;
|
|
186291
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
186292
|
+
return safe;
|
|
186293
|
+
}
|
|
186294
|
+
function nameTokens(name) {
|
|
186295
|
+
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);
|
|
186296
|
+
}
|
|
186297
|
+
function isSensitiveName(name) {
|
|
186298
|
+
const tokens = nameTokens(name);
|
|
186299
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
186300
|
+
const token = tokens[i];
|
|
186301
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
186302
|
+
return true;
|
|
186303
|
+
}
|
|
186304
|
+
if (token === "key" || token === "keys") {
|
|
186305
|
+
const prev = tokens[i - 1];
|
|
186306
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
186307
|
+
return true;
|
|
186308
|
+
}
|
|
186309
|
+
}
|
|
186310
|
+
}
|
|
186311
|
+
return false;
|
|
186312
|
+
}
|
|
186313
|
+
function redactProperty(name, value) {
|
|
186314
|
+
if (value === undefined || value === null) {
|
|
186315
|
+
return;
|
|
186316
|
+
}
|
|
186317
|
+
if (isSensitiveName(name)) {
|
|
186318
|
+
return REDACTED;
|
|
186319
|
+
}
|
|
186320
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
186321
|
+
return value;
|
|
186322
|
+
}
|
|
186323
|
+
if (typeof value !== "string") {
|
|
186324
|
+
return "[OBJECT]";
|
|
186325
|
+
}
|
|
186326
|
+
return redactValueDetectors(value);
|
|
186327
|
+
}
|
|
186328
|
+
function redactProperties(properties) {
|
|
186329
|
+
const out = {};
|
|
186330
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
186331
|
+
const redacted = redactProperty(name, value);
|
|
186332
|
+
if (redacted !== undefined) {
|
|
186333
|
+
out[name] = redacted;
|
|
186334
|
+
}
|
|
186335
|
+
}
|
|
186336
|
+
return out;
|
|
186337
|
+
}
|
|
186338
|
+
|
|
186171
186339
|
// ../common/src/telemetry/telemetry-service.ts
|
|
186340
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
186341
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
186342
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
186343
|
+
|
|
186172
186344
|
class TelemetryService {
|
|
186173
186345
|
telemetryProvider;
|
|
186174
186346
|
contextStorage;
|
|
@@ -186195,11 +186367,15 @@ class TelemetryService {
|
|
|
186195
186367
|
trackException(error, properties) {
|
|
186196
186368
|
const context = this.getCurrentContext();
|
|
186197
186369
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
186198
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
186370
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
186199
186371
|
}
|
|
186200
186372
|
async trackRequest(name, fn, properties) {
|
|
186373
|
+
const parentContext = this.getCurrentContext();
|
|
186374
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
186375
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
186201
186376
|
const context = {
|
|
186202
|
-
operationId
|
|
186377
|
+
operationId,
|
|
186378
|
+
...parentId !== undefined ? { parentId } : {},
|
|
186203
186379
|
id: this.generateId()
|
|
186204
186380
|
};
|
|
186205
186381
|
const startTime = performance.now();
|
|
@@ -186217,6 +186393,45 @@ class TelemetryService {
|
|
|
186217
186393
|
throw error;
|
|
186218
186394
|
}
|
|
186219
186395
|
}
|
|
186396
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
186397
|
+
const requestContext = context ?? {
|
|
186398
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
186399
|
+
id: this.generateId()
|
|
186400
|
+
};
|
|
186401
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
186402
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
186403
|
+
}
|
|
186404
|
+
createRequestContext() {
|
|
186405
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
186406
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
186407
|
+
return {
|
|
186408
|
+
operationId,
|
|
186409
|
+
...parentId !== undefined ? { parentId } : {},
|
|
186410
|
+
id: this.generateId()
|
|
186411
|
+
};
|
|
186412
|
+
}
|
|
186413
|
+
inboundParentIdFor(operationId) {
|
|
186414
|
+
const inbound = getInboundTraceContext();
|
|
186415
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
186416
|
+
}
|
|
186417
|
+
runWithContext(context, fn) {
|
|
186418
|
+
return this.contextStorage.run(context, fn);
|
|
186419
|
+
}
|
|
186420
|
+
createDependencyContext() {
|
|
186421
|
+
const parentContext = this.getCurrentContext();
|
|
186422
|
+
if (!parentContext) {
|
|
186423
|
+
return;
|
|
186424
|
+
}
|
|
186425
|
+
return {
|
|
186426
|
+
operationId: parentContext.operationId,
|
|
186427
|
+
parentId: parentContext.id,
|
|
186428
|
+
id: this.generateId()
|
|
186429
|
+
};
|
|
186430
|
+
}
|
|
186431
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
186432
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
186433
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
186434
|
+
}
|
|
186220
186435
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
186221
186436
|
const parentContext = this.getCurrentContext();
|
|
186222
186437
|
if (!parentContext) {
|
|
@@ -186253,8 +186468,12 @@ class TelemetryService {
|
|
|
186253
186468
|
...getExecutionContextTelemetryProperties(),
|
|
186254
186469
|
...globalProperties,
|
|
186255
186470
|
...this.defaultProperties,
|
|
186256
|
-
...properties,
|
|
186257
|
-
...context
|
|
186471
|
+
...redactProperties(properties ?? {}),
|
|
186472
|
+
...context ? {
|
|
186473
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
186474
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
186475
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
186476
|
+
} : {}
|
|
186258
186477
|
};
|
|
186259
186478
|
if (sessionId === undefined) {
|
|
186260
186479
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -186264,7 +186483,16 @@ class TelemetryService {
|
|
|
186264
186483
|
return enriched;
|
|
186265
186484
|
}
|
|
186266
186485
|
generateId() {
|
|
186267
|
-
|
|
186486
|
+
const bytes = new Uint8Array(8);
|
|
186487
|
+
let hex = "";
|
|
186488
|
+
do {
|
|
186489
|
+
crypto.getRandomValues(bytes);
|
|
186490
|
+
hex = "";
|
|
186491
|
+
for (const byte of bytes) {
|
|
186492
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
186493
|
+
}
|
|
186494
|
+
} while (/^0+$/.test(hex));
|
|
186495
|
+
return hex;
|
|
186268
186496
|
}
|
|
186269
186497
|
}
|
|
186270
186498
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -186966,152 +187194,25 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
186966
187194
|
};
|
|
186967
187195
|
}
|
|
186968
187196
|
|
|
186969
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
186970
|
-
var REDACTED = "[REDACTED]";
|
|
186971
|
-
var MAX_VALUE_LENGTH = 200;
|
|
186972
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
186973
|
-
"token",
|
|
186974
|
-
"tokens",
|
|
186975
|
-
"secret",
|
|
186976
|
-
"secrets",
|
|
186977
|
-
"password",
|
|
186978
|
-
"passwords",
|
|
186979
|
-
"pwd",
|
|
186980
|
-
"credential",
|
|
186981
|
-
"credentials",
|
|
186982
|
-
"auth",
|
|
186983
|
-
"authentication",
|
|
186984
|
-
"authorization",
|
|
186985
|
-
"authority",
|
|
186986
|
-
"cert",
|
|
186987
|
-
"certificate",
|
|
186988
|
-
"certificates"
|
|
186989
|
-
]);
|
|
186990
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
186991
|
-
"api",
|
|
186992
|
-
"access",
|
|
186993
|
-
"client",
|
|
186994
|
-
"private",
|
|
186995
|
-
"public",
|
|
186996
|
-
"signing",
|
|
186997
|
-
"encryption",
|
|
186998
|
-
"session",
|
|
186999
|
-
"master",
|
|
187000
|
-
"shared",
|
|
187001
|
-
"root",
|
|
187002
|
-
"ssh",
|
|
187003
|
-
"rsa",
|
|
187004
|
-
"aes",
|
|
187005
|
-
"hmac",
|
|
187006
|
-
"oauth"
|
|
187007
|
-
]);
|
|
187008
|
-
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;
|
|
187009
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
187010
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
187011
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
187012
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
187013
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
187014
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
187015
|
-
function shortHash(input) {
|
|
187016
|
-
let hash = 2166136261;
|
|
187017
|
-
for (let i = 0;i < input.length; i++) {
|
|
187018
|
-
hash ^= input.charCodeAt(i);
|
|
187019
|
-
hash = Math.imul(hash, 16777619);
|
|
187020
|
-
}
|
|
187021
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
187022
|
-
}
|
|
187023
|
-
function redactUrl(raw) {
|
|
187024
|
-
try {
|
|
187025
|
-
const url = new URL(raw);
|
|
187026
|
-
return `${url.protocol}//${url.host}`;
|
|
187027
|
-
} catch {
|
|
187028
|
-
return `url#${shortHash(raw)}`;
|
|
187029
|
-
}
|
|
187030
|
-
}
|
|
187031
|
-
function redactValueDetectors(value) {
|
|
187032
|
-
let out = value;
|
|
187033
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
187034
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
187035
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
187036
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
187037
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
187038
|
-
});
|
|
187039
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
187040
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
187041
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
187042
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
187043
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
187044
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
187045
|
-
}
|
|
187046
|
-
return out;
|
|
187047
|
-
}
|
|
187048
|
-
function nameTokens(name) {
|
|
187049
|
-
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);
|
|
187050
|
-
}
|
|
187051
|
-
function isSensitiveName(name) {
|
|
187052
|
-
const tokens = nameTokens(name);
|
|
187053
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
187054
|
-
const token = tokens[i];
|
|
187055
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
187056
|
-
return true;
|
|
187057
|
-
}
|
|
187058
|
-
if (token === "key" || token === "keys") {
|
|
187059
|
-
const prev = tokens[i - 1];
|
|
187060
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
187061
|
-
return true;
|
|
187062
|
-
}
|
|
187063
|
-
}
|
|
187064
|
-
}
|
|
187065
|
-
return false;
|
|
187066
|
-
}
|
|
187067
|
-
function redactProperty(name, value) {
|
|
187068
|
-
if (value === undefined || value === null) {
|
|
187069
|
-
return;
|
|
187070
|
-
}
|
|
187071
|
-
if (isSensitiveName(name)) {
|
|
187072
|
-
return REDACTED;
|
|
187073
|
-
}
|
|
187074
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
187075
|
-
return value;
|
|
187076
|
-
}
|
|
187077
|
-
if (typeof value !== "string") {
|
|
187078
|
-
return "[OBJECT]";
|
|
187079
|
-
}
|
|
187080
|
-
return redactValueDetectors(value);
|
|
187081
|
-
}
|
|
187082
|
-
function redactProperties(properties) {
|
|
187083
|
-
const out = {};
|
|
187084
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
187085
|
-
const redacted = redactProperty(name, value);
|
|
187086
|
-
if (redacted !== undefined) {
|
|
187087
|
-
out[name] = redacted;
|
|
187088
|
-
}
|
|
187089
|
-
}
|
|
187090
|
-
return out;
|
|
187091
|
-
}
|
|
187092
|
-
|
|
187093
187197
|
// ../common/src/trackedAction.ts
|
|
187094
187198
|
var pollSignalSlot = singleton("PollSignal");
|
|
187095
187199
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
187096
187200
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
187201
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
187097
187202
|
function extractCommandParams(cmd) {
|
|
187098
187203
|
const params = {};
|
|
187204
|
+
const add2 = (name, value) => {
|
|
187205
|
+
if (name && value !== undefined) {
|
|
187206
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
187207
|
+
}
|
|
187208
|
+
};
|
|
187099
187209
|
const registered = cmd.registeredArguments ?? [];
|
|
187100
187210
|
const processed = cmd.processedArgs ?? [];
|
|
187101
187211
|
for (let i = 0;i < registered.length; i++) {
|
|
187102
|
-
|
|
187103
|
-
if (value === undefined) {
|
|
187104
|
-
continue;
|
|
187105
|
-
}
|
|
187106
|
-
const name = registered[i].name();
|
|
187107
|
-
if (name) {
|
|
187108
|
-
params[name] = value;
|
|
187109
|
-
}
|
|
187212
|
+
add2(registered[i].name(), processed[i]);
|
|
187110
187213
|
}
|
|
187111
187214
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
187112
|
-
|
|
187113
|
-
params[key] = value;
|
|
187114
|
-
}
|
|
187215
|
+
add2(key, value);
|
|
187115
187216
|
}
|
|
187116
187217
|
return params;
|
|
187117
187218
|
}
|
|
@@ -187154,11 +187255,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
187154
187255
|
return this.action(async (...args) => {
|
|
187155
187256
|
const telemetryName = deriveCommandPath(command);
|
|
187156
187257
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
187258
|
+
const requestContext = telemetry.createRequestContext();
|
|
187157
187259
|
const startTime = performance.now();
|
|
187158
187260
|
let errorMessage2;
|
|
187159
187261
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
187160
187262
|
clearRecordedCommandFailureTelemetry();
|
|
187161
|
-
const [error] = await catchError2(fn(...args));
|
|
187263
|
+
const [error] = await catchError2(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
187162
187264
|
if (error) {
|
|
187163
187265
|
errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
187164
187266
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage2}`);
|
|
@@ -187194,16 +187296,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
187194
187296
|
recordedFailure,
|
|
187195
187297
|
pollSignal: context.pollSignal
|
|
187196
187298
|
});
|
|
187197
|
-
|
|
187198
|
-
|
|
187299
|
+
const commandParams = extractCommandParams(command);
|
|
187300
|
+
if (props) {
|
|
187301
|
+
for (const key of Object.keys(props)) {
|
|
187302
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
187303
|
+
}
|
|
187304
|
+
}
|
|
187305
|
+
const baseProperties = redactProperties({
|
|
187306
|
+
...commandParams,
|
|
187199
187307
|
...props,
|
|
187200
187308
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
187201
187309
|
command: "true",
|
|
187202
|
-
duration: String(durationMs),
|
|
187203
|
-
success: String(success),
|
|
187204
187310
|
...terminalTelemetry,
|
|
187205
187311
|
...errorMessage2 ? { errorMessage: errorMessage2 } : {}
|
|
187206
|
-
})
|
|
187312
|
+
});
|
|
187313
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
187207
187314
|
});
|
|
187208
187315
|
};
|
|
187209
187316
|
// ../common/src/console-guard.ts
|
|
@@ -211511,7 +211618,7 @@ function querystringSingleKey(key, value, keyPrefix = "") {
|
|
|
211511
211618
|
var package_default = {
|
|
211512
211619
|
name: "@uipath/solution-sdk",
|
|
211513
211620
|
license: "MIT",
|
|
211514
|
-
version: "1.198.0
|
|
211621
|
+
version: "1.198.0",
|
|
211515
211622
|
repository: {
|
|
211516
211623
|
type: "git",
|
|
211517
211624
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -216115,7 +216222,7 @@ class TextApiResponse2 {
|
|
|
216115
216222
|
var package_default2 = {
|
|
216116
216223
|
name: "@uipath/integrationservice-sdk",
|
|
216117
216224
|
license: "MIT",
|
|
216118
|
-
version: "1.198.0
|
|
216225
|
+
version: "1.198.0",
|
|
216119
216226
|
repository: {
|
|
216120
216227
|
type: "git",
|
|
216121
216228
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -225208,7 +225315,7 @@ init_dist2();
|
|
|
225208
225315
|
// ../packager/packager-tool-flow/package.json
|
|
225209
225316
|
var package_default4 = {
|
|
225210
225317
|
name: "@uipath/packager-tool-flow",
|
|
225211
|
-
version: "1.198.0
|
|
225318
|
+
version: "1.198.0",
|
|
225212
225319
|
description: "UiPath Flow tool implementation",
|
|
225213
225320
|
type: "module",
|
|
225214
225321
|
exports: {
|
|
@@ -239997,4 +240104,4 @@ export {
|
|
|
239997
240104
|
FlowValidateService
|
|
239998
240105
|
};
|
|
239999
240106
|
|
|
240000
|
-
//# debugId=
|
|
240107
|
+
//# debugId=1AF854A9ECD4561964756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/flow-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.198.0
|
|
4
|
+
"version": "1.198.0",
|
|
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": "1fadf03d7a8dd102742571dff569fdac11808afb"
|
|
38
38
|
}
|