@dataql/astro
Version:
DataQL Astro SDK with SSR/SSG support and multi-framework compatibility
31 lines (30 loc) • 1.35 kB
JavaScript
// Main client
export { DataQLAstroClient } from "./DataQLAstroClient";
// Astro specific components and utilities
export { AstroDataQLComponent } from "./components/AstroDataQLComponent";
export { createAstroIntegration } from "./utils/integration";
// Cache and sync managers
export { AstroCacheManager } from "./cache/AstroCacheManager";
export { AstroSyncManager } from "./sync/AstroSyncManager";
// Utilities
export { createAstroConfig, createStaticConfig, createIslandConfig, withDataQL, fetchStaticData, prefetchData, } from "./utils";
// Helper function for Astro configuration
export function createAstroDataQLConfig(workerUrl, databaseName = "dataql_astro", options) {
return {
databaseName,
database: options?.database,
syncConfig: {
serverUrl: workerUrl,
syncInterval: options?.syncInterval ?? 30000,
retryCount: options?.retryCount ?? 3,
batchSize: options?.batchSize ?? 50,
autoSync: options?.autoSync ?? true,
customConnection: options?.customConnection,
workerBinding: options?.workerBinding,
},
enablePersistence: options?.enablePersistence ?? true,
staticGeneration: options?.staticGeneration ?? true,
islandMode: options?.islandMode ?? true,
debug: options?.debug ?? false,
};
}