diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c63ffd56..4eee59f9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,49 +1,59 @@ -name: ci +name: CI on: push: + branches: + - master paths: + - ".github/workflows/**" - "configs/**" - "packages/**" - "pnpm-lock.yaml" + pull_request: + branches: + - master + paths: + - ".github/workflows/**" + - "configs/**" + - "packages/**" + - "pnpm-lock.yaml" + workflow_dispatch: + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} jobs: - type-check: - name: Type Check + node: + name: Node.js runs-on: ubuntu-latest + timeout-minutes: 25 + steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "24.x" - - uses: pnpm/action-setup@v4 - - run: pnpm install --frozen-lockfile - - run: pnpm build --filter="./packages/*" - - run: pnpm type-check + - name: Set up pnpm + uses: pnpm/action-setup@v4 - test: - name: Test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: "24.x" - - uses: pnpm/action-setup@v4 - - run: pnpm install --frozen-lockfile - - run: pnpm build --filter="./packages/*" - - run: pnpm test - build: - name: Build - runs-on: ubuntu-latest - needs: [type-check, test] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "24.x" - - uses: pnpm/action-setup@v4 - - run: pnpm install --frozen-lockfile - - run: pnpm build --filter="./packages/*" + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build packages + run: pnpm build:prod + + - name: Run type checks + run: pnpm type-check + + - name: Run tests + run: pnpm test diff --git a/apps/astro/src/auth.ts b/apps/astro/src/auth.ts index 10954ba6..c11a2283 100644 --- a/apps/astro/src/auth.ts +++ b/apps/astro/src/auth.ts @@ -1,9 +1,9 @@ -import { createAuth } from "@aura-stack/auth" +import { createAuth, type AuthInstance } from "@aura-stack/auth" import { builtInOAuthProviders, type BuiltInOAuthProvider } from "@aura-stack/auth/oauth/index" export const oauth = Object.keys(builtInOAuthProviders) as BuiltInOAuthProvider[] -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth, basePath: "/api/auth", trustedOrigins: ["https://*.vercel.app"], diff --git a/apps/bun/src/auth.ts b/apps/bun/src/auth.ts index 9a9f3c00..3ff255e3 100644 --- a/apps/bun/src/auth.ts +++ b/apps/bun/src/auth.ts @@ -1,7 +1,7 @@ import { type AuthInstance, createAuth } from "@aura-stack/auth" -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth: ["github"], basePath: "/api/auth", trustedOrigins: ["http://localhost:3000", "https://*.vercel.app"], -}) as AuthInstance +}) diff --git a/apps/cloudflare/src/auth.ts b/apps/cloudflare/src/auth.ts index 07d71416..d3fb0fb2 100644 --- a/apps/cloudflare/src/auth.ts +++ b/apps/cloudflare/src/auth.ts @@ -1,7 +1,7 @@ import { type AuthInstance, createAuth } from "@aura-stack/auth" -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth: ["github"], basePath: "/api/auth", trustedOrigins: ["http://127.0.0.1:8787", "http://localhost:8787"], -}) as AuthInstance +}) diff --git a/apps/deno/src/auth.ts b/apps/deno/src/auth.ts index 9a9f3c00..6ef915df 100644 --- a/apps/deno/src/auth.ts +++ b/apps/deno/src/auth.ts @@ -1,7 +1,7 @@ import { type AuthInstance, createAuth } from "@aura-stack/auth" -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth: ["github"], basePath: "/api/auth", trustedOrigins: ["http://localhost:3000", "https://*.vercel.app"], -}) as AuthInstance +}) diff --git a/apps/elysia/src/auth.ts b/apps/elysia/src/auth.ts index 9a9f3c00..3ff255e3 100644 --- a/apps/elysia/src/auth.ts +++ b/apps/elysia/src/auth.ts @@ -1,7 +1,7 @@ import { type AuthInstance, createAuth } from "@aura-stack/auth" -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth: ["github"], basePath: "/api/auth", trustedOrigins: ["http://localhost:3000", "https://*.vercel.app"], -}) as AuthInstance +}) diff --git a/apps/express/src/auth.ts b/apps/express/src/auth.ts index d583988d..495266d5 100644 --- a/apps/express/src/auth.ts +++ b/apps/express/src/auth.ts @@ -3,8 +3,8 @@ import { builtInOAuthProviders, type BuiltInOAuthProvider } from "@aura-stack/au export const oauth = Object.keys(builtInOAuthProviders) as BuiltInOAuthProvider[] -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth: ["github"], basePath: "/api/auth", trustedOrigins: ["http://localhost:3000", "http://localhost:3001", "https://*.vercel.app"], -}) as AuthInstance +}) diff --git a/apps/hono/src/auth.ts b/apps/hono/src/auth.ts index 7e694d85..54b1b9fd 100644 --- a/apps/hono/src/auth.ts +++ b/apps/hono/src/auth.ts @@ -1,7 +1,7 @@ import { AuthInstance, createAuth } from "@aura-stack/auth" -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth: ["github"], basePath: "/api/auth", trustedOrigins: ["http://localhost:3000", "https://*.vercel.app"], -}) as AuthInstance +}) diff --git a/apps/nextjs/app-router/src/app/auth/[...aura]/route.ts b/apps/nextjs/app-router/src/app/auth/[...aura]/route.ts index 9728181e..98793511 100644 --- a/apps/nextjs/app-router/src/app/auth/[...aura]/route.ts +++ b/apps/nextjs/app-router/src/app/auth/[...aura]/route.ts @@ -1,5 +1,3 @@ -import { auth } from "@/auth" +import { handlers } from "@/auth" -export const { - handlers: { GET, POST }, -} = auth +export const { GET, POST } = handlers diff --git a/apps/nextjs/app-router/src/auth.ts b/apps/nextjs/app-router/src/auth.ts index e939b971..76de5d31 100644 --- a/apps/nextjs/app-router/src/auth.ts +++ b/apps/nextjs/app-router/src/auth.ts @@ -1,9 +1,9 @@ -import { createAuth } from "@aura-stack/auth" +import { type AuthInstance, createAuth } from "@aura-stack/auth" import { builtInOAuthProviders, type BuiltInOAuthProvider } from "@aura-stack/auth/oauth/index" export const oauth = Object.keys(builtInOAuthProviders) as BuiltInOAuthProvider[] -export const auth = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth, trustedOrigins: ["http://localhost:3000", "https://*.vercel.app"], }) diff --git a/apps/nextjs/app-router/src/lib/server.ts b/apps/nextjs/app-router/src/lib/server.ts index 31c7bf1d..26408766 100644 --- a/apps/nextjs/app-router/src/lib/server.ts +++ b/apps/nextjs/app-router/src/lib/server.ts @@ -1,23 +1,29 @@ "use server" + import { redirect } from "next/navigation" import { cookies, headers } from "next/headers" import { createClient, type Session, type LiteralUnion, type BuiltInOAuthProvider } from "@aura-stack/auth" +const toHeaders = (incoming: Awaited>) => { + return Object.fromEntries(incoming.entries()) +} + +/** + * @todo: fix bug related to rendered statically + * @see https://nextjs.org/docs/messages/dynamic-server-error + */ const client = createClient({ baseURL: typeof window !== "undefined" ? window.location.origin : (process.env.AUTH_URL ?? "http://localhost:3000"), basePath: "/auth", cache: "no-store", credentials: "include", - headers: async () => { - "use server" - const headersStore = await headers() - return Object.fromEntries(headersStore.entries()) - }, }) export const getCSRFToken = async (): Promise => { try { - const response = await client.get("/csrfToken") + const response = await client.get("/csrfToken", { + headers: toHeaders(await headers()), + }) if (!response.ok) return null const json = await response.json() return json && json?.csrfToken ? json.csrfToken : null @@ -28,8 +34,11 @@ export const getCSRFToken = async (): Promise => { } export const getSession = async (): Promise => { + "use server" try { - const response = await client.get("/session") + const response = await client.get("/session", { + headers: toHeaders(await headers()), + }) if (!response.ok) return null const session = await response.json() return session && session?.user ? session : null @@ -58,6 +67,7 @@ export const signOut = async (redirectTo: string = "/") => { token_type_hint: "session_token", }, headers: { + ...toHeaders(await headers()), "X-CSRF-Token": csrfToken, }, }) diff --git a/apps/nextjs/pages-router/src/auth.ts b/apps/nextjs/pages-router/src/auth.ts index a6713420..4099e22b 100644 --- a/apps/nextjs/pages-router/src/auth.ts +++ b/apps/nextjs/pages-router/src/auth.ts @@ -1,10 +1,9 @@ -import { createAuth } from "@aura-stack/auth" +import { type AuthInstance, createAuth } from "@aura-stack/auth" import { builtInOAuthProviders, type BuiltInOAuthProvider } from "@aura-stack/auth/oauth/index" export const oauth = Object.keys(builtInOAuthProviders) as BuiltInOAuthProvider[] -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth, basePath: "/api/auth", - trustedProxyHeaders: true, }) diff --git a/apps/nuxt/nuxt.config.ts b/apps/nuxt/nuxt.config.ts index fb5713f0..a24473d7 100644 --- a/apps/nuxt/nuxt.config.ts +++ b/apps/nuxt/nuxt.config.ts @@ -6,6 +6,23 @@ export default defineNuxtConfig({ devtools: { enabled: true }, css: ["~/assets/css/tailwind.css"], vite: { + // @ts-expect-error - Nuxt/Vite plugin typing mismatch for `@tailwindcss/vite` plugins: [tailwindcss()], + build: { + target: "es2022", + sourcemap: false, + }, + optimizeDeps: { + esbuildOptions: { + target: "es2022", + }, + }, + }, + nitro: { + esbuild: { + options: { + target: "es2022", + }, + }, }, }) diff --git a/apps/nuxt/shared/auth.ts b/apps/nuxt/shared/auth.ts index a6713420..3e3d0ebb 100644 --- a/apps/nuxt/shared/auth.ts +++ b/apps/nuxt/shared/auth.ts @@ -1,9 +1,9 @@ -import { createAuth } from "@aura-stack/auth" +import { type AuthInstance, createAuth } from "@aura-stack/auth" import { builtInOAuthProviders, type BuiltInOAuthProvider } from "@aura-stack/auth/oauth/index" export const oauth = Object.keys(builtInOAuthProviders) as BuiltInOAuthProvider[] -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth, basePath: "/api/auth", trustedProxyHeaders: true, diff --git a/apps/oak/src/auth.ts b/apps/oak/src/auth.ts index 9a9f3c00..6ef915df 100644 --- a/apps/oak/src/auth.ts +++ b/apps/oak/src/auth.ts @@ -1,7 +1,7 @@ import { type AuthInstance, createAuth } from "@aura-stack/auth" -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth: ["github"], basePath: "/api/auth", trustedOrigins: ["http://localhost:3000", "https://*.vercel.app"], -}) as AuthInstance +}) diff --git a/apps/react-router/app/auth.ts b/apps/react-router/app/auth.ts index 7836a96a..1d424707 100644 --- a/apps/react-router/app/auth.ts +++ b/apps/react-router/app/auth.ts @@ -1,4 +1,4 @@ -import { createAuth } from "@aura-stack/auth" +import { type AuthInstance, createAuth } from "@aura-stack/auth" import { builtInOAuthProviders, type BuiltInOAuthProvider } from "@aura-stack/auth/oauth/index" export const oauth = Object.keys(builtInOAuthProviders) as BuiltInOAuthProvider[] diff --git a/apps/supabase/functions/_shared/auth.ts b/apps/supabase/functions/_shared/auth.ts index 3151f607..d4b67ed4 100644 --- a/apps/supabase/functions/_shared/auth.ts +++ b/apps/supabase/functions/_shared/auth.ts @@ -1,7 +1,7 @@ import { type AuthInstance, createAuth } from "@aura-stack/auth" -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth: ["github"], basePath: "/api/auth", trustedOrigins: ["http://localhost:3000", "http://127.0.0.1:3000"], -}) as AuthInstance +}) diff --git a/apps/tanstack-start/package.json b/apps/tanstack-start/package.json index 076a0a8b..5199d258 100644 --- a/apps/tanstack-start/package.json +++ b/apps/tanstack-start/package.json @@ -7,8 +7,8 @@ "build": "vite build", "preview": "vite preview", "type-check": "tsc --noEmit", - "format": "prettier --write .", - "format:check": "prettier --check ." + "format": "prettier --write . --cache --cache-location .cache/.prettiercache", + "format:check": "prettier --check . --cache --cache-location .cache/.prettiercache" }, "dependencies": { "@hookform/resolvers": "^5.2.2", diff --git a/apps/tanstack-start/src/auth.ts b/apps/tanstack-start/src/auth.ts index bb109f54..0a256a82 100644 --- a/apps/tanstack-start/src/auth.ts +++ b/apps/tanstack-start/src/auth.ts @@ -1,9 +1,9 @@ -import { createAuth } from "@aura-stack/auth" +import { type AuthInstance, createAuth } from "@aura-stack/auth" import { builtInOAuthProviders, type BuiltInOAuthProvider } from "@aura-stack/auth/oauth/index" export const oauth = Object.keys(builtInOAuthProviders) as BuiltInOAuthProvider[] -export const { handlers, jose } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth, trustedProxyHeaders: true, }) diff --git a/apps/tanstack-start/src/components/header.tsx b/apps/tanstack-start/src/components/header.tsx index 98235a8c..226b8769 100644 --- a/apps/tanstack-start/src/components/header.tsx +++ b/apps/tanstack-start/src/components/header.tsx @@ -2,7 +2,7 @@ import { useState } from "react" import { Link, useRouter } from "@tanstack/react-router" import { Button } from "./ui/button" import { Menu, X } from "lucide-react" -import { signOut } from "@/lib/auth.client" +import { signOut } from "@/lib/auth-client" import { useSession } from "@/contexts/auth" export const Header = () => { diff --git a/apps/tanstack-start/src/contexts/auth.tsx b/apps/tanstack-start/src/contexts/auth.tsx index a651dde7..c073047e 100644 --- a/apps/tanstack-start/src/contexts/auth.tsx +++ b/apps/tanstack-start/src/contexts/auth.tsx @@ -1,5 +1,5 @@ import { createContext, use, useEffect, useState } from "react" -import { getSession } from "@/lib/auth.client" +import { getSession } from "@/lib/auth-client" import type { Session } from "@aura-stack/auth" import type { AuthContextValue } from "@/@types/types" import type { AuthProviderProps } from "@/@types/props" diff --git a/apps/tanstack-start/src/lib/auth.client.ts b/apps/tanstack-start/src/lib/auth-client.ts similarity index 100% rename from apps/tanstack-start/src/lib/auth.client.ts rename to apps/tanstack-start/src/lib/auth-client.ts diff --git a/apps/tanstack-start/src/lib/auth.server.ts b/apps/tanstack-start/src/lib/auth-server.ts similarity index 100% rename from apps/tanstack-start/src/lib/auth.server.ts rename to apps/tanstack-start/src/lib/auth-server.ts diff --git a/apps/tanstack-start/src/routeTree.gen.ts b/apps/tanstack-start/src/routeTree.gen.ts index 2a0373c4..ef2b3c5d 100644 --- a/apps/tanstack-start/src/routeTree.gen.ts +++ b/apps/tanstack-start/src/routeTree.gen.ts @@ -8,115 +8,113 @@ // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. -import { Route as rootRouteImport } from './routes/__root' -import { Route as SignInRouteImport } from './routes/signIn' -import { Route as IndexRouteImport } from './routes/index' -import { Route as UsersProfileRouteImport } from './routes/users/profile' -import { Route as AuthSplatRouteImport } from './routes/auth/$' +import { Route as rootRouteImport } from "./routes/__root" +import { Route as SignInRouteImport } from "./routes/signIn" +import { Route as IndexRouteImport } from "./routes/index" +import { Route as UsersProfileRouteImport } from "./routes/users/profile" +import { Route as AuthSplatRouteImport } from "./routes/auth/$" const SignInRoute = SignInRouteImport.update({ - id: '/signIn', - path: '/signIn', - getParentRoute: () => rootRouteImport, + id: "/signIn", + path: "/signIn", + getParentRoute: () => rootRouteImport, } as any) const IndexRoute = IndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => rootRouteImport, + id: "/", + path: "/", + getParentRoute: () => rootRouteImport, } as any) const UsersProfileRoute = UsersProfileRouteImport.update({ - id: '/users/profile', - path: '/users/profile', - getParentRoute: () => rootRouteImport, + id: "/users/profile", + path: "/users/profile", + getParentRoute: () => rootRouteImport, } as any) const AuthSplatRoute = AuthSplatRouteImport.update({ - id: '/auth/$', - path: '/auth/$', - getParentRoute: () => rootRouteImport, + id: "/auth/$", + path: "/auth/$", + getParentRoute: () => rootRouteImport, } as any) export interface FileRoutesByFullPath { - '/': typeof IndexRoute - '/signIn': typeof SignInRoute - '/auth/$': typeof AuthSplatRoute - '/users/profile': typeof UsersProfileRoute + "/": typeof IndexRoute + "/signIn": typeof SignInRoute + "/auth/$": typeof AuthSplatRoute + "/users/profile": typeof UsersProfileRoute } export interface FileRoutesByTo { - '/': typeof IndexRoute - '/signIn': typeof SignInRoute - '/auth/$': typeof AuthSplatRoute - '/users/profile': typeof UsersProfileRoute + "/": typeof IndexRoute + "/signIn": typeof SignInRoute + "/auth/$": typeof AuthSplatRoute + "/users/profile": typeof UsersProfileRoute } export interface FileRoutesById { - __root__: typeof rootRouteImport - '/': typeof IndexRoute - '/signIn': typeof SignInRoute - '/auth/$': typeof AuthSplatRoute - '/users/profile': typeof UsersProfileRoute + __root__: typeof rootRouteImport + "/": typeof IndexRoute + "/signIn": typeof SignInRoute + "/auth/$": typeof AuthSplatRoute + "/users/profile": typeof UsersProfileRoute } export interface FileRouteTypes { - fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' | '/signIn' | '/auth/$' | '/users/profile' - fileRoutesByTo: FileRoutesByTo - to: '/' | '/signIn' | '/auth/$' | '/users/profile' - id: '__root__' | '/' | '/signIn' | '/auth/$' | '/users/profile' - fileRoutesById: FileRoutesById + fileRoutesByFullPath: FileRoutesByFullPath + fullPaths: "/" | "/signIn" | "/auth/$" | "/users/profile" + fileRoutesByTo: FileRoutesByTo + to: "/" | "/signIn" | "/auth/$" | "/users/profile" + id: "__root__" | "/" | "/signIn" | "/auth/$" | "/users/profile" + fileRoutesById: FileRoutesById } export interface RootRouteChildren { - IndexRoute: typeof IndexRoute - SignInRoute: typeof SignInRoute - AuthSplatRoute: typeof AuthSplatRoute - UsersProfileRoute: typeof UsersProfileRoute + IndexRoute: typeof IndexRoute + SignInRoute: typeof SignInRoute + AuthSplatRoute: typeof AuthSplatRoute + UsersProfileRoute: typeof UsersProfileRoute } -declare module '@tanstack/react-router' { - interface FileRoutesByPath { - '/signIn': { - id: '/signIn' - path: '/signIn' - fullPath: '/signIn' - preLoaderRoute: typeof SignInRouteImport - parentRoute: typeof rootRouteImport +declare module "@tanstack/react-router" { + interface FileRoutesByPath { + "/signIn": { + id: "/signIn" + path: "/signIn" + fullPath: "/signIn" + preLoaderRoute: typeof SignInRouteImport + parentRoute: typeof rootRouteImport + } + "/": { + id: "/" + path: "/" + fullPath: "/" + preLoaderRoute: typeof IndexRouteImport + parentRoute: typeof rootRouteImport + } + "/users/profile": { + id: "/users/profile" + path: "/users/profile" + fullPath: "/users/profile" + preLoaderRoute: typeof UsersProfileRouteImport + parentRoute: typeof rootRouteImport + } + "/auth/$": { + id: "/auth/$" + path: "/auth/$" + fullPath: "/auth/$" + preLoaderRoute: typeof AuthSplatRouteImport + parentRoute: typeof rootRouteImport + } } - '/': { - id: '/' - path: '/' - fullPath: '/' - preLoaderRoute: typeof IndexRouteImport - parentRoute: typeof rootRouteImport - } - '/users/profile': { - id: '/users/profile' - path: '/users/profile' - fullPath: '/users/profile' - preLoaderRoute: typeof UsersProfileRouteImport - parentRoute: typeof rootRouteImport - } - '/auth/$': { - id: '/auth/$' - path: '/auth/$' - fullPath: '/auth/$' - preLoaderRoute: typeof AuthSplatRouteImport - parentRoute: typeof rootRouteImport - } - } } const rootRouteChildren: RootRouteChildren = { - IndexRoute: IndexRoute, - SignInRoute: SignInRoute, - AuthSplatRoute: AuthSplatRoute, - UsersProfileRoute: UsersProfileRoute, + IndexRoute: IndexRoute, + SignInRoute: SignInRoute, + AuthSplatRoute: AuthSplatRoute, + UsersProfileRoute: UsersProfileRoute, } -export const routeTree = rootRouteImport - ._addFileChildren(rootRouteChildren) - ._addFileTypes() +export const routeTree = rootRouteImport._addFileChildren(rootRouteChildren)._addFileTypes() -import type { getRouter } from './router.tsx' -import type { createStart } from '@tanstack/react-start' -declare module '@tanstack/react-start' { - interface Register { - ssr: true - router: Awaited> - } +import type { getRouter } from "./router.tsx" +import type { createStart } from "@tanstack/react-start" +declare module "@tanstack/react-start" { + interface Register { + ssr: true + router: Awaited> + } } diff --git a/apps/tanstack-start/src/routes/users/profile.tsx b/apps/tanstack-start/src/routes/users/profile.tsx index 65c5b222..d133cfe5 100644 --- a/apps/tanstack-start/src/routes/users/profile.tsx +++ b/apps/tanstack-start/src/routes/users/profile.tsx @@ -1,5 +1,5 @@ import { createFileRoute, redirect } from "@tanstack/react-router" -import { getSession } from "@/lib/auth.server" +import { getSession } from "@/lib/auth-server" import { Server, Smartphone } from "lucide-react" import { GetSessionClient } from "@/components/get-session-client" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" diff --git a/apps/tanstack-start/vite.config.ts b/apps/tanstack-start/vite.config.ts index a9a39045..a2bb58c2 100644 --- a/apps/tanstack-start/vite.config.ts +++ b/apps/tanstack-start/vite.config.ts @@ -6,7 +6,7 @@ import viteTsConfigPaths from "vite-tsconfig-paths" import { fileURLToPath, URL } from "url" import tailwindcss from "@tailwindcss/vite" -import { nitro } from "nitro/vite" +//import { nitro } from "nitro/vite" const config = defineConfig({ resolve: { @@ -16,7 +16,7 @@ const config = defineConfig({ }, plugins: [ devtools(), - nitro(), + //nitro(), viteTsConfigPaths({ projects: ["./tsconfig.json"], }), diff --git a/apps/vercel/api/_auth.ts b/apps/vercel/api/_auth.ts index 57363a83..d4d7082c 100644 --- a/apps/vercel/api/_auth.ts +++ b/apps/vercel/api/_auth.ts @@ -4,8 +4,8 @@ */ import { type AuthInstance, createAuth } from "@aura-stack/auth" -export const { handlers } = createAuth({ +export const { handlers, jose }: AuthInstance = createAuth({ oauth: ["github"], basePath: "/api/auth", trustedOrigins: ["http://localhost:3000", "https://*.vercel.app"], -}) as AuthInstance \ No newline at end of file +}) \ No newline at end of file diff --git a/apps/vercel/package.json b/apps/vercel/package.json index 5636bfb9..a9a421d4 100644 --- a/apps/vercel/package.json +++ b/apps/vercel/package.json @@ -5,7 +5,8 @@ "type": "module", "scripts": { "dev": "echo 'Welcome to Aura Auth Vercel Functions App!'", - "build": "tsc" + "build": "tsc", + "type-check": "tsc --noEmit" }, "keywords": [], "author": "Aura Stack Team", diff --git a/package.json b/package.json index 46352b14..e7f9b4cd 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dev": "turbo run dev", "dev:core": "turbo run @aura-stack/auth#dev", "dev:docs": "turbo run docs#dev", - "build": "turbo run build", + "build": "turbo run build --filter=./packages/*", "build:prod": "turbo run build --filter=./packages/*", "test": "turbo run test --parallel", "format": "turbo run format format:root --parallel", @@ -90,9 +90,6 @@ "lodash-es": "^4.17.23", "tar": ">=7.5.7", "zod": "4.3.5" - }, - "onlyBuiltDependencies": [ - "supabase" - ] + } } } diff --git a/packages/core/src/oauth/index.ts b/packages/core/src/oauth/index.ts index f56c80dd..0a77d06e 100644 --- a/packages/core/src/oauth/index.ts +++ b/packages/core/src/oauth/index.ts @@ -52,7 +52,7 @@ export const builtInOAuthProviders = { twitch, notion, dropbox, - atlassian + atlassian, } as const /** diff --git a/turbo.json b/turbo.json index bb26c2f8..0884a528 100644 --- a/turbo.json +++ b/turbo.json @@ -9,7 +9,19 @@ "dependsOn": ["^build"], "inputs": [".env"], "env": ["AURA_AUTH_*"], - "outputs": ["dist/**", "!.turbo/**", ".next/**", ".tanstack/**", ".output/**", ".react-router/**"] + "outputs": [ + "dist/**", + "!.turbo/**", + ".next/**", + "!.next/cache/**", + ".tanstack/**", + ".output/**", + ".react-router/**", + ".nuxt/**", + ".astro/**", + ".wrangler/**", + ".vercel/output/**" + ] }, "test": { "dependsOn": ["^test"], @@ -33,5 +45,9 @@ "ui": "stream", "cacheDir": ".turbo/cache", "globalDependencies": [".env", "tsconfig.json"], - "globalEnv": [".env"] + "globalEnv": [".env"], + "remoteCache": { + "enabled": true, + "signature": false + } }