mirror of
https://github.com/stack-auth/stack.git
synced 2026-07-20 21:29:36 +08:00
Refactor environment variable usage in hexclave.ts
- Updated the hexclave.ts file to directly use environment variables instead of the publicEnv function for project ID, publishable client key, and API URL. - This change simplifies the configuration process for the internal tool by removing unnecessary function calls.
This commit is contained in:
parent
35e49fcfa4
commit
57e95d3293
@ -1,20 +1,20 @@
|
||||
import { HexclaveClientApp } from "@hexclave/next";
|
||||
import { envOrDevDefault, publicEnv } from "./lib/env";
|
||||
import { envOrDevDefault } from "./lib/env";
|
||||
|
||||
const portPrefix = process.env.NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX ?? "81";
|
||||
|
||||
const projectId = envOrDevDefault(
|
||||
publicEnv("NEXT_PUBLIC_HEXCLAVE_PROJECT_ID", "NEXT_PUBLIC_STACK_PROJECT_ID"),
|
||||
process.env.NEXT_PUBLIC_HEXCLAVE_PROJECT_ID,
|
||||
"internal",
|
||||
"NEXT_PUBLIC_HEXCLAVE_PROJECT_ID",
|
||||
);
|
||||
const publishableClientKey = envOrDevDefault(
|
||||
publicEnv("NEXT_PUBLIC_HEXCLAVE_PUBLISHABLE_CLIENT_KEY", "NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY"),
|
||||
process.env.NEXT_PUBLIC_HEXCLAVE_PUBLISHABLE_CLIENT_KEY,
|
||||
"this-publishable-client-key-is-for-local-development-only",
|
||||
"NEXT_PUBLIC_HEXCLAVE_PUBLISHABLE_CLIENT_KEY",
|
||||
);
|
||||
const apiUrl = envOrDevDefault(
|
||||
publicEnv("NEXT_PUBLIC_HEXCLAVE_API_URL", "NEXT_PUBLIC_STACK_API_URL"),
|
||||
process.env.NEXT_PUBLIC_HEXCLAVE_API_URL,
|
||||
`http://localhost:${portPrefix}02`,
|
||||
"NEXT_PUBLIC_HEXCLAVE_API_URL",
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user