@uipath/solution-tool 1.204.0-preview.255 → 1.205.0-preview.256
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-n4e7vxnw.js +149 -0
- package/dist/deploy-delete-service-cag0q8yx.js +25 -0
- package/dist/deploy-run-service-f0h8wb9w.js +25 -0
- package/dist/{deploy-status-service-6svq7c6w.js → deploy-status-service-yh6xn6e0.js} +41 -33
- package/dist/deploy.js +23 -17
- package/dist/{deployment-search-v2qtz23x.js → deployment-search-mnywd9nc.js} +16 -10
- package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
- package/dist/{feed-resolver-xz3akamf.js → feed-resolver-fve33dxq.js} +10 -9
- package/dist/feed-scope-failure-jmg4t1r1.js +19 -0
- package/dist/{feed-session-sxga31vn.js → feed-session-7xqphdrg.js} +3 -3
- package/dist/governance-options-4vxz7ekn.js +32 -0
- package/dist/index-g8c8nf1c.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-tjetkspc.js → list-50mepbed.js} +10 -8
- package/dist/models/pack-command-types.d.ts +15 -0
- package/dist/node-7jm7ksqa.js +86 -0
- package/dist/pack-command-service-dewf5vsq.js +35 -0
- package/dist/pack-project-xwd1rbaa.js +97 -0
- package/dist/pack.js +24 -14
- package/dist/package-id-1wr3cy9c.js +13 -0
- package/dist/packager-tool-09swr9cp.js +171 -0
- package/dist/{packager-tool-a9jx8gf4.js → packager-tool-2vmsh5pt.js} +196 -1519
- 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-9ha2z8h5.js → packager-tool-47by487p.js} +6 -4
- package/dist/packager-tool-47wzvqw0.js +86 -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-jq9zw82w.js → packager-tool-5n6jsn41.js} +104 -14
- package/dist/packager-tool-60af1hw2.js +26 -0
- package/dist/{packager-tool-f5gq77m5.js → packager-tool-61pwb567.js} +2 -2
- package/dist/{packager-tool-yrz4mwfn.js → packager-tool-6kz1pv9f.js} +1373 -486
- package/dist/packager-tool-6ybywxxn.js +1809 -0
- package/dist/packager-tool-8ptbmmmp.js +2132 -0
- package/dist/{packager-tool-7gr2nphb.js → packager-tool-97rcgwvv.js} +224 -6
- package/dist/{packager-tool-83m6ns0r.js → packager-tool-9t26kde1.js} +3556 -1646
- package/dist/packager-tool-act5r386.js +239 -0
- package/dist/packager-tool-amhyxzz6.js +125 -0
- package/dist/packager-tool-b03rva43.js +188 -0
- package/dist/{packager-tool-e2rtr49j.js → packager-tool-b2nhscfk.js} +15 -31
- package/dist/{packager-tool-tv9c1e80.js → packager-tool-d6rrfd46.js} +149 -53
- package/dist/packager-tool-frr2xmkr.js +445 -0
- package/dist/{packager-tool-v8bkkqdb.js → packager-tool-gmwva4yv.js} +5 -5
- package/dist/packager-tool-gs3f3tf7.js +103 -0
- package/dist/packager-tool-jg692f13.js +517 -0
- package/dist/packager-tool-jmpb786m.js +109 -0
- package/dist/{packager-tool-5sex4a1h.js → packager-tool-kds8ytzw.js} +74 -23
- package/dist/packager-tool-kkfb5kgn.js +182 -0
- package/dist/packager-tool-kvcxg0zv.js +1510 -0
- package/dist/packager-tool-n3jfjn5r.js +42 -0
- package/dist/{packager-tool-fjsn5h8s.js → packager-tool-n5d5dx5j.js} +2196 -3455
- package/dist/{packager-tool-yfpcvdpm.js → packager-tool-nsya65z1.js} +357 -1370
- package/dist/{packager-tool-fv7xyzg2.js → packager-tool-pbmqk39a.js} +126 -128
- package/dist/{packager-tool-bqre28m1.js → packager-tool-qw47eyw7.js} +1 -1
- package/dist/{packager-tool-9qgmwy21.js → packager-tool-rc3hwn4b.js} +25 -4
- package/dist/packager-tool-resolver-994z3jkj.js +23 -0
- package/dist/{packager-tool-tgw5x6vx.js → packager-tool-rvt68c1t.js} +17 -8
- 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-ssq2kzqm.js → packager-tool-w77d72a7.js} +13 -11
- package/dist/{packager-tool-1rzssy0x.js → packager-tool-wy4fx250.js} +19 -18
- package/dist/packager-tool-wz34ma3s.js +1333 -0
- package/dist/packager-tool-zq16e1xv.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-5v0b9363.js +155 -0
- package/dist/run-service-tg6b67wp.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-w3e8x1kq.js +0 -22
- package/dist/feed-scope-failure-0j5byccb.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
package/README.md
CHANGED
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
### Examples
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
uip solution pack <
|
|
26
|
-
uip solution publish <
|
|
25
|
+
uip solution pack <solution-path>
|
|
26
|
+
uip solution publish <package-path>
|
|
27
27
|
uip solution init --name MySolution
|
|
28
|
-
uip solution upload <
|
|
28
|
+
uip solution upload <package-path>
|
|
29
29
|
uip solution deploy run --solution-name MySolution
|
|
30
30
|
uip solution deploy status <deployment-name> # or a deployment key / pipeline deployment ID
|
|
31
31
|
uip solution projects add ./my-solution/my-project ./my-solution/my-solution.uipx
|
|
@@ -7,7 +7,7 @@ those licences require.
|
|
|
7
7
|
|
|
8
8
|
23 bundled dependencies:
|
|
9
9
|
|
|
10
|
-
- @uipath/resource-builder-sdk@2025.11.0-
|
|
10
|
+
- @uipath/resource-builder-sdk@2025.11.0-alpha6584-4367 — ISC
|
|
11
11
|
- @uipath/resource-builder-tool@2025.11.0-alpha6004-4107 — ISC
|
|
12
12
|
- bundle-name@4.1.0 — MIT
|
|
13
13
|
- commander@14.0.3 — MIT
|
|
@@ -33,7 +33,7 @@ those licences require.
|
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
## @uipath/resource-builder-sdk@2025.11.0-
|
|
36
|
+
## @uipath/resource-builder-sdk@2025.11.0-alpha6584-4367
|
|
37
37
|
|
|
38
38
|
SPDX: ISC
|
|
39
39
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isGuid,
|
|
3
|
+
logger
|
|
4
|
+
} from "./packager-tool-tx834spe.js";
|
|
5
|
+
import {
|
|
6
|
+
catchError
|
|
7
|
+
} from "./packager-tool-6ybywxxn.js";
|
|
8
|
+
import {
|
|
9
|
+
getFileSystem
|
|
10
|
+
} from "./packager-tool-v1f5e8t9.js";
|
|
11
|
+
import {
|
|
12
|
+
strFromU8,
|
|
13
|
+
unzipSync
|
|
14
|
+
} from "./packager-tool-dfrk01gn.js";
|
|
15
|
+
import"./packager-tool-1de529jm.js";
|
|
16
|
+
|
|
17
|
+
// ../common/src/zip.ts
|
|
18
|
+
function resolveZipEntryPath(fs, root, entryName) {
|
|
19
|
+
if (entryName.includes("\x00")) {
|
|
20
|
+
throw new Error(`Invalid zip entry path: ${entryName}`);
|
|
21
|
+
}
|
|
22
|
+
const normalizedEntry = entryName.replace(/\\/g, "/");
|
|
23
|
+
if (normalizedEntry.startsWith("/")) {
|
|
24
|
+
throw new Error(`Unsafe absolute zip entry path: ${entryName}`);
|
|
25
|
+
}
|
|
26
|
+
const target = fs.path.resolve(root, normalizedEntry);
|
|
27
|
+
if (!isUnder(fs, root, target)) {
|
|
28
|
+
throw new Error(`Unsafe zip entry path: ${entryName}`);
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
32
|
+
function isUnder(fs, root, path) {
|
|
33
|
+
const relative = fs.path.relative(root, path);
|
|
34
|
+
return relative === "" || !relative.startsWith("..") && !fs.path.isAbsolute(relative);
|
|
35
|
+
}
|
|
36
|
+
async function assertNoEscapeThroughSymlink(fs, lexicalRoot, realRoot, path, entryName) {
|
|
37
|
+
const resolved = await fs.realpath(path);
|
|
38
|
+
if (isUnder(fs, realRoot, resolved) || isUnder(fs, lexicalRoot, resolved)) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
throw new Error(`Unsafe zip entry path (escapes via a symlink at the destination): ${entryName}`);
|
|
42
|
+
}
|
|
43
|
+
async function mkdirUnderRoot(fs, lexicalRoot, realRoot, dir, entryName) {
|
|
44
|
+
const relative = fs.path.relative(lexicalRoot, dir);
|
|
45
|
+
if (relative === "") {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
let current = lexicalRoot;
|
|
49
|
+
for (const segment of relative.split(/[\\/]/)) {
|
|
50
|
+
if (segment === "") {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
current = fs.path.join(current, segment);
|
|
54
|
+
await fs.mkdir(current);
|
|
55
|
+
await assertNoEscapeThroughSymlink(fs, lexicalRoot, realRoot, current, entryName);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function extractZipDataToDir(fs, zipData, destinationDir) {
|
|
59
|
+
await fs.mkdir(destinationDir);
|
|
60
|
+
const lexicalRoot = fs.path.resolve(destinationDir);
|
|
61
|
+
const realRoot = await fs.realpath(lexicalRoot);
|
|
62
|
+
const entries = unzipSync(zipData);
|
|
63
|
+
for (const [entryName, content] of Object.entries(entries)) {
|
|
64
|
+
const target = resolveZipEntryPath(fs, lexicalRoot, entryName);
|
|
65
|
+
if (entryName.endsWith("/")) {
|
|
66
|
+
await mkdirUnderRoot(fs, lexicalRoot, realRoot, target, entryName);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
await mkdirUnderRoot(fs, lexicalRoot, realRoot, fs.path.dirname(target), entryName);
|
|
70
|
+
await assertNoEscapeThroughSymlink(fs, lexicalRoot, realRoot, target, entryName);
|
|
71
|
+
await fs.writeFile(target, content);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async function extractArchive(archivePath, destinationDir) {
|
|
75
|
+
const fs = getFileSystem();
|
|
76
|
+
const data = await fs.readFile(archivePath);
|
|
77
|
+
if (data === null) {
|
|
78
|
+
throw new Error(`Archive not found: ${archivePath}`);
|
|
79
|
+
}
|
|
80
|
+
await extractZipDataToDir(fs, data, destinationDir);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/services/archive-extract.ts
|
|
84
|
+
var SOLUTION_STORAGE_ENTRY = "SolutionStorage.json";
|
|
85
|
+
function isRootUipxEntry(name) {
|
|
86
|
+
return !name.includes("/") && name.endsWith(".uipx");
|
|
87
|
+
}
|
|
88
|
+
function readSolutionIdField(bytes) {
|
|
89
|
+
if (!bytes) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const [parseError, parsed] = catchError(() => JSON.parse(strFromU8(bytes)));
|
|
93
|
+
if (parseError || !parsed) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const id = parsed.SolutionId;
|
|
97
|
+
return typeof id === "string" && isGuid(id) ? id : undefined;
|
|
98
|
+
}
|
|
99
|
+
function readBundledSolutionId(archive) {
|
|
100
|
+
const [unzipError, entries] = catchError(() => unzipSync(archive, {
|
|
101
|
+
filter: (file) => file.name === SOLUTION_STORAGE_ENTRY || isRootUipxEntry(file.name)
|
|
102
|
+
}));
|
|
103
|
+
if (unzipError || !entries) {
|
|
104
|
+
logger.debug(`Could not inspect the solution archive for its SolutionId: ${unzipError?.message ?? "no entries"}`);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const rootUipxName = Object.keys(entries).find(isRootUipxEntry);
|
|
108
|
+
const solutionId = readSolutionIdField(entries[SOLUTION_STORAGE_ENTRY]) ?? readSolutionIdField(rootUipxName ? entries[rootUipxName] : undefined);
|
|
109
|
+
if (!solutionId) {
|
|
110
|
+
logger.debug("No SolutionId found in the solution archive.");
|
|
111
|
+
}
|
|
112
|
+
return solutionId;
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
extractArchive,
|
|
116
|
+
extractZipDataToDir,
|
|
117
|
+
readBundledSolutionId
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
//# debugId=68AB8937A27882A764756E2164756E21
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SOLUTION_PATH_INSTRUCTIONS,
|
|
3
|
+
applyAuthConnection,
|
|
4
|
+
checkSolutionPathAsync,
|
|
5
|
+
createSolutionPackager,
|
|
6
|
+
readSolutionFileAsUint8Array,
|
|
7
|
+
resolveSdkLogLevel
|
|
8
|
+
} from "./packager-tool-jmpb786m.js";
|
|
9
|
+
import {
|
|
10
|
+
ensurePackagerTools
|
|
11
|
+
} from "./packager-tool-b2nhscfk.js";
|
|
12
|
+
import"./packager-tool-60af1hw2.js";
|
|
13
|
+
import {
|
|
14
|
+
SolutionPackOptions
|
|
15
|
+
} from "./packager-tool-wz34ma3s.js";
|
|
16
|
+
import"./packager-tool-09swr9cp.js";
|
|
17
|
+
import"./packager-tool-b03rva43.js";
|
|
18
|
+
import"./packager-tool-n5d5dx5j.js";
|
|
19
|
+
import"./packager-tool-5ddtwzva.js";
|
|
20
|
+
import {
|
|
21
|
+
ToolResult
|
|
22
|
+
} from "./packager-tool-pbmqk39a.js";
|
|
23
|
+
import"./packager-tool-43ahv5mn.js";
|
|
24
|
+
import {
|
|
25
|
+
OutputFormatter,
|
|
26
|
+
RESULTS,
|
|
27
|
+
logger
|
|
28
|
+
} from "./packager-tool-tx834spe.js";
|
|
29
|
+
import {
|
|
30
|
+
carriedInstructions,
|
|
31
|
+
catchError
|
|
32
|
+
} from "./packager-tool-6ybywxxn.js";
|
|
33
|
+
import {
|
|
34
|
+
getFileSystem
|
|
35
|
+
} from "./packager-tool-v1f5e8t9.js";
|
|
36
|
+
import"./packager-tool-dfrk01gn.js";
|
|
37
|
+
import"./packager-tool-1de529jm.js";
|
|
38
|
+
|
|
39
|
+
// src/services/cleanup-command-service.ts
|
|
40
|
+
class CleanupCommandService {
|
|
41
|
+
packager = null;
|
|
42
|
+
fs;
|
|
43
|
+
constructor() {
|
|
44
|
+
this.fs = getFileSystem();
|
|
45
|
+
}
|
|
46
|
+
async execute(solutionPath, options, context) {
|
|
47
|
+
const check = await checkSolutionPathAsync(this.fs, solutionPath);
|
|
48
|
+
if (!check.ok) {
|
|
49
|
+
this.reportFailureAndExit(context, check.message, SOLUTION_PATH_INSTRUCTIONS, check.statError, check.errorCode);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const { absoluteSolutionPath } = check;
|
|
53
|
+
logger.info(options.dryRun ? `
|
|
54
|
+
Detecting unused items (dry-run)...
|
|
55
|
+
` : `
|
|
56
|
+
Removing unused items...
|
|
57
|
+
`);
|
|
58
|
+
logger.info("Details:");
|
|
59
|
+
logger.info(` Solution: ${absoluteSolutionPath}`);
|
|
60
|
+
logger.info("");
|
|
61
|
+
const [error, result] = await catchError(this.executeAsync(solutionPath, options));
|
|
62
|
+
if (error) {
|
|
63
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
64
|
+
this.reportFailureAndExit(context, msg, carriedInstructions(error) ?? "Check that the solution can be loaded, the required packager tools are available, and the current login has access to the tenant.", error);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (result.errorCode !== "SUCCESS" /* Success */) {
|
|
68
|
+
this.reportFailureAndExit(context, `Error code: ${result.errorCode} : ${result.message}`, result.instructions ?? result.message ?? "");
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const changedFilesByProject = result.details?.changedFilesByProject ?? {};
|
|
72
|
+
const cleanupByProject = result.details?.cleanupByProject ?? {};
|
|
73
|
+
OutputFormatter.success({
|
|
74
|
+
Result: RESULTS.Success,
|
|
75
|
+
Code: "SolutionCleanup",
|
|
76
|
+
Data: {
|
|
77
|
+
DryRun: Boolean(options.dryRun),
|
|
78
|
+
ChangedFilesByProject: changedFilesByProject,
|
|
79
|
+
CleanupByProject: cleanupByProject
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
reportFailureAndExit(context, message, instructions, error, errorCode) {
|
|
84
|
+
OutputFormatter.error({
|
|
85
|
+
Result: RESULTS.Failure,
|
|
86
|
+
Message: message,
|
|
87
|
+
Instructions: instructions,
|
|
88
|
+
ErrorCode: errorCode
|
|
89
|
+
});
|
|
90
|
+
if (error instanceof Error && error.stack) {
|
|
91
|
+
logger.error("Stack trace:");
|
|
92
|
+
logger.error(error.stack);
|
|
93
|
+
}
|
|
94
|
+
context.exit(1);
|
|
95
|
+
}
|
|
96
|
+
async executeAsync(solutionPath, options) {
|
|
97
|
+
if (options.loginValidity !== undefined && Number.isNaN(options.loginValidity)) {
|
|
98
|
+
return new ToolResult("INTERNAL_ERROR" /* InternalError */, `Invalid --login-validity value: ${options.loginValidity}`, []);
|
|
99
|
+
}
|
|
100
|
+
const check = await checkSolutionPathAsync(this.fs, solutionPath);
|
|
101
|
+
if (!check.ok) {
|
|
102
|
+
return new ToolResult("INTERNAL_ERROR" /* InternalError */, check.message, []);
|
|
103
|
+
}
|
|
104
|
+
const { absoluteSolutionPath, isUisFile } = check;
|
|
105
|
+
if (isUisFile && !options.dryRun) {
|
|
106
|
+
return new ToolResult("INTERNAL_ERROR" /* InternalError */, `In-place cleanup of a .uis file is not supported: changes would be written to a temporary extraction and then discarded, leaving '${absoluteSolutionPath}' unchanged. Re-run with --dry-run to only detect unused items, or point at an unpacked solution directory to modify it in place.`, []);
|
|
107
|
+
}
|
|
108
|
+
const [error, result] = await catchError(async () => {
|
|
109
|
+
const packager = await this.ensurePackagerAsync();
|
|
110
|
+
let inputPath;
|
|
111
|
+
if (isUisFile) {
|
|
112
|
+
const uint8Array = await readSolutionFileAsUint8Array(this.fs, absoluteSolutionPath);
|
|
113
|
+
inputPath = await packager.setupAsync(uint8Array);
|
|
114
|
+
} else {
|
|
115
|
+
inputPath = await packager.setupAsync(absoluteSolutionPath);
|
|
116
|
+
}
|
|
117
|
+
await ensurePackagerTools(inputPath, this.fs);
|
|
118
|
+
const cleanupOptions = await this.createCleanupOptions(inputPath, options);
|
|
119
|
+
return packager.cleanupSolutionAsync(cleanupOptions);
|
|
120
|
+
});
|
|
121
|
+
if (error) {
|
|
122
|
+
return new ToolResult("INTERNAL_ERROR" /* InternalError */, error instanceof Error ? error.message : String(error), [], carriedInstructions(error));
|
|
123
|
+
}
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
async ensurePackagerAsync() {
|
|
127
|
+
this.packager ??= await createSolutionPackager();
|
|
128
|
+
return this.packager;
|
|
129
|
+
}
|
|
130
|
+
async createCleanupOptions(inputPath, options) {
|
|
131
|
+
const cleanupOptions = new SolutionPackOptions;
|
|
132
|
+
cleanupOptions.inputPath = inputPath;
|
|
133
|
+
cleanupOptions.cleanupOptions = {
|
|
134
|
+
dryRun: options.dryRun ?? false,
|
|
135
|
+
skipImports: options.skipImports ?? false
|
|
136
|
+
};
|
|
137
|
+
cleanupOptions.logLevel = resolveSdkLogLevel();
|
|
138
|
+
cleanupOptions.nuGetSourcesConfigPath = options.nugetSourcesConfigPath;
|
|
139
|
+
cleanupOptions.excludeConfiguredSources = options.excludeConfiguredSources ?? false;
|
|
140
|
+
cleanupOptions.feedFolder = options.feedFolder;
|
|
141
|
+
await applyAuthConnection(cleanupOptions, options.loginValidity);
|
|
142
|
+
return cleanupOptions;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
export {
|
|
146
|
+
CleanupCommandService
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
//# debugId=AF3981CD74D49C9664756E2164756E21
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deleteDeploymentAsync
|
|
3
|
+
} from "./packager-tool-kds8ytzw.js";
|
|
4
|
+
import"./packager-tool-zq16e1xv.js";
|
|
5
|
+
import"./packager-tool-rc3hwn4b.js";
|
|
6
|
+
import"./packager-tool-act5r386.js";
|
|
7
|
+
import"./packager-tool-d6rrfd46.js";
|
|
8
|
+
import"./packager-tool-rvt68c1t.js";
|
|
9
|
+
import"./packager-tool-97rcgwvv.js";
|
|
10
|
+
import"./packager-tool-9t26kde1.js";
|
|
11
|
+
import"./packager-tool-qw47eyw7.js";
|
|
12
|
+
import"./packager-tool-61pwb567.js";
|
|
13
|
+
import"./packager-tool-8ptbmmmp.js";
|
|
14
|
+
import"./packager-tool-5edvzz80.js";
|
|
15
|
+
import"./packager-tool-43ahv5mn.js";
|
|
16
|
+
import"./packager-tool-tx834spe.js";
|
|
17
|
+
import"./packager-tool-6ybywxxn.js";
|
|
18
|
+
import"./packager-tool-v1f5e8t9.js";
|
|
19
|
+
import"./packager-tool-dfrk01gn.js";
|
|
20
|
+
import"./packager-tool-1de529jm.js";
|
|
21
|
+
export {
|
|
22
|
+
deleteDeploymentAsync
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# debugId=75D578D2E0DE171A64756E2164756E21
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deployRunAsync
|
|
3
|
+
} from "./packager-tool-2vmsh5pt.js";
|
|
4
|
+
import"./packager-tool-frr2xmkr.js";
|
|
5
|
+
import"./packager-tool-5n6jsn41.js";
|
|
6
|
+
import"./packager-tool-act5r386.js";
|
|
7
|
+
import"./packager-tool-d6rrfd46.js";
|
|
8
|
+
import"./packager-tool-rvt68c1t.js";
|
|
9
|
+
import"./packager-tool-97rcgwvv.js";
|
|
10
|
+
import"./packager-tool-9t26kde1.js";
|
|
11
|
+
import"./packager-tool-qw47eyw7.js";
|
|
12
|
+
import"./packager-tool-61pwb567.js";
|
|
13
|
+
import"./packager-tool-8ptbmmmp.js";
|
|
14
|
+
import"./packager-tool-5edvzz80.js";
|
|
15
|
+
import"./packager-tool-43ahv5mn.js";
|
|
16
|
+
import"./packager-tool-tx834spe.js";
|
|
17
|
+
import"./packager-tool-6ybywxxn.js";
|
|
18
|
+
import"./packager-tool-v1f5e8t9.js";
|
|
19
|
+
import"./packager-tool-dfrk01gn.js";
|
|
20
|
+
import"./packager-tool-1de529jm.js";
|
|
21
|
+
export {
|
|
22
|
+
deployRunAsync
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//# debugId=D1942F34DAF6583664756E2164756E21
|
|
@@ -1,46 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
deploymentNextSteps,
|
|
3
|
-
needsPendingResources,
|
|
4
|
-
quoteForShell,
|
|
5
|
-
readPendingResourcesAsync
|
|
6
|
-
} from "./packager-tool-jq9zw82w.js";
|
|
7
1
|
import {
|
|
8
2
|
INCOMPLETE_SWEEP_ADVICE,
|
|
9
3
|
findDeploymentAcrossFeeds,
|
|
10
4
|
reportIncompleteSweepAsync
|
|
11
|
-
} from "./packager-tool-
|
|
5
|
+
} from "./packager-tool-rc3hwn4b.js";
|
|
6
|
+
import {
|
|
7
|
+
deploymentNextSteps,
|
|
8
|
+
needsPendingResources,
|
|
9
|
+
readActivationBlockersAsync,
|
|
10
|
+
readPendingResourcesAsync
|
|
11
|
+
} from "./packager-tool-5n6jsn41.js";
|
|
12
12
|
import {
|
|
13
13
|
DeploymentSearchNeedsUserSessionError,
|
|
14
14
|
findCurrentDeploymentAsync,
|
|
15
15
|
findDeploymentByName,
|
|
16
|
-
httpStatusOf,
|
|
17
16
|
isAuthRefusal
|
|
18
|
-
} from "./packager-tool-
|
|
19
|
-
import {
|
|
20
|
-
Configuration as Configuration2,
|
|
21
|
-
PipelinesApi
|
|
22
|
-
} from "./packager-tool-7gr2nphb.js";
|
|
17
|
+
} from "./packager-tool-d6rrfd46.js";
|
|
23
18
|
import {
|
|
24
19
|
feedScopeInitOverride,
|
|
25
20
|
feedSelectorFlag,
|
|
26
21
|
folderKeyInitOverride
|
|
27
|
-
} from "./packager-tool-
|
|
22
|
+
} from "./packager-tool-rvt68c1t.js";
|
|
28
23
|
import {
|
|
29
24
|
Configuration,
|
|
25
|
+
PipelinesApi
|
|
26
|
+
} from "./packager-tool-97rcgwvv.js";
|
|
27
|
+
import {
|
|
28
|
+
Configuration as Configuration2,
|
|
30
29
|
DeploymentsApi
|
|
31
|
-
} from "./packager-tool-
|
|
30
|
+
} from "./packager-tool-9t26kde1.js";
|
|
32
31
|
import {
|
|
33
32
|
FeedReadRefusedError,
|
|
34
33
|
classifyFeedSession,
|
|
35
34
|
feedReadRefusalForApplication
|
|
36
|
-
} from "./packager-tool-
|
|
37
|
-
import"./packager-tool-
|
|
38
|
-
import"./packager-tool-
|
|
35
|
+
} from "./packager-tool-qw47eyw7.js";
|
|
36
|
+
import"./packager-tool-8ptbmmmp.js";
|
|
37
|
+
import"./packager-tool-5edvzz80.js";
|
|
38
|
+
import"./packager-tool-43ahv5mn.js";
|
|
39
|
+
import {
|
|
40
|
+
httpStatusOf,
|
|
41
|
+
quoteForShell
|
|
42
|
+
} from "./packager-tool-tx834spe.js";
|
|
39
43
|
import {
|
|
40
44
|
catchError
|
|
41
|
-
} from "./packager-tool-
|
|
42
|
-
import"./packager-tool-
|
|
43
|
-
import"./packager-tool-zf3929se.js";
|
|
45
|
+
} from "./packager-tool-6ybywxxn.js";
|
|
46
|
+
import"./packager-tool-v1f5e8t9.js";
|
|
44
47
|
import"./packager-tool-dfrk01gn.js";
|
|
45
48
|
import"./packager-tool-1de529jm.js";
|
|
46
49
|
|
|
@@ -65,17 +68,21 @@ function looksLikeDeploymentKey(reference) {
|
|
|
65
68
|
return GUID.test(reference);
|
|
66
69
|
}
|
|
67
70
|
async function describeDeploymentByKeyAsync(auth, deploymentKey, scope, feedSelector = "", addressedBy = "key") {
|
|
68
|
-
const deploymentsApi = new DeploymentsApi(new
|
|
71
|
+
const deploymentsApi = new DeploymentsApi(new Configuration2({
|
|
69
72
|
basePath: auth.basePath,
|
|
70
73
|
accessToken: auth.accessToken
|
|
71
74
|
}));
|
|
72
|
-
const pipelinesApi = new PipelinesApi(new
|
|
75
|
+
const pipelinesApi = new PipelinesApi(new Configuration({
|
|
73
76
|
basePath: auth.basePath,
|
|
74
77
|
accessToken: auth.accessToken
|
|
75
78
|
}));
|
|
79
|
+
const apis = {
|
|
80
|
+
pipelines: pipelinesApi,
|
|
81
|
+
deployments: deploymentsApi
|
|
82
|
+
};
|
|
76
83
|
const [lookupError, info] = await catchError(pipelinesApi.pipelinesGetDeploymentByKey({ key: deploymentKey }));
|
|
77
84
|
if (!lookupError && info) {
|
|
78
|
-
return describeFromLookupAsync(auth,
|
|
85
|
+
return describeFromLookupAsync(auth, apis, deploymentKey, info, addressedBy);
|
|
79
86
|
}
|
|
80
87
|
if (lookupError && httpStatusOf(lookupError) !== 404) {
|
|
81
88
|
throw lookupError;
|
|
@@ -83,9 +90,9 @@ async function describeDeploymentByKeyAsync(auth, deploymentKey, scope, feedSele
|
|
|
83
90
|
if (classifyFeedSession(auth) !== "user") {
|
|
84
91
|
return;
|
|
85
92
|
}
|
|
86
|
-
return describeViaSolutionsAsync(auth,
|
|
93
|
+
return describeViaSolutionsAsync(auth, apis, deploymentKey, scope, feedSelector, addressedBy);
|
|
87
94
|
}
|
|
88
|
-
async function describeFromLookupAsync(auth,
|
|
95
|
+
async function describeFromLookupAsync(auth, apis, requestedKey, info, addressedBy) {
|
|
89
96
|
const feedScope = info.locationKey ? folderKeyInitOverride(info.locationKey) : undefined;
|
|
90
97
|
const selector = info.locationKey ? ` --feed ${info.locationKey}` : "";
|
|
91
98
|
const superseded = addressedBy === "key" && info.deploymentKey !== requestedKey;
|
|
@@ -95,6 +102,7 @@ async function describeFromLookupAsync(auth, deploymentsApi, requestedKey, info,
|
|
|
95
102
|
packageName: info.packageName
|
|
96
103
|
}, feedScope));
|
|
97
104
|
const row = headRow && headRow.key === info.deploymentKey ? headRow : undefined;
|
|
105
|
+
const blockers = !row && info.status === "SuccessfulInstall" ? await readActivationBlockersAsync(apis.pipelines, { name: info.deploymentName, key: info.deploymentKey }, feedScope) : undefined;
|
|
98
106
|
const current = {
|
|
99
107
|
key: info.deploymentKey,
|
|
100
108
|
installDeploymentKey: info.installDeploymentKey,
|
|
@@ -105,13 +113,13 @@ async function describeFromLookupAsync(auth, deploymentsApi, requestedKey, info,
|
|
|
105
113
|
newPackageVersionAvailable: row?.newPackageVersionAvailable,
|
|
106
114
|
operation: info.operation,
|
|
107
115
|
operationStatus: info.operationStatus,
|
|
108
|
-
activationStatus: row?.activationStatus ?? (info.status === "SuccessfulActivate" ? "Active" : undefined),
|
|
116
|
+
activationStatus: row?.activationStatus ?? (info.status === "SuccessfulActivate" ? "Active" : blockers ? blockers.length > 0 ? "NeedsSetupToActivate" : "ReadyToActivate" : undefined),
|
|
109
117
|
actions: row?.actions,
|
|
110
118
|
deploymentStatus: info.status
|
|
111
119
|
};
|
|
112
|
-
const pendingResources = needsPendingResources(current) ? await readPendingResourcesAsync(
|
|
120
|
+
const pendingResources = blockers && blockers.length > 0 ? blockers : needsPendingResources(current) ? await readPendingResourcesAsync(apis, current, feedScope) : undefined;
|
|
113
121
|
const steps = deploymentNextSteps(current, pendingResources, selector) ?? [];
|
|
114
|
-
if (!row && info.status === "SuccessfulInstall") {
|
|
122
|
+
if (!row && info.status === "SuccessfulInstall" && !blockers) {
|
|
115
123
|
steps.unshift(headRow ? `Deployment '${current.name}' is installed but not active (DeploymentStatus: SuccessfulInstall). What is left before it runs could not be read: the Solutions search does not list record '${current.key}' yet (its newest row is '${headRow.key}'). Run 'uip solution deploy status ${quoteForShell(current.name)}' again in a moment, or open the deployment in Orchestrator (Tenant > Solutions > Deployments).` : `Deployment '${current.name}' is installed but not active (DeploymentStatus: SuccessfulInstall). What is left before it runs could not be read: the Solutions search needs a user session${rowError ? ` (${rowError.message})` : ""}. Run 'uip solution deploy status ${quoteForShell(current.name)}' after 'uip login', or open the deployment in Orchestrator (Tenant > Solutions > Deployments).`);
|
|
116
124
|
}
|
|
117
125
|
if (superseded) {
|
|
@@ -126,8 +134,8 @@ async function describeFromLookupAsync(auth, deploymentsApi, requestedKey, info,
|
|
|
126
134
|
...steps.length > 0 ? { nextSteps: steps } : {}
|
|
127
135
|
};
|
|
128
136
|
}
|
|
129
|
-
async function describeViaSolutionsAsync(auth,
|
|
130
|
-
const [getError, requested] = await catchError(
|
|
137
|
+
async function describeViaSolutionsAsync(auth, apis, deploymentKey, scope, feedSelector, addressedBy) {
|
|
138
|
+
const [getError, requested] = await catchError(apis.deployments.deploymentsGetByKey({ deploymentKey }, scope));
|
|
131
139
|
if (getError) {
|
|
132
140
|
if (httpStatusOf(getError) === 404) {
|
|
133
141
|
return;
|
|
@@ -143,7 +151,7 @@ async function describeViaSolutionsAsync(auth, deploymentsApi, deploymentKey, sc
|
|
|
143
151
|
const current = toCurrentRecord(head ?? requested, {
|
|
144
152
|
deploymentStatus: moved === true ? undefined : requested.status
|
|
145
153
|
});
|
|
146
|
-
const pendingResources = needsPendingResources(current) ? await readPendingResourcesAsync(
|
|
154
|
+
const pendingResources = needsPendingResources(current) ? await readPendingResourcesAsync(apis, current, scope) : undefined;
|
|
147
155
|
const steps = deploymentNextSteps(current, pendingResources, feedSelector) ?? [];
|
|
148
156
|
if (headError) {
|
|
149
157
|
steps.unshift(`The CLI could not check whether key '${deploymentKey}' is the deployment's current record (${headError.message}). The state above is this record's own and may be stale; take the current key from 'uip solution deploy list${feedSelector}'.`);
|
|
@@ -253,4 +261,4 @@ export {
|
|
|
253
261
|
looksLikeDeploymentKey
|
|
254
262
|
};
|
|
255
263
|
|
|
256
|
-
//# debugId=
|
|
264
|
+
//# debugId=C89A5DAFE069BA5A64756E2164756E21
|
package/dist/deploy.js
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deleteDeploymentAsync
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-kds8ytzw.js";
|
|
4
|
+
import {
|
|
5
|
+
deployRunAsync
|
|
6
|
+
} from "./packager-tool-2vmsh5pt.js";
|
|
4
7
|
import {
|
|
5
8
|
activateDeploymentAsync,
|
|
6
|
-
deployRunAsync,
|
|
7
9
|
listDeploymentsAsync,
|
|
8
10
|
listPackagesAsync,
|
|
9
11
|
uninstallDeploymentAsync,
|
|
10
12
|
upgradeDeploymentAsync
|
|
11
|
-
} from "./packager-tool-
|
|
12
|
-
import"./packager-tool-
|
|
13
|
-
import"./packager-tool-
|
|
14
|
-
import"./packager-tool-
|
|
15
|
-
import"./packager-tool-
|
|
16
|
-
import"./packager-tool-
|
|
17
|
-
import"./packager-tool-
|
|
18
|
-
import"./packager-tool-
|
|
19
|
-
import"./packager-tool-
|
|
20
|
-
import"./packager-tool-
|
|
21
|
-
import"./packager-tool-
|
|
22
|
-
import"./packager-tool-
|
|
23
|
-
import"./packager-tool-
|
|
24
|
-
import"./packager-tool-
|
|
13
|
+
} from "./packager-tool-kvcxg0zv.js";
|
|
14
|
+
import"./packager-tool-zq16e1xv.js";
|
|
15
|
+
import"./packager-tool-rc3hwn4b.js";
|
|
16
|
+
import"./packager-tool-frr2xmkr.js";
|
|
17
|
+
import"./packager-tool-5n6jsn41.js";
|
|
18
|
+
import"./packager-tool-act5r386.js";
|
|
19
|
+
import"./packager-tool-d6rrfd46.js";
|
|
20
|
+
import"./packager-tool-rvt68c1t.js";
|
|
21
|
+
import"./packager-tool-97rcgwvv.js";
|
|
22
|
+
import"./packager-tool-9t26kde1.js";
|
|
23
|
+
import"./packager-tool-qw47eyw7.js";
|
|
24
|
+
import"./packager-tool-61pwb567.js";
|
|
25
|
+
import"./packager-tool-8ptbmmmp.js";
|
|
26
|
+
import"./packager-tool-5edvzz80.js";
|
|
27
|
+
import"./packager-tool-43ahv5mn.js";
|
|
28
|
+
import"./packager-tool-tx834spe.js";
|
|
29
|
+
import"./packager-tool-6ybywxxn.js";
|
|
30
|
+
import"./packager-tool-v1f5e8t9.js";
|
|
25
31
|
import"./packager-tool-dfrk01gn.js";
|
|
26
32
|
import"./packager-tool-1de529jm.js";
|
|
27
33
|
export {
|
|
@@ -34,4 +40,4 @@ export {
|
|
|
34
40
|
upgradeDeploymentAsync
|
|
35
41
|
};
|
|
36
42
|
|
|
37
|
-
//# debugId=
|
|
43
|
+
//# debugId=077944B1F5E8A24064756E2164756E21
|
|
@@ -9,21 +9,25 @@ import {
|
|
|
9
9
|
findDeploymentsByPackageName,
|
|
10
10
|
findLiveDeploymentByName,
|
|
11
11
|
formatExistingDeployments,
|
|
12
|
-
httpStatusOf,
|
|
13
12
|
interpretFailedDeployPoll,
|
|
14
13
|
isCompletedUninstall,
|
|
15
14
|
isPipelineDeploymentNotFoundError,
|
|
16
15
|
mapOperationStatusToPipelineStatus,
|
|
17
16
|
newestDeploymentRow,
|
|
17
|
+
readDeploymentByKeyAsync,
|
|
18
|
+
readDeploymentByKeyViaSolutionsAsync,
|
|
18
19
|
resolveInstalledFolder
|
|
19
|
-
} from "./packager-tool-
|
|
20
|
-
import"./packager-tool-
|
|
21
|
-
import"./packager-tool-
|
|
22
|
-
import"./packager-tool-
|
|
23
|
-
import"./packager-tool-
|
|
24
|
-
import"./packager-tool-
|
|
25
|
-
import
|
|
26
|
-
|
|
20
|
+
} from "./packager-tool-d6rrfd46.js";
|
|
21
|
+
import"./packager-tool-97rcgwvv.js";
|
|
22
|
+
import"./packager-tool-9t26kde1.js";
|
|
23
|
+
import"./packager-tool-qw47eyw7.js";
|
|
24
|
+
import"./packager-tool-5edvzz80.js";
|
|
25
|
+
import"./packager-tool-43ahv5mn.js";
|
|
26
|
+
import {
|
|
27
|
+
httpStatusOf
|
|
28
|
+
} from "./packager-tool-tx834spe.js";
|
|
29
|
+
import"./packager-tool-6ybywxxn.js";
|
|
30
|
+
import"./packager-tool-v1f5e8t9.js";
|
|
27
31
|
import"./packager-tool-dfrk01gn.js";
|
|
28
32
|
import"./packager-tool-1de529jm.js";
|
|
29
33
|
export {
|
|
@@ -43,7 +47,9 @@ export {
|
|
|
43
47
|
isPipelineDeploymentNotFoundError,
|
|
44
48
|
mapOperationStatusToPipelineStatus,
|
|
45
49
|
newestDeploymentRow,
|
|
50
|
+
readDeploymentByKeyAsync,
|
|
51
|
+
readDeploymentByKeyViaSolutionsAsync,
|
|
46
52
|
resolveInstalledFolder
|
|
47
53
|
};
|
|
48
54
|
|
|
49
|
-
//# debugId=
|
|
55
|
+
//# debugId=728CB938910F03AA64756E2164756E21
|