@bongos/core 1.19.373 → 1.19.375
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 +98 -48
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +6 -0
- package/clients/bongos-client/index.cjs +6 -0
- package/clients/bongos-client/index.d.ts +8 -0
- package/clients/bongos-client/index.mjs +6 -0
- package/docs/adr/0194-joinability-one-door-decision.md +42 -0
- package/docs/adr/README.md +1 -0
- package/docs/api/openapi.json +159 -4
- package/docs/api-reference.md +7 -4
- package/docs/copy-inventory.md +252 -233
- package/docs/copy-registry.json +503 -301
- package/modules/builder-settings/profile-nudge-prefs.js +125 -0
- package/modules/builder-settings/routes/settings.js +48 -0
- package/modules/dev-box/app/src/vendor/bongos-client.cjs +6 -0
- package/modules/government/catalog.js +1 -1
- package/modules/hall-ui/public/builders.js +5 -3
- package/modules/hall-ui/public/goal-inbox.js +10 -0
- package/modules/hall-ui/public/hall-render.js +63 -22
- package/modules/hall-ui/public/index.html +4 -0
- package/modules/hall-ui/public/my-projects.js +6 -1
- package/modules/hall-ui/public/profile-nudge.js +122 -0
- package/modules/hall-ui/public/watch.css +8 -0
- package/modules/hall-ui/public/watch.js +56 -3
- package/modules/onboarding/module.json +1 -1
- package/modules/onboarding/routes/access-requests.js +87 -1
- package/modules/platform-identity/routes/my-projects.js +35 -9
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/public-landing/projects.html +169 -3
- package/scripts/gds/fitness-checks-write-validation.js +1 -0
- package/scripts/gds/login.js +24 -3
- package/scripts/gds/ship-land.js +94 -3
- package/src/bongos/auth-admission.js +50 -5
- package/src/bongos/auth.js +2 -1
- package/src/bongos/routes/auth.js +15 -0
- package/src/branding.js +3 -2
- package/src/module-api.js +22 -1
- package/tests/access_requests_invite.mjs +165 -0
- package/tests/auth_admission_gate.mjs +42 -0
- package/tests/join_relay_outcome.mjs +61 -0
- package/tests/joinability_apply.mjs +72 -0
- package/tests/joinability_invite_only.mjs +192 -0
- package/tests/joinability_open.mjs +89 -0
- package/tests/module_api.mjs +1 -0
- package/tests/profile_nudge_prefs.mjs +97 -0
- package/tests/projects_hub.mjs +76 -2
- package/tests/projects_hub_pre_uat.mjs +4 -2
- package/tests/public_landing_projects.mjs +10 -3
- package/tests/ship_push_diagnosis.mjs +78 -0
- package/tests/sound_player.mjs +38 -0
package/tests/sound_player.mjs
CHANGED
|
@@ -343,3 +343,41 @@ test('playerFor never throws and returns null or a [cmd, args] pair', () => {
|
|
|
343
343
|
assert.ok(Array.isArray(got[1]));
|
|
344
344
|
}
|
|
345
345
|
});
|
|
346
|
+
|
|
347
|
+
// ---------------------------------------------------------------------------
|
|
348
|
+
// readPrefs honours the path it was GIVEN (task 1003293).
|
|
349
|
+
//
|
|
350
|
+
// The legacy-path fallback used to fire for any unreadable path, so a caller
|
|
351
|
+
// naming an explicit file silently received a different one — the user's real
|
|
352
|
+
// prefs. That made the two fail-open tests above pass in CI (no prefs on a
|
|
353
|
+
// runner) and fail on any machine where the builder had saved sound settings:
|
|
354
|
+
// green where nobody looks, red where everybody does. The fallback is still
|
|
355
|
+
// right for the DEFAULT call; it is wrong the moment a caller names a file.
|
|
356
|
+
// ---------------------------------------------------------------------------
|
|
357
|
+
|
|
358
|
+
test('an explicit missing path fails open — it never substitutes another file', () => {
|
|
359
|
+
// The regression: write a legacy-shaped prefs file at the pre-rename location
|
|
360
|
+
// and prove an explicit path still ignores it. Skipped if the real file exists,
|
|
361
|
+
// because this test must never clobber a builder's own settings.
|
|
362
|
+
const legacy = player.LEGACY_PREFS_PATH;
|
|
363
|
+
if (!legacy || fs.existsSync(legacy)) {
|
|
364
|
+
// Nothing to plant, but the invariant is still checkable: an absent explicit
|
|
365
|
+
// path must yield the fail-open default, whatever the legacy file holds.
|
|
366
|
+
const p = player.readPrefs(path.join(os.tmpdir(), `otb-absent-${process.pid}.json`));
|
|
367
|
+
assert.equal(p.volume, 100);
|
|
368
|
+
assert.equal(p.enabled('ship'), true);
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
fs.mkdirSync(path.dirname(legacy), { recursive: true });
|
|
372
|
+
fs.writeFileSync(legacy, JSON.stringify({ volume: 11, ship: false }));
|
|
373
|
+
try {
|
|
374
|
+
const p = player.readPrefs(path.join(os.tmpdir(), `otb-absent-${process.pid}.json`));
|
|
375
|
+
assert.equal(p.volume, 100, 'an explicit path must not inherit the legacy file volume');
|
|
376
|
+
assert.equal(p.enabled('ship'), true, 'an explicit path must not inherit legacy mutes');
|
|
377
|
+
// …while the DEFAULT call still honours it — the fallback is not removed.
|
|
378
|
+
const d = player.readPrefs();
|
|
379
|
+
assert.equal(d.volume, 11, 'the default path must still fall back to the legacy file');
|
|
380
|
+
} finally {
|
|
381
|
+
fs.unlinkSync(legacy);
|
|
382
|
+
}
|
|
383
|
+
});
|