Skip to content

Commit

Permalink
Add warning when using SEAM_API_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Jan 11, 2024
1 parent 5af80f2 commit 050f663
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/seam/connect/parse-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ const getApiKeyFromEnv = (
}

const getEndpointFromEnv = (): string | null | undefined => {
if (globalThis.process?.env?.SEAM_API_URL != null) {
// eslint-disable-next-line no-console
console.warn(
`Using the SEAM_API_URL environment variable is deprecated. Support will be remove in a later major version. Use SEAM_ENDPOINT instead.`,
)
}

return (
globalThis.process?.env?.SEAM_ENDPOINT ??
globalThis.process?.env?.SEAM_API_URL
Expand Down

0 comments on commit 050f663

Please sign in to comment.