Files
jp 0917366cdf Separate JSON API backend (vm_api.py) + React+TanStack frontend scaffold
- vm_api.py: pure FastAPI JSON API on :8098 with CORS
- vm-api.service: systemd unit for API (replaces inline HTML vm_web.py for frontend)
- vm_web.py: kept intact as fallback; Apache now proxies /api/ -> :8098
- frontend/: Vite + React + TanStack Query scaffold
- Apache vhost updated: DocumentRoot -> frontend/dist, /api/ proxy, SPA fallback
- All original HTML pages still functional via :8099 during transition
2026-08-13 17:42:33 +01:00

72 lines
2.7 KiB
TypeScript

declare function getPattern(): RegExp;
/**
* A list of bot identifiers to be used in a regular expression against user agent strings.
*/
declare const list: string[];
/**
* Check if the given user agent includes a bot pattern.
*/
declare function isBot(userAgent?: string | null): boolean;
/**
* Check if the given user agent includes a bot pattern. Naive implementation (less accurate).
*/
declare const isBotNaive: typeof isBot;
/**
* Create a custom isBot function with a custom pattern.
*/
declare const createIsBot: (customPattern: RegExp) => typeof isBot;
/**
* Create a custom isBot function with a custom pattern.
*/
declare const createIsBotFromList: (list: string[]) => typeof isBot;
/**
* Find the first part of the user agent that matches a bot pattern.
*/
declare const findBotMatch: (userAgent: Parameters<typeof isBot>[0]) => string | null;
/**
* Find all parts of the user agent that match a bot pattern.
*/
declare const findBotMatches: (userAgent: Parameters<typeof isBot>[0]) => string[];
/**
* Find the first bot pattern that match the given user agent.
*/
declare const findBotPattern: (userAgent: Parameters<typeof isBot>[0]) => string | null;
/**
* Find all bot patterns that match the given user agent.
*/
declare const findBotPatterns: (userAgent: Parameters<typeof isBot>[0]) => string[];
/**
* Check if the given user agent includes a bot pattern.
*/
declare const isbot: typeof isBot;
/**
* Check if the given user agent includes a bot pattern. Naive implementation (less accurate).
*/
declare const isbotNaive: typeof isBot;
/**
* Create a custom isBot function with a custom pattern.
*/
declare const createIsbot: (customPattern: RegExp) => typeof isBot;
/**
* Create a custom isBot function with a custom pattern.
*/
declare const createIsbotFromList: (list: string[]) => typeof isBot;
/**
* Find the first part of the user agent that matches a bot pattern.
*/
declare const isbotMatch: (userAgent: Parameters<typeof isBot>[0]) => string | null;
/**
* Find all parts of the user agent that match a bot pattern.
*/
declare const isbotMatches: (userAgent: Parameters<typeof isBot>[0]) => string[];
/**
* Find the first bot pattern that match the given user agent.
*/
declare const isbotPattern: (userAgent: Parameters<typeof isBot>[0]) => string | null;
/**
* Find all bot patterns that match the given user agent.
*/
declare const isbotPatterns: (userAgent: Parameters<typeof isBot>[0]) => string[];
export { createIsBot, createIsBotFromList, createIsbot, createIsbotFromList, findBotMatch, findBotMatches, findBotPattern, findBotPatterns, getPattern, isBot, isBotNaive, isbot, isbotMatch, isbotMatches, isbotNaive, isbotPattern, isbotPatterns, list };