@uipath/vertical-solutions-tool 1.205.0-preview.277 → 1.206.0-preview.282
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD-PARTY-NOTICES.md +1 -742
- package/dist/createSdk-hv1h9fb0.js +9 -0
- package/dist/deploy-jobs-mdwk9dxn.js +19 -0
- package/dist/{deploy-service-j80xvk99.js → deploy-service-ry1tk4nr.js} +138 -140
- package/dist/{deployment-search-raswtpry.js → deployment-search-eebk37yd.js} +22 -17
- package/dist/{getMachineId-bsd-t2xa1xja.js → getMachineId-bsd-hr7dy73y.js} +3 -3
- package/dist/{getMachineId-darwin-rnf93px2.js → getMachineId-darwin-k0c7ykqv.js} +3 -3
- package/dist/{getMachineId-linux-ef2vse73.js → getMachineId-linux-f0m4gd78.js} +2 -2
- package/dist/{getMachineId-unsupported-sgg8gaae.js → getMachineId-unsupported-e99prk6h.js} +2 -2
- package/dist/{getMachineId-win-0q96gyd6.js → getMachineId-win-zqh7yjfs.js} +3 -3
- package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
- package/dist/{tool-vp7rjr2q.js → index-raq4z0c4.js} +1676 -16
- package/dist/index-v9ezrp9g.js +6413 -0
- package/dist/index-xqpa1kk1.js +8 -0
- package/dist/index.js +13 -19
- package/dist/{jmespath-e4a59c8w.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/job-commands-pcm2kgdn.js +20 -0
- package/dist/job-output-qxt82cjz.js +27 -0
- package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/prompts-zhmhcp9a.js +3162 -0
- package/dist/{resume-service-m6npsm4m.js → resume-service-27h82qry.js} +76 -83
- package/dist/{seed-service-4ckk9mn5.js → seed-service-y56sm8ew.js} +142 -153
- package/dist/seed-templates-j9f3qtkt.js +10 -0
- package/dist/service-errors-va9zkx5c.js +16 -0
- package/dist/{tool-keqjsxdx.js → solution-auth-0w7r1pdh.js} +7 -7
- package/dist/solution-deployments-9fkrymtm.js +23 -0
- package/dist/templates-1hnft0re.js +9 -0
- package/dist/{tool-d3csdf8r.js → tool-0dtjjcrs.js} +586 -42
- package/dist/{tool-dzngs7c7.js → tool-2z9q93n8.js} +58 -65
- package/dist/{tool-mpvp5rqs.js → tool-4b88bsfh.js} +30 -30
- package/dist/tool-4g168x1b.js +1613 -0
- package/dist/{tool-5cgt07et.js → tool-66qrb9yz.js} +4 -4
- package/dist/{tool-4z7sf95s.js → tool-677fbvpr.js} +24 -25
- package/dist/{tool-xd2ejt3h.js → tool-79txfskd.js} +5 -5
- package/dist/{tool-cag2z2d6.js → tool-8na6g90k.js} +1 -1
- package/dist/{tool-mmv5zh3w.js → tool-9ma60ffy.js} +715 -104
- package/dist/{tool-p589v2r5.js → tool-behqwe32.js} +21 -21
- package/dist/{tool-1yh8g550.js → tool-epsr41wx.js} +8 -12
- package/dist/tool-f0jjp878.js +5850 -0
- package/dist/{tool-f49rxjrs.js → tool-f59gwkjn.js} +32 -33
- package/dist/{tool-jjxbj28g.js → tool-g0kkseyf.js} +1131 -1131
- package/dist/{tool-yerrea90.js → tool-ggemp2c3.js} +1 -1
- package/dist/{tool-sjgx5nrb.js → tool-hntm5xd8.js} +1376 -249
- package/dist/{tool-v15vxc4x.js → tool-pw4d1k4y.js} +30 -30
- package/dist/{tool-38ad77wd.js → tool-rdw16anj.js} +47 -30
- package/dist/{tool-h4f967yd.js → tool-rtszgma4.js} +6 -6
- package/dist/{tool-88f4yvnp.js → tool-tk4508vc.js} +37 -34
- package/dist/{tool-ybmd3rb4.js → tool-vzyrptnq.js} +62 -62
- package/dist/{tool-pz9qm3dv.js → tool-xvdr2bbv.js} +1459 -733
- package/dist/{tool-7s3dvn0g.js → tool-zy3q6qnn.js} +20 -12
- package/dist/tool.js +12 -18
- package/dist/watch-job-61egp025.js +21 -0
- package/package.json +2 -2
- package/dist/createSdk-2f9x47em.js +0 -12
- package/dist/deploy-jobs-t3qrrw81.js +0 -23
- package/dist/embedded-file-reader-r66242ey.js +0 -114
- package/dist/first-party-service-srxaftkn.js +0 -27
- package/dist/index-7a3eqtxv.js +0 -3174
- package/dist/index-8s9dxpj4.js +0 -18812
- package/dist/index-fyc0k5dd.js +0 -51405
- package/dist/index-kmp9fmhb.js +0 -25
- package/dist/index-ngs0a2he.js +0 -15
- package/dist/index-wahk1tax.js +0 -23075
- package/dist/index.umd.min-fqefd9kn.js +0 -7814
- package/dist/job-commands-azgbrbdb.js +0 -23
- package/dist/job-output-t43hzj1f.js +0 -36
- package/dist/prompts-dtgt183n.js +0 -260
- package/dist/seed-templates-q1vj427v.js +0 -14
- package/dist/service-errors-yzcncxqz.js +0 -22
- package/dist/solution-auth-zq6gyxsv.js +0 -11
- package/dist/solution-deployments-g5yvw5dg.js +0 -33
- package/dist/templates-s70r0bx7.js +0 -15
- package/dist/tool-53w8skv5.js +0 -262
- package/dist/tool-67587985.js +0 -554
- package/dist/tool-et11x69b.js +0 -13
- package/dist/tool-gdtpsdn7.js +0 -342
- package/dist/tool-hdxtgckw.js +0 -249
- package/dist/tool-jhb0vkep.js +0 -19426
- package/dist/tool-r1ewa0tf.js +0 -5645
- package/dist/tool-s04z9t80.js +0 -19
- package/dist/tool-zxm34nhf.js +0 -638
- package/dist/watch-job-7apqykeq.js +0 -31
- /package/dist/{tool-rr9fensp.js → tool-fbthdwqc.js} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getDeployJob2,
|
|
3
|
+
submitDeployJob2,
|
|
4
|
+
getDeployJobLogs2,
|
|
5
|
+
resumeDeployJob2,
|
|
6
|
+
cancelDeployJob2
|
|
7
|
+
} from "./tool-tk4508vc.js";
|
|
8
|
+
import"./tool-zy3q6qnn.js";
|
|
9
|
+
import"./tool-f0jjp878.js";
|
|
10
|
+
import"./tool-xvdr2bbv.js";
|
|
11
|
+
export {
|
|
12
|
+
cancelDeployJob2 as cancelDeployJob,
|
|
13
|
+
getDeployJob2 as getDeployJob,
|
|
14
|
+
getDeployJobLogs2 as getDeployJobLogs,
|
|
15
|
+
resumeDeployJob2 as resumeDeployJob,
|
|
16
|
+
submitDeployJob2 as submitDeployJob
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//# debugId=3E0C72380FDF155F64756E2164756E21
|
|
@@ -1,93 +1,88 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "./tool-f49rxjrs.js";
|
|
2
|
+
getFileSystem2,
|
|
3
|
+
catchError,
|
|
4
|
+
RESULTS,
|
|
5
|
+
resolveEnvReference,
|
|
6
|
+
canPrompt
|
|
7
|
+
} from "./tool-xvdr2bbv.js";
|
|
9
8
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "./tool-dzngs7c7.js";
|
|
9
|
+
optionalText,
|
|
10
|
+
jsonObject,
|
|
11
|
+
VssApiError,
|
|
12
|
+
scopeQuery,
|
|
13
|
+
vssRequestParsed
|
|
14
|
+
} from "./tool-zy3q6qnn.js";
|
|
17
15
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
normalizeVersions
|
|
25
|
-
} from "./tool-mmv5zh3w.js";
|
|
26
|
-
import"./tool-zxm34nhf.js";
|
|
16
|
+
string,
|
|
17
|
+
unknown,
|
|
18
|
+
array,
|
|
19
|
+
looseObject,
|
|
20
|
+
DEPLOY_ACTIONS
|
|
21
|
+
} from "./tool-f0jjp878.js";
|
|
27
22
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} from "./tool-p589v2r5.js";
|
|
23
|
+
submitDeployJob2
|
|
24
|
+
} from "./tool-tk4508vc.js";
|
|
25
|
+
import"./tool-rdw16anj.js";
|
|
32
26
|
import {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} from "./tool-
|
|
27
|
+
failure,
|
|
28
|
+
missingOption,
|
|
29
|
+
invalidOption
|
|
30
|
+
} from "./tool-rtszgma4.js";
|
|
37
31
|
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} from "./tool-
|
|
32
|
+
writeProgress2,
|
|
33
|
+
writeWarning2,
|
|
34
|
+
writeStepSummary2,
|
|
35
|
+
writeSuccessSummary2
|
|
36
|
+
} from "./tool-pw4d1k4y.js";
|
|
43
37
|
import {
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
configKeyProblem,
|
|
39
|
+
listVerticals,
|
|
40
|
+
listPackages,
|
|
41
|
+
listPackageVersions,
|
|
42
|
+
normalizeVersions,
|
|
43
|
+
getManifest,
|
|
44
|
+
listAllFolders
|
|
45
|
+
} from "./tool-9ma60ffy.js";
|
|
46
46
|
import {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
SolutionDeploymentsError2,
|
|
48
|
+
newestDeployment2,
|
|
49
|
+
isCompletedUninstall2,
|
|
50
|
+
isInstalledDeployment2,
|
|
51
|
+
listDeploymentsNamed2,
|
|
52
|
+
solutionNameFromManifest2
|
|
53
|
+
} from "./tool-f59gwkjn.js";
|
|
49
54
|
import {
|
|
50
|
-
|
|
51
|
-
} from "./tool-
|
|
55
|
+
toDeployFailure2
|
|
56
|
+
} from "./tool-677fbvpr.js";
|
|
52
57
|
import {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
describePauseKind,
|
|
59
|
+
pauseInstructions,
|
|
60
|
+
pauseErrorCode,
|
|
61
|
+
rejectSeedWithoutWait,
|
|
62
|
+
finalizeSucceededJob,
|
|
63
|
+
stoppedWatching
|
|
64
|
+
} from "./tool-2z9q93n8.js";
|
|
57
65
|
import {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
withCapacityRetry,
|
|
67
|
+
watchOptionsFrom2,
|
|
68
|
+
watchDeployJob2
|
|
69
|
+
} from "./tool-vzyrptnq.js";
|
|
70
|
+
import {
|
|
71
|
+
rejectBlankOptions,
|
|
72
|
+
readServiceUrl2,
|
|
73
|
+
credentialsFailure2
|
|
74
|
+
} from "./tool-behqwe32.js";
|
|
75
|
+
import {
|
|
76
|
+
createVssConfig
|
|
77
|
+
} from "./tool-79txfskd.js";
|
|
62
78
|
import {
|
|
63
79
|
checkBeforeResubmitting,
|
|
64
80
|
routingFlags
|
|
65
|
-
} from "./tool-
|
|
66
|
-
import {
|
|
67
|
-
failure,
|
|
68
|
-
invalidOption,
|
|
69
|
-
missingOption
|
|
70
|
-
} from "./tool-h4f967yd.js";
|
|
81
|
+
} from "./tool-8na6g90k.js";
|
|
71
82
|
import {
|
|
72
83
|
forDisplay,
|
|
73
84
|
forDisplayIfSet
|
|
74
|
-
} from "./tool-
|
|
75
|
-
import {
|
|
76
|
-
DEPLOY_ACTIONS
|
|
77
|
-
} from "./tool-s04z9t80.js";
|
|
78
|
-
import {
|
|
79
|
-
exports_external
|
|
80
|
-
} from "./tool-jhb0vkep.js";
|
|
81
|
-
import {
|
|
82
|
-
RESULTS,
|
|
83
|
-
canPrompt,
|
|
84
|
-
catchError,
|
|
85
|
-
resolveEnvReference
|
|
86
|
-
} from "./tool-pz9qm3dv.js";
|
|
87
|
-
import {
|
|
88
|
-
getFileSystem
|
|
89
|
-
} from "./tool-hdxtgckw.js";
|
|
90
|
-
import"./tool-1yh8g550.js";
|
|
85
|
+
} from "./tool-fbthdwqc.js";
|
|
91
86
|
|
|
92
87
|
// src/services/manifest-configurations.ts
|
|
93
88
|
var SECRET_TERMS = [
|
|
@@ -154,7 +149,7 @@ function normalizeConfigFileValues(parsed, path) {
|
|
|
154
149
|
const problem = configKeyProblem(key);
|
|
155
150
|
if (problem)
|
|
156
151
|
throw new Error(`${path}: ${problem}`);
|
|
157
|
-
const value =
|
|
152
|
+
const value = string().safeParse(raw);
|
|
158
153
|
if (!value.success) {
|
|
159
154
|
throw new TypeError(`${path}: the value of "${key}" must be a string.`);
|
|
160
155
|
}
|
|
@@ -233,7 +228,7 @@ async function promptRequired(key, meta, prompts) {
|
|
|
233
228
|
const trimmed = entered?.trim();
|
|
234
229
|
if (trimmed)
|
|
235
230
|
return trimmed;
|
|
236
|
-
|
|
231
|
+
writeWarning2(`A value for ${key} is required.`);
|
|
237
232
|
}
|
|
238
233
|
return;
|
|
239
234
|
}
|
|
@@ -241,7 +236,7 @@ async function readConfigFile(path) {
|
|
|
241
236
|
if (path === undefined) {
|
|
242
237
|
return { ok: true, entries: [], literalSecretKeys: [] };
|
|
243
238
|
}
|
|
244
|
-
const fs =
|
|
239
|
+
const fs = getFileSystem2();
|
|
245
240
|
if (!await fs.exists(path)) {
|
|
246
241
|
return failure("invalid-option", `--config-file not found: ${path}`, "Check the path, or drop the flag and pass values with --config KEY=VALUE.");
|
|
247
242
|
}
|
|
@@ -341,18 +336,18 @@ var CAPS = {
|
|
|
341
336
|
};
|
|
342
337
|
var ROUTING_NAME_PATTERN = /^[a-z0-9][a-z0-9-]{0,31}$/;
|
|
343
338
|
var ROUTING_NAME_RULE = "a routing name must be lowercase letters, digits and hyphens, at most 32 characters";
|
|
344
|
-
var DeployConfigDocumentSchema =
|
|
345
|
-
version:
|
|
346
|
-
externalApp:
|
|
347
|
-
resources:
|
|
339
|
+
var DeployConfigDocumentSchema = looseObject({
|
|
340
|
+
version: unknown().optional(),
|
|
341
|
+
externalApp: unknown().optional(),
|
|
342
|
+
resources: unknown().optional()
|
|
348
343
|
});
|
|
349
|
-
var DeployConfigResourceSchema =
|
|
350
|
-
name:
|
|
351
|
-
kind:
|
|
344
|
+
var DeployConfigResourceSchema = looseObject({
|
|
345
|
+
name: string().optional(),
|
|
346
|
+
kind: string().optional(),
|
|
352
347
|
configuration: jsonObject.nullish()
|
|
353
348
|
});
|
|
354
349
|
async function discoverDeployConfig(explicitPath) {
|
|
355
|
-
const fs =
|
|
350
|
+
const fs = getFileSystem2();
|
|
356
351
|
if (explicitPath !== undefined) {
|
|
357
352
|
if (!await fs.exists(explicitPath)) {
|
|
358
353
|
throw new Error(`--resource-config file not found: ${explicitPath}`);
|
|
@@ -370,7 +365,7 @@ function describeValue(value) {
|
|
|
370
365
|
return text.length > 40 ? `${text.slice(0, 40)}…` : text;
|
|
371
366
|
}
|
|
372
367
|
async function loadDeployConfig(path) {
|
|
373
|
-
const fs =
|
|
368
|
+
const fs = getFileSystem2();
|
|
374
369
|
const [readError, contents] = await catchError(fs.readFile(path, "utf-8"));
|
|
375
370
|
if (readError || contents === null) {
|
|
376
371
|
throw new Error(`Failed to read ${path}: ${readError?.message ?? "the file is empty"}`);
|
|
@@ -388,7 +383,7 @@ async function loadDeployConfig(path) {
|
|
|
388
383
|
if (externalApp !== undefined) {
|
|
389
384
|
warnings.push(`${path}: the 'externalApp' block is ignored — external-app auto-creation was removed. ` + "Register the application yourself and supply its id as 'externalClientId'.");
|
|
390
385
|
}
|
|
391
|
-
const entries =
|
|
386
|
+
const entries = array(unknown()).safeParse(resources);
|
|
392
387
|
if (!entries.success) {
|
|
393
388
|
throw new TypeError(`${path}: 'resources' must be an array.`);
|
|
394
389
|
}
|
|
@@ -430,7 +425,7 @@ function parseConfigurationEntry(key, value, path) {
|
|
|
430
425
|
if (forbidden) {
|
|
431
426
|
throw new Error(`${path}: '${key}' looks like a secret (contains "${forbidden}"). ` + "This file is meant to be committed and its values are stored unencrypted — " + "pass secret values with --config KEY=env.VAR instead.");
|
|
432
427
|
}
|
|
433
|
-
const text =
|
|
428
|
+
const text = string().safeParse(value);
|
|
434
429
|
if (!text.success) {
|
|
435
430
|
throw new TypeError(`${path}: the value of '${key}' must be a string.`);
|
|
436
431
|
}
|
|
@@ -642,15 +637,15 @@ function describeTenantResources(findings) {
|
|
|
642
637
|
}
|
|
643
638
|
|
|
644
639
|
// src/api/deployments.ts
|
|
645
|
-
var DeploymentSchema =
|
|
646
|
-
id:
|
|
647
|
-
folderKey:
|
|
648
|
-
packageVersion:
|
|
640
|
+
var DeploymentSchema = looseObject({
|
|
641
|
+
id: string(),
|
|
642
|
+
folderKey: string(),
|
|
643
|
+
packageVersion: string(),
|
|
649
644
|
status: optionalText,
|
|
650
645
|
deploymentName: optionalText
|
|
651
646
|
});
|
|
652
|
-
var DeploymentListSchema =
|
|
653
|
-
items:
|
|
647
|
+
var DeploymentListSchema = looseObject({
|
|
648
|
+
items: array(DeploymentSchema).optional()
|
|
654
649
|
});
|
|
655
650
|
async function findCurrentDeployments(config, packageName, signal) {
|
|
656
651
|
const result = await vssRequestParsed(config, "deployments", DeploymentListSchema, {
|
|
@@ -699,7 +694,7 @@ function keyForPath(labels, lowerCasePath) {
|
|
|
699
694
|
function abortedLookup(signal, error, context) {
|
|
700
695
|
if (!signal?.aborted)
|
|
701
696
|
return;
|
|
702
|
-
return
|
|
697
|
+
return toDeployFailure2(signal.reason ?? error, context);
|
|
703
698
|
}
|
|
704
699
|
|
|
705
700
|
// src/services/target/folder-selector.ts
|
|
@@ -761,14 +756,14 @@ function keySelector(folderKey, path, options, folderIndex) {
|
|
|
761
756
|
}
|
|
762
757
|
function uncheckablePathWithKey(path, folderKey, options) {
|
|
763
758
|
if (options.deploymentName) {
|
|
764
|
-
|
|
759
|
+
writeProgress2(` Could not read the Orchestrator folders to check --folder-path ${path} ` + `against --folder-key ${folderKey}; picking the deployment by --deployment-name.`);
|
|
765
760
|
return;
|
|
766
761
|
}
|
|
767
762
|
return failure("service-error", `Could not read the Orchestrator folders to check --folder-path ${path} ` + `against --folder-key ${folderKey}.`, "Drop --folder-path and pick the deployment by --folder-key alone, or by " + "--deployment-name <name>, or give this login the right to read Orchestrator folders.", { errorCode: "server_error", retry: "RetryLater" });
|
|
768
763
|
}
|
|
769
764
|
function uncheckablePath(path, options) {
|
|
770
765
|
if (options.deploymentName) {
|
|
771
|
-
|
|
766
|
+
writeProgress2(` Could not read the Orchestrator folders to check --folder-path ${path}; ` + "picking the deployment by --deployment-name.");
|
|
772
767
|
return;
|
|
773
768
|
}
|
|
774
769
|
return failure("service-error", `Could not read the Orchestrator folders to resolve --folder-path ${path}.`, "Pick the deployment with --folder-key <guid> or --deployment-name <name> instead, " + "or give this login the right to read Orchestrator folders.", { errorCode: "server_error", retry: "RetryLater" });
|
|
@@ -800,16 +795,16 @@ async function resolveAction(existing, options, prompts, folderIndex) {
|
|
|
800
795
|
if (existing.length === 0) {
|
|
801
796
|
return invalidOption(`--action ${requestedAction} needs an existing deployment, but none is installed for this package.`, "Use --action install for a first deployment.");
|
|
802
797
|
}
|
|
803
|
-
const
|
|
804
|
-
if (!
|
|
805
|
-
return
|
|
806
|
-
if (
|
|
798
|
+
const picked = await chooseExistingDeployment(existing, options, prompts, folderIndex);
|
|
799
|
+
if (!picked.ok)
|
|
800
|
+
return picked;
|
|
801
|
+
if (picked.deployment === undefined) {
|
|
807
802
|
return ambiguousDeployment(existing, folderLabels);
|
|
808
803
|
}
|
|
809
804
|
return {
|
|
810
805
|
ok: true,
|
|
811
806
|
action: requestedAction,
|
|
812
|
-
deployment:
|
|
807
|
+
deployment: picked.deployment,
|
|
813
808
|
explicit: true
|
|
814
809
|
};
|
|
815
810
|
}
|
|
@@ -928,7 +923,7 @@ async function resolveDeploymentName(defaultName, parentFolder, options, prompts
|
|
|
928
923
|
return options.deploymentName;
|
|
929
924
|
if (!canPrompt())
|
|
930
925
|
return;
|
|
931
|
-
|
|
926
|
+
writeProgress2(`
|
|
932
927
|
Deployment name (optional)
|
|
933
928
|
` + ` Creates a NEW folder "${parentFolder}/<name>" and names the deployment (unique per tenant).
|
|
934
929
|
` + ` Leave blank to use "${defaultName}"; give one to install this package into more than ` + "one folder (e.g. UAT + Prod).");
|
|
@@ -949,7 +944,7 @@ async function resolveVersion(config, packageName, stage, decision, options, pro
|
|
|
949
944
|
signal: options.signal
|
|
950
945
|
}));
|
|
951
946
|
if (error || !nav) {
|
|
952
|
-
return
|
|
947
|
+
return toDeployFailure2(error, `Could not list versions of ${packageName}`);
|
|
953
948
|
}
|
|
954
949
|
const versions = normalizeVersions(nav);
|
|
955
950
|
if (options.packageVersion !== undefined) {
|
|
@@ -1130,7 +1125,7 @@ async function settleNameCollision(input) {
|
|
|
1130
1125
|
};
|
|
1131
1126
|
if (input.action !== "install")
|
|
1132
1127
|
return unchanged;
|
|
1133
|
-
const lookUp = (candidate) =>
|
|
1128
|
+
const lookUp = (candidate) => listDeploymentsNamed2(input.config, candidate, input.options.signal);
|
|
1134
1129
|
let name = input.deploymentName;
|
|
1135
1130
|
const [listError, firstRows] = await catchError(lookUp(name ?? input.defaultName));
|
|
1136
1131
|
const aborted = abortedLookup(input.options.signal, listError, "Could not check whether the deployment name is taken");
|
|
@@ -1138,12 +1133,13 @@ async function settleNameCollision(input) {
|
|
|
1138
1133
|
return aborted;
|
|
1139
1134
|
if (listError || !firstRows) {
|
|
1140
1135
|
if (!allowedToSkipNameCheck(listError, input.config)) {
|
|
1141
|
-
const classified = listError instanceof
|
|
1136
|
+
const classified = listError instanceof SolutionDeploymentsError2 ? listError.errorCode : undefined;
|
|
1137
|
+
const listRetry = listError instanceof SolutionDeploymentsError2 ? listError.retry : undefined;
|
|
1142
1138
|
const denied = classified === "permission_denied";
|
|
1143
|
-
const needsUserLogin = listError instanceof
|
|
1144
|
-
return failure("service-error", `Could not check whether the deployment name is taken: ${listError instanceof Error ? listError.message : "unknown error"}`, needsUserLogin ? "This server's deployment search reads user logins only, so an " + "application login cannot check the name is free. Run the deploy with " + "a user login ('uip login'), or upgrade the existing deployment with " + "--action upgrade." : denied ? "A fresh install needs to read the Automation Solutions deployments to " + "check the name is free — Automation Solutions adopts a deployment whose " + "name it reuses. Ask for permission to list solution deployments in this " + "tenant, or upgrade the existing deployment with --action upgrade." : "Retry the deploy. If it keeps failing, pass --deployment-name with a name you know is free, or upgrade the existing deployment with --action upgrade.", {
|
|
1139
|
+
const needsUserLogin = listError instanceof SolutionDeploymentsError2 && listError.refusal === "needs-user-session";
|
|
1140
|
+
return failure("service-error", `Could not check whether the deployment name is taken: ${listError instanceof Error ? listError.message : "unknown error"}`, needsUserLogin ? "This server's deployment search reads user logins only, so an " + "application login cannot check the name is free. Run the deploy with " + "a user login ('uip login'), or upgrade the existing deployment with " + "--action upgrade." : denied ? "A fresh install needs to read the Automation Solutions deployments to " + "check the name is free — Automation Solutions adopts a deployment whose " + "name it reuses. Ask for permission to list solution deployments in this " + "tenant, or upgrade the existing deployment with --action upgrade." : listRetry === "RetryWillNotFix" ? "Pass --deployment-name with a name you know is free, or upgrade the existing deployment with --action upgrade." : "Retry the deploy. If it keeps failing, pass --deployment-name with a name you know is free, or upgrade the existing deployment with --action upgrade.", {
|
|
1145
1141
|
errorCode: classified ?? "server_error",
|
|
1146
|
-
retry: denied ? "RetryWillNotFix" : "RetryLater"
|
|
1142
|
+
retry: listRetry ?? (denied ? "RetryWillNotFix" : "RetryLater")
|
|
1147
1143
|
});
|
|
1148
1144
|
}
|
|
1149
1145
|
return unchanged;
|
|
@@ -1151,8 +1147,8 @@ async function settleNameCollision(input) {
|
|
|
1151
1147
|
let deployments = firstRows;
|
|
1152
1148
|
for (let attempt = 0;attempt < NAME_ATTEMPTS; attempt += 1) {
|
|
1153
1149
|
const effective = name ?? input.defaultName;
|
|
1154
|
-
const newest =
|
|
1155
|
-
const held = newest &&
|
|
1150
|
+
const newest = newestDeployment2(deployments);
|
|
1151
|
+
const held = newest && isCompletedUninstall2(newest) ? undefined : newest;
|
|
1156
1152
|
if (!held) {
|
|
1157
1153
|
return { ...unchanged, deploymentName: name };
|
|
1158
1154
|
}
|
|
@@ -1177,7 +1173,7 @@ async function settleNameCollision(input) {
|
|
|
1177
1173
|
return failure("name-conflict", `Still no free deployment name after ${NAME_ATTEMPTS} tries.`, "Pass one that is not in use with --deployment-name <name>.");
|
|
1178
1174
|
}
|
|
1179
1175
|
function allowedToSkipNameCheck(error, config) {
|
|
1180
|
-
const code = error instanceof
|
|
1176
|
+
const code = error instanceof SolutionDeploymentsError2 ? error.errorCode : undefined;
|
|
1181
1177
|
if (code === "permission_denied" || code === "authentication_required") {
|
|
1182
1178
|
return isExternalApplication(config);
|
|
1183
1179
|
}
|
|
@@ -1216,7 +1212,7 @@ async function upgradeHeldDeployment(held, effective, input) {
|
|
|
1216
1212
|
const action = await pivotDirection(input, held);
|
|
1217
1213
|
if (typeof action !== "string")
|
|
1218
1214
|
return action;
|
|
1219
|
-
|
|
1215
|
+
writeProgress2(` Continuing — this will ${action} the existing deployment "${effective}".`);
|
|
1220
1216
|
return {
|
|
1221
1217
|
ok: true,
|
|
1222
1218
|
action,
|
|
@@ -1232,9 +1228,11 @@ async function lookUpAgain(lookUp, name, input) {
|
|
|
1232
1228
|
if (aborted)
|
|
1233
1229
|
return aborted;
|
|
1234
1230
|
if (error || !rows) {
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1231
|
+
const classified = error instanceof SolutionDeploymentsError2 ? error : undefined;
|
|
1232
|
+
const retry = classified?.retry ?? "RetryLater";
|
|
1233
|
+
return failure("service-error", `${context}: ${error instanceof Error ? error.message : "unknown error"}`, retry === "RetryWillNotFix" ? "Pass --deployment-name with a name you know is free." : "Retry the deploy. If it keeps failing, pass --deployment-name with a name you know is free.", {
|
|
1234
|
+
errorCode: classified?.errorCode ?? "server_error",
|
|
1235
|
+
retry
|
|
1238
1236
|
});
|
|
1239
1237
|
}
|
|
1240
1238
|
return { ok: true, rows };
|
|
@@ -1286,7 +1284,7 @@ function upgradeInPlaceVerdict(held, solutionName, packageVersion) {
|
|
|
1286
1284
|
reason: `It is already at ${packageVersion} — there is nothing to upgrade.`
|
|
1287
1285
|
};
|
|
1288
1286
|
}
|
|
1289
|
-
if (!
|
|
1287
|
+
if (!isInstalledDeployment2(held) || !held.installedRootFolderKey) {
|
|
1290
1288
|
return {
|
|
1291
1289
|
ok: false,
|
|
1292
1290
|
reason: "It never finished installing — it cannot be upgraded. Remove it in " + "Automation Solutions, or deploy under a different name."
|
|
@@ -1304,12 +1302,12 @@ async function pivotDirection(input, held) {
|
|
|
1304
1302
|
if (aborted)
|
|
1305
1303
|
return aborted;
|
|
1306
1304
|
if (error || !nav) {
|
|
1307
|
-
return
|
|
1305
|
+
return toDeployFailure2(error, `Could not list the versions of ${input.packageName} to tell an upgrade ` + "from a downgrade");
|
|
1308
1306
|
}
|
|
1309
1307
|
const versions = normalizeVersions(nav);
|
|
1310
1308
|
const match = versions.find((version) => version.version === input.packageVersion);
|
|
1311
1309
|
if (!match) {
|
|
1312
|
-
|
|
1310
|
+
writeProgress2(" Could not tell whether this is an upgrade or a downgrade — submitting it as " + "an upgrade (the service validates the transition).");
|
|
1313
1311
|
return "upgrade";
|
|
1314
1312
|
}
|
|
1315
1313
|
const gate = validateRequestedVersion(match.version, versions);
|
|
@@ -1330,7 +1328,7 @@ async function resolvePackageName(config, options, prompts, stage) {
|
|
|
1330
1328
|
return vertical;
|
|
1331
1329
|
const [error, packages] = await catchError(listPackages(config, vertical, stage, options.signal));
|
|
1332
1330
|
if (error)
|
|
1333
|
-
return
|
|
1331
|
+
return toDeployFailure2(error, "Could not list packages");
|
|
1334
1332
|
if (!packages || packages.length === 0) {
|
|
1335
1333
|
return failure("unknown-package", `No packages are published for vertical "${vertical}".`, "Check the vertical name with --vertical, or ask the package's author whether it has been published.");
|
|
1336
1334
|
}
|
|
@@ -1342,7 +1340,7 @@ async function resolvePackageName(config, options, prompts, stage) {
|
|
|
1342
1340
|
async function resolveVertical(config, options, prompts) {
|
|
1343
1341
|
const [error, verticals] = await catchError(listVerticals(config, options.signal));
|
|
1344
1342
|
if (error)
|
|
1345
|
-
return
|
|
1343
|
+
return toDeployFailure2(error, "Could not list verticals");
|
|
1346
1344
|
const available = verticals ?? [];
|
|
1347
1345
|
if (options.vertical) {
|
|
1348
1346
|
const matched = available.find((candidate) => candidate.toLowerCase() === options.vertical?.toLowerCase());
|
|
@@ -1413,7 +1411,7 @@ async function resolveTargetFolder(config, decision, options, prompts, listFolde
|
|
|
1413
1411
|
function folderByKey(folderKey, folderIndex) {
|
|
1414
1412
|
const folders = folderIndex.folders;
|
|
1415
1413
|
if (!folders) {
|
|
1416
|
-
|
|
1414
|
+
writeProgress2(` Could not read the Orchestrator folders to check --folder-key ${folderKey}; ` + "sending it as given.");
|
|
1417
1415
|
return {
|
|
1418
1416
|
ok: true,
|
|
1419
1417
|
target: { folderKey },
|
|
@@ -1466,7 +1464,7 @@ async function resolveFolderPath(config, options, listFolders, folderIndex) {
|
|
|
1466
1464
|
function unreadableFolderPath(wanted, options, error) {
|
|
1467
1465
|
const reason = error?.message ?? "unknown error";
|
|
1468
1466
|
if (options.folderKey) {
|
|
1469
|
-
|
|
1467
|
+
writeProgress2(` Could not read the Orchestrator folders to check --folder-path ${wanted} ` + `against --folder-key ${options.folderKey} (${reason}); using the key.`);
|
|
1470
1468
|
return {
|
|
1471
1469
|
ok: true,
|
|
1472
1470
|
target: { folderKey: options.folderKey },
|
|
@@ -1474,7 +1472,7 @@ function unreadableFolderPath(wanted, options, error) {
|
|
|
1474
1472
|
};
|
|
1475
1473
|
}
|
|
1476
1474
|
if (!wanted.includes("/")) {
|
|
1477
|
-
|
|
1475
|
+
writeProgress2(` Could not read the Orchestrator folders to check --folder-path ${wanted} ` + `(${reason}); sending it to the service as a folder name.`);
|
|
1478
1476
|
return { ok: true, target: { folderName: wanted }, label: wanted };
|
|
1479
1477
|
}
|
|
1480
1478
|
return failure("service-error", `Could not read the Orchestrator folders to resolve --folder-path ${wanted}: ${reason}`, "Pass the folder's key with --folder-key <guid> instead, or give this login the " + "right to read Orchestrator folders.", { errorCode: "server_error", retry: "RetryLater" });
|
|
@@ -1489,7 +1487,7 @@ async function resolveDeployTarget(config, options, prompts, listFolders = listA
|
|
|
1489
1487
|
return packageName;
|
|
1490
1488
|
const [lookupError, existingAll] = await catchError(findCurrentDeployments(config, packageName, options.signal));
|
|
1491
1489
|
if (lookupError) {
|
|
1492
|
-
return
|
|
1490
|
+
return toDeployFailure2(lookupError, "Could not list current deployments");
|
|
1493
1491
|
}
|
|
1494
1492
|
const existing = (existingAll ?? []).filter((deployment) => deployment.status === "Installed");
|
|
1495
1493
|
const folderIndex = existing.length > 0 || options.folderKey !== undefined ? await loadFolderLabels(config, listFolders, options.signal) : { ok: true, labels: new Map, read: false };
|
|
@@ -1508,12 +1506,12 @@ async function resolveDeployTarget(config, options, prompts, listFolders = listA
|
|
|
1508
1506
|
const { version, versions, picked: versionPicked } = resolved;
|
|
1509
1507
|
const [manifestError, manifest] = await catchError(getManifest(config, packageName, version, options.signal));
|
|
1510
1508
|
if (manifestError || !manifest) {
|
|
1511
|
-
return
|
|
1509
|
+
return toDeployFailure2(manifestError, `Could not read the manifest of ${packageName} ${version}`);
|
|
1512
1510
|
}
|
|
1513
1511
|
const provisionalAction = settleProvisionalAction(decision.action, decision.explicit, versionPicked, version, versions);
|
|
1514
1512
|
if (typeof provisionalAction !== "string")
|
|
1515
1513
|
return provisionalAction;
|
|
1516
|
-
const defaultName =
|
|
1514
|
+
const defaultName = solutionNameFromManifest2(manifest) || packageName;
|
|
1517
1515
|
const named = provisionalAction === "install" ? await resolveDeploymentName(defaultName, target.label, options, prompts) : upgradeName(decision.deployment, options);
|
|
1518
1516
|
const settled = await settleNameCollision({
|
|
1519
1517
|
config,
|
|
@@ -1559,7 +1557,7 @@ async function prepareSubmit(config, options, deps) {
|
|
|
1559
1557
|
if (!collected.ok)
|
|
1560
1558
|
return collected;
|
|
1561
1559
|
for (const warning of collected.warnings)
|
|
1562
|
-
|
|
1560
|
+
writeWarning2(warning);
|
|
1563
1561
|
const resourceConfigurations = await buildDeployConfigPayload(options, target.manifest, target.action === "install", deps);
|
|
1564
1562
|
if (!resourceConfigurations.ok)
|
|
1565
1563
|
return resourceConfigurations;
|
|
@@ -1621,7 +1619,7 @@ async function buildDeployConfigPayload(options, manifest, isFreshInstall, deps)
|
|
|
1621
1619
|
prompts: deps.configuration
|
|
1622
1620
|
});
|
|
1623
1621
|
for (const warning of collected.warnings)
|
|
1624
|
-
|
|
1622
|
+
writeWarning2(warning);
|
|
1625
1623
|
return {
|
|
1626
1624
|
ok: true,
|
|
1627
1625
|
value: {
|
|
@@ -1664,7 +1662,7 @@ function summarize(prepared) {
|
|
|
1664
1662
|
async function watchToCompletion(config, job, options, deps, submitted) {
|
|
1665
1663
|
const { serviceUrl, manifest, sentResourceConfigurations, deploymentName } = submitted;
|
|
1666
1664
|
const routing = routingFlags(options);
|
|
1667
|
-
const outcome = await
|
|
1665
|
+
const outcome = await watchDeployJob2(watchOptionsFrom2(options, {
|
|
1668
1666
|
jobId: job.id,
|
|
1669
1667
|
config,
|
|
1670
1668
|
serviceUrl,
|
|
@@ -1677,7 +1675,7 @@ async function watchToCompletion(config, job, options, deps, submitted) {
|
|
|
1677
1675
|
case "lost-contact":
|
|
1678
1676
|
return stoppedWatching(outcome, job.id, options.timeout, options);
|
|
1679
1677
|
case "succeeded": {
|
|
1680
|
-
|
|
1678
|
+
writeSuccessSummary2(outcome.job, outcome.lastLogMessage);
|
|
1681
1679
|
const [extraError, extra] = await catchError(finalizeSucceededJob({
|
|
1682
1680
|
config: outcome.config ?? config,
|
|
1683
1681
|
job: outcome.job,
|
|
@@ -1688,7 +1686,7 @@ async function watchToCompletion(config, job, options, deps, submitted) {
|
|
|
1688
1686
|
serviceUrl
|
|
1689
1687
|
}));
|
|
1690
1688
|
if (extraError) {
|
|
1691
|
-
|
|
1689
|
+
writeWarning2(`The deploy succeeded. Preparing the seed workspace afterwards failed ` + `(${extraError.message}), so nothing was seeded: run 'uip vss deploy seed' ` + "when you are ready.");
|
|
1692
1690
|
}
|
|
1693
1691
|
return {
|
|
1694
1692
|
ok: true,
|
|
@@ -1704,12 +1702,12 @@ ${forDisplay(outcome.url)}` : ""), pauseInstructions(outcome.actionKind, `uip vs
|
|
|
1704
1702
|
case "failed":
|
|
1705
1703
|
return failure("job-failed", `Job ${job.id} failed` + (outcome.job.error?.step ? ` at step ${forDisplay(outcome.job.error.step)}` : "") + `: ${forDisplayIfSet(outcome.job.error?.message) ?? "unknown error"}`, `The job is checkpointed. Retry from the last successful step with: uip vss deploy resume ${job.id}${routing}`);
|
|
1706
1704
|
case "canceled":
|
|
1707
|
-
|
|
1705
|
+
writeProgress2(`
|
|
1708
1706
|
Deployment canceled.`);
|
|
1709
|
-
|
|
1707
|
+
writeStepSummary2(outcome.job);
|
|
1710
1708
|
return failure("job-canceled", `Job ${job.id} was canceled.`, `Start again with a new deploy, or inspect it with: uip vss deploy status ${job.id}${routing}`);
|
|
1711
1709
|
case "rejected":
|
|
1712
|
-
return
|
|
1710
|
+
return toDeployFailure2(outcome.error, `Could not ${outcome.attempting ?? "read"} job ${job.id}`, {
|
|
1713
1711
|
notFound: "job",
|
|
1714
1712
|
attempting: outcome.attempting ?? "read",
|
|
1715
1713
|
jobId: job.id,
|
|
@@ -1723,7 +1721,7 @@ async function runDeploy(options, deps) {
|
|
|
1723
1721
|
const blank = rejectBlankOptions(options);
|
|
1724
1722
|
if (blank)
|
|
1725
1723
|
return blank;
|
|
1726
|
-
const serviceUrl =
|
|
1724
|
+
const serviceUrl = readServiceUrl2(options.serviceUrl, options.tenant);
|
|
1727
1725
|
if (!serviceUrl.ok)
|
|
1728
1726
|
return serviceUrl;
|
|
1729
1727
|
const seedWithoutWait = rejectSeedWithoutWait(options);
|
|
@@ -1735,7 +1733,7 @@ async function runDeploy(options, deps) {
|
|
|
1735
1733
|
serviceUrl: serviceUrl.value
|
|
1736
1734
|
}));
|
|
1737
1735
|
if (authError || !config)
|
|
1738
|
-
return
|
|
1736
|
+
return credentialsFailure2(authError);
|
|
1739
1737
|
const prepared = await prepareSubmit(config, options, deps);
|
|
1740
1738
|
if (!prepared.ok)
|
|
1741
1739
|
return prepared;
|
|
@@ -1751,17 +1749,17 @@ async function runDeploy(options, deps) {
|
|
|
1751
1749
|
return failure("declined", "Deploy canceled before submitting.", "Nothing was sent to the service. Run the command again when the " + "summary is what you want, or pass --yes to skip this question.");
|
|
1752
1750
|
}
|
|
1753
1751
|
}
|
|
1754
|
-
const [submitError, job] = await catchError(withCapacityRetry(() =>
|
|
1752
|
+
const [submitError, job] = await catchError(withCapacityRetry(() => submitDeployJob2(config, request, options.signal), "the submit", undefined, options.signal));
|
|
1755
1753
|
if (submitError) {
|
|
1756
1754
|
if (options.signal?.aborted === true || !(submitError instanceof VssApiError)) {
|
|
1757
1755
|
return failure("lost-contact", `The submit of ${request.packageName} ${request.packageVersion} ${options.signal?.aborted === true ? "was interrupted before the service answered" : `did not get an answer the CLI could read (${submitError.message})`}, so it is not known whether a deploy job was created.`, checkBeforeResubmitting(options));
|
|
1758
1756
|
}
|
|
1759
|
-
return
|
|
1757
|
+
return toDeployFailure2(submitError, "Could not submit the deploy job", {
|
|
1760
1758
|
routing: options,
|
|
1761
1759
|
attempting: "submit"
|
|
1762
1760
|
});
|
|
1763
1761
|
}
|
|
1764
|
-
|
|
1762
|
+
writeProgress2(`Deploy job ${job.id} accepted and running.`);
|
|
1765
1763
|
if (options.wait === false) {
|
|
1766
1764
|
return { ok: true, outcome: "submitted", job };
|
|
1767
1765
|
}
|
|
@@ -1776,4 +1774,4 @@ export {
|
|
|
1776
1774
|
runDeploy
|
|
1777
1775
|
};
|
|
1778
1776
|
|
|
1779
|
-
//# debugId=
|
|
1777
|
+
//# debugId=C3C4A176FFEA0FD464756E2164756E21
|