From 0d84a742e6b36fb2542b9b332508256a2dc17840 Mon Sep 17 00:00:00 2001 From: h0lybyte <5599058+h0lybyte@users.noreply.github.com> Date: Thu, 10 Aug 2023 23:38:46 -0400 Subject: [PATCH] - Supabase Login Issue: https://github.com/KBVE/kbve.com/issues/725 --- .astro/types.d.ts | 488 ++++++++++++------------ package.json | 1 + src/components/API/storage.ts | 17 +- src/components/API/supabase.ts | 45 +-- src/components/Supabase/Login.svelte | 185 +++++++++ src/components/Supabase/Register.svelte | 207 ++++++++++ src/components/Widget/Login.astro | 8 + src/components/Widget/Logout.astro | 1 - src/components/Widget/Register.astro | 7 +- src/content/account/login.mdx | 18 +- src/content/account/register.mdx | 23 +- src/content/journal/08-10.md | 1 + yarn.lock | 81 +++- 13 files changed, 765 insertions(+), 317 deletions(-) create mode 100644 src/components/Supabase/Login.svelte create mode 100644 src/components/Supabase/Register.svelte create mode 100644 src/components/Widget/Login.astro diff --git a/.astro/types.d.ts b/.astro/types.d.ts index f45a35d62d..a7a584a7c4 100644 --- a/.astro/types.d.ts +++ b/.astro/types.d.ts @@ -206,28 +206,28 @@ declare module 'astro:content' { slug: "login"; body: string; collection: "account"; - data: any + data: InferEntrySchema<"account"> } & { render(): Render[".mdx"] }; "logout.mdx": { id: "logout.mdx"; slug: "logout"; body: string; collection: "account"; - data: any + data: InferEntrySchema<"account"> } & { render(): Render[".mdx"] }; "profile.mdx": { id: "profile.mdx"; slug: "profile"; body: string; collection: "account"; - data: any + data: InferEntrySchema<"account"> } & { render(): Render[".mdx"] }; "register.mdx": { id: "register.mdx"; slug: "register"; body: string; collection: "account"; - data: any + data: InferEntrySchema<"account"> } & { render(): Render[".mdx"] }; }; "application": { @@ -236,301 +236,301 @@ declare module 'astro:content' { slug: "android"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "ansible.mdx": { id: "ansible.mdx"; slug: "ansible"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "appwrite.mdx": { id: "appwrite.mdx"; slug: "appwrite"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "authelia.mdx": { id: "authelia.mdx"; slug: "authelia"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "cubejs.mdx": { id: "cubejs.mdx"; slug: "cubejs"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "docker.mdx": { id: "docker.mdx"; slug: "docker"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "flipperzero.mdx": { id: "flipperzero.mdx"; slug: "flipperzero"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "flutter.mdx": { id: "flutter.mdx"; slug: "flutter"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "gcloud.mdx": { id: "gcloud.mdx"; slug: "gcloud"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "git.mdx": { id: "git.mdx"; slug: "git"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "godot.mdx": { id: "godot.mdx"; slug: "godot"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "javascript.mdx": { id: "javascript.mdx"; slug: "javascript"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "kubernetes.mdx": { id: "kubernetes.mdx"; slug: "kubernetes"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "longhorn.mdx": { id: "longhorn.mdx"; slug: "longhorn"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "lvm.mdx": { id: "lvm.mdx"; slug: "lvm"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "ml.mdx": { id: "ml.mdx"; slug: "ml"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "mysql.mdx": { id: "mysql.mdx"; slug: "mysql"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "n8n/n8n.mdx": { id: "n8n/n8n.mdx"; slug: "n8n"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "nftables.mdx": { id: "nftables.mdx"; slug: "nftables"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "nginx.mdx": { id: "nginx.mdx"; slug: "nginx"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "nmap.mdx": { id: "nmap.mdx"; slug: "nmap"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "nomad.mdx": { id: "nomad.mdx"; slug: "nomad"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "obs/obs.mdx": { id: "obs/obs.mdx"; slug: "obs"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "obsidian.mdx": { id: "obsidian.mdx"; slug: "obsidian"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "php.mdx": { id: "php.mdx"; slug: "php"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "portainer.mdx": { id: "portainer.mdx"; slug: "portainer"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "proxmox.mdx": { id: "proxmox.mdx"; slug: "proxmox"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "pterodactyl.mdx": { id: "pterodactyl.mdx"; slug: "pterodactyl"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "python.mdx": { id: "python.mdx"; slug: "python"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "rust.mdx": { id: "rust.mdx"; slug: "rust"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "rustdesk.mdx": { id: "rustdesk.mdx"; slug: "rustdesk"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "ryujinx.mdx": { id: "ryujinx.mdx"; slug: "ryujinx"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "simba.mdx": { id: "simba.mdx"; slug: "simba"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "strapi.mdx": { id: "strapi.mdx"; slug: "strapi"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "supabase/supabase.mdx": { id: "supabase/supabase.mdx"; slug: "supabase"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "terraform.mdx": { id: "terraform.mdx"; slug: "terraform"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "traefik.mdx": { id: "traefik.mdx"; slug: "traefik"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "unity.mdx": { id: "unity.mdx"; slug: "unity"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "void.mdx": { id: "void.mdx"; slug: "void"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "watchtower.mdx": { id: "watchtower.mdx"; slug: "watchtower"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "webserver.mdx": { id: "webserver.mdx"; slug: "webserver"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "wireguard.mdx": { id: "wireguard.mdx"; slug: "wireguard"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; "zsh.mdx": { id: "zsh.mdx"; slug: "zsh"; body: string; collection: "application"; - data: any + data: InferEntrySchema<"application"> } & { render(): Render[".mdx"] }; }; "arcade": { @@ -539,28 +539,28 @@ declare module 'astro:content' { slug: "rj"; body: string; collection: "arcade"; - data: any + data: InferEntrySchema<"arcade"> } & { render(): Render[".mdx"] }; "robot-unicorn-attack.mdx": { id: "robot-unicorn-attack.mdx"; slug: "robot-unicorn-attack"; body: string; collection: "arcade"; - data: any + data: InferEntrySchema<"arcade"> } & { render(): Render[".mdx"] }; "time-crisis.mdx": { id: "time-crisis.mdx"; slug: "time-crisis"; body: string; collection: "arcade"; - data: any + data: InferEntrySchema<"arcade"> } & { render(): Render[".mdx"] }; "wvn.mdx": { id: "wvn.mdx"; slug: "wvn"; body: string; collection: "arcade"; - data: any + data: InferEntrySchema<"arcade"> } & { render(): Render[".mdx"] }; }; "blog": { @@ -569,7 +569,7 @@ declare module 'astro:content' { slug: "theorycraft"; body: string; collection: "blog"; - data: any + data: InferEntrySchema<"blog"> } & { render(): Render[".mdx"] }; }; "crypto": { @@ -578,35 +578,35 @@ declare module 'astro:content' { slug: "bnb"; body: string; collection: "crypto"; - data: any + data: InferEntrySchema<"crypto"> } & { render(): Render[".mdx"] }; "btc.mdx": { id: "btc.mdx"; slug: "btc"; body: string; collection: "crypto"; - data: any + data: InferEntrySchema<"crypto"> } & { render(): Render[".mdx"] }; "doge.mdx": { id: "doge.mdx"; slug: "doge"; body: string; collection: "crypto"; - data: any + data: InferEntrySchema<"crypto"> } & { render(): Render[".mdx"] }; "eth.mdx": { id: "eth.mdx"; slug: "eth"; body: string; collection: "crypto"; - data: any + data: InferEntrySchema<"crypto"> } & { render(): Render[".mdx"] }; "xrp.mdx": { id: "xrp.mdx"; slug: "xrp"; body: string; collection: "crypto"; - data: any + data: InferEntrySchema<"crypto"> } & { render(): Render[".mdx"] }; }; "gaming": { @@ -615,14 +615,14 @@ declare module 'astro:content' { slug: "df"; body: string; collection: "gaming"; - data: any + data: InferEntrySchema<"gaming"> } & { render(): Render[".mdx"] }; "lol.mdx": { id: "lol.mdx"; slug: "lol"; body: string; collection: "gaming"; - data: any + data: InferEntrySchema<"gaming"> } & { render(): Render[".mdx"] }; }; "items": { @@ -640,784 +640,784 @@ declare module 'astro:content' { slug: "04-17"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-18.md": { id: "04-18.md"; slug: "04-18"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-19.md": { id: "04-19.md"; slug: "04-19"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-20.md": { id: "04-20.md"; slug: "04-20"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-21.md": { id: "04-21.md"; slug: "04-21"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-22.md": { id: "04-22.md"; slug: "04-22"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-23.md": { id: "04-23.md"; slug: "04-23"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-24.md": { id: "04-24.md"; slug: "04-24"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-25.md": { id: "04-25.md"; slug: "04-25"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-26.md": { id: "04-26.md"; slug: "04-26"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-27.md": { id: "04-27.md"; slug: "04-27"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-28.md": { id: "04-28.md"; slug: "04-28"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-29.md": { id: "04-29.md"; slug: "04-29"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "04-30.md": { id: "04-30.md"; slug: "04-30"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-01.md": { id: "05-01.md"; slug: "05-01"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-02.md": { id: "05-02.md"; slug: "05-02"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-03.md": { id: "05-03.md"; slug: "05-03"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-04.md": { id: "05-04.md"; slug: "05-04"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-05.md": { id: "05-05.md"; slug: "05-05"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-06.md": { id: "05-06.md"; slug: "05-06"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-07.md": { id: "05-07.md"; slug: "05-07"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-08.md": { id: "05-08.md"; slug: "05-08"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-09.md": { id: "05-09.md"; slug: "05-09"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-10.md": { id: "05-10.md"; slug: "05-10"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-15.md": { id: "05-15.md"; slug: "05-15"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-16.md": { id: "05-16.md"; slug: "05-16"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-17.md": { id: "05-17.md"; slug: "05-17"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-18.md": { id: "05-18.md"; slug: "05-18"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-19.md": { id: "05-19.md"; slug: "05-19"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-20.md": { id: "05-20.md"; slug: "05-20"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-21.md": { id: "05-21.md"; slug: "05-21"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-22.md": { id: "05-22.md"; slug: "05-22"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-23.md": { id: "05-23.md"; slug: "05-23"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-24.md": { id: "05-24.md"; slug: "05-24"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-25.md": { id: "05-25.md"; slug: "05-25"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-26.md": { id: "05-26.md"; slug: "05-26"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-27.md": { id: "05-27.md"; slug: "05-27"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-28.md": { id: "05-28.md"; slug: "05-28"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-29.md": { id: "05-29.md"; slug: "05-29"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-30.md": { id: "05-30.md"; slug: "05-30"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "05-31.md": { id: "05-31.md"; slug: "05-31"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-01.md": { id: "06-01.md"; slug: "06-01"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-02.md": { id: "06-02.md"; slug: "06-02"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-03.md": { id: "06-03.md"; slug: "06-03"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-04.md": { id: "06-04.md"; slug: "06-04"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-05.md": { id: "06-05.md"; slug: "06-05"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-06.md": { id: "06-06.md"; slug: "06-06"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-07.md": { id: "06-07.md"; slug: "06-07"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-08.md": { id: "06-08.md"; slug: "06-08"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-09.md": { id: "06-09.md"; slug: "06-09"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-10.md": { id: "06-10.md"; slug: "06-10"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-11.md": { id: "06-11.md"; slug: "06-11"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-12.md": { id: "06-12.md"; slug: "06-12"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-13.md": { id: "06-13.md"; slug: "06-13"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-14.md": { id: "06-14.md"; slug: "06-14"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-15.md": { id: "06-15.md"; slug: "06-15"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-16.md": { id: "06-16.md"; slug: "06-16"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-17.md": { id: "06-17.md"; slug: "06-17"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-18.md": { id: "06-18.md"; slug: "06-18"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-20.md": { id: "06-20.md"; slug: "06-20"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-21.md": { id: "06-21.md"; slug: "06-21"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-22.md": { id: "06-22.md"; slug: "06-22"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-23.md": { id: "06-23.md"; slug: "06-23"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-25.md": { id: "06-25.md"; slug: "06-25"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-26.md": { id: "06-26.md"; slug: "06-26"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-27.md": { id: "06-27.md"; slug: "06-27"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-28.md": { id: "06-28.md"; slug: "06-28"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-29.md": { id: "06-29.md"; slug: "06-29"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "06-30.md": { id: "06-30.md"; slug: "06-30"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-01.md": { id: "07-01.md"; slug: "07-01"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-02.md": { id: "07-02.md"; slug: "07-02"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-03.md": { id: "07-03.md"; slug: "07-03"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-04.md": { id: "07-04.md"; slug: "07-04"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-05.md": { id: "07-05.md"; slug: "07-05"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-06.md": { id: "07-06.md"; slug: "07-06"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-07.md": { id: "07-07.md"; slug: "07-07"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-08.md": { id: "07-08.md"; slug: "07-08"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-09.md": { id: "07-09.md"; slug: "07-09"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-10.md": { id: "07-10.md"; slug: "07-10"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-11.md": { id: "07-11.md"; slug: "07-11"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-12.md": { id: "07-12.md"; slug: "07-12"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-13.md": { id: "07-13.md"; slug: "07-13"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-14.md": { id: "07-14.md"; slug: "07-14"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-15.md": { id: "07-15.md"; slug: "07-15"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-16.md": { id: "07-16.md"; slug: "07-16"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-17.md": { id: "07-17.md"; slug: "07-17"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-18.md": { id: "07-18.md"; slug: "07-18"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-19.md": { id: "07-19.md"; slug: "07-19"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-20.md": { id: "07-20.md"; slug: "07-20"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-21.md": { id: "07-21.md"; slug: "07-21"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-22.md": { id: "07-22.md"; slug: "07-22"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-23.md": { id: "07-23.md"; slug: "07-23"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-24.md": { id: "07-24.md"; slug: "07-24"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-25.md": { id: "07-25.md"; slug: "07-25"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-26.md": { id: "07-26.md"; slug: "07-26"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-27.md": { id: "07-27.md"; slug: "07-27"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-28.md": { id: "07-28.md"; slug: "07-28"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-29.md": { id: "07-29.md"; slug: "07-29"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-30.md": { id: "07-30.md"; slug: "07-30"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "07-31.md": { id: "07-31.md"; slug: "07-31"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-01.md": { id: "08-01.md"; slug: "08-01"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-02.md": { id: "08-02.md"; slug: "08-02"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-03.md": { id: "08-03.md"; slug: "08-03"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-04.md": { id: "08-04.md"; slug: "08-04"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-05.md": { id: "08-05.md"; slug: "08-05"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-06.md": { id: "08-06.md"; slug: "08-06"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-07.md": { id: "08-07.md"; slug: "08-07"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-08.md": { id: "08-08.md"; slug: "08-08"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-09.md": { id: "08-09.md"; slug: "08-09"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "08-10.md": { id: "08-10.md"; slug: "08-10"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".md"] }; "asset.mdx": { id: "asset.mdx"; slug: "asset"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".mdx"] }; "visualnovel.mdx": { id: "visualnovel.mdx"; slug: "visualnovel"; body: string; collection: "journal"; - data: any + data: InferEntrySchema<"journal"> } & { render(): Render[".mdx"] }; }; "legal": { @@ -1426,21 +1426,21 @@ declare module 'astro:content' { slug: "eula"; body: string; collection: "legal"; - data: any + data: InferEntrySchema<"legal"> } & { render(): Render[".mdx"] }; "privacy.mdx": { id: "privacy.mdx"; slug: "privacy"; body: string; collection: "legal"; - data: any + data: InferEntrySchema<"legal"> } & { render(): Render[".mdx"] }; "tos.mdx": { id: "tos.mdx"; slug: "tos"; body: string; collection: "legal"; - data: any + data: InferEntrySchema<"legal"> } & { render(): Render[".mdx"] }; }; "manga": { @@ -1449,98 +1449,98 @@ declare module 'astro:content' { slug: "conch/filler/1"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "conch/filler/2.mdx": { id: "conch/filler/2.mdx"; slug: "conch/filler/2"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "conch/filler/3.mdx": { id: "conch/filler/3.mdx"; slug: "conch/filler/3"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "conch/filler/index.mdx": { id: "conch/filler/index.mdx"; slug: "conch/filler"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "fintech/abc/a.mdx": { id: "fintech/abc/a.mdx"; slug: "fintech/abc/a"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "fintech/abc/ai-warning.mdx": { id: "fintech/abc/ai-warning.mdx"; slug: "fintech/abc/ai-warning"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "fintech/abc/b-datascientist.mdx": { id: "fintech/abc/b-datascientist.mdx"; slug: "fintech/abc/b-datascientist"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "fintech/abc/b.mdx": { id: "fintech/abc/b.mdx"; slug: "fintech/abc/b"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "fintech/abc/c.mdx": { id: "fintech/abc/c.mdx"; slug: "fintech/abc/c"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "fintech/abc/index.mdx": { id: "fintech/abc/index.mdx"; slug: "fintech/abc"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "rj/filler/1.mdx": { id: "rj/filler/1.mdx"; slug: "rj/filler/1"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "rj/filler/index.mdx": { id: "rj/filler/index.mdx"; slug: "rj/filler"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "rj/introduction/1.mdx": { id: "rj/introduction/1.mdx"; slug: "rj/introduction/1"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; "rj/introduction/index.mdx": { id: "rj/introduction/index.mdx"; slug: "rj/introduction"; body: string; collection: "manga"; - data: any + data: InferEntrySchema<"manga"> } & { render(): Render[".mdx"] }; }; "media": { @@ -1549,7 +1549,7 @@ declare module 'astro:content' { slug: "radio"; body: string; collection: "media"; - data: any + data: InferEntrySchema<"media"> } & { render(): Render[".mdx"] }; }; "music": { @@ -1558,28 +1558,28 @@ declare module 'astro:content' { slug: "adtr-albums"; body: string; collection: "music"; - data: any + data: InferEntrySchema<"music"> } & { render(): Render[".mdx"] }; "olifejp-collection.mdx": { id: "olifejp-collection.mdx"; slug: "olifejp-collection"; body: string; collection: "music"; - data: any + data: InferEntrySchema<"music"> } & { render(): Render[".mdx"] }; "ravi-george.mdx": { id: "ravi-george.mdx"; slug: "ravi-george"; body: string; collection: "music"; - data: any + data: InferEntrySchema<"music"> } & { render(): Render[".mdx"] }; "starwars-lofi.mdx": { id: "starwars-lofi.mdx"; slug: "starwars-lofi"; body: string; collection: "music"; - data: any + data: InferEntrySchema<"music"> } & { render(): Render[".mdx"] }; }; "news": { @@ -1588,7 +1588,7 @@ declare module 'astro:content' { slug: "release-rigor"; body: string; collection: "news"; - data: any + data: InferEntrySchema<"news"> } & { render(): Render[".mdx"] }; }; "npc": { @@ -1620,7 +1620,7 @@ declare module 'astro:content' { slug: "darknet-diaries"; body: string; collection: "podcast"; - data: any + data: InferEntrySchema<"podcast"> } & { render(): Render[".mdx"] }; }; "project": { @@ -1722,14 +1722,14 @@ declare module 'astro:content' { slug: "mango-juice"; body: string; collection: "recipe"; - data: any + data: InferEntrySchema<"recipe"> } & { render(): Render[".mdx"] }; "mcconaughey-diet.mdx": { id: "mcconaughey-diet.mdx"; slug: "mcconaughey-diet"; body: string; collection: "recipe"; - data: any + data: InferEntrySchema<"recipe"> } & { render(): Render[".mdx"] }; }; "releases": { @@ -1738,7 +1738,7 @@ declare module 'astro:content' { slug: "1"; body: string; collection: "releases"; - data: any + data: InferEntrySchema<"releases"> } & { render(): Render[".md"] }; }; "security": { @@ -1747,7 +1747,7 @@ declare module 'astro:content' { slug: "xss"; body: string; collection: "security"; - data: any + data: InferEntrySchema<"security"> } & { render(): Render[".mdx"] }; }; "stock": { @@ -1756,105 +1756,105 @@ declare module 'astro:content' { slug: "aapl"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "dis.mdx": { id: "dis.mdx"; slug: "dis"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "f.mdx": { id: "f.mdx"; slug: "f"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "gain.mdx": { id: "gain.mdx"; slug: "gain"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "icln.mdx": { id: "icln.mdx"; slug: "icln"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "iyr.mdx": { id: "iyr.mdx"; slug: "iyr"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "main.mdx": { id: "main.mdx"; slug: "main"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "o.mdx": { id: "o.mdx"; slug: "o"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "pey.mdx": { id: "pey.mdx"; slug: "pey"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "sphd.mdx": { id: "sphd.mdx"; slug: "sphd"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "spy.mdx": { id: "spy.mdx"; slug: "spy"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "stag.mdx": { id: "stag.mdx"; slug: "stag"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "tsla.mdx": { id: "tsla.mdx"; slug: "tsla"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "vnq.mdx": { id: "vnq.mdx"; slug: "vnq"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; "vt.mdx": { id: "vt.mdx"; slug: "vt"; body: string; collection: "stock"; - data: any + data: InferEntrySchema<"stock"> } & { render(): Render[".mdx"] }; }; "tags": { @@ -1863,14 +1863,14 @@ declare module 'astro:content' { slug: "auth/auth-notes"; body: string; collection: "tags"; - data: any + data: InferEntrySchema<"tags"> } & { render(): Render[".md"] }; "auth/auth.mdx": { id: "auth/auth.mdx"; slug: "auth"; body: string; collection: "tags"; - data: any + data: InferEntrySchema<"tags"> } & { render(): Render[".mdx"] }; }; "team": { @@ -1879,56 +1879,56 @@ declare module 'astro:content' { slug: "example"; body: string; collection: "team"; - data: any + data: InferEntrySchema<"team"> } & { render(): Render[".mdx"] }; "fudster.mdx": { id: "fudster.mdx"; slug: "fudster"; body: string; collection: "team"; - data: any + data: InferEntrySchema<"team"> } & { render(): Render[".mdx"] }; "h0lybyte.mdx": { id: "h0lybyte.mdx"; slug: "h0lybyte"; body: string; collection: "team"; - data: any + data: InferEntrySchema<"team"> } & { render(): Render[".mdx"] }; "keros.mdx": { id: "keros.mdx"; slug: "keros"; body: string; collection: "team"; - data: any + data: InferEntrySchema<"team"> } & { render(): Render[".mdx"] }; "lvl21bellsprout.mdx": { id: "lvl21bellsprout.mdx"; slug: "lvl21bellsprout"; body: string; collection: "team"; - data: any + data: InferEntrySchema<"team"> } & { render(): Render[".mdx"] }; "sean.mdx": { id: "sean.mdx"; slug: "sean"; body: string; collection: "team"; - data: any + data: InferEntrySchema<"team"> } & { render(): Render[".mdx"] }; "silver91.mdx": { id: "silver91.mdx"; slug: "silver91"; body: string; collection: "team"; - data: any + data: InferEntrySchema<"team"> } & { render(): Render[".mdx"] }; "ziggy9263.mdx": { id: "ziggy9263.mdx"; slug: "ziggy9263"; body: string; collection: "team"; - data: any + data: InferEntrySchema<"team"> } & { render(): Render[".mdx"] }; }; "theory": { @@ -1937,77 +1937,77 @@ declare module 'astro:content' { slug: "bizops"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "deadcode.mdx": { id: "deadcode.mdx"; slug: "deadcode"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "fintech.mdx": { id: "fintech.mdx"; slug: "fintech"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "gamedesign.mdx": { id: "gamedesign.mdx"; slug: "gamedesign"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "healthcare.mdx": { id: "healthcare.mdx"; slug: "healthcare"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "matrix.mdx": { id: "matrix.mdx"; slug: "matrix"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "phytochemicals.mdx": { id: "phytochemicals.mdx"; slug: "phytochemicals"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "programming.mdx": { id: "programming.mdx"; slug: "programming"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "socialmedia.mdx": { id: "socialmedia.mdx"; slug: "socialmedia"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "solarpunk.mdx": { id: "solarpunk.mdx"; slug: "solarpunk"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; "swartz-guerilla-manifesto.mdx": { id: "swartz-guerilla-manifesto.mdx"; slug: "swartz-guerilla-manifesto"; body: string; collection: "theory"; - data: any + data: InferEntrySchema<"theory"> } & { render(): Render[".mdx"] }; }; "tools": { @@ -2095,7 +2095,7 @@ declare module 'astro:content' { slug: "wolfram"; body: string; collection: "video"; - data: any + data: InferEntrySchema<"video"> } & { render(): Render[".mdx"] }; }; "website": { @@ -2104,49 +2104,49 @@ declare module 'astro:content' { slug: "about"; body: string; collection: "website"; - data: any + data: InferEntrySchema<"website"> } & { render(): Render[".mdx"] }; "c.mdx": { id: "c.mdx"; slug: "c"; body: string; collection: "website"; - data: any + data: InferEntrySchema<"website"> } & { render(): Render[".mdx"] }; "discord.mdx": { id: "discord.mdx"; slug: "discord"; body: string; collection: "website"; - data: any + data: InferEntrySchema<"website"> } & { render(): Render[".mdx"] }; "events.mdx": { id: "events.mdx"; slug: "events"; body: string; collection: "website"; - data: any + data: InferEntrySchema<"website"> } & { render(): Render[".mdx"] }; "twitch.mdx": { id: "twitch.mdx"; slug: "twitch"; body: string; collection: "website"; - data: any + data: InferEntrySchema<"website"> } & { render(): Render[".mdx"] }; "twitter.mdx": { id: "twitter.mdx"; slug: "twitter"; body: string; collection: "website"; - data: any + data: InferEntrySchema<"website"> } & { render(): Render[".mdx"] }; "youtube.mdx": { id: "youtube.mdx"; slug: "youtube"; body: string; collection: "website"; - data: any + data: InferEntrySchema<"website"> } & { render(): Render[".mdx"] }; }; @@ -2164,5 +2164,5 @@ declare module 'astro:content' { type AnyEntryMap = ContentEntryMap & DataEntryMap; - type ContentConfig = never; + type ContentConfig = typeof import("../src/content/config"); } diff --git a/package.json b/package.json index ae7576bcb8..71154174dc 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "@nanostores/react": "^0.7.1", "@react-three/fiber": "^8.13.6", "@supabase/supabase-js": "^2.32.0", + "@sveltejs/kit": "^1.22.5", "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/forms": "^0.5.4", "@tailwindcss/line-clamp": "^0.4.4", diff --git a/src/components/API/storage.ts b/src/components/API/storage.ts index 1d2fef8a03..89c5d923e1 100644 --- a/src/components/API/storage.ts +++ b/src/components/API/storage.ts @@ -7,13 +7,26 @@ export const email$: WritableAtom = atom(""); export const khash$: WritableAtom = atom(0); //? [DATA]->[UX] export const error$: WritableAtom = atom(""); +export const notification$: WritableAtom = atom(""); +export const fetchProfile$: WritableAtom = atom(""); //? [DATA]=>[DX] export const log$: WritableAtom = atom(""); - export const log = async( log : string) => { task(async() => { log$.set(log); console.log(`[LOG] ${log$.get()}`); }) -} \ No newline at end of file +} + +export const __getProfile = async () => { + task(async () => { + log("Starting Cache -> Profile"); + }); +}; + +export const notification = async( error: string) => { + task(async() => { + notification$.set(error); + }) +} diff --git a/src/components/API/supabase.ts b/src/components/API/supabase.ts index d02d03ab4c..7a324c1607 100644 --- a/src/components/API/supabase.ts +++ b/src/components/API/supabase.ts @@ -5,6 +5,7 @@ import { persistentAtom } from "@nanostores/persistent"; import * as Storage from "./storage"; //TODO [ENV-MIGRATION] +//TODO [SESSION-MANAGEMENT] //TODO [PERSISTENT-ATOM] //TODO [POLICY-ABSTRACT] @@ -22,47 +23,33 @@ export const supabase = createClient( ); supabase.auth.getSession().then(({ data: { session } }) => { - if (session) { - isUser.set(session); - } else { - isUser.set(undefined); - } + session ? isUser.set(session) : isUser.set(undefined); +}); + +supabase.auth.onAuthStateChange((_event, session) => { + session ? isUser.set(session) : isUser.set(undefined); }); isUser.subscribe(async (session) => { - if (session?.user?.id) { - supabase_user$.set(await supabase_account()); - } + session?.user?.id + ? supabase_user$.set(await supabase_account()) + : supabase_user$.set(undefined); }); export const supabase_account = async () => { - return supabase.auth.getSession().then(({ data: { session } }) => { - if (session) { - isUser.set(session); - return session.user; - } else { - isUser.set(undefined); - return undefined; - } - }); + try { + return (await supabase.auth.getSession()).data.session?.user + } catch (error) { + return undefined; + } }; export const getProfile = async ({ cache = true }: { cache: boolean }) => { - if (cache) { - __getProfile(); - } else { - _getProfile(); - } + cache ? Storage.__getProfile() : _getProfile(); }; export const _getProfile = async () => { task(async () => { - Storage.log(" Starting Supabase -> Profile Table") - - + Storage.log(" Starting Supabase -> Profile Table"); }); }; - -export const __getProfile = async () => { - task(async () => {}); -}; diff --git a/src/components/Supabase/Login.svelte b/src/components/Supabase/Login.svelte new file mode 100644 index 0000000000..9cd741182a --- /dev/null +++ b/src/components/Supabase/Login.svelte @@ -0,0 +1,185 @@ + + +
+
+
+
+
+
+
+
+
+ +
+
+
+ + logo + +
+
+ {#if $notification$} +

+ +

+ {:else} +

+ Sign in to your account! +

+ {/if} +
+
+ + +
+
+ + +
+
+ + +

+ Don’t have an account yet? Sign up +

+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Supabase/Register.svelte b/src/components/Supabase/Register.svelte new file mode 100644 index 0000000000..b794369f9a --- /dev/null +++ b/src/components/Supabase/Register.svelte @@ -0,0 +1,207 @@ + + + + + +
+
+
+
+
+
+
+
+
+ +
+
+
+ + logo + +
+
+ {#if $notification$} +

+ +

+ {:else} +

+ Register your KBVE Account! +

+ {/if} +
+
+ + +
+
+ + +
+
+ + +
+
+ + +

+ Don’t have an account yet? Sign up +

+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Widget/Login.astro b/src/components/Widget/Login.astro new file mode 100644 index 0000000000..193943de6a --- /dev/null +++ b/src/components/Widget/Login.astro @@ -0,0 +1,8 @@ +--- +import SvelteLogin from '@c/Supabase/Login.svelte'; +const { data } = Astro.props; +--- + + + + diff --git a/src/components/Widget/Logout.astro b/src/components/Widget/Logout.astro index a6b5f6c1db..80f698a2d2 100644 --- a/src/components/Widget/Logout.astro +++ b/src/components/Widget/Logout.astro @@ -4,4 +4,3 @@ const { data } = Astro.props; --- -@c/Library/React/Logout \ No newline at end of file diff --git a/src/components/Widget/Register.astro b/src/components/Widget/Register.astro index 52e92f32be..5c056f7809 100644 --- a/src/components/Widget/Register.astro +++ b/src/components/Widget/Register.astro @@ -1,8 +1,9 @@ --- -import ReactRegister from '@lib/User/Register'; +//import ReactRegister from '@lib/User/Register'; +import SvelteRegister from "@c/Supabase/Register.svelte" const { data } = Astro.props; --- - + - + diff --git a/src/content/account/login.mdx b/src/content/account/login.mdx index feace58419..8498c1032d 100644 --- a/src/content/account/login.mdx +++ b/src/content/account/login.mdx @@ -14,15 +14,11 @@ tags: import Details from '@w/Details.astro'; import MDXJS from '@w/MDXJS.astro'; +import Login from "@w/Login.astro"; - - -## Login - - ---- + @@ -57,12 +53,4 @@ Here we go! Doing another round of the login page! ---- - - - -## REF - -- AES Module Error - - \ No newline at end of file +--- \ No newline at end of file diff --git a/src/content/account/register.mdx b/src/content/account/register.mdx index 15c266ee7d..1e1da4ce4d 100644 --- a/src/content/account/register.mdx +++ b/src/content/account/register.mdx @@ -18,19 +18,8 @@ import Details from '@w/Details.astro'; import MDXJS from '@w/MDXJS.astro'; import Register from '@w/Register.astro'; - - -## Register - - ---- - - - - - - + --- @@ -67,12 +56,4 @@ Here we go! Doing another round of the login page! ---- - - - -## REF - -- AES Module Error - - +--- \ No newline at end of file diff --git a/src/content/journal/08-10.md b/src/content/journal/08-10.md index 04ee3a08e0..9e4ca91ac7 100644 --- a/src/content/journal/08-10.md +++ b/src/content/journal/08-10.md @@ -19,6 +19,7 @@ tags: - 3:00pm - Lunch time! Break time. I am going to make myself some quick and dirty ramen. I definitely should add more veggies into my diet doe. - 6:15pm - I should migrate over the next patch for development, as well as avoid any larger pushes that might hurt the base. - 7:00pm - To stay on schedule, I will push through this daily patch and wrap up some of the storage mechanisms that I wanted to deploy. +- 8:19pm - Started the Login setup for Supabase! I decided that I would try to build it out in Svelte instead of React, just to see how it would work out! ## Quote diff --git a/yarn.lock b/yarn.lock index aba4328153..594d937652 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1424,6 +1424,11 @@ tiny-glob "^0.2.9" tslib "^2.4.0" +"@polka/url@^1.0.0-next.20": + version "1.0.0-next.21" + resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" + integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== + "@popperjs/core@^2.11.8", "@popperjs/core@^2.9.3": version "2.11.8" resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" @@ -1509,6 +1514,24 @@ "@supabase/storage-js" "^2.5.1" cross-fetch "^3.1.5" +"@sveltejs/kit@^1.22.5": + version "1.22.5" + resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.22.5.tgz#e666067439c94f36352b954f67960c5a0a62a047" + integrity sha512-LHq+ECucoT6c6/tkrxIQtD8KVNhPFV4QQ+xOKTwBAs/Qdtff8P5gAzsIZiwEaaO6J6sYZoy5RP2VR6m8PSCgLA== + dependencies: + "@sveltejs/vite-plugin-svelte" "^2.4.1" + "@types/cookie" "^0.5.1" + cookie "^0.5.0" + devalue "^4.3.1" + esm-env "^1.0.0" + kleur "^4.1.5" + magic-string "^0.30.0" + mime "^3.0.0" + sade "^1.8.1" + set-cookie-parser "^2.6.0" + sirv "^2.0.2" + undici "~5.23.0" + "@sveltejs/vite-plugin-svelte-inspector@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-1.0.3.tgz#fdbf80b43bfaa20deaa5ff6d0676351aa9aecbcc" @@ -1516,6 +1539,19 @@ dependencies: debug "^4.3.4" +"@sveltejs/vite-plugin-svelte@^2.4.1": + version "2.4.5" + resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.4.5.tgz#55ba60ce37dfa3acf76b4ec54955011a34cd49a2" + integrity sha512-UJKsFNwhzCVuiZd06jM/psscyNJNDwjQC+qIeb7GBJK9iWeQCcIyfcPWDvbCudfcJggY9jtxJeeaZH7uny93FQ== + dependencies: + "@sveltejs/vite-plugin-svelte-inspector" "^1.0.3" + debug "^4.3.4" + deepmerge "^4.3.1" + kleur "^4.1.5" + magic-string "^0.30.2" + svelte-hmr "^0.15.3" + vitefu "^0.2.4" + "@sveltejs/vite-plugin-svelte@^2.4.2": version "2.4.2" resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.4.2.tgz#04f9fb698853a6a681a2a7d32016487316c30917" @@ -1606,6 +1642,11 @@ resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.3.3.tgz#85bc74ba782fb7aa3a514d11767832b0e3bc6803" integrity sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow== +"@types/cookie@^0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.5.1.tgz#b29aa1f91a59f35e29ff8f7cb24faf1a3a750554" + integrity sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g== + "@types/css-tree@*": version "2.3.1" resolved "https://registry.yarnpkg.com/@types/css-tree/-/css-tree-2.3.1.tgz#f359cf7ad9318d51b173b923bb8e8d81e21329a1" @@ -3350,7 +3391,7 @@ detect-libc@^2.0.2: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== -devalue@^4.3.2: +devalue@^4.3.1, devalue@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/devalue/-/devalue-4.3.2.tgz#cc44e4cf3872ac5a78229fbce3b77e57032727b5" integrity sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg== @@ -3933,6 +3974,11 @@ eslint@^8.46.0: strip-ansi "^6.0.1" text-table "^0.2.0" +esm-env@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esm-env/-/esm-env-1.0.0.tgz#b124b40b180711690a4cb9b00d16573391950413" + integrity sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA== + espree@^9.0.0: version "9.5.2" resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b" @@ -7247,7 +7293,7 @@ s.color@0.0.15: resolved "https://registry.yarnpkg.com/s.color/-/s.color-0.0.15.tgz#6b32cd22d8dba95703a5122ddede2020a1560186" integrity sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA== -sade@^1.7.3: +sade@^1.7.3, sade@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/sade/-/sade-1.8.1.tgz#0a78e81d658d394887be57d2a409bf703a3b2701" integrity sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A== @@ -7362,6 +7408,11 @@ server-destroy@^1.0.1: resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" integrity sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ== +set-cookie-parser@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz#131921e50f62ff1a66a461d7d62d7b21d5d15a51" + integrity sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ== + sharp@0.32.4, sharp@^0.32.4: version "0.32.4" resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.32.4.tgz#0354653b7924f2520b2264ac9bcd10a58bf411b6" @@ -7433,6 +7484,15 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +sirv@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.3.tgz#ca5868b87205a74bef62a469ed0296abceccd446" + integrity sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA== + dependencies: + "@polka/url" "^1.0.0-next.20" + mrmime "^1.0.0" + totalist "^3.0.0" + sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -7688,6 +7748,11 @@ svelte-hmr@^0.15.2: resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.15.2.tgz#d2f6fc82e040f2734abd54cea5cbef46828f2538" integrity sha512-q/bAruCvFLwvNbeE1x3n37TYFb3mTBJ6TrCq6p2CoFbSTNhDE9oAtEfpy+wmc9So8AG0Tja+X0/mJzX9tSfvIg== +svelte-hmr@^0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.15.3.tgz#df54ccde9be3f091bf5f18fc4ef7b8eb6405fbe6" + integrity sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ== + svelte2tsx@^0.6.15: version "0.6.15" resolved "https://registry.yarnpkg.com/svelte2tsx/-/svelte2tsx-0.6.15.tgz#c85c3360ed8fcea62f6156dd1024303ba6bc79ec" @@ -7904,6 +7969,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +totalist@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" + integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -8081,6 +8151,13 @@ undici@^5.22.0: dependencies: busboy "^1.6.0" +undici@~5.23.0: + version "5.23.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.23.0.tgz#e7bdb0ed42cebe7b7aca87ced53e6eaafb8f8ca0" + integrity sha512-1D7w+fvRsqlQ9GscLBwcAJinqcZGHUKjbOmXdlE/v8BvEGXjeWAax+341q44EuTcHXXnfyKNbKRq4Lg7OzhMmg== + dependencies: + busboy "^1.6.0" + unherit@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/unherit/-/unherit-3.0.1.tgz#65b98bb7cb58cee755d7ec699a49e9e8ff172e23"