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