@bongos/core 1.24.90 → 1.24.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bongos-core.json +43 -38
- package/.claude/skills/builder-reauth/SKILL.md +23 -25
- package/clients/bongos-client/index.d.ts +2 -1
- package/docs/adr/0396-google-sign-in-a-stand-in-login-and-a-browser-approved-cli-sign-in.md +8 -0
- package/docs/api/openapi.json +22 -2
- package/docs/api-reference.md +1 -1
- package/docs/copy-inventory.md +7 -7
- package/docs/copy-registry.json +7 -7
- package/docs/module-api-changelog.md +2 -0
- package/docs/page-readings.json +35 -35
- package/modules/hall-ui/public/city.css +6 -2
- package/modules/hall-ui/public/city.js +44 -2
- package/modules/hall-ui/public/shell-game.css +23 -13
- package/modules/hall-ui/public/shell-game.js +5 -4
- package/modules/hall-ui/public/visor.js +18 -3
- package/modules/hall-ui/records/start-screen.md +2 -0
- package/modules/hall-ui/records/visor.md +7 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +14 -0
- package/scripts/bongos/cli-lib.js +7 -6
- package/scripts/bongos/login.js +14 -3
- package/scripts/bongos/plain-cards.js +1 -1
- package/scripts/bongos/reauth.js +100 -50
- package/src/bongos/routes/auth-google.js +5 -3
- package/src/bongos/routes/auth.js +3 -3
- package/src/bongos/sign-in-pages.js +1 -2
- package/src/module-api.js +1 -1
- package/tests/cli_reauth_browser.mjs +157 -0
- package/tests/hall_city.mjs +41 -1
- package/tests/hall_city_living.mjs +2 -0
- package/tests/hall_start_screen.mjs +2 -1
- package/tests/hall_visor.mjs +27 -1
package/tests/hall_visor.mjs
CHANGED
|
@@ -66,6 +66,17 @@ test('a key means an action only when nothing else spent it', () => {
|
|
|
66
66
|
assert.equal(V.keyFor('artisan', ev('Escape')), null, 'the ambient glass never takes Escape (ADR 0399 §2.4)');
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
+
// task 1005209: a scene action the visor binds (bind: true) answers its key after the character's.
|
|
70
|
+
test("a place's own key: the visor binds it only when the scene asks, and the character's keys win", () => {
|
|
71
|
+
const V = loadPure();
|
|
72
|
+
const ev = (key) => ({ key, defaultPrevented: false, ctrlKey: false, metaKey: false, altKey: false });
|
|
73
|
+
const run = () => {};
|
|
74
|
+
V.scene({ name: 'x', place: 'X', actions: [{ label: 'Decide', key: 'D', bind: true, lead: true, run }, { label: 'Back to centre', key: '0', run }, { label: 'Claim here', key: 'c', bind: true, run }] });
|
|
75
|
+
assert.equal(V.keyFor('artisan', ev('d')).label, 'Decide', 'bound, and case does not matter');
|
|
76
|
+
assert.equal(V.keyFor('artisan', ev('0')), null, "a key the scene binds itself stays the scene's");
|
|
77
|
+
assert.equal(V.keyFor('artisan', ev('c')).id, 'claim', "the character's key wins a clash");
|
|
78
|
+
});
|
|
79
|
+
|
|
69
80
|
// task 1005203: the four segments are the version the project is building, in quarters.
|
|
70
81
|
test('progress: the starred version while open, else the one building, else none', () => {
|
|
71
82
|
const V = loadPure();
|
|
@@ -146,7 +157,7 @@ test('source: the minimal visor spends the Helm tokens and types in no colour, s
|
|
|
146
157
|
assert.ok(phone, 'the phone rules sit in the shared phone block');
|
|
147
158
|
assert.match(phone[0], /\.visor__hint:not\(\[data-visor-sheet\]\) \{ display: none; \}/, 'a phone keeps only Actions of the hints');
|
|
148
159
|
assert.doesNotMatch(read('home-city.css'), /visor-on/, 'Home has no top-right pill to clear any more');
|
|
149
|
-
assert.match(read('city.css'), /\nhtml\.visor-on \.city-door \{ bottom:
|
|
160
|
+
assert.match(read('city.css'), /\nhtml\.visor-on \.city-door \{ bottom: 224px; \}/, 'the city\'s door clears the centred button at every width');
|
|
150
161
|
});
|
|
151
162
|
|
|
152
163
|
// ---------- in a browser: the glass over a stand-in scene ----------
|
|
@@ -260,6 +271,21 @@ test('Escape closes one layer, top first: the sheet, then the scene\'s pick, the
|
|
|
260
271
|
await ctx.close();
|
|
261
272
|
});
|
|
262
273
|
|
|
274
|
+
test('a lead scene action is the first key hint, and its click and its key run it (task 1005209)', { skip }, async () => {
|
|
275
|
+
const { ctx, page, errors } = await open();
|
|
276
|
+
await page.evaluate(() => OTBVisor.scene({ name: 'test', place: 'Test city', actions: [{ label: 'Decide 2 in a row', key: 'd', bind: true, lead: true, run() { window.decided = (window.decided || 0) + 1; } }] }));
|
|
277
|
+
const hints = await page.$$eval('.visor__hints .visor__hint', (h) => h.map((x) => x.textContent));
|
|
278
|
+
assert.deepEqual(hints, ['DDecide 2 in a row', 'TYour thinking', 'AActions', 'EscOptions']);
|
|
279
|
+
await page.click('.visor__hint--place');
|
|
280
|
+
await page.keyboard.press('d');
|
|
281
|
+
assert.equal(await page.evaluate(() => window.decided), 2, 'the hint and D both press it');
|
|
282
|
+
await page.evaluate(() => document.documentElement.removeAttribute('data-game'));
|
|
283
|
+
await page.keyboard.press('d');
|
|
284
|
+
assert.equal(await page.evaluate(() => window.decided), 2, 'outside game mode the glass binds no key');
|
|
285
|
+
assert.deepEqual(errors, []);
|
|
286
|
+
await ctx.close();
|
|
287
|
+
});
|
|
288
|
+
|
|
263
289
|
test('the sheet lists the character\'s actions, then this place, and runs a scene action', { skip }, async () => {
|
|
264
290
|
const { ctx, page } = await open();
|
|
265
291
|
await page.click('[data-visor-sheet]');
|