@uipath/api-workflow-tool 1.206.0-preview.301 → 1.207.0-preview.305
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/executor-tool.js +40 -8
- package/dist/{index-3d09whjq.js → index-c6a7npfj.js} +2 -2
- package/dist/{index-rb7bhmg6.js → index-ssf0741f.js} +3 -3
- package/dist/index.js +7 -7
- package/dist/{node-v5nj47w8.js → node-e8x634mg.js} +4 -4
- package/dist/{packager-tool-61bdk9sn.js → packager-tool-3krn4ar5.js} +18 -7
- package/dist/{packager-tool-rph3pq68.js → packager-tool-bwfnc2ak.js} +80 -17
- package/dist/{packager-tool-2ckhrf4j.js → packager-tool-f5s12jc4.js} +8 -12
- package/dist/{packager-tool-a9p8835k.js → packager-tool-gn9vpzvk.js} +431 -67
- package/dist/{packager-tool-67z6y00g.js → packager-tool-kwdmjkfr.js} +84 -29
- package/dist/{packager-tool-3hmfzeg0.js → packager-tool-pyp8tym0.js} +141 -28
- package/dist/{packager-tool-rqprykf5.js → packager-tool-ryk871db.js} +2 -2
- package/dist/{packager-tool-qhv22qaj.js → packager-tool-y9sda1br.js} +133 -106
- package/dist/packager-tool.js +3 -3
- package/dist/tool.js +7 -7
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
NugetPackager,
|
|
11
11
|
ProjectTool,
|
|
12
12
|
toolsFactoryRepository
|
|
13
|
-
} from "./packager-tool-
|
|
13
|
+
} from "./packager-tool-3krn4ar5.js";
|
|
14
14
|
import {
|
|
15
15
|
ProjectDimensions,
|
|
16
16
|
PackagerDimensions,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
catchError,
|
|
21
21
|
carriedInstructions,
|
|
22
22
|
isProjectTelemetryDisabled
|
|
23
|
-
} from "./packager-tool-
|
|
23
|
+
} from "./packager-tool-y9sda1br.js";
|
|
24
24
|
// ../packager/project-packager/src/i18n/locales/de.json
|
|
25
25
|
var de_default = {
|
|
26
26
|
solutionpackager: {
|
|
@@ -29,7 +29,8 @@ var de_default = {
|
|
|
29
29
|
pathRequired: "Project directory path is required",
|
|
30
30
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
31
31
|
readFailed: "Failed to read project file: {path}",
|
|
32
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
32
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
33
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
36
|
validator: {
|
|
@@ -120,7 +121,8 @@ var en = {
|
|
|
120
121
|
pathRequired: "Project directory path is required",
|
|
121
122
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
122
123
|
readFailed: "Failed to read project file: {path}",
|
|
123
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
124
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
125
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
124
126
|
}
|
|
125
127
|
},
|
|
126
128
|
validator: {
|
|
@@ -211,7 +213,8 @@ var es_default = {
|
|
|
211
213
|
pathRequired: "Project directory path is required",
|
|
212
214
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
213
215
|
readFailed: "Failed to read project file: {path}",
|
|
214
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
216
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
217
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
215
218
|
}
|
|
216
219
|
},
|
|
217
220
|
validator: {
|
|
@@ -301,7 +304,8 @@ var es_MX_default = {
|
|
|
301
304
|
pathRequired: "Project directory path is required",
|
|
302
305
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
303
306
|
readFailed: "Failed to read project file: {path}",
|
|
304
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
307
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
308
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
305
309
|
}
|
|
306
310
|
},
|
|
307
311
|
validator: {
|
|
@@ -391,7 +395,8 @@ var fr_default = {
|
|
|
391
395
|
pathRequired: "Project directory path is required",
|
|
392
396
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
393
397
|
readFailed: "Failed to read project file: {path}",
|
|
394
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
398
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
399
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
395
400
|
}
|
|
396
401
|
},
|
|
397
402
|
validator: {
|
|
@@ -481,7 +486,8 @@ var ja_default = {
|
|
|
481
486
|
pathRequired: "Project directory path is required",
|
|
482
487
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
483
488
|
readFailed: "Failed to read project file: {path}",
|
|
484
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
489
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
490
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
485
491
|
}
|
|
486
492
|
},
|
|
487
493
|
validator: {
|
|
@@ -571,7 +577,8 @@ var ko_default = {
|
|
|
571
577
|
pathRequired: "Project directory path is required",
|
|
572
578
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
573
579
|
readFailed: "Failed to read project file: {path}",
|
|
574
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
580
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
581
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
575
582
|
}
|
|
576
583
|
},
|
|
577
584
|
validator: {
|
|
@@ -661,7 +668,8 @@ var pt_default = {
|
|
|
661
668
|
pathRequired: "Project directory path is required",
|
|
662
669
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
663
670
|
readFailed: "Failed to read project file: {path}",
|
|
664
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
671
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
672
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
665
673
|
}
|
|
666
674
|
},
|
|
667
675
|
validator: {
|
|
@@ -751,7 +759,8 @@ var pt_BR_default = {
|
|
|
751
759
|
pathRequired: "Project directory path is required",
|
|
752
760
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
753
761
|
readFailed: "Failed to read project file: {path}",
|
|
754
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
762
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
763
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
755
764
|
}
|
|
756
765
|
},
|
|
757
766
|
validator: {
|
|
@@ -841,7 +850,8 @@ var ro_default = {
|
|
|
841
850
|
pathRequired: "Project directory path is required",
|
|
842
851
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
843
852
|
readFailed: "Failed to read project file: {path}",
|
|
844
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
853
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
854
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
845
855
|
}
|
|
846
856
|
},
|
|
847
857
|
validator: {
|
|
@@ -931,7 +941,8 @@ var ru_default = {
|
|
|
931
941
|
pathRequired: "Project directory path is required",
|
|
932
942
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
933
943
|
readFailed: "Failed to read project file: {path}",
|
|
934
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
944
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
945
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
935
946
|
}
|
|
936
947
|
},
|
|
937
948
|
validator: {
|
|
@@ -1021,7 +1032,8 @@ var tr_default = {
|
|
|
1021
1032
|
pathRequired: "Project directory path is required",
|
|
1022
1033
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1023
1034
|
readFailed: "Failed to read project file: {path}",
|
|
1024
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1035
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
1036
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
1025
1037
|
}
|
|
1026
1038
|
},
|
|
1027
1039
|
validator: {
|
|
@@ -1111,7 +1123,8 @@ var zh_CN_default = {
|
|
|
1111
1123
|
pathRequired: "Project directory path is required",
|
|
1112
1124
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1113
1125
|
readFailed: "Failed to read project file: {path}",
|
|
1114
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1126
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
1127
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
1115
1128
|
}
|
|
1116
1129
|
},
|
|
1117
1130
|
validator: {
|
|
@@ -1201,7 +1214,8 @@ var zh_TW_default = {
|
|
|
1201
1214
|
pathRequired: "Project directory path is required",
|
|
1202
1215
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1203
1216
|
readFailed: "Failed to read project file: {path}",
|
|
1204
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1217
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
1218
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
1205
1219
|
}
|
|
1206
1220
|
},
|
|
1207
1221
|
validator: {
|
|
@@ -1291,7 +1305,8 @@ var zu_default = {
|
|
|
1291
1305
|
pathRequired: "Project directory path is required",
|
|
1292
1306
|
noProjectFile: "No {projectFile}, {projectJsonFile}, or {manifestFile} found in directory: {path}",
|
|
1293
1307
|
readFailed: "Failed to read project file: {path}",
|
|
1294
|
-
invalidProject: "Invalid project file: {path}. Missing ProjectType field."
|
|
1308
|
+
invalidProject: "Invalid project file: {path}. Missing ProjectType field.",
|
|
1309
|
+
invalidJson: "Project file {path} is not a JSON object. {reason}"
|
|
1295
1310
|
}
|
|
1296
1311
|
},
|
|
1297
1312
|
validator: {
|
|
@@ -3139,7 +3154,7 @@ var package_default = {
|
|
|
3139
3154
|
name: "@uipath/project-packager",
|
|
3140
3155
|
author: "UiPath",
|
|
3141
3156
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
3142
|
-
version: "1.
|
|
3157
|
+
version: "1.207.0-preview.305",
|
|
3143
3158
|
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
3144
3159
|
type: "module",
|
|
3145
3160
|
main: "./dist/index.js",
|
|
@@ -3622,28 +3637,54 @@ class ProjectLoader {
|
|
|
3622
3637
|
path: projectFilePath
|
|
3623
3638
|
}));
|
|
3624
3639
|
}
|
|
3625
|
-
const
|
|
3626
|
-
const projectData = JSON.parse(json);
|
|
3640
|
+
const projectData = this.parseProjectFile(fileContent, projectFilePath);
|
|
3627
3641
|
const projectJson = useProjectJson ? projectData : undefined;
|
|
3628
|
-
const
|
|
3629
|
-
const
|
|
3630
|
-
|
|
3642
|
+
const designOptions = projectJson?.designOptions;
|
|
3643
|
+
const outputType = designOptions && typeof designOptions === "object" ? text(designOptions.outputType) : undefined;
|
|
3644
|
+
const projectType = outputType ?? (text(projectData?.ProjectType) || text(projectData?.type));
|
|
3645
|
+
if (!projectType) {
|
|
3631
3646
|
throw new Error(translate.t("solutionpackager.projectLoader.errors.invalidProject", {
|
|
3632
3647
|
path: projectFilePath
|
|
3633
3648
|
}));
|
|
3634
3649
|
}
|
|
3635
|
-
const declaredName = projectJson?.name
|
|
3636
|
-
const declaredDescription = projectJson?.description
|
|
3637
|
-
const declaredAuthor = projectJson?.author
|
|
3650
|
+
const declaredName = text(projectJson?.name) || text(projectData.Name);
|
|
3651
|
+
const declaredDescription = text(projectJson?.description) || text(projectData.Description) || undefined;
|
|
3652
|
+
const declaredAuthor = text(projectJson?.author) || text(projectData.Author) || undefined;
|
|
3653
|
+
const declaredVersion = useProjectJson ? text(projectData.projectVersion) : await this.readProjectJsonVersion(projectPath);
|
|
3638
3654
|
return {
|
|
3639
3655
|
type: projectType,
|
|
3640
3656
|
name: declaredName || Path.basename(projectPath),
|
|
3641
3657
|
projectPath,
|
|
3642
3658
|
projectFilePath,
|
|
3643
3659
|
description: declaredDescription,
|
|
3644
|
-
author: declaredAuthor
|
|
3660
|
+
author: declaredAuthor,
|
|
3661
|
+
version: declaredVersion || undefined
|
|
3645
3662
|
};
|
|
3646
3663
|
}
|
|
3664
|
+
parseProjectFile(fileContent, projectFilePath) {
|
|
3665
|
+
const json = typeof fileContent === "string" ? fileContent : new TextDecoder("utf-8").decode(fileContent);
|
|
3666
|
+
const [reason, parsed] = parseJson(json);
|
|
3667
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
3668
|
+
throw new Error(translate.t("solutionpackager.projectLoader.errors.invalidJson", {
|
|
3669
|
+
path: projectFilePath,
|
|
3670
|
+
reason: reason ?? ""
|
|
3671
|
+
}).trim());
|
|
3672
|
+
}
|
|
3673
|
+
return parsed;
|
|
3674
|
+
}
|
|
3675
|
+
async readProjectJsonVersion(projectPath) {
|
|
3676
|
+
const projectJsonPath = Path.join(projectPath, ProjectLoader.ProjectJsonFileName);
|
|
3677
|
+
if (!await this.fileSystem.exists(projectJsonPath))
|
|
3678
|
+
return;
|
|
3679
|
+
const fileContent = await this.fileSystem.readFile(projectJsonPath);
|
|
3680
|
+
if (!fileContent)
|
|
3681
|
+
return;
|
|
3682
|
+
try {
|
|
3683
|
+
return text(this.parseProjectFile(fileContent, projectJsonPath).projectVersion);
|
|
3684
|
+
} catch {
|
|
3685
|
+
return;
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3647
3688
|
loadFromWebAppManifest(projectPath, webAppManifestPath) {
|
|
3648
3689
|
const folderName = Path.basename(projectPath);
|
|
3649
3690
|
return {
|
|
@@ -3654,6 +3695,19 @@ class ProjectLoader {
|
|
|
3654
3695
|
};
|
|
3655
3696
|
}
|
|
3656
3697
|
}
|
|
3698
|
+
function parseJson(json) {
|
|
3699
|
+
try {
|
|
3700
|
+
return [undefined, JSON.parse(json)];
|
|
3701
|
+
} catch (error) {
|
|
3702
|
+
return [
|
|
3703
|
+
error instanceof Error ? error.message : String(error),
|
|
3704
|
+
undefined
|
|
3705
|
+
];
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
function text(value) {
|
|
3709
|
+
return typeof value === "string" ? value.trim() : undefined;
|
|
3710
|
+
}
|
|
3657
3711
|
|
|
3658
3712
|
// ../packager/project-packager/src/services/project-tool-executor.ts
|
|
3659
3713
|
var observerTimedOut = (phase) => () => new ToolLogger("ProjectToolExecutor", "ProjectActivity").debug(`project activity (${phase}) skipped: no answer within ${PROJECT_IDENTITY_LOOKUP_BUDGET_MS} ms`);
|
|
@@ -3797,7 +3851,8 @@ class ProjectPackOptionsBuilder {
|
|
|
3797
3851
|
package: packageInfo,
|
|
3798
3852
|
skipDependencyOptimization: parameters.packOptions?.skipDependencyOptimization ?? false,
|
|
3799
3853
|
includeSources: parameters.packOptions?.includeSources ?? false,
|
|
3800
|
-
splitPackages: parameters.packOptions?.splitPackages ?? false
|
|
3854
|
+
splitPackages: parameters.packOptions?.splitPackages ?? false,
|
|
3855
|
+
skipBuild: parameters.packOptions?.skipBuild ?? false
|
|
3801
3856
|
};
|
|
3802
3857
|
}
|
|
3803
3858
|
}
|
|
@@ -4112,4 +4167,4 @@ var SDK_USER_AGENT = `${package_default.name.replace(/^@uipath\//, "")}/${packag
|
|
|
4112
4167
|
|
|
4113
4168
|
export { setGlobalLogHandler, ToolLogger, ProjectPackOptions2, ProjectPackager };
|
|
4114
4169
|
|
|
4115
|
-
//# debugId=
|
|
4170
|
+
//# debugId=915E851BCCC3F4A964756E2164756E21
|
|
@@ -9,8 +9,10 @@ import {
|
|
|
9
9
|
releaseSuppliedArgumentValues,
|
|
10
10
|
redactProperties,
|
|
11
11
|
catchError,
|
|
12
|
+
RESULTS,
|
|
12
13
|
isCliErrorCode,
|
|
13
14
|
isRetryHint,
|
|
15
|
+
carriedResult,
|
|
14
16
|
defaultRetryForErrorCode,
|
|
15
17
|
walkErrorGraph,
|
|
16
18
|
parseHttpStatusFromMessage,
|
|
@@ -22,7 +24,7 @@ import {
|
|
|
22
24
|
isProjectTelemetryDisabled,
|
|
23
25
|
buildCommandTelemetryAttribution,
|
|
24
26
|
buildAgentSessionTelemetry
|
|
25
|
-
} from "./packager-tool-
|
|
27
|
+
} from "./packager-tool-y9sda1br.js";
|
|
26
28
|
import {
|
|
27
29
|
__toESM,
|
|
28
30
|
__commonJS,
|
|
@@ -2211,12 +2213,26 @@ class NodeFileSystem {
|
|
|
2211
2213
|
throw error;
|
|
2212
2214
|
}
|
|
2213
2215
|
}
|
|
2214
|
-
async writeFile(filePath, data) {
|
|
2216
|
+
async writeFile(filePath, data, options) {
|
|
2215
2217
|
const dir = path.dirname(filePath);
|
|
2216
2218
|
if (dir) {
|
|
2217
2219
|
await fs.mkdir(dir, { recursive: true });
|
|
2218
2220
|
}
|
|
2219
|
-
|
|
2221
|
+
if (options?.mode === undefined || process.platform === "win32") {
|
|
2222
|
+
if (options?.exclusive) {
|
|
2223
|
+
await fs.writeFile(filePath, data, { flag: "wx" });
|
|
2224
|
+
} else {
|
|
2225
|
+
await fs.writeFile(filePath, data);
|
|
2226
|
+
}
|
|
2227
|
+
return;
|
|
2228
|
+
}
|
|
2229
|
+
const handle = await fs.open(filePath, options.exclusive ? "wx" : "w", options.mode);
|
|
2230
|
+
try {
|
|
2231
|
+
await handle.chmod(options.mode);
|
|
2232
|
+
await handle.writeFile(data);
|
|
2233
|
+
} finally {
|
|
2234
|
+
await handle.close();
|
|
2235
|
+
}
|
|
2220
2236
|
}
|
|
2221
2237
|
async appendFile(filePath, data) {
|
|
2222
2238
|
const dir = path.dirname(filePath);
|
|
@@ -2251,7 +2267,8 @@ class NodeFileSystem {
|
|
|
2251
2267
|
isDirectory: () => stats.isDirectory(),
|
|
2252
2268
|
size: stats.size,
|
|
2253
2269
|
mtimeMs: stats.mtimeMs,
|
|
2254
|
-
ctimeMs: stats.ctimeMs
|
|
2270
|
+
ctimeMs: stats.ctimeMs,
|
|
2271
|
+
mode: stats.mode
|
|
2255
2272
|
};
|
|
2256
2273
|
} catch (error) {
|
|
2257
2274
|
if (this.isEnoent(error))
|
|
@@ -2262,8 +2279,13 @@ class NodeFileSystem {
|
|
|
2262
2279
|
async exists(filePath) {
|
|
2263
2280
|
return existsSync(filePath);
|
|
2264
2281
|
}
|
|
2265
|
-
async mkdir(dirPath) {
|
|
2266
|
-
await fs.mkdir(dirPath, { recursive: true });
|
|
2282
|
+
async mkdir(dirPath, options) {
|
|
2283
|
+
await fs.mkdir(dirPath, { recursive: true, mode: options?.mode });
|
|
2284
|
+
}
|
|
2285
|
+
async chmod(targetPath, mode) {
|
|
2286
|
+
if (process.platform === "win32")
|
|
2287
|
+
return;
|
|
2288
|
+
await fs.chmod(targetPath, mode);
|
|
2267
2289
|
}
|
|
2268
2290
|
async acquireLock(lockPath) {
|
|
2269
2291
|
const canonicalPath = await this.canonicalizeLockTarget(lockPath);
|
|
@@ -2413,7 +2435,7 @@ class NodeFileSystem {
|
|
|
2413
2435
|
async getTempDir() {
|
|
2414
2436
|
return await fs.mkdtemp(path.join(os.tmpdir(), "uipath-fs-"));
|
|
2415
2437
|
}
|
|
2416
|
-
async copyDirectory(sourcePath, destPath) {
|
|
2438
|
+
async copyDirectory(sourcePath, destPath, options) {
|
|
2417
2439
|
const sourceStats = await this.stat(sourcePath);
|
|
2418
2440
|
if (!sourceStats) {
|
|
2419
2441
|
throw new Error(`Source directory does not exist: ${sourcePath}`);
|
|
@@ -2430,7 +2452,9 @@ class NodeFileSystem {
|
|
|
2430
2452
|
if (!entryStats)
|
|
2431
2453
|
continue;
|
|
2432
2454
|
if (entryStats.isDirectory()) {
|
|
2433
|
-
|
|
2455
|
+
if (options?.skipDirectoryNames?.includes(entry))
|
|
2456
|
+
continue;
|
|
2457
|
+
await this.copyDirectory(srcEntry, destEntry, options);
|
|
2434
2458
|
} else if (entryStats.isFile()) {
|
|
2435
2459
|
const content = await this.readFile(srcEntry);
|
|
2436
2460
|
if (content !== null) {
|
|
@@ -2450,15 +2474,6 @@ class NodeFileSystem {
|
|
|
2450
2474
|
// ../filesystem/src/index.ts
|
|
2451
2475
|
var fsInstance = new NodeFileSystem;
|
|
2452
2476
|
var getFileSystem = () => fsInstance;
|
|
2453
|
-
// ../common/src/result-types.ts
|
|
2454
|
-
var RESULTS = {
|
|
2455
|
-
Success: "Success",
|
|
2456
|
-
Failure: "Failure",
|
|
2457
|
-
ConfigError: "ConfigError",
|
|
2458
|
-
AuthenticationError: "AuthenticationError",
|
|
2459
|
-
ValidationError: "ValidationError",
|
|
2460
|
-
TimeoutError: "TimeoutError"
|
|
2461
|
-
};
|
|
2462
2477
|
// ../common/src/command-examples.ts
|
|
2463
2478
|
var examplesByCommand = new WeakMap;
|
|
2464
2479
|
Command.prototype.examples = function(examples) {
|
|
@@ -2832,7 +2847,10 @@ var AUTH_ERROR_CODES = new Set([
|
|
|
2832
2847
|
var LOCAL_PERMISSION_CLI_ERROR_CODES = new Set([
|
|
2833
2848
|
"local_permission_denied"
|
|
2834
2849
|
]);
|
|
2835
|
-
var VALIDATION_ERROR_CODES = new Set([
|
|
2850
|
+
var VALIDATION_ERROR_CODES = new Set([
|
|
2851
|
+
"invalid_argument",
|
|
2852
|
+
"confirmation_required"
|
|
2853
|
+
]);
|
|
2836
2854
|
var NETWORK_HTTP_ERROR_CODES = new Set([
|
|
2837
2855
|
"network_error",
|
|
2838
2856
|
"rate_limited",
|
|
@@ -3187,6 +3205,7 @@ var MAX_SPOOL_AGE_MS = 72 * 60 * 60 * 1000;
|
|
|
3187
3205
|
// ../common/src/telemetry/telemetry-init.ts
|
|
3188
3206
|
var telemetryInstanceSlot = singleton("TelemetryService");
|
|
3189
3207
|
var DEFAULT_AI_CONNECTION_STRING = atob("SW5zdHJ1bWVudGF0aW9uS2V5PTliZDM3NDgyLTgxMGUtNDQyYS1hYWE2LWQzOGVmNjVjNjY3NDtJbmdlc3Rpb25FbmRwb2ludD1odHRwczovL3dlc3RldXJvcGUtNS5pbi5hcHBsaWNhdGlvbmluc2lnaHRzLmF6dXJlLmNvbS87TGl2ZUVuZHBvaW50PWh0dHBzOi8vd2VzdGV1cm9wZS5saXZlZGlhZ25vc3RpY3MubW9uaXRvci5henVyZS5jb20vO0FwcGxpY2F0aW9uSWQ9MzU2OTdlZjEtOGJkMC00ZjE5LWEyN2MtZDg3Y2NhYzY2ZDJj");
|
|
3208
|
+
var browserProviderSlot = singleton("BrowserAppInsightsTelemetryProvider");
|
|
3190
3209
|
function getGlobalTelemetryInstance() {
|
|
3191
3210
|
const existing = telemetryInstanceSlot.get();
|
|
3192
3211
|
if (existing && typeof existing === "object" && "trackEvent" in existing && typeof existing.trackEvent === "function") {
|
|
@@ -3421,7 +3440,7 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
3421
3440
|
const pagedRows = extractPagedRows(data.Data);
|
|
3422
3441
|
const items = pagedRows ?? (Array.isArray(data.Data) ? data.Data : [data.Data]);
|
|
3423
3442
|
items.forEach((item) => {
|
|
3424
|
-
const values = Object.values(item).map((v) => v ?? "").join("\t");
|
|
3443
|
+
const values = item === null || typeof item !== "object" ? String(item ?? "") : Object.values(item).map((v) => v ?? "").join("\t");
|
|
3425
3444
|
logFn(values);
|
|
3426
3445
|
});
|
|
3427
3446
|
} else {
|
|
@@ -3436,7 +3455,8 @@ function printOutput(data, format = "json", logFn, asciiSafe = false, tableRowSt
|
|
|
3436
3455
|
default: {
|
|
3437
3456
|
const hasData = "Data" in data && data.Data != null;
|
|
3438
3457
|
const pagedRows = hasData ? extractPagedRows(data.Data) : null;
|
|
3439
|
-
const
|
|
3458
|
+
const resolvedRows = pagedRows ? pagedRows : Array.isArray(data.Data) ? data.Data : null;
|
|
3459
|
+
const rows = resolvedRows && isPrimitiveArray(resolvedRows) ? resolvedRows.map((entry) => ({ Value: entry })) : resolvedRows;
|
|
3440
3460
|
if (hasData && !(rows !== null && rows.length === 0)) {
|
|
3441
3461
|
const logValue = data.Log;
|
|
3442
3462
|
if (rows !== null) {
|
|
@@ -3493,6 +3513,9 @@ function printTable(data, logFn, externalLogValue, tableRowStyle) {
|
|
|
3493
3513
|
function isPlainObjectArray(value) {
|
|
3494
3514
|
return Array.isArray(value) && value.length > 0 && value.every(isPlainRecord);
|
|
3495
3515
|
}
|
|
3516
|
+
function isPrimitiveArray(value) {
|
|
3517
|
+
return Array.isArray(value) && value.length > 0 && value.every((entry) => entry === null || typeof entry !== "object");
|
|
3518
|
+
}
|
|
3496
3519
|
function isNonEmptyPlainObject(value) {
|
|
3497
3520
|
return isPlainRecord(value) && Object.keys(value).length > 0;
|
|
3498
3521
|
}
|
|
@@ -3839,12 +3862,12 @@ class FilterEvaluationError extends Error {
|
|
|
3839
3862
|
instructions;
|
|
3840
3863
|
retry = "RetryWillNotFix";
|
|
3841
3864
|
result = RESULTS.ValidationError;
|
|
3842
|
-
constructor(filter, cause) {
|
|
3865
|
+
constructor(filter, cause, hint) {
|
|
3843
3866
|
const underlying = cause instanceof Error ? cause.message : String(cause);
|
|
3844
|
-
super(`Filter '${filter}' failed to evaluate: ${underlying}`);
|
|
3867
|
+
super(`Filter '${filter}' failed to evaluate: ${underlying}` + (hint ? ` ${hint.detail}` : ""));
|
|
3845
3868
|
this.name = "FilterEvaluationError";
|
|
3846
3869
|
this.filter = filter;
|
|
3847
|
-
this.instructions = `The --output-filter expression '${filter}' failed at evaluation time. ` + "Note that --output-filter operates on the 'Data' field of the envelope, not the full object. " + "For example, on a list result use 'length(@)' instead of 'Data | length(@)'.";
|
|
3870
|
+
this.instructions = (hint ? `${hint.instructions} ` : "") + `The --output-filter expression '${filter}' failed at evaluation time. ` + "Note that --output-filter operates on the 'Data' field of the envelope, not the full object. " + "For example, on a list result use 'length(@)' instead of 'Data | length(@)'.";
|
|
3848
3871
|
}
|
|
3849
3872
|
}
|
|
3850
3873
|
|
|
@@ -3966,6 +3989,93 @@ function nameList(names, cap = 12) {
|
|
|
3966
3989
|
const rest = names.length - shown.length;
|
|
3967
3990
|
return shown.join(", ") + (rest > 0 ? `, and ${rest} more` : "");
|
|
3968
3991
|
}
|
|
3992
|
+
function notFieldsOn(names, scope) {
|
|
3993
|
+
return `${nameList(names)} ${names.length === 1 ? "is not a field" : "are not fields"} on the ${scope} it read`;
|
|
3994
|
+
}
|
|
3995
|
+
function failingFieldRead(ast, isList, fn, argIndex) {
|
|
3996
|
+
const [left, right, condition] = ast.children ?? [];
|
|
3997
|
+
let scopes = [];
|
|
3998
|
+
if (!isList) {
|
|
3999
|
+
scopes = [ast];
|
|
4000
|
+
} else if (ast.type === "FilterProjection" && left?.type === "Identity") {
|
|
4001
|
+
scopes = [condition, right];
|
|
4002
|
+
} else if (ast.type === "Projection" && (left?.type === "Identity" || left?.type === "Flatten" && left.children?.[0]?.type === "Identity")) {
|
|
4003
|
+
scopes = [right];
|
|
4004
|
+
}
|
|
4005
|
+
const reads = new Set;
|
|
4006
|
+
let tracked = 0;
|
|
4007
|
+
const visit = (node) => {
|
|
4008
|
+
if (!node)
|
|
4009
|
+
return;
|
|
4010
|
+
switch (node.type) {
|
|
4011
|
+
case "Function": {
|
|
4012
|
+
const arg = node.children?.[argIndex - 1];
|
|
4013
|
+
if (node.name === fn && arg?.type === "Field" && arg.name) {
|
|
4014
|
+
reads.add(arg.name);
|
|
4015
|
+
tracked++;
|
|
4016
|
+
}
|
|
4017
|
+
node.children?.forEach(visit);
|
|
4018
|
+
return;
|
|
4019
|
+
}
|
|
4020
|
+
case "AndExpression":
|
|
4021
|
+
case "OrExpression":
|
|
4022
|
+
case "NotExpression":
|
|
4023
|
+
case "Comparator":
|
|
4024
|
+
case "MultiSelectList":
|
|
4025
|
+
case "MultiSelectHash":
|
|
4026
|
+
node.children?.forEach(visit);
|
|
4027
|
+
return;
|
|
4028
|
+
case "KeyValuePair":
|
|
4029
|
+
visit(node.value);
|
|
4030
|
+
return;
|
|
4031
|
+
}
|
|
4032
|
+
};
|
|
4033
|
+
scopes.forEach(visit);
|
|
4034
|
+
const calls = (node) => {
|
|
4035
|
+
if (node === null || typeof node !== "object")
|
|
4036
|
+
return 0;
|
|
4037
|
+
const own = node.type === "Function" && node.name === fn ? 1 : 0;
|
|
4038
|
+
const next = node.type === "KeyValuePair" ? [node.value] : node.children ?? [];
|
|
4039
|
+
return own + next.reduce((sum, child) => sum + calls(child), 0);
|
|
4040
|
+
};
|
|
4041
|
+
return reads.size === 1 && tracked === calls(ast) ? [...reads][0] : undefined;
|
|
4042
|
+
}
|
|
4043
|
+
function fieldExpression(name) {
|
|
4044
|
+
return /^[A-Za-z_]\w*$/.test(name) ? name : JSON.stringify(name);
|
|
4045
|
+
}
|
|
4046
|
+
function evaluationHint(codec, filter, data, cause) {
|
|
4047
|
+
const underlying = cause instanceof Error ? cause.message : String(cause);
|
|
4048
|
+
const failure = /\b(\w+)\(\) expected argument (\d+) to be type (\S+) but received type null\b/.exec(underlying);
|
|
4049
|
+
if (!failure)
|
|
4050
|
+
return;
|
|
4051
|
+
const [, fn, position, expected] = failure;
|
|
4052
|
+
const name = failingFieldRead(codec.compile(filter), Array.isArray(data), fn, Number(position));
|
|
4053
|
+
if (name === undefined)
|
|
4054
|
+
return;
|
|
4055
|
+
const present = availableFields(data);
|
|
4056
|
+
if (present.length === 0)
|
|
4057
|
+
return;
|
|
4058
|
+
const scope = `${countRecords(data)} record(s)`;
|
|
4059
|
+
if (!present.includes(name)) {
|
|
4060
|
+
return {
|
|
4061
|
+
detail: `${notFieldsOn([name], scope)}. Available fields: ${nameList(present)}.`,
|
|
4062
|
+
instructions: "Use a field the records have; names are case-sensitive."
|
|
4063
|
+
};
|
|
4064
|
+
}
|
|
4065
|
+
const records = Array.isArray(data) ? data : [data];
|
|
4066
|
+
const unset = records.filter((r) => r?.[name] == null).length;
|
|
4067
|
+
const field = fieldExpression(name);
|
|
4068
|
+
let fallback;
|
|
4069
|
+
if (expected.split(",").includes("string")) {
|
|
4070
|
+
fallback = "''";
|
|
4071
|
+
} else if (expected.split(",").includes("array")) {
|
|
4072
|
+
fallback = "`[]`";
|
|
4073
|
+
}
|
|
4074
|
+
return {
|
|
4075
|
+
detail: `\`${name}\` is null or missing on ${unset} of the ${scope} it read.`,
|
|
4076
|
+
instructions: fallback ? `Give it a default where ${fn}() reads it, e.g. \`${field} || ${fallback}\`.` : `Filter out the records where \`${name}\` is null before ${fn}() reads it.`
|
|
4077
|
+
};
|
|
4078
|
+
}
|
|
3969
4079
|
function buildFilterWarning(filter, data, outcome) {
|
|
3970
4080
|
const present = availableFields(data);
|
|
3971
4081
|
const refs = referencedFields(filter);
|
|
@@ -3973,7 +4083,7 @@ function buildFilterWarning(filter, data, outcome) {
|
|
|
3973
4083
|
const unchecked = refs.nested.filter((name) => !present.includes(name));
|
|
3974
4084
|
const count = countRecords(data);
|
|
3975
4085
|
const scope = `${count} record(s)`;
|
|
3976
|
-
const isNotAField = (names) =>
|
|
4086
|
+
const isNotAField = (names) => notFieldsOn(names, scope);
|
|
3977
4087
|
const soundness = unchecked.length > 0 ? `${nameList(unchecked)} ${unchecked.length === 1 ? "reads" : "read"} below the top level, so ${unchecked.length === 1 ? "it was" : "they were"} not checked against the record keys` : refs.top.length > 0 ? "every field it names exists" : "";
|
|
3978
4088
|
const withSoundness = (base) => soundness ? `${base}, and ${soundness}` : base;
|
|
3979
4089
|
let detail;
|
|
@@ -4024,7 +4134,8 @@ function applyFilter(data, filter, onWarning) {
|
|
|
4024
4134
|
try {
|
|
4025
4135
|
result = codec.search(data, filter);
|
|
4026
4136
|
} catch (err) {
|
|
4027
|
-
|
|
4137
|
+
const [, hint] = catchError(() => evaluationHint(codec, filter, data, err));
|
|
4138
|
+
throw new FilterEvaluationError(filter, err, hint);
|
|
4028
4139
|
}
|
|
4029
4140
|
const inputCount = countRecords(data);
|
|
4030
4141
|
const warn = (outcome) => {
|
|
@@ -4786,7 +4897,7 @@ Command.prototype.trackedAction = function(context, fn, properties) {
|
|
|
4786
4897
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
4787
4898
|
const typed = error;
|
|
4788
4899
|
const customInstructions = typeof typed.instructions === "string" ? typed.instructions : undefined;
|
|
4789
|
-
const customResult =
|
|
4900
|
+
const customResult = carriedResult(error);
|
|
4790
4901
|
const cancellationExitCode = typed.exitCode === 130 || isPromptCancellation(error) ? 130 : undefined;
|
|
4791
4902
|
const classified = cancellationExitCode === undefined ? await extractErrorDetails(error) : undefined;
|
|
4792
4903
|
const finalResult = customResult ?? classified?.result ?? RESULTS.Failure;
|
|
@@ -5175,6 +5286,8 @@ var FAILURE_STATUSES = new Set([
|
|
|
5175
5286
|
"canceled",
|
|
5176
5287
|
"stopped"
|
|
5177
5288
|
]);
|
|
5289
|
+
// ../common/src/relayed-output.ts
|
|
5290
|
+
var RELAYED_OUTPUT_SYMBOL = Symbol.for("@uipath/common/relayed-output");
|
|
5178
5291
|
// ../common/src/screen-logger.ts
|
|
5179
5292
|
var ScreenLogger;
|
|
5180
5293
|
((ScreenLogger) => {
|
|
@@ -5200,6 +5313,6 @@ function unsupportedSolutionProjectType(projectType) {
|
|
|
5200
5313
|
var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
|
|
5201
5314
|
// ../common/src/tool-provider.ts
|
|
5202
5315
|
var factorySlot = singleton("PackagerFactoryProvider");
|
|
5203
|
-
export { NodeFileSystem, getFileSystem,
|
|
5316
|
+
export { NodeFileSystem, getFileSystem, Command, Option, logger, DebugTelemetryProvider, NodeContextStorage, SuccessOutput, FailureOutput, OutputFormatter, configureProjectTelemetry, getProjectTelemetryCapture, createProjectCommandResolver, processContext, registerPackageMetadataOptions, mapPackageMetadataOptions, quoteForShell, unsupportedSolutionProjectType };
|
|
5204
5317
|
|
|
5205
|
-
//# debugId=
|
|
5318
|
+
//# debugId=BF35AF7DA4347F2F64756E2164756E21
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolsFactoryRepository
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-3krn4ar5.js";
|
|
4
4
|
import {
|
|
5
5
|
ApiWorkflowToolFactory2
|
|
6
|
-
} from "./packager-tool-
|
|
6
|
+
} from "./packager-tool-f5s12jc4.js";
|
|
7
7
|
|
|
8
8
|
// src/packager-tool.ts
|
|
9
9
|
function registerPackagerFactories2() {
|