@uipath/solution-sdk 1.205.0-preview.277 → 1.206.0-preview.279

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 (31) hide show
  1. package/dist/deployment-search.js +49 -19
  2. package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
  3. package/dist/first-party-service-ahcc6xc6.js +8 -0
  4. package/dist/{index-y4vgqz1w.js → index-0b3srjv7.js} +98 -8
  5. package/dist/{index-78paj2kz.js → index-0drvtcm4.js} +12 -11
  6. package/dist/{index-hkexw5er.js → index-bpn15jyk.js} +35 -20
  7. package/dist/{index-gdtpsdn7.js → index-mm1x18d6.js} +223 -28
  8. package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
  9. package/dist/{index-qq5t2dkg.js → index-t1e17c6h.js} +582 -577
  10. package/dist/{index-enc2hqq5.js → index-tdffhvfs.js} +931 -502
  11. package/dist/index-txd1grjc.js +541 -0
  12. package/dist/{index-cs3g624n.js → index-xnrbg4x3.js} +6 -7
  13. package/dist/index-z2qk2qn6.js +24 -0
  14. package/dist/index.js +1310 -669
  15. package/dist/{jmespath-231m3hyn.js → jmespath-x4na7sj8.js} +1 -1
  16. package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
  17. package/dist/package-search.js +18 -19
  18. package/dist/project-context.js +75 -0
  19. package/dist/resources/index.js +265 -237
  20. package/dist/scripts/generate-sdk.js +2 -2
  21. package/dist/solution-auth.js +6 -7
  22. package/dist/src/deployment-search.d.ts +30 -0
  23. package/dist/src/project-context.d.ts +9 -0
  24. package/dist/src/resources/providers/artefact-pair-binding-provider.d.ts +8 -2
  25. package/dist/src/resources/services/sync-resources-from-bindings.d.ts +14 -1
  26. package/package.json +6 -2
  27. package/dist/first-party-service-sd8yaf73.js +0 -27
  28. package/dist/index-1de529jm.js +0 -39
  29. package/dist/index-53w8skv5.js +0 -262
  30. package/dist/index-dqa169gp.js +0 -25
  31. package/dist/index-zmneg45c.js +0 -1184
@@ -0,0 +1,8 @@
1
+ import {
2
+ FirstPartyServiceApi2
3
+ } from "./index-mm1x18d6.js";
4
+ export {
5
+ FirstPartyServiceApi2 as FirstPartyServiceApi
6
+ };
7
+
8
+ //# debugId=1AB51246E0E259F264756E2164756E21
@@ -1,9 +1,50 @@
1
- import {
2
- __require
3
- } from "./index-1de529jm.js";
1
+ import { createRequire } from "node:module";
2
+ var __create = Object.create;
3
+ var __getProtoOf = Object.getPrototypeOf;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
12
+ var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
20
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
21
+ const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
+ if (mod && typeof mod === "object" || typeof mod === "function") {
23
+ for (let key of __getOwnPropNames(mod))
24
+ if (!__hasOwnProp.call(to, key))
25
+ __defProp(to, key, {
26
+ get: __accessProp.bind(mod, key),
27
+ enumerable: true
28
+ });
29
+ }
30
+ if (canCache)
31
+ cache.set(mod, to);
32
+ return to;
33
+ };
34
+ var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
35
+ var __exportCjs = (target, getters, setters) => {
36
+ for (var name in getters)
37
+ __defProp(target, name, {
38
+ get: getters[name],
39
+ set: setters[name],
40
+ enumerable: true,
41
+ configurable: true
42
+ });
43
+ };
44
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
4
45
 
5
46
  // ../filesystem/src/node.ts
6
- import { randomUUID } from "node:crypto";
47
+ import { createHash, randomUUID } from "node:crypto";
7
48
  import { existsSync } from "node:fs";
8
49
  import * as fs from "node:fs/promises";
9
50
  import * as os from "node:os";
@@ -14,6 +55,9 @@ var LOCK_MAX_WAIT_MS = 20000;
14
55
  var LOCK_MAX_HOLD_MS = 60000;
15
56
  var LOCK_RETRY_MIN_MS = 100;
16
57
  var LOCK_RETRY_JITTER_MS = 200;
58
+ var HASH_CHUNK_BYTES = 256 * 1024;
59
+ var hashBuffers = [];
60
+ var HASH_BUFFERS_KEPT = 64;
17
61
 
18
62
  class NodeFileSystem {
19
63
  path = {
@@ -32,7 +76,7 @@ class NodeFileSystem {
32
76
  };
33
77
  utils = {
34
78
  open: async (url) => {
35
- const { default: open } = await import("./index-sby22td6.js");
79
+ const { default: open } = await import("./index-nzr4mx5p.js");
36
80
  await open(url);
37
81
  }
38
82
  };
@@ -71,6 +115,15 @@ class NodeFileSystem {
71
115
  throw error;
72
116
  }
73
117
  }
118
+ async readdirEntries(dirPath) {
119
+ try {
120
+ return await fs.readdir(dirPath, { withFileTypes: true });
121
+ } catch (error) {
122
+ if (this.isEnoent(error))
123
+ return [];
124
+ throw error;
125
+ }
126
+ }
74
127
  async stat(filePath) {
75
128
  try {
76
129
  const stats = await fs.stat(filePath);
@@ -78,7 +131,8 @@ class NodeFileSystem {
78
131
  isFile: () => stats.isFile(),
79
132
  isDirectory: () => stats.isDirectory(),
80
133
  size: stats.size,
81
- mtimeMs: stats.mtimeMs
134
+ mtimeMs: stats.mtimeMs,
135
+ ctimeMs: stats.ctimeMs
82
136
  };
83
137
  } catch (error) {
84
138
  if (this.isEnoent(error))
@@ -192,6 +246,42 @@ class NodeFileSystem {
192
246
  throw error;
193
247
  }
194
248
  }
249
+ async hashFile(filePath) {
250
+ let handle;
251
+ try {
252
+ handle = await fs.open(filePath, "r");
253
+ } catch (error) {
254
+ if (this.isEnoent(error))
255
+ return null;
256
+ throw error;
257
+ }
258
+ const buffer = hashBuffers.pop() ?? Buffer.allocUnsafe(HASH_CHUNK_BYTES);
259
+ try {
260
+ const opened = await handle.stat();
261
+ const stats = {
262
+ isFile: () => opened.isFile(),
263
+ isDirectory: () => opened.isDirectory(),
264
+ size: opened.size,
265
+ mtimeMs: opened.mtimeMs,
266
+ ctimeMs: opened.ctimeMs
267
+ };
268
+ const hash = createHash("sha256");
269
+ let size = 0;
270
+ for (;; ) {
271
+ const { bytesRead } = await handle.read(buffer, 0, buffer.byteLength, null);
272
+ if (bytesRead === 0)
273
+ break;
274
+ hash.update(buffer.subarray(0, bytesRead));
275
+ size += bytesRead;
276
+ }
277
+ return { sha256: hash.digest("hex"), size, stats };
278
+ } finally {
279
+ if (hashBuffers.length < HASH_BUFFERS_KEPT) {
280
+ hashBuffers.push(buffer);
281
+ }
282
+ await handle.close();
283
+ }
284
+ }
195
285
  async realpath(filePath) {
196
286
  try {
197
287
  return await fs.realpath(filePath);
@@ -242,6 +332,6 @@ class NodeFileSystem {
242
332
  var fsInstance = new NodeFileSystem;
243
333
  var getFileSystem = () => fsInstance;
244
334
 
245
- export { getFileSystem };
335
+ export { __toESM, __commonJS, __exportCjs, __require, getFileSystem };
246
336
 
247
- //# debugId=82E3494FD83B7EB464756E2164756E21
337
+ //# debugId=7C69561C4538358B64756E2164756E21
@@ -1,17 +1,17 @@
1
1
  import {
2
- catchError,
3
2
  getSdkUserAgentToken,
4
- httpStatusOf,
5
- installSdkUserAgentHeader
6
- } from "./index-enc2hqq5.js";
3
+ installSdkUserAgentHeader,
4
+ catchError,
5
+ httpStatusOf
6
+ } from "./index-tdffhvfs.js";
7
7
  import {
8
8
  resolveSessionIdentity
9
- } from "./index-hkexw5er.js";
9
+ } from "./index-bpn15jyk.js";
10
10
 
11
11
  // ../pipelines-sdk/generated/src/runtime.ts
12
12
  var BASE_PATH = "http://localhost".replace(/\/+$/, "");
13
13
 
14
- class Configuration {
14
+ class Configuration2 {
15
15
  configuration;
16
16
  constructor(configuration = {}) {
17
17
  this.configuration = configuration;
@@ -58,7 +58,7 @@ class Configuration {
58
58
  return this.configuration.credentials;
59
59
  }
60
60
  }
61
- var DefaultConfig = new Configuration;
61
+ var DefaultConfig = new Configuration2;
62
62
 
63
63
  class BaseAPI {
64
64
  configuration;
@@ -1798,7 +1798,7 @@ var package_default = {
1798
1798
  name: "@uipath/pipelines-sdk",
1799
1799
  author: "UiPath",
1800
1800
  license: "SEE LICENSE IN LICENSE.txt",
1801
- version: "1.205.0",
1801
+ version: "1.206.0",
1802
1802
  description: "Generated TypeScript client for UiPath Pipelines API (CI/CD deployment lifecycle)",
1803
1803
  repository: {
1804
1804
  type: "git",
@@ -1834,7 +1834,8 @@ var package_default = {
1834
1834
  generate: "bun run src/scripts/generate-sdk.ts",
1835
1835
  lint: "biome check .",
1836
1836
  test: "vitest run",
1837
- "test:coverage": "vitest run --coverage"
1837
+ "test:coverage": "vitest run --coverage",
1838
+ typecheck: "tsc --noEmit"
1838
1839
  },
1839
1840
  devDependencies: {
1840
1841
  "@openapitools/openapi-generator-cli": "^2.31.1",
@@ -1903,6 +1904,6 @@ function parseRow(row, route, kind) {
1903
1904
  return parsed;
1904
1905
  }
1905
1906
 
1906
- export { Configuration, PipelinesApi, isMissingPipelinesRoute, isApplicationSession, parseSearchPage };
1907
+ export { Configuration2, PipelinesApi, isMissingPipelinesRoute, isApplicationSession, parseSearchPage };
1907
1908
 
1908
- //# debugId=0A9FAD35085C1DD364756E2164756E21
1909
+ //# debugId=9066DC44D14E25C764756E2164756E21
@@ -1,9 +1,7 @@
1
1
  import {
2
+ __require,
2
3
  getFileSystem
3
- } from "./index-y4vgqz1w.js";
4
- import {
5
- __require
6
- } from "./index-1de529jm.js";
4
+ } from "./index-0b3srjv7.js";
7
5
 
8
6
  // ../auth/src/catch-error.ts
9
7
  function isPromiseLike(value) {
@@ -366,6 +364,8 @@ var ENV_AUTH_VARS = {
366
364
  };
367
365
 
368
366
  class EnvAuthConfigError extends Error {
367
+ errorCode = "configuration_error";
368
+ retry = "RetryWillNotFix";
369
369
  constructor(message) {
370
370
  super(message);
371
371
  this.name = "EnvAuthConfigError";
@@ -404,11 +404,11 @@ var readAuthFromEnv = () => {
404
404
  if (!rawUrl) {
405
405
  throw new EnvAuthConfigError(`${ENV_AUTH_VARS.token} is not a JWT (treating it as an opaque token, ` + `e.g. a Personal Access Token). Set ${OPAQUE_TOKEN_BASE_URL_VAR} to the ` + `UiPath base URL if this is a PAT, or fix the token if it was meant to ` + `be a JWT (parse error: ${parseErrorMessage}).`);
406
406
  }
407
- const baseUrl2 = resolveBaseUrl(rawUrl, `Failed to validate ${OPAQUE_TOKEN_BASE_URL_VAR}`);
407
+ const baseUrl = resolveBaseUrl(rawUrl, `Failed to validate ${OPAQUE_TOKEN_BASE_URL_VAR}`);
408
408
  return {
409
409
  loginStatus: "Logged in",
410
410
  accessToken,
411
- baseUrl: baseUrl2,
411
+ baseUrl,
412
412
  organizationName,
413
413
  organizationId,
414
414
  tenantName,
@@ -708,9 +708,12 @@ var refreshAccessToken = async ({
708
708
  body: tokenParams
709
709
  });
710
710
  const tokenData = await tokenResponse.json();
711
- if (!tokenResponse.ok) {
711
+ if (tokenResponse.status === 400 || tokenResponse.status === 401) {
712
712
  throw new TokenRefreshOAuthError;
713
713
  }
714
+ if (!tokenResponse.ok) {
715
+ throw new Error(`Token refresh failed: HTTP ${tokenResponse.status}`);
716
+ }
714
717
  const newAccessToken = tokenData.access_token;
715
718
  const newRefreshToken = tokenData.refresh_token;
716
719
  if (typeof newAccessToken !== "string" || typeof newRefreshToken !== "string") {
@@ -773,20 +776,20 @@ var probeAsync = async (fs, candidate) => {
773
776
  var resolveEnvFileLocationAsync = async (envFilePath = DEFAULT_ENV_FILENAME, opts) => {
774
777
  const fs = getFileSystem();
775
778
  if (fs.path.isAbsolute(envFilePath)) {
776
- const probe2 = await probeAsync(fs, envFilePath);
777
- return probe2.exists ? { exists: true, absolutePath: envFilePath, source: "absolute" } : {
779
+ const probe = await probeAsync(fs, envFilePath);
780
+ return probe.exists ? { exists: true, absolutePath: envFilePath, source: "absolute" } : {
778
781
  exists: false,
779
782
  absolutePath: envFilePath,
780
783
  source: "absolute",
781
- ...probe2.unusable ? { unusable: probe2.unusable } : {}
784
+ ...probe.unusable ? { unusable: probe.unusable } : {}
782
785
  };
783
786
  }
784
787
  const cwd = opts?.cwd ?? fs.env.cwd();
785
788
  let searchDir = cwd;
786
789
  while (true) {
787
790
  const candidate = fs.path.join(searchDir, envFilePath);
788
- const probe2 = await probeAsync(fs, candidate);
789
- if (probe2.exists) {
791
+ const probe = await probeAsync(fs, candidate);
792
+ if (probe.exists) {
790
793
  return {
791
794
  exists: true,
792
795
  absolutePath: candidate,
@@ -1429,26 +1432,38 @@ function errorMessage(error) {
1429
1432
  }
1430
1433
 
1431
1434
  // ../auth/src/authContext.ts
1435
+ class AuthContextUnavailableError extends Error {
1436
+ instructionContext;
1437
+ sessionHint;
1438
+ errorCode = "authentication_required";
1439
+ retry = "RetryWillNotFix";
1440
+ constructor(message, instructionContext = "auth", sessionHint) {
1441
+ super(message);
1442
+ this.instructionContext = instructionContext;
1443
+ this.sessionHint = sessionHint;
1444
+ this.name = "AuthContextUnavailableError";
1445
+ }
1446
+ }
1432
1447
  var getAuthContext = async (options = {}) => {
1433
1448
  const status = await getLoginStatusAsync({
1434
1449
  ensureTokenValidityMinutes: options.ensureTokenValidityMinutes,
1435
1450
  envFilePath: options.envFilePath
1436
1451
  });
1437
1452
  if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
1438
- throw new Error(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.");
1453
+ throw new AuthContextUnavailableError(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.", "auth", status.hint);
1439
1454
  }
1440
- const tenantName = options.tenant ?? status.tenantName;
1455
+ const tenantName = options.tenant || status.tenantName;
1441
1456
  if (options.requireOrganizationId && !status.organizationId) {
1442
- throw new Error("Organization ID not available. Ensure you are logged in with an organization context.");
1457
+ throw new AuthContextUnavailableError("Organization ID not available. Ensure you are logged in with an organization context.", "identity");
1443
1458
  }
1444
1459
  if (options.requireOrganizationName && !status.organizationName) {
1445
- throw new Error("Organization name not available. Ensure you are logged in with an organization context.");
1460
+ throw new AuthContextUnavailableError("Organization name not available. Ensure you are logged in with an organization context.", "identity");
1446
1461
  }
1447
1462
  if (options.requireTenantId && !status.tenantId) {
1448
- throw new Error("Tenant ID not available. Ensure UIPATH_TENANT_ID is set.");
1463
+ throw new AuthContextUnavailableError(`Tenant ID not available. Ensure UIPATH_TENANT_ID is set.${status.hint ? ` ${status.hint}` : ""}`, "identity", status.hint);
1449
1464
  }
1450
- if (options.requireTenantName && tenantName === undefined) {
1451
- throw new Error("Tenant not provided and UIPATH_TENANT_NAME not set. Run 'uip login' to select a tenant, or use 'uip login tenant set <tenant>' to switch tenants.");
1465
+ if (options.requireTenantName && !tenantName) {
1466
+ throw new AuthContextUnavailableError("Tenant not provided and UIPATH_TENANT_NAME not set. Run 'uip login' to select a tenant, or use 'uip login tenant set <tenant>' to switch tenants.", "identity");
1452
1467
  }
1453
1468
  return {
1454
1469
  baseUrl: status.baseUrl,
@@ -1469,4 +1484,4 @@ var TENANT_SELECTION_CODES = new Set([
1469
1484
  ]);
1470
1485
  export { resolveSessionIdentity, getLoginStatusAsync, getAuthContext };
1471
1486
 
1472
- //# debugId=0C9CFE4BD0AC04DE64756E2164756E21
1487
+ //# debugId=00C28083FDEE07A064756E2164756E21