@uipath/project-packager 1.198.0 → 1.199.0-preview.105
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 +94 -17
- package/dist/index.js +96 -18
- package/dist/node.js +96 -18
- package/dist/src/i18n/locales/en.d.ts +2 -0
- package/dist/src/models/project-cleanup-options.d.ts +6 -0
- package/dist/src/services/packager-parameters-validator.d.ts +9 -0
- package/dist/tests/project-pack-options-validator.spec.d.ts +1 -0
- package/package.json +5 -5
package/dist/browser.js
CHANGED
|
@@ -14,9 +14,11 @@ var de_default = {
|
|
|
14
14
|
validator: {
|
|
15
15
|
errors: {
|
|
16
16
|
destinationNotDefined: "Destination path is not defined",
|
|
17
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
17
18
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
18
19
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
19
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
20
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
21
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
20
22
|
}
|
|
21
23
|
},
|
|
22
24
|
packager: {
|
|
@@ -97,6 +99,8 @@ var en = {
|
|
|
97
99
|
validator: {
|
|
98
100
|
errors: {
|
|
99
101
|
destinationNotDefined: "Destination path is not defined",
|
|
102
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
103
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content.",
|
|
100
104
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
101
105
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
102
106
|
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
@@ -179,9 +183,11 @@ var es_default = {
|
|
|
179
183
|
validator: {
|
|
180
184
|
errors: {
|
|
181
185
|
destinationNotDefined: "Destination path is not defined",
|
|
186
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
182
187
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
183
188
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
184
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
189
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
190
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
185
191
|
}
|
|
186
192
|
},
|
|
187
193
|
packager: {
|
|
@@ -261,9 +267,11 @@ var es_MX_default = {
|
|
|
261
267
|
validator: {
|
|
262
268
|
errors: {
|
|
263
269
|
destinationNotDefined: "Destination path is not defined",
|
|
270
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
264
271
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
265
272
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
266
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
273
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
274
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
267
275
|
}
|
|
268
276
|
},
|
|
269
277
|
packager: {
|
|
@@ -343,9 +351,11 @@ var fr_default = {
|
|
|
343
351
|
validator: {
|
|
344
352
|
errors: {
|
|
345
353
|
destinationNotDefined: "Destination path is not defined",
|
|
354
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
346
355
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
347
356
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
348
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
357
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
358
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
349
359
|
}
|
|
350
360
|
},
|
|
351
361
|
packager: {
|
|
@@ -425,9 +435,11 @@ var ja_default = {
|
|
|
425
435
|
validator: {
|
|
426
436
|
errors: {
|
|
427
437
|
destinationNotDefined: "Destination path is not defined",
|
|
438
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
428
439
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
429
440
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
430
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
441
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
442
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
431
443
|
}
|
|
432
444
|
},
|
|
433
445
|
packager: {
|
|
@@ -507,9 +519,11 @@ var ko_default = {
|
|
|
507
519
|
validator: {
|
|
508
520
|
errors: {
|
|
509
521
|
destinationNotDefined: "Destination path is not defined",
|
|
522
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
510
523
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
511
524
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
512
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
525
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
526
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
513
527
|
}
|
|
514
528
|
},
|
|
515
529
|
packager: {
|
|
@@ -589,9 +603,11 @@ var pt_default = {
|
|
|
589
603
|
validator: {
|
|
590
604
|
errors: {
|
|
591
605
|
destinationNotDefined: "Destination path is not defined",
|
|
606
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
592
607
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
593
608
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
594
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
609
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
610
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
595
611
|
}
|
|
596
612
|
},
|
|
597
613
|
packager: {
|
|
@@ -671,9 +687,11 @@ var pt_BR_default = {
|
|
|
671
687
|
validator: {
|
|
672
688
|
errors: {
|
|
673
689
|
destinationNotDefined: "Destination path is not defined",
|
|
690
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
674
691
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
675
692
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
676
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
693
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
694
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
677
695
|
}
|
|
678
696
|
},
|
|
679
697
|
packager: {
|
|
@@ -753,9 +771,11 @@ var ro_default = {
|
|
|
753
771
|
validator: {
|
|
754
772
|
errors: {
|
|
755
773
|
destinationNotDefined: "Destination path is not defined",
|
|
774
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
756
775
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
757
776
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
758
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
777
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
778
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
759
779
|
}
|
|
760
780
|
},
|
|
761
781
|
packager: {
|
|
@@ -835,9 +855,11 @@ var ru_default = {
|
|
|
835
855
|
validator: {
|
|
836
856
|
errors: {
|
|
837
857
|
destinationNotDefined: "Destination path is not defined",
|
|
858
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
838
859
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
839
860
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
840
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
861
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
862
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
841
863
|
}
|
|
842
864
|
},
|
|
843
865
|
packager: {
|
|
@@ -917,9 +939,11 @@ var tr_default = {
|
|
|
917
939
|
validator: {
|
|
918
940
|
errors: {
|
|
919
941
|
destinationNotDefined: "Destination path is not defined",
|
|
942
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
920
943
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
921
944
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
922
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
945
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
946
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
923
947
|
}
|
|
924
948
|
},
|
|
925
949
|
packager: {
|
|
@@ -999,9 +1023,11 @@ var zh_CN_default = {
|
|
|
999
1023
|
validator: {
|
|
1000
1024
|
errors: {
|
|
1001
1025
|
destinationNotDefined: "Destination path is not defined",
|
|
1026
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1002
1027
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1003
1028
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
1004
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1029
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1030
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1005
1031
|
}
|
|
1006
1032
|
},
|
|
1007
1033
|
packager: {
|
|
@@ -1081,9 +1107,11 @@ var zh_TW_default = {
|
|
|
1081
1107
|
validator: {
|
|
1082
1108
|
errors: {
|
|
1083
1109
|
destinationNotDefined: "Destination path is not defined",
|
|
1110
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1084
1111
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1085
1112
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
1086
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1113
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1114
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1087
1115
|
}
|
|
1088
1116
|
},
|
|
1089
1117
|
packager: {
|
|
@@ -1163,9 +1191,11 @@ var zu_default = {
|
|
|
1163
1191
|
validator: {
|
|
1164
1192
|
errors: {
|
|
1165
1193
|
destinationNotDefined: "Destination path is not defined",
|
|
1194
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1166
1195
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1167
1196
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
1168
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1197
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1198
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1169
1199
|
}
|
|
1170
1200
|
},
|
|
1171
1201
|
packager: {
|
|
@@ -22613,6 +22643,7 @@ var SKILL_ATTRIBUTION = attributionRecord([
|
|
|
22613
22643
|
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
22614
22644
|
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
22615
22645
|
["cli", "troubleshoot", ["uip.feedback"]],
|
|
22646
|
+
["llm-gateway", "operate", ["uip.llm-gateway"]],
|
|
22616
22647
|
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
22617
22648
|
["context-grounding", "build", ["uip.context-grounding"]],
|
|
22618
22649
|
["api-workflow", "build", ["uip.api-workflow"]],
|
|
@@ -23590,6 +23621,44 @@ class PackagerParametersValidator {
|
|
|
23590
23621
|
}
|
|
23591
23622
|
return ToolResult2.success();
|
|
23592
23623
|
}
|
|
23624
|
+
async validateDestinationOutsideProjectAsync(destinationPath, inputPath) {
|
|
23625
|
+
const projectDirectory = await this.resolveProjectDirectoryAsync(inputPath);
|
|
23626
|
+
if (!projectDirectory) {
|
|
23627
|
+
return ToolResult2.success();
|
|
23628
|
+
}
|
|
23629
|
+
const destination = this.fileSystem.path.resolve(destinationPath);
|
|
23630
|
+
if (!this.isSameOrInside(projectDirectory, destination)) {
|
|
23631
|
+
return ToolResult2.success();
|
|
23632
|
+
}
|
|
23633
|
+
const message = translate3.t("solutionpackager.validator.errors.destinationInsideProject", {
|
|
23634
|
+
destinationPath: destination,
|
|
23635
|
+
projectPath: projectDirectory
|
|
23636
|
+
});
|
|
23637
|
+
const instructions = translate3.t("solutionpackager.validator.errors.destinationInsideProjectInstruction");
|
|
23638
|
+
this.logger.error(message);
|
|
23639
|
+
return ToolResult2.error(ToolErrorCodes2.InternalError, message, instructions);
|
|
23640
|
+
}
|
|
23641
|
+
async resolveProjectDirectoryAsync(inputPath) {
|
|
23642
|
+
if (!inputPath) {
|
|
23643
|
+
return;
|
|
23644
|
+
}
|
|
23645
|
+
const resolved = this.fileSystem.path.resolve(inputPath);
|
|
23646
|
+
const stat = await this.fileSystem.stat(resolved);
|
|
23647
|
+
if (!stat) {
|
|
23648
|
+
return;
|
|
23649
|
+
}
|
|
23650
|
+
return stat.isDirectory() ? resolved : this.fileSystem.path.dirname(resolved);
|
|
23651
|
+
}
|
|
23652
|
+
isSameOrInside(parent, child) {
|
|
23653
|
+
const relative2 = this.fileSystem.path.relative(parent, child);
|
|
23654
|
+
if (relative2 === "") {
|
|
23655
|
+
return true;
|
|
23656
|
+
}
|
|
23657
|
+
if (this.fileSystem.path.isAbsolute(relative2)) {
|
|
23658
|
+
return false;
|
|
23659
|
+
}
|
|
23660
|
+
return relative2 !== ".." && !relative2.startsWith("../") && !relative2.startsWith("..\\");
|
|
23661
|
+
}
|
|
23593
23662
|
async validateGovernanceOptions(validateOptions) {
|
|
23594
23663
|
if (validateOptions.governanceFileType === "Default" /* Default */) {
|
|
23595
23664
|
if (validateOptions.governanceFilePath) {
|
|
@@ -23756,6 +23825,10 @@ class ProjectPackOptionsValidator extends ProjectBuildOptionsValidator {
|
|
|
23756
23825
|
if (!destinationResult.isSuccess) {
|
|
23757
23826
|
return destinationResult;
|
|
23758
23827
|
}
|
|
23828
|
+
const containmentResult = await this.validateDestinationOutsideProjectAsync(options.destinationPath, options.inputPath);
|
|
23829
|
+
if (!containmentResult.isSuccess) {
|
|
23830
|
+
return containmentResult;
|
|
23831
|
+
}
|
|
23759
23832
|
return await super.validateAsync(options, cancellationToken);
|
|
23760
23833
|
}
|
|
23761
23834
|
}
|
|
@@ -23972,7 +24045,8 @@ class ProjectPackager {
|
|
|
23972
24045
|
outputType: options.outputType,
|
|
23973
24046
|
projectType: uiPathProject.Type
|
|
23974
24047
|
};
|
|
23975
|
-
|
|
24048
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
24049
|
+
return await this.projectExecutor.buildAsync(buildOptions, uiPathProject, context, cancellationToken);
|
|
23976
24050
|
}, cancellationToken);
|
|
23977
24051
|
}
|
|
23978
24052
|
async packProjectAsync(options, cancellationToken) {
|
|
@@ -24030,7 +24104,10 @@ class ProjectPackager {
|
|
|
24030
24104
|
dryRun: options.dryRun ?? false,
|
|
24031
24105
|
skipImports: options.skipImports ?? false
|
|
24032
24106
|
};
|
|
24033
|
-
const context =
|
|
24107
|
+
const context = {
|
|
24108
|
+
...this.createOperationContext(options, uiPathProject),
|
|
24109
|
+
lockKey: options.lockKey
|
|
24110
|
+
};
|
|
24034
24111
|
return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
|
|
24035
24112
|
}, cancellationToken);
|
|
24036
24113
|
}
|
|
@@ -24153,4 +24230,4 @@ export {
|
|
|
24153
24230
|
BaseBrowserPackagerFactory
|
|
24154
24231
|
};
|
|
24155
24232
|
|
|
24156
|
-
//# debugId=
|
|
24233
|
+
//# debugId=8E4DCDC9DC780CF764756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -14,9 +14,11 @@ var de_default = {
|
|
|
14
14
|
validator: {
|
|
15
15
|
errors: {
|
|
16
16
|
destinationNotDefined: "Destination path is not defined",
|
|
17
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
17
18
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
18
19
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
19
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
20
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
21
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
20
22
|
}
|
|
21
23
|
},
|
|
22
24
|
packager: {
|
|
@@ -97,6 +99,8 @@ var en = {
|
|
|
97
99
|
validator: {
|
|
98
100
|
errors: {
|
|
99
101
|
destinationNotDefined: "Destination path is not defined",
|
|
102
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
103
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content.",
|
|
100
104
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
101
105
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
102
106
|
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
@@ -179,9 +183,11 @@ var es_default = {
|
|
|
179
183
|
validator: {
|
|
180
184
|
errors: {
|
|
181
185
|
destinationNotDefined: "Destination path is not defined",
|
|
186
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
182
187
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
183
188
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
184
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
189
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
190
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
185
191
|
}
|
|
186
192
|
},
|
|
187
193
|
packager: {
|
|
@@ -261,9 +267,11 @@ var es_MX_default = {
|
|
|
261
267
|
validator: {
|
|
262
268
|
errors: {
|
|
263
269
|
destinationNotDefined: "Destination path is not defined",
|
|
270
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
264
271
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
265
272
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
266
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
273
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
274
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
267
275
|
}
|
|
268
276
|
},
|
|
269
277
|
packager: {
|
|
@@ -343,9 +351,11 @@ var fr_default = {
|
|
|
343
351
|
validator: {
|
|
344
352
|
errors: {
|
|
345
353
|
destinationNotDefined: "Destination path is not defined",
|
|
354
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
346
355
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
347
356
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
348
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
357
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
358
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
349
359
|
}
|
|
350
360
|
},
|
|
351
361
|
packager: {
|
|
@@ -425,9 +435,11 @@ var ja_default = {
|
|
|
425
435
|
validator: {
|
|
426
436
|
errors: {
|
|
427
437
|
destinationNotDefined: "Destination path is not defined",
|
|
438
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
428
439
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
429
440
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
430
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
441
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
442
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
431
443
|
}
|
|
432
444
|
},
|
|
433
445
|
packager: {
|
|
@@ -507,9 +519,11 @@ var ko_default = {
|
|
|
507
519
|
validator: {
|
|
508
520
|
errors: {
|
|
509
521
|
destinationNotDefined: "Destination path is not defined",
|
|
522
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
510
523
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
511
524
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
512
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
525
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
526
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
513
527
|
}
|
|
514
528
|
},
|
|
515
529
|
packager: {
|
|
@@ -589,9 +603,11 @@ var pt_default = {
|
|
|
589
603
|
validator: {
|
|
590
604
|
errors: {
|
|
591
605
|
destinationNotDefined: "Destination path is not defined",
|
|
606
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
592
607
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
593
608
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
594
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
609
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
610
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
595
611
|
}
|
|
596
612
|
},
|
|
597
613
|
packager: {
|
|
@@ -671,9 +687,11 @@ var pt_BR_default = {
|
|
|
671
687
|
validator: {
|
|
672
688
|
errors: {
|
|
673
689
|
destinationNotDefined: "Destination path is not defined",
|
|
690
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
674
691
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
675
692
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
676
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
693
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
694
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
677
695
|
}
|
|
678
696
|
},
|
|
679
697
|
packager: {
|
|
@@ -753,9 +771,11 @@ var ro_default = {
|
|
|
753
771
|
validator: {
|
|
754
772
|
errors: {
|
|
755
773
|
destinationNotDefined: "Destination path is not defined",
|
|
774
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
756
775
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
757
776
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
758
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
777
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
778
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
759
779
|
}
|
|
760
780
|
},
|
|
761
781
|
packager: {
|
|
@@ -835,9 +855,11 @@ var ru_default = {
|
|
|
835
855
|
validator: {
|
|
836
856
|
errors: {
|
|
837
857
|
destinationNotDefined: "Destination path is not defined",
|
|
858
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
838
859
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
839
860
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
840
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
861
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
862
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
841
863
|
}
|
|
842
864
|
},
|
|
843
865
|
packager: {
|
|
@@ -917,9 +939,11 @@ var tr_default = {
|
|
|
917
939
|
validator: {
|
|
918
940
|
errors: {
|
|
919
941
|
destinationNotDefined: "Destination path is not defined",
|
|
942
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
920
943
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
921
944
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
922
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
945
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
946
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
923
947
|
}
|
|
924
948
|
},
|
|
925
949
|
packager: {
|
|
@@ -999,9 +1023,11 @@ var zh_CN_default = {
|
|
|
999
1023
|
validator: {
|
|
1000
1024
|
errors: {
|
|
1001
1025
|
destinationNotDefined: "Destination path is not defined",
|
|
1026
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1002
1027
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1003
1028
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
1004
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1029
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1030
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1005
1031
|
}
|
|
1006
1032
|
},
|
|
1007
1033
|
packager: {
|
|
@@ -1081,9 +1107,11 @@ var zh_TW_default = {
|
|
|
1081
1107
|
validator: {
|
|
1082
1108
|
errors: {
|
|
1083
1109
|
destinationNotDefined: "Destination path is not defined",
|
|
1110
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1084
1111
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1085
1112
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
1086
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1113
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1114
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1087
1115
|
}
|
|
1088
1116
|
},
|
|
1089
1117
|
packager: {
|
|
@@ -1163,9 +1191,11 @@ var zu_default = {
|
|
|
1163
1191
|
validator: {
|
|
1164
1192
|
errors: {
|
|
1165
1193
|
destinationNotDefined: "Destination path is not defined",
|
|
1194
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1166
1195
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1167
1196
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
1168
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1197
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1198
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1169
1199
|
}
|
|
1170
1200
|
},
|
|
1171
1201
|
packager: {
|
|
@@ -22613,6 +22643,7 @@ var SKILL_ATTRIBUTION = attributionRecord([
|
|
|
22613
22643
|
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
22614
22644
|
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
22615
22645
|
["cli", "troubleshoot", ["uip.feedback"]],
|
|
22646
|
+
["llm-gateway", "operate", ["uip.llm-gateway"]],
|
|
22616
22647
|
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
22617
22648
|
["context-grounding", "build", ["uip.context-grounding"]],
|
|
22618
22649
|
["api-workflow", "build", ["uip.api-workflow"]],
|
|
@@ -23228,6 +23259,7 @@ class ProjectBuildOptions extends ProjectValidateOptions {
|
|
|
23228
23259
|
class ProjectCleanupOptions extends PackagerParameters {
|
|
23229
23260
|
dryRun = false;
|
|
23230
23261
|
skipImports = false;
|
|
23262
|
+
lockKey;
|
|
23231
23263
|
}
|
|
23232
23264
|
// src/models/project-pack-options.ts
|
|
23233
23265
|
class ProjectPackOptions extends ProjectBuildOptions {
|
|
@@ -23581,7 +23613,7 @@ import { translate as translate3 } from "@uipath/solutionpackager-tool-core";
|
|
|
23581
23613
|
var package_default = {
|
|
23582
23614
|
name: "@uipath/project-packager",
|
|
23583
23615
|
license: "MIT",
|
|
23584
|
-
version: "1.
|
|
23616
|
+
version: "1.199.0-preview.105",
|
|
23585
23617
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
23586
23618
|
type: "module",
|
|
23587
23619
|
main: "./dist/index.js",
|
|
@@ -24215,6 +24247,44 @@ class PackagerParametersValidator {
|
|
|
24215
24247
|
}
|
|
24216
24248
|
return ToolResult6.success();
|
|
24217
24249
|
}
|
|
24250
|
+
async validateDestinationOutsideProjectAsync(destinationPath, inputPath) {
|
|
24251
|
+
const projectDirectory = await this.resolveProjectDirectoryAsync(inputPath);
|
|
24252
|
+
if (!projectDirectory) {
|
|
24253
|
+
return ToolResult6.success();
|
|
24254
|
+
}
|
|
24255
|
+
const destination = this.fileSystem.path.resolve(destinationPath);
|
|
24256
|
+
if (!this.isSameOrInside(projectDirectory, destination)) {
|
|
24257
|
+
return ToolResult6.success();
|
|
24258
|
+
}
|
|
24259
|
+
const message = translate7.t("solutionpackager.validator.errors.destinationInsideProject", {
|
|
24260
|
+
destinationPath: destination,
|
|
24261
|
+
projectPath: projectDirectory
|
|
24262
|
+
});
|
|
24263
|
+
const instructions = translate7.t("solutionpackager.validator.errors.destinationInsideProjectInstruction");
|
|
24264
|
+
this.logger.error(message);
|
|
24265
|
+
return ToolResult6.error(ToolErrorCodes6.InternalError, message, instructions);
|
|
24266
|
+
}
|
|
24267
|
+
async resolveProjectDirectoryAsync(inputPath) {
|
|
24268
|
+
if (!inputPath) {
|
|
24269
|
+
return;
|
|
24270
|
+
}
|
|
24271
|
+
const resolved = this.fileSystem.path.resolve(inputPath);
|
|
24272
|
+
const stat = await this.fileSystem.stat(resolved);
|
|
24273
|
+
if (!stat) {
|
|
24274
|
+
return;
|
|
24275
|
+
}
|
|
24276
|
+
return stat.isDirectory() ? resolved : this.fileSystem.path.dirname(resolved);
|
|
24277
|
+
}
|
|
24278
|
+
isSameOrInside(parent, child) {
|
|
24279
|
+
const relative2 = this.fileSystem.path.relative(parent, child);
|
|
24280
|
+
if (relative2 === "") {
|
|
24281
|
+
return true;
|
|
24282
|
+
}
|
|
24283
|
+
if (this.fileSystem.path.isAbsolute(relative2)) {
|
|
24284
|
+
return false;
|
|
24285
|
+
}
|
|
24286
|
+
return relative2 !== ".." && !relative2.startsWith("../") && !relative2.startsWith("..\\");
|
|
24287
|
+
}
|
|
24218
24288
|
async validateGovernanceOptions(validateOptions) {
|
|
24219
24289
|
if (validateOptions.governanceFileType === "Default" /* Default */) {
|
|
24220
24290
|
if (validateOptions.governanceFilePath) {
|
|
@@ -24407,6 +24477,10 @@ class ProjectPackOptionsValidator extends ProjectBuildOptionsValidator {
|
|
|
24407
24477
|
if (!destinationResult.isSuccess) {
|
|
24408
24478
|
return destinationResult;
|
|
24409
24479
|
}
|
|
24480
|
+
const containmentResult = await this.validateDestinationOutsideProjectAsync(options.destinationPath, options.inputPath);
|
|
24481
|
+
if (!containmentResult.isSuccess) {
|
|
24482
|
+
return containmentResult;
|
|
24483
|
+
}
|
|
24410
24484
|
return await super.validateAsync(options, cancellationToken);
|
|
24411
24485
|
}
|
|
24412
24486
|
}
|
|
@@ -24623,7 +24697,8 @@ class ProjectPackager {
|
|
|
24623
24697
|
outputType: options.outputType,
|
|
24624
24698
|
projectType: uiPathProject.Type
|
|
24625
24699
|
};
|
|
24626
|
-
|
|
24700
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
24701
|
+
return await this.projectExecutor.buildAsync(buildOptions, uiPathProject, context, cancellationToken);
|
|
24627
24702
|
}, cancellationToken);
|
|
24628
24703
|
}
|
|
24629
24704
|
async packProjectAsync(options, cancellationToken) {
|
|
@@ -24681,7 +24756,10 @@ class ProjectPackager {
|
|
|
24681
24756
|
dryRun: options.dryRun ?? false,
|
|
24682
24757
|
skipImports: options.skipImports ?? false
|
|
24683
24758
|
};
|
|
24684
|
-
const context =
|
|
24759
|
+
const context = {
|
|
24760
|
+
...this.createOperationContext(options, uiPathProject),
|
|
24761
|
+
lockKey: options.lockKey
|
|
24762
|
+
};
|
|
24685
24763
|
return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
|
|
24686
24764
|
}, cancellationToken);
|
|
24687
24765
|
}
|
|
@@ -24810,4 +24888,4 @@ export {
|
|
|
24810
24888
|
BrowserContextStorage
|
|
24811
24889
|
};
|
|
24812
24890
|
|
|
24813
|
-
//# debugId=
|
|
24891
|
+
//# debugId=56287D099E9EC06B64756E2164756E21
|
package/dist/node.js
CHANGED
|
@@ -14,9 +14,11 @@ var de_default = {
|
|
|
14
14
|
validator: {
|
|
15
15
|
errors: {
|
|
16
16
|
destinationNotDefined: "Destination path is not defined",
|
|
17
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
17
18
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
18
19
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
19
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
20
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
21
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
20
22
|
}
|
|
21
23
|
},
|
|
22
24
|
packager: {
|
|
@@ -97,6 +99,8 @@ var en = {
|
|
|
97
99
|
validator: {
|
|
98
100
|
errors: {
|
|
99
101
|
destinationNotDefined: "Destination path is not defined",
|
|
102
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
103
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content.",
|
|
100
104
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
101
105
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
102
106
|
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
@@ -179,9 +183,11 @@ var es_default = {
|
|
|
179
183
|
validator: {
|
|
180
184
|
errors: {
|
|
181
185
|
destinationNotDefined: "Destination path is not defined",
|
|
186
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
182
187
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
183
188
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
184
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
189
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
190
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
185
191
|
}
|
|
186
192
|
},
|
|
187
193
|
packager: {
|
|
@@ -261,9 +267,11 @@ var es_MX_default = {
|
|
|
261
267
|
validator: {
|
|
262
268
|
errors: {
|
|
263
269
|
destinationNotDefined: "Destination path is not defined",
|
|
270
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
264
271
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
265
272
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
266
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
273
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
274
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
267
275
|
}
|
|
268
276
|
},
|
|
269
277
|
packager: {
|
|
@@ -343,9 +351,11 @@ var fr_default = {
|
|
|
343
351
|
validator: {
|
|
344
352
|
errors: {
|
|
345
353
|
destinationNotDefined: "Destination path is not defined",
|
|
354
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
346
355
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
347
356
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
348
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
357
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
358
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
349
359
|
}
|
|
350
360
|
},
|
|
351
361
|
packager: {
|
|
@@ -425,9 +435,11 @@ var ja_default = {
|
|
|
425
435
|
validator: {
|
|
426
436
|
errors: {
|
|
427
437
|
destinationNotDefined: "Destination path is not defined",
|
|
438
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
428
439
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
429
440
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
430
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
441
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
442
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
431
443
|
}
|
|
432
444
|
},
|
|
433
445
|
packager: {
|
|
@@ -507,9 +519,11 @@ var ko_default = {
|
|
|
507
519
|
validator: {
|
|
508
520
|
errors: {
|
|
509
521
|
destinationNotDefined: "Destination path is not defined",
|
|
522
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
510
523
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
511
524
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
512
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
525
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
526
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
513
527
|
}
|
|
514
528
|
},
|
|
515
529
|
packager: {
|
|
@@ -589,9 +603,11 @@ var pt_default = {
|
|
|
589
603
|
validator: {
|
|
590
604
|
errors: {
|
|
591
605
|
destinationNotDefined: "Destination path is not defined",
|
|
606
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
592
607
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
593
608
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
594
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
609
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
610
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
595
611
|
}
|
|
596
612
|
},
|
|
597
613
|
packager: {
|
|
@@ -671,9 +687,11 @@ var pt_BR_default = {
|
|
|
671
687
|
validator: {
|
|
672
688
|
errors: {
|
|
673
689
|
destinationNotDefined: "Destination path is not defined",
|
|
690
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
674
691
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
675
692
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
676
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
693
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
694
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
677
695
|
}
|
|
678
696
|
},
|
|
679
697
|
packager: {
|
|
@@ -753,9 +771,11 @@ var ro_default = {
|
|
|
753
771
|
validator: {
|
|
754
772
|
errors: {
|
|
755
773
|
destinationNotDefined: "Destination path is not defined",
|
|
774
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
756
775
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
757
776
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
758
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
777
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
778
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
759
779
|
}
|
|
760
780
|
},
|
|
761
781
|
packager: {
|
|
@@ -835,9 +855,11 @@ var ru_default = {
|
|
|
835
855
|
validator: {
|
|
836
856
|
errors: {
|
|
837
857
|
destinationNotDefined: "Destination path is not defined",
|
|
858
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
838
859
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
839
860
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
840
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
861
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
862
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
841
863
|
}
|
|
842
864
|
},
|
|
843
865
|
packager: {
|
|
@@ -917,9 +939,11 @@ var tr_default = {
|
|
|
917
939
|
validator: {
|
|
918
940
|
errors: {
|
|
919
941
|
destinationNotDefined: "Destination path is not defined",
|
|
942
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
920
943
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
921
944
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
922
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
945
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
946
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
923
947
|
}
|
|
924
948
|
},
|
|
925
949
|
packager: {
|
|
@@ -999,9 +1023,11 @@ var zh_CN_default = {
|
|
|
999
1023
|
validator: {
|
|
1000
1024
|
errors: {
|
|
1001
1025
|
destinationNotDefined: "Destination path is not defined",
|
|
1026
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1002
1027
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1003
1028
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
1004
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1029
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1030
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1005
1031
|
}
|
|
1006
1032
|
},
|
|
1007
1033
|
packager: {
|
|
@@ -1081,9 +1107,11 @@ var zh_TW_default = {
|
|
|
1081
1107
|
validator: {
|
|
1082
1108
|
errors: {
|
|
1083
1109
|
destinationNotDefined: "Destination path is not defined",
|
|
1110
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1084
1111
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1085
1112
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
1086
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1113
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1114
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1087
1115
|
}
|
|
1088
1116
|
},
|
|
1089
1117
|
packager: {
|
|
@@ -1163,9 +1191,11 @@ var zu_default = {
|
|
|
1163
1191
|
validator: {
|
|
1164
1192
|
errors: {
|
|
1165
1193
|
destinationNotDefined: "Destination path is not defined",
|
|
1194
|
+
destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.",
|
|
1166
1195
|
governanceRequired: "Governance file path is required when governance file type is not Default",
|
|
1167
1196
|
governanceFileInfo: "Unable to get file information: {path}",
|
|
1168
|
-
governanceInvalidFile: "Governance file path is not a valid file: {path}"
|
|
1197
|
+
governanceInvalidFile: "Governance file path is not a valid file: {path}",
|
|
1198
|
+
destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content."
|
|
1169
1199
|
}
|
|
1170
1200
|
},
|
|
1171
1201
|
packager: {
|
|
@@ -10950,6 +10980,7 @@ var SKILL_ATTRIBUTION = attributionRecord([
|
|
|
10950
10980
|
var KNOWN_SKILL_NAMES = new Set(Object.keys(SKILL_ATTRIBUTION));
|
|
10951
10981
|
var COMMAND_ATTRIBUTION = commandAttribution([
|
|
10952
10982
|
["cli", "troubleshoot", ["uip.feedback"]],
|
|
10983
|
+
["llm-gateway", "operate", ["uip.llm-gateway"]],
|
|
10953
10984
|
["llm-gateway", "operate", ["uip.llm-configuration", "uip.model-hub"]],
|
|
10954
10985
|
["context-grounding", "build", ["uip.context-grounding"]],
|
|
10955
10986
|
["api-workflow", "build", ["uip.api-workflow"]],
|
|
@@ -11405,6 +11436,7 @@ class ProjectBuildOptions extends ProjectValidateOptions {
|
|
|
11405
11436
|
class ProjectCleanupOptions extends PackagerParameters {
|
|
11406
11437
|
dryRun = false;
|
|
11407
11438
|
skipImports = false;
|
|
11439
|
+
lockKey;
|
|
11408
11440
|
}
|
|
11409
11441
|
// src/models/project-pack-options.ts
|
|
11410
11442
|
class ProjectPackOptions extends ProjectBuildOptions {
|
|
@@ -11773,6 +11805,44 @@ class PackagerParametersValidator {
|
|
|
11773
11805
|
}
|
|
11774
11806
|
return ToolResult3.success();
|
|
11775
11807
|
}
|
|
11808
|
+
async validateDestinationOutsideProjectAsync(destinationPath, inputPath) {
|
|
11809
|
+
const projectDirectory = await this.resolveProjectDirectoryAsync(inputPath);
|
|
11810
|
+
if (!projectDirectory) {
|
|
11811
|
+
return ToolResult3.success();
|
|
11812
|
+
}
|
|
11813
|
+
const destination = this.fileSystem.path.resolve(destinationPath);
|
|
11814
|
+
if (!this.isSameOrInside(projectDirectory, destination)) {
|
|
11815
|
+
return ToolResult3.success();
|
|
11816
|
+
}
|
|
11817
|
+
const message = translate4.t("solutionpackager.validator.errors.destinationInsideProject", {
|
|
11818
|
+
destinationPath: destination,
|
|
11819
|
+
projectPath: projectDirectory
|
|
11820
|
+
});
|
|
11821
|
+
const instructions = translate4.t("solutionpackager.validator.errors.destinationInsideProjectInstruction");
|
|
11822
|
+
this.logger.error(message);
|
|
11823
|
+
return ToolResult3.error(ToolErrorCodes3.InternalError, message, instructions);
|
|
11824
|
+
}
|
|
11825
|
+
async resolveProjectDirectoryAsync(inputPath) {
|
|
11826
|
+
if (!inputPath) {
|
|
11827
|
+
return;
|
|
11828
|
+
}
|
|
11829
|
+
const resolved = this.fileSystem.path.resolve(inputPath);
|
|
11830
|
+
const stat2 = await this.fileSystem.stat(resolved);
|
|
11831
|
+
if (!stat2) {
|
|
11832
|
+
return;
|
|
11833
|
+
}
|
|
11834
|
+
return stat2.isDirectory() ? resolved : this.fileSystem.path.dirname(resolved);
|
|
11835
|
+
}
|
|
11836
|
+
isSameOrInside(parent, child) {
|
|
11837
|
+
const relative2 = this.fileSystem.path.relative(parent, child);
|
|
11838
|
+
if (relative2 === "") {
|
|
11839
|
+
return true;
|
|
11840
|
+
}
|
|
11841
|
+
if (this.fileSystem.path.isAbsolute(relative2)) {
|
|
11842
|
+
return false;
|
|
11843
|
+
}
|
|
11844
|
+
return relative2 !== ".." && !relative2.startsWith("../") && !relative2.startsWith("..\\");
|
|
11845
|
+
}
|
|
11776
11846
|
async validateGovernanceOptions(validateOptions) {
|
|
11777
11847
|
if (validateOptions.governanceFileType === "Default" /* Default */) {
|
|
11778
11848
|
if (validateOptions.governanceFilePath) {
|
|
@@ -11939,6 +12009,10 @@ class ProjectPackOptionsValidator extends ProjectBuildOptionsValidator {
|
|
|
11939
12009
|
if (!destinationResult.isSuccess) {
|
|
11940
12010
|
return destinationResult;
|
|
11941
12011
|
}
|
|
12012
|
+
const containmentResult = await this.validateDestinationOutsideProjectAsync(options.destinationPath, options.inputPath);
|
|
12013
|
+
if (!containmentResult.isSuccess) {
|
|
12014
|
+
return containmentResult;
|
|
12015
|
+
}
|
|
11942
12016
|
return await super.validateAsync(options, cancellationToken);
|
|
11943
12017
|
}
|
|
11944
12018
|
}
|
|
@@ -12155,7 +12229,8 @@ class ProjectPackager {
|
|
|
12155
12229
|
outputType: options.outputType,
|
|
12156
12230
|
projectType: uiPathProject.Type
|
|
12157
12231
|
};
|
|
12158
|
-
|
|
12232
|
+
const context = this.createOperationContext(options, uiPathProject);
|
|
12233
|
+
return await this.projectExecutor.buildAsync(buildOptions, uiPathProject, context, cancellationToken);
|
|
12159
12234
|
}, cancellationToken);
|
|
12160
12235
|
}
|
|
12161
12236
|
async packProjectAsync(options, cancellationToken) {
|
|
@@ -12213,7 +12288,10 @@ class ProjectPackager {
|
|
|
12213
12288
|
dryRun: options.dryRun ?? false,
|
|
12214
12289
|
skipImports: options.skipImports ?? false
|
|
12215
12290
|
};
|
|
12216
|
-
const context =
|
|
12291
|
+
const context = {
|
|
12292
|
+
...this.createOperationContext(options, uiPathProject),
|
|
12293
|
+
lockKey: options.lockKey
|
|
12294
|
+
};
|
|
12217
12295
|
return await this.projectExecutor.cleanupAsync(cleanupOptions, uiPathProject, context, cancellationToken);
|
|
12218
12296
|
}, cancellationToken);
|
|
12219
12297
|
}
|
|
@@ -12593,7 +12671,7 @@ import { translate as translate9 } from "@uipath/solutionpackager-tool-core";
|
|
|
12593
12671
|
var package_default = {
|
|
12594
12672
|
name: "@uipath/project-packager",
|
|
12595
12673
|
license: "MIT",
|
|
12596
|
-
version: "1.
|
|
12674
|
+
version: "1.199.0-preview.105",
|
|
12597
12675
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
12598
12676
|
type: "module",
|
|
12599
12677
|
main: "./dist/index.js",
|
|
@@ -13050,4 +13128,4 @@ export {
|
|
|
13050
13128
|
BaseNodePackagerFactory
|
|
13051
13129
|
};
|
|
13052
13130
|
|
|
13053
|
-
//# debugId=
|
|
13131
|
+
//# debugId=A36E6A9EEBB341F564756E2164756E21
|
|
@@ -15,6 +15,8 @@ export declare const en: {
|
|
|
15
15
|
readonly validator: {
|
|
16
16
|
readonly errors: {
|
|
17
17
|
readonly destinationNotDefined: "Destination path is not defined";
|
|
18
|
+
readonly destinationInsideProject: "Destination path '{destinationPath}' is inside the project directory '{projectPath}'.";
|
|
19
|
+
readonly destinationInsideProjectInstruction: "Choose a destination outside the project directory. A package written inside the project would be swallowed into the next pack's content.";
|
|
18
20
|
readonly governanceRequired: "Governance file path is required when governance file type is not Default";
|
|
19
21
|
readonly governanceFileInfo: "Unable to get file information: {path}";
|
|
20
22
|
readonly governanceInvalidFile: "Governance file path is not a valid file: {path}";
|
|
@@ -11,4 +11,10 @@ export declare class ProjectCleanupOptions extends PackagerParameters {
|
|
|
11
11
|
* Do not clean up now-unused references to removed items in the project's files.
|
|
12
12
|
*/
|
|
13
13
|
skipImports: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Lock key of the current editing session. Forwarded to the remote agent for
|
|
16
|
+
* Cleanup so its save-back overwrite is accepted while the project is locked
|
|
17
|
+
* by that session. Set by the caller that holds the lock.
|
|
18
|
+
*/
|
|
19
|
+
lockKey?: string;
|
|
14
20
|
}
|
|
@@ -22,5 +22,14 @@ export declare class PackagerParametersValidator<TOptions extends PackagerParame
|
|
|
22
22
|
constructor(logger: IToolLogger, fileSystem: IFileSystem);
|
|
23
23
|
validateAsync(_options: TOptions, _cancellationToken?: AbortSignal): Promise<ToolResult>;
|
|
24
24
|
protected validateDestinationPath(destinationPath: string): ToolResult;
|
|
25
|
+
/**
|
|
26
|
+
* Reject a destination path that is equal to or inside the project
|
|
27
|
+
* directory — output written there is swallowed into the next pack's
|
|
28
|
+
* content, growing packages indefinitely. Skipped when the input path
|
|
29
|
+
* does not exist on disk.
|
|
30
|
+
*/
|
|
31
|
+
protected validateDestinationOutsideProjectAsync(destinationPath: string, inputPath: string): Promise<ToolResult>;
|
|
32
|
+
private resolveProjectDirectoryAsync;
|
|
33
|
+
private isSameOrInside;
|
|
25
34
|
protected validateGovernanceOptions(validateOptions: ValidateOptions): Promise<ToolResult>;
|
|
26
35
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../src/i18n/index.js";
|
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.199.0-preview.105",
|
|
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.199.0",
|
|
36
|
+
"@uipath/solutionpackager-tool-core": "1.199.0",
|
|
37
|
+
"@uipath/common": "1.199.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"fflate": "^0.8.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "30a83200f41e8bb994929322e33176b4355f6707"
|
|
43
43
|
}
|