@uipath/solution-tool 1.205.0-preview.281 → 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 (132) hide show
  1. package/dist/{archive-extract-x35t9ktj.js → archive-extract-136rn3ja.js} +13 -15
  2. package/dist/{cleanup-command-service-je9d70vv.js → cleanup-command-service-ejakyhea.js} +34 -31
  3. package/dist/deploy-delete-service-r7abfh28.js +23 -0
  4. package/dist/deploy-run-service-rnthz10q.js +23 -0
  5. package/dist/{deploy-status-service-919yn8wn.js → deploy-status-service-6my5vm61.js} +72 -62
  6. package/dist/deploy.js +35 -37
  7. package/dist/deployment-search-gfm907tx.js +54 -0
  8. package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
  9. package/dist/feed-resolver-14crsx5y.js +27 -0
  10. package/dist/feed-scope-failure-67cyybn0.js +20 -0
  11. package/dist/feed-session-g94q2bjc.js +23 -0
  12. package/dist/first-party-service-n3vva2m4.js +8 -0
  13. package/dist/governance-options-t20vsznh.js +19 -0
  14. package/dist/index-aspmac9f.js +24 -0
  15. package/dist/index-ddk6v1ej.js +60 -0
  16. package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
  17. package/dist/index-qq4kre7a.js +93 -0
  18. package/dist/index-t262f2xv.js +16 -0
  19. package/dist/index.js +33 -34
  20. package/dist/init.js +18 -21
  21. package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
  22. package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
  23. package/dist/{list-5fke71jn.js → list-jntan9tx.js} +23 -23
  24. package/dist/models/pack-command-types.d.ts +3 -1
  25. package/dist/node-kwzcw5ex.js +25 -0
  26. package/dist/pack-command-service-pwaeha7y.js +29 -0
  27. package/dist/{pack-project-ha0pxw3h.js → pack-project-ztt1hfrs.js} +33 -40
  28. package/dist/pack.js +26 -30
  29. package/dist/package-id-4tsg5jsb.js +11 -0
  30. package/dist/{packager-tool-4pa108k7.js → packager-tool-1bz9h5ca.js} +11 -11
  31. package/dist/{packager-tool-gs3f3tf7.js → packager-tool-1ctvbx0h.js} +1 -1
  32. package/dist/{packager-tool-f23a485e.js → packager-tool-55ztfccd.js} +176 -196
  33. package/dist/{packager-tool-45a8fkw0.js → packager-tool-95y24705.js} +37 -39
  34. package/dist/{packager-tool-2vmz56qh.js → packager-tool-9j8e5q1z.js} +184 -33
  35. package/dist/{packager-tool-tx834spe.js → packager-tool-9vrwpgt3.js} +757 -309
  36. package/dist/packager-tool-a6va4gc5.js +1178 -0
  37. package/dist/{packager-tool-pbmqk39a.js → packager-tool-a7s0gbxs.js} +33 -28
  38. package/dist/{packager-tool-47wzvqw0.js → packager-tool-aws5w512.js} +6 -6
  39. package/dist/{packager-tool-97rcgwvv.js → packager-tool-bs1jn1yn.js} +331 -55
  40. package/dist/packager-tool-c64hqa8n.js +106 -0
  41. package/dist/{packager-tool-5ddtwzva.js → packager-tool-ca5ngmqv.js} +12 -12
  42. package/dist/{packager-tool-6kz1pv9f.js → packager-tool-d1texmvn.js} +828 -338
  43. package/dist/{packager-tool-1de529jm.js → packager-tool-epsr41wx.js} +12 -3
  44. package/dist/packager-tool-f84z7nds.js +130 -0
  45. package/dist/{packager-tool-8ptbmmmp.js → packager-tool-fp46ebde.js} +147 -76
  46. package/dist/packager-tool-fqs6hdcy.js +290 -0
  47. package/dist/{packager-tool-3bwnkjdq.js → packager-tool-fx4ws49n.js} +12 -12
  48. package/dist/{packager-tool-6ybywxxn.js → packager-tool-m07vyk89.js} +371 -221
  49. package/dist/{packager-tool-gyqfs04e.js → packager-tool-nrhqgr4z.js} +273 -255
  50. package/dist/{packager-tool-61pwb567.js → packager-tool-ppj5f4y7.js} +6 -7
  51. package/dist/{packager-tool-d78ww4hb.js → packager-tool-pyt9fvty.js} +51 -48
  52. package/dist/packager-tool-q5d9df2q.js +74 -0
  53. package/dist/{packager-tool-cvf46scg.js → packager-tool-q8ryk6q9.js} +122 -89
  54. package/dist/{packager-tool-t8gh825q.js → packager-tool-qf8753ee.js} +53 -41
  55. package/dist/{packager-tool-60af1hw2.js → packager-tool-qzcd5c9s.js} +3 -3
  56. package/dist/packager-tool-resolver-td3bhccd.js +20 -0
  57. package/dist/{packager-tool-dfrk01gn.js → packager-tool-rj2d1g0w.js} +154 -154
  58. package/dist/{packager-tool-2t72aez8.js → packager-tool-snm6s7b5.js} +15 -15
  59. package/dist/{packager-tool-43ahv5mn.js → packager-tool-t39pjz7n.js} +35 -18
  60. package/dist/{packager-tool-wm0jaz7p.js → packager-tool-t3a48ys5.js} +305 -657
  61. package/dist/{packager-tool-dnrk1gg6.js → packager-tool-t3ahzjh1.js} +356 -298
  62. package/dist/{packager-tool-v1f5e8t9.js → packager-tool-vgrswa8p.js} +53 -8
  63. package/dist/packager-tool-vrtabg73.js +2307 -0
  64. package/dist/{packager-tool-gmwva4yv.js → packager-tool-vx2c68sb.js} +2 -2
  65. package/dist/{packager-tool-h1tq7bqf.js → packager-tool-vx39dhvn.js} +65 -35
  66. package/dist/{packager-tool-5qzgdb66.js → packager-tool-w34wyhwf.js} +13 -15
  67. package/dist/packager-tool-w8bcwfd3.js +280 -0
  68. package/dist/{packager-tool-1ybnxbp9.js → packager-tool-wm0h0wa1.js} +18 -18
  69. package/dist/{packager-tool-b2nhscfk.js → packager-tool-wm8nj6e9.js} +18 -18
  70. package/dist/{packager-tool-amhyxzz6.js → packager-tool-x33sdw6n.js} +16 -16
  71. package/dist/{packager-tool-wy4fx250.js → packager-tool-yetmzme9.js} +89 -30
  72. package/dist/{packager-tool-056k8w2f.js → packager-tool-z5r49ky9.js} +75 -9
  73. package/dist/packager-tool.js +6 -7
  74. package/dist/prepare-solution-resources-pwnyvtza.js +26 -0
  75. package/dist/{project-command-utils-t6pmpvq3.js → project-command-utils-zcmbecfy.js} +23 -26
  76. package/dist/project-contributions-kh9yftvg.js +27 -0
  77. package/dist/publish.js +17 -17
  78. package/dist/resource-mutations-mfn5k1hb.js +27 -0
  79. package/dist/{resource-version-lookup-0e3e2j58.js → resource-version-lookup-6ejh1hwd.js} +20 -23
  80. package/dist/resource.js +13 -16
  81. package/dist/{restore-command-service-pzpet021.js → restore-command-service-n880dxre.js} +37 -34
  82. package/dist/{run-service-hk8w2h31.js → run-service-4vhn6mtb.js} +144 -66
  83. package/dist/services/deploy-activate-service.d.ts +2 -1
  84. package/dist/services/deployment-search-client.d.ts +2 -1
  85. package/dist/services/deployment-search.d.ts +39 -0
  86. package/dist/services/feed-resolver.d.ts +13 -1
  87. package/dist/services/feed-selection.d.ts +8 -5
  88. package/dist/services/feed-session.d.ts +34 -0
  89. package/dist/services/install-run.d.ts +92 -0
  90. package/dist/services/prepare-solution-resources.d.ts +11 -2
  91. package/dist/services/project-contributions.d.ts +2 -0
  92. package/dist/services/project-identity-telemetry.d.ts +3 -0
  93. package/dist/services/publish-service.d.ts +20 -3
  94. package/dist/services/solution-identity.d.ts +18 -0
  95. package/dist/ship-telemetry-bkf3800w.js +16 -0
  96. package/dist/solution-auth-jxcgd2m0.js +10 -0
  97. package/dist/solution-identity-92h2fbpa.js +19 -0
  98. package/dist/templates/AGENTS.md +27 -29
  99. package/dist/tool.js +32 -33
  100. package/package.json +2 -2
  101. package/dist/deploy-delete-service-0tm600d1.js +0 -25
  102. package/dist/deploy-run-service-hne5w17k.js +0 -25
  103. package/dist/deployment-search-32zvxn35.js +0 -55
  104. package/dist/feed-resolver-pdeb4wkq.js +0 -28
  105. package/dist/feed-scope-failure-4baame72.js +0 -19
  106. package/dist/feed-session-7xqphdrg.js +0 -17
  107. package/dist/first-party-service-sd8yaf73.js +0 -27
  108. package/dist/governance-options-bqgv5fte.js +0 -32
  109. package/dist/index-dqa169gp.js +0 -25
  110. package/dist/index-prm27bvm.js +0 -138
  111. package/dist/index-wdndcwab.js +0 -667
  112. package/dist/node-v7xhqwe2.js +0 -86
  113. package/dist/pack-command-service-b1v9c8cw.js +0 -35
  114. package/dist/package-id-rpzgy31w.js +0 -13
  115. package/dist/packager-tool-53w8skv5.js +0 -262
  116. package/dist/packager-tool-5edvzz80.js +0 -543
  117. package/dist/packager-tool-99jaqabz.js +0 -171
  118. package/dist/packager-tool-9hsmn8th.js +0 -418
  119. package/dist/packager-tool-azre7mm1.js +0 -182
  120. package/dist/packager-tool-fn13r8e1.js +0 -188
  121. package/dist/packager-tool-gdtpsdn7.js +0 -342
  122. package/dist/packager-tool-qw47eyw7.js +0 -43
  123. package/dist/packager-tool-resolver-994z3jkj.js +0 -23
  124. package/dist/packager-tool-tedbebpq.js +0 -5367
  125. package/dist/packager-tool-x1ah4eez.js +0 -68
  126. package/dist/prepare-solution-resources-m1djfj62.js +0 -29
  127. package/dist/project-contributions-79ndycrx.js +0 -32
  128. package/dist/resource-mutations-c3krjqze.js +0 -36
  129. package/dist/ship-telemetry-myes7ak5.js +0 -21
  130. package/dist/solution-auth-aead70sw.js +0 -11
  131. /package/dist/{packager-tool-act5r386.js → packager-tool-2pxe2r4j.js} +0 -0
  132. /package/dist/{packager-tool-kkfb5kgn.js → packager-tool-vrqbbh01.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
- unzipSync,
3
- zipSync
4
- } from "./packager-tool-dfrk01gn.js";
2
+ zipSync2,
3
+ unzipSync2
4
+ } from "./packager-tool-rj2d1g0w.js";
5
5
 
6
6
  // ../packager/packager-core/src/models/tool-result.ts
7
7
  class ToolResult {
@@ -231,31 +231,36 @@ class Path {
231
231
  }
232
232
  }
233
233
 
234
- // ../packager/packager-core/src/services/project-id.ts
235
- var OPERATE_FILE = "operate.json";
236
- var PROJECT_FILE = "project.json";
237
- function isNonEmptyString(value) {
238
- return typeof value === "string" && value.length > 0;
239
- }
240
- async function readJsonObject(fs, filePath) {
241
- let content;
234
+ // ../packager/packager-core/src/services/json-object.ts
235
+ function parseJsonObject(text) {
236
+ if (!text)
237
+ return;
242
238
  try {
243
- content = await fs.readFile(filePath, "utf-8");
239
+ const value = JSON.parse(text);
240
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : undefined;
244
241
  } catch {
245
242
  return;
246
243
  }
247
- if (content === null) {
248
- return;
249
- }
244
+ }
245
+ async function readJsonObjectFile(fs, filePath) {
246
+ let content;
250
247
  try {
251
- const parsed = JSON.parse(content);
252
- if (parsed === null || typeof parsed !== "object") {
253
- return;
254
- }
255
- return parsed;
248
+ content = await fs.readFile(filePath);
256
249
  } catch {
257
250
  return;
258
251
  }
252
+ if (!content)
253
+ return;
254
+ const text = typeof content === "string" ? content : new TextDecoder().decode(content);
255
+ const value = parseJsonObject(text);
256
+ return value ? { text, value } : undefined;
257
+ }
258
+
259
+ // ../packager/packager-core/src/services/project-id.ts
260
+ var OPERATE_FILE = "operate.json";
261
+ var PROJECT_FILE = "project.json";
262
+ function isNonEmptyString(value) {
263
+ return typeof value === "string" && value.length > 0;
259
264
  }
260
265
  async function writeJsonObject(fs, filePath, data) {
261
266
  await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}
@@ -265,7 +270,7 @@ async function ensureProjectId(projectPath, fs) {
265
270
  const operatePath = Path.join(projectPath, OPERATE_FILE);
266
271
  const operateExists = await fs.exists(operatePath);
267
272
  if (operateExists) {
268
- const operate = await readJsonObject(fs, operatePath);
273
+ const operate = (await readJsonObjectFile(fs, operatePath))?.value;
269
274
  if (operate && isNonEmptyString(operate.projectId)) {
270
275
  return operate.projectId;
271
276
  }
@@ -282,7 +287,7 @@ async function ensureProjectId(projectPath, fs) {
282
287
  const projectFilePath = Path.join(projectPath, PROJECT_FILE);
283
288
  const projectFileExists = await fs.exists(projectFilePath);
284
289
  if (projectFileExists) {
285
- const projectFile = await readJsonObject(fs, projectFilePath);
290
+ const projectFile = (await readJsonObjectFile(fs, projectFilePath))?.value;
286
291
  if (projectFile && isNonEmptyString(projectFile.projectId)) {
287
292
  return projectFile.projectId;
288
293
  }
@@ -302,7 +307,7 @@ async function ensureProjectIdInOperateFile(operateFilePath, fallbackProjectId,
302
307
  if (!await fs.exists(operateFilePath)) {
303
308
  return;
304
309
  }
305
- const parsed = await readJsonObject(fs, operateFilePath);
310
+ const parsed = (await readJsonObjectFile(fs, operateFilePath))?.value;
306
311
  if (!parsed) {
307
312
  return;
308
313
  }
@@ -433,7 +438,7 @@ class NugetPackager {
433
438
  zipContents[entry.relativePath] = content;
434
439
  }
435
440
  }
436
- const zippedData = zipSync(zipContents);
441
+ const zippedData = zipSync2(zipContents);
437
442
  await this.fileSystem.writeFile(normalizedOutputPath, zippedData);
438
443
  return {
439
444
  outputPath: normalizedOutputPath
@@ -563,7 +568,7 @@ class ZipService {
563
568
  }
564
569
  async extractAsync(zipData, targetPath) {
565
570
  const normalizedTarget = targetPath.replace(/\/$/, "");
566
- const files = unzipSync(zipData);
571
+ const files = unzipSync2(zipData);
567
572
  const dirsToCreate = new Set([normalizedTarget]);
568
573
  const filesToWrite = [];
569
574
  const extractedPaths = [];
@@ -604,13 +609,13 @@ class ZipService {
604
609
  zippable[relativePath] = data;
605
610
  }
606
611
  }
607
- const zipData = zipSync(zippable, {
612
+ const zipData = zipSync2(zippable, {
608
613
  level: 6
609
614
  });
610
615
  return zipData;
611
616
  }
612
617
  compressEntries(entries) {
613
- return zipSync(entries, { level: 6 });
618
+ return zipSync2(entries, { level: 6 });
614
619
  }
615
620
  }
616
621
  // ../packager/packager-core/src/i18n/types.ts
@@ -1438,4 +1443,4 @@ I18nManager.registerTranslations("zu", zu);
1438
1443
  I18nManager.setLocale("en");
1439
1444
  export { Path, TemporaryStorageService, ZipService, I18nManager, translate, normalizeIgnoredRules, LogMessage, NugetConstants, ToolResult, ensureProjectId, writeOrBackfillOperateProjectId, NugetPackager, ProjectTool, SolutionTool, toolsFactoryRepository };
1440
1445
 
1441
- //# debugId=85BA9493B219C1D764756E2164756E21
1446
+ //# debugId=F9135BB2DCAB09E764756E2164756E21
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  catchError
3
- } from "./packager-tool-6ybywxxn.js";
3
+ } from "./packager-tool-m07vyk89.js";
4
4
 
5
5
  // src/services/governance-options.ts
6
- var GOVERNANCE_OPTION_INSTRUCTIONS = "Pass a value for that option — a policy file path for --governance-file-path, " + "or a product such as StudioWeb for --governance-product — or drop the flag " + "to analyze with the rules shipped with the WorkflowCompiler.";
7
- function validateGovernanceOptions(options) {
6
+ var GOVERNANCE_OPTION_INSTRUCTIONS2 = "Pass a value for that option — a policy file path for --governance-file-path, " + "or a product such as StudioWeb for --governance-product — or drop the flag " + "to analyze with the rules shipped with the WorkflowCompiler.";
7
+ function validateGovernanceOptions2(options) {
8
8
  if (options.governanceFilePath?.trim() === "") {
9
9
  return "--governance-file-path was given an empty value.";
10
10
  }
@@ -54,7 +54,7 @@ function governanceFileUnparseableMessage(path) {
54
54
  return `--governance-file-path is not a JSON governance policy file: ${path}`;
55
55
  }
56
56
  var GOVERNANCE_FILE_UNUSABLE_INSTRUCTIONS = "Pass a policy exported from AutomationOps, or a Studio rules-configuration file. " + "Check the path is correct and the file is readable JSON.";
57
- async function resolveGovernanceFileTypeAsync(fs, governanceFilePath) {
57
+ async function resolveGovernanceFileTypeAsync2(fs, governanceFilePath) {
58
58
  const [readError, source] = await catchError(fs.readFile(governanceFilePath, "utf-8"));
59
59
  if (readError || typeof source !== "string") {
60
60
  return {
@@ -81,6 +81,6 @@ async function resolveGovernanceFileTypeAsync(fs, governanceFilePath) {
81
81
  return { ok: true, fileType: detection.fileType };
82
82
  }
83
83
 
84
- export { GOVERNANCE_OPTION_INSTRUCTIONS, validateGovernanceOptions, detectGovernanceFileType, governanceFileUnreadableMessage, governanceFileUnwrappedMessage, governanceFileUnparseableMessage, GOVERNANCE_FILE_UNUSABLE_INSTRUCTIONS, resolveGovernanceFileTypeAsync };
84
+ export { GOVERNANCE_OPTION_INSTRUCTIONS2, validateGovernanceOptions2, resolveGovernanceFileTypeAsync2 };
85
85
 
86
- //# debugId=4D8C0578B7C33E4864756E2164756E21
86
+ //# debugId=983650394C9DB01764756E2164756E21
@@ -1,12 +1,25 @@
1
1
  import {
2
+ resolveSessionIdentity
3
+ } from "./packager-tool-t39pjz7n.js";
4
+ import {
5
+ catchError,
6
+ httpStatusOf2,
2
7
  getSdkUserAgentToken,
3
8
  installSdkUserAgentHeader
4
- } from "./packager-tool-6ybywxxn.js";
9
+ } from "./packager-tool-m07vyk89.js";
10
+ import {
11
+ logger
12
+ } from "./packager-tool-9vrwpgt3.js";
13
+ import {
14
+ Configuration3,
15
+ DeploymentSearchItemDto2FromJSON,
16
+ SearchApi
17
+ } from "./packager-tool-a6va4gc5.js";
5
18
 
6
19
  // ../pipelines-sdk/generated/src/runtime.ts
7
20
  var BASE_PATH = "http://localhost".replace(/\/+$/, "");
8
21
 
9
- class Configuration {
22
+ class Configuration2 {
10
23
  configuration;
11
24
  constructor(configuration = {}) {
12
25
  this.configuration = configuration;
@@ -53,7 +66,7 @@ class Configuration {
53
66
  return this.configuration.credentials;
54
67
  }
55
68
  }
56
- var DefaultConfig = new Configuration;
69
+ var DefaultConfig = new Configuration2;
57
70
 
58
71
  class BaseAPI {
59
72
  configuration;
@@ -272,7 +285,61 @@ class TextApiResponse {
272
285
  return await this.raw.text();
273
286
  }
274
287
  }
288
+ // ../pipelines-sdk/package.json
289
+ var package_default = {
290
+ name: "@uipath/pipelines-sdk",
291
+ author: "UiPath",
292
+ license: "SEE LICENSE IN LICENSE.txt",
293
+ version: "1.206.0",
294
+ description: "Generated TypeScript client for UiPath Pipelines API (CI/CD deployment lifecycle)",
295
+ repository: {
296
+ type: "git",
297
+ url: "https://github.com/UiPath/cli.git",
298
+ directory: "packages/pipelines-sdk"
299
+ },
300
+ publishConfig: {
301
+ registry: "https://npm.pkg.github.com/@uipath"
302
+ },
303
+ keywords: [
304
+ "uipath",
305
+ "pipelines",
306
+ "sdk"
307
+ ],
308
+ type: "module",
309
+ main: "./dist/index.js",
310
+ types: "./dist/src/index.d.ts",
311
+ exports: {
312
+ ".": {
313
+ types: "./dist/src/index.d.ts",
314
+ default: "./dist/index.js"
315
+ }
316
+ },
317
+ bin: {
318
+ "generate-pipelines-sdk": "./dist/scripts/generate-sdk.js"
319
+ },
320
+ files: [
321
+ "dist"
322
+ ],
323
+ private: true,
324
+ scripts: {
325
+ build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked && bun build ./src/scripts/generate-sdk.ts --outdir dist/scripts --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
326
+ generate: "bun run src/scripts/generate-sdk.ts",
327
+ lint: "biome check .",
328
+ test: "vitest run",
329
+ "test:coverage": "vitest run --coverage",
330
+ typecheck: "tsc --noEmit"
331
+ },
332
+ devDependencies: {
333
+ "@openapitools/openapi-generator-cli": "^2.31.1",
334
+ "@types/node": "^25.5.2",
335
+ "@uipath/common": "workspace:*",
336
+ typescript: "^7.0.2"
337
+ }
338
+ };
275
339
 
340
+ // ../pipelines-sdk/src/user-agent.ts
341
+ var SDK_USER_AGENT = getSdkUserAgentToken(package_default);
342
+ installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
276
343
  // ../pipelines-sdk/generated/src/models/BaseResourceIdentifier.ts
277
344
  function BaseResourceIdentifierFromJSON(json) {
278
345
  return BaseResourceIdentifierFromJSONTyped(json, false);
@@ -1808,60 +1875,269 @@ class PipelinesApi extends BaseAPI {
1808
1875
  return await response.value();
1809
1876
  }
1810
1877
  }
1811
- // ../pipelines-sdk/package.json
1812
- var package_default = {
1813
- name: "@uipath/pipelines-sdk",
1814
- author: "UiPath",
1815
- license: "SEE LICENSE IN LICENSE.txt",
1816
- version: "1.205.0",
1817
- description: "Generated TypeScript client for UiPath Pipelines API (CI/CD deployment lifecycle)",
1818
- repository: {
1819
- type: "git",
1820
- url: "https://github.com/UiPath/cli.git",
1821
- directory: "packages/pipelines-sdk"
1822
- },
1823
- publishConfig: {
1824
- registry: "https://npm.pkg.github.com/@uipath"
1825
- },
1826
- keywords: [
1827
- "uipath",
1828
- "pipelines",
1829
- "sdk"
1830
- ],
1831
- type: "module",
1832
- main: "./dist/index.js",
1833
- types: "./dist/src/index.d.ts",
1834
- exports: {
1835
- ".": {
1836
- types: "./dist/src/index.d.ts",
1837
- default: "./dist/index.js"
1878
+ // ../solution-sdk/src/legacy-deployment-search-v3.ts
1879
+ var LEGACY_V3_SEARCH_ROUTE = "POST /api/v3/search/deployments";
1880
+ async function searchDeploymentsLegacyV3(auth, query, scope) {
1881
+ const api = new SearchApi(new Configuration3({
1882
+ basePath: auth.basePath,
1883
+ accessToken: auth.accessToken
1884
+ }));
1885
+ const response = await api.searchSearchDeployments22Raw({ deploymentsSearchRequest2: toLegacyV3Request(query) }, scope);
1886
+ return response.raw.json();
1887
+ }
1888
+ function toLegacyV3Request(query) {
1889
+ return {
1890
+ searchTerm: query.searchTerm ?? query.deploymentName ?? query.packageName,
1891
+ packageName: query.packageName,
1892
+ ...query.targetFolderName ? { targetFolderName: query.targetFolderName } : {},
1893
+ take: query.take,
1894
+ skip: query.skip,
1895
+ orderByColumn: query.orderByColumn,
1896
+ orderByDirection: query.orderByDirection,
1897
+ operationStatuses: query.operationStatuses ?? [],
1898
+ activationStatuses: query.activationStatuses ?? []
1899
+ };
1900
+ }
1901
+
1902
+ // ../solution-sdk/src/pipelines-route.ts
1903
+ async function isMissingPipelinesRoute(error) {
1904
+ const status = httpStatusOf2(error);
1905
+ if (status === 405) {
1906
+ return true;
1907
+ }
1908
+ if (status !== 404 || !error || typeof error !== "object") {
1909
+ return false;
1910
+ }
1911
+ if (!("response" in error)) {
1912
+ return true;
1913
+ }
1914
+ const response = error.response;
1915
+ if (!(response instanceof Response)) {
1916
+ return false;
1917
+ }
1918
+ const [readError, body] = await catchError((async () => response.clone().text())());
1919
+ if (readError) {
1920
+ return false;
1921
+ }
1922
+ return body.trim() === "";
1923
+ }
1924
+ function isApplicationSession(auth) {
1925
+ const identity = auth.identity ?? resolveSessionIdentity(auth.accessToken);
1926
+ return identity?.type === "Application";
1927
+ }
1928
+ function notAPage(route, what, options) {
1929
+ return new Error(`${route} answered with ${what}.`, options);
1930
+ }
1931
+ function parseSearchPage(body, route, kind) {
1932
+ if (!body || typeof body !== "object" || Array.isArray(body)) {
1933
+ throw notAPage(route, `a body that is not a page of ${kind.plural}`);
1934
+ }
1935
+ const values = "values" in body ? body.values : undefined;
1936
+ if (values !== undefined && values !== null && !Array.isArray(values)) {
1937
+ throw notAPage(route, `\`values\` that is not a list of ${kind.plural}`);
1938
+ }
1939
+ const rows = Array.isArray(values) ? values : [];
1940
+ const count = "count" in body && typeof body.count === "number" && body.count >= 0 ? body.count : undefined;
1941
+ return { count, values: rows.map((row) => parseRow(row, route, kind)) };
1942
+ }
1943
+ function parseRow(row, route, kind) {
1944
+ const what = `a row that is not a ${kind.singular}`;
1945
+ if (!row || typeof row !== "object" || Array.isArray(row)) {
1946
+ throw notAPage(route, what);
1947
+ }
1948
+ if (kind.isRow && !kind.isRow(row)) {
1949
+ throw notAPage(route, what);
1950
+ }
1951
+ const [error, parsed] = catchError(() => kind.fromJSON(row));
1952
+ if (error) {
1953
+ throw notAPage(route, what, { cause: error });
1954
+ }
1955
+ return parsed;
1956
+ }
1957
+
1958
+ // ../solution-sdk/src/deployment-search.ts
1959
+ var PIPELINES_SEARCH_ROUTE = "POST /v1/pipelines/deployments/search";
1960
+
1961
+ class DeploymentSearchNeedsUserSessionError extends Error {
1962
+ constructor() {
1963
+ super("This server's deployment search reads user sessions only; an application (client-credentials) login cannot read it. Sign in with 'uip login' to use it.");
1964
+ this.name = "DeploymentSearchNeedsUserSessionError";
1965
+ }
1966
+ }
1967
+ function truncationMessage(rowsRead, reason) {
1968
+ switch (reason) {
1969
+ case "page-cap":
1970
+ return `The deployment search read ${rowsRead} rows and more rows remain. Narrow the search (for example by package or folder) so it fits.`;
1971
+ case "skip-ignored":
1972
+ return `The deployment search stopped after ${rowsRead} rows: the server returned the same page again, so the search cannot page past it.`;
1973
+ case "short-page":
1974
+ return `The deployment search read ${rowsRead} rows, but the server counted more and then returned a short page, so the rest cannot be read. Retry the search; if it keeps happening, narrow it (for example by package or folder).`;
1975
+ }
1976
+ }
1977
+
1978
+ class DeploymentSearchTruncatedError extends Error {
1979
+ rowsRead;
1980
+ reason;
1981
+ constructor(rowsRead, reason) {
1982
+ super(truncationMessage(rowsRead, reason));
1983
+ this.rowsRead = rowsRead;
1984
+ this.reason = reason;
1985
+ this.name = "DeploymentSearchTruncatedError";
1986
+ }
1987
+ }
1988
+ var serversWithoutPipelinesSearch = new Set;
1989
+ var DEPLOYMENT_ROWS = {
1990
+ singular: "deployment",
1991
+ plural: "deployments",
1992
+ fromJSON: DeploymentSearchItemDto2FromJSON
1993
+ };
1994
+ async function searchDeploymentsPage(auth, query, scope) {
1995
+ if (!serversWithoutPipelinesSearch.has(auth.basePath)) {
1996
+ const [error, body] = await catchError(searchViaPipelines(auth, query, scope));
1997
+ if (!error) {
1998
+ return {
1999
+ ...parseSearchPage(body, PIPELINES_SEARCH_ROUTE, DEPLOYMENT_ROWS),
2000
+ source: "pipelines"
2001
+ };
1838
2002
  }
1839
- },
1840
- bin: {
1841
- "generate-pipelines-sdk": "./dist/scripts/generate-sdk.js"
1842
- },
1843
- files: [
1844
- "dist"
1845
- ],
1846
- private: true,
1847
- scripts: {
1848
- build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked && bun build ./src/scripts/generate-sdk.ts --outdir dist/scripts --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
1849
- generate: "bun run src/scripts/generate-sdk.ts",
1850
- lint: "biome check .",
1851
- test: "vitest run",
1852
- "test:coverage": "vitest run --coverage"
1853
- },
1854
- devDependencies: {
1855
- "@openapitools/openapi-generator-cli": "^2.31.1",
1856
- "@types/node": "^25.5.2",
1857
- "@uipath/common": "workspace:*",
1858
- typescript: "^7.0.2"
2003
+ if (!await isMissingPipelinesRoute(error)) {
2004
+ throw error;
2005
+ }
2006
+ serversWithoutPipelinesSearch.add(auth.basePath);
2007
+ logger.debug(`${PIPELINES_SEARCH_ROUTE} is not served at ${auth.basePath}; using the deprecated ${LEGACY_V3_SEARCH_ROUTE}.`);
2008
+ }
2009
+ if (isApplicationSession(auth)) {
2010
+ throw new DeploymentSearchNeedsUserSessionError;
1859
2011
  }
2012
+ const body = await searchDeploymentsLegacyV3(auth, query, scope);
2013
+ return {
2014
+ ...parseSearchPage(body, LEGACY_V3_SEARCH_ROUTE, DEPLOYMENT_ROWS),
2015
+ source: "legacy-v3"
2016
+ };
2017
+ }
2018
+ async function searchViaPipelines(auth, query, scope) {
2019
+ const api = new PipelinesApi(new Configuration2({
2020
+ basePath: auth.basePath,
2021
+ accessToken: auth.accessToken
2022
+ }));
2023
+ const response = await api.pipelinesSearchDeploymentsRaw({
2024
+ pipelineDeploymentsSearchRequest: {
2025
+ take: query.take,
2026
+ skip: query.skip,
2027
+ deploymentName: query.deploymentName,
2028
+ packageName: query.packageName,
2029
+ targetFolderName: query.targetFolderName,
2030
+ searchTerm: query.searchTerm,
2031
+ orderByColumn: query.orderByColumn,
2032
+ orderByDirection: query.orderByDirection,
2033
+ operationStatuses: query.operationStatuses,
2034
+ activationStatuses: query.activationStatuses
2035
+ }
2036
+ }, scope);
2037
+ return response.raw.json();
2038
+ }
2039
+ var APPLIED_FEED_HEADER = "X-UIPATH-FolderKey";
2040
+ var feedHeaderProbes = new Map;
2041
+ async function probeFeedHeaderAsync(auth, folderKey, route = "deployments") {
2042
+ const cacheKey = `${auth.basePath}|${await sessionDigest(auth.accessToken)}|${route}|${folderKey.toLowerCase()}`;
2043
+ const cached = feedHeaderProbes.get(cacheKey);
2044
+ if (cached) {
2045
+ return cached;
2046
+ }
2047
+ const api = new PipelinesApi(new Configuration2({
2048
+ basePath: auth.basePath,
2049
+ accessToken: auth.accessToken
2050
+ }));
2051
+ const withFeed = async ({ init }) => ({
2052
+ headers: { ...init.headers, "X-UIPATH-FolderKey": folderKey }
2053
+ });
2054
+ const search = route === "packages" ? api.pipelinesSearchPackagesRaw({ pipelinePackagesSearchRequest: { take: 1, skip: 0 } }, withFeed) : api.pipelinesSearchDeploymentsRaw({ pipelineDeploymentsSearchRequest: { take: 1, skip: 0 } }, withFeed);
2055
+ const [error, response] = await catchError(search);
2056
+ if (error && !await isMissingPipelinesRoute(error)) {
2057
+ throw error;
2058
+ }
2059
+ const echoed = response?.raw.headers.get(APPLIED_FEED_HEADER);
2060
+ const result = echoed?.toLowerCase() === folderKey.toLowerCase() ? "applied" : "ignored";
2061
+ feedHeaderProbes.set(cacheKey, result);
2062
+ return result;
2063
+ }
2064
+ async function sessionDigest(accessToken) {
2065
+ const hash = await globalThis.crypto.subtle.digest("SHA-256", new TextEncoder().encode(accessToken));
2066
+ return Array.from(new Uint8Array(hash).slice(0, 8), (b) => b.toString(16).padStart(2, "0")).join("");
2067
+ }
2068
+ // src/services/http-status.ts
2069
+ function isAuthRefusal(error) {
2070
+ const status = httpStatusOf2(error);
2071
+ return status === 401 || status === 403;
2072
+ }
2073
+
2074
+ // src/services/feed-session.ts
2075
+ function classifyFeedSession2(session) {
2076
+ const type = (session.identity ?? resolveSessionIdentity(session.accessToken))?.type;
2077
+ if (type === "User") {
2078
+ return "user";
2079
+ }
2080
+ return type === "Application" ? "application" : "unknown";
2081
+ }
2082
+ function feedSessionRefusal2(verdict, action, alternative) {
2083
+ if (verdict === "application") {
2084
+ return {
2085
+ message: `${action} needs a user session; this session is an external app.`,
2086
+ instructions: `The server does not apply X-UIPATH-FolderKey to client-credentials requests, so the request would run against the tenant feed instead. Run it with a user session ('uip login'), or ${alternative}.`
2087
+ };
2088
+ }
2089
+ return {
2090
+ message: `${action} needs a user session, and this session's kind could not be read from its token.`,
2091
+ instructions: `The server applies X-UIPATH-FolderKey to user-token requests only, and a session that cannot be shown to be a user's is not allowed to act on a feed — guessing wrong would run the request against the tenant feed. Refresh the session with 'uip login' (an interactive login is recorded as a user session), or ${alternative}.`
2092
+ };
2093
+ }
2094
+ function feedReadRefusalForApplication2(session, action) {
2095
+ if (classifyFeedSession2(session) !== "application") {
2096
+ return;
2097
+ }
2098
+ return feedSessionRefusal2("application", action, "drop the feed flag to read the tenant feed");
2099
+ }
2100
+
2101
+ class FeedReadRefusedError2 extends Error {
2102
+ refusal;
2103
+ constructor(refusal) {
2104
+ super(refusal.message);
2105
+ this.refusal = refusal;
2106
+ this.name = "FeedReadRefusedError";
2107
+ }
2108
+ }
2109
+ function applicationFeedRefusal(action, alternative, route, probeError) {
2110
+ const why = probeError === undefined ? `its answer to a feed-scoped read did not echo ${APPLIED_FEED_HEADER} back, so it ignored that header and the request would run against the tenant feed instead` : isAuthRefusal(probeError) ? `the check itself was refused (HTTP ${String(httpStatusOf2(probeError))}). It is a single-row ${route} search, which needs the ${PROBE_READ_SCOPE[route]} scope next to the scope the command uses — give the application ${PROBE_READ_SCOPE[route]} — and a request the server might run against the tenant feed is not sent on a guess` : `checking it failed (${probeError instanceof Error ? probeError.message : String(probeError)}), and a request it might run against the tenant feed is not sent on a guess`;
2111
+ return {
2112
+ message: `${action} with an external app needs a server that applies the feed to client-credentials requests, and this server could not be shown to.`,
2113
+ instructions: `The server was asked whether it runs this app's requests in that feed: ${why}. Run it with a user session ('uip login'), or ${alternative}.`
2114
+ };
2115
+ }
2116
+ var PROBE_READ_SCOPE = {
2117
+ deployments: "Solutions.Deployments.Read",
2118
+ packages: "Solutions.Packages.Read"
1860
2119
  };
2120
+ async function feedSessionRefusalAsync2(session, folderKey, kind, action, alternative, route = "deployments") {
2121
+ const verdict = classifyFeedSession2(session);
2122
+ if (verdict === "user") {
2123
+ return;
2124
+ }
2125
+ if (verdict === "unknown") {
2126
+ return kind === "read" ? undefined : feedSessionRefusal2("unknown", action, alternative);
2127
+ }
2128
+ const [probeError, probe] = await catchError(probeFeedHeaderAsync(session, folderKey, route));
2129
+ if (probeError) {
2130
+ return applicationFeedRefusal(action, alternative, route, probeError);
2131
+ }
2132
+ return probe === "applied" ? undefined : applicationFeedRefusal(action, alternative, route);
2133
+ }
2134
+ async function feedReadRefusalAsync2(session, folderKey, action, route = "deployments") {
2135
+ if (!folderKey) {
2136
+ return feedReadRefusalForApplication2(session, action);
2137
+ }
2138
+ return feedSessionRefusalAsync2(session, folderKey, "read", action, "drop the feed flag to read the tenant feed", route);
2139
+ }
1861
2140
 
1862
- // ../pipelines-sdk/src/user-agent.ts
1863
- var SDK_USER_AGENT = getSdkUserAgentToken(package_default);
1864
- installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
1865
- export { Configuration, DeploymentOperation, DeploymentStatus, PipelinesApi };
2141
+ export { Configuration2, DeploymentOperation, DeploymentStatus, PipelinesApi, isMissingPipelinesRoute, isApplicationSession, parseSearchPage, DeploymentSearchNeedsUserSessionError, DeploymentSearchTruncatedError, searchDeploymentsPage, isAuthRefusal, classifyFeedSession2, feedSessionRefusal2, feedReadRefusalForApplication2, FeedReadRefusedError2, feedSessionRefusalAsync2, feedReadRefusalAsync2 };
1866
2142
 
1867
- //# debugId=B8A4D921529145B164756E2164756E21
2143
+ //# debugId=E529544362FCB9D064756E2164756E21