/*! * Copyright (C) Microsoft Corporation. All rights reserved. */ import type { ViteDevServer } from 'vite'; /** * Determine the local base URL of the Vite dev server. * Prefers resolvedUrls (Vite 6+), falls back to httpServer address (Vite 5). */ export declare function getLocalBaseUrl(server: ViteDevServer): string | null; /** * Power Apps config file structure from pac cli */ export interface PowerConfig { appId?: string; appDisplayName?: string; description?: string | null; environmentId: string; buildPath?: string; buildEntryPoint?: string; logoPath?: string; localAppUrl?: string; appSettings?: PowerConfigAppSettings; connectionReferences?: unknown; databaseReferences?: unknown; region?: string; } /** * Player/chrome settings authored under `appSettings` in power.config.json. Host-facing settings * that control the Power Apps player chrome (not the app's own logic). Mirrors `AppSettingsSchema` * in `@microsoft/power-apps-actions`; kept as an index signature so newer settings round-trip * through the plugin without a code change here. */ export interface PowerConfigAppSettings { /** Show or hide the default Power Apps header/navigation bar. Defaults to shown. */ showHeader?: boolean; [key: string]: unknown; } /** * CORS origin patterns for Power Apps domains */ export declare const powerAppsCorsOrigins: RegExp[]; /** * Path used to serve power.config.json content */ export declare const powerConfigPath = "__vite_powerapps_plugin__/power.config.json"; /** * Type guard to validate PowerConfig structure */ export declare function isPowerConfig(obj: unknown): obj is PowerConfig; /** * Check if an origin is allowed by the CORS patterns */ export declare function isOriginAllowed(origin: string): boolean; /** * Parse power.config.json content and validate it * @throws Error if the content is invalid */ export declare function parsePowerConfig(content: string): PowerConfig; /** * Map a Power Platform region code to the corresponding web player base URL. */ export declare function getWebPlayerBaseUrl(region: string): string; //# sourceMappingURL=utils.d.ts.map