@meirblachman/azure-pipelines-visualizer 0.2.2 → 0.2.4
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/index.min.js +25 -25
- package/dist/web/assets/{index-CUWgfzhx.css → index-B2a7V7I5.css} +1 -1
- package/dist/web/assets/{index-C-vxesL2.js → index-NDpKKonB.js} +169 -169
- package/dist/web/assets/react-vendor-DNJ8iqd0.js +1 -0
- package/dist/web/assets/{reactflow-BBgD8bXw.js → reactflow-BEXr8p1i.js} +5 -5
- package/dist/web/assets/{yaml-DGeXk3xG.js → yaml-B_04KIbw.js} +1 -1
- package/dist/web/index.html +3 -3
- package/dist/web/lib/index.js +1513 -993
- package/dist/web/lib/style.css +1 -1
- package/package.json +1 -1
- package/dist/web/assets/react-vendor-Bdswto6F.js +0 -1
package/dist/web/lib/index.js
CHANGED
|
@@ -1,124 +1,699 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { parseYaml as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { jsx as s, jsxs as l, Fragment as Xe } from "react/jsx-runtime";
|
|
2
|
+
import { memo as Qe, useMemo as ve, useEffect as ee, useCallback as ne, useState as L, useRef as Q, Component as wt, createContext as Pt, useContext as Et, createElement as Rt } from "react";
|
|
3
|
+
import { collapsePath as xt, parseAdoCommitUrl as kt, parseYaml as ue, extractTaskReferences as Tt, resolveTaskDocUrl as $t, extractVariableValues as Pe, detectTemplateReferences as je, extractParameterDefaults as ze, buildAdoFileUrl as it, getEffectiveRepoAlias as ie, extractDeclaredParameterNames as et, pathHasExpressions as me, resolveExpressionPath as $e, resolveTemplateRefPaths as lt, evaluateExpression as St, resolveTemplateSource as ct, parseTemplatePath as Ct, resolveAllExpressions as Dt, parseAdoUrl as At } from "@meirblachman/azure-pipelines-visualizer-core";
|
|
4
|
+
import Se from "@dagrejs/dagre";
|
|
5
|
+
import { Handle as Ce, Position as De, useNodesState as dt, useEdgesState as pt, ReactFlow as ut, Background as mt, Controls as ht, getBezierPath as It, BaseEdge as Lt, EdgeLabelRenderer as Bt, MarkerType as Ae, BackgroundVariant as Ft } from "@xyflow/react";
|
|
6
|
+
import Ut from "@monaco-editor/react";
|
|
7
|
+
import { create as Vt } from "zustand";
|
|
8
|
+
import Mt from "react-dom";
|
|
9
|
+
const Be = "7.1";
|
|
10
|
+
function Fe(e, t) {
|
|
11
|
+
return `https://dev.azure.com/${encodeURIComponent(e)}/${encodeURIComponent(t)}/_apis`;
|
|
12
|
+
}
|
|
13
|
+
function Ot(e) {
|
|
14
|
+
return e.startsWith("refs/heads/") ? { version: e.slice(11), versionType: "branch" } : e.startsWith("refs/tags/") ? { version: e.slice(10), versionType: "tag" } : /^[0-9a-f]{40}$/i.test(e) ? { version: e, versionType: "commit" } : { version: e, versionType: "branch" };
|
|
15
|
+
}
|
|
16
|
+
async function Ue(e) {
|
|
17
|
+
const t = await fetch(e, { credentials: "include" });
|
|
18
|
+
if (!t.ok) {
|
|
19
|
+
const a = await t.text();
|
|
20
|
+
throw new Error(`ADO API error (${t.status}): ${a}`);
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
}
|
|
24
|
+
async function ft(e, t, a, o, r) {
|
|
25
|
+
const n = o.startsWith("/") ? o : `/${o}`, d = xt(n);
|
|
26
|
+
let m = `${Fe(e, t)}/git/repositories/${encodeURIComponent(a)}/items?path=${encodeURIComponent(d)}&api-version=${Be}&includeContent=true&$format=text`;
|
|
27
|
+
if (r) {
|
|
28
|
+
const h = Ot(r);
|
|
29
|
+
m += `&versionDescriptor.version=${encodeURIComponent(h.version)}&versionDescriptor.versionType=${h.versionType}`;
|
|
30
|
+
}
|
|
31
|
+
return (await Ue(m)).text();
|
|
32
|
+
}
|
|
33
|
+
async function jt(e, t) {
|
|
34
|
+
const a = `${Fe(e, t)}/pipelines?api-version=${Be}`;
|
|
35
|
+
return (await (await Ue(a)).json()).value;
|
|
36
|
+
}
|
|
37
|
+
async function zt(e, t, a) {
|
|
38
|
+
var u, h, i, p, f;
|
|
39
|
+
const o = `${Fe(e, t)}/build/definitions/${a}?api-version=${Be}`, n = await (await Ue(o)).json(), d = {
|
|
40
|
+
id: n.id,
|
|
41
|
+
name: n.name,
|
|
42
|
+
path: ((u = n.process) == null ? void 0 : u.yamlFilename) ?? n.path,
|
|
43
|
+
repository: {
|
|
44
|
+
id: (h = n.repository) == null ? void 0 : h.id,
|
|
45
|
+
name: (i = n.repository) == null ? void 0 : i.name,
|
|
46
|
+
type: (p = n.repository) == null ? void 0 : p.type,
|
|
47
|
+
defaultBranch: (f = n.repository) == null ? void 0 : f.defaultBranch
|
|
48
|
+
}
|
|
49
|
+
}, m = await ft(
|
|
50
|
+
e,
|
|
51
|
+
t,
|
|
52
|
+
d.repository.id,
|
|
53
|
+
d.path,
|
|
54
|
+
d.repository.defaultBranch
|
|
55
|
+
);
|
|
56
|
+
return { definition: d, yaml: m };
|
|
57
|
+
}
|
|
58
|
+
async function Wt(e, t, a, o, r) {
|
|
59
|
+
return { content: await ft(e, t, a, o, r), path: o, repoId: a, repoName: a, branch: r || "" };
|
|
60
|
+
}
|
|
61
|
+
async function Ht() {
|
|
62
|
+
return { customTaskDocs: {} };
|
|
63
|
+
}
|
|
64
|
+
async function Gt(e) {
|
|
65
|
+
return { tasks: [], cached: !1 };
|
|
66
|
+
}
|
|
67
|
+
async function Kt(e, t, a, o) {
|
|
68
|
+
const r = new URLSearchParams({
|
|
69
|
+
"api-version": Be,
|
|
70
|
+
repositoryId: a,
|
|
71
|
+
repositoryType: "TfsGit",
|
|
72
|
+
sourceVersion: o,
|
|
73
|
+
queryOrder: "queueTimeAscending",
|
|
74
|
+
maxBuildsPerDefinition: "50"
|
|
75
|
+
}), n = `${Fe(e, t)}/build/builds?${r}`;
|
|
76
|
+
return (await (await Ue(n)).json()).value ?? [];
|
|
77
|
+
}
|
|
78
|
+
const gt = "/api";
|
|
79
|
+
var rt;
|
|
80
|
+
const he = typeof window < "u" && ((rt = window.location) == null ? void 0 : rt.protocol) === "chrome-extension:";
|
|
81
|
+
async function Ne(e) {
|
|
82
|
+
const t = await fetch(`${gt}${e}`);
|
|
83
|
+
if (!t.ok) {
|
|
84
|
+
const a = await t.text();
|
|
85
|
+
throw new Error(`API error (${t.status}): ${a}`);
|
|
86
|
+
}
|
|
87
|
+
return t.json();
|
|
88
|
+
}
|
|
89
|
+
function qa(e, t) {
|
|
90
|
+
return he ? jt(e, t) : Ne(`/${e}/${t}/pipelines`);
|
|
91
|
+
}
|
|
92
|
+
function qt(e, t, a) {
|
|
93
|
+
return he ? zt(e, t, a) : Ne(`/${e}/${t}/pipelines/${a}/yaml`);
|
|
94
|
+
}
|
|
95
|
+
function _t(e, t, a, o, r) {
|
|
96
|
+
if (he)
|
|
97
|
+
return Wt(e, t, a, o, r);
|
|
98
|
+
const n = new URLSearchParams({ repo: a, path: o });
|
|
99
|
+
return r && n.set("branch", r), Ne(`/${e}/${t}/file-by-repo-name?${n}`);
|
|
100
|
+
}
|
|
101
|
+
function Yt() {
|
|
102
|
+
return he ? Ht() : Ne("/config/task-docs");
|
|
103
|
+
}
|
|
104
|
+
function Jt(e) {
|
|
105
|
+
return he ? Gt() : Ne(`/${e}/schema/tasks`);
|
|
106
|
+
}
|
|
107
|
+
function Xt(e, t, a, o, r, n, d) {
|
|
108
|
+
const m = new AbortController();
|
|
109
|
+
if (he)
|
|
110
|
+
return Kt(e, t, a, o).then((p) => {
|
|
111
|
+
r(p), n();
|
|
112
|
+
}).catch(
|
|
113
|
+
(p) => d(p instanceof Error ? p.message : String(p))
|
|
114
|
+
), m;
|
|
115
|
+
const u = new URLSearchParams({ repoName: a, commitSha: o }), h = `${gt}/${e}/${t}/commit-flow/stream?${u}`, i = new EventSource(h);
|
|
116
|
+
return m.signal.addEventListener("abort", () => i.close()), i.addEventListener("builds", (p) => {
|
|
117
|
+
try {
|
|
118
|
+
const f = JSON.parse(p.data);
|
|
119
|
+
r(f);
|
|
120
|
+
} catch {
|
|
121
|
+
}
|
|
122
|
+
}), i.addEventListener("done", () => {
|
|
123
|
+
i.close(), n();
|
|
124
|
+
}), i.addEventListener("error", (p) => {
|
|
125
|
+
i.close();
|
|
126
|
+
const f = p instanceof MessageEvent && p.data ? JSON.parse(p.data).error : "Connection lost";
|
|
127
|
+
d(f);
|
|
128
|
+
}), m;
|
|
129
|
+
}
|
|
130
|
+
function We(e) {
|
|
131
|
+
return e ? new Date(e).toLocaleString() : "—";
|
|
132
|
+
}
|
|
133
|
+
function Zt(e, t) {
|
|
134
|
+
if (!e || !t) return null;
|
|
135
|
+
const a = new Date(t).getTime() - new Date(e).getTime();
|
|
136
|
+
if (a < 0) return null;
|
|
137
|
+
const o = Math.floor(a / 1e3);
|
|
138
|
+
if (o < 60) return `${o}s`;
|
|
139
|
+
const r = Math.floor(o / 60), n = o % 60;
|
|
140
|
+
if (r < 60) return `${r}m ${n}s`;
|
|
141
|
+
const d = Math.floor(r / 60), m = r % 60;
|
|
142
|
+
return `${d}h ${m}m`;
|
|
143
|
+
}
|
|
144
|
+
function Qt(e, t) {
|
|
145
|
+
return e === "inProgress" ? { label: "In Progress", className: "badge--in-progress" } : e === "notStarted" ? { label: "Not Started", className: "badge--pending" } : t === "succeeded" ? { label: "Succeeded", className: "badge--succeeded" } : t === "partiallySucceeded" ? { label: "Partial Success", className: "badge--partial" } : t === "failed" ? { label: "Failed", className: "badge--failed" } : t === "canceled" ? { label: "Canceled", className: "badge--canceled" } : { label: e, className: "" };
|
|
146
|
+
}
|
|
147
|
+
function ea(e) {
|
|
148
|
+
var o, r;
|
|
149
|
+
const t = (r = (o = e._links) == null ? void 0 : o.web) == null ? void 0 : r.href;
|
|
150
|
+
if (!t) return null;
|
|
151
|
+
const a = t.match(/(https:\/\/dev\.azure\.com\/[^/]+\/[^/]+)/);
|
|
152
|
+
return a ? a[1] : null;
|
|
153
|
+
}
|
|
154
|
+
function Ee({
|
|
155
|
+
href: e,
|
|
156
|
+
children: t
|
|
157
|
+
}) {
|
|
158
|
+
return e ? /* @__PURE__ */ l(
|
|
159
|
+
"a",
|
|
160
|
+
{
|
|
161
|
+
href: e,
|
|
162
|
+
target: "_blank",
|
|
163
|
+
rel: "noopener noreferrer",
|
|
164
|
+
className: "build-popup__link",
|
|
165
|
+
children: [
|
|
166
|
+
t,
|
|
167
|
+
" ↗"
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
) : /* @__PURE__ */ s("span", { children: t });
|
|
171
|
+
}
|
|
172
|
+
function ta({
|
|
173
|
+
build: e,
|
|
174
|
+
onClose: t
|
|
175
|
+
}) {
|
|
176
|
+
var p, f;
|
|
177
|
+
const a = Qt(e.status, e.result), o = Zt(e.startTime, e.finishTime), r = ((f = (p = e._links) == null ? void 0 : p.web) == null ? void 0 : f.href) ?? null, n = ea(e), d = e.sourceBranch.replace("refs/heads/", ""), m = r, u = n ? `${n}/_build?definitionId=${e.definition.id}` : null, h = n ? `${n}/_git/?version=GC${e.sourceVersion}` : null, i = n ? `${n}/_git/?version=GB${d}` : null;
|
|
178
|
+
return /* @__PURE__ */ s(
|
|
179
|
+
"div",
|
|
180
|
+
{
|
|
181
|
+
className: "build-popup-overlay",
|
|
182
|
+
onClick: t,
|
|
183
|
+
onKeyDown: (c) => {
|
|
184
|
+
c.key === "Escape" && t();
|
|
185
|
+
},
|
|
186
|
+
role: "dialog",
|
|
187
|
+
"aria-modal": "true",
|
|
188
|
+
children: /* @__PURE__ */ l(
|
|
189
|
+
"div",
|
|
190
|
+
{
|
|
191
|
+
className: "build-popup",
|
|
192
|
+
onClick: (c) => c.stopPropagation(),
|
|
193
|
+
onKeyDown: (c) => c.stopPropagation(),
|
|
194
|
+
children: [
|
|
195
|
+
/* @__PURE__ */ l("div", { className: "build-popup__header", children: [
|
|
196
|
+
/* @__PURE__ */ s("h2", { children: /* @__PURE__ */ s(Ee, { href: u, children: e.definition.name }) }),
|
|
197
|
+
/* @__PURE__ */ s(
|
|
198
|
+
"button",
|
|
199
|
+
{
|
|
200
|
+
className: "build-popup__close",
|
|
201
|
+
onClick: t,
|
|
202
|
+
type: "button",
|
|
203
|
+
children: "✕"
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ l("div", { className: "build-popup__body", children: [
|
|
208
|
+
/* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
209
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Build Number" }),
|
|
210
|
+
/* @__PURE__ */ l(Ee, { href: m, children: [
|
|
211
|
+
"#",
|
|
212
|
+
e.buildNumber
|
|
213
|
+
] })
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
216
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Status" }),
|
|
217
|
+
/* @__PURE__ */ s("span", { className: `build-popup__badge ${a.className}`, children: a.label })
|
|
218
|
+
] }),
|
|
219
|
+
/* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
220
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Project" }),
|
|
221
|
+
/* @__PURE__ */ s("span", { children: e.project.name })
|
|
222
|
+
] }),
|
|
223
|
+
/* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
224
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Queued" }),
|
|
225
|
+
/* @__PURE__ */ s("span", { children: We(e.queueTime) })
|
|
226
|
+
] }),
|
|
227
|
+
/* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
228
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Started" }),
|
|
229
|
+
/* @__PURE__ */ s("span", { children: We(e.startTime) })
|
|
230
|
+
] }),
|
|
231
|
+
/* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
232
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Finished" }),
|
|
233
|
+
/* @__PURE__ */ s("span", { children: We(e.finishTime) })
|
|
234
|
+
] }),
|
|
235
|
+
o && /* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
236
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Duration" }),
|
|
237
|
+
/* @__PURE__ */ s("span", { children: o })
|
|
238
|
+
] }),
|
|
239
|
+
/* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
240
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Branch" }),
|
|
241
|
+
/* @__PURE__ */ s(Ee, { href: i, children: d })
|
|
242
|
+
] }),
|
|
243
|
+
/* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
244
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Commit" }),
|
|
245
|
+
/* @__PURE__ */ s(Ee, { href: h, children: /* @__PURE__ */ s("span", { className: "build-popup__mono", children: e.sourceVersion.slice(0, 8) }) })
|
|
246
|
+
] }),
|
|
247
|
+
e.requestedFor && /* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
248
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Requested For" }),
|
|
249
|
+
/* @__PURE__ */ s("span", { children: e.requestedFor.displayName })
|
|
250
|
+
] }),
|
|
251
|
+
e.triggeredByBuild && /* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
252
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Triggered By" }),
|
|
253
|
+
/* @__PURE__ */ l("span", { children: [
|
|
254
|
+
e.triggeredByBuild.definition.name,
|
|
255
|
+
" #",
|
|
256
|
+
e.triggeredByBuild.buildNumber
|
|
257
|
+
] })
|
|
258
|
+
] }),
|
|
259
|
+
Object.keys(e.triggerInfo).length > 0 && /* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
260
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Trigger Info" }),
|
|
261
|
+
/* @__PURE__ */ s("span", { className: "build-popup__mono", children: Object.entries(e.triggerInfo).map(([c, N]) => `${c}: ${N}`).join(", ") })
|
|
262
|
+
] }),
|
|
263
|
+
e.tags.length > 0 && /* @__PURE__ */ l("div", { className: "build-popup__row", children: [
|
|
264
|
+
/* @__PURE__ */ s("span", { className: "build-popup__label", children: "Tags" }),
|
|
265
|
+
/* @__PURE__ */ s("span", { className: "build-popup__tags", children: e.tags.map((c) => /* @__PURE__ */ s("span", { className: "build-popup__tag", children: c }, c)) })
|
|
266
|
+
] }),
|
|
267
|
+
r && /* @__PURE__ */ s("div", { className: "build-popup__actions", children: /* @__PURE__ */ s(
|
|
268
|
+
"a",
|
|
269
|
+
{
|
|
270
|
+
href: r,
|
|
271
|
+
target: "_blank",
|
|
272
|
+
rel: "noopener noreferrer",
|
|
273
|
+
className: "build-popup__action-link",
|
|
274
|
+
children: "Open Build in Azure DevOps ↗"
|
|
275
|
+
}
|
|
276
|
+
) })
|
|
277
|
+
] })
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
}
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
function aa(e) {
|
|
285
|
+
return e ? new Date(e).toLocaleString(void 0, {
|
|
286
|
+
month: "short",
|
|
287
|
+
day: "numeric",
|
|
288
|
+
hour: "2-digit",
|
|
289
|
+
minute: "2-digit",
|
|
290
|
+
second: "2-digit"
|
|
291
|
+
}) : "—";
|
|
292
|
+
}
|
|
293
|
+
function na(e, t) {
|
|
294
|
+
if (!e || !t) return null;
|
|
295
|
+
const a = new Date(t).getTime() - new Date(e).getTime();
|
|
296
|
+
if (a < 0) return null;
|
|
297
|
+
const o = Math.floor(a / 1e3);
|
|
298
|
+
if (o < 60) return `${o}s`;
|
|
299
|
+
const r = Math.floor(o / 60), n = o % 60;
|
|
300
|
+
if (r < 60) return `${r}m ${n}s`;
|
|
301
|
+
const d = Math.floor(r / 60), m = r % 60;
|
|
302
|
+
return `${d}h ${m}m`;
|
|
303
|
+
}
|
|
304
|
+
function sa(e, t) {
|
|
305
|
+
return e === "inProgress" ? "⏳" : e === "notStarted" ? "⏸️" : t === "succeeded" ? "✅" : t === "partiallySucceeded" ? "⚠️" : t === "failed" ? "❌" : t === "canceled" ? "🚫" : "❓";
|
|
306
|
+
}
|
|
307
|
+
function oa(e, t) {
|
|
308
|
+
return e === "inProgress" ? "build-node--in-progress" : t === "succeeded" ? "build-node--succeeded" : t === "partiallySucceeded" ? "build-node--partial" : t === "failed" ? "build-node--failed" : t === "canceled" ? "build-node--canceled" : "";
|
|
309
|
+
}
|
|
310
|
+
function ra({ data: e }) {
|
|
311
|
+
const t = e, a = na(t.startTime, t.finishTime);
|
|
312
|
+
return /* @__PURE__ */ l("div", { className: `build-node ${oa(t.status, t.result)}`, children: [
|
|
313
|
+
!t.isRoot && /* @__PURE__ */ s(Ce, { type: "target", position: De.Left }),
|
|
314
|
+
/* @__PURE__ */ l("div", { className: "build-node__header", children: [
|
|
315
|
+
/* @__PURE__ */ s("span", { className: "build-node__status", children: sa(t.status, t.result) }),
|
|
316
|
+
/* @__PURE__ */ s("span", { className: "build-node__name", title: t.pipelineName, children: t.pipelineName })
|
|
317
|
+
] }),
|
|
318
|
+
!t.isRoot && t.projectName && /* @__PURE__ */ l(
|
|
319
|
+
"div",
|
|
320
|
+
{
|
|
321
|
+
className: "build-node__project",
|
|
322
|
+
title: `Project: ${t.projectName}`,
|
|
323
|
+
children: [
|
|
324
|
+
"📁 ",
|
|
325
|
+
t.projectName
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
),
|
|
329
|
+
/* @__PURE__ */ l("div", { className: "build-node__number", children: [
|
|
330
|
+
"#",
|
|
331
|
+
t.buildNumber
|
|
332
|
+
] }),
|
|
333
|
+
/* @__PURE__ */ l("div", { className: "build-node__times", children: [
|
|
334
|
+
/* @__PURE__ */ l("span", { title: "Start time", children: [
|
|
335
|
+
"🕐 ",
|
|
336
|
+
aa(t.startTime)
|
|
337
|
+
] }),
|
|
338
|
+
a && /* @__PURE__ */ l("span", { title: "Duration", children: [
|
|
339
|
+
"⏱️ ",
|
|
340
|
+
a
|
|
341
|
+
] })
|
|
342
|
+
] }),
|
|
343
|
+
/* @__PURE__ */ l("div", { className: "build-node__branch", title: t.sourceBranch, children: [
|
|
344
|
+
"🌿 ",
|
|
345
|
+
t.sourceBranch.replace("refs/heads/", "")
|
|
346
|
+
] }),
|
|
347
|
+
/* @__PURE__ */ s(Ce, { type: "source", position: De.Right })
|
|
348
|
+
] });
|
|
349
|
+
}
|
|
350
|
+
const ia = Qe(ra), He = 280, _e = 130, Ge = 20, la = { build: ia };
|
|
351
|
+
function ca(e, t) {
|
|
352
|
+
if (e.length === 0) return { nodes: e, edges: t };
|
|
353
|
+
const a = /* @__PURE__ */ new Set();
|
|
354
|
+
for (const d of t)
|
|
355
|
+
a.add(d.source), a.add(d.target);
|
|
356
|
+
const o = e.filter((d) => !a.has(d.id)), r = e.filter((d) => a.has(d.id));
|
|
357
|
+
let n = [];
|
|
358
|
+
if (r.length > 0) {
|
|
359
|
+
const d = new Se.graphlib.Graph();
|
|
360
|
+
d.setDefaultEdgeLabel(() => ({})), d.setGraph({ rankdir: "LR", ranksep: 80, nodesep: 30 });
|
|
361
|
+
for (const m of r)
|
|
362
|
+
d.setNode(m.id, { width: He, height: _e });
|
|
363
|
+
for (const m of t)
|
|
364
|
+
d.setEdge(m.source, m.target);
|
|
365
|
+
Se.layout(d), n = r.map((m) => {
|
|
366
|
+
const u = d.node(m.id);
|
|
367
|
+
return {
|
|
368
|
+
...m,
|
|
369
|
+
position: { x: u.x - He / 2, y: u.y - _e / 2 }
|
|
370
|
+
};
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
if (o.length > 0) {
|
|
374
|
+
let d = 0;
|
|
375
|
+
for (const i of n) d = Math.max(d, i.position.y + _e);
|
|
376
|
+
const m = n.length > 0 ? d + 60 : 0, u = [...o].sort((i, p) => {
|
|
377
|
+
const f = i.data.startTime ?? "", c = p.data.startTime ?? "";
|
|
378
|
+
return f < c ? -1 : f > c ? 1 : 0;
|
|
379
|
+
}), h = u.map((i) => {
|
|
380
|
+
const p = i.data.startTime;
|
|
381
|
+
return p ? new Date(p).getTime() : null;
|
|
382
|
+
}).filter((i) => i !== null);
|
|
383
|
+
if (h.length > 0) {
|
|
384
|
+
const i = Math.min(...h), f = Math.max(...h) - i || 1, c = Math.max(u.length * (He + Ge), 1200);
|
|
385
|
+
let N = 0;
|
|
386
|
+
for (const E of u) {
|
|
387
|
+
const _ = E.data.startTime, w = ((_ ? new Date(_).getTime() : i) - i) / f * c;
|
|
388
|
+
E.position = {
|
|
389
|
+
x: w,
|
|
390
|
+
y: m + N * (_e + Ge)
|
|
391
|
+
}, N++;
|
|
392
|
+
}
|
|
393
|
+
} else
|
|
394
|
+
u.forEach((i, p) => {
|
|
395
|
+
i.position = { x: 0, y: m + p * (_e + Ge) };
|
|
396
|
+
});
|
|
397
|
+
n = [...n, ...u];
|
|
398
|
+
}
|
|
399
|
+
return { nodes: n, edges: t };
|
|
400
|
+
}
|
|
401
|
+
function da(e) {
|
|
402
|
+
const t = /* @__PURE__ */ new Map();
|
|
403
|
+
for (const n of e)
|
|
404
|
+
t.set(n.id, n);
|
|
405
|
+
const a = /* @__PURE__ */ new Set();
|
|
406
|
+
for (const n of e)
|
|
407
|
+
n.upstreamBuildId && t.has(n.upstreamBuildId) && a.add(n.id);
|
|
408
|
+
const o = e.map((n) => {
|
|
409
|
+
var d, m;
|
|
410
|
+
return {
|
|
411
|
+
id: String(n.id),
|
|
412
|
+
type: "build",
|
|
413
|
+
position: { x: 0, y: 0 },
|
|
414
|
+
data: {
|
|
415
|
+
buildId: n.id,
|
|
416
|
+
pipelineName: n.definition.name,
|
|
417
|
+
buildNumber: n.buildNumber,
|
|
418
|
+
status: n.status,
|
|
419
|
+
result: n.result,
|
|
420
|
+
startTime: n.startTime,
|
|
421
|
+
finishTime: n.finishTime,
|
|
422
|
+
sourceBranch: n.sourceBranch,
|
|
423
|
+
webUrl: ((m = (d = n._links) == null ? void 0 : d.web) == null ? void 0 : m.href) ?? null,
|
|
424
|
+
isRoot: !a.has(n.id),
|
|
425
|
+
projectName: n.project.name
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
}), r = [];
|
|
429
|
+
for (const n of e)
|
|
430
|
+
n.upstreamBuildId && t.has(n.upstreamBuildId) && r.push({
|
|
431
|
+
id: `e-${n.upstreamBuildId}-${n.id}`,
|
|
432
|
+
source: String(n.upstreamBuildId),
|
|
433
|
+
target: String(n.id),
|
|
434
|
+
animated: n.status === "inProgress",
|
|
435
|
+
style: { stroke: "#89b4fa", strokeWidth: 2 }
|
|
436
|
+
});
|
|
437
|
+
return ca(o, r);
|
|
438
|
+
}
|
|
439
|
+
function pa({
|
|
440
|
+
builds: e,
|
|
441
|
+
onNodeClick: t
|
|
442
|
+
}) {
|
|
443
|
+
const { nodes: a, edges: o } = ve(
|
|
444
|
+
() => da(e),
|
|
445
|
+
[e]
|
|
446
|
+
), [r, n, d] = dt(a), [m, u, h] = pt(o);
|
|
447
|
+
ee(() => {
|
|
448
|
+
n(a), u(o);
|
|
449
|
+
}, [a, o, n, u]);
|
|
450
|
+
const i = ve(() => {
|
|
451
|
+
const f = /* @__PURE__ */ new Map();
|
|
452
|
+
for (const c of e) f.set(c.id, c);
|
|
453
|
+
return f;
|
|
454
|
+
}, [e]), p = ne(
|
|
455
|
+
(f, c) => {
|
|
456
|
+
const N = i.get(Number(c.id));
|
|
457
|
+
N && t(N);
|
|
458
|
+
},
|
|
459
|
+
[i, t]
|
|
460
|
+
);
|
|
461
|
+
return /* @__PURE__ */ s("div", { className: "commit-flow-diagram", children: /* @__PURE__ */ l(
|
|
462
|
+
ut,
|
|
463
|
+
{
|
|
464
|
+
nodes: r,
|
|
465
|
+
edges: m,
|
|
466
|
+
nodeTypes: la,
|
|
467
|
+
onNodesChange: d,
|
|
468
|
+
onEdgesChange: h,
|
|
469
|
+
onNodeClick: p,
|
|
470
|
+
fitView: !0,
|
|
471
|
+
minZoom: 0.2,
|
|
472
|
+
maxZoom: 2,
|
|
473
|
+
proOptions: { hideAttribution: !0 },
|
|
474
|
+
children: [
|
|
475
|
+
/* @__PURE__ */ s(mt, {}),
|
|
476
|
+
/* @__PURE__ */ s(ht, {})
|
|
477
|
+
]
|
|
478
|
+
}
|
|
479
|
+
) });
|
|
480
|
+
}
|
|
481
|
+
function ua({
|
|
482
|
+
onLoad: e,
|
|
483
|
+
loading: t
|
|
484
|
+
}) {
|
|
485
|
+
const [a, o] = L(""), [r, n] = L(null), d = () => {
|
|
486
|
+
const u = a.trim();
|
|
487
|
+
if (!u) return;
|
|
488
|
+
n(null);
|
|
489
|
+
const h = kt(u);
|
|
490
|
+
if (!h) {
|
|
491
|
+
n(
|
|
492
|
+
"Invalid URL. Expected: https://dev.azure.com/{org}/{project}/_git/{repo}/commit/{sha}"
|
|
493
|
+
);
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
e({
|
|
497
|
+
org: h.org,
|
|
498
|
+
project: h.project,
|
|
499
|
+
repoName: h.repoName,
|
|
500
|
+
commitSha: h.commitSha
|
|
501
|
+
});
|
|
502
|
+
};
|
|
503
|
+
return /* @__PURE__ */ l("div", { className: "commit-flow-selector", children: [
|
|
504
|
+
/* @__PURE__ */ s(
|
|
505
|
+
"input",
|
|
506
|
+
{
|
|
507
|
+
type: "text",
|
|
508
|
+
placeholder: "https://dev.azure.com/{org}/{project}/_git/{repo}/commit/{sha}",
|
|
509
|
+
value: a,
|
|
510
|
+
onChange: (u) => o(u.target.value),
|
|
511
|
+
onKeyDown: (u) => {
|
|
512
|
+
u.key === "Enter" && (u.preventDefault(), d());
|
|
513
|
+
},
|
|
514
|
+
className: "commit-flow-selector__input commit-flow-selector__input--url"
|
|
515
|
+
}
|
|
516
|
+
),
|
|
517
|
+
/* @__PURE__ */ s(
|
|
518
|
+
"button",
|
|
519
|
+
{
|
|
520
|
+
className: "commit-flow-selector__btn",
|
|
521
|
+
onClick: d,
|
|
522
|
+
disabled: !a.trim() || t,
|
|
523
|
+
type: "button",
|
|
524
|
+
children: t ? "⏳ Loading..." : "Load Builds"
|
|
525
|
+
}
|
|
526
|
+
),
|
|
527
|
+
r && /* @__PURE__ */ s("div", { className: "commit-flow-selector__error", children: r })
|
|
528
|
+
] });
|
|
529
|
+
}
|
|
530
|
+
function ma() {
|
|
531
|
+
const [e, t] = L([]), [a, o] = L(!1), [r, n] = L(null), [d, m] = L(null), [u, h] = L(null), i = Q(null), p = ne((c) => {
|
|
532
|
+
var N;
|
|
533
|
+
(N = i.current) == null || N.abort(), o(!0), n(null), t([]), m(null), h(c), i.current = Xt(
|
|
534
|
+
c.org,
|
|
535
|
+
c.project,
|
|
536
|
+
c.repoName,
|
|
537
|
+
c.commitSha,
|
|
538
|
+
(E) => {
|
|
539
|
+
t((_) => [..._, ...E]);
|
|
540
|
+
},
|
|
541
|
+
() => {
|
|
542
|
+
o(!1), t((E) => (E.length === 0 && n("No builds found for this commit."), E));
|
|
543
|
+
},
|
|
544
|
+
(E) => {
|
|
545
|
+
o(!1), n(E);
|
|
546
|
+
}
|
|
547
|
+
);
|
|
548
|
+
}, []), f = ne(() => {
|
|
549
|
+
u && p(u);
|
|
550
|
+
}, [u, p]);
|
|
551
|
+
return /* @__PURE__ */ l("div", { className: "commit-flow-page", children: [
|
|
552
|
+
/* @__PURE__ */ l("div", { className: "commit-flow-page__selector", children: [
|
|
553
|
+
/* @__PURE__ */ s(ua, { onLoad: p, loading: a }),
|
|
554
|
+
u && !a && /* @__PURE__ */ s(
|
|
555
|
+
"button",
|
|
556
|
+
{
|
|
557
|
+
className: "commit-flow-page__refresh",
|
|
558
|
+
onClick: f,
|
|
559
|
+
type: "button",
|
|
560
|
+
children: "🔄 Refresh"
|
|
561
|
+
}
|
|
562
|
+
)
|
|
563
|
+
] }),
|
|
564
|
+
r && /* @__PURE__ */ s("div", { className: "commit-flow-page__error", children: r }),
|
|
565
|
+
e.length > 0 && /* @__PURE__ */ l("div", { className: "commit-flow-page__diagram", children: [
|
|
566
|
+
/* @__PURE__ */ l("div", { className: "commit-flow-page__summary", children: [
|
|
567
|
+
e.length,
|
|
568
|
+
" build",
|
|
569
|
+
e.length !== 1 ? "s" : "",
|
|
570
|
+
" found",
|
|
571
|
+
a && " (loading…)"
|
|
572
|
+
] }),
|
|
573
|
+
/* @__PURE__ */ s(pa, { builds: e, onNodeClick: m })
|
|
574
|
+
] }),
|
|
575
|
+
d && /* @__PURE__ */ s(
|
|
576
|
+
ta,
|
|
577
|
+
{
|
|
578
|
+
build: d,
|
|
579
|
+
onClose: () => m(null)
|
|
580
|
+
}
|
|
581
|
+
)
|
|
582
|
+
] });
|
|
583
|
+
}
|
|
584
|
+
const Ve = Vt((e) => ({
|
|
10
585
|
org: "",
|
|
11
586
|
project: "",
|
|
12
|
-
setConnection: (
|
|
587
|
+
setConnection: (t, a) => e({ org: t, project: a }),
|
|
13
588
|
selectedPipeline: null,
|
|
14
589
|
selectedPipelineLoading: !1,
|
|
15
590
|
selectedPipelineError: null,
|
|
16
|
-
setSelectedPipeline: (
|
|
17
|
-
selectedPipeline:
|
|
591
|
+
setSelectedPipeline: (t) => e({
|
|
592
|
+
selectedPipeline: t,
|
|
18
593
|
selectedPipelineError: null,
|
|
19
594
|
expandedNodes: /* @__PURE__ */ new Set()
|
|
20
595
|
}),
|
|
21
|
-
setSelectedPipelineLoading: (
|
|
22
|
-
setSelectedPipelineError: (
|
|
23
|
-
expandedTemplates: new Map(
|
|
24
|
-
setExpandedTemplate: (
|
|
25
|
-
const
|
|
26
|
-
return
|
|
596
|
+
setSelectedPipelineLoading: (t) => e({ selectedPipelineLoading: t }),
|
|
597
|
+
setSelectedPipelineError: (t) => e({ selectedPipelineError: t }),
|
|
598
|
+
expandedTemplates: new Map(ha()),
|
|
599
|
+
setExpandedTemplate: (t, a) => e((o) => {
|
|
600
|
+
const r = new Map(o.expandedTemplates);
|
|
601
|
+
return r.set(t, a), fa(r), { expandedTemplates: r };
|
|
27
602
|
}),
|
|
28
603
|
expandedNodes: /* @__PURE__ */ new Set(),
|
|
29
|
-
toggleNode: (
|
|
30
|
-
const
|
|
31
|
-
return
|
|
604
|
+
toggleNode: (t) => e((a) => {
|
|
605
|
+
const o = new Set(a.expandedNodes);
|
|
606
|
+
return o.has(t) ? o.delete(t) : o.add(t), { expandedNodes: o };
|
|
32
607
|
}),
|
|
33
608
|
selectedNodeDetail: null,
|
|
34
|
-
setSelectedNodeDetail: (
|
|
609
|
+
setSelectedNodeDetail: (t) => e({ selectedNodeDetail: t }),
|
|
35
610
|
customTaskDocs: {},
|
|
36
|
-
setCustomTaskDocs: (
|
|
611
|
+
setCustomTaskDocs: (t) => e({ customTaskDocs: t }),
|
|
37
612
|
taskSchema: /* @__PURE__ */ new Map(),
|
|
38
|
-
setTaskSchema: (
|
|
613
|
+
setTaskSchema: (t) => e(() => {
|
|
39
614
|
const a = /* @__PURE__ */ new Map();
|
|
40
|
-
for (const
|
|
41
|
-
a.set(`${
|
|
615
|
+
for (const o of t)
|
|
616
|
+
a.set(`${o.name}@${o.version}`, o);
|
|
42
617
|
return { taskSchema: a };
|
|
43
618
|
})
|
|
44
|
-
})),
|
|
45
|
-
function
|
|
619
|
+
})), vt = "apv-template-cache";
|
|
620
|
+
function ha() {
|
|
46
621
|
try {
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
return JSON.parse(
|
|
622
|
+
const e = localStorage.getItem(vt);
|
|
623
|
+
if (e)
|
|
624
|
+
return JSON.parse(e);
|
|
50
625
|
} catch {
|
|
51
626
|
}
|
|
52
627
|
return [];
|
|
53
628
|
}
|
|
54
|
-
function
|
|
629
|
+
function fa(e) {
|
|
55
630
|
try {
|
|
56
|
-
const a = Array.from(
|
|
57
|
-
localStorage.setItem(
|
|
631
|
+
const a = Array.from(e.entries()).slice(-100);
|
|
632
|
+
localStorage.setItem(vt, JSON.stringify(a));
|
|
58
633
|
} catch {
|
|
59
634
|
}
|
|
60
635
|
}
|
|
61
|
-
function
|
|
636
|
+
function ga() {
|
|
62
637
|
const {
|
|
63
|
-
selectedNodeDetail:
|
|
64
|
-
customTaskDocs:
|
|
638
|
+
selectedNodeDetail: e,
|
|
639
|
+
customTaskDocs: t,
|
|
65
640
|
taskSchema: a,
|
|
66
|
-
setSelectedNodeDetail:
|
|
67
|
-
} =
|
|
68
|
-
if (!(
|
|
641
|
+
setSelectedNodeDetail: o
|
|
642
|
+
} = Ve(), r = ve(() => {
|
|
643
|
+
if (!(e != null && e.yaml)) return [];
|
|
69
644
|
try {
|
|
70
|
-
const
|
|
71
|
-
return
|
|
645
|
+
const n = ue(e.yaml);
|
|
646
|
+
return Tt(n ?? {});
|
|
72
647
|
} catch {
|
|
73
648
|
return [];
|
|
74
649
|
}
|
|
75
|
-
}, [
|
|
76
|
-
return
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */ s("h3", { className: "detail-panel__title", children:
|
|
650
|
+
}, [e == null ? void 0 : e.yaml]);
|
|
651
|
+
return e ? /* @__PURE__ */ l("div", { className: "detail-panel", children: [
|
|
652
|
+
/* @__PURE__ */ l("div", { className: "detail-panel__header", children: [
|
|
653
|
+
/* @__PURE__ */ l("div", { className: "detail-panel__header-row", children: [
|
|
654
|
+
/* @__PURE__ */ s("h3", { className: "detail-panel__title", children: e.label }),
|
|
80
655
|
/* @__PURE__ */ s(
|
|
81
656
|
"button",
|
|
82
657
|
{
|
|
83
658
|
className: "detail-panel__close",
|
|
84
|
-
onClick: () =>
|
|
659
|
+
onClick: () => o(null),
|
|
85
660
|
"aria-label": "Close detail panel",
|
|
86
661
|
title: "Close",
|
|
87
662
|
children: "✕"
|
|
88
663
|
}
|
|
89
664
|
)
|
|
90
665
|
] }),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
93
|
-
|
|
666
|
+
/* @__PURE__ */ l("div", { className: "detail-panel__path", children: [
|
|
667
|
+
e.filePath,
|
|
668
|
+
e.repoAlias && /* @__PURE__ */ l("span", { className: "detail-panel__repo", children: [
|
|
94
669
|
" ",
|
|
95
670
|
"@",
|
|
96
|
-
|
|
671
|
+
e.repoAlias
|
|
97
672
|
] })
|
|
98
673
|
] })
|
|
99
674
|
] }),
|
|
100
|
-
|
|
101
|
-
/* @__PURE__ */
|
|
675
|
+
r.length > 0 && /* @__PURE__ */ l("div", { className: "detail-panel__tasks", children: [
|
|
676
|
+
/* @__PURE__ */ l("h4", { className: "detail-panel__section-title", children: [
|
|
102
677
|
"Tasks (",
|
|
103
|
-
|
|
678
|
+
r.length,
|
|
104
679
|
")"
|
|
105
680
|
] }),
|
|
106
|
-
/* @__PURE__ */ s("ul", { className: "task-list", children:
|
|
107
|
-
|
|
681
|
+
/* @__PURE__ */ s("ul", { className: "task-list", children: r.map((n) => /* @__PURE__ */ s(
|
|
682
|
+
_a,
|
|
108
683
|
{
|
|
109
|
-
ref_:
|
|
110
|
-
customDocs:
|
|
111
|
-
schemaEntry: a.get(
|
|
684
|
+
ref_: n,
|
|
685
|
+
customDocs: t,
|
|
686
|
+
schemaEntry: a.get(n.raw) ?? a.get(`${n.name}@${n.version}`)
|
|
112
687
|
},
|
|
113
|
-
|
|
688
|
+
n.raw
|
|
114
689
|
)) })
|
|
115
690
|
] }),
|
|
116
691
|
/* @__PURE__ */ s("div", { className: "detail-panel__editor", children: /* @__PURE__ */ s(
|
|
117
|
-
|
|
692
|
+
Ut,
|
|
118
693
|
{
|
|
119
694
|
height: "100%",
|
|
120
695
|
language: "yaml",
|
|
121
|
-
value:
|
|
696
|
+
value: e.yaml,
|
|
122
697
|
theme: "vs-dark",
|
|
123
698
|
options: {
|
|
124
699
|
readOnly: !0,
|
|
@@ -134,58 +709,58 @@ function Lt() {
|
|
|
134
709
|
) })
|
|
135
710
|
] }) : /* @__PURE__ */ s("div", { className: "detail-panel detail-panel--empty", children: /* @__PURE__ */ s("p", { children: "Click a node to view its contents" }) });
|
|
136
711
|
}
|
|
137
|
-
function
|
|
138
|
-
ref_:
|
|
139
|
-
customDocs:
|
|
712
|
+
function _a({
|
|
713
|
+
ref_: e,
|
|
714
|
+
customDocs: t,
|
|
140
715
|
schemaEntry: a
|
|
141
716
|
}) {
|
|
142
|
-
const
|
|
143
|
-
return /* @__PURE__ */
|
|
717
|
+
const o = $t(e, t);
|
|
718
|
+
return /* @__PURE__ */ l("li", { className: "task-item", children: [
|
|
144
719
|
/* @__PURE__ */ s("span", { className: "task-item__icon", children: "⚙️" }),
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
|
|
720
|
+
/* @__PURE__ */ l("div", { className: "task-item__content", children: [
|
|
721
|
+
o ? /* @__PURE__ */ l(
|
|
147
722
|
"a",
|
|
148
723
|
{
|
|
149
|
-
href:
|
|
724
|
+
href: o,
|
|
150
725
|
target: "_blank",
|
|
151
726
|
rel: "noopener noreferrer",
|
|
152
727
|
className: "task-item__link",
|
|
153
|
-
title: (a == null ? void 0 : a.description) || `Open docs for ${
|
|
728
|
+
title: (a == null ? void 0 : a.description) || `Open docs for ${e.name}`,
|
|
154
729
|
children: [
|
|
155
|
-
|
|
156
|
-
/* @__PURE__ */
|
|
730
|
+
e.name,
|
|
731
|
+
/* @__PURE__ */ l("span", { className: "task-item__version", children: [
|
|
157
732
|
"@",
|
|
158
|
-
|
|
733
|
+
e.version
|
|
159
734
|
] }),
|
|
160
735
|
/* @__PURE__ */ s("span", { className: "task-item__external", children: "↗" })
|
|
161
736
|
]
|
|
162
737
|
}
|
|
163
|
-
) : /* @__PURE__ */
|
|
164
|
-
|
|
165
|
-
/* @__PURE__ */
|
|
738
|
+
) : /* @__PURE__ */ l("span", { className: "task-item__name", children: [
|
|
739
|
+
e.name,
|
|
740
|
+
/* @__PURE__ */ l("span", { className: "task-item__version", children: [
|
|
166
741
|
"@",
|
|
167
|
-
|
|
742
|
+
e.version
|
|
168
743
|
] })
|
|
169
744
|
] }),
|
|
170
745
|
(a == null ? void 0 : a.description) && /* @__PURE__ */ s("div", { className: "task-item__description", children: a.description })
|
|
171
746
|
] })
|
|
172
747
|
] });
|
|
173
748
|
}
|
|
174
|
-
class
|
|
175
|
-
constructor(
|
|
176
|
-
super(
|
|
749
|
+
class Re extends wt {
|
|
750
|
+
constructor(t) {
|
|
751
|
+
super(t), this.state = { hasError: !1, error: null };
|
|
177
752
|
}
|
|
178
|
-
static getDerivedStateFromError(
|
|
179
|
-
return { hasError: !0, error:
|
|
753
|
+
static getDerivedStateFromError(t) {
|
|
754
|
+
return { hasError: !0, error: t };
|
|
180
755
|
}
|
|
181
|
-
componentDidCatch(
|
|
182
|
-
console.error("ErrorBoundary caught:",
|
|
756
|
+
componentDidCatch(t, a) {
|
|
757
|
+
console.error("ErrorBoundary caught:", t, a);
|
|
183
758
|
}
|
|
184
759
|
render() {
|
|
185
|
-
var
|
|
186
|
-
return this.state.hasError ? this.props.fallback || /* @__PURE__ */
|
|
760
|
+
var t;
|
|
761
|
+
return this.state.hasError ? this.props.fallback || /* @__PURE__ */ l("div", { className: "error", children: [
|
|
187
762
|
/* @__PURE__ */ s("h3", { children: "Something went wrong" }),
|
|
188
|
-
/* @__PURE__ */ s("p", { children: (
|
|
763
|
+
/* @__PURE__ */ s("p", { children: (t = this.state.error) == null ? void 0 : t.message }),
|
|
189
764
|
/* @__PURE__ */ s(
|
|
190
765
|
"button",
|
|
191
766
|
{
|
|
@@ -197,104 +772,104 @@ class Ie extends pt {
|
|
|
197
772
|
] }) : this.props.children;
|
|
198
773
|
}
|
|
199
774
|
}
|
|
200
|
-
const
|
|
201
|
-
function
|
|
202
|
-
const
|
|
203
|
-
if (!
|
|
775
|
+
const Nt = Pt(null), va = Nt.Provider;
|
|
776
|
+
function Na() {
|
|
777
|
+
const e = Et(Nt);
|
|
778
|
+
if (!e)
|
|
204
779
|
throw new Error(
|
|
205
780
|
"useFileFetch must be used within a FileFetchProvider. Wrap your component tree with <FileFetchProvider value={...}>."
|
|
206
781
|
);
|
|
207
|
-
return
|
|
782
|
+
return e;
|
|
208
783
|
}
|
|
209
|
-
const
|
|
210
|
-
function
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
for (const
|
|
214
|
-
|
|
215
|
-
for (const
|
|
216
|
-
|
|
217
|
-
return
|
|
218
|
-
const
|
|
784
|
+
const tt = 300, at = 100;
|
|
785
|
+
function Ke(e, t, a = "TB") {
|
|
786
|
+
const o = new Se.graphlib.Graph();
|
|
787
|
+
o.setDefaultEdgeLabel(() => ({})), o.setGraph({ rankdir: a, ranksep: 80, nodesep: 40 });
|
|
788
|
+
for (const n of e)
|
|
789
|
+
o.setNode(n.id, { width: tt, height: at });
|
|
790
|
+
for (const n of t)
|
|
791
|
+
o.setEdge(n.source, n.target);
|
|
792
|
+
return Se.layout(o), { nodes: e.map((n) => {
|
|
793
|
+
const d = o.node(n.id);
|
|
219
794
|
return {
|
|
220
|
-
...
|
|
795
|
+
...n,
|
|
221
796
|
position: {
|
|
222
|
-
x:
|
|
223
|
-
y:
|
|
797
|
+
x: d.x - tt / 2,
|
|
798
|
+
y: d.y - at / 2
|
|
224
799
|
}
|
|
225
800
|
};
|
|
226
|
-
}), edges:
|
|
801
|
+
}), edges: t };
|
|
227
802
|
}
|
|
228
|
-
function
|
|
229
|
-
var
|
|
230
|
-
const
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
-
!
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
/* @__PURE__ */ s("span", { className: "file-node__icon", children:
|
|
235
|
-
/* @__PURE__ */ s("span", { className: "file-node__label", title:
|
|
236
|
-
/* @__PURE__ */ s("span", { className: "file-node__actions", children:
|
|
803
|
+
function ba({ data: e }) {
|
|
804
|
+
var d;
|
|
805
|
+
const t = e, [a, o] = L(!1), r = t.status === "root" ? "file-node--root" : t.status === "expanded" ? "file-node--expanded" : t.status === "loading" ? "file-node--loading" : t.status === "error" ? "file-node--error" : "file-node--collapsed", n = t.repoAlias ? "file-node--cross-repo" : "";
|
|
806
|
+
return /* @__PURE__ */ l("div", { className: `file-node ${r} ${n}`, children: [
|
|
807
|
+
!t.isRoot && /* @__PURE__ */ s(Ce, { type: "target", position: De.Top }),
|
|
808
|
+
/* @__PURE__ */ l("div", { className: "file-node__header", children: [
|
|
809
|
+
/* @__PURE__ */ s("span", { className: "file-node__icon", children: t.isRoot ? "📄" : t.status === "expanded" ? "📋" : t.repoAlias ? "🔗" : "📁" }),
|
|
810
|
+
/* @__PURE__ */ s("span", { className: "file-node__label", title: t.filePath, children: t.label }),
|
|
811
|
+
/* @__PURE__ */ s("span", { className: "file-node__actions", children: t.adoUrl && /* @__PURE__ */ s(
|
|
237
812
|
"a",
|
|
238
813
|
{
|
|
239
|
-
href:
|
|
814
|
+
href: t.adoUrl,
|
|
240
815
|
target: "_blank",
|
|
241
816
|
rel: "noopener noreferrer",
|
|
242
817
|
className: "file-node__action-btn",
|
|
243
818
|
title: "Open in Azure DevOps",
|
|
244
|
-
onClick: (
|
|
245
|
-
children: /* @__PURE__ */ s(
|
|
819
|
+
onClick: (m) => m.stopPropagation(),
|
|
820
|
+
children: /* @__PURE__ */ s(ya, {})
|
|
246
821
|
}
|
|
247
822
|
) })
|
|
248
823
|
] }),
|
|
249
|
-
|
|
824
|
+
t.repoAlias && /* @__PURE__ */ l(
|
|
250
825
|
"div",
|
|
251
826
|
{
|
|
252
827
|
className: "file-node__repo-row",
|
|
253
|
-
onMouseEnter: () =>
|
|
254
|
-
onMouseLeave: () =>
|
|
828
|
+
onMouseEnter: () => o(!0),
|
|
829
|
+
onMouseLeave: () => o(!1),
|
|
255
830
|
children: [
|
|
256
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ l("span", { className: "file-node__repo", children: [
|
|
257
832
|
"@",
|
|
258
|
-
|
|
833
|
+
t.repoAlias
|
|
259
834
|
] }),
|
|
260
|
-
|
|
261
|
-
/* @__PURE__ */
|
|
835
|
+
t.repoInfo && a && /* @__PURE__ */ l("div", { className: "file-node__repo-tooltip", children: [
|
|
836
|
+
/* @__PURE__ */ l("div", { className: "file-node__repo-tooltip-row", children: [
|
|
262
837
|
/* @__PURE__ */ s("span", { className: "file-node__repo-tooltip-label", children: "Repo" }),
|
|
263
|
-
/* @__PURE__ */ s("span", { children:
|
|
838
|
+
/* @__PURE__ */ s("span", { children: t.repoInfo.fullName })
|
|
264
839
|
] }),
|
|
265
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ l("div", { className: "file-node__repo-tooltip-row", children: [
|
|
266
841
|
/* @__PURE__ */ s("span", { className: "file-node__repo-tooltip-label", children: "Type" }),
|
|
267
|
-
/* @__PURE__ */ s("span", { children:
|
|
842
|
+
/* @__PURE__ */ s("span", { children: t.repoInfo.type })
|
|
268
843
|
] }),
|
|
269
|
-
|
|
844
|
+
t.repoInfo.ref && /* @__PURE__ */ l("div", { className: "file-node__repo-tooltip-row", children: [
|
|
270
845
|
/* @__PURE__ */ s("span", { className: "file-node__repo-tooltip-label", children: "Ref" }),
|
|
271
|
-
/* @__PURE__ */ s("span", { children:
|
|
846
|
+
/* @__PURE__ */ s("span", { children: t.repoInfo.ref })
|
|
272
847
|
] }),
|
|
273
|
-
|
|
848
|
+
t.repoInfo.project && /* @__PURE__ */ l("div", { className: "file-node__repo-tooltip-row", children: [
|
|
274
849
|
/* @__PURE__ */ s("span", { className: "file-node__repo-tooltip-label", children: "Project" }),
|
|
275
|
-
/* @__PURE__ */ s("span", { children:
|
|
850
|
+
/* @__PURE__ */ s("span", { children: t.repoInfo.project })
|
|
276
851
|
] })
|
|
277
852
|
] })
|
|
278
853
|
]
|
|
279
854
|
}
|
|
280
855
|
),
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
|
|
283
|
-
|
|
856
|
+
/* @__PURE__ */ l("div", { className: "file-node__meta", children: [
|
|
857
|
+
t.status === "loading" && /* @__PURE__ */ s("span", { className: "file-node__spinner", children: "⏳ Loading..." }),
|
|
858
|
+
t.status === "error" && /* @__PURE__ */ l("span", { className: "file-node__error", title: t.errorMessage, children: [
|
|
284
859
|
"❌ ",
|
|
285
|
-
(
|
|
860
|
+
(d = t.errorMessage) == null ? void 0 : d.slice(0, 80)
|
|
286
861
|
] }),
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
(
|
|
290
|
-
|
|
862
|
+
t.status === "collapsed" && /* @__PURE__ */ s("span", { className: "file-node__hint", children: "Click to expand" }),
|
|
863
|
+
t.status === "expanded" && t.templateCount === 0 && !t.isRoot && /* @__PURE__ */ s("span", { className: "file-node__leaf", children: "✓ no nested templates" }),
|
|
864
|
+
(t.status === "root" || t.status === "expanded") && t.templateCount > 0 && /* @__PURE__ */ l("span", { className: "file-node__count", children: [
|
|
865
|
+
t.templateCount,
|
|
291
866
|
" template ref(s)"
|
|
292
867
|
] })
|
|
293
868
|
] }),
|
|
294
|
-
/* @__PURE__ */ s(
|
|
869
|
+
/* @__PURE__ */ s(Ce, { type: "source", position: De.Bottom })
|
|
295
870
|
] });
|
|
296
871
|
}
|
|
297
|
-
function
|
|
872
|
+
function ya() {
|
|
298
873
|
return /* @__PURE__ */ s(
|
|
299
874
|
"svg",
|
|
300
875
|
{
|
|
@@ -313,132 +888,132 @@ function Mt() {
|
|
|
313
888
|
}
|
|
314
889
|
);
|
|
315
890
|
}
|
|
316
|
-
const
|
|
317
|
-
function
|
|
318
|
-
className:
|
|
319
|
-
label:
|
|
891
|
+
const wa = Qe(ba);
|
|
892
|
+
function qe({
|
|
893
|
+
className: e,
|
|
894
|
+
label: t,
|
|
320
895
|
children: a
|
|
321
896
|
}) {
|
|
322
|
-
const [
|
|
323
|
-
return /* @__PURE__ */
|
|
897
|
+
const [o, r] = L(!1);
|
|
898
|
+
return /* @__PURE__ */ l(
|
|
324
899
|
"span",
|
|
325
900
|
{
|
|
326
|
-
className:
|
|
327
|
-
onMouseEnter: () =>
|
|
328
|
-
onMouseLeave: () =>
|
|
901
|
+
className: e,
|
|
902
|
+
onMouseEnter: () => r(!0),
|
|
903
|
+
onMouseLeave: () => r(!1),
|
|
329
904
|
children: [
|
|
330
|
-
|
|
331
|
-
|
|
905
|
+
t,
|
|
906
|
+
o && /* @__PURE__ */ s("div", { className: "template-edge__badge-tooltip", children: a })
|
|
332
907
|
]
|
|
333
908
|
}
|
|
334
909
|
);
|
|
335
910
|
}
|
|
336
|
-
function
|
|
337
|
-
id:
|
|
338
|
-
sourceX:
|
|
911
|
+
function Pa({
|
|
912
|
+
id: e,
|
|
913
|
+
sourceX: t,
|
|
339
914
|
sourceY: a,
|
|
340
|
-
targetX:
|
|
341
|
-
targetY:
|
|
342
|
-
sourcePosition:
|
|
343
|
-
targetPosition:
|
|
344
|
-
data:
|
|
345
|
-
markerEnd:
|
|
346
|
-
style:
|
|
915
|
+
targetX: o,
|
|
916
|
+
targetY: r,
|
|
917
|
+
sourcePosition: n,
|
|
918
|
+
targetPosition: d,
|
|
919
|
+
data: m,
|
|
920
|
+
markerEnd: u,
|
|
921
|
+
style: h
|
|
347
922
|
}) {
|
|
348
|
-
var
|
|
349
|
-
const
|
|
350
|
-
sourceX:
|
|
923
|
+
var P;
|
|
924
|
+
const i = m, [p, f] = L(!1), [c, N, E] = It({
|
|
925
|
+
sourceX: t,
|
|
351
926
|
sourceY: a,
|
|
352
|
-
sourcePosition:
|
|
353
|
-
targetX:
|
|
354
|
-
targetY:
|
|
355
|
-
targetPosition:
|
|
356
|
-
}),
|
|
357
|
-
return /* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */ s(
|
|
359
|
-
/* @__PURE__ */ s(
|
|
927
|
+
sourcePosition: n,
|
|
928
|
+
targetX: o,
|
|
929
|
+
targetY: r,
|
|
930
|
+
targetPosition: d
|
|
931
|
+
}), _ = ne(() => f(!0), []), y = ne(() => f(!1), []), w = ((P = i == null ? void 0 : i.parameterNames) == null ? void 0 : P.length) ?? 0;
|
|
932
|
+
return /* @__PURE__ */ l(Xe, { children: [
|
|
933
|
+
/* @__PURE__ */ s(Lt, { id: e, path: c, markerEnd: u, style: h }),
|
|
934
|
+
/* @__PURE__ */ s(Bt, { children: /* @__PURE__ */ l(
|
|
360
935
|
"div",
|
|
361
936
|
{
|
|
362
937
|
className: "template-edge__label-container",
|
|
363
938
|
style: {
|
|
364
939
|
position: "absolute",
|
|
365
|
-
transform: `translate(-50%, -50%) translate(${
|
|
940
|
+
transform: `translate(-50%, -50%) translate(${N}px,${E}px)`,
|
|
366
941
|
pointerEvents: "all"
|
|
367
942
|
},
|
|
368
943
|
children: [
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */ s("span", { className: "template-edge__category", children:
|
|
371
|
-
(
|
|
372
|
-
|
|
944
|
+
/* @__PURE__ */ l("div", { className: "template-edge__top-row", children: [
|
|
945
|
+
/* @__PURE__ */ s("span", { className: "template-edge__category", children: i == null ? void 0 : i.edgeLabel }),
|
|
946
|
+
(i == null ? void 0 : i.conditional) && /* @__PURE__ */ l(
|
|
947
|
+
qe,
|
|
373
948
|
{
|
|
374
|
-
className: `template-edge__badge template-edge__badge--conditional${
|
|
375
|
-
label:
|
|
949
|
+
className: `template-edge__badge template-edge__badge--conditional${i.conditionResult === !1 ? " template-edge__badge--condition-false" : i.conditionResult === !0 ? " template-edge__badge--condition-true" : ""}`,
|
|
950
|
+
label: i.conditionResult === !1 ? "⊘ false" : i.conditionResult === !0 ? "✓ conditional" : "conditional",
|
|
376
951
|
children: [
|
|
377
952
|
/* @__PURE__ */ s("div", { className: "template-edge__badge-tooltip-title", children: "⚡ Conditional Reference" }),
|
|
378
|
-
/* @__PURE__ */ s("p", { children:
|
|
379
|
-
|
|
953
|
+
/* @__PURE__ */ s("p", { children: i.conditionResult === !0 ? "Condition evaluated to true — this template will be included." : i.conditionResult === !1 ? "Condition evaluated to false — this template will NOT be included in this pipeline run." : "This template is inside a conditional block. The condition could not be fully evaluated." }),
|
|
954
|
+
i.conditionExpression && /* @__PURE__ */ l("div", { className: "template-edge__badge-tooltip-row", children: [
|
|
380
955
|
/* @__PURE__ */ s("span", { className: "template-edge__badge-tooltip-label", children: "Condition" }),
|
|
381
|
-
/* @__PURE__ */ s("code", { children:
|
|
956
|
+
/* @__PURE__ */ s("code", { children: i.conditionExpression })
|
|
382
957
|
] }),
|
|
383
|
-
|
|
958
|
+
i.conditionResult != null && /* @__PURE__ */ l("div", { className: "template-edge__badge-tooltip-row", children: [
|
|
384
959
|
/* @__PURE__ */ s("span", { className: "template-edge__badge-tooltip-label", children: "Result" }),
|
|
385
|
-
/* @__PURE__ */ s("code", { children: String(
|
|
960
|
+
/* @__PURE__ */ s("code", { children: String(i.conditionResult) })
|
|
386
961
|
] })
|
|
387
962
|
]
|
|
388
963
|
}
|
|
389
964
|
),
|
|
390
|
-
(
|
|
391
|
-
|
|
965
|
+
(i == null ? void 0 : i.dynamicPath) && i.expressionResolved && /* @__PURE__ */ l(
|
|
966
|
+
qe,
|
|
392
967
|
{
|
|
393
968
|
className: "template-edge__badge template-edge__badge--resolved",
|
|
394
969
|
label: "🔮 resolved",
|
|
395
970
|
children: [
|
|
396
971
|
/* @__PURE__ */ s("div", { className: "template-edge__badge-tooltip-title", children: "🔮 Expression Resolved" }),
|
|
397
972
|
/* @__PURE__ */ s("p", { children: "The template path contained expressions that were successfully evaluated." }),
|
|
398
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ l("div", { className: "template-edge__badge-tooltip-row", children: [
|
|
399
974
|
/* @__PURE__ */ s("span", { className: "template-edge__badge-tooltip-label", children: "Original" }),
|
|
400
|
-
/* @__PURE__ */ s("code", { children:
|
|
975
|
+
/* @__PURE__ */ s("code", { children: i.originalPath })
|
|
401
976
|
] }),
|
|
402
|
-
|
|
977
|
+
i.resolvedPath && /* @__PURE__ */ l("div", { className: "template-edge__badge-tooltip-row", children: [
|
|
403
978
|
/* @__PURE__ */ s("span", { className: "template-edge__badge-tooltip-label", children: "Resolved" }),
|
|
404
|
-
/* @__PURE__ */ s("code", { children:
|
|
979
|
+
/* @__PURE__ */ s("code", { children: i.resolvedPath })
|
|
405
980
|
] })
|
|
406
981
|
]
|
|
407
982
|
}
|
|
408
983
|
),
|
|
409
|
-
(
|
|
410
|
-
|
|
984
|
+
(i == null ? void 0 : i.dynamicPath) && !i.expressionResolved && /* @__PURE__ */ l(
|
|
985
|
+
qe,
|
|
411
986
|
{
|
|
412
987
|
className: "template-edge__badge template-edge__badge--unresolved",
|
|
413
988
|
label: "⚠️ dynamic",
|
|
414
989
|
children: [
|
|
415
990
|
/* @__PURE__ */ s("div", { className: "template-edge__badge-tooltip-title", children: "⚠️ Unresolved Expressions" }),
|
|
416
991
|
/* @__PURE__ */ s("p", { children: "The template path contains expressions that could not be evaluated at analysis time." }),
|
|
417
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ l("div", { className: "template-edge__badge-tooltip-row", children: [
|
|
418
993
|
/* @__PURE__ */ s("span", { className: "template-edge__badge-tooltip-label", children: "Original" }),
|
|
419
|
-
/* @__PURE__ */ s("code", { children:
|
|
994
|
+
/* @__PURE__ */ s("code", { children: i.originalPath })
|
|
420
995
|
] }),
|
|
421
|
-
|
|
996
|
+
i.resolvedPath && i.resolvedPath !== i.originalPath && /* @__PURE__ */ l("div", { className: "template-edge__badge-tooltip-row", children: [
|
|
422
997
|
/* @__PURE__ */ s("span", { className: "template-edge__badge-tooltip-label", children: "Partial" }),
|
|
423
|
-
/* @__PURE__ */ s("code", { children:
|
|
998
|
+
/* @__PURE__ */ s("code", { children: i.resolvedPath })
|
|
424
999
|
] }),
|
|
425
|
-
|
|
1000
|
+
i.unresolvedExpressions && i.unresolvedExpressions.length > 0 && /* @__PURE__ */ l("div", { className: "template-edge__badge-tooltip-row", children: [
|
|
426
1001
|
/* @__PURE__ */ s("span", { className: "template-edge__badge-tooltip-label", children: "Unresolved" }),
|
|
427
|
-
/* @__PURE__ */ s("span", { children:
|
|
1002
|
+
/* @__PURE__ */ s("span", { children: i.unresolvedExpressions.join(", ") })
|
|
428
1003
|
] })
|
|
429
1004
|
]
|
|
430
1005
|
}
|
|
431
1006
|
)
|
|
432
1007
|
] }),
|
|
433
|
-
|
|
1008
|
+
w > 0 && /* @__PURE__ */ l(
|
|
434
1009
|
"span",
|
|
435
1010
|
{
|
|
436
1011
|
className: "template-edge__params-badge",
|
|
437
|
-
onMouseEnter:
|
|
438
|
-
onMouseLeave:
|
|
1012
|
+
onMouseEnter: _,
|
|
1013
|
+
onMouseLeave: y,
|
|
439
1014
|
children: [
|
|
440
|
-
|
|
441
|
-
|
|
1015
|
+
Ea(i),
|
|
1016
|
+
p && /* @__PURE__ */ s(Ra, { data: i })
|
|
442
1017
|
]
|
|
443
1018
|
}
|
|
444
1019
|
)
|
|
@@ -447,539 +1022,539 @@ function Wt({
|
|
|
447
1022
|
) })
|
|
448
1023
|
] });
|
|
449
1024
|
}
|
|
450
|
-
function
|
|
1025
|
+
function Ea(e) {
|
|
451
1026
|
var a;
|
|
452
|
-
const
|
|
453
|
-
return
|
|
1027
|
+
const t = ((a = e.parameterNames) == null ? void 0 : a.length) ?? 0;
|
|
1028
|
+
return e.totalParameterCount != null ? `${t}/${e.totalParameterCount} params` : `${t} params`;
|
|
454
1029
|
}
|
|
455
|
-
function
|
|
456
|
-
var a,
|
|
457
|
-
const
|
|
458
|
-
(
|
|
459
|
-
var
|
|
460
|
-
return !((
|
|
1030
|
+
function Ra({ data: e }) {
|
|
1031
|
+
var a, o;
|
|
1032
|
+
const t = (a = e.declaredParameterNames) == null ? void 0 : a.filter(
|
|
1033
|
+
(r) => {
|
|
1034
|
+
var n;
|
|
1035
|
+
return !((n = e.parameterNames) != null && n.includes(r));
|
|
461
1036
|
}
|
|
462
1037
|
);
|
|
463
|
-
return /* @__PURE__ */
|
|
464
|
-
|
|
465
|
-
/* @__PURE__ */
|
|
1038
|
+
return /* @__PURE__ */ l("div", { className: "template-edge__params-tooltip", children: [
|
|
1039
|
+
e.parameterNames && e.parameterNames.length > 0 && /* @__PURE__ */ l("div", { className: "template-edge__params-section", children: [
|
|
1040
|
+
/* @__PURE__ */ l("div", { className: "template-edge__params-heading", children: [
|
|
466
1041
|
"✓ Passed (",
|
|
467
|
-
|
|
1042
|
+
e.parameterNames.length,
|
|
468
1043
|
")"
|
|
469
1044
|
] }),
|
|
470
|
-
/* @__PURE__ */ s("ul", { className: "template-edge__params-list", children:
|
|
1045
|
+
/* @__PURE__ */ s("ul", { className: "template-edge__params-list", children: e.parameterNames.map((r) => /* @__PURE__ */ s(
|
|
471
1046
|
"li",
|
|
472
1047
|
{
|
|
473
1048
|
className: "template-edge__params-item template-edge__params-item--passed",
|
|
474
|
-
children:
|
|
1049
|
+
children: r
|
|
475
1050
|
},
|
|
476
|
-
|
|
1051
|
+
r
|
|
477
1052
|
)) })
|
|
478
1053
|
] }),
|
|
479
|
-
|
|
480
|
-
/* @__PURE__ */
|
|
1054
|
+
t && t.length > 0 && /* @__PURE__ */ l("div", { className: "template-edge__params-section", children: [
|
|
1055
|
+
/* @__PURE__ */ l("div", { className: "template-edge__params-heading", children: [
|
|
481
1056
|
"○ Not passed (",
|
|
482
|
-
|
|
1057
|
+
t.length,
|
|
483
1058
|
")"
|
|
484
1059
|
] }),
|
|
485
|
-
/* @__PURE__ */ s("ul", { className: "template-edge__params-list", children:
|
|
1060
|
+
/* @__PURE__ */ s("ul", { className: "template-edge__params-list", children: t.map((r) => /* @__PURE__ */ s(
|
|
486
1061
|
"li",
|
|
487
1062
|
{
|
|
488
1063
|
className: "template-edge__params-item template-edge__params-item--missing",
|
|
489
|
-
children:
|
|
1064
|
+
children: r
|
|
490
1065
|
},
|
|
491
|
-
|
|
1066
|
+
r
|
|
492
1067
|
)) })
|
|
493
1068
|
] }),
|
|
494
|
-
|
|
1069
|
+
e.totalParameterCount == null && !((o = e.declaredParameterNames) != null && o.length) && /* @__PURE__ */ s("div", { className: "template-edge__params-hint", children: "Expand node to see all declared params" })
|
|
495
1070
|
] });
|
|
496
1071
|
}
|
|
497
|
-
const
|
|
1072
|
+
const xa = Qe(Pa), ka = { fileNode: wa }, Ta = { templateEdge: xa }, $a = {
|
|
498
1073
|
animated: !0,
|
|
499
1074
|
style: { stroke: "var(--accent)", strokeWidth: 2 },
|
|
500
|
-
markerEnd: { type:
|
|
1075
|
+
markerEnd: { type: Ae.ArrowClosed, color: "var(--accent)" }
|
|
501
1076
|
};
|
|
502
|
-
function
|
|
503
|
-
var le,
|
|
1077
|
+
function Sa() {
|
|
1078
|
+
var le, be;
|
|
504
1079
|
const {
|
|
505
|
-
org:
|
|
506
|
-
project:
|
|
1080
|
+
org: e,
|
|
1081
|
+
project: t,
|
|
507
1082
|
selectedPipeline: a,
|
|
508
|
-
selectedPipelineLoading:
|
|
509
|
-
selectedPipelineError:
|
|
510
|
-
expandedTemplates:
|
|
511
|
-
setExpandedTemplate:
|
|
512
|
-
setSelectedNodeDetail:
|
|
513
|
-
} =
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}, [
|
|
517
|
-
const [
|
|
1083
|
+
selectedPipelineLoading: o,
|
|
1084
|
+
selectedPipelineError: r,
|
|
1085
|
+
expandedTemplates: n,
|
|
1086
|
+
setExpandedTemplate: d,
|
|
1087
|
+
setSelectedNodeDetail: m
|
|
1088
|
+
} = Ve(), u = Na(), [h, i, p] = dt([]), [f, c, N] = pt([]), E = Q(null), _ = Q(null), y = Q(""), w = Q([]);
|
|
1089
|
+
ee(() => {
|
|
1090
|
+
w.current = f;
|
|
1091
|
+
}, [f]);
|
|
1092
|
+
const [P, F] = L(/* @__PURE__ */ new Set()), k = Q(/* @__PURE__ */ new Set()), [T, se] = L(!1), C = ((be = (le = a == null ? void 0 : a.definition) == null ? void 0 : le.repository) == null ? void 0 : be.name) ?? "", M = ve(() => {
|
|
518
1093
|
if (!(a != null && a.yaml)) return [];
|
|
519
1094
|
try {
|
|
520
|
-
const
|
|
521
|
-
return (
|
|
1095
|
+
const b = ue(a.yaml), g = b == null ? void 0 : b.resources;
|
|
1096
|
+
return (g == null ? void 0 : g.repositories) ?? [];
|
|
522
1097
|
} catch {
|
|
523
1098
|
return [];
|
|
524
1099
|
}
|
|
525
|
-
}, [a == null ? void 0 : a.yaml]),
|
|
1100
|
+
}, [a == null ? void 0 : a.yaml]), G = ve(() => {
|
|
526
1101
|
if (!(a != null && a.yaml)) return {};
|
|
527
1102
|
try {
|
|
528
|
-
const
|
|
529
|
-
return Pe(
|
|
1103
|
+
const b = ue(a.yaml);
|
|
1104
|
+
return Pe(b ?? {});
|
|
530
1105
|
} catch {
|
|
531
1106
|
return {};
|
|
532
1107
|
}
|
|
533
1108
|
}, [a == null ? void 0 : a.yaml]);
|
|
534
|
-
|
|
535
|
-
var
|
|
1109
|
+
ee(() => {
|
|
1110
|
+
var R, B, z, ce, de, pe, oe;
|
|
536
1111
|
if (!(a != null && a.yaml)) {
|
|
537
|
-
|
|
1112
|
+
i([]), c([]);
|
|
538
1113
|
return;
|
|
539
1114
|
}
|
|
540
|
-
const
|
|
1115
|
+
const b = ue(a.yaml), g = ((R = a.definition) == null ? void 0 : R.path) ?? "", v = je(b ?? {}, { sourcePath: g }), x = ((B = a.definition) == null ? void 0 : B.name) ?? g.split("/").pop() ?? "Pipeline", $ = Le(g), A = ze(b ?? {}), D = ((ce = (z = a.definition) == null ? void 0 : z.repository) == null ? void 0 : ce.name) ?? "", W = (oe = (pe = (de = a.definition) == null ? void 0 : de.repository) == null ? void 0 : pe.defaultBranch) == null ? void 0 : oe.replace(
|
|
541
1116
|
/^refs\/heads\//,
|
|
542
1117
|
""
|
|
543
|
-
), I =
|
|
544
|
-
org:
|
|
545
|
-
project:
|
|
546
|
-
repoName:
|
|
547
|
-
filePath:
|
|
1118
|
+
), I = e && t && D ? it({
|
|
1119
|
+
org: e,
|
|
1120
|
+
project: t,
|
|
1121
|
+
repoName: D,
|
|
1122
|
+
filePath: g,
|
|
548
1123
|
branch: W
|
|
549
|
-
}) : void 0,
|
|
1124
|
+
}) : void 0, te = {
|
|
550
1125
|
id: "root",
|
|
551
1126
|
type: "fileNode",
|
|
552
1127
|
position: { x: 0, y: 0 },
|
|
553
1128
|
data: {
|
|
554
|
-
label:
|
|
555
|
-
filePath:
|
|
556
|
-
templateCount:
|
|
1129
|
+
label: x,
|
|
1130
|
+
filePath: g,
|
|
1131
|
+
templateCount: v.length,
|
|
557
1132
|
status: "root",
|
|
558
1133
|
isRoot: !0,
|
|
559
|
-
baseDir:
|
|
1134
|
+
baseDir: $,
|
|
560
1135
|
adoUrl: I
|
|
561
1136
|
}
|
|
562
|
-
}, { templateNodes:
|
|
1137
|
+
}, { templateNodes: H, templateEdges: Z } = Ye(
|
|
563
1138
|
"root",
|
|
564
|
-
|
|
565
|
-
t,
|
|
1139
|
+
v,
|
|
566
1140
|
e,
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
1141
|
+
t,
|
|
1142
|
+
C,
|
|
1143
|
+
M,
|
|
1144
|
+
A,
|
|
570
1145
|
void 0,
|
|
571
1146
|
// existingNodeIds
|
|
572
|
-
|
|
573
|
-
),
|
|
574
|
-
|
|
575
|
-
|
|
1147
|
+
G
|
|
1148
|
+
), q = [te, ...H], ae = [...Z], { nodes: O, edges: U } = Ke(
|
|
1149
|
+
q,
|
|
1150
|
+
ae
|
|
576
1151
|
);
|
|
577
|
-
|
|
578
|
-
}, [a,
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
if (!
|
|
582
|
-
const
|
|
583
|
-
if (
|
|
584
|
-
return
|
|
585
|
-
var
|
|
586
|
-
(
|
|
1152
|
+
i(O), c(U), k.current = /* @__PURE__ */ new Set();
|
|
1153
|
+
}, [a, i, c]);
|
|
1154
|
+
const fe = Q(!1);
|
|
1155
|
+
ee(() => {
|
|
1156
|
+
if (!T || !E.current || h.length === 0) return;
|
|
1157
|
+
const b = `${h.length}:${f.length}`;
|
|
1158
|
+
if (b !== y.current)
|
|
1159
|
+
return y.current = b, _.current != null && cancelAnimationFrame(_.current), _.current = requestAnimationFrame(() => {
|
|
1160
|
+
var g;
|
|
1161
|
+
(g = E.current) == null || g.fitView({
|
|
587
1162
|
padding: 0.2,
|
|
588
1163
|
duration: 300
|
|
589
|
-
}),
|
|
1164
|
+
}), _.current = null;
|
|
590
1165
|
}), () => {
|
|
591
|
-
|
|
1166
|
+
_.current != null && (cancelAnimationFrame(_.current), _.current = null);
|
|
592
1167
|
};
|
|
593
|
-
}, [
|
|
594
|
-
if (
|
|
595
|
-
const
|
|
596
|
-
const
|
|
597
|
-
if (
|
|
598
|
-
const
|
|
599
|
-
return !(
|
|
1168
|
+
}, [T, h.length, f.length]), ee(() => {
|
|
1169
|
+
if (fe.current) return;
|
|
1170
|
+
const b = h.filter((g) => {
|
|
1171
|
+
const v = g.data;
|
|
1172
|
+
if (v.status !== "collapsed" || k.current.has(g.id) || P.has(g.id)) return !1;
|
|
1173
|
+
const x = v._conditionResult;
|
|
1174
|
+
return !(x === !1 || x === "unknown" && !T);
|
|
600
1175
|
});
|
|
601
|
-
if (
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
return
|
|
1176
|
+
if (b.length !== 0) {
|
|
1177
|
+
b.sort((g, v) => {
|
|
1178
|
+
const x = g.data.templateLocation === "variables" ? 0 : 1, $ = v.data.templateLocation === "variables" ? 0 : 1;
|
|
1179
|
+
return x - $;
|
|
605
1180
|
});
|
|
606
|
-
for (const
|
|
607
|
-
const
|
|
608
|
-
|
|
1181
|
+
for (const g of b) {
|
|
1182
|
+
const v = g.data;
|
|
1183
|
+
v.dynamicPath && !v.expressionResolved || k.current.add(g.id);
|
|
609
1184
|
}
|
|
610
|
-
|
|
611
|
-
for (const
|
|
612
|
-
const
|
|
613
|
-
if (!(
|
|
1185
|
+
fe.current = !0, (async () => {
|
|
1186
|
+
for (const g of b) {
|
|
1187
|
+
const v = g.data;
|
|
1188
|
+
if (!(v.dynamicPath && !v.expressionResolved))
|
|
614
1189
|
try {
|
|
615
|
-
const { content:
|
|
616
|
-
t,
|
|
1190
|
+
const { content: x, actualPath: $ } = await Je(
|
|
617
1191
|
e,
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
1192
|
+
t,
|
|
1193
|
+
C,
|
|
1194
|
+
v,
|
|
1195
|
+
M,
|
|
1196
|
+
n,
|
|
1197
|
+
d,
|
|
1198
|
+
u
|
|
1199
|
+
), A = ue(x) ?? {}, D = v._ref, W = je(A, {
|
|
1200
|
+
contextRepoAlias: ie(D ?? {}),
|
|
1201
|
+
sourcePath: $
|
|
1202
|
+
}), I = et(A);
|
|
628
1203
|
if (W.length === 0) {
|
|
629
|
-
const
|
|
630
|
-
if (
|
|
631
|
-
for (const U of
|
|
632
|
-
const
|
|
633
|
-
if (
|
|
634
|
-
const
|
|
1204
|
+
const H = v.templateLocation === "variables" ? Pe(A) : void 0, Z = H && Object.keys(H).length > 0, q = /* @__PURE__ */ new Set(), ae = /* @__PURE__ */ new Set(), O = /* @__PURE__ */ new Map();
|
|
1205
|
+
if (Z)
|
|
1206
|
+
for (const U of h) {
|
|
1207
|
+
const R = U.data;
|
|
1208
|
+
if (R.dynamicPath && !R.expressionResolved) {
|
|
1209
|
+
const B = ke(
|
|
635
1210
|
U,
|
|
636
|
-
|
|
637
|
-
t,
|
|
1211
|
+
H,
|
|
638
1212
|
e,
|
|
639
|
-
|
|
640
|
-
|
|
1213
|
+
t,
|
|
1214
|
+
C,
|
|
1215
|
+
M
|
|
641
1216
|
);
|
|
642
|
-
if (
|
|
643
|
-
|
|
644
|
-
const
|
|
645
|
-
|
|
1217
|
+
if (B !== U) {
|
|
1218
|
+
q.add(U.id);
|
|
1219
|
+
const z = B.data;
|
|
1220
|
+
z.repoAlias && ae.add(U.id), O.set(U.id, z.filePath);
|
|
646
1221
|
}
|
|
647
1222
|
}
|
|
648
1223
|
}
|
|
649
|
-
|
|
650
|
-
(U) => U.map((
|
|
651
|
-
...
|
|
1224
|
+
i(
|
|
1225
|
+
(U) => U.map((R) => R.id === g.id ? {
|
|
1226
|
+
...R,
|
|
652
1227
|
data: {
|
|
653
|
-
...
|
|
1228
|
+
...R.data,
|
|
654
1229
|
status: "expanded",
|
|
655
1230
|
templateCount: 0,
|
|
656
1231
|
totalParameterCount: I.length || void 0,
|
|
657
1232
|
declaredParameterNames: I.length ? I : void 0
|
|
658
1233
|
}
|
|
659
|
-
} :
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
t,
|
|
1234
|
+
} : Z && q.has(R.id) ? ke(
|
|
1235
|
+
R,
|
|
1236
|
+
H,
|
|
663
1237
|
e,
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
1238
|
+
t,
|
|
1239
|
+
C,
|
|
1240
|
+
M
|
|
1241
|
+
) : R)
|
|
1242
|
+
), q.size > 0 && c(
|
|
1243
|
+
(U) => U.map((R) => {
|
|
1244
|
+
if (!q.has(R.target)) return R;
|
|
1245
|
+
const B = R.data;
|
|
1246
|
+
if (!(B != null && B.dynamicPath)) return R;
|
|
1247
|
+
const z = ae.has(R.target);
|
|
673
1248
|
return {
|
|
674
|
-
...
|
|
1249
|
+
...R,
|
|
675
1250
|
data: {
|
|
676
|
-
...
|
|
1251
|
+
...B,
|
|
677
1252
|
expressionResolved: !0,
|
|
678
|
-
isExternal:
|
|
679
|
-
resolvedPath: O.get(
|
|
1253
|
+
isExternal: z || B.isExternal || void 0,
|
|
1254
|
+
resolvedPath: O.get(R.target) ?? B.resolvedPath,
|
|
680
1255
|
unresolvedExpressions: void 0
|
|
681
1256
|
},
|
|
682
|
-
style:
|
|
1257
|
+
style: z ? {
|
|
683
1258
|
stroke: "var(--badge-resources)",
|
|
684
1259
|
strokeWidth: 2,
|
|
685
1260
|
strokeDasharray: "6 3"
|
|
686
|
-
} :
|
|
687
|
-
markerEnd:
|
|
688
|
-
type:
|
|
1261
|
+
} : R.style,
|
|
1262
|
+
markerEnd: z ? {
|
|
1263
|
+
type: Ae.ArrowClosed,
|
|
689
1264
|
color: "var(--badge-resources)"
|
|
690
|
-
} :
|
|
1265
|
+
} : R.markerEnd
|
|
691
1266
|
};
|
|
692
1267
|
})
|
|
693
1268
|
);
|
|
694
|
-
} else if (
|
|
695
|
-
const
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
), O = { ...
|
|
700
|
-
...
|
|
1269
|
+
} else if (T) {
|
|
1270
|
+
const te = ze(A), H = v._parentParamContext, Z = v._accumulatedVariables, q = D == null ? void 0 : D.parameters, ae = Ie(
|
|
1271
|
+
q,
|
|
1272
|
+
H,
|
|
1273
|
+
Z
|
|
1274
|
+
), O = { ...te, ...ae }, U = Pe(A), R = {
|
|
1275
|
+
...Z ?? G,
|
|
701
1276
|
...U
|
|
702
|
-
},
|
|
703
|
-
...
|
|
704
|
-
...
|
|
1277
|
+
}, B = v._accumulatedResources, z = nt(A), ce = st([
|
|
1278
|
+
...B ?? M,
|
|
1279
|
+
...z
|
|
705
1280
|
]);
|
|
706
|
-
await new Promise((
|
|
707
|
-
const
|
|
708
|
-
|
|
1281
|
+
await new Promise((j) => setTimeout(j, 0));
|
|
1282
|
+
const de = new Set(h.map((j) => j.id)), { templateNodes: pe, templateEdges: oe } = Ye(
|
|
1283
|
+
g.id,
|
|
709
1284
|
W,
|
|
710
|
-
t,
|
|
711
1285
|
e,
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
O,
|
|
1286
|
+
t,
|
|
1287
|
+
C,
|
|
715
1288
|
ce,
|
|
716
|
-
|
|
1289
|
+
O,
|
|
1290
|
+
de,
|
|
1291
|
+
R
|
|
717
1292
|
);
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
(
|
|
721
|
-
),
|
|
722
|
-
(
|
|
723
|
-
...
|
|
1293
|
+
i((j) => {
|
|
1294
|
+
const re = new Set(j.map((S) => S.id)), ye = pe.filter(
|
|
1295
|
+
(S) => !re.has(S.id)
|
|
1296
|
+
), we = [...j.map(
|
|
1297
|
+
(S) => S.id === g.id ? {
|
|
1298
|
+
...S,
|
|
724
1299
|
data: {
|
|
725
|
-
...
|
|
1300
|
+
...S.data,
|
|
726
1301
|
status: "expanded",
|
|
727
1302
|
templateCount: W.length,
|
|
728
1303
|
totalParameterCount: I.length || void 0,
|
|
729
1304
|
declaredParameterNames: I.length ? I : void 0
|
|
730
1305
|
}
|
|
731
|
-
} :
|
|
732
|
-
), ...ye],
|
|
733
|
-
|
|
734
|
-
|
|
1306
|
+
} : S
|
|
1307
|
+
), ...ye], Y = [...I.length ? xe(
|
|
1308
|
+
w.current,
|
|
1309
|
+
g.id,
|
|
735
1310
|
I
|
|
736
|
-
) :
|
|
737
|
-
return
|
|
738
|
-
}),
|
|
739
|
-
|
|
740
|
-
|
|
1311
|
+
) : w.current, ...oe];
|
|
1312
|
+
return Ke(we, Y).nodes;
|
|
1313
|
+
}), c((j) => [...I.length ? xe(
|
|
1314
|
+
j,
|
|
1315
|
+
g.id,
|
|
741
1316
|
I
|
|
742
|
-
) :
|
|
1317
|
+
) : j, ...oe]), await new Promise((j) => setTimeout(j, 50));
|
|
743
1318
|
}
|
|
744
1319
|
} catch {
|
|
745
1320
|
}
|
|
746
1321
|
}
|
|
747
|
-
|
|
1322
|
+
fe.current = !1, T && i((g) => [...g]);
|
|
748
1323
|
})();
|
|
749
1324
|
}
|
|
750
1325
|
}, [
|
|
751
|
-
|
|
752
|
-
t,
|
|
1326
|
+
h,
|
|
753
1327
|
e,
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
1328
|
+
t,
|
|
1329
|
+
C,
|
|
1330
|
+
M,
|
|
1331
|
+
n,
|
|
1332
|
+
d,
|
|
1333
|
+
P,
|
|
760
1334
|
i,
|
|
761
|
-
|
|
762
|
-
|
|
1335
|
+
c,
|
|
1336
|
+
T,
|
|
1337
|
+
u
|
|
763
1338
|
]);
|
|
764
|
-
const K =
|
|
765
|
-
async (
|
|
766
|
-
const
|
|
767
|
-
if (
|
|
768
|
-
|
|
769
|
-
nodeId:
|
|
770
|
-
label:
|
|
771
|
-
filePath:
|
|
1339
|
+
const K = ne(
|
|
1340
|
+
async (b, g) => {
|
|
1341
|
+
const v = g.data;
|
|
1342
|
+
if (v.status === "root" && (a != null && a.yaml)) {
|
|
1343
|
+
m({
|
|
1344
|
+
nodeId: g.id,
|
|
1345
|
+
label: v.label,
|
|
1346
|
+
filePath: v.filePath,
|
|
772
1347
|
yaml: a.yaml
|
|
773
1348
|
});
|
|
774
1349
|
return;
|
|
775
1350
|
}
|
|
776
|
-
if (
|
|
777
|
-
const
|
|
1351
|
+
if (v.status === "expanded") {
|
|
1352
|
+
const x = v._ref, $ = ie(x ?? {}) || "", A = `${$}:${v.filePath}`, D = v._fallbackPath, W = D ? `${$}:${D}` : void 0, I = n.get(A) ?? (W ? n.get(W) : void 0);
|
|
778
1353
|
if (I) {
|
|
779
|
-
|
|
780
|
-
nodeId:
|
|
781
|
-
label:
|
|
782
|
-
filePath:
|
|
1354
|
+
m({
|
|
1355
|
+
nodeId: g.id,
|
|
1356
|
+
label: v.label,
|
|
1357
|
+
filePath: v.filePath,
|
|
783
1358
|
yaml: I,
|
|
784
|
-
repoAlias:
|
|
1359
|
+
repoAlias: v.repoAlias
|
|
785
1360
|
});
|
|
786
1361
|
return;
|
|
787
1362
|
}
|
|
788
1363
|
try {
|
|
789
|
-
const { content:
|
|
790
|
-
t,
|
|
1364
|
+
const { content: te } = await Je(
|
|
791
1365
|
e,
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
1366
|
+
t,
|
|
1367
|
+
C,
|
|
1368
|
+
v,
|
|
1369
|
+
M,
|
|
1370
|
+
n,
|
|
1371
|
+
d,
|
|
1372
|
+
u
|
|
798
1373
|
);
|
|
799
|
-
|
|
800
|
-
nodeId:
|
|
801
|
-
label:
|
|
802
|
-
filePath:
|
|
803
|
-
yaml:
|
|
804
|
-
repoAlias:
|
|
1374
|
+
m({
|
|
1375
|
+
nodeId: g.id,
|
|
1376
|
+
label: v.label,
|
|
1377
|
+
filePath: v.filePath,
|
|
1378
|
+
yaml: te,
|
|
1379
|
+
repoAlias: v.repoAlias
|
|
805
1380
|
});
|
|
806
1381
|
} catch {
|
|
807
1382
|
}
|
|
808
1383
|
return;
|
|
809
1384
|
}
|
|
810
|
-
if (
|
|
811
|
-
|
|
812
|
-
(
|
|
813
|
-
(
|
|
1385
|
+
if (v.status === "collapsed" && !P.has(g.id)) {
|
|
1386
|
+
F((x) => new Set(x).add(g.id)), i(
|
|
1387
|
+
(x) => x.map(
|
|
1388
|
+
($) => $.id === g.id ? { ...$, data: { ...$.data, status: "loading" } } : $
|
|
814
1389
|
)
|
|
815
1390
|
);
|
|
816
1391
|
try {
|
|
817
|
-
const { content:
|
|
818
|
-
t,
|
|
1392
|
+
const { content: x, actualPath: $ } = await Je(
|
|
819
1393
|
e,
|
|
820
|
-
$,
|
|
821
|
-
u,
|
|
822
|
-
z,
|
|
823
|
-
o,
|
|
824
|
-
m,
|
|
825
|
-
v
|
|
826
|
-
), D = pe(E) ?? {}, C = u._ref, W = Se(D, {
|
|
827
|
-
contextRepoAlias: re(C ?? {}),
|
|
828
|
-
sourcePath: A
|
|
829
|
-
}), I = De(D), Q = u._parentParamContext, j = u._accumulatedVariables, J = C == null ? void 0 : C.parameters, Y = ke(
|
|
830
|
-
J,
|
|
831
|
-
Q,
|
|
832
|
-
j
|
|
833
|
-
), ee = { ...I, ...Y }, O = je(D), U = Ae(A), w = Pe(D), F = {
|
|
834
|
-
...j ?? H,
|
|
835
|
-
...w
|
|
836
|
-
}, B = u._accumulatedResources, ie = qe(D), ce = Je([
|
|
837
|
-
...B ?? z,
|
|
838
|
-
...ie
|
|
839
|
-
]), de = new Set(d.map((V) => V.id)), { templateNodes: ne, templateEdges: M } = Ue(
|
|
840
|
-
p.id,
|
|
841
|
-
W,
|
|
842
1394
|
t,
|
|
1395
|
+
C,
|
|
1396
|
+
v,
|
|
1397
|
+
M,
|
|
1398
|
+
n,
|
|
1399
|
+
d,
|
|
1400
|
+
u
|
|
1401
|
+
), A = ue(x) ?? {}, D = v._ref, W = je(A, {
|
|
1402
|
+
contextRepoAlias: ie(D ?? {}),
|
|
1403
|
+
sourcePath: $
|
|
1404
|
+
}), I = ze(A), te = v._parentParamContext, H = v._accumulatedVariables, Z = D == null ? void 0 : D.parameters, q = Ie(
|
|
1405
|
+
Z,
|
|
1406
|
+
te,
|
|
1407
|
+
H
|
|
1408
|
+
), ae = { ...I, ...q }, O = et(A), U = Le($), R = Pe(A), B = {
|
|
1409
|
+
...H ?? G,
|
|
1410
|
+
...R
|
|
1411
|
+
}, z = v._accumulatedResources, ce = nt(A), de = st([
|
|
1412
|
+
...z ?? M,
|
|
1413
|
+
...ce
|
|
1414
|
+
]), pe = new Set(h.map((V) => V.id)), { templateNodes: oe, templateEdges: j } = Ye(
|
|
1415
|
+
g.id,
|
|
1416
|
+
W,
|
|
843
1417
|
e,
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
ee,
|
|
1418
|
+
t,
|
|
1419
|
+
C,
|
|
847
1420
|
de,
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
1421
|
+
ae,
|
|
1422
|
+
pe,
|
|
1423
|
+
B
|
|
1424
|
+
), re = /* @__PURE__ */ new Set(), ye = /* @__PURE__ */ new Set(), Oe = /* @__PURE__ */ new Map(), we = v.templateLocation === "variables" && Object.keys(R).length > 0;
|
|
1425
|
+
if (we)
|
|
1426
|
+
for (const V of h) {
|
|
1427
|
+
const Y = V.data;
|
|
1428
|
+
if (Y.dynamicPath && !Y.expressionResolved) {
|
|
1429
|
+
const S = ke(
|
|
855
1430
|
V,
|
|
856
|
-
|
|
857
|
-
t,
|
|
1431
|
+
R,
|
|
858
1432
|
e,
|
|
859
|
-
|
|
860
|
-
|
|
1433
|
+
t,
|
|
1434
|
+
C,
|
|
1435
|
+
M
|
|
861
1436
|
);
|
|
862
|
-
if (
|
|
863
|
-
|
|
864
|
-
const
|
|
865
|
-
|
|
1437
|
+
if (S !== V) {
|
|
1438
|
+
re.add(V.id);
|
|
1439
|
+
const J = S.data;
|
|
1440
|
+
J.repoAlias && ye.add(V.id), Oe.set(V.id, J.filePath);
|
|
866
1441
|
}
|
|
867
1442
|
}
|
|
868
1443
|
}
|
|
869
|
-
|
|
870
|
-
const
|
|
871
|
-
...
|
|
1444
|
+
i((V) => {
|
|
1445
|
+
const Y = new Set(V.map((X) => X.id)), S = oe.filter((X) => !Y.has(X.id)), ge = [...V.map((X) => X.id === g.id ? {
|
|
1446
|
+
...X,
|
|
872
1447
|
data: {
|
|
873
|
-
...
|
|
1448
|
+
...X.data,
|
|
874
1449
|
status: "expanded",
|
|
875
1450
|
templateCount: W.length,
|
|
876
1451
|
totalParameterCount: O.length || void 0,
|
|
877
1452
|
declaredParameterNames: O.length ? O : void 0
|
|
878
1453
|
}
|
|
879
|
-
} :
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
t,
|
|
1454
|
+
} : we && re.has(X.id) ? ke(
|
|
1455
|
+
X,
|
|
1456
|
+
R,
|
|
883
1457
|
e,
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
1458
|
+
t,
|
|
1459
|
+
C,
|
|
1460
|
+
M
|
|
1461
|
+
) : X), ...S], yt = [...O.length ? xe(
|
|
1462
|
+
w.current,
|
|
1463
|
+
g.id,
|
|
889
1464
|
O
|
|
890
|
-
) :
|
|
891
|
-
return
|
|
892
|
-
}),
|
|
893
|
-
let
|
|
1465
|
+
) : w.current, ...j];
|
|
1466
|
+
return Ke(ge, yt).nodes;
|
|
1467
|
+
}), c((V) => {
|
|
1468
|
+
let Y = O.length ? xe(
|
|
894
1469
|
V,
|
|
895
|
-
|
|
1470
|
+
g.id,
|
|
896
1471
|
O
|
|
897
1472
|
) : V;
|
|
898
|
-
return
|
|
899
|
-
if (!
|
|
900
|
-
const
|
|
901
|
-
if (!(
|
|
902
|
-
const
|
|
1473
|
+
return re.size > 0 && (Y = Y.map((S) => {
|
|
1474
|
+
if (!re.has(S.target)) return S;
|
|
1475
|
+
const J = S.data;
|
|
1476
|
+
if (!(J != null && J.dynamicPath)) return S;
|
|
1477
|
+
const ge = ye.has(S.target);
|
|
903
1478
|
return {
|
|
904
|
-
...
|
|
1479
|
+
...S,
|
|
905
1480
|
data: {
|
|
906
|
-
...
|
|
1481
|
+
...J,
|
|
907
1482
|
expressionResolved: !0,
|
|
908
|
-
isExternal:
|
|
909
|
-
resolvedPath:
|
|
1483
|
+
isExternal: ge || J.isExternal || void 0,
|
|
1484
|
+
resolvedPath: Oe.get(S.target) ?? J.resolvedPath,
|
|
910
1485
|
unresolvedExpressions: void 0
|
|
911
1486
|
},
|
|
912
|
-
style:
|
|
1487
|
+
style: ge ? {
|
|
913
1488
|
stroke: "var(--badge-resources)",
|
|
914
1489
|
strokeWidth: 2,
|
|
915
1490
|
strokeDasharray: "6 3"
|
|
916
|
-
} :
|
|
917
|
-
markerEnd:
|
|
918
|
-
type:
|
|
1491
|
+
} : S.style,
|
|
1492
|
+
markerEnd: ge ? {
|
|
1493
|
+
type: Ae.ArrowClosed,
|
|
919
1494
|
color: "var(--badge-resources)"
|
|
920
|
-
} :
|
|
1495
|
+
} : S.markerEnd
|
|
921
1496
|
};
|
|
922
|
-
})), [...
|
|
923
|
-
}),
|
|
924
|
-
nodeId:
|
|
925
|
-
label:
|
|
926
|
-
filePath:
|
|
927
|
-
yaml:
|
|
928
|
-
repoAlias:
|
|
1497
|
+
})), [...Y, ...j];
|
|
1498
|
+
}), m({
|
|
1499
|
+
nodeId: g.id,
|
|
1500
|
+
label: v.label,
|
|
1501
|
+
filePath: v.filePath,
|
|
1502
|
+
yaml: x,
|
|
1503
|
+
repoAlias: v.repoAlias
|
|
929
1504
|
});
|
|
930
|
-
} catch (
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
(
|
|
934
|
-
(
|
|
935
|
-
...
|
|
936
|
-
data: { ...
|
|
937
|
-
} :
|
|
1505
|
+
} catch (x) {
|
|
1506
|
+
const $ = x instanceof Error ? x.message : String(x);
|
|
1507
|
+
i(
|
|
1508
|
+
(A) => A.map(
|
|
1509
|
+
(D) => D.id === g.id ? {
|
|
1510
|
+
...D,
|
|
1511
|
+
data: { ...D.data, status: "error", errorMessage: $ }
|
|
1512
|
+
} : D
|
|
938
1513
|
)
|
|
939
1514
|
);
|
|
940
1515
|
} finally {
|
|
941
|
-
|
|
942
|
-
const
|
|
943
|
-
return
|
|
1516
|
+
F((x) => {
|
|
1517
|
+
const $ = new Set(x);
|
|
1518
|
+
return $.delete(g.id), $;
|
|
944
1519
|
});
|
|
945
1520
|
}
|
|
946
1521
|
}
|
|
947
1522
|
},
|
|
948
1523
|
[
|
|
949
|
-
t,
|
|
950
1524
|
e,
|
|
951
|
-
|
|
1525
|
+
t,
|
|
1526
|
+
C,
|
|
952
1527
|
a,
|
|
953
|
-
|
|
954
|
-
|
|
1528
|
+
M,
|
|
1529
|
+
n,
|
|
1530
|
+
d,
|
|
955
1531
|
m,
|
|
956
1532
|
P,
|
|
957
|
-
_,
|
|
958
|
-
r,
|
|
959
1533
|
i,
|
|
960
|
-
|
|
1534
|
+
c,
|
|
1535
|
+
u
|
|
961
1536
|
]
|
|
962
|
-
),
|
|
963
|
-
|
|
1537
|
+
), Me = ne(() => {
|
|
1538
|
+
se((b) => (b || (k.current = /* @__PURE__ */ new Set(), y.current = ""), !b));
|
|
964
1539
|
}, []);
|
|
965
|
-
return
|
|
1540
|
+
return o ? /* @__PURE__ */ s("div", { className: "pipeline-tree__empty", children: /* @__PURE__ */ l("div", { className: "loading-indicator", children: [
|
|
966
1541
|
/* @__PURE__ */ s("span", { className: "loading-indicator__spinner", children: "⏳" }),
|
|
967
1542
|
/* @__PURE__ */ s("span", { children: "Loading pipeline..." })
|
|
968
|
-
] }) }) :
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
-
|
|
1543
|
+
] }) }) : r ? /* @__PURE__ */ s("div", { className: "error", children: r }) : a ? /* @__PURE__ */ l("div", { style: { width: "100%", height: "100%", position: "relative" }, children: [
|
|
1544
|
+
/* @__PURE__ */ l(
|
|
1545
|
+
ut,
|
|
971
1546
|
{
|
|
972
|
-
nodes:
|
|
973
|
-
edges:
|
|
974
|
-
onInit: (
|
|
975
|
-
|
|
1547
|
+
nodes: h,
|
|
1548
|
+
edges: f,
|
|
1549
|
+
onInit: (b) => {
|
|
1550
|
+
E.current = b;
|
|
976
1551
|
},
|
|
977
|
-
onNodesChange:
|
|
978
|
-
onEdgesChange:
|
|
1552
|
+
onNodesChange: p,
|
|
1553
|
+
onEdgesChange: N,
|
|
979
1554
|
onNodeClick: K,
|
|
980
|
-
nodeTypes:
|
|
981
|
-
edgeTypes:
|
|
982
|
-
defaultEdgeOptions:
|
|
1555
|
+
nodeTypes: ka,
|
|
1556
|
+
edgeTypes: Ta,
|
|
1557
|
+
defaultEdgeOptions: $a,
|
|
983
1558
|
fitView: !0,
|
|
984
1559
|
fitViewOptions: { padding: 0.2 },
|
|
985
1560
|
minZoom: 0.1,
|
|
@@ -987,521 +1562,434 @@ function qt() {
|
|
|
987
1562
|
proOptions: { hideAttribution: !0 },
|
|
988
1563
|
children: [
|
|
989
1564
|
/* @__PURE__ */ s(
|
|
990
|
-
|
|
1565
|
+
mt,
|
|
991
1566
|
{
|
|
992
|
-
variant:
|
|
1567
|
+
variant: Ft.Dots,
|
|
993
1568
|
color: "var(--border)",
|
|
994
1569
|
gap: 20
|
|
995
1570
|
}
|
|
996
1571
|
),
|
|
997
|
-
/* @__PURE__ */ s(
|
|
1572
|
+
/* @__PURE__ */ s(ht, {})
|
|
998
1573
|
]
|
|
999
1574
|
}
|
|
1000
1575
|
),
|
|
1001
|
-
/* @__PURE__ */
|
|
1576
|
+
/* @__PURE__ */ l("label", { className: "auto-expand-toggle", children: [
|
|
1002
1577
|
/* @__PURE__ */ s(
|
|
1003
1578
|
"input",
|
|
1004
1579
|
{
|
|
1005
1580
|
type: "checkbox",
|
|
1006
|
-
checked:
|
|
1007
|
-
onChange:
|
|
1581
|
+
checked: T,
|
|
1582
|
+
onChange: Me
|
|
1008
1583
|
}
|
|
1009
1584
|
),
|
|
1010
1585
|
/* @__PURE__ */ s("span", { children: "Auto-expand all" })
|
|
1011
1586
|
] })
|
|
1012
1587
|
] }) : /* @__PURE__ */ s("div", { className: "pipeline-tree__empty", children: "Select a pipeline to visualize" });
|
|
1013
1588
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return
|
|
1016
|
-
if (
|
|
1017
|
-
const
|
|
1589
|
+
function xe(e, t, a) {
|
|
1590
|
+
return e.map((o) => {
|
|
1591
|
+
if (o.target !== t) return o;
|
|
1592
|
+
const r = o.data ?? {};
|
|
1018
1593
|
return {
|
|
1019
|
-
...
|
|
1594
|
+
...o,
|
|
1020
1595
|
data: {
|
|
1021
|
-
...
|
|
1596
|
+
...r,
|
|
1022
1597
|
totalParameterCount: a.length,
|
|
1023
1598
|
declaredParameterNames: a
|
|
1024
1599
|
}
|
|
1025
1600
|
};
|
|
1026
1601
|
});
|
|
1027
1602
|
}
|
|
1028
|
-
function
|
|
1029
|
-
if (!
|
|
1030
|
-
return
|
|
1031
|
-
const
|
|
1032
|
-
for (const [
|
|
1033
|
-
if (typeof
|
|
1034
|
-
const { result:
|
|
1035
|
-
parameters:
|
|
1603
|
+
function Ie(e, t, a) {
|
|
1604
|
+
if (!e || !t && !a)
|
|
1605
|
+
return e;
|
|
1606
|
+
const o = {};
|
|
1607
|
+
for (const [r, n] of Object.entries(e))
|
|
1608
|
+
if (typeof n == "string" && me(n)) {
|
|
1609
|
+
const { result: d, isFullyResolved: m } = Dt(n, {
|
|
1610
|
+
parameters: t,
|
|
1036
1611
|
variables: a
|
|
1037
1612
|
});
|
|
1038
|
-
|
|
1039
|
-
} else
|
|
1040
|
-
|
|
1041
|
-
|
|
1613
|
+
o[r] = m ? Ca(d) : n;
|
|
1614
|
+
} else n && typeof n == "object" && !Array.isArray(n) ? o[r] = Ie(
|
|
1615
|
+
n,
|
|
1616
|
+
t,
|
|
1042
1617
|
a
|
|
1043
|
-
) ??
|
|
1044
|
-
return
|
|
1618
|
+
) ?? n : o[r] = n;
|
|
1619
|
+
return o;
|
|
1045
1620
|
}
|
|
1046
|
-
function
|
|
1047
|
-
if (
|
|
1048
|
-
if (
|
|
1049
|
-
if (
|
|
1050
|
-
if (
|
|
1621
|
+
function Ca(e) {
|
|
1622
|
+
if (e === "True" || e === "true") return !0;
|
|
1623
|
+
if (e === "False" || e === "false") return !1;
|
|
1624
|
+
if (e === "null") return null;
|
|
1625
|
+
if (e.startsWith("{") && e.endsWith("}") || e.startsWith("[") && e.endsWith("]"))
|
|
1051
1626
|
try {
|
|
1052
|
-
return JSON.parse(
|
|
1627
|
+
return JSON.parse(e);
|
|
1053
1628
|
} catch {
|
|
1054
1629
|
}
|
|
1055
|
-
return
|
|
1630
|
+
return e;
|
|
1056
1631
|
}
|
|
1057
|
-
function
|
|
1058
|
-
const
|
|
1059
|
-
if (!
|
|
1060
|
-
const a =
|
|
1632
|
+
function nt(e) {
|
|
1633
|
+
const t = e.resources;
|
|
1634
|
+
if (!t) return [];
|
|
1635
|
+
const a = t.repositories;
|
|
1061
1636
|
return Array.isArray(a) ? a.filter(
|
|
1062
|
-
(
|
|
1637
|
+
(o) => o != null && typeof o == "object" && "repository" in o && "name" in o && typeof o.repository == "string" && typeof o.name == "string"
|
|
1063
1638
|
) : [];
|
|
1064
1639
|
}
|
|
1065
|
-
function
|
|
1066
|
-
const
|
|
1067
|
-
for (const a of
|
|
1068
|
-
|
|
1069
|
-
return Array.from(
|
|
1640
|
+
function st(e) {
|
|
1641
|
+
const t = /* @__PURE__ */ new Map();
|
|
1642
|
+
for (const a of e)
|
|
1643
|
+
t.set(a.repository, a);
|
|
1644
|
+
return Array.from(t.values());
|
|
1070
1645
|
}
|
|
1071
|
-
function
|
|
1072
|
-
return `tpl::${
|
|
1646
|
+
function Da(e, t) {
|
|
1647
|
+
return `tpl::${e || "self"}::${t}`;
|
|
1073
1648
|
}
|
|
1074
|
-
function
|
|
1075
|
-
const
|
|
1076
|
-
for (let
|
|
1077
|
-
const
|
|
1078
|
-
let
|
|
1079
|
-
if (
|
|
1080
|
-
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
|
|
1649
|
+
function Ye(e, t, a, o, r, n, d, m, u) {
|
|
1650
|
+
const h = /* @__PURE__ */ new Set(), i = [], p = [];
|
|
1651
|
+
for (let f = 0; f < t.length; f++) {
|
|
1652
|
+
const c = t[f];
|
|
1653
|
+
let N = c.normalizedPath, E = !1, _ = !0, y, w;
|
|
1654
|
+
if (me(c.normalizedPath)) {
|
|
1655
|
+
E = !0, y = c.normalizedPath;
|
|
1656
|
+
const b = $e(
|
|
1657
|
+
c.normalizedPath,
|
|
1658
|
+
d,
|
|
1084
1659
|
void 0,
|
|
1085
|
-
|
|
1660
|
+
u
|
|
1086
1661
|
);
|
|
1087
|
-
|
|
1662
|
+
N = b.resolvedPath, _ = b.isFullyResolved, w = b.unresolved.length ? b.unresolved : void 0;
|
|
1088
1663
|
}
|
|
1089
|
-
let
|
|
1090
|
-
if (
|
|
1091
|
-
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1094
|
-
|
|
1664
|
+
let P = ie(c), F = !1, k = !0;
|
|
1665
|
+
if (P && me(P)) {
|
|
1666
|
+
F = !0;
|
|
1667
|
+
const b = $e(
|
|
1668
|
+
P,
|
|
1669
|
+
d,
|
|
1095
1670
|
void 0,
|
|
1096
|
-
|
|
1671
|
+
u
|
|
1097
1672
|
);
|
|
1098
|
-
|
|
1099
|
-
...
|
|
1100
|
-
...
|
|
1673
|
+
b.isFullyResolved ? P = b.resolvedPath : (k = !1, w = [
|
|
1674
|
+
...w ?? [],
|
|
1675
|
+
...b.unresolved
|
|
1101
1676
|
]);
|
|
1102
1677
|
}
|
|
1103
|
-
const
|
|
1104
|
-
...
|
|
1105
|
-
normalizedPath:
|
|
1106
|
-
repoAlias:
|
|
1107
|
-
sourcePath:
|
|
1108
|
-
}),
|
|
1109
|
-
if (
|
|
1110
|
-
|
|
1111
|
-
const
|
|
1678
|
+
const T = E || F, se = _ && k, { primary: C, fallback: M } = lt({
|
|
1679
|
+
...c,
|
|
1680
|
+
normalizedPath: N,
|
|
1681
|
+
repoAlias: c.repoAlias,
|
|
1682
|
+
sourcePath: c.sourcePath
|
|
1683
|
+
}), G = Da(P, C);
|
|
1684
|
+
if (h.has(G)) continue;
|
|
1685
|
+
h.add(G);
|
|
1686
|
+
const fe = m == null ? void 0 : m.has(G);
|
|
1112
1687
|
let K;
|
|
1113
|
-
if (
|
|
1688
|
+
if (c.conditional && c.conditionExpression)
|
|
1114
1689
|
try {
|
|
1115
|
-
const
|
|
1116
|
-
parameters:
|
|
1117
|
-
variables:
|
|
1690
|
+
const b = St(c.conditionExpression, {
|
|
1691
|
+
parameters: d,
|
|
1692
|
+
variables: u
|
|
1118
1693
|
});
|
|
1119
|
-
typeof
|
|
1694
|
+
typeof b == "boolean" ? K = b : b === void 0 || b === c.conditionExpression ? K = "unknown" : K = !!b;
|
|
1120
1695
|
} catch {
|
|
1121
1696
|
K = "unknown";
|
|
1122
1697
|
}
|
|
1123
|
-
else
|
|
1698
|
+
else c.conditional && (K = "unknown");
|
|
1124
1699
|
if (K === !1) continue;
|
|
1125
|
-
if (!
|
|
1126
|
-
const
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1700
|
+
if (!fe) {
|
|
1701
|
+
const b = N.length > 40 ? `...${N.slice(-37)}` : N, { repoInfo: g, adoUrl: v } = bt(
|
|
1702
|
+
c,
|
|
1703
|
+
P,
|
|
1704
|
+
C,
|
|
1130
1705
|
a,
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
),
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
),
|
|
1139
|
-
...
|
|
1140
|
-
repoAlias:
|
|
1141
|
-
contextRepoAlias:
|
|
1142
|
-
parameters:
|
|
1143
|
-
} :
|
|
1144
|
-
|
|
1145
|
-
id:
|
|
1706
|
+
o,
|
|
1707
|
+
r,
|
|
1708
|
+
n
|
|
1709
|
+
), x = Ie(
|
|
1710
|
+
c.parameters,
|
|
1711
|
+
d,
|
|
1712
|
+
u
|
|
1713
|
+
), $ = P !== ie(c) || x !== c.parameters ? {
|
|
1714
|
+
...c,
|
|
1715
|
+
repoAlias: P || c.repoAlias,
|
|
1716
|
+
contextRepoAlias: P || c.contextRepoAlias,
|
|
1717
|
+
parameters: x
|
|
1718
|
+
} : c;
|
|
1719
|
+
i.push({
|
|
1720
|
+
id: G,
|
|
1146
1721
|
type: "fileNode",
|
|
1147
1722
|
position: { x: 0, y: 0 },
|
|
1148
1723
|
data: {
|
|
1149
|
-
label:
|
|
1150
|
-
filePath:
|
|
1151
|
-
repoAlias:
|
|
1724
|
+
label: b,
|
|
1725
|
+
filePath: C,
|
|
1726
|
+
repoAlias: P,
|
|
1152
1727
|
templateCount: 0,
|
|
1153
1728
|
status: "collapsed",
|
|
1154
1729
|
isRoot: !1,
|
|
1155
|
-
baseDir:
|
|
1156
|
-
adoUrl:
|
|
1157
|
-
repoInfo:
|
|
1158
|
-
templateLocation:
|
|
1730
|
+
baseDir: Le(C),
|
|
1731
|
+
adoUrl: v,
|
|
1732
|
+
repoInfo: g,
|
|
1733
|
+
templateLocation: c.location,
|
|
1159
1734
|
// Dynamic path info for auto-expand to skip unresolved expression paths
|
|
1160
|
-
dynamicPath:
|
|
1161
|
-
expressionResolved:
|
|
1735
|
+
dynamicPath: T || void 0,
|
|
1736
|
+
expressionResolved: T ? se : void 0,
|
|
1162
1737
|
// Stash the resolved ref for expansion (with resolved repo alias + params)
|
|
1163
|
-
_ref:
|
|
1738
|
+
_ref: $,
|
|
1164
1739
|
// Stash fallback path for fetch retry (repo-root-relative)
|
|
1165
|
-
_fallbackPath:
|
|
1740
|
+
_fallbackPath: M,
|
|
1166
1741
|
// Stash the parent's parameter context so it can flow down during expansion
|
|
1167
|
-
_parentParamContext:
|
|
1742
|
+
_parentParamContext: d,
|
|
1168
1743
|
// Stash accumulated resources (root + all ancestor template resources)
|
|
1169
|
-
_accumulatedResources:
|
|
1744
|
+
_accumulatedResources: n,
|
|
1170
1745
|
// Stash accumulated variables for expression resolution in descendants
|
|
1171
|
-
_accumulatedVariables:
|
|
1746
|
+
_accumulatedVariables: u,
|
|
1172
1747
|
// Condition evaluation result for conditional refs
|
|
1173
1748
|
// true = expand, false = skip, 'unknown' = expand when autoExpandAll
|
|
1174
1749
|
_conditionResult: K
|
|
1175
1750
|
}
|
|
1176
1751
|
});
|
|
1177
1752
|
}
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1180
|
-
id: `${
|
|
1181
|
-
source:
|
|
1182
|
-
target:
|
|
1753
|
+
const Me = c.location === "extends" ? "extends" : c.location === "extends-parameters" ? "extends param" : c.location, le = !!P, be = c.parameters ? Object.keys(c.parameters) : void 0;
|
|
1754
|
+
p.push({
|
|
1755
|
+
id: `${e}->${G}`,
|
|
1756
|
+
source: e,
|
|
1757
|
+
target: G,
|
|
1183
1758
|
type: "templateEdge",
|
|
1184
1759
|
data: {
|
|
1185
|
-
edgeLabel:
|
|
1186
|
-
parameterNames:
|
|
1760
|
+
edgeLabel: Me,
|
|
1761
|
+
parameterNames: be,
|
|
1187
1762
|
isExternal: le || void 0,
|
|
1188
|
-
conditional:
|
|
1189
|
-
conditionExpression:
|
|
1763
|
+
conditional: c.conditional || void 0,
|
|
1764
|
+
conditionExpression: c.conditionExpression,
|
|
1190
1765
|
conditionResult: K,
|
|
1191
|
-
dynamicPath:
|
|
1192
|
-
expressionResolved:
|
|
1193
|
-
originalPath:
|
|
1194
|
-
resolvedPath:
|
|
1195
|
-
unresolvedExpressions:
|
|
1766
|
+
dynamicPath: T || void 0,
|
|
1767
|
+
expressionResolved: T ? se : void 0,
|
|
1768
|
+
originalPath: y || (F ? c.rawPath : void 0),
|
|
1769
|
+
resolvedPath: T ? C : void 0,
|
|
1770
|
+
unresolvedExpressions: w
|
|
1196
1771
|
},
|
|
1197
1772
|
style: le ? {
|
|
1198
1773
|
stroke: "var(--badge-resources)",
|
|
1199
1774
|
strokeWidth: 2,
|
|
1200
1775
|
strokeDasharray: "6 3"
|
|
1201
1776
|
} : void 0,
|
|
1202
|
-
markerEnd: le ? { type:
|
|
1777
|
+
markerEnd: le ? { type: Ae.ArrowClosed, color: "var(--badge-resources)" } : void 0
|
|
1203
1778
|
});
|
|
1204
1779
|
}
|
|
1205
|
-
return { templateNodes:
|
|
1780
|
+
return { templateNodes: i, templateEdges: p };
|
|
1206
1781
|
}
|
|
1207
|
-
async function
|
|
1208
|
-
const
|
|
1209
|
-
if (!
|
|
1210
|
-
const
|
|
1211
|
-
if (
|
|
1212
|
-
if (
|
|
1213
|
-
const
|
|
1214
|
-
if (
|
|
1215
|
-
return { content:
|
|
1782
|
+
async function Je(e, t, a, o, r, n, d, m) {
|
|
1783
|
+
const u = o._ref;
|
|
1784
|
+
if (!u) throw new Error("No template reference on this node");
|
|
1785
|
+
const h = o.filePath, i = o._fallbackPath, p = ie(u), f = `${p || ""}:${h}`, c = n.get(f);
|
|
1786
|
+
if (c) return { content: c, actualPath: h };
|
|
1787
|
+
if (i) {
|
|
1788
|
+
const k = `${p || ""}:${i}`, T = n.get(k);
|
|
1789
|
+
if (T)
|
|
1790
|
+
return { content: T, actualPath: i };
|
|
1216
1791
|
}
|
|
1217
|
-
const
|
|
1218
|
-
let
|
|
1219
|
-
if (
|
|
1220
|
-
const
|
|
1221
|
-
|
|
1222
|
-
} else
|
|
1223
|
-
let
|
|
1792
|
+
const E = o._accumulatedResources ?? r;
|
|
1793
|
+
let _ = t, y = a, w;
|
|
1794
|
+
if (p && E.length) {
|
|
1795
|
+
const k = ct(p, E);
|
|
1796
|
+
k ? (_ = k.project || t, y = k.repoName, w = k.ref) : y = p;
|
|
1797
|
+
} else p && (y = p);
|
|
1798
|
+
let P, F = h;
|
|
1224
1799
|
try {
|
|
1225
|
-
|
|
1226
|
-
|
|
1800
|
+
P = await m(
|
|
1801
|
+
e,
|
|
1802
|
+
_,
|
|
1803
|
+
y,
|
|
1227
1804
|
h,
|
|
1228
|
-
|
|
1229
|
-
d,
|
|
1230
|
-
b
|
|
1805
|
+
w
|
|
1231
1806
|
);
|
|
1232
|
-
} catch (
|
|
1233
|
-
if (
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
),
|
|
1807
|
+
} catch (k) {
|
|
1808
|
+
if (i)
|
|
1809
|
+
P = await m(
|
|
1810
|
+
e,
|
|
1811
|
+
_,
|
|
1812
|
+
y,
|
|
1813
|
+
i,
|
|
1814
|
+
w
|
|
1815
|
+
), F = i;
|
|
1241
1816
|
else
|
|
1242
|
-
throw
|
|
1817
|
+
throw k;
|
|
1243
1818
|
}
|
|
1244
|
-
return
|
|
1819
|
+
return d(`${p || ""}:${F}`, P.content), { content: P.content, actualPath: F };
|
|
1245
1820
|
}
|
|
1246
|
-
function
|
|
1247
|
-
const
|
|
1248
|
-
return a > 0 ?
|
|
1821
|
+
function Le(e) {
|
|
1822
|
+
const t = e.replace(/\\/g, "/"), a = t.lastIndexOf("/");
|
|
1823
|
+
return a > 0 ? t.slice(0, a) : "";
|
|
1249
1824
|
}
|
|
1250
|
-
function
|
|
1251
|
-
let
|
|
1252
|
-
if (
|
|
1253
|
-
const
|
|
1254
|
-
(
|
|
1825
|
+
function bt(e, t, a, o, r, n, d) {
|
|
1826
|
+
let m = r, u = n, h, i;
|
|
1827
|
+
if (t && d.length) {
|
|
1828
|
+
const f = ct(t, d), c = d.find(
|
|
1829
|
+
(N) => N.repository === t
|
|
1255
1830
|
);
|
|
1256
|
-
|
|
1257
|
-
alias:
|
|
1258
|
-
fullName:
|
|
1259
|
-
type:
|
|
1260
|
-
ref:
|
|
1261
|
-
project:
|
|
1831
|
+
f ? (m = f.project || r, u = f.repoName, h = f.ref) : u = t, c && (i = {
|
|
1832
|
+
alias: t,
|
|
1833
|
+
fullName: c.name,
|
|
1834
|
+
type: c.type,
|
|
1835
|
+
ref: c.ref,
|
|
1836
|
+
project: f == null ? void 0 : f.project
|
|
1262
1837
|
});
|
|
1263
|
-
} else
|
|
1264
|
-
const
|
|
1265
|
-
org:
|
|
1266
|
-
project:
|
|
1267
|
-
repoName:
|
|
1838
|
+
} else t && (u = t);
|
|
1839
|
+
const p = o && m && u ? it({
|
|
1840
|
+
org: o,
|
|
1841
|
+
project: m,
|
|
1842
|
+
repoName: u,
|
|
1268
1843
|
filePath: a,
|
|
1269
|
-
ref:
|
|
1844
|
+
ref: h
|
|
1270
1845
|
}) : void 0;
|
|
1271
|
-
return { repoInfo:
|
|
1846
|
+
return { repoInfo: i, adoUrl: p };
|
|
1272
1847
|
}
|
|
1273
|
-
function
|
|
1274
|
-
const
|
|
1275
|
-
if (!
|
|
1276
|
-
const
|
|
1277
|
-
let
|
|
1278
|
-
if (
|
|
1279
|
-
|
|
1280
|
-
const
|
|
1281
|
-
|
|
1282
|
-
|
|
1848
|
+
function ke(e, t, a, o, r, n) {
|
|
1849
|
+
const d = e.data, u = { ...d._accumulatedVariables ?? {}, ...t }, h = d._ref;
|
|
1850
|
+
if (!h) return e;
|
|
1851
|
+
const i = d._parentParamContext;
|
|
1852
|
+
let p = h.normalizedPath, f = !1, c = !0, N = ie(h);
|
|
1853
|
+
if (me(h.normalizedPath)) {
|
|
1854
|
+
f = !0;
|
|
1855
|
+
const k = $e(
|
|
1856
|
+
h.normalizedPath,
|
|
1857
|
+
i,
|
|
1283
1858
|
void 0,
|
|
1284
|
-
|
|
1859
|
+
u
|
|
1285
1860
|
);
|
|
1286
|
-
if (
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1861
|
+
if (p = k.resolvedPath, c = k.isFullyResolved, c && !me(p)) {
|
|
1862
|
+
const T = Ct(p);
|
|
1863
|
+
p = T.normalizedPath, T.repoAlias && (N = T.repoAlias);
|
|
1289
1864
|
}
|
|
1290
1865
|
}
|
|
1291
|
-
if (
|
|
1292
|
-
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1295
|
-
|
|
1866
|
+
if (N && me(N)) {
|
|
1867
|
+
f = !0;
|
|
1868
|
+
const k = $e(
|
|
1869
|
+
N,
|
|
1870
|
+
i,
|
|
1296
1871
|
void 0,
|
|
1297
|
-
|
|
1872
|
+
u
|
|
1298
1873
|
);
|
|
1299
|
-
|
|
1874
|
+
k.isFullyResolved ? N = k.resolvedPath : c = !1;
|
|
1300
1875
|
}
|
|
1301
|
-
const
|
|
1302
|
-
...
|
|
1303
|
-
normalizedPath:
|
|
1304
|
-
repoAlias:
|
|
1305
|
-
contextRepoAlias:
|
|
1306
|
-
}, { primary:
|
|
1307
|
-
...
|
|
1308
|
-
normalizedPath:
|
|
1309
|
-
repoAlias:
|
|
1310
|
-
sourcePath:
|
|
1311
|
-
}),
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1876
|
+
const E = {
|
|
1877
|
+
...h,
|
|
1878
|
+
normalizedPath: p,
|
|
1879
|
+
repoAlias: N || h.repoAlias,
|
|
1880
|
+
contextRepoAlias: N || h.contextRepoAlias
|
|
1881
|
+
}, { primary: _, fallback: y } = lt({
|
|
1882
|
+
...E,
|
|
1883
|
+
normalizedPath: p,
|
|
1884
|
+
repoAlias: E.repoAlias,
|
|
1885
|
+
sourcePath: h.sourcePath
|
|
1886
|
+
}), w = p.length > 40 ? `...${p.slice(-37)}` : p, { repoInfo: P, adoUrl: F } = a && o && r && n ? bt(
|
|
1887
|
+
E,
|
|
1888
|
+
N,
|
|
1889
|
+
_,
|
|
1315
1890
|
a,
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1891
|
+
o,
|
|
1892
|
+
r,
|
|
1893
|
+
n
|
|
1319
1894
|
) : { repoInfo: void 0, adoUrl: void 0 };
|
|
1320
1895
|
return {
|
|
1321
|
-
...
|
|
1896
|
+
...e,
|
|
1322
1897
|
data: {
|
|
1323
|
-
...
|
|
1324
|
-
label:
|
|
1325
|
-
filePath:
|
|
1326
|
-
repoAlias:
|
|
1327
|
-
baseDir:
|
|
1328
|
-
dynamicPath:
|
|
1329
|
-
expressionResolved:
|
|
1330
|
-
adoUrl:
|
|
1331
|
-
repoInfo:
|
|
1332
|
-
_ref:
|
|
1333
|
-
_accumulatedVariables:
|
|
1334
|
-
_fallbackPath:
|
|
1898
|
+
...e.data,
|
|
1899
|
+
label: w,
|
|
1900
|
+
filePath: _,
|
|
1901
|
+
repoAlias: N,
|
|
1902
|
+
baseDir: Le(_),
|
|
1903
|
+
dynamicPath: f || void 0,
|
|
1904
|
+
expressionResolved: f ? c : void 0,
|
|
1905
|
+
adoUrl: F || e.data.adoUrl,
|
|
1906
|
+
repoInfo: P || e.data.repoInfo,
|
|
1907
|
+
_ref: E,
|
|
1908
|
+
_accumulatedVariables: u,
|
|
1909
|
+
_fallbackPath: y
|
|
1335
1910
|
}
|
|
1336
1911
|
};
|
|
1337
1912
|
}
|
|
1338
|
-
|
|
1339
|
-
function Be(t, e) {
|
|
1340
|
-
return `https://dev.azure.com/${encodeURIComponent(t)}/${encodeURIComponent(e)}/_apis`;
|
|
1341
|
-
}
|
|
1342
|
-
function Qt(t) {
|
|
1343
|
-
return t.startsWith("refs/heads/") ? { version: t.slice(11), versionType: "branch" } : t.startsWith("refs/tags/") ? { version: t.slice(10), versionType: "tag" } : /^[0-9a-f]{40}$/i.test(t) ? { version: t, versionType: "commit" } : { version: t, versionType: "branch" };
|
|
1344
|
-
}
|
|
1345
|
-
async function We(t) {
|
|
1346
|
-
const e = await fetch(t, { credentials: "include" });
|
|
1347
|
-
if (!e.ok) {
|
|
1348
|
-
const a = await e.text();
|
|
1349
|
-
throw new Error(`ADO API error (${e.status}): ${a}`);
|
|
1350
|
-
}
|
|
1351
|
-
return e;
|
|
1352
|
-
}
|
|
1353
|
-
async function it(t, e, a, n, l) {
|
|
1354
|
-
const o = n.startsWith("/") ? n : `/${n}`, m = Nt(o);
|
|
1355
|
-
let P = `${Be(t, e)}/git/repositories/${encodeURIComponent(a)}/items?path=${encodeURIComponent(m)}&api-version=${Me}&includeContent=true&$format=text`;
|
|
1356
|
-
if (l) {
|
|
1357
|
-
const d = Qt(l);
|
|
1358
|
-
P += `&versionDescriptor.version=${encodeURIComponent(d.version)}&versionDescriptor.versionType=${d.versionType}`;
|
|
1359
|
-
}
|
|
1360
|
-
return (await We(P)).text();
|
|
1361
|
-
}
|
|
1362
|
-
async function ea(t, e) {
|
|
1363
|
-
const a = `${Be(t, e)}/pipelines?api-version=${Me}`;
|
|
1364
|
-
return (await (await We(a)).json()).value;
|
|
1365
|
-
}
|
|
1366
|
-
async function ta(t, e, a) {
|
|
1367
|
-
var v, d, r, y, g;
|
|
1368
|
-
const n = `${Be(t, e)}/build/definitions/${a}?api-version=${Me}`, o = await (await We(n)).json(), m = {
|
|
1369
|
-
id: o.id,
|
|
1370
|
-
name: o.name,
|
|
1371
|
-
path: ((v = o.process) == null ? void 0 : v.yamlFilename) ?? o.path,
|
|
1372
|
-
repository: {
|
|
1373
|
-
id: (d = o.repository) == null ? void 0 : d.id,
|
|
1374
|
-
name: (r = o.repository) == null ? void 0 : r.name,
|
|
1375
|
-
type: (y = o.repository) == null ? void 0 : y.type,
|
|
1376
|
-
defaultBranch: (g = o.repository) == null ? void 0 : g.defaultBranch
|
|
1377
|
-
}
|
|
1378
|
-
}, P = await it(
|
|
1379
|
-
t,
|
|
1380
|
-
e,
|
|
1381
|
-
m.repository.id,
|
|
1382
|
-
m.path,
|
|
1383
|
-
m.repository.defaultBranch
|
|
1384
|
-
);
|
|
1385
|
-
return { definition: m, yaml: P };
|
|
1386
|
-
}
|
|
1387
|
-
async function aa(t, e, a, n, l) {
|
|
1388
|
-
return { content: await it(t, e, a, n, l), path: n, repoId: a, repoName: a, branch: l || "" };
|
|
1389
|
-
}
|
|
1390
|
-
async function na() {
|
|
1391
|
-
return { customTaskDocs: {} };
|
|
1392
|
-
}
|
|
1393
|
-
async function sa(t) {
|
|
1394
|
-
return { tasks: [], cached: !1 };
|
|
1395
|
-
}
|
|
1396
|
-
const oa = "/api";
|
|
1397
|
-
var Qe;
|
|
1398
|
-
const ge = typeof window < "u" && ((Qe = window.location) == null ? void 0 : Qe.protocol) === "chrome-extension:";
|
|
1399
|
-
async function _e(t) {
|
|
1400
|
-
const e = await fetch(`${oa}${t}`);
|
|
1401
|
-
if (!e.ok) {
|
|
1402
|
-
const a = await e.text();
|
|
1403
|
-
throw new Error(`API error (${e.status}): ${a}`);
|
|
1404
|
-
}
|
|
1405
|
-
return e.json();
|
|
1406
|
-
}
|
|
1407
|
-
function wa(t, e) {
|
|
1408
|
-
return ge ? ea(t, e) : _e(`/${t}/${e}/pipelines`);
|
|
1409
|
-
}
|
|
1410
|
-
function ra(t, e, a) {
|
|
1411
|
-
return ge ? ta(t, e, a) : _e(`/${t}/${e}/pipelines/${a}/yaml`);
|
|
1412
|
-
}
|
|
1413
|
-
function ct(t, e, a, n, l) {
|
|
1414
|
-
if (ge)
|
|
1415
|
-
return aa(t, e, a, n, l);
|
|
1416
|
-
const o = new URLSearchParams({ repo: a, path: n });
|
|
1417
|
-
return l && o.set("branch", l), _e(`/${t}/${e}/file-by-repo-name?${o}`);
|
|
1418
|
-
}
|
|
1419
|
-
function la() {
|
|
1420
|
-
return ge ? na() : _e("/config/task-docs");
|
|
1421
|
-
}
|
|
1422
|
-
function ia(t) {
|
|
1423
|
-
return ge ? sa() : _e(`/${t}/schema/tasks`);
|
|
1424
|
-
}
|
|
1425
|
-
function ca(t) {
|
|
1913
|
+
function Aa(e) {
|
|
1426
1914
|
const {
|
|
1427
|
-
setConnection:
|
|
1915
|
+
setConnection: t,
|
|
1428
1916
|
setSelectedPipeline: a,
|
|
1429
|
-
setSelectedPipelineLoading:
|
|
1430
|
-
setSelectedPipelineError:
|
|
1431
|
-
} =
|
|
1432
|
-
|
|
1433
|
-
if (
|
|
1434
|
-
|
|
1435
|
-
const
|
|
1436
|
-
if (
|
|
1437
|
-
|
|
1438
|
-
else if (
|
|
1439
|
-
const
|
|
1440
|
-
|
|
1441
|
-
} else
|
|
1917
|
+
setSelectedPipelineLoading: o,
|
|
1918
|
+
setSelectedPipelineError: r
|
|
1919
|
+
} = Ve(), [n, d] = L(""), [m, u] = L(null), [h, i] = L(!1), p = Q(!1);
|
|
1920
|
+
ee(() => {
|
|
1921
|
+
if (p.current) return;
|
|
1922
|
+
p.current = !0;
|
|
1923
|
+
const _ = new URLSearchParams(window.location.search), y = e.fileUrl || _.get("url"), w = e.org || _.get("org"), P = e.project || _.get("project"), F = e.repo || _.get("repo"), k = e.path || _.get("path"), T = e.branch || _.get("branch") || void 0, se = e.pipelineId ?? (_.get("pipelineId") ? Number(_.get("pipelineId")) : null);
|
|
1924
|
+
if (y)
|
|
1925
|
+
d(y), f(y);
|
|
1926
|
+
else if (w && P && F && k) {
|
|
1927
|
+
const C = `https://dev.azure.com/${w}/${P}/_git/${F}?path=${k}${T ? `&version=GB${T}` : ""}`;
|
|
1928
|
+
d(C), f(C);
|
|
1929
|
+
} else w && P && se != null && c(w, P, se);
|
|
1442
1930
|
}, []);
|
|
1443
|
-
const
|
|
1444
|
-
const
|
|
1445
|
-
if (!
|
|
1446
|
-
|
|
1931
|
+
const f = async (_) => {
|
|
1932
|
+
const y = At(_);
|
|
1933
|
+
if (!y) {
|
|
1934
|
+
u("Invalid Azure DevOps URL");
|
|
1447
1935
|
return;
|
|
1448
1936
|
}
|
|
1449
|
-
|
|
1937
|
+
t(y.org, y.project), o(!0), r(null), i(!0);
|
|
1450
1938
|
try {
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1939
|
+
const w = await _t(
|
|
1940
|
+
y.org,
|
|
1941
|
+
y.project,
|
|
1942
|
+
y.repoName,
|
|
1943
|
+
y.filePath,
|
|
1944
|
+
y.branch
|
|
1457
1945
|
);
|
|
1458
1946
|
a({
|
|
1459
1947
|
definition: {
|
|
1460
1948
|
id: 0,
|
|
1461
|
-
name:
|
|
1462
|
-
path:
|
|
1949
|
+
name: y.filePath.split("/").pop() || y.filePath,
|
|
1950
|
+
path: y.filePath,
|
|
1463
1951
|
repository: {
|
|
1464
|
-
id:
|
|
1465
|
-
name:
|
|
1952
|
+
id: w.repoId,
|
|
1953
|
+
name: w.repoName,
|
|
1466
1954
|
type: "git",
|
|
1467
|
-
defaultBranch:
|
|
1955
|
+
defaultBranch: w.branch || ""
|
|
1468
1956
|
}
|
|
1469
1957
|
},
|
|
1470
|
-
yaml:
|
|
1958
|
+
yaml: w.content
|
|
1471
1959
|
});
|
|
1472
|
-
} catch (
|
|
1473
|
-
|
|
1474
|
-
|
|
1960
|
+
} catch (w) {
|
|
1961
|
+
r(
|
|
1962
|
+
w instanceof Error ? w.message : String(w)
|
|
1475
1963
|
);
|
|
1476
1964
|
} finally {
|
|
1477
|
-
|
|
1965
|
+
o(!1), i(!1);
|
|
1478
1966
|
}
|
|
1479
|
-
},
|
|
1480
|
-
|
|
1967
|
+
}, c = async (_, y, w) => {
|
|
1968
|
+
t(_, y), o(!0), r(null);
|
|
1481
1969
|
try {
|
|
1482
|
-
const
|
|
1483
|
-
a(
|
|
1484
|
-
} catch (
|
|
1485
|
-
|
|
1486
|
-
|
|
1970
|
+
const P = await qt(_, y, w);
|
|
1971
|
+
a(P);
|
|
1972
|
+
} catch (P) {
|
|
1973
|
+
r(
|
|
1974
|
+
P instanceof Error ? P.message : String(P)
|
|
1487
1975
|
);
|
|
1488
1976
|
} finally {
|
|
1489
|
-
|
|
1977
|
+
o(!1);
|
|
1490
1978
|
}
|
|
1491
|
-
},
|
|
1492
|
-
|
|
1979
|
+
}, N = async () => {
|
|
1980
|
+
n.trim() && (u(null), await f(n.trim()));
|
|
1493
1981
|
};
|
|
1494
|
-
return /* @__PURE__ */
|
|
1982
|
+
return /* @__PURE__ */ l("div", { className: "pipeline-url-bar", children: [
|
|
1495
1983
|
/* @__PURE__ */ s(
|
|
1496
1984
|
"input",
|
|
1497
1985
|
{
|
|
1498
1986
|
type: "text",
|
|
1499
1987
|
className: "pipeline-url-bar__input",
|
|
1500
1988
|
placeholder: "https://dev.azure.com/{org}/{project}/_git/{repo}?path=/{pipeline}.yml",
|
|
1501
|
-
value:
|
|
1502
|
-
onChange: (
|
|
1503
|
-
onKeyDown: (
|
|
1504
|
-
|
|
1989
|
+
value: n,
|
|
1990
|
+
onChange: (_) => d(_.target.value),
|
|
1991
|
+
onKeyDown: (_) => {
|
|
1992
|
+
_.key === "Enter" && (_.preventDefault(), N());
|
|
1505
1993
|
}
|
|
1506
1994
|
}
|
|
1507
1995
|
),
|
|
@@ -1509,104 +1997,136 @@ function ca(t) {
|
|
|
1509
1997
|
"button",
|
|
1510
1998
|
{
|
|
1511
1999
|
className: "pipeline-url-bar__btn",
|
|
1512
|
-
onClick:
|
|
1513
|
-
disabled: !
|
|
1514
|
-
children:
|
|
2000
|
+
onClick: N,
|
|
2001
|
+
disabled: !n.trim() || h,
|
|
2002
|
+
children: h ? "⏳ Loading..." : "Load"
|
|
1515
2003
|
}
|
|
1516
2004
|
),
|
|
1517
|
-
|
|
2005
|
+
m && /* @__PURE__ */ s("div", { className: "pipeline-url-bar__error", children: m })
|
|
1518
2006
|
] });
|
|
1519
2007
|
}
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
2008
|
+
function Ia() {
|
|
2009
|
+
const e = () => window.location.hash.startsWith("#/commit-flow") ? "commit-flow" : "pipeline", [t, a] = L(e);
|
|
2010
|
+
return ee(() => {
|
|
2011
|
+
const r = () => a(e());
|
|
2012
|
+
return window.addEventListener("hashchange", r), () => window.removeEventListener("hashchange", r);
|
|
2013
|
+
}, []), [t, (r) => {
|
|
2014
|
+
window.location.hash = r === "pipeline" ? "#/" : `#/${r}`;
|
|
2015
|
+
}];
|
|
2016
|
+
}
|
|
2017
|
+
const La = 280, Ba = 900, Fa = 420;
|
|
2018
|
+
function Ua(e) {
|
|
2019
|
+
const { setCustomTaskDocs: t, setTaskSchema: a, selectedNodeDetail: o, org: r } = Ve(), [n, d] = L(Fa), m = Q(!1), [u, h] = Ia();
|
|
2020
|
+
ee(() => {
|
|
2021
|
+
Yt().then((p) => t(p.customTaskDocs)).catch(() => {
|
|
1525
2022
|
});
|
|
1526
|
-
}, [
|
|
1527
|
-
|
|
2023
|
+
}, [t]), ee(() => {
|
|
2024
|
+
r && Jt(r).then((p) => a(p.tasks)).catch(() => {
|
|
1528
2025
|
});
|
|
1529
|
-
}, [
|
|
1530
|
-
const
|
|
1531
|
-
(
|
|
1532
|
-
|
|
1533
|
-
const
|
|
2026
|
+
}, [r, a]);
|
|
2027
|
+
const i = ne(
|
|
2028
|
+
(p) => {
|
|
2029
|
+
p.preventDefault(), m.current = !0;
|
|
2030
|
+
const f = p.clientX, c = n;
|
|
1534
2031
|
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
1535
|
-
const
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1538
|
-
Math.max(
|
|
2032
|
+
const N = (_) => {
|
|
2033
|
+
const y = f - _.clientX, w = Math.min(
|
|
2034
|
+
Ba,
|
|
2035
|
+
Math.max(La, c + y)
|
|
1539
2036
|
);
|
|
1540
|
-
|
|
1541
|
-
},
|
|
1542
|
-
|
|
2037
|
+
d(w);
|
|
2038
|
+
}, E = () => {
|
|
2039
|
+
m.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "", window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", E);
|
|
1543
2040
|
};
|
|
1544
|
-
window.addEventListener("mousemove",
|
|
2041
|
+
window.addEventListener("mousemove", N), window.addEventListener("mouseup", E);
|
|
1545
2042
|
},
|
|
1546
|
-
[
|
|
2043
|
+
[n]
|
|
1547
2044
|
);
|
|
1548
|
-
return /* @__PURE__ */ s(
|
|
1549
|
-
/* @__PURE__ */
|
|
2045
|
+
return /* @__PURE__ */ s(va, { value: _t, children: /* @__PURE__ */ l("div", { className: "app", children: [
|
|
2046
|
+
/* @__PURE__ */ l("header", { className: "app__header", children: [
|
|
1550
2047
|
/* @__PURE__ */ s("h1", { children: "🔧 Azure Pipelines Visualizer" }),
|
|
1551
|
-
/* @__PURE__ */
|
|
1552
|
-
] }),
|
|
1553
|
-
/* @__PURE__ */ c("main", { className: "app__main", children: [
|
|
1554
|
-
/* @__PURE__ */ s("section", { className: "app__content", children: /* @__PURE__ */ s(Ie, { children: /* @__PURE__ */ s(qt, {}) }) }),
|
|
1555
|
-
n && /* @__PURE__ */ c(et, { children: [
|
|
2048
|
+
/* @__PURE__ */ l("nav", { className: "app__nav", children: [
|
|
1556
2049
|
/* @__PURE__ */ s(
|
|
1557
|
-
"
|
|
2050
|
+
"button",
|
|
1558
2051
|
{
|
|
1559
|
-
className: "
|
|
1560
|
-
|
|
1561
|
-
|
|
2052
|
+
className: `app__nav-btn ${u === "pipeline" ? "app__nav-btn--active" : ""}`,
|
|
2053
|
+
onClick: () => h("pipeline"),
|
|
2054
|
+
type: "button",
|
|
2055
|
+
children: "Pipeline Templates"
|
|
1562
2056
|
}
|
|
1563
2057
|
),
|
|
1564
|
-
/* @__PURE__ */ s(
|
|
1565
|
-
|
|
2058
|
+
/* @__PURE__ */ s(
|
|
2059
|
+
"button",
|
|
2060
|
+
{
|
|
2061
|
+
className: `app__nav-btn ${u === "commit-flow" ? "app__nav-btn--active" : ""}`,
|
|
2062
|
+
onClick: () => h("commit-flow"),
|
|
2063
|
+
type: "button",
|
|
2064
|
+
children: "Commit Flow"
|
|
2065
|
+
}
|
|
2066
|
+
)
|
|
2067
|
+
] }),
|
|
2068
|
+
u === "pipeline" && /* @__PURE__ */ s(Re, { children: /* @__PURE__ */ s(Aa, { ...e }) })
|
|
2069
|
+
] }),
|
|
2070
|
+
/* @__PURE__ */ l("main", { className: "app__main", children: [
|
|
2071
|
+
u === "pipeline" && /* @__PURE__ */ l(Xe, { children: [
|
|
2072
|
+
/* @__PURE__ */ s("section", { className: "app__content", children: /* @__PURE__ */ s(Re, { children: /* @__PURE__ */ s(Sa, {}) }) }),
|
|
2073
|
+
o && /* @__PURE__ */ l(Xe, { children: [
|
|
2074
|
+
/* @__PURE__ */ s(
|
|
2075
|
+
"div",
|
|
2076
|
+
{
|
|
2077
|
+
className: "app__detail-resize-handle",
|
|
2078
|
+
onMouseDown: i,
|
|
2079
|
+
title: "Drag to resize"
|
|
2080
|
+
}
|
|
2081
|
+
),
|
|
2082
|
+
/* @__PURE__ */ s("aside", { className: "app__detail", style: { width: n }, children: /* @__PURE__ */ s(Re, { children: /* @__PURE__ */ s(ga, {}) }) })
|
|
2083
|
+
] })
|
|
2084
|
+
] }),
|
|
2085
|
+
u === "commit-flow" && /* @__PURE__ */ s("section", { className: "app__content", children: /* @__PURE__ */ s(Re, { children: /* @__PURE__ */ s(ma, {}) }) })
|
|
1566
2086
|
] })
|
|
1567
2087
|
] }) });
|
|
1568
2088
|
}
|
|
1569
|
-
var
|
|
2089
|
+
var Ze, Te = Mt;
|
|
1570
2090
|
if (process.env.NODE_ENV === "production")
|
|
1571
|
-
|
|
2091
|
+
Ze = Te.createRoot, Te.hydrateRoot;
|
|
1572
2092
|
else {
|
|
1573
|
-
var
|
|
1574
|
-
|
|
1575
|
-
|
|
2093
|
+
var ot = Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
2094
|
+
Ze = function(e, t) {
|
|
2095
|
+
ot.usingClientEntryPoint = !0;
|
|
1576
2096
|
try {
|
|
1577
|
-
return
|
|
2097
|
+
return Te.createRoot(e, t);
|
|
1578
2098
|
} finally {
|
|
1579
|
-
|
|
2099
|
+
ot.usingClientEntryPoint = !1;
|
|
1580
2100
|
}
|
|
1581
2101
|
};
|
|
1582
2102
|
}
|
|
1583
|
-
function
|
|
1584
|
-
let a = { ...
|
|
1585
|
-
const
|
|
1586
|
-
function
|
|
1587
|
-
|
|
2103
|
+
function Ya(e, t = {}) {
|
|
2104
|
+
let a = { ...t };
|
|
2105
|
+
const o = Ze(e);
|
|
2106
|
+
function r(n) {
|
|
2107
|
+
o.render(Rt(Ua, n));
|
|
1588
2108
|
}
|
|
1589
|
-
return
|
|
1590
|
-
unmount: () =>
|
|
1591
|
-
update: (
|
|
1592
|
-
a = { ...a, ...
|
|
2109
|
+
return r(a), {
|
|
2110
|
+
unmount: () => o.unmount(),
|
|
2111
|
+
update: (n) => {
|
|
2112
|
+
a = { ...a, ...n }, r(a);
|
|
1593
2113
|
}
|
|
1594
2114
|
};
|
|
1595
2115
|
}
|
|
1596
2116
|
export {
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
2117
|
+
Ua as App,
|
|
2118
|
+
ga as DetailPanel,
|
|
2119
|
+
Re as ErrorBoundary,
|
|
2120
|
+
wa as FileNode,
|
|
2121
|
+
Sa as PipelineDiagram,
|
|
2122
|
+
Aa as PipelineSelector,
|
|
2123
|
+
xa as TemplateEdge,
|
|
2124
|
+
_t as fetchFileByRepoName,
|
|
2125
|
+
qt as fetchPipelineYaml,
|
|
2126
|
+
qa as fetchPipelines,
|
|
2127
|
+
Yt as fetchTaskDocsConfig,
|
|
2128
|
+
Jt as fetchTaskSchema,
|
|
2129
|
+
Ke as getLayoutedElements,
|
|
2130
|
+
Ya as mount,
|
|
2131
|
+
Ve as usePipelineStore
|
|
1612
2132
|
};
|