@query-key-gen/used-generator
Version:
Vite plugin that scans your project and tracks where `queryKey` values from `globalQueryKeys` are used — useful for dead query analysis, usage stats, or documentation.
25 lines (21 loc) • 810 B
text/typescript
import { Plugin } from 'vite';
import { z } from 'zod';
declare const configSchema: z.ZodObject<{
output: z.ZodCatch<z.ZodOptional<z.ZodString>>;
path: z.ZodCatch<z.ZodOptional<z.ZodString>>;
globalQueryKeyName: z.ZodCatch<z.ZodOptional<z.ZodString>>;
ignoreFiles: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
}, "strip", z.ZodTypeAny, {
output?: string | undefined;
path?: string | undefined;
globalQueryKeyName?: string | undefined;
ignoreFiles?: string[] | undefined;
}, {
output?: unknown;
path?: unknown;
globalQueryKeyName?: unknown;
ignoreFiles?: unknown;
}>;
type ConfigOptions = z.infer<typeof configSchema>;
declare function QueryKeyUsedPlugin(_config?: Omit<ConfigOptions, 'path'>): Plugin;
export { QueryKeyUsedPlugin as default };