Add polyglot exports for flagd#1181
Merged
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1181Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1181" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds AspireExport (polyglot/ATS) support for the Flagd hosting integration and introduces a TypeScript ValidationAppHost to exercise the generated exports.
Changes:
- Added
AspireExportattributes forFlagdResourceand key builder extension methods, with an ATS ignore forWithLogLevel. - Added a new TypeScript ValidationAppHost (tsconfig/package files, apphost script, and sample flag definitions) for Flagd.
- Updated resource API surface exposure for polyglot access (e.g., exposed properties).
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/CommunityToolkit.Aspire.Hosting.Flagd/FlagdResource.cs | Adds AspireExport exposure for FlagdResource to enable polyglot access to resource properties. |
| src/CommunityToolkit.Aspire.Hosting.Flagd/FlagdBuilderExtensions.cs | Exports AddFlagd/WithBindFileSync for polyglot apphosts and ignores WithLogLevel for ATS incompatibility. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Flagd/ValidationAppHost/tsconfig.json | TS build configuration for the ValidationAppHost. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Flagd/ValidationAppHost/package.json | Defines scripts and dependencies for the ValidationAppHost. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Flagd/ValidationAppHost/package-lock.json | Locks npm dependency graph for repeatable ValidationAppHost restores. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Flagd/ValidationAppHost/flags/flagd.json | Sample default flag configuration used by the validation host. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Flagd/ValidationAppHost/flags/custom-flagd.json | Additional sample flag configuration to validate non-default filename flow. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Flagd/ValidationAppHost/apphost.ts | TypeScript ValidationAppHost that calls exported APIs and reads exposed properties. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Flagd/ValidationAppHost/apphost.run.json | Local run profile for the ValidationAppHost. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Flagd/ValidationAppHost/.aspire/settings.json | Configures the TS apphost package mapping/version for validation runs. |
Files not reviewed (1)
- playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.Flagd/ValidationAppHost/package-lock.json: Language not supported
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+1
to
+2
| #pragma warning disable ASPIREATS001 // AspireExport is experimental | ||
|
|
Comment on lines
+5
to
+6
| #pragma warning disable ASPIREATS001 // AspireExport is experimental | ||
|
|
Comment on lines
80
to
81
| /// <param name="fileSource">The path to the flag configuration file on the host.</param> | ||
| /// <param name="filename">The name of the flag configuration file. Defaults to "flagd.json".</param> |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e196087 to
895ab1b
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Minimum allowed line rate is |
aaronpowell
approved these changes
Apr 1, 2026
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.
Adds AspireExport coverage and a matching TypeScript validation apphost for flagd.