@v-office/site-manifest
v0.3.0
Published
Derives a site's manifest at build time — the installed platform package versions and the platform surfaces the build reaches — and writes it to dist/site-manifest.json for the build worker to report. A Vite plugin for Vite sites (guest, owner) and an Ast
Readme
@v-office/site-manifest
Derives a site's manifest at build time and writes it to dist/site-manifest.json.
The build worker reports the file to the controller with the build's finalize
call; the fleet queries and package rollouts read from there
(docs/website-platform/process/05-site-manifest.md).
Nothing is declared, everything is derived:
- packages — the installed version of every
@v-office/*package the site declares, plus the frameworks (astro,vite,vue,react,tailwindcss) when installed. One list serves every kind of site. - components — per platform surface (
src/surfaces.ts):importedwhen the site imports the component from@v-office/website-components,customwhen it imports the surface's behavior without the component. Three signals are cross-checked per build (source scan, what the bundler reached, thedata-partmarkers in the output); a surface shipped without the platform's behavior fails the build. - backends — the PMS backends (
v9,v10) the build constructed@v-office/website-sdkwith, read from the recordcreateWebsiteSDKkeeps (website-sdk 2.24.0 and later), not from the site's configuration code.[]when the build constructed no website SDK. - websiteSdks — every distinct
configandoptionsthe build passed tocreateWebsiteSDK, only the top-level fields it reads, from the same SDK's record (website-sdk 2.27.0 and later).[]when the build loaded the SDK and constructed none; left out without the record, or when a construction was not JSON (a warning says so), since the rest would read as the whole answer. The config holds the site's public token, so the manifest is reported, not served.
Use
Vite sites (guest, owner — whatever the UI framework):
// vite.config.ts
import { siteManifest } from "@v-office/site-manifest";
export default defineConfig({ plugins: [vue(), siteManifest()] });Astro sites (public):
// astro.config.ts
import { siteManifest } from "@v-office/site-manifest/astro";
export default defineConfig({ integrations: [react(), siteManifest()] });Build-time Node code — import it in the build config and nowhere else. No
runtime dependencies; astro and vite are devDependencies for type checks only.
Development
pnpm install # at the repository root: this package is a workspace member
pnpm check # tsc, oxlint, oxfmt --check
pnpm test # vitest
pnpm build # tsdown → dist/ (index, astro; .mjs + .d.mts)Publishing: see docs/internal/releasing/overview.md. node
.github/release/cli.mts prepare site-manifest <bump> sets the version and
scaffolds the notes; the Release packages workflow publishes what is on main.
