@uipath/vertical-solutions-tool 1.199.0-preview.92 → 1.199.0-preview.99
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
|
@@ -27603,7 +27603,7 @@ var require_src6 = __commonJS((exports) => {
|
|
|
27603
27603
|
var package_default = {
|
|
27604
27604
|
name: "@uipath/vertical-solutions-tool",
|
|
27605
27605
|
license: "MIT",
|
|
27606
|
-
version: "1.199.0-preview.
|
|
27606
|
+
version: "1.199.0-preview.99",
|
|
27607
27607
|
description: "Scaffold and generate Vertical Solution projects.",
|
|
27608
27608
|
private: false,
|
|
27609
27609
|
repository: {
|
|
@@ -33517,11 +33517,36 @@ class NodeContextStorage {
|
|
|
33517
33517
|
return this.storage.getStore();
|
|
33518
33518
|
}
|
|
33519
33519
|
}
|
|
33520
|
+
// ../common/src/telemetry/trace-context.ts
|
|
33521
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
33522
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
33523
|
+
function getProcessEnv() {
|
|
33524
|
+
return globalThis.process?.env;
|
|
33525
|
+
}
|
|
33526
|
+
function parseInboundTraceparent(value) {
|
|
33527
|
+
if (!value) {
|
|
33528
|
+
return;
|
|
33529
|
+
}
|
|
33530
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
33531
|
+
if (!match) {
|
|
33532
|
+
return;
|
|
33533
|
+
}
|
|
33534
|
+
const [, traceId, parentSpanId] = match;
|
|
33535
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
33536
|
+
return;
|
|
33537
|
+
}
|
|
33538
|
+
return { traceId, parentSpanId };
|
|
33539
|
+
}
|
|
33540
|
+
function getInboundTraceContext() {
|
|
33541
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
33542
|
+
}
|
|
33543
|
+
|
|
33520
33544
|
// ../common/src/telemetry/session-id.ts
|
|
33521
33545
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
33522
33546
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
33523
33547
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
33524
|
-
|
|
33548
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
33549
|
+
function getProcessEnv2() {
|
|
33525
33550
|
return globalThis.process?.env;
|
|
33526
33551
|
}
|
|
33527
33552
|
function normalizeSessionId(value) {
|
|
@@ -33532,18 +33557,165 @@ function normalizeSessionId(value) {
|
|
|
33532
33557
|
return trimmed || undefined;
|
|
33533
33558
|
}
|
|
33534
33559
|
function getConfiguredTelemetrySessionId() {
|
|
33535
|
-
return normalizeSessionId(
|
|
33560
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
33536
33561
|
}
|
|
33537
33562
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
33538
33563
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
33539
33564
|
}
|
|
33565
|
+
function getTelemetryOperationId() {
|
|
33566
|
+
const existing = telemetryOperationIdSlot.get();
|
|
33567
|
+
if (existing) {
|
|
33568
|
+
return existing;
|
|
33569
|
+
}
|
|
33570
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
33571
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
33572
|
+
telemetryOperationIdSlot.set(generated);
|
|
33573
|
+
return generated;
|
|
33574
|
+
}
|
|
33540
33575
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
33541
33576
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
33542
33577
|
function getGlobalTelemetryProperties() {
|
|
33543
33578
|
return telemetryPropsSlot.get();
|
|
33544
33579
|
}
|
|
33545
33580
|
|
|
33581
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
33582
|
+
var REDACTED = "[REDACTED]";
|
|
33583
|
+
var MAX_VALUE_LENGTH = 200;
|
|
33584
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
33585
|
+
"token",
|
|
33586
|
+
"tokens",
|
|
33587
|
+
"secret",
|
|
33588
|
+
"secrets",
|
|
33589
|
+
"password",
|
|
33590
|
+
"passwords",
|
|
33591
|
+
"pwd",
|
|
33592
|
+
"credential",
|
|
33593
|
+
"credentials",
|
|
33594
|
+
"auth",
|
|
33595
|
+
"authentication",
|
|
33596
|
+
"authorization",
|
|
33597
|
+
"authority",
|
|
33598
|
+
"cert",
|
|
33599
|
+
"certificate",
|
|
33600
|
+
"certificates"
|
|
33601
|
+
]);
|
|
33602
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
33603
|
+
"api",
|
|
33604
|
+
"access",
|
|
33605
|
+
"client",
|
|
33606
|
+
"private",
|
|
33607
|
+
"public",
|
|
33608
|
+
"signing",
|
|
33609
|
+
"encryption",
|
|
33610
|
+
"session",
|
|
33611
|
+
"master",
|
|
33612
|
+
"shared",
|
|
33613
|
+
"root",
|
|
33614
|
+
"ssh",
|
|
33615
|
+
"rsa",
|
|
33616
|
+
"aes",
|
|
33617
|
+
"hmac",
|
|
33618
|
+
"oauth"
|
|
33619
|
+
]);
|
|
33620
|
+
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;
|
|
33621
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
33622
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
33623
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
33624
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
33625
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
33626
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
33627
|
+
function shortHash(input) {
|
|
33628
|
+
let hash = 2166136261;
|
|
33629
|
+
for (let i = 0;i < input.length; i++) {
|
|
33630
|
+
hash ^= input.charCodeAt(i);
|
|
33631
|
+
hash = Math.imul(hash, 16777619);
|
|
33632
|
+
}
|
|
33633
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
33634
|
+
}
|
|
33635
|
+
function redactUrl(raw) {
|
|
33636
|
+
try {
|
|
33637
|
+
const url = new URL(raw);
|
|
33638
|
+
return `${url.protocol}//${url.host}`;
|
|
33639
|
+
} catch {
|
|
33640
|
+
return `url#${shortHash(raw)}`;
|
|
33641
|
+
}
|
|
33642
|
+
}
|
|
33643
|
+
function redactValueDetectors(value) {
|
|
33644
|
+
let out = value;
|
|
33645
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
33646
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
33647
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
33648
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
33649
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
33650
|
+
});
|
|
33651
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
33652
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
33653
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
33654
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
33655
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
33656
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
33657
|
+
}
|
|
33658
|
+
return out;
|
|
33659
|
+
}
|
|
33660
|
+
function redactValue(value) {
|
|
33661
|
+
return redactValueDetectors(value);
|
|
33662
|
+
}
|
|
33663
|
+
function redactError(error) {
|
|
33664
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
33665
|
+
safe.name = error.name;
|
|
33666
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
33667
|
+
return safe;
|
|
33668
|
+
}
|
|
33669
|
+
function nameTokens(name) {
|
|
33670
|
+
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);
|
|
33671
|
+
}
|
|
33672
|
+
function isSensitiveName(name) {
|
|
33673
|
+
const tokens = nameTokens(name);
|
|
33674
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
33675
|
+
const token = tokens[i];
|
|
33676
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
33677
|
+
return true;
|
|
33678
|
+
}
|
|
33679
|
+
if (token === "key" || token === "keys") {
|
|
33680
|
+
const prev = tokens[i - 1];
|
|
33681
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
33682
|
+
return true;
|
|
33683
|
+
}
|
|
33684
|
+
}
|
|
33685
|
+
}
|
|
33686
|
+
return false;
|
|
33687
|
+
}
|
|
33688
|
+
function redactProperty(name, value) {
|
|
33689
|
+
if (value === undefined || value === null) {
|
|
33690
|
+
return;
|
|
33691
|
+
}
|
|
33692
|
+
if (isSensitiveName(name)) {
|
|
33693
|
+
return REDACTED;
|
|
33694
|
+
}
|
|
33695
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
33696
|
+
return value;
|
|
33697
|
+
}
|
|
33698
|
+
if (typeof value !== "string") {
|
|
33699
|
+
return "[OBJECT]";
|
|
33700
|
+
}
|
|
33701
|
+
return redactValueDetectors(value);
|
|
33702
|
+
}
|
|
33703
|
+
function redactProperties(properties) {
|
|
33704
|
+
const out = {};
|
|
33705
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
33706
|
+
const redacted = redactProperty(name, value);
|
|
33707
|
+
if (redacted !== undefined) {
|
|
33708
|
+
out[name] = redacted;
|
|
33709
|
+
}
|
|
33710
|
+
}
|
|
33711
|
+
return out;
|
|
33712
|
+
}
|
|
33713
|
+
|
|
33546
33714
|
// ../common/src/telemetry/telemetry-service.ts
|
|
33715
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
33716
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
33717
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
33718
|
+
|
|
33547
33719
|
class TelemetryService {
|
|
33548
33720
|
telemetryProvider;
|
|
33549
33721
|
contextStorage;
|
|
@@ -33570,11 +33742,15 @@ class TelemetryService {
|
|
|
33570
33742
|
trackException(error, properties) {
|
|
33571
33743
|
const context = this.getCurrentContext();
|
|
33572
33744
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
33573
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
33745
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
33574
33746
|
}
|
|
33575
33747
|
async trackRequest(name, fn, properties) {
|
|
33748
|
+
const parentContext = this.getCurrentContext();
|
|
33749
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
33750
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
33576
33751
|
const context = {
|
|
33577
|
-
operationId
|
|
33752
|
+
operationId,
|
|
33753
|
+
...parentId !== undefined ? { parentId } : {},
|
|
33578
33754
|
id: this.generateId()
|
|
33579
33755
|
};
|
|
33580
33756
|
const startTime = performance.now();
|
|
@@ -33592,6 +33768,45 @@ class TelemetryService {
|
|
|
33592
33768
|
throw error;
|
|
33593
33769
|
}
|
|
33594
33770
|
}
|
|
33771
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
33772
|
+
const requestContext = context ?? {
|
|
33773
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
33774
|
+
id: this.generateId()
|
|
33775
|
+
};
|
|
33776
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
33777
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
33778
|
+
}
|
|
33779
|
+
createRequestContext() {
|
|
33780
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
33781
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
33782
|
+
return {
|
|
33783
|
+
operationId,
|
|
33784
|
+
...parentId !== undefined ? { parentId } : {},
|
|
33785
|
+
id: this.generateId()
|
|
33786
|
+
};
|
|
33787
|
+
}
|
|
33788
|
+
inboundParentIdFor(operationId) {
|
|
33789
|
+
const inbound = getInboundTraceContext();
|
|
33790
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
33791
|
+
}
|
|
33792
|
+
runWithContext(context, fn) {
|
|
33793
|
+
return this.contextStorage.run(context, fn);
|
|
33794
|
+
}
|
|
33795
|
+
createDependencyContext() {
|
|
33796
|
+
const parentContext = this.getCurrentContext();
|
|
33797
|
+
if (!parentContext) {
|
|
33798
|
+
return;
|
|
33799
|
+
}
|
|
33800
|
+
return {
|
|
33801
|
+
operationId: parentContext.operationId,
|
|
33802
|
+
parentId: parentContext.id,
|
|
33803
|
+
id: this.generateId()
|
|
33804
|
+
};
|
|
33805
|
+
}
|
|
33806
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
33807
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
33808
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
33809
|
+
}
|
|
33595
33810
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
33596
33811
|
const parentContext = this.getCurrentContext();
|
|
33597
33812
|
if (!parentContext) {
|
|
@@ -33628,8 +33843,12 @@ class TelemetryService {
|
|
|
33628
33843
|
...getExecutionContextTelemetryProperties(),
|
|
33629
33844
|
...globalProperties,
|
|
33630
33845
|
...this.defaultProperties,
|
|
33631
|
-
...properties,
|
|
33632
|
-
...context
|
|
33846
|
+
...redactProperties(properties ?? {}),
|
|
33847
|
+
...context ? {
|
|
33848
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
33849
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
33850
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
33851
|
+
} : {}
|
|
33633
33852
|
};
|
|
33634
33853
|
if (sessionId === undefined) {
|
|
33635
33854
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -33639,7 +33858,16 @@ class TelemetryService {
|
|
|
33639
33858
|
return enriched;
|
|
33640
33859
|
}
|
|
33641
33860
|
generateId() {
|
|
33642
|
-
|
|
33861
|
+
const bytes = new Uint8Array(8);
|
|
33862
|
+
let hex = "";
|
|
33863
|
+
do {
|
|
33864
|
+
crypto.getRandomValues(bytes);
|
|
33865
|
+
hex = "";
|
|
33866
|
+
for (const byte of bytes) {
|
|
33867
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
33868
|
+
}
|
|
33869
|
+
} while (/^0+$/.test(hex));
|
|
33870
|
+
return hex;
|
|
33643
33871
|
}
|
|
33644
33872
|
}
|
|
33645
33873
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -34342,134 +34570,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
34342
34570
|
};
|
|
34343
34571
|
}
|
|
34344
34572
|
|
|
34345
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
34346
|
-
var REDACTED = "[REDACTED]";
|
|
34347
|
-
var MAX_VALUE_LENGTH = 200;
|
|
34348
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
34349
|
-
"token",
|
|
34350
|
-
"tokens",
|
|
34351
|
-
"secret",
|
|
34352
|
-
"secrets",
|
|
34353
|
-
"password",
|
|
34354
|
-
"passwords",
|
|
34355
|
-
"pwd",
|
|
34356
|
-
"credential",
|
|
34357
|
-
"credentials",
|
|
34358
|
-
"auth",
|
|
34359
|
-
"authentication",
|
|
34360
|
-
"authorization",
|
|
34361
|
-
"authority",
|
|
34362
|
-
"cert",
|
|
34363
|
-
"certificate",
|
|
34364
|
-
"certificates"
|
|
34365
|
-
]);
|
|
34366
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
34367
|
-
"api",
|
|
34368
|
-
"access",
|
|
34369
|
-
"client",
|
|
34370
|
-
"private",
|
|
34371
|
-
"public",
|
|
34372
|
-
"signing",
|
|
34373
|
-
"encryption",
|
|
34374
|
-
"session",
|
|
34375
|
-
"master",
|
|
34376
|
-
"shared",
|
|
34377
|
-
"root",
|
|
34378
|
-
"ssh",
|
|
34379
|
-
"rsa",
|
|
34380
|
-
"aes",
|
|
34381
|
-
"hmac",
|
|
34382
|
-
"oauth"
|
|
34383
|
-
]);
|
|
34384
|
-
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;
|
|
34385
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
34386
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
34387
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
34388
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
34389
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
34390
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
34391
|
-
function shortHash(input) {
|
|
34392
|
-
let hash = 2166136261;
|
|
34393
|
-
for (let i = 0;i < input.length; i++) {
|
|
34394
|
-
hash ^= input.charCodeAt(i);
|
|
34395
|
-
hash = Math.imul(hash, 16777619);
|
|
34396
|
-
}
|
|
34397
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
34398
|
-
}
|
|
34399
|
-
function redactUrl(raw) {
|
|
34400
|
-
try {
|
|
34401
|
-
const url = new URL(raw);
|
|
34402
|
-
return `${url.protocol}//${url.host}`;
|
|
34403
|
-
} catch {
|
|
34404
|
-
return `url#${shortHash(raw)}`;
|
|
34405
|
-
}
|
|
34406
|
-
}
|
|
34407
|
-
function redactValueDetectors(value) {
|
|
34408
|
-
let out = value;
|
|
34409
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
34410
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
34411
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
34412
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
34413
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
34414
|
-
});
|
|
34415
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
34416
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
34417
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
34418
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
34419
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
34420
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
34421
|
-
}
|
|
34422
|
-
return out;
|
|
34423
|
-
}
|
|
34424
|
-
function nameTokens(name) {
|
|
34425
|
-
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);
|
|
34426
|
-
}
|
|
34427
|
-
function isSensitiveName(name) {
|
|
34428
|
-
const tokens = nameTokens(name);
|
|
34429
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
34430
|
-
const token = tokens[i];
|
|
34431
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
34432
|
-
return true;
|
|
34433
|
-
}
|
|
34434
|
-
if (token === "key" || token === "keys") {
|
|
34435
|
-
const prev = tokens[i - 1];
|
|
34436
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
34437
|
-
return true;
|
|
34438
|
-
}
|
|
34439
|
-
}
|
|
34440
|
-
}
|
|
34441
|
-
return false;
|
|
34442
|
-
}
|
|
34443
|
-
function redactProperty(name, value) {
|
|
34444
|
-
if (value === undefined || value === null) {
|
|
34445
|
-
return;
|
|
34446
|
-
}
|
|
34447
|
-
if (isSensitiveName(name)) {
|
|
34448
|
-
return REDACTED;
|
|
34449
|
-
}
|
|
34450
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
34451
|
-
return value;
|
|
34452
|
-
}
|
|
34453
|
-
if (typeof value !== "string") {
|
|
34454
|
-
return "[OBJECT]";
|
|
34455
|
-
}
|
|
34456
|
-
return redactValueDetectors(value);
|
|
34457
|
-
}
|
|
34458
|
-
function redactProperties(properties) {
|
|
34459
|
-
const out = {};
|
|
34460
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
34461
|
-
const redacted = redactProperty(name, value);
|
|
34462
|
-
if (redacted !== undefined) {
|
|
34463
|
-
out[name] = redacted;
|
|
34464
|
-
}
|
|
34465
|
-
}
|
|
34466
|
-
return out;
|
|
34467
|
-
}
|
|
34468
|
-
|
|
34469
34573
|
// ../common/src/trackedAction.ts
|
|
34470
34574
|
var pollSignalSlot = singleton("PollSignal");
|
|
34471
34575
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
34472
34576
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
34577
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
34473
34578
|
var processContext = {
|
|
34474
34579
|
exit: (code) => {
|
|
34475
34580
|
process.exitCode = code;
|
|
@@ -34480,22 +34585,18 @@ var processContext = {
|
|
|
34480
34585
|
};
|
|
34481
34586
|
function extractCommandParams(cmd) {
|
|
34482
34587
|
const params = {};
|
|
34588
|
+
const add2 = (name, value) => {
|
|
34589
|
+
if (name && value !== undefined) {
|
|
34590
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
34591
|
+
}
|
|
34592
|
+
};
|
|
34483
34593
|
const registered = cmd.registeredArguments ?? [];
|
|
34484
34594
|
const processed = cmd.processedArgs ?? [];
|
|
34485
34595
|
for (let i = 0;i < registered.length; i++) {
|
|
34486
|
-
|
|
34487
|
-
if (value === undefined) {
|
|
34488
|
-
continue;
|
|
34489
|
-
}
|
|
34490
|
-
const name = registered[i].name();
|
|
34491
|
-
if (name) {
|
|
34492
|
-
params[name] = value;
|
|
34493
|
-
}
|
|
34596
|
+
add2(registered[i].name(), processed[i]);
|
|
34494
34597
|
}
|
|
34495
34598
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
34496
|
-
|
|
34497
|
-
params[key] = value;
|
|
34498
|
-
}
|
|
34599
|
+
add2(key, value);
|
|
34499
34600
|
}
|
|
34500
34601
|
return params;
|
|
34501
34602
|
}
|
|
@@ -34538,11 +34639,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
34538
34639
|
return this.action(async (...args) => {
|
|
34539
34640
|
const telemetryName = deriveCommandPath(command);
|
|
34540
34641
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
34642
|
+
const requestContext = telemetry.createRequestContext();
|
|
34541
34643
|
const startTime = performance.now();
|
|
34542
34644
|
let errorMessage;
|
|
34543
34645
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
34544
34646
|
clearRecordedCommandFailureTelemetry();
|
|
34545
|
-
const [error] = await catchError(fn(...args));
|
|
34647
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
34546
34648
|
if (error) {
|
|
34547
34649
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
34548
34650
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -34578,16 +34680,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
34578
34680
|
recordedFailure,
|
|
34579
34681
|
pollSignal: context.pollSignal
|
|
34580
34682
|
});
|
|
34581
|
-
|
|
34582
|
-
|
|
34683
|
+
const commandParams = extractCommandParams(command);
|
|
34684
|
+
if (props) {
|
|
34685
|
+
for (const key of Object.keys(props)) {
|
|
34686
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
34687
|
+
}
|
|
34688
|
+
}
|
|
34689
|
+
const baseProperties = redactProperties({
|
|
34690
|
+
...commandParams,
|
|
34583
34691
|
...props,
|
|
34584
34692
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
34585
34693
|
command: "true",
|
|
34586
|
-
duration: String(durationMs),
|
|
34587
|
-
success: String(success),
|
|
34588
34694
|
...terminalTelemetry,
|
|
34589
34695
|
...errorMessage ? { errorMessage } : {}
|
|
34590
|
-
})
|
|
34696
|
+
});
|
|
34697
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
34591
34698
|
});
|
|
34592
34699
|
};
|
|
34593
34700
|
// ../common/src/console-guard.ts
|
|
@@ -67403,4 +67510,4 @@ export {
|
|
|
67403
67510
|
metadata
|
|
67404
67511
|
};
|
|
67405
67512
|
|
|
67406
|
-
//# debugId=
|
|
67513
|
+
//# debugId=88904EC278BB99B264756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/vertical-solutions-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0-preview.
|
|
4
|
+
"version": "1.199.0-preview.99",
|
|
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": "6ba217cddceb86e3fa39ed82e49c5062878a85c6"
|
|
38
38
|
}
|