-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Crequency/dev=main
[Pull Request] Script Engine Integration and Functional Improvements
- Loading branch information
Showing
34 changed files
with
533 additions
and
631 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace Cheese.Shared.PipeLine; | ||
|
||
public class CoreProcess | ||
{ | ||
/// <summary> | ||
/// The root path of current project, if not in any cheese project, you get null | ||
/// </summary> | ||
public string? ProjectRootPath { get; set; } | ||
|
||
/// <summary> | ||
/// Where cheese startup | ||
/// For example: | ||
/// $ cd */xxx | ||
/// $ cheese ... | ||
/// Then, `StartupPath` will be "*/xxx" | ||
/// </summary> | ||
public string? StartupPath { get; set; } | ||
|
||
/// <summary> | ||
/// The absolute path for `.cheese` folder in current project | ||
/// If not in any cheese project, you get null | ||
/// </summary> | ||
public string? CheeseDataPath { get; set; } | ||
|
||
/// <summary> | ||
/// Basic information for current repo/project | ||
/// </summary> | ||
public RepoInfo? RepoInfo { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Cheese.Shared; | ||
|
||
public class RepoInfo | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="coverlet.collector" Version="6.0.0"/> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/> | ||
<PackageReference Include="NUnit" Version="3.14.0"/> | ||
<PackageReference Include="NUnit.Analyzers" Version="3.9.0"/> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Using Include="NUnit.Framework"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Cheese\Cheese.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Cheese.Utils.General; | ||
|
||
namespace Cheese.UnitTests.Utils.Cheese; | ||
|
||
[TestFixture] | ||
[TestOf(typeof(ScriptHost))] | ||
public class ScriptHostTest | ||
{ | ||
[Test] | ||
public void NamespaceAccessibilityTest() | ||
{ | ||
const string code = """ | ||
using Cheese.Utils.General; | ||
|
||
ConsoleHelper.Instance.WriteLine("Test"); | ||
|
||
return "Done"; | ||
"""; | ||
|
||
var task = ScriptHost.Instance.ExecuteCodesAsync(code, false); | ||
|
||
task.Wait(); | ||
|
||
Assert.That(task.Result, Is.EqualTo("Done")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.