@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
| Parameter | Type |
|---|---|
args | { cause: unknown; } |
args.cause | unknown |
Returns
Overrides
TaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "CompilerCloseError" | TaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>()._tag |
cause | public | unknown | PluginOptionsValidationError.cause |
message | public | string | TaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().message |
name | public | string | TaggedError("CompilerCloseError")<{ cause: unknown; message: string; }>().name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"CompilerCloseError", { cause: unknown; message: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { cause: unknown; } |
args.cause | unknown |
Returns
Overrides
TaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "CompilerCreationError" | TaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>()._tag |
cause | public | unknown | PluginOptionsValidationError.cause |
message | public | string | TaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().message |
name | public | string | TaggedError("CompilerCreationError")<{ cause: unknown; message: string; }>().name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"CompilerCreationError", { cause: unknown; message: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { entry: string; name: string; } |
args.entry | string |
args.name | string |
Returns
CompilerEntryChunkNotFoundError
Overrides
TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "CompilerEntryChunkNotFoundError" | TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>()._tag |
cause? | public | unknown | TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().cause |
entry | readonly | string | TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().entry |
message | public | string | TaggedError("CompilerEntryChunkNotFoundError")<{ name: string; entry: string; message: string; }>().message |
name | public | string | PluginOptionsValidationError.name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"CompilerEntryChunkNotFoundError", { entry: string; message: string; name: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { available: string; name: string; } |
args.available | string |
args.name | string |
Returns
Overrides
TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "CompilerNotFoundError" | TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>()._tag |
available | readonly | string | TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().available |
cause? | public | unknown | TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().cause |
message | public | string | TaggedError("CompilerNotFoundError")<{ name: string; available: string; message: string; }>().message |
name | public | string | PluginOptionsValidationError.name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"CompilerNotFoundError", { available: string; message: string; name: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { name: string; } |
args.name | string |
Returns
CompilerOutputPathMissingError
Overrides
TaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "CompilerOutputPathMissingError" | TaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>()._tag |
cause? | public | unknown | TaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().cause |
message | public | string | TaggedError("CompilerOutputPathMissingError")<{ name: string; message: string; }>().message |
name | public | string | PluginOptionsValidationError.name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"CompilerOutputPathMissingError", { message: string; name: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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 Parameter | Description |
|---|---|
T | The peer type used by the underlying transport. |
Constructors
Constructor
new CompilerWebsocket<
T>(send):CompilerWebsocket<T>
Parameters
| Parameter | Type |
|---|---|
send | SocketSendMethod<T> |
Returns
Methods
add()
add(
peer):void
Registers a peer so it receives future broadcasts.
Parameters
| Parameter | Type | Description |
|---|---|---|
peer | T | The 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
| Parameter | Type | Description |
|---|---|---|
data | unknown | The value to serialize and broadcast. |
Returns
void
remove()
remove(
peer):void
Removes a peer from the broadcast list.
Parameters
| Parameter | Type | Description |
|---|---|---|
peer | T | The 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
| Parameter | Type |
|---|---|
args | { cause: unknown; specifier: string; } |
args.cause | unknown |
args.specifier | string |
Returns
Overrides
TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "ExternalModuleLinkError" | TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>()._tag |
cause | public | unknown | PluginOptionsValidationError.cause |
message | public | string | TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().message |
name | public | string | TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().name |
specifier | readonly | string | TaggedError("ExternalModuleLinkError")<{ specifier: string; cause: unknown; message: string; }>().specifier |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"ExternalModuleLinkError", { cause: unknown; message: string; specifier: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { cause: unknown; name: string; } |
args.cause | unknown |
args.name | string |
Returns
Overrides
TaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "ManifestReadError" | TaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>()._tag |
cause | public | unknown | PluginOptionsValidationError.cause |
message | public | string | TaggedError("ManifestReadError")<{ name: string; cause: unknown; message: string; }>().message |
name | public | string | PluginOptionsValidationError.name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"ManifestReadError", { cause: unknown; message: string; name: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { entryFile: string; platform: string; } |
args.entryFile | string |
args.platform | string |
Returns
Overrides
TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "NativeBundleNotFoundError" | TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>()._tag |
cause? | public | unknown | TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().cause |
entryFile | readonly | string | TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().entryFile |
message | public | string | TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().message |
name | public | string | TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().name |
platform | readonly | string | TaggedError("NativeBundleNotFoundError")<{ platform: string; entryFile: string; message: string; }>().platform |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"NativeBundleNotFoundError", { entryFile: string; message: string; platform: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { fileName: string; } |
args.fileName | string |
Returns
Overrides
TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "NativeHotUpdateNotFoundError" | TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>()._tag |
cause? | public | unknown | TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().cause |
fileName | readonly | string | TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().fileName |
message | public | string | TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().message |
name | public | string | TaggedError("NativeHotUpdateNotFoundError")<{ fileName: string; message: string; }>().name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"NativeHotUpdateNotFoundError", { fileName: string; message: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { entryFile: string; platform: string; } |
args.entryFile | string |
args.platform | string |
Returns
Overrides
TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "NativeSourceMapNotFoundError" | TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>()._tag |
cause? | public | unknown | TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().cause |
entryFile | readonly | string | TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().entryFile |
message | public | string | TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().message |
name | public | string | TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().name |
platform | readonly | string | TaggedError("NativeSourceMapNotFoundError")<{ platform: string; entryFile: string; message: string; }>().platform |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"NativeSourceMapNotFoundError", { entryFile: string; message: string; platform: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { issues: string; } |
args.issues | string |
Returns
Overrides
TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "PluginOptionsValidationError" | TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>()._tag |
cause? | public | unknown | TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().cause |
issues | readonly | string | TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().issues |
message | public | string | TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().message |
name | public | string | TaggedError("PluginOptionsValidationError")<{ issues: string; message: string; }>().name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"PluginOptionsValidationError", { issues: string; message: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { cause: unknown; } |
args.cause | unknown |
Returns
ReactNativeMiddlewareLoadError
Overrides
TaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "ReactNativeMiddlewareLoadError" | TaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>()._tag |
cause | public | unknown | PluginOptionsValidationError.cause |
message | public | string | TaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().message |
name | public | string | TaggedError("ReactNativeMiddlewareLoadError")<{ cause: unknown; message: string; }>().name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"ReactNativeMiddlewareLoadError", { cause: unknown; message: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { cause: unknown; } |
args.cause | unknown |
Returns
Overrides
TaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "ServerBundleEvaluationError" | TaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>()._tag |
cause | public | unknown | PluginOptionsValidationError.cause |
message | public | string | TaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().message |
name | public | string | TaggedError("ServerBundleEvaluationError")<{ cause: unknown; message: string; }>().name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"ServerBundleEvaluationError", { cause: unknown; message: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { cause: unknown; name: string; } |
args.cause | unknown |
args.name | string |
Returns
Overrides
TaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "ServerEntryImportError" | TaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>()._tag |
cause | public | unknown | PluginOptionsValidationError.cause |
message | public | string | TaggedError("ServerEntryImportError")<{ name: string; cause: unknown; message: string; }>().message |
name | public | string | PluginOptionsValidationError.name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"ServerEntryImportError", { cause: unknown; message: string; name: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { cause: unknown; } |
args.cause | unknown |
Returns
Overrides
TaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "SymbolicationError" | TaggedError("SymbolicationError")<{ cause: unknown; message: string; }>()._tag |
cause | public | unknown | PluginOptionsValidationError.cause |
message | public | string | TaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().message |
name | public | string | TaggedError("SymbolicationError")<{ cause: unknown; message: string; }>().name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"SymbolicationError", { cause: unknown; message: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
Overrides
TaggedError("SymbolicatorUnavailableError")<{ message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "SymbolicatorUnavailableError" | TaggedError("SymbolicatorUnavailableError")<{ message: string; }>()._tag |
cause? | public | unknown | TaggedError("SymbolicatorUnavailableError")<{ message: string; }>().cause |
message | public | string | TaggedError("SymbolicatorUnavailableError")<{ message: string; }>().message |
name | public | string | TaggedError("SymbolicatorUnavailableError")<{ message: string; }>().name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"SymbolicatorUnavailableError", { message: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
args | { fileName: string; } |
args.fileName | string |
Returns
Overrides
TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().constructor
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
_tag | readonly | "WebHotUpdateNotFoundError" | TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>()._tag |
cause? | public | unknown | TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().cause |
fileName | readonly | string | TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().fileName |
message | public | string | TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().message |
name | public | string | TaggedError("WebHotUpdateNotFoundError")<{ fileName: string; message: string; }>().name |
stack? | public | string | TaggedError("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()
staticis(value):value is TaggedErrorInstance<"WebHotUpdateNotFoundError", { fileName: string; message: string }>
Type guard for this error class
Parameters
| Parameter | Type |
|---|---|
value | unknown |
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
| Parameter | Type |
|---|---|
level | string |
data | unknown[] |
Returns
void
CompilerContext
CompilerContext<
T> =object
Type Parameters
| Type Parameter |
|---|
T |
Properties
| Property | Type |
|---|---|
multi | MultiCompiler |
reactNative? | ReactNativeContext<T> |
tui? | TuiHandle |
web? | WebContext<T> |
CompilerContextError
CompilerContextError =
PluginOptionsValidationError|CompilerCreationError|CompilerNotFoundError|ManifestReadError|ServerEntryImportError
ConnectMiddleware
ConnectMiddleware = (
request,response,next) =>void
Parameters
| Parameter | Type |
|---|---|
request | IncomingMessage |
response | ServerResponse |
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
| Property | Type |
|---|---|
body | string |
headers | Record<string, string> |
status | number |
PluginOptions
PluginOptions<
T> =object
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends MultiRspackOptions | MultiRspackOptions |
Properties
| Property | Type | Description |
|---|---|---|
configuration | T | Multi-compiler rspack configuration passed directly to rspack(). |
development? | object | Optional overrides for the development server and TUI. |
development.host? | string | - |
development.port? | number | - |
development.projectRoot? | string | - |
development.tui? | boolean | - |
environments | Record<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
| Property | Type | Description |
|---|---|---|
building | Set<string> | - |
buildWaiters | Map<string, () => void[]> | - |
eventsSocketEndpoint? | EventsSocketEndpoint | - |
messageSocketEndpoint? | MessageSocketEndpoint | - |
middlewares | ConnectMiddleware[] | Connect-style middleware contributed by the official React Native CLI/dev-middleware packages. |
nativeCompilers | Map<string, Compiler> | Native compilers keyed by platform (android/ios), resolved once at creation. |
onClientLog? | ClientLogSink | - |
projectRoot | string | - |
websocket? | CompilerWebsocket<T> | - |
websocketEndpoints | Record<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
| Parameter | Type |
|---|---|
context | C |
Returns
Promise<Response>
ServerHandlerContext
ServerHandlerContext =
object
Properties
| Property | Type |
|---|---|
manifest | Record<string, any> |
request | Request |
ServerModule
ServerModule<
C> =object
Type Parameters
| Type Parameter |
|---|
C extends ServerHandlerContext |
Properties
| Property | Type |
|---|---|
default | ServerHandler<C> |
SocketSendMethod
SocketSendMethod<
T> = (peer) => (message) =>void
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
peer | T |
Returns
(message) => void
WebContext
WebContext<
T> =object
Type Parameters
| Type Parameter |
|---|
T |
Properties
| Property | Type | Description |
|---|---|---|
clientCompiler? | Compiler | - |
handler? | unknown | - |
handlerError? | unknown | Set 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
| Parameter | Type | Description |
|---|---|---|
options | PluginOptions<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
| Parameter | Type | Description |
|---|---|---|
context | CompilerContext<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
| Parameter | Type | Default value | Description |
|---|---|---|---|
options | PluginOptions<any> | undefined | Plugin options including rspack configuration and environment mapping. |
send | SocketSendMethod<T> | undefined | Factory that returns a send function for a given peer. |
onClientLog | ClientLogSink | defaultClientLogSink | Sink 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
| Parameter | Type | Description |
|---|---|---|
multi | MultiCompiler | The 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
| Parameter | Type | Description |
|---|---|---|
options | PluginOptions<any> | Plugin options. |
nativeCompilers | Map<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? | ClientLogSink | Sink 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
| Parameter | Type | Description |
|---|---|---|
options | PluginOptions<any> | Plugin options. |
compilers | WebCompilers | The 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
| Parameter | Type | Description |
|---|---|---|
multi | MultiCompiler | The rspack multi-compiler to search. |
name | string | Compiler 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
| Parameter | Type | Description |
|---|---|---|
value | string | null | undefined | The 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
| Parameter | Type |
|---|---|
error | { _tag: string; } |
error._tag | string |
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
| Parameter | Type | Description |
|---|---|---|
entry | unknown | Value 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
| Parameter | Type | Description |
|---|---|---|
context | ReactNativeContext<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
| Parameter | Type | Description |
|---|---|---|
context | ReactNativeContext<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
| Parameter | Type | Description |
|---|---|---|
options | unknown | Raw 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
| Parameter | Type | Description |
|---|---|---|
context | CompilerHookContext<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
| Parameter | Type | Description |
|---|---|---|
context | ReactNativeContext<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
| Parameter | Type | Description |
|---|---|---|
context | ReactNativeContext<T> | The React Native dev-server context. |
platform | string | Target platform (e.g. "ios"). |
entryFile | string | Entry 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
| Parameter | Type | Description |
|---|---|---|
context | ReactNativeContext<T> | The React Native dev-server context. |
fileName | string | Hot-update file name from the request path. |
platform? | string | Platform 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
| Parameter | Type | Description |
|---|---|---|
context | ReactNativeContext<T> | The React Native dev-server context. |
platform | string | Target platform. |
entryFile | string | Entry 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
| Parameter | Type | Description |
|---|---|---|
root | string | Absolute 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
| Parameter | Type | Description |
|---|---|---|
context | WebContext<T> | The web context. |
fileName | string | Hot-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
| Parameter | Type | Description |
|---|---|---|
context | ReactNativeContext<T> | The React Native dev-server context. |
rawBody | string | Raw 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.