chore(debug): envs in api functions
This commit is contained in:
2
env/server.ts
vendored
2
env/server.ts
vendored
@@ -1,8 +1,6 @@
|
||||
import { createEnv } from "@t3-oss/env-nextjs"
|
||||
import { z } from "zod"
|
||||
|
||||
console.warn({ PROCESS_ENV: process.env })
|
||||
|
||||
export const env = createEnv({
|
||||
/**
|
||||
* Due to t3-env only checking typeof window === "undefined"
|
||||
|
||||
@@ -32,6 +32,13 @@ if (!NEXTAUTH_URL) {
|
||||
}
|
||||
|
||||
let contents = fs.readFileSync("./.env", { encoding: "utf-8" })
|
||||
console.log({ pre_contents: contents })
|
||||
console.log({
|
||||
SCANDIC_ENV_URL,
|
||||
NEXTAUTH_URL,
|
||||
DEPLOY_PRIME_URL,
|
||||
URL,
|
||||
})
|
||||
|
||||
contents = contents.replace(
|
||||
// 'URL="REPLACEME-ON-BUILD-ON-NETLIFY"',
|
||||
@@ -45,4 +52,6 @@ contents = contents.replace(
|
||||
`NEXTAUTH_URL="${NEXTAUTH_URL}"`
|
||||
)
|
||||
|
||||
console.log({ post_contents: contents })
|
||||
|
||||
fs.writeFileSync("./.env", contents, { encoding: "utf-8" })
|
||||
|
||||
Reference in New Issue
Block a user