Reference

@reckona/mreact-compiler

55 public exports.

Function

FunctionanalyzeBoundaryGraphfunction analyzeBoundaryGraph(input: BoundaryGraphInput): Promise<BoundaryGraphResult>Analyzes route modules and static imports to classify server, client, shared, and action boundaries.FunctionformatDiagnosticfunction formatDiagnostic(filename: string, diagnostic: Diagnostic): stringFormats a compiler diagnostic with filename, location, code, message, and suggestion details.Functiontransformfunction transform(input: TransformInput): TransformOutputCompiles one mreact source module into client or server JavaScript output.

Interface

InterfaceBoundaryGraphClientBoundaryinterface BoundaryGraphClientBoundaryDescribes an import that crosses from server-rendered code into a client boundary.InterfaceBoundaryGraphEntryinterface BoundaryGraphEntryDescribes an entry module passed to boundary graph analysis.InterfaceBoundaryGraphExportinterface BoundaryGraphExportDescribes the boundary classification assigned to one named export.InterfaceBoundaryGraphInputinterface BoundaryGraphInputSupplies entry modules and module loading hooks for boundary graph analysis.InterfaceBoundaryGraphModuleinterface BoundaryGraphModuleDescribes one analyzed module and the classifications for its exports.InterfaceBoundaryGraphResultinterface BoundaryGraphResultContains modules, client boundaries, server actions, diagnostics, and trace events for a graph analysis run.InterfaceBoundaryGraphServerActionSiteinterface BoundaryGraphServerActionSiteDescribes an inferred or explicit server action reference discovered in the graph.InterfaceBoundaryGraphTraceEventinterface BoundaryGraphTraceEventRecords one decision made while classifying a boundary graph.InterfaceServerEscapeOptionsinterface ServerEscapeOptionsConfigures imports for the server HTML escape helper emitted by the compiler.InterfaceTransformInputinterface TransformInputConfigures a single compiler transform call.

Re-export

Re-exportClientRouteModuleAnalysisconst ClientRouteModuleAnalysis: unknownRe-exports compiler module analysis types from the internal compiler API.Re-exportClientRouteStaticImportReferenceconst ClientRouteStaticImportReference: unknownRe-exports compiler module analysis types from the internal compiler API.Re-exportcollectClientRouteModuleAnalysisconst collectClientRouteModuleAnalysis: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectFormActionExpressionReferencesconst collectFormActionExpressionReferences: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectFormActionReferenceNamesconst collectFormActionReferenceNames: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectFormActionReferencesconst collectFormActionReferences: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectIdentifierReferenceNamesconst collectIdentifierReferenceNames: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectJsxComponentRootNamesconst collectJsxComponentRootNames: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectStaticExportReferencesconst collectStaticExportReferences: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectStaticImportReferencesconst collectStaticImportReferences: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectStaticModuleSpecifiersconst collectStaticModuleSpecifiers: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectTopLevelExportRenderInfoconst collectTopLevelExportRenderInfo: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportcollectTopLevelValueExportNamesconst collectTopLevelValueExportNames: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportdemoteTopLevelExportDeclarationsconst demoteTopLevelExportDeclarations: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportFormActionExpressionReferenceconst FormActionExpressionReference: unknownRe-exports compiler module analysis types from the internal compiler API.Re-exportFormActionReferenceconst FormActionReference: unknownRe-exports compiler module analysis types from the internal compiler API.Re-exporthasClientRuntimeSyntaxconst hasClientRuntimeSyntax: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exporthasModuleDirectiveconst hasModuleDirective: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exporthasTopLevelExportDeclarationconst hasTopLevelExportDeclaration: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportStaticExportReferenceconst StaticExportReference: unknownRe-exports compiler module analysis types from the internal compiler API.Re-exportStaticExportSpecifierReferenceconst StaticExportSpecifierReference: unknownRe-exports compiler module analysis types from the internal compiler API.Re-exportStaticImportReferenceconst StaticImportReference: unknownRe-exports compiler module analysis types from the internal compiler API.Re-exportStaticImportSpecifierReferenceconst StaticImportSpecifierReference: unknownRe-exports compiler module analysis types from the internal compiler API.Re-exportstripTopLevelExportDeclarationsconst stripTopLevelExportDeclarations: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportstripUnusedStaticValueImportsconst stripUnusedStaticValueImports: unknownRe-exports compiler module analysis helpers from the internal compiler API.Re-exportTopLevelExportRenderInfoconst TopLevelExportRenderInfo: unknownRe-exports compiler module analysis types from the internal compiler API.

Type Alias

Type AliasBoundaryClassificationtype BoundaryClassification = "client-boundary" | "client-route" | "server-action" | "server-only" | "server-render" | "shared" | "unknown"Classifies how a module or export participates in client, server, and shared execution.Type AliasBoundaryGraphEntryKindtype BoundaryGraphEntryKind = "module" | "route-layout" | "route-page" | "route-template"Classifies the route role of a module used as a boundary graph entry.Type AliasBoundaryGraphTraceKindtype BoundaryGraphTraceKind = "client-boundary" | "export" | "module" | "server-action"Names the kind of boundary graph trace event.Type AliasBoundaryGraphTraceReasontype BoundaryGraphTraceReason = "client-runtime-export" | "module-classification" | "node-builtin-import" | "rendered-import" | "server-action-expression" | "server-render-export" | "static-export" | "use-client-directive" | "unknown-module" | "use-server-directive"Names the analysis reason attached to a boundary graph trace event.Type AliasClientReferenceMetadatatype ClientReferenceMetadata = SharedClientReferenceMetadataDescribes a client boundary reference discovered during compilation.Type AliasCompilerFrontendtype CompilerFrontend = SharedCompilerFrontendNames the frontend implementation that produced compiler metadata.Type AliasCompilerMetadatatype CompilerMetadata = SharedModuleMetadata["compiler"]Describes compiler frontend metadata for one transformed module.Type AliasCompileTargettype CompileTarget = SharedCompileTargetNames whether the compiler emits client or server output.Type AliasComponentMetadatatype ComponentMetadata = SharedComponentMetadataDescribes one compiled component discovered in a module.Type AliasDiagnostictype Diagnostic = SharedDiagnosticDescribes a compiler diagnostic message.Type AliasModuleMetadatatype ModuleMetadata = SharedModuleMetadataDescribes metadata collected for one transformed module.Type AliasRuntimeImporttype RuntimeImport = SharedRuntimeImportDescribes a runtime import required by emitted compiler output.Type AliasServerBootstrapModetype ServerBootstrapMode = SharedServerBootstrapModeNames how the server renderer should emit bootstrap scripts.Type AliasServerOutputModetype ServerOutputMode = SharedServerOutputModeNames the server renderer output format produced by the compiler.Type AliasSourceLocationtype SourceLocation = SharedSourceLocationDescribes a one-based source location for diagnostics and metadata.Type AliasTransformOutputtype TransformOutput = SharedTransformOutputDescribes emitted code, source map data, diagnostics, and metadata from a transform.