/** * SvelteKit projection for Manifest IR. * * Generates SvelteKit server routes (+server.ts) and load functions * (+page.server.ts) from IR commands and entity reads. Mirrors the * Next.js App Router projection but targets SvelteKit conventions: * * - +server.ts → API route (GET/POST) emitting `RequestHandler`s * - +page.server.ts → `PageServerLoad` for SSR data and form `actions` * - $lib/* aliases → `src/lib` imports * - type-safe `PageData` → via the generated `./$types` module * * Surfaces: * - sveltekit.server → +server.ts for an entity (GET list/detail, POST dispatch) * - sveltekit.load → +page.server.ts (`load` + `actions`) for an entity page * - sveltekit.command → +server.ts dedicated to a single command POST * - sveltekit.types → TypeScript types for entities, commands, results * - sveltekit.client → $lib client utilities (response helpers, fetch wrappers) * * Writes always flow through the Manifest runtime so guards, policies, * and constraints stay authoritative. Reads MAY bypass the runtime for * performance (Prisma-style direct queries) when a database client is * configured. * * Registers as the `sveltekit` projection in the canonical registry. */ import type { IR } from '../../ir'; import type { ProjectionTarget, ProjectionRequest, ProjectionResult } from '../interface'; /** * Default values for the SvelteKit projection. */ export declare const SVELTEKIT_DEFAULTS: { authProvider: "lucia"; authImportPath: string; runtimeImportPath: string; runtimeFactoryName: string; databaseImportPath: string; routesDir: string; includeTenantFilter: boolean; includeSoftDeleteFilter: boolean; tenantIdProperty: string; deletedAtProperty: string; strictMode: boolean; includeComments: boolean; unauthorizedStatus: number; emitFormActions: boolean; emitTypeImports: boolean; emitCompanions: boolean; }; /** * SvelteKit projection. * * Emits `+server.ts` API routes, `+page.server.ts` loaders with form * `actions`, and supporting type / client artifacts that integrate with * the Manifest runtime. Mirrors the Next.js App Router projection's * semantics while honouring SvelteKit-specific conventions. */ export declare class SvelteKitProjection implements ProjectionTarget { readonly name = "sveltekit"; readonly description = "SvelteKit +server.ts routes and +page.server.ts loaders with form actions, $lib imports, and type-safe PageData"; readonly surfaces: readonly ["sveltekit.server", "sveltekit.load", "sveltekit.command", "sveltekit.types", "sveltekit.client", "sveltekit.companions"]; readonly descriptorMeta: import("..").ProjectionDescriptorMeta; generate(ir: IR, request: ProjectionRequest): ProjectionResult; } export type { SvelteKitProjectionOptions } from './types'; //# sourceMappingURL=generator.d.ts.map