UNPKG

@lynx-js/qrcode-rsbuild-plugin

Version:

A rsbuild plugin for printing QRCode in terminal

29 lines (28 loc) 994 B
import type { RsbuildPluginAPI } from '@rsbuild/core'; import type { CustomizedSchemaFn } from './index.js'; interface Options { api: RsbuildPluginAPI; entries: string[]; schema: CustomizedSchemaFn; port: number; /** * Whether to render the ASCII QR code in the terminal. * * When `false`, the plugin still prints the URL(s) and keeps the interactive * shortcuts working, but skips the QR code block. Useful for hosts that * always launch via a schema / deep link and don't need the scan flow, or * for terminals where the QR block is visually noisy. * * @defaultValue `true` */ showQRCode?: boolean | undefined; customShortcuts?: Record<string, { value: string; label: string; hint?: string; action?(): Promise<void>; }>; onPrint?: ((url: string) => Promise<void>) | undefined; } export declare function registerConsoleShortcuts(options: Options): Promise<() => void>; export {};