diff --git a/README.md b/README.md index 37ec537..93b70e3 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,8 @@ The `templates/` folder contains ready-to-copy starter files for new repos: The package also ships bundled agent content under `.agents/**`. During build, the SDK mirrors it into the consuming repository's `.agents/` folder by default so compatible coding agents can discover repository-aware guidance automatically. The SDK also injects a `.gitignore` file into each second-level agent folder with the content `# Ignore all files\n*\n\n# Don't ignore directories, so Git can traverse them\n!*/\n\n# Keep this file\n!.gitignore`, so the copied folder is ignored by Git while keeping the folder structure discoverable. +Repository metadata can also be defined before the SDK import: the package recognizes `PurviewHomepage`, `PurviewProjectUrl`, and `PurviewDocsUrl` for repo/site metadata, which is useful when a package or generated metadata needs to point at a public docs site or project page without hard-coding repo-specific values in each project file. + The mirror is change-aware: file fingerprints and content hashes are recorded in `.purview/agent-sync.cache` at the repository root, so unchanged content is skipped and repeat builds touch no files. Every write is staged into a temporary file and renamed into place, and because all @@ -481,9 +483,10 @@ Define `PURVIEW_SDK_EXCLUDE_EMBEDDED` only when your build already provides `Mic ## Namespace stripping -Certain suffixes are automatically stripped from `RootNamespace` to avoid awkward namespace names like `Acme.MyProject.Core.Something`: +Certain suffixes are automatically stripped from `RootNamespace` to avoid awkward namespace names like `Acme.MyProject.Core.Something`. -Stripped suffixes: `Core`, `EF`, `Shared`, `ClientShared`, `ServiceDefaults`, and all shared testing project names. +The current built-in stripping set is intentionally broader than the common examples and includes: +`SourceGeneration`, `SourceGenerators`, `SourceGenerator`, `ServiceDefaults`, `Infrastructure`, `Abstractions`, `ClientShared`, `Persistence`, `CodeFixers`, `DataAccess`, `Extensions`, `Generators`, `Analyzers`, `Contracts`, `Framework`, `Utilities`, `AppHost`, `Helpers`, `Library`, `Common`, `Shared`, `Infra`, `Utils`, `Core`, `Data`, `Host`, `Util`, `Lib`, `EF`, plus the known shared and shared-testing project names (`Shared*`, `SharedTesting*`). ### Extensions namespace rule (`PDS0002`) diff --git a/docs/wiki/Assembly-Name-Generation.md b/docs/wiki/Assembly-Name-Generation.md index eebf003..6e7bb23 100644 --- a/docs/wiki/Assembly-Name-Generation.md +++ b/docs/wiki/Assembly-Name-Generation.md @@ -41,8 +41,12 @@ are evaluated later and win. Certain suffixes are automatically stripped from `RootNamespace` to avoid awkward namespace names like `Acme.MyProject.Core.Something`. -Stripped suffixes: `Core`, `EF`, `Shared`, `ClientShared`, `ServiceDefaults`, and all shared and -shared-testing project names. +The built-in stripping set is broader than the common examples and includes: +`SourceGeneration`, `SourceGenerators`, `SourceGenerator`, `ServiceDefaults`, `Infrastructure`, +`Abstractions`, `ClientShared`, `Persistence`, `CodeFixers`, `DataAccess`, `Extensions`, +`Generators`, `Analyzers`, `Contracts`, `Framework`, `Utilities`, `AppHost`, `Helpers`, `Library`, +`Common`, `Shared`, `Infra`, `Utils`, `Core`, `Data`, `Host`, `Util`, `Lib`, `EF`, plus the known +shared and shared-testing project names (`Shared*`, `SharedTesting*`). See [Project Naming Conventions](Project-Naming-Conventions.md) and [InternalsVisibleTo](InternalsVisibleTo.md) for related naming behaviour. diff --git a/docs/wiki/Configuration-Reference.md b/docs/wiki/Configuration-Reference.md index ba07dce..5fdae36 100644 --- a/docs/wiki/Configuration-Reference.md +++ b/docs/wiki/Configuration-Reference.md @@ -34,6 +34,21 @@ See [Version Detection](Version-Detection.md) for the full resolution rules. | `DisableGenerateAssemblyInfoClass` | `false` | Set to `true` to disable the generated `AssemblyInfo` helper source. | | `AutoIncludeUsings` | `true` | Controls SDK-added global usings for `NamespacePrefix` and `RootNamespace`. | +## Repository metadata + +The SDK also supports repo/site metadata properties for generated package metadata and docs links. These +values are consumed before the import and are useful when a repository wants a single shared project URL +or docs base URL instead of repeating it per project: + +| Property | Default | Description | +| -- | -- | -- | +| `PurviewHomepage` | *(repo-specific)* | Base site URL for the repository or product docs. In this repo it is set to `https://purview.dev/`. | +| `PurviewProjectUrl` | *(repo-specific)* | Public project page URL; usually derived from `PurviewHomepage` plus a project path. | +| `PurviewDocsUrl` | *(repo-specific)* | Public docs URL; often derived from `PurviewHomepage` plus a docs path. | + +These values are not mandatory, but they provide a consistent place to keep package metadata and docs +links aligned with the repo's site structure. + ## Packable project defaults For projects where `IsPackable=true`, the SDK provides these defaults **only when the consuming diff --git a/docs/wiki/Project-Type-Detection.md b/docs/wiki/Project-Type-Detection.md index 0938bde..80fdcf2 100644 --- a/docs/wiki/Project-Type-Detection.md +++ b/docs/wiki/Project-Type-Detection.md @@ -30,6 +30,16 @@ wiki. targets. The detected `TestingType` also becomes the baseline test category, while additional categories remain available to the test suite. +The SDK recognises the following full `TestType` set, in addition to the standard `Unit` and +`Integration` values: +`Acceptance`, `Accessibility`, `Approval`, `Architecture`, `Benchmark`, `BlackBox`, `Capacity`, +`Chaos`, `Compatibility`, `Compliance`, `Component`, `Concurrency`, `Configuration`, `Contract`, +`Deployment`, `E2E`, `EndToEnd`, `Endurance`, `Environment`, `Failover`, `Functional`, `Fuzz`, +`Globalization`, `GrayBox`, `GreyBox`, `Integration`, `Interactive`, `Interoperability`, `Load`, +`Localization`, `Migration`, `Mutation`, `Penetration`, `Performance`, `Property`, `Recovery`, +`Regression`, `Resilience`, `Sanity`, `Scenario`, `Security`, `Smoke`, `Snapshot`, `Soak`, `Spike`, +`Stress`, `System`, `Threat`, `Unit`, `Upgrade`, `Usability`, `Visual`, and `WhiteBox`. + ## What each type gets ### Test projects (`IsTestProject=true`) diff --git a/package.json b/package.json index e6d5f4f..052f711 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "purview-build-sdk", - "version": "1.0.2.1", + "version": "1.0.2.2", "homepage": "https://purview.dev/projects/build-sdk/", "bugs": { "url": "https://github.com/purview-dev/build-sdk/issues" diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 89b9e2d..cf06bd3 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -16,6 +16,11 @@ + + + + + https://purview.dev/ $(PurviewHomepage)projects/build-sdk/ diff --git a/src/src/BuildSdk/Sdk/Sdk.props b/src/src/BuildSdk/Sdk/Sdk.props index 63a554d..7c9fe9e 100644 --- a/src/src/BuildSdk/Sdk/Sdk.props +++ b/src/src/BuildSdk/Sdk/Sdk.props @@ -19,45 +19,113 @@ + NAMESPACE SUFFIXES STRIPPED FROM RootNamespace + Ordered longest-first: overlapping entries (Shared/ClientShared, + Infra/Infrastructure, Data/DataAccess, Lib/Library) must match the + longest candidate, or a single-pass strip mangles them. + ===================================================================== --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + TESTING TYPES + Controls InternalsVisibleTo generation and TestingType detection. + Detection must use longest-match, not declaration order. + ===================================================================== --> - + + + + + + + + + + + + - + + + + + + + + + + + + - + + + + + + + + +