mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-10-28 15:51:23 +00:00
- api-client: getResponseBody returns Blob for non-JSON (fixes storage preview/download TypeError); postgen.mjs reapplies the patch on regen - Modal: error prop renders inside the dialog so request failures are visible instead of hidden behind the overlay (6 pages wired) - lib/api: extract server-provided error message from error.body - Modal: unique id per instance (duplicate modal-title broke aria-label) - nginx: index.html no-cache + immutable /assets (stale shell pointed at deleted hashed assets after redeploy → white screen) - vite: drop dead Google Fonts runtime caching (fonts are vendored) - functions: audit function.created/updated/deleted/invoked - AuditPage: expand action filter to all recorded actions - MCP: whoami uses /context for API keys; projectId/orgId resolve via /context with auth-aware precedence (stale `primora use` selection can never authorize a differently-scoped key) Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
57 lines
1.5 KiB
TypeScript
57 lines
1.5 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import solidPlugin from "vite-plugin-solid";
|
|
import { VitePWA } from "vite-plugin-pwa";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
solidPlugin(),
|
|
VitePWA({
|
|
registerType: "autoUpdate",
|
|
injectRegister: "auto",
|
|
manifest: {
|
|
name: "Primora",
|
|
short_name: "Primora",
|
|
description:
|
|
"Self-hosted backend console: storage, collections, API keys, audit logs.",
|
|
theme_color: "#0b0d11",
|
|
background_color: "#0b0d11",
|
|
display: "standalone",
|
|
start_url: "/",
|
|
icons: [
|
|
{ src: "pwa-192x192.png", sizes: "192x192", type: "image/png" },
|
|
{ src: "pwa-512x512.png", sizes: "512x512", type: "image/png" },
|
|
{
|
|
src: "maskable-512x512.png",
|
|
sizes: "512x512",
|
|
type: "image/png",
|
|
purpose: "maskable",
|
|
},
|
|
],
|
|
},
|
|
workbox: {
|
|
// Cache the app shell only. /api, /auth and /mailpit are live backends —
|
|
// never let a service worker answer for them.
|
|
navigateFallback: "/index.html",
|
|
navigateFallbackDenylist: [/^\/(api|auth|mailpit)(\/|$)/],
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /\/(api|auth|mailpit)(\/|$)/,
|
|
handler: "NetworkOnly",
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: Number(process.env.FRONTEND_PORT ?? 3000),
|
|
},
|
|
preview: {
|
|
host: "0.0.0.0",
|
|
port: Number(process.env.FRONTEND_PORT ?? 3000),
|
|
},
|
|
build: {
|
|
target: "esnext",
|
|
},
|
|
});
|