Repository navigation
Registry build, validator and GitHub Pages publish - #71
Merged
Merged
Conversation
Add the registry build and validator (src/registry, scripts/registry), JSON schemas and format docs, fixture tests, the committed append-only registry/ tree for the 10 published modules at 1.0.0, module renames, and CI/publish workflows for GitHub Pages.
This was referenced Oct 17, 2026
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.
Closes #67
Part of gettakaro/takaro#4616
Summary
Turns this repository into a working module registry. A validator and a build produce
registry/registry.jsonand append-onlyregistry/<module>/<version>.jsonfiles, CI validates every PR, and merging tomainpublishes them to GitHub Pages athttps://gettakaro.github.io/modules. This reworks #41. Ten modules are published at1.0.0; the rest are unlisted.What Changed
src/registry/*,src/scripts/registry.ts): a pureplanRegistrycore with thin fs/git loaders.npm run registry:buildis all-or-nothing;registry:check [--base <ref>]writes nothing.--root <dir>lets community registries validate their own checkout.schema/*.schema.json,docs/registry-format.md): schemas formodule.json,registry.config.json,registry.jsonand version files.module.jsongains optionaldefaultSystemConfig(now emitted),summaryandminTakaroVersion.registry/): committed, generated. 10 modules at 1.0.0: afk-kick, community-fund, discord-status-bridge-7d2d, kill-tracker, mini-games, playtime-buff-rewards, referral-program, server-toolkit (was utils), vote-restart, zombie-racing.registry.config.json): hello-world (example), teleports, lottery, daily-rewards, server-messages (superseded), casino, buff-manager (held until tested).test-prefixes dropped, versions set to1.0.0,utils->server-toolkit(from Turn this repo into the first subscribable Takaro module registry #41),discord-7d2d-status-bridge->discord-status-bridge-7d2d,BuffManager->buff-manager(role UUID replaced by<role-id>), mini-games documents its opentdb.com dependency, zombie-racing gets asummary.ci.ymlrunsregistry:checkwith the base comparison; newpublish.ymldeploysregistry/andschema/to Pages on push tomain. No secrets.module-to-jsonis now a thin CLI overbuildModuleExport;validateEntityNamethrows instead of exiting.Contract for takaro#4622 / #4624 / #4625
registry.jsonkeepsversions: string[](current Takaro validates it and strips unknown keys) and adds a siblingversionDetails[]per version:sha256, optionalminTakaroVersion,requiredCapabilities(informational).sha256is the SHA-256 of the exact served bytes of the version file, so Takaro must hash the raw response body. Entries are frozen once published. Manifest descriptions are at most 500 characters (modulesummaryelsedescription).{ "schemaVersion": 1, "name": "Takaro Official Registry", "modules": [ { "name": "afk-kick", "description": "...", "latestVersion": "1.0.0", "versions": ["1.0.0"], "versionDetails": [ { "version": "1.0.0", "sha256": "<64 hex>", "requiredCapabilities": ["chat.send", "moderation.kick"] } ] } ] }Reviewer Guide
src/registry/plan.ts(the rules), thendocs/registry-format.md.--basecomparison incompare-base.ts); thepublish.ymlPages actions use the newest majors (configure-pages@v6, upload-pages-artifact@v5, deploy-pages@v5), which can only be exercised by a push tomain.registry/is the history. CI only verifies and deploys; it never writes back, so no tokens are needed and fork PRs work..gitattributesmarks images undermodules/binary (modules/** text eol=lfwould renormalize a screenshot) and pinstest/fixtures/**to LF. The mini-games description was tightened to fit the 500 character limit instead of adding asummary.Testing Plan
Happy Path
npm ci && npm run build && npm run typecheck && npm testpasses (69 tests).npm run registry:check -- --base origin/mainexits 0;npm run registry:buildprints "Nothing to add".jq -r '.modules[].name' registry/registry.jsonlists exactly the 10 modules above.curl -sSfI https://gettakaro.github.io/modules/registry.jsonreturns 200 with no redirect, and the sha256 ofafk-kick/1.0.0.jsonequals the manifest value.Edge Cases
modules/afk-kick/src/**without bumping:registry:buildfails namingafk-kick@1.0.0and writes nothing.1.0.1and rebuild:registry/afk-kick/1.0.1.jsonis added,1.0.0.jsonis unchanged.registry:checkfails on the sha256, and--basereports the modified file.Regression Checks
npm run module:to-json -- modules/zombie-racingstill works and now includesdefaultSystemConfig, tag1.0.0.git grep -n 'secrets\.' .githubprints nothing.Not covered here
gh api -X POST repos/gettakaro/modules/pages -f build_type=workflow. NoCNAME(takaro#4635).repository_dispatchon publish is takaro#4630 / static-sites#29.registry.takaro.iois the Pages custom domain,gettakaro.github.io/modulesredirects, and Takaro (maxRedirects: 0) must subscribe to the custom domain (takaro#4623, #4635).