@uipath/integrationservice-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.
Files changed (2) hide show
  1. package/dist/tool.js +51 -20
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -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.199.0-preview.97",
23591
+ version: "1.199.0",
23592
23592
  description: "Manage Integration Service connectors, connections, and triggers.",
23593
23593
  private: false,
23594
23594
  repository: {
@@ -26922,7 +26922,7 @@ function requireOmap() {
26922
26922
  function resolveYamlOmap(data) {
26923
26923
  if (data === null)
26924
26924
  return true;
26925
- const objectKeys = [];
26925
+ const objectKeys = {};
26926
26926
  const object = data;
26927
26927
  for (let index = 0, length = object.length;index < length; index += 1) {
26928
26928
  const pair = object[index];
@@ -26940,10 +26940,9 @@ function requireOmap() {
26940
26940
  }
26941
26941
  if (!pairHasKey)
26942
26942
  return false;
26943
- if (objectKeys.indexOf(pairKey) === -1)
26944
- objectKeys.push(pairKey);
26945
- else
26943
+ if (_hasOwnProperty.call(objectKeys, pairKey))
26946
26944
  return false;
26945
+ Object.defineProperty(objectKeys, pairKey, { value: true });
26947
26946
  }
26948
26947
  return true;
26949
26948
  }
@@ -29804,8 +29803,18 @@ function getInboundTraceContext() {
29804
29803
 
29805
29804
  // ../common/src/telemetry/session-id.ts
29806
29805
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
29807
- var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
29808
- var telemetrySessionIdSlot = singleton("TelemetrySessionId");
29806
+ var SESSION_ID_MAX_LENGTH = 64;
29807
+ var RANDOM_SESSION_ID_LENGTH = 32;
29808
+ var TELEMETRY_SESSION_SOURCE_PROPERTY = "session_id_source";
29809
+ var CONTROL_CHARACTERS = /\p{Cc}/gu;
29810
+ var INHERITED_SESSION_SOURCES = [
29811
+ { envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
29812
+ { envVar: "CODEX_THREAD_ID", source: "codex" },
29813
+ { envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
29814
+ { envVar: "TERM_SESSION_ID", source: "terminal" },
29815
+ { envVar: "WT_SESSION", source: "terminal" }
29816
+ ];
29817
+ var telemetrySessionSlot = singleton("TelemetrySession");
29809
29818
  var telemetryOperationIdSlot = singleton("TelemetryOperationId");
29810
29819
  function getProcessEnv2() {
29811
29820
  return globalThis.process?.env;
@@ -29814,14 +29823,42 @@ function normalizeSessionId(value) {
29814
29823
  if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
29815
29824
  return;
29816
29825
  }
29817
- const trimmed = String(value).trim();
29818
- return trimmed || undefined;
29826
+ const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
29827
+ return cleaned || undefined;
29819
29828
  }
29820
29829
  function getConfiguredTelemetrySessionId() {
29821
29830
  return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
29822
29831
  }
29823
- function resolveTelemetrySessionId(existingSessionId) {
29824
- return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
29832
+ function getInheritedSession(env) {
29833
+ for (const candidate of INHERITED_SESSION_SOURCES) {
29834
+ const handle = normalizeSessionId(env[candidate.envVar]);
29835
+ if (handle) {
29836
+ return { id: handle, source: candidate.source };
29837
+ }
29838
+ }
29839
+ return;
29840
+ }
29841
+ function generateRandomSession() {
29842
+ const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
29843
+ crypto.getRandomValues(bytes);
29844
+ let hex = "";
29845
+ for (const byte of bytes) {
29846
+ hex += byte.toString(16).padStart(2, "0");
29847
+ }
29848
+ return { id: hex, source: "random" };
29849
+ }
29850
+ function resolveTelemetrySession() {
29851
+ const existing = telemetrySessionSlot.get();
29852
+ if (existing) {
29853
+ return existing;
29854
+ }
29855
+ const declaredHandle = getConfiguredTelemetrySessionId();
29856
+ const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
29857
+ telemetrySessionSlot.set(resolved);
29858
+ return resolved;
29859
+ }
29860
+ function getTelemetrySessionSource() {
29861
+ return resolveTelemetrySession().source;
29825
29862
  }
29826
29863
  function getTelemetryOperationId() {
29827
29864
  const existing = telemetryOperationIdSlot.get();
@@ -30098,24 +30135,18 @@ class TelemetryService {
30098
30135
  }
30099
30136
  enrichPropertiesWithContext(properties, context) {
30100
30137
  const globalProperties = getGlobalTelemetryProperties();
30101
- const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
30102
- const sessionId = resolveTelemetrySessionId(existingSessionId);
30103
30138
  const enriched = {
30104
30139
  ...getExecutionContextTelemetryProperties(),
30105
30140
  ...globalProperties,
30106
30141
  ...this.defaultProperties,
30107
30142
  ...redactProperties(properties ?? {}),
30143
+ [TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
30108
30144
  ...context ? {
30109
30145
  [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
30110
30146
  ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
30111
30147
  [TELEMETRY_SPAN_ID_PROPERTY]: context.id
30112
30148
  } : {}
30113
30149
  };
30114
- if (sessionId === undefined) {
30115
- delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
30116
- } else {
30117
- enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
30118
- }
30119
30150
  return enriched;
30120
30151
  }
30121
30152
  generateId() {
@@ -32106,7 +32137,7 @@ class TextApiResponse {
32106
32137
  var package_default2 = {
32107
32138
  name: "@uipath/integrationservice-sdk",
32108
32139
  license: "MIT",
32109
- version: "1.199.0-preview.97",
32140
+ version: "1.199.0",
32110
32141
  repository: {
32111
32142
  type: "git",
32112
32143
  url: "https://github.com/UiPath/cli.git",
@@ -54779,4 +54810,4 @@ export {
54779
54810
  metadata
54780
54811
  };
54781
54812
 
54782
- //# debugId=0F9A73445524E34264756E2164756E21
54813
+ //# debugId=D2698DEBD68FA39564756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/integrationservice-tool",
3
3
  "license": "MIT",
4
- "version": "1.199.0-preview.97",
4
+ "version": "1.199.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": "087ae21e842f27bde5eb0013892c9487bfe60568"
29
+ "gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
30
30
  }