@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,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-bs1jn1yn.js";
|
|
13
10
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
Configuration3,
|
|
12
|
+
WorkflowAction2,
|
|
13
|
+
DeploymentsApi2
|
|
14
|
+
} from "./packager-tool-a6va4gc5.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-fqs6hdcy.js";
|
|
25
21
|
import {
|
|
26
|
-
|
|
27
|
-
} from "./packager-tool-
|
|
22
|
+
resolveFeedSelectionAsync
|
|
23
|
+
} from "./packager-tool-q5d9df2q.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-wm0h0wa1.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
|
|
@@ -1,40 +1,190 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
Path,
|
|
3
|
+
TemporaryStorageService,
|
|
4
|
+
ZipService,
|
|
5
|
+
I18nManager,
|
|
6
|
+
translate,
|
|
7
|
+
ToolResult,
|
|
8
|
+
toolsFactoryRepository
|
|
9
|
+
} from "./packager-tool-a7s0gbxs.js";
|
|
9
10
|
import {
|
|
11
|
+
PackagerParameters,
|
|
12
|
+
setGlobalLogHandler,
|
|
13
|
+
ToolLogger2,
|
|
10
14
|
GovernancePolicyService,
|
|
15
|
+
resolveProducedNupkgsAsync,
|
|
16
|
+
isPackageIdTooLongError,
|
|
11
17
|
PackService,
|
|
12
|
-
|
|
18
|
+
signNupkgsAsync,
|
|
13
19
|
PackagerParametersValidator,
|
|
14
20
|
ProjectLoader,
|
|
15
21
|
ProjectToolExecutor,
|
|
16
|
-
ToolLogger,
|
|
17
22
|
ToolsFactory,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from "./packager-tool-wm0jaz7p.js";
|
|
23
|
+
ProjectPackager,
|
|
24
|
+
PackageIdReader
|
|
25
|
+
} from "./packager-tool-t3a48ys5.js";
|
|
22
26
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
TemporaryStorageService,
|
|
26
|
-
ToolResult,
|
|
27
|
-
ZipService,
|
|
28
|
-
toolsFactoryRepository,
|
|
29
|
-
translate
|
|
30
|
-
} from "./packager-tool-pbmqk39a.js";
|
|
27
|
+
NodeFileSystem
|
|
28
|
+
} from "./packager-tool-vgrswa8p.js";
|
|
31
29
|
import {
|
|
32
30
|
PackagerDimensions,
|
|
33
|
-
carriedInstructions
|
|
34
|
-
|
|
31
|
+
carriedInstructions,
|
|
32
|
+
TelemetryService
|
|
33
|
+
} from "./packager-tool-m07vyk89.js";
|
|
34
|
+
import {
|
|
35
|
+
DebugTelemetryProvider,
|
|
36
|
+
NodeContextStorage
|
|
37
|
+
} from "./packager-tool-9vrwpgt3.js";
|
|
38
|
+
// ../packager/project-packager/src/base-node-packager-factory.ts
|
|
39
|
+
class BaseNodePackagerFactory2 {
|
|
40
|
+
dotnetDiscovery;
|
|
41
|
+
getOrCreateFileSystem(config) {
|
|
42
|
+
return config?.fileSystem ?? new NodeFileSystem;
|
|
43
|
+
}
|
|
44
|
+
getOrCreateTelemetryService(config) {
|
|
45
|
+
if (config?.telemetryService) {
|
|
46
|
+
return config.telemetryService;
|
|
47
|
+
}
|
|
48
|
+
const provider = new DebugTelemetryProvider;
|
|
49
|
+
const contextStorage = new NodeContextStorage;
|
|
50
|
+
return new TelemetryService(provider, contextStorage);
|
|
51
|
+
}
|
|
52
|
+
checkDotnetAvailability(logger) {
|
|
53
|
+
if (!this.dotnetDiscovery) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const version = this.dotnetDiscovery.getDotnetVersion();
|
|
57
|
+
if (version) {
|
|
58
|
+
logger.info(translate.t("solutionpackager.dotnet.info.available", {
|
|
59
|
+
version
|
|
60
|
+
}));
|
|
61
|
+
} else {
|
|
62
|
+
logger.warn(translate.t("solutionpackager.dotnet.warnings.notAvailable"));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
configureLogHandler(config) {
|
|
66
|
+
if (config?.logHandler) {
|
|
67
|
+
setGlobalLogHandler(config.logHandler);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
configureLanguage(config) {
|
|
71
|
+
const language = config?.language ?? "en";
|
|
72
|
+
translate.setLocale(language);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// ../packager/project-packager/src/services/dotnet-discovery-service.ts
|
|
76
|
+
import { execSync } from "node:child_process";
|
|
35
77
|
|
|
78
|
+
class DotnetDiscoveryService2 {
|
|
79
|
+
cachedVersion;
|
|
80
|
+
isDotnetAvailable() {
|
|
81
|
+
return this.getDotnetVersion() !== undefined;
|
|
82
|
+
}
|
|
83
|
+
getDotnetVersion() {
|
|
84
|
+
if (this.cachedVersion !== undefined) {
|
|
85
|
+
return this.cachedVersion;
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
const output = execSync("dotnet --version", {
|
|
89
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
90
|
+
encoding: "utf-8"
|
|
91
|
+
});
|
|
92
|
+
this.cachedVersion = output.trim();
|
|
93
|
+
return this.cachedVersion;
|
|
94
|
+
} catch {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ../packager/project-packager/src/services/package-sign-service.ts
|
|
101
|
+
import { spawn } from "node:child_process";
|
|
102
|
+
class NodePackageSignService2 {
|
|
103
|
+
dotnetDiscovery;
|
|
104
|
+
logger;
|
|
105
|
+
constructor(dotnetDiscovery, logger) {
|
|
106
|
+
this.dotnetDiscovery = dotnetDiscovery;
|
|
107
|
+
this.logger = logger;
|
|
108
|
+
}
|
|
109
|
+
async signPackageAsync(packagePath, certificatePath, certificatePassword, timestampServer) {
|
|
110
|
+
return this.signPackagesAsync([packagePath], certificatePath, certificatePassword, timestampServer);
|
|
111
|
+
}
|
|
112
|
+
async signPackagesAsync(packagePaths, certificatePath, certificatePassword, timestampServer) {
|
|
113
|
+
if (packagePaths.length === 0) {
|
|
114
|
+
return ToolResult.success();
|
|
115
|
+
}
|
|
116
|
+
if (!this.dotnetDiscovery.isDotnetAvailable()) {
|
|
117
|
+
return ToolResult.error("INTERNAL_ERROR" /* InternalError */, translate.t("solutionpackager.signing.errors.dotnetNotAvailable"));
|
|
118
|
+
}
|
|
119
|
+
const args = [
|
|
120
|
+
"nuget",
|
|
121
|
+
"sign",
|
|
122
|
+
...packagePaths,
|
|
123
|
+
"--certificate-path",
|
|
124
|
+
certificatePath,
|
|
125
|
+
"--overwrite"
|
|
126
|
+
];
|
|
127
|
+
if (certificatePassword) {
|
|
128
|
+
args.push("--certificate-password", certificatePassword);
|
|
129
|
+
}
|
|
130
|
+
if (timestampServer) {
|
|
131
|
+
args.push("--timestamper", timestampServer);
|
|
132
|
+
}
|
|
133
|
+
return new Promise((resolve) => {
|
|
134
|
+
const childProcess = spawn("dotnet", args, {
|
|
135
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
136
|
+
shell: false,
|
|
137
|
+
windowsHide: true
|
|
138
|
+
});
|
|
139
|
+
let stderr = "";
|
|
140
|
+
childProcess.stdout?.on("data", (data) => {
|
|
141
|
+
this.logger.info(data.toString().trim());
|
|
142
|
+
});
|
|
143
|
+
childProcess.stderr?.on("data", (data) => {
|
|
144
|
+
stderr += data.toString();
|
|
145
|
+
});
|
|
146
|
+
childProcess.on("error", (error) => {
|
|
147
|
+
this.logger.error(`Failed to start dotnet process: ${error.message}`);
|
|
148
|
+
resolve(ToolResult.error("INTERNAL_ERROR" /* InternalError */, `Failed to start dotnet process: ${error.message}`));
|
|
149
|
+
});
|
|
150
|
+
childProcess.on("exit", (code) => {
|
|
151
|
+
if (code === 0) {
|
|
152
|
+
this.logger.info(`Successfully signed packages: ${packagePaths.join(", ")}`);
|
|
153
|
+
resolve(ToolResult.success());
|
|
154
|
+
} else {
|
|
155
|
+
const errorMessage = stderr.trim() || `dotnet nuget sign exited with code ${code}`;
|
|
156
|
+
this.logger.error(`Package signing failed: ${errorMessage}`);
|
|
157
|
+
resolve(ToolResult.error("INTERNAL_ERROR" /* InternalError */, `Package signing failed: ${errorMessage}`));
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// ../packager/project-packager/src/node-project-packager-factory.ts
|
|
165
|
+
class NodeProjectPackagerFactory extends BaseNodePackagerFactory2 {
|
|
166
|
+
async createAsync(config) {
|
|
167
|
+
const logger = new ToolLogger2("ProjectPackagerFactory", "Create");
|
|
168
|
+
this.configureLanguage(config);
|
|
169
|
+
this.configureLogHandler(config);
|
|
170
|
+
logger.info("Creating ProjectPackager instance...");
|
|
171
|
+
const fileSystem = this.getOrCreateFileSystem(config);
|
|
172
|
+
const telemetryService = this.getOrCreateTelemetryService(config);
|
|
173
|
+
this.dotnetDiscovery = new DotnetDiscoveryService2;
|
|
174
|
+
const packageSignService = new NodePackageSignService2(this.dotnetDiscovery, logger);
|
|
175
|
+
const projectPackager = new ProjectPackager(fileSystem, telemetryService, packageSignService);
|
|
176
|
+
this.checkDotnetAvailability(logger);
|
|
177
|
+
logger.info("ProjectPackager created successfully.");
|
|
178
|
+
return projectPackager;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
async function createNodeProjectPackager2(options) {
|
|
182
|
+
const factory = new NodeProjectPackagerFactory;
|
|
183
|
+
return factory.createAsync(options);
|
|
184
|
+
}
|
|
36
185
|
// ../packager/solution-packager/src/models/solution-pack-options.ts
|
|
37
186
|
class SolutionPackOptions extends PackagerParameters {
|
|
187
|
+
projectActivity;
|
|
38
188
|
destinationPath;
|
|
39
189
|
projectDesignIds;
|
|
40
190
|
validateOptions = {
|
|
@@ -79,7 +229,7 @@ function findPackageIdConflicts(members) {
|
|
|
79
229
|
}
|
|
80
230
|
function packageIdConflictMessage(conflicts) {
|
|
81
231
|
const described = conflicts.map((conflict) => `'${conflict.id}' from ${conflict.folders.map((folder) => `'${folder}'`).join(" and ")}`).join("; ");
|
|
82
|
-
return `Solution members share a package id: ${described}. A NuGet feed stores one package per id and version, so one member's package would replace the other's.`;
|
|
232
|
+
return `Solution members share a package id: ${described}. A NuGet feed stores one package per id and version, so one member's package would replace the other's. Rename the affected projects so each composes a unique id — long names are shortened first, so names that differ only near the end still collide.`;
|
|
83
233
|
}
|
|
84
234
|
|
|
85
235
|
// ../packager/solution-packager/src/services/tool-result-helpers.ts
|
|
@@ -678,8 +828,8 @@ class SolutionCleanupService {
|
|
|
678
828
|
result: ToolResult.error("INTERNAL_ERROR" /* InternalError */, `Project '${project.Id}' has no ProjectPath; the solution loader must populate it before cleanup.`)
|
|
679
829
|
};
|
|
680
830
|
}
|
|
681
|
-
const
|
|
682
|
-
return { project, result
|
|
831
|
+
const result = await this.projectExecutor.cleanupAsync(this.optionsBuilder.buildProjectCleanupOptions(parameters, project), project, context, cancellationToken);
|
|
832
|
+
return { project, result };
|
|
683
833
|
}));
|
|
684
834
|
const failed = projectResults.find((r) => !r.result.isSuccess);
|
|
685
835
|
if (failed) {
|
|
@@ -1104,7 +1254,7 @@ class SolutionPackager {
|
|
|
1104
1254
|
this.repository = toolsFactoryRepository;
|
|
1105
1255
|
this.temporaryStorage = new TemporaryStorageService(this.fileSystem);
|
|
1106
1256
|
this.zipService = new ZipService(this.fileSystem);
|
|
1107
|
-
this.logger = new
|
|
1257
|
+
this.logger = new ToolLogger2("SolutionPackager", "PackSolution");
|
|
1108
1258
|
this.packOptionsValidator = new SolutionPackOptionsValidator(this.logger, this.fileSystem);
|
|
1109
1259
|
this.validateOptionsValidator = new SolutionValidateOptionsValidator(this.logger, this.fileSystem);
|
|
1110
1260
|
const packService = new PackService;
|
|
@@ -1273,6 +1423,7 @@ class SolutionPackager {
|
|
|
1273
1423
|
id: crypto.randomUUID(),
|
|
1274
1424
|
projects: solution.Projects,
|
|
1275
1425
|
solutionRoot: this.fileSystem.path.dirname(solution.filePath),
|
|
1426
|
+
...options.projectActivity ? { projectActivity: options.projectActivity } : {},
|
|
1276
1427
|
downloadUrl: options.downloadUrl,
|
|
1277
1428
|
solutionId: solution.SolutionId,
|
|
1278
1429
|
configuration: options.configuration,
|
|
@@ -1308,16 +1459,16 @@ class SolutionPackager {
|
|
|
1308
1459
|
}
|
|
1309
1460
|
|
|
1310
1461
|
// ../packager/solution-packager/src/node-solution-packager-factory.ts
|
|
1311
|
-
class NodeSolutionPackagerFactory extends
|
|
1462
|
+
class NodeSolutionPackagerFactory extends BaseNodePackagerFactory2 {
|
|
1312
1463
|
async createAsync(config) {
|
|
1313
|
-
const logger = new
|
|
1464
|
+
const logger = new ToolLogger2("SolutionPackagerFactory", "Create");
|
|
1314
1465
|
this.configureLanguage(config);
|
|
1315
1466
|
this.configureLogHandler(config);
|
|
1316
1467
|
logger.info("Creating SolutionPackager instance...");
|
|
1317
1468
|
const fileSystem = this.getOrCreateFileSystem(config);
|
|
1318
1469
|
const telemetryService = this.getOrCreateTelemetryService(config);
|
|
1319
|
-
this.dotnetDiscovery = new
|
|
1320
|
-
const packageSignService = new
|
|
1470
|
+
this.dotnetDiscovery = new DotnetDiscoveryService2;
|
|
1471
|
+
const packageSignService = new NodePackageSignService2(this.dotnetDiscovery, logger);
|
|
1321
1472
|
const solutionPackager = new SolutionPackager(fileSystem, telemetryService, packageSignService);
|
|
1322
1473
|
this.checkDotnetAvailability(logger);
|
|
1323
1474
|
logger.info("SolutionPackager created successfully.");
|
|
@@ -1328,6 +1479,6 @@ async function createNodeSolutionPackager(options) {
|
|
|
1328
1479
|
const factory = new NodeSolutionPackagerFactory;
|
|
1329
1480
|
return factory.createAsync(options);
|
|
1330
1481
|
}
|
|
1331
|
-
export { SolutionPackOptions, INVALID_PACKAGE_ID, toProjectDiagnostics, createNodeSolutionPackager };
|
|
1482
|
+
export { SolutionPackOptions, BaseNodePackagerFactory2, DotnetDiscoveryService2, NodePackageSignService2, createNodeProjectPackager2, INVALID_PACKAGE_ID, toProjectDiagnostics, createNodeSolutionPackager };
|
|
1332
1483
|
|
|
1333
|
-
//# debugId=
|
|
1484
|
+
//# debugId=674BB2230E4EB3E364756E2164756E21
|