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