Reference in New Issue
Block a user
Delete Branch "feature/updateserver-npm-mcp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes #810 and #811.
#810 — npm/mcp must not emit a Joomla (or any legacy) feed
Every
Serve*update-feed handler inrouters/web/repo/updateserver.gonow gates positively on its own platform constant. PreviouslyServeUpdatesXMLusedplatform != "" && platform != "joomla" && platform != "both", so an unset platform fell through toGenerateJoomlaXML(the "empty ⇒ joomla" fallback). Now:ServeUpdatesXMLserves only forjoomla/both.ServeDolibarrJSONserves only fordolibarr/both(previously served for any non-joomla/non-empty platform — tightened).npm/mcp(and any unrecognized platform) now returnctx.NotFound(nil).Added
models/updateserver/platform.gowith platform constants,IsFeedlessPlatform(npm/mcp), andResolvePlatform.#811 — derive effective platform from
metadata.platformThe resolved
RepoUpdatePlatformcontext value now comes fromupdateserver_model.ResolvePlatform(cfgPlatform, metadataPlatform):RepoMetadata.Platform, read viaGetRepoMetadata);joomla.Applied in both places that set
RepoUpdatePlatform:services/context/repo_public_feed.go(feed endpoints) andservices/context/repo.go(release-page UI). This stops the two platform stores from drifting and removes the blanket "empty ⇒ joomla" fallback at its root.Schema / migration
No migration required.
UpdateStreamConfig.Platformis a plain string column (NOT NULL DEFAULT 'joomla') with no DB-level enum/CHECK constraint, andRepoMetadata.Platformis a freeVARCHAR(50).npm/mcpare enforced at the application layer only.Files changed
models/updateserver/platform.go(new)routers/web/repo/updateserver.goservices/context/repo_public_feed.goservices/context/repo.goBuild / deploy
Not built/deployed — requires forge rebuild + redeploy; review signatures against the deployed version. No Go toolchain was available in the authoring environment, so
gofmt/go vetwere not run; formatting was applied manually (tabs, import ordering). The base branch isdev.https://claude.ai/code/session_015UauDPfYC8S2mdUhoSK8zQ