@uipath/solution-tool 1.206.0-preview.306 → 1.207.0-preview.307

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 (124) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +4 -4
  2. package/dist/{archive-extract-ma0gy822.js → archive-extract-afgwacbg.js} +3 -3
  3. package/dist/{cleanup-command-service-abtxpefz.js → cleanup-command-service-0j6qxj96.js} +20 -15
  4. package/dist/deploy-delete-service-ghyetrvj.js +23 -0
  5. package/dist/deploy-run-service-sz77fpsz.js +24 -0
  6. package/dist/{deploy-status-service-k1gycn13.js → deploy-status-service-aj4m61hg.js} +49 -25
  7. package/dist/deploy.js +21 -20
  8. package/dist/{deployment-search-bjdwqh5w.js → deployment-search-mkvzgeq4.js} +9 -9
  9. package/dist/{embedded-file-reader-pxpwcq3n.js → embedded-file-reader-k94wt612.js} +16 -16
  10. package/dist/feed-resolver-yj94m9j1.js +31 -0
  11. package/dist/feed-scope-failure-7abh61sj.js +20 -0
  12. package/dist/{feed-session-ytew8k2j.js → feed-session-z8t87r5w.js} +6 -6
  13. package/dist/{first-party-service-6gf3n6d8.js → first-party-service-bmtxd7wx.js} +1 -1
  14. package/dist/folder-runtime-check-8nf63er2.js +25 -0
  15. package/dist/{governance-options-40m81z8h.js → governance-options-ft8bqz4p.js} +7 -7
  16. package/dist/{packager-tool-v3ze7wmr.js → index-6ma58k47.js} +33 -708
  17. package/dist/{index-yjvmjpdn.js → index-j3tpb2cr.js} +12 -11
  18. package/dist/{index-p3x7ztdr.js → index-jy1760qy.js} +1 -1
  19. package/dist/{index-2bn3jzn9.js → index-nbs04tqr.js} +9 -7
  20. package/dist/index.js +26 -26
  21. package/dist/init.js +10 -10
  22. package/dist/{list-0k8c4rt6.js → list-3a1tdrgm.js} +11 -11
  23. package/dist/models/pack-command-types.d.ts +12 -0
  24. package/dist/{node-6ay6nbnq.js → node-83xy0gm0.js} +6 -6
  25. package/dist/pack-command-service-42p3t8xa.js +32 -0
  26. package/dist/{pack-project-2g2ncn2k.js → pack-project-w514zr5v.js} +21 -18
  27. package/dist/pack.js +25 -22
  28. package/dist/{package-id-56k44s7y.js → package-id-2dgfbh5h.js} +3 -3
  29. package/dist/{packager-tool-2zn98p5r.js → packager-tool-0gyqtxvs.js} +4 -4
  30. package/dist/{packager-tool-vgrswa8p.js → packager-tool-1db1wqdy.js} +30 -8
  31. package/dist/{packager-tool-vx2c68sb.js → packager-tool-1dsxhz1r.js} +2 -2
  32. package/dist/{packager-tool-xxf8f4v2.js → packager-tool-2syv199e.js} +9 -5
  33. package/dist/packager-tool-3ft8hywr.js +449 -0
  34. package/dist/{packager-tool-829w06ns.js → packager-tool-3qach0s4.js} +14 -8
  35. package/dist/{packager-tool-bkmwknfn.js → packager-tool-4f1k64fh.js} +8 -74
  36. package/dist/{packager-tool-7v03ncmv.js → packager-tool-70ag56bf.js} +49 -24
  37. package/dist/{packager-tool-5e4gps62.js → packager-tool-71sz9598.js} +20 -8
  38. package/dist/{packager-tool-23g7kn35.js → packager-tool-7j920ac5.js} +18 -11
  39. package/dist/packager-tool-7s842xrq.js +140 -0
  40. package/dist/{packager-tool-s8q14fth.js → packager-tool-849ch2tq.js} +4 -6
  41. package/dist/{packager-tool-aws5w512.js → packager-tool-887bkh9y.js} +1 -1
  42. package/dist/{packager-tool-f5pzh184.js → packager-tool-a566400t.js} +26 -10
  43. package/dist/packager-tool-a813na66.js +75 -0
  44. package/dist/{packager-tool-c8x0tpe4.js → packager-tool-af8n6rqz.js} +85 -30
  45. package/dist/{packager-tool-y1304xzm.js → packager-tool-bpdyy6vs.js} +530 -204
  46. package/dist/{packager-tool-fx4ws49n.js → packager-tool-cenfraf4.js} +2 -2
  47. package/dist/{packager-tool-0z4aq300.js → packager-tool-cwqy5rb5.js} +119 -52
  48. package/dist/{packager-tool-a7s0gbxs.js → packager-tool-devc4w73.js} +7 -2
  49. package/dist/{packager-tool-pqk9v4h7.js → packager-tool-fbajevvm.js} +52 -15
  50. package/dist/{packager-tool-r0ha8c95.js → packager-tool-fz96p75n.js} +3 -3
  51. package/dist/{packager-tool-m07vyk89.js → packager-tool-gb3dq79g.js} +36 -9
  52. package/dist/{packager-tool-h8tksb5s.js → packager-tool-gns0nxbt.js} +28 -9
  53. package/dist/{packager-tool-wjvks6st.js → packager-tool-h8wam8pt.js} +15 -6
  54. package/dist/{packager-tool-z4cbca95.js → packager-tool-hczpvrc1.js} +6 -6
  55. package/dist/{packager-tool-t39pjz7n.js → packager-tool-jtvhkavz.js} +48 -6
  56. package/dist/{packager-tool-p5322gew.js → packager-tool-kmwjscby.js} +88 -10
  57. package/dist/{packager-tool-ppj5f4y7.js → packager-tool-n1zrk6zv.js} +4 -2
  58. package/dist/{packager-tool-2qsbh4kd.js → packager-tool-ncgpx1ce.js} +50 -12
  59. package/dist/{packager-tool-f15an17m.js → packager-tool-p1xfsv6c.js} +92 -4
  60. package/dist/{packager-tool-egc54x78.js → packager-tool-qhht1tc9.js} +2408 -771
  61. package/dist/packager-tool-r7fmsz2t.js +741 -0
  62. package/dist/{packager-tool-resolver-30hxk8vm.js → packager-tool-resolver-mynfj0rt.js} +6 -6
  63. package/dist/{packager-tool-ay4j9x92.js → packager-tool-s9tyw75r.js} +19 -8
  64. package/dist/{packager-tool-ckrt4gyr.js → packager-tool-t9zked1m.js} +3 -3
  65. package/dist/{packager-tool-1ctvbx0h.js → packager-tool-tr3ttz5c.js} +1 -1
  66. package/dist/{packager-tool-chff74yz.js → packager-tool-tt9v40x6.js} +3010 -846
  67. package/dist/{packager-tool-k9dk39tg.js → packager-tool-txygqgb2.js} +3 -3
  68. package/dist/packager-tool-v6jcys3s.js +46 -0
  69. package/dist/packager-tool-w0tmr9xe.js +279 -0
  70. package/dist/packager-tool-w35s60sx.js +179 -0
  71. package/dist/{packager-tool-axqk17xw.js → packager-tool-xbfr6y2x.js} +142 -34
  72. package/dist/{packager-tool-m5mwc6by.js → packager-tool-zsv8208n.js} +22 -18
  73. package/dist/{packager-tool-vrw36pdb.js → packager-tool-ztxsccjk.js} +140 -10
  74. package/dist/packager-tool.js +2 -2
  75. package/dist/prepare-solution-resources-g9y01pgd.js +26 -0
  76. package/dist/{project-command-utils-82tja3k0.js → project-command-utils-yxrgwzf9.js} +20 -13
  77. package/dist/project-contributions-c8v3bwjr.js +31 -0
  78. package/dist/project-identity-telemetry-yxdhswyq.js +18 -0
  79. package/dist/publish.js +14 -14
  80. package/dist/{resource-mutations-h6wfdqr4.js → resource-mutations-dn4f8xr1.js} +9 -9
  81. package/dist/{resource-version-lookup-xzgnvr48.js → resource-version-lookup-mksxc1dc.js} +9 -9
  82. package/dist/resource.js +9 -9
  83. package/dist/{restore-command-service-bqs7r9y3.js → restore-command-service-ztbt2ejp.js} +20 -15
  84. package/dist/run-service-r52wgf69.js +1056 -0
  85. package/dist/services/deploy-activate-service.d.ts +5 -2
  86. package/dist/services/deploy-config-file.d.ts +24 -0
  87. package/dist/services/deploy-delete-service.d.ts +1 -1
  88. package/dist/services/deploy-run-service.d.ts +8 -1
  89. package/dist/services/deploy-uninstall-service.d.ts +4 -2
  90. package/dist/services/deploy-upgrade-service.d.ts +23 -2
  91. package/dist/services/deployment-feed-locator.d.ts +19 -6
  92. package/dist/services/deployment-links.d.ts +16 -0
  93. package/dist/services/deployment-progress.d.ts +10 -0
  94. package/dist/services/deployment-search.d.ts +15 -2
  95. package/dist/services/deployment-state.d.ts +9 -0
  96. package/dist/services/feed-resolver.d.ts +17 -0
  97. package/dist/services/feed-selection.d.ts +59 -0
  98. package/dist/services/folder-runtime-check.d.ts +107 -0
  99. package/dist/services/incomplete-feed-sweep.d.ts +6 -0
  100. package/dist/services/pack-command-service.d.ts +6 -0
  101. package/dist/services/pack-project.d.ts +1 -1
  102. package/dist/services/package-metadata-rewrite.d.ts +13 -0
  103. package/dist/services/personal-workspace-resolver.d.ts +4 -1
  104. package/dist/services/prepare-solution-resources.d.ts +11 -6
  105. package/dist/services/project-contributions.d.ts +26 -2
  106. package/dist/services/project-identity-telemetry.d.ts +31 -0
  107. package/dist/services/solution-members.d.ts +31 -0
  108. package/dist/{ship-telemetry-19gx83af.js → ship-telemetry-9djqndmy.js} +4 -4
  109. package/dist/{solution-auth-jxcgd2m0.js → solution-auth-0e3qm74f.js} +3 -3
  110. package/dist/{solution-definition-helper-tqwd6cxn.js → solution-definition-helper-dreejga4.js} +1 -1
  111. package/dist/{solution-identity-c23d9bfv.js → solution-identity-j63p6n81.js} +4 -4
  112. package/dist/templates/AGENTS.md +131 -24
  113. package/dist/tool.js +26 -26
  114. package/package.json +2 -2
  115. package/dist/deploy-delete-service-as1jfycj.js +0 -23
  116. package/dist/deploy-run-service-gs1xv1y1.js +0 -23
  117. package/dist/feed-resolver-x0kt3yrw.js +0 -27
  118. package/dist/feed-scope-failure-9p8w0j1v.js +0 -20
  119. package/dist/pack-command-service-jzbch4eb.js +0 -29
  120. package/dist/packager-tool-qpryf1x2.js +0 -74
  121. package/dist/packager-tool-vrqbbh01.js +0 -182
  122. package/dist/prepare-solution-resources-h7zvnncd.js +0 -26
  123. package/dist/project-contributions-xx560n8y.js +0 -27
  124. package/dist/run-service-ekbx2jdg.js +0 -506
@@ -1,20 +1,21 @@
1
1
  import {
2
2
  getFileSystem
3
- } from "./packager-tool-vgrswa8p.js";
3
+ } from "./packager-tool-1db1wqdy.js";
4
4
  import {
5
5
  CommandDimensions,
6
6
  ShipDimensions,
7
7
  solutionIdentityProperties,
8
8
  catchError,
9
+ RESULTS,
9
10
  carriedErrorCode,
10
11
  carriedRetry,
11
12
  httpStatusOf2,
12
13
  carriedInstructions,
14
+ classifyThrownError,
13
15
  extractErrorDetails,
14
16
  extractErrorMessage
15
- } from "./packager-tool-m07vyk89.js";
17
+ } from "./packager-tool-gb3dq79g.js";
16
18
  import {
17
- RESULTS,
18
19
  authContextFailure,
19
20
  Option,
20
21
  isPreviewBuild,
@@ -43,50 +44,51 @@ import {
43
44
  pollUntil,
44
45
  unsupportedSolutionProjectType,
45
46
  trackShipSucceeded
46
- } from "./packager-tool-axqk17xw.js";
47
+ } from "./packager-tool-xbfr6y2x.js";
47
48
  import {
48
49
  getAuthContext
49
- } from "./packager-tool-t39pjz7n.js";
50
+ } from "./packager-tool-jtvhkavz.js";
50
51
  import {
51
52
  getSolutionAuthContext2
52
- } from "./packager-tool-ppj5f4y7.js";
53
+ } from "./packager-tool-n1zrk6zv.js";
53
54
  import {
54
55
  Configuration2,
55
56
  PipelinesApi
56
- } from "./packager-tool-z4cbca95.js";
57
+ } from "./packager-tool-hczpvrc1.js";
57
58
  import {
58
59
  DeploymentActivationStatus2,
59
60
  DeploymentOperationStatus2
60
- } from "./packager-tool-xxf8f4v2.js";
61
+ } from "./packager-tool-2syv199e.js";
61
62
  import {
62
63
  listSelectablePublishLocations,
63
64
  feedScopeInitOverride2
64
- } from "./packager-tool-23g7kn35.js";
65
+ } from "./packager-tool-7j920ac5.js";
65
66
  import {
66
67
  activateDeploymentAsync2,
67
68
  listDeploymentsAsync2,
68
69
  uninstallDeploymentAsync2,
69
70
  upgradeDeploymentAsync2,
70
71
  listPackagesAsync2
71
- } from "./packager-tool-0z4aq300.js";
72
+ } from "./packager-tool-cwqy5rb5.js";
72
73
  import {
73
74
  useStudioWebAuth,
74
75
  getStudioWebAuthWithOrganizationId
75
- } from "./packager-tool-vx2c68sb.js";
76
+ } from "./packager-tool-1dsxhz1r.js";
76
77
  import {
77
78
  resolveFeedScopeOrFailureAsync2
78
- } from "./packager-tool-s8q14fth.js";
79
+ } from "./packager-tool-849ch2tq.js";
80
+ import {
81
+ readPackedSolutionId,
82
+ publishSolutionAsync2
83
+ } from "./packager-tool-gns0nxbt.js";
79
84
  import {
80
85
  captureSolutionIdentity2,
81
86
  captureSolutionMember2
82
- } from "./packager-tool-ckrt4gyr.js";
83
- import {
84
- publishSolutionAsync2
85
- } from "./packager-tool-h8tksb5s.js";
87
+ } from "./packager-tool-t9zked1m.js";
86
88
  import {
87
89
  inspectSolutionPackageProjectTypes2,
88
90
  trackSolutionShipSucceeded2
89
- } from "./packager-tool-k9dk39tg.js";
91
+ } from "./packager-tool-txygqgb2.js";
90
92
  import {
91
93
  extractDeploymentErrors,
92
94
  formatDeploymentErrorsAsText
@@ -94,16 +96,19 @@ import {
94
96
  import {
95
97
  SolutionInitError2,
96
98
  solutionInitAsync2
97
- } from "./packager-tool-fx4ws49n.js";
99
+ } from "./packager-tool-cenfraf4.js";
98
100
  import {
99
101
  validatePackProjectOptions
100
- } from "./packager-tool-1ctvbx0h.js";
102
+ } from "./packager-tool-tr3ttz5c.js";
103
+ import {
104
+ ErrorCodes
105
+ } from "./packager-tool-a813na66.js";
101
106
  // package.json
102
107
  var package_default = {
103
108
  name: "@uipath/solution-tool",
104
109
  author: "UiPath",
105
110
  license: "SEE LICENSE IN LICENSE.txt",
106
- version: "1.206.0-preview.306",
111
+ version: "1.207.0-preview.307",
107
112
  description: "Create, pack, publish, and deploy UiPath Automation Solutions.",
108
113
  repository: {
109
114
  type: "git",
@@ -168,8 +173,8 @@ var package_default = {
168
173
  "@uipath/pipelines-sdk": "workspace:*",
169
174
  "@uipath/project-executor": "workspace:*",
170
175
  "@uipath/project-packager": "workspace:*",
171
- "@uipath/resource-builder-sdk": "2026.11.0-alpha0531-4969",
172
- "@uipath/resource-builder-tool": "2026.11.0-alpha0531-4969",
176
+ "@uipath/resource-builder-sdk": "1.0.0-s207-18596",
177
+ "@uipath/resource-builder-tool": "1.0.0-s207-18596",
173
178
  "@uipath/solution-packager": "workspace:*",
174
179
  "@uipath/solution-sdk": "workspace:*",
175
180
  "@uipath/solutionpackager-tool-core": "workspace:*",
@@ -221,7 +226,7 @@ var SOLUTION_CLEANUP_EXAMPLES = [
221
226
  ];
222
227
  var registerCleanupCommand = (program) => {
223
228
  program.command("cleanup").description("Remove unused items from every project in a UiPath solution. Accepts a solution directory (containing .uipx) or a .uis file. For a directory the project sources are modified in place. Pass --dry-run to only detect unused items.").argument("<solution-path>", "Path to a solution directory (containing .uipx) or a .uis file").option("--dry-run", "Detect unused items but do not modify any project files.").option("--skip-imports", "Do not clean up now-unused references to removed items in the project's files.").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--exclude-configured-sources", "Resolve project dependencies only from the tenant feeds and any --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds, so a dependency that is not on those feeds fails to restore.").option("--feed-folder <name>", "Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. Accepts a folder name or fully qualified path.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", (value) => Number.parseInt(value, 10), 10).examples(SOLUTION_CLEANUP_EXAMPLES).trackedAction(processContext, async (solutionPath, options, command) => {
224
- const { CleanupCommandService } = await import("./cleanup-command-service-abtxpefz.js");
229
+ const { CleanupCommandService } = await import("./cleanup-command-service-0j6qxj96.js");
225
230
  const service = new CleanupCommandService;
226
231
  const cleanupOptions = {
227
232
  dryRun: options.dryRun,
@@ -323,8 +328,8 @@ var SOLUTION_DEPLOY_ACTIVATE_EXAMPLES = [
323
328
  }
324
329
  ];
325
330
  var registerDeployActivateCommand = (program) => {
326
- program.command("activate").description("Activate a deployed solution that was deployed without auto-activation. Activation provisions all solution components.").argument("<deployment-name>", "Name of the deployment to activate. Use 'solution deploy list' to find deployment names.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds for activation polling (default: 360)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between activation status polls (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).addOption(new Option("--feed <name-or-key>", "The feed the deployment lives in (name or folder key, from 'solution feeds list'). Only that feed is searched; without it the tenant feed, your Personal Workspace and the folder feeds are tried in turn. Needs a user session for a feed other than the tenant's. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace")).option("--personal-workspace", "The deployment lives in your Personal Workspace feed: only that feed is searched. Needs a user session.").examples(SOLUTION_DEPLOY_ACTIVATE_EXAMPLES).trackedAction(processContext, async (deploymentName, options) => {
327
- const result = await activateDeploymentAsync2(deploymentName, {
331
+ program.command("activate").description("Activate a deployed solution that was deployed without auto-activation. Activation provisions all solution components.").argument("<deployment>", "Name of the deployment to activate (preferred), or its key as 'solution deploy list' reports it (Key). A key is resolved through the Pipelines deployment lookup, which spans every feed, so no feed flag is needed next to it; a superseded key acts on the deployment's current record.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds for activation polling (default: 360)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between activation status polls (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).addOption(new Option("--feed <name-or-key>", "The feed the deployment lives in (name or folder key, from 'solution feeds list'). Only that feed is searched; without it the tenant feed, your Personal Workspace and the folder feeds are tried in turn. Needs a user session for a feed other than the tenant's. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace")).option("--personal-workspace", "The deployment lives in your Personal Workspace feed: only that feed is searched. Needs a user session.").examples(SOLUTION_DEPLOY_ACTIVATE_EXAMPLES).trackedAction(processContext, async (deployment, options) => {
332
+ const result = await activateDeploymentAsync2(deployment, {
328
333
  tenant: options.tenant,
329
334
  personalWorkspace: options.personalWorkspace,
330
335
  feed: options.feed,
@@ -344,13 +349,17 @@ var registerDeployActivateCommand = (program) => {
344
349
  processContext.exit(result.exitCode);
345
350
  return;
346
351
  }
352
+ if (result.orchestratorUrl)
353
+ logger.info(`Deployed: ${result.orchestratorUrl}`);
347
354
  if (result.instanceId === undefined) {
348
355
  OutputFormatter.success({
349
356
  Result: RESULTS.Success,
350
357
  Code: "SolutionDeployActivate",
351
358
  Data: {
352
359
  Status: result.status,
353
- DeploymentName: deploymentName
360
+ OrchestratorUrl: result.orchestratorUrl,
361
+ FolderUrl: result.folderUrl,
362
+ DeploymentName: result.deploymentName
354
363
  }
355
364
  });
356
365
  return;
@@ -360,7 +369,9 @@ var registerDeployActivateCommand = (program) => {
360
369
  Code: "SolutionDeployActivate",
361
370
  Data: {
362
371
  Status: result.status,
363
- DeploymentName: deploymentName,
372
+ OrchestratorUrl: result.orchestratorUrl,
373
+ FolderUrl: result.folderUrl,
374
+ DeploymentName: result.deploymentName,
364
375
  InstanceId: result.instanceId
365
376
  }
366
377
  });
@@ -375,6 +386,10 @@ function getPackageStateInstructions(state) {
375
386
  }
376
387
 
377
388
  // src/commands/deploy-config-get.ts
389
+ function packageLookupInstructions(scope, feedSelector, details) {
390
+ const where = scope.kind === "tenant" ? "Check available packages with: uip solution packages list. If the package was published to a Personal Workspace or folder feed, add --personal-workspace or --feed." : `Check the packages in that feed with: uip solution packages list${feedSelector}.`;
391
+ return `${where} Details: ${details}`;
392
+ }
378
393
  var SOLUTION_DEPLOY_CONFIG_GET_EXAMPLES = [
379
394
  {
380
395
  Description: "Fetch the default configuration for a solution package",
@@ -388,10 +403,27 @@ var SOLUTION_DEPLOY_CONFIG_GET_EXAMPLES = [
388
403
  Format: "json"
389
404
  }
390
405
  }
406
+ },
407
+ {
408
+ Description: "Fetch the configuration of a package published to your Personal Workspace feed",
409
+ Command: "uip solution deploy config get my-package --package-version 1.0.0 --personal-workspace -d my-config.json",
410
+ Output: {
411
+ Code: "SolutionDeployConfig",
412
+ Data: {
413
+ Status: "Configuration written",
414
+ OutputPath: "/workspace/my-config.json",
415
+ PackageName: "my-package",
416
+ PackageVersion: "1.0.0",
417
+ State: "Ready",
418
+ Format: "json"
419
+ }
420
+ }
391
421
  }
392
422
  ];
393
423
  var registerDeployConfigGetCommand = (program) => {
394
- program.command("get").description("Fetch the default deployment configuration for a published solution package. The config lists all resources (assets, queues, buckets, processes, connections, entities, choice sets, etc.) and their default settings. Save to a file with -d, then customize with 'config set' or 'config link' before deploying with 'deploy run --config-file'.").argument("<package-name>", "Solution package name. Use 'solution packages list' to find available names.").option("--package-version <version>", "Package version (optional, latest if omitted)").option("-d, --destination <path>", "Write configuration to a file instead of stdout").addOption(new Option("--format <format>", "Configuration format: json or yaml (default: json)").choices(["json", "yaml"]).default("json")).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(SOLUTION_DEPLOY_CONFIG_GET_EXAMPLES).trackedAction(processContext, async (packageName, options) => {
424
+ const command = program.command("get").description("Fetch the default deployment configuration for a published solution package, from the tenant feed or, with --personal-workspace or --feed, the feed the package was published to. The config lists all resources (assets, queues, buckets, processes, connections, entities, choice sets, etc.) and their default settings. Save to a file with -d, then customize with 'config set' or 'config link' before deploying with 'deploy run --config-file', or apply it to an existing deployment with 'deploy upgrade --config-file'.").argument("<package-name>", "Solution package name. Use 'solution packages list' to find available names.").option("--package-version <version>", "Package version (optional, latest if omitted)").option("-d, --destination <path>", "Write configuration to a file instead of stdout").addOption(new Option("--format <format>", "Configuration format: json or yaml (default: json)").choices(["json", "yaml"]).default("json")).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("--personal-workspace", "Read the package from the current user's Personal Workspace feed instead of the tenant feed.");
425
+ command.addOption(new Option("--feed <name-or-key>", "Read the package from this feed (name or folder key, from 'solution feeds list') instead of the tenant feed. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace"));
426
+ command.examples(SOLUTION_DEPLOY_CONFIG_GET_EXAMPLES).trackedAction(processContext, async (packageName, options) => {
395
427
  const configFormat = options.format ?? "json";
396
428
  const [authError, auth] = await catchError(getSolutionAuthContext2({
397
429
  tenant: options.tenant,
@@ -406,6 +438,31 @@ var registerDeployConfigGetCommand = (program) => {
406
438
  processContext.exit(1);
407
439
  return;
408
440
  }
441
+ const { resolveFeedScopeOrFailureAsync } = await import("./feed-scope-failure-7abh61sj.js");
442
+ const { feedScopeInitOverride, feedSelectorFlag } = await import("./feed-resolver-yj94m9j1.js");
443
+ const [scopeFailure, scope] = await resolveFeedScopeOrFailureAsync(options, auth);
444
+ if (scopeFailure) {
445
+ OutputFormatter.error(scopeFailure);
446
+ processContext.exit(1);
447
+ return;
448
+ }
449
+ if (scope.kind !== "tenant") {
450
+ const { feedReadRefusalAsync } = await import("./feed-session-z8t87r5w.js");
451
+ const refusal = await feedReadRefusalAsync(auth, scope.folderKey, `Reading the configuration of a package in the feed '${scope.name ?? scope.folderKey}'`, "packages");
452
+ if (refusal) {
453
+ OutputFormatter.error({
454
+ Result: RESULTS.Failure,
455
+ Message: refusal.message,
456
+ Instructions: refusal.instructions,
457
+ ErrorCode: "permission_denied",
458
+ Retry: "RetryWillNotFix"
459
+ });
460
+ processContext.exit(1);
461
+ return;
462
+ }
463
+ }
464
+ const initOverride = feedScopeInitOverride(scope);
465
+ const feedSelector = feedSelectorFlag(scope);
409
466
  const configuration = new Configuration2({
410
467
  basePath: auth.basePath,
411
468
  accessToken: auth.accessToken
@@ -414,13 +471,15 @@ var registerDeployConfigGetCommand = (program) => {
414
471
  const [packageError, packageInfo] = await catchError(api.pipelinesGetPackageVersion({
415
472
  packageName,
416
473
  packageVersion: options.packageVersion
417
- }));
474
+ }, initOverride));
418
475
  if (packageError) {
419
- const { message, details } = await extractErrorDetails(packageError);
476
+ const { message, details, errorCode, retry } = await extractErrorDetails(packageError);
420
477
  OutputFormatter.error({
421
478
  Result: RESULTS.Failure,
422
479
  Message: message,
423
- Instructions: `Check available packages with: uip solution packages list. Details: ${details}`
480
+ Instructions: packageLookupInstructions(scope, feedSelector, details),
481
+ ErrorCode: errorCode,
482
+ Retry: retry
424
483
  });
425
484
  processContext.exit(1);
426
485
  return;
@@ -438,13 +497,15 @@ var registerDeployConfigGetCommand = (program) => {
438
497
  packageName,
439
498
  format: configFormat,
440
499
  packageVersion: packageInfo.packageVersion
441
- }));
500
+ }, initOverride));
442
501
  if (configError) {
443
- const { message, details } = await extractErrorDetails(configError);
502
+ const { message, details, errorCode, retry } = await extractErrorDetails(configError);
444
503
  OutputFormatter.error({
445
504
  Result: RESULTS.Failure,
446
505
  Message: message,
447
- Instructions: `Check available packages with: uip solution packages list. Details: ${details}`
506
+ Instructions: packageLookupInstructions(scope, feedSelector, details),
507
+ ErrorCode: errorCode,
508
+ Retry: retry
448
509
  });
449
510
  processContext.exit(1);
450
511
  return;
@@ -609,7 +670,7 @@ var DEPLOY_CONFIG_UNLINK_EXAMPLES = [
609
670
  }
610
671
  ];
611
672
  var registerDeployConfigLinkCommand = (program) => {
612
- program.command("link").description("Link a solution resource to an existing resource in Orchestrator instead of creating a new one during deployment. Example: 'config link config.json MyQueue --name ProductionQueue --folder-path Shared/Production'. Changes are local — pass the file to 'deploy run --config-file' to apply them.").argument("<file>", "Path to the deploy config JSON file. Generate one with 'solution deploy config get <package> -d config.json'.").argument("<resource>", "Resource name or resourceKey from the config file. Open the config JSON to see available resource names.").requiredOption("-n, --name <name>", "Name of the existing Orchestrator resource to link to. Use 'uip resources <kind> list' to find existing resources.").option("--folder-path <path>", "Orchestrator folder path where the existing resource lives. Use 'uip folders list' to see available folders.").examples(DEPLOY_CONFIG_LINK_EXAMPLES).trackedAction(processContext, async (file, resource, options) => {
673
+ program.command("link").description("Link a solution resource to an existing resource in Orchestrator instead of creating a new one during deployment. Example: 'config link config.json MyQueue --name ProductionQueue --folder-path Shared/Production'. Changes are local — pass the file to 'deploy run --config-file' to apply them, or to 'deploy upgrade --config-file' to relink an existing deployment.").argument("<file>", "Path to the deploy config JSON file. Generate one with 'solution deploy config get <package> -d config.json'.").argument("<resource>", "Resource name or resourceKey from the config file. Open the config JSON to see available resource names.").requiredOption("-n, --name <name>", "Name of the existing Orchestrator resource to link to. Use 'uip resources <kind> list' to find existing resources.").option("--folder-path <path>", "Orchestrator folder path where the existing resource lives. Use 'uip folders list' to see available folders.").examples(DEPLOY_CONFIG_LINK_EXAMPLES).trackedAction(processContext, async (file, resource, options) => {
613
674
  const [readError, result] = await readConfigFile(file);
614
675
  if (readError) {
615
676
  OutputFormatter.error({
@@ -659,7 +720,7 @@ var registerDeployConfigLinkCommand = (program) => {
659
720
  });
660
721
  };
661
722
  var registerDeployConfigUnlinkCommand = (program) => {
662
- program.command("unlink").description("Remove a resource link from the config file. On the next 'deploy run --config-file', the resource will be unlinked from the existing Orchestrator resource and a new one will be created instead.").argument("<file>", "Path to the deploy config JSON file. Generate one with 'solution deploy config get <package> -d config.json'.").argument("<resource>", "Resource name or resourceKey from the config file. Open the config JSON to see available resource names and their current links.").examples(DEPLOY_CONFIG_UNLINK_EXAMPLES).trackedAction(processContext, async (file, resource) => {
723
+ program.command("unlink").description("Remove a resource link from the config file. On the next 'deploy run --config-file' (or 'deploy upgrade --config-file'), the resource will be unlinked from the existing Orchestrator resource and a new one will be created instead.").argument("<file>", "Path to the deploy config JSON file. Generate one with 'solution deploy config get <package> -d config.json'.").argument("<resource>", "Resource name or resourceKey from the config file. Open the config JSON to see available resource names and their current links.").examples(DEPLOY_CONFIG_UNLINK_EXAMPLES).trackedAction(processContext, async (file, resource) => {
663
724
  const [readError, result] = await readConfigFile(file);
664
725
  if (readError) {
665
726
  OutputFormatter.error({
@@ -730,7 +791,7 @@ var DEPLOY_CONFIG_SET_EXAMPLES = [
730
791
  }
731
792
  ];
732
793
  var registerDeployConfigSetCommand = (program) => {
733
- program.command("set").description("Set a property on a resource in a deploy config file. Examples: 'config set config.json MyQueue maxNumberOfRetries 5' to set a resource property, 'config set config.json MyQueue conflictFixingAction UseExisting' to set conflict resolution, 'config set config.json --all conflictFixingAction UseExisting' to set on all resources. Changes are local — pass the file to 'deploy run --config-file' to apply them.").argument("<file>", "Path to the deploy config JSON file. Generate one with 'solution deploy config get <package> -d config.json'.").argument("<args...>", "Without --all: <resource> <property> <value>. With --all: <property> <value>. Resource names and property names are listed in the config file. Example: MyQueue maxNumberOfRetries 5").option("--all", "Apply to all resources in the config. Only works with conflictFixingAction. Example: --all conflictFixingAction UseExisting").examples(DEPLOY_CONFIG_SET_EXAMPLES).trackedAction(processContext, async (file, args, options) => {
794
+ program.command("set").description("Set a property on a resource in a deploy config file. Examples: 'config set config.json MyQueue maxNumberOfRetries 5' to set a resource property, 'config set config.json MyQueue conflictFixingAction UseExisting' to set conflict resolution, 'config set config.json --all conflictFixingAction UseExisting' to set on all resources. Changes are local — pass the file to 'deploy run --config-file' to apply them, or to 'deploy upgrade --config-file' for an existing deployment.").argument("<file>", "Path to the deploy config JSON file. Generate one with 'solution deploy config get <package> -d config.json'.").argument("<args...>", "Without --all: <resource> <property> <value>. With --all: <property> <value>. Resource names and property names are listed in the config file. Example: MyQueue maxNumberOfRetries 5").option("--all", "Apply to all resources in the config. Only works with conflictFixingAction. Example: --all conflictFixingAction UseExisting").examples(DEPLOY_CONFIG_SET_EXAMPLES).trackedAction(processContext, async (file, args, options) => {
734
795
  let resource;
735
796
  let property;
736
797
  let value;
@@ -881,15 +942,27 @@ var SOLUTION_DEPLOY_DELETE_EXAMPLES = [
881
942
  DeploymentKey: "a1b2c3d4-0000-0000-0000-000000000001"
882
943
  }
883
944
  }
945
+ },
946
+ {
947
+ Description: "Delete a deployment by the Key 'deploy list' prints; the output names the deployment it resolved to",
948
+ Command: "uip solution deploy delete a1b2c3d4-0000-0000-0000-000000000001 --yes",
949
+ Output: {
950
+ Code: "SolutionDeployDelete",
951
+ Data: {
952
+ Status: "Deleted",
953
+ DeploymentName: "my-deployment",
954
+ DeploymentKey: "a1b2c3d4-0000-0000-0000-000000000001"
955
+ }
956
+ }
884
957
  }
885
958
  ];
886
959
  var registerDeployDeleteCommand = (program) => {
887
- program.command("delete").description("Delete a deployment from the tenant. Use this for a deployment that 'deploy uninstall' cannot remove: one left inactive after an uninstall, one superseded by a newer version, or one left behind by a failed install — Orchestrator refuses to uninstall those with error 4007. The command reads the deployment first, and refuses when its own action list offers actions but not Delete, naming the state and the actions that are available. A record that lists no actions at all says nothing, so there the request goes to the server and the server decides.").argument("<deployment-name>", "Name of the deployment to delete. Use 'solution deploy list' to find deployment names.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").addOption(new Option("--feed <name-or-key>", "The feed the deployment lives in (name or folder key, from 'solution feeds list'). Only that feed is searched; without it the tenant feed, your Personal Workspace and the folder feeds are tried in turn. Needs a user session for a feed other than the tenant's. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace")).option("--personal-workspace", "The deployment lives in your Personal Workspace feed: only that feed is searched. Needs a user session.").examples(SOLUTION_DEPLOY_DELETE_EXAMPLES).trackedAction(processContext, async (deploymentName, options) => {
888
- if (!requireConfirmation(options, `delete deployment '${deploymentName}'`)) {
960
+ program.command("delete").description("Delete a deployment from the tenant. Use this for a deployment that 'deploy uninstall' cannot remove: one left inactive after an uninstall, one superseded by a newer version, or one left behind by a failed install — Orchestrator refuses to uninstall those with error 4007. The command reads the deployment first, and refuses when its own action list offers actions but not Delete, naming the state and the actions that are available. A record that lists no actions at all says nothing, so there the request goes to the server and the server decides.").argument("<deployment>", "Name of the deployment to delete (preferred), or its key as 'solution deploy list' reports it (Key). A key is resolved through the Pipelines deployment lookup, which spans every feed, so no feed flag is needed next to it; a superseded key acts on the deployment's current record.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").addOption(new Option("--feed <name-or-key>", "The feed the deployment lives in (name or folder key, from 'solution feeds list'). Only that feed is searched; without it the tenant feed, your Personal Workspace and the folder feeds are tried in turn. Needs a user session for a feed other than the tenant's. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace")).option("--personal-workspace", "The deployment lives in your Personal Workspace feed: only that feed is searched. Needs a user session.").examples(SOLUTION_DEPLOY_DELETE_EXAMPLES).trackedAction(processContext, async (deployment, options) => {
961
+ if (!requireConfirmation(options, `delete deployment '${deployment}'`)) {
889
962
  return;
890
963
  }
891
- const { deleteDeploymentAsync } = await import("./deploy-delete-service-as1jfycj.js");
892
- const result = await deleteDeploymentAsync(deploymentName, {
964
+ const { deleteDeploymentAsync } = await import("./deploy-delete-service-ghyetrvj.js");
965
+ const result = await deleteDeploymentAsync(deployment, {
893
966
  tenant: options.tenant,
894
967
  personalWorkspace: options.personalWorkspace,
895
968
  feed: options.feed,
@@ -1169,6 +1242,25 @@ var SOLUTION_DEPLOY_RUN_EXAMPLES = [
1169
1242
  }
1170
1243
  }
1171
1244
  },
1245
+ {
1246
+ Description: "A deploy that succeeded into a folder with no runtime for the unattended jobs of one of its RPA processes: triggers and Orchestrator-started jobs will not run until a machine is assigned (Result: Success; do not deploy again, assign the machine)",
1247
+ Command: 'uip solution deploy run --name my-deployment --package-name my-package --package-version 1.0.0 --folder-name MySolution --parent-folder-path "Shared"',
1248
+ Output: {
1249
+ Code: "SolutionDeployRun",
1250
+ Data: {
1251
+ Status: "DeploymentSucceeded",
1252
+ DeploymentKey: "a1b2c3d4-0000-0000-0000-000000000004",
1253
+ PipelineDeploymentId: "b2c3d4e5-0000-0000-0000-000000000004",
1254
+ InstanceId: "c3d4e5f6-0000-0000-0000-000000000004",
1255
+ FolderName: "MySolution",
1256
+ FolderPath: "Shared/MySolution",
1257
+ ActivationStatus: "SuccessfulActivate",
1258
+ Warnings: [
1259
+ "Folder 'Shared/MySolution' has no runtime for unattended jobs of the Process process 'InvoiceBot' (none of Serverless, AutomationCloud, AutomationCloudTestAutomation, AppTest, PerformanceTest, Unattended, NonProduction, TestAutomation has slots there): its triggers and the jobs Orchestrator starts will not run until one is assigned. Running it attended from Assistant is not affected. To fix it, assign a machine with Unattended slots (or a serverless machine) to the folder: find one with: uip or machines list. Then assign it: uip or machines assign <machine-key> --folder-path 'Shared/MySolution'. Check with: uip or folders runtimes --folder-path 'Shared/MySolution'"
1260
+ ]
1261
+ }
1262
+ }
1263
+ },
1172
1264
  {
1173
1265
  Description: "Deploy a solution package into the current user's Personal Workspace",
1174
1266
  Command: "uip solution deploy run --name my-deployment --package-name my-package --package-version 1.0.0 --folder-name MySolution --personal-workspace",
@@ -1225,13 +1317,13 @@ var SOLUTION_DEPLOY_RUN_FEED_EXAMPLE = {
1225
1317
  }
1226
1318
  };
1227
1319
  var registerDeployRunCommand = (program) => {
1228
- const command = program.command("run").description("Deploy a solution package to Orchestrator. Creates a folder, provisions resources, and (by default) activates the solution. The deployment is keyed on --name: a name that does not exist yet gets a NEW deployment in a NEW folder (the normal case), while re-using an existing deployment's name updates that deployment in place — use 'deploy upgrade' when that is what you want. If the package is already deployed the command stops and points you at the upgrade path; pass --yes with a different --name to deploy a second, separate copy anyway. Pass --skip-activate to leave the deployment in 'Inactive (Ready to activate)' state and activate later with 'deploy activate'. A deployment whose resources need 'Setup activation' in Orchestrator is installed but not activated: the command reports Result: Success with ActivationStatus: NeedsSetupToActivate, the resources and the steps left — do not deploy it again. To customize resource settings before deploying, use 'config get' to fetch the default config, 'config set' / 'config link' to edit it, then pass it here with --config-file. When the deploy replaces an installed resource with a link (a config-file link to an existing resource), the server deletes the installed copy and its data, and asks for confirmation first: the command stops and lists those resources unless --acknowledge-permanent-deletion is passed.").requiredOption("-n, --name <deployment-name>", "Name for the deployment").addOption(withCompleter(new Option("--package-name <name>", "Solution package name to deploy. Use 'solution packages list' to find available names.").makeOptionMandatory(), packageNameCompleter)).addOption(withCompleter(new Option("--package-version <version>", "Solution package version to deploy. Use 'solution packages list' to find available versions.").makeOptionMandatory(), packageVersionCompleter)).requiredOption("--folder-name <name>", "Name for the new Orchestrator folder created for this deployment (created under --parent-folder-path if specified)").addOption(new Option("--parent-folder-path <path>", "Parent folder path (e.g., 'Shared'). Solution folder is created under this.").conflicts("parentFolderKey")).option("--parent-folder-key <key>", "Parent folder key (GUID). Alternative to --parent-folder-path.").addOption(new Option("--personal-workspace", "Deploy into the current user's Personal Workspace. Resolves the workspace name from Orchestrator automatically; needs a user session (an external app has no workspace, and the server ignores the feed header on client-credentials requests). Mutually exclusive with --parent-folder-path and --parent-folder-key.").conflicts(["parentFolderPath", "parentFolderKey"])).option("--config-file <path>", "JSON or YAML configuration file. Generate with: uip solution deploy config get <name> -d config.json, then customize with 'config set' or 'config link'.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds applied per polling phase — deploy and (when not skipped) activate (default: 360 each)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between status polls during the deploy and activate phases (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).addOption(new Option("--wait", "Deprecated and ignored: every deploy now waits for the install to finish (bounded by --timeout).").hideHelp()).option("--skip-activate", "Skip auto-activation; leave the deployment in 'Inactive (Ready to activate)' state. Activate later with 'uip solution deploy activate <name>'.").option("-y, --yes", "Deploy even when this package already has a deployment. Without it, deploy run looks the package up and stops if it is already deployed. That check is best-effort, not a guarantee: a lookup failure only warns, and under an application (client-credentials) login it never stops the deploy — an existing deployment is reported as a warning, or the check is skipped on servers without the Pipelines deployment search. --yes only skips that check: the install is keyed on --name, so re-using an existing deployment's name updates that deployment in place rather than creating a second copy — pass a different --name for a separate deployment.").option("--acknowledge-permanent-deletion", "Confirm that installed resources this deployment replaces with a link are permanently deleted, along with their data. Without it the deploy stops at the server's confirmation request and lists those resources; nothing is installed. With it each listed resource is acknowledged and the same install runs once more, within the same --timeout. Independent of --yes.");
1320
+ const command = program.command("run").description("Deploy a solution package to Orchestrator. Creates a folder, provisions resources, and (by default) activates the solution. The deployment is keyed on --name: a name that does not exist yet gets a NEW deployment in a NEW folder (the normal case), while re-using an existing deployment's name updates that deployment in place — use 'deploy upgrade' when that is what you want. If the package is already deployed the command stops and points you at the upgrade path; pass --yes with a different --name to deploy a second, separate copy anyway. Pass --skip-activate to leave the deployment in 'Inactive (Ready to activate)' state and activate later with 'deploy activate'. A deployment whose resources need 'Setup activation' in Orchestrator is installed but not activated: the command reports Result: Success with ActivationStatus: NeedsSetupToActivate, the resources and the steps left — do not deploy it again. To customize resource settings before deploying, use 'config get' to fetch the default config, 'config set' / 'config link' to edit it, then pass it here with --config-file. When the deploy replaces an installed resource with a link (a config-file link to an existing resource), the server deletes the installed copy and its data, and asks for confirmation first: the command stops and lists those resources unless --acknowledge-permanent-deletion is passed. Once the package is installed, the command checks that the deployment's folder has a runtime for the unattended jobs of its RPA processes, test cases and MCP servers (an Unattended or serverless machine, for example); one it lacks is reported in Data.Warnings and on stderr, with the command that fixes it, and the deploy still succeeds. Apps, agents, flows, API workflows, functions, cases and BPMN processes are not checked: they need no machine in the folder. A process can still run attended from Assistant either way.").requiredOption("-n, --name <deployment-name>", "Name for the deployment").addOption(withCompleter(new Option("--package-name <name>", "Solution package name to deploy. Use 'solution packages list' to find available names.").makeOptionMandatory(), packageNameCompleter)).addOption(withCompleter(new Option("--package-version <version>", "Solution package version to deploy. Use 'solution packages list' to find available versions.").makeOptionMandatory(), packageVersionCompleter)).requiredOption("--folder-name <name>", "Name for the new Orchestrator folder created for this deployment (created under --parent-folder-path if specified)").addOption(new Option("--parent-folder-path <path>", "Parent folder path (e.g., 'Shared'). Solution folder is created under this.").conflicts("parentFolderKey")).option("--parent-folder-key <key>", "Parent folder key (GUID). Alternative to --parent-folder-path.").addOption(new Option("--personal-workspace", "Deploy into the current user's Personal Workspace. Resolves the workspace name from Orchestrator automatically; needs a user session (an external app has no workspace, and the server ignores the feed header on client-credentials requests). Mutually exclusive with --parent-folder-path and --parent-folder-key.").conflicts(["parentFolderPath", "parentFolderKey"])).option("--config-file <path>", "JSON or YAML configuration file. Generate with: uip solution deploy config get <name> -d config.json, then customize with 'config set' or 'config link'.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds applied per polling phase — deploy and (when not skipped) activate (default: 360 each)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between status polls during the deploy and activate phases (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).addOption(new Option("--wait", "Deprecated and ignored: every deploy now waits for the install to finish (bounded by --timeout).").hideHelp()).option("--skip-activate", "Skip auto-activation; leave the deployment in 'Inactive (Ready to activate)' state. Activate later with 'uip solution deploy activate <name>'.").option("-y, --yes", "Deploy even when this package already has a deployment. Without it, deploy run looks the package up and stops if it is already deployed. That check is best-effort, not a guarantee: a lookup failure only warns, and under an application (client-credentials) login it never stops the deploy — an existing deployment is reported as a warning, or the check is skipped on servers without the Pipelines deployment search. --yes only skips that check: the install is keyed on --name, so re-using an existing deployment's name updates that deployment in place rather than creating a second copy — pass a different --name for a separate deployment.").option("--acknowledge-permanent-deletion", "Confirm that installed resources this deployment replaces with a link are permanently deleted, along with their data. Without it the deploy stops at the server's confirmation request and lists those resources; nothing is installed. With it each listed resource is acknowledged and the same install runs once more, within the same --timeout. Independent of --yes.");
1229
1321
  command.addOption(new Option("--feed <name-or-key>", "Deploy a package from a specific feed (name or folder key, from 'solution feeds list') instead of the tenant feed. Needs a user session: the server ignores the feed header on client-credentials requests, so an external app is refused rather than deploying to the tenant feed by accident. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace"));
1230
1322
  command.examples([
1231
1323
  ...SOLUTION_DEPLOY_RUN_EXAMPLES,
1232
1324
  SOLUTION_DEPLOY_RUN_FEED_EXAMPLE
1233
1325
  ]).trackedAction(processContext, async (options) => {
1234
- const { deployRunAsync } = await import("./deploy-run-service-gs1xv1y1.js");
1326
+ const { deployRunAsync } = await import("./deploy-run-service-sz77fpsz.js");
1235
1327
  const result = await deployRunAsync({
1236
1328
  tenant: options.tenant,
1237
1329
  deploymentName: options.name,
@@ -1279,11 +1371,15 @@ var registerDeployRunCommand = (program) => {
1279
1371
  processContext.exit(result.exitCode);
1280
1372
  return;
1281
1373
  }
1374
+ if (result.orchestratorUrl)
1375
+ logger.info(`Deployed: ${result.orchestratorUrl}`);
1282
1376
  OutputFormatter.success({
1283
1377
  Result: RESULTS.Success,
1284
1378
  Code: "SolutionDeployRun",
1285
1379
  Data: {
1286
1380
  Status: result.status,
1381
+ OrchestratorUrl: result.orchestratorUrl,
1382
+ FolderUrl: result.folderUrl,
1287
1383
  DeploymentKey: result.deploymentKey,
1288
1384
  PipelineDeploymentId: result.pipelineDeploymentId,
1289
1385
  InstanceId: result.instanceId,
@@ -1302,6 +1398,7 @@ var registerDeployRunCommand = (program) => {
1302
1398
  }))
1303
1399
  } : {},
1304
1400
  ...result.nextSteps ? { NextSteps: result.nextSteps } : {},
1401
+ ...result.warnings ? { Warnings: result.warnings } : {},
1305
1402
  PermanentlyDeletedResources: result.permanentlyDeletedResources,
1306
1403
  DeploymentName: result.deploymentName,
1307
1404
  PackageName: result.packageName,
@@ -1439,12 +1536,12 @@ var registerDeployStatusCommand = (program) => {
1439
1536
  processContext.exit(1);
1440
1537
  return;
1441
1538
  }
1442
- const { feedScopeInitOverride } = await import("./feed-resolver-x0kt3yrw.js");
1539
+ const { feedScopeInitOverride } = await import("./feed-resolver-yj94m9j1.js");
1443
1540
  const {
1444
1541
  FeedReadRefusedError,
1445
1542
  feedReadRefusalAsync,
1446
1543
  feedReadRefusalForApplication
1447
- } = await import("./feed-session-ytew8k2j.js");
1544
+ } = await import("./feed-session-z8t87r5w.js");
1448
1545
  const report = (refusal) => {
1449
1546
  if (!refusal) {
1450
1547
  return false;
@@ -1462,14 +1559,14 @@ var registerDeployStatusCommand = (program) => {
1462
1559
  if (options.personalWorkspace === true && report(feedReadRefusalForApplication(auth, "Reading a Personal Workspace deployment"))) {
1463
1560
  return;
1464
1561
  }
1465
- const { resolveFeedScopeOrFailureAsync } = await import("./feed-scope-failure-9p8w0j1v.js");
1562
+ const { resolveFeedScopeOrFailureAsync } = await import("./feed-scope-failure-7abh61sj.js");
1466
1563
  const [scopeFailure, feedScope] = await resolveFeedScopeOrFailureAsync(options, auth);
1467
1564
  if (scopeFailure) {
1468
1565
  OutputFormatter.error(scopeFailure);
1469
1566
  processContext.exit(1);
1470
1567
  return;
1471
1568
  }
1472
- const { describeDeploymentAsync, looksLikeDeploymentKey } = await import("./deploy-status-service-k1gycn13.js");
1569
+ const { describeDeploymentAsync, looksLikeDeploymentKey } = await import("./deploy-status-service-aj4m61hg.js");
1473
1570
  if (feedScope.kind !== "tenant" && !looksLikeDeploymentKey(deployment) && report(await feedReadRefusalAsync(auth, feedScope.folderKey, `Reading a deployment in the feed '${feedScope.name ?? feedScope.folderKey}'`))) {
1474
1571
  return;
1475
1572
  }
@@ -1490,8 +1587,10 @@ var registerDeployStatusCommand = (program) => {
1490
1587
  if (!state) {
1491
1588
  OutputFormatter.error({
1492
1589
  Result: RESULTS.Failure,
1590
+ ErrorCode: "not_found",
1493
1591
  Message: `Deployment '${deployment}' was not found.`,
1494
- Instructions: "No deployment of that name is visible in the feeds this session can reach. Run 'uip solution deploy list' to see the names; add --personal-workspace or --feed <name-or-key> for a feed outside the tenant."
1592
+ Instructions: "No deployment of that name is visible in the feeds this session can reach. Run 'uip solution deploy list' to see the names; add --personal-workspace or --feed <name-or-key> for a feed outside the tenant.",
1593
+ Retry: "RetryWillNotFix"
1495
1594
  });
1496
1595
  processContext.exit(1);
1497
1596
  return;
@@ -1510,7 +1609,7 @@ var registerDeployStatusCommand = (program) => {
1510
1609
  const api = new PipelinesApi(configuration);
1511
1610
  const [statusError, result] = await catchError(api.pipelinesGetPipelineDeploymentStatus({ pipelineDeploymentId: deployment }, feedSelected ? feedScopeInitOverride(feedScope) : undefined));
1512
1611
  if (statusError) {
1513
- const { isPipelineDeploymentNotFoundError } = await import("./deployment-search-bjdwqh5w.js");
1612
+ const { isPipelineDeploymentNotFoundError } = await import("./deployment-search-mkvzgeq4.js");
1514
1613
  if (await isPipelineDeploymentNotFoundError(statusError)) {
1515
1614
  const [stateError, state] = await catchError(describe());
1516
1615
  if (stateError instanceof FeedReadRefusedError) {
@@ -1537,11 +1636,13 @@ var registerDeployStatusCommand = (program) => {
1537
1636
  return;
1538
1637
  }
1539
1638
  }
1540
- const { message, details } = await extractErrorDetails(statusError);
1639
+ const { message, details, errorCode, retry } = await extractErrorDetails(statusError);
1541
1640
  OutputFormatter.error({
1542
1641
  Result: RESULTS.Failure,
1642
+ ErrorCode: errorCode,
1543
1643
  Message: message,
1544
- Instructions: `Check the pipeline deployment ID (from 'deploy run' output) or the deployment key (from 'deploy list' / 'deploy upgrade'); a deployment name works too. A deployment outside the tenant feed needs --personal-workspace or --feed. Details: ${details}`
1644
+ Instructions: `Check the pipeline deployment ID (from 'deploy run' output) or the deployment key (from 'deploy list' / 'deploy upgrade'); a deployment name works too. A deployment outside the tenant feed needs --personal-workspace or --feed. Details: ${details}`,
1645
+ Retry: retry
1545
1646
  });
1546
1647
  processContext.exit(1);
1547
1648
  return;
@@ -1626,11 +1727,11 @@ var SOLUTION_DEPLOY_UNINSTALL_EXAMPLES = [
1626
1727
  }
1627
1728
  ];
1628
1729
  var registerDeployUninstallCommand = (program) => {
1629
- program.command("uninstall").description("Uninstall a deployed solution. Removes all provisioned resources and the solution folder.").argument("<deployment-name>", "Name of the deployment to uninstall. Use 'solution deploy list' to find deployment names.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds for uninstall polling (default: 360)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between uninstall status polls (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").option("--force", "Force the uninstall past the two refusals Orchestrator lets you override: uncompleted jobs, and the permanent deletion of installed resources that were replaced by links. Also confirms the operation, so --yes is not needed in addition. Flag only; the CLI never prompts.").addOption(new Option("--feed <name-or-key>", "The feed the deployment lives in (name or folder key, from 'solution feeds list'). Only that feed is searched; without it the tenant feed, your Personal Workspace and the folder feeds are tried in turn. Needs a user session for a feed other than the tenant's. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace")).option("--personal-workspace", "The deployment lives in your Personal Workspace feed: only that feed is searched. Needs a user session.").examples(SOLUTION_DEPLOY_UNINSTALL_EXAMPLES).trackedAction(processContext, async (deploymentName, options) => {
1630
- if (!requireConfirmation(options, `uninstall deployment '${deploymentName}'`)) {
1730
+ program.command("uninstall").description("Uninstall a deployed solution. Removes all provisioned resources and the solution folder.").argument("<deployment>", "Name of the deployment to uninstall (preferred), or its key as 'solution deploy list' reports it (Key). A key is resolved through the Pipelines deployment lookup, which spans every feed, so no feed flag is needed next to it; a superseded key acts on the deployment's current record.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds for uninstall polling (default: 360)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between uninstall status polls (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").option("--force", "Force the uninstall past the two refusals Orchestrator lets you override: uncompleted jobs, and the permanent deletion of installed resources that were replaced by links. Also confirms the operation, so --yes is not needed in addition. Flag only; the CLI never prompts.").addOption(new Option("--feed <name-or-key>", "The feed the deployment lives in (name or folder key, from 'solution feeds list'). Only that feed is searched; without it the tenant feed, your Personal Workspace and the folder feeds are tried in turn. Needs a user session for a feed other than the tenant's. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace")).option("--personal-workspace", "The deployment lives in your Personal Workspace feed: only that feed is searched. Needs a user session.").examples(SOLUTION_DEPLOY_UNINSTALL_EXAMPLES).trackedAction(processContext, async (deployment, options) => {
1731
+ if (!requireConfirmation(options, `uninstall deployment '${deployment}'`)) {
1631
1732
  return;
1632
1733
  }
1633
- const result = await uninstallDeploymentAsync2(deploymentName, {
1734
+ const result = await uninstallDeploymentAsync2(deployment, {
1634
1735
  tenant: options.tenant,
1635
1736
  personalWorkspace: options.personalWorkspace,
1636
1737
  feed: options.feed,
@@ -1658,7 +1759,7 @@ var registerDeployUninstallCommand = (program) => {
1658
1759
  Code: "SolutionDeployUninstall",
1659
1760
  Data: {
1660
1761
  Status: result.status,
1661
- DeploymentName: deploymentName,
1762
+ DeploymentName: result.deploymentName,
1662
1763
  Scheduled: result.scheduled
1663
1764
  }
1664
1765
  });
@@ -1670,7 +1771,7 @@ var registerDeployUninstallCommand = (program) => {
1670
1771
  Code: "SolutionDeployUninstall",
1671
1772
  Data: {
1672
1773
  Status: result.status,
1673
- DeploymentName: deploymentName,
1774
+ DeploymentName: result.deploymentName,
1674
1775
  InstanceId: result.instanceId
1675
1776
  }
1676
1777
  });
@@ -1681,7 +1782,7 @@ var registerDeployUninstallCommand = (program) => {
1681
1782
  Code: "SolutionDeployUninstall",
1682
1783
  Data: {
1683
1784
  Status: result.status,
1684
- DeploymentName: deploymentName
1785
+ DeploymentName: result.deploymentName
1685
1786
  }
1686
1787
  });
1687
1788
  });
@@ -1740,6 +1841,29 @@ var SOLUTION_DEPLOY_UPGRADE_EXAMPLES = [
1740
1841
  }
1741
1842
  }
1742
1843
  },
1844
+ {
1845
+ Description: "Relink a deployment's resources without moving its version: pass the deployed version and a config file edited with 'deploy config link' (here a connection now linked to an existing, authenticated one)",
1846
+ Command: "uip solution deploy upgrade c3d4e5f6-0000-0000-0000-000000000003 --version 1.5.0 --config-file config.json",
1847
+ Output: {
1848
+ Code: "SolutionDeployUpgrade",
1849
+ Data: {
1850
+ Status: "DeploymentSucceeded",
1851
+ Operation: "ConfigurationChange",
1852
+ DeploymentStatus: "SuccessfulInstall",
1853
+ Actions: ["Activate", "Uninstall", "Upgrade"],
1854
+ ActivationStatus: "ReadyToActivate",
1855
+ NextSteps: [
1856
+ "Deployment 'my-deployment' is installed at version 1.5.0 but inactive. Activate it with: uip solution deploy activate 'my-deployment'."
1857
+ ],
1858
+ DeploymentName: "my-deployment",
1859
+ FromVersion: "1.5.0",
1860
+ ToVersion: "1.5.0",
1861
+ PipelineDeploymentId: "b2c3d4e5-0000-0000-0000-000000000008",
1862
+ DeploymentKey: "d4e5f6a7-0000-0000-0000-000000000009",
1863
+ InstallDeploymentKey: "c3d4e5f6-0000-0000-0000-000000000003"
1864
+ }
1865
+ }
1866
+ },
1743
1867
  {
1744
1868
  Description: "Upgrade a deployment by name to the newest published version",
1745
1869
  Command: "uip solution deploy upgrade --name my-deployment --package-name my-package",
@@ -1809,13 +1933,14 @@ var SOLUTION_DEPLOY_UPGRADE_EXAMPLES = [
1809
1933
  }
1810
1934
  ];
1811
1935
  var registerDeployUpgradeCommand = (program) => {
1812
- program.command("upgrade").description("Upgrade an existing deployment to another published version of its package in place — the CLI equivalent of the Orchestrator UI 'Upgrade' button. Use this when 'deploy run' is blocked because a deployment already exists. The deployment's existing configuration is preserved, so values already set on it (for example a credential asset's secret) are not reset to the package defaults. The package is validated against the target before anything is installed; a validation failure reports the errors and leaves the deployment on its current version. Address the deployment either by key (positional) or by --name with --package-name. Every call this command makes is an external-app (client-credentials) capable Pipelines endpoint, so both forms work from a CI/CD pipeline (on a server that predates the Pipelines deployment lookup, the key form falls back to the Solutions API for a user session); a deployment in a Personal Workspace or folder feed needs a user session, because the server ignores the feed header on client-credentials requests. Waits for the upgrade to finish unless --no-wait is passed; track a running upgrade with 'deploy status <pipeline-deployment-id>'. When the new version replaces an installed resource with a link, the server deletes the installed copy and its data, and asks for confirmation first: the command stops and lists those resources unless --acknowledge-permanent-deletion is passed.").argument("[deployment-key]", "Key of the deployment to upgrade, as 'solution deploy list' reports it (Key), or a stored InstallDeploymentKey. Resolved through the Pipelines deployment lookup: the deployment's name, package, current version and feed come from the server, so --package-name and --personal-workspace are not needed. On a server without that lookup, a user session reads the key through the Solutions API instead, where a Personal Workspace deployment needs --personal-workspace. Use either this or --name with --package-name.").option("-n, --name <deployment-name>", "Name of the deployment to upgrade, as reported by 'solution deploy list'. Goes with --package-name. The name is checked to exist first, because the install route would create a new deployment for a name it cannot find; this form never does.").option("--package-name <name>", "The deployment's package, for the --name form. Required there: it identifies the package version to install, and nothing name-keyed in Pipelines reports it.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--version <version>", "Target package version (default: the newest published). Any published version of the same package is accepted, including an older one.").option("--personal-workspace", "With --name: upgrade a deployment in your Personal Workspace feed instead of the tenant. With a key the feed is read from the deployment itself and this flag is not needed, except on a server without the Pipelines deployment lookup, where a key is read on the tenant feed unless you pass it.").option("--discard-draft", "When the deployment has a pending draft (an earlier attempt that never completed, usually one rejected by validation), discard it first and upgrade the live version. Without it such a deployment is refused, because the server would re-run the draft, with the configuration it was rejected for, in place of this upgrade. With --name the draft is found through a user session only; under an external app, pass the deployment key.").option("--acknowledge-permanent-deletion", "Confirm that installed resources the new version replaces with a link are permanently deleted, along with their data. Without it the upgrade stops at the server's confirmation request and lists those resources; nothing is installed. With it each listed resource is acknowledged and the same upgrade runs once more, within the same --timeout. Also re-runs a pending draft of the same version that awaits this confirmation instead of refusing it. Has no effect with --no-wait, which never sees the run end: such a draft is then refused as without the flag.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("--no-wait", "Return as soon as the upgrade is accepted instead of waiting for it to finish.").option("--timeout <seconds>", "Seconds to wait for the upgrade to finish (default: 300)", (v) => parseInt(v, 10), 300).option("--poll-interval <ms>", "Milliseconds between status polls (default: 5000)", (v) => parseInt(v, 10), 5000).examples(SOLUTION_DEPLOY_UPGRADE_EXAMPLES).trackedAction(processContext, async (deploymentKey, options) => {
1936
+ program.command("upgrade").description("Upgrade an existing deployment to another published version of its package in place — the CLI equivalent of the Orchestrator UI 'Upgrade' button. Use this when 'deploy run' is blocked because a deployment already exists. The deployment's existing configuration is preserved, so values already set on it (for example a credential asset's secret) are not reset to the package defaults. To change it — link a resource to an existing one, such as an authenticated connection in place of the one a deploy created — pass --config-file; with --version set to the deployed version nothing else moves (Operation: ConfigurationChange). The package is validated against the target before anything is installed; a validation failure reports the errors and leaves the deployment on its current version. Address the deployment either by key (positional) or by --name with --package-name. Every call this command makes is an external-app (client-credentials) capable Pipelines endpoint, so both forms work from a CI/CD pipeline (on a server that predates the Pipelines deployment lookup, the key form falls back to the Solutions API for a user session); a deployment in a Personal Workspace or folder feed needs a user session, because the server ignores the feed header on client-credentials requests. Waits for the upgrade to finish unless --no-wait is passed; track a running upgrade with 'deploy status <pipeline-deployment-id>'. When the new version replaces an installed resource with a link, the server deletes the installed copy and its data, and asks for confirmation first: the command stops and lists those resources unless --acknowledge-permanent-deletion is passed. Once the new version is installed, the command checks that the deployment's folder has a runtime for the unattended jobs of its RPA processes, test cases and MCP servers (an Unattended or serverless machine, for example); one it lacks is reported in Data.Warnings and on stderr, with the command that fixes it, and the upgrade still succeeds.").argument("[deployment-key]", "Key of the deployment to upgrade, as 'solution deploy list' reports it (Key), or a stored InstallDeploymentKey. Resolved through the Pipelines deployment lookup: the deployment's name, package, current version and feed come from the server, so --package-name and --personal-workspace are not needed. On a server without that lookup, a user session reads the key through the Solutions API instead, where a Personal Workspace deployment needs --personal-workspace. Use either this or --name with --package-name.").option("-n, --name <deployment-name>", "Name of the deployment to upgrade, as reported by 'solution deploy list'. Goes with --package-name. The name is checked to exist first, because the install route would create a new deployment for a name it cannot find; this form never does.").option("--package-name <name>", "The deployment's package, for the --name form. Required there: it identifies the package version to install, and nothing name-keyed in Pipelines reports it.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--version <version>", "Target package version (default: the newest published). Any published version of the same package is accepted, including an older one.").option("--config-file <path>", "JSON or YAML deployment configuration to apply with the upgrade, the same file 'deploy run --config-file' takes: fetch it with 'uip solution deploy config get <package-name> -d config.json', then edit it with 'config set' or 'config link'. Each resource the file names is applied as written, so a file straight from 'config get' sets those resources back to the package defaults; a resource the file leaves out keeps the values the deployment has. So keep only the resources you change. Pass --version with the deployed version to change only the configuration (Operation: ConfigurationChange). When a link replaces a resource the deployment installed and the server asks to confirm deleting it, the command stops and lists it until --acknowledge-permanent-deletion is passed.").option("--personal-workspace", "With --name: upgrade a deployment in your Personal Workspace feed instead of the tenant. With a key the feed is read from the deployment itself and this flag is not needed, except on a server without the Pipelines deployment lookup, where a key is read on the tenant feed unless you pass it.").option("--discard-draft", "When the deployment has a pending draft (an earlier attempt that never completed, usually one rejected by validation), discard it first and upgrade the live version. Without it such a deployment is refused, because the server would re-run the draft, with the configuration it was rejected for, in place of this upgrade. With --name the draft is found through a user session only; under an external app, pass the deployment key.").option("--acknowledge-permanent-deletion", "Confirm that installed resources the new version replaces with a link are permanently deleted, along with their data. Without it the upgrade stops at the server's confirmation request and lists those resources; nothing is installed. With it each listed resource is acknowledged and the same upgrade runs once more, within the same --timeout. Also re-runs a pending draft of the same version that awaits this confirmation instead of refusing it. Has no effect with --no-wait, which never sees the run end: such a draft is then refused as without the flag.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("--no-wait", "Return as soon as the upgrade is accepted instead of waiting for it to finish.").option("--timeout <seconds>", "Seconds to wait for the upgrade to finish (default: 300)", (v) => parseInt(v, 10), 300).option("--poll-interval <ms>", "Milliseconds between status polls (default: 5000)", (v) => parseInt(v, 10), 5000).examples(SOLUTION_DEPLOY_UPGRADE_EXAMPLES).trackedAction(processContext, async (deploymentKey, options) => {
1813
1937
  const result = await upgradeDeploymentAsync2({
1814
1938
  deploymentKey,
1815
1939
  deploymentName: options.name,
1816
1940
  packageName: options.packageName,
1817
1941
  tenant: options.tenant,
1818
1942
  version: options.version,
1943
+ configFile: options.configFile,
1819
1944
  personalWorkspace: options.personalWorkspace,
1820
1945
  discardDraft: options.discardDraft,
1821
1946
  acknowledgePermanentDeletion: options.acknowledgePermanentDeletion,
@@ -1847,11 +1972,15 @@ var registerDeployUpgradeCommand = (program) => {
1847
1972
  processContext.exit(result.exitCode);
1848
1973
  return;
1849
1974
  }
1975
+ if (result.orchestratorUrl)
1976
+ logger.info(`Deployed: ${result.orchestratorUrl}`);
1850
1977
  OutputFormatter.success({
1851
1978
  Result: RESULTS.Success,
1852
1979
  Code: "SolutionDeployUpgrade",
1853
1980
  Data: {
1854
1981
  Status: result.status,
1982
+ OrchestratorUrl: result.orchestratorUrl,
1983
+ FolderUrl: result.folderUrl,
1855
1984
  Operation: result.operation,
1856
1985
  DeploymentStatus: result.deploymentStatus,
1857
1986
  Actions: result.actions,
@@ -1866,6 +1995,7 @@ var registerDeployUpgradeCommand = (program) => {
1866
1995
  }))
1867
1996
  } : {},
1868
1997
  ...result.nextSteps ? { NextSteps: result.nextSteps } : {},
1998
+ ...result.warnings ? { Warnings: result.warnings } : {},
1869
1999
  DeploymentName: result.deploymentName,
1870
2000
  FromVersion: result.fromVersion,
1871
2001
  ToVersion: result.toVersion,
@@ -1960,15 +2090,40 @@ var SOLUTION_DOWNLOAD_EXAMPLES = [
1960
2090
  }
1961
2091
  }
1962
2092
  ];
2093
+
2094
+ class StudioWebExportError extends Error {
2095
+ status;
2096
+ constructor(status, body) {
2097
+ const detail = body.trim();
2098
+ super(detail ? `Studio Web API returned ${status}: ${detail}` : `Studio Web API returned ${status}`);
2099
+ this.status = status;
2100
+ this.name = "StudioWebExportError";
2101
+ }
2102
+ }
2103
+ var listSolutionsHint = () => isPreviewBuild() ? " If the solution ID is wrong or was deleted, run 'uip solution list' to see the solutions you own or that are shared with you." : "";
2104
+ function exportNotFoundInstructions(serverText) {
2105
+ return `${serverText.replace(/\.+$/, "")}. 'uip solution download' takes the ID of a solution in Studio Web — not a project key, process key, deployment key or package name. ` + "To recover a deployed solution, run 'uip solution deploy list --folder-path <parent-folder>' for its PackageName and PackageVersion, then " + "'uip solution packages download <package-name> <package-version>'. That command reports Data.SolutionId, the solution the package was packed from: " + "when that solution is in Studio Web, 'uip solution download <SolutionId> --extract' exports its source; otherwise the downloaded .zip is the published package itself." + listSolutionsHint();
2106
+ }
1963
2107
  function registerDownloadCommand(program) {
1964
- const download = program.command("download").description("Download/export a solution from Studio Web").argument("<solution-id>", "Solution UUID to export").option("-d, --destination <dir>", "Destination directory for the downloaded file", ".").option("-n, --name <name>", "Output filename (without extension). Existing files are overwritten; --extract uses this name for the directory").option("--extract", "Extract the downloaded .uis zip into a directory, and add AGENTS.md / CLAUDE.md there if the archive did not already carry them", false).examples(SOLUTION_DOWNLOAD_EXAMPLES);
2108
+ const download = program.command("download").description("Download/export a solution from Studio Web").argument("<solution-id>", "Studio Web solution ID to export (not a project, process or deployment key)").option("-d, --destination <dir>", "Destination directory for the downloaded file", ".").option("-n, --name <name>", "Output filename (without extension). Existing files are overwritten; --extract uses this name for the directory").option("--extract", "Extract the downloaded .uis zip into a directory, and add AGENTS.md / CLAUDE.md there if the archive did not already carry them", false).examples(SOLUTION_DOWNLOAD_EXAMPLES);
1965
2109
  useStudioWebAuth(download, { requireOrganizationId: true }).trackedAction(processContext, async (solutionId, options, command) => {
1966
2110
  const [error] = await catchError(downloadSolution(solutionId, options, command));
2111
+ if (error instanceof StudioWebExportError && error.status === 404) {
2112
+ OutputFormatter.error({
2113
+ Result: RESULTS.Failure,
2114
+ ErrorCode: "not_found",
2115
+ Message: `Studio Web has no solution with ID '${solutionId}' that this session can read.`,
2116
+ Instructions: exportNotFoundInstructions(error.message),
2117
+ Retry: "RetryWillNotFix"
2118
+ });
2119
+ processContext.exit(1);
2120
+ return;
2121
+ }
1967
2122
  if (error) {
1968
2123
  OutputFormatter.error({
1969
2124
  Result: RESULTS.Failure,
1970
2125
  Message: "Failed to download solution",
1971
- Instructions: error.message + (isPreviewBuild() ? " If the solution ID is wrong or was deleted, run 'uip solution list' to see the solutions you own or that are shared with you." : "")
2126
+ Instructions: error.message + listSolutionsHint()
1972
2127
  });
1973
2128
  processContext.exit(1);
1974
2129
  }
@@ -1987,8 +2142,7 @@ async function downloadSolution(solutionId, options, command) {
1987
2142
  }
1988
2143
  });
1989
2144
  if (!response.ok) {
1990
- const text = await response.text();
1991
- throw new Error(`Studio Web API returned ${response.status}: ${text}`);
2145
+ throw new StudioWebExportError(response.status, await response.text());
1992
2146
  }
1993
2147
  const outputDir = fs.path.resolve(options.destination);
1994
2148
  await fs.mkdir(outputDir);
@@ -1999,7 +2153,7 @@ async function downloadSolution(solutionId, options, command) {
1999
2153
  const extractedTo = options.extract ? fs.path.join(outputDir, filename.replace(/\.uis$/, "")) : undefined;
2000
2154
  let briefingFiles = [];
2001
2155
  if (extractedTo) {
2002
- const { extractArchive } = await import("./archive-extract-ma0gy822.js");
2156
+ const { extractArchive } = await import("./archive-extract-afgwacbg.js");
2003
2157
  await extractArchive(outputPath, extractedTo);
2004
2158
  logger.info(`Extracted to ${extractedTo}`);
2005
2159
  briefingFiles = await writeBriefingFiles(extractedTo);
@@ -2100,6 +2254,81 @@ var registerFeedsCommand = (program) => {
2100
2254
  registerFeedsListCommand(feeds);
2101
2255
  };
2102
2256
 
2257
+ // src/commands/jit-properties-get.ts
2258
+ function toEnvelopeProjects(projects) {
2259
+ return (projects ?? []).map((p) => ({ Name: p.name, Reason: p.reason }));
2260
+ }
2261
+ function toEnvelopeReachable(result) {
2262
+ return {
2263
+ ReachableProjects: [...result.reachableProjects ?? []],
2264
+ ReachableReason: result.reachableReason ?? null
2265
+ };
2266
+ }
2267
+ var registerJitPropertiesGetCommand = (jitProperties) => {
2268
+ jitProperties.command("get").description("Assemble the just-in-time debug properties for a solution, for a caller that starts the job itself. Starts nothing.").argument("<solution-path>", "Path to a solution directory (containing .uipx)").option("--project-name <name>", "Name of the lead project — the one whose entry point the caller will run. Required only when the solution has more than one runnable project.").option("--entry-point <path>", "Entry point the lead will execute (for RPA, a workflow such as Main.xaml). Defaults to the project's own entry point.").option("--skip-ineligible-projects", "Leave the projects the just-in-time map cannot describe out of it, instead of packing and deploying the whole solution. A Run Job that calls a skipped project runs the process deployed under that name in the folder it targets, and fails when there is none. The lead project and the robot session are still checked.", false).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10).", (value) => Number.parseInt(value, 10), 10).trackedAction(processContext, async (solutionPath, options) => {
2269
+ const { resolveJitPropertiesAsync } = await import("./run-service-r52wgf69.js");
2270
+ const result = await resolveJitPropertiesAsync({
2271
+ solutionPath,
2272
+ projectName: options.projectName,
2273
+ entryPoint: options.entryPoint,
2274
+ tenant: options.tenant,
2275
+ loginValidity: options.loginValidity,
2276
+ skipIneligibleProjects: options.skipIneligibleProjects
2277
+ }, { fileSystem: getFileSystem(), logger }, processContext.pollSignal);
2278
+ if (result.status === "cancelled") {
2279
+ OutputFormatter.error({
2280
+ Result: RESULTS.Failure,
2281
+ Message: result.message,
2282
+ Instructions: "Run the command again to resolve the properties.",
2283
+ Retry: "RetryLater"
2284
+ });
2285
+ processContext.exit(130);
2286
+ return;
2287
+ }
2288
+ if (result.status === "failed") {
2289
+ OutputFormatter.error({
2290
+ Result: RESULTS.Failure,
2291
+ Message: result.message,
2292
+ Instructions: "Check that the solution path holds a .uipx file and that --project-name names a runnable project in that solution.",
2293
+ ErrorCode: "invalid_argument"
2294
+ });
2295
+ processContext.exit(1);
2296
+ return;
2297
+ }
2298
+ if (result.status === "notEligible") {
2299
+ OutputFormatter.success({
2300
+ Result: RESULTS.Success,
2301
+ Code: "SolutionJitProperties",
2302
+ Data: {
2303
+ Eligible: false,
2304
+ Reason: result.reason,
2305
+ SkippableProjects: toEnvelopeProjects(result.skippableProjects),
2306
+ ...toEnvelopeReachable(result)
2307
+ }
2308
+ });
2309
+ return;
2310
+ }
2311
+ OutputFormatter.success({
2312
+ Result: RESULTS.Success,
2313
+ Code: "SolutionJitProperties",
2314
+ Data: {
2315
+ Eligible: true,
2316
+ FpsProperties: result.fpsProperties,
2317
+ FolderId: result.folderId,
2318
+ MachineSessionIds: result.machineSessionIds,
2319
+ SkippedProjects: toEnvelopeProjects(result.skippedProjects),
2320
+ ...toEnvelopeReachable(result)
2321
+ }
2322
+ });
2323
+ });
2324
+ };
2325
+
2326
+ // src/commands/jit-properties.ts
2327
+ var registerJitPropertiesCommand = (program) => {
2328
+ const jitProperties = program.command("jit-properties", { hidden: true }).description("Just-in-time debug properties for a caller that starts a solution's debug job itself.");
2329
+ registerJitPropertiesGetCommand(jitProperties);
2330
+ };
2331
+
2103
2332
  // src/commands/new.ts
2104
2333
  var SOLUTION_INIT_STAGE_MESSAGES = {
2105
2334
  directory: "Failed to create solution directory",
@@ -2214,6 +2443,11 @@ var SOLUTION_PACK_EXAMPLES = [
2214
2443
  Command: "uip solution pack ./my-solution ./dist --version 1.2.0 --skip-analyze",
2215
2444
  Output: PACKED_1_2_0_OUTPUT
2216
2445
  },
2446
+ {
2447
+ Description: "Pack the coded apps' existing build output instead of running their install and build script, for a pipeline that already built them.",
2448
+ Command: "uip solution pack ./my-solution ./dist --version 1.2.0 --skip-build",
2449
+ Output: PACKED_1_2_0_OUTPUT
2450
+ },
2217
2451
  {
2218
2452
  Description: "Analyze the RPA projects against a local governance policy file instead of the analyzer rules shipped with the WorkflowCompiler.",
2219
2453
  Command: "uip solution pack ./my-solution ./dist --version 1.2.0 --governance-file-path ./governance-policy.json",
@@ -2235,13 +2469,13 @@ function parseIgnoredRules(value, previous = []) {
2235
2469
  return [...new Set([...previous, ...rules])];
2236
2470
  }
2237
2471
  var registerPackCommand = (program) => {
2238
- const command = program.command("pack").description("Pack a UiPath solution into a deployable .zip package. Accepts a solution directory (containing .uipx) or a .uis file. Output is used with 'solution publish' to upload to UiPath. Pass --project to pack one project into its own .nupkg instead. Pass --dry-run to check that the solution packs without producing a package.").argument("<solution-path>", "Path to a solution directory (containing .uipx) or a .uis file").argument("[output-path]", "Output directory where the packed solution will be saved. Required unless --dry-run is set.").option("-n, --name <name>", "Package name (default: solution folder name or .uis file name)").option("-v, --version <version>", "Package version (default: 1.0.0)", "1.0.0").addOption(new Option("--solution-type <type>", "What kind of solution this is. Omitted by default, which means a standard solution.").choices(["standard", "vertical"]).hideHelp()).option("--project <id-or-path>", "Pack only this project of the solution into its own .nupkg, instead of the solution .zip. It packs as a stand-alone project: no solution resources go into it. Takes the project's Id from the .uipx, or its path relative to the solution folder; a .uis file is not supported.").option("--package-id <id>", "Package id for the project packed with --project, instead of the id a whole-solution pack gives it (<solution>.<type>.<project folder>). Requires --project.").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--exclude-configured-sources", "Resolve project dependencies only from the tenant feeds and any --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds, so a dependency that is not on those feeds fails to restore.").option("--feed-folder <name>", "Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. Accepts a folder name or fully qualified path.").option("--signing-certificate-path <path>", "Path to .pfx certificate file used to sign each packed project .nupkg").option("--signing-certificate-password <password>", "Certificate password. Use env.ENV_NAME to read from an environment variable.").option("--signing-timestamp-server <url>", "Timestamp server URL").option("--skip-analyze", "Skip the workflow analyzer for every RPA project in the solution. Compilation and validation still run.").option("--ignored-rules <rules>", "Analyzer rule IDs whose findings are ignored for every RPA project, e.g. ST-USG-034,ST-MRD-002. Comma-separated; repeat the flag to add more. The rules still run, but their findings are not reported and do not fail the pack. Applies on top of --governance-file-path or the shipped rules; when the signed-in tenant publishes an AutomationOps policy, the list is not applied and a warning says so.", parseIgnoredRules).option("--governance-file-path <path>", "Analyze every RPA project against this local governance policy file, instead of the analyzer rules shipped with the WorkflowCompiler. When you are signed in as a user the tenant is asked first — about StudioWeb unless --governance-product names another product — and when the tenant publishes a policy of its own, that policy is used instead and this file is ignored with a warning.").option("--governance-product <product>", "Analyze every RPA project against the governance policy published in AutomationOps for the signed-in tenant. The value is the product whose policy is downloaded, e.g. StudioWeb, Development, Business. Signed in as an external application, the policy is not downloaded yet (AutomationOps does not accept external-application tokens): the pack uses --governance-file-path if given, otherwise the rules shipped with the WorkflowCompiler.").addOption(new Option("--automation-ops-profile <profile>").hideHelp());
2472
+ const command = program.command("pack").description("Pack a UiPath solution into a deployable .zip package. Accepts a solution directory (containing .uipx) or a .uis file. Output is used with 'solution publish' to upload to UiPath. Pass --project to pack one project into its own .nupkg instead. Pass --dry-run to check that the solution packs without producing a package.").argument("<solution-path>", "Path to a solution directory (containing .uipx) or a .uis file").argument("[output-path]", "Output directory where the packed solution will be saved. Required unless --dry-run is set.").option("-n, --name <name>", "Package name (default: solution folder name or .uis file name)").option("-v, --version <version>", "Package version (default: 1.0.0)", "1.0.0").addOption(new Option("--solution-type <type>", "What kind of solution this is. Omitted by default, which means a standard solution.").choices(["standard", "vertical"]).hideHelp()).option("--project <id-or-path>", "Pack only this project of the solution into its own .nupkg, instead of the solution .zip. It packs as a stand-alone project: no solution resources go into it. Takes the project's Id from the .uipx, or its path relative to the solution folder; a .uis file is not supported.").option("--package-id <id>", "Package id for the project packed with --project, instead of the id a whole-solution pack gives it (<solution>.<type>.<project folder>). Requires --project.").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--exclude-configured-sources", "Resolve project dependencies only from the tenant feeds and any --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds, so a dependency that is not on those feeds fails to restore.").option("--feed-folder <name>", "Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. Accepts a folder name or fully qualified path.").option("--signing-certificate-path <path>", "Path to .pfx certificate file used to sign each packed project .nupkg").option("--signing-certificate-password <password>", "Certificate password. Use env.ENV_NAME to read from an environment variable.").option("--signing-timestamp-server <url>", "Timestamp server URL").option("--skip-analyze", "Skip the workflow analyzer for every RPA project in the solution. Compilation and validation still run.").option("--skip-build", "Pack each coded app's existing build output instead of running its install and build script first. Use it when the pipeline already built the app, or cannot reach the package registry. A coded app with no build output then fails the pack.").option("--ignored-rules <rules>", "Analyzer rule IDs whose findings are ignored for every RPA project, e.g. ST-USG-034,ST-MRD-002. Comma-separated; repeat the flag to add more. The rules still run, but their findings are not reported and do not fail the pack. Applies on top of --governance-file-path or the shipped rules; when the signed-in tenant publishes an AutomationOps policy, the list is not applied and a warning says so.", parseIgnoredRules).option("--governance-file-path <path>", "Analyze every RPA project against this local governance policy file, instead of the analyzer rules shipped with the WorkflowCompiler. When you are signed in as a user the tenant is asked first — about StudioWeb unless --governance-product names another product — and when the tenant publishes a policy of its own, that policy is used instead and this file is ignored with a warning.").option("--governance-product <product>", "Analyze every RPA project against the governance policy published in AutomationOps for the signed-in tenant. The value is the product whose policy is downloaded, e.g. StudioWeb, Development, Business. Signed in as an external application, the policy is not downloaded yet (AutomationOps does not accept external-application tokens): the pack uses --governance-file-path if given, otherwise the rules shipped with the WorkflowCompiler.").addOption(new Option("--automation-ops-profile <profile>").hideHelp());
2239
2473
  registerPackageMetadataOptions(command).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("--dry-run", "Run the full pack pipeline against a temporary directory and discard the output. Catches pack-time failures; does not inspect the produced package contents.").examples(SOLUTION_PACK_EXAMPLES).trackedAction(processContext, async (solutionPath, outputPath, options, command) => {
2240
2474
  const {
2241
2475
  GOVERNANCE_OPTION_INSTRUCTIONS,
2242
2476
  validateGovernanceOptions
2243
- } = await import("./governance-options-40m81z8h.js");
2244
- const { PackCommandService } = await import("./pack-command-service-jzbch4eb.js");
2477
+ } = await import("./governance-options-ft8bqz4p.js");
2478
+ const { PackCommandService } = await import("./pack-command-service-42p3t8xa.js");
2245
2479
  if (!options.dryRun && outputPath === undefined) {
2246
2480
  OutputFormatter.error({
2247
2481
  Result: RESULTS.Failure,
@@ -2310,6 +2544,7 @@ var registerPackCommand = (program) => {
2310
2544
  signingCertificatePassword: resolveEnvReference(options.signingCertificatePassword),
2311
2545
  signingTimestampServer: options.signingTimestampServer,
2312
2546
  skipAnalyze: options.skipAnalyze,
2547
+ skipBuild: options.skipBuild,
2313
2548
  ignoredRules: options.ignoredRules,
2314
2549
  governanceFilePath: options.governanceFilePath,
2315
2550
  governanceProduct: product.value,
@@ -2378,7 +2613,7 @@ var registerPackagesDeleteCommand = (program) => {
2378
2613
  return;
2379
2614
  }
2380
2615
  if (scope.kind !== "tenant" && scope.folderKey) {
2381
- const { feedSessionRefusalAsync } = await import("./feed-session-ytew8k2j.js");
2616
+ const { feedSessionRefusalAsync } = await import("./feed-session-z8t87r5w.js");
2382
2617
  const refusal = await feedSessionRefusalAsync(auth, scope.folderKey, "write", `Deleting a package version from the feed '${scope.name ?? scope.folderKey}'`, "drop the feed flag to delete from the tenant feed", "packages");
2383
2618
  if (refusal) {
2384
2619
  OutputFormatter.error({
@@ -2426,6 +2661,7 @@ var SOLUTION_PACKAGES_DOWNLOAD_EXAMPLES = [
2426
2661
  PackageName: "my-solution",
2427
2662
  PackageVersion: "1.0.0",
2428
2663
  State: "Ready",
2664
+ SolutionId: "a1b2c3d4-0000-0000-0000-000000000001",
2429
2665
  OutputPath: "./my-solution.1.0.0.zip",
2430
2666
  FileName: "./my-solution.1.0.0.zip",
2431
2667
  Size: 254318
@@ -2442,6 +2678,7 @@ var SOLUTION_PACKAGES_DOWNLOAD_EXAMPLES = [
2442
2678
  PackageName: "my-solution",
2443
2679
  PackageVersion: "1.0.0",
2444
2680
  State: "Active",
2681
+ SolutionId: "a1b2c3d4-0000-0000-0000-000000000001",
2445
2682
  OutputPath: "./out/my-solution.zip",
2446
2683
  FileName: "./out/my-solution.zip",
2447
2684
  Size: 254318
@@ -2458,6 +2695,7 @@ var SOLUTION_PACKAGES_DOWNLOAD_EXAMPLES = [
2458
2695
  PackageName: "my-solution",
2459
2696
  PackageVersion: "1.0.0",
2460
2697
  State: "Ready",
2698
+ SolutionId: "a1b2c3d4-0000-0000-0000-000000000001",
2461
2699
  OutputPath: "./out/my-solution.1.0.0.zip",
2462
2700
  FileName: "./out/my-solution.1.0.0.zip",
2463
2701
  Size: 254318
@@ -2545,7 +2783,7 @@ var registerPackagesDownloadCommand = (program) => {
2545
2783
  const outputArg = options.destination ?? ".";
2546
2784
  const defaultName = `${packageInfo.packageName}.${packageInfo.packageVersion}.zip`;
2547
2785
  const outputPath = await resolveOutputPath(fs, outputArg, defaultName);
2548
- const [fileError, size] = await catchError(downloadFile(fs, blobAccess.uri, outputPath));
2786
+ const [fileError, content] = await catchError(downloadFile(fs, blobAccess.uri, outputPath));
2549
2787
  if (fileError) {
2550
2788
  OutputFormatter.error({
2551
2789
  Result: RESULTS.Failure,
@@ -2555,6 +2793,7 @@ var registerPackagesDownloadCommand = (program) => {
2555
2793
  processContext.exit(1);
2556
2794
  return;
2557
2795
  }
2796
+ const solutionId = readPackedSolutionId(content);
2558
2797
  OutputFormatter.success({
2559
2798
  Result: RESULTS.Success,
2560
2799
  Code: "SolutionPackagesDownload",
@@ -2563,9 +2802,10 @@ var registerPackagesDownloadCommand = (program) => {
2563
2802
  PackageName: packageInfo.packageName,
2564
2803
  PackageVersion: packageInfo.packageVersion,
2565
2804
  State: packageInfo.state,
2805
+ ...solutionId ? { SolutionId: solutionId } : {},
2566
2806
  OutputPath: outputPath,
2567
2807
  FileName: outputPath,
2568
- Size: size
2808
+ Size: content.byteLength
2569
2809
  }
2570
2810
  });
2571
2811
  });
@@ -2583,7 +2823,7 @@ async function downloadFile(fs, uri, outputPath) {
2583
2823
  if (writeError) {
2584
2824
  throw new Error(`Could not write to '${outputPath}': ${writeError.message}`);
2585
2825
  }
2586
- return content.byteLength;
2826
+ return content;
2587
2827
  }
2588
2828
  async function resolveOutputPath(fs, outputArg, defaultName) {
2589
2829
  const trimmed = outputArg.replace(/[\\/]+$/, "");
@@ -2686,7 +2926,7 @@ var PROJECT_ADD_EXAMPLES = [
2686
2926
  }
2687
2927
  ];
2688
2928
  async function hasProjectInSolution(fs, solutionDir, projectDir, projects) {
2689
- const { toPortableRelativePath } = await import("./index-2bn3jzn9.js");
2929
+ const { toPortableRelativePath } = await import("./index-nbs04tqr.js");
2690
2930
  const projectDirReal = await canonicalizePath(fs, projectDir);
2691
2931
  for (const project of projects ?? []) {
2692
2932
  const candidateDir = fs.path.resolve(solutionDir, fs.path.dirname(toPortableRelativePath(project.ProjectRelativePath)));
@@ -2713,8 +2953,8 @@ var registerProjectAddCommand = (project) => {
2713
2953
  restoreSolutionFile,
2714
2954
  syncResourcesFromBindings,
2715
2955
  writeSolutionFile
2716
- } = await import("./index-yjvmjpdn.js");
2717
- const { toPortableRelativePath } = await import("./index-2bn3jzn9.js");
2956
+ } = await import("./index-j3tpb2cr.js");
2957
+ const { toPortableRelativePath } = await import("./index-nbs04tqr.js");
2718
2958
  const {
2719
2959
  hostGeneratesResources,
2720
2960
  projectManifestInstructions,
@@ -2722,7 +2962,7 @@ var registerProjectAddCommand = (project) => {
2722
2962
  resolveProjectManifestDirectory,
2723
2963
  resourcesPendingForProjectType,
2724
2964
  resourcesPendingWarning
2725
- } = await import("./project-command-utils-82tja3k0.js");
2965
+ } = await import("./project-command-utils-yxrgwzf9.js");
2726
2966
  const capture = getProjectTelemetryCapture(command);
2727
2967
  const fs = getFileSystem();
2728
2968
  const resolvedProjectPath = await resolveProjectManifestDirectory(fs, fs.path.resolve(fs.env.cwd(), projectPath));
@@ -2880,6 +3120,10 @@ var PROJECT_IMPORT_EXAMPLES = [
2880
3120
  }
2881
3121
  }
2882
3122
  ];
3123
+ function failureClass(error) {
3124
+ const { errorCode, retry } = classifyThrownError(error);
3125
+ return { ErrorCode: errorCode, Retry: retry };
3126
+ }
2883
3127
  var registerProjectImportCommand = (project) => {
2884
3128
  const command = project.command("import").description("Copy an external project folder into the solution directory and register it in the .uipx manifest. Unlike 'projects add' which references an existing subfolder, import copies the source files into the solution tree.").argument("<source>", "Path to the project folder to import (must contain project.uiproj, project.json, or uipath.json)").option("--solution-file <path>", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the current directory)").examples(PROJECT_IMPORT_EXAMPLES).trackedAction(processContext, async (sourcePath, options, command) => {
2885
3129
  const {
@@ -2891,15 +3135,15 @@ var registerProjectImportCommand = (project) => {
2891
3135
  resolveSolutionFilePath,
2892
3136
  syncResourcesFromBindings,
2893
3137
  writeSolutionFile
2894
- } = await import("./index-yjvmjpdn.js");
2895
- const { toPortableRelativePath } = await import("./index-2bn3jzn9.js");
3138
+ } = await import("./index-j3tpb2cr.js");
3139
+ const { toPortableRelativePath } = await import("./index-nbs04tqr.js");
2896
3140
  const {
2897
3141
  hostGeneratesResources,
2898
- projectManifestInstructions,
3142
+ projectManifestGuidance,
2899
3143
  rejectUnsupportedProjectType,
2900
3144
  resourcesPendingForProjectType,
2901
3145
  resourcesPendingWarning
2902
- } = await import("./project-command-utils-82tja3k0.js");
3146
+ } = await import("./project-command-utils-yxrgwzf9.js");
2903
3147
  const capture = getProjectTelemetryCapture(command);
2904
3148
  const { solutionFile } = options;
2905
3149
  const fs = getFileSystem();
@@ -2909,8 +3153,9 @@ var registerProjectImportCommand = (project) => {
2909
3153
  if (statError) {
2910
3154
  OutputFormatter.error({
2911
3155
  Result: RESULTS.Failure,
2912
- Message: "Failed to import project into solution",
2913
- Instructions: statError.message
3156
+ ...failureClass(statError),
3157
+ Message: `Cannot read source project folder: ${statError.message}`,
3158
+ Instructions: "Check the source path and its permissions, then run the import again."
2914
3159
  });
2915
3160
  processContext.exit(1);
2916
3161
  return;
@@ -2918,8 +3163,9 @@ var registerProjectImportCommand = (project) => {
2918
3163
  if (!sourceStats) {
2919
3164
  OutputFormatter.error({
2920
3165
  Result: RESULTS.Failure,
2921
- Message: "Failed to import project into solution",
2922
- Instructions: `Source project folder not found: ${resolvedSourcePath}`
3166
+ ErrorCode: "not_found",
3167
+ Message: `Source project folder not found: ${resolvedSourcePath}`,
3168
+ Instructions: "Pass the path to an existing project folder (one that holds project.uiproj, project.json or uipath.json)."
2923
3169
  });
2924
3170
  processContext.exit(1);
2925
3171
  return;
@@ -2927,8 +3173,9 @@ var registerProjectImportCommand = (project) => {
2927
3173
  if (!sourceStats.isDirectory()) {
2928
3174
  OutputFormatter.error({
2929
3175
  Result: RESULTS.Failure,
2930
- Message: "Failed to import project into solution",
2931
- Instructions: `Source path is not a directory: ${resolvedSourcePath}`
3176
+ ErrorCode: "invalid_argument",
3177
+ Message: `Source path is not a directory: ${resolvedSourcePath}`,
3178
+ Instructions: "Pass the project folder itself, not a file inside it."
2932
3179
  });
2933
3180
  processContext.exit(1);
2934
3181
  return;
@@ -2937,8 +3184,9 @@ var registerProjectImportCommand = (project) => {
2937
3184
  if (projectFileError) {
2938
3185
  OutputFormatter.error({
2939
3186
  Result: RESULTS.Failure,
2940
- Message: "Failed to import project into solution",
2941
- Instructions: projectFileError.message
3187
+ ErrorCode: "invalid_argument",
3188
+ Message: projectFileError.message,
3189
+ Instructions: "Pass a folder that holds a project manifest, or create the project first."
2942
3190
  });
2943
3191
  processContext.exit(1);
2944
3192
  return;
@@ -2947,22 +3195,23 @@ var registerProjectImportCommand = (project) => {
2947
3195
  if (readProjectError) {
2948
3196
  OutputFormatter.error({
2949
3197
  Result: RESULTS.Failure,
2950
- Message: "Failed to import project into solution",
2951
- ...isProjectManifestError(readProjectError) ? { ErrorCode: "invalid_argument" } : {},
2952
- Instructions: projectManifestInstructions(projectFileInfo.fileName, readProjectError, "import")
3198
+ Message: readProjectError.message,
3199
+ ...isProjectManifestError(readProjectError) ? { ErrorCode: "invalid_argument" } : failureClass(readProjectError),
3200
+ Instructions: projectManifestGuidance(projectFileInfo.fileName, readProjectError, "import") ?? `Fix ${projectFileInfo.fileName} in the source project, then run the import again.`
2953
3201
  });
2954
3202
  processContext.exit(1);
2955
3203
  return;
2956
3204
  }
2957
- if (rejectUnsupportedProjectType(parsedProject.projectType, "Failed to import project into solution")) {
3205
+ if (rejectUnsupportedProjectType(parsedProject.projectType, `Project type '${parsedProject.projectType}' cannot be imported into a solution`)) {
2958
3206
  return;
2959
3207
  }
2960
3208
  const [solutionFileError, resolvedSolutionFile] = await resolveSolutionFilePath(solutionFile, cwd);
2961
3209
  if (solutionFileError) {
2962
3210
  OutputFormatter.error({
2963
3211
  Result: RESULTS.Failure,
2964
- Message: "Failed to import project into solution",
2965
- Instructions: solutionFileError.message
3212
+ ...failureClass(solutionFileError),
3213
+ Message: solutionFileError.message,
3214
+ Instructions: "Pass the solution file with --solution-file, or run the command from inside the solution folder."
2966
3215
  });
2967
3216
  processContext.exit(1);
2968
3217
  return;
@@ -2975,8 +3224,9 @@ var registerProjectImportCommand = (project) => {
2975
3224
  if (targetAlreadyExists) {
2976
3225
  OutputFormatter.error({
2977
3226
  Result: RESULTS.Failure,
2978
- Message: "Failed to import project into solution",
2979
- Instructions: `Project already exists at destination: ${targetProjectPath}`
3227
+ ErrorCode: "invalid_argument",
3228
+ Message: `Project already exists at destination: ${targetProjectPath}`,
3229
+ Instructions: "Rename the source folder, or remove the folder at the destination, then run the import again."
2980
3230
  });
2981
3231
  processContext.exit(1);
2982
3232
  return;
@@ -2985,8 +3235,9 @@ var registerProjectImportCommand = (project) => {
2985
3235
  if (readSolutionError) {
2986
3236
  OutputFormatter.error({
2987
3237
  Result: RESULTS.Failure,
2988
- Message: "Failed to import project into solution",
2989
- Instructions: readSolutionError.message
3238
+ ...failureClass(readSolutionError),
3239
+ Message: `Cannot read solution file: ${readSolutionError.message}`,
3240
+ Instructions: "Fix or restore the .uipx solution file, then run the import again."
2990
3241
  });
2991
3242
  processContext.exit(1);
2992
3243
  return;
@@ -2997,8 +3248,9 @@ var registerProjectImportCommand = (project) => {
2997
3248
  if (alreadyExists) {
2998
3249
  OutputFormatter.error({
2999
3250
  Result: RESULTS.Failure,
3000
- Message: "Failed to import project into solution",
3001
- Instructions: `Project already exists in solution manifest: ${projectRelativePath}`
3251
+ ErrorCode: "invalid_argument",
3252
+ Message: `Project already exists in solution manifest: ${projectRelativePath}`,
3253
+ Instructions: `The solution lists this project but its folder is missing. Restore the folder, or drop the entry by running 'uip solution projects remove ${projectRelativePath}' from the solution folder, then run the import again.`
3002
3254
  });
3003
3255
  processContext.exit(1);
3004
3256
  return;
@@ -3008,8 +3260,9 @@ var registerProjectImportCommand = (project) => {
3008
3260
  await catchError(fs.rm(targetProjectPath));
3009
3261
  OutputFormatter.error({
3010
3262
  Result: RESULTS.Failure,
3011
- Message: "Failed to import project into solution",
3012
- Instructions: `Failed to copy project: ${copyError.message}`
3263
+ ...failureClass(copyError),
3264
+ Message: `Failed to copy project: ${copyError.message}`,
3265
+ Instructions: "Check that the solution folder is writable, then run the import again."
3013
3266
  });
3014
3267
  processContext.exit(1);
3015
3268
  return;
@@ -3030,8 +3283,9 @@ var registerProjectImportCommand = (project) => {
3030
3283
  await catchError(fs.rm(targetProjectPath));
3031
3284
  OutputFormatter.error({
3032
3285
  Result: RESULTS.Failure,
3033
- Message: "Failed to import project into solution",
3034
- Instructions: writeError.message
3286
+ ...failureClass(writeError),
3287
+ Message: `Cannot write solution file: ${writeError.message}`,
3288
+ Instructions: "Check that the .uipx solution file is writable, then run the import again."
3035
3289
  });
3036
3290
  processContext.exit(1);
3037
3291
  return;
@@ -3046,8 +3300,9 @@ var registerProjectImportCommand = (project) => {
3046
3300
  await rollback();
3047
3301
  OutputFormatter.error({
3048
3302
  Result: RESULTS.Failure,
3049
- Message: "Failed to import project into solution",
3050
- Instructions: createError.message
3303
+ ...failureClass(createError),
3304
+ Message: `Failed to create the project's solution resources: ${createError.message}`,
3305
+ Instructions: "The import was rolled back. Fix the cause above, then run the import again."
3051
3306
  });
3052
3307
  processContext.exit(1);
3053
3308
  return;
@@ -3089,7 +3344,7 @@ function fallbackProjectName(fs, solutionDir, projectRelativePath) {
3089
3344
  return projectDir && projectDir !== "." ? fs.path.basename(projectDir) : fs.path.basename(solutionDir);
3090
3345
  }
3091
3346
  async function createPackageIdReaderAsync(fs, solutionDir, solutionName) {
3092
- const { readMemberPackageIdAsync } = await import("./package-id-56k44s7y.js");
3347
+ const { readMemberPackageIdAsync } = await import("./package-id-2dgfbh5h.js");
3093
3348
  return async (project) => {
3094
3349
  const [error, packageId] = await catchError(readMemberPackageIdAsync(fs, project, solutionDir, solutionName));
3095
3350
  return error ? undefined : packageId ?? undefined;
@@ -3116,7 +3371,7 @@ var PROJECT_LIST_EXAMPLES = [
3116
3371
  ];
3117
3372
  var registerProjectListCommand = (project) => {
3118
3373
  project.command("list").description("List the projects registered in the local .uipx solution manifest, each with the package id a solution pack gives it. " + "Reads only on-disk metadata — does not call any backend.").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").examples(PROJECT_LIST_EXAMPLES).trackedAction(processContext, async (options, command) => {
3119
- const { readSolutionFile, resolveSolutionFilePath } = await import("./index-yjvmjpdn.js");
3374
+ const { readSolutionFile, resolveSolutionFilePath } = await import("./index-j3tpb2cr.js");
3120
3375
  const capture = getProjectTelemetryCapture(command);
3121
3376
  const fs = getFileSystem();
3122
3377
  const solutionPath = options.solutionFolder ?? ".";
@@ -3332,9 +3587,9 @@ var registerProjectRemoveCommand = (project) => {
3332
3587
  resolveSolutionFilePath,
3333
3588
  restoreSolutionFile,
3334
3589
  writeSolutionFile
3335
- } = await import("./index-yjvmjpdn.js");
3336
- const { toPortableRelativePath } = await import("./index-2bn3jzn9.js");
3337
- const { resolveSolutionSearchStart } = await import("./project-command-utils-82tja3k0.js");
3590
+ } = await import("./index-j3tpb2cr.js");
3591
+ const { toPortableRelativePath } = await import("./index-nbs04tqr.js");
3592
+ const { resolveSolutionSearchStart } = await import("./project-command-utils-yxrgwzf9.js");
3338
3593
  const capture = getProjectTelemetryCapture(command);
3339
3594
  const fs = getFileSystem();
3340
3595
  const resolvedProjectPath = fs.path.resolve(fs.env.cwd(), projectPath);
@@ -3740,6 +3995,12 @@ var PUBLISH_INSTRUCTIONS = {
3740
3995
  var EXIT_CODES_BY_REASON = {
3741
3996
  poll_timeout: 2
3742
3997
  };
3998
+ var ERROR_CODES_BY_REASON = {
3999
+ file_not_found: "not_found",
4000
+ not_a_zip: "invalid_argument",
4001
+ not_packed: "invalid_argument",
4002
+ project_package: "invalid_argument"
4003
+ };
3743
4004
  var registerPublishCommand = (program) => {
3744
4005
  const command = program.command("publish").description("Publish a solution package (.zip) to the UiPath solution feed. The .zip must be produced by 'solution pack'. By default the package lands in the tenant feed; use --personal-workspace to target the current user's Personal Workspace feed. After publishing, use 'solution deploy run' to deploy it.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).argument("<package-path>", "Path to a .zip package file produced by 'solution pack'.").option("--personal-workspace", "Upload the package into the current user's Personal Workspace feed instead of the tenant feed. Resolves the workspace folder key from Orchestrator automatically.").option("--package-name <name>", "Publish under this package name instead of the one the .zip was packed with. Rewrites the archive's solutionMetadata.json in memory (with a fresh package version key); the file on disk is left untouched. The bundled project packages keep their own names and versions.").option("--package-version <version>", "Publish under this package version instead of the one the .zip was packed with. Use it to clear a 'version already exists' rejection when you have the packed .zip but not the solution source. Same in-memory rewrite as --package-name.").option("--wait", "Wait until the published package is Ready or Active").option("--timeout <seconds>", "Timeout in seconds for package state polling (default: 360)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between package state polls (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10);
3745
4006
  command.addOption(new Option("--feed <name-or-key>", "Publish into a feed by its name or folder key (from 'solution feeds list') instead of the tenant feed. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace"));
@@ -3771,11 +4032,12 @@ var registerPublishCommand = (program) => {
3771
4032
  if (result.reason === "upload_rejected" && result.errorCode) {
3772
4033
  instructions = `${UPLOAD_REJECTED_INSTRUCTIONS} (service errorCode: ${result.errorCode})`;
3773
4034
  }
4035
+ const errorCode = result.cliErrorCode ?? ERROR_CODES_BY_REASON[result.reason];
3774
4036
  OutputFormatter.error({
3775
4037
  Result: RESULTS.Failure,
3776
4038
  Message: result.message,
3777
4039
  Instructions: instructions || result.message,
3778
- ...result.cliErrorCode ? { ErrorCode: result.cliErrorCode } : {},
4040
+ ...errorCode ? { ErrorCode: errorCode } : {},
3779
4041
  ...result.retry ? { Retry: result.retry } : {},
3780
4042
  ...result.context ? { Context: result.context } : {}
3781
4043
  });
@@ -3809,6 +4071,19 @@ var registerPublishCommand = (program) => {
3809
4071
  };
3810
4072
 
3811
4073
  // src/commands/resource-add.ts
4074
+ var REMOTE_QUEUE_ADDED = {
4075
+ Code: "ResourceAdded",
4076
+ Data: {
4077
+ Key: "21a07d4e-...",
4078
+ Kind: "queue",
4079
+ Type: null,
4080
+ Name: "InvoiceQueue",
4081
+ Folder: "solution_folder",
4082
+ FolderKey: "5c2d61f4-...",
4083
+ Source: "remote",
4084
+ Status: "Added"
4085
+ }
4086
+ };
3812
4087
  var RESOURCE_ADD_EXAMPLES = [
3813
4088
  {
3814
4089
  Description: "Create a local virtual stub (no remote lookup)",
@@ -3830,30 +4105,23 @@ var RESOURCE_ADD_EXAMPLES = [
3830
4105
  {
3831
4106
  Description: "Import an existing remote queue, disambiguated by folder path",
3832
4107
  Command: "uip solution resources add --source remote --kind Queue --name InvoiceQueue --folder-path Sales/CRM",
3833
- Output: {
3834
- Code: "ResourceAdded",
3835
- Data: {
3836
- Key: "21a07d4e-...",
3837
- Kind: "queue",
3838
- Type: null,
3839
- Name: "InvoiceQueue",
3840
- Folder: "solution_folder",
3841
- FolderKey: "5c2d61f4-...",
3842
- Source: "remote",
3843
- Status: "Added"
3844
- }
3845
- }
4108
+ Output: REMOTE_QUEUE_ADDED
4109
+ },
4110
+ {
4111
+ Description: "Import an exact remote resource by its key (the name comes from the resource)",
4112
+ Command: "uip solution resources add --source remote --kind Queue --cloud-key 21a07d4e-0000-4000-8000-000000000000",
4113
+ Output: REMOTE_QUEUE_ADDED
3846
4114
  }
3847
4115
  ];
3848
4116
  var registerResourceAddCommand = (resource) => {
3849
- resource.command("add").description("Add a resource to the solution. Use --source local to create a virtual stub, " + "or --source remote to import an existing Orchestrator resource. Idempotent: " + "if a resource with the same (kind, name, folder) already exists, it is returned unchanged.").option("--source <source>", "Resource source: local (virtual stub) or remote (import from Orchestrator)").option("--kind <kind>", "Resource kind (e.g. Queue, Asset, Bucket, Process, Connection, App, Index, Trigger, Entity, ChoiceSet). Case-insensitive, matched against SDK metadata.").option("--name <name>", "Resource name").option("--type <type>", "Resource subtype, case-insensitive (e.g. Text/Integer/Bool/Credential/Secret or stringAsset/credentialAsset for Asset, connector type for Connection). Rejected when the kind does not declare it or has no subtypes (Queue); with --source remote it must match the resource's type and narrows same-name matches.").option("--folder-path <path>", "Orchestrator folder path for remote lookup. Required to disambiguate when more than one remote match exists. Not valid with --source local.").option("--cloud-key <guid>", "Skip remote search and import this exact resource key. Only valid with --source remote.").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(RESOURCE_ADD_EXAMPLES).trackedAction(processContext, async (options) => {
4117
+ resource.command("add").description("Add a resource to the solution. Use --source local to create a virtual stub, " + "or --source remote to import an existing Orchestrator resource. Idempotent: " + "if a resource with the same (kind, name, folder) already exists, it is returned unchanged.").option("--source <source>", "Resource source: local (virtual stub) or remote (import from Orchestrator)").option("--kind <kind>", "Resource kind (e.g. Queue, Asset, Bucket, Process, Connection, App, Index, Trigger, Entity, ChoiceSet). Case-insensitive, matched against SDK metadata.").option("--name <name>", "Resource name. Optional with --cloud-key, which takes the name from the remote resource; if given there, it must match that name.").option("--type <type>", "Resource subtype, case-insensitive (e.g. Text/Integer/Bool/Credential/Secret or stringAsset/credentialAsset for Asset, connector type for Connection). Rejected when the kind does not declare it or has no subtypes (Queue); with --source remote it must match the resource's type and narrows same-name matches.").option("--folder-path <path>", "Orchestrator folder path for remote lookup. Required to disambiguate when more than one remote match exists. Not valid with --source local.").option("--cloud-key <guid>", "Skip remote search and import this exact resource key. Only valid with --source remote.").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(RESOURCE_ADD_EXAMPLES).trackedAction(processContext, async (options) => {
3850
4118
  const {
3851
4119
  assertSolutionManifest,
3852
4120
  createResourceBuilderServices,
3853
4121
  normalizeResourceFileCasing,
3854
4122
  saveCasingNormalized
3855
- } = await import("./index-yjvmjpdn.js");
3856
- const { getSolutionAuthContext } = await import("./solution-auth-jxcgd2m0.js");
4123
+ } = await import("./index-j3tpb2cr.js");
4124
+ const { getSolutionAuthContext } = await import("./solution-auth-0e3qm74f.js");
3857
4125
  const validation = await validateOptions(options);
3858
4126
  if (!validation.ok) {
3859
4127
  OutputFormatter.error({
@@ -3864,7 +4132,7 @@ var registerResourceAddCommand = (resource) => {
3864
4132
  processContext.exit(1);
3865
4133
  return;
3866
4134
  }
3867
- const { source, kind, name, type, folderPath, cloudKey } = validation.value;
4135
+ const input = validation.value;
3868
4136
  const fs = getFileSystem();
3869
4137
  const resolvedPath = fs.path.resolve(fs.env.cwd(), options.solutionFolder ?? ".");
3870
4138
  if (!await fs.exists(resolvedPath)) {
@@ -3886,7 +4154,7 @@ var registerResourceAddCommand = (resource) => {
3886
4154
  processContext.exit(1);
3887
4155
  return;
3888
4156
  }
3889
- if (source === "remote") {
4157
+ if (input.source === "remote") {
3890
4158
  const [authError] = await catchError(getSolutionAuthContext({
3891
4159
  loginValidity: options.loginValidity
3892
4160
  }));
@@ -3923,14 +4191,7 @@ var registerResourceAddCommand = (resource) => {
3923
4191
  }
3924
4192
  let addSucceeded = false;
3925
4193
  try {
3926
- const [addError, outcome] = await catchError(runAdd(builder, services, {
3927
- source,
3928
- kind,
3929
- name,
3930
- type,
3931
- folderPath,
3932
- cloudKey
3933
- }));
4194
+ const [addError, outcome] = await catchError(runAdd(builder, services, input));
3934
4195
  if (addError) {
3935
4196
  OutputFormatter.error({
3936
4197
  Result: RESULTS.Failure,
@@ -3983,7 +4244,7 @@ function canonicalizeKind(kind) {
3983
4244
  }
3984
4245
  var GUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
3985
4246
  async function validateOptions(options) {
3986
- const { validateResourceName } = await import("./index-yjvmjpdn.js");
4247
+ const { validateResourceName } = await import("./index-j3tpb2cr.js");
3987
4248
  if (!options.source) {
3988
4249
  return {
3989
4250
  ok: false,
@@ -4006,58 +4267,63 @@ async function validateOptions(options) {
4006
4267
  instructions: "Pass --kind (e.g. Queue, Asset, Bucket, Process, Connection, App, Index, Trigger, Entity, ChoiceSet)"
4007
4268
  };
4008
4269
  }
4009
- if (!options.name) {
4270
+ const { name, cloudKey } = options;
4271
+ if (cloudKey !== undefined && source !== "remote") {
4010
4272
  return {
4011
4273
  ok: false,
4012
- message: "Missing required option --name",
4013
- instructions: "Pass --name <resource-name>"
4274
+ message: "--cloud-key is only valid with --source remote",
4275
+ instructions: "Drop --cloud-key, or change --source local to --source remote"
4014
4276
  };
4015
4277
  }
4016
- const nameCheck = validateResourceName(options.name);
4017
- if (!nameCheck.ok) {
4278
+ if (cloudKey !== undefined && !GUID_REGEX.test(cloudKey)) {
4018
4279
  return {
4019
4280
  ok: false,
4020
- message: nameCheck.message,
4021
- instructions: nameCheck.instructions
4281
+ message: "--cloud-key must be a GUID",
4282
+ instructions: "Use 'uip solution resources list --source remote' to find the resource's Key, then pass it verbatim."
4022
4283
  };
4023
4284
  }
4024
- if (options.cloudKey && source !== "remote") {
4285
+ if (source === "local" && options.folderPath) {
4025
4286
  return {
4026
4287
  ok: false,
4027
- message: "--cloud-key is only valid with --source remote",
4028
- instructions: "Drop --cloud-key, or change --source local to --source remote"
4288
+ message: "--folder-path is not valid with --source local",
4289
+ instructions: "Virtual stubs live under the solution folder and aren't bound to a remote folder. Drop --folder-path, or use --source remote."
4029
4290
  };
4030
4291
  }
4031
- if (options.cloudKey && !GUID_REGEX.test(options.cloudKey)) {
4292
+ const common = {
4293
+ kind: canonicalizeKind(options.kind),
4294
+ type: options.type,
4295
+ folderPath: options.folderPath
4296
+ };
4297
+ if (name === undefined) {
4298
+ if (cloudKey !== undefined) {
4299
+ return {
4300
+ ok: true,
4301
+ value: { ...common, source: "remote", cloudKey }
4302
+ };
4303
+ }
4032
4304
  return {
4033
4305
  ok: false,
4034
- message: "--cloud-key must be a GUID",
4035
- instructions: "Use 'uip solution resources list --source remote' to find the resource's Key, then pass it verbatim."
4306
+ message: "Missing required option --name",
4307
+ instructions: source === "remote" ? "Pass --name <resource-name>, or --cloud-key <guid> to import that exact resource" : "Pass --name <resource-name>"
4036
4308
  };
4037
4309
  }
4038
- if (source === "local" && options.folderPath) {
4310
+ const nameCheck = validateResourceName(name);
4311
+ if (!nameCheck.ok) {
4039
4312
  return {
4040
4313
  ok: false,
4041
- message: "--folder-path is not valid with --source local",
4042
- instructions: "Virtual stubs live under the solution folder and aren't bound to a remote folder. Drop --folder-path, or use --source remote."
4314
+ message: nameCheck.message,
4315
+ instructions: nameCheck.instructions
4043
4316
  };
4044
4317
  }
4045
4318
  return {
4046
4319
  ok: true,
4047
- value: {
4048
- source,
4049
- kind: canonicalizeKind(options.kind),
4050
- name: options.name,
4051
- type: options.type,
4052
- folderPath: options.folderPath,
4053
- cloudKey: options.cloudKey
4054
- }
4320
+ value: cloudKey !== undefined ? { ...common, source: "remote", name, cloudKey } : { ...common, source, name }
4055
4321
  };
4056
4322
  }
4057
4323
  async function resolveTypeInput(services, kind, type) {
4058
4324
  if (type === undefined)
4059
4325
  return { ok: true, type };
4060
- const { formatResourceSubtypes, resolveResourceKindMetadata } = await import("./resource-mutations-h6wfdqr4.js");
4326
+ const { formatResourceSubtypes, resolveResourceKindMetadata } = await import("./resource-mutations-dn4f8xr1.js");
4061
4327
  const metadata = await resolveResourceKindMetadata(services, kind, type);
4062
4328
  if (metadata?.typeMatched) {
4063
4329
  return { ok: true, type: metadata.type ?? type };
@@ -4087,13 +4353,13 @@ function formatCandidates(matches) {
4087
4353
  `);
4088
4354
  }
4089
4355
  async function runAdd(builder, services, rawInput) {
4090
- const { findMatchingLocalResource } = await import("./index-yjvmjpdn.js");
4356
+ const { findMatchingLocalResource } = await import("./index-j3tpb2cr.js");
4091
4357
  const {
4092
4358
  createLocalResource,
4093
4359
  findResourceByKeyInRcs,
4094
4360
  sameResourceSubtype,
4095
4361
  searchRcsResources
4096
- } = await import("./resource-mutations-h6wfdqr4.js");
4362
+ } = await import("./resource-mutations-dn4f8xr1.js");
4097
4363
  const typeResolution = await resolveTypeInput(services, rawInput.kind, rawInput.type);
4098
4364
  if (!typeResolution.ok)
4099
4365
  return typeResolution.outcome;
@@ -4143,10 +4409,12 @@ async function runAdd(builder, services, rawInput) {
4143
4409
  data: toResourceAddData(created.resource, refreshed.folders, "local", "Added")
4144
4410
  };
4145
4411
  }
4146
- let cloudKey = input.cloudKey?.toLowerCase();
4412
+ let cloudKey;
4413
+ let resolvedName;
4147
4414
  let matchFolder;
4148
4415
  let resolvedType = input.type;
4149
- if (!cloudKey) {
4416
+ if (input.cloudKey === undefined) {
4417
+ resolvedName = input.name;
4150
4418
  const [searchError, matches] = await catchError(searchRcsResources(builder, input.kind, input.name));
4151
4419
  if (searchError) {
4152
4420
  return {
@@ -4186,6 +4454,7 @@ ${formatCandidates(filtered)}`
4186
4454
  matchFolder = filtered[0].folder;
4187
4455
  resolvedType = filtered[0].type ?? resolvedType;
4188
4456
  } else {
4457
+ cloudKey = input.cloudKey.toLowerCase();
4189
4458
  const [lookupError, match] = await catchError(findResourceByKeyInRcs(builder, input.kind, cloudKey, input.folderPath, true));
4190
4459
  if (lookupError) {
4191
4460
  return {
@@ -4203,18 +4472,27 @@ ${formatCandidates(filtered)}`
4203
4472
  invalidArgument: true
4204
4473
  };
4205
4474
  }
4475
+ if (input.name !== undefined && input.name.toLowerCase() !== match.name.toLowerCase()) {
4476
+ return {
4477
+ kind: "error",
4478
+ message: `Remote ${input.kind} ${cloudKey} is named ${match.name}, not ${input.name}`,
4479
+ instructions: `Drop --name, or pass --name "${match.name}".`,
4480
+ invalidArgument: true
4481
+ };
4482
+ }
4206
4483
  matchFolder = match.folder;
4484
+ resolvedName = match.name;
4207
4485
  resolvedType = match.type ?? resolvedType;
4208
4486
  }
4209
4487
  }
4210
4488
  const existingByKey = solution.resources.find((r) => r.key.toLowerCase() === cloudKey);
4211
- if (existingByKey) {
4489
+ if (existingByKey && (input.name === undefined || resolvedName !== undefined)) {
4212
4490
  return {
4213
4491
  kind: "success",
4214
4492
  data: toResourceAddData(existingByKey, solution.folders, "remote", "Unchanged")
4215
4493
  };
4216
4494
  }
4217
- if (input.cloudKey && !matchFolder) {
4495
+ if (resolvedName === undefined) {
4218
4496
  return {
4219
4497
  kind: "error",
4220
4498
  message: `No remote resource found with key ${input.cloudKey}${input.folderPath ? ` in folder "${input.folderPath}"` : ""}`,
@@ -4225,7 +4503,7 @@ ${formatCandidates(filtered)}`
4225
4503
  kind: input.kind,
4226
4504
  type: resolvedType,
4227
4505
  key: cloudKey,
4228
- name: input.name,
4506
+ name: resolvedName,
4229
4507
  folder: matchFolder
4230
4508
  }, true));
4231
4509
  if (importError) {
@@ -4253,7 +4531,7 @@ ${formatCandidates(filtered)}`
4253
4531
  };
4254
4532
  }
4255
4533
  async function filterMatchesByFolder(matches, folderPath) {
4256
- const { normalizeFolderPath } = await import("./index-yjvmjpdn.js");
4534
+ const { normalizeFolderPath } = await import("./index-j3tpb2cr.js");
4257
4535
  const normalized = normalizeFolderPath(folderPath);
4258
4536
  if (!normalized)
4259
4537
  return matches;
@@ -4406,7 +4684,7 @@ var registerResourceEditCommand = (resource) => {
4406
4684
  createResourceBuilderServices,
4407
4685
  normalizeResourceFileCasing,
4408
4686
  saveCasingNormalized
4409
- } = await import("./index-yjvmjpdn.js");
4687
+ } = await import("./index-j3tpb2cr.js");
4410
4688
  const source = (options.source ?? "local").toLowerCase();
4411
4689
  if (source !== "local" && source !== "remote") {
4412
4690
  OutputFormatter.error({
@@ -4542,7 +4820,7 @@ var registerResourceEditCommand = (resource) => {
4542
4820
  });
4543
4821
  };
4544
4822
  async function handleRemoteSourceAsync(resourceKey, options) {
4545
- const { resourceRemoteSyncAsync } = await import("./index-yjvmjpdn.js");
4823
+ const { resourceRemoteSyncAsync } = await import("./index-j3tpb2cr.js");
4546
4824
  const result = await resourceRemoteSyncAsync(options.solutionFolder ?? ".", resourceKey, {
4547
4825
  force: options.force === true,
4548
4826
  loginValidity: options.loginValidity ? parseInt(options.loginValidity, 10) : undefined
@@ -4683,8 +4961,8 @@ var registerResourceGetCommand = (resource) => {
4683
4961
  const {
4684
4962
  createResourceBuilderServices,
4685
4963
  readResourceConfigurationsAsync
4686
- } = await import("./index-yjvmjpdn.js");
4687
- const { getSolutionAuthContext } = await import("./solution-auth-jxcgd2m0.js");
4964
+ } = await import("./index-j3tpb2cr.js");
4965
+ const { getSolutionAuthContext } = await import("./solution-auth-0e3qm74f.js");
4688
4966
  const solutionPath = options.solutionFolder ?? ".";
4689
4967
  if (!resourceKey || resourceKey.trim() === "") {
4690
4968
  OutputFormatter.error({
@@ -4759,13 +5037,13 @@ var registerResourceGetCommand = (resource) => {
4759
5037
  });
4760
5038
  };
4761
5039
  async function readWithLiveSpecAsync(services, builder, resourceKey) {
4762
- const { readResourceConfigurationAsync } = await import("./index-yjvmjpdn.js");
5040
+ const { readResourceConfigurationAsync } = await import("./index-j3tpb2cr.js");
4763
5041
  const { configuration, resource } = await readResourceConfigurationAsync(services, builder, resourceKey);
4764
5042
  await attachLiveSpecOnMismatchAsync(services, resource, configuration);
4765
5043
  return configuration;
4766
5044
  }
4767
5045
  async function attachLiveSpecOnMismatchAsync(services, resource, config) {
4768
- const { getRemoteResourceClients } = await import("./index-yjvmjpdn.js");
5046
+ const { getRemoteResourceClients } = await import("./index-j3tpb2cr.js");
4769
5047
  const overwriteData = config.resourceOverwrite;
4770
5048
  const overwrite = overwriteData?.resourceOverwrite?.overwrite;
4771
5049
  if (overwriteData?.matchingOverwriteConfiguration !== false || !overwrite || !resource) {
@@ -4819,8 +5097,8 @@ var RESOURCE_LIST_EXAMPLES = [
4819
5097
  ];
4820
5098
  var registerResourceListCommand = (resource) => {
4821
5099
  resource.command("list").description("List resources in the solution and/or available in Orchestrator. " + "Shows local solution resources, remote Orchestrator resources, or both.").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").option("--kind <kind>", "Filter by resource kind (e.g. Queue, Asset, Bucket, Process, Connection, App, Index, Trigger, Entity, ChoiceSet). Any kind RCS indexes is accepted.").option("--search <term>", "Filter resources by name").option("--source <source>", "Resource source: all, local, or remote (default: all)", "all").option("--include-version", "Also report each resource's version, for the kinds that carry one (app, appVersion, package, process). " + "Remote rows report the version live in the folder, local rows the version the solution pins. " + "Costs one extra call per resource, so it is off by default.").option("-l, --limit <number>", "Number of resources to return", parseLimit, DEFAULT_PAGE_SIZE).option("--offset <number>", "Only 0 is accepted: the resource catalog pages by cursor. Use --next-page instead", parseOffset).option("--next-page <cursor>", "Cursor from a previous response's Pagination.NextPage").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(RESOURCE_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
4822
- const { createResourceBuilderServices } = await import("./index-yjvmjpdn.js");
4823
- const { getSolutionAuthContext } = await import("./solution-auth-jxcgd2m0.js");
5100
+ const { createResourceBuilderServices } = await import("./index-j3tpb2cr.js");
5101
+ const { getSolutionAuthContext } = await import("./solution-auth-0e3qm74f.js");
4824
5102
  const solutionPath = options.solutionFolder ?? ".";
4825
5103
  const fs = getFileSystem();
4826
5104
  const resolvedPath = fs.path.resolve(fs.env.cwd(), solutionPath);
@@ -4997,7 +5275,7 @@ function versionLookupId(entry) {
4997
5275
  return `${entry.Source}|${entry.Key}|${entry.Folder ?? ""}`;
4998
5276
  }
4999
5277
  async function annotateVersions(services, builder, entries) {
5000
- const { resolveResourceVersionsAsync } = await import("./resource-version-lookup-xzgnvr48.js");
5278
+ const { resolveResourceVersionsAsync } = await import("./resource-version-lookup-mksxc1dc.js");
5001
5279
  const targets = new Map;
5002
5280
  for (const entry of entries) {
5003
5281
  if (entry.Key === "") {
@@ -5029,7 +5307,7 @@ async function annotateVersions(services, builder, entries) {
5029
5307
  }
5030
5308
  }
5031
5309
  async function allRemotePage(services, search, pageCursor) {
5032
- const { getRemoteResourceClients } = await import("./index-yjvmjpdn.js");
5310
+ const { getRemoteResourceClients } = await import("./index-j3tpb2cr.js");
5033
5311
  const rcs = getRemoteResourceClients(services).catalog;
5034
5312
  const result = await rcs.searchFolderEntities({
5035
5313
  name: search,
@@ -5112,7 +5390,7 @@ var FAILURE_MESSAGE = {
5112
5390
  };
5113
5391
  var registerResourceRefreshSubcommand = (resource) => {
5114
5392
  resource.command("refresh").description("Re-scan all projects in the solution and sync each project's authored files into the solution resource JSONs. " + "Bindings: creates new resources for `bindings_v2.json` entries not yet in the solution, imports from Orchestrator when a matching resource exists, and removes duplicate copies of the solution's own projects that earlier runs imported from a deployed folder. " + "Project contributions: each project's owning tool reports what its authored files add to the solution resources, and refresh persists it onto the matching resource. " + "Run this after editing a project's bindings or any file the project's tool contributes from, to update the solution resource inventory. " + "Refresh is import-only for cloud resources: it never overwrites an imported resource, so local edits survive; a project's own artefact resources are rewritten from the project's files on every run. " + "To pull a cloud definition that changed after the import, use 'uip solution resources edit <resource-key> --source remote'.").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", "10").examples(RESOURCE_REFRESH_EXAMPLES).trackedAction(processContext, async (options) => {
5115
- const { resourceRefreshAsync } = await import("./index-yjvmjpdn.js");
5393
+ const { resourceRefreshAsync } = await import("./index-j3tpb2cr.js");
5116
5394
  const loginValidityMinutes = options.loginValidity ? parseInt(options.loginValidity, 10) : undefined;
5117
5395
  const solutionFolder = options.solutionFolder ?? ".";
5118
5396
  const fs = getFileSystem();
@@ -5126,9 +5404,9 @@ var registerResourceRefreshSubcommand = (resource) => {
5126
5404
  contributionErrorMessages
5127
5405
  }
5128
5406
  ] = await Promise.all([
5129
- import("./packager-tool-resolver-30hxk8vm.js"),
5130
- import("./prepare-solution-resources-h7zvnncd.js"),
5131
- import("./project-contributions-xx560n8y.js")
5407
+ import("./packager-tool-resolver-mynfj0rt.js"),
5408
+ import("./prepare-solution-resources-g9y01pgd.js"),
5409
+ import("./project-contributions-c8v3bwjr.js")
5132
5410
  ]);
5133
5411
  const resolveProjectSubTypesAsync = async () => {
5134
5412
  await ensurePackagerTools(solutionFolder, fs);
@@ -5141,10 +5419,12 @@ var registerResourceRefreshSubcommand = (resource) => {
5141
5419
  }
5142
5420
  return projectBindingsFrom(contributions);
5143
5421
  };
5422
+ const isProjectBindingsComplete = () => contributions !== undefined && contributionErrorMessages(contributions).length === 0;
5144
5423
  const result = await resourceRefreshAsync(solutionFolder, {
5145
5424
  loginValidity: loginValidityMinutes,
5146
5425
  resolveProjectSubTypesAsync,
5147
- resolveProjectBindingsAsync
5426
+ resolveProjectBindingsAsync,
5427
+ isProjectBindingsComplete
5148
5428
  });
5149
5429
  if (!result.ok) {
5150
5430
  OutputFormatter.error({
@@ -5210,6 +5490,26 @@ var RESOURCE_REMOVE_EXAMPLES = [
5210
5490
  }
5211
5491
  }
5212
5492
  ];
5493
+ function describeDeleteRefusal(error, target) {
5494
+ const refusal = (Message, Instructions) => ({
5495
+ Result: RESULTS.Failure,
5496
+ ErrorCode: "invalid_argument",
5497
+ Retry: "RetryWillNotFix",
5498
+ Message,
5499
+ Instructions
5500
+ });
5501
+ const name = `'${target.name}' (${target.kind})`;
5502
+ switch (error?.errorCode) {
5503
+ case ErrorCodes.Resources.DeletingProjectArtefactResourceIsNotAllowed:
5504
+ return refusal(`Resource ${name} belongs to a project in this solution and cannot be removed on its own.`, `Remove the project instead with 'uip solution projects remove <project-path>'; its resources go with it. 'uip solution projects list' shows the project with Id ${target.projectKey}.`);
5505
+ case ErrorCodes.Resources.DeletingResourceThatIsReferencedByOtherResourcesIsNotAllowed:
5506
+ return refusal(error instanceof Error ? error.message : String(error), target.kind.toLowerCase() === "package" ? "Remove the resources that reference it first; a package declaration goes with the resource that pins it. 'uip solution resources list --source local' shows their keys." : "Remove the resources that reference it first. 'uip solution resources list --source local' shows their keys.");
5507
+ case ErrorCodes.Resources.DeletingHiddenResourceIsNotAllowed:
5508
+ return refusal(`Resource ${name} is managed by the solution and cannot be removed on its own.`, "The solution removes it together with the resource that uses it, and no resource in this solution uses it, so no command removes it yet.");
5509
+ default:
5510
+ return;
5511
+ }
5512
+ }
5213
5513
  var registerResourceRemoveCommand = (resource) => {
5214
5514
  resource.command("remove").description("Remove a resource from the solution by its key. Use 'uip solution resources list' " + "or 'uip solution resources get' to discover the key first. " + "Purely local — no auth required, doesn't touch any bindings_v2.json.").argument("<resource-key>", "Solution resource key (a GUID, or a compound key such as MyFunction.api.MyFunction.1:1.0.0)").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").examples(RESOURCE_REMOVE_EXAMPLES).trackedAction(processContext, async (resourceKey, options) => {
5215
5515
  if (!validateResourceKeyArgument(resourceKey)) {
@@ -5220,7 +5520,7 @@ var registerResourceRemoveCommand = (resource) => {
5220
5520
  createResourceBuilderServices,
5221
5521
  normalizeResourceFileCasing,
5222
5522
  saveCasingNormalized
5223
- } = await import("./index-yjvmjpdn.js");
5523
+ } = await import("./index-j3tpb2cr.js");
5224
5524
  const fs = getFileSystem();
5225
5525
  const resolvedPath = fs.path.resolve(fs.env.cwd(), options.solutionFolder ?? ".");
5226
5526
  if (!await fs.exists(resolvedPath)) {
@@ -5285,7 +5585,7 @@ var registerResourceRemoveCommand = (resource) => {
5285
5585
  };
5286
5586
  const [deleteError] = await catchError(builder.deleteSolutionResourceAsync(target.key));
5287
5587
  if (deleteError) {
5288
- OutputFormatter.error({
5588
+ OutputFormatter.error(describeDeleteRefusal(deleteError, target) ?? {
5289
5589
  Result: RESULTS.Failure,
5290
5590
  Message: "Failed to remove resource",
5291
5591
  Instructions: deleteError.message
@@ -5343,7 +5643,7 @@ var SOLUTION_RESTORE_EXAMPLES = [
5343
5643
  ];
5344
5644
  var registerRestoreCommand = (program) => {
5345
5645
  program.command("restore").description("Restore NuGet dependencies for every project in a UiPath solution using the authenticated session. Accepts a solution directory (containing .uipx) or a .uis file. Resolves dependencies in place and does not produce a package — run it before 'uip solution pack'.").argument("<solution-path>", "Path to a solution directory (containing .uipx) or a .uis file").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--exclude-configured-sources", "Resolve project dependencies only from the tenant feeds and any --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds, so a dependency that is not on those feeds fails to restore.").option("--feed-folder <name>", "Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. Accepts a folder name or fully qualified path.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(SOLUTION_RESTORE_EXAMPLES).trackedAction(processContext, async (solutionPath, options, command) => {
5346
- const { RestoreCommandService } = await import("./restore-command-service-bqs7r9y3.js");
5646
+ const { RestoreCommandService } = await import("./restore-command-service-ztbt2ejp.js");
5347
5647
  const service = new RestoreCommandService;
5348
5648
  await service.execute(solutionPath, {
5349
5649
  loginValidity: options.loginValidity,
@@ -5368,7 +5668,11 @@ var NEVER_STARTED = new Set([
5368
5668
  "Unauthorized" /* Unauthorized */
5369
5669
  ]);
5370
5670
  var registerRunCommand = (program) => {
5371
- program.command("run", { hidden: true }).description("Run a project from a UiPath solution. Currently supports RPA projects, agents and API Workflows.").argument("<solution-path>", "Path to a solution directory (containing .uipx)").option("--project-name <name>", "Name of the project to run. Required only when the solution has more than one runnable project.").option("--entry-point <path>", "Entry point to execute (for RPA, a workflow such as Main.xaml). Defaults to the project's own entry point.").option("--input-arguments <json>", `Input arguments for the entry point, as a JSON object string (e.g. '{"name": "World"}').`).option("--folder-path <path>", "Orchestrator folder the run reports itself under, when the runtime needs one. Ignored when the solution is deployed, which uses the folder it deploys into.").option("--provision-resources", "Pack and deploy the solution into your personal workspace before running, even when the solution holds a single project. Done automatically for a solution with more than one project.").option("--no-provision-resources", "Run without deploying the solution first. Cross-project calls will not resolve.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10).", Number.parseInt, 10).trackedAction(processContext, async (solutionPath, options, command) => {
5671
+ const command = program.command("run", { hidden: true }).description("Run a project from a UiPath solution. Currently supports RPA projects, agents, API Workflows and Flows.").argument("<solution-path>", "Path to a solution directory (containing .uipx)").option("--project-name <name>", "Name of the project to run. Required only when the solution has more than one runnable project.").option("--entry-point <path>", "Entry point to execute (for RPA, a workflow such as Main.xaml). Defaults to the project's own entry point.").option("--input-arguments <json>", `Input arguments for the entry point, as a JSON object string (e.g. '{"name": "World"}').`).option("--folder-path <path>", "Orchestrator folder the run reports itself under, when the runtime needs one. Ignored when the solution is deployed, which uses the folder it deploys into.").option("--provision-resources", "Pack and deploy the solution into your personal workspace before running, even when the solution holds a single project. Done automatically for a solution with more than one project.").option("--no-provision-resources", "Run without deploying the solution first. Cross-project calls will not resolve.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10).", Number.parseInt, 10);
5672
+ if (isPreviewBuild()) {
5673
+ command.addOption(new Option("--jit", "Resolve cross-project calls from the run itself instead of deploying the solution, so nothing is packed or uploaded. Needs an available Development robot session on this machine; falls back to deploying when a project type is not supported or no session is free.").hideHelp());
5674
+ }
5675
+ command.trackedAction(processContext, async (solutionPath, options, command) => {
5372
5676
  const capture = getProjectTelemetryCapture(command);
5373
5677
  const [inputError, inputArguments] = parseInputArguments(options.inputArguments);
5374
5678
  if (inputError) {
@@ -5381,7 +5685,7 @@ var registerRunCommand = (program) => {
5381
5685
  processContext.exit(1);
5382
5686
  return;
5383
5687
  }
5384
- const { runSolutionAsync } = await import("./run-service-ekbx2jdg.js");
5688
+ const { runSolutionAsync } = await import("./run-service-r52wgf69.js");
5385
5689
  const result = await runSolutionAsync({
5386
5690
  solutionPath,
5387
5691
  projectName: options.projectName,
@@ -5389,12 +5693,13 @@ var registerRunCommand = (program) => {
5389
5693
  inputArguments,
5390
5694
  folderPath: options.folderPath,
5391
5695
  provisionResources: options.provisionResources,
5696
+ jit: options.jit,
5392
5697
  loginValidity: options.loginValidity
5393
5698
  }, {
5394
5699
  fileSystem: getFileSystem(),
5395
5700
  logger,
5396
5701
  telemetryCapture: capture
5397
- });
5702
+ }, processContext.pollSignal);
5398
5703
  if (!result.isSuccess) {
5399
5704
  OutputFormatter.error({
5400
5705
  Result: RESULTS.Failure,
@@ -5406,7 +5711,7 @@ var registerRunCommand = (program) => {
5406
5711
  TraceId: result.traceId
5407
5712
  })
5408
5713
  });
5409
- processContext.exit(1);
5714
+ processContext.exit(result.errorCode === "Cancelled" /* Cancelled */ ? 130 : 1);
5410
5715
  return;
5411
5716
  }
5412
5717
  OutputFormatter.success({
@@ -5419,8 +5724,10 @@ var registerRunCommand = (program) => {
5419
5724
  JobKey: result.jobKey,
5420
5725
  TraceId: result.traceId
5421
5726
  }),
5422
- Output: result.output
5423
- }
5727
+ Output: result.output,
5728
+ ...typeof result.details?.outputError === "string" ? { OutputError: result.details.outputError } : {}
5729
+ },
5730
+ ...result.message ? { Instructions: result.message } : {}
5424
5731
  }, { preserveDataKeys: true });
5425
5732
  });
5426
5733
  };
@@ -5510,17 +5817,19 @@ var registerUploadCommand = (program) => {
5510
5817
  overwriteSolution,
5511
5818
  resolveSolutionDir,
5512
5819
  StudioWebIncompatibleProjectError,
5820
+ StudioWebInvalidFileNameError,
5513
5821
  solutionExistsOnStudioWeb,
5514
5822
  UipignoreExcludesProjectError
5515
- } = await import("./index-2bn3jzn9.js");
5516
- const { readBundledSolutionId } = await import("./archive-extract-ma0gy822.js");
5517
- const { isUnpackableProjectTypeError } = await import("./packager-tool-resolver-30hxk8vm.js");
5518
- const { prepareSolutionResources } = await import("./prepare-solution-resources-h7zvnncd.js");
5823
+ } = await import("./index-nbs04tqr.js");
5824
+ const { readBundledSolutionId } = await import("./archive-extract-afgwacbg.js");
5825
+ const { isUnpackableProjectTypeError } = await import("./packager-tool-resolver-mynfj0rt.js");
5826
+ const { prepareSolutionResources } = await import("./prepare-solution-resources-g9y01pgd.js");
5519
5827
  const {
5520
5828
  inspectSolutionPackageProjectTypes,
5521
5829
  summarizeShipProjectTypes,
5522
5830
  trackSolutionShipSucceeded
5523
- } = await import("./ship-telemetry-19gx83af.js");
5831
+ } = await import("./ship-telemetry-9djqndmy.js");
5832
+ const { trackUploadedProjectIdentities } = await import("./project-identity-telemetry-yxdhswyq.js");
5524
5833
  const capture = getProjectTelemetryCapture(command);
5525
5834
  const fs = getFileSystem();
5526
5835
  const [loginError, auth] = await catchError(getAuthContext({
@@ -5601,6 +5910,16 @@ var registerUploadCommand = (program) => {
5601
5910
  processContext.exit(1);
5602
5911
  return;
5603
5912
  }
5913
+ if (bundleError instanceof StudioWebInvalidFileNameError) {
5914
+ OutputFormatter.error({
5915
+ Result: RESULTS.Failure,
5916
+ ErrorCode: "invalid_argument",
5917
+ Message: bundleError.message,
5918
+ Instructions: 'Rename the listed file(s) so their names hold no control character and none of : * ? " < > |, or leave them out of the upload with a .uipignore pattern, then upload again. Nothing was uploaded.'
5919
+ });
5920
+ processContext.exit(1);
5921
+ return;
5922
+ }
5604
5923
  outputError(bundleError.message);
5605
5924
  return;
5606
5925
  }
@@ -5711,6 +6030,13 @@ var registerUploadCommand = (program) => {
5711
6030
  [ShipDimensions.SolutionId]: returnedSolutionId,
5712
6031
  projectTypeSummary
5713
6032
  }, capture);
6033
+ if (uipxPath !== undefined) {
6034
+ await trackUploadedProjectIdentities({
6035
+ solutionDir: fs.path.dirname(uipxPath),
6036
+ solutionId: returnedSolutionId,
6037
+ response: result
6038
+ });
6039
+ }
5714
6040
  } finally {
5715
6041
  if (tempDir) {
5716
6042
  const [cleanupError] = await catchError(fs.rm(tempDir));
@@ -5725,9 +6051,8 @@ async function updateLocalSolutionId(fs, returnedSolutionId, solutionId, uipxPat
5725
6051
  const shouldUpdateUipx = uipxPath !== undefined && returnedSolutionId !== undefined && returnedSolutionId !== solutionId;
5726
6052
  const rewroteLocalSolutionId = shouldUpdateUipx && solutionId !== undefined;
5727
6053
  if (shouldUpdateUipx && returnedSolutionId && uipxPath) {
5728
- const { updateUipxSolutionId } = await import("./index-2bn3jzn9.js");
6054
+ const { updateUipxSolutionId } = await import("./index-nbs04tqr.js");
5729
6055
  await updateUipxSolutionId(fs, uipxPath, returnedSolutionId);
5730
- logger.info(solutionId ? `Studio Web assigned SolutionId ${returnedSolutionId} — the local .uipx now points at it (was ${solutionId}).` : `Studio Web assigned SolutionId ${returnedSolutionId} — the local .uipx now points at it.`);
5731
6056
  }
5732
6057
  return rewroteLocalSolutionId;
5733
6058
  }
@@ -5791,7 +6116,7 @@ function configureSolutionTelemetry(root) {
5791
6116
  const readLocal = async (target) => {
5792
6117
  if (/\.(uis|zip)$/i.test(target))
5793
6118
  return;
5794
- const { readSolutionIdentity } = await import("./solution-identity-c23d9bfv.js");
6119
+ const { readSolutionIdentity } = await import("./solution-identity-j63p6n81.js");
5795
6120
  return solutionIdentityProperties(await readSolutionIdentity(target));
5796
6121
  };
5797
6122
  const local = createIdentityCommandResolver(root, localRules, readLocal);
@@ -5819,6 +6144,7 @@ var registerCommands2 = async (program) => {
5819
6144
  registerCleanupCommand(program);
5820
6145
  registerRestoreCommand(program);
5821
6146
  registerRunCommand(program);
6147
+ registerJitPropertiesCommand(program);
5822
6148
  registerDownloadCommand(program);
5823
6149
  registerNewCommand(program);
5824
6150
  registerProjectCommand(program);
@@ -5828,7 +6154,7 @@ var registerCommands2 = async (program) => {
5828
6154
  registerResourceCommand(program);
5829
6155
  registerDeleteCommand(program);
5830
6156
  if (isPreviewBuild()) {
5831
- const { registerListCommand } = await import("./list-0k8c4rt6.js");
6157
+ const { registerListCommand } = await import("./list-3a1tdrgm.js");
5832
6158
  registerListCommand(program);
5833
6159
  }
5834
6160
  registerFeedsCommand(program);
@@ -5836,4 +6162,4 @@ var registerCommands2 = async (program) => {
5836
6162
 
5837
6163
  export { metadata2, registerCommands2 };
5838
6164
 
5839
- //# debugId=4B325ED5D5A108BE64756E2164756E21
6165
+ //# debugId=CEF4764812FA94F864756E2164756E21