@uipath/data-fabric-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/tool.js +257 -150
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -27244,7 +27244,7 @@ var require_src6 = __commonJS((exports) => {
|
|
|
27244
27244
|
var package_default = {
|
|
27245
27245
|
name: "@uipath/data-fabric-tool",
|
|
27246
27246
|
license: "MIT",
|
|
27247
|
-
version: "1.198.0
|
|
27247
|
+
version: "1.198.0",
|
|
27248
27248
|
description: "Manage Data Fabric entities and records.",
|
|
27249
27249
|
type: "module",
|
|
27250
27250
|
main: "./dist/tool.js",
|
|
@@ -33412,11 +33412,36 @@ class NodeContextStorage {
|
|
|
33412
33412
|
return this.storage.getStore();
|
|
33413
33413
|
}
|
|
33414
33414
|
}
|
|
33415
|
+
// ../common/src/telemetry/trace-context.ts
|
|
33416
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
33417
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
33418
|
+
function getProcessEnv() {
|
|
33419
|
+
return globalThis.process?.env;
|
|
33420
|
+
}
|
|
33421
|
+
function parseInboundTraceparent(value) {
|
|
33422
|
+
if (!value) {
|
|
33423
|
+
return;
|
|
33424
|
+
}
|
|
33425
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
33426
|
+
if (!match) {
|
|
33427
|
+
return;
|
|
33428
|
+
}
|
|
33429
|
+
const [, traceId, parentSpanId] = match;
|
|
33430
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
33431
|
+
return;
|
|
33432
|
+
}
|
|
33433
|
+
return { traceId, parentSpanId };
|
|
33434
|
+
}
|
|
33435
|
+
function getInboundTraceContext() {
|
|
33436
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
33437
|
+
}
|
|
33438
|
+
|
|
33415
33439
|
// ../common/src/telemetry/session-id.ts
|
|
33416
33440
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
33417
33441
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
33418
33442
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
33419
|
-
|
|
33443
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
33444
|
+
function getProcessEnv2() {
|
|
33420
33445
|
return globalThis.process?.env;
|
|
33421
33446
|
}
|
|
33422
33447
|
function normalizeSessionId(value) {
|
|
@@ -33427,18 +33452,165 @@ function normalizeSessionId(value) {
|
|
|
33427
33452
|
return trimmed || undefined;
|
|
33428
33453
|
}
|
|
33429
33454
|
function getConfiguredTelemetrySessionId() {
|
|
33430
|
-
return normalizeSessionId(
|
|
33455
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
33431
33456
|
}
|
|
33432
33457
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
33433
33458
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
33434
33459
|
}
|
|
33460
|
+
function getTelemetryOperationId() {
|
|
33461
|
+
const existing = telemetryOperationIdSlot.get();
|
|
33462
|
+
if (existing) {
|
|
33463
|
+
return existing;
|
|
33464
|
+
}
|
|
33465
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
33466
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
33467
|
+
telemetryOperationIdSlot.set(generated);
|
|
33468
|
+
return generated;
|
|
33469
|
+
}
|
|
33435
33470
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
33436
33471
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
33437
33472
|
function getGlobalTelemetryProperties() {
|
|
33438
33473
|
return telemetryPropsSlot.get();
|
|
33439
33474
|
}
|
|
33440
33475
|
|
|
33476
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
33477
|
+
var REDACTED = "[REDACTED]";
|
|
33478
|
+
var MAX_VALUE_LENGTH = 200;
|
|
33479
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
33480
|
+
"token",
|
|
33481
|
+
"tokens",
|
|
33482
|
+
"secret",
|
|
33483
|
+
"secrets",
|
|
33484
|
+
"password",
|
|
33485
|
+
"passwords",
|
|
33486
|
+
"pwd",
|
|
33487
|
+
"credential",
|
|
33488
|
+
"credentials",
|
|
33489
|
+
"auth",
|
|
33490
|
+
"authentication",
|
|
33491
|
+
"authorization",
|
|
33492
|
+
"authority",
|
|
33493
|
+
"cert",
|
|
33494
|
+
"certificate",
|
|
33495
|
+
"certificates"
|
|
33496
|
+
]);
|
|
33497
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
33498
|
+
"api",
|
|
33499
|
+
"access",
|
|
33500
|
+
"client",
|
|
33501
|
+
"private",
|
|
33502
|
+
"public",
|
|
33503
|
+
"signing",
|
|
33504
|
+
"encryption",
|
|
33505
|
+
"session",
|
|
33506
|
+
"master",
|
|
33507
|
+
"shared",
|
|
33508
|
+
"root",
|
|
33509
|
+
"ssh",
|
|
33510
|
+
"rsa",
|
|
33511
|
+
"aes",
|
|
33512
|
+
"hmac",
|
|
33513
|
+
"oauth"
|
|
33514
|
+
]);
|
|
33515
|
+
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;
|
|
33516
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
33517
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
33518
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
33519
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
33520
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
33521
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
33522
|
+
function shortHash(input) {
|
|
33523
|
+
let hash = 2166136261;
|
|
33524
|
+
for (let i = 0;i < input.length; i++) {
|
|
33525
|
+
hash ^= input.charCodeAt(i);
|
|
33526
|
+
hash = Math.imul(hash, 16777619);
|
|
33527
|
+
}
|
|
33528
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
33529
|
+
}
|
|
33530
|
+
function redactUrl(raw) {
|
|
33531
|
+
try {
|
|
33532
|
+
const url = new URL(raw);
|
|
33533
|
+
return `${url.protocol}//${url.host}`;
|
|
33534
|
+
} catch {
|
|
33535
|
+
return `url#${shortHash(raw)}`;
|
|
33536
|
+
}
|
|
33537
|
+
}
|
|
33538
|
+
function redactValueDetectors(value) {
|
|
33539
|
+
let out = value;
|
|
33540
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
33541
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
33542
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
33543
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
33544
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
33545
|
+
});
|
|
33546
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
33547
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
33548
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
33549
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
33550
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
33551
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
33552
|
+
}
|
|
33553
|
+
return out;
|
|
33554
|
+
}
|
|
33555
|
+
function redactValue(value) {
|
|
33556
|
+
return redactValueDetectors(value);
|
|
33557
|
+
}
|
|
33558
|
+
function redactError(error) {
|
|
33559
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
33560
|
+
safe.name = error.name;
|
|
33561
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
33562
|
+
return safe;
|
|
33563
|
+
}
|
|
33564
|
+
function nameTokens(name) {
|
|
33565
|
+
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);
|
|
33566
|
+
}
|
|
33567
|
+
function isSensitiveName(name) {
|
|
33568
|
+
const tokens = nameTokens(name);
|
|
33569
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
33570
|
+
const token = tokens[i];
|
|
33571
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
33572
|
+
return true;
|
|
33573
|
+
}
|
|
33574
|
+
if (token === "key" || token === "keys") {
|
|
33575
|
+
const prev = tokens[i - 1];
|
|
33576
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
33577
|
+
return true;
|
|
33578
|
+
}
|
|
33579
|
+
}
|
|
33580
|
+
}
|
|
33581
|
+
return false;
|
|
33582
|
+
}
|
|
33583
|
+
function redactProperty(name, value) {
|
|
33584
|
+
if (value === undefined || value === null) {
|
|
33585
|
+
return;
|
|
33586
|
+
}
|
|
33587
|
+
if (isSensitiveName(name)) {
|
|
33588
|
+
return REDACTED;
|
|
33589
|
+
}
|
|
33590
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
33591
|
+
return value;
|
|
33592
|
+
}
|
|
33593
|
+
if (typeof value !== "string") {
|
|
33594
|
+
return "[OBJECT]";
|
|
33595
|
+
}
|
|
33596
|
+
return redactValueDetectors(value);
|
|
33597
|
+
}
|
|
33598
|
+
function redactProperties(properties) {
|
|
33599
|
+
const out = {};
|
|
33600
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
33601
|
+
const redacted = redactProperty(name, value);
|
|
33602
|
+
if (redacted !== undefined) {
|
|
33603
|
+
out[name] = redacted;
|
|
33604
|
+
}
|
|
33605
|
+
}
|
|
33606
|
+
return out;
|
|
33607
|
+
}
|
|
33608
|
+
|
|
33441
33609
|
// ../common/src/telemetry/telemetry-service.ts
|
|
33610
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
33611
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
33612
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
33613
|
+
|
|
33442
33614
|
class TelemetryService {
|
|
33443
33615
|
telemetryProvider;
|
|
33444
33616
|
contextStorage;
|
|
@@ -33465,11 +33637,15 @@ class TelemetryService {
|
|
|
33465
33637
|
trackException(error, properties) {
|
|
33466
33638
|
const context = this.getCurrentContext();
|
|
33467
33639
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
33468
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
33640
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
33469
33641
|
}
|
|
33470
33642
|
async trackRequest(name, fn, properties) {
|
|
33643
|
+
const parentContext = this.getCurrentContext();
|
|
33644
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
33645
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
33471
33646
|
const context = {
|
|
33472
|
-
operationId
|
|
33647
|
+
operationId,
|
|
33648
|
+
...parentId !== undefined ? { parentId } : {},
|
|
33473
33649
|
id: this.generateId()
|
|
33474
33650
|
};
|
|
33475
33651
|
const startTime = performance.now();
|
|
@@ -33487,6 +33663,45 @@ class TelemetryService {
|
|
|
33487
33663
|
throw error;
|
|
33488
33664
|
}
|
|
33489
33665
|
}
|
|
33666
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
33667
|
+
const requestContext = context ?? {
|
|
33668
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
33669
|
+
id: this.generateId()
|
|
33670
|
+
};
|
|
33671
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
33672
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
33673
|
+
}
|
|
33674
|
+
createRequestContext() {
|
|
33675
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
33676
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
33677
|
+
return {
|
|
33678
|
+
operationId,
|
|
33679
|
+
...parentId !== undefined ? { parentId } : {},
|
|
33680
|
+
id: this.generateId()
|
|
33681
|
+
};
|
|
33682
|
+
}
|
|
33683
|
+
inboundParentIdFor(operationId) {
|
|
33684
|
+
const inbound = getInboundTraceContext();
|
|
33685
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
33686
|
+
}
|
|
33687
|
+
runWithContext(context, fn) {
|
|
33688
|
+
return this.contextStorage.run(context, fn);
|
|
33689
|
+
}
|
|
33690
|
+
createDependencyContext() {
|
|
33691
|
+
const parentContext = this.getCurrentContext();
|
|
33692
|
+
if (!parentContext) {
|
|
33693
|
+
return;
|
|
33694
|
+
}
|
|
33695
|
+
return {
|
|
33696
|
+
operationId: parentContext.operationId,
|
|
33697
|
+
parentId: parentContext.id,
|
|
33698
|
+
id: this.generateId()
|
|
33699
|
+
};
|
|
33700
|
+
}
|
|
33701
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
33702
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
33703
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
33704
|
+
}
|
|
33490
33705
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
33491
33706
|
const parentContext = this.getCurrentContext();
|
|
33492
33707
|
if (!parentContext) {
|
|
@@ -33523,8 +33738,12 @@ class TelemetryService {
|
|
|
33523
33738
|
...getExecutionContextTelemetryProperties(),
|
|
33524
33739
|
...globalProperties,
|
|
33525
33740
|
...this.defaultProperties,
|
|
33526
|
-
...properties,
|
|
33527
|
-
...context
|
|
33741
|
+
...redactProperties(properties ?? {}),
|
|
33742
|
+
...context ? {
|
|
33743
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
33744
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
33745
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
33746
|
+
} : {}
|
|
33528
33747
|
};
|
|
33529
33748
|
if (sessionId === undefined) {
|
|
33530
33749
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -33534,7 +33753,16 @@ class TelemetryService {
|
|
|
33534
33753
|
return enriched;
|
|
33535
33754
|
}
|
|
33536
33755
|
generateId() {
|
|
33537
|
-
|
|
33756
|
+
const bytes = new Uint8Array(8);
|
|
33757
|
+
let hex = "";
|
|
33758
|
+
do {
|
|
33759
|
+
crypto.getRandomValues(bytes);
|
|
33760
|
+
hex = "";
|
|
33761
|
+
for (const byte of bytes) {
|
|
33762
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
33763
|
+
}
|
|
33764
|
+
} while (/^0+$/.test(hex));
|
|
33765
|
+
return hex;
|
|
33538
33766
|
}
|
|
33539
33767
|
}
|
|
33540
33768
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -34236,134 +34464,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
34236
34464
|
};
|
|
34237
34465
|
}
|
|
34238
34466
|
|
|
34239
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
34240
|
-
var REDACTED = "[REDACTED]";
|
|
34241
|
-
var MAX_VALUE_LENGTH = 200;
|
|
34242
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
34243
|
-
"token",
|
|
34244
|
-
"tokens",
|
|
34245
|
-
"secret",
|
|
34246
|
-
"secrets",
|
|
34247
|
-
"password",
|
|
34248
|
-
"passwords",
|
|
34249
|
-
"pwd",
|
|
34250
|
-
"credential",
|
|
34251
|
-
"credentials",
|
|
34252
|
-
"auth",
|
|
34253
|
-
"authentication",
|
|
34254
|
-
"authorization",
|
|
34255
|
-
"authority",
|
|
34256
|
-
"cert",
|
|
34257
|
-
"certificate",
|
|
34258
|
-
"certificates"
|
|
34259
|
-
]);
|
|
34260
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
34261
|
-
"api",
|
|
34262
|
-
"access",
|
|
34263
|
-
"client",
|
|
34264
|
-
"private",
|
|
34265
|
-
"public",
|
|
34266
|
-
"signing",
|
|
34267
|
-
"encryption",
|
|
34268
|
-
"session",
|
|
34269
|
-
"master",
|
|
34270
|
-
"shared",
|
|
34271
|
-
"root",
|
|
34272
|
-
"ssh",
|
|
34273
|
-
"rsa",
|
|
34274
|
-
"aes",
|
|
34275
|
-
"hmac",
|
|
34276
|
-
"oauth"
|
|
34277
|
-
]);
|
|
34278
|
-
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;
|
|
34279
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
34280
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
34281
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
34282
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
34283
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
34284
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
34285
|
-
function shortHash(input) {
|
|
34286
|
-
let hash = 2166136261;
|
|
34287
|
-
for (let i = 0;i < input.length; i++) {
|
|
34288
|
-
hash ^= input.charCodeAt(i);
|
|
34289
|
-
hash = Math.imul(hash, 16777619);
|
|
34290
|
-
}
|
|
34291
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
34292
|
-
}
|
|
34293
|
-
function redactUrl(raw) {
|
|
34294
|
-
try {
|
|
34295
|
-
const url = new URL(raw);
|
|
34296
|
-
return `${url.protocol}//${url.host}`;
|
|
34297
|
-
} catch {
|
|
34298
|
-
return `url#${shortHash(raw)}`;
|
|
34299
|
-
}
|
|
34300
|
-
}
|
|
34301
|
-
function redactValueDetectors(value) {
|
|
34302
|
-
let out = value;
|
|
34303
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
34304
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
34305
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
34306
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
34307
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
34308
|
-
});
|
|
34309
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
34310
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
34311
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
34312
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
34313
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
34314
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
34315
|
-
}
|
|
34316
|
-
return out;
|
|
34317
|
-
}
|
|
34318
|
-
function nameTokens(name) {
|
|
34319
|
-
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);
|
|
34320
|
-
}
|
|
34321
|
-
function isSensitiveName(name) {
|
|
34322
|
-
const tokens = nameTokens(name);
|
|
34323
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
34324
|
-
const token = tokens[i];
|
|
34325
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
34326
|
-
return true;
|
|
34327
|
-
}
|
|
34328
|
-
if (token === "key" || token === "keys") {
|
|
34329
|
-
const prev = tokens[i - 1];
|
|
34330
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
34331
|
-
return true;
|
|
34332
|
-
}
|
|
34333
|
-
}
|
|
34334
|
-
}
|
|
34335
|
-
return false;
|
|
34336
|
-
}
|
|
34337
|
-
function redactProperty(name, value) {
|
|
34338
|
-
if (value === undefined || value === null) {
|
|
34339
|
-
return;
|
|
34340
|
-
}
|
|
34341
|
-
if (isSensitiveName(name)) {
|
|
34342
|
-
return REDACTED;
|
|
34343
|
-
}
|
|
34344
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
34345
|
-
return value;
|
|
34346
|
-
}
|
|
34347
|
-
if (typeof value !== "string") {
|
|
34348
|
-
return "[OBJECT]";
|
|
34349
|
-
}
|
|
34350
|
-
return redactValueDetectors(value);
|
|
34351
|
-
}
|
|
34352
|
-
function redactProperties(properties) {
|
|
34353
|
-
const out = {};
|
|
34354
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
34355
|
-
const redacted = redactProperty(name, value);
|
|
34356
|
-
if (redacted !== undefined) {
|
|
34357
|
-
out[name] = redacted;
|
|
34358
|
-
}
|
|
34359
|
-
}
|
|
34360
|
-
return out;
|
|
34361
|
-
}
|
|
34362
|
-
|
|
34363
34467
|
// ../common/src/trackedAction.ts
|
|
34364
34468
|
var pollSignalSlot = singleton("PollSignal");
|
|
34365
34469
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
34366
34470
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
34471
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
34367
34472
|
var processContext = {
|
|
34368
34473
|
exit: (code) => {
|
|
34369
34474
|
process.exitCode = code;
|
|
@@ -34374,22 +34479,18 @@ var processContext = {
|
|
|
34374
34479
|
};
|
|
34375
34480
|
function extractCommandParams(cmd) {
|
|
34376
34481
|
const params = {};
|
|
34482
|
+
const add2 = (name, value) => {
|
|
34483
|
+
if (name && value !== undefined) {
|
|
34484
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
34485
|
+
}
|
|
34486
|
+
};
|
|
34377
34487
|
const registered = cmd.registeredArguments ?? [];
|
|
34378
34488
|
const processed = cmd.processedArgs ?? [];
|
|
34379
34489
|
for (let i = 0;i < registered.length; i++) {
|
|
34380
|
-
|
|
34381
|
-
if (value === undefined) {
|
|
34382
|
-
continue;
|
|
34383
|
-
}
|
|
34384
|
-
const name = registered[i].name();
|
|
34385
|
-
if (name) {
|
|
34386
|
-
params[name] = value;
|
|
34387
|
-
}
|
|
34490
|
+
add2(registered[i].name(), processed[i]);
|
|
34388
34491
|
}
|
|
34389
34492
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
34390
|
-
|
|
34391
|
-
params[key] = value;
|
|
34392
|
-
}
|
|
34493
|
+
add2(key, value);
|
|
34393
34494
|
}
|
|
34394
34495
|
return params;
|
|
34395
34496
|
}
|
|
@@ -34432,11 +34533,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
34432
34533
|
return this.action(async (...args) => {
|
|
34433
34534
|
const telemetryName = deriveCommandPath(command);
|
|
34434
34535
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
34536
|
+
const requestContext = telemetry.createRequestContext();
|
|
34435
34537
|
const startTime = performance.now();
|
|
34436
34538
|
let errorMessage;
|
|
34437
34539
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
34438
34540
|
clearRecordedCommandFailureTelemetry();
|
|
34439
|
-
const [error] = await catchError(fn(...args));
|
|
34541
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
34440
34542
|
if (error) {
|
|
34441
34543
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
34442
34544
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -34472,16 +34574,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
34472
34574
|
recordedFailure,
|
|
34473
34575
|
pollSignal: context.pollSignal
|
|
34474
34576
|
});
|
|
34475
|
-
|
|
34476
|
-
|
|
34577
|
+
const commandParams = extractCommandParams(command);
|
|
34578
|
+
if (props) {
|
|
34579
|
+
for (const key of Object.keys(props)) {
|
|
34580
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
34581
|
+
}
|
|
34582
|
+
}
|
|
34583
|
+
const baseProperties = redactProperties({
|
|
34584
|
+
...commandParams,
|
|
34477
34585
|
...props,
|
|
34478
34586
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
34479
34587
|
command: "true",
|
|
34480
|
-
duration: String(durationMs),
|
|
34481
|
-
success: String(success),
|
|
34482
34588
|
...terminalTelemetry,
|
|
34483
34589
|
...errorMessage ? { errorMessage } : {}
|
|
34484
|
-
})
|
|
34590
|
+
});
|
|
34591
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
34485
34592
|
});
|
|
34486
34593
|
};
|
|
34487
34594
|
|
|
@@ -47549,4 +47656,4 @@ export {
|
|
|
47549
47656
|
metadata
|
|
47550
47657
|
};
|
|
47551
47658
|
|
|
47552
|
-
//# debugId=
|
|
47659
|
+
//# debugId=737EF14AA997989F64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/data-fabric-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.198.0
|
|
4
|
+
"version": "1.198.0",
|
|
5
5
|
"description": "Manage Data Fabric entities and records.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/tool.js",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"registry": "https://registry.npmjs.org/"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "1fadf03d7a8dd102742571dff569fdac11808afb"
|
|
18
18
|
}
|