@uipath/solution-tool 1.1.0 → 1.195.0
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/dist/deploy.d.ts +27 -0
- package/dist/deploy.js +42619 -0
- package/dist/init.d.ts +6 -0
- package/dist/init.js +10177 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/pack-command-types.d.ts +25 -0
- package/dist/pack.d.ts +6 -0
- package/dist/pack.js +261236 -0
- package/dist/providers/file-storage-provider.d.ts +11 -0
- package/dist/providers/resource-builder-init.d.ts +12 -0
- package/dist/providers/solution-access-provider.d.ts +18 -0
- package/dist/publish.d.ts +7 -0
- package/dist/publish.js +31488 -0
- package/dist/resource.d.ts +7 -0
- package/dist/resource.js +46898 -0
- package/dist/services/activation.d.ts +51 -0
- package/dist/services/auth-helper.d.ts +10 -0
- package/dist/services/deploy-activate-service.d.ts +45 -0
- package/dist/services/deploy-list-service.d.ts +57 -0
- package/dist/services/deploy-run-service.d.ts +84 -0
- package/dist/services/deploy-uninstall-service.d.ts +45 -0
- package/dist/services/deployment-search.d.ts +77 -0
- package/dist/services/emit-runtime-dependencies.d.ts +37 -0
- package/dist/services/entry-point-spec-enhancer.d.ts +31 -0
- package/dist/services/folder-helper.d.ts +21 -0
- package/dist/services/pack-command-service.d.ts +24 -0
- package/dist/services/pack-service.d.ts +32 -0
- package/dist/services/packager-tool-resolver.d.ts +6 -0
- package/dist/services/packages-list-service.d.ts +54 -0
- package/dist/services/personal-workspace-resolver.d.ts +28 -0
- package/dist/services/publish-service.d.ts +43 -0
- package/dist/services/resource-refresh-service.d.ts +32 -0
- package/dist/services/solution-init-service.d.ts +37 -0
- package/dist/services/solution-manifest.d.ts +9 -0
- package/dist/services/sync-resources-from-bindings.d.ts +132 -0
- package/dist/templates/AGENTS.md +14 -7
- package/dist/tool.js +85489 -44992
- package/dist/utils/deployment-errors.d.ts +39 -0
- package/package.json +44 -43
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Discriminator for {@link ResourceRefreshFailure}; library callers can ignore the tag and read `.message` / `.ok`. */
|
|
2
|
+
export type ResourceRefreshFailureReason = "solution_not_found" | "not_a_solution" | "auth_failed" | "sync_failed";
|
|
3
|
+
export interface ResourceRefreshOptions {
|
|
4
|
+
/** Minimum minutes before token expiration to trigger a refresh. Default `10` (matches the CLI's `--login-validity`). */
|
|
5
|
+
loginValidity?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ResourceRefreshSuccess {
|
|
8
|
+
ok: true;
|
|
9
|
+
/** Resources newly created (virtualized) in the solution this run. */
|
|
10
|
+
created: number;
|
|
11
|
+
/** Resources imported from Orchestrator into the solution this run. */
|
|
12
|
+
imported: number;
|
|
13
|
+
/** Bindings whose cloud key was already in the solution (no-op this run). */
|
|
14
|
+
skipped: number;
|
|
15
|
+
/** Non-fatal advisories (e.g. unresolved connections, link-before-deploy hints). */
|
|
16
|
+
warnings: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface ResourceRefreshFailure {
|
|
19
|
+
ok: false;
|
|
20
|
+
reason: ResourceRefreshFailureReason;
|
|
21
|
+
/** Human-readable summary suitable for top-level surfacing. */
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
export type ResourceRefreshResult = ResourceRefreshSuccess | ResourceRefreshFailure;
|
|
25
|
+
/**
|
|
26
|
+
* Programmatic core of `uip solution resource refresh`: re-scans every project's
|
|
27
|
+
* `bindings_v2.json` and syncs resource declarations into the solution, importing
|
|
28
|
+
* from Orchestrator when a match exists and virtualizing the rest. Returns a tagged
|
|
29
|
+
* {@link ResourceRefreshResult}; re-throws only on unexpected errors. Mirrors
|
|
30
|
+
* `./pack` / `./publish` / `./deploy`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resourceRefreshAsync(solutionPath?: string, options?: ResourceRefreshOptions): Promise<ResourceRefreshResult>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Which step of {@link solutionInitAsync} failed, so the CLI can map it to a stage-specific message. */
|
|
2
|
+
export type SolutionInitStage = "directory" | "briefing" | "manifest";
|
|
3
|
+
/** Thrown by {@link solutionInitAsync}, tagged with the failing {@link SolutionInitStage}; `message` mirrors the cause. */
|
|
4
|
+
export declare class SolutionInitError extends Error {
|
|
5
|
+
readonly stage: SolutionInitStage;
|
|
6
|
+
constructor(stage: SolutionInitStage, cause: unknown);
|
|
7
|
+
}
|
|
8
|
+
export interface SolutionInitOptions {
|
|
9
|
+
/**
|
|
10
|
+
* AGENTS.md / CLAUDE.md content, written to both files before the `.uipx` manifest.
|
|
11
|
+
* The CLI passes its version-stamped template; library callers usually omit it.
|
|
12
|
+
*/
|
|
13
|
+
briefingContent?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Base dir a relative `solutionName` resolves against. Defaults to `process.cwd()`;
|
|
16
|
+
* lets library callers set a root without mutating global cwd. Ignored if `solutionName` is absolute.
|
|
17
|
+
*/
|
|
18
|
+
cwd?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface SolutionInitResult {
|
|
21
|
+
/** Absolute path to the created `.uipx` manifest. */
|
|
22
|
+
solutionFile: string;
|
|
23
|
+
/** Absolute path to the created solution directory. */
|
|
24
|
+
solutionDir: string;
|
|
25
|
+
/** Solution name without extension. */
|
|
26
|
+
solutionName: string;
|
|
27
|
+
/** Absolute path to the written AGENTS.md, when `briefingContent` was provided. */
|
|
28
|
+
agentsPath?: string;
|
|
29
|
+
/** Absolute path to the written CLAUDE.md, when `briefingContent` was provided. */
|
|
30
|
+
claudePath?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Programmatic core of `uip solution init`: creates the solution dir, an optional
|
|
34
|
+
* AGENTS.md/CLAUDE.md briefing (before the manifest), and the `.uipx` manifest. Throws on
|
|
35
|
+
* failure; does not touch `OutputFormatter`/`processContext`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function solutionInitAsync(solutionName: string, options?: SolutionInitOptions): Promise<SolutionInitResult>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Throw if `dir` doesn't directly contain a `.uipx` manifest. Stricter than
|
|
3
|
+
* `findSolutionFile` (which walks up to find one) — write commands should not
|
|
4
|
+
* silently mutate the wrong folder when run from an arbitrary cwd.
|
|
5
|
+
*
|
|
6
|
+
* Lives in `services/` (not `commands/project.ts`) so callers can mock the
|
|
7
|
+
* check without pulling in the full project-commands module.
|
|
8
|
+
*/
|
|
9
|
+
export declare function assertSolutionManifest(dir: string): Promise<void>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { type IResourceBuilderServices, type ISolutionBuilder, type ResourceDefinition } from "@uipath/resource-builder-sdk";
|
|
2
|
+
interface RequiredPropertyDefault {
|
|
3
|
+
property: string;
|
|
4
|
+
/** Empty placeholder value matching the property's declared type. */
|
|
5
|
+
placeholder: unknown;
|
|
6
|
+
}
|
|
7
|
+
interface ResolvedKindMetadata {
|
|
8
|
+
/** Subtype to pass to createVirtualResourceAsync (e.g. "StringAsset"). */
|
|
9
|
+
type?: string;
|
|
10
|
+
/** SDK's `supportsInLineCreation` — whether a virtual stub can be created. */
|
|
11
|
+
virtualizable: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Required spec properties that have no default in SDK metadata. Deploy
|
|
14
|
+
* validation rejects virtualized resources missing these (e.g. Asset.value).
|
|
15
|
+
* We fill them in-memory after `createVirtualResourceAsync` with a
|
|
16
|
+
* type-appropriate placeholder.
|
|
17
|
+
*/
|
|
18
|
+
requiredDefaults: RequiredPropertyDefault[];
|
|
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;
|
|
27
|
+
interface SyncResult {
|
|
28
|
+
created: number;
|
|
29
|
+
imported: number;
|
|
30
|
+
skipped: number;
|
|
31
|
+
warnings: string[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Reads bindings_v2.json from project paths and creates/imports matching
|
|
35
|
+
* resources in the solution using the resource-builder-sdk.
|
|
36
|
+
*
|
|
37
|
+
* @param solutionDir - Path to the solution directory
|
|
38
|
+
* @param projectPaths - Specific project paths to scan (if omitted, scans all projects in .uipx)
|
|
39
|
+
*/
|
|
40
|
+
export declare function syncResourcesFromBindings(solutionDir: string, projectPaths?: string[]): Promise<SyncResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Mirror of SDK's private `addResourceWithUniqueName`
|
|
43
|
+
* (resource-builder-sdk index.js:673): if any other resource of the same
|
|
44
|
+
* kind already carries `name` (or a `name_<N>` suffix variant), return
|
|
45
|
+
* `name_<N+1>`. Otherwise return `name` unchanged. Excludes `excludeKey`
|
|
46
|
+
* so the resource we just created doesn't collide with itself.
|
|
47
|
+
*/
|
|
48
|
+
export declare function uniqueNameForResource(name: string, kind: string, excludeKey: string, solution: {
|
|
49
|
+
resources: Array<{
|
|
50
|
+
key: string;
|
|
51
|
+
kind?: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
}>;
|
|
54
|
+
}): string;
|
|
55
|
+
export interface RcsMatch {
|
|
56
|
+
key: string;
|
|
57
|
+
name: string;
|
|
58
|
+
/** Subtype as RCS reports it (e.g. `Text` for Asset). `undefined` for
|
|
59
|
+
* kinds without a subtype (Queue). Callers may need to forward this to
|
|
60
|
+
* `addOrUpdateResourceToSolutionAsync`, which rejects type-less imports
|
|
61
|
+
* for kinds that SDK metadata indexes by (kind, type). */
|
|
62
|
+
type?: string;
|
|
63
|
+
folder?: {
|
|
64
|
+
fullyQualifiedName: string;
|
|
65
|
+
folderKey: string;
|
|
66
|
+
path?: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Page through RCS for a given (kind, name) and collect every match. Returns
|
|
71
|
+
* an empty array on lookup error (logged as a warning). Callers decide what
|
|
72
|
+
* to do with 0/1/many matches.
|
|
73
|
+
*/
|
|
74
|
+
export declare function searchRcsResources(builder: ISolutionBuilder, kind: string, name: string): Promise<RcsMatch[]>;
|
|
75
|
+
export declare function findResourceInRcs(builder: ISolutionBuilder, kind: string, name: string, folderPath?: string): Promise<RcsMatch | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* Resolve a resource kind's metadata via the SDK (`kind`, optional `type`) so
|
|
78
|
+
* callers outside the bindings sync can fill required spec defaults the same
|
|
79
|
+
* way `createVirtualForBinding` does. Returns undefined if the kind isn't
|
|
80
|
+
* indexed by SDK metadata.
|
|
81
|
+
*/
|
|
82
|
+
export declare function resolveResourceKindMetadata(services: IResourceBuilderServices, kind: string, type?: string): Promise<ResolvedKindMetadata | undefined>;
|
|
83
|
+
export interface CreateLocalResourceParams {
|
|
84
|
+
builder: ISolutionBuilder;
|
|
85
|
+
services: IResourceBuilderServices;
|
|
86
|
+
kind: string;
|
|
87
|
+
type?: string;
|
|
88
|
+
name: string;
|
|
89
|
+
folderPath?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface CreateLocalResourceResult {
|
|
92
|
+
resource: ResourceDefinition;
|
|
93
|
+
/** Final name on the resource — may differ from input if SDK conflict suffix kicked in. */
|
|
94
|
+
finalName: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Create a virtual (local-only) resource via the SDK and rename it to `name`,
|
|
98
|
+
* mirroring the rename + spec-default flow `createVirtualForBinding` runs
|
|
99
|
+
* during refresh. Returns the freshly created `SolutionResource` after the
|
|
100
|
+
* mutation, or undefined if the SDK failed to allocate a key.
|
|
101
|
+
*
|
|
102
|
+
* Callers must:
|
|
103
|
+
* - Persist the change (e.g. `builder.disposeAsync()` or
|
|
104
|
+
* `context.saveAsync()`); this helper only mutates in-memory state.
|
|
105
|
+
* - Have already done an idempotency check — this helper *always* creates,
|
|
106
|
+
* and SDK's `addResourceWithUniqueName` will suffix the name on conflict.
|
|
107
|
+
*/
|
|
108
|
+
export declare function createLocalResource(params: CreateLocalResourceParams): Promise<CreateLocalResourceResult | undefined>;
|
|
109
|
+
export interface UipxProject {
|
|
110
|
+
/** Project type as written in `.uipx` (e.g. "Agent", "Process"). */
|
|
111
|
+
type: string;
|
|
112
|
+
/** Design-time UUID used as `projectKey` in reconcile. */
|
|
113
|
+
id: string;
|
|
114
|
+
/** Path to the project directory (parent of `project.uiproj`). */
|
|
115
|
+
path: string;
|
|
116
|
+
/** Project name read from `project.uiproj` (`Name` field). */
|
|
117
|
+
name: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Read solution's `.uipx` and each project's `project.uiproj` to assemble the
|
|
121
|
+
* data needed for `reconcileProjectsAsync`. Without this, sync would only see
|
|
122
|
+
* resource bindings (Queue/Asset/etc.) and miss the project artefacts
|
|
123
|
+
* (process/<type>, package, app/<subType>, appVersion) the SDK generates from
|
|
124
|
+
* project templates.
|
|
125
|
+
*/
|
|
126
|
+
export declare function readUipxProjects(solutionDir: string): Promise<UipxProject[]>;
|
|
127
|
+
/**
|
|
128
|
+
* Sync resources from bindings with logging. Non-fatal — logs warnings
|
|
129
|
+
* on failure and continues. Used by pack and upload before packaging.
|
|
130
|
+
*/
|
|
131
|
+
export declare function syncAndLog(solutionDir: string): Promise<void>;
|
|
132
|
+
export {};
|
package/dist/templates/AGENTS.md
CHANGED
|
@@ -85,9 +85,13 @@ uip login --client-id <ID> --client-secret <SECRET> --tenant <TENANT>
|
|
|
85
85
|
|
|
86
86
|
# 2. Pack the solution into a .zip. Two positional args:
|
|
87
87
|
# <solutionPath> — solution dir (containing .uipx) or a .uis file
|
|
88
|
-
# <output-path> — directory where the .zip is written
|
|
88
|
+
# <output-path> — directory where the .zip is written (required unless --dry-run)
|
|
89
89
|
uip solution pack . ./out
|
|
90
90
|
|
|
91
|
+
# 2a. (Optional) Validate the solution against the strict deploy-time
|
|
92
|
+
# pipeline without producing a package — useful as a CI gate.
|
|
93
|
+
uip solution pack . --dry-run
|
|
94
|
+
|
|
91
95
|
# 3. Publish the packed .zip to Orchestrator
|
|
92
96
|
uip solution publish ./out/<package>.zip
|
|
93
97
|
|
|
@@ -127,12 +131,13 @@ uip solution deploy uninstall <deployment-name> # remove the deployment + its
|
|
|
127
131
|
Studio Web is a separate target from the Orchestrator deploy chain — it hosts a browser-based collaborative editor for solutions. The `solution upload` command pushes the local solution there and returns a `DesignerUrl` to open the solution in a browser; this is independent of `pack` / `publish` / `deploy` and does *not* produce a runtime-deployable artifact.
|
|
128
132
|
|
|
129
133
|
```bash
|
|
130
|
-
uip solution upload . # upload solution dir to Studio Web; returns DesignerUrl
|
|
134
|
+
uip solution upload . # upload solution dir to Studio Web as a new solution; returns DesignerUrl
|
|
135
|
+
uip solution upload . --force # force-replace the existing Studio Web solution referenced by .uipx (destroys cloud version history)
|
|
131
136
|
uip solution download <solution-id> # round-trip a Studio Web solution back to disk
|
|
132
137
|
uip solution delete <solution-id> # remove a solution from Studio Web
|
|
133
138
|
```
|
|
134
139
|
|
|
135
|
-
`upload` accepts a solution directory, a `.uipx` file, or a `.uis` file.
|
|
140
|
+
`upload` accepts a solution directory, a `.uipx` file, or a `.uis` file. It probes Studio Web for the bundled `SolutionId` first: if the cloud has no solution with that id, the upload imports as new; if a solution with that id already exists, the upload is refused unless `--force` is passed. Forcing replaces the cloud project in place and **wipes its Studio Web version history**, so use `--force` deliberately. To upload a copy as an unrelated cloud solution instead of overwriting, scaffold a fresh solution with `uip solution init` (or remove the `SolutionId` from the local `.uipx`) and re-run upload.
|
|
136
141
|
|
|
137
142
|
## Per-Project Bindings (`bindings_v2.json`)
|
|
138
143
|
|
|
@@ -192,11 +197,11 @@ The CLI talks about the same resource types Orchestrator does:
|
|
|
192
197
|
- **Processes / Releases** — published packages bound to a folder.
|
|
193
198
|
- **Triggers** & **Webhooks** — event-, time-, or queue-based job firing; outbound HTTP notifications.
|
|
194
199
|
|
|
195
|
-
Resources outside a solution are managed
|
|
200
|
+
Resources outside a solution are managed under the orchestrator tool, which exposes per-type subgroups (`uip or assets …`, `uip or queues …`, `uip or buckets …`, `uip or bucket-files …`, `uip or libraries …`, `uip or queue-items …`, `uip or triggers …`, `uip or webhooks …`). Run `uip or --help` for the live list. Example:
|
|
196
201
|
|
|
197
202
|
```bash
|
|
198
|
-
uip
|
|
199
|
-
uip
|
|
203
|
+
uip or assets list # list assets in the active folder
|
|
204
|
+
uip or assets create # create an asset (see --help)
|
|
200
205
|
```
|
|
201
206
|
|
|
202
207
|
## Output Conventions for Agents
|
|
@@ -222,13 +227,15 @@ uip solution deploy --help # the deploy subgroup
|
|
|
222
227
|
uip <command> --help # full options for any command
|
|
223
228
|
```
|
|
224
229
|
|
|
230
|
+
For concept or API documentation beyond CLI usage, fetch `https://docs.uipath.com/llms.txt` for the product index, then the relevant `.md` page (e.g. `https://docs.uipath.com/orchestrator/automation-cloud/latest/api-guide/assets-requests.md`).
|
|
231
|
+
|
|
225
232
|
Adjacent groups commonly used alongside solutions:
|
|
226
233
|
|
|
227
234
|
| Group | Purpose |
|
|
228
235
|
|---|---|
|
|
229
236
|
| `uip login`, `uip login tenant` | Authenticate, switch tenants |
|
|
230
237
|
| `uip or folders` | Manage Orchestrator folders |
|
|
231
|
-
| `uip
|
|
238
|
+
| `uip or assets`, `uip or queues`, `uip or buckets`, `uip or bucket-files`, `uip or libraries`, `uip or queue-items`, `uip or triggers`, `uip or webhooks` | Manage Orchestrator resources directly |
|
|
232
239
|
| `uip rpa` | RPA workflow lifecycle (compile, validate, execute, scaffold) |
|
|
233
240
|
| `uip maestro` | Maestro Flow / Case / BPMN scaffolding |
|
|
234
241
|
| `uip agent`, `uip codedagent` | Coded agent lifecycle |
|