Skip to content
Bullet

@clutchify/bullet-server

Classes

CompilerCloseError

The multi compiler failed to stop its watchers cleanly.

Extends

  • IterableError<this> & object & Readonly<{ cause: unknown; message: string; }>

Constructors

Constructor

new CompilerCloseError(args): CompilerCloseError

Parameters
ParameterType
args{ cause: unknown; }
args.causeunknown
Returns

CompilerCloseError

Overrides

TaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"CompilerCloseError"TaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>()._tag
causepublicunknownPluginOptionsValidationError.cause
messagepublicstringTaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().message
namepublicstringTaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().name
stack?publicstringTaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, CompilerCloseError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, CompilerCloseError>, never, unknown>

Inherited from

TaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"CompilerCloseError", { cause: unknown; message: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"CompilerCloseError", { cause: unknown; message: string }>

Inherited from

TaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().is


CompilerCreationError

Rspack rejected the provided multi-compiler configuration.

Extends

  • IterableError<this> & object & Readonly<{ cause: unknown; message: string; }>

Constructors

Constructor

new CompilerCreationError(args): CompilerCreationError

Parameters
ParameterType
args{ cause: unknown; }
args.causeunknown
Returns

CompilerCreationError

Overrides

TaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"CompilerCreationError"TaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>()._tag
causepublicunknownPluginOptionsValidationError.cause
messagepublicstringTaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().message
namepublicstringTaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().name
stack?publicstringTaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, CompilerCreationError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, CompilerCreationError>, never, unknown>

Inherited from

TaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"CompilerCreationError", { cause: unknown; message: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"CompilerCreationError", { cause: unknown; message: string }>

Inherited from

TaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().is


CompilerEntryChunkNotFoundError

The entry chunk for a named compilation could not be located in the build stats.

Extends

  • IterableError<this> & object & Readonly<{ entry: string; message: string; name: string; }>

Constructors

Constructor

new CompilerEntryChunkNotFoundError(args): CompilerEntryChunkNotFoundError

Parameters
ParameterType
args{ entry: string; name: string; }
args.entrystring
args.namestring
Returns

CompilerEntryChunkNotFoundError

Overrides

TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"CompilerEntryChunkNotFoundError"TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>()._tag
cause?publicunknownTaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().cause
entryreadonlystringTaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().entry
messagepublicstringTaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().message
namepublicstringPluginOptionsValidationError.name
stack?publicstringTaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, CompilerEntryChunkNotFoundError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, CompilerEntryChunkNotFoundError>, never, unknown>

Inherited from

TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"CompilerEntryChunkNotFoundError", { entry: string; message: string; name: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"CompilerEntryChunkNotFoundError", { entry: string; message: string; name: string }>

Inherited from

TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().is


CompilerNotFoundError

No compiler in the multi compiler matches the requested configuration name.

Extends

  • IterableError<this> & object & Readonly<{ available: string; message: string; name: string; }>

Constructors

Constructor

new CompilerNotFoundError(args): CompilerNotFoundError

Parameters
ParameterType
args{ available: string; name: string; }
args.availablestring
args.namestring
Returns

CompilerNotFoundError

Overrides

TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"CompilerNotFoundError"TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>()._tag
availablereadonlystringTaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().available
cause?publicunknownTaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().cause
messagepublicstringTaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().message
namepublicstringPluginOptionsValidationError.name
stack?publicstringTaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, CompilerNotFoundError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, CompilerNotFoundError>, never, unknown>

Inherited from

TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"CompilerNotFoundError", { available: string; message: string; name: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"CompilerNotFoundError", { available: string; message: string; name: string }>

Inherited from

TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().is


CompilerOutputPathMissingError

A compiler is missing output.path in its rspack configuration.

Extends

  • IterableError<this> & object & Readonly<{ message: string; name: string; }>

Constructors

Constructor

new CompilerOutputPathMissingError(args): CompilerOutputPathMissingError

Parameters
ParameterType
args{ name: string; }
args.namestring
Returns

CompilerOutputPathMissingError

Overrides

TaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"CompilerOutputPathMissingError"TaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>()._tag
cause?publicunknownTaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().cause
messagepublicstringTaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().message
namepublicstringPluginOptionsValidationError.name
stack?publicstringTaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, CompilerOutputPathMissingError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, CompilerOutputPathMissingError>, never, unknown>

Inherited from

TaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"CompilerOutputPathMissingError", { message: string; name: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"CompilerOutputPathMissingError", { message: string; name: string }>

Inherited from

TaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().is


CompilerWebsocket

Manages connected peers for a broadcast WebSocket endpoint.

Peers whose send method throws on delivery are automatically removed.

Type Parameters

Type ParameterDescription
TThe peer type used by the underlying transport.

Constructors

Constructor

new CompilerWebsocket<T>(send): CompilerWebsocket<T>

Parameters
ParameterType
sendSocketSendMethod<T>
Returns

CompilerWebsocket<T>

Methods

add()

add(peer): void

Registers a peer so it receives future broadcasts.

Parameters
ParameterTypeDescription
peerTThe peer to add.
Returns

void

broadcast()

broadcast(data): void

Serializes data as JSON and sends it to every registered peer. Peers that throw on send are removed.

Parameters
ParameterTypeDescription
dataunknownThe value to serialize and broadcast.
Returns

void

remove()

remove(peer): void

Removes a peer from the broadcast list.

Parameters
ParameterTypeDescription
peerTThe peer to remove.
Returns

void


ExternalModuleLinkError

An external module import failed while linking the server bundle.

Extends

  • IterableError<this> & object & Readonly<{ cause: unknown; message: string; specifier: string; }>

Constructors

Constructor

new ExternalModuleLinkError(args): ExternalModuleLinkError

Parameters
ParameterType
args{ cause: unknown; specifier: string; }
args.causeunknown
args.specifierstring
Returns

ExternalModuleLinkError

Overrides

TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"ExternalModuleLinkError"TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>()._tag
causepublicunknownPluginOptionsValidationError.cause
messagepublicstringTaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().message
namepublicstringTaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().name
specifierreadonlystringTaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().specifier
stack?publicstringTaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, ExternalModuleLinkError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, ExternalModuleLinkError>, never, unknown>

Inherited from

TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"ExternalModuleLinkError", { cause: unknown; message: string; specifier: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"ExternalModuleLinkError", { cause: unknown; message: string; specifier: string }>

Inherited from

TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().is


ManifestReadError

The client manifest could not be read from the compiler output or disk.

Extends

  • IterableError<this> & object & Readonly<{ cause: unknown; message: string; name: string; }>

Constructors

Constructor

new ManifestReadError(args): ManifestReadError

Parameters
ParameterType
args{ cause: unknown; name: string; }
args.causeunknown
args.namestring
Returns

ManifestReadError

Overrides

TaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"ManifestReadError"TaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>()._tag
causepublicunknownPluginOptionsValidationError.cause
messagepublicstringTaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>().message
namepublicstringPluginOptionsValidationError.name
stack?publicstringTaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, ManifestReadError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, ManifestReadError>, never, unknown>

Inherited from

TaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"ManifestReadError", { cause: unknown; message: string; name: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"ManifestReadError", { cause: unknown; message: string; name: string }>

Inherited from

TaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>().is


NativeBundleNotFoundError

A native bundle is missing from the platform compiler output.

Extends

  • IterableError<this> & object & Readonly<{ entryFile: string; message: string; platform: string; }>

Constructors

Constructor

new NativeBundleNotFoundError(args): NativeBundleNotFoundError

Parameters
ParameterType
args{ entryFile: string; platform: string; }
args.entryFilestring
args.platformstring
Returns

NativeBundleNotFoundError

Overrides

TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"NativeBundleNotFoundError"TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>()._tag
cause?publicunknownTaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().cause
entryFilereadonlystringTaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().entryFile
messagepublicstringTaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().message
namepublicstringTaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().name
platformreadonlystringTaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().platform
stack?publicstringTaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, NativeBundleNotFoundError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, NativeBundleNotFoundError>, never, unknown>

Inherited from

TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"NativeBundleNotFoundError", { entryFile: string; message: string; platform: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"NativeBundleNotFoundError", { entryFile: string; message: string; platform: string }>

Inherited from

TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().is


NativeHotUpdateNotFoundError

A native hot-update file is missing from every native compiler output.

Extends

  • IterableError<this> & object & Readonly<{ fileName: string; message: string; }>

Constructors

Constructor

new NativeHotUpdateNotFoundError(args): NativeHotUpdateNotFoundError

Parameters
ParameterType
args{ fileName: string; }
args.fileNamestring
Returns

NativeHotUpdateNotFoundError

Overrides

TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"NativeHotUpdateNotFoundError"TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>()._tag
cause?publicunknownTaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().cause
fileNamereadonlystringTaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().fileName
messagepublicstringTaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().message
namepublicstringTaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().name
stack?publicstringTaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, NativeHotUpdateNotFoundError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, NativeHotUpdateNotFoundError>, never, unknown>

Inherited from

TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"NativeHotUpdateNotFoundError", { fileName: string; message: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"NativeHotUpdateNotFoundError", { fileName: string; message: string }>

Inherited from

TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().is


NativeSourceMapNotFoundError

A native source map is missing from the platform compiler output.

Extends

  • IterableError<this> & object & Readonly<{ entryFile: string; message: string; platform: string; }>

Constructors

Constructor

new NativeSourceMapNotFoundError(args): NativeSourceMapNotFoundError

Parameters
ParameterType
args{ entryFile: string; platform: string; }
args.entryFilestring
args.platformstring
Returns

NativeSourceMapNotFoundError

Overrides

TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"NativeSourceMapNotFoundError"TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>()._tag
cause?publicunknownTaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().cause
entryFilereadonlystringTaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().entryFile
messagepublicstringTaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().message
namepublicstringTaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().name
platformreadonlystringTaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().platform
stack?publicstringTaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, NativeSourceMapNotFoundError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, NativeSourceMapNotFoundError>, never, unknown>

Inherited from

TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"NativeSourceMapNotFoundError", { entryFile: string; message: string; platform: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"NativeSourceMapNotFoundError", { entryFile: string; message: string; platform: string }>

Inherited from

TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().is


PluginOptionsValidationError

The bullet() options object failed schema validation.

Extends

  • IterableError<this> & object & Readonly<{ issues: string; message: string; }>

Constructors

Constructor

new PluginOptionsValidationError(args): PluginOptionsValidationError

Parameters
ParameterType
args{ issues: string; }
args.issuesstring
Returns

PluginOptionsValidationError

Overrides

TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"PluginOptionsValidationError"TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>()._tag
cause?publicunknownTaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().cause
issuesreadonlystringTaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().issues
messagepublicstringTaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().message
namepublicstringTaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().name
stack?publicstringTaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, PluginOptionsValidationError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, PluginOptionsValidationError>, never, unknown>

Inherited from

TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"PluginOptionsValidationError", { issues: string; message: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"PluginOptionsValidationError", { issues: string; message: string }>

Inherited from

TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().is


ReactNativeMiddlewareLoadError

The official React Native CLI/dev-middleware packages could not be resolved or loaded.

Extends

  • IterableError<this> & object & Readonly<{ cause: unknown; message: string; }>

Constructors

Constructor

new ReactNativeMiddlewareLoadError(args): ReactNativeMiddlewareLoadError

Parameters
ParameterType
args{ cause: unknown; }
args.causeunknown
Returns

ReactNativeMiddlewareLoadError

Overrides

TaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"ReactNativeMiddlewareLoadError"TaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>()._tag
causepublicunknownPluginOptionsValidationError.cause
messagepublicstringTaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().message
namepublicstringTaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().name
stack?publicstringTaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, ReactNativeMiddlewareLoadError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, ReactNativeMiddlewareLoadError>, never, unknown>

Inherited from

TaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"ReactNativeMiddlewareLoadError", { cause: unknown; message: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"ReactNativeMiddlewareLoadError", { cause: unknown; message: string }>

Inherited from

TaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().is


ServerBundleEvaluationError

The development server bundle failed to evaluate inside the VM sandbox.

Extends

  • IterableError<this> & object & Readonly<{ cause: unknown; message: string; }>

Constructors

Constructor

new ServerBundleEvaluationError(args): ServerBundleEvaluationError

Parameters
ParameterType
args{ cause: unknown; }
args.causeunknown
Returns

ServerBundleEvaluationError

Overrides

TaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"ServerBundleEvaluationError"TaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>()._tag
causepublicunknownPluginOptionsValidationError.cause
messagepublicstringTaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().message
namepublicstringTaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().name
stack?publicstringTaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, ServerBundleEvaluationError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, ServerBundleEvaluationError>, never, unknown>

Inherited from

TaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"ServerBundleEvaluationError", { cause: unknown; message: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"ServerBundleEvaluationError", { cause: unknown; message: string }>

Inherited from

TaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().is


ServerEntryImportError

The production server entry bundle could not be imported from disk.

Extends

  • IterableError<this> & object & Readonly<{ cause: unknown; message: string; name: string; }>

Constructors

Constructor

new ServerEntryImportError(args): ServerEntryImportError

Parameters
ParameterType
args{ cause: unknown; name: string; }
args.causeunknown
args.namestring
Returns

ServerEntryImportError

Overrides

TaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"ServerEntryImportError"TaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>()._tag
causepublicunknownPluginOptionsValidationError.cause
messagepublicstringTaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>().message
namepublicstringPluginOptionsValidationError.name
stack?publicstringTaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, ServerEntryImportError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, ServerEntryImportError>, never, unknown>

Inherited from

TaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"ServerEntryImportError", { cause: unknown; message: string; name: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"ServerEntryImportError", { cause: unknown; message: string; name: string }>

Inherited from

TaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>().is


SymbolicationError

A symbolicate request could not be processed (bad payload, unknown platform, missing map).

Extends

  • IterableError<this> & object & Readonly<{ cause: unknown; message: string; }>

Constructors

Constructor

new SymbolicationError(args): SymbolicationError

Parameters
ParameterType
args{ cause: unknown; }
args.causeunknown
Returns

SymbolicationError

Overrides

TaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"SymbolicationError"TaggedError("SymbolicationError")<{ cause: unknown; message: string; }>()._tag
causepublicunknownPluginOptionsValidationError.cause
messagepublicstringTaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().message
namepublicstringTaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().name
stack?publicstringTaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, SymbolicationError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, SymbolicationError>, never, unknown>

Inherited from

TaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"SymbolicationError", { cause: unknown; message: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"SymbolicationError", { cause: unknown; message: string }>

Inherited from

TaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().is


SymbolicatorUnavailableError

Symbolication was requested outside a development session.

Extends

  • IterableError<this> & object & Readonly<{ message: string; }>

Constructors

Constructor

new SymbolicatorUnavailableError(): SymbolicatorUnavailableError

Returns

SymbolicatorUnavailableError

Overrides

TaggedError("SymbolicatorUnavailableError")<{ message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"SymbolicatorUnavailableError"TaggedError("SymbolicatorUnavailableError")<{ message: string; }>()._tag
cause?publicunknownTaggedError("SymbolicatorUnavailableError")<{ message: string; }>().cause
messagepublicstringTaggedError("SymbolicatorUnavailableError")<{ message: string; }>().message
namepublicstringTaggedError("SymbolicatorUnavailableError")<{ message: string; }>().name
stack?publicstringTaggedError("SymbolicatorUnavailableError")<{ message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, SymbolicatorUnavailableError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, SymbolicatorUnavailableError>, never, unknown>

Inherited from

TaggedError("SymbolicatorUnavailableError")<{ message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("SymbolicatorUnavailableError")<{ message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"SymbolicatorUnavailableError", { message: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"SymbolicatorUnavailableError", { message: string }>

Inherited from

TaggedError("SymbolicatorUnavailableError")<{ message: string; }>().is


WebHotUpdateNotFoundError

A web hot-update file is missing from the client compiler output.

Extends

  • IterableError<this> & object & Readonly<{ fileName: string; message: string; }>

Constructors

Constructor

new WebHotUpdateNotFoundError(args): WebHotUpdateNotFoundError

Parameters
ParameterType
args{ fileName: string; }
args.fileNamestring
Returns

WebHotUpdateNotFoundError

Overrides

TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().constructor

Properties

PropertyModifierTypeInherited from
_tagreadonly"WebHotUpdateNotFoundError"TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>()._tag
cause?publicunknownTaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().cause
fileNamereadonlystringTaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().fileName
messagepublicstringTaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().message
namepublicstringTaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().name
stack?publicstringTaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().stack

Methods

[iterator]()

[iterator](): Generator<Err<never, WebHotUpdateNotFoundError>, never, unknown>

Makes TaggedError instances yieldable in Result.gen blocks.

Returns

Generator<Err<never, WebHotUpdateNotFoundError>, never, unknown>

Inherited from

TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().[iterator]

toJSON()

toJSON(): object

Returns

object

Inherited from

TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().toJSON

is()

static is(value): value is TaggedErrorInstance<"WebHotUpdateNotFoundError", { fileName: string; message: string }>

Type guard for this error class

Parameters
ParameterType
valueunknown
Returns

value is TaggedErrorInstance<"WebHotUpdateNotFoundError", { fileName: string; message: string }>

Inherited from

TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().is

Type Aliases

BulletServerError

BulletServerError = PluginOptionsValidationError | CompilerCreationError | CompilerCloseError | CompilerNotFoundError | CompilerOutputPathMissingError | CompilerEntryChunkNotFoundError | ManifestReadError | ServerEntryImportError | ServerBundleEvaluationError | ExternalModuleLinkError | ReactNativeMiddlewareLoadError | SymbolicatorUnavailableError | SymbolicationError | NativeBundleNotFoundError | NativeSourceMapNotFoundError | NativeHotUpdateNotFoundError | WebHotUpdateNotFoundError


ClientLogSink

ClientLogSink = (level, data) => void

Receives native console.* messages decoded from the /__client DevClient socket.

Parameters

ParameterType
levelstring
dataunknown[]

Returns

void


CompilerContext

CompilerContext<T> = object

Type Parameters

Type Parameter
T

Properties

PropertyType
multiMultiCompiler
reactNative?ReactNativeContext<T>
tui?TuiHandle
web?WebContext<T>

CompilerContextError

CompilerContextError = PluginOptionsValidationError | CompilerCreationError | CompilerNotFoundError | ManifestReadError | ServerEntryImportError


ConnectMiddleware

ConnectMiddleware = (request, response, next) => void

Parameters

ParameterType
requestIncomingMessage
responseServerResponse
next(error?) => void

Returns

void


Environment

Environment = "client" | "server" | "android" | "ios"

Named roles for a compiler in the multi-compiler setup.


H3ServerHandlerContext

H3ServerHandlerContext = ServerHandlerContext


HandlerResponse

HandlerResponse = object

Plain HTTP response payload produced by the compiler-backed services.

Properties

PropertyType
bodystring
headersRecord<string, string>
statusnumber

PluginOptions

PluginOptions<T> = object

Type Parameters

Type ParameterDefault type
T extends MultiRspackOptionsMultiRspackOptions

Properties

PropertyTypeDescription
configurationTMulti-compiler rspack configuration passed directly to rspack().
development?objectOptional overrides for the development server and TUI.
development.host?string-
development.port?number-
development.projectRoot?string-
development.tui?boolean-
environmentsRecord<Environment, NonNullable<T[number]["name"]> | false>Maps each compiler role to the rspack configuration name that fills it, or false to disable that role. Example environments: { client: "client", server: "server", android: "android", ios: "ios" }
mode?"development" | "production"Forces development or production mode. Default process.env.NODE_ENV

ReactNativeContext

ReactNativeContext<T> = object

Type Parameters

Type Parameter
T

Properties

PropertyTypeDescription
buildingSet<string>-
buildWaitersMap<string, () => void[]>-
eventsSocketEndpoint?EventsSocketEndpoint-
messageSocketEndpoint?MessageSocketEndpoint-
middlewaresConnectMiddleware[]Connect-style middleware contributed by the official React Native CLI/dev-middleware packages.
nativeCompilersMap<string, Compiler>Native compilers keyed by platform (android/ios), resolved once at creation.
onClientLog?ClientLogSink-
projectRootstring-
websocket?CompilerWebsocket<T>-
websocketEndpointsRecord<string, WebSocketServer>Raw ws.Server instances keyed by upgrade path, mounted through H3/crossws.

ServerHandler

ServerHandler<C> = (context) => Promise<Response>

Type Parameters

Type Parameter
C extends ServerHandlerContext

Parameters

ParameterType
contextC

Returns

Promise<Response>


ServerHandlerContext

ServerHandlerContext = object

Properties

PropertyType
manifestRecord<string, any>
requestRequest

ServerModule

ServerModule<C> = object

Type Parameters

Type Parameter
C extends ServerHandlerContext

Properties

PropertyType
defaultServerHandler<C>

SocketSendMethod

SocketSendMethod<T> = (peer) => (message) => void

Type Parameters

Type Parameter
T

Parameters

ParameterType
peerT

Returns

(message) => void


WebContext

WebContext<T> = object

Type Parameters

Type Parameter
T

Properties

PropertyTypeDescription
clientCompiler?Compiler-
handler?unknown-
handlerError?unknownSet when the server bundle failed to load; the SSR catch-all should render this instead of invoking handler.
manifest?Record<string, any>-
serverCompiler?Compiler-
websocket?CompilerWebsocket<T>-

Functions

bullet()

bullet<T>(options): Promise<H3$1>

Creates an H3 application around the rspack multi-compiler.

Mounts the web plugin for client/server environments and the reactNative plugin for android/ios environments, then adds the rspack dev middleware and an SSR catch-all route. Registers SIGINT/SIGTERM handlers for graceful compiler shutdown.

Type Parameters

Type Parameter
T extends MultiRspackOptions

Parameters

ParameterTypeDescription
optionsPluginOptions<T>Plugin configuration including rspack configurations and environment mapping.

Returns

Promise<H3$1>

A fully configured H3 application.

Example

import { bullet } from "@clutchify/bullet-server"
import configurations from "./rspack.config"
 
const application = await bullet({
  configuration: configurations,
  environments: { client: "client", server: "server", android: "android", ios: "ios" },
})

closeCompilerContext()

closeCompilerContext<T>(context): Promise<Result<void, CompilerCloseError>>

Stops the multi-compiler watchers and destroys the TUI for a graceful shutdown.

The HTTP server itself is not closed here; that stays the caller's responsibility.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextCompilerContext<T>The compiler context returned by createCompilerContext.

Returns

Promise<Result<void, CompilerCloseError>>

Ok(void) on clean shutdown, Err(CompilerCloseError) if the close failed.


createCompilerContext()

createCompilerContext<T>(options, send, onClientLog?): Promise<Result<CompilerContext<T>, CompilerContextError>>

Creates the rspack multi-compiler and the web, React Native, and TUI state around it.

Parses options, applies the REPACK_PLATFORM_FILTER environment variable, injects dev-server configuration into the relevant compilers, then wires the broadcast sockets and TUI. Compiler hooks are registered through registerCompilerHooks in development mode.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDefault valueDescription
optionsPluginOptions<any>undefinedPlugin options including rspack configuration and environment mapping.
sendSocketSendMethod<T>undefinedFactory that returns a send function for a given peer.
onClientLogClientLogSinkdefaultClientLogSinkSink for native console.* messages. Defaults to stdout.

Returns

Promise<Result<CompilerContext<T>, CompilerContextError>>

Ok(CompilerContext) on success, or an Err with the first failure encountered.


createCompilerMiddleware()

createCompilerMiddleware(multi): EventHandler<EventHandlerRequest, unknown>

Wraps rspack's dev middleware as an H3 handler.

Enables serverSideRender so per-request locals.webpack is available, and silences stats output (the TUI handles that separately).

Parameters

ParameterTypeDescription
multiMultiCompilerThe rspack multi-compiler to attach dev middleware to.

Returns

EventHandler<EventHandlerRequest, unknown>

An H3-compatible request handler.


createReactNativeContext()

createReactNativeContext<T>(options, nativeCompilers, send?, onClientLog?): Promise<ReactNativeContext<T>>

Creates the React Native dev-server context: native compilers, build tracking, the official CLI/dev-middleware surface, and the broadcast socket.

Loading the official middleware is best-effort; a failure degrades to a context without it rather than failing the whole dev server.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
optionsPluginOptions<any>Plugin options.
nativeCompilersMap<string, Compiler>Map of platform name to compiler (e.g. "android" to Compiler).
send?SocketSendMethod<T>Factory for a peer send function; omit to skip the broadcast socket.
onClientLog?ClientLogSinkSink for native console.* log messages.

Returns

Promise<ReactNativeContext<T>>

The populated React Native context.


createWebContext()

createWebContext<T>(options, compilers, send?): Promise<Result<WebContext<T>, WebContextError>>

Creates the web SSR/HMR state.

In development, returns an empty context that the compiler hook registry fills over time. In production, reads the manifest from disk and imports the server entry bundle.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
optionsPluginOptions<any>Plugin options.
compilersWebCompilersThe client and server compilers, if available.
send?SocketSendMethod<T>Factory for a peer send function; omit to skip the broadcast socket.

Returns

Promise<Result<WebContext<T>, WebContextError>>

Ok(WebContext) on success, or an Err when production assets cannot be loaded.


findCompilerByName()

findCompilerByName(multi, name): Result<Compiler, CompilerNotFoundError>

Finds a named compiler in the multi-compiler.

Parameters

ParameterTypeDescription
multiMultiCompilerThe rspack multi-compiler to search.
namestringCompiler name to look for.

Returns

Result<Compiler, CompilerNotFoundError>

Ok(Compiler) when found, Err(CompilerNotFoundError) otherwise.


isNativePlatform()

isNativePlatform(value): value is "android" | "ios"

Returns true when value is a React Native platform string ("android" or "ios").

Parameters

ParameterTypeDescription
valuestring | null | undefinedThe value to check.

Returns

value is "android" | "ios"


isNotFoundServerError()

isNotFoundServerError(error): boolean

Returns true for errors that represent a missing resource and should surface as HTTP 404.

Parameters

ParameterType
error{ _tag: string; }
error._tagstring

Returns

boolean


isServerModule()

isServerModule<C>(entry): entry is ServerModule<C>

Returns true when entry is a server module with a callable default export.

Type Parameters

Type Parameter
C extends ServerHandlerContext

Parameters

ParameterTypeDescription
entryunknownValue to test.

Returns

entry is ServerModule<C>


openReactNativeDebugger()

openReactNativeDebugger<T>(context): void

Broadcasts a debugger-open command to connected React Native clients.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextReactNativeContext<T>The React Native dev-server context.

Returns

void


openReactNativeDevMenu()

openReactNativeDevMenu<T>(context): void

Broadcasts a dev-menu toggle to every connected React Native client.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextReactNativeContext<T>The React Native dev-server context.

Returns

void


parsePluginOptions()

parsePluginOptions(options): Result<PluginOptions<MultiRspackOptions>, PluginOptionsValidationError>

Validates the raw bullet() options object against the plugin schema.

Parameters

ParameterTypeDescription
optionsunknownRaw options value to validate.

Returns

Result<PluginOptions<MultiRspackOptions>, PluginOptionsValidationError>

Ok(PluginOptions) when valid, Err(PluginOptionsValidationError) otherwise.


registerCompilerHooks()

registerCompilerHooks<T>(context): void

Registers all rspack hook taps for the web, React Native, and TUI subsystems.

Centralizing hook registration here keeps ordering auditable and makes it straightforward to add new subsystems without touching multiple files.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextCompilerHookContext<T>The compiler context whose hooks should be wired.

Returns

void


reloadReactNativeClients()

reloadReactNativeClients<T>(context): void

Broadcasts a reload command to every connected React Native client.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextReactNativeContext<T>The React Native dev-server context.

Returns

void


serveReactNativeBundle()

serveReactNativeBundle<T>(context, platform, entryFile): Promise<Result<HandlerResponse, NativeBundleNotFoundError | NativeReadError>>

Reads the compiled bundle for platform from the in-memory compiler output.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextReactNativeContext<T>The React Native dev-server context.
platformstringTarget platform (e.g. "ios").
entryFilestringEntry file name without the .bundle extension (e.g. "index").

Returns

Promise<Result<HandlerResponse, NativeBundleNotFoundError | NativeReadError>>

Ok(HandlerResponse) with the bundle content, or an Err when not found.


serveReactNativeHotUpdate()

serveReactNativeHotUpdate<T>(context, fileName, platform?): Result<HandlerResponse, NativeHotUpdateNotFoundError>

Reads a native *.hot-update.{json,js} file from the compiler output.

When platform is given the owning compiler is read directly. Without it every native compiler is scanned (hot-update names are content-hashed, so matches are unique). Web hot updates must be handled by the web module before this function is called.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextReactNativeContext<T>The React Native dev-server context.
fileNamestringHot-update file name from the request path.
platform?stringPlatform hint; omit to scan all native compilers.

Returns

Result<HandlerResponse, NativeHotUpdateNotFoundError>

Ok(HandlerResponse) with the file contents, or Err(NativeHotUpdateNotFoundError).


serveReactNativeSourceMap()

serveReactNativeSourceMap<T>(context, platform, entryFile): Promise<Result<HandlerResponse, NativeSourceMapNotFoundError | NativeReadError>>

Reads the source map for platform from the in-memory compiler output.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextReactNativeContext<T>The React Native dev-server context.
platformstringTarget platform.
entryFilestringEntry file name without the .bundle.map extension.

Returns

Promise<Result<HandlerResponse, NativeSourceMapNotFoundError | NativeReadError>>

Ok(HandlerResponse) with the source map content, or an Err when not found.


serveStaticDirectory()

serveStaticDirectory(root): (event) => Promise<HTTPResponse | undefined>

Returns an H3 event handler that serves files from root as static assets.

Parameters

ParameterTypeDescription
rootstringAbsolute or relative path to the directory to serve.

Returns

An H3 event handler.

(event) => Promise<HTTPResponse | undefined>


serveWebHotUpdate()

serveWebHotUpdate<T>(context, fileName): Result<HandlerResponse, WebHotUpdateNotFoundError>

Reads a *.hot-update.{json,js} file from the client compiler's in-memory output.

Falls back to the base filename when the public-path-prefixed name is not found in the output file system.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextWebContext<T>The web context.
fileNamestringHot-update filename from the request path.

Returns

Result<HandlerResponse, WebHotUpdateNotFoundError>

Ok(HandlerResponse) with the file contents, or Err(WebHotUpdateNotFoundError).


symbolicateReactNativeStack()

symbolicateReactNativeStack<T>(context, rawBody): Promise<Result<HandlerResponse, SymbolicatorUnavailableError | SymbolicationError | NativeReadError>>

Symbolicates a React Native red-box stack trace against the owning platform's source map.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
contextReactNativeContext<T>The React Native dev-server context.
rawBodystringRaw JSON request body containing a stack array.

Returns

Promise<Result<HandlerResponse, SymbolicatorUnavailableError | SymbolicationError | NativeReadError>>

Ok(HandlerResponse) with the symbolicated stack, or an Err when symbolication fails.