-
Notifications
You must be signed in to change notification settings - Fork 12
typescript compose builder #375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: d93b34e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Coverage Report for ./apps/cli
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bd75d24 to
68d9896
Compare
90656d3 to
062e3bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request successfully refactors the Docker Compose configuration for the CLI app by migrating from static YAML files to a programmatic TypeScript-based approach using a builder pattern. This significantly improves maintainability and flexibility.
Key Changes:
- Replaced all static Docker Compose YAML files with TypeScript modules that export service and proxy configuration objects
- Implemented a
ComposeBuilderclass with fluent API for constructing Compose configurations programmatically - Consolidated environment variable management from
.envfiles into TypeScript constants - Added the
yamlnpm package for YAML generation and removed the unusedcopyfilesdependency
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
apps/cli/src/types/compose.ts |
New comprehensive TypeScript type definitions for Docker Compose specification |
apps/cli/src/compose/builder.ts |
New builder class implementing fluent API for creating Compose configurations |
apps/cli/src/compose/anvil.ts |
Anvil service and proxy configuration in TypeScript |
apps/cli/src/compose/bundler.ts |
Bundler service and proxy configuration in TypeScript |
apps/cli/src/compose/database.ts |
Database service configuration in TypeScript |
apps/cli/src/compose/common.ts |
Shared constants for environment variables and health checks |
apps/cli/src/compose/explorer.ts |
Explorer, Explorer API, and Squid Processor service configurations |
apps/cli/src/compose/passkey.ts |
Passkey server service and proxy configuration |
apps/cli/src/compose/paymaster.ts |
Paymaster service and proxy configuration |
apps/cli/src/compose/proxy.ts |
Traefik proxy service configuration |
apps/cli/src/compose/rollupsNode.ts |
Rollups Node service and proxy configuration |
apps/cli/src/exec/rollups.ts |
Updated to use ComposeBuilder instead of static YAML files |
apps/cli/tests/unit/compose.test.ts |
Comprehensive test suite for ComposeBuilder functionality |
apps/cli/package.json |
Added yaml dependency, removed copyfiles, updated build scripts |
pnpm-lock.yaml |
Updated dependency lock file reflecting package changes |
Various docker-compose-*.yaml files |
Deleted static YAML files replaced by TypeScript modules |
apps/cli/src/compose/default.env |
Deleted environment file, moved to TypeScript |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // pull images first | ||
| const pullArgs = ["--policy", "missing"]; | ||
| await execa("docker", [...composeArgs, "pull", ...pullArgs], { | ||
| env, | ||
| stdio: "inherit", | ||
| }); | ||
| // const pullArgs = ["--policy", "missing"]; | ||
| // await execa("docker", [...composeArgs, "pull", ...pullArgs], { | ||
| // env, | ||
| ////FIXME: stdio and input won't work together | ||
| // stdio: "inherit", | ||
| // input: composeFile.build() | ||
| // }); |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commented-out code for pulling Docker images should either be removed or properly implemented. Leaving it commented with a FIXME indicates unfinished work. Either remove this commented block entirely or create a proper TODO comment explaining the issue and when it should be addressed.
c94d9e2 to
e7cda47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 26 out of 27 changed files in this pull request and generated 12 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
What is the state of this? Do you want to retry and go easier on AI, or go from here? |
I still need to solve all those Copilot reviews. But I'd go from here, anyway. |
8a5a745 to
806868a
Compare
1592e02 to
c4f3247
Compare
|
This needs a rebase. Be careful that the explorer image versions changed. |
c4f3247 to
d9d5f4e
Compare
|
Rebase done. |
b427cf8 to
d93b34e
Compare
This pull request refactors the Docker Compose configuration for the CLI app by removing all static YAML Compose files and replacing them with TypeScript modules that define service and proxy configurations programmatically. Additionally, it consolidates environment variable management into TypeScript, updates dependencies, and simplifies the build process.
The most important changes are:
Compose Configuration Refactor:
Removed all static Docker Compose YAML files (
docker-compose-*.yamlanddefault.env) and replaced them with TypeScript modules (anvil.ts,bundler.ts,database.ts,common.ts) that export service and proxy configuration objects. This enables dynamic and maintainable Compose generation. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]Moved all environment variable definitions and default values from
.envfiles into the newcommon.tsTypeScript module for centralized configuration management. [1] [2]Dependency and Build Script Updates:
yamlnpm package as a new dependency to support YAML generation in TypeScript; removed the unusedcopyfilesdependency and related build script since static YAML files are no longer copied. [1] [2] [3]These changes significantly improve the maintainability and flexibility of the CLI's Compose configuration by making it programmatic and easier to extend or modify in the future.