@uipath/codedapp-tool 1.199.0-preview.106 → 1.199.0-preview.108
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 +48 -16
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -59716,7 +59716,7 @@ var init_src2 = __esm(() => {
|
|
|
59716
59716
|
var package_default = {
|
|
59717
59717
|
name: "@uipath/codedapp-tool",
|
|
59718
59718
|
license: "MIT",
|
|
59719
|
-
version: "1.199.0-preview.
|
|
59719
|
+
version: "1.199.0-preview.108",
|
|
59720
59720
|
description: "Build, pack, publish, deploy, and manage UiPath Coded Web Applications.",
|
|
59721
59721
|
keywords: [
|
|
59722
59722
|
"cli-tool",
|
|
@@ -65656,8 +65656,18 @@ function getInboundTraceContext() {
|
|
|
65656
65656
|
|
|
65657
65657
|
// ../common/src/telemetry/session-id.ts
|
|
65658
65658
|
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
65659
|
-
var
|
|
65660
|
-
var
|
|
65659
|
+
var SESSION_ID_MAX_LENGTH = 64;
|
|
65660
|
+
var RANDOM_SESSION_ID_LENGTH = 32;
|
|
65661
|
+
var TELEMETRY_SESSION_SOURCE_PROPERTY = "session_id_source";
|
|
65662
|
+
var CONTROL_CHARACTERS = /\p{Cc}/gu;
|
|
65663
|
+
var INHERITED_SESSION_SOURCES = [
|
|
65664
|
+
{ envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
|
|
65665
|
+
{ envVar: "CODEX_THREAD_ID", source: "codex" },
|
|
65666
|
+
{ envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
|
|
65667
|
+
{ envVar: "TERM_SESSION_ID", source: "terminal" },
|
|
65668
|
+
{ envVar: "WT_SESSION", source: "terminal" }
|
|
65669
|
+
];
|
|
65670
|
+
var telemetrySessionSlot = singleton("TelemetrySession");
|
|
65661
65671
|
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
65662
65672
|
function getProcessEnv2() {
|
|
65663
65673
|
return globalThis.process?.env;
|
|
@@ -65666,14 +65676,42 @@ function normalizeSessionId(value) {
|
|
|
65666
65676
|
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
65667
65677
|
return;
|
|
65668
65678
|
}
|
|
65669
|
-
const
|
|
65670
|
-
return
|
|
65679
|
+
const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
|
|
65680
|
+
return cleaned || undefined;
|
|
65671
65681
|
}
|
|
65672
65682
|
function getConfiguredTelemetrySessionId() {
|
|
65673
65683
|
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
65674
65684
|
}
|
|
65675
|
-
function
|
|
65676
|
-
|
|
65685
|
+
function getInheritedSession(env) {
|
|
65686
|
+
for (const candidate of INHERITED_SESSION_SOURCES) {
|
|
65687
|
+
const handle = normalizeSessionId(env[candidate.envVar]);
|
|
65688
|
+
if (handle) {
|
|
65689
|
+
return { id: handle, source: candidate.source };
|
|
65690
|
+
}
|
|
65691
|
+
}
|
|
65692
|
+
return;
|
|
65693
|
+
}
|
|
65694
|
+
function generateRandomSession() {
|
|
65695
|
+
const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
|
|
65696
|
+
crypto.getRandomValues(bytes);
|
|
65697
|
+
let hex = "";
|
|
65698
|
+
for (const byte of bytes) {
|
|
65699
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
65700
|
+
}
|
|
65701
|
+
return { id: hex, source: "random" };
|
|
65702
|
+
}
|
|
65703
|
+
function resolveTelemetrySession() {
|
|
65704
|
+
const existing = telemetrySessionSlot.get();
|
|
65705
|
+
if (existing) {
|
|
65706
|
+
return existing;
|
|
65707
|
+
}
|
|
65708
|
+
const declaredHandle = getConfiguredTelemetrySessionId();
|
|
65709
|
+
const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
|
|
65710
|
+
telemetrySessionSlot.set(resolved);
|
|
65711
|
+
return resolved;
|
|
65712
|
+
}
|
|
65713
|
+
function getTelemetrySessionSource() {
|
|
65714
|
+
return resolveTelemetrySession().source;
|
|
65677
65715
|
}
|
|
65678
65716
|
function getTelemetryOperationId() {
|
|
65679
65717
|
const existing = telemetryOperationIdSlot.get();
|
|
@@ -65950,24 +65988,18 @@ class TelemetryService {
|
|
|
65950
65988
|
}
|
|
65951
65989
|
enrichPropertiesWithContext(properties, context) {
|
|
65952
65990
|
const globalProperties = getGlobalTelemetryProperties();
|
|
65953
|
-
const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
|
|
65954
|
-
const sessionId = resolveTelemetrySessionId(existingSessionId);
|
|
65955
65991
|
const enriched = {
|
|
65956
65992
|
...getExecutionContextTelemetryProperties(),
|
|
65957
65993
|
...globalProperties,
|
|
65958
65994
|
...this.defaultProperties,
|
|
65959
65995
|
...redactProperties(properties ?? {}),
|
|
65996
|
+
[TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
|
|
65960
65997
|
...context ? {
|
|
65961
65998
|
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
65962
65999
|
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
65963
66000
|
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
65964
66001
|
} : {}
|
|
65965
66002
|
};
|
|
65966
|
-
if (sessionId === undefined) {
|
|
65967
|
-
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
65968
|
-
} else {
|
|
65969
|
-
enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
|
|
65970
|
-
}
|
|
65971
66003
|
return enriched;
|
|
65972
66004
|
}
|
|
65973
66005
|
generateId() {
|
|
@@ -91057,7 +91089,7 @@ function querystringSingleKey(key, value, keyPrefix = "") {
|
|
|
91057
91089
|
var package_default2 = {
|
|
91058
91090
|
name: "@uipath/solution-sdk",
|
|
91059
91091
|
license: "MIT",
|
|
91060
|
-
version: "1.199.0-preview.
|
|
91092
|
+
version: "1.199.0-preview.108",
|
|
91061
91093
|
repository: {
|
|
91062
91094
|
type: "git",
|
|
91063
91095
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -99003,4 +99035,4 @@ export {
|
|
|
99003
99035
|
metadata
|
|
99004
99036
|
};
|
|
99005
99037
|
|
|
99006
|
-
//# debugId=
|
|
99038
|
+
//# debugId=DB8EDD3AE4495C0564756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/codedapp-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.199.0-preview.
|
|
4
|
+
"version": "1.199.0-preview.108",
|
|
5
5
|
"description": "Build, pack, publish, deploy, and manage UiPath Coded Web Applications.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"cli-tool",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"registry": "https://registry.npmjs.org/"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "171f68daab68809916e8df10ea198c259f688ede"
|
|
31
31
|
}
|