Docs: TypeScript AppHost DOES expose withEndpointsInEnvironment (project-resources page says it does not)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- typescript
調査の方向性
src/frontend/src/content/docs/integrations/dotnet/project-resources.mdx を開き、「Filter endpoints in environment variables.」の下にある TypeScript タブを見つけます。既存のガイダンスを src/Aspire.Hosting/Ats/CoreExports.cs および tests/PolyglotAppHosts/Aspire.Hosting/TypeScript/apphost.mts と比較します。タブに allow-list 形式が記載され、示されている endpoint の例が含まれ、C# の predicate overload との違いが説明されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Page
integrations/dotnet/project-resources → "Filter endpoints in environment variables"
Source: project-resources.mdx
Problem
The TypeScript tab of the "Filter endpoints in environment variables" section states:
"The TypeScript AppHost doesn't currently expose
WithEndpointsInEnvironment. To exclude an endpoint from environment variable injection, define only the endpoints you need and omit theadminendpoint from the project resource."
But the TypeScript AppHost does expose it. There is a dedicated ATS-friendly overload marked [AspireExport] — src/Aspire.Hosting/Ats/CoreExports.cs:
[AspireExport]
public static IResourceBuilder<ProjectResource> WithEndpointsInEnvironment(
this IResourceBuilder<ProjectResource> resource,
string[] endpointNames)
The predicate overload WithEndpointsInEnvironment(Func<EndpointAnnotation, bool> filter) is [AspireExportIgnore] because Func<> isn't ATS-compatible, and its comment explicitly points to the array-based export as "the ATS-friendly implementation."
It appears in the generated TypeScript surface — src/Aspire.Hosting/api/Aspire.Hosting.ats.txt:
Aspire.Hosting/withEndpointsInEnvironment(endpointNames: string[]) -> Aspire.Hosting/Aspire.Hosting.ApplicationModel.ProjectResource
and the repository's own polyglot TypeScript AppHost uses it — tests/PolyglotAppHosts/Aspire.Hosting/TypeScript/apphost.mts:
await project.withEndpointsInEnvironment(["https"]);
Note on semantics
The exported TypeScript overload takes an allow-list of endpoint names to include (string[]), which is the inverse of the C# predicate example on the page (which excludes endpoints by returning false). So the correct TypeScript guidance to keep admin out of the environment is to list the endpoints you want to keep:
await builder.addProject("apiservice", "../Networking.ApiService/Networking.ApiService.csproj")
.withHttpsEndpoint()
.withHttpsEndpoint({ port: 19227, name: "admin" })
.withEndpointsInEnvironment(["https"]); // include only "https"; "admin" is excluded
Suggested fix
Replace the "doesn't currently expose WithEndpointsInEnvironment" note in the TypeScript tab with the withEndpointsInEnvironment(endpointNames) allow-list form and an example, noting the include-vs-exclude semantic difference from the C# predicate overload.
Provenance
aspire.dev release/13.5 (project-resources.mdx); aspire release/13.5 (CoreExports.cs, Aspire.Hosting.ats.txt, PolyglotAppHosts TypeScript AppHost). Confirmed working live against the 13.5 candidate CLI 13.5.0-pr.17553.
- 主要言語
- MDX
- スター
- 200
- フォーク
- 93
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 62
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/aspire.dev のほかの issue
-
Search result cursor flickers between arrow and pointer対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
microsoft/aspire.dev#1962 ·
メンテナーはふだん 1 日以内に返信
-
Integration Data Updater fails when apiReference is omitted対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
microsoft/aspire.dev#1960 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Docs: note that Bun resources don't trust the dev cert via NODE_EXTRA_CA_CERTS (upstream Bun bug)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/aspire.dev#1802 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/aspire.dev#1416 ·
メンテナーはふだん 1 日以内に返信
-
[docs] Missing information about the dotnet container steps around image being built locally対応中かも @IEvangelist が 39 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
microsoft/aspire.dev#1288 · リアクション 1 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
microsoft/aspire.dev の issue をすべて見る
似ている issue
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)オープンtriage:bug-verified
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Guide to API useageオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
chipsalliance/verible#2644 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100