-
Notifications
You must be signed in to change notification settings - Fork 8
React 19 - React Router Module - Phase 3: Manifest Generation & CLI Integration #3719
Copy link
Copy link
Open
Copy link
Labels
Description
Phase 3: Manifest Generation & CLI Integration
Parent Objective: #3716
Related User Story: #3715
Objective
Implement route metadata extraction and integrate it with existing app and portal manifest generation commands, ensuring routes are included in build manifests for static analysis and tooling.
Tasks
-
Create Route Manifest Generator - Implement
extractRouteMetadata()function to extract route metadata fromRouteNode[]- Implement
extractRouteMetadata()function - Extract route metadata from
RouteNode[]recursively - Generate manifest structure:
{ path, description, params, search, children? } - Ensure no file paths or component references in manifest
- Support routes defined in multiple files
- Handle routes with dynamic segments, optional segments, and query parameters
- Implement
-
Integrate with App Manifest Generation - Update
AppBuildManifestandcreateAppManifestFromPackage()to include optionalroutesfield- Update
AppBuildManifesttype inpackages/modules/app/src/types.tsto include optionalroutesfield - Update
createAppManifestFromPackage()to extract routes from app config - Integrate route extraction into
ffc app manifestcommand - Ensure routes field is optional (backward compatible)
- Update
-
Integrate with Portal Manifest Generation - Update
PortalManifestBuildSchemato include optionalroutesfield- Update
PortalManifestBuildSchemainpackages/cli/src/lib/portal/portal-manifest.schema.tsto include optionalroutesfield - Integrate route extraction into
ffc portal manifestcommand - Ensure routes field is optional (backward compatible)
- Update
-
Add Route Validation - Implement validation and error reporting for route schemas
- Implement route schema validation
- Validate enum values, parameter types
- Report errors with file locations and clear messages
- Handle invalid route definitions gracefully
Deliverables
extractRouteMetadata()function that extracts route metadata fromRouteNode[]- Updated
AppBuildManifesttype with optionalroutesfield - Updated
PortalManifestBuildSchemawith optionalroutesfield - Route extraction integrated into
ffc app manifestandffc portal manifestcommands - Route validation and error reporting
Acceptance Criteria
- Route metadata is extracted during existing
ffc app manifestandffc portal manifestcommands - Routes are added to
AppBuildManifestandPortalManifestBuildSchemaas optionalroutesfield - Route extraction runs during build process (before bundling) as part of manifest generation
- Route extraction does not require app execution or DOM environment
- CLI validates route schemas and reports errors with file locations during manifest generation
- Routes in manifest can be consumed by documentation tools, SSG tools, and other build-time tools
- Routes field is optional - apps without routes still generate valid manifests
- The manifest contains only:
path,description,params,search— no file paths, no component references - No runtime cost: manifest is generated before bundling (static analysis only)
Estimated Timeline
Phase 3: 2-3 days
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for Task.