Solhigson.Templates
10.3.0
dotnet new install Solhigson.Templates@10.3.0
dotnet new templates for Solhigson projects. solhigson-web: a layered solution (Domain, Application, Infrastructure, Web, Tests) on Solhigson.Framework.Core, Solhigson.Analyzers and Solhigson.Testing. Its host is composed from one partial per feature (logging with redaction of classified values, settings, authentication required everywhere but /alive, Hangfire from the framework, the status and deploy verbs), with Queues constants and message catalogues in Domain. Its test project inherits every Solhigson.Testing census, runs a Tier=Postgres pool test, and captures a TRX on every run, and a hang dump when a test hangs for ten minutes. Its GitHub workflows are a sharded suite gate selecting tests by the diff, a nightly full suite, a release keeping one artifact per sha it runs on, and a deploy of a sha that a green push-to-main gate run covers (its own run, or one on a commit differing from it only in the docs/ folders the gate's push filter negates); the gate and the release start on a push to main only when it changes a path outside docs/work/, so a sha whose push changed only docs/work/ has no artifact. The SDK is pinned in global.json, package versions are central, every project restores from its lock file in locked mode, NuGet audits every package, warnings are errors and every analyzer category is at warning.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
10.3.0: solhigson-web's gate (suite-gate.yml) and release (release.yml) start on a push to main only when it changes a path outside docs/work/ (push paths '**', '!docs/work/**'), one run on the push's last commit; GitHub runs neither when a push's diff has more than 3,000 files and none of its first 3,000 matches. The release has no concurrency group, so a newer push never drops a pending release; each run keeps its own <Name>-<sha> artifact, and a push that changes only docs/work/ leaves none. The gate never cancels a push run (cancel-in-progress: ${{ github.event_name != 'push' }}); a dispatch still cancels the run it supersedes. The deploy check (deploy-gate-check.sh) refuses a sha off main's first-parent line before any query; a sha with no completed push run of its own deploys when the newest of the latest 50 push runs on main that covers it is green, a run covering it when its commit differs from the sha only in the folders under docs/ that main's suite-gate.yml push filter negates, submodule pointers counted whatever .gitmodules or the checkout's config says; a filter of any other shape is not read, so such a sha needs a run of its own. A covering run in progress refuses (wait for it), a red one refuses naming its conclusion, and none refuses: the commit stays undeployable, so deploy a later commit a green run covers, after a push that changes a widening path (anything outside src/ and docs/) has run the full suite. WorkflowShapeTests pins both push filters and names a push trigger with branches but no paths list, a negation before the first positive entry and a literal cancel-in-progress: true. An existing project adopts it in one commit by the edits RELEASING.md lists. Nothing a build, a test or the deploy reads lies in a negated folder: no symlink into it, and no MSBuild item, AdditionalFiles or embedded resource from it. Use: dotnet new install Solhigson.Templates::10.3.0, then as for 10.0.0. 10.2.0: solhigson-web pins Solhigson.Framework.Core 10.18.0, its lock files regenerated (the OpenTelemetry packages Core 10.18.0 brings are in them); the Solhigson.Analyzers 10.1.0 and Solhigson.Testing 10.3.0 pins are unchanged. Host: the logging partial calls services.AddSolhigsonLogExport(configuration, "<Name>") after the composition's provider clear, so the OpenTelemetry provider stands beside NLog; it exports nothing until the environment or the Secrets file sets Solhigson:Logs:OtlpExportEnabled true and OTEL_EXPORTER_OTLP_ENDPOINT (the tracked appsettings.json holds neither), and every exported line goes to that endpoint with no redaction beyond the classified [LoggerMessage] values; while it exports, every record written during a request also carries the caller's IP address (client.address) and the signed-in user's id (enduser.id), both personal data, unredacted, and the host gains an IHttpContextAccessor if it had none. With no OTLP header set, a plain-http endpoint is not refused and carries all of it in clear, so use https unless the endpoint is loopback. A project audits what its lines write before turning it on. The pipeline opens the request's log scope first (app.UseSolhigsonLogScope(), before the exception handler and the explicit UseRouting), so every exported line a later middleware or an endpoint writes carries the request's trace id as its chain id. The startup report and status add the line "Log export: " and OtlpExportState.Describe(), which names settings, never their values. Tests: LogExportTests holds that a host with no endpoint starts with the OpenTelemetry provider beside NLog and exports nothing, that routing's own route constraints, a middleware after routing and the exception handler's Error line each read the request's chain id, and that the report line names no value. Use: dotnet new install Solhigson.Templates::10.2.0, then as for 10.0.0. 10.1.0: solhigson-web pins Solhigson.Framework.Core 10.16.0, Solhigson.Analyzers 10.1.0 and Solhigson.Testing 10.3.0, its lock files regenerated. Tests: the settings-file census inherited once (public sealed class SettingsFileCensus() : SettingsFileCensusTests();), so every key of an appsettings*.json git lists is a startup section's or one a [SettingsGroup] type declares, and holds no secret; SettingsCatalogTests holds that the host registers a catalog and that status prints each of SettingsCatalog.Report()'s lines, and that every [SettingsGroup] type the census reads (the test output folder's assemblies referencing the framework) is one the host registers, naming any other with "declare it under Infrastructure"; the template declares no group, so its own report adds no line, and the package's self-gate plants a group in a generated project and sees its report lines printed. Host: the settings partial registers the declared settings of every [SettingsGroup] type Infrastructure declares (SolhigsonConfigurationService.UseSettingsCatalog(SettingsCatalog.Of(...)), none in the template), held to the declaration rules as the host builds, and its startup report lines add SettingsCatalog.Report()'s, the declared settings by source, never a value. The SOLT003-SOLT007 settings rules of Solhigson.Analyzers 10.1.0 apply under the template's warnings-as-errors build. Use: dotnet new install Solhigson.Templates::10.1.0, then as for 10.0.0. 10.0.0: first release. solhigson-web follows the Solhigson dotnet design at 517cca335a805e12d5728dd90335c2dc43c21fc8 (docs/design/dotnet-design.md) and pins Solhigson.Framework.Core 10.15.0, Solhigson.Analyzers 10.0.0 and Solhigson.Testing 10.2.0. Use: dotnet new install Solhigson.Templates::10.0.0, dotnet new solhigson-web -n <Name>, then git init in the generated folder before the first test run, since the censuses root at the nearest .git. Solution: <Name>.slnx over src/<Name>.Domain, .Application, .Infrastructure, .Web and .Tests, each layer referencing the one below it alone; global.json equal to the framework's; Directory.Build.props, Directory.Packages.props, a packages.lock.json per project, .editorconfig, .gitignore and .gitattributes. Host: Program.cs builds the host, calls one Add and one Use of the composition and runs; each feature is a composition partial with its services, recurring jobs, allowlisted jobs, verbs and startup report lines; classified values reach the logs redacted; the status verb prints the startup report and the deploy verb exits 3 until the project sets its deploy target. Authentication: a fallback policy requires an authenticated user everywhere but /alive; a project adds its own scheme (until it does, an anonymous call to a mapped endpoint answers 500); HSTS and the https redirect hold on a direct listener. Domain: Queues constants and the user and error message catalogues. Hangfire: composed from Solhigson.Framework.Core in one partial, the recurring jobs registered from the features' declarations. Tests: every Solhigson.Testing 10.2.0 census inherited once, a Tier=Postgres pool test (Docker), a TRX and a ten-minute hang dump captured on every run, and shape tests over the layering, the build rules, the composition and the workflows. .github: suite-gate.yml (a dispatch or a push to main; build once, select test classes by the diff, shard), suite-nightly.yml (the full suite at 03:00 UTC), release.yml (a framework-dependent publish kept as <Name>-<sha>) and deploy.yml (dispatch only; refuses a sha unless its latest completed push-to-main gate run succeeded and it is on main's first-parent line, then runs the deploy verb's tests and the deploy verb).