@uipath/solution-tool 1.203.0-preview.205 → 1.204.0-preview.206
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/README.md +2 -2
- package/dist/THIRD-PARTY-NOTICES.md +42 -4
- package/dist/deploy-delete-service-y9dwehmn.js +22 -0
- package/dist/deploy-status-service-nmhnnjmy.js +256 -0
- package/dist/deploy.d.ts +11 -4
- package/dist/deploy.js +19 -7
- package/dist/deployment-search-eb337bjh.js +49 -0
- package/dist/{embedded-file-reader-xxqe8vs8.js → embedded-file-reader-rf2g1kfj.js} +2 -2
- package/dist/feed-resolver-dmtnswcc.js +27 -0
- package/dist/feed-scope-failure-e2yaqfg2.js +18 -0
- package/dist/feed-session-sxga31vn.js +17 -0
- package/dist/index.js +27 -18
- package/dist/init.js +10 -7
- package/dist/{list-pytnrana.js → list-rbjqgz6s.js} +9 -6
- package/dist/pack.js +14 -11
- package/dist/{packager-tool-vas0xg5h.js → packager-tool-2cntqvdv.js} +5 -3
- package/dist/{packager-tool-1haahq17.js → packager-tool-3enm2h28.js} +5 -5
- package/dist/{packager-tool-2syrt51a.js → packager-tool-3fv6zc86.js} +1062 -825
- package/dist/packager-tool-3fyq6wjs.js +5889 -0
- package/dist/{packager-tool-k4mskzww.js → packager-tool-5dzjsw5q.js} +3 -3
- package/dist/{packager-tool-0f0wt9vh.js → packager-tool-5fjp60dk.js} +3071 -2794
- package/dist/{packager-tool-1qnyt7sm.js → packager-tool-752zvh64.js} +756 -359
- package/dist/{packager-tool-bkwnetqn.js → packager-tool-83rzavkx.js} +383 -88
- package/dist/{packager-tool-7znqtw3f.js → packager-tool-9vvdgbay.js} +8 -6
- package/dist/packager-tool-b8pppqbb.js +172 -0
- package/dist/packager-tool-bqre28m1.js +43 -0
- package/dist/packager-tool-dh0m3ebf.js +173 -0
- package/dist/packager-tool-f5gq77m5.js +28 -0
- package/dist/{packager-tool-nzghfa48.js → packager-tool-fv7xyzg2.js} +550 -2
- package/dist/{packager-tool-3jrq7smt.js → packager-tool-gb35b4qs.js} +206 -289
- package/dist/{packager-tool-7rarcemd.js → packager-tool-he7ak44z.js} +16 -74
- package/dist/packager-tool-myn57mc3.js +322 -0
- package/dist/{packager-tool-jmpgr1an.js → packager-tool-n1nzj2b9.js} +1008 -647
- package/dist/packager-tool-n6yb6zp9.js +113 -0
- package/dist/{packager-tool-wkj58797.js → packager-tool-qgaqqq41.js} +320 -151
- package/dist/{packager-tool-resolver-fmjr60x8.js → packager-tool-resolver-2cbxyq6k.js} +6 -5
- package/dist/{packager-tool-2kvztdcy.js → packager-tool-t12hj6pd.js} +1022 -1342
- package/dist/{packager-tool-znakt6yw.js → packager-tool-vh4ng74p.js} +8 -6
- package/dist/packager-tool-vmsxq1pc.js +104 -0
- package/dist/packager-tool-w6jr4638.js +166 -0
- package/dist/packager-tool-zf3929se.js +237 -0
- package/dist/packager-tool-zns6n8zp.js +837 -0
- package/dist/packager-tool-zw3036b8.js +37 -0
- package/dist/packager-tool.js +2 -2
- package/dist/prepare-solution-resources-p3gzdecy.js +25 -0
- package/dist/{project-contributions-cvttys34.js → project-contributions-txe8v6sm.js} +12 -9
- package/dist/publish.js +12 -7
- package/dist/resource.js +9 -6
- package/dist/services/activation.d.ts +17 -2
- package/dist/services/deploy-activate-service.d.ts +10 -0
- package/dist/services/deploy-delete-service.d.ts +82 -0
- package/dist/services/deploy-list-service.d.ts +15 -45
- package/dist/services/deploy-run-service.d.ts +36 -23
- package/dist/services/deploy-upgrade-service.d.ts +198 -39
- package/dist/services/deployment-feed-locator.d.ts +50 -12
- package/dist/services/deployment-search-client.d.ts +55 -0
- package/dist/services/deployment-search.d.ts +87 -34
- package/dist/services/deployment-state.d.ts +119 -0
- package/dist/services/feed-resolver.d.ts +31 -0
- package/dist/services/feed-session.d.ts +70 -0
- package/dist/services/folder-helper.d.ts +4 -27
- package/dist/services/http-status.d.ts +9 -0
- package/dist/services/incomplete-feed-sweep.d.ts +77 -0
- package/dist/services/legacy-deployment-search-v3.d.ts +23 -0
- package/dist/services/packages-list-service.d.ts +5 -0
- package/dist/services/pipeline-deploy-poll.d.ts +69 -0
- package/dist/services/publish-service.d.ts +14 -16
- package/dist/services/search-failure.d.ts +27 -0
- package/dist/templates/AGENTS.md +60 -20
- package/dist/tool.js +27 -18
- package/dist/utils/deployment-errors.d.ts +57 -0
- package/package.json +2 -2
- package/dist/packager-tool-364pcg21.js +0 -51960
- package/dist/packager-tool-jz2wbfjz.js +0 -2275
- package/dist/prepare-solution-resources-wds3r8bq.js +0 -22
- package/dist/services/personal-workspace-deploy.d.ts +0 -49
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import {
|
|
2
|
+
INCOMPLETE_SWEEP_ADVICE,
|
|
3
|
+
findDeploymentAcrossFeeds,
|
|
4
|
+
reportIncompleteSweepAsync
|
|
5
|
+
} from "./packager-tool-b8pppqbb.js";
|
|
6
|
+
import {
|
|
7
|
+
Configuration,
|
|
8
|
+
DeploymentsApi,
|
|
9
|
+
WorkflowAction
|
|
10
|
+
} from "./packager-tool-t12hj6pd.js";
|
|
11
|
+
import {
|
|
12
|
+
getSolutionAuthContext
|
|
13
|
+
} from "./packager-tool-f5gq77m5.js";
|
|
14
|
+
import {
|
|
15
|
+
catchError,
|
|
16
|
+
extractErrorDetails
|
|
17
|
+
} from "./packager-tool-5fjp60dk.js";
|
|
18
|
+
|
|
19
|
+
// src/services/deploy-delete-service.ts
|
|
20
|
+
var fail = (reason, message, instructions, extras = {}) => ({
|
|
21
|
+
ok: false,
|
|
22
|
+
reason,
|
|
23
|
+
message,
|
|
24
|
+
instructions,
|
|
25
|
+
exitCode: extras.exitCode ?? 1,
|
|
26
|
+
errorCode: extras.errorCode,
|
|
27
|
+
retry: extras.retry
|
|
28
|
+
});
|
|
29
|
+
var AUTH_INSTRUCTIONS = "Run 'uip login' to refresh credentials, then retry. If the deployment is in a different tenant, switch with 'uip login tenant set <tenant>'.";
|
|
30
|
+
function buildUnavailableInstructions(deployment) {
|
|
31
|
+
const availableActions = deployment.actions?.length ? deployment.actions.join(", ") : "none";
|
|
32
|
+
const status = `(ActivationStatus: ${deployment.activationStatus}, OperationStatus: ${deployment.operationStatus})`;
|
|
33
|
+
if (deployment.operationStatus === "InProgress") {
|
|
34
|
+
return `Deployment '${deployment.name}' has an operation in progress ${status}. Wait for it to finish — run 'uip solution deploy list' to recheck — then retry. Available actions: ${availableActions}.`;
|
|
35
|
+
}
|
|
36
|
+
if (deployment.actions?.includes(WorkflowAction.Uninstall)) {
|
|
37
|
+
return `Deployment '${deployment.name}' offers Uninstall but not Delete ${status}. Run: uip solution deploy uninstall '${deployment.name}' --yes, then retry the delete. Available actions: ${availableActions}.`;
|
|
38
|
+
}
|
|
39
|
+
return `Deployment '${deployment.name}' cannot be deleted in its current state ${status}. Available actions: ${availableActions}. Run 'uip solution deploy list' to recheck its state.`;
|
|
40
|
+
}
|
|
41
|
+
function requestErrorInstructions(deploymentName, errorCode, details) {
|
|
42
|
+
switch (errorCode) {
|
|
43
|
+
case "authentication_required":
|
|
44
|
+
return `Your session may have expired. Run 'uip login' and retry. Details: ${details}`;
|
|
45
|
+
case "permission_denied":
|
|
46
|
+
return `Your account lacks permission to delete this deployment. Check your Orchestrator roles, then retry. Details: ${details}`;
|
|
47
|
+
case "rate_limited":
|
|
48
|
+
return `Too many requests. Wait a moment and retry. Details: ${details}`;
|
|
49
|
+
case "network_error":
|
|
50
|
+
return `Could not reach Orchestrator. Check your connection and retry. Details: ${details}`;
|
|
51
|
+
case "server_error":
|
|
52
|
+
return `Orchestrator returned a server error. Wait and retry; if it persists, check Orchestrator status. Details: ${details}`;
|
|
53
|
+
case "not_found":
|
|
54
|
+
return `Deployment '${deploymentName}' was found by name but the delete reported it missing — it may have been removed already. Run 'uip solution deploy list' to confirm. Details: ${details}`;
|
|
55
|
+
default:
|
|
56
|
+
return `Delete request failed. Run 'uip solution deploy list' to check the deployment's state, then retry. Details: ${details}`;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function deleteDeploymentAsync(deploymentName, options = {}) {
|
|
60
|
+
const [authError, auth] = await catchError(getSolutionAuthContext({
|
|
61
|
+
tenant: options.tenant,
|
|
62
|
+
loginValidity: options.loginValidity,
|
|
63
|
+
envFilePath: options.envFilePath
|
|
64
|
+
}));
|
|
65
|
+
if (authError) {
|
|
66
|
+
return fail("auth_failed", authError.message, AUTH_INSTRUCTIONS, {
|
|
67
|
+
errorCode: "authentication_required",
|
|
68
|
+
retry: "RetryWillNotFix"
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const sweep = await findDeploymentAcrossFeeds(auth, deploymentName, {
|
|
72
|
+
tenant: options.tenant,
|
|
73
|
+
loginValidity: options.loginValidity,
|
|
74
|
+
envFilePath: options.envFilePath,
|
|
75
|
+
includeUninstalled: true
|
|
76
|
+
});
|
|
77
|
+
const { location } = sweep;
|
|
78
|
+
if (!location && !sweep.complete) {
|
|
79
|
+
const report = await reportIncompleteSweepAsync(deploymentName, sweep.skipped);
|
|
80
|
+
const oneFeed = report.oneFeedFlags.map((flag) => `'uip solution deploy list ${flag}'`).join(" or ");
|
|
81
|
+
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 });
|
|
82
|
+
}
|
|
83
|
+
if (!location) {
|
|
84
|
+
return fail("deployment_not_found", `No deployment named '${deploymentName}' was found.`, "Run 'uip solution deploy list' to see valid deployment names.", { errorCode: "not_found", retry: "RetryWillNotFix" });
|
|
85
|
+
}
|
|
86
|
+
const { deployment, scope } = location;
|
|
87
|
+
if (deployment.actions?.length && !deployment.actions.includes(WorkflowAction.Delete)) {
|
|
88
|
+
const inProgress = deployment.operationStatus === "InProgress";
|
|
89
|
+
return fail("delete_unavailable", `Deployment '${deploymentName}' cannot be deleted in its current state.`, buildUnavailableInstructions(deployment), {
|
|
90
|
+
errorCode: "invalid_argument",
|
|
91
|
+
retry: inProgress ? "RetryLater" : "RetryWillNotFix"
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
const config = new Configuration({
|
|
95
|
+
basePath: auth.basePath,
|
|
96
|
+
accessToken: auth.accessToken
|
|
97
|
+
});
|
|
98
|
+
const deploymentsApi = new DeploymentsApi(config);
|
|
99
|
+
const [deleteError] = await catchError(deploymentsApi.deploymentsDelete({ deploymentKey: deployment.key }, scope));
|
|
100
|
+
if (deleteError) {
|
|
101
|
+
const detail = await extractErrorDetails(deleteError);
|
|
102
|
+
return fail("delete_request_failed", detail.message, requestErrorInstructions(deploymentName, detail.errorCode, detail.details), { errorCode: detail.errorCode, retry: detail.retry });
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
ok: true,
|
|
106
|
+
deploymentName,
|
|
107
|
+
deploymentKey: deployment.key
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { deleteDeploymentAsync };
|
|
112
|
+
|
|
113
|
+
//# debugId=D4EB3B798936BE2864756E2164756E21
|