@kky42/pievo-server 2.4.12 → 2.4.13
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/SignIn-CDCdDD1a.js +1 -0
- package/.output/public/assets/{ui-s5IMg6RF.js → actionUi-D8m1FDHO.js} +1 -1
- package/.output/public/assets/app-PPhgN9iN.css +2 -0
- package/.output/public/assets/index-c0XPWXuz.js +10 -0
- package/.output/public/assets/loops._loopId-D7i_BGiE.js +67 -0
- package/.output/public/assets/loops._loopId_.runs._runId-CksSrEY7.js +3 -0
- package/.output/public/assets/{preload-helper-Bs7oCAsw.js → preload-helper-Zcmr31XG.js} +3 -3
- package/.output/public/assets/routes-79D939J4.js +1 -0
- package/.output/public/assets/routes-BYgl3Tmv.js +1 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_ssr/{MachinesModal-BhRw7oOx.mjs → MachinesModal-DBIP648Z.mjs} +18 -57
- package/.output/server/_ssr/{SignIn-BhoZIOUp.mjs → SignIn-Bp3uWaCQ.mjs} +3 -3
- package/.output/server/_ssr/{ui-DGz-q9MT.mjs → actionUi-C_WswNb1.mjs} +113 -2
- package/.output/server/_ssr/{artifactFiles-ChuJ4PzC.mjs → artifactFiles-BvVmixrs.mjs} +3 -3
- package/.output/server/_ssr/{artifactKind-DXumOv7c.mjs → artifactKind-DRCbYHZU.mjs} +6 -14
- package/.output/server/_ssr/artifacts-CzDJLaa6.mjs +2 -0
- package/.output/server/_ssr/{auth-LwPp_iim.mjs → auth-BV0MxVdo.mjs} +44 -124
- package/.output/server/_ssr/{SocialLinks-DVCLmql0.mjs → auth-client-RTpMpT4L.mjs} +143 -109
- package/.output/server/_ssr/boot-CsLXrLEa.mjs +2 -0
- package/.output/server/_ssr/{boot-BIxtZHU-.mjs → boot-U-CFI65B.mjs} +58 -331
- package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-CHMDkKqA.mjs → bun-sqlite-dialect-BW9W1_Ps-D9KUBJ-L.mjs} +2 -2
- package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-DYum6qky.mjs → d1-sqlite-dialect-BLC8LXE6-CVHRzH1n.mjs} +2 -2
- package/.output/server/_ssr/db-BTX-xORB.mjs +2 -0
- package/.output/server/_ssr/{dist-bWqs5sTy.mjs → dist-D7UDVZ5G.mjs} +2 -2
- package/.output/server/_ssr/{factory-pBwrjVTI.mjs → factory-DYFx1fg-.mjs} +2 -2
- package/.output/server/_ssr/{kysely-adapter-DMf5pFTf.mjs → kysely-adapter-CwdB7yBh.mjs} +1 -1
- package/.output/server/_ssr/logger-CwiKSMp6.mjs +2 -0
- package/.output/server/_ssr/{loopApi-Im6JSK0p.mjs → loopApi-C4nN0msL.mjs} +29 -90
- package/.output/server/_ssr/{loopProjection-DIpGR6rp.mjs → loopProjection-DMSNHux6.mjs} +2 -2
- package/.output/server/_ssr/{loops._loopId-B5iPseDG.mjs → loops._loopId-Q4pRYPip.mjs} +19 -45
- package/.output/server/_ssr/{loops._loopId_.runs._runId-DVtG0xYb.mjs → loops._loopId_.runs._runId-DNXVmCt5.mjs} +6 -13
- package/.output/server/_ssr/{loops._loopId_.runs._runId-BA-P6sGA.mjs → loops._loopId_.runs._runId-ty3AhkOi.mjs} +31 -23
- package/.output/server/_ssr/{machineFns-Bb9KNXun.mjs → machineFns-CkNms3zA.mjs} +41 -108
- package/.output/server/_ssr/{node-sqlite-dialect-Dho9YjXb.mjs → node-sqlite-dialect-B_g92oFK.mjs} +2 -2
- package/.output/server/_ssr/{router-C8iotXtk.mjs → router-DCNZ2xLm.mjs} +26 -40
- package/.output/server/_ssr/routes-8JSF7bX_.mjs +27 -0
- package/.output/server/_ssr/{routes-FO0MFfYK.mjs → routes-B3fulW5I.mjs} +4 -9
- package/.output/server/_ssr/routes-BaanDO41.mjs +367 -0
- package/.output/server/_ssr/runDiff-D7CxAgYL.mjs +2 -0
- package/.output/server/_ssr/ssr.mjs +28 -88
- package/.output/server/_ssr/store-DSNbXxqz.mjs +2 -0
- package/.output/server/_ssr/tokens-DzUv7CCp.mjs +2 -0
- package/.output/server/_tanstack-start-manifest_v-DkmxsHDK.mjs +52 -0
- package/.output/server/drizzle/0002_remove_teams.sql +15 -0
- package/.output/server/drizzle/meta/_journal.json +7 -0
- package/.output/server/index.mjs +49 -98
- package/drizzle/0002_remove_teams.sql +15 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +2 -2
- package/.output/public/assets/MachinesModal-ByHejech.js +0 -1
- package/.output/public/assets/SignIn-Cf4HOpdF.js +0 -1
- package/.output/public/assets/actionUi-yYVvoOTn.js +0 -1
- package/.output/public/assets/app-D5Hy4BcS.css +0 -2
- package/.output/public/assets/index-D504r3X9.js +0 -10
- package/.output/public/assets/invite._token-B0EKVyrU.js +0 -1
- package/.output/public/assets/invite._token-BSnGRyUw.js +0 -1
- package/.output/public/assets/lifecycleUi-C0DaC6NM.js +0 -1
- package/.output/public/assets/loops._loopId-j5EB2PLW.js +0 -67
- package/.output/public/assets/loops._loopId_.runs._runId-BICo_pRz.js +0 -3
- package/.output/public/assets/routes-4N6mrQK_.js +0 -1
- package/.output/public/assets/routes-DZU0Tqka.js +0 -1
- package/.output/public/assets/t._teamId-CAUjvMZ6.js +0 -1
- package/.output/public/assets/t._teamId-Cqzd69sO.js +0 -1
- package/.output/server/_ssr/DashboardView-DrKNkmcX.mjs +0 -867
- package/.output/server/_ssr/actionUi-Cf6DuEC2.mjs +0 -119
- package/.output/server/_ssr/artifacts-DOLHJHcd.mjs +0 -2
- package/.output/server/_ssr/boot-D8cj4uZj.mjs +0 -2
- package/.output/server/_ssr/db-BphSJs66.mjs +0 -2
- package/.output/server/_ssr/invite._token-CPSvdDox.mjs +0 -27
- package/.output/server/_ssr/invite._token-CRBsTSTZ.mjs +0 -84
- package/.output/server/_ssr/invite._token-CaTLt92a.mjs +0 -20
- package/.output/server/_ssr/lifecycleUi-DauKavgx.mjs +0 -50
- package/.output/server/_ssr/logger-EinA2J6y.mjs +0 -2
- package/.output/server/_ssr/routes-CsV1weub.mjs +0 -26
- package/.output/server/_ssr/routes-fiMzFtcP.mjs +0 -39
- package/.output/server/_ssr/runDiff-BLdot9mi.mjs +0 -2
- package/.output/server/_ssr/store-CFCp_ggC.mjs +0 -2
- package/.output/server/_ssr/t._teamId-BYA4Dnjp.mjs +0 -43
- package/.output/server/_ssr/t._teamId-CKsrgN86.mjs +0 -32
- package/.output/server/_ssr/t._teamId-D1BTwhWf.mjs +0 -31
- package/.output/server/_ssr/teamCookie-B7hLOIie.mjs +0 -10
- package/.output/server/_ssr/teamFns-DfqtuBW2.mjs +0 -451
- package/.output/server/_ssr/teamFns-cI_tsiCv.mjs +0 -32
- package/.output/server/_ssr/tokens-CUz4LDLm.mjs +0 -2
- package/.output/server/_tanstack-start-manifest_v-xSxVtI1J.mjs +0 -86
|
@@ -1,119 +0,0 @@
|
|
|
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 { a as btn, o as btnDanger, s as btnPrimary } from "./ui-DGz-q9MT.mjs";
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/actionUi-Cf6DuEC2.js
|
|
5
|
-
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
6
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
7
|
-
/**
|
|
8
|
-
* First-load failure card — the calm "couldn't load X" + Retry the dashboard,
|
|
9
|
-
* loop page, and run page all show instead of a raw error dump. One shared
|
|
10
|
-
* markup so the three screens can't drift.
|
|
11
|
-
*/
|
|
12
|
-
function LoadErrorCard({ title, detail, onRetry }) {
|
|
13
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
14
|
-
className: "rounded-card border border-hairline bg-surface px-6 py-8 shadow-card",
|
|
15
|
-
children: [
|
|
16
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
17
|
-
className: "text-[14px] text-accent",
|
|
18
|
-
children: title
|
|
19
|
-
}),
|
|
20
|
-
detail && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
21
|
-
className: "mt-1 text-meta text-secondary",
|
|
22
|
-
children: detail
|
|
23
|
-
}),
|
|
24
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
25
|
-
type: "button",
|
|
26
|
-
onClick: onRetry,
|
|
27
|
-
className: "mt-3 cursor-pointer border-none bg-transparent p-0 text-label font-medium text-interactive underline underline-offset-2 hover:text-display",
|
|
28
|
-
children: "Retry"
|
|
29
|
-
})
|
|
30
|
-
]
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* In-panel guard — the Nothing-styled stand-in for native confirm(). Owns its
|
|
35
|
-
* own a11y so the caller just renders it when armed: focus lands on the CTA,
|
|
36
|
-
* Esc cancels, Enter (CTA focused) confirms. Render with `key={kind}` so it
|
|
37
|
-
* remounts (and re-focuses) per guard.
|
|
38
|
-
*/
|
|
39
|
-
function ConfirmBar({ prompt, note, cta, danger, busy, onConfirm, onCancel }) {
|
|
40
|
-
const ctaRef = (0, import_react.useRef)(null);
|
|
41
|
-
(0, import_react.useEffect)(() => {
|
|
42
|
-
ctaRef.current?.focus();
|
|
43
|
-
}, []);
|
|
44
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
45
|
-
role: "group",
|
|
46
|
-
"aria-label": prompt,
|
|
47
|
-
onKeyDown: (e) => {
|
|
48
|
-
if (e.key === "Escape" && !busy) onCancel();
|
|
49
|
-
},
|
|
50
|
-
className: "flex flex-wrap items-center gap-x-4 gap-y-2.5 rounded-control border border-hairline bg-raised px-4 py-3",
|
|
51
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
52
|
-
className: "min-w-0",
|
|
53
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
54
|
-
className: "text-body font-medium text-display",
|
|
55
|
-
children: prompt
|
|
56
|
-
}), note && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
57
|
-
className: "mt-0.5 text-meta text-secondary",
|
|
58
|
-
children: note
|
|
59
|
-
})]
|
|
60
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
61
|
-
className: "ml-auto flex items-center gap-2.5",
|
|
62
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
63
|
-
ref: ctaRef,
|
|
64
|
-
className: danger ? btnDanger : btnPrimary,
|
|
65
|
-
disabled: busy,
|
|
66
|
-
onClick: onConfirm,
|
|
67
|
-
children: busy ? "Working…" : cta
|
|
68
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
69
|
-
className: btn,
|
|
70
|
-
disabled: busy,
|
|
71
|
-
onClick: onCancel,
|
|
72
|
-
children: "Cancel"
|
|
73
|
-
})]
|
|
74
|
-
})]
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Transient peak-end acknowledgement (✓ done / ✕ gone), announced to AT via
|
|
79
|
-
* aria-live. Self-clearing is the caller's concern (see `useFlash`); this is
|
|
80
|
-
* pure presentation. No outer margin — wrap at the call site for spacing.
|
|
81
|
-
*/
|
|
82
|
-
function FlashLine({ label, tone = "ok", onUndo }) {
|
|
83
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
84
|
-
role: "status",
|
|
85
|
-
"aria-live": "polite",
|
|
86
|
-
className: "inline-flex items-center gap-2 text-label font-medium text-secondary",
|
|
87
|
-
style: { animation: "fadeIn 0.2s ease-out" },
|
|
88
|
-
children: [
|
|
89
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
90
|
-
"aria-hidden": true,
|
|
91
|
-
className: tone === "gone" ? "text-accent" : "text-success",
|
|
92
|
-
children: tone === "gone" ? "✕" : "✓"
|
|
93
|
-
}),
|
|
94
|
-
label,
|
|
95
|
-
onUndo && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
96
|
-
type: "button",
|
|
97
|
-
onClick: onUndo,
|
|
98
|
-
className: "cursor-pointer border-none bg-transparent p-0 text-label font-medium text-interactive underline underline-offset-2 transition-colors hover:text-display",
|
|
99
|
-
children: "Undo"
|
|
100
|
-
})
|
|
101
|
-
]
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Flash state + its self-clear timer in one unit. `hold` wins; else an Undo
|
|
106
|
-
* flash lingers ~6s (reachable), a bare "done" fades after ~2.2s. Fade, don't
|
|
107
|
-
* slide.
|
|
108
|
-
*/
|
|
109
|
-
function useFlash() {
|
|
110
|
-
const [flash, setFlash] = (0, import_react.useState)(null);
|
|
111
|
-
(0, import_react.useEffect)(() => {
|
|
112
|
-
if (!flash) return;
|
|
113
|
-
const t = setTimeout(() => setFlash(null), flash.hold ?? (flash.undo ? 6e3 : 2200));
|
|
114
|
-
return () => clearTimeout(t);
|
|
115
|
-
}, [flash]);
|
|
116
|
-
return [flash, setFlash];
|
|
117
|
-
}
|
|
118
|
-
//#endregion
|
|
119
|
-
export { useFlash as i, FlashLine as n, LoadErrorCard as r, ConfirmBar as t };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
|
-
import { i as authClient, u as getAuthState } from "./SocialLinks-DVCLmql0.mjs";
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-CPSvdDox.js
|
|
4
|
-
var $$splitErrorComponentImporter = () => import("./invite._token-CaTLt92a.mjs");
|
|
5
|
-
var $$splitComponentImporter = () => import("./invite._token-CRBsTSTZ.mjs");
|
|
6
|
-
/** Redeem a team invite after normal gated sign-in. Invites grant membership but
|
|
7
|
-
* never bypass the login allowlist; open mode has no invite identity to redeem. */
|
|
8
|
-
var Route = createFileRoute("/invite/$token")({
|
|
9
|
-
ssr: false,
|
|
10
|
-
loader: async ({ params }) => {
|
|
11
|
-
const auth = await getAuthState();
|
|
12
|
-
let signedIn = false;
|
|
13
|
-
if (auth.enabled) {
|
|
14
|
-
const { data: session } = await authClient.getSession();
|
|
15
|
-
signedIn = !!session;
|
|
16
|
-
}
|
|
17
|
-
return {
|
|
18
|
-
auth,
|
|
19
|
-
token: params.token,
|
|
20
|
-
signedIn
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
24
|
-
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent")
|
|
25
|
-
});
|
|
26
|
-
//#endregion
|
|
27
|
-
export { Route as t };
|
|
@@ -1,84 +0,0 @@
|
|
|
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 { d as useNavigate } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
-
import { E as useSession, r as PievoLogo } from "./SocialLinks-DVCLmql0.mjs";
|
|
5
|
-
import { s as btnPrimary } from "./ui-DGz-q9MT.mjs";
|
|
6
|
-
import { t as setActiveTeamCookie } from "./teamCookie-B7hLOIie.mjs";
|
|
7
|
-
import { c as redeemTeamInvite } from "./teamFns-cI_tsiCv.mjs";
|
|
8
|
-
import { t as Route } from "./invite._token-CPSvdDox.mjs";
|
|
9
|
-
import { t as SignIn } from "./SignIn-BhoZIOUp.mjs";
|
|
10
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-CRBsTSTZ.js
|
|
11
|
-
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
12
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
13
|
-
/** Redeem a team invite after normal gated sign-in. Invites grant membership but
|
|
14
|
-
* never bypass the login allowlist; open mode has no invite identity to redeem. */
|
|
15
|
-
function Shell({ children }) {
|
|
16
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
17
|
-
className: "mx-auto mt-32 max-w-sm text-center",
|
|
18
|
-
children: [
|
|
19
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PievoLogo, { size: 52 }),
|
|
20
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
21
|
-
className: "mt-4 text-2xl font-semibold tracking-tight text-display",
|
|
22
|
-
children: "Team invite"
|
|
23
|
-
}),
|
|
24
|
-
children
|
|
25
|
-
]
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function RedeemInvite() {
|
|
29
|
-
const loaded = Route.useLoaderData();
|
|
30
|
-
const { data: session, isPending } = useSession();
|
|
31
|
-
const navigate = useNavigate();
|
|
32
|
-
const [state, setState] = (0, import_react.useState)("idle");
|
|
33
|
-
const [message, setMessage] = (0, import_react.useState)(null);
|
|
34
|
-
const ran = (0, import_react.useRef)(false);
|
|
35
|
-
const gateOn = loaded.auth.enabled;
|
|
36
|
-
const signedIn = gateOn ? !!session : false;
|
|
37
|
-
(0, import_react.useEffect)(() => {
|
|
38
|
-
if (!gateOn || isPending || !signedIn || ran.current) return;
|
|
39
|
-
ran.current = true;
|
|
40
|
-
setState("redeeming");
|
|
41
|
-
(async () => {
|
|
42
|
-
const r = await redeemTeamInvite({ data: loaded.token });
|
|
43
|
-
if (r.ok) {
|
|
44
|
-
setActiveTeamCookie(r.teamId);
|
|
45
|
-
navigate({
|
|
46
|
-
to: "/t/$teamId",
|
|
47
|
-
params: { teamId: r.teamId }
|
|
48
|
-
});
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
setMessage(r.error);
|
|
52
|
-
setState("error");
|
|
53
|
-
})();
|
|
54
|
-
}, [
|
|
55
|
-
gateOn,
|
|
56
|
-
isPending,
|
|
57
|
-
signedIn,
|
|
58
|
-
loaded.token,
|
|
59
|
-
navigate
|
|
60
|
-
]);
|
|
61
|
-
if (!gateOn) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Shell, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
62
|
-
className: "mt-2 text-sm text-secondary",
|
|
63
|
-
children: "This Pievo server runs in open mode (a single shared workspace), so team invites don't apply here."
|
|
64
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
65
|
-
className: `${btnPrimary} mt-6`,
|
|
66
|
-
onClick: () => void navigate({ to: "/" }),
|
|
67
|
-
children: "Go to the dashboard"
|
|
68
|
-
})] });
|
|
69
|
-
if (!isPending && !signedIn) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignIn, { callbackURL: `/invite/${loaded.token}` });
|
|
70
|
-
if (state === "error") return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Shell, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
71
|
-
className: "mt-3 text-sm text-accent",
|
|
72
|
-
children: message
|
|
73
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
74
|
-
className: `${btnPrimary} mt-6`,
|
|
75
|
-
onClick: () => void navigate({ to: "/" }),
|
|
76
|
-
children: "Go to the dashboard"
|
|
77
|
-
})] });
|
|
78
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Shell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
79
|
-
className: "mt-2 text-sm text-secondary",
|
|
80
|
-
children: "Joining the team…"
|
|
81
|
-
}) });
|
|
82
|
-
}
|
|
83
|
-
//#endregion
|
|
84
|
-
export { RedeemInvite as component };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { f as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
|
-
import { r as LoadErrorCard } from "./actionUi-Cf6DuEC2.mjs";
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/invite._token-CaTLt92a.js
|
|
5
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
6
|
-
/** Redeem a team invite after normal gated sign-in. Invites grant membership but
|
|
7
|
-
* never bypass the login allowlist; open mode has no invite identity to redeem. */
|
|
8
|
-
function LoadError({ error }) {
|
|
9
|
-
const router = useRouter();
|
|
10
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", {
|
|
11
|
-
className: "mx-auto max-w-[1180px] px-8 pt-12",
|
|
12
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadErrorCard, {
|
|
13
|
-
title: "Couldn't open this invite.",
|
|
14
|
-
detail: String(error),
|
|
15
|
-
onRetry: () => void router.invalidate()
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
export { LoadError as errorComponent };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/lifecycleUi-DauKavgx.js
|
|
2
|
-
var DAEMON_UPGRADE_REQUIRED = "Daemon upgrade required to stop a running process. Run `npm install -g @kky42/pievo@latest`, then `pievo daemon restart`.";
|
|
3
|
-
function deriveLoopLifecycle(loop) {
|
|
4
|
-
if (loop.deleteRequestedAt != null) return "deleting";
|
|
5
|
-
const running = loop.runs.find((run) => run.phase === "running");
|
|
6
|
-
if (!loop.enabled && running?.cancelRequested) return "stopping";
|
|
7
|
-
if (!loop.enabled && (loop.running || running)) return "paused-finishing";
|
|
8
|
-
if (!loop.enabled) return "paused";
|
|
9
|
-
return "active";
|
|
10
|
-
}
|
|
11
|
-
/** Stable lifecycle badge shared by dashboard cards and loop detail. It shows
|
|
12
|
-
* only scheduling state and its durable pause cause; execution transients
|
|
13
|
-
* (queued/running/stopping) stay in the runs timeline and never replace it. */
|
|
14
|
-
function lifecyclePresentation(loop) {
|
|
15
|
-
if (loop.deleteRequestedAt != null) return {
|
|
16
|
-
label: "Deleting",
|
|
17
|
-
tone: "accent"
|
|
18
|
-
};
|
|
19
|
-
if (loop.enabled) return {
|
|
20
|
-
label: "Active",
|
|
21
|
-
tone: "success"
|
|
22
|
-
};
|
|
23
|
-
if (loop.pauseCause?.kind === "blocked") return {
|
|
24
|
-
label: "Paused · blocked",
|
|
25
|
-
tone: "attention"
|
|
26
|
-
};
|
|
27
|
-
if (loop.pauseCause?.kind === "failure-streak") return {
|
|
28
|
-
label: "Paused · failure streak",
|
|
29
|
-
tone: "attention"
|
|
30
|
-
};
|
|
31
|
-
if (loop.pauseCause?.kind === "owner") return {
|
|
32
|
-
label: "Paused · owner",
|
|
33
|
-
tone: "neutral"
|
|
34
|
-
};
|
|
35
|
-
return {
|
|
36
|
-
label: "Paused",
|
|
37
|
-
tone: "neutral"
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function daemonStopSupport(protocol) {
|
|
41
|
-
return protocol === 4 ? {
|
|
42
|
-
supported: true,
|
|
43
|
-
label: `Daemon protocol 4 · Stop supported`
|
|
44
|
-
} : {
|
|
45
|
-
supported: false,
|
|
46
|
-
label: `Daemon protocol ${protocol ?? "unknown"} · upgrade required`
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
export { lifecyclePresentation as i, daemonStopSupport as n, deriveLoopLifecycle as r, DAEMON_UPGRADE_REQUIRED as t };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { E as useSession } from "./SocialLinks-DVCLmql0.mjs";
|
|
3
|
-
import { t as SignIn } from "./SignIn-BhoZIOUp.mjs";
|
|
4
|
-
import { t as DashboardView } from "./DashboardView-DrKNkmcX.mjs";
|
|
5
|
-
import { t as Route } from "./routes-fiMzFtcP.mjs";
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-CsV1weub.js
|
|
7
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
8
|
-
/**
|
|
9
|
-
* The home route. Under the auth gate it is now a THIN redirect to the explicit
|
|
10
|
-
* team URL (`/t/<lastUsed|personal>`) so the dashboard's team lives in the path
|
|
11
|
-
* (bookmarkable, multi-tab). `/` keeps working forever: a signed-out visitor gets
|
|
12
|
-
* the sign-in CTA; open mode (no gate ⇒ a single shared workspace with no team to
|
|
13
|
-
* expose in the URL) renders the dashboard right here, unchanged.
|
|
14
|
-
*/
|
|
15
|
-
/** First-load failure screen — a calm retry instead of the router's default
|
|
16
|
-
* error dump. Only the initial loader can land here; the in-page poll is
|
|
17
|
-
* fetch-then-set and keeps stale data on a transient blip. */
|
|
18
|
-
function Home() {
|
|
19
|
-
const loaded = Route.useLoaderData();
|
|
20
|
-
const { data: session, isPending } = useSession();
|
|
21
|
-
if (loaded?.auth?.enabled && !isPending && !session) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignIn, {});
|
|
22
|
-
if (loaded?.mode === "signin") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignIn, {});
|
|
23
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DashboardView, { initial: loaded.initial });
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { Home as component };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { c as createFileRoute, p as redirect, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
|
-
import { f as getDefaultTeam, i as authClient, u as getAuthState } from "./SocialLinks-DVCLmql0.mjs";
|
|
3
|
-
import { n as fetchLiveData } from "./DashboardView-DrKNkmcX.mjs";
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-fiMzFtcP.js
|
|
5
|
-
var $$splitErrorComponentImporter = () => import("./routes-FO0MFfYK.mjs");
|
|
6
|
-
var $$splitComponentImporter = () => import("./routes-CsV1weub.mjs");
|
|
7
|
-
/**
|
|
8
|
-
* The home route. Under the auth gate it is now a THIN redirect to the explicit
|
|
9
|
-
* team URL (`/t/<lastUsed|personal>`) so the dashboard's team lives in the path
|
|
10
|
-
* (bookmarkable, multi-tab). `/` keeps working forever: a signed-out visitor gets
|
|
11
|
-
* the sign-in CTA; open mode (no gate ⇒ a single shared workspace with no team to
|
|
12
|
-
* expose in the URL) renders the dashboard right here, unchanged.
|
|
13
|
-
*/
|
|
14
|
-
var Route = createFileRoute("/")({
|
|
15
|
-
ssr: false,
|
|
16
|
-
loader: async () => {
|
|
17
|
-
const auth = await getAuthState();
|
|
18
|
-
if (auth.enabled) {
|
|
19
|
-
const { data: session } = await authClient.getSession();
|
|
20
|
-
if (!session) return {
|
|
21
|
-
mode: "signin",
|
|
22
|
-
auth
|
|
23
|
-
};
|
|
24
|
-
throw redirect({
|
|
25
|
-
to: "/t/$teamId",
|
|
26
|
-
params: { teamId: await getDefaultTeam() }
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
mode: "dashboard",
|
|
31
|
-
auth,
|
|
32
|
-
initial: await fetchLiveData()
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
36
|
-
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent")
|
|
37
|
-
});
|
|
38
|
-
//#endregion
|
|
39
|
-
export { Route as t };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { c as createFileRoute, s as lazyRouteComponent } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
2
|
-
import { a as canViewTeam, i as authClient, u as getAuthState } from "./SocialLinks-DVCLmql0.mjs";
|
|
3
|
-
import { n as fetchLiveData } from "./DashboardView-DrKNkmcX.mjs";
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/t._teamId-BYA4Dnjp.js
|
|
5
|
-
var $$splitErrorComponentImporter = () => import("./t._teamId-D1BTwhWf.mjs");
|
|
6
|
-
var $$splitComponentImporter = () => import("./t._teamId-CKsrgN86.mjs");
|
|
7
|
-
/**
|
|
8
|
-
* The explicit-team dashboard (`/t/<teamId>`): the same dashboard scoped
|
|
9
|
-
* to the team in the PATH, so a view is bookmarkable and each browser tab keeps
|
|
10
|
-
* its own team (the list server fns take an explicit `teamId`, independent of the
|
|
11
|
-
* shared last-used cookie). A team id rides the URL verbatim.
|
|
12
|
-
*
|
|
13
|
-
* The loader validates membership (`canViewTeam`) and, on failure, throws the SAME
|
|
14
|
-
* generic not-found as a missing loop — never confirming a team exists to a
|
|
15
|
-
* non-member (enumeration safety). Open mode has no gate: any `/t/<x>` renders the
|
|
16
|
-
* single shared workspace.
|
|
17
|
-
*/
|
|
18
|
-
var Route = createFileRoute("/t/$teamId")({
|
|
19
|
-
ssr: false,
|
|
20
|
-
loader: async ({ params }) => {
|
|
21
|
-
const teamId = params.teamId;
|
|
22
|
-
const auth = await getAuthState();
|
|
23
|
-
if (auth.enabled) {
|
|
24
|
-
const { data: session } = await authClient.getSession();
|
|
25
|
-
if (!session) return {
|
|
26
|
-
mode: "signin",
|
|
27
|
-
auth,
|
|
28
|
-
teamId
|
|
29
|
-
};
|
|
30
|
-
if (!await canViewTeam({ data: teamId })) throw new Error("This team does not exist, or you do not have access to it.");
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
mode: "dashboard",
|
|
34
|
-
auth,
|
|
35
|
-
teamId,
|
|
36
|
-
initial: await fetchLiveData(teamId)
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
40
|
-
errorComponent: lazyRouteComponent($$splitErrorComponentImporter, "errorComponent")
|
|
41
|
-
});
|
|
42
|
-
//#endregion
|
|
43
|
-
export { Route as t };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { E as useSession } from "./SocialLinks-DVCLmql0.mjs";
|
|
3
|
-
import { t as SignIn } from "./SignIn-BhoZIOUp.mjs";
|
|
4
|
-
import { t as DashboardView } from "./DashboardView-DrKNkmcX.mjs";
|
|
5
|
-
import { t as Route } from "./t._teamId-BYA4Dnjp.mjs";
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/t._teamId-CKsrgN86.js
|
|
7
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
8
|
-
/**
|
|
9
|
-
* The explicit-team dashboard (`/t/<teamId>`): the same dashboard scoped
|
|
10
|
-
* to the team in the PATH, so a view is bookmarkable and each browser tab keeps
|
|
11
|
-
* its own team (the list server fns take an explicit `teamId`, independent of the
|
|
12
|
-
* shared last-used cookie). A team id rides the URL verbatim.
|
|
13
|
-
*
|
|
14
|
-
* The loader validates membership (`canViewTeam`) and, on failure, throws the SAME
|
|
15
|
-
* generic not-found as a missing loop — never confirming a team exists to a
|
|
16
|
-
* non-member (enumeration safety). Open mode has no gate: any `/t/<x>` renders the
|
|
17
|
-
* single shared workspace.
|
|
18
|
-
*/
|
|
19
|
-
/** Load-failure screen (a non-member's generic not-found, or a first-load blip).
|
|
20
|
-
* Retry re-runs the loader; harmless for the not-found case, self-heals a blip. */
|
|
21
|
-
function TeamDashboard() {
|
|
22
|
-
const loaded = Route.useLoaderData();
|
|
23
|
-
const { data: session, isPending } = useSession();
|
|
24
|
-
if (loaded?.auth?.enabled && !isPending && !session) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignIn, {});
|
|
25
|
-
if (loaded?.mode === "signin") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignIn, {});
|
|
26
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DashboardView, {
|
|
27
|
-
teamId: loaded.teamId,
|
|
28
|
-
initial: loaded.initial
|
|
29
|
-
}, loaded.teamId);
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
export { TeamDashboard as component };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { f as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
3
|
-
import { r as LoadErrorCard } from "./actionUi-Cf6DuEC2.mjs";
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/t._teamId-D1BTwhWf.js
|
|
5
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
6
|
-
/**
|
|
7
|
-
* The explicit-team dashboard (`/t/<teamId>`): the same dashboard scoped
|
|
8
|
-
* to the team in the PATH, so a view is bookmarkable and each browser tab keeps
|
|
9
|
-
* its own team (the list server fns take an explicit `teamId`, independent of the
|
|
10
|
-
* shared last-used cookie). A team id rides the URL verbatim.
|
|
11
|
-
*
|
|
12
|
-
* The loader validates membership (`canViewTeam`) and, on failure, throws the SAME
|
|
13
|
-
* generic not-found as a missing loop — never confirming a team exists to a
|
|
14
|
-
* non-member (enumeration safety). Open mode has no gate: any `/t/<x>` renders the
|
|
15
|
-
* single shared workspace.
|
|
16
|
-
*/
|
|
17
|
-
/** Load-failure screen (a non-member's generic not-found, or a first-load blip).
|
|
18
|
-
* Retry re-runs the loader; harmless for the not-found case, self-heals a blip. */
|
|
19
|
-
function LoadError({ error }) {
|
|
20
|
-
const router = useRouter();
|
|
21
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", {
|
|
22
|
-
className: "mx-auto max-w-[1180px] px-8 pt-12",
|
|
23
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoadErrorCard, {
|
|
24
|
-
title: "Couldn't open this team.",
|
|
25
|
-
detail: String(error),
|
|
26
|
-
onRetry: () => void router.invalidate()
|
|
27
|
-
})
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { LoadError as errorComponent };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/teamCookie-B7hLOIie.js
|
|
2
|
-
/** The single writer of the `pievo.team` active-team cookie. Both switch
|
|
3
|
-
* surfaces (the header TeamSwitcher and the cross-team loop banner) call this so
|
|
4
|
-
* they can't drift on cookie name/encoding/max-age/samesite. Client-set is fine:
|
|
5
|
-
* the server never trusts it blind (requestScope re-checks membership/admin). */
|
|
6
|
-
function setActiveTeamCookie(id) {
|
|
7
|
-
document.cookie = `pievo.team=${encodeURIComponent(id)}; path=/; max-age=31536000; samesite=lax`;
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { setActiveTeamCookie as t };
|