mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
refactor: 🔥 Remove plugin functionality, move OpenID plugin to core
This commit is contained in:
parent
278bf960cb
commit
b5e9e35427
45 changed files with 1502 additions and 2304 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { readdir } from "node:fs/promises";
|
||||
import { $, build } from "bun";
|
||||
import manifest from "./package.json" with { type: "json" };
|
||||
import { routes } from "./routes.ts";
|
||||
|
|
@ -7,18 +6,11 @@ console.log("Building...");
|
|||
|
||||
await $`rm -rf dist && mkdir dist`;
|
||||
|
||||
// Get all directories under the plugins/ directory
|
||||
const pluginDirs = await readdir("plugins", { withFileTypes: true });
|
||||
|
||||
await build({
|
||||
entrypoints: [
|
||||
...Object.values(manifest.exports).map((entry) => entry.import),
|
||||
// Force Bun to include endpoints
|
||||
...Object.values(routes),
|
||||
// Include all plugins
|
||||
...pluginDirs
|
||||
.filter((dir) => dir.isDirectory())
|
||||
.map((dir) => `plugins/${dir.name}/index.ts`),
|
||||
],
|
||||
outdir: "dist",
|
||||
target: "bun",
|
||||
|
|
@ -37,9 +29,6 @@ await build({
|
|||
|
||||
console.log("Copying files...");
|
||||
|
||||
// Copy plugin manifests
|
||||
await $`cp plugins/openid/manifest.json dist/plugins/openid/manifest.json`;
|
||||
|
||||
await $`mkdir -p dist/node_modules`;
|
||||
|
||||
// Copy bull-board to dist
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue