@uipath/solution-tool 1.201.0-preview.115 → 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/deploy.js +6 -4
- package/dist/index.js +12 -9
- package/dist/init.d.ts +6 -8
- package/dist/init.js +5 -4
- package/dist/list-kbscmb2k.js +378 -0
- package/dist/pack.js +5 -4
- package/dist/{packager-tool-9x8dbxbn.js → packager-tool-112c30jx.js} +177 -110
- package/dist/{packager-tool-arbagkf2.js → packager-tool-550smwcc.js} +423 -1652
- package/dist/{packager-tool-85x8cje1.js → packager-tool-67ssxgph.js} +1 -1
- package/dist/{packager-tool-c84z58bt.js → packager-tool-95fz7yd0.js} +10 -6
- package/dist/{packager-tool-r9n45rjm.js → packager-tool-bcpknnr8.js} +2526 -6655
- package/dist/packager-tool-fzwxq48d.js +4225 -0
- package/dist/{packager-tool-ngh4qwjv.js → packager-tool-krd5v2r5.js} +6 -4
- package/dist/{packager-tool-y35nbbkm.js → packager-tool-nkgvv7yh.js} +13 -8
- package/dist/{packager-tool-n49qbf8m.js → packager-tool-v33bpncw.js} +80 -16
- package/dist/packager-tool-va301fjh.js +1477 -0
- package/dist/packager-tool-yktm4v4r.js +67 -0
- package/dist/publish.js +6 -4
- package/dist/resource.d.ts +2 -3
- package/dist/resource.js +4 -3
- package/dist/services/deployment-search.d.ts +1 -1
- package/dist/tool.js +12 -9
- package/package.json +2 -2
|
@@ -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,
|
|
@@ -22,31 +26,36 @@ import {
|
|
|
22
26
|
readSolutionFileAsUint8Array,
|
|
23
27
|
resolveSdkLogLevel,
|
|
24
28
|
validateGovernanceOptions
|
|
25
|
-
} from "./packager-tool-
|
|
29
|
+
} from "./packager-tool-nkgvv7yh.js";
|
|
26
30
|
import {
|
|
27
31
|
publishSolutionAsync
|
|
28
|
-
} from "./packager-tool-
|
|
32
|
+
} from "./packager-tool-95fz7yd0.js";
|
|
29
33
|
import {
|
|
30
34
|
Configuration,
|
|
31
|
-
|
|
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,
|
|
32
45
|
DeploymentActivationStatus,
|
|
33
46
|
DeploymentOperationStatus,
|
|
34
47
|
DeploymentsApi,
|
|
35
48
|
PackagesApi,
|
|
36
|
-
PipelinesApi,
|
|
37
49
|
SearchApi,
|
|
38
50
|
bundleSolution,
|
|
39
|
-
|
|
40
|
-
feedScopeInitOverride,
|
|
41
|
-
folderKeyInitOverride,
|
|
51
|
+
getProjectDebugStatus,
|
|
42
52
|
importSolution,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
resolvePersonalWorkspace,
|
|
53
|
+
isDebugProvisioningSucceeded,
|
|
54
|
+
isDebugProvisioningTerminal,
|
|
46
55
|
searchPackageVersions,
|
|
47
56
|
solutionExistsOnStudioWeb,
|
|
48
57
|
uploadOrOverwriteSolution
|
|
49
|
-
} from "./packager-tool-
|
|
58
|
+
} from "./packager-tool-550smwcc.js";
|
|
50
59
|
import {
|
|
51
60
|
Tokens,
|
|
52
61
|
applyEntryPointEnhancementAsync,
|
|
@@ -67,10 +76,13 @@ import {
|
|
|
67
76
|
syncAndLog,
|
|
68
77
|
syncResourcesFromBindings,
|
|
69
78
|
writeSolutionFile
|
|
70
|
-
} from "./packager-tool-
|
|
79
|
+
} from "./packager-tool-krd5v2r5.js";
|
|
71
80
|
import {
|
|
72
81
|
ToolResult
|
|
73
82
|
} from "./packager-tool-vpr77gre.js";
|
|
83
|
+
import {
|
|
84
|
+
getSolutionAuthContext
|
|
85
|
+
} from "./packager-tool-fzwxq48d.js";
|
|
74
86
|
import {
|
|
75
87
|
DEFAULT_PAGE_SIZE,
|
|
76
88
|
Option,
|
|
@@ -82,9 +94,7 @@ import {
|
|
|
82
94
|
createHiddenDeprecatedTenantOption,
|
|
83
95
|
extractErrorDetails,
|
|
84
96
|
extractErrorMessage,
|
|
85
|
-
getAuthContext,
|
|
86
97
|
getLoginStatusAsync,
|
|
87
|
-
getSolutionAuthContext,
|
|
88
98
|
isPreviewBuild,
|
|
89
99
|
logger,
|
|
90
100
|
mapPackageMetadataOptions,
|
|
@@ -103,18 +113,21 @@ import {
|
|
|
103
113
|
unsupportedSolutionProjectType,
|
|
104
114
|
updateUipxSolutionId,
|
|
105
115
|
withCompleter
|
|
106
|
-
} from "./packager-tool-
|
|
116
|
+
} from "./packager-tool-bcpknnr8.js";
|
|
107
117
|
import {
|
|
108
118
|
getFileSystem
|
|
109
119
|
} from "./packager-tool-7eva0peq.js";
|
|
110
120
|
import {
|
|
111
121
|
unzipSync
|
|
112
122
|
} from "./packager-tool-129wn232.js";
|
|
123
|
+
import {
|
|
124
|
+
__require
|
|
125
|
+
} from "./packager-tool-0v6na3yp.js";
|
|
113
126
|
// package.json
|
|
114
127
|
var package_default = {
|
|
115
128
|
name: "@uipath/solution-tool",
|
|
116
129
|
license: "MIT",
|
|
117
|
-
version: "1.201.0-preview.
|
|
130
|
+
version: "1.201.0-preview.121",
|
|
118
131
|
description: "Create, pack, publish, and deploy UiPath Automation Solutions.",
|
|
119
132
|
repository: {
|
|
120
133
|
type: "git",
|
|
@@ -382,7 +395,7 @@ async function deleteSolutionOnStudioWeb(baseUrl, organizationName, tenantId, ac
|
|
|
382
395
|
}
|
|
383
396
|
}
|
|
384
397
|
var registerDeleteCommand = (program) => {
|
|
385
|
-
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) => {
|
|
386
399
|
if (!requireConfirmation(options, `delete solution '${solutionId}'`)) {
|
|
387
400
|
return;
|
|
388
401
|
}
|
|
@@ -413,7 +426,7 @@ var registerDeleteCommand = (program) => {
|
|
|
413
426
|
OutputFormatter.error({
|
|
414
427
|
Result: RESULTS.Failure,
|
|
415
428
|
Message: errorMessage,
|
|
416
|
-
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." : "")
|
|
417
430
|
});
|
|
418
431
|
processContext.exit(1);
|
|
419
432
|
return;
|
|
@@ -1646,61 +1659,6 @@ async function extractArchive(archivePath, destinationDir) {
|
|
|
1646
1659
|
await extractZipDataToDir(fs, data, destinationDir);
|
|
1647
1660
|
}
|
|
1648
1661
|
|
|
1649
|
-
// src/services/studio-web-auth-middleware.ts
|
|
1650
|
-
var studioWebAuthByCommand = new WeakMap;
|
|
1651
|
-
function useStudioWebAuth(command, options = {}) {
|
|
1652
|
-
return command.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
1653
|
-
const commandOptions = actionCommand.opts();
|
|
1654
|
-
const [error, auth] = await catchError(resolveStudioWebAuthContext({
|
|
1655
|
-
...options,
|
|
1656
|
-
loginValidity: commandOptions.loginValidity,
|
|
1657
|
-
tenant: commandOptions.tenant
|
|
1658
|
-
}));
|
|
1659
|
-
studioWebAuthByCommand.set(actionCommand, error ? { error } : { auth });
|
|
1660
|
-
});
|
|
1661
|
-
}
|
|
1662
|
-
function getStudioWebAuth(command) {
|
|
1663
|
-
const state = studioWebAuthByCommand.get(command);
|
|
1664
|
-
if (!state) {
|
|
1665
|
-
throw new Error("Studio Web auth middleware was not registered for this command.");
|
|
1666
|
-
}
|
|
1667
|
-
if (state.error) {
|
|
1668
|
-
throw state.error;
|
|
1669
|
-
}
|
|
1670
|
-
return state.auth;
|
|
1671
|
-
}
|
|
1672
|
-
function getStudioWebAuthWithOrganizationId(command) {
|
|
1673
|
-
const auth = getStudioWebAuth(command);
|
|
1674
|
-
if (!auth.organizationId) {
|
|
1675
|
-
throw new Error("Organization ID not available. Ensure you are logged in with an organization context.");
|
|
1676
|
-
}
|
|
1677
|
-
return {
|
|
1678
|
-
...auth,
|
|
1679
|
-
organizationId: auth.organizationId
|
|
1680
|
-
};
|
|
1681
|
-
}
|
|
1682
|
-
async function resolveStudioWebAuthContext(options) {
|
|
1683
|
-
if (Number.isNaN(options.loginValidity)) {
|
|
1684
|
-
throw new Error(`Invalid --login-validity value: ${options.loginValidity}`);
|
|
1685
|
-
}
|
|
1686
|
-
const ctx = await getAuthContext({
|
|
1687
|
-
tenant: options.tenant,
|
|
1688
|
-
ensureTokenValidityMinutes: options.loginValidity,
|
|
1689
|
-
requireOrganizationId: options.requireOrganizationId,
|
|
1690
|
-
requireOrganizationName: options.requireOrganizationName,
|
|
1691
|
-
requireTenantId: options.requireTenantId,
|
|
1692
|
-
requireTenantName: options.requireTenantName
|
|
1693
|
-
});
|
|
1694
|
-
return {
|
|
1695
|
-
accessToken: ctx.accessToken,
|
|
1696
|
-
baseUrl: ctx.baseUrl,
|
|
1697
|
-
organizationId: ctx.organizationId,
|
|
1698
|
-
organizationName: ctx.organizationName,
|
|
1699
|
-
tenantId: ctx.tenantId,
|
|
1700
|
-
tenantName: ctx.tenantName
|
|
1701
|
-
};
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
1662
|
// src/commands/download.ts
|
|
1705
1663
|
var SOLUTION_DOWNLOAD_EXAMPLES = [
|
|
1706
1664
|
{
|
|
@@ -1725,7 +1683,7 @@ function registerDownloadCommand(program) {
|
|
|
1725
1683
|
OutputFormatter.error({
|
|
1726
1684
|
Result: RESULTS.Failure,
|
|
1727
1685
|
Message: "Failed to download solution",
|
|
1728
|
-
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." : "")
|
|
1729
1687
|
});
|
|
1730
1688
|
processContext.exit(1);
|
|
1731
1689
|
}
|
|
@@ -5110,11 +5068,13 @@ var PROJECT_TYPE_TO_TOOL = new Map([
|
|
|
5110
5068
|
["Process", "rpa"],
|
|
5111
5069
|
["Tests", "rpa"],
|
|
5112
5070
|
["WebApp", "rpa"],
|
|
5113
|
-
["Agent", "agent"]
|
|
5071
|
+
["Agent", "agent"],
|
|
5072
|
+
["Api", "api-workflow"]
|
|
5114
5073
|
]);
|
|
5115
5074
|
var TOOL_TO_PACKAGE = new Map([
|
|
5116
5075
|
["rpa", "@uipath/rpa-tool"],
|
|
5117
|
-
["agent", "@uipath/agent-tool"]
|
|
5076
|
+
["agent", "@uipath/agent-tool"],
|
|
5077
|
+
["api-workflow", "@uipath/api-workflow-tool"]
|
|
5118
5078
|
]);
|
|
5119
5079
|
function hasExecutorToolFor(projectType) {
|
|
5120
5080
|
return PROJECT_TYPE_TO_TOOL.has(projectType);
|
|
@@ -5183,6 +5143,10 @@ async function provisionSolutionForDebugAsync(options, deps = {}) {
|
|
|
5183
5143
|
tenant: options.tenant,
|
|
5184
5144
|
loginValidity: options.loginValidity
|
|
5185
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
|
+
});
|
|
5186
5150
|
logger.info("Resolving the personal workspace to deploy into...");
|
|
5187
5151
|
const [locationsError, locations] = await catchError(listLocations(authOptions));
|
|
5188
5152
|
if (locationsError) {
|
|
@@ -5195,61 +5159,148 @@ async function provisionSolutionForDebugAsync(options, deps = {}) {
|
|
|
5195
5159
|
const version = options.version ?? nextDebugVersion();
|
|
5196
5160
|
const fs = getFileSystem();
|
|
5197
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;
|
|
5198
5215
|
logger.info("Packing the solution...");
|
|
5199
|
-
const [packError, packed] = await catchError(pack(options.solutionDir, {
|
|
5200
|
-
output: outputPath,
|
|
5216
|
+
const [packError, packed] = await catchError(args.pack(options.solutionDir, {
|
|
5217
|
+
output: args.outputPath,
|
|
5201
5218
|
name: options.solutionName,
|
|
5202
5219
|
version,
|
|
5203
5220
|
loginValidity: options.loginValidity
|
|
5204
5221
|
}));
|
|
5205
5222
|
if (packError) {
|
|
5206
|
-
return
|
|
5223
|
+
return {
|
|
5224
|
+
ok: false,
|
|
5225
|
+
message: `Packing the solution failed: ${packError.message}`
|
|
5226
|
+
};
|
|
5207
5227
|
}
|
|
5208
5228
|
if (!packed.ok) {
|
|
5209
|
-
return
|
|
5229
|
+
return {
|
|
5230
|
+
ok: false,
|
|
5231
|
+
message: `Packing the solution failed: ${packed.message}`
|
|
5232
|
+
};
|
|
5210
5233
|
}
|
|
5211
5234
|
const packagePath = packed.packages?.[0];
|
|
5212
5235
|
if (!packagePath) {
|
|
5213
|
-
return
|
|
5236
|
+
return {
|
|
5237
|
+
ok: false,
|
|
5238
|
+
message: "Packing the solution produced no package."
|
|
5239
|
+
};
|
|
5214
5240
|
}
|
|
5215
5241
|
logger.info("Uploading the solution to the personal workspace...");
|
|
5216
|
-
const [publishError, published] = await catchError(publish(packagePath, {
|
|
5242
|
+
const [publishError, published] = await catchError(args.publish(packagePath, {
|
|
5217
5243
|
...authOptions,
|
|
5218
5244
|
personalWorkspace: true,
|
|
5219
5245
|
packageVersion: version
|
|
5220
5246
|
}));
|
|
5221
5247
|
if (publishError) {
|
|
5222
|
-
return
|
|
5248
|
+
return {
|
|
5249
|
+
ok: false,
|
|
5250
|
+
message: `Uploading the solution failed: ${publishError.message}`
|
|
5251
|
+
};
|
|
5223
5252
|
}
|
|
5224
5253
|
if (!published.ok) {
|
|
5225
|
-
return
|
|
5254
|
+
return {
|
|
5255
|
+
ok: false,
|
|
5256
|
+
message: `Uploading the solution failed: ${published.message}`
|
|
5257
|
+
};
|
|
5226
5258
|
}
|
|
5227
5259
|
if (!published.packageVersionKey) {
|
|
5228
|
-
return
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
if (builderError) {
|
|
5233
|
-
return fail2(`Could not read the solution: ${builderError.message}`);
|
|
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
|
+
};
|
|
5234
5264
|
}
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
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));
|
|
5239
5284
|
}
|
|
5240
|
-
|
|
5241
|
-
|
|
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}` : ""));
|
|
5242
5291
|
}
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
return {
|
|
5246
|
-
ok: true,
|
|
5247
|
-
folderPath,
|
|
5248
|
-
packageVersionKey: published.packageVersionKey
|
|
5249
|
-
};
|
|
5292
|
+
logger.info("Solution provisioned.");
|
|
5293
|
+
return { ok: true, packageVersionKey };
|
|
5250
5294
|
}
|
|
5251
|
-
function
|
|
5252
|
-
|
|
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>.";
|
|
5253
5304
|
}
|
|
5254
5305
|
|
|
5255
5306
|
// src/services/run-service.ts
|
|
@@ -5382,7 +5433,7 @@ var NEVER_STARTED = new Set([
|
|
|
5382
5433
|
"Unauthorized" /* Unauthorized */
|
|
5383
5434
|
]);
|
|
5384
5435
|
var registerRunCommand = (program) => {
|
|
5385
|
-
program.command("run", { hidden: true }).description("Run a project from a UiPath solution. Currently supports RPA projects and
|
|
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) => {
|
|
5386
5437
|
const [inputError, inputArguments] = parseInputArguments(options.inputArguments);
|
|
5387
5438
|
if (inputError) {
|
|
5388
5439
|
OutputFormatter.error({
|
|
@@ -5408,7 +5459,11 @@ var registerRunCommand = (program) => {
|
|
|
5408
5459
|
Result: RESULTS.Failure,
|
|
5409
5460
|
Message: result.message ?? "The run did not succeed.",
|
|
5410
5461
|
Instructions: NEVER_STARTED.has(result.errorCode) ? `The run did not start (${result.errorCode}).` : `Run ended with status '${result.status}' (${result.errorCode}).`,
|
|
5411
|
-
ErrorCode: ERROR_CODE_BY_RUN_ERROR[result.errorCode]
|
|
5462
|
+
ErrorCode: ERROR_CODE_BY_RUN_ERROR[result.errorCode],
|
|
5463
|
+
Data: dataOrUndefined({
|
|
5464
|
+
JobKey: result.jobKey,
|
|
5465
|
+
TraceId: result.traceId
|
|
5466
|
+
})
|
|
5412
5467
|
});
|
|
5413
5468
|
processContext.exit(1);
|
|
5414
5469
|
return;
|
|
@@ -5419,11 +5474,19 @@ var registerRunCommand = (program) => {
|
|
|
5419
5474
|
Data: {
|
|
5420
5475
|
Status: result.status,
|
|
5421
5476
|
EntryPoint: result.details?.entryPoint,
|
|
5477
|
+
...dataOrUndefined({
|
|
5478
|
+
JobKey: result.jobKey,
|
|
5479
|
+
TraceId: result.traceId
|
|
5480
|
+
}),
|
|
5422
5481
|
Output: result.output
|
|
5423
5482
|
}
|
|
5424
5483
|
}, { preserveDataKeys: true });
|
|
5425
5484
|
});
|
|
5426
5485
|
};
|
|
5486
|
+
function dataOrUndefined(data) {
|
|
5487
|
+
const present = Object.entries(data).filter(([, value]) => value);
|
|
5488
|
+
return present.length > 0 ? Object.fromEntries(present) : undefined;
|
|
5489
|
+
}
|
|
5427
5490
|
function parseInputArguments(raw) {
|
|
5428
5491
|
if (raw === undefined)
|
|
5429
5492
|
return [undefined, undefined];
|
|
@@ -5658,9 +5721,13 @@ var registerCommands = async (program) => {
|
|
|
5658
5721
|
registerUploadCommand(program);
|
|
5659
5722
|
registerResourceCommand(program);
|
|
5660
5723
|
registerDeleteCommand(program);
|
|
5724
|
+
if (isPreviewBuild()) {
|
|
5725
|
+
const { registerListCommand } = await import("./list-kbscmb2k.js");
|
|
5726
|
+
registerListCommand(program);
|
|
5727
|
+
}
|
|
5661
5728
|
previewOnly(() => registerFeedsCommand(program));
|
|
5662
5729
|
};
|
|
5663
5730
|
|
|
5664
5731
|
export { metadata, registerCommands };
|
|
5665
5732
|
|
|
5666
|
-
//# debugId=
|
|
5733
|
+
//# debugId=D007EDE6C925CE2364756E2164756E21
|