Compare commits
16
Commits
main
..
db206bafa3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db206bafa3 | ||
|
|
91f682ec71 | ||
|
|
930bd61e62 | ||
|
|
b66980c0fb | ||
|
|
5101bd3259 | ||
|
|
0e3107623e | ||
|
|
0d9b8fb4fa | ||
|
|
d2c31ba9fa | ||
|
|
bbbf2d0538 | ||
|
|
4ba65d935b | ||
|
|
3c0233f087 | ||
|
|
ae2ba4d317 | ||
|
|
dc7ebd6873 | ||
|
|
f593aabd25 | ||
|
|
ea256f33ea | ||
|
|
912b36cbc7 |
@@ -19,3 +19,4 @@ advisor and code reviewer, not an implementer:
|
|||||||
- Only give a code review when explicitly asked (e.g. "review this",
|
- Only give a code review when explicitly asked (e.g. "review this",
|
||||||
`/code-review`, `/security-review`) — don't volunteer review commentary
|
`/code-review`, `/security-review`) — don't volunteer review commentary
|
||||||
on code you see in passing.
|
on code you see in passing.
|
||||||
|
- Reduce comment usage as much as possible unless the code is particularly confusing and needs an explanation
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"kysely": "^0.29.6",
|
"kysely": "^0.29.6",
|
||||||
"ml-levenberg-marquardt": "^5.1.0",
|
"ml-levenberg-marquardt": "^5.1.0",
|
||||||
"pg": "^8.23.0",
|
"pg": "^8.23.0",
|
||||||
"zipcodes-us": "^1.1.3"
|
"zipcodes-us": "^1.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"kysely-codegen": "^0.20.0",
|
"kysely-codegen": "^0.20.0",
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
|
||||||
|
import { Kysely, sql } from 'kysely'
|
||||||
|
import { addDefaultColumns } from '../db';
|
||||||
|
|
||||||
|
export async function up(db: Kysely<any>): Promise<void> {
|
||||||
|
// TABLE: VERIFICATIONS
|
||||||
|
await db.schema.createTable("verifications")
|
||||||
|
.$call(addDefaultColumns)
|
||||||
|
.addColumn("assessment_id", "bigint", (cb) => cb.notNull().unique())
|
||||||
|
.addColumn("status", "text", (cb) => cb.notNull().defaultTo("draft")) // draft | submitted | in_review | action_requested | completed
|
||||||
|
.addColumn("submitted_at", "timestamptz")
|
||||||
|
.addColumn("completed_at", "timestamptz")
|
||||||
|
.addColumn("completed_by", "uuid")
|
||||||
|
.addColumn("media_key_back_squat", "text")
|
||||||
|
.addColumn("media_key_deadlift", "text")
|
||||||
|
.addColumn("media_key_bench_press", "text")
|
||||||
|
.addColumn("media_key_run", "text")
|
||||||
|
.addColumn("media_key_broad_jump", "text")
|
||||||
|
.addColumn("media_key_cone_drill", "text")
|
||||||
|
.addColumn("verf_back_squat", "boolean")
|
||||||
|
.addColumn("verf_deadlift", "boolean")
|
||||||
|
.addColumn("verf_bench_press", "boolean")
|
||||||
|
.addColumn("verf_run", "boolean")
|
||||||
|
.addColumn("verf_broad_jump", "boolean")
|
||||||
|
.addColumn("verf_cone_drill", "boolean")
|
||||||
|
.addColumn("reviewer_notes", "text") // can be structured in the future, for now keep simple
|
||||||
|
.addForeignKeyConstraint(
|
||||||
|
"fk_verifications_assessment_id",
|
||||||
|
["assessment_id"],
|
||||||
|
"assessments",
|
||||||
|
["id"],
|
||||||
|
(cb) => cb.onDelete("cascade")
|
||||||
|
)
|
||||||
|
.addForeignKeyConstraint(
|
||||||
|
"fk_verifications_completed_by",
|
||||||
|
["completed_by"],
|
||||||
|
"accounts",
|
||||||
|
["id"],
|
||||||
|
(cb) => cb.onDelete("restrict")
|
||||||
|
)
|
||||||
|
.addCheckConstraint(
|
||||||
|
"chk_verifications_completed_fields",
|
||||||
|
sql`status != 'completed' OR (completed_at IS NOT NULL AND completed_by IS NOT NULL)`
|
||||||
|
)
|
||||||
|
.execute()
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down(db: Kysely<any>): Promise<void> {
|
||||||
|
// TABLE: VERIFICATIONS
|
||||||
|
await db.schema.dropTable("verifications").ifExists().execute()
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
import { Activity, Gender, inToCm, lbToKg, minToMs, secToMs } from "@blade-and-brawn/domain";
|
||||||
|
import { db } from "../database/db";
|
||||||
|
import { env, log } from "../util";
|
||||||
|
import type { AccountRole } from "../services/accounts";
|
||||||
|
import { VerificationsService } from "../services/verifications";
|
||||||
|
|
||||||
|
const TEST_DISCORD_ID = "test-verification-seed";
|
||||||
|
const TEST_ASSESSMENT_NAME = "Test Verification Player";
|
||||||
|
|
||||||
|
async function seedTestAccount(): Promise<string> {
|
||||||
|
const existing = await db.selectFrom("accounts")
|
||||||
|
.select("id")
|
||||||
|
.where("discord_id", "=", TEST_DISCORD_ID)
|
||||||
|
.executeTakeFirst();
|
||||||
|
if (existing) {
|
||||||
|
log.info({ id: existing.id }, "test account already seeded, reusing");
|
||||||
|
return existing.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
const account = await db.insertInto("accounts")
|
||||||
|
.values({
|
||||||
|
discord_id: TEST_DISCORD_ID,
|
||||||
|
name: "Test Player",
|
||||||
|
role: "user" satisfies AccountRole,
|
||||||
|
})
|
||||||
|
.returning("id")
|
||||||
|
.executeTakeFirstOrThrow();
|
||||||
|
log.info({ id: account.id }, "seeded test account");
|
||||||
|
return account.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function seedTestAssessment(accountId: string): Promise<string> {
|
||||||
|
const existing = await db.selectFrom("assessments")
|
||||||
|
.select("id")
|
||||||
|
.where("account_id", "=", accountId)
|
||||||
|
.where("name", "=", TEST_ASSESSMENT_NAME)
|
||||||
|
.executeTakeFirst();
|
||||||
|
if (existing) {
|
||||||
|
log.info({ id: existing.id }, "test assessment already seeded, reusing");
|
||||||
|
return existing.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = await db.insertInto("assessments")
|
||||||
|
.values({
|
||||||
|
account_id: accountId,
|
||||||
|
name: TEST_ASSESSMENT_NAME,
|
||||||
|
gender: Gender.Male,
|
||||||
|
age: 22,
|
||||||
|
weight: lbToKg(180),
|
||||||
|
perf_back_squat: lbToKg(225),
|
||||||
|
perf_deadlift: lbToKg(315),
|
||||||
|
perf_bench_press: lbToKg(185),
|
||||||
|
perf_broad_jump: inToCm(96),
|
||||||
|
perf_run: minToMs(7) + secToMs(30),
|
||||||
|
perf_cone_drill: secToMs(7),
|
||||||
|
})
|
||||||
|
.returning("id")
|
||||||
|
.executeTakeFirstOrThrow();
|
||||||
|
log.info({ id: result.id }, "seeded test assessment");
|
||||||
|
return result.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
const answer = prompt(`Seed a test verification request in the database (${env.DATABASE_URL})? (y/N)`);
|
||||||
|
if (answer?.trim().toLowerCase() !== "y") {
|
||||||
|
log.info("Aborted");
|
||||||
|
await db.destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const accountId = await seedTestAccount();
|
||||||
|
const assessmentId = await seedTestAssessment(accountId);
|
||||||
|
|
||||||
|
const verifications = new VerificationsService();
|
||||||
|
const verification = await verifications.create(assessmentId, {
|
||||||
|
[Activity.BackSquat]: `verifications/${assessmentId}/back-squat.mp4`,
|
||||||
|
[Activity.Deadlift]: `verifications/${assessmentId}/deadlift.mp4`,
|
||||||
|
[Activity.BenchPress]: `verifications/${assessmentId}/bench-press.mp4`,
|
||||||
|
[Activity.Run]: `verifications/${assessmentId}/run.png`,
|
||||||
|
[Activity.BroadJump]: `verifications/${assessmentId}/broad-jump.mp4`,
|
||||||
|
[Activity.ConeDrill]: `verifications/${assessmentId}/cone-drill.mp4`,
|
||||||
|
});
|
||||||
|
if (!verification) throw new Error("Test assessment already has a verification; clear the verifications table first");
|
||||||
|
|
||||||
|
const submitted = await verifications.submit(verification.id);
|
||||||
|
if (!submitted) throw new Error("Failed to submit test verification");
|
||||||
|
|
||||||
|
log.info({ id: submitted.id, status: submitted.status, assessmentId, accountId }, "seeded test verification request");
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
log.error({ err }, "seed failed");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
await db.destroy();
|
||||||
|
}
|
||||||
|
})();
|
||||||
+215
-72
@@ -1,21 +1,26 @@
|
|||||||
import {
|
import {
|
||||||
ActivityPerformanceSchema,
|
ActivityPerformanceSchema,
|
||||||
|
ActivityVerificationsSchema,
|
||||||
|
ActivityMediaKeysSchema,
|
||||||
PlayerSchema,
|
PlayerSchema,
|
||||||
|
minToMs,
|
||||||
|
Activity,
|
||||||
} from "@blade-and-brawn/domain"
|
} from "@blade-and-brawn/domain"
|
||||||
import { cors } from "@elysiajs/cors";
|
import { cors } from "@elysiajs/cors";
|
||||||
import { Elysia, NotFoundError, redirect, status, t } from "elysia";
|
import { Elysia, redirect, status, t } from "elysia";
|
||||||
import {
|
import {
|
||||||
PrintfulError,
|
PrintfulError,
|
||||||
WebflowError,
|
WebflowError,
|
||||||
Printful,
|
Printful,
|
||||||
Webflow,
|
Webflow,
|
||||||
} from "@blade-and-brawn/commerce";
|
} from "@blade-and-brawn/commerce";
|
||||||
import { DEFAULT_NAME, DUMMY_PASSWORD_HASH, env, log } from "./util";
|
import { AccountIdSchema, BigIntIdSchema, DEFAULT_NAME, DUMMY_PASSWORD_HASH, env, log } from "./util";
|
||||||
import serverTiming from "@elysia/server-timing";
|
import serverTiming from "@elysia/server-timing";
|
||||||
import jwt from "@elysia/jwt";
|
import jwt from "@elysia/jwt";
|
||||||
import { CommerceService, WOrderStatusSchema } from "./services/commerce";
|
import { CommerceService, WOrderStatusSchema } from "./services/commerce";
|
||||||
import cluster from "node:cluster";
|
import cluster from "node:cluster";
|
||||||
import { randomUUIDv7, sleep } from "bun";
|
import { randomUUIDv7, sleep, S3Client } from "bun";
|
||||||
|
import { DatabaseError } from "pg";
|
||||||
import { CalculatorService, CalculatorUnavailableError } from "./services/calculator";
|
import { CalculatorService, CalculatorUnavailableError } from "./services/calculator";
|
||||||
import { StandardsParamsSchema } from "@blade-and-brawn/calculator";
|
import { StandardsParamsSchema } from "@blade-and-brawn/calculator";
|
||||||
import { StandardsService } from "./services/standards";
|
import { StandardsService } from "./services/standards";
|
||||||
@@ -23,7 +28,7 @@ import { EventsService, EventStatusSchema } from "./services/events";
|
|||||||
import { AccountsService, type AccountRole } from "./services/accounts";
|
import { AccountsService, type AccountRole } from "./services/accounts";
|
||||||
import { Value } from "@sinclair/typebox/value";
|
import { Value } from "@sinclair/typebox/value";
|
||||||
import { AssessmentsService } from "./services/assessments";
|
import { AssessmentsService } from "./services/assessments";
|
||||||
import { Not } from "@sinclair/typebox";
|
import { VerificationsService, VerificationStatusSchema } from "./services/verifications";
|
||||||
|
|
||||||
// CONSTANTS
|
// CONSTANTS
|
||||||
// -----------------------
|
// -----------------------
|
||||||
@@ -40,9 +45,21 @@ const s = (() => {
|
|||||||
const Accounts = new AccountsService(Calculator);
|
const Accounts = new AccountsService(Calculator);
|
||||||
const Events = new EventsService();
|
const Events = new EventsService();
|
||||||
const Assessments = new AssessmentsService();
|
const Assessments = new AssessmentsService();
|
||||||
return { Standards, Calculator, Commerce, Accounts, Events, Assessments };
|
const Verifications = new VerificationsService();
|
||||||
|
return { Standards, Calculator, Commerce, Accounts, Events, Assessments, Verifications };
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// R2 BUCKETS
|
||||||
|
// -----------------------
|
||||||
|
const r2 = {
|
||||||
|
verificationMedia: new S3Client({
|
||||||
|
accessKeyId: env.R2_ACCESS_KEY_ID,
|
||||||
|
secretAccessKey: env.R2_SECRET_ACCESS_KEY,
|
||||||
|
bucket: "verification-media",
|
||||||
|
endpoint: env.R2_URL,
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
// QUEUES
|
// QUEUES
|
||||||
// -----------------------
|
// -----------------------
|
||||||
const queues = [
|
const queues = [
|
||||||
@@ -59,14 +76,14 @@ const authPlugin = new Elysia({ name: "auth" })
|
|||||||
authAdmin: {
|
authAdmin: {
|
||||||
async resolve({ jwt, cookie: { auth } }) {
|
async resolve({ jwt, cookie: { auth } }) {
|
||||||
const token = auth.value && await jwt.verify(auth.value);
|
const token = auth.value && await jwt.verify(auth.value);
|
||||||
if (!token || token.role !== "admin" || !token.accountId || !token.sessionId) throw status(401, "Unauthorized");
|
if (!token || token.role !== "admin" || !token.accountId || !token.sessionId) return status(401, { error: "Unauthorized" });
|
||||||
return { role: token.role.toString(), sessionId: token.sessionId.toString(), accountId: token.accountId.toString() };
|
return { role: token.role.toString(), sessionId: token.sessionId.toString(), accountId: token.accountId.toString() };
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
auth: {
|
auth: {
|
||||||
async resolve({ jwt, cookie: { auth } }) {
|
async resolve({ jwt, cookie: { auth } }) {
|
||||||
const token = auth.value && await jwt.verify(auth.value);
|
const token = auth.value && await jwt.verify(auth.value);
|
||||||
if (!token || !token.role || !token.accountId || !token.sessionId) throw status(401, "Unauthorized");
|
if (!token || !token.role || !token.accountId || !token.sessionId) return status(401, { error: "Unauthorized" });
|
||||||
return { role: token.role.toString(), sessionId: token.sessionId.toString(), accountId: token.accountId.toString() };
|
return { role: token.role.toString(), sessionId: token.sessionId.toString(), accountId: token.accountId.toString() };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,6 +120,11 @@ export const app = new Elysia()
|
|||||||
})
|
})
|
||||||
|
|
||||||
.onError(({ code, error }) => {
|
.onError(({ code, error }) => {
|
||||||
|
// Database Errors
|
||||||
|
if (error instanceof DatabaseError && error.code === "23505")
|
||||||
|
return status(409, { error: "Conflicts with an existing record" });
|
||||||
|
|
||||||
|
// Custom Errors
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case "PrintfulError":
|
case "PrintfulError":
|
||||||
case "WebflowError":
|
case "WebflowError":
|
||||||
@@ -115,7 +137,7 @@ export const app = new Elysia()
|
|||||||
log.error({ err: error.cause }, error.message);
|
log.error({ err: error.cause }, error.message);
|
||||||
return status(error.status, { error: error.message });
|
return status(error.status, { error: error.message });
|
||||||
case "NOT_FOUND":
|
case "NOT_FOUND":
|
||||||
return status(error.status, { error: error.message });
|
return status(404, { error: error.message || "NOT_FOUND" });
|
||||||
case "VALIDATION":
|
case "VALIDATION":
|
||||||
return status(error.status, { error: error.message });
|
return status(error.status, { error: error.message });
|
||||||
default:
|
default:
|
||||||
@@ -123,16 +145,18 @@ export const app = new Elysia()
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
.onAfterResponse(({ request, status, path }) => {
|
.onAfterResponse(({ request, set, path, responseValue }) => {
|
||||||
if (env.NODE_ENV === "development") {
|
if (env.NODE_ENV === "development") {
|
||||||
const skip: Record<string, string[]> = { "/commerce/products/sync/": ["GET"] };
|
const skip: Record<string, string[]> = { "/commerce/products/sync/": ["GET"] };
|
||||||
if (skip[path]?.includes(request.method)) return;
|
if (skip[path]?.includes(request.method)) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info({
|
const failed = Number(set.status) >= 400;
|
||||||
|
log[failed ? "warn" : "info"]({
|
||||||
method: request.method,
|
method: request.method,
|
||||||
path,
|
path,
|
||||||
status
|
status: set.status,
|
||||||
|
...(failed && { response: responseValue }),
|
||||||
}, "request");
|
}, "request");
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -143,7 +167,7 @@ export const app = new Elysia()
|
|||||||
.post("/auth/login", async ({ jwt, body: { password, email }, cookie: { auth } }) => {
|
.post("/auth/login", async ({ jwt, body: { password, email }, cookie: { auth } }) => {
|
||||||
const account = await s.Accounts.getByEmail(email);
|
const account = await s.Accounts.getByEmail(email);
|
||||||
const password_match = await Bun.password.verify(password, account?.password_hash ?? DUMMY_PASSWORD_HASH);
|
const password_match = await Bun.password.verify(password, account?.password_hash ?? DUMMY_PASSWORD_HASH);
|
||||||
if (!account || !password_match) throw status(401, "Invalid credentials");
|
if (!account || !password_match) return status(401, { error: "Invalid credentials" });
|
||||||
|
|
||||||
auth.set({
|
auth.set({
|
||||||
value: await jwt.sign({ role: account.role, sessionId: randomUUIDv7(), accountId: account.id, exp: JWT_EXP }),
|
value: await jwt.sign({ role: account.role, sessionId: randomUUIDv7(), accountId: account.id, exp: JWT_EXP }),
|
||||||
@@ -181,10 +205,10 @@ export const app = new Elysia()
|
|||||||
return redirect(url.toString(), 302);
|
return redirect(url.toString(), 302);
|
||||||
})
|
})
|
||||||
.get("/callback", async ({ query, cookie: { authDiscord, auth }, jwt }) => {
|
.get("/callback", async ({ query, cookie: { authDiscord, auth }, jwt }) => {
|
||||||
if (query.error) throw status(400, { error: query.error_description ? `${query.error}: ${query.error_description}` : query.error });
|
if (query.error) return status(400, { error: query.error_description ? `${query.error}: ${query.error_description}` : query.error });
|
||||||
|
|
||||||
if (!query.state) throw status(400, "No Discord OAuth2 state query parameter provided");
|
if (!query.state) return status(400, { error: "No Discord OAuth2 state query parameter provided" });
|
||||||
if (query.state !== authDiscord.value) throw status(400, "Invalid Discord OAuth state");
|
if (query.state !== authDiscord.value) return status(400, { error: "Invalid Discord OAuth state" });
|
||||||
|
|
||||||
const tokenRes = await fetch("https://discord.com/api/oauth2/token", {
|
const tokenRes = await fetch("https://discord.com/api/oauth2/token", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -201,7 +225,7 @@ export const app = new Elysia()
|
|||||||
});
|
});
|
||||||
if (!tokenRes.ok) {
|
if (!tokenRes.ok) {
|
||||||
const errorBody = await tokenRes.json().catch(() => null);
|
const errorBody = await tokenRes.json().catch(() => null);
|
||||||
throw status(502, { error: errorBody ?? "Discord token exchange failed" });
|
return status(502, { error: errorBody ?? "Discord token exchange failed" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const tokenResPayload = await tokenRes.json();
|
const tokenResPayload = await tokenRes.json();
|
||||||
@@ -212,7 +236,7 @@ export const app = new Elysia()
|
|||||||
});
|
});
|
||||||
if (!identityRes.ok) {
|
if (!identityRes.ok) {
|
||||||
const errorBody = await identityRes.json().catch(() => null);
|
const errorBody = await identityRes.json().catch(() => null);
|
||||||
throw status(502, { error: errorBody ?? "Failed to fetch Discord identity" });
|
return status(502, { error: errorBody ?? "Failed to fetch Discord identity" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const identityResPayload = await identityRes.json();
|
const identityResPayload = await identityRes.json();
|
||||||
@@ -271,7 +295,7 @@ export const app = new Elysia()
|
|||||||
.post("/standards/config/switch", async ({ body: { standardsConfigId } }) => {
|
.post("/standards/config/switch", async ({ body: { standardsConfigId } }) => {
|
||||||
await s.Calculator.Standards.Config.switch(standardsConfigId);
|
await s.Calculator.Standards.Config.switch(standardsConfigId);
|
||||||
}, {
|
}, {
|
||||||
body: t.Object({ standardsConfigId: t.String() })
|
body: t.Object({ standardsConfigId: BigIntIdSchema })
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -279,7 +303,7 @@ export const app = new Elysia()
|
|||||||
.post("/configs", async ({ body: { name, datasetId, params } }) => {
|
.post("/configs", async ({ body: { name, datasetId, params } }) => {
|
||||||
return await s.Standards.Configs.create(name, datasetId, params);
|
return await s.Standards.Configs.create(name, datasetId, params);
|
||||||
}, {
|
}, {
|
||||||
body: t.Object({ name: t.String(), datasetId: t.String(), params: StandardsParamsSchema })
|
body: t.Object({ name: t.String(), datasetId: BigIntIdSchema, params: StandardsParamsSchema })
|
||||||
})
|
})
|
||||||
.get("/configs", async () => {
|
.get("/configs", async () => {
|
||||||
return await s.Standards.Configs.list();
|
return await s.Standards.Configs.list();
|
||||||
@@ -287,29 +311,29 @@ export const app = new Elysia()
|
|||||||
.get("/configs/:id", async ({ params: { id } }) => {
|
.get("/configs/:id", async ({ params: { id } }) => {
|
||||||
return await s.Standards.Configs.get(id);
|
return await s.Standards.Configs.get(id);
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() })
|
params: t.Object({ id: BigIntIdSchema })
|
||||||
})
|
})
|
||||||
.put("/configs/:id", async ({ params: { id }, body: { name, datasetId, params: parameters } }) => {
|
.put("/configs/:id", async ({ params: { id }, body: { name, datasetId, params: parameters } }) => {
|
||||||
await s.Standards.Configs.update(id, name, datasetId, parameters);
|
await s.Standards.Configs.update(id, name, datasetId, parameters);
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() }),
|
params: t.Object({ id: BigIntIdSchema }),
|
||||||
body: t.Object({ name: t.String(), datasetId: t.String(), params: StandardsParamsSchema })
|
body: t.Object({ name: t.String(), datasetId: BigIntIdSchema, params: StandardsParamsSchema })
|
||||||
})
|
})
|
||||||
.delete("/configs/:id", async ({ params: { id } }) => {
|
.delete("/configs/:id", async ({ params: { id } }) => {
|
||||||
await s.Standards.Configs.delete(id);
|
await s.Standards.Configs.delete(id);
|
||||||
}, { params: t.Object({ id: t.String() }) })
|
}, { params: t.Object({ id: BigIntIdSchema }) })
|
||||||
.get("/datasets", async () => {
|
.get("/datasets", async () => {
|
||||||
return await s.Standards.Datasets.list();
|
return await s.Standards.Datasets.list();
|
||||||
})
|
})
|
||||||
.get("/datasets/:id", async ({ params: { id } }) => {
|
.get("/datasets/:id", async ({ params: { id } }) => {
|
||||||
return await s.Standards.Datasets.get(id);
|
return await s.Standards.Datasets.get(id);
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() })
|
params: t.Object({ id: BigIntIdSchema })
|
||||||
})
|
})
|
||||||
.patch("/datasets/:id", async ({ params: { id }, body: { name } }) => {
|
.patch("/datasets/:id", async ({ params: { id }, body: { name } }) => {
|
||||||
await s.Standards.Datasets.update(id, name);
|
await s.Standards.Datasets.update(id, name);
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() }),
|
params: t.Object({ id: BigIntIdSchema }),
|
||||||
body: t.Object({ name: t.String() })
|
body: t.Object({ name: t.String() })
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
@@ -340,7 +364,7 @@ export const app = new Elysia()
|
|||||||
// Sync status
|
// Sync status
|
||||||
.get("/", async ({ sessionId }) => {
|
.get("/", async ({ sessionId }) => {
|
||||||
const latestSyncState = await s.Commerce.Apparel.Syncs.getLatestSyncState(sessionId);
|
const latestSyncState = await s.Commerce.Apparel.Syncs.getLatestSyncState(sessionId);
|
||||||
if (!latestSyncState) throw new NotFoundError("No product sync found for the provided session");
|
if (!latestSyncState) return status(404, { error: "No product sync found for the provided session" });
|
||||||
return latestSyncState;
|
return latestSyncState;
|
||||||
})
|
})
|
||||||
// Run sync
|
// Run sync
|
||||||
@@ -359,10 +383,10 @@ export const app = new Elysia()
|
|||||||
)
|
)
|
||||||
.get("/:pProductId", async ({ params: { pProductId } }) => {
|
.get("/:pProductId", async ({ params: { pProductId } }) => {
|
||||||
const pProduct = await s.Commerce.Printful.Products.get(pProductId);
|
const pProduct = await s.Commerce.Printful.Products.get(pProductId);
|
||||||
if (!pProduct) throw new NotFoundError("Missing printful product");
|
if (!pProduct) return status(404, { error: "Missing printful product" });
|
||||||
|
|
||||||
const wProductId = pProduct.sync_product.external_id.split("-")[0];
|
const wProductId = pProduct.sync_product.external_id.split("-")[0];
|
||||||
if (!wProductId) throw new NotFoundError("Missing webflow product ID");
|
if (!wProductId) return status(404, { error: "Missing webflow product ID" });
|
||||||
|
|
||||||
const wProduct = await s.Commerce.Webflow.Products.get(wProductId);
|
const wProduct = await s.Commerce.Webflow.Products.get(wProductId);
|
||||||
|
|
||||||
@@ -395,7 +419,7 @@ export const app = new Elysia()
|
|||||||
})
|
})
|
||||||
.get("/:wOrderId", async ({ params: { wOrderId } }) => {
|
.get("/:wOrderId", async ({ params: { wOrderId } }) => {
|
||||||
const wOrder = await s.Commerce.Webflow.Orders.get(wOrderId);
|
const wOrder = await s.Commerce.Webflow.Orders.get(wOrderId);
|
||||||
if (!wOrder) throw new NotFoundError("Missing webflow order");
|
if (!wOrder) return status(404, { error: "Missing webflow order" });
|
||||||
|
|
||||||
const pOrder = await s.Commerce.Printful.Orders.get(`@${wOrder.orderId}`);
|
const pOrder = await s.Commerce.Printful.Orders.get(`@${wOrder.orderId}`);
|
||||||
|
|
||||||
@@ -403,10 +427,10 @@ export const app = new Elysia()
|
|||||||
}, { params: t.Object({ wOrderId: t.String() }) })
|
}, { params: t.Object({ wOrderId: t.String() }) })
|
||||||
.post("/sync/:wOrderId", async ({ params: { wOrderId } }) => {
|
.post("/sync/:wOrderId", async ({ params: { wOrderId } }) => {
|
||||||
const wOrder = await s.Commerce.Webflow.Orders.get(wOrderId);
|
const wOrder = await s.Commerce.Webflow.Orders.get(wOrderId);
|
||||||
if (!wOrder) throw new NotFoundError("Missing webflow order");
|
if (!wOrder) return status(404, { error: "Missing webflow order" });
|
||||||
|
|
||||||
const pOrder = await s.Commerce.Printful.Orders.get(`@${wOrder.orderId}`);
|
const pOrder = await s.Commerce.Printful.Orders.get(`@${wOrder.orderId}`);
|
||||||
if (pOrder) throw status(409, { error: "Cannot sync an already synced webflow order" });
|
if (pOrder) return status(409, { error: "Cannot sync an already synced webflow order" });
|
||||||
|
|
||||||
await s.Commerce.Apparel.Orders.Queue.enqueue({
|
await s.Commerce.Apparel.Orders.Queue.enqueue({
|
||||||
type: "apparel_order_create",
|
type: "apparel_order_create",
|
||||||
@@ -438,51 +462,46 @@ export const app = new Elysia()
|
|||||||
})
|
})
|
||||||
.get("/:id", async ({ params: { id } }) => {
|
.get("/:id", async ({ params: { id } }) => {
|
||||||
const event = await s.Events.get(id);
|
const event = await s.Events.get(id);
|
||||||
if (!event) throw new NotFoundError("Event not found");
|
if (!event) return status(404, { error: "Event not found" });
|
||||||
return { ...event, status: EventsService.status(event) };
|
return { ...event, status: EventsService.status(event) };
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() })
|
params: t.Object({ id: BigIntIdSchema })
|
||||||
})
|
})
|
||||||
.post("/:id/retry", async ({ params: { id } }) => {
|
.post("/:id/retry", async ({ params: { id } }) => {
|
||||||
const retried = await s.Events.retry(id);
|
const retried = await s.Events.retry(id);
|
||||||
if (!retried) throw new NotFoundError("Event not found or not in a failed state");
|
if (!retried) return status(404, { error: "Event not found or not in a failed state" });
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() })
|
params: t.Object({ id: BigIntIdSchema })
|
||||||
})
|
})
|
||||||
.get("/groups", async ({ }) => queues.map((q) => q.group))
|
.get("/groups", async ({ }) => queues.map((q) => q.group))
|
||||||
)
|
)
|
||||||
|
|
||||||
// ACCOUNTS
|
// ACCOUNTS
|
||||||
.group("/accounts", (app) => app
|
.group("/accounts", (app) => app
|
||||||
|
// TODO: for added security, could enforce bot or admin only access
|
||||||
.get("/:id/stats", async ({ params: { id } }) => {
|
.get("/:id/stats", async ({ params: { id } }) => {
|
||||||
const stats = await s.Accounts.stats(id);
|
const stats = await s.Accounts.stats(id);
|
||||||
if (!stats) throw new NotFoundError("Account stats not found");
|
if (!stats) return status(404, { error: "Account stats not found" });
|
||||||
return stats;
|
return stats;
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() })
|
params: t.Object({ id: AccountIdSchema })
|
||||||
})
|
})
|
||||||
.guard({ auth: true }, (app) => app
|
|
||||||
.get("/me/stats", async ({ accountId }) => {
|
|
||||||
const stats = await s.Accounts.stats(accountId);
|
|
||||||
if (!stats) throw new NotFoundError("Account stats not found");
|
|
||||||
return stats;
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.guard({ authAdmin: true }, (app) => app
|
.guard({ authAdmin: true }, (app) => app
|
||||||
.get("/:id", async ({ params: { id } }) => {
|
.get("/:id", async ({ params: { id } }) => {
|
||||||
const account = await s.Accounts.get(id);
|
const account = await s.Accounts.get(id);
|
||||||
if (!account) throw new NotFoundError("Account not found");
|
if (!account) return status(404, { error: "Account not found" });
|
||||||
return account;
|
return account;
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() })
|
params: t.Object({ id: AccountIdSchema })
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)
|
.group("/me", { auth: true }, (app) => app
|
||||||
|
.get("/stats", async ({ accountId }) => {
|
||||||
// ASSESSMENTS
|
const stats = await s.Accounts.stats(accountId);
|
||||||
.group("/assessments", (app) => app
|
if (!stats) return status(404, { error: "Account stats not found" });
|
||||||
.guard({ auth: true }, (app) => app
|
return stats;
|
||||||
.post("/me", async ({ body: { player, activityPerformances }, accountId }) => {
|
})
|
||||||
|
.post("/assessments", async ({ body: { player, activityPerformances }, accountId }) => {
|
||||||
return await s.Assessments.create(player, activityPerformances, accountId);
|
return await s.Assessments.create(player, activityPerformances, accountId);
|
||||||
}, {
|
}, {
|
||||||
body: t.Object({
|
body: t.Object({
|
||||||
@@ -490,44 +509,167 @@ export const app = new Elysia()
|
|||||||
activityPerformances: t.Array(ActivityPerformanceSchema)
|
activityPerformances: t.Array(ActivityPerformanceSchema)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.get("/me", async ({ accountId }) => {
|
// TODO: handle @ formatted accountIds
|
||||||
|
.get("/assessments", async ({ accountId }) => {
|
||||||
return await s.Assessments.list({ filter: { accountId } });
|
return await s.Assessments.list({ filter: { accountId } });
|
||||||
})
|
})
|
||||||
.delete("/me/:id", async ({ params: { id }, accountId }) => {
|
.delete("/assessments/:id", async ({ params: { id }, accountId }) => {
|
||||||
const deleted = await s.Assessments.delete(id, accountId);
|
const deleted = await s.Assessments.delete(id, accountId);
|
||||||
if (!deleted) throw new NotFoundError("Assessment not found");
|
if (!deleted) return status(404, { error: "Assessment not found" });
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() })
|
params: t.Object({ id: BigIntIdSchema })
|
||||||
})
|
})
|
||||||
)
|
.post("/verifications", async ({ body: { assessmentId }, accountId }) => {
|
||||||
.guard({ authAdmin: true }, (app) => app
|
const assessment = await s.Assessments.get(assessmentId, accountId);
|
||||||
.post("/", async ({ body: { player, activityPerformances, id } }) => {
|
if (!assessment) return status(404, { error: "Assessment not found" });
|
||||||
await s.Assessments.create(player, activityPerformances, id);
|
|
||||||
|
// TODO: only allow a single active non-completed verification at a time
|
||||||
|
|
||||||
|
const created = await s.Verifications.create(assessmentId);
|
||||||
|
if (!created) return status(409, { error: "This assessment already has a verification" });
|
||||||
|
|
||||||
|
// Generate upload urls
|
||||||
|
const activityMediaUrls: Record<string, string> = {};
|
||||||
|
for (const activity of Object.values(Activity)) {
|
||||||
|
activityMediaUrls[activity] = r2.verificationMedia.presign(
|
||||||
|
`${assessmentId}/${activity}-${crypto.randomUUID()}`,
|
||||||
|
{
|
||||||
|
method: "PUT",
|
||||||
|
expiresIn: 30 * 60 // 30 minutes
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return { created, activityMediaUrls };
|
||||||
}, {
|
}, {
|
||||||
body: t.Object({
|
body: t.Object({
|
||||||
player: PlayerSchema,
|
assessmentId: BigIntIdSchema
|
||||||
activityPerformances: t.Array(ActivityPerformanceSchema),
|
|
||||||
id: t.Optional(t.String()),
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.put("/:id", async ({ body: { player, activityPerformances }, params: { id } }) => {
|
.patch("/verifications/:id", async ({ params: { id }, body: { assessmentId, activityMediaKeys }, accountId }) => {
|
||||||
const updated = await s.Assessments.update(id, player, activityPerformances);
|
const verification = await s.Verifications.get(id, accountId);
|
||||||
if (!updated) throw new NotFoundError("Assessment not found");
|
if (!verification) return status(404, { error: "Verification not found" });
|
||||||
|
|
||||||
|
if (assessmentId === undefined && Object.keys(activityMediaKeys ?? {}).length === 0)
|
||||||
|
return status(400, { error: "Nothing to update" });
|
||||||
|
|
||||||
|
if (assessmentId !== undefined && !await s.Assessments.get(assessmentId, accountId))
|
||||||
|
return status(404, { error: "Assessment not found" });
|
||||||
|
|
||||||
|
const updated = await s.Verifications.update(id, { assessmentId, activityMediaKeys });
|
||||||
|
if (!updated) return status(409, { error: `Cannot update a ${verification.status} verification` });
|
||||||
|
return updated;
|
||||||
}, {
|
}, {
|
||||||
params: t.Object({ id: t.String() }),
|
params: t.Object({ id: BigIntIdSchema }),
|
||||||
body: t.Object({
|
body: t.Object({
|
||||||
player: PlayerSchema,
|
assessmentId: t.Optional(BigIntIdSchema),
|
||||||
activityPerformances: t.Array(ActivityPerformanceSchema),
|
activityMediaKeys: t.Optional(ActivityMediaKeysSchema),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
.post("/verifications/:id/submit", async ({ params: { id }, accountId }) => {
|
||||||
|
if (!await s.Verifications.get(id, accountId)) return status(404, { error: "Verification not found" });
|
||||||
|
|
||||||
|
const submitted = await s.Verifications.submit(id);
|
||||||
|
if (submitted) {
|
||||||
|
// TODO: trigger discord webhook here
|
||||||
|
return submitted;
|
||||||
|
}
|
||||||
|
|
||||||
|
const current = await s.Verifications.get(id, accountId);
|
||||||
|
if (!current) return status(404, { error: "Verification not found" });
|
||||||
|
if (current.status === "submitted") return { id: current.id, status: current.status };
|
||||||
|
|
||||||
|
const missingActivityMediaKeys = VerificationsService.missingActivityMediaKeys(current);
|
||||||
|
return status(409, {
|
||||||
|
error: current.status === "draft" && missingActivityMediaKeys.length > 0
|
||||||
|
? `Missing media for: ${missingActivityMediaKeys.join(", ")}`
|
||||||
|
: `Cannot submit a ${current.status} verification`
|
||||||
|
});
|
||||||
|
}, {
|
||||||
|
params: t.Object({ id: BigIntIdSchema })
|
||||||
|
})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ASSESSMENTS
|
||||||
|
.group("/assessments", { authAdmin: true }, (app) => app
|
||||||
|
.post("/", async ({ body: { player, activityPerformances, id } }) => {
|
||||||
|
return await s.Assessments.create(player, activityPerformances, id);
|
||||||
|
}, {
|
||||||
|
body: t.Object({
|
||||||
|
player: PlayerSchema,
|
||||||
|
activityPerformances: t.Array(ActivityPerformanceSchema),
|
||||||
|
id: t.Optional(t.String()),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.put("/:id", async ({ body: { player, activityPerformances }, params: { id } }) => {
|
||||||
|
const updated = await s.Assessments.update(id, player, activityPerformances);
|
||||||
|
if (!updated) return status(404, { error: "Assessment not found" });
|
||||||
|
return updated;
|
||||||
|
}, {
|
||||||
|
params: t.Object({ id: BigIntIdSchema }),
|
||||||
|
body: t.Object({
|
||||||
|
player: PlayerSchema,
|
||||||
|
activityPerformances: t.Array(ActivityPerformanceSchema),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
|
// VERIFICATIONS
|
||||||
|
.group("/verifications", { authAdmin: true }, (app) => app
|
||||||
|
.get("/", async ({ query }) => {
|
||||||
|
return await s.Verifications.list({
|
||||||
|
filter: { status: query.status },
|
||||||
|
limit: query.limit,
|
||||||
|
offset: query.offset,
|
||||||
|
});
|
||||||
|
}, {
|
||||||
|
query: t.Object({
|
||||||
|
status: t.Optional(VerificationStatusSchema),
|
||||||
|
limit: t.Optional(t.Numeric()),
|
||||||
|
offset: t.Optional(t.Numeric()),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.get("/:id", async ({ params: { id } }) => {
|
||||||
|
const verification = await s.Verifications.get(id);
|
||||||
|
if (!verification) return status(404, { error: "Verification not found" });
|
||||||
|
return verification;
|
||||||
|
}, {
|
||||||
|
params: t.Object({ id: BigIntIdSchema })
|
||||||
|
})
|
||||||
|
.post("/:id/request-action", async ({ params: { id }, body: { reviewerNotes, activityVerifications } }) => {
|
||||||
|
const updated = await s.Verifications.requestAction(id, reviewerNotes ?? null, activityVerifications);
|
||||||
|
if (updated) return updated;
|
||||||
|
|
||||||
|
const verification = await s.Verifications.get(id);
|
||||||
|
if (!verification) return status(404, { error: "Verification not found" });
|
||||||
|
return status(409, { error: `Cannot request action on a ${verification.status} verification` });
|
||||||
|
}, {
|
||||||
|
params: t.Object({ id: BigIntIdSchema }),
|
||||||
|
body: t.Object({
|
||||||
|
reviewerNotes: t.Optional(t.String()),
|
||||||
|
activityVerifications: ActivityVerificationsSchema,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.post("/:id/complete", async ({ params: { id }, body: { activityVerifications }, accountId }) => {
|
||||||
|
const updated = await s.Verifications.complete(id, accountId, activityVerifications);
|
||||||
|
if (updated) return updated;
|
||||||
|
|
||||||
|
const verification = await s.Verifications.get(id);
|
||||||
|
if (!verification) return status(404, { error: "Verification not found" });
|
||||||
|
return status(409, { error: `Cannot complete a ${verification.status} verification` });
|
||||||
|
}, {
|
||||||
|
params: t.Object({ id: BigIntIdSchema }),
|
||||||
|
body: t.Object({
|
||||||
|
activityVerifications: ActivityVerificationsSchema,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
// WEBHOOKS
|
// WEBHOOKS
|
||||||
.post("/webhooks/printful", async ({ body, query }) => {
|
.post("/webhooks/printful", async ({ body, query }) => {
|
||||||
// https://webflow.com/integrations/printful
|
// https://webflow.com/integrations/printful
|
||||||
if (!s.Commerce.Printful.Util.verifySecret(query.secret))
|
if (!s.Commerce.Printful.Util.verifySecret(query.secret))
|
||||||
throw status(400, "Invalid secret");
|
return status(400, { error: "Invalid secret" });
|
||||||
|
|
||||||
const payload = body as Printful.Webhook.EventPayload;
|
const payload = body as Printful.Webhook.EventPayload;
|
||||||
|
|
||||||
@@ -550,7 +692,7 @@ export const app = new Elysia()
|
|||||||
const pProduct = payload.data.sync_product;
|
const pProduct = payload.data.sync_product;
|
||||||
const wProductId = pProduct.external_id.split("-")[0];
|
const wProductId = pProduct.external_id.split("-")[0];
|
||||||
log.info({ externalId: payload.data.sync_product.external_id, wProductId }, "printful webhook: product deleted");
|
log.info({ externalId: payload.data.sync_product.external_id, wProductId }, "printful webhook: product deleted");
|
||||||
if (!wProductId) throw new NotFoundError("Missing webflow product ID");
|
if (!wProductId) return status(404, { error: "Missing webflow product ID" });
|
||||||
|
|
||||||
await s.Commerce.Apparel.Syncs.Queue.enqueue({
|
await s.Commerce.Apparel.Syncs.Queue.enqueue({
|
||||||
type: "apparel_sync_delete",
|
type: "apparel_sync_delete",
|
||||||
@@ -582,7 +724,7 @@ export const app = new Elysia()
|
|||||||
}, { query: t.Object({ secret: t.String() }) })
|
}, { query: t.Object({ secret: t.String() }) })
|
||||||
.post("/webhooks/webflow", async ({ request, body }) => {
|
.post("/webhooks/webflow", async ({ request, body }) => {
|
||||||
if (!s.Commerce.Webflow.Util.verifySecret(request, body))
|
if (!s.Commerce.Webflow.Util.verifySecret(request, body))
|
||||||
throw status(400, "Invalid signature");
|
return status(400, { error: "Invalid signature" });
|
||||||
|
|
||||||
const payload = body as Webflow.Webhook.EventPayload;
|
const payload = body as Webflow.Webhook.EventPayload;
|
||||||
|
|
||||||
@@ -630,3 +772,4 @@ app.listen(3000, async () => {
|
|||||||
|
|
||||||
export type API = typeof app
|
export type API = typeof app
|
||||||
export { type EventStatus } from "./services/events";
|
export { type EventStatus } from "./services/events";
|
||||||
|
export { type VerificationStatus } from "./services/verifications";
|
||||||
|
|||||||
@@ -24,6 +24,14 @@ export class AssessmentsService {
|
|||||||
.executeTakeFirstOrThrow();
|
.executeTakeFirstOrThrow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async get(id: string, accountId?: string) {
|
||||||
|
return await db.selectFrom("assessments")
|
||||||
|
.selectAll()
|
||||||
|
.where("id", "=", id)
|
||||||
|
.$if(accountId !== undefined, (qb) => qb.where("account_id", "=", accountId!))
|
||||||
|
.executeTakeFirst();
|
||||||
|
}
|
||||||
|
|
||||||
async list(opt: {
|
async list(opt: {
|
||||||
filter?: { accountId?: string },
|
filter?: { accountId?: string },
|
||||||
limit?: number,
|
limit?: number,
|
||||||
@@ -41,7 +49,7 @@ export class AssessmentsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async update(id: string, player: Player, activityPerformances: ActivityPerformance[]) {
|
async update(id: string, player: Player, activityPerformances: ActivityPerformance[]) {
|
||||||
const result = await db.updateTable("assessments")
|
return await db.updateTable("assessments")
|
||||||
.where("id", "=", id)
|
.where("id", "=", id)
|
||||||
.set({
|
.set({
|
||||||
name: player.name ?? "Anonymous",
|
name: player.name ?? "Anonymous",
|
||||||
@@ -55,8 +63,8 @@ export class AssessmentsService {
|
|||||||
perf_run: AssessmentsService.performanceFor(activityPerformances, Activity.Run),
|
perf_run: AssessmentsService.performanceFor(activityPerformances, Activity.Run),
|
||||||
perf_cone_drill: AssessmentsService.performanceFor(activityPerformances, Activity.ConeDrill),
|
perf_cone_drill: AssessmentsService.performanceFor(activityPerformances, Activity.ConeDrill),
|
||||||
})
|
})
|
||||||
|
.returning("id")
|
||||||
.executeTakeFirst();
|
.executeTakeFirst();
|
||||||
return result.numUpdatedRows > 0n;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async delete(id: string, accountId: string): Promise<boolean> {
|
async delete(id: string, accountId: string): Promise<boolean> {
|
||||||
|
|||||||
@@ -0,0 +1,193 @@
|
|||||||
|
import { Activity, type ActivityVerifications, type ActivityMediaKeys } from "@blade-and-brawn/domain";
|
||||||
|
import type { Static } from "@sinclair/typebox";
|
||||||
|
import { t } from "elysia";
|
||||||
|
import type { Selectable } from "kysely";
|
||||||
|
import { db } from "../database/db";
|
||||||
|
import type { DB } from "../database/out/db";
|
||||||
|
|
||||||
|
export const VerificationStatusSchema = t.Union([
|
||||||
|
t.Literal("draft"),
|
||||||
|
t.Literal("submitted"),
|
||||||
|
t.Literal("in_review"),
|
||||||
|
t.Literal("action_requested"),
|
||||||
|
t.Literal("completed"),
|
||||||
|
]);
|
||||||
|
export type VerificationStatus = Static<typeof VerificationStatusSchema>;
|
||||||
|
|
||||||
|
const MEDIA_KEY_COLUMN = {
|
||||||
|
[Activity.BackSquat]: "media_key_back_squat",
|
||||||
|
[Activity.Deadlift]: "media_key_deadlift",
|
||||||
|
[Activity.BenchPress]: "media_key_bench_press",
|
||||||
|
[Activity.BroadJump]: "media_key_broad_jump",
|
||||||
|
[Activity.Run]: "media_key_run",
|
||||||
|
[Activity.ConeDrill]: "media_key_cone_drill",
|
||||||
|
} as const satisfies Record<Activity, keyof DB["verifications"]>;
|
||||||
|
|
||||||
|
const ALLOWED_FROM = {
|
||||||
|
update: ["draft", "action_requested"],
|
||||||
|
submit: ["draft"],
|
||||||
|
requestAction: ["submitted", "in_review"],
|
||||||
|
complete: ["submitted", "in_review"],
|
||||||
|
} satisfies Record<string, VerificationStatus[]>;
|
||||||
|
|
||||||
|
export class VerificationsService {
|
||||||
|
static readonly REQUIRED_MEDIA_ACTIVITIES = Object.values(Activity);
|
||||||
|
static readonly ALLOWED_MEDIA_RE = /^(video\/(mp4|quicktime|webm)|image\/(png|jpeg))$/;
|
||||||
|
|
||||||
|
static missingActivityMediaKeys(verification: Pick<Selectable<DB["verifications"]>, (typeof MEDIA_KEY_COLUMN)[Activity]>) {
|
||||||
|
return VerificationsService.REQUIRED_MEDIA_ACTIVITIES.filter((activity) => !verification[MEDIA_KEY_COLUMN[activity]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
async create(assessmentId: string, activityMediaKeys?: ActivityMediaKeys) {
|
||||||
|
return await db.insertInto("verifications")
|
||||||
|
.values({
|
||||||
|
assessment_id: assessmentId,
|
||||||
|
status: "draft" satisfies VerificationStatus,
|
||||||
|
media_key_back_squat: activityMediaKeys?.[Activity.BackSquat] ?? null,
|
||||||
|
media_key_deadlift: activityMediaKeys?.[Activity.Deadlift] ?? null,
|
||||||
|
media_key_bench_press: activityMediaKeys?.[Activity.BenchPress] ?? null,
|
||||||
|
media_key_broad_jump: activityMediaKeys?.[Activity.BroadJump] ?? null,
|
||||||
|
media_key_run: activityMediaKeys?.[Activity.Run] ?? null,
|
||||||
|
media_key_cone_drill: activityMediaKeys?.[Activity.ConeDrill] ?? null,
|
||||||
|
})
|
||||||
|
.onConflict((oc) => oc.column("assessment_id").doNothing())
|
||||||
|
.returning(["id", "status"])
|
||||||
|
.executeTakeFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(id: string, { assessmentId, activityMediaKeys = {} }: { assessmentId?: string, activityMediaKeys?: ActivityMediaKeys }) {
|
||||||
|
const replaced = (activity: Activity) => activityMediaKeys[activity] ? null : undefined;
|
||||||
|
|
||||||
|
return await db.updateTable("verifications")
|
||||||
|
.where("id", "=", id)
|
||||||
|
.where("status", "in", ALLOWED_FROM.update)
|
||||||
|
.set({
|
||||||
|
status: "draft" satisfies VerificationStatus,
|
||||||
|
submitted_at: null,
|
||||||
|
assessment_id: assessmentId,
|
||||||
|
media_key_back_squat: activityMediaKeys[Activity.BackSquat],
|
||||||
|
media_key_deadlift: activityMediaKeys[Activity.Deadlift],
|
||||||
|
media_key_bench_press: activityMediaKeys[Activity.BenchPress],
|
||||||
|
media_key_broad_jump: activityMediaKeys[Activity.BroadJump],
|
||||||
|
media_key_run: activityMediaKeys[Activity.Run],
|
||||||
|
media_key_cone_drill: activityMediaKeys[Activity.ConeDrill],
|
||||||
|
verf_back_squat: replaced(Activity.BackSquat),
|
||||||
|
verf_deadlift: replaced(Activity.Deadlift),
|
||||||
|
verf_bench_press: replaced(Activity.BenchPress),
|
||||||
|
verf_broad_jump: replaced(Activity.BroadJump),
|
||||||
|
verf_run: replaced(Activity.Run),
|
||||||
|
verf_cone_drill: replaced(Activity.ConeDrill),
|
||||||
|
})
|
||||||
|
.returning(["id", "status"])
|
||||||
|
.executeTakeFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
async get(id: string, accountId?: string) {
|
||||||
|
return await VerificationsService.baseQuery()
|
||||||
|
.where("verifications.id", "=", id)
|
||||||
|
.$if(accountId !== undefined, (qb) => qb.where("assessments.account_id", "=", accountId!))
|
||||||
|
.executeTakeFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
async list(opt: {
|
||||||
|
filter?: { status?: VerificationStatus },
|
||||||
|
limit?: number,
|
||||||
|
offset?: number,
|
||||||
|
} = {}) {
|
||||||
|
return await VerificationsService.baseQuery()
|
||||||
|
.$if(opt.filter?.status !== undefined, (qb) => qb
|
||||||
|
.where("verifications.status", "=", opt.filter!.status!)
|
||||||
|
)
|
||||||
|
.orderBy("verifications.submitted_at", (ob) => ob.desc().nullsLast())
|
||||||
|
.orderBy("verifications.created_at", "desc")
|
||||||
|
.$if(opt.limit !== undefined, (qb) => qb.limit(opt.limit!))
|
||||||
|
.$if(opt.offset !== undefined, (qb) => qb.offset(opt.offset!))
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
async submit(id: string) {
|
||||||
|
return await db.updateTable("verifications")
|
||||||
|
.where("id", "=", id)
|
||||||
|
.where("status", "in", ALLOWED_FROM.submit)
|
||||||
|
.where((eb) => eb.and(
|
||||||
|
VerificationsService.REQUIRED_MEDIA_ACTIVITIES.map((activity) => eb(MEDIA_KEY_COLUMN[activity], "is not", null))
|
||||||
|
))
|
||||||
|
.set({ status: "submitted" satisfies VerificationStatus, submitted_at: new Date() })
|
||||||
|
.returning(["id", "status"])
|
||||||
|
.executeTakeFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
async requestAction(id: string, reviewerNotes: string | null, activityVerifications: ActivityVerifications) {
|
||||||
|
return await db.updateTable("verifications")
|
||||||
|
.where("id", "=", id)
|
||||||
|
.where("status", "in", ALLOWED_FROM.requestAction)
|
||||||
|
.set({
|
||||||
|
status: "action_requested" satisfies VerificationStatus,
|
||||||
|
reviewer_notes: reviewerNotes,
|
||||||
|
verf_back_squat: activityVerifications[Activity.BackSquat] ?? null,
|
||||||
|
verf_deadlift: activityVerifications[Activity.Deadlift] ?? null,
|
||||||
|
verf_bench_press: activityVerifications[Activity.BenchPress] ?? null,
|
||||||
|
verf_broad_jump: activityVerifications[Activity.BroadJump] ?? null,
|
||||||
|
verf_run: activityVerifications[Activity.Run] ?? null,
|
||||||
|
verf_cone_drill: activityVerifications[Activity.ConeDrill] ?? null,
|
||||||
|
})
|
||||||
|
.returning(["id", "status"])
|
||||||
|
.executeTakeFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
async complete(id: string, completedBy: string, activityVerifications: ActivityVerifications) {
|
||||||
|
return await db.updateTable("verifications")
|
||||||
|
.where("id", "=", id)
|
||||||
|
.where("status", "in", ALLOWED_FROM.complete)
|
||||||
|
.set({
|
||||||
|
status: "completed" satisfies VerificationStatus,
|
||||||
|
completed_at: new Date(),
|
||||||
|
completed_by: completedBy,
|
||||||
|
verf_back_squat: activityVerifications[Activity.BackSquat] ?? null,
|
||||||
|
verf_deadlift: activityVerifications[Activity.Deadlift] ?? null,
|
||||||
|
verf_bench_press: activityVerifications[Activity.BenchPress] ?? null,
|
||||||
|
verf_broad_jump: activityVerifications[Activity.BroadJump] ?? null,
|
||||||
|
verf_run: activityVerifications[Activity.Run] ?? null,
|
||||||
|
verf_cone_drill: activityVerifications[Activity.ConeDrill] ?? null,
|
||||||
|
})
|
||||||
|
.returning(["id", "status"])
|
||||||
|
.executeTakeFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static baseQuery() {
|
||||||
|
return db.selectFrom("verifications")
|
||||||
|
.innerJoin("assessments", "assessments.id", "verifications.assessment_id")
|
||||||
|
.select([
|
||||||
|
"verifications.id",
|
||||||
|
"verifications.assessment_id",
|
||||||
|
"verifications.status",
|
||||||
|
"verifications.created_at",
|
||||||
|
"verifications.submitted_at",
|
||||||
|
"verifications.completed_at",
|
||||||
|
"verifications.completed_by",
|
||||||
|
"verifications.reviewer_notes",
|
||||||
|
"verifications.media_key_back_squat",
|
||||||
|
"verifications.media_key_deadlift",
|
||||||
|
"verifications.media_key_bench_press",
|
||||||
|
"verifications.media_key_broad_jump",
|
||||||
|
"verifications.media_key_run",
|
||||||
|
"verifications.media_key_cone_drill",
|
||||||
|
"verifications.verf_back_squat",
|
||||||
|
"verifications.verf_deadlift",
|
||||||
|
"verifications.verf_bench_press",
|
||||||
|
"verifications.verf_broad_jump",
|
||||||
|
"verifications.verf_run",
|
||||||
|
"verifications.verf_cone_drill",
|
||||||
|
"assessments.name",
|
||||||
|
"assessments.gender",
|
||||||
|
"assessments.age",
|
||||||
|
"assessments.weight",
|
||||||
|
"assessments.perf_back_squat",
|
||||||
|
"assessments.perf_deadlift",
|
||||||
|
"assessments.perf_bench_press",
|
||||||
|
"assessments.perf_broad_jump",
|
||||||
|
"assessments.perf_run",
|
||||||
|
"assessments.perf_cone_drill",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ import cluster from 'node:cluster';
|
|||||||
import { createHash } from 'node:crypto';
|
import { createHash } from 'node:crypto';
|
||||||
import { pino } from 'pino';
|
import { pino } from 'pino';
|
||||||
import os from 'node:os'
|
import os from 'node:os'
|
||||||
|
import { t } from 'elysia';
|
||||||
|
|
||||||
export const log = pino({
|
export const log = pino({
|
||||||
level: Bun.env.LOG_LEVEL ?? "info",
|
level: Bun.env.LOG_LEVEL ?? "info",
|
||||||
@@ -31,12 +32,19 @@ export const env = {
|
|||||||
BOT_CLIENT_SECRET: requireEnv("BOT_CLIENT_SECRET"),
|
BOT_CLIENT_SECRET: requireEnv("BOT_CLIENT_SECRET"),
|
||||||
BOT_REDIRECT_URL: requireEnv("BOT_REDIRECT_URL"),
|
BOT_REDIRECT_URL: requireEnv("BOT_REDIRECT_URL"),
|
||||||
BOT_LOGIN_REDIRECT_URL: requireEnv("BOT_LOGIN_REDIRECT_URL"),
|
BOT_LOGIN_REDIRECT_URL: requireEnv("BOT_LOGIN_REDIRECT_URL"),
|
||||||
|
CLOUDFLARE_TOKEN: requireEnv("CLOUDFLARE_TOKEN"),
|
||||||
|
R2_ACCESS_KEY_ID: requireEnv("R2_ACCESS_KEY_ID"),
|
||||||
|
R2_SECRET_ACCESS_KEY: requireEnv("R2_SECRET_ACCESS_KEY"),
|
||||||
|
R2_URL: requireEnv("R2_URL")
|
||||||
};
|
};
|
||||||
|
|
||||||
export const WORKER_COUNT = Math.min(os.availableParallelism(), +env.MAX_WORKER_COUNT);
|
export const WORKER_COUNT = Math.min(os.availableParallelism(), +env.MAX_WORKER_COUNT);
|
||||||
export const DEFAULT_NAME = "Default";
|
export const DEFAULT_NAME = "Default";
|
||||||
export const DUMMY_PASSWORD_HASH = await Bun.password.hash("Dummy");
|
export const DUMMY_PASSWORD_HASH = await Bun.password.hash("Dummy");
|
||||||
|
|
||||||
|
export const BigIntIdSchema = t.String({ pattern: "^\\d+$" });
|
||||||
|
export const AccountIdSchema = t.String({ pattern: "^(@.+|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$" });
|
||||||
|
|
||||||
function requireEnv(key: string): string {
|
function requireEnv(key: string): string {
|
||||||
const val = Bun.env[key];
|
const val = Bun.env[key];
|
||||||
if (!val) {
|
if (!val) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"@sveltejs/kit": "^2.70.3",
|
"@sveltejs/kit": "^2.70.3",
|
||||||
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
||||||
"elysia": "^1.4.30",
|
"elysia": "^1.4.30",
|
||||||
"svelte": "^5.57.0",
|
"svelte": "^5.57.1",
|
||||||
"svelte-adapter-bun": "^1.0.1",
|
"svelte-adapter-bun": "^1.0.1",
|
||||||
"svelte-check": "^4.7.6",
|
"svelte-check": "^4.7.6",
|
||||||
"vite": "^7.3.6"
|
"vite": "^7.3.6"
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"@blade-and-brawn/domain": "workspace:*",
|
"@blade-and-brawn/domain": "workspace:*",
|
||||||
"@elysia/eden": "^1.4.10",
|
"@elysia/eden": "^1.4.10",
|
||||||
"@tailwindcss/vite": "^4.3.3",
|
"@tailwindcss/vite": "^4.3.3",
|
||||||
"daisyui": "^5.7.38",
|
"daisyui": "^5.7.46",
|
||||||
"jose": "^6.2.12",
|
"jose": "^6.2.12",
|
||||||
"tailwindcss": "^4.3.3"
|
"tailwindcss": "^4.3.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
import { api } from "$lib/api";
|
import { api } from "$lib/api";
|
||||||
|
|
||||||
type AssessmentRow = NonNullable<
|
type AssessmentRow = NonNullable<
|
||||||
Awaited<ReturnType<typeof api.assessments.me.get>>["data"]
|
Awaited<ReturnType<typeof api.accounts.me.assessments.get>>["data"]
|
||||||
>[number];
|
>[number];
|
||||||
|
|
||||||
interface CalcData {
|
interface CalcData {
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
loading = true;
|
loading = true;
|
||||||
loadError = null;
|
loadError = null;
|
||||||
try {
|
try {
|
||||||
const res = await api.assessments.me.get();
|
const res = await api.accounts.me.assessments.get();
|
||||||
if (res.error) throw res.error;
|
if (res.error) throw res.error;
|
||||||
calculations = (res.data ?? []).map(assessmentToCalc);
|
calculations = (res.data ?? []).map(assessmentToCalc);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
});
|
});
|
||||||
if (res.error) throw res.error;
|
if (res.error) throw res.error;
|
||||||
} else {
|
} else {
|
||||||
const res = await api.assessments.me.post({
|
const res = await api.accounts.me.assessments.post({
|
||||||
player: calculation.player,
|
player: calculation.player,
|
||||||
activityPerformances: calculation.activityPerformances,
|
activityPerformances: calculation.activityPerformances,
|
||||||
});
|
});
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
calculation.deleting = true;
|
calculation.deleting = true;
|
||||||
calculation.deleteError = undefined;
|
calculation.deleteError = undefined;
|
||||||
try {
|
try {
|
||||||
const res = await api.assessments.me({ id: calculation.id }).delete();
|
const res = await api.accounts.me.assessments({ id: calculation.id }).delete();
|
||||||
if (res.error) throw res.error;
|
if (res.error) throw res.error;
|
||||||
calculations.splice(index, 1);
|
calculations.splice(index, 1);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -25,6 +25,11 @@
|
|||||||
path: "/activity",
|
path: "/activity",
|
||||||
links: [{ name: "Events", path: "/events" }],
|
links: [{ name: "Events", path: "/events" }],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Verification",
|
||||||
|
path: "/verification",
|
||||||
|
links: [{ name: "Requests", path: "/requests" }],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
|
|||||||
@@ -0,0 +1,173 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { api } from "$lib/api";
|
||||||
|
import { Activity } from "@blade-and-brawn/domain";
|
||||||
|
import type { VerificationStatus } from "@blade-and-brawn/api";
|
||||||
|
import { onMount } from "svelte";
|
||||||
|
|
||||||
|
type VerificationRow = NonNullable<
|
||||||
|
Awaited<ReturnType<typeof api.verifications.get>>["data"]
|
||||||
|
>[number];
|
||||||
|
|
||||||
|
const LIMIT = 25;
|
||||||
|
|
||||||
|
const STATUS_BADGE: Record<VerificationStatus, string> = {
|
||||||
|
draft: "badge-ghost",
|
||||||
|
submitted: "badge-info",
|
||||||
|
in_review: "badge-warning",
|
||||||
|
action_requested: "badge-error",
|
||||||
|
completed: "badge-success",
|
||||||
|
};
|
||||||
|
|
||||||
|
const MEDIA_KEY_COLUMN = {
|
||||||
|
[Activity.BackSquat]: "media_key_back_squat",
|
||||||
|
[Activity.Deadlift]: "media_key_deadlift",
|
||||||
|
[Activity.BenchPress]: "media_key_bench_press",
|
||||||
|
[Activity.Run]: "media_key_run",
|
||||||
|
[Activity.BroadJump]: "media_key_broad_jump",
|
||||||
|
[Activity.ConeDrill]: "media_key_cone_drill",
|
||||||
|
} as const satisfies Record<Activity, keyof VerificationRow>;
|
||||||
|
|
||||||
|
function videoCount(row: VerificationRow): number {
|
||||||
|
return Object.values(Activity).filter((a) => row[MEDIA_KEY_COLUMN[a]]).length;
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatDate(value: string | Date | null): string {
|
||||||
|
if (!value) return "—";
|
||||||
|
return new Date(value).toLocaleString();
|
||||||
|
}
|
||||||
|
|
||||||
|
function errorMessage(err: unknown): string {
|
||||||
|
const value = (err as { value?: { error?: string } })?.value;
|
||||||
|
return (
|
||||||
|
value?.error ??
|
||||||
|
(err instanceof Error ? err.message : "Unknown error")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let requests = $state<VerificationRow[]>([]);
|
||||||
|
let loading = $state(true);
|
||||||
|
let loadError = $state<string | null>(null);
|
||||||
|
let offset = $state(0);
|
||||||
|
let status = $state<VerificationStatus | "">("submitted");
|
||||||
|
|
||||||
|
async function refresh() {
|
||||||
|
loading = true;
|
||||||
|
loadError = null;
|
||||||
|
try {
|
||||||
|
const res = await api.verifications.get({
|
||||||
|
query: { status: status || undefined, limit: LIMIT, offset },
|
||||||
|
});
|
||||||
|
if (res.error) throw res.error;
|
||||||
|
requests = res.data as VerificationRow[];
|
||||||
|
} catch (err) {
|
||||||
|
loadError = errorMessage(err);
|
||||||
|
} finally {
|
||||||
|
loading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setStatus(value: string) {
|
||||||
|
status = value as VerificationStatus | "";
|
||||||
|
offset = 0;
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
function prevPage() {
|
||||||
|
offset = Math.max(0, offset - LIMIT);
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
function nextPage() {
|
||||||
|
offset += LIMIT;
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(refresh);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="w-full flex items-center gap-2 flex-wrap mt-10 mb-5">
|
||||||
|
<select
|
||||||
|
class="select select-sm w-44"
|
||||||
|
value={status}
|
||||||
|
onchange={(e) => setStatus(e.currentTarget.value)}
|
||||||
|
>
|
||||||
|
<option value="">All statuses</option>
|
||||||
|
<option value="draft">Draft</option>
|
||||||
|
<option value="submitted">Submitted</option>
|
||||||
|
<option value="action_requested">Action requested</option>
|
||||||
|
<option value="completed">Completed</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="btn btn-secondary btn-sm"
|
||||||
|
onclick={refresh}
|
||||||
|
disabled={loading}
|
||||||
|
>
|
||||||
|
{loading ? "Refreshing..." : "Refresh"}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="flex-1"></div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="btn btn-neutral btn-sm"
|
||||||
|
onclick={prevPage}
|
||||||
|
disabled={offset === 0 || loading}
|
||||||
|
>
|
||||||
|
Prev
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn btn-neutral btn-sm"
|
||||||
|
onclick={nextPage}
|
||||||
|
disabled={requests.length < LIMIT || loading}
|
||||||
|
>
|
||||||
|
Next
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#if loadError}
|
||||||
|
<div role="alert" class="alert alert-error w-full mb-4">
|
||||||
|
<span>{loadError}</span>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div class="w-full overflow-x-auto">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Player</th>
|
||||||
|
<th>Status</th>
|
||||||
|
<th>Videos</th>
|
||||||
|
<th>Submitted</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{#each requests as row (row.id)}
|
||||||
|
<tr class="hover:bg-base-300">
|
||||||
|
<td>{row.name}</td>
|
||||||
|
<td>
|
||||||
|
<div class="badge {STATUS_BADGE[row.status]}">
|
||||||
|
{row.status}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>{videoCount(row)} / {Object.values(Activity).length}</td>
|
||||||
|
<td class="whitespace-nowrap">{formatDate(row.submitted_at)}</td>
|
||||||
|
<td>
|
||||||
|
<a
|
||||||
|
class="btn btn-primary btn-xs"
|
||||||
|
href="/verification/requests/{row.id}"
|
||||||
|
>
|
||||||
|
Review
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{:else}
|
||||||
|
<tr>
|
||||||
|
<td colspan="5" class="text-center opacity-60">
|
||||||
|
{loading ? "Loading..." : "No verification requests"}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/each}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,470 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { page } from "$app/state";
|
||||||
|
import { goto } from "$app/navigation";
|
||||||
|
import { api } from "$lib/api";
|
||||||
|
import { Activity, cmToIn, kgToLb } from "@blade-and-brawn/domain";
|
||||||
|
import type { ActivityVerifications } from "@blade-and-brawn/domain";
|
||||||
|
import type { VerificationStatus } from "@blade-and-brawn/api";
|
||||||
|
import { onMount } from "svelte";
|
||||||
|
|
||||||
|
async function loadVerification(id: string) {
|
||||||
|
return await api.verifications({ id }).get();
|
||||||
|
}
|
||||||
|
|
||||||
|
type VerificationDetail = NonNullable<
|
||||||
|
Awaited<ReturnType<typeof loadVerification>>["data"]
|
||||||
|
>;
|
||||||
|
type VerfChoice = "unset" | "pass" | "fail";
|
||||||
|
|
||||||
|
const ACTIVITIES = Object.values(Activity);
|
||||||
|
|
||||||
|
const STATUS_BADGE: Record<VerificationStatus, string> = {
|
||||||
|
draft: "badge-ghost",
|
||||||
|
submitted: "badge-info",
|
||||||
|
in_review: "badge-warning",
|
||||||
|
action_requested: "badge-error",
|
||||||
|
completed: "badge-success",
|
||||||
|
};
|
||||||
|
|
||||||
|
const MEDIA_KEY_COLUMN = {
|
||||||
|
[Activity.BackSquat]: "media_key_back_squat",
|
||||||
|
[Activity.Deadlift]: "media_key_deadlift",
|
||||||
|
[Activity.BenchPress]: "media_key_bench_press",
|
||||||
|
[Activity.Run]: "media_key_run",
|
||||||
|
[Activity.BroadJump]: "media_key_broad_jump",
|
||||||
|
[Activity.ConeDrill]: "media_key_cone_drill",
|
||||||
|
} as const satisfies Record<Activity, keyof VerificationDetail>;
|
||||||
|
|
||||||
|
const VERF_COLUMN = {
|
||||||
|
[Activity.BackSquat]: "verf_back_squat",
|
||||||
|
[Activity.Deadlift]: "verf_deadlift",
|
||||||
|
[Activity.BenchPress]: "verf_bench_press",
|
||||||
|
[Activity.Run]: "verf_run",
|
||||||
|
[Activity.BroadJump]: "verf_broad_jump",
|
||||||
|
[Activity.ConeDrill]: "verf_cone_drill",
|
||||||
|
} as const satisfies Record<Activity, keyof VerificationDetail>;
|
||||||
|
|
||||||
|
const PERF_COLUMN = {
|
||||||
|
[Activity.BackSquat]: "perf_back_squat",
|
||||||
|
[Activity.Deadlift]: "perf_deadlift",
|
||||||
|
[Activity.BenchPress]: "perf_bench_press",
|
||||||
|
[Activity.Run]: "perf_run",
|
||||||
|
[Activity.BroadJump]: "perf_broad_jump",
|
||||||
|
[Activity.ConeDrill]: "perf_cone_drill",
|
||||||
|
} as const satisfies Record<Activity, keyof VerificationDetail>;
|
||||||
|
|
||||||
|
function formatPerformance(activity: Activity, value: number | null): string {
|
||||||
|
if (value === null) return "—";
|
||||||
|
switch (activity) {
|
||||||
|
case Activity.BackSquat:
|
||||||
|
case Activity.Deadlift:
|
||||||
|
case Activity.BenchPress:
|
||||||
|
return `${Math.round(kgToLb(value))} lb`;
|
||||||
|
case Activity.Run: {
|
||||||
|
const totalSeconds = Math.floor(value / 1000);
|
||||||
|
const minutes = Math.floor(totalSeconds / 60);
|
||||||
|
const seconds = totalSeconds % 60;
|
||||||
|
return `${minutes}m ${seconds}s`;
|
||||||
|
}
|
||||||
|
case Activity.ConeDrill:
|
||||||
|
return `${(value / 1000).toFixed(2)} seconds`;
|
||||||
|
case Activity.BroadJump: {
|
||||||
|
const inches = cmToIn(value);
|
||||||
|
const ft = Math.floor(inches / 12);
|
||||||
|
const rem = Math.round((inches - ft * 12) * 2) / 2;
|
||||||
|
return `${ft}' ${rem}"`;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return "—";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function verfChoiceFrom(value: boolean | null): VerfChoice {
|
||||||
|
if (value === true) return "pass";
|
||||||
|
if (value === false) return "fail";
|
||||||
|
return "unset";
|
||||||
|
}
|
||||||
|
|
||||||
|
function toActivityVerifications(
|
||||||
|
choices: Record<Activity, VerfChoice>,
|
||||||
|
): ActivityVerifications {
|
||||||
|
const result: ActivityVerifications = {};
|
||||||
|
for (const activity of ACTIVITIES) {
|
||||||
|
if (choices[activity] === "pass") result[activity] = true;
|
||||||
|
else if (choices[activity] === "fail") result[activity] = false;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function errorMessage(err: unknown): string {
|
||||||
|
const value = (err as { value?: { error?: string } })?.value;
|
||||||
|
return (
|
||||||
|
value?.error ??
|
||||||
|
(err instanceof Error ? err.message : "Unknown error")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const id = page.params.id;
|
||||||
|
|
||||||
|
let verification = $state<VerificationDetail | null>(null);
|
||||||
|
let loading = $state(true);
|
||||||
|
let loadError = $state<string | null>(null);
|
||||||
|
let stepIndex = $state(0);
|
||||||
|
let notes = $state("");
|
||||||
|
let verf = $state<Record<Activity, VerfChoice>>(
|
||||||
|
Object.fromEntries(ACTIVITIES.map((a) => [a, "unset"])) as Record<
|
||||||
|
Activity,
|
||||||
|
VerfChoice
|
||||||
|
>,
|
||||||
|
);
|
||||||
|
let submitting = $state<"action" | "complete" | undefined>();
|
||||||
|
let submitError = $state<string | null>(null);
|
||||||
|
|
||||||
|
const SUMMARY_STEP = ACTIVITIES.length;
|
||||||
|
const isSummaryStep = $derived(stepIndex === SUMMARY_STEP);
|
||||||
|
const reviewedCount = $derived(
|
||||||
|
ACTIVITIES.filter((a) => verf[a] !== "unset").length,
|
||||||
|
);
|
||||||
|
const allReviewed = $derived(reviewedCount === ACTIVITIES.length);
|
||||||
|
const isReadOnly = $derived(
|
||||||
|
verification?.status !== "submitted" &&
|
||||||
|
verification?.status !== "in_review",
|
||||||
|
);
|
||||||
|
|
||||||
|
async function load() {
|
||||||
|
loading = true;
|
||||||
|
loadError = null;
|
||||||
|
try {
|
||||||
|
const res = await loadVerification(id);
|
||||||
|
if (res.error) throw res.error;
|
||||||
|
if (!res.data) throw new Error("Verification not found");
|
||||||
|
verification = res.data;
|
||||||
|
notes = verification.reviewer_notes ?? "";
|
||||||
|
verf = Object.fromEntries(
|
||||||
|
ACTIVITIES.map((a) => [
|
||||||
|
a,
|
||||||
|
verfChoiceFrom(verification![VERF_COLUMN[a]]),
|
||||||
|
]),
|
||||||
|
) as Record<Activity, VerfChoice>;
|
||||||
|
} catch (err) {
|
||||||
|
loadError = errorMessage(err);
|
||||||
|
} finally {
|
||||||
|
loading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function goPrev() {
|
||||||
|
stepIndex = Math.max(0, stepIndex - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function goNext() {
|
||||||
|
stepIndex = Math.min(SUMMARY_STEP, stepIndex + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setVerf(activity: Activity, choice: VerfChoice) {
|
||||||
|
if (isReadOnly) return;
|
||||||
|
verf[activity] = choice;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function requestAction() {
|
||||||
|
submitting = "action";
|
||||||
|
submitError = null;
|
||||||
|
try {
|
||||||
|
const res = await api
|
||||||
|
.verifications({ id })
|
||||||
|
["request-action"].post({
|
||||||
|
reviewerNotes: notes || undefined,
|
||||||
|
activityVerifications: toActivityVerifications(verf),
|
||||||
|
});
|
||||||
|
if (res.error) throw res.error;
|
||||||
|
await goto("/verification/requests");
|
||||||
|
} catch (err) {
|
||||||
|
submitError = errorMessage(err);
|
||||||
|
} finally {
|
||||||
|
submitting = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function complete() {
|
||||||
|
submitting = "complete";
|
||||||
|
submitError = null;
|
||||||
|
try {
|
||||||
|
const res = await api.verifications({ id }).complete.post({
|
||||||
|
activityVerifications: toActivityVerifications(verf),
|
||||||
|
});
|
||||||
|
if (res.error) throw res.error;
|
||||||
|
await goto("/verification/requests");
|
||||||
|
} catch (err) {
|
||||||
|
submitError = errorMessage(err);
|
||||||
|
} finally {
|
||||||
|
submitting = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(load);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="w-full mt-10 mb-5">
|
||||||
|
<a href="/verification/requests" class="link link-hover text-sm opacity-70"
|
||||||
|
>← Back to requests</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#if loading}
|
||||||
|
<div class="w-full flex justify-center pt-10">
|
||||||
|
<span class="loading loading-spinner loading-lg"></span>
|
||||||
|
</div>
|
||||||
|
{:else if loadError}
|
||||||
|
<div role="alert" class="alert alert-error w-full mb-4">
|
||||||
|
<span>{loadError}</span>
|
||||||
|
</div>
|
||||||
|
{:else if verification}
|
||||||
|
{@const v = verification}
|
||||||
|
<div class="w-full flex items-center gap-3 flex-wrap mb-6">
|
||||||
|
<h1 class="text-xl font-semibold">{v.name}</h1>
|
||||||
|
<div class="badge {STATUS_BADGE[v.status]}">{v.status}</div>
|
||||||
|
<span class="text-sm opacity-70"
|
||||||
|
>{v.gender} · age {v.age} · {Math.round(kgToLb(v.weight))} lb</span
|
||||||
|
>
|
||||||
|
<div class="flex-1"></div>
|
||||||
|
<span class="text-sm opacity-70"
|
||||||
|
>{reviewedCount} / {ACTIVITIES.length} reviewed</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div role="tablist" class="tabs tabs-border w-full">
|
||||||
|
{#each ACTIVITIES as activity, i (activity)}
|
||||||
|
<button
|
||||||
|
role="tab"
|
||||||
|
class="tab gap-2"
|
||||||
|
class:tab-active={stepIndex === i}
|
||||||
|
onclick={() => (stepIndex = i)}
|
||||||
|
>
|
||||||
|
{activity}
|
||||||
|
{#if verf[activity] === "pass"}
|
||||||
|
<span class="text-success">✓</span>
|
||||||
|
{:else if verf[activity] === "fail"}
|
||||||
|
<span class="text-error">✕</span>
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
{/each}
|
||||||
|
<button
|
||||||
|
role="tab"
|
||||||
|
class="tab"
|
||||||
|
class:tab-active={isSummaryStep}
|
||||||
|
onclick={() => (stepIndex = SUMMARY_STEP)}
|
||||||
|
>
|
||||||
|
Summary
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#if !isSummaryStep}
|
||||||
|
{@const activity = ACTIVITIES[stepIndex]}
|
||||||
|
<div class="w-full flex flex-col gap-4 bg-base-200/60 rounded-lg p-6 mt-4">
|
||||||
|
<div class="flex items-center justify-between flex-wrap gap-2">
|
||||||
|
<h2 class="text-lg font-semibold">{activity}</h2>
|
||||||
|
<div class="text-right">
|
||||||
|
<div class="text-xs opacity-60">Claimed</div>
|
||||||
|
<div class="text-2xl font-bold">
|
||||||
|
{formatPerformance(activity, v[PERF_COLUMN[activity]])}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{#if v[MEDIA_KEY_COLUMN[activity]]}
|
||||||
|
{@const videoUrl = v[MEDIA_KEY_COLUMN[activity]]}
|
||||||
|
<!-- svelte-ignore a11y_media_has_caption -->
|
||||||
|
<video
|
||||||
|
class="w-full max-h-[480px] rounded-lg bg-black"
|
||||||
|
src={videoUrl}
|
||||||
|
controls
|
||||||
|
preload="metadata"
|
||||||
|
></video>
|
||||||
|
<a
|
||||||
|
class="link link-primary text-xs self-start"
|
||||||
|
href={videoUrl}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
Open video in new tab
|
||||||
|
</a>
|
||||||
|
{:else}
|
||||||
|
<div
|
||||||
|
class="w-full aspect-video rounded-lg bg-base-300 flex items-center justify-center opacity-60"
|
||||||
|
>
|
||||||
|
No video uploaded
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div class="flex gap-2 justify-center mt-2">
|
||||||
|
<button
|
||||||
|
class="btn btn-sm {verf[activity] === 'pass'
|
||||||
|
? 'btn-success'
|
||||||
|
: 'btn-outline btn-success'}"
|
||||||
|
disabled={isReadOnly}
|
||||||
|
onclick={() => setVerf(activity, "pass")}
|
||||||
|
>
|
||||||
|
Pass
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn btn-sm {verf[activity] === 'fail'
|
||||||
|
? 'btn-error'
|
||||||
|
: 'btn-outline btn-error'}"
|
||||||
|
disabled={isReadOnly}
|
||||||
|
onclick={() => setVerf(activity, "fail")}
|
||||||
|
>
|
||||||
|
Fail
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn btn-sm btn-ghost"
|
||||||
|
disabled={isReadOnly || verf[activity] === "unset"}
|
||||||
|
onclick={() => setVerf(activity, "unset")}
|
||||||
|
>
|
||||||
|
Clear
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex justify-between mt-2">
|
||||||
|
<button
|
||||||
|
class="btn btn-neutral btn-sm"
|
||||||
|
onclick={goPrev}
|
||||||
|
disabled={stepIndex === 0}
|
||||||
|
>
|
||||||
|
← Previous
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-neutral btn-sm" onclick={goNext}>
|
||||||
|
Next →
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{:else}
|
||||||
|
<div class="w-full flex flex-col gap-4 bg-base-200/60 rounded-lg p-6 mt-4">
|
||||||
|
<h2 class="text-lg font-semibold">Review summary</h2>
|
||||||
|
|
||||||
|
<div class="overflow-x-auto">
|
||||||
|
<table class="table table-sm">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Activity</th>
|
||||||
|
<th>Claimed</th>
|
||||||
|
<th>Video</th>
|
||||||
|
<th>Result</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{#each ACTIVITIES as activity, i (activity)}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button
|
||||||
|
class="link link-hover"
|
||||||
|
onclick={() => (stepIndex = i)}
|
||||||
|
>
|
||||||
|
{activity}
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{formatPerformance(
|
||||||
|
activity,
|
||||||
|
v[PERF_COLUMN[activity]],
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{#if v[MEDIA_KEY_COLUMN[activity]]}
|
||||||
|
<a
|
||||||
|
class="link link-primary"
|
||||||
|
href={v[MEDIA_KEY_COLUMN[activity]]}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
View
|
||||||
|
</a>
|
||||||
|
{:else}
|
||||||
|
<span class="opacity-50">None</span>
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{#if verf[activity] === "pass"}
|
||||||
|
<span class="badge badge-success"
|
||||||
|
>Pass</span
|
||||||
|
>
|
||||||
|
{:else if verf[activity] === "fail"}
|
||||||
|
<span class="badge badge-error"
|
||||||
|
>Fail</span
|
||||||
|
>
|
||||||
|
{:else}
|
||||||
|
<span class="badge badge-ghost"
|
||||||
|
>Unreviewed</span
|
||||||
|
>
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/each}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="form-control">
|
||||||
|
<span class="label mb-1 text-xs">Reviewer notes</span>
|
||||||
|
<textarea
|
||||||
|
class="textarea textarea-bordered w-full"
|
||||||
|
rows="3"
|
||||||
|
placeholder="What needs to be fixed?"
|
||||||
|
disabled={isReadOnly}
|
||||||
|
bind:value={notes}
|
||||||
|
></textarea>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
{#if submitError}
|
||||||
|
<div role="alert" class="alert alert-error">
|
||||||
|
<span>{submitError}</span>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div class="flex items-center gap-2 justify-between">
|
||||||
|
<button
|
||||||
|
class="btn btn-neutral btn-sm"
|
||||||
|
onclick={goPrev}
|
||||||
|
disabled={stepIndex === 0}
|
||||||
|
>
|
||||||
|
← Previous
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{#if isReadOnly}
|
||||||
|
<span class="text-sm opacity-70">
|
||||||
|
{v.status === "completed"
|
||||||
|
? "This verification is completed and read-only."
|
||||||
|
: v.status === "draft"
|
||||||
|
? "This verification is still a draft (the player hasn't finished uploading) and is read-only."
|
||||||
|
: "This verification is waiting on the player to resubmit and is read-only."}
|
||||||
|
</span>
|
||||||
|
{:else}
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
{#if !allReviewed}
|
||||||
|
<span class="text-xs text-warning"
|
||||||
|
>Mark every activity Pass or Fail to complete</span
|
||||||
|
>
|
||||||
|
{/if}
|
||||||
|
<button
|
||||||
|
class="btn btn-warning"
|
||||||
|
disabled={!!submitting}
|
||||||
|
onclick={requestAction}
|
||||||
|
>
|
||||||
|
{submitting === "action"
|
||||||
|
? "Submitting..."
|
||||||
|
: "Request action"}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn btn-success"
|
||||||
|
disabled={!!submitting || !allReviewed}
|
||||||
|
onclick={complete}
|
||||||
|
>
|
||||||
|
{submitting === "complete"
|
||||||
|
? "Submitting..."
|
||||||
|
: "Complete"}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"kysely": "^0.29.6",
|
"kysely": "^0.29.6",
|
||||||
"ml-levenberg-marquardt": "^5.1.0",
|
"ml-levenberg-marquardt": "^5.1.0",
|
||||||
"pg": "^8.23.0",
|
"pg": "^8.23.0",
|
||||||
"zipcodes-us": "^1.1.3",
|
"zipcodes-us": "^1.2.0",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"kysely-codegen": "^0.20.0",
|
"kysely-codegen": "^0.20.0",
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"@blade-and-brawn/domain": "workspace:*",
|
"@blade-and-brawn/domain": "workspace:*",
|
||||||
"@elysia/eden": "^1.4.10",
|
"@elysia/eden": "^1.4.10",
|
||||||
"@tailwindcss/vite": "^4.3.3",
|
"@tailwindcss/vite": "^4.3.3",
|
||||||
"daisyui": "^5.7.38",
|
"daisyui": "^5.7.46",
|
||||||
"jose": "^6.2.12",
|
"jose": "^6.2.12",
|
||||||
"tailwindcss": "^4.3.3",
|
"tailwindcss": "^4.3.3",
|
||||||
},
|
},
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
"@sveltejs/kit": "^2.70.3",
|
"@sveltejs/kit": "^2.70.3",
|
||||||
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
||||||
"elysia": "^1.4.30",
|
"elysia": "^1.4.30",
|
||||||
"svelte": "^5.57.0",
|
"svelte": "^5.57.1",
|
||||||
"svelte-adapter-bun": "^1.0.1",
|
"svelte-adapter-bun": "^1.0.1",
|
||||||
"svelte-check": "^4.7.6",
|
"svelte-check": "^4.7.6",
|
||||||
"vite": "^7.3.6",
|
"vite": "^7.3.6",
|
||||||
@@ -193,93 +193,93 @@
|
|||||||
|
|
||||||
"@napi-rs/lzma-linux-x64-gnu": ["@napi-rs/lzma-linux-x64-gnu@1.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ=="],
|
"@napi-rs/lzma-linux-x64-gnu": ["@napi-rs/lzma-linux-x64-gnu@1.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ=="],
|
||||||
|
|
||||||
"@oxc-project/types": ["@oxc-project/types@0.149.0", "", {}, "sha512-Efcc+iF0j3Bf67YjEqIqWXbX5XddXoK/Mw4K1/JuXwRCZ8N16VR7iT23nlCc9XrveFVh/E5Rqs2StT0V8v9LdA=="],
|
"@oxc-project/types": ["@oxc-project/types@0.151.0", "", {}, "sha512-J1yXrIlNDZVzE3ada310xeAw7nH8yCAyLPuUIsjKatFPmfn5bS1oW+cM+QsGOtVWd5nhSpbwZWx/rue+r5Z+PA=="],
|
||||||
|
|
||||||
"@pinojs/redact": ["@pinojs/redact@0.4.0", "", {}, "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg=="],
|
"@pinojs/redact": ["@pinojs/redact@0.4.0", "", {}, "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg=="],
|
||||||
|
|
||||||
"@polka/url": ["@polka/url@1.0.0-next.29", "", {}, "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww=="],
|
"@polka/url": ["@polka/url@1.0.0-next.29", "", {}, "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww=="],
|
||||||
|
|
||||||
"@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.2.8", "", { "os": "android", "cpu": "arm" }, "sha512-tN5aztYkKCte4i5SIrrz5yK/HMjEuCqCSCJa418jOV8tZ1cBY3YF2otxB1ktPxzsLA1BeTqwapK0bfjxNvHJVw=="],
|
"@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.2.11", "", { "os": "android", "cpu": "arm" }, "sha512-A5kXfGKvKWWZE0TtPrfsvT+q4Y5d1QG8gGUzpYjGydM+fARM9MuX90PrXYXe0XbsDVgyxxNzHo6giCj90bsFNw=="],
|
||||||
|
|
||||||
"@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.2.8", "", { "os": "android", "cpu": "arm64" }, "sha512-dIYTWl9XprMUiQFoc55KUyk/oS8SKYH3zFl0LTR7RT0Xj4hgSVyuJcroH8JUu8RcpF8fTB6E0aOwCkZoYPcDSQ=="],
|
"@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.2.11", "", { "os": "android", "cpu": "arm64" }, "sha512-z6cTycz+iJ4PVkuL4HHW4DfTfoeU/2nqYYuSOrTmH7yHK5Y0LCOnA03V4ZNxavyVaU1oOqUgIg2klN/s+USGOA=="],
|
||||||
|
|
||||||
"@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.2.8", "", { "os": "darwin", "cpu": "arm64" }, "sha512-PCSDQGXD2IyTEFrcgPyBM8jJuGmrbCMuoIOXdbEGVemruKACXoLQJrb+A45Z0L5t1RQkdfJprAYPkikbh7dzdA=="],
|
"@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.2.11", "", { "os": "darwin", "cpu": "arm64" }, "sha512-jShvqNtP6vDC6/A5JOAzbVV+DkgHqhl/ScVCJEbt+TUY6QYz7YnXcrg3sLtFBniro0f/Ld50ZwCWA6f7KYD1nQ=="],
|
||||||
|
|
||||||
"@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.2.8", "", { "os": "darwin", "cpu": "x64" }, "sha512-Uk7lRsGhPFHVX/sAUC6D5H9Ol30dFHd6iquokll2th3LpdJ3F5CzQB+7DHn0Ri2mG+U7k2zXiPHDrwZenXhwSA=="],
|
"@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.2.11", "", { "os": "darwin", "cpu": "x64" }, "sha512-f2i2xiNWq1Z1l2++q2fuhZRdLAT3aqxD6vRNm1RAxpUoBcdqNB3C0s1Bt+K+PbEx2F5F4gQp6hqKkphCY/xF9w=="],
|
||||||
|
|
||||||
"@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.2.8", "", { "os": "freebsd", "cpu": "x64" }, "sha512-DjszaTEVogPqA5bYzsEeqDCQxbcp2fexQwKcRspYji2yzR68fCf+e4fx6kBSRDwX5/brZaHw/hWS9+A/+/w9sQ=="],
|
"@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.2.11", "", { "os": "freebsd", "cpu": "x64" }, "sha512-4Ir5FSOKIAMr4r0kExpt1s3bMgzJU3rA45AYOHtQpls0oNeqcYBKrWMlckrYH4KCfGLfkfn1tN1dmZPMVsdXow=="],
|
||||||
|
|
||||||
"@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.2.8", "", { "os": "linux", "cpu": "arm" }, "sha512-zmwa7FTmdzB6aaEEuuls18H6Ap5JmJPSoPTuXixeJZV6tG40SyLkApQtz1g8ptZtiEKqj9OM0oNLPh1AgvE31Q=="],
|
"@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.2.11", "", { "os": "linux", "cpu": "arm" }, "sha512-/gnRDM+39BROzAN/k1OZjDPnDMcZxB/0EUxKjONO5yVkNEvlsoMDrxGNKgZi/ttFriS2gwlDNzB65pvNbFOXIQ=="],
|
||||||
|
|
||||||
"@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.2.8", "", { "os": "linux", "cpu": "arm64" }, "sha512-KdYQDPHwJVnbFwdTGMgxsI9SqblBlz6STGM+w1We/d5B8OWWidYH0MwkU/uA1wM5fIpO2MkOVxXrNzzuZhw9ew=="],
|
"@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.2.11", "", { "os": "linux", "cpu": "arm64" }, "sha512-PFaK8HwvAHbaKbBcDNQihjMKYvFnA5hiENx/l5tphTDz1E0WFp32l0A7aq7lyUwGsRw/xSrNIy/gIK4thrSCrw=="],
|
||||||
|
|
||||||
"@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.2.8", "", { "os": "linux", "cpu": "arm64" }, "sha512-jFJTifHnNPY+yzOoNZQfSIysrVyXzEQPhPnOUjmD1bcQGHH6s7c8cViKWar8YplQImE5N9JRqMCLrM2CdxOrZA=="],
|
"@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.2.11", "", { "os": "linux", "cpu": "arm64" }, "sha512-AskzJUIKRLPxkruR1wLKewGbOw+EYfU/9lOrBFj4AFrEA8hPpKFnODWNu2WLaNs0QNkEb9QIJufmVZZIL/bJlg=="],
|
||||||
|
|
||||||
"@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.2.8", "", { "os": "linux", "cpu": "ppc64" }, "sha512-FhiOziBDWPBjbcmRzfLyIJnaP7AVMFXT7YCXPjXxj7wKU3vx24RjrCNN/zjvVa+N2vVoHJwCoUBvsrN/DG3zIA=="],
|
"@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.2.11", "", { "os": "linux", "cpu": "ppc64" }, "sha512-qlUGAheh2yh8afH7QBgx0PrRHN85hKnNd78x8MeMhXivuevgd8vgf6/CstOzmNKY/lLTHvNTrPy98cLnAugzJw=="],
|
||||||
|
|
||||||
"@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.2.8", "", { "os": "linux", "cpu": "s390x" }, "sha512-WnHfADMzOV2Y55wlx1hzzQnar/wDt/VdvWSD99r18Mz9ylNieIGOkRx3UV21h7m/eJvjySYJkO26VvGNFkwsIQ=="],
|
"@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.2.11", "", { "os": "linux", "cpu": "s390x" }, "sha512-secpEad+0vCbSfn8upFySkDskv+bGPk3THSDS9Y89yc4rb4kzqHp8Dmyd9BkQW4SnhNXBZCl/6CrO//hZahNJQ=="],
|
||||||
|
|
||||||
"@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.2.8", "", { "os": "linux", "cpu": "x64" }, "sha512-H9tRr5ibfXFVLxbPOseVewewFpl28zcEdjRDt2FTUZU7odxP0gEv1ki4/kGmcGOh78oRwZuuQllGLZ9zTJp84g=="],
|
"@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.2.11", "", { "os": "linux", "cpu": "x64" }, "sha512-mOVBT3dPpkWm8XBWPmU4bf+U6dYDLeMo/9ojUmis4N0L5uu10qra5vOyngZ7/PSdoE4G9KvRt4bloRxNjLas7A=="],
|
||||||
|
|
||||||
"@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.2.8", "", { "os": "linux", "cpu": "x64" }, "sha512-UefiqfM3D6IVNlZ8tSGs9+Ejjud2T+oxO0IHADU45Y+lyEjD2dVFyZHbkfX0LUb5Zugo/oIv1eCO/KVYhgYJYA=="],
|
"@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.2.11", "", { "os": "linux", "cpu": "x64" }, "sha512-Is78i9A8Ui4SqcxUwFJ9uMmjDn58IbVTjFWYdQestFEgeuEmHMLGNriXnVJKkwG2YiZjw8cP0zCTyDMdDGtOOg=="],
|
||||||
|
|
||||||
"@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.2.8", "", { "os": "none", "cpu": "arm64" }, "sha512-637Ke4kWSy6rp9cxQ9gMOXlxPgIw/c1beASV4M//3+9I4uwBVOOl74G+e3zyU3u19U7RkRl/HuewixZ/Z6+Rjg=="],
|
"@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.2.11", "", { "os": "none", "cpu": "arm64" }, "sha512-dUCXneZ87INUMyQ0D+C0HrEBNUPNXHaPmU5GTjyKTJEiussw9Kaj5Ln8UztPe4epV/ffvgNBEadksdYhmW6xJA=="],
|
||||||
|
|
||||||
"@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.2.8", "", { "os": "win32", "cpu": "arm64" }, "sha512-xWBkPOF1Q9k/Gv1nQXnVdLxKu74jXppuOM4Z3mnypVUJJJwLsMl7hNJGRAUJoG8A5MgOI1ACKM+wBFxSJzKy4A=="],
|
"@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.2.11", "", { "os": "win32", "cpu": "arm64" }, "sha512-jByxb6qfd+bH1xUd0qnfFnb17i9sWBPY2tOavJ0l3tdr3OTu+Kvtm8cd/JV5nFt657b1VqGltxg9olOEfofXWw=="],
|
||||||
|
|
||||||
"@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.8", "", { "os": "win32", "cpu": "x64" }, "sha512-uz2ZvfgXbxqNwijjjbxrnvALwpyODDcgc1T1N8N3rf/DXKQmaFwmB4LX4yyjggpwN2obdQLb2rgirX5ffCWYng=="],
|
"@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.11", "", { "os": "win32", "cpu": "x64" }, "sha512-/PzKqzAJ03i19oy2ItPvyvaVjOjBCNnfaJs8yvUdGBKmiESgnrJSQ2awd81QzFbbnAmu7YO9ZnJrDCb9VSJPRA=="],
|
||||||
|
|
||||||
"@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.1", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="],
|
"@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.1", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="],
|
||||||
|
|
||||||
"@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.63.3", "", { "os": "android", "cpu": "arm" }, "sha512-w3Jnvi1ocaVm/c7yVPpfB98XeSRBMyzp6njL5MVVbGyXjpmUkN+s6Hp4t0PqhGCCaI1ZHMKXt/w0lA1RCaLVcw=="],
|
"@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.63.5", "", { "os": "android", "cpu": "arm" }, "sha512-J25QJU+B78T4FhhBsNpLJyVWOi31mwtpcMwywHmOKH65Q9IWGA81gPj+dnwlhU8wktVriYE+tFAaQgrnJRzAZg=="],
|
||||||
|
|
||||||
"@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.63.3", "", { "os": "android", "cpu": "arm64" }, "sha512-uI/ESiaIbbRYAEhzy8PCUWDp1hB0bjAqM06mW9flOoNO4Q8DQpeoREhBR5Hegfl+wpXiguyJv6XSPzEN7OxyHQ=="],
|
"@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.63.5", "", { "os": "android", "cpu": "arm64" }, "sha512-LDopB3zuZM5Ux9TT2luNEBJW/tYbGU2g1d+VpKk6I+gSKDb+/7sYE6M225gRQt4RbMX6MSwMsVR/phdjVUgRLg=="],
|
||||||
|
|
||||||
"@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.63.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-oxhrd1jmXLwWZ83eQYDXxuqRdkqkzrjR3JobKeuUyfdNZo11FuQIvqEOZhyIT7OBHxXoGslDDjN0cQcM6T0TqQ=="],
|
"@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.63.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-wlJEERGfeuHeBavCL2qVnNacOK43NDoZM4sjkeRPymd04OAE9T1zBqDJgmZ+CIsPTYKwdzpUC8vmOw84dwY4Tg=="],
|
||||||
|
|
||||||
"@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.63.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-7/YiIMghVE8DrxKvNdorAaJVdriOFgOIpdStnPx8ppx5zfTwC3jBCSEAIzB7JD5404m65THl6H93UTTVUvypmg=="],
|
"@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.63.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-4nJJGg5jbo2wwPP4JP+LfEBA3bvP8rU9CLuhp7jWvq9sxEyhjQFTFdrqi+/dHEin/pd8jpT0vcehIpnZtmEdcQ=="],
|
||||||
|
|
||||||
"@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.63.3", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-GXFZRRoMAytaI5z6N3Zhfw0WL18Q0M8r95D5hlC4GqE/lGk8pbSJNUBoOWDfbm6dTciqHj2nU87tI5f6XhQiOg=="],
|
"@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.63.5", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-DrZbyCDF1hneuO6jRbvZ2D7+PIBM6yIwYnJpg2vIk58T+wuFpiaGZrfUr59lDWw45bg+IrpTGLPiNi/Fk4w3Cg=="],
|
||||||
|
|
||||||
"@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.63.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-77W+8X3ddYgPxUpB8nZFQs2Mq+wc4HVlcSRtApXLjYBcnPMkttrSnU8VwKQjeWYhMsITHFs5cWBQ8vz1Q+5RHQ=="],
|
"@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.63.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-gqfUVMJMB3mehqywxp6hTBFfgtMQykZY19+cfiaYP0toIJLb/1DZRJHVkQQGP13W4TAwfZDWeg1qBcheTRioXQ=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.63.3", "", { "os": "linux", "cpu": "arm" }, "sha512-FVkwK+iUC+mq+GipVK46rRVticfAPtvPUNlqlGXUDxdVk/UGjQiiiUVPUrEXdSpU2ufU0XxLGyTqDtBidDOVmg=="],
|
"@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.63.5", "", { "os": "linux", "cpu": "arm" }, "sha512-CFmhpvAwzSaWMlN3VN7UtmoTihlZNzoP0juQib5TQRnYUyDV8dXeWOp29sobWAT6gXl/hQgAClLlEiYozQG3OQ=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.63.3", "", { "os": "linux", "cpu": "arm" }, "sha512-+aGU1t3398yQOVj1Bz8o3e+KtswxAPvO+mtxtNdfXYMkXIHu7XhhkCD7/DEH9q8tF8uhDnMWvfpUKI8y1sZJsg=="],
|
"@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.63.5", "", { "os": "linux", "cpu": "arm" }, "sha512-Uc9H8eXCOayV6JLTH5bXKMId6qbhNHa818/BgYjm4jrlq3vZquC9cqyvHBw17xy5Mnj5f+I3gFK5JcEf3hSqrw=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.63.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-cR0kjpRXR2KJ2oQK8E2KTPtphs+b9hZ8IhTZubNryt/RsqgdOZBQ2Zq0q5UedtiIi0rs3jVhJh55RE1ZHUVGUA=="],
|
"@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.63.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-VcPr/szv/1BFw112Kt//fxulXt/JPqzzidU84iW68L2DdjnOO8QFUv2zTSYBEPHD6movBD4z+bbr5y60GYM7Jw=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.63.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-y1RYi4Q3/9ByVWSSt9kX2ustE0B7kFYbJ6zZdVZVyqopZs3yhCTwRfrjIX4vezUJInma/Gs6BOFDJg7yZmJ0IQ=="],
|
"@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.63.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-BnxtJ5/91BrIHYIkGrmjz/lbMhqEHt1dPFqIxIFR+jPn0xVc/oUSCtIT089zfp5ufwGDlYz2UC+Fe1SRBpYFbQ=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.63.3", "", { "os": "linux", "cpu": "none" }, "sha512-DNhEA5viIj3Z5bZLE4z4oV8N5ozWqDwyt7T6KG7VdLDJ0nW+rNOYlphBl4/3HQkK75qipPLsVOfStHHOwN9WSg=="],
|
"@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.63.5", "", { "os": "linux", "cpu": "none" }, "sha512-LrYcHZwF+fAMNKHYTOQ5osWM4AZF7YF6D+XtsjDyEvljtt11twc+zHVXBLNEjxVSUnKYsOhvVz4Z213eW02COQ=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.63.3", "", { "os": "linux", "cpu": "none" }, "sha512-17gQCqrIpXBX2Cmi9/TygnVOqGbzsba/iaqcYSL8FY7lNugg+7AiYNs5c5nKWD+NRQha36Sa0CqkJqH4XVHwnQ=="],
|
"@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.63.5", "", { "os": "linux", "cpu": "none" }, "sha512-nj7QKQePAAUpCpJHtg0pR0W/b92A9NO17JS3BAQmHDn/yhmkir2p8llrKY9TOhleKIaSzy1JhxS3T9FVld6coA=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.63.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-6LwVnZRIyINpdku/yOcI8Tm9YqLmhHK5emmlOOnW9tO0SYEm1FmKPcsSAGp0NBlqR2P04xaND4jvN6sTHqhq8A=="],
|
"@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.63.5", "", { "os": "linux", "cpu": "ppc64" }, "sha512-5ylkX6dWMeBKge9nTU+Rxfb+ZfaCIJ9lRqIFaK0eAMcWp7OJbYnLveLgXmm0VrvuLKb8qIK+mHyH0qu88RM+iA=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.63.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-xMUqkTXlEUtI/p5AAukMwBRr1enU3efsTeF+bskeFfk8t1C9rcC8sLREcZXmTfAXEbvRdJVSonVJez3TMlbR3w=="],
|
"@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.63.5", "", { "os": "linux", "cpu": "ppc64" }, "sha512-oHK4ZHYFDKjZviK34I+NwgfbGxgI7ztrNxj2hPTSSNFgeq1a/lEd7dHV2fdGAuTH4Iym3RHJg+vAbWaWG4B7Zg=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.63.3", "", { "os": "linux", "cpu": "none" }, "sha512-S3E94co9F9WRRqEaUoQZ38K1gCz6KiM+nL7/3ijq7fDGF3OznjS5TasgYITlvl27GQKtu4lOAOsr5MFwkijvOA=="],
|
"@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.63.5", "", { "os": "linux", "cpu": "none" }, "sha512-UcetmHZ6XOXuUByiKZyQmb55ZPr0LABr3Ec/HB9wKZn6CEAFWZkE+hsJErJ9hbPBC7nI0dKuELx7CoV6IM7TMg=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.63.3", "", { "os": "linux", "cpu": "none" }, "sha512-1QtRDwG42x5BJI3s9mxu5rEjDnfbSnk20HQ9/ylTAYnSwYwxMVb+Vgu34wzzTQ7ogqBybebgQNUDAvZVQ38DbA=="],
|
"@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.63.5", "", { "os": "linux", "cpu": "none" }, "sha512-C5CmDPQBtvjVo8cgQsBs+w6WB0JLkiixhgi6hVLV11hERWdn/p0XcPU2OUcZzac9BPOFq7SbaHFa8r3SWEysCQ=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.63.3", "", { "os": "linux", "cpu": "s390x" }, "sha512-BQhejF6ZXOpxbngiNTP12GCGQeaDVL2QXGeBVViKIYzFHM5RKxTxwUMB1fr1BeNFphFMpnRqC5QSXFSa4z6UQw=="],
|
"@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.63.5", "", { "os": "linux", "cpu": "s390x" }, "sha512-lHVQHJFKsuuxLMi3MQO9XVL8Tje3JR82CzB+QDKC5NWBcsIWuwsn9uIM5e3lBhI+fF1/s63qnyYqsg65+8rV/w=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.63.3", "", { "os": "linux", "cpu": "x64" }, "sha512-SXagRwnI2Wlwlitllu59UK/nGVbD1CKPcNqDplHwIC4BqJcpXFjD32d1R/RbuISa95HdQrZM3/7v4bKiowFaLA=="],
|
"@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.63.5", "", { "os": "linux", "cpu": "x64" }, "sha512-3W9bTFcQNJn71cSJVM9RKIiZOy8DO/XLDii8Uv/Pm6WKqDRj7JV3ZfuXIEfyuy5LXpIzAbB/1M4Ukp9GKNa7nA=="],
|
||||||
|
|
||||||
"@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.63.3", "", { "os": "linux", "cpu": "x64" }, "sha512-2IPozoEALRCziGqE8O9KMK60PMu5TS1huv4fwoeCexj+WjmcwFtX9CTOVbfXCUqcELAubEwRFPYlzb/WvwY2HQ=="],
|
"@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.63.5", "", { "os": "linux", "cpu": "x64" }, "sha512-VDC7rRJlee/scpki96GZ27Omf6yU87s1YXwVTpjE5841faVlDYYT565rgfmoR1U0sqL7z5ivQSDjcsF6VRXyBA=="],
|
||||||
|
|
||||||
"@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.63.3", "", { "os": "openbsd", "cpu": "x64" }, "sha512-AoxqosUHT9IX54hFn2TiN6A7d6ZKTtE6pd2bqWtqkkNJ6HJGaU6FRouGX8L1O7R/ZwsnCnpQrHzb4pDEx+UHRQ=="],
|
"@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.63.5", "", { "os": "openbsd", "cpu": "x64" }, "sha512-z86Ok2p4pTdv5xqCKZsTooO7yBEiaJR/HzU3Wx8RmWsPoLppnMKROhJusQob8B3IE1ghC343kUW9rC2r+Wf3ig=="],
|
||||||
|
|
||||||
"@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.63.3", "", { "os": "none", "cpu": "arm64" }, "sha512-d+CaftKgmkFBzCwezMqqy1d0QNNYugqLCMcYVQWBy5SS2YfeMP8Q8ripkgx9O8IyBXXLHrJ+aaCV4U96usv6Yg=="],
|
"@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.63.5", "", { "os": "none", "cpu": "arm64" }, "sha512-IzQmj+xXwQFGhMAMKMQVXkMwMZN3TqkJgAE0nSsqvVwWWciP4AIPMmWRqOQ2GfX7TUDZr+xqGFcBS36CRPGw0g=="],
|
||||||
|
|
||||||
"@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.63.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-xXlDF6nR1eOuXbdDy5Hl5fmtY7teUDevF/k0O7IPoZe4Tpmdv+lgdE5JRsnhQtt37ql9P0VF2kAN9a0OCZdo+Q=="],
|
"@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.63.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-F6qpTaPc9bwBH85kjy0/BLmLSW1uv7AoOXCoRIkg2arlgCYlWYcAbiMkvZuAcaWk9TpCRG//okznLAqLGshkMw=="],
|
||||||
|
|
||||||
"@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.63.3", "", { "os": "win32", "cpu": "ia32" }, "sha512-YtXAgLN+JP7Ay6qG3eWhc7IHMQPzLc8r3uvhAvlJIoCz/4Q32+Bl9Fmnywidh8v1GOIMmymjovfqY9ETAtysvA=="],
|
"@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.63.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-igoDsTFhhwECBeGbUuLeIk7t8Y1apa+cs6mDWpx2EZ0ch7oEQgzHbFUXN9euoHekCAQzXdXApAGkV6jznS7tWw=="],
|
||||||
|
|
||||||
"@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.63.3", "", { "os": "win32", "cpu": "x64" }, "sha512-WuWtSJRNo549vzcfZyEgfqb6zeSgn1F+UE5kQ+BCjzz0W4MGCjntUHkZVc1VRuAM7+ULaSyhiPxD1spyewFvkQ=="],
|
"@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.63.5", "", { "os": "win32", "cpu": "x64" }, "sha512-U3teMeMbXFmaM5D+OTJpsOXd+wV/qftIeYF9kBKL4v73641qyJmoXFtA28DQLsnmlyayEsTe72xpLHrArq6vHw=="],
|
||||||
|
|
||||||
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.63.3", "", { "os": "win32", "cpu": "x64" }, "sha512-+lIKX7O0+IGe7WuhATaAMMeT7B76vfhXH/l9wLQL+nvyhbw2ohYCKIdWL56JfDu75CWt5oKRP4QFH/jkMtBquA=="],
|
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.63.5", "", { "os": "win32", "cpu": "x64" }, "sha512-ypfC34F3RKXvCXBglGqGMsUSMKlgwd1HX9AOAlx9RoZZ6GaI42YHVeKpzg3JG+wpBUJYTG+NNZhqbDWL8tBZkw=="],
|
||||||
|
|
||||||
"@sapphire/async-queue": ["@sapphire/async-queue@1.5.5", "", {}, "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg=="],
|
"@sapphire/async-queue": ["@sapphire/async-queue@1.5.5", "", {}, "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg=="],
|
||||||
|
|
||||||
@@ -341,7 +341,7 @@
|
|||||||
|
|
||||||
"@types/estree": ["@types/estree@1.0.9", "", {}, "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg=="],
|
"@types/estree": ["@types/estree@1.0.9", "", {}, "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg=="],
|
||||||
|
|
||||||
"@types/node": ["@types/node@26.2.0", "", { "dependencies": { "undici-types": "~8.3.0" } }, "sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg=="],
|
"@types/node": ["@types/node@26.6.3", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-dsqMQQoeTLqu9wynDD00q573mNzso3IdQOAfHRJqLCcmCFPoGo9A1bDpUcv/9tnKpErQWv9uKeGfl37EIS02Yg=="],
|
||||||
|
|
||||||
"@types/pg": ["@types/pg@8.23.1", "", { "dependencies": { "@types/node": "*", "pg-protocol": "*", "pg-types": "^2.2.0" } }, "sha512-fKVHpikPdg4GKks3JuLEhvwSyvwzF23hnabPy6DD8ljVbC7+6J5dQzdv4arV6jqq57djnMgs1HKBxX4P8aBI3A=="],
|
"@types/pg": ["@types/pg@8.23.1", "", { "dependencies": { "@types/node": "*", "pg-protocol": "*", "pg-types": "^2.2.0" } }, "sha512-fKVHpikPdg4GKks3JuLEhvwSyvwzF23hnabPy6DD8ljVbC7+6J5dQzdv4arV6jqq57djnMgs1HKBxX4P8aBI3A=="],
|
||||||
|
|
||||||
@@ -423,7 +423,7 @@
|
|||||||
|
|
||||||
"cosmiconfig": ["cosmiconfig@9.0.2", "", { "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", "parse-json": "^5.2.0" }, "peerDependencies": { "typescript": ">=4.9.5" }, "optionalPeers": ["typescript"] }, "sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg=="],
|
"cosmiconfig": ["cosmiconfig@9.0.2", "", { "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", "parse-json": "^5.2.0" }, "peerDependencies": { "typescript": ">=4.9.5" }, "optionalPeers": ["typescript"] }, "sha512-gtTZxTDau1wL7Y7zifc2dd8jHSK/k6BTx/2Xp/BpdlAdnlYWFVt7qhJqgwi7637yRwRQ3qL4ZidbB4I8tA5VOg=="],
|
||||||
|
|
||||||
"daisyui": ["daisyui@5.7.38", "", {}, "sha512-ef3RIbteKVmlQ10ak0l4mu8F70pBJ2UBjDJNsA2vWlpNdErpHqfxddxK2ckNNYd7vQvTqP4a1A1vSsunlCGVOw=="],
|
"daisyui": ["daisyui@5.7.46", "", {}, "sha512-z/tfVXLpLRe1ojGeokzxauHA9Ij5CGfk+83EdatQbFSVr02h5mUcp4nkgQJOw68wH1wAAPu/SY+MWbDdJG2R4w=="],
|
||||||
|
|
||||||
"dateformat": ["dateformat@4.6.3", "", {}, "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA=="],
|
"dateformat": ["dateformat@4.6.3", "", {}, "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA=="],
|
||||||
|
|
||||||
@@ -433,7 +433,7 @@
|
|||||||
|
|
||||||
"detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
|
"detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
|
||||||
|
|
||||||
"devalue": ["devalue@5.9.2", "", {}, "sha512-po4PAY5c53tw5XMocSnf8A/5OHhbbUftpr93aEN6BBoAdntUmK7vu7wOATqvt7cXO7m1Cl4gMVn6p7n6n4mj0w=="],
|
"devalue": ["devalue@5.9.4", "", {}, "sha512-sPAT4pztbu6586/hrhOnMKS17IJrvg12mXiSPSS3W5qDeN2RGgvZ0diZCm31dBbnevfVmujNO3IM2wrS4Y2Rhg=="],
|
||||||
|
|
||||||
"diff": ["diff@8.0.4", "", {}, "sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw=="],
|
"diff": ["diff@8.0.4", "", {}, "sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw=="],
|
||||||
|
|
||||||
@@ -459,7 +459,7 @@
|
|||||||
|
|
||||||
"esm-env": ["esm-env@1.2.2", "", {}, "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA=="],
|
"esm-env": ["esm-env@1.2.2", "", {}, "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA=="],
|
||||||
|
|
||||||
"esrap": ["esrap@2.3.7", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, "peerDependencies": { "@typescript-eslint/types": "^8.2.0" }, "optionalPeers": ["@typescript-eslint/types"] }, "sha512-n2nf7fZR3c9yXf0BPEuHuXqT+KW0SJVj4cN5FMEkpCZ3scLjOQWpiccyCxVzCC2q1wubTghuEGzngJY/7Ah0Ow=="],
|
"esrap": ["esrap@2.4.0", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" }, "peerDependencies": { "@typescript-eslint/types": "^8.2.0" }, "optionalPeers": ["@typescript-eslint/types"] }, "sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA=="],
|
||||||
|
|
||||||
"exact-mirror": ["exact-mirror@0.2.7", "", { "peerDependencies": { "@sinclair/typebox": "^0.34.15" }, "optionalPeers": ["@sinclair/typebox"] }, "sha512-+MeEmDcLA4o/vjK2zujgk+1VTxPR4hdp23qLqkWfStbECtAq9gmsvQa3LW6z/0GXZyHJobrCnmy1cdeE7BjsYg=="],
|
"exact-mirror": ["exact-mirror@0.2.7", "", { "peerDependencies": { "@sinclair/typebox": "^0.34.15" }, "optionalPeers": ["@sinclair/typebox"] }, "sha512-+MeEmDcLA4o/vjK2zujgk+1VTxPR4hdp23qLqkWfStbECtAq9gmsvQa3LW6z/0GXZyHJobrCnmy1cdeE7BjsYg=="],
|
||||||
|
|
||||||
@@ -473,7 +473,7 @@
|
|||||||
|
|
||||||
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
|
"fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],
|
||||||
|
|
||||||
"file-type": ["file-type@22.1.0", "", { "dependencies": { "@tokenizer/inflate": "^0.4.1", "strtok3": "^10.3.5", "token-types": "^6.1.2", "uint8array-extras": "^1.5.0" } }, "sha512-fbvf9u6jnHWr1EP6V8R99E9iLMhNLXgZkUzWBiPpJ5/89UJ/Atuxjn5YXR+XaZWo2hc2/8mGfTez+NDAgOcpLA=="],
|
"file-type": ["file-type@22.1.1", "", { "dependencies": { "@tokenizer/inflate": "^0.4.1", "strtok3": "^10.3.5", "token-types": "^6.1.2", "uint8array-extras": "^1.5.0" } }, "sha512-sEB0oStmeLGtpmSAD88RDNuLsvhv4iC3u0lE25CUvfCULvj49xoQ3l3K525Vn+ZzsZ6DOLajQCV6RmhwwhqiJg=="],
|
||||||
|
|
||||||
"fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="],
|
"fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="],
|
||||||
|
|
||||||
@@ -639,9 +639,9 @@
|
|||||||
|
|
||||||
"resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="],
|
"resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="],
|
||||||
|
|
||||||
"rolldown": ["rolldown@1.2.8", "", { "dependencies": { "@oxc-project/types": "=0.149.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.8", "@rolldown/binding-android-arm64": "1.2.8", "@rolldown/binding-darwin-arm64": "1.2.8", "@rolldown/binding-darwin-x64": "1.2.8", "@rolldown/binding-freebsd-x64": "1.2.8", "@rolldown/binding-linux-arm-gnueabihf": "1.2.8", "@rolldown/binding-linux-arm64-gnu": "1.2.8", "@rolldown/binding-linux-arm64-musl": "1.2.8", "@rolldown/binding-linux-ppc64-gnu": "1.2.8", "@rolldown/binding-linux-s390x-gnu": "1.2.8", "@rolldown/binding-linux-x64-gnu": "1.2.8", "@rolldown/binding-linux-x64-musl": "1.2.8", "@rolldown/binding-openharmony-arm64": "1.2.8", "@rolldown/binding-win32-arm64-msvc": "1.2.8", "@rolldown/binding-win32-x64-msvc": "1.2.8" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-Z67nTmhZe7anqnM/EjI392w5i/ANUinjip7QYsOyN37oayduxt3ksdX0hf5OOamkAd53BiIHfbfSzfUmzKFQqQ=="],
|
"rolldown": ["rolldown@1.2.11", "", { "dependencies": { "@oxc-project/types": "=0.151.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.11", "@rolldown/binding-android-arm64": "1.2.11", "@rolldown/binding-darwin-arm64": "1.2.11", "@rolldown/binding-darwin-x64": "1.2.11", "@rolldown/binding-freebsd-x64": "1.2.11", "@rolldown/binding-linux-arm-gnueabihf": "1.2.11", "@rolldown/binding-linux-arm64-gnu": "1.2.11", "@rolldown/binding-linux-arm64-musl": "1.2.11", "@rolldown/binding-linux-ppc64-gnu": "1.2.11", "@rolldown/binding-linux-s390x-gnu": "1.2.11", "@rolldown/binding-linux-x64-gnu": "1.2.11", "@rolldown/binding-linux-x64-musl": "1.2.11", "@rolldown/binding-openharmony-arm64": "1.2.11", "@rolldown/binding-win32-arm64-msvc": "1.2.11", "@rolldown/binding-win32-x64-msvc": "1.2.11" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-qpSwIyz0jHQq5qXBTNxFmE6664rJ7O+4TvPFOiOaBSrz8IOHc1koKKSqTM2H6u1UG1+TveuC6vaDHKXFOvb1Kw=="],
|
||||||
|
|
||||||
"rollup": ["rollup@4.63.3", "", { "dependencies": { "@types/estree": "1.0.9" }, "optionalDependencies": { "@napi-rs/lzma-linux-x64-gnu": "1.5.1", "@rollup/rollup-android-arm-eabi": "4.63.3", "@rollup/rollup-android-arm64": "4.63.3", "@rollup/rollup-darwin-arm64": "4.63.3", "@rollup/rollup-darwin-x64": "4.63.3", "@rollup/rollup-freebsd-arm64": "4.63.3", "@rollup/rollup-freebsd-x64": "4.63.3", "@rollup/rollup-linux-arm-gnueabihf": "4.63.3", "@rollup/rollup-linux-arm-musleabihf": "4.63.3", "@rollup/rollup-linux-arm64-gnu": "4.63.3", "@rollup/rollup-linux-arm64-musl": "4.63.3", "@rollup/rollup-linux-loong64-gnu": "4.63.3", "@rollup/rollup-linux-loong64-musl": "4.63.3", "@rollup/rollup-linux-ppc64-gnu": "4.63.3", "@rollup/rollup-linux-ppc64-musl": "4.63.3", "@rollup/rollup-linux-riscv64-gnu": "4.63.3", "@rollup/rollup-linux-riscv64-musl": "4.63.3", "@rollup/rollup-linux-s390x-gnu": "4.63.3", "@rollup/rollup-linux-x64-gnu": "4.63.3", "@rollup/rollup-linux-x64-musl": "4.63.3", "@rollup/rollup-openbsd-x64": "4.63.3", "@rollup/rollup-openharmony-arm64": "4.63.3", "@rollup/rollup-win32-arm64-msvc": "4.63.3", "@rollup/rollup-win32-ia32-msvc": "4.63.3", "@rollup/rollup-win32-x64-gnu": "4.63.3", "@rollup/rollup-win32-x64-msvc": "4.63.3", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-1i2XreiAoMMXuPGD6Msj2xWrMMkHojNRKivInxGQcg7/1KuPuYlfUutLyh4drnOxUTHX9cHI4wFoat8D/NKaBw=="],
|
"rollup": ["rollup@4.63.5", "", { "dependencies": { "@types/estree": "1.0.9" }, "optionalDependencies": { "@napi-rs/lzma-linux-x64-gnu": "1.5.1", "@rollup/rollup-android-arm-eabi": "4.63.5", "@rollup/rollup-android-arm64": "4.63.5", "@rollup/rollup-darwin-arm64": "4.63.5", "@rollup/rollup-darwin-x64": "4.63.5", "@rollup/rollup-freebsd-arm64": "4.63.5", "@rollup/rollup-freebsd-x64": "4.63.5", "@rollup/rollup-linux-arm-gnueabihf": "4.63.5", "@rollup/rollup-linux-arm-musleabihf": "4.63.5", "@rollup/rollup-linux-arm64-gnu": "4.63.5", "@rollup/rollup-linux-arm64-musl": "4.63.5", "@rollup/rollup-linux-loong64-gnu": "4.63.5", "@rollup/rollup-linux-loong64-musl": "4.63.5", "@rollup/rollup-linux-ppc64-gnu": "4.63.5", "@rollup/rollup-linux-ppc64-musl": "4.63.5", "@rollup/rollup-linux-riscv64-gnu": "4.63.5", "@rollup/rollup-linux-riscv64-musl": "4.63.5", "@rollup/rollup-linux-s390x-gnu": "4.63.5", "@rollup/rollup-linux-x64-gnu": "4.63.5", "@rollup/rollup-linux-x64-musl": "4.63.5", "@rollup/rollup-openbsd-x64": "4.63.5", "@rollup/rollup-openharmony-arm64": "4.63.5", "@rollup/rollup-win32-arm64-msvc": "4.63.5", "@rollup/rollup-win32-ia32-msvc": "4.63.5", "@rollup/rollup-win32-x64-gnu": "4.63.5", "@rollup/rollup-win32-x64-msvc": "4.63.5", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-KRWwmNLlPw5M7HcdYfm15oBv9n9LPtjzpzCIxS/phwqvPyxHSoKX6Y2YU3pxSPfy0CLquVgsx/j/hBi6OvH1Nw=="],
|
||||||
|
|
||||||
"sade": ["sade@1.8.1", "", { "dependencies": { "mri": "^1.1.0" } }, "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A=="],
|
"sade": ["sade@1.8.1", "", { "dependencies": { "mri": "^1.1.0" } }, "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A=="],
|
||||||
|
|
||||||
@@ -665,7 +665,7 @@
|
|||||||
|
|
||||||
"supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
|
"supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
|
||||||
|
|
||||||
"svelte": ["svelte@5.57.0", "", { "dependencies": { "@jridgewell/remapping": "^2.3.4", "@jridgewell/sourcemap-codec": "^1.5.0", "@sveltejs/acorn-typescript": "^1.0.10", "@types/estree": "^1.0.5", "acorn": "^8.12.1", "aria-query": "5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", "devalue": "^5.8.1", "esm-env": "^1.2.1", "esrap": "^2.2.12", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", "zimmerframe": "^1.1.2" } }, "sha512-NdbDn7fl4be1ViUG0oq/lvG6OZy3oENolV2ONjiqqsfVoeAfzaQAKUcEX3MrQod/Bebv1PgwET9rfXhgn9s4Kg=="],
|
"svelte": ["svelte@5.57.1", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "@jridgewell/sourcemap-codec": "^1.6.0", "@sveltejs/acorn-typescript": "^1.0.13", "@types/estree": "^1.0.9", "acorn": "^8.18.0", "aria-query": "5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", "devalue": "^5.9.2", "esm-env": "^1.2.1", "esrap": "^2.3.6", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", "zimmerframe": "^1.1.2" } }, "sha512-Uqj49lWKB+iSSnneuwiYYJ7MZgkB+eXr0LXBhv4uDuAkXqnWmq65Sxflfvp0Lc6MdKjMUxGaeOKWJqz5SNiVIA=="],
|
||||||
|
|
||||||
"svelte-adapter-bun": ["svelte-adapter-bun@1.0.1", "", { "dependencies": { "rolldown": "^1.0.0-beta.38" }, "peerDependencies": { "@sveltejs/kit": "^2.4.0", "typescript": "^5" } }, "sha512-tNOvfm8BGgG+rmEA7hkmqtq07v7zoo4skLQc+hIoQ79J+1fkEMpJEA2RzCIe3aPc8JdrsMJkv3mpiZPMsgahjA=="],
|
"svelte-adapter-bun": ["svelte-adapter-bun@1.0.1", "", { "dependencies": { "rolldown": "^1.0.0-beta.38" }, "peerDependencies": { "@sveltejs/kit": "^2.4.0", "typescript": "^5" } }, "sha512-tNOvfm8BGgG+rmEA7hkmqtq07v7zoo4skLQc+hIoQ79J+1fkEMpJEA2RzCIe3aPc8JdrsMJkv3mpiZPMsgahjA=="],
|
||||||
|
|
||||||
@@ -691,11 +691,11 @@
|
|||||||
|
|
||||||
"typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],
|
"typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],
|
||||||
|
|
||||||
"uint8array-extras": ["uint8array-extras@1.5.0", "", {}, "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A=="],
|
"uint8array-extras": ["uint8array-extras@1.6.0", "", {}, "sha512-8iAasVS4wUx0gPLjH8Xtz2PeDzTSiy8QiLGu2DT3X5GU+egFEQhpnbtkehbAwjvDcxIERmCYcysiODFmE3Ud0Q=="],
|
||||||
|
|
||||||
"undici": ["undici@6.28.1", "", {}, "sha512-zWpdTVD54H48CIybL0rWQ3ukpb9d23wM7eH5RtfdmeP70cWHNjtfo7P4vZX+5CoDcO53J4Pu5uXp7lNfjc6DRA=="],
|
"undici": ["undici@6.29.0", "", {}, "sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg=="],
|
||||||
|
|
||||||
"undici-types": ["undici-types@8.3.0", "", {}, "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ=="],
|
"undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],
|
||||||
|
|
||||||
"vite": ["vite@7.3.6", "", { "dependencies": { "esbuild": "^0.27.0 || ^0.28.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg=="],
|
"vite": ["vite@7.3.6", "", { "dependencies": { "esbuild": "^0.27.0 || ^0.28.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg=="],
|
||||||
|
|
||||||
@@ -703,13 +703,13 @@
|
|||||||
|
|
||||||
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
||||||
|
|
||||||
"ws": ["ws@8.21.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="],
|
"ws": ["ws@8.22.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg=="],
|
||||||
|
|
||||||
"xtend": ["xtend@4.0.2", "", {}, "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="],
|
"xtend": ["xtend@4.0.2", "", {}, "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="],
|
||||||
|
|
||||||
"zimmerframe": ["zimmerframe@1.1.5", "", {}, "sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA=="],
|
"zimmerframe": ["zimmerframe@1.1.5", "", {}, "sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA=="],
|
||||||
|
|
||||||
"zipcodes-us": ["zipcodes-us@1.1.3", "", {}, "sha512-gOz8WAO6iWBU4aUc0lljpa+TKZckRKmgoHKcc1jWnn4eTbdc9XO5cXEaGccYn7GAjykueO0Wn+N7zdmzG0Uf5w=="],
|
"zipcodes-us": ["zipcodes-us@1.2.0", "", {}, "sha512-Hleo6rT/geN1JW+w1TlOQokjuRf2jLGBToPdXUCKvF0tcEbbIlgI91KXd9Uz/JGlfomjXjoyHnlslQnLPHe1LQ=="],
|
||||||
|
|
||||||
"zod": ["zod@4.6.5", "", {}, "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q=="],
|
"zod": ["zod@4.6.5", "", {}, "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q=="],
|
||||||
|
|
||||||
|
|||||||
@@ -42,3 +42,9 @@ export const ActivityPerformanceSchema = t.Object({
|
|||||||
performance: t.Number(),
|
performance: t.Number(),
|
||||||
});
|
});
|
||||||
export type ActivityPerformance = Static<typeof ActivityPerformanceSchema>;
|
export type ActivityPerformance = Static<typeof ActivityPerformanceSchema>;
|
||||||
|
|
||||||
|
export const ActivityMediaKeysSchema = t.Partial(t.Record(t.Enum(Activity), t.String({ minLength: 1 })));
|
||||||
|
export type ActivityMediaKeys = Static<typeof ActivityMediaKeysSchema>;
|
||||||
|
|
||||||
|
export const ActivityVerificationsSchema = t.Partial(t.Record(t.Enum(Activity), t.Boolean()));
|
||||||
|
export type ActivityVerifications = Static<typeof ActivityVerificationsSchema>;
|
||||||
|
|||||||
Reference in New Issue
Block a user