@uipath/data-fabric-tool 1.199.0-preview.92 → 1.199.0-preview.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tool.js +257 -150
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -27310,7 +27310,7 @@ var require_src6 = __commonJS((exports) => {
|
|
|
27310
27310
|
var package_default = {
|
|
27311
27311
|
name: "@uipath/data-fabric-tool",
|
|
27312
27312
|
license: "MIT",
|
|
27313
|
-
version: "1.199.0-preview.
|
|
27313
|
+
version: "1.199.0-preview.97",
|
|
27314
27314
|
description: "Manage Data Fabric entities and records.",
|
|
27315
27315
|
type: "module",
|
|
27316
27316
|
main: "./dist/tool.js",
|
|
@@ -33493,11 +33493,36 @@ class NodeContextStorage {
|
|
|
33493
33493
|
return this.storage.getStore();
|
|
33494
33494
|
}
|
|
33495
33495
|
}
|
|
33496
|
+
// ../common/src/telemetry/trace-context.ts
|
|
33497
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
33498
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
33499
|
+
function getProcessEnv() {
|
|
33500
|
+
return globalThis.process?.env;
|
|
33501
|
+
}
|
|
33502
|
+
function parseInboundTraceparent(value) {
|
|
33503
|
+
if (!value) {
|
|
33504
|
+
return;
|
|
33505
|
+
}
|
|
33506
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
33507
|
+
if (!match) {
|
|
33508
|
+
return;
|
|
33509
|
+
}
|
|
33510
|
+
const [, traceId, parentSpanId] = match;
|
|
33511
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
33512
|
+
return;
|
|
33513
|
+
}
|
|
33514
|
+
return { traceId, parentSpanId };
|
|
33515
|
+
}
|
|
33516
|
+
function getInboundTraceContext() {
|
|
33517
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
33518
|
+
}
|
|
33519
|
+
|
|
33496
33520
|
// ../common/src/telemetry/session-id.ts
|
|
33497
33521
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
33498
33522
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
33499
33523
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
33500
|
-
|
|
33524
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
33525
|
+
function getProcessEnv2() {
|
|
33501
33526
|
return globalThis.process?.env;
|
|
33502
33527
|
}
|
|
33503
33528
|
function normalizeSessionId(value) {
|
|
@@ -33508,18 +33533,165 @@ function normalizeSessionId(value) {
|
|
|
33508
33533
|
return trimmed || undefined;
|
|
33509
33534
|
}
|
|
33510
33535
|
function getConfiguredTelemetrySessionId() {
|
|
33511
|
-
return normalizeSessionId(
|
|
33536
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
33512
33537
|
}
|
|
33513
33538
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
33514
33539
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
33515
33540
|
}
|
|
33541
|
+
function getTelemetryOperationId() {
|
|
33542
|
+
const existing = telemetryOperationIdSlot.get();
|
|
33543
|
+
if (existing) {
|
|
33544
|
+
return existing;
|
|
33545
|
+
}
|
|
33546
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
33547
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
33548
|
+
telemetryOperationIdSlot.set(generated);
|
|
33549
|
+
return generated;
|
|
33550
|
+
}
|
|
33516
33551
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
33517
33552
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
33518
33553
|
function getGlobalTelemetryProperties() {
|
|
33519
33554
|
return telemetryPropsSlot.get();
|
|
33520
33555
|
}
|
|
33521
33556
|
|
|
33557
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
33558
|
+
var REDACTED = "[REDACTED]";
|
|
33559
|
+
var MAX_VALUE_LENGTH = 200;
|
|
33560
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
33561
|
+
"token",
|
|
33562
|
+
"tokens",
|
|
33563
|
+
"secret",
|
|
33564
|
+
"secrets",
|
|
33565
|
+
"password",
|
|
33566
|
+
"passwords",
|
|
33567
|
+
"pwd",
|
|
33568
|
+
"credential",
|
|
33569
|
+
"credentials",
|
|
33570
|
+
"auth",
|
|
33571
|
+
"authentication",
|
|
33572
|
+
"authorization",
|
|
33573
|
+
"authority",
|
|
33574
|
+
"cert",
|
|
33575
|
+
"certificate",
|
|
33576
|
+
"certificates"
|
|
33577
|
+
]);
|
|
33578
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
33579
|
+
"api",
|
|
33580
|
+
"access",
|
|
33581
|
+
"client",
|
|
33582
|
+
"private",
|
|
33583
|
+
"public",
|
|
33584
|
+
"signing",
|
|
33585
|
+
"encryption",
|
|
33586
|
+
"session",
|
|
33587
|
+
"master",
|
|
33588
|
+
"shared",
|
|
33589
|
+
"root",
|
|
33590
|
+
"ssh",
|
|
33591
|
+
"rsa",
|
|
33592
|
+
"aes",
|
|
33593
|
+
"hmac",
|
|
33594
|
+
"oauth"
|
|
33595
|
+
]);
|
|
33596
|
+
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;
|
|
33597
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
33598
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
33599
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
33600
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
33601
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
33602
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
33603
|
+
function shortHash(input) {
|
|
33604
|
+
let hash = 2166136261;
|
|
33605
|
+
for (let i = 0;i < input.length; i++) {
|
|
33606
|
+
hash ^= input.charCodeAt(i);
|
|
33607
|
+
hash = Math.imul(hash, 16777619);
|
|
33608
|
+
}
|
|
33609
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
33610
|
+
}
|
|
33611
|
+
function redactUrl(raw) {
|
|
33612
|
+
try {
|
|
33613
|
+
const url = new URL(raw);
|
|
33614
|
+
return `${url.protocol}//${url.host}`;
|
|
33615
|
+
} catch {
|
|
33616
|
+
return `url#${shortHash(raw)}`;
|
|
33617
|
+
}
|
|
33618
|
+
}
|
|
33619
|
+
function redactValueDetectors(value) {
|
|
33620
|
+
let out = value;
|
|
33621
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
33622
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
33623
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
33624
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
33625
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
33626
|
+
});
|
|
33627
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
33628
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
33629
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
33630
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
33631
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
33632
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
33633
|
+
}
|
|
33634
|
+
return out;
|
|
33635
|
+
}
|
|
33636
|
+
function redactValue(value) {
|
|
33637
|
+
return redactValueDetectors(value);
|
|
33638
|
+
}
|
|
33639
|
+
function redactError(error) {
|
|
33640
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
33641
|
+
safe.name = error.name;
|
|
33642
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
33643
|
+
return safe;
|
|
33644
|
+
}
|
|
33645
|
+
function nameTokens(name) {
|
|
33646
|
+
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);
|
|
33647
|
+
}
|
|
33648
|
+
function isSensitiveName(name) {
|
|
33649
|
+
const tokens = nameTokens(name);
|
|
33650
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
33651
|
+
const token = tokens[i];
|
|
33652
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
33653
|
+
return true;
|
|
33654
|
+
}
|
|
33655
|
+
if (token === "key" || token === "keys") {
|
|
33656
|
+
const prev = tokens[i - 1];
|
|
33657
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
33658
|
+
return true;
|
|
33659
|
+
}
|
|
33660
|
+
}
|
|
33661
|
+
}
|
|
33662
|
+
return false;
|
|
33663
|
+
}
|
|
33664
|
+
function redactProperty(name, value) {
|
|
33665
|
+
if (value === undefined || value === null) {
|
|
33666
|
+
return;
|
|
33667
|
+
}
|
|
33668
|
+
if (isSensitiveName(name)) {
|
|
33669
|
+
return REDACTED;
|
|
33670
|
+
}
|
|
33671
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
33672
|
+
return value;
|
|
33673
|
+
}
|
|
33674
|
+
if (typeof value !== "string") {
|
|
33675
|
+
return "[OBJECT]";
|
|
33676
|
+
}
|
|
33677
|
+
return redactValueDetectors(value);
|
|
33678
|
+
}
|
|
33679
|
+
function redactProperties(properties) {
|
|
33680
|
+
const out = {};
|
|
33681
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
33682
|
+
const redacted = redactProperty(name, value);
|
|
33683
|
+
if (redacted !== undefined) {
|
|
33684
|
+
out[name] = redacted;
|
|
33685
|
+
}
|
|
33686
|
+
}
|
|
33687
|
+
return out;
|
|
33688
|
+
}
|
|
33689
|
+
|
|
33522
33690
|
// ../common/src/telemetry/telemetry-service.ts
|
|
33691
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
33692
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
33693
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
33694
|
+
|
|
33523
33695
|
class TelemetryService {
|
|
33524
33696
|
telemetryProvider;
|
|
33525
33697
|
contextStorage;
|
|
@@ -33546,11 +33718,15 @@ class TelemetryService {
|
|
|
33546
33718
|
trackException(error, properties) {
|
|
33547
33719
|
const context = this.getCurrentContext();
|
|
33548
33720
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
33549
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
33721
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
33550
33722
|
}
|
|
33551
33723
|
async trackRequest(name, fn, properties) {
|
|
33724
|
+
const parentContext = this.getCurrentContext();
|
|
33725
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
33726
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
33552
33727
|
const context = {
|
|
33553
|
-
operationId
|
|
33728
|
+
operationId,
|
|
33729
|
+
...parentId !== undefined ? { parentId } : {},
|
|
33554
33730
|
id: this.generateId()
|
|
33555
33731
|
};
|
|
33556
33732
|
const startTime = performance.now();
|
|
@@ -33568,6 +33744,45 @@ class TelemetryService {
|
|
|
33568
33744
|
throw error;
|
|
33569
33745
|
}
|
|
33570
33746
|
}
|
|
33747
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
33748
|
+
const requestContext = context ?? {
|
|
33749
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
33750
|
+
id: this.generateId()
|
|
33751
|
+
};
|
|
33752
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
33753
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
33754
|
+
}
|
|
33755
|
+
createRequestContext() {
|
|
33756
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
33757
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
33758
|
+
return {
|
|
33759
|
+
operationId,
|
|
33760
|
+
...parentId !== undefined ? { parentId } : {},
|
|
33761
|
+
id: this.generateId()
|
|
33762
|
+
};
|
|
33763
|
+
}
|
|
33764
|
+
inboundParentIdFor(operationId) {
|
|
33765
|
+
const inbound = getInboundTraceContext();
|
|
33766
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
33767
|
+
}
|
|
33768
|
+
runWithContext(context, fn) {
|
|
33769
|
+
return this.contextStorage.run(context, fn);
|
|
33770
|
+
}
|
|
33771
|
+
createDependencyContext() {
|
|
33772
|
+
const parentContext = this.getCurrentContext();
|
|
33773
|
+
if (!parentContext) {
|
|
33774
|
+
return;
|
|
33775
|
+
}
|
|
33776
|
+
return {
|
|
33777
|
+
operationId: parentContext.operationId,
|
|
33778
|
+
parentId: parentContext.id,
|
|
33779
|
+
id: this.generateId()
|
|
33780
|
+
};
|
|
33781
|
+
}
|
|
33782
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
33783
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
33784
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
33785
|
+
}
|
|
33571
33786
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
33572
33787
|
const parentContext = this.getCurrentContext();
|
|
33573
33788
|
if (!parentContext) {
|
|
@@ -33604,8 +33819,12 @@ class TelemetryService {
|
|
|
33604
33819
|
...getExecutionContextTelemetryProperties(),
|
|
33605
33820
|
...globalProperties,
|
|
33606
33821
|
...this.defaultProperties,
|
|
33607
|
-
...properties,
|
|
33608
|
-
...context
|
|
33822
|
+
...redactProperties(properties ?? {}),
|
|
33823
|
+
...context ? {
|
|
33824
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
33825
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
33826
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
33827
|
+
} : {}
|
|
33609
33828
|
};
|
|
33610
33829
|
if (sessionId === undefined) {
|
|
33611
33830
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -33615,7 +33834,16 @@ class TelemetryService {
|
|
|
33615
33834
|
return enriched;
|
|
33616
33835
|
}
|
|
33617
33836
|
generateId() {
|
|
33618
|
-
|
|
33837
|
+
const bytes = new Uint8Array(8);
|
|
33838
|
+
let hex = "";
|
|
33839
|
+
do {
|
|
33840
|
+
crypto.getRandomValues(bytes);
|
|
33841
|
+
hex = "";
|
|
33842
|
+
for (const byte of bytes) {
|
|
33843
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
33844
|
+
}
|
|
33845
|
+
} while (/^0+$/.test(hex));
|
|
33846
|
+
return hex;
|
|
33619
33847
|
}
|
|
33620
33848
|
}
|
|
33621
33849
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -34318,134 +34546,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
34318
34546
|
};
|
|
34319
34547
|
}
|
|
34320
34548
|
|
|
34321
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
34322
|
-
var REDACTED = "[REDACTED]";
|
|
34323
|
-
var MAX_VALUE_LENGTH = 200;
|
|
34324
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
34325
|
-
"token",
|
|
34326
|
-
"tokens",
|
|
34327
|
-
"secret",
|
|
34328
|
-
"secrets",
|
|
34329
|
-
"password",
|
|
34330
|
-
"passwords",
|
|
34331
|
-
"pwd",
|
|
34332
|
-
"credential",
|
|
34333
|
-
"credentials",
|
|
34334
|
-
"auth",
|
|
34335
|
-
"authentication",
|
|
34336
|
-
"authorization",
|
|
34337
|
-
"authority",
|
|
34338
|
-
"cert",
|
|
34339
|
-
"certificate",
|
|
34340
|
-
"certificates"
|
|
34341
|
-
]);
|
|
34342
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
34343
|
-
"api",
|
|
34344
|
-
"access",
|
|
34345
|
-
"client",
|
|
34346
|
-
"private",
|
|
34347
|
-
"public",
|
|
34348
|
-
"signing",
|
|
34349
|
-
"encryption",
|
|
34350
|
-
"session",
|
|
34351
|
-
"master",
|
|
34352
|
-
"shared",
|
|
34353
|
-
"root",
|
|
34354
|
-
"ssh",
|
|
34355
|
-
"rsa",
|
|
34356
|
-
"aes",
|
|
34357
|
-
"hmac",
|
|
34358
|
-
"oauth"
|
|
34359
|
-
]);
|
|
34360
|
-
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;
|
|
34361
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
34362
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
34363
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
34364
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
34365
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
34366
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
34367
|
-
function shortHash(input) {
|
|
34368
|
-
let hash = 2166136261;
|
|
34369
|
-
for (let i = 0;i < input.length; i++) {
|
|
34370
|
-
hash ^= input.charCodeAt(i);
|
|
34371
|
-
hash = Math.imul(hash, 16777619);
|
|
34372
|
-
}
|
|
34373
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
34374
|
-
}
|
|
34375
|
-
function redactUrl(raw) {
|
|
34376
|
-
try {
|
|
34377
|
-
const url = new URL(raw);
|
|
34378
|
-
return `${url.protocol}//${url.host}`;
|
|
34379
|
-
} catch {
|
|
34380
|
-
return `url#${shortHash(raw)}`;
|
|
34381
|
-
}
|
|
34382
|
-
}
|
|
34383
|
-
function redactValueDetectors(value) {
|
|
34384
|
-
let out = value;
|
|
34385
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
34386
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
34387
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
34388
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
34389
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
34390
|
-
});
|
|
34391
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
34392
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
34393
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
34394
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
34395
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
34396
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
34397
|
-
}
|
|
34398
|
-
return out;
|
|
34399
|
-
}
|
|
34400
|
-
function nameTokens(name) {
|
|
34401
|
-
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);
|
|
34402
|
-
}
|
|
34403
|
-
function isSensitiveName(name) {
|
|
34404
|
-
const tokens = nameTokens(name);
|
|
34405
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
34406
|
-
const token = tokens[i];
|
|
34407
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
34408
|
-
return true;
|
|
34409
|
-
}
|
|
34410
|
-
if (token === "key" || token === "keys") {
|
|
34411
|
-
const prev = tokens[i - 1];
|
|
34412
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
34413
|
-
return true;
|
|
34414
|
-
}
|
|
34415
|
-
}
|
|
34416
|
-
}
|
|
34417
|
-
return false;
|
|
34418
|
-
}
|
|
34419
|
-
function redactProperty(name, value) {
|
|
34420
|
-
if (value === undefined || value === null) {
|
|
34421
|
-
return;
|
|
34422
|
-
}
|
|
34423
|
-
if (isSensitiveName(name)) {
|
|
34424
|
-
return REDACTED;
|
|
34425
|
-
}
|
|
34426
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
34427
|
-
return value;
|
|
34428
|
-
}
|
|
34429
|
-
if (typeof value !== "string") {
|
|
34430
|
-
return "[OBJECT]";
|
|
34431
|
-
}
|
|
34432
|
-
return redactValueDetectors(value);
|
|
34433
|
-
}
|
|
34434
|
-
function redactProperties(properties) {
|
|
34435
|
-
const out = {};
|
|
34436
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
34437
|
-
const redacted = redactProperty(name, value);
|
|
34438
|
-
if (redacted !== undefined) {
|
|
34439
|
-
out[name] = redacted;
|
|
34440
|
-
}
|
|
34441
|
-
}
|
|
34442
|
-
return out;
|
|
34443
|
-
}
|
|
34444
|
-
|
|
34445
34549
|
// ../common/src/trackedAction.ts
|
|
34446
34550
|
var pollSignalSlot = singleton("PollSignal");
|
|
34447
34551
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
34448
34552
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
34553
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
34449
34554
|
var processContext = {
|
|
34450
34555
|
exit: (code) => {
|
|
34451
34556
|
process.exitCode = code;
|
|
@@ -34456,22 +34561,18 @@ var processContext = {
|
|
|
34456
34561
|
};
|
|
34457
34562
|
function extractCommandParams(cmd) {
|
|
34458
34563
|
const params = {};
|
|
34564
|
+
const add2 = (name, value) => {
|
|
34565
|
+
if (name && value !== undefined) {
|
|
34566
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
34567
|
+
}
|
|
34568
|
+
};
|
|
34459
34569
|
const registered = cmd.registeredArguments ?? [];
|
|
34460
34570
|
const processed = cmd.processedArgs ?? [];
|
|
34461
34571
|
for (let i = 0;i < registered.length; i++) {
|
|
34462
|
-
|
|
34463
|
-
if (value === undefined) {
|
|
34464
|
-
continue;
|
|
34465
|
-
}
|
|
34466
|
-
const name = registered[i].name();
|
|
34467
|
-
if (name) {
|
|
34468
|
-
params[name] = value;
|
|
34469
|
-
}
|
|
34572
|
+
add2(registered[i].name(), processed[i]);
|
|
34470
34573
|
}
|
|
34471
34574
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
34472
|
-
|
|
34473
|
-
params[key] = value;
|
|
34474
|
-
}
|
|
34575
|
+
add2(key, value);
|
|
34475
34576
|
}
|
|
34476
34577
|
return params;
|
|
34477
34578
|
}
|
|
@@ -34514,11 +34615,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
34514
34615
|
return this.action(async (...args) => {
|
|
34515
34616
|
const telemetryName = deriveCommandPath(command);
|
|
34516
34617
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
34618
|
+
const requestContext = telemetry.createRequestContext();
|
|
34517
34619
|
const startTime = performance.now();
|
|
34518
34620
|
let errorMessage;
|
|
34519
34621
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
34520
34622
|
clearRecordedCommandFailureTelemetry();
|
|
34521
|
-
const [error] = await catchError(fn(...args));
|
|
34623
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
34522
34624
|
if (error) {
|
|
34523
34625
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
34524
34626
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -34554,16 +34656,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
34554
34656
|
recordedFailure,
|
|
34555
34657
|
pollSignal: context.pollSignal
|
|
34556
34658
|
});
|
|
34557
|
-
|
|
34558
|
-
|
|
34659
|
+
const commandParams = extractCommandParams(command);
|
|
34660
|
+
if (props) {
|
|
34661
|
+
for (const key of Object.keys(props)) {
|
|
34662
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
34663
|
+
}
|
|
34664
|
+
}
|
|
34665
|
+
const baseProperties = redactProperties({
|
|
34666
|
+
...commandParams,
|
|
34559
34667
|
...props,
|
|
34560
34668
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
34561
34669
|
command: "true",
|
|
34562
|
-
duration: String(durationMs),
|
|
34563
|
-
success: String(success),
|
|
34564
34670
|
...terminalTelemetry,
|
|
34565
34671
|
...errorMessage ? { errorMessage } : {}
|
|
34566
|
-
})
|
|
34672
|
+
});
|
|
34673
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
34567
34674
|
});
|
|
34568
34675
|
};
|
|
34569
34676
|
|
|
@@ -48295,4 +48402,4 @@ export {
|
|
|
48295
48402
|
metadata
|
|
48296
48403
|
};
|
|
48297
48404
|
|
|
48298
|
-
//# debugId=
|
|
48405
|
+
//# debugId=A29BC60D27132AE364756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/data-fabric-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0-preview.
|
|
4
|
+
"version": "1.199.0-preview.97",
|
|
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": "087ae21e842f27bde5eb0013892c9487bfe60568"
|
|
18
18
|
}
|