Skip to content

Interface: SessionOptions

Defined in: packages/core/src/session.ts:31

Properties

assets?

optional assets?: AssetResolver

Defined in: packages/core/src/session.ts:46

Fonts and images referenced by the log. Defaults to the plugins' declarations with relative urls.


limits?

optional limits?: object

Defined in: packages/core/src/session.ts:35

maxClientBytes?

optional maxClientBytes?: number

maxClientMegapixels?

optional maxClientMegapixels?: number


plugins

plugins: readonly AnyPlugin[]

Defined in: packages/core/src/session.ts:32


preview?

optional preview?: object

Defined in: packages/core/src/session.ts:36

debounceMs?

optional debounceMs?: number

enabled?

optional enabled?: boolean


proxy?

optional proxy?: object

Defined in: packages/core/src/session.ts:44

How to obtain the preview for images above the client limits. Default auto.

maxSide?

optional maxSide?: number

strategy?

optional strategy?: "wasm" | "auto" | "server"


renderer?

optional renderer?: Renderer

Defined in: packages/core/src/session.ts:34

Defaults to an InlineRenderer built from plugins. Pass a WorkerRenderer in browsers.


saveFile?

optional saveFile?: (bytes, filename, mimeType) => void | Promise<void>

Defined in: packages/core/src/session.ts:51

How download hands bytes to the user. Defaults to an <a download> click in browsers; required elsewhere.

Parameters

bytes

Uint8Array

filename

string

mimeType

string

Returns

void | Promise<void>


server?

optional server?: object

Defined in: packages/core/src/session.ts:42

Server rendering: endpoint accepts the @sealpixel/server contract. Used by requestServerRender, by download({ via: 'server' }), and by the server proxy strategy for images above the client limits.

endpoint

endpoint: string

fetch?

optional fetch?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Call Signature

(input, init?): Promise<Response>

MDN Reference

Parameters
input

URL | RequestInfo

init?

RequestInit

Returns

Promise<Response>

Call Signature

(input, init?): Promise<Response>

MDN Reference

Parameters
input

URL | RequestInfo

init?

RequestInit

Returns

Promise<Response>

Call Signature

(input, init?): Promise<Response>

MDN Reference

Parameters
input

string | URL | Request

init?

RequestInit

Returns

Promise<Response>

headers?

optional headers?: Record<string, string>