@uipath/solution-tool 1.200.0-preview.120 → 1.201.0-preview.121
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-strategy-brs3w53e.js → browser-strategy-yccf8mtd.js} +1 -1
- package/dist/deploy.js +8 -6
- package/dist/index-2fj08e7n.js +2058 -0
- package/dist/index-w03qc9m8.js +634 -0
- package/dist/index.js +15 -12
- package/dist/init.d.ts +6 -8
- package/dist/init.js +7 -6
- package/dist/js-yaml-4ypbq2tt.js +3145 -0
- package/dist/list-kbscmb2k.js +378 -0
- package/dist/node-strategy-12qfy0nv.js +348 -0
- package/dist/pack.js +9 -20
- package/dist/{packager-tool-v3bmxrve.js → packager-tool-112c30jx.js} +806 -93
- package/dist/{packager-tool-9j8d0ts5.js → packager-tool-550smwcc.js} +431 -1645
- package/dist/{packager-tool-1ps2qeqg.js → packager-tool-5arsyj36.js} +3 -2
- package/dist/{packager-tool-kfzzznjr.js → packager-tool-67ssxgph.js} +2 -2
- package/dist/packager-tool-7eva0peq.js +265 -0
- package/dist/{packager-tool-r1hk3s30.js → packager-tool-95fz7yd0.js} +72 -11
- package/dist/{packager-tool-sdhdmkt8.js → packager-tool-9vehmnke.js} +2 -1
- package/dist/packager-tool-bcpknnr8.js +6724 -0
- package/dist/packager-tool-fzwxq48d.js +4225 -0
- package/dist/{packager-tool-37g19zk3.js → packager-tool-krd5v2r5.js} +8 -6
- package/dist/{packager-tool-epwm26av.js → packager-tool-nkgvv7yh.js} +6249 -5847
- package/dist/{packager-tool-dmdgqh56.js → packager-tool-v33bpncw.js} +87 -31
- package/dist/packager-tool-va301fjh.js +1477 -0
- package/dist/packager-tool-yktm4v4r.js +67 -0
- package/dist/packager-tool.js +1 -1
- package/dist/publish.js +8 -6
- package/dist/resource.d.ts +2 -3
- package/dist/resource.js +6 -5
- package/dist/services/deployment-search.d.ts +1 -1
- package/dist/services/feed-resolver.d.ts +4 -5
- package/dist/templates/AGENTS.md +2 -1
- package/dist/tool.js +15 -12
- package/package.json +2 -2
- package/dist/node-strategy-a4n0d6dx.js +0 -63
- package/dist/packager-tool-q90kqh83.js +0 -1161
- package/dist/packager-tool-y4wacqkp.js +0 -15811
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getStudioWebAuthWithOrganizationId,
|
|
3
|
+
useStudioWebAuth
|
|
4
|
+
} from "./packager-tool-yktm4v4r.js";
|
|
1
5
|
import {
|
|
2
6
|
activateDeploymentAsync,
|
|
3
7
|
deployRunAsync,
|
|
@@ -6,11 +10,11 @@ import {
|
|
|
6
10
|
listDeploymentsAsync,
|
|
7
11
|
listPackagesAsync,
|
|
8
12
|
uninstallDeploymentAsync
|
|
9
|
-
} from "./packager-tool-
|
|
13
|
+
} from "./packager-tool-v33bpncw.js";
|
|
10
14
|
import {
|
|
11
15
|
SolutionInitError,
|
|
12
16
|
solutionInitAsync
|
|
13
|
-
} from "./packager-tool-
|
|
17
|
+
} from "./packager-tool-67ssxgph.js";
|
|
14
18
|
import {
|
|
15
19
|
GOVERNANCE_OPTION_INSTRUCTIONS,
|
|
16
20
|
PackCommandService,
|
|
@@ -18,28 +22,40 @@ import {
|
|
|
18
22
|
applyAuthConnection,
|
|
19
23
|
createSolutionPackager,
|
|
20
24
|
ensurePackagerTools,
|
|
25
|
+
packSolutionAsync,
|
|
21
26
|
readSolutionFileAsUint8Array,
|
|
22
27
|
resolveSdkLogLevel,
|
|
23
28
|
validateGovernanceOptions
|
|
24
|
-
} from "./packager-tool-
|
|
29
|
+
} from "./packager-tool-nkgvv7yh.js";
|
|
25
30
|
import {
|
|
26
31
|
publishSolutionAsync
|
|
27
|
-
} from "./packager-tool-
|
|
32
|
+
} from "./packager-tool-95fz7yd0.js";
|
|
28
33
|
import {
|
|
29
34
|
Configuration,
|
|
30
|
-
|
|
35
|
+
PipelinesApi,
|
|
36
|
+
feedResolutionFailureInstructions,
|
|
37
|
+
feedScopeInitOverride,
|
|
38
|
+
folderKeyInitOverride,
|
|
39
|
+
listSelectablePublishLocations,
|
|
40
|
+
resolveFeedScope,
|
|
41
|
+
resolvePersonalWorkspace
|
|
42
|
+
} from "./packager-tool-va301fjh.js";
|
|
43
|
+
import {
|
|
44
|
+
Configuration as Configuration2,
|
|
31
45
|
DeploymentActivationStatus,
|
|
32
46
|
DeploymentOperationStatus,
|
|
33
47
|
DeploymentsApi,
|
|
34
|
-
|
|
48
|
+
PackagesApi,
|
|
35
49
|
SearchApi,
|
|
36
50
|
bundleSolution,
|
|
51
|
+
getProjectDebugStatus,
|
|
37
52
|
importSolution,
|
|
38
|
-
|
|
39
|
-
|
|
53
|
+
isDebugProvisioningSucceeded,
|
|
54
|
+
isDebugProvisioningTerminal,
|
|
55
|
+
searchPackageVersions,
|
|
40
56
|
solutionExistsOnStudioWeb,
|
|
41
57
|
uploadOrOverwriteSolution
|
|
42
|
-
} from "./packager-tool-
|
|
58
|
+
} from "./packager-tool-550smwcc.js";
|
|
43
59
|
import {
|
|
44
60
|
Tokens,
|
|
45
61
|
applyEntryPointEnhancementAsync,
|
|
@@ -60,10 +76,13 @@ import {
|
|
|
60
76
|
syncAndLog,
|
|
61
77
|
syncResourcesFromBindings,
|
|
62
78
|
writeSolutionFile
|
|
63
|
-
} from "./packager-tool-
|
|
79
|
+
} from "./packager-tool-krd5v2r5.js";
|
|
64
80
|
import {
|
|
65
81
|
ToolResult
|
|
66
82
|
} from "./packager-tool-vpr77gre.js";
|
|
83
|
+
import {
|
|
84
|
+
getSolutionAuthContext
|
|
85
|
+
} from "./packager-tool-fzwxq48d.js";
|
|
67
86
|
import {
|
|
68
87
|
DEFAULT_PAGE_SIZE,
|
|
69
88
|
Option,
|
|
@@ -75,9 +94,7 @@ import {
|
|
|
75
94
|
createHiddenDeprecatedTenantOption,
|
|
76
95
|
extractErrorDetails,
|
|
77
96
|
extractErrorMessage,
|
|
78
|
-
getAuthContext,
|
|
79
97
|
getLoginStatusAsync,
|
|
80
|
-
getSolutionAuthContext,
|
|
81
98
|
isPreviewBuild,
|
|
82
99
|
logger,
|
|
83
100
|
mapPackageMetadataOptions,
|
|
@@ -93,20 +110,24 @@ import {
|
|
|
93
110
|
resolveSolutionDir,
|
|
94
111
|
toPortableRelativePath,
|
|
95
112
|
trackShipSucceeded,
|
|
113
|
+
unsupportedSolutionProjectType,
|
|
96
114
|
updateUipxSolutionId,
|
|
97
115
|
withCompleter
|
|
98
|
-
} from "./packager-tool-
|
|
116
|
+
} from "./packager-tool-bcpknnr8.js";
|
|
99
117
|
import {
|
|
100
118
|
getFileSystem
|
|
101
|
-
} from "./packager-tool-
|
|
119
|
+
} from "./packager-tool-7eva0peq.js";
|
|
102
120
|
import {
|
|
103
121
|
unzipSync
|
|
104
122
|
} from "./packager-tool-129wn232.js";
|
|
123
|
+
import {
|
|
124
|
+
__require
|
|
125
|
+
} from "./packager-tool-0v6na3yp.js";
|
|
105
126
|
// package.json
|
|
106
127
|
var package_default = {
|
|
107
128
|
name: "@uipath/solution-tool",
|
|
108
129
|
license: "MIT",
|
|
109
|
-
version: "1.
|
|
130
|
+
version: "1.201.0-preview.121",
|
|
110
131
|
description: "Create, pack, publish, and deploy UiPath Automation Solutions.",
|
|
111
132
|
repository: {
|
|
112
133
|
type: "git",
|
|
@@ -169,6 +190,7 @@ var package_default = {
|
|
|
169
190
|
"@uipath/packager-tool-connector": "workspace:*",
|
|
170
191
|
"@uipath/packager-tool-webapp": "workspace:*",
|
|
171
192
|
"@uipath/pipelines-sdk": "workspace:*",
|
|
193
|
+
"@uipath/project-executor": "workspace:*",
|
|
172
194
|
"@uipath/resource-builder-sdk": "^2025.11.0-alpha4202-3459",
|
|
173
195
|
"@uipath/resource-builder-tool": "2025.11.0-alpha4535-3530",
|
|
174
196
|
"@uipath/solution-packager": "workspace:*",
|
|
@@ -373,7 +395,7 @@ async function deleteSolutionOnStudioWeb(baseUrl, organizationName, tenantId, ac
|
|
|
373
395
|
}
|
|
374
396
|
}
|
|
375
397
|
var registerDeleteCommand = (program) => {
|
|
376
|
-
program.command("delete").description("Delete a solution from Studio Web by its solution ID. " + "The ID is emitted by 'solution upload' and 'flow debug' in their output.").argument("<solution-id>", "The Studio Web solution ID (UUID).").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(SOLUTION_DELETE_EXAMPLES).trackedAction(processContext, async (solutionId, options) => {
|
|
398
|
+
program.command("delete").description("Delete a solution from Studio Web by its solution ID. " + "The ID is emitted by 'solution upload' and 'flow debug' in their output." + (isPreviewBuild() ? " Find IDs with 'uip solution list'." : "")).argument("<solution-id>", "The Studio Web solution ID (UUID).").option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").examples(SOLUTION_DELETE_EXAMPLES).trackedAction(processContext, async (solutionId, options) => {
|
|
377
399
|
if (!requireConfirmation(options, `delete solution '${solutionId}'`)) {
|
|
378
400
|
return;
|
|
379
401
|
}
|
|
@@ -404,7 +426,7 @@ var registerDeleteCommand = (program) => {
|
|
|
404
426
|
OutputFormatter.error({
|
|
405
427
|
Result: RESULTS.Failure,
|
|
406
428
|
Message: errorMessage,
|
|
407
|
-
Instructions: "Check that the solution ID is correct and that you have permission to delete it."
|
|
429
|
+
Instructions: "Check that the solution ID is correct and that you have permission to delete it." + (isPreviewBuild() ? " Run 'uip solution list' to see the solutions you own or that are shared with you, and their IDs." : "")
|
|
408
430
|
});
|
|
409
431
|
processContext.exit(1);
|
|
410
432
|
return;
|
|
@@ -1458,11 +1480,6 @@ var fail = (reason, message, instructions, exitCode = 1) => ({
|
|
|
1458
1480
|
exitCode
|
|
1459
1481
|
});
|
|
1460
1482
|
var AUTH_INSTRUCTIONS = "Run 'uip login' to refresh credentials, then retry. If the deployment is in a different tenant, switch with 'uip login tenant set <tenant>'.";
|
|
1461
|
-
function folderScope(folderKey) {
|
|
1462
|
-
return async ({ init }) => ({
|
|
1463
|
-
headers: { ...init.headers, "X-UIPATH-FolderKey": folderKey }
|
|
1464
|
-
});
|
|
1465
|
-
}
|
|
1466
1483
|
async function upgradeDeploymentAsync(deploymentKey, options = {}) {
|
|
1467
1484
|
const [authError, auth] = await catchError(getSolutionAuthContext({
|
|
1468
1485
|
tenant: options.tenant,
|
|
@@ -1487,7 +1504,7 @@ async function upgradeDeploymentAsync(deploymentKey, options = {}) {
|
|
|
1487
1504
|
if (pwError || !pw) {
|
|
1488
1505
|
return fail("personal_workspace_failed", pwError?.message ?? "Personal Workspace could not be resolved.", "Ensure your user has a Personal Workspace, then retry.");
|
|
1489
1506
|
}
|
|
1490
|
-
feedScope =
|
|
1507
|
+
feedScope = folderKeyInitOverride(pw.key);
|
|
1491
1508
|
}
|
|
1492
1509
|
const [getError, deployment] = await catchError(deploymentsApi.deploymentsGetByKey({ deploymentKey }, feedScope));
|
|
1493
1510
|
if (getError || !deployment) {
|
|
@@ -1642,61 +1659,6 @@ async function extractArchive(archivePath, destinationDir) {
|
|
|
1642
1659
|
await extractZipDataToDir(fs, data, destinationDir);
|
|
1643
1660
|
}
|
|
1644
1661
|
|
|
1645
|
-
// src/services/studio-web-auth-middleware.ts
|
|
1646
|
-
var studioWebAuthByCommand = new WeakMap;
|
|
1647
|
-
function useStudioWebAuth(command, options = {}) {
|
|
1648
|
-
return command.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
1649
|
-
const commandOptions = actionCommand.opts();
|
|
1650
|
-
const [error, auth] = await catchError(resolveStudioWebAuthContext({
|
|
1651
|
-
...options,
|
|
1652
|
-
loginValidity: commandOptions.loginValidity,
|
|
1653
|
-
tenant: commandOptions.tenant
|
|
1654
|
-
}));
|
|
1655
|
-
studioWebAuthByCommand.set(actionCommand, error ? { error } : { auth });
|
|
1656
|
-
});
|
|
1657
|
-
}
|
|
1658
|
-
function getStudioWebAuth(command) {
|
|
1659
|
-
const state = studioWebAuthByCommand.get(command);
|
|
1660
|
-
if (!state) {
|
|
1661
|
-
throw new Error("Studio Web auth middleware was not registered for this command.");
|
|
1662
|
-
}
|
|
1663
|
-
if (state.error) {
|
|
1664
|
-
throw state.error;
|
|
1665
|
-
}
|
|
1666
|
-
return state.auth;
|
|
1667
|
-
}
|
|
1668
|
-
function getStudioWebAuthWithOrganizationId(command) {
|
|
1669
|
-
const auth = getStudioWebAuth(command);
|
|
1670
|
-
if (!auth.organizationId) {
|
|
1671
|
-
throw new Error("Organization ID not available. Ensure you are logged in with an organization context.");
|
|
1672
|
-
}
|
|
1673
|
-
return {
|
|
1674
|
-
...auth,
|
|
1675
|
-
organizationId: auth.organizationId
|
|
1676
|
-
};
|
|
1677
|
-
}
|
|
1678
|
-
async function resolveStudioWebAuthContext(options) {
|
|
1679
|
-
if (Number.isNaN(options.loginValidity)) {
|
|
1680
|
-
throw new Error(`Invalid --login-validity value: ${options.loginValidity}`);
|
|
1681
|
-
}
|
|
1682
|
-
const ctx = await getAuthContext({
|
|
1683
|
-
tenant: options.tenant,
|
|
1684
|
-
ensureTokenValidityMinutes: options.loginValidity,
|
|
1685
|
-
requireOrganizationId: options.requireOrganizationId,
|
|
1686
|
-
requireOrganizationName: options.requireOrganizationName,
|
|
1687
|
-
requireTenantId: options.requireTenantId,
|
|
1688
|
-
requireTenantName: options.requireTenantName
|
|
1689
|
-
});
|
|
1690
|
-
return {
|
|
1691
|
-
accessToken: ctx.accessToken,
|
|
1692
|
-
baseUrl: ctx.baseUrl,
|
|
1693
|
-
organizationId: ctx.organizationId,
|
|
1694
|
-
organizationName: ctx.organizationName,
|
|
1695
|
-
tenantId: ctx.tenantId,
|
|
1696
|
-
tenantName: ctx.tenantName
|
|
1697
|
-
};
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
1662
|
// src/commands/download.ts
|
|
1701
1663
|
var SOLUTION_DOWNLOAD_EXAMPLES = [
|
|
1702
1664
|
{
|
|
@@ -1721,7 +1683,7 @@ function registerDownloadCommand(program) {
|
|
|
1721
1683
|
OutputFormatter.error({
|
|
1722
1684
|
Result: RESULTS.Failure,
|
|
1723
1685
|
Message: "Failed to download solution",
|
|
1724
|
-
Instructions: error.message
|
|
1686
|
+
Instructions: error.message + (isPreviewBuild() ? " If the solution ID is wrong or was deleted, run 'uip solution list' to see the solutions you own or that are shared with you." : "")
|
|
1725
1687
|
});
|
|
1726
1688
|
processContext.exit(1);
|
|
1727
1689
|
}
|
|
@@ -2057,8 +2019,100 @@ var SOLUTION_PACKAGES_DELETE_EXAMPLES = [
|
|
|
2057
2019
|
}
|
|
2058
2020
|
}
|
|
2059
2021
|
];
|
|
2022
|
+
var SEARCH_PAGE_SIZE = 50;
|
|
2023
|
+
function scopeName(scope) {
|
|
2024
|
+
if (scope.kind === "tenant") {
|
|
2025
|
+
return "the tenant feed";
|
|
2026
|
+
}
|
|
2027
|
+
if (scope.name) {
|
|
2028
|
+
return `'${scope.name}'`;
|
|
2029
|
+
}
|
|
2030
|
+
return scope.kind === "personal" ? "the Personal Workspace feed" : "the selected feed";
|
|
2031
|
+
}
|
|
2032
|
+
function packageDeleteFailureInstructions(scope, packageName) {
|
|
2033
|
+
const base = "Check that the package name and version are correct and that you have permission to delete it.";
|
|
2034
|
+
if (scope.kind === "personal") {
|
|
2035
|
+
return `List workspace packages with: uip solution packages list --personal-workspace --name ${packageName}.`;
|
|
2036
|
+
}
|
|
2037
|
+
if (scope.kind === "folder") {
|
|
2038
|
+
return `List packages in that feed with: uip solution packages list --feed <name-or-key> --name ${packageName}.`;
|
|
2039
|
+
}
|
|
2040
|
+
if (isPreviewBuild()) {
|
|
2041
|
+
return `${base} If the package was published to a Personal Workspace or folder feed, add --personal-workspace or --feed.`;
|
|
2042
|
+
}
|
|
2043
|
+
return `${base} If the package was published to a Personal Workspace, add --personal-workspace.`;
|
|
2044
|
+
}
|
|
2045
|
+
async function resolvePackageVersionKey(auth, scope, packageName, packageVersion) {
|
|
2046
|
+
const config = new Configuration2({
|
|
2047
|
+
basePath: auth.basePath,
|
|
2048
|
+
accessToken: auth.accessToken
|
|
2049
|
+
});
|
|
2050
|
+
const searchApi = new SearchApi(config);
|
|
2051
|
+
const pkg = await findPackage(searchApi, scope, packageName);
|
|
2052
|
+
if (pkg.latestVersion === packageVersion) {
|
|
2053
|
+
return pkg.packageVersionKey;
|
|
2054
|
+
}
|
|
2055
|
+
for (let skip = 0;; ) {
|
|
2056
|
+
const page = await searchPackageVersions({ basePath: auth.basePath, accessToken: auth.accessToken }, pkg.key, {
|
|
2057
|
+
searchTerm: packageVersion,
|
|
2058
|
+
take: SEARCH_PAGE_SIZE,
|
|
2059
|
+
skip,
|
|
2060
|
+
excludeInvalidPackages: true
|
|
2061
|
+
}, scope.folderKey);
|
|
2062
|
+
const match = page.values.find((version) => version.version === packageVersion);
|
|
2063
|
+
if (match) {
|
|
2064
|
+
return match.key;
|
|
2065
|
+
}
|
|
2066
|
+
if (page.values.length < SEARCH_PAGE_SIZE) {
|
|
2067
|
+
throw new Error(`Package version '${packageName}@${packageVersion}' was not found in ${scopeName(scope)}.`);
|
|
2068
|
+
}
|
|
2069
|
+
skip += page.values.length;
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
async function findPackage(searchApi, scope, packageName) {
|
|
2073
|
+
for (let skip = 0;; ) {
|
|
2074
|
+
const packages = await searchApi.searchSearchPackages({
|
|
2075
|
+
searchFilter: {
|
|
2076
|
+
searchTerm: packageName,
|
|
2077
|
+
take: SEARCH_PAGE_SIZE,
|
|
2078
|
+
skip
|
|
2079
|
+
}
|
|
2080
|
+
}, feedScopeInitOverride(scope));
|
|
2081
|
+
const values = packages.values ?? [];
|
|
2082
|
+
const match = values.find((pkg) => pkg.name === packageName);
|
|
2083
|
+
if (match) {
|
|
2084
|
+
return match;
|
|
2085
|
+
}
|
|
2086
|
+
if (values.length < SEARCH_PAGE_SIZE) {
|
|
2087
|
+
throw new Error(`Package '${packageName}' was not found in ${scopeName(scope)}.`);
|
|
2088
|
+
}
|
|
2089
|
+
skip += values.length;
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
async function deleteTenantPackageVersion(auth, packageName, packageVersion) {
|
|
2093
|
+
const api = new PipelinesApi(new Configuration({
|
|
2094
|
+
basePath: auth.basePath,
|
|
2095
|
+
accessToken: auth.accessToken
|
|
2096
|
+
}));
|
|
2097
|
+
await api.pipelinesPackageDelete({
|
|
2098
|
+
packageName,
|
|
2099
|
+
packageVersion
|
|
2100
|
+
});
|
|
2101
|
+
}
|
|
2102
|
+
async function deleteScopedPackageVersion(auth, scope, packageName, packageVersion) {
|
|
2103
|
+
const packageVersionKey = await resolvePackageVersionKey(auth, scope, packageName, packageVersion);
|
|
2104
|
+
const packagesApi = new PackagesApi(new Configuration2({
|
|
2105
|
+
basePath: auth.basePath,
|
|
2106
|
+
accessToken: auth.accessToken
|
|
2107
|
+
}));
|
|
2108
|
+
await packagesApi.packagesDeleteVersion({ packageVersionKey }, feedScopeInitOverride(scope));
|
|
2109
|
+
}
|
|
2060
2110
|
var registerPackagesDeleteCommand = (program) => {
|
|
2061
|
-
program.command("delete").description("Delete a specific version of a solution package. " + "Use 'solution packages list' to find available package names and versions.").argument("<package-name>", "The name of the package").argument("<package-version>", "The version to delete (e.g. 1.0.0)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").
|
|
2111
|
+
const command = program.command("delete").description("Delete a specific version of a solution package. " + "Use 'solution packages list' to find available package names and versions.").argument("<package-name>", "The name of the package").argument("<package-version>", "The version to delete (e.g. 1.0.0)").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("-y, --yes", "Confirm this irreversible operation (required; the CLI never prompts)").option("--personal-workspace", "Delete the package version from the current user's Personal Workspace feed.");
|
|
2112
|
+
if (isPreviewBuild()) {
|
|
2113
|
+
command.addOption(new Option("--feed <name-or-key>", "Delete the package version from this feed (name or folder key, from 'solution feeds list'). Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace"));
|
|
2114
|
+
}
|
|
2115
|
+
command.examples(SOLUTION_PACKAGES_DELETE_EXAMPLES).trackedAction(processContext, async (packageName, packageVersion, options) => {
|
|
2062
2116
|
if (!requireConfirmation(options, `delete package '${packageName}@${packageVersion}'`)) {
|
|
2063
2117
|
return;
|
|
2064
2118
|
}
|
|
@@ -2075,20 +2129,28 @@ var registerPackagesDeleteCommand = (program) => {
|
|
|
2075
2129
|
processContext.exit(1);
|
|
2076
2130
|
return;
|
|
2077
2131
|
}
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
packageName,
|
|
2084
|
-
packageVersion
|
|
2132
|
+
const [scopeError, scope] = await catchError(resolveFeedScope({
|
|
2133
|
+
personalWorkspace: options.personalWorkspace,
|
|
2134
|
+
feed: options.feed,
|
|
2135
|
+
tenant: options.tenant,
|
|
2136
|
+
loginValidity: options.loginValidity
|
|
2085
2137
|
}));
|
|
2138
|
+
if (scopeError) {
|
|
2139
|
+
OutputFormatter.error({
|
|
2140
|
+
Result: RESULTS.Failure,
|
|
2141
|
+
Message: scopeError.message,
|
|
2142
|
+
Instructions: feedResolutionFailureInstructions(options)
|
|
2143
|
+
});
|
|
2144
|
+
processContext.exit(1);
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
const [deleteError] = await catchError(scope.kind === "tenant" ? deleteTenantPackageVersion(auth, packageName, packageVersion) : deleteScopedPackageVersion(auth, scope, packageName, packageVersion));
|
|
2086
2148
|
if (deleteError) {
|
|
2087
2149
|
const { message } = await extractErrorDetails(deleteError);
|
|
2088
2150
|
OutputFormatter.error({
|
|
2089
2151
|
Result: RESULTS.Failure,
|
|
2090
2152
|
Message: message,
|
|
2091
|
-
Instructions:
|
|
2153
|
+
Instructions: packageDeleteFailureInstructions(scope, packageName)
|
|
2092
2154
|
});
|
|
2093
2155
|
processContext.exit(1);
|
|
2094
2156
|
return;
|
|
@@ -2310,9 +2372,9 @@ var SOLUTION_PACKAGES_LIST_EXAMPLES = [
|
|
|
2310
2372
|
}
|
|
2311
2373
|
];
|
|
2312
2374
|
var registerPackagesListCommand = (program) => {
|
|
2313
|
-
const command = program.command("list").description("List solution packages published to UiPath. Returns package name, version, and publish date. Use the package name and version from this output when running 'solution deploy run'.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-l, --limit <number>", "Number of packages to return", parseLimit, DEFAULT_PAGE_SIZE).option("--offset <number>", "Number of packages to skip", parseOffset, 0).option("--sort-by <column>", "Column to sort by (default: publishDate)", "publishDate").option("--sort-order <direction>", "Sort direction: Ascending or Descending (default: Descending)", "Descending").option("--name <pattern>", "Filter packages by name (server-side substring match)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10);
|
|
2375
|
+
const command = program.command("list").description("List solution packages published to UiPath. Returns package name, version, and publish date. Use the package name and version from this output when running 'solution deploy run'.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("-l, --limit <number>", "Number of packages to return", parseLimit, DEFAULT_PAGE_SIZE).option("--offset <number>", "Number of packages to skip", parseOffset, 0).option("--sort-by <column>", "Column to sort by (default: publishDate)", "publishDate").option("--sort-order <direction>", "Sort direction: Ascending or Descending (default: Descending)", "Descending").option("--name <pattern>", "Filter packages by name (server-side substring match)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("--personal-workspace", "Only list packages in the current user's Personal Workspace feed.");
|
|
2314
2376
|
if (isPreviewBuild()) {
|
|
2315
|
-
command.addOption(new Option("--feed <name-or-key>", "Only list packages in this feed (name or folder key, from 'solution feeds list'). Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace"))
|
|
2377
|
+
command.addOption(new Option("--feed <name-or-key>", "Only list packages in this feed (name or folder key, from 'solution feeds list'). Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace"));
|
|
2316
2378
|
}
|
|
2317
2379
|
command.examples(SOLUTION_PACKAGES_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
2318
2380
|
const result = await listPackagesAsync({
|
|
@@ -2376,6 +2438,21 @@ async function resolveAppV2SubType(projectDir) {
|
|
|
2376
2438
|
return manifest?.config?.isActionApp === true ? "CodedAction" : "Coded";
|
|
2377
2439
|
}
|
|
2378
2440
|
|
|
2441
|
+
// src/commands/project-command-utils.ts
|
|
2442
|
+
function rejectUnsupportedProjectType(projectType, failureMessage) {
|
|
2443
|
+
const reason = unsupportedSolutionProjectType(projectType);
|
|
2444
|
+
if (!reason) {
|
|
2445
|
+
return false;
|
|
2446
|
+
}
|
|
2447
|
+
OutputFormatter.error({
|
|
2448
|
+
Result: RESULTS.Failure,
|
|
2449
|
+
Message: failureMessage,
|
|
2450
|
+
Instructions: reason
|
|
2451
|
+
});
|
|
2452
|
+
processContext.exit(1);
|
|
2453
|
+
return true;
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2379
2456
|
// src/commands/project-add.ts
|
|
2380
2457
|
var PROJECT_ADD_EXAMPLES = [
|
|
2381
2458
|
{
|
|
@@ -2464,6 +2541,9 @@ var registerProjectAddCommand = (project) => {
|
|
|
2464
2541
|
processContext.exit(1);
|
|
2465
2542
|
return;
|
|
2466
2543
|
}
|
|
2544
|
+
if (rejectUnsupportedProjectType(parsedProject.projectType, "Failed to add project to solution")) {
|
|
2545
|
+
return;
|
|
2546
|
+
}
|
|
2467
2547
|
const [readSolutionError, parsedSolution] = await readSolutionFile(resolvedSolutionFile);
|
|
2468
2548
|
if (readSolutionError) {
|
|
2469
2549
|
OutputFormatter.error({
|
|
@@ -2607,6 +2687,9 @@ var registerProjectImportCommand = (project) => {
|
|
|
2607
2687
|
processContext.exit(1);
|
|
2608
2688
|
return;
|
|
2609
2689
|
}
|
|
2690
|
+
if (rejectUnsupportedProjectType(parsedProject.projectType, "Failed to import project into solution")) {
|
|
2691
|
+
return;
|
|
2692
|
+
}
|
|
2610
2693
|
const [solutionFileError, resolvedSolutionFile] = await resolveSolutionFilePath(solutionFile, cwd);
|
|
2611
2694
|
if (solutionFileError) {
|
|
2612
2695
|
OutputFormatter.error({
|
|
@@ -3017,7 +3100,8 @@ var registerProjectRemoveCommand = (project) => {
|
|
|
3017
3100
|
return;
|
|
3018
3101
|
}
|
|
3019
3102
|
const projects = solution.Projects ?? [];
|
|
3020
|
-
|
|
3103
|
+
const removingUnsupportedType = unsupportedSolutionProjectType(projects[projectIndex].Type) !== null;
|
|
3104
|
+
if (projects.length <= 1 && !removingUnsupportedType) {
|
|
3021
3105
|
OutputFormatter.error({
|
|
3022
3106
|
Result: RESULTS.Failure,
|
|
3023
3107
|
Message: "Failed to remove project from solution",
|
|
@@ -3245,7 +3329,7 @@ function formatSyncErrors(errors) {
|
|
|
3245
3329
|
}
|
|
3246
3330
|
|
|
3247
3331
|
// src/commands/project.ts
|
|
3248
|
-
var PROJECTS_DESCRIPTION = "Manage projects within a UiPath solution (.uipx). Add, import, or remove automation projects
|
|
3332
|
+
var PROJECTS_DESCRIPTION = "Manage projects within a UiPath solution (.uipx). Add, import, list, or remove the automation projects registered in the solution manifest — RPA processes, tests, agents, Maestro flows, case and BPMN projects, coded apps, functions, API workflows, and other buildable project types. A library is not a project: publish it on its own, then attach it with 'uip solution resources add --source remote --kind Library --name <library-name>'.";
|
|
3249
3333
|
var PROJECT_ALIAS_DESCRIPTION = "Deprecated alias of 'uip solution projects'. Use 'uip solution projects' instead.";
|
|
3250
3334
|
var wireProjectSubcommands = (group) => {
|
|
3251
3335
|
registerProjectAddCommand(group);
|
|
@@ -4802,6 +4886,630 @@ var registerRestoreCommand = (program) => {
|
|
|
4802
4886
|
}, processContext);
|
|
4803
4887
|
});
|
|
4804
4888
|
};
|
|
4889
|
+
// ../executor/project-executor/src/models/run-status.ts
|
|
4890
|
+
var TERMINAL_RUN_STATUSES = [
|
|
4891
|
+
"Succeeded" /* Succeeded */,
|
|
4892
|
+
"Faulted" /* Faulted */,
|
|
4893
|
+
"Cancelled" /* Cancelled */
|
|
4894
|
+
];
|
|
4895
|
+
function isTerminalRunStatus(status) {
|
|
4896
|
+
return TERMINAL_RUN_STATUSES.includes(status);
|
|
4897
|
+
}
|
|
4898
|
+
|
|
4899
|
+
// ../executor/project-executor/src/models/run-result.ts
|
|
4900
|
+
class RunResult {
|
|
4901
|
+
status;
|
|
4902
|
+
errorCode;
|
|
4903
|
+
rawStatus;
|
|
4904
|
+
message;
|
|
4905
|
+
jobKey;
|
|
4906
|
+
instanceId;
|
|
4907
|
+
runId;
|
|
4908
|
+
traceId;
|
|
4909
|
+
steps;
|
|
4910
|
+
output;
|
|
4911
|
+
url;
|
|
4912
|
+
details;
|
|
4913
|
+
constructor(status, errorCode = "None" /* None */, message) {
|
|
4914
|
+
this.status = status;
|
|
4915
|
+
this.errorCode = errorCode;
|
|
4916
|
+
this.message = message;
|
|
4917
|
+
}
|
|
4918
|
+
get isSuccess() {
|
|
4919
|
+
return this.status === "Succeeded" /* Succeeded */ && this.errorCode === "None" /* None */;
|
|
4920
|
+
}
|
|
4921
|
+
get isTerminal() {
|
|
4922
|
+
return isTerminalRunStatus(this.status);
|
|
4923
|
+
}
|
|
4924
|
+
static succeeded(init = {}) {
|
|
4925
|
+
return Object.assign(new RunResult("Succeeded" /* Succeeded */, "None" /* None */), init);
|
|
4926
|
+
}
|
|
4927
|
+
static failed(errorCode, message, init = {}) {
|
|
4928
|
+
return Object.assign(new RunResult("Faulted" /* Faulted */, errorCode, message), init);
|
|
4929
|
+
}
|
|
4930
|
+
}
|
|
4931
|
+
// ../executor/project-executor/src/services/executor-tool-import.ts
|
|
4932
|
+
async function importExecutorToolModule(specifier) {
|
|
4933
|
+
try {
|
|
4934
|
+
return { module: await import(specifier) };
|
|
4935
|
+
} catch (error) {
|
|
4936
|
+
return {
|
|
4937
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
4938
|
+
};
|
|
4939
|
+
}
|
|
4940
|
+
}
|
|
4941
|
+
|
|
4942
|
+
// ../executor/project-executor/src/services/executor-tool-module.ts
|
|
4943
|
+
var EXECUTOR_FACTORY_EXPORT = "createExecutorFactory";
|
|
4944
|
+
function isExecutorFactoryModule(module) {
|
|
4945
|
+
return typeof module === "object" && module !== null && typeof module[EXECUTOR_FACTORY_EXPORT] === "function";
|
|
4946
|
+
}
|
|
4947
|
+
|
|
4948
|
+
// ../executor/project-executor/src/services/executors-factory-repository.ts
|
|
4949
|
+
class ExecutorsFactoryRepository {
|
|
4950
|
+
factoryMap = new Map;
|
|
4951
|
+
onConflict;
|
|
4952
|
+
constructor(onConflict) {
|
|
4953
|
+
this.onConflict = onConflict ?? ((message) => console.warn(message));
|
|
4954
|
+
}
|
|
4955
|
+
registerProjectExecutorFactory(factory) {
|
|
4956
|
+
for (const projectType of factory.supportedTypes) {
|
|
4957
|
+
const existing = this.factoryMap.get(projectType);
|
|
4958
|
+
if (existing) {
|
|
4959
|
+
if (existing.constructor?.name !== factory.constructor?.name) {
|
|
4960
|
+
this.onConflict(`Executor factory conflict for project type '${projectType}': ` + `'${existing.constructor?.name}' already registered, ` + `ignoring '${factory.constructor?.name}'.`);
|
|
4961
|
+
}
|
|
4962
|
+
continue;
|
|
4963
|
+
}
|
|
4964
|
+
this.factoryMap.set(projectType, factory);
|
|
4965
|
+
}
|
|
4966
|
+
}
|
|
4967
|
+
canHandleProject(projectType) {
|
|
4968
|
+
return this.factoryMap.has(projectType);
|
|
4969
|
+
}
|
|
4970
|
+
getProjectExecutorFactory(projectType) {
|
|
4971
|
+
const factory = this.factoryMap.get(projectType);
|
|
4972
|
+
if (!factory) {
|
|
4973
|
+
throw new Error(`No executor is registered for project type '${projectType}'. ` + `Registered types: ${this.registeredTypes.join(", ") || "none"}.`);
|
|
4974
|
+
}
|
|
4975
|
+
return factory;
|
|
4976
|
+
}
|
|
4977
|
+
get registeredTypes() {
|
|
4978
|
+
return [...this.factoryMap.keys()];
|
|
4979
|
+
}
|
|
4980
|
+
reset() {
|
|
4981
|
+
this.factoryMap.clear();
|
|
4982
|
+
}
|
|
4983
|
+
}
|
|
4984
|
+
var REGISTRY_KEY = Symbol.for("@uipath/project-executor/executorsFactoryRepository");
|
|
4985
|
+
var _global = globalThis;
|
|
4986
|
+
if (!_global[REGISTRY_KEY]) {
|
|
4987
|
+
_global[REGISTRY_KEY] = new ExecutorsFactoryRepository;
|
|
4988
|
+
}
|
|
4989
|
+
var executorsFactoryRepository = _global[REGISTRY_KEY];
|
|
4990
|
+
|
|
4991
|
+
// ../executor/project-executor/src/services/executor-factory-provider.ts
|
|
4992
|
+
var PROVIDER_KEY = Symbol.for("@uipath/project-executor/executorFactoryProvider");
|
|
4993
|
+
var _global2 = globalThis;
|
|
4994
|
+
function registerExecutorFactoryFromModule(module, source) {
|
|
4995
|
+
if (!isExecutorFactoryModule(module)) {
|
|
4996
|
+
throw new Error(`${source} does not export ${EXECUTOR_FACTORY_EXPORT}().`);
|
|
4997
|
+
}
|
|
4998
|
+
const factory = module.createExecutorFactory();
|
|
4999
|
+
executorsFactoryRepository.registerProjectExecutorFactory(factory);
|
|
5000
|
+
return factory;
|
|
5001
|
+
}
|
|
5002
|
+
async function ensureExecutorFactory(verb, packageName) {
|
|
5003
|
+
const provider = _global2[PROVIDER_KEY];
|
|
5004
|
+
if (provider) {
|
|
5005
|
+
await provider(verb);
|
|
5006
|
+
return;
|
|
5007
|
+
}
|
|
5008
|
+
if (!packageName) {
|
|
5009
|
+
throw new Error(`Running this project type needs the executor factory for '${verb}', and no package provides it.`);
|
|
5010
|
+
}
|
|
5011
|
+
const specifier = `${packageName}/executor-tool`;
|
|
5012
|
+
const { module, error } = await importExecutorToolModule(specifier);
|
|
5013
|
+
if (error) {
|
|
5014
|
+
throw new Error(`Running this project type needs '${packageName}'. Install it.`, { cause: error });
|
|
5015
|
+
}
|
|
5016
|
+
registerExecutorFactoryFromModule(module, specifier);
|
|
5017
|
+
}
|
|
5018
|
+
// ../executor/project-executor/src/services/executor-logger.ts
|
|
5019
|
+
var noopExecutorLogger = {
|
|
5020
|
+
info: () => {},
|
|
5021
|
+
warn: () => {},
|
|
5022
|
+
error: () => {}
|
|
5023
|
+
};
|
|
5024
|
+
// ../executor/project-executor/src/services/project-runner.ts
|
|
5025
|
+
class ProjectRunner {
|
|
5026
|
+
fileSystem;
|
|
5027
|
+
logger;
|
|
5028
|
+
registry;
|
|
5029
|
+
constructor(deps) {
|
|
5030
|
+
this.fileSystem = deps.fileSystem;
|
|
5031
|
+
this.logger = deps.logger ?? noopExecutorLogger;
|
|
5032
|
+
this.registry = deps.registry ?? executorsFactoryRepository;
|
|
5033
|
+
}
|
|
5034
|
+
canRun(projectType) {
|
|
5035
|
+
return this.registry.canHandleProject(projectType);
|
|
5036
|
+
}
|
|
5037
|
+
get runnableTypes() {
|
|
5038
|
+
return this.registry.registeredTypes;
|
|
5039
|
+
}
|
|
5040
|
+
async runAsync(options, cancellationToken) {
|
|
5041
|
+
const { projectType, name } = options.project;
|
|
5042
|
+
if (!this.canRun(projectType)) {
|
|
5043
|
+
const known = this.runnableTypes.join(", ") || "none";
|
|
5044
|
+
return RunResult.failed("UnsupportedProjectType" /* UnsupportedProjectType */, `No executor is registered for project type '${projectType}' ` + `(project '${name}'). Runnable types: ${known}.`);
|
|
5045
|
+
}
|
|
5046
|
+
let executor;
|
|
5047
|
+
try {
|
|
5048
|
+
const factory = this.registry.getProjectExecutorFactory(projectType);
|
|
5049
|
+
executor = await factory.createAsync(this.logger, this.fileSystem);
|
|
5050
|
+
this.logger.info(`Running ${name} (${projectType}) on ${options.target}.`);
|
|
5051
|
+
return await executor.runAsync(options, cancellationToken);
|
|
5052
|
+
} catch (error) {
|
|
5053
|
+
return RunResult.failed("Unknown" /* Unknown */, messageOf(error));
|
|
5054
|
+
} finally {
|
|
5055
|
+
try {
|
|
5056
|
+
await executor?.dispose();
|
|
5057
|
+
} catch (error) {
|
|
5058
|
+
this.logger.warn(`Failed to dispose the ${projectType} executor: ${messageOf(error)}`);
|
|
5059
|
+
}
|
|
5060
|
+
}
|
|
5061
|
+
}
|
|
5062
|
+
}
|
|
5063
|
+
function messageOf(error) {
|
|
5064
|
+
return error instanceof Error ? error.message : String(error);
|
|
5065
|
+
}
|
|
5066
|
+
// src/services/executor-tool-resolver.ts
|
|
5067
|
+
var PROJECT_TYPE_TO_TOOL = new Map([
|
|
5068
|
+
["Process", "rpa"],
|
|
5069
|
+
["Tests", "rpa"],
|
|
5070
|
+
["WebApp", "rpa"],
|
|
5071
|
+
["Agent", "agent"],
|
|
5072
|
+
["Api", "api-workflow"]
|
|
5073
|
+
]);
|
|
5074
|
+
var TOOL_TO_PACKAGE = new Map([
|
|
5075
|
+
["rpa", "@uipath/rpa-tool"],
|
|
5076
|
+
["agent", "@uipath/agent-tool"],
|
|
5077
|
+
["api-workflow", "@uipath/api-workflow-tool"]
|
|
5078
|
+
]);
|
|
5079
|
+
function hasExecutorToolFor(projectType) {
|
|
5080
|
+
return PROJECT_TYPE_TO_TOOL.has(projectType);
|
|
5081
|
+
}
|
|
5082
|
+
async function ensureExecutorTools(projectTypes) {
|
|
5083
|
+
const neededTools = new Set;
|
|
5084
|
+
for (const type of projectTypes) {
|
|
5085
|
+
if (executorsFactoryRepository.canHandleProject(type))
|
|
5086
|
+
continue;
|
|
5087
|
+
const toolVerb = PROJECT_TYPE_TO_TOOL.get(type);
|
|
5088
|
+
if (toolVerb) {
|
|
5089
|
+
neededTools.add(toolVerb);
|
|
5090
|
+
} else {
|
|
5091
|
+
logger.warn(`No CLI tool provides an executor for project type '${type}'. Run may fail.`);
|
|
5092
|
+
}
|
|
5093
|
+
}
|
|
5094
|
+
for (const toolVerb of neededTools) {
|
|
5095
|
+
logger.info(`Loading executor factory for '${toolVerb}' to run project types...`);
|
|
5096
|
+
await ensureExecutorFactory(toolVerb, TOOL_TO_PACKAGE.get(toolVerb));
|
|
5097
|
+
}
|
|
5098
|
+
}
|
|
5099
|
+
function projectDirOf(fs, declaredPath) {
|
|
5100
|
+
const dir = fs.path.dirname(declaredPath);
|
|
5101
|
+
return dir && dir !== "." ? dir : "";
|
|
5102
|
+
}
|
|
5103
|
+
async function readSolutionProjects(solutionDir, fs) {
|
|
5104
|
+
const entries = await fs.readdir(solutionDir);
|
|
5105
|
+
const uipxFile = entries.find((f) => f.endsWith(".uipx"));
|
|
5106
|
+
if (!uipxFile) {
|
|
5107
|
+
throw new Error(`No .uipx solution file found in '${solutionDir}'. ` + `Pass a solution directory or run 'uip solution init' first.`);
|
|
5108
|
+
}
|
|
5109
|
+
const content = await fs.readFile(fs.path.join(solutionDir, uipxFile));
|
|
5110
|
+
if (!content) {
|
|
5111
|
+
throw new Error(`Solution file '${uipxFile}' is empty.`);
|
|
5112
|
+
}
|
|
5113
|
+
const json = typeof content === "string" ? content : new TextDecoder().decode(content);
|
|
5114
|
+
const [parseError, solution] = catchError(() => JSON.parse(json));
|
|
5115
|
+
if (parseError) {
|
|
5116
|
+
throw new Error(`Failed to parse ${uipxFile}: ${parseError.message}`);
|
|
5117
|
+
}
|
|
5118
|
+
return (solution.Projects ?? []).map((p) => {
|
|
5119
|
+
const relativePath = projectDirOf(fs, p.ProjectRelativePath ?? "");
|
|
5120
|
+
return {
|
|
5121
|
+
name: p.Name || fs.path.basename(relativePath || solutionDir) || "",
|
|
5122
|
+
projectType: p.Type ?? "",
|
|
5123
|
+
relativePath
|
|
5124
|
+
};
|
|
5125
|
+
});
|
|
5126
|
+
}
|
|
5127
|
+
|
|
5128
|
+
// src/services/provision-debug-service.ts
|
|
5129
|
+
function nextDebugVersion() {
|
|
5130
|
+
return `1.0.${Math.floor(Date.now() / 1000)}`;
|
|
5131
|
+
}
|
|
5132
|
+
async function defaultGetSolutionBuilder(solutionDir) {
|
|
5133
|
+
const services = await createResourceBuilderServices();
|
|
5134
|
+
return services.getSolutionBuilder(solutionDir, true);
|
|
5135
|
+
}
|
|
5136
|
+
async function provisionSolutionForDebugAsync(options, deps = {}) {
|
|
5137
|
+
const listLocations = deps.listLocations ?? listSelectablePublishLocations;
|
|
5138
|
+
const pack = deps.pack ?? packSolutionAsync;
|
|
5139
|
+
const publish = deps.publish ?? publishSolutionAsync;
|
|
5140
|
+
const getBuilder = deps.getSolutionBuilder ?? defaultGetSolutionBuilder;
|
|
5141
|
+
const newSessionId = deps.newSessionId ?? (() => crypto.randomUUID());
|
|
5142
|
+
const authOptions = {
|
|
5143
|
+
tenant: options.tenant,
|
|
5144
|
+
loginValidity: options.loginValidity
|
|
5145
|
+
};
|
|
5146
|
+
const getDebugStatus = deps.getDebugStatus ?? (async (solutionKey2, debugSessionId) => {
|
|
5147
|
+
const auth = await getSolutionAuthContext(authOptions);
|
|
5148
|
+
return getProjectDebugStatus({ basePath: auth.basePath, accessToken: auth.accessToken }, solutionKey2, debugSessionId);
|
|
5149
|
+
});
|
|
5150
|
+
logger.info("Resolving the personal workspace to deploy into...");
|
|
5151
|
+
const [locationsError, locations] = await catchError(listLocations(authOptions));
|
|
5152
|
+
if (locationsError) {
|
|
5153
|
+
return fail2(`Could not resolve a personal workspace to deploy into: ${locationsError.message}`);
|
|
5154
|
+
}
|
|
5155
|
+
const personal = locations.find((l) => l.isMyPersonalWorkspace);
|
|
5156
|
+
if (!personal) {
|
|
5157
|
+
return fail2("This account has no personal workspace, so there is nowhere to deploy the solution for a debug run. " + "Ask an administrator to enable a personal workspace, or run with --no-provision-resources — " + "the run then starts without a deployment, and cross-project calls will not resolve.");
|
|
5158
|
+
}
|
|
5159
|
+
const version = options.version ?? nextDebugVersion();
|
|
5160
|
+
const fs = getFileSystem();
|
|
5161
|
+
const outputPath = fs.path.join(fs.env.tmpdir(), "uip-solution-run", newSessionId());
|
|
5162
|
+
const uploaded = await packAndUploadAsync({
|
|
5163
|
+
options,
|
|
5164
|
+
authOptions,
|
|
5165
|
+
pack,
|
|
5166
|
+
publish,
|
|
5167
|
+
version,
|
|
5168
|
+
outputPath
|
|
5169
|
+
});
|
|
5170
|
+
if (!uploaded.ok) {
|
|
5171
|
+
return fail2(uploaded.message);
|
|
5172
|
+
}
|
|
5173
|
+
const packageVersionKey = uploaded.packageVersionKey;
|
|
5174
|
+
logger.info("Provisioning the solution's resources for the run...");
|
|
5175
|
+
const [builderError, builder] = await catchError(getBuilder(options.solutionDir));
|
|
5176
|
+
if (builderError) {
|
|
5177
|
+
return fail2(`Could not read the solution: ${builderError.message}`);
|
|
5178
|
+
}
|
|
5179
|
+
const sessionId = newSessionId();
|
|
5180
|
+
const [debugError, debug] = await catchError(builder.debugProjectAsync(personal.key, options.solutionName, sessionId, packageVersionKey, true));
|
|
5181
|
+
let solutionKey;
|
|
5182
|
+
if (!debugError && debug.complete === false) {
|
|
5183
|
+
const [, definition] = await catchError(builder.context.loadAsync());
|
|
5184
|
+
solutionKey = definition?.key;
|
|
5185
|
+
}
|
|
5186
|
+
await builder.disposeAsync().catch(() => {});
|
|
5187
|
+
if (debugError) {
|
|
5188
|
+
return fail2(`Provisioning the solution failed: ${debugError.message}`);
|
|
5189
|
+
}
|
|
5190
|
+
if (debug.complete === false) {
|
|
5191
|
+
if (!solutionKey) {
|
|
5192
|
+
return fail2("The cloud is still provisioning the solution, but its key could not be read back from the .uipx, so the provisioning cannot be waited on. Retry the run.");
|
|
5193
|
+
}
|
|
5194
|
+
return waitForProvisioningAsync({
|
|
5195
|
+
solutionKey,
|
|
5196
|
+
sessionId,
|
|
5197
|
+
packageVersionKey,
|
|
5198
|
+
options,
|
|
5199
|
+
getDebugStatus
|
|
5200
|
+
});
|
|
5201
|
+
}
|
|
5202
|
+
const folderPath = debug.folderFullyQualifiedName;
|
|
5203
|
+
logger.info(folderPath ? `Solution provisioned into ${folderPath}.` : "Solution provisioned.");
|
|
5204
|
+
return {
|
|
5205
|
+
ok: true,
|
|
5206
|
+
folderPath,
|
|
5207
|
+
packageVersionKey
|
|
5208
|
+
};
|
|
5209
|
+
}
|
|
5210
|
+
function fail2(message) {
|
|
5211
|
+
return { ok: false, message };
|
|
5212
|
+
}
|
|
5213
|
+
async function packAndUploadAsync(args) {
|
|
5214
|
+
const { options, authOptions, version } = args;
|
|
5215
|
+
logger.info("Packing the solution...");
|
|
5216
|
+
const [packError, packed] = await catchError(args.pack(options.solutionDir, {
|
|
5217
|
+
output: args.outputPath,
|
|
5218
|
+
name: options.solutionName,
|
|
5219
|
+
version,
|
|
5220
|
+
loginValidity: options.loginValidity
|
|
5221
|
+
}));
|
|
5222
|
+
if (packError) {
|
|
5223
|
+
return {
|
|
5224
|
+
ok: false,
|
|
5225
|
+
message: `Packing the solution failed: ${packError.message}`
|
|
5226
|
+
};
|
|
5227
|
+
}
|
|
5228
|
+
if (!packed.ok) {
|
|
5229
|
+
return {
|
|
5230
|
+
ok: false,
|
|
5231
|
+
message: `Packing the solution failed: ${packed.message}`
|
|
5232
|
+
};
|
|
5233
|
+
}
|
|
5234
|
+
const packagePath = packed.packages?.[0];
|
|
5235
|
+
if (!packagePath) {
|
|
5236
|
+
return {
|
|
5237
|
+
ok: false,
|
|
5238
|
+
message: "Packing the solution produced no package."
|
|
5239
|
+
};
|
|
5240
|
+
}
|
|
5241
|
+
logger.info("Uploading the solution to the personal workspace...");
|
|
5242
|
+
const [publishError, published] = await catchError(args.publish(packagePath, {
|
|
5243
|
+
...authOptions,
|
|
5244
|
+
personalWorkspace: true,
|
|
5245
|
+
packageVersion: version
|
|
5246
|
+
}));
|
|
5247
|
+
if (publishError) {
|
|
5248
|
+
return {
|
|
5249
|
+
ok: false,
|
|
5250
|
+
message: `Uploading the solution failed: ${publishError.message}`
|
|
5251
|
+
};
|
|
5252
|
+
}
|
|
5253
|
+
if (!published.ok) {
|
|
5254
|
+
return {
|
|
5255
|
+
ok: false,
|
|
5256
|
+
message: `Uploading the solution failed: ${published.message}`
|
|
5257
|
+
};
|
|
5258
|
+
}
|
|
5259
|
+
if (!published.packageVersionKey) {
|
|
5260
|
+
return {
|
|
5261
|
+
ok: false,
|
|
5262
|
+
message: "The solution was uploaded but the feed did not report a package version, so it cannot be provisioned. Retry the run."
|
|
5263
|
+
};
|
|
5264
|
+
}
|
|
5265
|
+
return { ok: true, packageVersionKey: published.packageVersionKey };
|
|
5266
|
+
}
|
|
5267
|
+
async function waitForProvisioningAsync(args) {
|
|
5268
|
+
const { solutionKey, sessionId, packageVersionKey, options } = args;
|
|
5269
|
+
const timeoutMs = options.provisioningTimeoutMs ?? 360000;
|
|
5270
|
+
logger.info("Waiting for the cloud to finish provisioning...");
|
|
5271
|
+
const poll = await pollUntil({
|
|
5272
|
+
fn: () => args.getDebugStatus(solutionKey, sessionId),
|
|
5273
|
+
until: (info2) => isDebugProvisioningTerminal(info2.status),
|
|
5274
|
+
getStatus: (info2) => info2.status ?? "pending",
|
|
5275
|
+
label: `solution provisioning (session ${sessionId})`,
|
|
5276
|
+
logPrefix: "provision",
|
|
5277
|
+
timeoutMs,
|
|
5278
|
+
intervalMs: options.provisioningPollIntervalMs ?? 5000,
|
|
5279
|
+
maxConsecutiveErrors: 5,
|
|
5280
|
+
signal: processContext.pollSignal
|
|
5281
|
+
});
|
|
5282
|
+
if (poll.outcome !== PollOutcome.Completed || !poll.data) {
|
|
5283
|
+
return fail2(describeIncompleteWait(poll, timeoutMs));
|
|
5284
|
+
}
|
|
5285
|
+
const info = poll.data;
|
|
5286
|
+
if (!isDebugProvisioningSucceeded(info.status)) {
|
|
5287
|
+
const details = (info.errors ?? []).map((error) => error.resource ? `${error.resource.kind ?? "resource"} '${error.resource.name ?? error.resource.key ?? ""}': ${error.message}` : error.message).join(`
|
|
5288
|
+
`);
|
|
5289
|
+
return fail2(`Provisioning the solution failed (${info.status}).` + (details ? `
|
|
5290
|
+
${details}` : ""));
|
|
5291
|
+
}
|
|
5292
|
+
logger.info("Solution provisioned.");
|
|
5293
|
+
return { ok: true, packageVersionKey };
|
|
5294
|
+
}
|
|
5295
|
+
function describeIncompleteWait(poll, timeoutMs) {
|
|
5296
|
+
const lastStatus = poll.data?.status ?? "unknown";
|
|
5297
|
+
if (poll.outcome === PollOutcome.Interrupted) {
|
|
5298
|
+
return `The wait for the solution's provisioning was cancelled (last status: ${lastStatus}). ` + "The cloud may still finish it.";
|
|
5299
|
+
}
|
|
5300
|
+
if (poll.outcome === PollOutcome.Failed || poll.outcome === PollOutcome.Aborted) {
|
|
5301
|
+
return `Checking the solution's provisioning status failed: ${poll.error?.message ?? "too many consecutive errors"} ` + `(last status: ${lastStatus}). The provisioning itself may still be running or have finished — ` + "retry the run to check.";
|
|
5302
|
+
}
|
|
5303
|
+
return `The solution was uploaded, but the cloud did not finish provisioning it within ${Math.round(timeoutMs / 1000)}s ` + `(last status: ${lastStatus}). ` + "Running again will not help: each run uploads a new version and provisions that one too. " + "To run a project that calls another project, deploy the solution once " + "('uip solution pack' → 'publish' → 'deploy run') and then run with " + "--no-provision-resources --folder-path <deployed folder>.";
|
|
5304
|
+
}
|
|
5305
|
+
|
|
5306
|
+
// src/services/run-service.ts
|
|
5307
|
+
async function runSolutionAsync(options, deps, cancellationToken) {
|
|
5308
|
+
const { fileSystem } = deps;
|
|
5309
|
+
const solutionDir = fileSystem.path.resolve(options.solutionPath);
|
|
5310
|
+
const [readError, projects] = await catchError(readSolutionProjects(solutionDir, fileSystem));
|
|
5311
|
+
if (readError) {
|
|
5312
|
+
return RunResult.failed("InvalidInput" /* InvalidInput */, readError.message);
|
|
5313
|
+
}
|
|
5314
|
+
const runnable = projects.filter((p) => hasExecutorToolFor(p.projectType));
|
|
5315
|
+
if (runnable.length === 0) {
|
|
5316
|
+
const seen = projects.map((p) => `${p.name} (${p.projectType})`).join(", ") || "none";
|
|
5317
|
+
return RunResult.failed("UnsupportedProjectType" /* UnsupportedProjectType */, `No project in this solution can be run. Projects: ${seen}.`);
|
|
5318
|
+
}
|
|
5319
|
+
const [selectionError, selected] = selectProject(runnable, options.projectName);
|
|
5320
|
+
if (selectionError) {
|
|
5321
|
+
return RunResult.failed("InvalidInput" /* InvalidInput */, selectionError);
|
|
5322
|
+
}
|
|
5323
|
+
const provision = deps.provisionForDebug ?? provisionSolutionForDebugAsync;
|
|
5324
|
+
const shouldProvision = options.provisionResources ?? projects.length > 1;
|
|
5325
|
+
const [executorOutcome, provisionOutcome] = await Promise.allSettled([
|
|
5326
|
+
ensureExecutorTools([selected.projectType]),
|
|
5327
|
+
shouldProvision ? provision({
|
|
5328
|
+
solutionDir,
|
|
5329
|
+
solutionName: fileSystem.path.basename(solutionDir),
|
|
5330
|
+
tenant: options.tenant,
|
|
5331
|
+
loginValidity: options.loginValidity
|
|
5332
|
+
}) : Promise.resolve(undefined)
|
|
5333
|
+
]);
|
|
5334
|
+
if (executorOutcome.status === "rejected") {
|
|
5335
|
+
return RunResult.failed("PrepareFailed" /* PrepareFailed */, `Could not load the executor for project type '${selected.projectType}': ${describeError(executorOutcome.reason)}`);
|
|
5336
|
+
}
|
|
5337
|
+
if (provisionOutcome.status === "rejected") {
|
|
5338
|
+
return RunResult.failed("PrepareFailed" /* PrepareFailed */, `Could not deploy the solution before the run: ${describeError(provisionOutcome.reason)}`);
|
|
5339
|
+
}
|
|
5340
|
+
let folderPath = options.folderPath;
|
|
5341
|
+
const provisioned = provisionOutcome.value;
|
|
5342
|
+
if (provisioned) {
|
|
5343
|
+
if (!provisioned.ok) {
|
|
5344
|
+
return RunResult.failed("PrepareFailed" /* PrepareFailed */, provisioned.message ?? "Could not deploy the solution before the run.");
|
|
5345
|
+
}
|
|
5346
|
+
folderPath = provisioned.folderPath;
|
|
5347
|
+
}
|
|
5348
|
+
const projectPath = fileSystem.path.resolve(solutionDir, selected.relativePath);
|
|
5349
|
+
logger.debug(`Running '${selected.name}' (${selected.projectType}) from ${projectPath}` + `${options.entryPoint ? ` with entry point ${options.entryPoint}` : " with its default entry point"}`);
|
|
5350
|
+
const connection = await resolveConnection(folderPath, options, deps);
|
|
5351
|
+
const runner = new ProjectRunner({
|
|
5352
|
+
fileSystem,
|
|
5353
|
+
logger: deps.logger
|
|
5354
|
+
});
|
|
5355
|
+
return runner.runAsync({
|
|
5356
|
+
project: {
|
|
5357
|
+
name: selected.name,
|
|
5358
|
+
projectType: selected.projectType,
|
|
5359
|
+
projectPath
|
|
5360
|
+
},
|
|
5361
|
+
entryPoint: options.entryPoint,
|
|
5362
|
+
inputArguments: options.inputArguments,
|
|
5363
|
+
target: "Local" /* Local */,
|
|
5364
|
+
connection,
|
|
5365
|
+
siblingProjects: projects.filter((p) => p !== selected).map((p) => ({
|
|
5366
|
+
name: p.name,
|
|
5367
|
+
projectType: p.projectType,
|
|
5368
|
+
projectPath: fileSystem.path.resolve(solutionDir, p.relativePath)
|
|
5369
|
+
})),
|
|
5370
|
+
timeoutMs: options.timeoutMs
|
|
5371
|
+
}, cancellationToken);
|
|
5372
|
+
}
|
|
5373
|
+
async function resolveConnection(folderPath, options, deps) {
|
|
5374
|
+
const getLoginStatus = deps.getLoginStatus ?? getLoginStatusAsync;
|
|
5375
|
+
const [loginError, status] = await catchError(getLoginStatus({
|
|
5376
|
+
ensureTokenValidityMinutes: options.loginValidity
|
|
5377
|
+
}));
|
|
5378
|
+
if (loginError || status.loginStatus !== "Logged in") {
|
|
5379
|
+
logger.debug(`No signed-in session for the run: ${loginError?.message ?? status.loginStatus}. ` + "A project type that needs one will say so.");
|
|
5380
|
+
return {
|
|
5381
|
+
folderPath,
|
|
5382
|
+
baseUrl: "",
|
|
5383
|
+
accessToken: "",
|
|
5384
|
+
organizationId: "",
|
|
5385
|
+
organizationName: ""
|
|
5386
|
+
};
|
|
5387
|
+
}
|
|
5388
|
+
return {
|
|
5389
|
+
folderPath,
|
|
5390
|
+
baseUrl: status.baseUrl ?? "",
|
|
5391
|
+
accessToken: status.accessToken ?? "",
|
|
5392
|
+
organizationId: status.organizationId ?? "",
|
|
5393
|
+
organizationName: status.organizationName ?? "",
|
|
5394
|
+
tenantId: status.tenantId,
|
|
5395
|
+
tenantName: status.tenantName
|
|
5396
|
+
};
|
|
5397
|
+
}
|
|
5398
|
+
function describeError(reason) {
|
|
5399
|
+
return reason instanceof Error ? reason.message : String(reason);
|
|
5400
|
+
}
|
|
5401
|
+
function selectProject(runnable, requested) {
|
|
5402
|
+
if (requested) {
|
|
5403
|
+
const match = runnable.find((p) => p.name === requested);
|
|
5404
|
+
if (!match) {
|
|
5405
|
+
const names = runnable.map((p) => p.name).join(", ");
|
|
5406
|
+
return [
|
|
5407
|
+
`Project '${requested}' is not a runnable project in this solution. Runnable projects: ${names}.`,
|
|
5408
|
+
runnable[0]
|
|
5409
|
+
];
|
|
5410
|
+
}
|
|
5411
|
+
return [undefined, match];
|
|
5412
|
+
}
|
|
5413
|
+
if (runnable.length > 1) {
|
|
5414
|
+
const names = runnable.map((p) => p.name).join(", ");
|
|
5415
|
+
return [
|
|
5416
|
+
`This solution has more than one runnable project, so one has to be named with --project-name. Runnable projects: ${names}.`,
|
|
5417
|
+
runnable[0]
|
|
5418
|
+
];
|
|
5419
|
+
}
|
|
5420
|
+
return [undefined, runnable[0]];
|
|
5421
|
+
}
|
|
5422
|
+
|
|
5423
|
+
// src/commands/run.ts
|
|
5424
|
+
var ERROR_CODE_BY_RUN_ERROR = {
|
|
5425
|
+
["InvalidInput" /* InvalidInput */]: "invalid_argument",
|
|
5426
|
+
["UnsupportedProjectType" /* UnsupportedProjectType */]: "invalid_argument",
|
|
5427
|
+
["Unauthorized" /* Unauthorized */]: "authentication_required",
|
|
5428
|
+
["Timeout" /* Timeout */]: "timeout"
|
|
5429
|
+
};
|
|
5430
|
+
var NEVER_STARTED = new Set([
|
|
5431
|
+
"InvalidInput" /* InvalidInput */,
|
|
5432
|
+
"UnsupportedProjectType" /* UnsupportedProjectType */,
|
|
5433
|
+
"Unauthorized" /* Unauthorized */
|
|
5434
|
+
]);
|
|
5435
|
+
var registerRunCommand = (program) => {
|
|
5436
|
+
program.command("run", { hidden: true }).description("Run a project from a UiPath solution. Currently supports RPA projects, agents and API Workflows.").argument("<solutionPath>", "Path to a solution directory (containing .uipx)").option("--project-name <name>", "Name of the project to run. Required only when the solution has more than one runnable project.").option("--entry-point <path>", "Entry point to execute (for RPA, a workflow such as Main.xaml). Defaults to the project's own entry point.").option("--input-arguments <json>", `Input arguments for the entry point, as a JSON object string (e.g. '{"name": "World"}').`).option("--folder-path <path>", "Orchestrator folder the run reports itself under, when the runtime needs one. Ignored when the solution is deployed, which uses the folder it deploys into.").option("--provision-resources", "Pack and deploy the solution into your personal workspace before running, even when the solution holds a single project. Done automatically for a solution with more than one project.").option("--no-provision-resources", "Run without deploying the solution first. Cross-project calls will not resolve.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10).", Number.parseInt, 10).trackedAction(processContext, async (solutionPath, options) => {
|
|
5437
|
+
const [inputError, inputArguments] = parseInputArguments(options.inputArguments);
|
|
5438
|
+
if (inputError) {
|
|
5439
|
+
OutputFormatter.error({
|
|
5440
|
+
Result: RESULTS.Failure,
|
|
5441
|
+
Message: "Failed to run solution",
|
|
5442
|
+
Instructions: inputError,
|
|
5443
|
+
ErrorCode: "invalid_argument"
|
|
5444
|
+
});
|
|
5445
|
+
processContext.exit(1);
|
|
5446
|
+
return;
|
|
5447
|
+
}
|
|
5448
|
+
const result = await runSolutionAsync({
|
|
5449
|
+
solutionPath,
|
|
5450
|
+
projectName: options.projectName,
|
|
5451
|
+
entryPoint: options.entryPoint,
|
|
5452
|
+
inputArguments,
|
|
5453
|
+
folderPath: options.folderPath,
|
|
5454
|
+
provisionResources: options.provisionResources,
|
|
5455
|
+
loginValidity: options.loginValidity
|
|
5456
|
+
}, { fileSystem: getFileSystem(), logger });
|
|
5457
|
+
if (!result.isSuccess) {
|
|
5458
|
+
OutputFormatter.error({
|
|
5459
|
+
Result: RESULTS.Failure,
|
|
5460
|
+
Message: result.message ?? "The run did not succeed.",
|
|
5461
|
+
Instructions: NEVER_STARTED.has(result.errorCode) ? `The run did not start (${result.errorCode}).` : `Run ended with status '${result.status}' (${result.errorCode}).`,
|
|
5462
|
+
ErrorCode: ERROR_CODE_BY_RUN_ERROR[result.errorCode],
|
|
5463
|
+
Data: dataOrUndefined({
|
|
5464
|
+
JobKey: result.jobKey,
|
|
5465
|
+
TraceId: result.traceId
|
|
5466
|
+
})
|
|
5467
|
+
});
|
|
5468
|
+
processContext.exit(1);
|
|
5469
|
+
return;
|
|
5470
|
+
}
|
|
5471
|
+
OutputFormatter.success({
|
|
5472
|
+
Result: RESULTS.Success,
|
|
5473
|
+
Code: "SolutionRun",
|
|
5474
|
+
Data: {
|
|
5475
|
+
Status: result.status,
|
|
5476
|
+
EntryPoint: result.details?.entryPoint,
|
|
5477
|
+
...dataOrUndefined({
|
|
5478
|
+
JobKey: result.jobKey,
|
|
5479
|
+
TraceId: result.traceId
|
|
5480
|
+
}),
|
|
5481
|
+
Output: result.output
|
|
5482
|
+
}
|
|
5483
|
+
}, { preserveDataKeys: true });
|
|
5484
|
+
});
|
|
5485
|
+
};
|
|
5486
|
+
function dataOrUndefined(data) {
|
|
5487
|
+
const present = Object.entries(data).filter(([, value]) => value);
|
|
5488
|
+
return present.length > 0 ? Object.fromEntries(present) : undefined;
|
|
5489
|
+
}
|
|
5490
|
+
function parseInputArguments(raw) {
|
|
5491
|
+
if (raw === undefined)
|
|
5492
|
+
return [undefined, undefined];
|
|
5493
|
+
const [parseError, parsed] = catchError(() => JSON.parse(raw));
|
|
5494
|
+
if (parseError) {
|
|
5495
|
+
return [
|
|
5496
|
+
`--input-arguments is not valid JSON: ${parseError.message}. Provide a JSON object (e.g. '{"name": "World"}').`,
|
|
5497
|
+
undefined
|
|
5498
|
+
];
|
|
5499
|
+
}
|
|
5500
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
5501
|
+
return [
|
|
5502
|
+
`--input-arguments must be a JSON object keyed by argument name (e.g. '{"name": "World"}'), not ${describeJson(parsed)}.`,
|
|
5503
|
+
undefined
|
|
5504
|
+
];
|
|
5505
|
+
}
|
|
5506
|
+
return [undefined, parsed];
|
|
5507
|
+
}
|
|
5508
|
+
function describeJson(value) {
|
|
5509
|
+
if (value === null)
|
|
5510
|
+
return "null";
|
|
5511
|
+
return Array.isArray(value) ? "an array" : `a ${typeof value}`;
|
|
5512
|
+
}
|
|
4805
5513
|
|
|
4806
5514
|
// src/commands/upload.ts
|
|
4807
5515
|
var SOLUTION_UPLOAD_EXAMPLES = [
|
|
@@ -5004,6 +5712,7 @@ var registerCommands = async (program) => {
|
|
|
5004
5712
|
registerPackCommand(program);
|
|
5005
5713
|
registerCleanupCommand(program);
|
|
5006
5714
|
registerRestoreCommand(program);
|
|
5715
|
+
registerRunCommand(program);
|
|
5007
5716
|
registerDownloadCommand(program);
|
|
5008
5717
|
registerNewCommand(program);
|
|
5009
5718
|
registerProjectCommand(program);
|
|
@@ -5012,9 +5721,13 @@ var registerCommands = async (program) => {
|
|
|
5012
5721
|
registerUploadCommand(program);
|
|
5013
5722
|
registerResourceCommand(program);
|
|
5014
5723
|
registerDeleteCommand(program);
|
|
5724
|
+
if (isPreviewBuild()) {
|
|
5725
|
+
const { registerListCommand } = await import("./list-kbscmb2k.js");
|
|
5726
|
+
registerListCommand(program);
|
|
5727
|
+
}
|
|
5015
5728
|
previewOnly(() => registerFeedsCommand(program));
|
|
5016
5729
|
};
|
|
5017
5730
|
|
|
5018
5731
|
export { metadata, registerCommands };
|
|
5019
5732
|
|
|
5020
|
-
//# debugId=
|
|
5733
|
+
//# debugId=D007EDE6C925CE2364756E2164756E21
|