@uipath/solution-tool 1.206.0-preview.306 → 1.207.0-preview.307
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/THIRD-PARTY-NOTICES.md +4 -4
- package/dist/{archive-extract-ma0gy822.js → archive-extract-afgwacbg.js} +3 -3
- package/dist/{cleanup-command-service-abtxpefz.js → cleanup-command-service-0j6qxj96.js} +20 -15
- package/dist/deploy-delete-service-ghyetrvj.js +23 -0
- package/dist/deploy-run-service-sz77fpsz.js +24 -0
- package/dist/{deploy-status-service-k1gycn13.js → deploy-status-service-aj4m61hg.js} +49 -25
- package/dist/deploy.js +21 -20
- package/dist/{deployment-search-bjdwqh5w.js → deployment-search-mkvzgeq4.js} +9 -9
- package/dist/{embedded-file-reader-pxpwcq3n.js → embedded-file-reader-k94wt612.js} +16 -16
- package/dist/feed-resolver-yj94m9j1.js +31 -0
- package/dist/feed-scope-failure-7abh61sj.js +20 -0
- package/dist/{feed-session-ytew8k2j.js → feed-session-z8t87r5w.js} +6 -6
- package/dist/{first-party-service-6gf3n6d8.js → first-party-service-bmtxd7wx.js} +1 -1
- package/dist/folder-runtime-check-8nf63er2.js +25 -0
- package/dist/{governance-options-40m81z8h.js → governance-options-ft8bqz4p.js} +7 -7
- package/dist/{packager-tool-v3ze7wmr.js → index-6ma58k47.js} +33 -708
- package/dist/{index-yjvmjpdn.js → index-j3tpb2cr.js} +12 -11
- package/dist/{index-p3x7ztdr.js → index-jy1760qy.js} +1 -1
- package/dist/{index-2bn3jzn9.js → index-nbs04tqr.js} +9 -7
- package/dist/index.js +26 -26
- package/dist/init.js +10 -10
- package/dist/{list-0k8c4rt6.js → list-3a1tdrgm.js} +11 -11
- package/dist/models/pack-command-types.d.ts +12 -0
- package/dist/{node-6ay6nbnq.js → node-83xy0gm0.js} +6 -6
- package/dist/pack-command-service-42p3t8xa.js +32 -0
- package/dist/{pack-project-2g2ncn2k.js → pack-project-w514zr5v.js} +21 -18
- package/dist/pack.js +25 -22
- package/dist/{package-id-56k44s7y.js → package-id-2dgfbh5h.js} +3 -3
- package/dist/{packager-tool-2zn98p5r.js → packager-tool-0gyqtxvs.js} +4 -4
- 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-xxf8f4v2.js → packager-tool-2syv199e.js} +9 -5
- package/dist/packager-tool-3ft8hywr.js +449 -0
- package/dist/{packager-tool-829w06ns.js → packager-tool-3qach0s4.js} +14 -8
- package/dist/{packager-tool-bkmwknfn.js → packager-tool-4f1k64fh.js} +8 -74
- package/dist/{packager-tool-7v03ncmv.js → packager-tool-70ag56bf.js} +49 -24
- package/dist/{packager-tool-5e4gps62.js → packager-tool-71sz9598.js} +20 -8
- package/dist/{packager-tool-23g7kn35.js → packager-tool-7j920ac5.js} +18 -11
- package/dist/packager-tool-7s842xrq.js +140 -0
- package/dist/{packager-tool-s8q14fth.js → packager-tool-849ch2tq.js} +4 -6
- package/dist/{packager-tool-aws5w512.js → packager-tool-887bkh9y.js} +1 -1
- package/dist/{packager-tool-f5pzh184.js → packager-tool-a566400t.js} +26 -10
- package/dist/packager-tool-a813na66.js +75 -0
- package/dist/{packager-tool-c8x0tpe4.js → packager-tool-af8n6rqz.js} +85 -30
- package/dist/{packager-tool-y1304xzm.js → packager-tool-bpdyy6vs.js} +530 -204
- package/dist/{packager-tool-fx4ws49n.js → packager-tool-cenfraf4.js} +2 -2
- package/dist/{packager-tool-0z4aq300.js → packager-tool-cwqy5rb5.js} +119 -52
- package/dist/{packager-tool-a7s0gbxs.js → packager-tool-devc4w73.js} +7 -2
- package/dist/{packager-tool-pqk9v4h7.js → packager-tool-fbajevvm.js} +52 -15
- package/dist/{packager-tool-r0ha8c95.js → packager-tool-fz96p75n.js} +3 -3
- package/dist/{packager-tool-m07vyk89.js → packager-tool-gb3dq79g.js} +36 -9
- package/dist/{packager-tool-h8tksb5s.js → packager-tool-gns0nxbt.js} +28 -9
- package/dist/{packager-tool-wjvks6st.js → packager-tool-h8wam8pt.js} +15 -6
- package/dist/{packager-tool-z4cbca95.js → packager-tool-hczpvrc1.js} +6 -6
- package/dist/{packager-tool-t39pjz7n.js → packager-tool-jtvhkavz.js} +48 -6
- 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-2qsbh4kd.js → packager-tool-ncgpx1ce.js} +50 -12
- package/dist/{packager-tool-f15an17m.js → packager-tool-p1xfsv6c.js} +92 -4
- package/dist/{packager-tool-egc54x78.js → packager-tool-qhht1tc9.js} +2408 -771
- package/dist/packager-tool-r7fmsz2t.js +741 -0
- package/dist/{packager-tool-resolver-30hxk8vm.js → packager-tool-resolver-mynfj0rt.js} +6 -6
- package/dist/{packager-tool-ay4j9x92.js → packager-tool-s9tyw75r.js} +19 -8
- package/dist/{packager-tool-ckrt4gyr.js → packager-tool-t9zked1m.js} +3 -3
- package/dist/{packager-tool-1ctvbx0h.js → packager-tool-tr3ttz5c.js} +1 -1
- package/dist/{packager-tool-chff74yz.js → packager-tool-tt9v40x6.js} +3010 -846
- package/dist/{packager-tool-k9dk39tg.js → packager-tool-txygqgb2.js} +3 -3
- package/dist/packager-tool-v6jcys3s.js +46 -0
- package/dist/packager-tool-w0tmr9xe.js +279 -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-m5mwc6by.js → packager-tool-zsv8208n.js} +22 -18
- package/dist/{packager-tool-vrw36pdb.js → packager-tool-ztxsccjk.js} +140 -10
- package/dist/packager-tool.js +2 -2
- package/dist/prepare-solution-resources-g9y01pgd.js +26 -0
- package/dist/{project-command-utils-82tja3k0.js → project-command-utils-yxrgwzf9.js} +20 -13
- package/dist/project-contributions-c8v3bwjr.js +31 -0
- package/dist/project-identity-telemetry-yxdhswyq.js +18 -0
- package/dist/publish.js +14 -14
- package/dist/{resource-mutations-h6wfdqr4.js → resource-mutations-dn4f8xr1.js} +9 -9
- package/dist/{resource-version-lookup-xzgnvr48.js → resource-version-lookup-mksxc1dc.js} +9 -9
- package/dist/resource.js +9 -9
- package/dist/{restore-command-service-bqs7r9y3.js → restore-command-service-ztbt2ejp.js} +20 -15
- package/dist/run-service-r52wgf69.js +1056 -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-dreejga4.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-as1jfycj.js +0 -23
- package/dist/deploy-run-service-gs1xv1y1.js +0 -23
- package/dist/feed-resolver-x0kt3yrw.js +0 -27
- package/dist/feed-scope-failure-9p8w0j1v.js +0 -20
- package/dist/pack-command-service-jzbch4eb.js +0 -29
- package/dist/packager-tool-qpryf1x2.js +0 -74
- package/dist/packager-tool-vrqbbh01.js +0 -182
- package/dist/prepare-solution-resources-h7zvnncd.js +0 -26
- package/dist/project-contributions-xx560n8y.js +0 -27
- package/dist/run-service-ekbx2jdg.js +0 -506
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
// ../executor/jit-debug-contract/src/index.ts
|
|
2
|
+
var FPS_DEBUG_MASTER = "debug.master";
|
|
3
|
+
var FPS_DEBUG_EXECUTOR = "debug.executor";
|
|
4
|
+
var FPS_DEBUG_SOURCE = "debug.source";
|
|
5
|
+
var FPS_DEBUG_SESSION_ID = "debug.sessionId";
|
|
6
|
+
var DEBUG_SOURCE_STUDIO_WEB = "studioweb";
|
|
7
|
+
var JIT_DEBUG_VERSION = "1.0.0-debug";
|
|
8
|
+
var DEVELOPMENT_RUNTIME_TYPE = "Development";
|
|
9
|
+
var MAX_JIT_PROCESSES = 64;
|
|
10
|
+
var ORCHESTRATOR_PROJECT_TYPES = [
|
|
11
|
+
"Undefined",
|
|
12
|
+
"Process",
|
|
13
|
+
"ProcessLibrary",
|
|
14
|
+
"BusinessProcess",
|
|
15
|
+
"BusinessProcessLibrary",
|
|
16
|
+
"TestAutomationProcess",
|
|
17
|
+
"ProcessOrchestration",
|
|
18
|
+
"BusinessProcessOrchestration",
|
|
19
|
+
"WebApp",
|
|
20
|
+
"BusinessWebApp",
|
|
21
|
+
"Agent",
|
|
22
|
+
"BusinessAgent",
|
|
23
|
+
"Api",
|
|
24
|
+
"MCPServer",
|
|
25
|
+
"BusinessRules",
|
|
26
|
+
"CaseManagement",
|
|
27
|
+
"Flow",
|
|
28
|
+
"Function",
|
|
29
|
+
"FlowAutomate"
|
|
30
|
+
];
|
|
31
|
+
var READABLE_PROJECT_TYPES = new Set(ORCHESTRATOR_PROJECT_TYPES.map((type) => type.toLowerCase()));
|
|
32
|
+
|
|
33
|
+
class JitAssemblyError extends Error {
|
|
34
|
+
code;
|
|
35
|
+
projectName;
|
|
36
|
+
constructor(code, message, projectName) {
|
|
37
|
+
super(message);
|
|
38
|
+
this.code = code;
|
|
39
|
+
this.projectName = projectName;
|
|
40
|
+
this.name = "JitAssemblyError";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function assembleJitFpsProperties(options) {
|
|
44
|
+
const siblings = options.siblingEntries ?? [];
|
|
45
|
+
const total = siblings.length + 1;
|
|
46
|
+
if (total > MAX_JIT_PROCESSES) {
|
|
47
|
+
throw new JitAssemblyError("TooManyProcesses", `Solution '${options.solutionName}' has ${total} JIT processes; the limit is ${MAX_JIT_PROCESSES}.`);
|
|
48
|
+
}
|
|
49
|
+
for (const entry of [options.leadEntry, ...siblings]) {
|
|
50
|
+
assertPlacementIsEffective(entry);
|
|
51
|
+
}
|
|
52
|
+
for (const sibling of siblings) {
|
|
53
|
+
assertSiblingIsResolvable(sibling);
|
|
54
|
+
}
|
|
55
|
+
const master = {
|
|
56
|
+
solutionName: options.solutionName,
|
|
57
|
+
version: JIT_DEBUG_VERSION,
|
|
58
|
+
processes: [options.leadEntry, ...siblings].map(toWireEntry)
|
|
59
|
+
};
|
|
60
|
+
assignDefined(master, "projectId", options.leadEntry.projectId);
|
|
61
|
+
const bag = {
|
|
62
|
+
[FPS_DEBUG_MASTER]: JSON.stringify(master),
|
|
63
|
+
[FPS_DEBUG_SOURCE]: DEBUG_SOURCE_STUDIO_WEB
|
|
64
|
+
};
|
|
65
|
+
if (options.leadEntry.executorInfo) {
|
|
66
|
+
bag[FPS_DEBUG_EXECUTOR] = options.leadEntry.executorInfo;
|
|
67
|
+
}
|
|
68
|
+
if (options.sessionId) {
|
|
69
|
+
bag[FPS_DEBUG_SESSION_ID] = options.sessionId;
|
|
70
|
+
}
|
|
71
|
+
return JSON.stringify(bag);
|
|
72
|
+
}
|
|
73
|
+
function assertSiblingIsResolvable(sibling) {
|
|
74
|
+
if (!sibling.executorInfo) {
|
|
75
|
+
throw new JitAssemblyError("UnresolvableSibling", `Project '${sibling.name}' takes part in the run but carries no executorInfo, so ` + "Orchestrator would read it as a deployed process and start whatever is deployed " + "under that name instead of this project's source. Give it the executorInfo its " + "executor builds.", sibling.name);
|
|
76
|
+
}
|
|
77
|
+
if (sibling.projectId || sibling.executionSettings?.machineTemplateName) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
throw new JitAssemblyError("UnresolvableSibling", `Project '${sibling.name}' takes part in the run but declares neither a cloud project id ` + "nor a machine to run on, so whichever robot picks it up would have nothing to execute. " + "Give it executionSettings.machineTemplateName to run it from local disk, or a projectId " + "to let it run anywhere.", sibling.name);
|
|
81
|
+
}
|
|
82
|
+
function assertPlacementIsEffective(entry) {
|
|
83
|
+
const settings = entry.executionSettings;
|
|
84
|
+
if (!settings || settings.machineTemplateName) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
throw new JitAssemblyError("IneffectivePlacement", `Project '${entry.name}' carries executionSettings without machineTemplateName, which ` + "Orchestrator does not pin to any machine — the job would go to any machine of that runtime, not this one.", entry.name);
|
|
88
|
+
}
|
|
89
|
+
function toWireEntry(entry) {
|
|
90
|
+
if (!READABLE_PROJECT_TYPES.has(entry.projectType.toLowerCase())) {
|
|
91
|
+
throw new JitAssemblyError("UnknownProjectType", `Project '${entry.name}' has project type '${entry.projectType}', which Orchestrator ` + "cannot read, so a Run Job that targets it would start an ordinary job instead of " + "this project. Translate it to one of: " + `${ORCHESTRATOR_PROJECT_TYPES.join(", ")}.`, entry.name);
|
|
92
|
+
}
|
|
93
|
+
const wire = {
|
|
94
|
+
name: entry.name,
|
|
95
|
+
projectType: entry.projectType
|
|
96
|
+
};
|
|
97
|
+
assignDefined(wire, "executorInfo", entry.executorInfo);
|
|
98
|
+
assignDefined(wire, "folderKey", entry.folderKey);
|
|
99
|
+
assignDefined(wire, "entryPointPath", entry.entryPointPath);
|
|
100
|
+
assignDefined(wire, "requiresUserInteraction", entry.requiresUserInteraction);
|
|
101
|
+
assignDefined(wire, "targetFramework", entry.targetFramework);
|
|
102
|
+
assignDefined(wire, "remoteControlAccess", entry.remoteControlAccess);
|
|
103
|
+
assignDefined(wire, "targetRuntime", entry.targetRuntime);
|
|
104
|
+
assignDefined(wire, "isConversational", entry.isConversational);
|
|
105
|
+
const settings = toWireExecutionSettings(entry.executionSettings);
|
|
106
|
+
assignDefined(wire, "executionSettings", settings);
|
|
107
|
+
return wire;
|
|
108
|
+
}
|
|
109
|
+
function toWireExecutionSettings(settings) {
|
|
110
|
+
if (!settings) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const wire = {};
|
|
114
|
+
assignDefined(wire, "runtimeType", settings.runtimeType);
|
|
115
|
+
assignDefined(wire, "machineTemplateName", settings.machineTemplateName);
|
|
116
|
+
assignDefined(wire, "hostMachineName", settings.hostMachineName);
|
|
117
|
+
assignDefined(wire, "serviceUserName", settings.serviceUserName);
|
|
118
|
+
assignDefined(wire, "runAsMe", settings.runAsMe);
|
|
119
|
+
return Object.keys(wire).length > 0 ? wire : undefined;
|
|
120
|
+
}
|
|
121
|
+
function assignDefined(target, key, value) {
|
|
122
|
+
if (value !== undefined) {
|
|
123
|
+
target[key] = value;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// ../executor/project-executor/src/models/run-status.ts
|
|
128
|
+
var TERMINAL_RUN_STATUSES = [
|
|
129
|
+
"Succeeded" /* Succeeded */,
|
|
130
|
+
"Faulted" /* Faulted */,
|
|
131
|
+
"Cancelled" /* Cancelled */
|
|
132
|
+
];
|
|
133
|
+
function isTerminalRunStatus(status) {
|
|
134
|
+
return TERMINAL_RUN_STATUSES.includes(status);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ../executor/project-executor/src/models/run-result.ts
|
|
138
|
+
class RunResult {
|
|
139
|
+
status;
|
|
140
|
+
errorCode;
|
|
141
|
+
rawStatus;
|
|
142
|
+
message;
|
|
143
|
+
jobKey;
|
|
144
|
+
instanceId;
|
|
145
|
+
runId;
|
|
146
|
+
traceId;
|
|
147
|
+
steps;
|
|
148
|
+
output;
|
|
149
|
+
url;
|
|
150
|
+
details;
|
|
151
|
+
constructor(status, errorCode = "None" /* None */, message) {
|
|
152
|
+
this.status = status;
|
|
153
|
+
this.errorCode = errorCode;
|
|
154
|
+
this.message = message;
|
|
155
|
+
}
|
|
156
|
+
get isSuccess() {
|
|
157
|
+
return this.status === "Succeeded" /* Succeeded */ && this.errorCode === "None" /* None */;
|
|
158
|
+
}
|
|
159
|
+
get isTerminal() {
|
|
160
|
+
return isTerminalRunStatus(this.status);
|
|
161
|
+
}
|
|
162
|
+
static succeeded(init = {}) {
|
|
163
|
+
return Object.assign(new RunResult("Succeeded" /* Succeeded */, "None" /* None */), init);
|
|
164
|
+
}
|
|
165
|
+
static failed(errorCode, message, init = {}) {
|
|
166
|
+
return Object.assign(new RunResult("Faulted" /* Faulted */, errorCode, message), init);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// ../executor/project-executor/src/services/executor-logger.ts
|
|
171
|
+
var noopExecutorLogger = {
|
|
172
|
+
info: () => {},
|
|
173
|
+
warn: () => {},
|
|
174
|
+
error: () => {}
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// ../executor/project-executor/src/services/executors-factory-repository.ts
|
|
178
|
+
class ExecutorsFactoryRepository {
|
|
179
|
+
factoryMap = new Map;
|
|
180
|
+
onConflict;
|
|
181
|
+
constructor(onConflict) {
|
|
182
|
+
this.onConflict = onConflict ?? ((message) => console.warn(message));
|
|
183
|
+
}
|
|
184
|
+
registerProjectExecutorFactory(factory) {
|
|
185
|
+
for (const projectType of factory.supportedTypes) {
|
|
186
|
+
const existing = this.factoryMap.get(projectType);
|
|
187
|
+
if (existing) {
|
|
188
|
+
if (existing.constructor?.name !== factory.constructor?.name) {
|
|
189
|
+
this.onConflict(`Executor factory conflict for project type '${projectType}': ` + `'${existing.constructor?.name}' already registered, ` + `ignoring '${factory.constructor?.name}'.`);
|
|
190
|
+
}
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
this.factoryMap.set(projectType, factory);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
canHandleProject(projectType) {
|
|
197
|
+
return this.factoryMap.has(projectType);
|
|
198
|
+
}
|
|
199
|
+
getProjectExecutorFactory(projectType) {
|
|
200
|
+
const factory = this.factoryMap.get(projectType);
|
|
201
|
+
if (!factory) {
|
|
202
|
+
throw new Error(`Cannot run project type '${projectType}': no runner is installed for it. ` + `Project types that can be run: ${this.registeredTypes.join(", ") || "none"}.`);
|
|
203
|
+
}
|
|
204
|
+
return factory;
|
|
205
|
+
}
|
|
206
|
+
get registeredTypes() {
|
|
207
|
+
return [...this.factoryMap.keys()];
|
|
208
|
+
}
|
|
209
|
+
reset() {
|
|
210
|
+
this.factoryMap.clear();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
var REGISTRY_KEY = Symbol.for("@uipath/project-executor/executorsFactoryRepository");
|
|
214
|
+
var _global = globalThis;
|
|
215
|
+
if (!_global[REGISTRY_KEY]) {
|
|
216
|
+
_global[REGISTRY_KEY] = new ExecutorsFactoryRepository;
|
|
217
|
+
}
|
|
218
|
+
var executorsFactoryRepository = _global[REGISTRY_KEY];
|
|
219
|
+
|
|
220
|
+
// ../executor/project-executor/src/services/jit-entry-collector.ts
|
|
221
|
+
class JitContributorError extends Error {
|
|
222
|
+
code;
|
|
223
|
+
projectName;
|
|
224
|
+
constructor(code, message, projectName) {
|
|
225
|
+
super(message);
|
|
226
|
+
this.code = code;
|
|
227
|
+
this.projectName = projectName;
|
|
228
|
+
this.name = "JitContributorError";
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
var DEFAULT_JIT_CONTRIBUTOR_TIMEOUT_MS = 30000;
|
|
232
|
+
|
|
233
|
+
class JitEntryCollector {
|
|
234
|
+
fileSystem;
|
|
235
|
+
logger;
|
|
236
|
+
registry;
|
|
237
|
+
timeoutMs;
|
|
238
|
+
constructor(deps) {
|
|
239
|
+
this.fileSystem = deps.fileSystem;
|
|
240
|
+
this.logger = deps.logger ?? noopExecutorLogger;
|
|
241
|
+
this.registry = deps.registry ?? executorsFactoryRepository;
|
|
242
|
+
this.timeoutMs = deps.timeoutMs ?? DEFAULT_JIT_CONTRIBUTOR_TIMEOUT_MS;
|
|
243
|
+
}
|
|
244
|
+
async collectAsync(context, cancellationToken) {
|
|
245
|
+
const { name, projectType } = context.project;
|
|
246
|
+
cancellationToken?.throwIfAborted();
|
|
247
|
+
let contributed;
|
|
248
|
+
if (this.registry.canHandleProject(projectType)) {
|
|
249
|
+
contributed = await this.askContributorAsync(context, cancellationToken);
|
|
250
|
+
} else {
|
|
251
|
+
this.logger.info(`No executor is registered for '${projectType}', so project '${name}' ` + "is described by name only in the solution's debug map.");
|
|
252
|
+
}
|
|
253
|
+
cancellationToken?.throwIfAborted();
|
|
254
|
+
if (!contributed?.length) {
|
|
255
|
+
this.assertDefaultCanRun(context);
|
|
256
|
+
}
|
|
257
|
+
const entries = contributed?.length ? contributed : [this.defaultEntry(context)];
|
|
258
|
+
return entries.map((entry, index) => this.withPlacement(entry, context, index));
|
|
259
|
+
}
|
|
260
|
+
async askContributorAsync(context, cancellationToken) {
|
|
261
|
+
const { accessToken: _token, ...connection } = context.connection;
|
|
262
|
+
return this.askExecutorAsync(context.project, {
|
|
263
|
+
action: "describe itself for the solution's debug map",
|
|
264
|
+
purpose: "collecting JIT entries"
|
|
265
|
+
}, (executor, signal) => executor.buildJitProcessEntriesAsync({ ...context, connection }, signal), cancellationToken);
|
|
266
|
+
}
|
|
267
|
+
async collectProcessCallsAsync(project, cancellationToken) {
|
|
268
|
+
cancellationToken?.throwIfAborted();
|
|
269
|
+
if (!this.registry.canHandleProject(project.projectType)) {
|
|
270
|
+
return {
|
|
271
|
+
status: "unknown",
|
|
272
|
+
reason: `no executor is registered for the project type '${project.projectType}'`
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
const answer = await this.askExecutorAsync(project, {
|
|
276
|
+
action: "list its process calls",
|
|
277
|
+
purpose: "listing process calls"
|
|
278
|
+
}, (executor, signal) => typeof executor.getProcessCallsAsync === "function" ? executor.getProcessCallsAsync(project, signal) : Promise.resolve({
|
|
279
|
+
status: "unknown",
|
|
280
|
+
reason: `the ${project.projectType} executor does not list the process calls of a project`
|
|
281
|
+
}), cancellationToken);
|
|
282
|
+
cancellationToken?.throwIfAborted();
|
|
283
|
+
return isProcessCallsResult(answer) ? answer : {
|
|
284
|
+
status: "unknown",
|
|
285
|
+
reason: `the ${project.projectType} executor gave its process calls in a shape that this CLI cannot read`
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
async askExecutorAsync(project, wording, ask, cancellationToken) {
|
|
289
|
+
const { name, projectType } = project;
|
|
290
|
+
const budget = new AbortController;
|
|
291
|
+
const signal = cancellationToken ? AbortSignal.any([cancellationToken, budget.signal]) : budget.signal;
|
|
292
|
+
const work = this.runContributorAsync(projectType, wording.purpose, (executor) => ask(executor, signal));
|
|
293
|
+
try {
|
|
294
|
+
return await this.withinBudget(work, project, wording, budget);
|
|
295
|
+
} catch (error) {
|
|
296
|
+
if (error instanceof JitContributorError) {
|
|
297
|
+
throw error;
|
|
298
|
+
}
|
|
299
|
+
throw new JitContributorError("Failed", `Project '${name}' (${projectType}) could not ${wording.action}: ` + `${error instanceof Error ? error.message : String(error)}`, name);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
async runContributorAsync(projectType, purpose, ask) {
|
|
303
|
+
let executor;
|
|
304
|
+
try {
|
|
305
|
+
const factory = this.registry.getProjectExecutorFactory(projectType);
|
|
306
|
+
executor = await factory.createAsync(this.logger, this.fileSystem);
|
|
307
|
+
return executor ? await ask(executor) : undefined;
|
|
308
|
+
} finally {
|
|
309
|
+
try {
|
|
310
|
+
await executor?.dispose();
|
|
311
|
+
} catch (error) {
|
|
312
|
+
this.logger.warn(`Failed to dispose the ${projectType} executor after ${purpose}: ` + `${error instanceof Error ? error.message : String(error)}`);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
withinBudget(pending, project, wording, budget) {
|
|
317
|
+
const { name, projectType } = project;
|
|
318
|
+
let timer;
|
|
319
|
+
const expiry = new Promise((_resolve, reject) => {
|
|
320
|
+
timer = setTimeout(() => {
|
|
321
|
+
budget.abort();
|
|
322
|
+
reject(new JitContributorError("Timeout", `Project '${name}' (${projectType}) did not ${wording.action} ` + `within ${this.timeoutMs}ms.`, name));
|
|
323
|
+
}, this.timeoutMs);
|
|
324
|
+
});
|
|
325
|
+
return Promise.race([pending, expiry]).finally(() => {
|
|
326
|
+
clearTimeout(timer);
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
withPlacement(entry, context, index) {
|
|
330
|
+
const isLeadEntry = context.isLead && index === 0;
|
|
331
|
+
if (isLeadEntry || !context.placement || entry.executionSettings) {
|
|
332
|
+
return entry;
|
|
333
|
+
}
|
|
334
|
+
return { ...entry, executionSettings: context.placement };
|
|
335
|
+
}
|
|
336
|
+
assertDefaultCanRun(context) {
|
|
337
|
+
const { name, projectType, cloudProjectId } = context.project;
|
|
338
|
+
if (!context.placement || cloudProjectId) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
throw new JitContributorError("Undescribed", `Project '${name}' (${projectType}) did not describe itself for the solution's ` + "debug map, and with no cloud project id a default entry names no source, so " + "its job would start with nothing to run.", name);
|
|
342
|
+
}
|
|
343
|
+
defaultEntry(context) {
|
|
344
|
+
const { name, projectType, cloudProjectId } = context.project;
|
|
345
|
+
const executorInfo = cloudProjectId ? JSON.stringify({ projectId: cloudProjectId }) : "{}";
|
|
346
|
+
const entry = { name, projectType, executorInfo };
|
|
347
|
+
return cloudProjectId ? { ...entry, projectId: cloudProjectId } : entry;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function isProcessCallsResult(value) {
|
|
351
|
+
if (typeof value !== "object" || value === null) {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
const answer = value;
|
|
355
|
+
if (answer.status === "known") {
|
|
356
|
+
return Array.isArray(answer.calls);
|
|
357
|
+
}
|
|
358
|
+
return answer.status === "unknown" && typeof answer.reason === "string";
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// ../executor/project-executor/src/services/project-runner.ts
|
|
362
|
+
class ProjectRunner {
|
|
363
|
+
fileSystem;
|
|
364
|
+
logger;
|
|
365
|
+
registry;
|
|
366
|
+
constructor(deps) {
|
|
367
|
+
this.fileSystem = deps.fileSystem;
|
|
368
|
+
this.logger = deps.logger ?? noopExecutorLogger;
|
|
369
|
+
this.registry = deps.registry ?? executorsFactoryRepository;
|
|
370
|
+
}
|
|
371
|
+
canRun(projectType) {
|
|
372
|
+
return this.registry.canHandleProject(projectType);
|
|
373
|
+
}
|
|
374
|
+
get runnableTypes() {
|
|
375
|
+
return this.registry.registeredTypes;
|
|
376
|
+
}
|
|
377
|
+
async runAsync(options, cancellationToken) {
|
|
378
|
+
const { projectType, name } = options.project;
|
|
379
|
+
if (!this.canRun(projectType)) {
|
|
380
|
+
const known = this.runnableTypes.join(", ") || "none";
|
|
381
|
+
return RunResult.failed("UnsupportedProjectType" /* UnsupportedProjectType */, `Cannot run project '${name}' (project type '${projectType}'): ` + `no runner is installed for it. Project types that can be run: ${known}.`);
|
|
382
|
+
}
|
|
383
|
+
let executor;
|
|
384
|
+
try {
|
|
385
|
+
const factory = this.registry.getProjectExecutorFactory(projectType);
|
|
386
|
+
executor = await factory.createAsync(this.logger, this.fileSystem);
|
|
387
|
+
this.logger.info(`Running ${name} (${projectType}) on ${options.target}.`);
|
|
388
|
+
return await executor.runAsync(options, cancellationToken);
|
|
389
|
+
} catch (error) {
|
|
390
|
+
return RunResult.failed("Unknown" /* Unknown */, messageOf(error));
|
|
391
|
+
} finally {
|
|
392
|
+
try {
|
|
393
|
+
await executor?.dispose();
|
|
394
|
+
} catch (error) {
|
|
395
|
+
this.logger.warn(`Failed to dispose the ${projectType} executor: ${messageOf(error)}`);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
function messageOf(error) {
|
|
401
|
+
return error instanceof Error ? error.message : String(error);
|
|
402
|
+
}
|
|
403
|
+
// ../executor/project-executor/src/services/executor-tool-import.ts
|
|
404
|
+
async function importExecutorToolModule(specifier) {
|
|
405
|
+
try {
|
|
406
|
+
return { module: await import(specifier) };
|
|
407
|
+
} catch (error) {
|
|
408
|
+
return {
|
|
409
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// ../executor/project-executor/src/services/executor-tool-module.ts
|
|
415
|
+
var EXECUTOR_FACTORY_EXPORT = "createExecutorFactory";
|
|
416
|
+
function isExecutorFactoryModule(module) {
|
|
417
|
+
return typeof module === "object" && module !== null && typeof module[EXECUTOR_FACTORY_EXPORT] === "function";
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// ../executor/project-executor/src/services/executor-factory-provider.ts
|
|
421
|
+
var PROVIDER_KEY = Symbol.for("@uipath/project-executor/executorFactoryProvider");
|
|
422
|
+
var _global2 = globalThis;
|
|
423
|
+
function registerExecutorFactoryFromModule(module, source) {
|
|
424
|
+
if (!isExecutorFactoryModule(module)) {
|
|
425
|
+
throw new Error(`${source} does not export ${EXECUTOR_FACTORY_EXPORT}().`);
|
|
426
|
+
}
|
|
427
|
+
const factory = module.createExecutorFactory();
|
|
428
|
+
executorsFactoryRepository.registerProjectExecutorFactory(factory);
|
|
429
|
+
return factory;
|
|
430
|
+
}
|
|
431
|
+
async function ensureExecutorFactory(verb, packageName) {
|
|
432
|
+
const provider = _global2[PROVIDER_KEY];
|
|
433
|
+
if (provider) {
|
|
434
|
+
await provider(verb);
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
if (!packageName) {
|
|
438
|
+
throw new Error(`Running this project type needs the executor factory for '${verb}', and no package provides it.`);
|
|
439
|
+
}
|
|
440
|
+
const specifier = `${packageName}/executor-tool`;
|
|
441
|
+
const { module, error } = await importExecutorToolModule(specifier);
|
|
442
|
+
if (error) {
|
|
443
|
+
throw new Error(`Running this project type needs '${packageName}'. Install it.`, { cause: error });
|
|
444
|
+
}
|
|
445
|
+
registerExecutorFactoryFromModule(module, specifier);
|
|
446
|
+
}
|
|
447
|
+
export { FPS_DEBUG_EXECUTOR, DEVELOPMENT_RUNTIME_TYPE, ORCHESTRATOR_PROJECT_TYPES, assembleJitFpsProperties, RunResult, executorsFactoryRepository, ensureExecutorFactory, JitEntryCollector, ProjectRunner };
|
|
448
|
+
|
|
449
|
+
//# debugId=158D08966D28567664756E2164756E21
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
catchError,
|
|
3
3
|
httpStatusOf2
|
|
4
|
-
} from "./packager-tool-
|
|
4
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
5
5
|
import {
|
|
6
6
|
Configuration2,
|
|
7
7
|
PipelinesApi,
|
|
8
8
|
DeploymentSearchTruncatedError,
|
|
9
9
|
searchDeploymentsPage,
|
|
10
10
|
classifyFeedSession2
|
|
11
|
-
} from "./packager-tool-
|
|
11
|
+
} from "./packager-tool-hczpvrc1.js";
|
|
12
12
|
import {
|
|
13
13
|
Configuration3,
|
|
14
14
|
DeploymentsApi2
|
|
15
|
-
} from "./packager-tool-
|
|
15
|
+
} from "./packager-tool-2syv199e.js";
|
|
16
16
|
|
|
17
17
|
// src/services/deployment-search.ts
|
|
18
18
|
async function readDeploymentByKeyAsync2(auth, deploymentKey, options = {}) {
|
|
@@ -21,7 +21,7 @@ async function readDeploymentByKeyAsync2(auth, deploymentKey, options = {}) {
|
|
|
21
21
|
basePath: auth.basePath,
|
|
22
22
|
accessToken: auth.accessToken
|
|
23
23
|
}));
|
|
24
|
-
const [error, info] = await catchError(api.pipelinesGetDeploymentByKey({ key: deploymentKey }));
|
|
24
|
+
const [error, info] = await catchError(options.signal ? api.pipelinesGetDeploymentByKey({ key: deploymentKey }, { signal: options.signal }) : api.pipelinesGetDeploymentByKey({ key: deploymentKey }));
|
|
25
25
|
if (!error) {
|
|
26
26
|
return info ? fromPipelinesRecord(info) : undefined;
|
|
27
27
|
}
|
|
@@ -32,22 +32,27 @@ async function readDeploymentByKeyAsync2(auth, deploymentKey, options = {}) {
|
|
|
32
32
|
if (classifyFeedSession2(auth) !== "user") {
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
return readDeploymentByKeyViaSolutionsAsync(auth, deploymentKey, options.scope);
|
|
35
|
+
return readDeploymentByKeyViaSolutionsAsync(auth, deploymentKey, options.scope, options.signal);
|
|
36
36
|
}
|
|
37
37
|
function fromPipelinesRecord(info) {
|
|
38
38
|
return {
|
|
39
39
|
deploymentKey: info.deploymentKey,
|
|
40
|
+
deploymentName: info.deploymentName,
|
|
41
|
+
locationKey: info.locationKey ?? null,
|
|
40
42
|
operationStatus: info.operationStatus,
|
|
41
43
|
installedRootFolderKey: info.installedRootFolderKey,
|
|
42
44
|
source: "pipelines"
|
|
43
45
|
};
|
|
44
46
|
}
|
|
45
|
-
async function readDeploymentByKeyViaSolutionsAsync(auth, deploymentKey, scope) {
|
|
47
|
+
async function readDeploymentByKeyViaSolutionsAsync(auth, deploymentKey, scope, signal) {
|
|
46
48
|
const api = new DeploymentsApi2(new Configuration3({
|
|
47
49
|
basePath: auth.basePath,
|
|
48
50
|
accessToken: auth.accessToken
|
|
49
51
|
}));
|
|
50
|
-
const [error, row] = await catchError(api.deploymentsGetByKey({ deploymentKey },
|
|
52
|
+
const [error, row] = await catchError(api.deploymentsGetByKey({ deploymentKey }, signal ? async (context) => ({
|
|
53
|
+
...scope ? await scope(context) : {},
|
|
54
|
+
signal
|
|
55
|
+
}) : scope));
|
|
51
56
|
if (error) {
|
|
52
57
|
if (httpStatusOf2(error) === 404) {
|
|
53
58
|
return;
|
|
@@ -56,6 +61,7 @@ async function readDeploymentByKeyViaSolutionsAsync(auth, deploymentKey, scope)
|
|
|
56
61
|
}
|
|
57
62
|
return row ? {
|
|
58
63
|
deploymentKey: row.key,
|
|
64
|
+
deploymentName: row.name,
|
|
59
65
|
operationStatus: row.operationStatus,
|
|
60
66
|
installedRootFolderKey: row.installedRootFolderKey,
|
|
61
67
|
source: "solutions"
|
|
@@ -277,4 +283,4 @@ async function resolveInstalledFolder2(deployment, requested, resolveFolderByKey
|
|
|
277
283
|
|
|
278
284
|
export { readDeploymentByKeyAsync2, findDeploymentByName2, findLiveDeploymentByName2, isCompletedUninstall2, findDeploymentsByPackageName2, DeploymentSearchCapError2, findCurrentDeploymentAsync2, blocksRedeploy2, MAX_LISTED_DEPLOYMENTS2, formatExistingDeployments2, findDeploymentsByName2, findDeploymentBestEffort2, newestDeploymentRow2, isPipelineDeploymentNotFoundError2, interpretFailedDeployPoll2, mapOperationStatusToPipelineStatus2, deploymentToTerminalPipelineResult2, resolveInstalledFolder2 };
|
|
279
285
|
|
|
280
|
-
//# debugId=
|
|
286
|
+
//# debugId=A1AF8F28ACEEAC5664756E2164756E21
|
|
@@ -1,82 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./packager-tool-
|
|
2
|
+
getLoginStatusAsync
|
|
3
|
+
} from "./packager-tool-jtvhkavz.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
projectKey,
|
|
8
|
-
projectIdentityProperties,
|
|
9
|
-
PROJECT_IDENTITY_LOOKUP_BUDGET_MS,
|
|
10
|
-
withinProjectIdentityBudget,
|
|
11
|
-
catchError,
|
|
12
|
-
isProjectTelemetryDisabled
|
|
13
|
-
} from "./packager-tool-m07vyk89.js";
|
|
5
|
+
catchError
|
|
6
|
+
} from "./packager-tool-gb3dq79g.js";
|
|
14
7
|
import {
|
|
15
8
|
logger,
|
|
16
|
-
CommonTelemetryEvents,
|
|
17
9
|
telemetry
|
|
18
|
-
} from "./packager-tool-
|
|
19
|
-
import {
|
|
20
|
-
toolsFactoryRepository
|
|
21
|
-
} from "./packager-tool-a7s0gbxs.js";
|
|
22
|
-
import {
|
|
23
|
-
getLoginStatusAsync
|
|
24
|
-
} from "./packager-tool-t39pjz7n.js";
|
|
10
|
+
} from "./packager-tool-xbfr6y2x.js";
|
|
25
11
|
import {
|
|
26
12
|
createNodeSolutionPackager
|
|
27
|
-
} from "./packager-tool-
|
|
28
|
-
|
|
29
|
-
// src/services/project-identity-telemetry.ts
|
|
30
|
-
function createProjectActivityObserver(commandName) {
|
|
31
|
-
if (isProjectTelemetryDisabled())
|
|
32
|
-
return;
|
|
33
|
-
const properties = new Map;
|
|
34
|
-
const finished = new Set;
|
|
35
|
-
return async (project, phase, success, solutionId) => {
|
|
36
|
-
if (project.Type !== "Api")
|
|
37
|
-
return;
|
|
38
|
-
const member = project.Id;
|
|
39
|
-
if (phase === "before") {
|
|
40
|
-
if (properties.has(member))
|
|
41
|
-
return;
|
|
42
|
-
const membership = {
|
|
43
|
-
[ProjectDimensions.SolutionProjectKey]: projectKey(member),
|
|
44
|
-
...solutionId ? {
|
|
45
|
-
[ProjectDimensions.SolutionKey]: projectKey(solutionId)
|
|
46
|
-
} : {}
|
|
47
|
-
};
|
|
48
|
-
const row = (status, id) => ({
|
|
49
|
-
...projectIdentityProperties({
|
|
50
|
-
projectType: project.Type,
|
|
51
|
-
status,
|
|
52
|
-
...id ? { id } : {}
|
|
53
|
-
}),
|
|
54
|
-
...membership
|
|
55
|
-
});
|
|
56
|
-
const factory = toolsFactoryRepository.canHandleProject(project.Type) ? toolsFactoryRepository.getProjectToolFactory(project.Type) : undefined;
|
|
57
|
-
if (!factory?.readProjectIdentityAsync || !project.ProjectPath) {
|
|
58
|
-
properties.set(member, row("unsupported"));
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
properties.set(member, row("timeout"));
|
|
62
|
-
let descriptor;
|
|
63
|
-
try {
|
|
64
|
-
descriptor = await withinProjectIdentityBudget(factory.readProjectIdentityAsync(project.ProjectPath, getFileSystem()), () => logger.debug(`project activity identity skipped: no answer within ${PROJECT_IDENTITY_LOOKUP_BUDGET_MS} ms`));
|
|
65
|
-
} catch {
|
|
66
|
-
descriptor = { status: "invalid" };
|
|
67
|
-
}
|
|
68
|
-
if (descriptor && !finished.has(member))
|
|
69
|
-
properties.set(member, row(descriptor.status, descriptor.id));
|
|
70
|
-
} else if (!finished.has(member)) {
|
|
71
|
-
finished.add(member);
|
|
72
|
-
telemetry.trackEvent(CommonTelemetryEvents.ProjectActivity, {
|
|
73
|
-
...properties.get(member),
|
|
74
|
-
[CommandDimensions.CommandName]: commandName,
|
|
75
|
-
[CommandDimensions.TerminalOutcome]: success ? "success" : "failure"
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
13
|
+
} from "./packager-tool-71sz9598.js";
|
|
80
14
|
|
|
81
15
|
// src/services/solution-packager-helpers.ts
|
|
82
16
|
async function createSolutionPackager() {
|
|
@@ -170,6 +104,6 @@ async function checkSolutionPathAsync(fs, solutionPath) {
|
|
|
170
104
|
return { ok: true, absoluteSolutionPath, isUisFile, stats };
|
|
171
105
|
}
|
|
172
106
|
|
|
173
|
-
export {
|
|
107
|
+
export { createSolutionPackager, readSolutionFileAsUint8Array, resolveSdkLogLevel, applyAuthConnection, SOLUTION_PATH_INSTRUCTIONS, checkSolutionPathAsync };
|
|
174
108
|
|
|
175
|
-
//# debugId=
|
|
109
|
+
//# debugId=C0E9E22DEDE6224364756E2164756E21
|