import { defineEventHandler, getRequestURL } from 'h3' import { readModuleManifest } from '../../utils/foundry-module.js' // Foundry's manifest URL: the module.json plus the two absolute URLs it needs to install and to // check for updates later. Built from the request so every self-hosted Dragonroll serves its own. export default defineEventHandler((event) => { const origin = getRequestURL(event).origin return { ...readModuleManifest(), manifest: `${origin}/foundry/module.json`, download: `${origin}/foundry/dragonroll-foundry.zip`, } })