mirror of
https://github.com/coder/coder.git
synced 2026-09-21 20:51:01 +08:00
Scaffolds the `coderd/templatebuilder` package for the guided template builder ([DEVEX-272](https://linear.app/codercom/issue/DEVEX-272), [RFC](https://www.notion.so/coderhq/RFC-Guided-Template-Creation-Workflow-342d579be59280dfbf8eea2e5006dbda)). Adds the module catalog types and `go:embed` wiring that the template builder endpoints will use: - `codersdk.TemplateBuilderModule`, `TemplateBuilderModuleVariable`, and related types matching the RFC schema - Internal `ModuleManifest` type with `go:embed` wiring to bundle `module.json` files from `coderd/templatebuilder/modules/` - `LoadModules()` with defensive copy, unexported `parseModulesFromFS(fs.FS)` for test isolation, `ToSDK()` conversion - Real `code-server` module manifest as the first catalog entry - Strict validation: ID uniqueness, version non-empty, variable type/name validation, `DisallowUnknownFields`, and requiring `module.json` in every module directory - Tests via internal `catalog_internal_test.go` (for `parseModulesFromFS` with `fstest.MapFS` fixtures) and external `catalog_test.go` (for `LoadModules` and `ToSDK`), covering multi-module parsing, all variable types, validation errors, nil-slice normalization, and full SDK field assertions > [!NOTE] > Generated with [Coder Agents](https://coder.com/agents) by @jeremyruppel --------- Co-authored-by: McKayla はな <mckayla@hey.com>