Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
use api keys for desktop auth (#564)
Brendan Allanbc43fbece58c
diff --git a/Cargo.lock b/Cargo.lockindex cddf8da31..e43fa8a85 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -7584,9 +7584,9 @@ dependencies = [[[package]]name = "tauri-plugin-http"-version = "2.2.0"+version = "2.4.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "e62a9bde54d6a0218b63f5a248f02056ad4316ba6ad81dfb9e4f73715df5deb1"+checksum = "696ef548befeee6c6c17b80ef73e7c41205b6c2204e87ef78ccc231212389a5c"dependencies = ["data-url","http",diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 8a598bec8..ff39e3669 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -41,7 +41,7 @@"@tauri-apps/plugin-deep-link": "^2.2.0","@tauri-apps/plugin-dialog": "2.0.1","@tauri-apps/plugin-fs": "2.2.0",- "@tauri-apps/plugin-http": "^2.0.1",+ "@tauri-apps/plugin-http": "^2.4.4","@tauri-apps/plugin-notification": "2.0.0","@tauri-apps/plugin-opener": "^2.2.6","@tauri-apps/plugin-os": "2.0.0",@@ -64,7 +64,8 @@"unplugin-icons": "^0.19.2","uuid": "^9.0.1","vinxi": "^0.5.6",- "webcodecs": "^0.1.0"+ "webcodecs": "^0.1.0",+ "zod": "^3.24.2"},"devDependencies": {"@fontsource/geist-sans": "^5.0.3",diff --git a/apps/desktop/src-tauri/src/auth.rs b/apps/desktop/src-tauri/src/auth.rsindex 40984ce82..406954161 100644--- a/apps/desktop/src-tauri/src/auth.rs+++ b/apps/desktop/src-tauri/src/auth.rs@@ -10,13 +10,19 @@ use crate::web_api;#[derive(Serialize, Deserialize, Type, Debug)]pub struct AuthStore {- pub token: String,+ pub secret: AuthSecret,pub user_id: Option<String>,- pub expires: i32,pub plan: Option<Plan>,pub intercom_hash: Option<String>,}+#[derive(Serialize, Deserialize, Type, Debug)]+#[serde(untagged)]+pub enum AuthSecret {+ ApiKey { api_key: String },+ Session { token: String, expires: i32 },+}+#[derive(Serialize, Deserialize, Type, Debug)]pub struct Plan {pub upgraded: bool,@@ -108,12 +114,6 @@ impl AuthStore {return Err("Store not found".to_string());};- let value = value.map(|mut auth| {- // Set expiration to 100 years in the future- auth.expires = (chrono::Utc::now() + chrono::Duration::days(36500)).timestamp() as i32;- auth- });-store.set("auth", json!(value));store.save().map_err(|e| e.to_string())}diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rsindex 391e9f6af..d199d89d3 100644--- a/apps/desktop/src-tauri/src/lib.rs+++ b/apps/desktop/src-tauri/src/lib.rs@@ -1715,7 +1715,7 @@ async fn check_upgraded_and_update(app: AppHandle) -> Result<bool, String> {}}- let Ok(Some(mut auth)) = AuthStore::get(&app) else {+ let Ok(Some(auth)) = AuthStore::get(&app) else {println!("No auth found, clearing auth store");AuthStore::set(&app, None).map_err(|e| e.to_string())?;return Ok(false);@@ -1732,7 +1732,6 @@ async fn check_upgraded_and_update(app: AppHandle) -> Result<bool, String> {"Fetching plan for user {}",auth.user_id.as_deref().unwrap_or("unknown"));- let plan_url = app.make_app_url("/api/desktop/plan");let response = app.authed_api_request("/api/desktop/plan", |client, url| client.get(url)).await@@ -1759,9 +1758,8 @@ async fn check_upgraded_and_update(app: AppHandle) -> Result<bool, String> {.unwrap_or(false);println!("Pro status: {}", is_pro);let updated_auth = AuthStore {- token: auth.token,+ secret: auth.secret,user_id: auth.user_id,- expires: auth.expires,intercom_hash: auth.intercom_hash,plan: Some(Plan {upgraded: is_pro,diff --git a/apps/desktop/src-tauri/src/web_api.rs b/apps/desktop/src-tauri/src/web_api.rsindex c8478523d..9afb4ec38 100644--- a/apps/desktop/src-tauri/src/web_api.rs+++ b/apps/desktop/src-tauri/src/web_api.rs@@ -3,8 +3,8 @@ use tauri::{Emitter, Manager, Runtime};use tauri_specta::Event;use crate::{- auth::{AuthStore, AuthenticationInvalid},- ArcLock, MutableState,+ auth::{AuthSecret, AuthStore, AuthenticationInvalid},+ ArcLock,};async fn do_authed_request(@@ -14,7 +14,16 @@ async fn do_authed_request() -> Result<reqwest::Response, reqwest::Error> {let client = reqwest::Client::new();- let mut req = build(client, url).header("Authorization", format!("Bearer {}", auth.token));+ let mut req = build(client, url).header(+ "Authorization",+ format!(+ "Bearer {}",+ match &auth.secret {+ AuthSecret::ApiKey { api_key } => api_key,+ AuthSecret::Session { token, .. } => token,+ }+ ),+ );if let Some(s) = std::option_env!("VITE_VERCEL_AUTOMATION_BYPASS_SECRET") {req = req.header("x-vercel-protection-bypass", s);diff --git a/apps/desktop/src/components/SignInButton.tsx b/apps/desktop/src/components/SignInButton.tsxindex 3ef0ab41e..755f724ca 100644--- a/apps/desktop/src/components/SignInButton.tsx+++ b/apps/desktop/src/components/SignInButton.tsx@@ -4,6 +4,7 @@ import { invoke } from "@tauri-apps/api/core";import { listen } from "@tauri-apps/api/event";import { onOpenUrl } from "@tauri-apps/plugin-deep-link";import * as shell from "@tauri-apps/plugin-shell";+import { z } from "zod";import { getCurrentWindow } from "@tauri-apps/api/window";import { ComponentProps } from "solid-js";@@ -12,27 +13,12 @@ import { identifyUser, trackEvent } from "~/utils/analytics";import { clientEnv } from "~/utils/env";import { commands } from "~/utils/tauri";import callbackTemplate from "./callback.template";+import { createSignInMutation } from "~/utils/auth";export function SignInButton(props: Omit<ComponentProps<typeof Button>, "onClick">) {- const signIn = createMutation(() => ({- mutationFn: async (abort: AbortController) => {- const platform = import.meta.env.DEV ? "web" : "desktop";-- let session;-- if (platform === "web")- session = await createLocalServerSession(abort.signal);- else session = await createDeepLinkSession(abort.signal);-- await shell.open(session.url.toString());-- await processAuthData(await session.complete());-- getCurrentWindow().setFocus();- },- }));+ const signIn = createSignInMutation();return (<Button@@ -53,123 +39,3 @@ export function SignInButton(</Button>);}--async function createSessionRequestUrl(- port: string | null,- platform: "web" | "desktop"-) {- const serverUrl =- (await generalSettingsStore.get())?.serverUrl ?? "https://cap.so";- const callbackUrl = new URL(`/api/desktop/session/request`, serverUrl);-- if (port !== null) callbackUrl.searchParams.set("port", port);- callbackUrl.searchParams.set("platform", platform);-- return callbackUrl;-}--type AuthData = { token: string; user_id: string; expires: number };--async function createLocalServerSession(signal: AbortSignal) {- await invoke("plugin:oauth|stop").catch(() => {});-- const port: string = await invoke("plugin:oauth|start", {- config: {- response: callbackTemplate,- headers: {- "Content-Type": "text/html; charset=utf-8",- "Cache-Control": "no-store, no-cache, must-revalidate",- Pragma: "no-cache",- },- // Add a cleanup function to stop the server after handling the request- cleanup: true,- },- });-- signal.onabort = () => {- invoke("plugin:oauth|stop").catch(() => {});- };-- let res: (url: URL) => void;- const stopListening = await listen(- "oauth://url",- (data: { payload: string }) => {- if (!data.payload.includes("token")) {- return;- }-- const urlObject = new URL(data.payload);- res(urlObject);- }- );-- return {- url: await createSessionRequestUrl(port, "web"),- complete: async () => {- const url = await new Promise<URL>((r) => {- res = r;- });-- stopListening();-- if (signal.aborted) throw new Error("Sign in aborted");-- const token = url.searchParams.get("token");- const user_id = url.searchParams.get("user_id");- const expires = Number(url.searchParams.get("expires"));- if (!token || !expires || !user_id)- throw new Error("Invalid token or expires");-- return { token, user_id, expires };- },- };-}--async function createDeepLinkSession(signal: AbortSignal) {- let res: (data: AuthData) => void;- const p = new Promise<AuthData>((r) => {- res = r;- });- const stopListening = await onOpenUrl(async (urls) => {- for (const url of urls) {- if (!url.includes("token=")) return;- if (signal.aborted) return;-- const urlObject = new URL(url);- const token = urlObject.searchParams.get("token");- const user_id = urlObject.searchParams.get("user_id");- const expires = Number(urlObject.searchParams.get("expires"));-- if (!token || !expires || !user_id) {- throw new Error("Invalid signin params");- }-- res({ token, user_id, expires });- }- });-- signal.onabort = () => {- stopListening();- };-- return {- url: await createSessionRequestUrl(null, "desktop"),- complete: () => p,- };-}--async function processAuthData({ token, user_id, expires }: AuthData) {- identifyUser(user_id);- trackEvent("user_signed_in", { platform: "desktop" });-- const existingAuth = await authStore.get();- await authStore.set({- token,- user_id,- intercom_hash: existingAuth?.intercom_hash ?? "",- expires,- plan: null,- });-- await commands.updateAuthPlan();-}diff --git a/apps/desktop/src/routes/(window-chrome)/(main).tsx b/apps/desktop/src/routes/(window-chrome)/(main).tsxindex 22dacdf6c..94c931ddb 100644--- a/apps/desktop/src/routes/(window-chrome)/(main).tsx+++ b/apps/desktop/src/routes/(window-chrome)/(main).tsx@@ -97,7 +97,7 @@ export default function () {onMount(async () => {if (auth.data?.user_id) {- const authSessionId = `${auth.data.user_id}-${auth.data.expires}`;+ const authSessionId = auth.data.user_id;const trackedSession = localStorage.getItem("tracked_signin_session");if (trackedSession !== authSessionId) {@@ -165,42 +165,30 @@ export default function () {dir={ostype() === "windows" ? "rtl" : "rtl"}class="flex gap-1 items-center mx-2">- <Tooltip- content={- <span>- Settings- </span>- }- >+ <Tooltip content={<span>Settings</span>}><buttontype="button"onClick={async () => {await commands.showWindow({ Settings: { page: "general" } });- getCurrentWindow().hide();- }}- class="flex items-center justify-center w-5 h-5 -ml-[1.5px]"- >- <IconCapSettings class="text-gray-11 size-5 hover:text-gray-12" />- </button>- </Tooltip>- <Tooltip- content={- <span>- Previous Recordings- </span>- }- >+ getCurrentWindow().hide();+ }}+ class="flex items-center justify-center w-5 h-5 -ml-[1.5px]"+ >+ <IconCapSettings class="text-gray-11 size-5 hover:text-gray-12" />+ </button>+ </Tooltip>+ <Tooltip content={<span>Previous Recordings</span>}><button- type="button"- onClick={async () => {- await commands.showWindow({ Settings: { page: "recordings" } });- getCurrentWindow().hide();- }}- class="flex justify-center items-center w-5 h-5"- >- <IconLucideSquarePlay class="text-gray-11 size-5 hover:text-gray-12" />- </button>- </Tooltip>+ type="button"+ onClick={async () => {+ await commands.showWindow({ Settings: { page: "recordings" } });+ getCurrentWindow().hide();+ }}+ class="flex justify-center items-center w-5 h-5"+ >+ <IconLucideSquarePlay class="text-gray-11 size-5 hover:text-gray-12" />+ </button>+ </Tooltip><ChangelogButton />@@ -794,7 +782,6 @@ function MicrophoneSelect(props: {const [dbs, setDbs] = createSignal<number | undefined>();const [isInitialized, setIsInitialized] = createSignal(false);-const requestPermission = useRequestPermission();const permissionGranted = () =>@@ -1036,7 +1023,7 @@ function TargetSelectInfoPill<T>(props: {? "On": "Off"}</InfoPill>-);+ );}function InfoPill(@@ -1112,10 +1099,7 @@ function ChangelogButton() {});return (- <Tooltip- openDelay={0}- content="Changelog"- >+ <Tooltip openDelay={0} content="Changelog"><buttontype="button"onClick={handleChangelogClick}diff --git a/apps/desktop/src/routes/(window-chrome)/upgrade.tsx b/apps/desktop/src/routes/(window-chrome)/upgrade.tsxindex 888468b63..01a8f9339 100644--- a/apps/desktop/src/routes/(window-chrome)/upgrade.tsx+++ b/apps/desktop/src/routes/(window-chrome)/upgrade.tsx@@ -21,150 +21,6 @@ import { authStore } from "../../store";import { Dialog, DialogContent, Input } from "../editor/ui";import callbackTemplate from "./callback.template";-const signInAction = action(async (planType: "yearly" | "monthly") => {- console.log("Starting sign in action");- let res: (url: URL) => void;-- try {- console.log("Setting up OAuth URL listener");- const stopListening = await listen(- "oauth://url",- (data: { payload: string }) => {- console.log("Received OAuth URL:", data.payload);- if (!data.payload.includes("token")) {- console.log("URL does not contain token, ignoring");- return;- }-- const urlObject = new URL(data.payload);- res(urlObject);- }- );-- try {- console.log("Stopping any existing OAuth server");- await invoke("plugin:oauth|stop");- } catch (e) {- console.log("No existing OAuth server to stop");- }-- console.log("Starting OAuth server");- const port: string = await invoke("plugin:oauth|start", {- config: {- response: callbackTemplate,- headers: {- "Content-Type": "text/html; charset=utf-8",- "Cache-Control": "no-store, no-cache, must-revalidate",- Pragma: "no-cache",- },- cleanup: true,- },- });- console.log("OAuth server started on port:", port);-- const platform =- import.meta.env.VITE_ENVIRONMENT === "development" ? "web" : "desktop";- console.log("Platform:", platform);-- const callbackUrl = new URL(- `/api/desktop/session/request`,- clientEnv.VITE_SERVER_URL- );- callbackUrl.searchParams.set("port", port);- callbackUrl.searchParams.set("platform", platform);- console.log("Callback URL:", callbackUrl.toString());-- console.log("Hiding upgrade window");- const currentUpgradeWindow = await Window.getByLabel("upgrade");- if (currentUpgradeWindow) {- await currentUpgradeWindow.minimize();- }-- console.log("Opening auth URL in browser");- await shell.open(callbackUrl.toString());-- console.log("Waiting for OAuth callback");- const url = await new Promise<URL>((r) => {- res = r;- });- console.log("Received OAuth callback");- stopListening();-- const isDevMode = import.meta.env.VITE_ENVIRONMENT === "development";- if (!isDevMode) {- console.log("Not in dev mode, returning");- return;- }-- const token = url.searchParams.get("token");- const user_id = url.searchParams.get("user_id");- const expires = Number(url.searchParams.get("expires"));- if (!token || !expires || !user_id) {- console.error("Missing required auth params");- throw new Error("Invalid token or expires");- }- console.log("Received valid auth params");-- const existingAuth = await authStore.get();- console.log("Setting auth store");- await authStore.set({- token,- user_id,- expires,- intercom_hash: existingAuth?.intercom_hash ?? "",- plan: {- upgraded: false,- last_checked: 0,- manual: existingAuth?.plan?.manual ?? false,- },- });-- console.log("Identifying user in analytics");- identifyUser(user_id);- console.log("Tracking sign in event");- trackEvent("user_signed_in", { platform: "desktop" });-- console.log("Reopening upgrade window");- await commands.showWindow("Upgrade");-- console.log("Waiting for window to be ready");- await new Promise((resolve) => setTimeout(resolve, 500));-- console.log("Getting upgrade window reference");- const focusedUpgradeWindow = await Window.getByLabel("upgrade");- if (focusedUpgradeWindow) {- try {- console.log("Setting focus on upgrade window");- await focusedUpgradeWindow.show();- await focusedUpgradeWindow.setFocus();- } catch (e) {- console.error("Failed to focus upgrade window:", e);- }- }-- console.log("Getting checkout URL");- const planId = getProPlanId(planType);- const response = await apiClient.desktop.getProSubscribeURL({- body: { priceId: planId },- headers: await protectedHeaders(),- });-- if (response.status === 200) {- console.log("Opening checkout URL in external browser");- commands.openExternalLink(response.body.url);- console.log("Minimizing upgrade window");- const window = await Window.getByLabel("upgrade");- if (window) {- await window.minimize();- }- }- } catch (error) {- console.error("Sign in failed:", error);- await authStore.set();- throw error;- }-});-const proFeatures = ["Commercial License Included","Unlimited cloud storage & Shareable links",@@ -178,6 +34,7 @@ const proFeatures = [import { RuntimeLoader } from "@rive-app/canvas";import riveWASMResource from "@rive-app/canvas/rive.wasm?url";+import { createSignInMutation } from "~/utils/auth";RuntimeLoader.setWasmUrl(riveWASMResource);@@ -186,7 +43,7 @@ export default function Page() {const [isCommercialAnnual, setIsCommercialAnnual] = createSignal(true);const [upgradeComplete, setUpgradeComplete] = createSignal(false);const [loading, setLoading] = createSignal(false);- const signIn = useAction(signInAction);+ const signIn = createSignInMutation();const license = createLicenseQuery();const [openLicenseDialog, setOpenLicenseDialog] = createSignal(false);@@ -233,12 +90,11 @@ export default function Page() {try {const auth = await authStore.get();- console.log("Auth status:", auth ? "authenticated" : "not authenticated");+ console.log({ auth });if (!auth) {console.log("No auth found, starting sign in flow");- await signIn(isProAnnual() ? "yearly" : "monthly");- return;+ await signIn.mutateAsync(new AbortController());}const planId = getProPlanId(isProAnnual() ? "yearly" : "monthly");@@ -253,9 +109,7 @@ export default function Page() {commands.openExternalLink(response.body.url);console.log("Minimizing upgrade window");const window = await Window.getByLabel("upgrade");- if (window) {- await window.minimize();- }+ if (window) await window.minimize();} else {console.error("Failed to get checkout URL, status:", response.status);}@@ -286,107 +140,107 @@ export default function Page() {},}));- onMount(async () => {- console.log("Component mounted");- const unsubscribeDeepLink = await onOpenUrl(async (urls) => {- console.log("Deep link received:", urls);- const isDevMode = import.meta.env.VITE_ENVIRONMENT === "development";- if (isDevMode) {- console.log("In dev mode, ignoring deep link");- return;- }-- for (const url of urls) {- if (!url.includes("token=")) {- console.log("URL does not contain token, skipping");- return;- }-- console.log("Processing auth URL");- const urlObject = new URL(url);- const token = urlObject.searchParams.get("token");- const user_id = urlObject.searchParams.get("user_id");- const expires = Number(urlObject.searchParams.get("expires"));-- if (!token || !expires || !user_id) {- console.error("Invalid signin params");- throw new Error("Invalid signin params");- }-- console.log("Setting auth store with new credentials");- const existingAuth = await authStore.get();- await authStore.set({- token,- user_id,- expires,- intercom_hash: existingAuth?.intercom_hash ?? "",- plan: {- upgraded: false,- last_checked: 0,- manual: existingAuth?.plan?.manual ?? false,- },- });-- console.log("Identifying user in analytics");- identifyUser(user_id);- console.log("Tracking sign in event");- trackEvent("user_signed_in", { platform: "desktop" });-- console.log("Reopening upgrade window");- await commands.showWindow("Upgrade");-- console.log("Waiting for window to be ready");- await new Promise((resolve) => setTimeout(resolve, 500));-- console.log("Getting upgrade window reference");- const upgradeWindow = await Window.getByLabel("upgrade");- if (upgradeWindow) {- try {- console.log("Setting focus on upgrade window");- await upgradeWindow.show();- await upgradeWindow.setFocus();- } catch (e) {- console.error("Failed to focus upgrade window:", e);- }- }-- console.log("Getting checkout URL");- const planId = getProPlanId(isProAnnual() ? "yearly" : "monthly");- const response = await apiClient.desktop.getProSubscribeURL({- body: { priceId: planId },- headers: await protectedHeaders(),- });-- if (response.status === 200) {- console.log("Opening checkout URL in external browser");- commands.openExternalLink(response.body.url);- console.log("Minimizing upgrade window");- if (upgradeWindow) {- await upgradeWindow.minimize();- }- }- }- });-- onCleanup(() => {- console.log("Cleaning up deep link listener");- unsubscribeDeepLink();- });-- console.log("Setting up upgrade status check interval");- const interval = setInterval(async () => {- console.log("Checking upgrade status");- const result = await commands.checkUpgradedAndUpdate();- if (result) {- console.log("Upgrade complete");- setUpgradeComplete(true);- }- }, 5000);- onCleanup(() => {- console.log("Cleaning up upgrade status check interval");- clearInterval(interval);- });- });+ // onMount(async () => {+ // console.log("Component mounted");+ // const unsubscribeDeepLink = await onOpenUrl(async (urls) => {+ // console.log("Deep link received:", urls);+ // const isDevMode = import.meta.env.VITE_ENVIRONMENT === "development";+ // if (isDevMode) {+ // console.log("In dev mode, ignoring deep link");+ // return;+ // }++ // for (const url of urls) {+ // if (!url.includes("token=")) {+ // console.log("URL does not contain token, skipping");+ // return;+ // }++ // console.log("Processing auth URL");+ // const urlObject = new URL(url);+ // const token = urlObject.searchParams.get("token");+ // const user_id = urlObject.searchParams.get("user_id");+ // const expires = Number(urlObject.searchParams.get("expires"));++ // if (!token || !expires || !user_id) {+ // console.error("Invalid signin params");+ // throw new Error("Invalid signin params");+ // }++ // console.log("Setting auth store with new credentials");+ // const existingAuth = await authStore.get();+ // await authStore.set({+ // token,+ // user_id,+ // expires,+ // intercom_hash: existingAuth?.intercom_hash ?? "",+ // plan: {+ // upgraded: false,+ // last_checked: 0,+ // manual: existingAuth?.plan?.manual ?? false,+ // },+ // });++ // console.log("Identifying user in analytics");+ // identifyUser(user_id);+ // console.log("Tracking sign in event");+ // trackEvent("user_signed_in", { platform: "desktop" });++ // console.log("Reopening upgrade window");+ // await commands.showWindow("Upgrade");++ // console.log("Waiting for window to be ready");+ // await new Promise((resolve) => setTimeout(resolve, 500));++ // console.log("Getting upgrade window reference");+ // const upgradeWindow = await Window.getByLabel("upgrade");+ // if (upgradeWindow) {+ // try {+ // console.log("Setting focus on upgrade window");+ // await upgradeWindow.show();+ // await upgradeWindow.setFocus();+ // } catch (e) {+ // console.error("Failed to focus upgrade window:", e);+ // }+ // }++ // console.log("Getting checkout URL");+ // const planId = getProPlanId(isProAnnual() ? "yearly" : "monthly");+ // const response = await apiClient.desktop.getProSubscribeURL({+ // body: { priceId: planId },+ // headers: await protectedHeaders(),+ // });++ // if (response.status === 200) {+ // console.log("Opening checkout URL in external browser");+ // commands.openExternalLink(response.body.url);+ // console.log("Minimizing upgrade window");+ // if (upgradeWindow) {+ // await upgradeWindow.minimize();+ // }+ // }+ // }+ // });++ // onCleanup(() => {+ // console.log("Cleaning up deep link listener");+ // unsubscribeDeepLink();+ // });++ // console.log("Setting up upgrade status check interval");+ // const interval = setInterval(async () => {+ // console.log("Checking upgrade status");+ // const result = await commands.checkUpgradedAndUpdate();+ // if (result) {+ // console.log("Upgrade complete");+ // setUpgradeComplete(true);+ // }+ // }, 5000);+ // onCleanup(() => {+ // console.log("Cleaning up upgrade status check interval");+ // clearInterval(interval);+ // });+ // });const { rive: CommercialRive, RiveComponent: Commercial } = createRive(() => ({diff --git a/apps/desktop/src/utils/auth.ts b/apps/desktop/src/utils/auth.tsnew file mode 100644index 000000000..4ca3e1f31--- /dev/null+++ b/apps/desktop/src/utils/auth.ts@@ -0,0 +1,158 @@+import * as shell from "@tauri-apps/plugin-shell";+import { createMutation } from "@tanstack/solid-query";+import { getCurrentWindow } from "@tauri-apps/api/window";+import { authStore, generalSettingsStore } from "~/store";+import { invoke } from "@tauri-apps/api/core";+import callbackTemplate from "~/components/callback.template";+import { listen } from "@tauri-apps/api/event";+import { z } from "zod";+import { onOpenUrl } from "@tauri-apps/plugin-deep-link";+import { identifyUser, trackEvent } from "./analytics";+import { commands } from "./tauri";++export function createSignInMutation() {+ return createMutation(() => ({+ mutationFn: async (abort: AbortController) => {+ const platform = import.meta.env.DEV ? "web" : "desktop";++ let session;++ if (platform === "web")+ session = await createLocalServerSession(abort.signal);+ else session = await createDeepLinkSession(abort.signal);++ await shell.open(session.url.toString());++ await processAuthData(await session.complete());++ getCurrentWindow().setFocus();+ },+ }));+}++async function createSessionRequestUrl(+ port: string | null,+ platform: "web" | "desktop"+) {+ const serverUrl =+ (await generalSettingsStore.get())?.serverUrl ?? "https://cap.so";+ const callbackUrl = new URL(+ `/api/desktop/session/request?type=api_key`,+ serverUrl+ );++ if (port !== null) callbackUrl.searchParams.set("port", port);+ callbackUrl.searchParams.set("platform", platform);++ return callbackUrl;+}++async function createLocalServerSession(signal: AbortSignal) {+ await invoke("plugin:oauth|stop").catch(() => {});++ const port: string = await invoke("plugin:oauth|start", {+ config: {+ response: callbackTemplate,+ headers: {+ "Content-Type": "text/html; charset=utf-8",+ "Cache-Control": "no-store, no-cache, must-revalidate",+ Pragma: "no-cache",+ },+ // Add a cleanup function to stop the server after handling the request+ cleanup: true,+ },+ });++ signal.onabort = () => {+ invoke("plugin:oauth|stop").catch(() => {});+ };++ let res: (url: URL) => void;+ const stopListening = await listen(+ "oauth://url",+ (data: { payload: string }) => {+ console.log(data);+ if (+ !(data.payload.includes("token") || data.payload.includes("api_key"))+ ) {+ return;+ }++ const urlObject = new URL(data.payload);+ res(urlObject);+ }+ );++ return {+ url: await createSessionRequestUrl(port, "web"),+ complete: async () => {+ const url = await new Promise<URL>((r) => {+ res = r;+ });++ console.log(url);+ stopListening();++ if (signal.aborted) throw new Error("Sign in aborted");++ return paramsValidator.parse({+ type: url.searchParams.get("type"),+ api_key: url.searchParams.get("api_key"),+ user_id: url.searchParams.get("user_id"),+ });+ },+ };+}++const paramsValidator = z.object({+ type: z.literal("api_key"),+ api_key: z.string(),+ user_id: z.string(),+});++async function createDeepLinkSession(signal: AbortSignal) {+ let res: (data: z.infer<typeof paramsValidator>) => void;+ const p = new Promise<z.infer<typeof paramsValidator>>((r) => {+ res = r;+ });+ const stopListening = await onOpenUrl(async (urls) => {+ for (const urlString of urls) {+ if (!urlString.includes("token=")) return;+ if (signal.aborted) return;++ const url = new URL(urlString);++ res(+ paramsValidator.parse({+ type: url.searchParams.get("type"),+ api_key: url.searchParams.get("api_key"),+ user_id: url.searchParams.get("user_id"),+ })+ );+ }+ });++ signal.onabort = () => {+ stopListening();+ };++ return {+ url: await createSessionRequestUrl(null, "desktop"),+ complete: () => p,+ };+}++async function processAuthData(data: z.infer<typeof paramsValidator>) {+ identifyUser(data.user_id);+ trackEvent("user_signed_in", { platform: "desktop" });++ const existingAuth = await authStore.get();+ await authStore.set({+ secret: { api_key: data.api_key },+ user_id: data.user_id,+ intercom_hash: existingAuth?.intercom_hash ?? "",+ plan: null,+ });++ await commands.updateAuthPlan();+}diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.tsindex d8aececed..11186204b 100644--- a/apps/desktop/src/utils/tauri.ts+++ b/apps/desktop/src/utils/tauri.ts@@ -232,7 +232,8 @@ export type AudioMeta = { path: string;* unix time of the first frame*/start_time?: number | null }-export type AuthStore = { token: string; user_id: string | null; expires: number; plan: Plan | null; intercom_hash: string | null }+export type AuthSecret = { api_key: string } | { token: string; expires: number }+export type AuthStore = { secret: AuthSecret; user_id: string | null; plan: Plan | null; intercom_hash: string | null }export type AuthenticationInvalid = nullexport type BackgroundConfiguration = { source: BackgroundSource; blur: number; padding: number; rounding: number; inset: number; crop: Crop | null; shadow?: number; advancedShadow?: ShadowConfiguration | null }export type BackgroundSource = { type: "wallpaper"; path: string | null } | { type: "image"; path: string | null } | { type: "color"; value: [number, number, number] } | { type: "gradient"; from: [number, number, number]; to: [number, number, number]; angle?: number }diff --git a/apps/desktop/src/utils/web-api.ts b/apps/desktop/src/utils/web-api.tsindex 152fb113f..f33700252 100644--- a/apps/desktop/src/utils/web-api.ts+++ b/apps/desktop/src/utils/web-api.ts@@ -20,8 +20,6 @@ const api: ApiFetcher = async (args) => {body = await resp.text();}- console.log({ body });-return {body,status: resp.status,@@ -39,7 +37,15 @@ export const licenseApiClient = initClient(licenseContract, {});export async function maybeProtectedHeaders() {- const token = (await authStore.get())?.token;+ const store = await authStore.get();++ let token: string | undefined;+ if (store?.secret && "api_key" in store.secret) {+ token = store.secret.api_key;+ } else if (store?.secret && "token" in store.secret) {+ token = store.secret.token;+ }+return { authorization: token ? `Bearer ${token}` : undefined };}diff --git a/apps/web/app/api/desktop/session/app.ts b/apps/web/app/api/desktop/session/app.tsindex 800cada4a..09e050452 100644--- a/apps/web/app/api/desktop/session/app.ts+++ b/apps/web/app/api/desktop/session/app.ts@@ -1,5 +1,7 @@+import { db } from "@cap/database";import { authOptions } from "@cap/database/auth/auth-options";import { getCurrentUser } from "@cap/database/auth/session";+import { authApiKeys } from "@cap/database/schema";import { serverEnv } from "@cap/env";import { zValidator } from "@hono/zod-validator";import { Hono } from "hono";@@ -19,35 +21,52 @@ app.get(platform: z.union([z.literal("web"), z.literal("desktop")]).default("web"),+ type: z+ .union([z.literal("session"), z.literal("api_key")])+ .default("session"),})),async (c) => {- const { port, platform } = c.req.valid("query");+ const { port, platform, type } = c.req.valid("query");const secret = serverEnv().NEXTAUTH_SECRET;const url = new URL(c.req.url);- const loginRedirectUrl = `${serverEnv().WEB_URL}/login?next=${- serverEnv().WEB_URL- }${url.pathname}${url.search}`;+ const loginRedirectUrl = `${+ serverEnv().VERCEL_BRANCH_URL ?? serverEnv().WEB_URL+ }/login?next=${serverEnv().VERCEL_BRANCH_URL ?? serverEnv().WEB_URL}${+ url.pathname+ }${url.search}`;const session = await getServerSession(authOptions());if (!session) return c.redirect(loginRedirectUrl);- const token = getCookie(c, "next-auth.session-token");const user = await getCurrentUser(session);+ if (!user) return c.redirect(loginRedirectUrl);- if (token === undefined || !user) return c.redirect(loginRedirectUrl);+ let data;- const decodedToken = await decode({ token, secret });+ if (type === "session") {+ const token = getCookie(c, "next-auth.session-token");+ if (token === undefined) return c.redirect(loginRedirectUrl);- if (!decodedToken) return Response.redirect(loginRedirectUrl);+ const decodedToken = await decode({ token, secret });- const params = new URLSearchParams({- token,- expires: decodedToken.exp as string,- user_id: user.id,- });+ if (!decodedToken) return c.redirect(loginRedirectUrl);++ data = {+ type: "token",+ token,+ expires: decodedToken.exp as string,+ };+ } else {+ const id = crypto.randomUUID();+ await db().insert(authApiKeys).values({ id, userId: user.id });++ data = { type: "api_key", api_key: id };+ }++ const params = new URLSearchParams({ ...data, user_id: user.id });const returnUrl = new URL(platform === "web"diff --git a/apps/web/app/api/upload/multipart/[...route]/route.ts b/apps/web/app/api/upload/[...route]/multipart.tssimilarity index 98%rename from apps/web/app/api/upload/multipart/[...route]/route.tsrename to apps/web/app/api/upload/[...route]/multipart.tsindex 719f48280..16d9ba5e6 100644--- a/apps/web/app/api/upload/multipart/[...route]/route.ts+++ b/apps/web/app/api/upload/[...route]/multipart.ts@@ -17,10 +17,7 @@ import { serverEnv } from "@cap/env";import { handle } from "hono/vercel";import { withAuth, corsMiddleware } from "@/app/api/utils";-const app = new Hono()- .basePath("/api/upload/multipart")- .use(corsMiddleware)- .use(withAuth);+export const app = new Hono().use(withAuth);app.post("/initiate",@@ -354,7 +351,3 @@ async function getUserBucketWithClient(userId: string) {return { s3Client, s3Config, bucketName };}--export const GET = handle(app);-export const POST = handle(app);-export const OPTIONS = handle(app);diff --git a/apps/web/app/api/upload/[...route]/route.ts b/apps/web/app/api/upload/[...route]/route.tsnew file mode 100644index 000000000..807c9e12d--- /dev/null+++ b/apps/web/app/api/upload/[...route]/route.ts@@ -0,0 +1,18 @@+import { Hono } from "hono";+import { handle } from "hono/vercel";++import { corsMiddleware, withAuth } from "../../utils";++import * as multipart from "./multipart";+import * as signed from "./signed";++const app = new Hono()+ .basePath("/api/upload")+ .use(corsMiddleware)+ .route("/multipart", multipart.app)+ .route("/signed", signed.app);++export const GET = handle(app);+export const POST = handle(app);+export const OPTIONS = handle(app);+export const DELETE = handle(app);diff --git a/apps/web/app/api/upload/signed/route.ts b/apps/web/app/api/upload/[...route]/signed.tssimilarity index 79%rename from apps/web/app/api/upload/signed/route.tsrename to apps/web/app/api/upload/[...route]/signed.tsindex 0e20d5aa1..54f879e2c 100644--- a/apps/web/app/api/upload/signed/route.ts+++ b/apps/web/app/api/upload/[...route]/signed.ts@@ -14,38 +14,32 @@ import { eq } from "drizzle-orm";import { cookies } from "next/headers";import type { NextRequest } from "next/server";import { serverEnv } from "@cap/env";--export async function POST(request: NextRequest) {- try {+import { Hono } from "hono";+import { zValidator } from "@hono/zod-validator";+import { z } from "zod";+import { handle } from "hono/vercel";++import { corsMiddleware, withAuth } from "../../utils";++export const app = new Hono().use(withAuth);++app.post(+ "/",+ zValidator(+ "json",+ z.object({+ fileKey: z.string(),+ duration: z.string().optional(),+ bandwidth: z.string().optional(),+ resolution: z.string().optional(),+ videoCodec: z.string().optional(),+ audioCodec: z.string().optional(),+ })+ ),+ async (c) => {+ const user = c.get("user");const { fileKey, duration, bandwidth, resolution, videoCodec, audioCodec } =- await request.json();-- if (!fileKey) {- console.error("Missing required fields in /api/upload/signed/route.ts");- return Response.json(- { error: "Missing required fields" },- { status: 400 }- );- }-- const token = request.headers.get("authorization")?.split(" ")[1];- if (token) {- cookies().set({- name: "next-auth.session-token",- value: token,- path: "/",- sameSite: "none",- secure: true,- httpOnly: true,- });- }-- const user = await getCurrentUser();- console.log("/api/upload/signed user", user);-- if (!user) {- return Response.json({ error: true }, { status: 401 });- }+ c.req.valid("json");try {const [bucket] = await db()@@ -136,12 +130,7 @@ export async function POST(request: NextRequest) {const presignedPostData: PresignedPost = await createPresignedPost(s3Client,- {- Bucket: bucketName,- Key: fileKey,- Fields,- Expires: 1800,- }+ { Bucket: bucketName, Key: fileKey, Fields, Expires: 1800 });// When not using aws s3, we need to transform the url to the local endpoint@@ -173,7 +162,7 @@ export async function POST(request: NextRequest) {}}- return Response.json({ presignedPostData });+ return c.json({ presignedPostData });} catch (s3Error) {console.error("S3 operation failed:", s3Error);throw new Error(@@ -182,14 +171,5 @@ export async function POST(request: NextRequest) {}`);}- } catch (error) {- console.error("Error creating presigned URL", error);- return Response.json(- {- error: "Error creating presigned URL",- details: error instanceof Error ? error.message : String(error),- },- { status: 500 }- );}-}+);diff --git a/apps/web/app/api/upload/mux/create/route.ts b/apps/web/app/api/upload/mux/create/route.tsdeleted file mode 100644index 191b2f2fc..000000000--- a/apps/web/app/api/upload/mux/create/route.ts+++ /dev/null@@ -1,298 +0,0 @@-import { type NextRequest } from "next/server";-import { db } from "@cap/database";-import { s3Buckets, videos } from "@cap/database/schema";-import { eq } from "drizzle-orm";-import { S3Client, ListObjectsV2Command } from "@aws-sdk/client-s3";-import {- MediaConvertClient,- CreateJobCommand,-} from "@aws-sdk/client-mediaconvert";-import { createS3Client, getS3Bucket } from "@/utils/s3";-import { serverEnv, buildEnv } from "@cap/env";--const allowedOrigins = [- buildEnv.NEXT_PUBLIC_WEB_URL,- "http://localhost:3001",- "tauri://localhost",- "http://tauri.localhost",- "https://tauri.localhost",- "https://cap.link",- "https://cap.so",-];--export async function OPTIONS(req: NextRequest) {- const params = req.nextUrl.searchParams;- const origin = params.get("origin") || null;- const originalOrigin = req.nextUrl.origin;-- return new Response(null, {- status: 200,- headers: {- "Access-Control-Allow-Origin":- origin && allowedOrigins.includes(origin)- ? origin- : allowedOrigins.includes(originalOrigin)- ? originalOrigin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- "Access-Control-Allow-Headers": "Authorization, sentry-trace, baggage",- },- });-}--export async function GET(request: NextRequest) {- const searchParams = request.nextUrl.searchParams;- const videoId = searchParams.get("videoId") || "";- const userId = searchParams.get("userId") || "";- const origin = request.headers.get("origin") as string;-- if (!videoId || !userId) {- return new Response(- JSON.stringify({- error: true,- message: "videoId not supplied or user not logged in",- }),- {- status: 401,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-- const query = await db()- .select({- video: videos,- bucket: s3Buckets,- })- .from(videos)- .leftJoin(s3Buckets, eq(videos.bucket, s3Buckets.id))- .where(eq(videos.id, videoId));-- if (query.length === 0) {- return new Response(- JSON.stringify({ error: true, message: "Video does not exist" }),- {- status: 401,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-- const result = query[0];- if (!result) {- return new Response(- JSON.stringify({ error: true, message: "Video does not exist" }),- {- status: 401,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-- const { video, bucket } = result;-- if (video.jobId !== null || video.ownerId !== userId) {- return new Response(JSON.stringify({ assetId: video.jobId }), {- status: 200,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- });- }-- const Bucket = await getS3Bucket(bucket);- const videoPrefix = `${userId}/${videoId}/video/`;- const audioPrefix = `${userId}/${videoId}/audio/`;-- try {- const [s3Client] = await createS3Client(bucket);-- const videoSegmentCommand = new ListObjectsV2Command({- Bucket,- Prefix: videoPrefix,- });-- const audioSegmentCommand = new ListObjectsV2Command({- Bucket,- Prefix: audioPrefix,- });-- const videoSegments = await s3Client.send(videoSegmentCommand);- const audioSegments = await s3Client.send(audioSegmentCommand);-- const videoSegmentKeys = (videoSegments.Contents || []).map(- (object) => `s3://${bucket}/${object.Key}`- );-- if (videoSegmentKeys.length > 149) {- await db()- .update(videos)- .set({ skipProcessing: true })- .where(eq(videos.id, videoId));- return new Response(- JSON.stringify({- message: "Number of inputs exceeds limit, skipping processing",- }),- {- status: 200,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-- const audioSegmentKeys = (audioSegments.Contents || []).map(- (object) => `s3://${bucket}/${object.Key}`- );-- const mediaConvertClient = new MediaConvertClient({- region: serverEnv().CAP_AWS_REGION || "",- credentials: {- accessKeyId: serverEnv().CAP_AWS_ACCESS_KEY || "",- secretAccessKey: serverEnv().CAP_AWS_SECRET_KEY || "",- },- });-- const outputKey = `${userId}/${videoId}/output/`;-- const createJobCommand = new CreateJobCommand({- Role: serverEnv().CAP_AWS_MEDIACONVERT_ROLE_ARN || "",- Settings: {- Inputs: videoSegmentKeys.map((videoSegmentKey, index) => {- const audioSegmentKey = audioSegmentKeys[index];- return {- FileInput: videoSegmentKey,- ...(audioSegmentKey && {- AudioSelectors: {- "Audio Selector 1": {- DefaultSelection: "DEFAULT",- ExternalAudioFileInput: audioSegmentKey,- },- },- }),- VideoSelector: {},- TimecodeSource: "ZEROBASED",- };- }),- OutputGroups: [- {- Name: "Apple HLS",- OutputGroupSettings: {- Type: "HLS_GROUP_SETTINGS",- HlsGroupSettings: {- Destination: `s3://${bucket}/${outputKey}`,- SegmentLength: 3,- MinSegmentLength: 0,- DirectoryStructure: "SINGLE_DIRECTORY",- ProgramDateTimePeriod: 600,- SegmentControl: "SEGMENTED_FILES",- ManifestDurationFormat: "INTEGER",- StreamInfResolution: "INCLUDE",- ClientCache: "ENABLED",- AudioOnlyHeader: "INCLUDE",- ProgramDateTime: "EXCLUDE",- },- },- Outputs: [- {- NameModifier: "_output",- ContainerSettings: {- Container: "M3U8",- },- VideoDescription: {- CodecSettings: {- Codec: "H_264",- H264Settings: {- MaxBitrate: 5000000,- RateControlMode: "QVBR",- QvbrSettings: {- QvbrQualityLevel: 7,- },- },- },- },- ...(audioSegmentKeys.length > 0 && {- AudioDescriptions: [- {- AudioSourceName: "Audio Selector 1",- CodecSettings: {- Codec: "AAC",- AacSettings: {- Bitrate: 128000,- CodingMode: "CODING_MODE_2_0",- SampleRate: 48000,- },- },- },- ],- }),- },- ],- },- ],- TimecodeConfig: {- Source: "ZEROBASED",- },- },- });-- const createJobResponse = await mediaConvertClient.send(createJobCommand);- const jobId = createJobResponse.Job?.Id;-- await db().update(videos).set({ jobId }).where(eq(videos.id, videoId));-- return new Response(JSON.stringify({ jobId: jobId }), {- status: 200,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- });- } catch (error) {- console.error("Error creating Mux asset", error);- return new Response(- JSON.stringify({ error: error, message: "Error creating Mux asset" }),- {- status: 500,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-}diff --git a/apps/web/app/api/upload/mux/status/route.ts b/apps/web/app/api/upload/mux/status/route.tsdeleted file mode 100644index b0a89146f..000000000--- a/apps/web/app/api/upload/mux/status/route.ts+++ /dev/null@@ -1,164 +0,0 @@-import { type NextRequest } from "next/server";-import { db } from "@cap/database";-import { videos } from "@cap/database/schema";-import { eq } from "drizzle-orm";-import {- MediaConvertClient,- GetJobCommand,-} from "@aws-sdk/client-mediaconvert";-import { serverEnv, buildEnv } from "@cap/env";--const allowedOrigins = [- buildEnv.NEXT_PUBLIC_WEB_URL,- "http://localhost:3001",- "tauri://localhost",- "http://tauri.localhost",- "https://tauri.localhost",- "https://cap.link",- "https://cap.so",-];--export async function OPTIONS(req: NextRequest) {- const params = req.nextUrl.searchParams;- const origin = params.get("origin") || null;- const originalOrigin = req.nextUrl.origin;-- return new Response(null, {- status: 200,- headers: {- "Access-Control-Allow-Origin":- origin && allowedOrigins.includes(origin)- ? origin- : allowedOrigins.includes(originalOrigin)- ? originalOrigin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- "Access-Control-Allow-Headers": "Authorization, sentry-trace, baggage",- },- });-}--export async function GET(request: NextRequest) {- const searchParams = request.nextUrl.searchParams;- const videoId = searchParams.get("videoId") || "";- const userId = searchParams.get("userId") || "";- const origin = request.headers.get("origin") as string;-- if (!videoId || !userId) {- return new Response(- JSON.stringify({- error: true,- message: "videoId not supplied or user not logged in",- }),- {- status: 401,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-- const query = await db().select().from(videos).where(eq(videos.id, videoId));-- if (query.length === 0) {- return new Response(- JSON.stringify({ error: true, message: "Video does not exist" }),- {- status: 401,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-- const video = query[0];- if (!video) {- return new Response(- JSON.stringify({ error: true, message: "Video not found" }),- {- status: 404,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-- const jobId = video.jobId;-- if (!jobId) {- return new Response(- JSON.stringify({ error: true, message: "Job ID not found" }),- {- status: 404,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-- const mediaConvertClient = new MediaConvertClient({- region: serverEnv().CAP_AWS_REGION || "",- credentials: {- accessKeyId: serverEnv().CAP_AWS_ACCESS_KEY || "",- secretAccessKey: serverEnv().CAP_AWS_SECRET_KEY || "",- },- });-- try {- const getJobCommand = new GetJobCommand({- Id: jobId,- });-- const jobResponse = await mediaConvertClient.send(getJobCommand);- const jobStatus = jobResponse.Job?.Status;-- await db().update(videos).set({ jobStatus }).where(eq(videos.id, videoId));-- return new Response(JSON.stringify({ jobStatus: jobStatus }), {- status: 200,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- });- } catch (error) {- console.error("Error checking MediaConvert job status", error);- return new Response(- JSON.stringify({ error: error, message: "Error checking job status" }),- {- status: 500,- headers: {- "Access-Control-Allow-Origin": allowedOrigins.includes(origin)- ? origin- : "null",- "Access-Control-Allow-Credentials": "true",- "Access-Control-Allow-Methods": "GET, OPTIONS",- },- }- );- }-}diff --git a/apps/web/app/api/upload/new/route.ts b/apps/web/app/api/upload/new/route.tsdeleted file mode 100644index f9889290b..000000000--- a/apps/web/app/api/upload/new/route.ts+++ /dev/null@@ -1,49 +0,0 @@-import { type NextRequest } from "next/server";-import { getCurrentUser } from "@cap/database/auth/session";-import { uploadToS3 } from "@/utils/video/upload/helpers";-import { serverEnv } from "@cap/env";--export async function POST(request: NextRequest) {- const user = await getCurrentUser();- const formData = await request.formData();- const filename = formData.get("filename");- const videoId = formData.get("videoId");- const blobData = formData.get("blobData") as Blob;- const duration = formData.get("duration");- const resolution = formData.get("resolution");- const videoCodec = formData.get("videoCodec");- const audioCodec = formData.get("audioCodec");-- const awsRegion = serverEnv().CAP_AWS_REGION;- const awsBucket = serverEnv().CAP_AWS_BUCKET;-- if (!user || !awsRegion || !awsBucket || !filename || !blobData) {- console.error("Missing required data in /api/upload/new/route.ts");-- return Response.json({ error: true }, { status: 401 });- }-- const fullFilepath = `${user.id}/${videoId}/${filename}`;-- const upload = await uploadToS3({- filename: fullFilepath,- userId: user.id,- blobData,- duration: duration as string,- resolution: resolution as string,- videoCodec: videoCodec as string,- audioCodec: audioCodec as string,- awsBucket,- awsRegion,- });-- if (!upload) {- console.error("Upload failed");-- return Response.json({ error: true }, { status: 500 });- }-- console.log("Upload successful");-- return Response.json(true, { status: 200 });-}diff --git a/apps/web/app/api/utils.ts b/apps/web/app/api/utils.tsindex 81446247e..5747dee23 100644--- a/apps/web/app/api/utils.ts+++ b/apps/web/app/api/utils.ts@@ -3,43 +3,54 @@ import { cookies } from "next/headers";import { createMiddleware } from "hono/factory";import { buildEnv, serverEnv } from "@cap/env";import { cors } from "hono/cors";+import { eq } from "drizzle-orm";import { getServerSession, Session } from "next-auth";import { authOptions } from "@cap/database/auth/auth-options";import { Context } from "hono";+import { db } from "@cap/database";+import { authApiKeys, users } from "@cap/database/schema";async function getAuth(c: Context) {- const token = c.req.header("authorization")?.split(" ")[1];- if (token) {- cookies().set({- name: "next-auth.session-token",- value: token,- path: "/",- sameSite: "none",- secure: true,- httpOnly: true,- });+ const authHeader = c.req.header("authorization")?.split(" ")[1];++ let user;++ if (authHeader?.length === 36) {+ const res = await db()+ .select()+ .from(users)+ .leftJoin(authApiKeys, eq(users.id, authApiKeys.userId))+ .where(eq(authApiKeys.id, authHeader));+ user = res[0]?.users;+ } else {+ if (authHeader) {+ cookies().set({+ name: "next-auth.session-token",+ value: authHeader,+ path: "/",+ sameSite: "none",+ secure: true,+ httpOnly: true,+ });+ }++ const session = await getServerSession(authOptions());+ if (!session) return;+ user = await getCurrentUser(session);}- const session = await getServerSession(authOptions());- if (!session) return;- const user = await getCurrentUser(session);if (!user) return;-- return { session, user };+ return { user };}export const withOptionalAuth = createMiddleware<{Variables: {user?: Awaited<ReturnType<typeof getCurrentUser>>;- session?: Session;};}>(async (c, next) => {const auth = await getAuth(c);- if (auth) {- c.set("session", auth.session);- c.set("user", auth.user);- }+ if (auth) c.set("user", auth.user);await next();});@@ -47,13 +58,13 @@ export const withOptionalAuth = createMiddleware<{export const withAuth = createMiddleware<{Variables: {user: NonNullable<Awaited<ReturnType<typeof getCurrentUser>>>;- session: Session;};}>(async (c, next) => {+ console.log("withAuth", c.req);const auth = await getAuth(c);+ console.log("withAuth", { auth });if (!auth) return c.text("User not authenticated", 401);- c.set("session", auth.session);c.set("user", auth.user);await next();diff --git a/packages/database/migrations/0003_small_chamber.sql b/packages/database/migrations/0003_small_chamber.sqlnew file mode 100644index 000000000..806379bba--- /dev/null+++ b/packages/database/migrations/0003_small_chamber.sql@@ -0,0 +1,5 @@+CREATE TABLE `auth_api_keys` (+ `id` varchar(36) NOT NULL,+ `userId` varchar(15) NOT NULL,+ `createdAt` timestamp NOT NULL DEFAULT (now())+);diff --git a/packages/database/migrations/0004_good_microbe.sql b/packages/database/migrations/0004_good_microbe.sqlnew file mode 100644index 000000000..ff37b5149--- /dev/null+++ b/packages/database/migrations/0004_good_microbe.sql@@ -0,0 +1,2 @@+ALTER TABLE `auth_api_keys` ADD PRIMARY KEY(`id`);--> statement-breakpoint+ALTER TABLE `auth_api_keys` ADD CONSTRAINT `auth_api_keys_id_unique` UNIQUE(`id`);\ No newline at end of filediff --git a/packages/database/migrations/meta/0003_snapshot.json b/packages/database/migrations/meta/0003_snapshot.jsonnew file mode 100644index 000000000..57b61d3e6--- /dev/null+++ b/packages/database/migrations/meta/0003_snapshot.json@@ -0,0 +1,1318 @@+{+ "version": "5",+ "dialect": "mysql",+ "id": "31002a1a-0a15-428e-ab44-0be1c43a355d",+ "prevId": "c69214d1-02c2-4bee-9d62-199f92c6fe64",+ "tables": {+ "accounts": {+ "name": "accounts",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "userId": {+ "name": "userId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "type": {+ "name": "type",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "provider": {+ "name": "provider",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "providerAccountId": {+ "name": "providerAccountId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "access_token": {+ "name": "access_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "expires_in": {+ "name": "expires_in",+ "type": "int",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "id_token": {+ "name": "id_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "refresh_token": {+ "name": "refresh_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "refresh_token_expires_in": {+ "name": "refresh_token_expires_in",+ "type": "int",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "scope": {+ "name": "scope",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "token_type": {+ "name": "token_type",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "tempColumn": {+ "name": "tempColumn",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ }+ },+ "indexes": {+ "user_id_idx": {+ "name": "user_id_idx",+ "columns": [+ "userId"+ ],+ "isUnique": false+ },+ "provider_account_id_idx": {+ "name": "provider_account_id_idx",+ "columns": [+ "providerAccountId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "accounts_id": {+ "name": "accounts_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "accounts_id_unique": {+ "name": "accounts_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "auth_api_keys": {+ "name": "auth_api_keys",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(36)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "userId": {+ "name": "userId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ }+ },+ "indexes": {},+ "foreignKeys": {},+ "compositePrimaryKeys": {},+ "uniqueConstraints": {},+ "checkConstraint": {}+ },+ "comments": {+ "name": "comments",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "type": {+ "name": "type",+ "type": "varchar(6)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "content": {+ "name": "content",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "timestamp": {+ "name": "timestamp",+ "type": "float",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "authorId": {+ "name": "authorId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "videoId": {+ "name": "videoId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "parentCommentId": {+ "name": "parentCommentId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ }+ },+ "indexes": {+ "video_id_idx": {+ "name": "video_id_idx",+ "columns": [+ "videoId"+ ],+ "isUnique": false+ },+ "author_id_idx": {+ "name": "author_id_idx",+ "columns": [+ "authorId"+ ],+ "isUnique": false+ },+ "parent_comment_id_idx": {+ "name": "parent_comment_id_idx",+ "columns": [+ "parentCommentId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "comments_id": {+ "name": "comments_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "comments_id_unique": {+ "name": "comments_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "organization_invites": {+ "name": "organization_invites",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "organizationId": {+ "name": "organizationId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "invitedEmail": {+ "name": "invitedEmail",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "invitedByUserId": {+ "name": "invitedByUserId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "role": {+ "name": "role",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "status": {+ "name": "status",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'pending'"+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "expiresAt": {+ "name": "expiresAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ }+ },+ "indexes": {+ "organization_id_idx": {+ "name": "organization_id_idx",+ "columns": [+ "organizationId"+ ],+ "isUnique": false+ },+ "invited_email_idx": {+ "name": "invited_email_idx",+ "columns": [+ "invitedEmail"+ ],+ "isUnique": false+ },+ "invited_by_user_id_idx": {+ "name": "invited_by_user_id_idx",+ "columns": [+ "invitedByUserId"+ ],+ "isUnique": false+ },+ "status_idx": {+ "name": "status_idx",+ "columns": [+ "status"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "organization_invites_id": {+ "name": "organization_invites_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "organization_invites_id_unique": {+ "name": "organization_invites_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "organization_members": {+ "name": "organization_members",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "userId": {+ "name": "userId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "organizationId": {+ "name": "organizationId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "role": {+ "name": "role",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ }+ },+ "indexes": {+ "user_id_idx": {+ "name": "user_id_idx",+ "columns": [+ "userId"+ ],+ "isUnique": false+ },+ "organization_id_idx": {+ "name": "organization_id_idx",+ "columns": [+ "organizationId"+ ],+ "isUnique": false+ },+ "user_id_organization_id_idx": {+ "name": "user_id_organization_id_idx",+ "columns": [+ "userId",+ "organizationId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "organization_members_id": {+ "name": "organization_members_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "organization_members_id_unique": {+ "name": "organization_members_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "organizations": {+ "name": "organizations",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "name": {+ "name": "name",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "ownerId": {+ "name": "ownerId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "metadata": {+ "name": "metadata",+ "type": "json",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "allowedEmailDomain": {+ "name": "allowedEmailDomain",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "customDomain": {+ "name": "customDomain",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "domainVerified": {+ "name": "domainVerified",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "iconUrl": {+ "name": "iconUrl",+ "type": "varchar(1024)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "workosOrganizationId": {+ "name": "workosOrganizationId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "workosConnectionId": {+ "name": "workosConnectionId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ }+ },+ "indexes": {+ "owner_id_idx": {+ "name": "owner_id_idx",+ "columns": [+ "ownerId"+ ],+ "isUnique": false+ },+ "custom_domain_idx": {+ "name": "custom_domain_idx",+ "columns": [+ "customDomain"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "organizations_id": {+ "name": "organizations_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "organizations_id_unique": {+ "name": "organizations_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "s3_buckets": {+ "name": "s3_buckets",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "ownerId": {+ "name": "ownerId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "region": {+ "name": "region",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "endpoint": {+ "name": "endpoint",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "bucketName": {+ "name": "bucketName",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "accessKeyId": {+ "name": "accessKeyId",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "secretAccessKey": {+ "name": "secretAccessKey",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "provider": {+ "name": "provider",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "('aws')"+ }+ },+ "indexes": {},+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "s3_buckets_id": {+ "name": "s3_buckets_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "s3_buckets_id_unique": {+ "name": "s3_buckets_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "sessions": {+ "name": "sessions",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "sessionToken": {+ "name": "sessionToken",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "userId": {+ "name": "userId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "expires": {+ "name": "expires",+ "type": "datetime",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ }+ },+ "indexes": {+ "session_token_idx": {+ "name": "session_token_idx",+ "columns": [+ "sessionToken"+ ],+ "isUnique": true+ },+ "user_id_idx": {+ "name": "user_id_idx",+ "columns": [+ "userId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "sessions_id": {+ "name": "sessions_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "sessions_id_unique": {+ "name": "sessions_id_unique",+ "columns": [+ "id"+ ]+ },+ "sessions_sessionToken_unique": {+ "name": "sessions_sessionToken_unique",+ "columns": [+ "sessionToken"+ ]+ }+ },+ "checkConstraint": {}+ },+ "shared_videos": {+ "name": "shared_videos",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "videoId": {+ "name": "videoId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "organizationId": {+ "name": "organizationId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "sharedByUserId": {+ "name": "sharedByUserId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "sharedAt": {+ "name": "sharedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ }+ },+ "indexes": {+ "video_id_idx": {+ "name": "video_id_idx",+ "columns": [+ "videoId"+ ],+ "isUnique": false+ },+ "organization_id_idx": {+ "name": "organization_id_idx",+ "columns": [+ "organizationId"+ ],+ "isUnique": false+ },+ "shared_by_user_id_idx": {+ "name": "shared_by_user_id_idx",+ "columns": [+ "sharedByUserId"+ ],+ "isUnique": false+ },+ "video_id_organization_id_idx": {+ "name": "video_id_organization_id_idx",+ "columns": [+ "videoId",+ "organizationId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "shared_videos_id": {+ "name": "shared_videos_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "shared_videos_id_unique": {+ "name": "shared_videos_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "users": {+ "name": "users",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "name": {+ "name": "name",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "lastName": {+ "name": "lastName",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "email": {+ "name": "email",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "emailVerified": {+ "name": "emailVerified",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "image": {+ "name": "image",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "stripeCustomerId": {+ "name": "stripeCustomerId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "stripeSubscriptionId": {+ "name": "stripeSubscriptionId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "thirdPartyStripeSubscriptionId": {+ "name": "thirdPartyStripeSubscriptionId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "stripeSubscriptionStatus": {+ "name": "stripeSubscriptionStatus",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "stripeSubscriptionPriceId": {+ "name": "stripeSubscriptionPriceId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "activeOrganizationId": {+ "name": "activeOrganizationId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "onboarding_completed_at": {+ "name": "onboarding_completed_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "customBucket": {+ "name": "customBucket",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "inviteQuota": {+ "name": "inviteQuota",+ "type": "int",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": 1+ }+ },+ "indexes": {+ "email_idx": {+ "name": "email_idx",+ "columns": [+ "email"+ ],+ "isUnique": true+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "users_id": {+ "name": "users_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "users_id_unique": {+ "name": "users_id_unique",+ "columns": [+ "id"+ ]+ },+ "users_email_unique": {+ "name": "users_email_unique",+ "columns": [+ "email"+ ]+ }+ },+ "checkConstraint": {}+ },+ "verification_tokens": {+ "name": "verification_tokens",+ "columns": {+ "identifier": {+ "name": "identifier",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "token": {+ "name": "token",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "expires": {+ "name": "expires",+ "type": "datetime",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ }+ },+ "indexes": {},+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "verification_tokens_identifier": {+ "name": "verification_tokens_identifier",+ "columns": [+ "identifier"+ ]+ }+ },+ "uniqueConstraints": {+ "verification_tokens_token_unique": {+ "name": "verification_tokens_token_unique",+ "columns": [+ "token"+ ]+ }+ },+ "checkConstraint": {}+ },+ "videos": {+ "name": "videos",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "ownerId": {+ "name": "ownerId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "name": {+ "name": "name",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'My Video'"+ },+ "awsRegion": {+ "name": "awsRegion",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "awsBucket": {+ "name": "awsBucket",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "bucket": {+ "name": "bucket",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "metadata": {+ "name": "metadata",+ "type": "json",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "public": {+ "name": "public",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": true+ },+ "videoStartTime": {+ "name": "videoStartTime",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "audioStartTime": {+ "name": "audioStartTime",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "xStreamInfo": {+ "name": "xStreamInfo",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "jobId": {+ "name": "jobId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "jobStatus": {+ "name": "jobStatus",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "isScreenshot": {+ "name": "isScreenshot",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": false+ },+ "skipProcessing": {+ "name": "skipProcessing",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": false+ },+ "transcriptionStatus": {+ "name": "transcriptionStatus",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "source": {+ "name": "source",+ "type": "json",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "('{\"type\":\"MediaConvert\"}')"+ }+ },+ "indexes": {+ "id_idx": {+ "name": "id_idx",+ "columns": [+ "id"+ ],+ "isUnique": false+ },+ "owner_id_idx": {+ "name": "owner_id_idx",+ "columns": [+ "ownerId"+ ],+ "isUnique": false+ },+ "is_public_idx": {+ "name": "is_public_idx",+ "columns": [+ "public"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "videos_id": {+ "name": "videos_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "videos_id_unique": {+ "name": "videos_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ }+ },+ "views": {},+ "_meta": {+ "schemas": {},+ "tables": {},+ "columns": {}+ },+ "internal": {+ "tables": {},+ "indexes": {}+ }+}\ No newline at end of filediff --git a/packages/database/migrations/meta/0004_snapshot.json b/packages/database/migrations/meta/0004_snapshot.jsonnew file mode 100644index 000000000..b311e85ef--- /dev/null+++ b/packages/database/migrations/meta/0004_snapshot.json@@ -0,0 +1,1332 @@+{+ "version": "5",+ "dialect": "mysql",+ "id": "08624504-7fe8-4741-bac1-0c308816f3d5",+ "prevId": "31002a1a-0a15-428e-ab44-0be1c43a355d",+ "tables": {+ "accounts": {+ "name": "accounts",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "userId": {+ "name": "userId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "type": {+ "name": "type",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "provider": {+ "name": "provider",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "providerAccountId": {+ "name": "providerAccountId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "access_token": {+ "name": "access_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "expires_in": {+ "name": "expires_in",+ "type": "int",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "id_token": {+ "name": "id_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "refresh_token": {+ "name": "refresh_token",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "refresh_token_expires_in": {+ "name": "refresh_token_expires_in",+ "type": "int",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "scope": {+ "name": "scope",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "token_type": {+ "name": "token_type",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "tempColumn": {+ "name": "tempColumn",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ }+ },+ "indexes": {+ "user_id_idx": {+ "name": "user_id_idx",+ "columns": [+ "userId"+ ],+ "isUnique": false+ },+ "provider_account_id_idx": {+ "name": "provider_account_id_idx",+ "columns": [+ "providerAccountId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "accounts_id": {+ "name": "accounts_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "accounts_id_unique": {+ "name": "accounts_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "auth_api_keys": {+ "name": "auth_api_keys",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(36)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "userId": {+ "name": "userId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ }+ },+ "indexes": {},+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "auth_api_keys_id": {+ "name": "auth_api_keys_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "auth_api_keys_id_unique": {+ "name": "auth_api_keys_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "comments": {+ "name": "comments",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "type": {+ "name": "type",+ "type": "varchar(6)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "content": {+ "name": "content",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "timestamp": {+ "name": "timestamp",+ "type": "float",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "authorId": {+ "name": "authorId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "videoId": {+ "name": "videoId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "parentCommentId": {+ "name": "parentCommentId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ }+ },+ "indexes": {+ "video_id_idx": {+ "name": "video_id_idx",+ "columns": [+ "videoId"+ ],+ "isUnique": false+ },+ "author_id_idx": {+ "name": "author_id_idx",+ "columns": [+ "authorId"+ ],+ "isUnique": false+ },+ "parent_comment_id_idx": {+ "name": "parent_comment_id_idx",+ "columns": [+ "parentCommentId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "comments_id": {+ "name": "comments_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "comments_id_unique": {+ "name": "comments_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "organization_invites": {+ "name": "organization_invites",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "organizationId": {+ "name": "organizationId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "invitedEmail": {+ "name": "invitedEmail",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "invitedByUserId": {+ "name": "invitedByUserId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "role": {+ "name": "role",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "status": {+ "name": "status",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'pending'"+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "expiresAt": {+ "name": "expiresAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ }+ },+ "indexes": {+ "organization_id_idx": {+ "name": "organization_id_idx",+ "columns": [+ "organizationId"+ ],+ "isUnique": false+ },+ "invited_email_idx": {+ "name": "invited_email_idx",+ "columns": [+ "invitedEmail"+ ],+ "isUnique": false+ },+ "invited_by_user_id_idx": {+ "name": "invited_by_user_id_idx",+ "columns": [+ "invitedByUserId"+ ],+ "isUnique": false+ },+ "status_idx": {+ "name": "status_idx",+ "columns": [+ "status"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "organization_invites_id": {+ "name": "organization_invites_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "organization_invites_id_unique": {+ "name": "organization_invites_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "organization_members": {+ "name": "organization_members",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "userId": {+ "name": "userId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "organizationId": {+ "name": "organizationId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "role": {+ "name": "role",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ }+ },+ "indexes": {+ "user_id_idx": {+ "name": "user_id_idx",+ "columns": [+ "userId"+ ],+ "isUnique": false+ },+ "organization_id_idx": {+ "name": "organization_id_idx",+ "columns": [+ "organizationId"+ ],+ "isUnique": false+ },+ "user_id_organization_id_idx": {+ "name": "user_id_organization_id_idx",+ "columns": [+ "userId",+ "organizationId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "organization_members_id": {+ "name": "organization_members_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "organization_members_id_unique": {+ "name": "organization_members_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "organizations": {+ "name": "organizations",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "name": {+ "name": "name",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "ownerId": {+ "name": "ownerId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "metadata": {+ "name": "metadata",+ "type": "json",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "allowedEmailDomain": {+ "name": "allowedEmailDomain",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "customDomain": {+ "name": "customDomain",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "domainVerified": {+ "name": "domainVerified",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "iconUrl": {+ "name": "iconUrl",+ "type": "varchar(1024)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "workosOrganizationId": {+ "name": "workosOrganizationId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "workosConnectionId": {+ "name": "workosConnectionId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ }+ },+ "indexes": {+ "owner_id_idx": {+ "name": "owner_id_idx",+ "columns": [+ "ownerId"+ ],+ "isUnique": false+ },+ "custom_domain_idx": {+ "name": "custom_domain_idx",+ "columns": [+ "customDomain"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "organizations_id": {+ "name": "organizations_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "organizations_id_unique": {+ "name": "organizations_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "s3_buckets": {+ "name": "s3_buckets",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "ownerId": {+ "name": "ownerId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "region": {+ "name": "region",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "endpoint": {+ "name": "endpoint",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "bucketName": {+ "name": "bucketName",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "accessKeyId": {+ "name": "accessKeyId",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "secretAccessKey": {+ "name": "secretAccessKey",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "provider": {+ "name": "provider",+ "type": "text",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "('aws')"+ }+ },+ "indexes": {},+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "s3_buckets_id": {+ "name": "s3_buckets_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "s3_buckets_id_unique": {+ "name": "s3_buckets_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "sessions": {+ "name": "sessions",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "sessionToken": {+ "name": "sessionToken",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "userId": {+ "name": "userId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "expires": {+ "name": "expires",+ "type": "datetime",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ }+ },+ "indexes": {+ "session_token_idx": {+ "name": "session_token_idx",+ "columns": [+ "sessionToken"+ ],+ "isUnique": true+ },+ "user_id_idx": {+ "name": "user_id_idx",+ "columns": [+ "userId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "sessions_id": {+ "name": "sessions_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "sessions_id_unique": {+ "name": "sessions_id_unique",+ "columns": [+ "id"+ ]+ },+ "sessions_sessionToken_unique": {+ "name": "sessions_sessionToken_unique",+ "columns": [+ "sessionToken"+ ]+ }+ },+ "checkConstraint": {}+ },+ "shared_videos": {+ "name": "shared_videos",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "videoId": {+ "name": "videoId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "organizationId": {+ "name": "organizationId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "sharedByUserId": {+ "name": "sharedByUserId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "sharedAt": {+ "name": "sharedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ }+ },+ "indexes": {+ "video_id_idx": {+ "name": "video_id_idx",+ "columns": [+ "videoId"+ ],+ "isUnique": false+ },+ "organization_id_idx": {+ "name": "organization_id_idx",+ "columns": [+ "organizationId"+ ],+ "isUnique": false+ },+ "shared_by_user_id_idx": {+ "name": "shared_by_user_id_idx",+ "columns": [+ "sharedByUserId"+ ],+ "isUnique": false+ },+ "video_id_organization_id_idx": {+ "name": "video_id_organization_id_idx",+ "columns": [+ "videoId",+ "organizationId"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "shared_videos_id": {+ "name": "shared_videos_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "shared_videos_id_unique": {+ "name": "shared_videos_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ },+ "users": {+ "name": "users",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "name": {+ "name": "name",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "lastName": {+ "name": "lastName",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "email": {+ "name": "email",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "emailVerified": {+ "name": "emailVerified",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "image": {+ "name": "image",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "stripeCustomerId": {+ "name": "stripeCustomerId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "stripeSubscriptionId": {+ "name": "stripeSubscriptionId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "thirdPartyStripeSubscriptionId": {+ "name": "thirdPartyStripeSubscriptionId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "stripeSubscriptionStatus": {+ "name": "stripeSubscriptionStatus",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "stripeSubscriptionPriceId": {+ "name": "stripeSubscriptionPriceId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "activeOrganizationId": {+ "name": "activeOrganizationId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "onboarding_completed_at": {+ "name": "onboarding_completed_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "customBucket": {+ "name": "customBucket",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "inviteQuota": {+ "name": "inviteQuota",+ "type": "int",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": 1+ }+ },+ "indexes": {+ "email_idx": {+ "name": "email_idx",+ "columns": [+ "email"+ ],+ "isUnique": true+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "users_id": {+ "name": "users_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "users_id_unique": {+ "name": "users_id_unique",+ "columns": [+ "id"+ ]+ },+ "users_email_unique": {+ "name": "users_email_unique",+ "columns": [+ "email"+ ]+ }+ },+ "checkConstraint": {}+ },+ "verification_tokens": {+ "name": "verification_tokens",+ "columns": {+ "identifier": {+ "name": "identifier",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "token": {+ "name": "token",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "expires": {+ "name": "expires",+ "type": "datetime",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "created_at": {+ "name": "created_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updated_at": {+ "name": "updated_at",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ }+ },+ "indexes": {},+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "verification_tokens_identifier": {+ "name": "verification_tokens_identifier",+ "columns": [+ "identifier"+ ]+ }+ },+ "uniqueConstraints": {+ "verification_tokens_token_unique": {+ "name": "verification_tokens_token_unique",+ "columns": [+ "token"+ ]+ }+ },+ "checkConstraint": {}+ },+ "videos": {+ "name": "videos",+ "columns": {+ "id": {+ "name": "id",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "ownerId": {+ "name": "ownerId",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false+ },+ "name": {+ "name": "name",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "'My Video'"+ },+ "awsRegion": {+ "name": "awsRegion",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "awsBucket": {+ "name": "awsBucket",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "bucket": {+ "name": "bucket",+ "type": "varchar(15)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "metadata": {+ "name": "metadata",+ "type": "json",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "public": {+ "name": "public",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": true+ },+ "videoStartTime": {+ "name": "videoStartTime",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "audioStartTime": {+ "name": "audioStartTime",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "xStreamInfo": {+ "name": "xStreamInfo",+ "type": "text",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "jobId": {+ "name": "jobId",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "jobStatus": {+ "name": "jobStatus",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "isScreenshot": {+ "name": "isScreenshot",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": false+ },+ "skipProcessing": {+ "name": "skipProcessing",+ "type": "boolean",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": false+ },+ "transcriptionStatus": {+ "name": "transcriptionStatus",+ "type": "varchar(255)",+ "primaryKey": false,+ "notNull": false,+ "autoincrement": false+ },+ "createdAt": {+ "name": "createdAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "(now())"+ },+ "updatedAt": {+ "name": "updatedAt",+ "type": "timestamp",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "onUpdate": true,+ "default": "(now())"+ },+ "source": {+ "name": "source",+ "type": "json",+ "primaryKey": false,+ "notNull": true,+ "autoincrement": false,+ "default": "('{\"type\":\"MediaConvert\"}')"+ }+ },+ "indexes": {+ "id_idx": {+ "name": "id_idx",+ "columns": [+ "id"+ ],+ "isUnique": false+ },+ "owner_id_idx": {+ "name": "owner_id_idx",+ "columns": [+ "ownerId"+ ],+ "isUnique": false+ },+ "is_public_idx": {+ "name": "is_public_idx",+ "columns": [+ "public"+ ],+ "isUnique": false+ }+ },+ "foreignKeys": {},+ "compositePrimaryKeys": {+ "videos_id": {+ "name": "videos_id",+ "columns": [+ "id"+ ]+ }+ },+ "uniqueConstraints": {+ "videos_id_unique": {+ "name": "videos_id_unique",+ "columns": [+ "id"+ ]+ }+ },+ "checkConstraint": {}+ }+ },+ "views": {},+ "_meta": {+ "schemas": {},+ "tables": {},+ "columns": {}+ },+ "internal": {+ "tables": {},+ "indexes": {}+ }+}\ No newline at end of filediff --git a/packages/database/migrations/meta/_journal.json b/packages/database/migrations/meta/_journal.jsonindex ee81289c3..db0803078 100644--- a/packages/database/migrations/meta/_journal.json+++ b/packages/database/migrations/meta/_journal.json@@ -22,6 +22,20 @@"when": 1746691677509,"tag": "0002_powerful_scourge","breakpoints": true+ },+ {+ "idx": 3,+ "version": "5",+ "when": 1747912232644,+ "tag": "0003_small_chamber",+ "breakpoints": true+ },+ {+ "idx": 4,+ "version": "5",+ "when": 1747923172570,+ "tag": "0004_good_microbe",+ "breakpoints": true}]}\ No newline at end of filediff --git a/packages/database/schema.ts b/packages/database/schema.tsindex 7e3b9a773..3d1f26acf 100644--- a/packages/database/schema.ts+++ b/packages/database/schema.ts@@ -282,6 +282,12 @@ export const s3Buckets = mysqlTable("s3_buckets", {provider: text("provider").notNull().default("aws"),});+export const authApiKeys = mysqlTable("auth_api_keys", {+ id: varchar("id", { length: 36 }).notNull().primaryKey().unique(),+ userId: nanoId("userId").notNull(),+ createdAt: timestamp("createdAt").defaultNow().notNull(),+});+export const commentsRelations = relations(comments, ({ one }) => ({author: one(users, {fields: [comments.authorId],@@ -321,15 +327,18 @@ export const s3BucketsRelations = relations(s3Buckets, ({ one }) => ({}),}));-export const organizationsRelations = relations(organizations, ({ one, many }) => ({- owner: one(users, {- fields: [organizations.ownerId],- references: [users.id],- }),- organizationMembers: many(organizationMembers),- sharedVideos: many(sharedVideos),- organizationInvites: many(organizationInvites),-}));+export const organizationsRelations = relations(+ organizations,+ ({ one, many }) => ({+ owner: one(users, {+ fields: [organizations.ownerId],+ references: [users.id],+ }),+ organizationMembers: many(organizationMembers),+ sharedVideos: many(sharedVideos),+ organizationInvites: many(organizationInvites),+ })+);export const sessionsRelations = relations(sessions, ({ one }) => ({user: one(users, {@@ -345,16 +354,19 @@ export const verificationTokensRelations = relations(}));-export const organizationMembersRelations = relations(organizationMembers, ({ one }) => ({- user: one(users, {- fields: [organizationMembers.userId],- references: [users.id],- }),- organization: one(organizations, {- fields: [organizationMembers.organizationId],- references: [organizations.id],- }),-}));+export const organizationMembersRelations = relations(+ organizationMembers,+ ({ one }) => ({+ user: one(users, {+ fields: [organizationMembers.userId],+ references: [users.id],+ }),+ organization: one(organizations, {+ fields: [organizationMembers.organizationId],+ references: [organizations.id],+ }),+ })+);export const organizationInvitesRelations = relations(organizationInvites,@@ -362,12 +374,13 @@ export const organizationInvitesRelations = relations(organization: one(organizations, {fields: [organizationInvites.organizationId],references: [organizations.id],- }),- invitedByUser: one(users, {- fields: [organizationInvites.invitedByUserId],- references: [users.id],- }),-}));+ }),+ invitedByUser: one(users, {+ fields: [organizationInvites.invitedByUserId],+ references: [users.id],+ }),+ })+);export const videosRelations = relations(videos, ({ one, many }) => ({owner: one(users, {diff --git a/packages/env/server.ts b/packages/env/server.tsindex a0a42a0ea..b9c0c406c 100644--- a/packages/env/server.ts+++ b/packages/env/server.ts@@ -60,6 +60,5 @@ let _cached: ReturnType<typeof createServerEnv> | undefined;export const serverEnv = () => {if (_cached) return _cached;_cached = createServerEnv();- console.log({ S3_PATH_STYLE: _cached.S3_PATH_STYLE });return _cached;};diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex f693b71fd..e6c775b9f 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -120,8 +120,8 @@ importers:specifier: 2.2.0version: 2.2.0'@tauri-apps/plugin-http':- specifier: ^2.0.1- version: 2.4.3+ specifier: ^2.4.4+ version: 2.4.4'@tauri-apps/plugin-notification':specifier: 2.0.0version: 2.0.0@@ -191,6 +191,9 @@ importers:webcodecs:specifier: ^0.1.0version: 0.1.0+ zod:+ specifier: ^3.24.2+ version: 3.24.4devDependencies:'@fontsource/geist-sans':specifier: ^5.0.3@@ -795,7 +798,7 @@ importers:version: 18.3.21'@types/react-dom':specifier: latest- version: 19.1.3(@types/[email protected])+ version: 19.1.5(@types/[email protected])dotenv-cli:specifier: latestversion: 8.0.0@@ -848,25 +851,25 @@ importers:'@radix-ui/react-dialog':specifier: ^1.0.5- version: 1.1.13(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ version: 1.1.13(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-dropdown-menu':specifier: ^2.0.6- version: 2.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ version: 2.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-label':specifier: ^2.0.2- version: 2.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ version: 2.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-navigation-menu':specifier: ^1.1.4- version: 1.2.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ version: 1.2.12(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-popover':specifier: ^1.0.7- version: 1.1.13(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ version: 1.1.13(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-slot':specifier: ^1.0.2version: 1.2.2(@types/[email protected])([email protected])'@radix-ui/react-switch':specifier: ^1.1.0- version: 1.2.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ version: 1.2.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@tailwindcss/typography':specifier: ^0.5.9@@ -897,7 +900,7 @@ importers:version: 18.3.21'@types/react-dom':specifier: latest- version: 19.1.3(@types/[email protected])+ version: 19.1.5(@types/[email protected])'@vitejs/plugin-react':specifier: ^4.0.3version: 4.4.1([email protected](@types/[email protected])([email protected])([email protected])([email protected]))@@ -5014,10 +5017,10 @@ packages:react-dom:optional: true- '@storybook/[email protected]':- resolution: {integrity: sha512-z0VUmeKDPv5dhP2XUu6ruJMCZFF6YW4Vn2riIz7s462ezjMaMPrA+mNOfpgXIWQbj/WJrprR1TjlNXjS/4q6gA==}+ '@storybook/[email protected]':+ resolution: {integrity: sha512-MUNSYSc30qO2Ppdz454PCp8IJyV56h+1DR+BjAYzLmF1857jIND3rdjGDHi/6cTjN7owlpFytSMzlQFUDgEXJg==}peerDependencies:- storybook: ^9.0.0-rc.0+ storybook: ^9.0.0-rc.4vite: ^5.0.0 || ^6.0.0'@storybook/[email protected]':@@ -5033,10 +5036,10 @@ packages:peerDependencies:storybook: ^8.6.12- '@storybook/[email protected]':- resolution: {integrity: sha512-6bGUD69+qWjG4OFYh6+ibA+ehGBAo4fvNAyGjMiUZyiUIg1Fb2X34G/PKYFoYsBQay0MOpcjan9SwiZquYnO4A==}+ '@storybook/[email protected]':+ resolution: {integrity: sha512-ljiVNS+6Y7kYT0S5YmnLL20cVyPTwM4yUKGUbwH5xno6baS5MPAAIGrZD9zu0silC527NfEI1m3Yax8u9sSGKQ==}peerDependencies:- storybook: ^9.0.0-rc.0+ storybook: ^9.0.0-rc.4'@storybook/[email protected]':resolution: {integrity: sha512-bOmTNJE4FM6+3/1hPQVgha8cLxX2Nyi/4Z+tYq0pCDEyQqGRTD2KXre9XsSCnziRaGxiW80OrKkmqWY8Otuu4A==}@@ -5342,8 +5345,8 @@ packages:'@tauri-apps/[email protected]':resolution: {integrity: sha512-+08mApuONKI8/sCNEZ6AR8vf5vI9DXD4YfrQ9NQmhRxYKMLVhRW164vdW5BSLmMpuevftpQ2FVoL9EFkfG9Z+g==}- '@tauri-apps/[email protected]':- resolution: {integrity: sha512-Us8X+FikzpaZRNr4kH4HLwyXascHbM42p6LxAqRTQnHPrrqp1usaH4vxWAZalPvTbHJ3gBEMJPHusFJgtjGJjA==}+ '@tauri-apps/[email protected]':+ resolution: {integrity: sha512-IjlaaS4z8ybB10qnh6djZ2FIaHdWVs/U1D1C56udKcjX1f+jAmR8/s7qBV5cv/OmcGkOIzet3LWuH70LKf4J2A==}'@tauri-apps/[email protected]':resolution: {integrity: sha512-6qEDYJS7mgXZWLXA0EFL+DVCJh8sJlzSoyw6B50pxhLPVFjc5Vr5DVzl5W3mUHaYhod5wsC984eQnlCCGqxYDA==}@@ -5630,8 +5633,8 @@ packages:peerDependencies:'@types/react': ^18.0.0- '@types/[email protected]':- resolution: {integrity: sha512-rJXC08OG0h3W6wDMFxQrZF00Kq6qQvw0djHRdzl3U5DnIERz0MRce3WVc7IS6JYBwtaP/DwYtRRjVlvivNveKg==}+ '@types/[email protected]':+ resolution: {integrity: sha512-CMCjrWucUBZvohgZxkjd6S9h0nZxXjzus6yDfUb+xLxYM7VvjKNH1tQrE9GWLql1XoOP4/Ds3bwFqShHUYraGg==}peerDependencies:'@types/react': ^19.0.0@@ -12101,6 +12104,9 @@ packages:resolution: {integrity: sha512-0/FvIG4g3kNkYgbNwBBW5pZBkfpeYQnH+2AA3xmjkCAit/DSDPKmgwC3fKof4oYUq6gupClVOJlFl+939VRBMg==}+ resolution: {integrity: sha512-EGs8PguQqAAUIcQfK4E9xdXxB6s2GK4sJfT/vcc9V1ELIvC4LH/zXu2t/5fajtv6oiRCxdv7BgtVK3vWgROxag==}+resolution: {integrity: sha512-CLDfGgUp7XPswWnezWwsCRxNmgQjhYq3VXHM0/XIRxhVrKw0M1if9agzryh1QS3nxjCROvV+xWxoJO1YctzzWg==}engines: {node: ^18 || >=20}@@ -13100,6 +13106,9 @@ packages:resolution: {integrity: sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==}+ resolution: {integrity: sha512-z03fqpTMDF1G02VLKUMt6vyACE7rNWkh3gpXVHgPTw28NPtDFRGvcpTtPwn2kMKtQ0idtYJUTxchytmnqYswcw==}+resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}@@ -14084,10 +14093,10 @@ snapshots:gray-matter: 4.0.3imagescript: 1.3.0micromatch: 4.0.8- ts-pattern: 5.7.0+ ts-pattern: 5.7.1unified: 11.0.5yaml: 2.8.0- zod: 3.24.4+ zod: 3.25.20transitivePeerDependencies:- '@effect-ts/otel-node'- acorn@@ -16313,26 +16322,26 @@ snapshots:'@types/react': 18.3.21'@types/react-dom': 18.3.7(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-slot': 1.2.2(@types/[email protected])([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])'@radix-ui/[email protected]([email protected])':dependencies:@@ -16385,18 +16394,18 @@ snapshots:transitivePeerDependencies:- '@types/react'- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.2'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-dismissable-layer': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-dismissable-layer': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-focus-guards': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-focus-scope': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-focus-scope': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-portal': 1.1.8(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-presence': 1.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-portal': 1.1.8(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-presence': 1.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-slot': 1.2.2(@types/[email protected])([email protected])'@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])aria-hidden: 1.2.4@@ -16405,7 +16414,7 @@ snapshots:react-remove-scroll: 2.6.3(@types/[email protected])([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])dependencies:@@ -16437,33 +16446,33 @@ snapshots:'@types/react': 18.3.21'@types/react-dom': 18.3.7(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.2'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])'@radix-ui/react-use-escape-keydown': 1.1.1(@types/[email protected])([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.2'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-menu': 2.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-menu': 2.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])'@radix-ui/[email protected]([email protected])':dependencies:@@ -16485,16 +16494,16 @@ snapshots:react: 18.3.1react-dom: 18.3.1([email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])'@radix-ui/[email protected]([email protected])':dependencies:@@ -16509,31 +16518,31 @@ snapshots:optionalDependencies:'@types/react': 18.3.21- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.2- '@radix-ui/react-collection': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-collection': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-direction': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-dismissable-layer': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-dismissable-layer': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-focus-guards': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-focus-scope': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-focus-scope': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-popper': 1.2.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-portal': 1.1.8(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-presence': 1.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-roving-focus': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-popper': 1.2.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-portal': 1.1.8(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-presence': 1.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-roving-focus': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-slot': 1.2.2(@types/[email protected])([email protected])'@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])aria-hidden: 1.2.4@@ -16542,43 +16551,43 @@ snapshots:react-remove-scroll: 2.6.3(@types/[email protected])([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.2- '@radix-ui/react-collection': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-collection': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-direction': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-dismissable-layer': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-dismissable-layer': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-presence': 1.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-presence': 1.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])'@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])'@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])'@radix-ui/react-use-previous': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-visually-hidden': 1.2.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-visually-hidden': 1.2.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.2'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-dismissable-layer': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-dismissable-layer': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-focus-guards': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-focus-scope': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-focus-scope': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-popper': 1.2.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-portal': 1.1.8(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-presence': 1.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-popper': 1.2.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-portal': 1.1.8(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-presence': 1.1.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-slot': 1.2.2(@types/[email protected])([email protected])'@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])aria-hidden: 1.2.4@@ -16587,7 +16596,7 @@ snapshots:react-remove-scroll: 2.6.3(@types/[email protected])([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:@@ -16607,13 +16616,13 @@ snapshots:'@types/react': 18.3.21'@types/react-dom': 18.3.7(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:- '@radix-ui/react-arrow': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-arrow': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])'@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])'@radix-ui/react-use-rect': 1.1.1(@types/[email protected])([email protected])@@ -16623,7 +16632,7 @@ snapshots:react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])dependencies:@@ -16642,15 +16651,15 @@ snapshots:'@types/react': 18.3.21'@types/react-dom': 18.3.7(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])dependencies:@@ -16670,7 +16679,7 @@ snapshots:'@types/react': 18.3.21'@types/react-dom': 18.3.7(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])@@ -16678,7 +16687,7 @@ snapshots:react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])dependencies:@@ -16696,31 +16705,31 @@ snapshots:'@types/react': 18.3.21'@types/react-dom': 18.3.7(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/react-slot': 1.2.2(@types/[email protected])([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.2- '@radix-ui/react-collection': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-collection': 1.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-direction': 1.1.1(@types/[email protected])([email protected])'@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])'@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])'@radix-ui/[email protected]([email protected])':dependencies:@@ -16743,12 +16752,12 @@ snapshots:optionalDependencies:'@types/react': 18.3.21- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.2'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])'@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])'@radix-ui/react-use-previous': 1.1.1(@types/[email protected])([email protected])'@radix-ui/react-use-size': 1.1.1(@types/[email protected])([email protected])@@ -16756,7 +16765,7 @@ snapshots:react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:@@ -16863,14 +16872,14 @@ snapshots:'@types/react': 18.3.21'@types/react-dom': 18.3.7(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':+ '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:- '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])+ '@radix-ui/react-primitive': 2.1.2(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])react: 18.3.1react-dom: 18.3.1([email protected])optionalDependencies:'@types/react': 18.3.21- '@types/react-dom': 19.1.3(@types/[email protected])+ '@types/react-dom': 19.1.5(@types/[email protected])'@radix-ui/[email protected]': {}@@ -17812,9 +17821,9 @@ snapshots:react: 18.3.1react-dom: 18.3.1([email protected])- '@storybook/[email protected]([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected]))':+ '@storybook/[email protected]([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected]))':dependencies:- '@storybook/csf-plugin': 9.0.0-rc.0([email protected]([email protected]))+ '@storybook/csf-plugin': 9.0.0-rc.4([email protected]([email protected]))storybook: 8.6.12([email protected])ts-dedent: 2.2.0@@ -17845,7 +17854,7 @@ snapshots:storybook: 8.6.12([email protected])unplugin: 1.16.1dependencies:storybook: 8.6.12([email protected])unplugin: 1.16.1@@ -18158,7 +18167,7 @@ snapshots:dependencies:'@tauri-apps/api': 2.5.0- '@tauri-apps/[email protected]':+ '@tauri-apps/[email protected]':dependencies:'@tauri-apps/api': 2.5.0@@ -18494,7 +18503,7 @@ snapshots:dependencies:'@types/react': 18.3.21- '@types/[email protected](@types/[email protected])':+ '@types/[email protected](@types/[email protected])':dependencies:'@types/react': 18.3.21@@ -26222,7 +26231,7 @@ snapshots:[email protected](@storybook/[email protected]([email protected]([email protected])))([email protected])([email protected]([email protected]))([email protected](@testing-library/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])))([email protected](@types/[email protected])([email protected])([email protected])([email protected])):dependencies:- '@storybook/builder-vite': 9.0.0-rc.0([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected]))+ '@storybook/builder-vite': 9.0.0-rc.4([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected]))'@storybook/types': 9.0.0-alpha.1([email protected]([email protected]))magic-string: 0.30.17solid-js: 1.9.6@@ -26759,6 +26768,8 @@ snapshots:+ [email protected]: {}+optionalDependencies:typescript: 5.8.3@@ -27897,4 +27908,6 @@ snapshots:+ [email protected]: {}+