cmf-cli v6#684
Open
joaoopereira wants to merge 19 commits intodevelopmentfrom
Open
Conversation
eefa9f8 to
2640cd2
Compare
f712880 to
8297753
Compare
0eb10dc to
a8ae3a7
Compare
4 tasks
a8ae3a7 to
9e2895d
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the Critical Manufacturing CLI for a “v6” baseline by moving the solution to newer runtime/tooling (notably System.CommandLine and .NET target frameworks), removing legacy (pre-v10 MES) support paths, and adapting tests/templates accordingly.
Changes:
- Retarget projects to
net10.0and update CI/devcontainer to newer SDK expectations. - Migrate command wiring and tests from older System.CommandLine handler APIs to the newer parse/invoke +
SetActionpattern. - Remove legacy package handlers/templates and enforce “MES >= 10” execution for core CLI commands.
Reviewed changes
Copilot reviewed 153 out of 173 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/tests.csproj | Retarget tests to net10.0; adds package refs needed by updated tests. |
| tests/Utilities/TestUtilities.cs | Updates test invocation helpers for new System.CommandLine invocation flow. |
| tests/TestConsole.cs | Adds new test console + invoke wrappers/extensions to capture output/errors. |
| tests/Specs/ValidateStartAndEndMethods.cs | Refactors log message expectations into variables for clarity. |
| tests/Specs/Telemetry.cs | Adjusts to StartupModule.Configure returning only RootCommand. |
| tests/Specs/Publish.cs | Migrates handler binding to SetAction + ParseResult.GetValue. |
| tests/Specs/ProjectConfig.cs | Removes classic project-config test (legacy coverage reduction). |
| tests/Specs/ProgramTests.cs | Adds tests for new MES version gate logic in Program.ValidateMesVersion. |
| tests/Specs/PackageTypeHandler.cs | Adjusts handler typing to match updated handler inheritance/visibility. |
| tests/Specs/NodeVersionUtilities.cs | Removes Node 12 expectations for older MES versions. |
| tests/Specs/MESVersionCommandValidation.cs | Updates validator wiring to new Validators.Add API. |
| tests/Specs/Logging.cs | Reworks LogLevel option parsing tests for new Option API. |
| tests/Specs/ListDependencies.cs | Migrates list-deps command tests to SetAction pattern. |
| tests/Specs/Init.cs | Updates init tests for MES >= 10 behavior and new error messages. |
| tests/Specs/DEEValidator.cs | Migrates invocation flow to parse+invoke with test console. |
| tests/Specs/Bump.cs | Removes legacy help metadata bump tests; adapts bump to newer handler/layout. |
| tests/Specs/Build.cs | Updates fixtures/assumptions to MES v10+ layouts only. |
| tests/Specs/Assemble.cs | Updates option/argument assertions and parse-value retrieval for new APIs. |
| tests/Objects/MockPackage.cs | Updates mock packages to MES v10+ and adds Angular config fixtures. |
| tests/Fixtures/prodPkg/Cmf.Presentation.HTML.9.9.9.zip | Fixture artifact referenced by tests (unchanged content in diff). |
| tests/Fixtures/prodPkg/Cmf.Documentation.9.9.9.zip | Fixture artifact referenced by tests (unchanged content in diff). |
| tests/Fixtures/pack/securityPortalV2/.project-config.json | Updates dependency versions for v10+ expectations. |
| tests/Fixtures/pack/securityPortal/.project-config.json | Updates fixture to MES v10+ values. |
| tests/Fixtures/pack/app/.project-config.json | Updates fixture (but introduces duplicated keys). |
| tests/Fixtures/new/.project-config.json | Updates fixture to MES v11+ values and dependency versions. |
| skills-lock.json | Adds skills lock metadata for agent skill usage. |
| package.json | Removes macOS from build:prod script. |
| core/core.csproj | Retargets core to net10.0; updates System.CommandLine and adds build/packaging deps. |
| core/Utilities/FileSystemUtilities.cs | Removes install-dependencies copy helper (legacy packaging path removal). |
| core/StartupModule.cs | Changes Configure to return only RootCommand and adjusts pipeline/directives. |
| core/Objects/TelemetryService.cs | Enables nullable and updates telemetry API nullability expectations. |
| core/LoggerHelpers.cs | Reworks LogLevel option parsing/binding to new System.CommandLine option APIs. |
| core/Constants/CoreConstants.cs | Removes install-dependencies folder constant (legacy removal). |
| core/Commands/BaseCommand.cs | Switches to Add APIs and introduces URI parsing helpers for options/args. |
| cmf-cli/services/DependencyVersionService.cs | Adds DotNetTargetFramework and updates Node/.NET version mapping to v10+ world. |
| cmf-cli/resources/template_feed/plugin/Plugin.Template/src/%solutionName%.csproj | Updates plugin template target framework and System.CommandLine version. |
| cmf-cli/resources/template_feed/iot/upTo9x/** | Removes IoT templates intended for <=9.x (legacy removal). |
| cmf-cli/resources/template_feed/html/upto9x/** | Removes HTML templates intended for <=9.x (legacy removal). |
| cmf-cli/resources/template_feed/helpSrcPkg/Help.Src.Package/src/%packageName%.metadata.ts | Removes legacy help metadata template file. |
| cmf-cli/resources/template_feed/helpSrcPkg/.template.config/template.json | Removes v9/v10 metadata switch logic. |
| cmf-cli/resources/template_feed/help/upTo9x/** | Removes help templates intended for <=9.x (legacy removal). |
| cmf-cli/resources/template_feed/business/upto8x/** | Removes business templates intended for <=8.x (legacy removal). |
| cmf-cli/resources/template_feed/business/from900/.template.config/template.json | Renames “business9” template identity/shortName to “business10”. |
| cmf-cli/installDependencies/readme.md | Removes legacy installDependencies docs. |
| cmf-cli/installDependencies/IoT/runtimePackages/*.ps1/.bat | Removes legacy IoT install dependency scripts. |
| cmf-cli/installDependencies/Data/** | Removes legacy Data install dependency scripts/configs/transforms. |
| cmf-cli/cmf.csproj | Retargets CLI to net10.0, updates deps, removes installDependencies embedding/copy. |
| cmf-cli/Program.cs | Updates StartupModule usage and adds global MES version gate (MES < 10 blocked). |
| cmf-cli/Handlers/PackageType/SecurityPortalPackageTypeHandler.cs | Removes legacy SecurityPortal handler (v1). |
| cmf-cli/Handlers/PackageType/PackageTypeHandler.cs | Removes legacy install-dependency copy hook from pack flow. |
| cmf-cli/Handlers/PackageType/IoTDataPackageTypeHandler.cs | Removes legacy IoTData v1 handler. |
| cmf-cli/Handlers/PackageType/HtmlNgCliPackageTypeHandler.cs | Removes legacy presentation config generation code path. |
| cmf-cli/Handlers/PackageType/HtmlGulpPackageTypeHandler.cs | Removes legacy gulp-based HTML handler. |
| cmf-cli/Handlers/PackageType/HelpGulpPackageTypeHandler.cs | Removes legacy gulp-based Help handler. |
| cmf-cli/Handlers/PackageType/DataPackageTypeHandler.cs | Removes legacy Data v1 handler. |
| cmf-cli/Factories/PackageTypeFactory.cs | Drops MES<10 handler branching; throws for removed handler versions; defaults to v2 handlers. |
| cmf-cli/Constants/CliConstants.cs | Removes installDependencies folder constant. |
| cmf-cli/Commands/upgrade/UpgradeCommand.cs | Removes legacy/dummy upgrade command. |
| cmf-cli/Commands/upgrade/UpgradeBaseCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/restore/RestoreCommand.cs | Migrates option/arg parsing and handler wiring to new APIs. |
| cmf-cli/Commands/publish/PublishCommand.cs | Migrates to new option parsing; reuses new URI parsing helper. |
| cmf-cli/Commands/plugin/PluginsCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/plugin/PluginCommand.cs | Migrates handler wiring and token forwarding for plugins. |
| cmf-cli/Commands/plugin/NewPluginCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/pack/PackCommand.cs | Migrates handler wiring; adds dry-run option. |
| cmf-cli/Commands/new/iot/GenerateTaskLibraryCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/new/iot/GenerateTaskCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/new/iot/GenerateDriverCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/new/iot/GenerateDotnetFrameworkDriverCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/new/iot/GenerateDotnetDriverCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/new/iot/GenerateConverterCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/new/iot/GenerateBusinessScenarioCommand.cs | Migrates handler wiring; removes unused MESVersion local. |
| cmf-cli/Commands/new/TestCommand.cs | Migrates handler wiring; uses DependencyVersionService.DotNetTargetFramework. |
| cmf-cli/Commands/new/NewCommand.cs | Migrates handler wiring; updates help invocation to parse+invoke. |
| cmf-cli/Commands/new/IoTCommand.cs | Removes <=9x path; restructures v10/v11 logic for ATL/Angular generation. |
| cmf-cli/Commands/new/GrafanaCommand.cs | Removes MES<10 guard (now enforced globally). |
| cmf-cli/Commands/new/FeatureCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/new/DataCommand.cs | Migrates handler wiring; simplifies target framework selection. |
| cmf-cli/Commands/new/BusinessCommand.cs | Migrates handler wiring; renames template to business10; uses DotNetTargetFramework. |
| cmf-cli/Commands/login/SyncCommand.cs | Migrates handler wiring; attempts to read parent args from parse result. |
| cmf-cli/Commands/login/LoginCommand.cs | Migrates args/options and handler wiring to SetAction. |
| cmf-cli/Commands/list/ListDependenciesCommand.cs | Migrates handler wiring; switches repos parsing to custom URI array parser. |
| cmf-cli/Commands/bump/BumpIoTCustomizationCommand.cs | Migrates handler wiring to SetAction and rewires options. |
| cmf-cli/Commands/bump/BumpCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/build/html/LocalizeCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/build/html/LinkLBOsCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/build/html/ExtractI18nCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/build/business/ValidateStartAndEndMethodsCommand.cs | Migrates handler wiring to SetAction. |
| cmf-cli/Commands/build/IoTLibCommand.cs | Removes MES<10 gating; migrates handler wiring. |
| cmf-cli/Commands/build/GenerateMenuItemsCommand.cs | Removes <=9 layout branching; migrates handler wiring. |
| cmf-cli/Commands/build/GenerateBasedOnTemplatesCommand.cs | Removes <=9 layout branching; migrates handler wiring. |
| cmf-cli/Commands/build/BuildCommand.cs | Migrates handler wiring; redefines --test option via new option APIs. |
| cmf-cli/Commands/assemble/AssembleCommand.cs | Migrates handler wiring and option parsing to new APIs. |
| cmf-cli/Commands/LayerTemplateCommand.cs | Refactors base arg/option injection to return symbols for SetAction. |
| cmf-cli/Commands/BaseCommand.cs | Updates plugin command attachment to Add API. |
| cmf-cli.slnx | Adds new solution format referencing the 3 main projects. |
| cmf-cli.sln | Removes legacy Visual Studio solution file. |
| .husky/pre-commit | Removes Node12 test category filter; runs broader test set by default. |
| .github/workflows/pr-tests.yml | Adds .NET 10 to SDK list, keeps Node setup, runs tests + coverage. |
| .github/workflows/npm-publish.yml | Switches publishing workflow to .NET 10; removes macOS artifact publishing. |
| .github/workflows/ci-tests.yml | Updates Node matrix to 18/20; changes SDK installation (now only 8.0.x). |
| .github/agents/skills/dotnet-best-practices/SKILL.md | Adds repo-specific .NET best-practices skill documentation. |
| .github/agents/cmf-cli-dotnet.agent.md | Adds a dedicated agent definition for .NET/C# work in this repo. |
| .devcontainer/devcontainer.json | Updates container capabilities, SDK/Node versions, and editor settings for the new baseline. |
cd579d2 to
c3be994
Compare
* chore: removing support for datapackage v1 * chore: improving package factory condition * chore: removing additional installdependencies references --------- Co-authored-by: Rui Jorge <RuiJorge@criticalmanufacturing.com>
c3be994 to
43228b6
Compare
Contributor
.NET Test Results |
Contributor
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.