@uipath/vertical-solutions-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
|
@@ -27537,7 +27537,7 @@ var require_src6 = __commonJS((exports) => {
|
|
|
27537
27537
|
var package_default = {
|
|
27538
27538
|
name: "@uipath/vertical-solutions-tool",
|
|
27539
27539
|
license: "MIT",
|
|
27540
|
-
version: "1.198.0
|
|
27540
|
+
version: "1.198.0",
|
|
27541
27541
|
description: "Scaffold and generate Vertical Solution projects.",
|
|
27542
27542
|
private: false,
|
|
27543
27543
|
repository: {
|
|
@@ -33451,11 +33451,36 @@ class NodeContextStorage {
|
|
|
33451
33451
|
return this.storage.getStore();
|
|
33452
33452
|
}
|
|
33453
33453
|
}
|
|
33454
|
+
// ../common/src/telemetry/trace-context.ts
|
|
33455
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
33456
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
33457
|
+
function getProcessEnv() {
|
|
33458
|
+
return globalThis.process?.env;
|
|
33459
|
+
}
|
|
33460
|
+
function parseInboundTraceparent(value) {
|
|
33461
|
+
if (!value) {
|
|
33462
|
+
return;
|
|
33463
|
+
}
|
|
33464
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
33465
|
+
if (!match) {
|
|
33466
|
+
return;
|
|
33467
|
+
}
|
|
33468
|
+
const [, traceId, parentSpanId] = match;
|
|
33469
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
33470
|
+
return;
|
|
33471
|
+
}
|
|
33472
|
+
return { traceId, parentSpanId };
|
|
33473
|
+
}
|
|
33474
|
+
function getInboundTraceContext() {
|
|
33475
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
33476
|
+
}
|
|
33477
|
+
|
|
33454
33478
|
// ../common/src/telemetry/session-id.ts
|
|
33455
33479
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
33456
33480
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
33457
33481
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
33458
|
-
|
|
33482
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
33483
|
+
function getProcessEnv2() {
|
|
33459
33484
|
return globalThis.process?.env;
|
|
33460
33485
|
}
|
|
33461
33486
|
function normalizeSessionId(value) {
|
|
@@ -33466,18 +33491,165 @@ function normalizeSessionId(value) {
|
|
|
33466
33491
|
return trimmed || undefined;
|
|
33467
33492
|
}
|
|
33468
33493
|
function getConfiguredTelemetrySessionId() {
|
|
33469
|
-
return normalizeSessionId(
|
|
33494
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
33470
33495
|
}
|
|
33471
33496
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
33472
33497
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
33473
33498
|
}
|
|
33499
|
+
function getTelemetryOperationId() {
|
|
33500
|
+
const existing = telemetryOperationIdSlot.get();
|
|
33501
|
+
if (existing) {
|
|
33502
|
+
return existing;
|
|
33503
|
+
}
|
|
33504
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
33505
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
33506
|
+
telemetryOperationIdSlot.set(generated);
|
|
33507
|
+
return generated;
|
|
33508
|
+
}
|
|
33474
33509
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
33475
33510
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
33476
33511
|
function getGlobalTelemetryProperties() {
|
|
33477
33512
|
return telemetryPropsSlot.get();
|
|
33478
33513
|
}
|
|
33479
33514
|
|
|
33515
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
33516
|
+
var REDACTED = "[REDACTED]";
|
|
33517
|
+
var MAX_VALUE_LENGTH = 200;
|
|
33518
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
33519
|
+
"token",
|
|
33520
|
+
"tokens",
|
|
33521
|
+
"secret",
|
|
33522
|
+
"secrets",
|
|
33523
|
+
"password",
|
|
33524
|
+
"passwords",
|
|
33525
|
+
"pwd",
|
|
33526
|
+
"credential",
|
|
33527
|
+
"credentials",
|
|
33528
|
+
"auth",
|
|
33529
|
+
"authentication",
|
|
33530
|
+
"authorization",
|
|
33531
|
+
"authority",
|
|
33532
|
+
"cert",
|
|
33533
|
+
"certificate",
|
|
33534
|
+
"certificates"
|
|
33535
|
+
]);
|
|
33536
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
33537
|
+
"api",
|
|
33538
|
+
"access",
|
|
33539
|
+
"client",
|
|
33540
|
+
"private",
|
|
33541
|
+
"public",
|
|
33542
|
+
"signing",
|
|
33543
|
+
"encryption",
|
|
33544
|
+
"session",
|
|
33545
|
+
"master",
|
|
33546
|
+
"shared",
|
|
33547
|
+
"root",
|
|
33548
|
+
"ssh",
|
|
33549
|
+
"rsa",
|
|
33550
|
+
"aes",
|
|
33551
|
+
"hmac",
|
|
33552
|
+
"oauth"
|
|
33553
|
+
]);
|
|
33554
|
+
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;
|
|
33555
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
33556
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
33557
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
33558
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
33559
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
33560
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
33561
|
+
function shortHash(input) {
|
|
33562
|
+
let hash = 2166136261;
|
|
33563
|
+
for (let i = 0;i < input.length; i++) {
|
|
33564
|
+
hash ^= input.charCodeAt(i);
|
|
33565
|
+
hash = Math.imul(hash, 16777619);
|
|
33566
|
+
}
|
|
33567
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
33568
|
+
}
|
|
33569
|
+
function redactUrl(raw) {
|
|
33570
|
+
try {
|
|
33571
|
+
const url = new URL(raw);
|
|
33572
|
+
return `${url.protocol}//${url.host}`;
|
|
33573
|
+
} catch {
|
|
33574
|
+
return `url#${shortHash(raw)}`;
|
|
33575
|
+
}
|
|
33576
|
+
}
|
|
33577
|
+
function redactValueDetectors(value) {
|
|
33578
|
+
let out = value;
|
|
33579
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
33580
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
33581
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
33582
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
33583
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
33584
|
+
});
|
|
33585
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
33586
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
33587
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
33588
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
33589
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
33590
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
33591
|
+
}
|
|
33592
|
+
return out;
|
|
33593
|
+
}
|
|
33594
|
+
function redactValue(value) {
|
|
33595
|
+
return redactValueDetectors(value);
|
|
33596
|
+
}
|
|
33597
|
+
function redactError(error) {
|
|
33598
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
33599
|
+
safe.name = error.name;
|
|
33600
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
33601
|
+
return safe;
|
|
33602
|
+
}
|
|
33603
|
+
function nameTokens(name) {
|
|
33604
|
+
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);
|
|
33605
|
+
}
|
|
33606
|
+
function isSensitiveName(name) {
|
|
33607
|
+
const tokens = nameTokens(name);
|
|
33608
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
33609
|
+
const token = tokens[i];
|
|
33610
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
33611
|
+
return true;
|
|
33612
|
+
}
|
|
33613
|
+
if (token === "key" || token === "keys") {
|
|
33614
|
+
const prev = tokens[i - 1];
|
|
33615
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
33616
|
+
return true;
|
|
33617
|
+
}
|
|
33618
|
+
}
|
|
33619
|
+
}
|
|
33620
|
+
return false;
|
|
33621
|
+
}
|
|
33622
|
+
function redactProperty(name, value) {
|
|
33623
|
+
if (value === undefined || value === null) {
|
|
33624
|
+
return;
|
|
33625
|
+
}
|
|
33626
|
+
if (isSensitiveName(name)) {
|
|
33627
|
+
return REDACTED;
|
|
33628
|
+
}
|
|
33629
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
33630
|
+
return value;
|
|
33631
|
+
}
|
|
33632
|
+
if (typeof value !== "string") {
|
|
33633
|
+
return "[OBJECT]";
|
|
33634
|
+
}
|
|
33635
|
+
return redactValueDetectors(value);
|
|
33636
|
+
}
|
|
33637
|
+
function redactProperties(properties) {
|
|
33638
|
+
const out = {};
|
|
33639
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
33640
|
+
const redacted = redactProperty(name, value);
|
|
33641
|
+
if (redacted !== undefined) {
|
|
33642
|
+
out[name] = redacted;
|
|
33643
|
+
}
|
|
33644
|
+
}
|
|
33645
|
+
return out;
|
|
33646
|
+
}
|
|
33647
|
+
|
|
33480
33648
|
// ../common/src/telemetry/telemetry-service.ts
|
|
33649
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
33650
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
33651
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
33652
|
+
|
|
33481
33653
|
class TelemetryService {
|
|
33482
33654
|
telemetryProvider;
|
|
33483
33655
|
contextStorage;
|
|
@@ -33504,11 +33676,15 @@ class TelemetryService {
|
|
|
33504
33676
|
trackException(error, properties) {
|
|
33505
33677
|
const context = this.getCurrentContext();
|
|
33506
33678
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
33507
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
33679
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
33508
33680
|
}
|
|
33509
33681
|
async trackRequest(name, fn, properties) {
|
|
33682
|
+
const parentContext = this.getCurrentContext();
|
|
33683
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
33684
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
33510
33685
|
const context = {
|
|
33511
|
-
operationId
|
|
33686
|
+
operationId,
|
|
33687
|
+
...parentId !== undefined ? { parentId } : {},
|
|
33512
33688
|
id: this.generateId()
|
|
33513
33689
|
};
|
|
33514
33690
|
const startTime = performance.now();
|
|
@@ -33526,6 +33702,45 @@ class TelemetryService {
|
|
|
33526
33702
|
throw error;
|
|
33527
33703
|
}
|
|
33528
33704
|
}
|
|
33705
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
33706
|
+
const requestContext = context ?? {
|
|
33707
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
33708
|
+
id: this.generateId()
|
|
33709
|
+
};
|
|
33710
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
33711
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
33712
|
+
}
|
|
33713
|
+
createRequestContext() {
|
|
33714
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
33715
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
33716
|
+
return {
|
|
33717
|
+
operationId,
|
|
33718
|
+
...parentId !== undefined ? { parentId } : {},
|
|
33719
|
+
id: this.generateId()
|
|
33720
|
+
};
|
|
33721
|
+
}
|
|
33722
|
+
inboundParentIdFor(operationId) {
|
|
33723
|
+
const inbound = getInboundTraceContext();
|
|
33724
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
33725
|
+
}
|
|
33726
|
+
runWithContext(context, fn) {
|
|
33727
|
+
return this.contextStorage.run(context, fn);
|
|
33728
|
+
}
|
|
33729
|
+
createDependencyContext() {
|
|
33730
|
+
const parentContext = this.getCurrentContext();
|
|
33731
|
+
if (!parentContext) {
|
|
33732
|
+
return;
|
|
33733
|
+
}
|
|
33734
|
+
return {
|
|
33735
|
+
operationId: parentContext.operationId,
|
|
33736
|
+
parentId: parentContext.id,
|
|
33737
|
+
id: this.generateId()
|
|
33738
|
+
};
|
|
33739
|
+
}
|
|
33740
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
33741
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
33742
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
33743
|
+
}
|
|
33529
33744
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
33530
33745
|
const parentContext = this.getCurrentContext();
|
|
33531
33746
|
if (!parentContext) {
|
|
@@ -33562,8 +33777,12 @@ class TelemetryService {
|
|
|
33562
33777
|
...getExecutionContextTelemetryProperties(),
|
|
33563
33778
|
...globalProperties,
|
|
33564
33779
|
...this.defaultProperties,
|
|
33565
|
-
...properties,
|
|
33566
|
-
...context
|
|
33780
|
+
...redactProperties(properties ?? {}),
|
|
33781
|
+
...context ? {
|
|
33782
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
33783
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
33784
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
33785
|
+
} : {}
|
|
33567
33786
|
};
|
|
33568
33787
|
if (sessionId === undefined) {
|
|
33569
33788
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -33573,7 +33792,16 @@ class TelemetryService {
|
|
|
33573
33792
|
return enriched;
|
|
33574
33793
|
}
|
|
33575
33794
|
generateId() {
|
|
33576
|
-
|
|
33795
|
+
const bytes = new Uint8Array(8);
|
|
33796
|
+
let hex = "";
|
|
33797
|
+
do {
|
|
33798
|
+
crypto.getRandomValues(bytes);
|
|
33799
|
+
hex = "";
|
|
33800
|
+
for (const byte of bytes) {
|
|
33801
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
33802
|
+
}
|
|
33803
|
+
} while (/^0+$/.test(hex));
|
|
33804
|
+
return hex;
|
|
33577
33805
|
}
|
|
33578
33806
|
}
|
|
33579
33807
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -34275,134 +34503,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
34275
34503
|
};
|
|
34276
34504
|
}
|
|
34277
34505
|
|
|
34278
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
34279
|
-
var REDACTED = "[REDACTED]";
|
|
34280
|
-
var MAX_VALUE_LENGTH = 200;
|
|
34281
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
34282
|
-
"token",
|
|
34283
|
-
"tokens",
|
|
34284
|
-
"secret",
|
|
34285
|
-
"secrets",
|
|
34286
|
-
"password",
|
|
34287
|
-
"passwords",
|
|
34288
|
-
"pwd",
|
|
34289
|
-
"credential",
|
|
34290
|
-
"credentials",
|
|
34291
|
-
"auth",
|
|
34292
|
-
"authentication",
|
|
34293
|
-
"authorization",
|
|
34294
|
-
"authority",
|
|
34295
|
-
"cert",
|
|
34296
|
-
"certificate",
|
|
34297
|
-
"certificates"
|
|
34298
|
-
]);
|
|
34299
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
34300
|
-
"api",
|
|
34301
|
-
"access",
|
|
34302
|
-
"client",
|
|
34303
|
-
"private",
|
|
34304
|
-
"public",
|
|
34305
|
-
"signing",
|
|
34306
|
-
"encryption",
|
|
34307
|
-
"session",
|
|
34308
|
-
"master",
|
|
34309
|
-
"shared",
|
|
34310
|
-
"root",
|
|
34311
|
-
"ssh",
|
|
34312
|
-
"rsa",
|
|
34313
|
-
"aes",
|
|
34314
|
-
"hmac",
|
|
34315
|
-
"oauth"
|
|
34316
|
-
]);
|
|
34317
|
-
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;
|
|
34318
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
34319
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
34320
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
34321
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
34322
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
34323
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
34324
|
-
function shortHash(input) {
|
|
34325
|
-
let hash = 2166136261;
|
|
34326
|
-
for (let i = 0;i < input.length; i++) {
|
|
34327
|
-
hash ^= input.charCodeAt(i);
|
|
34328
|
-
hash = Math.imul(hash, 16777619);
|
|
34329
|
-
}
|
|
34330
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
34331
|
-
}
|
|
34332
|
-
function redactUrl(raw) {
|
|
34333
|
-
try {
|
|
34334
|
-
const url = new URL(raw);
|
|
34335
|
-
return `${url.protocol}//${url.host}`;
|
|
34336
|
-
} catch {
|
|
34337
|
-
return `url#${shortHash(raw)}`;
|
|
34338
|
-
}
|
|
34339
|
-
}
|
|
34340
|
-
function redactValueDetectors(value) {
|
|
34341
|
-
let out = value;
|
|
34342
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
34343
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
34344
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
34345
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
34346
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
34347
|
-
});
|
|
34348
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
34349
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
34350
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
34351
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
34352
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
34353
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
34354
|
-
}
|
|
34355
|
-
return out;
|
|
34356
|
-
}
|
|
34357
|
-
function nameTokens(name) {
|
|
34358
|
-
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);
|
|
34359
|
-
}
|
|
34360
|
-
function isSensitiveName(name) {
|
|
34361
|
-
const tokens = nameTokens(name);
|
|
34362
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
34363
|
-
const token = tokens[i];
|
|
34364
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
34365
|
-
return true;
|
|
34366
|
-
}
|
|
34367
|
-
if (token === "key" || token === "keys") {
|
|
34368
|
-
const prev = tokens[i - 1];
|
|
34369
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
34370
|
-
return true;
|
|
34371
|
-
}
|
|
34372
|
-
}
|
|
34373
|
-
}
|
|
34374
|
-
return false;
|
|
34375
|
-
}
|
|
34376
|
-
function redactProperty(name, value) {
|
|
34377
|
-
if (value === undefined || value === null) {
|
|
34378
|
-
return;
|
|
34379
|
-
}
|
|
34380
|
-
if (isSensitiveName(name)) {
|
|
34381
|
-
return REDACTED;
|
|
34382
|
-
}
|
|
34383
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
34384
|
-
return value;
|
|
34385
|
-
}
|
|
34386
|
-
if (typeof value !== "string") {
|
|
34387
|
-
return "[OBJECT]";
|
|
34388
|
-
}
|
|
34389
|
-
return redactValueDetectors(value);
|
|
34390
|
-
}
|
|
34391
|
-
function redactProperties(properties) {
|
|
34392
|
-
const out = {};
|
|
34393
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
34394
|
-
const redacted = redactProperty(name, value);
|
|
34395
|
-
if (redacted !== undefined) {
|
|
34396
|
-
out[name] = redacted;
|
|
34397
|
-
}
|
|
34398
|
-
}
|
|
34399
|
-
return out;
|
|
34400
|
-
}
|
|
34401
|
-
|
|
34402
34506
|
// ../common/src/trackedAction.ts
|
|
34403
34507
|
var pollSignalSlot = singleton("PollSignal");
|
|
34404
34508
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
34405
34509
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
34510
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
34406
34511
|
var processContext = {
|
|
34407
34512
|
exit: (code) => {
|
|
34408
34513
|
process.exitCode = code;
|
|
@@ -34413,22 +34518,18 @@ var processContext = {
|
|
|
34413
34518
|
};
|
|
34414
34519
|
function extractCommandParams(cmd) {
|
|
34415
34520
|
const params = {};
|
|
34521
|
+
const add2 = (name, value) => {
|
|
34522
|
+
if (name && value !== undefined) {
|
|
34523
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
34524
|
+
}
|
|
34525
|
+
};
|
|
34416
34526
|
const registered = cmd.registeredArguments ?? [];
|
|
34417
34527
|
const processed = cmd.processedArgs ?? [];
|
|
34418
34528
|
for (let i = 0;i < registered.length; i++) {
|
|
34419
|
-
|
|
34420
|
-
if (value === undefined) {
|
|
34421
|
-
continue;
|
|
34422
|
-
}
|
|
34423
|
-
const name = registered[i].name();
|
|
34424
|
-
if (name) {
|
|
34425
|
-
params[name] = value;
|
|
34426
|
-
}
|
|
34529
|
+
add2(registered[i].name(), processed[i]);
|
|
34427
34530
|
}
|
|
34428
34531
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
34429
|
-
|
|
34430
|
-
params[key] = value;
|
|
34431
|
-
}
|
|
34532
|
+
add2(key, value);
|
|
34432
34533
|
}
|
|
34433
34534
|
return params;
|
|
34434
34535
|
}
|
|
@@ -34471,11 +34572,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
34471
34572
|
return this.action(async (...args) => {
|
|
34472
34573
|
const telemetryName = deriveCommandPath(command);
|
|
34473
34574
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
34575
|
+
const requestContext = telemetry.createRequestContext();
|
|
34474
34576
|
const startTime = performance.now();
|
|
34475
34577
|
let errorMessage;
|
|
34476
34578
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
34477
34579
|
clearRecordedCommandFailureTelemetry();
|
|
34478
|
-
const [error] = await catchError(fn(...args));
|
|
34580
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
34479
34581
|
if (error) {
|
|
34480
34582
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
34481
34583
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -34511,16 +34613,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
34511
34613
|
recordedFailure,
|
|
34512
34614
|
pollSignal: context.pollSignal
|
|
34513
34615
|
});
|
|
34514
|
-
|
|
34515
|
-
|
|
34616
|
+
const commandParams = extractCommandParams(command);
|
|
34617
|
+
if (props) {
|
|
34618
|
+
for (const key of Object.keys(props)) {
|
|
34619
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
34620
|
+
}
|
|
34621
|
+
}
|
|
34622
|
+
const baseProperties = redactProperties({
|
|
34623
|
+
...commandParams,
|
|
34516
34624
|
...props,
|
|
34517
34625
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
34518
34626
|
command: "true",
|
|
34519
|
-
duration: String(durationMs),
|
|
34520
|
-
success: String(success),
|
|
34521
34627
|
...terminalTelemetry,
|
|
34522
34628
|
...errorMessage ? { errorMessage } : {}
|
|
34523
|
-
})
|
|
34629
|
+
});
|
|
34630
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
34524
34631
|
});
|
|
34525
34632
|
};
|
|
34526
34633
|
// ../common/src/console-guard.ts
|
|
@@ -67321,4 +67428,4 @@ export {
|
|
|
67321
67428
|
metadata
|
|
67322
67429
|
};
|
|
67323
67430
|
|
|
67324
|
-
//# debugId=
|
|
67431
|
+
//# debugId=6A752AB890CF4F6F64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/vertical-solutions-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.198.0
|
|
4
|
+
"version": "1.198.0",
|
|
5
5
|
"description": "Scaffold and generate Vertical Solution projects.",
|
|
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
|
}
|