@kky42/pievo-server 2.4.9 → 2.4.10
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/{MachinesModal-wxHeRJsP.js → MachinesModal-ByHejech.js} +1 -1
- package/.output/public/assets/app-IrlFuBXa.css +2 -0
- package/.output/public/assets/{index-DXJGEV9d.js → index-ia26HsP1.js} +3 -3
- package/.output/public/assets/{invite._token-DgbAZ8tR.js → invite._token-tDfe3p0Z.js} +1 -1
- package/.output/public/assets/{loops._loopId-hqovx5nj.js → loops._loopId-CuYq_XgT.js} +3 -3
- package/.output/public/assets/{loops._loopId_.runs._runId-B233CSov.js → loops._loopId_.runs._runId-mOaF51Qu.js} +1 -1
- package/.output/public/assets/{routes-BcmIcHul.js → routes-Dbl_3lt_.js} +1 -1
- package/.output/public/assets/{t._teamId-CJOyBon9.js → t._teamId-BVsl0EGm.js} +1 -1
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_ssr/{DashboardView-Dj-FImnr.mjs → DashboardView-BMHMrOfC.mjs} +6 -6
- package/.output/server/_ssr/{MachinesModal-C8UdXFwP.mjs → MachinesModal-BhRw7oOx.mjs} +8 -15
- package/.output/server/_ssr/{SignIn-kgyyAjxa.mjs → SignIn-BhoZIOUp.mjs} +3 -3
- package/.output/server/_ssr/{SocialLinks-ZYIMrv4W.mjs → SocialLinks-DVCLmql0.mjs} +2 -11
- package/.output/server/_ssr/{actionUi-DCNmrAjw.mjs → actionUi-Cf6DuEC2.mjs} +2 -2
- package/.output/server/_ssr/{artifactFiles-Dg7Csxw-.mjs → artifactFiles-ChuJ4PzC.mjs} +3 -4
- package/.output/server/_ssr/{artifactKind-Bex7n005.mjs → artifactKind-DXumOv7c.mjs} +3 -7
- package/.output/server/_ssr/{artifacts-CGJQi12P.mjs → artifacts-DOLHJHcd.mjs} +1 -1
- package/.output/server/_ssr/{auth-pONvN2Mo.mjs → auth-LwPp_iim.mjs} +9 -13
- package/.output/server/_ssr/{boot-DoRoAQuI.mjs → boot-BIxtZHU-.mjs} +61 -209
- package/.output/server/_ssr/{boot-DF8p07PC.mjs → boot-D8cj4uZj.mjs} +1 -1
- package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-fxdbbtvy.mjs → bun-sqlite-dialect-BW9W1_Ps-CHMDkKqA.mjs} +2 -2
- package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-CcOEyONf.mjs → d1-sqlite-dialect-BLC8LXE6-DYum6qky.mjs} +2 -2
- package/.output/server/_ssr/db-BphSJs66.mjs +2 -0
- package/.output/server/_ssr/{dist-ghpS-jzd.mjs → dist-bWqs5sTy.mjs} +2 -2
- package/.output/server/_ssr/{factory-D7WCUKnW.mjs → factory-pBwrjVTI.mjs} +2 -2
- package/.output/server/_ssr/{invite._token-hkOJXnJU.mjs → invite._token-CPSvdDox.mjs} +4 -4
- package/.output/server/_ssr/{invite._token-YSls7Te8.mjs → invite._token-CRBsTSTZ.mjs} +6 -6
- package/.output/server/_ssr/{invite._token-CGzJGIfm.mjs → invite._token-CaTLt92a.mjs} +2 -2
- package/.output/server/_ssr/{kysely-adapter-DD_FuS-x.mjs → kysely-adapter-DMf5pFTf.mjs} +1 -1
- package/.output/server/_ssr/{lifecycleUi-DOr6Af13.mjs → lifecycleUi-DauKavgx.mjs} +1 -2
- package/.output/server/_ssr/logger-EinA2J6y.mjs +2 -0
- package/.output/server/_ssr/{loopApi-Vb7RrshX.mjs → loopApi-Im6JSK0p.mjs} +10 -11
- package/.output/server/_ssr/{loopProjection-DfpYkHDU.mjs → loopProjection-DIpGR6rp.mjs} +2 -4
- package/.output/server/_ssr/{loops._loopId-BKUT85ip.mjs → loops._loopId-B5iPseDG.mjs} +13 -27
- package/.output/server/_ssr/{loops._loopId_.runs._runId-CBXFBNrN.mjs → loops._loopId_.runs._runId-BA-P6sGA.mjs} +6 -44
- package/.output/server/_ssr/{loops._loopId_.runs._runId-Bha29x1u.mjs → loops._loopId_.runs._runId-DVtG0xYb.mjs} +3 -3
- package/.output/server/_ssr/{machineFns-BFBPpfxd.mjs → machineFns-Bb9KNXun.mjs} +3 -5
- package/.output/server/_ssr/{node-sqlite-dialect-BDYK0mnk.mjs → node-sqlite-dialect-Dho9YjXb.mjs} +2 -2
- package/.output/server/_ssr/{router-DfegU72d.mjs → router-DPz3uoUr.mjs} +22 -30
- package/.output/server/_ssr/{routes-BwTvON37.mjs → routes-B9zD2h4Y.mjs} +5 -7
- package/.output/server/_ssr/{routes-Bx3C3K_H.mjs → routes-BuILEmHs.mjs} +5 -5
- package/.output/server/_ssr/{routes-D5GHah06.mjs → routes-FO0MFfYK.mjs} +2 -2
- package/.output/server/_ssr/runDiff-BLdot9mi.mjs +2 -0
- package/.output/server/_ssr/ssr.mjs +39 -39
- package/.output/server/_ssr/store-CFCp_ggC.mjs +2 -0
- package/.output/server/_ssr/{t._teamId-CpPl9_XU.mjs → t._teamId-1t5wOXrV.mjs} +5 -5
- package/.output/server/_ssr/{t._teamId-BFs1MfBR.mjs → t._teamId-A37pQ8Vp.mjs} +5 -5
- package/.output/server/_ssr/{t._teamId-CrZ7EkUL.mjs → t._teamId-D1BTwhWf.mjs} +2 -2
- package/.output/server/_ssr/{teamFns-BVjiPvv8.mjs → teamFns-DfqtuBW2.mjs} +3 -7
- package/.output/server/_ssr/{teamFns-3lItAtfc.mjs → teamFns-cI_tsiCv.mjs} +2 -3
- package/.output/server/_ssr/{tokens-DUsrVE9g.mjs → tokens-CUz4LDLm.mjs} +1 -1
- package/.output/server/_ssr/{ui-BEPYdOmJ.mjs → ui-DGz-q9MT.mjs} +1 -22
- package/.output/server/{_tanstack-start-manifest_v-qnHwyto-.mjs → _tanstack-start-manifest_v-CojB4Veh.mjs} +11 -11
- package/.output/server/drizzle/0001_add_pi_agent.sql +9 -0
- package/.output/server/drizzle/meta/_journal.json +7 -0
- package/.output/server/index.mjs +65 -65
- package/drizzle/0001_add_pi_agent.sql +9 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/.output/public/assets/app-CuZ0I3Mb.css +0 -2
- package/.output/server/_ssr/db-DS0gckHd.mjs +0 -2
- package/.output/server/_ssr/logger-BuIBg8Jv.mjs +0 -2
- package/.output/server/_ssr/runDiff-CcG2PgCn.mjs +0 -2
- package/.output/server/_ssr/store-yOJEt4It.mjs +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { j as sql } from "../_libs/drizzle-orm+postgres.mjs";
|
|
2
|
-
import { A as ensureServer, Dt as readJsonBody, Et as readByteBody, Qt as validPollWireId, Xt as validOptionalPollString, Zt as validPollCurrentRun, d as POLL_HTTP_BODY_FIELDS, l as MACHINE_BODY_CAP } from "./boot-
|
|
2
|
+
import { A as ensureServer, Dt as readJsonBody, Et as readByteBody, Qt as validPollWireId, Xt as validOptionalPollString, Zt as validPollCurrentRun, d as POLL_HTTP_BODY_FIELDS, l as MACHINE_BODY_CAP } from "./boot-BIxtZHU-.mjs";
|
|
3
3
|
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
4
4
|
import { c as createFileRoute, i as HeadContent, l as createRootRoute, o as createRouter, r as Scripts } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
5
|
-
import { t as Route$12 } from "./invite._token-
|
|
6
|
-
import { r as imageMime, t as Route$13 } from "./artifactKind-
|
|
7
|
-
import { t as Route$14 } from "./loops._loopId_.runs._runId-
|
|
8
|
-
import { t as Route$15 } from "./routes-
|
|
9
|
-
import { t as Route$16 } from "./t._teamId-
|
|
10
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/router-
|
|
5
|
+
import { t as Route$12 } from "./invite._token-CPSvdDox.mjs";
|
|
6
|
+
import { r as imageMime, t as Route$13 } from "./artifactKind-DXumOv7c.mjs";
|
|
7
|
+
import { t as Route$14 } from "./loops._loopId_.runs._runId-DVtG0xYb.mjs";
|
|
8
|
+
import { t as Route$15 } from "./routes-BuILEmHs.mjs";
|
|
9
|
+
import { t as Route$16 } from "./t._teamId-1t5wOXrV.mjs";
|
|
10
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/router-DPz3uoUr.js
|
|
11
11
|
var import_jsx_runtime = require_jsx_runtime();
|
|
12
|
-
var app_default = "/assets/app-
|
|
12
|
+
var app_default = "/assets/app-IrlFuBXa.css";
|
|
13
13
|
var Route$11 = createRootRoute({
|
|
14
14
|
head: () => ({
|
|
15
15
|
meta: [
|
|
@@ -52,7 +52,6 @@ var TokenBucketLimiter = class {
|
|
|
52
52
|
this.refillPerSec = refillPerSec;
|
|
53
53
|
this.maxKeys = maxKeys;
|
|
54
54
|
}
|
|
55
|
-
/** Consume one token for `key`. Returns true if allowed, false if the bucket is dry. */
|
|
56
55
|
allow(key, now = Date.now()) {
|
|
57
56
|
let b = this.buckets.get(key);
|
|
58
57
|
if (!b) {
|
|
@@ -82,12 +81,10 @@ var TokenBucketLimiter = class {
|
|
|
82
81
|
}
|
|
83
82
|
if (oldestKey !== void 0) this.buckets.delete(oldestKey);
|
|
84
83
|
}
|
|
85
|
-
/** Test seam — forget all state. */
|
|
86
84
|
reset() {
|
|
87
85
|
this.buckets.clear();
|
|
88
86
|
}
|
|
89
87
|
};
|
|
90
|
-
/** Parse a positive-number env override, falling back to `dflt` on absent/invalid. */
|
|
91
88
|
function envNum(name, dflt) {
|
|
92
89
|
const raw = process.env[name]?.trim();
|
|
93
90
|
if (!raw) return dflt;
|
|
@@ -163,7 +160,6 @@ function machineRouteLimit(request, token, opts = {}) {
|
|
|
163
160
|
if (token && !tokenLimiter.allow(token, now)) return tooMany();
|
|
164
161
|
return null;
|
|
165
162
|
}
|
|
166
|
-
/** POST /machine/report — finalize a run (Bearer run token). */
|
|
167
163
|
var Route$10 = createFileRoute("/machine/report")({ server: { handlers: { POST: async ({ request }) => {
|
|
168
164
|
const auth = request.headers.get("authorization") ?? "";
|
|
169
165
|
const token = auth.startsWith("Bearer ") ? auth.slice(7) : "";
|
|
@@ -173,7 +169,7 @@ var Route$10 = createFileRoute("/machine/report")({ server: { handlers: { POST:
|
|
|
173
169
|
const parsed = await readJsonBody(request, MACHINE_BODY_CAP);
|
|
174
170
|
if (parsed.kind === "too-large") return Response.json({ error: "body too large" }, { status: 413 });
|
|
175
171
|
const body = parsed.kind === "ok" && parsed.body && typeof parsed.body === "object" ? parsed.body : {};
|
|
176
|
-
const { getGateway } = await import("./boot-
|
|
172
|
+
const { getGateway } = await import("./boot-D8cj4uZj.mjs");
|
|
177
173
|
const r = await (await getGateway()).report(token, body);
|
|
178
174
|
return Response.json(r.body, { status: r.status });
|
|
179
175
|
} } } });
|
|
@@ -213,24 +209,23 @@ var Route$7 = createFileRoute("/api/machine/sync")({ server: { handlers: { POST:
|
|
|
213
209
|
const auth = request.headers.get("authorization") ?? "";
|
|
214
210
|
const token = auth.startsWith("Bearer ") ? auth.slice(7) : "";
|
|
215
211
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
216
|
-
const { SYNC_BODY_CAP, parseArtifactSyncBody } = await import("./artifacts-
|
|
212
|
+
const { SYNC_BODY_CAP, parseArtifactSyncBody } = await import("./artifacts-DOLHJHcd.mjs");
|
|
217
213
|
const parsed = await readJsonBody(request, SYNC_BODY_CAP);
|
|
218
214
|
if (parsed.kind === "too-large") return Response.json({ error: "sync body too large" }, { status: 413 });
|
|
219
215
|
if (parsed.kind === "invalid") return Response.json({ error: "invalid JSON" }, { status: 400 });
|
|
220
216
|
const body = parseArtifactSyncBody(parsed.body);
|
|
221
217
|
if (!body) return Response.json({ error: "invalid sync body" }, { status: 400 });
|
|
222
|
-
const { getArtifactSync } = await import("./boot-
|
|
218
|
+
const { getArtifactSync } = await import("./boot-D8cj4uZj.mjs");
|
|
223
219
|
const r = await (await getArtifactSync()).sync(token, body);
|
|
224
220
|
return Response.json(r.body, { status: r.status });
|
|
225
221
|
} } } });
|
|
226
|
-
/** GET /api/machine/status — is this machine's daemon live? (Bearer device token) */
|
|
227
222
|
var Route$6 = createFileRoute("/api/machine/status")({ server: { handlers: { GET: async ({ request }) => {
|
|
228
223
|
const auth = request.headers.get("authorization") ?? "";
|
|
229
224
|
const token = auth.startsWith("Bearer ") ? auth.slice(7) : "";
|
|
230
225
|
const limited = machineRouteLimit(request, token || void 0);
|
|
231
226
|
if (limited) return limited;
|
|
232
227
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
233
|
-
const { getGateway } = await import("./boot-
|
|
228
|
+
const { getGateway } = await import("./boot-D8cj4uZj.mjs");
|
|
234
229
|
const r = await (await getGateway()).status(token);
|
|
235
230
|
return Response.json(r.body, { status: r.status });
|
|
236
231
|
} } } });
|
|
@@ -247,7 +242,6 @@ function parsePollBody(value) {
|
|
|
247
242
|
if (body.recoveryComplete !== void 0 && typeof body.recoveryComplete !== "boolean") return null;
|
|
248
243
|
return body;
|
|
249
244
|
}
|
|
250
|
-
/** Keep the HTTP adapter's protocol forwarding independently testable. */
|
|
251
245
|
function gatewayPollRequest(body) {
|
|
252
246
|
return {
|
|
253
247
|
protocolVersion: body.protocolVersion,
|
|
@@ -262,7 +256,6 @@ function gatewayPollRequest(body) {
|
|
|
262
256
|
}
|
|
263
257
|
};
|
|
264
258
|
}
|
|
265
|
-
/** POST /api/machine/poll — daemon claims this machine's pending runs (Bearer device token). */
|
|
266
259
|
var Route$5 = createFileRoute("/api/machine/poll")({ server: { handlers: { POST: async ({ request }) => {
|
|
267
260
|
const auth = request.headers.get("authorization") ?? "";
|
|
268
261
|
const token = auth.startsWith("Bearer ") ? auth.slice(7) : "";
|
|
@@ -274,7 +267,7 @@ var Route$5 = createFileRoute("/api/machine/poll")({ server: { handlers: { POST:
|
|
|
274
267
|
if (parsed.kind !== "ok") return Response.json({ error: "invalid JSON body" }, { status: 400 });
|
|
275
268
|
const body = parsePollBody(parsed.body);
|
|
276
269
|
if (!body) return Response.json({ error: "unknown or invalid poll body fields" }, { status: 400 });
|
|
277
|
-
const { getGateway } = await import("./boot-
|
|
270
|
+
const { getGateway } = await import("./boot-D8cj4uZj.mjs");
|
|
278
271
|
const r = await (await getGateway()).pollV4Wait(token, gatewayPollRequest(body));
|
|
279
272
|
return Response.json(r.body, { status: r.status });
|
|
280
273
|
} } } });
|
|
@@ -301,7 +294,7 @@ var Route$4 = createFileRoute("/api/machine/cli")({ server: { handlers: { POST:
|
|
|
301
294
|
if (parsed.kind === "too-large") return Response.json({ error: "body too large" }, { status: 413 });
|
|
302
295
|
const body = parsed.kind === "ok" ? parseCliBody(parsed.body) : null;
|
|
303
296
|
if (!body) return Response.json({ error: "body must be exactly {argv:string[]}" }, { status: 400 });
|
|
304
|
-
const { getCliGateway } = await import("./boot-
|
|
297
|
+
const { getCliGateway } = await import("./boot-D8cj4uZj.mjs");
|
|
305
298
|
const r = await (await getCliGateway()).cli(token, body.argv);
|
|
306
299
|
return Response.json(r.body, { status: r.status });
|
|
307
300
|
} } } });
|
|
@@ -330,7 +323,7 @@ var Route$4 = createFileRoute("/api/machine/cli")({ server: { handlers: { POST:
|
|
|
330
323
|
var PROBE_TIMEOUT_MS = 5e3;
|
|
331
324
|
var Route$3 = createFileRoute("/api/health/db")({ server: { handlers: { GET: async () => {
|
|
332
325
|
try {
|
|
333
|
-
const { db } = await import("./db-
|
|
326
|
+
const { db } = await import("./db-BphSJs66.mjs");
|
|
334
327
|
const ping = db.execute(sql`select 1`);
|
|
335
328
|
const timeout = new Promise((_, reject) => {
|
|
336
329
|
setTimeout(() => reject(/* @__PURE__ */ new Error(`db ping timed out after ${PROBE_TIMEOUT_MS}ms`)), PROBE_TIMEOUT_MS).unref?.();
|
|
@@ -348,10 +341,9 @@ var Route$3 = createFileRoute("/api/health/db")({ server: { handlers: { GET: asy
|
|
|
348
341
|
}, { status: 503 });
|
|
349
342
|
}
|
|
350
343
|
} } } });
|
|
351
|
-
/** Better Auth handler — GET/POST /api/auth/* (OAuth callbacks, session, sign-out). */
|
|
352
344
|
var Route$2 = createFileRoute("/api/auth/$")({ server: { handlers: {
|
|
353
|
-
GET: async ({ request }) => (await import("./auth-
|
|
354
|
-
POST: async ({ request }) => (await import("./auth-
|
|
345
|
+
GET: async ({ request }) => (await import("./auth-LwPp_iim.mjs")).auth.handler(request),
|
|
346
|
+
POST: async ({ request }) => (await import("./auth-LwPp_iim.mjs")).auth.handler(request)
|
|
355
347
|
} } });
|
|
356
348
|
/**
|
|
357
349
|
* `decodeURIComponent` that returns null on malformed percent-encoding instead
|
|
@@ -385,12 +377,12 @@ var Route$1 = createFileRoute("/api/machine/blob/$hash")({ server: { handlers: {
|
|
|
385
377
|
if (!token) return Response.json({ error: "missing device token" }, { status: 401 });
|
|
386
378
|
const hash = safeDecode(new URL(request.url).pathname.split("/").pop() ?? "");
|
|
387
379
|
if (hash === null) return Response.json({ error: "bad hash" }, { status: 400 });
|
|
388
|
-
const { BLOB_CAP } = await import("./artifacts-
|
|
380
|
+
const { BLOB_CAP } = await import("./artifacts-DOLHJHcd.mjs");
|
|
389
381
|
const body = await readByteBody(request, BLOB_CAP);
|
|
390
382
|
if (body.kind === "too-large") return Response.json({ error: "blob exceeds size cap" }, { status: 413 });
|
|
391
383
|
if (body.kind === "invalid") return Response.json({ error: "could not read blob body" }, { status: 400 });
|
|
392
384
|
const buf = Buffer.from(body.bytes.buffer, body.bytes.byteOffset, body.bytes.byteLength);
|
|
393
|
-
const { getArtifactSync } = await import("./boot-
|
|
385
|
+
const { getArtifactSync } = await import("./boot-D8cj4uZj.mjs");
|
|
394
386
|
const r = await (await getArtifactSync()).putBlob(token, hash, buf);
|
|
395
387
|
return Response.json(r.body, { status: r.status });
|
|
396
388
|
} } } });
|
|
@@ -425,11 +417,11 @@ var Route = createFileRoute("/api/artifact/$loopId/$")({ server: { handlers: { G
|
|
|
425
417
|
const segments = after.slice(slash + 1).split("/").map((s) => safeDecode(s));
|
|
426
418
|
if (segments.some((s) => s === null)) return Response.json({ error: "bad path" }, { status: 400 });
|
|
427
419
|
const relPath = segments.join("/");
|
|
428
|
-
const loop = await (await import("./store-
|
|
420
|
+
const loop = await (await import("./store-CFCp_ggC.mjs")).getLoop(loopId);
|
|
429
421
|
if (!loop) return Response.json({ error: "not found" }, { status: 404 });
|
|
430
|
-
const { requestScope, canAccessLoop } = await import("./auth-
|
|
422
|
+
const { requestScope, canAccessLoop } = await import("./auth-LwPp_iim.mjs");
|
|
431
423
|
if (!await canAccessLoop(loop.teamId, await requestScope())) return Response.json({ error: "not found" }, { status: 404 });
|
|
432
|
-
const { readLoopArtifactBytes } = await import("./artifactFiles-
|
|
424
|
+
const { readLoopArtifactBytes } = await import("./artifactFiles-ChuJ4PzC.mjs");
|
|
433
425
|
const r = await readLoopArtifactBytes(loopId, relPath);
|
|
434
426
|
if (r.status !== 200 || !r.bytes) return Response.json({ error: "not found" }, { status: r.status });
|
|
435
427
|
const filename = (r.filename || "file").replace(/["\\\r\n]/g, "_");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { E as useSession } from "./SocialLinks-
|
|
3
|
-
import { t as SignIn } from "./SignIn-
|
|
4
|
-
import { t as DashboardView } from "./DashboardView-
|
|
5
|
-
import { t as Route } from "./routes-
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-
|
|
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-BMHMrOfC.mjs";
|
|
5
|
+
import { t as Route } from "./routes-BuILEmHs.mjs";
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-B9zD2h4Y.js
|
|
7
7
|
var import_jsx_runtime = require_jsx_runtime();
|
|
8
8
|
/**
|
|
9
9
|
* The home route. Under the auth gate it is now a THIN redirect to the explicit
|
|
@@ -15,8 +15,6 @@ var import_jsx_runtime = require_jsx_runtime();
|
|
|
15
15
|
/** First-load failure screen — a calm retry instead of the router's default
|
|
16
16
|
* error dump. Only the initial loader can land here; the in-page poll is
|
|
17
17
|
* fetch-then-set and keeps stale data on a transient blip. */
|
|
18
|
-
/** Open mode renders the dashboard; the gated signed-out case renders SignIn. The
|
|
19
|
-
* gated signed-in case never reaches here (the loader threw a redirect). */
|
|
20
18
|
function Home() {
|
|
21
19
|
const loaded = Route.useLoaderData();
|
|
22
20
|
const { data: session, isPending } = useSession();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
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-
|
|
3
|
-
import { n as fetchLiveData } from "./DashboardView-
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-
|
|
5
|
-
var $$splitErrorComponentImporter = () => import("./routes-
|
|
6
|
-
var $$splitComponentImporter = () => import("./routes-
|
|
2
|
+
import { f as getDefaultTeam, i as authClient, u as getAuthState } from "./SocialLinks-DVCLmql0.mjs";
|
|
3
|
+
import { n as fetchLiveData } from "./DashboardView-BMHMrOfC.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-BuILEmHs.js
|
|
5
|
+
var $$splitErrorComponentImporter = () => import("./routes-FO0MFfYK.mjs");
|
|
6
|
+
var $$splitComponentImporter = () => import("./routes-B9zD2h4Y.mjs");
|
|
7
7
|
/**
|
|
8
8
|
* The home route. Under the auth gate it is now a THIN redirect to the explicit
|
|
9
9
|
* team URL (`/t/<lastUsed|personal>`) so the dashboard's team lives in the path
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { r as LoadErrorCard } from "./actionUi-DCNmrAjw.mjs";
|
|
3
2
|
import { f as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
-
|
|
3
|
+
import { r as LoadErrorCard } from "./actionUi-Cf6DuEC2.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-FO0MFfYK.js
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
/**
|
|
7
7
|
* The home route. Under the auth gate it is now a THIN redirect to the explicit
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __exportAll } from "../_runtime.mjs";
|
|
2
|
-
import { i as __exportAll$1 } from "./factory-
|
|
2
|
+
import { i as __exportAll$1 } from "./factory-pBwrjVTI.mjs";
|
|
3
3
|
import { g as require_react, h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
4
4
|
import { a as RouterProvider, n as defineHandlerCallback, t as renderRouterToStream } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
5
5
|
import { PassThrough, Readable } from "node:stream";
|
|
@@ -3418,7 +3418,7 @@ var defaultSerovalPlugins = [
|
|
|
3418
3418
|
* the dev styles URL for route-scoped CSS collection.
|
|
3419
3419
|
*/
|
|
3420
3420
|
async function getStartManifest(matchedRoutes) {
|
|
3421
|
-
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-
|
|
3421
|
+
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-CojB4Veh.mjs");
|
|
3422
3422
|
const startManifest = tsrStartManifest();
|
|
3423
3423
|
let routes = startManifest.routes;
|
|
3424
3424
|
routes[rootRouteId];
|
|
@@ -3440,147 +3440,147 @@ async function getStartManifest(matchedRoutes) {
|
|
|
3440
3440
|
var manifest = {
|
|
3441
3441
|
"08565e35f6a3dd06ef25401de0343976c47f7ae319d3baed6320b56dd3718311": {
|
|
3442
3442
|
functionName: "runLoop_createServerFn_handler",
|
|
3443
|
-
importer: () => import("./loopApi-
|
|
3443
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3444
3444
|
},
|
|
3445
3445
|
"08c28b892712a1b491b120b74c7dcb81761988d31ccea60216d1807b73c1182c": {
|
|
3446
3446
|
functionName: "getRunDiff_createServerFn_handler",
|
|
3447
|
-
importer: () => import("./loopApi-
|
|
3447
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3448
3448
|
},
|
|
3449
3449
|
"0f279cfe81021a642289ce6e95622e7198aaeab4147880f85824a02ee9ebafcf": {
|
|
3450
3450
|
functionName: "createTeam_createServerFn_handler",
|
|
3451
|
-
importer: () => import("./teamFns-
|
|
3451
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3452
3452
|
},
|
|
3453
3453
|
"0fe12e769203c42f432a927b9cbf13a967a0f9db567b61843598f734afb4f5c6": {
|
|
3454
3454
|
functionName: "listMyTeams_createServerFn_handler",
|
|
3455
|
-
importer: () => import("./loopApi-
|
|
3455
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3456
3456
|
},
|
|
3457
3457
|
"169566e7637a22599b4eb32ee3775574e99677406922bbef7482a102036c33dd": {
|
|
3458
3458
|
functionName: "machineStatus_createServerFn_handler",
|
|
3459
|
-
importer: () => import("./machineFns-
|
|
3459
|
+
importer: () => import("./machineFns-Bb9KNXun.mjs")
|
|
3460
3460
|
},
|
|
3461
3461
|
"23e290b2b7483ceea6fe669024c35b12c2c4ddd76649f6fab21c958ceda02940": {
|
|
3462
3462
|
functionName: "listLoops_createServerFn_handler",
|
|
3463
|
-
importer: () => import("./loopApi-
|
|
3463
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3464
3464
|
},
|
|
3465
3465
|
"27d7eba0b6a2257949392fdd56057275a5c5366484ae01faf3b5897a225ecd83": {
|
|
3466
3466
|
functionName: "finalizeMachine_createServerFn_handler",
|
|
3467
|
-
importer: () => import("./machineFns-
|
|
3467
|
+
importer: () => import("./machineFns-Bb9KNXun.mjs")
|
|
3468
3468
|
},
|
|
3469
3469
|
"284cb82b5e5cb37242d053b1b14449760d8334e9dadffc6dcbba11db2200a709": {
|
|
3470
3470
|
functionName: "addTeamMember_createServerFn_handler",
|
|
3471
|
-
importer: () => import("./teamFns-
|
|
3471
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3472
3472
|
},
|
|
3473
3473
|
"4646f52fb09b83c9c9cef34836f3c9d03416423c879d9e5ceffcafd9a71ecba6": {
|
|
3474
3474
|
functionName: "mintClaim_createServerFn_handler",
|
|
3475
|
-
importer: () => import("./loopApi-
|
|
3475
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3476
3476
|
},
|
|
3477
3477
|
"5660ea82ea5ff2549e0ce2f8f070c54f3e9e24fee84d547601ef5d6ef49a4016": {
|
|
3478
3478
|
functionName: "startLoop_createServerFn_handler",
|
|
3479
|
-
importer: () => import("./loopApi-
|
|
3479
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3480
3480
|
},
|
|
3481
3481
|
"5721e01d84c20ffde19d2191648d76a7e5ede3bbb4f44efa59107a786947cf27": {
|
|
3482
3482
|
functionName: "renameTeam_createServerFn_handler",
|
|
3483
|
-
importer: () => import("./teamFns-
|
|
3483
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3484
3484
|
},
|
|
3485
3485
|
"5e0d6b55f5629faac2f55a68661eeb82668b2be752192b16264ffb5cd1e6fabe": {
|
|
3486
3486
|
functionName: "deleteLoop_createServerFn_handler",
|
|
3487
|
-
importer: () => import("./loopApi-
|
|
3487
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3488
3488
|
},
|
|
3489
3489
|
"6850ba403da9dec5aff45794eb52636ca540ddec2d9e59f5c75ccbb852bfeacb": {
|
|
3490
3490
|
functionName: "stopRun_createServerFn_handler",
|
|
3491
|
-
importer: () => import("./loopApi-
|
|
3491
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3492
3492
|
},
|
|
3493
3493
|
"6f5fe23f6da1d4aecc198b6f71a041c0fe29cabb6ccad807bb3f16c23c5bd9cd": {
|
|
3494
3494
|
functionName: "redeemTeamInvite_createServerFn_handler",
|
|
3495
|
-
importer: () => import("./teamFns-
|
|
3495
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3496
3496
|
},
|
|
3497
3497
|
"7cc22b3a0f6b1c4c73463c3401e981ad42caf6487b479b738ee5aeacb11710da": {
|
|
3498
3498
|
functionName: "canViewTeam_createServerFn_handler",
|
|
3499
|
-
importer: () => import("./loopApi-
|
|
3499
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3500
3500
|
},
|
|
3501
3501
|
"85fdf73d4fee43aed762f93c5d47d33200fbff39e2d082647dc921f610d32698": {
|
|
3502
3502
|
functionName: "loadOlderRuns_createServerFn_handler",
|
|
3503
|
-
importer: () => import("./loopApi-
|
|
3503
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3504
3504
|
},
|
|
3505
3505
|
"94d1108f156fa2273cb78140852e9c3e368de0b8321db0de932a16567671716f": {
|
|
3506
3506
|
functionName: "listManagedTeams_createServerFn_handler",
|
|
3507
|
-
importer: () => import("./teamFns-
|
|
3507
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3508
3508
|
},
|
|
3509
3509
|
"95b7483b333d7649e70c848319417e83c2af6a0327bbcda2d0e331f626dffe05": {
|
|
3510
3510
|
functionName: "pauseLoop_createServerFn_handler",
|
|
3511
|
-
importer: () => import("./loopApi-
|
|
3511
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3512
3512
|
},
|
|
3513
3513
|
"9befe6b8d67ccbbd7aa9b538bde2a161a9894761c8936761a9503fda1a88c0fc": {
|
|
3514
3514
|
functionName: "patchLoop_createServerFn_handler",
|
|
3515
|
-
importer: () => import("./loopApi-
|
|
3515
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3516
3516
|
},
|
|
3517
3517
|
"a3326ed8ecd726fbcc28a439bf0012983cbe387d5062e0155096ee5a558e313b": {
|
|
3518
3518
|
functionName: "removeTeamMember_createServerFn_handler",
|
|
3519
|
-
importer: () => import("./teamFns-
|
|
3519
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3520
3520
|
},
|
|
3521
3521
|
"a6384dc7154d9930422d29396f5de64b3ac69c62ad3824bc4a22d745fc07b293": {
|
|
3522
3522
|
functionName: "deleteMachine_createServerFn_handler",
|
|
3523
|
-
importer: () => import("./machineFns-
|
|
3523
|
+
importer: () => import("./machineFns-Bb9KNXun.mjs")
|
|
3524
3524
|
},
|
|
3525
3525
|
"aa46310016bb8a58b273a648ffd498c87f1f450d12827e30110a3b83ba6a27d9": {
|
|
3526
3526
|
functionName: "listMachines_createServerFn_handler",
|
|
3527
|
-
importer: () => import("./machineFns-
|
|
3527
|
+
importer: () => import("./machineFns-Bb9KNXun.mjs")
|
|
3528
3528
|
},
|
|
3529
3529
|
"b050455aacc84dd2a2c9a45517826ad10f91d8f1545e87cc7015784cc7116a97": {
|
|
3530
3530
|
functionName: "getLoopDetail_createServerFn_handler",
|
|
3531
|
-
importer: () => import("./loopApi-
|
|
3531
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3532
3532
|
},
|
|
3533
3533
|
"b18bbec3d06dfc77714e1e527dfb9172fd7575a64a6c0d6e73ba6dc658dccf0d": {
|
|
3534
3534
|
functionName: "getArtifacts_createServerFn_handler",
|
|
3535
|
-
importer: () => import("./loopApi-
|
|
3535
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3536
3536
|
},
|
|
3537
3537
|
"b8119d5fe6ca1ed9f609702aa2133b5ac5337030c0bdcf92dc7eba889d6bd2e6": {
|
|
3538
3538
|
functionName: "getAuthState_createServerFn_handler",
|
|
3539
|
-
importer: () => import("./loopApi-
|
|
3539
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3540
3540
|
},
|
|
3541
3541
|
"b92e9a08eda2d217bf4028f90dbc6bf7d7e8d7c148ebb8a8330286b5935a3fa1": {
|
|
3542
3542
|
functionName: "revokeTeamInvite_createServerFn_handler",
|
|
3543
|
-
importer: () => import("./teamFns-
|
|
3543
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3544
3544
|
},
|
|
3545
3545
|
"bbc1020c771335020ef51b326d74b1649966740f273913d32040fa2c3c9f5f0b": {
|
|
3546
3546
|
functionName: "createTeamInvite_createServerFn_handler",
|
|
3547
|
-
importer: () => import("./teamFns-
|
|
3547
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3548
3548
|
},
|
|
3549
3549
|
"c3762cecd4a15f7eca064bca295255e942d7c3dce65f66f8593ae145fd7859a0": {
|
|
3550
3550
|
functionName: "setTeamMemberRole_createServerFn_handler",
|
|
3551
|
-
importer: () => import("./teamFns-
|
|
3551
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3552
3552
|
},
|
|
3553
3553
|
"cbb6a1b09b309459bbba3dc3851ae85fc468658b3cda77e22b6c6f3e28b65af4": {
|
|
3554
3554
|
functionName: "getConfig_createServerFn_handler",
|
|
3555
|
-
importer: () => import("./loopApi-
|
|
3555
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3556
3556
|
},
|
|
3557
3557
|
"d2372a81af17eb3a7e4c1407d6ef26a8a9522b66fd6a94858cb35c864b270d77": {
|
|
3558
3558
|
functionName: "deleteTeam_createServerFn_handler",
|
|
3559
|
-
importer: () => import("./teamFns-
|
|
3559
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3560
3560
|
},
|
|
3561
3561
|
"dc0ec955d0d53a150a3e9a4673f98f3509cfb4bd411c512079ae4e94c561b70c": {
|
|
3562
3562
|
functionName: "getDefaultTeam_createServerFn_handler",
|
|
3563
|
-
importer: () => import("./loopApi-
|
|
3563
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3564
3564
|
},
|
|
3565
3565
|
"e233a461e4526dec3cc4cbaa891a7c3621d5967ce7f32b4fb17e9fb645857b9a": {
|
|
3566
3566
|
functionName: "stopLoop_createServerFn_handler",
|
|
3567
|
-
importer: () => import("./loopApi-
|
|
3567
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3568
3568
|
},
|
|
3569
3569
|
"ed10d5fe79208e5e0e4e18e4a17b18d7f7db4dd16204c00c3ac90c4644668841": {
|
|
3570
3570
|
functionName: "getArtifact_createServerFn_handler",
|
|
3571
|
-
importer: () => import("./loopApi-
|
|
3571
|
+
importer: () => import("./loopApi-Im6JSK0p.mjs")
|
|
3572
3572
|
},
|
|
3573
3573
|
"ed679b4e1e05e903a5d4ba4a70d9b9d883991ab22ed59b4d2d69078941818415": {
|
|
3574
3574
|
functionName: "createMachine_createServerFn_handler",
|
|
3575
|
-
importer: () => import("./machineFns-
|
|
3575
|
+
importer: () => import("./machineFns-Bb9KNXun.mjs")
|
|
3576
3576
|
},
|
|
3577
3577
|
"fc7a4775f418dde12f422ff9ca65d9e07428fb0dc35c9399592c0081467330bf": {
|
|
3578
3578
|
functionName: "getTeamDetail_createServerFn_handler",
|
|
3579
|
-
importer: () => import("./teamFns-
|
|
3579
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3580
3580
|
},
|
|
3581
3581
|
"fe7cc1df829414194e9b0615b86584c8510369da18f4d8805ccd76468cadf2ff": {
|
|
3582
3582
|
functionName: "leaveTeam_createServerFn_handler",
|
|
3583
|
-
importer: () => import("./teamFns-
|
|
3583
|
+
importer: () => import("./teamFns-DfqtuBW2.mjs")
|
|
3584
3584
|
}
|
|
3585
3585
|
};
|
|
3586
3586
|
async function getServerFnById(id, access) {
|
|
@@ -5412,7 +5412,7 @@ var getBaseManifest = getProdBaseManifest;
|
|
|
5412
5412
|
var createEarlyHintsForRequest = createEarlyHintsCollector;
|
|
5413
5413
|
async function loadEntries() {
|
|
5414
5414
|
const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
|
|
5415
|
-
import("./router-
|
|
5415
|
+
import("./router-DPz3uoUr.mjs"),
|
|
5416
5416
|
import("./start-4ifArtKx.mjs"),
|
|
5417
5417
|
import("./empty-plugin-adapters-DKUlnwwl.mjs")
|
|
5418
5418
|
]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
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-
|
|
3
|
-
import { n as fetchLiveData } from "./DashboardView-
|
|
4
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/t._teamId-
|
|
5
|
-
var $$splitErrorComponentImporter = () => import("./t._teamId-
|
|
6
|
-
var $$splitComponentImporter = () => import("./t._teamId-
|
|
2
|
+
import { a as canViewTeam, i as authClient, u as getAuthState } from "./SocialLinks-DVCLmql0.mjs";
|
|
3
|
+
import { n as fetchLiveData } from "./DashboardView-BMHMrOfC.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/t._teamId-1t5wOXrV.js
|
|
5
|
+
var $$splitErrorComponentImporter = () => import("./t._teamId-D1BTwhWf.mjs");
|
|
6
|
+
var $$splitComponentImporter = () => import("./t._teamId-A37pQ8Vp.mjs");
|
|
7
7
|
/**
|
|
8
8
|
* The explicit-team dashboard (`/t/<teamId>`): the same dashboard scoped
|
|
9
9
|
* to the team in the PATH, so a view is bookmarkable and each browser tab keeps
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { E as useSession } from "./SocialLinks-
|
|
3
|
-
import { t as SignIn } from "./SignIn-
|
|
4
|
-
import { t as DashboardView } from "./DashboardView-
|
|
5
|
-
import { t as Route } from "./t._teamId-
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/t._teamId-
|
|
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-BMHMrOfC.mjs";
|
|
5
|
+
import { t as Route } from "./t._teamId-1t5wOXrV.mjs";
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/t._teamId-A37pQ8Vp.js
|
|
7
7
|
var import_jsx_runtime = require_jsx_runtime();
|
|
8
8
|
/**
|
|
9
9
|
* The explicit-team dashboard (`/t/<teamId>`): the same dashboard scoped
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h as require_jsx_runtime } from "../_libs/@base-ui/react+[...].mjs";
|
|
2
|
-
import { r as LoadErrorCard } from "./actionUi-DCNmrAjw.mjs";
|
|
3
2
|
import { f as useRouter } from "../_libs/@tanstack/react-router+[...].mjs";
|
|
4
|
-
|
|
3
|
+
import { r as LoadErrorCard } from "./actionUi-Cf6DuEC2.mjs";
|
|
4
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/t._teamId-D1BTwhWf.js
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
/**
|
|
7
7
|
* The explicit-team dashboard (`/t/<teamId>`): the same dashboard scoped
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { A as ensureServer, At as redeemInviteAtomic, Mt as removeTeamMemberGuarded, Nt as renameTeam$2, O as deleteInvite, S as createInvite$1, U as getInvite, X as getTeamMember, Y as getTeam, Yt as userByEmail, _t as listTeamsForUser, gt as listTeamMembers, k as deleteTeamCascade, m as addTeamMember$1, nt as isPersonalTeam, pt as listPendingInvites, v as countLoopsForTeam, w as createTeam$2, zt as setTeamMemberRoleGuarded } from "./boot-
|
|
2
|
-
import { authEnabled, currentUserId } from "./auth-
|
|
1
|
+
import { A as ensureServer, At as redeemInviteAtomic, Mt as removeTeamMemberGuarded, Nt as renameTeam$2, O as deleteInvite, S as createInvite$1, U as getInvite, X as getTeamMember, Y as getTeam, Yt as userByEmail, _t as listTeamsForUser, gt as listTeamMembers, k as deleteTeamCascade, m as addTeamMember$1, nt as isPersonalTeam, pt as listPendingInvites, v as countLoopsForTeam, w as createTeam$2, zt as setTeamMemberRoleGuarded } from "./boot-BIxtZHU-.mjs";
|
|
2
|
+
import { authEnabled, currentUserId } from "./auth-LwPp_iim.mjs";
|
|
3
3
|
import { n as createServerFn } from "./ssr.mjs";
|
|
4
4
|
import { t as createServerRpc } from "./createServerRpc-BD8Xn_0_.mjs";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/teamFns-
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/teamFns-DfqtuBW2.js
|
|
7
7
|
/** Framework-free team authorization and membership rules. Every operation uses an
|
|
8
8
|
* explicit team id; management is owner-only, personal teams cannot be left or
|
|
9
9
|
* deleted, each team retains an owner, loops block deletion, and invites never
|
|
10
10
|
* bypass the login gate. */
|
|
11
|
-
/** Invite link lifetime. */
|
|
12
11
|
var INVITE_TTL_MS = 10080 * 60 * 1e3;
|
|
13
12
|
var NAME_MAX = 80;
|
|
14
13
|
function cleanName(raw) {
|
|
@@ -17,7 +16,6 @@ function cleanName(raw) {
|
|
|
17
16
|
function isRole(v) {
|
|
18
17
|
return v === "owner" || v === "member";
|
|
19
18
|
}
|
|
20
|
-
/** Resolve the actor's role in a team (null ⇒ not a member). */
|
|
21
19
|
async function roleOf(teamId, userId) {
|
|
22
20
|
return (await getTeamMember(teamId, userId))?.role ?? null;
|
|
23
21
|
}
|
|
@@ -222,7 +220,6 @@ async function leaveTeam$1(userId, teamId) {
|
|
|
222
220
|
};
|
|
223
221
|
return { ok: true };
|
|
224
222
|
}
|
|
225
|
-
/** Mint a single-use, short-lived, owner-authorized invite link. */
|
|
226
223
|
async function createInvite(userId, teamId, role, nowMs) {
|
|
227
224
|
const gate = await assertOwner(teamId, userId);
|
|
228
225
|
if (gate) return gate;
|
|
@@ -312,7 +309,6 @@ var SIGNIN_REQUIRED = {
|
|
|
312
309
|
ok: false,
|
|
313
310
|
error: "Team management requires signing in."
|
|
314
311
|
};
|
|
315
|
-
/** Resolve the signed-in user id, or null when the gate is off / no session. */
|
|
316
312
|
async function actor() {
|
|
317
313
|
if (!authEnabled) return null;
|
|
318
314
|
return currentUserId();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as createServerFn } from "./ssr.mjs";
|
|
2
|
-
import { o as createSsrRpc } from "./SocialLinks-
|
|
3
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/teamFns-
|
|
2
|
+
import { o as createSsrRpc } from "./SocialLinks-DVCLmql0.mjs";
|
|
3
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/teamFns-cI_tsiCv.js
|
|
4
4
|
/**
|
|
5
5
|
* Team management server functions — the thin RPC surface over `teamAdmin`
|
|
6
6
|
* (which holds all the rules + authorization). Every mutating fn takes an
|
|
@@ -10,7 +10,6 @@ import { o as createSsrRpc } from "./SocialLinks-ZYIMrv4W.mjs";
|
|
|
10
10
|
* signed-in user, so open mode (single shared workspace, no identities) returns a
|
|
11
11
|
* uniform "sign-in required" error.
|
|
12
12
|
*/
|
|
13
|
-
/** Resolve the signed-in user id, or null when the gate is off / no session. */
|
|
14
13
|
/** GET — every team the caller manages/belongs to (role + member count). Open
|
|
15
14
|
* mode / signed-out ⇒ empty (the settings surface is gated). */
|
|
16
15
|
var listManagedTeams = createServerFn({ method: "GET" }).handler(createSsrRpc("94d1108f156fa2273cb78140852e9c3e368de0b8321db0de932a16567671716f"));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { St as mintDeviceToken, jt as rememberConnectKey } from "./boot-
|
|
1
|
+
import { St as mintDeviceToken, jt as rememberConnectKey } from "./boot-BIxtZHU-.mjs";
|
|
2
2
|
export { mintDeviceToken, rememberConnectKey };
|