From 7e249e12c43e8ab14c75ae3c0c739503bee62988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donn=C3=A9=20Napo?= Date: Mon, 22 Apr 2024 09:56:39 +0200 Subject: [PATCH] Renamed MicroForge to MycroForge --- .dockerignore | 68 +++++++------- Dockerfile | 64 ++++++------- MicroForge.CLI/Commands/MicroForge.cs | 17 ---- .../Extensions/ServiceCollectionExtensions.cs | 46 ---------- MicroForge.CLI/scripts/publish.sh | 5 -- .../ArgsContext.cs | 2 +- {MicroForge.CLI => MycroForge.CLI}/Bash.cs | 4 +- .../CodeGen/OrmEnvInitializer.cs | 4 +- .../CodeGen/OrmEnvUpdater.cs | 4 +- .../CodeGen/PythonSourceModifier.cs | 4 +- .../Commands/Interfaces/ISubCommandOf.cs | 2 +- .../Commands/MycroForge.Add.Api.cs | 8 +- .../Commands/MycroForge.Add.Orm.cs | 8 +- .../Commands/MycroForge.Add.cs | 10 +-- .../Commands/MycroForge.Generate.Entity.cs | 8 +- .../Commands/MycroForge.Generate.Migration.cs | 6 +- .../Commands/MycroForge.Generate.Router.cs | 6 +- .../Commands/MycroForge.Generate.cs | 8 +- .../Commands/MycroForge.Init.cs | 10 +-- .../Commands/MycroForge.Install.cs | 8 +- .../Commands/MycroForge.Migrations.Apply.cs | 6 +- .../MycroForge.Migrations.Rollback.cs | 6 +- .../Commands/MycroForge.Migrations.cs | 8 +- .../Commands/MycroForge.Rewrite.cs | 8 +- .../Commands/MycroForge.Uninstall.cs | 8 +- MycroForge.CLI/Commands/MycroForge.cs | 17 ++++ .../Exceptions/BashException.cs | 2 +- .../Extensions/ObjectStreamExtensions.cs | 2 +- .../Extensions/ServiceCollectionExtensions.cs | 46 ++++++++++ .../Features/Api.cs | 2 +- .../Features/IFeature.cs | 2 +- .../Features/Orm.cs | 4 +- .../MycroForge.CLI.csproj | 6 +- {MicroForge.CLI => MycroForge.CLI}/Program.cs | 11 ++- .../ProjectConfig.cs | 2 +- .../ProjectContext.cs | 4 +- {MicroForge.CLI => MycroForge.CLI}/Shared.cs | 2 +- .../scripts/env.py | 0 MycroForge.CLI/scripts/publish.sh | 5 ++ .../MycroForge.Parsing.csproj | 0 .../PythonLexer.g4 | 0 .../PythonLexerBase.cs | 2 +- .../PythonParser.g4 | 0 .../PythonParserBase.cs | 2 +- MicroForge.sln => MycroForge.sln | 4 +- README.Docker.md | 90 +++++++++---------- 46 files changed, 265 insertions(+), 266 deletions(-) delete mode 100644 MicroForge.CLI/Commands/MicroForge.cs delete mode 100644 MicroForge.CLI/Extensions/ServiceCollectionExtensions.cs delete mode 100644 MicroForge.CLI/scripts/publish.sh rename {MicroForge.CLI => MycroForge.CLI}/ArgsContext.cs (66%) rename {MicroForge.CLI => MycroForge.CLI}/Bash.cs (94%) rename {MicroForge.CLI => MycroForge.CLI}/CodeGen/OrmEnvInitializer.cs (92%) rename {MicroForge.CLI => MycroForge.CLI}/CodeGen/OrmEnvUpdater.cs (88%) rename {MicroForge.CLI => MycroForge.CLI}/CodeGen/PythonSourceModifier.cs (92%) rename {MicroForge.CLI => MycroForge.CLI}/Commands/Interfaces/ISubCommandOf.cs (62%) rename MicroForge.CLI/Commands/MicroForge.Add.Api.cs => MycroForge.CLI/Commands/MycroForge.Add.Api.cs (75%) rename MicroForge.CLI/Commands/MicroForge.Add.Orm.cs => MycroForge.CLI/Commands/MycroForge.Add.Orm.cs (77%) rename MicroForge.CLI/Commands/MicroForge.Add.cs => MycroForge.CLI/Commands/MycroForge.Add.cs (71%) rename MicroForge.CLI/Commands/MicroForge.Generate.Entity.cs => MycroForge.CLI/Commands/MycroForge.Generate.Entity.cs (90%) rename MicroForge.CLI/Commands/MicroForge.Generate.Migration.cs => MycroForge.CLI/Commands/MycroForge.Generate.Migration.cs (85%) rename MicroForge.CLI/Commands/MicroForge.Generate.Router.cs => MycroForge.CLI/Commands/MycroForge.Generate.Router.cs (91%) rename MicroForge.CLI/Commands/MicroForge.Generate.cs => MycroForge.CLI/Commands/MycroForge.Generate.cs (64%) rename MicroForge.CLI/Commands/MicroForge.Init.cs => MycroForge.CLI/Commands/MycroForge.Init.cs (95%) rename MicroForge.CLI/Commands/MicroForge.Install.cs => MycroForge.CLI/Commands/MycroForge.Install.cs (79%) rename MicroForge.CLI/Commands/MicroForge.Migrations.Apply.cs => MycroForge.CLI/Commands/MycroForge.Migrations.Apply.cs (81%) rename MicroForge.CLI/Commands/MicroForge.Migrations.Rollback.cs => MycroForge.CLI/Commands/MycroForge.Migrations.Rollback.cs (81%) rename MicroForge.CLI/Commands/MicroForge.Migrations.cs => MycroForge.CLI/Commands/MycroForge.Migrations.cs (64%) rename MicroForge.CLI/Commands/MicroForge.Rewrite.cs => MycroForge.CLI/Commands/MycroForge.Rewrite.cs (74%) rename MicroForge.CLI/Commands/MicroForge.Uninstall.cs => MycroForge.CLI/Commands/MycroForge.Uninstall.cs (79%) create mode 100644 MycroForge.CLI/Commands/MycroForge.cs rename {MicroForge.CLI => MycroForge.CLI}/Exceptions/BashException.cs (81%) rename {MicroForge.CLI => MycroForge.CLI}/Extensions/ObjectStreamExtensions.cs (91%) create mode 100644 MycroForge.CLI/Extensions/ServiceCollectionExtensions.cs rename {MicroForge.CLI => MycroForge.CLI}/Features/Api.cs (94%) rename {MicroForge.CLI => MycroForge.CLI}/Features/IFeature.cs (71%) rename {MicroForge.CLI => MycroForge.CLI}/Features/Orm.cs (94%) rename MicroForge.CLI/MicroForge.CLI.csproj => MycroForge.CLI/MycroForge.CLI.csproj (84%) rename {MicroForge.CLI => MycroForge.CLI}/Program.cs (68%) rename {MicroForge.CLI => MycroForge.CLI}/ProjectConfig.cs (80%) rename {MicroForge.CLI => MycroForge.CLI}/ProjectContext.cs (94%) rename {MicroForge.CLI => MycroForge.CLI}/Shared.cs (91%) rename {MicroForge.CLI => MycroForge.CLI}/scripts/env.py (100%) create mode 100644 MycroForge.CLI/scripts/publish.sh rename MicroForge.Parsing/MicroForge.Parsing.csproj => MycroForge.Parsing/MycroForge.Parsing.csproj (100%) rename {MicroForge.Parsing => MycroForge.Parsing}/PythonLexer.g4 (100%) rename {MicroForge.Parsing => MycroForge.Parsing}/PythonLexerBase.cs (97%) rename {MicroForge.Parsing => MycroForge.Parsing}/PythonParser.g4 (100%) rename {MicroForge.Parsing => MycroForge.Parsing}/PythonParserBase.cs (91%) rename MicroForge.sln => MycroForge.sln (78%) diff --git a/.dockerignore b/.dockerignore index caa6b3c..d2ac015 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,34 +1,34 @@ -# Include any files or directories that you don't want to be copied to your -# container here (e.g., local build artifacts, temporary files, etc.). -# -# For more help, visit the .dockerignore file reference guide at -# https://docs.docker.com/go/build-context-dockerignore/ - -**/.DS_Store -**/.classpath -**/.dockerignore -**/.env -**/.git -**/.gitignore -**/.project -**/.settings -**/.toolstarget -**/.vs -**/.vscode -**/*.*proj.user -**/*.dbmdl -**/*.jfm -**/bin -**/charts -**/docker-compose* -**/compose* -**/Dockerfile* -**/node_modules -**/npm-debug.log -**/obj -**/secrets.dev.yaml -**/values.dev.yaml -LICENSE -README.md - -**/venv +# Include any files or directories that you don't want to be copied to your +# container here (e.g., local build artifacts, temporary files, etc.). +# +# For more help, visit the .dockerignore file reference guide at +# https://docs.docker.com/go/build-context-dockerignore/ + +**/.DS_Store +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/bin +**/charts +**/docker-compose* +**/compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md + +**/venv diff --git a/Dockerfile b/Dockerfile index 9182945..795e802 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,32 +1,32 @@ -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build -COPY . /source -WORKDIR /source/MicroForge.CLI -ARG TARGETARCH -# Leverage a cache mount to /root/.nuget/packages so that subsequent builds don't have to re-download packages. -# If TARGETARCH is "amd64", replace it with "x64" - "x64" is .NET's canonical name for this and "amd64" doesn't -# work in .NET 6.0. -RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \ - dotnet publish -a ${TARGETARCH/amd64/x64} --use-current-runtime --self-contained false -o /app - -FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS final -RUN apt update -y && \ - apt upgrade -y && \ - apt install -y git && \ - apt install -y bash && \ - apt install -y python3 && \ - apt install -y python3-pip && \ - apt install -y python3-venv - -# The Docker approach doesn't work for now, because the venv setup depends on absolute paths. -# This means that the would need to recreate the full path to the actual working directory in the Docker container, -# which should be pretty doable, but it's a concern for later. - -ENV PYTHONUNBUFFERED=1 -WORKDIR /app -COPY --from=build /app . - -WORKDIR /project -COPY MicroForge.CLI/scripts /scripts -USER root - -ENTRYPOINT ["dotnet", "/app/MicroForge.CLI.dll"] CMD ["-?"] +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build +COPY . /source +WORKDIR /source/MycroForge.CLI +ARG TARGETARCH +# Leverage a cache mount to /root/.nuget/packages so that subsequent builds don't have to re-download packages. +# If TARGETARCH is "amd64", replace it with "x64" - "x64" is .NET's canonical name for this and "amd64" doesn't +# work in .NET 6.0. +RUN --mount=type=cache,id=nuget,target=/root/.nuget/packages \ + dotnet publish -a ${TARGETARCH/amd64/x64} --use-current-runtime --self-contained false -o /app + +FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS final +RUN apt update -y && \ + apt upgrade -y && \ + apt install -y git && \ + apt install -y bash && \ + apt install -y python3 && \ + apt install -y python3-pip && \ + apt install -y python3-venv + +# The Docker approach doesn't work for now, because the venv setup depends on absolute paths. +# This means that the would need to recreate the full path to the actual working directory in the Docker container, +# which should be pretty doable, but it's a concern for later. + +ENV PYTHONUNBUFFERED=1 +WORKDIR /app +COPY --from=build /app . + +WORKDIR /project +COPY MycroForge.CLI/scripts /scripts +USER root + +ENTRYPOINT ["dotnet", "/app/MycroForge.CLI.dll"] CMD ["-?"] diff --git a/MicroForge.CLI/Commands/MicroForge.cs b/MicroForge.CLI/Commands/MicroForge.cs deleted file mode 100644 index aec2623..0000000 --- a/MicroForge.CLI/Commands/MicroForge.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; - -namespace MicroForge.CLI.Commands; - -public partial class MicroForge : RootCommand -{ - public override string Name => "m4g"; - - public MicroForge(IEnumerable> commands) : base("The MicroForge CLI tool.") - { - commands - .Cast() - .ToList() - .ForEach(AddCommand); - } -} \ No newline at end of file diff --git a/MicroForge.CLI/Extensions/ServiceCollectionExtensions.cs b/MicroForge.CLI/Extensions/ServiceCollectionExtensions.cs deleted file mode 100644 index d81ab04..0000000 --- a/MicroForge.CLI/Extensions/ServiceCollectionExtensions.cs +++ /dev/null @@ -1,46 +0,0 @@ -using MicroForge.CLI.Commands.Interfaces; -using MicroForge.CLI.Features; -using Microsoft.Extensions.DependencyInjection; - -namespace MicroForge.CLI.Extensions; - -public static class ServiceCollectionExtensions -{ - public static IServiceCollection AddServices(this IServiceCollection services, string[] args) - { - services.AddScoped(_ => new ArgsContext { Args = args }); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - return services; - } - - public static IServiceCollection AddCommands(this IServiceCollection services) - { - // Register "m4g" - services.AddScoped(); - services.AddScoped, Commands.MicroForge.Init>(); - services.AddScoped, Commands.MicroForge.Run>(); - services.AddScoped, Commands.MicroForge.Install>(); - services.AddScoped, Commands.MicroForge.Uninstall>(); - - // Register "m4g add" - services.AddScoped, Commands.MicroForge.Add>(); - services.AddScoped, Commands.MicroForge.Add.Api>(); - services.AddScoped, Commands.MicroForge.Add.Orm>(); - - // Register "m4g generate" - services.AddScoped, Commands.MicroForge.Generate>(); - services.AddScoped, Commands.MicroForge.Generate.Entity>(); - services.AddScoped, Commands.MicroForge.Generate.Router>(); - services.AddScoped, Commands.MicroForge.Generate.Migration>(); - - // Register "m4g migrations" - services.AddScoped, Commands.MicroForge.Migrations>(); - services.AddScoped, Commands.MicroForge.Migrations.Apply>(); - services.AddScoped, Commands.MicroForge.Migrations.Rollback>(); - - return services; - } -} \ No newline at end of file diff --git a/MicroForge.CLI/scripts/publish.sh b/MicroForge.CLI/scripts/publish.sh deleted file mode 100644 index beafa66..0000000 --- a/MicroForge.CLI/scripts/publish.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/bash - -dotnet pack -v d - -dotnet tool update --global --add-source ./nupkg MicroForge.CLI -v d \ No newline at end of file diff --git a/MicroForge.CLI/ArgsContext.cs b/MycroForge.CLI/ArgsContext.cs similarity index 66% rename from MicroForge.CLI/ArgsContext.cs rename to MycroForge.CLI/ArgsContext.cs index 8737110..6680650 100644 --- a/MicroForge.CLI/ArgsContext.cs +++ b/MycroForge.CLI/ArgsContext.cs @@ -1,4 +1,4 @@ -namespace MicroForge.CLI; +namespace MycroForge.CLI; public class ArgsContext { diff --git a/MicroForge.CLI/Bash.cs b/MycroForge.CLI/Bash.cs similarity index 94% rename from MicroForge.CLI/Bash.cs rename to MycroForge.CLI/Bash.cs index cccb155..380fd8f 100644 --- a/MicroForge.CLI/Bash.cs +++ b/MycroForge.CLI/Bash.cs @@ -1,8 +1,8 @@ using System.Diagnostics; using System.Text; -using MicroForge.CLI.Exceptions; +using MycroForge.CLI.Exceptions; -namespace MicroForge.CLI; +namespace MycroForge.CLI; public static class Bash { diff --git a/MicroForge.CLI/CodeGen/OrmEnvInitializer.cs b/MycroForge.CLI/CodeGen/OrmEnvInitializer.cs similarity index 92% rename from MicroForge.CLI/CodeGen/OrmEnvInitializer.cs rename to MycroForge.CLI/CodeGen/OrmEnvInitializer.cs index 021b75b..3063a3e 100644 --- a/MicroForge.CLI/CodeGen/OrmEnvInitializer.cs +++ b/MycroForge.CLI/CodeGen/OrmEnvInitializer.cs @@ -1,6 +1,6 @@ -using MicroForge.Parsing; +using MycroForge.Parsing; -namespace MicroForge.CLI.CodeGen; +namespace MycroForge.CLI.CodeGen; public class OrmEnvInitializer : PythonSourceModifier { diff --git a/MicroForge.CLI/CodeGen/OrmEnvUpdater.cs b/MycroForge.CLI/CodeGen/OrmEnvUpdater.cs similarity index 88% rename from MicroForge.CLI/CodeGen/OrmEnvUpdater.cs rename to MycroForge.CLI/CodeGen/OrmEnvUpdater.cs index b889819..68877b2 100644 --- a/MicroForge.CLI/CodeGen/OrmEnvUpdater.cs +++ b/MycroForge.CLI/CodeGen/OrmEnvUpdater.cs @@ -1,6 +1,6 @@ -using MicroForge.Parsing; +using MycroForge.Parsing; -namespace MicroForge.CLI.CodeGen; +namespace MycroForge.CLI.CodeGen; public class OrmEnvUpdater : PythonSourceModifier { diff --git a/MicroForge.CLI/CodeGen/PythonSourceModifier.cs b/MycroForge.CLI/CodeGen/PythonSourceModifier.cs similarity index 92% rename from MicroForge.CLI/CodeGen/PythonSourceModifier.cs rename to MycroForge.CLI/CodeGen/PythonSourceModifier.cs index 7368897..c469222 100644 --- a/MicroForge.CLI/CodeGen/PythonSourceModifier.cs +++ b/MycroForge.CLI/CodeGen/PythonSourceModifier.cs @@ -1,7 +1,7 @@ using Antlr4.Runtime; -using MicroForge.Parsing; +using MycroForge.Parsing; -namespace MicroForge.CLI.CodeGen; +namespace MycroForge.CLI.CodeGen; public abstract class PythonSourceModifier : PythonParserBaseVisitor { diff --git a/MicroForge.CLI/Commands/Interfaces/ISubCommandOf.cs b/MycroForge.CLI/Commands/Interfaces/ISubCommandOf.cs similarity index 62% rename from MicroForge.CLI/Commands/Interfaces/ISubCommandOf.cs rename to MycroForge.CLI/Commands/Interfaces/ISubCommandOf.cs index 7107eae..75ec6b4 100644 --- a/MicroForge.CLI/Commands/Interfaces/ISubCommandOf.cs +++ b/MycroForge.CLI/Commands/Interfaces/ISubCommandOf.cs @@ -1,6 +1,6 @@ using System.CommandLine; -namespace MicroForge.CLI.Commands.Interfaces; +namespace MycroForge.CLI.Commands.Interfaces; public interface ISubCommandOf where T : Command { diff --git a/MicroForge.CLI/Commands/MicroForge.Add.Api.cs b/MycroForge.CLI/Commands/MycroForge.Add.Api.cs similarity index 75% rename from MicroForge.CLI/Commands/MicroForge.Add.Api.cs rename to MycroForge.CLI/Commands/MycroForge.Add.Api.cs index 810c38c..3c69f2f 100644 --- a/MicroForge.CLI/Commands/MicroForge.Add.Api.cs +++ b/MycroForge.CLI/Commands/MycroForge.Add.Api.cs @@ -1,10 +1,10 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; -using MicroForge.CLI.Features; +using MycroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Features; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { public partial class Add { diff --git a/MicroForge.CLI/Commands/MicroForge.Add.Orm.cs b/MycroForge.CLI/Commands/MycroForge.Add.Orm.cs similarity index 77% rename from MicroForge.CLI/Commands/MicroForge.Add.Orm.cs rename to MycroForge.CLI/Commands/MycroForge.Add.Orm.cs index 47731e6..9847862 100644 --- a/MicroForge.CLI/Commands/MicroForge.Add.Orm.cs +++ b/MycroForge.CLI/Commands/MycroForge.Add.Orm.cs @@ -1,10 +1,10 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; -using MicroForge.CLI.Features; +using MycroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Features; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { public partial class Add { diff --git a/MicroForge.CLI/Commands/MicroForge.Add.cs b/MycroForge.CLI/Commands/MycroForge.Add.cs similarity index 71% rename from MicroForge.CLI/Commands/MicroForge.Add.cs rename to MycroForge.CLI/Commands/MycroForge.Add.cs index d9d1d08..50132ba 100644 --- a/MicroForge.CLI/Commands/MicroForge.Add.cs +++ b/MycroForge.CLI/Commands/MycroForge.Add.cs @@ -1,11 +1,11 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { - public new partial class Add : Command, ISubCommandOf + public new partial class Add : Command, ISubCommandOf { public Add(IEnumerable> subCommands) : base("add", "Add a predefined feature to your project") @@ -15,7 +15,7 @@ public partial class MicroForge } } - public class Run : Command, ISubCommandOf + public class Run : Command, ISubCommandOf { public Run() : base("run", "Run your app") { diff --git a/MicroForge.CLI/Commands/MicroForge.Generate.Entity.cs b/MycroForge.CLI/Commands/MycroForge.Generate.Entity.cs similarity index 90% rename from MicroForge.CLI/Commands/MicroForge.Generate.Entity.cs rename to MycroForge.CLI/Commands/MycroForge.Generate.Entity.cs index 6592749..1bfcda1 100644 --- a/MicroForge.CLI/Commands/MicroForge.Generate.Entity.cs +++ b/MycroForge.CLI/Commands/MycroForge.Generate.Entity.cs @@ -1,11 +1,11 @@ using System.CommandLine; using Humanizer; -using MicroForge.CLI.CodeGen; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.CodeGen; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { public partial class Generate { diff --git a/MicroForge.CLI/Commands/MicroForge.Generate.Migration.cs b/MycroForge.CLI/Commands/MycroForge.Generate.Migration.cs similarity index 85% rename from MicroForge.CLI/Commands/MicroForge.Generate.Migration.cs rename to MycroForge.CLI/Commands/MycroForge.Generate.Migration.cs index da44591..7110122 100644 --- a/MicroForge.CLI/Commands/MicroForge.Generate.Migration.cs +++ b/MycroForge.CLI/Commands/MycroForge.Generate.Migration.cs @@ -1,9 +1,9 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { public partial class Generate { diff --git a/MicroForge.CLI/Commands/MicroForge.Generate.Router.cs b/MycroForge.CLI/Commands/MycroForge.Generate.Router.cs similarity index 91% rename from MicroForge.CLI/Commands/MicroForge.Generate.Router.cs rename to MycroForge.CLI/Commands/MycroForge.Generate.Router.cs index 389c4cb..f2eee2d 100644 --- a/MicroForge.CLI/Commands/MicroForge.Generate.Router.cs +++ b/MycroForge.CLI/Commands/MycroForge.Generate.Router.cs @@ -1,10 +1,10 @@ using System.CommandLine; using Humanizer; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { public partial class Generate { diff --git a/MicroForge.CLI/Commands/MicroForge.Generate.cs b/MycroForge.CLI/Commands/MycroForge.Generate.cs similarity index 64% rename from MicroForge.CLI/Commands/MicroForge.Generate.cs rename to MycroForge.CLI/Commands/MycroForge.Generate.cs index 1235a15..72d226b 100644 --- a/MicroForge.CLI/Commands/MicroForge.Generate.cs +++ b/MycroForge.CLI/Commands/MycroForge.Generate.cs @@ -1,11 +1,11 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { - public partial class Generate : Command, ISubCommandOf + public partial class Generate : Command, ISubCommandOf { public Generate(IEnumerable> subCommands) : base("generate", "Generate a project item") diff --git a/MicroForge.CLI/Commands/MicroForge.Init.cs b/MycroForge.CLI/Commands/MycroForge.Init.cs similarity index 95% rename from MicroForge.CLI/Commands/MicroForge.Init.cs rename to MycroForge.CLI/Commands/MycroForge.Init.cs index cf3a291..ac878fa 100644 --- a/MicroForge.CLI/Commands/MicroForge.Init.cs +++ b/MycroForge.CLI/Commands/MycroForge.Init.cs @@ -1,13 +1,13 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; -using MicroForge.CLI.Features; using Microsoft.Extensions.DependencyInjection; +using MycroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Features; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { - public class Init : Command, ISubCommandOf + public class Init : Command, ISubCommandOf { #region GitIgnore diff --git a/MicroForge.CLI/Commands/MicroForge.Install.cs b/MycroForge.CLI/Commands/MycroForge.Install.cs similarity index 79% rename from MicroForge.CLI/Commands/MicroForge.Install.cs rename to MycroForge.CLI/Commands/MycroForge.Install.cs index 74f3de1..f63976e 100644 --- a/MicroForge.CLI/Commands/MicroForge.Install.cs +++ b/MycroForge.CLI/Commands/MycroForge.Install.cs @@ -1,11 +1,11 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { - public class Install : Command, ISubCommandOf + public class Install : Command, ISubCommandOf { private static readonly Argument> PackagesArgument = new(name: "packages", description: "The names of the packages to install"); diff --git a/MicroForge.CLI/Commands/MicroForge.Migrations.Apply.cs b/MycroForge.CLI/Commands/MycroForge.Migrations.Apply.cs similarity index 81% rename from MicroForge.CLI/Commands/MicroForge.Migrations.Apply.cs rename to MycroForge.CLI/Commands/MycroForge.Migrations.Apply.cs index 7114fa5..6be1337 100644 --- a/MicroForge.CLI/Commands/MicroForge.Migrations.Apply.cs +++ b/MycroForge.CLI/Commands/MycroForge.Migrations.Apply.cs @@ -1,9 +1,9 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { public partial class Migrations { diff --git a/MicroForge.CLI/Commands/MicroForge.Migrations.Rollback.cs b/MycroForge.CLI/Commands/MycroForge.Migrations.Rollback.cs similarity index 81% rename from MicroForge.CLI/Commands/MicroForge.Migrations.Rollback.cs rename to MycroForge.CLI/Commands/MycroForge.Migrations.Rollback.cs index a8b8267..bcaebaa 100644 --- a/MicroForge.CLI/Commands/MicroForge.Migrations.Rollback.cs +++ b/MycroForge.CLI/Commands/MycroForge.Migrations.Rollback.cs @@ -1,9 +1,9 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { public partial class Migrations { diff --git a/MicroForge.CLI/Commands/MicroForge.Migrations.cs b/MycroForge.CLI/Commands/MycroForge.Migrations.cs similarity index 64% rename from MicroForge.CLI/Commands/MicroForge.Migrations.cs rename to MycroForge.CLI/Commands/MycroForge.Migrations.cs index c2ff26a..a80f474 100644 --- a/MicroForge.CLI/Commands/MicroForge.Migrations.cs +++ b/MycroForge.CLI/Commands/MycroForge.Migrations.cs @@ -1,11 +1,11 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { - public partial class Migrations : Command, ISubCommandOf + public partial class Migrations : Command, ISubCommandOf { public Migrations(IEnumerable> subCommands) : base("migrations", "Manage your migrations") diff --git a/MicroForge.CLI/Commands/MicroForge.Rewrite.cs b/MycroForge.CLI/Commands/MycroForge.Rewrite.cs similarity index 74% rename from MicroForge.CLI/Commands/MicroForge.Rewrite.cs rename to MycroForge.CLI/Commands/MycroForge.Rewrite.cs index 96e9574..4b48362 100644 --- a/MicroForge.CLI/Commands/MicroForge.Rewrite.cs +++ b/MycroForge.CLI/Commands/MycroForge.Rewrite.cs @@ -1,11 +1,11 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { - public class Rewrite : Command, ISubCommandOf + public class Rewrite : Command, ISubCommandOf { public Rewrite() : base("rewrite", "Test a python source rewriter.") { diff --git a/MicroForge.CLI/Commands/MicroForge.Uninstall.cs b/MycroForge.CLI/Commands/MycroForge.Uninstall.cs similarity index 79% rename from MicroForge.CLI/Commands/MicroForge.Uninstall.cs rename to MycroForge.CLI/Commands/MycroForge.Uninstall.cs index 488a664..2d159f1 100644 --- a/MicroForge.CLI/Commands/MicroForge.Uninstall.cs +++ b/MycroForge.CLI/Commands/MycroForge.Uninstall.cs @@ -1,11 +1,11 @@ using System.CommandLine; -using MicroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Commands.Interfaces; -namespace MicroForge.CLI.Commands; +namespace MycroForge.CLI.Commands; -public partial class MicroForge +public partial class MycroForge { - public class Uninstall : Command, ISubCommandOf + public class Uninstall : Command, ISubCommandOf { private static readonly Argument> PackagesArgument = new(name: "packages", description: "The names of the packages to uninstall"); diff --git a/MycroForge.CLI/Commands/MycroForge.cs b/MycroForge.CLI/Commands/MycroForge.cs new file mode 100644 index 0000000..0b3f6d1 --- /dev/null +++ b/MycroForge.CLI/Commands/MycroForge.cs @@ -0,0 +1,17 @@ +using System.CommandLine; +using MycroForge.CLI.Commands.Interfaces; + +namespace MycroForge.CLI.Commands; + +public partial class MycroForge : RootCommand +{ + public override string Name => "m4g"; + + public MycroForge(IEnumerable> commands) : base("The MycroForge CLI tool.") + { + commands + .Cast() + .ToList() + .ForEach(AddCommand); + } +} \ No newline at end of file diff --git a/MicroForge.CLI/Exceptions/BashException.cs b/MycroForge.CLI/Exceptions/BashException.cs similarity index 81% rename from MicroForge.CLI/Exceptions/BashException.cs rename to MycroForge.CLI/Exceptions/BashException.cs index 0e3fb76..ae92c03 100644 --- a/MicroForge.CLI/Exceptions/BashException.cs +++ b/MycroForge.CLI/Exceptions/BashException.cs @@ -1,4 +1,4 @@ -namespace MicroForge.CLI.Exceptions; +namespace MycroForge.CLI.Exceptions; public class BashException : Exception { diff --git a/MicroForge.CLI/Extensions/ObjectStreamExtensions.cs b/MycroForge.CLI/Extensions/ObjectStreamExtensions.cs similarity index 91% rename from MicroForge.CLI/Extensions/ObjectStreamExtensions.cs rename to MycroForge.CLI/Extensions/ObjectStreamExtensions.cs index 72b6467..305a9fb 100644 --- a/MicroForge.CLI/Extensions/ObjectStreamExtensions.cs +++ b/MycroForge.CLI/Extensions/ObjectStreamExtensions.cs @@ -1,6 +1,6 @@ using System.Text.Json; -namespace MicroForge.CLI.Extensions; +namespace MycroForge.CLI.Extensions; public static class ObjectStreamExtensions { diff --git a/MycroForge.CLI/Extensions/ServiceCollectionExtensions.cs b/MycroForge.CLI/Extensions/ServiceCollectionExtensions.cs new file mode 100644 index 0000000..75a6f6c --- /dev/null +++ b/MycroForge.CLI/Extensions/ServiceCollectionExtensions.cs @@ -0,0 +1,46 @@ +using Microsoft.Extensions.DependencyInjection; +using MycroForge.CLI.Commands.Interfaces; +using MycroForge.CLI.Features; + +namespace MycroForge.CLI.Extensions; + +public static class ServiceCollectionExtensions +{ + public static IServiceCollection AddServices(this IServiceCollection services, string[] args) + { + services.AddScoped(_ => new ArgsContext { Args = args }); + services.AddScoped(); + services.AddScoped(); + services.AddScoped(); + + return services; + } + + public static IServiceCollection AddCommands(this IServiceCollection services) + { + // Register "m4g" + services.AddScoped(); + services.AddScoped, Commands.MycroForge.Init>(); + services.AddScoped, Commands.MycroForge.Run>(); + services.AddScoped, Commands.MycroForge.Install>(); + services.AddScoped, Commands.MycroForge.Uninstall>(); + + // Register "m4g add" + services.AddScoped, Commands.MycroForge.Add>(); + services.AddScoped, Commands.MycroForge.Add.Api>(); + services.AddScoped, Commands.MycroForge.Add.Orm>(); + + // Register "m4g generate" + services.AddScoped, Commands.MycroForge.Generate>(); + services.AddScoped, Commands.MycroForge.Generate.Entity>(); + services.AddScoped, Commands.MycroForge.Generate.Router>(); + services.AddScoped, Commands.MycroForge.Generate.Migration>(); + + // Register "m4g migrations" + services.AddScoped, Commands.MycroForge.Migrations>(); + services.AddScoped, Commands.MycroForge.Migrations.Apply>(); + services.AddScoped, Commands.MycroForge.Migrations.Rollback>(); + + return services; + } +} \ No newline at end of file diff --git a/MicroForge.CLI/Features/Api.cs b/MycroForge.CLI/Features/Api.cs similarity index 94% rename from MicroForge.CLI/Features/Api.cs rename to MycroForge.CLI/Features/Api.cs index ddf009f..898f0be 100644 --- a/MicroForge.CLI/Features/Api.cs +++ b/MycroForge.CLI/Features/Api.cs @@ -1,4 +1,4 @@ -namespace MicroForge.CLI.Features; +namespace MycroForge.CLI.Features; public sealed class Api : IFeature { diff --git a/MicroForge.CLI/Features/IFeature.cs b/MycroForge.CLI/Features/IFeature.cs similarity index 71% rename from MicroForge.CLI/Features/IFeature.cs rename to MycroForge.CLI/Features/IFeature.cs index 962d9af..cd126e8 100644 --- a/MicroForge.CLI/Features/IFeature.cs +++ b/MycroForge.CLI/Features/IFeature.cs @@ -1,4 +1,4 @@ -namespace MicroForge.CLI.Features; +namespace MycroForge.CLI.Features; public interface IFeature diff --git a/MicroForge.CLI/Features/Orm.cs b/MycroForge.CLI/Features/Orm.cs similarity index 94% rename from MicroForge.CLI/Features/Orm.cs rename to MycroForge.CLI/Features/Orm.cs index 8956465..8422a2c 100644 --- a/MicroForge.CLI/Features/Orm.cs +++ b/MycroForge.CLI/Features/Orm.cs @@ -1,6 +1,6 @@ -using MicroForge.CLI.CodeGen; +using MycroForge.CLI.CodeGen; -namespace MicroForge.CLI.Features; +namespace MycroForge.CLI.Features; public sealed class Orm : IFeature { diff --git a/MicroForge.CLI/MicroForge.CLI.csproj b/MycroForge.CLI/MycroForge.CLI.csproj similarity index 84% rename from MicroForge.CLI/MicroForge.CLI.csproj rename to MycroForge.CLI/MycroForge.CLI.csproj index fe2a5dd..4c2bd4d 100644 --- a/MicroForge.CLI/MicroForge.CLI.csproj +++ b/MycroForge.CLI/MycroForge.CLI.csproj @@ -11,7 +11,7 @@ - + @@ -30,8 +30,8 @@ - - bin\Debug\net8.0\MicroForge.Parsing.dll + + bin\Debug\net8.0\MycroForge.Parsing.dll diff --git a/MicroForge.CLI/Program.cs b/MycroForge.CLI/Program.cs similarity index 68% rename from MicroForge.CLI/Program.cs rename to MycroForge.CLI/Program.cs index 98ea55f..c84234f 100644 --- a/MicroForge.CLI/Program.cs +++ b/MycroForge.CLI/Program.cs @@ -1,11 +1,10 @@ using System.CommandLine; -using MicroForge.CLI; -using MicroForge.CLI.CodeGen; -using MicroForge.CLI.Exceptions; -using MicroForge.CLI.Extensions; +using MycroForge.CLI; +using MycroForge.CLI.CodeGen; +using MycroForge.CLI.Exceptions; +using MycroForge.CLI.Extensions; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using RootCommand = MicroForge.CLI.Commands.MicroForge; using var host = Host .CreateDefaultBuilder() @@ -21,7 +20,7 @@ try { var ctx = host.Services.GetRequiredService(); await ctx.LoadConfig(); - await host.Services.GetRequiredService().InvokeAsync(args); + await host.Services.GetRequiredService().InvokeAsync(args); await ctx.SaveConfig(); } catch diff --git a/MicroForge.CLI/ProjectConfig.cs b/MycroForge.CLI/ProjectConfig.cs similarity index 80% rename from MicroForge.CLI/ProjectConfig.cs rename to MycroForge.CLI/ProjectConfig.cs index b644916..b3ae6ee 100644 --- a/MicroForge.CLI/ProjectConfig.cs +++ b/MycroForge.CLI/ProjectConfig.cs @@ -1,4 +1,4 @@ -namespace MicroForge.CLI; +namespace MycroForge.CLI; public class ProjectConfig { diff --git a/MicroForge.CLI/ProjectContext.cs b/MycroForge.CLI/ProjectContext.cs similarity index 94% rename from MicroForge.CLI/ProjectContext.cs rename to MycroForge.CLI/ProjectContext.cs index 89f4cf2..6e6eceb 100644 --- a/MicroForge.CLI/ProjectContext.cs +++ b/MycroForge.CLI/ProjectContext.cs @@ -1,7 +1,7 @@ using System.Text.Json; -using MicroForge.CLI.Extensions; +using MycroForge.CLI.Extensions; -namespace MicroForge.CLI; +namespace MycroForge.CLI; public class ProjectContext { diff --git a/MicroForge.CLI/Shared.cs b/MycroForge.CLI/Shared.cs similarity index 91% rename from MicroForge.CLI/Shared.cs rename to MycroForge.CLI/Shared.cs index 9faf6ee..0079983 100644 --- a/MicroForge.CLI/Shared.cs +++ b/MycroForge.CLI/Shared.cs @@ -1,6 +1,6 @@ using System.Text.Json; -namespace MicroForge.CLI; +namespace MycroForge.CLI; public static class Shared { diff --git a/MicroForge.CLI/scripts/env.py b/MycroForge.CLI/scripts/env.py similarity index 100% rename from MicroForge.CLI/scripts/env.py rename to MycroForge.CLI/scripts/env.py diff --git a/MycroForge.CLI/scripts/publish.sh b/MycroForge.CLI/scripts/publish.sh new file mode 100644 index 0000000..57a756f --- /dev/null +++ b/MycroForge.CLI/scripts/publish.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash + +dotnet pack -v d + +dotnet tool update --global --add-source ./nupkg MycroForge.CLI -v d \ No newline at end of file diff --git a/MicroForge.Parsing/MicroForge.Parsing.csproj b/MycroForge.Parsing/MycroForge.Parsing.csproj similarity index 100% rename from MicroForge.Parsing/MicroForge.Parsing.csproj rename to MycroForge.Parsing/MycroForge.Parsing.csproj diff --git a/MicroForge.Parsing/PythonLexer.g4 b/MycroForge.Parsing/PythonLexer.g4 similarity index 100% rename from MicroForge.Parsing/PythonLexer.g4 rename to MycroForge.Parsing/PythonLexer.g4 diff --git a/MicroForge.Parsing/PythonLexerBase.cs b/MycroForge.Parsing/PythonLexerBase.cs similarity index 97% rename from MicroForge.Parsing/PythonLexerBase.cs rename to MycroForge.Parsing/PythonLexerBase.cs index 98d5448..946ee3e 100644 --- a/MicroForge.Parsing/PythonLexerBase.cs +++ b/MycroForge.Parsing/PythonLexerBase.cs @@ -28,7 +28,7 @@ THE SOFTWARE. using Antlr4.Runtime; using System.Text.RegularExpressions; -namespace MicroForge.Parsing; +namespace MycroForge.Parsing; public abstract class PythonLexerBase : Lexer { diff --git a/MicroForge.Parsing/PythonParser.g4 b/MycroForge.Parsing/PythonParser.g4 similarity index 100% rename from MicroForge.Parsing/PythonParser.g4 rename to MycroForge.Parsing/PythonParser.g4 diff --git a/MicroForge.Parsing/PythonParserBase.cs b/MycroForge.Parsing/PythonParserBase.cs similarity index 91% rename from MicroForge.Parsing/PythonParserBase.cs rename to MycroForge.Parsing/PythonParserBase.cs index 9211932..07c91ac 100644 --- a/MicroForge.Parsing/PythonParserBase.cs +++ b/MycroForge.Parsing/PythonParserBase.cs @@ -1,6 +1,6 @@ using Antlr4.Runtime; -namespace MicroForge.Parsing; +namespace MycroForge.Parsing; public abstract class PythonParserBase : Parser { diff --git a/MicroForge.sln b/MycroForge.sln similarity index 78% rename from MicroForge.sln rename to MycroForge.sln index e3be39a..84d1b6f 100644 --- a/MicroForge.sln +++ b/MycroForge.sln @@ -1,8 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroForge.CLI", "MicroForge.CLI\MicroForge.CLI.csproj", "{27EFB015-AFC3-4046-8D9A-DD5C5D3B35E0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MycroForge.CLI", "MycroForge.CLI\MycroForge.CLI.csproj", "{27EFB015-AFC3-4046-8D9A-DD5C5D3B35E0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroForge.Parsing", "MicroForge.Parsing\MicroForge.Parsing.csproj", "{D697CEFD-7CF7-4680-82FC-F84B08F81635}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MycroForge.Parsing", "MycroForge.Parsing\MycroForge.Parsing.csproj", "{D697CEFD-7CF7-4680-82FC-F84B08F81635}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/README.Docker.md b/README.Docker.md index ec0ea1f..606397b 100644 --- a/README.Docker.md +++ b/README.Docker.md @@ -1,46 +1,46 @@ -### Building and running your application - -When you're ready, start your application by running: -`docker compose up --build`. - -Your application will be available at http://localhost:8080. - -### Deploying your application to the cloud - -First, build your image, e.g.: `docker build -t myapp .`. -If your cloud uses a different CPU architecture than your development -machine (e.g., you are on a Mac M1 and your cloud provider is amd64), -you'll want to build the image for that platform, e.g.: -`docker build --platform=linux/amd64 -t myapp .`. - -Then, push it to your registry, e.g. `docker push myregistry.com/myapp`. - -Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/) -docs for more detail on building and pushing. - -### References -* [Docker's .NET guide](https://docs.docker.com/language/dotnet/) -* The [dotnet-docker](https://github.com/dotnet/dotnet-docker/tree/main/samples) - repository has many relevant samples and docs. - -### Dependencies - -bash (/usr/bin/bash) - -Python 3.10.2 (/usr/bin/python3) - - python3-pip - - python3-venv - -pkg-config (sudo apt update && sudo apt install pkg-config) - -### Notes - -Try Running NuGet restore when ANTLR doesn't generate Lexer or Parser - -### TODO -- Make entrypoint, i.e. main.py, customizable or fixed? -- Figure out why BashException cannot be caught, can it be due to the differences in scoping? -Because the `Bash` class is static and the services calling `Bash.ExecuteAsync` are in the container. -Maybe this in combination with the async nature of the whole thing? -- Make it so that `Bash.ExecuteAsync` can run "directly" in the calling terminal also. +### Building and running your application + +When you're ready, start your application by running: +`docker compose up --build`. + +Your application will be available at http://localhost:8080. + +### Deploying your application to the cloud + +First, build your image, e.g.: `docker build -t myapp .`. +If your cloud uses a different CPU architecture than your development +machine (e.g., you are on a Mac M1 and your cloud provider is amd64), +you'll want to build the image for that platform, e.g.: +`docker build --platform=linux/amd64 -t myapp .`. + +Then, push it to your registry, e.g. `docker push myregistry.com/myapp`. + +Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/) +docs for more detail on building and pushing. + +### References +* [Docker's .NET guide](https://docs.docker.com/language/dotnet/) +* The [dotnet-docker](https://github.com/dotnet/dotnet-docker/tree/main/samples) + repository has many relevant samples and docs. + +### Dependencies + +bash (/usr/bin/bash) + +Python 3.10.2 (/usr/bin/python3) + - python3-pip + - python3-venv + +pkg-config (sudo apt update && sudo apt install pkg-config) + +### Notes + +Try Running NuGet restore when ANTLR doesn't generate Lexer or Parser + +### TODO +- Make entrypoint, i.e. main.py, customizable or fixed? +- Figure out why BashException cannot be caught, can it be due to the differences in scoping? +Because the `Bash` class is static and the services calling `Bash.ExecuteAsync` are in the container. +Maybe this in combination with the async nature of the whole thing? +- Make it so that `Bash.ExecuteAsync` can run "directly" in the calling terminal also. - This will improve the usability of the "m4g run" command. \ No newline at end of file