@uipath/api-workflow-tool 1.205.0-preview.281 → 1.206.0-preview.282
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/README.md +41 -0
- package/dist/THIRD-PARTY-NOTICES.md +64 -3
- package/dist/applicationinsights-web-8m26566f.js +17209 -0
- package/dist/executor-tool.js +7 -9
- package/dist/index-3d09whjq.js +11 -0
- package/dist/{index-waq4trz1.js → index-njewr1c3.js} +5040 -2961
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-yt5v9h00.js +10 -0
- package/dist/index.js +14 -15
- package/dist/index.umd.min-ttg1qc0x.js +7814 -0
- package/dist/{jmespath-e4a59c8w.js → jmespath-wwym30dp.js} +1 -1
- package/dist/js-yaml-0c4svjwq.js +36 -0
- package/dist/{node-h15a24qv.js → node-zztvrk2t.js} +13 -90
- package/dist/{packager-tool-vkwnwekw.js → packager-tool-1nnth06m.js} +62 -586
- package/dist/{packager-tool-bgy9gdsp.js → packager-tool-2ckhrf4j.js} +128 -15
- package/dist/{packager-tool-kh3aq9n7.js → packager-tool-2wwd7kp4.js} +920 -903
- package/dist/{packager-tool-xak3m9vd.js → packager-tool-3hcrfsc1.js} +762 -384
- package/dist/{packager-tool-0aacqssr.js → packager-tool-5b6vjjp3.js} +371 -371
- package/dist/{packager-tool-d3w0wn6k.js → packager-tool-5gce5wfd.js} +16 -16
- package/dist/{packager-tool-f7zta1kg.js → packager-tool-61bdk9sn.js} +203 -156
- package/dist/{packager-tool-1yh8g550.js → packager-tool-6an893wm.js} +12 -3
- package/dist/{packager-tool-gcky1aet.js → packager-tool-mrs9rvjg.js} +361 -205
- package/dist/{packager-tool-evd1kzq2.js → packager-tool-qhv22qaj.js} +809 -380
- package/dist/packager-tool-rqprykf5.js +15 -0
- package/dist/packager-tool.js +6 -6
- package/dist/tool.js +13 -14
- package/package.json +2 -2
- package/dist/index-xvt0604x.js +0 -72
- package/dist/index.umd.min-fqefd9kn.js +0 -7814
- package/dist/js-yaml-69tsdrrf.js +0 -37
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
I18nManager,
|
|
3
|
-
NugetConstants,
|
|
4
|
-
NugetPackager,
|
|
5
2
|
Path,
|
|
6
|
-
ProjectTool,
|
|
7
3
|
TemporaryStorageService,
|
|
4
|
+
I18nManager,
|
|
5
|
+
translate,
|
|
6
|
+
NugetConstants,
|
|
8
7
|
ToolResult,
|
|
9
8
|
ensureContentOperateFile,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
NugetPackager,
|
|
10
|
+
readIdentityJson,
|
|
11
|
+
readIdentityField,
|
|
12
|
+
ProjectTool
|
|
13
|
+
} from "./packager-tool-61bdk9sn.js";
|
|
13
14
|
// ../packager/packager-tool-apiworkflow/src/i18n/locales/de.json
|
|
14
15
|
var de_default = {
|
|
15
16
|
toolApiworkflow: {
|
|
@@ -515,18 +516,130 @@ class ApiWorkflowsTool extends ProjectTool {
|
|
|
515
516
|
}
|
|
516
517
|
}
|
|
517
518
|
|
|
519
|
+
// ../packager/packager-tool-apiworkflow/src/project-identity.ts
|
|
520
|
+
var MANIFEST_FILES = ["project.uiproj", "project.json"];
|
|
521
|
+
var PROJECT_ID_PATH = ["document", "tags", "projectId"];
|
|
522
|
+
function isRecord(value) {
|
|
523
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
524
|
+
}
|
|
525
|
+
function asRecord(value) {
|
|
526
|
+
return isRecord(value) ? value : undefined;
|
|
527
|
+
}
|
|
528
|
+
function declaredType(value) {
|
|
529
|
+
return value === undefined ? undefined : String(value);
|
|
530
|
+
}
|
|
531
|
+
async function sourceManifest(root, fs) {
|
|
532
|
+
const [modernFile, classicFile] = MANIFEST_FILES;
|
|
533
|
+
const modern = await readIdentityJson(fs, fs.path.join(root, modernFile));
|
|
534
|
+
if (modern)
|
|
535
|
+
return {
|
|
536
|
+
type: declaredType(modern.ProjectType ?? modern.type),
|
|
537
|
+
main: typeof modern.MainFile === "string" ? modern.MainFile : undefined
|
|
538
|
+
};
|
|
539
|
+
const classic = await readIdentityJson(fs, fs.path.join(root, classicFile));
|
|
540
|
+
const design = asRecord(classic?.designOptions);
|
|
541
|
+
return {
|
|
542
|
+
type: declaredType(design?.outputType ?? classic?.ProjectType ?? classic?.type),
|
|
543
|
+
main: typeof classic?.main === "string" ? classic.main : undefined
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
async function mainWorkflow(root, fs) {
|
|
547
|
+
const manifest = await sourceManifest(root, fs);
|
|
548
|
+
const main = manifest.main?.trim() ? manifest.main : "Workflow.json";
|
|
549
|
+
const file = fs.path.resolve(root, main);
|
|
550
|
+
const relative = fs.path.relative(root, file);
|
|
551
|
+
if (relative === ".." || relative.startsWith("../") || relative.startsWith("..\\") || fs.path.isAbsolute(relative)) {
|
|
552
|
+
throw new Error("Invalid API workflow main file");
|
|
553
|
+
}
|
|
554
|
+
return file;
|
|
555
|
+
}
|
|
556
|
+
var unresolved = (status) => ({
|
|
557
|
+
projectType: "Api" /* Api */,
|
|
558
|
+
status
|
|
559
|
+
});
|
|
560
|
+
async function findProjectDirectory(file, fs) {
|
|
561
|
+
try {
|
|
562
|
+
let directory = fs.path.dirname(fs.path.resolve(file));
|
|
563
|
+
while (true) {
|
|
564
|
+
for (const name of MANIFEST_FILES) {
|
|
565
|
+
if (await fs.exists(fs.path.join(directory, name))) {
|
|
566
|
+
const manifest = await sourceManifest(directory, fs);
|
|
567
|
+
return manifest.type === "Api" /* Api */ ? directory : undefined;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
const parent = fs.path.dirname(directory);
|
|
571
|
+
if (parent === directory)
|
|
572
|
+
return;
|
|
573
|
+
directory = parent;
|
|
574
|
+
}
|
|
575
|
+
} catch {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
var readProjectIdentity2 = async (target, fs) => {
|
|
580
|
+
try {
|
|
581
|
+
const path = fs.path.resolve(target);
|
|
582
|
+
const stat = await fs.stat(path);
|
|
583
|
+
if (!stat)
|
|
584
|
+
return unresolved("missing");
|
|
585
|
+
if (stat.isFile() && path.endsWith(".uip"))
|
|
586
|
+
return unresolved("missing");
|
|
587
|
+
const isManifest = MANIFEST_FILES.includes(fs.path.basename(path));
|
|
588
|
+
const root = stat.isFile() ? fs.path.dirname(path) : path;
|
|
589
|
+
if (stat.isDirectory() || isManifest) {
|
|
590
|
+
const manifest = await sourceManifest(root, fs);
|
|
591
|
+
if (manifest.type !== undefined && manifest.type !== "Api" /* Api */)
|
|
592
|
+
return unresolved("unsupported");
|
|
593
|
+
return {
|
|
594
|
+
...await readWorkflowIdentity(await mainWorkflow(root, fs), fs),
|
|
595
|
+
projectDirectory: root
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
return {
|
|
599
|
+
...await readWorkflowIdentity(path, fs),
|
|
600
|
+
projectDirectory: await findProjectDirectory(path, fs)
|
|
601
|
+
};
|
|
602
|
+
} catch {
|
|
603
|
+
return unresolved("invalid");
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
async function readWorkflowIdentity(path, fs) {
|
|
607
|
+
try {
|
|
608
|
+
if (path.endsWith(".yaml") || path.endsWith(".yml"))
|
|
609
|
+
return await readYamlIdentity(path, fs);
|
|
610
|
+
const id = await readIdentityField(fs, path, PROJECT_ID_PATH);
|
|
611
|
+
return id ? { projectType: "Api" /* Api */, id, status: "resolved" } : unresolved("missing");
|
|
612
|
+
} catch {
|
|
613
|
+
return unresolved("invalid");
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
async function readYamlIdentity(path, fs) {
|
|
617
|
+
const stat = await fs.stat(path);
|
|
618
|
+
if (!stat)
|
|
619
|
+
return unresolved("missing");
|
|
620
|
+
if (!stat.isFile() || stat.size > 1024 * 1024)
|
|
621
|
+
return unresolved("invalid");
|
|
622
|
+
const { load } = await import("./js-yaml-0c4svjwq.js");
|
|
623
|
+
let value = load(await fs.readFile(path, "utf-8") ?? "");
|
|
624
|
+
for (const field of PROJECT_ID_PATH)
|
|
625
|
+
value = asRecord(value)?.[field];
|
|
626
|
+
if (value === undefined || value === null || value === "")
|
|
627
|
+
return unresolved("missing");
|
|
628
|
+
return typeof value === "string" && value.trim() ? {
|
|
629
|
+
projectType: "Api" /* Api */,
|
|
630
|
+
id: value,
|
|
631
|
+
status: "resolved"
|
|
632
|
+
} : unresolved("invalid");
|
|
633
|
+
}
|
|
634
|
+
|
|
518
635
|
// ../packager/packager-tool-apiworkflow/src/api-workflow-tool-factory.ts
|
|
519
|
-
class
|
|
636
|
+
class ApiWorkflowToolFactory2 {
|
|
637
|
+
readProjectIdentityAsync = readProjectIdentity2;
|
|
520
638
|
supportedTypes = ["Api" /* Api */];
|
|
521
639
|
async createAsync(logger, fileSystem) {
|
|
522
640
|
return new ApiWorkflowsTool(fileSystem, logger);
|
|
523
641
|
}
|
|
524
642
|
}
|
|
525
|
-
|
|
526
|
-
function registerPackagerFactories() {
|
|
527
|
-
toolsFactoryRepository.registerProjectToolFactory(new ApiWorkflowToolFactory);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
export { registerPackagerFactories };
|
|
643
|
+
export { readProjectIdentity2, ApiWorkflowToolFactory2 };
|
|
531
644
|
|
|
532
|
-
//# debugId=
|
|
645
|
+
//# debugId=98CBDBCD3FEB3F9564756E2164756E21
|