Skip to content

namespace fix #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 17, 2024
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using CommunityToolkit.Aspire.Hosting.Java;

var builder = DistributedApplication.CreateBuilder(args);

var apiapp = builder.AddProject<Projects.CommunityToolkit_Aspire_Java_ApiApp>("apiapp");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;

var builder = DistributedApplication.CreateBuilder(args);

builder.AddViteApp("vite-demo")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;

var builder = DistributedApplication.CreateBuilder(args);

var api = builder.AddProject<Projects.CommunityToolkit_Aspire_StaticWebApps_ApiApp>("api");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;
namespace Aspire.Hosting.ApplicationModel;

public class SwaApiEndpointAnnotation(IResourceBuilder<IResourceWithEndpoints> resource) : IResourceAnnotation
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;
namespace Aspire.Hosting.ApplicationModel;

public class SwaAppEndpointAnnotation(IResourceBuilder<IResourceWithEndpoints> resource) : IResourceAnnotation
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;
namespace Aspire.Hosting;

public static class SwaAppHostingExtension
{
Expand Down Expand Up @@ -71,9 +70,3 @@ public static IResourceBuilder<SwaResource> WithAppResource(this IResourceBuilde
public static IResourceBuilder<SwaResource> WithApiResource(this IResourceBuilder<SwaResource> builder, IResourceBuilder<IResourceWithEndpoints> apiResource) =>
builder.WithAnnotation<SwaApiEndpointAnnotation>(new(apiResource), ResourceAnnotationMutationBehavior.Replace);
}

public class SwaResourceOptions
{
public int Port { get; set; } = 4280;
public int DevServerTimeout { get; set; } = 60;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps;
namespace Aspire.Hosting.ApplicationModel;

public class SwaResource(string name, string workingDirectory) : ExecutableResource(name, "swa", workingDirectory)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Aspire.Hosting;

public class SwaResourceOptions
{
public int Port { get; set; } = 4280;
public int DevServerTimeout { get; set; } = 60;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// A resource that represents a Java application.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// This represents the options entity for configuring a Java application running in a container.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// A resource that represents a Java application.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// This represents the options entity for configuring an executable Java application.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System.Globalization;

using CommunityToolkit.Aspire.Hosting.Java.Utils;
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;

namespace CommunityToolkit.Aspire.Hosting.Java;
namespace Aspire.Hosting;

/// <summary>
/// Provides extension methods for adding Java applications to an <see cref="IDistributedApplicationBuilder"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.Lifecycle;
using Aspire.Hosting.Utils;
using CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;
using Microsoft.Extensions.Hosting;

namespace CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;
namespace Aspire.Hosting;

public static class NodeJSHostingExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@

namespace CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;


/// <summary>
/// Represents a Node package installer.
/// </summary>
/// <param name="packageManager">The package manager to use.</param>
/// <param name="loggerService">The logger service to use.</param>
/// <param name="notificationService">The notification service to use.</param>
class NodePackageInstaller(string packageManager, ResourceLoggerService loggerService, ResourceNotificationService notificationService)
internal class NodePackageInstaller(string packageManager, ResourceLoggerService loggerService, ResourceNotificationService notificationService)
{
/// <summary>
/// Finds the Node.js resources using the specified package manager and installs the packages.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace CommunityToolkit.Aspire.Hosting.NodeJS.Extensions;
namespace Aspire.Hosting.Utils;

// Copied from https://github.com/dotnet/aspire/blob/50ca9fa670af5c70782dc75d2961956b06f1a403/src/Shared/PathNormalizer.cs
internal static class PathNormalizer
Expand Down