@uipath/solution-tool 1.204.0-preview.254 → 1.205.0-preview.256

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 (122) hide show
  1. package/README.md +3 -3
  2. package/dist/THIRD-PARTY-NOTICES.md +2 -2
  3. package/dist/archive-extract-x35t9ktj.js +120 -0
  4. package/dist/cleanup-command-service-n4e7vxnw.js +149 -0
  5. package/dist/deploy-delete-service-cag0q8yx.js +25 -0
  6. package/dist/deploy-run-service-f0h8wb9w.js +25 -0
  7. package/dist/{deploy-status-service-sa302ab9.js → deploy-status-service-yh6xn6e0.js} +41 -33
  8. package/dist/deploy.js +23 -17
  9. package/dist/{deployment-search-692d15j3.js → deployment-search-mnywd9nc.js} +16 -10
  10. package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
  11. package/dist/{feed-resolver-yybwzmh6.js → feed-resolver-fve33dxq.js} +10 -9
  12. package/dist/feed-scope-failure-jmg4t1r1.js +19 -0
  13. package/dist/{feed-session-sxga31vn.js → feed-session-7xqphdrg.js} +3 -3
  14. package/dist/governance-options-4vxz7ekn.js +32 -0
  15. package/dist/index-g8c8nf1c.js +667 -0
  16. package/dist/index-prm27bvm.js +138 -0
  17. package/dist/index.js +27 -29
  18. package/dist/init.js +11 -10
  19. package/dist/{list-0qrxqrfn.js → list-50mepbed.js} +10 -8
  20. package/dist/models/pack-command-types.d.ts +15 -0
  21. package/dist/node-7jm7ksqa.js +86 -0
  22. package/dist/pack-command-service-dewf5vsq.js +35 -0
  23. package/dist/pack-project-xwd1rbaa.js +97 -0
  24. package/dist/pack.js +24 -14
  25. package/dist/package-id-1wr3cy9c.js +13 -0
  26. package/dist/packager-tool-09swr9cp.js +171 -0
  27. package/dist/{packager-tool-dapys0dd.js → packager-tool-2vmsh5pt.js} +196 -1519
  28. package/dist/{packager-tool-px1j9kre.js → packager-tool-3bwnkjdq.js} +2 -2
  29. package/dist/{packager-tool-gb35b4qs.js → packager-tool-43ahv5mn.js} +192 -96
  30. package/dist/{packager-tool-5v92rtp2.js → packager-tool-47by487p.js} +6 -4
  31. package/dist/packager-tool-47wzvqw0.js +86 -0
  32. package/dist/{packager-tool-zns6n8zp.js → packager-tool-5ddtwzva.js} +1 -1
  33. package/dist/packager-tool-5edvzz80.js +543 -0
  34. package/dist/{packager-tool-13dsb9e6.js → packager-tool-5n6jsn41.js} +104 -14
  35. package/dist/packager-tool-60af1hw2.js +26 -0
  36. package/dist/{packager-tool-f5gq77m5.js → packager-tool-61pwb567.js} +2 -2
  37. package/dist/{packager-tool-yrz4mwfn.js → packager-tool-6kz1pv9f.js} +1373 -486
  38. package/dist/packager-tool-6ybywxxn.js +1809 -0
  39. package/dist/packager-tool-8ptbmmmp.js +2132 -0
  40. package/dist/{packager-tool-7gr2nphb.js → packager-tool-97rcgwvv.js} +224 -6
  41. package/dist/{packager-tool-9z1yxjme.js → packager-tool-9t26kde1.js} +3556 -1646
  42. package/dist/packager-tool-act5r386.js +239 -0
  43. package/dist/packager-tool-amhyxzz6.js +125 -0
  44. package/dist/packager-tool-b03rva43.js +188 -0
  45. package/dist/{packager-tool-e2rtr49j.js → packager-tool-b2nhscfk.js} +15 -31
  46. package/dist/{packager-tool-v8rseyfk.js → packager-tool-d6rrfd46.js} +149 -53
  47. package/dist/packager-tool-frr2xmkr.js +445 -0
  48. package/dist/{packager-tool-v8bkkqdb.js → packager-tool-gmwva4yv.js} +5 -5
  49. package/dist/packager-tool-gs3f3tf7.js +103 -0
  50. package/dist/packager-tool-jg692f13.js +517 -0
  51. package/dist/packager-tool-jmpb786m.js +109 -0
  52. package/dist/{packager-tool-4ytxbjez.js → packager-tool-kds8ytzw.js} +74 -23
  53. package/dist/packager-tool-kkfb5kgn.js +182 -0
  54. package/dist/packager-tool-kvcxg0zv.js +1510 -0
  55. package/dist/packager-tool-n3jfjn5r.js +42 -0
  56. package/dist/{packager-tool-8sx1w3h1.js → packager-tool-n5d5dx5j.js} +2196 -3455
  57. package/dist/{packager-tool-97w8aw8y.js → packager-tool-nsya65z1.js} +357 -1370
  58. package/dist/{packager-tool-fv7xyzg2.js → packager-tool-pbmqk39a.js} +126 -128
  59. package/dist/{packager-tool-bqre28m1.js → packager-tool-qw47eyw7.js} +1 -1
  60. package/dist/{packager-tool-erp9bv22.js → packager-tool-rc3hwn4b.js} +25 -4
  61. package/dist/packager-tool-resolver-994z3jkj.js +23 -0
  62. package/dist/{packager-tool-d9ethrmn.js → packager-tool-rvt68c1t.js} +17 -8
  63. package/dist/{packager-tool-gab9y5ct.js → packager-tool-t8gh825q.js} +37 -13
  64. package/dist/{packager-tool-kswwd3hp.js → packager-tool-tx834spe.js} +2376 -4077
  65. package/dist/{packager-tool-zf3929se.js → packager-tool-v1f5e8t9.js} +11 -1
  66. package/dist/{packager-tool-wjk91v0q.js → packager-tool-w77d72a7.js} +13 -11
  67. package/dist/{packager-tool-1rzssy0x.js → packager-tool-wy4fx250.js} +19 -18
  68. package/dist/packager-tool-wz34ma3s.js +1333 -0
  69. package/dist/packager-tool-zq16e1xv.js +68 -0
  70. package/dist/packager-tool.js +2 -2
  71. package/dist/prepare-solution-resources-m1djfj62.js +29 -0
  72. package/dist/project-command-utils-t6pmpvq3.js +90 -0
  73. package/dist/project-contributions-79ndycrx.js +32 -0
  74. package/dist/publish.js +13 -12
  75. package/dist/resource-mutations-c3krjqze.js +36 -0
  76. package/dist/resource-version-lookup-0e3e2j58.js +99 -0
  77. package/dist/resource.js +10 -9
  78. package/dist/restore-command-service-5v0b9363.js +155 -0
  79. package/dist/run-service-tg6b67wp.js +428 -0
  80. package/dist/services/deploy-activate-service.d.ts +10 -5
  81. package/dist/services/deploy-delete-service.d.ts +8 -4
  82. package/dist/services/deploy-run-service.d.ts +34 -1
  83. package/dist/services/deploy-uninstall-service.d.ts +21 -3
  84. package/dist/services/deploy-upgrade-service.d.ts +35 -1
  85. package/dist/services/deployment-feed-locator.d.ts +15 -4
  86. package/dist/services/deployment-search-client.d.ts +5 -53
  87. package/dist/services/deployment-search.d.ts +58 -3
  88. package/dist/services/deployment-state.d.ts +84 -24
  89. package/dist/services/deployment-validation.d.ts +5 -0
  90. package/dist/services/emit-runtime-dependencies.d.ts +2 -1
  91. package/dist/services/feed-resolver.d.ts +6 -4
  92. package/dist/services/feed-selection.d.ts +47 -0
  93. package/dist/services/http-status.d.ts +2 -7
  94. package/dist/services/pack-command-service.d.ts +9 -0
  95. package/dist/services/pack-project-selection.d.ts +51 -0
  96. package/dist/services/pack-project.d.ts +26 -0
  97. package/dist/services/pack-service.d.ts +7 -3
  98. package/dist/services/package-search-client.d.ts +7 -0
  99. package/dist/services/packager-tool-resolver.d.ts +7 -1
  100. package/dist/services/packages-list-service.d.ts +1 -1
  101. package/dist/services/permanent-deletion-consent.d.ts +110 -0
  102. package/dist/services/pipeline-deploy-poll.d.ts +7 -0
  103. package/dist/services/prepare-solution-resources.d.ts +12 -2
  104. package/dist/services/project-contributions.d.ts +5 -4
  105. package/dist/services/search-failure.d.ts +9 -13
  106. package/dist/services/solution-packager-helpers.d.ts +5 -2
  107. package/dist/services/solution-path.d.ts +1 -1
  108. package/dist/services/uninstall-consent.d.ts +82 -0
  109. package/dist/ship-telemetry-myes7ak5.js +21 -0
  110. package/dist/solution-auth-aead70sw.js +11 -0
  111. package/dist/templates/AGENTS.md +125 -12
  112. package/dist/tool.js +27 -29
  113. package/dist/utils/deployment-errors.d.ts +9 -1
  114. package/package.json +2 -2
  115. package/dist/deploy-delete-service-7fms6rrp.js +0 -22
  116. package/dist/feed-scope-failure-kf94beem.js +0 -18
  117. package/dist/packager-tool-f2e9rzxk.js +0 -104
  118. package/dist/packager-tool-resolver-6zwhec62.js +0 -20
  119. package/dist/packager-tool-zdfn32bc.js +0 -4465
  120. package/dist/prepare-solution-resources-jpb5as2s.js +0 -25
  121. package/dist/project-contributions-6wpff2hm.js +0 -30
  122. package/dist/services/legacy-deployment-search-v3.d.ts +0 -23
@@ -1,6 +1,6 @@
1
1
  import type { DeploymentSearchItemDto2, InitOverrideFunction } from "@uipath/solution-sdk";
2
2
  import type { SolutionAuthContext } from "@uipath/solution-sdk/auth";
3
- import { type FeedKind } from "./feed-resolver";
3
+ import { type FeedKind, type FeedScope } from "./feed-resolver";
4
4
  import type { SkippedFeed } from "./incomplete-feed-sweep";
5
5
  /** A deployment and the feed header every call about it needs. */
6
6
  export interface DeploymentLocation {
@@ -46,17 +46,28 @@ export interface DeploymentLocationOptions {
46
46
  * the feed rather than to the tenant's history row.
47
47
  */
48
48
  includeUninstalled?: boolean;
49
+ /**
50
+ * The feed the caller named (`--feed` / `--personal-workspace`, or the
51
+ * feed a generated follow-up command carried forward). Only that feed is
52
+ * searched: no publish-locations listing, no sweep. A selection that names
53
+ * the tenant feed is still a selection and searches the tenant alone.
54
+ */
55
+ selectedFeed?: FeedScope;
49
56
  }
50
57
  /**
51
58
  * Locate a deployment and the feed it lives in.
52
59
  *
53
- * `uninstall` and `activate` take no feed flag, so they have to work this out
54
- * themselves: every Pipelines call about a deployment resolves against the
60
+ * Without a feed flag, `uninstall`, `activate` and `delete` have to work this
61
+ * out themselves: every Pipelines call about a deployment resolves against the
55
62
  * tenant feed unless it carries `X-UIPATH-FolderKey`, and a deployment created
56
63
  * by `deploy run --personal-workspace` or `--feed <folder-feed>` is invisible
57
64
  * to the tenant-scoped search, so an unscoped call is answered "not found".
58
65
  *
59
- * Tenant first — that is the default feed and the one most deployments live in,
66
+ * With `options.selectedFeed`, that feed alone is searched: the caller said
67
+ * where the deployment lives, so the sweep and its publish-locations call are
68
+ * skipped. A search that fails there is a sweep that skipped that feed.
69
+ *
70
+ * Otherwise tenant first — that is the default feed and the one most deployments live in,
60
71
  * so the common case costs one request. Only on a tenant miss does the sweep
61
72
  * run, and it is best-effort throughout: a feed whose search fails is skipped
62
73
  * rather than allowed to end the sweep, since the next feed may hold the
@@ -1,55 +1,7 @@
1
- import { type DeploymentActivationStatus, type DeploymentOperationStatus, type DeploymentSearchItemDto2, type InitOverrideFunction } from "@uipath/solution-sdk";
2
- import type { SolutionAuthContext } from "@uipath/solution-sdk/auth";
3
- export type DeploymentSearchSource = "pipelines" | "legacy-v3";
4
- /** One page of the deployment search, in the terms both routes understand. */
5
- export interface DeploymentSearchQuery {
6
- take: number;
7
- skip: number;
8
- /**
9
- * Exact name. Filtered by the server on the Pipelines route; a substring
10
- * term on the legacy one, so callers keep their exact match.
11
- */
12
- deploymentName?: string;
13
- packageName?: string;
14
- /** The row's parent folder by full path: exact, case-insensitive, subfolders excluded. */
15
- targetFolderName?: string;
16
- searchTerm?: string;
17
- orderByColumn?: string;
18
- orderByDirection?: "Ascending" | "Descending";
19
- operationStatuses?: DeploymentOperationStatus[];
20
- activationStatuses?: DeploymentActivationStatus[];
21
- }
22
- export interface DeploymentSearchPage {
23
- /** The filtered total; `undefined` when the server omits it. */
24
- count?: number;
25
- values: DeploymentSearchItemDto2[];
26
- /** Which route answered — for logs and tests, never for output. */
27
- source: DeploymentSearchSource;
28
- }
29
1
  /**
30
- * The server has only the legacy search, and that one reads user tokens only.
31
- * Thrown instead of making a request that can only answer 403, so a caller can
32
- * tell "cannot be read with this login" from an outage — the distinction the
33
- * application-session gates were written for.
2
+ * The deployment search lives in `@uipath/solution-sdk/deployments`: the
3
+ * Pipelines route first, the deprecated V3 route only on a server without it.
4
+ * Re-exported here so this package's callers, and the specs that mock this
5
+ * module, keep one local path to it.
34
6
  */
35
- export declare class DeploymentSearchNeedsUserSessionError extends Error {
36
- constructor();
37
- }
38
- /**
39
- * Whether an error from the Pipelines search means the server has no such
40
- * route (and the legacy search should answer), as opposed to a failure of
41
- * the route itself. Measured on a server without it: the POST falls onto
42
- * `GET deployments/{deploymentKey}` and answers **405** with no body; a path
43
- * matching nothing answers 404 with no body. A 404 with *any* body — an
44
- * `errorCode`, or a plain ProblemDetails — is the route answering, and must
45
- * reach the caller.
46
- */
47
- export declare function isMissingPipelinesSearchRoute(error: unknown): Promise<boolean>;
48
- /**
49
- * The one deployment search every command goes through: the Pipelines route
50
- * (SOL-7807), which reads application sessions too and filters an exact name
51
- * on the server; the deprecated `/api/v3/search/deployments` only on a server
52
- * without it. Rows come back as the solution-sdk's DTO either way — the
53
- * Pipelines row is a superset of it, so its extra fields are dropped.
54
- */
55
- export declare function searchDeploymentsPage(auth: SolutionAuthContext, query: DeploymentSearchQuery, scope?: InitOverrideFunction): Promise<DeploymentSearchPage>;
7
+ export { DeploymentSearchNeedsUserSessionError, searchDeploymentsPage, } from "@uipath/solution-sdk/deployments";
@@ -1,7 +1,62 @@
1
- import type { PipelineDeploymentResult, PipelineDeploymentStatus } from "@uipath/pipelines-sdk";
1
+ import { type PipelineDeploymentResult, type PipelineDeploymentStatus } from "@uipath/pipelines-sdk";
2
2
  import type { DeploymentOperationStatus, DeploymentSearchItemDto2, InitOverrideFunction } from "@uipath/solution-sdk";
3
3
  import type { SolutionAuthContext } from "@uipath/solution-sdk/auth";
4
4
  export { httpStatusOf } from "./http-status";
5
+ /** A deployment read by key: the fields the callers act on, from either route. */
6
+ export interface DeploymentByKey {
7
+ deploymentKey: string;
8
+ operationStatus: DeploymentOperationStatus;
9
+ installedRootFolderKey?: string | null;
10
+ /**
11
+ * Which route answered. `solutions` is the deprecated fallback, and it
12
+ * answers differently: the exact row asked for, never the current
13
+ * generation.
14
+ */
15
+ source: "pipelines" | "solutions";
16
+ }
17
+ export interface ReadDeploymentByKeyOptions {
18
+ /**
19
+ * The feed header for the deprecated Solutions fallback, which is
20
+ * feed-scoped. The Pipelines lookup spans every feed and is sent without it.
21
+ */
22
+ scope?: InitOverrideFunction;
23
+ /**
24
+ * Skip the Pipelines lookup: the caller has already seen it answer 404 and
25
+ * the Solutions read answer instead, so a poll does not pay a 404 on every
26
+ * interval.
27
+ */
28
+ solutionsOnly?: boolean;
29
+ }
30
+ /**
31
+ * Read a deployment by key once a caller holds one, instead of searching its
32
+ * name again.
33
+ *
34
+ * `GET /pipelines/deployments/by-key/{key}` goes first: S2S-capable, sent
35
+ * without a feed header (it spans every feed in the tenant), and one indexed
36
+ * read where a search is a filtered scan. It answers a superseded key with
37
+ * the deployment's *current* generation, so a caller that needs this exact
38
+ * row compares `deploymentKey` itself.
39
+ *
40
+ * On a 404 from it (a server without the route, or a key it does not know;
41
+ * not told apart, the same rule as `deploy status` and `deploy upgrade`), a
42
+ * user session falls back to the **deprecated** Solutions read
43
+ * ({@link readDeploymentByKeyViaSolutionsAsync}). An application session gets
44
+ * `undefined`. `undefined` from either route means the caller falls back to
45
+ * the search. Any other failure throws.
46
+ */
47
+ export declare function readDeploymentByKeyAsync(auth: SolutionAuthContext, deploymentKey: string, options?: ReadDeploymentByKeyOptions): Promise<DeploymentByKey | undefined>;
48
+ /**
49
+ * @deprecated Fallback for servers without
50
+ * `GET /pipelines/deployments/by-key/{key}`. Remove it once that lookup is on
51
+ * every production ring, together with the `deploy status` / `deploy upgrade`
52
+ * fallbacks to the same route (see the package CLAUDE.md).
53
+ *
54
+ * `GET /api/deployments/{key}` (Automation Solutions): user tokens only, so
55
+ * never on an S2S path (SOL-7805). It is feed-scoped (it needs the feed's
56
+ * header), and it returns the exact row asked for rather than the current
57
+ * generation. A 404 is `undefined`; any other failure throws.
58
+ */
59
+ export declare function readDeploymentByKeyViaSolutionsAsync(auth: SolutionAuthContext, deploymentKey: string, scope?: InitOverrideFunction): Promise<DeploymentByKey | undefined>;
5
60
  /**
6
61
  * Look up a deployment by name in the persistent search/list service.
7
62
  * Returns the deployment's **current generation** — every upgrade and
@@ -37,7 +92,7 @@ export declare function isCompletedUninstall(row: Pick<DeploymentSearchItemDto2,
37
92
  *
38
93
  * `packageName` is the server-side filter, which keeps the result set small;
39
94
  * on the deprecated V3 route it also travels as the substring `searchTerm`
40
- * (see `toLegacyV3Request`), so the lookup still works if that server ignores
95
+ * (see the V3 request mapping in `@uipath/solution-sdk/deployments`), so the lookup still works if that server ignores
41
96
  * `packageName`. The client-side `===` check is what makes the answer exact
42
97
  * either way.
43
98
  *
@@ -245,7 +300,7 @@ export declare function deploymentToTerminalPipelineResult(deployment: Deploymen
245
300
  * whether the deployment really landed on the requested name, so callers can
246
301
  * say so when it did not.
247
302
  */
248
- export declare function resolveInstalledFolder(deployment: DeploymentSearchItemDto2 | undefined, requested: {
303
+ export declare function resolveInstalledFolder(deployment: Pick<DeploymentSearchItemDto2, "installedRootFolderKey" | "installedRootFolderName" | "folderPath"> | undefined, requested: {
249
304
  folderName: string;
250
305
  folderPath: string;
251
306
  parentFolderPath?: string;
@@ -1,4 +1,6 @@
1
- import type { DeploymentsApi, InitOverrideFunction } from "@uipath/solution-sdk";
1
+ import { quoteForShell } from "@uipath/common";
2
+ import { PipelinesApi } from "@uipath/pipelines-sdk";
3
+ import { DeploymentsApi, type InitOverrideFunction } from "@uipath/solution-sdk";
2
4
  /**
3
5
  * A deployed resource the service flags `requiresConfiguration` — the reason a
4
6
  * deployment sits in `NeedsSetupToActivate` instead of running.
@@ -17,7 +19,46 @@ export interface PendingResource {
17
19
  * no error for the resource.
18
20
  */
19
21
  reason?: string;
22
+ /**
23
+ * The Orchestrator folders the resource lives in (`Shared/Sales`), from
24
+ * the Pipelines validation result. Absent when the reasons came from the
25
+ * Solutions routes, which do not carry them.
26
+ */
27
+ folderPaths?: string[];
28
+ }
29
+ /**
30
+ * The two clients {@link readPendingResourcesAsync} reads with: the Pipelines
31
+ * one first, which takes an external-app token, and the Solutions one as the
32
+ * fallback, which takes a user token only.
33
+ */
34
+ export interface PendingResourceApis {
35
+ pipelines: PipelinesApi;
36
+ deployments: DeploymentsApi;
20
37
  }
38
+ /** Both clients for a session. */
39
+ export declare function pendingResourceApis(auth: {
40
+ basePath: string;
41
+ accessToken: string;
42
+ }): PendingResourceApis;
43
+ /** The deployment whose pending resources are read. */
44
+ export interface PendingResourceTarget {
45
+ /** What the Pipelines route is addressed by: the name's newest record. */
46
+ name: string;
47
+ /** What the Solutions routes are addressed by. */
48
+ key: string;
49
+ }
50
+ /**
51
+ * The activation state the run record itself reports, or `undefined` when it
52
+ * reports none.
53
+ *
54
+ * `deploymentResult.activationStatus` arrived with SOL-7883 (s205); an older
55
+ * server leaves it out, and the callers then derive the state the way they
56
+ * did before. `None` is left out too: the server sends it for a record the
57
+ * activation check never covered, which says nothing about a landed install.
58
+ */
59
+ export declare function reportedActivationStatus(record: {
60
+ activationStatus?: string | null;
61
+ } | null | undefined): string | undefined;
21
62
  /** The fields the state helpers read. Both deployment DTOs carry them. */
22
63
  export interface DeploymentStateRecord {
23
64
  name: string;
@@ -27,33 +68,50 @@ export interface DeploymentStateRecord {
27
68
  packageVersion?: string | null;
28
69
  currentPackageVersion?: string | null;
29
70
  }
30
- /**
31
- * A deployment name as an argument in a suggested command, for the shells the
32
- * suggestion is pasted into. Single quotes only: neither PowerShell nor a
33
- * POSIX shell evaluates anything inside them, so a name carrying `$(…)` or a
34
- * backtick stays a name. Double quotes would not do — both shells expand
35
- * `$(…)` inside them. A name with an apostrophe uses the POSIX
36
- * close-and-reopen escape, `'\''`; PowerShell reads that as a parse error
37
- * rather than running anything, which is the acceptable failure for a name
38
- * that rare.
39
- */
40
- export declare function quoteForShell(name: string): string;
71
+ export { quoteForShell };
41
72
  /**
42
73
  * The resources a deployment still needs configured before it can be
43
- * activated.
74
+ * activated, and why.
44
75
  *
45
- * `GET /api/deployments/{key}/resources` is the one place the service says
46
- * *why* a deployment is not live: every row carries `requiresConfiguration`.
47
- * Ask with the deployment key alone. Its `folderKey` parameter is the
48
- * solution-internal folder, not the Orchestrator folder the deployment landed
49
- * in, and the wrong one is a 400 (measured 2026-09-23).
76
+ * The Pipelines validation result is read first: it takes an external-app
77
+ * token, names the folders, and is the activation check's own list of what
78
+ * blocks the deployment. A server before SOL-7883 (s205) does not have the
79
+ * route, and one with it answers 404 when no validation is held; then — and
80
+ * whenever it holds another action's validation — the Solutions routes
81
+ * answer, as before, for a user session.
50
82
  *
51
- * Best-effort: `undefined` when the read fails — or when the page cap cut the
52
- * listing short, because a partial list presented as "the pending resources"
53
- * would omit rows. Every caller is reporting a state that is already final,
54
- * so neither turns into a failed command; the callers say the read failed.
83
+ * Best-effort: `undefined` when neither could be read. Every caller is
84
+ * reporting a state that is already final, so a failed read never fails the
85
+ * command; the callers say it failed.
86
+ */
87
+ export declare function readPendingResourcesAsync(apis: PendingResourceApis, deployment: PendingResourceTarget, scope?: InitOverrideFunction): Promise<PendingResource[] | undefined>;
88
+ /**
89
+ * What the activation check left unresolved, from
90
+ * `GET /v1/pipelines/deployments/{name}/validation-result` with no action:
91
+ * the server answers with the validation the deployment holds and names it,
92
+ * and only an `Activate` one is the check that keeps a deployment from
93
+ * running. One entry per resource, its error-level texts joined into the
94
+ * reason. `undefined` when the route is missing (an older server), holds no
95
+ * validation, is still running, or holds another action's — the caller falls
96
+ * back. `undefined` as well for an error-level entry that names no resource
97
+ * (a `GeneralError`): it blocks the deployment, but is no resource to list,
98
+ * and an answer without it would claim the resources are the whole story.
99
+ *
100
+ * The route reads the name's newest record, not a key, and its answer names
101
+ * no key. It is this record's only while `deployment.key` is still the
102
+ * current one, so the Pipelines by-key lookup is read *after* the answer and
103
+ * the answer kept only when it resolves the key to itself; a key another
104
+ * operation superseded meanwhile, or a lookup that fails, falls back.
105
+ */
106
+ export declare function readActivationBlockersAsync(api: PipelinesApi, deployment: PendingResourceTarget, scope?: InitOverrideFunction): Promise<PendingResource[] | undefined>;
107
+ /**
108
+ * Whether `key` is still its deployment's current record. The lookup answers
109
+ * a superseded key with the current generation, so a different key back
110
+ * means another operation landed. Sent without a feed header, like every
111
+ * by-key read: it spans every feed. `init` may bound the read (a signal), so
112
+ * pass one without the feed scope.
55
113
  */
56
- export declare function readPendingResourcesAsync(api: DeploymentsApi, deploymentKey: string, scope?: InitOverrideFunction): Promise<PendingResource[] | undefined>;
114
+ export declare function isCurrentRecordAsync(api: PipelinesApi, key: string, init?: InitOverrideFunction): Promise<boolean>;
57
115
  /**
58
116
  * One line naming the resources and, when known, why each needs
59
117
  * configuration: `connection 'Outlook' (uipath-microsoft-outlook365): [CNS1072]
@@ -73,8 +131,10 @@ export declare function formatPendingResources(resources: PendingResource[]): st
73
131
  *
74
132
  * `pendingResources` is what {@link readPendingResourcesAsync} returned:
75
133
  * `undefined` when the read failed, which is said rather than hidden.
134
+ * `feedSelector` (`feedSelectorFlag`) goes on the commands the steps name, so
135
+ * they search the deployment's feed alone instead of sweeping every feed.
76
136
  */
77
- export declare function activationNextSteps(deployment: DeploymentStateRecord, pendingResources?: PendingResource[]): string[] | undefined;
137
+ export declare function activationNextSteps(deployment: DeploymentStateRecord, pendingResources?: PendingResource[], feedSelector?: string): string[] | undefined;
78
138
  /**
79
139
  * Append the deployment's own state to error instructions when that state is
80
140
  * the reason the command was refused — a pending draft, or an install that is
@@ -12,6 +12,11 @@ export declare const NO_SERVER_REASON = "the server reported no reason.";
12
12
  * about.
13
13
  */
14
14
  export declare const LOOKUP_TIMEOUT_MS = 15000;
15
+ /**
16
+ * The caller's scope override plus a deadline, and the caller's own abort
17
+ * signal when it has one, so Ctrl-C still ends the command here.
18
+ */
19
+ export declare function boundedScope(scope: InitOverrideFunction | undefined, signal: AbortSignal | undefined): InitOverrideFunction;
15
20
  /**
16
21
  * Ask the server why an install/upgrade failed. Deployment records carry a
17
22
  * status and no error field, so the validation result is the only place an
@@ -1,3 +1,4 @@
1
+ import { type ContributedBinding } from "@uipath/solution-sdk/resources";
1
2
  export interface EmitRuntimeDependenciesResult {
2
3
  processed: number;
3
4
  warnings: string[];
@@ -34,4 +35,4 @@ export interface EmitRuntimeDependenciesResult {
34
35
  * that doesn't have it set before save; that workaround can come out once
35
36
  * SOL-7012 lands (cleanup tracked under SOL-7013).
36
37
  */
37
- export declare function emitRuntimeDependenciesForProcesses(solutionDir: string): Promise<EmitRuntimeDependenciesResult>;
38
+ export declare function emitRuntimeDependenciesForProcesses(solutionDir: string, projectBindings?: ReadonlyMap<string, readonly ContributedBinding[]>): Promise<EmitRuntimeDependenciesResult>;
@@ -52,10 +52,12 @@ export interface FeedResolutionFailure {
52
52
  /**
53
53
  * Describe a {@link resolveFeedScope} that threw.
54
54
  *
55
- * An external app has no Personal Workspace, and the Orchestrator lookup
56
- * refuses it with a generated-client error that says nothing on its own
57
- * ("Response returned an error code"). So when an external app's lookup is
58
- * refused — the server answered with a 4xx — the failure names the cause.
55
+ * Both lookups answer an external app's refusal with a generated-client
56
+ * error that says nothing on its own ("Response returned an error code"). An
57
+ * external app has no Personal Workspace, and a `--feed` is checked against
58
+ * the Studio Web publish locations, which an app reads only with a
59
+ * `StudioWebS2S` grant. So when an external app's lookup is refused — the
60
+ * server answered with a 4xx — the failure names the cause.
59
61
  * Anything else keeps the error's own classification, for an external app
60
62
  * too: a 5xx, a timeout or a network failure is an outage that another
61
63
  * session would not fix, and must not read as `RetryWillNotFix`.
@@ -0,0 +1,47 @@
1
+ import { type CliErrorCode, type RetryHint } from "@uipath/common";
2
+ import type { SolutionAuthContext } from "@uipath/solution-sdk/auth";
3
+ import { type FeedScope } from "./feed-resolver";
4
+ /** The feed flags of a command that acts on one deployment by name. */
5
+ export interface FeedSelectionFlags {
6
+ /** `--personal-workspace`: the deployment lives in the caller's own PW. */
7
+ personalWorkspace?: boolean;
8
+ /** `--feed <name-or-key>`: the deployment lives in this feed. */
9
+ feed?: string;
10
+ tenant?: string;
11
+ loginValidity?: number;
12
+ envFilePath?: string;
13
+ }
14
+ export type FeedSelection =
15
+ /** `selectedFeed` undefined: no flag, so the caller sweeps the feeds. */
16
+ {
17
+ ok: true;
18
+ selectedFeed?: FeedScope;
19
+ } | {
20
+ ok: false;
21
+ reason: "feed_resolution_failed" | "feed_requires_user_session";
22
+ message: string;
23
+ instructions: string;
24
+ errorCode?: CliErrorCode;
25
+ retry?: RetryHint;
26
+ };
27
+ /**
28
+ * Turn `--personal-workspace` / `--feed` into the feed the deployment lookup
29
+ * reads, so `uninstall`, `activate` and `delete` search that feed alone
30
+ * instead of sweeping every feed (`findDeploymentAcrossFeeds`). The flags are
31
+ * what `feedSelectorFlag` prints into the follow-up commands other commands
32
+ * generate. `--personal-workspace` then costs one search: the workspace is
33
+ * resolved through Orchestrator, not the publish-locations listing. `--feed`
34
+ * costs one publish-locations call (`resolveFeedScope` validates every
35
+ * `--feed` value against the listing, so a raw key is never sent) and one
36
+ * search. Either way it is never a search per feed.
37
+ *
38
+ * These commands mutate, so a non-tenant feed fails **closed** on any session
39
+ * that is not shown to be a user's, like `deploy run`: the server ignores the
40
+ * feed header on client-credentials requests, and the request would act on a
41
+ * tenant deployment of the same name. A Personal Workspace is refused before
42
+ * it is resolved; a `--feed` after, and only when it is not the tenant feed.
43
+ * A flag naming the tenant feed is still a selection: the tenant alone.
44
+ *
45
+ * @param action what the command does, e.g. "Uninstalling a deployment"
46
+ */
47
+ export declare function resolveFeedSelectionAsync(auth: Pick<SolutionAuthContext, "accessToken" | "identity">, flags: FeedSelectionFlags, action: string): Promise<FeedSelection>;
@@ -1,9 +1,4 @@
1
- /**
2
- * The HTTP status an SDK error carries — from the `Response` a generated
3
- * client attaches, or from the error's own `status` — and `undefined` when it
4
- * carries none (a transport failure, a thrown string). Lets a caller tell the
5
- * one status that means "no such record" (404) from every other failure.
6
- */
7
- export declare function httpStatusOf(error: unknown): number | undefined;
1
+ import { httpStatusOf } from "@uipath/common";
2
+ export { httpStatusOf };
8
3
  /** A 401/403: the server refused this login, as opposed to failing. */
9
4
  export declare function isAuthRefusal(error: unknown): boolean;
@@ -34,6 +34,13 @@ export declare class PackCommandService {
34
34
  * Execute the pack command and return result (for programmatic usage and testing)
35
35
  */
36
36
  executeAsync(solutionPath: string, options: PackCommandOptions): Promise<ToolResult>;
37
+ /**
38
+ * `--project`: pack one project of the solution on its own, as a
39
+ * stand-alone project packs (see `pack-project.ts`). Nothing solution-wide
40
+ * runs — no resource sync, no runtime-dependency emit — so the solution
41
+ * folder is not prepared.
42
+ */
43
+ private packProjectAsync;
37
44
  /**
38
45
  * Copy a solution directory into a fresh temp workspace so a dry run can
39
46
  * mutate it freely. Returns `undefined` when no copy is needed (a real
@@ -74,6 +81,8 @@ export declare class PackCommandService {
74
81
  */
75
82
  private resolvePackageName;
76
83
  private createPackOptions;
84
+ /** The `project-packager` options for a `--project` pack of `project`. */
85
+ private createProjectPackOptions;
77
86
  }
78
87
  /**
79
88
  * The failure envelope for a pack the packager refused.
@@ -0,0 +1,51 @@
1
+ import { type CliErrorCode } from "@uipath/common";
2
+ import type { IFileSystem } from "@uipath/filesystem";
3
+ /**
4
+ * `--package-id` renames the one project `--project` packs, so it means nothing
5
+ * without it; `--name` names the solution `.zip`, which `--project` does not
6
+ * produce. Returns the error message, or `undefined` when the options are valid.
7
+ */
8
+ export declare function validatePackProjectOptions(options: {
9
+ project?: string;
10
+ packageId?: string;
11
+ name?: string;
12
+ }): string | undefined;
13
+ /** One `.uipx` project entry, as `solution pack --project` sees it. */
14
+ export interface PackProjectEntry {
15
+ /** The `.uipx` `Id`. */
16
+ id: string;
17
+ /** The `.uipx` `Type`. */
18
+ type: string;
19
+ /** The `.uipx` `ProjectRelativePath`, as written. */
20
+ relativePath: string;
21
+ }
22
+ /**
23
+ * Input `solution pack --project` cannot pack from: a `--project` that names no
24
+ * project of the solution, or more than one, or one with no folder of its own
25
+ * inside the solution; a missing or broken `.uipx`; a solution that is not a
26
+ * folder. Bad input, so it carries `invalid_argument` and the next step.
27
+ */
28
+ export declare class PackProjectError extends Error {
29
+ readonly instructions: string;
30
+ readonly errorCode: CliErrorCode;
31
+ constructor(message: string, instructions: string);
32
+ }
33
+ /**
34
+ * Resolve `--project` to exactly one `.uipx` project entry: by `Id`, or by its
35
+ * path relative to the solution — the project folder or the
36
+ * `ProjectRelativePath` itself. Separators and case are ignored, so a
37
+ * Windows-authored `.uipx` matches a POSIX-typed path and the other way round.
38
+ *
39
+ * Also returns the solution's own name, the `.uipx` basename, which a
40
+ * project's default package id is composed from.
41
+ *
42
+ * Throws {@link PackProjectError} when nothing or more than one entry matches,
43
+ * when the match has no folder of its own inside the solution, and when the
44
+ * `.uipx` is missing or cannot be parsed.
45
+ */
46
+ export declare function resolvePackProjectAsync(fs: IFileSystem, solutionDir: string, selector: string): Promise<{
47
+ project: PackProjectEntry;
48
+ solutionName: string;
49
+ }>;
50
+ /** The project folder part of a `.uipx` `ProjectRelativePath`, with forward slashes. */
51
+ export declare function projectFolder(relativePath: string): string;
@@ -0,0 +1,26 @@
1
+ import type { IFileSystem } from "@uipath/filesystem";
2
+ import { type UiPathProject } from "@uipath/project-packager";
3
+ import { type ProjectPackOptions } from "@uipath/project-packager/node";
4
+ import type { ToolResult } from "@uipath/solutionpackager-tool-core";
5
+ /** The project `--project` named, and the package id to pack it under. */
6
+ export interface SolutionProjectToPack {
7
+ project: UiPathProject;
8
+ packageId: string;
9
+ }
10
+ /**
11
+ * Resolve `--project`, load the tool that packs its type, and run the
12
+ * contribution gate a whole-solution pack runs, for this project only: it is
13
+ * what rejects, say, a Coded Action with no `action-schema.json`.
14
+ *
15
+ * The package id is `--package-id`, else the id a whole-solution pack gives
16
+ * the project — the one the solution saved, else
17
+ * `<solution>.<short type>.<project folder>` — sanitized as the packager will.
18
+ */
19
+ export declare function prepareSolutionProjectAsync(fs: IFileSystem, solutionDir: string, selector: string, packageIdOverride: string | undefined): Promise<SolutionProjectToPack>;
20
+ /**
21
+ * Pack a project {@link prepareSolutionProjectAsync} prepared. A failure keeps
22
+ * the per-project findings a whole-solution pack reports, in
23
+ * `details.projects`, so a caller reads both the same way. A success reports
24
+ * native absolute package paths, and the id in `details.packageIds`.
25
+ */
26
+ export declare function packSolutionProjectAsync(fs: IFileSystem, project: UiPathProject, packOptions: ProjectPackOptions): Promise<ToolResult>;
@@ -11,12 +11,16 @@ export interface PackResult {
11
11
  errorCode: string;
12
12
  /** Human-readable message; populated on failure. */
13
13
  message: string;
14
- /** Absolute paths to the produced `.zip` package(s). */
14
+ /**
15
+ * Absolute paths to the produced package(s): the solution `.zip`, or with
16
+ * `options.project` that project's `.nupkg`.
17
+ */
15
18
  packages: string[];
16
19
  }
17
20
  /**
18
21
  * Programmatic core of `uip solution pack`: packs a UiPath solution into a
19
- * deployable `.zip`. Returns `{ ok: false, … }` on pack failure (does not
20
- * throw); only propagates unexpected JS errors.
22
+ * deployable `.zip`, or with `options.project` one of its projects into a
23
+ * `.nupkg`. Returns `{ ok: false, … }` on pack failure (does not throw); only
24
+ * propagates unexpected JS errors.
21
25
  */
22
26
  export declare function packSolutionAsync(solutionPath: string, options: PackCommandOptions): Promise<PackResult>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The package search lives in `@uipath/solution-sdk/packages`: the Pipelines
3
+ * route first, the deprecated `POST /api/search/packages` only on a server
4
+ * without it. Re-exported here so this package's callers, and the specs that
5
+ * mock this module, keep one local path to it.
6
+ */
7
+ export { PackageSearchNeedsUserSessionError, searchPackagesPage, } from "@uipath/solution-sdk/packages";
@@ -28,5 +28,11 @@ export { toolVerbForProjectType } from "./project-type-tools";
28
28
  * This is the only place that registers — no tool registers at module load —
29
29
  * so a run that loads several tool bundles never registers the same factory
30
30
  * twice.
31
+ *
32
+ * `onlyProjectRelativePath` narrows the check to the one project a
33
+ * `pack --project` run packs, so a sibling of a type nothing packs does not
34
+ * block it and the tools for its siblings are not loaded.
31
35
  */
32
- export declare function ensurePackagerTools(solutionDir: string, fs: IFileSystem): Promise<void>;
36
+ export declare function ensurePackagerTools(solutionDir: string, fs: IFileSystem, options?: {
37
+ onlyProjectRelativePath?: string;
38
+ }): Promise<void>;
@@ -19,7 +19,7 @@ export interface PackageSummary {
19
19
  solutionRootFolderName: string;
20
20
  hasUpgradeableDeployments: boolean;
21
21
  }
22
- export type ListPackagesFailureReason = "auth_failed" | "feed_resolution_failed" | "list_request_failed";
22
+ export type ListPackagesFailureReason = "auth_failed" | "feed_resolution_failed" | "feed_requires_user_session" | "list_request_failed";
23
23
  export interface ListPackagesOptions {
24
24
  /** Override the active tenant for auth. The CLI's deprecated `--tenant` flag flows through here. */
25
25
  tenant?: string;