@uipath/solution-tool 1.206.0-preview.301 → 1.207.0-preview.305
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-ma0gy822.js → archive-extract-afgwacbg.js} +3 -3
- package/dist/{cleanup-command-service-8whhrsvy.js → cleanup-command-service-j9kawew9.js} +20 -15
- package/dist/deploy-delete-service-1erqap9a.js +23 -0
- package/dist/deploy-run-service-jbs6dxye.js +24 -0
- package/dist/{deploy-status-service-at6cxp1a.js → deploy-status-service-4zn90vds.js} +49 -25
- package/dist/deploy.js +21 -20
- package/dist/{deployment-search-40dknsk1.js → deployment-search-dwzahe4v.js} +9 -9
- package/dist/feed-resolver-d14rdjss.js +31 -0
- package/dist/feed-scope-failure-w16mze3z.js +20 -0
- package/dist/{feed-session-dvyfw5k7.js → feed-session-f2sby6t8.js} +6 -6
- package/dist/{first-party-service-6gf3n6d8.js → first-party-service-7cggb17y.js} +1 -1
- package/dist/folder-runtime-check-586c41dq.js +25 -0
- package/dist/{governance-options-am1hfj5b.js → governance-options-y2xsv7ff.js} +7 -7
- package/dist/{packager-tool-5vf0v538.js → index-6ma58k47.js} +33 -708
- package/dist/{index-p3x7ztdr.js → index-795rsz0e.js} +1 -1
- package/dist/{index-yjvmjpdn.js → index-pzkzbqbs.js} +12 -11
- package/dist/{index-1cfw8mj0.js → index-wfqzwh7k.js} +9 -7
- package/dist/index.js +26 -26
- package/dist/init.js +10 -10
- package/dist/{list-vsecskj1.js → list-6pe1nab5.js} +11 -11
- package/dist/models/pack-command-types.d.ts +12 -0
- package/dist/{node-vndr59bc.js → node-13wj5mzd.js} +6 -6
- package/dist/pack-command-service-j9bqnsn1.js +32 -0
- package/dist/{pack-project-re7s480k.js → pack-project-3sdddc42.js} +21 -18
- package/dist/pack.js +25 -22
- package/dist/{package-id-rx8gq6y2.js → package-id-5j4q232a.js} +3 -3
- package/dist/{packager-tool-vgrswa8p.js → packager-tool-1db1wqdy.js} +30 -8
- package/dist/{packager-tool-vx2c68sb.js → packager-tool-1dsxhz1r.js} +2 -2
- package/dist/{packager-tool-t2r6z24f.js → packager-tool-1tvhgac9.js} +15 -6
- package/dist/{packager-tool-4pt71nf1.js → packager-tool-2atxqqgd.js} +49 -24
- package/dist/packager-tool-3ft8hywr.js +449 -0
- package/dist/{packager-tool-g1c0xdh2.js → packager-tool-46x80z85.js} +8 -4
- package/dist/{packager-tool-gjfb0wcy.js → packager-tool-4hm40a32.js} +8 -74
- package/dist/{packager-tool-f15an17m.js → packager-tool-5p1vy335.js} +1 -1
- package/dist/packager-tool-612prgtc.js +140 -0
- package/dist/packager-tool-7gqn5apd.js +72 -0
- package/dist/{packager-tool-aws5w512.js → packager-tool-887bkh9y.js} +1 -1
- package/dist/{packager-tool-vj88gh5b.js → packager-tool-8tckw03n.js} +28 -9
- package/dist/{packager-tool-9vtp28fb.js → packager-tool-93qy1v8m.js} +52 -15
- package/dist/{packager-tool-fx4ws49n.js → packager-tool-cenfraf4.js} +2 -2
- package/dist/{packager-tool-chff74yz.js → packager-tool-cr1khqtm.js} +103 -166
- package/dist/{packager-tool-6tn79r1b.js → packager-tool-da3hvfyn.js} +528 -202
- package/dist/{packager-tool-2zn98p5r.js → packager-tool-dd937g7k.js} +4 -4
- package/dist/{packager-tool-a7s0gbxs.js → packager-tool-devc4w73.js} +7 -2
- package/dist/{packager-tool-v7h8s6yj.js → packager-tool-ewbkaecg.js} +18 -11
- package/dist/{packager-tool-d7v4083a.js → packager-tool-g08b669a.js} +22 -18
- package/dist/{packager-tool-m07vyk89.js → packager-tool-gb3dq79g.js} +36 -9
- package/dist/{packager-tool-395kmy70.js → packager-tool-gmbcn83x.js} +3 -3
- package/dist/{packager-tool-btz44ase.js → packager-tool-jhtsana2.js} +119 -52
- package/dist/{packager-tool-4rvfxkyh.js → packager-tool-jtg2arr8.js} +20 -8
- package/dist/{packager-tool-t39pjz7n.js → packager-tool-jtvhkavz.js} +48 -6
- package/dist/packager-tool-kffz64hn.js +279 -0
- package/dist/{packager-tool-p5322gew.js → packager-tool-kmwjscby.js} +88 -10
- package/dist/{packager-tool-ppj5f4y7.js → packager-tool-n1zrk6zv.js} +4 -2
- package/dist/{packager-tool-avrdp2za.js → packager-tool-pmc5txbm.js} +4 -6
- package/dist/{packager-tool-egc54x78.js → packager-tool-qhht1tc9.js} +2408 -771
- package/dist/{packager-tool-zcqfq3vc.js → packager-tool-qm876ezh.js} +84 -29
- package/dist/{packager-tool-resolver-30hxk8vm.js → packager-tool-resolver-y52kztnx.js} +6 -6
- package/dist/{packager-tool-3ejz0af8.js → packager-tool-rhg3mwkn.js} +14 -8
- package/dist/{packager-tool-ckrt4gyr.js → packager-tool-t9zked1m.js} +3 -3
- package/dist/{packager-tool-36w7az7k.js → packager-tool-tat0qs6z.js} +26 -10
- package/dist/packager-tool-tf0rn1tp.js +741 -0
- package/dist/{packager-tool-p5aar2k0.js → packager-tool-tmba5jv0.js} +140 -10
- package/dist/{packager-tool-vk3e239z.js → packager-tool-tqe3m1xp.js} +6 -6
- package/dist/{packager-tool-1ctvbx0h.js → packager-tool-tr3ttz5c.js} +1 -1
- package/dist/{packager-tool-k9dk39tg.js → packager-tool-txygqgb2.js} +3 -3
- package/dist/packager-tool-v6jcys3s.js +46 -0
- package/dist/packager-tool-w35s60sx.js +179 -0
- package/dist/{packager-tool-axqk17xw.js → packager-tool-xbfr6y2x.js} +142 -34
- package/dist/{packager-tool-2qsbh4kd.js → packager-tool-yfcscjfp.js} +50 -12
- package/dist/{packager-tool-ay4j9x92.js → packager-tool-ykq6gmhc.js} +19 -8
- package/dist/packager-tool.js +2 -2
- package/dist/prepare-solution-resources-sk3tyy8b.js +26 -0
- package/dist/{project-command-utils-82tja3k0.js → project-command-utils-7ygs8xq0.js} +20 -13
- package/dist/project-contributions-nzh06q0y.js +31 -0
- package/dist/project-identity-telemetry-47k2g7nq.js +18 -0
- package/dist/publish.js +14 -14
- package/dist/{resource-mutations-h6wfdqr4.js → resource-mutations-qcz2vcxe.js} +9 -9
- package/dist/{resource-version-lookup-xzgnvr48.js → resource-version-lookup-w3kzh4z9.js} +9 -9
- package/dist/resource.js +9 -9
- package/dist/{restore-command-service-wgqxp5tb.js → restore-command-service-m6c8fb7q.js} +20 -15
- package/dist/run-service-cmrzccnm.js +1055 -0
- package/dist/services/deploy-activate-service.d.ts +5 -2
- package/dist/services/deploy-config-file.d.ts +24 -0
- package/dist/services/deploy-delete-service.d.ts +1 -1
- package/dist/services/deploy-run-service.d.ts +8 -1
- package/dist/services/deploy-uninstall-service.d.ts +4 -2
- package/dist/services/deploy-upgrade-service.d.ts +23 -2
- package/dist/services/deployment-feed-locator.d.ts +19 -6
- package/dist/services/deployment-links.d.ts +16 -0
- package/dist/services/deployment-progress.d.ts +10 -0
- package/dist/services/deployment-search.d.ts +15 -2
- package/dist/services/deployment-state.d.ts +9 -0
- package/dist/services/feed-resolver.d.ts +17 -0
- package/dist/services/feed-selection.d.ts +59 -0
- package/dist/services/folder-runtime-check.d.ts +107 -0
- package/dist/services/incomplete-feed-sweep.d.ts +6 -0
- package/dist/services/pack-command-service.d.ts +6 -0
- package/dist/services/pack-project.d.ts +1 -1
- package/dist/services/package-metadata-rewrite.d.ts +13 -0
- package/dist/services/personal-workspace-resolver.d.ts +4 -1
- package/dist/services/prepare-solution-resources.d.ts +11 -6
- package/dist/services/project-contributions.d.ts +26 -2
- package/dist/services/project-identity-telemetry.d.ts +31 -0
- package/dist/services/solution-members.d.ts +31 -0
- package/dist/{ship-telemetry-19gx83af.js → ship-telemetry-9djqndmy.js} +4 -4
- package/dist/{solution-auth-jxcgd2m0.js → solution-auth-0e3qm74f.js} +3 -3
- package/dist/{solution-definition-helper-tqwd6cxn.js → solution-definition-helper-bkyhs1bd.js} +1 -1
- package/dist/{solution-identity-c23d9bfv.js → solution-identity-j63p6n81.js} +4 -4
- package/dist/templates/AGENTS.md +131 -24
- package/dist/tool.js +26 -26
- package/package.json +2 -2
- package/dist/deploy-delete-service-dwd4qb1m.js +0 -23
- package/dist/deploy-run-service-0kzfrvnn.js +0 -23
- package/dist/feed-resolver-w4y5aspe.js +0 -27
- package/dist/feed-scope-failure-4ef9zxcx.js +0 -20
- package/dist/pack-command-service-k7ebbfya.js +0 -29
- package/dist/packager-tool-vrqbbh01.js +0 -182
- package/dist/packager-tool-wwzg88qy.js +0 -74
- package/dist/prepare-solution-resources-h7zvnncd.js +0 -26
- package/dist/project-contributions-xx560n8y.js +0 -27
- package/dist/run-service-2rc4we5q.js +0 -506
|
@@ -1,34 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getFileSystem
|
|
3
|
+
} from "./packager-tool-1db1wqdy.js";
|
|
1
4
|
import {
|
|
2
5
|
catchError,
|
|
3
6
|
extractErrorDetails
|
|
4
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
5
8
|
import {
|
|
6
9
|
logger,
|
|
7
10
|
processContext,
|
|
11
|
+
buildOrchestratorUrl,
|
|
12
|
+
msToDuration,
|
|
8
13
|
PollOutcome,
|
|
9
14
|
pollUntil
|
|
10
|
-
} from "./packager-tool-
|
|
15
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
11
16
|
import {
|
|
12
17
|
Configuration2,
|
|
13
18
|
PipelinesApi
|
|
14
|
-
} from "./packager-tool-
|
|
19
|
+
} from "./packager-tool-tqe3m1xp.js";
|
|
15
20
|
import {
|
|
16
21
|
Configuration3,
|
|
17
22
|
DeploymentsApi2
|
|
18
|
-
} from "./packager-tool-
|
|
23
|
+
} from "./packager-tool-46x80z85.js";
|
|
19
24
|
import {
|
|
25
|
+
readDeploymentByKeyAsync2,
|
|
20
26
|
findDeploymentBestEffort2,
|
|
21
27
|
isPipelineDeploymentNotFoundError2,
|
|
22
28
|
mapOperationStatusToPipelineStatus2,
|
|
23
29
|
deploymentToTerminalPipelineResult2
|
|
24
|
-
} from "./packager-tool-
|
|
25
|
-
import {
|
|
26
|
-
isCurrentRecordAsync
|
|
27
|
-
} from "./packager-tool-t2r6z24f.js";
|
|
30
|
+
} from "./packager-tool-rhg3mwkn.js";
|
|
28
31
|
import {
|
|
29
32
|
coerceWorkflowErrorMessages,
|
|
30
33
|
VALIDATION_CONFIRMATION_REQUIRED_CODE
|
|
31
34
|
} from "./packager-tool-2pxe2r4j.js";
|
|
35
|
+
import {
|
|
36
|
+
isCurrentRecordAsync
|
|
37
|
+
} from "./packager-tool-1tvhgac9.js";
|
|
38
|
+
|
|
39
|
+
// src/services/deployment-progress.ts
|
|
40
|
+
function deploymentProgressStatus(result) {
|
|
41
|
+
return [
|
|
42
|
+
result.status && `DeploymentStatus: ${result.status}`,
|
|
43
|
+
result.operation && `Operation: ${result.operation}`,
|
|
44
|
+
result.operationStatus && `OperationStatus: ${result.operationStatus}`,
|
|
45
|
+
result.activationStatus && `ActivationStatus: ${result.activationStatus}`
|
|
46
|
+
].filter(Boolean).join(", ");
|
|
47
|
+
}
|
|
48
|
+
function pipelineProgressStatus(result) {
|
|
49
|
+
return [
|
|
50
|
+
`Status: ${result.status}`,
|
|
51
|
+
result.deploymentResult && deploymentProgressStatus(result.deploymentResult)
|
|
52
|
+
].filter(Boolean).join(", ");
|
|
53
|
+
}
|
|
54
|
+
function createDeploymentProgress(label) {
|
|
55
|
+
let lastStatus;
|
|
56
|
+
let lastReportedAt = 0;
|
|
57
|
+
return (status, elapsedMs) => {
|
|
58
|
+
const changed = status !== lastStatus;
|
|
59
|
+
if (!changed && elapsedMs - lastReportedAt < 30000)
|
|
60
|
+
return;
|
|
61
|
+
const line = `${label}: ${changed ? "" : "still "}${status}, ${msToDuration(elapsedMs)} elapsed`;
|
|
62
|
+
const message = line.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ");
|
|
63
|
+
if (logger.getLevel() <= 2 /* WARN */) {
|
|
64
|
+
if (typeof logger.report === "function") {
|
|
65
|
+
logger.report(message);
|
|
66
|
+
} else {
|
|
67
|
+
logger.warn(message);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
lastStatus = status;
|
|
71
|
+
lastReportedAt = elapsedMs;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
32
74
|
|
|
33
75
|
// src/services/activation.ts
|
|
34
76
|
var TERMINAL_STATUSES = new Set([
|
|
@@ -80,10 +122,12 @@ async function activateDeployment(auth, deploymentName, options) {
|
|
|
80
122
|
if (!instanceId) {
|
|
81
123
|
return { kind: "NoInstance" };
|
|
82
124
|
}
|
|
125
|
+
const progress = createDeploymentProgress(`activate '${deploymentName}'`);
|
|
83
126
|
const pollResult = await pollUntil({
|
|
84
127
|
fn: () => api.pipelinesGetDeploymentInstanceStatus({ instanceId }, options.scope),
|
|
85
128
|
until: (result) => TERMINAL_STATUSES.has(result.status),
|
|
86
129
|
getStatus: (result) => result.status,
|
|
130
|
+
onPoll: (result, elapsedMs) => progress(deploymentProgressStatus(result), elapsedMs),
|
|
87
131
|
label: `activate ${deploymentName}`,
|
|
88
132
|
logPrefix: "activate",
|
|
89
133
|
timeoutMs: options.timeoutSeconds * 1000,
|
|
@@ -110,6 +154,90 @@ async function activateDeployment(auth, deploymentName, options) {
|
|
|
110
154
|
};
|
|
111
155
|
}
|
|
112
156
|
|
|
157
|
+
// src/services/deployment-links.ts
|
|
158
|
+
function buildDeploymentLinks(auth, deploymentKey, installedFolderKey, feedFolderKey) {
|
|
159
|
+
const { baseUrl, organizationName, tenantName } = auth;
|
|
160
|
+
if (!baseUrl || !organizationName || !tenantName)
|
|
161
|
+
return {};
|
|
162
|
+
const [, links] = catchError(() => {
|
|
163
|
+
let baseUrlEnd = baseUrl.length;
|
|
164
|
+
while (baseUrlEnd > 0 && baseUrl[baseUrlEnd - 1] === "/") {
|
|
165
|
+
baseUrlEnd--;
|
|
166
|
+
}
|
|
167
|
+
const root = buildOrchestratorUrl(baseUrl.slice(0, baseUrlEnd), organizationName, tenantName, "");
|
|
168
|
+
const route = feedFolderKey ? "folder-solutions-management" : "solutions-management";
|
|
169
|
+
const query = feedFolderKey ? `?fkey=${encodeURIComponent(feedFolderKey)}&solutionFeedId=${encodeURIComponent(feedFolderKey)}` : "";
|
|
170
|
+
const panel = deploymentKey ? `(sidepanel:sidepanel/${route}/deployment-details/${encodeURIComponent(deploymentKey)}/overview)` : "";
|
|
171
|
+
let panelQuery = "";
|
|
172
|
+
if (deploymentKey) {
|
|
173
|
+
const separator = query ? "&" : "?";
|
|
174
|
+
panelQuery = `${separator}allowBindings=true`;
|
|
175
|
+
if (feedFolderKey) {
|
|
176
|
+
panelQuery += `&sidepanelSolutionFeedId=${encodeURIComponent(feedFolderKey)}`;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
orchestratorUrl: `${root}/${route}/deployments${panel}${query}${panelQuery}`,
|
|
181
|
+
...installedFolderKey ? {
|
|
182
|
+
folderUrl: `${root}/processes?fkey=${encodeURIComponent(installedFolderKey)}`
|
|
183
|
+
} : {}
|
|
184
|
+
};
|
|
185
|
+
});
|
|
186
|
+
return links ?? {};
|
|
187
|
+
}
|
|
188
|
+
async function readDeploymentLinksAsync(auth, deploymentKey, scope, feedFolderKey, signal) {
|
|
189
|
+
const [, info] = deploymentKey ? await catchError(readDeploymentByKeyAsync2(auth, deploymentKey, { scope, signal })) : [undefined, undefined];
|
|
190
|
+
return buildDeploymentLinks(auth, deploymentKey, info?.deploymentKey === deploymentKey ? info?.installedRootFolderKey : undefined, feedFolderKey);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// src/services/deploy-config-file.ts
|
|
194
|
+
async function parseConfigurationAsync(content) {
|
|
195
|
+
if (content.trim().length === 0) {
|
|
196
|
+
throw new Error("Configuration file is empty.");
|
|
197
|
+
}
|
|
198
|
+
const [jsonError, jsonConfiguration] = catchError(() => JSON.parse(content));
|
|
199
|
+
if (!jsonError) {
|
|
200
|
+
return jsonConfiguration;
|
|
201
|
+
}
|
|
202
|
+
const { parse: parseYaml } = await import("./index-6ma58k47.js");
|
|
203
|
+
return parseYaml(content);
|
|
204
|
+
}
|
|
205
|
+
async function readDeployConfigFileAsync(configFile) {
|
|
206
|
+
const fs = getFileSystem();
|
|
207
|
+
const configPath = fs.path.resolve(configFile);
|
|
208
|
+
const [readError, configContent] = await catchError(fs.readFile(configPath, "utf-8"));
|
|
209
|
+
if (readError) {
|
|
210
|
+
return {
|
|
211
|
+
ok: false,
|
|
212
|
+
reason: "config_file_read_failed",
|
|
213
|
+
message: `Failed to read config file: ${configPath}`,
|
|
214
|
+
instructions: readError.message
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
if (configContent === null) {
|
|
218
|
+
return {
|
|
219
|
+
ok: false,
|
|
220
|
+
reason: "config_file_not_found",
|
|
221
|
+
message: `Failed to read config file: ${configPath}`,
|
|
222
|
+
instructions: `File not found at ${configPath}. Check the --config-file path; generate a default config with: uip solution deploy config get <package-name> -d config.json.`,
|
|
223
|
+
errorCode: "invalid_argument",
|
|
224
|
+
retry: "RetryWillNotFix"
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
const [parseError, parsed] = await catchError(parseConfigurationAsync(configContent));
|
|
228
|
+
if (parseError) {
|
|
229
|
+
return {
|
|
230
|
+
ok: false,
|
|
231
|
+
reason: "config_file_parse_failed",
|
|
232
|
+
message: `Invalid JSON or YAML in config file: ${configPath}`,
|
|
233
|
+
instructions: parseError.message,
|
|
234
|
+
errorCode: "invalid_argument",
|
|
235
|
+
retry: "RetryWillNotFix"
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
return { ok: true, body: parsed };
|
|
239
|
+
}
|
|
240
|
+
|
|
113
241
|
// src/services/deployment-validation.ts
|
|
114
242
|
var NO_SERVER_REASON = "the server reported no reason.";
|
|
115
243
|
var LOOKUP_TIMEOUT_MS = 15000;
|
|
@@ -341,6 +469,7 @@ async function readOutcomeByKeyAsync(api, deploymentKey) {
|
|
|
341
469
|
}
|
|
342
470
|
async function pollPipelineDeploymentAsync(api, auth, options) {
|
|
343
471
|
let observedDeploymentKey;
|
|
472
|
+
const progress = createDeploymentProgress(`${options.logPrefix} '${options.deploymentName}'`);
|
|
344
473
|
return pollUntil({
|
|
345
474
|
fn: async () => {
|
|
346
475
|
try {
|
|
@@ -376,6 +505,7 @@ async function pollPipelineDeploymentAsync(api, auth, options) {
|
|
|
376
505
|
},
|
|
377
506
|
until: (result) => PIPELINE_TERMINAL_STATUSES.has(result.status),
|
|
378
507
|
getStatus: (result) => result.status,
|
|
508
|
+
onPoll: (result, elapsedMs) => progress(pipelineProgressStatus(result), elapsedMs),
|
|
379
509
|
label: `deployment ${options.pipelineDeploymentId}`,
|
|
380
510
|
logPrefix: options.logPrefix,
|
|
381
511
|
timeoutMs: options.timeoutMs,
|
|
@@ -473,6 +603,6 @@ async function runInstallToOutcomeAsync(request) {
|
|
|
473
603
|
};
|
|
474
604
|
}
|
|
475
605
|
|
|
476
|
-
export { activateDeployment, NO_SERVER_REASON, describeValidationFailureAsync, describeDeploymentFailureAsync, listPermanentDeletionResourcesAsync, ACKNOWLEDGE_PERMANENT_DELETION_FLAG, finiteOr, runInstallToOutcomeAsync };
|
|
606
|
+
export { deploymentProgressStatus, createDeploymentProgress, activateDeployment, buildDeploymentLinks, readDeploymentLinksAsync, readDeployConfigFileAsync, NO_SERVER_REASON, describeValidationFailureAsync, describeDeploymentFailureAsync, listPermanentDeletionResourcesAsync, ACKNOWLEDGE_PERMANENT_DELETION_FLAG, finiteOr, runInstallToOutcomeAsync };
|
|
477
607
|
|
|
478
|
-
//# debugId=
|
|
608
|
+
//# debugId=9E79325C9FAA146064756E2164756E21
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveSessionIdentity
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-jtvhkavz.js";
|
|
4
4
|
import {
|
|
5
5
|
catchError,
|
|
6
6
|
httpStatusOf2,
|
|
7
7
|
getSdkUserAgentToken,
|
|
8
8
|
installSdkUserAgentHeader
|
|
9
|
-
} from "./packager-tool-
|
|
9
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
10
10
|
import {
|
|
11
11
|
logger
|
|
12
|
-
} from "./packager-tool-
|
|
12
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
13
13
|
import {
|
|
14
14
|
Configuration3,
|
|
15
15
|
DeploymentSearchItemDto2FromJSON,
|
|
16
16
|
SearchApi
|
|
17
|
-
} from "./packager-tool-
|
|
17
|
+
} from "./packager-tool-46x80z85.js";
|
|
18
18
|
|
|
19
19
|
// ../pipelines-sdk/generated/src/runtime.ts
|
|
20
20
|
var BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
@@ -290,7 +290,7 @@ var package_default = {
|
|
|
290
290
|
name: "@uipath/pipelines-sdk",
|
|
291
291
|
author: "UiPath",
|
|
292
292
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
293
|
-
version: "1.
|
|
293
|
+
version: "1.207.0",
|
|
294
294
|
description: "Generated TypeScript client for UiPath Pipelines API (CI/CD deployment lifecycle)",
|
|
295
295
|
repository: {
|
|
296
296
|
type: "git",
|
|
@@ -2140,4 +2140,4 @@ async function feedReadRefusalAsync2(session, folderKey, action, route = "deploy
|
|
|
2140
2140
|
|
|
2141
2141
|
export { Configuration2, DeploymentOperation, DeploymentStatus, PipelinesApi, isMissingPipelinesRoute, isApplicationSession, parseSearchPage, DeploymentSearchNeedsUserSessionError, DeploymentSearchTruncatedError, searchDeploymentsPage, isAuthRefusal, classifyFeedSession2, feedSessionRefusal2, feedReadRefusalForApplication2, FeedReadRefusedError2, feedSessionRefusalAsync2, feedReadRefusalAsync2 };
|
|
2142
2142
|
|
|
2143
|
-
//# debugId=
|
|
2143
|
+
//# debugId=DABF7BDF7D82E47B64756E2164756E21
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getFileSystem
|
|
3
|
-
} from "./packager-tool-
|
|
3
|
+
} from "./packager-tool-1db1wqdy.js";
|
|
4
4
|
import {
|
|
5
5
|
ShipDimensions,
|
|
6
6
|
catchError
|
|
7
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
8
8
|
import {
|
|
9
9
|
logger,
|
|
10
10
|
trackShipSucceeded
|
|
11
|
-
} from "./packager-tool-
|
|
11
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
12
12
|
import {
|
|
13
13
|
unzip2
|
|
14
14
|
} from "./packager-tool-rj2d1g0w.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// ../../node_modules/@uipath/resource-builder-sdk/dist/mappings/resource-subtype-mapper.js
|
|
2
|
+
var solutionsSubtypesMap = {
|
|
3
|
+
Text: "stringAsset",
|
|
4
|
+
Integer: "integerAsset",
|
|
5
|
+
Bool: "booleanAsset",
|
|
6
|
+
Credential: "credentialAsset",
|
|
7
|
+
Secret: "secretAsset",
|
|
8
|
+
Json: "jsonAsset",
|
|
9
|
+
Amazon: "amazonBucket",
|
|
10
|
+
Azure: "azureBucket",
|
|
11
|
+
Orchestrator: "orchestratorBucket",
|
|
12
|
+
Time: "timeTrigger",
|
|
13
|
+
Queue: "queueTrigger",
|
|
14
|
+
Event: "connectedEventTrigger",
|
|
15
|
+
Process: "process",
|
|
16
|
+
ProcessOrchestration: "processOrchestration",
|
|
17
|
+
WebApp: "webApp",
|
|
18
|
+
Agent: "agent",
|
|
19
|
+
TestAutomationProcess: "testAutomationProcess",
|
|
20
|
+
Api: "api",
|
|
21
|
+
Function: "function",
|
|
22
|
+
McpServer: "mcpserver",
|
|
23
|
+
BusinessRule: "businessRule",
|
|
24
|
+
Native: "native",
|
|
25
|
+
Federated: "federated",
|
|
26
|
+
Case: "case",
|
|
27
|
+
CaseMain: "caseMain",
|
|
28
|
+
CaseComment: "caseComment",
|
|
29
|
+
CaseDocument: "caseDocument"
|
|
30
|
+
};
|
|
31
|
+
function mapResourceToSolutionSubtype(entitySubtype) {
|
|
32
|
+
if (!entitySubtype)
|
|
33
|
+
return;
|
|
34
|
+
return solutionsSubtypesMap[entitySubtype] ?? entitySubtype;
|
|
35
|
+
}
|
|
36
|
+
function mapSolutionToResourceSubtype(solutionSubtype) {
|
|
37
|
+
if (!solutionSubtype)
|
|
38
|
+
return;
|
|
39
|
+
for (const [key, value] of Object.entries(solutionsSubtypesMap))
|
|
40
|
+
if (value.toLowerCase() === solutionSubtype.toLowerCase())
|
|
41
|
+
return key;
|
|
42
|
+
return solutionSubtype;
|
|
43
|
+
}
|
|
44
|
+
export { mapResourceToSolutionSubtype, mapSolutionToResourceSubtype };
|
|
45
|
+
|
|
46
|
+
//# debugId=49E336B9322847C764756E2164756E21
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getFileSystem
|
|
3
|
+
} from "./packager-tool-1db1wqdy.js";
|
|
4
|
+
import {
|
|
5
|
+
CommandDimensions,
|
|
6
|
+
ProjectDimensions,
|
|
7
|
+
projectKey,
|
|
8
|
+
projectIdentityProperties,
|
|
9
|
+
PROJECT_IDENTITY_LOOKUP_BUDGET_MS,
|
|
10
|
+
withinProjectIdentityBudget,
|
|
11
|
+
catchError,
|
|
12
|
+
isProjectTelemetryDisabled
|
|
13
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
14
|
+
import {
|
|
15
|
+
logger,
|
|
16
|
+
CommonTelemetryEvents,
|
|
17
|
+
telemetry
|
|
18
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
19
|
+
import {
|
|
20
|
+
toolsFactoryRepository
|
|
21
|
+
} from "./packager-tool-devc4w73.js";
|
|
22
|
+
import {
|
|
23
|
+
toPortableRelativePath2
|
|
24
|
+
} from "./packager-tool-kmwjscby.js";
|
|
25
|
+
|
|
26
|
+
// src/services/solution-members.ts
|
|
27
|
+
function projectDirOf(fs, declaredPath) {
|
|
28
|
+
const dir = fs.path.dirname(toPortableRelativePath2(declaredPath));
|
|
29
|
+
return dir && dir !== "." ? dir : "";
|
|
30
|
+
}
|
|
31
|
+
async function readSolutionProjects(solutionDir, fs) {
|
|
32
|
+
const entries = await fs.readdir(solutionDir);
|
|
33
|
+
const uipxFile = entries.find((f) => f.endsWith(".uipx"));
|
|
34
|
+
if (!uipxFile) {
|
|
35
|
+
throw new Error(`No .uipx solution file found in '${solutionDir}'. ` + `Pass a solution directory or run 'uip solution init' first.`);
|
|
36
|
+
}
|
|
37
|
+
const content = await fs.readFile(fs.path.join(solutionDir, uipxFile));
|
|
38
|
+
if (!content) {
|
|
39
|
+
throw new Error(`Solution file '${uipxFile}' is empty.`);
|
|
40
|
+
}
|
|
41
|
+
const json = typeof content === "string" ? content : new TextDecoder().decode(content);
|
|
42
|
+
const [parseError, solution] = catchError(() => JSON.parse(json));
|
|
43
|
+
if (parseError) {
|
|
44
|
+
throw new Error(`Failed to parse ${uipxFile}: ${parseError.message}`);
|
|
45
|
+
}
|
|
46
|
+
return (solution.Projects ?? []).map((p) => {
|
|
47
|
+
const relativePath = projectDirOf(fs, p.ProjectRelativePath ?? "");
|
|
48
|
+
return {
|
|
49
|
+
name: p.Name || fs.path.basename(relativePath || solutionDir) || "",
|
|
50
|
+
projectType: p.Type ?? "",
|
|
51
|
+
relativePath,
|
|
52
|
+
...p.Id ? { designId: p.Id } : {}
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// src/services/project-identity-telemetry.ts
|
|
58
|
+
function membershipProperties(memberId, solutionId) {
|
|
59
|
+
return {
|
|
60
|
+
[ProjectDimensions.SolutionProjectKey]: projectKey(memberId),
|
|
61
|
+
...solutionId ? { [ProjectDimensions.SolutionKey]: projectKey(solutionId) } : {}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function identityReaderFor(projectType) {
|
|
65
|
+
const factory = toolsFactoryRepository.canHandleProject(projectType) ? toolsFactoryRepository.getProjectToolFactory(projectType) : undefined;
|
|
66
|
+
return factory?.readProjectIdentityAsync;
|
|
67
|
+
}
|
|
68
|
+
async function readIdentityWithinBudget(reader, projectPath, what) {
|
|
69
|
+
try {
|
|
70
|
+
return await withinProjectIdentityBudget(reader(projectPath, getFileSystem()), () => logger.debug(`${what} identity skipped: no answer within ${PROJECT_IDENTITY_LOOKUP_BUDGET_MS} ms`));
|
|
71
|
+
} catch {
|
|
72
|
+
return { status: "invalid" };
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function createProjectActivityObserver2(commandName) {
|
|
76
|
+
if (isProjectTelemetryDisabled())
|
|
77
|
+
return;
|
|
78
|
+
const properties = new Map;
|
|
79
|
+
const finished = new Set;
|
|
80
|
+
return async (project, phase, success, solutionId) => {
|
|
81
|
+
if (project.Type !== "Api")
|
|
82
|
+
return;
|
|
83
|
+
const member = project.Id;
|
|
84
|
+
if (phase === "before") {
|
|
85
|
+
if (properties.has(member))
|
|
86
|
+
return;
|
|
87
|
+
const membership = membershipProperties(member, solutionId);
|
|
88
|
+
const row = (status, id) => ({
|
|
89
|
+
...projectIdentityProperties({
|
|
90
|
+
projectType: project.Type,
|
|
91
|
+
status,
|
|
92
|
+
...id ? { id } : {}
|
|
93
|
+
}),
|
|
94
|
+
...membership
|
|
95
|
+
});
|
|
96
|
+
const reader = identityReaderFor(project.Type);
|
|
97
|
+
if (!reader || !project.ProjectPath) {
|
|
98
|
+
properties.set(member, row("unsupported"));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
properties.set(member, row("timeout"));
|
|
102
|
+
const descriptor = await readIdentityWithinBudget(reader, project.ProjectPath, "project activity");
|
|
103
|
+
if (descriptor && !finished.has(member))
|
|
104
|
+
properties.set(member, row(descriptor.status, descriptor.id));
|
|
105
|
+
} else if (!finished.has(member)) {
|
|
106
|
+
finished.add(member);
|
|
107
|
+
telemetry.trackEvent(CommonTelemetryEvents.ProjectActivity, {
|
|
108
|
+
...properties.get(member),
|
|
109
|
+
[CommandDimensions.CommandName]: commandName,
|
|
110
|
+
[CommandDimensions.TerminalOutcome]: success ? "success" : "failure"
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
async function trackUploadedProjectIdentities2(upload) {
|
|
116
|
+
if (isProjectTelemetryDisabled())
|
|
117
|
+
return;
|
|
118
|
+
try {
|
|
119
|
+
const fs = getFileSystem();
|
|
120
|
+
const members = await withinProjectIdentityBudget(readSolutionProjects(upload.solutionDir, fs), () => logger.debug(`upload project identity skipped: no answer from the solution manifest within ${PROJECT_IDENTITY_LOOKUP_BUDGET_MS} ms`));
|
|
121
|
+
if (!members)
|
|
122
|
+
return;
|
|
123
|
+
const assigned = assignedProjectIds(upload.response.projects);
|
|
124
|
+
const rows = await Promise.all(members.map((member) => uploadedMemberRow(member, assigned, upload, fs)));
|
|
125
|
+
for (const row of rows)
|
|
126
|
+
if (row)
|
|
127
|
+
telemetry.trackEvent(CommonTelemetryEvents.ProjectActivity, row);
|
|
128
|
+
} catch (error) {
|
|
129
|
+
logger.debug(`upload project identity skipped: ${error instanceof Error ? error.message : String(error)}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async function uploadedMemberRow(member, assigned, upload, fs) {
|
|
133
|
+
const skip = (why) => {
|
|
134
|
+
logger.debug(`upload project identity: no row for member '${member.name}': ${why}`);
|
|
135
|
+
return;
|
|
136
|
+
};
|
|
137
|
+
const memberKey = projectKey(member.designId);
|
|
138
|
+
if (!member.designId || !memberKey)
|
|
139
|
+
return skip("the .uipx entry has no GUID id");
|
|
140
|
+
const assignedId = assigned.get(memberKey);
|
|
141
|
+
if (!assignedId)
|
|
142
|
+
return skip("the response does not name it");
|
|
143
|
+
const cloudKey = projectKey(assignedId);
|
|
144
|
+
if (!cloudKey)
|
|
145
|
+
return skip("the Studio Web project id is not a GUID");
|
|
146
|
+
const reader = identityReaderFor(member.projectType);
|
|
147
|
+
if (!reader)
|
|
148
|
+
return skip(`no identity reader for type '${member.projectType}'`);
|
|
149
|
+
const answer = await readIdentityWithinBudget(reader, fs.path.join(upload.solutionDir, member.relativePath), `upload project '${member.name}'`);
|
|
150
|
+
if (answer === undefined)
|
|
151
|
+
return;
|
|
152
|
+
const localKey = answer.status === "resolved" ? projectKey(answer.id) : undefined;
|
|
153
|
+
if (!localKey)
|
|
154
|
+
return skip(answer.status === "resolved" ? "local id is not a GUID" : `local id ${answer.status}`);
|
|
155
|
+
return {
|
|
156
|
+
[CommandDimensions.CommandName]: "uip solution upload",
|
|
157
|
+
[CommandDimensions.TerminalOutcome]: "success",
|
|
158
|
+
...projectIdentityProperties({
|
|
159
|
+
projectType: member.projectType,
|
|
160
|
+
status: "resolved",
|
|
161
|
+
id: assignedId
|
|
162
|
+
}),
|
|
163
|
+
...localKey !== cloudKey ? { [ProjectDimensions.PreviousProjectKey]: localKey } : {},
|
|
164
|
+
...membershipProperties(member.designId, upload.solutionId)
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function assignedProjectIds(projects) {
|
|
168
|
+
const assigned = new Map;
|
|
169
|
+
for (const project of projects ?? []) {
|
|
170
|
+
const key = projectKey(project.designId);
|
|
171
|
+
if (key && project.id && !assigned.has(key))
|
|
172
|
+
assigned.set(key, project.id);
|
|
173
|
+
}
|
|
174
|
+
return assigned;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export { readSolutionProjects, createProjectActivityObserver2, trackUploadedProjectIdentities2 };
|
|
178
|
+
|
|
179
|
+
//# debugId=4FF633FBB6BE1FA864756E2164756E21
|