@uipath/solution-tool 1.205.0-preview.277 → 1.206.0-preview.279
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/{archive-extract-x35t9ktj.js → archive-extract-136rn3ja.js} +13 -15
- package/dist/{cleanup-command-service-dwbrt6d9.js → cleanup-command-service-ejakyhea.js} +34 -31
- package/dist/deploy-delete-service-r7abfh28.js +23 -0
- package/dist/deploy-run-service-rnthz10q.js +23 -0
- package/dist/{deploy-status-service-xw2nzh7m.js → deploy-status-service-6my5vm61.js} +72 -62
- package/dist/deploy.js +35 -37
- package/dist/deployment-search-gfm907tx.js +54 -0
- package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/feed-resolver-14crsx5y.js +27 -0
- package/dist/feed-scope-failure-67cyybn0.js +20 -0
- package/dist/feed-session-g94q2bjc.js +23 -0
- package/dist/first-party-service-n3vva2m4.js +8 -0
- package/dist/governance-options-t20vsznh.js +19 -0
- package/dist/index-aspmac9f.js +24 -0
- package/dist/index-ddk6v1ej.js +60 -0
- package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-qq4kre7a.js +93 -0
- package/dist/index-t262f2xv.js +16 -0
- package/dist/index.js +33 -34
- package/dist/init.js +18 -21
- package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/{list-zckdhv0c.js → list-jntan9tx.js} +23 -23
- package/dist/models/pack-command-types.d.ts +3 -1
- package/dist/node-kwzcw5ex.js +25 -0
- package/dist/pack-command-service-pwaeha7y.js +29 -0
- package/dist/{pack-project-erd95bt1.js → pack-project-ztt1hfrs.js} +33 -40
- package/dist/pack.js +26 -30
- package/dist/package-id-4tsg5jsb.js +11 -0
- package/dist/{packager-tool-d3cmmbw1.js → packager-tool-1bz9h5ca.js} +11 -11
- package/dist/{packager-tool-gs3f3tf7.js → packager-tool-1ctvbx0h.js} +1 -1
- package/dist/{packager-tool-r1jvvm8y.js → packager-tool-55ztfccd.js} +176 -196
- package/dist/{packager-tool-wrg41m7t.js → packager-tool-95y24705.js} +37 -39
- package/dist/{packager-tool-bkjqza3a.js → packager-tool-9j8e5q1z.js} +184 -33
- package/dist/{packager-tool-tx834spe.js → packager-tool-9vrwpgt3.js} +757 -309
- package/dist/packager-tool-a6va4gc5.js +1178 -0
- package/dist/{packager-tool-pbmqk39a.js → packager-tool-a7s0gbxs.js} +33 -28
- package/dist/{packager-tool-47wzvqw0.js → packager-tool-aws5w512.js} +6 -6
- package/dist/{packager-tool-97rcgwvv.js → packager-tool-bs1jn1yn.js} +331 -55
- package/dist/packager-tool-c64hqa8n.js +106 -0
- package/dist/{packager-tool-5ddtwzva.js → packager-tool-ca5ngmqv.js} +12 -12
- package/dist/{packager-tool-6kz1pv9f.js → packager-tool-d1texmvn.js} +828 -338
- package/dist/{packager-tool-1de529jm.js → packager-tool-epsr41wx.js} +12 -3
- package/dist/packager-tool-f84z7nds.js +130 -0
- package/dist/{packager-tool-8ptbmmmp.js → packager-tool-fp46ebde.js} +147 -76
- package/dist/packager-tool-fqs6hdcy.js +290 -0
- package/dist/{packager-tool-3bwnkjdq.js → packager-tool-fx4ws49n.js} +12 -12
- package/dist/{packager-tool-6ybywxxn.js → packager-tool-m07vyk89.js} +371 -221
- package/dist/{packager-tool-hsya909c.js → packager-tool-nrhqgr4z.js} +273 -255
- package/dist/{packager-tool-61pwb567.js → packager-tool-ppj5f4y7.js} +6 -7
- package/dist/{packager-tool-qqbt4b44.js → packager-tool-pyt9fvty.js} +51 -48
- package/dist/packager-tool-q5d9df2q.js +74 -0
- package/dist/{packager-tool-ph7fg1aa.js → packager-tool-q8ryk6q9.js} +122 -89
- package/dist/{packager-tool-t8gh825q.js → packager-tool-qf8753ee.js} +53 -41
- package/dist/{packager-tool-60af1hw2.js → packager-tool-qzcd5c9s.js} +3 -3
- package/dist/packager-tool-resolver-td3bhccd.js +20 -0
- package/dist/{packager-tool-dfrk01gn.js → packager-tool-rj2d1g0w.js} +154 -154
- package/dist/{packager-tool-a4bs7wtm.js → packager-tool-snm6s7b5.js} +15 -15
- package/dist/{packager-tool-43ahv5mn.js → packager-tool-t39pjz7n.js} +35 -18
- package/dist/{packager-tool-f2hsb9ta.js → packager-tool-t3a48ys5.js} +305 -657
- package/dist/{packager-tool-cjjk2ek2.js → packager-tool-t3ahzjh1.js} +356 -298
- package/dist/{packager-tool-v1f5e8t9.js → packager-tool-vgrswa8p.js} +53 -8
- package/dist/packager-tool-vrtabg73.js +2307 -0
- package/dist/{packager-tool-gmwva4yv.js → packager-tool-vx2c68sb.js} +2 -2
- package/dist/{packager-tool-4pkzxkty.js → packager-tool-vx39dhvn.js} +65 -35
- package/dist/{packager-tool-zn76tbxc.js → packager-tool-w34wyhwf.js} +13 -15
- package/dist/packager-tool-w8bcwfd3.js +280 -0
- package/dist/{packager-tool-3gwrcgrc.js → packager-tool-wm0h0wa1.js} +18 -18
- package/dist/{packager-tool-b2nhscfk.js → packager-tool-wm8nj6e9.js} +18 -18
- package/dist/{packager-tool-amhyxzz6.js → packager-tool-x33sdw6n.js} +16 -16
- package/dist/{packager-tool-wy4fx250.js → packager-tool-yetmzme9.js} +89 -30
- package/dist/{packager-tool-6tyyvhh0.js → packager-tool-z5r49ky9.js} +75 -9
- package/dist/packager-tool.js +6 -7
- package/dist/prepare-solution-resources-pwnyvtza.js +26 -0
- package/dist/{project-command-utils-t6pmpvq3.js → project-command-utils-zcmbecfy.js} +23 -26
- package/dist/project-contributions-kh9yftvg.js +27 -0
- package/dist/publish.js +17 -17
- package/dist/resource-mutations-mfn5k1hb.js +27 -0
- package/dist/{resource-version-lookup-0e3e2j58.js → resource-version-lookup-6ejh1hwd.js} +20 -23
- package/dist/resource.js +13 -16
- package/dist/{restore-command-service-2g02d7s1.js → restore-command-service-n880dxre.js} +37 -34
- package/dist/{run-service-6necpy9s.js → run-service-4vhn6mtb.js} +144 -66
- package/dist/services/deploy-activate-service.d.ts +2 -1
- package/dist/services/deployment-search-client.d.ts +2 -1
- package/dist/services/deployment-search.d.ts +39 -0
- package/dist/services/feed-resolver.d.ts +13 -1
- package/dist/services/feed-selection.d.ts +8 -5
- package/dist/services/feed-session.d.ts +34 -0
- package/dist/services/install-run.d.ts +92 -0
- package/dist/services/prepare-solution-resources.d.ts +11 -2
- package/dist/services/project-contributions.d.ts +2 -0
- package/dist/services/project-identity-telemetry.d.ts +3 -0
- package/dist/services/publish-service.d.ts +20 -3
- package/dist/services/solution-identity.d.ts +18 -0
- package/dist/ship-telemetry-bkf3800w.js +16 -0
- package/dist/solution-auth-jxcgd2m0.js +10 -0
- package/dist/solution-identity-92h2fbpa.js +19 -0
- package/dist/templates/AGENTS.md +27 -29
- package/dist/tool.js +32 -33
- package/package.json +2 -2
- package/dist/deploy-delete-service-7py597ng.js +0 -25
- package/dist/deploy-run-service-446bssn0.js +0 -25
- package/dist/deployment-search-qyd6dv0m.js +0 -55
- package/dist/feed-resolver-va10c73n.js +0 -28
- package/dist/feed-scope-failure-3yxfg1x7.js +0 -19
- package/dist/feed-session-7xqphdrg.js +0 -17
- package/dist/first-party-service-sd8yaf73.js +0 -27
- package/dist/governance-options-8snbrbt1.js +0 -32
- package/dist/index-dqa169gp.js +0 -25
- package/dist/index-fcwmbjap.js +0 -667
- package/dist/index-prm27bvm.js +0 -138
- package/dist/node-9hdy9st1.js +0 -86
- package/dist/pack-command-service-tr3z33gz.js +0 -35
- package/dist/package-id-kdkapmn2.js +0 -13
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-5edvzz80.js +0 -543
- package/dist/packager-tool-6d3fx89p.js +0 -171
- package/dist/packager-tool-d8ng7mex.js +0 -68
- package/dist/packager-tool-gdtpsdn7.js +0 -342
- package/dist/packager-tool-mq5pc4zr.js +0 -418
- package/dist/packager-tool-qw47eyw7.js +0 -43
- package/dist/packager-tool-resolver-994z3jkj.js +0 -23
- package/dist/packager-tool-rg3xgn9a.js +0 -182
- package/dist/packager-tool-sxjehksx.js +0 -5367
- package/dist/packager-tool-yrdyppjd.js +0 -188
- package/dist/prepare-solution-resources-m1djfj62.js +0 -29
- package/dist/project-contributions-79ndycrx.js +0 -32
- package/dist/resource-mutations-c3krjqze.js +0 -36
- package/dist/ship-telemetry-myes7ak5.js +0 -21
- package/dist/solution-auth-aead70sw.js +0 -11
- /package/dist/{packager-tool-act5r386.js → packager-tool-2pxe2r4j.js} +0 -0
- /package/dist/{packager-tool-kkfb5kgn.js → packager-tool-vrqbbh01.js} +0 -0
|
@@ -1,102 +1,109 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./packager-tool-amhyxzz6.js";
|
|
2
|
+
getFileSystem
|
|
3
|
+
} from "./packager-tool-vgrswa8p.js";
|
|
5
4
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
CommandDimensions,
|
|
6
|
+
ShipDimensions,
|
|
7
|
+
solutionIdentityProperties,
|
|
8
|
+
catchError,
|
|
9
|
+
carriedErrorCode,
|
|
10
|
+
carriedRetry,
|
|
11
|
+
httpStatusOf2,
|
|
12
|
+
carriedInstructions,
|
|
13
|
+
extractErrorDetails,
|
|
14
|
+
extractErrorMessage
|
|
15
|
+
} from "./packager-tool-m07vyk89.js";
|
|
9
16
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
17
|
+
RESULTS,
|
|
18
|
+
authContextFailure,
|
|
19
|
+
Option,
|
|
20
|
+
isPreviewBuild,
|
|
21
|
+
logger,
|
|
22
|
+
Pagination,
|
|
23
|
+
OutputFormatter,
|
|
24
|
+
configureProjectTelemetry,
|
|
25
|
+
getProjectTelemetryCapture,
|
|
26
|
+
createIdentityCommandResolver,
|
|
27
|
+
processContext,
|
|
28
|
+
withCompleter,
|
|
29
|
+
requireConfirmation,
|
|
30
|
+
DEFAULT_PAGE_SIZE,
|
|
31
|
+
resolveEnvReference,
|
|
32
|
+
resolveDeprecatedOptionAlias,
|
|
33
|
+
warnDeprecatedOptionAlias,
|
|
34
|
+
addDeprecatedOptionAlias,
|
|
35
|
+
createHiddenDeprecatedTenantOption,
|
|
36
|
+
parseLimit,
|
|
37
|
+
parseOffset,
|
|
38
|
+
parseBoundedInt,
|
|
39
|
+
registerPackageMetadataOptions,
|
|
40
|
+
mapPackageMetadataOptions,
|
|
41
|
+
PollOutcome,
|
|
42
|
+
mapPollFailure,
|
|
43
|
+
pollUntil,
|
|
44
|
+
unsupportedSolutionProjectType,
|
|
45
|
+
trackShipSucceeded
|
|
46
|
+
} from "./packager-tool-9vrwpgt3.js";
|
|
12
47
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
listPackagesAsync,
|
|
16
|
-
uninstallDeploymentAsync,
|
|
17
|
-
upgradeDeploymentAsync
|
|
18
|
-
} from "./packager-tool-r1jvvm8y.js";
|
|
48
|
+
getAuthContext
|
|
49
|
+
} from "./packager-tool-t39pjz7n.js";
|
|
19
50
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./packager-tool-act5r386.js";
|
|
51
|
+
getSolutionAuthContext2
|
|
52
|
+
} from "./packager-tool-ppj5f4y7.js";
|
|
23
53
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} from "./packager-tool-
|
|
54
|
+
Configuration2,
|
|
55
|
+
PipelinesApi
|
|
56
|
+
} from "./packager-tool-bs1jn1yn.js";
|
|
27
57
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
58
|
+
DeploymentActivationStatus2,
|
|
59
|
+
DeploymentOperationStatus2
|
|
60
|
+
} from "./packager-tool-a6va4gc5.js";
|
|
30
61
|
import {
|
|
31
|
-
|
|
32
|
-
|
|
62
|
+
listSelectablePublishLocations,
|
|
63
|
+
feedScopeInitOverride2
|
|
64
|
+
} from "./packager-tool-fqs6hdcy.js";
|
|
33
65
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
66
|
+
activateDeploymentAsync2,
|
|
67
|
+
listDeploymentsAsync2,
|
|
68
|
+
uninstallDeploymentAsync2,
|
|
69
|
+
upgradeDeploymentAsync2,
|
|
70
|
+
listPackagesAsync2
|
|
71
|
+
} from "./packager-tool-55ztfccd.js";
|
|
37
72
|
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} from "./packager-tool-
|
|
73
|
+
useStudioWebAuth,
|
|
74
|
+
getStudioWebAuthWithOrganizationId
|
|
75
|
+
} from "./packager-tool-vx2c68sb.js";
|
|
41
76
|
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} from "./packager-tool-sxjehksx.js";
|
|
77
|
+
resolveFeedScopeOrFailureAsync2
|
|
78
|
+
} from "./packager-tool-1bz9h5ca.js";
|
|
45
79
|
import {
|
|
46
|
-
|
|
47
|
-
|
|
80
|
+
captureSolutionIdentity2,
|
|
81
|
+
captureSolutionMember2
|
|
82
|
+
} from "./packager-tool-f84z7nds.js";
|
|
48
83
|
import {
|
|
49
|
-
|
|
50
|
-
} from "./packager-tool-
|
|
84
|
+
publishSolutionAsync2
|
|
85
|
+
} from "./packager-tool-vx39dhvn.js";
|
|
51
86
|
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Pagination,
|
|
56
|
-
PollOutcome,
|
|
57
|
-
RESULTS,
|
|
58
|
-
addDeprecatedOptionAlias,
|
|
59
|
-
carriedErrorCode,
|
|
60
|
-
carriedRetry,
|
|
61
|
-
createHiddenDeprecatedTenantOption,
|
|
62
|
-
httpStatusOf,
|
|
63
|
-
isPreviewBuild,
|
|
64
|
-
logger,
|
|
65
|
-
mapPackageMetadataOptions,
|
|
66
|
-
parseBoundedInt,
|
|
67
|
-
parseLimit,
|
|
68
|
-
parseOffset,
|
|
69
|
-
pollUntil,
|
|
70
|
-
processContext,
|
|
71
|
-
registerPackageMetadataOptions,
|
|
72
|
-
requireConfirmation,
|
|
73
|
-
resolveDeprecatedOptionAlias,
|
|
74
|
-
resolveEnvReference,
|
|
75
|
-
trackShipSucceeded,
|
|
76
|
-
unsupportedSolutionProjectType,
|
|
77
|
-
warnDeprecatedOptionAlias,
|
|
78
|
-
withCompleter
|
|
79
|
-
} from "./packager-tool-tx834spe.js";
|
|
87
|
+
inspectSolutionPackageProjectTypes2,
|
|
88
|
+
trackSolutionShipSucceeded2
|
|
89
|
+
} from "./packager-tool-x33sdw6n.js";
|
|
80
90
|
import {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
catchError,
|
|
85
|
-
extractErrorDetails,
|
|
86
|
-
extractErrorMessage
|
|
87
|
-
} from "./packager-tool-6ybywxxn.js";
|
|
91
|
+
extractDeploymentErrors,
|
|
92
|
+
formatDeploymentErrorsAsText
|
|
93
|
+
} from "./packager-tool-2pxe2r4j.js";
|
|
88
94
|
import {
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
SolutionInitError2,
|
|
96
|
+
solutionInitAsync2
|
|
97
|
+
} from "./packager-tool-fx4ws49n.js";
|
|
91
98
|
import {
|
|
92
|
-
|
|
93
|
-
} from "./packager-tool-
|
|
99
|
+
validatePackProjectOptions
|
|
100
|
+
} from "./packager-tool-1ctvbx0h.js";
|
|
94
101
|
// package.json
|
|
95
102
|
var package_default = {
|
|
96
103
|
name: "@uipath/solution-tool",
|
|
97
104
|
author: "UiPath",
|
|
98
105
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
99
|
-
version: "1.
|
|
106
|
+
version: "1.206.0-preview.279",
|
|
100
107
|
description: "Create, pack, publish, and deploy UiPath Automation Solutions.",
|
|
101
108
|
repository: {
|
|
102
109
|
type: "git",
|
|
@@ -144,6 +151,7 @@ var package_default = {
|
|
|
144
151
|
private: false,
|
|
145
152
|
scripts: {
|
|
146
153
|
build: "bun ../../tools/build-tool.ts && tsc -p tsconfig.build.json --noCheck",
|
|
154
|
+
typecheck: "tsc --noEmit",
|
|
147
155
|
package: "bun run build && bun pm pack",
|
|
148
156
|
test: "vitest run",
|
|
149
157
|
"test:coverage": "vitest run --coverage",
|
|
@@ -212,8 +220,8 @@ var SOLUTION_CLEANUP_EXAMPLES = [
|
|
|
212
220
|
}
|
|
213
221
|
];
|
|
214
222
|
var registerCleanupCommand = (program) => {
|
|
215
|
-
program.command("cleanup").description("Remove unused items from every project in a UiPath solution. Accepts a solution directory (containing .uipx) or a .uis file. For a directory the project sources are modified in place. Pass --dry-run to only detect unused items.").argument("<solution-path>", "Path to a solution directory (containing .uipx) or a .uis file").option("--dry-run", "Detect unused items but do not modify any project files.").option("--skip-imports", "Do not clean up now-unused references to removed items in the project's files.").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--exclude-configured-sources", "Resolve project dependencies only from the tenant feeds and any --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds, so a dependency that is not on those feeds fails to restore.").option("--feed-folder <name>", "Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. Accepts a folder name or fully qualified path.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", (value) => Number.parseInt(value, 10), 10).examples(SOLUTION_CLEANUP_EXAMPLES).trackedAction(processContext, async (solutionPath, options) => {
|
|
216
|
-
const { CleanupCommandService } = await import("./cleanup-command-service-
|
|
223
|
+
program.command("cleanup").description("Remove unused items from every project in a UiPath solution. Accepts a solution directory (containing .uipx) or a .uis file. For a directory the project sources are modified in place. Pass --dry-run to only detect unused items.").argument("<solution-path>", "Path to a solution directory (containing .uipx) or a .uis file").option("--dry-run", "Detect unused items but do not modify any project files.").option("--skip-imports", "Do not clean up now-unused references to removed items in the project's files.").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--exclude-configured-sources", "Resolve project dependencies only from the tenant feeds and any --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds, so a dependency that is not on those feeds fails to restore.").option("--feed-folder <name>", "Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. Accepts a folder name or fully qualified path.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", (value) => Number.parseInt(value, 10), 10).examples(SOLUTION_CLEANUP_EXAMPLES).trackedAction(processContext, async (solutionPath, options, command) => {
|
|
224
|
+
const { CleanupCommandService } = await import("./cleanup-command-service-ejakyhea.js");
|
|
217
225
|
const service = new CleanupCommandService;
|
|
218
226
|
const cleanupOptions = {
|
|
219
227
|
dryRun: options.dryRun,
|
|
@@ -221,7 +229,8 @@ var registerCleanupCommand = (program) => {
|
|
|
221
229
|
nugetSourcesConfigPath: options.nugetSourcesConfigPath,
|
|
222
230
|
excludeConfiguredSources: options.excludeConfiguredSources,
|
|
223
231
|
feedFolder: options.feedFolder,
|
|
224
|
-
loginValidity: options.loginValidity
|
|
232
|
+
loginValidity: options.loginValidity,
|
|
233
|
+
telemetryCapture: getProjectTelemetryCapture(command)
|
|
225
234
|
};
|
|
226
235
|
await service.execute(solutionPath, cleanupOptions, processContext);
|
|
227
236
|
});
|
|
@@ -241,7 +250,7 @@ var SOLUTION_DELETE_EXAMPLES = [
|
|
|
241
250
|
}
|
|
242
251
|
];
|
|
243
252
|
async function deleteSolutionOnStudioWeb(baseUrl, organizationName, tenantId, accessToken, solutionId) {
|
|
244
|
-
const url = `${baseUrl}/${organizationName}/studio_/backend/api/Solution/${encodeURIComponent(solutionId)}`;
|
|
253
|
+
const url = `${baseUrl}/${encodeURIComponent(organizationName)}/studio_/backend/api/Solution/${encodeURIComponent(solutionId)}`;
|
|
245
254
|
const response = await fetch(url, {
|
|
246
255
|
method: "DELETE",
|
|
247
256
|
headers: {
|
|
@@ -259,28 +268,17 @@ var registerDeleteCommand = (program) => {
|
|
|
259
268
|
if (!requireConfirmation(options, `delete solution '${solutionId}'`)) {
|
|
260
269
|
return;
|
|
261
270
|
}
|
|
262
|
-
const [loginError,
|
|
271
|
+
const [loginError, auth] = await catchError(getAuthContext({
|
|
272
|
+
requireOrganizationName: true,
|
|
273
|
+
requireTenantId: true
|
|
274
|
+
}));
|
|
263
275
|
if (loginError) {
|
|
264
|
-
|
|
265
|
-
OutputFormatter.error({
|
|
266
|
-
Result: RESULTS.Failure,
|
|
267
|
-
Message: errorMessage,
|
|
268
|
-
Instructions: "Run 'uip login' to authenticate and try again."
|
|
269
|
-
});
|
|
270
|
-
processContext.exit(1);
|
|
271
|
-
return;
|
|
272
|
-
}
|
|
273
|
-
if (loginStatus.loginStatus !== "Logged in" || !loginStatus.accessToken || !loginStatus.baseUrl || !loginStatus.organizationName || !loginStatus.tenantId) {
|
|
274
|
-
OutputFormatter.error({
|
|
275
|
-
Result: RESULTS.Failure,
|
|
276
|
-
Message: "Not logged in or login context incomplete. Run 'uip login' first.",
|
|
277
|
-
Instructions: "Run 'uip login' to authenticate and try again."
|
|
278
|
-
});
|
|
276
|
+
OutputFormatter.error(await authContextFailure(loginError, "Run 'uip login' to authenticate and try again."));
|
|
279
277
|
processContext.exit(1);
|
|
280
278
|
return;
|
|
281
279
|
}
|
|
282
280
|
logger.info(`Deleting solution ${solutionId} from Studio Web...`);
|
|
283
|
-
const [deleteError] = await catchError(deleteSolutionOnStudioWeb(
|
|
281
|
+
const [deleteError] = await catchError(deleteSolutionOnStudioWeb(auth.baseUrl, auth.organizationName, auth.tenantId, auth.accessToken, solutionId));
|
|
284
282
|
if (deleteError) {
|
|
285
283
|
const errorMessage = await extractErrorMessage(deleteError);
|
|
286
284
|
OutputFormatter.error({
|
|
@@ -301,6 +299,14 @@ var registerDeleteCommand = (program) => {
|
|
|
301
299
|
});
|
|
302
300
|
};
|
|
303
301
|
|
|
302
|
+
// src/utils/option-parsers.ts
|
|
303
|
+
var parsePositiveInt = (optionName) => {
|
|
304
|
+
return (raw) => parseBoundedInt(raw, optionName, {
|
|
305
|
+
min: 1,
|
|
306
|
+
max: Number.MAX_SAFE_INTEGER
|
|
307
|
+
});
|
|
308
|
+
};
|
|
309
|
+
|
|
304
310
|
// src/commands/deploy-activate.ts
|
|
305
311
|
var SOLUTION_DEPLOY_ACTIVATE_EXAMPLES = [
|
|
306
312
|
{
|
|
@@ -317,8 +323,8 @@ var SOLUTION_DEPLOY_ACTIVATE_EXAMPLES = [
|
|
|
317
323
|
}
|
|
318
324
|
];
|
|
319
325
|
var registerDeployActivateCommand = (program) => {
|
|
320
|
-
program.command("activate").description("Activate a deployed solution that was deployed without auto-activation. Activation provisions all solution components.").argument("<deployment-name>", "Name of the deployment to activate. Use 'solution deploy list' to find deployment names.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds for activation polling (default: 360)", (
|
|
321
|
-
const result = await
|
|
326
|
+
program.command("activate").description("Activate a deployed solution that was deployed without auto-activation. Activation provisions all solution components.").argument("<deployment-name>", "Name of the deployment to activate. Use 'solution deploy list' to find deployment names.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds for activation polling (default: 360)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between activation status polls (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).addOption(new Option("--feed <name-or-key>", "The feed the deployment lives in (name or folder key, from 'solution feeds list'). Only that feed is searched; without it the tenant feed, your Personal Workspace and the folder feeds are tried in turn. Needs a user session for a feed other than the tenant's. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace")).option("--personal-workspace", "The deployment lives in your Personal Workspace feed: only that feed is searched. Needs a user session.").examples(SOLUTION_DEPLOY_ACTIVATE_EXAMPLES).trackedAction(processContext, async (deploymentName, options) => {
|
|
327
|
+
const result = await activateDeploymentAsync2(deploymentName, {
|
|
322
328
|
tenant: options.tenant,
|
|
323
329
|
personalWorkspace: options.personalWorkspace,
|
|
324
330
|
feed: options.feed,
|
|
@@ -387,7 +393,7 @@ var SOLUTION_DEPLOY_CONFIG_GET_EXAMPLES = [
|
|
|
387
393
|
var registerDeployConfigGetCommand = (program) => {
|
|
388
394
|
program.command("get").description("Fetch the default deployment configuration for a published solution package. The config lists all resources (assets, queues, buckets, processes, connections, entities, choice sets, etc.) and their default settings. Save to a file with -d, then customize with 'config set' or 'config link' before deploying with 'deploy run --config-file'.").argument("<package-name>", "Solution package name. Use 'solution packages list' to find available names.").option("--package-version <version>", "Package version (optional, latest if omitted)").option("-d, --destination <path>", "Write configuration to a file instead of stdout").addOption(new Option("--format <format>", "Configuration format: json or yaml (default: json)").choices(["json", "yaml"]).default("json")).addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(SOLUTION_DEPLOY_CONFIG_GET_EXAMPLES).trackedAction(processContext, async (packageName, options) => {
|
|
389
395
|
const configFormat = options.format ?? "json";
|
|
390
|
-
const [authError, auth] = await catchError(
|
|
396
|
+
const [authError, auth] = await catchError(getSolutionAuthContext2({
|
|
391
397
|
tenant: options.tenant,
|
|
392
398
|
loginValidity: options.loginValidity
|
|
393
399
|
}));
|
|
@@ -400,7 +406,7 @@ var registerDeployConfigGetCommand = (program) => {
|
|
|
400
406
|
processContext.exit(1);
|
|
401
407
|
return;
|
|
402
408
|
}
|
|
403
|
-
const configuration = new
|
|
409
|
+
const configuration = new Configuration2({
|
|
404
410
|
basePath: auth.basePath,
|
|
405
411
|
accessToken: auth.accessToken
|
|
406
412
|
});
|
|
@@ -542,9 +548,11 @@ async function writeConfigFile(filePath, config) {
|
|
|
542
548
|
const fs = getFileSystem();
|
|
543
549
|
const [writeError] = await catchError(fs.writeFile(filePath, `${JSON.stringify(config, null, 2)}
|
|
544
550
|
`));
|
|
545
|
-
return writeError;
|
|
551
|
+
return writeError ?? null;
|
|
546
552
|
}
|
|
547
|
-
var TOP_LEVEL_FIELDS = new Set([
|
|
553
|
+
var TOP_LEVEL_FIELDS = new Set([
|
|
554
|
+
"conflictFixingAction"
|
|
555
|
+
]);
|
|
548
556
|
function isTopLevelField(property) {
|
|
549
557
|
return TOP_LEVEL_FIELDS.has(property);
|
|
550
558
|
}
|
|
@@ -778,12 +786,12 @@ var registerDeployConfigSetCommand = (program) => {
|
|
|
778
786
|
oldValues[res.name] = res[property];
|
|
779
787
|
res[property] = parsedValue;
|
|
780
788
|
}
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
789
|
+
const writeError = await writeConfigFile(result.resolvedPath, result.config);
|
|
790
|
+
if (writeError) {
|
|
783
791
|
OutputFormatter.error({
|
|
784
792
|
Result: RESULTS.Failure,
|
|
785
|
-
Message: `Failed to write config: ${
|
|
786
|
-
Instructions:
|
|
793
|
+
Message: `Failed to write config: ${writeError.message}`,
|
|
794
|
+
Instructions: writeError.message
|
|
787
795
|
});
|
|
788
796
|
processContext.exit(1);
|
|
789
797
|
return;
|
|
@@ -880,7 +888,7 @@ var registerDeployDeleteCommand = (program) => {
|
|
|
880
888
|
if (!requireConfirmation(options, `delete deployment '${deploymentName}'`)) {
|
|
881
889
|
return;
|
|
882
890
|
}
|
|
883
|
-
const { deleteDeploymentAsync } = await import("./deploy-delete-service-
|
|
891
|
+
const { deleteDeploymentAsync } = await import("./deploy-delete-service-r7abfh28.js");
|
|
884
892
|
const result = await deleteDeploymentAsync(deploymentName, {
|
|
885
893
|
tenant: options.tenant,
|
|
886
894
|
personalWorkspace: options.personalWorkspace,
|
|
@@ -911,8 +919,8 @@ var registerDeployDeleteCommand = (program) => {
|
|
|
911
919
|
};
|
|
912
920
|
|
|
913
921
|
// src/commands/deploy-list.ts
|
|
914
|
-
var OPERATION_STATUS_VALUES = Object.values(
|
|
915
|
-
var ACTIVATION_STATUS_VALUES = Object.values(
|
|
922
|
+
var OPERATION_STATUS_VALUES = Object.values(DeploymentOperationStatus2);
|
|
923
|
+
var ACTIVATION_STATUS_VALUES = Object.values(DeploymentActivationStatus2);
|
|
916
924
|
function parseStatusFilter(raw, allowed, flag) {
|
|
917
925
|
if (raw === undefined) {
|
|
918
926
|
return { ok: true, values: undefined };
|
|
@@ -1013,7 +1021,7 @@ var registerDeployListCommand = (program) => {
|
|
|
1013
1021
|
processContext.exit(1);
|
|
1014
1022
|
return;
|
|
1015
1023
|
}
|
|
1016
|
-
const result = await
|
|
1024
|
+
const result = await listDeploymentsAsync2({
|
|
1017
1025
|
tenant: options.tenant,
|
|
1018
1026
|
folderPath: options.folderPath,
|
|
1019
1027
|
folderKey: options.folderKey,
|
|
@@ -1217,13 +1225,13 @@ var SOLUTION_DEPLOY_RUN_FEED_EXAMPLE = {
|
|
|
1217
1225
|
}
|
|
1218
1226
|
};
|
|
1219
1227
|
var registerDeployRunCommand = (program) => {
|
|
1220
|
-
const command = program.command("run").description("Deploy a solution package to Orchestrator. Creates a folder, provisions resources, and (by default) activates the solution. The deployment is keyed on --name: a name that does not exist yet gets a NEW deployment in a NEW folder (the normal case), while re-using an existing deployment's name updates that deployment in place — use 'deploy upgrade' when that is what you want. If the package is already deployed the command stops and points you at the upgrade path; pass --yes with a different --name to deploy a second, separate copy anyway. Pass --skip-activate to leave the deployment in 'Inactive (Ready to activate)' state and activate later with 'deploy activate'. A deployment whose resources need 'Setup activation' in Orchestrator is installed but not activated: the command reports Result: Success with ActivationStatus: NeedsSetupToActivate, the resources and the steps left — do not deploy it again. To customize resource settings before deploying, use 'config get' to fetch the default config, 'config set' / 'config link' to edit it, then pass it here with --config-file. When the deploy replaces an installed resource with a link (a config-file link to an existing resource), the server deletes the installed copy and its data, and asks for confirmation first: the command stops and lists those resources unless --acknowledge-permanent-deletion is passed.").requiredOption("-n, --name <deployment-name>", "Name for the deployment").addOption(withCompleter(new Option("--package-name <name>", "Solution package name to deploy. Use 'solution packages list' to find available names.").makeOptionMandatory(), packageNameCompleter)).addOption(withCompleter(new Option("--package-version <version>", "Solution package version to deploy. Use 'solution packages list' to find available versions.").makeOptionMandatory(), packageVersionCompleter)).requiredOption("--folder-name <name>", "Name for the new Orchestrator folder created for this deployment (created under --parent-folder-path if specified)").addOption(new Option("--parent-folder-path <path>", "Parent folder path (e.g., 'Shared'). Solution folder is created under this.").conflicts("parentFolderKey")).option("--parent-folder-key <key>", "Parent folder key (GUID). Alternative to --parent-folder-path.").addOption(new Option("--personal-workspace", "Deploy into the current user's Personal Workspace. Resolves the workspace name from Orchestrator automatically; needs a user session (an external app has no workspace, and the server ignores the feed header on client-credentials requests). Mutually exclusive with --parent-folder-path and --parent-folder-key.").conflicts(["parentFolderPath", "parentFolderKey"])).option("--config-file <path>", "JSON or YAML configuration file. Generate with: uip solution deploy config get <name> -d config.json, then customize with 'config set' or 'config link'.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds applied per polling phase — deploy and (when not skipped) activate (default: 360 each)", (
|
|
1228
|
+
const command = program.command("run").description("Deploy a solution package to Orchestrator. Creates a folder, provisions resources, and (by default) activates the solution. The deployment is keyed on --name: a name that does not exist yet gets a NEW deployment in a NEW folder (the normal case), while re-using an existing deployment's name updates that deployment in place — use 'deploy upgrade' when that is what you want. If the package is already deployed the command stops and points you at the upgrade path; pass --yes with a different --name to deploy a second, separate copy anyway. Pass --skip-activate to leave the deployment in 'Inactive (Ready to activate)' state and activate later with 'deploy activate'. A deployment whose resources need 'Setup activation' in Orchestrator is installed but not activated: the command reports Result: Success with ActivationStatus: NeedsSetupToActivate, the resources and the steps left — do not deploy it again. To customize resource settings before deploying, use 'config get' to fetch the default config, 'config set' / 'config link' to edit it, then pass it here with --config-file. When the deploy replaces an installed resource with a link (a config-file link to an existing resource), the server deletes the installed copy and its data, and asks for confirmation first: the command stops and lists those resources unless --acknowledge-permanent-deletion is passed.").requiredOption("-n, --name <deployment-name>", "Name for the deployment").addOption(withCompleter(new Option("--package-name <name>", "Solution package name to deploy. Use 'solution packages list' to find available names.").makeOptionMandatory(), packageNameCompleter)).addOption(withCompleter(new Option("--package-version <version>", "Solution package version to deploy. Use 'solution packages list' to find available versions.").makeOptionMandatory(), packageVersionCompleter)).requiredOption("--folder-name <name>", "Name for the new Orchestrator folder created for this deployment (created under --parent-folder-path if specified)").addOption(new Option("--parent-folder-path <path>", "Parent folder path (e.g., 'Shared'). Solution folder is created under this.").conflicts("parentFolderKey")).option("--parent-folder-key <key>", "Parent folder key (GUID). Alternative to --parent-folder-path.").addOption(new Option("--personal-workspace", "Deploy into the current user's Personal Workspace. Resolves the workspace name from Orchestrator automatically; needs a user session (an external app has no workspace, and the server ignores the feed header on client-credentials requests). Mutually exclusive with --parent-folder-path and --parent-folder-key.").conflicts(["parentFolderPath", "parentFolderKey"])).option("--config-file <path>", "JSON or YAML configuration file. Generate with: uip solution deploy config get <name> -d config.json, then customize with 'config set' or 'config link'.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds applied per polling phase — deploy and (when not skipped) activate (default: 360 each)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between status polls during the deploy and activate phases (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).addOption(new Option("--wait", "Deprecated and ignored: every deploy now waits for the install to finish (bounded by --timeout).").hideHelp()).option("--skip-activate", "Skip auto-activation; leave the deployment in 'Inactive (Ready to activate)' state. Activate later with 'uip solution deploy activate <name>'.").option("-y, --yes", "Deploy even when this package already has a deployment. Without it, deploy run looks the package up and stops if it is already deployed. That check is best-effort, not a guarantee: a lookup failure only warns, and under an application (client-credentials) login it never stops the deploy — an existing deployment is reported as a warning, or the check is skipped on servers without the Pipelines deployment search. --yes only skips that check: the install is keyed on --name, so re-using an existing deployment's name updates that deployment in place rather than creating a second copy — pass a different --name for a separate deployment.").option("--acknowledge-permanent-deletion", "Confirm that installed resources this deployment replaces with a link are permanently deleted, along with their data. Without it the deploy stops at the server's confirmation request and lists those resources; nothing is installed. With it each listed resource is acknowledged and the same install runs once more, within the same --timeout. Independent of --yes.");
|
|
1221
1229
|
command.addOption(new Option("--feed <name-or-key>", "Deploy a package from a specific feed (name or folder key, from 'solution feeds list') instead of the tenant feed. Needs a user session: the server ignores the feed header on client-credentials requests, so an external app is refused rather than deploying to the tenant feed by accident. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace"));
|
|
1222
1230
|
command.examples([
|
|
1223
1231
|
...SOLUTION_DEPLOY_RUN_EXAMPLES,
|
|
1224
1232
|
SOLUTION_DEPLOY_RUN_FEED_EXAMPLE
|
|
1225
1233
|
]).trackedAction(processContext, async (options) => {
|
|
1226
|
-
const { deployRunAsync } = await import("./deploy-run-service-
|
|
1234
|
+
const { deployRunAsync } = await import("./deploy-run-service-rnthz10q.js");
|
|
1227
1235
|
const result = await deployRunAsync({
|
|
1228
1236
|
tenant: options.tenant,
|
|
1229
1237
|
deploymentName: options.name,
|
|
@@ -1306,7 +1314,7 @@ var registerDeployRunCommand = (program) => {
|
|
|
1306
1314
|
[ShipDimensions.ProjectType]: "solution",
|
|
1307
1315
|
[CommandDimensions.CommandName]: "uip solution deploy run",
|
|
1308
1316
|
[ShipDimensions.ArtifactCorrelationKey]: result.deploymentKey ?? result.pipelineDeploymentId ?? result.deploymentName,
|
|
1309
|
-
[ShipDimensions.DeploymentKey]: result.deploymentKey,
|
|
1317
|
+
[ShipDimensions.DeploymentKey]: result.deploymentKey ?? undefined,
|
|
1310
1318
|
[ShipDimensions.PackageName]: options.packageName,
|
|
1311
1319
|
[ShipDimensions.PackageVersion]: options.packageVersion
|
|
1312
1320
|
});
|
|
@@ -1418,7 +1426,7 @@ var SOLUTION_DEPLOY_STATUS_EXAMPLES = [
|
|
|
1418
1426
|
];
|
|
1419
1427
|
var registerDeployStatusCommand = (program) => {
|
|
1420
1428
|
program.command("status").description("Check the state of a deployment by name, or by a deployment key from 'solution deploy list' / 'solution deploy upgrade': operation, activation status, and what is left to do before it runs. Also takes the pipeline deployment ID from 'solution deploy run' for that run's progress and errors.").argument("<deployment>", "Deployment name (preferred). A deployment key from 'solution deploy list' / 'solution deploy upgrade', or the pipeline deployment ID from 'solution deploy run', works as well. A key is resolved through the Pipelines deployment lookup, which spans every feed and answers a superseded key with the deployment's current record.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).addOption(new Option("--feed <name-or-key>", "For a deployment name: the feed to look it up in (name or folder key, from 'solution feeds list'). For a key: read only on a server without the Pipelines by-key lookup, whose read is feed-scoped; the lookup itself spans every feed and answers the key wherever it lives. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace")).option("--personal-workspace", "For a deployment name: look it up in your Personal Workspace feed instead of the tenant. For a key: read only on a server without the Pipelines by-key lookup; the lookup itself spans every feed.").examples(SOLUTION_DEPLOY_STATUS_EXAMPLES).trackedAction(processContext, async (deployment, options) => {
|
|
1421
|
-
const [authError, auth] = await catchError(
|
|
1429
|
+
const [authError, auth] = await catchError(getSolutionAuthContext2({
|
|
1422
1430
|
tenant: options.tenant,
|
|
1423
1431
|
loginValidity: options.loginValidity
|
|
1424
1432
|
}));
|
|
@@ -1431,10 +1439,13 @@ var registerDeployStatusCommand = (program) => {
|
|
|
1431
1439
|
processContext.exit(1);
|
|
1432
1440
|
return;
|
|
1433
1441
|
}
|
|
1434
|
-
const { feedScopeInitOverride
|
|
1435
|
-
const {
|
|
1436
|
-
|
|
1437
|
-
|
|
1442
|
+
const { feedScopeInitOverride } = await import("./feed-resolver-14crsx5y.js");
|
|
1443
|
+
const {
|
|
1444
|
+
FeedReadRefusedError,
|
|
1445
|
+
feedReadRefusalAsync,
|
|
1446
|
+
feedReadRefusalForApplication
|
|
1447
|
+
} = await import("./feed-session-g94q2bjc.js");
|
|
1448
|
+
const report = (refusal) => {
|
|
1438
1449
|
if (!refusal) {
|
|
1439
1450
|
return false;
|
|
1440
1451
|
}
|
|
@@ -1448,18 +1459,18 @@ var registerDeployStatusCommand = (program) => {
|
|
|
1448
1459
|
processContext.exit(1);
|
|
1449
1460
|
return true;
|
|
1450
1461
|
};
|
|
1451
|
-
if (options.personalWorkspace === true &&
|
|
1462
|
+
if (options.personalWorkspace === true && report(feedReadRefusalForApplication(auth, "Reading a Personal Workspace deployment"))) {
|
|
1452
1463
|
return;
|
|
1453
1464
|
}
|
|
1454
|
-
const { resolveFeedScopeOrFailureAsync
|
|
1455
|
-
const [scopeFailure, feedScope] = await
|
|
1465
|
+
const { resolveFeedScopeOrFailureAsync } = await import("./feed-scope-failure-67cyybn0.js");
|
|
1466
|
+
const [scopeFailure, feedScope] = await resolveFeedScopeOrFailureAsync(options, auth);
|
|
1456
1467
|
if (scopeFailure) {
|
|
1457
1468
|
OutputFormatter.error(scopeFailure);
|
|
1458
1469
|
processContext.exit(1);
|
|
1459
1470
|
return;
|
|
1460
1471
|
}
|
|
1461
|
-
const { describeDeploymentAsync, looksLikeDeploymentKey } = await import("./deploy-status-service-
|
|
1462
|
-
if (feedScope.kind !== "tenant" && !looksLikeDeploymentKey(deployment) &&
|
|
1472
|
+
const { describeDeploymentAsync, looksLikeDeploymentKey } = await import("./deploy-status-service-6my5vm61.js");
|
|
1473
|
+
if (feedScope.kind !== "tenant" && !looksLikeDeploymentKey(deployment) && report(await feedReadRefusalAsync(auth, feedScope.folderKey, `Reading a deployment in the feed '${feedScope.name ?? feedScope.folderKey}'`))) {
|
|
1463
1474
|
return;
|
|
1464
1475
|
}
|
|
1465
1476
|
const feedSelected = options.personalWorkspace === true || options.feed !== undefined;
|
|
@@ -1492,14 +1503,14 @@ var registerDeployStatusCommand = (program) => {
|
|
|
1492
1503
|
});
|
|
1493
1504
|
return;
|
|
1494
1505
|
}
|
|
1495
|
-
const configuration = new
|
|
1506
|
+
const configuration = new Configuration2({
|
|
1496
1507
|
basePath: auth.basePath,
|
|
1497
1508
|
accessToken: auth.accessToken
|
|
1498
1509
|
});
|
|
1499
1510
|
const api = new PipelinesApi(configuration);
|
|
1500
|
-
const [statusError, result] = await catchError(api.pipelinesGetPipelineDeploymentStatus({ pipelineDeploymentId: deployment }, feedSelected ?
|
|
1511
|
+
const [statusError, result] = await catchError(api.pipelinesGetPipelineDeploymentStatus({ pipelineDeploymentId: deployment }, feedSelected ? feedScopeInitOverride(feedScope) : undefined));
|
|
1501
1512
|
if (statusError) {
|
|
1502
|
-
const { isPipelineDeploymentNotFoundError } = await import("./deployment-search-
|
|
1513
|
+
const { isPipelineDeploymentNotFoundError } = await import("./deployment-search-gfm907tx.js");
|
|
1503
1514
|
if (await isPipelineDeploymentNotFoundError(statusError)) {
|
|
1504
1515
|
const [stateError, state] = await catchError(describe());
|
|
1505
1516
|
if (stateError instanceof FeedReadRefusedError) {
|
|
@@ -1615,11 +1626,11 @@ var SOLUTION_DEPLOY_UNINSTALL_EXAMPLES = [
|
|
|
1615
1626
|
}
|
|
1616
1627
|
];
|
|
1617
1628
|
var registerDeployUninstallCommand = (program) => {
|
|
1618
|
-
program.command("uninstall").description("Uninstall a deployed solution. Removes all provisioned resources and the solution folder.").argument("<deployment-name>", "Name of the deployment to uninstall. Use 'solution deploy list' to find deployment names.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds for uninstall polling (default: 360)", (
|
|
1629
|
+
program.command("uninstall").description("Uninstall a deployed solution. Removes all provisioned resources and the solution folder.").argument("<deployment-name>", "Name of the deployment to uninstall. Use 'solution deploy list' to find deployment names.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--timeout <seconds>", "Timeout in seconds for uninstall polling (default: 360)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between uninstall status polls (default: 5000)", parsePositiveInt("--poll-interval"), 5000).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("--force", "Force the uninstall past the two refusals Orchestrator lets you override: uncompleted jobs, and the permanent deletion of installed resources that were replaced by links. Also confirms the operation, so --yes is not needed in addition. Flag only; the CLI never prompts.").addOption(new Option("--feed <name-or-key>", "The feed the deployment lives in (name or folder key, from 'solution feeds list'). Only that feed is searched; without it the tenant feed, your Personal Workspace and the folder feeds are tried in turn. Needs a user session for a feed other than the tenant's. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace")).option("--personal-workspace", "The deployment lives in your Personal Workspace feed: only that feed is searched. Needs a user session.").examples(SOLUTION_DEPLOY_UNINSTALL_EXAMPLES).trackedAction(processContext, async (deploymentName, options) => {
|
|
1619
1630
|
if (!requireConfirmation(options, `uninstall deployment '${deploymentName}'`)) {
|
|
1620
1631
|
return;
|
|
1621
1632
|
}
|
|
1622
|
-
const result = await
|
|
1633
|
+
const result = await uninstallDeploymentAsync2(deploymentName, {
|
|
1623
1634
|
tenant: options.tenant,
|
|
1624
1635
|
personalWorkspace: options.personalWorkspace,
|
|
1625
1636
|
feed: options.feed,
|
|
@@ -1799,7 +1810,7 @@ var SOLUTION_DEPLOY_UPGRADE_EXAMPLES = [
|
|
|
1799
1810
|
];
|
|
1800
1811
|
var registerDeployUpgradeCommand = (program) => {
|
|
1801
1812
|
program.command("upgrade").description("Upgrade an existing deployment to another published version of its package in place — the CLI equivalent of the Orchestrator UI 'Upgrade' button. Use this when 'deploy run' is blocked because a deployment already exists. The deployment's existing configuration is preserved, so values already set on it (for example a credential asset's secret) are not reset to the package defaults. The package is validated against the target before anything is installed; a validation failure reports the errors and leaves the deployment on its current version. Address the deployment either by key (positional) or by --name with --package-name. Every call this command makes is an external-app (client-credentials) capable Pipelines endpoint, so both forms work from a CI/CD pipeline (on a server that predates the Pipelines deployment lookup, the key form falls back to the Solutions API for a user session); a deployment in a Personal Workspace or folder feed needs a user session, because the server ignores the feed header on client-credentials requests. Waits for the upgrade to finish unless --no-wait is passed; track a running upgrade with 'deploy status <pipeline-deployment-id>'. When the new version replaces an installed resource with a link, the server deletes the installed copy and its data, and asks for confirmation first: the command stops and lists those resources unless --acknowledge-permanent-deletion is passed.").argument("[deployment-key]", "Key of the deployment to upgrade, as 'solution deploy list' reports it (Key), or a stored InstallDeploymentKey. Resolved through the Pipelines deployment lookup: the deployment's name, package, current version and feed come from the server, so --package-name and --personal-workspace are not needed. On a server without that lookup, a user session reads the key through the Solutions API instead, where a Personal Workspace deployment needs --personal-workspace. Use either this or --name with --package-name.").option("-n, --name <deployment-name>", "Name of the deployment to upgrade, as reported by 'solution deploy list'. Goes with --package-name. The name is checked to exist first, because the install route would create a new deployment for a name it cannot find; this form never does.").option("--package-name <name>", "The deployment's package, for the --name form. Required there: it identifies the package version to install, and nothing name-keyed in Pipelines reports it.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).option("--version <version>", "Target package version (default: the newest published). Any published version of the same package is accepted, including an older one.").option("--personal-workspace", "With --name: upgrade a deployment in your Personal Workspace feed instead of the tenant. With a key the feed is read from the deployment itself and this flag is not needed, except on a server without the Pipelines deployment lookup, where a key is read on the tenant feed unless you pass it.").option("--discard-draft", "When the deployment has a pending draft (an earlier attempt that never completed, usually one rejected by validation), discard it first and upgrade the live version. Without it such a deployment is refused, because the server would re-run the draft, with the configuration it was rejected for, in place of this upgrade. With --name the draft is found through a user session only; under an external app, pass the deployment key.").option("--acknowledge-permanent-deletion", "Confirm that installed resources the new version replaces with a link are permanently deleted, along with their data. Without it the upgrade stops at the server's confirmation request and lists those resources; nothing is installed. With it each listed resource is acknowledged and the same upgrade runs once more, within the same --timeout. Also re-runs a pending draft of the same version that awaits this confirmation instead of refusing it. Has no effect with --no-wait, which never sees the run end: such a draft is then refused as without the flag.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("--no-wait", "Return as soon as the upgrade is accepted instead of waiting for it to finish.").option("--timeout <seconds>", "Seconds to wait for the upgrade to finish (default: 300)", (v) => parseInt(v, 10), 300).option("--poll-interval <ms>", "Milliseconds between status polls (default: 5000)", (v) => parseInt(v, 10), 5000).examples(SOLUTION_DEPLOY_UPGRADE_EXAMPLES).trackedAction(processContext, async (deploymentKey, options) => {
|
|
1802
|
-
const result = await
|
|
1813
|
+
const result = await upgradeDeploymentAsync2({
|
|
1803
1814
|
deploymentKey,
|
|
1804
1815
|
deploymentName: options.name,
|
|
1805
1816
|
packageName: options.packageName,
|
|
@@ -1988,7 +1999,7 @@ async function downloadSolution(solutionId, options, command) {
|
|
|
1988
1999
|
const extractedTo = options.extract ? fs.path.join(outputDir, filename.replace(/\.uis$/, "")) : undefined;
|
|
1989
2000
|
let briefingFiles = [];
|
|
1990
2001
|
if (extractedTo) {
|
|
1991
|
-
const { extractArchive } = await import("./archive-extract-
|
|
2002
|
+
const { extractArchive } = await import("./archive-extract-136rn3ja.js");
|
|
1992
2003
|
await extractArchive(outputPath, extractedTo);
|
|
1993
2004
|
logger.info(`Extracted to ${extractedTo}`);
|
|
1994
2005
|
briefingFiles = await writeBriefingFiles(extractedTo);
|
|
@@ -2109,7 +2120,8 @@ var SOLUTION_NEW_EXAMPLES = [
|
|
|
2109
2120
|
}
|
|
2110
2121
|
];
|
|
2111
2122
|
var registerNewCommand = (program) => {
|
|
2112
|
-
program.command("init").description("Initialize a new empty UiPath solution. Creates a directory named after the solution containing a .uipx manifest file with an empty Projects array, plus AGENTS.md and CLAUDE.md briefing files that orient AI coding agents to the solution. Use 'solution projects add' to add projects afterward.").argument("<solution-name>", "Solution name or path. Creates a directory with this name containing a .uipx manifest file.").examples(SOLUTION_NEW_EXAMPLES).trackedAction(processContext, async (solutionName) => {
|
|
2123
|
+
program.command("init").description("Initialize a new empty UiPath solution. Creates a directory named after the solution containing a .uipx manifest file with an empty Projects array, plus AGENTS.md and CLAUDE.md briefing files that orient AI coding agents to the solution. Use 'solution projects add' to add projects afterward.").argument("<solution-name>", "Solution name or path. Creates a directory with this name containing a .uipx manifest file.").examples(SOLUTION_NEW_EXAMPLES).trackedAction(processContext, async (solutionName, _options, command) => {
|
|
2124
|
+
const capture = getProjectTelemetryCapture(command);
|
|
2113
2125
|
const [briefingError, briefingContent] = await catchError(renderBriefingTemplateAsync());
|
|
2114
2126
|
if (briefingError) {
|
|
2115
2127
|
OutputFormatter.error({
|
|
@@ -2120,16 +2132,17 @@ var registerNewCommand = (program) => {
|
|
|
2120
2132
|
processContext.exit(1);
|
|
2121
2133
|
return;
|
|
2122
2134
|
}
|
|
2123
|
-
const [initError, result] = await catchError(
|
|
2135
|
+
const [initError, result] = await catchError(solutionInitAsync2(solutionName, { briefingContent }));
|
|
2124
2136
|
if (initError) {
|
|
2125
2137
|
OutputFormatter.error({
|
|
2126
2138
|
Result: RESULTS.Failure,
|
|
2127
|
-
Message: (initError instanceof
|
|
2139
|
+
Message: (initError instanceof SolutionInitError2 ? SOLUTION_INIT_STAGE_MESSAGES[initError.stage] : undefined) ?? "Failed to create solution",
|
|
2128
2140
|
Instructions: initError.message
|
|
2129
2141
|
});
|
|
2130
2142
|
processContext.exit(1);
|
|
2131
2143
|
return;
|
|
2132
2144
|
}
|
|
2145
|
+
await capture?.setTarget(result.solutionFile);
|
|
2133
2146
|
OutputFormatter.success({
|
|
2134
2147
|
Result: RESULTS.Success,
|
|
2135
2148
|
Code: "SolutionInit",
|
|
@@ -2223,12 +2236,12 @@ function parseIgnoredRules(value, previous = []) {
|
|
|
2223
2236
|
}
|
|
2224
2237
|
var registerPackCommand = (program) => {
|
|
2225
2238
|
const command = program.command("pack").description("Pack a UiPath solution into a deployable .zip package. Accepts a solution directory (containing .uipx) or a .uis file. Output is used with 'solution publish' to upload to UiPath. Pass --project to pack one project into its own .nupkg instead. Pass --dry-run to check that the solution packs without producing a package.").argument("<solution-path>", "Path to a solution directory (containing .uipx) or a .uis file").argument("[output-path]", "Output directory where the packed solution will be saved. Required unless --dry-run is set.").option("-n, --name <name>", "Package name (default: solution folder name or .uis file name)").option("-v, --version <version>", "Package version (default: 1.0.0)", "1.0.0").addOption(new Option("--solution-type <type>", "What kind of solution this is. Omitted by default, which means a standard solution.").choices(["standard", "vertical"]).hideHelp()).option("--project <id-or-path>", "Pack only this project of the solution into its own .nupkg, instead of the solution .zip. It packs as a stand-alone project: no solution resources go into it. Takes the project's Id from the .uipx, or its path relative to the solution folder; a .uis file is not supported.").option("--package-id <id>", "Package id for the project packed with --project, instead of the id a whole-solution pack gives it (<solution>.<type>.<project folder>). Requires --project.").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--exclude-configured-sources", "Resolve project dependencies only from the tenant feeds and any --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds, so a dependency that is not on those feeds fails to restore.").option("--feed-folder <name>", "Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. Accepts a folder name or fully qualified path.").option("--signing-certificate-path <path>", "Path to .pfx certificate file used to sign each packed project .nupkg").option("--signing-certificate-password <password>", "Certificate password. Use env.ENV_NAME to read from an environment variable.").option("--signing-timestamp-server <url>", "Timestamp server URL").option("--skip-analyze", "Skip the workflow analyzer for every RPA project in the solution. Compilation and validation still run.").option("--ignored-rules <rules>", "Analyzer rule IDs whose findings are ignored for every RPA project, e.g. ST-USG-034,ST-MRD-002. Comma-separated; repeat the flag to add more. The rules still run, but their findings are not reported and do not fail the pack. Applies on top of --governance-file-path or the shipped rules; when the signed-in tenant publishes an AutomationOps policy, the list is not applied and a warning says so.", parseIgnoredRules).option("--governance-file-path <path>", "Analyze every RPA project against this local governance policy file, instead of the analyzer rules shipped with the WorkflowCompiler. When you are signed in as a user the tenant is asked first — about StudioWeb unless --governance-product names another product — and when the tenant publishes a policy of its own, that policy is used instead and this file is ignored with a warning.").option("--governance-product <product>", "Analyze every RPA project against the governance policy published in AutomationOps for the signed-in tenant. The value is the product whose policy is downloaded, e.g. StudioWeb, Development, Business. Signed in as an external application, the policy is not downloaded yet (AutomationOps does not accept external-application tokens): the pack uses --governance-file-path if given, otherwise the rules shipped with the WorkflowCompiler.").addOption(new Option("--automation-ops-profile <profile>").hideHelp());
|
|
2226
|
-
registerPackageMetadataOptions(command).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("--dry-run", "Run the full pack pipeline against a temporary directory and discard the output. Catches pack-time failures; does not inspect the produced package contents.").examples(SOLUTION_PACK_EXAMPLES).trackedAction(processContext, async (solutionPath, outputPath, options) => {
|
|
2239
|
+
registerPackageMetadataOptions(command).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).option("--dry-run", "Run the full pack pipeline against a temporary directory and discard the output. Catches pack-time failures; does not inspect the produced package contents.").examples(SOLUTION_PACK_EXAMPLES).trackedAction(processContext, async (solutionPath, outputPath, options, command) => {
|
|
2227
2240
|
const {
|
|
2228
2241
|
GOVERNANCE_OPTION_INSTRUCTIONS,
|
|
2229
2242
|
validateGovernanceOptions
|
|
2230
|
-
} = await import("./governance-options-
|
|
2231
|
-
const { PackCommandService } = await import("./pack-command-service-
|
|
2243
|
+
} = await import("./governance-options-t20vsznh.js");
|
|
2244
|
+
const { PackCommandService } = await import("./pack-command-service-pwaeha7y.js");
|
|
2232
2245
|
if (!options.dryRun && outputPath === undefined) {
|
|
2233
2246
|
OutputFormatter.error({
|
|
2234
2247
|
Result: RESULTS.Failure,
|
|
@@ -2300,7 +2313,8 @@ var registerPackCommand = (program) => {
|
|
|
2300
2313
|
ignoredRules: options.ignoredRules,
|
|
2301
2314
|
governanceFilePath: options.governanceFilePath,
|
|
2302
2315
|
governanceProduct: product.value,
|
|
2303
|
-
...mapPackageMetadataOptions(options)
|
|
2316
|
+
...mapPackageMetadataOptions(options),
|
|
2317
|
+
telemetryCapture: getProjectTelemetryCapture(command)
|
|
2304
2318
|
};
|
|
2305
2319
|
await service.execute(solutionPath, packOptions, processContext);
|
|
2306
2320
|
});
|
|
@@ -2331,11 +2345,11 @@ function packageDeleteFailureInstructions(scope, packageName) {
|
|
|
2331
2345
|
return `${base} If the package was published to a Personal Workspace or folder feed, add --personal-workspace or --feed.`;
|
|
2332
2346
|
}
|
|
2333
2347
|
async function deletePackageVersion(auth, scope, packageName, packageVersion) {
|
|
2334
|
-
const api = new PipelinesApi(new
|
|
2348
|
+
const api = new PipelinesApi(new Configuration2({
|
|
2335
2349
|
basePath: auth.basePath,
|
|
2336
2350
|
accessToken: auth.accessToken
|
|
2337
2351
|
}));
|
|
2338
|
-
await api.pipelinesPackageDelete({ packageName, packageVersion },
|
|
2352
|
+
await api.pipelinesPackageDelete({ packageName, packageVersion }, feedScopeInitOverride2(scope));
|
|
2339
2353
|
}
|
|
2340
2354
|
var registerPackagesDeleteCommand = (program) => {
|
|
2341
2355
|
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.");
|
|
@@ -2344,7 +2358,7 @@ var registerPackagesDeleteCommand = (program) => {
|
|
|
2344
2358
|
if (!requireConfirmation(options, `delete package '${packageName}@${packageVersion}'`)) {
|
|
2345
2359
|
return;
|
|
2346
2360
|
}
|
|
2347
|
-
const [authError, auth] = await catchError(
|
|
2361
|
+
const [authError, auth] = await catchError(getSolutionAuthContext2({
|
|
2348
2362
|
tenant: options.tenant,
|
|
2349
2363
|
loginValidity: options.loginValidity
|
|
2350
2364
|
}));
|
|
@@ -2357,12 +2371,27 @@ var registerPackagesDeleteCommand = (program) => {
|
|
|
2357
2371
|
processContext.exit(1);
|
|
2358
2372
|
return;
|
|
2359
2373
|
}
|
|
2360
|
-
const [scopeFailure, scope] = await
|
|
2374
|
+
const [scopeFailure, scope] = await resolveFeedScopeOrFailureAsync2(options, auth);
|
|
2361
2375
|
if (scopeFailure) {
|
|
2362
2376
|
OutputFormatter.error(scopeFailure);
|
|
2363
2377
|
processContext.exit(1);
|
|
2364
2378
|
return;
|
|
2365
2379
|
}
|
|
2380
|
+
if (scope.kind !== "tenant" && scope.folderKey) {
|
|
2381
|
+
const { feedSessionRefusalAsync } = await import("./feed-session-g94q2bjc.js");
|
|
2382
|
+
const refusal = await feedSessionRefusalAsync(auth, scope.folderKey, "write", `Deleting a package version from the feed '${scope.name ?? scope.folderKey}'`, "drop the feed flag to delete from the tenant feed", "packages");
|
|
2383
|
+
if (refusal) {
|
|
2384
|
+
OutputFormatter.error({
|
|
2385
|
+
Result: RESULTS.Failure,
|
|
2386
|
+
Message: refusal.message,
|
|
2387
|
+
Instructions: refusal.instructions,
|
|
2388
|
+
ErrorCode: "permission_denied",
|
|
2389
|
+
Retry: "RetryWillNotFix"
|
|
2390
|
+
});
|
|
2391
|
+
processContext.exit(1);
|
|
2392
|
+
return;
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2366
2395
|
const [deleteError] = await catchError(deletePackageVersion(auth, scope, packageName, packageVersion));
|
|
2367
2396
|
if (deleteError) {
|
|
2368
2397
|
const { message } = await extractErrorDetails(deleteError);
|
|
@@ -2448,7 +2477,7 @@ var registerPackagesDownloadCommand = (program) => {
|
|
|
2448
2477
|
processContext.exit(1);
|
|
2449
2478
|
return;
|
|
2450
2479
|
}
|
|
2451
|
-
const [authError, auth] = await catchError(
|
|
2480
|
+
const [authError, auth] = await catchError(getSolutionAuthContext2({
|
|
2452
2481
|
tenant: options.tenant,
|
|
2453
2482
|
loginValidity: options.loginValidity
|
|
2454
2483
|
}));
|
|
@@ -2461,7 +2490,7 @@ var registerPackagesDownloadCommand = (program) => {
|
|
|
2461
2490
|
processContext.exit(1);
|
|
2462
2491
|
return;
|
|
2463
2492
|
}
|
|
2464
|
-
const configuration = new
|
|
2493
|
+
const configuration = new Configuration2({
|
|
2465
2494
|
basePath: auth.basePath,
|
|
2466
2495
|
accessToken: auth.accessToken
|
|
2467
2496
|
});
|
|
@@ -2594,7 +2623,7 @@ var registerPackagesListCommand = (program) => {
|
|
|
2594
2623
|
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.");
|
|
2595
2624
|
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"));
|
|
2596
2625
|
command.examples(SOLUTION_PACKAGES_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
2597
|
-
const result = await
|
|
2626
|
+
const result = await listPackagesAsync2({
|
|
2598
2627
|
tenant: options.tenant,
|
|
2599
2628
|
limit: options.limit,
|
|
2600
2629
|
offset: options.offset,
|
|
@@ -2657,7 +2686,7 @@ var PROJECT_ADD_EXAMPLES = [
|
|
|
2657
2686
|
}
|
|
2658
2687
|
];
|
|
2659
2688
|
async function hasProjectInSolution(fs, solutionDir, projectDir, projects) {
|
|
2660
|
-
const { toPortableRelativePath } = await import("./index-
|
|
2689
|
+
const { toPortableRelativePath } = await import("./index-ddk6v1ej.js");
|
|
2661
2690
|
const projectDirReal = await canonicalizePath(fs, projectDir);
|
|
2662
2691
|
for (const project of projects ?? []) {
|
|
2663
2692
|
const candidateDir = fs.path.resolve(solutionDir, fs.path.dirname(toPortableRelativePath(project.ProjectRelativePath)));
|
|
@@ -2673,7 +2702,7 @@ async function canonicalizePath(fs, path) {
|
|
|
2673
2702
|
return error || !realPath ? path : realPath;
|
|
2674
2703
|
}
|
|
2675
2704
|
var registerProjectAddCommand = (project) => {
|
|
2676
|
-
project.command("add").description("Register an existing project subfolder in the .uipx solution manifest. The project folder must already reside inside the solution directory. Use 'projects import' instead to copy an external project into the solution.").argument("<project-path>", "Path to the project folder (must contain project.uiproj, project.json, or uipath.json), or to that manifest file itself").argument("[solution-file]", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the project path)").examples(PROJECT_ADD_EXAMPLES).trackedAction(processContext, async (projectPath, solutionFile) => {
|
|
2705
|
+
project.command("add").description("Register an existing project subfolder in the .uipx solution manifest. The project folder must already reside inside the solution directory. Use 'projects import' instead to copy an external project into the solution.").argument("<project-path>", "Path to the project folder (must contain project.uiproj, project.json, or uipath.json), or to that manifest file itself").argument("[solution-file]", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the project path)").examples(PROJECT_ADD_EXAMPLES).trackedAction(processContext, async (projectPath, solutionFile, _options, command) => {
|
|
2677
2706
|
const {
|
|
2678
2707
|
createProjectInSolutionBuilder,
|
|
2679
2708
|
findProjectFile,
|
|
@@ -2684,8 +2713,8 @@ var registerProjectAddCommand = (project) => {
|
|
|
2684
2713
|
restoreSolutionFile,
|
|
2685
2714
|
syncResourcesFromBindings,
|
|
2686
2715
|
writeSolutionFile
|
|
2687
|
-
} = await import("./index-
|
|
2688
|
-
const { toPortableRelativePath } = await import("./index-
|
|
2716
|
+
} = await import("./index-qq4kre7a.js");
|
|
2717
|
+
const { toPortableRelativePath } = await import("./index-ddk6v1ej.js");
|
|
2689
2718
|
const {
|
|
2690
2719
|
hostGeneratesResources,
|
|
2691
2720
|
projectManifestInstructions,
|
|
@@ -2693,7 +2722,8 @@ var registerProjectAddCommand = (project) => {
|
|
|
2693
2722
|
resolveProjectManifestDirectory,
|
|
2694
2723
|
resourcesPendingForProjectType,
|
|
2695
2724
|
resourcesPendingWarning
|
|
2696
|
-
} = await import("./project-command-utils-
|
|
2725
|
+
} = await import("./project-command-utils-zcmbecfy.js");
|
|
2726
|
+
const capture = getProjectTelemetryCapture(command);
|
|
2697
2727
|
const fs = getFileSystem();
|
|
2698
2728
|
const resolvedProjectPath = await resolveProjectManifestDirectory(fs, fs.path.resolve(fs.env.cwd(), projectPath));
|
|
2699
2729
|
const isResolvedProjectPathValid = await fs.exists(resolvedProjectPath);
|
|
@@ -2726,6 +2756,7 @@ var registerProjectAddCommand = (project) => {
|
|
|
2726
2756
|
processContext.exit(1);
|
|
2727
2757
|
return;
|
|
2728
2758
|
}
|
|
2759
|
+
await capture?.setTarget(resolvedSolutionFile);
|
|
2729
2760
|
const solutionDir = fs.path.dirname(resolvedSolutionFile);
|
|
2730
2761
|
const relativePath = fs.path.relative(solutionDir, resolvedProjectPath);
|
|
2731
2762
|
if (relativePath.startsWith("..")) {
|
|
@@ -2786,6 +2817,7 @@ var registerProjectAddCommand = (project) => {
|
|
|
2786
2817
|
ProjectRelativePath: projectRelativePath,
|
|
2787
2818
|
Id: projectId
|
|
2788
2819
|
});
|
|
2820
|
+
captureSolutionMember2(capture, projectId);
|
|
2789
2821
|
const writeError = await writeSolutionFile(resolvedSolutionFile, solution);
|
|
2790
2822
|
if (writeError) {
|
|
2791
2823
|
OutputFormatter.error({
|
|
@@ -2849,7 +2881,7 @@ var PROJECT_IMPORT_EXAMPLES = [
|
|
|
2849
2881
|
}
|
|
2850
2882
|
];
|
|
2851
2883
|
var registerProjectImportCommand = (project) => {
|
|
2852
|
-
const command = project.command("import").description("Copy an external project folder into the solution directory and register it in the .uipx manifest. Unlike 'projects add' which references an existing subfolder, import copies the source files into the solution tree.").argument("<source>", "Path to the project folder to import (must contain project.uiproj, project.json, or uipath.json)").option("--solution-file <path>", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the current directory)").examples(PROJECT_IMPORT_EXAMPLES).trackedAction(processContext, async (sourcePath, options) => {
|
|
2884
|
+
const command = project.command("import").description("Copy an external project folder into the solution directory and register it in the .uipx manifest. Unlike 'projects add' which references an existing subfolder, import copies the source files into the solution tree.").argument("<source>", "Path to the project folder to import (must contain project.uiproj, project.json, or uipath.json)").option("--solution-file <path>", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the current directory)").examples(PROJECT_IMPORT_EXAMPLES).trackedAction(processContext, async (sourcePath, options, command) => {
|
|
2853
2885
|
const {
|
|
2854
2886
|
createProjectInSolutionBuilder,
|
|
2855
2887
|
findProjectFile,
|
|
@@ -2859,15 +2891,16 @@ var registerProjectImportCommand = (project) => {
|
|
|
2859
2891
|
resolveSolutionFilePath,
|
|
2860
2892
|
syncResourcesFromBindings,
|
|
2861
2893
|
writeSolutionFile
|
|
2862
|
-
} = await import("./index-
|
|
2863
|
-
const { toPortableRelativePath } = await import("./index-
|
|
2894
|
+
} = await import("./index-qq4kre7a.js");
|
|
2895
|
+
const { toPortableRelativePath } = await import("./index-ddk6v1ej.js");
|
|
2864
2896
|
const {
|
|
2865
2897
|
hostGeneratesResources,
|
|
2866
2898
|
projectManifestInstructions,
|
|
2867
2899
|
rejectUnsupportedProjectType,
|
|
2868
2900
|
resourcesPendingForProjectType,
|
|
2869
2901
|
resourcesPendingWarning
|
|
2870
|
-
} = await import("./project-command-utils-
|
|
2902
|
+
} = await import("./project-command-utils-zcmbecfy.js");
|
|
2903
|
+
const capture = getProjectTelemetryCapture(command);
|
|
2871
2904
|
const { solutionFile } = options;
|
|
2872
2905
|
const fs = getFileSystem();
|
|
2873
2906
|
const cwd = fs.env.cwd();
|
|
@@ -2934,6 +2967,7 @@ var registerProjectImportCommand = (project) => {
|
|
|
2934
2967
|
processContext.exit(1);
|
|
2935
2968
|
return;
|
|
2936
2969
|
}
|
|
2970
|
+
await capture?.setTarget(resolvedSolutionFile);
|
|
2937
2971
|
const solutionDir = fs.path.dirname(resolvedSolutionFile);
|
|
2938
2972
|
const projectFolderName = fs.path.basename(resolvedSourcePath);
|
|
2939
2973
|
const targetProjectPath = fs.path.join(solutionDir, projectFolderName);
|
|
@@ -2990,6 +3024,7 @@ var registerProjectImportCommand = (project) => {
|
|
|
2990
3024
|
ProjectRelativePath: projectRelativePath,
|
|
2991
3025
|
Id: projectId
|
|
2992
3026
|
});
|
|
3027
|
+
captureSolutionMember2(capture, projectId);
|
|
2993
3028
|
const writeError = await writeSolutionFile(resolvedSolutionFile, solution);
|
|
2994
3029
|
if (writeError) {
|
|
2995
3030
|
await catchError(fs.rm(targetProjectPath));
|
|
@@ -3041,7 +3076,7 @@ var registerProjectImportCommand = (project) => {
|
|
|
3041
3076
|
// src/commands/project-list.ts
|
|
3042
3077
|
async function readProjectName(fs, projectFilePath) {
|
|
3043
3078
|
const [readError, content] = await catchError(fs.readFile(projectFilePath, "utf-8"));
|
|
3044
|
-
if (readError)
|
|
3079
|
+
if (readError || content === null)
|
|
3045
3080
|
return;
|
|
3046
3081
|
const [parseError, parsed] = catchError(() => JSON.parse(content));
|
|
3047
3082
|
if (parseError || !parsed || typeof parsed !== "object")
|
|
@@ -3054,7 +3089,7 @@ function fallbackProjectName(fs, solutionDir, projectRelativePath) {
|
|
|
3054
3089
|
return projectDir && projectDir !== "." ? fs.path.basename(projectDir) : fs.path.basename(solutionDir);
|
|
3055
3090
|
}
|
|
3056
3091
|
async function createPackageIdReaderAsync(fs, solutionDir, solutionName) {
|
|
3057
|
-
const { readMemberPackageIdAsync } = await import("./package-id-
|
|
3092
|
+
const { readMemberPackageIdAsync } = await import("./package-id-4tsg5jsb.js");
|
|
3058
3093
|
return async (project) => {
|
|
3059
3094
|
const [error, packageId] = await catchError(readMemberPackageIdAsync(fs, project, solutionDir, solutionName));
|
|
3060
3095
|
return error ? undefined : packageId ?? undefined;
|
|
@@ -3080,8 +3115,9 @@ var PROJECT_LIST_EXAMPLES = [
|
|
|
3080
3115
|
}
|
|
3081
3116
|
];
|
|
3082
3117
|
var registerProjectListCommand = (project) => {
|
|
3083
|
-
project.command("list").description("List the projects registered in the local .uipx solution manifest, each with the package id a solution pack gives it. " + "Reads only on-disk metadata — does not call any backend.").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").examples(PROJECT_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
3084
|
-
const { readSolutionFile, resolveSolutionFilePath } = await import("./index-
|
|
3118
|
+
project.command("list").description("List the projects registered in the local .uipx solution manifest, each with the package id a solution pack gives it. " + "Reads only on-disk metadata — does not call any backend.").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").examples(PROJECT_LIST_EXAMPLES).trackedAction(processContext, async (options, command) => {
|
|
3119
|
+
const { readSolutionFile, resolveSolutionFilePath } = await import("./index-qq4kre7a.js");
|
|
3120
|
+
const capture = getProjectTelemetryCapture(command);
|
|
3085
3121
|
const fs = getFileSystem();
|
|
3086
3122
|
const solutionPath = options.solutionFolder ?? ".";
|
|
3087
3123
|
const resolvedPath = fs.path.resolve(fs.env.cwd(), solutionPath);
|
|
@@ -3105,6 +3141,7 @@ var registerProjectListCommand = (project) => {
|
|
|
3105
3141
|
processContext.exit(1);
|
|
3106
3142
|
return;
|
|
3107
3143
|
}
|
|
3144
|
+
await capture?.setTarget(resolvedSolutionFile);
|
|
3108
3145
|
const [readSolutionError, parsedSolution] = await readSolutionFile(resolvedSolutionFile);
|
|
3109
3146
|
if (readSolutionError) {
|
|
3110
3147
|
OutputFormatter.error({
|
|
@@ -3142,42 +3179,6 @@ var registerProjectListCommand = (project) => {
|
|
|
3142
3179
|
});
|
|
3143
3180
|
};
|
|
3144
3181
|
|
|
3145
|
-
// src/utils/option-parsers.ts
|
|
3146
|
-
var parsePositiveInt = (optionName) => {
|
|
3147
|
-
return (raw) => parseBoundedInt(raw, optionName, {
|
|
3148
|
-
min: 1,
|
|
3149
|
-
max: Number.MAX_SAFE_INTEGER
|
|
3150
|
-
});
|
|
3151
|
-
};
|
|
3152
|
-
|
|
3153
|
-
// src/utils/poll-result-handler.ts
|
|
3154
|
-
var EXIT_CODES = {
|
|
3155
|
-
[PollOutcome.Completed]: 0,
|
|
3156
|
-
[PollOutcome.Timeout]: 2,
|
|
3157
|
-
[PollOutcome.Failed]: 1,
|
|
3158
|
-
[PollOutcome.Interrupted]: 1,
|
|
3159
|
-
[PollOutcome.Aborted]: 1
|
|
3160
|
-
};
|
|
3161
|
-
function handlePollFailure(pollResult, noun, instructions) {
|
|
3162
|
-
if (pollResult.outcome === PollOutcome.Completed && pollResult.data) {
|
|
3163
|
-
return false;
|
|
3164
|
-
}
|
|
3165
|
-
const messages = {
|
|
3166
|
-
[PollOutcome.Completed]: "",
|
|
3167
|
-
[PollOutcome.Timeout]: `${noun} polling timed out`,
|
|
3168
|
-
[PollOutcome.Failed]: `${noun} polling failed: ${pollResult.error?.message ?? "too many consecutive errors"}`,
|
|
3169
|
-
[PollOutcome.Interrupted]: `${noun} polling was interrupted`,
|
|
3170
|
-
[PollOutcome.Aborted]: `${noun} polling was aborted`
|
|
3171
|
-
};
|
|
3172
|
-
OutputFormatter.error({
|
|
3173
|
-
Result: RESULTS.Failure,
|
|
3174
|
-
Message: messages[pollResult.outcome],
|
|
3175
|
-
Instructions: instructions
|
|
3176
|
-
});
|
|
3177
|
-
processContext.exit(EXIT_CODES[pollResult.outcome]);
|
|
3178
|
-
return true;
|
|
3179
|
-
}
|
|
3180
|
-
|
|
3181
3182
|
// src/commands/project-publish.ts
|
|
3182
3183
|
var TERMINAL_STATUSES = new Set([
|
|
3183
3184
|
"Completed",
|
|
@@ -3200,7 +3201,7 @@ var SOLUTION_PROJECT_PUBLISH_EXAMPLES = [
|
|
|
3200
3201
|
];
|
|
3201
3202
|
var registerProjectPublishCommand = (project) => {
|
|
3202
3203
|
project.command("publish").description("Publish a cloud solution project as a solution package and wait for the package publish operation to complete.").requiredOption("--project-name <name>", "Cloud solution project name to publish").requiredOption("--package-name <name>", "Solution package name to create").requiredOption("--package-version <version>", "Solution package version to create").option("--folder-name <name>", "Root folder name to store in the solution package").option("--description <text>", "Solution package description").option("--release-notes <text>", "Solution package release notes").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to value selected during auth)").option("--timeout <seconds>", "Timeout in seconds for publish polling (default: 360)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between publish status polls (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(SOLUTION_PROJECT_PUBLISH_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
3203
|
-
const [authError, auth] = await catchError(
|
|
3204
|
+
const [authError, auth] = await catchError(getSolutionAuthContext2({
|
|
3204
3205
|
tenant: options.tenant,
|
|
3205
3206
|
loginValidity: options.loginValidity
|
|
3206
3207
|
}));
|
|
@@ -3213,7 +3214,7 @@ var registerProjectPublishCommand = (project) => {
|
|
|
3213
3214
|
processContext.exit(1);
|
|
3214
3215
|
return;
|
|
3215
3216
|
}
|
|
3216
|
-
const api = new PipelinesApi(new
|
|
3217
|
+
const api = new PipelinesApi(new Configuration2({
|
|
3217
3218
|
basePath: auth.basePath,
|
|
3218
3219
|
accessToken: auth.accessToken
|
|
3219
3220
|
}));
|
|
@@ -3251,15 +3252,25 @@ var registerProjectPublishCommand = (project) => {
|
|
|
3251
3252
|
signal: processContext.pollSignal
|
|
3252
3253
|
});
|
|
3253
3254
|
if (pollResult.outcome !== PollOutcome.Completed) {
|
|
3254
|
-
|
|
3255
|
+
const failure = mapPollFailure(pollResult, "Publish");
|
|
3256
|
+
OutputFormatter.error({
|
|
3257
|
+
Result: RESULTS.Failure,
|
|
3258
|
+
ErrorCode: failure.errorCode,
|
|
3259
|
+
Message: failure.message,
|
|
3260
|
+
Instructions: `Package publish may still be in progress. Check status with: uip solution packages list --name ${options.packageName}`,
|
|
3261
|
+
Retry: failure.retry
|
|
3262
|
+
});
|
|
3263
|
+
processContext.exit(failure.exitCode);
|
|
3255
3264
|
return;
|
|
3256
3265
|
}
|
|
3257
3266
|
const finalStatus = pollResult.data;
|
|
3258
3267
|
if (!finalStatus) {
|
|
3259
3268
|
OutputFormatter.error({
|
|
3260
3269
|
Result: RESULTS.Failure,
|
|
3270
|
+
ErrorCode: "server_error",
|
|
3261
3271
|
Message: "Publish did not return a final status.",
|
|
3262
|
-
Instructions: `Check status with: uip solution packages list --name ${options.packageName}
|
|
3272
|
+
Instructions: `Check status with: uip solution packages list --name ${options.packageName}`,
|
|
3273
|
+
Retry: "RetryLater"
|
|
3263
3274
|
});
|
|
3264
3275
|
processContext.exit(1);
|
|
3265
3276
|
return;
|
|
@@ -3314,16 +3325,17 @@ var PROJECT_REMOVE_EXAMPLES = [
|
|
|
3314
3325
|
}
|
|
3315
3326
|
];
|
|
3316
3327
|
var registerProjectRemoveCommand = (project) => {
|
|
3317
|
-
project.command("remove").description("Unregister a project from the .uipx solution manifest and remove its entry from the solution builder. Does not delete the project files from disk. Doesn't remove the last project in a solution.").argument("<project-path>", "Path to the project folder to remove, or to its project manifest file (the form the .uipx records)").argument("[solution-file]", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the project path)").examples(PROJECT_REMOVE_EXAMPLES).trackedAction(processContext, async (projectPath, solutionFile) => {
|
|
3328
|
+
project.command("remove").description("Unregister a project from the .uipx solution manifest and remove its entry from the solution builder. Does not delete the project files from disk. Doesn't remove the last project in a solution.").argument("<project-path>", "Path to the project folder to remove, or to its project manifest file (the form the .uipx records)").argument("[solution-file]", "Path to the .uipx solution file (defaults to the nearest .uipx file found by searching up from the project path)").examples(PROJECT_REMOVE_EXAMPLES).trackedAction(processContext, async (projectPath, solutionFile, _options, command) => {
|
|
3318
3329
|
const {
|
|
3319
3330
|
createResourceBuilderServices,
|
|
3320
3331
|
readSolutionFile,
|
|
3321
3332
|
resolveSolutionFilePath,
|
|
3322
3333
|
restoreSolutionFile,
|
|
3323
3334
|
writeSolutionFile
|
|
3324
|
-
} = await import("./index-
|
|
3325
|
-
const { toPortableRelativePath } = await import("./index-
|
|
3326
|
-
const { resolveSolutionSearchStart } = await import("./project-command-utils-
|
|
3335
|
+
} = await import("./index-qq4kre7a.js");
|
|
3336
|
+
const { toPortableRelativePath } = await import("./index-ddk6v1ej.js");
|
|
3337
|
+
const { resolveSolutionSearchStart } = await import("./project-command-utils-zcmbecfy.js");
|
|
3338
|
+
const capture = getProjectTelemetryCapture(command);
|
|
3327
3339
|
const fs = getFileSystem();
|
|
3328
3340
|
const resolvedProjectPath = fs.path.resolve(fs.env.cwd(), projectPath);
|
|
3329
3341
|
const searchStart = solutionFile ? resolvedProjectPath : await resolveSolutionSearchStart(fs, resolvedProjectPath);
|
|
@@ -3337,6 +3349,7 @@ var registerProjectRemoveCommand = (project) => {
|
|
|
3337
3349
|
processContext.exit(1);
|
|
3338
3350
|
return;
|
|
3339
3351
|
}
|
|
3352
|
+
await capture?.setTarget(resolvedSolutionFile);
|
|
3340
3353
|
const solutionDir = fs.path.dirname(resolvedSolutionFile);
|
|
3341
3354
|
const relativePath = fs.path.relative(solutionDir, resolvedProjectPath);
|
|
3342
3355
|
if (relativePath.startsWith("..")) {
|
|
@@ -3376,6 +3389,7 @@ var registerProjectRemoveCommand = (project) => {
|
|
|
3376
3389
|
return;
|
|
3377
3390
|
}
|
|
3378
3391
|
const projects = solution.Projects ?? [];
|
|
3392
|
+
captureSolutionMember2(capture, projects[projectIndex].Id);
|
|
3379
3393
|
const removingUnsupportedType = unsupportedSolutionProjectType(projects[projectIndex].Type) !== null;
|
|
3380
3394
|
if (projects.length <= 1 && !removingUnsupportedType) {
|
|
3381
3395
|
OutputFormatter.error({
|
|
@@ -3502,7 +3516,7 @@ var registerProjectResyncCommand = (project) => {
|
|
|
3502
3516
|
processContext.exit(1);
|
|
3503
3517
|
return;
|
|
3504
3518
|
}
|
|
3505
|
-
const [authError, auth] = await catchError(
|
|
3519
|
+
const [authError, auth] = await catchError(getSolutionAuthContext2({
|
|
3506
3520
|
tenant: options.tenant,
|
|
3507
3521
|
loginValidity: options.loginValidity
|
|
3508
3522
|
}));
|
|
@@ -3515,7 +3529,7 @@ var registerProjectResyncCommand = (project) => {
|
|
|
3515
3529
|
processContext.exit(1);
|
|
3516
3530
|
return;
|
|
3517
3531
|
}
|
|
3518
|
-
const api = new PipelinesApi(new
|
|
3532
|
+
const api = new PipelinesApi(new Configuration2({
|
|
3519
3533
|
basePath: auth.basePath,
|
|
3520
3534
|
accessToken: auth.accessToken
|
|
3521
3535
|
}));
|
|
@@ -3549,15 +3563,25 @@ var registerProjectResyncCommand = (project) => {
|
|
|
3549
3563
|
signal: processContext.pollSignal
|
|
3550
3564
|
});
|
|
3551
3565
|
if (pollResult.outcome !== PollOutcome.Completed) {
|
|
3552
|
-
|
|
3566
|
+
const failure = mapPollFailure(pollResult, "Project sync");
|
|
3567
|
+
OutputFormatter.error({
|
|
3568
|
+
Result: RESULTS.Failure,
|
|
3569
|
+
ErrorCode: failure.errorCode,
|
|
3570
|
+
Message: failure.message,
|
|
3571
|
+
Instructions: `Project sync may still be in progress. Re-run the command or check project ${projectName} in Automation Cloud.`,
|
|
3572
|
+
Retry: failure.retry
|
|
3573
|
+
});
|
|
3574
|
+
processContext.exit(failure.exitCode);
|
|
3553
3575
|
return;
|
|
3554
3576
|
}
|
|
3555
3577
|
const finalStatus = pollResult.data;
|
|
3556
3578
|
if (!finalStatus) {
|
|
3557
3579
|
OutputFormatter.error({
|
|
3558
3580
|
Result: RESULTS.Failure,
|
|
3581
|
+
ErrorCode: "server_error",
|
|
3559
3582
|
Message: "Project sync did not return a final status.",
|
|
3560
|
-
Instructions: `Check project ${projectName} in Automation Cloud
|
|
3583
|
+
Instructions: `Check project ${projectName} in Automation Cloud.`,
|
|
3584
|
+
Retry: "RetryLater"
|
|
3561
3585
|
});
|
|
3562
3586
|
processContext.exit(1);
|
|
3563
3587
|
return;
|
|
@@ -3703,6 +3727,7 @@ var PUBLISH_INSTRUCTIONS = {
|
|
|
3703
3727
|
metadata_rewrite_failed: METADATA_REWRITE_INSTRUCTIONS,
|
|
3704
3728
|
personal_workspace_resolution_failed: "Verify the current user has a Personal Workspace configured in Orchestrator, then retry. To publish to the tenant feed instead, omit --personal-workspace.",
|
|
3705
3729
|
feed_resolution_failed: "Verify the feed is one you can publish to — list your feeds with 'uip solution feeds list' and pass a Name or Key from there. To publish to the tenant feed instead, omit --feed.",
|
|
3730
|
+
feed_requires_user_session: "Run the publish with a user session ('uip login'), or omit the feed flag to publish to the tenant feed.",
|
|
3706
3731
|
upload_failed: UPLOAD_GENERIC_INSTRUCTIONS,
|
|
3707
3732
|
upload_rejected: UPLOAD_REJECTED_INSTRUCTIONS,
|
|
3708
3733
|
upload_version_conflict: VERSION_CONFLICT_INSTRUCTIONS,
|
|
@@ -3716,10 +3741,11 @@ var EXIT_CODES_BY_REASON = {
|
|
|
3716
3741
|
poll_timeout: 2
|
|
3717
3742
|
};
|
|
3718
3743
|
var registerPublishCommand = (program) => {
|
|
3719
|
-
const command = program.command("publish").description("Publish a solution package (.zip) to the UiPath solution feed. The .zip must be produced by 'solution pack'. By default the package lands in the tenant feed; use --personal-workspace to target the current user's Personal Workspace feed. After publishing, use 'solution deploy run' to deploy it.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).argument("<package-path>", "Path to a .zip package file produced by 'solution pack'.").option("--personal-workspace", "Upload the package into the current user's Personal Workspace feed instead of the tenant feed. Resolves the workspace folder key from Orchestrator automatically.").option("--package-name <name>", "Publish under this package name instead of the one the .zip was packed with. Rewrites the archive's solutionMetadata.json in memory (with a fresh package version key); the file on disk is left untouched. The bundled project packages keep their own names and versions.").option("--package-version <version>", "Publish under this package version instead of the one the .zip was packed with. Use it to clear a 'version already exists' rejection when you have the packed .zip but not the solution source. Same in-memory rewrite as --package-name.").option("--wait", "Wait until the published package is Ready or Active").option("--timeout <seconds>", "Timeout in seconds for package state polling (default: 360)", (
|
|
3744
|
+
const command = program.command("publish").description("Publish a solution package (.zip) to the UiPath solution feed. The .zip must be produced by 'solution pack'. By default the package lands in the tenant feed; use --personal-workspace to target the current user's Personal Workspace feed. After publishing, use 'solution deploy run' to deploy it.").addOption(createHiddenDeprecatedTenantOption("-t, --tenant <tenant-name>")).argument("<package-path>", "Path to a .zip package file produced by 'solution pack'.").option("--personal-workspace", "Upload the package into the current user's Personal Workspace feed instead of the tenant feed. Resolves the workspace folder key from Orchestrator automatically.").option("--package-name <name>", "Publish under this package name instead of the one the .zip was packed with. Rewrites the archive's solutionMetadata.json in memory (with a fresh package version key); the file on disk is left untouched. The bundled project packages keep their own names and versions.").option("--package-version <version>", "Publish under this package version instead of the one the .zip was packed with. Use it to clear a 'version already exists' rejection when you have the packed .zip but not the solution source. Same in-memory rewrite as --package-name.").option("--wait", "Wait until the published package is Ready or Active").option("--timeout <seconds>", "Timeout in seconds for package state polling (default: 360)", parsePositiveInt("--timeout"), 360).option("--poll-interval <ms>", "Milliseconds between package state polls (default: 5000)", parsePositiveInt("--poll-interval"), 5000).option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10);
|
|
3720
3745
|
command.addOption(new Option("--feed <name-or-key>", "Publish into a feed by its name or folder key (from 'solution feeds list') instead of the tenant feed. Mutually exclusive with --personal-workspace.").conflicts("personalWorkspace"));
|
|
3721
|
-
command.examples([...SOLUTION_PUBLISH_EXAMPLES, SOLUTION_PUBLISH_FEED_EXAMPLE]).trackedAction(processContext, async (packagePath, options) => {
|
|
3722
|
-
const
|
|
3746
|
+
command.examples([...SOLUTION_PUBLISH_EXAMPLES, SOLUTION_PUBLISH_FEED_EXAMPLE]).trackedAction(processContext, async (packagePath, options, invokedCommand) => {
|
|
3747
|
+
const capture = getProjectTelemetryCapture(invokedCommand);
|
|
3748
|
+
const result = await publishSolutionAsync2(packagePath, {
|
|
3723
3749
|
tenant: options.tenant,
|
|
3724
3750
|
personalWorkspace: options.personalWorkspace,
|
|
3725
3751
|
feed: options.feed,
|
|
@@ -3729,10 +3755,11 @@ var registerPublishCommand = (program) => {
|
|
|
3729
3755
|
timeout: options.timeout,
|
|
3730
3756
|
pollInterval: options.pollInterval,
|
|
3731
3757
|
loginValidity: options.loginValidity,
|
|
3732
|
-
signal: processContext.pollSignal
|
|
3758
|
+
signal: processContext.pollSignal,
|
|
3759
|
+
telemetryCapture: capture
|
|
3733
3760
|
});
|
|
3734
3761
|
if (!result.ok) {
|
|
3735
|
-
let instructions = PUBLISH_INSTRUCTIONS[result.reason];
|
|
3762
|
+
let instructions = result.instructions ?? PUBLISH_INSTRUCTIONS[result.reason];
|
|
3736
3763
|
if (result.reason === "file_read_failed") {
|
|
3737
3764
|
instructions = `Unable to read file: ${result.details ?? packagePath}`;
|
|
3738
3765
|
}
|
|
@@ -3748,6 +3775,7 @@ var registerPublishCommand = (program) => {
|
|
|
3748
3775
|
Result: RESULTS.Failure,
|
|
3749
3776
|
Message: result.message,
|
|
3750
3777
|
Instructions: instructions || result.message,
|
|
3778
|
+
...result.cliErrorCode ? { ErrorCode: result.cliErrorCode } : {},
|
|
3751
3779
|
...result.retry ? { Retry: result.retry } : {},
|
|
3752
3780
|
...result.context ? { Context: result.context } : {}
|
|
3753
3781
|
});
|
|
@@ -3766,8 +3794,8 @@ var registerPublishCommand = (program) => {
|
|
|
3766
3794
|
NextSteps: NEXT_STEPS_MESSAGE
|
|
3767
3795
|
}
|
|
3768
3796
|
});
|
|
3769
|
-
const projectTypeSummary = await
|
|
3770
|
-
|
|
3797
|
+
const projectTypeSummary = await inspectSolutionPackageProjectTypes2(packagePath);
|
|
3798
|
+
trackSolutionShipSucceeded2({
|
|
3771
3799
|
[ShipDimensions.ShipKind]: "publish",
|
|
3772
3800
|
[ShipDimensions.Target]: result.feedKind === "personal" ? "personal_workspace_solution_feed" : result.feedKind === "folder" ? "folder_solution_feed" : "tenant_solution_feed",
|
|
3773
3801
|
[CommandDimensions.CommandName]: "uip solution publish",
|
|
@@ -3776,7 +3804,7 @@ var registerPublishCommand = (program) => {
|
|
|
3776
3804
|
[ShipDimensions.PackageName]: result.packageName,
|
|
3777
3805
|
[ShipDimensions.PackageVersion]: result.packageVersion,
|
|
3778
3806
|
projectTypeSummary
|
|
3779
|
-
});
|
|
3807
|
+
}, capture);
|
|
3780
3808
|
});
|
|
3781
3809
|
};
|
|
3782
3810
|
|
|
@@ -3824,8 +3852,8 @@ var registerResourceAddCommand = (resource) => {
|
|
|
3824
3852
|
createResourceBuilderServices,
|
|
3825
3853
|
normalizeResourceFileCasing,
|
|
3826
3854
|
saveCasingNormalized
|
|
3827
|
-
} = await import("./index-
|
|
3828
|
-
const { getSolutionAuthContext
|
|
3855
|
+
} = await import("./index-qq4kre7a.js");
|
|
3856
|
+
const { getSolutionAuthContext } = await import("./solution-auth-jxcgd2m0.js");
|
|
3829
3857
|
const validation = await validateOptions(options);
|
|
3830
3858
|
if (!validation.ok) {
|
|
3831
3859
|
OutputFormatter.error({
|
|
@@ -3859,7 +3887,7 @@ var registerResourceAddCommand = (resource) => {
|
|
|
3859
3887
|
return;
|
|
3860
3888
|
}
|
|
3861
3889
|
if (source === "remote") {
|
|
3862
|
-
const [authError] = await catchError(
|
|
3890
|
+
const [authError] = await catchError(getSolutionAuthContext({
|
|
3863
3891
|
loginValidity: options.loginValidity
|
|
3864
3892
|
}));
|
|
3865
3893
|
if (authError) {
|
|
@@ -3955,7 +3983,7 @@ function canonicalizeKind(kind) {
|
|
|
3955
3983
|
}
|
|
3956
3984
|
var GUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
3957
3985
|
async function validateOptions(options) {
|
|
3958
|
-
const { validateResourceName } = await import("./index-
|
|
3986
|
+
const { validateResourceName } = await import("./index-qq4kre7a.js");
|
|
3959
3987
|
if (!options.source) {
|
|
3960
3988
|
return {
|
|
3961
3989
|
ok: false,
|
|
@@ -4029,7 +4057,7 @@ async function validateOptions(options) {
|
|
|
4029
4057
|
async function resolveTypeInput(services, kind, type) {
|
|
4030
4058
|
if (type === undefined)
|
|
4031
4059
|
return { ok: true, type };
|
|
4032
|
-
const { formatResourceSubtypes, resolveResourceKindMetadata } = await import("./resource-mutations-
|
|
4060
|
+
const { formatResourceSubtypes, resolveResourceKindMetadata } = await import("./resource-mutations-mfn5k1hb.js");
|
|
4033
4061
|
const metadata = await resolveResourceKindMetadata(services, kind, type);
|
|
4034
4062
|
if (metadata?.typeMatched) {
|
|
4035
4063
|
return { ok: true, type: metadata.type ?? type };
|
|
@@ -4059,13 +4087,13 @@ function formatCandidates(matches) {
|
|
|
4059
4087
|
`);
|
|
4060
4088
|
}
|
|
4061
4089
|
async function runAdd(builder, services, rawInput) {
|
|
4062
|
-
const { findMatchingLocalResource } = await import("./index-
|
|
4090
|
+
const { findMatchingLocalResource } = await import("./index-qq4kre7a.js");
|
|
4063
4091
|
const {
|
|
4064
4092
|
createLocalResource,
|
|
4065
4093
|
findResourceByKeyInRcs,
|
|
4066
4094
|
sameResourceSubtype,
|
|
4067
4095
|
searchRcsResources
|
|
4068
|
-
} = await import("./resource-mutations-
|
|
4096
|
+
} = await import("./resource-mutations-mfn5k1hb.js");
|
|
4069
4097
|
const typeResolution = await resolveTypeInput(services, rawInput.kind, rawInput.type);
|
|
4070
4098
|
if (!typeResolution.ok)
|
|
4071
4099
|
return typeResolution.outcome;
|
|
@@ -4109,10 +4137,10 @@ async function runAdd(builder, services, rawInput) {
|
|
|
4109
4137
|
instructions: "SDK returned no key for createVirtualResourceAsync. Check that the kind is supported by SDK metadata."
|
|
4110
4138
|
};
|
|
4111
4139
|
}
|
|
4112
|
-
const
|
|
4140
|
+
const refreshed = await builder.context.loadAsync();
|
|
4113
4141
|
return {
|
|
4114
4142
|
kind: "success",
|
|
4115
|
-
data: toResourceAddData(created.resource,
|
|
4143
|
+
data: toResourceAddData(created.resource, refreshed.folders, "local", "Added")
|
|
4116
4144
|
};
|
|
4117
4145
|
}
|
|
4118
4146
|
let cloudKey = input.cloudKey?.toLowerCase();
|
|
@@ -4225,7 +4253,7 @@ ${formatCandidates(filtered)}`
|
|
|
4225
4253
|
};
|
|
4226
4254
|
}
|
|
4227
4255
|
async function filterMatchesByFolder(matches, folderPath) {
|
|
4228
|
-
const { normalizeFolderPath } = await import("./index-
|
|
4256
|
+
const { normalizeFolderPath } = await import("./index-qq4kre7a.js");
|
|
4229
4257
|
const normalized = normalizeFolderPath(folderPath);
|
|
4230
4258
|
if (!normalized)
|
|
4231
4259
|
return matches;
|
|
@@ -4378,7 +4406,7 @@ var registerResourceEditCommand = (resource) => {
|
|
|
4378
4406
|
createResourceBuilderServices,
|
|
4379
4407
|
normalizeResourceFileCasing,
|
|
4380
4408
|
saveCasingNormalized
|
|
4381
|
-
} = await import("./index-
|
|
4409
|
+
} = await import("./index-qq4kre7a.js");
|
|
4382
4410
|
const source = (options.source ?? "local").toLowerCase();
|
|
4383
4411
|
if (source !== "local" && source !== "remote") {
|
|
4384
4412
|
OutputFormatter.error({
|
|
@@ -4514,7 +4542,7 @@ var registerResourceEditCommand = (resource) => {
|
|
|
4514
4542
|
});
|
|
4515
4543
|
};
|
|
4516
4544
|
async function handleRemoteSourceAsync(resourceKey, options) {
|
|
4517
|
-
const { resourceRemoteSyncAsync } = await import("./index-
|
|
4545
|
+
const { resourceRemoteSyncAsync } = await import("./index-qq4kre7a.js");
|
|
4518
4546
|
const result = await resourceRemoteSyncAsync(options.solutionFolder ?? ".", resourceKey, {
|
|
4519
4547
|
force: options.force === true,
|
|
4520
4548
|
loginValidity: options.loginValidity ? parseInt(options.loginValidity, 10) : undefined
|
|
@@ -4655,8 +4683,8 @@ var registerResourceGetCommand = (resource) => {
|
|
|
4655
4683
|
const {
|
|
4656
4684
|
createResourceBuilderServices,
|
|
4657
4685
|
readResourceConfigurationsAsync
|
|
4658
|
-
} = await import("./index-
|
|
4659
|
-
const { getSolutionAuthContext
|
|
4686
|
+
} = await import("./index-qq4kre7a.js");
|
|
4687
|
+
const { getSolutionAuthContext } = await import("./solution-auth-jxcgd2m0.js");
|
|
4660
4688
|
const solutionPath = options.solutionFolder ?? ".";
|
|
4661
4689
|
if (!resourceKey || resourceKey.trim() === "") {
|
|
4662
4690
|
OutputFormatter.error({
|
|
@@ -4680,7 +4708,7 @@ var registerResourceGetCommand = (resource) => {
|
|
|
4680
4708
|
return;
|
|
4681
4709
|
}
|
|
4682
4710
|
const loginValidityMinutes = options.loginValidity ? parseInt(options.loginValidity, 10) : undefined;
|
|
4683
|
-
const [authError] = await catchError(
|
|
4711
|
+
const [authError] = await catchError(getSolutionAuthContext({
|
|
4684
4712
|
loginValidity: loginValidityMinutes
|
|
4685
4713
|
}));
|
|
4686
4714
|
if (authError) {
|
|
@@ -4731,13 +4759,13 @@ var registerResourceGetCommand = (resource) => {
|
|
|
4731
4759
|
});
|
|
4732
4760
|
};
|
|
4733
4761
|
async function readWithLiveSpecAsync(services, builder, resourceKey) {
|
|
4734
|
-
const { readResourceConfigurationAsync } = await import("./index-
|
|
4762
|
+
const { readResourceConfigurationAsync } = await import("./index-qq4kre7a.js");
|
|
4735
4763
|
const { configuration, resource } = await readResourceConfigurationAsync(services, builder, resourceKey);
|
|
4736
4764
|
await attachLiveSpecOnMismatchAsync(services, resource, configuration);
|
|
4737
4765
|
return configuration;
|
|
4738
4766
|
}
|
|
4739
4767
|
async function attachLiveSpecOnMismatchAsync(services, resource, config) {
|
|
4740
|
-
const { getRemoteResourceClients } = await import("./index-
|
|
4768
|
+
const { getRemoteResourceClients } = await import("./index-qq4kre7a.js");
|
|
4741
4769
|
const overwriteData = config.resourceOverwrite;
|
|
4742
4770
|
const overwrite = overwriteData?.resourceOverwrite?.overwrite;
|
|
4743
4771
|
if (overwriteData?.matchingOverwriteConfiguration !== false || !overwrite || !resource) {
|
|
@@ -4790,8 +4818,8 @@ var RESOURCE_LIST_EXAMPLES = [
|
|
|
4790
4818
|
];
|
|
4791
4819
|
var registerResourceListCommand = (resource) => {
|
|
4792
4820
|
resource.command("list").description("List resources in the solution and/or available in Orchestrator. " + "Shows local solution resources, remote Orchestrator resources, or both.").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").option("--kind <kind>", "Filter by resource kind (e.g. Queue, Asset, Bucket, Process, Connection, App, Index, Trigger, Entity, ChoiceSet). Any kind RCS indexes is accepted.").option("--search <term>", "Filter resources by name").option("--source <source>", "Resource source: all, local, or remote (default: all)", "all").option("--include-version", "Also report each resource's version, for the kinds that carry one (app, appVersion, package, process). " + "Remote rows report the version live in the folder, local rows the version the solution pins. " + "Costs one extra call per resource, so it is off by default.").option("-l, --limit <number>", "Number of resources to return", parseLimit, DEFAULT_PAGE_SIZE).option("--offset <number>", "Only 0 is accepted: the resource catalog pages by cursor. Use --next-page instead", parseOffset).option("--next-page <cursor>", "Cursor from a previous response's Pagination.NextPage").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(RESOURCE_LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
4793
|
-
const { createResourceBuilderServices } = await import("./index-
|
|
4794
|
-
const { getSolutionAuthContext
|
|
4821
|
+
const { createResourceBuilderServices } = await import("./index-qq4kre7a.js");
|
|
4822
|
+
const { getSolutionAuthContext } = await import("./solution-auth-jxcgd2m0.js");
|
|
4795
4823
|
const solutionPath = options.solutionFolder ?? ".";
|
|
4796
4824
|
const fs = getFileSystem();
|
|
4797
4825
|
const resolvedPath = fs.path.resolve(fs.env.cwd(), solutionPath);
|
|
@@ -4820,7 +4848,7 @@ var registerResourceListCommand = (resource) => {
|
|
|
4820
4848
|
return;
|
|
4821
4849
|
}
|
|
4822
4850
|
const normalizedKind = options.kind;
|
|
4823
|
-
const [authError] = await catchError(
|
|
4851
|
+
const [authError] = await catchError(getSolutionAuthContext({
|
|
4824
4852
|
loginValidity: options.loginValidity
|
|
4825
4853
|
}));
|
|
4826
4854
|
if (authError) {
|
|
@@ -4968,7 +4996,7 @@ function versionLookupId(entry) {
|
|
|
4968
4996
|
return `${entry.Source}|${entry.Key}|${entry.Folder ?? ""}`;
|
|
4969
4997
|
}
|
|
4970
4998
|
async function annotateVersions(services, builder, entries) {
|
|
4971
|
-
const { resolveResourceVersionsAsync } = await import("./resource-version-lookup-
|
|
4999
|
+
const { resolveResourceVersionsAsync } = await import("./resource-version-lookup-6ejh1hwd.js");
|
|
4972
5000
|
const targets = new Map;
|
|
4973
5001
|
for (const entry of entries) {
|
|
4974
5002
|
if (entry.Key === "") {
|
|
@@ -4985,7 +5013,7 @@ async function annotateVersions(services, builder, entries) {
|
|
|
4985
5013
|
type: entry.Type,
|
|
4986
5014
|
name: entry.Name,
|
|
4987
5015
|
source: entry.Source === "Local" ? "Local" : "Remote",
|
|
4988
|
-
folderFullyQualifiedName: entry.Folder,
|
|
5016
|
+
folderFullyQualifiedName: entry.Folder ?? undefined,
|
|
4989
5017
|
folderKey: entry.FolderKey
|
|
4990
5018
|
});
|
|
4991
5019
|
}
|
|
@@ -5000,7 +5028,7 @@ async function annotateVersions(services, builder, entries) {
|
|
|
5000
5028
|
}
|
|
5001
5029
|
}
|
|
5002
5030
|
async function allRemotePage(services, search, pageCursor) {
|
|
5003
|
-
const { getRemoteResourceClients } = await import("./index-
|
|
5031
|
+
const { getRemoteResourceClients } = await import("./index-qq4kre7a.js");
|
|
5004
5032
|
const rcs = getRemoteResourceClients(services).catalog;
|
|
5005
5033
|
const result = await rcs.searchFolderEntities({
|
|
5006
5034
|
name: search,
|
|
@@ -5083,7 +5111,7 @@ var FAILURE_MESSAGE = {
|
|
|
5083
5111
|
};
|
|
5084
5112
|
var registerResourceRefreshSubcommand = (resource) => {
|
|
5085
5113
|
resource.command("refresh").description("Re-scan all projects in the solution and sync each project's authored files into the solution resource JSONs. " + "Bindings: creates new resources for `bindings_v2.json` entries not yet in the solution, imports from Orchestrator when a matching resource exists, and removes duplicate copies of the solution's own projects that earlier runs imported from a deployed folder. " + "Project contributions: each project's owning tool reports what its authored files add to the solution resources, and refresh persists it onto the matching resource. " + "Run this after editing a project's bindings or any file the project's tool contributes from, to update the solution resource inventory. " + "Refresh is import-only for cloud resources: it never overwrites an imported resource, so local edits survive; a project's own artefact resources are rewritten from the project's files on every run. " + "To pull a cloud definition that changed after the import, use 'uip solution resources edit <resource-key> --source remote'.").option("--solution-folder <path>", "Path to the solution root folder (defaults to current directory)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", "10").examples(RESOURCE_REFRESH_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
5086
|
-
const { resourceRefreshAsync } = await import("./index-
|
|
5114
|
+
const { resourceRefreshAsync } = await import("./index-qq4kre7a.js");
|
|
5087
5115
|
const loginValidityMinutes = options.loginValidity ? parseInt(options.loginValidity, 10) : undefined;
|
|
5088
5116
|
const solutionFolder = options.solutionFolder ?? ".";
|
|
5089
5117
|
const fs = getFileSystem();
|
|
@@ -5097,9 +5125,9 @@ var registerResourceRefreshSubcommand = (resource) => {
|
|
|
5097
5125
|
contributionErrorMessages
|
|
5098
5126
|
}
|
|
5099
5127
|
] = await Promise.all([
|
|
5100
|
-
import("./packager-tool-resolver-
|
|
5101
|
-
import("./prepare-solution-resources-
|
|
5102
|
-
import("./project-contributions-
|
|
5128
|
+
import("./packager-tool-resolver-td3bhccd.js"),
|
|
5129
|
+
import("./prepare-solution-resources-pwnyvtza.js"),
|
|
5130
|
+
import("./project-contributions-kh9yftvg.js")
|
|
5103
5131
|
]);
|
|
5104
5132
|
const resolveProjectSubTypesAsync = async () => {
|
|
5105
5133
|
await ensurePackagerTools(solutionFolder, fs);
|
|
@@ -5191,7 +5219,7 @@ var registerResourceRemoveCommand = (resource) => {
|
|
|
5191
5219
|
createResourceBuilderServices,
|
|
5192
5220
|
normalizeResourceFileCasing,
|
|
5193
5221
|
saveCasingNormalized
|
|
5194
|
-
} = await import("./index-
|
|
5222
|
+
} = await import("./index-qq4kre7a.js");
|
|
5195
5223
|
const fs = getFileSystem();
|
|
5196
5224
|
const resolvedPath = fs.path.resolve(fs.env.cwd(), options.solutionFolder ?? ".");
|
|
5197
5225
|
if (!await fs.exists(resolvedPath)) {
|
|
@@ -5313,14 +5341,15 @@ var SOLUTION_RESTORE_EXAMPLES = [
|
|
|
5313
5341
|
}
|
|
5314
5342
|
];
|
|
5315
5343
|
var registerRestoreCommand = (program) => {
|
|
5316
|
-
program.command("restore").description("Restore NuGet dependencies for every project in a UiPath solution using the authenticated session. Accepts a solution directory (containing .uipx) or a .uis file. Resolves dependencies in place and does not produce a package — run it before 'uip solution pack'.").argument("<solution-path>", "Path to a solution directory (containing .uipx) or a .uis file").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--exclude-configured-sources", "Resolve project dependencies only from the tenant feeds and any --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds, so a dependency that is not on those feeds fails to restore.").option("--feed-folder <name>", "Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. Accepts a folder name or fully qualified path.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(SOLUTION_RESTORE_EXAMPLES).trackedAction(processContext, async (solutionPath, options) => {
|
|
5317
|
-
const { RestoreCommandService } = await import("./restore-command-service-
|
|
5344
|
+
program.command("restore").description("Restore NuGet dependencies for every project in a UiPath solution using the authenticated session. Accepts a solution directory (containing .uipx) or a .uis file. Resolves dependencies in place and does not produce a package — run it before 'uip solution pack'.").argument("<solution-path>", "Path to a solution directory (containing .uipx) or a .uis file").option("--nuget-sources-config-path <path>", "Path to NuGet sources configuration file").option("--exclude-configured-sources", "Resolve project dependencies only from the tenant feeds and any --nuget-sources-config-path. Drops the built-in UiPath and nuget.org feeds, so a dependency that is not on those feeds fails to restore.").option("--feed-folder <name>", "Resolve project dependencies from this Orchestrator folder's library feed instead of every tenant feed. Accepts a folder name or fully qualified path.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(SOLUTION_RESTORE_EXAMPLES).trackedAction(processContext, async (solutionPath, options, command) => {
|
|
5345
|
+
const { RestoreCommandService } = await import("./restore-command-service-n880dxre.js");
|
|
5318
5346
|
const service = new RestoreCommandService;
|
|
5319
5347
|
await service.execute(solutionPath, {
|
|
5320
5348
|
loginValidity: options.loginValidity,
|
|
5321
5349
|
nugetSourcesConfigPath: options.nugetSourcesConfigPath,
|
|
5322
5350
|
excludeConfiguredSources: options.excludeConfiguredSources,
|
|
5323
|
-
feedFolder: options.feedFolder
|
|
5351
|
+
feedFolder: options.feedFolder,
|
|
5352
|
+
telemetryCapture: getProjectTelemetryCapture(command)
|
|
5324
5353
|
}, processContext);
|
|
5325
5354
|
});
|
|
5326
5355
|
};
|
|
@@ -5338,7 +5367,8 @@ var NEVER_STARTED = new Set([
|
|
|
5338
5367
|
"Unauthorized" /* Unauthorized */
|
|
5339
5368
|
]);
|
|
5340
5369
|
var registerRunCommand = (program) => {
|
|
5341
|
-
program.command("run", { hidden: true }).description("Run a project from a UiPath solution. Currently supports RPA projects, agents and API Workflows.").argument("<solution-path>", "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) => {
|
|
5370
|
+
program.command("run", { hidden: true }).description("Run a project from a UiPath solution. Currently supports RPA projects, agents and API Workflows.").argument("<solution-path>", "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, command) => {
|
|
5371
|
+
const capture = getProjectTelemetryCapture(command);
|
|
5342
5372
|
const [inputError, inputArguments] = parseInputArguments(options.inputArguments);
|
|
5343
5373
|
if (inputError) {
|
|
5344
5374
|
OutputFormatter.error({
|
|
@@ -5350,7 +5380,7 @@ var registerRunCommand = (program) => {
|
|
|
5350
5380
|
processContext.exit(1);
|
|
5351
5381
|
return;
|
|
5352
5382
|
}
|
|
5353
|
-
const { runSolutionAsync } = await import("./run-service-
|
|
5383
|
+
const { runSolutionAsync } = await import("./run-service-4vhn6mtb.js");
|
|
5354
5384
|
const result = await runSolutionAsync({
|
|
5355
5385
|
solutionPath,
|
|
5356
5386
|
projectName: options.projectName,
|
|
@@ -5359,7 +5389,11 @@ var registerRunCommand = (program) => {
|
|
|
5359
5389
|
folderPath: options.folderPath,
|
|
5360
5390
|
provisionResources: options.provisionResources,
|
|
5361
5391
|
loginValidity: options.loginValidity
|
|
5362
|
-
}, {
|
|
5392
|
+
}, {
|
|
5393
|
+
fileSystem: getFileSystem(),
|
|
5394
|
+
logger,
|
|
5395
|
+
telemetryCapture: capture
|
|
5396
|
+
});
|
|
5363
5397
|
if (!result.isSuccess) {
|
|
5364
5398
|
OutputFormatter.error({
|
|
5365
5399
|
Result: RESULTS.Failure,
|
|
@@ -5466,7 +5500,7 @@ var SOLUTION_UPLOAD_EXAMPLES = [
|
|
|
5466
5500
|
}
|
|
5467
5501
|
];
|
|
5468
5502
|
var registerUploadCommand = (program) => {
|
|
5469
|
-
program.command("upload").description("Upload a solution to UiPath Studio Web for browser-based editing. Accepts a solution directory, .uipx file, or .uis file. If Studio Web has no solution with the bundled SolutionId, the solution is imported as new and the local .uipx is updated with the assigned id; otherwise it is overwritten in place, with the replaced contents recorded first as a restorable version (skip with --no-snapshot). The output field Data.Action says which happened: 'Imported' or 'Overwritten'.").argument("<solution-path>", "Path to a solution directory (containing .uipx), a .uipx file, or a .uis file.").option("--force", "Skip the existence check and overwrite the Studio Web solution named by the bundled SolutionId directly. Not normally needed — an upload overwrites an existing cloud solution on its own. Fails if that solution does not exist. No effect when no SolutionId is bundled (a .uis archive without one): the upload imports as new.").option("--no-snapshot", "Do not record a restorable pre-overwrite version of the cloud solution before replacing its contents. Changes made in Studio Web since the last upload are lost; local files are unaffected. No effect when the upload imports a new solution.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(SOLUTION_UPLOAD_EXAMPLES).trackedAction(processContext, async (solutionPath, options) => {
|
|
5503
|
+
program.command("upload").description("Upload a solution to UiPath Studio Web for browser-based editing. Accepts a solution directory, .uipx file, or .uis file. If Studio Web has no solution with the bundled SolutionId, the solution is imported as new and the local .uipx is updated with the assigned id; otherwise it is overwritten in place, with the replaced contents recorded first as a restorable version (skip with --no-snapshot). The output field Data.Action says which happened: 'Imported' or 'Overwritten'.").argument("<solution-path>", "Path to a solution directory (containing .uipx), a .uipx file, or a .uis file.").option("--force", "Skip the existence check and overwrite the Studio Web solution named by the bundled SolutionId directly. Not normally needed — an upload overwrites an existing cloud solution on its own. Fails if that solution does not exist. No effect when no SolutionId is bundled (a .uis archive without one): the upload imports as new.").option("--no-snapshot", "Do not record a restorable pre-overwrite version of the cloud solution before replacing its contents. Changes made in Studio Web since the last upload are lost; local files are unaffected. No effect when the upload imports a new solution.").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).examples(SOLUTION_UPLOAD_EXAMPLES).trackedAction(processContext, async (solutionPath, options, command) => {
|
|
5470
5504
|
const {
|
|
5471
5505
|
buildSolutionUploadFailureOutput,
|
|
5472
5506
|
bundleSolution,
|
|
@@ -5477,44 +5511,28 @@ var registerUploadCommand = (program) => {
|
|
|
5477
5511
|
StudioWebIncompatibleProjectError,
|
|
5478
5512
|
solutionExistsOnStudioWeb,
|
|
5479
5513
|
UipignoreExcludesProjectError
|
|
5480
|
-
} = await import("./index-
|
|
5481
|
-
const { readBundledSolutionId } = await import("./archive-extract-
|
|
5482
|
-
const { isUnpackableProjectTypeError } = await import("./packager-tool-resolver-
|
|
5483
|
-
const { prepareSolutionResources } = await import("./prepare-solution-resources-
|
|
5514
|
+
} = await import("./index-ddk6v1ej.js");
|
|
5515
|
+
const { readBundledSolutionId } = await import("./archive-extract-136rn3ja.js");
|
|
5516
|
+
const { isUnpackableProjectTypeError } = await import("./packager-tool-resolver-td3bhccd.js");
|
|
5517
|
+
const { prepareSolutionResources } = await import("./prepare-solution-resources-pwnyvtza.js");
|
|
5484
5518
|
const {
|
|
5485
|
-
inspectSolutionPackageProjectTypes
|
|
5519
|
+
inspectSolutionPackageProjectTypes,
|
|
5486
5520
|
summarizeShipProjectTypes,
|
|
5487
|
-
trackSolutionShipSucceeded
|
|
5488
|
-
} = await import("./ship-telemetry-
|
|
5521
|
+
trackSolutionShipSucceeded
|
|
5522
|
+
} = await import("./ship-telemetry-bkf3800w.js");
|
|
5523
|
+
const capture = getProjectTelemetryCapture(command);
|
|
5489
5524
|
const fs = getFileSystem();
|
|
5490
|
-
const [loginError,
|
|
5491
|
-
ensureTokenValidityMinutes: options.loginValidity
|
|
5525
|
+
const [loginError, auth] = await catchError(getAuthContext({
|
|
5526
|
+
ensureTokenValidityMinutes: options.loginValidity,
|
|
5527
|
+
requireOrganizationName: true,
|
|
5528
|
+
requireTenantId: true
|
|
5492
5529
|
}));
|
|
5493
5530
|
if (loginError) {
|
|
5494
|
-
|
|
5495
|
-
OutputFormatter.error({
|
|
5496
|
-
Result: RESULTS.Failure,
|
|
5497
|
-
Message: errorMessage,
|
|
5498
|
-
Instructions: loginError.message
|
|
5499
|
-
});
|
|
5531
|
+
OutputFormatter.error(await authContextFailure(loginError, "Run 'uip login' first."));
|
|
5500
5532
|
processContext.exit(1);
|
|
5501
5533
|
return;
|
|
5502
5534
|
}
|
|
5503
|
-
|
|
5504
|
-
outputError("Not logged in. Run 'uip login' first.");
|
|
5505
|
-
return;
|
|
5506
|
-
}
|
|
5507
|
-
const { baseUrl, accessToken } = loginStatus;
|
|
5508
|
-
const organizationName = loginStatus.organizationName;
|
|
5509
|
-
if (!organizationName) {
|
|
5510
|
-
outputError("Organization name is not available. Re-authenticate with 'uip login'.");
|
|
5511
|
-
return;
|
|
5512
|
-
}
|
|
5513
|
-
const tenantId = loginStatus.tenantId;
|
|
5514
|
-
if (!tenantId) {
|
|
5515
|
-
outputError("Tenant ID is not available. Re-authenticate with 'uip login'.");
|
|
5516
|
-
return;
|
|
5517
|
-
}
|
|
5535
|
+
const { baseUrl, accessToken, organizationName, tenantId } = auth;
|
|
5518
5536
|
const resolvedPath = fs.path.resolve(solutionPath);
|
|
5519
5537
|
if (!await fs.exists(resolvedPath)) {
|
|
5520
5538
|
outputError(`Path not found: ${resolvedPath}`);
|
|
@@ -5607,6 +5625,7 @@ var registerUploadCommand = (program) => {
|
|
|
5607
5625
|
logger.info(`Read SolutionId ${solutionId} from ${uisFileName}`);
|
|
5608
5626
|
}
|
|
5609
5627
|
}
|
|
5628
|
+
captureSolutionIdentity2(capture, solutionId);
|
|
5610
5629
|
const studioWebConfig = {
|
|
5611
5630
|
baseUrl,
|
|
5612
5631
|
authToken: accessToken,
|
|
@@ -5618,7 +5637,7 @@ var registerUploadCommand = (program) => {
|
|
|
5618
5637
|
} else if (solutionId) {
|
|
5619
5638
|
const [probeError, exists] = await catchError(solutionExistsOnStudioWeb(studioWebConfig, organizationName, solutionId));
|
|
5620
5639
|
if (probeError) {
|
|
5621
|
-
OutputFormatter.error(await buildProbeFailureOutput(probeError, solutionId,
|
|
5640
|
+
OutputFormatter.error(await buildProbeFailureOutput(probeError, solutionId, auth.identity));
|
|
5622
5641
|
processContext.exit(1);
|
|
5623
5642
|
return;
|
|
5624
5643
|
}
|
|
@@ -5643,8 +5662,8 @@ var registerUploadCommand = (program) => {
|
|
|
5643
5662
|
OutputFormatter.error(buildSolutionUploadFailureOutput(uploadError, {
|
|
5644
5663
|
subject: "solution",
|
|
5645
5664
|
importCheckHint: "Run 'uip solution pack' to confirm the solution packs cleanly.",
|
|
5646
|
-
identityType:
|
|
5647
|
-
clientId:
|
|
5665
|
+
identityType: auth.identity?.type,
|
|
5666
|
+
clientId: auth.identity?.clientId
|
|
5648
5667
|
}));
|
|
5649
5668
|
processContext.exit(1);
|
|
5650
5669
|
return;
|
|
@@ -5658,7 +5677,9 @@ var registerUploadCommand = (program) => {
|
|
|
5658
5677
|
processContext.exit(1);
|
|
5659
5678
|
return;
|
|
5660
5679
|
}
|
|
5661
|
-
const
|
|
5680
|
+
const returnedSolutionId = result.id ?? result.solutionId ?? solutionId;
|
|
5681
|
+
captureSolutionIdentity2(capture, returnedSolutionId, solutionId);
|
|
5682
|
+
const rewroteLocalSolutionId = await updateLocalSolutionId(fs, returnedSolutionId, solutionId, uipxPath);
|
|
5662
5683
|
const projectId = result.projects?.[0]?.id;
|
|
5663
5684
|
const designerUrl = projectId && returnedSolutionId ? `${baseUrl}/${encodeURIComponent(organizationName)}/studio_/designer/${encodeURIComponent(projectId)}?solutionId=${encodeURIComponent(returnedSolutionId)}` : undefined;
|
|
5664
5685
|
OutputFormatter.success({
|
|
@@ -5680,15 +5701,15 @@ var registerUploadCommand = (program) => {
|
|
|
5680
5701
|
Response: result
|
|
5681
5702
|
}
|
|
5682
5703
|
});
|
|
5683
|
-
const projectTypeSummary = bundledProjectTypes.length > 0 ? summarizeShipProjectTypes(bundledProjectTypes) : await
|
|
5684
|
-
|
|
5704
|
+
const projectTypeSummary = bundledProjectTypes.length > 0 ? summarizeShipProjectTypes(bundledProjectTypes) : await inspectSolutionPackageProjectTypes(uisPath);
|
|
5705
|
+
trackSolutionShipSucceeded({
|
|
5685
5706
|
[ShipDimensions.ShipKind]: "upload",
|
|
5686
5707
|
[ShipDimensions.Target]: "studio_web",
|
|
5687
5708
|
[CommandDimensions.CommandName]: "uip solution upload",
|
|
5688
5709
|
[ShipDimensions.ArtifactCorrelationKey]: returnedSolutionId,
|
|
5689
5710
|
[ShipDimensions.SolutionId]: returnedSolutionId,
|
|
5690
5711
|
projectTypeSummary
|
|
5691
|
-
});
|
|
5712
|
+
}, capture);
|
|
5692
5713
|
} finally {
|
|
5693
5714
|
if (tempDir) {
|
|
5694
5715
|
const [cleanupError] = await catchError(fs.rm(tempDir));
|
|
@@ -5699,22 +5720,21 @@ var registerUploadCommand = (program) => {
|
|
|
5699
5720
|
}
|
|
5700
5721
|
});
|
|
5701
5722
|
};
|
|
5702
|
-
async function updateLocalSolutionId(fs,
|
|
5703
|
-
const returnedSolutionId = result.id ?? result.solutionId ?? solutionId;
|
|
5723
|
+
async function updateLocalSolutionId(fs, returnedSolutionId, solutionId, uipxPath) {
|
|
5704
5724
|
const shouldUpdateUipx = uipxPath !== undefined && returnedSolutionId !== undefined && returnedSolutionId !== solutionId;
|
|
5705
5725
|
const rewroteLocalSolutionId = shouldUpdateUipx && solutionId !== undefined;
|
|
5706
5726
|
if (shouldUpdateUipx && returnedSolutionId && uipxPath) {
|
|
5707
|
-
const { updateUipxSolutionId } = await import("./index-
|
|
5727
|
+
const { updateUipxSolutionId } = await import("./index-ddk6v1ej.js");
|
|
5708
5728
|
await updateUipxSolutionId(fs, uipxPath, returnedSolutionId);
|
|
5709
5729
|
logger.info(solutionId ? `Studio Web assigned SolutionId ${returnedSolutionId} — the local .uipx now points at it (was ${solutionId}).` : `Studio Web assigned SolutionId ${returnedSolutionId} — the local .uipx now points at it.`);
|
|
5710
5730
|
}
|
|
5711
|
-
return
|
|
5731
|
+
return rewroteLocalSolutionId;
|
|
5712
5732
|
}
|
|
5713
5733
|
function isSolutionNotFoundError(error) {
|
|
5714
|
-
return
|
|
5734
|
+
return httpStatusOf2(error) === 404;
|
|
5715
5735
|
}
|
|
5716
5736
|
async function buildProbeFailureOutput(probeError, solutionId, identity) {
|
|
5717
|
-
const status =
|
|
5737
|
+
const status = httpStatusOf2(probeError);
|
|
5718
5738
|
const isAuthRefusal = status === 401 || status === 403;
|
|
5719
5739
|
const message = isAuthRefusal ? probeError.message : await extractErrorMessage(probeError);
|
|
5720
5740
|
const output = {
|
|
@@ -5747,14 +5767,52 @@ function outputError(message) {
|
|
|
5747
5767
|
processContext.exit(1);
|
|
5748
5768
|
}
|
|
5749
5769
|
|
|
5770
|
+
// src/identity-telemetry.ts
|
|
5771
|
+
var localRules = {
|
|
5772
|
+
init: { create: true, arguments: ["solution-name"] },
|
|
5773
|
+
pack: { arguments: ["solution-path"] },
|
|
5774
|
+
restore: { arguments: ["solution-path"] },
|
|
5775
|
+
cleanup: { arguments: ["solution-path"] },
|
|
5776
|
+
run: { arguments: ["solution-path"] },
|
|
5777
|
+
upload: { arguments: ["solution-path"] },
|
|
5778
|
+
resources: { options: ["solutionFolder"], defaultTarget: "." }
|
|
5779
|
+
};
|
|
5780
|
+
for (const group of ["projects", "project"]) {
|
|
5781
|
+
localRules[`${group} list`] = {
|
|
5782
|
+
options: ["solutionFolder"],
|
|
5783
|
+
defaultTarget: "."
|
|
5784
|
+
};
|
|
5785
|
+
localRules[`${group} add`] = { arguments: ["solution-file"] };
|
|
5786
|
+
localRules[`${group} remove`] = { arguments: ["solution-file"] };
|
|
5787
|
+
localRules[`${group} import`] = { options: ["solutionFile"] };
|
|
5788
|
+
}
|
|
5789
|
+
function configureSolutionTelemetry(root) {
|
|
5790
|
+
const readLocal = async (target) => {
|
|
5791
|
+
if (/\.(uis|zip)$/i.test(target))
|
|
5792
|
+
return;
|
|
5793
|
+
const { readSolutionIdentity } = await import("./solution-identity-92h2fbpa.js");
|
|
5794
|
+
return solutionIdentityProperties(await readSolutionIdentity(target));
|
|
5795
|
+
};
|
|
5796
|
+
const local = createIdentityCommandResolver(root, localRules, readLocal);
|
|
5797
|
+
const cloud = createIdentityCommandResolver(root, {
|
|
5798
|
+
download: { arguments: ["solution-id"] },
|
|
5799
|
+
delete: { arguments: ["solution-id"] }
|
|
5800
|
+
}, async (id) => solutionIdentityProperties({
|
|
5801
|
+
id,
|
|
5802
|
+
status: "resolved"
|
|
5803
|
+
}));
|
|
5804
|
+
configureProjectTelemetry(root, async (input) => await local(input) ?? cloud(input));
|
|
5805
|
+
}
|
|
5806
|
+
|
|
5750
5807
|
// src/tool.ts
|
|
5751
|
-
var
|
|
5808
|
+
var metadata2 = {
|
|
5752
5809
|
name: "solution-tool",
|
|
5753
5810
|
version: package_default.version,
|
|
5754
5811
|
description: "Manage UiPath solutions — pack, publish, deploy, and manage solution lifecycle.",
|
|
5755
5812
|
commandPrefix: "solution"
|
|
5756
5813
|
};
|
|
5757
|
-
var
|
|
5814
|
+
var registerCommands2 = async (program) => {
|
|
5815
|
+
configureSolutionTelemetry(program);
|
|
5758
5816
|
registerPublishCommand(program);
|
|
5759
5817
|
registerPackCommand(program);
|
|
5760
5818
|
registerCleanupCommand(program);
|
|
@@ -5769,12 +5827,12 @@ var registerCommands = async (program) => {
|
|
|
5769
5827
|
registerResourceCommand(program);
|
|
5770
5828
|
registerDeleteCommand(program);
|
|
5771
5829
|
if (isPreviewBuild()) {
|
|
5772
|
-
const { registerListCommand } = await import("./list-
|
|
5830
|
+
const { registerListCommand } = await import("./list-jntan9tx.js");
|
|
5773
5831
|
registerListCommand(program);
|
|
5774
5832
|
}
|
|
5775
5833
|
registerFeedsCommand(program);
|
|
5776
5834
|
};
|
|
5777
5835
|
|
|
5778
|
-
export {
|
|
5836
|
+
export { metadata2, registerCommands2 };
|
|
5779
5837
|
|
|
5780
|
-
//# debugId=
|
|
5838
|
+
//# debugId=45394B32A56197C564756E2164756E21
|