better replace for Deno.mainModule

This commit is contained in:
Emilien 2024-12-12 23:34:05 +01:00
parent f3fff5cc09
commit 100e2722a9
4 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ import { Store } from "@willsoto/node-konfig-core";
let youtubePlayerReqLocation = "youtubePlayerReq"; let youtubePlayerReqLocation = "youtubePlayerReq";
if (Deno.env.get("YT_PLAYER_REQ_LOCATION")) { if (Deno.env.get("YT_PLAYER_REQ_LOCATION")) {
if (Deno.env.has("DENO_COMPILED")) { if (Deno.env.has("DENO_COMPILED")) {
youtubePlayerReqLocation = Deno.mainModule.replace("main.ts", "") + youtubePlayerReqLocation = Deno.mainModule.replace("src/main.ts", "") +
Deno.env.get("YT_PLAYER_REQ_LOCATION"); Deno.env.get("YT_PLAYER_REQ_LOCATION");
} else { } else {
youtubePlayerReqLocation = Deno.env.get( youtubePlayerReqLocation = Deno.env.get(

View file

@ -6,7 +6,7 @@ import { Store } from "@willsoto/node-konfig-core";
let getFetchClientLocation = "getFetchClient"; let getFetchClientLocation = "getFetchClient";
if (Deno.env.get("GET_FETCH_CLIENT_LOCATION")) { if (Deno.env.get("GET_FETCH_CLIENT_LOCATION")) {
if (Deno.env.has("DENO_COMPILED")) { if (Deno.env.has("DENO_COMPILED")) {
getFetchClientLocation = Deno.mainModule.replace("main.ts", "") + getFetchClientLocation = Deno.mainModule.replace("src/main.ts", "") +
Deno.env.get("GET_FETCH_CLIENT_LOCATION"); Deno.env.get("GET_FETCH_CLIENT_LOCATION");
} else { } else {
getFetchClientLocation = Deno.env.get( getFetchClientLocation = Deno.env.get(

View file

@ -6,7 +6,7 @@ import { konfigLoader } from "./lib/helpers/konfigLoader.ts";
let getFetchClientLocation = "getFetchClient"; let getFetchClientLocation = "getFetchClient";
if (Deno.env.get("GET_FETCH_CLIENT_LOCATION")) { if (Deno.env.get("GET_FETCH_CLIENT_LOCATION")) {
if (Deno.env.has("DENO_COMPILED")) { if (Deno.env.has("DENO_COMPILED")) {
getFetchClientLocation = Deno.mainModule.replace("main.ts", "") + getFetchClientLocation = Deno.mainModule.replace("src/main.ts", "") +
Deno.env.get("GET_FETCH_CLIENT_LOCATION"); Deno.env.get("GET_FETCH_CLIENT_LOCATION");
} else { } else {
getFetchClientLocation = Deno.env.get( getFetchClientLocation = Deno.env.get(

View file

@ -4,7 +4,7 @@ import { HTTPException } from "hono/http-exception";
let getFetchClientLocation = "getFetchClient"; let getFetchClientLocation = "getFetchClient";
if (Deno.env.get("GET_FETCH_CLIENT_LOCATION")) { if (Deno.env.get("GET_FETCH_CLIENT_LOCATION")) {
if (Deno.env.has("DENO_COMPILED")) { if (Deno.env.has("DENO_COMPILED")) {
getFetchClientLocation = Deno.mainModule.replace("main.ts", "") + getFetchClientLocation = Deno.mainModule.replace("src/main.ts", "") +
Deno.env.get("GET_FETCH_CLIENT_LOCATION"); Deno.env.get("GET_FETCH_CLIENT_LOCATION");
} else { } else {
getFetchClientLocation = Deno.env.get( getFetchClientLocation = Deno.env.get(