@uipath/integrationservice-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 +262 -155
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -22381,11 +22381,11 @@ var require_methods = __commonJS((exports) => {
|
|
|
22381
22381
|
// ../../node_modules/adm-zip/zipEntry.js
|
|
22382
22382
|
var require_zipEntry = __commonJS((exports, module) => {
|
|
22383
22383
|
var Utils = require_util();
|
|
22384
|
-
var
|
|
22384
|
+
var Headers2 = require_headers();
|
|
22385
22385
|
var Constants2 = Utils.Constants;
|
|
22386
22386
|
var Methods = require_methods();
|
|
22387
22387
|
module.exports = function(options, input) {
|
|
22388
|
-
var _centralHeader = new
|
|
22388
|
+
var _centralHeader = new Headers2.EntryHeader, _entryName = Buffer.alloc(0), _comment = Buffer.alloc(0), _isDirectory = false, uncompressedData = null, _extra = Buffer.alloc(0), _extralocal = Buffer.alloc(0), _efs = true;
|
|
22389
22389
|
const opts = options;
|
|
22390
22390
|
const decoder = typeof opts.decoder === "object" ? opts.decoder : Utils.decoder;
|
|
22391
22391
|
_efs = decoder.hasOwnProperty("efs") ? decoder.efs : false;
|
|
@@ -22689,10 +22689,10 @@ var require_zipEntry = __commonJS((exports, module) => {
|
|
|
22689
22689
|
// ../../node_modules/adm-zip/zipFile.js
|
|
22690
22690
|
var require_zipFile = __commonJS((exports, module) => {
|
|
22691
22691
|
var ZipEntry = require_zipEntry();
|
|
22692
|
-
var
|
|
22692
|
+
var Headers2 = require_headers();
|
|
22693
22693
|
var Utils = require_util();
|
|
22694
22694
|
module.exports = function(inBuffer, options) {
|
|
22695
|
-
var entryList = [], entryTable = Object.create(null), _comment = Buffer.alloc(0), mainHeader = new
|
|
22695
|
+
var entryList = [], entryTable = Object.create(null), _comment = Buffer.alloc(0), mainHeader = new Headers2.MainHeader, loadedEntries = false;
|
|
22696
22696
|
var password = null;
|
|
22697
22697
|
const temporary = new Set;
|
|
22698
22698
|
const opts = options;
|
|
@@ -23588,7 +23588,7 @@ var require_adm_zip = __commonJS((exports, module) => {
|
|
|
23588
23588
|
var package_default = {
|
|
23589
23589
|
name: "@uipath/integrationservice-tool",
|
|
23590
23590
|
license: "MIT",
|
|
23591
|
-
version: "1.198.0
|
|
23591
|
+
version: "1.198.0",
|
|
23592
23592
|
description: "Manage Integration Service connectors, connections, and triggers.",
|
|
23593
23593
|
private: false,
|
|
23594
23594
|
repository: {
|
|
@@ -29772,11 +29772,36 @@ class NodeContextStorage {
|
|
|
29772
29772
|
return this.storage.getStore();
|
|
29773
29773
|
}
|
|
29774
29774
|
}
|
|
29775
|
+
// ../common/src/telemetry/trace-context.ts
|
|
29776
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
29777
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
29778
|
+
function getProcessEnv() {
|
|
29779
|
+
return globalThis.process?.env;
|
|
29780
|
+
}
|
|
29781
|
+
function parseInboundTraceparent(value) {
|
|
29782
|
+
if (!value) {
|
|
29783
|
+
return;
|
|
29784
|
+
}
|
|
29785
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
29786
|
+
if (!match) {
|
|
29787
|
+
return;
|
|
29788
|
+
}
|
|
29789
|
+
const [, traceId, parentSpanId] = match;
|
|
29790
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
29791
|
+
return;
|
|
29792
|
+
}
|
|
29793
|
+
return { traceId, parentSpanId };
|
|
29794
|
+
}
|
|
29795
|
+
function getInboundTraceContext() {
|
|
29796
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
29797
|
+
}
|
|
29798
|
+
|
|
29775
29799
|
// ../common/src/telemetry/session-id.ts
|
|
29776
29800
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
29777
29801
|
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
29778
29802
|
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
29779
|
-
|
|
29803
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
29804
|
+
function getProcessEnv2() {
|
|
29780
29805
|
return globalThis.process?.env;
|
|
29781
29806
|
}
|
|
29782
29807
|
function normalizeSessionId(value) {
|
|
@@ -29787,18 +29812,165 @@ function normalizeSessionId(value) {
|
|
|
29787
29812
|
return trimmed || undefined;
|
|
29788
29813
|
}
|
|
29789
29814
|
function getConfiguredTelemetrySessionId() {
|
|
29790
|
-
return normalizeSessionId(
|
|
29815
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
29791
29816
|
}
|
|
29792
29817
|
function resolveTelemetrySessionId(existingSessionId) {
|
|
29793
29818
|
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
29794
29819
|
}
|
|
29820
|
+
function getTelemetryOperationId() {
|
|
29821
|
+
const existing = telemetryOperationIdSlot.get();
|
|
29822
|
+
if (existing) {
|
|
29823
|
+
return existing;
|
|
29824
|
+
}
|
|
29825
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
29826
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
29827
|
+
telemetryOperationIdSlot.set(generated);
|
|
29828
|
+
return generated;
|
|
29829
|
+
}
|
|
29795
29830
|
// ../common/src/telemetry/global-telemetry-properties.ts
|
|
29796
29831
|
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
29797
29832
|
function getGlobalTelemetryProperties() {
|
|
29798
29833
|
return telemetryPropsSlot.get();
|
|
29799
29834
|
}
|
|
29800
29835
|
|
|
29836
|
+
// ../common/src/telemetry/pii-redactor.ts
|
|
29837
|
+
var REDACTED = "[REDACTED]";
|
|
29838
|
+
var MAX_VALUE_LENGTH = 200;
|
|
29839
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
29840
|
+
"token",
|
|
29841
|
+
"tokens",
|
|
29842
|
+
"secret",
|
|
29843
|
+
"secrets",
|
|
29844
|
+
"password",
|
|
29845
|
+
"passwords",
|
|
29846
|
+
"pwd",
|
|
29847
|
+
"credential",
|
|
29848
|
+
"credentials",
|
|
29849
|
+
"auth",
|
|
29850
|
+
"authentication",
|
|
29851
|
+
"authorization",
|
|
29852
|
+
"authority",
|
|
29853
|
+
"cert",
|
|
29854
|
+
"certificate",
|
|
29855
|
+
"certificates"
|
|
29856
|
+
]);
|
|
29857
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
29858
|
+
"api",
|
|
29859
|
+
"access",
|
|
29860
|
+
"client",
|
|
29861
|
+
"private",
|
|
29862
|
+
"public",
|
|
29863
|
+
"signing",
|
|
29864
|
+
"encryption",
|
|
29865
|
+
"session",
|
|
29866
|
+
"master",
|
|
29867
|
+
"shared",
|
|
29868
|
+
"root",
|
|
29869
|
+
"ssh",
|
|
29870
|
+
"rsa",
|
|
29871
|
+
"aes",
|
|
29872
|
+
"hmac",
|
|
29873
|
+
"oauth"
|
|
29874
|
+
]);
|
|
29875
|
+
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;
|
|
29876
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
29877
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
29878
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
29879
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
29880
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
29881
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
29882
|
+
function shortHash(input) {
|
|
29883
|
+
let hash = 2166136261;
|
|
29884
|
+
for (let i = 0;i < input.length; i++) {
|
|
29885
|
+
hash ^= input.charCodeAt(i);
|
|
29886
|
+
hash = Math.imul(hash, 16777619);
|
|
29887
|
+
}
|
|
29888
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
29889
|
+
}
|
|
29890
|
+
function redactUrl(raw) {
|
|
29891
|
+
try {
|
|
29892
|
+
const url = new URL(raw);
|
|
29893
|
+
return `${url.protocol}//${url.host}`;
|
|
29894
|
+
} catch {
|
|
29895
|
+
return `url#${shortHash(raw)}`;
|
|
29896
|
+
}
|
|
29897
|
+
}
|
|
29898
|
+
function redactValueDetectors(value) {
|
|
29899
|
+
let out = value;
|
|
29900
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
29901
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
29902
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
29903
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
29904
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
29905
|
+
});
|
|
29906
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
29907
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
29908
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
29909
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
29910
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
29911
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
29912
|
+
}
|
|
29913
|
+
return out;
|
|
29914
|
+
}
|
|
29915
|
+
function redactValue(value) {
|
|
29916
|
+
return redactValueDetectors(value);
|
|
29917
|
+
}
|
|
29918
|
+
function redactError(error) {
|
|
29919
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
29920
|
+
safe.name = error.name;
|
|
29921
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
29922
|
+
return safe;
|
|
29923
|
+
}
|
|
29924
|
+
function nameTokens(name) {
|
|
29925
|
+
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);
|
|
29926
|
+
}
|
|
29927
|
+
function isSensitiveName(name) {
|
|
29928
|
+
const tokens = nameTokens(name);
|
|
29929
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
29930
|
+
const token = tokens[i];
|
|
29931
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
29932
|
+
return true;
|
|
29933
|
+
}
|
|
29934
|
+
if (token === "key" || token === "keys") {
|
|
29935
|
+
const prev = tokens[i - 1];
|
|
29936
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
29937
|
+
return true;
|
|
29938
|
+
}
|
|
29939
|
+
}
|
|
29940
|
+
}
|
|
29941
|
+
return false;
|
|
29942
|
+
}
|
|
29943
|
+
function redactProperty(name, value) {
|
|
29944
|
+
if (value === undefined || value === null) {
|
|
29945
|
+
return;
|
|
29946
|
+
}
|
|
29947
|
+
if (isSensitiveName(name)) {
|
|
29948
|
+
return REDACTED;
|
|
29949
|
+
}
|
|
29950
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
29951
|
+
return value;
|
|
29952
|
+
}
|
|
29953
|
+
if (typeof value !== "string") {
|
|
29954
|
+
return "[OBJECT]";
|
|
29955
|
+
}
|
|
29956
|
+
return redactValueDetectors(value);
|
|
29957
|
+
}
|
|
29958
|
+
function redactProperties(properties) {
|
|
29959
|
+
const out = {};
|
|
29960
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
29961
|
+
const redacted = redactProperty(name, value);
|
|
29962
|
+
if (redacted !== undefined) {
|
|
29963
|
+
out[name] = redacted;
|
|
29964
|
+
}
|
|
29965
|
+
}
|
|
29966
|
+
return out;
|
|
29967
|
+
}
|
|
29968
|
+
|
|
29801
29969
|
// ../common/src/telemetry/telemetry-service.ts
|
|
29970
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
29971
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
29972
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
29973
|
+
|
|
29802
29974
|
class TelemetryService {
|
|
29803
29975
|
telemetryProvider;
|
|
29804
29976
|
contextStorage;
|
|
@@ -29825,11 +29997,15 @@ class TelemetryService {
|
|
|
29825
29997
|
trackException(error, properties) {
|
|
29826
29998
|
const context = this.getCurrentContext();
|
|
29827
29999
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
29828
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
30000
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
29829
30001
|
}
|
|
29830
30002
|
async trackRequest(name, fn, properties) {
|
|
30003
|
+
const parentContext = this.getCurrentContext();
|
|
30004
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
30005
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
29831
30006
|
const context = {
|
|
29832
|
-
operationId
|
|
30007
|
+
operationId,
|
|
30008
|
+
...parentId !== undefined ? { parentId } : {},
|
|
29833
30009
|
id: this.generateId()
|
|
29834
30010
|
};
|
|
29835
30011
|
const startTime = performance.now();
|
|
@@ -29847,6 +30023,45 @@ class TelemetryService {
|
|
|
29847
30023
|
throw error;
|
|
29848
30024
|
}
|
|
29849
30025
|
}
|
|
30026
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
30027
|
+
const requestContext = context ?? {
|
|
30028
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
30029
|
+
id: this.generateId()
|
|
30030
|
+
};
|
|
30031
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
30032
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
30033
|
+
}
|
|
30034
|
+
createRequestContext() {
|
|
30035
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
30036
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
30037
|
+
return {
|
|
30038
|
+
operationId,
|
|
30039
|
+
...parentId !== undefined ? { parentId } : {},
|
|
30040
|
+
id: this.generateId()
|
|
30041
|
+
};
|
|
30042
|
+
}
|
|
30043
|
+
inboundParentIdFor(operationId) {
|
|
30044
|
+
const inbound = getInboundTraceContext();
|
|
30045
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
30046
|
+
}
|
|
30047
|
+
runWithContext(context, fn) {
|
|
30048
|
+
return this.contextStorage.run(context, fn);
|
|
30049
|
+
}
|
|
30050
|
+
createDependencyContext() {
|
|
30051
|
+
const parentContext = this.getCurrentContext();
|
|
30052
|
+
if (!parentContext) {
|
|
30053
|
+
return;
|
|
30054
|
+
}
|
|
30055
|
+
return {
|
|
30056
|
+
operationId: parentContext.operationId,
|
|
30057
|
+
parentId: parentContext.id,
|
|
30058
|
+
id: this.generateId()
|
|
30059
|
+
};
|
|
30060
|
+
}
|
|
30061
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
30062
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
30063
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
30064
|
+
}
|
|
29850
30065
|
async trackDependencyOperation(name, type2, fn, properties) {
|
|
29851
30066
|
const parentContext = this.getCurrentContext();
|
|
29852
30067
|
if (!parentContext) {
|
|
@@ -29883,8 +30098,12 @@ class TelemetryService {
|
|
|
29883
30098
|
...getExecutionContextTelemetryProperties(),
|
|
29884
30099
|
...globalProperties,
|
|
29885
30100
|
...this.defaultProperties,
|
|
29886
|
-
...properties,
|
|
29887
|
-
...context
|
|
30101
|
+
...redactProperties(properties ?? {}),
|
|
30102
|
+
...context ? {
|
|
30103
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
30104
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
30105
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
30106
|
+
} : {}
|
|
29888
30107
|
};
|
|
29889
30108
|
if (sessionId === undefined) {
|
|
29890
30109
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -29894,7 +30113,16 @@ class TelemetryService {
|
|
|
29894
30113
|
return enriched;
|
|
29895
30114
|
}
|
|
29896
30115
|
generateId() {
|
|
29897
|
-
|
|
30116
|
+
const bytes = new Uint8Array(8);
|
|
30117
|
+
let hex = "";
|
|
30118
|
+
do {
|
|
30119
|
+
crypto.getRandomValues(bytes);
|
|
30120
|
+
hex = "";
|
|
30121
|
+
for (const byte of bytes) {
|
|
30122
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
30123
|
+
}
|
|
30124
|
+
} while (/^0+$/.test(hex));
|
|
30125
|
+
return hex;
|
|
29898
30126
|
}
|
|
29899
30127
|
}
|
|
29900
30128
|
// ../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -30596,134 +30824,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
30596
30824
|
};
|
|
30597
30825
|
}
|
|
30598
30826
|
|
|
30599
|
-
// ../common/src/telemetry/pii-redactor.ts
|
|
30600
|
-
var REDACTED = "[REDACTED]";
|
|
30601
|
-
var MAX_VALUE_LENGTH = 200;
|
|
30602
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
30603
|
-
"token",
|
|
30604
|
-
"tokens",
|
|
30605
|
-
"secret",
|
|
30606
|
-
"secrets",
|
|
30607
|
-
"password",
|
|
30608
|
-
"passwords",
|
|
30609
|
-
"pwd",
|
|
30610
|
-
"credential",
|
|
30611
|
-
"credentials",
|
|
30612
|
-
"auth",
|
|
30613
|
-
"authentication",
|
|
30614
|
-
"authorization",
|
|
30615
|
-
"authority",
|
|
30616
|
-
"cert",
|
|
30617
|
-
"certificate",
|
|
30618
|
-
"certificates"
|
|
30619
|
-
]);
|
|
30620
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
30621
|
-
"api",
|
|
30622
|
-
"access",
|
|
30623
|
-
"client",
|
|
30624
|
-
"private",
|
|
30625
|
-
"public",
|
|
30626
|
-
"signing",
|
|
30627
|
-
"encryption",
|
|
30628
|
-
"session",
|
|
30629
|
-
"master",
|
|
30630
|
-
"shared",
|
|
30631
|
-
"root",
|
|
30632
|
-
"ssh",
|
|
30633
|
-
"rsa",
|
|
30634
|
-
"aes",
|
|
30635
|
-
"hmac",
|
|
30636
|
-
"oauth"
|
|
30637
|
-
]);
|
|
30638
|
-
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;
|
|
30639
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
30640
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
30641
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
30642
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
30643
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
30644
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
30645
|
-
function shortHash(input) {
|
|
30646
|
-
let hash = 2166136261;
|
|
30647
|
-
for (let i = 0;i < input.length; i++) {
|
|
30648
|
-
hash ^= input.charCodeAt(i);
|
|
30649
|
-
hash = Math.imul(hash, 16777619);
|
|
30650
|
-
}
|
|
30651
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
30652
|
-
}
|
|
30653
|
-
function redactUrl(raw) {
|
|
30654
|
-
try {
|
|
30655
|
-
const url = new URL(raw);
|
|
30656
|
-
return `${url.protocol}//${url.host}`;
|
|
30657
|
-
} catch {
|
|
30658
|
-
return `url#${shortHash(raw)}`;
|
|
30659
|
-
}
|
|
30660
|
-
}
|
|
30661
|
-
function redactValueDetectors(value) {
|
|
30662
|
-
let out = value;
|
|
30663
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
30664
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
30665
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
30666
|
-
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
30667
|
-
return `${redactUrl(core2)}${trailing}`;
|
|
30668
|
-
});
|
|
30669
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
30670
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
30671
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
30672
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
30673
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
30674
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
30675
|
-
}
|
|
30676
|
-
return out;
|
|
30677
|
-
}
|
|
30678
|
-
function nameTokens(name) {
|
|
30679
|
-
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);
|
|
30680
|
-
}
|
|
30681
|
-
function isSensitiveName(name) {
|
|
30682
|
-
const tokens = nameTokens(name);
|
|
30683
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
30684
|
-
const token = tokens[i];
|
|
30685
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
30686
|
-
return true;
|
|
30687
|
-
}
|
|
30688
|
-
if (token === "key" || token === "keys") {
|
|
30689
|
-
const prev = tokens[i - 1];
|
|
30690
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
30691
|
-
return true;
|
|
30692
|
-
}
|
|
30693
|
-
}
|
|
30694
|
-
}
|
|
30695
|
-
return false;
|
|
30696
|
-
}
|
|
30697
|
-
function redactProperty(name, value) {
|
|
30698
|
-
if (value === undefined || value === null) {
|
|
30699
|
-
return;
|
|
30700
|
-
}
|
|
30701
|
-
if (isSensitiveName(name)) {
|
|
30702
|
-
return REDACTED;
|
|
30703
|
-
}
|
|
30704
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
30705
|
-
return value;
|
|
30706
|
-
}
|
|
30707
|
-
if (typeof value !== "string") {
|
|
30708
|
-
return "[OBJECT]";
|
|
30709
|
-
}
|
|
30710
|
-
return redactValueDetectors(value);
|
|
30711
|
-
}
|
|
30712
|
-
function redactProperties(properties) {
|
|
30713
|
-
const out = {};
|
|
30714
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
30715
|
-
const redacted = redactProperty(name, value);
|
|
30716
|
-
if (redacted !== undefined) {
|
|
30717
|
-
out[name] = redacted;
|
|
30718
|
-
}
|
|
30719
|
-
}
|
|
30720
|
-
return out;
|
|
30721
|
-
}
|
|
30722
|
-
|
|
30723
30827
|
// ../common/src/trackedAction.ts
|
|
30724
30828
|
var pollSignalSlot = singleton("PollSignal");
|
|
30725
30829
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
30726
30830
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
30831
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
30727
30832
|
var processContext = {
|
|
30728
30833
|
exit: (code) => {
|
|
30729
30834
|
process.exitCode = code;
|
|
@@ -30734,22 +30839,18 @@ var processContext = {
|
|
|
30734
30839
|
};
|
|
30735
30840
|
function extractCommandParams(cmd) {
|
|
30736
30841
|
const params = {};
|
|
30842
|
+
const add2 = (name, value) => {
|
|
30843
|
+
if (name && value !== undefined) {
|
|
30844
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
30845
|
+
}
|
|
30846
|
+
};
|
|
30737
30847
|
const registered = cmd.registeredArguments ?? [];
|
|
30738
30848
|
const processed = cmd.processedArgs ?? [];
|
|
30739
30849
|
for (let i = 0;i < registered.length; i++) {
|
|
30740
|
-
|
|
30741
|
-
if (value === undefined) {
|
|
30742
|
-
continue;
|
|
30743
|
-
}
|
|
30744
|
-
const name = registered[i].name();
|
|
30745
|
-
if (name) {
|
|
30746
|
-
params[name] = value;
|
|
30747
|
-
}
|
|
30850
|
+
add2(registered[i].name(), processed[i]);
|
|
30748
30851
|
}
|
|
30749
30852
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
30750
|
-
|
|
30751
|
-
params[key] = value;
|
|
30752
|
-
}
|
|
30853
|
+
add2(key, value);
|
|
30753
30854
|
}
|
|
30754
30855
|
return params;
|
|
30755
30856
|
}
|
|
@@ -30792,11 +30893,12 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
30792
30893
|
return this.action(async (...args) => {
|
|
30793
30894
|
const telemetryName = deriveCommandPath(command);
|
|
30794
30895
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
30896
|
+
const requestContext = telemetry.createRequestContext();
|
|
30795
30897
|
const startTime = performance.now();
|
|
30796
30898
|
let errorMessage;
|
|
30797
30899
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
30798
30900
|
clearRecordedCommandFailureTelemetry();
|
|
30799
|
-
const [error] = await catchError(fn(...args));
|
|
30901
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
30800
30902
|
if (error) {
|
|
30801
30903
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
30802
30904
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -30832,16 +30934,21 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
30832
30934
|
recordedFailure,
|
|
30833
30935
|
pollSignal: context.pollSignal
|
|
30834
30936
|
});
|
|
30835
|
-
|
|
30836
|
-
|
|
30937
|
+
const commandParams = extractCommandParams(command);
|
|
30938
|
+
if (props) {
|
|
30939
|
+
for (const key of Object.keys(props)) {
|
|
30940
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
30941
|
+
}
|
|
30942
|
+
}
|
|
30943
|
+
const baseProperties = redactProperties({
|
|
30944
|
+
...commandParams,
|
|
30837
30945
|
...props,
|
|
30838
30946
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
30839
30947
|
command: "true",
|
|
30840
|
-
duration: String(durationMs),
|
|
30841
|
-
success: String(success),
|
|
30842
30948
|
...terminalTelemetry,
|
|
30843
30949
|
...errorMessage ? { errorMessage } : {}
|
|
30844
|
-
})
|
|
30950
|
+
});
|
|
30951
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
30845
30952
|
});
|
|
30846
30953
|
};
|
|
30847
30954
|
|
|
@@ -31992,7 +32099,7 @@ class TextApiResponse {
|
|
|
31992
32099
|
var package_default2 = {
|
|
31993
32100
|
name: "@uipath/integrationservice-sdk",
|
|
31994
32101
|
license: "MIT",
|
|
31995
|
-
version: "1.198.0
|
|
32102
|
+
version: "1.198.0",
|
|
31996
32103
|
repository: {
|
|
31997
32104
|
type: "git",
|
|
31998
32105
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -54295,4 +54402,4 @@ export {
|
|
|
54295
54402
|
metadata
|
|
54296
54403
|
};
|
|
54297
54404
|
|
|
54298
|
-
//# debugId=
|
|
54405
|
+
//# debugId=6324C44904F8F68364756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/integrationservice-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.198.0
|
|
4
|
+
"version": "1.198.0",
|
|
5
5
|
"description": "Manage Integration Service connectors, connections, and triggers.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "1fadf03d7a8dd102742571dff569fdac11808afb"
|
|
30
30
|
}
|