@kky42/pievo-server 3.0.0 → 4.2.0
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/.output/nitro.json +1 -1
- package/.output/public/assets/MarkdownView-C9-AzIkl.js +66 -0
- package/.output/public/assets/{actionUi-BZrLpgHT.js → actionUi-D47jwMfh.js} +1 -1
- package/.output/public/assets/app-C5xfpeJe.css +2 -0
- package/.output/public/assets/index-BgNjFXWE.js +10 -0
- package/.output/public/assets/loops._loopId-Bo63FXPQ.js +2 -0
- package/.output/public/assets/loops._loopId_.runs._runId-DW2HPjtj.js +3 -0
- package/.output/public/assets/{preload-helper-hRTYB_ju.js → preload-helper-CbYqBpY9.js} +2 -2
- package/.output/public/assets/routes-C88oSApK.js +1 -0
- package/.output/public/assets/routes-CTCh8xYm.js +1 -0
- package/.output/server/_ssr/{MachinesModal-CmVMec6B.mjs → MachinesModal-DwHy2cis.mjs} +44 -25
- package/.output/server/_ssr/MarkdownView-BOe75tli.mjs +67 -0
- package/.output/server/_ssr/{actionUi-DE-Pb2tv.mjs → actionUi-CszQXDSN.mjs} +20 -2
- package/.output/server/_ssr/artifactFiles-DJiK99sF.mjs +67 -0
- package/.output/server/_ssr/{artifactKind-DqpmtxDU.mjs → artifactKind-DYMU0q3N.mjs} +2 -7
- package/.output/server/_ssr/{boot-CYRi-wez.mjs → boot-CecCDRoH.mjs} +950 -968
- package/.output/server/_ssr/{lifecycleUi-BsbUsi5K.mjs → lifecycleUi-Bd7_sthp.mjs} +12 -19
- package/.output/server/_ssr/{loopApi-Bez1rHV0.mjs → loopApi-uEiBQ5YX.mjs} +17 -23
- package/.output/server/_ssr/{loopProjection-esCjyZJg.mjs → loopProjection-Bo54jjGd.mjs} +5 -3
- package/.output/server/_ssr/{loops._loopId-KUezNY69.mjs → loops._loopId-c1oRP7cr.mjs} +37 -117
- package/.output/server/_ssr/{loops._loopId_.runs._runId-DOkUEesG.mjs → loops._loopId_.runs._runId-Dl0SwOlC.mjs} +43 -23
- package/.output/server/_ssr/loops._loopId_.runs._runId-czMVvNsk.mjs +11 -0
- package/.output/server/_ssr/{machineFns-CniGcY8s.mjs → machineFns-aw9xe5oz.mjs} +6 -20
- package/.output/server/_ssr/{router-BFIH2UAE.mjs → router-3OQ849sN.mjs} +96 -112
- package/.output/server/_ssr/{routes-BSVBANI3.mjs → routes-CL4y6AEv.mjs} +2 -2
- package/.output/server/_ssr/{routes-DnE7XDe_.mjs → routes-CT5IdoiP.mjs} +6 -6
- package/.output/server/_ssr/{routes-ngpX7h8D.mjs → routes-nU2PDK3W.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +22 -22
- package/.output/server/{_tanstack-start-manifest_v-DnwAupbZ.mjs → _tanstack-start-manifest_v-_nMS2ozp.mjs} +9 -10
- package/.output/server/drizzle/0001_loop_files.sql +9 -0
- package/.output/server/drizzle/0002_run_attention.sql +1 -0
- package/.output/server/drizzle/meta/_journal.json +15 -1
- package/.output/server/index.mjs +52 -45
- package/drizzle/0001_loop_files.sql +9 -0
- package/drizzle/0002_run_attention.sql +1 -0
- package/drizzle/meta/_journal.json +15 -1
- package/package.json +1 -1
- package/.output/public/assets/app-DXLuQNb9.css +0 -2
- package/.output/public/assets/index-Di_wpAtL.js +0 -10
- package/.output/public/assets/loops._loopId-X3ClNPMY.js +0 -67
- package/.output/public/assets/loops._loopId_.runs._runId-ByU2BSyF.js +0 -3
- package/.output/public/assets/routes-BIOJZsig.js +0 -1
- package/.output/public/assets/routes-K8D5uBiV.js +0 -1
- package/.output/server/_ssr/artifactFiles-Di1xDKvX.mjs +0 -57
- package/.output/server/_ssr/loops._loopId_.runs._runId-BFP9oMrp.mjs +0 -16
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { o as __toESM } from "../_runtime.mjs";
|
|
2
|
+
import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
+
import { t as purify } from "../_libs/dompurify.mjs";
|
|
4
|
+
import { t as g } from "../_libs/marked.mjs";
|
|
5
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/MarkdownView-BOe75tli.js
|
|
6
|
+
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
7
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
8
|
+
/**
|
|
9
|
+
* marked (GFM) → DOMPurify with one allowlisted prose subset (no scripts or
|
|
10
|
+
* handlers) for every loop-file markdown surface, so viewers cannot drift.
|
|
11
|
+
*/
|
|
12
|
+
var MD_SANITIZE = {
|
|
13
|
+
ALLOWED_TAGS: [
|
|
14
|
+
"h1",
|
|
15
|
+
"h2",
|
|
16
|
+
"h3",
|
|
17
|
+
"h4",
|
|
18
|
+
"h5",
|
|
19
|
+
"h6",
|
|
20
|
+
"p",
|
|
21
|
+
"br",
|
|
22
|
+
"hr",
|
|
23
|
+
"strong",
|
|
24
|
+
"b",
|
|
25
|
+
"em",
|
|
26
|
+
"i",
|
|
27
|
+
"del",
|
|
28
|
+
"s",
|
|
29
|
+
"code",
|
|
30
|
+
"pre",
|
|
31
|
+
"blockquote",
|
|
32
|
+
"ul",
|
|
33
|
+
"ol",
|
|
34
|
+
"li",
|
|
35
|
+
"a",
|
|
36
|
+
"span",
|
|
37
|
+
"table",
|
|
38
|
+
"thead",
|
|
39
|
+
"tbody",
|
|
40
|
+
"tr",
|
|
41
|
+
"th",
|
|
42
|
+
"td",
|
|
43
|
+
"img"
|
|
44
|
+
],
|
|
45
|
+
ALLOWED_ATTR: [
|
|
46
|
+
"href",
|
|
47
|
+
"title",
|
|
48
|
+
"target",
|
|
49
|
+
"rel",
|
|
50
|
+
"src",
|
|
51
|
+
"alt"
|
|
52
|
+
]
|
|
53
|
+
};
|
|
54
|
+
function renderMarkdown(content) {
|
|
55
|
+
return purify.sanitize(g.parse(content, {
|
|
56
|
+
async: false,
|
|
57
|
+
gfm: true
|
|
58
|
+
}), MD_SANITIZE);
|
|
59
|
+
}
|
|
60
|
+
function MarkdownView({ content }) {
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
62
|
+
className: "artifact-markdown px-5 py-4",
|
|
63
|
+
dangerouslySetInnerHTML: { __html: (0, import_react.useMemo)(() => renderMarkdown(content), [content]) }
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { MarkdownView as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as __toESM } from "../_runtime.mjs";
|
|
2
2
|
import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/actionUi-
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/actionUi-CszQXDSN.js
|
|
4
4
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
var fmt = (t) => t ? new Date(t).toLocaleString() : "—";
|
|
@@ -127,6 +127,7 @@ function dotColor(r) {
|
|
|
127
127
|
return (statusMeta(r.status) ?? ST["no-change"]).c;
|
|
128
128
|
}
|
|
129
129
|
function dotOpacity(r) {
|
|
130
|
+
if (r.attention) return 1;
|
|
130
131
|
if (r.reconciliation || r.phase === "running" || r.status === "block" || r.phase === "error") return 1;
|
|
131
132
|
if (r.phase === "pending") return .7;
|
|
132
133
|
if (r.phase === "canceled") return .5;
|
|
@@ -157,6 +158,9 @@ function dotLabel(r) {
|
|
|
157
158
|
if (r.phase === "done") return ST.warning.label;
|
|
158
159
|
return ST["no-change"].label;
|
|
159
160
|
}
|
|
161
|
+
/** The newest finished run, whose attention reason the loop card surfaces until a
|
|
162
|
+
* later run finishes without one. */
|
|
163
|
+
var lastFinishedRun = (runs) => runs.findLast((r) => r.phase === "done" || r.phase === "error");
|
|
160
164
|
var lastRunOf = (j) => {
|
|
161
165
|
const a = j.runs ?? [];
|
|
162
166
|
return a.length ? a[a.length - 1] : null;
|
|
@@ -228,6 +232,20 @@ function Loading({ className = "" }) {
|
|
|
228
232
|
children: "Loading…"
|
|
229
233
|
});
|
|
230
234
|
}
|
|
235
|
+
/** Yellow "!" for a run that asked for owner attention. It overlays the status
|
|
236
|
+
* color instead of replacing it because attention is independent of status; the
|
|
237
|
+
* dark outline keeps yellow legible on green, red, and grey blocks. */
|
|
238
|
+
function AttentionMark() {
|
|
239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
240
|
+
"aria-hidden": true,
|
|
241
|
+
className: "pointer-events-none select-none text-[14px] font-black leading-none text-run-attention",
|
|
242
|
+
style: {
|
|
243
|
+
WebkitTextStroke: "3px rgba(0,0,0,0.55)",
|
|
244
|
+
paintOrder: "stroke fill"
|
|
245
|
+
},
|
|
246
|
+
children: "!"
|
|
247
|
+
});
|
|
248
|
+
}
|
|
231
249
|
function StatusPill({ run, colorText }) {
|
|
232
250
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
233
251
|
className: "inline-flex items-center gap-1.5 font-medium",
|
|
@@ -353,4 +371,4 @@ function useFlash() {
|
|
|
353
371
|
return [flash, setFlash];
|
|
354
372
|
}
|
|
355
373
|
//#endregion
|
|
356
|
-
export {
|
|
374
|
+
export { sectionHeadCls as A, labelCls as C, runPulseAnim as D, rel as E, useHydrated as F, tsShort as M, until as N, runPulseStyle as O, useFlash as P, inputCls as S, lastRunOf as T, dur as _, LoadErrorCard as a, focusRing as b, StatusPill as c, btnPrimary as d, btnQuiet as f, dotOpacity as g, dotLabel as h, FlashLine as i, selectCls as j, scheduleText as k, btn as l, dotColor as m, ConfirmBar as n, Loading as o, btnSm as p, ErrorBanner as r, Pill as s, AttentionMark as t, btnDanger as u, fmt as v, lastFinishedRun as w, humanBytes as x, fnum as y };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { D as listArtifacts, M as loopFileNames, b as getArtifactFile, c as getLoopFiles, x as getLoop } from "./boot-CecCDRoH.mjs";
|
|
2
|
+
import { n as toArtifactSummary } from "./loopProjection-Bo54jjGd.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/artifactFiles-DJiK99sF.js
|
|
4
|
+
/** Read-only access to a loop's current files, shared by the dashboard server
|
|
5
|
+
* functions and the download route. Bytes are decoded as text, never interpreted. */
|
|
6
|
+
async function listLoopArtifacts(loopId) {
|
|
7
|
+
const loop = await getLoop(loopId);
|
|
8
|
+
if (!loop) return [];
|
|
9
|
+
const rows = new Map((await listArtifacts(loopId)).map((row) => [row.path, row]));
|
|
10
|
+
return loopFileNames(loop).map((path) => {
|
|
11
|
+
const row = rows.get(path);
|
|
12
|
+
return row ? toArtifactSummary(row) : {
|
|
13
|
+
path,
|
|
14
|
+
size: 0,
|
|
15
|
+
updatedAt: loop.updatedAt,
|
|
16
|
+
binary: false,
|
|
17
|
+
oversize: false
|
|
18
|
+
};
|
|
19
|
+
}).sort((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* One file's content for inline display: decoded text for a text file, or a
|
|
23
|
+
* binary/oversize marker (the UI then offers the download route). A configured
|
|
24
|
+
* file with no stored version reads as empty; an unknown name is an error —
|
|
25
|
+
* never throws.
|
|
26
|
+
*/
|
|
27
|
+
async function readLoopArtifact(loopId, rawPath) {
|
|
28
|
+
const loop = await getLoop(loopId);
|
|
29
|
+
if (!loop) return { error: "file not found" };
|
|
30
|
+
const row = await getArtifactFile(loopId, rawPath);
|
|
31
|
+
if (!row || row.deleted) return loopFileNames(loop).includes(rawPath) ? { text: "" } : { error: "file not found" };
|
|
32
|
+
if (row.binary || row.oversize) return {
|
|
33
|
+
binary: true,
|
|
34
|
+
size: row.size ?? null,
|
|
35
|
+
oversize: row.oversize
|
|
36
|
+
};
|
|
37
|
+
if (!row.hash) return { error: "file has no stored version" };
|
|
38
|
+
const bytes = await (await getLoopFiles()).readBlob(row.hash);
|
|
39
|
+
if (!bytes) return { error: "file not found" };
|
|
40
|
+
return { text: bytes.toString("utf8") };
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Resolve a loop file name to its stored bytes for the download route. A
|
|
44
|
+
* configured file with no stored version serves empty bytes; an unknown name is
|
|
45
|
+
* 404. The bytes stream straight from the BlobStore.
|
|
46
|
+
*/
|
|
47
|
+
async function readLoopArtifactBytes(loopId, rawPath) {
|
|
48
|
+
const loop = await getLoop(loopId);
|
|
49
|
+
if (!loop) return { status: 404 };
|
|
50
|
+
const row = await getArtifactFile(loopId, rawPath);
|
|
51
|
+
if (!row || row.deleted || !row.hash) return loopFileNames(loop).includes(rawPath) ? {
|
|
52
|
+
status: 200,
|
|
53
|
+
bytes: Buffer.alloc(0),
|
|
54
|
+
binary: false,
|
|
55
|
+
filename: rawPath
|
|
56
|
+
} : { status: 404 };
|
|
57
|
+
const bytes = await (await getLoopFiles()).readBlob(row.hash);
|
|
58
|
+
if (!bytes) return { status: 404 };
|
|
59
|
+
return {
|
|
60
|
+
status: 200,
|
|
61
|
+
bytes,
|
|
62
|
+
binary: row.binary,
|
|
63
|
+
filename: rawPath
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { listLoopArtifacts, readLoopArtifact, readLoopArtifactBytes };
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/artifactKind-
|
|
3
|
-
var $$splitComponentImporter = () => import("./loops._loopId-
|
|
4
|
-
/**
|
|
5
|
-
* Loop detail page — `/loops/$loopId`: a loop header and action toolbar, the
|
|
6
|
-
* exact artifact Files panel, and the runs timeline. The view owns its own
|
|
7
|
-
* data + self-poll. Run rows link on to `/loops/$loopId/runs/$runId`.
|
|
8
|
-
*/
|
|
2
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/artifactKind-DYMU0q3N.js
|
|
3
|
+
var $$splitComponentImporter = () => import("./loops._loopId-c1oRP7cr.mjs");
|
|
9
4
|
var Route = createFileRoute("/loops/$loopId")({
|
|
10
5
|
ssr: false,
|
|
11
6
|
component: lazyRouteComponent($$splitComponentImporter, "component")
|