@uipath/maestro-sdk 1.199.0-preview.107 → 1.199.0-preview.110

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/index.js +71 -20
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -42333,7 +42333,12 @@ var require_fast_uri = __commonJS((exports, module) => {
42333
42333
  }
42334
42334
  function resolve2(baseURI, relativeURI, options) {
42335
42335
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
42336
- const resolved = resolveComponent(parse5(baseURI, schemelessOptions), parse5(relativeURI, schemelessOptions), schemelessOptions, true);
42336
+ const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
42337
+ const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
42338
+ if (baseMalformed || relativeMalformed) {
42339
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
42340
+ }
42341
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
42337
42342
  schemelessOptions.skipEscape = true;
42338
42343
  return serialize(resolved, schemelessOptions);
42339
42344
  }
@@ -42460,6 +42465,7 @@ var require_fast_uri = __commonJS((exports, module) => {
42460
42465
  }
42461
42466
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
42462
42467
  var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
42468
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
42463
42469
  function getParseError(parsed, matches) {
42464
42470
  if (matches[2] !== undefined && parsed.path && parsed.path[0] !== "/") {
42465
42471
  return 'URI path must start with "/" when authority is present.';
@@ -42494,6 +42500,20 @@ var require_fast_uri = __commonJS((exports, module) => {
42494
42500
  parsed.error = "URI authority must not contain a literal backslash.";
42495
42501
  malformedAuthorityOrPort = true;
42496
42502
  }
42503
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
42504
+ if (introducerMatch !== null) {
42505
+ const region = introducerMatch[1];
42506
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
42507
+ if (normalizedRegion.length >= 2) {
42508
+ if (normalizedRegion.slice(0, 2) !== "//") {
42509
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
42510
+ malformedAuthorityOrPort = true;
42511
+ } else if (region.length !== normalizedRegion.length) {
42512
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
42513
+ malformedAuthorityOrPort = true;
42514
+ }
42515
+ }
42516
+ }
42497
42517
  const matches = uri.match(URI_PARSE);
42498
42518
  if (matches) {
42499
42519
  parsed.scheme = matches[1];
@@ -54335,7 +54355,7 @@ function requireOmap() {
54335
54355
  function resolveYamlOmap(data) {
54336
54356
  if (data === null)
54337
54357
  return true;
54338
- const objectKeys = [];
54358
+ const objectKeys = {};
54339
54359
  const object = data;
54340
54360
  for (let index = 0, length = object.length;index < length; index += 1) {
54341
54361
  const pair = object[index];
@@ -54353,10 +54373,9 @@ function requireOmap() {
54353
54373
  }
54354
54374
  if (!pairHasKey)
54355
54375
  return false;
54356
- if (objectKeys.indexOf(pairKey) === -1)
54357
- objectKeys.push(pairKey);
54358
- else
54376
+ if (_hasOwnProperty.call(objectKeys, pairKey))
54359
54377
  return false;
54378
+ Object.defineProperty(objectKeys, pairKey, { value: true });
54360
54379
  }
54361
54380
  return true;
54362
54381
  }
@@ -57217,8 +57236,18 @@ function getInboundTraceContext() {
57217
57236
 
57218
57237
  // ../common/src/telemetry/session-id.ts
57219
57238
  var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
57220
- var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
57221
- var telemetrySessionIdSlot = singleton("TelemetrySessionId");
57239
+ var SESSION_ID_MAX_LENGTH = 64;
57240
+ var RANDOM_SESSION_ID_LENGTH = 32;
57241
+ var TELEMETRY_SESSION_SOURCE_PROPERTY = "session_id_source";
57242
+ var CONTROL_CHARACTERS = /\p{Cc}/gu;
57243
+ var INHERITED_SESSION_SOURCES = [
57244
+ { envVar: "CLAUDE_CODE_SESSION_ID", source: "claude-code" },
57245
+ { envVar: "CODEX_THREAD_ID", source: "codex" },
57246
+ { envVar: "ANTIGRAVITY_TRAJECTORY_ID", source: "antigravity" },
57247
+ { envVar: "TERM_SESSION_ID", source: "terminal" },
57248
+ { envVar: "WT_SESSION", source: "terminal" }
57249
+ ];
57250
+ var telemetrySessionSlot = singleton("TelemetrySession");
57222
57251
  var telemetryOperationIdSlot = singleton("TelemetryOperationId");
57223
57252
  function getProcessEnv2() {
57224
57253
  return globalThis.process?.env;
@@ -57227,14 +57256,42 @@ function normalizeSessionId(value) {
57227
57256
  if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
57228
57257
  return;
57229
57258
  }
57230
- const trimmed = String(value).trim();
57231
- return trimmed || undefined;
57259
+ const cleaned = String(value).replace(CONTROL_CHARACTERS, "").trim().slice(0, SESSION_ID_MAX_LENGTH);
57260
+ return cleaned || undefined;
57232
57261
  }
57233
57262
  function getConfiguredTelemetrySessionId() {
57234
57263
  return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
57235
57264
  }
57236
- function resolveTelemetrySessionId(existingSessionId) {
57237
- return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
57265
+ function getInheritedSession(env) {
57266
+ for (const candidate of INHERITED_SESSION_SOURCES) {
57267
+ const handle = normalizeSessionId(env[candidate.envVar]);
57268
+ if (handle) {
57269
+ return { id: handle, source: candidate.source };
57270
+ }
57271
+ }
57272
+ return;
57273
+ }
57274
+ function generateRandomSession() {
57275
+ const bytes = new Uint8Array(RANDOM_SESSION_ID_LENGTH / 2);
57276
+ crypto.getRandomValues(bytes);
57277
+ let hex = "";
57278
+ for (const byte of bytes) {
57279
+ hex += byte.toString(16).padStart(2, "0");
57280
+ }
57281
+ return { id: hex, source: "random" };
57282
+ }
57283
+ function resolveTelemetrySession() {
57284
+ const existing = telemetrySessionSlot.get();
57285
+ if (existing) {
57286
+ return existing;
57287
+ }
57288
+ const declaredHandle = getConfiguredTelemetrySessionId();
57289
+ const resolved = declaredHandle ? { id: declaredHandle, source: "declared" } : getInheritedSession(getProcessEnv2() ?? {}) ?? generateRandomSession();
57290
+ telemetrySessionSlot.set(resolved);
57291
+ return resolved;
57292
+ }
57293
+ function getTelemetrySessionSource() {
57294
+ return resolveTelemetrySession().source;
57238
57295
  }
57239
57296
  function getTelemetryOperationId() {
57240
57297
  const existing = telemetryOperationIdSlot.get();
@@ -57511,24 +57568,18 @@ class TelemetryService {
57511
57568
  }
57512
57569
  enrichPropertiesWithContext(properties, context) {
57513
57570
  const globalProperties = getGlobalTelemetryProperties();
57514
- const existingSessionId = properties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? this.defaultProperties?.[TELEMETRY_SESSION_ID_PROPERTY] ?? globalProperties?.[TELEMETRY_SESSION_ID_PROPERTY];
57515
- const sessionId = resolveTelemetrySessionId(existingSessionId);
57516
57571
  const enriched = {
57517
57572
  ...getExecutionContextTelemetryProperties(),
57518
57573
  ...globalProperties,
57519
57574
  ...this.defaultProperties,
57520
57575
  ...redactProperties(properties ?? {}),
57576
+ [TELEMETRY_SESSION_SOURCE_PROPERTY]: getTelemetrySessionSource(),
57521
57577
  ...context ? {
57522
57578
  [TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
57523
57579
  ...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
57524
57580
  [TELEMETRY_SPAN_ID_PROPERTY]: context.id
57525
57581
  } : {}
57526
57582
  };
57527
- if (sessionId === undefined) {
57528
- delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
57529
- } else {
57530
- enriched[TELEMETRY_SESSION_ID_PROPERTY] = sessionId;
57531
- }
57532
57583
  return enriched;
57533
57584
  }
57534
57585
  generateId() {
@@ -131029,7 +131080,7 @@ class TextApiResponse {
131029
131080
  var package_default = {
131030
131081
  name: "@uipath/integrationservice-sdk",
131031
131082
  license: "MIT",
131032
- version: "1.199.0-preview.107",
131083
+ version: "1.199.0-preview.110",
131033
131084
  repository: {
131034
131085
  type: "git",
131035
131086
  url: "https://github.com/UiPath/cli.git",
@@ -142891,4 +142942,4 @@ export {
142891
142942
  BPMN_SPEC
142892
142943
  };
142893
142944
 
142894
- //# debugId=03AEEF8C0B05098F64756E2164756E21
142945
+ //# debugId=995E4B90E2E6A4C064756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/maestro-sdk",
3
3
  "license": "MIT",
4
- "version": "1.199.0-preview.107",
4
+ "version": "1.199.0-preview.110",
5
5
  "description": "SDK for the UiPath Maestro (PIMS) API — process instance management.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -47,5 +47,5 @@
47
47
  "files": [
48
48
  "dist"
49
49
  ],
50
- "gitHead": "bbfbe57757e61c3b0c6ef05fb0ad5c1d0f1f7680"
50
+ "gitHead": "a714aed479181e56e2a867470c3050b7230ec41f"
51
51
  }