@uipath/solution-tool 1.204.0 → 1.205.0-preview.258
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 +3 -3
- package/dist/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/archive-extract-x35t9ktj.js +120 -0
- package/dist/cleanup-command-service-rc5e42hk.js +149 -0
- package/dist/deploy-delete-service-qdbtj3qd.js +25 -0
- package/dist/deploy-run-service-m9mg34n5.js +25 -0
- package/dist/{deploy-status-service-3req7hje.js → deploy-status-service-kz3nk43q.js} +41 -33
- package/dist/deploy.js +23 -17
- package/dist/{deployment-search-3mah6f0a.js → deployment-search-jvwyaqek.js} +16 -10
- package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
- package/dist/{feed-resolver-bxj9xkgr.js → feed-resolver-3xb7ayx4.js} +10 -9
- package/dist/feed-scope-failure-qps17dv3.js +19 -0
- package/dist/{feed-session-sxga31vn.js → feed-session-7xqphdrg.js} +3 -3
- package/dist/governance-options-amc1v319.js +32 -0
- package/dist/index-6wak6hg6.js +667 -0
- package/dist/index-prm27bvm.js +138 -0
- package/dist/index.js +27 -29
- package/dist/init.js +11 -10
- package/dist/{list-s5pkkefj.js → list-7jy11vb4.js} +10 -8
- package/dist/models/pack-command-types.d.ts +15 -0
- package/dist/node-p1scvsw8.js +86 -0
- package/dist/pack-command-service-8etwpgm9.js +35 -0
- package/dist/pack-project-hjvbvhgx.js +97 -0
- package/dist/pack.js +24 -14
- package/dist/package-id-c18sx4mz.js +13 -0
- package/dist/packager-tool-09fwj7e8.js +171 -0
- package/dist/{packager-tool-nfmygm61.js → packager-tool-361zx07h.js} +74 -23
- package/dist/packager-tool-37jmavap.js +42 -0
- package/dist/{packager-tool-px1j9kre.js → packager-tool-3bwnkjdq.js} +2 -2
- package/dist/{packager-tool-gb35b4qs.js → packager-tool-43ahv5mn.js} +192 -96
- package/dist/packager-tool-47wzvqw0.js +86 -0
- package/dist/{packager-tool-gfhdpkp3.js → packager-tool-4bq36bf5.js} +25 -4
- package/dist/packager-tool-4jekgh4s.js +517 -0
- package/dist/{packager-tool-zns6n8zp.js → packager-tool-5ddtwzva.js} +1 -1
- package/dist/packager-tool-5edvzz80.js +543 -0
- package/dist/packager-tool-5y09xhx5.js +1333 -0
- package/dist/packager-tool-60af1hw2.js +26 -0
- package/dist/{packager-tool-f5gq77m5.js → packager-tool-61pwb567.js} +2 -2
- package/dist/{packager-tool-kdwsw2x7.js → packager-tool-69jmxeh0.js} +196 -1519
- package/dist/{packager-tool-yrz4mwfn.js → packager-tool-6kz1pv9f.js} +1373 -486
- package/dist/{packager-tool-stsnbewn.js → packager-tool-6x35kvbx.js} +17 -8
- package/dist/packager-tool-6ybywxxn.js +1809 -0
- package/dist/{packager-tool-wfkv9v8b.js → packager-tool-85pen8t9.js} +2196 -3455
- package/dist/packager-tool-8ptbmmmp.js +2132 -0
- package/dist/{packager-tool-9ex75r32.js → packager-tool-8q4tvv8d.js} +6 -4
- package/dist/packager-tool-8rg0s4w9.js +109 -0
- package/dist/{packager-tool-7gr2nphb.js → packager-tool-97rcgwvv.js} +224 -6
- package/dist/packager-tool-act5r386.js +239 -0
- package/dist/packager-tool-amhyxzz6.js +125 -0
- package/dist/{packager-tool-j3520gxw.js → packager-tool-an5bpbwe.js} +3556 -1646
- package/dist/{packager-tool-e2rtr49j.js → packager-tool-b2nhscfk.js} +15 -31
- package/dist/packager-tool-bqw7edje.js +188 -0
- package/dist/{packager-tool-4gs8y6pr.js → packager-tool-dwxswyv4.js} +149 -53
- package/dist/{packager-tool-fehvgd51.js → packager-tool-e7vczxa8.js} +357 -1370
- package/dist/{packager-tool-v8bkkqdb.js → packager-tool-gmwva4yv.js} +5 -5
- package/dist/packager-tool-gs3f3tf7.js +103 -0
- package/dist/packager-tool-kkfb5kgn.js +182 -0
- package/dist/{packager-tool-ds45xby2.js → packager-tool-m74zqwmh.js} +104 -14
- package/dist/{packager-tool-fv7xyzg2.js → packager-tool-pbmqk39a.js} +126 -128
- package/dist/packager-tool-q5j6k3fy.js +1510 -0
- package/dist/packager-tool-qk21gk5m.js +445 -0
- package/dist/{packager-tool-bqre28m1.js → packager-tool-qw47eyw7.js} +1 -1
- package/dist/packager-tool-resolver-994z3jkj.js +23 -0
- package/dist/{packager-tool-gab9y5ct.js → packager-tool-t8gh825q.js} +37 -13
- package/dist/{packager-tool-kswwd3hp.js → packager-tool-tx834spe.js} +2376 -4077
- package/dist/{packager-tool-zf3929se.js → packager-tool-v1f5e8t9.js} +11 -1
- package/dist/{packager-tool-g8kjzrg7.js → packager-tool-wknfv4p5.js} +13 -11
- package/dist/{packager-tool-1rzssy0x.js → packager-tool-wy4fx250.js} +19 -18
- package/dist/packager-tool-y2k2f6yg.js +68 -0
- package/dist/packager-tool.js +2 -2
- package/dist/prepare-solution-resources-m1djfj62.js +29 -0
- package/dist/project-command-utils-t6pmpvq3.js +90 -0
- package/dist/project-contributions-79ndycrx.js +32 -0
- package/dist/publish.js +13 -12
- package/dist/resource-mutations-c3krjqze.js +36 -0
- package/dist/resource-version-lookup-0e3e2j58.js +99 -0
- package/dist/resource.js +10 -9
- package/dist/restore-command-service-eyx911f2.js +155 -0
- package/dist/run-service-p1vzzqe3.js +428 -0
- package/dist/services/deploy-activate-service.d.ts +10 -5
- package/dist/services/deploy-delete-service.d.ts +8 -4
- package/dist/services/deploy-run-service.d.ts +34 -1
- package/dist/services/deploy-uninstall-service.d.ts +21 -3
- package/dist/services/deploy-upgrade-service.d.ts +35 -1
- package/dist/services/deployment-feed-locator.d.ts +15 -4
- package/dist/services/deployment-search-client.d.ts +5 -53
- package/dist/services/deployment-search.d.ts +58 -3
- package/dist/services/deployment-state.d.ts +84 -24
- package/dist/services/deployment-validation.d.ts +5 -0
- package/dist/services/emit-runtime-dependencies.d.ts +2 -1
- package/dist/services/feed-resolver.d.ts +6 -4
- package/dist/services/feed-selection.d.ts +47 -0
- package/dist/services/http-status.d.ts +2 -7
- package/dist/services/pack-command-service.d.ts +9 -0
- package/dist/services/pack-project-selection.d.ts +51 -0
- package/dist/services/pack-project.d.ts +26 -0
- package/dist/services/pack-service.d.ts +7 -3
- package/dist/services/package-search-client.d.ts +7 -0
- package/dist/services/packager-tool-resolver.d.ts +7 -1
- package/dist/services/packages-list-service.d.ts +1 -1
- package/dist/services/permanent-deletion-consent.d.ts +110 -0
- package/dist/services/pipeline-deploy-poll.d.ts +7 -0
- package/dist/services/prepare-solution-resources.d.ts +12 -2
- package/dist/services/project-contributions.d.ts +5 -4
- package/dist/services/search-failure.d.ts +9 -13
- package/dist/services/solution-packager-helpers.d.ts +5 -2
- package/dist/services/solution-path.d.ts +1 -1
- package/dist/services/uninstall-consent.d.ts +82 -0
- package/dist/ship-telemetry-myes7ak5.js +21 -0
- package/dist/solution-auth-aead70sw.js +11 -0
- package/dist/templates/AGENTS.md +125 -12
- package/dist/tool.js +27 -29
- package/dist/utils/deployment-errors.d.ts +9 -1
- package/package.json +2 -2
- package/dist/deploy-delete-service-1zydyyhj.js +0 -22
- package/dist/feed-scope-failure-2kndwpf6.js +0 -18
- package/dist/packager-tool-f2e9rzxk.js +0 -104
- package/dist/packager-tool-resolver-6zwhec62.js +0 -20
- package/dist/packager-tool-zdfn32bc.js +0 -4465
- package/dist/prepare-solution-resources-jpb5as2s.js +0 -25
- package/dist/project-contributions-6wpff2hm.js +0 -30
- package/dist/services/legacy-deployment-search-v3.d.ts +0 -23
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PackService
|
|
3
|
+
} from "./packager-tool-85pen8t9.js";
|
|
4
|
+
import {
|
|
5
|
+
Path
|
|
6
|
+
} from "./packager-tool-pbmqk39a.js";
|
|
7
|
+
// ../packager/solution-packager/src/services/package-id-reader.ts
|
|
8
|
+
var legacySolutionResourcesFileName = "resources.json";
|
|
9
|
+
|
|
10
|
+
class PackageIdReader {
|
|
11
|
+
fileSystem;
|
|
12
|
+
packService;
|
|
13
|
+
projectTypesToFolderNameMapping = {
|
|
14
|
+
processorchestration: "processOrchestration",
|
|
15
|
+
casemanagement: "caseManagement",
|
|
16
|
+
agent: "agent",
|
|
17
|
+
api: "api",
|
|
18
|
+
webapp: "webApp",
|
|
19
|
+
process: "process",
|
|
20
|
+
flow: "flow"
|
|
21
|
+
};
|
|
22
|
+
static projectTypeMap = {
|
|
23
|
+
process: "Rpa",
|
|
24
|
+
library: "Lib",
|
|
25
|
+
tests: "Tests",
|
|
26
|
+
webapp: "App",
|
|
27
|
+
processorchestration: "Agentic",
|
|
28
|
+
casemanagement: "Case",
|
|
29
|
+
api: "Api",
|
|
30
|
+
agent: "Agent",
|
|
31
|
+
flow: "Flow"
|
|
32
|
+
};
|
|
33
|
+
constructor(fileSystem, packService) {
|
|
34
|
+
this.fileSystem = fileSystem;
|
|
35
|
+
this.packService = packService;
|
|
36
|
+
}
|
|
37
|
+
async read(project, solutionPath, solutionName) {
|
|
38
|
+
try {
|
|
39
|
+
if (!solutionPath || solutionPath.trim() === "") {
|
|
40
|
+
return this.defaultToProjectFolder(project, solutionPath, solutionName);
|
|
41
|
+
}
|
|
42
|
+
return await this.readFromResourcesDirectory(project, solutionPath) || await this.readFromLegacyResourcesJson(project, solutionPath) || this.defaultToProjectFolder(project, solutionPath, solutionName);
|
|
43
|
+
} catch (ex) {
|
|
44
|
+
console.error("Error reading package ID:", ex);
|
|
45
|
+
return this.defaultToProjectFolder(project, solutionPath, solutionName);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
defaultToProjectFolder(project, solutionPath, solutionName) {
|
|
49
|
+
const projectFolderName = Path.dirname(project.ProjectRelativePath);
|
|
50
|
+
const id = this.packService.sanitizePackageId(projectFolderName);
|
|
51
|
+
return this.getPackageId(id, project, solutionPath, solutionName);
|
|
52
|
+
}
|
|
53
|
+
getPackageId(rootPackageId, project, solutionPath, solutionName) {
|
|
54
|
+
const packageId = this.composePackageId(rootPackageId, project, solutionPath, solutionName);
|
|
55
|
+
return this.packService.sanitizePackageId(packageId);
|
|
56
|
+
}
|
|
57
|
+
composePackageId(rootPackageId, project, solutionPath, solutionName) {
|
|
58
|
+
if (!solutionName && (!solutionPath || solutionPath.trim() === "")) {
|
|
59
|
+
return rootPackageId;
|
|
60
|
+
}
|
|
61
|
+
const resolvedSolutionName = solutionName || this.deriveSolutionName(solutionPath);
|
|
62
|
+
const parts = [resolvedSolutionName];
|
|
63
|
+
if (project.Type) {
|
|
64
|
+
parts.push(PackageIdReader.normalizeProjectType(project.Type));
|
|
65
|
+
}
|
|
66
|
+
parts.push(rootPackageId);
|
|
67
|
+
return parts.join(".");
|
|
68
|
+
}
|
|
69
|
+
static normalizeProjectType(projectType) {
|
|
70
|
+
const normalizedKey = projectType.toLowerCase();
|
|
71
|
+
return PackageIdReader.projectTypeMap[normalizedKey] || projectType;
|
|
72
|
+
}
|
|
73
|
+
deriveSolutionName(solutionPath) {
|
|
74
|
+
const ext = Path.extname(solutionPath);
|
|
75
|
+
const base = Path.basename(solutionPath);
|
|
76
|
+
return ext ? base.substring(0, base.length - ext.length) : base;
|
|
77
|
+
}
|
|
78
|
+
async readFromLegacyResourcesJson(project, solutionPath) {
|
|
79
|
+
const resourcesFilePath = Path.join(solutionPath, legacySolutionResourcesFileName);
|
|
80
|
+
const exists = await this.fileSystem.exists(resourcesFilePath);
|
|
81
|
+
if (!exists) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
const data = await this.fileSystem.readFile(resourcesFilePath);
|
|
85
|
+
if (!data) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const json = new TextDecoder().decode(data);
|
|
89
|
+
return this.getProjectIdFromJson(project, json);
|
|
90
|
+
}
|
|
91
|
+
getProjectIdFromJson(project, json) {
|
|
92
|
+
try {
|
|
93
|
+
const jsonObject = JSON.parse(json);
|
|
94
|
+
const resources = this.getProperty(jsonObject, "resources");
|
|
95
|
+
if (!Array.isArray(resources)) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const resource = resources.find((r) => {
|
|
99
|
+
const projectKey = this.getProperty(r, "projectKey");
|
|
100
|
+
const kind = this.getProperty(r, "kind");
|
|
101
|
+
return projectKey === project.Id && typeof kind === "string" && kind.toLowerCase() === "process";
|
|
102
|
+
});
|
|
103
|
+
if (!resource) {
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
const spec = this.getProperty(resource, "spec");
|
|
107
|
+
if (!spec) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
const packageName = this.getProperty(spec, "packageName");
|
|
111
|
+
if (!packageName || typeof packageName !== "string" || packageName.trim() === "") {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
return packageName;
|
|
115
|
+
} catch (ex) {
|
|
116
|
+
console.error("Error parsing legacy resources JSON:", ex);
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
async readFromResourcesDirectory(project, solutionPath) {
|
|
121
|
+
const projectTypeLower = project.Type.toLowerCase();
|
|
122
|
+
const projectTypeFolder = this.projectTypesToFolderNameMapping[projectTypeLower] || Path.dirname(project.ProjectRelativePath);
|
|
123
|
+
const processDirectory = Path.join(solutionPath, "resources", "solution_folder", "process", projectTypeFolder);
|
|
124
|
+
const stats = await this.fileSystem.stat(processDirectory);
|
|
125
|
+
if (!stats?.isDirectory()) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
const files = await this.fileSystem.readdir(processDirectory);
|
|
129
|
+
const jsonFiles = files.filter((f) => f.endsWith(".json")).map((f) => Path.join(processDirectory, f));
|
|
130
|
+
for (const jsonFile of jsonFiles) {
|
|
131
|
+
try {
|
|
132
|
+
const data = await this.fileSystem.readFile(jsonFile);
|
|
133
|
+
if (!data) {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
const json = new TextDecoder().decode(data);
|
|
137
|
+
const jsonObject = JSON.parse(json);
|
|
138
|
+
const resource = this.getProperty(jsonObject, "resource");
|
|
139
|
+
const projectKey = this.getProperty(resource, "projectKey");
|
|
140
|
+
if (projectKey === project.Id) {
|
|
141
|
+
const spec = this.getProperty(resource, "spec");
|
|
142
|
+
const packageName = this.getProperty(spec, "packageName");
|
|
143
|
+
if (typeof packageName !== "string" || packageName.trim() === "") {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
return packageName;
|
|
147
|
+
}
|
|
148
|
+
} catch (ex) {
|
|
149
|
+
console.error("Error reading resource file:", jsonFile, ex);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
getProperty(obj, propertyName) {
|
|
155
|
+
if (!obj || typeof obj !== "object") {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
const keys = Object.keys(obj);
|
|
159
|
+
const matchingKey = keys.find((key) => key.toLowerCase() === propertyName.toLowerCase());
|
|
160
|
+
return matchingKey ? obj[matchingKey] : null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
async function readMemberPackageIdAsync(fileSystem, project, solutionPath, solutionName) {
|
|
164
|
+
const packService = new PackService;
|
|
165
|
+
const packageId = await new PackageIdReader(fileSystem, packService).read(project, solutionPath, solutionName);
|
|
166
|
+
return packageId ? packService.sanitizePackageId(packageId) : packageId;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { PackageIdReader, readMemberPackageIdAsync };
|
|
170
|
+
|
|
171
|
+
//# debugId=95D09CBD9B00686D64756E2164756E21
|
|
@@ -1,20 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveFeedSelectionAsync
|
|
3
|
+
} from "./packager-tool-y2k2f6yg.js";
|
|
1
4
|
import {
|
|
2
5
|
INCOMPLETE_SWEEP_ADVICE,
|
|
3
6
|
findDeploymentAcrossFeeds,
|
|
4
7
|
reportIncompleteSweepAsync
|
|
5
|
-
} from "./packager-tool-
|
|
8
|
+
} from "./packager-tool-4bq36bf5.js";
|
|
9
|
+
import {
|
|
10
|
+
hasServerErrorCode,
|
|
11
|
+
isBareResponse
|
|
12
|
+
} from "./packager-tool-act5r386.js";
|
|
13
|
+
import {
|
|
14
|
+
feedSelectorFlag
|
|
15
|
+
} from "./packager-tool-6x35kvbx.js";
|
|
6
16
|
import {
|
|
7
17
|
Configuration,
|
|
18
|
+
PipelinesApi
|
|
19
|
+
} from "./packager-tool-97rcgwvv.js";
|
|
20
|
+
import {
|
|
21
|
+
Configuration as Configuration2,
|
|
8
22
|
DeploymentsApi,
|
|
9
23
|
WorkflowAction
|
|
10
|
-
} from "./packager-tool-
|
|
24
|
+
} from "./packager-tool-an5bpbwe.js";
|
|
25
|
+
import {
|
|
26
|
+
classifyFeedSession
|
|
27
|
+
} from "./packager-tool-qw47eyw7.js";
|
|
11
28
|
import {
|
|
12
29
|
getSolutionAuthContext
|
|
13
|
-
} from "./packager-tool-
|
|
30
|
+
} from "./packager-tool-61pwb567.js";
|
|
14
31
|
import {
|
|
15
32
|
catchError,
|
|
16
33
|
extractErrorDetails
|
|
17
|
-
} from "./packager-tool-
|
|
34
|
+
} from "./packager-tool-6ybywxxn.js";
|
|
18
35
|
|
|
19
36
|
// src/services/deploy-delete-service.ts
|
|
20
37
|
var fail = (reason, message, instructions, extras = {}) => ({
|
|
@@ -27,18 +44,18 @@ var fail = (reason, message, instructions, extras = {}) => ({
|
|
|
27
44
|
retry: extras.retry
|
|
28
45
|
});
|
|
29
46
|
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) {
|
|
47
|
+
function buildUnavailableInstructions(deployment, feedSelector) {
|
|
31
48
|
const availableActions = deployment.actions?.length ? deployment.actions.join(", ") : "none";
|
|
32
49
|
const status = `(ActivationStatus: ${deployment.activationStatus}, OperationStatus: ${deployment.operationStatus})`;
|
|
33
50
|
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}.`;
|
|
51
|
+
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}.`;
|
|
35
52
|
}
|
|
36
53
|
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}.`;
|
|
54
|
+
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}.`;
|
|
38
55
|
}
|
|
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.`;
|
|
56
|
+
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.`;
|
|
40
57
|
}
|
|
41
|
-
function requestErrorInstructions(deploymentName, errorCode, details) {
|
|
58
|
+
function requestErrorInstructions(deploymentName, errorCode, details, feedSelector) {
|
|
42
59
|
switch (errorCode) {
|
|
43
60
|
case "authentication_required":
|
|
44
61
|
return `Your session may have expired. Run 'uip login' and retry. Details: ${details}`;
|
|
@@ -51,11 +68,36 @@ function requestErrorInstructions(deploymentName, errorCode, details) {
|
|
|
51
68
|
case "server_error":
|
|
52
69
|
return `Orchestrator returned a server error. Wait and retry; if it persists, check Orchestrator status. Details: ${details}`;
|
|
53
70
|
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}`;
|
|
71
|
+
return `Deployment '${deploymentName}' was found by name but the delete reported it missing — it may have been removed already. Run 'uip solution deploy list${feedSelector}' to confirm. Details: ${details}`;
|
|
55
72
|
default:
|
|
56
|
-
return `Delete request failed. Run 'uip solution deploy list' to check the deployment's state, then retry. Details: ${details}`;
|
|
73
|
+
return `Delete request failed. Run 'uip solution deploy list${feedSelector}' to check the deployment's state, then retry. Details: ${details}`;
|
|
57
74
|
}
|
|
58
75
|
}
|
|
76
|
+
async function sendDeleteAsync(auth, deploymentKey, scope) {
|
|
77
|
+
const pipelinesApi = new PipelinesApi(new Configuration({
|
|
78
|
+
basePath: auth.basePath,
|
|
79
|
+
accessToken: auth.accessToken
|
|
80
|
+
}));
|
|
81
|
+
const [pipelinesError] = await catchError(pipelinesApi.pipelinesDeleteDeploymentByKey({ deploymentKey }, scope));
|
|
82
|
+
if (!pipelinesError) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const detail = await extractErrorDetails(pipelinesError);
|
|
86
|
+
const status = detail.context?.httpStatus;
|
|
87
|
+
const missingRoute = status === 405 || status === 404 && isBareResponse(detail.details);
|
|
88
|
+
if (!missingRoute) {
|
|
89
|
+
return detail;
|
|
90
|
+
}
|
|
91
|
+
if (classifyFeedSession(auth) === "application") {
|
|
92
|
+
return "missing_route_for_application";
|
|
93
|
+
}
|
|
94
|
+
const deploymentsApi = new DeploymentsApi(new Configuration2({
|
|
95
|
+
basePath: auth.basePath,
|
|
96
|
+
accessToken: auth.accessToken
|
|
97
|
+
}));
|
|
98
|
+
const [solutionsError] = await catchError(deploymentsApi.deploymentsDelete({ deploymentKey }, scope));
|
|
99
|
+
return solutionsError ? extractErrorDetails(solutionsError) : undefined;
|
|
100
|
+
}
|
|
59
101
|
async function deleteDeploymentAsync(deploymentName, options = {}) {
|
|
60
102
|
const [authError, auth] = await catchError(getSolutionAuthContext({
|
|
61
103
|
tenant: options.tenant,
|
|
@@ -68,10 +110,19 @@ async function deleteDeploymentAsync(deploymentName, options = {}) {
|
|
|
68
110
|
retry: "RetryWillNotFix"
|
|
69
111
|
});
|
|
70
112
|
}
|
|
113
|
+
const selection = await resolveFeedSelectionAsync(auth, options, "Deleting a deployment");
|
|
114
|
+
if (!selection.ok) {
|
|
115
|
+
return fail(selection.reason, selection.message, selection.instructions, {
|
|
116
|
+
errorCode: selection.errorCode,
|
|
117
|
+
retry: selection.retry
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
const { selectedFeed } = selection;
|
|
71
121
|
const sweep = await findDeploymentAcrossFeeds(auth, deploymentName, {
|
|
72
122
|
tenant: options.tenant,
|
|
73
123
|
loginValidity: options.loginValidity,
|
|
74
124
|
envFilePath: options.envFilePath,
|
|
125
|
+
selectedFeed,
|
|
75
126
|
includeUninstalled: true
|
|
76
127
|
});
|
|
77
128
|
const { location } = sweep;
|
|
@@ -81,25 +132,25 @@ async function deleteDeploymentAsync(deploymentName, options = {}) {
|
|
|
81
132
|
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
133
|
}
|
|
83
134
|
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" });
|
|
135
|
+
return fail("deployment_not_found", `No deployment named '${deploymentName}' was found.`, selectedFeed ? `Run 'uip solution deploy list${feedSelectorFlag(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" });
|
|
85
136
|
}
|
|
86
137
|
const { deployment, scope } = location;
|
|
87
138
|
if (deployment.actions?.length && !deployment.actions.includes(WorkflowAction.Delete)) {
|
|
88
139
|
const inProgress = deployment.operationStatus === "InProgress";
|
|
89
|
-
return fail("delete_unavailable", `Deployment '${deploymentName}' cannot be deleted in its current state.`, buildUnavailableInstructions(deployment), {
|
|
140
|
+
return fail("delete_unavailable", `Deployment '${deploymentName}' cannot be deleted in its current state.`, buildUnavailableInstructions(deployment, feedSelectorFlag(location.feed)), {
|
|
90
141
|
errorCode: "invalid_argument",
|
|
91
142
|
retry: inProgress ? "RetryLater" : "RetryWillNotFix"
|
|
92
143
|
});
|
|
93
144
|
}
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return fail("delete_request_failed", detail.message, requestErrorInstructions(deploymentName, detail.errorCode, detail.details), { errorCode: detail.errorCode, retry: detail.retry });
|
|
145
|
+
const detail = await sendDeleteAsync(auth, deployment.key, scope);
|
|
146
|
+
if (detail === "missing_route_for_application") {
|
|
147
|
+
return fail("delete_request_failed", `This server cannot delete deployment '${deploymentName}' for an external application.`, "The server has no Pipelines delete route yet, and the deprecated route it replaces accepts user sessions only. Nothing was deleted. Run the delete with a user session ('uip login'), or remove the record in the Orchestrator Solutions UI.", { errorCode: "permission_denied", retry: "RetryWillNotFix" });
|
|
148
|
+
}
|
|
149
|
+
if (detail) {
|
|
150
|
+
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${feedSelectorFlag(location.feed)}' to recheck), then retry. Details: ${detail.details}`, { errorCode: "invalid_argument", retry: "RetryLater" });
|
|
152
|
+
}
|
|
153
|
+
return fail("delete_request_failed", detail.message, requestErrorInstructions(deploymentName, detail.errorCode, detail.details, feedSelectorFlag(location.feed)), { errorCode: detail.errorCode, retry: detail.retry });
|
|
103
154
|
}
|
|
104
155
|
return {
|
|
105
156
|
ok: true,
|
|
@@ -110,4 +161,4 @@ async function deleteDeploymentAsync(deploymentName, options = {}) {
|
|
|
110
161
|
|
|
111
162
|
export { deleteDeploymentAsync };
|
|
112
163
|
|
|
113
|
-
//# debugId=
|
|
164
|
+
//# debugId=6645C240B208006964756E2164756E21
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PackCommandService
|
|
3
|
+
} from "./packager-tool-4jekgh4s.js";
|
|
4
|
+
import {
|
|
5
|
+
isUnpackableProjectTypeError
|
|
6
|
+
} from "./packager-tool-b2nhscfk.js";
|
|
7
|
+
import {
|
|
8
|
+
carriedErrorCode
|
|
9
|
+
} from "./packager-tool-tx834spe.js";
|
|
10
|
+
import {
|
|
11
|
+
carriedInstructions,
|
|
12
|
+
catchError
|
|
13
|
+
} from "./packager-tool-6ybywxxn.js";
|
|
14
|
+
|
|
15
|
+
// src/services/pack-service.ts
|
|
16
|
+
async function packSolutionAsync(solutionPath, options) {
|
|
17
|
+
const service = new PackCommandService;
|
|
18
|
+
const [error, result] = await catchError(service.executeAsync(solutionPath, options));
|
|
19
|
+
if (error) {
|
|
20
|
+
if (!isUnpackableProjectTypeError(error) && carriedErrorCode(error) === undefined) {
|
|
21
|
+
throw error;
|
|
22
|
+
}
|
|
23
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
24
|
+
const instructions = carriedInstructions(error);
|
|
25
|
+
return {
|
|
26
|
+
ok: false,
|
|
27
|
+
errorCode: "INTERNAL_ERROR" /* InternalError */,
|
|
28
|
+
message: instructions ? `${message} ${instructions}` : message,
|
|
29
|
+
packages: []
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
ok: result.errorCode === "SUCCESS" /* Success */,
|
|
34
|
+
errorCode: result.errorCode,
|
|
35
|
+
message: result.message ?? "",
|
|
36
|
+
packages: result.packages
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { packSolutionAsync };
|
|
41
|
+
|
|
42
|
+
//# debugId=79D5D443E78F177864756E2164756E21
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catchError
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-6ybywxxn.js";
|
|
4
4
|
import {
|
|
5
5
|
getFileSystem
|
|
6
|
-
} from "./packager-tool-
|
|
6
|
+
} from "./packager-tool-v1f5e8t9.js";
|
|
7
7
|
|
|
8
8
|
// src/services/solution-init-service.ts
|
|
9
9
|
var AGENTS_FILENAME = "AGENTS.md";
|