File size: 477 Bytes
a038238 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | export function env(key: string): string | undefined {
const v = process.env[key]?.trim();
return v || undefined;
}
/**
* Workspace preview vs deployed app. The deployer writes GROK_PROJECT_ID on
* every publish; the sandbox preview never has it. Single source of truth for
* the split — gate audience, gate endpoints and connector-token semantics all
* key off this predicate.
*/
export function isWorkspacePreview(): boolean {
return !env("GROK_PROJECT_ID");
}
|