Delete unused Fab component (superseded by QuickAddFab), unused server actions and queries (listDashboards, reorderDashboards, deleteCareLog, canAccessContainer, getOverduePlants, getCareDueSoon, addItemToDefaultList, reorderItems, getOrCreateDefaultList), unused helpers (getCurrentUser, BrandWordmark, TopbarSpacer, DEV_LOGIN_COOKIE, no-arg ensureDefault* wrappers, addListItem re-export), and drop export keyword from five internal-only functions. Verified with typecheck, eslint, and production build after each removal.
15 lines
436 B
TypeScript
15 lines
436 B
TypeScript
if (
|
|
process.env.NODE_ENV === "production" &&
|
|
process.env.ENABLE_DEV_LOGIN === "true" &&
|
|
process.env.NEXT_PHASE !== "phase-production-build"
|
|
) {
|
|
throw new Error(
|
|
"Refusing to start: ENABLE_DEV_LOGIN=true with NODE_ENV=production. " +
|
|
"Unset ENABLE_DEV_LOGIN in production env.",
|
|
);
|
|
}
|
|
|
|
export function isDevLoginEnabled() {
|
|
return process.env.NODE_ENV !== "production" && process.env.ENABLE_DEV_LOGIN === "true";
|
|
}
|