Merge branch 'dev' into 'main'

Moved to using variable instead of env

See merge request illegitimate/illegitimate-bot!358
This commit is contained in:
2025-08-11 11:05:12 +02:00
3 changed files with 9 additions and 4 deletions

View File

@@ -22,8 +22,8 @@ const files = [
].flat() ].flat()
const banner = [ const banner = [
"process.env.BUILD = 'true'", "const bun__build = true",
process.env.DOCKER === "1" ? "process.env.DOCKER = '1'" : null process.env.DOCKER === "1" ? "const bun__docker = true" : null
].filter(v => typeof v === "string").join("\n") ].filter(v => typeof v === "string").join("\n")
await Bun.build({ await Bun.build({

5
src/enviroment.d.ts vendored
View File

@@ -16,4 +16,9 @@ declare global {
} }
} }
declare global {
const bun__build: boolean | undefined
const bun__docker: boolean | undefined
}
export {} export {}

View File

@@ -7,8 +7,8 @@ import { log } from "./Logger"
const client = new Client() const client = new Client()
const redis = new RedisClient(env.prod.REDISURI) const redis = new RedisClient(env.prod.REDISURI)
const ft = process.env.BUILD !== "true" ? "ts" : "js" const ft = bun__build !== true ? "ts" : "js"
const dir = process.env.DOCKER !== "1" ? process.env.BUILD !== "true" ? "src" : "dist" : "" const dir = bun__docker !== true ? bun__build !== true ? "src" : "dist" : ""
class Illegitimate { class Illegitimate {
async start() { async start() {