From b9dcc844311bfe1bf4636f0763bcc2dcb8fe101b Mon Sep 17 00:00:00 2001 From: chrisdickinson Date: Mon, 8 Jan 2024 23:00:47 +0000 Subject: [PATCH] deploy: 702d794bf0b594dbc9bab1cbf9408acd47ff1295 --- classes/CallContext.html | 14 +++++++------- classes/PluginOutput.html | 6 +++--- functions/createPlugin.html | 2 +- interfaces/Capabilities.html | 16 ++++++++-------- interfaces/ExtismPluginOptions.html | 16 ++++++++-------- interfaces/Manifest.html | 4 ++-- interfaces/ManifestWasmData.html | 4 ++-- interfaces/ManifestWasmModule.html | 4 ++-- interfaces/ManifestWasmPath.html | 4 ++-- interfaces/ManifestWasmResponse.html | 4 ++-- interfaces/ManifestWasmUrl.html | 4 ++-- interfaces/Plugin.html | 10 +++++----- types/ManifestLike.html | 2 +- types/ManifestWasm.html | 2 +- variables/CAPABILITIES-1.html | 2 +- 15 files changed, 47 insertions(+), 47 deletions(-) diff --git a/classes/CallContext.html b/classes/CallContext.html index 5a2fa58..654b9a5 100644 --- a/classes/CallContext.html +++ b/classes/CallContext.html @@ -1,4 +1,4 @@ -CallContext | extism

Class CallContext

Hierarchy

  • CallContext

Properties

#arrayBufferType +CallContext | extism

Class CallContext

Hierarchy

  • CallContext

Properties

#arrayBufferType: (new (size) => ArrayBufferLike)

Type declaration

    • new (size): ArrayBufferLike
    • Parameters

      • size: number

      Returns ArrayBufferLike

#blocks: (null | Block)[] = []
#config: PluginConfig
#decoder: TextDecoder
#encoder: TextEncoder
#logger: Console
#stack: [null | number, null | number, null | number][]
#vars: Map<string, number> = ...

Methods

  • Allocate a chunk of host memory visible to plugins via other extism host functions. +

Properties

#arrayBufferType: (new (size) => ArrayBufferLike)

Type declaration

    • new (size): ArrayBufferLike
    • Parameters

      • size: number

      Returns ArrayBufferLike

#blocks: (null | Block)[] = []
#config: PluginConfig
#decoder: TextDecoder
#encoder: TextEncoder
#logger: Console
#stack: [null | number, null | number, null | number][]
#vars: Map<string, number> = ...

Methods

  • Allocate a chunk of host memory visible to plugins via other extism host functions. Returns the start address of the block.

    -

    Parameters

    • size: number | bigint

    Returns bigint

  • Set a variable to a given string or byte array value. Returns the start +

  • Set a variable to a given string or byte array value. Returns the start address of the variable. The start address is reused when changing the value of an existing variable.

    Parameters

    • name: string
    • value: string | Uint8Array

    Returns bigint

    bigint

    -
  • Store a string or Uint8Array value in extism memory.

    Parameters

    • input: string | Uint8Array

    Returns bigint

    bigint

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/PluginOutput.html b/classes/PluginOutput.html index 0ef4b15..949ee2d 100644 --- a/classes/PluginOutput.html +++ b/classes/PluginOutput.html @@ -2,7 +2,7 @@ returned by plugin.call() or * | callContext.read(). It implements the read side of DataView along with methods for reading string and JSON data out of the backing buffer.

-

Hierarchy

Properties

Hierarchy

  • DataView
    • PluginOutput

Properties

#bytes: null | Uint8Array = null
[toStringTag]: string
buffer: ArrayBuffer
byteLength: number
byteOffset: number
#decoder: TextDecoder = ...

Methods

  • Gets the BigInt64 value at the specified byte offset from the start of the view. There is +

Properties

#bytes: null | Uint8Array = null
[toStringTag]: string
buffer: ArrayBuffer
byteLength: number
byteOffset: number
#decoder: TextDecoder = ...

Methods

  • Gets the BigInt64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

    Parameters

    • byteOffset: number

      The place in the buffer at which the value should be retrieved.

    • Optional littleEndian: boolean

      If false or undefined, a big-endian value should be read.

      @@ -70,4 +70,4 @@

    Returns number

  • Gets the Uint8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.

    Parameters

    • byteOffset: number

      The place in the buffer at which the value should be retrieved.

      -

    Returns number

  • Parameters

    • _byteOffset: number
    • _value: bigint
    • Optional _littleEndian: boolean

    Returns void

  • Parameters

    • _byteOffset: number
    • _value: bigint
    • Optional _littleEndian: boolean

    Returns void

  • Parameters

    • _byteOffset: number
    • _value: number
    • Optional _littleEndian: boolean

    Returns void

  • Parameters

    • _byteOffset: number
    • _value: number
    • Optional _littleEndian: boolean

    Returns void

  • Parameters

    • _byteOffset: number
    • _value: number
    • Optional _littleEndian: boolean

    Returns void

  • Parameters

    • _byteOffset: number
    • _value: number
    • Optional _littleEndian: boolean

    Returns void

  • Parameters

    • _byteOffset: number
    • _value: number

    Returns void

  • Parameters

    • _byteOffset: number
    • _value: number
    • Optional _littleEndian: boolean

    Returns void

  • Parameters

    • _byteOffset: number
    • _value: number
    • Optional _littleEndian: boolean

    Returns void

  • Parameters

    • _byteOffset: number
    • _value: number

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Returns number

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/createPlugin.html b/functions/createPlugin.html index afca4ab..8c665a3 100644 --- a/functions/createPlugin.html +++ b/functions/createPlugin.html @@ -11,4 +11,4 @@
  • opts: ExtismPluginOptions = {}

    options for controlling the behavior of the plugin.

  • Returns Promise<Plugin>

    a promise for a Plugin.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/Capabilities.html b/interfaces/Capabilities.html index 85ac25e..82ec098 100644 --- a/interfaces/Capabilities.html +++ b/interfaces/Capabilities.html @@ -1,4 +1,4 @@ -Capabilities | extism

    Interface Capabilities

    Hierarchy

    • Capabilities

    Properties

    allowSharedBufferCodec +Capabilities | extism

    Interface Capabilities

    Hierarchy

    • Capabilities

    Properties

    crossOriginChecksEnforced: boolean

    Whether or not cross-origin checks are enforced for outgoing HTTP requests on this platform.

    +
    crossOriginChecksEnforced: boolean

    Whether or not cross-origin checks are enforced for outgoing HTTP requests on this platform.

    • ❌ node
    • ❌ deno
    • @@ -23,9 +23,9 @@
    • ✅ chrome
    • ✅ webkit
    -
    extismStdoutEnvVarSet: boolean

    Whether or not the EXTISM_ENABLE_WASI_OUTPUT environment variable has been set.

    +
    extismStdoutEnvVarSet: boolean

    Whether or not the EXTISM_ENABLE_WASI_OUTPUT environment variable has been set.

    This value is consulted whenever ExtismPluginOptions#enableWasiOutput is omitted.

    -
    fsAccess: boolean

    Whether or not the host environment has access to a filesystem.

    +
    fsAccess: boolean

    Whether or not the host environment has access to a filesystem.

    • ✅ node
    • ✅ deno
    • @@ -34,7 +34,7 @@
    • ❌ chrome
    • ❌ webkit
    -
    hasWorkerCapability: boolean

    Whether or not the host environment supports moving Wasm plugin workloads to a worker. This requires +

    hasWorkerCapability: boolean

    Whether or not the host environment supports moving Wasm plugin workloads to a worker. This requires SharedArrayBuffer support, which requires window.crossOriginIsolated to be true in browsers.

    See

    crossOriginalIsolated on MDN

      @@ -45,7 +45,7 @@
    • 🔒 chrome
    • 🔒 webkit
    -
    manifestSupportsPaths: boolean

    Whether or not ManifestWasm items support the "path:" key.

    +
    manifestSupportsPaths: boolean

    Whether or not ManifestWasm items support the "path:" key.

    • ✅ node
    • ✅ deno
    • @@ -54,7 +54,7 @@
    • ❌ chrome
    • ❌ webkit
    -
    supportsWasiPreview1: boolean

    Whether or not the host environment supports WASI preview 1.

    +
    supportsWasiPreview1: boolean

    Whether or not the host environment supports WASI preview 1.

    See

    WASI and WASI Preview 1

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/ExtismPluginOptions.html b/interfaces/ExtismPluginOptions.html index eaf38ec..6c86c72 100644 --- a/interfaces/ExtismPluginOptions.html +++ b/interfaces/ExtismPluginOptions.html @@ -1,5 +1,5 @@ ExtismPluginOptions | extism

    Interface ExtismPluginOptions

    Options for initializing an Extism plugin.

    -

    Hierarchy

    • ExtismPluginOptions

    Properties

    Hierarchy

    • ExtismPluginOptions

    Properties

    allowedHosts?: string[]
    allowedPaths?: {
        [key: string]: string;
    }

    Type declaration

    • [key: string]: string
    config?: PluginConfigLike
    enableWasiOutput?: boolean

    Whether WASI stdout should be forwarded to the host.

    +

    Properties

    allowedHosts?: string[]
    allowedPaths?: {
        [key: string]: string;
    }

    Type declaration

    • [key: string]: string
    config?: PluginConfigLike
    enableWasiOutput?: boolean

    Whether WASI stdout should be forwarded to the host.

    Overrides the EXTISM_ENABLE_WASI_OUTPUT environment variable.

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

    Type declaration

      • (input, init?): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optional init: RequestInit

        Returns Promise<Response>

      • (input, init?): Promise<Response>
      • Parameters

        • input: any
        • Optional init: RequestInit

        Returns Promise<Response>

    functions?: {
        [key: string]: {
            [key: string]: ((callContext, ...args) => any);
        };
    }

    A map of namespaces to function names to host functions.

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

    Type declaration

      • (input, init?): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optional init: RequestInit

        Returns Promise<Response>

      • (input, init?): Promise<Response>
      • Parameters

        • input: any
        • Optional init: RequestInit

        Returns Promise<Response>

    functions?: {
        [key: string]: {
            [key: string]: ((callContext, ...args) => any);
        };
    }

    A map of namespaces to function names to host functions.

    const functions = {
    'my_great_namespace': {
    'my_func': (callContext: CallContext, input: bigint) => {
    const output = callContext.read(input);
    if (output !== null) {
    console.log(output.string());
    }
    }
    }
    }
    -

    Type declaration

    • [key: string]: {
          [key: string]: ((callContext, ...args) => any);
      }
      • [key: string]: ((callContext, ...args) => any)
          • (callContext, ...args): any
          • Parameters

            Returns any

    logger?: Console

    A logger implementation. Must provide info, debug, warn, and error methods.

    -
    runInWorker?: boolean

    Whether or not to run the Wasm module in a Worker thread. Requires +

    Type declaration

    • [key: string]: {
          [key: string]: ((callContext, ...args) => any);
      }
      • [key: string]: ((callContext, ...args) => any)
          • (callContext, ...args): any
          • Parameters

            Returns any

    logger?: Console

    A logger implementation. Must provide info, debug, warn, and error methods.

    +
    runInWorker?: boolean

    Whether or not to run the Wasm module in a Worker thread. Requires CAPABILITIES.hasWorkerCapability to be true. Defaults to false.

    This feature is marked experimental as we work out a bug.

    -
    sharedArrayBufferSize?: number
    useWasi?: boolean

    Whether or not to enable WASI preview 1.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    sharedArrayBufferSize?: number
    useWasi?: boolean

    Whether or not to enable WASI preview 1.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/Manifest.html b/interfaces/Manifest.html index 6330cbc..c172146 100644 --- a/interfaces/Manifest.html +++ b/interfaces/Manifest.html @@ -3,6 +3,6 @@

    Every member of .wasm is expected to be an instance of ManifestWasm.

    See

    Extism > Concepts > Manifest

    -

    Hierarchy

    Properties

    Hierarchy

    • Manifest

    Properties

    Properties

    config?: PluginConfigLike
    wasm: ManifestWasm[]

    Generated using TypeDoc

    \ No newline at end of file +

    Properties

    config?: PluginConfigLike
    wasm: ManifestWasm[]

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/ManifestWasmData.html b/interfaces/ManifestWasmData.html index 6673f47..e07deb7 100644 --- a/interfaces/ManifestWasmData.html +++ b/interfaces/ManifestWasmData.html @@ -1,3 +1,3 @@ ManifestWasmData | extism

    Interface ManifestWasmData

    Represents the raw bytes of a WASM file loaded into memory

    -

    Hierarchy

    • ManifestWasmData

    Properties

    Properties

    data: Uint8Array

    Generated using TypeDoc

    \ No newline at end of file +

    Hierarchy

    Properties

    Properties

    data: Uint8Array

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/ManifestWasmModule.html b/interfaces/ManifestWasmModule.html index c17b8f1..cae4770 100644 --- a/interfaces/ManifestWasmModule.html +++ b/interfaces/ManifestWasmModule.html @@ -1,3 +1,3 @@ ManifestWasmModule | extism

    Interface ManifestWasmModule

    Represents a WASM module as a response

    -

    Hierarchy

    • ManifestWasmModule

    Properties

    Properties

    module: Module

    Generated using TypeDoc

    \ No newline at end of file +

    Hierarchy

    Properties

    Properties

    module: Module

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/ManifestWasmPath.html b/interfaces/ManifestWasmPath.html index fd32dd1..53a03d1 100644 --- a/interfaces/ManifestWasmPath.html +++ b/interfaces/ManifestWasmPath.html @@ -1,3 +1,3 @@ ManifestWasmPath | extism

    Interface ManifestWasmPath

    Represents a path to a WASM module

    -

    Hierarchy

    • ManifestWasmPath

    Properties

    Properties

    path: string

    Generated using TypeDoc

    \ No newline at end of file +

    Hierarchy

    Properties

    Properties

    path: string

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/ManifestWasmResponse.html b/interfaces/ManifestWasmResponse.html index 0cad3c3..5a6b2d1 100644 --- a/interfaces/ManifestWasmResponse.html +++ b/interfaces/ManifestWasmResponse.html @@ -1,3 +1,3 @@ ManifestWasmResponse | extism

    Interface ManifestWasmResponse

    Represents a WASM module as a response

    -

    Hierarchy

    • ManifestWasmResponse

    Properties

    Properties

    response: Response

    Generated using TypeDoc

    \ No newline at end of file +

    Hierarchy

    Properties

    Properties

    response: Response

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/ManifestWasmUrl.html b/interfaces/ManifestWasmUrl.html index 4cf50c4..83bb556 100644 --- a/interfaces/ManifestWasmUrl.html +++ b/interfaces/ManifestWasmUrl.html @@ -1,3 +1,3 @@ ManifestWasmUrl | extism

    Interface ManifestWasmUrl

    Represents a url to a WASM module

    -

    Hierarchy

    • ManifestWasmUrl

    Properties

    url -

    Properties

    url: string | URL

    Generated using TypeDoc

    \ No newline at end of file +

    Hierarchy

    Properties

    url +

    Properties

    url: string | URL

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/Plugin.html b/interfaces/Plugin.html index a0cedd5..50a9afe 100644 --- a/interfaces/Plugin.html +++ b/interfaces/Plugin.html @@ -1,4 +1,4 @@ -Plugin | extism

    Interface Plugin

    Hierarchy

    • Plugin

    Methods

    call +Plugin | extism

    Interface Plugin

    Hierarchy

    • Plugin

    Methods

    call close functionExists getExports @@ -10,10 +10,10 @@

    Parameters

    • funcName: string | [string, string]

      The name of the function to call

    • Optional input: string | number | Uint8Array

      The input to pass to the function

    Returns Promise<null | PluginOutput>

    The result from the function call

    -
    • Check if a function exists in the WebAssembly module.

      +
    • Check if a function exists in the WebAssembly module.

      Parameters

      • funcName: string | [string, string]

        The function's name, or a tuple of target module name and function name.

      Returns Promise<boolean>

      true if the function exists, otherwise false

      -
    • Parameters

      • Optional name: string

      Returns Promise<ModuleExportDescriptor[]>

    • Parameters

      • Optional name: string

      Returns Promise<ModuleImportDescriptor[]>

    • Parameters

      • Optional name: string

      Returns Promise<Instance>

    • Whether the plugin is currently processing a call.

      -

      Returns boolean

    • Parameters

      • Optional name: string

      Returns Promise<ModuleExportDescriptor[]>

    • Parameters

      • Optional name: string

      Returns Promise<ModuleImportDescriptor[]>

    • Parameters

      • Optional name: string

      Returns Promise<Instance>

    • Whether the plugin is currently processing a call.

      +

      Returns boolean

    • Reset Plugin memory. If called while the plugin is actively executing, memory will not be reset.

      Returns Promise<boolean>

      Whether or not the reset was successful.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/ManifestLike.html b/types/ManifestLike.html index e6d9cdb..2d38519 100644 --- a/types/ManifestLike.html +++ b/types/ManifestLike.html @@ -13,4 +13,4 @@

    See

    Extism > Concepts > Manifest

    Throws

    TypeError when URL parameters don't resolve to a known content-type

    Throws

    TypeError when the resulting Manifest does not contain a wasm member with valid ManifestWasm items.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/ManifestWasm.html b/types/ManifestWasm.html index 7302d17..059f7a7 100644 --- a/types/ManifestWasm.html +++ b/types/ManifestWasm.html @@ -1,2 +1,2 @@ ManifestWasm | extism

    Type alias ManifestWasm

    ManifestWasm: (ManifestWasmUrl | ManifestWasmData | ManifestWasmPath | ManifestWasmResponse | ManifestWasmModule) & {
        hash?: string;
        name?: string;
    }

    The WASM to load as bytes, a path, a fetch Response, a WebAssembly.Module, or a url

    -

    Type declaration

    • Optional hash?: string
    • Optional name?: string

    Generated using TypeDoc

    \ No newline at end of file +

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/CAPABILITIES-1.html b/variables/CAPABILITIES-1.html index e8058f1..cd85db7 100644 --- a/variables/CAPABILITIES-1.html +++ b/variables/CAPABILITIES-1.html @@ -1 +1 @@ -CAPABILITIES | extism

    Variable CAPABILITIESConst

    CAPABILITIES: Capabilities = ...

    Generated using TypeDoc

    \ No newline at end of file +CAPABILITIES | extism

    Variable CAPABILITIESConst

    CAPABILITIES: Capabilities = ...

    Generated using TypeDoc

    \ No newline at end of file