Add multi-entry-point support for monorepo and multi-app deployments#53
Open
DeDuckProject wants to merge 1 commit intomainfrom
Open
Add multi-entry-point support for monorepo and multi-app deployments#53DeDuckProject wants to merge 1 commit intomainfrom
DeDuckProject wants to merge 1 commit intomainfrom
Conversation
…rfaces
Allow configuring multiple named entry points, each with its own URL,
startCommand, and hint. The routeMap now accepts both string values
(backward-compatible) and { entry, route } objects to associate routes
with specific entry points.
Key changes:
- Config schema: `app` accepts either AppConfig or EntryPoint[] array
- New normalizeConfig() converts any config to canonical internal form
- RouteMapping gains `entry` field linking routes to entry points
- Pipeline uses `entryPoints: EntryPointUrl[]` instead of `baseUrl: string`
- LLM prompts list all entry points and tag routes with entry names
- Action starts multiple app processes in parallel
- CLI supports `--url name=http://...` for named entry points
- All 86 tests pass including new normalize and multi-entry tests
Closes #41
https://claude.ai/code/session_01Cb3fgZ9bbvF1aowmZvMkVd
0d53ea0 to
c1dd435
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for applications with multiple entry points (e.g., admin and storefront in a monorepo, or multiple deployments), allowing git-glimpse to generate demos that span different URLs and entry points.
Key Changes
Config Schema Enhancement: Extended
GitGlimpseConfigto accept either a singleAppConfigor an array ofEntryPointobjects, each with a name and configuration. AddedRouteMapValueSchemato support both string routes and object routes with explicit entry point mapping.Route Detection Refactoring: Updated
detectRoutes()to track which entry point each route belongs to. Routes are now deduplicated byentry:routekey instead of just route. TheRouteMappinginterface now includes anentryfield.Config Normalization: Introduced
normalizeConfig()function that:routeMapvalues (string routes default to the first entry point)NormalizedConfigstructurePipeline Updates: Changed
runPipeline()to acceptentryPoints: EntryPointUrl[]instead of a singlebaseUrl. Entry points are resolved before pipeline execution and passed through to all downstream functions.Prompt Generation: Updated LLM prompts to:
Script Generation: Modified
generateDemoScript()to accept entry points and collect hints from all entry points in multi-entry configs.Recording & Fallback: Updated
runScriptAndRecord()andtakeScreenshots()to handle multiple entry points, using a URL map to resolve the correct base URL for each route.Action & CLI Updates:
--urloption now supports both plain URLs andname=urlformat for named entry pointsTests: Added comprehensive tests for
normalizeConfig(),resolveEntryPointUrls(), and multi-entry route detection scenarios.Implementation Details
namefield, allowing routes to be mapped to specific deploymentsentry:route) to allow the same route path on different entry pointshttps://claude.ai/code/session_01Cb3fgZ9bbvF1aowmZvMkVd