@uipath/solution-packager 1.204.0-preview.255 → 1.205.0-preview.256
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 +29 -7
- package/dist/node.js +29 -7
- package/dist/package-id.js +170 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/models/solution-pack-options.d.ts +1 -6
- package/dist/src/node.d.ts +3 -0
- package/dist/src/package-id.d.ts +1 -0
- package/dist/src/services/package-id-reader.d.ts +9 -1
- package/dist/src/services/tool-result-helpers.d.ts +9 -0
- package/package.json +8 -4
package/dist/index.js
CHANGED
|
@@ -394,7 +394,7 @@ import { BaseBrowserPackagerFactory } from "@uipath/project-packager/browser";
|
|
|
394
394
|
import { carriedInstructions } from "@uipath/common/error-handler";
|
|
395
395
|
import {
|
|
396
396
|
GovernancePolicyService,
|
|
397
|
-
PackService,
|
|
397
|
+
PackService as PackService2,
|
|
398
398
|
ProjectToolExecutor,
|
|
399
399
|
ToolLogger,
|
|
400
400
|
ToolsFactory
|
|
@@ -558,6 +558,9 @@ class OptionsBuilder {
|
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
// src/services/package-id-reader.ts
|
|
561
|
+
import {
|
|
562
|
+
PackService
|
|
563
|
+
} from "@uipath/project-packager";
|
|
561
564
|
import { Path as Path2 } from "@uipath/solutionpackager-tool-core";
|
|
562
565
|
var legacySolutionResourcesFileName = "resources.json";
|
|
563
566
|
|
|
@@ -714,6 +717,11 @@ class PackageIdReader {
|
|
|
714
717
|
return matchingKey ? obj[matchingKey] : null;
|
|
715
718
|
}
|
|
716
719
|
}
|
|
720
|
+
async function readMemberPackageIdAsync(fileSystem, project, solutionPath, solutionName) {
|
|
721
|
+
const packService = new PackService;
|
|
722
|
+
const packageId = await new PackageIdReader(fileSystem, packService).read(project, solutionPath, solutionName);
|
|
723
|
+
return packageId ? packService.sanitizePackageId(packageId) : packageId;
|
|
724
|
+
}
|
|
717
725
|
|
|
718
726
|
// src/services/solution-cleanup-service.ts
|
|
719
727
|
import { PackagerDimensions } from "@uipath/common/telemetry";
|
|
@@ -956,6 +964,16 @@ function hasFailedResults(results) {
|
|
|
956
964
|
function getFailedResultsMessage(results) {
|
|
957
965
|
return results.filter((result) => !result.isSuccess).map((r) => r.message || "Unknown error").join(", ");
|
|
958
966
|
}
|
|
967
|
+
function getFailedResultsInstructions(results) {
|
|
968
|
+
const instructions = new Set;
|
|
969
|
+
for (const result of results) {
|
|
970
|
+
const next = result.isSuccess ? undefined : result.instructions?.trim();
|
|
971
|
+
if (next) {
|
|
972
|
+
instructions.add(next);
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
return instructions.size > 0 ? [...instructions].join(" ") : undefined;
|
|
976
|
+
}
|
|
959
977
|
function toProjectDiagnostics(projects, results) {
|
|
960
978
|
return projects.map((project, index) => {
|
|
961
979
|
const result = results[index];
|
|
@@ -1036,7 +1054,7 @@ class SolutionPackService {
|
|
|
1036
1054
|
...projectResults
|
|
1037
1055
|
];
|
|
1038
1056
|
if (hasFailedResults(restoreAndPackResults)) {
|
|
1039
|
-
const failure = ToolResult2.error(ToolErrorCodes2.InternalError, `Solution pack failed: ${getFailedResultsMessage(restoreAndPackResults)}
|
|
1057
|
+
const failure = ToolResult2.error(ToolErrorCodes2.InternalError, `Solution pack failed: ${getFailedResultsMessage(restoreAndPackResults)}`, getFailedResultsInstructions(restoreAndPackResults));
|
|
1040
1058
|
failure.details = {
|
|
1041
1059
|
projects: toProjectDiagnostics(solution.Projects, projectResults)
|
|
1042
1060
|
};
|
|
@@ -1196,7 +1214,7 @@ class SolutionRestoreService {
|
|
|
1196
1214
|
})
|
|
1197
1215
|
]);
|
|
1198
1216
|
if (hasFailedResults(restoreResults)) {
|
|
1199
|
-
return ToolResult3.error(ToolErrorCodes3.InternalError, `Solution restore failed: ${getFailedResultsMessage(restoreResults)}
|
|
1217
|
+
return ToolResult3.error(ToolErrorCodes3.InternalError, `Solution restore failed: ${getFailedResultsMessage(restoreResults)}`, getFailedResultsInstructions(restoreResults));
|
|
1200
1218
|
}
|
|
1201
1219
|
return ToolResult3.success();
|
|
1202
1220
|
}, { [PackagerDimensions3.SolutionId]: solution.SolutionId });
|
|
@@ -1279,7 +1297,7 @@ class SolutionPackager {
|
|
|
1279
1297
|
this.logger = new ToolLogger("SolutionPackager", "PackSolution");
|
|
1280
1298
|
this.packOptionsValidator = new SolutionPackOptionsValidator(this.logger, this.fileSystem);
|
|
1281
1299
|
this.validateOptionsValidator = new SolutionValidateOptionsValidator(this.logger, this.fileSystem);
|
|
1282
|
-
const packService = new
|
|
1300
|
+
const packService = new PackService2;
|
|
1283
1301
|
const packageIdReader = new PackageIdReader(this.fileSystem, packService);
|
|
1284
1302
|
this.optionsBuilder = new OptionsBuilder(packageIdReader, packService, this.fileSystem);
|
|
1285
1303
|
this.toolsFactory = new ToolsFactory(this.repository, this.fileSystem);
|
|
@@ -1444,6 +1462,7 @@ class SolutionPackager {
|
|
|
1444
1462
|
return {
|
|
1445
1463
|
id: crypto.randomUUID(),
|
|
1446
1464
|
projects: solution.Projects,
|
|
1465
|
+
solutionRoot: this.fileSystem.path.dirname(solution.filePath),
|
|
1447
1466
|
downloadUrl: options.downloadUrl,
|
|
1448
1467
|
solutionId: solution.SolutionId,
|
|
1449
1468
|
configuration: options.configuration,
|
|
@@ -1451,6 +1470,8 @@ class SolutionPackager {
|
|
|
1451
1470
|
connection: options.connection,
|
|
1452
1471
|
logger: this.logger,
|
|
1453
1472
|
workflowCompilerVersion: options.workflowCompilerVersion,
|
|
1473
|
+
functionsPackagerVersion: options.functionsPackagerVersion,
|
|
1474
|
+
codedAppsPackagerVersion: options.codedAppsPackagerVersion,
|
|
1454
1475
|
lockKey: options.lockKey,
|
|
1455
1476
|
jobTarget: options.jobTarget,
|
|
1456
1477
|
localSourcePath: options.localSourcePath
|
|
@@ -1522,7 +1543,6 @@ class SolutionPackOptions extends PackagerParameters {
|
|
|
1522
1543
|
skipImports: false
|
|
1523
1544
|
};
|
|
1524
1545
|
lockKey;
|
|
1525
|
-
jobTarget;
|
|
1526
1546
|
localSourcePath;
|
|
1527
1547
|
}
|
|
1528
1548
|
export {
|
|
@@ -1532,7 +1552,9 @@ export {
|
|
|
1532
1552
|
RulesConfigFileType2 as RulesConfigFileType,
|
|
1533
1553
|
SolutionPackOptions,
|
|
1534
1554
|
SolutionPackager,
|
|
1535
|
-
createBrowserSolutionPackager
|
|
1555
|
+
createBrowserSolutionPackager,
|
|
1556
|
+
readMemberPackageIdAsync,
|
|
1557
|
+
toProjectDiagnostics
|
|
1536
1558
|
};
|
|
1537
1559
|
|
|
1538
|
-
//# debugId=
|
|
1560
|
+
//# debugId=3230F107E64723A464756E2164756E21
|
package/dist/node.js
CHANGED
|
@@ -410,7 +410,6 @@ class SolutionPackOptions extends PackagerParameters {
|
|
|
410
410
|
skipImports: false
|
|
411
411
|
};
|
|
412
412
|
lockKey;
|
|
413
|
-
jobTarget;
|
|
414
413
|
localSourcePath;
|
|
415
414
|
}
|
|
416
415
|
// src/node-solution-packager-factory.ts
|
|
@@ -425,7 +424,7 @@ import {
|
|
|
425
424
|
import { carriedInstructions } from "@uipath/common/error-handler";
|
|
426
425
|
import {
|
|
427
426
|
GovernancePolicyService,
|
|
428
|
-
PackService,
|
|
427
|
+
PackService as PackService2,
|
|
429
428
|
ProjectToolExecutor,
|
|
430
429
|
ToolLogger,
|
|
431
430
|
ToolsFactory
|
|
@@ -589,6 +588,9 @@ class OptionsBuilder {
|
|
|
589
588
|
}
|
|
590
589
|
|
|
591
590
|
// src/services/package-id-reader.ts
|
|
591
|
+
import {
|
|
592
|
+
PackService
|
|
593
|
+
} from "@uipath/project-packager";
|
|
592
594
|
import { Path as Path2 } from "@uipath/solutionpackager-tool-core";
|
|
593
595
|
var legacySolutionResourcesFileName = "resources.json";
|
|
594
596
|
|
|
@@ -745,6 +747,11 @@ class PackageIdReader {
|
|
|
745
747
|
return matchingKey ? obj[matchingKey] : null;
|
|
746
748
|
}
|
|
747
749
|
}
|
|
750
|
+
async function readMemberPackageIdAsync(fileSystem, project, solutionPath, solutionName) {
|
|
751
|
+
const packService = new PackService;
|
|
752
|
+
const packageId = await new PackageIdReader(fileSystem, packService).read(project, solutionPath, solutionName);
|
|
753
|
+
return packageId ? packService.sanitizePackageId(packageId) : packageId;
|
|
754
|
+
}
|
|
748
755
|
|
|
749
756
|
// src/services/solution-cleanup-service.ts
|
|
750
757
|
import { PackagerDimensions } from "@uipath/common/telemetry";
|
|
@@ -987,6 +994,16 @@ function hasFailedResults(results) {
|
|
|
987
994
|
function getFailedResultsMessage(results) {
|
|
988
995
|
return results.filter((result) => !result.isSuccess).map((r) => r.message || "Unknown error").join(", ");
|
|
989
996
|
}
|
|
997
|
+
function getFailedResultsInstructions(results) {
|
|
998
|
+
const instructions = new Set;
|
|
999
|
+
for (const result of results) {
|
|
1000
|
+
const next = result.isSuccess ? undefined : result.instructions?.trim();
|
|
1001
|
+
if (next) {
|
|
1002
|
+
instructions.add(next);
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
return instructions.size > 0 ? [...instructions].join(" ") : undefined;
|
|
1006
|
+
}
|
|
990
1007
|
function toProjectDiagnostics(projects, results) {
|
|
991
1008
|
return projects.map((project, index) => {
|
|
992
1009
|
const result = results[index];
|
|
@@ -1067,7 +1084,7 @@ class SolutionPackService {
|
|
|
1067
1084
|
...projectResults
|
|
1068
1085
|
];
|
|
1069
1086
|
if (hasFailedResults(restoreAndPackResults)) {
|
|
1070
|
-
const failure = ToolResult2.error(ToolErrorCodes2.InternalError, `Solution pack failed: ${getFailedResultsMessage(restoreAndPackResults)}
|
|
1087
|
+
const failure = ToolResult2.error(ToolErrorCodes2.InternalError, `Solution pack failed: ${getFailedResultsMessage(restoreAndPackResults)}`, getFailedResultsInstructions(restoreAndPackResults));
|
|
1071
1088
|
failure.details = {
|
|
1072
1089
|
projects: toProjectDiagnostics(solution.Projects, projectResults)
|
|
1073
1090
|
};
|
|
@@ -1227,7 +1244,7 @@ class SolutionRestoreService {
|
|
|
1227
1244
|
})
|
|
1228
1245
|
]);
|
|
1229
1246
|
if (hasFailedResults(restoreResults)) {
|
|
1230
|
-
return ToolResult3.error(ToolErrorCodes3.InternalError, `Solution restore failed: ${getFailedResultsMessage(restoreResults)}
|
|
1247
|
+
return ToolResult3.error(ToolErrorCodes3.InternalError, `Solution restore failed: ${getFailedResultsMessage(restoreResults)}`, getFailedResultsInstructions(restoreResults));
|
|
1231
1248
|
}
|
|
1232
1249
|
return ToolResult3.success();
|
|
1233
1250
|
}, { [PackagerDimensions3.SolutionId]: solution.SolutionId });
|
|
@@ -1310,7 +1327,7 @@ class SolutionPackager {
|
|
|
1310
1327
|
this.logger = new ToolLogger("SolutionPackager", "PackSolution");
|
|
1311
1328
|
this.packOptionsValidator = new SolutionPackOptionsValidator(this.logger, this.fileSystem);
|
|
1312
1329
|
this.validateOptionsValidator = new SolutionValidateOptionsValidator(this.logger, this.fileSystem);
|
|
1313
|
-
const packService = new
|
|
1330
|
+
const packService = new PackService2;
|
|
1314
1331
|
const packageIdReader = new PackageIdReader(this.fileSystem, packService);
|
|
1315
1332
|
this.optionsBuilder = new OptionsBuilder(packageIdReader, packService, this.fileSystem);
|
|
1316
1333
|
this.toolsFactory = new ToolsFactory(this.repository, this.fileSystem);
|
|
@@ -1475,6 +1492,7 @@ class SolutionPackager {
|
|
|
1475
1492
|
return {
|
|
1476
1493
|
id: crypto.randomUUID(),
|
|
1477
1494
|
projects: solution.Projects,
|
|
1495
|
+
solutionRoot: this.fileSystem.path.dirname(solution.filePath),
|
|
1478
1496
|
downloadUrl: options.downloadUrl,
|
|
1479
1497
|
solutionId: solution.SolutionId,
|
|
1480
1498
|
configuration: options.configuration,
|
|
@@ -1482,6 +1500,8 @@ class SolutionPackager {
|
|
|
1482
1500
|
connection: options.connection,
|
|
1483
1501
|
logger: this.logger,
|
|
1484
1502
|
workflowCompilerVersion: options.workflowCompilerVersion,
|
|
1503
|
+
functionsPackagerVersion: options.functionsPackagerVersion,
|
|
1504
|
+
codedAppsPackagerVersion: options.codedAppsPackagerVersion,
|
|
1485
1505
|
lockKey: options.lockKey,
|
|
1486
1506
|
jobTarget: options.jobTarget,
|
|
1487
1507
|
localSourcePath: options.localSourcePath
|
|
@@ -1533,7 +1553,9 @@ export {
|
|
|
1533
1553
|
RulesConfigFileType2 as RulesConfigFileType,
|
|
1534
1554
|
SolutionPackOptions,
|
|
1535
1555
|
SolutionPackager,
|
|
1536
|
-
createNodeSolutionPackager
|
|
1556
|
+
createNodeSolutionPackager,
|
|
1557
|
+
readMemberPackageIdAsync,
|
|
1558
|
+
toProjectDiagnostics
|
|
1537
1559
|
};
|
|
1538
1560
|
|
|
1539
|
-
//# debugId=
|
|
1561
|
+
//# debugId=5407E726C8B2B72364756E2164756E21
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// src/services/package-id-reader.ts
|
|
2
|
+
import {
|
|
3
|
+
PackService
|
|
4
|
+
} from "@uipath/project-packager";
|
|
5
|
+
import { Path } from "@uipath/solutionpackager-tool-core";
|
|
6
|
+
var legacySolutionResourcesFileName = "resources.json";
|
|
7
|
+
|
|
8
|
+
class PackageIdReader {
|
|
9
|
+
fileSystem;
|
|
10
|
+
packService;
|
|
11
|
+
projectTypesToFolderNameMapping = {
|
|
12
|
+
processorchestration: "processOrchestration",
|
|
13
|
+
casemanagement: "caseManagement",
|
|
14
|
+
agent: "agent",
|
|
15
|
+
api: "api",
|
|
16
|
+
webapp: "webApp",
|
|
17
|
+
process: "process",
|
|
18
|
+
flow: "flow"
|
|
19
|
+
};
|
|
20
|
+
static projectTypeMap = {
|
|
21
|
+
process: "Rpa",
|
|
22
|
+
library: "Lib",
|
|
23
|
+
tests: "Tests",
|
|
24
|
+
webapp: "App",
|
|
25
|
+
processorchestration: "Agentic",
|
|
26
|
+
casemanagement: "Case",
|
|
27
|
+
api: "Api",
|
|
28
|
+
agent: "Agent",
|
|
29
|
+
flow: "Flow"
|
|
30
|
+
};
|
|
31
|
+
constructor(fileSystem, packService) {
|
|
32
|
+
this.fileSystem = fileSystem;
|
|
33
|
+
this.packService = packService;
|
|
34
|
+
}
|
|
35
|
+
async read(project, solutionPath, solutionName) {
|
|
36
|
+
try {
|
|
37
|
+
if (!solutionPath || solutionPath.trim() === "") {
|
|
38
|
+
return this.defaultToProjectFolder(project, solutionPath, solutionName);
|
|
39
|
+
}
|
|
40
|
+
return await this.readFromResourcesDirectory(project, solutionPath) || await this.readFromLegacyResourcesJson(project, solutionPath) || this.defaultToProjectFolder(project, solutionPath, solutionName);
|
|
41
|
+
} catch (ex) {
|
|
42
|
+
console.error("Error reading package ID:", ex);
|
|
43
|
+
return this.defaultToProjectFolder(project, solutionPath, solutionName);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
defaultToProjectFolder(project, solutionPath, solutionName) {
|
|
47
|
+
const projectFolderName = Path.dirname(project.ProjectRelativePath);
|
|
48
|
+
const id = this.packService.sanitizePackageId(projectFolderName);
|
|
49
|
+
return this.getPackageId(id, project, solutionPath, solutionName);
|
|
50
|
+
}
|
|
51
|
+
getPackageId(rootPackageId, project, solutionPath, solutionName) {
|
|
52
|
+
const packageId = this.composePackageId(rootPackageId, project, solutionPath, solutionName);
|
|
53
|
+
return this.packService.sanitizePackageId(packageId);
|
|
54
|
+
}
|
|
55
|
+
composePackageId(rootPackageId, project, solutionPath, solutionName) {
|
|
56
|
+
if (!solutionName && (!solutionPath || solutionPath.trim() === "")) {
|
|
57
|
+
return rootPackageId;
|
|
58
|
+
}
|
|
59
|
+
const resolvedSolutionName = solutionName || this.deriveSolutionName(solutionPath);
|
|
60
|
+
const parts = [resolvedSolutionName];
|
|
61
|
+
if (project.Type) {
|
|
62
|
+
parts.push(PackageIdReader.normalizeProjectType(project.Type));
|
|
63
|
+
}
|
|
64
|
+
parts.push(rootPackageId);
|
|
65
|
+
return parts.join(".");
|
|
66
|
+
}
|
|
67
|
+
static normalizeProjectType(projectType) {
|
|
68
|
+
const normalizedKey = projectType.toLowerCase();
|
|
69
|
+
return PackageIdReader.projectTypeMap[normalizedKey] || projectType;
|
|
70
|
+
}
|
|
71
|
+
deriveSolutionName(solutionPath) {
|
|
72
|
+
const ext = Path.extname(solutionPath);
|
|
73
|
+
const base = Path.basename(solutionPath);
|
|
74
|
+
return ext ? base.substring(0, base.length - ext.length) : base;
|
|
75
|
+
}
|
|
76
|
+
async readFromLegacyResourcesJson(project, solutionPath) {
|
|
77
|
+
const resourcesFilePath = Path.join(solutionPath, legacySolutionResourcesFileName);
|
|
78
|
+
const exists = await this.fileSystem.exists(resourcesFilePath);
|
|
79
|
+
if (!exists) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const data = await this.fileSystem.readFile(resourcesFilePath);
|
|
83
|
+
if (!data) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
const json = new TextDecoder().decode(data);
|
|
87
|
+
return this.getProjectIdFromJson(project, json);
|
|
88
|
+
}
|
|
89
|
+
getProjectIdFromJson(project, json) {
|
|
90
|
+
try {
|
|
91
|
+
const jsonObject = JSON.parse(json);
|
|
92
|
+
const resources = this.getProperty(jsonObject, "resources");
|
|
93
|
+
if (!Array.isArray(resources)) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
const resource = resources.find((r) => {
|
|
97
|
+
const projectKey = this.getProperty(r, "projectKey");
|
|
98
|
+
const kind = this.getProperty(r, "kind");
|
|
99
|
+
return projectKey === project.Id && typeof kind === "string" && kind.toLowerCase() === "process";
|
|
100
|
+
});
|
|
101
|
+
if (!resource) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
const spec = this.getProperty(resource, "spec");
|
|
105
|
+
if (!spec) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
const packageName = this.getProperty(spec, "packageName");
|
|
109
|
+
if (!packageName || typeof packageName !== "string" || packageName.trim() === "") {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
return packageName;
|
|
113
|
+
} catch (ex) {
|
|
114
|
+
console.error("Error parsing legacy resources JSON:", ex);
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async readFromResourcesDirectory(project, solutionPath) {
|
|
119
|
+
const projectTypeLower = project.Type.toLowerCase();
|
|
120
|
+
const projectTypeFolder = this.projectTypesToFolderNameMapping[projectTypeLower] || Path.dirname(project.ProjectRelativePath);
|
|
121
|
+
const processDirectory = Path.join(solutionPath, "resources", "solution_folder", "process", projectTypeFolder);
|
|
122
|
+
const stats = await this.fileSystem.stat(processDirectory);
|
|
123
|
+
if (!stats?.isDirectory()) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
const files = await this.fileSystem.readdir(processDirectory);
|
|
127
|
+
const jsonFiles = files.filter((f) => f.endsWith(".json")).map((f) => Path.join(processDirectory, f));
|
|
128
|
+
for (const jsonFile of jsonFiles) {
|
|
129
|
+
try {
|
|
130
|
+
const data = await this.fileSystem.readFile(jsonFile);
|
|
131
|
+
if (!data) {
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
const json = new TextDecoder().decode(data);
|
|
135
|
+
const jsonObject = JSON.parse(json);
|
|
136
|
+
const resource = this.getProperty(jsonObject, "resource");
|
|
137
|
+
const projectKey = this.getProperty(resource, "projectKey");
|
|
138
|
+
if (projectKey === project.Id) {
|
|
139
|
+
const spec = this.getProperty(resource, "spec");
|
|
140
|
+
const packageName = this.getProperty(spec, "packageName");
|
|
141
|
+
if (typeof packageName !== "string" || packageName.trim() === "") {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
return packageName;
|
|
145
|
+
}
|
|
146
|
+
} catch (ex) {
|
|
147
|
+
console.error("Error reading resource file:", jsonFile, ex);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
getProperty(obj, propertyName) {
|
|
153
|
+
if (!obj || typeof obj !== "object") {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
const keys = Object.keys(obj);
|
|
157
|
+
const matchingKey = keys.find((key) => key.toLowerCase() === propertyName.toLowerCase());
|
|
158
|
+
return matchingKey ? obj[matchingKey] : null;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async function readMemberPackageIdAsync(fileSystem, project, solutionPath, solutionName) {
|
|
162
|
+
const packService = new PackService;
|
|
163
|
+
const packageId = await new PackageIdReader(fileSystem, packService).read(project, solutionPath, solutionName);
|
|
164
|
+
return packageId ? packService.sanitizePackageId(packageId) : packageId;
|
|
165
|
+
}
|
|
166
|
+
export {
|
|
167
|
+
readMemberPackageIdAsync
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
//# debugId=A19C538096761EE264756E2164756E21
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,5 +5,8 @@ export { BuildConfiguration, LogLevel, } from "@uipath/solutionpackager-tool-cor
|
|
|
5
5
|
export { createBrowserSolutionPackager } from "./browser-solution-packager-factory.js";
|
|
6
6
|
export { SolutionPackOptions } from "./models/solution-pack-options.js";
|
|
7
7
|
export { INVALID_PACKAGE_ID } from "./services/member-package-ids.js";
|
|
8
|
+
export { readMemberPackageIdAsync } from "./services/package-id-reader.js";
|
|
8
9
|
export type { ISolutionPackager } from "./services/solution-packager.js";
|
|
9
10
|
export { SolutionPackager } from "./services/solution-packager.js";
|
|
11
|
+
export type { ProjectDiagnostics } from "./services/tool-result-helpers.js";
|
|
12
|
+
export { toProjectDiagnostics } from "./services/tool-result-helpers.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PackageSigningInfo, PackOptions, PublishInfo, ValidateOptions } from "@uipath/project-packager";
|
|
2
2
|
import { PackagerParameters } from "@uipath/project-packager";
|
|
3
|
-
import { BuildConfiguration, type NugetPackageInfo
|
|
3
|
+
import { BuildConfiguration, type NugetPackageInfo } from "@uipath/solutionpackager-tool-core";
|
|
4
4
|
/**
|
|
5
5
|
* Solution-specific parameters extending base packager parameters
|
|
6
6
|
*/
|
|
@@ -55,11 +55,6 @@ export declare class SolutionPackOptions extends PackagerParameters {
|
|
|
55
55
|
* by that session. Set by the caller that holds the lock.
|
|
56
56
|
*/
|
|
57
57
|
lockKey?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Where the remote-agent job that compiles RPA projects should run. Omit for
|
|
60
|
-
* serverless, which is the default and the only prior behaviour.
|
|
61
|
-
*/
|
|
62
|
-
jobTarget?: PackJobTarget;
|
|
63
58
|
/**
|
|
64
59
|
* Absolute path of the workspace sources on the machine that runs the
|
|
65
60
|
* remote-agent pack job, letting the agent pack them in place instead of
|
package/dist/src/node.d.ts
CHANGED
|
@@ -3,5 +3,8 @@ export { RulesConfigFileType } from "@uipath/project-packager";
|
|
|
3
3
|
export { SolutionPackOptions } from "./models/solution-pack-options.js";
|
|
4
4
|
export { createNodeSolutionPackager } from "./node-solution-packager-factory.js";
|
|
5
5
|
export { INVALID_PACKAGE_ID } from "./services/member-package-ids.js";
|
|
6
|
+
export { readMemberPackageIdAsync } from "./services/package-id-reader.js";
|
|
6
7
|
export type { ISolutionPackager } from "./services/solution-packager.js";
|
|
7
8
|
export { SolutionPackager } from "./services/solution-packager.js";
|
|
9
|
+
export type { ProjectDiagnostics } from "./services/tool-result-helpers.js";
|
|
10
|
+
export { toProjectDiagnostics } from "./services/tool-result-helpers.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { readMemberPackageIdAsync } from "./services/package-id-reader.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IPackService, type UiPathProject } from "@uipath/project-packager";
|
|
2
2
|
import { type IFileSystem } from "@uipath/solutionpackager-tool-core";
|
|
3
3
|
/**
|
|
4
4
|
* Interface for reading package IDs from projects
|
|
@@ -59,3 +59,11 @@ export declare class PackageIdReader implements IPackageIdReader {
|
|
|
59
59
|
*/
|
|
60
60
|
private getProperty;
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* The package id a solution pack gives one member, for a host that packs the
|
|
64
|
+
* member on its own but has to name it the way the solution does: the id the
|
|
65
|
+
* solution saved for it, else `<solution>.<short type>.<member folder>`,
|
|
66
|
+
* sanitized as the pack sanitizes it. Throws, as the pack does, for an id
|
|
67
|
+
* longer than NuGet allows.
|
|
68
|
+
*/
|
|
69
|
+
export declare function readMemberPackageIdAsync(fileSystem: IFileSystem, project: UiPathProject, solutionPath: string, solutionName: string): Promise<string | null>;
|
|
@@ -9,6 +9,15 @@ import { type ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
|
9
9
|
export declare function hasFailedResults(results: ToolResult[]): boolean;
|
|
10
10
|
/** Combined, comma-separated message of every failed result in the batch. */
|
|
11
11
|
export declare function getFailedResultsMessage(results: ToolResult[]): string;
|
|
12
|
+
/**
|
|
13
|
+
* The next steps the failed results carried, de-duplicated and joined, or
|
|
14
|
+
* `undefined` when none did. A project tool that says what to run (an
|
|
15
|
+
* uninitialized Function project, a member that needs re-saving in Studio
|
|
16
|
+
* Web) must not lose that at the solution layer: the CLI prints a tool's
|
|
17
|
+
* `instructions` as the envelope's `Instructions` only when the solution
|
|
18
|
+
* result still has them.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getFailedResultsInstructions(results: ToolResult[]): string | undefined;
|
|
12
21
|
/**
|
|
13
22
|
* One project's outcome inside a solution operation, in the shape the CLI puts on the wire under
|
|
14
23
|
* `Data.Projects`. Field names mirror the flattened findings the workflow compiler already emits, so
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/solution-packager",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.205.0-preview.256",
|
|
6
6
|
"description": "UiPath Solution Packager - core library for packing UiPath solutions",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/index.js",
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"./node": {
|
|
15
15
|
"types": "./dist/src/node.d.ts",
|
|
16
16
|
"default": "./dist/node.js"
|
|
17
|
+
},
|
|
18
|
+
"./package-id": {
|
|
19
|
+
"types": "./dist/src/package-id.d.ts",
|
|
20
|
+
"default": "./dist/package-id.js"
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
"types": "./dist/src/index.d.ts",
|
|
@@ -29,11 +33,11 @@
|
|
|
29
33
|
"dist"
|
|
30
34
|
],
|
|
31
35
|
"dependencies": {
|
|
32
|
-
"@uipath/project-packager": "1.
|
|
33
|
-
"@uipath/solutionpackager-tool-core": "1.
|
|
36
|
+
"@uipath/project-packager": "1.205.0",
|
|
37
|
+
"@uipath/solutionpackager-tool-core": "1.205.0"
|
|
34
38
|
},
|
|
35
39
|
"peerDependencies": {
|
|
36
40
|
"fflate": "^0.8.2"
|
|
37
41
|
},
|
|
38
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "63740c6cbb7ff282fa9118cc16a148eb030b245f"
|
|
39
43
|
}
|