6 instantiations of JavaScriptInstallCommandAnnotation
Aspire.Hosting.JavaScript (5)
JavaScriptHostingExtensions.cs (5)
2352.WithAnnotation(new JavaScriptInstallCommandAnnotation([installCommand, .. installArgs ?? []]) 2419.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs]) 2514.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs])); 2600.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs]) 2685.WithAnnotation(new JavaScriptInstallCommandAnnotation(["install", .. installArgs])
Aspire.Hosting.JavaScript.Tests (1)
AddNodeAppTests.cs (1)
178.WithAnnotation(new JavaScriptInstallCommandAnnotation(["myinstall"]))
64 references to JavaScriptInstallCommandAnnotation
Aspire.Hosting.JavaScript (20)
JavaScriptHostingExtensions.cs (20)
217if (resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)) 552if (resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)) 585JavaScriptInstallCommandAnnotation? prodInstallCommand = null; 588resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out prodInstallCommand) && 594var install = prodInstallCommand!; 925!dockerfileContext.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)) 1546private static void AddInstallCommand(this DockerfileStage builderStage, JavaScriptPackageManagerAnnotation packageManager, JavaScriptInstallCommandAnnotation installCommand) 1586/// <see cref="JavaScriptInstallCommandAnnotation.ProductionInstallArgs"/> is deliberately not quoted. Unlike the 1587/// entries in <see cref="JavaScriptInstallCommandAnnotation.Args"/>, which are individual tokens, it is documented 1591private static string BuildProductionInstallCommand(JavaScriptPackageManagerAnnotation packageManager, JavaScriptInstallCommandAnnotation installCommand) 1715if (c.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)) 1835var installAnnotation = c.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCmd) ? installCmd : null; 3047!resource.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand))
Aspire.Hosting.JavaScript.Tests (44)
AddBunAppTests.cs (3)
159Assert.False(bunResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out _)); 183Assert.True(bunResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation));
AddDenoAppTests.cs (3)
1268Assert.False(denoResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out _)); 1292Assert.True(denoResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation));
AddNodeAppTests.cs (3)
255Assert.False(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out _)); 284Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation));
PackageInstallationTests.cs (31)
100Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 134Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var _)); 168Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 203Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var _)); 231Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 303Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 333Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 361Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 465Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 477Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 492Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 498Assert.True(app2.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out installCommand)); 514Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 530Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 545Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand)); 560Assert.True(app.Resource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installCommand));
ResourceCreationTests.cs (4)
112Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var installAnnotation)); 178Assert.True(nodeResource.TryGetLastAnnotation<JavaScriptInstallCommandAnnotation>(out var _));