@uipath/solution-packager 0.0.30 → 1.196.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/index.js +231 -112
- package/dist/node.js +227 -54
- package/dist/src/browser-solution-packager-factory.d.ts +0 -1
- package/dist/src/i18n/locales/en.d.ts +3 -0
- package/dist/src/models/solution-pack-options.d.ts +4 -6
- package/dist/src/node-solution-packager-factory.d.ts +0 -1
- package/dist/src/services/options-builder.d.ts +7 -5
- package/dist/src/services/solution-loader.d.ts +1 -1
- package/dist/src/services/solution-pack-service.d.ts +7 -0
- package/dist/src/services/solution-packager.d.ts +25 -13
- package/dist/src/services/solution-restore-service.d.ts +23 -0
- package/dist/src/services/solution-validate-options-validator.d.ts +7 -0
- package/dist/src/services/solution-validate-service.d.ts +15 -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-packager-e2e.test.d.ts → solution-packager.e2e.test.d.ts} +1 -0
- package/dist/tests/solution-packager.spec.d.ts +1 -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 +24 -39
- /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-packager.test.d.ts → solution-pack-service.spec.d.ts} +0 -0
- /package/dist/tests/{zip-temp-storage-integration.test.d.ts → solution-restore-service.spec.d.ts} +0 -0
|
@@ -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)
|
|
@@ -38,6 +32,13 @@ export interface ISolutionPackager {
|
|
|
38
32
|
* @returns ToolResult with the path to the created solution package
|
|
39
33
|
*/
|
|
40
34
|
packSolutionAsync(options: SolutionPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
35
|
+
/**
|
|
36
|
+
* Validate all projects in a solution using the provided options.
|
|
37
|
+
* @param options Solution pack options containing all parameters
|
|
38
|
+
* @param cancellationToken Optional cancellation token
|
|
39
|
+
* @returns ToolResult indicating success if every project passed validation
|
|
40
|
+
*/
|
|
41
|
+
validateSolutionAsync(options: SolutionPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
41
42
|
/**
|
|
42
43
|
* Convert a successful ToolResult to a list of package streams.
|
|
43
44
|
* @param result The ToolResult to convert
|
|
@@ -59,15 +60,11 @@ export declare class SolutionPackager implements ISolutionPackager {
|
|
|
59
60
|
private readonly projectExecutor;
|
|
60
61
|
private readonly solutionLoader;
|
|
61
62
|
private readonly solutionPackService;
|
|
62
|
-
private readonly
|
|
63
|
+
private readonly solutionValidateService;
|
|
64
|
+
private readonly packOptionsValidator;
|
|
65
|
+
private readonly validateOptionsValidator;
|
|
63
66
|
private readonly governancePolicyService;
|
|
64
67
|
constructor(fileSystem: IFileSystem, telemetryService: ITelemetryService, packageSignService?: IPackageSignService | undefined);
|
|
65
|
-
/**
|
|
66
|
-
* Check if the solution can be packed by verifying all project types have registered tools.
|
|
67
|
-
* @param solutionPath Path to the solution folder
|
|
68
|
-
* @returns True if all project types in the solution have registered tool factories
|
|
69
|
-
*/
|
|
70
|
-
canPackSolutionAsync(solutionPath: string): Promise<boolean>;
|
|
71
68
|
/**
|
|
72
69
|
* Setup the temporary storage.
|
|
73
70
|
* @param input The solution folder as a zip Uint8Array (extracts to temp folder) or a path string (uses as-is)
|
|
@@ -90,6 +87,21 @@ export declare class SolutionPackager implements ISolutionPackager {
|
|
|
90
87
|
* @returns ToolResult with the path to the created solution package
|
|
91
88
|
*/
|
|
92
89
|
packSolutionAsync(options: SolutionPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Validate all projects in a solution using the provided options.
|
|
92
|
+
*/
|
|
93
|
+
validateSolutionAsync(options: SolutionPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
94
|
+
/**
|
|
95
|
+
* Narrow the solution's project list to the subset the caller asked for.
|
|
96
|
+
* An empty or absent `projectDesignIds` is a no-op (the whole solution is
|
|
97
|
+
* processed). Unknown IDs are warned about and silently dropped.
|
|
98
|
+
*
|
|
99
|
+
* The filter must be applied before `createOperationContext` so that
|
|
100
|
+
* `ProjectOperationContext.projects` — which the remote-agent bundle
|
|
101
|
+
* executor uses to count compatible projects up front — stays in sync
|
|
102
|
+
* with what the pack/validate fan-out actually enqueues.
|
|
103
|
+
*/
|
|
104
|
+
private filterSolutionProjects;
|
|
93
105
|
private createOperationContext;
|
|
94
106
|
/**
|
|
95
107
|
* Convert a successful ToolResult to a list of package streams.
|
|
@@ -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,7 @@
|
|
|
1
|
+
import { type IPackagerParametersValidator, PackagerParametersValidator } from "@uipath/project-packager";
|
|
2
|
+
import type { ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
3
|
+
import type { SolutionPackOptions } from "../models/solution-pack-options.js";
|
|
4
|
+
export type ISolutionValidateOptionsValidator = IPackagerParametersValidator<SolutionPackOptions>;
|
|
5
|
+
export declare class SolutionValidateOptionsValidator extends PackagerParametersValidator<SolutionPackOptions> implements ISolutionValidateOptionsValidator {
|
|
6
|
+
validateAsync(options: SolutionPackOptions, _cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IProjectToolExecutor, ITelemetryService } 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
|
+
export interface ISolutionValidateService {
|
|
7
|
+
validateAsync(parameters: SolutionPackOptions, solution: LoadedUiPathSolution, context: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
8
|
+
}
|
|
9
|
+
export declare class SolutionValidateService implements ISolutionValidateService {
|
|
10
|
+
private readonly optionsBuilder;
|
|
11
|
+
private readonly projectExecutor;
|
|
12
|
+
private readonly telemetry;
|
|
13
|
+
constructor(optionsBuilder: IOptionsBuilder, projectExecutor: IProjectToolExecutor, telemetry: ITelemetryService);
|
|
14
|
+
validateAsync(parameters: SolutionPackOptions, solution: LoadedUiPathSolution, context: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
15
|
+
}
|
|
@@ -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,5 +1,7 @@
|
|
|
1
1
|
export declare enum TelemetryNames {
|
|
2
2
|
SolutionPackagerPackSolution = "SolutionPackager.PackSolution",
|
|
3
|
+
SolutionPackagerValidateSolution = "SolutionPackager.ValidateSolution",
|
|
3
4
|
SolutionPack = "SolutionPackager.Solution.Pack",
|
|
5
|
+
SolutionValidate = "SolutionPackager.Solution.Validate",
|
|
4
6
|
SolutionCompress = "SolutionPackager.Solution.Compress"
|
|
5
7
|
}
|
|
@@ -5,5 +5,6 @@ import "@uipath/packager-tool-bpmn";
|
|
|
5
5
|
import "@uipath/packager-tool-case";
|
|
6
6
|
import "@uipath/packager-tool-flow";
|
|
7
7
|
import "@uipath/tool-agent";
|
|
8
|
+
import "@uipath/packager-tool-functions";
|
|
8
9
|
import "@uipath/packager-tool-webapp";
|
|
9
10
|
import "@uipath/resource-builder-tool";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../src/i18n/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/solution-packager",
|
|
3
|
-
"
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"version": "1.196.0",
|
|
4
5
|
"description": "UiPath Solution Packager - core library for packing UiPath solutions",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "./dist/index.js",
|
|
@@ -27,50 +28,34 @@
|
|
|
27
28
|
"dist",
|
|
28
29
|
"!dist/**/*.map"
|
|
29
30
|
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "bun build ./src/index.ts --outdir dist --format esm --target browser --external @uipath/solutionpackager-tool-core --external '@uipath/project-packager/*' --external @uipath/project-packager --external '@uipath/filesystem/*' --external @uipath/filesystem --external '@uipath/telemetry/*' --external @uipath/telemetry && bun build ./src/node.ts --outdir dist --format esm --target node --external @uipath/solutionpackager-tool-core --external '@uipath/project-packager/*' --external @uipath/project-packager --external '@uipath/telemetry/*' --external @uipath/telemetry --external '@uipath/filesystem/*' --external @uipath/filesystem && tsc --emitDeclarationOnly --outDir dist",
|
|
32
|
-
"clean": "rimraf dist",
|
|
33
|
-
"test": "vitest run",
|
|
34
|
-
"e2e": "vitest run --config vitest.e2e.config.ts",
|
|
35
|
-
"test:browser": "vitest run --config=vitest.browser.config.ts",
|
|
36
|
-
"test:coverage": "vitest run --coverage",
|
|
37
|
-
"test:browser:coverage": "vitest run --config=vitest.browser.config.ts --coverage",
|
|
38
|
-
"test:all": "bun run test && bun run test:browser",
|
|
39
|
-
"test:all:coverage": "bun run test:coverage && bun run test:browser:coverage",
|
|
40
|
-
"prepack": "bun run build",
|
|
41
|
-
"publish:dry": "bun publish --dry-run",
|
|
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
31
|
"dependencies": {
|
|
49
|
-
"@uipath/project-packager": "1.
|
|
50
|
-
"@uipath/
|
|
51
|
-
"@uipath/filesystem": "0.1.7",
|
|
52
|
-
"@uipath/solutionpackager-tool-core": "0.0.31"
|
|
32
|
+
"@uipath/project-packager": "1.196.0",
|
|
33
|
+
"@uipath/solutionpackager-tool-core": "1.196.0"
|
|
53
34
|
},
|
|
54
35
|
"peerDependencies": {
|
|
55
36
|
"fflate": "^0.8.2"
|
|
56
37
|
},
|
|
57
38
|
"devDependencies": {
|
|
58
|
-
"@types/node": "^25.5.
|
|
59
|
-
"@uipath/
|
|
60
|
-
"@uipath/
|
|
61
|
-
"@uipath/
|
|
62
|
-
"@uipath/
|
|
63
|
-
"@uipath/packager-tool-
|
|
64
|
-
"@uipath/packager-tool-
|
|
65
|
-
"@uipath/packager-tool-
|
|
66
|
-
"@uipath/packager-tool-
|
|
67
|
-
"@uipath/packager-tool-
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
39
|
+
"@types/node": "^25.5.2",
|
|
40
|
+
"@uipath/common": "1.196.0",
|
|
41
|
+
"@uipath/filesystem": "1.196.0",
|
|
42
|
+
"@uipath/resource-builder-tool": "2025.11.0-alpha2928-3101",
|
|
43
|
+
"@uipath/tool-agent": "^1.2.6",
|
|
44
|
+
"@uipath/packager-tool-apiworkflow": "1.196.0",
|
|
45
|
+
"@uipath/packager-tool-bpmn": "1.196.0",
|
|
46
|
+
"@uipath/packager-tool-case": "1.196.0",
|
|
47
|
+
"@uipath/packager-tool-connector": "1.196.0",
|
|
48
|
+
"@uipath/packager-tool-flow": "1.196.0",
|
|
49
|
+
"@uipath/packager-tool-functions": "1.196.0",
|
|
50
|
+
"@uipath/packager-tool-webapp": "1.196.0",
|
|
51
|
+
"@uipath/packager-tool-workflowcompiler": "1.196.0",
|
|
52
|
+
"@vitest/browser": "^4.1.6",
|
|
53
|
+
"@vitest/browser-playwright": "^4.1.6",
|
|
54
|
+
"@vitest/coverage-v8": "^4.1.6",
|
|
71
55
|
"playwright": "^1.57.0",
|
|
72
|
-
"typescript": "^
|
|
56
|
+
"typescript": "^6.0.2",
|
|
73
57
|
"vite-tsconfig-paths": "^6.1.1",
|
|
74
|
-
"vitest": "^4.
|
|
75
|
-
}
|
|
58
|
+
"vitest": "^4.1.6"
|
|
59
|
+
},
|
|
60
|
+
"gitHead": "bed2b46f1ec33a47a7dcae2e6d4b7ab99bd06981"
|
|
76
61
|
}
|
|
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
|