mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-15 08:12:52 -06:00
Prettier reformat
This commit is contained in:
6
src/env/client.mjs
vendored
6
src/env/client.mjs
vendored
@@ -5,7 +5,7 @@ const _clientEnv = clientSchema.safeParse(clientEnv);
|
||||
|
||||
export const formatErrors = (
|
||||
/** @type {import('zod').ZodFormattedError<Map<string,string>,string>} */
|
||||
errors,
|
||||
errors
|
||||
) =>
|
||||
Object.entries(errors)
|
||||
.map(([name, value]) => {
|
||||
@@ -17,7 +17,7 @@ export const formatErrors = (
|
||||
if (!_clientEnv.success) {
|
||||
console.error(
|
||||
"❌ Invalid environment variables:\n",
|
||||
...formatErrors(_clientEnv.error.format()),
|
||||
...formatErrors(_clientEnv.error.format())
|
||||
);
|
||||
throw new Error("Invalid environment variables");
|
||||
}
|
||||
@@ -25,7 +25,7 @@ if (!_clientEnv.success) {
|
||||
for (let key of Object.keys(_clientEnv.data)) {
|
||||
if (!key.startsWith("NEXT_PUBLIC_")) {
|
||||
console.warn(
|
||||
`❌ Invalid public environment variable name: ${key}. It must begin with 'NEXT_PUBLIC_'`,
|
||||
`❌ Invalid public environment variable name: ${key}. It must begin with 'NEXT_PUBLIC_'`
|
||||
);
|
||||
|
||||
throw new Error("Invalid public environment variable name");
|
||||
|
||||
2
src/env/server.mjs
vendored
2
src/env/server.mjs
vendored
@@ -11,7 +11,7 @@ const _serverEnv = serverSchema.safeParse(serverEnv);
|
||||
if (!_serverEnv.success) {
|
||||
console.error(
|
||||
"❌ Invalid environment variables:\n",
|
||||
...formatErrors(_serverEnv.error.format()),
|
||||
...formatErrors(_serverEnv.error.format())
|
||||
);
|
||||
throw new Error("Invalid environment variables");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user