@uipath/solution-tool 1.205.0-preview.281 → 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-je9d70vv.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-919yn8wn.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-5fke71jn.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-ha0pxw3h.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-4pa108k7.js → packager-tool-1bz9h5ca.js} +11 -11
- package/dist/{packager-tool-gs3f3tf7.js → packager-tool-1ctvbx0h.js} +1 -1
- package/dist/{packager-tool-f23a485e.js → packager-tool-55ztfccd.js} +176 -196
- package/dist/{packager-tool-45a8fkw0.js → packager-tool-95y24705.js} +37 -39
- package/dist/{packager-tool-2vmz56qh.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-gyqfs04e.js → packager-tool-nrhqgr4z.js} +273 -255
- package/dist/{packager-tool-61pwb567.js → packager-tool-ppj5f4y7.js} +6 -7
- package/dist/{packager-tool-d78ww4hb.js → packager-tool-pyt9fvty.js} +51 -48
- package/dist/packager-tool-q5d9df2q.js +74 -0
- package/dist/{packager-tool-cvf46scg.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-2t72aez8.js → packager-tool-snm6s7b5.js} +15 -15
- package/dist/{packager-tool-43ahv5mn.js → packager-tool-t39pjz7n.js} +35 -18
- package/dist/{packager-tool-wm0jaz7p.js → packager-tool-t3a48ys5.js} +305 -657
- package/dist/{packager-tool-dnrk1gg6.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-h1tq7bqf.js → packager-tool-vx39dhvn.js} +65 -35
- package/dist/{packager-tool-5qzgdb66.js → packager-tool-w34wyhwf.js} +13 -15
- package/dist/packager-tool-w8bcwfd3.js +280 -0
- package/dist/{packager-tool-1ybnxbp9.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-056k8w2f.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-pzpet021.js → restore-command-service-n880dxre.js} +37 -34
- package/dist/{run-service-hk8w2h31.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-0tm600d1.js +0 -25
- package/dist/deploy-run-service-hne5w17k.js +0 -25
- package/dist/deployment-search-32zvxn35.js +0 -55
- package/dist/feed-resolver-pdeb4wkq.js +0 -28
- package/dist/feed-scope-failure-4baame72.js +0 -19
- package/dist/feed-session-7xqphdrg.js +0 -17
- package/dist/first-party-service-sd8yaf73.js +0 -27
- package/dist/governance-options-bqgv5fte.js +0 -32
- package/dist/index-dqa169gp.js +0 -25
- package/dist/index-prm27bvm.js +0 -138
- package/dist/index-wdndcwab.js +0 -667
- package/dist/node-v7xhqwe2.js +0 -86
- package/dist/pack-command-service-b1v9c8cw.js +0 -35
- package/dist/package-id-rpzgy31w.js +0 -13
- package/dist/packager-tool-53w8skv5.js +0 -262
- package/dist/packager-tool-5edvzz80.js +0 -543
- package/dist/packager-tool-99jaqabz.js +0 -171
- package/dist/packager-tool-9hsmn8th.js +0 -418
- package/dist/packager-tool-azre7mm1.js +0 -182
- package/dist/packager-tool-fn13r8e1.js +0 -188
- package/dist/packager-tool-gdtpsdn7.js +0 -342
- package/dist/packager-tool-qw47eyw7.js +0 -43
- package/dist/packager-tool-resolver-994z3jkj.js +0 -23
- package/dist/packager-tool-tedbebpq.js +0 -5367
- package/dist/packager-tool-x1ah4eez.js +0 -68
- 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,89 +1,85 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
acknowledgedButNotRunHint,
|
|
5
|
-
activateDeployment,
|
|
6
|
-
describeDeploymentFailureAsync,
|
|
7
|
-
describeValidationFailureAsync,
|
|
8
|
-
formatPermanentDeletionResources,
|
|
9
|
-
isPermanentDeletionRefusal,
|
|
10
|
-
pollPipelineDeploymentAsync,
|
|
11
|
-
remainingTimeoutMs,
|
|
12
|
-
resolveFolderInfo,
|
|
13
|
-
resolveParentFolder,
|
|
14
|
-
settlePermanentDeletionRefusalAsync,
|
|
15
|
-
stillRequiresConfirmation
|
|
16
|
-
} from "./packager-tool-cvf46scg.js";
|
|
2
|
+
getFileSystem
|
|
3
|
+
} from "./packager-tool-vgrswa8p.js";
|
|
17
4
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
pendingResourceApis,
|
|
22
|
-
readPendingResourcesAsync,
|
|
23
|
-
reportedActivationStatus
|
|
24
|
-
} from "./packager-tool-2t72aez8.js";
|
|
5
|
+
catchError,
|
|
6
|
+
extractErrorDetails
|
|
7
|
+
} from "./packager-tool-m07vyk89.js";
|
|
25
8
|
import {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} from "./packager-tool-
|
|
9
|
+
logger,
|
|
10
|
+
PollOutcome,
|
|
11
|
+
mapPollFailure
|
|
12
|
+
} from "./packager-tool-9vrwpgt3.js";
|
|
13
|
+
import {
|
|
14
|
+
resolveFolder
|
|
15
|
+
} from "./packager-tool-fp46ebde.js";
|
|
33
16
|
import {
|
|
17
|
+
Configuration2,
|
|
18
|
+
PipelinesApi,
|
|
34
19
|
DeploymentSearchNeedsUserSessionError,
|
|
35
|
-
MAX_LISTED_DEPLOYMENTS,
|
|
36
|
-
blocksRedeploy,
|
|
37
|
-
findDeploymentBestEffort,
|
|
38
|
-
findDeploymentsByName,
|
|
39
|
-
findDeploymentsByPackageName,
|
|
40
|
-
formatExistingDeployments,
|
|
41
|
-
interpretFailedDeployPoll,
|
|
42
20
|
isAuthRefusal,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} from "./packager-tool-
|
|
21
|
+
classifyFeedSession2,
|
|
22
|
+
feedSessionRefusal2,
|
|
23
|
+
feedSessionRefusalAsync2
|
|
24
|
+
} from "./packager-tool-bs1jn1yn.js";
|
|
47
25
|
import {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} from "./packager-tool-
|
|
26
|
+
Configuration3,
|
|
27
|
+
SolutionDeploymentAction2,
|
|
28
|
+
DeploymentsApi2
|
|
29
|
+
} from "./packager-tool-a6va4gc5.js";
|
|
52
30
|
import {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} from "./packager-tool-97rcgwvv.js";
|
|
31
|
+
getSolutionAuthContext2
|
|
32
|
+
} from "./packager-tool-ppj5f4y7.js";
|
|
56
33
|
import {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
34
|
+
readDeploymentByKeyAsync2,
|
|
35
|
+
findDeploymentsByPackageName2,
|
|
36
|
+
DeploymentSearchCapError2,
|
|
37
|
+
blocksRedeploy2,
|
|
38
|
+
MAX_LISTED_DEPLOYMENTS2,
|
|
39
|
+
formatExistingDeployments2,
|
|
40
|
+
findDeploymentsByName2,
|
|
41
|
+
findDeploymentBestEffort2,
|
|
42
|
+
newestDeploymentRow2,
|
|
43
|
+
interpretFailedDeployPoll2,
|
|
44
|
+
resolveInstalledFolder2
|
|
45
|
+
} from "./packager-tool-w8bcwfd3.js";
|
|
61
46
|
import {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
} from "./packager-tool-8ptbmmmp.js";
|
|
47
|
+
activateDeployment,
|
|
48
|
+
NO_SERVER_REASON,
|
|
49
|
+
describeValidationFailureAsync,
|
|
50
|
+
describeDeploymentFailureAsync,
|
|
51
|
+
ACKNOWLEDGE_PERMANENT_DELETION_FLAG,
|
|
52
|
+
finiteOr,
|
|
53
|
+
runInstallToOutcomeAsync
|
|
54
|
+
} from "./packager-tool-q8ryk6q9.js";
|
|
71
55
|
import {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
56
|
+
resolveParentFolder,
|
|
57
|
+
resolveFolderInfo,
|
|
58
|
+
feedScopeInitOverride2,
|
|
59
|
+
feedSelectorFlag2,
|
|
60
|
+
describeFeedResolutionFailureAsync2,
|
|
61
|
+
resolveFeedScope2
|
|
62
|
+
} from "./packager-tool-fqs6hdcy.js";
|
|
76
63
|
import {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
64
|
+
pendingResourceApis,
|
|
65
|
+
reportedActivationStatus,
|
|
66
|
+
readPendingResourcesAsync,
|
|
67
|
+
appendDeploymentStateInstructions,
|
|
68
|
+
needsPendingResources,
|
|
69
|
+
deploymentNextSteps
|
|
70
|
+
} from "./packager-tool-snm6s7b5.js";
|
|
80
71
|
import {
|
|
81
|
-
|
|
82
|
-
|
|
72
|
+
formatDeploymentFailureDetails,
|
|
73
|
+
hasServerErrorCode,
|
|
74
|
+
DRAFT_VERSION_MISMATCH_CODE,
|
|
75
|
+
leavesPendingDraft,
|
|
76
|
+
installLandedDespiteStatus,
|
|
77
|
+
explainPipelineStatusAfterInstall
|
|
78
|
+
} from "./packager-tool-2pxe2r4j.js";
|
|
83
79
|
import {
|
|
84
80
|
__commonJS,
|
|
85
81
|
__require
|
|
86
|
-
} from "./packager-tool-
|
|
82
|
+
} from "./packager-tool-epsr41wx.js";
|
|
87
83
|
|
|
88
84
|
// ../../node_modules/yaml/dist/nodes/identity.js
|
|
89
85
|
var require_identity = __commonJS(function(exports) {
|
|
@@ -566,8 +562,8 @@ var require_toJS = __commonJS(function(exports) {
|
|
|
566
562
|
return value.toJSON(arg, ctx);
|
|
567
563
|
const data = { aliasCount: 0, count: 1, res: undefined };
|
|
568
564
|
ctx.anchors.set(value, data);
|
|
569
|
-
ctx.onCreate = (
|
|
570
|
-
data.res =
|
|
565
|
+
ctx.onCreate = (res) => {
|
|
566
|
+
data.res = res;
|
|
571
567
|
delete ctx.onCreate;
|
|
572
568
|
};
|
|
573
569
|
const res = value.toJSON(arg, ctx);
|
|
@@ -611,8 +607,8 @@ var require_Node = __commonJS(function(exports) {
|
|
|
611
607
|
};
|
|
612
608
|
const res = toJS.toJS(this, "", ctx);
|
|
613
609
|
if (typeof onAnchor === "function")
|
|
614
|
-
for (const { count, res
|
|
615
|
-
onAnchor(
|
|
610
|
+
for (const { count, res } of ctx.anchors.values())
|
|
611
|
+
onAnchor(res, count);
|
|
616
612
|
return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
|
|
617
613
|
}
|
|
618
614
|
}
|
|
@@ -666,16 +662,16 @@ var require_Alias = __commonJS(function(exports) {
|
|
|
666
662
|
toJSON(_arg, ctx) {
|
|
667
663
|
if (!ctx)
|
|
668
664
|
return { source: this.source };
|
|
669
|
-
const { anchors
|
|
665
|
+
const { anchors, doc, maxAliasCount } = ctx;
|
|
670
666
|
const source = this.resolve(doc, ctx);
|
|
671
667
|
if (!source) {
|
|
672
668
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
673
669
|
throw new ReferenceError(msg);
|
|
674
670
|
}
|
|
675
|
-
let data =
|
|
671
|
+
let data = anchors.get(source);
|
|
676
672
|
if (!data) {
|
|
677
673
|
toJS.toJS(source, null, ctx);
|
|
678
|
-
data =
|
|
674
|
+
data = anchors.get(source);
|
|
679
675
|
}
|
|
680
676
|
if (data?.res === undefined) {
|
|
681
677
|
const msg = "This should not happen: Alias anchor was not resolved?";
|
|
@@ -684,7 +680,7 @@ var require_Alias = __commonJS(function(exports) {
|
|
|
684
680
|
if (maxAliasCount >= 0) {
|
|
685
681
|
data.count += 1;
|
|
686
682
|
if (data.aliasCount === 0)
|
|
687
|
-
data.aliasCount = getAliasCount(doc, source,
|
|
683
|
+
data.aliasCount = getAliasCount(doc, source, anchors);
|
|
688
684
|
if (data.count * data.aliasCount > maxAliasCount) {
|
|
689
685
|
const msg = "Excessive alias count indicates a resource exhaustion attack";
|
|
690
686
|
throw new ReferenceError(msg);
|
|
@@ -706,22 +702,22 @@ var require_Alias = __commonJS(function(exports) {
|
|
|
706
702
|
return src;
|
|
707
703
|
}
|
|
708
704
|
}
|
|
709
|
-
function getAliasCount(doc, node,
|
|
705
|
+
function getAliasCount(doc, node, anchors) {
|
|
710
706
|
if (identity.isAlias(node)) {
|
|
711
707
|
const source = node.resolve(doc);
|
|
712
|
-
const anchor =
|
|
708
|
+
const anchor = anchors && source && anchors.get(source);
|
|
713
709
|
return anchor ? anchor.count * anchor.aliasCount : 0;
|
|
714
710
|
} else if (identity.isCollection(node)) {
|
|
715
711
|
let count = 0;
|
|
716
712
|
for (const item of node.items) {
|
|
717
|
-
const c = getAliasCount(doc, item,
|
|
713
|
+
const c = getAliasCount(doc, item, anchors);
|
|
718
714
|
if (c > count)
|
|
719
715
|
count = c;
|
|
720
716
|
}
|
|
721
717
|
return count;
|
|
722
718
|
} else if (identity.isPair(node)) {
|
|
723
|
-
const kc = getAliasCount(doc, node.key,
|
|
724
|
-
const vc = getAliasCount(doc, node.value,
|
|
719
|
+
const kc = getAliasCount(doc, node.key, anchors);
|
|
720
|
+
const vc = getAliasCount(doc, node.value, anchors);
|
|
725
721
|
return Math.max(kc, vc);
|
|
726
722
|
}
|
|
727
723
|
return 1;
|
|
@@ -806,10 +802,10 @@ var require_createNode = __commonJS(function(exports) {
|
|
|
806
802
|
value = value.toJSON();
|
|
807
803
|
}
|
|
808
804
|
if (!value || typeof value !== "object") {
|
|
809
|
-
const
|
|
805
|
+
const node = new Scalar.Scalar(value);
|
|
810
806
|
if (ref)
|
|
811
|
-
ref.node =
|
|
812
|
-
return
|
|
807
|
+
ref.node = node;
|
|
808
|
+
return node;
|
|
813
809
|
}
|
|
814
810
|
tagObj = value instanceof Map ? schema[identity.MAP] : (Symbol.iterator in Object(value)) ? schema[identity.SEQ] : schema[identity.MAP];
|
|
815
811
|
}
|
|
@@ -1058,17 +1054,17 @@ var require_foldFlowLines = __commonJS(function(exports) {
|
|
|
1058
1054
|
if (onFold)
|
|
1059
1055
|
onFold();
|
|
1060
1056
|
let res = text.slice(0, folds[0]);
|
|
1061
|
-
for (let
|
|
1062
|
-
const fold = folds[
|
|
1063
|
-
const
|
|
1057
|
+
for (let i = 0;i < folds.length; ++i) {
|
|
1058
|
+
const fold = folds[i];
|
|
1059
|
+
const end = folds[i + 1] || text.length;
|
|
1064
1060
|
if (fold === 0)
|
|
1065
1061
|
res = `
|
|
1066
|
-
${indent}${text.slice(0,
|
|
1062
|
+
${indent}${text.slice(0, end)}`;
|
|
1067
1063
|
else {
|
|
1068
1064
|
if (mode === FOLD_QUOTED && escapedFolds[fold])
|
|
1069
1065
|
res += `${text[fold]}\\`;
|
|
1070
1066
|
res += `
|
|
1071
|
-
${indent}${text.slice(fold + 1,
|
|
1067
|
+
${indent}${text.slice(fold + 1, end)}`;
|
|
1072
1068
|
}
|
|
1073
1069
|
}
|
|
1074
1070
|
return res;
|
|
@@ -1704,15 +1700,15 @@ var require_merge = __commonJS(function(exports) {
|
|
|
1704
1700
|
if (!identity.isMap(source))
|
|
1705
1701
|
throw new Error("Merge sources must be maps or map aliases");
|
|
1706
1702
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
1707
|
-
for (const [key,
|
|
1703
|
+
for (const [key, value] of srcMap) {
|
|
1708
1704
|
if (map instanceof Map) {
|
|
1709
1705
|
if (!map.has(key))
|
|
1710
|
-
map.set(key,
|
|
1706
|
+
map.set(key, value);
|
|
1711
1707
|
} else if (map instanceof Set) {
|
|
1712
1708
|
map.add(key);
|
|
1713
1709
|
} else if (!Object.prototype.hasOwnProperty.call(map, key)) {
|
|
1714
1710
|
Object.defineProperty(map, key, {
|
|
1715
|
-
value
|
|
1711
|
+
value,
|
|
1716
1712
|
writable: true,
|
|
1717
1713
|
enumerable: true,
|
|
1718
1714
|
configurable: true
|
|
@@ -1835,8 +1831,8 @@ var require_stringifyCollection = __commonJS(function(exports) {
|
|
|
1835
1831
|
var stringifyComment = require_stringifyComment();
|
|
1836
1832
|
function stringifyCollection(collection, ctx, options) {
|
|
1837
1833
|
const flow = ctx.inFlow ?? collection.flow;
|
|
1838
|
-
const
|
|
1839
|
-
return
|
|
1834
|
+
const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
|
|
1835
|
+
return stringify(collection, ctx, options);
|
|
1840
1836
|
}
|
|
1841
1837
|
function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
|
|
1842
1838
|
const { indent, options: { commentString } } = ctx;
|
|
@@ -1845,13 +1841,13 @@ var require_stringifyCollection = __commonJS(function(exports) {
|
|
|
1845
1841
|
const lines = [];
|
|
1846
1842
|
for (let i = 0;i < items.length; ++i) {
|
|
1847
1843
|
const item = items[i];
|
|
1848
|
-
let
|
|
1844
|
+
let comment = null;
|
|
1849
1845
|
if (identity.isNode(item)) {
|
|
1850
1846
|
if (!chompKeep && item.spaceBefore)
|
|
1851
1847
|
lines.push("");
|
|
1852
1848
|
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
1853
1849
|
if (item.comment)
|
|
1854
|
-
|
|
1850
|
+
comment = item.comment;
|
|
1855
1851
|
} else if (identity.isPair(item)) {
|
|
1856
1852
|
const ik = identity.isNode(item.key) ? item.key : null;
|
|
1857
1853
|
if (ik) {
|
|
@@ -1861,12 +1857,12 @@ var require_stringifyCollection = __commonJS(function(exports) {
|
|
|
1861
1857
|
}
|
|
1862
1858
|
}
|
|
1863
1859
|
chompKeep = false;
|
|
1864
|
-
let
|
|
1865
|
-
if (
|
|
1866
|
-
|
|
1867
|
-
if (chompKeep &&
|
|
1860
|
+
let str = stringify.stringify(item, itemCtx, () => comment = null, () => chompKeep = true);
|
|
1861
|
+
if (comment)
|
|
1862
|
+
str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
|
|
1863
|
+
if (chompKeep && comment)
|
|
1868
1864
|
chompKeep = false;
|
|
1869
|
-
lines.push(blockItemPrefix +
|
|
1865
|
+
lines.push(blockItemPrefix + str);
|
|
1870
1866
|
}
|
|
1871
1867
|
let str;
|
|
1872
1868
|
if (lines.length === 0) {
|
|
@@ -2116,10 +2112,10 @@ var require_map = __commonJS(function(exports) {
|
|
|
2116
2112
|
default: true,
|
|
2117
2113
|
nodeClass: YAMLMap.YAMLMap,
|
|
2118
2114
|
tag: "tag:yaml.org,2002:map",
|
|
2119
|
-
resolve(
|
|
2120
|
-
if (!identity.isMap(
|
|
2115
|
+
resolve(map, onError) {
|
|
2116
|
+
if (!identity.isMap(map))
|
|
2121
2117
|
onError("Expected a mapping for this tag");
|
|
2122
|
-
return
|
|
2118
|
+
return map;
|
|
2123
2119
|
},
|
|
2124
2120
|
createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)
|
|
2125
2121
|
};
|
|
@@ -2228,10 +2224,10 @@ var require_seq = __commonJS(function(exports) {
|
|
|
2228
2224
|
default: true,
|
|
2229
2225
|
nodeClass: YAMLSeq.YAMLSeq,
|
|
2230
2226
|
tag: "tag:yaml.org,2002:seq",
|
|
2231
|
-
resolve(
|
|
2232
|
-
if (!identity.isSeq(
|
|
2227
|
+
resolve(seq, onError) {
|
|
2228
|
+
if (!identity.isSeq(seq))
|
|
2233
2229
|
onError("Expected a sequence for this tag");
|
|
2234
|
-
return
|
|
2230
|
+
return seq;
|
|
2235
2231
|
},
|
|
2236
2232
|
createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)
|
|
2237
2233
|
};
|
|
@@ -2577,8 +2573,8 @@ ${cn.comment}` : item.comment;
|
|
|
2577
2573
|
}
|
|
2578
2574
|
function createPairs(schema, iterable, ctx) {
|
|
2579
2575
|
const { replacer } = ctx;
|
|
2580
|
-
const
|
|
2581
|
-
|
|
2576
|
+
const pairs = new YAMLSeq.YAMLSeq(schema);
|
|
2577
|
+
pairs.tag = "tag:yaml.org,2002:pairs";
|
|
2582
2578
|
let i = 0;
|
|
2583
2579
|
if (iterable && Symbol.iterator in Object(iterable))
|
|
2584
2580
|
for (let it of iterable) {
|
|
@@ -2602,9 +2598,9 @@ ${cn.comment}` : item.comment;
|
|
|
2602
2598
|
} else {
|
|
2603
2599
|
key = it;
|
|
2604
2600
|
}
|
|
2605
|
-
|
|
2601
|
+
pairs.items.push(Pair.createPair(key, value, ctx));
|
|
2606
2602
|
}
|
|
2607
|
-
return
|
|
2603
|
+
return pairs;
|
|
2608
2604
|
}
|
|
2609
2605
|
var pairs = {
|
|
2610
2606
|
collection: "seq",
|
|
@@ -2658,9 +2654,9 @@ var require_omap = __commonJS(function(exports) {
|
|
|
2658
2654
|
}
|
|
2659
2655
|
static from(schema, iterable, ctx) {
|
|
2660
2656
|
const pairs$1 = pairs.createPairs(schema, iterable, ctx);
|
|
2661
|
-
const
|
|
2662
|
-
|
|
2663
|
-
return
|
|
2657
|
+
const omap = new this;
|
|
2658
|
+
omap.items = pairs$1.items;
|
|
2659
|
+
return omap;
|
|
2664
2660
|
}
|
|
2665
2661
|
}
|
|
2666
2662
|
YAMLOMap.tag = "tag:yaml.org,2002:omap";
|
|
@@ -2786,8 +2782,8 @@ var require_int2 = __commonJS(function(exports) {
|
|
|
2786
2782
|
str = `0x${str}`;
|
|
2787
2783
|
break;
|
|
2788
2784
|
}
|
|
2789
|
-
const
|
|
2790
|
-
return sign === "-" ? BigInt(-1) *
|
|
2785
|
+
const n = BigInt(str);
|
|
2786
|
+
return sign === "-" ? BigInt(-1) * n : n;
|
|
2791
2787
|
}
|
|
2792
2788
|
const n = parseInt(str, radix);
|
|
2793
2789
|
return sign === "-" ? -1 * n : n;
|
|
@@ -2891,14 +2887,14 @@ var require_set = __commonJS(function(exports) {
|
|
|
2891
2887
|
}
|
|
2892
2888
|
static from(schema, iterable, ctx) {
|
|
2893
2889
|
const { replacer } = ctx;
|
|
2894
|
-
const
|
|
2890
|
+
const set = new this(schema);
|
|
2895
2891
|
if (iterable && Symbol.iterator in Object(iterable))
|
|
2896
2892
|
for (let value of iterable) {
|
|
2897
2893
|
if (typeof replacer === "function")
|
|
2898
2894
|
value = replacer.call(iterable, value, value);
|
|
2899
|
-
|
|
2895
|
+
set.items.push(Pair.createPair(value, null, ctx));
|
|
2900
2896
|
}
|
|
2901
|
-
return
|
|
2897
|
+
return set;
|
|
2902
2898
|
}
|
|
2903
2899
|
}
|
|
2904
2900
|
YAMLSet.tag = "tag:yaml.org,2002:set";
|
|
@@ -2931,7 +2927,7 @@ var require_timestamp = __commonJS(function(exports) {
|
|
|
2931
2927
|
const sign = str[0];
|
|
2932
2928
|
const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
|
|
2933
2929
|
const num = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
2934
|
-
const res = parts.replace(/_/g, "").split(":").reduce((
|
|
2930
|
+
const res = parts.replace(/_/g, "").split(":").reduce((res, p) => res * num(60) + num(p), num(0));
|
|
2935
2931
|
return sign === "-" ? num(-1) * res : res;
|
|
2936
2932
|
}
|
|
2937
2933
|
function stringifySexagesimal(node) {
|
|
@@ -3122,16 +3118,16 @@ var require_tags = __commonJS(function(exports) {
|
|
|
3122
3118
|
}
|
|
3123
3119
|
if (addMergeTag)
|
|
3124
3120
|
tags = tags.concat(merge.merge);
|
|
3125
|
-
return tags.reduce((
|
|
3121
|
+
return tags.reduce((tags, tag) => {
|
|
3126
3122
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
3127
3123
|
if (!tagObj) {
|
|
3128
3124
|
const tagName = JSON.stringify(tag);
|
|
3129
3125
|
const keys = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", ");
|
|
3130
3126
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
|
3131
3127
|
}
|
|
3132
|
-
if (!
|
|
3133
|
-
|
|
3134
|
-
return
|
|
3128
|
+
if (!tags.includes(tagObj))
|
|
3129
|
+
tags.push(tagObj);
|
|
3130
|
+
return tags;
|
|
3135
3131
|
}, []);
|
|
3136
3132
|
}
|
|
3137
3133
|
exports.coreKnownTags = coreKnownTags;
|
|
@@ -3458,8 +3454,8 @@ var require_Document = __commonJS(function(exports) {
|
|
|
3458
3454
|
};
|
|
3459
3455
|
const res = toJS.toJS(this.contents, jsonArg ?? "", ctx);
|
|
3460
3456
|
if (typeof onAnchor === "function")
|
|
3461
|
-
for (const { count, res
|
|
3462
|
-
onAnchor(
|
|
3457
|
+
for (const { count, res } of ctx.anchors.values())
|
|
3458
|
+
onAnchor(res, count);
|
|
3463
3459
|
return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
|
|
3464
3460
|
}
|
|
3465
3461
|
toJSON(jsonArg, onAnchor) {
|
|
@@ -4213,12 +4209,12 @@ var require_resolve_block_scalar = __commonJS(function(exports) {
|
|
|
4213
4209
|
break;
|
|
4214
4210
|
}
|
|
4215
4211
|
if (chompStart === 0) {
|
|
4216
|
-
const
|
|
4212
|
+
const value = header.chomp === "+" && lines.length > 0 ? `
|
|
4217
4213
|
`.repeat(Math.max(1, lines.length - 1)) : "";
|
|
4218
|
-
let
|
|
4214
|
+
let end = start + header.length;
|
|
4219
4215
|
if (scalar.source)
|
|
4220
|
-
|
|
4221
|
-
return { value
|
|
4216
|
+
end += scalar.source.length;
|
|
4217
|
+
return { value, type, comment: header.comment, range: [start, end, end] };
|
|
4222
4218
|
}
|
|
4223
4219
|
let trimIndent = scalar.indent + header.indent;
|
|
4224
4220
|
let offset = scalar.offset + header.length;
|
|
@@ -4667,9 +4663,9 @@ var require_compose_scalar = __commonJS(function(exports) {
|
|
|
4667
4663
|
return schema[identity.SCALAR];
|
|
4668
4664
|
}
|
|
4669
4665
|
function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {
|
|
4670
|
-
const tag = schema.tags.find((
|
|
4666
|
+
const tag = schema.tags.find((tag) => (tag.default === true || atKey && tag.default === "key") && tag.test?.test(value)) || schema[identity.SCALAR];
|
|
4671
4667
|
if (schema.compat) {
|
|
4672
|
-
const compat = schema.compat.find((
|
|
4668
|
+
const compat = schema.compat.find((tag) => tag.default && tag.test?.test(value)) ?? schema[identity.SCALAR];
|
|
4673
4669
|
if (tag.tag !== compat.tag) {
|
|
4674
4670
|
const ts = directives.tagString(tag.tag);
|
|
4675
4671
|
const cs = directives.tagString(compat.tag);
|
|
@@ -5825,18 +5821,18 @@ var require_lexer = __commonJS(function(exports) {
|
|
|
5825
5821
|
let indent = 0;
|
|
5826
5822
|
let ch;
|
|
5827
5823
|
loop:
|
|
5828
|
-
for (let
|
|
5824
|
+
for (let i = this.pos;ch = this.buffer[i]; ++i) {
|
|
5829
5825
|
switch (ch) {
|
|
5830
5826
|
case " ":
|
|
5831
5827
|
indent += 1;
|
|
5832
5828
|
break;
|
|
5833
5829
|
case `
|
|
5834
5830
|
`:
|
|
5835
|
-
nl =
|
|
5831
|
+
nl = i;
|
|
5836
5832
|
indent = 0;
|
|
5837
5833
|
break;
|
|
5838
5834
|
case "\r": {
|
|
5839
|
-
const next = this.buffer[
|
|
5835
|
+
const next = this.buffer[i + 1];
|
|
5840
5836
|
if (!next && !this.atEnd)
|
|
5841
5837
|
return this.setNext("block-scalar");
|
|
5842
5838
|
if (next === `
|
|
@@ -5879,16 +5875,16 @@ var require_lexer = __commonJS(function(exports) {
|
|
|
5879
5875
|
nl = i - 1;
|
|
5880
5876
|
} else if (!this.blockScalarKeep) {
|
|
5881
5877
|
do {
|
|
5882
|
-
let
|
|
5883
|
-
let
|
|
5884
|
-
if (
|
|
5885
|
-
|
|
5886
|
-
const lastChar =
|
|
5887
|
-
while (
|
|
5888
|
-
|
|
5889
|
-
if (
|
|
5890
|
-
` &&
|
|
5891
|
-
nl =
|
|
5878
|
+
let i = nl - 1;
|
|
5879
|
+
let ch = this.buffer[i];
|
|
5880
|
+
if (ch === "\r")
|
|
5881
|
+
ch = this.buffer[--i];
|
|
5882
|
+
const lastChar = i;
|
|
5883
|
+
while (ch === " ")
|
|
5884
|
+
ch = this.buffer[--i];
|
|
5885
|
+
if (ch === `
|
|
5886
|
+
` && i >= this.pos && i + 1 + indent > lastChar)
|
|
5887
|
+
nl = i;
|
|
5892
5888
|
else
|
|
5893
5889
|
break;
|
|
5894
5890
|
} while (true);
|
|
@@ -6575,12 +6571,12 @@ var require_parser = __commonJS(function(exports) {
|
|
|
6575
6571
|
if (includesToken(it.start, "newline")) {
|
|
6576
6572
|
Object.assign(it, { key: null, sep: [this.sourceToken] });
|
|
6577
6573
|
} else {
|
|
6578
|
-
const
|
|
6574
|
+
const start = getFirstKeyStartProps(it.start);
|
|
6579
6575
|
this.stack.push({
|
|
6580
6576
|
type: "block-map",
|
|
6581
6577
|
offset: this.offset,
|
|
6582
6578
|
indent: this.indent,
|
|
6583
|
-
items: [{ start
|
|
6579
|
+
items: [{ start, key: null, sep: [this.sourceToken] }]
|
|
6584
6580
|
});
|
|
6585
6581
|
}
|
|
6586
6582
|
} else if (it.value) {
|
|
@@ -6593,7 +6589,7 @@ var require_parser = __commonJS(function(exports) {
|
|
|
6593
6589
|
items: [{ start, key: null, sep: [this.sourceToken] }]
|
|
6594
6590
|
});
|
|
6595
6591
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
6596
|
-
const
|
|
6592
|
+
const start = getFirstKeyStartProps(it.start);
|
|
6597
6593
|
const key = it.key;
|
|
6598
6594
|
const sep = it.sep;
|
|
6599
6595
|
sep.push(this.sourceToken);
|
|
@@ -6603,7 +6599,7 @@ var require_parser = __commonJS(function(exports) {
|
|
|
6603
6599
|
type: "block-map",
|
|
6604
6600
|
offset: this.offset,
|
|
6605
6601
|
indent: this.indent,
|
|
6606
|
-
items: [{ start
|
|
6602
|
+
items: [{ start, key, sep }]
|
|
6607
6603
|
});
|
|
6608
6604
|
} else if (start.length > 0) {
|
|
6609
6605
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -6947,22 +6943,22 @@ var require_public_api = __commonJS(function(exports) {
|
|
|
6947
6943
|
return { lineCounter: lineCounter$1, prettyErrors };
|
|
6948
6944
|
}
|
|
6949
6945
|
function parseAllDocuments(source, options = {}) {
|
|
6950
|
-
const { lineCounter
|
|
6951
|
-
const parser$1 = new parser.Parser(
|
|
6946
|
+
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
6947
|
+
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
6952
6948
|
const composer$1 = new composer.Composer(options);
|
|
6953
6949
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
|
6954
|
-
if (prettyErrors &&
|
|
6950
|
+
if (prettyErrors && lineCounter)
|
|
6955
6951
|
for (const doc of docs) {
|
|
6956
|
-
doc.errors.forEach(errors.prettifyError(source,
|
|
6957
|
-
doc.warnings.forEach(errors.prettifyError(source,
|
|
6952
|
+
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
6953
|
+
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
6958
6954
|
}
|
|
6959
6955
|
if (docs.length > 0)
|
|
6960
6956
|
return docs;
|
|
6961
6957
|
return Object.assign([], { empty: true }, composer$1.streamInfo());
|
|
6962
6958
|
}
|
|
6963
6959
|
function parseDocument(source, options = {}) {
|
|
6964
|
-
const { lineCounter
|
|
6965
|
-
const parser$1 = new parser.Parser(
|
|
6960
|
+
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
6961
|
+
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
6966
6962
|
const composer$1 = new composer.Composer(options);
|
|
6967
6963
|
let doc = null;
|
|
6968
6964
|
for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {
|
|
@@ -6973,9 +6969,9 @@ var require_public_api = __commonJS(function(exports) {
|
|
|
6973
6969
|
break;
|
|
6974
6970
|
}
|
|
6975
6971
|
}
|
|
6976
|
-
if (prettyErrors &&
|
|
6977
|
-
doc.errors.forEach(errors.prettifyError(source,
|
|
6978
|
-
doc.warnings.forEach(errors.prettifyError(source,
|
|
6972
|
+
if (prettyErrors && lineCounter) {
|
|
6973
|
+
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
6974
|
+
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
6979
6975
|
}
|
|
6980
6976
|
return doc;
|
|
6981
6977
|
}
|
|
@@ -7073,6 +7069,8 @@ var $visit = visit.visit;
|
|
|
7073
7069
|
var $visitAsync = visit.visitAsync;
|
|
7074
7070
|
|
|
7075
7071
|
// src/services/deploy-run-service.ts
|
|
7072
|
+
var DEFAULT_TIMEOUT_SECONDS = 360;
|
|
7073
|
+
var DEFAULT_POLL_INTERVAL_MS = 5000;
|
|
7076
7074
|
var PROCESS_RESOURCE_MAPPING_ERROR = /(?:AgentProcessResource|FlowProcessResource)\s*->\s*ReleaseDto/;
|
|
7077
7075
|
var PROCESS_KEY_MAPPING_ERROR = /Destination Member:\s*ProcessKey|Invalid argument 'Key'/;
|
|
7078
7076
|
function buildDeploymentFailureInstructions(instructions, pipelineDeploymentId) {
|
|
@@ -7127,12 +7125,12 @@ var failPermanentDeletion = (refusal, pipelineDeploymentId, deploymentKey) => fa
|
|
|
7127
7125
|
});
|
|
7128
7126
|
async function readInstalledFolderAsync(auth, deploymentName, deploymentKey, scope) {
|
|
7129
7127
|
if (deploymentKey) {
|
|
7130
|
-
const [, info] = await catchError(
|
|
7128
|
+
const [, info] = await catchError(readDeploymentByKeyAsync2(auth, deploymentKey, { scope }));
|
|
7131
7129
|
if (info?.deploymentKey === deploymentKey && info.installedRootFolderKey) {
|
|
7132
7130
|
return { installedRootFolderKey: info.installedRootFolderKey };
|
|
7133
7131
|
}
|
|
7134
7132
|
}
|
|
7135
|
-
return
|
|
7133
|
+
return findDeploymentBestEffort2(auth, deploymentName, scope, {
|
|
7136
7134
|
deploymentKey
|
|
7137
7135
|
});
|
|
7138
7136
|
}
|
|
@@ -7146,8 +7144,8 @@ function makeFolderKeyResolver(options) {
|
|
|
7146
7144
|
return folder ? { name: folder.displayName, path: folder.path } : undefined;
|
|
7147
7145
|
};
|
|
7148
7146
|
}
|
|
7149
|
-
async function
|
|
7150
|
-
const [authError, auth] = await catchError(
|
|
7147
|
+
async function deployRunAsync2(options) {
|
|
7148
|
+
const [authError, auth] = await catchError(getSolutionAuthContext2({
|
|
7151
7149
|
tenant: options.tenant,
|
|
7152
7150
|
loginValidity: options.loginValidity,
|
|
7153
7151
|
envFilePath: options.envFilePath
|
|
@@ -7163,7 +7161,7 @@ async function deployRunAsync(options) {
|
|
|
7163
7161
|
return refusal;
|
|
7164
7162
|
}
|
|
7165
7163
|
}
|
|
7166
|
-
const [scopeError,
|
|
7164
|
+
const [scopeError, scope] = await catchError(resolveFeedScope2({
|
|
7167
7165
|
personalWorkspace: options.personalWorkspace,
|
|
7168
7166
|
feed: options.feed,
|
|
7169
7167
|
tenant: options.tenant,
|
|
@@ -7171,11 +7169,12 @@ async function deployRunAsync(options) {
|
|
|
7171
7169
|
envFilePath: options.envFilePath
|
|
7172
7170
|
}));
|
|
7173
7171
|
if (scopeError) {
|
|
7174
|
-
|
|
7172
|
+
const failure = await describeFeedResolutionFailureAsync2(scopeError, options, auth);
|
|
7173
|
+
return fail(options.feed !== undefined ? "feed_resolution_failed" : "personal_workspace_deploy_failed", failure.message, failure.instructions, { errorCode: failure.errorCode, retry: failure.retry });
|
|
7175
7174
|
}
|
|
7176
|
-
feedScope =
|
|
7175
|
+
feedScope = scope;
|
|
7177
7176
|
if (feedScope.kind !== "tenant") {
|
|
7178
|
-
const refusal =
|
|
7177
|
+
const refusal = await refuseFeedForSessionAsync(auth, feedScope, `Deploying into the feed '${feedScope.name ?? feedScope.folderKey}'`);
|
|
7179
7178
|
if (refusal) {
|
|
7180
7179
|
return refusal;
|
|
7181
7180
|
}
|
|
@@ -7188,6 +7187,10 @@ async function deployRunAsync(options) {
|
|
|
7188
7187
|
let parentFolderPath;
|
|
7189
7188
|
if (feedScope.kind !== "tenant") {
|
|
7190
7189
|
const [locationError, location] = await catchError(resolveFeedDeployLocation(feedScope, options));
|
|
7190
|
+
if (locationError instanceof FeedFolderLookupError) {
|
|
7191
|
+
const { errorCode, retry } = await extractErrorDetails(locationError.lookupFailure.cause ?? locationError.lookupFailure);
|
|
7192
|
+
return fail("feed_resolution_failed", locationError.message, FEED_FOLDER_LOOKUP_INSTRUCTIONS, { errorCode, retry });
|
|
7193
|
+
}
|
|
7191
7194
|
if (locationError) {
|
|
7192
7195
|
return fail("location_outside_feed", locationError.message, "Pass a --parent-folder-path / --parent-folder-key inside the feed folder, or omit it to deploy into the feed folder itself.");
|
|
7193
7196
|
}
|
|
@@ -7206,14 +7209,14 @@ async function deployRunAsync(options) {
|
|
|
7206
7209
|
}
|
|
7207
7210
|
parentFolderPath = resolved;
|
|
7208
7211
|
}
|
|
7209
|
-
const scope =
|
|
7212
|
+
const scope = feedScopeInitOverride2(feedScope);
|
|
7210
7213
|
const feedFields = feedScope.kind === "tenant" ? { feedKind: feedScope.kind } : {
|
|
7211
7214
|
feedKind: feedScope.kind,
|
|
7212
7215
|
deploymentName: options.deploymentName,
|
|
7213
7216
|
packageName: options.packageName,
|
|
7214
7217
|
packageVersion: options.packageVersion
|
|
7215
7218
|
};
|
|
7216
|
-
const configuration = new
|
|
7219
|
+
const configuration = new Configuration2({
|
|
7217
7220
|
basePath: auth.basePath,
|
|
7218
7221
|
accessToken: auth.accessToken
|
|
7219
7222
|
});
|
|
@@ -7235,9 +7238,7 @@ async function deployRunAsync(options) {
|
|
|
7235
7238
|
}
|
|
7236
7239
|
configBody = parsed;
|
|
7237
7240
|
}
|
|
7238
|
-
const
|
|
7239
|
-
let deadline;
|
|
7240
|
-
const installAndPollAsync = async () => {
|
|
7241
|
+
const installAsync = async () => {
|
|
7241
7242
|
const [installError, installResult] = await catchError(api.pipelinesInstall({
|
|
7242
7243
|
deploymentName: options.deploymentName,
|
|
7243
7244
|
packageName: options.packageName,
|
|
@@ -7256,62 +7257,43 @@ async function deployRunAsync(options) {
|
|
|
7256
7257
|
}
|
|
7257
7258
|
return fail(installFailureReason(feedScope), detail.message, `${installFailureHint(feedScope, options)} Details: ${detail.details}`, { errorCode: detail.errorCode, retry: detail.retry });
|
|
7258
7259
|
}
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
deploymentName: options.deploymentName,
|
|
7264
|
-
scope,
|
|
7265
|
-
timeoutMs: remainingTimeoutMs(timeoutMs, deadline),
|
|
7266
|
-
intervalMs: options.pollInterval ?? 5000,
|
|
7267
|
-
signal: options.signal,
|
|
7268
|
-
logPrefix: "deploy"
|
|
7269
|
-
});
|
|
7270
|
-
return { ok: true, pipelineDeploymentId: pipelineDeploymentId2, pollResult: pollResult2 };
|
|
7260
|
+
return {
|
|
7261
|
+
ok: true,
|
|
7262
|
+
pipelineDeploymentId: installResult.pipelineDeploymentId
|
|
7263
|
+
};
|
|
7271
7264
|
};
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
acknowledge: options.acknowledgePermanentDeletion === true,
|
|
7286
|
-
status: refused,
|
|
7265
|
+
const keepCopiesHint = "remove those links from the --config-file (uip solution deploy config unlink <file> <resource>) and re-run";
|
|
7266
|
+
const run = await runInstallToOutcomeAsync({
|
|
7267
|
+
api,
|
|
7268
|
+
auth,
|
|
7269
|
+
deploymentName: options.deploymentName,
|
|
7270
|
+
scope,
|
|
7271
|
+
signal: options.signal,
|
|
7272
|
+
timeoutSeconds: finiteOr(options.timeout, DEFAULT_TIMEOUT_SECONDS),
|
|
7273
|
+
pollIntervalMs: finiteOr(options.pollInterval, DEFAULT_POLL_INTERVAL_MS),
|
|
7274
|
+
logPrefix: "deploy",
|
|
7275
|
+
acknowledge: options.acknowledgePermanentDeletion === true,
|
|
7276
|
+
install: installAsync,
|
|
7277
|
+
consentWording: () => ({
|
|
7287
7278
|
verb: "Deploying",
|
|
7288
7279
|
confirmHint: `re-run the same command with ${ACKNOWLEDGE_PERMANENT_DELETION_FLAG}`,
|
|
7289
7280
|
keepCopiesHint
|
|
7290
|
-
})
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
...attempt,
|
|
7298
|
-
instructions: `${attempt.instructions} ${acknowledgedButNotRunHint(consent.resources, keepCopiesHint)}`
|
|
7299
|
-
};
|
|
7300
|
-
}
|
|
7301
|
-
if (attempt.pollResult.outcome === PollOutcome.Completed && isPermanentDeletionRefusal(attempt.pollResult.data)) {
|
|
7302
|
-
const deploymentKey = attempt.pollResult.data?.deploymentKey || undefined;
|
|
7303
|
-
return failPermanentDeletion(stillRequiresConfirmation(options.deploymentName, consent.resources, deploymentKey), attempt.pipelineDeploymentId, deploymentKey);
|
|
7304
|
-
}
|
|
7305
|
-
permanentlyDeletedResources = consent.resources.map((resource) => formatPermanentDeletionResources([resource]));
|
|
7281
|
+
})
|
|
7282
|
+
});
|
|
7283
|
+
if (run.kind === "install_refused") {
|
|
7284
|
+
return run.failure;
|
|
7285
|
+
}
|
|
7286
|
+
if (run.kind === "consent_refused") {
|
|
7287
|
+
return failPermanentDeletion(run.refusal, run.pipelineDeploymentId, run.deploymentKey);
|
|
7306
7288
|
}
|
|
7307
|
-
const { pipelineDeploymentId, pollResult } =
|
|
7289
|
+
const { pipelineDeploymentId, pollResult, permanentlyDeletedResources } = run;
|
|
7308
7290
|
const folderPath = parentFolderPath ? `${parentFolderPath}/${options.folderName}` : options.folderName;
|
|
7309
7291
|
if (pollResult.outcome !== PollOutcome.Completed || !pollResult.data) {
|
|
7310
7292
|
const recoveryKey = pollResult.data?.deploymentKey || undefined;
|
|
7311
|
-
const recoveryDeployment = recoveryKey ? await
|
|
7312
|
-
const recovery =
|
|
7293
|
+
const recoveryDeployment = recoveryKey ? await findDeploymentBestEffort2(auth, options.deploymentName, scope, { deploymentKey: recoveryKey }) : undefined;
|
|
7294
|
+
const recovery = interpretFailedDeployPoll2(recoveryDeployment);
|
|
7313
7295
|
const recoveredSuccess = async () => {
|
|
7314
|
-
const
|
|
7296
|
+
const resolvedFolder = await resolveInstalledFolder2(recoveryDeployment, {
|
|
7315
7297
|
folderName: options.folderName,
|
|
7316
7298
|
folderPath,
|
|
7317
7299
|
parentFolderPath
|
|
@@ -7326,9 +7308,9 @@ async function deployRunAsync(options) {
|
|
|
7326
7308
|
deploymentKey: recoveryDeployment?.key,
|
|
7327
7309
|
pipelineDeploymentId,
|
|
7328
7310
|
instanceId: recoveryDeployment?.instanceId == null ? undefined : recoveryDeployment.instanceId,
|
|
7329
|
-
folderName:
|
|
7330
|
-
folderPath:
|
|
7331
|
-
...
|
|
7311
|
+
folderName: resolvedFolder.folderName,
|
|
7312
|
+
folderPath: resolvedFolder.folderPath,
|
|
7313
|
+
...resolvedFolder.requestedMatched ? {} : { requestedFolderName: options.folderName }
|
|
7332
7314
|
};
|
|
7333
7315
|
};
|
|
7334
7316
|
if (recovery?.kind === "Active") {
|
|
@@ -7344,11 +7326,11 @@ async function deployRunAsync(options) {
|
|
|
7344
7326
|
};
|
|
7345
7327
|
}
|
|
7346
7328
|
if (recovery?.kind === "ActivationFailed") {
|
|
7347
|
-
return fail("activation_failed_post_deploy", `Deployment '${options.deploymentName}' completed but activation failed.`, `Inspect activation details in Orchestrator, then retry with: uip solution deploy activate ${options.deploymentName}${
|
|
7329
|
+
return fail("activation_failed_post_deploy", `Deployment '${options.deploymentName}' completed but activation failed.`, `Inspect activation details in Orchestrator, then retry with: uip solution deploy activate ${options.deploymentName}${feedSelectorFlag2(feedScope)}.`, { pipelineDeploymentId });
|
|
7348
7330
|
}
|
|
7349
7331
|
if (recovery?.kind === "DeployFailed") {
|
|
7350
|
-
const
|
|
7351
|
-
return fail("deploy_failed", `Deployment '${options.deploymentName}' failed (OperationStatus: ${recovery.operationStatus}): ${
|
|
7332
|
+
const reason = recoveryDeployment ? await describeDeploymentFailureAsync(auth, recoveryDeployment, SolutionDeploymentAction2.Install, scope, options.signal) : NO_SERVER_REASON;
|
|
7333
|
+
return fail("deploy_failed", `Deployment '${options.deploymentName}' failed (OperationStatus: ${recovery.operationStatus}): ${reason}`, `${inspectHint(pipelineDeploymentId, feedScope)} Fix the underlying issue and retry: uip solution deploy run.`, { pipelineDeploymentId });
|
|
7352
7334
|
}
|
|
7353
7335
|
const { reason, message, exitCode, errorCode, retry } = mapPollFailure(pollResult, "Deployment");
|
|
7354
7336
|
return fail(reason, message, `Deployment may still be in progress. ${followHint(pipelineDeploymentId, feedScope)}`, { exitCode, pipelineDeploymentId, errorCode, retry });
|
|
@@ -7369,7 +7351,7 @@ async function deployRunAsync(options) {
|
|
|
7369
7351
|
Nothing was installed. The rejected attempt is kept as a pending draft${finalStatus.deploymentKey ? ` (${finalStatus.deploymentKey})` : ""}: fix the configuration and re-run this command, and the server re-validates that draft with the new file (settings and resource links the file does not name keep the values the draft was rejected with).${finalStatus.deploymentKey ? ` When this was an update of an existing deployment, you can discard the draft and upgrade the live version instead: uip solution deploy upgrade ${finalStatus.deploymentKey} --discard-draft --version ${options.packageVersion}` : ""}` : "";
|
|
7370
7352
|
return fail("deploy_failed", `Deployment failed with status: ${finalStatus.status}`, `${buildDeploymentFailureInstructions(details, pipelineDeploymentId)}${draftNote}`, { pipelineDeploymentId, ...classification });
|
|
7371
7353
|
}
|
|
7372
|
-
const resolvedFolder = await
|
|
7354
|
+
const resolvedFolder = await resolveInstalledFolder2(await readInstalledFolderAsync(auth, options.deploymentName, finalStatus.deploymentKey || undefined, scope), {
|
|
7373
7355
|
folderName: options.folderName,
|
|
7374
7356
|
folderPath,
|
|
7375
7357
|
parentFolderPath
|
|
@@ -7420,9 +7402,9 @@ Nothing was installed. The rejected attempt is kept as a pending draft${finalSta
|
|
|
7420
7402
|
...await describeInstalledNotLiveAsync(auth, refused, scope, feedScope)
|
|
7421
7403
|
};
|
|
7422
7404
|
}
|
|
7423
|
-
const fallback = activationResult.phase === "preActivateSteps" ? `Deployment '${options.deploymentName}' was deployed successfully but pre-activate steps lookup failed. Retry activation with: uip solution deploy activate ${options.deploymentName}${
|
|
7405
|
+
const fallback = activationResult.phase === "preActivateSteps" ? `Deployment '${options.deploymentName}' was deployed successfully but pre-activate steps lookup failed. Retry activation with: uip solution deploy activate ${options.deploymentName}${feedSelectorFlag2(feedScope)}. Details: ${activationResult.details}` : `Deployment '${options.deploymentName}' was deployed successfully but activation failed. Retry activation with: uip solution deploy activate ${options.deploymentName}${feedSelectorFlag2(feedScope)}. Details: ${activationResult.details}`;
|
|
7424
7406
|
const pendingResources = refused && needsPendingResources(refused) ? await readPendingResourcesAsync(pendingResourceApis(auth), refused, scope) : undefined;
|
|
7425
|
-
return fail("activation_request_failed", activationResult.message, appendDeploymentStateInstructions(fallback, refused, pendingResources,
|
|
7407
|
+
return fail("activation_request_failed", activationResult.message, appendDeploymentStateInstructions(fallback, refused, pendingResources, feedSelectorFlag2(feedScope)), { pipelineDeploymentId, permanentlyDeletedResources });
|
|
7426
7408
|
}
|
|
7427
7409
|
if (activationResult.kind === "PollFailed") {
|
|
7428
7410
|
const { message, exitCode, errorCode, retry } = mapPollFailure(activationResult.poll, "Activation");
|
|
@@ -7446,7 +7428,7 @@ async function describeInstalledRunAsync(auth, deploymentName, finalStatus, scop
|
|
|
7446
7428
|
const key = finalStatus.deploymentKey || undefined;
|
|
7447
7429
|
const record = finalStatus.deploymentResult;
|
|
7448
7430
|
const reported = reportedActivationStatus(record);
|
|
7449
|
-
const row = key && !reported ? await
|
|
7431
|
+
const row = key && !reported ? await findDeploymentBestEffort2(auth, deploymentName, scope, {
|
|
7450
7432
|
deploymentKey: key
|
|
7451
7433
|
}) : undefined;
|
|
7452
7434
|
if (row) {
|
|
@@ -7469,7 +7451,7 @@ async function describeInstalledRunAsync(auth, deploymentName, finalStatus, scop
|
|
|
7469
7451
|
}
|
|
7470
7452
|
async function describeInstalledNotLiveAsync(auth, deployment, scope, feedScope) {
|
|
7471
7453
|
const pendingResources = needsPendingResources(deployment) && deployment.key ? await readPendingResourcesAsync(pendingResourceApis(auth), { name: deployment.name, key: deployment.key }, scope) : undefined;
|
|
7472
|
-
const nextSteps = deploymentNextSteps(deployment, pendingResources,
|
|
7454
|
+
const nextSteps = deploymentNextSteps(deployment, pendingResources, feedSelectorFlag2(feedScope));
|
|
7473
7455
|
return {
|
|
7474
7456
|
activationStatus: deployment.activationStatus ?? "Inactive",
|
|
7475
7457
|
...pendingResources ? { pendingResources } : {},
|
|
@@ -7498,29 +7480,36 @@ function listCommand(scope) {
|
|
|
7498
7480
|
return "uip solution deploy list";
|
|
7499
7481
|
}
|
|
7500
7482
|
function adviseForApplication(auth, failure) {
|
|
7501
|
-
if (!failure ||
|
|
7483
|
+
if (!failure || classifyFeedSession2(auth) !== "application") {
|
|
7502
7484
|
return failure;
|
|
7503
7485
|
}
|
|
7504
7486
|
logger.warn(`${failure.message} Deploying anyway: under an external app (client-credentials) login this check only warns, so a pipeline keeps the outcome it had before the check could run. ${failure.instructions}`);
|
|
7505
7487
|
return;
|
|
7506
7488
|
}
|
|
7507
7489
|
function refuseFeedForSession(session, action) {
|
|
7508
|
-
const verdict =
|
|
7490
|
+
const verdict = classifyFeedSession2(session);
|
|
7509
7491
|
if (verdict === "user") {
|
|
7510
7492
|
return;
|
|
7511
7493
|
}
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7494
|
+
return feedRefusalFailure(feedSessionRefusal2(verdict, action, FEED_REFUSAL_ALTERNATIVE));
|
|
7495
|
+
}
|
|
7496
|
+
async function refuseFeedForSessionAsync(session, scope, action) {
|
|
7497
|
+
if (!scope.folderKey) {
|
|
7498
|
+
return refuseFeedForSession(session, action);
|
|
7499
|
+
}
|
|
7500
|
+
const refusal = await feedSessionRefusalAsync2(session, scope.folderKey, "write", action, FEED_REFUSAL_ALTERNATIVE);
|
|
7501
|
+
return refusal ? feedRefusalFailure(refusal) : undefined;
|
|
7502
|
+
}
|
|
7503
|
+
var FEED_REFUSAL_ALTERNATIVE = "deploy the package to the tenant feed";
|
|
7504
|
+
function feedRefusalFailure(refusal) {
|
|
7505
|
+
return fail("feed_requires_user_session", refusal.message, refusal.instructions, { errorCode: "permission_denied", retry: "RetryWillNotFix" });
|
|
7517
7506
|
}
|
|
7518
7507
|
async function describeSynthesizedFailureAsync(auth, deploymentKey, scope, signal, fromPipeline) {
|
|
7519
|
-
const deploymentsApi = new
|
|
7508
|
+
const deploymentsApi = new DeploymentsApi2(new Configuration3({
|
|
7520
7509
|
basePath: auth.basePath,
|
|
7521
7510
|
accessToken: auth.accessToken
|
|
7522
7511
|
}));
|
|
7523
|
-
const reason = await describeValidationFailureAsync(deploymentsApi, deploymentKey,
|
|
7512
|
+
const reason = await describeValidationFailureAsync(deploymentsApi, deploymentKey, SolutionDeploymentAction2.Install, scope, signal);
|
|
7524
7513
|
return reason === NO_SERVER_REASON ? fromPipeline : `Validation: ${reason}
|
|
7525
7514
|
${fromPipeline}`;
|
|
7526
7515
|
}
|
|
@@ -7560,7 +7549,7 @@ function scopeLabel(scope) {
|
|
|
7560
7549
|
return "this tenant";
|
|
7561
7550
|
}
|
|
7562
7551
|
function buildDeploymentExistsMessage(packageName, scope, existing, folderByKey) {
|
|
7563
|
-
return `Package '${packageName}' is already deployed in ${scopeLabel(scope)}. ` + "Running deploy again creates a second, separate deployment — it does not update the one that is already there. " + `Existing: ${
|
|
7552
|
+
return `Package '${packageName}' is already deployed in ${scopeLabel(scope)}. ` + "Running deploy again creates a second, separate deployment — it does not update the one that is already there. " + `Existing: ${formatExistingDeployments2(existing, folderByKey)}.`;
|
|
7564
7553
|
}
|
|
7565
7554
|
function buildDeploymentExistsInstructions(options) {
|
|
7566
7555
|
const { packageName, scope, existing, requestedDeploymentName } = options;
|
|
@@ -7574,22 +7563,22 @@ function buildDeploymentExistsInstructions(options) {
|
|
|
7574
7563
|
} else {
|
|
7575
7564
|
parts.push(first?.key ? `To update the existing deployment instead, upgrade it in place — running deploy again does not upgrade it: uip solution deploy upgrade ${first.key}.` : "To update the existing deployment instead, upgrade it in place with 'uip solution deploy upgrade <deployment-key>' — running deploy again does not upgrade it.");
|
|
7576
7565
|
if (first?.name) {
|
|
7577
|
-
parts.push(`To remove it first, run: uip solution deploy uninstall '${first.name}'${
|
|
7566
|
+
parts.push(`To remove it first, run: uip solution deploy uninstall '${first.name}'${feedSelectorFlag2(scope)} --yes.`);
|
|
7578
7567
|
}
|
|
7579
7568
|
}
|
|
7580
|
-
parts.push(`To see every deployment and its state, run: uip solution deploy list${
|
|
7569
|
+
parts.push(`To see every deployment and its state, run: uip solution deploy list${feedSelectorFlag2(scope)}.`);
|
|
7581
7570
|
parts.push(scope.kind === "tenant" ? "To create a second, separate deployment anyway, re-run this command with --yes and a different --name: re-using an existing deployment's name updates that deployment in place instead." : "To create a second, separate deployment anyway, re-run with --yes and a different --name (re-using an existing deployment's name updates that deployment in place) — Orchestrator may still refuse it while the existing deployment is running or in a failed state.");
|
|
7582
7571
|
if (existing.length === 0) {
|
|
7583
7572
|
parts.unshift(`A deployment of '${packageName}' already exists in ${scopeLabel(scope)}.`);
|
|
7584
7573
|
} else if (options.includeInventory) {
|
|
7585
|
-
parts.unshift(`Existing: ${
|
|
7574
|
+
parts.unshift(`Existing: ${formatExistingDeployments2(existing)}.`);
|
|
7586
7575
|
}
|
|
7587
7576
|
return parts.join(" ");
|
|
7588
7577
|
}
|
|
7589
7578
|
async function resolveDeploymentFolders(deployments, options) {
|
|
7590
7579
|
const resolveByKey = makeFolderKeyResolver(options);
|
|
7591
7580
|
const keys = [
|
|
7592
|
-
...new Set(deployments.slice(0,
|
|
7581
|
+
...new Set(deployments.slice(0, MAX_LISTED_DEPLOYMENTS2).map((deployment) => deployment.installedRootFolderKey).filter((key) => Boolean(key)))
|
|
7593
7582
|
];
|
|
7594
7583
|
const resolved = new Map;
|
|
7595
7584
|
await Promise.all(keys.map(async (key) => {
|
|
@@ -7602,15 +7591,15 @@ async function resolveDeploymentFolders(deployments, options) {
|
|
|
7602
7591
|
return resolved;
|
|
7603
7592
|
}
|
|
7604
7593
|
async function guardPendingDraft(auth, options, scope) {
|
|
7605
|
-
const [lookupError, rows] = await catchError(
|
|
7606
|
-
if (lookupError instanceof DeploymentSearchNeedsUserSessionError || lookupError &&
|
|
7594
|
+
const [lookupError, rows] = await catchError(findDeploymentsByName2(auth, options.deploymentName, feedScopeInitOverride2(scope)));
|
|
7595
|
+
if (lookupError instanceof DeploymentSearchNeedsUserSessionError || lookupError && classifyFeedSession2(auth) === "application" && isAuthRefusal(lookupError)) {
|
|
7607
7596
|
return;
|
|
7608
7597
|
}
|
|
7609
7598
|
if (lookupError) {
|
|
7610
7599
|
logger.warn(`Skipped the pending-draft check for '${options.deploymentName}': the deployment lookup failed (${lookupError.message}). Deploying anyway — if this deployment has a pending draft for another version, the server may install that draft's version instead of ${options.packageVersion}. Check it with 'uip solution deploy list'.`);
|
|
7611
7600
|
return;
|
|
7612
7601
|
}
|
|
7613
|
-
const draft =
|
|
7602
|
+
const draft = newestDeploymentRow2(rows);
|
|
7614
7603
|
if (draft?.operationStatus !== "Draft") {
|
|
7615
7604
|
return;
|
|
7616
7605
|
}
|
|
@@ -7630,19 +7619,23 @@ async function guardExistingDeployment(auth, options, scope) {
|
|
|
7630
7619
|
if (options.yes) {
|
|
7631
7620
|
return;
|
|
7632
7621
|
}
|
|
7633
|
-
const [lookupError, deployments] = await catchError(
|
|
7634
|
-
scope:
|
|
7622
|
+
const [lookupError, deployments] = await catchError(findDeploymentsByPackageName2(auth, options.packageName, {
|
|
7623
|
+
scope: feedScopeInitOverride2(scope)
|
|
7635
7624
|
}));
|
|
7636
7625
|
if (lookupError instanceof DeploymentSearchNeedsUserSessionError) {
|
|
7637
7626
|
logger.warn(`Skipped the already-deployed check for '${options.packageName}': this server's deployment search reads user sessions only, and this is an application (client-credentials) login. Deploying anyway — if a deployment already exists this creates a second one in its own folder. Check what is already deployed in the Orchestrator Solutions UI, or sign in with 'uip login' and re-run.`);
|
|
7638
7627
|
return;
|
|
7639
7628
|
}
|
|
7640
|
-
if (lookupError) {
|
|
7629
|
+
if (lookupError && !(lookupError instanceof DeploymentSearchCapError2)) {
|
|
7641
7630
|
logger.warn(`Skipped the already-deployed check for '${options.packageName}': the deployment lookup failed (${lookupError.message}). Deploying anyway — if a deployment already exists this creates a second one in its own folder. 'uip solution deploy list' reads the same search, so it may fail the same way. Check what is already deployed in the Orchestrator Solutions UI, or re-run once the lookup answers.`);
|
|
7642
7631
|
return;
|
|
7643
7632
|
}
|
|
7644
|
-
const
|
|
7633
|
+
const capped = lookupError;
|
|
7634
|
+
const existing = (capped ? capped.partialRows : deployments).filter(blocksRedeploy2);
|
|
7645
7635
|
if (existing.length === 0) {
|
|
7636
|
+
if (capped) {
|
|
7637
|
+
logger.warn(`Skipped the rest of the already-deployed check for '${options.packageName}': ${capped.message} The package's deployment history is too long to read in full, and none of the ${capped.partialRows.length} matching rows read blocks a redeploy. Deploying anyway — if a deployment past those rows exists this creates a second one in its own folder, and a re-run reads the same rows. Check what is already deployed in the Orchestrator Solutions UI.`);
|
|
7638
|
+
}
|
|
7646
7639
|
return;
|
|
7647
7640
|
}
|
|
7648
7641
|
return fail("deployment_exists", buildDeploymentExistsMessage(options.packageName, scope, existing, await resolveDeploymentFolders(existing, options)), buildDeploymentExistsInstructions({
|
|
@@ -7652,11 +7645,36 @@ async function guardExistingDeployment(auth, options, scope) {
|
|
|
7652
7645
|
requestedDeploymentName: options.deploymentName
|
|
7653
7646
|
}));
|
|
7654
7647
|
}
|
|
7648
|
+
var FEED_FOLDER_LOOKUP_INSTRUCTIONS = "The install needs the feed folder's path, which the CLI reads from Orchestrator Folders when --feed names the feed by key alone; under an external app that lookup needs the OR.Folders scope. Give the application OR.Folders, or the Studio Web (StudioWebS2S) grants so the feed listing can name the feed instead, or run the deploy with a user session ('uip login'). To deploy to the tenant feed, omit --feed.";
|
|
7649
|
+
|
|
7650
|
+
class FeedFolderLookupError extends Error {
|
|
7651
|
+
lookupFailure;
|
|
7652
|
+
constructor(folderKey, lookupFailure) {
|
|
7653
|
+
super(`The feed folder '${folderKey}' could not be read from Orchestrator: ${lookupFailure.message}`);
|
|
7654
|
+
this.lookupFailure = lookupFailure;
|
|
7655
|
+
this.name = "FeedFolderLookupError";
|
|
7656
|
+
}
|
|
7657
|
+
}
|
|
7655
7658
|
async function resolveFeedDeployLocation(scope, options) {
|
|
7656
7659
|
const feedFolder = {
|
|
7657
7660
|
folderKey: scope.folderKey,
|
|
7658
7661
|
folderFQN: scope.name ?? ""
|
|
7659
7662
|
};
|
|
7663
|
+
if (scope.kind === "folder" && !scope.name) {
|
|
7664
|
+
const [lookupError, feedInfo] = await catchError(resolveFolderInfo({
|
|
7665
|
+
folderKey: feedFolder.folderKey,
|
|
7666
|
+
tenant: options.tenant,
|
|
7667
|
+
loginValidity: options.loginValidity,
|
|
7668
|
+
envFilePath: options.envFilePath
|
|
7669
|
+
}));
|
|
7670
|
+
if (lookupError) {
|
|
7671
|
+
throw new FeedFolderLookupError(feedFolder.folderKey, lookupError);
|
|
7672
|
+
}
|
|
7673
|
+
if (!feedInfo) {
|
|
7674
|
+
throw new FeedFolderLookupError(feedFolder.folderKey, new Error("the folder was not found"));
|
|
7675
|
+
}
|
|
7676
|
+
feedFolder.folderFQN = feedInfo.path;
|
|
7677
|
+
}
|
|
7660
7678
|
if (scope.kind === "personal" || !options.parentFolderPath && !options.parentFolderKey) {
|
|
7661
7679
|
return feedFolder;
|
|
7662
7680
|
}
|
|
@@ -7677,6 +7695,6 @@ async function resolveFeedDeployLocation(scope, options) {
|
|
|
7677
7695
|
return { folderKey: resolved.key, folderFQN: resolved.path };
|
|
7678
7696
|
}
|
|
7679
7697
|
|
|
7680
|
-
export {
|
|
7698
|
+
export { deployRunAsync2 };
|
|
7681
7699
|
|
|
7682
|
-
//# debugId=
|
|
7700
|
+
//# debugId=282AD84DE4BE580E64756E2164756E21
|