Skip to content

Commit 973e5f0

Browse files
committed
Add warning when using SEAM_API_URL
1 parent 5af80f2 commit 973e5f0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/lib/seam/connect/parse-options.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,23 @@ const getApiKeyFromEnv = (
9797
}
9898

9999
const getEndpointFromEnv = (): string | null | undefined => {
100+
if (globalThis.process?.env?.SEAM_API_URL != null) {
101+
// eslint-disable-next-line no-console
102+
console.warn(
103+
'Using the SEAM_API_URL environment variable is deprecated. Support will be remove in a later major version. Use SEAM_ENDPOINT instead.',
104+
)
105+
}
106+
107+
if (
108+
globalThis.process?.env?.SEAM_API_URL != null &&
109+
globalThis.process?.env?.SEAM_ENDPOINT != null
110+
) {
111+
// eslint-disable-next-line no-console
112+
console.warn(
113+
'Detected both the SEAM_API_URL and SEAM_ENDPOINT environment variables. Using SEAM_ENDPOINT.',
114+
)
115+
}
116+
100117
return (
101118
globalThis.process?.env?.SEAM_ENDPOINT ??
102119
globalThis.process?.env?.SEAM_API_URL

0 commit comments

Comments
 (0)