HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/oura.mlazu.com/node_modules/vite/dist/node/moduleRunnerTransport.d-DJ_mE5sf.d.ts
import { HotPayload } from '../../types/hmrPayload.js';

interface FetchFunctionOptions {
    cached?: boolean;
    startOffset?: number;
}
type FetchResult = CachedFetchResult | ExternalFetchResult | ViteFetchResult;
interface CachedFetchResult {
    /**
     * If module cached in the runner, we can just confirm
     * it wasn't invalidated on the server side.
     */
    cache: true;
}
interface ExternalFetchResult {
    /**
     * The path to the externalized module starting with file://,
     * by default this will be imported via a dynamic "import"
     * instead of being transformed by vite and loaded with vite runner
     */
    externalize: string;
    /**
     * Type of the module. Will be used to determine if import statement is correct.
     * For example, if Vite needs to throw an error if variable is not actually exported
     */
    type: 'module' | 'commonjs' | 'builtin' | 'network';
}
interface ViteFetchResult {
    /**
     * Code that will be evaluated by vite runner
     * by default this will be wrapped in an async function
     */
    code: string;
    /**
     * File path of the module on disk.
     * This will be resolved as import.meta.url/filename
     * Will be equal to `null` for virtual modules
     */
    file: string | null;
    /**
     * Module ID in the server module graph.
     */
    id: string;
    /**
     * Module URL used in the import.
     */
    url: string;
    /**
     * Invalidate module on the client side.
     */
    invalidate: boolean;
}
type InvokeMethods = {
    fetchModule: (id: string, importer?: string, options?: FetchFunctionOptions) => Promise<FetchResult>;
};

type ModuleRunnerTransportHandlers = {
    onMessage: (data: HotPayload) => void;
    onDisconnection: () => void;
};
/**
 * "send and connect" or "invoke" must be implemented
 */
interface ModuleRunnerTransport {
    connect?(handlers: ModuleRunnerTransportHandlers): Promise<void> | void;
    disconnect?(): Promise<void> | void;
    send?(data: HotPayload): Promise<void> | void;
    invoke?(data: HotPayload): Promise<{
        result: any;
    } | {
        error: any;
    }>;
    timeout?: number;
}
interface NormalizedModuleRunnerTransport {
    connect?(onMessage?: (data: HotPayload) => void): Promise<void> | void;
    disconnect?(): Promise<void> | void;
    send(data: HotPayload): Promise<void>;
    invoke<T extends keyof InvokeMethods>(name: T, data: Parameters<InvokeMethods[T]>): Promise<ReturnType<Awaited<InvokeMethods[T]>>>;
}
declare const createWebSocketModuleRunnerTransport: (options: {
    createConnection: () => WebSocket;
    pingInterval?: number;
}) => Required<Pick<ModuleRunnerTransport, "connect" | "disconnect" | "send">>;

export { createWebSocketModuleRunnerTransport as c };
export type { ExternalFetchResult as E, FetchFunctionOptions as F, ModuleRunnerTransport as M, NormalizedModuleRunnerTransport as N, ViteFetchResult as V, FetchResult as a, ModuleRunnerTransportHandlers as b };