Add author auth, forking, tags, and stats tracking

Introduce token-based author authentication (register/verify API),
   skill forking with EditGate protection, tag metadata on skills,
   and download/push stats. Enhanced push scripts with token auth
   and per-skill filtering. Updated UI with stats, tags, and
   author info on skill cards.
This commit is contained in:
Alejandro Martinez
2026-02-12 14:37:40 +01:00
parent 39d8afb251
commit aa477a553b
80 changed files with 3618 additions and 660 deletions

View File

@@ -0,0 +1,40 @@
import { v as verifyToken } from '../../../chunks/tokens_CAzj9Aj8.mjs';
export { renderers } from '../../../renderers.mjs';
const POST = async ({ request }) => {
let body;
try {
body = await request.json();
} catch {
return new Response(JSON.stringify({ error: "Invalid JSON" }), {
status: 400,
headers: { "Content-Type": "application/json" }
});
}
const { email, token } = body;
if (!email || !token) {
return new Response(JSON.stringify({ error: "email and token are required" }), {
status: 400,
headers: { "Content-Type": "application/json" }
});
}
const valid = await verifyToken(email, token);
if (!valid) {
return new Response(JSON.stringify({ error: "Invalid token" }), {
status: 403,
headers: { "Content-Type": "application/json" }
});
}
return new Response(JSON.stringify({ ok: true }), {
headers: { "Content-Type": "application/json" }
});
};
const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
__proto__: null,
POST
}, Symbol.toStringTag, { value: 'Module' }));
const page = () => _page;
export { page };