@uipath/solution-packager 0.0.34 → 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.
Files changed (23) hide show
  1. package/dist/index.js +107 -75
  2. package/dist/node.js +107 -21
  3. package/dist/src/browser-solution-packager-factory.d.ts +0 -1
  4. package/dist/src/i18n/locales/en.d.ts +3 -0
  5. package/dist/src/node-solution-packager-factory.d.ts +0 -1
  6. package/dist/src/services/solution-loader.d.ts +1 -1
  7. package/dist/src/services/solution-pack-service.d.ts +7 -0
  8. package/dist/src/services/solution-packager.d.ts +0 -12
  9. package/dist/src/services/solution-restore-service.d.ts +23 -0
  10. package/dist/src/services/tool-result-helpers.d.ts +10 -0
  11. package/dist/tests/{solution-packager-e2e.test.d.ts → solution-packager.e2e.test.d.ts} +1 -0
  12. package/dist/tests/solution-validate-service.spec.d.ts +1 -0
  13. package/dist/tests/zip-temp-storage.integration.test.d.ts +1 -0
  14. package/package.json +23 -39
  15. /package/dist/tests/{browser.test.d.ts → browser.spec.d.ts} +0 -0
  16. /package/dist/tests/{common.test.d.ts → common.spec.d.ts} +0 -0
  17. /package/dist/tests/{node.test.d.ts → node.spec.d.ts} +0 -0
  18. /package/dist/tests/{solution-pack-service.test.d.ts → options-builder.spec.d.ts} +0 -0
  19. /package/dist/tests/{solution-loader.test.d.ts → solution-loader.spec.d.ts} +0 -0
  20. /package/dist/tests/{solution-validate-options-validator.test.d.ts → solution-pack-service.spec.d.ts} +0 -0
  21. /package/dist/tests/{solution-packager.test.d.ts → solution-packager.spec.d.ts} +0 -0
  22. /package/dist/tests/{solution-validate-service.test.d.ts → solution-restore-service.spec.d.ts} +0 -0
  23. /package/dist/tests/{zip-temp-storage-integration.test.d.ts → solution-validate-options-validator.spec.d.ts} +0 -0
package/dist/index.js CHANGED
@@ -8,6 +8,9 @@ var de_default = {
8
8
  pathRequired: "Solution directory path is required",
9
9
  fileNotFound: "Solution file not found: {path}",
10
10
  invalidSolution: "Invalid solution file: {path}",
11
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
12
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
13
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
11
14
  noSolutionFile: "No .uipx solution file found in directory: {path}",
12
15
  invalidStorageFile: "Invalid {fileName} file"
13
16
  }
@@ -30,6 +33,9 @@ var en = {
30
33
  pathRequired: "Solution directory path is required",
31
34
  fileNotFound: "Solution file not found: {path}",
32
35
  invalidSolution: "Invalid solution file: {path}",
36
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
37
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
38
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
33
39
  noSolutionFile: "No .uipx solution file found in directory: {path}",
34
40
  invalidStorageFile: "Invalid {fileName} file"
35
41
  }
@@ -51,6 +57,9 @@ var es_default = {
51
57
  pathRequired: "Solution directory path is required",
52
58
  fileNotFound: "Solution file not found: {path}",
53
59
  invalidSolution: "Invalid solution file: {path}",
60
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
61
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
62
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
54
63
  noSolutionFile: "No .uipx solution file found in directory: {path}",
55
64
  invalidStorageFile: "Invalid {fileName} file"
56
65
  }
@@ -72,6 +81,9 @@ var es_MX_default = {
72
81
  pathRequired: "Solution directory path is required",
73
82
  fileNotFound: "Solution file not found: {path}",
74
83
  invalidSolution: "Invalid solution file: {path}",
84
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
85
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
86
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
75
87
  noSolutionFile: "No .uipx solution file found in directory: {path}",
76
88
  invalidStorageFile: "Invalid {fileName} file"
77
89
  }
@@ -93,6 +105,9 @@ var fr_default = {
93
105
  pathRequired: "Solution directory path is required",
94
106
  fileNotFound: "Solution file not found: {path}",
95
107
  invalidSolution: "Invalid solution file: {path}",
108
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
109
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
110
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
96
111
  noSolutionFile: "No .uipx solution file found in directory: {path}",
97
112
  invalidStorageFile: "Invalid {fileName} file"
98
113
  }
@@ -114,6 +129,9 @@ var ja_default = {
114
129
  pathRequired: "Solution directory path is required",
115
130
  fileNotFound: "Solution file not found: {path}",
116
131
  invalidSolution: "Invalid solution file: {path}",
132
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
133
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
134
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
117
135
  noSolutionFile: "No .uipx solution file found in directory: {path}",
118
136
  invalidStorageFile: "Invalid {fileName} file"
119
137
  }
@@ -135,6 +153,9 @@ var ko_default = {
135
153
  pathRequired: "Solution directory path is required",
136
154
  fileNotFound: "Solution file not found: {path}",
137
155
  invalidSolution: "Invalid solution file: {path}",
156
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
157
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
158
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
138
159
  noSolutionFile: "No .uipx solution file found in directory: {path}",
139
160
  invalidStorageFile: "Invalid {fileName} file"
140
161
  }
@@ -156,6 +177,9 @@ var pt_default = {
156
177
  pathRequired: "Solution directory path is required",
157
178
  fileNotFound: "Solution file not found: {path}",
158
179
  invalidSolution: "Invalid solution file: {path}",
180
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
181
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
182
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
159
183
  noSolutionFile: "No .uipx solution file found in directory: {path}",
160
184
  invalidStorageFile: "Invalid {fileName} file"
161
185
  }
@@ -177,6 +201,9 @@ var pt_BR_default = {
177
201
  pathRequired: "Solution directory path is required",
178
202
  fileNotFound: "Solution file not found: {path}",
179
203
  invalidSolution: "Invalid solution file: {path}",
204
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
205
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
206
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
180
207
  noSolutionFile: "No .uipx solution file found in directory: {path}",
181
208
  invalidStorageFile: "Invalid {fileName} file"
182
209
  }
@@ -198,6 +225,9 @@ var ro_default = {
198
225
  pathRequired: "Solution directory path is required",
199
226
  fileNotFound: "Solution file not found: {path}",
200
227
  invalidSolution: "Invalid solution file: {path}",
228
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
229
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
230
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
201
231
  noSolutionFile: "No .uipx solution file found in directory: {path}",
202
232
  invalidStorageFile: "Invalid {fileName} file"
203
233
  }
@@ -219,6 +249,9 @@ var ru_default = {
219
249
  pathRequired: "Solution directory path is required",
220
250
  fileNotFound: "Solution file not found: {path}",
221
251
  invalidSolution: "Invalid solution file: {path}",
252
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
253
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
254
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
222
255
  noSolutionFile: "No .uipx solution file found in directory: {path}",
223
256
  invalidStorageFile: "Invalid {fileName} file"
224
257
  }
@@ -240,6 +273,9 @@ var tr_default = {
240
273
  pathRequired: "Solution directory path is required",
241
274
  fileNotFound: "Solution file not found: {path}",
242
275
  invalidSolution: "Invalid solution file: {path}",
276
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
277
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
278
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
243
279
  noSolutionFile: "No .uipx solution file found in directory: {path}",
244
280
  invalidStorageFile: "Invalid {fileName} file"
245
281
  }
@@ -261,6 +297,9 @@ var zh_CN_default = {
261
297
  pathRequired: "Solution directory path is required",
262
298
  fileNotFound: "Solution file not found: {path}",
263
299
  invalidSolution: "Invalid solution file: {path}",
300
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
301
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
302
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
264
303
  noSolutionFile: "No .uipx solution file found in directory: {path}",
265
304
  invalidStorageFile: "Invalid {fileName} file"
266
305
  }
@@ -282,6 +321,9 @@ var zh_TW_default = {
282
321
  pathRequired: "Solution directory path is required",
283
322
  fileNotFound: "Solution file not found: {path}",
284
323
  invalidSolution: "Invalid solution file: {path}",
324
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
325
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
326
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
285
327
  noSolutionFile: "No .uipx solution file found in directory: {path}",
286
328
  invalidStorageFile: "Invalid {fileName} file"
287
329
  }
@@ -303,6 +345,9 @@ var zu_default = {
303
345
  pathRequired: "Solution directory path is required",
304
346
  fileNotFound: "Solution file not found: {path}",
305
347
  invalidSolution: "Invalid solution file: {path}",
348
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
349
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
350
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
306
351
  noSolutionFile: "No .uipx solution file found in directory: {path}",
307
352
  invalidStorageFile: "Invalid {fileName} file"
308
353
  }
@@ -342,17 +387,8 @@ import {
342
387
  } from "@uipath/solutionpackager-tool-core";
343
388
 
344
389
  // src/browser-solution-packager-factory.ts
345
- import {
346
- BrowserContextStorage,
347
- ConsoleTelemetryProvider,
348
- TelemetryService
349
- } from "@uipath/common/telemetry";
350
- import { BrowserFileSystem } from "@uipath/filesystem/browser";
351
- import {
352
- setGlobalLogHandler,
353
- ToolLogger as ToolLogger2
354
- } from "@uipath/project-packager";
355
- import { translate as translate4 } from "@uipath/solutionpackager-tool-core";
390
+ import { ToolLogger as ToolLogger2 } from "@uipath/project-packager";
391
+ import { BaseBrowserPackagerFactory } from "@uipath/project-packager/browser";
356
392
 
357
393
  // src/services/solution-packager.ts
358
394
  import {
@@ -631,7 +667,7 @@ import { Path as Path3, translate as translate2 } from "@uipath/solutionpackager
631
667
 
632
668
  class SolutionLoader {
633
669
  fileSystem;
634
- static SolutionStorageFileName = ".storage";
670
+ static SolutionStorageFileName = "SolutionStorage.json";
635
671
  constructor(fileSystem) {
636
672
  this.fileSystem = fileSystem;
637
673
  }
@@ -647,12 +683,8 @@ class SolutionLoader {
647
683
  }));
648
684
  }
649
685
  const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
650
- const solution = JSON.parse(json);
651
- if (!solution?.Projects) {
652
- throw new Error(translate2.t("solutionpackager.solutionLoader.errors.invalidSolution", {
653
- path: solutionFilePath
654
- }));
655
- }
686
+ const parsed = JSON.parse(json);
687
+ const solution = validateSolutionFile(parsed, solutionFilePath);
656
688
  const loadedSolution = {
657
689
  ...solution,
658
690
  Name: GetSolutionName(),
@@ -704,6 +736,38 @@ class SolutionLoader {
704
736
  }
705
737
  }
706
738
  }
739
+ function validateSolutionFile(parsed, solutionFilePath) {
740
+ if (!isRecord(parsed)) {
741
+ throw new Error(translate2.t("solutionpackager.solutionLoader.errors.invalidSolution", {
742
+ path: solutionFilePath
743
+ }));
744
+ }
745
+ if (!Array.isArray(parsed.Projects)) {
746
+ throw new Error(translate2.t("solutionpackager.solutionLoader.errors.invalidSolution", {
747
+ path: solutionFilePath
748
+ }));
749
+ }
750
+ for (const [index, project] of parsed.Projects.entries()) {
751
+ if (!isRecord(project)) {
752
+ throw new Error(translate2.t("solutionpackager.solutionLoader.errors.projectMustBeObject", {
753
+ path: solutionFilePath,
754
+ index
755
+ }));
756
+ }
757
+ if (typeof project.ProjectRelativePath !== "string" || !project.ProjectRelativePath.trim()) {
758
+ const pathHint = typeof project.Path === "string" ? translate2.t("solutionpackager.solutionLoader.errors.projectRelativePathPathHint") : "";
759
+ throw new Error(translate2.t("solutionpackager.solutionLoader.errors.projectMissingProjectRelativePath", {
760
+ path: solutionFilePath,
761
+ index,
762
+ pathHint
763
+ }));
764
+ }
765
+ }
766
+ return parsed;
767
+ }
768
+ function isRecord(value) {
769
+ return typeof value === "object" && value !== null && !Array.isArray(value);
770
+ }
707
771
 
708
772
  // src/services/solution-pack-options-validator.ts
709
773
  import {
@@ -798,6 +862,7 @@ class SolutionPackService {
798
862
  return await this.telemetry.trackDependencyOperation("SolutionPackager.Solution.Compress" /* SolutionCompress */, "compress", async () => {
799
863
  const packageName = parameters.package.id || "solution";
800
864
  const version = parameters.package.version || "1.0.0";
865
+ await this.writePackageMetadataAsync(parameters, outputPath);
801
866
  const archiveFileName = `${packageName}_${version}.zip`;
802
867
  const archivePath = `${parameters.destinationPath}/${archiveFileName}`;
803
868
  const zipData = await this.zipService.compressAsync(outputPath);
@@ -805,6 +870,29 @@ class SolutionPackService {
805
870
  return archivePath;
806
871
  });
807
872
  }
873
+ async writePackageMetadataAsync(parameters, outputPath) {
874
+ const pkg = parameters.package;
875
+ const metadata = {
876
+ name: pkg.id || "solution",
877
+ version: pkg.version || "1.0.0"
878
+ };
879
+ const optional = {
880
+ releaseNotes: pkg.releaseNotes,
881
+ projectUrl: pkg.projectUrl,
882
+ repositoryType: pkg.repositoryType,
883
+ repositoryUrl: pkg.repositoryUrl,
884
+ repositoryBranch: pkg.repositoryBranch,
885
+ repositoryCommit: pkg.repositoryCommit
886
+ };
887
+ for (const [key, value] of Object.entries(optional)) {
888
+ if (value !== undefined && value !== "") {
889
+ metadata[key] = value;
890
+ }
891
+ }
892
+ const metadataPath = `${outputPath}/package.metadata.json`;
893
+ await this.fileSystem.writeFile(metadataPath, `${JSON.stringify(metadata, null, 2)}
894
+ `);
895
+ }
808
896
  }
809
897
 
810
898
  // src/services/solution-validate-options-validator.ts
@@ -884,19 +972,6 @@ class SolutionPackager {
884
972
  this.solutionPackService = new SolutionPackService(this.optionsBuilder, this.toolsFactory, this.projectExecutor, this.zipService, this.fileSystem, this.telemetryService);
885
973
  this.solutionValidateService = new SolutionValidateService(this.optionsBuilder, this.projectExecutor, this.telemetryService);
886
974
  }
887
- async canPackSolutionAsync(solutionPath) {
888
- const solution = await this.solutionLoader.loadSolution(solutionPath);
889
- for (const project of solution.Projects) {
890
- if (!project.ProjectPath) {
891
- return false;
892
- }
893
- const canHandle = this.repository.canHandleProject(project.Type);
894
- if (!canHandle) {
895
- return false;
896
- }
897
- }
898
- return true;
899
- }
900
975
  async setupAsync(input, operationId) {
901
976
  this.telemetryService.setOperationId(operationId);
902
977
  await this.temporaryStorage.cleanup();
@@ -1032,10 +1107,7 @@ class SolutionPackager {
1032
1107
  }
1033
1108
 
1034
1109
  // src/browser-solution-packager-factory.ts
1035
- var sharedFileSystem = null;
1036
- var GLOBAL_FS_KEY = "__uipath_sharedFileSystem";
1037
-
1038
- class BrowserSolutionPackagerFactory {
1110
+ class BrowserSolutionPackagerFactory extends BaseBrowserPackagerFactory {
1039
1111
  async createAsync(config) {
1040
1112
  const logger = new ToolLogger2("SolutionPackagerFactory", "Create");
1041
1113
  this.configureLanguage(config);
@@ -1047,46 +1119,6 @@ class BrowserSolutionPackagerFactory {
1047
1119
  logger.info("SolutionPackager created successfully.");
1048
1120
  return solutionPackager;
1049
1121
  }
1050
- async getOrCreateFileSystem(config) {
1051
- if (config?.fileSystem) {
1052
- return config.fileSystem;
1053
- }
1054
- if (!sharedFileSystem) {
1055
- sharedFileSystem = globalThis[GLOBAL_FS_KEY] ?? null;
1056
- }
1057
- if (!sharedFileSystem) {
1058
- const fs = new BrowserFileSystem;
1059
- try {
1060
- await fs.init();
1061
- } catch (error) {
1062
- if (error instanceof Error && error.message.includes("Mount point is already in use")) {
1063
- fs.initialized = true;
1064
- } else {
1065
- throw error;
1066
- }
1067
- }
1068
- sharedFileSystem = fs;
1069
- globalThis[GLOBAL_FS_KEY] = fs;
1070
- }
1071
- return sharedFileSystem;
1072
- }
1073
- getOrCreateTelemetryService(config) {
1074
- if (config?.telemetryService) {
1075
- return config.telemetryService;
1076
- }
1077
- const provider = new ConsoleTelemetryProvider;
1078
- const contextStorage = new BrowserContextStorage;
1079
- return new TelemetryService(provider, contextStorage);
1080
- }
1081
- configureLogHandler(config) {
1082
- if (config?.logHandler) {
1083
- setGlobalLogHandler(config.logHandler);
1084
- }
1085
- }
1086
- configureLanguage(config) {
1087
- const language = config?.language ?? "en";
1088
- translate4.setLocale(language);
1089
- }
1090
1122
  }
1091
1123
  async function createBrowserSolutionPackager(options) {
1092
1124
  const factory = new BrowserSolutionPackagerFactory;
package/dist/node.js CHANGED
@@ -8,6 +8,9 @@ var de_default = {
8
8
  pathRequired: "Solution directory path is required",
9
9
  fileNotFound: "Solution file not found: {path}",
10
10
  invalidSolution: "Invalid solution file: {path}",
11
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
12
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
13
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
11
14
  noSolutionFile: "No .uipx solution file found in directory: {path}",
12
15
  invalidStorageFile: "Invalid {fileName} file"
13
16
  }
@@ -30,6 +33,9 @@ var en = {
30
33
  pathRequired: "Solution directory path is required",
31
34
  fileNotFound: "Solution file not found: {path}",
32
35
  invalidSolution: "Invalid solution file: {path}",
36
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
37
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
38
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
33
39
  noSolutionFile: "No .uipx solution file found in directory: {path}",
34
40
  invalidStorageFile: "Invalid {fileName} file"
35
41
  }
@@ -51,6 +57,9 @@ var es_default = {
51
57
  pathRequired: "Solution directory path is required",
52
58
  fileNotFound: "Solution file not found: {path}",
53
59
  invalidSolution: "Invalid solution file: {path}",
60
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
61
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
62
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
54
63
  noSolutionFile: "No .uipx solution file found in directory: {path}",
55
64
  invalidStorageFile: "Invalid {fileName} file"
56
65
  }
@@ -72,6 +81,9 @@ var es_MX_default = {
72
81
  pathRequired: "Solution directory path is required",
73
82
  fileNotFound: "Solution file not found: {path}",
74
83
  invalidSolution: "Invalid solution file: {path}",
84
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
85
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
86
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
75
87
  noSolutionFile: "No .uipx solution file found in directory: {path}",
76
88
  invalidStorageFile: "Invalid {fileName} file"
77
89
  }
@@ -93,6 +105,9 @@ var fr_default = {
93
105
  pathRequired: "Solution directory path is required",
94
106
  fileNotFound: "Solution file not found: {path}",
95
107
  invalidSolution: "Invalid solution file: {path}",
108
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
109
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
110
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
96
111
  noSolutionFile: "No .uipx solution file found in directory: {path}",
97
112
  invalidStorageFile: "Invalid {fileName} file"
98
113
  }
@@ -114,6 +129,9 @@ var ja_default = {
114
129
  pathRequired: "Solution directory path is required",
115
130
  fileNotFound: "Solution file not found: {path}",
116
131
  invalidSolution: "Invalid solution file: {path}",
132
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
133
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
134
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
117
135
  noSolutionFile: "No .uipx solution file found in directory: {path}",
118
136
  invalidStorageFile: "Invalid {fileName} file"
119
137
  }
@@ -135,6 +153,9 @@ var ko_default = {
135
153
  pathRequired: "Solution directory path is required",
136
154
  fileNotFound: "Solution file not found: {path}",
137
155
  invalidSolution: "Invalid solution file: {path}",
156
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
157
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
158
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
138
159
  noSolutionFile: "No .uipx solution file found in directory: {path}",
139
160
  invalidStorageFile: "Invalid {fileName} file"
140
161
  }
@@ -156,6 +177,9 @@ var pt_default = {
156
177
  pathRequired: "Solution directory path is required",
157
178
  fileNotFound: "Solution file not found: {path}",
158
179
  invalidSolution: "Invalid solution file: {path}",
180
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
181
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
182
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
159
183
  noSolutionFile: "No .uipx solution file found in directory: {path}",
160
184
  invalidStorageFile: "Invalid {fileName} file"
161
185
  }
@@ -177,6 +201,9 @@ var pt_BR_default = {
177
201
  pathRequired: "Solution directory path is required",
178
202
  fileNotFound: "Solution file not found: {path}",
179
203
  invalidSolution: "Invalid solution file: {path}",
204
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
205
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
206
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
180
207
  noSolutionFile: "No .uipx solution file found in directory: {path}",
181
208
  invalidStorageFile: "Invalid {fileName} file"
182
209
  }
@@ -198,6 +225,9 @@ var ro_default = {
198
225
  pathRequired: "Solution directory path is required",
199
226
  fileNotFound: "Solution file not found: {path}",
200
227
  invalidSolution: "Invalid solution file: {path}",
228
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
229
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
230
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
201
231
  noSolutionFile: "No .uipx solution file found in directory: {path}",
202
232
  invalidStorageFile: "Invalid {fileName} file"
203
233
  }
@@ -219,6 +249,9 @@ var ru_default = {
219
249
  pathRequired: "Solution directory path is required",
220
250
  fileNotFound: "Solution file not found: {path}",
221
251
  invalidSolution: "Invalid solution file: {path}",
252
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
253
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
254
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
222
255
  noSolutionFile: "No .uipx solution file found in directory: {path}",
223
256
  invalidStorageFile: "Invalid {fileName} file"
224
257
  }
@@ -240,6 +273,9 @@ var tr_default = {
240
273
  pathRequired: "Solution directory path is required",
241
274
  fileNotFound: "Solution file not found: {path}",
242
275
  invalidSolution: "Invalid solution file: {path}",
276
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
277
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
278
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
243
279
  noSolutionFile: "No .uipx solution file found in directory: {path}",
244
280
  invalidStorageFile: "Invalid {fileName} file"
245
281
  }
@@ -261,6 +297,9 @@ var zh_CN_default = {
261
297
  pathRequired: "Solution directory path is required",
262
298
  fileNotFound: "Solution file not found: {path}",
263
299
  invalidSolution: "Invalid solution file: {path}",
300
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
301
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
302
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
264
303
  noSolutionFile: "No .uipx solution file found in directory: {path}",
265
304
  invalidStorageFile: "Invalid {fileName} file"
266
305
  }
@@ -282,6 +321,9 @@ var zh_TW_default = {
282
321
  pathRequired: "Solution directory path is required",
283
322
  fileNotFound: "Solution file not found: {path}",
284
323
  invalidSolution: "Invalid solution file: {path}",
324
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
325
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
326
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
285
327
  noSolutionFile: "No .uipx solution file found in directory: {path}",
286
328
  invalidStorageFile: "Invalid {fileName} file"
287
329
  }
@@ -303,6 +345,9 @@ var zu_default = {
303
345
  pathRequired: "Solution directory path is required",
304
346
  fileNotFound: "Solution file not found: {path}",
305
347
  invalidSolution: "Invalid solution file: {path}",
348
+ projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.",
349
+ projectMissingProjectRelativePath: `Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`,
350
+ projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.",
306
351
  noSolutionFile: "No .uipx solution file found in directory: {path}",
307
352
  invalidStorageFile: "Invalid {fileName} file"
308
353
  }
@@ -360,6 +405,7 @@ class SolutionPackOptions extends PackagerParameters {
360
405
  // src/node-solution-packager-factory.ts
361
406
  import {
362
407
  BaseNodePackagerFactory,
408
+ DotnetDiscoveryService,
363
409
  NodePackageSignService,
364
410
  ToolLogger as ToolLogger2
365
411
  } from "@uipath/project-packager/node";
@@ -641,7 +687,7 @@ import { Path as Path3, translate as translate2 } from "@uipath/solutionpackager
641
687
 
642
688
  class SolutionLoader {
643
689
  fileSystem;
644
- static SolutionStorageFileName = ".storage";
690
+ static SolutionStorageFileName = "SolutionStorage.json";
645
691
  constructor(fileSystem) {
646
692
  this.fileSystem = fileSystem;
647
693
  }
@@ -657,12 +703,8 @@ class SolutionLoader {
657
703
  }));
658
704
  }
659
705
  const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
660
- const solution = JSON.parse(json);
661
- if (!solution?.Projects) {
662
- throw new Error(translate2.t("solutionpackager.solutionLoader.errors.invalidSolution", {
663
- path: solutionFilePath
664
- }));
665
- }
706
+ const parsed = JSON.parse(json);
707
+ const solution = validateSolutionFile(parsed, solutionFilePath);
666
708
  const loadedSolution = {
667
709
  ...solution,
668
710
  Name: GetSolutionName(),
@@ -714,6 +756,38 @@ class SolutionLoader {
714
756
  }
715
757
  }
716
758
  }
759
+ function validateSolutionFile(parsed, solutionFilePath) {
760
+ if (!isRecord(parsed)) {
761
+ throw new Error(translate2.t("solutionpackager.solutionLoader.errors.invalidSolution", {
762
+ path: solutionFilePath
763
+ }));
764
+ }
765
+ if (!Array.isArray(parsed.Projects)) {
766
+ throw new Error(translate2.t("solutionpackager.solutionLoader.errors.invalidSolution", {
767
+ path: solutionFilePath
768
+ }));
769
+ }
770
+ for (const [index, project] of parsed.Projects.entries()) {
771
+ if (!isRecord(project)) {
772
+ throw new Error(translate2.t("solutionpackager.solutionLoader.errors.projectMustBeObject", {
773
+ path: solutionFilePath,
774
+ index
775
+ }));
776
+ }
777
+ if (typeof project.ProjectRelativePath !== "string" || !project.ProjectRelativePath.trim()) {
778
+ const pathHint = typeof project.Path === "string" ? translate2.t("solutionpackager.solutionLoader.errors.projectRelativePathPathHint") : "";
779
+ throw new Error(translate2.t("solutionpackager.solutionLoader.errors.projectMissingProjectRelativePath", {
780
+ path: solutionFilePath,
781
+ index,
782
+ pathHint
783
+ }));
784
+ }
785
+ }
786
+ return parsed;
787
+ }
788
+ function isRecord(value) {
789
+ return typeof value === "object" && value !== null && !Array.isArray(value);
790
+ }
717
791
 
718
792
  // src/services/solution-pack-options-validator.ts
719
793
  import {
@@ -808,6 +882,7 @@ class SolutionPackService {
808
882
  return await this.telemetry.trackDependencyOperation("SolutionPackager.Solution.Compress" /* SolutionCompress */, "compress", async () => {
809
883
  const packageName = parameters.package.id || "solution";
810
884
  const version = parameters.package.version || "1.0.0";
885
+ await this.writePackageMetadataAsync(parameters, outputPath);
811
886
  const archiveFileName = `${packageName}_${version}.zip`;
812
887
  const archivePath = `${parameters.destinationPath}/${archiveFileName}`;
813
888
  const zipData = await this.zipService.compressAsync(outputPath);
@@ -815,6 +890,29 @@ class SolutionPackService {
815
890
  return archivePath;
816
891
  });
817
892
  }
893
+ async writePackageMetadataAsync(parameters, outputPath) {
894
+ const pkg = parameters.package;
895
+ const metadata = {
896
+ name: pkg.id || "solution",
897
+ version: pkg.version || "1.0.0"
898
+ };
899
+ const optional = {
900
+ releaseNotes: pkg.releaseNotes,
901
+ projectUrl: pkg.projectUrl,
902
+ repositoryType: pkg.repositoryType,
903
+ repositoryUrl: pkg.repositoryUrl,
904
+ repositoryBranch: pkg.repositoryBranch,
905
+ repositoryCommit: pkg.repositoryCommit
906
+ };
907
+ for (const [key, value] of Object.entries(optional)) {
908
+ if (value !== undefined && value !== "") {
909
+ metadata[key] = value;
910
+ }
911
+ }
912
+ const metadataPath = `${outputPath}/package.metadata.json`;
913
+ await this.fileSystem.writeFile(metadataPath, `${JSON.stringify(metadata, null, 2)}
914
+ `);
915
+ }
818
916
  }
819
917
 
820
918
  // src/services/solution-validate-options-validator.ts
@@ -894,19 +992,6 @@ class SolutionPackager {
894
992
  this.solutionPackService = new SolutionPackService(this.optionsBuilder, this.toolsFactory, this.projectExecutor, this.zipService, this.fileSystem, this.telemetryService);
895
993
  this.solutionValidateService = new SolutionValidateService(this.optionsBuilder, this.projectExecutor, this.telemetryService);
896
994
  }
897
- async canPackSolutionAsync(solutionPath) {
898
- const solution = await this.solutionLoader.loadSolution(solutionPath);
899
- for (const project of solution.Projects) {
900
- if (!project.ProjectPath) {
901
- return false;
902
- }
903
- const canHandle = this.repository.canHandleProject(project.Type);
904
- if (!canHandle) {
905
- return false;
906
- }
907
- }
908
- return true;
909
- }
910
995
  async setupAsync(input, operationId) {
911
996
  this.telemetryService.setOperationId(operationId);
912
997
  await this.temporaryStorage.cleanup();
@@ -1050,7 +1135,8 @@ class NodeSolutionPackagerFactory extends BaseNodePackagerFactory {
1050
1135
  logger.info("Creating SolutionPackager instance...");
1051
1136
  const fileSystem = this.getOrCreateFileSystem(config);
1052
1137
  const telemetryService = this.getOrCreateTelemetryService(config);
1053
- const packageSignService = new NodePackageSignService(logger);
1138
+ this.dotnetDiscovery = new DotnetDiscoveryService;
1139
+ const packageSignService = new NodePackageSignService(this.dotnetDiscovery, logger);
1054
1140
  const solutionPackager = new SolutionPackager(fileSystem, telemetryService, packageSignService);
1055
1141
  this.checkDotnetAvailability(logger);
1056
1142
  logger.info("SolutionPackager created successfully.");
@@ -4,7 +4,6 @@ import { type ISolutionPackager } from "./services/solution-packager.js";
4
4
  * Creates a SolutionPackager instance configured for browser usage.
5
5
  *
6
6
  * This is a convenience function that creates a BrowserSolutionPackagerFactory and calls createAsync.
7
- * For more control, use the BrowserSolutionPackagerFactory class directly.
8
7
  *
9
8
  * @param options - Configuration options for the SolutionPackager
10
9
  * @returns Promise<ISolutionPackager> - A fully configured SolutionPackager instance ready for use in the browser.
@@ -9,6 +9,9 @@ export declare const en: {
9
9
  readonly pathRequired: "Solution directory path is required";
10
10
  readonly fileNotFound: "Solution file not found: {path}";
11
11
  readonly invalidSolution: "Invalid solution file: {path}";
12
+ readonly projectMustBeObject: "Invalid solution file: {path}. Projects[{index}] must be an object.";
13
+ readonly projectMissingProjectRelativePath: "Invalid solution file: {path}. Projects[{index}] is missing ProjectRelativePath.{pathHint} Use 'uip solution project add' to add projects, or set ProjectRelativePath to the project file path, for example \"Foo/project.uiproj\".";
14
+ readonly projectRelativePathPathHint: " Found Path, but .uipx uses ProjectRelativePath.";
12
15
  readonly noSolutionFile: "No .uipx solution file found in directory: {path}";
13
16
  readonly invalidStorageFile: "Invalid {fileName} file";
14
17
  };
@@ -4,7 +4,6 @@ import { type ISolutionPackager } from "./services/solution-packager.js";
4
4
  * Creates a SolutionPackager instance configured for Node.js usage.
5
5
  *
6
6
  * This is a convenience function that creates a NodeSolutionPackagerFactory and calls createAsync.
7
- * For more control, use the NodeSolutionPackagerFactory class directly.
8
7
  *
9
8
  * @param options - Configuration options for the SolutionPackager
10
9
  * @returns Promise<ISolutionPackager> - A fully configured SolutionPackager instance ready for use in Node.js.
@@ -11,7 +11,7 @@ export interface ISolutionLoader {
11
11
  }
12
12
  export declare class SolutionLoader implements ISolutionLoader {
13
13
  private readonly fileSystem;
14
- static readonly SolutionStorageFileName = ".storage";
14
+ static readonly SolutionStorageFileName = "SolutionStorage.json";
15
15
  constructor(fileSystem: IFileSystem);
16
16
  loadSolution(solutionPath: string): Promise<LoadedUiPathSolution>;
17
17
  private getSolutionFilePathAsync;
@@ -57,4 +57,11 @@ export declare class SolutionPackService implements ISolutionPackService {
57
57
  * @returns Path to the created archive file
58
58
  */
59
59
  private compressSolutionAsync;
60
+ /**
61
+ * Write a `package.metadata.json` file into the solution output folder
62
+ * (it lands at the root of the produced .zip). Only fields the caller
63
+ * actually supplied are emitted, so a metadata-free pack still gets a
64
+ * minimal file carrying the package name and version.
65
+ */
66
+ private writePackageMetadataAsync;
60
67
  }
@@ -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)
@@ -71,12 +65,6 @@ export declare class SolutionPackager implements ISolutionPackager {
71
65
  private readonly validateOptionsValidator;
72
66
  private readonly governancePolicyService;
73
67
  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
68
  /**
81
69
  * Setup the temporary storage.
82
70
  * @param input The solution folder as a zip Uint8Array (extracts to temp folder) or a path string (uses as-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;
@@ -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
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/solution-packager",
3
- "version": "0.0.34",
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,51 +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/common/*' --external @uipath/common && 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/common/*' --external @uipath/common --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.1.15",
50
- "@uipath/common": "0.9.0",
51
- "@uipath/filesystem": "0.9.0",
52
- "@uipath/solutionpackager-tool-core": "0.0.33"
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.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",
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": "^5.9.3",
56
+ "typescript": "^6.0.2",
73
57
  "vite-tsconfig-paths": "^6.1.1",
74
- "vitest": "^4.0.14"
58
+ "vitest": "^4.1.6"
75
59
  },
76
- "gitHead": "3f1b4d8e9f910be81e4cab956537f21dbd5d63ac"
60
+ "gitHead": "bed2b46f1ec33a47a7dcae2e6d4b7ab99bd06981"
77
61
  }
File without changes