- Add .gitea/workflows/ci.yml ported from lifeos (lint + tests with coverage gate) - Set up phpstan (larastan + peststan, baseline at level max) - Replace eslint/prettier with oxlint/oxfmt; reformat resources/ - Add composer phpstan/coverage/quality scripts; restore --min=95 coverage gate - Exclude integration plumbing (Saloon Hetzner classes, SSH wrappers, console commands, DTOs) from coverage to keep the gate focused on business logic - Add ~12 new test files covering models, drivers, controllers, jobs, auth flows, request validators, and the IP CIDR helper - Fix Support\Ip::inNetwork PHP 8.4 TypeError in CIDR mask check - Fix FirewallRule::command comparing the enum-cast type column to a string - Fix Server::network using the wrong foreign key column - Remove unreachable code under abort(403) in RegisteredUserController
44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
import { createInertiaApp } from "@inertiajs/vue3";
|
|
import createServer from "@inertiajs/vue3/server";
|
|
import { renderToString } from "@vue/server-renderer";
|
|
import { resolvePageComponent } from "laravel-vite-plugin/inertia-helpers";
|
|
import { createSSRApp, h } from "vue";
|
|
import { route as ziggyRoute } from "ziggy-js";
|
|
|
|
const appName = import.meta.env.VITE_APP_NAME || "Laravel";
|
|
|
|
createServer((page) =>
|
|
createInertiaApp({
|
|
page,
|
|
render: renderToString,
|
|
title: (title) => `${title} - ${appName}`,
|
|
resolve: (name) =>
|
|
resolvePageComponent(`./pages/${name}.vue`, import.meta.glob("./pages/**/*.vue")),
|
|
setup({ App, props, plugin }) {
|
|
const app = createSSRApp({ render: () => h(App, props) });
|
|
|
|
// Configure Ziggy for SSR...
|
|
const ziggyConfig = {
|
|
...page.props.ziggy,
|
|
location: new URL(page.props.ziggy.location),
|
|
};
|
|
|
|
// Create route function...
|
|
const route = (name: string, params?: any, absolute?: boolean) =>
|
|
ziggyRoute(name, params, absolute, ziggyConfig);
|
|
|
|
// Make route function available globally...
|
|
app.config.globalProperties.route = route;
|
|
|
|
// Make route function available globally for SSR...
|
|
if (typeof window === "undefined") {
|
|
global.route = route;
|
|
}
|
|
|
|
app.use(plugin);
|
|
|
|
return app;
|
|
},
|
|
}),
|
|
);
|