fixing await dynamic import
This commit is contained in:
parent
a4519724e8
commit
45003ebabd
5 changed files with 5 additions and 4 deletions
|
@ -17,6 +17,7 @@
|
|||
"@willsoto/node-konfig-file": "npm:@willsoto/node-konfig-file@3.0.0",
|
||||
"@willsoto/node-konfig-toml-parser": "npm:@willsoto/node-konfig-toml-parser@3.0.0",
|
||||
"youtubePlayerReq": "./src/lib/helpers/youtubePlayerReq.ts",
|
||||
"getFetchClient": "./src/lib/helpers/getFetchClient.ts",
|
||||
"googlevideo": "npm:googlevideo@2.0.0"
|
||||
},
|
||||
"unstable": ["cron", "kv", "http"]
|
||||
|
|
|
@ -2,7 +2,7 @@ import { ApiResponse, Innertube, YT } from "youtubei.js";
|
|||
import { generateRandomString } from "youtubei.js/Utils";
|
||||
import { compress, decompress } from "https://deno.land/x/brotli@0.1.7/mod.ts";
|
||||
const { youtubePlayerReq } = await import(
|
||||
Deno.env.get("YT_PLAYER_REQ_LOCATION") || "./youtubePlayerReq.ts"
|
||||
Deno.env.get("YT_PLAYER_REQ_LOCATION") || "youtubePlayerReq"
|
||||
);
|
||||
import { Store } from "@willsoto/node-konfig-core";
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import type { BgConfig } from "bgutils";
|
|||
import { JSDOM } from "jsdom";
|
||||
import { Innertube, UniversalCache } from "youtubei.js";
|
||||
import { Store } from "@willsoto/node-konfig-core";
|
||||
const { getFetchClient } = await import(Deno.env.get("GET_FETCH_CLIENT_LOCATION") || "../helpers/getFetchClient.ts");
|
||||
const { getFetchClient } = await import(Deno.env.get("GET_FETCH_CLIENT_LOCATION") || "getFetchClient");
|
||||
|
||||
// Adapted from https://github.com/LuanRT/BgUtils/blob/main/examples/node/index.ts
|
||||
export const poTokenGenerate = async (
|
||||
|
|
|
@ -3,7 +3,7 @@ import { routes } from "./routes/index.ts";
|
|||
import { Innertube, UniversalCache } from "youtubei.js";
|
||||
import { poTokenGenerate } from "./lib/jobs/potoken.ts";
|
||||
import { konfigLoader } from "./lib/helpers/konfigLoader.ts";
|
||||
const { getFetchClient } = await import(Deno.env.get("GET_FETCH_CLIENT_LOCATION") || "./lib/helpers/getFetchClient.ts");
|
||||
const { getFetchClient } = await import(Deno.env.get("GET_FETCH_CLIENT_LOCATION") || "getFetchClient");
|
||||
|
||||
const app = new Hono();
|
||||
const konfigStore = await konfigLoader();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Hono } from "hono";
|
||||
import { Store } from "@willsoto/node-konfig-core";
|
||||
const { getFetchClient } = await import(Deno.env.get("GET_FETCH_CLIENT_LOCATION") || "../lib/helpers/getFetchClient.ts");
|
||||
const { getFetchClient } = await import(Deno.env.get("GET_FETCH_CLIENT_LOCATION") || "getFetchClient");
|
||||
import { HTTPException } from "hono/http-exception";
|
||||
|
||||
const videoPlaybackProxy = new Hono();
|
||||
|
|
Loading…
Reference in a new issue