diff --git a/AGENTS.md b/AGENTS.md index 02479c3..696a44c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -9,8 +9,8 @@ ## BGS publication -- Slug `puerto-rico`, version **1** stays **private** (`public: false`), with **Unlisted off** and all BGS locales supported. Making it public needs an explicit request. -- Use `pnpm publish:private`; see [README](README.md#private-bgs-publication). It packages, uploads and verifies the engine/viewer and metadata. Admin credentials come from `~/.bgs`; never print or commit the token. +- Slug `puerto-rico`, version **1** has been released publicly (`public: true`), with **Unlisted off** and all BGS locales supported. Preserve its public status when publishing updates. +- Use `pnpm publish:bgs`; see [README](README.md#bgs-publication). It packages, uploads and verifies the engine/viewer and metadata. Admin credentials come from `~/.bgs`; never print or commit the token. - Bump the package version for engine changes. Ship `dist/engine.js` and the self-contained `dist/viewer.js` (global `puertorico`), never the local sandbox. Do not register tutorial metadata until playable BGS tutorials exist. - Source repositories are public on Codeberg (`origin`) and GitHub (`github`); push commits to both. Git delivery and BGS publication are separate. diff --git a/README.md b/README.md index e8a05c4..78e7036 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [Play now at boardgamers.space](https://boardgamers.space/boardgame/puerto-rico) -Implementation for Boardgamers Space, targeting **Puerto Rico 1897: Special Edition** and the official June 2026 errata. Version 1 is published as a **private beta** on [BGS](https://boardgamers.space/boardgame/puerto-rico), with Unlisted disabled. The engine package is `@boardgamers/puerto-rico@0.3.0`. The viewer follows the global BGS language preference. +Implementation for Boardgamers Space, targeting **Puerto Rico 1897: Special Edition** and the official June 2026 errata. Version 1 is published as a **public release** on [BGS](https://boardgamers.space/boardgame/puerto-rico), with Unlisted disabled. The engine package is `@boardgamers/puerto-rico@0.3.5`. The viewer follows the global BGS language preference. ```sh pnpm install @@ -56,11 +56,11 @@ pnpm build # dist/engine.js, dist/viewer.js, local sandbox pnpm test:browser # 320/390/768/1440px, real viewer events, chat/journal scrolling ``` -This private version still needs broader playtesting. The Festival marker interpretation is noted above. Original vector UI artwork is in `viewer/icons.js`; reference scans in `.local/` are ignored and never bundled. +Further playtesting remains welcome. The Festival marker interpretation is noted above. Original vector UI artwork is in `viewer/icons.js`; reference scans in `.local/` are ignored and never bundled. -## Private BGS publication +## BGS publication -`pnpm publish:private` builds the bundles, packages only the self-contained engine and its manifest, checks complete 1–5-player games from the extracted package, and uploads the engine/viewer to BGS. The script reads the admin token from `~/.bgs` without logging it, preserves the existing game/request identity, refuses to replace a public version, and verifies the private/listed flags and CDN bytes. It grants beta access to `coyotte508` if needed. Metadata snapshots and package artifacts stay in ignored `.local/release/`. +`pnpm publish:bgs` builds the bundles, packages only the self-contained engine and its manifest, checks complete 1–5-player games from the extracted package, and uploads the engine/viewer to BGS. The script reads the admin token from `~/.bgs` without logging it, preserves the existing game/request identity, requires an already public version, and verifies the public/listed flags and CDN bytes. Metadata snapshots and package artifacts stay in ignored `.local/release/`. The hosted bundle has no local preview controls or runtime asset dependencies. Global BGS locale and color-blind preferences are handled by the viewer; expansion switches remain internal. Four playable tutorial chapters are registered. @@ -100,5 +100,5 @@ After `pnpm build`, open `/tutorial.html?chapter=basics&locale=fr` on the local preview server (or replace the chapter ID above). `pnpm test` covers legality, conservation, replay, progress and translation completeness. `pnpm test:tutorials` plays every chapter through the actual controls on mobile and desktop and checks -all languages at 320 px. `pnpm publish:private` registers the chapter metadata with +all languages at 320 px. `pnpm publish:bgs` registers the chapter metadata with the viewer; translated BGS chapter-list labels use the platform metadata service. diff --git a/bgs/game.json b/bgs/game.json index 3dff5cf..6309378 100644 --- a/bgs/game.json +++ b/bgs/game.json @@ -1,6 +1,6 @@ { "label": "🏝️ Puerto Rico", - "public": false, + "public": true, "players": [1, 2, 3, 4, 5], "description": "Choose roles to develop your island, produce goods, and ship them for victory points. Every role helps your rivals too, so timing matters as much as building a strong economy. This adaptation of Puerto Rico 1897: Special Edition includes all six expansions and solo play against two Puertomas.", "rules": "[How to play](/page/puerto-rico/rules)", diff --git a/package.json b/package.json index fae2c98..57a2f2b 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "node scripts/build.mjs", "dev": "node scripts/dev.mjs", "test:browser": "node test/browser.mjs && node test/locales-browser.mjs", - "publish:private": "pnpm build && node scripts/publish-private.mjs", + "publish:bgs": "pnpm build && node scripts/publish-release.mjs", "publish:metadata": "node scripts/publish-metadata.mjs", "test:tutorials": "node test/tutorial-browser.mjs", "release:gallery": "pnpm build && node scripts/release-gallery.mjs", diff --git a/scripts/publish-private.mjs b/scripts/publish-release.mjs similarity index 90% rename from scripts/publish-private.mjs rename to scripts/publish-release.mjs index 4e22135..260697e 100644 --- a/scripts/publish-private.mjs +++ b/scripts/publish-release.mjs @@ -9,7 +9,7 @@ import { supportedLocales } from "../viewer/i18n.js"; import { packageEngine } from "./package-engine.mjs"; const defaults = JSON.parse(await readFile("bgs/game.json", "utf8")); -assert.equal(defaults.public, false); +assert.equal(defaults.public, true); const { tarball, version } = await packageEngine(); const token = (await readFile(`${homedir()}/.bgs`, "utf8")).trim(); const base = "https://admin.boardgamers.space/api/admin/gameinfo/puerto-rico"; @@ -42,8 +42,8 @@ async function api( } const versions = await api("/versions"); const existing = versions.some((v) => v.version === 1) ? await api("/1") : null; -if (existing?.public) - throw Error("The private publisher cannot replace a public version."); +if (!existing?.public) + throw Error("The release publisher requires an already public version."); await mkdir(".local/release", { recursive: true }); await writeFile( `.local/release/before-${Date.now()}.json`, @@ -71,7 +71,7 @@ await api("/1", "PUT", { engine: { ...engine.engine, entryPoint: "dist/engine.js" }, viewer: { ...defaults.viewer, url: uploaded.url, scriptBytes: bytes.length }, }); -// Listed in the beta catalog; the actual playable version stays private. +// Keep the released game listed in the catalog. const { metadata } = await releaseMetadata(); await publishCmsRules(token); await api("/meta", "PUT", metadata); @@ -85,12 +85,9 @@ await api( await api("/icon", "PUT", { mode: "pictogram" }); await translatePlatformMetadata(token, metadata); const translationsPending = false; -const access = await api("/beta-users"); -if (!access.some((u) => u.username === "coyotte508")) - await api("/beta-users", "POST", { usernameOrEmail: "coyotte508" }); const published = await api("/1"), meta = await api("/meta"); -assert.equal(published.public, false); +assert.equal(published.public, true); assert.deepEqual(published.players, defaults.players); assert.ok(!meta.unlisted); assert.equal(published.engine.package.version, version);