@uipath/pm-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/pm-tool",
|
|
21232
21232
|
license: "MIT",
|
|
21233
|
-
version: "1.199.0
|
|
21233
|
+
version: "1.199.0",
|
|
21234
21234
|
description: "Process Mining — process apps, transformations, and data ingestion.",
|
|
21235
21235
|
private: false,
|
|
21236
21236
|
repository: {
|
|
@@ -24275,7 +24275,7 @@ function requireOmap() {
|
|
|
24275
24275
|
function resolveYamlOmap(data) {
|
|
24276
24276
|
if (data === null)
|
|
24277
24277
|
return true;
|
|
24278
|
-
const objectKeys =
|
|
24278
|
+
const objectKeys = {};
|
|
24279
24279
|
const object = data;
|
|
24280
24280
|
for (let index = 0, length = object.length;index < length; index += 1) {
|
|
24281
24281
|
const pair = object[index];
|
|
@@ -24293,10 +24293,9 @@ function requireOmap() {
|
|
|
24293
24293
|
}
|
|
24294
24294
|
if (!pairHasKey)
|
|
24295
24295
|
return false;
|
|
24296
|
-
if (
|
|
24297
|
-
objectKeys.push(pairKey);
|
|
24298
|
-
else
|
|
24296
|
+
if (_hasOwnProperty.call(objectKeys, pairKey))
|
|
24299
24297
|
return false;
|
|
24298
|
+
Object.defineProperty(objectKeys, pairKey, { value: true });
|
|
24300
24299
|
}
|
|
24301
24300
|
return true;
|
|
24302
24301
|
}
|
|
@@ -27157,8 +27156,18 @@ function getInboundTraceContext() {
|
|
|
27157
27156
|
|
|
27158
27157
|
// ../common/src/telemetry/session-id.ts
|
|
27159
27158
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
27160
|
-
var
|
|
27161
|
-
var
|
|
27159
|
+
var SESSION_ID_MAX_LENGTH = 64;
|
|
27160
|
+
var RANDOM_SESSION_ID_LENGTH = 32;
|
|
27161
|
+
var TELEMETRY_SESSION_SOURCE_PROPERTY = "session_id_source";
|
|
27162
|
+
var CONTROL_CHARACTERS = /\p{Cc}/gu;
|
|
27163
|
+
var INHERITED_SESSION_SOURCES = [
|
|
27164
|
+
{ envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
|
|
27165
|
+
{ envVar: "CODEX_THREAD_ID", source: "codex" },
|
|
27166
|
+
{ envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
|
|
27167
|
+
{ envVar: "TERM_SESSION_ID", source: "terminal" },
|
|
27168
|
+
{ envVar: "WT_SESSION", source: "terminal" }
|
|
27169
|
+
];
|
|
27170
|
+
var telemetrySessionSlot = singleton("TelemetrySession");
|
|
27162
27171
|
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
27163
27172
|
function getProcessEnv2() {
|
|
27164
27173
|
return globalThis.process?.env;
|
|
@@ -27167,14 +27176,42 @@ function normalizeSessionId(value) {
|
|
|
27167
27176
|
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
27168
27177
|
return;
|
|
27169
27178
|
}
|
|
27170
|
-
const
|
|
27171
|
-
return
|
|
27179
|
+
const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
|
|
27180
|
+
return cleaned || undefined;
|
|
27172
27181
|
}
|
|
27173
27182
|
function getConfiguredTelemetrySessionId() {
|
|
27174
27183
|
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
27175
27184
|
}
|
|
27176
|
-
function
|
|
27177
|
-
|
|
27185
|
+
function getInheritedSession(env) {
|
|
27186
|
+
for (const candidate of INHERITED_SESSION_SOURCES) {
|
|
27187
|
+
const handle = normalizeSessionId(env[candidate.envVar]);
|
|
27188
|
+
if (handle) {
|
|
27189
|
+
return { id: handle, source: candidate.source };
|
|
27190
|
+
}
|
|
27191
|
+
}
|
|
27192
|
+
return;
|
|
27193
|
+
}
|
|
27194
|
+
function generateRandomSession() {
|
|
27195
|
+
const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
|
|
27196
|
+
crypto.getRandomValues(bytes);
|
|
27197
|
+
let hex = "";
|
|
27198
|
+
for (const byte of bytes) {
|
|
27199
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
27200
|
+
}
|
|
27201
|
+
return { id: hex, source: "random" };
|
|
27202
|
+
}
|
|
27203
|
+
function resolveTelemetrySession() {
|
|
27204
|
+
const existing = telemetrySessionSlot.get();
|
|
27205
|
+
if (existing) {
|
|
27206
|
+
return existing;
|
|
27207
|
+
}
|
|
27208
|
+
const declaredHandle = getConfiguredTelemetrySessionId();
|
|
27209
|
+
const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
|
|
27210
|
+
telemetrySessionSlot.set(resolved);
|
|
27211
|
+
return resolved;
|
|
27212
|
+
}
|
|
27213
|
+
function getTelemetrySessionSource() {
|
|
27214
|
+
return resolveTelemetrySession().source;
|
|
27178
27215
|
}
|
|
27179
27216
|
function getTelemetryOperationId() {
|
|
27180
27217
|
const existing = telemetryOperationIdSlot.get();
|
|
@@ -27451,24 +27488,18 @@ class TelemetryService {
|
|
|
27451
27488
|
}
|
|
27452
27489
|
enrichPropertiesWithContext(properties, context) {
|
|
27453
27490
|
const globalProperties = getGlobalTelemetryProperties();
|
|
27454
|
-
const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
|
|
27455
|
-
const sessionId = resolveTelemetrySessionId(existingSessionId);
|
|
27456
27491
|
const enriched = {
|
|
27457
27492
|
...getExecutionContextTelemetryProperties(),
|
|
27458
27493
|
...globalProperties,
|
|
27459
27494
|
...this.defaultProperties,
|
|
27460
27495
|
...redactProperties(properties ?? {}),
|
|
27496
|
+
[TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
|
|
27461
27497
|
...context ? {
|
|
27462
27498
|
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
27463
27499
|
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
27464
27500
|
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
27465
27501
|
} : {}
|
|
27466
27502
|
};
|
|
27467
|
-
if (sessionId === undefined) {
|
|
27468
|
-
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
27469
|
-
} else {
|
|
27470
|
-
enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
|
|
27471
|
-
}
|
|
27472
27503
|
return enriched;
|
|
27473
27504
|
}
|
|
27474
27505
|
generateId() {
|
|
@@ -30452,4 +30483,4 @@ export {
|
|
|
30452
30483
|
metadata
|
|
30453
30484
|
};
|
|
30454
30485
|
|
|
30455
|
-
//# debugId=
|
|
30486
|
+
//# debugId=E6A010E0A6D080DA64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/pm-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0
|
|
4
|
+
"version": "1.199.0",
|
|
5
5
|
"description": "Process Mining — process apps, transformations, and data ingestion.",
|
|
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
|
}
|