| | | 1 | | using System.ComponentModel; |
| | | 2 | | using Spectre.Console.Cli; |
| | | 3 | | |
| | | 4 | | namespace Orchestrator.Commands.Utility.Snapshots; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Base settings shared by all snapshot subcommands. |
| | | 8 | | /// </summary> |
| | | 9 | | public class SnapshotsBaseSettings : CommandSettings |
| | | 10 | | { |
| | | 11 | | [CommandOption("-c|--community")] |
| | | 12 | | [Description("The Kicktipp community (e.g., ehonda-test-buli)")] |
| | | 13 | | public required string Community { get; set; } |
| | | 14 | | |
| | | 15 | | [CommandOption("-v|--verbose")] |
| | | 16 | | [Description("Enable verbose output")] |
| | | 17 | | [DefaultValue(false)] |
| | | 18 | | public bool Verbose { get; set; } |
| | | 19 | | } |
| | | 20 | | |
| | | 21 | | /// <summary> |
| | | 22 | | /// Settings for the 'snapshots fetch' subcommand. |
| | | 23 | | /// </summary> |
| | | 24 | | public class SnapshotsFetchSettings : SnapshotsBaseSettings |
| | | 25 | | { |
| | | 26 | | [CommandOption("-o|--output")] |
| | | 27 | | [Description("Output directory for snapshots (default: kicktipp-snapshots/)")] |
| | | 28 | | [DefaultValue("kicktipp-snapshots")] |
| | | 29 | | public string OutputDirectory { get; set; } = "kicktipp-snapshots"; |
| | | 30 | | } |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// Settings for the 'snapshots encrypt' subcommand. |
| | | 34 | | /// </summary> |
| | | 35 | | public class SnapshotsEncryptSettings : SnapshotsBaseSettings |
| | | 36 | | { |
| | | 37 | | [CommandOption("-i|--input")] |
| | | 38 | | [Description("Input directory containing HTML files to encrypt (default: kicktipp-snapshots/)")] |
| | | 39 | | [DefaultValue("kicktipp-snapshots")] |
| | | 40 | | public string InputDirectory { get; set; } = "kicktipp-snapshots"; |
| | | 41 | | |
| | | 42 | | [CommandOption("-o|--output")] |
| | | 43 | | [Description("Output base directory for encrypted files (default: tests/KicktippIntegration.Tests/Fixtures/Html/Real |
| | | 44 | | [DefaultValue("tests/KicktippIntegration.Tests/Fixtures/Html/Real")] |
| | | 45 | | public string OutputDirectory { get; set; } = "tests/KicktippIntegration.Tests/Fixtures/Html/Real"; |
| | | 46 | | |
| | | 47 | | [CommandOption("--delete-originals")] |
| | | 48 | | [Description("Delete original HTML files after encryption")] |
| | | 49 | | [DefaultValue(false)] |
| | | 50 | | public bool DeleteOriginals { get; set; } |
| | | 51 | | } |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// Settings for the 'snapshots all' subcommand. |
| | | 55 | | /// </summary> |
| | | 56 | | public class SnapshotsAllSettings : SnapshotsBaseSettings |
| | | 57 | | { |
| | | 58 | | [CommandOption("--snapshots-dir")] |
| | | 59 | | [Description("Intermediate directory for unencrypted snapshots (default: kicktipp-snapshots/)")] |
| | | 60 | | [DefaultValue("kicktipp-snapshots")] |
| | 0 | 61 | | public string SnapshotsDirectory { get; set; } = "kicktipp-snapshots"; |
| | | 62 | | |
| | | 63 | | [CommandOption("-o|--output")] |
| | | 64 | | [Description("Output base directory for encrypted files (default: tests/KicktippIntegration.Tests/Fixtures/Html/Real |
| | | 65 | | [DefaultValue("tests/KicktippIntegration.Tests/Fixtures/Html/Real")] |
| | 0 | 66 | | public string OutputDirectory { get; set; } = "tests/KicktippIntegration.Tests/Fixtures/Html/Real"; |
| | | 67 | | |
| | | 68 | | [CommandOption("--keep-originals")] |
| | | 69 | | [Description("Keep original HTML files after encryption (by default they are deleted)")] |
| | | 70 | | [DefaultValue(false)] |
| | 0 | 71 | | public bool KeepOriginals { get; set; } |
| | | 72 | | } |