diff --git a/cmf-cli/Commands/new/HTMLCommand.cs b/cmf-cli/Commands/new/HTMLCommand.cs index a068d311a..be6ac9895 100644 --- a/cmf-cli/Commands/new/HTMLCommand.cs +++ b/cmf-cli/Commands/new/HTMLCommand.cs @@ -170,7 +170,15 @@ public void ExecuteV10(IDirectoryInfo workingDir, string version) rootPkgJson.devDependencies["cross-env"] = "^10.1.0"; } - rootPkgJson.scripts["serve"] = "cross-env NODE_OPTIONS=--max-old-space-size=8192 npm run start -- --host 0.0.0.0 --disable-host-check --port 7000"; + + if (mesVersion.Major < 12) + { + rootPkgJson.scripts["serve"] = "cross-env NODE_OPTIONS=--max-old-space-size=8192 npm run start -- --host 0.0.0.0 --disable-host-check --port 7000"; + } + else + { + rootPkgJson.scripts["serve"] = "cross-env NODE_OPTIONS=--max-old-space-size=8192 npm run start -- --host 0.0.0.0 --port 7000"; + } if (ExecutionContext.Instance.ProjectConfig.RepositoryType == RepositoryType.App) { diff --git a/cmf-cli/services/DependencyVersionService.cs b/cmf-cli/services/DependencyVersionService.cs index c11c70409..d8f64281a 100644 --- a/cmf-cli/services/DependencyVersionService.cs +++ b/cmf-cli/services/DependencyVersionService.cs @@ -60,29 +60,54 @@ public class DependencyVersionService : IDependencyVersionService { public const string NET6TARGETFRAMEWORK = "net6.0"; public const string NET8TARGETFRAMEWORK = "net8.0"; + public const string NET10TARGETFRAMEWORK = "net10.0"; public const string NET6SDK = "6.0.201"; // avoid >2xx as it requires HTTPS for nuget pulls public const string NET8SDK = "8.0.301"; + public const string NET10SDK = "10.0.301"; + public const string NODE24 = "24"; public const string NODE20 = "20"; public const string NODE18 = "18"; public const string NG15 = "15.2.1"; public const string NG17 = "17.2.1"; public const string NG21 = "21.1.0"; + public const string NG22 = "22.1.2"; public const string NG15_ZONE = "0.12.0"; public const string NG17_ZONE = "0.14.3"; public const string NG21_ZONE = "0.16.0"; + public const string NG22_ZONE = "0.16.2"; public const string NG15_TSESLINT = "5.44.0"; public const string NG17_TSESLINT = "6.10.0"; public const string NG21_TSESLINT = "8.52.0"; + public const string NG22_TSESLINT = "8.67.0"; public const string NG15_ESLINT = "8.28.0"; public const string NG17_ESLINT = "8.53.0"; public const string NG21_ESLINT = "9.39.2"; + public const string NG22_ESLINT = "10.8.1"; public const string NG15_TS = "4.8.4"; public const string NG17_TS = "5.3.3"; public const string NG21_TS = "5.9.3"; + public const string NG22_TS = "6.0.3"; - public string DotNetSdk(NuGetVersion productVersion) => productVersion.Major >= 11 ? NET8SDK : NET6SDK; - public string DotNetTargetFramework(NuGetVersion productVersion) => productVersion.Major >= 11 ? NET8TARGETFRAMEWORK : NET6TARGETFRAMEWORK; - public string Node(SemanticVersion productVersion) => productVersion.Major >= 11 ? NODE20 : NODE18; + public string DotNetSdk(NuGetVersion productVersion) => + productVersion.Major >= 12 + ? NET10SDK + : productVersion.Major >= 11 + ? NET8SDK + : NET6SDK; + + public string DotNetTargetFramework(NuGetVersion productVersion) => + productVersion.Major >= 12 + ? NET10TARGETFRAMEWORK + : productVersion.Major >= 11 + ? NET8TARGETFRAMEWORK + : NET6TARGETFRAMEWORK; + + public string Node(SemanticVersion productVersion) => + productVersion.Major >= 12 + ? NODE24 + : productVersion.Major >= 11 + ? NODE20 + : NODE18; public AngularDeps Angular(SemanticVersion productVersion) => productVersion.Major switch @@ -105,11 +130,11 @@ public AngularDeps Angular(SemanticVersion productVersion) => }, 12 => new AngularDeps() { - CLI = Version.Parse(NG21), - Zone = NG21_ZONE, - Typescript = NG21_TS, - ESLint = NG21_ESLINT, - TSESLint = NG21_TSESLINT + CLI = Version.Parse(NG22), + Zone = NG22_ZONE, + Typescript = NG22_TS, + ESLint = NG22_ESLINT, + TSESLint = NG22_TSESLINT }, _ => throw new NotSupportedException($"No Angular dependencies defined for MES version {productVersion}") };