Declare typed Convex env and route auth through @code/env/convex
- Register SITE_URL, NATIVE_APP_URL, CONVEX_SITE_URL, FLUE_DB_TOKEN in convex.config.ts so the generated server.js exposes a typed env object. - Rewrite auth.ts to consume @code/env/convex and tighten the getCurrentUser handler. - Refresh the backend README to describe the control-plane role and generated-file policy.
This commit is contained in:
14
packages/backend/convex/_generated/server.d.ts
vendored
14
packages/backend/convex/_generated/server.d.ts
vendored
@@ -21,6 +21,15 @@ import {
|
||||
} from "convex/server";
|
||||
import type { DataModel } from "./dataModel.js";
|
||||
|
||||
/**
|
||||
* Typesafe environment variables declared in `convex.config.ts`.
|
||||
*/
|
||||
type Env = {
|
||||
readonly FLUE_DB_TOKEN: string;
|
||||
readonly NATIVE_APP_URL: string | undefined;
|
||||
readonly SITE_URL: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Define a query in this Convex app's public API.
|
||||
*
|
||||
@@ -95,6 +104,11 @@ export declare const internalAction: ActionBuilder<DataModel, "internal">;
|
||||
*/
|
||||
export declare const httpAction: HttpActionBuilder;
|
||||
|
||||
/**
|
||||
* Typesafe environment variables declared in `convex.config.ts`.
|
||||
*/
|
||||
export declare const env: Env;
|
||||
|
||||
/**
|
||||
* A set of services for use within Convex query functions.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user