Add release channels as instance version targets

An instance's factorio.version can now target a release channel such as
"stable" or "experimental" (any key from factorio.com/api/latest-releases)
in addition to "latest" and specific X.Y / X.Y.Z versions.

The controller proxies the latest-releases API through a ValueCache and
persists the last successful response to latest-releases.json, serving that
copy when the API is unreachable. On instance start the host resolves a
channel to the concrete version it points to and feeds it into the existing
checkForUpdates/findVersion path, so a channel auto-installs and runs like a
pinned version. The version selector in the web UI lists the available
channels alongside "latest".

Also clarifies the host log/error when a newer version cannot be downloaded
automatically because the host uses a direct (single-version) Factorio
install rather than a versioned directory.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 4.8 committed 2026-06-26 14:19:34 +00:00
1 parent a274fe74e1
commit 9da48d5387
15 files changed
+226 -13

No files matched your search

+7
View File
@@ -72,6 +72,9 @@ export class Control extends lib.Link {
/** Cache for factorio versions to avoid repeat calls to the controller */
factorioVersions = new lib.ValueCache(this.requestFactorioVersions.bind(this));
/** Cache for the latest factorio release channels to avoid repeat calls to the controller */
latestReleases = new lib.ValueCache(this.requestLatestReleases.bind(this));
declare connector: ControlConnector;
constructor(
@@ -112,6 +115,10 @@ export class Control extends lib.Link {
return this.send(new lib.FactorioVersionsRequest());
}
requestLatestReleases() {
return this.send(new lib.LatestReleasesRequest());
}
async handleAccountUpdateEvent(event: lib.AccountUpdateEvent) {
this.accountRoles = event.roles??null;
this.emitAccountUpdate();