0
0
mirror of https://github.com/sp-tarkov/assembly-tool.git synced 2025-02-12 17:10:45 -05:00
assembly-tool/ReCodeItCLI/Commands/AddMissingProperties.cs

26 lines
783 B
C#

using CliFx;
using CliFx.Attributes;
using CliFx.Infrastructure;
using ReCodeItCLI.Utils;
using ReCodeItLib.Utils;
namespace ReCodeItCLI.Commands;
[Command("AddMissingProperties", Description = "[DEVELOPMENT COMMAND] This command will add missing properties to the provided mapping.json.")]
public class AddMissingProperties : ICommand
{
[CommandParameter(0, IsRequired = true, Description = "Path to the mapping.json file to be fixed")]
public string MappingsPath { get; init; }
public ValueTask ExecuteAsync(IConsole console)
{
Debugger.TryWaitForDebuggerAttach();
var remaps = DataProvider.LoadMappingFile(MappingsPath);
DataProvider.UpdateMapping(MappingsPath, remaps);
Logger.LogSync("Successfully updated mapping file");
return default;
}
}