@uipath/solution-tool 1.198.0 → 1.199.0-preview.105
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.
- package/README.md +1 -1
- package/dist/commands/package-command-utils.d.ts +4 -0
- package/dist/commands/project-add.d.ts +2 -0
- package/dist/commands/project-import.d.ts +2 -0
- package/dist/commands/project-list.d.ts +2 -0
- package/dist/commands/project-publish.d.ts +2 -0
- package/dist/commands/project-remove.d.ts +2 -0
- package/dist/commands/project-resync.d.ts +2 -0
- package/dist/commands/project-utils.d.ts +60 -0
- package/dist/commands/project.d.ts +3 -0
- package/dist/deploy.js +99 -10
- package/dist/init.d.ts +8 -0
- package/dist/init.js +47610 -8921
- package/dist/models/pack-command-types.d.ts +7 -0
- package/dist/pack.js +43081 -29364
- package/dist/packager-tool.js +6 -4
- package/dist/providers/resource-builder-init.d.ts +1 -1
- package/dist/publish.js +13 -6
- package/dist/resource.js +557 -73
- package/dist/services/deploy-list-service.d.ts +24 -2
- package/dist/services/deploy-run-service.d.ts +6 -0
- package/dist/services/deployment-search.d.ts +9 -1
- package/dist/services/entry-point-spec-enhancer.d.ts +1 -1
- package/dist/services/local-resource-matcher.d.ts +27 -0
- package/dist/services/pack-command-service.d.ts +8 -0
- package/dist/services/project-artifacts-service.d.ts +34 -0
- package/dist/services/sync-resources-from-bindings.d.ts +1 -8
- package/dist/templates/AGENTS.md +7 -7
- package/dist/tool.js +75007 -74016
- package/dist/utils/option-parsers.d.ts +1 -0
- package/dist/utils/poll-result-handler.d.ts +11 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Per-deployment row in {@link ListDeploymentsSuccess.deployments}. Mirrors
|
|
3
|
-
* the
|
|
4
|
-
* published `.d.ts` stays off the SDK's const-enum types.
|
|
3
|
+
* the SDK fields the CLI emits; string-enums widened to `string`/`string[]`
|
|
4
|
+
* so the published `.d.ts` stays off the SDK's const-enum types.
|
|
5
5
|
*/
|
|
6
6
|
export interface DeploymentSummary {
|
|
7
7
|
key: string;
|
|
@@ -9,11 +9,21 @@ export interface DeploymentSummary {
|
|
|
9
9
|
name: string;
|
|
10
10
|
packageName: string;
|
|
11
11
|
packageVersion: string;
|
|
12
|
+
/** Version the deployment currently runs. Absent until a version is installed. */
|
|
13
|
+
currentPackageVersion?: string | null;
|
|
14
|
+
/** Version a pending in-place upgrade targets. Differs from `currentPackageVersion` when an upgrade is queued. */
|
|
15
|
+
targetPackageVersion?: string | null;
|
|
16
|
+
/** A newer published version, when one exists — the upgrade the deployment can move to. */
|
|
17
|
+
newPackageVersionAvailable?: string | null;
|
|
18
|
+
/** The last/pending deployment operation (e.g. `Install`, `VersionChange`). */
|
|
19
|
+
operation: string;
|
|
12
20
|
operationStatus: string;
|
|
13
21
|
activationStatus: string;
|
|
14
22
|
folderPath?: string | null;
|
|
15
23
|
installedRootFolderKey?: string | null;
|
|
16
24
|
deploymentCreationTime: Date;
|
|
25
|
+
/** Pending workflow actions (e.g. `Upgrade`) — a queued in-place upgrade shows `["Upgrade"]`. */
|
|
26
|
+
actions: string[];
|
|
17
27
|
}
|
|
18
28
|
export type ListDeploymentsFailureReason = "auth_failed" | "folder_resolution_failed" | "list_request_failed";
|
|
19
29
|
/** Local mirror of solution-sdk's `OrderByDirection`; declared here so the `.d.ts` stays off the SDK type. */
|
|
@@ -35,6 +45,18 @@ export interface ListDeploymentsOptions {
|
|
|
35
45
|
sortBy?: string;
|
|
36
46
|
/** Sort direction. Default `"Descending"`. */
|
|
37
47
|
sortOrder?: SortDirection;
|
|
48
|
+
/**
|
|
49
|
+
* Filter to these deployment operation statuses (e.g. `"InProgress"`).
|
|
50
|
+
* Sent to the search request's `operationStatuses` array — filters
|
|
51
|
+
* server-side, unlike {@link folderPath}.
|
|
52
|
+
*/
|
|
53
|
+
operationStatuses?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Filter to these deployment activation statuses (e.g. `"Active"`).
|
|
56
|
+
* Sent to the search request's `activationStatuses` array — filters
|
|
57
|
+
* server-side, unlike {@link folderPath}.
|
|
58
|
+
*/
|
|
59
|
+
activationStatuses?: string[];
|
|
38
60
|
/** Minimum minutes before token expiration to trigger a refresh. Default 10. */
|
|
39
61
|
loginValidity?: number;
|
|
40
62
|
}
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
export type DeployFailureReason = "auth_failed" | "folder_resolution_failed" | "config_file_not_found" | "config_file_read_failed" | "config_file_parse_failed" | "install_request_failed"
|
|
3
3
|
/** Personal Workspace deploy via AS auto-deploy failed (publish first, then retry). */
|
|
4
4
|
| "personal_workspace_deploy_failed"
|
|
5
|
+
/**
|
|
6
|
+
* Redeploy blocked: a deployment for this solution already exists (HTTP 400
|
|
7
|
+
* "Deployment exists in a failed or running state") and must be upgraded in
|
|
8
|
+
* place instead of redeployed.
|
|
9
|
+
*/
|
|
10
|
+
| "deployment_exists"
|
|
5
11
|
/** Recovery: deployment completed but flagged "Needs Setup" — manual config required before activation. */
|
|
6
12
|
| "needs_setup_to_activate"
|
|
7
13
|
/** Recovery: deployment completed, ready to activate — auto-activation didn't run. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PipelineDeploymentResult, PipelineDeploymentStatus } from "@uipath/pipelines-sdk";
|
|
2
|
-
import type { DeploymentOperationStatus, DeploymentSearchItemDto2 } from "@uipath/solution-sdk";
|
|
2
|
+
import type { DeploymentOperationStatus, DeploymentSearchItemDto2, InitOverrideFunction } from "@uipath/solution-sdk";
|
|
3
3
|
import type { SolutionAuthContext } from "./auth-helper";
|
|
4
4
|
/**
|
|
5
5
|
* Look up a deployment by name in the persistent search/list service.
|
|
@@ -10,6 +10,14 @@ import type { SolutionAuthContext } from "./auth-helper";
|
|
|
10
10
|
* when you want a best-effort lookup that swallows failures.
|
|
11
11
|
*/
|
|
12
12
|
export declare function findDeploymentByName(auth: SolutionAuthContext, deploymentName: string): Promise<DeploymentSearchItemDto2 | undefined>;
|
|
13
|
+
/**
|
|
14
|
+
* Best-effort lookup of the deployment that blocks a redeploy of `packageName`.
|
|
15
|
+
* Pages `searchSearchDeployments22` by substring like {@link findDeploymentByName},
|
|
16
|
+
* then returns the first row whose `packageName` matches exactly (and, when
|
|
17
|
+
* `folderPath` is given, whose `folderPath` matches too). Swallows any lookup
|
|
18
|
+
* failure and returns undefined so the caller's original error always surfaces.
|
|
19
|
+
*/
|
|
20
|
+
export declare function findDeploymentByPackageName(auth: SolutionAuthContext, packageName: string, folderPath?: string, scope?: InitOverrideFunction): Promise<DeploymentSearchItemDto2 | undefined>;
|
|
13
21
|
/**
|
|
14
22
|
* Best-effort lookup for use in error-handling paths — returns undefined on
|
|
15
23
|
* any failure instead of propagating, so it never masks the original error.
|
|
@@ -3,7 +3,7 @@ import type { IArtifactResourceSpecEnhancer, ISolutionContext, ResourceDefinitio
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads the project's `entry-points.json` at GET time and projects the primary
|
|
5
5
|
* entry points onto the resource spec, so consumers see the current on-disk
|
|
6
|
-
* state — not the snapshot captured at `solution
|
|
6
|
+
* state — not the snapshot captured at `solution projects add`.
|
|
7
7
|
*
|
|
8
8
|
* Mirrors the shape Studio Web returns from its process configuration
|
|
9
9
|
* endpoint: `entryPoints` always carries the raw `entry-points.json` text;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ResourceDefinition } from "@uipath/resource-builder-sdk";
|
|
2
|
+
/**
|
|
3
|
+
* Pure, dependency-free matching primitives for local solution resources.
|
|
4
|
+
* A leaf module on purpose: `sync-resources-from-bindings` and
|
|
5
|
+
* `resource-mutations` both re-export from here (so existing callers keep
|
|
6
|
+
* their import paths), while `commands/resource-add.ts` imports it directly —
|
|
7
|
+
* which lets its spec run the REAL matcher without mocking this module.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Normalize a folder path for comparisons. `.` and `solution_folder` both
|
|
11
|
+
* encode "no folder" (tenant/root scope) — collapsing them to undefined lets
|
|
12
|
+
* us compare a binding's folder against an existing resource's folder
|
|
13
|
+
* consistently regardless of which placeholder either side carries.
|
|
14
|
+
*/
|
|
15
|
+
export declare function normalizeFolderPath(path: string | undefined): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Find a solution resource matching (kind, name | name_<N>, normalized
|
|
18
|
+
* folder). Kind + name are compared case-insensitively; the suffix variants
|
|
19
|
+
* match because SDK's `addResourceWithUniqueName` may have suffixed an
|
|
20
|
+
* earlier add/import of the same name. With a solution-relative `folderPath`
|
|
21
|
+
* (`.` / `solution_folder` / undefined) only root-scope resources match.
|
|
22
|
+
*
|
|
23
|
+
* Single source of truth for "does an in-solution resource already cover
|
|
24
|
+
* this (kind, name, folder)?" — used by the refresh import guard (UV-15289),
|
|
25
|
+
* the virtual idempotency check, and `resources add --source local`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function findMatchingLocalResource(resources: ResourceDefinition[], kind: string, name: string, folderPath: string | undefined): ResourceDefinition | undefined;
|
|
@@ -18,6 +18,14 @@ export declare class PackCommandService {
|
|
|
18
18
|
* Execute the pack command and return result (for programmatic usage and testing)
|
|
19
19
|
*/
|
|
20
20
|
executeAsync(solutionPath: string, options: PackCommandOptions): Promise<ToolResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Find the member project directory that is equal to or contains the
|
|
23
|
+
* resolved output path, if any. Manifest read errors are ignored here —
|
|
24
|
+
* the packager reports them with full context later.
|
|
25
|
+
*/
|
|
26
|
+
private findMemberProjectCollision;
|
|
27
|
+
private isPathEqualOrInside;
|
|
28
|
+
private readMemberProjectDirs;
|
|
21
29
|
private prepareSolutionDirectoryForPack;
|
|
22
30
|
private ensurePackagerAsync;
|
|
23
31
|
private createPackOptions;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface AddProjectArtifactsOptions {
|
|
2
|
+
/** Absolute path to the solution directory (containing the `.uipx`). */
|
|
3
|
+
solutionDir: string;
|
|
4
|
+
/** Stable project key — must match the `Id` in `.uipx` `Projects[]`. */
|
|
5
|
+
projectId: string;
|
|
6
|
+
/** Display name for the project; typically the project folder name. */
|
|
7
|
+
projectName: string;
|
|
8
|
+
/**
|
|
9
|
+
* Project type as written to `project.uiproj` (e.g. `Flow`,
|
|
10
|
+
* `ProcessOrchestration`, `Agent`, `CaseManagement`). Normalized internally
|
|
11
|
+
* via `normalizeProjectType` so callers can pass the raw value.
|
|
12
|
+
*/
|
|
13
|
+
projectType: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ProjectArtifactsResult {
|
|
16
|
+
/** True when artifact resources were generated. */
|
|
17
|
+
Created: boolean;
|
|
18
|
+
/** Error message when `Created` is `false`. */
|
|
19
|
+
Error?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Generate `resources/solution_folder/process/<kind>/` artifact-resource
|
|
23
|
+
* entries for a project that has just been registered in the parent
|
|
24
|
+
* solution's `.uipx`. Mirrors the second half of `uip solution project add`
|
|
25
|
+
* (after the manifest write), so `*-tool init` paths can produce the same
|
|
26
|
+
* complete on-disk state without requiring a follow-up
|
|
27
|
+
* `solution project remove` + `add` cycle.
|
|
28
|
+
*
|
|
29
|
+
* Returns a result envelope instead of throwing: the project files have
|
|
30
|
+
* already been created by the init caller, so a failure here is recoverable
|
|
31
|
+
* with `solution project remove` + `add`. Callers surface the result in
|
|
32
|
+
* their success envelope as `Data.ProjectArtifacts`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function addProjectArtifactsToSolutionAsync(options: AddProjectArtifactsOptions): Promise<ProjectArtifactsResult>;
|
|
@@ -17,13 +17,7 @@ interface ResolvedKindMetadata {
|
|
|
17
17
|
*/
|
|
18
18
|
requiredDefaults: RequiredPropertyDefault[];
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
* Normalize a folder path for comparisons. `.` and `solution_folder` both
|
|
22
|
-
* encode "no folder" (tenant/root scope) — collapsing them to undefined lets
|
|
23
|
-
* us compare a binding's folder against an existing resource's folder
|
|
24
|
-
* consistently regardless of which placeholder either side carries.
|
|
25
|
-
*/
|
|
26
|
-
export declare function normalizeFolderPath(path: string | undefined): string | undefined;
|
|
20
|
+
export { findMatchingLocalResource, normalizeFolderPath, } from "./local-resource-matcher";
|
|
27
21
|
interface SyncResult {
|
|
28
22
|
created: number;
|
|
29
23
|
imported: number;
|
|
@@ -137,4 +131,3 @@ export declare function readUipxProjects(solutionDir: string): Promise<UipxProje
|
|
|
137
131
|
* on failure and continues. Used by pack and upload before packaging.
|
|
138
132
|
*/
|
|
139
133
|
export declare function syncAndLog(solutionDir: string): Promise<void>;
|
|
140
|
-
export {};
|
package/dist/templates/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# UiPath Solution Workspace
|
|
2
2
|
|
|
3
|
-
> **A `.uipx` file in this directory marks a UiPath solution. Drive every solution operation through the `uip` CLI — packing, publishing, deploying, and deployment configuration.** Do not hand-edit `.uipx`; manage projects via `uip solution
|
|
3
|
+
> **A `.uipx` file in this directory marks a UiPath solution. Drive every solution operation through the `uip` CLI — packing, publishing, deploying, and deployment configuration.** Do not hand-edit `.uipx`; manage projects via `uip solution projects ...` so the manifest stays internally consistent.
|
|
4
4
|
|
|
5
5
|
This file is a static snapshot, scaffolded by the `uip` CLI version `{{cli_version}}`. If the CLI version you have access to is different, there may be inconsistencies in the commands or options listed below. When you encounter one, look up the current form with `uip <group> --help` and **edit this file in place** — find and replace the stale command with the working one.
|
|
6
6
|
|
|
@@ -44,10 +44,10 @@ You must manage membership via the CLI, never by editing the manifest. All these
|
|
|
44
44
|
| Intent | Command |
|
|
45
45
|
|---|---|
|
|
46
46
|
| Create a solution | `uip solution init <name>` |
|
|
47
|
-
| Register an existing subfolder of the solution dir as a project (no copying — use after scaffolding *inside* the solution dir, e.g. `uip rpa create-project --location <solution-dir>`) | `uip solution
|
|
48
|
-
| Add a project from outside the solution — copies the folder at `<path>` into the solution dir and registers it (`<path>` is a local filesystem path) | `uip solution
|
|
49
|
-
| Unregister a project (does not delete the project files on disk) | `uip solution
|
|
50
|
-
| List projects in the solution | `uip solution
|
|
47
|
+
| Register an existing subfolder of the solution dir as a project (no copying — use after scaffolding *inside* the solution dir, e.g. `uip rpa create-project --location <solution-dir>`) | `uip solution projects add <project-path> [<solution-file>]` |
|
|
48
|
+
| Add a project from outside the solution — copies the folder at `<path>` into the solution dir and registers it (`<path>` is a local filesystem path) | `uip solution projects import <path>` |
|
|
49
|
+
| Unregister a project (does not delete the project files on disk) | `uip solution projects remove <project-path> [<solution-file>]` |
|
|
50
|
+
| List projects in the solution | `uip solution projects list` |
|
|
51
51
|
|
|
52
52
|
The `uip ... init` scaffolders (`agent init`, `maestro flow init`, `maestro bpmn init`, `maestro case init`, `api-workflow init`) **auto-register** the new project when run inside a solution directory — they walk up for the enclosing `.uipx` and add it to `Projects[]` automatically, so a separate `project add` is not needed. Pass `--skip-solution-registration` to scaffold standalone without registering; the output's `Data.SolutionRegistration.Status` is then `OptedOut`. The full set of `Status` values is: `Registered` / `AlreadyRegistered` (added in this run / already present), `NotInSolution` (no enclosing `.uipx` found), `OptedOut` (`--skip-solution-registration` passed), `Skipped` (a candidate solution was found but registration was not safe to attempt — e.g. multiple `.uipx` in one directory, or the project sits outside the solution dir), and `Failed` (manifest read/parse/write error).
|
|
53
53
|
|
|
@@ -72,7 +72,7 @@ A solution can contain multiple projects of different types. The table below lis
|
|
|
72
72
|
|
|
73
73
|
All skill should be installed by running the command: `uip skills install`. The general-purpose `uipath-platform` skill covers what isn't in a type-specific skill.
|
|
74
74
|
|
|
75
|
-
The type lives in either `project.uiproj` (top-level `ProjectType`) or `project.json` (`designOptions.outputType`, falling back to top-level `ProjectType` when `outputType` is absent — read or write either field). The `init` scaffolders above auto-register when run inside a solution directory (unless `--skip-solution-registration` is passed). For other scaffolders, register the project with the solution after scaffolding: use `uip solution
|
|
75
|
+
The type lives in either `project.uiproj` (top-level `ProjectType`) or `project.json` (`designOptions.outputType`, falling back to top-level `ProjectType` when `outputType` is absent — read or write either field). The `init` scaffolders above auto-register when run inside a solution directory (unless `--skip-solution-registration` is passed). For other scaffolders, register the project with the solution after scaffolding: use `uip solution projects add <project-path> [<solution-file>]` when the project already lives inside the solution directory (registers in place, no copy), or `uip solution projects import <path>` to copy a project from outside the solution dir into it and register it. If you pass an unknown type to those commands, they reject with the exhaustive accepted list — trust that error over this table.
|
|
76
76
|
|
|
77
77
|
## End-to-End Lifecycle
|
|
78
78
|
|
|
@@ -156,7 +156,7 @@ uip solution delete <solution-id> --yes # remove a solution from Studio Web (
|
|
|
156
156
|
|
|
157
157
|
Each project declares the resources it needs (assets, queues, buckets, processes, …) in a `bindings_v2.json` file at the project root. These declarations drive the solution's resource inventory.
|
|
158
158
|
|
|
159
|
-
After editing a project's bindings, or after `solution
|
|
159
|
+
After editing a project's bindings, or after `solution projects import` (which doesn't auto-sync resources), reconcile the solution-level inventory:
|
|
160
160
|
|
|
161
161
|
```bash
|
|
162
162
|
uip solution resources refresh # re-scan every project, sync new / removed resources
|