mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
fix(config): 🐛 Fix bundling errors related to config
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 52s
Build Docker Images / check (push) Failing after 5m20s
Build Docker Images / tests (push) Failing after 6s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / build (push) Failing after 13s
Mirror to Codeberg / Mirror (push) Failing after 0s
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Build Docker Images / lint (push) Successful in 26s
Nix Build / check (push) Failing after 32m35s
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 52s
Build Docker Images / check (push) Failing after 5m20s
Build Docker Images / tests (push) Failing after 6s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / build (push) Failing after 13s
Mirror to Codeberg / Mirror (push) Failing after 0s
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Build Docker Images / lint (push) Successful in 26s
Nix Build / check (push) Failing after 32m35s
This commit is contained in:
parent
12740a2d06
commit
512e0295a2
|
|
@ -7,7 +7,11 @@ const buildSpinner = ora("Building").start();
|
|||
await $`rm -rf dist && mkdir dist`;
|
||||
|
||||
await build({
|
||||
entrypoints: ["entrypoints/worker/index.ts"],
|
||||
entrypoints: [
|
||||
"entrypoints/worker/index.ts",
|
||||
// HACK: Include to avoid cyclical import errors
|
||||
"config.ts",
|
||||
],
|
||||
outdir: "dist",
|
||||
target: "bun",
|
||||
splitting: true,
|
||||
|
|
|
|||
2
build.ts
2
build.ts
|
|
@ -14,6 +14,8 @@ const pluginDirs = await readdir("plugins", { withFileTypes: true });
|
|||
await build({
|
||||
entrypoints: [
|
||||
"index.ts",
|
||||
// HACK: Include to avoid cyclical import errors
|
||||
"config.ts",
|
||||
"cli/index.ts",
|
||||
// Force Bun to include endpoints
|
||||
...Object.values(routes),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
// HACK: Import like this to avoid circular dependency
|
||||
// since ProxiableUrl is used in config.ts
|
||||
const { config } = await import("~/config.ts");
|
||||
import { config } from "~/config.ts";
|
||||
|
||||
export class ProxiableUrl extends URL {
|
||||
private isAllowedOrigin(): boolean {
|
||||
|
|
|
|||
Loading…
Reference in a new issue