@uipath/ixp-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/index.js +2 -2
- package/dist/tool.js +258 -151
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2146,7 +2146,7 @@ var {
|
|
|
2146
2146
|
var package_default = {
|
|
2147
2147
|
name: "@uipath/ixp-tool",
|
|
2148
2148
|
license: "MIT",
|
|
2149
|
-
version: "1.199.0-preview.
|
|
2149
|
+
version: "1.199.0-preview.97",
|
|
2150
2150
|
description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
2151
2151
|
private: false,
|
|
2152
2152
|
repository: {
|
|
@@ -2196,4 +2196,4 @@ program2.name("ixp-tool").description("UiPath IXP Tool - Standalone CLI").versio
|
|
|
2196
2196
|
await registerCommands(program2);
|
|
2197
2197
|
program2.parse(process.argv);
|
|
2198
2198
|
|
|
2199
|
-
//# debugId=
|
|
2199
|
+
//# debugId=2473380787EEBDA364756E2164756E21
|
package/dist/tool.js
CHANGED
|
@@ -21230,7 +21230,7 @@ var init_server = __esm(() => {
|
|
|
21230
21230
|
var package_default = {
|
|
21231
21231
|
name: "@uipath/ixp-tool",
|
|
21232
21232
|
license: "MIT",
|
|
21233
|
-
version: "1.199.0-preview.
|
|
21233
|
+
version: "1.199.0-preview.97",
|
|
21234
21234
|
description: "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
21235
21235
|
private: false,
|
|
21236
21236
|
repository: {
|
|
@@ -27414,11 +27414,36 @@ class NodeContextStorage {
|
|
|
27414
27414
|
return this.storage.getStore();
|
|
27415
27415
|
}
|
|
27416
27416
|
}
|
|
27417
|
+
// ../common/src/telemetry/trace-context.ts
|
|
27418
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
27419
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
27420
|
+
function getProcessEnv() {
|
|
27421
|
+
return globalThis.process?.env;
|
|
27422
|
+
}
|
|
27423
|
+
function parseInboundTraceparent(value) {
|
|
27424
|
+
if (!value) {
|
|
27425
|
+
return;
|
|
27426
|
+
}
|
|
27427
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
27428
|
+
if (!match) {
|
|
27429
|
+
return;
|
|
27430
|
+
}
|
|
27431
|
+
const [, traceId, parentSpanId] = match;
|
|
27432
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
27433
|
+
return;
|
|
27434
|
+
}
|
|
27435
|
+
return { traceId, parentSpanId };
|
|
27436
|
+
}
|
|
27437
|
+
function getInboundTraceContext() {
|
|
27438
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
27439
|
+
}
|
|
27440
|
+
|
|
27417
27441
|
// ../common/src/telemetry/session-id.ts
|
|
27418
27442
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
27419
27443
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
27420
27444
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
27421
|
-
|
|
27445
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
27446
|
+
function getProcessEnv2() {
|
|
27422
27447
|
return globalThis.process?.env;
|
|
27423
27448
|
}
|
|
27424
27449
|
function normalizeSessionId(value) {
|
|
@@ -27429,18 +27454,165 @@ function normalizeSessionId(value) {
|
|
|
27429
27454
|
return trimmed || undefined;
|
|
27430
27455
|
}
|
|
27431
27456
|
function getConfiguredTelemetrySessionId() {
|
|
27432
|
-
return normalizeSessionId(
|
|
27457
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
27433
27458
|
}
|
|
27434
27459
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
27435
27460
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
27436
27461
|
}
|
|
27462
|
+
function getTelemetryOperationId() {
|
|
27463
|
+
const existing = telemetryOperationIdSlot.get();
|
|
27464
|
+
if (existing) {
|
|
27465
|
+
return existing;
|
|
27466
|
+
}
|
|
27467
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
27468
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
27469
|
+
telemetryOperationIdSlot.set(generated);
|
|
27470
|
+
return generated;
|
|
27471
|
+
}
|
|
27437
27472
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
27438
27473
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
27439
27474
|
function getGlobalTelemetryProperties() {
|
|
27440
27475
|
return telemetryPropsSlot.get();
|
|
27441
27476
|
}
|
|
27442
27477
|
|
|
27478
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
27479
|
+
var REDACTED = "[REDACTED]";
|
|
27480
|
+
var MAX_VALUE_LENGTH = 200;
|
|
27481
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
27482
|
+
"token",
|
|
27483
|
+
"tokens",
|
|
27484
|
+
"secret",
|
|
27485
|
+
"secrets",
|
|
27486
|
+
"password",
|
|
27487
|
+
"passwords",
|
|
27488
|
+
"pwd",
|
|
27489
|
+
"credential",
|
|
27490
|
+
"credentials",
|
|
27491
|
+
"auth",
|
|
27492
|
+
"authentication",
|
|
27493
|
+
"authorization",
|
|
27494
|
+
"authority",
|
|
27495
|
+
"cert",
|
|
27496
|
+
"certificate",
|
|
27497
|
+
"certificates"
|
|
27498
|
+
]);
|
|
27499
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
27500
|
+
"api",
|
|
27501
|
+
"access",
|
|
27502
|
+
"client",
|
|
27503
|
+
"private",
|
|
27504
|
+
"public",
|
|
27505
|
+
"signing",
|
|
27506
|
+
"encryption",
|
|
27507
|
+
"session",
|
|
27508
|
+
"master",
|
|
27509
|
+
"shared",
|
|
27510
|
+
"root",
|
|
27511
|
+
"ssh",
|
|
27512
|
+
"rsa",
|
|
27513
|
+
"aes",
|
|
27514
|
+
"hmac",
|
|
27515
|
+
"oauth"
|
|
27516
|
+
]);
|
|
27517
|
+
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;
|
|
27518
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
27519
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
27520
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
27521
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
27522
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
27523
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
27524
|
+
function shortHash(input) {
|
|
27525
|
+
let hash = 2166136261;
|
|
27526
|
+
for (let i = 0;i < input.length; i++) {
|
|
27527
|
+
hash ^= input.charCodeAt(i);
|
|
27528
|
+
hash = Math.imul(hash, 16777619);
|
|
27529
|
+
}
|
|
27530
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
27531
|
+
}
|
|
27532
|
+
function redactUrl(raw) {
|
|
27533
|
+
try {
|
|
27534
|
+
const url = new URL(raw);
|
|
27535
|
+
return `${url.protocol}//${url.host}`;
|
|
27536
|
+
} catch {
|
|
27537
|
+
return `url#${shortHash(raw)}`;
|
|
27538
|
+
}
|
|
27539
|
+
}
|
|
27540
|
+
function redactValueDetectors(value) {
|
|
27541
|
+
let out = value;
|
|
27542
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
27543
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
27544
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
27545
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
27546
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
27547
|
+
});
|
|
27548
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
27549
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
27550
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
27551
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
27552
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
27553
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
27554
|
+
}
|
|
27555
|
+
return out;
|
|
27556
|
+
}
|
|
27557
|
+
function redactValue(value) {
|
|
27558
|
+
return redactValueDetectors(value);
|
|
27559
|
+
}
|
|
27560
|
+
function redactError(error) {
|
|
27561
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
27562
|
+
safe.name = error.name;
|
|
27563
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
27564
|
+
return safe;
|
|
27565
|
+
}
|
|
27566
|
+
function nameTokens(name) {
|
|
27567
|
+
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);
|
|
27568
|
+
}
|
|
27569
|
+
function isSensitiveName(name) {
|
|
27570
|
+
const tokens = nameTokens(name);
|
|
27571
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
27572
|
+
const token = tokens[i];
|
|
27573
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
27574
|
+
return true;
|
|
27575
|
+
}
|
|
27576
|
+
if (token === "key" || token === "keys") {
|
|
27577
|
+
const prev = tokens[i - 1];
|
|
27578
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
27579
|
+
return true;
|
|
27580
|
+
}
|
|
27581
|
+
}
|
|
27582
|
+
}
|
|
27583
|
+
return false;
|
|
27584
|
+
}
|
|
27585
|
+
function redactProperty(name, value) {
|
|
27586
|
+
if (value === undefined || value === null) {
|
|
27587
|
+
return;
|
|
27588
|
+
}
|
|
27589
|
+
if (isSensitiveName(name)) {
|
|
27590
|
+
return REDACTED;
|
|
27591
|
+
}
|
|
27592
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
27593
|
+
return value;
|
|
27594
|
+
}
|
|
27595
|
+
if (typeof value !== "string") {
|
|
27596
|
+
return "[OBJECT]";
|
|
27597
|
+
}
|
|
27598
|
+
return redactValueDetectors(value);
|
|
27599
|
+
}
|
|
27600
|
+
function redactProperties(properties) {
|
|
27601
|
+
const out = {};
|
|
27602
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
27603
|
+
const redacted = redactProperty(name, value);
|
|
27604
|
+
if (redacted !== undefined) {
|
|
27605
|
+
out[name] = redacted;
|
|
27606
|
+
}
|
|
27607
|
+
}
|
|
27608
|
+
return out;
|
|
27609
|
+
}
|
|
27610
|
+
|
|
27443
27611
|
// ../common/src/telemetry/telemetry-service.ts
|
|
27612
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
27613
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
27614
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
27615
|
+
|
|
27444
27616
|
class TelemetryService {
|
|
27445
27617
|
telemetryProvider;
|
|
27446
27618
|
contextStorage;
|
|
@@ -27467,11 +27639,15 @@ class TelemetryService {
|
|
|
27467
27639
|
trackException(error, properties) {
|
|
27468
27640
|
const context = this.getCurrentContext();
|
|
27469
27641
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
27470
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
27642
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
27471
27643
|
}
|
|
27472
27644
|
async trackRequest(name, fn, properties) {
|
|
27645
|
+
const parentContext = this.getCurrentContext();
|
|
27646
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
27647
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
27473
27648
|
const context = {
|
|
27474
|
-
operationId
|
|
27649
|
+
operationId,
|
|
27650
|
+
...parentId !== undefined ? { parentId } : {},
|
|
27475
27651
|
id: this.generateId()
|
|
27476
27652
|
};
|
|
27477
27653
|
const startTime = performance.now();
|
|
@@ -27489,6 +27665,45 @@ class TelemetryService {
|
|
|
27489
27665
|
throw error;
|
|
27490
27666
|
}
|
|
27491
27667
|
}
|
|
27668
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
27669
|
+
const requestContext = context ?? {
|
|
27670
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
27671
|
+
id: this.generateId()
|
|
27672
|
+
};
|
|
27673
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
27674
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
27675
|
+
}
|
|
27676
|
+
createRequestContext() {
|
|
27677
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
27678
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
27679
|
+
return {
|
|
27680
|
+
operationId,
|
|
27681
|
+
...parentId !== undefined ? { parentId } : {},
|
|
27682
|
+
id: this.generateId()
|
|
27683
|
+
};
|
|
27684
|
+
}
|
|
27685
|
+
inboundParentIdFor(operationId) {
|
|
27686
|
+
const inbound = getInboundTraceContext();
|
|
27687
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
27688
|
+
}
|
|
27689
|
+
runWithContext(context, fn) {
|
|
27690
|
+
return this.contextStorage.run(context, fn);
|
|
27691
|
+
}
|
|
27692
|
+
createDependencyContext() {
|
|
27693
|
+
const parentContext = this.getCurrentContext();
|
|
27694
|
+
if (!parentContext) {
|
|
27695
|
+
return;
|
|
27696
|
+
}
|
|
27697
|
+
return {
|
|
27698
|
+
operationId: parentContext.operationId,
|
|
27699
|
+
parentId: parentContext.id,
|
|
27700
|
+
id: this.generateId()
|
|
27701
|
+
};
|
|
27702
|
+
}
|
|
27703
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
27704
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
27705
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
27706
|
+
}
|
|
27492
27707
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
27493
27708
|
const parentContext = this.getCurrentContext();
|
|
27494
27709
|
if (!parentContext) {
|
|
@@ -27525,8 +27740,12 @@ class TelemetryService {
|
|
|
27525
27740
|
...getExecutionContextTelemetryProperties(),
|
|
27526
27741
|
...globalProperties,
|
|
27527
27742
|
...this.defaultProperties,
|
|
27528
|
-
...properties,
|
|
27529
|
-
...context
|
|
27743
|
+
...redactProperties(properties ?? {}),
|
|
27744
|
+
...context ? {
|
|
27745
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
27746
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
27747
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
27748
|
+
} : {}
|
|
27530
27749
|
};
|
|
27531
27750
|
if (sessionId === undefined) {
|
|
27532
27751
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -27536,7 +27755,16 @@ class TelemetryService {
|
|
|
27536
27755
|
return enriched;
|
|
27537
27756
|
}
|
|
27538
27757
|
generateId() {
|
|
27539
|
-
|
|
27758
|
+
const bytes = new Uint8Array(8);
|
|
27759
|
+
let hex = "";
|
|
27760
|
+
do {
|
|
27761
|
+
crypto.getRandomValues(bytes);
|
|
27762
|
+
hex = "";
|
|
27763
|
+
for (const byte of bytes) {
|
|
27764
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
27765
|
+
}
|
|
27766
|
+
} while (/^0+$/.test(hex));
|
|
27767
|
+
return hex;
|
|
27540
27768
|
}
|
|
27541
27769
|
}
|
|
27542
27770
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -28239,134 +28467,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
28239
28467
|
};
|
|
28240
28468
|
}
|
|
28241
28469
|
|
|
28242
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
28243
|
-
var REDACTED = "[REDACTED]";
|
|
28244
|
-
var MAX_VALUE_LENGTH = 200;
|
|
28245
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
28246
|
-
"token",
|
|
28247
|
-
"tokens",
|
|
28248
|
-
"secret",
|
|
28249
|
-
"secrets",
|
|
28250
|
-
"password",
|
|
28251
|
-
"passwords",
|
|
28252
|
-
"pwd",
|
|
28253
|
-
"credential",
|
|
28254
|
-
"credentials",
|
|
28255
|
-
"auth",
|
|
28256
|
-
"authentication",
|
|
28257
|
-
"authorization",
|
|
28258
|
-
"authority",
|
|
28259
|
-
"cert",
|
|
28260
|
-
"certificate",
|
|
28261
|
-
"certificates"
|
|
28262
|
-
]);
|
|
28263
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
28264
|
-
"api",
|
|
28265
|
-
"access",
|
|
28266
|
-
"client",
|
|
28267
|
-
"private",
|
|
28268
|
-
"public",
|
|
28269
|
-
"signing",
|
|
28270
|
-
"encryption",
|
|
28271
|
-
"session",
|
|
28272
|
-
"master",
|
|
28273
|
-
"shared",
|
|
28274
|
-
"root",
|
|
28275
|
-
"ssh",
|
|
28276
|
-
"rsa",
|
|
28277
|
-
"aes",
|
|
28278
|
-
"hmac",
|
|
28279
|
-
"oauth"
|
|
28280
|
-
]);
|
|
28281
|
-
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;
|
|
28282
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
28283
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
28284
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
28285
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
28286
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
28287
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
28288
|
-
function shortHash(input) {
|
|
28289
|
-
let hash = 2166136261;
|
|
28290
|
-
for (let i = 0;i < input.length; i++) {
|
|
28291
|
-
hash ^= input.charCodeAt(i);
|
|
28292
|
-
hash = Math.imul(hash, 16777619);
|
|
28293
|
-
}
|
|
28294
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
28295
|
-
}
|
|
28296
|
-
function redactUrl(raw) {
|
|
28297
|
-
try {
|
|
28298
|
-
const url = new URL(raw);
|
|
28299
|
-
return `${url.protocol}//${url.host}`;
|
|
28300
|
-
} catch {
|
|
28301
|
-
return `url#${shortHash(raw)}`;
|
|
28302
|
-
}
|
|
28303
|
-
}
|
|
28304
|
-
function redactValueDetectors(value) {
|
|
28305
|
-
let out = value;
|
|
28306
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
28307
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
28308
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
28309
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
28310
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
28311
|
-
});
|
|
28312
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
28313
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
28314
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
28315
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
28316
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
28317
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
28318
|
-
}
|
|
28319
|
-
return out;
|
|
28320
|
-
}
|
|
28321
|
-
function nameTokens(name) {
|
|
28322
|
-
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);
|
|
28323
|
-
}
|
|
28324
|
-
function isSensitiveName(name) {
|
|
28325
|
-
const tokens = nameTokens(name);
|
|
28326
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
28327
|
-
const token = tokens[i];
|
|
28328
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
28329
|
-
return true;
|
|
28330
|
-
}
|
|
28331
|
-
if (token === "key" || token === "keys") {
|
|
28332
|
-
const prev = tokens[i - 1];
|
|
28333
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
28334
|
-
return true;
|
|
28335
|
-
}
|
|
28336
|
-
}
|
|
28337
|
-
}
|
|
28338
|
-
return false;
|
|
28339
|
-
}
|
|
28340
|
-
function redactProperty(name, value) {
|
|
28341
|
-
if (value === undefined || value === null) {
|
|
28342
|
-
return;
|
|
28343
|
-
}
|
|
28344
|
-
if (isSensitiveName(name)) {
|
|
28345
|
-
return REDACTED;
|
|
28346
|
-
}
|
|
28347
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
28348
|
-
return value;
|
|
28349
|
-
}
|
|
28350
|
-
if (typeof value !== "string") {
|
|
28351
|
-
return "[OBJECT]";
|
|
28352
|
-
}
|
|
28353
|
-
return redactValueDetectors(value);
|
|
28354
|
-
}
|
|
28355
|
-
function redactProperties(properties) {
|
|
28356
|
-
const out = {};
|
|
28357
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
28358
|
-
const redacted = redactProperty(name, value);
|
|
28359
|
-
if (redacted !== undefined) {
|
|
28360
|
-
out[name] = redacted;
|
|
28361
|
-
}
|
|
28362
|
-
}
|
|
28363
|
-
return out;
|
|
28364
|
-
}
|
|
28365
|
-
|
|
28366
28470
|
// ../common/src/trackedAction.ts
|
|
28367
28471
|
var pollSignalSlot = singleton("PollSignal");
|
|
28368
28472
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
28369
28473
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
28474
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
28370
28475
|
var processContext = {
|
|
28371
28476
|
exit: (code) => {
|
|
28372
28477
|
process.exitCode = code;
|
|
@@ -28377,22 +28482,18 @@ var processContext = {
|
|
|
28377
28482
|
};
|
|
28378
28483
|
function extractCommandParams(cmd) {
|
|
28379
28484
|
const params = {};
|
|
28485
|
+
const add2 = (name, value) => {
|
|
28486
|
+
if (name && value !== undefined) {
|
|
28487
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
28488
|
+
}
|
|
28489
|
+
};
|
|
28380
28490
|
const registered = cmd.registeredArguments ?? [];
|
|
28381
28491
|
const processed = cmd.processedArgs ?? [];
|
|
28382
28492
|
for (let i = 0;i < registered.length; i++) {
|
|
28383
|
-
|
|
28384
|
-
if (value === undefined) {
|
|
28385
|
-
continue;
|
|
28386
|
-
}
|
|
28387
|
-
const name = registered[i].name();
|
|
28388
|
-
if (name) {
|
|
28389
|
-
params[name] = value;
|
|
28390
|
-
}
|
|
28493
|
+
add2(registered[i].name(), processed[i]);
|
|
28391
28494
|
}
|
|
28392
28495
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
28393
|
-
|
|
28394
|
-
params[key] = value;
|
|
28395
|
-
}
|
|
28496
|
+
add2(key, value);
|
|
28396
28497
|
}
|
|
28397
28498
|
return params;
|
|
28398
28499
|
}
|
|
@@ -28435,11 +28536,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
28435
28536
|
return this.action(async (...args) => {
|
|
28436
28537
|
const telemetryName = deriveCommandPath(command);
|
|
28437
28538
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
28539
|
+
const requestContext = telemetry.createRequestContext();
|
|
28438
28540
|
const startTime = performance.now();
|
|
28439
28541
|
let errorMessage;
|
|
28440
28542
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
28441
28543
|
clearRecordedCommandFailureTelemetry();
|
|
28442
|
-
const [error] = await catchError(fn(...args));
|
|
28544
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
28443
28545
|
if (error) {
|
|
28444
28546
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
28445
28547
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -28475,16 +28577,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
28475
28577
|
recordedFailure,
|
|
28476
28578
|
pollSignal: context.pollSignal
|
|
28477
28579
|
});
|
|
28478
|
-
|
|
28479
|
-
|
|
28580
|
+
const commandParams = extractCommandParams(command);
|
|
28581
|
+
if (props) {
|
|
28582
|
+
for (const key of Object.keys(props)) {
|
|
28583
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
28584
|
+
}
|
|
28585
|
+
}
|
|
28586
|
+
const baseProperties = redactProperties({
|
|
28587
|
+
...commandParams,
|
|
28480
28588
|
...props,
|
|
28481
28589
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
28482
28590
|
command: "true",
|
|
28483
|
-
duration: String(durationMs),
|
|
28484
|
-
success: String(success),
|
|
28485
28591
|
...terminalTelemetry,
|
|
28486
28592
|
...errorMessage ? { errorMessage } : {}
|
|
28487
|
-
})
|
|
28593
|
+
});
|
|
28594
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
28488
28595
|
});
|
|
28489
28596
|
};
|
|
28490
28597
|
|
|
@@ -29818,7 +29925,7 @@ init_server();
|
|
|
29818
29925
|
var package_default2 = {
|
|
29819
29926
|
name: "@uipath/ixp-sdk",
|
|
29820
29927
|
license: "MIT",
|
|
29821
|
-
version: "1.199.0-preview.
|
|
29928
|
+
version: "1.199.0-preview.97",
|
|
29822
29929
|
description: "SDK for the UiPath IXP (Intelligent eXtraction Platform) API — projects, taxonomies, prompts, predictions, and model publishing.",
|
|
29823
29930
|
repository: {
|
|
29824
29931
|
type: "git",
|
|
@@ -32406,4 +32513,4 @@ export {
|
|
|
32406
32513
|
metadata
|
|
32407
32514
|
};
|
|
32408
32515
|
|
|
32409
|
-
//# debugId=
|
|
32516
|
+
//# debugId=E2E558D917F22EA964756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/ixp-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0-preview.
|
|
4
|
+
"version": "1.199.0-preview.97",
|
|
5
5
|
"description": "Manage UiPath IXP projects, prompts, predictions, and model publishing.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "087ae21e842f27bde5eb0013892c9487bfe60568"
|
|
30
30
|
}
|