@uipath/aops-tool 1.199.0-preview.97 → 1.199.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 +50 -19
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -21230,7 +21230,7 @@ var init_server = __esm(() => {
|
|
|
21230
21230
|
var package_default = {
|
|
21231
21231
|
name: "@uipath/aops-tool",
|
|
21232
21232
|
license: "MIT",
|
|
21233
|
-
version: "1.199.0
|
|
21233
|
+
version: "1.199.0",
|
|
21234
21234
|
description: "Manage UiPath StudioAdmin AOps — connections, repos, projects, solutions, pipelines, executions.",
|
|
21235
21235
|
private: false,
|
|
21236
21236
|
repository: {
|
|
@@ -24563,7 +24563,7 @@ function requireOmap() {
|
|
|
24563
24563
|
function resolveYamlOmap(data) {
|
|
24564
24564
|
if (data === null)
|
|
24565
24565
|
return true;
|
|
24566
|
-
const objectKeys =
|
|
24566
|
+
const objectKeys = {};
|
|
24567
24567
|
const object = data;
|
|
24568
24568
|
for (let index = 0, length = object.length;index < length; index += 1) {
|
|
24569
24569
|
const pair = object[index];
|
|
@@ -24581,10 +24581,9 @@ function requireOmap() {
|
|
|
24581
24581
|
}
|
|
24582
24582
|
if (!pairHasKey)
|
|
24583
24583
|
return false;
|
|
24584
|
-
if (
|
|
24585
|
-
objectKeys.push(pairKey);
|
|
24586
|
-
else
|
|
24584
|
+
if (_hasOwnProperty.call(objectKeys, pairKey))
|
|
24587
24585
|
return false;
|
|
24586
|
+
Object.defineProperty(objectKeys, pairKey, { value: true });
|
|
24588
24587
|
}
|
|
24589
24588
|
return true;
|
|
24590
24589
|
}
|
|
@@ -27445,8 +27444,18 @@ function getInboundTraceContext() {
|
|
|
27445
27444
|
|
|
27446
27445
|
// ../common/src/telemetry/session-id.ts
|
|
27447
27446
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
27448
|
-
var
|
|
27449
|
-
var
|
|
27447
|
+
var SESSION_ID_MAX_LENGTH = 64;
|
|
27448
|
+
var RANDOM_SESSION_ID_LENGTH = 32;
|
|
27449
|
+
var TELEMETRY_SESSION_SOURCE_PROPERTY = "session_id_source";
|
|
27450
|
+
var CONTROL_CHARACTERS = /\p{Cc}/gu;
|
|
27451
|
+
var INHERITED_SESSION_SOURCES = [
|
|
27452
|
+
{ envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
|
|
27453
|
+
{ envVar: "CODEX_THREAD_ID", source: "codex" },
|
|
27454
|
+
{ envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
|
|
27455
|
+
{ envVar: "TERM_SESSION_ID", source: "terminal" },
|
|
27456
|
+
{ envVar: "WT_SESSION", source: "terminal" }
|
|
27457
|
+
];
|
|
27458
|
+
var telemetrySessionSlot = singleton("TelemetrySession");
|
|
27450
27459
|
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
27451
27460
|
function getProcessEnv2() {
|
|
27452
27461
|
return globalThis.process?.env;
|
|
@@ -27455,14 +27464,42 @@ function normalizeSessionId(value) {
|
|
|
27455
27464
|
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
27456
27465
|
return;
|
|
27457
27466
|
}
|
|
27458
|
-
const
|
|
27459
|
-
return
|
|
27467
|
+
const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
|
|
27468
|
+
return cleaned || undefined;
|
|
27460
27469
|
}
|
|
27461
27470
|
function getConfiguredTelemetrySessionId() {
|
|
27462
27471
|
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
27463
27472
|
}
|
|
27464
|
-
function
|
|
27465
|
-
|
|
27473
|
+
function getInheritedSession(env) {
|
|
27474
|
+
for (const candidate of INHERITED_SESSION_SOURCES) {
|
|
27475
|
+
const handle = normalizeSessionId(env[candidate.envVar]);
|
|
27476
|
+
if (handle) {
|
|
27477
|
+
return { id: handle, source: candidate.source };
|
|
27478
|
+
}
|
|
27479
|
+
}
|
|
27480
|
+
return;
|
|
27481
|
+
}
|
|
27482
|
+
function generateRandomSession() {
|
|
27483
|
+
const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
|
|
27484
|
+
crypto.getRandomValues(bytes);
|
|
27485
|
+
let hex = "";
|
|
27486
|
+
for (const byte of bytes) {
|
|
27487
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
27488
|
+
}
|
|
27489
|
+
return { id: hex, source: "random" };
|
|
27490
|
+
}
|
|
27491
|
+
function resolveTelemetrySession() {
|
|
27492
|
+
const existing = telemetrySessionSlot.get();
|
|
27493
|
+
if (existing) {
|
|
27494
|
+
return existing;
|
|
27495
|
+
}
|
|
27496
|
+
const declaredHandle = getConfiguredTelemetrySessionId();
|
|
27497
|
+
const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
|
|
27498
|
+
telemetrySessionSlot.set(resolved);
|
|
27499
|
+
return resolved;
|
|
27500
|
+
}
|
|
27501
|
+
function getTelemetrySessionSource() {
|
|
27502
|
+
return resolveTelemetrySession().source;
|
|
27466
27503
|
}
|
|
27467
27504
|
function getTelemetryOperationId() {
|
|
27468
27505
|
const existing = telemetryOperationIdSlot.get();
|
|
@@ -27739,24 +27776,18 @@ class TelemetryService {
|
|
|
27739
27776
|
}
|
|
27740
27777
|
enrichPropertiesWithContext(properties, context) {
|
|
27741
27778
|
const globalProperties = getGlobalTelemetryProperties();
|
|
27742
|
-
const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
|
|
27743
|
-
const sessionId = resolveTelemetrySessionId(existingSessionId);
|
|
27744
27779
|
const enriched = {
|
|
27745
27780
|
...getExecutionContextTelemetryProperties(),
|
|
27746
27781
|
...globalProperties,
|
|
27747
27782
|
...this.defaultProperties,
|
|
27748
27783
|
...redactProperties(properties ?? {}),
|
|
27784
|
+
[TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
|
|
27749
27785
|
...context ? {
|
|
27750
27786
|
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
27751
27787
|
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
27752
27788
|
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
27753
27789
|
} : {}
|
|
27754
27790
|
};
|
|
27755
|
-
if (sessionId === undefined) {
|
|
27756
|
-
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
27757
|
-
} else {
|
|
27758
|
-
enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
|
|
27759
|
-
}
|
|
27760
27791
|
return enriched;
|
|
27761
27792
|
}
|
|
27762
27793
|
generateId() {
|
|
@@ -35928,4 +35959,4 @@ export {
|
|
|
35928
35959
|
metadata
|
|
35929
35960
|
};
|
|
35930
35961
|
|
|
35931
|
-
//# debugId=
|
|
35962
|
+
//# debugId=AC0FD4196AA599F164756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/aops-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0
|
|
4
|
+
"version": "1.199.0",
|
|
5
5
|
"description": "Manage UiPath StudioAdmin AOps — connections, repos, projects, solutions, pipelines, executions.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
|
|
30
30
|
}
|