Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Aspire.Cli/Resources/TemplatingStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/Aspire.Cli/Resources/TemplatingStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@
<data name="AspireServiceDefaults_Description" xml:space="preserve">
<value>Service defaults</value>
</data>
<data name="AspirePyStarter_Description" xml:space="preserve">
<value>Python and JavaScript starter (experimental)</value>
</data>
<data name="AspireAppHostSingleFile_Description" xml:space="preserve">
<value>Single-file AppHost (experimental)</value>
</data>
Expand Down
5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.zh-Hans.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/Aspire.Cli/Resources/xlf/TemplatingStrings.zh-Hant.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/Aspire.Cli/Templating/DotNetTemplateFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ private IEnumerable<ITemplate> GetTemplatesCore(bool showAllTemplates)
_ => { },
ApplySingleFileTemplate
);

yield return new CallbackTemplate(
"aspire-py-starter",
TemplatingStrings.AspirePyStarter_Description,
projectName => $"./{projectName}",
_ => { },
ApplySingleFileTemplate
);
}

if (showAllTemplates)
Expand Down
9 changes: 8 additions & 1 deletion src/Aspire.ProjectTemplates/Aspire.ProjectTemplates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<EnableDefaultItems>false</EnableDefaultItems>
<Description>Aspire Template Pack for Microsoft Template Engine</Description>
<UsingToolTemplateLocalizer>true</UsingToolTemplateLocalizer>
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -36,10 +37,16 @@
<DestinationFile>$(IntermediateOutputPath)content\templates\aspire-apphost-singlefile\%(RecursiveDir)%(Filename)%(Extension)</DestinationFile>
</TemplateProjectFiles>

<!-- Template project files: apphost.cs (aspire-py-starter) -->
<TemplateProjectFiles Include="$(MSBuildThisFileDirectory)templates\aspire-py-starter\**\apphost.cs">
<PackagePath>content/templates/aspire-py-starter/%(RecursiveDir)</PackagePath>
<DestinationFile>$(IntermediateOutputPath)content\templates\aspire-py-starter\%(RecursiveDir)%(Filename)%(Extension)</DestinationFile>
</TemplateProjectFiles>

<TemplateProjectFilesObj Include="@(TemplateProjectFiles->'%(DestinationFile)')" />

<TemplateFiles Include="$(MSBuildThisFileDirectory)templates\**\*"
Exclude="$(MSBuildThisFileDirectory)templates\**\bin\**;$(MSBuildThisFileDirectory)templates\**\obj\**;$(MSBuildThisFileDirectory)templates\**\*.csproj">
Exclude="$(MSBuildThisFileDirectory)templates\**\bin\**;$(MSBuildThisFileDirectory)templates\**\obj\**;$(MSBuildThisFileDirectory)templates\**\*.csproj;$(MSBuildThisFileDirectory)templates\aspire-apphost-singlefile\**\apphost.cs;$(MSBuildThisFileDirectory)templates\aspire-py-starter\**\apphost.cs">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot - is this change correct? I think it should be reverted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the exclusions to prevent duplicate packaging errors. Without excluding apphost.cs files from TemplateFiles, the build fails with:

error NU5118: File 'content/templates/aspire-py-starter/13.0/apphost.cs' is not added because the package already contains file 'content/templates/aspire-py-starter/13.0/apphost.cs'

The same exclusion should likely apply to aspire-apphost-singlefile as well (which I also added). Should I remove both exclusions or is there a different approach you'd prefer?

<PackagePath>content/templates/%(RecursiveDir)</PackagePath>
</TemplateFiles>
<TemplateFilesObj Include="@(TemplateFiles->'$(IntermediateOutputPath)content\templates\%(RecursiveDir)%(Filename)%(Extension)')" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "http://json.schemastore.org/dotnetcli.host",
"symbolInfo": {
"NoHttps": {
"longName": "no-https",
"shortName": ""
}
},
"usageExamples": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/ide.host",
"unsupportedHosts": [
{
"id": "vs"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"author": "Microsoft",
"name": "Úvodní aplikace Aspire Python",
"description": "Šablona projektu pro vytvoření aplikace Aspire se službou API backendového jazyka Python a front-endem JavaScriptu pomocí Vite a React.",
"symbols/appHostHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostOtlpHttpPort/description": "Port number to use for the OTLP HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpPort/description": "Port number to use for the resource service HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json of the AppHost project. This option is only applicable when the parameter no-https is not used.",
"symbols/appHostOtlpHttpsPort/description": "Port number to use for the OTLP HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpsPort/description": "Port number to use for the resource service HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/NoHttps/description": "Whether to turn off HTTPS."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"author": "Microsoft",
"name": "Aspire Python Starter-App",
"description": "Eine Projektvorlage zum Erstellen einer Aspire-App mit einem Python-Backend-API-Dienst und einem JavaScript-Frontend mit Vite und React.",
"symbols/appHostHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostOtlpHttpPort/description": "Port number to use for the OTLP HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpPort/description": "Port number to use for the resource service HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json of the AppHost project. This option is only applicable when the parameter no-https is not used.",
"symbols/appHostOtlpHttpsPort/description": "Port number to use for the OTLP HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpsPort/description": "Port number to use for the resource service HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/NoHttps/description": "Whether to turn off HTTPS."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"author": "Microsoft",
"name": "Aspire Python Starter App",
"description": "A project template for creating an Aspire app with a Python backend API service and a JavaScript frontend using Vite and React.",
"symbols/appHostHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostOtlpHttpPort/description": "Port number to use for the OTLP HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpPort/description": "Port number to use for the resource service HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json of the AppHost project. This option is only applicable when the parameter no-https is not used.",
"symbols/appHostOtlpHttpsPort/description": "Port number to use for the OTLP HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpsPort/description": "Port number to use for the resource service HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/NoHttps/description": "Whether to turn off HTTPS."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"author": "Microsoft",
"name": "Aplicación de inicio de Python de Aspire",
"description": "Una plantilla de proyecto para crear una aplicación Aspire con un servicio API de backend de Python y un frontend de JavaScript usando Vite y React.",
"symbols/appHostHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostOtlpHttpPort/description": "Port number to use for the OTLP HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpPort/description": "Port number to use for the resource service HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json of the AppHost project. This option is only applicable when the parameter no-https is not used.",
"symbols/appHostOtlpHttpsPort/description": "Port number to use for the OTLP HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpsPort/description": "Port number to use for the resource service HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/NoHttps/description": "Whether to turn off HTTPS."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"author": "Microsoft",
"name": "Application de démarrage Python Aspire",
"description": "Modèle de projet pour créer une application Aspire avec un service API backend Python et un frontend JavaScript utilisant Vite et React.",
"symbols/appHostHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostOtlpHttpPort/description": "Port number to use for the OTLP HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpPort/description": "Port number to use for the resource service HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json of the AppHost project. This option is only applicable when the parameter no-https is not used.",
"symbols/appHostOtlpHttpsPort/description": "Port number to use for the OTLP HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpsPort/description": "Port number to use for the resource service HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/NoHttps/description": "Whether to turn off HTTPS."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"author": "Microsoft",
"name": "App Starter Python Aspire",
"description": "Modello di progetto per la creazione di un'app Aspire con un servizio API backend Python e un frontend JavaScript che utilizza Vite e React.",
"symbols/appHostHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostOtlpHttpPort/description": "Port number to use for the OTLP HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpPort/description": "Port number to use for the resource service HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json of the AppHost project. This option is only applicable when the parameter no-https is not used.",
"symbols/appHostOtlpHttpsPort/description": "Port number to use for the OTLP HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpsPort/description": "Port number to use for the resource service HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/NoHttps/description": "Whether to turn off HTTPS."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"author": "Microsoft",
"name": "Aspire Python スターター アプリ",
"description": "Python バックエンド API サービスと Vite および React を使用した JavaScript フロントエンドを含む Aspire アプリを作成するためのプロジェクト テンプレート。",
"symbols/appHostHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostOtlpHttpPort/description": "Port number to use for the OTLP HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpPort/description": "Port number to use for the resource service HTTP endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostHttpsPort/description": "Port number to use for the HTTPS endpoint in launchSettings.json of the AppHost project. This option is only applicable when the parameter no-https is not used.",
"symbols/appHostOtlpHttpsPort/description": "Port number to use for the OTLP HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/appHostResourceHttpsPort/description": "Port number to use for the resource service HTTPS endpoint in launchSettings.json of the AppHost project.",
"symbols/NoHttps/description": "Whether to turn off HTTPS."
}
Loading
Loading