mirror of
https://github.com/LukeHagar/sveltekit-adapters.git
synced 2025-12-06 04:21:32 +00:00
- Removed package manager and engines from package.json. - Updated pnpm-lock.yaml to reflect new versions of dependencies. - Modified pnpm-workspace.yaml to include only built dependencies for Electron. - Adjusted electron-builder.yaml to exclude unnecessary files and added output directory. - Deleted obsolete electron.vite.config.ts file. - Updated main entry point in examples/electron/package.json to use CommonJS format. - Refactored scripts in examples/electron/package.json for better development experience. - Enhanced error handling and logging in game logic within examples/electron/src/routes/sverdle/+page.server.ts. - Updated adapter-electron to support new protocol handling and build processes.
21 lines
777 B
TypeScript
21 lines
777 B
TypeScript
import type { ProtocolRequest, GlobalRequest } from "electron";
|
|
import type { BrowserWindow, Session } from "electron/main";
|
|
import { IncomingMessage } from 'node:http';
|
|
|
|
/**
|
|
* Sets up the native Electron protocol handler for SvelteKit
|
|
*
|
|
* This function:
|
|
* 1. Initializes the SvelteKit server
|
|
* 2. Registers the 'app' protocol scheme as privileged
|
|
* 3. Handles all app:// requests for static assets, prerendered pages, and SSR
|
|
*
|
|
* @returns Promise that resolves when the protocol handler is set up
|
|
*/
|
|
export function setupHandler(mainWindow: BrowserWindow): Promise<() => void>;
|
|
|
|
export function registerAppScheme(): void;
|
|
|
|
export function getPreloadPath(): string;
|
|
|
|
export function createRequest(request: GlobalRequest, session: Session): Promise<IncomingMessage>; |