@uipath/solution-tool 1.205.0-preview.281 → 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/{archive-extract-x35t9ktj.js → archive-extract-136rn3ja.js} +13 -15
- package/dist/{cleanup-command-service-je9d70vv.js → cleanup-command-service-kadmvyk4.js} +34 -31
- package/dist/deploy-delete-service-xa25k94p.js +23 -0
- package/dist/deploy-run-service-rsedb9hr.js +23 -0
- package/dist/{deploy-status-service-919yn8wn.js → deploy-status-service-nmm8k9fa.js} +72 -62
- package/dist/deploy.js +35 -37
- package/dist/deployment-search-wtbye8v6.js +54 -0
- package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/feed-resolver-28pfxmky.js +27 -0
- package/dist/feed-scope-failure-d4avsc7j.js +20 -0
- package/dist/feed-session-4skrr620.js +23 -0
- package/dist/first-party-service-n3vva2m4.js +8 -0
- package/dist/governance-options-bevmhh1z.js +19 -0
- package/dist/index-aspmac9f.js +24 -0
- package/dist/index-md8d2ttf.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-pnggwekk.js} +23 -23
- package/dist/models/pack-command-types.d.ts +3 -1
- package/dist/node-z9c03k2q.js +25 -0
- package/dist/pack-command-service-2txx876d.js +29 -0
- package/dist/{pack-project-ha0pxw3h.js → pack-project-ngwtfgge.js} +33 -40
- package/dist/pack.js +26 -30
- package/dist/package-id-350pep6r.js +11 -0
- package/dist/{packager-tool-5qzgdb66.js → packager-tool-0k205evy.js} +13 -15
- package/dist/{packager-tool-wm0jaz7p.js → packager-tool-0vz19vhv.js} +305 -657
- package/dist/{packager-tool-gs3f3tf7.js → packager-tool-1ctvbx0h.js} +1 -1
- package/dist/{packager-tool-h1tq7bqf.js → packager-tool-41a5axkd.js} +65 -35
- package/dist/packager-tool-8097ps72.js +2307 -0
- package/dist/{packager-tool-1ybnxbp9.js → packager-tool-85f75be3.js} +18 -18
- package/dist/{packager-tool-tx834spe.js → packager-tool-9vrwpgt3.js} +757 -309
- 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-c64hqa8n.js +106 -0
- package/dist/{packager-tool-5ddtwzva.js → packager-tool-ca5ngmqv.js} +12 -12
- package/dist/{packager-tool-d78ww4hb.js → packager-tool-cp66jc40.js} +51 -48
- package/dist/{packager-tool-6kz1pv9f.js → packager-tool-d1texmvn.js} +828 -338
- package/dist/{packager-tool-cvf46scg.js → packager-tool-daphtc6e.js} +122 -89
- package/dist/{packager-tool-1de529jm.js → packager-tool-epsr41wx.js} +12 -3
- package/dist/packager-tool-f84z7nds.js +130 -0
- package/dist/{packager-tool-45a8fkw0.js → packager-tool-fgk0fkm5.js} +37 -39
- package/dist/{packager-tool-8ptbmmmp.js → packager-tool-fp46ebde.js} +147 -76
- package/dist/{packager-tool-3bwnkjdq.js → packager-tool-fx4ws49n.js} +12 -12
- package/dist/{packager-tool-4pa108k7.js → packager-tool-g8ghm6wk.js} +11 -11
- package/dist/{packager-tool-2t72aez8.js → packager-tool-gpcr8zxf.js} +15 -15
- package/dist/packager-tool-gqb9ytg9.js +290 -0
- package/dist/packager-tool-hrkvdw31.js +280 -0
- package/dist/{packager-tool-056k8w2f.js → packager-tool-hs1kjv0c.js} +75 -9
- package/dist/{packager-tool-2vmz56qh.js → packager-tool-jatbb6c5.js} +184 -33
- package/dist/{packager-tool-f23a485e.js → packager-tool-jfp5mvqm.js} +176 -196
- package/dist/{packager-tool-6ybywxxn.js → packager-tool-m07vyk89.js} +371 -221
- package/dist/{packager-tool-61pwb567.js → packager-tool-ppj5f4y7.js} +6 -7
- 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-rb06drad.js +1178 -0
- 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-43ahv5mn.js → packager-tool-t39pjz7n.js} +35 -18
- package/dist/{packager-tool-v1f5e8t9.js → packager-tool-vgrswa8p.js} +53 -8
- package/dist/{packager-tool-gyqfs04e.js → packager-tool-vq5fwggb.js} +273 -255
- package/dist/{packager-tool-gmwva4yv.js → packager-tool-vx2c68sb.js} +2 -2
- 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-97rcgwvv.js → packager-tool-x461tgwy.js} +331 -55
- package/dist/{packager-tool-dnrk1gg6.js → packager-tool-y6efv1f8.js} +356 -298
- package/dist/{packager-tool-wy4fx250.js → packager-tool-yetmzme9.js} +89 -30
- package/dist/packager-tool-z45eej6s.js +74 -0
- 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-r7t52t25.js} +37 -34
- package/dist/{run-service-hk8w2h31.js → run-service-xrhg0z2a.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,40 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
VALIDATION_CONFIRMATION_REQUIRED_CODE,
|
|
6
|
-
coerceWorkflowErrorMessages
|
|
7
|
-
} from "./packager-tool-act5r386.js";
|
|
8
|
-
import {
|
|
9
|
-
deploymentToTerminalPipelineResult,
|
|
10
|
-
findDeploymentBestEffort,
|
|
11
|
-
isPipelineDeploymentNotFoundError,
|
|
12
|
-
mapOperationStatusToPipelineStatus
|
|
13
|
-
} from "./packager-tool-9hsmn8th.js";
|
|
2
|
+
catchError,
|
|
3
|
+
extractErrorDetails
|
|
4
|
+
} from "./packager-tool-m07vyk89.js";
|
|
14
5
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
logger,
|
|
7
|
+
processContext,
|
|
8
|
+
PollOutcome,
|
|
9
|
+
pollUntil
|
|
10
|
+
} from "./packager-tool-9vrwpgt3.js";
|
|
17
11
|
import {
|
|
18
|
-
|
|
12
|
+
Configuration2,
|
|
19
13
|
PipelinesApi
|
|
20
|
-
} from "./packager-tool-
|
|
14
|
+
} from "./packager-tool-x461tgwy.js";
|
|
21
15
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} from "./packager-tool-
|
|
16
|
+
Configuration3,
|
|
17
|
+
DeploymentsApi2
|
|
18
|
+
} from "./packager-tool-rb06drad.js";
|
|
25
19
|
import {
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
findDeploymentBestEffort2,
|
|
21
|
+
isPipelineDeploymentNotFoundError2,
|
|
22
|
+
mapOperationStatusToPipelineStatus2,
|
|
23
|
+
deploymentToTerminalPipelineResult2
|
|
24
|
+
} from "./packager-tool-hrkvdw31.js";
|
|
28
25
|
import {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
pollUntil,
|
|
32
|
-
processContext
|
|
33
|
-
} from "./packager-tool-tx834spe.js";
|
|
26
|
+
isCurrentRecordAsync
|
|
27
|
+
} from "./packager-tool-gpcr8zxf.js";
|
|
34
28
|
import {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} from "./packager-tool-
|
|
29
|
+
coerceWorkflowErrorMessages,
|
|
30
|
+
VALIDATION_CONFIRMATION_REQUIRED_CODE
|
|
31
|
+
} from "./packager-tool-2pxe2r4j.js";
|
|
38
32
|
|
|
39
33
|
// src/services/activation.ts
|
|
40
34
|
var TERMINAL_STATUSES = new Set([
|
|
@@ -42,14 +36,14 @@ var TERMINAL_STATUSES = new Set([
|
|
|
42
36
|
"FailedActivate"
|
|
43
37
|
]);
|
|
44
38
|
async function activateDeployment(auth, deploymentName, options) {
|
|
45
|
-
const api = new PipelinesApi(new
|
|
39
|
+
const api = new PipelinesApi(new Configuration2({
|
|
46
40
|
basePath: auth.basePath,
|
|
47
41
|
accessToken: auth.accessToken
|
|
48
42
|
}));
|
|
49
43
|
const [stepsError, steps] = await catchError(api.pipelinesGetPreActivateSteps({ deploymentName }, options.scope));
|
|
50
44
|
if (stepsError) {
|
|
51
45
|
const { message, details, errorCode, retry, context } = await extractErrorDetails(stepsError);
|
|
52
|
-
const deployment = await
|
|
46
|
+
const deployment = await findDeploymentBestEffort2(auth, deploymentName, options.scope);
|
|
53
47
|
return {
|
|
54
48
|
kind: "RequestFailed",
|
|
55
49
|
phase: "preActivateSteps",
|
|
@@ -70,7 +64,7 @@ async function activateDeployment(auth, deploymentName, options) {
|
|
|
70
64
|
const [activateError, activateResult] = await catchError(api.pipelinesActivate({ deploymentName }, options.scope));
|
|
71
65
|
if (activateError) {
|
|
72
66
|
const { message, details, errorCode, retry, context } = await extractErrorDetails(activateError);
|
|
73
|
-
const deployment = await
|
|
67
|
+
const deployment = await findDeploymentBestEffort2(auth, deploymentName, options.scope);
|
|
74
68
|
return {
|
|
75
69
|
kind: "RequestFailed",
|
|
76
70
|
phase: "activate",
|
|
@@ -116,56 +110,6 @@ async function activateDeployment(auth, deploymentName, options) {
|
|
|
116
110
|
};
|
|
117
111
|
}
|
|
118
112
|
|
|
119
|
-
// src/services/folder-helper.ts
|
|
120
|
-
async function resolveParentFolder(options) {
|
|
121
|
-
if (!options.folderPath && !options.folderKey && !options.personalWorkspace) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
if (options.personalWorkspace) {
|
|
125
|
-
const [pwError, pw] = await catchError(resolvePersonalWorkspace({
|
|
126
|
-
tenant: options.tenant,
|
|
127
|
-
loginValidity: options.loginValidity,
|
|
128
|
-
envFilePath: options.envFilePath
|
|
129
|
-
}));
|
|
130
|
-
if (pwError) {
|
|
131
|
-
throw new Error(`Failed to resolve Personal Workspace: ${pwError.message}`);
|
|
132
|
-
}
|
|
133
|
-
return pw.name;
|
|
134
|
-
}
|
|
135
|
-
if (options.folderPath) {
|
|
136
|
-
return options.folderPath;
|
|
137
|
-
}
|
|
138
|
-
const [resolveError, resolved] = await catchError(resolveFolder({ folderKey: options.folderKey }, {
|
|
139
|
-
tenant: options.tenant,
|
|
140
|
-
loginValidity: options.loginValidity,
|
|
141
|
-
envFilePath: options.envFilePath
|
|
142
|
-
}));
|
|
143
|
-
if (resolveError) {
|
|
144
|
-
throw new Error(`Failed to resolve folder key '${options.folderKey}': ${resolveError.message}`);
|
|
145
|
-
}
|
|
146
|
-
if (!resolved) {
|
|
147
|
-
throw new Error(`Folder not found for key '${options.folderKey}'.`);
|
|
148
|
-
}
|
|
149
|
-
return resolved.path;
|
|
150
|
-
}
|
|
151
|
-
async function resolveFolderInfo(options) {
|
|
152
|
-
if (!options.folderPath && !options.folderKey) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
const [resolveError, resolved] = await catchError(resolveFolder({ folderPath: options.folderPath, folderKey: options.folderKey }, {
|
|
156
|
-
tenant: options.tenant,
|
|
157
|
-
loginValidity: options.loginValidity,
|
|
158
|
-
envFilePath: options.envFilePath
|
|
159
|
-
}));
|
|
160
|
-
if (resolveError) {
|
|
161
|
-
throw new Error(`Failed to resolve folder '${options.folderPath ?? options.folderKey}': ${resolveError.message}`);
|
|
162
|
-
}
|
|
163
|
-
if (!resolved) {
|
|
164
|
-
throw new Error(`Folder not found: '${options.folderPath ?? options.folderKey}'.`);
|
|
165
|
-
}
|
|
166
|
-
return { key: resolved.key, path: resolved.path };
|
|
167
|
-
}
|
|
168
|
-
|
|
169
113
|
// src/services/deployment-validation.ts
|
|
170
114
|
var NO_SERVER_REASON = "the server reported no reason.";
|
|
171
115
|
var LOOKUP_TIMEOUT_MS = 15000;
|
|
@@ -189,7 +133,7 @@ async function describeValidationFailureAsync(deploymentsApi, deploymentKey, dep
|
|
|
189
133
|
return messages.length > 0 ? messages.join("; ") : NO_SERVER_REASON;
|
|
190
134
|
}
|
|
191
135
|
async function describeDeploymentFailureAsync(auth, deployment, deploymentAction, scope, signal) {
|
|
192
|
-
const deploymentsApi = new
|
|
136
|
+
const deploymentsApi = new DeploymentsApi2(new Configuration3({
|
|
193
137
|
basePath: auth.basePath,
|
|
194
138
|
accessToken: auth.accessToken
|
|
195
139
|
}));
|
|
@@ -383,7 +327,7 @@ async function readOutcomeByKeyAsync(api, deploymentKey) {
|
|
|
383
327
|
if (info.operation === "Uninstall" || info.operationStatus === "Draft") {
|
|
384
328
|
return stillInFlight(deploymentKey);
|
|
385
329
|
}
|
|
386
|
-
const status =
|
|
330
|
+
const status = mapOperationStatusToPipelineStatus2(info.operationStatus);
|
|
387
331
|
if (!status) {
|
|
388
332
|
return stillInFlight(deploymentKey);
|
|
389
333
|
}
|
|
@@ -406,7 +350,7 @@ async function pollPipelineDeploymentAsync(api, auth, options) {
|
|
|
406
350
|
}
|
|
407
351
|
return status;
|
|
408
352
|
} catch (err) {
|
|
409
|
-
if (!await
|
|
353
|
+
if (!await isPipelineDeploymentNotFoundError2(err)) {
|
|
410
354
|
throw err;
|
|
411
355
|
}
|
|
412
356
|
if (!observedDeploymentKey) {
|
|
@@ -416,11 +360,11 @@ async function pollPipelineDeploymentAsync(api, auth, options) {
|
|
|
416
360
|
if (byKey) {
|
|
417
361
|
return byKey;
|
|
418
362
|
}
|
|
419
|
-
const deployment = await
|
|
363
|
+
const deployment = await findDeploymentBestEffort2(auth, options.deploymentName, options.scope, { deploymentKey: observedDeploymentKey });
|
|
420
364
|
if (!deployment || deployment.operationStatus === "Draft") {
|
|
421
365
|
return stillInFlight(observedDeploymentKey);
|
|
422
366
|
}
|
|
423
|
-
const synthesized =
|
|
367
|
+
const synthesized = deploymentToTerminalPipelineResult2(deployment);
|
|
424
368
|
if (!synthesized) {
|
|
425
369
|
return stillInFlight(observedDeploymentKey);
|
|
426
370
|
}
|
|
@@ -440,6 +384,95 @@ async function pollPipelineDeploymentAsync(api, auth, options) {
|
|
|
440
384
|
});
|
|
441
385
|
}
|
|
442
386
|
|
|
443
|
-
|
|
387
|
+
// src/services/install-run.ts
|
|
388
|
+
function finiteOr(value, fallback) {
|
|
389
|
+
return typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
390
|
+
}
|
|
391
|
+
async function runInstallToOutcomeAsync(request) {
|
|
392
|
+
const timeoutMs = request.timeoutSeconds * 1000;
|
|
393
|
+
let deadline;
|
|
394
|
+
const installAndPollAsync = async () => {
|
|
395
|
+
const installed = await request.install();
|
|
396
|
+
if (!installed.ok) {
|
|
397
|
+
return { failure: installed };
|
|
398
|
+
}
|
|
399
|
+
const { pipelineDeploymentId } = installed;
|
|
400
|
+
deadline ??= Date.now() + timeoutMs;
|
|
401
|
+
const pollResult = await pollPipelineDeploymentAsync(request.api, request.auth, {
|
|
402
|
+
pipelineDeploymentId,
|
|
403
|
+
deploymentName: request.deploymentName,
|
|
404
|
+
scope: request.scope,
|
|
405
|
+
timeoutMs: remainingTimeoutMs(timeoutMs, deadline),
|
|
406
|
+
intervalMs: request.pollIntervalMs,
|
|
407
|
+
signal: request.signal,
|
|
408
|
+
logPrefix: request.logPrefix
|
|
409
|
+
});
|
|
410
|
+
return { pipelineDeploymentId, pollResult };
|
|
411
|
+
};
|
|
412
|
+
const refusedByServer = (pollResult) => pollResult.outcome === PollOutcome.Completed && isPermanentDeletionRefusal(pollResult.data);
|
|
413
|
+
if (request.noWait) {
|
|
414
|
+
const installed = await request.install();
|
|
415
|
+
return installed.ok ? {
|
|
416
|
+
kind: "accepted",
|
|
417
|
+
pipelineDeploymentId: installed.pipelineDeploymentId
|
|
418
|
+
} : { kind: "install_refused", failure: installed };
|
|
419
|
+
}
|
|
420
|
+
let attempt = await installAndPollAsync();
|
|
421
|
+
if ("failure" in attempt) {
|
|
422
|
+
return { kind: "install_refused", failure: attempt.failure };
|
|
423
|
+
}
|
|
424
|
+
if (!refusedByServer(attempt.pollResult)) {
|
|
425
|
+
return {
|
|
426
|
+
kind: "polled",
|
|
427
|
+
...attempt,
|
|
428
|
+
permanentlyDeletedResources: undefined
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
const refused = attempt.pollResult.data;
|
|
432
|
+
const wording = request.consentWording(refused);
|
|
433
|
+
const consent = await settlePermanentDeletionRefusalAsync({
|
|
434
|
+
api: request.api,
|
|
435
|
+
deploymentName: request.deploymentName,
|
|
436
|
+
scope: request.scope,
|
|
437
|
+
signal: request.signal,
|
|
438
|
+
acknowledge: request.acknowledge,
|
|
439
|
+
status: refused,
|
|
440
|
+
...wording
|
|
441
|
+
});
|
|
442
|
+
if (!consent.ok) {
|
|
443
|
+
return {
|
|
444
|
+
kind: "consent_refused",
|
|
445
|
+
refusal: consent,
|
|
446
|
+
pipelineDeploymentId: attempt.pipelineDeploymentId,
|
|
447
|
+
deploymentKey: refused.deploymentKey || undefined
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
attempt = await installAndPollAsync();
|
|
451
|
+
if ("failure" in attempt) {
|
|
452
|
+
return {
|
|
453
|
+
kind: "install_refused",
|
|
454
|
+
failure: {
|
|
455
|
+
...attempt.failure,
|
|
456
|
+
instructions: `${attempt.failure.instructions} ${acknowledgedButNotRunHint(consent.resources, wording.keepCopiesHint)}`
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
if (refusedByServer(attempt.pollResult)) {
|
|
461
|
+
const deploymentKey = attempt.pollResult.data?.deploymentKey || undefined;
|
|
462
|
+
return {
|
|
463
|
+
kind: "consent_refused",
|
|
464
|
+
refusal: stillRequiresConfirmation(request.deploymentName, consent.resources, deploymentKey),
|
|
465
|
+
pipelineDeploymentId: attempt.pipelineDeploymentId,
|
|
466
|
+
deploymentKey
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
return {
|
|
470
|
+
kind: "polled",
|
|
471
|
+
...attempt,
|
|
472
|
+
permanentlyDeletedResources: consent.resources.map((resource) => formatPermanentDeletionResources([resource]))
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export { activateDeployment, NO_SERVER_REASON, describeValidationFailureAsync, describeDeploymentFailureAsync, listPermanentDeletionResourcesAsync, ACKNOWLEDGE_PERMANENT_DELETION_FLAG, finiteOr, runInstallToOutcomeAsync };
|
|
444
477
|
|
|
445
|
-
//# debugId=
|
|
478
|
+
//# debugId=ABDCBF019CB770C464756E2164756E21
|
|
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
18
18
|
return cached;
|
|
19
19
|
}
|
|
20
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
21
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
22
22
|
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
23
23
|
for (let key of __getOwnPropNames(mod))
|
|
24
24
|
if (!__hasOwnProp.call(to, key))
|
|
@@ -32,8 +32,17 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
32
32
|
return to;
|
|
33
33
|
};
|
|
34
34
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
35
|
+
var __exportCjs = (target, getters, setters) => {
|
|
36
|
+
for (var name in getters)
|
|
37
|
+
__defProp(target, name, {
|
|
38
|
+
get: getters[name],
|
|
39
|
+
set: setters[name],
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true
|
|
42
|
+
});
|
|
43
|
+
};
|
|
35
44
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
36
45
|
|
|
37
|
-
export { __toESM, __commonJS, __require };
|
|
46
|
+
export { __toESM, __commonJS, __exportCjs, __require };
|
|
38
47
|
|
|
39
|
-
//# debugId=
|
|
48
|
+
//# debugId=6692E9B4C735B07364756E2164756E21
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getFileSystem
|
|
3
|
+
} from "./packager-tool-vgrswa8p.js";
|
|
4
|
+
import {
|
|
5
|
+
ProjectDimensions,
|
|
6
|
+
solutionIdentityProperties,
|
|
7
|
+
projectKey,
|
|
8
|
+
isProjectTelemetryDisabled
|
|
9
|
+
} from "./packager-tool-m07vyk89.js";
|
|
10
|
+
import {
|
|
11
|
+
logger
|
|
12
|
+
} from "./packager-tool-9vrwpgt3.js";
|
|
13
|
+
|
|
14
|
+
// src/services/solution-identity.ts
|
|
15
|
+
var MAX_METADATA_BYTES = 1024 * 1024;
|
|
16
|
+
function logSkipped(what, error) {
|
|
17
|
+
logger.debug(`[solution-identity] ${what} skipped: ${error instanceof Error ? error.message : String(error)}`);
|
|
18
|
+
}
|
|
19
|
+
var unavailable = (status) => ({
|
|
20
|
+
status
|
|
21
|
+
});
|
|
22
|
+
function solutionIdentity(id) {
|
|
23
|
+
if (id === undefined || id === null || id === "")
|
|
24
|
+
return unavailable("missing");
|
|
25
|
+
return typeof id === "string" && id.trim() ? { id, status: "resolved" } : unavailable("invalid");
|
|
26
|
+
}
|
|
27
|
+
function readMetadata(bytes, packed = false) {
|
|
28
|
+
if (bytes.length > MAX_METADATA_BYTES)
|
|
29
|
+
return unavailable("invalid");
|
|
30
|
+
const parsed = JSON.parse(new TextDecoder().decode(bytes));
|
|
31
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
32
|
+
return unavailable("invalid");
|
|
33
|
+
const record = parsed;
|
|
34
|
+
if (!packed)
|
|
35
|
+
return solutionIdentity(record.SolutionId);
|
|
36
|
+
const spec = record.spec;
|
|
37
|
+
return solutionIdentity(spec && typeof spec === "object" && !Array.isArray(spec) ? spec.projectKey : undefined);
|
|
38
|
+
}
|
|
39
|
+
async function readPackedArchive(bytes) {
|
|
40
|
+
const { unzipSync } = await import("./index-t262f2xv.js");
|
|
41
|
+
let oversized = false;
|
|
42
|
+
const entries = unzipSync(bytes, {
|
|
43
|
+
filter: (entry) => {
|
|
44
|
+
const selected = entry.name === "solutionMetadata.json";
|
|
45
|
+
if (selected && entry.originalSize > MAX_METADATA_BYTES)
|
|
46
|
+
oversized = true;
|
|
47
|
+
return selected && entry.originalSize <= MAX_METADATA_BYTES;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
if (oversized)
|
|
51
|
+
return unavailable("invalid");
|
|
52
|
+
const metadata = entries["solutionMetadata.json"];
|
|
53
|
+
return metadata ? readMetadata(metadata, true) : unavailable("missing");
|
|
54
|
+
}
|
|
55
|
+
async function capturePackedSolutionIdentity2(capture, bytes) {
|
|
56
|
+
if (!capture || isProjectTelemetryDisabled())
|
|
57
|
+
return;
|
|
58
|
+
try {
|
|
59
|
+
capture.setProperties?.(solutionIdentityProperties(await readPackedArchive(bytes)));
|
|
60
|
+
} catch (error) {
|
|
61
|
+
logSkipped("packed solution identity", error);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function readSolutionIdentity2(target) {
|
|
65
|
+
try {
|
|
66
|
+
const fs = getFileSystem();
|
|
67
|
+
let path = fs.path.resolve(target);
|
|
68
|
+
let stat = await fs.stat(path);
|
|
69
|
+
if (!stat)
|
|
70
|
+
return unavailable("missing");
|
|
71
|
+
if (stat.isDirectory()) {
|
|
72
|
+
const manifests = (await fs.readdir(path)).filter((name) => name.endsWith(".uipx"));
|
|
73
|
+
if (manifests.length !== 1)
|
|
74
|
+
return unavailable(manifests.length ? "invalid" : "missing");
|
|
75
|
+
path = fs.path.join(path, manifests[0]);
|
|
76
|
+
stat = await fs.stat(path);
|
|
77
|
+
} else if (!path.endsWith(".uipx"))
|
|
78
|
+
return unavailable("unsupported");
|
|
79
|
+
if (!stat?.isFile() || stat.size > MAX_METADATA_BYTES)
|
|
80
|
+
return unavailable("invalid");
|
|
81
|
+
const bytes = await fs.readFile(path);
|
|
82
|
+
if (!bytes)
|
|
83
|
+
return unavailable("missing");
|
|
84
|
+
return readMetadata(bytes);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
logSkipped("solution identity read", error);
|
|
87
|
+
return unavailable("invalid");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async function captureExtractedSolution2(capture, directory) {
|
|
91
|
+
if (!capture || isProjectTelemetryDisabled())
|
|
92
|
+
return;
|
|
93
|
+
try {
|
|
94
|
+
await capture.setTarget?.(directory);
|
|
95
|
+
} catch (error) {
|
|
96
|
+
logSkipped("extracted solution identity", error);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function captureSolutionIdentity2(capture, id, previousId) {
|
|
100
|
+
if (!capture || isProjectTelemetryDisabled())
|
|
101
|
+
return;
|
|
102
|
+
try {
|
|
103
|
+
const properties = solutionIdentityProperties(solutionIdentity(id));
|
|
104
|
+
const previousKey = previousId ? projectKey(previousId) : undefined;
|
|
105
|
+
if (properties[ProjectDimensions.SolutionKey] && previousKey && previousKey !== properties[ProjectDimensions.SolutionKey])
|
|
106
|
+
properties[ProjectDimensions.PreviousSolutionKey] = previousKey;
|
|
107
|
+
capture.setProperties?.(properties);
|
|
108
|
+
} catch (error) {
|
|
109
|
+
logSkipped("upload solution identity", error);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function captureSolutionMember2(capture, memberId) {
|
|
113
|
+
if (!capture || isProjectTelemetryDisabled())
|
|
114
|
+
return;
|
|
115
|
+
try {
|
|
116
|
+
const properties = capture.properties();
|
|
117
|
+
if (!properties[ProjectDimensions.SolutionKey])
|
|
118
|
+
return;
|
|
119
|
+
capture.setProperties?.({
|
|
120
|
+
...properties,
|
|
121
|
+
[ProjectDimensions.SolutionProjectKey]: projectKey(memberId)
|
|
122
|
+
});
|
|
123
|
+
} catch (error) {
|
|
124
|
+
logSkipped("solution member identity", error);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export { capturePackedSolutionIdentity2, readSolutionIdentity2, captureExtractedSolution2, captureSolutionIdentity2, captureSolutionMember2 };
|
|
129
|
+
|
|
130
|
+
//# debugId=7B449D46BEB0F9F364756E2164756E21
|
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
INCOMPLETE_SWEEP_ADVICE,
|
|
6
|
-
findDeploymentAcrossFeeds,
|
|
7
|
-
reportIncompleteSweepAsync
|
|
8
|
-
} from "./packager-tool-1ybnxbp9.js";
|
|
2
|
+
catchError,
|
|
3
|
+
extractErrorDetails
|
|
4
|
+
} from "./packager-tool-m07vyk89.js";
|
|
9
5
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
Configuration2,
|
|
7
|
+
PipelinesApi,
|
|
8
|
+
classifyFeedSession2
|
|
9
|
+
} from "./packager-tool-x461tgwy.js";
|
|
13
10
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
Configuration3,
|
|
12
|
+
WorkflowAction2,
|
|
13
|
+
DeploymentsApi2
|
|
14
|
+
} from "./packager-tool-rb06drad.js";
|
|
16
15
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from "./packager-tool-97rcgwvv.js";
|
|
16
|
+
getSolutionAuthContext2
|
|
17
|
+
} from "./packager-tool-ppj5f4y7.js";
|
|
20
18
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
WorkflowAction
|
|
24
|
-
} from "./packager-tool-tedbebpq.js";
|
|
19
|
+
feedSelectorFlag2
|
|
20
|
+
} from "./packager-tool-gqb9ytg9.js";
|
|
25
21
|
import {
|
|
26
|
-
|
|
27
|
-
} from "./packager-tool-
|
|
22
|
+
resolveFeedSelectionAsync
|
|
23
|
+
} from "./packager-tool-z45eej6s.js";
|
|
28
24
|
import {
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
hasServerErrorCode,
|
|
26
|
+
isBareResponse
|
|
27
|
+
} from "./packager-tool-2pxe2r4j.js";
|
|
31
28
|
import {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
findDeploymentAcrossFeeds,
|
|
30
|
+
INCOMPLETE_SWEEP_ADVICE,
|
|
31
|
+
reportIncompleteSweepAsync
|
|
32
|
+
} from "./packager-tool-85f75be3.js";
|
|
35
33
|
|
|
36
34
|
// src/services/deploy-delete-service.ts
|
|
37
35
|
var fail = (reason, message, instructions, extras = {}) => ({
|
|
@@ -50,7 +48,7 @@ function buildUnavailableInstructions(deployment, feedSelector) {
|
|
|
50
48
|
if (deployment.operationStatus === "InProgress") {
|
|
51
49
|
return `Deployment '${deployment.name}' has an operation in progress ${status}. Wait for it to finish — run 'uip solution deploy list${feedSelector}' to recheck — then retry. Available actions: ${availableActions}.`;
|
|
52
50
|
}
|
|
53
|
-
if (deployment.actions?.includes(
|
|
51
|
+
if (deployment.actions?.includes(WorkflowAction2.Uninstall)) {
|
|
54
52
|
return `Deployment '${deployment.name}' offers Uninstall but not Delete ${status}. Run: uip solution deploy uninstall '${deployment.name}'${feedSelector} --yes, then retry the delete. Available actions: ${availableActions}.`;
|
|
55
53
|
}
|
|
56
54
|
return `Deployment '${deployment.name}' cannot be deleted in its current state ${status}. Available actions: ${availableActions}. Run 'uip solution deploy list${feedSelector}' to recheck its state.`;
|
|
@@ -74,7 +72,7 @@ function requestErrorInstructions(deploymentName, errorCode, details, feedSelect
|
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
async function sendDeleteAsync(auth, deploymentKey, scope) {
|
|
77
|
-
const pipelinesApi = new PipelinesApi(new
|
|
75
|
+
const pipelinesApi = new PipelinesApi(new Configuration2({
|
|
78
76
|
basePath: auth.basePath,
|
|
79
77
|
accessToken: auth.accessToken
|
|
80
78
|
}));
|
|
@@ -88,18 +86,18 @@ async function sendDeleteAsync(auth, deploymentKey, scope) {
|
|
|
88
86
|
if (!missingRoute) {
|
|
89
87
|
return detail;
|
|
90
88
|
}
|
|
91
|
-
if (
|
|
89
|
+
if (classifyFeedSession2(auth) === "application") {
|
|
92
90
|
return "missing_route_for_application";
|
|
93
91
|
}
|
|
94
|
-
const deploymentsApi = new
|
|
92
|
+
const deploymentsApi = new DeploymentsApi2(new Configuration3({
|
|
95
93
|
basePath: auth.basePath,
|
|
96
94
|
accessToken: auth.accessToken
|
|
97
95
|
}));
|
|
98
96
|
const [solutionsError] = await catchError(deploymentsApi.deploymentsDelete({ deploymentKey }, scope));
|
|
99
97
|
return solutionsError ? extractErrorDetails(solutionsError) : undefined;
|
|
100
98
|
}
|
|
101
|
-
async function
|
|
102
|
-
const [authError, auth] = await catchError(
|
|
99
|
+
async function deleteDeploymentAsync2(deploymentName, options = {}) {
|
|
100
|
+
const [authError, auth] = await catchError(getSolutionAuthContext2({
|
|
103
101
|
tenant: options.tenant,
|
|
104
102
|
loginValidity: options.loginValidity,
|
|
105
103
|
envFilePath: options.envFilePath
|
|
@@ -132,12 +130,12 @@ async function deleteDeploymentAsync(deploymentName, options = {}) {
|
|
|
132
130
|
return fail("lookup_failed", report.message, `${INCOMPLETE_SWEEP_ADVICE} ${report.nextStep}${oneFeed ? ` To check one feed yourself, run ${oneFeed}.` : ""} Details: ${report.details}`, { errorCode: report.errorCode, retry: report.retry });
|
|
133
131
|
}
|
|
134
132
|
if (!location) {
|
|
135
|
-
return fail("deployment_not_found", `No deployment named '${deploymentName}' was found.`, selectedFeed ? `Run 'uip solution deploy list${
|
|
133
|
+
return fail("deployment_not_found", `No deployment named '${deploymentName}' was found.`, selectedFeed ? `Run 'uip solution deploy list${feedSelectorFlag2(selectedFeed)}' to see the deployment names in the selected feed, or drop the feed flag to search every feed you can reach.` : "Run 'uip solution deploy list' to see valid deployment names.", { errorCode: "not_found", retry: "RetryWillNotFix" });
|
|
136
134
|
}
|
|
137
135
|
const { deployment, scope } = location;
|
|
138
|
-
if (deployment.actions?.length && !deployment.actions.includes(
|
|
136
|
+
if (deployment.actions?.length && !deployment.actions.includes(WorkflowAction2.Delete)) {
|
|
139
137
|
const inProgress = deployment.operationStatus === "InProgress";
|
|
140
|
-
return fail("delete_unavailable", `Deployment '${deploymentName}' cannot be deleted in its current state.`, buildUnavailableInstructions(deployment,
|
|
138
|
+
return fail("delete_unavailable", `Deployment '${deploymentName}' cannot be deleted in its current state.`, buildUnavailableInstructions(deployment, feedSelectorFlag2(location.feed)), {
|
|
141
139
|
errorCode: "invalid_argument",
|
|
142
140
|
retry: inProgress ? "RetryLater" : "RetryWillNotFix"
|
|
143
141
|
});
|
|
@@ -148,9 +146,9 @@ async function deleteDeploymentAsync(deploymentName, options = {}) {
|
|
|
148
146
|
}
|
|
149
147
|
if (detail) {
|
|
150
148
|
if (hasServerErrorCode(detail.details, "DeploymentAlreadyInProgress")) {
|
|
151
|
-
return fail("delete_request_failed", detail.message, `Deployment '${deploymentName}' is still being validated. Wait for its run to finish (run 'uip solution deploy list${
|
|
149
|
+
return fail("delete_request_failed", detail.message, `Deployment '${deploymentName}' is still being validated. Wait for its run to finish (run 'uip solution deploy list${feedSelectorFlag2(location.feed)}' to recheck), then retry. Details: ${detail.details}`, { errorCode: "invalid_argument", retry: "RetryLater" });
|
|
152
150
|
}
|
|
153
|
-
return fail("delete_request_failed", detail.message, requestErrorInstructions(deploymentName, detail.errorCode, detail.details,
|
|
151
|
+
return fail("delete_request_failed", detail.message, requestErrorInstructions(deploymentName, detail.errorCode, detail.details, feedSelectorFlag2(location.feed)), { errorCode: detail.errorCode, retry: detail.retry });
|
|
154
152
|
}
|
|
155
153
|
return {
|
|
156
154
|
ok: true,
|
|
@@ -159,6 +157,6 @@ async function deleteDeploymentAsync(deploymentName, options = {}) {
|
|
|
159
157
|
};
|
|
160
158
|
}
|
|
161
159
|
|
|
162
|
-
export {
|
|
160
|
+
export { deleteDeploymentAsync2 };
|
|
163
161
|
|
|
164
|
-
//# debugId=
|
|
162
|
+
//# debugId=6C7CEAEA0D3FED7A64756E2164756E21
|