mirror of
https://github.com/LukeHagar/sveltekit-adapters.git
synced 2025-12-06 12:47:48 +00:00
chore: Update package dependencies and configuration for Electron adapter
- 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.
This commit is contained in:
21
packages/adapter-electron/functions/setupHandler.d.ts
vendored
Normal file
21
packages/adapter-electron/functions/setupHandler.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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>;
|
||||
Reference in New Issue
Block a user