viteVariables
Variable: INK_DEV_API_HASHTAG_COMMANDS
> const INK_DEV_API_HASHTAG_COMMANDS: "/__pixi-vn-ink/hashtag-commands" = "/__pixi-vn-ink/hashtag-commands"
Defined in: src/vite/costants.ts:21
Dev-server endpoint that exposes and accepts the list of registered HashtagCommands handlers as InkHashtagCommandInfo objects.
GET /__pixi-vn-ink/hashtag-commands– returns the storedInkHashtagCommandInfo[]as JSON.POST /__pixi-vn-ink/hashtag-commands– replaces the stored list with the JSON body (InkHashtagCommandInfo[]). Called automatically by setupInkHmrListener on startup and after each HMR update.InkHashtagCommandInfo.validationserializes the original validation rule:{ type: "regexp", source, flags }{ type: "zod", schema }(JSON Schema generated from Zod){ type: "literal", value }
Example
// VS Code extension reading the registered handlers
const res = await fetch("http://localhost:5173/__pixi-vn-ink/hashtag-commands");
const commands: InkHashtagCommandInfo[] = await res.json();