@uipath/solution-tool 1.204.0 → 1.205.0-preview.258

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-rc5e42hk.js +149 -0
  5. package/dist/deploy-delete-service-qdbtj3qd.js +25 -0
  6. package/dist/deploy-run-service-m9mg34n5.js +25 -0
  7. package/dist/{deploy-status-service-3req7hje.js → deploy-status-service-kz3nk43q.js} +41 -33
  8. package/dist/deploy.js +23 -17
  9. package/dist/{deployment-search-3mah6f0a.js → deployment-search-jvwyaqek.js} +16 -10
  10. package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
  11. package/dist/{feed-resolver-bxj9xkgr.js → feed-resolver-3xb7ayx4.js} +10 -9
  12. package/dist/feed-scope-failure-qps17dv3.js +19 -0
  13. package/dist/{feed-session-sxga31vn.js → feed-session-7xqphdrg.js} +3 -3
  14. package/dist/governance-options-amc1v319.js +32 -0
  15. package/dist/index-6wak6hg6.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-s5pkkefj.js → list-7jy11vb4.js} +10 -8
  20. package/dist/models/pack-command-types.d.ts +15 -0
  21. package/dist/node-p1scvsw8.js +86 -0
  22. package/dist/pack-command-service-8etwpgm9.js +35 -0
  23. package/dist/pack-project-hjvbvhgx.js +97 -0
  24. package/dist/pack.js +24 -14
  25. package/dist/package-id-c18sx4mz.js +13 -0
  26. package/dist/packager-tool-09fwj7e8.js +171 -0
  27. package/dist/{packager-tool-nfmygm61.js → packager-tool-361zx07h.js} +74 -23
  28. package/dist/packager-tool-37jmavap.js +42 -0
  29. package/dist/{packager-tool-px1j9kre.js → packager-tool-3bwnkjdq.js} +2 -2
  30. package/dist/{packager-tool-gb35b4qs.js → packager-tool-43ahv5mn.js} +192 -96
  31. package/dist/packager-tool-47wzvqw0.js +86 -0
  32. package/dist/{packager-tool-gfhdpkp3.js → packager-tool-4bq36bf5.js} +25 -4
  33. package/dist/packager-tool-4jekgh4s.js +517 -0
  34. package/dist/{packager-tool-zns6n8zp.js → packager-tool-5ddtwzva.js} +1 -1
  35. package/dist/packager-tool-5edvzz80.js +543 -0
  36. package/dist/packager-tool-5y09xhx5.js +1333 -0
  37. package/dist/packager-tool-60af1hw2.js +26 -0
  38. package/dist/{packager-tool-f5gq77m5.js → packager-tool-61pwb567.js} +2 -2
  39. package/dist/{packager-tool-kdwsw2x7.js → packager-tool-69jmxeh0.js} +196 -1519
  40. package/dist/{packager-tool-yrz4mwfn.js → packager-tool-6kz1pv9f.js} +1373 -486
  41. package/dist/{packager-tool-stsnbewn.js → packager-tool-6x35kvbx.js} +17 -8
  42. package/dist/packager-tool-6ybywxxn.js +1809 -0
  43. package/dist/{packager-tool-wfkv9v8b.js → packager-tool-85pen8t9.js} +2196 -3455
  44. package/dist/packager-tool-8ptbmmmp.js +2132 -0
  45. package/dist/{packager-tool-9ex75r32.js → packager-tool-8q4tvv8d.js} +6 -4
  46. package/dist/packager-tool-8rg0s4w9.js +109 -0
  47. package/dist/{packager-tool-7gr2nphb.js → packager-tool-97rcgwvv.js} +224 -6
  48. package/dist/packager-tool-act5r386.js +239 -0
  49. package/dist/packager-tool-amhyxzz6.js +125 -0
  50. package/dist/{packager-tool-j3520gxw.js → packager-tool-an5bpbwe.js} +3556 -1646
  51. package/dist/{packager-tool-e2rtr49j.js → packager-tool-b2nhscfk.js} +15 -31
  52. package/dist/packager-tool-bqw7edje.js +188 -0
  53. package/dist/{packager-tool-4gs8y6pr.js → packager-tool-dwxswyv4.js} +149 -53
  54. package/dist/{packager-tool-fehvgd51.js → packager-tool-e7vczxa8.js} +357 -1370
  55. package/dist/{packager-tool-v8bkkqdb.js → packager-tool-gmwva4yv.js} +5 -5
  56. package/dist/packager-tool-gs3f3tf7.js +103 -0
  57. package/dist/packager-tool-kkfb5kgn.js +182 -0
  58. package/dist/{packager-tool-ds45xby2.js → packager-tool-m74zqwmh.js} +104 -14
  59. package/dist/{packager-tool-fv7xyzg2.js → packager-tool-pbmqk39a.js} +126 -128
  60. package/dist/packager-tool-q5j6k3fy.js +1510 -0
  61. package/dist/packager-tool-qk21gk5m.js +445 -0
  62. package/dist/{packager-tool-bqre28m1.js → packager-tool-qw47eyw7.js} +1 -1
  63. package/dist/packager-tool-resolver-994z3jkj.js +23 -0
  64. package/dist/{packager-tool-gab9y5ct.js → packager-tool-t8gh825q.js} +37 -13
  65. package/dist/{packager-tool-kswwd3hp.js → packager-tool-tx834spe.js} +2376 -4077
  66. package/dist/{packager-tool-zf3929se.js → packager-tool-v1f5e8t9.js} +11 -1
  67. package/dist/{packager-tool-g8kjzrg7.js → packager-tool-wknfv4p5.js} +13 -11
  68. package/dist/{packager-tool-1rzssy0x.js → packager-tool-wy4fx250.js} +19 -18
  69. package/dist/packager-tool-y2k2f6yg.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-eyx911f2.js +155 -0
  79. package/dist/run-service-p1vzzqe3.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-1zydyyhj.js +0 -22
  116. package/dist/feed-scope-failure-2kndwpf6.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
@@ -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;
@@ -0,0 +1,110 @@
1
+ import { type CliErrorCode, extractErrorDetails, type RetryHint } from "@uipath/common";
2
+ import type { DeploymentValidationErrorDto, PipelineDeploymentResult, PipelinesApi } from "@uipath/pipelines-sdk";
3
+ import type { InitOverrideFunction } from "@uipath/solution-sdk";
4
+ /**
5
+ * An installed resource the deployment replaces with a link, which the server
6
+ * deletes — with its data — when the deployment runs.
7
+ */
8
+ export interface PermanentDeletionResource {
9
+ /** `DeploymentResource.Key`: what the acknowledge route takes. */
10
+ key: string;
11
+ name: string;
12
+ kind?: string;
13
+ }
14
+ /**
15
+ * Did the pipeline stop because the server wants the permanent deletion of
16
+ * linked-over resources confirmed? A structured match on the schedule error's
17
+ * code, never on its text.
18
+ */
19
+ export declare function isPermanentDeletionRefusal(status: Pick<PipelineDeploymentResult, "status" | "deploymentScheduleErrors"> | undefined): boolean;
20
+ /**
21
+ * The rows the UI's confirmation dialog lists: `RequiresConfirmation` warnings
22
+ * with a key, one per key, named by their name (or key).
23
+ */
24
+ export declare function selectPermanentDeletionResources(validationErrors: readonly DeploymentValidationErrorDto[]): PermanentDeletionResource[];
25
+ /**
26
+ * The resources the deployment's current validation flags for permanent
27
+ * deletion, or undefined when they cannot be read — a 409 while the
28
+ * validation is still running, a server without the route, anything else.
29
+ * The caller decides what an unreadable list means; it must never be taken
30
+ * for "nothing to confirm".
31
+ *
32
+ * The route reads the name's newest record, not a key. Its answer is the
33
+ * record this run acted on (`deploymentKey`) only while that key is still the
34
+ * current one, so the by-key lookup is read after the answer and the answer
35
+ * kept only when it resolves the key to itself — the same check
36
+ * `readActivationBlockersAsync` makes. No key, a key another actor superseded
37
+ * meanwhile, or a failed lookup is unreadable: otherwise the CLI could
38
+ * acknowledge, and re-run, someone else's draft. The lookup is bounded like
39
+ * the read, but carries no feed header: by-key reads span every feed.
40
+ */
41
+ export declare function listPermanentDeletionResourcesAsync(api: PipelinesApi, deploymentName: string, deploymentKey: string | undefined, scope: InitOverrideFunction | undefined, signal: AbortSignal | undefined): Promise<PermanentDeletionResource[] | undefined>;
42
+ /** A PATCH the server refused, with the resource it was for. */
43
+ export declare class AcknowledgePermanentDeletionError extends Error {
44
+ readonly resource: PermanentDeletionResource;
45
+ readonly detail: Awaited<ReturnType<typeof extractErrorDetails>>;
46
+ constructor(resource: PermanentDeletionResource, detail: Awaited<ReturnType<typeof extractErrorDetails>>);
47
+ }
48
+ /**
49
+ * Acknowledge each resource, one PATCH at a time, stopping at the first the
50
+ * server refuses ({@link AcknowledgePermanentDeletionError}).
51
+ */
52
+ export declare function acknowledgePermanentDeletionAsync(api: PipelinesApi, deploymentName: string, resources: readonly PermanentDeletionResource[], scope: InitOverrideFunction | undefined, signal: AbortSignal | undefined): Promise<void>;
53
+ /** `bucket 'Invoices', queue 'Orders'`. */
54
+ export declare function formatPermanentDeletionResources(resources: readonly PermanentDeletionResource[]): string;
55
+ export declare const ACKNOWLEDGE_PERMANENT_DELETION_FLAG = "--acknowledge-permanent-deletion";
56
+ /** How a deploy that stopped for confirmation is reported. */
57
+ export interface PermanentDeletionRefusal {
58
+ reason: "permanent_deletion_confirmation_required" | "acknowledge_failed";
59
+ message: string;
60
+ instructions: string;
61
+ /** The flagged resources, when they could be read. */
62
+ resources?: PermanentDeletionResource[];
63
+ classification: {
64
+ errorCode?: CliErrorCode;
65
+ retry?: RetryHint;
66
+ };
67
+ }
68
+ export interface PermanentDeletionConsentRequest {
69
+ api: PipelinesApi;
70
+ deploymentName: string;
71
+ scope: InitOverrideFunction | undefined;
72
+ signal: AbortSignal | undefined;
73
+ /** `--acknowledge-permanent-deletion` was passed. */
74
+ acknowledge: boolean;
75
+ /** The refused run's terminal status. */
76
+ status: PipelineDeploymentResult;
77
+ /** "Deploying" / "Upgrading", to open the message. */
78
+ verb: string;
79
+ /** How to confirm, as a clause naming the flag ("re-run the same command with …"). */
80
+ confirmHint: string;
81
+ /** How to keep the installed copies instead, as a clause. */
82
+ keepCopiesHint: string;
83
+ }
84
+ /**
85
+ * Settle a refusal {@link isPermanentDeletionRefusal} matched: read what the
86
+ * server wants confirmed, then either report it (no flag) or acknowledge it.
87
+ * Returns the acknowledged resources, after which the caller re-runs the same
88
+ * install once, or the failure to report. Never acknowledges a list it could
89
+ * not read: consent is given for named resources only.
90
+ *
91
+ * The acknowledge route is name-scoped and takes no key precondition, so an
92
+ * install that replaces the draft between the identity check and the PATCHes
93
+ * would receive this consent. The CLI cannot close that window; it narrows it
94
+ * by re-checking the record after the PATCHes and, when it changed, refuses
95
+ * to re-run the install — a narrowing, not a guarantee.
96
+ */
97
+ export declare function settlePermanentDeletionRefusalAsync(request: PermanentDeletionConsentRequest): Promise<{
98
+ ok: true;
99
+ resources: PermanentDeletionResource[];
100
+ } | ({
101
+ ok: false;
102
+ } & PermanentDeletionRefusal)>;
103
+ /**
104
+ * The sentence a synchronously refused re-run adds to its failure: the
105
+ * acknowledgement stays on the kept draft, while nothing was deleted yet —
106
+ * the deletion happens only when an install runs.
107
+ */
108
+ export declare function acknowledgedButNotRunHint(resources: readonly PermanentDeletionResource[], keepCopiesHint: string): string;
109
+ /** A second refusal after every listed resource was acknowledged: no loop. */
110
+ export declare function stillRequiresConfirmation(deploymentName: string, resources: readonly PermanentDeletionResource[], deploymentKey: string | undefined): PermanentDeletionRefusal;
@@ -38,6 +38,13 @@ export interface PipelineDeployPollOptions {
38
38
  export type PolledPipelineResult = PipelineDeploymentResult & {
39
39
  synthesizedOperation?: string;
40
40
  };
41
+ /**
42
+ * What is left of a `timeoutMs` budget that started when `deadline` was set
43
+ * (`Date.now() + timeoutMs`), for a second poll that must share it. Never 0
44
+ * once spent: `pollUntil` reads 0 as "no deadline", which would turn an
45
+ * exhausted budget into an unbounded wait. A budget of 0 stays 0.
46
+ */
47
+ export declare function remainingTimeoutMs(timeoutMs: number, deadline: number): number;
41
48
  /**
42
49
  * Poll a Pipelines install to a terminal state.
43
50
  *
@@ -1,4 +1,5 @@
1
1
  import type { IFileSystem } from "@uipath/filesystem";
2
+ import { type ContributedBinding } from "@uipath/solution-sdk/resources";
2
3
  import { type ProjectContributions } from "./project-contributions";
3
4
  export interface PrepareResult {
4
5
  /** Contributed problems (when not gating), skips, and unmatched patches. */
@@ -13,6 +14,12 @@ export interface PrepareResult {
13
14
  * reconciler, and nothing in between reads it (AGENTS.md Hard Rule #19).
14
15
  */
15
16
  export declare function projectSubTypesFrom(contributions: ProjectContributions): ReadonlyMap<string, string>;
17
+ /**
18
+ * The bindings each project's own tool contributed, keyed by `.uipx` project
19
+ * `Id`. Plain `bindings_v2.json` resource entries; the sync reads them in
20
+ * place of the project's `bindings_v2.json` file.
21
+ */
22
+ export declare function projectBindingsFrom(contributions: ProjectContributions): ReadonlyMap<string, readonly ContributedBinding[]>;
16
23
  /**
17
24
  * Bring a solution directory's resource JSONs in line with its projects'
18
25
  * authored files. Every path that reads those resources for real — `pack`,
@@ -28,12 +35,15 @@ export declare function projectSubTypesFrom(contributions: ProjectContributions)
28
35
  * must fail before any write, not leave half-synced resources behind.
29
36
  * 4. sync — carries the contributed subTypes, which is what lets reconcile
30
37
  * generate (or repair) artefact resources for a type whose template row is
31
- * keyed `<type>_<subType>`.
38
+ * keyed `<type>_<subType>`, and the contributed bindings of a type that
39
+ * keeps them in its own source format (a Flow's `.flow`).
32
40
  * 5. apply — after the sync, because the sync can create the app resource a
33
41
  * patch targets. An unmatched patch here is a contributor bug, not a race,
34
42
  * which is why gating callers also fail on one.
35
43
  * 6. runtime dependencies — mirrors Orchestrator BE's
36
- * `ProcessesExportHandlerBase.GetRuntimeDependenciesAsync`.
44
+ * `ProcessesExportHandlerBase.GetRuntimeDependenciesAsync`. It gets the
45
+ * same contributed bindings the sync used, so a project whose source is
46
+ * not its `bindings_v2.json` cannot have the two stages disagree.
37
47
  */
38
48
  export declare function prepareSolutionResources(solutionDir: string, fs: IFileSystem, options?: {
39
49
  gate?: boolean;
@@ -4,13 +4,11 @@ import { type ProjectContributionError, type ProjectResourceContribution } from
4
4
  export interface ProjectContributions {
5
5
  /** Per project key (the `.uipx` `Id`), what that project's factory returned. */
6
6
  byProject: Map<string, ProjectResourceContribution>;
7
- /** Supported types whose registered factory has no `describeResourcesAsync`. */
8
- skipped: string[];
9
7
  }
10
8
  export interface ApplyContributionsResult {
11
9
  /** Number of artefact resources whose spec was rewritten. */
12
10
  updated: number;
13
- /** Patches that matched no resource, plus the collect-time skip notices. */
11
+ /** Patches that matched no resource, and entry points that could not be read. */
14
12
  warnings: string[];
15
13
  }
16
14
  /**
@@ -33,8 +31,11 @@ export declare class ProjectContributionsError extends Error {
33
31
  *
34
32
  * Reads project files only, which `syncAndLog` never touches, so collecting
35
33
  * before the sync and applying after it cannot see two different states.
34
+ *
35
+ * `onlyProjectId` restricts the walk to one `.uipx` project `Id` — the one a
36
+ * `pack --project` run packs.
36
37
  */
37
- export declare function collectProjectContributions(solutionDir: string, fs?: IFileSystem): Promise<ProjectContributions>;
38
+ export declare function collectProjectContributions(solutionDir: string, fs?: IFileSystem, onlyProjectId?: string): Promise<ProjectContributions>;
38
39
  /** Throws once with every collected error. Pack's gate. */
39
40
  export declare function assertNoContributionErrors(contributions: ProjectContributions): void;
40
41
  /**
@@ -1,5 +1,4 @@
1
1
  import { type CliErrorCode, type ErrorContext, type RetryHint } from "@uipath/common";
2
- import type { SolutionAuthContext } from "@uipath/solution-sdk/auth";
3
2
  /** Everything an envelope needs to report a failed Solution Search listing. */
4
3
  export interface SearchFailure {
5
4
  message: string;
@@ -9,19 +8,16 @@ export interface SearchFailure {
9
8
  context?: ErrorContext;
10
9
  }
11
10
  /**
12
- * Describe a failed Solution Search listing (`packages list`, `deploy list`).
11
+ * Describe a failed search listing (`packages list`, `deploy list`): the
12
+ * service's own message, with its HTTP status classified into `errorCode` /
13
+ * `retry`.
13
14
  *
14
- * The packages search accepts user tokens only, so it answers an external app
15
- * with a 401. The generic 401 text says the session is missing or expired,
16
- * which sends a client-credentials pipeline in a circle: logging in again
17
- * mints the same kind of token. For that session the failure names the cause
18
- * instead. The Pipelines deployment search `deploy list` reads accepts
19
- * application tokens, so it passes `userSessionsOnly: false`: there an app's
20
- * 401 is the session's own failure. Every other failure keeps the service's
21
- * own message, with its HTTP status classified into `errorCode` / `retry`.
15
+ * Both searches go to Pipelines routes that accept application tokens, so an
16
+ * app's 401 is the session's own failure. The deprecated user-only routes
17
+ * they fall back to are never asked for an app: the search clients throw
18
+ * `PackageSearchNeedsUserSessionError` / `DeploymentSearchNeedsUserSessionError`
19
+ * instead, which the callers report themselves.
22
20
  *
23
21
  * @param what the rows being listed, e.g. "packages"
24
22
  */
25
- export declare function describeSearchFailureAsync(error: unknown, what: string, session: Pick<SolutionAuthContext, "accessToken" | "identity">, { userSessionsOnly }: {
26
- userSessionsOnly: boolean;
27
- }): Promise<SearchFailure>;
23
+ export declare function describeSearchFailureAsync(error: unknown, what: string): Promise<SearchFailure>;
@@ -1,7 +1,10 @@
1
+ import { type LoginStatus } from "@uipath/auth";
1
2
  import type { IFileSystem } from "@uipath/filesystem";
2
- import { type ISolutionPackager, type SolutionPackOptions } from "@uipath/solution-packager/node";
3
+ import type { PackagerParameters } from "@uipath/project-packager";
4
+ import { type ISolutionPackager } from "@uipath/solution-packager/node";
3
5
  import { LogLevel } from "@uipath/solutionpackager-tool-core";
4
6
  export declare function createSolutionPackager(): Promise<ISolutionPackager>;
5
7
  export declare function readSolutionFileAsUint8Array(fs: IFileSystem, filePath: string): Promise<Uint8Array>;
6
8
  export declare function resolveSdkLogLevel(): LogLevel;
7
- export declare function applyAuthConnection(options: SolutionPackOptions, loginValidity?: number): Promise<void>;
9
+ /** Sets the session's connection on the options, and returns the session. */
10
+ export declare function applyAuthConnection(options: PackagerParameters, loginValidity?: number): Promise<LoginStatus>;
@@ -1,7 +1,7 @@
1
1
  import { type CliErrorCode } from "@uipath/common";
2
2
  import type { FileSystemStats, IFileSystem } from "@uipath/filesystem";
3
3
  /**
4
- * Next-step hint for a bad `<solutionPath>`. Restore, pack and cleanup accept
4
+ * Next-step hint for a bad `<solution-path>`. Restore, pack and cleanup accept
5
5
  * exactly the same two shapes, so they give the same advice.
6
6
  */
7
7
  export declare const SOLUTION_PATH_INSTRUCTIONS = "Ensure the solution path exists and points to a solution directory (containing .uipx) or a .uis file.";
@@ -0,0 +1,82 @@
1
+ import type { DeploymentValidationErrorDto, PipelineDeploymentValidationResult, PipelinesApi } from "@uipath/pipelines-sdk";
2
+ /** Orchestrator's `JobsNotInFinalState`: the folder still has unfinished jobs. */
3
+ export declare const JOBS_NOT_IN_FINAL_STATE_CODE = "2824";
4
+ /**
5
+ * The uninstall route's synchronous refusal (HTTP 409): the deployment holds
6
+ * an Uninstall validation with unacknowledged `RequiresConfirmation` warnings.
7
+ */
8
+ export declare const UNINSTALL_CONFIRMATION_REQUIRED_CODE = "4026";
9
+ /**
10
+ * - `blocked`: at least one row fails the validation and `--force` cannot get
11
+ * past it.
12
+ * - `force-required`: nothing blocks, and at least one row is a refusal
13
+ * `--force` gets past.
14
+ * - `clear`: nothing to force.
15
+ */
16
+ export type UninstallValidationOutcome = "force-required" | "blocked" | "clear";
17
+ /** A resource the uninstall deletes for good (it was replaced by a link). */
18
+ export interface PermanentDeletionResource {
19
+ key?: string;
20
+ kind?: string;
21
+ name?: string;
22
+ }
23
+ export interface UninstallConsentFacts {
24
+ jobsNotInFinalState: boolean;
25
+ /** A `RequiresConfirmation` row of any level: the uninstall deletes for good. */
26
+ requiresConfirmation: boolean;
27
+ /** The printable subset: the warning-level confirmation rows, one per key. */
28
+ permanentDeletionResources: PermanentDeletionResource[];
29
+ }
30
+ export interface UninstallValidationClassification extends UninstallConsentFacts {
31
+ outcome: UninstallValidationOutcome;
32
+ }
33
+ /**
34
+ * The facts a set of validation rows establishes. The causes come from the
35
+ * rows themselves: a confirmation row that is not printable (not warning
36
+ * level) still names permanent deletion, only without the list.
37
+ */
38
+ export declare function uninstallConsentFacts(rows: readonly DeploymentValidationErrorDto[]): UninstallConsentFacts;
39
+ /**
40
+ * The resources a forced uninstall deletes permanently: the confirmation
41
+ * warnings, one entry per resource.
42
+ */
43
+ export declare function selectPermanentDeletionResources(rows: readonly DeploymentValidationErrorDto[]): PermanentDeletionResource[];
44
+ /**
45
+ * The rows `--force` cannot get past, one clause each: `[code] text`, led by
46
+ * the resource (`kind 'name'`) when the row names one.
47
+ */
48
+ export declare function describeBlockingRows(rows: readonly DeploymentValidationErrorDto[]): string;
49
+ /**
50
+ * Classify a persisted Uninstall validation row by row. The result's
51
+ * `success` decides nothing: the SDK may omit it, and an omitted verdict must
52
+ * not turn a blocking row into a `--force` recommendation.
53
+ */
54
+ export declare function classifyUninstallValidation(result: Pick<PipelineDeploymentValidationResult, "validationErrors">): UninstallValidationClassification;
55
+ /**
56
+ * The deployment's persisted Uninstall validation, or `undefined` when it
57
+ * cannot be had: a server without the route (404), a validation still
58
+ * running (409), any other failure, or a result for another action.
59
+ *
60
+ * The route reads the name's newest record and names no key, so the answer
61
+ * is kept only while `deploymentKey` (the record the uninstall acted on) is
62
+ * still that newest record. No key, a superseded or unknown key, or a failed
63
+ * lookup: the validation may describe another generation, so it is unread.
64
+ */
65
+ export declare function readUninstallValidationAsync(api: PipelinesApi, deploymentName: string, deploymentKey: string | null | undefined, scope?: Parameters<PipelinesApi["pipelinesGetDeploymentValidationResult"]>[1]): Promise<PipelineDeploymentValidationResult | undefined>;
66
+ /**
67
+ * Whether a failed run's service errors carry the jobs refusal. The lines are
68
+ * `formatServiceErrors` output: the `[2824]` comes from a service's
69
+ * JSON-encoded `errorMessage`, since `serviceErrorMessages` is text-only.
70
+ */
71
+ export declare function servicesReportJobsNotInFinalState(serviceLines: readonly string[]): boolean;
72
+ /** `kind 'name'`, falling back to the key. */
73
+ export declare function formatPermanentDeletionResource(resource: PermanentDeletionResource): string;
74
+ /** The sentence naming what permanent deletion takes, with the list when known. */
75
+ export declare function describePermanentDeletion(resources: readonly PermanentDeletionResource[]): string;
76
+ /** The force-able causes, joined into one clause. */
77
+ export declare function describeForceableCauses(facts: UninstallConsentFacts): string;
78
+ /** The structured facts for the failure's `Data`, PascalCased as printed. */
79
+ export declare function consentData(facts: UninstallConsentFacts, extra: {
80
+ deploymentName: string;
81
+ instanceId?: string | null;
82
+ }): Record<string, unknown>;
@@ -0,0 +1,21 @@
1
+ import {
2
+ inspectSolutionPackageProjectTypes,
3
+ normalizeShipProjectType,
4
+ summarizeShipProjectTypes,
5
+ trackSolutionShipSucceeded,
6
+ unzipProjectManifests
7
+ } from "./packager-tool-amhyxzz6.js";
8
+ import"./packager-tool-tx834spe.js";
9
+ import"./packager-tool-6ybywxxn.js";
10
+ import"./packager-tool-v1f5e8t9.js";
11
+ import"./packager-tool-dfrk01gn.js";
12
+ import"./packager-tool-1de529jm.js";
13
+ export {
14
+ inspectSolutionPackageProjectTypes,
15
+ normalizeShipProjectType,
16
+ summarizeShipProjectTypes,
17
+ trackSolutionShipSucceeded,
18
+ unzipProjectManifests
19
+ };
20
+
21
+ //# debugId=82CFC21EA48BFC2364756E2164756E21
@@ -0,0 +1,11 @@
1
+ import {
2
+ getSolutionAuthContext
3
+ } from "./packager-tool-61pwb567.js";
4
+ import"./packager-tool-43ahv5mn.js";
5
+ import"./packager-tool-v1f5e8t9.js";
6
+ import"./packager-tool-1de529jm.js";
7
+ export {
8
+ getSolutionAuthContext
9
+ };
10
+
11
+ //# debugId=4D0CD43FE95C1EC164756E2164756E21