import type { Plugin } from '@poveste/shared'; /** * Quasar builds its Vite config asynchronously and hands it over through one * entrypoint, whose own header says it is "used exclusively by @quasar/testing * AEs". That is the same footing as Tailwind's `__unstable__loadDesignSystem`: * usable, and not something to ask every user to import from their own config. */ export declare const QUASAR_PROJECT_REQUIRED: string; export declare const QUASAR_EXITED: string; export declare const QUASAR_APP_VITE_REQUIRED: string; /** What `getTestingConfig` hands back — a Vite config, loosely typed at this boundary. */ export interface QuasarViteConfig { define?: Record; resolve?: { alias?: unknown; extensions?: unknown; dedupe?: unknown; }; plugins?: unknown[]; } export interface HstQuasarOptions { /** * Passed through to `getTestingConfig`. It resolves the SPA config whatever is * asked of it today, so this exists for when that stops being true. */ ctx?: Record; } type GetTestingConfig = (ctx?: Record) => Promise; export declare function isPackageAbsent(error: unknown): boolean; export declare function resolveTestingConfig(importTesting?: () => Promise): Promise; /** The directory holding the nearest quasar.config, searching upwards from `from`. */ export declare function findQuasarProject(from: string, exists?: (path: string) => boolean): string | undefined; /** * Quasar validates the project while building its config, and reports a failure by * calling its own `fatal()` — which ends in `process.exit(1)`. From inside a plugin * hook that takes the whole CLI down with it: no poveste error, no plugin named, * and `poveste dev` gone with it. * * Nothing here can stop a dependency exiting, so the exit is turned into a throw for * as long as the call lasts. The real `process.exit` goes back either way. */ export declare function withoutProcessExit(fn: () => Promise): Promise; /** * Quasar's plugins are passed through whole. Nothing needs removing — unusually, * since the Nuxt plugin drops six — and removing its Vue plugin in particular * fails config resolution, because @quasar/vite-plugin asserts one precedes it. * * `ssr.noExternal` is the part users should not have to know: Quasar's plugin * writes `__QUASAR_VERSION__` while transforming its own source, so that source * has to be transformed rather than externalised during story collection. * * `optimizeDeps.include` names Quasar because Vite's scan cannot find it: a * `` becomes an import of `quasar` only when Quasar's plugin transforms * the template. Left to be discovered, it is bundled in a second pass once the * first story loads, and the page is reloaded under the reader while it runs. */ export declare function quasarViteConfig(viteConfig: QuasarViteConfig): { ssr: { noExternal: RegExp[]; }; optimizeDeps: { include: string[]; }; define: { [x: string]: unknown; }; resolve: { alias: unknown; extensions: unknown; dedupe: unknown; }; plugins: unknown[] | undefined; }; export declare function HstQuasar(options?: HstQuasarOptions): Plugin; export {};