viteVariables
Variable: INK_DEV_API_INFO
> const INK_DEV_API_INFO: "/__pixi-vn-ink/info" = "/__pixi-vn-ink/info"
Defined in: src/vite/costants.ts:64
Dev-server endpoint that exposes static information about this library instance, as an InkLibraryInfo object.
GET /__pixi-vn-ink/info– returns{ version, schemaUrl }, whereversionis this@drincs/pixi-vn-inkpackage's own version andschemaUrlis thePIXIVNJSON_SCHEMA_URL(from@drincs/pixi-vn-json/constants) embedded as$schemain every exportedPixiVNJsondocument.- Read-only: unlike INK_DEV_API_HASHTAG_COMMANDS / INK_DEV_API_TEXT_REPLACES,
there is no
POST— both values are static per plugin instance and don't depend on SSR-loading the user's content, so there's nothing for setupInkHmrListener to push.
Example
// VS Code extension reading the library version / schema URL
const res = await fetch("http://localhost:5173/__pixi-vn-ink/info");
const { version, schemaUrl }: InkLibraryInfo = await res.json();