Don’t be so strict about the APP_ENV
This commit is contained in:
@@ -18,14 +18,7 @@ const EnvironmentSchema = z.object({
|
||||
REMIX_APP_PORT: z.string().optional(),
|
||||
LOGIN_ORIGIN: z.string().default("http://localhost:3030"),
|
||||
APP_ORIGIN: z.string().default("http://localhost:3030"),
|
||||
APP_ENV: z
|
||||
.union([
|
||||
z.literal("development"),
|
||||
z.literal("production"),
|
||||
z.literal("test"),
|
||||
z.literal("staging"),
|
||||
])
|
||||
.default(process.env.NODE_ENV),
|
||||
APP_ENV: z.string().default(process.env.NODE_ENV),
|
||||
SECRET_STORE: SecretStoreOptionsSchema.default("DATABASE"),
|
||||
POSTHOG_PROJECT_KEY: z.string().optional(),
|
||||
TELEMETRY_TRIGGER_API_KEY: z.string().optional(),
|
||||
|
||||
@@ -158,19 +158,10 @@ export const obfuscateApiKey = (apiKey: string) => {
|
||||
return `${prefix}_${slug}_${"*".repeat(secretPart.length)}`;
|
||||
};
|
||||
|
||||
export function appEnvTitleTag(appEnv?: "test" | "production" | "development" | "staging"): string {
|
||||
if (!appEnv) {
|
||||
export function appEnvTitleTag(appEnv?: string): string {
|
||||
if (!appEnv || appEnv === "production") {
|
||||
return "";
|
||||
}
|
||||
|
||||
switch (appEnv) {
|
||||
case "test":
|
||||
return " (test)";
|
||||
case "production":
|
||||
return "";
|
||||
case "development":
|
||||
return " (dev)";
|
||||
case "staging":
|
||||
return " (staging)";
|
||||
}
|
||||
return ` (${appEnv})`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user