@uipath/solution-packager 0.0.34 → 1.197.0-preview.64
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/index.js +239 -95
- package/dist/node.js +239 -41
- package/dist/src/browser-solution-packager-factory.d.ts +11 -4
- package/dist/src/i18n/locales/en.d.ts +3 -0
- package/dist/src/node-solution-packager-factory.d.ts +0 -1
- package/dist/src/services/options-builder.d.ts +6 -1
- package/dist/src/services/solution-loader.d.ts +1 -1
- package/dist/src/services/solution-pack-service.d.ts +24 -12
- package/dist/src/services/solution-packager.d.ts +15 -12
- package/dist/src/services/solution-restore-service.d.ts +23 -0
- package/dist/src/services/tool-result-helpers.d.ts +10 -0
- package/dist/src/telemetry-names.d.ts +2 -0
- package/dist/tests/solution-validate-options-validator.spec.d.ts +1 -0
- package/dist/tests/solution-validate-service.spec.d.ts +1 -0
- package/dist/tests/zip-temp-storage.integration.test.d.ts +1 -0
- package/package.json +35 -74
- package/dist/tests/solution-packager-e2e.test.d.ts +0 -9
- /package/dist/tests/{browser.test.d.ts → browser.spec.d.ts} +0 -0
- /package/dist/tests/{common.test.d.ts → common.spec.d.ts} +0 -0
- /package/dist/tests/{node.test.d.ts → node.spec.d.ts} +0 -0
- /package/dist/tests/{solution-pack-service.test.d.ts → options-builder.spec.d.ts} +0 -0
- /package/dist/tests/{solution-loader.test.d.ts → solution-loader.spec.d.ts} +0 -0
- /package/dist/tests/{solution-validate-options-validator.test.d.ts → solution-pack-service.spec.d.ts} +0 -0
- /package/dist/tests/{solution-validate-service.test.d.ts → solution-packager.e2e.test.d.ts} +0 -0
- /package/dist/tests/{solution-packager.test.d.ts → solution-packager.spec.d.ts} +0 -0
- /package/dist/tests/{zip-temp-storage-integration.test.d.ts → solution-restore-service.spec.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IPackageSignService, type IProjectToolExecutor, type ITelemetryService, type IToolsFactory } from "@uipath/project-packager";
|
|
2
2
|
import { type IFileSystem, type IZipService, type ProjectOperationContext, ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
3
3
|
import type { LoadedUiPathSolution } from "../models/loaded-uipath-solution.js";
|
|
4
4
|
import type { SolutionPackOptions } from "../models/solution-pack-options.js";
|
|
@@ -19,7 +19,8 @@ export declare class SolutionPackService implements ISolutionPackService {
|
|
|
19
19
|
private readonly zipService;
|
|
20
20
|
private readonly fileSystem;
|
|
21
21
|
private readonly telemetry;
|
|
22
|
-
|
|
22
|
+
private readonly packageSignService?;
|
|
23
|
+
constructor(optionsBuilder: IOptionsBuilder, toolsFactory: IToolsFactory, projectExecutor: IProjectToolExecutor, zipService: IZipService, fileSystem: IFileSystem, telemetry: ITelemetryService, packageSignService?: IPackageSignService | undefined);
|
|
23
24
|
packAsync(parameters: SolutionPackOptions, solution: LoadedUiPathSolution, context: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
24
25
|
/**
|
|
25
26
|
* Pack all projects in parallel
|
|
@@ -39,17 +40,21 @@ export declare class SolutionPackService implements ISolutionPackService {
|
|
|
39
40
|
*/
|
|
40
41
|
private packSingleProjectAsync;
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
43
|
+
* Sign the project .nupkg(s) produced for the solution, before zipping.
|
|
44
|
+
*
|
|
45
|
+
* Project tools write their package into the solution output tree; the
|
|
46
|
+
* workflow compiler reports a content *folder* rather than the .nupkg, so
|
|
47
|
+
* each produced path is resolved to the real .nupkg first. Unlike the
|
|
48
|
+
* single-project packager there's no copy/pack-from-content step here, so a
|
|
49
|
+
* path that resolves to nothing means the package is genuinely missing —
|
|
50
|
+
* fail loudly rather than zip an unsigned (or absent) package.
|
|
51
|
+
*
|
|
52
|
+
* A no-op when signing isn't requested (no signing info or no certificate).
|
|
53
|
+
* @param projectResults The per-project pack results, holding produced paths
|
|
54
|
+
* @param signingInfo Signing configuration, if signing was requested
|
|
55
|
+
* @returns Success, or the first signing/resolution failure
|
|
45
56
|
*/
|
|
46
|
-
private
|
|
47
|
-
/**
|
|
48
|
-
* Get a combined error message from all failed results
|
|
49
|
-
* @param results Array of tool results
|
|
50
|
-
* @returns Combined error message
|
|
51
|
-
*/
|
|
52
|
-
private getFailedResultsMessage;
|
|
57
|
+
private signProjectPackagesAsync;
|
|
53
58
|
/**
|
|
54
59
|
* Compress the solution output folder into a zip archive
|
|
55
60
|
* @param parameters Solution pack parameters
|
|
@@ -57,4 +62,11 @@ export declare class SolutionPackService implements ISolutionPackService {
|
|
|
57
62
|
* @returns Path to the created archive file
|
|
58
63
|
*/
|
|
59
64
|
private compressSolutionAsync;
|
|
65
|
+
/**
|
|
66
|
+
* Write a `package.metadata.json` file into the solution output folder
|
|
67
|
+
* (it lands at the root of the produced .zip). Only fields the caller
|
|
68
|
+
* actually supplied are emitted, so a metadata-free pack still gets a
|
|
69
|
+
* minimal file carrying the package name and version.
|
|
70
|
+
*/
|
|
71
|
+
private writePackageMetadataAsync;
|
|
60
72
|
}
|
|
@@ -10,12 +10,6 @@ export interface ISolutionPackager {
|
|
|
10
10
|
* File system instance
|
|
11
11
|
*/
|
|
12
12
|
readonly fileSystem: IFileSystem;
|
|
13
|
-
/**
|
|
14
|
-
* Check if the solution can be packed by verifying all project types have registered tools.
|
|
15
|
-
* @param solutionPath Path to the solution folder
|
|
16
|
-
* @returns True if all project types in the solution have registered tool factories
|
|
17
|
-
*/
|
|
18
|
-
canPackSolutionAsync(solutionPath: string): Promise<boolean>;
|
|
19
13
|
/**
|
|
20
14
|
* Setup the temporary storage.
|
|
21
15
|
* @param input The solution folder as a zip Uint8Array (extracts to temp folder) or a path string (uses as-is)
|
|
@@ -45,6 +39,15 @@ export interface ISolutionPackager {
|
|
|
45
39
|
* @returns ToolResult indicating success if every project passed validation
|
|
46
40
|
*/
|
|
47
41
|
validateSolutionAsync(options: SolutionPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
42
|
+
/**
|
|
43
|
+
* Restore dependencies for every project in a solution, without packing
|
|
44
|
+
* or building. Resolves NuGet dependencies (including authenticated feeds
|
|
45
|
+
* carried by `options.connection`) so a later pack can compile offline.
|
|
46
|
+
* @param options Solution pack options containing all parameters
|
|
47
|
+
* @param cancellationToken Optional cancellation token
|
|
48
|
+
* @returns ToolResult indicating success if every project restored
|
|
49
|
+
*/
|
|
50
|
+
restoreSolutionAsync(options: SolutionPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
48
51
|
/**
|
|
49
52
|
* Convert a successful ToolResult to a list of package streams.
|
|
50
53
|
* @param result The ToolResult to convert
|
|
@@ -66,17 +69,12 @@ export declare class SolutionPackager implements ISolutionPackager {
|
|
|
66
69
|
private readonly projectExecutor;
|
|
67
70
|
private readonly solutionLoader;
|
|
68
71
|
private readonly solutionPackService;
|
|
72
|
+
private readonly solutionRestoreService;
|
|
69
73
|
private readonly solutionValidateService;
|
|
70
74
|
private readonly packOptionsValidator;
|
|
71
75
|
private readonly validateOptionsValidator;
|
|
72
76
|
private readonly governancePolicyService;
|
|
73
77
|
constructor(fileSystem: IFileSystem, telemetryService: ITelemetryService, packageSignService?: IPackageSignService | undefined);
|
|
74
|
-
/**
|
|
75
|
-
* Check if the solution can be packed by verifying all project types have registered tools.
|
|
76
|
-
* @param solutionPath Path to the solution folder
|
|
77
|
-
* @returns True if all project types in the solution have registered tool factories
|
|
78
|
-
*/
|
|
79
|
-
canPackSolutionAsync(solutionPath: string): Promise<boolean>;
|
|
80
78
|
/**
|
|
81
79
|
* Setup the temporary storage.
|
|
82
80
|
* @param input The solution folder as a zip Uint8Array (extracts to temp folder) or a path string (uses as-is)
|
|
@@ -103,6 +101,11 @@ export declare class SolutionPackager implements ISolutionPackager {
|
|
|
103
101
|
* Validate all projects in a solution using the provided options.
|
|
104
102
|
*/
|
|
105
103
|
validateSolutionAsync(options: SolutionPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
104
|
+
/**
|
|
105
|
+
* Restore dependencies for every project in a solution, without packing
|
|
106
|
+
* or building.
|
|
107
|
+
*/
|
|
108
|
+
restoreSolutionAsync(options: SolutionPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
106
109
|
/**
|
|
107
110
|
* Narrow the solution's project list to the subset the caller asked for.
|
|
108
111
|
* An empty or absent `projectDesignIds` is a no-op (the whole solution is
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { IProjectToolExecutor, ITelemetryService, IToolsFactory } from "@uipath/project-packager";
|
|
2
|
+
import { type ProjectOperationContext, ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
3
|
+
import type { LoadedUiPathSolution } from "../models/loaded-uipath-solution.js";
|
|
4
|
+
import type { SolutionPackOptions } from "../models/solution-pack-options.js";
|
|
5
|
+
import type { IOptionsBuilder } from "./options-builder.js";
|
|
6
|
+
/**
|
|
7
|
+
* Interface for the service responsible for restoring a solution's
|
|
8
|
+
* dependencies, without packing, building, or compressing.
|
|
9
|
+
*/
|
|
10
|
+
export interface ISolutionRestoreService {
|
|
11
|
+
/**
|
|
12
|
+
* Restore dependencies for a solution and all its projects.
|
|
13
|
+
*/
|
|
14
|
+
restoreAsync(parameters: SolutionPackOptions, solution: LoadedUiPathSolution, context: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
15
|
+
}
|
|
16
|
+
export declare class SolutionRestoreService implements ISolutionRestoreService {
|
|
17
|
+
private readonly optionsBuilder;
|
|
18
|
+
private readonly toolsFactory;
|
|
19
|
+
private readonly projectExecutor;
|
|
20
|
+
private readonly telemetry;
|
|
21
|
+
constructor(optionsBuilder: IOptionsBuilder, toolsFactory: IToolsFactory, projectExecutor: IProjectToolExecutor, telemetry: ITelemetryService);
|
|
22
|
+
restoreAsync(parameters: SolutionPackOptions, solution: LoadedUiPathSolution, context: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
2
|
+
/**
|
|
3
|
+
* Result-aggregation helpers shared by the solution pack and restore services,
|
|
4
|
+
* which both fan a batch of tool operations out in parallel and need to report
|
|
5
|
+
* the combined failure state.
|
|
6
|
+
*/
|
|
7
|
+
/** True when any result in the batch failed. */
|
|
8
|
+
export declare function hasFailedResults(results: ToolResult[]): boolean;
|
|
9
|
+
/** Combined, comma-separated message of every failed result in the batch. */
|
|
10
|
+
export declare function getFailedResultsMessage(results: ToolResult[]): string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare enum TelemetryNames {
|
|
2
2
|
SolutionPackagerPackSolution = "SolutionPackager.PackSolution",
|
|
3
3
|
SolutionPackagerValidateSolution = "SolutionPackager.ValidateSolution",
|
|
4
|
+
SolutionPackagerRestoreSolution = "SolutionPackager.RestoreSolution",
|
|
4
5
|
SolutionPack = "SolutionPackager.Solution.Pack",
|
|
5
6
|
SolutionValidate = "SolutionPackager.Solution.Validate",
|
|
7
|
+
SolutionRestore = "SolutionPackager.Solution.Restore",
|
|
6
8
|
SolutionCompress = "SolutionPackager.Solution.Compress"
|
|
7
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,77 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"./node": {
|
|
13
|
-
"types": "./dist/src/node.d.ts",
|
|
14
|
-
"default": "./dist/node.js"
|
|
15
|
-
}
|
|
2
|
+
"name": "@uipath/solution-packager",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"version": "1.197.0-preview.64",
|
|
5
|
+
"description": "UiPath Solution Packager - core library for packing UiPath solutions",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/src/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
16
12
|
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"publish:gh": "bun publish",
|
|
43
|
-
"version:patch": "bun version patch --no-git-tag-version",
|
|
44
|
-
"version:minor": "bun version minor --no-git-tag-version",
|
|
45
|
-
"version:major": "bun version major --no-git-tag-version",
|
|
46
|
-
"lint": "biome check ."
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@uipath/project-packager": "1.1.15",
|
|
50
|
-
"@uipath/common": "0.9.0",
|
|
51
|
-
"@uipath/filesystem": "0.9.0",
|
|
52
|
-
"@uipath/solutionpackager-tool-core": "0.0.33"
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"fflate": "^0.8.2"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@types/node": "^25.5.0",
|
|
59
|
-
"@uipath/resource-builder-tool": "^2025.11.0-alpha2430-2948",
|
|
60
|
-
"@uipath/tool-agent": "^1.0.1",
|
|
61
|
-
"@uipath/packager-tool-apiworkflow": "0.0.18",
|
|
62
|
-
"@uipath/packager-tool-bpmn": "0.0.8",
|
|
63
|
-
"@uipath/packager-tool-case": "0.0.8",
|
|
64
|
-
"@uipath/packager-tool-connector": "0.0.18",
|
|
65
|
-
"@uipath/packager-tool-flow": "0.0.18",
|
|
66
|
-
"@uipath/packager-tool-webapp": "1.0.5",
|
|
67
|
-
"@uipath/packager-tool-workflowcompiler": "0.0.15",
|
|
68
|
-
"@vitest/browser": "^4.0.14",
|
|
69
|
-
"@vitest/browser-playwright": "^4.0.14",
|
|
70
|
-
"@vitest/coverage-v8": "^4.0.14",
|
|
71
|
-
"playwright": "^1.57.0",
|
|
72
|
-
"typescript": "^5.9.3",
|
|
73
|
-
"vite-tsconfig-paths": "^6.1.1",
|
|
74
|
-
"vitest": "^4.0.14"
|
|
75
|
-
},
|
|
76
|
-
"gitHead": "3f1b4d8e9f910be81e4cab956537f21dbd5d63ac"
|
|
13
|
+
"./node": {
|
|
14
|
+
"types": "./dist/src/node.d.ts",
|
|
15
|
+
"default": "./dist/node.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"types": "./dist/src/index.d.ts",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/UiPath/cli.git",
|
|
22
|
+
"directory": "packages/packager/solution-packager"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"registry": "https://registry.npmjs.org/"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@uipath/project-packager": "1.197.0",
|
|
32
|
+
"@uipath/solutionpackager-tool-core": "1.197.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"fflate": "^0.8.2"
|
|
36
|
+
},
|
|
37
|
+
"gitHead": "3977b977945bf519336258da69fd271433eaaef4"
|
|
77
38
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "@uipath/packager-tool-connector";
|
|
2
|
-
import "@uipath/packager-tool-workflowcompiler";
|
|
3
|
-
import "@uipath/packager-tool-apiworkflow";
|
|
4
|
-
import "@uipath/packager-tool-bpmn";
|
|
5
|
-
import "@uipath/packager-tool-case";
|
|
6
|
-
import "@uipath/packager-tool-flow";
|
|
7
|
-
import "@uipath/tool-agent";
|
|
8
|
-
import "@uipath/packager-tool-webapp";
|
|
9
|
-
import "@uipath/resource-builder-tool";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/tests/{zip-temp-storage-integration.test.d.ts → solution-restore-service.spec.d.ts}
RENAMED
|
File without changes
|