@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
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ uip solution init --name MySolution
|
|
|
28
28
|
uip solution upload <packagePath>
|
|
29
29
|
uip solution deploy run --solution-name MySolution
|
|
30
30
|
uip solution deploy status --solution-name MySolution
|
|
31
|
-
uip solution
|
|
31
|
+
uip solution projects add ./my-solution/my-project ./my-solution/my-solution.uipx
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### Deploying to Personal Workspace
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ExtendedPackageVersionState } from "@uipath/pipelines-sdk";
|
|
2
|
+
export declare const LOGIN_INSTRUCTIONS = "Run `uip login` to authenticate.";
|
|
3
|
+
export declare const PACKAGE_READY_STATES: ReadonlySet<ExtendedPackageVersionState>;
|
|
4
|
+
export declare function getPackageStateInstructions(state: ExtendedPackageVersionState): "Wait until package processing completes, then run the command again." | "Check the solution package contents and publish it again.";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface ProjectFileContent {
|
|
2
|
+
Name?: string;
|
|
3
|
+
ProjectType?: string;
|
|
4
|
+
designOptions?: {
|
|
5
|
+
outputType?: string;
|
|
6
|
+
};
|
|
7
|
+
functions?: Record<string, string>;
|
|
8
|
+
}
|
|
9
|
+
export interface SolutionProject {
|
|
10
|
+
Type: string;
|
|
11
|
+
ProjectRelativePath: string;
|
|
12
|
+
Id: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SolutionFileContent {
|
|
15
|
+
Projects?: SolutionProject[];
|
|
16
|
+
}
|
|
17
|
+
export interface ProjectFileInfo {
|
|
18
|
+
filePath: string;
|
|
19
|
+
fileName: string;
|
|
20
|
+
useProjectJson: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ParsedProjectFile {
|
|
23
|
+
content: ProjectFileContent;
|
|
24
|
+
projectType: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ParsedSolutionFile {
|
|
27
|
+
solution: SolutionFileContent;
|
|
28
|
+
rawContent: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Finds the project manifest inside a directory, in priority order:
|
|
32
|
+
* project.uiproj, project.json, then uipath.json (code-first JS/TS Functions).
|
|
33
|
+
*/
|
|
34
|
+
export declare function findProjectFile(projectDir: string): Promise<[Error, null] | [null, ProjectFileInfo]>;
|
|
35
|
+
/**
|
|
36
|
+
* Reads and parses a project manifest, extracting the project type.
|
|
37
|
+
*/
|
|
38
|
+
export declare function readProjectFile(filePath: string, useProjectJson: boolean): Promise<[Error, null] | [null, ParsedProjectFile]>;
|
|
39
|
+
/**
|
|
40
|
+
* Reads and parses a solution .uipx file.
|
|
41
|
+
* Returns both the parsed object and the raw content (for rollback).
|
|
42
|
+
*/
|
|
43
|
+
export declare function readSolutionFile(filePath: string): Promise<[Error, null] | [null, ParsedSolutionFile]>;
|
|
44
|
+
/**
|
|
45
|
+
* Resolves the solution file path — either from an explicit option or by searching upward.
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveSolutionFilePath(solutionFileOption: string | undefined, searchStartDir: string): Promise<[Error, null] | [null, string]>;
|
|
48
|
+
/**
|
|
49
|
+
* Writes the solution object back to disk as formatted JSON.
|
|
50
|
+
*/
|
|
51
|
+
export declare function writeSolutionFile(filePath: string, solution: SolutionFileContent): Promise<Error | null>;
|
|
52
|
+
/**
|
|
53
|
+
* Restores the exact solution file content captured before a write.
|
|
54
|
+
*/
|
|
55
|
+
export declare function restoreSolutionFile(filePath: string, rawContent: string): Promise<Error | null>;
|
|
56
|
+
/**
|
|
57
|
+
* Creates a project in the solution builder (resource builder services).
|
|
58
|
+
* Handles service init, builder creation, createProjectAsync, and dispose.
|
|
59
|
+
*/
|
|
60
|
+
export declare function createProjectInSolutionBuilder(solutionDir: string, projectId: string, projectName: string, projectType: string): Promise<Error | null>;
|
package/dist/deploy.js
CHANGED
|
@@ -28203,6 +28203,7 @@ function settlePromiseLike(thenable) {
|
|
|
28203
28203
|
var DEFAULT_401 = "Unauthorized (401). Run `uip login` to authenticate.";
|
|
28204
28204
|
var DEFAULT_403 = "Forbidden (403). Ensure the account has the required permissions.";
|
|
28205
28205
|
var DEFAULT_405 = "Method Not Allowed (405). The endpoint may not exist or the base URL may be incorrect.";
|
|
28206
|
+
var DEFAULT_413 = "Payload too large (413). The upload exceeded the server or CDN size limit. Reduce the package size — for example, exclude unused dependencies or remove large files from the project — and try again.";
|
|
28206
28207
|
var HTML_RESPONSE_MESSAGE = "Received HTML instead of the expected JSON response.";
|
|
28207
28208
|
var NETWORK_ERROR_CODES = new Set([
|
|
28208
28209
|
"ECONNREFUSED",
|
|
@@ -28304,6 +28305,9 @@ function classifyError(status, error) {
|
|
|
28304
28305
|
if (status === 405) {
|
|
28305
28306
|
return { errorCode: "method_not_allowed", retry: "RetryWillNotFix" };
|
|
28306
28307
|
}
|
|
28308
|
+
if (status === 413) {
|
|
28309
|
+
return { errorCode: "invalid_argument", retry: "RetryWillNotFix" };
|
|
28310
|
+
}
|
|
28307
28311
|
if (status === 408) {
|
|
28308
28312
|
return { errorCode: "timeout", retry: "RetryLater" };
|
|
28309
28313
|
}
|
|
@@ -28381,6 +28385,8 @@ async function extractErrorDetails(error, options) {
|
|
|
28381
28385
|
result = "AuthenticationError";
|
|
28382
28386
|
} else if (status === 405) {
|
|
28383
28387
|
message = DEFAULT_405;
|
|
28388
|
+
} else if (status === 413) {
|
|
28389
|
+
message = DEFAULT_413;
|
|
28384
28390
|
} else if (status === 400 || status === 422) {
|
|
28385
28391
|
message = formatHttpStatusMessage(status, rawMessage, extractedMessage, inferredStatus);
|
|
28386
28392
|
result = "ValidationError";
|
|
@@ -35259,6 +35265,7 @@ var SKILL_ATTRIBUTION = attributionRecord([
|
|
|
35259
35265
|
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
35260
35266
|
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
35261
35267
|
["cli", "troubleshoot", ["uip.feedback"]],
|
|
35268
|
+
["llm-gateway", "operate", ["uip.llm-gateway"]],
|
|
35262
35269
|
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
35263
35270
|
["context-grounding", "build", ["uip.context-grounding"]],
|
|
35264
35271
|
["api-workflow", "build", ["uip.api-workflow"]],
|
|
@@ -36319,7 +36326,7 @@ class TextApiResponse {
|
|
|
36319
36326
|
var package_default = {
|
|
36320
36327
|
name: "@uipath/pipelines-sdk",
|
|
36321
36328
|
license: "MIT",
|
|
36322
|
-
version: "1.
|
|
36329
|
+
version: "1.199.0",
|
|
36323
36330
|
description: "Generated TypeScript client for UiPath Pipelines API (CI/CD deployment lifecycle)",
|
|
36324
36331
|
repository: {
|
|
36325
36332
|
type: "git",
|
|
@@ -37734,7 +37741,7 @@ class JSONApiResponse2 {
|
|
|
37734
37741
|
var package_default2 = {
|
|
37735
37742
|
name: "@uipath/solution-sdk",
|
|
37736
37743
|
license: "MIT",
|
|
37737
|
-
version: "1.
|
|
37744
|
+
version: "1.199.0-preview.105",
|
|
37738
37745
|
repository: {
|
|
37739
37746
|
type: "git",
|
|
37740
37747
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -38565,6 +38572,39 @@ async function findDeploymentByName(auth, deploymentName) {
|
|
|
38565
38572
|
skip += values.length;
|
|
38566
38573
|
}
|
|
38567
38574
|
}
|
|
38575
|
+
async function findDeploymentByPackageName(auth, packageName, folderPath, scope) {
|
|
38576
|
+
const [lookupError, deployment] = await catchError((async () => {
|
|
38577
|
+
const api = new SearchApi(new Configuration2({
|
|
38578
|
+
basePath: auth.basePath,
|
|
38579
|
+
accessToken: auth.accessToken
|
|
38580
|
+
}));
|
|
38581
|
+
const take = 50;
|
|
38582
|
+
for (let skip = 0;; ) {
|
|
38583
|
+
const result = await api.searchSearchDeployments22({
|
|
38584
|
+
deploymentsSearchRequest2: {
|
|
38585
|
+
searchTerm: packageName,
|
|
38586
|
+
take,
|
|
38587
|
+
skip,
|
|
38588
|
+
operationStatuses: [],
|
|
38589
|
+
activationStatuses: []
|
|
38590
|
+
}
|
|
38591
|
+
}, scope);
|
|
38592
|
+
const values = result.values ?? [];
|
|
38593
|
+
const match = values.find((deployment2) => deployment2.packageName === packageName && (folderPath === undefined || deployment2.folderPath === folderPath));
|
|
38594
|
+
if (match) {
|
|
38595
|
+
return match;
|
|
38596
|
+
}
|
|
38597
|
+
if (values.length < take) {
|
|
38598
|
+
return;
|
|
38599
|
+
}
|
|
38600
|
+
skip += values.length;
|
|
38601
|
+
}
|
|
38602
|
+
})());
|
|
38603
|
+
if (lookupError) {
|
|
38604
|
+
return;
|
|
38605
|
+
}
|
|
38606
|
+
return deployment;
|
|
38607
|
+
}
|
|
38568
38608
|
async function findDeploymentForError(auth, deploymentName) {
|
|
38569
38609
|
const [lookupError, deployment] = await catchError(findDeploymentByName(auth, deploymentName));
|
|
38570
38610
|
if (lookupError) {
|
|
@@ -38781,6 +38821,7 @@ var resolveConfigAsync = async ({
|
|
|
38781
38821
|
customAuthority,
|
|
38782
38822
|
customClientId,
|
|
38783
38823
|
customClientSecret,
|
|
38824
|
+
customClientAssertion,
|
|
38784
38825
|
customScopes
|
|
38785
38826
|
} = {}) => {
|
|
38786
38827
|
const fileAuth = getAuthFileConfig();
|
|
@@ -38806,7 +38847,7 @@ var resolveConfigAsync = async ({
|
|
|
38806
38847
|
if (!clientSecret && fileAuth.clientSecret) {
|
|
38807
38848
|
clientSecret = fileAuth.clientSecret;
|
|
38808
38849
|
}
|
|
38809
|
-
const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && Boolean(clientSecret);
|
|
38850
|
+
const isExternalAppAuth = clientId !== DEFAULT_CLIENT_ID && (Boolean(clientSecret) || Boolean(customClientAssertion));
|
|
38810
38851
|
const scopes = resolveScopes(isExternalAppAuth, customScopes, fileAuth.scopes);
|
|
38811
38852
|
return {
|
|
38812
38853
|
clientId,
|
|
@@ -39924,7 +39965,6 @@ var getAuthContext = async (options = {}) => {
|
|
|
39924
39965
|
tenantName
|
|
39925
39966
|
};
|
|
39926
39967
|
};
|
|
39927
|
-
|
|
39928
39968
|
// ../auth/src/index.ts
|
|
39929
39969
|
init_constants();
|
|
39930
39970
|
|
|
@@ -40274,7 +40314,7 @@ class TextApiResponse3 {
|
|
|
40274
40314
|
var package_default3 = {
|
|
40275
40315
|
name: "@uipath/orchestrator-sdk",
|
|
40276
40316
|
license: "MIT",
|
|
40277
|
-
version: "1.
|
|
40317
|
+
version: "1.199.0",
|
|
40278
40318
|
repository: {
|
|
40279
40319
|
type: "git",
|
|
40280
40320
|
url: "https://github.com/UiPath/cli.git",
|
|
@@ -42865,8 +42905,8 @@ async function listDeploymentsAsync(options = {}) {
|
|
|
42865
42905
|
skip: offset,
|
|
42866
42906
|
orderByColumn: options.sortBy ?? "startTime",
|
|
42867
42907
|
orderByDirection: options.sortOrder ?? "Descending",
|
|
42868
|
-
operationStatuses: [],
|
|
42869
|
-
activationStatuses: []
|
|
42908
|
+
operationStatuses: options.operationStatuses ?? [],
|
|
42909
|
+
activationStatuses: options.activationStatuses ?? []
|
|
42870
42910
|
}
|
|
42871
42911
|
}));
|
|
42872
42912
|
if (listError) {
|
|
@@ -42883,11 +42923,16 @@ async function listDeploymentsAsync(options = {}) {
|
|
|
42883
42923
|
name: d.name,
|
|
42884
42924
|
packageName: d.packageName,
|
|
42885
42925
|
packageVersion: d.packageVersion,
|
|
42926
|
+
currentPackageVersion: d.currentPackageVersion,
|
|
42927
|
+
targetPackageVersion: d.targetPackageVersion,
|
|
42928
|
+
newPackageVersionAvailable: d.newPackageVersionAvailable,
|
|
42929
|
+
operation: d.operation,
|
|
42886
42930
|
operationStatus: d.operationStatus,
|
|
42887
42931
|
activationStatus: d.activationStatus,
|
|
42888
42932
|
folderPath: d.folderPath,
|
|
42889
42933
|
installedRootFolderKey: d.installedRootFolderKey,
|
|
42890
|
-
deploymentCreationTime: d.deploymentCreationTime
|
|
42934
|
+
deploymentCreationTime: d.deploymentCreationTime,
|
|
42935
|
+
actions: d.actions ?? []
|
|
42891
42936
|
}));
|
|
42892
42937
|
return { ok: true, deployments, limit, offset, total: result.count };
|
|
42893
42938
|
}
|
|
@@ -43186,13 +43231,57 @@ async function deployRunAsync(options) {
|
|
|
43186
43231
|
const finalInstanceId = activationInstanceId == null ? baseSuccess.instanceId : activationInstanceId;
|
|
43187
43232
|
return { ...baseSuccess, activationStatus, instanceId: finalInstanceId };
|
|
43188
43233
|
}
|
|
43234
|
+
var EXISTING_DEPLOYMENT_MARKER = "Deployment exists in a failed or running state";
|
|
43235
|
+
function isExistingDeploymentConflict(httpStatus, message, details, parsedErrors) {
|
|
43236
|
+
if (httpStatus !== 400) {
|
|
43237
|
+
return false;
|
|
43238
|
+
}
|
|
43239
|
+
if (message.includes(EXISTING_DEPLOYMENT_MARKER) || details.includes(EXISTING_DEPLOYMENT_MARKER)) {
|
|
43240
|
+
return true;
|
|
43241
|
+
}
|
|
43242
|
+
if (parsedErrors) {
|
|
43243
|
+
for (const fieldMessages of Object.values(parsedErrors)) {
|
|
43244
|
+
if (fieldMessages.some((m) => m.includes(EXISTING_DEPLOYMENT_MARKER))) {
|
|
43245
|
+
return true;
|
|
43246
|
+
}
|
|
43247
|
+
}
|
|
43248
|
+
}
|
|
43249
|
+
return false;
|
|
43250
|
+
}
|
|
43251
|
+
function buildDeploymentExistsInstructions(packageName, existing) {
|
|
43252
|
+
const base = `A deployment for '${packageName}' already exists and cannot be redeployed — it must be upgraded in place. ` + "For now, open the deployment in the Orchestrator UI and use the Upgrade button. " + "Run 'uip solution deploy list' to see the pending state — the Operation and TargetPackageVersion columns show whether an upgrade is queued.";
|
|
43253
|
+
if (!existing) {
|
|
43254
|
+
return base;
|
|
43255
|
+
}
|
|
43256
|
+
const target = existing.targetPackageVersion ?? existing.newPackageVersionAvailable;
|
|
43257
|
+
const detail = existing.currentPackageVersion && target ? ` Existing deployment '${existing.name}' is at ${existing.currentPackageVersion} and can be upgraded to ${target}.` : ` Existing deployment: '${existing.name}'.`;
|
|
43258
|
+
return `${base}${detail}`;
|
|
43259
|
+
}
|
|
43189
43260
|
async function deployRunPersonalWorkspaceAsync(auth, options) {
|
|
43190
43261
|
const [pwError, result] = await catchError(deployToPersonalWorkspace(auth, {
|
|
43191
43262
|
packageName: options.packageName,
|
|
43192
43263
|
packageVersion: options.packageVersion
|
|
43193
43264
|
}, { tenant: options.tenant, loginValidity: options.loginValidity }));
|
|
43194
43265
|
if (pwError) {
|
|
43195
|
-
const { message, details } = await extractErrorDetails(pwError);
|
|
43266
|
+
const { message, details, context, parsedErrors } = await extractErrorDetails(pwError);
|
|
43267
|
+
if (isExistingDeploymentConflict(context?.httpStatus, message, details, parsedErrors)) {
|
|
43268
|
+
const [pwResolveError, pw] = await catchError(resolvePersonalWorkspace({
|
|
43269
|
+
tenant: options.tenant,
|
|
43270
|
+
loginValidity: options.loginValidity,
|
|
43271
|
+
envFilePath: options.envFilePath
|
|
43272
|
+
}));
|
|
43273
|
+
let scope;
|
|
43274
|
+
if (!pwResolveError && pw) {
|
|
43275
|
+
scope = async ({ init }) => ({
|
|
43276
|
+
headers: {
|
|
43277
|
+
...init.headers,
|
|
43278
|
+
"X-UIPATH-FolderKey": pw.key
|
|
43279
|
+
}
|
|
43280
|
+
});
|
|
43281
|
+
}
|
|
43282
|
+
const existing = await findDeploymentByPackageName(auth, options.packageName, undefined, scope);
|
|
43283
|
+
return fail3("deployment_exists", message, buildDeploymentExistsInstructions(options.packageName, existing));
|
|
43284
|
+
}
|
|
43196
43285
|
return fail3("personal_workspace_deploy_failed", message, `Ensure the package was published to your Personal Workspace first: uip solution publish <package> --personal-workspace. Details: ${details}`);
|
|
43197
43286
|
}
|
|
43198
43287
|
return {
|
|
@@ -43332,4 +43421,4 @@ export {
|
|
|
43332
43421
|
activateDeploymentAsync
|
|
43333
43422
|
};
|
|
43334
43423
|
|
|
43335
|
-
//# debugId=
|
|
43424
|
+
//# debugId=CB347BC9915C717164756E2164756E21
|
package/dist/init.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Public `@uipath/solution-tool/init` entry: the programmatic init service for SDK
|
|
3
3
|
* consumers, without the CLI side effects of `tool.ts`. Mirrors `@uipath/flow-tool/validation`.
|
|
4
|
+
*
|
|
5
|
+
* Also re-exports `addProjectArtifactsToSolutionAsync` so `*-tool init` paths
|
|
6
|
+
* (flow, maestro, agent, case) can generate the `resources/solution_folder/process/<kind>/`
|
|
7
|
+
* artifact-resource entries that `uip solution project add` produces. Without
|
|
8
|
+
* this step, init succeeds but `solution pack` would later miss the artifact
|
|
9
|
+
* resources, forcing a `solution project remove` + `add` recovery cycle.
|
|
4
10
|
*/
|
|
11
|
+
export type { AddProjectArtifactsOptions, ProjectArtifactsResult, } from "./services/project-artifacts-service";
|
|
12
|
+
export { addProjectArtifactsToSolutionAsync } from "./services/project-artifacts-service";
|
|
5
13
|
export type { SolutionInitOptions, SolutionInitResult, SolutionInitStage, } from "./services/solution-init-service";
|
|
6
14
|
export { SolutionInitError, solutionInitAsync, } from "./services/solution-init-service";
|