@uipath/project-packager 1.197.0 → 1.198.0-preview.81
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/browser.js +50 -19
- package/dist/index.js +118 -47
- package/dist/node.js +122 -47
- package/dist/src/i18n/locales/en.d.ts +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/models/packager-parameters.d.ts +4 -0
- package/dist/src/models/project-cleanup-options.d.ts +14 -0
- package/dist/src/node.d.ts +1 -0
- package/dist/src/services/project-loader.d.ts +4 -2
- package/dist/src/services/project-packager.d.ts +14 -0
- package/dist/src/services/project-tool-executor.d.ts +3 -1
- package/dist/src/telemetry-names.d.ts +2 -0
- package/package.json +5 -5
package/dist/browser.js
CHANGED
|
@@ -6,7 +6,7 @@ var de_default = {
|
|
|
6
6
|
projectLoader: {
|
|
7
7
|
errors: {
|
|
8
8
|
pathRequired: "Project directory path is required",
|
|
9
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
9
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
10
10
|
readFailed: "Failed to read project file: {path}",
|
|
11
11
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
12
12
|
}
|
|
@@ -89,7 +89,7 @@ var en = {
|
|
|
89
89
|
projectLoader: {
|
|
90
90
|
errors: {
|
|
91
91
|
pathRequired: "Project directory path is required",
|
|
92
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
92
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
93
93
|
readFailed: "Failed to read project file: {path}",
|
|
94
94
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
95
95
|
}
|
|
@@ -171,7 +171,7 @@ var es_default = {
|
|
|
171
171
|
projectLoader: {
|
|
172
172
|
errors: {
|
|
173
173
|
pathRequired: "Project directory path is required",
|
|
174
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
174
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
175
175
|
readFailed: "Failed to read project file: {path}",
|
|
176
176
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
177
177
|
}
|
|
@@ -253,7 +253,7 @@ var es_MX_default = {
|
|
|
253
253
|
projectLoader: {
|
|
254
254
|
errors: {
|
|
255
255
|
pathRequired: "Project directory path is required",
|
|
256
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
256
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
257
257
|
readFailed: "Failed to read project file: {path}",
|
|
258
258
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
259
259
|
}
|
|
@@ -335,7 +335,7 @@ var fr_default = {
|
|
|
335
335
|
projectLoader: {
|
|
336
336
|
errors: {
|
|
337
337
|
pathRequired: "Project directory path is required",
|
|
338
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
338
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
339
339
|
readFailed: "Failed to read project file: {path}",
|
|
340
340
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
341
341
|
}
|
|
@@ -417,7 +417,7 @@ var ja_default = {
|
|
|
417
417
|
projectLoader: {
|
|
418
418
|
errors: {
|
|
419
419
|
pathRequired: "Project directory path is required",
|
|
420
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
420
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
421
421
|
readFailed: "Failed to read project file: {path}",
|
|
422
422
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
423
423
|
}
|
|
@@ -499,7 +499,7 @@ var ko_default = {
|
|
|
499
499
|
projectLoader: {
|
|
500
500
|
errors: {
|
|
501
501
|
pathRequired: "Project directory path is required",
|
|
502
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
502
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
503
503
|
readFailed: "Failed to read project file: {path}",
|
|
504
504
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
505
505
|
}
|
|
@@ -581,7 +581,7 @@ var pt_default = {
|
|
|
581
581
|
projectLoader: {
|
|
582
582
|
errors: {
|
|
583
583
|
pathRequired: "Project directory path is required",
|
|
584
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
584
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
585
585
|
readFailed: "Failed to read project file: {path}",
|
|
586
586
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
587
587
|
}
|
|
@@ -663,7 +663,7 @@ var pt_BR_default = {
|
|
|
663
663
|
projectLoader: {
|
|
664
664
|
errors: {
|
|
665
665
|
pathRequired: "Project directory path is required",
|
|
666
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
666
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
667
667
|
readFailed: "Failed to read project file: {path}",
|
|
668
668
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
669
669
|
}
|
|
@@ -745,7 +745,7 @@ var ro_default = {
|
|
|
745
745
|
projectLoader: {
|
|
746
746
|
errors: {
|
|
747
747
|
pathRequired: "Project directory path is required",
|
|
748
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
748
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
749
749
|
readFailed: "Failed to read project file: {path}",
|
|
750
750
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
751
751
|
}
|
|
@@ -827,7 +827,7 @@ var ru_default = {
|
|
|
827
827
|
projectLoader: {
|
|
828
828
|
errors: {
|
|
829
829
|
pathRequired: "Project directory path is required",
|
|
830
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
830
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
831
831
|
readFailed: "Failed to read project file: {path}",
|
|
832
832
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
833
833
|
}
|
|
@@ -909,7 +909,7 @@ var tr_default = {
|
|
|
909
909
|
projectLoader: {
|
|
910
910
|
errors: {
|
|
911
911
|
pathRequired: "Project directory path is required",
|
|
912
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
912
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
913
913
|
readFailed: "Failed to read project file: {path}",
|
|
914
914
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
915
915
|
}
|
|
@@ -991,7 +991,7 @@ var zh_CN_default = {
|
|
|
991
991
|
projectLoader: {
|
|
992
992
|
errors: {
|
|
993
993
|
pathRequired: "Project directory path is required",
|
|
994
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
994
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
995
995
|
readFailed: "Failed to read project file: {path}",
|
|
996
996
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
997
997
|
}
|
|
@@ -1073,7 +1073,7 @@ var zh_TW_default = {
|
|
|
1073
1073
|
projectLoader: {
|
|
1074
1074
|
errors: {
|
|
1075
1075
|
pathRequired: "Project directory path is required",
|
|
1076
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1076
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1077
1077
|
readFailed: "Failed to read project file: {path}",
|
|
1078
1078
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1079
1079
|
}
|
|
@@ -1155,7 +1155,7 @@ var zu_default = {
|
|
|
1155
1155
|
projectLoader: {
|
|
1156
1156
|
errors: {
|
|
1157
1157
|
pathRequired: "Project directory path is required",
|
|
1158
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1158
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1159
1159
|
readFailed: "Failed to read project file: {path}",
|
|
1160
1160
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1161
1161
|
}
|
|
@@ -22494,6 +22494,7 @@ var loggerSingleton = singleton(SimpleLogger);
|
|
|
22494
22494
|
var logger = SimpleLogger.getInstance();
|
|
22495
22495
|
var formatSlot = singleton("OutputFormat");
|
|
22496
22496
|
var formatExplicitSlot = singleton("OutputFormatExplicit");
|
|
22497
|
+
var helpRequestedSlot = singleton("HelpRequested");
|
|
22497
22498
|
var filterSlot = singleton("OutputFilter");
|
|
22498
22499
|
var PollOutcome = {
|
|
22499
22500
|
Completed: "completed",
|
|
@@ -23123,6 +23124,7 @@ import {
|
|
|
23123
23124
|
class PackagerParameters {
|
|
23124
23125
|
inputPath;
|
|
23125
23126
|
downloadUrl;
|
|
23127
|
+
projectId;
|
|
23126
23128
|
logLevel = LogLevel3.Warn;
|
|
23127
23129
|
outputPath;
|
|
23128
23130
|
targetFramework;
|
|
@@ -23422,6 +23424,7 @@ import {
|
|
|
23422
23424
|
class ProjectLoader {
|
|
23423
23425
|
fileSystem;
|
|
23424
23426
|
static WebAppManifestFileName = "webAppManifest.json";
|
|
23427
|
+
static ProjectJsonFileName = "project.json";
|
|
23425
23428
|
constructor(fileSystem) {
|
|
23426
23429
|
this.fileSystem = fileSystem;
|
|
23427
23430
|
}
|
|
@@ -23434,6 +23437,10 @@ class ProjectLoader {
|
|
|
23434
23437
|
if (projectFileExists) {
|
|
23435
23438
|
return await this.loadFromProjectFile(projectPath, projectFilePath);
|
|
23436
23439
|
}
|
|
23440
|
+
const projectJsonPath = Path2.join(projectPath, ProjectLoader.ProjectJsonFileName);
|
|
23441
|
+
if (await this.fileSystem.exists(projectJsonPath)) {
|
|
23442
|
+
return await this.loadFromProjectFile(projectPath, projectJsonPath, true);
|
|
23443
|
+
}
|
|
23437
23444
|
const webAppManifestPath = Path2.join(projectPath, ProjectLoader.WebAppManifestFileName);
|
|
23438
23445
|
const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
|
|
23439
23446
|
if (webAppManifestExists) {
|
|
@@ -23441,11 +23448,12 @@ class ProjectLoader {
|
|
|
23441
23448
|
}
|
|
23442
23449
|
throw new Error(translate4.t("solutionpackager.projectLoader.errors.noProjectFile", {
|
|
23443
23450
|
projectFile: ProjectTool.ProjectFileName,
|
|
23451
|
+
projectJsonFile: ProjectLoader.ProjectJsonFileName,
|
|
23444
23452
|
manifestFile: ProjectLoader.WebAppManifestFileName,
|
|
23445
23453
|
path: projectPath
|
|
23446
23454
|
}));
|
|
23447
23455
|
}
|
|
23448
|
-
async loadFromProjectFile(projectPath, projectFilePath) {
|
|
23456
|
+
async loadFromProjectFile(projectPath, projectFilePath, useProjectJson = false) {
|
|
23449
23457
|
const fileContent = await this.fileSystem.readFile(projectFilePath);
|
|
23450
23458
|
if (!fileContent) {
|
|
23451
23459
|
throw new Error(translate4.t("solutionpackager.projectLoader.errors.readFailed", {
|
|
@@ -23454,7 +23462,8 @@ class ProjectLoader {
|
|
|
23454
23462
|
}
|
|
23455
23463
|
const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
23456
23464
|
const projectData = JSON.parse(json);
|
|
23457
|
-
const
|
|
23465
|
+
const outputType = useProjectJson ? projectData.designOptions?.outputType : undefined;
|
|
23466
|
+
const projectType = outputType ?? (projectData?.ProjectType || projectData?.type);
|
|
23458
23467
|
if (!projectData || !projectType) {
|
|
23459
23468
|
throw new Error(translate4.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
23460
23469
|
path: projectFilePath
|
|
@@ -23564,6 +23573,12 @@ class ProjectToolExecutor {
|
|
|
23564
23573
|
projectType: project.Type
|
|
23565
23574
|
}));
|
|
23566
23575
|
}
|
|
23576
|
+
async cleanupAsync(options, project, context, cancellationToken) {
|
|
23577
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Cleanup" /* ProjectToolCleanup */, project.Type, async () => tool.cleanupAsync(options, cancellationToken), {
|
|
23578
|
+
projectId: project.Id,
|
|
23579
|
+
projectType: project.Type
|
|
23580
|
+
}));
|
|
23581
|
+
}
|
|
23567
23582
|
async executeToolOperationAsync(project, context, operation) {
|
|
23568
23583
|
try {
|
|
23569
23584
|
const tool = await this.toolsFactory.createProjectToolAsync(project, context);
|
|
@@ -23683,7 +23698,8 @@ class ProjectPackager {
|
|
|
23683
23698
|
logLevel: options.logLevel,
|
|
23684
23699
|
outputPath: options.outputPath
|
|
23685
23700
|
};
|
|
23686
|
-
|
|
23701
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
23702
|
+
return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, context, cancellationToken);
|
|
23687
23703
|
}, cancellationToken);
|
|
23688
23704
|
}
|
|
23689
23705
|
async validateProjectAsync(options, cancellationToken) {
|
|
@@ -23781,6 +23797,20 @@ class ProjectPackager {
|
|
|
23781
23797
|
}
|
|
23782
23798
|
});
|
|
23783
23799
|
}
|
|
23800
|
+
async cleanupProjectAsync(options, cancellationToken) {
|
|
23801
|
+
return await this.executeProjectOperationAsync(options, "Cleanup", "ProjectPackager.Cleanup" /* ProjectPackagerCleanup */, async (uiPathProject, loadedProject) => {
|
|
23802
|
+
const cleanupOptions = {
|
|
23803
|
+
projectPath: loadedProject.projectPath,
|
|
23804
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
23805
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
23806
|
+
logLevel: options.logLevel,
|
|
23807
|
+
dryRun: options.dryRun ?? false,
|
|
23808
|
+
skipImports: options.skipImports ?? false
|
|
23809
|
+
};
|
|
23810
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
23811
|
+
return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
|
|
23812
|
+
}, cancellationToken);
|
|
23813
|
+
}
|
|
23784
23814
|
async getPackageStreamsAsync(result) {
|
|
23785
23815
|
if (!result.isSuccess) {
|
|
23786
23816
|
throw new Error(translate5.t("solutionpackager.packager.errors.failedToGetStreams", {
|
|
@@ -23835,6 +23865,7 @@ class ProjectPackager {
|
|
|
23835
23865
|
id: crypto.randomUUID(),
|
|
23836
23866
|
projects: [uiPathProject],
|
|
23837
23867
|
downloadUrl: options.downloadUrl,
|
|
23868
|
+
projectId: options.projectId,
|
|
23838
23869
|
targetFramework: options.targetFramework ?? TargetFramework.Portable,
|
|
23839
23870
|
connection: options.connection,
|
|
23840
23871
|
logger: this.logger,
|
|
@@ -23899,4 +23930,4 @@ export {
|
|
|
23899
23930
|
BaseBrowserPackagerFactory
|
|
23900
23931
|
};
|
|
23901
23932
|
|
|
23902
|
-
//# debugId=
|
|
23933
|
+
//# debugId=FD7C95F51232306D64756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ var de_default = {
|
|
|
6
6
|
projectLoader: {
|
|
7
7
|
errors: {
|
|
8
8
|
pathRequired: "Project directory path is required",
|
|
9
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
9
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
10
10
|
readFailed: "Failed to read project file: {path}",
|
|
11
11
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
12
12
|
}
|
|
@@ -89,7 +89,7 @@ var en = {
|
|
|
89
89
|
projectLoader: {
|
|
90
90
|
errors: {
|
|
91
91
|
pathRequired: "Project directory path is required",
|
|
92
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
92
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
93
93
|
readFailed: "Failed to read project file: {path}",
|
|
94
94
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
95
95
|
}
|
|
@@ -171,7 +171,7 @@ var es_default = {
|
|
|
171
171
|
projectLoader: {
|
|
172
172
|
errors: {
|
|
173
173
|
pathRequired: "Project directory path is required",
|
|
174
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
174
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
175
175
|
readFailed: "Failed to read project file: {path}",
|
|
176
176
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
177
177
|
}
|
|
@@ -253,7 +253,7 @@ var es_MX_default = {
|
|
|
253
253
|
projectLoader: {
|
|
254
254
|
errors: {
|
|
255
255
|
pathRequired: "Project directory path is required",
|
|
256
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
256
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
257
257
|
readFailed: "Failed to read project file: {path}",
|
|
258
258
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
259
259
|
}
|
|
@@ -335,7 +335,7 @@ var fr_default = {
|
|
|
335
335
|
projectLoader: {
|
|
336
336
|
errors: {
|
|
337
337
|
pathRequired: "Project directory path is required",
|
|
338
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
338
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
339
339
|
readFailed: "Failed to read project file: {path}",
|
|
340
340
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
341
341
|
}
|
|
@@ -417,7 +417,7 @@ var ja_default = {
|
|
|
417
417
|
projectLoader: {
|
|
418
418
|
errors: {
|
|
419
419
|
pathRequired: "Project directory path is required",
|
|
420
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
420
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
421
421
|
readFailed: "Failed to read project file: {path}",
|
|
422
422
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
423
423
|
}
|
|
@@ -499,7 +499,7 @@ var ko_default = {
|
|
|
499
499
|
projectLoader: {
|
|
500
500
|
errors: {
|
|
501
501
|
pathRequired: "Project directory path is required",
|
|
502
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
502
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
503
503
|
readFailed: "Failed to read project file: {path}",
|
|
504
504
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
505
505
|
}
|
|
@@ -581,7 +581,7 @@ var pt_default = {
|
|
|
581
581
|
projectLoader: {
|
|
582
582
|
errors: {
|
|
583
583
|
pathRequired: "Project directory path is required",
|
|
584
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
584
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
585
585
|
readFailed: "Failed to read project file: {path}",
|
|
586
586
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
587
587
|
}
|
|
@@ -663,7 +663,7 @@ var pt_BR_default = {
|
|
|
663
663
|
projectLoader: {
|
|
664
664
|
errors: {
|
|
665
665
|
pathRequired: "Project directory path is required",
|
|
666
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
666
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
667
667
|
readFailed: "Failed to read project file: {path}",
|
|
668
668
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
669
669
|
}
|
|
@@ -745,7 +745,7 @@ var ro_default = {
|
|
|
745
745
|
projectLoader: {
|
|
746
746
|
errors: {
|
|
747
747
|
pathRequired: "Project directory path is required",
|
|
748
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
748
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
749
749
|
readFailed: "Failed to read project file: {path}",
|
|
750
750
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
751
751
|
}
|
|
@@ -827,7 +827,7 @@ var ru_default = {
|
|
|
827
827
|
projectLoader: {
|
|
828
828
|
errors: {
|
|
829
829
|
pathRequired: "Project directory path is required",
|
|
830
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
830
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
831
831
|
readFailed: "Failed to read project file: {path}",
|
|
832
832
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
833
833
|
}
|
|
@@ -909,7 +909,7 @@ var tr_default = {
|
|
|
909
909
|
projectLoader: {
|
|
910
910
|
errors: {
|
|
911
911
|
pathRequired: "Project directory path is required",
|
|
912
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
912
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
913
913
|
readFailed: "Failed to read project file: {path}",
|
|
914
914
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
915
915
|
}
|
|
@@ -991,7 +991,7 @@ var zh_CN_default = {
|
|
|
991
991
|
projectLoader: {
|
|
992
992
|
errors: {
|
|
993
993
|
pathRequired: "Project directory path is required",
|
|
994
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
994
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
995
995
|
readFailed: "Failed to read project file: {path}",
|
|
996
996
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
997
997
|
}
|
|
@@ -1073,7 +1073,7 @@ var zh_TW_default = {
|
|
|
1073
1073
|
projectLoader: {
|
|
1074
1074
|
errors: {
|
|
1075
1075
|
pathRequired: "Project directory path is required",
|
|
1076
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1076
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1077
1077
|
readFailed: "Failed to read project file: {path}",
|
|
1078
1078
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1079
1079
|
}
|
|
@@ -1155,7 +1155,7 @@ var zu_default = {
|
|
|
1155
1155
|
projectLoader: {
|
|
1156
1156
|
errors: {
|
|
1157
1157
|
pathRequired: "Project directory path is required",
|
|
1158
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1158
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1159
1159
|
readFailed: "Failed to read project file: {path}",
|
|
1160
1160
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1161
1161
|
}
|
|
@@ -22494,6 +22494,7 @@ var loggerSingleton = singleton(SimpleLogger);
|
|
|
22494
22494
|
var logger = SimpleLogger.getInstance();
|
|
22495
22495
|
var formatSlot = singleton("OutputFormat");
|
|
22496
22496
|
var formatExplicitSlot = singleton("OutputFormatExplicit");
|
|
22497
|
+
var helpRequestedSlot = singleton("HelpRequested");
|
|
22497
22498
|
var filterSlot = singleton("OutputFilter");
|
|
22498
22499
|
var PollOutcome = {
|
|
22499
22500
|
Completed: "completed",
|
|
@@ -22537,34 +22538,7 @@ var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
|
22537
22538
|
function getGlobalTelemetryProperties() {
|
|
22538
22539
|
return telemetryPropsSlot.get();
|
|
22539
22540
|
}
|
|
22540
|
-
var USER_AGENT_HEADER = "User-Agent";
|
|
22541
22541
|
var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
|
|
22542
|
-
function splitUserAgentTokens(value) {
|
|
22543
|
-
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
22544
|
-
}
|
|
22545
|
-
function appendUserAgentToken(value, userAgent) {
|
|
22546
|
-
const tokens = splitUserAgentTokens(value);
|
|
22547
|
-
const seen = new Set(tokens);
|
|
22548
|
-
for (const token of splitUserAgentTokens(userAgent)) {
|
|
22549
|
-
if (!seen.has(token)) {
|
|
22550
|
-
tokens.push(token);
|
|
22551
|
-
seen.add(token);
|
|
22552
|
-
}
|
|
22553
|
-
}
|
|
22554
|
-
return tokens.join(" ");
|
|
22555
|
-
}
|
|
22556
|
-
function getEffectiveUserAgent(userAgent) {
|
|
22557
|
-
return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
|
|
22558
|
-
}
|
|
22559
|
-
function getHeaderName(headers, headerName) {
|
|
22560
|
-
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
22561
|
-
}
|
|
22562
|
-
function addSdkUserAgentHeader(headers, userAgent) {
|
|
22563
|
-
const result = { ...headers ?? {} };
|
|
22564
|
-
const headerName = getHeaderName(result, USER_AGENT_HEADER);
|
|
22565
|
-
result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
|
|
22566
|
-
return result;
|
|
22567
|
-
}
|
|
22568
22542
|
class BrowserContextStorage {
|
|
22569
22543
|
contextStack = [];
|
|
22570
22544
|
run(context, fn) {
|
|
@@ -23000,6 +22974,7 @@ var RulesConfigFileType;
|
|
|
23000
22974
|
class PackagerParameters {
|
|
23001
22975
|
inputPath;
|
|
23002
22976
|
downloadUrl;
|
|
22977
|
+
projectId;
|
|
23003
22978
|
logLevel = LogLevel2.Warn;
|
|
23004
22979
|
outputPath;
|
|
23005
22980
|
targetFramework;
|
|
@@ -23026,6 +23001,11 @@ class ProjectValidateOptions extends ProjectRestoreOptions {
|
|
|
23026
23001
|
class ProjectBuildOptions extends ProjectValidateOptions {
|
|
23027
23002
|
outputType;
|
|
23028
23003
|
}
|
|
23004
|
+
// src/models/project-cleanup-options.ts
|
|
23005
|
+
class ProjectCleanupOptions extends PackagerParameters {
|
|
23006
|
+
dryRun = false;
|
|
23007
|
+
skipImports = false;
|
|
23008
|
+
}
|
|
23029
23009
|
// src/models/project-pack-options.ts
|
|
23030
23010
|
class ProjectPackOptions extends ProjectBuildOptions {
|
|
23031
23011
|
destinationPath;
|
|
@@ -23313,13 +23293,72 @@ var ExtendedFolderDtoFeedTypeEnum = {
|
|
|
23313
23293
|
FolderHierarchy: "FolderHierarchy"
|
|
23314
23294
|
};
|
|
23315
23295
|
|
|
23296
|
+
// ../../common/dist/sdk-user-agent.js
|
|
23297
|
+
var PREFIX2 = "@uipath/common/";
|
|
23298
|
+
var _g2 = globalThis;
|
|
23299
|
+
function singleton2(ctorOrName) {
|
|
23300
|
+
const name = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
|
|
23301
|
+
const key = Symbol.for(PREFIX2 + name);
|
|
23302
|
+
return {
|
|
23303
|
+
get(fallback) {
|
|
23304
|
+
return _g2[key] ?? fallback;
|
|
23305
|
+
},
|
|
23306
|
+
set(value) {
|
|
23307
|
+
_g2[key] = value;
|
|
23308
|
+
},
|
|
23309
|
+
clear() {
|
|
23310
|
+
delete _g2[key];
|
|
23311
|
+
},
|
|
23312
|
+
getOrInit(factory, guard) {
|
|
23313
|
+
const existing = _g2[key];
|
|
23314
|
+
if (existing != null && typeof existing === "object") {
|
|
23315
|
+
if (!guard || guard(existing)) {
|
|
23316
|
+
return existing;
|
|
23317
|
+
}
|
|
23318
|
+
}
|
|
23319
|
+
const instance = factory();
|
|
23320
|
+
_g2[key] = instance;
|
|
23321
|
+
return instance;
|
|
23322
|
+
}
|
|
23323
|
+
};
|
|
23324
|
+
}
|
|
23325
|
+
var telemetryPropsSlot2 = singleton2("TelemetryDefaultProps");
|
|
23326
|
+
var USER_AGENT_HEADER = "User-Agent";
|
|
23327
|
+
var sdkUserAgentHostToken2 = singleton2("SdkUserAgentHostToken");
|
|
23328
|
+
function splitUserAgentTokens(value) {
|
|
23329
|
+
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
23330
|
+
}
|
|
23331
|
+
function appendUserAgentToken(value, userAgent) {
|
|
23332
|
+
const tokens = splitUserAgentTokens(value);
|
|
23333
|
+
const seen = new Set(tokens);
|
|
23334
|
+
for (const token of splitUserAgentTokens(userAgent)) {
|
|
23335
|
+
if (!seen.has(token)) {
|
|
23336
|
+
tokens.push(token);
|
|
23337
|
+
seen.add(token);
|
|
23338
|
+
}
|
|
23339
|
+
}
|
|
23340
|
+
return tokens.join(" ");
|
|
23341
|
+
}
|
|
23342
|
+
function getEffectiveUserAgent(userAgent) {
|
|
23343
|
+
return appendUserAgentToken(sdkUserAgentHostToken2.get(), userAgent);
|
|
23344
|
+
}
|
|
23345
|
+
function getHeaderName(headers, headerName) {
|
|
23346
|
+
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
23347
|
+
}
|
|
23348
|
+
function addSdkUserAgentHeader(headers, userAgent) {
|
|
23349
|
+
const result = { ...headers ?? {} };
|
|
23350
|
+
const headerName = getHeaderName(result, USER_AGENT_HEADER);
|
|
23351
|
+
result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
|
|
23352
|
+
return result;
|
|
23353
|
+
}
|
|
23354
|
+
|
|
23316
23355
|
// src/publish/services/orchestrator-feeds-service.ts
|
|
23317
23356
|
import { translate as translate3 } from "@uipath/solutionpackager-tool-core";
|
|
23318
23357
|
// package.json
|
|
23319
23358
|
var package_default = {
|
|
23320
23359
|
name: "@uipath/project-packager",
|
|
23321
23360
|
license: "MIT",
|
|
23322
|
-
version: "1.
|
|
23361
|
+
version: "1.198.0-preview.81",
|
|
23323
23362
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
23324
23363
|
type: "module",
|
|
23325
23364
|
main: "./dist/index.js",
|
|
@@ -24008,6 +24047,7 @@ import {
|
|
|
24008
24047
|
class ProjectLoader {
|
|
24009
24048
|
fileSystem;
|
|
24010
24049
|
static WebAppManifestFileName = "webAppManifest.json";
|
|
24050
|
+
static ProjectJsonFileName = "project.json";
|
|
24011
24051
|
constructor(fileSystem) {
|
|
24012
24052
|
this.fileSystem = fileSystem;
|
|
24013
24053
|
}
|
|
@@ -24020,6 +24060,10 @@ class ProjectLoader {
|
|
|
24020
24060
|
if (projectFileExists) {
|
|
24021
24061
|
return await this.loadFromProjectFile(projectPath, projectFilePath);
|
|
24022
24062
|
}
|
|
24063
|
+
const projectJsonPath = Path2.join(projectPath, ProjectLoader.ProjectJsonFileName);
|
|
24064
|
+
if (await this.fileSystem.exists(projectJsonPath)) {
|
|
24065
|
+
return await this.loadFromProjectFile(projectPath, projectJsonPath, true);
|
|
24066
|
+
}
|
|
24023
24067
|
const webAppManifestPath = Path2.join(projectPath, ProjectLoader.WebAppManifestFileName);
|
|
24024
24068
|
const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
|
|
24025
24069
|
if (webAppManifestExists) {
|
|
@@ -24027,11 +24071,12 @@ class ProjectLoader {
|
|
|
24027
24071
|
}
|
|
24028
24072
|
throw new Error(translate8.t("solutionpackager.projectLoader.errors.noProjectFile", {
|
|
24029
24073
|
projectFile: ProjectTool.ProjectFileName,
|
|
24074
|
+
projectJsonFile: ProjectLoader.ProjectJsonFileName,
|
|
24030
24075
|
manifestFile: ProjectLoader.WebAppManifestFileName,
|
|
24031
24076
|
path: projectPath
|
|
24032
24077
|
}));
|
|
24033
24078
|
}
|
|
24034
|
-
async loadFromProjectFile(projectPath, projectFilePath) {
|
|
24079
|
+
async loadFromProjectFile(projectPath, projectFilePath, useProjectJson = false) {
|
|
24035
24080
|
const fileContent = await this.fileSystem.readFile(projectFilePath);
|
|
24036
24081
|
if (!fileContent) {
|
|
24037
24082
|
throw new Error(translate8.t("solutionpackager.projectLoader.errors.readFailed", {
|
|
@@ -24040,7 +24085,8 @@ class ProjectLoader {
|
|
|
24040
24085
|
}
|
|
24041
24086
|
const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
24042
24087
|
const projectData = JSON.parse(json);
|
|
24043
|
-
const
|
|
24088
|
+
const outputType = useProjectJson ? projectData.designOptions?.outputType : undefined;
|
|
24089
|
+
const projectType = outputType ?? (projectData?.ProjectType || projectData?.type);
|
|
24044
24090
|
if (!projectData || !projectType) {
|
|
24045
24091
|
throw new Error(translate8.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
24046
24092
|
path: projectFilePath
|
|
@@ -24083,10 +24129,12 @@ var TelemetryNames;
|
|
|
24083
24129
|
TelemetryNames2["ProjectToolRestore"] = "ProjectPackager.Tool.Restore";
|
|
24084
24130
|
TelemetryNames2["ProjectToolValidate"] = "ProjectPackager.Tool.Validate";
|
|
24085
24131
|
TelemetryNames2["ProjectToolBuild"] = "ProjectPackager.Tool.Build";
|
|
24132
|
+
TelemetryNames2["ProjectToolCleanup"] = "ProjectPackager.Tool.Cleanup";
|
|
24086
24133
|
TelemetryNames2["ProjectPackagerPack"] = "ProjectPackager.Pack";
|
|
24087
24134
|
TelemetryNames2["ProjectPackagerRestore"] = "ProjectPackager.Restore";
|
|
24088
24135
|
TelemetryNames2["ProjectPackagerValidate"] = "ProjectPackager.Validate";
|
|
24089
24136
|
TelemetryNames2["ProjectPackagerBuild"] = "ProjectPackager.Build";
|
|
24137
|
+
TelemetryNames2["ProjectPackagerCleanup"] = "ProjectPackager.Cleanup";
|
|
24090
24138
|
TelemetryNames2["ProjectPackagerProjectLoaded"] = "ProjectPackager.ProjectLoaded";
|
|
24091
24139
|
})(TelemetryNames ||= {});
|
|
24092
24140
|
|
|
@@ -24176,6 +24224,12 @@ class ProjectToolExecutor {
|
|
|
24176
24224
|
projectType: project.Type
|
|
24177
24225
|
}));
|
|
24178
24226
|
}
|
|
24227
|
+
async cleanupAsync(options, project, context, cancellationToken) {
|
|
24228
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Cleanup" /* ProjectToolCleanup */, project.Type, async () => tool.cleanupAsync(options, cancellationToken), {
|
|
24229
|
+
projectId: project.Id,
|
|
24230
|
+
projectType: project.Type
|
|
24231
|
+
}));
|
|
24232
|
+
}
|
|
24179
24233
|
async executeToolOperationAsync(project, context, operation) {
|
|
24180
24234
|
try {
|
|
24181
24235
|
const tool = await this.toolsFactory.createProjectToolAsync(project, context);
|
|
@@ -24295,7 +24349,8 @@ class ProjectPackager {
|
|
|
24295
24349
|
logLevel: options.logLevel,
|
|
24296
24350
|
outputPath: options.outputPath
|
|
24297
24351
|
};
|
|
24298
|
-
|
|
24352
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
24353
|
+
return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, context, cancellationToken);
|
|
24299
24354
|
}, cancellationToken);
|
|
24300
24355
|
}
|
|
24301
24356
|
async validateProjectAsync(options, cancellationToken) {
|
|
@@ -24393,6 +24448,20 @@ class ProjectPackager {
|
|
|
24393
24448
|
}
|
|
24394
24449
|
});
|
|
24395
24450
|
}
|
|
24451
|
+
async cleanupProjectAsync(options, cancellationToken) {
|
|
24452
|
+
return await this.executeProjectOperationAsync(options, "Cleanup", "ProjectPackager.Cleanup" /* ProjectPackagerCleanup */, async (uiPathProject, loadedProject) => {
|
|
24453
|
+
const cleanupOptions = {
|
|
24454
|
+
projectPath: loadedProject.projectPath,
|
|
24455
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
24456
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
24457
|
+
logLevel: options.logLevel,
|
|
24458
|
+
dryRun: options.dryRun ?? false,
|
|
24459
|
+
skipImports: options.skipImports ?? false
|
|
24460
|
+
};
|
|
24461
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
24462
|
+
return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
|
|
24463
|
+
}, cancellationToken);
|
|
24464
|
+
}
|
|
24396
24465
|
async getPackageStreamsAsync(result) {
|
|
24397
24466
|
if (!result.isSuccess) {
|
|
24398
24467
|
throw new Error(translate9.t("solutionpackager.packager.errors.failedToGetStreams", {
|
|
@@ -24447,6 +24516,7 @@ class ProjectPackager {
|
|
|
24447
24516
|
id: crypto.randomUUID(),
|
|
24448
24517
|
projects: [uiPathProject],
|
|
24449
24518
|
downloadUrl: options.downloadUrl,
|
|
24519
|
+
projectId: options.projectId,
|
|
24450
24520
|
targetFramework: options.targetFramework ?? TargetFramework.Portable,
|
|
24451
24521
|
connection: options.connection,
|
|
24452
24522
|
logger: this.logger,
|
|
@@ -24506,6 +24576,7 @@ export {
|
|
|
24506
24576
|
ProjectPackager,
|
|
24507
24577
|
ProjectPackOptions,
|
|
24508
24578
|
ProjectLoader,
|
|
24579
|
+
ProjectCleanupOptions,
|
|
24509
24580
|
ProjectBuildOptionsValidator,
|
|
24510
24581
|
ProjectBuildOptions,
|
|
24511
24582
|
PackagerParametersValidator,
|
|
@@ -24516,4 +24587,4 @@ export {
|
|
|
24516
24587
|
BrowserContextStorage
|
|
24517
24588
|
};
|
|
24518
24589
|
|
|
24519
|
-
//# debugId=
|
|
24590
|
+
//# debugId=0F013BC1C5DCC64E64756E2164756E21
|
package/dist/node.js
CHANGED
|
@@ -6,7 +6,7 @@ var de_default = {
|
|
|
6
6
|
projectLoader: {
|
|
7
7
|
errors: {
|
|
8
8
|
pathRequired: "Project directory path is required",
|
|
9
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
9
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
10
10
|
readFailed: "Failed to read project file: {path}",
|
|
11
11
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
12
12
|
}
|
|
@@ -89,7 +89,7 @@ var en = {
|
|
|
89
89
|
projectLoader: {
|
|
90
90
|
errors: {
|
|
91
91
|
pathRequired: "Project directory path is required",
|
|
92
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
92
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
93
93
|
readFailed: "Failed to read project file: {path}",
|
|
94
94
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
95
95
|
}
|
|
@@ -171,7 +171,7 @@ var es_default = {
|
|
|
171
171
|
projectLoader: {
|
|
172
172
|
errors: {
|
|
173
173
|
pathRequired: "Project directory path is required",
|
|
174
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
174
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
175
175
|
readFailed: "Failed to read project file: {path}",
|
|
176
176
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
177
177
|
}
|
|
@@ -253,7 +253,7 @@ var es_MX_default = {
|
|
|
253
253
|
projectLoader: {
|
|
254
254
|
errors: {
|
|
255
255
|
pathRequired: "Project directory path is required",
|
|
256
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
256
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
257
257
|
readFailed: "Failed to read project file: {path}",
|
|
258
258
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
259
259
|
}
|
|
@@ -335,7 +335,7 @@ var fr_default = {
|
|
|
335
335
|
projectLoader: {
|
|
336
336
|
errors: {
|
|
337
337
|
pathRequired: "Project directory path is required",
|
|
338
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
338
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
339
339
|
readFailed: "Failed to read project file: {path}",
|
|
340
340
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
341
341
|
}
|
|
@@ -417,7 +417,7 @@ var ja_default = {
|
|
|
417
417
|
projectLoader: {
|
|
418
418
|
errors: {
|
|
419
419
|
pathRequired: "Project directory path is required",
|
|
420
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
420
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
421
421
|
readFailed: "Failed to read project file: {path}",
|
|
422
422
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
423
423
|
}
|
|
@@ -499,7 +499,7 @@ var ko_default = {
|
|
|
499
499
|
projectLoader: {
|
|
500
500
|
errors: {
|
|
501
501
|
pathRequired: "Project directory path is required",
|
|
502
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
502
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
503
503
|
readFailed: "Failed to read project file: {path}",
|
|
504
504
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
505
505
|
}
|
|
@@ -581,7 +581,7 @@ var pt_default = {
|
|
|
581
581
|
projectLoader: {
|
|
582
582
|
errors: {
|
|
583
583
|
pathRequired: "Project directory path is required",
|
|
584
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
584
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
585
585
|
readFailed: "Failed to read project file: {path}",
|
|
586
586
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
587
587
|
}
|
|
@@ -663,7 +663,7 @@ var pt_BR_default = {
|
|
|
663
663
|
projectLoader: {
|
|
664
664
|
errors: {
|
|
665
665
|
pathRequired: "Project directory path is required",
|
|
666
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
666
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
667
667
|
readFailed: "Failed to read project file: {path}",
|
|
668
668
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
669
669
|
}
|
|
@@ -745,7 +745,7 @@ var ro_default = {
|
|
|
745
745
|
projectLoader: {
|
|
746
746
|
errors: {
|
|
747
747
|
pathRequired: "Project directory path is required",
|
|
748
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
748
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
749
749
|
readFailed: "Failed to read project file: {path}",
|
|
750
750
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
751
751
|
}
|
|
@@ -827,7 +827,7 @@ var ru_default = {
|
|
|
827
827
|
projectLoader: {
|
|
828
828
|
errors: {
|
|
829
829
|
pathRequired: "Project directory path is required",
|
|
830
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
830
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
831
831
|
readFailed: "Failed to read project file: {path}",
|
|
832
832
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
833
833
|
}
|
|
@@ -909,7 +909,7 @@ var tr_default = {
|
|
|
909
909
|
projectLoader: {
|
|
910
910
|
errors: {
|
|
911
911
|
pathRequired: "Project directory path is required",
|
|
912
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
912
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
913
913
|
readFailed: "Failed to read project file: {path}",
|
|
914
914
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
915
915
|
}
|
|
@@ -991,7 +991,7 @@ var zh_CN_default = {
|
|
|
991
991
|
projectLoader: {
|
|
992
992
|
errors: {
|
|
993
993
|
pathRequired: "Project directory path is required",
|
|
994
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
994
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
995
995
|
readFailed: "Failed to read project file: {path}",
|
|
996
996
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
997
997
|
}
|
|
@@ -1073,7 +1073,7 @@ var zh_TW_default = {
|
|
|
1073
1073
|
projectLoader: {
|
|
1074
1074
|
errors: {
|
|
1075
1075
|
pathRequired: "Project directory path is required",
|
|
1076
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1076
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1077
1077
|
readFailed: "Failed to read project file: {path}",
|
|
1078
1078
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1079
1079
|
}
|
|
@@ -1155,7 +1155,7 @@ var zu_default = {
|
|
|
1155
1155
|
projectLoader: {
|
|
1156
1156
|
errors: {
|
|
1157
1157
|
pathRequired: "Project directory path is required",
|
|
1158
|
-
noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}",
|
|
1158
|
+
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1159
1159
|
readFailed: "Failed to read project file: {path}",
|
|
1160
1160
|
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1161
1161
|
}
|
|
@@ -9194,6 +9194,7 @@ function getLogFilePath() {
|
|
|
9194
9194
|
}
|
|
9195
9195
|
var formatSlot = singleton("OutputFormat");
|
|
9196
9196
|
var formatExplicitSlot = singleton("OutputFormatExplicit");
|
|
9197
|
+
var helpRequestedSlot = singleton("HelpRequested");
|
|
9197
9198
|
var filterSlot = singleton("OutputFilter");
|
|
9198
9199
|
function getOutputFormat() {
|
|
9199
9200
|
return formatSlot.get("json");
|
|
@@ -10255,6 +10256,9 @@ var OutputFormatter;
|
|
|
10255
10256
|
if (opts?.warning) {
|
|
10256
10257
|
data.Warning = opts.warning;
|
|
10257
10258
|
}
|
|
10259
|
+
if (opts?.pagination) {
|
|
10260
|
+
data.Pagination = opts.pagination;
|
|
10261
|
+
}
|
|
10258
10262
|
success(data);
|
|
10259
10263
|
}
|
|
10260
10264
|
OutputFormatter2.emitList = emitList;
|
|
@@ -10685,6 +10689,7 @@ var guardInstalledSlot = singleton("ConsoleGuardInstalled");
|
|
|
10685
10689
|
var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
|
|
10686
10690
|
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
10687
10691
|
var modeSlot = singleton("InteractivityMode");
|
|
10692
|
+
var interactiveFlagSlot = singleton("InteractiveFlag");
|
|
10688
10693
|
var PollOutcome = {
|
|
10689
10694
|
Completed: "completed",
|
|
10690
10695
|
Timeout: "timeout",
|
|
@@ -10733,34 +10738,7 @@ var ScreenLogger;
|
|
|
10733
10738
|
}
|
|
10734
10739
|
ScreenLogger2.progress = progress;
|
|
10735
10740
|
})(ScreenLogger ||= {});
|
|
10736
|
-
var USER_AGENT_HEADER = "User-Agent";
|
|
10737
10741
|
var sdkUserAgentHostToken = singleton("SdkUserAgentHostToken");
|
|
10738
|
-
function splitUserAgentTokens(value) {
|
|
10739
|
-
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
10740
|
-
}
|
|
10741
|
-
function appendUserAgentToken(value, userAgent) {
|
|
10742
|
-
const tokens = splitUserAgentTokens(value);
|
|
10743
|
-
const seen = new Set(tokens);
|
|
10744
|
-
for (const token of splitUserAgentTokens(userAgent)) {
|
|
10745
|
-
if (!seen.has(token)) {
|
|
10746
|
-
tokens.push(token);
|
|
10747
|
-
seen.add(token);
|
|
10748
|
-
}
|
|
10749
|
-
}
|
|
10750
|
-
return tokens.join(" ");
|
|
10751
|
-
}
|
|
10752
|
-
function getEffectiveUserAgent(userAgent) {
|
|
10753
|
-
return appendUserAgentToken(sdkUserAgentHostToken.get(), userAgent);
|
|
10754
|
-
}
|
|
10755
|
-
function getHeaderName(headers, headerName) {
|
|
10756
|
-
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
10757
|
-
}
|
|
10758
|
-
function addSdkUserAgentHeader(headers, userAgent) {
|
|
10759
|
-
const result = { ...headers ?? {} };
|
|
10760
|
-
const headerName = getHeaderName(result, USER_AGENT_HEADER);
|
|
10761
|
-
result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
|
|
10762
|
-
return result;
|
|
10763
|
-
}
|
|
10764
10742
|
class ConsoleTelemetryProvider {
|
|
10765
10743
|
async trackEvent(eventName, _properties) {
|
|
10766
10744
|
console.debug(`[Telemetry] Event: ${eventName}`);
|
|
@@ -10918,6 +10896,7 @@ var RulesConfigFileType;
|
|
|
10918
10896
|
class PackagerParameters {
|
|
10919
10897
|
inputPath;
|
|
10920
10898
|
downloadUrl;
|
|
10899
|
+
projectId;
|
|
10921
10900
|
logLevel = LogLevel3.Warn;
|
|
10922
10901
|
outputPath;
|
|
10923
10902
|
targetFramework;
|
|
@@ -10944,6 +10923,11 @@ class ProjectValidateOptions extends ProjectRestoreOptions {
|
|
|
10944
10923
|
class ProjectBuildOptions extends ProjectValidateOptions {
|
|
10945
10924
|
outputType;
|
|
10946
10925
|
}
|
|
10926
|
+
// src/models/project-cleanup-options.ts
|
|
10927
|
+
class ProjectCleanupOptions extends PackagerParameters {
|
|
10928
|
+
dryRun = false;
|
|
10929
|
+
skipImports = false;
|
|
10930
|
+
}
|
|
10947
10931
|
// src/models/project-pack-options.ts
|
|
10948
10932
|
class ProjectPackOptions extends ProjectBuildOptions {
|
|
10949
10933
|
destinationPath;
|
|
@@ -11066,10 +11050,12 @@ var TelemetryNames;
|
|
|
11066
11050
|
TelemetryNames2["ProjectToolRestore"] = "ProjectPackager.Tool.Restore";
|
|
11067
11051
|
TelemetryNames2["ProjectToolValidate"] = "ProjectPackager.Tool.Validate";
|
|
11068
11052
|
TelemetryNames2["ProjectToolBuild"] = "ProjectPackager.Tool.Build";
|
|
11053
|
+
TelemetryNames2["ProjectToolCleanup"] = "ProjectPackager.Tool.Cleanup";
|
|
11069
11054
|
TelemetryNames2["ProjectPackagerPack"] = "ProjectPackager.Pack";
|
|
11070
11055
|
TelemetryNames2["ProjectPackagerRestore"] = "ProjectPackager.Restore";
|
|
11071
11056
|
TelemetryNames2["ProjectPackagerValidate"] = "ProjectPackager.Validate";
|
|
11072
11057
|
TelemetryNames2["ProjectPackagerBuild"] = "ProjectPackager.Build";
|
|
11058
|
+
TelemetryNames2["ProjectPackagerCleanup"] = "ProjectPackager.Cleanup";
|
|
11073
11059
|
TelemetryNames2["ProjectPackagerProjectLoaded"] = "ProjectPackager.ProjectLoaded";
|
|
11074
11060
|
})(TelemetryNames ||= {});
|
|
11075
11061
|
|
|
@@ -11366,6 +11352,7 @@ import {
|
|
|
11366
11352
|
class ProjectLoader {
|
|
11367
11353
|
fileSystem;
|
|
11368
11354
|
static WebAppManifestFileName = "webAppManifest.json";
|
|
11355
|
+
static ProjectJsonFileName = "project.json";
|
|
11369
11356
|
constructor(fileSystem) {
|
|
11370
11357
|
this.fileSystem = fileSystem;
|
|
11371
11358
|
}
|
|
@@ -11378,6 +11365,10 @@ class ProjectLoader {
|
|
|
11378
11365
|
if (projectFileExists) {
|
|
11379
11366
|
return await this.loadFromProjectFile(projectPath, projectFilePath);
|
|
11380
11367
|
}
|
|
11368
|
+
const projectJsonPath = Path2.join(projectPath, ProjectLoader.ProjectJsonFileName);
|
|
11369
|
+
if (await this.fileSystem.exists(projectJsonPath)) {
|
|
11370
|
+
return await this.loadFromProjectFile(projectPath, projectJsonPath, true);
|
|
11371
|
+
}
|
|
11381
11372
|
const webAppManifestPath = Path2.join(projectPath, ProjectLoader.WebAppManifestFileName);
|
|
11382
11373
|
const webAppManifestExists = await this.fileSystem.exists(webAppManifestPath);
|
|
11383
11374
|
if (webAppManifestExists) {
|
|
@@ -11385,11 +11376,12 @@ class ProjectLoader {
|
|
|
11385
11376
|
}
|
|
11386
11377
|
throw new Error(translate5.t("solutionpackager.projectLoader.errors.noProjectFile", {
|
|
11387
11378
|
projectFile: ProjectTool.ProjectFileName,
|
|
11379
|
+
projectJsonFile: ProjectLoader.ProjectJsonFileName,
|
|
11388
11380
|
manifestFile: ProjectLoader.WebAppManifestFileName,
|
|
11389
11381
|
path: projectPath
|
|
11390
11382
|
}));
|
|
11391
11383
|
}
|
|
11392
|
-
async loadFromProjectFile(projectPath, projectFilePath) {
|
|
11384
|
+
async loadFromProjectFile(projectPath, projectFilePath, useProjectJson = false) {
|
|
11393
11385
|
const fileContent = await this.fileSystem.readFile(projectFilePath);
|
|
11394
11386
|
if (!fileContent) {
|
|
11395
11387
|
throw new Error(translate5.t("solutionpackager.projectLoader.errors.readFailed", {
|
|
@@ -11398,7 +11390,8 @@ class ProjectLoader {
|
|
|
11398
11390
|
}
|
|
11399
11391
|
const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
11400
11392
|
const projectData = JSON.parse(json);
|
|
11401
|
-
const
|
|
11393
|
+
const outputType = useProjectJson ? projectData.designOptions?.outputType : undefined;
|
|
11394
|
+
const projectType = outputType ?? (projectData?.ProjectType || projectData?.type);
|
|
11402
11395
|
if (!projectData || !projectType) {
|
|
11403
11396
|
throw new Error(translate5.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
11404
11397
|
path: projectFilePath
|
|
@@ -11508,6 +11501,12 @@ class ProjectToolExecutor {
|
|
|
11508
11501
|
projectType: project.Type
|
|
11509
11502
|
}));
|
|
11510
11503
|
}
|
|
11504
|
+
async cleanupAsync(options, project, context, cancellationToken) {
|
|
11505
|
+
return await this.executeToolOperationAsync(project, context, (tool) => this.telemetry.trackDependencyOperation("ProjectPackager.Tool.Cleanup" /* ProjectToolCleanup */, project.Type, async () => tool.cleanupAsync(options, cancellationToken), {
|
|
11506
|
+
projectId: project.Id,
|
|
11507
|
+
projectType: project.Type
|
|
11508
|
+
}));
|
|
11509
|
+
}
|
|
11511
11510
|
async executeToolOperationAsync(project, context, operation) {
|
|
11512
11511
|
try {
|
|
11513
11512
|
const tool = await this.toolsFactory.createProjectToolAsync(project, context);
|
|
@@ -11627,7 +11626,8 @@ class ProjectPackager {
|
|
|
11627
11626
|
logLevel: options.logLevel,
|
|
11628
11627
|
outputPath: options.outputPath
|
|
11629
11628
|
};
|
|
11630
|
-
|
|
11629
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
11630
|
+
return await this.projectExecutor.restoreAsync(restoreOptions, uiPathProject, context, cancellationToken);
|
|
11631
11631
|
}, cancellationToken);
|
|
11632
11632
|
}
|
|
11633
11633
|
async validateProjectAsync(options, cancellationToken) {
|
|
@@ -11725,6 +11725,20 @@ class ProjectPackager {
|
|
|
11725
11725
|
}
|
|
11726
11726
|
});
|
|
11727
11727
|
}
|
|
11728
|
+
async cleanupProjectAsync(options, cancellationToken) {
|
|
11729
|
+
return await this.executeProjectOperationAsync(options, "Cleanup", "ProjectPackager.Cleanup" /* ProjectPackagerCleanup */, async (uiPathProject, loadedProject) => {
|
|
11730
|
+
const cleanupOptions = {
|
|
11731
|
+
projectPath: loadedProject.projectPath,
|
|
11732
|
+
excludeConfiguredSources: options.excludeConfiguredSources ?? false,
|
|
11733
|
+
nuGetSourcesConfigPath: options.nuGetSourcesConfigPath,
|
|
11734
|
+
logLevel: options.logLevel,
|
|
11735
|
+
dryRun: options.dryRun ?? false,
|
|
11736
|
+
skipImports: options.skipImports ?? false
|
|
11737
|
+
};
|
|
11738
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
11739
|
+
return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
|
|
11740
|
+
}, cancellationToken);
|
|
11741
|
+
}
|
|
11728
11742
|
async getPackageStreamsAsync(result) {
|
|
11729
11743
|
if (!result.isSuccess) {
|
|
11730
11744
|
throw new Error(translate6.t("solutionpackager.packager.errors.failedToGetStreams", {
|
|
@@ -11779,6 +11793,7 @@ class ProjectPackager {
|
|
|
11779
11793
|
id: crypto.randomUUID(),
|
|
11780
11794
|
projects: [uiPathProject],
|
|
11781
11795
|
downloadUrl: options.downloadUrl,
|
|
11796
|
+
projectId: options.projectId,
|
|
11782
11797
|
targetFramework: options.targetFramework ?? TargetFramework.Portable,
|
|
11783
11798
|
connection: options.connection,
|
|
11784
11799
|
logger: this.logger,
|
|
@@ -12035,13 +12050,72 @@ var ExtendedFolderDtoFeedTypeEnum = {
|
|
|
12035
12050
|
FolderHierarchy: "FolderHierarchy"
|
|
12036
12051
|
};
|
|
12037
12052
|
|
|
12053
|
+
// ../../common/dist/sdk-user-agent.js
|
|
12054
|
+
var PREFIX2 = "@uipath/common/";
|
|
12055
|
+
var _g2 = globalThis;
|
|
12056
|
+
function singleton2(ctorOrName) {
|
|
12057
|
+
const name = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
|
|
12058
|
+
const key = Symbol.for(PREFIX2 + name);
|
|
12059
|
+
return {
|
|
12060
|
+
get(fallback) {
|
|
12061
|
+
return _g2[key] ?? fallback;
|
|
12062
|
+
},
|
|
12063
|
+
set(value) {
|
|
12064
|
+
_g2[key] = value;
|
|
12065
|
+
},
|
|
12066
|
+
clear() {
|
|
12067
|
+
delete _g2[key];
|
|
12068
|
+
},
|
|
12069
|
+
getOrInit(factory, guard) {
|
|
12070
|
+
const existing = _g2[key];
|
|
12071
|
+
if (existing != null && typeof existing === "object") {
|
|
12072
|
+
if (!guard || guard(existing)) {
|
|
12073
|
+
return existing;
|
|
12074
|
+
}
|
|
12075
|
+
}
|
|
12076
|
+
const instance = factory();
|
|
12077
|
+
_g2[key] = instance;
|
|
12078
|
+
return instance;
|
|
12079
|
+
}
|
|
12080
|
+
};
|
|
12081
|
+
}
|
|
12082
|
+
var telemetryPropsSlot2 = singleton2("TelemetryDefaultProps");
|
|
12083
|
+
var USER_AGENT_HEADER = "User-Agent";
|
|
12084
|
+
var sdkUserAgentHostToken2 = singleton2("SdkUserAgentHostToken");
|
|
12085
|
+
function splitUserAgentTokens(value) {
|
|
12086
|
+
return value?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
12087
|
+
}
|
|
12088
|
+
function appendUserAgentToken(value, userAgent) {
|
|
12089
|
+
const tokens = splitUserAgentTokens(value);
|
|
12090
|
+
const seen = new Set(tokens);
|
|
12091
|
+
for (const token of splitUserAgentTokens(userAgent)) {
|
|
12092
|
+
if (!seen.has(token)) {
|
|
12093
|
+
tokens.push(token);
|
|
12094
|
+
seen.add(token);
|
|
12095
|
+
}
|
|
12096
|
+
}
|
|
12097
|
+
return tokens.join(" ");
|
|
12098
|
+
}
|
|
12099
|
+
function getEffectiveUserAgent(userAgent) {
|
|
12100
|
+
return appendUserAgentToken(sdkUserAgentHostToken2.get(), userAgent);
|
|
12101
|
+
}
|
|
12102
|
+
function getHeaderName(headers, headerName) {
|
|
12103
|
+
return Object.keys(headers).find((key) => key.toLowerCase() === headerName.toLowerCase());
|
|
12104
|
+
}
|
|
12105
|
+
function addSdkUserAgentHeader(headers, userAgent) {
|
|
12106
|
+
const result = { ...headers ?? {} };
|
|
12107
|
+
const headerName = getHeaderName(result, USER_AGENT_HEADER);
|
|
12108
|
+
result[headerName ?? USER_AGENT_HEADER] = appendUserAgentToken(headerName ? result[headerName] : undefined, getEffectiveUserAgent(userAgent));
|
|
12109
|
+
return result;
|
|
12110
|
+
}
|
|
12111
|
+
|
|
12038
12112
|
// src/publish/services/orchestrator-feeds-service.ts
|
|
12039
12113
|
import { translate as translate9 } from "@uipath/solutionpackager-tool-core";
|
|
12040
12114
|
// package.json
|
|
12041
12115
|
var package_default = {
|
|
12042
12116
|
name: "@uipath/project-packager",
|
|
12043
12117
|
license: "MIT",
|
|
12044
|
-
version: "1.
|
|
12118
|
+
version: "1.198.0-preview.81",
|
|
12045
12119
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
12046
12120
|
type: "module",
|
|
12047
12121
|
main: "./dist/index.js",
|
|
@@ -12483,6 +12557,7 @@ export {
|
|
|
12483
12557
|
ProjectPackager,
|
|
12484
12558
|
ProjectPackOptions,
|
|
12485
12559
|
ProjectLoader,
|
|
12560
|
+
ProjectCleanupOptions,
|
|
12486
12561
|
ProjectBuildOptionsValidator,
|
|
12487
12562
|
ProjectBuildOptions,
|
|
12488
12563
|
PackagerParametersValidator,
|
|
@@ -12497,4 +12572,4 @@ export {
|
|
|
12497
12572
|
BaseNodePackagerFactory
|
|
12498
12573
|
};
|
|
12499
12574
|
|
|
12500
|
-
//# debugId=
|
|
12575
|
+
//# debugId=D9E26DD8874858DF64756E2164756E21
|
|
@@ -7,7 +7,7 @@ export declare const en: {
|
|
|
7
7
|
readonly projectLoader: {
|
|
8
8
|
readonly errors: {
|
|
9
9
|
readonly pathRequired: "Project directory path is required";
|
|
10
|
-
readonly noProjectFile: "No {projectFile} or {manifestFile} found in directory: {path}";
|
|
10
|
+
readonly noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}";
|
|
11
11
|
readonly readFailed: "Failed to read project file: {path}";
|
|
12
12
|
readonly invalidProject: "Invalid project file: {path}. Missing ProjectType field.";
|
|
13
13
|
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type { PackagerConfig } from "./models/packager-config.js";
|
|
|
5
5
|
export type { PackageSigningInfo, PackOptions, PublishInfo, ValidateOptions, } from "./models/packager-parameters.js";
|
|
6
6
|
export { PackagerParameters, RulesConfigFileType, } from "./models/packager-parameters.js";
|
|
7
7
|
export { ProjectBuildOptions } from "./models/project-build-options.js";
|
|
8
|
+
export { ProjectCleanupOptions } from "./models/project-cleanup-options.js";
|
|
8
9
|
export type { UiPathProject } from "./models/project-models.js";
|
|
9
10
|
export { ProjectPackOptions } from "./models/project-pack-options.js";
|
|
10
11
|
export { ProjectRestoreOptions } from "./models/project-restore-options.js";
|
|
@@ -95,6 +95,10 @@ export declare abstract class PackagerParameters {
|
|
|
95
95
|
* URL to download the project/solution snapshot for remote packing.
|
|
96
96
|
*/
|
|
97
97
|
downloadUrl?: string;
|
|
98
|
+
/**
|
|
99
|
+
* StudioWeb project identifier for downloaded standalone project workspaces.
|
|
100
|
+
*/
|
|
101
|
+
projectId?: string;
|
|
98
102
|
/**
|
|
99
103
|
* Log level for the packager
|
|
100
104
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PackagerParameters } from "./packager-parameters.js";
|
|
2
|
+
/**
|
|
3
|
+
* Project-specific parameters for cleanup operations.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ProjectCleanupOptions extends PackagerParameters {
|
|
6
|
+
/**
|
|
7
|
+
* Detect unused items without modifying the project.
|
|
8
|
+
*/
|
|
9
|
+
dryRun: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Do not clean up now-unused references to removed items in the project's files.
|
|
12
|
+
*/
|
|
13
|
+
skipImports: boolean;
|
|
14
|
+
}
|
package/dist/src/node.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export type { PackagerConfig } from "./models/packager-config.js";
|
|
|
12
12
|
export type { PackageSigningInfo, PackOptions, PublishInfo, ValidateOptions, } from "./models/packager-parameters.js";
|
|
13
13
|
export { PackagerParameters, RulesConfigFileType, } from "./models/packager-parameters.js";
|
|
14
14
|
export { ProjectBuildOptions } from "./models/project-build-options.js";
|
|
15
|
+
export { ProjectCleanupOptions } from "./models/project-cleanup-options.js";
|
|
15
16
|
export type { UiPathProject } from "./models/project-models.js";
|
|
16
17
|
export { ProjectPackOptions } from "./models/project-pack-options.js";
|
|
17
18
|
export { ProjectRestoreOptions } from "./models/project-restore-options.js";
|
|
@@ -6,16 +6,18 @@ import type { LoadedUiProject } from "../models/project-models.js";
|
|
|
6
6
|
export interface IProjectLoader {
|
|
7
7
|
/**
|
|
8
8
|
* Load project information from a directory path.
|
|
9
|
-
* Searches for project.uiproj first, falls back to
|
|
9
|
+
* Searches for project.uiproj first, then project.json, then falls back to
|
|
10
|
+
* webAppManifest.json.
|
|
10
11
|
* @param projectPath Path to the project directory
|
|
11
12
|
* @returns Loaded project information
|
|
12
|
-
* @throws Error if
|
|
13
|
+
* @throws Error if none of project.uiproj, project.json, or webAppManifest.json is found
|
|
13
14
|
*/
|
|
14
15
|
loadProject(projectPath: string): Promise<LoadedUiProject>;
|
|
15
16
|
}
|
|
16
17
|
export declare class ProjectLoader implements IProjectLoader {
|
|
17
18
|
private readonly fileSystem;
|
|
18
19
|
static readonly WebAppManifestFileName = "webAppManifest.json";
|
|
20
|
+
static readonly ProjectJsonFileName = "project.json";
|
|
19
21
|
constructor(fileSystem: IFileSystem);
|
|
20
22
|
loadProject(projectPath: string): Promise<LoadedUiProject>;
|
|
21
23
|
private loadFromProjectFile;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ITelemetryService } from "@uipath/common";
|
|
2
2
|
import { type IFileSystem, ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
3
3
|
import type { ProjectBuildOptions } from "../models/project-build-options.js";
|
|
4
|
+
import type { ProjectCleanupOptions } from "../models/project-cleanup-options.js";
|
|
4
5
|
import type { ProjectPackOptions } from "../models/project-pack-options.js";
|
|
5
6
|
import type { ProjectRestoreOptions } from "../models/project-restore-options.js";
|
|
6
7
|
import type { ProjectValidateOptions } from "../models/project-validate-options.js";
|
|
@@ -58,6 +59,15 @@ export interface IProjectPackager {
|
|
|
58
59
|
* @returns ToolResult with the paths to the created packages
|
|
59
60
|
*/
|
|
60
61
|
packProjectAsync(options: ProjectPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
62
|
+
/**
|
|
63
|
+
* Clean up a standalone project by removing unused items. Modifies the
|
|
64
|
+
* project sources in place. Pass `dryRun` to only detect what would be
|
|
65
|
+
* removed without writing any changes.
|
|
66
|
+
* @param options Project cleanup options containing the input path and flags
|
|
67
|
+
* @param cancellationToken Optional cancellation token
|
|
68
|
+
* @returns ToolResult; `details.projectCleanup` carries the ProjectCleanupInfo
|
|
69
|
+
*/
|
|
70
|
+
cleanupProjectAsync(options: ProjectCleanupOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
61
71
|
/**
|
|
62
72
|
* Convert a successful ToolResult to a list of package streams.
|
|
63
73
|
* @param result The ToolResult to convert
|
|
@@ -110,6 +120,10 @@ export declare class ProjectPackager implements IProjectPackager {
|
|
|
110
120
|
* @returns ToolResult with the paths to the created packages
|
|
111
121
|
*/
|
|
112
122
|
packProjectAsync(options: ProjectPackOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
123
|
+
/**
|
|
124
|
+
* Clean up a standalone project by removing unused items.
|
|
125
|
+
*/
|
|
126
|
+
cleanupProjectAsync(options: ProjectCleanupOptions, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
113
127
|
/**
|
|
114
128
|
* Convert a successful ToolResult to a list of package streams.
|
|
115
129
|
* @param result The ToolResult to convert
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ITelemetryService } from "@uipath/common";
|
|
2
|
-
import { type IProjectBuildOptions, type IProjectPackOptions, type IProjectRestoreOptions, type IProjectValidateOptions, type ProjectOperationContext, ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
2
|
+
import { type IProjectBuildOptions, type IProjectCleanupOptions, type IProjectPackOptions, type IProjectRestoreOptions, type IProjectValidateOptions, type ProjectOperationContext, ToolResult } from "@uipath/solutionpackager-tool-core";
|
|
3
3
|
import type { UiPathProject } from "../models/project-models.js";
|
|
4
4
|
import type { IToolsFactory } from "./tools-factory.js";
|
|
5
5
|
/**
|
|
@@ -10,6 +10,7 @@ export interface IProjectToolExecutor {
|
|
|
10
10
|
validateAsync(options: IProjectValidateOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
11
11
|
buildAsync(options: IProjectBuildOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
12
12
|
packAsync(options: IProjectPackOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
13
|
+
cleanupAsync(options: IProjectCleanupOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
13
14
|
}
|
|
14
15
|
export declare class ProjectToolExecutor implements IProjectToolExecutor {
|
|
15
16
|
private readonly toolsFactory;
|
|
@@ -19,6 +20,7 @@ export declare class ProjectToolExecutor implements IProjectToolExecutor {
|
|
|
19
20
|
validateAsync(options: IProjectValidateOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
20
21
|
buildAsync(options: IProjectBuildOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
21
22
|
packAsync(options: IProjectPackOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
23
|
+
cleanupAsync(options: IProjectCleanupOptions, project: UiPathProject, context?: ProjectOperationContext, cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
22
24
|
/**
|
|
23
25
|
* Execute an operation on a project tool with proper creation and disposal.
|
|
24
26
|
*/
|
|
@@ -3,9 +3,11 @@ export declare enum TelemetryNames {
|
|
|
3
3
|
ProjectToolRestore = "ProjectPackager.Tool.Restore",
|
|
4
4
|
ProjectToolValidate = "ProjectPackager.Tool.Validate",
|
|
5
5
|
ProjectToolBuild = "ProjectPackager.Tool.Build",
|
|
6
|
+
ProjectToolCleanup = "ProjectPackager.Tool.Cleanup",
|
|
6
7
|
ProjectPackagerPack = "ProjectPackager.Pack",
|
|
7
8
|
ProjectPackagerRestore = "ProjectPackager.Restore",
|
|
8
9
|
ProjectPackagerValidate = "ProjectPackager.Validate",
|
|
9
10
|
ProjectPackagerBuild = "ProjectPackager.Build",
|
|
11
|
+
ProjectPackagerCleanup = "ProjectPackager.Cleanup",
|
|
10
12
|
ProjectPackagerProjectLoaded = "ProjectPackager.ProjectLoaded"
|
|
11
13
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/project-packager",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.198.0-preview.81",
|
|
5
5
|
"description": "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@uipath/filesystem": "1.
|
|
36
|
-
"@uipath/solutionpackager-tool-core": "1.
|
|
37
|
-
"@uipath/common": "1.
|
|
35
|
+
"@uipath/filesystem": "1.198.0",
|
|
36
|
+
"@uipath/solutionpackager-tool-core": "1.198.0",
|
|
37
|
+
"@uipath/common": "1.198.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"fflate": "^0.8.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "d6a326ee051d553694b61f4923bcf1719d2e5110"
|
|
43
43
|
}
|