Declare major and minor once at admission and preserve each session's numbers beside its signing key. Equal majors admit different minors; incompatible majors reject before consuming launch authority and identify the older side. App discovery, Native readiness and Web diagnostics keep that direction. Resolve build identity before compilation. Browser values and displayed version share the same build input; the Node SDK reads its actual WASM version. Remove the two private wire identifiers without aliases for obsolete internal builds. Basis: the accepted compatibility rule in Versioning and ADR-0017. Validated Core, Web/WASM, Windows reader and App discovery controls. Real packaged SDK 3.0 and 3.1 each completed signed conversation and private-room history against the other Linux Server minor. Browser/App mixed-artifact acceptance remains open.
57 lines
2.1 KiB
TypeScript
57 lines
2.1 KiB
TypeScript
import react from "@vitejs/plugin-react";
|
|
import { productVersionDefine } from "./scripts/release-version.mjs";
|
|
import { defineConfig } from "vite";
|
|
import { buildFilmControls } from "./scripts/build-film-controls.mjs";
|
|
|
|
// Keep the repository root available for the shared UI previews, website and film.
|
|
// The Rust domain owns signaling and health; Vite serves the frontend.
|
|
const server = `http://127.0.0.1:${process.env.PIIK_CHANNEL_PORT ?? 8791}`;
|
|
|
|
export default defineConfig({
|
|
define: productVersionDefine(process.env.PIIK_BUILD_VERSION),
|
|
plugins: [react(), {
|
|
name: "film-controls",
|
|
apply: "serve",
|
|
configureServer(vite) {
|
|
vite.middlewares.use((request, _response, next) => {
|
|
if (request.url?.startsWith("/site/films/external/") && /\.css(?:\?|$)/.test(request.url)) {
|
|
const url = new URL(request.url, "http://localhost");
|
|
if (url.pathname === "/site/films/external/engine/brand-mark.css") {
|
|
url.pathname = "/src/client/components/living/brand-mark.css";
|
|
}
|
|
// The film fetches stylesheet text for its shadow root.
|
|
url.searchParams.set("direct", "");
|
|
request.url = url.pathname + url.search;
|
|
}
|
|
next();
|
|
});
|
|
},
|
|
resolveId(source, importer) {
|
|
if (source === "./playback-controls.js" &&
|
|
importer?.replaceAll("\\", "/").endsWith("/site/films/external/engine/player.js")) {
|
|
return "\0piik-film-controls";
|
|
}
|
|
},
|
|
async load(id) {
|
|
if (id === "\0piik-film-controls") return (await buildFilmControls()).toString("utf8");
|
|
},
|
|
}],
|
|
// Local build output includes Browser profiles, not application entries.
|
|
optimizeDeps: { entries: ["index.html", "site/**/*.html"] },
|
|
build: {
|
|
outDir: "build/channel-web",
|
|
emptyOutDir: true,
|
|
},
|
|
server: {
|
|
// host: true keeps the documented LAN-phone workflow reachable.
|
|
host: true,
|
|
port: 8787,
|
|
strictPort: true,
|
|
watch: { ignored: ["**/build/**", "**/target/**"] },
|
|
proxy: {
|
|
"^/prototype/channel(?:/|$)": { target: server, ws: true },
|
|
"/healthz": { target: server },
|
|
},
|
|
},
|
|
});
|