@uipath/vertical-solutions-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 +50 -19
  2. package/package.json +2 -2
package/dist/tool.js CHANGED
@@ -27603,7 +27603,7 @@ var require_src6 = __commonJS((exports) => {
27603
27603
  var package_default = {
27604
27604
  name: "@uipath/vertical-solutions-tool",
27605
27605
  license: "MIT",
27606
- version: "1.199.0-preview.97",
27606
+ version: "1.199.0",
27607
27607
  description: "Scaffold and generate Vertical Solution projects.",
27608
27608
  private: false,
27609
27609
  repository: {
@@ -30661,7 +30661,7 @@ function requireOmap() {
30661
30661
  function resolveYamlOmap(data) {
30662
30662
  if (data === null)
30663
30663
  return true;
30664
- const objectKeys = [];
30664
+ const objectKeys = {};
30665
30665
  const object = data;
30666
30666
  for (let index = 0, length = object.length;index < length; index += 1) {
30667
30667
  const pair = object[index];
@@ -30679,10 +30679,9 @@ function requireOmap() {
30679
30679
  }
30680
30680
  if (!pairHasKey)
30681
30681
  return false;
30682
- if (objectKeys.indexOf(pairKey) === -1)
30683
- objectKeys.push(pairKey);
30684
- else
30682
+ if (_hasOwnProperty.call(objectKeys, pairKey))
30685
30683
  return false;
30684
+ Object.defineProperty(objectKeys, pairKey, { value: true });
30686
30685
  }
30687
30686
  return true;
30688
30687
  }
@@ -33543,8 +33542,18 @@ function getInboundTraceContext() {
33543
33542
 
33544
33543
  // ../common/src/telemetry/session-id.ts
33545
33544
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
33546
- var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
33547
- var telemetrySessionIdSlot = singleton("TelemetrySessionId");
33545
+ var SESSION_ID_MAX_LENGTH = 64;
33546
+ var RANDOM_SESSION_ID_LENGTH = 32;
33547
+ var TELEMETRY_SESSION_SOURCE_PROPERTY = "session_id_source";
33548
+ var CONTROL_CHARACTERS = /\p{Cc}/gu;
33549
+ var INHERITED_SESSION_SOURCES = [
33550
+ { envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
33551
+ { envVar: "CODEX_THREAD_ID", source: "codex" },
33552
+ { envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
33553
+ { envVar: "TERM_SESSION_ID", source: "terminal" },
33554
+ { envVar: "WT_SESSION", source: "terminal" }
33555
+ ];
33556
+ var telemetrySessionSlot = singleton("TelemetrySession");
33548
33557
  var telemetryOperationIdSlot = singleton("TelemetryOperationId");
33549
33558
  function getProcessEnv2() {
33550
33559
  return globalThis.process?.env;
@@ -33553,14 +33562,42 @@ function normalizeSessionId(value) {
33553
33562
  if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
33554
33563
  return;
33555
33564
  }
33556
- const trimmed = String(value).trim();
33557
- return trimmed || undefined;
33565
+ const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
33566
+ return cleaned || undefined;
33558
33567
  }
33559
33568
  function getConfiguredTelemetrySessionId() {
33560
33569
  return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
33561
33570
  }
33562
- function resolveTelemetrySessionId(existingSessionId) {
33563
- return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
33571
+ function getInheritedSession(env) {
33572
+ for (const candidate of INHERITED_SESSION_SOURCES) {
33573
+ const handle = normalizeSessionId(env[candidate.envVar]);
33574
+ if (handle) {
33575
+ return { id: handle, source: candidate.source };
33576
+ }
33577
+ }
33578
+ return;
33579
+ }
33580
+ function generateRandomSession() {
33581
+ const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
33582
+ crypto.getRandomValues(bytes);
33583
+ let hex = "";
33584
+ for (const byte of bytes) {
33585
+ hex += byte.toString(16).padStart(2, "0");
33586
+ }
33587
+ return { id: hex, source: "random" };
33588
+ }
33589
+ function resolveTelemetrySession() {
33590
+ const existing = telemetrySessionSlot.get();
33591
+ if (existing) {
33592
+ return existing;
33593
+ }
33594
+ const declaredHandle = getConfiguredTelemetrySessionId();
33595
+ const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
33596
+ telemetrySessionSlot.set(resolved);
33597
+ return resolved;
33598
+ }
33599
+ function getTelemetrySessionSource() {
33600
+ return resolveTelemetrySession().source;
33564
33601
  }
33565
33602
  function getTelemetryOperationId() {
33566
33603
  const existing = telemetryOperationIdSlot.get();
@@ -33837,24 +33874,18 @@ class TelemetryService {
33837
33874
  }
33838
33875
  enrichPropertiesWithContext(properties, context) {
33839
33876
  const globalProperties = getGlobalTelemetryProperties();
33840
- const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
33841
- const sessionId = resolveTelemetrySessionId(existingSessionId);
33842
33877
  const enriched = {
33843
33878
  ...getExecutionContextTelemetryProperties(),
33844
33879
  ...globalProperties,
33845
33880
  ...this.defaultProperties,
33846
33881
  ...redactProperties(properties ?? {}),
33882
+ [TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
33847
33883
  ...context ? {
33848
33884
  [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
33849
33885
  ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
33850
33886
  [TELEMETRY_SPAN_ID_PROPERTY]: context.id
33851
33887
  } : {}
33852
33888
  };
33853
- if (sessionId === undefined) {
33854
- delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
33855
- } else {
33856
- enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
33857
- }
33858
33889
  return enriched;
33859
33890
  }
33860
33891
  generateId() {
@@ -67510,4 +67541,4 @@ export {
67510
67541
  metadata
67511
67542
  };
67512
67543
 
67513
- //# debugId=EDBBE647765E167264756E2164756E21
67544
+ //# debugId=F42487EB01751CD064756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/vertical-solutions-tool",
3
3
  "license": "MIT",
4
- "version": "1.199.0-preview.97",
4
+ "version": "1.199.0",
5
5
  "description": "Scaffold and generate Vertical Solution projects.",
6
6
  "private": false,
7
7
  "repository": {
@@ -34,5 +34,5 @@
34
34
  "files": [
35
35
  "dist"
36
36
  ],
37
- "gitHead": "087ae21e842f27bde5eb0013892c9487bfe60568"
37
+ "gitHead": "723e6801b77b5926ba75e75b6a756cc38b1b7adc"
38
38
  }