@uipath/solution-tool 1.201.0-preview.133 → 1.202.0-preview.134
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/deploy.d.ts +6 -1
- package/dist/deploy.js +15 -16
- package/dist/{index-2fj08e7n.js → index-gpd94m28.js} +27 -27
- package/dist/{index-w03qc9m8.js → index-sby22td6.js} +4 -4
- package/dist/index.js +16 -19
- package/dist/init.js +10 -13
- package/dist/{js-yaml-4ypbq2tt.js → js-yaml-b2jq67kn.js} +16 -16
- package/dist/{list-skbehtq2.js → list-3mrc9s3f.js} +7 -11
- package/dist/models/pack-command-types.d.ts +8 -0
- package/dist/pack.js +9 -12
- package/dist/{packager-tool-krd5v2r5.js → packager-tool-0qva0ebq.js} +129 -53
- package/dist/{packager-tool-0v6na3yp.js → packager-tool-1de529jm.js} +9 -7
- package/dist/{packager-tool-9vehmnke.js → packager-tool-3hbsdwjm.js} +6 -661
- package/dist/{packager-tool-fzwxq48d.js → packager-tool-3y92zbg2.js} +3 -3
- package/dist/{packager-tool-f7kj5fpa.js → packager-tool-5pfxgc8z.js} +19 -11
- package/dist/{packager-tool-9w3k4e77.js → packager-tool-b16qemg2.js} +494 -198
- package/dist/{packager-tool-zbp5p149.js → packager-tool-bahvrjbv.js} +592 -264
- package/dist/{packager-tool-129wn232.js → packager-tool-dfrk01gn.js} +198 -2
- package/dist/{packager-tool-67ssxgph.js → packager-tool-fh8pb2th.js} +3 -5
- package/dist/{packager-tool-c29pg93e.js → packager-tool-hc6ybtdw.js} +5 -5
- package/dist/{packager-tool-bcpknnr8.js → packager-tool-hgx66d1p.js} +1656 -558
- package/dist/{packager-tool-2yz7m5ny.js → packager-tool-nq2nq71y.js} +21282 -20197
- package/dist/{packager-tool-wjhn59ft.js → packager-tool-t89r1edr.js} +596 -180
- package/dist/{packager-tool-vpr77gre.js → packager-tool-x3ehbhsn.js} +3 -2
- package/dist/{packager-tool-yktm4v4r.js → packager-tool-xntjj1bt.js} +1 -1
- package/dist/packager-tool.d.ts +4 -3
- package/dist/packager-tool.js +4 -4
- package/dist/publish.js +8 -11
- package/dist/resource.js +7 -10
- package/dist/services/activation.d.ts +9 -1
- package/dist/services/deploy-run-service.d.ts +25 -1
- package/dist/services/deploy-uninstall-service.d.ts +20 -1
- package/dist/services/deploy-upgrade-service.d.ts +94 -0
- package/dist/services/deployment-feed-locator.d.ts +36 -0
- package/dist/services/deployment-search.d.ts +88 -7
- package/dist/services/pack-command-service.d.ts +15 -0
- package/dist/services/package-metadata-rewrite.d.ts +9 -5
- package/dist/services/publish-service.d.ts +11 -9
- package/dist/services/solution-path.d.ts +34 -0
- package/dist/templates/AGENTS.md +183 -16
- package/dist/tool.js +18 -21
- package/package.json +2 -2
- package/dist/browser-strategy-yccf8mtd.js +0 -99
- package/dist/node-strategy-12qfy0nv.js +0 -348
- package/dist/packager-tool-5arsyj36.js +0 -11
- package/dist/packager-tool-7eva0peq.js +0 -265
- package/dist/packager-tool-9qecd4wb.js +0 -14
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolsFactoryRepository
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-x3ehbhsn.js";
|
|
4
4
|
import {
|
|
5
5
|
unzipSync,
|
|
6
6
|
zipSync
|
|
7
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-dfrk01gn.js";
|
|
8
8
|
|
|
9
9
|
// ../packager/packager-core/dist/index.js
|
|
10
10
|
class Path {
|
|
@@ -1067,6 +1067,7 @@ var ProjectTypes;
|
|
|
1067
1067
|
((ProjectTypes2) => {
|
|
1068
1068
|
ProjectTypes2["Agent"] = "Agent";
|
|
1069
1069
|
ProjectTypes2["Api"] = "Api";
|
|
1070
|
+
ProjectTypes2["BusinessRules"] = "BusinessRules";
|
|
1070
1071
|
ProjectTypes2["Connector"] = "Connector";
|
|
1071
1072
|
ProjectTypes2["CaseManagement"] = "CaseManagement";
|
|
1072
1073
|
ProjectTypes2["Flow"] = "Flow";
|
|
@@ -1419,7 +1420,8 @@ class ToolsFactoryRepository {
|
|
|
1419
1420
|
getProjectToolFactory(projectType) {
|
|
1420
1421
|
const factory = this.projectFactoryMap.get(projectType);
|
|
1421
1422
|
if (!factory) {
|
|
1422
|
-
|
|
1423
|
+
const known = [...this.projectFactoryMap.keys()].join(", ");
|
|
1424
|
+
throw new Error(`Cannot pack project type '${projectType}': no packager is installed for it. ` + `Project types that can be packed: ${known || "none"}.`);
|
|
1423
1425
|
}
|
|
1424
1426
|
return factory;
|
|
1425
1427
|
}
|
|
@@ -1568,662 +1570,6 @@ class ConnectorToolFactory {
|
|
|
1568
1570
|
return new ConnectorTool(fileSystem, logger);
|
|
1569
1571
|
}
|
|
1570
1572
|
}
|
|
1571
|
-
// ../packager/packager-tool-webapp/src/models/webapp-manifest.ts
|
|
1572
|
-
var WebAppVariantType;
|
|
1573
|
-
((WebAppVariantType2) => {
|
|
1574
|
-
WebAppVariantType2["Coded"] = "Coded";
|
|
1575
|
-
WebAppVariantType2["JS"] = "JS";
|
|
1576
|
-
})(WebAppVariantType ||= {});
|
|
1577
|
-
var WEBAPP_MANIFEST_FILE_NAME = "webAppManifest.json";
|
|
1578
|
-
// ../packager/packager-tool-webapp/src/constants.ts
|
|
1579
|
-
var PROJECT_JSON_FILE = "project.json";
|
|
1580
|
-
var DEFAULT_BUNDLE_PATH = "source/dist";
|
|
1581
|
-
var APP_FOLDER_NAME = ".app";
|
|
1582
|
-
var CONTENT_APP_FOLDER_NAME = "app";
|
|
1583
|
-
var TARGET_RUNTIME = "Coded";
|
|
1584
|
-
var TARGET_JS_RUNTIME = "JS";
|
|
1585
|
-
var DEFAULT_ENTRY_POINT_TYPE = "api";
|
|
1586
|
-
var ERROR_MESSAGES = {
|
|
1587
|
-
MANIFEST_NOT_FOUND: (file) => `WebApp manifest not found: ${file}. This file is required for WebApp projects.`,
|
|
1588
|
-
PROJECT_JSON_FOUND: "project.json found in WebApp project. The WebApp tool only supports Coded web apps without project.json.",
|
|
1589
|
-
MANIFEST_LOAD_FAILED: (file) => `Failed to load or parse ${file}`,
|
|
1590
|
-
BUNDLE_NOT_FOUND: (path) => `Compiled bundle not found at ${path}. Ensure the project is built before packing.`,
|
|
1591
|
-
BUNDLE_NOT_DIRECTORY: (path) => `Bundle path ${path} exists but is not a directory.`,
|
|
1592
|
-
APP_FOLDER_NOT_FOUND: (path) => `.app folder not found at ${path}. Ensure the project contains a .app folder.`,
|
|
1593
|
-
APP_FOLDER_NOT_DIRECTORY: (path) => `.app path ${path} exists but is not a directory.`,
|
|
1594
|
-
BUILD_NOT_SUPPORTED: "Build execution (isCompiled=false) is not yet supported. Please build the project manually and set isCompiled=true.",
|
|
1595
|
-
VALIDATION_FAILED: (context) => `Validation failed: ${context}`,
|
|
1596
|
-
PACKING_FAILED: (context) => `An error occurred while packing WebApp project: ${context}`,
|
|
1597
|
-
PACKAGE_NAME_REQUIRED: "Package name is required",
|
|
1598
|
-
PACKAGE_VERSION_REQUIRED: "Package version is required",
|
|
1599
|
-
PROJECT_PATH_REQUIRED: "Project path is required",
|
|
1600
|
-
OUTPUT_PATH_REQUIRED: "Output path is required"
|
|
1601
|
-
};
|
|
1602
|
-
|
|
1603
|
-
// ../packager/packager-tool-webapp/src/utils/fs-helpers.ts
|
|
1604
|
-
async function copyDirectoryAsync(fileSystem, sourcePath, destinationPath) {
|
|
1605
|
-
await fileSystem.mkdir(destinationPath);
|
|
1606
|
-
const entries = await fileSystem.readdir(sourcePath);
|
|
1607
|
-
for (const entry of entries) {
|
|
1608
|
-
const sourceEntry = Path.join(sourcePath, entry);
|
|
1609
|
-
const destEntry = Path.join(destinationPath, entry);
|
|
1610
|
-
const stat = await fileSystem.stat(sourceEntry);
|
|
1611
|
-
if (stat?.isDirectory()) {
|
|
1612
|
-
await copyDirectoryAsync(fileSystem, sourceEntry, destEntry);
|
|
1613
|
-
} else if (stat?.isFile()) {
|
|
1614
|
-
const content = await fileSystem.readFile(sourceEntry);
|
|
1615
|
-
if (content) {
|
|
1616
|
-
await fileSystem.writeFile(destEntry, content);
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
|
|
1622
|
-
// ../packager/packager-tool-webapp/src/utils/manifest-loader.ts
|
|
1623
|
-
async function loadWebAppManifest(fileSystem, projectPath) {
|
|
1624
|
-
const manifestPath = Path.join(projectPath, WEBAPP_MANIFEST_FILE_NAME);
|
|
1625
|
-
const exists = await fileSystem.exists(manifestPath);
|
|
1626
|
-
if (!exists) {
|
|
1627
|
-
return null;
|
|
1628
|
-
}
|
|
1629
|
-
const content = await fileSystem.readFile(manifestPath);
|
|
1630
|
-
if (!content) {
|
|
1631
|
-
return null;
|
|
1632
|
-
}
|
|
1633
|
-
try {
|
|
1634
|
-
const text = new TextDecoder().decode(content);
|
|
1635
|
-
const manifest = JSON.parse(text);
|
|
1636
|
-
return manifest;
|
|
1637
|
-
} catch (error) {
|
|
1638
|
-
throw new Error(`Failed to parse ${WEBAPP_MANIFEST_FILE_NAME}: ${error instanceof Error ? error.message : String(error)}`);
|
|
1639
|
-
}
|
|
1640
|
-
}
|
|
1641
|
-
async function ensureWebAppProjectId(fileSystem, projectPath) {
|
|
1642
|
-
const manifest = await loadWebAppManifest(fileSystem, projectPath);
|
|
1643
|
-
if (manifest && typeof manifest.projectId === "string" && manifest.projectId.length > 0) {
|
|
1644
|
-
return manifest.projectId;
|
|
1645
|
-
}
|
|
1646
|
-
const id = crypto.randomUUID();
|
|
1647
|
-
if (manifest) {
|
|
1648
|
-
const updated = { ...manifest, projectId: id };
|
|
1649
|
-
const manifestPath = Path.join(projectPath, WEBAPP_MANIFEST_FILE_NAME);
|
|
1650
|
-
await fileSystem.writeFile(manifestPath, `${JSON.stringify(updated, null, 2)}
|
|
1651
|
-
`);
|
|
1652
|
-
}
|
|
1653
|
-
return id;
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
// ../packager/packager-tool-webapp/src/strategies/coded-app-strategy.ts
|
|
1657
|
-
class CodedAppStrategy {
|
|
1658
|
-
fileSystem;
|
|
1659
|
-
constructor(fileSystem) {
|
|
1660
|
-
this.fileSystem = fileSystem;
|
|
1661
|
-
}
|
|
1662
|
-
async validateAsync(args) {
|
|
1663
|
-
const { projectPath, manifest, logger } = args;
|
|
1664
|
-
const typed = manifest;
|
|
1665
|
-
let bundlePath = typed.config?.bundlePath;
|
|
1666
|
-
if (typeof bundlePath !== "string" || bundlePath.length === 0) {
|
|
1667
|
-
bundlePath = DEFAULT_BUNDLE_PATH;
|
|
1668
|
-
}
|
|
1669
|
-
const isCompiled = typed.config?.isCompiled ?? true;
|
|
1670
|
-
if (isCompiled) {
|
|
1671
|
-
const fullBundlePath = Path.join(projectPath, bundlePath);
|
|
1672
|
-
const exists = await this.fileSystem.exists(fullBundlePath);
|
|
1673
|
-
if (!exists) {
|
|
1674
|
-
const message = ERROR_MESSAGES.BUNDLE_NOT_FOUND(fullBundlePath);
|
|
1675
|
-
const warnable = logger;
|
|
1676
|
-
if (warnable?.warn) {
|
|
1677
|
-
warnable.warn(message);
|
|
1678
|
-
} else {
|
|
1679
|
-
logger?.info(`Warning: ${message}`);
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
}
|
|
1684
|
-
async packageAsync(args) {
|
|
1685
|
-
const { projectPath, manifest, outputPath, packageInfo, logger } = args;
|
|
1686
|
-
logger?.info(`Packaging Coded variant: ${packageInfo.id}@${packageInfo.version}`);
|
|
1687
|
-
let bundlePath = manifest.config?.bundlePath;
|
|
1688
|
-
if (typeof bundlePath !== "string" || bundlePath.length === 0) {
|
|
1689
|
-
bundlePath = DEFAULT_BUNDLE_PATH;
|
|
1690
|
-
}
|
|
1691
|
-
const isCompiled = manifest.config?.isCompiled ?? true;
|
|
1692
|
-
const fullBundlePath = Path.join(projectPath, bundlePath);
|
|
1693
|
-
if (isCompiled) {
|
|
1694
|
-
logger?.progress("Validating compiled bundle...");
|
|
1695
|
-
const bundleExists = await this.fileSystem.exists(fullBundlePath);
|
|
1696
|
-
if (!bundleExists) {
|
|
1697
|
-
throw new Error(ERROR_MESSAGES.BUNDLE_NOT_FOUND(fullBundlePath));
|
|
1698
|
-
}
|
|
1699
|
-
const bundleStat = await this.fileSystem.stat(fullBundlePath);
|
|
1700
|
-
if (!bundleStat?.isDirectory()) {
|
|
1701
|
-
throw new Error(ERROR_MESSAGES.BUNDLE_NOT_DIRECTORY(fullBundlePath));
|
|
1702
|
-
}
|
|
1703
|
-
} else {
|
|
1704
|
-
logger?.info("Build mode (isCompiled=false) is not yet implemented in v1.");
|
|
1705
|
-
throw new Error(ERROR_MESSAGES.BUILD_NOT_SUPPORTED);
|
|
1706
|
-
}
|
|
1707
|
-
const localBuildFolder = Path.join(outputPath, NugetConstants.OutputFolderName);
|
|
1708
|
-
const contentFolder = Path.join(localBuildFolder, NugetConstants.ContentFolderName);
|
|
1709
|
-
await this.fileSystem.mkdir(contentFolder);
|
|
1710
|
-
try {
|
|
1711
|
-
logger?.progress("Copying bundle to content folder...");
|
|
1712
|
-
await copyDirectoryAsync(this.fileSystem, fullBundlePath, contentFolder);
|
|
1713
|
-
logger?.progress("Preparing metadata files...");
|
|
1714
|
-
await this.prepareMetadataFiles(localBuildFolder, contentFolder, packageInfo, manifest, projectPath);
|
|
1715
|
-
logger?.progress("Creating NuGet package...");
|
|
1716
|
-
const nupkgFileName = `${packageInfo.id}.${packageInfo.version}.nupkg`;
|
|
1717
|
-
const nupkgPath = Path.join(outputPath, nupkgFileName);
|
|
1718
|
-
const packager = new NugetPackager(this.fileSystem);
|
|
1719
|
-
const result = await packager.packAsync(localBuildFolder, packageInfo, nupkgPath);
|
|
1720
|
-
logger?.info(`Package created successfully: ${result.outputPath}`);
|
|
1721
|
-
return result.outputPath;
|
|
1722
|
-
} finally {
|
|
1723
|
-
try {
|
|
1724
|
-
await this.fileSystem.rm(localBuildFolder);
|
|
1725
|
-
} catch (cleanupError) {
|
|
1726
|
-
logger?.error(`Failed to cleanup build folder: ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`);
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
async prepareMetadataFiles(_localBuildFolder, contentFolder, _packageInfo, _manifest, projectPath) {
|
|
1731
|
-
let mainFile = "index.html";
|
|
1732
|
-
const indexHtmlPath = Path.join(contentFolder, "index.html");
|
|
1733
|
-
const indexHtmlExists = await this.fileSystem.exists(indexHtmlPath);
|
|
1734
|
-
if (!indexHtmlExists) {
|
|
1735
|
-
const possibleEntries = ["index.html", "main.html", "app.html"];
|
|
1736
|
-
for (const entry of possibleEntries) {
|
|
1737
|
-
const entryPath = Path.join(contentFolder, entry);
|
|
1738
|
-
if (await this.fileSystem.exists(entryPath)) {
|
|
1739
|
-
mainFile = entry;
|
|
1740
|
-
break;
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
const operatePath = Path.join(contentFolder, NugetConstants.OperateFileName);
|
|
1745
|
-
const operateModel = {
|
|
1746
|
-
projectId: await ensureWebAppProjectId(this.fileSystem, projectPath),
|
|
1747
|
-
main: mainFile,
|
|
1748
|
-
contentType: ProjectTypes.WebApp,
|
|
1749
|
-
targetFramework: TargetFramework.Portable,
|
|
1750
|
-
targetRuntime: TARGET_RUNTIME,
|
|
1751
|
-
runtimeOptions: {
|
|
1752
|
-
requiresUserInteraction: false,
|
|
1753
|
-
isAttended: false
|
|
1754
|
-
}
|
|
1755
|
-
};
|
|
1756
|
-
const operateJson = JSON.stringify(operateModel, null, 2);
|
|
1757
|
-
await this.fileSystem.writeFile(operatePath, operateJson);
|
|
1758
|
-
const manifestSourcePath = Path.join(projectPath, WEBAPP_MANIFEST_FILE_NAME);
|
|
1759
|
-
const manifestDestPath = Path.join(contentFolder, WEBAPP_MANIFEST_FILE_NAME);
|
|
1760
|
-
const manifestExists = await this.fileSystem.exists(manifestSourcePath);
|
|
1761
|
-
if (manifestExists) {
|
|
1762
|
-
const manifestContent = await this.fileSystem.readFile(manifestSourcePath, "utf-8");
|
|
1763
|
-
if (manifestContent) {
|
|
1764
|
-
await this.fileSystem.writeFile(manifestDestPath, manifestContent);
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
const uipathJsonSourcePath = Path.join(projectPath, "uipath.json");
|
|
1768
|
-
const uipathJsonDestPath = Path.join(contentFolder, "uipath.json");
|
|
1769
|
-
const uipathJsonExists = await this.fileSystem.exists(uipathJsonSourcePath);
|
|
1770
|
-
if (uipathJsonExists) {
|
|
1771
|
-
const uipathJsonContent = await this.fileSystem.readFile(uipathJsonSourcePath, "utf-8");
|
|
1772
|
-
if (uipathJsonContent) {
|
|
1773
|
-
await this.fileSystem.writeFile(uipathJsonDestPath, uipathJsonContent);
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
const actionSchemaSourcePath = Path.join(projectPath, "action-schema.json");
|
|
1777
|
-
const actionSchemaDestPath = Path.join(contentFolder, "action-schema.json");
|
|
1778
|
-
const actionSchemaExists = await this.fileSystem.exists(actionSchemaSourcePath);
|
|
1779
|
-
if (actionSchemaExists) {
|
|
1780
|
-
const actionSchemaContent = await this.fileSystem.readFile(actionSchemaSourcePath, "utf-8");
|
|
1781
|
-
if (actionSchemaContent) {
|
|
1782
|
-
await this.fileSystem.writeFile(actionSchemaDestPath, actionSchemaContent);
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
const bindingsPath = Path.join(contentFolder, "bindings.json");
|
|
1786
|
-
const bindingsExists = await this.fileSystem.exists(bindingsPath);
|
|
1787
|
-
if (!bindingsExists) {
|
|
1788
|
-
const bindingsJson = JSON.stringify({
|
|
1789
|
-
version: "1.0",
|
|
1790
|
-
resources: []
|
|
1791
|
-
}, null, 2);
|
|
1792
|
-
await this.fileSystem.writeFile(bindingsPath, bindingsJson);
|
|
1793
|
-
}
|
|
1794
|
-
const bindingsV2Path = Path.join(contentFolder, "bindings_v2.json");
|
|
1795
|
-
const bindingsCandidatePaths = [
|
|
1796
|
-
Path.join(projectPath, "source", "bindings_v2.json"),
|
|
1797
|
-
Path.join(projectPath, "source", "bindings.json"),
|
|
1798
|
-
Path.join(projectPath, "bindings.json"),
|
|
1799
|
-
Path.join(projectPath, "bindings_v2.json")
|
|
1800
|
-
];
|
|
1801
|
-
let bindingsV2Json = null;
|
|
1802
|
-
for (const candidate of bindingsCandidatePaths) {
|
|
1803
|
-
if (await this.fileSystem.exists(candidate)) {
|
|
1804
|
-
bindingsV2Json = await this.fileSystem.readFile(candidate, "utf-8");
|
|
1805
|
-
if (bindingsV2Json)
|
|
1806
|
-
break;
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
if (!bindingsV2Json && await this.fileSystem.exists(bindingsV2Path)) {
|
|
1810
|
-
bindingsV2Json = await this.fileSystem.readFile(bindingsV2Path, "utf-8");
|
|
1811
|
-
}
|
|
1812
|
-
if (!bindingsV2Json) {
|
|
1813
|
-
bindingsV2Json = JSON.stringify({
|
|
1814
|
-
version: "2.0",
|
|
1815
|
-
resources: []
|
|
1816
|
-
}, null, 2);
|
|
1817
|
-
}
|
|
1818
|
-
await this.fileSystem.writeFile(bindingsV2Path, bindingsV2Json);
|
|
1819
|
-
const entryPointsPath = Path.join(contentFolder, "entry-points.json");
|
|
1820
|
-
const projectEntryPointsPath = Path.join(projectPath, "entry-points.json");
|
|
1821
|
-
let entryPointsContent;
|
|
1822
|
-
const projectEntryPointsExists = await this.fileSystem.exists(projectEntryPointsPath);
|
|
1823
|
-
if (projectEntryPointsExists) {
|
|
1824
|
-
const entryPointsData = await this.fileSystem.readFile(projectEntryPointsPath, "utf-8");
|
|
1825
|
-
if (entryPointsData) {
|
|
1826
|
-
entryPointsContent = entryPointsData;
|
|
1827
|
-
} else {
|
|
1828
|
-
entryPointsContent = this.createDefaultEntryPoints(mainFile);
|
|
1829
|
-
}
|
|
1830
|
-
} else {
|
|
1831
|
-
entryPointsContent = this.createDefaultEntryPoints(mainFile);
|
|
1832
|
-
}
|
|
1833
|
-
await this.fileSystem.writeFile(entryPointsPath, entryPointsContent);
|
|
1834
|
-
const packageDescriptorPath = Path.join(contentFolder, NugetConstants.PackageDescriptorFileName);
|
|
1835
|
-
const packageDescriptor = {
|
|
1836
|
-
$schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
|
|
1837
|
-
files: {
|
|
1838
|
-
[NugetConstants.OperateFileName]: Path.join(NugetConstants.ContentFolderName, NugetConstants.OperateFileName),
|
|
1839
|
-
"entry-points.json": Path.join(NugetConstants.ContentFolderName, "entry-points.json"),
|
|
1840
|
-
"bindings.json": Path.join(NugetConstants.ContentFolderName, "bindings_v2.json")
|
|
1841
|
-
}
|
|
1842
|
-
};
|
|
1843
|
-
const packageDescriptorJson = JSON.stringify(packageDescriptor, null, 2);
|
|
1844
|
-
await this.fileSystem.writeFile(packageDescriptorPath, packageDescriptorJson);
|
|
1845
|
-
}
|
|
1846
|
-
createDefaultEntryPoints(mainFile) {
|
|
1847
|
-
const uniqueId = this.generateUniqueId();
|
|
1848
|
-
const entryPoints = {
|
|
1849
|
-
$schema: "https://cloud.uipath.com/draft/2024-12/entry-point",
|
|
1850
|
-
$id: "entry-points-doc-001",
|
|
1851
|
-
entryPoints: [
|
|
1852
|
-
{
|
|
1853
|
-
filePath: mainFile,
|
|
1854
|
-
uniqueId,
|
|
1855
|
-
type: DEFAULT_ENTRY_POINT_TYPE,
|
|
1856
|
-
input: {
|
|
1857
|
-
amount: { type: "integer" },
|
|
1858
|
-
id: { type: "string" }
|
|
1859
|
-
},
|
|
1860
|
-
output: {
|
|
1861
|
-
status: { type: "string" }
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
]
|
|
1865
|
-
};
|
|
1866
|
-
return JSON.stringify(entryPoints, null, 2);
|
|
1867
|
-
}
|
|
1868
|
-
generateUniqueId() {
|
|
1869
|
-
const randomBytes = new Uint8Array(16);
|
|
1870
|
-
if (typeof crypto !== "undefined" && crypto.getRandomValues) {
|
|
1871
|
-
crypto.getRandomValues(randomBytes);
|
|
1872
|
-
} else {
|
|
1873
|
-
throw new Error("crypto.getRandomValues is not available");
|
|
1874
|
-
}
|
|
1875
|
-
randomBytes[6] = randomBytes[6] & 15 | 64;
|
|
1876
|
-
randomBytes[8] = randomBytes[8] & 63 | 128;
|
|
1877
|
-
const hex = Array.from(randomBytes).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
1878
|
-
return [
|
|
1879
|
-
hex.substring(0, 8),
|
|
1880
|
-
hex.substring(8, 12),
|
|
1881
|
-
hex.substring(12, 16),
|
|
1882
|
-
hex.substring(16, 20),
|
|
1883
|
-
hex.substring(20, 32)
|
|
1884
|
-
].join("-");
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
// ../packager/packager-tool-webapp/src/strategies/js-apps-strategy.ts
|
|
1889
|
-
class JsAppsStrategy {
|
|
1890
|
-
fileSystem;
|
|
1891
|
-
constructor(fileSystem) {
|
|
1892
|
-
this.fileSystem = fileSystem;
|
|
1893
|
-
}
|
|
1894
|
-
async validateAsync(args) {
|
|
1895
|
-
const { projectPath, logger } = args;
|
|
1896
|
-
const appFolder = Path.join(projectPath, APP_FOLDER_NAME);
|
|
1897
|
-
const exists = await this.fileSystem.exists(appFolder);
|
|
1898
|
-
if (!exists) {
|
|
1899
|
-
const message = ERROR_MESSAGES.APP_FOLDER_NOT_FOUND(appFolder);
|
|
1900
|
-
if (logger?.warn) {
|
|
1901
|
-
logger.warn(message);
|
|
1902
|
-
} else {
|
|
1903
|
-
logger?.info(`Warning: ${message}`);
|
|
1904
|
-
}
|
|
1905
|
-
return;
|
|
1906
|
-
}
|
|
1907
|
-
const stat = await this.fileSystem.stat(appFolder);
|
|
1908
|
-
if (!stat?.isDirectory()) {
|
|
1909
|
-
const message = ERROR_MESSAGES.APP_FOLDER_NOT_DIRECTORY(appFolder);
|
|
1910
|
-
if (logger?.warn) {
|
|
1911
|
-
logger.warn(message);
|
|
1912
|
-
} else {
|
|
1913
|
-
logger?.info(`Warning: ${message}`);
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
async packageAsync(args) {
|
|
1918
|
-
const { projectPath, manifest, outputPath, packageInfo, logger } = args;
|
|
1919
|
-
logger?.info(`Packaging JS variant: ${packageInfo.id}@${packageInfo.version}`);
|
|
1920
|
-
const appFolder = Path.join(projectPath, APP_FOLDER_NAME);
|
|
1921
|
-
logger?.progress("Validating .app folder...");
|
|
1922
|
-
const appFolderExists = await this.fileSystem.exists(appFolder);
|
|
1923
|
-
if (!appFolderExists) {
|
|
1924
|
-
throw new Error(ERROR_MESSAGES.APP_FOLDER_NOT_FOUND(appFolder));
|
|
1925
|
-
}
|
|
1926
|
-
const appFolderStat = await this.fileSystem.stat(appFolder);
|
|
1927
|
-
if (!appFolderStat?.isDirectory()) {
|
|
1928
|
-
throw new Error(ERROR_MESSAGES.APP_FOLDER_NOT_DIRECTORY(appFolder));
|
|
1929
|
-
}
|
|
1930
|
-
const localBuildFolder = Path.join(outputPath, NugetConstants.OutputFolderName);
|
|
1931
|
-
const contentFolder = Path.join(localBuildFolder, NugetConstants.ContentFolderName);
|
|
1932
|
-
const contentAppFolder = Path.join(contentFolder, CONTENT_APP_FOLDER_NAME);
|
|
1933
|
-
await this.fileSystem.mkdir(contentFolder);
|
|
1934
|
-
try {
|
|
1935
|
-
logger?.progress("Copying .app folder into content/app...");
|
|
1936
|
-
await copyDirectoryAsync(this.fileSystem, appFolder, contentAppFolder);
|
|
1937
|
-
logger?.progress("Preparing metadata files...");
|
|
1938
|
-
await this.prepareMetadataFiles(contentFolder, contentAppFolder, packageInfo, manifest, projectPath);
|
|
1939
|
-
logger?.progress("Creating NuGet package...");
|
|
1940
|
-
const nupkgFileName = `${packageInfo.id}.${packageInfo.version}.nupkg`;
|
|
1941
|
-
const nupkgPath = Path.join(outputPath, nupkgFileName);
|
|
1942
|
-
const packager = new NugetPackager(this.fileSystem);
|
|
1943
|
-
const result = await packager.packAsync(localBuildFolder, packageInfo, nupkgPath);
|
|
1944
|
-
logger?.info(`Package created successfully: ${result.outputPath}`);
|
|
1945
|
-
return result.outputPath;
|
|
1946
|
-
} finally {
|
|
1947
|
-
try {
|
|
1948
|
-
await this.fileSystem.rm(localBuildFolder);
|
|
1949
|
-
} catch (cleanupError) {
|
|
1950
|
-
logger?.error(`Failed to cleanup build folder: ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`);
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
}
|
|
1954
|
-
async prepareMetadataFiles(contentFolder, _contentAppFolder, _packageInfo, _manifest, projectPath) {
|
|
1955
|
-
const mainFile = "index.html";
|
|
1956
|
-
const mainRelativeToContent = `${CONTENT_APP_FOLDER_NAME}/${mainFile}`;
|
|
1957
|
-
const operatePath = Path.join(contentFolder, NugetConstants.OperateFileName);
|
|
1958
|
-
const operateModel = {
|
|
1959
|
-
projectId: await ensureWebAppProjectId(this.fileSystem, projectPath),
|
|
1960
|
-
main: mainRelativeToContent,
|
|
1961
|
-
contentType: ProjectTypes.WebApp,
|
|
1962
|
-
targetFramework: TargetFramework.Portable,
|
|
1963
|
-
targetRuntime: TARGET_JS_RUNTIME,
|
|
1964
|
-
runtimeOptions: {
|
|
1965
|
-
requiresUserInteraction: false,
|
|
1966
|
-
isAttended: false
|
|
1967
|
-
}
|
|
1968
|
-
};
|
|
1969
|
-
const operateJson = JSON.stringify(operateModel, null, 2);
|
|
1970
|
-
await this.fileSystem.writeFile(operatePath, operateJson);
|
|
1971
|
-
const manifestSourcePath = Path.join(projectPath, WEBAPP_MANIFEST_FILE_NAME);
|
|
1972
|
-
const manifestDestPath = Path.join(contentFolder, WEBAPP_MANIFEST_FILE_NAME);
|
|
1973
|
-
const manifestExists = await this.fileSystem.exists(manifestSourcePath);
|
|
1974
|
-
if (manifestExists) {
|
|
1975
|
-
const manifestContent = await this.fileSystem.readFile(manifestSourcePath);
|
|
1976
|
-
if (manifestContent) {
|
|
1977
|
-
await this.fileSystem.writeFile(manifestDestPath, manifestContent);
|
|
1978
|
-
}
|
|
1979
|
-
}
|
|
1980
|
-
const uipathJsonSourcePath = Path.join(projectPath, "uipath.json");
|
|
1981
|
-
const uipathJsonDestPath = Path.join(contentFolder, "uipath.json");
|
|
1982
|
-
const uipathJsonExists = await this.fileSystem.exists(uipathJsonSourcePath);
|
|
1983
|
-
if (uipathJsonExists) {
|
|
1984
|
-
const uipathJsonContent = await this.fileSystem.readFile(uipathJsonSourcePath);
|
|
1985
|
-
if (uipathJsonContent) {
|
|
1986
|
-
await this.fileSystem.writeFile(uipathJsonDestPath, uipathJsonContent);
|
|
1987
|
-
}
|
|
1988
|
-
}
|
|
1989
|
-
const bindingsPath = Path.join(contentFolder, "bindings.json");
|
|
1990
|
-
const bindingsExists = await this.fileSystem.exists(bindingsPath);
|
|
1991
|
-
if (!bindingsExists) {
|
|
1992
|
-
const bindingsJson = JSON.stringify({ version: "1.0", resources: [] }, null, 2);
|
|
1993
|
-
await this.fileSystem.writeFile(bindingsPath, bindingsJson);
|
|
1994
|
-
}
|
|
1995
|
-
const bindingsV2Path = Path.join(contentFolder, "bindings_v2.json");
|
|
1996
|
-
const bindingsV2Exists = await this.fileSystem.exists(bindingsV2Path);
|
|
1997
|
-
if (!bindingsV2Exists) {
|
|
1998
|
-
const bindingsV2Json = JSON.stringify({ version: "2.0", resources: [] }, null, 2);
|
|
1999
|
-
await this.fileSystem.writeFile(bindingsV2Path, bindingsV2Json);
|
|
2000
|
-
}
|
|
2001
|
-
const entryPointsPath = Path.join(contentFolder, "entry-points.json");
|
|
2002
|
-
const projectEntryPointsPath = Path.join(projectPath, "entry-points.json");
|
|
2003
|
-
let entryPointsContent;
|
|
2004
|
-
const projectEntryPointsExists = await this.fileSystem.exists(projectEntryPointsPath);
|
|
2005
|
-
if (projectEntryPointsExists) {
|
|
2006
|
-
const entryPointsData = await this.fileSystem.readFile(projectEntryPointsPath);
|
|
2007
|
-
if (entryPointsData) {
|
|
2008
|
-
entryPointsContent = new TextDecoder().decode(entryPointsData);
|
|
2009
|
-
} else {
|
|
2010
|
-
entryPointsContent = this.createDefaultEntryPoints(mainRelativeToContent);
|
|
2011
|
-
}
|
|
2012
|
-
} else {
|
|
2013
|
-
entryPointsContent = this.createDefaultEntryPoints(mainRelativeToContent);
|
|
2014
|
-
}
|
|
2015
|
-
await this.fileSystem.writeFile(entryPointsPath, entryPointsContent);
|
|
2016
|
-
const packageDescriptorPath = Path.join(contentFolder, NugetConstants.PackageDescriptorFileName);
|
|
2017
|
-
const packageDescriptor = {
|
|
2018
|
-
files: {
|
|
2019
|
-
[NugetConstants.OperateFileName]: Path.join(NugetConstants.ContentFolderName, NugetConstants.OperateFileName),
|
|
2020
|
-
"entry-points.json": Path.join(NugetConstants.ContentFolderName, "entry-points.json"),
|
|
2021
|
-
"bindings.json": Path.join(NugetConstants.ContentFolderName, "bindings_v2.json")
|
|
2022
|
-
}
|
|
2023
|
-
};
|
|
2024
|
-
const packageDescriptorJson = JSON.stringify(packageDescriptor, null, 2);
|
|
2025
|
-
await this.fileSystem.writeFile(packageDescriptorPath, packageDescriptorJson);
|
|
2026
|
-
}
|
|
2027
|
-
createDefaultEntryPoints(mainFilePath) {
|
|
2028
|
-
const uniqueId = this.generateUniqueId();
|
|
2029
|
-
const entryPoints = {
|
|
2030
|
-
$schema: "https://cloud.uipath.com/draft/2024-12/entry-point",
|
|
2031
|
-
$id: "entry-points-doc-001",
|
|
2032
|
-
entryPoints: [
|
|
2033
|
-
{
|
|
2034
|
-
filePath: mainFilePath,
|
|
2035
|
-
uniqueId,
|
|
2036
|
-
type: DEFAULT_ENTRY_POINT_TYPE,
|
|
2037
|
-
input: {
|
|
2038
|
-
amount: { type: "integer" },
|
|
2039
|
-
id: { type: "string" }
|
|
2040
|
-
},
|
|
2041
|
-
output: {
|
|
2042
|
-
status: { type: "string" }
|
|
2043
|
-
}
|
|
2044
|
-
}
|
|
2045
|
-
]
|
|
2046
|
-
};
|
|
2047
|
-
return JSON.stringify(entryPoints, null, 2);
|
|
2048
|
-
}
|
|
2049
|
-
generateUniqueId() {
|
|
2050
|
-
const randomBytes = new Uint8Array(16);
|
|
2051
|
-
if (typeof crypto !== "undefined" && crypto.getRandomValues) {
|
|
2052
|
-
crypto.getRandomValues(randomBytes);
|
|
2053
|
-
} else {
|
|
2054
|
-
throw new Error("crypto.getRandomValues is not available");
|
|
2055
|
-
}
|
|
2056
|
-
randomBytes[6] = randomBytes[6] & 15 | 64;
|
|
2057
|
-
randomBytes[8] = randomBytes[8] & 63 | 128;
|
|
2058
|
-
const hex = Array.from(randomBytes).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
2059
|
-
return [
|
|
2060
|
-
hex.substring(0, 8),
|
|
2061
|
-
hex.substring(8, 12),
|
|
2062
|
-
hex.substring(12, 16),
|
|
2063
|
-
hex.substring(16, 20),
|
|
2064
|
-
hex.substring(20, 32)
|
|
2065
|
-
].join("-");
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
// ../packager/packager-tool-webapp/src/strategies/variant-strategy-factory.ts
|
|
2070
|
-
class VariantStrategyFactory {
|
|
2071
|
-
static createStrategy(manifest, fileSystem) {
|
|
2072
|
-
const variant = manifest.type;
|
|
2073
|
-
switch (variant) {
|
|
2074
|
-
case "Coded" /* Coded */:
|
|
2075
|
-
return new CodedAppStrategy(fileSystem);
|
|
2076
|
-
case "JS" /* JS */:
|
|
2077
|
-
return new JsAppsStrategy(fileSystem);
|
|
2078
|
-
default:
|
|
2079
|
-
throw new Error(`Unknown WebApp variant: ${manifest.type}. Supported variants: ${Object.values(WebAppVariantType).join(", ")}`);
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
// ../packager/packager-tool-webapp/src/webapp-tool.ts
|
|
2085
|
-
class WebAppTool extends ProjectTool {
|
|
2086
|
-
_temporaryStorage;
|
|
2087
|
-
_tempBuildFolder = null;
|
|
2088
|
-
constructor(fileSystem, logger) {
|
|
2089
|
-
super(fileSystem, logger);
|
|
2090
|
-
this._temporaryStorage = new TemporaryStorageService(fileSystem);
|
|
2091
|
-
}
|
|
2092
|
-
async restoreAsync(_options, _cancellationToken) {
|
|
2093
|
-
this.logger.info("Restore operation is not required for WebApp projects");
|
|
2094
|
-
return ToolResult.success();
|
|
2095
|
-
}
|
|
2096
|
-
async validateAsync(options, _cancellationToken) {
|
|
2097
|
-
if (!options.projectPath) {
|
|
2098
|
-
return this.handleError(new Error(ERROR_MESSAGES.PROJECT_PATH_REQUIRED), "Validation");
|
|
2099
|
-
}
|
|
2100
|
-
try {
|
|
2101
|
-
this.logger.info("Validating WebApp project...");
|
|
2102
|
-
let manifest;
|
|
2103
|
-
let strategy;
|
|
2104
|
-
try {
|
|
2105
|
-
const prepared = await this.getManifestAndStrategy(options.projectPath);
|
|
2106
|
-
manifest = prepared.manifest;
|
|
2107
|
-
strategy = prepared.strategy;
|
|
2108
|
-
} catch (error) {
|
|
2109
|
-
return this.handleError(error, "Validation");
|
|
2110
|
-
}
|
|
2111
|
-
try {
|
|
2112
|
-
if (strategy.validateAsync) {
|
|
2113
|
-
await strategy.validateAsync({
|
|
2114
|
-
fileSystem: this.fileSystem,
|
|
2115
|
-
projectPath: options.projectPath,
|
|
2116
|
-
manifest,
|
|
2117
|
-
logger: this.createStrategyLogger()
|
|
2118
|
-
});
|
|
2119
|
-
}
|
|
2120
|
-
} catch (error) {
|
|
2121
|
-
return this.handleError(error, "Validation");
|
|
2122
|
-
}
|
|
2123
|
-
this.logger.info("WebApp project validation completed");
|
|
2124
|
-
return ToolResult.success();
|
|
2125
|
-
} catch (error) {
|
|
2126
|
-
return this.handleError(error, "Validation");
|
|
2127
|
-
}
|
|
2128
|
-
}
|
|
2129
|
-
async buildAsync(_options, _cancellationToken) {
|
|
2130
|
-
this.logger.info("Build operation for WebApp is lightweight (metadata preparation only)");
|
|
2131
|
-
return ToolResult.success();
|
|
2132
|
-
}
|
|
2133
|
-
async packAsync(options, _cancellationToken) {
|
|
2134
|
-
if (!options.projectPath) {
|
|
2135
|
-
return this.handleError(new Error(ERROR_MESSAGES.PROJECT_PATH_REQUIRED), "Packing");
|
|
2136
|
-
}
|
|
2137
|
-
if (!options.outputPath) {
|
|
2138
|
-
return this.handleError(new Error(ERROR_MESSAGES.OUTPUT_PATH_REQUIRED), "Packing");
|
|
2139
|
-
}
|
|
2140
|
-
if (!options.package?.id) {
|
|
2141
|
-
return this.handleError(new Error(ERROR_MESSAGES.PACKAGE_NAME_REQUIRED), "Packing");
|
|
2142
|
-
}
|
|
2143
|
-
if (!options.package?.version) {
|
|
2144
|
-
return this.handleError(new Error(ERROR_MESSAGES.PACKAGE_VERSION_REQUIRED), "Packing");
|
|
2145
|
-
}
|
|
2146
|
-
try {
|
|
2147
|
-
this.logger.info(`Packing WebApp project: ${options.package.id}@${options.package.version}`);
|
|
2148
|
-
let manifest;
|
|
2149
|
-
let strategy;
|
|
2150
|
-
try {
|
|
2151
|
-
const prepared = await this.getManifestAndStrategy(options.projectPath);
|
|
2152
|
-
manifest = prepared.manifest;
|
|
2153
|
-
strategy = prepared.strategy;
|
|
2154
|
-
} catch (error) {
|
|
2155
|
-
return this.handleError(error, `Packing WebApp project '${options.package.id}'`);
|
|
2156
|
-
}
|
|
2157
|
-
const nupkgPath = await strategy.packageAsync({
|
|
2158
|
-
fileSystem: this.fileSystem,
|
|
2159
|
-
projectPath: options.projectPath,
|
|
2160
|
-
manifest,
|
|
2161
|
-
outputPath: options.outputPath,
|
|
2162
|
-
packageInfo: options.package,
|
|
2163
|
-
logger: this.createStrategyLogger()
|
|
2164
|
-
});
|
|
2165
|
-
this.logger.info(`WebApp package created successfully: ${nupkgPath}`);
|
|
2166
|
-
return new ToolResult(ToolErrorCodes.Success, "done", [nupkgPath]);
|
|
2167
|
-
} catch (error) {
|
|
2168
|
-
return this.handleError(error, `Packing WebApp project '${options.package.id}'`);
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
async dispose() {
|
|
2172
|
-
this.logger.info("Disposing WebApp Tool");
|
|
2173
|
-
try {
|
|
2174
|
-
if (this._tempBuildFolder) {
|
|
2175
|
-
await this.fileSystem.rm(this._tempBuildFolder);
|
|
2176
|
-
this._tempBuildFolder = null;
|
|
2177
|
-
}
|
|
2178
|
-
await this._temporaryStorage.cleanup();
|
|
2179
|
-
} catch {}
|
|
2180
|
-
}
|
|
2181
|
-
async getManifestAndStrategy(projectPath) {
|
|
2182
|
-
const manifestPath = Path.join(projectPath, WEBAPP_MANIFEST_FILE_NAME);
|
|
2183
|
-
const manifestExists = await this.fileSystem.exists(manifestPath);
|
|
2184
|
-
if (!manifestExists) {
|
|
2185
|
-
throw new Error(ERROR_MESSAGES.MANIFEST_NOT_FOUND(WEBAPP_MANIFEST_FILE_NAME));
|
|
2186
|
-
}
|
|
2187
|
-
const projectJsonPath = Path.join(projectPath, PROJECT_JSON_FILE);
|
|
2188
|
-
if (await this.fileSystem.exists(projectJsonPath)) {
|
|
2189
|
-
throw new Error(ERROR_MESSAGES.PROJECT_JSON_FOUND);
|
|
2190
|
-
}
|
|
2191
|
-
const manifest = await loadWebAppManifest(this.fileSystem, projectPath);
|
|
2192
|
-
if (!manifest) {
|
|
2193
|
-
throw new Error(ERROR_MESSAGES.MANIFEST_LOAD_FAILED(WEBAPP_MANIFEST_FILE_NAME));
|
|
2194
|
-
}
|
|
2195
|
-
const strategy = VariantStrategyFactory.createStrategy(manifest, this.fileSystem);
|
|
2196
|
-
return { manifest, strategy };
|
|
2197
|
-
}
|
|
2198
|
-
handleError(error, context) {
|
|
2199
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
2200
|
-
this.logger.error(`${context}: ${errorMessage}`);
|
|
2201
|
-
let userMessage;
|
|
2202
|
-
if (context === "Validation") {
|
|
2203
|
-
userMessage = ERROR_MESSAGES.VALIDATION_FAILED(errorMessage);
|
|
2204
|
-
} else if (context.startsWith("Packing")) {
|
|
2205
|
-
userMessage = ERROR_MESSAGES.PACKING_FAILED(errorMessage);
|
|
2206
|
-
} else {
|
|
2207
|
-
userMessage = errorMessage;
|
|
2208
|
-
}
|
|
2209
|
-
return ToolResult.error(ToolErrorCodes.InternalError, userMessage);
|
|
2210
|
-
}
|
|
2211
|
-
createStrategyLogger() {
|
|
2212
|
-
return {
|
|
2213
|
-
info: (msg) => this.logger.info(msg),
|
|
2214
|
-
error: (msg) => this.logger.error(msg),
|
|
2215
|
-
progress: (msg) => this.logger.progress(msg),
|
|
2216
|
-
warn: (msg) => this.logger.warn(msg)
|
|
2217
|
-
};
|
|
2218
|
-
}
|
|
2219
|
-
}
|
|
2220
|
-
// ../packager/packager-tool-webapp/src/webapp-tool-factory.ts
|
|
2221
|
-
class WebAppToolFactory {
|
|
2222
|
-
supportedTypes = [ProjectTypes.AppV2];
|
|
2223
|
-
async createAsync(logger, fileSystem) {
|
|
2224
|
-
return new WebAppTool(fileSystem, logger);
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
1573
|
// ../../node_modules/@uipath/resource-builder-tool/dist/index.js
|
|
2228
1574
|
function _define_property(obj, key, value) {
|
|
2229
1575
|
if (key in obj)
|
|
@@ -2920,9 +2266,8 @@ class ResourceBuilderToolFactory {
|
|
|
2920
2266
|
function registerPackagerFactories() {
|
|
2921
2267
|
toolsFactoryRepository.registerSolutionToolFactory(new ResourceBuilderToolFactory);
|
|
2922
2268
|
toolsFactoryRepository.registerProjectToolFactory(new ConnectorToolFactory);
|
|
2923
|
-
toolsFactoryRepository.registerProjectToolFactory(new WebAppToolFactory);
|
|
2924
2269
|
}
|
|
2925
2270
|
|
|
2926
2271
|
export { Path, TemporaryStorageService, ZipService, I18nManager, translate, BuildConfiguration, LogLevel, LogMessage, TargetFramework, ToolErrorCodes, ToolResult, toolsFactoryRepository2 as toolsFactoryRepository, registerPackagerFactories };
|
|
2927
2272
|
|
|
2928
|
-
//# debugId=
|
|
2273
|
+
//# debugId=FCA9CE604FDEAF2C64756E2164756E21
|