Add polyglot exports for gofeatureflag#1189
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1189Or
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1189" |
There was a problem hiding this comment.
Pull request overview
Adds polyglot (AspireExport) coverage for the GoFeatureFlag hosting integration and introduces a TypeScript ValidationAppHost to validate the generated exports.
Changes:
- Annotate GoFeatureFlag resource and builder extension methods with
AspireExport(and ignore unsupported overloads). - Add a TS ValidationAppHost (configs + apphost) for exercising exports and exposed properties.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/GoFeatureFlagResource.cs | Adds AspireExport(ExposeProperties = true) and suppresses ASPIREATS001 for the experimental attribute. |
| src/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/GoFeatureFlagBuilderExtensions.cs | Adds AspireExport attributes for polyglot exports and an ATS-friendly log level overload + enum. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/tsconfig.json | TypeScript config for the validation app host build. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/package.json | NPM manifest for running/building the validation app host. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/package-lock.json | Lockfile for deterministic dependencies. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/goff/goff-proxy.yaml | GoFeatureFlag proxy configuration used by the validation app host. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/goff/flags.yaml | Sample feature flags consumed by the proxy config. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/apphost.ts | Validation app host exercising exported APIs and exposed resource properties. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/apphost.run.json | Local run profile for the validation app host. |
| playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/.aspire/settings.json | Aspire settings tying the TS app host to the GoFeatureFlag package. |
Files not reviewed (1)
- playground/polyglot/TypeScript/CommunityToolkit.Aspire.Hosting.GoFeatureFlag/ValidationAppHost/package-lock.json: Language not supported
You can also share your feedback on Copilot code review. Take the survey.
| #pragma warning disable ASPIREATS001 // AspireExport is experimental | ||
|
|
| #pragma warning disable ASPIREATS001 // AspireExport is experimental | ||
|
|
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^20.0.0", | ||
| "nodemon": "^3.1.11", |
There was a problem hiding this comment.
todo: I don't see the need for this. To remove.
There was a problem hiding this comment.
These packages are used (required) by the Polyglot apphost we're introducing as part of 13.2
| "devDependencies": { | ||
| "@types/node": "^20.0.0", | ||
| "nodemon": "^3.1.11", | ||
| "tsx": "^4.19.0", |
There was a problem hiding this comment.
question: shouldn't that be used instead of tsc?
There was a problem hiding this comment.
It's following the existing pattern from dotnet/aspire:
https://github.com/dotnet/aspire/blob/main/playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppContainers/ValidationAppHost/package.json
But tsx is used to simply run TypeScript code on Node.js.
There was a problem hiding this comment.
If it isn't used anywhere in the project, it's a useless dependency. Same for nodemon.
| @@ -0,0 +1,962 @@ | |||
| { | |||
There was a problem hiding this comment.
suggestion: the lockfile could be shared in a monorepo to avoid installing the same dependency over and over.
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>
9953ae9 to
d4a30f1
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Minimum allowed line rate is |
Squash merge of #1189 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds AspireExport coverage and a matching TypeScript validation apphost for gofeatureflag.